@sheetxl/studio-mui 0.7.27 → 0.7.28-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/browser/cjs/BQJKf40kttQWOzLw.cjs +20 -0
- package/browser/cjs/BTZ5uzK0wHzpiZGC.cjs +1 -0
- package/browser/cjs/B_D3JKseVvpRyX-E.cjs +1 -0
- package/browser/cjs/B_WyRpeiesnEiNP4.cjs +11 -0
- package/browser/cjs/BeKpqOx8It0RD0Rf.cjs +2 -0
- package/browser/cjs/Bj-EvSYeDfqmU0V6.cjs +2 -0
- package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +1 -0
- package/browser/cjs/ByIEqNsvj52sihT9.cjs +5 -0
- package/browser/cjs/C3moehR3VOd0LnmM.cjs +1 -0
- package/browser/cjs/C97KHSuikAbr1qVM.cjs +1 -0
- package/browser/cjs/CJLwX_A3y3TQUmzj.cjs +1 -0
- package/browser/cjs/CPSc2VSYZeZ1B9mi.cjs +1 -0
- package/browser/cjs/CPcBvw4ZPwHVTUZF.cjs +1 -0
- package/browser/cjs/CZm1jVZaHQ246prW.cjs +1 -0
- package/browser/cjs/CdDYyAfccXme8w6m.cjs +1 -0
- package/browser/cjs/DBJLJGiCGXesx5n6.cjs +1 -0
- package/browser/cjs/DLScL5AOXhHu9O9H.cjs +7 -0
- package/browser/cjs/Djsiad0Qha1Y-YaS.cjs +1 -0
- package/browser/cjs/IASAYG6qgv7lJY7y.cjs +1 -0
- package/browser/cjs/KZvriGbhEOVkQD0b.cjs +1 -0
- package/browser/cjs/UnMhi28mbvLiOXQe.cjs +1 -0
- package/browser/cjs/Vbigo0kFP3PFfmeA.cjs +1 -0
- package/browser/cjs/iMWEL01eC83oU-YY.cjs +1 -0
- package/browser/cjs/index.cjs +2 -7
- package/browser/cjs/w2GjebPlOFv3pCbm.cjs +1 -0
- package/browser/cjs/zQsyZpeXAvcVXJMs.cjs +1 -0
- package/browser/esm/0EONOhVZ7oT0C_G2.mjs +1150 -0
- package/browser/esm/5x7evORpymnb5SfW.mjs +129 -0
- package/browser/esm/BACBR1jjcpJbhOWA.mjs +191 -0
- package/browser/esm/BPZne8WpzrkWOH6L.mjs +47 -0
- package/browser/esm/BeKa8xVj69hAVKRN.mjs +155 -0
- package/browser/esm/BeQ9bqOvNNP-arFP.mjs +219 -0
- package/browser/esm/Bf3PIOM6U-NmWk2O.mjs +20 -0
- package/browser/esm/C4BPDYeqgN59wMGp.mjs +411 -0
- package/browser/esm/CGbn_xdhgTvk2mvb.mjs +612 -0
- package/browser/esm/CKADOp3hTx0MSNY7.mjs +52 -0
- package/browser/esm/CR2sUEZyRqVv2SNl.mjs +105 -0
- package/browser/esm/CTN8J8c1AneJu3Lu.mjs +2207 -0
- package/browser/esm/Cc5akPEmIwbgKIfc.mjs +516 -0
- package/browser/esm/CePKCTL6D05kDy2E.mjs +82 -0
- package/browser/esm/DBM1blcMTZMAM-eR.mjs +217 -0
- package/browser/esm/DPBnKqhSuJ414Pxx.mjs +99 -0
- package/browser/esm/F51tGfYHocox80zY.mjs +468 -0
- package/browser/esm/SDzKpaiuhQux7tAh.mjs +5391 -0
- package/browser/esm/TDH9XceS8cAkO5d3.mjs +508 -0
- package/browser/esm/XKVlG-x_9q5dbVIW.mjs +8878 -0
- package/browser/esm/fJiwyUQJ18X-cCQz.mjs +1376 -0
- package/browser/esm/fel6EbPAcZOsBmks.mjs +42 -0
- package/browser/esm/flvjZEXrSDrtDzLB.mjs +113 -0
- package/browser/esm/index.mjs +152 -91
- package/licenses/dependencies.txt +137 -627
- package/node/esm/B9-0usA1hSoD0Nk3.mjs +679 -0
- package/node/esm/BO1vNzjGWYdZdbq9.mjs +113 -0
- package/node/esm/BYigefA8bf9FOVib.mjs +47 -0
- package/node/esm/BdrLZp98HQaVMykZ.mjs +82 -0
- package/node/esm/BlubX7gm8wTUNiZ-.mjs +106 -0
- package/node/esm/C8a6QwMGW1tMiWA6.mjs +516 -0
- package/node/esm/CCCnorMn30oUDDIY.mjs +4536 -0
- package/node/esm/CKpik3HRSANKEy4G.mjs +99 -0
- package/node/esm/CTZcfST8pUcLMail.mjs +509 -0
- package/node/esm/D1K9Ji7iQwnOnd1-.mjs +190 -0
- package/node/esm/DuUiuB59bQRPQi-D.mjs +155 -0
- package/node/esm/eKP73GEWmonTXpfv.mjs +470 -0
- package/node/esm/g3y8kxL1Ln214UNr.mjs +129 -0
- package/node/esm/index.mjs +10603 -2832
- package/package.json +27 -27
- package/resources/contents.json +30 -0
- package/resources/locales/contents.json +44 -0
- package/resources/locales/de/groups.cmd.json +219 -0
- package/resources/locales/de/studio.cmd.json +159 -0
- package/resources/locales/de/ui.msg.json +507 -0
- package/resources/locales/en/groups.cmd.json +219 -0
- package/resources/locales/en/studio.cmd.json +159 -0
- package/resources/locales/en/ui.msg.json +508 -0
- package/types/index.d.ts +2 -1761
- package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +131 -0
- package/types/src/anchorItems/AnchorItemsPanel.d.ts +29 -0
- package/types/src/anchorItems/index.d.ts +3 -0
- package/types/src/border/BorderPopupButton.d.ts +30 -0
- package/types/src/border/BorderStylePopupButton.d.ts +40 -0
- package/types/src/border/index.d.ts +3 -0
- package/types/src/chart/command/InsertChartCommandButton.d.ts +10 -0
- package/types/src/chart/command/index.d.ts +2 -0
- package/types/src/color/Alpha.d.ts +36 -0
- package/types/src/color/Checkboard.d.ts +11 -0
- package/types/src/color/CheckboardUtils.d.ts +3 -0
- package/types/src/color/ColorButton.d.ts +21 -0
- package/types/src/color/ColorButtonList.d.ts +17 -0
- package/types/src/color/ColorPanel.d.ts +71 -0
- package/types/src/color/ColorPopupButton.d.ts +29 -0
- package/types/src/color/CustomColorPanel.d.ts +16 -0
- package/types/src/color/EditableInput.d.ts +22 -0
- package/types/src/color/Hue.d.ts +29 -0
- package/types/src/color/Saturation.d.ts +45 -0
- package/types/src/color/SketchFields.d.ts +9 -0
- package/types/src/color/Swatch.d.ts +16 -0
- package/types/src/color/Types.d.ts +11 -0
- package/types/src/color/_Utils.d.ts +4 -0
- package/types/src/color/index.d.ts +7 -0
- package/types/src/command/AccountingStyleCommandButton.d.ts +18 -0
- package/types/src/command/AppearanceCommandButton.d.ts +3 -0
- package/types/src/command/BorderCommandButton.d.ts +20 -0
- package/types/src/command/ColorCommandButton.d.ts +23 -0
- package/types/src/command/DocThemeCommandButton.d.ts +19 -0
- package/types/src/command/FileCommandButton.d.ts +8 -0
- package/types/src/command/FontFamilyCommandButton.d.ts +9 -0
- package/types/src/command/FontSizeCommandButton.d.ts +21 -0
- package/types/src/command/InsertFunctionCommandPopupButton.d.ts +9 -0
- package/types/src/command/InsertFunctionSumCommandPopupButton.d.ts +8 -0
- package/types/src/command/LanguageCommandButton.d.ts +19 -0
- package/types/src/command/LocaleCommandButton.d.ts +17 -0
- package/types/src/command/NumberFormatCommandButton.d.ts +6 -0
- package/types/src/command/PasteCommandButton.d.ts +14 -0
- package/types/src/command/PresetCellStylesCommandButton.d.ts +11 -0
- package/types/src/command/PresetTableStylesCommandButton.d.ts +12 -0
- package/types/src/command/RegisterCatalog.d.ts +3 -0
- package/types/src/command/SheetCommandGroups.d.ts +10 -0
- package/types/src/command/SheetZoomCommandButton.d.ts +9 -0
- package/types/src/command/StudioCommandGroups.d.ts +11 -0
- package/types/src/command/TextEffectsCommandButton.d.ts +6 -0
- package/types/src/command/TextRotateGroupButton.d.ts +14 -0
- package/types/src/command/UndoRedoCommandButton.d.ts +14 -0
- package/types/src/command/WalkingCopyCommandButton.d.ts +6 -0
- package/types/src/command/WorkbookCommandGroups.d.ts +11 -0
- package/types/src/command/index.d.ts +23 -0
- package/types/src/conditionalFormat/ColorScaleRulePanel.d.ts +18 -0
- package/types/src/conditionalFormat/ConditionalFormatDetailsPanel.d.ts +23 -0
- package/types/src/conditionalFormat/ConditionalFormatDetailsTaskPane.d.ts +4 -0
- package/types/src/conditionalFormat/ConditionalFormatEditorPanel.d.ts +20 -0
- package/types/src/conditionalFormat/ConditionalFormatPlugin.d.ts +2 -0
- package/types/src/conditionalFormat/ConditionalFormatRangeField.d.ts +32 -0
- package/types/src/conditionalFormat/ConditionalFormatStylePicker.d.ts +34 -0
- package/types/src/conditionalFormat/ConditionalFormatTitle.d.ts +10 -0
- package/types/src/conditionalFormat/DataBarRulePanel.d.ts +23 -0
- package/types/src/conditionalFormat/IconSetRulePanel.d.ts +23 -0
- package/types/src/conditionalFormat/PresetChip.d.ts +30 -0
- package/types/src/conditionalFormat/PresetScalesCommandButton.d.ts +20 -0
- package/types/src/conditionalFormat/RulePreview.d.ts +23 -0
- package/types/src/conditionalFormat/RuleSection.d.ts +20 -0
- package/types/src/conditionalFormat/ScaleMiniGrid.d.ts +59 -0
- package/types/src/conditionalFormat/ScaleStopRow.d.ts +34 -0
- package/types/src/conditionalFormat/index.d.ts +3 -0
- package/types/src/conditionalFormat/previewColor.d.ts +50 -0
- package/types/src/conditions/AverageOption.d.ts +25 -0
- package/types/src/conditions/BetweenOption.d.ts +25 -0
- package/types/src/conditions/BooleanOption.d.ts +24 -0
- package/types/src/conditions/CombinatorOption.d.ts +41 -0
- package/types/src/conditions/ConditionEditor.d.ts +57 -0
- package/types/src/conditions/ConditionUtils.d.ts +83 -0
- package/types/src/conditions/DateTimeOption.d.ts +43 -0
- package/types/src/conditions/ExpressionOption.d.ts +26 -0
- package/types/src/conditions/InSetOption.d.ts +37 -0
- package/types/src/conditions/NumberOption.d.ts +24 -0
- package/types/src/conditions/OperatorAndParamEditor.d.ts +55 -0
- package/types/src/conditions/OperatorSelect.d.ts +35 -0
- package/types/src/conditions/OperatorSelectPopupButton.d.ts +39 -0
- package/types/src/conditions/ScalarOption.d.ts +29 -0
- package/types/src/conditions/SelectorSelect.d.ts +43 -0
- package/types/src/conditions/StringOption.d.ts +24 -0
- package/types/src/conditions/TimePeriodOption.d.ts +25 -0
- package/types/src/conditions/TopNOption.d.ts +25 -0
- package/types/src/conditions/index.d.ts +13 -0
- package/types/src/dataValidation/DataValidationDetailsPanel.d.ts +16 -0
- package/types/src/dataValidation/DataValidationDetailsTaskPane.d.ts +3 -0
- package/types/src/dataValidation/DataValidationEditorPanel.d.ts +12 -0
- package/types/src/dataValidation/DataValidationPlugin.d.ts +2 -0
- package/types/src/dataValidation/index.d.ts +2 -0
- package/types/src/debug/DebugUtils.d.ts +4 -0
- package/types/src/debug/index.d.ts +2 -0
- package/types/src/dialog/CommentsDialog.d.ts +11 -0
- package/types/src/dialog/FindReplaceWindow.d.ts +13 -0
- package/types/src/dialog/HyperlinkDialog.d.ts +28 -0
- package/types/src/dialog/InsertFunctionDialog.d.ts +25 -0
- package/types/src/dialog/NamedReferenceDialog.d.ts +17 -0
- package/types/src/dialog/NumberFormatDialog.d.ts +12 -0
- package/types/src/dialog/ResizeHeaderDialog.d.ts +15 -0
- package/types/src/dialog/ShortcutKeysDialog.d.ts +9 -0
- package/types/src/dialog/ShortcutKeysPanel.d.ts +28 -0
- package/types/src/dialog/SortDialog.d.ts +9 -0
- package/types/src/dialog/TableNewDialog.d.ts +14 -0
- package/types/src/dialog/WorkbookStatisticsDialog.d.ts +13 -0
- package/types/src/dialog/index.d.ts +10 -0
- package/types/src/filter/ColumnMenu.d.ts +13 -0
- package/types/src/filter/FilterList.d.ts +28 -0
- package/types/src/filter/index.d.ts +3 -0
- package/types/src/form/FormulaField.d.ts +221 -0
- package/types/src/form/InputField.d.ts +89 -0
- package/types/src/form/index.d.ts +3 -0
- package/types/src/formulaBar/FormulaBar.d.ts +8 -0
- package/types/src/formulaBar/IFormulaBar.d.ts +51 -0
- package/types/src/formulaBar/index.d.ts +3 -0
- package/types/src/function/FunctionArgumentsPanel.d.ts +57 -0
- package/types/src/function/FunctionSearchPanel.d.ts +35 -0
- package/types/src/function/InsertFunctionWizard.d.ts +79 -0
- package/types/src/function/index.d.ts +4 -0
- package/types/src/function/paneMetrics.d.ts +33 -0
- package/types/src/index.d.ts +21 -0
- package/types/src/itemsPanel/EditorPanel.d.ts +21 -0
- package/types/src/itemsPanel/ItemCard.d.ts +57 -0
- package/types/src/itemsPanel/ItemsDescriptor.d.ts +215 -0
- package/types/src/itemsPanel/ItemsPanel.d.ts +45 -0
- package/types/src/itemsPanel/SortableCards.d.ts +67 -0
- package/types/src/itemsPanel/index.d.ts +6 -0
- package/types/src/movable/MovableContextMenu.d.ts +13 -0
- package/types/src/movable/index.d.ts +2 -0
- package/types/src/named/INamedCollectionEditor.d.ts +37 -0
- package/types/src/named/NamedCollectionEditor.d.ts +7 -0
- package/types/src/named/NamedDetailsPanel.d.ts +11 -0
- package/types/src/named/NamedDetailsTaskPane.d.ts +3 -0
- package/types/src/named/NamedDraft.d.ts +68 -0
- package/types/src/named/NamedEditorPanel.d.ts +19 -0
- package/types/src/named/NamedPlugin.d.ts +2 -0
- package/types/src/named/index.d.ts +8 -0
- package/types/src/numberFormat/NumberFormatPanel.d.ts +29 -0
- package/types/src/numberFormat/NumberFormatTaskPane.d.ts +12 -0
- package/types/src/numberFormat/index.d.ts +8 -0
- package/types/src/protectedRange/ProtectedRangeDetailsPanel.d.ts +20 -0
- package/types/src/protectedRange/ProtectedRangeDetailsTaskPane.d.ts +3 -0
- package/types/src/protectedRange/ProtectedRangeEditorPanel.d.ts +27 -0
- package/types/src/protectedRange/ProtectedRangePlugin.d.ts +2 -0
- package/types/src/protectedRange/index.d.ts +2 -0
- package/types/src/protection/WorkbookProtectionDialog.d.ts +23 -0
- package/types/src/protection/WorkbookProtectionPanel.d.ts +51 -0
- package/types/src/protection/index.d.ts +3 -0
- package/types/src/sheet/SheetTabMenu.d.ts +21 -0
- package/types/src/sheet/SheetsAllMenu.d.ts +16 -0
- package/types/src/sheet/index.d.ts +3 -0
- package/types/src/statusBar/NumberStats.d.ts +27 -0
- package/types/src/statusBar/SheetZoomScale.d.ts +11 -0
- package/types/src/statusBar/StatusBar.d.ts +35 -0
- package/types/src/statusBar/index.d.ts +4 -0
- package/types/src/studio/CommandsWrapper.d.ts +36 -0
- package/types/src/studio/DefaultLogo.d.ts +3 -0
- package/types/src/studio/EagerStudio.d.ts +5 -0
- package/types/src/studio/Studio.d.ts +26 -0
- package/types/src/studio/StudioCommandProvider.d.ts +26 -0
- package/types/src/studio/StudioCommands.d.ts +115 -0
- package/types/src/studio/StudioNotifierProvider.d.ts +10 -0
- package/types/src/studio/StudioProps.d.ts +372 -0
- package/types/src/studio/StudioSplitPane.d.ts +60 -0
- package/types/src/studio/StudioTaskPaneArea.d.ts +8 -0
- package/types/src/studio/StudioToolbar.d.ts +37 -0
- package/types/src/studio/index.d.ts +4 -0
- package/types/src/studio/useStudioApp.d.ts +51 -0
- package/types/src/table/TableDetailsPanel.d.ts +17 -0
- package/types/src/table/TableDetailsTaskPane.d.ts +3 -0
- package/types/src/table/TablePlugin.d.ts +2 -0
- package/types/src/table/TableStyleCanvasPreview.d.ts +21 -0
- package/types/src/table/TableStyleOptionsPanel.d.ts +38 -0
- package/types/src/table/TableStylePreview.d.ts +43 -0
- package/types/src/table/index.d.ts +7 -0
- package/types/src/theme/ThemeSelectButton.d.ts +23 -0
- package/types/src/theme/ThemeSelectPanel.d.ts +17 -0
- package/types/src/theme/ThemeSelectPopupButton.d.ts +24 -0
- package/types/src/theme/ThemeUtils.d.ts +57 -0
- package/types/src/theme/index.d.ts +5 -0
- package/types/src/toast/ToastError.d.ts +10 -0
- package/types/src/toast/index.d.ts +2 -0
- package/types/src/toolbar/WorkbookToolbars.d.ts +46 -0
- package/types/src/toolbar/index.d.ts +2 -0
- package/types/src/workbook/DefaultRenderers.d.ts +23 -0
- package/types/src/workbook/DocumentTitle.d.ts +69 -0
- package/types/src/workbook/WorkbookContextMenu.d.ts +13 -0
- package/types/src/workbook/WorkbookElement.d.ts +12 -0
- package/types/src/workbook/WorkbookStrip.d.ts +37 -0
- package/types/src/workbook/index.d.ts +7 -0
- package/browser/cjs/0DtrpXkQQehBmvSv.cjs +0 -6
- package/browser/cjs/6C3ia2nz4Zm-AdMZ.cjs +0 -7
- package/browser/cjs/BR_EGEaHisRrXAtK.cjs +0 -6
- package/browser/cjs/B_v_M4TiavtofChs.cjs +0 -42
- package/browser/cjs/C17p-h_nw582H7WD.cjs +0 -20
- package/browser/cjs/CInmVysdoHEvvW9h.cjs +0 -6
- package/browser/cjs/CMvQZPQsE7MuTMy_.cjs +0 -6
- package/browser/cjs/CkNt54AXVfJjIWja.cjs +0 -6
- package/browser/cjs/CtRvyhDzQxsk7dkI.cjs +0 -6
- package/browser/cjs/DN9cQ4_4ERQvzKn6.cjs +0 -6
- package/browser/cjs/DUTuBWUNF-w3Fxtb.cjs +0 -6
- package/browser/cjs/pTzEs1wlZj5Bb6xc.cjs +0 -18
- package/browser/esm/8ZnwcsRrGO3Nlw9Y.mjs +0 -54
- package/browser/esm/BFZ4oCbQukelEVLI.mjs +0 -53
- package/browser/esm/BP3nTf4-SLftsj61.mjs +0 -640
- package/browser/esm/BSMkBkXBQgZhX1xk.mjs +0 -2159
- package/browser/esm/CPLIJbynjEkwF2T0.mjs +0 -4533
- package/browser/esm/CuC13VFjBYFE7kub.mjs +0 -155
- package/browser/esm/Cw3i8T1tVnm8o6eB.mjs +0 -46
- package/browser/esm/D6E8W2KK4dGVRQO_.mjs +0 -25
- package/browser/esm/D8xc3AM9QHEqmpb9.mjs +0 -50
- package/browser/esm/DA_bEpA5kkn89fmW.mjs +0 -2411
- package/browser/esm/DVqOr-7nEXA7IjKJ.mjs +0 -26
- package/browser/esm/VAUOzclLs-dR9nt_.mjs +0 -50
- package/node/assets/style.css +0 -1
- package/node/esm/B9dvpdCD_p2q8aNP.mjs +0 -156
- package/node/esm/BBxZemzbmUkoOYdq.mjs +0 -46
- package/node/esm/BDdkV45Cf7BLs5jE.mjs +0 -25
- package/node/esm/BoX8OuVRgUNgw0Wb.mjs +0 -91
- package/node/esm/CPbwVoL6mq66TtTR.mjs +0 -53
- package/node/esm/DMd6h1vz-USluank.mjs +0 -88
- package/node/esm/DYgtaT_soTbSP8M9.mjs +0 -52
- package/node/esm/DxDGSRoOYlWydiwL.mjs +0 -57
- package/node/esm/OMgXBbHk-VRNKAop.mjs +0 -26
- package/node/esm/bGXLfLFngllNb8U1.mjs +0 -50
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.28-beta.1
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import { n as e, r as t, t as n } from "./CTN8J8c1AneJu3Lu.mjs";
|
|
8
|
+
import { IRange as r, ISort as i, Sort as a } from "@sheetxl/sdk";
|
|
9
|
+
import { DynamicIcon as o, useCallbackRef as s, useTranslator as ee } from "@sheetxl/utils-react";
|
|
10
|
+
import { memo as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
11
|
+
import { OptionsDialog as f, SimpleTooltip as p } from "@sheetxl/utils-mui";
|
|
12
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
13
|
+
import { Box as g, Checkbox as _, FormControl as v, FormControlLabel as y, IconButton as b, InputLabel as x, MenuItem as S, Select as C, Typography as w } from "@mui/material";
|
|
14
|
+
var T = {
|
|
15
|
+
width: "64px",
|
|
16
|
+
flex: "0 0 auto"
|
|
17
|
+
}, E = {
|
|
18
|
+
flex: "1 1 0",
|
|
19
|
+
minWidth: "120px"
|
|
20
|
+
}, D = {
|
|
21
|
+
flex: "1 1 0",
|
|
22
|
+
minWidth: "140px"
|
|
23
|
+
}, O = {
|
|
24
|
+
width: "34px",
|
|
25
|
+
flex: "0 0 auto",
|
|
26
|
+
display: "flex",
|
|
27
|
+
justifyContent: "center"
|
|
28
|
+
}, k = {
|
|
29
|
+
minWidth: "112px",
|
|
30
|
+
flex: "0 0 auto",
|
|
31
|
+
display: "flex",
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
justifyContent: "flex-end"
|
|
34
|
+
}, A = {
|
|
35
|
+
color: (e) => e.palette.text.secondary,
|
|
36
|
+
fontWeight: 500,
|
|
37
|
+
paddingLeft: "14px"
|
|
38
|
+
}, j = {
|
|
39
|
+
display: "flex",
|
|
40
|
+
alignItems: "center",
|
|
41
|
+
gap: (e) => e.spacing(1),
|
|
42
|
+
padding: (e) => e.spacing(.75, 1),
|
|
43
|
+
border: (e) => `1px solid ${e.palette.divider}`,
|
|
44
|
+
borderRadius: (e) => e.spacing(1.25)
|
|
45
|
+
}, M = (e) => {
|
|
46
|
+
let t = e, n = "";
|
|
47
|
+
for (; t >= 0;) n = String.fromCharCode(65 + t % 26) + n, t = Math.floor(t / 26) - 1;
|
|
48
|
+
return n;
|
|
49
|
+
}, N = 0, P = () => "level-" + N++, F = (e) => e?.sensitivity === a.CaseSensitiveOptions.sensitivity, I = c((i) => {
|
|
50
|
+
let { initialValue: c, context: N, onInput: I, onDone: R, ...te } = i, z = ee(), B = u(N?.()), V = B.current?.range, H = B.current?.cell, [U, W] = d(() => ({
|
|
51
|
+
...a.DefaultRangeOptions,
|
|
52
|
+
...c
|
|
53
|
+
})), [G, K] = d(() => {
|
|
54
|
+
let e = c?.sorts ?? [], t = [];
|
|
55
|
+
for (let n = 0; n < e.length; n++) t.push({
|
|
56
|
+
key: P(),
|
|
57
|
+
index: e[n].index ?? n,
|
|
58
|
+
criteria: { ...e[n].criteria }
|
|
59
|
+
});
|
|
60
|
+
return t.length === 0 && t.push({
|
|
61
|
+
key: P(),
|
|
62
|
+
index: 0,
|
|
63
|
+
criteria: {}
|
|
64
|
+
}), t;
|
|
65
|
+
}), q = U.axis ?? r.Axis.Row, J = q === r.Axis.Row, Y = u(null), X = u(!1);
|
|
66
|
+
t(Y, !0, X);
|
|
67
|
+
let Z = l(() => {
|
|
68
|
+
let e = [], t = [], n = V?.getDefaultSortCriteria(q, H);
|
|
69
|
+
if (!n) return {
|
|
70
|
+
labels: e,
|
|
71
|
+
offsets: t
|
|
72
|
+
};
|
|
73
|
+
let r = n.coords, i = J ? r.colEnd - r.colStart + 1 : r.rowEnd - r.rowStart + 1, a = Math.min(i, 500);
|
|
74
|
+
for (let i = 0; i < a; i++) {
|
|
75
|
+
let a = U.hasHeader ? n.headers?.get(i) : void 0;
|
|
76
|
+
t.push(i), e.push(a || (J ? z("sort.columnLabel", { name: M(r.colStart + i) }) : z("sort.rowLabel", { name: `${r.rowStart + i + 1}` })));
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
labels: e,
|
|
80
|
+
offsets: t
|
|
81
|
+
};
|
|
82
|
+
}, [
|
|
83
|
+
V,
|
|
84
|
+
H,
|
|
85
|
+
q,
|
|
86
|
+
J,
|
|
87
|
+
U.hasHeader,
|
|
88
|
+
z
|
|
89
|
+
]), Q = s((e) => {
|
|
90
|
+
let t = Z.offsets.indexOf(e);
|
|
91
|
+
return t === -1 ? J ? z("sort.columnLabel", { name: M(e) }) : z("sort.rowLabel", { name: `${e + 1}` }) : Z.labels[t];
|
|
92
|
+
}, [
|
|
93
|
+
Z,
|
|
94
|
+
J,
|
|
95
|
+
z
|
|
96
|
+
]), $ = l(() => {
|
|
97
|
+
let e = Z.offsets.length;
|
|
98
|
+
if (e > 0 && G.length > e) return z("sort.tooManyLevels", { count: `${e}` });
|
|
99
|
+
let t = /* @__PURE__ */ new Set();
|
|
100
|
+
for (let e = 0; e < G.length; e++) {
|
|
101
|
+
if (t.has(G[e].index)) return z("sort.duplicateField", { name: Q(G[e].index) });
|
|
102
|
+
t.add(G[e].index);
|
|
103
|
+
}
|
|
104
|
+
return null;
|
|
105
|
+
}, [
|
|
106
|
+
G,
|
|
107
|
+
Z,
|
|
108
|
+
Q,
|
|
109
|
+
z
|
|
110
|
+
]), ne = s((e, t) => {
|
|
111
|
+
K((n) => n.map((n) => n.key === e ? {
|
|
112
|
+
...n,
|
|
113
|
+
...t
|
|
114
|
+
} : n));
|
|
115
|
+
}, []), re = s((e, t, n) => {
|
|
116
|
+
n && (X.current = !0), K((n) => {
|
|
117
|
+
if (t < 0 || t >= n.length) return n;
|
|
118
|
+
let r = [...n];
|
|
119
|
+
return r.splice(t, 0, ...r.splice(e, 1)), r;
|
|
120
|
+
});
|
|
121
|
+
}, []), ie = s((e) => {
|
|
122
|
+
let t;
|
|
123
|
+
if (e === "Sort") {
|
|
124
|
+
let e = G.map((e) => {
|
|
125
|
+
let t = { ...e.criteria };
|
|
126
|
+
return delete t.collatorOptions, {
|
|
127
|
+
index: e.index,
|
|
128
|
+
criteria: t
|
|
129
|
+
};
|
|
130
|
+
});
|
|
131
|
+
t = {
|
|
132
|
+
...c,
|
|
133
|
+
...U,
|
|
134
|
+
reverse: G[0]?.criteria.reverse ?? U.reverse,
|
|
135
|
+
sorts: e
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
I?.(t), R?.(t);
|
|
139
|
+
}, [
|
|
140
|
+
G,
|
|
141
|
+
U,
|
|
142
|
+
R,
|
|
143
|
+
I,
|
|
144
|
+
c
|
|
145
|
+
]), ae = l(() => G.map((e) => e.key), [G]);
|
|
146
|
+
return m(f, {
|
|
147
|
+
title: z("sort.title"),
|
|
148
|
+
options: [{
|
|
149
|
+
id: "Sort",
|
|
150
|
+
label: () => z("sort.action"),
|
|
151
|
+
disabled: () => $ !== null
|
|
152
|
+
}, "Cancel"],
|
|
153
|
+
onDone: ie,
|
|
154
|
+
...te,
|
|
155
|
+
children: h(g, {
|
|
156
|
+
sx: {
|
|
157
|
+
display: "flex",
|
|
158
|
+
flexDirection: "column",
|
|
159
|
+
gap: (e) => e.spacing(1.5),
|
|
160
|
+
minWidth: "560px"
|
|
161
|
+
},
|
|
162
|
+
children: [
|
|
163
|
+
h(g, {
|
|
164
|
+
sx: {
|
|
165
|
+
display: "flex",
|
|
166
|
+
flexDirection: "column"
|
|
167
|
+
},
|
|
168
|
+
children: [m(g, {
|
|
169
|
+
sx: { padding: (e) => e.spacing(0, .5) },
|
|
170
|
+
children: h(g, {
|
|
171
|
+
sx: {
|
|
172
|
+
...j,
|
|
173
|
+
borderColor: "transparent",
|
|
174
|
+
paddingTop: 0,
|
|
175
|
+
paddingBottom: 0
|
|
176
|
+
},
|
|
177
|
+
children: [
|
|
178
|
+
m(g, { sx: T }),
|
|
179
|
+
m(w, {
|
|
180
|
+
variant: "body2",
|
|
181
|
+
sx: {
|
|
182
|
+
...E,
|
|
183
|
+
...A
|
|
184
|
+
},
|
|
185
|
+
children: z(J ? "sort.column" : "sort.row")
|
|
186
|
+
}),
|
|
187
|
+
m(w, {
|
|
188
|
+
variant: "body2",
|
|
189
|
+
sx: {
|
|
190
|
+
...D,
|
|
191
|
+
...A
|
|
192
|
+
},
|
|
193
|
+
children: z("sort.sortOn")
|
|
194
|
+
}),
|
|
195
|
+
m(w, {
|
|
196
|
+
variant: "body2",
|
|
197
|
+
sx: {
|
|
198
|
+
...O,
|
|
199
|
+
...A,
|
|
200
|
+
paddingLeft: 0
|
|
201
|
+
},
|
|
202
|
+
children: z("sort.order")
|
|
203
|
+
}),
|
|
204
|
+
m(g, { sx: k })
|
|
205
|
+
]
|
|
206
|
+
})
|
|
207
|
+
}), h(g, {
|
|
208
|
+
ref: Y,
|
|
209
|
+
sx: {
|
|
210
|
+
display: "flex",
|
|
211
|
+
flexDirection: "column",
|
|
212
|
+
gap: (e) => e.spacing(.75),
|
|
213
|
+
padding: (e) => e.spacing(.5),
|
|
214
|
+
maxHeight: "320px",
|
|
215
|
+
overflowY: "auto"
|
|
216
|
+
},
|
|
217
|
+
children: [m(e, {
|
|
218
|
+
ids: ae,
|
|
219
|
+
scrollRef: Y,
|
|
220
|
+
onMove: (e, t) => re(e, t, !0),
|
|
221
|
+
children: G.map((e, t) => m(n, {
|
|
222
|
+
id: e.key,
|
|
223
|
+
children: m(L, {
|
|
224
|
+
level: e,
|
|
225
|
+
position: t,
|
|
226
|
+
count: G.length,
|
|
227
|
+
fields: Z,
|
|
228
|
+
labelForField: Q,
|
|
229
|
+
isRowSort: J,
|
|
230
|
+
onChange: ne,
|
|
231
|
+
onMoveBy: (e) => re(t, t + e, !1),
|
|
232
|
+
onDuplicate: () => {
|
|
233
|
+
K((n) => {
|
|
234
|
+
let r = [...n];
|
|
235
|
+
return r.splice(t + 1, 0, {
|
|
236
|
+
...e,
|
|
237
|
+
key: P(),
|
|
238
|
+
criteria: { ...e.criteria }
|
|
239
|
+
}), r;
|
|
240
|
+
});
|
|
241
|
+
},
|
|
242
|
+
onDelete: () => K((t) => t.filter((t) => t.key !== e.key))
|
|
243
|
+
})
|
|
244
|
+
}, e.key))
|
|
245
|
+
}), h(g, {
|
|
246
|
+
sx: {
|
|
247
|
+
...j,
|
|
248
|
+
borderColor: "transparent",
|
|
249
|
+
flex: "0 0 auto",
|
|
250
|
+
paddingTop: 0,
|
|
251
|
+
paddingBottom: 0
|
|
252
|
+
},
|
|
253
|
+
children: [m(w, {
|
|
254
|
+
variant: "body2",
|
|
255
|
+
sx: {
|
|
256
|
+
...T,
|
|
257
|
+
color: (e) => e.palette.text.secondary
|
|
258
|
+
},
|
|
259
|
+
children: z("sort.thenBy")
|
|
260
|
+
}), m(p, {
|
|
261
|
+
disableInteractive: !0,
|
|
262
|
+
title: z("sort.addLevel"),
|
|
263
|
+
children: m(b, {
|
|
264
|
+
size: "small",
|
|
265
|
+
className: "sxl-sort-addLevel",
|
|
266
|
+
"aria-label": z("sort.addLevel"),
|
|
267
|
+
onClick: () => {
|
|
268
|
+
K((e) => {
|
|
269
|
+
let t = new Set(e.map((e) => e.index)), n = Z.offsets.find((e) => !t.has(e));
|
|
270
|
+
return [...e, {
|
|
271
|
+
key: P(),
|
|
272
|
+
index: n ?? 0,
|
|
273
|
+
criteria: {}
|
|
274
|
+
}];
|
|
275
|
+
});
|
|
276
|
+
},
|
|
277
|
+
children: m(o, { iconKey: "Insert" })
|
|
278
|
+
})
|
|
279
|
+
})]
|
|
280
|
+
})]
|
|
281
|
+
})]
|
|
282
|
+
}),
|
|
283
|
+
$ === null ? null : m(w, {
|
|
284
|
+
variant: "body2",
|
|
285
|
+
className: "sxl-sort-refusal",
|
|
286
|
+
sx: { color: (e) => e.palette.error.main },
|
|
287
|
+
children: $
|
|
288
|
+
}),
|
|
289
|
+
h(g, {
|
|
290
|
+
sx: {
|
|
291
|
+
display: "flex",
|
|
292
|
+
flexWrap: "wrap",
|
|
293
|
+
alignItems: "center",
|
|
294
|
+
columnGap: (e) => e.spacing(2),
|
|
295
|
+
rowGap: (e) => e.spacing(1.5),
|
|
296
|
+
borderTop: (e) => `1px solid ${e.palette.divider}`,
|
|
297
|
+
paddingTop: (e) => e.spacing(1)
|
|
298
|
+
},
|
|
299
|
+
children: [
|
|
300
|
+
m(y, {
|
|
301
|
+
control: m(_, {
|
|
302
|
+
size: "small",
|
|
303
|
+
checked: !!U.hasHeader,
|
|
304
|
+
onChange: () => W((e) => ({
|
|
305
|
+
...e,
|
|
306
|
+
hasHeader: !e.hasHeader
|
|
307
|
+
}))
|
|
308
|
+
}),
|
|
309
|
+
label: z("sort.hasHeader")
|
|
310
|
+
}),
|
|
311
|
+
m(y, {
|
|
312
|
+
control: m(_, {
|
|
313
|
+
size: "small",
|
|
314
|
+
checked: F(U.collatorOptions),
|
|
315
|
+
onChange: () => W((e) => ({
|
|
316
|
+
...e,
|
|
317
|
+
collatorOptions: F(e.collatorOptions) ? a.CaseInsensitiveOptions : a.CaseSensitiveOptions
|
|
318
|
+
}))
|
|
319
|
+
}),
|
|
320
|
+
label: z("sort.caseSensitive")
|
|
321
|
+
}),
|
|
322
|
+
m(y, {
|
|
323
|
+
control: m(_, {
|
|
324
|
+
size: "small",
|
|
325
|
+
checked: !!U.includeHidden,
|
|
326
|
+
onChange: () => W((e) => ({
|
|
327
|
+
...e,
|
|
328
|
+
includeHidden: !e.includeHidden
|
|
329
|
+
}))
|
|
330
|
+
}),
|
|
331
|
+
label: z("sort.includeHidden")
|
|
332
|
+
}),
|
|
333
|
+
h(v, {
|
|
334
|
+
size: "small",
|
|
335
|
+
sx: { minWidth: "180px" },
|
|
336
|
+
children: [m(x, {
|
|
337
|
+
id: "sxl-sort-orientation-label",
|
|
338
|
+
children: z("sort.orientation")
|
|
339
|
+
}), h(C, {
|
|
340
|
+
size: "small",
|
|
341
|
+
className: "sxl-sort-orientation",
|
|
342
|
+
labelId: "sxl-sort-orientation-label",
|
|
343
|
+
label: z("sort.orientation"),
|
|
344
|
+
value: q,
|
|
345
|
+
onChange: (e) => {
|
|
346
|
+
let t = e.target.value;
|
|
347
|
+
W((e) => ({
|
|
348
|
+
...e,
|
|
349
|
+
axis: t
|
|
350
|
+
}));
|
|
351
|
+
},
|
|
352
|
+
children: [m(S, {
|
|
353
|
+
value: r.Axis.Row,
|
|
354
|
+
children: z("sort.orientationTopToBottom")
|
|
355
|
+
}), m(S, {
|
|
356
|
+
value: r.Axis.Column,
|
|
357
|
+
children: z("sort.orientationLeftToRight")
|
|
358
|
+
})]
|
|
359
|
+
})]
|
|
360
|
+
})
|
|
361
|
+
]
|
|
362
|
+
})
|
|
363
|
+
]
|
|
364
|
+
})
|
|
365
|
+
});
|
|
366
|
+
}), L = c((e) => {
|
|
367
|
+
let { level: t, position: n, count: r, fields: a, labelForField: s, isRowSort: c, onChange: u, onMoveBy: d, onDuplicate: f, onDelete: _ } = e, v = ee(), y = t.criteria.sortOn ?? i.SortOn.Value, x = !!t.criteria.reverse, A = l(() => {
|
|
368
|
+
let e = a.offsets.map((e, t) => ({
|
|
369
|
+
offset: e,
|
|
370
|
+
label: a.labels[t]
|
|
371
|
+
}));
|
|
372
|
+
return a.offsets.includes(t.index) || e.push({
|
|
373
|
+
offset: t.index,
|
|
374
|
+
label: s(t.index)
|
|
375
|
+
}), e;
|
|
376
|
+
}, [
|
|
377
|
+
a,
|
|
378
|
+
t.index,
|
|
379
|
+
s
|
|
380
|
+
]), M = (e, t, n, r, i) => m(p, {
|
|
381
|
+
disableInteractive: !0,
|
|
382
|
+
title: e,
|
|
383
|
+
children: m("div", { children: m(b, {
|
|
384
|
+
size: "small",
|
|
385
|
+
className: `sxl-sort-${t}`,
|
|
386
|
+
"aria-label": e,
|
|
387
|
+
disabled: r,
|
|
388
|
+
sx: { padding: "2px" },
|
|
389
|
+
onClick: i,
|
|
390
|
+
children: m(o, {
|
|
391
|
+
style: { transform: "scale(0.85)" },
|
|
392
|
+
iconKey: n
|
|
393
|
+
})
|
|
394
|
+
}) })
|
|
395
|
+
});
|
|
396
|
+
return h(g, {
|
|
397
|
+
sx: {
|
|
398
|
+
...j,
|
|
399
|
+
"&:hover, &:focus-within": {
|
|
400
|
+
boxShadow: 1,
|
|
401
|
+
"& .sxl-sort-level-actions": {
|
|
402
|
+
opacity: 1,
|
|
403
|
+
pointerEvents: "auto"
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
children: [
|
|
408
|
+
m(w, {
|
|
409
|
+
variant: "body2",
|
|
410
|
+
sx: T,
|
|
411
|
+
children: v(n === 0 ? "sort.sortBy" : "sort.thenBy")
|
|
412
|
+
}),
|
|
413
|
+
m(C, {
|
|
414
|
+
size: "small",
|
|
415
|
+
className: "sxl-sort-field",
|
|
416
|
+
value: t.index,
|
|
417
|
+
sx: E,
|
|
418
|
+
"aria-label": v(c ? "sort.column" : "sort.row"),
|
|
419
|
+
onChange: (e) => u(t.key, { index: Number(e.target.value) }),
|
|
420
|
+
children: A.map((e) => m(S, {
|
|
421
|
+
value: e.offset,
|
|
422
|
+
children: e.label
|
|
423
|
+
}, e.offset))
|
|
424
|
+
}),
|
|
425
|
+
h(C, {
|
|
426
|
+
size: "small",
|
|
427
|
+
className: "sxl-sort-on",
|
|
428
|
+
value: y,
|
|
429
|
+
sx: D,
|
|
430
|
+
"aria-label": v("sort.sortOn"),
|
|
431
|
+
onChange: (e) => {
|
|
432
|
+
u(t.key, { criteria: {
|
|
433
|
+
...t.criteria,
|
|
434
|
+
sortOn: e.target.value
|
|
435
|
+
} });
|
|
436
|
+
},
|
|
437
|
+
children: [
|
|
438
|
+
m(S, {
|
|
439
|
+
value: i.SortOn.Value,
|
|
440
|
+
children: v("sort.sortOnValue")
|
|
441
|
+
}),
|
|
442
|
+
h(S, {
|
|
443
|
+
value: i.SortOn.FillColor,
|
|
444
|
+
disabled: !0,
|
|
445
|
+
children: [v("sort.sortOnFillColor"), m(w, {
|
|
446
|
+
variant: "caption",
|
|
447
|
+
sx: {
|
|
448
|
+
marginLeft: 1,
|
|
449
|
+
opacity: .7
|
|
450
|
+
},
|
|
451
|
+
children: v("sort.notSupported")
|
|
452
|
+
})]
|
|
453
|
+
}),
|
|
454
|
+
h(S, {
|
|
455
|
+
value: i.SortOn.FontColor,
|
|
456
|
+
disabled: !0,
|
|
457
|
+
children: [v("sort.sortOnFontColor"), m(w, {
|
|
458
|
+
variant: "caption",
|
|
459
|
+
sx: {
|
|
460
|
+
marginLeft: 1,
|
|
461
|
+
opacity: .7
|
|
462
|
+
},
|
|
463
|
+
children: v("sort.notSupported")
|
|
464
|
+
})]
|
|
465
|
+
}),
|
|
466
|
+
h(S, {
|
|
467
|
+
value: i.SortOn.Icon,
|
|
468
|
+
disabled: !0,
|
|
469
|
+
children: [v("sort.sortOnIcon"), m(w, {
|
|
470
|
+
variant: "caption",
|
|
471
|
+
sx: {
|
|
472
|
+
marginLeft: 1,
|
|
473
|
+
opacity: .7
|
|
474
|
+
},
|
|
475
|
+
children: v("sort.notSupported")
|
|
476
|
+
})]
|
|
477
|
+
})
|
|
478
|
+
]
|
|
479
|
+
}),
|
|
480
|
+
m(g, {
|
|
481
|
+
sx: O,
|
|
482
|
+
children: m(p, {
|
|
483
|
+
disableInteractive: !0,
|
|
484
|
+
title: v(x ? "sort.descending" : "sort.ascending"),
|
|
485
|
+
children: m(b, {
|
|
486
|
+
size: "small",
|
|
487
|
+
className: "sxl-sort-order",
|
|
488
|
+
"aria-label": v(x ? "sort.descending" : "sort.ascending"),
|
|
489
|
+
onClick: () => u(t.key, { criteria: {
|
|
490
|
+
...t.criteria,
|
|
491
|
+
reverse: !x
|
|
492
|
+
} }),
|
|
493
|
+
children: m(o, { iconKey: x ? "SortDecrease" : "SortIncrease" })
|
|
494
|
+
})
|
|
495
|
+
})
|
|
496
|
+
}),
|
|
497
|
+
h(g, {
|
|
498
|
+
className: "sxl-sort-level-actions",
|
|
499
|
+
sx: {
|
|
500
|
+
...k,
|
|
501
|
+
opacity: 0,
|
|
502
|
+
pointerEvents: "none",
|
|
503
|
+
transition: "opacity 0.2s ease"
|
|
504
|
+
},
|
|
505
|
+
children: [
|
|
506
|
+
M(v("sort.moveUp"), "moveUp", "CardMoveUp", n === 0, () => d(-1)),
|
|
507
|
+
M(v("sort.moveDown"), "moveDown", "CardMoveDown", n === r - 1, () => d(1)),
|
|
508
|
+
M(v("sort.copyLevel"), "copyLevel", "CardDuplicate", !1, f),
|
|
509
|
+
M(v("sort.deleteLevel"), "deleteLevel", "Delete", r <= 1, _)
|
|
510
|
+
]
|
|
511
|
+
})
|
|
512
|
+
]
|
|
513
|
+
});
|
|
514
|
+
});
|
|
515
|
+
L.displayName = "SortLevelCard";
|
|
516
|
+
export { I as SortDialog, I as default };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.28-beta.1
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import { n as e } from "./DBM1blcMTZMAM-eR.mjs";
|
|
8
|
+
import { useReferenceMode as t } from "@sheetxl/react";
|
|
9
|
+
import { useCallbackRef as n, useTranslator as r } from "@sheetxl/utils-react";
|
|
10
|
+
import { memo as i, useCallback as a, useMemo as o, useState as s } from "react";
|
|
11
|
+
import { OptionsDialog as c } from "@sheetxl/utils-mui";
|
|
12
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
13
|
+
import { Box as d, Checkbox as f, FormControlLabel as p } from "@mui/material";
|
|
14
|
+
var m = ["Ok", "Cancel"], h = i((i) => {
|
|
15
|
+
let { onInput: h, onOption: g, onValidateOption: _, onDone: v, options: y = m, defaultOption: b = y?.[0], cancelOption: x = "Cancel", sx: S, initialValue: C, context: w, ...T } = i, E = r(), [D, O] = s(!1), [k, A] = s(() => C?.hasHeader ?? !1), [j, M] = s(() => C?.ranges ?? null), N = o(() => {
|
|
16
|
+
let e = C?.ranges?.getSheet?.()?.getName();
|
|
17
|
+
return e ? { scope: e } : void 0;
|
|
18
|
+
}, [C]), P = t().getMode()?.mode === "point", F = n((e) => {
|
|
19
|
+
let t = j ? {
|
|
20
|
+
...C,
|
|
21
|
+
hasHeader: k,
|
|
22
|
+
ranges: j
|
|
23
|
+
} : null, n = e === x || !e;
|
|
24
|
+
h?.(!n && t ? t : void 0), g?.(e ?? x, n, e === b), v?.({
|
|
25
|
+
option: e,
|
|
26
|
+
tableOptions: t
|
|
27
|
+
});
|
|
28
|
+
}, [
|
|
29
|
+
v,
|
|
30
|
+
g,
|
|
31
|
+
b,
|
|
32
|
+
x,
|
|
33
|
+
k,
|
|
34
|
+
j,
|
|
35
|
+
C
|
|
36
|
+
]), I = a(async (e, t) => !0, []);
|
|
37
|
+
return l(c, {
|
|
38
|
+
title: E("tableNew.title"),
|
|
39
|
+
options: y,
|
|
40
|
+
onDone: F,
|
|
41
|
+
onValidateOption: I,
|
|
42
|
+
defaultOption: b,
|
|
43
|
+
cancelOption: x,
|
|
44
|
+
autoFocusSel: ".autoFocus",
|
|
45
|
+
suspendModal: P,
|
|
46
|
+
sx: {
|
|
47
|
+
width: "360px",
|
|
48
|
+
...S
|
|
49
|
+
},
|
|
50
|
+
...T,
|
|
51
|
+
children: u(d, {
|
|
52
|
+
sx: {
|
|
53
|
+
paddingTop: (e) => e.spacing(1),
|
|
54
|
+
paddingBottom: (e) => e.spacing(0),
|
|
55
|
+
rowGap: (e) => e.spacing(1),
|
|
56
|
+
display: "flex",
|
|
57
|
+
flexDirection: "column"
|
|
58
|
+
},
|
|
59
|
+
children: [l(e, {
|
|
60
|
+
grammar: "reference",
|
|
61
|
+
classNameInput: "autoFocus",
|
|
62
|
+
formName: "range",
|
|
63
|
+
value: j,
|
|
64
|
+
allowMulti: !1,
|
|
65
|
+
allowCrossSheet: !1,
|
|
66
|
+
home: N,
|
|
67
|
+
onChangeInput: (e) => M(e?.getReferences() ?? null),
|
|
68
|
+
onFocus: (e) => {
|
|
69
|
+
D || e.target?.select(), O(!0);
|
|
70
|
+
}
|
|
71
|
+
}), l(p, {
|
|
72
|
+
control: l(f, {
|
|
73
|
+
checked: k,
|
|
74
|
+
onChange: () => A(!k)
|
|
75
|
+
}),
|
|
76
|
+
label: E("tableNew.hasHeaders"),
|
|
77
|
+
labelPlacement: "end"
|
|
78
|
+
})]
|
|
79
|
+
})
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
export { h as TableNewDialog, h as default };
|