@sheetxl/studio-mui 0.7.26 → 0.7.28-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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/0EONOhVZ7oT0C_G2.mjs +1150 -0
  29. package/browser/esm/5x7evORpymnb5SfW.mjs +129 -0
  30. package/browser/esm/BACBR1jjcpJbhOWA.mjs +191 -0
  31. package/browser/esm/BPZne8WpzrkWOH6L.mjs +47 -0
  32. package/browser/esm/BeKa8xVj69hAVKRN.mjs +155 -0
  33. package/browser/esm/BeQ9bqOvNNP-arFP.mjs +219 -0
  34. package/browser/esm/Bf3PIOM6U-NmWk2O.mjs +20 -0
  35. package/browser/esm/C4BPDYeqgN59wMGp.mjs +411 -0
  36. package/browser/esm/CGbn_xdhgTvk2mvb.mjs +612 -0
  37. package/browser/esm/CKADOp3hTx0MSNY7.mjs +52 -0
  38. package/browser/esm/CR2sUEZyRqVv2SNl.mjs +105 -0
  39. package/browser/esm/CTN8J8c1AneJu3Lu.mjs +2207 -0
  40. package/browser/esm/Cc5akPEmIwbgKIfc.mjs +516 -0
  41. package/browser/esm/CePKCTL6D05kDy2E.mjs +82 -0
  42. package/browser/esm/DBM1blcMTZMAM-eR.mjs +217 -0
  43. package/browser/esm/DPBnKqhSuJ414Pxx.mjs +99 -0
  44. package/browser/esm/F51tGfYHocox80zY.mjs +468 -0
  45. package/browser/esm/SDzKpaiuhQux7tAh.mjs +5391 -0
  46. package/browser/esm/TDH9XceS8cAkO5d3.mjs +508 -0
  47. package/browser/esm/XKVlG-x_9q5dbVIW.mjs +8878 -0
  48. package/browser/esm/fJiwyUQJ18X-cCQz.mjs +1376 -0
  49. package/browser/esm/fel6EbPAcZOsBmks.mjs +42 -0
  50. package/browser/esm/flvjZEXrSDrtDzLB.mjs +113 -0
  51. package/browser/esm/index.mjs +152 -91
  52. package/licenses/dependencies.txt +137 -627
  53. package/node/esm/B9-0usA1hSoD0Nk3.mjs +679 -0
  54. package/node/esm/BO1vNzjGWYdZdbq9.mjs +113 -0
  55. package/node/esm/BYigefA8bf9FOVib.mjs +47 -0
  56. package/node/esm/BdrLZp98HQaVMykZ.mjs +82 -0
  57. package/node/esm/BlubX7gm8wTUNiZ-.mjs +106 -0
  58. package/node/esm/C8a6QwMGW1tMiWA6.mjs +516 -0
  59. package/node/esm/CCCnorMn30oUDDIY.mjs +4536 -0
  60. package/node/esm/CKpik3HRSANKEy4G.mjs +99 -0
  61. package/node/esm/CTZcfST8pUcLMail.mjs +509 -0
  62. package/node/esm/D1K9Ji7iQwnOnd1-.mjs +190 -0
  63. package/node/esm/DuUiuB59bQRPQi-D.mjs +155 -0
  64. package/node/esm/eKP73GEWmonTXpfv.mjs +470 -0
  65. package/node/esm/g3y8kxL1Ln214UNr.mjs +129 -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/52tjAlO48FpZgfzG.cjs +0 -6
  269. package/browser/cjs/BGu2_YqVJMQjYx4D.cjs +0 -18
  270. package/browser/cjs/C83Rzj_Jwq-o69wr.cjs +0 -42
  271. package/browser/cjs/CldYLQnjFC_g8o3t.cjs +0 -6
  272. package/browser/cjs/Cpv3j_Ra1h-axLRG.cjs +0 -6
  273. package/browser/cjs/D-5Cg1Y0zALF_JEs.cjs +0 -7
  274. package/browser/cjs/D58sOTRZwQ59CgOf.cjs +0 -6
  275. package/browser/cjs/DEd-0xEuUoELRnQb.cjs +0 -6
  276. package/browser/cjs/DahKlfm68zudpndW.cjs +0 -20
  277. package/browser/cjs/Dd7t0gfO3bzS0-B8.cjs +0 -6
  278. package/browser/cjs/DxAU6DV3UCUDVoSH.cjs +0 -6
  279. package/browser/cjs/uj7GSwDaUyTKEjrN.cjs +0 -6
  280. package/browser/esm/BLuR1D2n--9QSJL9.mjs +0 -26
  281. package/browser/esm/BSOhdb74viwmCi54.mjs +0 -2159
  282. package/browser/esm/BTAhrEfV-DH0-Ldk.mjs +0 -640
  283. package/browser/esm/BgsyX5QL9OLy0DN3.mjs +0 -4533
  284. package/browser/esm/CFPGs5_tLGrpkW8L.mjs +0 -25
  285. package/browser/esm/CbCX3t0hx-h6pV7Q.mjs +0 -46
  286. package/browser/esm/D3dDP89ml0258MGb.mjs +0 -53
  287. package/browser/esm/DYk55y6IEOCytW3g.mjs +0 -50
  288. package/browser/esm/DfUqOxFfhJcaq847.mjs +0 -2411
  289. package/browser/esm/DhWeeZyxUc-LbP8E.mjs +0 -50
  290. package/browser/esm/DqLDLUCqiFovdBf0.mjs +0 -155
  291. package/browser/esm/Dvo0k3olgFuAso_O.mjs +0 -54
  292. package/node/assets/style.css +0 -1
  293. package/node/esm/BM_pvbGlgXydGNT3.mjs +0 -52
  294. package/node/esm/CFBcwLP2q2_EUXvE.mjs +0 -156
  295. package/node/esm/Cg9JFB8nOnVfR0Uo.mjs +0 -26
  296. package/node/esm/D3kxA1LpG-PpZvCb.mjs +0 -25
  297. package/node/esm/D_s6w_GWb8l7uGW3.mjs +0 -53
  298. package/node/esm/XI3nj4zD7mXOyxSm.mjs +0 -57
  299. package/node/esm/YXQgUYqP1qsi_MPX.mjs +0 -46
  300. package/node/esm/m2lejeU-ViEhFj_N.mjs +0 -91
  301. package/node/esm/sevERUPIPJCb-jYL.mjs +0 -88
  302. package/node/esm/zdjaq7yEfEvgHrDi.mjs +0 -50
