@univerjs/sheets-formula-ui 0.4.2 → 0.5.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +9 -7
- package/lib/cjs/locale/en-US.js +40 -0
- package/lib/cjs/locale/fa-IR.js +40 -0
- package/lib/cjs/locale/ru-RU.js +40 -0
- package/lib/cjs/locale/vi-VN.js +37 -0
- package/lib/cjs/locale/zh-CN.js +38 -0
- package/lib/cjs/locale/zh-TW.js +38 -0
- package/lib/es/index.js +3317 -2424
- package/lib/es/locale/en-US.js +7684 -0
- package/lib/es/locale/fa-IR.js +7684 -0
- package/lib/es/locale/ru-RU.js +7683 -0
- package/lib/es/locale/vi-VN.js +7467 -0
- package/lib/es/locale/zh-CN.js +7661 -0
- package/lib/es/locale/zh-TW.js +7661 -0
- package/lib/index.css +1 -1
- package/lib/types/controllers/config.schema.d.ts +1 -1
- package/lib/types/controllers/formula-editor-show.controller.d.ts +4 -3
- package/lib/types/index.d.ts +1 -0
- package/lib/types/locale/en-US.d.ts +344 -156
- package/lib/types/locale/fa-IR.d.ts +344 -156
- package/lib/types/locale/function-list/compatibility/en-US.d.ts +106 -30
- package/lib/types/locale/function-list/compatibility/ja-JP.d.ts +106 -30
- package/lib/types/locale/function-list/compatibility/vi-VN.d.ts +106 -30
- package/lib/types/locale/function-list/compatibility/zh-CN.d.ts +106 -30
- package/lib/types/locale/function-list/compatibility/zh-TW.d.ts +106 -30
- package/lib/types/locale/function-list/lookup/en-US.d.ts +1 -5
- package/lib/types/locale/function-list/lookup/ja-JP.d.ts +1 -5
- package/lib/types/locale/function-list/lookup/vi-VN.d.ts +14 -0
- package/lib/types/locale/function-list/lookup/zh-CN.d.ts +1 -5
- package/lib/types/locale/function-list/lookup/zh-TW.d.ts +1 -5
- package/lib/types/locale/function-list/statistical/en-US.d.ts +173 -93
- package/lib/types/locale/function-list/statistical/ja-JP.d.ts +173 -93
- package/lib/types/locale/function-list/statistical/vi-VN.d.ts +983 -57
- package/lib/types/locale/function-list/statistical/zh-CN.d.ts +173 -93
- package/lib/types/locale/function-list/statistical/zh-TW.d.ts +173 -93
- package/lib/types/locale/function-list/text/en-US.d.ts +64 -28
- package/lib/types/locale/function-list/text/ja-JP.d.ts +64 -28
- package/lib/types/locale/function-list/text/ru-RU.d.ts +220 -106
- package/lib/types/locale/function-list/text/vi-VN.d.ts +124 -14
- package/lib/types/locale/function-list/text/zh-CN.d.ts +64 -28
- package/lib/types/locale/function-list/text/zh-TW.d.ts +64 -28
- package/lib/types/locale/ru-RU.d.ts +500 -234
- package/lib/types/locale/vi-VN.d.ts +1231 -105
- package/lib/types/locale/zh-CN.d.ts +344 -156
- package/lib/types/locale/zh-TW.d.ts +344 -156
- package/lib/types/sheets-formula-ui.plugin.d.ts +0 -1
- package/lib/types/views/formula-editor/help-function/HelpFunction.d.ts +11 -0
- package/lib/types/views/formula-editor/hooks/useFormulaDescribe.d.ts +7 -0
- package/lib/types/views/formula-editor/hooks/useFormulaSearch.d.ts +12 -0
- package/lib/types/views/formula-editor/hooks/useResizeScrollObserver.d.ts +18 -0
- package/lib/types/views/formula-editor/hooks/useSelectionAdd.d.ts +19 -0
- package/lib/types/views/formula-editor/hooks/useSheetSelectionChange.d.ts +3 -0
- package/lib/types/views/formula-editor/hooks/useStateRef.d.ts +18 -0
- package/lib/types/views/formula-editor/hooks/useVerify.d.ts +2 -0
- package/lib/types/views/formula-editor/index.d.ts +17 -0
- package/lib/types/views/formula-editor/search-function/SearchFunction.d.ts +12 -0
- package/lib/types/{controllers/utils/__tests__/ref-range-formula.spec.d.ts → views/formula-editor/utils/getFormulaText.d.ts} +1 -1
- package/lib/types/views/range-selector/hooks/useEmitChange.d.ts +3 -0
- package/lib/types/views/range-selector/hooks/useFirstHighlightDoc.d.ts +3 -0
- package/lib/types/views/range-selector/hooks/useFocus.d.ts +2 -0
- package/lib/types/views/range-selector/hooks/useFormulaToken.d.ts +2 -4
- package/lib/types/views/range-selector/hooks/useHighlight.d.ts +4 -2
- package/lib/types/views/range-selector/hooks/useLeftAndRightArrow.d.ts +2 -0
- package/lib/types/views/range-selector/hooks/useOnlyOneRange.d.ts +16 -0
- package/lib/types/views/range-selector/hooks/useRefactorEffect.d.ts +1 -1
- package/lib/types/{controllers/utils/__tests__/offset-formula-data.spec.d.ts → views/range-selector/hooks/useRefocus.d.ts} +1 -1
- package/lib/types/views/range-selector/hooks/useResetSelection.d.ts +16 -0
- package/lib/types/views/range-selector/hooks/useSheetSelectionChange.d.ts +1 -1
- package/lib/types/views/range-selector/hooks/useSwitchSheet.d.ts +16 -0
- package/lib/types/views/range-selector/hooks/useVerify.d.ts +2 -2
- package/lib/types/views/range-selector/index.d.ts +1 -5
- package/lib/types/views/range-selector/utils/unitRangesToText.d.ts +1 -1
- package/lib/umd/index.js +9 -7
- package/lib/umd/locale/en-US.js +40 -0
- package/lib/umd/locale/fa-IR.js +40 -0
- package/lib/umd/locale/ru-RU.js +40 -0
- package/lib/umd/locale/vi-VN.js +37 -0
- package/lib/umd/locale/zh-CN.js +38 -0
- package/lib/umd/locale/zh-TW.js +38 -0
- package/package.json +35 -27
- package/lib/locale/en-US.json +0 -11054
- package/lib/locale/fa-IR.json +0 -11054
- package/lib/locale/ru-RU.json +0 -10969
- package/lib/locale/vi-VN.json +0 -9678
- package/lib/locale/zh-CN.json +0 -11054
- package/lib/locale/zh-TW.json +0 -11054
- package/lib/types/controllers/utils/offset-formula-data.d.ts +0 -15
- package/lib/types/controllers/utils/ref-range-formula.d.ts +0 -71
package/lib/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.univer-sheet-range-selector-text-wrap{height:32px;padding:6px 8px 2px 6px;width:100%;display:flex;justify-content:space-around;align-items:center;gap:8px;border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-base);box-sizing:border-box;position:relative}.univer-sheet-range-selector-placeholder{font-size:14px;color:rgb(var(--grey-500));position:absolute;left:5px;bottom:8px}.univer-sheet-range-selector-error{border:1px solid rgb(var(--red-500))}.univer-sheet-range-selector-error-wrap{font-size:12px;color:rgb(var(--red-500));position:absolute;bottom:-18px;left:0}.univer-sheet-range-selector-text{position:relative;height:22px;width:100%}.univer-sheet-range-selector-active{border-color:rgb(var(--hyacinth-500))}.univer-sheet-range-selector-icon{cursor:pointer}.univer-sheet-range-selector-dialog-item{display:flex;align-items:center;justify-content:flex-start;gap:16px;margin-bottom:8px}.univer-sheet-range-selector-dialog-item-delete{cursor:pointer}.univer-formula-help-function{user-select:none;box-sizing:border-box;width:250px;margin:0;line-height:20px;list-style:none;background-color:rgb(var(--bg-color-secondary));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);outline:none;box-shadow:var(--box-shadow-base)}.univer-formula-help-function-title{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;padding:var(--padding-base) var(--padding-lg);font-size:var(--font-size-xxs);font-weight:500;color:rgb(var(--text-color));overflow-wrap:anywhere;border-bottom:1px solid rgb(var(--border-color))}.univer-formula-help-function-title-icons{display:flex}.univer-formula-help-function-title-icon{cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;margin-left:var(--margin-xs);padding:0;font-size:var(--font-size-xs);color:rgb(var(--text-color-secondary));background-color:transparent;border:none;border-radius:var(--border-radius-base);outline:none;transition:background-color .2s}.univer-formula-help-function-title-icon:hover{background-color:rgb(var(--bg-color-hover))}.univer-formula-help-function-content{overflow-y:auto;box-sizing:border-box;max-height:350px;padding:0 var(--padding-lg) var(--padding-base) var(--padding-lg)}.univer-formula-help-function-content-inner{margin-top:var(--margin-sm)}.univer-formula-help-function-content-params{margin:var(--margin-xs) 0}.univer-formula-help-function-content-params-title{margin-bottom:var(--margin-xs);font-size:var(--font-size-xs);font-weight:500;color:rgb(var(--text-color))}.univer-formula-help-function-content-params-detail{font-size:var(--font-size-xxs);font-weight:400;white-space:pre-wrap;word-wrap:break-word;color:rgb(var(--text-color-secondary))}.univer-formula-help-function-active{color:rgb(var(--primary-color))}.univer-formula-help-decorator{cursor:pointer;position:fixed;z-index:10;display:flex;align-items:center;justify-content:center;padding:var(--padding-xs)}.univer-formula-help-param,.univer-formula-help-param-prefix,.univer-formula-help-param-item,.univer-formula-help-param-active{z-index:1}.univer-formula-search-function{box-sizing:border-box;width:250px;max-height:400px;margin:0;padding:var(--padding-sm);line-height:20px;list-style:none;background-color:rgb(var(--bg-color-secondary));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);outline:none;box-shadow:var(--box-shadow-base);overflow:hidden;overflow-y:auto}.univer-formula-search-function-item{cursor:pointer;box-sizing:border-box;padding:var(--padding-xs) var(--padding-sm);color:rgb(var(--text-color));border-radius:var(--border-radius-base);transition:background .2s}.univer-formula-search-function-item-name{font-size:var(--font-size-xxs)}.univer-formula-search-function-item-name-light{color:rgb(var(--error-color))}.univer-formula-search-function-item-desc{display:block;font-size:var(--font-size-xxs);color:rgb(var(--grey-500))}.univer-formula-search-function-item-active{background-color:rgb(var(--bg-color-hover))}.univer-formula-more-functions{display:flex;flex-direction:column;justify-content:space-between;height:100%;line-height:20px}.univer-formula-more-functions-operation{display:flex;justify-content:flex-end}.univer-formula-more-functions-operation>button{margin:0 0 var(--margin-lg) var(--margin-base)}.univer-formula-function-params{margin-bottom:var(--margin-xs);font-size:var(--font-size-xxs)}.univer-formula-function-params-title{font-weight:500;color:rgb(var(--text-color-secondary))}.univer-formula-function-params-detail{font-weight:400;color:rgb(var(--text-color))}.univer-formula-input-params-list{overflow-y:auto;height:364px}.univer-formula-input-params-list-item-name{font-size:var(--font-size-sm)}.univer-formula-input-params-list-item-selector{margin:var(--margin-xxs) 0 var(--margin-xs) 0}.univer-formula-select-function-select{display:flex;gap:10%;align-items:center;justify-content:space-between}.univer-formula-select-function-result{user-select:none;overflow-y:auto;box-sizing:border-box;width:100%;max-height:364px;margin:0;margin-top:var(--margin-xs);padding:var(--padding-base);list-style:none;border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-base);outline:none}.univer-formula-select-function-result-item{cursor:pointer;position:relative;box-sizing:border-box;padding:var(--padding-xs) 28px;font-size:var(--font-size-xs);color:rgb(var(--text-color));border-radius:var(--border-radius-base);transition:background .2s}.univer-formula-select-function-result-item>span{display:block}.univer-formula-select-function-result-item-name-light{color:rgb(var(--error-color))}.univer-formula-select-function-result-item-selected{position:absolute;top:50%;left:6px;transform:translateY(-50%);display:inline-flex;font-size:var(--font-size-lg);color:rgb(var(--success-color))}.univer-formula-select-function-result-item-active{background-color:rgb(var(--bg-color-hover))}.univer-formula-select-function-content{overflow-y:auto;max-height:307px;margin:var(--margin-xs) 0}
|
|
1
|
+
.univer-sheet-range-selector-text-wrap{height:32px;padding:6px 8px 2px 6px;width:100%;display:flex;justify-content:space-around;align-items:center;gap:8px;border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-base);box-sizing:border-box;position:relative}.univer-sheet-range-selector-placeholder{font-size:14px;color:rgb(var(--grey-500));position:absolute;left:5px;bottom:8px}.univer-sheet-range-selector-error{border:1px solid rgb(var(--red-500))!important}.univer-sheet-range-selector-error-wrap{font-size:12px;color:rgb(var(--red-500));position:absolute;bottom:-18px;left:0}.univer-sheet-range-selector-text{position:relative;height:22px;width:100%}.univer-sheet-range-selector-active{border-color:rgb(var(--hyacinth-500))}.univer-sheet-range-selector-icon{cursor:pointer}.univer-sheet-range-selector-dialog-item{display:flex;align-items:center;justify-content:flex-start;gap:16px;margin-bottom:8px}.univer-sheet-range-selector-dialog-item-delete{cursor:pointer}.univer-sheet-embedding-formula-editor-active{border-color:rgb(var(--hyacinth-500))!important}.univer-sheet-embedding-formula-editor-wrap{height:32px;padding:6px 8px 2px 6px;width:100%;display:flex;justify-content:space-around;align-items:center;gap:8px;border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-base);box-sizing:border-box;position:relative}.univer-sheet-embedding-formula-editor-wrap .univer-sheet-embedding-formula-editor-text{width:100%;height:100%;position:relative}.univer-sheet-embedding-formula-editor-wrap .univer-sheet-embedding-formula-editor-error-wrap{font-size:12px;color:rgb(var(--red-500));position:absolute;bottom:-18px;left:0}.univer-sheet-embedding-formula-editor-error{border:1px solid rgb(var(--red-500))!important}.univer-formula-help-function{user-select:none;box-sizing:border-box;width:250px;margin:0;line-height:20px;list-style:none;background-color:rgb(var(--bg-color-secondary));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);outline:none;box-shadow:var(--box-shadow-base)}.univer-formula-help-function-title{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;padding:var(--padding-base) var(--padding-lg);font-size:var(--font-size-xxs);font-weight:500;color:rgb(var(--text-color));overflow-wrap:anywhere;border-bottom:1px solid rgb(var(--border-color))}.univer-formula-help-function-title-icons{display:flex}.univer-formula-help-function-title-icon{cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;margin-left:var(--margin-xs);padding:0;font-size:var(--font-size-xs);color:rgb(var(--text-color-secondary));background-color:transparent;border:none;border-radius:var(--border-radius-base);outline:none;transition:background-color .2s}.univer-formula-help-function-title-icon:hover{background-color:rgb(var(--bg-color-hover))}.univer-formula-help-function-content{overflow-y:auto;box-sizing:border-box;max-height:350px;padding:0 var(--padding-lg) var(--padding-base) var(--padding-lg)}.univer-formula-help-function-content-inner{margin-top:var(--margin-sm)}.univer-formula-help-function-content-params{margin:var(--margin-xs) 0}.univer-formula-help-function-content-params-title{margin-bottom:var(--margin-xs);font-size:var(--font-size-xs);font-weight:500;color:rgb(var(--text-color))}.univer-formula-help-function-content-params-detail{font-size:var(--font-size-xxs);font-weight:400;white-space:pre-wrap;word-wrap:break-word;color:rgb(var(--text-color-secondary))}.univer-formula-help-function-active{color:rgb(var(--primary-color))}.univer-formula-help-decorator{cursor:pointer;position:fixed;z-index:10;display:flex;align-items:center;justify-content:center;padding:var(--padding-xs)}.univer-formula-help-param,.univer-formula-help-param-prefix,.univer-formula-help-param-item,.univer-formula-help-param-active{z-index:1}.univer-formula-search-function{box-sizing:border-box;width:250px;max-height:400px;margin:0;padding:var(--padding-sm);line-height:20px;list-style:none;background-color:rgb(var(--bg-color-secondary));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);outline:none;box-shadow:var(--box-shadow-base);overflow:hidden;overflow-y:auto}.univer-formula-search-function-item{cursor:pointer;box-sizing:border-box;padding:var(--padding-xs) var(--padding-sm);color:rgb(var(--text-color));border-radius:var(--border-radius-base);transition:background .2s}.univer-formula-search-function-item-name{font-size:var(--font-size-xxs)}.univer-formula-search-function-item-name-light{color:rgb(var(--error-color))}.univer-formula-search-function-item-desc{display:block;font-size:var(--font-size-xxs);color:rgb(var(--grey-500))}.univer-formula-search-function-item-active{background-color:rgb(var(--bg-color-hover))}.univer-formula-more-functions{display:flex;flex-direction:column;justify-content:space-between;height:100%;line-height:20px}.univer-formula-more-functions-operation{display:flex;justify-content:flex-end}.univer-formula-more-functions-operation>button{margin:0 0 var(--margin-lg) var(--margin-base)}.univer-formula-function-params{margin-bottom:var(--margin-xs);font-size:var(--font-size-xxs)}.univer-formula-function-params-title{font-weight:500;color:rgb(var(--text-color-secondary))}.univer-formula-function-params-detail{font-weight:400;color:rgb(var(--text-color))}.univer-formula-input-params-list{overflow-y:auto;height:364px}.univer-formula-input-params-list-item-name{font-size:var(--font-size-sm)}.univer-formula-input-params-list-item-selector{margin:var(--margin-xxs) 0 var(--margin-xs) 0}.univer-formula-select-function-select{display:flex;gap:10%;align-items:center;justify-content:space-between}.univer-formula-select-function-result{user-select:none;overflow-y:auto;box-sizing:border-box;width:100%;max-height:364px;margin:0;margin-top:var(--margin-xs);padding:var(--padding-base);list-style:none;border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-base);outline:none}.univer-formula-select-function-result-item{cursor:pointer;position:relative;box-sizing:border-box;padding:var(--padding-xs) 28px;font-size:var(--font-size-xs);color:rgb(var(--text-color));border-radius:var(--border-radius-base);transition:background .2s}.univer-formula-select-function-result-item>span{display:block}.univer-formula-select-function-result-item-name-light{color:rgb(var(--error-color))}.univer-formula-select-function-result-item-selected{position:absolute;top:50%;left:6px;transform:translateY(-50%);display:inline-flex;font-size:var(--font-size-lg);color:rgb(var(--success-color))}.univer-formula-select-function-result-item-active{background-color:rgb(var(--bg-color-hover))}.univer-formula-select-function-content{overflow-y:auto;max-height:307px;margin:var(--margin-xs) 0}
|
|
@@ -4,7 +4,7 @@ import { MenuConfig } from '@univerjs/ui';
|
|
|
4
4
|
/**
|
|
5
5
|
* Base configuration for the plugin.
|
|
6
6
|
*/
|
|
7
|
-
export declare const PLUGIN_CONFIG_KEY_BASE = "sheets-formula.base.config";
|
|
7
|
+
export declare const PLUGIN_CONFIG_KEY_BASE = "sheets-formula-ui.base.config";
|
|
8
8
|
export declare const configSymbolBase: unique symbol;
|
|
9
9
|
export interface IUniverSheetsFormulaBaseConfig {
|
|
10
10
|
menu?: MenuConfig;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Workbook, Disposable, ICommandService, ILogService, ThemeService } from '@univerjs/core';
|
|
2
2
|
import { IRenderContext, IRenderModule, SpreadsheetSkeleton, IRenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
import { FormulaDataModel } from '@univerjs/engine-formula';
|
|
4
|
-
import {
|
|
4
|
+
import { SheetInterceptorService } from '@univerjs/sheets';
|
|
5
|
+
import { SheetSkeletonManagerService } from '@univerjs/sheets-ui';
|
|
5
6
|
export declare class FormulaEditorShowController extends Disposable implements IRenderModule {
|
|
6
7
|
private readonly _context;
|
|
7
|
-
private
|
|
8
|
+
private readonly _sheetInterceptorService;
|
|
8
9
|
private readonly _formulaDataModel;
|
|
9
10
|
private readonly _themeService;
|
|
10
11
|
private readonly _renderManagerService;
|
|
@@ -13,7 +14,7 @@ export declare class FormulaEditorShowController extends Disposable implements I
|
|
|
13
14
|
private readonly _logService;
|
|
14
15
|
private _previousShape;
|
|
15
16
|
private _skeleton;
|
|
16
|
-
constructor(_context: IRenderContext<Workbook>,
|
|
17
|
+
constructor(_context: IRenderContext<Workbook>, _sheetInterceptorService: SheetInterceptorService, _formulaDataModel: FormulaDataModel, _themeService: ThemeService, _renderManagerService: IRenderManagerService, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _logService: ILogService);
|
|
17
18
|
private _initSkeletonChangeListener;
|
|
18
19
|
protected _changeRuntime(skeleton: SpreadsheetSkeleton): void;
|
|
19
20
|
private _initInterceptorEditorStart;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export { MoreFunctionsOperation } from './commands/operations/more-functions.ope
|
|
|
21
21
|
export { ReferenceAbsoluteOperation } from './commands/operations/reference-absolute.operation';
|
|
22
22
|
export { SearchFunctionOperation } from './commands/operations/search-function.operation';
|
|
23
23
|
export { RangeSelector } from './views/range-selector/index';
|
|
24
|
+
export { FormulaEditor } from './views/formula-editor/index';
|
|
24
25
|
export { RefSelectionsRenderService } from './services/render-services/ref-selections.render-service';
|
|
25
26
|
export type { IFormulaInfo, IOtherFormulaResult } from './services/formula-common';
|
|
26
27
|
export { FORMULA_PROMPT_ACTIVATED } from './services/prompt.service';
|