@univerjs-pro/shape-editor-ui 1.0.0-alpha.7 → 1.0.0-alpha.8
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/formula-shape-en-us-B0fVf3OO.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/formula-shape-en-us-BbvC914f.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/formula-shape-en-us-BbvC914f.js +1 -1
- package/lib/index.css +82 -50
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/config/config.d.ts +26 -7
- package/lib/types/index.d.ts +10 -3
- package/lib/types/locale/en-US.d.ts +34 -1
- package/lib/types/services/formula-binding-editor.d.ts +23 -0
- package/lib/types/services/{shape-formula-reference.d.ts → formula-binding-reference.d.ts} +4 -4
- package/lib/types/services/{shape-formula-unit-viewer.service.d.ts → formula-binding-unit-viewer.service.d.ts} +10 -10
- package/lib/types/utils/activate-drawing-object.d.ts +1 -1
- package/lib/types/views/FormulaBindingEditorDialog.d.ts +11 -0
- package/lib/types/views/FormulaBindingNumberFormat.d.ts +23 -0
- package/lib/types/views/formula-binding-number-format-utils.d.ts +17 -0
- package/lib/types/views/shape-floating-toolbar/ShapeFloatingToolbar.d.ts +10 -13
- package/lib/types/views/shape-text-editor/ShapeTextPositionWrapper.d.ts +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +24 -25
- package/lib/types/services/shape-formula-editor.d.ts +0 -20
- package/lib/types/views/formula-shape/FormulaShapeNumberFormat.d.ts +0 -23
- package/lib/types/views/formula-shape/formula-shape-number-format-utils.d.ts +0 -17
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type FormulaBindingNumberFormatType = 'general' | 'accounting' | 'currency' | 'date' | 'number' | 'custom';
|
|
2
|
+
export type FormulaBindingNumberFormatMenuEntry = {
|
|
3
|
+
kind: 'format';
|
|
4
|
+
key: string;
|
|
5
|
+
pattern: string;
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'separator';
|
|
8
|
+
key: string;
|
|
9
|
+
} | {
|
|
10
|
+
kind: 'more';
|
|
11
|
+
};
|
|
12
|
+
export declare function createFormulaBindingNumberFormatMenuEntries(currencySymbol: string): FormulaBindingNumberFormatMenuEntry[];
|
|
13
|
+
export declare function resolveFormulaBindingNumberFormatType(pattern: string): FormulaBindingNumberFormatType;
|
|
14
|
+
export declare function FormulaBindingNumberFormatMenu(props: {
|
|
15
|
+
onSelect: (pattern: string) => void;
|
|
16
|
+
onMore: () => void;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
export declare function FormulaBindingNumberFormatDialog(props: {
|
|
19
|
+
open: boolean;
|
|
20
|
+
pattern: string;
|
|
21
|
+
onClose: () => void;
|
|
22
|
+
onConfirm: (pattern: string) => void;
|
|
23
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare function getFormulaBindingCurrencyType(pattern: string): string | undefined;
|
|
2
|
+
export declare function getFormulaBindingDecimalFromPattern(pattern: string, defaultValue?: number): number;
|
|
3
|
+
export declare function setFormulaBindingPatternDecimal(patterns: string, decimalLength: number): string;
|
|
4
|
+
export declare function getFormulaBindingCurrencyFormatOptions(symbol: string): {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
color: string | undefined;
|
|
8
|
+
}[];
|
|
9
|
+
export declare function getFormulaBindingDateFormatOptions(): {
|
|
10
|
+
label: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}[];
|
|
13
|
+
export declare function getFormulaBindingNumberFormatOptions(): {
|
|
14
|
+
label: string;
|
|
15
|
+
value: string;
|
|
16
|
+
color: string | undefined;
|
|
17
|
+
}[];
|
|
@@ -59,7 +59,6 @@ export interface IShapeFloatingToolbarProps {
|
|
|
59
59
|
enableShapeStrokeReset?: boolean;
|
|
60
60
|
enableTextBackgroundReset?: boolean;
|
|
61
61
|
enableTextControls?: boolean;
|
|
62
|
-
deferUntilCollapsedStateLoaded?: boolean;
|
|
63
62
|
defaultFillColor?: string;
|
|
64
63
|
defaultGradientEndColor?: string;
|
|
65
64
|
defaultStrokeColor?: string;
|
|
@@ -85,12 +84,10 @@ export declare function ShapeFloatingToolbarContent(props: {
|
|
|
85
84
|
children: ReactNode;
|
|
86
85
|
className?: string;
|
|
87
86
|
maxWidthClassName?: string;
|
|
88
|
-
dataAttributes?: Record<`data-${string}`, string>;
|
|
89
87
|
onMouseDown?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
90
88
|
}): import("react").JSX.Element;
|
|
91
89
|
export declare function ShapeFloatingToolbarButton(props: {
|
|
92
90
|
title?: string;
|
|
93
|
-
titleKey?: string;
|
|
94
91
|
active?: boolean;
|
|
95
92
|
disabled?: boolean;
|
|
96
93
|
children: ReactNode;
|
|
@@ -104,7 +101,6 @@ export declare function ShapeFloatingToolbarButton(props: {
|
|
|
104
101
|
}): import("react").JSX.Element;
|
|
105
102
|
export declare function ShapeFloatingToolbarDropdownTrigger(props: {
|
|
106
103
|
title?: string;
|
|
107
|
-
titleKey?: string;
|
|
108
104
|
icon: ReactNode;
|
|
109
105
|
active?: boolean;
|
|
110
106
|
className?: string;
|
|
@@ -124,10 +120,10 @@ export declare function buildShapeStrokeDataUpdate(currentStroke: IShapeData['st
|
|
|
124
120
|
patch: IShapeData;
|
|
125
121
|
};
|
|
126
122
|
export interface IShapeStrokePanelContentProps {
|
|
127
|
-
|
|
123
|
+
title: string;
|
|
128
124
|
shapeData: IShapeData;
|
|
129
125
|
disabled?: boolean;
|
|
130
|
-
|
|
126
|
+
resetLabel?: string;
|
|
131
127
|
modeOptions?: ShapeStrokePanelMode[];
|
|
132
128
|
showDashDropdown?: boolean;
|
|
133
129
|
fallbackColor?: string;
|
|
@@ -142,18 +138,18 @@ export interface IShapeStrokePanelContentProps {
|
|
|
142
138
|
}
|
|
143
139
|
export declare function ShapeStrokePanelContent(props: IShapeStrokePanelContentProps): import("react").JSX.Element;
|
|
144
140
|
export declare function ShapeStrokePanelButton(props: {
|
|
145
|
-
|
|
141
|
+
title: string;
|
|
146
142
|
shapeData: IShapeData;
|
|
147
143
|
open?: boolean;
|
|
148
144
|
disabled?: boolean;
|
|
149
|
-
|
|
145
|
+
resetLabel?: string;
|
|
150
146
|
fallbackColor?: string;
|
|
151
147
|
onReset?: () => void;
|
|
152
148
|
onOpenChange?: (open: boolean) => void;
|
|
153
149
|
onUpdateShapeData: IShapeFloatingToolbarProps['onUpdateShapeData'];
|
|
154
150
|
}): import("react").JSX.Element;
|
|
155
151
|
export declare function ShapeFillButton(props: {
|
|
156
|
-
|
|
152
|
+
title: string;
|
|
157
153
|
shapeData: IShapeData;
|
|
158
154
|
open?: boolean;
|
|
159
155
|
disabled?: boolean;
|
|
@@ -163,20 +159,21 @@ export declare function ShapeFillButton(props: {
|
|
|
163
159
|
onUpdateShapeData: IShapeFloatingToolbarProps['onUpdateShapeData'];
|
|
164
160
|
}): import("react").JSX.Element;
|
|
165
161
|
export declare function TextFillButton(props: {
|
|
166
|
-
|
|
162
|
+
title: string;
|
|
167
163
|
textStyle: ITextStyle;
|
|
168
164
|
fallbackColor: string;
|
|
169
165
|
onChange: (textStyle: ITextStyle) => void;
|
|
170
166
|
}): import("react").JSX.Element;
|
|
171
167
|
export declare function TextBackgroundColorButton(props: {
|
|
172
|
-
|
|
168
|
+
title: string;
|
|
173
169
|
color: string;
|
|
174
170
|
onApply: () => void;
|
|
175
171
|
onReset?: () => void;
|
|
176
172
|
onChange: (color: string) => void;
|
|
177
173
|
}): import("react").JSX.Element;
|
|
178
174
|
export declare function TypographyPanelButton(props: {
|
|
179
|
-
|
|
175
|
+
title: string;
|
|
176
|
+
fontFamily: string;
|
|
180
177
|
textStyle: {
|
|
181
178
|
isBold: boolean;
|
|
182
179
|
isItalic: boolean;
|
|
@@ -191,7 +188,6 @@ export declare function TypographyPanelButton(props: {
|
|
|
191
188
|
}): import("react").JSX.Element;
|
|
192
189
|
export declare function ShapeFloatingToolbarMenuPanel(props: {
|
|
193
190
|
title?: string;
|
|
194
|
-
titleKey?: string;
|
|
195
191
|
children: ReactNode;
|
|
196
192
|
className?: string;
|
|
197
193
|
minWidthClassName?: string;
|
|
@@ -201,6 +197,7 @@ export declare function ShapeFloatingToolbarMenuItem(props: {
|
|
|
201
197
|
labelKey?: string;
|
|
202
198
|
shortcut?: string;
|
|
203
199
|
disabled?: boolean;
|
|
200
|
+
danger?: boolean;
|
|
204
201
|
onClick: () => void;
|
|
205
202
|
}): import("react").JSX.Element;
|
|
206
203
|
export declare function ShapeFloatingToolbar(props: IShapeFloatingToolbarProps): import("react").JSX.Element | null;
|
|
@@ -46,7 +46,7 @@ export declare function isShapeTextEditorPointerInsideContent(target: EventTarge
|
|
|
46
46
|
export declare function resolveShapeTextEditorPositionTransform(options: {
|
|
47
47
|
editingParams: Nullable<IShapeTextEditingParams>;
|
|
48
48
|
positionOptions: IShapeTextEditorPositionOptions;
|
|
49
|
-
renderUnit: Nullable<ReturnType<IRenderManagerService['
|
|
49
|
+
renderUnit: Nullable<ReturnType<IRenderManagerService['getRenderUnitById']>>;
|
|
50
50
|
scene: Nullable<Scene>;
|
|
51
51
|
}): Nullable<IShapeObjectLike>;
|
|
52
52
|
/**
|