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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/README.md +2 -2
  2. package/browser/cjs/BQJKf40kttQWOzLw.cjs +20 -0
  3. package/browser/cjs/BTZ5uzK0wHzpiZGC.cjs +1 -0
  4. package/browser/cjs/B_D3JKseVvpRyX-E.cjs +1 -0
  5. package/browser/cjs/B_WyRpeiesnEiNP4.cjs +11 -0
  6. package/browser/cjs/BeKpqOx8It0RD0Rf.cjs +2 -0
  7. package/browser/cjs/Bj-EvSYeDfqmU0V6.cjs +2 -0
  8. package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +1 -0
  9. package/browser/cjs/ByIEqNsvj52sihT9.cjs +5 -0
  10. package/browser/cjs/C3moehR3VOd0LnmM.cjs +1 -0
  11. package/browser/cjs/C97KHSuikAbr1qVM.cjs +1 -0
  12. package/browser/cjs/CJLwX_A3y3TQUmzj.cjs +1 -0
  13. package/browser/cjs/CPSc2VSYZeZ1B9mi.cjs +1 -0
  14. package/browser/cjs/CPcBvw4ZPwHVTUZF.cjs +1 -0
  15. package/browser/cjs/CZm1jVZaHQ246prW.cjs +1 -0
  16. package/browser/cjs/CdDYyAfccXme8w6m.cjs +1 -0
  17. package/browser/cjs/DBJLJGiCGXesx5n6.cjs +1 -0
  18. package/browser/cjs/DLScL5AOXhHu9O9H.cjs +7 -0
  19. package/browser/cjs/Djsiad0Qha1Y-YaS.cjs +1 -0
  20. package/browser/cjs/IASAYG6qgv7lJY7y.cjs +1 -0
  21. package/browser/cjs/KZvriGbhEOVkQD0b.cjs +1 -0
  22. package/browser/cjs/UnMhi28mbvLiOXQe.cjs +1 -0
  23. package/browser/cjs/Vbigo0kFP3PFfmeA.cjs +1 -0
  24. package/browser/cjs/iMWEL01eC83oU-YY.cjs +1 -0
  25. package/browser/cjs/index.cjs +2 -7
  26. package/browser/cjs/w2GjebPlOFv3pCbm.cjs +1 -0
  27. package/browser/cjs/zQsyZpeXAvcVXJMs.cjs +1 -0
  28. package/browser/esm/0EONOhVZ7oT0C_G2.mjs +1150 -0
  29. package/browser/esm/5x7evORpymnb5SfW.mjs +129 -0
  30. package/browser/esm/BACBR1jjcpJbhOWA.mjs +191 -0
  31. package/browser/esm/BPZne8WpzrkWOH6L.mjs +47 -0
  32. package/browser/esm/BeKa8xVj69hAVKRN.mjs +155 -0
  33. package/browser/esm/BeQ9bqOvNNP-arFP.mjs +219 -0
  34. package/browser/esm/Bf3PIOM6U-NmWk2O.mjs +20 -0
  35. package/browser/esm/C4BPDYeqgN59wMGp.mjs +411 -0
  36. package/browser/esm/CGbn_xdhgTvk2mvb.mjs +612 -0
  37. package/browser/esm/CKADOp3hTx0MSNY7.mjs +52 -0
  38. package/browser/esm/CR2sUEZyRqVv2SNl.mjs +105 -0
  39. package/browser/esm/CTN8J8c1AneJu3Lu.mjs +2207 -0
  40. package/browser/esm/Cc5akPEmIwbgKIfc.mjs +516 -0
  41. package/browser/esm/CePKCTL6D05kDy2E.mjs +82 -0
  42. package/browser/esm/DBM1blcMTZMAM-eR.mjs +217 -0
  43. package/browser/esm/DPBnKqhSuJ414Pxx.mjs +99 -0
  44. package/browser/esm/F51tGfYHocox80zY.mjs +468 -0
  45. package/browser/esm/SDzKpaiuhQux7tAh.mjs +5391 -0
  46. package/browser/esm/TDH9XceS8cAkO5d3.mjs +508 -0
  47. package/browser/esm/XKVlG-x_9q5dbVIW.mjs +8878 -0
  48. package/browser/esm/fJiwyUQJ18X-cCQz.mjs +1376 -0
  49. package/browser/esm/fel6EbPAcZOsBmks.mjs +42 -0
  50. package/browser/esm/flvjZEXrSDrtDzLB.mjs +113 -0
  51. package/browser/esm/index.mjs +152 -91
  52. package/licenses/dependencies.txt +137 -627
  53. package/node/esm/B9-0usA1hSoD0Nk3.mjs +679 -0
  54. package/node/esm/BO1vNzjGWYdZdbq9.mjs +113 -0
  55. package/node/esm/BYigefA8bf9FOVib.mjs +47 -0
  56. package/node/esm/BdrLZp98HQaVMykZ.mjs +82 -0
  57. package/node/esm/BlubX7gm8wTUNiZ-.mjs +106 -0
  58. package/node/esm/C8a6QwMGW1tMiWA6.mjs +516 -0
  59. package/node/esm/CCCnorMn30oUDDIY.mjs +4536 -0
  60. package/node/esm/CKpik3HRSANKEy4G.mjs +99 -0
  61. package/node/esm/CTZcfST8pUcLMail.mjs +509 -0
  62. package/node/esm/D1K9Ji7iQwnOnd1-.mjs +190 -0
  63. package/node/esm/DuUiuB59bQRPQi-D.mjs +155 -0
  64. package/node/esm/eKP73GEWmonTXpfv.mjs +470 -0
  65. package/node/esm/g3y8kxL1Ln214UNr.mjs +129 -0
  66. package/node/esm/index.mjs +10603 -2832
  67. package/package.json +27 -27
  68. package/resources/contents.json +30 -0
  69. package/resources/locales/contents.json +44 -0
  70. package/resources/locales/de/groups.cmd.json +219 -0
  71. package/resources/locales/de/studio.cmd.json +159 -0
  72. package/resources/locales/de/ui.msg.json +507 -0
  73. package/resources/locales/en/groups.cmd.json +219 -0
  74. package/resources/locales/en/studio.cmd.json +159 -0
  75. package/resources/locales/en/ui.msg.json +508 -0
  76. package/types/index.d.ts +2 -1761
  77. package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +131 -0
  78. package/types/src/anchorItems/AnchorItemsPanel.d.ts +29 -0
  79. package/types/src/anchorItems/index.d.ts +3 -0
  80. package/types/src/border/BorderPopupButton.d.ts +30 -0
  81. package/types/src/border/BorderStylePopupButton.d.ts +40 -0
  82. package/types/src/border/index.d.ts +3 -0
  83. package/types/src/chart/command/InsertChartCommandButton.d.ts +10 -0
  84. package/types/src/chart/command/index.d.ts +2 -0
  85. package/types/src/color/Alpha.d.ts +36 -0
  86. package/types/src/color/Checkboard.d.ts +11 -0
  87. package/types/src/color/CheckboardUtils.d.ts +3 -0
  88. package/types/src/color/ColorButton.d.ts +21 -0
  89. package/types/src/color/ColorButtonList.d.ts +17 -0
  90. package/types/src/color/ColorPanel.d.ts +71 -0
  91. package/types/src/color/ColorPopupButton.d.ts +29 -0
  92. package/types/src/color/CustomColorPanel.d.ts +16 -0
  93. package/types/src/color/EditableInput.d.ts +22 -0
  94. package/types/src/color/Hue.d.ts +29 -0
  95. package/types/src/color/Saturation.d.ts +45 -0
  96. package/types/src/color/SketchFields.d.ts +9 -0
  97. package/types/src/color/Swatch.d.ts +16 -0
  98. package/types/src/color/Types.d.ts +11 -0
  99. package/types/src/color/_Utils.d.ts +4 -0
  100. package/types/src/color/index.d.ts +7 -0
  101. package/types/src/command/AccountingStyleCommandButton.d.ts +18 -0
  102. package/types/src/command/AppearanceCommandButton.d.ts +3 -0
  103. package/types/src/command/BorderCommandButton.d.ts +20 -0
  104. package/types/src/command/ColorCommandButton.d.ts +23 -0
  105. package/types/src/command/DocThemeCommandButton.d.ts +19 -0
  106. package/types/src/command/FileCommandButton.d.ts +8 -0
  107. package/types/src/command/FontFamilyCommandButton.d.ts +9 -0
  108. package/types/src/command/FontSizeCommandButton.d.ts +21 -0
  109. package/types/src/command/InsertFunctionCommandPopupButton.d.ts +9 -0
  110. package/types/src/command/InsertFunctionSumCommandPopupButton.d.ts +8 -0
  111. package/types/src/command/LanguageCommandButton.d.ts +19 -0
  112. package/types/src/command/LocaleCommandButton.d.ts +17 -0
  113. package/types/src/command/NumberFormatCommandButton.d.ts +6 -0
  114. package/types/src/command/PasteCommandButton.d.ts +14 -0
  115. package/types/src/command/PresetCellStylesCommandButton.d.ts +11 -0
  116. package/types/src/command/PresetTableStylesCommandButton.d.ts +12 -0
  117. package/types/src/command/RegisterCatalog.d.ts +3 -0
  118. package/types/src/command/SheetCommandGroups.d.ts +10 -0
  119. package/types/src/command/SheetZoomCommandButton.d.ts +9 -0
  120. package/types/src/command/StudioCommandGroups.d.ts +11 -0
  121. package/types/src/command/TextEffectsCommandButton.d.ts +6 -0
  122. package/types/src/command/TextRotateGroupButton.d.ts +14 -0
  123. package/types/src/command/UndoRedoCommandButton.d.ts +14 -0
  124. package/types/src/command/WalkingCopyCommandButton.d.ts +6 -0
  125. package/types/src/command/WorkbookCommandGroups.d.ts +11 -0
  126. package/types/src/command/index.d.ts +23 -0
  127. package/types/src/conditionalFormat/ColorScaleRulePanel.d.ts +18 -0
  128. package/types/src/conditionalFormat/ConditionalFormatDetailsPanel.d.ts +23 -0
  129. package/types/src/conditionalFormat/ConditionalFormatDetailsTaskPane.d.ts +4 -0
  130. package/types/src/conditionalFormat/ConditionalFormatEditorPanel.d.ts +20 -0
  131. package/types/src/conditionalFormat/ConditionalFormatPlugin.d.ts +2 -0
  132. package/types/src/conditionalFormat/ConditionalFormatRangeField.d.ts +32 -0
  133. package/types/src/conditionalFormat/ConditionalFormatStylePicker.d.ts +34 -0
  134. package/types/src/conditionalFormat/ConditionalFormatTitle.d.ts +10 -0
  135. package/types/src/conditionalFormat/DataBarRulePanel.d.ts +23 -0
  136. package/types/src/conditionalFormat/IconSetRulePanel.d.ts +23 -0
  137. package/types/src/conditionalFormat/PresetChip.d.ts +30 -0
  138. package/types/src/conditionalFormat/PresetScalesCommandButton.d.ts +20 -0
  139. package/types/src/conditionalFormat/RulePreview.d.ts +23 -0
  140. package/types/src/conditionalFormat/RuleSection.d.ts +20 -0
  141. package/types/src/conditionalFormat/ScaleMiniGrid.d.ts +59 -0
  142. package/types/src/conditionalFormat/ScaleStopRow.d.ts +34 -0
  143. package/types/src/conditionalFormat/index.d.ts +3 -0
  144. package/types/src/conditionalFormat/previewColor.d.ts +50 -0
  145. package/types/src/conditions/AverageOption.d.ts +25 -0
  146. package/types/src/conditions/BetweenOption.d.ts +25 -0
  147. package/types/src/conditions/BooleanOption.d.ts +24 -0
  148. package/types/src/conditions/CombinatorOption.d.ts +41 -0
  149. package/types/src/conditions/ConditionEditor.d.ts +57 -0
  150. package/types/src/conditions/ConditionUtils.d.ts +83 -0
  151. package/types/src/conditions/DateTimeOption.d.ts +43 -0
  152. package/types/src/conditions/ExpressionOption.d.ts +26 -0
  153. package/types/src/conditions/InSetOption.d.ts +37 -0
  154. package/types/src/conditions/NumberOption.d.ts +24 -0
  155. package/types/src/conditions/OperatorAndParamEditor.d.ts +55 -0
  156. package/types/src/conditions/OperatorSelect.d.ts +35 -0
  157. package/types/src/conditions/OperatorSelectPopupButton.d.ts +39 -0
  158. package/types/src/conditions/ScalarOption.d.ts +29 -0
  159. package/types/src/conditions/SelectorSelect.d.ts +43 -0
  160. package/types/src/conditions/StringOption.d.ts +24 -0
  161. package/types/src/conditions/TimePeriodOption.d.ts +25 -0
  162. package/types/src/conditions/TopNOption.d.ts +25 -0
  163. package/types/src/conditions/index.d.ts +13 -0
  164. package/types/src/dataValidation/DataValidationDetailsPanel.d.ts +16 -0
  165. package/types/src/dataValidation/DataValidationDetailsTaskPane.d.ts +3 -0
  166. package/types/src/dataValidation/DataValidationEditorPanel.d.ts +12 -0
  167. package/types/src/dataValidation/DataValidationPlugin.d.ts +2 -0
  168. package/types/src/dataValidation/index.d.ts +2 -0
  169. package/types/src/debug/DebugUtils.d.ts +4 -0
  170. package/types/src/debug/index.d.ts +2 -0
  171. package/types/src/dialog/CommentsDialog.d.ts +11 -0
  172. package/types/src/dialog/FindReplaceWindow.d.ts +13 -0
  173. package/types/src/dialog/HyperlinkDialog.d.ts +28 -0
  174. package/types/src/dialog/InsertFunctionDialog.d.ts +25 -0
  175. package/types/src/dialog/NamedReferenceDialog.d.ts +17 -0
  176. package/types/src/dialog/NumberFormatDialog.d.ts +12 -0
  177. package/types/src/dialog/ResizeHeaderDialog.d.ts +15 -0
  178. package/types/src/dialog/ShortcutKeysDialog.d.ts +9 -0
  179. package/types/src/dialog/ShortcutKeysPanel.d.ts +28 -0
  180. package/types/src/dialog/SortDialog.d.ts +9 -0
  181. package/types/src/dialog/TableNewDialog.d.ts +14 -0
  182. package/types/src/dialog/WorkbookStatisticsDialog.d.ts +13 -0
  183. package/types/src/dialog/index.d.ts +10 -0
  184. package/types/src/filter/ColumnMenu.d.ts +13 -0
  185. package/types/src/filter/FilterList.d.ts +28 -0
  186. package/types/src/filter/index.d.ts +3 -0
  187. package/types/src/form/FormulaField.d.ts +221 -0
  188. package/types/src/form/InputField.d.ts +89 -0
  189. package/types/src/form/index.d.ts +3 -0
  190. package/types/src/formulaBar/FormulaBar.d.ts +8 -0
  191. package/types/src/formulaBar/IFormulaBar.d.ts +51 -0
  192. package/types/src/formulaBar/index.d.ts +3 -0
  193. package/types/src/function/FunctionArgumentsPanel.d.ts +57 -0
  194. package/types/src/function/FunctionSearchPanel.d.ts +35 -0
  195. package/types/src/function/InsertFunctionWizard.d.ts +79 -0
  196. package/types/src/function/index.d.ts +4 -0
  197. package/types/src/function/paneMetrics.d.ts +33 -0
  198. package/types/src/index.d.ts +21 -0
  199. package/types/src/itemsPanel/EditorPanel.d.ts +21 -0
  200. package/types/src/itemsPanel/ItemCard.d.ts +57 -0
  201. package/types/src/itemsPanel/ItemsDescriptor.d.ts +215 -0
  202. package/types/src/itemsPanel/ItemsPanel.d.ts +45 -0
  203. package/types/src/itemsPanel/SortableCards.d.ts +67 -0
  204. package/types/src/itemsPanel/index.d.ts +6 -0
  205. package/types/src/movable/MovableContextMenu.d.ts +13 -0
  206. package/types/src/movable/index.d.ts +2 -0
  207. package/types/src/named/INamedCollectionEditor.d.ts +37 -0
  208. package/types/src/named/NamedCollectionEditor.d.ts +7 -0
  209. package/types/src/named/NamedDetailsPanel.d.ts +11 -0
  210. package/types/src/named/NamedDetailsTaskPane.d.ts +3 -0
  211. package/types/src/named/NamedDraft.d.ts +68 -0
  212. package/types/src/named/NamedEditorPanel.d.ts +19 -0
  213. package/types/src/named/NamedPlugin.d.ts +2 -0
  214. package/types/src/named/index.d.ts +8 -0
  215. package/types/src/numberFormat/NumberFormatPanel.d.ts +29 -0
  216. package/types/src/numberFormat/NumberFormatTaskPane.d.ts +12 -0
  217. package/types/src/numberFormat/index.d.ts +8 -0
  218. package/types/src/protectedRange/ProtectedRangeDetailsPanel.d.ts +20 -0
  219. package/types/src/protectedRange/ProtectedRangeDetailsTaskPane.d.ts +3 -0
  220. package/types/src/protectedRange/ProtectedRangeEditorPanel.d.ts +27 -0
  221. package/types/src/protectedRange/ProtectedRangePlugin.d.ts +2 -0
  222. package/types/src/protectedRange/index.d.ts +2 -0
  223. package/types/src/protection/WorkbookProtectionDialog.d.ts +23 -0
  224. package/types/src/protection/WorkbookProtectionPanel.d.ts +51 -0
  225. package/types/src/protection/index.d.ts +3 -0
  226. package/types/src/sheet/SheetTabMenu.d.ts +21 -0
  227. package/types/src/sheet/SheetsAllMenu.d.ts +16 -0
  228. package/types/src/sheet/index.d.ts +3 -0
  229. package/types/src/statusBar/NumberStats.d.ts +27 -0
  230. package/types/src/statusBar/SheetZoomScale.d.ts +11 -0
  231. package/types/src/statusBar/StatusBar.d.ts +35 -0
  232. package/types/src/statusBar/index.d.ts +4 -0
  233. package/types/src/studio/CommandsWrapper.d.ts +36 -0
  234. package/types/src/studio/DefaultLogo.d.ts +3 -0
  235. package/types/src/studio/EagerStudio.d.ts +5 -0
  236. package/types/src/studio/Studio.d.ts +26 -0
  237. package/types/src/studio/StudioCommandProvider.d.ts +26 -0
  238. package/types/src/studio/StudioCommands.d.ts +115 -0
  239. package/types/src/studio/StudioNotifierProvider.d.ts +10 -0
  240. package/types/src/studio/StudioProps.d.ts +372 -0
  241. package/types/src/studio/StudioSplitPane.d.ts +60 -0
  242. package/types/src/studio/StudioTaskPaneArea.d.ts +8 -0
  243. package/types/src/studio/StudioToolbar.d.ts +37 -0
  244. package/types/src/studio/index.d.ts +4 -0
  245. package/types/src/studio/useStudioApp.d.ts +51 -0
  246. package/types/src/table/TableDetailsPanel.d.ts +17 -0
  247. package/types/src/table/TableDetailsTaskPane.d.ts +3 -0
  248. package/types/src/table/TablePlugin.d.ts +2 -0
  249. package/types/src/table/TableStyleCanvasPreview.d.ts +21 -0
  250. package/types/src/table/TableStyleOptionsPanel.d.ts +38 -0
  251. package/types/src/table/TableStylePreview.d.ts +43 -0
  252. package/types/src/table/index.d.ts +7 -0
  253. package/types/src/theme/ThemeSelectButton.d.ts +23 -0
  254. package/types/src/theme/ThemeSelectPanel.d.ts +17 -0
  255. package/types/src/theme/ThemeSelectPopupButton.d.ts +24 -0
  256. package/types/src/theme/ThemeUtils.d.ts +57 -0
  257. package/types/src/theme/index.d.ts +5 -0
  258. package/types/src/toast/ToastError.d.ts +10 -0
  259. package/types/src/toast/index.d.ts +2 -0
  260. package/types/src/toolbar/WorkbookToolbars.d.ts +46 -0
  261. package/types/src/toolbar/index.d.ts +2 -0
  262. package/types/src/workbook/DefaultRenderers.d.ts +23 -0
  263. package/types/src/workbook/DocumentTitle.d.ts +69 -0
  264. package/types/src/workbook/WorkbookContextMenu.d.ts +13 -0
  265. package/types/src/workbook/WorkbookElement.d.ts +12 -0
  266. package/types/src/workbook/WorkbookStrip.d.ts +37 -0
  267. package/types/src/workbook/index.d.ts +7 -0
  268. package/browser/cjs/52tjAlO48FpZgfzG.cjs +0 -6
  269. package/browser/cjs/BGu2_YqVJMQjYx4D.cjs +0 -18
  270. package/browser/cjs/C83Rzj_Jwq-o69wr.cjs +0 -42
  271. package/browser/cjs/CldYLQnjFC_g8o3t.cjs +0 -6
  272. package/browser/cjs/Cpv3j_Ra1h-axLRG.cjs +0 -6
  273. package/browser/cjs/D-5Cg1Y0zALF_JEs.cjs +0 -7
  274. package/browser/cjs/D58sOTRZwQ59CgOf.cjs +0 -6
  275. package/browser/cjs/DEd-0xEuUoELRnQb.cjs +0 -6
  276. package/browser/cjs/DahKlfm68zudpndW.cjs +0 -20
  277. package/browser/cjs/Dd7t0gfO3bzS0-B8.cjs +0 -6
  278. package/browser/cjs/DxAU6DV3UCUDVoSH.cjs +0 -6
  279. package/browser/cjs/uj7GSwDaUyTKEjrN.cjs +0 -6
  280. package/browser/esm/BLuR1D2n--9QSJL9.mjs +0 -26
  281. package/browser/esm/BSOhdb74viwmCi54.mjs +0 -2159
  282. package/browser/esm/BTAhrEfV-DH0-Ldk.mjs +0 -640
  283. package/browser/esm/BgsyX5QL9OLy0DN3.mjs +0 -4533
  284. package/browser/esm/CFPGs5_tLGrpkW8L.mjs +0 -25
  285. package/browser/esm/CbCX3t0hx-h6pV7Q.mjs +0 -46
  286. package/browser/esm/D3dDP89ml0258MGb.mjs +0 -53
  287. package/browser/esm/DYk55y6IEOCytW3g.mjs +0 -50
  288. package/browser/esm/DfUqOxFfhJcaq847.mjs +0 -2411
  289. package/browser/esm/DhWeeZyxUc-LbP8E.mjs +0 -50
  290. package/browser/esm/DqLDLUCqiFovdBf0.mjs +0 -155
  291. package/browser/esm/Dvo0k3olgFuAso_O.mjs +0 -54
  292. package/node/assets/style.css +0 -1
  293. package/node/esm/BM_pvbGlgXydGNT3.mjs +0 -52
  294. package/node/esm/CFBcwLP2q2_EUXvE.mjs +0 -156
  295. package/node/esm/Cg9JFB8nOnVfR0Uo.mjs +0 -26
  296. package/node/esm/D3kxA1LpG-PpZvCb.mjs +0 -25
  297. package/node/esm/D_s6w_GWb8l7uGW3.mjs +0 -53
  298. package/node/esm/XI3nj4zD7mXOyxSm.mjs +0 -57
  299. package/node/esm/YXQgUYqP1qsi_MPX.mjs +0 -46
  300. package/node/esm/m2lejeU-ViEhFj_N.mjs +0 -91
  301. package/node/esm/sevERUPIPJCb-jYL.mjs +0 -88
  302. package/node/esm/zdjaq7yEfEvgHrDi.mjs +0 -50
