@sheetxl/studio-mui 0.7.28-beta.4 → 0.8.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/browser/esm/{Drbpg4A9TaJUZd5A.mjs → 5cbK03T_Oh3tNdR7.mjs} +7 -5
  2. package/browser/esm/{GCJRjX28QYfxi-Lg.mjs → 9eKCkvqpMQwqcXiw.mjs} +1 -1
  3. package/browser/esm/B1Yp_uy1vFHcJB3U.mjs +13 -0
  4. package/browser/esm/Biy7bhzzzPb5sfRN.mjs +152 -0
  5. package/browser/esm/Blaj2R5hYxtLAW__.mjs +117 -0
  6. package/browser/esm/{CVxEcB8lAnOQ-oPh.mjs → ByeL_BZuJ2kl8gtf.mjs} +46 -47
  7. package/browser/esm/{BLjxQ1NUjmULb00s.mjs → C1Rp2hZrApo5MUc8.mjs} +2 -2
  8. package/browser/esm/{C7WFuxTBA8MWoOQj.mjs → CEvZe2cZK-voZTif.mjs} +5 -5
  9. package/browser/esm/{RbGJTMzxMTlkFlTq.mjs → CIu1bjPJe_x31Oww.mjs} +195 -174
  10. package/browser/esm/COv-m-c2byCgvU3M.mjs +14861 -0
  11. package/browser/esm/CjznclrKqJRi7u9O.mjs +77 -0
  12. package/browser/esm/{DoOWIBDSfgrvMmNO.mjs → CoSiOS-og0zFw4Ws.mjs} +587 -556
  13. package/browser/esm/{6GrWBX-cyxTRJerw.mjs → CtEFHbzYNvYjDYvi.mjs} +7 -7
  14. package/browser/esm/D6S8kVTzOjCn0-SK.mjs +627 -0
  15. package/browser/esm/{BVC0iuc28yuEcyua.mjs → D8al_cJ4U-NgzwoK.mjs} +1 -1
  16. package/browser/esm/DBtc4lku0uHVcqWn.mjs +71 -0
  17. package/browser/esm/{CDyYtk9WscSzj5I5.mjs → DHY19rkSiiRZxShC.mjs} +130 -103
  18. package/browser/esm/{DdbgnOWM0tle1jeT.mjs → DU3J8Gcf-WpBxNYg.mjs} +11 -10
  19. package/browser/esm/Die9NXVFveHvcCT-.mjs +4205 -0
  20. package/browser/esm/{CccE_2DTbTMNIfQM.mjs → DmCQbW4zwkT_Rq88.mjs} +1 -1
  21. package/browser/esm/IQLeaAbtGTipUsOD.mjs +516 -0
  22. package/browser/esm/{DhMl3LbgjdX8Nz7b.mjs → X1Db3b_7b_7OuCk6.mjs} +178 -129
  23. package/browser/esm/fb126BNj3F8URR19.mjs +225 -0
  24. package/browser/esm/index.mjs +418 -135
  25. package/browser/esm/sFOAxZpxXo-qvDSp.mjs +293 -0
  26. package/browser/esm/sam1KGQZ59B_fADz.mjs +1941 -0
  27. package/browser/esm/xKiLJKiLxto8SayF.mjs +256 -0
  28. package/browser/esm/yZxC4qUENOlMhVUH.mjs +68 -0
  29. package/licenses/dependencies.txt +58 -311
  30. package/node/esm/B8SQfjKjzYHLxzZR.mjs +632 -0
  31. package/node/esm/{CgA8rdWVZEpIUpsM.mjs → BYVLi0md4AYuDsB_.mjs} +1 -1
  32. package/node/esm/BYsG3KYVmxSe_CIQ.mjs +294 -0
  33. package/node/esm/BYwXhrEwkRAt9nJS.mjs +71 -0
  34. package/node/esm/B_jRGdwGFkudwmL-.mjs +68 -0
  35. package/node/esm/Bb1sLMqXWKjdve23.mjs +77 -0
  36. package/node/esm/{ELTc6e1FF88hBAev.mjs → BcwMb6CyVfvEwbHn.mjs} +69 -70
  37. package/node/esm/{DYlYrd0A73WoQQgM.mjs → CKu1AtRgyltyEdEN.mjs} +1 -1
  38. package/node/esm/Cmt8Wv806N7NmE4Y.mjs +3344 -0
  39. package/node/esm/{6PuhMTJrzLciGI0Z.mjs → D6oQL8knsPpgdXuk.mjs} +2 -2
  40. package/node/esm/{BxTFDoMd-nowfxfb.mjs → D9rzScOA9pEYFrtz.mjs} +1 -1
  41. package/node/esm/DNSjK5DAH3M14Qbc.mjs +521 -0
  42. package/node/esm/{C2HawKeialuFRR9r.mjs → DZzvTQxIKr9LbEsA.mjs} +1 -1
  43. package/node/esm/{uJOy7zjNtP0IqGoa.mjs → ETK6T6G0SIcFXDe5.mjs} +163 -135
  44. package/node/esm/ah3CUg4-VmNstGk_.mjs +256 -0
  45. package/node/esm/{DPhvWXmDun8bC0_v.mjs → ci8d-mF1H9wnYzix.mjs} +1 -1
  46. package/node/esm/cqzp431iNSLWictb.mjs +116 -0
  47. package/node/esm/index.mjs +14783 -6793
  48. package/package.json +15 -18
  49. package/resources/locales/de/groups.cmd.json +29 -16
  50. package/resources/locales/de/studio.cmd.json +18 -1
  51. package/resources/locales/de/ui.msg.json +350 -40
  52. package/resources/locales/en/groups.cmd.json +39 -17
  53. package/resources/locales/en/studio.cmd.json +18 -1
  54. package/resources/locales/en/ui.msg.json +306 -40
  55. package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +17 -1
  56. package/types/src/anchorItems/AnchorItemsPanel.d.ts +14 -0
  57. package/types/src/anchorItems/AnchoredRangeField.d.ts +40 -0
  58. package/types/src/anchorItems/index.d.ts +1 -0
  59. package/types/src/border/BorderPopupButton.d.ts +6 -6
  60. package/types/src/border/BorderStylePopupButton.d.ts +3 -3
  61. package/types/src/border/BorderTemplateIcon.d.ts +24 -0
  62. package/types/src/border/index.d.ts +1 -0
  63. package/types/src/color/ColorPanel.d.ts +8 -2
  64. package/types/src/color/ColorPopupButton.d.ts +2 -1
  65. package/types/src/command/NumberFormatQuickButtons.d.ts +32 -0
  66. package/types/src/command/PresetCellStylesCommandButton.d.ts +3 -3
  67. package/types/src/command/SheetZoomCommandButton.d.ts +4 -3
  68. package/types/src/comments/CommentCard.d.ts +41 -0
  69. package/types/src/comments/CommentsPlugin.d.ts +6 -0
  70. package/types/src/comments/CommentsTaskPane.d.ts +23 -0
  71. package/types/src/comments/index.d.ts +4 -0
  72. package/types/src/conditionalFormat/ConditionalFormatStylePicker.d.ts +4 -4
  73. package/types/src/conditionalFormat/IconPickerPopupButton.d.ts +2 -2
  74. package/types/src/conditionalFormat/IconSetRulePanel.d.ts +1 -1
  75. package/types/src/conditions/BetweenOption.d.ts +6 -1
  76. package/types/src/conditions/CombinatorOption.d.ts +7 -0
  77. package/types/src/conditions/ConditionEditor.d.ts +61 -4
  78. package/types/src/conditions/ConditionUtils.d.ts +65 -6
  79. package/types/src/conditions/ExpressionOption.d.ts +12 -6
  80. package/types/src/conditions/MembershipOption.d.ts +67 -0
  81. package/types/src/conditions/OperatorAndParamEditor.d.ts +36 -1
  82. package/types/src/conditions/ScalarOption.d.ts +25 -6
  83. package/types/src/conditions/SelectorSelect.d.ts +16 -7
  84. package/types/src/conditions/index.d.ts +1 -1
  85. package/types/src/conditions/useFormulaOption.d.ts +54 -0
  86. package/types/src/dataValidation/DataValidationDetailsPanel.d.ts +7 -1
  87. package/types/src/dataValidation/DataValidationDetailsTaskPane.d.ts +3 -2
  88. package/types/src/dataValidation/DataValidationEditorPanel.d.ts +13 -2
  89. package/types/src/dataValidation/DataValidationIcon.d.ts +22 -0
  90. package/types/src/dataValidation/DataValidationTitle.d.ts +13 -0
  91. package/types/src/dialog/FillSeriesDialog.d.ts +16 -0
  92. package/types/src/dialog/OutlineSettingsDialog.d.ts +12 -0
  93. package/types/src/dialog/TableNewDialog.d.ts +1 -4
  94. package/types/src/dialog/_ShortcutSearch.d.ts +26 -0
  95. package/types/src/dialog/index.d.ts +0 -2
  96. package/types/src/externalLink/ExternalLinkCardBody.d.ts +9 -0
  97. package/types/src/externalLink/ExternalLinkChip.d.ts +18 -0
  98. package/types/src/externalLink/ExternalLinkLocation.d.ts +18 -0
  99. package/types/src/externalLink/ExternalLinkSettingsTab.d.ts +18 -0
  100. package/types/src/externalLink/ExternalLinksPanel.d.ts +11 -0
  101. package/types/src/externalLink/ExternalLinksPlugin.d.ts +5 -0
  102. package/types/src/externalLink/ExternalLinksTaskPane.d.ts +19 -0
  103. package/types/src/externalLink/index.d.ts +8 -0
  104. package/types/src/fill/GradientEditor.d.ts +41 -0
  105. package/types/src/fill/GradientStopsBar.d.ts +43 -0
  106. package/types/src/fill/PatternPopupButton.d.ts +26 -0
  107. package/types/src/fill/PatternSwatch.d.ts +53 -0
  108. package/types/src/fill/index.d.ts +5 -0
  109. package/types/src/filter/ColumnMenu.d.ts +31 -1
  110. package/types/src/filter/index.d.ts +0 -1
  111. package/types/src/form/FormulaField.d.ts +35 -6
  112. package/types/src/form/InputField.d.ts +35 -5
  113. package/types/src/format/AlignmentPanel.d.ts +13 -0
  114. package/types/src/format/BorderPanel.d.ts +22 -0
  115. package/types/src/format/BorderPreview.d.ts +94 -0
  116. package/types/src/format/FillPanel.d.ts +65 -0
  117. package/types/src/format/FontPanel.d.ts +12 -0
  118. package/types/src/format/FormatCellPreview.d.ts +35 -0
  119. package/types/src/format/FormatPanelParts.d.ts +85 -0
  120. package/types/src/format/FormatPlugin.d.ts +11 -0
  121. package/types/src/format/FormatTaskPane.d.ts +39 -0
  122. package/types/src/format/LinePanel.d.ts +53 -0
  123. package/types/src/format/LinePreviews.d.ts +71 -0
  124. package/types/src/format/NumberFormatOption.d.ts +43 -0
  125. package/types/src/{numberFormat → format}/NumberFormatPanel.d.ts +20 -0
  126. package/types/src/format/index.d.ts +14 -0
  127. package/types/src/format/useFormatSelection.d.ts +93 -0
  128. package/types/src/formulaBar/IFormulaBar.d.ts +11 -0
  129. package/types/src/formulaBar/MobileFormulaBar.d.ts +21 -0
  130. package/types/src/formulaBar/MobileInputToolbar.d.ts +37 -0
  131. package/types/src/formulaBar/index.d.ts +3 -0
  132. package/types/src/formulaBar/useFormulaBarSession.d.ts +65 -0
  133. package/types/src/index.d.ts +7 -1
  134. package/types/src/itemsPanel/EditorCommit.d.ts +32 -0
  135. package/types/src/itemsPanel/EditorPanel.d.ts +4 -1
  136. package/types/src/itemsPanel/ItemCard.d.ts +60 -8
  137. package/types/src/itemsPanel/ItemsDescriptor.d.ts +68 -19
  138. package/types/src/itemsPanel/ItemsPanel.d.ts +9 -0
  139. package/types/src/itemsPanel/ItemsSearchField.d.ts +17 -0
  140. package/types/src/itemsPanel/index.d.ts +2 -0
  141. package/types/src/named/NamedDetailsPanel.d.ts +9 -2
  142. package/types/src/named/NamedDetailsTaskPane.d.ts +3 -2
  143. package/types/src/named/NamedEditorPanel.d.ts +1 -1
  144. package/types/src/named/NamedExpressionField.d.ts +32 -0
  145. package/types/src/named/NamedKindChip.d.ts +38 -0
  146. package/types/src/picture/PicturePlugin.d.ts +6 -0
  147. package/types/src/picture/index.d.ts +2 -0
  148. package/types/src/protectedRange/ProtectedRangeDetailsPanel.d.ts +6 -0
  149. package/types/src/protectedRange/ProtectedRangeDraft.d.ts +22 -0
  150. package/types/src/protectedRange/ProtectedRangeEditorPanel.d.ts +0 -14
  151. package/types/src/protectedRange/index.d.ts +2 -1
  152. package/types/src/protection/ManageProtectionTaskPane.d.ts +29 -0
  153. package/types/src/protection/PasswordDialog.d.ts +32 -0
  154. package/types/src/protection/PasswordField.d.ts +35 -0
  155. package/types/src/protection/ProtectedCellsPanel.d.ts +20 -0
  156. package/types/src/protection/ProtectionPlugin.d.ts +11 -0
  157. package/types/src/protection/SheetProtectionPanel.d.ts +35 -0
  158. package/types/src/protection/WorkbookProtectionPanel.d.ts +34 -15
  159. package/types/src/protection/WorkbookProtectionTab.d.ts +22 -0
  160. package/types/src/protection/index.d.ts +7 -1
  161. package/types/src/shape/InsertShapeCommandButton.d.ts +20 -0
  162. package/types/src/shape/ShapeFormatPanel.d.ts +11 -0
  163. package/types/src/shape/ShapePlugin.d.ts +6 -0
  164. package/types/src/shape/index.d.ts +3 -0
  165. package/types/src/slicer/PresetSlicerStylesCommandButton.d.ts +18 -0
  166. package/types/src/slicer/SlicerPlugin.d.ts +6 -0
  167. package/types/src/slicer/index.d.ts +3 -0
  168. package/types/src/statusBar/SheetZoomScale.d.ts +6 -0
  169. package/types/src/studio/CommandsWrapper.d.ts +5 -0
  170. package/types/src/studio/EagerStudio.d.ts +14 -1
  171. package/types/src/studio/StudioCommandProvider.d.ts +10 -0
  172. package/types/src/studio/StudioCommands.d.ts +40 -4
  173. package/types/src/studio/StudioProps.d.ts +64 -2
  174. package/types/src/studio/StudioSplitPane.d.ts +1 -1
  175. package/types/src/studio/formulaBarPlacement.d.ts +35 -0
  176. package/types/src/studio/splitStudioProps.d.ts +7 -0
  177. package/types/src/studio/useStudioApp.d.ts +31 -18
  178. package/types/src/template/TemplateCommands.d.ts +29 -0
  179. package/types/src/template/TemplateDialog.d.ts +19 -0
  180. package/types/src/template/TemplatePanel.d.ts +50 -0
  181. package/types/src/template/TemplateSearchField.d.ts +29 -0
  182. package/types/src/template/WelcomeDialog.d.ts +29 -0
  183. package/types/src/template/categoryColor.d.ts +8 -0
  184. package/types/src/template/index.d.ts +3 -0
  185. package/types/src/template/useTemplateCatalog.d.ts +71 -0
  186. package/types/src/toolbar/WorkbookToolbars.d.ts +1 -1
  187. package/types/src/workbook/DefaultRenderers.d.ts +15 -1
  188. package/types/src/workbook/FillMenu.d.ts +21 -0
  189. package/types/src/workbook/OutlineButtons.d.ts +11 -0
  190. package/types/src/workbook/WorkbookElement.d.ts +1 -1
  191. package/types/src/workbook/index.d.ts +1 -0
  192. package/browser/cjs/BQJKf40kttQWOzLw.cjs +0 -20
  193. package/browser/cjs/BTZ5uzK0wHzpiZGC.cjs +0 -1
  194. package/browser/cjs/B_D3JKseVvpRyX-E.cjs +0 -1
  195. package/browser/cjs/BeKpqOx8It0RD0Rf.cjs +0 -2
  196. package/browser/cjs/Bj-EvSYeDfqmU0V6.cjs +0 -2
  197. package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
  198. package/browser/cjs/Bte6P3MhSjajJmmY.cjs +0 -7
  199. package/browser/cjs/C97KHSuikAbr1qVM.cjs +0 -1
  200. package/browser/cjs/CJLwX_A3y3TQUmzj.cjs +0 -1
  201. package/browser/cjs/CPSc2VSYZeZ1B9mi.cjs +0 -1
  202. package/browser/cjs/CPcBvw4ZPwHVTUZF.cjs +0 -1
  203. package/browser/cjs/CYxc8vnRi8dNpDPk.cjs +0 -1
  204. package/browser/cjs/CZm1jVZaHQ246prW.cjs +0 -1
  205. package/browser/cjs/CdDYyAfccXme8w6m.cjs +0 -1
  206. package/browser/cjs/Cm1APq2MraYNNhyI.cjs +0 -1
  207. package/browser/cjs/DO8V31Z1ewgMA1di.cjs +0 -5
  208. package/browser/cjs/Djsiad0Qha1Y-YaS.cjs +0 -1
  209. package/browser/cjs/IASAYG6qgv7lJY7y.cjs +0 -1
  210. package/browser/cjs/KZvriGbhEOVkQD0b.cjs +0 -1
  211. package/browser/cjs/UnMhi28mbvLiOXQe.cjs +0 -1
  212. package/browser/cjs/Vbigo0kFP3PFfmeA.cjs +0 -1
  213. package/browser/cjs/iMWEL01eC83oU-YY.cjs +0 -1
  214. package/browser/cjs/index.cjs +0 -2
  215. package/browser/cjs/w2GjebPlOFv3pCbm.cjs +0 -1
  216. package/browser/cjs/z0rB4fK6X1M6PpVD.cjs +0 -11
  217. package/browser/cjs/zQsyZpeXAvcVXJMs.cjs +0 -1
  218. package/browser/esm/6seXVm4fUaBp34tP.mjs +0 -217
  219. package/browser/esm/C1PiodbCgkhztxU5.mjs +0 -411
  220. package/browser/esm/C5XQW-A03GP8EZ3s.mjs +0 -52
  221. package/browser/esm/CZGRaL9mjYTo8fAd.mjs +0 -105
  222. package/browser/esm/DTWkitCkayiinpgU.mjs +0 -219
  223. package/browser/esm/DbHn3Fq4gYggsoXV.mjs +0 -5429
  224. package/browser/esm/DxBsD4nDbg_OWhYG.mjs +0 -47
  225. package/browser/esm/HZXAXZqrC43FBvGk.mjs +0 -82
  226. package/browser/esm/dgkVCh7lmm1Twqmo.mjs +0 -9257
  227. package/browser/esm/l5BsxVQszkPy_n34.mjs +0 -1150
  228. package/node/esm/-9Hcp_VKJtR9fWlC.mjs +0 -470
  229. package/node/esm/B-3Ypi8akR-GxIpw.mjs +0 -82
  230. package/node/esm/CbhFnQCOA5TjhFB1.mjs +0 -106
  231. package/node/esm/CxqL51jVpIL4ncWW.mjs +0 -47
  232. package/node/esm/D-x3LVzppkKf5be_.mjs +0 -4575
  233. package/types/src/conditionalFormat/ConditionalFormatRangeField.d.ts +0 -32
  234. package/types/src/conditions/DateTimeOption.d.ts +0 -43
  235. package/types/src/conditions/InSetOption.d.ts +0 -37
  236. package/types/src/dialog/CommentsDialog.d.ts +0 -11
  237. package/types/src/dialog/NumberFormatDialog.d.ts +0 -12
  238. package/types/src/filter/FilterList.d.ts +0 -28
  239. package/types/src/numberFormat/NumberFormatTaskPane.d.ts +0 -12
  240. package/types/src/numberFormat/index.d.ts +0 -8
  241. package/types/src/protectedRange/ProtectedRangeDetailsTaskPane.d.ts +0 -3
  242. package/types/src/protectedRange/ProtectedRangePlugin.d.ts +0 -2
  243. package/types/src/protection/WorkbookProtectionDialog.d.ts +0 -23
