@sheetxl/studio-mui 0.8.0-beta.1 → 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/{Cd6n1XUgF0VItpkH.mjs → 5cbK03T_Oh3tNdR7.mjs} +7 -5
  2. package/browser/esm/{Bz5LiUe3SZ8g42Ia.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/{ChwS_ougBsogOEsP.mjs → ByeL_BZuJ2kl8gtf.mjs} +46 -47
  7. package/browser/esm/{BUGepznywvV0tUjW.mjs → C1Rp2hZrApo5MUc8.mjs} +2 -2
  8. package/browser/esm/{DMLXV4EKl1NCp_jk.mjs → CEvZe2cZK-voZTif.mjs} +5 -5
  9. package/browser/esm/{BZBJG2tDdD3-VujP.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/{Cj2pgCNqBCGl4rTX.mjs → CoSiOS-og0zFw4Ws.mjs} +587 -556
  13. package/browser/esm/{rU8xNPVQtDSnujM-.mjs → CtEFHbzYNvYjDYvi.mjs} +7 -7
  14. package/browser/esm/D6S8kVTzOjCn0-SK.mjs +627 -0
  15. package/browser/esm/{DNDrQKMTzKzNMjl-.mjs → D8al_cJ4U-NgzwoK.mjs} +1 -1
  16. package/browser/esm/DBtc4lku0uHVcqWn.mjs +71 -0
  17. package/browser/esm/{BoLxSRdEWt-Yg2RI.mjs → DHY19rkSiiRZxShC.mjs} +130 -103
  18. package/browser/esm/{zWTZ8BvT4hjgC2ua.mjs → DU3J8Gcf-WpBxNYg.mjs} +11 -10
  19. package/browser/esm/Die9NXVFveHvcCT-.mjs +4205 -0
  20. package/browser/esm/{CVfuCNRpODUw04IH.mjs → DmCQbW4zwkT_Rq88.mjs} +1 -1
  21. package/browser/esm/IQLeaAbtGTipUsOD.mjs +516 -0
  22. package/browser/esm/{3ydDykDMtDYbfVVn.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/{DM7K7-284z-PczVz.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/{BwZcoHDBmLPIVOT5.mjs → BcwMb6CyVfvEwbHn.mjs} +69 -70
  37. package/node/esm/{BhqI3pQFkV8K_612.mjs → CKu1AtRgyltyEdEN.mjs} +1 -1
  38. package/node/esm/Cmt8Wv806N7NmE4Y.mjs +3344 -0
  39. package/node/esm/{DXZrzWee8K5FPOW1.mjs → D6oQL8knsPpgdXuk.mjs} +2 -2
  40. package/node/esm/{BA7VzUQ2sKRLTZ5c.mjs → D9rzScOA9pEYFrtz.mjs} +1 -1
  41. package/node/esm/DNSjK5DAH3M14Qbc.mjs +521 -0
  42. package/node/esm/{CUMKTjYv6VTkcWYi.mjs → DZzvTQxIKr9LbEsA.mjs} +1 -1
  43. package/node/esm/{Qpuqm6xBr_da38Ht.mjs → ETK6T6G0SIcFXDe5.mjs} +163 -135
  44. package/node/esm/ah3CUg4-VmNstGk_.mjs +256 -0
  45. package/node/esm/{CHi3AuWEwEPOg9IZ.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/BuY3uV47Bwbqpasq.mjs +0 -219
  219. package/browser/esm/CAs1MWvJTcRfJy26.mjs +0 -217
  220. package/browser/esm/CBU3LgLYmqtQjJbu.mjs +0 -1150
  221. package/browser/esm/CDU0rqpLNVtMLI-f.mjs +0 -52
  222. package/browser/esm/CVBub6pgTsJzCc5m.mjs +0 -5429
  223. package/browser/esm/C_XvSsQ9BVdHffCO.mjs +0 -47
  224. package/browser/esm/FT29q8yNwsEpVZjt.mjs +0 -9257
  225. package/browser/esm/Hb1rlHT4tE5hLcjM.mjs +0 -82
  226. package/browser/esm/UJOXCQv6KrG1gY3l.mjs +0 -105
  227. package/browser/esm/s46El7mT6oKLSnYB.mjs +0 -411
  228. package/node/esm/9FY82fj1R1c-AczW.mjs +0 -47
  229. package/node/esm/C-boHCnJditFzng3.mjs +0 -106
  230. package/node/esm/DxXM8qHi0Oz4Zovl.mjs +0 -4575
  231. package/node/esm/sQt2wWGTRLzqeJdG.mjs +0 -82
  232. package/node/esm/yCHAZKxJR7qY_ySy.mjs +0 -470
  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,82 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.1
3
- *
4
- * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- import { 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,470 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.1
3
- *
4
- * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- import { 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,32 +0,0 @@
1
- import { default as React } from 'react';
2
- import { IConditionalFormat } from '@sheetxl/sdk';
3
- export interface ConditionalFormatRangeFieldProps {
4
- /**
5
- * The rule to re-anchor. Written through on commit.
6
- */
7
- conditionalFormat: IConditionalFormat;
8
- /**
9
- * Field label. Defaults to "Apply to"; `null` renders none, for a host that names it itself.
10
- */
11
- label?: React.ReactNode | null;
12
- /**
13
- * Helper line below the field. Defaults to `null` (none) — a reserved line is left for the error message, which is the one thing a user can get wrong here.
14
- */
15
- helperText?: React.ReactNode | null;
16
- }
17
- /**
18
- * The rule's "Apply to" — the ranges it covers, as a reference field.
19
- *
20
- * @remarks
21
- * A rule is authored as several ranges as readily as one (`allowMulti`), but always on ONE sheet
22
- * (`allowCrossSheet: false`) — a conditional format has no cross-sheet form on the wire.
23
- *
24
- * Commit-on-done: the write re-anchors the rule in the sheet's spatial index and lands one entry
25
- * on the undo stack, so it is not something to do on every keystroke. `'done'` is also what gives
26
- * the field its ✓/✗ pair and makes Enter the field's own commit point.
27
- *
28
- * The helper line is left RESERVED rather than collapsed: a typed address is the one thing here a
29
- * user can get wrong, and a reserved line means the error appears without the panel jumping.
30
- */
31
- export declare const ConditionalFormatRangeField: React.NamedExoticComponent<ConditionalFormatRangeFieldProps>;
32
- //# sourceMappingURL=ConditionalFormatRangeField.d.ts.map
@@ -1,43 +0,0 @@
1
- import { default as React } from 'react';
2
- import { BoxProps } from '@mui/material';
3
- export type DateTimeOptionType = 'date' | 'time' | 'dateTime';
4
- export interface DateTimeOptionProps extends BoxProps {
5
- /**
6
- * Controls which fields are rendered.
7
- * - `'date'` – date picker only
8
- * - `'time'` – time picker only
9
- * - `'dateTime'` – both pickers side by side (default)
10
- * @default 'dateTime'
11
- */
12
- type?: DateTimeOptionType;
13
- /**
14
- * The date+time value to edit — a serial, or (for the comparison operators) a `=`-prefixed
15
- * formula string.
16
- */
17
- option: number | string | null;
18
- /**
19
- * Called when either the date or time part changes.
20
- */
21
- onOptionChange: (option: number | string | null) => void;
22
- /**
23
- * Whether the operand may be a formula (the comparison operators' Scalar-param convention).
24
- * A string option then renders in the literal-or-formula field instead of the pickers — an
25
- * imported `=DATE(2024,1,1)` operand must not be destroyed by a date input. Entering a NEW
26
- * formula from the pickers is deliberately not offered here; clearing the field returns to
27
- * them.
28
- */
29
- allowFormula?: boolean;
30
- /**
31
- * If true, makes the editor read-only.
32
- */
33
- readOnly?: boolean;
34
- }
35
- /**
36
- * Component for editing a date, time, or combined date+time option.
37
- *
38
- * @remarks
39
- * The value is always a single `Date` object (local time); `null` when unset.
40
- * For `type="time"`, the date portion of the Date is irrelevant (epoch is used as carrier).
41
- */
42
- export declare const DateTimeOption: React.NamedExoticComponent<DateTimeOptionProps>;
43
- //# sourceMappingURL=DateTimeOption.d.ts.map
@@ -1,37 +0,0 @@
1
- import { ICondition } from '@sheetxl/sdk';
2
- export interface InSetOptionProps extends React.HTMLAttributes<HTMLDivElement> {
3
- /**
4
- * The type of scalar for the Items (e.g., number, string)
5
- *
6
- * @remarks
7
- * * The InSetOption is used for all types of scalars, but the Items
8
- * logic varies based on the type.
9
- * * This component uses the `dataType` to determine how to render the input fields.
10
- * * For example, if the `dataType` is `number`, the component will render
11
- * number-specific input fields (e.g., with a numeric keypad on mobile devices).
12
- * * If the `dataType` is `ScalarType.Null`, the component will return the labels
13
- * with a 'data agnostic' labels.
14
- *
15
- * @defaultValue `ScalarType.Null`
16
- */
17
- /**
18
- * The Items option to edit.
19
- */
20
- option: ICondition.InSetOption;
21
- /**
22
- * The callback function to handle changes in the Items option.
23
- */
24
- onOptionChange: (option: ICondition.InSetOption) => void;
25
- }
26
- /**
27
- * Component for editing items/list option.
28
- *
29
- * @remarks
30
- * Allows adding/removing values from a list. Can accept:
31
- * - Array of scalar values (items)
32
- * - Formula string (evaluated to get list)
33
- * - Date groups for date filtering
34
- * - Blank value filtering
35
- */
36
- export declare const InSetOption: import('react').NamedExoticComponent<InSetOptionProps>;
37
- //# sourceMappingURL=InSetOption.d.ts.map
@@ -1,11 +0,0 @@
1
- import { default as React } from 'react';
2
- import { IComment } from '@sheetxl/sdk';
3
- import { InputDialogProps } from '@sheetxl/utils-mui';
4
- export interface CommentsDialogProps extends InputDialogProps<IComment.Properties> {
5
- }
6
- /**
7
- * PLACEHOLDER for comments editor
8
- */
9
- export declare const CommentsDialog: React.NamedExoticComponent<CommentsDialogProps>;
10
- export default CommentsDialog;
11
- //# sourceMappingURL=CommentsDialog.d.ts.map
@@ -1,12 +0,0 @@
1
- import { default as React } from 'react';
2
- import { InputDialogProps } from '@sheetxl/utils-mui';
3
- export interface NumberFormatDialogProps extends InputDialogProps {
4
- }
5
- /**
6
- * Number Format dialog — a thin {@link OptionsDialog} wrapper around the
7
- * standalone {@link NumberFormatPanel}. The panel is reused as-is by the task
8
- * pane and (later) a larger Format Cells dialog.
9
- */
10
- export declare const NumberFormatDialog: React.NamedExoticComponent<NumberFormatDialogProps>;
11
- export default NumberFormatDialog;
12
- //# sourceMappingURL=NumberFormatDialog.d.ts.map