@univerjs/sheets-ui 1.0.0-alpha.1 → 1.0.0-alpha.2

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 (63) hide show
  1. package/lib/cjs/facade.js +4 -3
  2. package/lib/cjs/index.js +27 -16
  3. package/lib/cjs/locale/ar-SA.js +2 -2
  4. package/lib/cjs/locale/ca-ES.js +2 -2
  5. package/lib/cjs/locale/de-DE.js +2 -2
  6. package/lib/cjs/locale/es-ES.js +2 -2
  7. package/lib/cjs/locale/fa-IR.js +2 -2
  8. package/lib/cjs/locale/fr-FR.js +2 -2
  9. package/lib/cjs/locale/id-ID.js +2 -2
  10. package/lib/cjs/locale/it-IT.js +2 -2
  11. package/lib/cjs/locale/pl-PL.js +2 -2
  12. package/lib/cjs/locale/pt-BR.js +2 -2
  13. package/lib/cjs/locale/ru-RU.js +2 -2
  14. package/lib/cjs/locale/sk-SK.js +2 -2
  15. package/lib/cjs/locale/vi-VN.js +2 -2
  16. package/lib/es/facade.js +4 -3
  17. package/lib/es/index.js +30 -19
  18. package/lib/es/locale/ar-SA.js +2 -2
  19. package/lib/es/locale/ca-ES.js +2 -2
  20. package/lib/es/locale/de-DE.js +2 -2
  21. package/lib/es/locale/es-ES.js +2 -2
  22. package/lib/es/locale/fa-IR.js +2 -2
  23. package/lib/es/locale/fr-FR.js +2 -2
  24. package/lib/es/locale/id-ID.js +2 -2
  25. package/lib/es/locale/it-IT.js +2 -2
  26. package/lib/es/locale/pl-PL.js +2 -2
  27. package/lib/es/locale/pt-BR.js +2 -2
  28. package/lib/es/locale/ru-RU.js +2 -2
  29. package/lib/es/locale/sk-SK.js +2 -2
  30. package/lib/es/locale/vi-VN.js +2 -2
  31. package/lib/facade.js +4 -3
  32. package/lib/index.css +38 -4
  33. package/lib/index.js +30 -19
  34. package/lib/locale/ar-SA.js +2 -2
  35. package/lib/locale/ca-ES.js +2 -2
  36. package/lib/locale/de-DE.js +2 -2
  37. package/lib/locale/es-ES.js +2 -2
  38. package/lib/locale/fa-IR.js +2 -2
  39. package/lib/locale/fr-FR.js +2 -2
  40. package/lib/locale/id-ID.js +2 -2
  41. package/lib/locale/it-IT.js +2 -2
  42. package/lib/locale/pl-PL.js +2 -2
  43. package/lib/locale/pt-BR.js +2 -2
  44. package/lib/locale/ru-RU.js +2 -2
  45. package/lib/locale/sk-SK.js +2 -2
  46. package/lib/locale/vi-VN.js +2 -2
  47. package/lib/types/facade/f-range.d.ts +5 -4
  48. package/lib/umd/facade.js +1 -1
  49. package/lib/umd/index.js +2 -2
  50. package/lib/umd/locale/ar-SA.js +1 -1
  51. package/lib/umd/locale/ca-ES.js +1 -1
  52. package/lib/umd/locale/de-DE.js +1 -1
  53. package/lib/umd/locale/es-ES.js +1 -1
  54. package/lib/umd/locale/fa-IR.js +1 -1
  55. package/lib/umd/locale/fr-FR.js +1 -1
  56. package/lib/umd/locale/id-ID.js +1 -1
  57. package/lib/umd/locale/it-IT.js +1 -1
  58. package/lib/umd/locale/pl-PL.js +1 -1
  59. package/lib/umd/locale/pt-BR.js +1 -1
  60. package/lib/umd/locale/ru-RU.js +1 -1
  61. package/lib/umd/locale/sk-SK.js +1 -1
  62. package/lib/umd/locale/vi-VN.js +1 -1
  63. package/package.json +15 -15
