@sheetxl/studio-mui 0.8.0-beta.1 → 0.8.0-beta.11

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 (291) hide show
  1. package/browser/esm/0BWO0bLZ8Vm_dKd2.mjs +582 -0
  2. package/browser/esm/BAbq4-I5f5oUiNaF.mjs +141 -0
  3. package/browser/esm/BED6h6YAwCf1HEQJ.mjs +161 -0
  4. package/browser/esm/{DMLXV4EKl1NCp_jk.mjs → BXhNFzyEGokTF-BL.mjs} +2 -2
  5. package/browser/esm/BYE9gCDWKyx6mnVs.mjs +381 -0
  6. package/browser/esm/BjvD_4t2KGsZP5V8.mjs +71 -0
  7. package/browser/esm/{zWTZ8BvT4hjgC2ua.mjs → BknfGJouygmnpFIU.mjs} +13 -12
  8. package/browser/esm/{DNDrQKMTzKzNMjl-.mjs → BlE_8o8tO2AgAlaj.mjs} +19 -17
  9. package/browser/esm/BokqKEpU6TFgfRs6.mjs +252 -0
  10. package/browser/esm/{BoLxSRdEWt-Yg2RI.mjs → Brsh5yscJ_4uKFXp.mjs} +130 -103
  11. package/browser/esm/Bujtz_Guj88d03vI.mjs +831 -0
  12. package/browser/esm/Buqcl7J75MJrhpVE.mjs +1379 -0
  13. package/browser/esm/BvhYPwX3GrRaO9CM.mjs +319 -0
  14. package/browser/esm/C0wlMAIn9iREPK6w.mjs +87 -0
  15. package/browser/esm/C8JU4KsMasmLvojI.mjs +103 -0
  16. package/browser/esm/C9pIZVACtl9unFOp.mjs +77 -0
  17. package/browser/esm/CBD4RiRKbbZtSXV-.mjs +318 -0
  18. package/browser/esm/CEtXsBzEjEKk9GOj.mjs +117 -0
  19. package/browser/esm/{BZBJG2tDdD3-VujP.mjs → COlZu93LRwuBvjE-.mjs} +195 -174
  20. package/browser/esm/{Cj2pgCNqBCGl4rTX.mjs → CTjqDD-swFMZzI-Y.mjs} +587 -556
  21. package/browser/esm/CWkOgdL7mOKiTR62.mjs +975 -0
  22. package/browser/esm/ChSVxkPTIjgcC8PL.mjs +412 -0
  23. package/browser/esm/{Cd6n1XUgF0VItpkH.mjs → ClBvNPeNCAhuVWrG.mjs} +7 -5
  24. package/browser/esm/CyLn6zOOp_biA3xU.mjs +335 -0
  25. package/browser/esm/CynTY0oNtyJnoaBq.mjs +14 -0
  26. package/browser/esm/D3rRUK4dIM5gUSmj.mjs +256 -0
  27. package/browser/esm/D9ISy7VkaRRFJl46.mjs +515 -0
  28. package/browser/esm/DDc6rDuU9JAo1DH_.mjs +225 -0
  29. package/browser/esm/DDczwkXhz_MHub4z.mjs +197 -0
  30. package/browser/esm/{3ydDykDMtDYbfVVn.mjs → DEv4pIEgYr5C7etm.mjs} +178 -129
  31. package/browser/esm/DG21x7RKDpge6zAE.mjs +31 -0
  32. package/browser/esm/DJOOed_OtB-XT7f3.mjs +437 -0
  33. package/browser/esm/{Bz5LiUe3SZ8g42Ia.mjs → DKtJxrpN0axtuQ0l.mjs} +1 -1
  34. package/browser/esm/DRSCS6aLiYmPjUz1.mjs +1543 -0
  35. package/browser/esm/{ChwS_ougBsogOEsP.mjs → DTpRkgsTm_zYnWfW.mjs} +46 -47
  36. package/browser/esm/DV6i9RQZfJiKtEaJ.mjs +2552 -0
  37. package/browser/esm/DdcZrjMLWVukWcU5.mjs +7473 -0
  38. package/browser/esm/Di3BUxA0SqFWWgeg.mjs +94 -0
  39. package/browser/esm/DnGaP5F7mLwCGUYG.mjs +408 -0
  40. package/browser/esm/DpD4fg2WcyiKX_2K.mjs +414 -0
  41. package/browser/esm/{BUGepznywvV0tUjW.mjs → Ds3XRkne7HxcXD8J.mjs} +2 -2
  42. package/browser/esm/DsoNMWDwHZP8UXQd.mjs +293 -0
  43. package/browser/esm/G0Inqm6Eqw47dMpa.mjs +212 -0
  44. package/browser/esm/HViD4Wfoi0mmqk9w.mjs +13 -0
  45. package/browser/esm/LZoYSQAYV2wksnDv.mjs +386 -0
  46. package/browser/esm/{rU8xNPVQtDSnujM-.mjs → QgaAIDUMmBQBsXP9.mjs} +3 -3
  47. package/browser/esm/YThnrg3PadGs7B4j.mjs +627 -0
  48. package/browser/esm/index.mjs +1208 -67
  49. package/browser/esm/ttjcNHcFn8O6hfnd.mjs +1288 -0
  50. package/browser/esm/w_JrR69vEpvoyeMy.mjs +68 -0
  51. package/browser/esm/{CVfuCNRpODUw04IH.mjs → xFqkfN8QMCxvsetB.mjs} +1 -1
  52. package/browser/esm/zqilJefihVd7At2T.mjs +517 -0
  53. package/licenses/dependencies.txt +96 -349
  54. package/node/esm/1bf4gn-2vld4BZ9u.mjs +294 -0
  55. package/node/esm/{BhqI3pQFkV8K_612.mjs → 3WghtBXAvCDwcVrq.mjs} +1 -1
  56. package/node/esm/4HmLH0bPVJCZLgik.mjs +116 -0
  57. package/node/esm/{DM7K7-284z-PczVz.mjs → B0bdb_6p7fQI_ivo.mjs} +28 -28
  58. package/node/esm/BIMkjQUwG4Ih-6Sh.mjs +142 -0
  59. package/node/esm/BNg4QQY0WAPLE0q7.mjs +141 -0
  60. package/node/esm/BPzcW4BejRqso338.mjs +72 -0
  61. package/node/esm/BR45ogAR-hY2bE60.mjs +318 -0
  62. package/node/esm/BlN7G0DVC24zauig.mjs +197 -0
  63. package/node/esm/Bph-sR3l6AYWeuxK.mjs +256 -0
  64. package/node/esm/CPq-MIdEnc-53JpF.mjs +319 -0
  65. package/node/esm/CSAnTp5rwId0DUb8.mjs +380 -0
  66. package/node/esm/CWcv7UVXF8IUB0PC.mjs +1379 -0
  67. package/node/esm/{BA7VzUQ2sKRLTZ5c.mjs → CYIoK22I6Yvv12_x.mjs} +20 -20
  68. package/node/esm/CZyA9uD4SkTvqp_G.mjs +1283 -0
  69. package/node/esm/{CHi3AuWEwEPOg9IZ.mjs → CjC6s3RUJQNCF7mP.mjs} +1 -1
  70. package/node/esm/{DXZrzWee8K5FPOW1.mjs → CuMePia6i_8yfJ6S.mjs} +9 -9
  71. package/node/esm/CvRbu8JPxFarsSR-.mjs +412 -0
  72. package/node/esm/CyafafEgfmjLqE5O.mjs +521 -0
  73. package/node/esm/D-xqQ5qOSd6WrzwJ.mjs +94 -0
  74. package/node/esm/DLqBHdFp6wvm6EGs.mjs +212 -0
  75. package/node/esm/{BwZcoHDBmLPIVOT5.mjs → DMXLxp3T0E0SRTQc.mjs} +69 -70
  76. package/node/esm/{CUMKTjYv6VTkcWYi.mjs → DWqvf4H5F2wMnZ0L.mjs} +32 -30
  77. package/node/esm/DatM6eEYPpAtIMy-.mjs +405 -0
  78. package/node/esm/Db3dbaYLKUO66T9s.mjs +1689 -0
  79. package/node/esm/DdEzhVqYTrGODXrz.mjs +68 -0
  80. package/node/esm/DeZJlLk8WJ3BLtLs.mjs +975 -0
  81. package/node/esm/DfCuL8AUxMFoEG2s.mjs +519 -0
  82. package/node/esm/Do-zCKziWhoG5eAv.mjs +77 -0
  83. package/node/esm/DpJ2gmZJioCyq8La.mjs +632 -0
  84. package/node/esm/{Qpuqm6xBr_da38Ht.mjs → XEDcegsv5AGKBfu2.mjs} +165 -137
  85. package/node/esm/index.mjs +10124 -6751
  86. package/node/esm/yCUxQuqVuC4DHKPx.mjs +385 -0
  87. package/node/esm/zITjZ7R4raDqhP-n.mjs +515 -0
  88. package/package.json +15 -18
  89. package/resources/locales/de/groups.cmd.json +29 -16
  90. package/resources/locales/de/studio.cmd.json +18 -1
  91. package/resources/locales/de/ui.msg.json +447 -40
  92. package/resources/locales/en/groups.cmd.json +39 -17
  93. package/resources/locales/en/studio.cmd.json +18 -1
  94. package/resources/locales/en/ui.msg.json +403 -40
  95. package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +21 -5
  96. package/types/src/anchorItems/AnchorItemsPanel.d.ts +14 -0
  97. package/types/src/anchorItems/AnchoredRangeField.d.ts +40 -0
  98. package/types/src/anchorItems/index.d.ts +1 -0
  99. package/types/src/anomalies/AnomaliesPlugin.d.ts +5 -0
  100. package/types/src/anomalies/AnomaliesTaskPane.d.ts +17 -0
  101. package/types/src/anomalies/index.d.ts +3 -0
  102. package/types/src/border/BorderPopupButton.d.ts +6 -6
  103. package/types/src/border/BorderStylePopupButton.d.ts +3 -3
  104. package/types/src/border/BorderTemplateIcon.d.ts +29 -0
  105. package/types/src/border/index.d.ts +1 -0
  106. package/types/src/chart/ChartFormatPanel.d.ts +20 -0
  107. package/types/src/chart/ChartPlugin.d.ts +6 -0
  108. package/types/src/chart/index.d.ts +3 -0
  109. package/types/src/color/ColorPanel.d.ts +8 -2
  110. package/types/src/color/ColorPopupButton.d.ts +2 -1
  111. package/types/src/command/NumberFormatQuickButtons.d.ts +32 -0
  112. package/types/src/command/PresetCellStylesCommandButton.d.ts +3 -3
  113. package/types/src/command/SheetZoomCommandButton.d.ts +4 -3
  114. package/types/src/comments/CommentCard.d.ts +41 -0
  115. package/types/src/comments/CommentsPlugin.d.ts +6 -0
  116. package/types/src/comments/CommentsTaskPane.d.ts +23 -0
  117. package/types/src/comments/index.d.ts +4 -0
  118. package/types/src/conditionalFormat/ConditionalFormatStylePicker.d.ts +4 -4
  119. package/types/src/conditionalFormat/IconPickerPopupButton.d.ts +2 -2
  120. package/types/src/conditionalFormat/IconSetRulePanel.d.ts +1 -1
  121. package/types/src/conditions/BetweenOption.d.ts +6 -1
  122. package/types/src/conditions/CombinatorOption.d.ts +7 -0
  123. package/types/src/conditions/ConditionEditor.d.ts +61 -4
  124. package/types/src/conditions/ConditionUtils.d.ts +65 -6
  125. package/types/src/conditions/ExpressionOption.d.ts +12 -6
  126. package/types/src/conditions/MembershipOption.d.ts +67 -0
  127. package/types/src/conditions/OperatorAndParamEditor.d.ts +36 -1
  128. package/types/src/conditions/ScalarOption.d.ts +25 -6
  129. package/types/src/conditions/SelectorSelect.d.ts +16 -7
  130. package/types/src/conditions/index.d.ts +1 -1
  131. package/types/src/conditions/useFormulaOption.d.ts +54 -0
  132. package/types/src/dataValidation/DataValidationDetailsPanel.d.ts +7 -1
  133. package/types/src/dataValidation/DataValidationDetailsTaskPane.d.ts +3 -2
  134. package/types/src/dataValidation/DataValidationEditorPanel.d.ts +13 -2
  135. package/types/src/dataValidation/DataValidationIcon.d.ts +22 -0
  136. package/types/src/dataValidation/DataValidationTitle.d.ts +13 -0
  137. package/types/src/dialog/FillSeriesDialog.d.ts +16 -0
  138. package/types/src/dialog/OutlineSettingsDialog.d.ts +12 -0
  139. package/types/src/dialog/TableNewDialog.d.ts +1 -4
  140. package/types/src/dialog/WorkbookStatisticsDialog.d.ts +1 -1
  141. package/types/src/dialog/_ShortcutSearch.d.ts +26 -0
  142. package/types/src/dialog/index.d.ts +0 -2
  143. package/types/src/externalLink/ExternalLinkCardBody.d.ts +9 -0
  144. package/types/src/externalLink/ExternalLinkChip.d.ts +18 -0
  145. package/types/src/externalLink/ExternalLinkLocation.d.ts +18 -0
  146. package/types/src/externalLink/ExternalLinkSettingsTab.d.ts +18 -0
  147. package/types/src/externalLink/ExternalLinksPanel.d.ts +11 -0
  148. package/types/src/externalLink/ExternalLinksPlugin.d.ts +5 -0
  149. package/types/src/externalLink/ExternalLinksTaskPane.d.ts +19 -0
  150. package/types/src/externalLink/index.d.ts +8 -0
  151. package/types/src/fill/GradientEditor.d.ts +41 -0
  152. package/types/src/fill/GradientStopsBar.d.ts +43 -0
  153. package/types/src/fill/PatternPopupButton.d.ts +26 -0
  154. package/types/src/fill/PatternSwatch.d.ts +53 -0
  155. package/types/src/fill/index.d.ts +5 -0
  156. package/types/src/filter/ColumnMenu.d.ts +31 -1
  157. package/types/src/filter/index.d.ts +0 -1
  158. package/types/src/form/FormulaField.d.ts +35 -6
  159. package/types/src/form/InputField.d.ts +35 -5
  160. package/types/src/format/AlignmentPanel.d.ts +13 -0
  161. package/types/src/format/BorderPanel.d.ts +22 -0
  162. package/types/src/format/BorderPreview.d.ts +101 -0
  163. package/types/src/format/FillPanel.d.ts +65 -0
  164. package/types/src/format/FontPanel.d.ts +12 -0
  165. package/types/src/format/FormatCellPreview.d.ts +35 -0
  166. package/types/src/format/FormatPanelParts.d.ts +85 -0
  167. package/types/src/format/FormatPlugin.d.ts +11 -0
  168. package/types/src/format/FormatTaskPane.d.ts +39 -0
  169. package/types/src/format/LinePanel.d.ts +53 -0
  170. package/types/src/format/LinePreviews.d.ts +71 -0
  171. package/types/src/format/NumberFormatOption.d.ts +43 -0
  172. package/types/src/{numberFormat → format}/NumberFormatPanel.d.ts +20 -0
  173. package/types/src/format/index.d.ts +14 -0
  174. package/types/src/format/useFormatSelection.d.ts +93 -0
  175. package/types/src/formulaBar/IFormulaBar.d.ts +11 -0
  176. package/types/src/formulaBar/MobileFormulaBar.d.ts +33 -0
  177. package/types/src/formulaBar/MobileInputToolbar.d.ts +43 -0
  178. package/types/src/formulaBar/index.d.ts +3 -0
  179. package/types/src/formulaBar/useFormulaBarSession.d.ts +68 -0
  180. package/types/src/index.d.ts +19 -4
  181. package/types/src/itemsPanel/EditorCommit.d.ts +32 -0
  182. package/types/src/itemsPanel/EditorPanel.d.ts +4 -1
  183. package/types/src/itemsPanel/ItemCard.d.ts +60 -8
  184. package/types/src/itemsPanel/ItemsDescriptor.d.ts +68 -19
  185. package/types/src/itemsPanel/ItemsPanel.d.ts +9 -0
  186. package/types/src/itemsPanel/ItemsSearchField.d.ts +17 -0
  187. package/types/src/itemsPanel/index.d.ts +2 -0
  188. package/types/src/named/NamedDetailsPanel.d.ts +9 -2
  189. package/types/src/named/NamedDetailsTaskPane.d.ts +3 -2
  190. package/types/src/named/NamedEditorPanel.d.ts +1 -1
  191. package/types/src/named/NamedExpressionField.d.ts +32 -0
  192. package/types/src/named/NamedKindChip.d.ts +38 -0
  193. package/types/src/picture/PicturePlugin.d.ts +6 -0
  194. package/types/src/picture/index.d.ts +2 -0
  195. package/types/src/protectedRange/ProtectedRangeDetailsPanel.d.ts +6 -0
  196. package/types/src/protectedRange/ProtectedRangeDraft.d.ts +22 -0
  197. package/types/src/protectedRange/ProtectedRangeEditorPanel.d.ts +0 -14
  198. package/types/src/protectedRange/index.d.ts +2 -1
  199. package/types/src/protection/ManageProtectionTaskPane.d.ts +29 -0
  200. package/types/src/protection/PasswordDialog.d.ts +32 -0
  201. package/types/src/protection/PasswordField.d.ts +35 -0
  202. package/types/src/protection/ProtectedCellsPanel.d.ts +20 -0
  203. package/types/src/protection/ProtectionPlugin.d.ts +11 -0
  204. package/types/src/protection/WorkbookProtectionPanel.d.ts +34 -15
  205. package/types/src/protection/WorkbookProtectionTab.d.ts +22 -0
  206. package/types/src/protection/WorksheetProtectionPanel.d.ts +35 -0
  207. package/types/src/protection/index.d.ts +7 -1
  208. package/types/src/shape/InsertShapeCommandButton.d.ts +20 -0
  209. package/types/src/shape/ShapeFormatPanel.d.ts +11 -0
  210. package/types/src/shape/ShapePlugin.d.ts +6 -0
  211. package/types/src/shape/index.d.ts +3 -0
  212. package/types/src/slicer/PresetSlicerStylesCommandButton.d.ts +18 -0
  213. package/types/src/slicer/SlicerPlugin.d.ts +6 -0
  214. package/types/src/slicer/index.d.ts +3 -0
  215. package/types/src/statusBar/SheetZoomScale.d.ts +6 -0
  216. package/types/src/studio/CommandsWrapper.d.ts +5 -0
  217. package/types/src/studio/EagerStudio.d.ts +14 -1
  218. package/types/src/studio/StudioCommandProvider.d.ts +10 -0
  219. package/types/src/studio/StudioCommands.d.ts +40 -4
  220. package/types/src/studio/StudioProps.d.ts +64 -2
  221. package/types/src/studio/StudioSplitPane.d.ts +1 -1
  222. package/types/src/studio/formulaBarPlacement.d.ts +35 -0
  223. package/types/src/studio/splitStudioProps.d.ts +7 -0
  224. package/types/src/studio/useStudioApp.d.ts +31 -18
  225. package/types/src/template/TemplateCommands.d.ts +29 -0
  226. package/types/src/template/TemplateDialog.d.ts +19 -0
  227. package/types/src/template/TemplatePanel.d.ts +50 -0
  228. package/types/src/template/TemplateSearchField.d.ts +29 -0
  229. package/types/src/template/WelcomeDialog.d.ts +29 -0
  230. package/types/src/template/categoryColor.d.ts +8 -0
  231. package/types/src/template/index.d.ts +3 -0
  232. package/types/src/template/useTemplateCatalog.d.ts +71 -0
  233. package/types/src/toolbar/WorkbookToolbars.d.ts +1 -1
  234. package/types/src/workbook/DefaultRenderers.d.ts +16 -2
  235. package/types/src/workbook/FillMenu.d.ts +21 -0
  236. package/types/src/workbook/OutlineButtons.d.ts +11 -0
  237. package/types/src/workbook/WorkbookContextMenu.d.ts +4 -0
  238. package/types/src/workbook/WorkbookElement.d.ts +1 -1
  239. package/types/src/workbook/index.d.ts +1 -0
  240. package/browser/cjs/BQJKf40kttQWOzLw.cjs +0 -20
  241. package/browser/cjs/BTZ5uzK0wHzpiZGC.cjs +0 -1
  242. package/browser/cjs/B_D3JKseVvpRyX-E.cjs +0 -1
  243. package/browser/cjs/BeKpqOx8It0RD0Rf.cjs +0 -2
  244. package/browser/cjs/Bj-EvSYeDfqmU0V6.cjs +0 -2
  245. package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
  246. package/browser/cjs/Bte6P3MhSjajJmmY.cjs +0 -7
  247. package/browser/cjs/C97KHSuikAbr1qVM.cjs +0 -1
  248. package/browser/cjs/CJLwX_A3y3TQUmzj.cjs +0 -1
  249. package/browser/cjs/CPSc2VSYZeZ1B9mi.cjs +0 -1
  250. package/browser/cjs/CPcBvw4ZPwHVTUZF.cjs +0 -1
  251. package/browser/cjs/CYxc8vnRi8dNpDPk.cjs +0 -1
  252. package/browser/cjs/CZm1jVZaHQ246prW.cjs +0 -1
  253. package/browser/cjs/CdDYyAfccXme8w6m.cjs +0 -1
  254. package/browser/cjs/Cm1APq2MraYNNhyI.cjs +0 -1
  255. package/browser/cjs/DO8V31Z1ewgMA1di.cjs +0 -5
  256. package/browser/cjs/Djsiad0Qha1Y-YaS.cjs +0 -1
  257. package/browser/cjs/IASAYG6qgv7lJY7y.cjs +0 -1
  258. package/browser/cjs/KZvriGbhEOVkQD0b.cjs +0 -1
  259. package/browser/cjs/UnMhi28mbvLiOXQe.cjs +0 -1
  260. package/browser/cjs/Vbigo0kFP3PFfmeA.cjs +0 -1
  261. package/browser/cjs/iMWEL01eC83oU-YY.cjs +0 -1
  262. package/browser/cjs/index.cjs +0 -2
  263. package/browser/cjs/w2GjebPlOFv3pCbm.cjs +0 -1
  264. package/browser/cjs/z0rB4fK6X1M6PpVD.cjs +0 -11
  265. package/browser/cjs/zQsyZpeXAvcVXJMs.cjs +0 -1
  266. package/browser/esm/BuY3uV47Bwbqpasq.mjs +0 -219
  267. package/browser/esm/CAs1MWvJTcRfJy26.mjs +0 -217
  268. package/browser/esm/CBU3LgLYmqtQjJbu.mjs +0 -1150
  269. package/browser/esm/CDU0rqpLNVtMLI-f.mjs +0 -52
  270. package/browser/esm/CVBub6pgTsJzCc5m.mjs +0 -5429
  271. package/browser/esm/C_XvSsQ9BVdHffCO.mjs +0 -47
  272. package/browser/esm/FT29q8yNwsEpVZjt.mjs +0 -9257
  273. package/browser/esm/Hb1rlHT4tE5hLcjM.mjs +0 -82
  274. package/browser/esm/UJOXCQv6KrG1gY3l.mjs +0 -105
  275. package/browser/esm/s46El7mT6oKLSnYB.mjs +0 -411
  276. package/node/esm/9FY82fj1R1c-AczW.mjs +0 -47
  277. package/node/esm/C-boHCnJditFzng3.mjs +0 -106
  278. package/node/esm/DxXM8qHi0Oz4Zovl.mjs +0 -4575
  279. package/node/esm/sQt2wWGTRLzqeJdG.mjs +0 -82
  280. package/node/esm/yCHAZKxJR7qY_ySy.mjs +0 -470
  281. package/types/src/conditionalFormat/ConditionalFormatRangeField.d.ts +0 -32
  282. package/types/src/conditions/DateTimeOption.d.ts +0 -43
  283. package/types/src/conditions/InSetOption.d.ts +0 -37
  284. package/types/src/dialog/CommentsDialog.d.ts +0 -11
  285. package/types/src/dialog/NumberFormatDialog.d.ts +0 -12
  286. package/types/src/filter/FilterList.d.ts +0 -28
  287. package/types/src/numberFormat/NumberFormatTaskPane.d.ts +0 -12
  288. package/types/src/numberFormat/index.d.ts +0 -8
  289. package/types/src/protectedRange/ProtectedRangeDetailsTaskPane.d.ts +0 -3
  290. package/types/src/protectedRange/ProtectedRangePlugin.d.ts +0 -2
  291. package/types/src/protection/WorkbookProtectionDialog.d.ts +0 -23
