@univerjs/ui 1.5.1 → 1.6.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.
Files changed (102) hide show
  1. package/lib/cjs/facade.js +6 -6
  2. package/lib/cjs/index.js +12562 -11849
  3. package/lib/cjs/locale/ar-SA.js +1 -0
  4. package/lib/cjs/locale/ca-ES.js +1 -0
  5. package/lib/cjs/locale/de-DE.js +1 -0
  6. package/lib/cjs/locale/en-US.js +1 -0
  7. package/lib/cjs/locale/es-ES.js +1 -0
  8. package/lib/cjs/locale/fa-IR.js +1 -0
  9. package/lib/cjs/locale/fr-FR.js +1 -0
  10. package/lib/cjs/locale/id-ID.js +1 -0
  11. package/lib/cjs/locale/it-IT.js +1 -0
  12. package/lib/cjs/locale/ja-JP.js +1 -0
  13. package/lib/cjs/locale/ko-KR.js +1 -0
  14. package/lib/cjs/locale/pl-PL.js +1 -0
  15. package/lib/cjs/locale/pt-BR.js +1 -0
  16. package/lib/cjs/locale/ru-RU.js +1 -0
  17. package/lib/cjs/locale/sk-SK.js +1 -0
  18. package/lib/cjs/locale/vi-VN.js +1 -0
  19. package/lib/cjs/locale/zh-CN.js +1 -0
  20. package/lib/cjs/locale/zh-HK.js +1 -0
  21. package/lib/cjs/locale/zh-TW.js +1 -0
  22. package/lib/es/facade.js +6 -6
  23. package/lib/es/index.js +12508 -11819
  24. package/lib/es/locale/ar-SA.js +1 -0
  25. package/lib/es/locale/ca-ES.js +1 -0
  26. package/lib/es/locale/de-DE.js +1 -0
  27. package/lib/es/locale/en-US.js +1 -0
  28. package/lib/es/locale/es-ES.js +1 -0
  29. package/lib/es/locale/fa-IR.js +1 -0
  30. package/lib/es/locale/fr-FR.js +1 -0
  31. package/lib/es/locale/id-ID.js +1 -0
  32. package/lib/es/locale/it-IT.js +1 -0
  33. package/lib/es/locale/ja-JP.js +1 -0
  34. package/lib/es/locale/ko-KR.js +1 -0
  35. package/lib/es/locale/pl-PL.js +1 -0
  36. package/lib/es/locale/pt-BR.js +1 -0
  37. package/lib/es/locale/ru-RU.js +1 -0
  38. package/lib/es/locale/sk-SK.js +1 -0
  39. package/lib/es/locale/vi-VN.js +1 -0
  40. package/lib/es/locale/zh-CN.js +1 -0
  41. package/lib/es/locale/zh-HK.js +1 -0
  42. package/lib/es/locale/zh-TW.js +1 -0
  43. package/lib/facade.js +6 -6
  44. package/lib/index.css +235 -76
  45. package/lib/index.js +12508 -11819
  46. package/lib/locale/ar-SA.js +1 -0
  47. package/lib/locale/ca-ES.js +1 -0
  48. package/lib/locale/de-DE.js +1 -0
  49. package/lib/locale/en-US.js +1 -0
  50. package/lib/locale/es-ES.js +1 -0
  51. package/lib/locale/fa-IR.js +1 -0
  52. package/lib/locale/fr-FR.js +1 -0
  53. package/lib/locale/id-ID.js +1 -0
  54. package/lib/locale/it-IT.js +1 -0
  55. package/lib/locale/ja-JP.js +1 -0
  56. package/lib/locale/ko-KR.js +1 -0
  57. package/lib/locale/pl-PL.js +1 -0
  58. package/lib/locale/pt-BR.js +1 -0
  59. package/lib/locale/ru-RU.js +1 -0
  60. package/lib/locale/sk-SK.js +1 -0
  61. package/lib/locale/vi-VN.js +1 -0
  62. package/lib/locale/zh-CN.js +1 -0
  63. package/lib/locale/zh-HK.js +1 -0
  64. package/lib/locale/zh-TW.js +1 -0
  65. package/lib/types/components/editor-toolbar/EditorFloatingToolbar.d.ts +59 -0
  66. package/lib/types/components/editor-toolbar/EditorMenu.d.ts +33 -0
  67. package/lib/types/components/editor-toolbar/floating-toolbar-interaction.d.ts +19 -0
  68. package/lib/types/components/hyperlink/HyperlinkEditor.d.ts +38 -0
  69. package/lib/types/components/hyperlink/HyperlinkPreview.d.ts +34 -0
  70. package/lib/types/components/table-size-picker/MobileTableSizePicker.d.ts +17 -0
  71. package/lib/types/components/table-size-picker/TableSizePicker.d.ts +61 -0
  72. package/lib/types/controllers/components.controller.d.ts +3 -0
  73. package/lib/types/index.d.ts +14 -0
  74. package/lib/types/locale/en-US.d.ts +1 -0
  75. package/lib/types/services/menu/menu-manager.service.d.ts +2 -0
  76. package/lib/types/services/menu/types.d.ts +1 -0
  77. package/lib/types/views/components/ribbon/RibbonGrid.d.ts +2 -1
  78. package/lib/types/views/components/ribbon/ToolbarItem.d.ts +1 -0
  79. package/lib/types/views/emoji-picker/emoji-picker-utils.d.ts +1 -1
  80. package/lib/types/views/object-permission/ObjectPermissionMembers.d.ts +2 -1
  81. package/lib/types/views/user-info/UserInfo.d.ts +54 -0
  82. package/lib/umd/index.js +19 -19
  83. package/lib/umd/locale/ar-SA.js +1 -1
  84. package/lib/umd/locale/ca-ES.js +1 -1
  85. package/lib/umd/locale/de-DE.js +1 -1
  86. package/lib/umd/locale/en-US.js +1 -1
  87. package/lib/umd/locale/es-ES.js +1 -1
  88. package/lib/umd/locale/fa-IR.js +1 -1
  89. package/lib/umd/locale/fr-FR.js +1 -1
  90. package/lib/umd/locale/id-ID.js +1 -1
  91. package/lib/umd/locale/it-IT.js +1 -1
  92. package/lib/umd/locale/ja-JP.js +1 -1
  93. package/lib/umd/locale/ko-KR.js +1 -1
  94. package/lib/umd/locale/pl-PL.js +1 -1
  95. package/lib/umd/locale/pt-BR.js +1 -1
  96. package/lib/umd/locale/ru-RU.js +1 -1
  97. package/lib/umd/locale/sk-SK.js +1 -1
  98. package/lib/umd/locale/vi-VN.js +1 -1
  99. package/lib/umd/locale/zh-CN.js +1 -1
  100. package/lib/umd/locale/zh-HK.js +1 -1
  101. package/lib/umd/locale/zh-TW.js +1 -1
  102. package/package.json +11 -11
