@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,219 @@
|
|
|
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 { useTranslator as e } from "@sheetxl/utils-react";
|
|
8
|
+
import { forwardRef as t, memo as n, useState as r } from "react";
|
|
9
|
+
import { OptionsDialog as i } from "@sheetxl/utils-mui";
|
|
10
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
11
|
+
import { Box as s, Checkbox as c, FormControlLabel as l, TextField as u, Typography as d } from "@mui/material";
|
|
12
|
+
var f = Object.defineProperty, p = (e, t) => {
|
|
13
|
+
let n = {};
|
|
14
|
+
for (var r in e) f(n, r, {
|
|
15
|
+
get: e[r],
|
|
16
|
+
enumerable: !0
|
|
17
|
+
});
|
|
18
|
+
return t || f(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
19
|
+
}, m = "•".repeat(8), h = (t) => {
|
|
20
|
+
let { password: n, onChange: i, disabled: c, required: l, labelPassword: d, labelConfirm: f, onValidityChange: p } = t, h = e(), [g, _] = r(""), v = n !== null, y = v && g !== n, b = (e, t) => {
|
|
21
|
+
let n = e !== null;
|
|
22
|
+
p(!(n && t !== e || l && n && e === ""));
|
|
23
|
+
};
|
|
24
|
+
return o(s, {
|
|
25
|
+
sx: {
|
|
26
|
+
display: "flex",
|
|
27
|
+
flexDirection: "column",
|
|
28
|
+
gap: (e) => e.spacing(1.5),
|
|
29
|
+
paddingLeft: 4
|
|
30
|
+
},
|
|
31
|
+
children: [a(u, {
|
|
32
|
+
type: "password",
|
|
33
|
+
size: "small",
|
|
34
|
+
label: d,
|
|
35
|
+
disabled: c,
|
|
36
|
+
value: n ?? m,
|
|
37
|
+
error: l && v && n === "",
|
|
38
|
+
onFocus: (e) => {
|
|
39
|
+
n === null && e.target.select();
|
|
40
|
+
},
|
|
41
|
+
onChange: (e) => {
|
|
42
|
+
let t = e.target.value === m ? null : e.target.value;
|
|
43
|
+
i(t), b(t, g);
|
|
44
|
+
},
|
|
45
|
+
slotProps: {
|
|
46
|
+
inputLabel: { shrink: !0 },
|
|
47
|
+
htmlInput: {
|
|
48
|
+
autoComplete: "new-password",
|
|
49
|
+
spellCheck: !1
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}), a(u, {
|
|
53
|
+
type: "password",
|
|
54
|
+
size: "small",
|
|
55
|
+
label: f,
|
|
56
|
+
disabled: c || !v,
|
|
57
|
+
value: v ? g : m,
|
|
58
|
+
error: y,
|
|
59
|
+
helperText: y ? h("protection.passwordMismatch") : " ",
|
|
60
|
+
onChange: (e) => {
|
|
61
|
+
_(e.target.value), b(n, e.target.value);
|
|
62
|
+
},
|
|
63
|
+
slotProps: {
|
|
64
|
+
inputLabel: { shrink: !0 },
|
|
65
|
+
htmlInput: {
|
|
66
|
+
autoComplete: "new-password",
|
|
67
|
+
spellCheck: !1
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
})]
|
|
71
|
+
});
|
|
72
|
+
}, g = n(t((t, n) => {
|
|
73
|
+
let { value: i, onChange: u, onValidityChange: f, sx: p } = t, m = e(), [g, _] = r(!0), [v, y] = r(!0), b = (e, t) => {
|
|
74
|
+
f?.((!i.encrypt || e) && (!i.structure || t));
|
|
75
|
+
}, x = (e) => {
|
|
76
|
+
u({
|
|
77
|
+
...i,
|
|
78
|
+
...e
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
return o(s, {
|
|
82
|
+
ref: n,
|
|
83
|
+
sx: {
|
|
84
|
+
display: "flex",
|
|
85
|
+
flexDirection: "column",
|
|
86
|
+
gap: (e) => e.spacing(2.5),
|
|
87
|
+
...p
|
|
88
|
+
},
|
|
89
|
+
children: [o(s, {
|
|
90
|
+
sx: {
|
|
91
|
+
display: "flex",
|
|
92
|
+
flexDirection: "column",
|
|
93
|
+
gap: (e) => e.spacing(1)
|
|
94
|
+
},
|
|
95
|
+
children: [
|
|
96
|
+
a(l, {
|
|
97
|
+
control: a(c, {
|
|
98
|
+
checked: i.encrypt,
|
|
99
|
+
onChange: (e) => {
|
|
100
|
+
let t = e.target.checked;
|
|
101
|
+
x({
|
|
102
|
+
encrypt: t,
|
|
103
|
+
encryptPassword: t ? i.encryptPassword ?? "" : i.encryptPassword
|
|
104
|
+
}), f?.((!t || g) && (!i.structure || v));
|
|
105
|
+
}
|
|
106
|
+
}),
|
|
107
|
+
label: m("protection.encrypt.label")
|
|
108
|
+
}),
|
|
109
|
+
a(h, {
|
|
110
|
+
password: i.encryptPassword,
|
|
111
|
+
onChange: (e) => x({ encryptPassword: e }),
|
|
112
|
+
disabled: !i.encrypt,
|
|
113
|
+
required: !0,
|
|
114
|
+
labelPassword: m("protection.password"),
|
|
115
|
+
labelConfirm: m("protection.passwordConfirm"),
|
|
116
|
+
onValidityChange: (e) => {
|
|
117
|
+
_(e), b(e, v);
|
|
118
|
+
}
|
|
119
|
+
}),
|
|
120
|
+
a(d, {
|
|
121
|
+
variant: "caption",
|
|
122
|
+
sx: {
|
|
123
|
+
paddingLeft: 4,
|
|
124
|
+
color: "warning.main"
|
|
125
|
+
},
|
|
126
|
+
children: m("protection.encrypt.warning")
|
|
127
|
+
})
|
|
128
|
+
]
|
|
129
|
+
}), o(s, {
|
|
130
|
+
sx: {
|
|
131
|
+
display: "flex",
|
|
132
|
+
flexDirection: "column",
|
|
133
|
+
gap: (e) => e.spacing(1)
|
|
134
|
+
},
|
|
135
|
+
children: [
|
|
136
|
+
a(l, {
|
|
137
|
+
control: a(c, {
|
|
138
|
+
checked: i.structure,
|
|
139
|
+
onChange: (e) => {
|
|
140
|
+
let t = e.target.checked;
|
|
141
|
+
x({ structure: t }), f?.((!i.encrypt || g) && (!t || v));
|
|
142
|
+
}
|
|
143
|
+
}),
|
|
144
|
+
label: m("protection.structure.label")
|
|
145
|
+
}),
|
|
146
|
+
a(h, {
|
|
147
|
+
password: i.structurePassword,
|
|
148
|
+
onChange: (e) => x({ structurePassword: e }),
|
|
149
|
+
disabled: !i.structure,
|
|
150
|
+
required: !1,
|
|
151
|
+
labelPassword: m("protection.passwordOptional"),
|
|
152
|
+
labelConfirm: m("protection.passwordConfirm"),
|
|
153
|
+
onValidityChange: (e) => {
|
|
154
|
+
y(e), b(g, e);
|
|
155
|
+
}
|
|
156
|
+
}),
|
|
157
|
+
o(s, {
|
|
158
|
+
sx: {
|
|
159
|
+
display: "flex",
|
|
160
|
+
gap: (e) => e.spacing(2),
|
|
161
|
+
paddingLeft: 4
|
|
162
|
+
},
|
|
163
|
+
children: [a(l, {
|
|
164
|
+
control: a(c, {
|
|
165
|
+
size: "small",
|
|
166
|
+
disabled: !i.structure,
|
|
167
|
+
checked: i.lockStructure,
|
|
168
|
+
onChange: (e) => x({ lockStructure: e.target.checked })
|
|
169
|
+
}),
|
|
170
|
+
label: m("protection.structure.lockStructure")
|
|
171
|
+
}), a(l, {
|
|
172
|
+
control: a(c, {
|
|
173
|
+
size: "small",
|
|
174
|
+
disabled: !i.structure,
|
|
175
|
+
checked: i.lockWindows,
|
|
176
|
+
onChange: (e) => x({ lockWindows: e.target.checked })
|
|
177
|
+
}),
|
|
178
|
+
label: m("protection.structure.lockWindows")
|
|
179
|
+
})]
|
|
180
|
+
}),
|
|
181
|
+
a(d, {
|
|
182
|
+
variant: "caption",
|
|
183
|
+
sx: {
|
|
184
|
+
paddingLeft: 4,
|
|
185
|
+
color: "text.secondary"
|
|
186
|
+
},
|
|
187
|
+
children: m("protection.structure.note")
|
|
188
|
+
})
|
|
189
|
+
]
|
|
190
|
+
})]
|
|
191
|
+
});
|
|
192
|
+
})), _ = p({
|
|
193
|
+
WorkbookProtectionDialog: () => v,
|
|
194
|
+
default: () => v
|
|
195
|
+
}), v = (t) => {
|
|
196
|
+
let n = e(), { initialValue: o, onApply: s, title: c = n("protection.title"), sx: l, ...u } = t, [d, f] = r(o), [p, m] = r(!0);
|
|
197
|
+
return a(i, {
|
|
198
|
+
title: c,
|
|
199
|
+
options: ["Ok", "Cancel"],
|
|
200
|
+
defaultOption: "Ok",
|
|
201
|
+
cancelOption: "Cancel",
|
|
202
|
+
sx: {
|
|
203
|
+
width: "440px",
|
|
204
|
+
...l
|
|
205
|
+
},
|
|
206
|
+
onValidateOption: (e) => p,
|
|
207
|
+
onOption: (e, t) => {
|
|
208
|
+
if (!t && e === "Ok") return s(d);
|
|
209
|
+
},
|
|
210
|
+
...u,
|
|
211
|
+
children: a(g, {
|
|
212
|
+
value: d,
|
|
213
|
+
onChange: f,
|
|
214
|
+
onValidityChange: m,
|
|
215
|
+
sx: { paddingTop: 1 }
|
|
216
|
+
})
|
|
217
|
+
});
|
|
218
|
+
};
|
|
219
|
+
export { _ as n, g as r, v as t };
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
function e(t) {
|
|
8
|
+
var n, r, i = "";
|
|
9
|
+
if (typeof t == "string" || typeof t == "number") i += t;
|
|
10
|
+
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
11
|
+
var a = t.length;
|
|
12
|
+
for (n = 0; n < a; n++) t[n] && (r = e(t[n])) && (i && (i += " "), i += r);
|
|
13
|
+
} else for (r in t) t[r] && (i && (i += " "), i += r);
|
|
14
|
+
return i;
|
|
15
|
+
}
|
|
16
|
+
function t() {
|
|
17
|
+
for (var t, n, r = 0, i = "", a = arguments.length; r < a; r++) (t = arguments[r]) && (n = e(t)) && (i && (i += " "), i += n);
|
|
18
|
+
return i;
|
|
19
|
+
}
|
|
20
|
+
export { t };
|
|
@@ -0,0 +1,411 @@
|
|
|
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 { t as e } from "./Bf3PIOM6U-NmWk2O.mjs";
|
|
8
|
+
import { NumberFormat as t } from "@sheetxl/sdk";
|
|
9
|
+
import { useCallbackRef as n, useTranslator as r } from "@sheetxl/utils-react";
|
|
10
|
+
import { forwardRef as i, memo as a, useEffect as o, useState as ee, version as s } from "react";
|
|
11
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
12
|
+
import { Box as d, Checkbox as f, FormControl as te, FormControlLabel as p, InputLabel as m, List as h, ListItemButton as g, ListItemText as _, MenuItem as v, Select as y, TextField as b, Typography as x } from "@mui/material";
|
|
13
|
+
function S(e, t) {
|
|
14
|
+
if (typeof e == "function") return e(t);
|
|
15
|
+
e && (e.current = t);
|
|
16
|
+
}
|
|
17
|
+
var C = parseInt(s.split(".")[0], 10) >= 19 ? function(e) {
|
|
18
|
+
return (t) => {
|
|
19
|
+
let n = [];
|
|
20
|
+
for (let r of e) {
|
|
21
|
+
let e = S(r, t), i = typeof e == "function";
|
|
22
|
+
n.push(i ? e : () => S(r, null));
|
|
23
|
+
}
|
|
24
|
+
return () => {
|
|
25
|
+
for (let e of n) e();
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
} : function(e) {
|
|
29
|
+
return (t) => {
|
|
30
|
+
for (let n of e) S(n, t);
|
|
31
|
+
};
|
|
32
|
+
}, { Builder: w } = t, T = {
|
|
33
|
+
py: "2px",
|
|
34
|
+
px: 1,
|
|
35
|
+
minHeight: 0,
|
|
36
|
+
"& .MuiListItemText-root": { my: 0 },
|
|
37
|
+
"& .MuiListItemText-primary": {
|
|
38
|
+
fontSize: "0.8125rem",
|
|
39
|
+
lineHeight: 1.5
|
|
40
|
+
},
|
|
41
|
+
"& .MuiListItemText-secondary": {
|
|
42
|
+
fontSize: "0.7rem",
|
|
43
|
+
lineHeight: 1.3
|
|
44
|
+
}
|
|
45
|
+
}, E = {
|
|
46
|
+
border: (e) => `1px solid ${e.palette.divider}`,
|
|
47
|
+
borderRadius: (e) => `${e.shape.borderRadius}px`,
|
|
48
|
+
overflow: "auto"
|
|
49
|
+
};
|
|
50
|
+
function D(e, t, n) {
|
|
51
|
+
switch (t) {
|
|
52
|
+
case "minus": return e("numberFormat.negMinus");
|
|
53
|
+
case "red": return e("numberFormat.negRed");
|
|
54
|
+
case "parens": return e("numberFormat.negParens");
|
|
55
|
+
case "redParens": return e("numberFormat.negRedParens");
|
|
56
|
+
default: return n;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function O(e, t) {
|
|
60
|
+
switch (t) {
|
|
61
|
+
case "General": return e("numberFormat.catGeneral");
|
|
62
|
+
case "Number": return e("numberFormat.catNumber");
|
|
63
|
+
case "Currency": return e("numberFormat.catCurrency");
|
|
64
|
+
case "Accounting": return e("numberFormat.catAccounting");
|
|
65
|
+
case "Date": return e("numberFormat.catDate");
|
|
66
|
+
case "Time": return e("numberFormat.catTime");
|
|
67
|
+
case "Percentage": return e("numberFormat.catPercentage");
|
|
68
|
+
case "Fraction": return e("numberFormat.catFraction");
|
|
69
|
+
case "Scientific": return e("numberFormat.catScientific");
|
|
70
|
+
case "Text": return e("numberFormat.catText");
|
|
71
|
+
case "Special": return e("numberFormat.catSpecial");
|
|
72
|
+
case "Custom": return e("numberFormat.catCustom");
|
|
73
|
+
default: return t;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function k(e, n, r) {
|
|
77
|
+
try {
|
|
78
|
+
return r ? r.createCell({
|
|
79
|
+
value: n,
|
|
80
|
+
style: { numberFormat: e }
|
|
81
|
+
}).getNumberFormat().displayText || "" : t.getEngine().format(e, n, {}).text ?? "";
|
|
82
|
+
} catch {
|
|
83
|
+
return "";
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
var A = a(i((i, a) => {
|
|
87
|
+
let { value: s, onChange: S, context: A, onCommit: j, disabled: M = !1, className: N, onKeyDown: P, ...F } = i, I = r(), [L, R] = ee(() => w.parse(s));
|
|
88
|
+
o(() => {
|
|
89
|
+
w.build(L) !== s && R(w.parse(s));
|
|
90
|
+
}, [s]);
|
|
91
|
+
let z = A?.() ?? null, B = n((e) => {
|
|
92
|
+
R(e), S(w.build(e));
|
|
93
|
+
}, [S]), V = n((e) => {
|
|
94
|
+
B({
|
|
95
|
+
...L,
|
|
96
|
+
...e
|
|
97
|
+
});
|
|
98
|
+
}, [L, B]), H = n((e) => {
|
|
99
|
+
if (e === L.category) return;
|
|
100
|
+
let t = w.defaultCodeForCategory(e), n = w.isParametricCategory(e) ? w.parse(t) : {
|
|
101
|
+
category: e,
|
|
102
|
+
code: t
|
|
103
|
+
};
|
|
104
|
+
B(n);
|
|
105
|
+
}, [L.category, B]), U = n((e) => {
|
|
106
|
+
if (P?.(e), e.key === "Enter") {
|
|
107
|
+
if (e.target.closest("[role=\"combobox\"]")) return;
|
|
108
|
+
e.preventDefault(), e.stopPropagation(), j?.();
|
|
109
|
+
}
|
|
110
|
+
}, [P, j]), W = (e, t, n) => (r) => {
|
|
111
|
+
let i = t;
|
|
112
|
+
switch (r.key) {
|
|
113
|
+
case "ArrowDown":
|
|
114
|
+
i = Math.min(e - 1, t + 1);
|
|
115
|
+
break;
|
|
116
|
+
case "ArrowUp":
|
|
117
|
+
i = Math.max(0, t - 1);
|
|
118
|
+
break;
|
|
119
|
+
case "Home":
|
|
120
|
+
i = 0;
|
|
121
|
+
break;
|
|
122
|
+
case "End":
|
|
123
|
+
i = e - 1;
|
|
124
|
+
break;
|
|
125
|
+
default: return;
|
|
126
|
+
}
|
|
127
|
+
r.preventDefault(), i !== t && i >= 0 && n(i), r.currentTarget.querySelectorAll(".MuiListItemButton-root")[i]?.focus();
|
|
128
|
+
}, G = L.category, K = function(e, t, n) {
|
|
129
|
+
let r = t?.getValue();
|
|
130
|
+
return e === "Text" ? typeof r == "string" ? r : n : e === "Date" || e === "Time" ? typeof r == "number" ? r : 45658.625 : typeof r == "number" ? r : 1234.56;
|
|
131
|
+
}(G, z, I("numberFormat.sampleText")), q = k(s, K, z), J = l(b, {
|
|
132
|
+
label: I("numberFormat.decimalPlaces"),
|
|
133
|
+
type: "number",
|
|
134
|
+
size: "small",
|
|
135
|
+
disabled: M,
|
|
136
|
+
value: L.decimalPlaces ?? 0,
|
|
137
|
+
onChange: (e) => {
|
|
138
|
+
let t = Math.max(0, Math.min(30, parseInt(e.target.value, 10) || 0));
|
|
139
|
+
V({ decimalPlaces: t });
|
|
140
|
+
},
|
|
141
|
+
slotProps: {
|
|
142
|
+
htmlInput: {
|
|
143
|
+
min: 0,
|
|
144
|
+
max: 30
|
|
145
|
+
},
|
|
146
|
+
inputLabel: { shrink: !0 }
|
|
147
|
+
},
|
|
148
|
+
sx: { width: 140 }
|
|
149
|
+
}), Y = u(te, {
|
|
150
|
+
size: "small",
|
|
151
|
+
sx: { width: 140 },
|
|
152
|
+
children: [l(m, {
|
|
153
|
+
shrink: !0,
|
|
154
|
+
children: I("numberFormat.symbol")
|
|
155
|
+
}), l(y, {
|
|
156
|
+
label: I("numberFormat.symbol"),
|
|
157
|
+
notched: !0,
|
|
158
|
+
disabled: M,
|
|
159
|
+
value: L.currencySymbol ?? "$",
|
|
160
|
+
onChange: (e) => V({ currencySymbol: e.target.value }),
|
|
161
|
+
children: w.CURRENCY_SYMBOLS.map((e) => l(v, {
|
|
162
|
+
value: e,
|
|
163
|
+
children: e
|
|
164
|
+
}, e))
|
|
165
|
+
})]
|
|
166
|
+
}), ne = l(p, {
|
|
167
|
+
sx: { alignSelf: "center" },
|
|
168
|
+
control: l(f, {
|
|
169
|
+
size: "small",
|
|
170
|
+
disabled: M,
|
|
171
|
+
checked: !!L.useSeparator,
|
|
172
|
+
onChange: (e) => V({ useSeparator: e.target.checked })
|
|
173
|
+
}),
|
|
174
|
+
label: I("numberFormat.useSeparator")
|
|
175
|
+
}), X = u(d, {
|
|
176
|
+
sx: {
|
|
177
|
+
display: "flex",
|
|
178
|
+
flexDirection: "column",
|
|
179
|
+
minHeight: 0,
|
|
180
|
+
flex: "1 1 auto"
|
|
181
|
+
},
|
|
182
|
+
children: [l(x, {
|
|
183
|
+
variant: "caption",
|
|
184
|
+
component: "div",
|
|
185
|
+
sx: { mb: .5 },
|
|
186
|
+
children: I("numberFormat.negativeNumbers")
|
|
187
|
+
}), l(h, {
|
|
188
|
+
dense: !0,
|
|
189
|
+
disablePadding: !0,
|
|
190
|
+
sx: {
|
|
191
|
+
...E,
|
|
192
|
+
flex: "1 1 auto"
|
|
193
|
+
},
|
|
194
|
+
onKeyDown: W(w.NEGATIVE_STYLES.length, L.negativeStyle ?? 0, (e) => V({ negativeStyle: e })),
|
|
195
|
+
children: w.NEGATIVE_STYLES.map((e, t) => {
|
|
196
|
+
let n = k(w.build({
|
|
197
|
+
...L,
|
|
198
|
+
negativeStyle: t
|
|
199
|
+
}), -function(e) {
|
|
200
|
+
return typeof e == "number" ? Math.abs(e) : 1234.56;
|
|
201
|
+
}(K), z);
|
|
202
|
+
return l(g, {
|
|
203
|
+
disabled: M,
|
|
204
|
+
selected: (L.negativeStyle ?? 0) === t,
|
|
205
|
+
onClick: () => V({ negativeStyle: t }),
|
|
206
|
+
sx: T,
|
|
207
|
+
children: l(_, {
|
|
208
|
+
primary: n || D(I, e.key, e.label),
|
|
209
|
+
slotProps: { primary: {
|
|
210
|
+
noWrap: !0,
|
|
211
|
+
sx: {
|
|
212
|
+
color: e.red ? "error.main" : void 0,
|
|
213
|
+
fontVariantNumeric: "tabular-nums"
|
|
214
|
+
}
|
|
215
|
+
} }
|
|
216
|
+
})
|
|
217
|
+
}, e.key);
|
|
218
|
+
})
|
|
219
|
+
})]
|
|
220
|
+
}), Z = (e, t) => l(h, {
|
|
221
|
+
dense: !0,
|
|
222
|
+
disablePadding: !0,
|
|
223
|
+
sx: {
|
|
224
|
+
...E,
|
|
225
|
+
flex: "1 1 auto"
|
|
226
|
+
},
|
|
227
|
+
onKeyDown: W(e.length, e.indexOf(s), (t) => B({
|
|
228
|
+
category: G,
|
|
229
|
+
code: e[t]
|
|
230
|
+
})),
|
|
231
|
+
children: e.map((e) => l(g, {
|
|
232
|
+
disabled: M,
|
|
233
|
+
selected: s === e,
|
|
234
|
+
onClick: () => B({
|
|
235
|
+
category: G,
|
|
236
|
+
code: e
|
|
237
|
+
}),
|
|
238
|
+
sx: T,
|
|
239
|
+
children: l(_, {
|
|
240
|
+
primary: t?.[e] ?? k(e, K, z) ?? e,
|
|
241
|
+
secondary: t ? e : void 0,
|
|
242
|
+
slotProps: {
|
|
243
|
+
primary: { noWrap: !0 },
|
|
244
|
+
secondary: { noWrap: !0 }
|
|
245
|
+
}
|
|
246
|
+
})
|
|
247
|
+
}, e))
|
|
248
|
+
}), re = l(b, {
|
|
249
|
+
label: I("numberFormat.typeCode"),
|
|
250
|
+
size: "small",
|
|
251
|
+
fullWidth: !0,
|
|
252
|
+
disabled: M,
|
|
253
|
+
value: s,
|
|
254
|
+
error: !!s && !t.Parser.isValidFormat(s),
|
|
255
|
+
helperText: s && !t.Parser.isValidFormat(s) ? I("numberFormat.invalidCode") : " ",
|
|
256
|
+
onChange: (e) => B({
|
|
257
|
+
category: "Custom",
|
|
258
|
+
code: e.target.value
|
|
259
|
+
}),
|
|
260
|
+
slotProps: {
|
|
261
|
+
inputLabel: { shrink: !0 },
|
|
262
|
+
htmlInput: {
|
|
263
|
+
spellCheck: !1,
|
|
264
|
+
autoComplete: "off"
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}), Q = (e) => l(d, {
|
|
268
|
+
sx: {
|
|
269
|
+
display: "flex",
|
|
270
|
+
flexWrap: "wrap",
|
|
271
|
+
gap: 1.5,
|
|
272
|
+
alignItems: "flex-start"
|
|
273
|
+
},
|
|
274
|
+
children: e
|
|
275
|
+
}), $;
|
|
276
|
+
switch (G) {
|
|
277
|
+
case "General":
|
|
278
|
+
$ = l(x, {
|
|
279
|
+
variant: "body2",
|
|
280
|
+
children: I("numberFormat.generalInfo")
|
|
281
|
+
});
|
|
282
|
+
break;
|
|
283
|
+
case "Number":
|
|
284
|
+
$ = u(c, { children: [Q(u(c, { children: [J, ne] })), X] });
|
|
285
|
+
break;
|
|
286
|
+
case "Currency":
|
|
287
|
+
$ = u(c, { children: [Q(u(c, { children: [J, Y] })), X] });
|
|
288
|
+
break;
|
|
289
|
+
case "Accounting":
|
|
290
|
+
$ = u(c, { children: [Q(u(c, { children: [J, Y] })), l(x, {
|
|
291
|
+
variant: "caption",
|
|
292
|
+
color: "text.secondary",
|
|
293
|
+
children: I("numberFormat.accountingInfo")
|
|
294
|
+
})] });
|
|
295
|
+
break;
|
|
296
|
+
case "Percentage":
|
|
297
|
+
case "Scientific":
|
|
298
|
+
$ = J;
|
|
299
|
+
break;
|
|
300
|
+
case "Date":
|
|
301
|
+
$ = Z(w.DATE_PRESETS);
|
|
302
|
+
break;
|
|
303
|
+
case "Time":
|
|
304
|
+
$ = Z(w.TIME_PRESETS);
|
|
305
|
+
break;
|
|
306
|
+
case "Fraction":
|
|
307
|
+
$ = Z(w.FRACTION_PRESETS, ((e) => ({
|
|
308
|
+
"# ?/?": e("numberFormat.fractionOneDigit"),
|
|
309
|
+
"# ??/??": e("numberFormat.fractionTwoDigits"),
|
|
310
|
+
"# ???/???": e("numberFormat.fractionThreeDigits"),
|
|
311
|
+
"# ?/2": e("numberFormat.fractionHalves"),
|
|
312
|
+
"# ?/4": e("numberFormat.fractionQuarters"),
|
|
313
|
+
"# ?/8": e("numberFormat.fractionEighths"),
|
|
314
|
+
"# ??/16": e("numberFormat.fractionSixteenths"),
|
|
315
|
+
"# ?/10": e("numberFormat.fractionTenths"),
|
|
316
|
+
"# ??/100": e("numberFormat.fractionHundredths")
|
|
317
|
+
}))(I));
|
|
318
|
+
break;
|
|
319
|
+
case "Special":
|
|
320
|
+
$ = Z(w.SPECIAL_PRESETS, ((e) => ({
|
|
321
|
+
"00000": e("numberFormat.specialZip"),
|
|
322
|
+
"00000-0000": e("numberFormat.specialZip4"),
|
|
323
|
+
"[<=9999999]###-####;(###) ###-####": e("numberFormat.specialPhone"),
|
|
324
|
+
"000-00-0000": e("numberFormat.specialSsn")
|
|
325
|
+
}))(I));
|
|
326
|
+
break;
|
|
327
|
+
case "Text":
|
|
328
|
+
$ = l(x, {
|
|
329
|
+
variant: "body2",
|
|
330
|
+
children: I("numberFormat.textInfo")
|
|
331
|
+
});
|
|
332
|
+
break;
|
|
333
|
+
case "Custom":
|
|
334
|
+
$ = u(c, { children: [re, Z(w.DATE_PRESETS.concat(w.TIME_PRESETS))] });
|
|
335
|
+
break;
|
|
336
|
+
default: $ = null;
|
|
337
|
+
}
|
|
338
|
+
return u(d, {
|
|
339
|
+
ref: C([a]),
|
|
340
|
+
className: e("sxl-number-format-panel", N),
|
|
341
|
+
onKeyDown: U,
|
|
342
|
+
sx: {
|
|
343
|
+
display: "flex",
|
|
344
|
+
flexDirection: "column",
|
|
345
|
+
gap: 1.25
|
|
346
|
+
},
|
|
347
|
+
...F,
|
|
348
|
+
children: [u(d, { children: [l(x, {
|
|
349
|
+
variant: "caption",
|
|
350
|
+
component: "div",
|
|
351
|
+
sx: { pl: .5 },
|
|
352
|
+
children: I("numberFormat.sample")
|
|
353
|
+
}), l(x, {
|
|
354
|
+
variant: "body1",
|
|
355
|
+
component: "div",
|
|
356
|
+
sx: {
|
|
357
|
+
borderRadius: (e) => `${e.shape.borderRadius}px`,
|
|
358
|
+
padding: (e) => e.spacing(1),
|
|
359
|
+
border: (e) => `1px solid ${e.palette.divider}`,
|
|
360
|
+
minHeight: "1.6em",
|
|
361
|
+
fontVariantNumeric: "tabular-nums",
|
|
362
|
+
overflow: "hidden",
|
|
363
|
+
textOverflow: "ellipsis",
|
|
364
|
+
whiteSpace: "nowrap"
|
|
365
|
+
},
|
|
366
|
+
children: q || " "
|
|
367
|
+
})] }), u(d, {
|
|
368
|
+
sx: {
|
|
369
|
+
display: "flex",
|
|
370
|
+
gap: 1.5,
|
|
371
|
+
height: 296
|
|
372
|
+
},
|
|
373
|
+
children: [l(h, {
|
|
374
|
+
dense: !0,
|
|
375
|
+
disablePadding: !0,
|
|
376
|
+
sx: {
|
|
377
|
+
...E,
|
|
378
|
+
width: 112,
|
|
379
|
+
flex: "0 0 auto"
|
|
380
|
+
},
|
|
381
|
+
onKeyDown: W(w.CATEGORIES.length, w.CATEGORIES.indexOf(G), (e) => H(w.CATEGORIES[e])),
|
|
382
|
+
children: w.CATEGORIES.map((t) => l(g, {
|
|
383
|
+
className: e("sxl-nf-cat", { "sxl-nf-cat-active": G === t }),
|
|
384
|
+
disabled: M,
|
|
385
|
+
selected: G === t,
|
|
386
|
+
onClick: () => H(t),
|
|
387
|
+
sx: T,
|
|
388
|
+
children: l(_, {
|
|
389
|
+
primary: O(I, t),
|
|
390
|
+
slotProps: { primary: { noWrap: !0 } }
|
|
391
|
+
})
|
|
392
|
+
}, t))
|
|
393
|
+
}), l(d, {
|
|
394
|
+
sx: {
|
|
395
|
+
display: "flex",
|
|
396
|
+
flexDirection: "column",
|
|
397
|
+
gap: 1.25,
|
|
398
|
+
flex: "1 1 auto",
|
|
399
|
+
minWidth: 0,
|
|
400
|
+
border: (e) => `1px solid ${e.palette.divider}`,
|
|
401
|
+
borderRadius: (e) => `${e.shape.borderRadius}px`,
|
|
402
|
+
padding: (e) => e.spacing(1.5),
|
|
403
|
+
overflow: "auto"
|
|
404
|
+
},
|
|
405
|
+
children: $
|
|
406
|
+
})]
|
|
407
|
+
})]
|
|
408
|
+
});
|
|
409
|
+
}));
|
|
410
|
+
A.displayName = "NumberFormatPanel";
|
|
411
|
+
export { C as n, A as t };
|