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