@sheetxl/studio-mui 0.7.28-beta.4 → 0.8.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/browser/cjs/3k_KqDFr-AybPztc.cjs +5 -0
  2. package/browser/cjs/{zQsyZpeXAvcVXJMs.cjs → 3uprnzi2l0iT17Dg.cjs} +1 -1
  3. package/browser/cjs/B9GcCj7sj8XdjPZF.cjs +1 -0
  4. package/browser/cjs/{CJLwX_A3y3TQUmzj.cjs → BGvoJjUs21bbuE1i.cjs} +1 -1
  5. package/browser/cjs/{CYxc8vnRi8dNpDPk.cjs → BHb7TnK1NmimV4OX.cjs} +1 -1
  6. package/browser/cjs/BJ-wdkCaXqJaejKf.cjs +1 -0
  7. package/browser/cjs/BNqyPYRxYISp-uEg.cjs +1 -0
  8. package/browser/cjs/BXkdjAb4jpTr412c.cjs +1 -0
  9. package/browser/cjs/Bc-YisjBtD56vBAW.cjs +1 -0
  10. package/browser/cjs/CuqM721PsKey3yMP.cjs +1 -0
  11. package/browser/cjs/Cy_XmYq6BsWmCXkk.cjs +3 -0
  12. package/browser/cjs/D948H7ell-f87BX3.cjs +1 -0
  13. package/browser/cjs/Dy6O3OWbDBKIj_Ak.cjs +8 -0
  14. package/browser/cjs/M0_dvdYwhikqP9kg.cjs +2 -0
  15. package/browser/cjs/QI6GKw7uo1f8gY8C.cjs +1 -0
  16. package/browser/cjs/eCw4rAEIYE3BftpG.cjs +1 -0
  17. package/browser/cjs/index.cjs +2 -2
  18. package/browser/cjs/rCZbExyf1Q3aHloQ.cjs +13 -0
  19. package/browser/esm/{CZGRaL9mjYTo8fAd.mjs → 894KM-_Oc5cB6ExA.mjs} +8 -16
  20. package/browser/esm/B1YOQZHyO_dmHUN4.mjs +293 -0
  21. package/browser/esm/BQSamOMBAoFdQdJe.mjs +12903 -0
  22. package/browser/esm/{CDyYtk9WscSzj5I5.mjs → BlZiWp3SB3wH5O38.mjs} +130 -103
  23. package/browser/esm/{C7WFuxTBA8MWoOQj.mjs → Bo74PCF42KVYJF0j.mjs} +3 -3
  24. package/browser/esm/{CVxEcB8lAnOQ-oPh.mjs → C2Eke_9Dj_m6mtMj.mjs} +2 -2
  25. package/browser/esm/C5-J1xiO3O1-qaaP.mjs +268 -0
  26. package/browser/esm/CIbDvsCeLOFHzzId.mjs +152 -0
  27. package/browser/esm/CNLLwRPWnd4PJgPO.mjs +117 -0
  28. package/browser/esm/{DhMl3LbgjdX8Nz7b.mjs → CppDmJ4ckCH3alQf.mjs} +113 -111
  29. package/browser/esm/{DbHn3Fq4gYggsoXV.mjs → CyHNVjgkMYZYlJpY.mjs} +2100 -2214
  30. package/browser/esm/{GCJRjX28QYfxi-Lg.mjs → D7fA9EyCNSzQMgxg.mjs} +1 -1
  31. package/browser/esm/D8VPmFDvXDE778_x.mjs +222 -0
  32. package/browser/esm/{DoOWIBDSfgrvMmNO.mjs → DE7MVTTfExTzvyMW.mjs} +569 -540
  33. package/browser/esm/DEEnXLhYlUARg6MU.mjs +410 -0
  34. package/browser/esm/{Drbpg4A9TaJUZd5A.mjs → DIGlcemS7napWyKW.mjs} +1 -1
  35. package/browser/esm/{6GrWBX-cyxTRJerw.mjs → DN4cwAPYCrtR4gS9.mjs} +3 -3
  36. package/browser/esm/{BVC0iuc28yuEcyua.mjs → DSGFnb1gYyL22p0t.mjs} +1 -1
  37. package/browser/esm/DlEshYp6NPfHxFvI.mjs +115 -0
  38. package/browser/esm/{RbGJTMzxMTlkFlTq.mjs → Dv3hSCyjvwo6GcH1.mjs} +195 -174
  39. package/browser/esm/{l5BsxVQszkPy_n34.mjs → GmQ9XFFY3hi1L_Ej.mjs} +1 -1
  40. package/browser/esm/{CccE_2DTbTMNIfQM.mjs → _v6Wbw_y3QgJy3qY.mjs} +1 -1
  41. package/browser/esm/{BLjxQ1NUjmULb00s.mjs → iM5uEM9H4e8HGt5y.mjs} +2 -2
  42. package/browser/esm/index.mjs +466 -135
  43. package/browser/esm/{DdbgnOWM0tle1jeT.mjs → xGJU5xUJx3HF317Q.mjs} +2 -2
  44. package/browser/esm/{C5XQW-A03GP8EZ3s.mjs → z3zkU7Jf3WJ2_Z_P.mjs} +1 -1
  45. package/licenses/dependencies.txt +73 -73
  46. package/node/esm/{CbhFnQCOA5TjhFB1.mjs → BI8XFczUY--Db2n3.mjs} +32 -40
  47. package/node/esm/{-9Hcp_VKJtR9fWlC.mjs → BJi0FlhIqCMEwROu.mjs} +143 -141
  48. package/node/esm/{BxTFDoMd-nowfxfb.mjs → BMoRatciTqOi1HkT.mjs} +1 -1
  49. package/node/esm/BgxeTfCn3jZHGwd7.mjs +414 -0
  50. package/node/esm/{DYlYrd0A73WoQQgM.mjs → BoDCV8cDmFVAYtaW.mjs} +1 -1
  51. package/node/esm/C0M1VbsIRuRauUI-.mjs +268 -0
  52. package/node/esm/{C2HawKeialuFRR9r.mjs → CCWQ116Z67Kz78Uo.mjs} +1 -1
  53. package/node/esm/C_oV7ldFStOF_fAd.mjs +115 -0
  54. package/node/esm/DAji2BXelmIUxioS.mjs +116 -0
  55. package/node/esm/{6PuhMTJrzLciGI0Z.mjs → DN-bhyNbuBbNB0Ky.mjs} +2 -2
  56. package/node/esm/{ELTc6e1FF88hBAev.mjs → DVaQ6xIbKQgBk0uw.mjs} +1 -1
  57. package/node/esm/{uJOy7zjNtP0IqGoa.mjs → DVshSSmP5QZU7GoY.mjs} +163 -135
  58. package/node/esm/{CgA8rdWVZEpIUpsM.mjs → Dbv0IltYad9SQrj3.mjs} +1 -1
  59. package/node/esm/{DPhvWXmDun8bC0_v.mjs → DvMAUBSQsZmIsRxi.mjs} +1 -1
  60. package/node/esm/OmUP1AfaJcOxWQAg.mjs +4462 -0
  61. package/node/esm/cJDXopFIX6f3_oi3.mjs +294 -0
  62. package/node/esm/index.mjs +7716 -4114
  63. package/package.json +9 -9
  64. package/resources/locales/de/groups.cmd.json +24 -6
  65. package/resources/locales/de/studio.cmd.json +18 -1
  66. package/resources/locales/de/ui.msg.json +251 -30
  67. package/resources/locales/en/groups.cmd.json +24 -6
  68. package/resources/locales/en/studio.cmd.json +18 -1
  69. package/resources/locales/en/ui.msg.json +202 -30
  70. package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +11 -1
  71. package/types/src/anchorItems/AnchorItemsPanel.d.ts +14 -0
  72. package/types/src/anchorItems/AnchoredRangeField.d.ts +40 -0
  73. package/types/src/anchorItems/index.d.ts +1 -0
  74. package/types/src/border/BorderPopupButton.d.ts +6 -6
  75. package/types/src/border/BorderStylePopupButton.d.ts +3 -3
  76. package/types/src/border/BorderTemplateIcon.d.ts +24 -0
  77. package/types/src/border/index.d.ts +1 -0
  78. package/types/src/color/ColorPanel.d.ts +8 -2
  79. package/types/src/color/ColorPopupButton.d.ts +2 -1
  80. package/types/src/command/NumberFormatQuickButtons.d.ts +32 -0
  81. package/types/src/conditions/BetweenOption.d.ts +1 -1
  82. package/types/src/conditions/ConditionEditor.d.ts +6 -1
  83. package/types/src/conditions/ConditionUtils.d.ts +31 -0
  84. package/types/src/conditions/DateTimeOption.d.ts +4 -4
  85. package/types/src/conditions/ExpressionOption.d.ts +6 -6
  86. package/types/src/conditions/ListSourceOption.d.ts +31 -0
  87. package/types/src/conditions/ScalarOption.d.ts +6 -6
  88. package/types/src/conditions/index.d.ts +1 -1
  89. package/types/src/conditions/useFormulaOption.d.ts +54 -0
  90. package/types/src/dataValidation/DataValidationDetailsPanel.d.ts +7 -1
  91. package/types/src/dataValidation/DataValidationDetailsTaskPane.d.ts +3 -2
  92. package/types/src/dataValidation/DataValidationEditorPanel.d.ts +9 -2
  93. package/types/src/dataValidation/DataValidationIcon.d.ts +22 -0
  94. package/types/src/dataValidation/DataValidationTitle.d.ts +13 -0
  95. package/types/src/dialog/FillSeriesDialog.d.ts +16 -0
  96. package/types/src/dialog/TableNewDialog.d.ts +1 -4
  97. package/types/src/dialog/index.d.ts +0 -1
  98. package/types/src/externalLink/ExternalLinkCardBody.d.ts +9 -0
  99. package/types/src/externalLink/ExternalLinkChip.d.ts +18 -0
  100. package/types/src/externalLink/ExternalLinkLocation.d.ts +18 -0
  101. package/types/src/externalLink/ExternalLinkSettingsTab.d.ts +18 -0
  102. package/types/src/externalLink/ExternalLinksPanel.d.ts +11 -0
  103. package/types/src/externalLink/ExternalLinksPlugin.d.ts +5 -0
  104. package/types/src/externalLink/ExternalLinksTaskPane.d.ts +19 -0
  105. package/types/src/externalLink/index.d.ts +8 -0
  106. package/types/src/fill/GradientEditor.d.ts +39 -0
  107. package/types/src/fill/PatternPopupButton.d.ts +26 -0
  108. package/types/src/fill/PatternSwatch.d.ts +53 -0
  109. package/types/src/fill/index.d.ts +4 -0
  110. package/types/src/filter/FilterList.d.ts +9 -6
  111. package/types/src/form/FormulaField.d.ts +25 -2
  112. package/types/src/form/InputField.d.ts +30 -0
  113. package/types/src/format/AlignmentPanel.d.ts +14 -0
  114. package/types/src/format/BorderPanel.d.ts +22 -0
  115. package/types/src/format/BorderPreview.d.ts +84 -0
  116. package/types/src/format/FillPanel.d.ts +25 -0
  117. package/types/src/format/FontPanel.d.ts +12 -0
  118. package/types/src/format/FormatCellPreview.d.ts +35 -0
  119. package/types/src/format/FormatPanelParts.d.ts +83 -0
  120. package/types/src/format/FormatPlugin.d.ts +11 -0
  121. package/types/src/format/FormatTaskPane.d.ts +39 -0
  122. package/types/src/format/NumberFormatOption.d.ts +43 -0
  123. package/types/src/{numberFormat → format}/NumberFormatPanel.d.ts +20 -0
  124. package/types/src/format/index.d.ts +13 -0
  125. package/types/src/format/useFormatSelection.d.ts +92 -0
  126. package/types/src/index.d.ts +3 -1
  127. package/types/src/itemsPanel/EditorPanel.d.ts +5 -1
  128. package/types/src/itemsPanel/ItemCard.d.ts +10 -1
  129. package/types/src/itemsPanel/ItemsDescriptor.d.ts +55 -19
  130. package/types/src/itemsPanel/ItemsPanel.d.ts +9 -0
  131. package/types/src/named/NamedDetailsPanel.d.ts +9 -2
  132. package/types/src/named/NamedDetailsTaskPane.d.ts +3 -2
  133. package/types/src/named/NamedEditorPanel.d.ts +1 -1
  134. package/types/src/named/NamedExpressionField.d.ts +32 -0
  135. package/types/src/named/NamedKindChip.d.ts +38 -0
  136. package/types/src/protectedRange/ProtectedRangeDetailsPanel.d.ts +6 -0
  137. package/types/src/protectedRange/ProtectedRangeDraft.d.ts +22 -0
  138. package/types/src/protectedRange/ProtectedRangeEditorPanel.d.ts +0 -14
  139. package/types/src/protectedRange/index.d.ts +2 -1
  140. package/types/src/protection/ManageProtectionTaskPane.d.ts +29 -0
  141. package/types/src/protection/PasswordDialog.d.ts +32 -0
  142. package/types/src/protection/PasswordField.d.ts +35 -0
  143. package/types/src/protection/ProtectedCellsPanel.d.ts +20 -0
  144. package/types/src/protection/ProtectionPlugin.d.ts +11 -0
  145. package/types/src/protection/SheetProtectionPanel.d.ts +35 -0
  146. package/types/src/protection/WorkbookProtectionPanel.d.ts +34 -15
  147. package/types/src/protection/WorkbookProtectionTab.d.ts +22 -0
  148. package/types/src/protection/index.d.ts +7 -1
  149. package/types/src/studio/CommandsWrapper.d.ts +3 -0
  150. package/types/src/studio/EagerStudio.d.ts +14 -1
  151. package/types/src/studio/StudioCommandProvider.d.ts +3 -0
  152. package/types/src/studio/StudioCommands.d.ts +38 -2
  153. package/types/src/studio/StudioProps.d.ts +41 -0
  154. package/types/src/studio/splitStudioProps.d.ts +7 -0
  155. package/types/src/studio/useStudioApp.d.ts +20 -1
  156. package/types/src/template/TemplateCommands.d.ts +29 -0
  157. package/types/src/template/TemplateDialog.d.ts +19 -0
  158. package/types/src/template/TemplatePanel.d.ts +50 -0
  159. package/types/src/template/TemplateSearchField.d.ts +13 -0
  160. package/types/src/template/WelcomeDialog.d.ts +29 -0
  161. package/types/src/template/index.d.ts +3 -0
  162. package/types/src/template/useTemplateCatalog.d.ts +69 -0
  163. package/types/src/workbook/DefaultRenderers.d.ts +2 -0
  164. package/types/src/workbook/FillMenu.d.ts +21 -0
  165. package/types/src/workbook/index.d.ts +1 -0
  166. package/browser/cjs/B_D3JKseVvpRyX-E.cjs +0 -1
  167. package/browser/cjs/BeKpqOx8It0RD0Rf.cjs +0 -2
  168. package/browser/cjs/Bj-EvSYeDfqmU0V6.cjs +0 -2
  169. package/browser/cjs/Bte6P3MhSjajJmmY.cjs +0 -7
  170. package/browser/cjs/CZm1jVZaHQ246prW.cjs +0 -1
  171. package/browser/cjs/Cm1APq2MraYNNhyI.cjs +0 -1
  172. package/browser/cjs/DO8V31Z1ewgMA1di.cjs +0 -5
  173. package/browser/cjs/Djsiad0Qha1Y-YaS.cjs +0 -1
  174. package/browser/cjs/IASAYG6qgv7lJY7y.cjs +0 -1
  175. package/browser/cjs/UnMhi28mbvLiOXQe.cjs +0 -1
  176. package/browser/cjs/Vbigo0kFP3PFfmeA.cjs +0 -1
  177. package/browser/cjs/w2GjebPlOFv3pCbm.cjs +0 -1
  178. package/browser/cjs/z0rB4fK6X1M6PpVD.cjs +0 -11
  179. package/browser/esm/6seXVm4fUaBp34tP.mjs +0 -217
  180. package/browser/esm/C1PiodbCgkhztxU5.mjs +0 -411
  181. package/browser/esm/DTWkitCkayiinpgU.mjs +0 -219
  182. package/browser/esm/DxBsD4nDbg_OWhYG.mjs +0 -47
  183. package/browser/esm/HZXAXZqrC43FBvGk.mjs +0 -82
  184. package/browser/esm/dgkVCh7lmm1Twqmo.mjs +0 -9257
  185. package/node/esm/B-3Ypi8akR-GxIpw.mjs +0 -82
  186. package/node/esm/CxqL51jVpIL4ncWW.mjs +0 -47
  187. package/node/esm/D-x3LVzppkKf5be_.mjs +0 -4575
  188. package/types/src/conditionalFormat/ConditionalFormatRangeField.d.ts +0 -32
  189. package/types/src/conditions/InSetOption.d.ts +0 -37
  190. package/types/src/dialog/NumberFormatDialog.d.ts +0 -12
  191. package/types/src/numberFormat/NumberFormatTaskPane.d.ts +0 -12
  192. package/types/src/numberFormat/index.d.ts +0 -8
  193. package/types/src/protectedRange/ProtectedRangeDetailsTaskPane.d.ts +0 -3
  194. package/types/src/protectedRange/ProtectedRangePlugin.d.ts +0 -2
  195. package/types/src/protection/WorkbookProtectionDialog.d.ts +0 -23