@@ -1,470 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.28-beta.4
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 { DynamicIcon as e, KeyCodes as t, KeyModifiers as n, ReactUtils as o, keyEventCanonicals as r, keyStrokeToCanonical as l } from "@sheetxl/utils-react";
8
- import i, { useCallback as a, useEffect as s, useMemo as c, useRef as p, useState as d } from "react";
9
- import { InternalWindow as h } from "@sheetxl/utils-mui";
10
- import { jsx as u, jsxs as m } from "react/jsx-runtime";
11
- import { Box as g, Checkbox as f, Chip as x, DialogContent as y, FormControlLabel as b, IconButton as S, InputAdornment as v, TextField as k, Tooltip as C, Typography as w, emphasize as K } from "@mui/material";
12
- import { CommonUtils as $, TimerUtils as A } from "@sheetxl/utils";
13
- var L = (e) => e.replace(/\n\n+/g, "\n").trim(), z = /* @__PURE__ */ new Set([
14
- "Control",
15
- "Shift",
16
- "Alt",
17
- "Meta"
18
- ]), P = (e) => {
19
- let t = e;
20
- const n = /* @__PURE__ */ new Set();
21
- for (const e of [
22
- "mod",
23
- "alt",
24
- "shift"
25
- ]) t.startsWith(`${e}+`) && (n.add(e), t = t.slice(e.length + 1));
26
- return {
27
- key: t,
28
- mods: n
29
- };
30
- }, D = $.getPlatform() === $.OSType.MacOS || $.getPlatform() === $.OSType.IOS, I = [
31
- n.Ctrl,
32
- n.Alt,
33
- n.Shift,
34
- n.Meta
35
- ], M = (e) => {
36
- switch (e) {
37
- case n.Ctrl: return D ? "Cmd" : "Ctrl";
38
- case n.Alt: return "Alt";
39
- case n.Shift: return "Shift";
40
- case n.Meta: return "Meta";
41
- default: return e;
42
- }
43
- }, W = (e) => {
44
- const t = new Set(e);
45
- return I.filter((e) => t.has(e));
46
- }, B = (e) => {
47
- const t = [];
48
- return e.ctrlKey && t.push(n.Ctrl), e.altKey && t.push(n.Alt), e.shiftKey && t.push(n.Shift), e.metaKey && t.push(n.Meta), t;
49
- }, R = ({ children: e }) => u(g, {
50
- component: "kbd",
51
- sx: {
52
- display: "inline-flex",
53
- alignItems: "center",
54
- justifyContent: "center",
55
- minWidth: "20px",
56
- height: "20px",
57
- paddingX: "5px",
58
- boxSizing: "border-box",
59
- fontFamily: "inherit",
60
- fontSize: "0.7rem",
61
- fontWeight: 600,
62
- lineHeight: 1,
63
- whiteSpace: "nowrap",
64
- borderRadius: "5px",
65
- color: (e) => e.palette.text.secondary,
66
- backgroundColor: (e) => K(e.palette.background.paper, .07),
67
- border: (e) => `solid 1px ${e.palette.divider}`,
68
- borderBottomWidth: "2px"
69
- },
70
- children: e
71
- }), T = () => u(g, {
72
- component: "span",
73
- sx: {
74
- fontSize: "0.7rem",
75
- color: (e) => e.palette.text.disabled
76
- },
77
- children: "+"
78
- }), F = ({ labels: e, dangling: t = !1 }) => m(g, {
79
- sx: {
80
- display: "flex",
81
- alignItems: "center",
82
- gap: "1px"
83
- },
84
- children: [e.map((e, t) => m(i.Fragment, { children: [t > 0 && u(T, {}), u(R, { children: e })] }, t)), t && u(T, {})]
85
- }), E = ({ stroke: e }) => {
86
- if (!e?.key) return null;
87
- const t = W(e.modifiers ?? []).map(M);
88
- return t.push(o.toPrettyKeyCode(e.key)), u(F, { labels: t });
89
- };
90
- function O(n) {
91
- const { commands: o, sx: i, ...h } = n, [y, $] = d(!1), [I, R] = d(""), [T, O] = d(null), [j, N] = d(!1), [X, H] = d(null), [U, Y] = d(null), [q, G] = d(null), J = p(null), Q = c(() => {
92
- let e = o.getAllCommands();
93
- y && (e = e.filter((e) => e.command.getShortcut())), e = [...e].sort((e, t) => {
94
- const n = e.command.getScope?.() ?? e.groupKey, o = t.command.getScope?.() ?? t.groupKey, r = n.localeCompare(o);
95
- return 0 !== r ? r : e.command.getLabel().localeCompare(t.command.getLabel());
96
- });
97
- const t = [], n = /* @__PURE__ */ new Set();
98
- for (const o of e) {
99
- const e = o.command, r = e.getScope?.() ?? o.groupKey, i = {
100
- label: e.getLabel(),
101
- icon: e.getIcon(),
102
- scope: r,
103
- scopeLabel: e.getScopeLabel?.() ?? r,
104
- description: L(e.getDescription())
105
- }, a = e.getShortcut(), s = Array.isArray(a) ? a.length ? a : [null] : [a ?? null];
106
- for (const e of s) {
107
- const o = e ? l(e) : null, a = `${r}\0${i.label}\0${o ?? ""}`;
108
- n.has(a) || (n.add(a), t.push({
109
- ...i,
110
- id: a,
111
- shortcut: e,
112
- canonical: o
113
- }));
114
- }
115
- }
116
- return t;
117
- }, [y, o]), V = c(() => T ? Q.filter((e) => e.scope === T) : Q, [Q, T]), [Z, _] = d(null);
118
- s(() => {
119
- let e = !1;
120
- return import("fuse.js").then((t) => {
121
- e || _(new t.default(V, {
122
- threshold: .3,
123
- ignoreLocation: !0,
124
- keys: [
125
- "label",
126
- "description",
127
- "scope",
128
- "scopeLabel"
129
- ]
130
- }));
131
- }), () => {
132
- e = !0;
133
- };
134
- }, [V]);
135
- const [ee, te] = d(Q);
136
- s(() => {
137
- if (j) return U ? void te(V.filter((e) => {
138
- if (!e.canonical) return !1;
139
- const t = P(e.canonical);
140
- if (!U.keys.has(t.key)) return !1;
141
- for (const e of U.mods) if (!t.mods.has(e)) return !1;
142
- return !0;
143
- })) : void te(V);
144
- Z ? A.debounce(() => {
145
- const e = I.trim();
146
- 0 !== e.length ? te(Z.search(e).map((e) => e.item)) : te(V);
147
- }, 90)() : te(V);
148
- }, [
149
- j,
150
- U,
151
- Z,
152
- I,
153
- V
154
- ]);
155
- const ne = c(() => {
156
- const e = /* @__PURE__ */ new Map();
157
- for (const t of ee) {
158
- let n = e.get(t.scope);
159
- n || (n = [], e.set(t.scope, n)), n.push(t);
160
- }
161
- return Array.from(e, ([e, t]) => ({
162
- scope: e,
163
- scopeLabel: t[0].scopeLabel,
164
- rows: t
165
- }));
166
- }, [ee]), oe = c(() => Q.find((e) => e.scope === T)?.scopeLabel ?? T, [Q, T]), re = j ? !!X : I.length > 0, le = re && 0 === ee.length;
167
- s(() => {
168
- J.current?.focus();
169
- }, [j]);
170
- const ie = a((e) => {
171
- N(e), R(""), H(null), Y(null), G(null);
172
- }, []), ae = a((e) => {
173
- if ("Tab" === e.key) return;
174
- if (e.which === t.Escape) return X || q ? (H(null), Y(null), G(null)) : ie(!1), e.stopPropagation(), void e.preventDefault();
175
- if (e.preventDefault(), e.stopPropagation(), "Backspace" === e.key) return H(null), Y(null), void G(null);
176
- const n = e.nativeEvent;
177
- if (z.has(e.key)) return H(null), Y(null), void G(B(n));
178
- G(null), H(((e) => {
179
- const t = [];
180
- e.ctrlKey && t.push("ctrl"), e.altKey && t.push("alt"), e.shiftKey && t.push("shift"), e.metaKey && t.push("meta");
181
- const n = e.code;
182
- let o = e.key;
183
- return n && (o = n.startsWith("Key") && n.length > 3 ? n.slice(3) : n.startsWith("Digit") && n.length > 5 ? n.slice(5) : n), {
184
- key: o,
185
- modifiers: t
186
- };
187
- })(n)), Y(((e) => {
188
- const t = [...r(e)].map(P);
189
- return {
190
- keys: new Set(t.map((e) => e.key)),
191
- mods: t[0]?.mods ?? /* @__PURE__ */ new Set()
192
- };
193
- })(n));
194
- }, [
195
- X,
196
- q,
197
- ie
198
- ]), se = a((e) => {
199
- if (X) return;
200
- const t = B(e.nativeEvent);
201
- G(t.length ? t : null);
202
- }, [X]), ce = a((e) => {
203
- O((t) => t === e ? null : e);
204
- }, []), pe = a(() => {
205
- j ? (H(null), Y(null), G(null)) : R(""), J.current?.focus();
206
- }, [j]), de = j ? !!(X || q && q.length > 0) : I.length > 0, he = u(C, {
207
- title: j ? "Search by name (ESC)" : `Search by shortcut (${D ? "Cmd" : "Ctrl"}+K)`,
208
- children: u(S, {
209
- "aria-label": "toggle shortcut capture",
210
- color: j ? "primary" : "default",
211
- onClick: () => ie(!j),
212
- sx: {
213
- flexShrink: 0,
214
- border: (e) => `solid 1px ${j ? e.palette.primary.main : e.palette.divider}`,
215
- borderRadius: (e) => `${e.shape.borderRadius}px`
216
- },
217
- children: u(e, { iconKey: "Keyboard" })
218
- })
219
- });
220
- return m(g, {
221
- style: {
222
- height: 460,
223
- width: "100%",
224
- display: "flex",
225
- flexDirection: "column"
226
- },
227
- sx: [{ fontFamily: (e) => e.typography.fontFamily }, ...Array.isArray(i) ? i : [i]],
228
- ...h,
229
- children: [
230
- m(g, {
231
- sx: {
232
- display: "flex",
233
- alignItems: "center",
234
- gap: 1,
235
- marginBottom: (e) => e.spacing(1.5)
236
- },
237
- children: [
238
- u(k, {
239
- inputRef: J,
240
- slotProps: {
241
- input: {
242
- sx: { backgroundColor: (e) => e.palette.action.hover },
243
- startAdornment: j && (X || q && q.length > 0) ? u(v, {
244
- position: "start",
245
- sx: { marginRight: "6px" },
246
- children: X ? u(E, { stroke: X }) : u(F, {
247
- labels: W(q).map(M),
248
- dangling: !0
249
- })
250
- }) : void 0,
251
- endAdornment: de ? u(v, {
252
- position: "end",
253
- children: u(S, {
254
- "aria-label": j ? "clear shortcut" : "clear search",
255
- onClick: pe,
256
- edge: "end",
257
- size: "small",
258
- children: u(e, { iconKey: "Close" })
259
- })
260
- }) : void 0
261
- },
262
- htmlInput: {
263
- className: "input",
264
- autoFocus: !0,
265
- spellCheck: !1,
266
- placeholder: j ? X || q && q.length > 0 ? "" : "Press a shortcut… (Esc to exit)" : "Type to search commands, scopes, or descriptions",
267
- autoComplete: "off",
268
- "aria-label": j ? "Press a shortcut to find its command" : "Search commands",
269
- sx: {
270
- paddingTop: (e) => e.spacing(1),
271
- paddingBottom: (e) => e.spacing(1),
272
- caretColor: (e) => j ? e.palette.primary.main : void 0
273
- }
274
- }
275
- },
276
- sx: {
277
- flex: "1 1 auto",
278
- "& .MuiOutlinedInput-notchedOutline": { borderColor: (e) => le ? `${e.palette.error.main} !important` : j ? `${e.palette.primary.main} !important` : void 0 }
279
- },
280
- value: j ? "" : I,
281
- onChange: (e) => {
282
- j || R(e.target.value);
283
- },
284
- onKeyDown: j ? ae : (e) => {
285
- if ((e.ctrlKey || e.metaKey) && ("k" === e.key || "K" === e.key)) return ie(!0), e.stopPropagation(), void e.preventDefault();
286
- e.which === t.Escape && I.length > 0 && (R(""), e.stopPropagation(), e.preventDefault());
287
- },
288
- onKeyUp: j ? se : void 0,
289
- onContextMenu: (e) => e.stopPropagation()
290
- }),
291
- he,
292
- u(b, {
293
- sx: {
294
- flexShrink: 0,
295
- marginRight: 0
296
- },
297
- control: u(f, {
298
- checked: y,
299
- onChange: () => $(!y)
300
- }),
301
- label: "With key bindings",
302
- labelPlacement: "start"
303
- })
304
- ]
305
- }),
306
- T && u(g, {
307
- sx: {
308
- display: "flex",
309
- marginBottom: 1
310
- },
311
- children: u(x, {
312
- size: "small",
313
- label: `Scope: ${oe}`,
314
- onDelete: () => O(null)
315
- })
316
- }),
317
- u(g, {
318
- sx: {
319
- flex: "1 1 100%",
320
- minHeight: 0,
321
- borderRadius: (e) => `${e.shape.borderRadius}px`,
322
- border: (e) => `solid ${e.palette.divider} 1px`,
323
- overflow: "visible"
324
- },
325
- children: u(g, {
326
- sx: {
327
- height: "100%",
328
- overflow: "auto"
329
- },
330
- children: 0 === ne.length ? u(g, {
331
- sx: {
332
- padding: 3,
333
- textAlign: "center",
334
- color: (e) => le ? e.palette.error.main : e.palette.text.secondary
335
- },
336
- children: re ? "No matching shortcuts" : "No shortcuts"
337
- }) : ne.map((t) => m(g, { children: [m(g, {
338
- onClick: () => ce(t.scope),
339
- sx: {
340
- position: "sticky",
341
- top: "-1px",
342
- zIndex: 2,
343
- display: "flex",
344
- alignItems: "center",
345
- justifyContent: "space-between",
346
- gap: 1,
347
- paddingX: 1.5,
348
- paddingTop: "5px",
349
- paddingBottom: "4px",
350
- cursor: "pointer",
351
- userSelect: "none",
352
- fontSize: "0.7rem",
353
- fontWeight: 600,
354
- letterSpacing: "0.04em",
355
- textTransform: "uppercase",
356
- backgroundColor: (e) => K(e.palette.background.paper, .04),
357
- boxShadow: (e) => `0 -2px 0 0 ${K(e.palette.background.paper, .04)}`,
358
- borderBottom: (e) => `solid 1px ${e.palette.divider}`,
359
- color: (e) => T === t.scope ? e.palette.primary.main : e.palette.text.secondary,
360
- "&:hover": {
361
- color: (e) => e.palette.text.primary,
362
- backgroundColor: (e) => K(e.palette.background.paper, .09)
363
- }
364
- },
365
- children: [u("span", { children: t.scopeLabel }), u(w, {
366
- component: "span",
367
- sx: {
368
- fontSize: "inherit",
369
- opacity: .7
370
- },
371
- children: t.rows.length
372
- })]
373
- }), t.rows.map((t) => {
374
- return m(g, {
375
- sx: {
376
- paddingX: 1.5,
377
- paddingY: .75,
378
- borderBottom: (e) => `solid 1px ${e.palette.divider}`,
379
- "&:hover": { backgroundColor: (e) => e.palette.action.hover }
380
- },
381
- children: [m(g, {
382
- sx: {
383
- display: "flex",
384
- alignItems: "center",
385
- gap: 1
386
- },
387
- children: [
388
- u(g, {
389
- sx: {
390
- flexShrink: 0,
391
- display: "flex",
392
- alignItems: "center",
393
- width: "var(--icon-size, 20px)",
394
- height: "var(--icon-size, 20px)",
395
- color: (e) => e.palette.text.icon ?? e.palette.action.active
396
- },
397
- children: (n = t.icon, n && "string" != typeof n ? n : u(e, { iconKey: n }))
398
- }),
399
- u(w, {
400
- sx: {
401
- flex: "1 1 auto",
402
- fontWeight: 500
403
- },
404
- children: t.label
405
- }),
406
- t.shortcut && u(g, {
407
- sx: { flexShrink: 0 },
408
- children: u(E, { stroke: t.shortcut })
409
- })
410
- ]
411
- }), t.description && u(w, {
412
- component: "div",
413
- sx: {
414
- marginTop: "2px",
415
- marginLeft: "calc(var(--icon-size, 20px) + 8px)",
416
- fontSize: "0.75rem",
417
- whiteSpace: "pre-line",
418
- color: (e) => e.palette.text.secondary
419
- },
420
- children: t.description
421
- })]
422
- }, t.id);
423
- var n;
424
- })] }, t.scope))
425
- })
426
- }),
427
- u(g, {
428
- sx: {
429
- display: "flex",
430
- flexShrink: 0,
431
- paddingLeft: (e) => e.spacing(1),
432
- paddingTop: (e) => e.spacing(1),
433
- paddingRight: (e) => e.spacing(1),
434
- userSelect: "none",
435
- justifyContent: "flex-end"
436
- },
437
- children: u(w, {
438
- noWrap: !0,
439
- component: "div",
440
- sx: { color: (e) => le ? e.palette.error.main : e.palette.text.secondary },
441
- children: `${0 === ee.length ? "No" : ee.length} shortcut${1 === ee.length ? "" : "s"}${re ? " found" : ""}`
442
- })
443
- })
444
- ]
445
- });
446
- }
447
- var j = (e) => {
448
- const { title: n = "Shortcut Keys", commands: o, sx: r, ...l } = e;
449
- return u(h, {
450
- isModal: !0,
451
- onKeyDown: (e) => {
452
- e.keyCode === t.F1 && e.preventDefault();
453
- },
454
- sx: {
455
- width: "780px",
456
- ...r
457
- },
458
- title: n,
459
- autoFocusSel: ".input",
460
- ...l,
461
- children: u(y, {
462
- dividers: !0,
463
- children: u(O, {
464
- commands: o,
465
- sx: { marginBottom: "8px" }
466
- })
467
- })
468
- });
469
- };
470
- export { j as default };
@@ -1,82 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.28-beta.4
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 { FormulaField as e } from "./index.mjs";
8
- import { useReferenceMode as t } from "@sheetxl/react";
9
- import { useCallbackRef as o, useTranslator as n } from "@sheetxl/utils-react";
10
- import { memo as a, useCallback as l, useMemo as i, useState as r } from "react";
11
- import { OptionsDialog as s } from "@sheetxl/utils-mui";
12
- import { jsx as c, jsxs as p } from "react/jsx-runtime";
13
- import { Box as m, Checkbox as u, FormControlLabel as d } from "@mui/material";
14
- var g = ["Ok", "Cancel"], f = a((a) => {
15
- const { onInput: f, onOption: h, onValidateOption: x, onDone: O, options: w = g, defaultOption: b = w?.[0], cancelOption: C = "Cancel", sx: N, initialValue: v, context: F, ...D } = a, H = n(), [I, M] = r(!1), [S, V] = r(() => v?.hasHeader ?? !1), [j, k] = r(() => v?.ranges ?? null), y = i(() => {
16
- const e = v?.ranges?.getSheet?.()?.getName();
17
- return e ? { scope: e } : void 0;
18
- }, [v]), B = "point" === t().getMode()?.mode, G = o((e) => {
19
- const t = j ? {
20
- ...v,
21
- hasHeader: S,
22
- ranges: j
23
- } : null, o = e === C || !e;
24
- f?.(!o && t ? t : void 0), h?.(e ?? C, o, e === b), O?.({
25
- option: e,
26
- tableOptions: t
27
- });
28
- }, [
29
- O,
30
- h,
31
- b,
32
- C,
33
- S,
34
- j,
35
- v
36
- ]), P = l(async (e, t) => !0, []);
37
- return c(s, {
38
- title: H("tableNew.title"),
39
- options: w,
40
- onDone: G,
41
- onValidateOption: P,
42
- defaultOption: b,
43
- cancelOption: C,
44
- autoFocusSel: ".autoFocus",
45
- suspendModal: B,
46
- sx: {
47
- width: "360px",
48
- ...N
49
- },
50
- ...D,
51
- children: p(m, {
52
- sx: {
53
- paddingTop: (e) => e.spacing(1),
54
- paddingBottom: (e) => e.spacing(0),
55
- rowGap: (e) => e.spacing(1),
56
- display: "flex",
57
- flexDirection: "column"
58
- },
59
- children: [c(e, {
60
- grammar: "reference",
61
- classNameInput: "autoFocus",
62
- formName: "range",
63
- value: j,
64
- allowMulti: !1,
65
- allowCrossSheet: !1,
66
- home: y,
67
- onChangeInput: (e) => k(e?.getReferences() ?? null),
68
- onFocus: (e) => {
69
- I || e.target?.select(), M(!0);
70
- }
71
- }), c(d, {
72
- control: c(u, {
73
- checked: S,
74
- onChange: () => V(!S)
75
- }),
76
- label: H("tableNew.hasHeaders"),
77
- labelPlacement: "end"
78
- })]
79
- })
80
- });
81
- });
82
- export { f as TableNewDialog, f as default };
@@ -1,106 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.28-beta.4
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 };
@@ -1,47 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.28-beta.4
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 { NumberFormatPanel as t } from "./index.mjs";
8
- import { useCallbackRef as o, useTranslator as n } from "@sheetxl/utils-react";
9
- import { memo as e, useCallback as i, useState as a } from "react";
10
- import { OptionsDialog as l } from "@sheetxl/utils-mui";
11
- import { jsx as r } from "react/jsx-runtime";
12
- var p = ["Ok", "Cancel"], s = e((e) => {
13
- const { initialValue: s, context: c, onOption: m, onValidateOption: u, onInput: x, onDone: d, options: f = p, defaultOption: O = f?.[0], cancelOption: h = "Cancel", sx: v, ...C } = e, g = n(), [y, V] = a(s), j = o(async (t) => {
14
- const o = t === h;
15
- o || x?.(y, t), m?.(t, o, t === O), d?.();
16
- }, [
17
- y,
18
- x,
19
- d,
20
- m,
21
- h,
22
- O
23
- ]), w = i(async (t) => await Promise.resolve(u?.(t)) ?? !0, [u]);
24
- return r(l, {
25
- title: g("numberFormat.dialogTitle"),
26
- options: f,
27
- onDone: d,
28
- onOption: (t) => j(t),
29
- onValidateOption: w,
30
- defaultOption: O,
31
- cancelOption: h,
32
- autoFocusSel: ".sxl-nf-cat-active",
33
- sx: {
34
- width: "512px",
35
- ...v
36
- },
37
- ...C,
38
- children: r(t, {
39
- value: y,
40
- onChange: V,
41
- onCommit: () => j(O),
42
- context: c,
43
- style: { paddingTop: "4px" }
44
- })
45
- });
46
- });
47
- export { s as NumberFormatDialog, s as default };