@@ -269,8 +269,8 @@ const locale = { "sheets-ui": {
269
269
  copied: "Copiato"
270
270
  },
271
271
  shortcut: {
272
- "sheet-view": "Sheet View",
273
- "sheet-edit": "Sheet Edit",
272
+ "sheet-view": "Visualizzazione foglio",
273
+ "sheet-edit": "Modifica foglio",
274
274
  sheet: {
275
275
  "zoom-in": "Aumenta zoom",
276
276
  "zoom-out": "Diminuisci zoom",
@@ -269,8 +269,8 @@ const locale = { "sheets-ui": {
269
269
  copied: "Skopiowano"
270
270
  },
271
271
  shortcut: {
272
- "sheet-view": "Sheet View",
273
- "sheet-edit": "Sheet Edit",
272
+ "sheet-view": "Widok arkusza",
273
+ "sheet-edit": "Edycja arkusza",
274
274
  sheet: {
275
275
  "zoom-in": "Powiększ",
276
276
  "zoom-out": "Pomniejsz",
@@ -269,8 +269,8 @@ const locale = { "sheets-ui": {
269
269
  copied: "Copiado"
270
270
  },
271
271
  shortcut: {
272
- "sheet-view": "Sheet View",
273
- "sheet-edit": "Sheet Edit",
272
+ "sheet-view": "Visualização da planilha",
273
+ "sheet-edit": "Edição da planilha",
274
274
  sheet: {
275
275
  "zoom-in": "Aumentar zoom",
276
276
  "zoom-out": "Diminuir zoom",
@@ -269,8 +269,8 @@ const locale = { "sheets-ui": {
269
269
  copied: "Скопировано"
270
270
  },
271
271
  shortcut: {
272
- "sheet-view": "Sheet View",
273
- "sheet-edit": "Sheet Edit",
272
+ "sheet-view": "Просмотр листа",
273
+ "sheet-edit": "Редактирование листа",
274
274
  sheet: {
275
275
  "zoom-in": "Увеличить",
276
276
  "zoom-out": "Уменьшить",
@@ -269,8 +269,8 @@ const locale = { "sheets-ui": {
269
269
  copied: "Skopírované"
270
270
  },
271
271
  shortcut: {
272
- "sheet-view": "Sheet View",
273
- "sheet-edit": "Sheet Edit",
272
+ "sheet-view": "Zobrazenie hárka",
273
+ "sheet-edit": "Úprava hárka",
274
274
  sheet: {
275
275
  "zoom-in": "Priblížiť",
276
276
  "zoom-out": "Oddialiť",
@@ -269,8 +269,8 @@ const locale = { "sheets-ui": {
269
269
  copied: "Đã sao chép"
270
270
  },
271
271
  shortcut: {
272
- "sheet-view": "Sheet View",
273
- "sheet-edit": "Sheet Edit",
272
+ "sheet-view": "Xem trang tính",
273
+ "sheet-edit": "Chỉnh sửa trang tính",
274
274
  sheet: {
275
275
  "zoom-in": "Phóng to",
276
276
  "zoom-out": "Thu nhỏ",
package/lib/facade.js CHANGED
@@ -1275,13 +1275,14 @@ FRange.extend(FRangeSheetsUIMixin);
1275
1275
  * @returns {string} The transformed component key.
1276
1276
  */
1277
1277
  function transformComponentKey(component, componentManager) {
1278
- const { componentKey, isVue3 } = component;
1278
+ const { componentKey, framework } = component;
1279
1279
  let key;
1280
1280
  const disposableCollection = new DisposableCollection();
1281
1281
  if (typeof componentKey === "string") key = componentKey;
1282
1282
  else {
1283
- key = `External_${generateRandomId(6)}`;
1284
- disposableCollection.add(componentManager.register(key, componentKey, { framework: isVue3 ? "vue3" : "react" }));
1283
+ const resolvedFramework = framework !== null && framework !== void 0 ? framework : "react";
1284
+ key = resolvedFramework === "web-component" ? `external-${generateRandomId(6).toLowerCase()}` : `External_${generateRandomId(6)}`;
1285
+ disposableCollection.add(componentManager.register(key, componentKey, { framework: resolvedFramework }));
1285
1286
  }
1286
1287
  return {
1287
1288
  key,
package/lib/index.css CHANGED
@@ -350,10 +350,6 @@
350
350
  width: 300px;
351
351
  }
352
352
 
353
- .univer-w-\[50\%\] {
354
- width: 50%;
355
- }
356
-
357
353
  .univer-w-fit {
358
354
  width: fit-content;
359
355
  }
@@ -418,6 +414,10 @@
418
414
  flex-grow: 0;
419
415
  }
420
416
 
417
+ .univer-basis-0 {
418
+ flex-basis: 0;
419
+ }
420
+
421
421
  .-univer-translate-y-1\/2 {
422
422
  --univer-tw-translate-y: -50%;
423
423
  transform: translate(var(--univer-tw-translate-x), -50%) rotate(var(--univer-tw-rotate)) skewX(var(--univer-tw-skew-x)) skewY(var(--univer-tw-skew-y)) scaleX(var(--univer-tw-scale-x)) scaleY(var(--univer-tw-scale-y));
@@ -1116,6 +1116,40 @@
1116
1116
  background-color: var(--univer-gray-100);
1117
1117
  }
1118
1118
 
1119
+ .rtl\:univer-left-0:where([dir="rtl"], [dir="rtl"] *) {
1120
+ left: 0;
1121
+ }
1122
+
1123
+ .rtl\:univer-right-auto:where([dir="rtl"], [dir="rtl"] *) {
1124
+ right: auto;
1125
+ }
1126
+
1127
+ .rtl\:univer-flex-row-reverse:where([dir="rtl"], [dir="rtl"] *) {
1128
+ flex-direction: row-reverse;
1129
+ }
1130
+
1131
+ .rtl\:univer-pl-5:where([dir="rtl"], [dir="rtl"] *) {
1132
+ padding-left: 1.25rem;
1133
+ }
1134
+
1135
+ .rtl\:univer-pr-1\.5:where([dir="rtl"], [dir="rtl"] *) {
1136
+ padding-right: .375rem;
1137
+ }
1138
+
1139
+ .rtl\:univer-text-right:where([dir="rtl"], [dir="rtl"] *) {
1140
+ text-align: right;
1141
+ }
1142
+
1143
+ .rtl\:after\:univer-left-0:where([dir="rtl"], [dir="rtl"] *):after {
1144
+ content: var(--univer-tw-content);
1145
+ left: 0;
1146
+ }
1147
+
1148
+ .rtl\:after\:univer-right-auto:where([dir="rtl"], [dir="rtl"] *):after {
1149
+ content: var(--univer-tw-content);
1150
+ right: auto;
1151
+ }
1152
+
1119
1153
  .dark\:\!univer-divide-gray-600:where(.univer-dark, .univer-dark *) > :not([hidden]) ~ :not([hidden]) {
1120
1154
  border-color: var(--univer-gray-600) !important;
1121
1155
  }
package/lib/index.js CHANGED
@@ -6,9 +6,9 @@ import { AUTO_FILL_APPLY_TYPE, AUTO_FILL_HOOK_TYPE, AddMergeUndoMutationFactory,
6
6
  import { BehaviorSubject, EMPTY, Observable, Subject, Subscription, combineLatest, combineLatestWith, distinctUntilChanged, filter, map, merge as merge$1, of, shareReplay, startWith, switchMap, takeUntil, throttleTime, withLatestFrom } from "rxjs";
7
7
  import { DocSelectionManagerService, DocSkeletonManagerService, InsertTextCommand, RichTextEditingMutation, SetTextSelectionsOperation } from "@univerjs/docs";
8
8
  import { ObjectScope, UnitAction, UnitObject, UnitRole } from "@univerjs/protocol";
9
- import { Avatar, Button, Calendar, CascaderList, ColorPicker, Confirm, Dropdown, DropdownMenu, FormLayout, Input, InputNumber, MessageType, Radio, RadioGroup, Select, Separator, Switch, TimeInput, Tooltip, borderBottomClassName, borderClassName, borderRightClassName, borderTopClassName, clsx, scrollbarClassName } from "@univerjs/design";
10
- import { AddImageIcon, AdjustHeightDoubleIcon, AdjustWidthDoubleIcon, AlignBottomIcon, AlignTopIcon, AllBorderIcon, AutoHeightDoubleIcon, AutoWidthDoubleIcon, AutofillDoubleIcon, AutowrapIcon, BackSlashDoubleIcon, BoldIcon, BrushIcon, CancelFreezeIcon, CancelMergeIcon, CheckMarkIcon, ClearFormatDoubleIcon, CloseIcon, CodeIcon, ConvertIcon, CopyDoubleIcon, CutIcon, DeleteCellShiftLeftDoubleIcon, DeleteCellShiftUpDoubleIcon, DeleteColumnDoubleIcon, DeleteIcon, DeleteRowDoubleIcon, DownBorderDoubleIcon, DownloadImageIcon, DropdownIcon, ErrorIcon, EyeOutlineIcon, EyelashIcon, FontColorDoubleIcon, FontSizeIncreaseIcon, FontSizeReduceIcon, FreezeColumnIcon, FreezeRowIcon, FreezeToSelectedIcon, FxIcon, HideDoubleIcon, HideGridlinesDoubleIcon, HorizontalBorderDoubleIcon, HorizontalMergeIcon, HorizontallyIcon, IncreaseIcon, InfoIcon, InnerBorderDoubleIcon, InsertCellDownDoubleIcon, InsertCellShiftRightDoubleIcon, InsertDoubleIcon, InsertRowAboveDoubleIcon, InsertRowBelowDoubleIcon, ItalicIcon, LeftBorderDoubleIcon, LeftDoubleDiagonalDoubleIcon, LeftInsertColumnDoubleIcon, LeftJustifyingIcon, LeftRotationFortyFiveDegreesIcon, LeftRotationNinetyDegreesIcon, LeftTridiagonalDoubleIcon, LockIcon, MergeAllIcon, MoreDownIcon, MoreLeftIcon, MoreRightIcon, NoBorderIcon, NoColorDoubleIcon, NoRotationIcon, OuterBorderDoubleIcon, OverflowIcon, PaintBucketDoubleIcon, PasteSpecialDoubleIcon, PenIcon, PipingIcon, ProtectIcon, ReduceDoubleIcon, RightBorderDoubleIcon, RightDoubleDiagonalDoubleIcon, RightInsertColumnDoubleIcon, RightJustifyingIcon, RightRotationFortyFiveDegreesIcon, RightRotationNinetyDegreesIcon, SlashDoubleIcon, StrikethroughIcon, SubscriptIcon, SuperscriptIcon, TruncationIcon, UnderlineIcon, UpBorderDoubleIcon, VerticalBorderDoubleIcon, VerticalCenterIcon, VerticalIntegrationIcon, VerticalTextIcon, WarningIcon, WriteIcon } from "@univerjs/icons";
11
- import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
9
+ import { Avatar, Button, Calendar, CascaderList, ColorPicker, ConfigContext, Confirm, Dropdown, DropdownMenu, FormLayout, Input, InputNumber, MessageType, Radio, RadioGroup, Select, Separator, Switch, TimeInput, Tooltip, borderBottomClassName, borderClassName, borderRightClassName, borderTopClassName, clsx, scrollbarClassName } from "@univerjs/design";
10
+ import { AddImageIcon, AdjustHeightDoubleIcon, AdjustWidthDoubleIcon, AlignBottomIcon, AlignTopIcon, AllBorderIcon, AutoHeightDoubleIcon, AutoWidthDoubleIcon, AutofillDoubleIcon, AutowrapIcon, BackSlashDoubleIcon, BoldIcon, BrushIcon, CancelFreezeIcon, CancelMergeIcon, CheckMarkIcon, ClearFormatDoubleIcon, CloseIcon, CodeIcon, ConvertIcon, CopyDoubleIcon, CutIcon, DeleteCellShiftLeftDoubleIcon, DeleteCellShiftUpDoubleIcon, DeleteColumnDoubleIcon, DeleteIcon, DeleteRowDoubleIcon, DownBorderDoubleIcon, DownloadImageIcon, DropdownIcon, ErrorIcon, EyeIcon, EyelashIcon, FontColorDoubleIcon, FontSizeIncreaseIcon, FontSizeReduceIcon, FreezeColumnIcon, FreezeRowIcon, FreezeToSelectedIcon, FxIcon, HideDoubleIcon, HideGridlinesDoubleIcon, HorizontalBorderDoubleIcon, HorizontalMergeIcon, HorizontallyIcon, IncreaseIcon, InfoIcon, InnerBorderDoubleIcon, InsertCellDownDoubleIcon, InsertCellShiftRightDoubleIcon, InsertDoubleIcon, InsertRowAboveDoubleIcon, InsertRowBelowDoubleIcon, ItalicIcon, LeftBorderDoubleIcon, LeftDoubleDiagonalDoubleIcon, LeftInsertColumnDoubleIcon, LeftJustifyingIcon, LeftRotationFortyFiveDegreesIcon, LeftRotationNinetyDegreesIcon, LeftTridiagonalDoubleIcon, LockIcon, MergeAllIcon, MoreDownIcon, MoreLeftIcon, MoreRightIcon, NoBorderIcon, NoColorDoubleIcon, NoRotationIcon, OuterBorderDoubleIcon, OverflowIcon, PaintBucketDoubleIcon, PasteSpecialDoubleIcon, PenIcon, PipingIcon, ProtectIcon, ReduceDoubleIcon, RightBorderDoubleIcon, RightDoubleDiagonalDoubleIcon, RightInsertColumnDoubleIcon, RightJustifyingIcon, RightRotationFortyFiveDegreesIcon, RightRotationNinetyDegreesIcon, SlashDoubleIcon, StrikethroughIcon, SubscriptIcon, SuperscriptIcon, TruncationIcon, UnderlineIcon, UpBorderDoubleIcon, VerticalBorderDoubleIcon, VerticalCenterIcon, VerticalIntegrationIcon, VerticalTextIcon, WarningIcon, WriteIcon } from "@univerjs/icons";
11
+ import { useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
12
12
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13
13
  import { FUNCTION_NAMES_MATH, FUNCTION_NAMES_STATISTICAL, FUNCTION_NAMES_TEXT, FormulaDataModel, IDefinedNamesService, IFunctionService, ISuperTableService, LexerTreeBuilder, NullValueObject, SetFormulaCalculationNotificationMutation, deserializeRangeWithSheet, isReferenceStringWithEffectiveColumn, isReferenceStrings, matchToken, operatorToken, sequenceNodeType, serializeRange, serializeRangeWithSheet } from "@univerjs/engine-formula";
14
14
  import { ITelemetryService } from "@univerjs/telemetry";
@@ -12207,7 +12207,7 @@ let FormulaEditorController = class FormulaEditorController extends RxDisposable
12207
12207
  if (this._contextService.getContextValue(FOCUSING_EDITOR_BUT_HIDDEN) && !this._contextService.getContextValue(EDITOR_ACTIVATED)) {
12208
12208
  var _formulaEditorDataMod;
12209
12209
  this._univerInstanceService.setCurrentUnitForType(DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY);
12210
- const formulaEditorDataModel = this._univerInstanceService.getUniverDocInstance(DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY);
12210
+ const formulaEditorDataModel = this._univerInstanceService.getUnit(DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, UniverInstanceType.UNIVER_DOC);
12211
12211
  if (this._editorBridgeService.isVisible().visible === false) this._commandService.syncExecuteCommand(SetCellEditVisibleOperation.id, {
12212
12212
  visible: true,
12213
12213
  eventType: DeviceInputEventType.PointerDown,
@@ -12247,7 +12247,7 @@ let FormulaEditorController = class FormulaEditorController extends RxDisposable
12247
12247
  this.disposeWithMe(combineLatest([this._formulaEditorManagerService.position$, addFormulaBar$]).subscribe(([position]) => {
12248
12248
  if (!position) return this._clearScheduledCallback();
12249
12249
  const editorObject = getEditorObject(DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, this._renderManagerService);
12250
- const formulaEditorDataModel = this._univerInstanceService.getUniverDocInstance(DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY);
12250
+ const formulaEditorDataModel = this._univerInstanceService.getUnit(DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, UniverInstanceType.UNIVER_DOC);
12251
12251
  if (editorObject == null || formulaEditorDataModel == null) return this._clearScheduledCallback();
12252
12252
  const { width, height } = position;
12253
12253
  if (width === 0 || height === 0) return this._clearScheduledCallback();
@@ -12266,7 +12266,7 @@ let FormulaEditorController = class FormulaEditorController extends RxDisposable
12266
12266
  const position = this._formulaEditorManagerService.getPosition();
12267
12267
  const skeleton = (_this$_renderManagerS = this._renderManagerService.getRenderById(DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY)) === null || _this$_renderManagerS === void 0 ? void 0 : _this$_renderManagerS.with(DocSkeletonManagerService).getSkeleton();
12268
12268
  const editorObject = this._renderManagerService.getRenderById(DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY);
12269
- const formulaEditorDataModel = this._univerInstanceService.getUniverDocInstance(DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY);
12269
+ const formulaEditorDataModel = this._univerInstanceService.getUnit(DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, UniverInstanceType.UNIVER_DOC);
12270
12270
  if (skeleton == null || position == null || editorObject == null || formulaEditorDataModel == null) return;
12271
12271
  const { marginTop = 0, marginBottom = 0 } = formulaEditorDataModel.getSnapshot().documentStyle;
12272
12272
  const { scene, mainComponent } = editorObject;
@@ -18060,7 +18060,7 @@ function ShowRowMenuItemFactory(accessor) {
18060
18060
  return {
18061
18061
  id: SetSelectedRowsVisibleCommand.id,
18062
18062
  type: MenuItemType.BUTTON,
18063
- icon: "EyeOutlineIcon",
18063
+ icon: "EyeIcon",
18064
18064
  title: "sheets-ui.rightClick.showHideRow",
18065
18065
  hidden$: deriveStateFromActiveSheet$(univerInstanceService, true, ({ worksheet }) => new Observable((subscriber) => {
18066
18066
  function hasHiddenRowsInSelections() {
@@ -18096,7 +18096,7 @@ function ShowColMenuItemFactory(accessor) {
18096
18096
  return {
18097
18097
  id: SetSelectedColsVisibleCommand.id,
18098
18098
  type: MenuItemType.BUTTON,
18099
- icon: "EyeOutlineIcon",
18099
+ icon: "EyeIcon",
18100
18100
  title: "sheets-ui.rightClick.showHideColumn",
18101
18101
  hidden$: deriveStateFromActiveSheet$(univerInstanceService, true, ({ worksheet }) => new Observable((subscriber) => {
18102
18102
  function hasHiddenColsInSelections() {
@@ -19764,6 +19764,7 @@ function DefinedNameOverlay({ search, isInputEvent }) {
19764
19764
  const definedNamesService = useDependency(IDefinedNamesService);
19765
19765
  const univerInstanceService = useDependency(IUniverInstanceService);
19766
19766
  const sidebarService = useDependency(ISidebarService);
19767
+ const direction = localeService.getDirection();
19767
19768
  const unitId = univerInstanceService.getCurrentUnitOfType(UniverInstanceType.UNIVER_SHEET).getUnitId();
19768
19769
  const getDefinedNameMap = () => {
19769
19770
  const definedNameMap = definedNamesService.getDefinedNameMap(unitId);
@@ -19818,7 +19819,9 @@ function DefinedNameOverlay({ search, isInputEvent }) {
19818
19819
  definedNamesService.focusRange(unitId, id);
19819
19820
  };
19820
19821
  return /* @__PURE__ */ jsxs("div", {
19821
- className: "univer-w-[300px]",
19822
+ "data-u-comp": "defined-name-overlay",
19823
+ dir: direction,
19824
+ className: "univer-w-[300px] rtl:univer-text-right",
19822
19825
  children: [/* @__PURE__ */ jsx("div", {
19823
19826
  ref: listContainerRef,
19824
19827
  className: clsx("univer-max-h-[360px] univer-min-h-0 univer-overflow-y-auto", scrollbarClassName, { "univer-min-h-[30px]": filteredDefinedNames.length > 0 }),
@@ -19832,13 +19835,16 @@ function DefinedNameOverlay({ search, isInputEvent }) {
19832
19835
  focusDefinedName(definedName);
19833
19836
  },
19834
19837
  children: /* @__PURE__ */ jsxs("div", {
19835
- className: clsx("univer-flex univer-items-center univer-justify-between univer-gap-2 univer-py-1", borderBottomClassName),
19838
+ "data-u-comp": "defined-name-overlay-row",
19839
+ className: clsx("univer-flex univer-items-center univer-gap-2 univer-py-1 rtl:univer-flex-row-reverse", borderBottomClassName),
19836
19840
  children: [/* @__PURE__ */ jsx("div", {
19837
- className: "univer-w-[50%] univer-flex-shrink-0 univer-truncate univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",
19841
+ "data-u-comp": "defined-name-overlay-name",
19842
+ className: "univer-min-w-0 univer-flex-1 univer-basis-0 univer-truncate univer-text-sm univer-text-gray-600 rtl:univer-text-right dark:!univer-text-gray-200",
19838
19843
  title: definedName.name,
19839
19844
  children: definedName.name
19840
19845
  }), /* @__PURE__ */ jsx("div", {
19841
- className: "univer-w-[50%] univer-flex-shrink-0 univer-truncate univer-text-xs univer-text-gray-400",
19846
+ "data-u-comp": "defined-name-overlay-reference",
19847
+ className: "univer-min-w-0 univer-flex-1 univer-basis-0 univer-truncate univer-text-xs univer-text-gray-400 rtl:univer-text-right",
19842
19848
  title: definedName.formulaOrRefString,
19843
19849
  children: definedName.formulaOrRefString
19844
19850
  })]
@@ -19847,7 +19853,8 @@ function DefinedNameOverlay({ search, isInputEvent }) {
19847
19853
  })
19848
19854
  })
19849
19855
  }), /* @__PURE__ */ jsxs("div", {
19850
- className: "univer-cursor-pointer univer-p-2 univer-transition-colors univer-duration-200 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-600",
19856
+ "data-u-comp": "defined-name-overlay-footer",
19857
+ className: "univer-cursor-pointer univer-p-2 univer-transition-colors univer-duration-200 hover:univer-bg-gray-100 rtl:univer-text-right dark:hover:!univer-bg-gray-600",
19851
19858
  onClick: openSlider,
19852
19859
  children: [/* @__PURE__ */ jsx("div", {
19853
19860
  className: "univer-mb-2 univer-text-sm univer-font-semibold univer-text-gray-600 dark:!univer-text-gray-200",
@@ -20035,7 +20042,7 @@ function DefinedName({ disable }) {
20035
20042
  className: "univer-relative univer-box-border univer-flex univer-h-full univer-w-24 univer-border-r-gray-200 univer-py-1.5 univer-transition-all",
20036
20043
  children: [/* @__PURE__ */ jsx("input", {
20037
20044
  ref: inputRef,
20038
- className: clsx("univer-box-border univer-size-full univer-appearance-none univer-pl-1.5 univer-pr-5 univer-text-gray-900 focus:univer-outline-none dark:!univer-border-r-gray-700 dark:!univer-bg-gray-900 dark:!univer-text-white", borderRightClassName, { "univer-cursor-not-allowed": disable }),
20045
+ className: clsx("univer-box-border univer-size-full univer-appearance-none univer-pl-1.5 univer-pr-5 univer-text-gray-900 focus:univer-outline-none rtl:univer-pl-5 rtl:univer-pr-1.5 dark:!univer-border-r-gray-700 dark:!univer-bg-gray-900 dark:!univer-text-white", borderRightClassName, { "univer-cursor-not-allowed": disable }),
20039
20046
  type: "text",
20040
20047
  value: inputValue,
20041
20048
  onChange: handleChangeSelection,
@@ -20054,7 +20061,7 @@ function DefinedName({ disable }) {
20054
20061
  onOpenChange: setOpen,
20055
20062
  onOpenAutoFocus: (e) => e.preventDefault(),
20056
20063
  children: /* @__PURE__ */ jsx("a", {
20057
- className: clsx("univer-absolute univer-right-0 univer-top-0 univer-flex univer-h-full univer-cursor-pointer univer-items-center univer-justify-center univer-px-1 univer-transition-colors univer-duration-200 hover:univer-bg-gray-100 dark:!univer-text-white dark:hover:!univer-bg-gray-800", { "univer-cursor-not-allowed univer-text-gray-300 hover:univer-bg-transparent dark:!univer-text-gray-700": disable }),
20064
+ className: clsx("univer-absolute univer-right-0 univer-top-0 univer-flex univer-h-full univer-cursor-pointer univer-items-center univer-justify-center univer-px-1 univer-transition-colors univer-duration-200 hover:univer-bg-gray-100 rtl:univer-left-0 rtl:univer-right-auto dark:!univer-text-white dark:hover:!univer-bg-gray-800", { "univer-cursor-not-allowed univer-text-gray-300 hover:univer-bg-transparent dark:!univer-text-gray-700": disable }),
20058
20065
  children: /* @__PURE__ */ jsx(MoreDownIcon, {})
20059
20066
  })
20060
20067
  })]
@@ -21836,7 +21843,8 @@ const SheetBar = () => {
21836
21843
  }),
21837
21844
  /* @__PURE__ */ jsx(SheetBarTabs, {}),
21838
21845
  (!leftScrollState || !rightScrollState) && /* @__PURE__ */ jsxs("div", {
21839
- className: "univer-relative univer-flex univer-items-center univer-px-2 after:univer-absolute after:univer-right-0 after:univer-top-1/2 after:univer-h-4 after:univer-w-px after:-univer-translate-y-1/2 after:univer-bg-gray-200 after:univer-content-[\"\"]",
21846
+ "data-u-comp": "sheet-bar-scroll-buttons",
21847
+ className: "univer-relative univer-flex univer-items-center univer-px-2 after:univer-absolute after:univer-right-0 after:univer-top-1/2 after:univer-h-4 after:univer-w-px after:-univer-translate-y-1/2 after:univer-bg-gray-200 after:univer-content-[\"\"] rtl:univer-flex-row-reverse rtl:after:univer-left-0 rtl:after:univer-right-auto",
21840
21848
  children: [/* @__PURE__ */ jsx(SheetBarButton, {
21841
21849
  disabled: leftScrollState,
21842
21850
  onClick: handleScrollLeft,
@@ -22742,7 +22750,7 @@ const useHighlightRange = (ranges = []) => {
22742
22750
  //#endregion
22743
22751
  //#region package.json
22744
22752
  var name = "@univerjs/sheets-ui";
22745
- var version = "1.0.0-alpha.1";
22753
+ var version = "1.0.0-alpha.2";
22746
22754
 
22747
22755
  //#endregion
22748
22756
  //#region src/controllers/cell-alert.controller.ts
@@ -24153,7 +24161,9 @@ function BorderPanel(props) {
24153
24161
  var _value$color;
24154
24162
  const iconManager = useDependency(IconManager);
24155
24163
  const borderStyleManagerService = useDependency(BorderStyleManagerService);
24156
- const { isAllValuesSame, value: currentValue } = useDependency(SheetsSelectionsService).getCellStylesProperty("bd");
24164
+ const selectionManagerService = useDependency(SheetsSelectionsService);
24165
+ const { direction } = useContext(ConfigContext);
24166
+ const { isAllValuesSame, value: currentValue } = selectionManagerService.getCellStylesProperty("bd");
24157
24167
  const color = isAllValuesSame ? getBorderColor(currentValue) : void 0;
24158
24168
  const type = isAllValuesSame ? getBorderStyle(currentValue) : void 0;
24159
24169
  const { onChange, value } = props;
@@ -24168,6 +24178,7 @@ function BorderPanel(props) {
24168
24178
  return Icon && /* @__PURE__ */ jsx(Icon, { className: "univer-fill-primary-600" });
24169
24179
  }
24170
24180
  return /* @__PURE__ */ jsxs("section", {
24181
+ dir: direction,
24171
24182
  className: "univer-box-border univer-grid univer-gap-2 univer-p-1.5",
24172
24183
  children: [
24173
24184
  /* @__PURE__ */ jsx("div", {
@@ -26043,7 +26054,7 @@ let ComponentsController = class ComponentsController extends Disposable {
26043
26054
  DeleteRowDoubleIcon,
26044
26055
  DownBorderDoubleIcon,
26045
26056
  DownloadImageIcon,
26046
- EyeOutlineIcon,
26057
+ EyeIcon,
26047
26058
  FontColorDoubleIcon,
26048
26059
  FontSizeIncreaseIcon,
26049
26060
  FontSizeReduceIcon,
@@ -269,8 +269,8 @@ const locale = { "sheets-ui": {
269
269
  copied: "تم النسخ"
270
270
  },
271
271
  shortcut: {
272
- "sheet-view": "Sheet View",
273
- "sheet-edit": "Sheet Edit",
272
+ "sheet-view": "عرض الورقة",
273
+ "sheet-edit": "تحرير الورقة",
274
274
  sheet: {
275
275
  "zoom-in": "تكبير",
276
276
  "zoom-out": "تصغير",
@@ -269,8 +269,8 @@ const locale = { "sheets-ui": {
269
269
  copied: "Copiat"
270
270
  },
271
271
  shortcut: {
272
- "sheet-view": "Sheet View",
273
- "sheet-edit": "Sheet Edit",
272
+ "sheet-view": "Vista del full",
273
+ "sheet-edit": "Edició del full",
274
274
  sheet: {
275
275
  "zoom-in": "Apropar",
276
276
  "zoom-out": "Allunyar",
@@ -269,8 +269,8 @@ const locale = { "sheets-ui": {
269
269
  copied: "Kopiert"
270
270
  },
271
271
  shortcut: {
272
- "sheet-view": "Sheet View",
273
- "sheet-edit": "Sheet Edit",
272
+ "sheet-view": "Tabellenblattansicht",
273
+ "sheet-edit": "Tabellenblattbearbeitung",
274
274
  sheet: {
275
275
  "zoom-in": "Vergrößern",
276
276
  "zoom-out": "Verkleinern",
@@ -269,8 +269,8 @@ const locale = { "sheets-ui": {
269
269
  copied: "Copiado"
270
270
  },
271
271
  shortcut: {
272
- "sheet-view": "Sheet View",
273
- "sheet-edit": "Sheet Edit",
272
+ "sheet-view": "Vista de hoja",
273
+ "sheet-edit": "Edición de hoja",
274
274
  sheet: {
275
275
  "zoom-in": "Acercar",
276
276
  "zoom-out": "Alejar",
@@ -269,8 +269,8 @@ const locale = { "sheets-ui": {
269
269
  copied: "کپی شد"
270
270
  },
271
271
  shortcut: {
272
- "sheet-view": "Sheet View",
273
- "sheet-edit": "Sheet Edit",
272
+ "sheet-view": "نمایش برگه",
273
+ "sheet-edit": "ویرایش برگه",
274
274
  sheet: {
275
275
  "zoom-in": "بزرگنمایی",
276
276
  "zoom-out": "کوچکنمایی",
@@ -269,8 +269,8 @@ const locale = { "sheets-ui": {
269
269
  copied: "Copié"
270
270
  },
271
271
  shortcut: {
272
- "sheet-view": "Sheet View",
273
- "sheet-edit": "Sheet Edit",
272
+ "sheet-view": "Affichage de la feuille",
273
+ "sheet-edit": "Modification de la feuille",
274
274
  sheet: {
275
275
  "zoom-in": "Zoom avant",
276
276
  "zoom-out": "Zoom arrière",
@@ -269,8 +269,8 @@ const locale = { "sheets-ui": {
269
269
  copied: "Tersalin"
270
270
  },
271
271
  shortcut: {
272
- "sheet-view": "Sheet View",
273
- "sheet-edit": "Sheet Edit",
272
+ "sheet-view": "Tampilan lembar",
273
+ "sheet-edit": "Pengeditan lembar",
274
274
  sheet: {
275
275
  "zoom-in": "Perbesar",
276
276
  "zoom-out": "Perkecil",
@@ -269,8 +269,8 @@ const locale = { "sheets-ui": {
269
269
  copied: "Copiato"
270
270
  },
271
271
  shortcut: {
272
- "sheet-view": "Sheet View",
273
- "sheet-edit": "Sheet Edit",
272
+ "sheet-view": "Visualizzazione foglio",
273
+ "sheet-edit": "Modifica foglio",
274
274
  sheet: {
275
275
  "zoom-in": "Aumenta zoom",
276
276
  "zoom-out": "Diminuisci zoom",
@@ -269,8 +269,8 @@ const locale = { "sheets-ui": {
269
269
  copied: "Skopiowano"
270
270
  },
271
271
  shortcut: {
272
- "sheet-view": "Sheet View",
273
- "sheet-edit": "Sheet Edit",
272
+ "sheet-view": "Widok arkusza",
273
+ "sheet-edit": "Edycja arkusza",
274
274
  sheet: {
275
275
  "zoom-in": "Powiększ",
276
276
  "zoom-out": "Pomniejsz",
@@ -269,8 +269,8 @@ const locale = { "sheets-ui": {
269
269
  copied: "Copiado"
270
270
  },
271
271
  shortcut: {
272
- "sheet-view": "Sheet View",
273
- "sheet-edit": "Sheet Edit",
272
+ "sheet-view": "Visualização da planilha",
273
+ "sheet-edit": "Edição da planilha",
274
274
  sheet: {
275
275
  "zoom-in": "Aumentar zoom",
276
276
  "zoom-out": "Diminuir zoom",
@@ -269,8 +269,8 @@ const locale = { "sheets-ui": {
269
269
  copied: "Скопировано"
270
270
  },
271
271
  shortcut: {
272
- "sheet-view": "Sheet View",
273
- "sheet-edit": "Sheet Edit",
272
+ "sheet-view": "Просмотр листа",
273
+ "sheet-edit": "Редактирование листа",
274
274
  sheet: {
275
275
  "zoom-in": "Увеличить",
276
276
  "zoom-out": "Уменьшить",
@@ -269,8 +269,8 @@ const locale = { "sheets-ui": {
269
269
  copied: "Skopírované"
270
270
  },
271
271
  shortcut: {
272
- "sheet-view": "Sheet View",
273
- "sheet-edit": "Sheet Edit",
272
+ "sheet-view": "Zobrazenie hárka",
273
+ "sheet-edit": "Úprava hárka",
274
274
  sheet: {
275
275
  "zoom-in": "Priblížiť",
276
276
  "zoom-out": "Oddialiť",
@@ -269,8 +269,8 @@ const locale = { "sheets-ui": {
269
269
  copied: "Đã sao chép"
270
270
  },
271
271
  shortcut: {
272
- "sheet-view": "Sheet View",
273
- "sheet-edit": "Sheet Edit",
272
+ "sheet-view": "Xem trang tính",
273
+ "sheet-edit": "Chỉnh sửa trang tính",
274
274
  sheet: {
275
275
  "zoom-in": "Phóng to",
276
276
  "zoom-out": "Thu nhỏ",
@@ -23,14 +23,15 @@ import { ComponentManager } from '@univerjs/ui';
23
23
  export interface IFComponentKey {
24
24
  /**
25
25
  * The key of the component to be rendered in the popup.
26
- * if key is a string, it will be query from the component registry.
27
- * if key is a React or Vue3 component, it will be rendered directly.
26
+ * If key is a string, it will be queried from the component registry.
27
+ * If key is a component, it will be registered temporarily with the specified framework.
28
28
  */
29
29
  componentKey: string | ComponentType;
30
30
  /**
31
- * If componentKey is a Vue3 component, this must be set to true
31
+ * The framework adapter used to render a direct component.
32
+ * Defaults to `react`.
32
33
  */
33
- isVue3?: boolean;
34
+ framework?: string;
34
35
  }
35
36
  export interface IFCanvasPopup extends Omit<ICanvasPopup, 'componentKey'>, IFComponentKey {
36
37
  }