mirror of
https://github.com/dream-num/univer.git
synced 2026-10-02 04:24:34 +08:00
refactor: remove obsolete value state (#7356)
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
/**
|
||||
* Copyright 2023-present DreamNum Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export type FDocEmbedUnitFacadeMapAugmentation = never;
|
||||
@@ -25,6 +25,5 @@ export type { FDocumentSectionPageSetup, IFDocumentSectionColumnOptions, IFDocum
|
||||
export { FDocumentTextRange } from './f-document-text-range';
|
||||
export type { IFDocumentTextRangeDescription, IFDocumentTextStyleRun } from './f-document-text-range';
|
||||
export * from './f-enum';
|
||||
export type { FDocEmbedUnitFacadeMapAugmentation } from './f-types';
|
||||
export type { IFDocumentTextRange } from './utils';
|
||||
export { stripBlockTokens } from './utils';
|
||||
|
||||
@@ -15,7 +15,14 @@
|
||||
*/
|
||||
|
||||
import type { IRange, IUnitRangeName, IUnitRangeWithName } from '@univerjs/core';
|
||||
import { AbsoluteRefType, columnLabelToNumber, MAX_COLUMN_COUNT, MAX_ROW_COUNT, RANGE_TYPE, Tools } from '@univerjs/core';
|
||||
import {
|
||||
AbsoluteRefType,
|
||||
columnLabelToNumber,
|
||||
MAX_COLUMN_COUNT,
|
||||
MAX_ROW_COUNT,
|
||||
RANGE_TYPE,
|
||||
Tools,
|
||||
} from '@univerjs/core';
|
||||
import { includeFormulaLexerToken } from '../../basics/match-token';
|
||||
import { isReferenceString, UNIT_NAME_REGEX_PRECOMPILING } from '../../basics/regex';
|
||||
import { prefixToken, SPACE_TOKEN } from '../../basics/token';
|
||||
|
||||
@@ -58,10 +58,6 @@ enum ArrayCalculateType {
|
||||
SINGLE,
|
||||
}
|
||||
|
||||
export function fromObjectToString(array: IArrayValueObject) {
|
||||
return '';
|
||||
}
|
||||
|
||||
export function transformToValueObject(array: Array<Array<number | string | boolean | null>> = [], isIgnoreNumberPattern: boolean = false) {
|
||||
const arrayValueList: BaseValueObject[][] = [];
|
||||
|
||||
@@ -173,7 +169,7 @@ export class ArrayValueObject extends BaseValueObject {
|
||||
}>;
|
||||
|
||||
constructor(rawValue: string | IArrayValueObject) {
|
||||
super(typeof rawValue === 'string' ? rawValue as string : fromObjectToString(rawValue as IArrayValueObject));
|
||||
super();
|
||||
|
||||
this._values = this._formatValue(rawValue);
|
||||
}
|
||||
|
||||
@@ -37,10 +37,6 @@ export interface IArrayValueObject {
|
||||
export class BaseValueObject extends ObjectClassType {
|
||||
private _customData: CustomData;
|
||||
|
||||
constructor(private _rawValue: string | number | boolean) {
|
||||
super();
|
||||
}
|
||||
|
||||
override isValueObject() {
|
||||
return true;
|
||||
}
|
||||
@@ -531,7 +527,7 @@ export class ErrorValueObject extends BaseValueObject {
|
||||
private _errorType: ErrorType,
|
||||
private _errorContent: string = ''
|
||||
) {
|
||||
super(_errorType);
|
||||
super();
|
||||
}
|
||||
|
||||
override getValue() {
|
||||
|
||||
@@ -30,7 +30,7 @@ export class CubeValueObject extends BaseValueObject {
|
||||
private _values: ArrayValueObject[] = [];
|
||||
|
||||
constructor(values: ArrayValueObject[]) {
|
||||
super('');
|
||||
super();
|
||||
this._values = values;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ export class LambdaValueObjectObject extends BaseValueObject {
|
||||
|
||||
private _lambdaPrivacyVarKeys: string[]
|
||||
) {
|
||||
super(0);
|
||||
super();
|
||||
this._lambdaPrivacyValueMap.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ export class NullValueObject extends BaseValueObject {
|
||||
private static _instance: NullValueObject;
|
||||
|
||||
static create() {
|
||||
this._instance = this._instance || new NullValueObject(0);
|
||||
this._instance = this._instance || new NullValueObject();
|
||||
return this._instance;
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ export class BooleanValueObject extends BaseValueObject {
|
||||
}
|
||||
|
||||
constructor(rawValue: boolean) {
|
||||
super(rawValue);
|
||||
super();
|
||||
|
||||
this._value = rawValue;
|
||||
}
|
||||
@@ -448,7 +448,7 @@ export class NumberValueObject extends BaseValueObject {
|
||||
}
|
||||
|
||||
constructor(rawValue: number) {
|
||||
super(rawValue);
|
||||
super();
|
||||
|
||||
this._value = Number(rawValue);
|
||||
}
|
||||
@@ -1433,7 +1433,7 @@ export class StringValueObject extends BaseValueObject {
|
||||
};
|
||||
|
||||
constructor(rawValue: string) {
|
||||
super(rawValue);
|
||||
super();
|
||||
this._value = rawValue;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
/**
|
||||
* Copyright 2023-present DreamNum Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export type FSheetEmbedUnitFacadeMapAugmentation = never;
|
||||
@@ -21,7 +21,6 @@ export * from './f-enum';
|
||||
export * from './f-event';
|
||||
export { FRange } from './f-range';
|
||||
export { FSelection } from './f-selection';
|
||||
export type { FSheetEmbedUnitFacadeMapAugmentation } from './f-types';
|
||||
export type * from './f-univer';
|
||||
export { FWorkbook } from './f-workbook';
|
||||
export { FWorksheet } from './f-worksheet';
|
||||
|
||||
Reference in New Issue
Block a user