@sheetxl/studio-mui 0.7.27 → 0.7.28-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/README.md +2 -2
  2. package/browser/cjs/BQJKf40kttQWOzLw.cjs +20 -0
  3. package/browser/cjs/BTZ5uzK0wHzpiZGC.cjs +1 -0
  4. package/browser/cjs/B_D3JKseVvpRyX-E.cjs +1 -0
  5. package/browser/cjs/B_WyRpeiesnEiNP4.cjs +11 -0
  6. package/browser/cjs/BeKpqOx8It0RD0Rf.cjs +2 -0
  7. package/browser/cjs/Bj-EvSYeDfqmU0V6.cjs +2 -0
  8. package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +1 -0
  9. package/browser/cjs/ByIEqNsvj52sihT9.cjs +5 -0
  10. package/browser/cjs/C3moehR3VOd0LnmM.cjs +1 -0
  11. package/browser/cjs/C97KHSuikAbr1qVM.cjs +1 -0
  12. package/browser/cjs/CJLwX_A3y3TQUmzj.cjs +1 -0
  13. package/browser/cjs/CPSc2VSYZeZ1B9mi.cjs +1 -0
  14. package/browser/cjs/CPcBvw4ZPwHVTUZF.cjs +1 -0
  15. package/browser/cjs/CZm1jVZaHQ246prW.cjs +1 -0
  16. package/browser/cjs/CdDYyAfccXme8w6m.cjs +1 -0
  17. package/browser/cjs/DBJLJGiCGXesx5n6.cjs +1 -0
  18. package/browser/cjs/DLScL5AOXhHu9O9H.cjs +7 -0
  19. package/browser/cjs/Djsiad0Qha1Y-YaS.cjs +1 -0
  20. package/browser/cjs/IASAYG6qgv7lJY7y.cjs +1 -0
  21. package/browser/cjs/KZvriGbhEOVkQD0b.cjs +1 -0
  22. package/browser/cjs/UnMhi28mbvLiOXQe.cjs +1 -0
  23. package/browser/cjs/Vbigo0kFP3PFfmeA.cjs +1 -0
  24. package/browser/cjs/iMWEL01eC83oU-YY.cjs +1 -0
  25. package/browser/cjs/index.cjs +2 -7
  26. package/browser/cjs/w2GjebPlOFv3pCbm.cjs +1 -0
  27. package/browser/cjs/zQsyZpeXAvcVXJMs.cjs +1 -0
  28. package/browser/esm/BFnJuOSao7TjbB-2.mjs +1150 -0
  29. package/browser/esm/BGngIqHYTFzsezh-.mjs +105 -0
  30. package/browser/esm/BH0fLaa4Vfda2U-T.mjs +155 -0
  31. package/browser/esm/BKadOi_4tf3UqilJ.mjs +8878 -0
  32. package/browser/esm/BNhUUeacBwGsPLBQ.mjs +42 -0
  33. package/browser/esm/BkP8c-zrLAqdNL5E.mjs +82 -0
  34. package/browser/esm/BlykPulAqes3JMee.mjs +1376 -0
  35. package/browser/esm/Bt_J_RX2M5EfualB.mjs +217 -0
  36. package/browser/esm/CIvpm_sHFmNjZQ7A.mjs +52 -0
  37. package/browser/esm/Cwku0NEsbyq9Q_RE.mjs +129 -0
  38. package/browser/esm/D4-E6nt8hrlNPIFy.mjs +5391 -0
  39. package/browser/esm/D5kzg7IfEtrExqiB.mjs +47 -0
  40. package/browser/esm/DLG0lDeb0t2L5dW4.mjs +468 -0
  41. package/browser/esm/DN5ACcUVdZeTSdLP.mjs +411 -0
  42. package/browser/esm/DP50mI7SOk1spPHv.mjs +516 -0
  43. package/browser/esm/DfZkO9tkYUlBUgXw.mjs +508 -0
  44. package/browser/esm/DhSHhyt16cHMvS_1.mjs +612 -0
  45. package/browser/esm/DxEzstNhMkJ0uzic.mjs +191 -0
  46. package/browser/esm/DxurARMNTQF7_rno.mjs +99 -0
  47. package/browser/esm/EK3JudzGAPbSIzUc.mjs +2207 -0
  48. package/browser/esm/Lds8JbV0rmFse8IO.mjs +113 -0
  49. package/browser/esm/gdfNDmwpOOPidxVx.mjs +20 -0
  50. package/browser/esm/gr4KpbaVpVfm8KOB.mjs +219 -0
  51. package/browser/esm/index.mjs +152 -91
  52. package/licenses/dependencies.txt +137 -627
  53. package/node/esm/-xXP4QK8hYGcJeug.mjs +509 -0
  54. package/node/esm/BVNe-px0vKah_sh2.mjs +516 -0
  55. package/node/esm/CLqRv2FWsGMrPoB0.mjs +47 -0
  56. package/node/esm/CSaiKMpmmQJY2xtl.mjs +113 -0
  57. package/node/esm/CTVMIjaQZQtJ05F8.mjs +129 -0
  58. package/node/esm/CWDr4rcpYux8bSQk.mjs +82 -0
  59. package/node/esm/CgDlduchq8t6DdhF.mjs +190 -0
  60. package/node/esm/Ck1Im-zWbwJqZNU1.mjs +470 -0
  61. package/node/esm/Ctakr7TocM8RykpC.mjs +679 -0
  62. package/node/esm/DMhU1sS3kX-Im83k.mjs +106 -0
  63. package/node/esm/Dh2MI-_NSwxjrRP8.mjs +99 -0
  64. package/node/esm/ED4g6Bsz9syAhAW3.mjs +155 -0
  65. package/node/esm/VuLRDpv46Yib6fpp.mjs +4536 -0
  66. package/node/esm/index.mjs +10603 -2832
  67. package/package.json +27 -27
  68. package/resources/contents.json +30 -0
  69. package/resources/locales/contents.json +44 -0
  70. package/resources/locales/de/groups.cmd.json +219 -0
  71. package/resources/locales/de/studio.cmd.json +159 -0
  72. package/resources/locales/de/ui.msg.json +507 -0
  73. package/resources/locales/en/groups.cmd.json +219 -0
  74. package/resources/locales/en/studio.cmd.json +159 -0
  75. package/resources/locales/en/ui.msg.json +508 -0
  76. package/types/index.d.ts +2 -1761
  77. package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +131 -0
  78. package/types/src/anchorItems/AnchorItemsPanel.d.ts +29 -0
  79. package/types/src/anchorItems/index.d.ts +3 -0
  80. package/types/src/border/BorderPopupButton.d.ts +30 -0
  81. package/types/src/border/BorderStylePopupButton.d.ts +40 -0
  82. package/types/src/border/index.d.ts +3 -0
  83. package/types/src/chart/command/InsertChartCommandButton.d.ts +10 -0
  84. package/types/src/chart/command/index.d.ts +2 -0
  85. package/types/src/color/Alpha.d.ts +36 -0
  86. package/types/src/color/Checkboard.d.ts +11 -0
  87. package/types/src/color/CheckboardUtils.d.ts +3 -0
  88. package/types/src/color/ColorButton.d.ts +21 -0
  89. package/types/src/color/ColorButtonList.d.ts +17 -0
  90. package/types/src/color/ColorPanel.d.ts +71 -0
  91. package/types/src/color/ColorPopupButton.d.ts +29 -0
  92. package/types/src/color/CustomColorPanel.d.ts +16 -0
  93. package/types/src/color/EditableInput.d.ts +22 -0
  94. package/types/src/color/Hue.d.ts +29 -0
  95. package/types/src/color/Saturation.d.ts +45 -0
  96. package/types/src/color/SketchFields.d.ts +9 -0
  97. package/types/src/color/Swatch.d.ts +16 -0
  98. package/types/src/color/Types.d.ts +11 -0
  99. package/types/src/color/_Utils.d.ts +4 -0
  100. package/types/src/color/index.d.ts +7 -0
  101. package/types/src/command/AccountingStyleCommandButton.d.ts +18 -0
  102. package/types/src/command/AppearanceCommandButton.d.ts +3 -0
  103. package/types/src/command/BorderCommandButton.d.ts +20 -0
  104. package/types/src/command/ColorCommandButton.d.ts +23 -0
  105. package/types/src/command/DocThemeCommandButton.d.ts +19 -0
  106. package/types/src/command/FileCommandButton.d.ts +8 -0
  107. package/types/src/command/FontFamilyCommandButton.d.ts +9 -0
  108. package/types/src/command/FontSizeCommandButton.d.ts +21 -0
  109. package/types/src/command/InsertFunctionCommandPopupButton.d.ts +9 -0
  110. package/types/src/command/InsertFunctionSumCommandPopupButton.d.ts +8 -0
  111. package/types/src/command/LanguageCommandButton.d.ts +19 -0
  112. package/types/src/command/LocaleCommandButton.d.ts +17 -0
  113. package/types/src/command/NumberFormatCommandButton.d.ts +6 -0
  114. package/types/src/command/PasteCommandButton.d.ts +14 -0
  115. package/types/src/command/PresetCellStylesCommandButton.d.ts +11 -0
  116. package/types/src/command/PresetTableStylesCommandButton.d.ts +12 -0
  117. package/types/src/command/RegisterCatalog.d.ts +3 -0
  118. package/types/src/command/SheetCommandGroups.d.ts +10 -0
  119. package/types/src/command/SheetZoomCommandButton.d.ts +9 -0
  120. package/types/src/command/StudioCommandGroups.d.ts +11 -0
  121. package/types/src/command/TextEffectsCommandButton.d.ts +6 -0
  122. package/types/src/command/TextRotateGroupButton.d.ts +14 -0
  123. package/types/src/command/UndoRedoCommandButton.d.ts +14 -0
  124. package/types/src/command/WalkingCopyCommandButton.d.ts +6 -0
  125. package/types/src/command/WorkbookCommandGroups.d.ts +11 -0
  126. package/types/src/command/index.d.ts +23 -0
  127. package/types/src/conditionalFormat/ColorScaleRulePanel.d.ts +18 -0
  128. package/types/src/conditionalFormat/ConditionalFormatDetailsPanel.d.ts +23 -0
  129. package/types/src/conditionalFormat/ConditionalFormatDetailsTaskPane.d.ts +4 -0
  130. package/types/src/conditionalFormat/ConditionalFormatEditorPanel.d.ts +20 -0
  131. package/types/src/conditionalFormat/ConditionalFormatPlugin.d.ts +2 -0
  132. package/types/src/conditionalFormat/ConditionalFormatRangeField.d.ts +32 -0
  133. package/types/src/conditionalFormat/ConditionalFormatStylePicker.d.ts +34 -0
  134. package/types/src/conditionalFormat/ConditionalFormatTitle.d.ts +10 -0
  135. package/types/src/conditionalFormat/DataBarRulePanel.d.ts +23 -0
  136. package/types/src/conditionalFormat/IconSetRulePanel.d.ts +23 -0
  137. package/types/src/conditionalFormat/PresetChip.d.ts +30 -0
  138. package/types/src/conditionalFormat/PresetScalesCommandButton.d.ts +20 -0
  139. package/types/src/conditionalFormat/RulePreview.d.ts +23 -0
  140. package/types/src/conditionalFormat/RuleSection.d.ts +20 -0
  141. package/types/src/conditionalFormat/ScaleMiniGrid.d.ts +59 -0
  142. package/types/src/conditionalFormat/ScaleStopRow.d.ts +34 -0
  143. package/types/src/conditionalFormat/index.d.ts +3 -0
  144. package/types/src/conditionalFormat/previewColor.d.ts +50 -0
  145. package/types/src/conditions/AverageOption.d.ts +25 -0
  146. package/types/src/conditions/BetweenOption.d.ts +25 -0
  147. package/types/src/conditions/BooleanOption.d.ts +24 -0
  148. package/types/src/conditions/CombinatorOption.d.ts +41 -0
  149. package/types/src/conditions/ConditionEditor.d.ts +57 -0
  150. package/types/src/conditions/ConditionUtils.d.ts +83 -0
  151. package/types/src/conditions/DateTimeOption.d.ts +43 -0
  152. package/types/src/conditions/ExpressionOption.d.ts +26 -0
  153. package/types/src/conditions/InSetOption.d.ts +37 -0
  154. package/types/src/conditions/NumberOption.d.ts +24 -0
  155. package/types/src/conditions/OperatorAndParamEditor.d.ts +55 -0
  156. package/types/src/conditions/OperatorSelect.d.ts +35 -0
  157. package/types/src/conditions/OperatorSelectPopupButton.d.ts +39 -0
  158. package/types/src/conditions/ScalarOption.d.ts +29 -0
  159. package/types/src/conditions/SelectorSelect.d.ts +43 -0
  160. package/types/src/conditions/StringOption.d.ts +24 -0
  161. package/types/src/conditions/TimePeriodOption.d.ts +25 -0
  162. package/types/src/conditions/TopNOption.d.ts +25 -0
  163. package/types/src/conditions/index.d.ts +13 -0
  164. package/types/src/dataValidation/DataValidationDetailsPanel.d.ts +16 -0
  165. package/types/src/dataValidation/DataValidationDetailsTaskPane.d.ts +3 -0
  166. package/types/src/dataValidation/DataValidationEditorPanel.d.ts +12 -0
  167. package/types/src/dataValidation/DataValidationPlugin.d.ts +2 -0
  168. package/types/src/dataValidation/index.d.ts +2 -0
  169. package/types/src/debug/DebugUtils.d.ts +4 -0
  170. package/types/src/debug/index.d.ts +2 -0
  171. package/types/src/dialog/CommentsDialog.d.ts +11 -0
  172. package/types/src/dialog/FindReplaceWindow.d.ts +13 -0
  173. package/types/src/dialog/HyperlinkDialog.d.ts +28 -0
  174. package/types/src/dialog/InsertFunctionDialog.d.ts +25 -0
  175. package/types/src/dialog/NamedReferenceDialog.d.ts +17 -0
  176. package/types/src/dialog/NumberFormatDialog.d.ts +12 -0
  177. package/types/src/dialog/ResizeHeaderDialog.d.ts +15 -0
  178. package/types/src/dialog/ShortcutKeysDialog.d.ts +9 -0
  179. package/types/src/dialog/ShortcutKeysPanel.d.ts +28 -0
  180. package/types/src/dialog/SortDialog.d.ts +9 -0
  181. package/types/src/dialog/TableNewDialog.d.ts +14 -0
  182. package/types/src/dialog/WorkbookStatisticsDialog.d.ts +13 -0
  183. package/types/src/dialog/index.d.ts +10 -0
  184. package/types/src/filter/ColumnMenu.d.ts +13 -0
  185. package/types/src/filter/FilterList.d.ts +28 -0
  186. package/types/src/filter/index.d.ts +3 -0
  187. package/types/src/form/FormulaField.d.ts +221 -0
  188. package/types/src/form/InputField.d.ts +89 -0
  189. package/types/src/form/index.d.ts +3 -0
  190. package/types/src/formulaBar/FormulaBar.d.ts +8 -0
  191. package/types/src/formulaBar/IFormulaBar.d.ts +51 -0
  192. package/types/src/formulaBar/index.d.ts +3 -0
  193. package/types/src/function/FunctionArgumentsPanel.d.ts +57 -0
  194. package/types/src/function/FunctionSearchPanel.d.ts +35 -0
  195. package/types/src/function/InsertFunctionWizard.d.ts +79 -0
  196. package/types/src/function/index.d.ts +4 -0
  197. package/types/src/function/paneMetrics.d.ts +33 -0
  198. package/types/src/index.d.ts +21 -0
  199. package/types/src/itemsPanel/EditorPanel.d.ts +21 -0
  200. package/types/src/itemsPanel/ItemCard.d.ts +57 -0
  201. package/types/src/itemsPanel/ItemsDescriptor.d.ts +215 -0
  202. package/types/src/itemsPanel/ItemsPanel.d.ts +45 -0
  203. package/types/src/itemsPanel/SortableCards.d.ts +67 -0
  204. package/types/src/itemsPanel/index.d.ts +6 -0
  205. package/types/src/movable/MovableContextMenu.d.ts +13 -0
  206. package/types/src/movable/index.d.ts +2 -0
  207. package/types/src/named/INamedCollectionEditor.d.ts +37 -0
  208. package/types/src/named/NamedCollectionEditor.d.ts +7 -0
  209. package/types/src/named/NamedDetailsPanel.d.ts +11 -0
  210. package/types/src/named/NamedDetailsTaskPane.d.ts +3 -0
  211. package/types/src/named/NamedDraft.d.ts +68 -0
  212. package/types/src/named/NamedEditorPanel.d.ts +19 -0
  213. package/types/src/named/NamedPlugin.d.ts +2 -0
  214. package/types/src/named/index.d.ts +8 -0
  215. package/types/src/numberFormat/NumberFormatPanel.d.ts +29 -0
  216. package/types/src/numberFormat/NumberFormatTaskPane.d.ts +12 -0
  217. package/types/src/numberFormat/index.d.ts +8 -0
  218. package/types/src/protectedRange/ProtectedRangeDetailsPanel.d.ts +20 -0
  219. package/types/src/protectedRange/ProtectedRangeDetailsTaskPane.d.ts +3 -0
  220. package/types/src/protectedRange/ProtectedRangeEditorPanel.d.ts +27 -0
  221. package/types/src/protectedRange/ProtectedRangePlugin.d.ts +2 -0
  222. package/types/src/protectedRange/index.d.ts +2 -0
  223. package/types/src/protection/WorkbookProtectionDialog.d.ts +23 -0
  224. package/types/src/protection/WorkbookProtectionPanel.d.ts +51 -0
  225. package/types/src/protection/index.d.ts +3 -0
  226. package/types/src/sheet/SheetTabMenu.d.ts +21 -0
  227. package/types/src/sheet/SheetsAllMenu.d.ts +16 -0
  228. package/types/src/sheet/index.d.ts +3 -0
  229. package/types/src/statusBar/NumberStats.d.ts +27 -0
  230. package/types/src/statusBar/SheetZoomScale.d.ts +11 -0
  231. package/types/src/statusBar/StatusBar.d.ts +35 -0
  232. package/types/src/statusBar/index.d.ts +4 -0
  233. package/types/src/studio/CommandsWrapper.d.ts +36 -0
  234. package/types/src/studio/DefaultLogo.d.ts +3 -0
  235. package/types/src/studio/EagerStudio.d.ts +5 -0
  236. package/types/src/studio/Studio.d.ts +26 -0
  237. package/types/src/studio/StudioCommandProvider.d.ts +26 -0
  238. package/types/src/studio/StudioCommands.d.ts +115 -0
  239. package/types/src/studio/StudioNotifierProvider.d.ts +10 -0
  240. package/types/src/studio/StudioProps.d.ts +372 -0
  241. package/types/src/studio/StudioSplitPane.d.ts +60 -0
  242. package/types/src/studio/StudioTaskPaneArea.d.ts +8 -0
  243. package/types/src/studio/StudioToolbar.d.ts +37 -0
  244. package/types/src/studio/index.d.ts +4 -0
  245. package/types/src/studio/useStudioApp.d.ts +51 -0
  246. package/types/src/table/TableDetailsPanel.d.ts +17 -0
  247. package/types/src/table/TableDetailsTaskPane.d.ts +3 -0
  248. package/types/src/table/TablePlugin.d.ts +2 -0
  249. package/types/src/table/TableStyleCanvasPreview.d.ts +21 -0
  250. package/types/src/table/TableStyleOptionsPanel.d.ts +38 -0
  251. package/types/src/table/TableStylePreview.d.ts +43 -0
  252. package/types/src/table/index.d.ts +7 -0
  253. package/types/src/theme/ThemeSelectButton.d.ts +23 -0
  254. package/types/src/theme/ThemeSelectPanel.d.ts +17 -0
  255. package/types/src/theme/ThemeSelectPopupButton.d.ts +24 -0
  256. package/types/src/theme/ThemeUtils.d.ts +57 -0
  257. package/types/src/theme/index.d.ts +5 -0
  258. package/types/src/toast/ToastError.d.ts +10 -0
  259. package/types/src/toast/index.d.ts +2 -0
  260. package/types/src/toolbar/WorkbookToolbars.d.ts +46 -0
  261. package/types/src/toolbar/index.d.ts +2 -0
  262. package/types/src/workbook/DefaultRenderers.d.ts +23 -0
  263. package/types/src/workbook/DocumentTitle.d.ts +69 -0
  264. package/types/src/workbook/WorkbookContextMenu.d.ts +13 -0
  265. package/types/src/workbook/WorkbookElement.d.ts +12 -0
  266. package/types/src/workbook/WorkbookStrip.d.ts +37 -0
  267. package/types/src/workbook/index.d.ts +7 -0
  268. package/browser/cjs/0DtrpXkQQehBmvSv.cjs +0 -6
  269. package/browser/cjs/6C3ia2nz4Zm-AdMZ.cjs +0 -7
  270. package/browser/cjs/BR_EGEaHisRrXAtK.cjs +0 -6
  271. package/browser/cjs/B_v_M4TiavtofChs.cjs +0 -42
  272. package/browser/cjs/C17p-h_nw582H7WD.cjs +0 -20
  273. package/browser/cjs/CInmVysdoHEvvW9h.cjs +0 -6
  274. package/browser/cjs/CMvQZPQsE7MuTMy_.cjs +0 -6
  275. package/browser/cjs/CkNt54AXVfJjIWja.cjs +0 -6
  276. package/browser/cjs/CtRvyhDzQxsk7dkI.cjs +0 -6
  277. package/browser/cjs/DN9cQ4_4ERQvzKn6.cjs +0 -6
  278. package/browser/cjs/DUTuBWUNF-w3Fxtb.cjs +0 -6
  279. package/browser/cjs/pTzEs1wlZj5Bb6xc.cjs +0 -18
  280. package/browser/esm/8ZnwcsRrGO3Nlw9Y.mjs +0 -54
  281. package/browser/esm/BFZ4oCbQukelEVLI.mjs +0 -53
  282. package/browser/esm/BP3nTf4-SLftsj61.mjs +0 -640
  283. package/browser/esm/BSMkBkXBQgZhX1xk.mjs +0 -2159
  284. package/browser/esm/CPLIJbynjEkwF2T0.mjs +0 -4533
  285. package/browser/esm/CuC13VFjBYFE7kub.mjs +0 -155
  286. package/browser/esm/Cw3i8T1tVnm8o6eB.mjs +0 -46
  287. package/browser/esm/D6E8W2KK4dGVRQO_.mjs +0 -25
  288. package/browser/esm/D8xc3AM9QHEqmpb9.mjs +0 -50
  289. package/browser/esm/DA_bEpA5kkn89fmW.mjs +0 -2411
  290. package/browser/esm/DVqOr-7nEXA7IjKJ.mjs +0 -26
  291. package/browser/esm/VAUOzclLs-dR9nt_.mjs +0 -50
  292. package/node/assets/style.css +0 -1
  293. package/node/esm/B9dvpdCD_p2q8aNP.mjs +0 -156
  294. package/node/esm/BBxZemzbmUkoOYdq.mjs +0 -46
  295. package/node/esm/BDdkV45Cf7BLs5jE.mjs +0 -25
  296. package/node/esm/BoX8OuVRgUNgw0Wb.mjs +0 -91
  297. package/node/esm/CPbwVoL6mq66TtTR.mjs +0 -53
  298. package/node/esm/DMd6h1vz-USluank.mjs +0 -88
  299. package/node/esm/DYgtaT_soTbSP8M9.mjs +0 -52
  300. package/node/esm/DxDGSRoOYlWydiwL.mjs +0 -57
  301. package/node/esm/OMgXBbHk-VRNKAop.mjs +0 -26
  302. package/node/esm/bGXLfLFngllNb8U1.mjs +0 -50