@@ -5422,6 +5422,7 @@ const locale = { ui: {
5422
5422
  formulas: "الصيغ",
5423
5423
  rules: "القواعد",
5424
5424
  organization: "تنظيم البيانات",
5425
+ analysis: "تحليل البيانات",
5425
5426
  display: "العرض",
5426
5427
  visibility: "الظهور"
5427
5428
  }
@@ -5377,6 +5377,7 @@ const locale = { ui: {
5377
5377
  formulas: "Fórmules",
5378
5378
  rules: "Regles",
5379
5379
  organization: "Organització de dades",
5380
+ analysis: "Anàlisi de dades",
5380
5381
  display: "Visualització",
5381
5382
  visibility: "Visibilitat"
5382
5383
  }
@@ -5336,6 +5336,7 @@ const locale = { ui: {
5336
5336
  formulas: "Formeln",
5337
5337
  rules: "Regeln",
5338
5338
  organization: "Datenorganisation",
5339
+ analysis: "Datenanalyse",
5339
5340
  display: "Anzeige",
5340
5341
  visibility: "Sichtbarkeit"
5341
5342
  }
@@ -5357,6 +5357,7 @@ const locale = { ui: {
5357
5357
  formulas: "Formulas",
5358
5358
  rules: "Rules",
5359
5359
  organization: "Data organization",
5360
+ analysis: "Data analysis",
5360
5361
  display: "Display",
5361
5362
  visibility: "Visibility"
5362
5363
  }
@@ -5271,6 +5271,7 @@ const locale = { ui: {
5271
5271
  formulas: "Fórmulas",
5272
5272
  rules: "Reglas",
5273
5273
  organization: "Organización de datos",
5274
+ analysis: "Análisis de datos",
5274
5275
  display: "Visualización",
5275
5276
  visibility: "Visibilidad"
5276
5277
  }
@@ -5360,6 +5360,7 @@ const locale = { ui: {
5360
5360
  formulas: "فرمول‌ها",
5361
5361
  rules: "قواعد",
5362
5362
  organization: "سازمان‌دهی داده‌ها",
5363
+ analysis: "تحلیل داده‌ها",
5363
5364
  display: "نمایش",
5364
5365
  visibility: "قابلیت مشاهده"
5365
5366
  }
@@ -5387,6 +5387,7 @@ const locale = { ui: {
5387
5387
  formulas: "Formules",
5388
5388
  rules: "Règles",
5389
5389
  organization: "Organisation des données",
5390
+ analysis: "Analyse des données",
5390
5391
  display: "Affichage",
5391
5392
  visibility: "Visibilité"
5392
5393
  }
@@ -5374,6 +5374,7 @@ const locale = { ui: {
5374
5374
  formulas: "Rumus",
5375
5375
  rules: "Aturan",
5376
5376
  organization: "Penataan data",
5377
+ analysis: "Analisis data",
5377
5378
  display: "Tampilan",
5378
5379
  visibility: "Visibilitas"
5379
5380
  }
@@ -5423,6 +5423,7 @@ const locale = { ui: {
5423
5423
  formulas: "Formule",
5424
5424
  rules: "Regole",
5425
5425
  organization: "Organizzazione dei dati",
5426
+ analysis: "Analisi dei dati",
5426
5427
  display: "Visualizzazione",
5427
5428
  visibility: "Visibilità"
5428
5429
  }
@@ -5400,6 +5400,7 @@ const locale = { ui: {
5400
5400
  formulas: "数式",
5401
5401
  rules: "ルール",
5402
5402
  organization: "データ整理",
5403
+ analysis: "データ分析",
5403
5404
  display: "表示",
5404
5405
  visibility: "表示設定"
5405
5406
  }
@@ -5390,6 +5390,7 @@ const locale = { ui: {
5390
5390
  formulas: "수식",
5391
5391
  rules: "규칙",
5392
5392
  organization: "데이터 정리",
5393
+ analysis: "데이터 분석",
5393
5394
  display: "표시",
5394
5395
  visibility: "표시 여부"
5395
5396
  }
@@ -5426,6 +5426,7 @@ const locale = { ui: {
5426
5426
  formulas: "Formuły",
5427
5427
  rules: "Reguły",
5428
5428
  organization: "Organizacja danych",
5429
+ analysis: "Analiza danych",
5429
5430
  display: "Wyświetlanie",
5430
5431
  visibility: "Widoczność"
5431
5432
  }
@@ -5387,6 +5387,7 @@ const locale = { ui: {
5387
5387
  formulas: "Fórmulas",
5388
5388
  rules: "Regras",
5389
5389
  organization: "Organização de dados",
5390
+ analysis: "Análise de dados",
5390
5391
  display: "Exibição",
5391
5392
  visibility: "Visibilidade"
5392
5393
  }
@@ -5437,6 +5437,7 @@ const locale = { ui: {
5437
5437
  formulas: "Формулы",
5438
5438
  rules: "Правила",
5439
5439
  organization: "Организация данных",
5440
+ analysis: "Анализ данных",
5440
5441
  display: "Отображение",
5441
5442
  visibility: "Видимость"
5442
5443
  }
@@ -5440,6 +5440,7 @@ const locale = { ui: {
5440
5440
  formulas: "Vzorce",
5441
5441
  rules: "Pravidlá",
5442
5442
  organization: "Usporiadanie údajov",
5443
+ analysis: "Analýza údajov",
5443
5444
  display: "Zobrazenie",
5444
5445
  visibility: "Viditeľnosť"
5445
5446
  }
@@ -5264,6 +5264,7 @@ const locale = { ui: {
5264
5264
  formulas: "Công thức",
5265
5265
  rules: "Quy tắc",
5266
5266
  organization: "Tổ chức dữ liệu",
5267
+ analysis: "Phân tích dữ liệu",
5267
5268
  display: "Hiển thị",
5268
5269
  visibility: "Chế độ hiển thị"
5269
5270
  }
@@ -5390,6 +5390,7 @@ const locale = { ui: {
5390
5390
  formulas: "公式",
5391
5391
  rules: "规则",
5392
5392
  organization: "数据整理",
5393
+ analysis: "数据分析",
5393
5394
  display: "显示",
5394
5395
  visibility: "可见性"
5395
5396
  }
@@ -5370,6 +5370,7 @@ const locale = { ui: {
5370
5370
  formulas: "公式",
5371
5371
  rules: "規則",
5372
5372
  organization: "資料整理",
5373
+ analysis: "資料分析",
5373
5374
  display: "顯示",
5374
5375
  visibility: "可見性"
5375
5376
  }
@@ -5202,6 +5202,7 @@ const locale = { ui: {
5202
5202
  formulas: "公式",
5203
5203
  rules: "規則",
5204
5204
  organization: "資料整理",
5205
+ analysis: "資料分析",
5205
5206
  display: "顯示",
5206
5207
  visibility: "可見性"
5207
5208
  }
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { ComponentProps, KeyboardEvent, MouseEvent, PointerEvent, ReactNode } from 'react';
17
+ import { Dropdown, Tooltip } from '@univerjs/design';
18
+ export declare function EditorToolbarTooltip(props: Omit<ComponentProps<typeof Tooltip>, 'visible' | 'onVisibleChange'> & {
19
+ popupOpen: boolean;
20
+ }): import("react").JSX.Element;
21
+ type EditorDropdownProps = Omit<ComponentProps<typeof Dropdown>, 'avoidCollisions'>;
22
+ export declare function EditorDropdown(props: EditorDropdownProps): import("react").JSX.Element;
23
+ export declare function EditorToolbarIcon(props: {
24
+ children: ReactNode;
25
+ className?: string;
26
+ }): import("react").JSX.Element;
27
+ export declare function EditorFloatingToolbar(props: {
28
+ children: ReactNode;
29
+ className?: string;
30
+ maxWidthClassName?: string;
31
+ onMouseDown?: (event: MouseEvent<HTMLDivElement>) => void;
32
+ }): import("react").JSX.Element;
33
+ export declare function EditorToolbarButton(props: {
34
+ title?: string;
35
+ active?: boolean;
36
+ disabled?: boolean;
37
+ children: ReactNode;
38
+ className?: string;
39
+ sizeClassName?: string;
40
+ popupOpen?: boolean;
41
+ ariaExpanded?: boolean;
42
+ onClick?: () => void;
43
+ onKeyDown?: (event: KeyboardEvent<HTMLButtonElement>) => void;
44
+ onMouseDown?: (event: MouseEvent<HTMLButtonElement>) => void;
45
+ onPointerDown?: (event: PointerEvent<HTMLButtonElement>) => void;
46
+ }): import("react").JSX.Element;
47
+ export declare function EditorDropdownTrigger(props: {
48
+ title?: string;
49
+ label?: string;
50
+ icon: ReactNode;
51
+ active?: boolean;
52
+ className?: string;
53
+ sizeClassName?: string;
54
+ onKeyDown?: (event: KeyboardEvent<HTMLButtonElement>) => void;
55
+ onMouseDown?: (event: MouseEvent<HTMLButtonElement>) => void;
56
+ onPointerDown?: (event: PointerEvent<HTMLButtonElement>) => void;
57
+ }): import("react").JSX.Element;
58
+ export declare function resolveEditorDropdownSide(popupDirection: string, requestedSide?: 'top' | 'bottom'): 'top' | 'bottom';
59
+ export {};
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { ReactNode } from 'react';
17
+ import type { FloatingObjectToolbarPosition } from '../../services/menu/types';
18
+ export declare function EditorMenuActions(props: {
19
+ position: FloatingObjectToolbarPosition;
20
+ }): import("react").JSX.Element[];
21
+ export declare function EditorMenuPanel(props: {
22
+ title?: string;
23
+ children: ReactNode;
24
+ className?: string;
25
+ minWidthClassName?: string;
26
+ }): import("react").JSX.Element;
27
+ export declare function EditorMenuItem(props: {
28
+ label: string;
29
+ shortcut?: string;
30
+ disabled?: boolean;
31
+ danger?: boolean;
32
+ onClick: () => void;
33
+ }): import("react").JSX.Element;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { MouseEvent, PointerEvent } from 'react';
17
+ export declare function shouldKeepFloatingToolbarMouseDownDefault(target: EventTarget | null): boolean;
18
+ export declare function preventFloatingToolbarPanelBlur(event: MouseEvent<HTMLElement> | PointerEvent<HTMLElement>): void;
19
+ export declare function keepFloatingToolbarPanelInteraction(event: MouseEvent<HTMLElement> | PointerEvent<HTMLElement>): void;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { ComponentProps, ComponentType } from 'react';
17
+ import { Button, Input } from '@univerjs/design';
18
+ export interface IHyperlinkEditorProps {
19
+ url: string;
20
+ label?: string;
21
+ urlError?: string;
22
+ labelError?: string;
23
+ labels: {
24
+ address: string;
25
+ label: string;
26
+ cancel: string;
27
+ confirm: string;
28
+ };
29
+ onUrlChange: (url: string) => void;
30
+ onLabelChange?: (label: string) => void;
31
+ onCancel: () => void;
32
+ onConfirm: () => void | Promise<unknown>;
33
+ mobile?: boolean;
34
+ className?: string;
35
+ InputComponent?: ComponentType<ComponentProps<typeof Input>>;
36
+ ButtonComponent?: ComponentType<ComponentProps<typeof Button>>;
37
+ }
38
+ export declare function HyperlinkEditor({ url, label, urlError, labelError, labels, onUrlChange, onLabelChange, onCancel, onConfirm, mobile, className, InputComponent, ButtonComponent }: IHyperlinkEditorProps): import("react").JSX.Element;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { HTMLAttributes, ReactNode } from 'react';
17
+ export interface IHyperlinkPreviewProps extends Pick<HTMLAttributes<HTMLDivElement>, 'onPointerEnter' | 'onPointerLeave' | 'className'> {
18
+ title: string;
19
+ icon?: ReactNode;
20
+ description?: string;
21
+ invalid?: boolean;
22
+ copyDisabled?: boolean;
23
+ labels: {
24
+ copy: string;
25
+ edit: string;
26
+ remove: string;
27
+ };
28
+ onOpen: () => void | Promise<unknown>;
29
+ onCopy: () => void | Promise<unknown>;
30
+ onEdit?: () => void | Promise<unknown>;
31
+ onRemove?: () => void | Promise<unknown>;
32
+ onDismiss?: () => void;
33
+ }
34
+ export declare function HyperlinkPreview({ title, icon, description, invalid, copyDisabled, labels, onOpen, onCopy, onEdit, onRemove, onDismiss, className, ...attributes }: IHyperlinkPreviewProps): import("react").JSX.Element;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { ITableSizePickerProps } from './TableSizePicker';
17
+ export declare function MobileTableSizePicker(props: ITableSizePickerProps): import("react").JSX.Element;
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export interface ITableSize {
17
+ rows: number;
18
+ columns: number;
19
+ }
20
+ export interface ITableSizePickerProps {
21
+ initialRows?: number;
22
+ initialColumns?: number;
23
+ maxGridRows?: number;
24
+ maxGridColumns?: number;
25
+ minRows?: number;
26
+ minColumns?: number;
27
+ maxRows?: number;
28
+ maxColumns?: number;
29
+ variant?: 'card' | 'dropdown';
30
+ direction?: 'ltr' | 'rtl';
31
+ title?: string;
32
+ labels: {
33
+ rows: string;
34
+ columns: string;
35
+ customSize: string;
36
+ confirm: string;
37
+ size: (columns: number, rows: number) => string;
38
+ };
39
+ onConfirm: (size: ITableSize) => void;
40
+ }
41
+ export declare function useTableSizePicker(props: Omit<ITableSizePickerProps, 'labels'>): {
42
+ direction: "ltr" | "rtl";
43
+ title: string | undefined;
44
+ rows: number;
45
+ columns: number;
46
+ minRows: number;
47
+ minColumns: number;
48
+ maxRows: number;
49
+ maxColumns: number;
50
+ maxGridRows: number;
51
+ maxGridColumns: number;
52
+ setHoverSize: import("react").Dispatch<import("react").SetStateAction<ITableSize | null>>;
53
+ selectedRows: number;
54
+ selectedColumns: number;
55
+ isDropdown: boolean;
56
+ updateRows: (value: number) => void;
57
+ updateColumns: (value: number) => void;
58
+ handleConfirm: () => void;
59
+ onConfirm: (size: ITableSize) => void;
60
+ };
61
+ export declare function TableSizePicker(props: ITableSizePickerProps): import("react").JSX.Element;
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ import type { IDisposable } from '@univerjs/core';
16
17
  import { Disposable } from '@univerjs/core';
17
18
  import { ComponentManager } from '../common/component-manager';
18
19
  import { IconManager } from '../common/icon-manager';
@@ -23,3 +24,5 @@ export declare class ComponentsController extends Disposable {
23
24
  private _registerIcons;
24
25
  private _registerComponents;
25
26
  }
27
+ /** Snapshot the host renderer into an independent viewer registry; disposal only affects the viewer. */
28
+ export declare function inheritUserInfoComponent(source: ComponentManager, componentManager: ComponentManager): IDisposable;
@@ -20,9 +20,20 @@ export * from './common';
20
20
  export { getHeaderFooterMenuHiddenObservable, getMenuHiddenObservable } from './common/menu-hidden-observable';
21
21
  export { mergeMenuConfigs } from './common/menu-merge-configs';
22
22
  export { objectPermissionMenuItemFactory } from './common/object-permission-menu';
23
+ export { EditorDropdown, EditorDropdownTrigger, EditorFloatingToolbar, EditorToolbarButton, EditorToolbarIcon, EditorToolbarTooltip, resolveEditorDropdownSide } from './components/editor-toolbar/EditorFloatingToolbar';
24
+ export { EditorMenuActions, EditorMenuItem, EditorMenuPanel } from './components/editor-toolbar/EditorMenu';
25
+ export { keepFloatingToolbarPanelInteraction, preventFloatingToolbarPanelBlur, shouldKeepFloatingToolbarMouseDownDefault } from './components/editor-toolbar/floating-toolbar-interaction';
26
+ export { HyperlinkEditor } from './components/hyperlink/HyperlinkEditor';
27
+ export type { IHyperlinkEditorProps } from './components/hyperlink/HyperlinkEditor';
28
+ export { HyperlinkPreview } from './components/hyperlink/HyperlinkPreview';
29
+ export type { IHyperlinkPreviewProps } from './components/hyperlink/HyperlinkPreview';
30
+ export { MobileTableSizePicker } from './components/table-size-picker/MobileTableSizePicker';
31
+ export { TableSizePicker, useTableSizePicker } from './components/table-size-picker/TableSizePicker';
32
+ export type { ITableSize, ITableSizePickerProps } from './components/table-size-picker/TableSizePicker';
23
33
  export { UI_PLUGIN_CONFIG_KEY } from './config/config';
24
34
  export type { IUniverUIConfig } from './config/config';
25
35
  export { MOBILE_UI_MODE, UNI_DISABLE_CHANGING_FOCUS_KEY } from './const';
36
+ export { inheritUserInfoComponent } from './controllers/components.controller';
26
37
  export { ErrorController } from './controllers/error/error.controller';
27
38
  export { CopyShortcutItem, CutShortcutItem, RedoShortcutItem, SharedController, UndoShortcutItem, } from './controllers/shared-shortcut.controller';
28
39
  export { ShortcutPanelController } from './controllers/shortcut-display/shortcut-panel.controller';
@@ -30,6 +41,7 @@ export { DesktopUIController } from './controllers/ui/ui-desktop.controller';
30
41
  export { SingleUnitUIController } from './controllers/ui/ui-shared.controller';
31
42
  export { IUIController } from './controllers/ui/ui.controller';
32
43
  export type { IWorkbenchOptions, RibbonType } from './controllers/ui/ui.controller';
44
+ export { RedoMenuItemFactory, UndoMenuItemFactory } from './menu/history.menu';
33
45
  export { menuSchema as UIMenuSchema } from './menu/schema';
34
46
  export { UniverMobileUIPlugin } from './mobile-plugin';
35
47
  export { DISABLE_AUTO_FOCUS_KEY, UniverUIPlugin } from './plugin';
@@ -141,3 +153,5 @@ export { ObjectPermissionButton, openObjectPermissionDialog } from './views/obje
141
153
  export type { IObjectPermissionButtonProps } from './views/object-permission/ObjectPermissionButton';
142
154
  export { ObjectPermissionPanelButton, openObjectPermissionPanel } from './views/object-permission/ObjectPermissionPanel';
143
155
  export { ProgressBar } from './views/progress-bar/ProgressBar';
156
+ export { DefaultUserInfo, USER_INFO_COMPONENT, UserInfo } from './views/user-info/UserInfo';
157
+ export type { IUserInfoContext, IUserInfoData, IUserInfoProps } from './views/user-info/UserInfo';
@@ -147,6 +147,7 @@ declare const locale: {
147
147
  formulas: string;
148
148
  rules: string;
149
149
  organization: string;
150
+ analysis: string;
150
151
  display: string;
151
152
  visibility: string;
152
153
  };
@@ -67,6 +67,8 @@ export type MenuSchemaType = {
67
67
  order?: number;
68
68
  replace?: boolean;
69
69
  menuItemFactory?: (accessor: IAccessor) => IMenuItem;
70
+ /** Extend the registered item before applying application menu configuration. */
71
+ customizeMenuItem?: (accessor: IAccessor, item: IMenuItem) => IMenuItem;
70
72
  headerActionMenuItemFactory?: (accessor: IAccessor) => IMenuItem;
71
73
  title?: string;
72
74
  contextual?: boolean;
@@ -52,6 +52,7 @@ export declare enum RibbonDataGroup {
52
52
  FORMULAS = "ribbon.data.formulas",
53
53
  RULES = "ribbon.data.rules",
54
54
  ORGANIZATION = "ribbon.data.organization",
55
+ ANALYSIS = "ribbon.data.analysis",
55
56
  OTHERS = "ribbon.data.others"
56
57
  }
57
58
  export declare enum RibbonViewGroup {
@@ -18,6 +18,7 @@ import type { IMenuSchema } from '../../../services/menu/menu-manager.service';
18
18
  interface IRibbonGridProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
19
19
  groups: IMenuSchema[];
20
20
  title: string;
21
+ alignStart?: boolean;
21
22
  }
22
- export declare function RibbonGrid({ groups, title, className, ...props }: IRibbonGridProps): import("react").JSX.Element;
23
+ export declare function RibbonGrid({ groups, title, alignStart, className, ...props }: IRibbonGridProps): import("react").JSX.Element;
23
24
  export {};
@@ -21,6 +21,7 @@ export type IToolbarItemProps = IDisplayMenuItem<IMenuItem> & {
21
21
  grid?: boolean;
22
22
  overflow?: boolean;
23
23
  large?: boolean;
24
+ alignStart?: boolean;
24
25
  showLabel?: boolean;
25
26
  iconSize?: number;
26
27
  iconColor?: string;
@@ -35,7 +35,7 @@ export declare const EMOJI_SKIN_TONE_OPTIONS: ReadonlyArray<IEmojiVariant & {
35
35
  export declare const EMOJI_RECENT_LIMIT = 11;
36
36
  export declare const EMOJI_CATEGORIES: {
37
37
  key: EmojiCategory;
38
- titleKey: "ui.accessibility.menu" | "ui.accessibility.resetZoom" | "ui.accessibility.zoom" | "ui.accessibility.zoomIn" | "ui.accessibility.zoomOut" | "ui.beforeClose.title" | "ui.clearFormatting" | "ui.clipboard.authentication.content" | "ui.clipboard.authentication.title" | "ui.column" | "ui.common-edit" | "ui.emojiPicker.activities" | "ui.emojiPicker.animals" | "ui.emojiPicker.emojis" | "ui.emojiPicker.food" | "ui.emojiPicker.noResults" | "ui.emojiPicker.objects" | "ui.emojiPicker.places" | "ui.emojiPicker.random" | "ui.emojiPicker.recents" | "ui.emojiPicker.search" | "ui.emojiPicker.searchResults" | "ui.emojiPicker.symbols" | "ui.featureSearch.contextMenu" | "ui.featureSearch.empty" | "ui.featureSearch.placeholder" | "ui.featureSearch.ribbon" | "ui.featureSearch.title" | "ui.fontFamily.not-supported" | "ui.formatPainter" | "ui.global-shortcut" | "ui.navigation.back" | "ui.navigation.next" | "ui.navigation.previous" | "ui.objectPermission.all" | "ui.objectPermission.base" | "ui.objectPermission.baseObjectParent" | "ui.objectPermission.baseParent" | "ui.objectPermission.board" | "ui.objectPermission.boardParent" | "ui.objectPermission.cancel" | "ui.objectPermission.comment" | "ui.objectPermission.conflict" | "ui.objectPermission.copy" | "ui.objectPermission.denied" | "ui.objectPermission.document" | "ui.objectPermission.documentObjectParent" | "ui.objectPermission.documentParent" | "ui.objectPermission.edit" | "ui.objectPermission.empty" | "ui.objectPermission.entity" | "ui.objectPermission.error" | "ui.objectPermission.export" | "ui.objectPermission.field" | "ui.objectPermission.fileHint" | "ui.objectPermission.loadMore" | "ui.objectPermission.loading" | "ui.objectPermission.master" | "ui.objectPermission.members" | "ui.objectPermission.more" | "ui.objectPermission.noMatchingPeople" | "ui.objectPermission.objectName" | "ui.objectPermission.operationDenied" | "ui.objectPermission.owner" | "ui.objectPermission.ownerInherit" | "ui.objectPermission.page" | "ui.objectPermission.paragraph" | "ui.objectPermission.paragraphParent" | "ui.objectPermission.parentHint" | "ui.objectPermission.peopleError" | "ui.objectPermission.presentation" | "ui.objectPermission.print" | "ui.objectPermission.record" | "ui.objectPermission.recordParent" | "ui.objectPermission.reload" | "ui.objectPermission.remove" | "ui.objectPermission.roleEditor" | "ui.objectPermission.roleOwner" | "ui.objectPermission.save" | "ui.objectPermission.saving" | "ui.objectPermission.search" | "ui.objectPermission.searchPeople" | "ui.objectPermission.section" | "ui.objectPermission.selectedCount" | "ui.objectPermission.slideObjectParent" | "ui.objectPermission.slideParent" | "ui.objectPermission.table" | "ui.objectPermission.title" | "ui.objectPermission.view" | "ui.rangeSelector.cancel" | "ui.ribbon.data" | "ui.ribbon.dataDesc" | "ui.ribbon.formulas" | "ui.ribbon.formulasDesc" | "ui.ribbon.groups.cells" | "ui.ribbon.groups.clipboard" | "ui.ribbon.groups.display" | "ui.ribbon.groups.editing" | "ui.ribbon.groups.font" | "ui.ribbon.groups.formulas" | "ui.ribbon.groups.layout" | "ui.ribbon.groups.media" | "ui.ribbon.groups.number" | "ui.ribbon.groups.organization" | "ui.ribbon.groups.rules" | "ui.ribbon.groups.tools" | "ui.ribbon.groups.visibility" | "ui.ribbon.insert" | "ui.ribbon.insertDesc" | "ui.ribbon.more" | "ui.ribbon.others" | "ui.ribbon.othersDesc" | "ui.ribbon.start" | "ui.ribbon.startDesc" | "ui.ribbon.view" | "ui.ribbon.viewDesc" | "ui.row" | "ui.shortcut-panel.title" | "ui.shortcut.copy" | "ui.shortcut.cut" | "ui.shortcut.paste" | "ui.shortcut.redo" | "ui.shortcut.shortcut-panel" | "ui.shortcut.undo" | "ui.sidebar.close" | "ui.sidebar.panel" | "ui.sidebar.resize" | "ui.symbolPicker.common" | "ui.symbolPicker.greek" | "ui.symbolPicker.mathematics" | "ui.toggle-shortcut-panel" | "ui.toolbar.heading.normal" | "ui.toolbar.heading.subTitle" | "ui.toolbar.heading.title" | `ui.emojiPicker.emojiSearchIndex.${string}` | `ui.emojiPicker.emojiTitles.${string}`;
38
+ titleKey: "ui.accessibility.menu" | "ui.accessibility.resetZoom" | "ui.accessibility.zoom" | "ui.accessibility.zoomIn" | "ui.accessibility.zoomOut" | "ui.beforeClose.title" | "ui.clearFormatting" | "ui.clipboard.authentication.content" | "ui.clipboard.authentication.title" | "ui.column" | "ui.common-edit" | "ui.emojiPicker.activities" | "ui.emojiPicker.animals" | "ui.emojiPicker.emojis" | "ui.emojiPicker.food" | "ui.emojiPicker.noResults" | "ui.emojiPicker.objects" | "ui.emojiPicker.places" | "ui.emojiPicker.random" | "ui.emojiPicker.recents" | "ui.emojiPicker.search" | "ui.emojiPicker.searchResults" | "ui.emojiPicker.symbols" | "ui.featureSearch.contextMenu" | "ui.featureSearch.empty" | "ui.featureSearch.placeholder" | "ui.featureSearch.ribbon" | "ui.featureSearch.title" | "ui.fontFamily.not-supported" | "ui.formatPainter" | "ui.global-shortcut" | "ui.navigation.back" | "ui.navigation.next" | "ui.navigation.previous" | "ui.objectPermission.all" | "ui.objectPermission.base" | "ui.objectPermission.baseObjectParent" | "ui.objectPermission.baseParent" | "ui.objectPermission.board" | "ui.objectPermission.boardParent" | "ui.objectPermission.cancel" | "ui.objectPermission.comment" | "ui.objectPermission.conflict" | "ui.objectPermission.copy" | "ui.objectPermission.denied" | "ui.objectPermission.document" | "ui.objectPermission.documentObjectParent" | "ui.objectPermission.documentParent" | "ui.objectPermission.edit" | "ui.objectPermission.empty" | "ui.objectPermission.entity" | "ui.objectPermission.error" | "ui.objectPermission.export" | "ui.objectPermission.field" | "ui.objectPermission.fileHint" | "ui.objectPermission.loadMore" | "ui.objectPermission.loading" | "ui.objectPermission.master" | "ui.objectPermission.members" | "ui.objectPermission.more" | "ui.objectPermission.noMatchingPeople" | "ui.objectPermission.objectName" | "ui.objectPermission.operationDenied" | "ui.objectPermission.owner" | "ui.objectPermission.ownerInherit" | "ui.objectPermission.page" | "ui.objectPermission.paragraph" | "ui.objectPermission.paragraphParent" | "ui.objectPermission.parentHint" | "ui.objectPermission.peopleError" | "ui.objectPermission.presentation" | "ui.objectPermission.print" | "ui.objectPermission.record" | "ui.objectPermission.recordParent" | "ui.objectPermission.reload" | "ui.objectPermission.remove" | "ui.objectPermission.roleEditor" | "ui.objectPermission.roleOwner" | "ui.objectPermission.save" | "ui.objectPermission.saving" | "ui.objectPermission.search" | "ui.objectPermission.searchPeople" | "ui.objectPermission.section" | "ui.objectPermission.selectedCount" | "ui.objectPermission.slideObjectParent" | "ui.objectPermission.slideParent" | "ui.objectPermission.table" | "ui.objectPermission.title" | "ui.objectPermission.view" | "ui.rangeSelector.cancel" | "ui.ribbon.data" | "ui.ribbon.dataDesc" | "ui.ribbon.formulas" | "ui.ribbon.formulasDesc" | "ui.ribbon.groups.analysis" | "ui.ribbon.groups.cells" | "ui.ribbon.groups.clipboard" | "ui.ribbon.groups.display" | "ui.ribbon.groups.editing" | "ui.ribbon.groups.font" | "ui.ribbon.groups.formulas" | "ui.ribbon.groups.layout" | "ui.ribbon.groups.media" | "ui.ribbon.groups.number" | "ui.ribbon.groups.organization" | "ui.ribbon.groups.rules" | "ui.ribbon.groups.tools" | "ui.ribbon.groups.visibility" | "ui.ribbon.insert" | "ui.ribbon.insertDesc" | "ui.ribbon.more" | "ui.ribbon.others" | "ui.ribbon.othersDesc" | "ui.ribbon.start" | "ui.ribbon.startDesc" | "ui.ribbon.view" | "ui.ribbon.viewDesc" | "ui.row" | "ui.shortcut-panel.title" | "ui.shortcut.copy" | "ui.shortcut.cut" | "ui.shortcut.paste" | "ui.shortcut.redo" | "ui.shortcut.shortcut-panel" | "ui.shortcut.undo" | "ui.sidebar.close" | "ui.sidebar.panel" | "ui.sidebar.resize" | "ui.symbolPicker.common" | "ui.symbolPicker.greek" | "ui.symbolPicker.mathematics" | "ui.toggle-shortcut-panel" | "ui.toolbar.heading.normal" | "ui.toolbar.heading.subTitle" | "ui.toolbar.heading.title" | `ui.emojiPicker.emojiSearchIndex.${string}` | `ui.emojiPicker.emojiTitles.${string}`;
39
39
  }[];
40
40
  export declare function getDefaultRecentEmojis(): IEmojiItem[];
41
41
  export declare function getAllEmojis(): IEmojiItem[];
@@ -16,9 +16,10 @@
16
16
  import type { ICollaborator } from '@univerjs/protocol';
17
17
  interface IObjectPermissionMembersProps {
18
18
  unitId: string;
19
+ objectId: string;
19
20
  value: ICollaborator[];
20
21
  disabled: boolean;
21
22
  onChange: (value: ICollaborator[]) => void;
22
23
  }
23
- export declare function ObjectPermissionMembers({ unitId, value, disabled, onChange }: IObjectPermissionMembersProps): import("react").JSX.Element;
24
+ export declare function ObjectPermissionMembers({ unitId, objectId, value, disabled, onChange }: IObjectPermissionMembersProps): import("react").JSX.Element;
24
25
  export {};
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export declare const USER_INFO_COMPONENT = "UserInfo";
17
+ export interface IUserInfoData {
18
+ /** Source user identity, available even before the profile loads. Never a collaboration session ID. */
19
+ userId?: string;
20
+ /** Display-only data; custom components may render a name without obtaining its plaintext. */
21
+ name?: string;
22
+ avatar?: string;
23
+ isAnonymous?: boolean;
24
+ }
25
+ export interface IUserInfoContext {
26
+ scene: 'comment-author' | 'history-author' | 'history-filter' | 'permission-member' | 'permission-creator' | 'base-person';
27
+ /** Absent for standalone controls which have no associated document. */
28
+ unitId?: string;
29
+ subUnitId?: string;
30
+ commentId?: string;
31
+ threadId?: string;
32
+ versionId?: string;
33
+ objectId?: string;
34
+ tableId?: string;
35
+ fieldId?: string;
36
+ recordId?: string;
37
+ }
38
+ export interface IUserInfoProps {
39
+ user: Readonly<IUserInfoData>;
40
+ part: 'name' | 'avatar';
41
+ context: Readonly<IUserInfoContext>;
42
+ avatarSize?: number;
43
+ fallbackSrc?: string;
44
+ className?: string;
45
+ }
46
+ /** Default renderer, also usable by host overrides for scenes they do not customize. */
47
+ export declare function DefaultUserInfo(props: IUserInfoProps): string | import("react").JSX.Element | null;
48
+ /**
49
+ * Renders user information through the host's registered component, including unresolved profiles.
50
+ * Register USER_INFO_COMPONENT with FUniver.registerComponent before opening the view.
51
+ * Hosts own external SDK initialization, identity mapping and asynchronous DOM rendering.
52
+ * This does not change permissions, persisted mentions, search text or Canvas rendering.
53
+ */
54
+ export declare function UserInfo(props: IUserInfoProps): string | import("react").JSX.Element | null;