@@ -1,112 +1,115 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.28-beta.4
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.2
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { n as e, t } from "./6seXVm4fUaBp34tP.mjs";
8
- import { FunctionArgIcons as n, FunctionPreviewContent as r, FunctionSignature as i, argTypeKey as a, assembleCall as o, createFunctionDescriptor as s, createFunctionHint as c, formatEvalValue as l, toArgRows as u, useWorkbook as d } from "@sheetxl/react";
9
- import { DynamicIcon as f, KeyCodes as p, useCallbackRef as m, useTranslator as h } from "@sheetxl/utils-react";
10
- import { memo as g, useEffect as _, useId as v, useMemo as y, useRef as b, useState as x } from "react";
11
- import { ExhibitIconButton as ee } from "@sheetxl/utils-mui";
7
+ import { n as e, t } from "./D8VPmFDvXDE778_x.mjs";
8
+ import { FunctionArgIcons as n, FunctionPreviewContent as r, FunctionSignature as i, NamedItemLabel as a, argTypeKey as o, assembleCall as s, createFunctionDescriptor as c, createFunctionHint as l, formatEvalValue as u, toArgRows as d, useWorkbook as f } from "@sheetxl/react";
9
+ import { DynamicIcon as p, KeyCodes as m, useCallbackRef as h, useTranslator as ee } from "@sheetxl/utils-react";
10
+ import { memo as g, useEffect as _, useId as te, useMemo as v, useRef as y, useState as b } from "react";
11
+ import { ExhibitIconButton as x } from "@sheetxl/utils-mui";
12
12
  import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
