@sheetxl/studio-mui 0.7.26 → 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/52tjAlO48FpZgfzG.cjs +0 -6
- package/browser/cjs/BGu2_YqVJMQjYx4D.cjs +0 -18
- package/browser/cjs/C83Rzj_Jwq-o69wr.cjs +0 -42
- package/browser/cjs/CldYLQnjFC_g8o3t.cjs +0 -6
- package/browser/cjs/Cpv3j_Ra1h-axLRG.cjs +0 -6
- package/browser/cjs/D-5Cg1Y0zALF_JEs.cjs +0 -7
- package/browser/cjs/D58sOTRZwQ59CgOf.cjs +0 -6
- package/browser/cjs/DEd-0xEuUoELRnQb.cjs +0 -6
- package/browser/cjs/DahKlfm68zudpndW.cjs +0 -20
- package/browser/cjs/Dd7t0gfO3bzS0-B8.cjs +0 -6
- package/browser/cjs/DxAU6DV3UCUDVoSH.cjs +0 -6
- package/browser/cjs/uj7GSwDaUyTKEjrN.cjs +0 -6
- package/browser/esm/BLuR1D2n--9QSJL9.mjs +0 -26
- package/browser/esm/BSOhdb74viwmCi54.mjs +0 -2159
- package/browser/esm/BTAhrEfV-DH0-Ldk.mjs +0 -640
- package/browser/esm/BgsyX5QL9OLy0DN3.mjs +0 -4533
- package/browser/esm/CFPGs5_tLGrpkW8L.mjs +0 -25
- package/browser/esm/CbCX3t0hx-h6pV7Q.mjs +0 -46
- package/browser/esm/D3dDP89ml0258MGb.mjs +0 -53
- package/browser/esm/DYk55y6IEOCytW3g.mjs +0 -50
- package/browser/esm/DfUqOxFfhJcaq847.mjs +0 -2411
- package/browser/esm/DhWeeZyxUc-LbP8E.mjs +0 -50
- package/browser/esm/DqLDLUCqiFovdBf0.mjs +0 -155
- package/browser/esm/Dvo0k3olgFuAso_O.mjs +0 -54
- package/node/assets/style.css +0 -1
- package/node/esm/BM_pvbGlgXydGNT3.mjs +0 -52
- package/node/esm/CFBcwLP2q2_EUXvE.mjs +0 -156
- package/node/esm/Cg9JFB8nOnVfR0Uo.mjs +0 -26
- package/node/esm/D3kxA1LpG-PpZvCb.mjs +0 -25
- package/node/esm/D_s6w_GWb8l7uGW3.mjs +0 -53
- package/node/esm/XI3nj4zD7mXOyxSm.mjs +0 -57
- package/node/esm/YXQgUYqP1qsi_MPX.mjs +0 -46
- package/node/esm/m2lejeU-ViEhFj_N.mjs +0 -91
- package/node/esm/sevERUPIPJCb-jYL.mjs +0 -88
- package/node/esm/zdjaq7yEfEvgHrDi.mjs +0 -50
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { jsx as l, jsxs as z } from "react/jsx-runtime";
|
|
2
|
-
import { memo as A, useMemo as O, useState as f, useCallback as b } from "react";
|
|
3
|
-
import { alpha as i, getOverlayAlpha as r } from "@mui/material/styles";
|
|
4
|
-
import { Box as j, FormControl as F, TextField as D } from "@mui/material";
|
|
5
|
-
import { useCallbackRef as x } from "@sheetxl/utils-react";
|
|
6
|
-
import { OptionsDialog as E } from "@sheetxl/utils-mui";
|
|
7
|
-
/**
|
|
8
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.26
|
|
9
|
-
*
|
|
10
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
11
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
12
|
-
*/
|
|
13
|
-
const S = ["Ok", "Cancel"], K = A((v) => {
|
|
14
|
-
const { initialValue: n = null, context: s, onInput: h, onOption: T, onValidateOption: p, onDone: d, options: y = S, defaultOption: c = y?.[0], cancelOption: u = "Cancel", sx: w, ...I } = v, H = O(() => (n ?? s?.()?.getHyperlink()) !== null, []), g = O(() => {
|
|
15
|
-
let e = null, a = null;
|
|
16
|
-
n && (typeof n == "string" ? a = n : e = n);
|
|
17
|
-
const o = e ?? s?.()?.getHyperlink();
|
|
18
|
-
return { address: a ?? o?.getAddress() ?? "", textToDisplay: o?.getDisplayText() ?? "" };
|
|
19
|
-
}, [n, s]), [t, M] = f(g.address), [m, P] = f(() => {
|
|
20
|
-
const e = s?.().toTextUnformatted() ?? g.displayText;
|
|
21
|
-
return e === g.address ? "" : e;
|
|
22
|
-
}), [B, k] = f(!1), $ = b((e) => {
|
|
23
|
-
P(e.target.value);
|
|
24
|
-
}, []), C = b(async (e, a) => null, []), L = x(async (e) => {
|
|
25
|
-
const a = t === "" ? null : { address: t }, o = e === u;
|
|
26
|
-
o || h?.({ address: a?.address ?? null, displayText: m ?? null }), T?.(e, o, e === c), d?.();
|
|
27
|
-
}, [t, m, s, h, d, T, c, u]), V = x((e) => {
|
|
28
|
-
M(e.target.value), C(e.target.value, null);
|
|
29
|
-
}, [p]), W = x(async (e) => {
|
|
30
|
-
let a = await Promise.resolve(p?.(e));
|
|
31
|
-
try {
|
|
32
|
-
a !== !1 && (a = await C(t, e));
|
|
33
|
-
} catch {
|
|
34
|
-
}
|
|
35
|
-
return a ?? !0;
|
|
36
|
-
}, [p]);
|
|
37
|
-
return l(E, { title: (H ? "Edit" : "Insert") + " Link", options: y, onDone: d, onOption: (e) => L(e), onValidateOption: W, defaultOption: c, cancelOption: u, autoFocusSel: ".autoFocus", sx: { width: "480px", ...w }, ...I, children: z(j, { sx: { paddingTop: (e) => e.spacing(1), paddingBottom: (e) => e.spacing(0), rowGap: (e) => e.spacing(1), display: "flex", flexDirection: "column" }, children: [l(F, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: l(D, { label: "Address", placeholder: "Enter a url or cell reference.", onFocus: (e) => {
|
|
38
|
-
B || e.target?.select(), k(!0);
|
|
39
|
-
}, sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(0.5) } }, slotProps: { inputLabel: { shrink: !0 }, htmlInput: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75), backgroundImage: `linear-gradient(${i("#fff", r(5))}, ${i("#fff", r(5))})` } } }, value: t, onChange: V, onContextMenu: (e) => {
|
|
40
|
-
e.stopPropagation();
|
|
41
|
-
} }) }), l(F, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: l(D, { label: "Display Text", placeholder: t?.startsWith("#") ? t.substring(1) : t, onFocus: () => {
|
|
42
|
-
k(!0);
|
|
43
|
-
}, sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(0.5) } }, slotProps: { inputLabel: { shrink: !0 }, htmlInput: { spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75), backgroundImage: `linear-gradient(${i("#fff", r(5))}, ${i("#fff", r(5))})` } } }, value: m, onChange: $, onContextMenu: (e) => {
|
|
44
|
-
e.stopPropagation();
|
|
45
|
-
} }) })] }) });
|
|
46
|
-
});
|
|
47
|
-
export {
|
|
48
|
-
K as HyperlinkDialog,
|
|
49
|
-
K as default
|
|
50
|
-
};
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { jsx as i, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import { memo as ae, useRef as C, useState as R, useEffect as A, useLayoutEffect as me, useMemo as ge } from "react";
|
|
3
|
-
import { alpha as w, getOverlayAlpha as T } from "@mui/material/styles";
|
|
4
|
-
import { DialogContent as xe, Box as h, TextField as ie, InputAdornment as he, Collapse as oe, MenuItem as Oe, FormControl as ye, InputLabel as Ce, Select as be } from "@mui/material";
|
|
5
|
-
import { ICell as p, IRange as k } from "@sheetxl/sdk";
|
|
6
|
-
import { CommandContext as le } from "@sheetxl/react";
|
|
7
|
-
import { useCallbackRef as j, KeyCodes as Re, DynamicIcon as m, KeyModifiers as b } from "@sheetxl/utils-react";
|
|
8
|
-
import { InternalWindow as ve, ExhibitOptionButton as g, ExhibitDivider as Fe } from "@sheetxl/utils-mui";
|
|
9
|
-
import { u as ke } from "./BgsyX5QL9OLy0DN3.mjs";
|
|
10
|
-
/**
|
|
11
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.26
|
|
12
|
-
*
|
|
13
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
14
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
15
|
-
*/
|
|
16
|
-
const V = { width: "1.5rem", height: "1.5rem" }, z = ae((E) => {
|
|
17
|
-
const { label: a, value: x, options: l, onSelect: O, tabIndex: M = 0, ...N } = E, [B, y] = R(() => re(x, l));
|
|
18
|
-
A(() => {
|
|
19
|
-
y(re(x, l));
|
|
20
|
-
}, [x, l]);
|
|
21
|
-
const v = j((c) => {
|
|
22
|
-
y(c.target.value), O?.(l[c.target.value]);
|
|
23
|
-
}, [O, l]), F = ge(() => Object.keys(l).map((c) => i(Oe, { value: c, children: c }, c)), [l]);
|
|
24
|
-
return d(ye, { sx: { minWidth: 135 }, size: "small", children: [i(Ce, { children: a }), i(be, { inputProps: { tabIndex: M }, value: B, label: a, onChange: v, sx: { backgroundImage: `linear-gradient(${w("#fff", T(5))}, ${w("#fff", T(5))})` }, ...N, children: F })] });
|
|
25
|
-
}), se = { enter: 140, exit: 140 }, ce = { Formulas: p.Content.Formulas, Values: p.Content.Values, Notes: p.Content.Notes, Comments: p.Content.Comments }, pe = { ...ce };
|
|
26
|
-
delete pe.Values;
|
|
27
|
-
const we = { "By Rows": !0, "By Columns": !1 }, re = (E, a) => {
|
|
28
|
-
const x = Object.keys(a);
|
|
29
|
-
for (let l = 0; l < x.length; l++) {
|
|
30
|
-
const O = x[l];
|
|
31
|
-
if (a[O] === E) return O;
|
|
32
|
-
}
|
|
33
|
-
}, Le = ae((E) => {
|
|
34
|
-
const { initialValue: a, context: x, onInput: l, title: O, onHide: M, autoFocus: N, ...B } = E, y = a?.replace ?? !1, v = a?.findOptions, F = v.text ?? null, c = a?.replaceOptions, K = a?.replaceText ?? null, L = x?.(), s = C(null), H = C(null), U = C(null), G = C(null), q = C(null), J = C(null), Q = (e, n) => {
|
|
35
|
-
n && (n.start(e, { center: !1 }), setTimeout(() => n.stop(e), 180));
|
|
36
|
-
}, [X, D] = R(!1), [P, de] = R(!1), [u, W] = R(y), [Y, $] = R(!1), [Z, _] = R(!1), [o, r] = R({ replaceText: null, replace: y, replaceOptions: null, findOptions: { text: null, matchCase: !1, matchEntireCell: !1, useRegex: !1, orientation: k.Orientation.Row, fields: [p.Content.Formulas] }, scope: le.FindScopeOptions.Sheet }), I = j(async (e, n, t, S) => {
|
|
37
|
-
if (!L) return;
|
|
38
|
-
const f = { ...o };
|
|
39
|
-
f.replaceOptions = { ...f.replaceOptions }, f.findOptions = { ...f.findOptions }, f.replaceOptions.maxCount = t ? void 0 : 1, f.replace = n, n && o.findOptions.fields?.[0] === p.Content.Values && (f.findOptions.fields = [p.Content.Formulas]), f.findOptions.reverse = !e;
|
|
40
|
-
const fe = await L({ autoFocus: S, ...f });
|
|
41
|
-
$(fe === 0);
|
|
42
|
-
}, [o, L]);
|
|
43
|
-
A(() => {
|
|
44
|
-
$(!1);
|
|
45
|
-
}, [o, P, u]);
|
|
46
|
-
const ee = j((e, n) => {
|
|
47
|
-
if (e.keyCode === Re.Enter) {
|
|
48
|
-
if (!o.findOptions.text) return;
|
|
49
|
-
let t = !0, S = !1;
|
|
50
|
-
e.shiftKey && (t = !1), n ? (e.ctrlKey && e.altKey && (S = !0), Q(e, S ? J.current : q.current)) : Q(e, t ? G.current : U.current), I(t, n, S, !1);
|
|
51
|
-
}
|
|
52
|
-
}, [o]), ne = C(null);
|
|
53
|
-
me(() => {
|
|
54
|
-
r((e) => {
|
|
55
|
-
const n = { ...e };
|
|
56
|
-
n.findOptions.text = F && F.length > 0 ? F : e.findOptions.text ?? "", D(!0), K !== null && (n.replaceText = K ?? ""), v && (n.findOptions = { ...n.findOptions, ...v }), n.replaceText || (n.replaceText = ""), n.replaceOptions && (n.replaceOptions = { ...n.replaceOptions }), c && (n.replaceOptions = { ...n.replaceOptions, ...c }), o.findOptions.fields?.[0] || (o.findOptions.fields = [p.Content.Formulas]);
|
|
57
|
-
const t = !(!y && !c && K === null);
|
|
58
|
-
return t && W(t), n;
|
|
59
|
-
}), Z || ne.current?.focus();
|
|
60
|
-
}, [a, y, F, K, v, c]), A(() => {
|
|
61
|
-
u ? (o.findOptions.fields[0], p.Content.Values) : D(!0);
|
|
62
|
-
}, [u]), A(() => {
|
|
63
|
-
if (X && s.current && o.findOptions.text === s.current.value) return s.current === document.activeElement || s.current.contains(document.activeElement) ? (s.current?.select(), void D(!1)) : void s.current.addEventListener("focus", () => {
|
|
64
|
-
s.current?.select(), D(!1);
|
|
65
|
-
}, { once: !0 });
|
|
66
|
-
}, [X, o]);
|
|
67
|
-
const [ue, { width: te }] = ke();
|
|
68
|
-
return i(ve, { ref: ne, title: O ?? (u ? "Find & Replace" : "Find"), initialPosition: { y: "35" }, autoFocusSel: ".input", onHide: M, onFocus: () => _(!0), onBlur: () => {
|
|
69
|
-
_(!1), $(!1);
|
|
70
|
-
}, slotProps: { paper: { elevation: Z ? 3 : 1 } }, ...B, children: d(xe, { dividers: !0, ref: ue, sx: { display: "flex", flexDirection: "column", paddingLeft: (e) => e.spacing(1.5), paddingRight: (e) => e.spacing(1.5) }, onKeyDown: (e) => {
|
|
71
|
-
if (e.key === "h" && e.ctrlKey) W(!0), s.current?.contains(document.activeElement) && H.current?.focus();
|
|
72
|
-
else if (e.key === "f" && e.ctrlKey) s.current?.focus();
|
|
73
|
-
else if (e.key === "c" && e.altKey) r((n) => {
|
|
74
|
-
const t = { ...n };
|
|
75
|
-
return t.findOptions.matchCase = !n.findOptions.matchCase, t;
|
|
76
|
-
});
|
|
77
|
-
else if (e.key === "e" && e.altKey) r((n) => {
|
|
78
|
-
const t = { ...n };
|
|
79
|
-
return t.findOptions.matchEntireCell = !n.findOptions.matchEntireCell, t;
|
|
80
|
-
});
|
|
81
|
-
else {
|
|
82
|
-
if (e.key !== "r" || !e.altKey) return;
|
|
83
|
-
r((n) => {
|
|
84
|
-
const t = { ...n };
|
|
85
|
-
return t.findOptions.useRegex = !n.findOptions.useRegex, t;
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
e.preventDefault();
|
|
89
|
-
}, children: [d(h, { sx: { display: "flex", flexDirection: "row", gap: (e) => e.spacing(1) }, children: [d(h, { sx: { display: "flex", flexDirection: "row", alignItems: "start", gap: (e) => e.spacing(0.25), paddingTop: "3px" }, children: [i(g, { selected: P, onSelectToggle: (e) => {
|
|
90
|
-
de(e);
|
|
91
|
-
}, preventFocus: !0, label: "Toggle Additional Options", icon: i(m, { iconKey: "FindOptions" }) }), i(g, { selected: u, onSelectToggle: (e) => {
|
|
92
|
-
W(e);
|
|
93
|
-
}, preventFocus: !0, label: "Toggle Replace", icon: i(m, { iconKey: "FindReplaceToggle" }), shortcut: { key: u ? "F" : "H", modifiers: [b.Ctrl] } })] }), d(h, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box" }, children: [d(h, { sx: { display: "flex", flexDirection: "row", alignItems: "center" }, children: [i(ie, { label: "Find", slotProps: { input: { sx: { paddingRight: (e) => e.spacing(1), minWidth: te > 460 ? "20em" : void 0, backgroundImage: `linear-gradient(${w("#fff", T(5))}, ${w("#fff", T(5))})` }, endAdornment: i(he, { position: "end", children: d(h, { sx: { display: "flex", alignItems: "center", flexDirection: "row", gap: "2px" }, children: [i(g, { style: V, selected: o.findOptions.matchCase, onBlur: () => {
|
|
94
|
-
}, onSelectToggle: (e) => {
|
|
95
|
-
r((n) => {
|
|
96
|
-
const t = { ...n };
|
|
97
|
-
return t.findOptions.matchCase = e, t;
|
|
98
|
-
});
|
|
99
|
-
}, label: "Match Case", shortcut: { key: "C", modifiers: [b.Alt] }, icon: i(m, { iconKey: "FindCaseSensitive", size: "1rem" }) }), i(g, { style: V, selected: o.findOptions.matchEntireCell, onSelectToggle: (e) => {
|
|
100
|
-
r((n) => {
|
|
101
|
-
const t = { ...n };
|
|
102
|
-
return t.findOptions.matchEntireCell = e, t;
|
|
103
|
-
});
|
|
104
|
-
}, label: "Match Entire Cell", shortcut: { key: "E", modifiers: [b.Alt] }, icon: i(m, { iconKey: "FindWholeWord", size: "1rem" }) }), i(g, { style: V, selected: o.findOptions.useRegex, onSelectToggle: (e) => {
|
|
105
|
-
r((n) => {
|
|
106
|
-
const t = { ...n };
|
|
107
|
-
return t.findOptions.useRegex = e, t;
|
|
108
|
-
});
|
|
109
|
-
}, label: "Use Regular Expression", shortcut: { key: "R", modifiers: [b.Alt] }, icon: i(m, { iconKey: "FindRegEx", size: "1rem" }) })] }) }) }, inputLabel: { shrink: !0 }, htmlInput: { draggable: !1, ref: s, className: "input", autoFocus: !0, spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75) } } }, sx: { flex: "1 1 100%", marginRight: (e) => e.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (e) => Y ? `${e.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (e) => Y ? `${e.palette.error.main} !important` : void 0 } }, value: o.findOptions.text ?? "", onChange: (e) => {
|
|
110
|
-
r((n) => {
|
|
111
|
-
const t = { ...n };
|
|
112
|
-
return t.findOptions.text = e.target.value, t;
|
|
113
|
-
});
|
|
114
|
-
}, onKeyDown: (e) => ee(e, !1), onContextMenu: (e) => {
|
|
115
|
-
e.stopPropagation();
|
|
116
|
-
} }), i(g, { selected: o.findOptions.reverse, onSelectToggle: (e) => {
|
|
117
|
-
I(!1, !1);
|
|
118
|
-
}, touchRippleRef: U, label: "", shortcut: { key: "Enter", modifiers: [b.Shift] }, icon: i(m, { iconKey: o.findOptions.orientation !== k.Orientation.Column ? "ArrowBack" : "ArrowUpward" }), disabled: !o.findOptions.text }), i(g, { selected: !o.findOptions.reverse, onSelectToggle: (e) => {
|
|
119
|
-
I(!0, !1);
|
|
120
|
-
}, touchRippleRef: G, label: "Next Match", shortcut: { key: "Enter" }, icon: i(m, { iconKey: o.findOptions.orientation !== k.Orientation.Column ? "ArrowForward" : "ArrowDownward" }), disabled: !o.findOptions.text })] }), i(oe, { in: u, timeout: se, onExit: () => {
|
|
121
|
-
s.current?.focus();
|
|
122
|
-
}, children: d(h, { sx: { display: "flex", flexDirection: "row", alignItems: "center", marginTop: (e) => e.spacing(2) }, children: [i(ie, { label: "Replace", slotProps: { input: { sx: { paddingRight: (e) => e.spacing(1), backgroundImage: `linear-gradient(${w("#fff", T(5))}, ${w("#fff", T(5))})` } }, inputLabel: { shrink: !0 }, htmlInput: { ref: H, className: "input", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75) } } }, sx: { flex: "1 1 100%", marginRight: (e) => e.spacing(1) }, value: o.replaceText ?? "", onChange: (e) => {
|
|
123
|
-
r((n) => {
|
|
124
|
-
const t = { ...n };
|
|
125
|
-
return t.replaceText = e.target.value, t;
|
|
126
|
-
});
|
|
127
|
-
}, onKeyDown: (e) => ee(e, !0), onContextMenu: (e) => {
|
|
128
|
-
e.stopPropagation();
|
|
129
|
-
} }), i(g, { onSelectToggle: (e) => {
|
|
130
|
-
I(!0, !0);
|
|
131
|
-
}, touchRippleRef: q, label: "Replace", shortcut: { key: "Enter" }, icon: i(m, { iconKey: "FindReplace" }), disabled: !o.findOptions.text }), i(g, { onSelectToggle: (e) => {
|
|
132
|
-
I(!0, !0, !0);
|
|
133
|
-
}, touchRippleRef: J, label: "Replace All", shortcut: { key: "Enter", modifiers: [b.Ctrl, b.Alt] }, icon: i(m, { iconKey: "FindReplaceAll" }), disabled: !o.findOptions.text })] }) })] })] }), i(oe, { in: P, timeout: se, onExit: () => {
|
|
134
|
-
s.current?.focus();
|
|
135
|
-
}, children: d(h, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", gap: (e) => e.spacing(1.5), marginTop: (e) => e.spacing(1) }, children: [i(Fe, { orientation: "horizontal", sx: { marginBottom: (e) => e.spacing(1.5) } }), d(h, { sx: { display: "flex", flexDirection: te >= 383 ? "row" : "column", justifyContent: "space-evenly", alignItems: "center", gap: (e) => e.spacing(1), rowGap: (e) => e.spacing(2) }, tabIndex: -1, children: [i(z, { label: "Within", value: o.scope, options: le.FindScopeOptions, onSelect: (e) => {
|
|
136
|
-
r((n) => {
|
|
137
|
-
const t = { ...n };
|
|
138
|
-
return t.scope = e, t;
|
|
139
|
-
});
|
|
140
|
-
} }), i(z, { label: "Search", value: o.findOptions.orientation !== k.Orientation.Column, options: we, onSelect: (e) => {
|
|
141
|
-
r((n) => {
|
|
142
|
-
const t = { ...n };
|
|
143
|
-
return t.findOptions.orientation = e ? k.Orientation.Row : k.Orientation.Column, t;
|
|
144
|
-
});
|
|
145
|
-
} }), i(z, { label: "Look in", value: u && o.findOptions.fields?.[0] === p.Content.Values ? p.Content.Formulas : o.findOptions.fields?.[0], options: u ? pe : ce, onSelect: (e) => {
|
|
146
|
-
r((n) => {
|
|
147
|
-
const t = { ...n };
|
|
148
|
-
return t.findOptions.fields = [e], t;
|
|
149
|
-
});
|
|
150
|
-
} })] })] }) })] }) });
|
|
151
|
-
});
|
|
152
|
-
export {
|
|
153
|
-
Le as FindReplaceWindow,
|
|
154
|
-
Le as default
|
|
155
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { jsx as t, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import { memo as W, useState as h, useCallback as O, useEffect as G, useMemo as S } from "react";
|
|
3
|
-
import { alpha as i, getOverlayAlpha as p } from "@mui/material/styles";
|
|
4
|
-
import { Box as w, FormControl as D, InputLabel as H, Select as q, TextField as A, Typography as I, MenuItem as J } from "@mui/material";
|
|
5
|
-
import { NumberFormat as n } from "@sheetxl/sdk";
|
|
6
|
-
import { useCallbackRef as c, KeyCodes as Q } from "@sheetxl/utils-react";
|
|
7
|
-
import { OptionsDialog as U } from "@sheetxl/utils-mui";
|
|
8
|
-
/**
|
|
9
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.26
|
|
10
|
-
*
|
|
11
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
12
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
13
|
-
*/
|
|
14
|
-
const X = ["Ok", "Cancel"], ne = W((P) => {
|
|
15
|
-
const { initialValue: $, context: x, onOption: b, onValidateOption: u, onInput: C, onDone: m, options: v = X, defaultOption: l = v?.[0], cancelOption: d = "Cancel", sx: N, ...M } = P, [o, T] = h($), [V, j] = h(!1), g = O(async (e, a) => !0, []), f = c(async (e) => {
|
|
16
|
-
const a = e === d;
|
|
17
|
-
a || C?.(o, e), b?.(e, a, e === l), m?.();
|
|
18
|
-
}, [o, C, m, b, d, l]), B = c(async (e) => {
|
|
19
|
-
e.keyCode === Q.Enter && await g?.(o, null) !== !1 && f(l);
|
|
20
|
-
}, [o, f]), L = c((e) => {
|
|
21
|
-
T(e.target.value), g?.(e.target.value, null);
|
|
22
|
-
}, [u]), R = c(async (e) => {
|
|
23
|
-
let a = await Promise.resolve(u?.(e));
|
|
24
|
-
try {
|
|
25
|
-
a !== !1 && (a = await Promise.resolve(g?.(o, e)) ?? !0);
|
|
26
|
-
} catch {
|
|
27
|
-
}
|
|
28
|
-
return a ?? !0;
|
|
29
|
-
}, [u]), [k, F] = h(n.Styles.lookupStyle(o).formatType ?? n.Type.Custom);
|
|
30
|
-
G(() => {
|
|
31
|
-
F(n.Styles.lookupStyle(o).formatType ?? n.Type.Custom);
|
|
32
|
-
}, [o]);
|
|
33
|
-
const z = S(() => {
|
|
34
|
-
const e = n.Styles.lookupPrimary(), a = (r) => t(J, { value: r, children: r }, r), s = Object.keys(e).map((r) => a(e[r].formatType));
|
|
35
|
-
return s.push(a(n.Type.Custom)), s;
|
|
36
|
-
}, []), E = O((e) => {
|
|
37
|
-
const a = e.target.value;
|
|
38
|
-
F(a);
|
|
39
|
-
const s = n.Styles.lookupDefault(a);
|
|
40
|
-
s && T(s);
|
|
41
|
-
}, []), K = S(() => {
|
|
42
|
-
const e = x?.();
|
|
43
|
-
return e ? e.createTemporaryCell({ value: e.getValue() ?? 12345, style: { numberFormat: o } }) : null;
|
|
44
|
-
}, [k, o, x]);
|
|
45
|
-
return t(U, { title: "Number Format", options: v, onDone: m, onOption: (e) => f(e), onValidateOption: R, defaultOption: l, cancelOption: d, autoFocusSel: ".autoFocus", sx: { width: "580px", ...N }, ...M, children: y(w, { sx: { paddingTop: (e) => e.spacing(1), paddingBottom: (e) => e.spacing(0), rowGap: (e) => e.spacing(1), display: "flex", flexDirection: "column" }, children: [y(D, { sx: { minWidth: 135 }, size: "small", children: [t(H, { children: "Category" }), t(q, { value: k, label: "Category", onChange: E, sx: { backgroundImage: `linear-gradient(${i("#fff", p(5))}, ${i("#fff", p(5))})` }, children: z })] }), t(D, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: t(A, { label: "Code", onFocus: (e) => {
|
|
46
|
-
V || e.target?.select(), j(!0);
|
|
47
|
-
}, sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(0.5) } }, slotProps: { inputLabel: { shrink: !0 }, htmlInput: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75), backgroundImage: `linear-gradient(${i("#fff", p(5))}, ${i("#fff", p(5))})` } } }, value: o, onChange: L, onKeyDown: B, onContextMenu: (e) => {
|
|
48
|
-
e.stopPropagation();
|
|
49
|
-
} }) }), y(w, { children: [t(I, { variant: "caption", component: "div", sx: { paddingLeft: (e) => e.spacing(2) }, children: "Preview" }), t(I, { variant: "body2", component: "div", sx: { borderRadius: (e) => `${e.shape.borderRadius}px`, padding: (e) => e.spacing(1), border: (e) => `1px solid ${e.palette.grey[400]}` }, children: K?.getNumberFormat().displayText || "(empty)" })] })] }) });
|
|
50
|
-
});
|
|
51
|
-
export {
|
|
52
|
-
ne as NumberFormatDialog,
|
|
53
|
-
ne as default
|
|
54
|
-
};
|
package/node/assets/style.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._sheetxl-reset_11z3j_1{display:block;margin:0;padding:0;line-height:1}._sheetxl-reset_11z3j_1 table,._sheetxl-reset_11z3j_1 thead,._sheetxl-reset_11z3j_1 tbody,._sheetxl-reset_11z3j_1 tfoot,._sheetxl-reset_11z3j_1 tr,._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_1 td{display:block;width:auto;height:auto;margin:0;padding:0;border:none;border-collapse:inherit;border-spacing:0;border-color:inherit;vertical-align:inherit;text-align:left;font-weight:inherit;-webkit-border-horizontal-spacing:0;-webkit-border-vertical-spacing:0}._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_1 td{display:inline}html{color:initial}._table-style-options-container_1kfn2_1{container-type:inline-size}._table-style-options_1kfn2_1{display:grid;grid-template-columns:1fr;user-select:none}@container (width > 600px){._table-style-options_1kfn2_1{grid-template-rows:repeat(3,auto);grid-auto-flow:column;grid-auto-columns:1fr;gap:2px}}._range-row_akhf4_1{display:flex;flex-direction:column;flex:1 1 100%;width:100%;align-items:center}@container (width > 600px){._range-row_akhf4_1{flex-direction:row;gap:12px;justify-content:space-between}}._action-row_akhf4_15{display:flex;align-items:start;flex-direction:column;width:100%;gap:4px}@container (width > 600px){._action-row_akhf4_15{align-items:center;flex-direction:row;justify-content:space-evenly}}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4{fill:currentColor}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .activeColor{fill:var(--sxl-color-active)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .background{fill:var(--sxl-app-color-background)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .grey{fill:var(--sxl-app-color-grey)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .highContrast{fill:var(--sxl-app-color-high)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .info{fill:var(--sxl-app-color-info)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .info.light{fill:var(--sxl-app-color-info-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .info.dark{fill:var(--sxl-app-color-info-dark)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .secondary{fill:var(--sxl-app-color-secondary)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .secondary.light{fill:var(--sxl-app-color-secondary-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .secondary.dark{fill:var(--sxl-app-color-secondary-dark)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .success{fill:var(--sxl-app-color-success)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .success.light{fill:var(--sxl-app-color-success-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .success.dark{fill:var(--sxl-app-color-success-dark)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .warning{fill:var(--sxl-app-color-warning)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .warning .light{fill:var(--sxl-app-color-warning-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .warning .dark{fill:var(--sxl-app-color-warning-dark)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .error{fill:var(--sxl-app-color-error)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .error .light{fill:var(--sxl-app-color-error-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .error .dark{fill:var(--sxl-app-color-error-dark)}._sheetxl-workbook_g5t6x_5{display:flex;position:relative;overflow:hidden;flex-direction:column;width:100%;height:100%;min-width:0;min-height:0;outline:none}._sheetxl-workbook_g5t6x_5 .splitPane .styled-resizer{background-color:var(--sxl-app-color-grey, grey)}._sheetxl-workbook_g5t6x_5 .splitPane .styled-resizer:hover,._sheetxl-workbook_g5t6x_5 .splitPane.dragging .styled-resizer{background-color:var(--sxl-app-color-primary, blue)}._card_1a398_7{width:100%}._actionRoot_1a398_11{padding:8px 8px 8px 16px;justify-content:space-between}._icons_1a398_16{margin-left:auto;display:flex;align-items:center}._expand_1a398_22{padding:8px;transform:rotate(0);color:#d32f2f;transition:all .2s ease-in-out}._expandOpen_1a398_29{transform:rotate(180deg)}._stackTraceContainer_1a398_33{padding:16px}._paper_1a398_37{background-color:#fff;padding:16px}._checkIcon_1a398_42{font-size:20px;padding-right:4px}._button_1a398_47{padding:0;text-transform:none}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.26
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
8
|
-
import { memo as e, useMemo as i, useState as o, useCallback as a } from "react";
|
|
9
|
-
import { alpha as s, getOverlayAlpha as l } from "@mui/material/styles";
|
|
10
|
-
import { Box as r, FormControl as p, TextField as c, InputLabel as u, Select as d, Typography as m, MenuItem as f } from "@mui/material";
|
|
11
|
-
import { IRange as g } from "@sheetxl/sdk";
|
|
12
|
-
import { useCallbackRef as x, KeyCodes as h } from "@sheetxl/utils-react";
|
|
13
|
-
import { OptionsDialog as y } from "@sheetxl/utils-mui";
|
|
14
|
-
const C = ["Autofit", "Ok", "Cancel"], O = e((e2) => {
|
|
15
|
-
const { initialValue: O2, context: z, onOption: v, onValidateOption: w, onInput: P, onDone: b, options: k = C, defaultOption: T = k?.[1], cancelOption: U = "Cancel", sx: D, ...F } = e2, I = i(() => z?.().getOrientation() === g.Orientation.Column, [z]), [$, M] = o(O2), [V, j] = o(false), B = a(async (t2, n2) => true, []), L = i(() => {
|
|
16
|
-
if (!z().toUnits) return null;
|
|
17
|
-
let t2 = $?.size ?? 0, n2 = "Px";
|
|
18
|
-
return "Px" === $.unit ? (t2 = z().toUnits?.(t2), n2 = z().getUnitText()) : (t2 = z().toPixels?.(t2), n2 = "Px"), { size: t2, unit: n2 };
|
|
19
|
-
}, [$?.unit, $?.size]), N = x(async (t2) => {
|
|
20
|
-
const n2 = t2 === U;
|
|
21
|
-
n2 || P?.($, t2), v?.(t2, n2, t2 === T), b?.();
|
|
22
|
-
}, [$, P, b, v, U, T]), R = x(async (t2) => {
|
|
23
|
-
if (t2.keyCode === h.Enter) {
|
|
24
|
-
false !== await B?.($, null) && N(T);
|
|
25
|
-
}
|
|
26
|
-
}, [$, N]), S = x(async (t2) => {
|
|
27
|
-
let n2 = await Promise.resolve(w?.(t2));
|
|
28
|
-
try {
|
|
29
|
-
false !== n2 && (n2 = await Promise.resolve(B?.($, t2)) ?? true);
|
|
30
|
-
} catch (t3) {
|
|
31
|
-
}
|
|
32
|
-
return n2 ?? true;
|
|
33
|
-
}, [w]), W = x((t2) => {
|
|
34
|
-
const n2 = { ...$, size: Number(t2.target.value) };
|
|
35
|
-
M(n2), B?.(n2, null);
|
|
36
|
-
}, [$, w]), A = x((t2) => {
|
|
37
|
-
const n2 = t2.target.value, e3 = { ...$, unit: n2 };
|
|
38
|
-
M(e3);
|
|
39
|
-
}, [$]), E = i(() => {
|
|
40
|
-
const n2 = z().getUnitText(), e3 = (n3) => t(f, { value: n3, children: n3 }, n3), i2 = [];
|
|
41
|
-
return i2.push(e3("Px")), i2.push(e3(n2)), i2;
|
|
42
|
-
}, []);
|
|
43
|
-
return t(y, { title: "Resize " + (I ? "Columns" : "Rows"), options: k, onDone: b, onOption: (t2) => N(t2), onValidateOption: S, defaultOption: T, cancelOption: U, autoFocusSel: ".autoFocus", sx: { width: "380px", ...D }, ...F, children: n(r, { sx: { paddingTop: (t2) => t2.spacing(0), paddingBottom: (t2) => t2.spacing(1), display: "flex", flexDirection: "column" }, children: [n(r, { sx: { rowGap: (t2) => t2.spacing(1), display: "flex", flexDirection: "row", gap: (t2) => t2.spacing(0.5), alignItems: "end", justifyContent: "center" }, children: [t(p, { sx: { paddingTop: (t2) => t2.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: t(c, { label: "Size", onFocus: (t2) => {
|
|
44
|
-
V || t2.target?.select(), j(true);
|
|
45
|
-
}, sx: { "& .MuiFormHelperText-root": { marginTop: (t2) => t2.spacing(0.5) } }, slotProps: { inputLabel: { shrink: true }, htmlInput: { className: "autoFocus", spellCheck: false, autoComplete: "off", type: "number", inputMode: "numeric", pattern: "[0-9]*", sx: { paddingTop: (t2) => t2.spacing(1.25), paddingBottom: (t2) => t2.spacing(0.75), backgroundImage: `linear-gradient(${s("#fff", l(5))}, ${s("#fff", l(5))})` } } }, value: $.size, onChange: W, onKeyDown: R, onContextMenu: (t2) => {
|
|
46
|
-
t2.stopPropagation();
|
|
47
|
-
} }) }), n(p, { sx: { minWidth: 85 }, size: "small", children: [t(u, { children: "Unit" }), t(d, { value: $.unit, label: "Unit", onChange: A, sx: { backgroundImage: `linear-gradient(${s("#fff", l(5))}, ${s("#fff", l(5))})` }, children: E })] })] }), L && t(r, { children: n(m, { variant: "body2", component: "div", sx: { paddingLeft: (t2) => t2.spacing(2) }, children: [L.size, " ", L.unit] }) })] }) });
|
|
48
|
-
});
|
|
49
|
-
export {
|
|
50
|
-
O as ResizeHeaderDialog,
|
|
51
|
-
O as default
|
|
52
|
-
};
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.26
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
8
|
-
import { memo as n, useRef as i, useState as o, useEffect as l, useLayoutEffect as r, useMemo as s } from "react";
|
|
9
|
-
import { useMeasure as a } from "react-use";
|
|
10
|
-
import { alpha as c, getOverlayAlpha as p } from "@mui/material/styles";
|
|
11
|
-
import { DialogContent as d, Box as u, TextField as f, InputAdornment as m, Collapse as g, MenuItem as x, FormControl as h, InputLabel as O, Select as y } from "@mui/material";
|
|
12
|
-
import { ICell as C, IRange as b } from "@sheetxl/sdk";
|
|
13
|
-
import { CommandContext as v } from "@sheetxl/react";
|
|
14
|
-
import { useCallbackRef as R, KeyCodes as F, DynamicIcon as k, KeyModifiers as T } from "@sheetxl/utils-react";
|
|
15
|
-
import { InternalWindow as w, ExhibitOptionButton as S, ExhibitDivider as E } from "@sheetxl/utils-mui";
|
|
16
|
-
const K = { width: "1.5rem", height: "1.5rem" }, I = n((n2) => {
|
|
17
|
-
const { label: i2, value: r2, options: a2, onSelect: d2, tabIndex: u2 = 0, ...f2 } = n2, [m2, g2] = o(() => M(r2, a2));
|
|
18
|
-
l(() => {
|
|
19
|
-
g2(M(r2, a2));
|
|
20
|
-
}, [r2, a2]);
|
|
21
|
-
const C2 = R((e2) => {
|
|
22
|
-
g2(e2.target.value), d2?.(a2[e2.target.value]);
|
|
23
|
-
}, [d2, a2]), b2 = s(() => Object.keys(a2).map((t2) => e(x, { value: t2, children: t2 }, t2)), [a2]);
|
|
24
|
-
return t(h, { sx: { minWidth: 135 }, size: "small", children: [e(O, { children: i2 }), e(y, { inputProps: { tabIndex: u2 }, value: m2, label: i2, onChange: C2, sx: { backgroundImage: `linear-gradient(${c("#fff", p(5))}, ${c("#fff", p(5))})` }, ...f2, children: b2 })] });
|
|
25
|
-
}), D = { enter: 140, exit: 140 }, A = { Formulas: C.Content.Formulas, Values: C.Content.Values, Notes: C.Content.Notes, Comments: C.Content.Comments }, B = { ...A };
|
|
26
|
-
delete B.Values;
|
|
27
|
-
const $ = { "By Rows": true, "By Columns": false }, M = (e2, t2) => {
|
|
28
|
-
const n2 = Object.keys(t2);
|
|
29
|
-
for (let i2 = 0; i2 < n2.length; i2++) {
|
|
30
|
-
const o2 = n2[i2];
|
|
31
|
-
if (t2[o2] === e2) return o2;
|
|
32
|
-
}
|
|
33
|
-
}, P = n((n2) => {
|
|
34
|
-
const { initialValue: s2, context: x2, onInput: h2, title: O2, onHide: y2, autoFocus: M2, ...P2 } = n2, V = s2?.replace ?? false, z = s2?.findOptions, L = z.text ?? null, W = s2?.replaceOptions, N = s2?.replaceText ?? null, j = x2?.(), H = i(null), U = i(null), G = i(null), q = i(null), J = i(null), Q = i(null), X = (e2, t2) => {
|
|
35
|
-
if (!t2) return;
|
|
36
|
-
t2.start(e2, { center: false }), setTimeout(() => t2.stop(e2), 180);
|
|
37
|
-
}, [Y, Z] = o(false), [_, ee] = o(false), [te, ne] = o(V), [ie, oe] = o(false), [le, re] = o(false), [se, ae] = o({ replaceText: null, replace: V, replaceOptions: null, findOptions: { text: null, matchCase: false, matchEntireCell: false, useRegex: false, orientation: b.Orientation.Row, fields: [C.Content.Formulas] }, scope: v.FindScopeOptions.Sheet }), ce = R(async (e2, t2, n3, i2) => {
|
|
38
|
-
if (!j) return;
|
|
39
|
-
const o2 = { ...se };
|
|
40
|
-
o2.replaceOptions = { ...o2.replaceOptions }, o2.findOptions = { ...o2.findOptions }, o2.replaceOptions.maxCount = n3 ? void 0 : 1, o2.replace = t2, t2 && se.findOptions.fields?.[0] === C.Content.Values && (o2.findOptions.fields = [C.Content.Formulas]), o2.findOptions.reverse = !e2;
|
|
41
|
-
const l2 = await j({ autoFocus: i2, ...o2 });
|
|
42
|
-
oe(0 === l2);
|
|
43
|
-
}, [se, j]);
|
|
44
|
-
l(() => {
|
|
45
|
-
oe(false);
|
|
46
|
-
}, [se, _, te]);
|
|
47
|
-
const pe = R((e2, t2) => {
|
|
48
|
-
if (e2.keyCode === F.Enter) {
|
|
49
|
-
if (!se.findOptions.text) return;
|
|
50
|
-
let n3 = true, i2 = false;
|
|
51
|
-
e2.shiftKey && (n3 = false), t2 ? (e2.ctrlKey && e2.altKey && (i2 = true), X(e2, i2 ? Q.current : J.current)) : X(e2, n3 ? q.current : G.current), ce(n3, t2, i2, false);
|
|
52
|
-
}
|
|
53
|
-
}, [se]), de = i(null);
|
|
54
|
-
r(() => {
|
|
55
|
-
ae((e2) => {
|
|
56
|
-
const t2 = { ...e2 };
|
|
57
|
-
t2.findOptions.text = L && L.length > 0 ? L : e2.findOptions.text ?? "", Z(true), null !== N && (t2.replaceText = N ?? ""), z && (t2.findOptions = { ...t2.findOptions, ...z }), t2.replaceText || (t2.replaceText = ""), t2.replaceOptions && (t2.replaceOptions = { ...t2.replaceOptions }), W && (t2.replaceOptions = { ...t2.replaceOptions, ...W }), se.findOptions.fields?.[0] || (se.findOptions.fields = [C.Content.Formulas]);
|
|
58
|
-
const n3 = !(!V && !W && null === N);
|
|
59
|
-
return n3 && ne(n3), t2;
|
|
60
|
-
}), le || de.current?.focus();
|
|
61
|
-
}, [s2, V, L, N, z, W]), l(() => {
|
|
62
|
-
te ? (se.findOptions.fields[0], C.Content.Values) : Z(true);
|
|
63
|
-
}, [te]), l(() => {
|
|
64
|
-
if (Y && H.current && se.findOptions.text === H.current.value) return H.current === document.activeElement || H.current.contains(document.activeElement) ? (H.current?.select(), void Z(false)) : void H.current.addEventListener("focus", () => {
|
|
65
|
-
H.current?.select(), Z(false);
|
|
66
|
-
}, { once: true });
|
|
67
|
-
}, [Y, se]);
|
|
68
|
-
const [ue, { width: fe }] = a();
|
|
69
|
-
return e(w, { ref: de, title: O2 ?? (te ? "Find & Replace" : "Find"), initialPosition: { y: "35" }, autoFocusSel: ".input", onHide: y2, onFocus: () => re(true), onBlur: () => {
|
|
70
|
-
re(false), oe(false);
|
|
71
|
-
}, slotProps: { paper: { elevation: le ? 3 : 1 } }, ...P2, children: t(d, { dividers: true, ref: ue, sx: { display: "flex", flexDirection: "column", paddingLeft: (e2) => e2.spacing(1.5), paddingRight: (e2) => e2.spacing(1.5) }, onKeyDown: (e2) => {
|
|
72
|
-
if ("h" === e2.key && e2.ctrlKey) ne(true), H.current?.contains(document.activeElement) && U.current?.focus();
|
|
73
|
-
else if ("f" === e2.key && e2.ctrlKey) H.current?.focus();
|
|
74
|
-
else if ("c" === e2.key && e2.altKey) ae((e3) => {
|
|
75
|
-
const t2 = { ...e3 };
|
|
76
|
-
return t2.findOptions.matchCase = !e3.findOptions.matchCase, t2;
|
|
77
|
-
});
|
|
78
|
-
else if ("e" === e2.key && e2.altKey) ae((e3) => {
|
|
79
|
-
const t2 = { ...e3 };
|
|
80
|
-
return t2.findOptions.matchEntireCell = !e3.findOptions.matchEntireCell, t2;
|
|
81
|
-
});
|
|
82
|
-
else {
|
|
83
|
-
if ("r" !== e2.key || !e2.altKey) return;
|
|
84
|
-
ae((e3) => {
|
|
85
|
-
const t2 = { ...e3 };
|
|
86
|
-
return t2.findOptions.useRegex = !e3.findOptions.useRegex, t2;
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
e2.preventDefault();
|
|
90
|
-
}, children: [t(u, { sx: { display: "flex", flexDirection: "row", gap: (e2) => e2.spacing(1) }, children: [t(u, { sx: { display: "flex", flexDirection: "row", alignItems: "start", gap: (e2) => e2.spacing(0.25), paddingTop: "3px" }, children: [e(S, { selected: _, onSelectToggle: (e2) => {
|
|
91
|
-
ee(e2);
|
|
92
|
-
}, preventFocus: true, label: "Toggle Additional Options", icon: e(k, { iconKey: "FindOptions" }) }), e(S, { selected: te, onSelectToggle: (e2) => {
|
|
93
|
-
ne(e2);
|
|
94
|
-
}, preventFocus: true, label: "Toggle Replace", icon: e(k, { iconKey: "FindReplaceToggle" }), shortcut: { key: te ? "F" : "H", modifiers: [T.Ctrl] } })] }), t(u, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box" }, children: [t(u, { sx: { display: "flex", flexDirection: "row", alignItems: "center" }, children: [e(f, { label: "Find", slotProps: { input: { sx: { paddingRight: (e2) => e2.spacing(1), minWidth: fe > 460 ? "20em" : void 0, backgroundImage: `linear-gradient(${c("#fff", p(5))}, ${c("#fff", p(5))})` }, endAdornment: e(m, { position: "end", children: t(u, { sx: { display: "flex", alignItems: "center", flexDirection: "row", gap: "2px" }, children: [e(S, { style: K, selected: se.findOptions.matchCase, onBlur: () => {
|
|
95
|
-
}, onSelectToggle: (e2) => {
|
|
96
|
-
ae((t2) => {
|
|
97
|
-
const n3 = { ...t2 };
|
|
98
|
-
return n3.findOptions.matchCase = e2, n3;
|
|
99
|
-
});
|
|
100
|
-
}, label: "Match Case", shortcut: { key: "C", modifiers: [T.Alt] }, icon: e(k, { iconKey: "FindCaseSensitive", size: "1rem" }) }), e(S, { style: K, selected: se.findOptions.matchEntireCell, onSelectToggle: (e2) => {
|
|
101
|
-
ae((t2) => {
|
|
102
|
-
const n3 = { ...t2 };
|
|
103
|
-
return n3.findOptions.matchEntireCell = e2, n3;
|
|
104
|
-
});
|
|
105
|
-
}, label: "Match Entire Cell", shortcut: { key: "E", modifiers: [T.Alt] }, icon: e(k, { iconKey: "FindWholeWord", size: "1rem" }) }), e(S, { style: K, selected: se.findOptions.useRegex, onSelectToggle: (e2) => {
|
|
106
|
-
ae((t2) => {
|
|
107
|
-
const n3 = { ...t2 };
|
|
108
|
-
return n3.findOptions.useRegex = e2, n3;
|
|
109
|
-
});
|
|
110
|
-
}, label: "Use Regular Expression", shortcut: { key: "R", modifiers: [T.Alt] }, icon: e(k, { iconKey: "FindRegEx", size: "1rem" }) })] }) }) }, inputLabel: { shrink: true }, htmlInput: { draggable: false, ref: H, className: "input", autoFocus: true, spellCheck: false, autoComplete: "off", sx: { paddingTop: (e2) => e2.spacing(1.25), paddingBottom: (e2) => e2.spacing(0.75) } } }, sx: { flex: "1 1 100%", marginRight: (e2) => e2.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (e2) => ie ? `${e2.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (e2) => ie ? `${e2.palette.error.main} !important` : void 0 } }, value: se.findOptions.text ?? "", onChange: (e2) => {
|
|
111
|
-
ae((t2) => {
|
|
112
|
-
const n3 = { ...t2 };
|
|
113
|
-
return n3.findOptions.text = e2.target.value, n3;
|
|
114
|
-
});
|
|
115
|
-
}, onKeyDown: (e2) => pe(e2, false), onContextMenu: (e2) => {
|
|
116
|
-
e2.stopPropagation();
|
|
117
|
-
} }), e(S, { selected: se.findOptions.reverse, onSelectToggle: (e2) => {
|
|
118
|
-
ce(false, false);
|
|
119
|
-
}, touchRippleRef: G, label: "", shortcut: { key: "Enter", modifiers: [T.Shift] }, icon: e(k, { iconKey: se.findOptions.orientation !== b.Orientation.Column ? "ArrowBack" : "ArrowUpward" }), disabled: !se.findOptions.text }), e(S, { selected: !se.findOptions.reverse, onSelectToggle: (e2) => {
|
|
120
|
-
ce(true, false);
|
|
121
|
-
}, touchRippleRef: q, label: "Next Match", shortcut: { key: "Enter" }, icon: e(k, { iconKey: se.findOptions.orientation !== b.Orientation.Column ? "ArrowForward" : "ArrowDownward" }), disabled: !se.findOptions.text })] }), e(g, { in: te, timeout: D, onExit: () => {
|
|
122
|
-
H.current?.focus();
|
|
123
|
-
}, children: t(u, { sx: { display: "flex", flexDirection: "row", alignItems: "center", marginTop: (e2) => e2.spacing(2) }, children: [e(f, { label: "Replace", slotProps: { input: { sx: { paddingRight: (e2) => e2.spacing(1), backgroundImage: `linear-gradient(${c("#fff", p(5))}, ${c("#fff", p(5))})` } }, inputLabel: { shrink: true }, htmlInput: { ref: U, className: "input", spellCheck: false, autoComplete: "off", sx: { paddingTop: (e2) => e2.spacing(1.25), paddingBottom: (e2) => e2.spacing(0.75) } } }, sx: { flex: "1 1 100%", marginRight: (e2) => e2.spacing(1) }, value: se.replaceText ?? "", onChange: (e2) => {
|
|
124
|
-
ae((t2) => {
|
|
125
|
-
const n3 = { ...t2 };
|
|
126
|
-
return n3.replaceText = e2.target.value, n3;
|
|
127
|
-
});
|
|
128
|
-
}, onKeyDown: (e2) => pe(e2, true), onContextMenu: (e2) => {
|
|
129
|
-
e2.stopPropagation();
|
|
130
|
-
} }), e(S, { onSelectToggle: (e2) => {
|
|
131
|
-
ce(true, true);
|
|
132
|
-
}, touchRippleRef: J, label: "Replace", shortcut: { key: "Enter" }, icon: e(k, { iconKey: "FindReplace" }), disabled: !se.findOptions.text }), e(S, { onSelectToggle: (e2) => {
|
|
133
|
-
ce(true, true, true);
|
|
134
|
-
}, touchRippleRef: Q, label: "Replace All", shortcut: { key: "Enter", modifiers: [T.Ctrl, T.Alt] }, icon: e(k, { iconKey: "FindReplaceAll" }), disabled: !se.findOptions.text })] }) })] })] }), e(g, { in: _, timeout: D, onExit: () => {
|
|
135
|
-
H.current?.focus();
|
|
136
|
-
}, children: t(u, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", gap: (e2) => e2.spacing(1.5), marginTop: (e2) => e2.spacing(1) }, children: [e(E, { orientation: "horizontal", sx: { marginBottom: (e2) => e2.spacing(1.5) } }), t(u, { sx: { display: "flex", flexDirection: fe >= 383 ? "row" : "column", justifyContent: "space-evenly", alignItems: "center", gap: (e2) => e2.spacing(1), rowGap: (e2) => e2.spacing(2) }, tabIndex: -1, children: [e(I, { label: "Within", value: se.scope, options: v.FindScopeOptions, onSelect: (e2) => {
|
|
137
|
-
ae((t2) => {
|
|
138
|
-
const n3 = { ...t2 };
|
|
139
|
-
return n3.scope = e2, n3;
|
|
140
|
-
});
|
|
141
|
-
} }), e(I, { label: "Search", value: se.findOptions.orientation !== b.Orientation.Column, options: $, onSelect: (e2) => {
|
|
142
|
-
ae((t2) => {
|
|
143
|
-
const n3 = { ...t2 };
|
|
144
|
-
return n3.findOptions.orientation = e2 ? b.Orientation.Row : b.Orientation.Column, n3;
|
|
145
|
-
});
|
|
146
|
-
} }), e(I, { label: "Look in", value: te && se.findOptions.fields?.[0] === C.Content.Values ? C.Content.Formulas : se.findOptions.fields?.[0], options: te ? B : A, onSelect: (e2) => {
|
|
147
|
-
ae((t2) => {
|
|
148
|
-
const n3 = { ...t2 };
|
|
149
|
-
return n3.findOptions.fields = [e2], n3;
|
|
150
|
-
});
|
|
151
|
-
} })] })] }) })] }) });
|
|
152
|
-
});
|
|
153
|
-
export {
|
|
154
|
-
P as FindReplaceWindow,
|
|
155
|
-
P as default
|
|
156
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.26
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
8
|
-
import { memo as t, useState as i } from "react";
|
|
9
|
-
import { Box as o, FormControlLabel as l, Checkbox as r } from "@mui/material";
|
|
10
|
-
import { Sort as a, IRange as s } from "@sheetxl/sdk";
|
|
11
|
-
import { useCallbackRef as c } from "@sheetxl/utils-react";
|
|
12
|
-
import { OptionsDialog as d } from "@sheetxl/utils-mui";
|
|
13
|
-
const m = t((t2) => {
|
|
14
|
-
const { initialValue: m2, context: u, onInput: p, onDone: h, ...v } = t2, C = u?.().range, O = u?.().cell.toString(), [f, H] = i(m2 ?? a.DefaultRangeOptions), b = c((e2) => {
|
|
15
|
-
let n2 = null;
|
|
16
|
-
"Sort" === e2 && (n2 = { ...m2, ...f }), p?.(n2), h?.(n2);
|
|
17
|
-
}, [f, h, p, m2]);
|
|
18
|
-
return e(d, { title: "Sort", options: ["Sort", "Cancel"], onDone: b, ...v, children: n(o, { sx: { display: "flex", flexDirection: "column" }, children: [e(l, { control: e(r, { checked: !f.reverse, onChange: () => H((e2) => ({ ...e2, reverse: !e2.reverse })) }), label: "Is Ascending", labelPlacement: "end" }), e(l, { control: e(r, { checked: f.hasHeader, onChange: () => H((e2) => ({ ...e2, hasHeader: !e2.hasHeader })) }), label: "Has Header", labelPlacement: "end" }), e(l, { control: e(r, { checked: f.collatorOptions?.sensitivity === a.CaseSensitiveOptions.sensitivity, onChange: () => H((e2) => ({ ...e2, collatorOptions: f.collatorOptions?.sensitivity === a.CaseSensitiveOptions.sensitivity ? a.CaseInsensitiveOptions : a.CaseSensitiveOptions })) }), label: "Case Sensitive", labelPlacement: "end" }), e(l, { control: e(r, { checked: f.orientation === s.Orientation.Row, onChange: () => H((e2) => {
|
|
19
|
-
const n2 = e2.orientation === s.Orientation.Row ? s.Orientation.Column : s.Orientation.Row;
|
|
20
|
-
return { ...C.getDefaultSortCriteria(n2, O).options, includeHidden: e2.includeHidden, reverse: e2.reverse, orientation: n2 };
|
|
21
|
-
}) }), label: "Row Sort", labelPlacement: "end" }), e(l, { control: e(r, { checked: f.includeHidden, onChange: () => H((e2) => ({ ...e2, includeHidden: !e2.includeHidden })) }), label: "Include Hidden", labelPlacement: "end" })] }) });
|
|
22
|
-
});
|
|
23
|
-
export {
|
|
24
|
-
m as SortDialog,
|
|
25
|
-
m as default
|
|
26
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.26
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
8
|
-
import { memo as t, useState as o, useCallback as a } from "react";
|
|
9
|
-
import { Box as i, FormControlLabel as l, Checkbox as r } from "@mui/material";
|
|
10
|
-
import { useCallbackRef as s } from "@sheetxl/utils-react";
|
|
11
|
-
import { OptionsDialog as p } from "@sheetxl/utils-mui";
|
|
12
|
-
import { RangeInput as c } from "./index.mjs";
|
|
13
|
-
const d = ["Ok", "Cancel"], m = t((t2) => {
|
|
14
|
-
const { onInput: m2, onOption: u, onValidateOption: g, onDone: f, options: h = d, defaultOption: x = h?.[0], cancelOption: O = "Cancel", sx: b, initialValue: C, context: v, ...D } = t2, [I, N] = o(false), [T, V] = o(() => C?.hasHeader ?? false), [j, k] = o(() => C?.ranges ?? null), w = s((e2) => {
|
|
15
|
-
const n2 = { ...C, hasHeader: T, ranges: j }, t3 = e2 === O;
|
|
16
|
-
t3 || m2?.(n2), u?.(e2, t3, e2 === x), f?.({ option: e2, tableOptions: n2 });
|
|
17
|
-
}, [f, u, x, O, T, j, C]), y = a(async (e2, n2) => null, []);
|
|
18
|
-
return e(p, { title: "Insert Table", options: h, onDone: w, onValidateOption: y, defaultOption: x, cancelOption: O, autoFocusSel: ".range-input input", sx: { width: "360px", ...b }, ...D, children: n(i, { sx: { paddingTop: (e2) => e2.spacing(1), paddingBottom: (e2) => e2.spacing(0), rowGap: (e2) => e2.spacing(1), display: "flex", flexDirection: "column" }, children: [e(c, { formName: "range", value: j, onChangeInput: (e2) => k(e2), resolvedAddress: v ? v().getNames().getRanges.bind(v().getNames()) : void 0, onFocus: (e2) => {
|
|
19
|
-
I || e2.target?.select(), N(true);
|
|
20
|
-
} }), e(l, { control: e(r, { checked: T, onChange: () => V(!T) }), label: "Table has headers", labelPlacement: "end" })] }) });
|
|
21
|
-
});
|
|
22
|
-
export {
|
|
23
|
-
m as TableNewDialog,
|
|
24
|
-
m as default
|
|
25
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.26
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
8
|
-
import { memo as n, useMemo as o, useState as e, useCallback as a } from "react";
|
|
9
|
-
import { alpha as i, getOverlayAlpha as l } from "@mui/material/styles";
|
|
10
|
-
import { Box as s, FormControl as r, TextField as c } from "@mui/material";
|
|
11
|
-
import { useCallbackRef as p } from "@sheetxl/utils-react";
|
|
12
|
-
import { OptionsDialog as m } from "@sheetxl/utils-mui";
|
|
13
|
-
const u = ["Ok", "Cancel"], d = n((n2) => {
|
|
14
|
-
const { initialValue: d2 = null, onInput: g, context: f, onOption: x, onValidateOption: h, onDone: C, options: O = u, defaultOption: y = O?.[0], cancelOption: w = "Cancel", sx: F, ...T } = n2, k = o(() => {
|
|
15
|
-
const t2 = d2 ?? f?.()?.getComments();
|
|
16
|
-
let n3 = "";
|
|
17
|
-
if (t2 && t2.content && t2.content.runs) {
|
|
18
|
-
const o2 = t2.content.runs;
|
|
19
|
-
for (let t3 = 0; t3 < o2.length; t3++) {
|
|
20
|
-
const e2 = o2[t3];
|
|
21
|
-
n3 += e2?.text;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return n3;
|
|
25
|
-
}, []), [v, I] = e(k), [b, D] = e(false), P = a(async (t2, n3) => null, []), V = p(async (t2) => {
|
|
26
|
-
const n3 = "" === v ? [] : v.split("\n"), o2 = t2 === w;
|
|
27
|
-
if (!o2) {
|
|
28
|
-
const t3 = n3.length, o3 = new Array(t3);
|
|
29
|
-
for (let e3 = 0; e3 < t3; e3++) o3[e3] = { text: n3[e3] };
|
|
30
|
-
const e2 = { content: { runs: o3 } };
|
|
31
|
-
g?.(e2);
|
|
32
|
-
}
|
|
33
|
-
x?.(t2, o2, t2 === y), C?.();
|
|
34
|
-
}, [v, g, C, x, y, w]), B = p((t2) => {
|
|
35
|
-
I(t2.target.value), P(t2.target.value, null);
|
|
36
|
-
}, [h]), E = p(async (t2) => {
|
|
37
|
-
let n3 = await Promise.resolve(h?.(t2));
|
|
38
|
-
try {
|
|
39
|
-
false !== n3 && (n3 = await P(v, t2));
|
|
40
|
-
} catch (t3) {
|
|
41
|
-
}
|
|
42
|
-
return n3 ?? true;
|
|
43
|
-
}, [h, v]);
|
|
44
|
-
return t(m, { title: (k ? "Edit" : "Insert") + " Comments", options: O, onDone: C, onOption: (t2) => V(t2), onValidateOption: E, defaultOption: y, cancelOption: w, autoFocusSel: ".autoFocus", sx: { width: "480px", ...F }, ...T, children: t(s, { sx: { paddingTop: (t2) => t2.spacing(1), paddingBottom: (t2) => t2.spacing(0), rowGap: (t2) => t2.spacing(1), display: "flex", flexDirection: "column" }, children: t(r, { sx: { paddingTop: (t2) => t2.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: t(c, { label: "Comments", placeholder: "Enter a comment.", onFocus: (t2) => {
|
|
45
|
-
b || t2.target?.select(), D(true);
|
|
46
|
-
}, sx: { "& .MuiFormHelperText-root": { marginTop: (t2) => t2.spacing(0.5) } }, slotProps: { inputLabel: { shrink: true }, htmlInput: { className: "autoFocus", spellCheck: false, autoComplete: "off", sx: { paddingTop: (t2) => t2.spacing(1.25), paddingBottom: (t2) => t2.spacing(0.75), backgroundImage: `linear-gradient(${i("#fff", l(5))}, ${i("#fff", l(5))})` } } }, value: v, onChange: B, onContextMenu: (t2) => {
|
|
47
|
-
t2.stopPropagation();
|
|
48
|
-
} }) }) }) });
|
|
49
|
-
});
|
|
50
|
-
export {
|
|
51
|
-
d as CommentsDialog,
|
|
52
|
-
d as default
|
|
53
|
-
};
|