@sheetxl/studio-mui 0.8.0-beta.7 → 1.0.0

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 (284) hide show
  1. package/LICENSE.md +17 -7
  2. package/browser/esm/{B57WM1X24rsvTF_o.mjs → 2dGXbxSvPxpMpoQB.mjs} +2 -2
  3. package/browser/esm/AKfq7wiKunwYv5Co.mjs +87 -0
  4. package/browser/esm/{DyNZEBlugP-x15kP.mjs → B16SyYhTCohin7vO.mjs} +4 -4
  5. package/browser/esm/B4qh8uSPezvUgs_C.mjs +414 -0
  6. package/browser/esm/BGR0Hv_mjOPfYxiD.mjs +975 -0
  7. package/browser/esm/{DR95Rgl8ItgWla8V.mjs → BVbTWo0j5ttMcIWs.mjs} +3 -3
  8. package/browser/esm/BctMjTuii_LaWmHJ.mjs +119 -0
  9. package/browser/esm/{CH7ZfljN7ru0Y9Wg.mjs → Bf-pwjpYBKNwL4f8.mjs} +4 -4
  10. package/browser/esm/Bh7XfTPJIFjaL6fa.mjs +13 -0
  11. package/browser/esm/BjH_mK6445rm6PL1.mjs +94 -0
  12. package/browser/esm/BqJSEK805PP8lILC.mjs +197 -0
  13. package/browser/esm/BrIWEn7tabhEreBm.mjs +973 -0
  14. package/browser/esm/{D88iVsgfDG9k-qf_.mjs → BsFK55lPALVUu31_.mjs} +5 -5
  15. package/browser/esm/{3L04oqyfyjRxhmzg.mjs → C0PinnqWu_JwK9l_.mjs} +33 -31
  16. package/browser/esm/C1KcphZVjVAE638t.mjs +415 -0
  17. package/browser/esm/{C36WT3I3aIR8y7I6.mjs → C3V7EwPHHPx9aEkE.mjs} +47 -48
  18. package/browser/esm/CCAPeyEqlStPrh6B.mjs +294 -0
  19. package/browser/esm/CF2Az5oBVjAigMRt.mjs +68 -0
  20. package/browser/esm/CIqEqDyl8JZRMblX.mjs +225 -0
  21. package/browser/esm/CJERhz_1u40JkHfH.mjs +235 -0
  22. package/browser/esm/CNtF9Fix0G6BEVEl.mjs +424 -0
  23. package/browser/esm/{D7HOLngE_1FYF6y6.mjs → CWP52da2iNOs3Qtz.mjs} +82 -94
  24. package/browser/esm/CWpF_0HjYiRiddX6.mjs +31 -0
  25. package/browser/esm/CbedwfwBLBaagGD-.mjs +360 -0
  26. package/browser/esm/{DNhLiDpvz3lAR190.mjs → Cc9tcBSYzJIv-dZw.mjs} +156 -109
  27. package/browser/esm/CcPLziOAdWTbG7xx.mjs +141 -0
  28. package/browser/esm/CdRnGw_9tvkn9d9o.mjs +335 -0
  29. package/browser/esm/{BWAIbfQZ6h5xVLdB.mjs → CgLDSZ8XvBqAB-Y2.mjs} +20 -18
  30. package/browser/esm/CgZLR7ijzsUoawf8.mjs +1281 -0
  31. package/browser/esm/Cn6OsV-MbO0rIM-o.mjs +442 -0
  32. package/browser/esm/{0Rpk1T56LoSnDrmq.mjs → CnDnNU6GGzM05K8w.mjs} +4 -4
  33. package/browser/esm/CnVHQ6i6a8VCMsn1.mjs +106 -0
  34. package/browser/esm/D06He-Tw4moPdM5f.mjs +103 -0
  35. package/browser/esm/D9lQwTAJ9RO60ovS.mjs +72 -0
  36. package/browser/esm/{D3BwGfI_IEjay0dA.mjs → D9xw1YuRJUjPMaqA.mjs} +2 -2
  37. package/browser/esm/DBr6lCvWLLwnzSGy.mjs +386 -0
  38. package/browser/esm/DEdHwT-2JZO9HyZN.mjs +14 -0
  39. package/browser/esm/DH4SdW-02-I8082_.mjs +14 -0
  40. package/browser/esm/DHbnrUh5rdi62fgO.mjs +516 -0
  41. package/browser/esm/DJRKcOT0Xv-1r0OP.mjs +161 -0
  42. package/browser/esm/DPycoTH_4RNdK2hu.mjs +252 -0
  43. package/browser/esm/{CpTqhDZotYaKGbLl.mjs → DXQTN_6-MvPivCrz.mjs} +8 -6
  44. package/browser/esm/DaNVYYZLCql8_n0i.mjs +831 -0
  45. package/browser/esm/Dakiv-oEU8ty2ILI.mjs +77 -0
  46. package/browser/esm/DfCd-MxLjE3gZ5jl.mjs +392 -0
  47. package/browser/esm/DhZqt49Ue-lveZv3.mjs +2692 -0
  48. package/browser/esm/DkxgFV6jJb6pO6lM.mjs +490 -0
  49. package/browser/esm/{B_PhUn6yySwXt2wo.mjs → QKDgV7kur90Bzexo.mjs} +14 -13
  50. package/browser/esm/R8q92QTpUT-sB4Nq.mjs +8547 -0
  51. package/browser/esm/RaV_j7qhH97TUb6P.mjs +1550 -0
  52. package/browser/esm/S-MJsifSUY334In9.mjs +8 -0
  53. package/browser/esm/UW74C3TpyGhFEOFO.mjs +267 -0
  54. package/browser/esm/W-jkQJTDojDSK93k.mjs +242 -0
  55. package/browser/esm/czz-Du13p5saoAex.mjs +318 -0
  56. package/browser/esm/{DErAKw-lIK3RY8m-.mjs → ilgUW6eI60262DJU.mjs} +2 -2
  57. package/browser/esm/index.mjs +1910 -289
  58. package/browser/esm/kbx_7Y2kVGMGIWtW.mjs +633 -0
  59. package/browser/esm/vCWRBUPIH8HXlYjO.mjs +94 -0
  60. package/browser/esm/w0DasqEtSJvoQVk2.mjs +517 -0
  61. package/browser/esm/w5dY32V2IxkbDBsT.mjs +225 -0
  62. package/licenses/dependencies.txt +113 -366
  63. package/node/esm/7GlVS1uyKRUAAjw9.mjs +1831 -0
  64. package/node/esm/B0mjDApnDOWo9UGr.mjs +412 -0
  65. package/node/esm/B19kx8jtLWU7WYCa.mjs +142 -0
  66. package/node/esm/BAFf7hg6qgFyQDW8.mjs +73 -0
  67. package/node/esm/BDdBcx7cNTM1hIXu.mjs +972 -0
  68. package/node/esm/BGBolrjPvNncjS1h.mjs +94 -0
  69. package/node/esm/BI3dFg_vx1Vgxgps.mjs +516 -0
  70. package/node/esm/BO19LMEPFqVsK1xu.mjs +267 -0
  71. package/node/esm/BSrtVTtNqcTg8QKK.mjs +68 -0
  72. package/node/esm/BcLccq7CvZiJXCDZ.mjs +319 -0
  73. package/node/esm/BeZ1ZY1UJepW8u1f.mjs +118 -0
  74. package/node/esm/BkLwJxkD4pyrume5.mjs +425 -0
  75. package/node/esm/{YKY4d8_Ckc8nPQqI.mjs → Bl_AT6xOKzBqc3PT.mjs} +10 -10
  76. package/node/esm/{DQtpY5kX99aMHygs.mjs → Bqah1dCUEhmRmY3c.mjs} +2 -2
  77. package/node/esm/Bv5awmbwVUdl4rma.mjs +106 -0
  78. package/node/esm/C3mSFWiCu7iONlk6.mjs +638 -0
  79. package/node/esm/CAJhvJU0gj93fPWl.mjs +141 -0
  80. package/node/esm/CJobW3iRAQ5vHeQr.mjs +14 -0
  81. package/node/esm/{BbXHuDHRHOW_6Sbs.mjs → CSJTM9SCqIDkHlpm.mjs} +21 -21
  82. package/node/esm/CUnv4ewRTvuP0si8.mjs +1276 -0
  83. package/node/esm/CWnezGEPuX9UeJ8E.mjs +385 -0
  84. package/node/esm/{Cul_Vgip2OE8yFBQ.mjs → CarjiReyjevcMdlI.mjs} +190 -141
  85. package/node/esm/CoG2fq6dYCvhC5yu.mjs +224 -0
  86. package/node/esm/Cpegk2BA6FOrOkZ0.mjs +77 -0
  87. package/node/esm/Cq1V2i0dRTWnoU1K.mjs +94 -0
  88. package/node/esm/{Ccrq9TNkiiSHKw-m.mjs → CyPtKWjud-Y-Pvq8.mjs} +2 -2
  89. package/node/esm/DEVN1ZPedFq8Bnui.mjs +197 -0
  90. package/node/esm/{BlD3bHo8AAxK7O1j.mjs → DFUPAGKlHT2-8dyC.mjs} +33 -31
  91. package/node/esm/DMxfzW-UQdMaV-Gx.mjs +975 -0
  92. package/node/esm/DWbMD1KaT8mlCUfO.mjs +519 -0
  93. package/node/esm/{DifZAchLTKOmWpkv.mjs → DffuRwJI_5oVtzZb.mjs} +23 -23
  94. package/node/esm/Dg9rTwnydI2UVmGG.mjs +242 -0
  95. package/node/esm/{BTI9exTFHEYzVjw9.mjs → DmQMejdH1-aYq99z.mjs} +70 -71
  96. package/node/esm/{CbpkRpNbQYYOJbxH.mjs → DvSoGqy_51YQZzYM.mjs} +84 -96
  97. package/node/esm/DzTvKGqU1I9m-_qd.mjs +391 -0
  98. package/node/esm/{Dvvg1Yo2e7OGd8sv.mjs → PKRuDgaA8RrsqSNn.mjs} +29 -29
  99. package/node/esm/{v0BFuYjhq2G8zDRe.mjs → POUGgaN5BmOnEPPl.mjs} +2 -2
  100. package/node/esm/WqxW6Up5_6oeJrSr.mjs +489 -0
  101. package/node/esm/ehyFZGpXZSmR7Q7-.mjs +294 -0
  102. package/node/esm/index.mjs +9829 -8837
  103. package/package.json +16 -19
  104. package/resources/contents.json +6 -0
  105. package/resources/locales/contents.json +14 -0
  106. package/resources/locales/de/groups.cmd.json +61 -10
  107. package/resources/locales/de/ui.msg.json +273 -15
  108. package/resources/locales/de/workbookAnomalies.cmd.json +14 -0
  109. package/resources/locales/en/groups.cmd.json +71 -11
  110. package/resources/locales/en/ui.msg.json +278 -15
  111. package/resources/locales/en/workbookAnomalies.cmd.json +14 -0
  112. package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +4 -4
  113. package/types/src/anomalies/AnomaliesCommands.d.ts +8 -0
  114. package/types/src/anomalies/AnomaliesMessages.d.ts +30 -0
  115. package/types/src/anomalies/AnomaliesPlugin.d.ts +12 -0
  116. package/types/src/anomalies/AnomaliesTaskPane.d.ts +17 -0
  117. package/types/src/anomalies/_source.d.ts +7 -0
  118. package/types/src/anomalies/index.d.ts +3 -0
  119. package/types/src/border/BorderPopupButton.d.ts +1 -1
  120. package/types/src/border/BorderTemplateIcon.d.ts +6 -1
  121. package/types/src/chart/ChartFormatPanel.d.ts +20 -0
  122. package/types/src/chart/ChartPlugin.d.ts +6 -0
  123. package/types/src/chart/index.d.ts +3 -0
  124. package/types/src/color/ColorPopupButton.d.ts +1 -1
  125. package/types/src/command/AccountingStyleCommandButton.d.ts +1 -1
  126. package/types/src/command/ColorCommandButton.d.ts +5 -0
  127. package/types/src/command/DocThemeCommandButton.d.ts +1 -1
  128. package/types/src/command/FontFamilyCommandButton.d.ts +1 -1
  129. package/types/src/command/FontSizeCommandButton.d.ts +1 -1
  130. package/types/src/command/InsertCellControlCommandButton.d.ts +17 -0
  131. package/types/src/command/LanguageCommandButton.d.ts +1 -1
  132. package/types/src/command/LocaleCommandButton.d.ts +1 -1
  133. package/types/src/command/PresetCellStylesCommandButton.d.ts +3 -3
  134. package/types/src/command/PresetPivotStylesCommandButton.d.ts +17 -0
  135. package/types/src/command/SheetZoomCommandButton.d.ts +4 -3
  136. package/types/src/command/index.d.ts +2 -0
  137. package/types/src/comments/CommentCard.d.ts +2 -2
  138. package/types/src/comments/CommentsPlugin.d.ts +1 -1
  139. package/types/src/conditionalFormat/ConditionalFormatPlugin.d.ts +1 -1
  140. package/types/src/conditionalFormat/ConditionalFormatStylePicker.d.ts +4 -4
  141. package/types/src/conditionalFormat/IconPickerPopupButton.d.ts +3 -3
  142. package/types/src/conditionalFormat/IconSetRulePanel.d.ts +1 -1
  143. package/types/src/conditions/CombinatorOption.d.ts +7 -0
  144. package/types/src/conditions/ConditionEditor.d.ts +55 -3
  145. package/types/src/conditions/ConditionUtils.d.ts +34 -6
  146. package/types/src/conditions/ExpressionOption.d.ts +6 -0
  147. package/types/src/conditions/MembershipOption.d.ts +67 -0
  148. package/types/src/conditions/OperatorAndParamEditor.d.ts +36 -1
  149. package/types/src/conditions/OperatorSelectPopupButton.d.ts +1 -1
  150. package/types/src/conditions/ScalarOption.d.ts +5 -4
  151. package/types/src/conditions/SelectorSelect.d.ts +16 -7
  152. package/types/src/conditions/index.d.ts +1 -1
  153. package/types/src/conditions/useFormulaOption.d.ts +2 -2
  154. package/types/src/dataValidation/DataValidationEditorPanel.d.ts +9 -5
  155. package/types/src/dataValidation/DataValidationIcon.d.ts +1 -1
  156. package/types/src/dataValidation/DataValidationPlugin.d.ts +1 -1
  157. package/types/src/dialog/HyperlinkDialog.d.ts +15 -0
  158. package/types/src/dialog/OutlineSettingsDialog.d.ts +12 -0
  159. package/types/src/dialog/PivotTableNewDialog.d.ts +11 -0
  160. package/types/src/dialog/SparklineEditDialog.d.ts +10 -0
  161. package/types/src/dialog/SparklineNewDialog.d.ts +23 -0
  162. package/types/src/dialog/WorkbookStatisticsDialog.d.ts +1 -1
  163. package/types/src/dialog/_ShortcutSearch.d.ts +26 -0
  164. package/types/src/externalLink/ExternalLinkSettingsTab.d.ts +1 -1
  165. package/types/src/externalLink/ExternalLinksPlugin.d.ts +1 -1
  166. package/types/src/fill/GradientEditor.d.ts +15 -13
  167. package/types/src/fill/GradientStopsBar.d.ts +43 -0
  168. package/types/src/fill/PatternPopupButton.d.ts +1 -1
  169. package/types/src/fill/index.d.ts +1 -0
  170. package/types/src/filter/ColumnMenu.d.ts +31 -1
  171. package/types/src/filter/PivotMenu.d.ts +31 -0
  172. package/types/src/filter/index.d.ts +1 -1
  173. package/types/src/form/FormulaField.d.ts +4 -4
  174. package/types/src/form/InputField.d.ts +5 -5
  175. package/types/src/format/BorderPreview.d.ts +11 -4
  176. package/types/src/format/FillPanel.d.ts +42 -2
  177. package/types/src/format/FormatPanelParts.d.ts +3 -1
  178. package/types/src/format/FormatPlugin.d.ts +1 -6
  179. package/types/src/format/LinePanel.d.ts +53 -0
  180. package/types/src/format/LinePreviews.d.ts +71 -0
  181. package/types/src/format/index.d.ts +1 -0
  182. package/types/src/format/useFormatSelection.d.ts +6 -6
  183. package/types/src/formulaBar/IFormulaBar.d.ts +32 -3
  184. package/types/src/formulaBar/MobileFormulaBar.d.ts +42 -0
  185. package/types/src/formulaBar/MobileInputToolbar.d.ts +43 -0
  186. package/types/src/formulaBar/index.d.ts +3 -0
  187. package/types/src/formulaBar/useFormulaBarSession.d.ts +68 -0
  188. package/types/src/index.d.ts +19 -6
  189. package/types/src/itemsPanel/ItemCard.d.ts +50 -7
  190. package/types/src/itemsPanel/ItemsPanel.d.ts +5 -0
  191. package/types/src/itemsPanel/ItemsSearchField.d.ts +17 -0
  192. package/types/src/itemsPanel/index.d.ts +1 -0
  193. package/types/src/named/NamedDetailsPanel.d.ts +2 -2
  194. package/types/src/named/NamedPlugin.d.ts +1 -1
  195. package/types/src/picture/PicturePlugin.d.ts +6 -0
  196. package/types/src/picture/index.d.ts +2 -0
  197. package/types/src/pivot/PivotChipMenu.d.ts +10 -0
  198. package/types/src/pivot/PivotPlugin.d.ts +3 -0
  199. package/types/src/pivot/PivotStyleCanvasPreview.d.ts +23 -0
  200. package/types/src/pivot/PivotTableHeader.d.ts +12 -0
  201. package/types/src/pivot/PivotValueSettingsDialog.d.ts +15 -0
  202. package/types/src/pivot/_pivotSource.d.ts +7 -0
  203. package/types/src/presence/PresenceOverlay.d.ts +14 -0
  204. package/types/src/presence/PresencePlugin.d.ts +31 -0
  205. package/types/src/presence/PresenceStrip.d.ts +22 -0
  206. package/types/src/presence/PresenceTaskPane.d.ts +13 -0
  207. package/types/src/presence/Timeline.d.ts +29 -0
  208. package/types/src/presence/index.d.ts +5 -0
  209. package/types/src/protection/ProtectedCellsPanel.d.ts +3 -3
  210. package/types/src/protection/ProtectionPlugin.d.ts +1 -1
  211. package/types/src/protection/{SheetProtectionPanel.d.ts → WorksheetProtectionPanel.d.ts} +6 -6
  212. package/types/src/protection/index.d.ts +1 -1
  213. package/types/src/shape/ShapeFormatPanel.d.ts +11 -0
  214. package/types/src/shape/ShapeGalleryCommandButton.d.ts +18 -0
  215. package/types/src/shape/ShapePlugin.d.ts +8 -0
  216. package/types/src/shape/index.d.ts +3 -0
  217. package/types/src/slicer/InsertSlicerCommandButton.d.ts +13 -0
  218. package/types/src/slicer/PresetSlicerStylesCommandButton.d.ts +12 -0
  219. package/types/src/slicer/SlicerPlugin.d.ts +6 -0
  220. package/types/src/slicer/index.d.ts +3 -0
  221. package/types/src/statusBar/PendingStatus.d.ts +19 -0
  222. package/types/src/statusBar/SheetZoomScale.d.ts +6 -0
  223. package/types/src/statusBar/index.d.ts +1 -0
  224. package/types/src/studio/StudioProps.d.ts +62 -27
  225. package/types/src/studio/formulaBarPlacement.d.ts +35 -0
  226. package/types/src/studio/useStudioApp.d.ts +25 -24
  227. package/types/src/table/TablePlugin.d.ts +1 -1
  228. package/types/src/table/_drawStyleSwatch.d.ts +25 -0
  229. package/types/src/template/TemplateDialog.d.ts +1 -1
  230. package/types/src/template/TemplatePanel.d.ts +5 -1
  231. package/types/src/template/TemplateSearchField.d.ts +17 -1
  232. package/types/src/template/categoryColor.d.ts +8 -0
  233. package/types/src/template/useTemplateCatalog.d.ts +2 -0
  234. package/types/src/theme/ThemeSelectPopupButton.d.ts +1 -1
  235. package/types/src/theme/ThemeUtils.d.ts +8 -27
  236. package/types/src/toolbar/WorkbookToolbars.d.ts +2 -2
  237. package/types/src/workbook/DefaultRenderers.d.ts +44 -16
  238. package/types/src/workbook/OutlineButtons.d.ts +11 -0
  239. package/types/src/workbook/WorkbookContextMenu.d.ts +4 -0
  240. package/types/src/workbook/WorkbookElement.d.ts +5 -4
  241. package/types/src/workbook/WorkbookStrip.d.ts +8 -7
  242. package/types/src/workbook/index.d.ts +1 -1
  243. package/browser/cjs/2tG9HJLr-WjsOCP3.cjs +0 -1
  244. package/browser/cjs/3RXtLkq7wTAV6y_e.cjs +0 -1
  245. package/browser/cjs/3k_KqDFr-AybPztc.cjs +0 -5
  246. package/browser/cjs/4_Zy3pR6YXkzISoK.cjs +0 -1
  247. package/browser/cjs/BD50lsTki7wvzb5g.cjs +0 -1
  248. package/browser/cjs/BJ-wdkCaXqJaejKf.cjs +0 -1
  249. package/browser/cjs/BQJKf40kttQWOzLw.cjs +0 -20
  250. package/browser/cjs/BTZ5uzK0wHzpiZGC.cjs +0 -1
  251. package/browser/cjs/Bc-YisjBtD56vBAW.cjs +0 -1
  252. package/browser/cjs/BcBrhEv9acaTxPkO.cjs +0 -13
  253. package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
  254. package/browser/cjs/ByIUHPOa02D7XbdC.cjs +0 -1
  255. package/browser/cjs/C97KHSuikAbr1qVM.cjs +0 -1
  256. package/browser/cjs/CPSc2VSYZeZ1B9mi.cjs +0 -1
  257. package/browser/cjs/CPcBvw4ZPwHVTUZF.cjs +0 -1
  258. package/browser/cjs/CdDYyAfccXme8w6m.cjs +0 -1
  259. package/browser/cjs/CkroJ2FmfFvk6Eyv.cjs +0 -1
  260. package/browser/cjs/Clzu4HOXk3QSlzUD.cjs +0 -8
  261. package/browser/cjs/CzJvR12QCQb-0Rtn.cjs +0 -1
  262. package/browser/cjs/D-Yo5aV9STT5KH4G.cjs +0 -1
  263. package/browser/cjs/DwkiLFWUtLC8ZcIQ.cjs +0 -1
  264. package/browser/cjs/HuPFsmz7kyZVo3c7.cjs +0 -1
  265. package/browser/cjs/KZvriGbhEOVkQD0b.cjs +0 -1
  266. package/browser/cjs/M0_dvdYwhikqP9kg.cjs +0 -2
  267. package/browser/cjs/iMWEL01eC83oU-YY.cjs +0 -1
  268. package/browser/cjs/index.cjs +0 -2
  269. package/browser/esm/7gisHVXYgcPxWH8-.mjs +0 -223
  270. package/browser/esm/B7k8enrhC2Rvqhn1.mjs +0 -152
  271. package/browser/esm/BK4OEmeaw-kC-vAN.mjs +0 -5355
  272. package/browser/esm/DvYZOxsaTNeBKuFq.mjs +0 -411
  273. package/browser/esm/DzWcb3yuPXS0E4_P.mjs +0 -236
  274. package/browser/esm/WftYXVWvPKx99H0H.mjs +0 -115
  275. package/browser/esm/eoNyVUe5ZEpHwJ7k.mjs +0 -52
  276. package/browser/esm/hFLn30a6N1fEy7fz.mjs +0 -13582
  277. package/browser/esm/jkFhDHWwKoyTSSDL.mjs +0 -1150
  278. package/node/esm/CpteKzMPi39jxmYL.mjs +0 -236
  279. package/node/esm/DA2gosTk8L-FUVI5.mjs +0 -4503
  280. package/node/esm/DP23-d6_VRFro0_D.mjs +0 -415
  281. package/node/esm/lH1iFsECniBRMubb.mjs +0 -115
  282. package/types/src/conditions/DateTimeOption.d.ts +0 -43
  283. package/types/src/conditions/ListSourceOption.d.ts +0 -31
  284. package/types/src/filter/FilterList.d.ts +0 -31