@@ -0,0 +1,1379 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.11
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 { BorderStylePopupButton as e, BorderTemplateIcon as t, ColorCommandButton as o, ColorPopupButton as r, E as n, FontFamilyCommandButton as a, FontSizeCommandButton as l, NumberFormatOption as i, numberFormatCategoryLabel as d } from "./index.mjs";
8
+ import { a as s, c, i as m, n as g, o as p, r as u, s as h, t as b } from "./BR45ogAR-hY2bE60.mjs";
9
+ import { IBorders as f, IRange as y, NumberFormat as x } from "@sheetxl/sdk";
10
+ import { StaticBorderRenderer as S, StaticCellRenderer as v, useGridColorScheme as E, useModelListener as w, useModelSync as T } from "@sheetxl/react";
11
+ import { DynamicIcon as K, useCallbackRef as C, useCommands as F, usePersistentState as k, useTranslator as A } from "@sheetxl/utils-react";
12
+ import { forwardRef as O, memo as N, useCallback as z, useEffect as R, useMemo as B, useReducer as P, useRef as I, useState as M } from "react";
13
+ import { CommandButton as H, ExhibitIconButton as V, ExhibitMenuItem as L, ExhibitPopupIconButton as U, PopupButtonType as $, SelectedIcon as j, defaultCreatePopupPanel as W } from "@sheetxl/utils-mui";
14
+ import { Fragment as _, jsx as G, jsxs as Y } from "react/jsx-runtime";
15
+ import { Box as q, Checkbox as Q, FormControl as J, FormControlLabel as Z, InputLabel as X, List as ee, ListItemButton as te, ListItemText as oe, MenuItem as re, Paper as ne, Select as ae, Tab as le, Tabs as ie, TextField as de, Typography as se, alpha as ce } from "@mui/material";
16
+ import { messageKey as me } from "@sheetxl/utils";
17
+ import ge from "clsx";
18
+ var pe = {
19
+ autoFocus: !1,
20
+ scrollIntoView: !1
21
+ }, ue = N((e) => {
22
+ const { selection: t, height: o = 46, maxWidth: r = 260, ...n } = e, a = A(), { cell: l, createCell: i, disabled: d } = t, s = B(() => "number" == typeof l.getValue() ? l : i({
23
+ value: 1234.56,
24
+ style: l.getStyle()
25
+ }), [l, i]);
26
+ return Y(q, {
27
+ sx: {
28
+ display: "flex",
29
+ flexDirection: "column",
30
+ gap: .5
31
+ },
32
+ ...n,
33
+ children: [G(se, {
34
+ variant: "caption",
35
+ component: "div",
36
+ children: a("format.preview")
37
+ }), G(v, {
38
+ cell: s,
39
+ disabled: d,
40
+ style: {
41
+ width: "100%",
42
+ maxWidth: `${r}px`,
43
+ height: `${o}px`,
44
+ flex: "0 0 auto",
45
+ border: "1px solid var(--sxl-color-base-300, rgb(224, 224, 224))"
46
+ },
47
+ propsBorder: { style: {
48
+ height: "100%",
49
+ width: "100%"
50
+ } }
51
+ })]
52
+ });
53
+ });
54
+ ue.displayName = "FormatCellPreview";
55
+ var { Builder: he } = x, be = {
56
+ py: "2px",
57
+ px: 1,
58
+ minHeight: 0,
59
+ "& .MuiListItemText-root": { my: 0 },
60
+ "& .MuiListItemText-primary": {
61
+ fontSize: "0.8125rem",
62
+ lineHeight: 1.5
63
+ },
64
+ "& .MuiListItemText-secondary": {
65
+ fontSize: "0.7rem",
66
+ lineHeight: 1.3
67
+ }
68
+ }, fe = {
69
+ border: (e) => `1px solid ${e.palette.divider}`,
70
+ borderRadius: (e) => `${e.shape.borderRadius}px`,
71
+ overflow: "auto",
72
+ maxHeight: 260
73
+ };
74
+ function ye(e, t, o) {
75
+ switch (t) {
76
+ case "minus": return e("numberFormat.negMinus");
77
+ case "red": return e("numberFormat.negRed");
78
+ case "parens": return e("numberFormat.negParens");
79
+ case "redParens": return e("numberFormat.negRedParens");
80
+ default: return o;
81
+ }
82
+ }
83
+ function xe(e, t, o) {
84
+ const r = t?.getValue();
85
+ return "Text" === e ? "string" == typeof r ? r : o : "Date" === e || "Time" === e ? "number" == typeof r ? r : 45658.625 : "number" == typeof r ? r : 1234.56;
86
+ }
87
+ function Se(e, t, o) {
88
+ try {
89
+ return o ? o.createCell({
90
+ value: t,
91
+ style: { numberFormat: e }
92
+ }).getNumberFormat().displayText || "" : x.getEngine().format(e, t, {}).text ?? "";
93
+ } catch {
94
+ return "";
95
+ }
96
+ }
97
+ var ve = N(O((e, t) => {
98
+ const { value: o, onChange: r, context: a, onCommit: l, hideSample: s = !1, showQuickFormats: c = !1, disabled: g = !1, className: u, onKeyDown: b, ...f } = e, y = A(), [S, v] = M(() => he.parse(o));
99
+ R(() => {
100
+ he.build(S) !== o && v(he.parse(o));
101
+ }, [o]);
102
+ const E = a?.() ?? null, w = C((e) => {
103
+ v(e), r(he.build(e));
104
+ }, [r]), T = C((e) => {
105
+ w({
106
+ ...S,
107
+ ...e
108
+ });
109
+ }, [S, w]), K = C(() => {
110
+ r(o);
111
+ }, [r, o]), F = C((e) => {
112
+ if (e === S.category) return;
113
+ const t = he.defaultCodeForCategory(e), o = he.isParametricCategory(e) ? he.parse(t) : {
114
+ category: e,
115
+ code: t
116
+ };
117
+ w(o);
118
+ }, [S.category, w]), k = C((e) => {
119
+ if (b?.(e), "Enter" === e.key) {
120
+ if (e.target.closest("[role=\"combobox\"], [role=\"menuitem\"]")) return;
121
+ e.preventDefault(), e.stopPropagation(), l?.();
122
+ }
123
+ }, [b, l]), D = (e, t, o) => (r) => {
124
+ let n = t;
125
+ switch (r.key) {
126
+ case "ArrowDown":
127
+ n = Math.min(e - 1, t + 1);
128
+ break;
129
+ case "ArrowUp":
130
+ n = Math.max(0, t - 1);
131
+ break;
132
+ case "Home":
133
+ n = 0;
134
+ break;
135
+ case "End":
136
+ n = e - 1;
137
+ break;
138
+ default: return;
139
+ }
140
+ r.preventDefault(), n !== t && n >= 0 && o(n), r.currentTarget.querySelectorAll(".MuiListItemButton-root")[n]?.focus();
141
+ }, O = S.category, N = xe(O, E, y("numberFormat.sampleText")), z = Se(o, N, E), B = G(m, {
142
+ label: y("numberFormat.decimalPlaces"),
143
+ disabled: g,
144
+ value: S.decimalPlaces ?? 0,
145
+ min: 0,
146
+ max: 30,
147
+ width: 140,
148
+ onChange: (e) => T({ decimalPlaces: e })
149
+ }), P = S.currencySymbol ?? "$", I = Y(J, {
150
+ size: "small",
151
+ sx: { width: 140 },
152
+ children: [G(X, {
153
+ shrink: !0,
154
+ children: y("numberFormat.symbol")
155
+ }), G(ae, {
156
+ label: y("numberFormat.symbol"),
157
+ notched: !0,
158
+ disabled: g,
159
+ value: P,
160
+ onChange: (e) => T({ currencySymbol: e.target.value }),
161
+ children: he.CURRENCY_SYMBOLS.map((e) => G(re, {
162
+ value: e,
163
+ onClick: h(P, e, K),
164
+ children: e
165
+ }, e))
166
+ })]
167
+ }), H = G(Z, {
168
+ sx: { alignSelf: "center" },
169
+ control: G(Q, {
170
+ size: "small",
171
+ disabled: g,
172
+ checked: !!S.useSeparator,
173
+ onChange: (e) => T({ useSeparator: e.target.checked })
174
+ }),
175
+ label: y("numberFormat.useSeparator")
176
+ }), V = Y(q, {
177
+ sx: {
178
+ display: "flex",
179
+ flexDirection: "column",
180
+ minHeight: 0,
181
+ flex: "1 1 auto"
182
+ },
183
+ children: [G(se, {
184
+ variant: "caption",
185
+ component: "div",
186
+ sx: { mb: .5 },
187
+ children: y("numberFormat.negativeNumbers")
188
+ }), G(ee, {
189
+ dense: !0,
190
+ disablePadding: !0,
191
+ sx: {
192
+ ...fe,
193
+ flex: "1 1 auto"
194
+ },
195
+ onKeyDown: D(he.NEGATIVE_STYLES.length, S.negativeStyle ?? 0, (e) => T({ negativeStyle: e })),
196
+ children: he.NEGATIVE_STYLES.map((e, t) => {
197
+ const o = Se(he.build({
198
+ ...S,
199
+ negativeStyle: t
200
+ }), -function(e) {
201
+ return "number" == typeof e ? Math.abs(e) : 1234.56;
202
+ }(N), E);
203
+ return G(te, {
204
+ disabled: g,
205
+ selected: (S.negativeStyle ?? 0) === t,
206
+ onClick: () => T({ negativeStyle: t }),
207
+ sx: be,
208
+ children: G(oe, {
209
+ primary: o || ye(y, e.key, e.label),
210
+ slotProps: { primary: {
211
+ noWrap: !0,
212
+ sx: {
213
+ color: e.red ? "error.main" : void 0,
214
+ fontVariantNumeric: "tabular-nums"
215
+ }
216
+ } }
217
+ })
218
+ }, e.key);
219
+ })
220
+ })]
221
+ }), $ = (e, t) => G(ee, {
222
+ dense: !0,
223
+ disablePadding: !0,
224
+ sx: {
225
+ ...fe,
226
+ flex: "1 1 auto"
227
+ },
228
+ onKeyDown: D(e.length, e.indexOf(o), (t) => w({
229
+ category: O,
230
+ code: e[t]
231
+ })),
232
+ children: e.map((e) => G(te, {
233
+ disabled: g,
234
+ selected: o === e,
235
+ onClick: () => w({
236
+ category: O,
237
+ code: e
238
+ }),
239
+ sx: be,
240
+ children: G(oe, {
241
+ primary: t?.[e] ?? Se(e, N, E) ?? e,
242
+ secondary: t ? e : void 0,
243
+ slotProps: {
244
+ primary: { noWrap: !0 },
245
+ secondary: { noWrap: !0 }
246
+ }
247
+ })
248
+ }, e))
249
+ }), ne = G(de, {
250
+ label: y("numberFormat.typeCode"),
251
+ size: "small",
252
+ fullWidth: !0,
253
+ disabled: g,
254
+ value: o,
255
+ error: !!o && !x.Parser.isValidFormat(o),
256
+ helperText: o && !x.Parser.isValidFormat(o) ? y("numberFormat.invalidCode") : " ",
257
+ onChange: (e) => w({
258
+ category: "Custom",
259
+ code: e.target.value
260
+ }),
261
+ slotProps: {
262
+ inputLabel: { shrink: !0 },
263
+ htmlInput: {
264
+ spellCheck: !1,
265
+ autoComplete: "off"
266
+ }
267
+ }
268
+ }), le = (e) => G(q, {
269
+ sx: {
270
+ display: "flex",
271
+ flexWrap: "wrap",
272
+ gap: 1.5,
273
+ alignItems: "flex-start"
274
+ },
275
+ children: e
276
+ });
277
+ let ie;
278
+ switch (O) {
279
+ case "General":
280
+ ie = G(se, {
281
+ variant: "body2",
282
+ children: y("numberFormat.generalInfo")
283
+ });
284
+ break;
285
+ case "Number":
286
+ ie = Y(_, { children: [le(Y(_, { children: [B, H] })), V] });
287
+ break;
288
+ case "Currency":
289
+ ie = Y(_, { children: [le(Y(_, { children: [B, I] })), V] });
290
+ break;
291
+ case "Accounting":
292
+ ie = Y(_, { children: [le(Y(_, { children: [B, I] })), G(se, {
293
+ variant: "caption",
294
+ color: "text.secondary",
295
+ children: y("numberFormat.accountingInfo")
296
+ })] });
297
+ break;
298
+ case "Percentage":
299
+ case "Scientific":
300
+ ie = B;
301
+ break;
302
+ case "Date":
303
+ ie = $(he.DATE_PRESETS);
304
+ break;
305
+ case "Time":
306
+ ie = $(he.TIME_PRESETS);
307
+ break;
308
+ case "Fraction":
309
+ ie = $(he.FRACTION_PRESETS, ((e) => ({
310
+ "# ?/?": e("numberFormat.fractionOneDigit"),
311
+ "# ??/??": e("numberFormat.fractionTwoDigits"),
312
+ "# ???/???": e("numberFormat.fractionThreeDigits"),
313
+ "# ?/2": e("numberFormat.fractionHalves"),
314
+ "# ?/4": e("numberFormat.fractionQuarters"),
315
+ "# ?/8": e("numberFormat.fractionEighths"),
316
+ "# ??/16": e("numberFormat.fractionSixteenths"),
317
+ "# ?/10": e("numberFormat.fractionTenths"),
318
+ "# ??/100": e("numberFormat.fractionHundredths")
319
+ }))(y));
320
+ break;
321
+ case "Special":
322
+ ie = $(he.SPECIAL_PRESETS, ((e) => ({
323
+ "00000": e("numberFormat.specialZip"),
324
+ "00000-0000": e("numberFormat.specialZip4"),
325
+ "[<=9999999]###-####;(###) ###-####": e("numberFormat.specialPhone"),
326
+ "000-00-0000": e("numberFormat.specialSsn")
327
+ }))(y));
328
+ break;
329
+ case "Text":
330
+ ie = G(se, {
331
+ variant: "body2",
332
+ children: y("numberFormat.textInfo")
333
+ });
334
+ break;
335
+ case "Custom":
336
+ ie = Y(_, { children: [ne, $(he.DATE_PRESETS.concat(he.TIME_PRESETS))] });
337
+ break;
338
+ default: ie = null;
339
+ }
340
+ return Y(q, {
341
+ ref: t,
342
+ className: ge("sxl-number-format-panel", u),
343
+ onKeyDown: k,
344
+ sx: {
345
+ display: "flex",
346
+ flexDirection: "column",
347
+ gap: 1.25
348
+ },
349
+ ...f,
350
+ children: [
351
+ s ? null : Y(q, { children: [G(se, {
352
+ variant: "caption",
353
+ component: "div",
354
+ sx: { pl: .5 },
355
+ children: y("numberFormat.sample")
356
+ }), G(se, {
357
+ variant: "body1",
358
+ component: "div",
359
+ sx: {
360
+ borderRadius: (e) => `${e.shape.borderRadius}px`,
361
+ padding: (e) => e.spacing(1),
362
+ border: (e) => `1px solid ${e.palette.divider}`,
363
+ minHeight: "1.6em",
364
+ fontVariantNumeric: "tabular-nums",
365
+ overflow: "hidden",
366
+ textOverflow: "ellipsis",
367
+ whiteSpace: "nowrap"
368
+ },
369
+ children: z || " "
370
+ })] }),
371
+ c ? G(n, {
372
+ disabled: g,
373
+ sx: {
374
+ justifyContent: "flex-start",
375
+ paddingBottom: 1
376
+ }
377
+ }) : null,
378
+ G(p, {
379
+ label: y("numberFormat.category"),
380
+ sx: { marginBottom: .5 },
381
+ children: G(U, {
382
+ outlined: !0,
383
+ disabled: g,
384
+ sx: { width: "100%" },
385
+ createPopupPanel: (e) => {
386
+ const { closeFloatAll: t } = e, r = he.CATEGORIES.map((e) => {
387
+ const r = e === O, n = () => {
388
+ ((e) => {
389
+ e === O ? K() : F(e);
390
+ })(e), t?.();
391
+ };
392
+ return G(L, {
393
+ selected: r,
394
+ icon: G(j, {
395
+ selected: r,
396
+ children: r ? void 0 : null
397
+ }),
398
+ sx: { display: "flex" },
399
+ onMouseDown: (e) => {
400
+ 0 === e.button && e.preventDefault();
401
+ },
402
+ onMouseUp: (e) => {
403
+ 0 === e.button && n();
404
+ },
405
+ onKeyDown: (e) => {
406
+ "Enter" !== e.key && " " !== e.key || n();
407
+ },
408
+ children: G(i, {
409
+ label: d(y, e),
410
+ sample: (a = e, "Custom" === a && a !== O ? "" : Se(a === O ? o : he.defaultCodeForCategory(a), xe(a, E, y("numberFormat.sampleText")), E))
411
+ })
412
+ }, e);
413
+ var a;
414
+ });
415
+ return W({
416
+ ...e,
417
+ children: G(q, {
418
+ sx: {
419
+ overflow: "auto",
420
+ flex: "1 1 100%"
421
+ },
422
+ children: r
423
+ })
424
+ });
425
+ },
426
+ icon: G(q, {
427
+ sx: {
428
+ display: "flex",
429
+ flex: "1 1 100%",
430
+ minWidth: 0,
431
+ paddingLeft: "4px",
432
+ paddingRight: "4px",
433
+ fontSize: (e) => `${Math.round(e.typography.fontSize)}px`,
434
+ lineHeight: 1.2,
435
+ fontFamily: (e) => e.typography.fontFamily,
436
+ color: (e) => e.palette.text.secondary
437
+ },
438
+ children: G(q, {
439
+ sx: {
440
+ overflow: "hidden",
441
+ textOverflow: "ellipsis",
442
+ whiteSpace: "pre"
443
+ },
444
+ children: d(y, O)
445
+ })
446
+ })
447
+ })
448
+ }),
449
+ G(q, {
450
+ sx: {
451
+ display: "flex",
452
+ flexDirection: "column",
453
+ gap: 1.25,
454
+ flex: "1 1 auto",
455
+ minWidth: 0,
456
+ minHeight: 0
457
+ },
458
+ children: ie
459
+ })
460
+ ]
461
+ });
462
+ }));
463
+ ve.displayName = "NumberFormatPanel";
464
+ var Ee = {
465
+ axes: y.AxisSelection.Column,
466
+ expandOnly: !0,
467
+ skipCustomSize: !0
468
+ }, we = (e) => e > 180 ? e - 360 : e, Te = (e) => {
469
+ const t = Math.max(-90, Math.min(90, Math.round(e)));
470
+ return t < 0 ? t + 360 : t;
471
+ }, Ke = N((e) => {
472
+ const { selection: t, disabled: o, className: r, ...n } = e, a = A(), { style: l, applyStyle: i } = t, d = o || t.disabled, g = l.getAlignment(), h = g.getIndent(), b = g.getStacked(), f = b ? 0 : g.getRotation(), y = C((e) => {
473
+ i({ alignment: { indent: e } }, me("op.setAlignment"), Ee);
474
+ }, [i]), x = C((e) => {
475
+ i({ alignment: { rotation: Te(e) } }, me("op.setAlignment"));
476
+ }, [i]);
477
+ return Y(q, {
478
+ className: ge("sxl-format-alignment-panel", r),
479
+ sx: c,
480
+ ...n,
481
+ children: [
482
+ G(p, {
483
+ label: a("format.horizontalAlignment"),
484
+ children: G(s, { children: Y(u, { children: [
485
+ G(H, {
486
+ commandKey: "formatAlignLeftToggle",
487
+ groupKey: "horizontalAlignOptions",
488
+ disabled: d
489
+ }),
490
+ G(H, {
491
+ commandKey: "formatAlignCenterToggle",
492
+ groupKey: "horizontalAlignOptions",
493
+ disabled: d
494
+ }),
495
+ G(H, {
496
+ commandKey: "formatAlignRightToggle",
497
+ groupKey: "horizontalAlignOptions",
498
+ disabled: d
499
+ }),
500
+ G(H, {
501
+ commandKey: "formatAlignJustifyToggle",
502
+ groupKey: "horizontalAlignOptions",
503
+ disabled: d
504
+ }),
505
+ G(H, {
506
+ commandKey: "formatAlignDistributedHorizontalToggle",
507
+ groupKey: "horizontalAlignOptions",
508
+ disabled: d
509
+ }),
510
+ G(H, {
511
+ commandKey: "formatAlignCenterContinuousToggle",
512
+ groupKey: "horizontalAlignOptions",
513
+ disabled: d
514
+ }),
515
+ G(H, {
516
+ commandKey: "formatAlignFillToggle",
517
+ groupKey: "horizontalAlignOptions",
518
+ disabled: d
519
+ })
520
+ ] }) })
521
+ }),
522
+ G(p, {
523
+ label: a("format.indent"),
524
+ children: Y(s, { children: [
525
+ G(H, {
526
+ commandKey: "formatIndentDecrease",
527
+ groupKey: "horizontalAlignOptions",
528
+ disabled: d
529
+ }),
530
+ G(H, {
531
+ commandKey: "formatIndentIncrease",
532
+ groupKey: "horizontalAlignOptions",
533
+ disabled: d
534
+ }),
535
+ G(m, {
536
+ label: a("format.indentUnit"),
537
+ disabled: d,
538
+ value: h,
539
+ min: 0,
540
+ max: 250,
541
+ width: 104,
542
+ onChange: y
543
+ })
544
+ ] })
545
+ }),
546
+ G(p, {
547
+ label: a("format.verticalAlignment"),
548
+ children: Y(u, { children: [
549
+ G(H, {
550
+ commandKey: "formatAlignTopToggle",
551
+ groupKey: "verticalAlignOptions",
552
+ disabled: d
553
+ }),
554
+ G(H, {
555
+ commandKey: "formatAlignMiddleToggle",
556
+ groupKey: "verticalAlignOptions",
557
+ disabled: d
558
+ }),
559
+ G(H, {
560
+ commandKey: "formatAlignBottomToggle",
561
+ groupKey: "verticalAlignOptions",
562
+ disabled: d
563
+ }),
564
+ G(H, {
565
+ commandKey: "formatAlignJustifyVerticalToggle",
566
+ groupKey: "verticalAlignOptions",
567
+ disabled: d
568
+ }),
569
+ G(H, {
570
+ commandKey: "formatAlignDistributedVerticalToggle",
571
+ groupKey: "verticalAlignOptions",
572
+ disabled: d
573
+ })
574
+ ] })
575
+ }),
576
+ G(p, {
577
+ label: a("format.overflow"),
578
+ children: Y(u, { children: [
579
+ G(H, {
580
+ commandKey: "formatTextOverflowWrapToggle",
581
+ groupKey: "textOverflowOptions",
582
+ disabled: d
583
+ }),
584
+ G(H, {
585
+ commandKey: "formatTextOverflowShrinkToggle",
586
+ groupKey: "textOverflowOptions",
587
+ disabled: d
588
+ }),
589
+ G(H, {
590
+ commandKey: "formatTextOverflowClipToggle",
591
+ groupKey: "textOverflowOptions",
592
+ disabled: d
593
+ }),
594
+ G(H, {
595
+ commandKey: "formatTextOverflowVisibleToggle",
596
+ groupKey: "textOverflowOptions",
597
+ disabled: d
598
+ })
599
+ ] })
600
+ }),
601
+ G(p, {
602
+ label: a("format.merge"),
603
+ children: Y(u, { children: [
604
+ G(H, {
605
+ commandKey: "mergeToggle",
606
+ groupKey: "mergeOptions",
607
+ disabled: d
608
+ }),
609
+ G(H, {
610
+ commandKey: "mergeHorizontal",
611
+ groupKey: "mergeOptions",
612
+ disabled: d
613
+ }),
614
+ G(H, {
615
+ commandKey: "mergeVertical",
616
+ groupKey: "mergeOptions",
617
+ disabled: d
618
+ }),
619
+ G(H, {
620
+ commandKey: "unmerge",
621
+ groupKey: "mergeOptions",
622
+ disabled: d
623
+ })
624
+ ] })
625
+ }),
626
+ G(p, {
627
+ label: a("format.orientation"),
628
+ children: Y(s, { children: [Y(u, { children: [
629
+ G(H, {
630
+ commandKey: "formatTextRotate0",
631
+ groupKey: "textRotateOptions",
632
+ disabled: d
633
+ }),
634
+ G(H, {
635
+ commandKey: "formatTextRotate45",
636
+ groupKey: "textRotateOptions",
637
+ disabled: d
638
+ }),
639
+ G(H, {
640
+ commandKey: "formatTextRotate315",
641
+ groupKey: "textRotateOptions",
642
+ disabled: d
643
+ }),
644
+ G(H, {
645
+ commandKey: "formatTextRotate90",
646
+ groupKey: "textRotateOptions",
647
+ disabled: d
648
+ }),
649
+ G(H, {
650
+ commandKey: "formatTextRotateVertical",
651
+ groupKey: "textRotateOptions",
652
+ disabled: d
653
+ }),
654
+ G(H, {
655
+ commandKey: "formatTextRotate270",
656
+ groupKey: "textRotateOptions",
657
+ disabled: d
658
+ })
659
+ ] }), G(m, {
660
+ label: a("format.degrees"),
661
+ disabled: d || b,
662
+ value: we(f),
663
+ min: -90,
664
+ max: 90,
665
+ step: 5,
666
+ width: 104,
667
+ onChange: x
668
+ })] })
669
+ })
670
+ ]
671
+ });
672
+ });
673
+ Ke.displayName = "AlignmentPanel";
674
+ var Ce = N((e) => {
675
+ const { selection: t, disabled: r, className: n, ...i } = e, d = A(), m = r || t.disabled;
676
+ return Y(q, {
677
+ className: ge("sxl-format-font-panel", n),
678
+ sx: c,
679
+ ...i,
680
+ children: [
681
+ G(p, {
682
+ label: d("format.fontFamily"),
683
+ children: G(a, {
684
+ commandKey: "formatFontFamily",
685
+ disabled: m,
686
+ sx: { width: "100%" }
687
+ })
688
+ }),
689
+ G(p, {
690
+ label: d("format.fontSize"),
691
+ children: Y(s, { children: [
692
+ G(l, {
693
+ commandKey: "formatFontSize",
694
+ disabled: m,
695
+ sx: { width: 96 }
696
+ }),
697
+ G(H, {
698
+ commandKey: "formatFontSizeIncrease",
699
+ disabled: m
700
+ }),
701
+ G(H, {
702
+ commandKey: "formatFontSizeDecrease",
703
+ disabled: m
704
+ })
705
+ ] })
706
+ }),
707
+ G(p, {
708
+ label: d("format.color"),
709
+ children: G(s, { children: G(o, {
710
+ commandKey: "formatFontColor",
711
+ disabled: m
712
+ }) })
713
+ }),
714
+ G(p, {
715
+ label: d("format.effects"),
716
+ children: Y(u, { children: [
717
+ G(H, {
718
+ commandKey: "formatBoldToggle",
719
+ disabled: m
720
+ }),
721
+ G(H, {
722
+ commandKey: "formatItalicToggle",
723
+ disabled: m
724
+ }),
725
+ G(H, {
726
+ commandKey: "formatUnderlinedToggle",
727
+ groupKey: "underlineOptions",
728
+ disabled: m
729
+ }),
730
+ G(H, {
731
+ commandKey: "formatUnderlinedDoubleToggle",
732
+ groupKey: "underlineOptions",
733
+ disabled: m
734
+ }),
735
+ G(q, { sx: { width: "8px" } }),
736
+ G(H, {
737
+ commandKey: "formatStrikeThroughToggle",
738
+ disabled: m
739
+ }),
740
+ G(H, {
741
+ commandKey: "formatSuperscriptToggle",
742
+ disabled: m
743
+ }),
744
+ G(H, {
745
+ commandKey: "formatSubscriptToggle",
746
+ disabled: m
747
+ })
748
+ ] })
749
+ }),
750
+ G(p, {
751
+ label: d("format.accountingUnderline"),
752
+ children: Y(u, { children: [G(H, {
753
+ commandKey: "formatUnderlinedAccountingToggle",
754
+ groupKey: "underlineOptions",
755
+ disabled: m
756
+ }), G(H, {
757
+ commandKey: "formatUnderlinedAccountingDoubleToggle",
758
+ groupKey: "underlineOptions",
759
+ disabled: m
760
+ })] })
761
+ })
762
+ ]
763
+ });
764
+ });
765
+ Ce.displayName = "FontPanel";
766
+ var Fe = Object.freeze([
767
+ f.Edge.Top,
768
+ f.Edge.Bottom,
769
+ f.Edge.Left,
770
+ f.Edge.Right,
771
+ f.Edge.Horizontal,
772
+ f.Edge.Vertical
773
+ ]), ke = Object.freeze([]), Ae = Object.freeze([f.Edge.Horizontal, f.Edge.Vertical]), De = new Map([
774
+ ...Fe,
775
+ f.Edge.DiagonalUp,
776
+ f.Edge.DiagonalDown
777
+ ].map((e) => [e, Object.freeze([e])])), Oe = (e) => e === f.Edge.DiagonalUp || e === f.Edge.DiagonalDown;
778
+ function Ne(e, t) {
779
+ switch (t) {
780
+ case f.Edge.Top: return e("border.top");
781
+ case f.Edge.Left: return e("border.left");
782
+ case f.Edge.Right: return e("border.right");
783
+ case f.Edge.Bottom: return e("border.bottom");
784
+ case f.Edge.Horizontal: return e("border.insideHorizontal");
785
+ case f.Edge.Vertical: return e("border.insideVertical");
786
+ case f.Edge.DiagonalUp: return e("border.diagonalUp");
787
+ case f.Edge.DiagonalDown: return e("border.diagonalDown");
788
+ default: return t;
789
+ }
790
+ }
791
+ var ze = (e) => 0 === e ? "0px" : 1 === e ? "calc(100% - 1px)" : `calc(${100 * e}% - 0.5px)`, Re = (e, t) => {
792
+ const o = "-7px", r = [];
793
+ for (let e = 0; e <= t; e++) {
794
+ const n = ze(e / t);
795
+ r.push({
796
+ left: n,
797
+ top: o,
798
+ width: "1px",
799
+ height: "5px"
800
+ }), r.push({
801
+ left: n,
802
+ bottom: o,
803
+ width: "1px",
804
+ height: "5px"
805
+ });
806
+ }
807
+ for (let t = 0; t <= e; t++) {
808
+ const n = ze(t / e);
809
+ r.push({
810
+ top: n,
811
+ left: o,
812
+ height: "1px",
813
+ width: "5px"
814
+ }), r.push({
815
+ top: n,
816
+ right: o,
817
+ height: "1px",
818
+ width: "5px"
819
+ });
820
+ }
821
+ return r;
822
+ }, Be = (e) => e === f.Edge.Left || e === f.Edge.Vertical || e === f.Edge.Right, Pe = (e) => {
823
+ switch (e) {
824
+ case f.Edge.Top:
825
+ case f.Edge.Left: return 0;
826
+ case f.Edge.Horizontal:
827
+ case f.Edge.Vertical: return .5;
828
+ default: return 1;
829
+ }
830
+ };
831
+ var Ie = (e) => {
832
+ const { edges: t, createBorder: o, onToggleEdges: r, omittedEdges: n, disabled: a = !1, height: l = 104, className: i, ...d } = e, s = A(), c = I(null), [m, g] = M(ke), p = z((e) => !n?.includes(e), [n]), u = z((e) => !a && p(e), [a, p]), h = p(f.Edge.Horizontal) ? 2 : 1, b = p(f.Edge.Vertical) ? 2 : 1, y = z((e) => o({
833
+ top: 0 === e.rowIndex ? t.top : t.horizontal,
834
+ bottom: e.rowIndex === h - 1 ? t.bottom : t.horizontal,
835
+ left: 0 === e.colIndex ? t.left : t.vertical,
836
+ right: e.colIndex === b - 1 ? t.right : t.vertical,
837
+ diagonalUp: t.diagonalUp,
838
+ diagonalDown: t.diagonalDown
839
+ }), [
840
+ t,
841
+ o,
842
+ h,
843
+ b
844
+ ]), x = z((e) => {
845
+ const t = c.current;
846
+ if (!t) return ke;
847
+ const o = t.getBoundingClientRect();
848
+ return function(e, t, o, r, n) {
849
+ if (o <= 0 || r <= 0) return ke;
850
+ const a = Math.min(10, o / 5, r / 5);
851
+ if (Ae.every(n) && Math.abs(e - o / 2) <= a && Math.abs(t - r / 2) <= a) return Ae;
852
+ const l = Math.abs(e) <= a, i = Math.abs(e - o) <= a, d = Math.abs(t) <= a, s = Math.abs(t - r) <= a;
853
+ if ((l || i) && (d || s)) {
854
+ const e = l === d ? f.Edge.DiagonalDown : f.Edge.DiagonalUp;
855
+ if (n(e)) return De.get(e);
856
+ }
857
+ let c = null, m = Number.POSITIVE_INFINITY;
858
+ for (const a of Fe) {
859
+ if (!n(a)) continue;
860
+ const l = Be(a), i = l ? r : o, d = l ? t : e, s = Math.max(0, -d, d - i), g = (l ? e : t) - Pe(a) * (l ? o : r), p = Math.hypot(s, g);
861
+ p < m && (m = p, c = a);
862
+ }
863
+ return c && m <= a ? De.get(c) : ke;
864
+ }(e.clientX - o.left, e.clientY - o.top, o.width, o.height, u);
865
+ }, [u]);
866
+ return G(q, {
867
+ className: ge("sxl-border-preview", i),
868
+ ...d,
869
+ onPointerMove: (e) => g(x(e)),
870
+ onPointerLeave: () => g(ke),
871
+ onClick: (e) => {
872
+ const t = x(e);
873
+ t.length > 0 && r(t);
874
+ },
875
+ sx: {
876
+ position: "relative",
877
+ boxSizing: "border-box",
878
+ height: `${l}px`,
879
+ width: "100%",
880
+ padding: "10px",
881
+ cursor: m.length > 0 ? "pointer" : "default",
882
+ borderRadius: (e) => `${e.shape.borderRadius}px`,
883
+ border: (e) => `1px solid ${e.palette.divider}`,
884
+ opacity: a ? .6 : 1
885
+ },
886
+ children: Y(q, {
887
+ ref: c,
888
+ sx: {
889
+ position: "relative",
890
+ width: "100%",
891
+ height: "100%"
892
+ },
893
+ children: [
894
+ G(q, {
895
+ "aria-hidden": "true",
896
+ sx: {
897
+ position: "absolute",
898
+ inset: 0,
899
+ display: "grid",
900
+ gridTemplateColumns: `repeat(${b}, 1fr)`,
901
+ gridTemplateRows: `repeat(${h}, 1fr)`,
902
+ gap: "2px",
903
+ pointerEvents: "none",
904
+ "& > div": { backgroundColor: (e) => ce(e.palette.text.primary, .05) }
905
+ },
906
+ children: Array.from({ length: h * b }, (e, t) => G("div", {}, t))
907
+ }),
908
+ G(q, {
909
+ "aria-hidden": "true",
910
+ sx: {
911
+ position: "absolute",
912
+ inset: 0,
913
+ pointerEvents: "none",
914
+ "& > div": {
915
+ position: "absolute",
916
+ backgroundColor: (e) => e.palette.text.secondary
917
+ }
918
+ },
919
+ children: Re(h, b).map((e, t) => G("div", { style: e }, t))
920
+ }),
921
+ m.length > 0 ? Y(q, {
922
+ "aria-hidden": "true",
923
+ sx: {
924
+ position: "absolute",
925
+ inset: 0,
926
+ pointerEvents: "none",
927
+ opacity: .22,
928
+ "& > div": {
929
+ position: "absolute",
930
+ borderRadius: "3px",
931
+ backgroundColor: (e) => e.palette.text.primary
932
+ },
933
+ "& line": { stroke: (e) => e.palette.text.primary }
934
+ },
935
+ children: [m.filter((e) => !Oe(e)).map((e) => G("div", { style: Me(e) }, e)), m.some(Oe) ? G("svg", {
936
+ viewBox: "0 0 100 100",
937
+ preserveAspectRatio: "none",
938
+ style: {
939
+ position: "absolute",
940
+ inset: 0,
941
+ width: "100%",
942
+ height: "100%",
943
+ overflow: "visible"
944
+ },
945
+ children: m.filter(Oe).flatMap((e) => function(e, t, o) {
946
+ const r = [];
947
+ for (let n = 0; n < t; n++) for (let a = 0; a < o; a++) {
948
+ const l = a / o * 100, i = (a + 1) / o * 100, d = n / t * 100, s = (n + 1) / t * 100, c = e === f.Edge.DiagonalDown;
949
+ r.push(G("line", {
950
+ x1: l,
951
+ y1: c ? d : s,
952
+ x2: i,
953
+ y2: c ? s : d,
954
+ strokeWidth: 6,
955
+ strokeLinecap: "round",
956
+ vectorEffect: "non-scaling-stroke"
957
+ }, `${e}:${n}:${a}`));
958
+ }
959
+ return r;
960
+ }(e, h, b))
961
+ }) : null]
962
+ }) : null,
963
+ G(S, {
964
+ getBorderAt: y,
965
+ rowCount: h,
966
+ columnCount: b,
967
+ style: {
968
+ position: "absolute",
969
+ inset: 0,
970
+ height: "100%",
971
+ width: "100%"
972
+ }
973
+ }),
974
+ Fe.filter(p).map((e) => G(q, {
975
+ component: "button",
976
+ type: "button",
977
+ "aria-label": Ne(s, e),
978
+ "aria-pressed": !!t[e],
979
+ title: Ne(s, e),
980
+ disabled: !u(e),
981
+ onClick: (t) => {
982
+ t.stopPropagation(), r(De.get(e));
983
+ },
984
+ sx: {
985
+ position: "absolute",
986
+ appearance: "none",
987
+ background: "transparent",
988
+ border: "none",
989
+ padding: 0,
990
+ pointerEvents: "none",
991
+ borderRadius: "3px",
992
+ "&:focus-visible": { outline: (e) => `2px solid ${e.palette.primary.main}` },
993
+ ...Me(e)
994
+ }
995
+ }, e))
996
+ ]
997
+ })
998
+ });
999
+ };
1000
+ function Me(e) {
1001
+ const t = `calc(${100 * Pe(e)}% - 3px)`;
1002
+ return Be(e) ? {
1003
+ top: 0,
1004
+ bottom: 0,
1005
+ left: t,
1006
+ width: "6px"
1007
+ } : {
1008
+ left: 0,
1009
+ right: 0,
1010
+ top: t,
1011
+ height: "6px"
1012
+ };
1013
+ }
1014
+ Ie.displayName = "BorderPreview";
1015
+ var He = f.StrokeStyle.Thin, Ve = Object.freeze([
1016
+ f.Edge.Left,
1017
+ f.Edge.Top,
1018
+ f.Edge.Right,
1019
+ f.Edge.Bottom
1020
+ ]), Le = Object.freeze([f.Edge.Horizontal, f.Edge.Vertical]), Ue = Object.freeze([...Ve, ...Le]), $e = Object.freeze([f.Edge.DiagonalUp, f.Edge.DiagonalDown]), je = Object.freeze([...Ue, ...$e]), We = (e, t, o) => {
1021
+ const r = {
1022
+ style: t,
1023
+ color: o?.toString()
1024
+ }, n = {};
1025
+ for (const t of e) n[t] = r;
1026
+ return n;
1027
+ }, _e = (e) => {
1028
+ const t = {};
1029
+ for (const o of e) t[o] = null;
1030
+ return t;
1031
+ }, Ge = (e) => e ? e.toString() : null, Ye = N((o) => {
1032
+ const { selection: n, disabled: a, className: l, ...i } = o, d = A(), { getEdgeStroke: m, createBorder: g, applyStyle: h, styles: b, schemeLookup: y, autoColor: x, darkMode: S, hasInnerHorizontal: v, hasInnerVertical: E } = n, w = a || n.disabled, T = C((e) => e === f.Edge.Horizontal ? !v : e === f.Edge.Vertical && !E, [v, E]), [F, k] = M(() => {
1033
+ const e = m(f.Edge.Bottom)?.getStyle();
1034
+ return e && e !== f.StrokeStyle.None ? e : He;
1035
+ }), [D, O] = M(() => {
1036
+ const e = m(f.Edge.Bottom);
1037
+ return !e || e.isNone() ? null : e.getProperties().color ? e.getColor() : null;
1038
+ }), N = C(() => b.recentColors(), [b]), z = C((e) => {
1039
+ h({ borders: e }, me("op.setBorders"));
1040
+ }, [h]), R = C((e) => {
1041
+ 0 !== e.length && h([{ borders: _e(e) }, { borders: We(e, F, D) }], me("op.setBorders"));
1042
+ }, [
1043
+ h,
1044
+ F,
1045
+ D
1046
+ ]), B = C((e) => {
1047
+ 0 !== e.length && z(We(e, f.StrokeStyle.None, null));
1048
+ }, [z]), P = C((e) => {
1049
+ R(e.filter((e) => !T(e)));
1050
+ }, [R, T]), I = {};
1051
+ for (const e of je) {
1052
+ const t = m(e);
1053
+ t && !t.isNone() && (I[e] = t.getProperties());
1054
+ }
1055
+ const H = C((e) => {
1056
+ const t = I[e];
1057
+ return (t?.style ?? f.StrokeStyle.None) === F && Ge(t?.color) === Ge(D);
1058
+ }, [
1059
+ I,
1060
+ F,
1061
+ D
1062
+ ]), L = (e) => {
1063
+ const t = e.filter((e) => !T(e));
1064
+ return t.length > 0 && t.every(H);
1065
+ }, U = C((e) => {
1066
+ const t = e.filter((e) => !T(e));
1067
+ F === f.StrokeStyle.None || t.every(H) ? B(t) : R(t);
1068
+ }, [
1069
+ B,
1070
+ R,
1071
+ H,
1072
+ T,
1073
+ F
1074
+ ]), j = (e) => We(e, F, D), W = (e, o, r) => G(V, {
1075
+ disabled: w,
1076
+ icon: G(t, {
1077
+ border: e.length > 0 ? j(e) : null,
1078
+ createBorder: g
1079
+ }),
1080
+ propsTooltip: {
1081
+ label: o,
1082
+ simple: !0
1083
+ },
1084
+ onClick: r
1085
+ }), _ = (e, o) => {
1086
+ const r = w || e.every(T);
1087
+ return G(V, {
1088
+ disabled: r,
1089
+ selected: !r && F !== f.StrokeStyle.None && L(e),
1090
+ icon: G(t, {
1091
+ border: j(e),
1092
+ createBorder: g
1093
+ }),
1094
+ propsTooltip: {
1095
+ label: o,
1096
+ simple: !0
1097
+ },
1098
+ onClick: () => U(e)
1099
+ });
1100
+ }, Q = (e) => _([e], Ne(d, e));
1101
+ return Y(q, {
1102
+ className: ge("sxl-format-border-panel", l),
1103
+ sx: c,
1104
+ ...i,
1105
+ children: [
1106
+ Y(s, { children: [G(r, {
1107
+ disabled: w || F === f.StrokeStyle.None,
1108
+ darkMode: S,
1109
+ icon: G(K, { iconKey: "stroke.colored" }),
1110
+ tooltip: d("border.colorTooltip"),
1111
+ selectedColor: D,
1112
+ onSelectColor: (e) => O(e),
1113
+ propsPanel: {
1114
+ disableAlpha: !0,
1115
+ schemeLookup: y,
1116
+ recentColors: N,
1117
+ autoColor: x
1118
+ }
1119
+ }), G(e, {
1120
+ disabled: w,
1121
+ darkMode: S,
1122
+ selectedStyle: F,
1123
+ styleColor: D,
1124
+ variant: $.Toolbar,
1125
+ onSelectStyle: (e) => k(e ?? f.StrokeStyle.None)
1126
+ })] }),
1127
+ Y(u, {
1128
+ sx: { justifyContent: "center" },
1129
+ children: [
1130
+ W(Ue, d("border.all"), () => P(Ue)),
1131
+ W(Ve, d("border.outside"), () => P(Ve)),
1132
+ W([], d("border.none"), () => z(null))
1133
+ ]
1134
+ }),
1135
+ Y(p, {
1136
+ sx: { px: 1.5 },
1137
+ children: [Y(q, {
1138
+ sx: {
1139
+ display: "grid",
1140
+ gridTemplateColumns: "auto minmax(0, 156px) auto",
1141
+ justifyContent: "center",
1142
+ columnGap: .5,
1143
+ rowGap: .25,
1144
+ minWidth: 0
1145
+ },
1146
+ children: [
1147
+ Y(q, {
1148
+ sx: {
1149
+ display: "flex",
1150
+ flexDirection: "column",
1151
+ justifyContent: "space-between",
1152
+ height: "104px"
1153
+ },
1154
+ children: [
1155
+ Q(f.Edge.Top),
1156
+ Q(f.Edge.Horizontal),
1157
+ Q(f.Edge.Bottom)
1158
+ ]
1159
+ }),
1160
+ G(Ie, {
1161
+ edges: I,
1162
+ createBorder: g,
1163
+ disabled: w,
1164
+ height: 104,
1165
+ omittedEdges: Ue.filter(T),
1166
+ onToggleEdges: U
1167
+ }),
1168
+ G(q, {
1169
+ sx: {
1170
+ display: "flex",
1171
+ alignItems: "center"
1172
+ },
1173
+ children: _(Le, d("border.inner"))
1174
+ }),
1175
+ Q(f.Edge.DiagonalUp),
1176
+ Y(q, {
1177
+ sx: {
1178
+ display: "flex",
1179
+ justifyContent: "space-between",
1180
+ minWidth: 0
1181
+ },
1182
+ children: [
1183
+ Q(f.Edge.Left),
1184
+ Q(f.Edge.Vertical),
1185
+ Q(f.Edge.Right)
1186
+ ]
1187
+ }),
1188
+ Q(f.Edge.DiagonalDown)
1189
+ ]
1190
+ }), G(se, {
1191
+ variant: "caption",
1192
+ component: "div",
1193
+ sx: {
1194
+ color: "text.secondary",
1195
+ lineHeight: 1.4,
1196
+ textAlign: "center"
1197
+ },
1198
+ children: d("format.borderDiagram")
1199
+ })]
1200
+ })
1201
+ ]
1202
+ });
1203
+ });
1204
+ Ye.displayName = "BorderPanel";
1205
+ var qe = {
1206
+ Number: "number",
1207
+ Alignment: "alignment",
1208
+ Font: "font",
1209
+ Border: "border",
1210
+ Fill: "fill"
1211
+ }, Qe = "format.tab", Je = Object.freeze([
1212
+ qe.Number,
1213
+ qe.Alignment,
1214
+ qe.Font,
1215
+ qe.Border,
1216
+ qe.Fill
1217
+ ]), Ze = N((e) => {
1218
+ const t = e.model, o = A();
1219
+ T(t, "onSelectedSheetChange");
1220
+ const r = t.getSelectedWorksheet();
1221
+ if (!r) {
1222
+ const { model: t, args: r, entryKey: n, frame: a, ref: l, ...i } = e;
1223
+ return G(ne, {
1224
+ square: !0,
1225
+ ref: l,
1226
+ sx: {
1227
+ display: "flex",
1228
+ flex: "1 1 auto",
1229
+ padding: (e) => e.spacing(2, 2)
1230
+ },
1231
+ ...i,
1232
+ children: o("format.noWorksheet")
1233
+ });
1234
+ }
1235
+ return G(Xe, {
1236
+ ...e,
1237
+ sheet: r
1238
+ });
1239
+ });
1240
+ Ze.displayName = "FormatTaskPane";
1241
+ var Xe = N((e) => {
1242
+ const { model: t, sheet: o, args: r, entryKey: n, frame: a, ref: l, ...i } = e, d = A(), s = ((e) => {
1243
+ const [, t] = P((e) => e + 1, 0);
1244
+ w(e, {
1245
+ onSelectionChange: () => t(),
1246
+ onStyleChange: () => t()
1247
+ });
1248
+ const [o] = F(["formatBoldToggle"]), r = E(), n = e.getSelectedCell(), a = e.getStyles(), l = e.getSelectedRanges(), i = C((t, o, r) => {
1249
+ const n = Array.isArray(t) ? t : [t];
1250
+ e.doBatch(() => {
1251
+ for (const t of n) e.getSelectedRanges().getStyle().update(t, {
1252
+ autoSelect: pe,
1253
+ autoFit: r ?? !0
1254
+ });
1255
+ }, { description: o ?? me("op.updateStyle") });
1256
+ }, [e]), d = C((t) => e.createCell(t), [e]), s = C((e) => a.getNormal().createStyle({ borders: e }).getBorders(), [a]), c = l.getCoords()[0], m = C((t) => {
1257
+ if (!c) return null;
1258
+ const o = (t, o) => e.getCell({
1259
+ rowIndex: t,
1260
+ colIndex: o
1261
+ }).getStyle(!0).getBorders();
1262
+ switch (t) {
1263
+ case f.Edge.Top: return o(c.rowStart, c.colStart).getTop();
1264
+ case f.Edge.Left: return o(c.rowStart, c.colStart).getLeft();
1265
+ case f.Edge.Bottom: return o(c.rowEnd, c.colEnd).getBottom();
1266
+ case f.Edge.Right: return o(c.rowEnd, c.colEnd).getRight();
1267
+ case f.Edge.Horizontal: return c.rowEnd <= c.rowStart ? null : o(c.rowStart + 1, c.colStart).getTop();
1268
+ case f.Edge.Vertical: return c.colEnd <= c.colStart ? null : o(c.rowStart, c.colStart + 1).getLeft();
1269
+ case f.Edge.DiagonalUp: return o(c.rowStart, c.colStart).getDiagonalUp();
1270
+ case f.Edge.DiagonalDown: return o(c.rowStart, c.colStart).getDiagonalDown();
1271
+ default: return null;
1272
+ }
1273
+ }, [e, c]);
1274
+ return {
1275
+ sheet: e,
1276
+ cell: n,
1277
+ style: n.getStyle(),
1278
+ styles: a,
1279
+ schemeLookup: a.schemeLookup(),
1280
+ autoColor: a.getNormal().getFont().getColor(),
1281
+ darkMode: "dark" === r,
1282
+ disabled: o?.disabled() ?? !1,
1283
+ applyStyle: i,
1284
+ createCell: d,
1285
+ createBorder: s,
1286
+ getEdgeStroke: m,
1287
+ hasInnerHorizontal: l.getRowCount() > 1,
1288
+ hasInnerVertical: l.getColumnCount() > 1
1289
+ };
1290
+ })(o), [c, m] = k(Qe, qe.Number), p = Je.includes(c) ? c : qe.Number;
1291
+ R(() => {
1292
+ const e = r?.tab;
1293
+ e && m(e);
1294
+ }, [r]);
1295
+ const u = s.style.getNumberFormat(), h = "number" == typeof u ? x.resolve(u) : u ?? "General";
1296
+ return Y(ne, {
1297
+ square: !0,
1298
+ ref: l,
1299
+ sx: {
1300
+ display: "flex",
1301
+ flexDirection: "column",
1302
+ flex: "1 1 auto",
1303
+ width: "100%",
1304
+ height: "100%",
1305
+ minHeight: 0,
1306
+ overflow: "hidden"
1307
+ },
1308
+ ...i,
1309
+ children: [
1310
+ G(q, {
1311
+ sx: {
1312
+ flexShrink: 0,
1313
+ padding: (e) => e.spacing(1.5, 2)
1314
+ },
1315
+ children: G(ue, { selection: s })
1316
+ }),
1317
+ G(ie, {
1318
+ value: p,
1319
+ onChange: (e, t) => m(t),
1320
+ variant: "scrollable",
1321
+ scrollButtons: "auto",
1322
+ allowScrollButtonsMobile: !0,
1323
+ sx: {
1324
+ minHeight: 0,
1325
+ flexShrink: 0,
1326
+ borderBottom: (e) => `1px solid ${e.palette.divider}`,
1327
+ "& .MuiTab-root": {
1328
+ textTransform: "none",
1329
+ whiteSpace: "nowrap",
1330
+ minHeight: 0,
1331
+ minWidth: 0,
1332
+ flex: "1 0 auto",
1333
+ padding: "8px 4px"
1334
+ }
1335
+ },
1336
+ children: Je.map((e) => G(le, {
1337
+ value: e,
1338
+ label: et(d, e)
1339
+ }, e))
1340
+ }),
1341
+ Y(q, {
1342
+ sx: {
1343
+ flex: "1 1 auto",
1344
+ minHeight: 0,
1345
+ overflow: "auto",
1346
+ padding: (e) => e.spacing(2.5, 2)
1347
+ },
1348
+ children: [
1349
+ p === qe.Number ? G(ve, {
1350
+ hideSample: !0,
1351
+ showQuickFormats: !0,
1352
+ value: h,
1353
+ disabled: s.disabled,
1354
+ context: () => s.cell,
1355
+ onChange: (e) => {
1356
+ s.applyStyle({ numberFormat: e }, me("op.setNumberFormat"));
1357
+ }
1358
+ }) : null,
1359
+ p === qe.Alignment ? G(Ke, { selection: s }) : null,
1360
+ p === qe.Font ? G(Ce, { selection: s }) : null,
1361
+ p === qe.Fill ? G(b, { selection: g(s) }) : null,
1362
+ p === qe.Border ? G(Ye, { selection: s }) : null
1363
+ ]
1364
+ })
1365
+ ]
1366
+ });
1367
+ });
1368
+ function et(e, t) {
1369
+ switch (t) {
1370
+ case qe.Number: return e("format.tabNumber");
1371
+ case qe.Alignment: return e("format.tabAlignment");
1372
+ case qe.Font: return e("format.tabFont");
1373
+ case qe.Fill: return e("format.tabFill");
1374
+ case qe.Border: return e("format.tabBorder");
1375
+ default: return t;
1376
+ }
1377
+ }
1378
+ Xe.displayName = "FormatTaskPaneBody";
1379
+ export { Qe as FORMAT_TAB_KEY, qe as FormatTab, Ze as FormatTaskPane, Ze as default };