@@ -0,0 +1,516 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.28-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 { _ as e, v as t, y as r } from "./index.mjs";
8
+ import { IRange as o, ISort as n, Sort as i } from "@sheetxl/sdk";
9
+ import { DynamicIcon as l, useCallbackRef as s, useTranslator as a } from "@sheetxl/utils-react";
10
+ import { memo as d, useMemo as c, useRef as p, useState as x } from "react";
11
+ import { OptionsDialog as h, SimpleTooltip as u } from "@sheetxl/utils-mui";
12
+ import { jsx as m, jsxs as f } from "react/jsx-runtime";
13
+ import { Box as v, Checkbox as g, FormControl as y, FormControlLabel as b, IconButton as C, InputLabel as S, MenuItem as w, Select as O, Typography as k } from "@mui/material";
14
+ var L = {
15
+ width: "64px",
16
+ flex: "0 0 auto"
17
+ }, D = {
18
+ flex: "1 1 0",
19
+ minWidth: "120px"
20
+ }, I = {
21
+ flex: "1 1 0",
22
+ minWidth: "140px"
23
+ }, H = {
24
+ width: "34px",
25
+ flex: "0 0 auto",
26
+ display: "flex",
27
+ justifyContent: "center"
28
+ }, z = {
29
+ minWidth: "112px",
30
+ flex: "0 0 auto",
31
+ display: "flex",
32
+ alignItems: "center",
33
+ justifyContent: "flex-end"
34
+ }, N = {
35
+ color: (e) => e.palette.text.secondary,
36
+ fontWeight: 500,
37
+ paddingLeft: "14px"
38
+ }, F = {
39
+ display: "flex",
40
+ alignItems: "center",
41
+ gap: (e) => e.spacing(1),
42
+ padding: (e) => e.spacing(.75, 1),
43
+ border: (e) => `1px solid ${e.palette.divider}`,
44
+ borderRadius: (e) => e.spacing(1.25)
45
+ }, R = (e) => {
46
+ let t = e, r = "";
47
+ for (; t >= 0;) r = String.fromCharCode(65 + t % 26) + r, t = Math.floor(t / 26) - 1;
48
+ return r;
49
+ }, B = 0, M = () => "level-" + B++, T = (e) => e?.sensitivity === i.CaseSensitiveOptions.sensitivity, W = d((n) => {
50
+ const { initialValue: d, context: B, onInput: W, onDone: j, ...A } = n, E = a(), V = p(B?.()), K = V.current?.range, U = V.current?.cell, [G, Y] = x(() => ({
51
+ ...i.DefaultRangeOptions,
52
+ ...d
53
+ })), [_, q] = x(() => {
54
+ const e = d?.sorts ?? [], t = [];
55
+ for (let r = 0; r < e.length; r++) t.push({
56
+ key: M(),
57
+ index: e[r].index ?? r,
58
+ criteria: { ...e[r].criteria }
59
+ });
60
+ return 0 === t.length && t.push({
61
+ key: M(),
62
+ index: 0,
63
+ criteria: {}
64
+ }), t;
65
+ }), J = G.axis ?? o.Axis.Row, P = J === o.Axis.Row, Q = p(null), X = p(!1);
66
+ r(Q, !0, X);
67
+ const Z = c(() => {
68
+ const e = [], t = [], r = K?.getDefaultSortCriteria(J, U);
69
+ if (!r) return {
70
+ labels: e,
71
+ offsets: t
72
+ };
73
+ const o = r.coords, n = P ? o.colEnd - o.colStart + 1 : o.rowEnd - o.rowStart + 1, i = Math.min(n, 500);
74
+ for (let n = 0; n < i; n++) {
75
+ const i = G.hasHeader ? r.headers?.get(n) : void 0;
76
+ t.push(n), e.push(i || (P ? E("sort.columnLabel", { name: R(o.colStart + n) }) : E("sort.rowLabel", { name: `${o.rowStart + n + 1}` })));
77
+ }
78
+ return {
79
+ labels: e,
80
+ offsets: t
81
+ };
82
+ }, [
83
+ K,
84
+ U,
85
+ J,
86
+ P,
87
+ G.hasHeader,
88
+ E
89
+ ]), ee = s((e) => {
90
+ const t = Z.offsets.indexOf(e);
91
+ return -1 !== t ? Z.labels[t] : P ? E("sort.columnLabel", { name: R(e) }) : E("sort.rowLabel", { name: `${e + 1}` });
92
+ }, [
93
+ Z,
94
+ P,
95
+ E
96
+ ]), te = c(() => {
97
+ const e = Z.offsets.length;
98
+ if (e > 0 && _.length > e) return E("sort.tooManyLevels", { count: `${e}` });
99
+ const t = /* @__PURE__ */ new Set();
100
+ for (let e = 0; e < _.length; e++) {
101
+ if (t.has(_[e].index)) return E("sort.duplicateField", { name: ee(_[e].index) });
102
+ t.add(_[e].index);
103
+ }
104
+ return null;
105
+ }, [
106
+ _,
107
+ Z,
108
+ ee,
109
+ E
110
+ ]), re = s((e, t) => {
111
+ q((r) => r.map((r) => r.key === e ? {
112
+ ...r,
113
+ ...t
114
+ } : r));
115
+ }, []), oe = s((e, t, r) => {
116
+ r && (X.current = !0), q((r) => {
117
+ if (t < 0 || t >= r.length) return r;
118
+ const o = [...r];
119
+ return o.splice(t, 0, ...o.splice(e, 1)), o;
120
+ });
121
+ }, []), ne = s((e) => {
122
+ let t;
123
+ if ("Sort" === e) {
124
+ const e = _.map((e) => {
125
+ const t = { ...e.criteria };
126
+ return delete t.collatorOptions, {
127
+ index: e.index,
128
+ criteria: t
129
+ };
130
+ });
131
+ t = {
132
+ ...d,
133
+ ...G,
134
+ reverse: _[0]?.criteria.reverse ?? G.reverse,
135
+ sorts: e
136
+ };
137
+ }
138
+ W?.(t), j?.(t);
139
+ }, [
140
+ _,
141
+ G,
142
+ j,
143
+ W,
144
+ d
145
+ ]), ie = c(() => _.map((e) => e.key), [_]);
146
+ return m(h, {
147
+ title: E("sort.title"),
148
+ options: [{
149
+ id: "Sort",
150
+ label: () => E("sort.action"),
151
+ disabled: () => null !== te
152
+ }, "Cancel"],
153
+ onDone: ne,
154
+ ...A,
155
+ children: f(v, {
156
+ sx: {
157
+ display: "flex",
158
+ flexDirection: "column",
159
+ gap: (e) => e.spacing(1.5),
160
+ minWidth: "560px"
161
+ },
162
+ children: [
163
+ f(v, {
164
+ sx: {
165
+ display: "flex",
166
+ flexDirection: "column"
167
+ },
168
+ children: [m(v, {
169
+ sx: { padding: (e) => e.spacing(0, .5) },
170
+ children: f(v, {
171
+ sx: {
172
+ ...F,
173
+ borderColor: "transparent",
174
+ paddingTop: 0,
175
+ paddingBottom: 0
176
+ },
177
+ children: [
178
+ m(v, { sx: L }),
179
+ m(k, {
180
+ variant: "body2",
181
+ sx: {
182
+ ...D,
183
+ ...N
184
+ },
185
+ children: E(P ? "sort.column" : "sort.row")
186
+ }),
187
+ m(k, {
188
+ variant: "body2",
189
+ sx: {
190
+ ...I,
191
+ ...N
192
+ },
193
+ children: E("sort.sortOn")
194
+ }),
195
+ m(k, {
196
+ variant: "body2",
197
+ sx: {
198
+ ...H,
199
+ ...N,
200
+ paddingLeft: 0
201
+ },
202
+ children: E("sort.order")
203
+ }),
204
+ m(v, { sx: z })
205
+ ]
206
+ })
207
+ }), f(v, {
208
+ ref: Q,
209
+ sx: {
210
+ display: "flex",
211
+ flexDirection: "column",
212
+ gap: (e) => e.spacing(.75),
213
+ padding: (e) => e.spacing(.5),
214
+ maxHeight: "320px",
215
+ overflowY: "auto"
216
+ },
217
+ children: [m(t, {
218
+ ids: ie,
219
+ scrollRef: Q,
220
+ onMove: (e, t) => oe(e, t, !0),
221
+ children: _.map((t, r) => m(e, {
222
+ id: t.key,
223
+ children: m($, {
224
+ level: t,
225
+ position: r,
226
+ count: _.length,
227
+ fields: Z,
228
+ labelForField: ee,
229
+ isRowSort: P,
230
+ onChange: re,
231
+ onMoveBy: (e) => oe(r, r + e, !1),
232
+ onDuplicate: () => {
233
+ q((e) => {
234
+ const o = [...e];
235
+ return o.splice(r + 1, 0, {
236
+ ...t,
237
+ key: M(),
238
+ criteria: { ...t.criteria }
239
+ }), o;
240
+ });
241
+ },
242
+ onDelete: () => q((e) => e.filter((e) => e.key !== t.key))
243
+ })
244
+ }, t.key))
245
+ }), f(v, {
246
+ sx: {
247
+ ...F,
248
+ borderColor: "transparent",
249
+ flex: "0 0 auto",
250
+ paddingTop: 0,
251
+ paddingBottom: 0
252
+ },
253
+ children: [m(k, {
254
+ variant: "body2",
255
+ sx: {
256
+ ...L,
257
+ color: (e) => e.palette.text.secondary
258
+ },
259
+ children: E("sort.thenBy")
260
+ }), m(u, {
261
+ disableInteractive: !0,
262
+ title: E("sort.addLevel"),
263
+ children: m(C, {
264
+ size: "small",
265
+ className: "sxl-sort-addLevel",
266
+ "aria-label": E("sort.addLevel"),
267
+ onClick: () => {
268
+ q((e) => {
269
+ const t = new Set(e.map((e) => e.index)), r = Z.offsets.find((e) => !t.has(e));
270
+ return [...e, {
271
+ key: M(),
272
+ index: r ?? 0,
273
+ criteria: {}
274
+ }];
275
+ });
276
+ },
277
+ children: m(l, { iconKey: "Insert" })
278
+ })
279
+ })]
280
+ })]
281
+ })]
282
+ }),
283
+ null !== te ? m(k, {
284
+ variant: "body2",
285
+ className: "sxl-sort-refusal",
286
+ sx: { color: (e) => e.palette.error.main },
287
+ children: te
288
+ }) : null,
289
+ f(v, {
290
+ sx: {
291
+ display: "flex",
292
+ flexWrap: "wrap",
293
+ alignItems: "center",
294
+ columnGap: (e) => e.spacing(2),
295
+ rowGap: (e) => e.spacing(1.5),
296
+ borderTop: (e) => `1px solid ${e.palette.divider}`,
297
+ paddingTop: (e) => e.spacing(1)
298
+ },
299
+ children: [
300
+ m(b, {
301
+ control: m(g, {
302
+ size: "small",
303
+ checked: !!G.hasHeader,
304
+ onChange: () => Y((e) => ({
305
+ ...e,
306
+ hasHeader: !e.hasHeader
307
+ }))
308
+ }),
309
+ label: E("sort.hasHeader")
310
+ }),
311
+ m(b, {
312
+ control: m(g, {
313
+ size: "small",
314
+ checked: T(G.collatorOptions),
315
+ onChange: () => Y((e) => ({
316
+ ...e,
317
+ collatorOptions: T(e.collatorOptions) ? i.CaseInsensitiveOptions : i.CaseSensitiveOptions
318
+ }))
319
+ }),
320
+ label: E("sort.caseSensitive")
321
+ }),
322
+ m(b, {
323
+ control: m(g, {
324
+ size: "small",
325
+ checked: !!G.includeHidden,
326
+ onChange: () => Y((e) => ({
327
+ ...e,
328
+ includeHidden: !e.includeHidden
329
+ }))
330
+ }),
331
+ label: E("sort.includeHidden")
332
+ }),
333
+ f(y, {
334
+ size: "small",
335
+ sx: { minWidth: "180px" },
336
+ children: [m(S, {
337
+ id: "sxl-sort-orientation-label",
338
+ children: E("sort.orientation")
339
+ }), f(O, {
340
+ size: "small",
341
+ className: "sxl-sort-orientation",
342
+ labelId: "sxl-sort-orientation-label",
343
+ label: E("sort.orientation"),
344
+ value: J,
345
+ onChange: (e) => {
346
+ const t = e.target.value;
347
+ Y((e) => ({
348
+ ...e,
349
+ axis: t
350
+ }));
351
+ },
352
+ children: [m(w, {
353
+ value: o.Axis.Row,
354
+ children: E("sort.orientationTopToBottom")
355
+ }), m(w, {
356
+ value: o.Axis.Column,
357
+ children: E("sort.orientationLeftToRight")
358
+ })]
359
+ })]
360
+ })
361
+ ]
362
+ })
363
+ ]
364
+ })
365
+ });
366
+ }), $ = d((e) => {
367
+ const { level: t, position: r, count: o, fields: i, labelForField: s, isRowSort: d, onChange: p, onMoveBy: x, onDuplicate: h, onDelete: g } = e, y = a(), b = t.criteria.sortOn ?? n.SortOn.Value, S = !!t.criteria.reverse, N = c(() => {
368
+ const e = i.offsets.map((e, t) => ({
369
+ offset: e,
370
+ label: i.labels[t]
371
+ }));
372
+ return i.offsets.includes(t.index) || e.push({
373
+ offset: t.index,
374
+ label: s(t.index)
375
+ }), e;
376
+ }, [
377
+ i,
378
+ t.index,
379
+ s
380
+ ]), R = (e, t, r, o, n) => m(u, {
381
+ disableInteractive: !0,
382
+ title: e,
383
+ children: m("div", { children: m(C, {
384
+ size: "small",
385
+ className: `sxl-sort-${t}`,
386
+ "aria-label": e,
387
+ disabled: o,
388
+ sx: { padding: "2px" },
389
+ onClick: n,
390
+ children: m(l, {
391
+ style: { transform: "scale(0.85)" },
392
+ iconKey: r
393
+ })
394
+ }) })
395
+ });
396
+ return f(v, {
397
+ sx: {
398
+ ...F,
399
+ "&:hover, &:focus-within": {
400
+ boxShadow: 1,
401
+ "& .sxl-sort-level-actions": {
402
+ opacity: 1,
403
+ pointerEvents: "auto"
404
+ }
405
+ }
406
+ },
407
+ children: [
408
+ m(k, {
409
+ variant: "body2",
410
+ sx: L,
411
+ children: y(0 === r ? "sort.sortBy" : "sort.thenBy")
412
+ }),
413
+ m(O, {
414
+ size: "small",
415
+ className: "sxl-sort-field",
416
+ value: t.index,
417
+ sx: D,
418
+ "aria-label": y(d ? "sort.column" : "sort.row"),
419
+ onChange: (e) => p(t.key, { index: Number(e.target.value) }),
420
+ children: N.map((e) => m(w, {
421
+ value: e.offset,
422
+ children: e.label
423
+ }, e.offset))
424
+ }),
425
+ f(O, {
426
+ size: "small",
427
+ className: "sxl-sort-on",
428
+ value: b,
429
+ sx: I,
430
+ "aria-label": y("sort.sortOn"),
431
+ onChange: (e) => {
432
+ p(t.key, { criteria: {
433
+ ...t.criteria,
434
+ sortOn: e.target.value
435
+ } });
436
+ },
437
+ children: [
438
+ m(w, {
439
+ value: n.SortOn.Value,
440
+ children: y("sort.sortOnValue")
441
+ }),
442
+ f(w, {
443
+ value: n.SortOn.FillColor,
444
+ disabled: !0,
445
+ children: [y("sort.sortOnFillColor"), m(k, {
446
+ variant: "caption",
447
+ sx: {
448
+ marginLeft: 1,
449
+ opacity: .7
450
+ },
451
+ children: y("sort.notSupported")
452
+ })]
453
+ }),
454
+ f(w, {
455
+ value: n.SortOn.FontColor,
456
+ disabled: !0,
457
+ children: [y("sort.sortOnFontColor"), m(k, {
458
+ variant: "caption",
459
+ sx: {
460
+ marginLeft: 1,
461
+ opacity: .7
462
+ },
463
+ children: y("sort.notSupported")
464
+ })]
465
+ }),
466
+ f(w, {
467
+ value: n.SortOn.Icon,
468
+ disabled: !0,
469
+ children: [y("sort.sortOnIcon"), m(k, {
470
+ variant: "caption",
471
+ sx: {
472
+ marginLeft: 1,
473
+ opacity: .7
474
+ },
475
+ children: y("sort.notSupported")
476
+ })]
477
+ })
478
+ ]
479
+ }),
480
+ m(v, {
481
+ sx: H,
482
+ children: m(u, {
483
+ disableInteractive: !0,
484
+ title: y(S ? "sort.descending" : "sort.ascending"),
485
+ children: m(C, {
486
+ size: "small",
487
+ className: "sxl-sort-order",
488
+ "aria-label": y(S ? "sort.descending" : "sort.ascending"),
489
+ onClick: () => p(t.key, { criteria: {
490
+ ...t.criteria,
491
+ reverse: !S
492
+ } }),
493
+ children: m(l, { iconKey: S ? "SortDecrease" : "SortIncrease" })
494
+ })
495
+ })
496
+ }),
497
+ f(v, {
498
+ className: "sxl-sort-level-actions",
499
+ sx: {
500
+ ...z,
501
+ opacity: 0,
502
+ pointerEvents: "none",
503
+ transition: "opacity 0.2s ease"
504
+ },
505
+ children: [
506
+ R(y("sort.moveUp"), "moveUp", "CardMoveUp", 0 === r, () => x(-1)),
507
+ R(y("sort.moveDown"), "moveDown", "CardMoveDown", r === o - 1, () => x(1)),
508
+ R(y("sort.copyLevel"), "copyLevel", "CardDuplicate", !1, h),
509
+ R(y("sort.deleteLevel"), "deleteLevel", "Delete", o <= 1, g)
510
+ ]
511
+ })
512
+ ]
513
+ });
514
+ });
515
+ $.displayName = "SortLevelCard";
516
+ export { W as SortDialog, W as default };