@@ -0,0 +1,972 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v1.0.0
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: MIT
6
+ */
7
+ import { BorderStylePopupButton as e, BorderTemplateIcon as t, ColorCommandButton as o, ColorPopupButton as r, FontFamilyCommandButton as n, FontSizeCommandButton as l } from "./index.mjs";
8
+ import { i as a, n as i, o as d, r as s, t as g } from "./Bv5awmbwVUdl4rma.mjs";
9
+ import { t as c } from "./BkLwJxkD4pyrume5.mjs";
10
+ import { n as m, t as p } from "./CoG2fq6dYCvhC5yu.mjs";
11
+ import { IBorders as u, IRange as h, NumberFormat as f } from "@sheetxl/sdk";
12
+ import { StaticBorderRenderer as b, StaticCellRenderer as y, useGridColorScheme as x, useModelListener as E, useModelSync as K } from "@sheetxl/react";
13
+ import { DynamicIcon as S, useCallbackRef as w, useCommands as v, usePersistentState as T, useTranslator as O } from "@sheetxl/utils-react";
14
+ import { memo as C, useCallback as A, useEffect as k, useMemo as z, useReducer as D, useRef as N, useState as B } from "react";
15
+ import { CommandButton as R, ExhibitIconButton as F, PopupButtonType as I } from "@sheetxl/utils-mui";
16
+ import { jsx as M, jsxs as V } from "react/jsx-runtime";
17
+ import { Box as j, Paper as H, Tab as U, Tabs as L, Typography as P, alpha as $ } from "@mui/material";
18
+ import { messageKey as W } from "@sheetxl/utils";
19
+ import G from "clsx";
20
+ var q = {
21
+ autoFocus: !1,
22
+ scrollIntoView: !1
23
+ }, J = C((e) => {
24
+ const { selection: t, height: o = 46, maxWidth: r = 260, ...n } = e, l = O(), { cell: a, createCell: i, disabled: d } = t, s = z(() => "number" == typeof a.getValue() ? a : i({
25
+ value: 1234.56,
26
+ style: a.getStyle()
27
+ }), [a, i]);
28
+ return V(j, {
29
+ sx: {
30
+ display: "flex",
31
+ flexDirection: "column",
32
+ gap: .5
33
+ },
34
+ ...n,
35
+ children: [M(P, {
36
+ variant: "caption",
37
+ component: "div",
38
+ children: l("format.preview")
39
+ }), M(y, {
40
+ cell: s,
41
+ disabled: d,
42
+ style: {
43
+ width: "100%",
44
+ maxWidth: `${r}px`,
45
+ height: `${o}px`,
46
+ flex: "0 0 auto",
47
+ border: "1px solid var(--sxl-color-base-300, rgb(224, 224, 224))"
48
+ },
49
+ propsBorder: { style: {
50
+ height: "100%",
51
+ width: "100%"
52
+ } }
53
+ })]
54
+ });
55
+ });
56
+ J.displayName = "FormatCellPreview";
57
+ var Y = {
58
+ axes: h.AxisSelection.Column,
59
+ expandOnly: !0,
60
+ skipCustomSize: !0
61
+ }, Q = (e) => e > 180 ? e - 360 : e, X = (e) => {
62
+ const t = Math.max(-90, Math.min(90, Math.round(e)));
63
+ return t < 0 ? t + 360 : t;
64
+ }, _ = C((e) => {
65
+ const { selection: t, disabled: o, className: r, ...n } = e, l = O(), { style: c, applyStyle: m } = t, p = o || t.disabled, u = c.getAlignment(), h = u.getIndent(), f = u.getStacked(), b = f ? 0 : u.getRotation(), y = w((e) => {
66
+ m({ alignment: { indent: e } }, W("op.setAlignment"), Y);
67
+ }, [m]), x = w((e) => {
68
+ m({ alignment: { rotation: X(e) } }, W("op.setAlignment"));
69
+ }, [m]);
70
+ return V(j, {
71
+ className: G("sxl-format-alignment-panel", r),
72
+ sx: d,
73
+ ...n,
74
+ children: [
75
+ M(a, {
76
+ label: l("format.horizontalAlignment"),
77
+ children: M(s, { children: V(g, { children: [
78
+ M(R, {
79
+ commandKey: "formatAlignLeftToggle",
80
+ groupKey: "horizontalAlignOptions",
81
+ disabled: p
82
+ }),
83
+ M(R, {
84
+ commandKey: "formatAlignCenterToggle",
85
+ groupKey: "horizontalAlignOptions",
86
+ disabled: p
87
+ }),
88
+ M(R, {
89
+ commandKey: "formatAlignRightToggle",
90
+ groupKey: "horizontalAlignOptions",
91
+ disabled: p
92
+ }),
93
+ M(R, {
94
+ commandKey: "formatAlignJustifyToggle",
95
+ groupKey: "horizontalAlignOptions",
96
+ disabled: p
97
+ }),
98
+ M(R, {
99
+ commandKey: "formatAlignDistributedHorizontalToggle",
100
+ groupKey: "horizontalAlignOptions",
101
+ disabled: p
102
+ }),
103
+ M(R, {
104
+ commandKey: "formatAlignCenterContinuousToggle",
105
+ groupKey: "horizontalAlignOptions",
106
+ disabled: p
107
+ }),
108
+ M(R, {
109
+ commandKey: "formatAlignFillToggle",
110
+ groupKey: "horizontalAlignOptions",
111
+ disabled: p
112
+ })
113
+ ] }) })
114
+ }),
115
+ M(a, {
116
+ label: l("format.indent"),
117
+ children: V(s, { children: [
118
+ M(R, {
119
+ commandKey: "formatIndentDecrease",
120
+ groupKey: "horizontalAlignOptions",
121
+ disabled: p
122
+ }),
123
+ M(R, {
124
+ commandKey: "formatIndentIncrease",
125
+ groupKey: "horizontalAlignOptions",
126
+ disabled: p
127
+ }),
128
+ M(i, {
129
+ label: l("format.indentUnit"),
130
+ disabled: p,
131
+ value: h,
132
+ min: 0,
133
+ max: 250,
134
+ width: 104,
135
+ onChange: y
136
+ })
137
+ ] })
138
+ }),
139
+ M(a, {
140
+ label: l("format.verticalAlignment"),
141
+ children: V(g, { children: [
142
+ M(R, {
143
+ commandKey: "formatAlignTopToggle",
144
+ groupKey: "verticalAlignOptions",
145
+ disabled: p
146
+ }),
147
+ M(R, {
148
+ commandKey: "formatAlignMiddleToggle",
149
+ groupKey: "verticalAlignOptions",
150
+ disabled: p
151
+ }),
152
+ M(R, {
153
+ commandKey: "formatAlignBottomToggle",
154
+ groupKey: "verticalAlignOptions",
155
+ disabled: p
156
+ }),
157
+ M(R, {
158
+ commandKey: "formatAlignJustifyVerticalToggle",
159
+ groupKey: "verticalAlignOptions",
160
+ disabled: p
161
+ }),
162
+ M(R, {
163
+ commandKey: "formatAlignDistributedVerticalToggle",
164
+ groupKey: "verticalAlignOptions",
165
+ disabled: p
166
+ })
167
+ ] })
168
+ }),
169
+ M(a, {
170
+ label: l("format.overflow"),
171
+ children: V(g, { children: [
172
+ M(R, {
173
+ commandKey: "formatTextOverflowWrapToggle",
174
+ groupKey: "textOverflowOptions",
175
+ disabled: p
176
+ }),
177
+ M(R, {
178
+ commandKey: "formatTextOverflowShrinkToggle",
179
+ groupKey: "textOverflowOptions",
180
+ disabled: p
181
+ }),
182
+ M(R, {
183
+ commandKey: "formatTextOverflowClipToggle",
184
+ groupKey: "textOverflowOptions",
185
+ disabled: p
186
+ }),
187
+ M(R, {
188
+ commandKey: "formatTextOverflowVisibleToggle",
189
+ groupKey: "textOverflowOptions",
190
+ disabled: p
191
+ })
192
+ ] })
193
+ }),
194
+ M(a, {
195
+ label: l("format.merge"),
196
+ children: V(g, { children: [
197
+ M(R, {
198
+ commandKey: "mergeToggle",
199
+ groupKey: "mergeOptions",
200
+ disabled: p
201
+ }),
202
+ M(R, {
203
+ commandKey: "mergeHorizontal",
204
+ groupKey: "mergeOptions",
205
+ disabled: p
206
+ }),
207
+ M(R, {
208
+ commandKey: "mergeVertical",
209
+ groupKey: "mergeOptions",
210
+ disabled: p
211
+ }),
212
+ M(R, {
213
+ commandKey: "unmerge",
214
+ groupKey: "mergeOptions",
215
+ disabled: p
216
+ })
217
+ ] })
218
+ }),
219
+ M(a, {
220
+ label: l("format.orientation"),
221
+ children: V(s, { children: [V(g, { children: [
222
+ M(R, {
223
+ commandKey: "formatTextRotate0",
224
+ groupKey: "textRotateOptions",
225
+ disabled: p
226
+ }),
227
+ M(R, {
228
+ commandKey: "formatTextRotate45",
229
+ groupKey: "textRotateOptions",
230
+ disabled: p
231
+ }),
232
+ M(R, {
233
+ commandKey: "formatTextRotate315",
234
+ groupKey: "textRotateOptions",
235
+ disabled: p
236
+ }),
237
+ M(R, {
238
+ commandKey: "formatTextRotate90",
239
+ groupKey: "textRotateOptions",
240
+ disabled: p
241
+ }),
242
+ M(R, {
243
+ commandKey: "formatTextRotateVertical",
244
+ groupKey: "textRotateOptions",
245
+ disabled: p
246
+ }),
247
+ M(R, {
248
+ commandKey: "formatTextRotate270",
249
+ groupKey: "textRotateOptions",
250
+ disabled: p
251
+ })
252
+ ] }), M(i, {
253
+ label: l("format.degrees"),
254
+ disabled: p || f,
255
+ value: Q(b),
256
+ min: -90,
257
+ max: 90,
258
+ step: 5,
259
+ width: 104,
260
+ onChange: x
261
+ })] })
262
+ })
263
+ ]
264
+ });
265
+ });
266
+ _.displayName = "AlignmentPanel";
267
+ var Z = C((e) => {
268
+ const { selection: t, disabled: r, className: i, ...c } = e, m = O(), p = r || t.disabled;
269
+ return V(j, {
270
+ className: G("sxl-format-font-panel", i),
271
+ sx: d,
272
+ ...c,
273
+ children: [
274
+ M(a, {
275
+ label: m("format.fontFamily"),
276
+ children: M(n, {
277
+ commandKey: "formatFontFamily",
278
+ disabled: p,
279
+ sx: { width: "100%" }
280
+ })
281
+ }),
282
+ M(a, {
283
+ label: m("format.fontSize"),
284
+ children: V(s, { children: [
285
+ M(l, {
286
+ commandKey: "formatFontSize",
287
+ disabled: p,
288
+ sx: { width: 96 }
289
+ }),
290
+ M(R, {
291
+ commandKey: "formatFontSizeIncrease",
292
+ disabled: p
293
+ }),
294
+ M(R, {
295
+ commandKey: "formatFontSizeDecrease",
296
+ disabled: p
297
+ })
298
+ ] })
299
+ }),
300
+ M(a, {
301
+ label: m("format.color"),
302
+ children: M(s, { children: M(o, {
303
+ commandKey: "formatFontColor",
304
+ disabled: p
305
+ }) })
306
+ }),
307
+ M(a, {
308
+ label: m("format.effects"),
309
+ children: V(g, { children: [
310
+ M(R, {
311
+ commandKey: "formatBoldToggle",
312
+ disabled: p
313
+ }),
314
+ M(R, {
315
+ commandKey: "formatItalicToggle",
316
+ disabled: p
317
+ }),
318
+ M(R, {
319
+ commandKey: "formatUnderlinedToggle",
320
+ groupKey: "underlineOptions",
321
+ disabled: p
322
+ }),
323
+ M(R, {
324
+ commandKey: "formatUnderlinedDoubleToggle",
325
+ groupKey: "underlineOptions",
326
+ disabled: p
327
+ }),
328
+ M(j, { sx: { width: "8px" } }),
329
+ M(R, {
330
+ commandKey: "formatStrikeThroughToggle",
331
+ disabled: p
332
+ }),
333
+ M(R, {
334
+ commandKey: "formatSuperscriptToggle",
335
+ disabled: p
336
+ }),
337
+ M(R, {
338
+ commandKey: "formatSubscriptToggle",
339
+ disabled: p
340
+ })
341
+ ] })
342
+ }),
343
+ M(a, {
344
+ label: m("format.accountingUnderline"),
345
+ children: V(g, { children: [M(R, {
346
+ commandKey: "formatUnderlinedAccountingToggle",
347
+ groupKey: "underlineOptions",
348
+ disabled: p
349
+ }), M(R, {
350
+ commandKey: "formatUnderlinedAccountingDoubleToggle",
351
+ groupKey: "underlineOptions",
352
+ disabled: p
353
+ })] })
354
+ })
355
+ ]
356
+ });
357
+ });
358
+ Z.displayName = "FontPanel";
359
+ var ee = Object.freeze([
360
+ u.Edge.Top,
361
+ u.Edge.Bottom,
362
+ u.Edge.Left,
363
+ u.Edge.Right,
364
+ u.Edge.Horizontal,
365
+ u.Edge.Vertical
366
+ ]), te = Object.freeze([]), oe = Object.freeze([u.Edge.Horizontal, u.Edge.Vertical]), re = new Map([
367
+ ...ee,
368
+ u.Edge.DiagonalUp,
369
+ u.Edge.DiagonalDown
370
+ ].map((e) => [e, Object.freeze([e])])), ne = (e) => e === u.Edge.DiagonalUp || e === u.Edge.DiagonalDown;
371
+ function le(e, t) {
372
+ switch (t) {
373
+ case u.Edge.Top: return e("border.top");
374
+ case u.Edge.Left: return e("border.left");
375
+ case u.Edge.Right: return e("border.right");
376
+ case u.Edge.Bottom: return e("border.bottom");
377
+ case u.Edge.Horizontal: return e("border.insideHorizontal");
378
+ case u.Edge.Vertical: return e("border.insideVertical");
379
+ case u.Edge.DiagonalUp: return e("border.diagonalUp");
380
+ case u.Edge.DiagonalDown: return e("border.diagonalDown");
381
+ default: return t;
382
+ }
383
+ }
384
+ var ae = (e) => 0 === e ? "0px" : 1 === e ? "calc(100% - 1px)" : `calc(${100 * e}% - 0.5px)`, ie = (e, t) => {
385
+ const o = "-7px", r = [];
386
+ for (let e = 0; e <= t; e++) {
387
+ const n = ae(e / t);
388
+ r.push({
389
+ left: n,
390
+ top: o,
391
+ width: "1px",
392
+ height: "5px"
393
+ }), r.push({
394
+ left: n,
395
+ bottom: o,
396
+ width: "1px",
397
+ height: "5px"
398
+ });
399
+ }
400
+ for (let t = 0; t <= e; t++) {
401
+ const n = ae(t / e);
402
+ r.push({
403
+ top: n,
404
+ left: o,
405
+ height: "1px",
406
+ width: "5px"
407
+ }), r.push({
408
+ top: n,
409
+ right: o,
410
+ height: "1px",
411
+ width: "5px"
412
+ });
413
+ }
414
+ return r;
415
+ }, de = (e) => e === u.Edge.Left || e === u.Edge.Vertical || e === u.Edge.Right, se = (e) => {
416
+ switch (e) {
417
+ case u.Edge.Top:
418
+ case u.Edge.Left: return 0;
419
+ case u.Edge.Horizontal:
420
+ case u.Edge.Vertical: return .5;
421
+ default: return 1;
422
+ }
423
+ };
424
+ var ge = (e) => {
425
+ const { edges: t, createBorder: o, onToggleEdges: r, omittedEdges: n, disabled: l = !1, height: a = 104, className: i, ...d } = e, s = O(), g = N(null), [c, m] = B(te), p = A((e) => !n?.includes(e), [n]), h = A((e) => !l && p(e), [l, p]), f = p(u.Edge.Horizontal) ? 2 : 1, y = p(u.Edge.Vertical) ? 2 : 1, x = A((e) => o({
426
+ top: 0 === e.rowIndex ? t.top : t.horizontal,
427
+ bottom: e.rowIndex === f - 1 ? t.bottom : t.horizontal,
428
+ left: 0 === e.colIndex ? t.left : t.vertical,
429
+ right: e.colIndex === y - 1 ? t.right : t.vertical,
430
+ diagonalUp: t.diagonalUp,
431
+ diagonalDown: t.diagonalDown
432
+ }), [
433
+ t,
434
+ o,
435
+ f,
436
+ y
437
+ ]), E = A((e) => {
438
+ const t = g.current;
439
+ if (!t) return te;
440
+ const o = t.getBoundingClientRect();
441
+ return function(e, t, o, r, n) {
442
+ if (o <= 0 || r <= 0) return te;
443
+ const l = Math.min(10, o / 5, r / 5);
444
+ if (oe.every(n) && Math.abs(e - o / 2) <= l && Math.abs(t - r / 2) <= l) return oe;
445
+ const a = Math.abs(e) <= l, i = Math.abs(e - o) <= l, d = Math.abs(t) <= l, s = Math.abs(t - r) <= l;
446
+ if ((a || i) && (d || s)) {
447
+ const e = a === d ? u.Edge.DiagonalDown : u.Edge.DiagonalUp;
448
+ if (n(e)) return re.get(e);
449
+ }
450
+ let g = null, c = Number.POSITIVE_INFINITY;
451
+ for (const l of ee) {
452
+ if (!n(l)) continue;
453
+ const a = de(l), i = a ? r : o, d = a ? t : e, s = Math.max(0, -d, d - i), m = (a ? e : t) - se(l) * (a ? o : r), p = Math.hypot(s, m);
454
+ p < c && (c = p, g = l);
455
+ }
456
+ return g && c <= l ? re.get(g) : te;
457
+ }(e.clientX - o.left, e.clientY - o.top, o.width, o.height, h);
458
+ }, [h]);
459
+ return M(j, {
460
+ className: G("sxl-border-preview", i),
461
+ ...d,
462
+ onPointerMove: (e) => m(E(e)),
463
+ onPointerLeave: () => m(te),
464
+ onClick: (e) => {
465
+ const t = E(e);
466
+ t.length > 0 && r(t);
467
+ },
468
+ sx: {
469
+ position: "relative",
470
+ boxSizing: "border-box",
471
+ height: `${a}px`,
472
+ width: "100%",
473
+ padding: "10px",
474
+ cursor: c.length > 0 ? "pointer" : "default",
475
+ borderRadius: (e) => `${e.shape.borderRadius}px`,
476
+ border: (e) => `1px solid ${e.palette.divider}`,
477
+ opacity: l ? .6 : 1
478
+ },
479
+ children: V(j, {
480
+ ref: g,
481
+ sx: {
482
+ position: "relative",
483
+ width: "100%",
484
+ height: "100%"
485
+ },
486
+ children: [
487
+ M(j, {
488
+ "aria-hidden": "true",
489
+ sx: {
490
+ position: "absolute",
491
+ inset: 0,
492
+ display: "grid",
493
+ gridTemplateColumns: `repeat(${y}, 1fr)`,
494
+ gridTemplateRows: `repeat(${f}, 1fr)`,
495
+ gap: "2px",
496
+ pointerEvents: "none",
497
+ "& > div": { backgroundColor: (e) => $(e.palette.text.primary, .05) }
498
+ },
499
+ children: Array.from({ length: f * y }, (e, t) => M("div", {}, t))
500
+ }),
501
+ M(j, {
502
+ "aria-hidden": "true",
503
+ sx: {
504
+ position: "absolute",
505
+ inset: 0,
506
+ pointerEvents: "none",
507
+ "& > div": {
508
+ position: "absolute",
509
+ backgroundColor: (e) => e.palette.text.secondary
510
+ }
511
+ },
512
+ children: ie(f, y).map((e, t) => M("div", { style: e }, t))
513
+ }),
514
+ c.length > 0 ? V(j, {
515
+ "aria-hidden": "true",
516
+ sx: {
517
+ position: "absolute",
518
+ inset: 0,
519
+ pointerEvents: "none",
520
+ opacity: .22,
521
+ "& > div": {
522
+ position: "absolute",
523
+ borderRadius: "3px",
524
+ backgroundColor: (e) => e.palette.text.primary
525
+ },
526
+ "& line": { stroke: (e) => e.palette.text.primary }
527
+ },
528
+ children: [c.filter((e) => !ne(e)).map((e) => M("div", { style: ce(e) }, e)), c.some(ne) ? M("svg", {
529
+ viewBox: "0 0 100 100",
530
+ preserveAspectRatio: "none",
531
+ style: {
532
+ position: "absolute",
533
+ inset: 0,
534
+ width: "100%",
535
+ height: "100%",
536
+ overflow: "visible"
537
+ },
538
+ children: c.filter(ne).flatMap((e) => function(e, t, o) {
539
+ const r = [];
540
+ for (let n = 0; n < t; n++) for (let l = 0; l < o; l++) {
541
+ const a = l / o * 100, i = (l + 1) / o * 100, d = n / t * 100, s = (n + 1) / t * 100, g = e === u.Edge.DiagonalDown;
542
+ r.push(M("line", {
543
+ x1: a,
544
+ y1: g ? d : s,
545
+ x2: i,
546
+ y2: g ? s : d,
547
+ strokeWidth: 6,
548
+ strokeLinecap: "round",
549
+ vectorEffect: "non-scaling-stroke"
550
+ }, `${e}:${n}:${l}`));
551
+ }
552
+ return r;
553
+ }(e, f, y))
554
+ }) : null]
555
+ }) : null,
556
+ M(b, {
557
+ getBorderAt: x,
558
+ rowCount: f,
559
+ columnCount: y,
560
+ style: {
561
+ position: "absolute",
562
+ inset: 0,
563
+ height: "100%",
564
+ width: "100%"
565
+ }
566
+ }),
567
+ ee.filter(p).map((e) => M(j, {
568
+ component: "button",
569
+ type: "button",
570
+ "aria-label": le(s, e),
571
+ "aria-pressed": !!t[e],
572
+ title: le(s, e),
573
+ disabled: !h(e),
574
+ onClick: (t) => {
575
+ t.stopPropagation(), r(re.get(e));
576
+ },
577
+ sx: {
578
+ position: "absolute",
579
+ appearance: "none",
580
+ background: "transparent",
581
+ border: "none",
582
+ padding: 0,
583
+ pointerEvents: "none",
584
+ borderRadius: "3px",
585
+ "&:focus-visible": { outline: (e) => `2px solid ${e.palette.primary.main}` },
586
+ ...ce(e)
587
+ }
588
+ }, e))
589
+ ]
590
+ })
591
+ });
592
+ };
593
+ function ce(e) {
594
+ const t = `calc(${100 * se(e)}% - 3px)`;
595
+ return de(e) ? {
596
+ top: 0,
597
+ bottom: 0,
598
+ left: t,
599
+ width: "6px"
600
+ } : {
601
+ left: 0,
602
+ right: 0,
603
+ top: t,
604
+ height: "6px"
605
+ };
606
+ }
607
+ ge.displayName = "BorderPreview";
608
+ var me = u.StrokeStyle.Thin, pe = Object.freeze([
609
+ u.Edge.Left,
610
+ u.Edge.Top,
611
+ u.Edge.Right,
612
+ u.Edge.Bottom
613
+ ]), ue = Object.freeze([u.Edge.Horizontal, u.Edge.Vertical]), he = Object.freeze([...pe, ...ue]), fe = Object.freeze([u.Edge.DiagonalUp, u.Edge.DiagonalDown]), be = Object.freeze([...he, ...fe]), ye = (e, t, o) => {
614
+ const r = {
615
+ style: t,
616
+ color: o?.toString()
617
+ }, n = {};
618
+ for (const t of e) n[t] = r;
619
+ return n;
620
+ }, xe = (e) => {
621
+ const t = {};
622
+ for (const o of e) t[o] = null;
623
+ return t;
624
+ }, Ee = (e) => e ? e.toString() : null, Ke = C((o) => {
625
+ const { selection: n, disabled: l, className: i, ...c } = o, m = O(), { getEdgeStroke: p, createBorder: h, applyStyle: f, styles: b, schemeLookup: y, autoColor: x, darkMode: E, hasInnerHorizontal: K, hasInnerVertical: v } = n, T = l || n.disabled, C = w((e) => e === u.Edge.Horizontal ? !K : e === u.Edge.Vertical && !v, [K, v]), [A, k] = B(() => {
626
+ const e = p(u.Edge.Bottom)?.getStyle();
627
+ return e && e !== u.StrokeStyle.None ? e : me;
628
+ }), [z, D] = B(() => {
629
+ const e = p(u.Edge.Bottom);
630
+ return !e || e.isNone() ? null : e.getProperties().color ? e.getColor() : null;
631
+ }), N = w(() => b.recentColors(), [b]), R = w((e) => {
632
+ f({ borders: e }, W("op.setBorders"));
633
+ }, [f]), H = w((e) => {
634
+ 0 !== e.length && f([{ borders: xe(e) }, { borders: ye(e, A, z) }], W("op.setBorders"));
635
+ }, [
636
+ f,
637
+ A,
638
+ z
639
+ ]), U = w((e) => {
640
+ 0 !== e.length && R(ye(e, u.StrokeStyle.None, null));
641
+ }, [R]), L = w((e) => {
642
+ H(e.filter((e) => !C(e)));
643
+ }, [H, C]), $ = {};
644
+ for (const e of be) {
645
+ const t = p(e);
646
+ t && !t.isNone() && ($[e] = t.getProperties());
647
+ }
648
+ const q = w((e) => {
649
+ const t = $[e];
650
+ return (t?.style ?? u.StrokeStyle.None) === A && Ee(t?.color) === Ee(z);
651
+ }, [
652
+ $,
653
+ A,
654
+ z
655
+ ]), J = (e) => {
656
+ const t = e.filter((e) => !C(e));
657
+ return t.length > 0 && t.every(q);
658
+ }, Y = w((e) => {
659
+ const t = e.filter((e) => !C(e));
660
+ A === u.StrokeStyle.None || t.every(q) ? U(t) : H(t);
661
+ }, [
662
+ U,
663
+ H,
664
+ q,
665
+ C,
666
+ A
667
+ ]), Q = (e) => ye(e, A, z), X = (e, o, r) => M(F, {
668
+ disabled: T,
669
+ icon: M(t, {
670
+ border: e.length > 0 ? Q(e) : null,
671
+ createBorder: h
672
+ }),
673
+ propsTooltip: {
674
+ label: o,
675
+ simple: !0
676
+ },
677
+ onClick: r
678
+ }), _ = (e, o) => {
679
+ const r = T || e.every(C);
680
+ return M(F, {
681
+ disabled: r,
682
+ selected: !r && A !== u.StrokeStyle.None && J(e),
683
+ icon: M(t, {
684
+ border: Q(e),
685
+ createBorder: h
686
+ }),
687
+ propsTooltip: {
688
+ label: o,
689
+ simple: !0
690
+ },
691
+ onClick: () => Y(e)
692
+ });
693
+ }, Z = (e) => _([e], le(m, e));
694
+ return V(j, {
695
+ className: G("sxl-format-border-panel", i),
696
+ sx: d,
697
+ ...c,
698
+ children: [
699
+ V(s, { children: [M(r, {
700
+ disabled: T || A === u.StrokeStyle.None,
701
+ darkMode: E,
702
+ icon: M(S, { iconKey: "stroke.colored" }),
703
+ tooltip: m("border.colorTooltip"),
704
+ selectedColor: z,
705
+ onSelectColor: (e) => D(e),
706
+ propsPanel: {
707
+ disableAlpha: !0,
708
+ schemeLookup: y,
709
+ recentColors: N,
710
+ autoColor: x
711
+ }
712
+ }), M(e, {
713
+ disabled: T,
714
+ darkMode: E,
715
+ selectedStyle: A,
716
+ styleColor: z,
717
+ variant: I.Toolbar,
718
+ onSelectStyle: (e) => k(e ?? u.StrokeStyle.None)
719
+ })] }),
720
+ V(g, {
721
+ sx: { justifyContent: "center" },
722
+ children: [
723
+ X(he, m("border.all"), () => L(he)),
724
+ X(pe, m("border.outside"), () => L(pe)),
725
+ X([], m("border.none"), () => R(null))
726
+ ]
727
+ }),
728
+ V(a, {
729
+ sx: { px: 1.5 },
730
+ children: [V(j, {
731
+ sx: {
732
+ display: "grid",
733
+ gridTemplateColumns: "auto minmax(0, 156px) auto",
734
+ justifyContent: "center",
735
+ columnGap: .5,
736
+ rowGap: .25,
737
+ minWidth: 0
738
+ },
739
+ children: [
740
+ V(j, {
741
+ sx: {
742
+ display: "flex",
743
+ flexDirection: "column",
744
+ justifyContent: "space-between",
745
+ height: "104px"
746
+ },
747
+ children: [
748
+ Z(u.Edge.Top),
749
+ Z(u.Edge.Horizontal),
750
+ Z(u.Edge.Bottom)
751
+ ]
752
+ }),
753
+ M(ge, {
754
+ edges: $,
755
+ createBorder: h,
756
+ disabled: T,
757
+ height: 104,
758
+ omittedEdges: he.filter(C),
759
+ onToggleEdges: Y
760
+ }),
761
+ M(j, {
762
+ sx: {
763
+ display: "flex",
764
+ alignItems: "center"
765
+ },
766
+ children: _(ue, m("border.inner"))
767
+ }),
768
+ Z(u.Edge.DiagonalUp),
769
+ V(j, {
770
+ sx: {
771
+ display: "flex",
772
+ justifyContent: "space-between",
773
+ minWidth: 0
774
+ },
775
+ children: [
776
+ Z(u.Edge.Left),
777
+ Z(u.Edge.Vertical),
778
+ Z(u.Edge.Right)
779
+ ]
780
+ }),
781
+ Z(u.Edge.DiagonalDown)
782
+ ]
783
+ }), M(P, {
784
+ variant: "caption",
785
+ component: "div",
786
+ sx: {
787
+ color: "text.secondary",
788
+ lineHeight: 1.4,
789
+ textAlign: "center"
790
+ },
791
+ children: m("format.borderDiagram")
792
+ })]
793
+ })
794
+ ]
795
+ });
796
+ });
797
+ Ke.displayName = "BorderPanel";
798
+ var Se = {
799
+ Number: "number",
800
+ Alignment: "alignment",
801
+ Font: "font",
802
+ Border: "border",
803
+ Fill: "fill"
804
+ }, we = "format.tab", ve = Object.freeze([
805
+ Se.Number,
806
+ Se.Alignment,
807
+ Se.Font,
808
+ Se.Border,
809
+ Se.Fill
810
+ ]), Te = C((e) => {
811
+ const t = e.model, o = O();
812
+ K(t, "onSelectedSheetChange");
813
+ const r = t.getSelectedWorksheet();
814
+ if (!r) {
815
+ const { model: t, args: r, entryKey: n, frame: l, ref: a, ...i } = e;
816
+ return M(H, {
817
+ square: !0,
818
+ ref: a,
819
+ sx: {
820
+ display: "flex",
821
+ flex: "1 1 auto",
822
+ padding: (e) => e.spacing(2, 2)
823
+ },
824
+ ...i,
825
+ children: o("format.noWorksheet")
826
+ });
827
+ }
828
+ return M(Oe, {
829
+ ...e,
830
+ sheet: r
831
+ });
832
+ });
833
+ Te.displayName = "FormatTaskPane";
834
+ var Oe = C((e) => {
835
+ const { model: t, sheet: o, args: r, entryKey: n, frame: l, ref: a, ...i } = e, d = O(), s = ((e) => {
836
+ const [, t] = D((e) => e + 1, 0);
837
+ E(e, {
838
+ onSelectionChange: () => t(),
839
+ onStyleChange: () => t()
840
+ });
841
+ const [o] = v(["formatBoldToggle"]), r = x(), n = e.getSelectedCell(), l = e.getStyles(), a = e.getSelectedRanges(), i = w((t, o, r) => {
842
+ const n = Array.isArray(t) ? t : [t];
843
+ e.doBatch(() => {
844
+ for (const t of n) e.getSelectedRanges().getStyle().update(t, {
845
+ autoSelect: q,
846
+ autoFit: r ?? !0
847
+ });
848
+ }, { description: o ?? W("op.updateStyle") });
849
+ }, [e]), d = w((t) => e.createCell(t), [e]), s = w((e) => l.getNormal().createStyle({ borders: e }).getBorders(), [l]), g = a.getCoords()[0], c = w((t) => {
850
+ if (!g) return null;
851
+ const o = (t, o) => e.getCell({
852
+ rowIndex: t,
853
+ colIndex: o
854
+ }).getStyle(!0).getBorders();
855
+ switch (t) {
856
+ case u.Edge.Top: return o(g.rowStart, g.colStart).getTop();
857
+ case u.Edge.Left: return o(g.rowStart, g.colStart).getLeft();
858
+ case u.Edge.Bottom: return o(g.rowEnd, g.colEnd).getBottom();
859
+ case u.Edge.Right: return o(g.rowEnd, g.colEnd).getRight();
860
+ case u.Edge.Horizontal: return g.rowEnd <= g.rowStart ? null : o(g.rowStart + 1, g.colStart).getTop();
861
+ case u.Edge.Vertical: return g.colEnd <= g.colStart ? null : o(g.rowStart, g.colStart + 1).getLeft();
862
+ case u.Edge.DiagonalUp: return o(g.rowStart, g.colStart).getDiagonalUp();
863
+ case u.Edge.DiagonalDown: return o(g.rowStart, g.colStart).getDiagonalDown();
864
+ default: return null;
865
+ }
866
+ }, [e, g]);
867
+ return {
868
+ sheet: e,
869
+ cell: n,
870
+ style: n.getStyle(),
871
+ styles: l,
872
+ schemeLookup: l.schemeLookup(),
873
+ autoColor: l.getNormal().getFont().getColor(),
874
+ darkMode: "dark" === r,
875
+ disabled: o?.disabled() ?? !1,
876
+ applyStyle: i,
877
+ createCell: d,
878
+ createBorder: s,
879
+ getEdgeStroke: c,
880
+ hasInnerHorizontal: a.getRowCount() > 1,
881
+ hasInnerVertical: a.getColumnCount() > 1
882
+ };
883
+ })(o), [g, h] = T(we, Se.Number), b = ve.includes(g) ? g : Se.Number;
884
+ k(() => {
885
+ const e = r?.tab;
886
+ e && h(e);
887
+ }, [r]);
888
+ const y = s.style.getNumberFormat(), K = "number" == typeof y ? f.resolve(y) : y ?? "General";
889
+ return V(H, {
890
+ square: !0,
891
+ ref: a,
892
+ sx: {
893
+ display: "flex",
894
+ flexDirection: "column",
895
+ flex: "1 1 auto",
896
+ width: "100%",
897
+ height: "100%",
898
+ minHeight: 0,
899
+ overflow: "hidden"
900
+ },
901
+ ...i,
902
+ children: [
903
+ M(j, {
904
+ sx: {
905
+ flexShrink: 0,
906
+ padding: (e) => e.spacing(1.5, 2)
907
+ },
908
+ children: M(J, { selection: s })
909
+ }),
910
+ M(L, {
911
+ value: b,
912
+ onChange: (e, t) => h(t),
913
+ variant: "scrollable",
914
+ scrollButtons: "auto",
915
+ allowScrollButtonsMobile: !0,
916
+ sx: {
917
+ minHeight: 0,
918
+ flexShrink: 0,
919
+ borderBottom: (e) => `1px solid ${e.palette.divider}`,
920
+ "& .MuiTab-root": {
921
+ textTransform: "none",
922
+ whiteSpace: "nowrap",
923
+ minHeight: 0,
924
+ minWidth: 0,
925
+ flex: "1 0 auto",
926
+ padding: "8px 4px"
927
+ }
928
+ },
929
+ children: ve.map((e) => M(U, {
930
+ value: e,
931
+ label: Ce(d, e)
932
+ }, e))
933
+ }),
934
+ V(j, {
935
+ sx: {
936
+ flex: "1 1 auto",
937
+ minHeight: 0,
938
+ overflow: "auto",
939
+ padding: (e) => e.spacing(2.5, 2)
940
+ },
941
+ children: [
942
+ b === Se.Number ? M(c, {
943
+ hideSample: !0,
944
+ showQuickFormats: !0,
945
+ value: K,
946
+ disabled: s.disabled,
947
+ context: () => s.cell,
948
+ onChange: (e) => {
949
+ s.applyStyle({ numberFormat: e }, W("op.setNumberFormat"));
950
+ }
951
+ }) : null,
952
+ b === Se.Alignment ? M(_, { selection: s }) : null,
953
+ b === Se.Font ? M(Z, { selection: s }) : null,
954
+ b === Se.Fill ? M(p, { selection: m(s) }) : null,
955
+ b === Se.Border ? M(Ke, { selection: s }) : null
956
+ ]
957
+ })
958
+ ]
959
+ });
960
+ });
961
+ function Ce(e, t) {
962
+ switch (t) {
963
+ case Se.Number: return e("format.tabNumber");
964
+ case Se.Alignment: return e("format.tabAlignment");
965
+ case Se.Font: return e("format.tabFont");
966
+ case Se.Fill: return e("format.tabFill");
967
+ case Se.Border: return e("format.tabBorder");
968
+ default: return t;
969
+ }
970
+ }
971
+ Oe.displayName = "FormatTaskPaneBody";
972
+ export { we as FORMAT_TAB_KEY, Se as FormatTab, Te as FormatTaskPane, Te as default };