diff --git a/packages/core/src/facade/f-enum.ts b/packages/core/src/facade/f-enum.ts new file mode 100644 index 00000000000..d68af3cd6d5 --- /dev/null +++ b/packages/core/src/facade/f-enum.ts @@ -0,0 +1,29 @@ +/** + * Copyright 2023-present DreamNum Inc. + * + * 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. + */ + +import { DataValidationErrorStyle } from '../types/enum/data-validation-error-style'; +import { DataValidationOperator } from '../types/enum/data-validation-operator'; +import { DataValidationRenderMode } from '../types/enum/data-validation-render-mode'; +import { DataValidationStatus } from '../types/enum/data-validation-status'; +import { DataValidationType } from '../types/enum/data-validation-type'; + +export class FEnum { + static DataValidationType = DataValidationType; + static DataValidationErrorStyle = DataValidationErrorStyle; + static DataValidationRenderMode = DataValidationRenderMode; + static DataValidationOperator = DataValidationOperator; + static DataValidationStatus = DataValidationStatus; +} diff --git a/packages/core/src/facade/f-event.ts b/packages/core/src/facade/f-event.ts new file mode 100644 index 00000000000..5f7744944e2 --- /dev/null +++ b/packages/core/src/facade/f-event.ts @@ -0,0 +1,19 @@ +/** + * Copyright 2023-present DreamNum Inc. + * + * 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 class FEventName { + static CellChanged = 'CellChanged'; +} diff --git a/packages/core/src/facade/f-univer.ts b/packages/core/src/facade/f-univer.ts index afad97371a4..e36fb6324d6 100644 --- a/packages/core/src/facade/f-univer.ts +++ b/packages/core/src/facade/f-univer.ts @@ -25,6 +25,8 @@ import { RedoCommand, UndoCommand } from '../services/undoredo/undoredo.service' import { Univer } from '../univer'; import { FBase } from './f-base'; import { FBlob } from './f-blob'; +import { FEnum } from './f-enum'; +import { FEventName } from './f-event'; import { FHooks } from './f-hooks'; export class FUniver extends FBase { @@ -162,4 +164,16 @@ export class FUniver extends FBase { newBlob(): FBlob { return this._injector.createInstance(FBlob); } + + get Enum() { + return FEnum; + } + + get Event() { + return FEventName; + } + + addEvent(event: FEventName, callback: () => void) { + + } } diff --git a/packages/core/src/facade/f-util.ts b/packages/core/src/facade/f-util.ts new file mode 100644 index 00000000000..f025dde7cbb --- /dev/null +++ b/packages/core/src/facade/f-util.ts @@ -0,0 +1,19 @@ +/** + * Copyright 2023-present DreamNum Inc. + * + * 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 class FUtil { + static Range = Range; +} diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 259e249433d..51a3e3edff2 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -44,6 +44,8 @@ export { FBase } from './facade/f-base'; export { FUniver } from './facade/f-univer'; export { FHooks } from './facade/f-hooks'; export { FBlob, type IFBlobSource } from './facade/f-blob'; +export { FEventName } from './facade/f-event'; +export { FEnum } from './facade/f-enum'; export { isNumeric, isSafeNumeric } from './common/number'; export { Registry, RegistryAsMap } from './common/registry'; export { requestImmediateMacroTask } from './common/request-immediate-macro-task';