@@ -0,0 +1,508 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.28-beta.1
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { t as e } from "./CKADOp3hTx0MSNY7.mjs";
8
+ import { ICell as t, IRange as n } from "@sheetxl/sdk";
9
+ import { CommandContext as r } from "@sheetxl/react";
10
+ import { DynamicIcon as i, KeyCodes as a, KeyModifiers as o, useCallbackRef as s, useTranslator as c } from "@sheetxl/utils-react";
11
+ import { memo as l, useEffect as u, useLayoutEffect as d, useMemo as f, useRef as p, useState as m } from "react";
12
+ import { ExhibitDivider as ee, ExhibitOptionButton as h, InternalWindow as te } from "@sheetxl/utils-mui";
13
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
14
+ import { Box as v, Collapse as y, DialogContent as ne, FormControl as b, InputAdornment as re, InputLabel as x, MenuItem as ie, Select as ae, TextField as oe } from "@mui/material";
15
+ var S = {
16
+ width: "1.5rem",
17
+ height: "1.5rem"
18
+ }, C = l((e) => {
19
+ let { label: t, value: n, options: r, onSelect: i, tabIndex: a = 0, ...o } = e, [c, l] = m(() => T(n, r));
20
+ u(() => {
21
+ l(T(n, r));
22
+ }, [n, r]);
23
+ let d = s((e) => {
24
+ let t = e.target.value;
25
+ l(t), i?.(r[t]);
26
+ }, [i, r]), p = f(() => Object.keys(r).map((e) => g(ie, {
27
+ value: e,
28
+ children: e
29
+ }, e)), [r]);
30
+ return _(b, {
31
+ sx: { minWidth: 135 },
32
+ size: "small",
33
+ children: [g(x, { children: t }), g(ae, {
34
+ inputProps: { tabIndex: a },
35
+ value: c,
36
+ label: t,
37
+ onChange: d,
38
+ ...o,
39
+ children: p
40
+ })]
41
+ });
42
+ }), w = {
43
+ enter: 140,
44
+ exit: 140
45
+ }, T = (e, t) => {
46
+ let n = Object.keys(t);
47
+ for (let r = 0; r < n.length; r++) {
48
+ let i = n[r];
49
+ if (t[i] === e) return i;
50
+ }
51
+ return "";
52
+ }, E = l((l) => {
53
+ let { initialValue: b, context: x, onInput: ie, title: ae, onHide: T, autoFocus: E, ...se } = l, D = c(), O = f(() => ({
54
+ [D("findReplace.fieldFormulas")]: t.Content.Formulas,
55
+ [D("findReplace.fieldValues")]: t.Content.Values,
56
+ [D("findReplace.fieldNotes")]: t.Content.Notes,
57
+ [D("findReplace.fieldComments")]: t.Content.Comments
58
+ }), [D]), ce = f(() => {
59
+ let e = { ...O };
60
+ return delete e[D("findReplace.fieldValues")], e;
61
+ }, [O, D]), le = f(() => ({
62
+ [D("findReplace.byRows")]: !0,
63
+ [D("findReplace.byColumns")]: !1
64
+ }), [D]), ue = f(() => ({
65
+ [D("findReplace.scopeWorkbook")]: r.FindScopeOptions.Workbook,
66
+ [D("findReplace.scopeSheet")]: r.FindScopeOptions.Sheet
67
+ }), [D]), k = b?.replace ?? !1, A = b?.findOptions, j = A?.text ?? null, M = b?.replaceOptions, N = b?.replaceText ?? null, P = x?.(), F = p(null), I = p(null), L = p(null), R = p(null), z = p(null), B = p(null), V = (e, t) => {
68
+ t && (t.start(e, { center: !1 }), setTimeout(() => t.stop(e), 180));
69
+ }, [H, U] = m(!1), [W, de] = m(!1), [G, K] = m(k), [q, J] = m(!1), [Y, X] = m(!1), [Z, Q] = m({
70
+ replaceText: null,
71
+ replace: k,
72
+ replaceOptions: null,
73
+ findOptions: {
74
+ text: null,
75
+ matchCase: !1,
76
+ matchEntireCell: !1,
77
+ useRegex: !1,
78
+ axis: n.Axis.Row,
79
+ fields: [t.Content.Formulas]
80
+ },
81
+ scope: r.FindScopeOptions.Sheet
82
+ }), $ = s(async (e, n, r, i) => {
83
+ if (!P) return;
84
+ let a = { ...Z };
85
+ a.replaceOptions = { ...a.replaceOptions }, a.findOptions = { ...a.findOptions }, a.replaceOptions.maxCount = r ? void 0 : 1, a.replace = n, n && Z.findOptions.fields?.[0] === t.Content.Values && (a.findOptions.fields = [t.Content.Formulas]), a.findOptions.reverse = !e;
86
+ let o = await P({
87
+ autoFocus: i,
88
+ ...a,
89
+ findOptions: {
90
+ ...a.findOptions,
91
+ text: a.findOptions.text ?? ""
92
+ }
93
+ });
94
+ J(o === 0);
95
+ }, [Z, P]);
96
+ u(() => {
97
+ J(!1);
98
+ }, [
99
+ Z,
100
+ W,
101
+ G
102
+ ]);
103
+ let fe = s((e, t) => {
104
+ if (e.keyCode === a.Enter) {
105
+ if (!Z.findOptions.text) return;
106
+ let n = !0, r = !1;
107
+ e.shiftKey && (n = !1), t ? (e.ctrlKey && e.altKey && (r = !0), V(e, r ? B.current : z.current)) : V(e, n ? R.current : L.current), $(n, t, r, !1);
108
+ }
109
+ }, [Z]), pe = p(null);
110
+ d(() => {
111
+ Q((e) => {
112
+ let n = { ...e };
113
+ n.findOptions.text = j && j.length > 0 ? j : e.findOptions.text ?? "", U(!0), N !== null && (n.replaceText = N ?? ""), A && (n.findOptions = {
114
+ ...n.findOptions,
115
+ ...A
116
+ }), n.replaceText ||= "", n.replaceOptions &&= { ...n.replaceOptions }, M && (n.replaceOptions = {
117
+ ...n.replaceOptions,
118
+ ...M
119
+ }), Z.findOptions.fields?.[0] || (Z.findOptions.fields = [t.Content.Formulas]);
120
+ let r = !(!k && !M && N === null);
121
+ return r && K(r), n;
122
+ }), Y || pe.current?.focus();
123
+ }, [
124
+ b,
125
+ k,
126
+ j,
127
+ N,
128
+ A,
129
+ M
130
+ ]), u(() => {
131
+ G ? (Z.findOptions.fields, t.Content.Values) : U(!0);
132
+ }, [G]), u(() => {
133
+ if (H && F.current && Z.findOptions.text === F.current.value) return F.current === document.activeElement || F.current.contains(document.activeElement) ? (F.current?.select(), void U(!1)) : void F.current.addEventListener("focus", () => {
134
+ F.current?.select(), U(!1);
135
+ }, { once: !0 });
136
+ }, [H, Z]);
137
+ let [me, { width: he }] = e();
138
+ return g(te, {
139
+ ref: pe,
140
+ title: ae ?? D(G ? "findReplace.titleFindReplace" : "findReplace.titleFind"),
141
+ initialPosition: { y: "35" },
142
+ autoFocusSel: ".input",
143
+ onHide: T,
144
+ onFocus: () => X(!0),
145
+ onBlur: () => {
146
+ X(!1), J(!1);
147
+ },
148
+ slotProps: { paper: { elevation: Y ? 3 : 1 } },
149
+ ...se,
150
+ children: _(ne, {
151
+ dividers: !0,
152
+ ref: me,
153
+ sx: {
154
+ display: "flex",
155
+ flexDirection: "column",
156
+ paddingLeft: (e) => e.spacing(1.5),
157
+ paddingRight: (e) => e.spacing(1.5)
158
+ },
159
+ onKeyDown: (e) => {
160
+ if (e.key === "h" && e.ctrlKey) K(!0), F.current?.contains(document.activeElement) && I.current?.focus();
161
+ else if (e.key === "f" && e.ctrlKey) F.current?.focus();
162
+ else if (e.key === "c" && e.altKey) Q((e) => {
163
+ let t = { ...e };
164
+ return t.findOptions.matchCase = !e.findOptions.matchCase, t;
165
+ });
166
+ else if (e.key === "e" && e.altKey) Q((e) => {
167
+ let t = { ...e };
168
+ return t.findOptions.matchEntireCell = !e.findOptions.matchEntireCell, t;
169
+ });
170
+ else {
171
+ if (e.key !== "r" || !e.altKey) return;
172
+ Q((e) => {
173
+ let t = { ...e };
174
+ return t.findOptions.useRegex = !e.findOptions.useRegex, t;
175
+ });
176
+ }
177
+ e.preventDefault();
178
+ },
179
+ children: [_(v, {
180
+ sx: {
181
+ display: "flex",
182
+ flexDirection: "row",
183
+ gap: (e) => e.spacing(1)
184
+ },
185
+ children: [_(v, {
186
+ sx: {
187
+ display: "flex",
188
+ flexDirection: "row",
189
+ alignItems: "start",
190
+ gap: (e) => e.spacing(.25),
191
+ paddingTop: "3px"
192
+ },
193
+ children: [g(h, {
194
+ selected: W,
195
+ onSelectToggle: (e) => {
196
+ de(e);
197
+ },
198
+ preventFocus: !0,
199
+ label: D("findReplace.toggleOptions"),
200
+ icon: g(i, { iconKey: "FindOptions" })
201
+ }), g(h, {
202
+ selected: G,
203
+ onSelectToggle: (e) => {
204
+ K(e);
205
+ },
206
+ preventFocus: !0,
207
+ label: D("findReplace.toggleReplace"),
208
+ icon: g(i, { iconKey: "FindReplaceToggle" }),
209
+ shortcut: {
210
+ key: G ? "F" : "H",
211
+ modifiers: [o.Ctrl]
212
+ }
213
+ })]
214
+ }), _(v, {
215
+ sx: {
216
+ display: "flex",
217
+ flexDirection: "column",
218
+ maxWidth: "100%",
219
+ boxSizing: "border-box"
220
+ },
221
+ children: [_(v, {
222
+ sx: {
223
+ display: "flex",
224
+ flexDirection: "row",
225
+ alignItems: "center"
226
+ },
227
+ children: [
228
+ g(oe, {
229
+ label: D("findReplace.find"),
230
+ slotProps: {
231
+ input: {
232
+ sx: {
233
+ paddingRight: (e) => e.spacing(1),
234
+ minWidth: he > 460 ? "20em" : void 0
235
+ },
236
+ endAdornment: g(re, {
237
+ position: "end",
238
+ children: _(v, {
239
+ sx: {
240
+ display: "flex",
241
+ alignItems: "center",
242
+ flexDirection: "row",
243
+ gap: "2px"
244
+ },
245
+ children: [
246
+ g(h, {
247
+ style: S,
248
+ selected: Z.findOptions.matchCase,
249
+ onBlur: () => {},
250
+ onSelectToggle: (e) => {
251
+ Q((t) => {
252
+ let n = { ...t };
253
+ return n.findOptions.matchCase = e, n;
254
+ });
255
+ },
256
+ label: D("findReplace.matchCase"),
257
+ shortcut: {
258
+ key: "C",
259
+ modifiers: [o.Alt]
260
+ },
261
+ icon: g(i, {
262
+ iconKey: "FindCaseSensitive",
263
+ size: "1rem"
264
+ })
265
+ }),
266
+ g(h, {
267
+ style: S,
268
+ selected: Z.findOptions.matchEntireCell,
269
+ onSelectToggle: (e) => {
270
+ Q((t) => {
271
+ let n = { ...t };
272
+ return n.findOptions.matchEntireCell = e, n;
273
+ });
274
+ },
275
+ label: D("findReplace.matchEntireCell"),
276
+ shortcut: {
277
+ key: "E",
278
+ modifiers: [o.Alt]
279
+ },
280
+ icon: g(i, {
281
+ iconKey: "FindWholeWord",
282
+ size: "1rem"
283
+ })
284
+ }),
285
+ g(h, {
286
+ style: S,
287
+ selected: Z.findOptions.useRegex,
288
+ onSelectToggle: (e) => {
289
+ Q((t) => {
290
+ let n = { ...t };
291
+ return n.findOptions.useRegex = e, n;
292
+ });
293
+ },
294
+ label: D("findReplace.useRegex"),
295
+ shortcut: {
296
+ key: "R",
297
+ modifiers: [o.Alt]
298
+ },
299
+ icon: g(i, {
300
+ iconKey: "FindRegEx",
301
+ size: "1rem"
302
+ })
303
+ })
304
+ ]
305
+ })
306
+ })
307
+ },
308
+ inputLabel: { shrink: !0 },
309
+ htmlInput: {
310
+ draggable: !1,
311
+ ref: F,
312
+ className: "input",
313
+ autoFocus: !0,
314
+ spellCheck: !1,
315
+ autoComplete: "off",
316
+ sx: {
317
+ paddingTop: (e) => e.spacing(1.25),
318
+ paddingBottom: (e) => e.spacing(.75)
319
+ }
320
+ }
321
+ },
322
+ sx: {
323
+ flex: "1 1 100%",
324
+ marginRight: (e) => e.spacing(1),
325
+ "& .MuiOutlinedInput-notchedOutline": { borderColor: (e) => q ? `${e.palette.error.main} !important` : void 0 },
326
+ "& .MuiInputLabel-outlined": { color: (e) => q ? `${e.palette.error.main} !important` : void 0 }
327
+ },
328
+ value: Z.findOptions.text ?? "",
329
+ onChange: (e) => {
330
+ Q((t) => {
331
+ let n = { ...t };
332
+ return n.findOptions.text = e.target.value, n;
333
+ });
334
+ },
335
+ onKeyDown: (e) => fe(e, !1),
336
+ onContextMenu: (e) => {
337
+ e.stopPropagation();
338
+ }
339
+ }),
340
+ g(h, {
341
+ selected: Z.findOptions.reverse,
342
+ onSelectToggle: (e) => {
343
+ $(!1, !1);
344
+ },
345
+ touchRippleRef: L,
346
+ label: "",
347
+ shortcut: {
348
+ key: "Enter",
349
+ modifiers: [o.Shift]
350
+ },
351
+ icon: g(i, { iconKey: Z.findOptions.axis === n.Axis.Column ? "ArrowUpward" : "ArrowBack" }),
352
+ disabled: !Z.findOptions.text
353
+ }),
354
+ g(h, {
355
+ selected: !Z.findOptions.reverse,
356
+ onSelectToggle: (e) => {
357
+ $(!0, !1);
358
+ },
359
+ touchRippleRef: R,
360
+ label: D("findReplace.nextMatch"),
361
+ shortcut: { key: "Enter" },
362
+ icon: g(i, { iconKey: Z.findOptions.axis === n.Axis.Column ? "ArrowDownward" : "ArrowForward" }),
363
+ disabled: !Z.findOptions.text
364
+ })
365
+ ]
366
+ }), g(y, {
367
+ in: G,
368
+ timeout: w,
369
+ onExit: () => {
370
+ F.current?.focus();
371
+ },
372
+ children: _(v, {
373
+ sx: {
374
+ display: "flex",
375
+ flexDirection: "row",
376
+ alignItems: "center",
377
+ marginTop: (e) => e.spacing(2)
378
+ },
379
+ children: [
380
+ g(oe, {
381
+ label: D("findReplace.replace"),
382
+ slotProps: {
383
+ input: { sx: { paddingRight: (e) => e.spacing(1) } },
384
+ inputLabel: { shrink: !0 },
385
+ htmlInput: {
386
+ ref: I,
387
+ className: "input",
388
+ spellCheck: !1,
389
+ autoComplete: "off",
390
+ sx: {
391
+ paddingTop: (e) => e.spacing(1.25),
392
+ paddingBottom: (e) => e.spacing(.75)
393
+ }
394
+ }
395
+ },
396
+ sx: {
397
+ flex: "1 1 100%",
398
+ marginRight: (e) => e.spacing(1)
399
+ },
400
+ value: Z.replaceText ?? "",
401
+ onChange: (e) => {
402
+ Q((t) => {
403
+ let n = { ...t };
404
+ return n.replaceText = e.target.value, n;
405
+ });
406
+ },
407
+ onKeyDown: (e) => fe(e, !0),
408
+ onContextMenu: (e) => {
409
+ e.stopPropagation();
410
+ }
411
+ }),
412
+ g(h, {
413
+ onSelectToggle: (e) => {
414
+ $(!0, !0);
415
+ },
416
+ touchRippleRef: z,
417
+ label: D("findReplace.replace"),
418
+ shortcut: { key: "Enter" },
419
+ icon: g(i, { iconKey: "FindReplace" }),
420
+ disabled: !Z.findOptions.text
421
+ }),
422
+ g(h, {
423
+ onSelectToggle: (e) => {
424
+ $(!0, !0, !0);
425
+ },
426
+ touchRippleRef: B,
427
+ label: D("findReplace.replaceAll"),
428
+ shortcut: {
429
+ key: "Enter",
430
+ modifiers: [o.Ctrl, o.Alt]
431
+ },
432
+ icon: g(i, { iconKey: "FindReplaceAll" }),
433
+ disabled: !Z.findOptions.text
434
+ })
435
+ ]
436
+ })
437
+ })]
438
+ })]
439
+ }), g(y, {
440
+ in: W,
441
+ timeout: w,
442
+ onExit: () => {
443
+ F.current?.focus();
444
+ },
445
+ children: _(v, {
446
+ sx: {
447
+ minHeight: "10px",
448
+ flex: "1 1 100%",
449
+ display: "flex",
450
+ flexDirection: "column",
451
+ gap: (e) => e.spacing(1.5),
452
+ marginTop: (e) => e.spacing(1)
453
+ },
454
+ children: [g(ee, {
455
+ orientation: "horizontal",
456
+ sx: { marginBottom: (e) => e.spacing(1.5) }
457
+ }), _(v, {
458
+ sx: {
459
+ display: "flex",
460
+ flexDirection: he >= 383 ? "row" : "column",
461
+ justifyContent: "space-evenly",
462
+ alignItems: "center",
463
+ gap: (e) => e.spacing(1),
464
+ rowGap: (e) => e.spacing(2)
465
+ },
466
+ tabIndex: -1,
467
+ children: [
468
+ g(C, {
469
+ label: D("findReplace.within"),
470
+ value: Z.scope,
471
+ options: ue,
472
+ onSelect: (e) => {
473
+ Q((t) => {
474
+ let n = { ...t };
475
+ return n.scope = e, n;
476
+ });
477
+ }
478
+ }),
479
+ g(C, {
480
+ label: D("findReplace.searchOrder"),
481
+ value: Z.findOptions.axis !== n.Axis.Column,
482
+ options: le,
483
+ onSelect: (e) => {
484
+ Q((t) => {
485
+ let r = { ...t };
486
+ return r.findOptions.axis = e ? n.Axis.Row : n.Axis.Column, r;
487
+ });
488
+ }
489
+ }),
490
+ g(C, {
491
+ label: D("findReplace.lookIn"),
492
+ value: G && Z.findOptions.fields?.[0] === t.Content.Values ? t.Content.Formulas : Z.findOptions.fields?.[0],
493
+ options: G ? ce : O,
494
+ onSelect: (e) => {
495
+ Q((t) => {
496
+ let n = { ...t };
497
+ return n.findOptions.fields = [e], n;
498
+ });
499
+ }
500
+ })
501
+ ]
502
+ })]
503
+ })
504
+ })]
505
+ })
506
+ });
507
+ });
508
+ export { E as FindReplaceWindow, E as default };