@sheetxl/studio-mui 0.7.27 → 0.7.28-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/BFnJuOSao7TjbB-2.mjs +1150 -0
- package/browser/esm/BGngIqHYTFzsezh-.mjs +105 -0
- package/browser/esm/BH0fLaa4Vfda2U-T.mjs +155 -0
- package/browser/esm/BKadOi_4tf3UqilJ.mjs +8878 -0
- package/browser/esm/BNhUUeacBwGsPLBQ.mjs +42 -0
- package/browser/esm/BkP8c-zrLAqdNL5E.mjs +82 -0
- package/browser/esm/BlykPulAqes3JMee.mjs +1376 -0
- package/browser/esm/Bt_J_RX2M5EfualB.mjs +217 -0
- package/browser/esm/CIvpm_sHFmNjZQ7A.mjs +52 -0
- package/browser/esm/Cwku0NEsbyq9Q_RE.mjs +129 -0
- package/browser/esm/D4-E6nt8hrlNPIFy.mjs +5391 -0
- package/browser/esm/D5kzg7IfEtrExqiB.mjs +47 -0
- package/browser/esm/DLG0lDeb0t2L5dW4.mjs +468 -0
- package/browser/esm/DN5ACcUVdZeTSdLP.mjs +411 -0
- package/browser/esm/DP50mI7SOk1spPHv.mjs +516 -0
- package/browser/esm/DfZkO9tkYUlBUgXw.mjs +508 -0
- package/browser/esm/DhSHhyt16cHMvS_1.mjs +612 -0
- package/browser/esm/DxEzstNhMkJ0uzic.mjs +191 -0
- package/browser/esm/DxurARMNTQF7_rno.mjs +99 -0
- package/browser/esm/EK3JudzGAPbSIzUc.mjs +2207 -0
- package/browser/esm/Lds8JbV0rmFse8IO.mjs +113 -0
- package/browser/esm/gdfNDmwpOOPidxVx.mjs +20 -0
- package/browser/esm/gr4KpbaVpVfm8KOB.mjs +219 -0
- package/browser/esm/index.mjs +152 -91
- package/licenses/dependencies.txt +137 -627
- package/node/esm/-xXP4QK8hYGcJeug.mjs +509 -0
- package/node/esm/BVNe-px0vKah_sh2.mjs +516 -0
- package/node/esm/CLqRv2FWsGMrPoB0.mjs +47 -0
- package/node/esm/CSaiKMpmmQJY2xtl.mjs +113 -0
- package/node/esm/CTVMIjaQZQtJ05F8.mjs +129 -0
- package/node/esm/CWDr4rcpYux8bSQk.mjs +82 -0
- package/node/esm/CgDlduchq8t6DdhF.mjs +190 -0
- package/node/esm/Ck1Im-zWbwJqZNU1.mjs +470 -0
- package/node/esm/Ctakr7TocM8RykpC.mjs +679 -0
- package/node/esm/DMhU1sS3kX-Im83k.mjs +106 -0
- package/node/esm/Dh2MI-_NSwxjrRP8.mjs +99 -0
- package/node/esm/ED4g6Bsz9syAhAW3.mjs +155 -0
- package/node/esm/VuLRDpv46Yib6fpp.mjs +4536 -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,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.28-beta.2
|
|
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 { useCallbackRef as t, useTranslator as n } from "@sheetxl/utils-react";
|
|
8
|
+
import { memo as o, useCallback as e, useMemo as a, useState as i } from "react";
|
|
9
|
+
import { OptionsDialog as l } from "@sheetxl/utils-mui";
|
|
10
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
11
|
+
import { Box as r, FormControl as c, TextField as p } from "@mui/material";
|
|
12
|
+
var m = ["Ok", "Cancel"], u = o((o) => {
|
|
13
|
+
const { initialValue: u = null, onInput: d, context: g, onOption: x, onValidateOption: h, onDone: f, options: O = m, defaultOption: C = O?.[0], cancelOption: w = "Cancel", sx: y, ...v } = o, F = n(), T = a(() => {
|
|
14
|
+
const t = u ?? g?.()?.getComments();
|
|
15
|
+
let n = "";
|
|
16
|
+
if (t && t.content && t.content.runs) {
|
|
17
|
+
const o = t.content.runs;
|
|
18
|
+
for (let t = 0; t < o.length; t++) {
|
|
19
|
+
const e = o[t];
|
|
20
|
+
n += e?.text;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return n;
|
|
24
|
+
}, []), [b, k] = i(T), [D, I] = i(!1), P = e(async (t, n) => null, []), V = t(async (t) => {
|
|
25
|
+
const n = "" === b ? [] : b.split("\n"), o = t === w;
|
|
26
|
+
if (!o) {
|
|
27
|
+
const t = n.length, o = new Array(t);
|
|
28
|
+
for (let e = 0; e < t; e++) o[e] = { text: n[e] };
|
|
29
|
+
d?.({ content: { runs: o } });
|
|
30
|
+
}
|
|
31
|
+
x?.(t, o, t === C), f?.();
|
|
32
|
+
}, [
|
|
33
|
+
b,
|
|
34
|
+
d,
|
|
35
|
+
f,
|
|
36
|
+
x,
|
|
37
|
+
C,
|
|
38
|
+
w
|
|
39
|
+
]), B = t((t) => {
|
|
40
|
+
k(t.target.value), P(t.target.value);
|
|
41
|
+
}, [h]), M = t(async (t) => {
|
|
42
|
+
let n = await Promise.resolve(h?.(t));
|
|
43
|
+
try {
|
|
44
|
+
!1 !== n && (n = await P(b, t));
|
|
45
|
+
} catch (t) {}
|
|
46
|
+
return n ?? !0;
|
|
47
|
+
}, [h, b]);
|
|
48
|
+
return s(l, {
|
|
49
|
+
title: F(T ? "comments.titleEdit" : "comments.titleInsert"),
|
|
50
|
+
options: O,
|
|
51
|
+
onDone: f,
|
|
52
|
+
onOption: (t) => V(t),
|
|
53
|
+
onValidateOption: M,
|
|
54
|
+
defaultOption: C,
|
|
55
|
+
cancelOption: w,
|
|
56
|
+
autoFocusSel: ".autoFocus",
|
|
57
|
+
sx: {
|
|
58
|
+
width: "480px",
|
|
59
|
+
...y
|
|
60
|
+
},
|
|
61
|
+
...v,
|
|
62
|
+
children: s(r, {
|
|
63
|
+
sx: {
|
|
64
|
+
paddingTop: (t) => t.spacing(1),
|
|
65
|
+
paddingBottom: (t) => t.spacing(0),
|
|
66
|
+
rowGap: (t) => t.spacing(1),
|
|
67
|
+
display: "flex",
|
|
68
|
+
flexDirection: "column"
|
|
69
|
+
},
|
|
70
|
+
children: s(c, {
|
|
71
|
+
sx: {
|
|
72
|
+
paddingTop: (t) => t.spacing(1.5),
|
|
73
|
+
minWidth: 135,
|
|
74
|
+
width: "100%"
|
|
75
|
+
},
|
|
76
|
+
size: "small",
|
|
77
|
+
children: s(p, {
|
|
78
|
+
label: F("comments.label"),
|
|
79
|
+
placeholder: F("comments.placeholder"),
|
|
80
|
+
onFocus: (t) => {
|
|
81
|
+
D || t.target?.select(), I(!0);
|
|
82
|
+
},
|
|
83
|
+
sx: { "& .MuiFormHelperText-root": { marginTop: (t) => t.spacing(.5) } },
|
|
84
|
+
slotProps: {
|
|
85
|
+
inputLabel: { shrink: !0 },
|
|
86
|
+
htmlInput: {
|
|
87
|
+
className: "autoFocus",
|
|
88
|
+
spellCheck: !1,
|
|
89
|
+
autoComplete: "off",
|
|
90
|
+
sx: {
|
|
91
|
+
paddingTop: (t) => t.spacing(1.25),
|
|
92
|
+
paddingBottom: (t) => t.spacing(.75)
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
value: b,
|
|
97
|
+
onChange: B,
|
|
98
|
+
onContextMenu: (t) => {
|
|
99
|
+
t.stopPropagation();
|
|
100
|
+
}
|
|
101
|
+
})
|
|
102
|
+
})
|
|
103
|
+
})
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
export { u as CommentsDialog, u as default };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.28-beta.2
|
|
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 { InsertFunctionOption as e, InsertFunctionWizard as t, optionsForPage as o } from "./index.mjs";
|
|
8
|
+
import { useReferenceMode as i, useWorkbook as n } from "@sheetxl/react";
|
|
9
|
+
import { useCallbackRef as l, useTranslator as a } from "@sheetxl/utils-react";
|
|
10
|
+
import { memo as r, useMemo as c, useRef as s, useState as u } from "react";
|
|
11
|
+
import { OptionsDialog as m, optionIdentity as p } from "@sheetxl/utils-mui";
|
|
12
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
13
|
+
var x = r((r) => {
|
|
14
|
+
const { initialValue: x = null, context: d, onOption: g, onDone: h, onInput: D, options: C, defaultOption: S, cancelOption: y = "Cancel", sx: O, ...k } = r, M = a(), v = n(), [F, w] = u("search"), [H, N] = u("string" == typeof x ? null : x), [I, j] = u(null), A = c(() => C ?? o(F, M), [
|
|
15
|
+
C,
|
|
16
|
+
F,
|
|
17
|
+
M
|
|
18
|
+
]), B = S ?? A[0], T = p(B), [V] = u(() => {
|
|
19
|
+
const e = v?.getSelectedSheet()?.getSelectedCell();
|
|
20
|
+
return e ? {
|
|
21
|
+
...e.getCoords(),
|
|
22
|
+
scope: e.getSheet().getName()
|
|
23
|
+
} : void 0;
|
|
24
|
+
}), b = !!i().getMode()?.activeInput, z = s(!1), q = l((t, o, i) => {
|
|
25
|
+
if (o || t !== e.Next) if (o || t !== e.Back) {
|
|
26
|
+
if (!o && H) {
|
|
27
|
+
const e = "arguments" === F && !!I;
|
|
28
|
+
z.current = !e, D?.(e ? I : H);
|
|
29
|
+
}
|
|
30
|
+
g?.(t, o, i), h?.();
|
|
31
|
+
} else w("search");
|
|
32
|
+
else w("arguments");
|
|
33
|
+
}, [
|
|
34
|
+
F,
|
|
35
|
+
I,
|
|
36
|
+
H,
|
|
37
|
+
D,
|
|
38
|
+
g,
|
|
39
|
+
h
|
|
40
|
+
]), E = l(async (t) => t === e.Back || !!H, [H]), G = l(async () => {
|
|
41
|
+
!0 === await E(T) && q(T, !1, !0);
|
|
42
|
+
}, [
|
|
43
|
+
E,
|
|
44
|
+
T,
|
|
45
|
+
q
|
|
46
|
+
]);
|
|
47
|
+
return f(m, {
|
|
48
|
+
title: M("insertFunction.dialogTitle"),
|
|
49
|
+
options: A,
|
|
50
|
+
onOption: q,
|
|
51
|
+
onValidateOption: E,
|
|
52
|
+
defaultOption: B,
|
|
53
|
+
cancelOption: y,
|
|
54
|
+
autoFocusSel: ".autoFocus",
|
|
55
|
+
suspendModal: b,
|
|
56
|
+
restoreFocus: () => !z.current,
|
|
57
|
+
sx: {
|
|
58
|
+
width: "460px",
|
|
59
|
+
maxHeight: "calc(100dvh - 16px)",
|
|
60
|
+
display: "flex",
|
|
61
|
+
flexDirection: "column",
|
|
62
|
+
"& > .MuiDialogTitle-root": { flexShrink: 0 },
|
|
63
|
+
"& > form": {
|
|
64
|
+
display: "flex",
|
|
65
|
+
flexDirection: "column",
|
|
66
|
+
flex: "1 1 auto",
|
|
67
|
+
minHeight: 0
|
|
68
|
+
},
|
|
69
|
+
"& .MuiDialogContent-root": {
|
|
70
|
+
display: "flex",
|
|
71
|
+
flexDirection: "column",
|
|
72
|
+
flex: "1 1 auto",
|
|
73
|
+
minHeight: 0
|
|
74
|
+
},
|
|
75
|
+
"& .MuiDialogContent-root > *": {
|
|
76
|
+
flex: "1 1 auto",
|
|
77
|
+
minHeight: 0
|
|
78
|
+
},
|
|
79
|
+
"& .MuiDialogActions-root": { flexShrink: 0 },
|
|
80
|
+
...O
|
|
81
|
+
},
|
|
82
|
+
...k,
|
|
83
|
+
children: f(t, {
|
|
84
|
+
className: "insert-function-wizard",
|
|
85
|
+
context: d,
|
|
86
|
+
page: F,
|
|
87
|
+
selected: H,
|
|
88
|
+
onChangeSelected: N,
|
|
89
|
+
onActivate: () => {
|
|
90
|
+
G();
|
|
91
|
+
},
|
|
92
|
+
onChangeCall: j,
|
|
93
|
+
workbook: v,
|
|
94
|
+
home: V
|
|
95
|
+
})
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
x.displayName = "InsertFunctionDialog";
|
|
99
|
+
export { x as InsertFunctionDialog, x as default };
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.28-beta.2
|
|
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 { IRange as e } from "@sheetxl/sdk";
|
|
8
|
+
import { KeyCodes as t, useCallbackRef as i, useTranslator as n } from "@sheetxl/utils-react";
|
|
9
|
+
import { memo as o, useCallback as a, useMemo as s, useState as r } from "react";
|
|
10
|
+
import { OptionsDialog as l } from "@sheetxl/utils-mui";
|
|
11
|
+
import { jsx as p, jsxs as u } from "react/jsx-runtime";
|
|
12
|
+
import { Box as c, FormControl as d, InputLabel as m, MenuItem as x, Select as g, TextField as h, Typography as f } from "@mui/material";
|
|
13
|
+
var z = [
|
|
14
|
+
"Autofit",
|
|
15
|
+
"Ok",
|
|
16
|
+
"Cancel"
|
|
17
|
+
], y = o((o) => {
|
|
18
|
+
const { initialValue: y, context: C, onOption: v, onValidateOption: w, onInput: O, onDone: P, options: b = z, defaultOption: H = b?.[1], cancelOption: T = "Cancel", sx: k, ...A } = o, D = n(), F = s(() => C?.().getAxis() === e.Axis.Column, [C]), [U, I] = r(y ?? { size: 0 }), [M, V] = r(!1), j = a(async (e, t) => !0, []), B = s(() => {
|
|
19
|
+
const e = C?.();
|
|
20
|
+
if (!e?.toUnits) return null;
|
|
21
|
+
let t = U?.size ?? 0, i = "Px";
|
|
22
|
+
return "Px" === U.unit ? (t = e.toUnits?.(t) ?? t, i = e.getUnitText()) : (t = e.toPixels?.(t) ?? t, i = "Px"), {
|
|
23
|
+
size: t,
|
|
24
|
+
unit: i
|
|
25
|
+
};
|
|
26
|
+
}, [U?.unit, U?.size]), L = i(async (e) => {
|
|
27
|
+
const t = e === T;
|
|
28
|
+
t || O?.(U, e), v?.(e, t, e === H), P?.();
|
|
29
|
+
}, [
|
|
30
|
+
U,
|
|
31
|
+
O,
|
|
32
|
+
P,
|
|
33
|
+
v,
|
|
34
|
+
T,
|
|
35
|
+
H
|
|
36
|
+
]), N = i(async (e) => {
|
|
37
|
+
e.keyCode === t.Enter && !1 !== await j?.(U) && L(H);
|
|
38
|
+
}, [U, L]), W = i(async (e) => {
|
|
39
|
+
let t = await Promise.resolve(w?.(e));
|
|
40
|
+
try {
|
|
41
|
+
!1 !== t && (t = await Promise.resolve(j?.(U, e)) ?? !0);
|
|
42
|
+
} catch (e) {}
|
|
43
|
+
return t ?? !0;
|
|
44
|
+
}, [w]), E = i((e) => {
|
|
45
|
+
const t = {
|
|
46
|
+
...U,
|
|
47
|
+
size: Number(e.target.value)
|
|
48
|
+
};
|
|
49
|
+
I(t), j?.(t);
|
|
50
|
+
}, [U, w]), G = i((e) => {
|
|
51
|
+
const t = e.target.value, i = {
|
|
52
|
+
...U,
|
|
53
|
+
unit: t
|
|
54
|
+
};
|
|
55
|
+
I(i);
|
|
56
|
+
}, [U]), K = s(() => {
|
|
57
|
+
const e = C?.().getUnitText() ?? "", t = (e) => p(x, {
|
|
58
|
+
value: e,
|
|
59
|
+
children: e
|
|
60
|
+
}, e), i = [];
|
|
61
|
+
return i.push(t("Px")), i.push(t(e)), i;
|
|
62
|
+
}, []), R = s(() => b.map((e) => "Autofit" === e ? {
|
|
63
|
+
id: "Autofit",
|
|
64
|
+
label: () => D("resizeHeader.autofit")
|
|
65
|
+
} : e), [b, D]);
|
|
66
|
+
return p(l, {
|
|
67
|
+
title: D(F ? "resizeHeader.titleColumns" : "resizeHeader.titleRows"),
|
|
68
|
+
options: R,
|
|
69
|
+
onDone: P,
|
|
70
|
+
onOption: (e) => L(e),
|
|
71
|
+
onValidateOption: W,
|
|
72
|
+
defaultOption: H,
|
|
73
|
+
cancelOption: T,
|
|
74
|
+
autoFocusSel: ".autoFocus",
|
|
75
|
+
sx: {
|
|
76
|
+
width: "380px",
|
|
77
|
+
...k
|
|
78
|
+
},
|
|
79
|
+
...A,
|
|
80
|
+
children: u(c, {
|
|
81
|
+
sx: {
|
|
82
|
+
paddingTop: (e) => e.spacing(0),
|
|
83
|
+
paddingBottom: (e) => e.spacing(1),
|
|
84
|
+
display: "flex",
|
|
85
|
+
flexDirection: "column"
|
|
86
|
+
},
|
|
87
|
+
children: [u(c, {
|
|
88
|
+
sx: {
|
|
89
|
+
rowGap: (e) => e.spacing(1),
|
|
90
|
+
display: "flex",
|
|
91
|
+
flexDirection: "row",
|
|
92
|
+
gap: (e) => e.spacing(.5),
|
|
93
|
+
alignItems: "end",
|
|
94
|
+
justifyContent: "center"
|
|
95
|
+
},
|
|
96
|
+
children: [p(d, {
|
|
97
|
+
sx: {
|
|
98
|
+
paddingTop: (e) => e.spacing(1.5),
|
|
99
|
+
minWidth: 135,
|
|
100
|
+
width: "100%"
|
|
101
|
+
},
|
|
102
|
+
size: "small",
|
|
103
|
+
children: p(h, {
|
|
104
|
+
label: D("resizeHeader.size"),
|
|
105
|
+
onFocus: (e) => {
|
|
106
|
+
M || e.target?.select(), V(!0);
|
|
107
|
+
},
|
|
108
|
+
sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(.5) } },
|
|
109
|
+
slotProps: {
|
|
110
|
+
inputLabel: { shrink: !0 },
|
|
111
|
+
htmlInput: {
|
|
112
|
+
className: "autoFocus",
|
|
113
|
+
spellCheck: !1,
|
|
114
|
+
autoComplete: "off",
|
|
115
|
+
type: "number",
|
|
116
|
+
inputMode: "numeric",
|
|
117
|
+
min: 0,
|
|
118
|
+
pattern: "[0-9]*",
|
|
119
|
+
sx: {
|
|
120
|
+
paddingTop: (e) => e.spacing(1.25),
|
|
121
|
+
paddingBottom: (e) => e.spacing(.75)
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
value: U.size,
|
|
126
|
+
onChange: E,
|
|
127
|
+
onKeyDown: N,
|
|
128
|
+
onContextMenu: (e) => {
|
|
129
|
+
e.stopPropagation();
|
|
130
|
+
}
|
|
131
|
+
})
|
|
132
|
+
}), u(d, {
|
|
133
|
+
sx: { minWidth: 85 },
|
|
134
|
+
size: "small",
|
|
135
|
+
children: [p(m, { children: D("resizeHeader.unit") }), p(g, {
|
|
136
|
+
value: U.unit,
|
|
137
|
+
label: D("resizeHeader.unit"),
|
|
138
|
+
onChange: G,
|
|
139
|
+
children: K
|
|
140
|
+
})]
|
|
141
|
+
})]
|
|
142
|
+
}), B && p(c, { children: u(f, {
|
|
143
|
+
variant: "body2",
|
|
144
|
+
component: "div",
|
|
145
|
+
sx: { paddingLeft: (e) => e.spacing(2) },
|
|
146
|
+
children: [
|
|
147
|
+
B.size,
|
|
148
|
+
" ",
|
|
149
|
+
B.unit
|
|
150
|
+
]
|
|
151
|
+
}) })]
|
|
152
|
+
})
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
export { y as ResizeHeaderDialog, y as default };
|