@univerjs/sheets-sort-ui 1.0.0-insiders.20260809-70eefdd → 1.0.0-rc.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 (91) hide show
  1. package/LICENSE +176 -0
  2. package/README.md +0 -1
  3. package/lib/cjs/index.js +304 -3
  4. package/lib/cjs/locale/ar-SA.js +1 -0
  5. package/lib/cjs/locale/ca-ES.js +1 -0
  6. package/lib/cjs/locale/de-DE.js +1 -0
  7. package/lib/cjs/locale/en-US.js +1 -0
  8. package/lib/cjs/locale/es-ES.js +1 -0
  9. package/lib/cjs/locale/fa-IR.js +1 -0
  10. package/lib/cjs/locale/fr-FR.js +1 -0
  11. package/lib/cjs/locale/id-ID.js +1 -0
  12. package/lib/cjs/locale/it-IT.js +1 -0
  13. package/lib/cjs/locale/ja-JP.js +1 -0
  14. package/lib/cjs/locale/ko-KR.js +1 -0
  15. package/lib/cjs/locale/pl-PL.js +1 -0
  16. package/lib/cjs/locale/pt-BR.js +1 -0
  17. package/lib/cjs/locale/ru-RU.js +1 -0
  18. package/lib/cjs/locale/sk-SK.js +1 -0
  19. package/lib/cjs/locale/vi-VN.js +1 -0
  20. package/lib/cjs/locale/zh-CN.js +1 -0
  21. package/lib/cjs/locale/zh-HK.js +1 -0
  22. package/lib/cjs/locale/zh-TW.js +1 -0
  23. package/lib/es/index.js +303 -8
  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/index.css +64 -11
  44. package/lib/index.js +303 -8
  45. package/lib/locale/ar-SA.js +1 -0
  46. package/lib/locale/ca-ES.js +1 -0
  47. package/lib/locale/de-DE.js +1 -0
  48. package/lib/locale/en-US.js +1 -0
  49. package/lib/locale/es-ES.js +1 -0
  50. package/lib/locale/fa-IR.js +1 -0
  51. package/lib/locale/fr-FR.js +1 -0
  52. package/lib/locale/id-ID.js +1 -0
  53. package/lib/locale/it-IT.js +1 -0
  54. package/lib/locale/ja-JP.js +1 -0
  55. package/lib/locale/ko-KR.js +1 -0
  56. package/lib/locale/pl-PL.js +1 -0
  57. package/lib/locale/pt-BR.js +1 -0
  58. package/lib/locale/ru-RU.js +1 -0
  59. package/lib/locale/sk-SK.js +1 -0
  60. package/lib/locale/vi-VN.js +1 -0
  61. package/lib/locale/zh-CN.js +1 -0
  62. package/lib/locale/zh-HK.js +1 -0
  63. package/lib/locale/zh-TW.js +1 -0
  64. package/lib/types/controllers/mobile/components.controller.d.ts +21 -0
  65. package/lib/types/controllers/mobile/ui.controller.d.ts +30 -0
  66. package/lib/types/index.d.ts +1 -0
  67. package/lib/types/locale/en-US.d.ts +1 -0
  68. package/lib/types/menu/mobile-schema.d.ts +17 -0
  69. package/lib/types/mobile-plugin.d.ts +29 -0
  70. package/lib/types/views/mobile/MobileCustomSortPanel.d.ts +16 -0
  71. package/lib/umd/index.js +1 -1
  72. package/lib/umd/locale/ar-SA.js +1 -1
  73. package/lib/umd/locale/ca-ES.js +1 -1
  74. package/lib/umd/locale/de-DE.js +1 -1
  75. package/lib/umd/locale/en-US.js +1 -1
  76. package/lib/umd/locale/es-ES.js +1 -1
  77. package/lib/umd/locale/fa-IR.js +1 -1
  78. package/lib/umd/locale/fr-FR.js +1 -1
  79. package/lib/umd/locale/id-ID.js +1 -1
  80. package/lib/umd/locale/it-IT.js +1 -1
  81. package/lib/umd/locale/ja-JP.js +1 -1
  82. package/lib/umd/locale/ko-KR.js +1 -1
  83. package/lib/umd/locale/pl-PL.js +1 -1
  84. package/lib/umd/locale/pt-BR.js +1 -1
  85. package/lib/umd/locale/ru-RU.js +1 -1
  86. package/lib/umd/locale/sk-SK.js +1 -1
  87. package/lib/umd/locale/vi-VN.js +1 -1
  88. package/lib/umd/locale/zh-CN.js +1 -1
  89. package/lib/umd/locale/zh-HK.js +1 -1
  90. package/lib/umd/locale/zh-TW.js +1 -1
  91. package/package.json +13 -13