13
- import { Box as T, InputAdornment as E, MenuItem as D, TextField as O, Typography as te } from "@mui/material";
14
- var k = g((e) => {
15
- let { context: t, selected: n, onChangeSelected: a, onActivate: o, autoFocus: l = !1, className: u } = e, g = h(), k = d(), [A, j] = x([]), [M, N] = x("*"), [P, F] = x(""), [I, L] = x(""), [R, z] = x([]), [B, V] = x(null), H = (U = M) === "*" ? void 0 : U;
16
- var U;
17
- let W = b(null), G = b(null), K = v(), q = (e) => `${K}${e}`;
13
+ import { Box as T, InputAdornment as E, MenuItem as D, TextField as O, Typography as k } from "@mui/material";
14
+ import { DOMUtils as ne } from "@sheetxl/utils";
15
+ var A = g((e) => {
16
+ let { context: t, selected: n, onChangeSelected: o, onActivate: s, autoFocus: u = !1, className: d } = e, g = ee(), A = f(), [j, M] = b([]), [N, P] = b("*"), [F, I] = b(""), [L, R] = b(""), [z, B] = b([]), [V, H] = b(null), U = (W = N) === "*" ? void 0 : W;
17
+ var W;
18
+ let G = y(null), K = y(null), q = te(), J = (e) => `${q}${e}`;
18
19
  _(() => {
19
- let e = setTimeout(() => L(P.trim()), 150);
20
+ let e = setTimeout(() => R(F.trim()), 150);
20
21
  return () => clearTimeout(e);
21
- }, [P]), _(() => {
22
- l && G.current?.focus();
23
- }, [l]), _(() => {
22
+ }, [F]), _(() => {
23
+ u && K.current?.focus();
24
+ }, [u]), _(() => {
24
25
  let e = !1;
25
26
  return (async () => {
26
27
  let n = await t?.()?.getCategories() ?? [];
27
- e || j(n);
28
+ e || M(n);
28
29
  })(), () => {
29
30
  e = !0;
30
31
  };
31
32
  }, [t]);
32
- let J = m(a, [a]);
33
+ let Y = h(o, [o]);
33
34
  _(() => {
34
35
  let e = !1;
35
36
  return (async () => {
36
37
  let n = t?.();
37
38
  if (!n) return;
38
- let r = I ? await n.searchByText(I, {
39
- category: H,
39
+ let r = L ? await n.searchByText(L, {
40
+ category: U,
40
41
  limit: 100
41
- }) : await n.searchByCategory(H);
42
- e || (z(r), J(r[0] ?? null));
42
+ }) : await n.searchByCategory(U);
43
+ e || (B(r), Y(r[0] ?? null));
43
44
  })(), () => {
44
45
  e = !0;
45
46
  };
46
47
  }, [
47
48
  t,
48
- H,
49
- I,
50
- J
49
+ U,
50
+ L,
51
+ Y
51
52
  ]), _(() => {
52
- if (!n) return void V(null);
53
+ if (!n) return void H(null);
53
54
  let e = !1, t = n.getName();
54
55
  return n.getDescriptor().then((n) => {
55
- e || V(s(t, n));
56
+ e || H(c(t, n));
56
57
  }).catch(() => {
57
- e || V(null);
58
+ e || H(null);
58
59
  }), () => {
59
60
  e = !0;
60
61
  };
61
62
  }, [n]);
62
- let Y = y(() => n ? c(n, { locale: k?.getLocale() }) : null, [n, k]), X = m((e) => {
63
- R.length !== 0 && J(R[Math.min(R.length - 1, Math.max(0, e))]);
64
- }, [R, J]), Z = m((e) => {
65
- let t = n ? R.indexOf(n) : -1;
66
- X(t + e);
63
+ let X = n && V?.name === n.getName() ? V.summary : null, Z = v(() => n ? l(n, { locale: A?.getLocale() }) : null, [n, A]), Q = h((e) => {
64
+ z.length !== 0 && Y(z[Math.min(z.length - 1, Math.max(0, e))]);
65
+ }, [z, Y]), $ = h((e) => {
66
+ let t = n ? z.indexOf(n) : -1;
67
+ Q(t + e);
67
68
  }, [
68
- R,
69
+ z,
69
70
  n,
70
- X
71
- ]), Q = m((e) => {
71
+ Q
72
+ ]), re = h((e) => {
72
73
  if (e.isDefaultPrevented()) return;
73
- let t = W.current?.contains(e.target) ?? !1;
74
+ let t = G.current?.contains(e.target) ?? !1;
74
75
  switch (e.keyCode) {
75
- case p.Down:
76
- Z(1);
76
+ case m.Down:
77
+ $(1);
77
78
  break;
78
- case p.Up:
79
- Z(-1);
79
+ case m.Up:
80
+ $(-1);
80
81
  break;
81
- case p.PageDown:
82
- Z(10);
82
+ case m.PageDown:
83
+ $(10);
83
84
  break;
84
- case p.PageUp:
85
- Z(-10);
85
+ case m.PageUp:
86
+ $(-10);
86
87
  break;
87
- case p.Home:
88
+ case m.Home:
88
89
  if (!t) return;
89
- X(0);
90
+ Q(0);
90
91
  break;
91
- case p.End:
92
+ case m.End:
92
93
  if (!t) return;
93
- X(R.length - 1);
94
+ Q(z.length - 1);
94
95
  break;
95
96
  default: return;
96
97
  }
97
98
  e.preventDefault();
98
99
  }, [
99
- Z,
100
- X,
101
- R
100
+ $,
101
+ Q,
102
+ z
102
103
  ]);
103
104
  _(() => {
104
- n && (W.current?.querySelector("[data-selected=\"true\"]"))?.scrollIntoView?.({ block: "nearest" });
105
+ if (!n) return;
106
+ let e = G.current, t = e?.querySelector("[data-selected=\"true\"]");
107
+ e && t && ne.scrollIntoContainer(e, t);
105
108
  }, [n]);
106
- let $ = y(() => R.map((e) => {
109
+ let ie = v(() => z.map((e) => {
107
110
  let t = e.getName(), r = e === n;
108
111
  return C(T, {
109
- id: q(t),
112
+ id: J(t),
110
113
  component: "div",
111
114
  role: "option",
112
115
  "aria-selected": r,
@@ -114,29 +117,38 @@ var k = g((e) => {
114
117
  onMouseDown: (e) => {
115
118
  e.button === 0 && e.preventDefault();
116
119
  },
117
- onClick: () => J(e),
120
+ onClick: () => Y(e),
118
121
  onDoubleClick: () => {
119
- o?.();
122
+ s?.();
120
123
  },
121
124
  sx: {
122
- padding: "3px 8px",
125
+ paddingBlock: "1px",
123
126
  cursor: "default",
124
- whiteSpace: "nowrap",
125
- fontFamily: "var(--sxl-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)",
127
+ fontSize: "0.8rem",
128
+ fontFamily: (e) => e.typography.fontFamily,
129
+ "& .named-item-name": { fontFamily: "var(--sxl-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)" },
126
130
  backgroundColor: r ? "action.selected" : void 0,
127
131
  "&:hover": { backgroundColor: r ? "action.selected" : "action.hover" }
128
132
  },
129
- children: t
133
+ children: C(a, {
134
+ item: {
135
+ name: t,
136
+ kind: e.isLambda() ? "lambda" : "function"
137
+ },
138
+ summary: r ? X : null,
139
+ wrapSummary: !0
140
+ })
130
141
  }, t);
131
142
  }), [
132
- R,
143
+ z,
133
144
  n,
134
- J,
135
- o
145
+ X,
146
+ Y,
147
+ s
136
148
  ]);
137
149
  return w(T, {
138
- className: u,
139
- onKeyDown: Q,
150
+ className: d,
151
+ onKeyDown: re,
140
152
  sx: {
141
153
  height: "415px",
142
154
  flex: "1 1 auto",
@@ -152,26 +164,26 @@ var k = g((e) => {
152
164
  size: "small",
153
165
  fullWidth: !0,
154
166
  label: g("insertFunction.searchLabel"),
155
- value: P,
156
- inputRef: G,
157
- onChange: (e) => F(e.target.value),
167
+ value: F,
168
+ inputRef: K,
169
+ onChange: (e) => I(e.target.value),
158
170
  sx: { flexShrink: 0 },
159
171
  slotProps: {
160
172
  input: {
161
173
  startAdornment: C(E, {
162
174
  position: "start",
163
- children: C(f, { iconKey: "Find" })
175
+ children: C(p, { iconKey: "Find" })
164
176
  }),
165
- endAdornment: P ? C(E, {
177
+ endAdornment: F ? C(E, {
166
178
  position: "end",
167
- children: C(ee, {
179
+ children: C(x, {
168
180
  "aria-label": g("insertFunction.clearSearch"),
169
181
  propsTooltip: { label: g("insertFunction.clearSearch") },
170
182
  onMouseDown: (e) => {
171
183
  e.button === 0 && e.preventDefault();
172
184
  },
173
- onClick: () => F(""),
174
- icon: C(f, { iconKey: "Close" }),
185
+ onClick: () => I(""),
186
+ icon: C(p, { iconKey: "Close" }),
175
187
  size: "small"
176
188
  })
177
189
  }) : void 0
@@ -188,32 +200,33 @@ var k = g((e) => {
188
200
  size: "small",
189
201
  fullWidth: !0,
190
202
  label: g("insertFunction.categoryLabel"),
191
- value: M,
192
- onChange: (e) => N(e.target.value),
203
+ value: N,
204
+ onChange: (e) => P(e.target.value),
193
205
  slotProps: { inputLabel: { shrink: !0 } },
194
206
  sx: { flexShrink: 0 },
195
207
  children: [C(D, {
196
208
  value: "*",
197
209
  children: g("insertFunction.categoryAll")
198
- }), A.map((e) => C(D, {
210
+ }), j.map((e) => C(D, {
199
211
  value: e.name,
200
212
  children: e.name
201
213
  }, e.name))]
202
214
  }),
203
215
  C(T, {
204
- ref: W,
216
+ ref: G,
205
217
  role: "listbox",
206
218
  className: "function-list",
207
219
  "aria-label": g("insertFunction.listLabel"),
208
220
  tabIndex: 0,
209
- "aria-activedescendant": n ? q(n.getName()) : void 0,
221
+ "aria-activedescendant": n ? J(n.getName()) : void 0,
210
222
  onFocus: () => {
211
- n || X(0);
223
+ n || Q(0);
212
224
  },
213
225
  sx: {
214
226
  flex: "1 1 0",
215
227
  minHeight: "80px",
216
228
  overflowY: "auto",
229
+ position: "relative",
217
230
  border: "1px solid",
218
231
  borderColor: "divider",
219
232
  borderRadius: "4px",
@@ -227,7 +240,7 @@ var k = g((e) => {
227
240
  boxShadow: (e) => `inset 2px 0 0 ${e.palette.primary.main}`
228
241
  }
229
242
  },
230
- children: $.length > 0 ? $ : C(te, {
243
+ children: ie.length > 0 ? ie : C(k, {
231
244
  sx: {
232
245
  padding: "8px",
233
246
  color: "text.secondary",
@@ -245,113 +258,116 @@ var k = g((e) => {
245
258
  fontSize: "0.8rem",
246
259
  lineHeight: "16px"
247
260
  },
248
- children: Y ? w(S, { children: [C(T, {
261
+ children: Z ? w(S, { children: [C(T, {
249
262
  sx: { padding: "0 10px" },
250
263
  children: C(i, {
251
- hint: Y,
264
+ hint: Z,
252
265
  wrap: !0
253
266
  })
254
267
  }), C(r, {
255
- hint: Y,
256
- descriptor: B,
268
+ hint: Z,
269
+ descriptor: V,
257
270
  showParameters: !1
258
271
  })] }) : null
259
272
  })
260
273
  ]
261
274
  });
262
275
  });
263
- k.displayName = "FunctionSearchPanel";
264
- var A = g((r) => {
265
- let { func: i, workbook: f, home: p, autoFocus: g = !1, onChangeCall: v, className: ee } = r, E = h(), D = d(), O = f === void 0 ? D : f, [k, A] = x([]), [j, M] = x([]), [N, P] = x([]), [F, I] = x(null), [L, R] = x(0), [z, B] = x(null), V = b(null), H = b(/* @__PURE__ */ new Map()), U = y(() => i.getDeclaration().getParameters(), [i]), W = y(() => u(U, k), [U, k]), G = y(() => c(i, { locale: O?.getLocale() }), [i, O]), K = y(() => o(G.nameLocal ?? G.name, W, k, { separator: G.argSeparator }), [
266
- G,
276
+ A.displayName = "FunctionSearchPanel";
277
+ var j = g((r) => {
278
+ let { func: i, workbook: a, home: p, autoFocus: m = !1, onChangeCall: g, className: te } = r, x = ee(), E = f(), D = a === void 0 ? E : a, [O, ne] = b([]), [A, j] = b([]), [M, N] = b([]), [P, F] = b(null), [I, L] = b(0), [R, z] = b(null), B = y(null), V = y(/* @__PURE__ */ new Map()), H = v(() => i.getDeclaration().getParameters(), [i]), U = v(() => d(H, O), [H, O]), W = v(() => l(i, { locale: D?.getLocale() }), [i, D]), G = v(() => s(W.nameLocal ?? W.name, U, O, { separator: W.argSeparator }), [
267
279
  W,
268
- k
280
+ U,
281
+ O
269
282
  ]);
270
283
  _(() => {
271
- v?.(K);
272
- }, [K, v]), _(() => {
284
+ g?.(G);
285
+ }, [G, g]), _(() => {
273
286
  let e = !1, t = i.getName();
274
287
  return i.getDescriptor().then((n) => {
275
- e || B(s(t, n));
288
+ e || z(c(t, n));
276
289
  }).catch(() => {
277
- e || B(null);
290
+ e || z(null);
278
291
  }), () => {
279
292
  e = !0;
280
293
  };
281
294
  }, [i]), _(() => {
282
- g && (V.current?.querySelector("input"))?.focus();
283
- }, [g]);
284
- let q = m((e) => {
285
- let t = (H.current.get(e) ?? 0) + 1;
286
- return H.current.set(e, t), t;
287
- }, []), J = m((e, t) => {
288
- A((n) => {
295
+ m && (B.current?.querySelector("input"))?.focus();
296
+ }, [m]);
297
+ let K = h((e) => {
298
+ let t = (V.current.get(e) ?? 0) + 1;
299
+ return V.current.set(e, t), t;
300
+ }, []), q = h((e, t) => {
301
+ ne((n) => {
289
302
  let r = n.slice();
290
303
  for (; r.length <= e;) r.push("");
291
304
  return r[e] = t, r;
292
- }), q(e), M((t) => {
305
+ }), K(e), j((t) => {
293
306
  if (t[e] === void 0 || t[e] === null) return t;
294
307
  let n = t.slice();
295
308
  return n[e] = null, n;
296
309
  });
297
- }, [q]), Y = m((e, t) => {
298
- P((n) => {
310
+ }, [K]), J = h((e, t) => {
311
+ N((n) => {
299
312
  if ((n[e] ?? null) === t) return n;
300
313
  let r = n.slice();
301
314
  for (; r.length <= e;) r.push(null);
302
315
  return r[e] = t, r;
303
316
  });
304
- }, []), X = m(async (e, t) => {
305
- let n = q(e), r = null;
317
+ }, []), Y = h(async (e, t) => {
318
+ let n = K(e), r = null;
306
319
  try {
307
- r = t ? l(await t.evaluate()) : null;
320
+ r = t ? u(await t.evaluate()) : null;
308
321
  } catch {
309
322
  r = null;
310
323
  }
311
- H.current.get(e) === n && M((t) => {
324
+ V.current.get(e) === n && j((t) => {
312
325
  let n = t.slice();
313
326
  for (; n.length <= e;) n.push(null);
314
327
  return n[e] = r, n;
315
328
  });
316
- }, [q]);
329
+ }, [K]);
317
330
  _(() => {
318
- let e = O ? O.getSelectedSheet()?.getCalculation() ?? O.getCalculation() : null, t = W.some((e, t) => !e.optional && !k[t]?.trim());
319
- if (!e || t || W.length > 0 && !k.some((e) => e?.trim())) return q(-1), void I(null);
320
- let n = q(-1);
331
+ let e = D ? D.getSelectedSheet()?.getCalculation() ?? D.getCalculation() : null, t = U.some((e, t) => !e.optional && !O[t]?.trim());
332
+ if (!e || t || U.length > 0 && !O.some((e) => e?.trim())) return K(-1), void F(null);
333
+ let n = K(-1);
321
334
  (async () => {
322
335
  let t = null;
323
336
  try {
324
- t = l(await e.evaluate(K, p));
337
+ t = u(await e.evaluate(G, {
338
+ ...p,
339
+ target: "display"
340
+ }));
325
341
  } catch {
326
342
  t = null;
327
343
  }
328
- H.current.get(-1) === n && I(t);
344
+ V.current.get(-1) === n && F(t);
329
345
  })();
330
346
  }, [
331
- K,
332
- O,
347
+ G,
348
+ D,
333
349
  p,
334
- k,
335
- W,
336
- q
350
+ O,
351
+ U,
352
+ K
337
353
  ]);
338
- let Z = y(() => {
339
- let e = N[L] ? L : N.findIndex((e, t) => !!e && !!W[t]), t = e >= 0 ? N[e] : null;
340
- return t ? `${W[e]?.label}: ${E(t)}` : null;
354
+ let X = v(() => {
355
+ let e = M[I] ? I : M.findIndex((e, t) => !!e && !!U[t]), t = e >= 0 ? M[e] : null;
356
+ return t ? `${U[e]?.label}: ${x(t)}` : null;
341
357
  }, [
342
- N,
343
- L,
344
- W,
345
- E
346
- ]), Q = y(() => {
347
- let e = W[L];
348
- if (e && z?.name === i.getName()) return z?.params?.[e.descKey]?.description;
358
+ M,
359
+ I,
360
+ U,
361
+ x
362
+ ]), Z = v(() => {
363
+ let e = U[I];
364
+ if (e && R?.name === i.getName()) return R?.params?.[e.descKey]?.description;
349
365
  }, [
350
- W,
351
- L,
352
- z,
366
+ U,
367
+ I,
368
+ R,
353
369
  i
354
- ]), $ = y(() => W.map((r, i) => w(T, {
370
+ ]), Q = v(() => U.map((r, a) => w(T, {
355
371
  sx: {
356
372
  display: "flex",
357
373
  alignItems: "stretch",
@@ -375,23 +391,27 @@ var A = g((r) => {
375
391
  showType: !1,
376
392
  size: 14
377
393
  })] }),
378
- placeholder: E(a(r.param)),
394
+ placeholder: x(o(r.param)),
379
395
  showError: !1,
380
396
  helperText: null,
381
- onChangeError: (e) => Y(i, e),
382
- workbook: O,
397
+ onChangeError: (e) => J(a, e),
398
+ workbook: D,
383
399
  home: p,
384
400
  value: null,
385
- onChangeText: (e) => J(i, e),
401
+ onChangeText: (e) => q(a, e),
386
402
  onChangeInput: (e) => {
387
- X(i, e);
403
+ Y(a, e);
404
+ },
405
+ onFocus: () => L(a),
406
+ argument: {
407
+ fn: i,
408
+ param: r.param
388
409
  },
389
- onFocus: () => R(i),
390
410
  sx: {
391
411
  minWidth: 0,
392
412
  flex: "1 1 55%"
393
413
  }
394
- }), w(te, {
414
+ }), w(k, {
395
415
  component: "span",
396
416
  sx: {
397
417
  flex: "1 1 45%",
@@ -407,7 +427,7 @@ var A = g((r) => {
407
427
  fontFamily: "var(--sxl-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)",
408
428
  fontSize: "0.8rem"
409
429
  },
410
- title: j[i] ?? "",
430
+ title: A[a] ?? "",
411
431
  children: [C(T, {
412
432
  component: "span",
413
433
  "aria-hidden": !0,
@@ -420,22 +440,23 @@ var A = g((r) => {
420
440
  overflow: "hidden",
421
441
  textOverflow: "ellipsis"
422
442
  },
423
- children: j[i] ?? ""
443
+ children: A[a] ?? ""
424
444
  })]
425
445
  })]
426
446
  }, r.key)), [
427
- W,
428
- j,
429
- O,
447
+ i,
448
+ U,
449
+ A,
450
+ D,
430
451
  p,
452
+ q,
431
453
  J,
432
454
  Y,
433
- X,
434
- E
455
+ x
435
456
  ]);
436
457
  return w(T, {
437
- ref: V,
438
- className: ee,
458
+ ref: B,
459
+ className: te,
439
460
  sx: {
440
461
  height: "450px",
441
462
  flex: "1 1 auto",
@@ -467,13 +488,13 @@ var A = g((r) => {
467
488
  overflow: "hidden",
468
489
  textOverflow: "ellipsis"
469
490
  },
470
- children: G.nameLocal ?? G.name
471
- }), z?.name === i.getName() ? C(T, {
491
+ children: W.nameLocal ?? W.name
492
+ }), R?.name === i.getName() ? C(T, {
472
493
  sx: {
473
494
  paddingTop: "2px",
474
495
  color: "text.secondary"
475
496
  },
476
- children: z.summary
497
+ children: R.summary
477
498
  }) : null]
478
499
  }),
479
500
  C(T, {
@@ -489,7 +510,7 @@ var A = g((r) => {
489
510
  borderRadius: "4px",
490
511
  padding: (e) => e.spacing(.5, 1)
491
512
  },
492
- children: $
513
+ children: Q
493
514
  }),
494
515
  C(T, {
495
516
  sx: {
@@ -498,11 +519,11 @@ var A = g((r) => {
498
519
  overflowY: "auto",
499
520
  color: "text.secondary"
500
521
  },
501
- children: Q ? w(S, { children: [w(T, {
522
+ children: Z ? w(S, { children: [w(T, {
502
523
  component: "span",
503
524
  sx: { fontWeight: 600 },
504
- children: [W[L]?.label, ": "]
505
- }), Q] }) : null
525
+ children: [U[I]?.label, ": "]
526
+ }), Z] }) : null
506
527
  }),
507
528
  C(T, {
508
529
  sx: {
@@ -513,7 +534,7 @@ var A = g((r) => {
513
534
  borderColor: "divider",
514
535
  paddingTop: (e) => e.spacing(1)
515
536
  },
516
- children: Z ? C(T, {
537
+ children: X ? C(T, {
517
538
  className: "function-error",
518
539
  sx: {
519
540
  color: "error.main",
@@ -521,10 +542,10 @@ var A = g((r) => {
521
542
  overflow: "hidden",
522
543
  textOverflow: "ellipsis"
523
544
  },
524
- children: Z
545
+ children: X
525
546
  }) : w(S, { children: [C(T, {
526
547
  sx: { color: "text.secondary" },
527
- children: E("functionArguments.result")
548
+ children: x("functionArguments.result")
528
549
  }), C(T, {
529
550
  className: "function-result",
530
551
  sx: {
@@ -535,40 +556,40 @@ var A = g((r) => {
535
556
  whiteSpace: "nowrap",
536
557
  fontFamily: "var(--sxl-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)"
537
558
  },
538
- title: F ?? "",
539
- children: F ?? ""
559
+ title: P ?? "",
560
+ children: P ?? ""
540
561
  })] })
541
562
  })
542
563
  ]
543
564
  });
544
565
  });
545
- A.displayName = "FunctionArgumentsPanel";
546
- var j = "insert-function-page", M = Object.freeze({
566
+ j.displayName = "FunctionArgumentsPanel";
567
+ var M = "insert-function-page", N = Object.freeze({
547
568
  Next: "Next",
548
569
  Back: "Back",
549
570
  Insert: "Insert"
550
- }), N = (e, t) => {
571
+ }), P = (e, t) => {
551
572
  let n = {
552
- id: M.Insert,
573
+ id: N.Insert,
553
574
  label: () => t("insertFunction.insert")
554
575
  };
555
576
  return e === "arguments" ? [
556
577
  n,
557
578
  {
558
- id: M.Back,
579
+ id: N.Back,
559
580
  label: () => t("insertFunction.back")
560
581
  },
561
582
  "Cancel"
562
583
  ] : [
563
584
  {
564
- id: M.Next,
585
+ id: N.Next,
565
586
  label: () => t("insertFunction.next")
566
587
  },
567
588
  n,
568
589
  "Cancel"
569
590
  ];
570
- }, P = g((e) => {
571
- let { context: t, page: n, selected: r, onChangeSelected: i, onActivate: a, onChangeCall: o, workbook: s, home: c, className: l } = e, [u, d] = x(null);
591
+ }, F = g((e) => {
592
+ let { context: t, page: n, selected: r, onChangeSelected: i, onActivate: a, onChangeCall: o, workbook: s, home: c, className: l } = e, [u, d] = b(null);
572
593
  n === "arguments" && r && r !== u && d(r);
573
594
  let f = n === "arguments" && !!u;
574
595
  return w(T, {
@@ -580,11 +601,11 @@ var j = "insert-function-page", M = Object.freeze({
580
601
  minHeight: 0
581
602
  },
582
603
  children: [C(T, {
583
- className: j,
604
+ className: M,
584
605
  "data-page": "search",
585
606
  hidden: f,
586
607
  sx: { display: f ? "none" : "contents" },
587
- children: C(k, {
608
+ children: C(A, {
588
609
  className: l,
589
610
  context: t,
590
611
  selected: r,
@@ -593,11 +614,11 @@ var j = "insert-function-page", M = Object.freeze({
593
614
  autoFocus: !f
594
615
  })
595
616
  }), u ? C(T, {
596
- className: j,
617
+ className: M,
597
618
  "data-page": "arguments",
598
619
  hidden: !f,
599
620
  sx: { display: f ? "contents" : "none" },
600
- children: C(A, {
621
+ children: C(j, {
601
622
  className: l,
602
623
  func: u,
603
624
  workbook: s,
@@ -608,5 +629,5 @@ var j = "insert-function-page", M = Object.freeze({
608
629
  }) : null]
609
630
  });
610
631
  });
611
- P.displayName = "InsertFunctionWizard";
612
- export { A as a, N as i, M as n, k as o, P as r, j as t };
632
+ F.displayName = "InsertFunctionWizard";
633
+ export { j as a, P as i, N as n, A as o, F as r, M as t };