@@ -1,26 +0,0 @@
1
- import { jsx as n, jsxs as O } from "react/jsx-runtime";
2
- import { memo as f, useState as g } from "react";
3
- import { Box as S, FormControlLabel as a, Checkbox as l } from "@mui/material";
4
- import { Sort as s, IRange as r } from "@sheetxl/sdk";
5
- import { useCallbackRef as H } from "@sheetxl/utils-react";
6
- import { OptionsDialog as x } from "@sheetxl/utils-mui";
7
- /**
8
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.27
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 w = f((u) => {
14
- const { initialValue: c, context: d, onInput: m, onDone: p, ...h } = u, C = d?.().range, v = d?.().cell.toString(), [o, i] = g(c ?? s.DefaultRangeOptions), b = H((e) => {
15
- let t = null;
16
- e === "Sort" && (t = { ...c, ...o }), m?.(t), p?.(t);
17
- }, [o, p, m, c]);
18
- return n(x, { title: "Sort", options: ["Sort", "Cancel"], onDone: b, ...h, children: O(S, { sx: { display: "flex", flexDirection: "column" }, children: [n(a, { control: n(l, { checked: !o.reverse, onChange: () => i((e) => ({ ...e, reverse: !e.reverse })) }), label: "Is Ascending", labelPlacement: "end" }), n(a, { control: n(l, { checked: o.hasHeader, onChange: () => i((e) => ({ ...e, hasHeader: !e.hasHeader })) }), label: "Has Header", labelPlacement: "end" }), n(a, { control: n(l, { checked: o.collatorOptions?.sensitivity === s.CaseSensitiveOptions.sensitivity, onChange: () => i((e) => ({ ...e, collatorOptions: o.collatorOptions?.sensitivity === s.CaseSensitiveOptions.sensitivity ? s.CaseInsensitiveOptions : s.CaseSensitiveOptions })) }), label: "Case Sensitive", labelPlacement: "end" }), n(a, { control: n(l, { checked: o.orientation === r.Orientation.Row, onChange: () => i((e) => {
19
- const t = e.orientation === r.Orientation.Row ? r.Orientation.Column : r.Orientation.Row;
20
- return { ...C.getDefaultSortCriteria(t, v).options, includeHidden: e.includeHidden, reverse: e.reverse, orientation: t };
21
- }) }), label: "Row Sort", labelPlacement: "end" }), n(a, { control: n(l, { checked: o.includeHidden, onChange: () => i((e) => ({ ...e, includeHidden: !e.includeHidden })) }), label: "Include Hidden", labelPlacement: "end" })] }) });
22
- });
23
- export {
24
- w as SortDialog,
25
- w as default
26
- };
@@ -1,50 +0,0 @@
1
- import { jsx as i, jsxs as r } from "react/jsx-runtime";
2
- import { memo as L, useMemo as y, useState as w, useCallback as V } from "react";
3
- import { alpha as p, getOverlayAlpha as c } from "@mui/material/styles";
4
- import { Box as C, FormControl as P, TextField as A, InputLabel as N, Select as W, Typography as E, MenuItem as H } from "@mui/material";
5
- import { IRange as K } from "@sheetxl/sdk";
6
- import { useCallbackRef as s, KeyCodes as G } from "@sheetxl/utils-react";
7
- import { OptionsDialog as q } from "@sheetxl/utils-mui";
8
- /**
9
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.27
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 J = ["Autofit", "Ok", "Cancel"], te = L((T) => {
15
- const { initialValue: k, context: a, onOption: O, onValidateOption: u, onInput: b, onDone: d, options: z = J, defaultOption: l = z?.[1], cancelOption: m = "Cancel", sx: I, ...D } = T, F = y(() => a?.().getOrientation() === K.Orientation.Column, [a]), [t, v] = w(k), [U, M] = w(!1), g = V(async (e, n) => !0, []), f = y(() => {
16
- if (!a().toUnits) return null;
17
- let e = t?.size ?? 0, n = "Px";
18
- return t.unit === "Px" ? (e = a().toUnits?.(e), n = a().getUnitText()) : (e = a().toPixels?.(e), n = "Px"), { size: e, unit: n };
19
- }, [t?.unit, t?.size]), x = s(async (e) => {
20
- const n = e === m;
21
- n || b?.(t, e), O?.(e, n, e === l), d?.();
22
- }, [t, b, d, O, m, l]), R = s(async (e) => {
23
- e.keyCode === G.Enter && await g?.(t, null) !== !1 && x(l);
24
- }, [t, x]), S = s(async (e) => {
25
- let n = await Promise.resolve(u?.(e));
26
- try {
27
- n !== !1 && (n = await Promise.resolve(g?.(t, e)) ?? !0);
28
- } catch {
29
- }
30
- return n ?? !0;
31
- }, [u]), $ = s((e) => {
32
- const n = { ...t, size: Number(e.target.value) };
33
- v(n), g?.(n, null);
34
- }, [t, u]), j = s((e) => {
35
- const n = e.target.value, o = { ...t, unit: n };
36
- v(o);
37
- }, [t]), B = y(() => {
38
- const e = a().getUnitText(), n = (h) => i(H, { value: h, children: h }, h), o = [];
39
- return o.push(n("Px")), o.push(n(e)), o;
40
- }, []);
41
- return i(q, { title: "Resize " + (F ? "Columns" : "Rows"), options: z, onDone: d, onOption: (e) => x(e), onValidateOption: S, defaultOption: l, cancelOption: m, autoFocusSel: ".autoFocus", sx: { width: "380px", ...I }, ...D, children: r(C, { sx: { paddingTop: (e) => e.spacing(0), paddingBottom: (e) => e.spacing(1), display: "flex", flexDirection: "column" }, children: [r(C, { sx: { rowGap: (e) => e.spacing(1), display: "flex", flexDirection: "row", gap: (e) => e.spacing(0.5), alignItems: "end", justifyContent: "center" }, children: [i(P, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: i(A, { label: "Size", onFocus: (e) => {
42
- U || e.target?.select(), M(!0);
43
- }, sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(0.5) } }, slotProps: { inputLabel: { shrink: !0 }, htmlInput: { className: "autoFocus", spellCheck: !1, autoComplete: "off", type: "number", inputMode: "numeric", pattern: "[0-9]*", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75), backgroundImage: `linear-gradient(${p("#fff", c(5))}, ${p("#fff", c(5))})` } } }, value: t.size, onChange: $, onKeyDown: R, onContextMenu: (e) => {
44
- e.stopPropagation();
45
- } }) }), r(P, { sx: { minWidth: 85 }, size: "small", children: [i(N, { children: "Unit" }), i(W, { value: t.unit, label: "Unit", onChange: j, sx: { backgroundImage: `linear-gradient(${p("#fff", c(5))}, ${p("#fff", c(5))})` }, children: B })] })] }), f && i(C, { children: r(E, { variant: "body2", component: "div", sx: { paddingLeft: (e) => e.spacing(2) }, children: [f.size, " ", f.unit] }) })] }) });
46
- });
47
- export {
48
- te as ResizeHeaderDialog,
49
- te as default
50
- };
@@ -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,156 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.27
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,46 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.27
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 a, useMemo as n, useState as l, useCallback as o } from "react";
9
- import { Box as i } from "@mui/material";
10
- import { useCallbackRef as r } from "@sheetxl/utils-react";
11
- import { OptionsDialog as s } from "@sheetxl/utils-mui";
12
- import { NamedInput as d, RangeInput as p } from "./index.mjs";
13
- const m = ["Ok", "Cancel"], u = a((a2) => {
14
- const { initialValue: u2 = null, context: c, onOption: g, onValidateOption: x, onDone: f, onInput: N, options: y = m, defaultOption: T = y?.[0], cancelOption: V = "Cancel", sx: h, ...O } = a2, v = n(() => c?.().getNames().findValidName("Range1"), []), C = n(() => {
15
- if (!u2) return true;
16
- }, []), [R, w] = l({ displayText: u2?.getName() ?? v, errorText: null }), [F, I] = l({ displayValue: u2?.getRanges() ?? c?.().selection() ?? null, errorText: null }), [D, j] = l(false), B = o(async (e2) => !R.errorText && !F.errorText, []), E = r((e2, t2, a3) => {
17
- if (!t2) {
18
- let e3 = null;
19
- C ? e3 = c?.().getNames().addReference(R?.displayText, F?.displayValue, false) : ("reference" === u2.getType() && u2.doBatch(() => {
20
- u2.setName(R?.displayText), u2.setReference(F?.displayValue);
21
- }, `Edit Named '${R?.displayText}'`), e3 = u2), e3 && (e3.select(), N(e3));
22
- }
23
- g?.(e2, t2, a3), f?.();
24
- }, [c, R, F, f, g, T, V, N]), L = r((e2) => {
25
- let t2 = null;
26
- try {
27
- c?.().getNames().validateName(e2);
28
- } catch (e3) {
29
- t2 = e3.message;
30
- }
31
- w({ displayText: e2, errorText: t2 });
32
- }, []), b = r((e2) => {
33
- u2 && u2.getName().toLowerCase() === e2.toLowerCase() || c?.().getNames().validateName(e2);
34
- }, [c, u2]), k = o((e2) => {
35
- I({ displayValue: e2 ?? null, errorText: null });
36
- }, []);
37
- return e(s, { title: (C ? "Define" : "Edit") + " Range", options: y, onOption: E, onValidateOption: B, defaultOption: T, cancelOption: V, autoFocusSel: ".autoFocus", sx: { width: "460px", ...h }, ...O, children: t(i, { sx: { paddingTop: (e2) => e2.spacing(1), paddingBottom: (e2) => e2.spacing(0), rowGap: (e2) => e2.spacing(1), range: "flex", flexDirection: "column" }, children: [e(d, { formName: "name", defaultInput: v, value: R.displayText, onChangeInput: L, onValidate: b, onFocus: (e2) => {
38
- D || e2.target?.select(), j(true);
39
- } }), e(p, { formName: "range", value: F.displayValue, onChangeInput: k, resolvedAddress: c ? c().getNames().getRanges.bind(c().getNames()) : void 0, onFocus: (e2) => {
40
- D || e2.target?.select(), j(true);
41
- } })] }) });
42
- });
43
- export {
44
- u as NamedReferenceDialog,
45
- u as default
46
- };
@@ -1,25 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.27
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,91 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.27
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 { jsxs as e, jsx as t } from "react/jsx-runtime";
8
- import { Box as i, TextField as n, InputAdornment as o, IconButton as r, FormControlLabel as l, Checkbox as a, Typography as d, TableCell as s, DialogContent as c } from "@mui/material";
9
- import { KeyCodes as h, DynamicIcon as p } from "@sheetxl/utils-react";
10
- import { toShortcutElements as g, InternalWindow as m } from "@sheetxl/utils-mui";
11
- import u, { useState as f, useMemo as x, useEffect as y } from "react";
12
- import b from "clsx";
13
- import { alpha as w, getOverlayAlpha as R, styled as C } from "@mui/material/styles";
14
- import { AutoSizer as v, Table as k, Column as $ } from "react-virtualized";
15
- import { CommonUtils as D } from "@sheetxl/utils";
16
- const I = "ReactVirtualizedDemo-flexContainer", K = "ReactVirtualizedDemo-tableRow", S = "ReactVirtualizedDemo-tableRowHover", z = "ReactVirtualizedDemo-tableCell", L = "ReactVirtualizedDemo-noClick";
17
- class H extends u.PureComponent {
18
- constructor() {
19
- super(...arguments), this.getRowClassName = ({ index: e2 }) => {
20
- const { onRowClick: t2 } = this.props;
21
- return b(K, I, { [S]: -1 !== e2 && null != t2 });
22
- }, this.cellRenderer = ({ cellData: i2, rowData: n2, dataKey: o2, columnIndex: r2, width: l2 }) => {
23
- const { columns: a2, rowHeight: d2, onRowClick: c2 } = this.props;
24
- let h2 = i2, m2 = { height: d2, paddingRight: "2px", paddingTop: "0px", paddingBottom: "0px", minWidth: `${l2}px`, maxWidth: `${l2}px` };
25
- if ("shortcut" === o2 ? h2 = g(i2) : "description" === o2 && (m2 = { ...m2, fontSize: ".75rem", display: "block", paddingTop: "4px", paddingRight: "8px", whiteSpace: "pre-line" }), "label" === o2) {
26
- let o3 = n2.icon;
27
- o3 && "string" != typeof o3 || (o3 = t(p, { iconKey: o3 })), h2 = e("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [o3, i2] });
28
- }
29
- return t(s, { component: "div", className: b(z, I, { [L]: null == c2 }), variant: "body", style: m2, align: null != r2 && a2[r2].numeric ? "right" : "left", children: h2 });
30
- }, this.headerRenderer = ({ label: e2, columnIndex: i2, dataKey: n2, width: o2 }) => {
31
- const { headerHeight: r2, columns: l2 } = this.props, a2 = l2[i2];
32
- return t(s, { component: "div", className: b(z, I, L), variant: "head", sx: { width: o2, height: r2, paddingLeft: "label" === n2 ? "calc(16px + 8px + var(--icon-size, 1rem))" : void 0, backgroundColor: (e3) => e3.palette.grey[300] }, align: a2.numeric ? "right" : "left", children: t("div", { children: a2.label }) });
33
- };
34
- }
35
- static {
36
- this.defaultProps = { headerHeight: 40, rowHeight: 48 };
37
- }
38
- render() {
39
- const { columns: e2, rowHeight: i2, headerHeight: n2, ...o2 } = this.props;
40
- return t(v, { children: ({ height: r2, width: l2 }) => t(k, { height: r2, width: l2, rowHeight: i2, gridStyle: { direction: "inherit" }, headerHeight: n2, ...o2, rowClassName: this.getRowClassName, children: e2.map(({ dataKey: e3, width: i3, widthLess: n3, ...o3 }, r3) => {
41
- const a2 = n3 ? l2 - n3 : i3;
42
- return t($, { style: { flex: `1 1 ${a2}px` }, headerRenderer: (e4) => this.headerRenderer({ ...e4, width: a2, columnIndex: r3 }), className: I, cellDataGetter: ({ rowData: e4, columnData: t2, dataKey: i4 }) => e4[i4], cellRenderer: (e4) => this.cellRenderer({ ...e4, width: a2, columnIndex: r3 }), dataKey: e3, width: a2, ...o3 }, e3);
43
- }) }) });
44
- }
45
- }
46
- const N = C(H)(({ theme: e2 }) => ({ "& .ReactVirtualized__Table__headerRow": { ..."rtl" === e2.direction && { paddingLeft: "0 !important" }, ..."rtl" !== e2.direction && { paddingRight: void 0 } }, "& .ReactVirtualized__Table__Grid": { outline: "none" }, [`& .${I}`]: { display: "flex", alignItems: "center", boxSizing: "border-box" }, [`& .${K}`]: { cursor: "pointer" }, [`& .${S}`]: { "&:hover:not([disabled])": { backgroundColor: e2.palette.grey[200] } }, [`& .${z}`]: { flex: 1 }, [`& .${L}`]: { cursor: "initial" } }));
47
- function T(s2) {
48
- const { commands: c2, ...g2 } = s2, [m2, u2] = f(false), [b2, C2] = f(""), v2 = x(() => {
49
- let e2 = c2.getAllCommands();
50
- m2 || (e2 = e2.filter((e3) => e3.command.getShortcut())), e2.sort((e3, t3) => e3.command.getLabel().localeCompare(t3.command.getLabel()));
51
- const t2 = [], i2 = (e3) => e3.replace(/\n\n/g, "\n"), n2 = e2.length;
52
- for (let o2 = 0; o2 < n2; o2++) {
53
- const n3 = e2[o2].command, r2 = n3.getShortcut();
54
- if (Array.isArray(r2)) {
55
- const e3 = r2, o3 = e3.length;
56
- for (let r3 = 0; r3 < o3; r3++) t2.push({ label: n3.getLabel(), icon: n3.getIcon(), description: i2(n3.getDescription()), shortcut: e3[r3] });
57
- } else t2.push({ label: n3.getLabel(), icon: n3.getIcon(), description: i2(n3.getDescription()), shortcut: n3.getShortcut() });
58
- }
59
- return t2;
60
- }, [m2, c2]), [k2, $2] = f(null);
61
- y(() => {
62
- import("fuse.js").then((e2) => {
63
- $2(new e2.default(v2, { threshold: 0, ignoreLocation: true, keys: ["label", "description"] }));
64
- });
65
- }, [v2]);
66
- const [I2, K2] = f(v2), S2 = b2.length > 0 && 0 === I2.length;
67
- y(() => {
68
- k2 && D.debounce(() => {
69
- if (0 === b2.trim().length) return void K2(v2);
70
- const e2 = k2.search(b2.trim()), t2 = new Array(e2.length);
71
- for (let i2 = 0; i2 < e2.length; i2++) t2[i2] = e2[i2].item;
72
- K2(t2);
73
- }, 90)();
74
- }, [k2, b2]);
75
- return e(i, { style: { height: 440, width: "100%", display: "flex", flexDirection: "column" }, ...g2, children: [e(i, { sx: { display: "flex", alignItems: "center", justifyContent: "end", marginBottom: (e2) => e2.spacing(2), color: (e2) => e2.palette.text.secondary }, children: [t(n, { slotProps: { input: { sx: { backgroundImage: `linear-gradient(${w("#fff", R(5))}, ${w("#fff", R(5))})` }, endAdornment: t(o, { sx: { opacity: b2.length > 0 ? 1 : 0, display: b2.length > 0 ? "flex" : "none" }, position: "end", children: t(r, { "aria-label": "clear search", onClick: () => C2(""), edge: "end", children: t(p, { iconKey: "Close" }) }) }) }, htmlInput: { className: "input", autoFocus: true, spellCheck: false, placeholder: "Type to search key bindings", autoComplete: "off", sx: { paddingTop: (e2) => e2.spacing(1), paddingBottom: (e2) => e2.spacing(1) } } }, sx: { flex: "1 1 40%", marginRight: (e2) => e2.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (e2) => S2 ? `${e2.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (e2) => S2 ? `${e2.palette.error.main} !important` : void 0 } }, value: b2, onChange: (e2) => {
76
- C2(e2.target.value);
77
- }, onKeyDown: (e2) => {
78
- e2.which === h.Escape && b2.length > 0 && (C2(""), e2.stopPropagation(), e2.preventDefault());
79
- }, onContextMenu: (e2) => {
80
- e2.stopPropagation();
81
- } }), t(l, { sx: { flex: "1 1 60%" }, control: t(a, { checked: m2, onChange: () => u2(!m2) }), label: "Show commands without key bindings", labelPlacement: "start" })] }), t(i, { sx: { flex: "1 1 100%", borderRadius: (e2) => `${e2.shape.borderRadius}px`, border: (e2) => `solid ${e2.palette.divider} 1px`, paddingRight: "1px", overflow: "hidden", "* .MuiTableCell-head": { background: (e2) => e2.palette.background.paper, backgroundImage: `linear-gradient(${w("#fff", R(5))}, ${w("#fff", R(5))})` } }, children: t(N, { rowCount: I2.length, rowGetter: (e2) => I2[e2.index], columns: [{ width: 214, label: "Command", dataKey: "label" }, { width: 226, label: "Key Binding", dataKey: "shortcut" }, { label: "Description", dataKey: "description", widthLess: 453 }] }) }), t(i, { sx: { display: "flex", flexShrink: "0", paddingLeft: (e2) => e2.spacing(1), paddingTop: (e2) => e2.spacing(1), paddingRight: (e2) => e2.spacing(1), userSelect: "none", justifyContent: "flex-end" }, children: t(d, { noWrap: true, component: "div", sx: { color: (e2) => S2 ? e2.palette.error.main : e2.palette.text.secondary }, children: `${0 === I2.length ? "No" : I2.length} shortcut key${1 === I2.length ? "" : "s"}${b2.length > 0 ? " found" : ""}` }) })] });
82
- }
83
- const _ = (e2) => {
84
- const { title: i2 = "Shortcut Keys", commands: n2, sx: o2, ...r2 } = e2;
85
- return t(m, { isModal: true, onKeyDown: (e3) => {
86
- e3.keyCode === h.F1 && e3.preventDefault();
87
- }, sx: { width: "780px", ...o2 }, title: i2, autoFocusSel: ".input", ...r2, children: t(c, { dividers: true, children: t(T, { commands: n2, sx: { marginBottom: "8px" } }) }) });
88
- };
89
- export {
90
- _ as default
91
- };
@@ -1,53 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.27
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
- };
@@ -1,88 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.27
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 { jsxs as e, jsx as t } from "react/jsx-runtime";
8
- import { PureComponent as n, Component as i, memo as r, useState as o, useCallback as s, useLayoutEffect as a } from "react";
9
- import { useTheme as l } from "@mui/material/styles";
10
- import { Box as h } from "@mui/material";
11
- import p from "tinycolor2";
12
- import { Alpha as d, Hue as c } from "react-color/es/components/common/index.js";
13
- import g from "react-color/es/components/sketch/SketchFields.js";
14
- import { ReactUtils as u } from "@sheetxl/utils-react";
15
- import { C as b } from "./index.mjs";
16
- class m extends (n || i) {
17
- constructor(e2) {
18
- super(e2), this.handleChange = (e3) => {
19
- "function" == typeof this.props.onChange && this.throttle(this.props.onChange, ((e4, t2, n2) => {
20
- var i2 = n2.getBoundingClientRect(), r2 = i2.width, o2 = i2.height, s2 = "number" == typeof e4.pageX ? e4.pageX : e4.touches[0].pageX, a2 = "number" == typeof e4.pageY ? e4.pageY : e4.touches[0].pageY, l2 = s2 - (n2.getBoundingClientRect().left + window.pageXOffset), h2 = a2 - (n2.getBoundingClientRect().top + window.pageYOffset);
21
- l2 < 0 ? l2 = 0 : l2 > r2 && (l2 = r2), h2 < 0 ? h2 = 0 : h2 > o2 && (h2 = o2);
22
- var p2 = l2 / r2, d2 = 1 - h2 / o2;
23
- return { h: t2.h, s: p2, v: d2, a: t2.a, source: "hsv" };
24
- })(e3, this.props.hsl, this.container), e3), e3.preventDefault();
25
- }, this.handleMouseDown = (e3) => {
26
- this.handleChange(e3);
27
- const t2 = this.getContainerRenderWindow();
28
- t2.addEventListener("mousemove", this.handleChange), t2.addEventListener("mouseup", this.handleMouseUp);
29
- }, this.handleMouseUp = (e3) => {
30
- e3.preventDefault(), this.unbindEventListeners();
31
- }, this.throttle = (function(e3, t2, n2) {
32
- let i2, r2, o2, s2;
33
- var a2 = 0;
34
- n2 || (n2 = {});
35
- let l2 = function() {
36
- a2 = false === n2.leading ? 0 : Date.now(), i2 = null, s2 = e3.apply(r2, o2), i2 || (r2 = o2 = null);
37
- }, h2 = function() {
38
- var h3 = Date.now();
39
- a2 || false !== n2.leading || (a2 = h3);
40
- var p2 = t2 - (h3 - a2);
41
- return r2 = this, o2 = arguments, p2 <= 0 || p2 > t2 ? (i2 && (clearTimeout(i2), i2 = null), a2 = h3, s2 = e3.apply(r2, o2), i2 || (r2 = o2 = null)) : i2 || false === n2.trailing || (i2 = setTimeout(l2, p2)), s2;
42
- };
43
- return h2.cancel = function() {
44
- clearTimeout(i2), a2 = 0, i2 = r2 = o2 = null;
45
- }, h2;
46
- })((e3, t2, n2) => {
47
- e3(t2, n2);
48
- }, 50);
49
- }
50
- componentWillUnmount() {
51
- this.throttle.cancel(), this.unbindEventListeners();
52
- }
53
- getContainerRenderWindow() {
54
- const { container: e2 } = this;
55
- let t2 = window;
56
- for (; !t2.document.contains(e2) && t2.parent !== t2; ) t2 = t2.parent;
57
- return t2;
58
- }
59
- unbindEventListeners() {
60
- const e2 = this.getContainerRenderWindow();
61
- e2.removeEventListener("mousemove", this.handleChange), e2.removeEventListener("mouseup", this.handleMouseUp);
62
- }
63
- render() {
64
- const { color: n2, white: i2, black: r2, pointer: o2, circle: s2 } = this.props || {}, a2 = { position: "absolute", top: "0px", left: "0px", right: "0px", bottom: "0px" }, l2 = { color: { ...a2, backgroundColor: `hsl(${this.props.hsl?.h},100%, 50%)`, borderRadius: this.props.style?.borderRadius }, white: { ...a2, borderRadius: this.props.style?.borderRadius }, black: { ...a2, boxShadow: this.props.style?.boxShadow, borderRadius: this.props.style?.borderRadius }, pointer: { ...a2, top: -100 * this.props.hsv?.v + 100 + "%", left: 100 * this.props.hsv?.s + "%", cursor: "default" }, circle: { width: "4px", height: "4px", boxShadow: "0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)", borderRadius: "50%", cursor: "hand", transform: "translate(-2px, -2px)" } };
65
- return e("div", { style: l2.color, ref: (e2) => this.container = e2, onMouseDown: this.handleMouseDown, onTouchMove: this.handleChange, onTouchStart: this.handleChange, children: [t("style", { children: "\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n " }), e("div", { style: l2.white, className: "saturation-white", children: [t("div", { style: l2.black, className: "saturation-black" }), t("div", { style: l2.pointer, children: this.props.pointer ? t(this.props.pointer, { ...this.props }) : t("div", { style: l2.circle }) })] })] });
66
- }
67
- }
68
- const x = (e2, t2 = null) => {
69
- const n2 = e2.hex ? p(e2.hex) : p(e2 || "transparent"), i2 = n2.toHsl(), r2 = n2.toHsv(), o2 = n2.toRgb(), s2 = n2.toHex();
70
- return 0 === i2.s && (i2.h = t2 ?? 0, r2.h = t2 ?? 0), { hsl: i2, hex: "#" + s2, rgb: o2, hsv: r2, source: e2.source };
71
- }, f = r((n2) => {
72
- const { selectedColor: i2, onColorChange: r2, renderers: p2, disableAlpha: f2 = false, style: v = u.EmptyCssProperties, ...y } = n2, w = l(), [C, R] = o(() => x(i2)), [k, $] = o(C.hsl.h ?? 0), D = s((e2) => {
73
- let t2 = x(e2, k);
74
- return $(t2.hsl.h ?? 0), R(t2), t2;
75
- }, [k]), H = s((e2) => {
76
- const t2 = D(e2), n3 = `rgba(${t2.rgb.r},${t2.rgb.g},${t2.rgb.b},${f2 ? 1 : t2.rgb.a})`;
77
- r2?.(n3);
78
- }, [r2, D, f2]);
79
- a(() => {
80
- D(i2);
81
- }, [i2, D]);
82
- const S = t("div", { style: { position: "relative", minHeight: "10px", maxHeight: "10px", width: "100%" }, children: t(d, { style: { radius: "2px", shadow: "inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)" }, rgb: C.rgb, hsl: C.hsl, renderers: p2, onChange: H }) });
83
- return e("div", { style: { display: "flex", flexDirection: "column", ...v }, ...y, children: [t("div", { style: { width: "100%", flex: "1 1 100%", position: "relative", overflow: "hidden" }, children: t(m, { style: { borderRadius: "3px", boxShadow: "inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)" }, hsl: C.hsl, hsv: C.hsv, onChange: H }) }), e("div", { style: { marginTop: "4px", display: "flex", gap: "4px" }, children: [e("div", { style: { flex: "1", display: "flex", flexDirection: f2 ? "row" : "column", justifyContent: "space-between", alignItems: "center" }, children: [t("div", { style: { position: "relative", minHeight: "10px", maxHeight: "10px", width: "100%" }, children: t(c, { style: { radius: "2px", shadow: "inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)" }, hsl: C.hsl, onChange: H }) }), f2 ? null : S] }), e("div", { style: { minWidth: "24px", maxWidth: "24px", minHeight: "24px", maxHeight: "24px", position: "relative", borderRadius: "1px", overflow: "hidden" }, children: [t(b, { grey: w.palette.text.icon ?? w.palette.action.active }), t("div", { style: { position: "absolute", height: "100%", width: "100%", background: `rgba(${C.rgb.r},${C.rgb.g},${C.rgb.b},${f2 ? 1 : C.rgb.a})`, boxShadow: "inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)" } })] })] }), t(h, { sx: { marginBottom: "4px", "& label": { fontFamily: (e2) => `${e2.typography.fontFamily} !important`, color: (e2) => `${e2.palette.text.secondary} !important` }, "& *": { fontFamily: (e2) => `${e2.typography.fontFamily} !important`, userSelect: "none" }, "& input": { paddingLeft: (e2) => `${e2.spacing(0.5)} !important`, paddingRight: (e2) => `${e2.spacing(0.5)} !important`, outline: "none", boxSizing: "border-box", width: "100% !important", textAlign: "center" } }, children: t(g, { rgb: C.rgb, hsl: C.hsl, hex: C.hex, disableAlpha: f2, onChange: H }) })] });
84
- });
85
- export {
86
- f as CustomColorPanel,
87
- f as default
88
- };
@@ -1,52 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.27
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
- };