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