@@ -24,6 +24,7 @@ const locale = { "sheets-sort-ui": {
24
24
  "sort-reminder-no": "Giữ nguyên phạm vi sắp xếp được chọn",
25
25
  "first-row-check": "Hàng đầu tiên không tham gia sắp xếp",
26
26
  "add-condition": "Thêm điều kiện sắp xếp",
27
+ "delete-condition": "Xóa điều kiện",
27
28
  cancel: "Hủy bỏ",
28
29
  confirm: "Xác nhận"
29
30
  },
@@ -24,6 +24,7 @@ const locale = { "sheets-sort-ui": {
24
24
  "sort-reminder-no": "保持所选排序范围",
25
25
  "first-row-check": "标题不参与排序",
26
26
  "add-condition": "添加排序条件",
27
+ "delete-condition": "删除排序条件",
27
28
  cancel: "取消",
28
29
  confirm: "确认"
29
30
  },
@@ -24,6 +24,7 @@ const locale = { "sheets-sort-ui": {
24
24
  "sort-reminder-no": "保持所選排序範圍",
25
25
  "first-row-check": "標題不參與排序",
26
26
  "add-condition": "新增排序條件",
27
+ "delete-condition": "刪除排序條件",
27
28
  cancel: "取消",
28
29
  confirm: "確認"
29
30
  },
@@ -24,6 +24,7 @@ const locale = { "sheets-sort-ui": {
24
24
  "sort-reminder-no": "保持所選排序範圍",
25
25
  "first-row-check": "標題不參與排序",
26
26
  "add-condition": "新增排序條件",
27
+ "delete-condition": "刪除排序條件",
27
28
  cancel: "取消",
28
29
  confirm: "確認"
29
30
  },
package/lib/es/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import { CommandType, DependentOn, Disposable, ICommandService, IConfigService, IConfirmService, IUniverInstanceService, Inject, Injector, LocaleService, LocaleType, Plugin, RxDisposable, Tools, UniverInstanceType, merge, throttle } from "@univerjs/core";
1
+ import { CommandType, DependentOn, Disposable, ICommandService, IConfigService, IConfirmService, IUniverInstanceService, Inject, Injector, LocaleService, LocaleType, Plugin, RxDisposable, Tools, UniverInstanceType, merge, registerDependencies, throttle, touchDependencies } from "@univerjs/core";
2
2
  import { RangeProtectionPermissionEditPoint, SetSelectionsOperation, SheetsSelectionsService, UniverSheetsPlugin, WorkbookEditablePermission, WorksheetEditPermission, WorksheetSortPermission, expandToContinuousRange, getPrimaryForRange, getSheetCommandTarget } from "@univerjs/sheets";
3
3
  import { SheetsSortService, SortRangeCommand, SortType, UniverSheetsSortPlugin } from "@univerjs/sheets-sort";
4
4
  import { BehaviorSubject, takeUntil } from "rxjs";
5
- import { Button, ButtonGroup, Checkbox, DraggableList, Dropdown, Radio, RadioGroup, clsx, scrollbarClassName } from "@univerjs/design";
6
- import { ComponentManager, ContextMenuGroup, ContextMenuPosition, IDialogService, ILayoutService, IMenuManagerService, IUIPartsService, IconManager, MenuItemType, RibbonDataGroup, connectInjector, getMenuHiddenObservable, useDependency, useObservable } from "@univerjs/ui";
5
+ import { Button, ButtonGroup, Checkbox, DraggableList, Dropdown, MobileSelect, Radio, RadioGroup, clsx, scrollbarClassName } from "@univerjs/design";
6
+ import { ComponentManager, ContextMenuGroup, ContextMenuPosition, IDialogService, ILayoutService, IMenuManagerService, IUIPartsService, IconManager, MenuItemType, RibbonDataGroup, UniverMobileUIPlugin, connectInjector, getMenuHiddenObservable, useDependency, useObservable } from "@univerjs/ui";
7
7
  import { useCallback, useEffect, useRef, useState } from "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
- import { SheetsRenderService, SheetsUIPart, UniverSheetsUIPlugin, getCurrentExclusiveRangeInterest$, getCurrentRangeDisable$ } from "@univerjs/sheets-ui";
9
+ import { SheetsRenderService, SheetsUIPart, UniverSheetsMobileUIPlugin, UniverSheetsUIPlugin, getCurrentExclusiveRangeInterest$, getCurrentRangeDisable$ } from "@univerjs/sheets-ui";
10
10
  import { AscendingIcon, CheckMarkIcon, CustomSortIcon, DeleteEmptyIcon, DescendingIcon, ExpandAscendingIcon, ExpandDescendingIcon, GripVerticalIcon, IncreaseIcon, MoreDownIcon } from "@univerjs/icons";
11
11
  import { serializeRange } from "@univerjs/engine-formula";
12
12
 
@@ -566,7 +566,7 @@ const menuSchema = {
566
566
  //#endregion
567
567
  //#region package.json
568
568
  var name = "@univerjs/sheets-sort-ui";
569
- var version = "1.0.0-insiders.20260809-70eefdd";
569
+ var version = "1.0.0-rc.0";
570
570
 
571
571
  //#endregion
572
572
  //#region src/config/config.ts
@@ -574,6 +574,301 @@ const SHEETS_SORT_UI_PLUGIN_CONFIG_KEY = "sheets-sort-ui.config";
574
574
  const configSymbol = Symbol(SHEETS_SORT_UI_PLUGIN_CONFIG_KEY);
575
575
  const defaultPluginConfig = {};
576
576
 
577
+ //#endregion
578
+ //#region src/views/mobile/MobileCustomSortPanel.tsx
579
+ function MobileCustomSortPanel() {
580
+ const state = useObservable(useDependency(SheetsSortUIService).customSortState$);
581
+ if (!(state === null || state === void 0 ? void 0 : state.location)) return null;
582
+ return /* @__PURE__ */ jsx(MobileCustomSortPanelContent, { location: state.location });
583
+ }
584
+ function MobileCustomSortPanelContent({ location }) {
585
+ const sheetsSortService = useDependency(SheetsSortService);
586
+ const sheetsSortUIService = useDependency(SheetsSortUIService);
587
+ const localeService = useDependency(LocaleService);
588
+ const { range, unitId, subUnitId } = location;
589
+ const [hasTitle, setHasTitle] = useState(false);
590
+ const [orderRules, setOrderRules] = useState([{
591
+ type: SortType.ASC,
592
+ colIndex: range.startColumn
593
+ }]);
594
+ const titles = sheetsSortUIService.getTitles(hasTitle);
595
+ const canAddCondition = orderRules.length < titles.length;
596
+ function updateRule(index, update) {
597
+ setOrderRules((current) => current.map((rule, ruleIndex) => ruleIndex === index ? {
598
+ ...rule,
599
+ ...update
600
+ } : rule));
601
+ }
602
+ function addCondition() {
603
+ setOrderRules((current) => {
604
+ const nextTitle = titles.find((title) => !current.some((rule) => rule.colIndex === title.index));
605
+ return nextTitle ? [...current, {
606
+ type: SortType.ASC,
607
+ colIndex: nextTitle.index
608
+ }] : current;
609
+ });
610
+ }
611
+ function setTitle(value) {
612
+ setHasTitle(value);
613
+ sheetsSortUIService.setSelection(unitId, subUnitId, value ? {
614
+ ...range,
615
+ startRow: range.startRow + 1
616
+ } : range);
617
+ }
618
+ function apply() {
619
+ sheetsSortService.applySort({
620
+ range,
621
+ orderRules,
622
+ hasTitle
623
+ }, unitId, subUnitId);
624
+ sheetsSortUIService.closeCustomSortPanel();
625
+ }
626
+ return /* @__PURE__ */ jsxs("div", {
627
+ className: "univer-grid univer-gap-4",
628
+ children: [
629
+ /* @__PURE__ */ jsxs("div", {
630
+ className: "univer-flex univer-items-center univer-justify-between univer-gap-3",
631
+ children: [/* @__PURE__ */ jsx(Checkbox, {
632
+ checked: hasTitle,
633
+ onChange: (value) => setTitle(Boolean(value)),
634
+ children: localeService.t("sheets-sort-ui.dialog.first-row-check")
635
+ }), /* @__PURE__ */ jsx(Button, {
636
+ variant: "text",
637
+ disabled: !canAddCondition,
638
+ onClick: addCondition,
639
+ children: localeService.t("sheets-sort-ui.dialog.add-condition")
640
+ })]
641
+ }),
642
+ /* @__PURE__ */ jsx("div", {
643
+ className: "univer-grid univer-gap-3",
644
+ children: orderRules.map((rule, index) => {
645
+ const availableTitles = titles.filter((title) => title.index === rule.colIndex || !orderRules.some((item) => item.colIndex === title.index));
646
+ return /* @__PURE__ */ jsxs("div", {
647
+ className: "univer-grid univer-gap-2 univer-rounded-xl univer-bg-gray-50 univer-p-3 dark:!univer-bg-gray-800",
648
+ children: [/* @__PURE__ */ jsxs("div", {
649
+ className: "univer-flex univer-items-center univer-gap-2",
650
+ children: [/* @__PURE__ */ jsx(MobileSelect, {
651
+ className: "!univer-min-w-0 univer-flex-1",
652
+ value: `${rule.colIndex}`,
653
+ options: availableTitles.map((title) => ({
654
+ label: title.label,
655
+ value: `${title.index}`
656
+ })),
657
+ onChange: (value) => updateRule(index, { colIndex: Number(value) })
658
+ }), orderRules.length > 1 && /* @__PURE__ */ jsx(Button, {
659
+ size: "icon",
660
+ variant: "text",
661
+ "aria-label": localeService.t("sheets-sort-ui.dialog.delete-condition"),
662
+ onClick: () => setOrderRules((current) => current.filter((_, ruleIndex) => ruleIndex !== index)),
663
+ children: /* @__PURE__ */ jsx(DeleteEmptyIcon, {})
664
+ })]
665
+ }), /* @__PURE__ */ jsx(MobileSelect, {
666
+ className: "univer-w-full",
667
+ value: rule.type,
668
+ options: [{
669
+ label: localeService.t("sheets-sort-ui.general.sort-asc"),
670
+ value: SortType.ASC
671
+ }, {
672
+ label: localeService.t("sheets-sort-ui.general.sort-desc"),
673
+ value: SortType.DESC
674
+ }],
675
+ onChange: (value) => updateRule(index, { type: value })
676
+ })]
677
+ }, rule.colIndex);
678
+ })
679
+ }),
680
+ /* @__PURE__ */ jsxs("div", {
681
+ className: "univer-sticky univer-bottom-0 univer-grid univer-grid-cols-2 univer-gap-3 univer-bg-gray-0 univer-py-3 dark:!univer-bg-gray-900",
682
+ children: [/* @__PURE__ */ jsx(Button, {
683
+ size: "large",
684
+ onClick: () => sheetsSortUIService.closeCustomSortPanel(),
685
+ children: localeService.t("sheets-sort-ui.dialog.cancel")
686
+ }), /* @__PURE__ */ jsx(Button, {
687
+ size: "large",
688
+ variant: "primary",
689
+ onClick: apply,
690
+ children: localeService.t("sheets-sort-ui.dialog.confirm")
691
+ })]
692
+ })
693
+ ]
694
+ });
695
+ }
696
+
697
+ //#endregion
698
+ //#region src/controllers/mobile/components.controller.ts
699
+ /**
700
+ * Copyright 2023-present DreamNum Co., Ltd.
701
+ *
702
+ * Licensed under the Apache License, Version 2.0 (the "License");
703
+ * you may not use this file except in compliance with the License.
704
+ * You may obtain a copy of the License at
705
+ *
706
+ * http://www.apache.org/licenses/LICENSE-2.0
707
+ *
708
+ * Unless required by applicable law or agreed to in writing, software
709
+ * distributed under the License is distributed on an "AS IS" BASIS,
710
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
711
+ * See the License for the specific language governing permissions and
712
+ * limitations under the License.
713
+ */
714
+ const MOBILE_CUSTOM_SORT_PANEL = "MobileCustomSortPanel";
715
+ let MobileComponentsController = class MobileComponentsController extends Disposable {
716
+ constructor(componentManager, iconManager) {
717
+ super();
718
+ this.disposeWithMe(iconManager.register({
719
+ AscendingIcon,
720
+ ExpandAscendingIcon,
721
+ DescendingIcon,
722
+ ExpandDescendingIcon,
723
+ CustomSortIcon
724
+ }));
725
+ this.disposeWithMe(componentManager.register(MOBILE_CUSTOM_SORT_PANEL, MobileCustomSortPanel));
726
+ }
727
+ };
728
+ MobileComponentsController = __decorate([__decorateParam(0, Inject(ComponentManager)), __decorateParam(1, Inject(IconManager))], MobileComponentsController);
729
+
730
+ //#endregion
731
+ //#region src/menu/mobile-schema.ts
732
+ const mobileMenuSchema = {
733
+ [RibbonDataGroup.ORGANIZATION]: { [SHEETS_SORT_MENU_ID]: {
734
+ order: 3,
735
+ menuItemFactory: sortRangeMenuFactory,
736
+ [SortRangeAscCommand.id]: {
737
+ order: 0,
738
+ menuItemFactory: sortRangeAscMenuFactory
739
+ },
740
+ [SortRangeAscExtCommand.id]: {
741
+ order: 1,
742
+ menuItemFactory: sortRangeAscExtMenuFactory
743
+ },
744
+ [SortRangeDescCommand.id]: {
745
+ order: 2,
746
+ menuItemFactory: sortRangeDescMenuFactory
747
+ },
748
+ [SortRangeDescExtCommand.id]: {
749
+ order: 3,
750
+ menuItemFactory: sortRangeDescExtMenuFactory
751
+ },
752
+ [SortRangeCustomCommand.id]: {
753
+ order: 4,
754
+ menuItemFactory: sortRangeCustomMenuFactory
755
+ }
756
+ } },
757
+ [ContextMenuPosition.MAIN_AREA]: { [ContextMenuGroup.DATA]: { [SHEETS_SORT_CTX_MENU_ID]: {
758
+ order: 0,
759
+ menuItemFactory: sortRangeCtxMenuFactory,
760
+ [SortRangeAscInCtxMenuCommand.id]: {
761
+ order: 0,
762
+ menuItemFactory: sortRangeAscCtxMenuFactory
763
+ },
764
+ [SortRangeAscExtInCtxMenuCommand.id]: {
765
+ order: 1,
766
+ menuItemFactory: sortRangeAscExtCtxMenuFactory
767
+ },
768
+ [SortRangeDescInCtxMenuCommand.id]: {
769
+ order: 2,
770
+ menuItemFactory: sortRangeDescCtxMenuFactory
771
+ },
772
+ [SortRangeDescExtInCtxMenuCommand.id]: {
773
+ order: 3,
774
+ menuItemFactory: sortRangeDescExtCtxMenuFactory
775
+ },
776
+ [SortRangeCustomInCtxMenuCommand.id]: {
777
+ order: 4,
778
+ menuItemFactory: sortRangeCustomCtxMenuFactory
779
+ }
780
+ } } }
781
+ };
782
+
783
+ //#endregion
784
+ //#region src/controllers/mobile/ui.controller.ts
785
+ const MOBILE_CUSTOM_SORT_DIALOG_ID = "mobile-custom-sort-dialog";
786
+ let SheetsSortMobileUIController = class SheetsSortMobileUIController extends RxDisposable {
787
+ constructor(_commandService, _menuManagerService, _dialogService, _sheetRenderService, _localeService, _sheetsSortUIService) {
788
+ super();
789
+ this._commandService = _commandService;
790
+ this._menuManagerService = _menuManagerService;
791
+ this._dialogService = _dialogService;
792
+ this._sheetRenderService = _sheetRenderService;
793
+ this._localeService = _localeService;
794
+ this._sheetsSortUIService = _sheetsSortUIService;
795
+ this._initCommands();
796
+ this._menuManagerService.mergeMenu(mobileMenuSchema);
797
+ this._initCustomSortPanel();
798
+ }
799
+ _initCommands() {
800
+ [
801
+ SortRangeAscCommand,
802
+ SortRangeAscExtCommand,
803
+ SortRangeDescCommand,
804
+ SortRangeDescExtCommand,
805
+ SortRangeCustomCommand,
806
+ SortRangeAscInCtxMenuCommand,
807
+ SortRangeAscExtInCtxMenuCommand,
808
+ SortRangeDescInCtxMenuCommand,
809
+ SortRangeDescExtInCtxMenuCommand,
810
+ SortRangeCustomInCtxMenuCommand
811
+ ].forEach((command) => this.disposeWithMe(this._commandService.registerCommand(command)));
812
+ this.disposeWithMe(this._sheetRenderService.registerSkeletonChangingMutations(SortRangeCommand.id));
813
+ }
814
+ _initCustomSortPanel() {
815
+ this._sheetsSortUIService.customSortState$.pipe(takeUntil(this.dispose$)).subscribe((state) => {
816
+ if ((state === null || state === void 0 ? void 0 : state.show) && state.location) {
817
+ this._dialogService.open({
818
+ id: MOBILE_CUSTOM_SORT_DIALOG_ID,
819
+ title: { title: `${this._localeService.t("sheets-sort-ui.general.sort-custom")}: ${serializeRange(state.location.range)}` },
820
+ children: { label: MOBILE_CUSTOM_SORT_PANEL },
821
+ mask: true,
822
+ onClose: () => this._sheetsSortUIService.closeCustomSortPanel()
823
+ });
824
+ return;
825
+ }
826
+ if (state && !state.show) this._dialogService.close(MOBILE_CUSTOM_SORT_DIALOG_ID);
827
+ });
828
+ }
829
+ };
830
+ SheetsSortMobileUIController = __decorate([
831
+ __decorateParam(0, ICommandService),
832
+ __decorateParam(1, IMenuManagerService),
833
+ __decorateParam(2, IDialogService),
834
+ __decorateParam(3, Inject(SheetsRenderService)),
835
+ __decorateParam(4, Inject(LocaleService)),
836
+ __decorateParam(5, Inject(SheetsSortUIService))
837
+ ], SheetsSortMobileUIController);
838
+
839
+ //#endregion
840
+ //#region src/mobile-plugin.ts
841
+ let UniverSheetsSortMobileUIPlugin = class UniverSheetsSortMobileUIPlugin extends Plugin {
842
+ constructor(_config = defaultPluginConfig, _injector, _configService) {
843
+ super();
844
+ this._config = _config;
845
+ this._injector = _injector;
846
+ this._configService = _configService;
847
+ const { ...rest } = merge({}, defaultPluginConfig, this._config);
848
+ this._configService.setConfig(SHEETS_SORT_UI_PLUGIN_CONFIG_KEY, rest);
849
+ }
850
+ onStarting() {
851
+ registerDependencies(this._injector, [
852
+ [MobileComponentsController],
853
+ [SheetsSortUIService],
854
+ [SheetsSortMobileUIController]
855
+ ]);
856
+ touchDependencies(this._injector, [[MobileComponentsController]]);
857
+ }
858
+ onRendered() {
859
+ touchDependencies(this._injector, [[SheetsSortMobileUIController]]);
860
+ }
861
+ };
862
+ _defineProperty(UniverSheetsSortMobileUIPlugin, "type", UniverInstanceType.UNIVER_SHEET);
863
+ _defineProperty(UniverSheetsSortMobileUIPlugin, "pluginName", "SHEET_SORT_UI_PLUGIN");
864
+ _defineProperty(UniverSheetsSortMobileUIPlugin, "packageName", name);
865
+ _defineProperty(UniverSheetsSortMobileUIPlugin, "version", version);
866
+ UniverSheetsSortMobileUIPlugin = __decorate([
867
+ DependentOn(UniverSheetsPlugin, UniverSheetsSortPlugin, UniverSheetsMobileUIPlugin, UniverMobileUIPlugin),
868
+ __decorateParam(1, Inject(Injector)),
869
+ __decorateParam(2, IConfigService)
870
+ ], UniverSheetsSortMobileUIPlugin);
871
+
577
872
  //#endregion
578
873
  //#region src/views/CustomSortPanel.tsx
579
874
  function CustomSortPanel() {
@@ -744,7 +1039,7 @@ function SortOptionItem(props) {
744
1039
  children: /* @__PURE__ */ jsx(GripVerticalIcon, {})
745
1040
  }), /* @__PURE__ */ jsx(Dropdown, {
746
1041
  overlay: /* @__PURE__ */ jsx("ul", {
747
- className: clsx("univer-my-0 univer-box-border univer-grid univer-max-h-[310px] univer-w-[--radix-popper-anchor-width] univer-items-center univer-gap-1 univer-overflow-y-auto univer-overflow-x-hidden univer-rounded-lg univer-border univer-bg-white univer-p-1 univer-text-base univer-shadow-lg", scrollbarClassName),
1042
+ className: clsx("univer-my-0 univer-box-border univer-grid univer-max-h-[310px] univer-w-[--radix-popper-anchor-width] univer-items-center univer-gap-1 univer-overflow-y-auto univer-overflow-x-hidden univer-rounded-lg univer-border univer-bg-gray-0 univer-p-1 univer-text-base univer-shadow-lg", scrollbarClassName),
748
1043
  children: availableMenu.map((menuItem) => /* @__PURE__ */ jsxs("li", {
749
1044
  onClick: () => handleChangeColIndex(menuItem),
750
1045
  className: "univer-relative univer-box-border univer-flex univer-h-7 univer-cursor-pointer univer-list-none univer-items-center univer-justify-between univer-rounded univer-px-2 univer-text-sm univer-transition-all hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700",
@@ -757,7 +1052,7 @@ function SortOptionItem(props) {
757
1052
  open: visible,
758
1053
  onOpenChange: onVisibleChange,
759
1054
  children: /* @__PURE__ */ jsxs("div", {
760
- className: clsx("univer-ml-2 univer-flex univer-w-full univer-items-center univer-justify-between univer-overflow-hidden univer-rounded-md univer-py-1.5 univer-text-sm univer-text-gray-900 dark:!univer-text-white"),
1055
+ className: clsx("univer-ml-2 univer-flex univer-w-full univer-items-center univer-justify-between univer-overflow-hidden univer-rounded-md univer-py-1.5 univer-text-sm univer-text-gray-900 dark:!univer-text-gray-0"),
761
1056
  children: [/* @__PURE__ */ jsx("span", {
762
1057
  className: "univer-max-w-[220px] univer-truncate",
763
1058
  children: itemLabel
@@ -992,4 +1287,4 @@ UniverSheetsSortUIPlugin = __decorate([
992
1287
  ], UniverSheetsSortUIPlugin);
993
1288
 
994
1289
  //#endregion
995
- export { menuSchema as SheetsSortUIMenuSchema, SortRangeAscCommand, SortRangeAscExtCommand, SortRangeAscExtInCtxMenuCommand, SortRangeAscInCtxMenuCommand, SortRangeCustomCommand, SortRangeCustomInCtxMenuCommand, SortRangeDescCommand, SortRangeDescExtCommand, SortRangeDescExtInCtxMenuCommand, SortRangeDescInCtxMenuCommand, UniverSheetsSortUIPlugin };
1290
+ export { menuSchema as SheetsSortUIMenuSchema, SortRangeAscCommand, SortRangeAscExtCommand, SortRangeAscExtInCtxMenuCommand, SortRangeAscInCtxMenuCommand, SortRangeCustomCommand, SortRangeCustomInCtxMenuCommand, SortRangeDescCommand, SortRangeDescExtCommand, SortRangeDescExtInCtxMenuCommand, SortRangeDescInCtxMenuCommand, UniverSheetsSortMobileUIPlugin, UniverSheetsSortUIPlugin };
@@ -23,6 +23,7 @@ const locale = { "sheets-sort-ui": {
23
23
  "sort-reminder-no": "الاحتفاظ بنطاق الفرز",
24
24
  "first-row-check": "الصف الأول لا يشارك في الفرز",
25
25
  "add-condition": "إضافة شرط",
26
+ "delete-condition": "حذف الشرط",
26
27
  cancel: "إلغاء",
27
28
  confirm: "تأكيد"
28
29
  },
@@ -23,6 +23,7 @@ const locale = { "sheets-sort-ui": {
23
23
  "sort-reminder-no": "Mantenir l'interval d'ordenació",
24
24
  "first-row-check": "La primera fila no participa en l'ordenació",
25
25
  "add-condition": "Afegeix condició",
26
+ "delete-condition": "Suprimeix la condició",
26
27
  cancel: "Cancel·lar",
27
28
  confirm: "Confirmar"
28
29
  },
@@ -23,6 +23,7 @@ const locale = { "sheets-sort-ui": {
23
23
  "sort-reminder-no": "Bereichssortierung beibehalten",
24
24
  "first-row-check": "Erste Zeile nimmt nicht am Sortieren teil",
25
25
  "add-condition": "Bedingung hinzufügen",
26
+ "delete-condition": "Bedingung löschen",
26
27
  cancel: "Abbrechen",
27
28
  confirm: "Bestätigen"
28
29
  },
@@ -38,6 +38,7 @@ const locale = { "sheets-sort-ui": {
38
38
  "sort-reminder-no": "Keep range sorting",
39
39
  "first-row-check": "First row does not participate in sorting",
40
40
  "add-condition": "Add condition",
41
+ "delete-condition": "Delete condition",
41
42
  cancel: "Cancel",
42
43
  confirm: "Confirm"
43
44
  },
@@ -23,6 +23,7 @@ const locale = { "sheets-sort-ui": {
23
23
  "sort-reminder-no": "Mantener el rango de ordenación",
24
24
  "first-row-check": "La primera fila no participa en la ordenación",
25
25
  "add-condition": "Agregar condición",
26
+ "delete-condition": "Eliminar condición",
26
27
  cancel: "Cancelar",
27
28
  confirm: "Confirmar"
28
29
  },
@@ -23,6 +23,7 @@ const locale = { "sheets-sort-ui": {
23
23
  "sort-reminder-no": "حفظ مرتب‌سازی محدوده",
24
24
  "first-row-check": "ردیف اول در مرتب‌سازی شرکت نمی‌کند",
25
25
  "add-condition": "افزودن شرط",
26
+ "delete-condition": "حذف شرط",
26
27
  cancel: "انصراف",
27
28
  confirm: "تایید"
28
29
  },
@@ -23,6 +23,7 @@ const locale = { "sheets-sort-ui": {
23
23
  "sort-reminder-no": "Conserver le tri de la plage",
24
24
  "first-row-check": "La première ligne ne participe pas au tri",
25
25
  "add-condition": "Ajouter une condition",
26
+ "delete-condition": "Supprimer la condition",
26
27
  cancel: "Annuler",
27
28
  confirm: "Confirmer"
28
29
  },
@@ -23,6 +23,7 @@ const locale = { "sheets-sort-ui": {
23
23
  "sort-reminder-no": "Pertahankan pengurutan rentang",
24
24
  "first-row-check": "Baris pertama tidak ikut dalam pengurutan",
25
25
  "add-condition": "Tambah kondisi",
26
+ "delete-condition": "Hapus kondisi",
26
27
  cancel: "Batal",
27
28
  confirm: "Konfirmasi"
28
29
  },
@@ -23,6 +23,7 @@ const locale = { "sheets-sort-ui": {
23
23
  "sort-reminder-no": "Mantieni ordinamento intervallo",
24
24
  "first-row-check": "La prima riga non partecipa all'ordinamento",
25
25
  "add-condition": "Aggiungi condizione",
26
+ "delete-condition": "Elimina condizione",
26
27
  cancel: "Annulla",
27
28
  confirm: "Conferma"
28
29
  },
@@ -23,6 +23,7 @@ const locale = { "sheets-sort-ui": {
23
23
  "sort-reminder-no": "範囲を維持して並べ替え",
24
24
  "first-row-check": "先頭行を並べ替えの対象に含めない",
25
25
  "add-condition": "条件を追加",
26
+ "delete-condition": "条件を削除",
26
27
  cancel: "キャンセル",
27
28
  confirm: "確認"
28
29
  },
@@ -23,6 +23,7 @@ const locale = { "sheets-sort-ui": {
23
23
  "sort-reminder-no": "범위 정렬 유지",
24
24
  "first-row-check": "첫 번째 행은 정렬에 참여하지 않습니다",
25
25
  "add-condition": "조건 추가",
26
+ "delete-condition": "조건 삭제",
26
27
  cancel: "취소",
27
28
  confirm: "확인"
28
29
  },
@@ -23,6 +23,7 @@ const locale = { "sheets-sort-ui": {
23
23
  "sort-reminder-no": "Zachowaj sortowanie zakresu",
24
24
  "first-row-check": "Pierwszy wiersz nie bierze udziału w sortowaniu",
25
25
  "add-condition": "Dodaj warunek",
26
+ "delete-condition": "Usuń warunek",
26
27
  cancel: "Anuluj",
27
28
  confirm: "Potwierdź"
28
29
  },
@@ -23,6 +23,7 @@ const locale = { "sheets-sort-ui": {
23
23
  "sort-reminder-no": "Manter ordenação do intervalo",
24
24
  "first-row-check": "A primeira linha não participa da ordenação",
25
25
  "add-condition": "Adicionar condição",
26
+ "delete-condition": "Excluir condição",
26
27
  cancel: "Cancelar",
27
28
  confirm: "Confirmar"
28
29
  },
@@ -23,6 +23,7 @@ const locale = { "sheets-sort-ui": {
23
23
  "sort-reminder-no": "Оставить сортировку диапазона",
24
24
  "first-row-check": "Первая строка контента не участвует в сортировке",
25
25
  "add-condition": "Добавить условие",
26
+ "delete-condition": "Удалить условие",
26
27
  cancel: "Отмена",
27
28
  confirm: "Подтвердить"
28
29
  },
@@ -23,6 +23,7 @@ const locale = { "sheets-sort-ui": {
23
23
  "sort-reminder-no": "Zachovať triedenie rozsahu",
24
24
  "first-row-check": "Prvý riadok sa nezúčastňuje triedenia",
25
25
  "add-condition": "Pridať podmienku",
26
+ "delete-condition": "Odstrániť podmienku",
26
27
  cancel: "Zrušiť",
27
28
  confirm: "Potvrdiť"
28
29
  },
@@ -23,6 +23,7 @@ const locale = { "sheets-sort-ui": {
23
23
  "sort-reminder-no": "Giữ nguyên phạm vi sắp xếp được chọn",
24
24
  "first-row-check": "Hàng đầu tiên không tham gia sắp xếp",
25
25
  "add-condition": "Thêm điều kiện sắp xếp",
26
+ "delete-condition": "Xóa điều kiện",
26
27
  cancel: "Hủy bỏ",
27
28
  confirm: "Xác nhận"
28
29
  },
@@ -23,6 +23,7 @@ const locale = { "sheets-sort-ui": {
23
23
  "sort-reminder-no": "保持所选排序范围",
24
24
  "first-row-check": "标题不参与排序",
25
25
  "add-condition": "添加排序条件",
26
+ "delete-condition": "删除排序条件",
26
27
  cancel: "取消",
27
28
  confirm: "确认"
28
29
  },
@@ -23,6 +23,7 @@ const locale = { "sheets-sort-ui": {
23
23
  "sort-reminder-no": "保持所選排序範圍",
24
24
  "first-row-check": "標題不參與排序",
25
25
  "add-condition": "新增排序條件",
26
+ "delete-condition": "刪除排序條件",
26
27
  cancel: "取消",
27
28
  confirm: "確認"
28
29
  },
@@ -23,6 +23,7 @@ const locale = { "sheets-sort-ui": {
23
23
  "sort-reminder-no": "保持所選排序範圍",
24
24
  "first-row-check": "標題不參與排序",
25
25
  "add-condition": "新增排序條件",
26
+ "delete-condition": "刪除排序條件",
26
27
  cancel: "取消",
27
28
  confirm: "確認"
28
29
  },