@sheetxl/studio-mui 0.1.98

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 (178) hide show
  1. package/LICENSE.md +11 -0
  2. package/README.md +24 -0
  3. package/build/browser/cjs/4XrhSt2xtUIXkiCt.cjs +1516 -0
  4. package/build/browser/cjs/B3EvhaQf456RMc1Q.cjs +6 -0
  5. package/build/browser/cjs/B3kl467PN2cpvrfz.cjs +12 -0
  6. package/build/browser/cjs/B5LCoenQbQmzic16.cjs +314 -0
  7. package/build/browser/cjs/BBuyHZwFlDRvHzBH.cjs +7 -0
  8. package/build/browser/cjs/BGoG_ROASNB2owBR.cjs +28 -0
  9. package/build/browser/cjs/BJ6Da8vZLjAl44pz.cjs +6 -0
  10. package/build/browser/cjs/BL_UVvG75SFsFaT3.cjs +6 -0
  11. package/build/browser/cjs/BNDoTytIOGtVh5l9.cjs +6 -0
  12. package/build/browser/cjs/BQOyVCuOdwDja_VV.cjs +42 -0
  13. package/build/browser/cjs/BRiPktKUmeJipjaa.cjs +6 -0
  14. package/build/browser/cjs/BabbNVs5iKg49rfk.cjs +6 -0
  15. package/build/browser/cjs/BcOX5vODdThWbKrR.cjs +6 -0
  16. package/build/browser/cjs/BchlMljYmXDs0Ol2.cjs +6 -0
  17. package/build/browser/cjs/BmYZvm13acvbFhOu.cjs +6 -0
  18. package/build/browser/cjs/BmbsW1n0-CkF3ITF.cjs +6 -0
  19. package/build/browser/cjs/BnCUyGP_ERKmL3ZR.cjs +6 -0
  20. package/build/browser/cjs/BtP4E1_yhMjpfbr5.cjs +6 -0
  21. package/build/browser/cjs/C3E9wmSfmgYmXfJN.cjs +205 -0
  22. package/build/browser/cjs/C3Hl78e9qfEHxJYc.cjs +6 -0
  23. package/build/browser/cjs/CEvRH8aOx3etutK_.cjs +17 -0
  24. package/build/browser/cjs/CLZSdaBnKDfb142R.cjs +6 -0
  25. package/build/browser/cjs/CN1cS39WcNrcPVqS.cjs +129 -0
  26. package/build/browser/cjs/CSH1hUnHovjo8Lb8.cjs +6 -0
  27. package/build/browser/cjs/CTNt3asYQRA-MROc.cjs +47 -0
  28. package/build/browser/cjs/C_JZEtvgcli6T7Wg.cjs +11 -0
  29. package/build/browser/cjs/CbaYZmvS8u-p_Z8Z.cjs +6 -0
  30. package/build/browser/cjs/Cc-4c3DRm96wq5rj.cjs +12 -0
  31. package/build/browser/cjs/CnY6DbatGmPyylfU.cjs +20 -0
  32. package/build/browser/cjs/CqkQGfzNax6GmZFo.cjs +6 -0
  33. package/build/browser/cjs/D2AF0a4vbNKzFxzA.cjs +21 -0
  34. package/build/browser/cjs/D4y1iYdx8sdwQ50T.cjs +6 -0
  35. package/build/browser/cjs/D5cF1EnyvnPY2IxS.cjs +150 -0
  36. package/build/browser/cjs/DA1-OPTYQTepGKEg.cjs +11 -0
  37. package/build/browser/cjs/DJDMVDpUqlEKYLjt.cjs +6 -0
  38. package/build/browser/cjs/DLXLJ8SNNjwM5C-P.cjs +6 -0
  39. package/build/browser/cjs/DV8lOsZBgyx7MTBW.cjs +6 -0
  40. package/build/browser/cjs/DZAPn_d9mpvfRzsb.cjs +6 -0
  41. package/build/browser/cjs/DaicqO_9d1hYzyB_.cjs +11 -0
  42. package/build/browser/cjs/Dfh6eMCbAjW14fdh.cjs +6 -0
  43. package/build/browser/cjs/DhI2lgDZL8GqBejN.cjs +6 -0
  44. package/build/browser/cjs/Ds6s8fpzOZsd2m1r.cjs +6 -0
  45. package/build/browser/cjs/DvIWGmDT5uBVQ5zH.cjs +16 -0
  46. package/build/browser/cjs/DvLgu20RiaayrJcW.cjs +7 -0
  47. package/build/browser/cjs/Dvhwt25gyHzxQLrp.cjs +6 -0
  48. package/build/browser/cjs/DvwApJM_CVrlpLxn.cjs +6 -0
  49. package/build/browser/cjs/DwVYzo4a05DMfta_.cjs +28 -0
  50. package/build/browser/cjs/NYdqUauA5i2q33UZ.cjs +6 -0
  51. package/build/browser/cjs/S2Xfq-KDgoT7ipPC.cjs +25 -0
  52. package/build/browser/cjs/TOZQZr9ZZ_Q-jdQZ.cjs +6 -0
  53. package/build/browser/cjs/bJuLOalXTwrshZL3.cjs +16 -0
  54. package/build/browser/cjs/eh9refYW4Gm25cmW.cjs +6 -0
  55. package/build/browser/cjs/hKqcVeb_8_4M79xj.cjs +6 -0
  56. package/build/browser/cjs/index.cjs +7 -0
  57. package/build/browser/cjs/is17hbP-kpOIBRP3.cjs +6 -0
  58. package/build/browser/cjs/pNY789kHWwRQXqse.cjs +17 -0
  59. package/build/browser/cjs/qJcc3ALtLWml32LU.cjs +18 -0
  60. package/build/browser/cjs/vWgVoELLfZ2ff1xL.cjs +6 -0
  61. package/build/browser/esm/2kwF7RVUWBY1zsgG.mjs +16 -0
  62. package/build/browser/esm/7Imk0owJj7oNHR7v.mjs +48 -0
  63. package/build/browser/esm/AuNwPf0DXe0twn35.mjs +1592 -0
  64. package/build/browser/esm/B1Kw9U_AxCk0Aq9f.mjs +59 -0
  65. package/build/browser/esm/B9l1_Tfw_tMhKCNB.mjs +437 -0
  66. package/build/browser/esm/B9winT3ff8rc4sbn.mjs +490 -0
  67. package/build/browser/esm/BEo9XX1sHmVjScSm.mjs +16 -0
  68. package/build/browser/esm/BGTcOBCyrTTlov_i.mjs +13399 -0
  69. package/build/browser/esm/BMGddfMXtKQ9AXQS.mjs +16 -0
  70. package/build/browser/esm/BQSa7N7QMGysdZdU.mjs +3932 -0
  71. package/build/browser/esm/BVEuc_3fLG2GN34k.mjs +16 -0
  72. package/build/browser/esm/BVh9YUwiSov8wcyY.mjs +1708 -0
  73. package/build/browser/esm/BZt5yM_TvoPXqdeA.mjs +3867 -0
  74. package/build/browser/esm/BfU8KdaB9wrEPWM-.mjs +16 -0
  75. package/build/browser/esm/BjUaiSvRZnas-HJW.mjs +16 -0
  76. package/build/browser/esm/BqiVaoAYJJqPrCUZ.mjs +16 -0
  77. package/build/browser/esm/BtMqJ5CRpKuAC4UQ.mjs +1486 -0
  78. package/build/browser/esm/BwvMR2cgGwFn8hAL.mjs +36 -0
  79. package/build/browser/esm/BxU3eVA-Adrnq7ZJ.mjs +1372 -0
  80. package/build/browser/esm/C00coampLNiXjWJJ.mjs +436 -0
  81. package/build/browser/esm/C6nh1rvYnAg2w2V2.mjs +838 -0
  82. package/build/browser/esm/C8gc149K34Zi2lP2.mjs +16 -0
  83. package/build/browser/esm/CGSkuCZY1EmTUNlQ.mjs +52 -0
  84. package/build/browser/esm/CKXzosgZX8Xe3l59.mjs +16 -0
  85. package/build/browser/esm/CNYANG0Z7mhGYo00.mjs +859 -0
  86. package/build/browser/esm/CV_FNw2i_aEc5nwA.mjs +16 -0
  87. package/build/browser/esm/CYSj0-zys2FKWgnb.mjs +18 -0
  88. package/build/browser/esm/CbTs5cvVaP1vPCYD.mjs +2248 -0
  89. package/build/browser/esm/CfAob8gGydmX1xQu.mjs +16 -0
  90. package/build/browser/esm/ChGigf2OPu7d44Km.mjs +16 -0
  91. package/build/browser/esm/CnzGN0S6zOfL_3SS.mjs +1358 -0
  92. package/build/browser/esm/CpyeUtXgDmrcMESB.mjs +52 -0
  93. package/build/browser/esm/CrEGjvQKhAcdw5sY.mjs +16 -0
  94. package/build/browser/esm/CtrrmHx9YbrOithw.mjs +152 -0
  95. package/build/browser/esm/CzAM0pDdZ7sjGgn9.mjs +86 -0
  96. package/build/browser/esm/D0oVDcgRUMZ9MHzu.mjs +41 -0
  97. package/build/browser/esm/D54Fpmnd9MzCzp-Z.mjs +16 -0
  98. package/build/browser/esm/D78-3ghInxscHLVq.mjs +23 -0
  99. package/build/browser/esm/DEpR6b4DMs-va6RS.mjs +43734 -0
  100. package/build/browser/esm/DEsqE49cIQZ8AqCe.mjs +398 -0
  101. package/build/browser/esm/DGe70xvBhc62ZVZz.mjs +2410 -0
  102. package/build/browser/esm/DXapJ5_yR4E8vDaK.mjs +1685 -0
  103. package/build/browser/esm/DjAZeDxBIBZsRTm3.mjs +24 -0
  104. package/build/browser/esm/DttdPwwDTcRX4uwL.mjs +44 -0
  105. package/build/browser/esm/FXcO0MVElhw9cc3v.mjs +49 -0
  106. package/build/browser/esm/GpycqJcrwTRtjEqA.mjs +16 -0
  107. package/build/browser/esm/HCE-tMxyVd0m-PgN.mjs +16 -0
  108. package/build/browser/esm/OCdyQRicV8KxUwMt.mjs +16 -0
  109. package/build/browser/esm/UukTgmLv7or2mhlB.mjs +16 -0
  110. package/build/browser/esm/_cuE13TWr3oEoKGP.mjs +34 -0
  111. package/build/browser/esm/aIlK3Ybu-1T4WHPv.mjs +640 -0
  112. package/build/browser/esm/bFSkTthAEOn7gv5x.mjs +16 -0
  113. package/build/browser/esm/bOhN6up-rdLRp82s.mjs +5588 -0
  114. package/build/browser/esm/index.mjs +85 -0
  115. package/build/browser/esm/ng3JdG4_hi9SgtHk.mjs +16 -0
  116. package/build/browser/esm/o6U2z4gZ7GE4QKZD.mjs +16 -0
  117. package/build/browser/esm/psav3cvsBQQczhPL.mjs +16 -0
  118. package/build/browser/esm/vn0iS301yg2hAbYd.mjs +51 -0
  119. package/build/licenses/dependencies.txt +1341 -0
  120. package/build/node/assets/style.css +1 -0
  121. package/build/node/esm/2kwF7RVUWBY1zsgG.mjs +16 -0
  122. package/build/node/esm/B-Xlyl81h27-bnvO.mjs +16 -0
  123. package/build/node/esm/B1_NYsn5D8x9QedP.mjs +307 -0
  124. package/build/node/esm/BCA5bxOeDA8k1Bm1.mjs +16 -0
  125. package/build/node/esm/BEo9XX1sHmVjScSm.mjs +16 -0
  126. package/build/node/esm/BIfdVpnJR1TZwCPR.mjs +1378 -0
  127. package/build/node/esm/BIqDzNJtkm-dyH0v.mjs +154 -0
  128. package/build/node/esm/BMGddfMXtKQ9AXQS.mjs +16 -0
  129. package/build/node/esm/BUOdfqhtCh8lhOhm.mjs +4000 -0
  130. package/build/node/esm/BYbE15S73xgn7S5E.mjs +88 -0
  131. package/build/node/esm/BfU8KdaB9wrEPWM-.mjs +16 -0
  132. package/build/node/esm/BkyivirgeiDKFSjk.mjs +16 -0
  133. package/build/node/esm/Bm1RqNJ-XvHpJW9z.mjs +831 -0
  134. package/build/node/esm/BqiVaoAYJJqPrCUZ.mjs +16 -0
  135. package/build/node/esm/Bx-30HInllXS7M_J.mjs +41 -0
  136. package/build/node/esm/Bx3lQBEvcqhxffT-.mjs +1726 -0
  137. package/build/node/esm/BxsKlaBFnb5wNq6R.mjs +53 -0
  138. package/build/node/esm/C4PMhNAV0KpPsKFj.mjs +24 -0
  139. package/build/node/esm/C7x3L6HtPhZjSrrZ.mjs +471 -0
  140. package/build/node/esm/C8gc149K34Zi2lP2.mjs +16 -0
  141. package/build/node/esm/CK-kn1p9NGRVM_h7.mjs +16 -0
  142. package/build/node/esm/CKR6snAwSONs7kfL.mjs +19 -0
  143. package/build/node/esm/CKXzosgZX8Xe3l59.mjs +16 -0
  144. package/build/node/esm/CLE_RHHvsDeoZ9Zd.mjs +561 -0
  145. package/build/node/esm/CMKci_5THkcJ-w9a.mjs +80 -0
  146. package/build/node/esm/CVU9bu6AnxcgkEwq.mjs +13466 -0
  147. package/build/node/esm/CfAob8gGydmX1xQu.mjs +16 -0
  148. package/build/node/esm/ChGigf2OPu7d44Km.mjs +16 -0
  149. package/build/node/esm/CkvkuPSf4R_DqArg.mjs +5648 -0
  150. package/build/node/esm/CnBMj0oJAyr9ZbjP.mjs +23 -0
  151. package/build/node/esm/CrEGjvQKhAcdw5sY.mjs +16 -0
  152. package/build/node/esm/Crx9i_8dm3OQsk_T.mjs +28 -0
  153. package/build/node/esm/CwUulbiMQH11aF4x.mjs +16 -0
  154. package/build/node/esm/D0Lh0V1tkdJPxZnI.mjs +392 -0
  155. package/build/node/esm/D54Fpmnd9MzCzp-Z.mjs +16 -0
  156. package/build/node/esm/D5bg3v_W8K9MVp0j.mjs +1711 -0
  157. package/build/node/esm/D8F08tiG98tM_voL.mjs +16 -0
  158. package/build/node/esm/DR7o1DOIK9zdiBgS.mjs +50 -0
  159. package/build/node/esm/DYEgm2kd3haV-Ml8.mjs +1246 -0
  160. package/build/node/esm/DfzhmhZ4I0Zurcqn.mjs +44 -0
  161. package/build/node/esm/Dg_ERnlsy5hwbzMA.mjs +1498 -0
  162. package/build/node/esm/Dt4cj_0sWgvt4FGj.mjs +92 -0
  163. package/build/node/esm/GpycqJcrwTRtjEqA.mjs +16 -0
  164. package/build/node/esm/LlkIFFfAjLiQ5Or6.mjs +3840 -0
  165. package/build/node/esm/OCdyQRicV8KxUwMt.mjs +16 -0
  166. package/build/node/esm/QATDL2FGAYcVnd33.mjs +49 -0
  167. package/build/node/esm/SvgA2TyqJYOzheuf.mjs +26 -0
  168. package/build/node/esm/VZ150KIUh5JVRqpk.mjs +52 -0
  169. package/build/node/esm/XRLHatWlgABiuBDS.mjs +52 -0
  170. package/build/node/esm/bFSkTthAEOn7gv5x.mjs +16 -0
  171. package/build/node/esm/index.mjs +44754 -0
  172. package/build/node/esm/lgtVRbg712G5Ba-x.mjs +60 -0
  173. package/build/node/esm/ng3JdG4_hi9SgtHk.mjs +16 -0
  174. package/build/node/esm/psav3cvsBQQczhPL.mjs +16 -0
  175. package/build/node/esm/zWnN2OzbhzCc6T7u.mjs +86 -0
  176. package/build/package.json +84 -0
  177. package/build/types/index.d.ts +1848 -0
  178. package/package.json +100 -0
@@ -0,0 +1,60 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.0.0
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
8
+ import { memo as o, useState as n, useRef as a, useReducer as i, useMemo as l } from "react";
9
+ import { useMeasure as s } from "react-use";
10
+ import { DialogContent as r, Box as c } from "@mui/material";
11
+ import { at as d, au as g, av as m, P as p, ak as h, NamedInput as u, RangeInput as x, p as f, TableStyleOptionsPanel as y, TableStylePreview as w, Z as b, q as S, t as C, aw as v } from "./index.mjs";
12
+ const N = o((o2) => {
13
+ const { title: N2, onHide: R, autoFocusSel: T = ".range-input input", context: F, notifier: D = d, command: H, commands: B, ...I } = o2, [P, j] = n(false), [z, L] = n(false), O = a(null), [E, A] = i((e2) => e2 + 1, 0), [M, { width: W }] = s();
14
+ g(H);
15
+ const k = F ?? H.context(), q = k.table(), [V, Z] = n(() => q ? k.getNames().getRanges(q.getRange()) : null), G = l(() => q?.getName() ?? "", [q]);
16
+ m(k.table(), { onAnchorCoordsChange(e2) {
17
+ Z(k.getNames().getRanges(e2.getRange()));
18
+ }, onProtectedChange(e2) {
19
+ A();
20
+ } });
21
+ const J = p((e2) => {
22
+ k?.table().setName(e2);
23
+ }, [k]), K = p((e2) => {
24
+ k?.table().resize(e2.at(0));
25
+ }, [k]);
26
+ let Q = null;
27
+ return k.table() || (Q = e("div", { style: { position: "absolute", top: "0", left: "0", width: "100%", height: "100%", opacity: 1, display: "flex", alignItems: "center", justifyItems: "center", justifyContent: "center", boxSizing: "border-box" }, children: e("div", { children: "No table selected" }) })), e(h, { title: N2 ?? "Table Details", initialPosition: { y: "35" }, autoFocusSel: T, refWindow: O, onHide: R, onFocus: () => j(true), onBlur: (e2) => {
28
+ O?.current?.contains(e2.relatedTarget) || j(false);
29
+ }, PaperProps: { elevation: P ? 3 : 1 }, ...I, children: t(r, { dividers: true, ref: M, sx: { display: "flex", flexDirection: "column", position: "relative", paddingLeft: (e2) => e2.spacing(1.5), paddingRight: (e2) => e2.spacing(1.5) }, children: [t(c, { sx: { display: "flex", flexDirection: "column", transition: "opacity 60ms", opacity: k.table() ? 1 : 0 }, children: [e(c, { sx: { display: "flex", flexDirection: "row", gap: (e2) => e2.spacing(1) }, children: e(c, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box", paddingLeft: (e2) => e2.spacing(2), paddingRight: (e2) => e2.spacing(2) }, children: t(c, { sx: { display: "flex", flexDirection: "column", alignItems: "center" }, children: [e(u, { formName: "name", defaultInput: G, value: q?.getName() ?? "No table", onChangeInput: J, onValidate: (e2) => {
30
+ q && q.getName().toLowerCase() === e2.toLowerCase() || k?.getNames().validateName(e2);
31
+ }, disabled: q?.isProtected() ?? true, onFocus: (e2) => {
32
+ z || e2.target?.select(), L(true);
33
+ } }), e(x, { formName: "range", value: V, onChangeInput: K, resolvedAddress: k.getNames().getRanges.bind(k.getNames()), disabled: q?.isProtected() ?? true, onFocus: (e2) => {
34
+ z || e2.target?.select(), L(true);
35
+ } })] }) }) }), t(c, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", gap: (e2) => e2.spacing(0.5), marginTop: (e2) => e2.spacing(1) }, children: [e(f, { orientation: "horizontal", sx: { marginTop: (e2) => e2.spacing(1.5), marginBottom: (e2) => e2.spacing(0.75) } }), e(y, { disabled: q?.isProtected(), styleOptions: q?.getStyleOptions() ?? null, onStyleOptionsChange: (e2) => {
36
+ q.updateStyleOptions(e2);
37
+ }, showHeaderRow: q?.getShowHeaders(), onShowHeaderRowChange: (e2) => {
38
+ try {
39
+ q.setShowHeaders(e2);
40
+ } catch (e3) {
41
+ D.showError(e3);
42
+ }
43
+ }, showTotalRow: q?.getShowTotals(), onShowTotalRowChange: (e2) => {
44
+ try {
45
+ q.setShowTotals(e2);
46
+ } catch (e3) {
47
+ D.showError(e3);
48
+ }
49
+ }, showFilterButton: q?.getFilter() ? q.getShowFilterButton() : null, onShowFilterButtonChange: (e2) => {
50
+ try {
51
+ q.setShowFilterButton(e2);
52
+ } catch (e3) {
53
+ D.showError(e3);
54
+ }
55
+ } }), e(c, { sx: { display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", marginTop: (e2) => e2.spacing(2), marginBottom: (e2) => e2.spacing(1) }, children: e(w, { table: q, styles: k.styles(), bodyStyle: k.bodyStyle(), cellHeight: 30, isLive: true }) }), e(f, { orientation: "horizontal" }), t(c, { sx: { display: "flex", flexDirection: "column", justifyContent: "center" }, children: [e(b, { variant: C.Menuitem, command: B.getCommand("convertTableToRange"), commandState: q, icon: S(e(v, {})) }), e(b, { variant: C.Menuitem, commandState: q, command: B.getCommand("deleteTable"), icon: S(e(v, {})) })] })] })] }), Q] }) });
56
+ });
57
+ export {
58
+ N as TableDetailsWindow,
59
+ N as default
60
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.0.0
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ /**
8
+ * @license @sheetxl/sdk - A high-performance, embeddable spreadsheet engine. - v0.0.0
9
+ *
10
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
11
+ * License: The license can be found at https://www.sheetxl.com/license.
12
+ */
13
+ const e = { ENCODEURL: { s: "Returns a URL-encoded string", p: { text: { d: "is a string to be URL encoded" } } }, WEBSERVICE: { s: "Retrieves data from a web service.", p: { url: { d: "is the URL of the web service" } } } };
14
+ export {
15
+ e as default
16
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.0.0
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ /**
8
+ * @license @sheetxl/sdk - A high-performance, embeddable spreadsheet engine. - v0.0.0
9
+ *
10
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
11
+ * License: The license can be found at https://www.sheetxl.com/license.
12
+ */
13
+ const e = { DELAY: { s: "Returns the input value after a delay.", p: { time: { d: "the delay time in milliseconds. Default is 1000ms (1 second)." }, input: { d: "returns the input." }, label: { d: "optional label for the delay function.", v: "No label" } }, h: "Testing" }, WAIT: { s: "Starts waiting for event", p: { type: { d: "the type of message." }, input: { d: "an optional dependency." } }, h: "Testing" } };
14
+ export {
15
+ e as default
16
+ };
@@ -0,0 +1,86 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.0.0
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { jsxs as e, jsx as t } from "react/jsx-runtime";
8
+ import { Box as n, TextField as i, InputAdornment as r, IconButton as o, FormControlLabel as a, Checkbox as l, Typography as d, TableCell as s, DialogContent as c } from "@mui/material";
9
+ import { n as h, ai as p, ax as m, ak as u } from "./index.mjs";
10
+ import g, { useState as f, useMemo as x, useEffect as b } from "react";
11
+ import y from "clsx";
12
+ import { alpha as w, getOverlayAlpha as R, styled as C } from "@mui/material/styles/index.js";
13
+ import { Close as k } from "@mui/icons-material";
14
+ import { AutoSizer as v, Table as $, Column as D } from "react-virtualized";
15
+ const z = "ReactVirtualizedDemo-flexContainer", I = "ReactVirtualizedDemo-tableRow", K = "ReactVirtualizedDemo-tableRowHover", H = "ReactVirtualizedDemo-tableCell", S = "ReactVirtualizedDemo-noClick";
16
+ class N extends g.PureComponent {
17
+ constructor() {
18
+ super(...arguments), this.getRowClassName = ({ index: e2 }) => {
19
+ const { onRowClick: t2 } = this.props;
20
+ return y(I, z, { [K]: -1 !== e2 && null != t2 });
21
+ }, this.cellRenderer = ({ cellData: e2, columnIndex: n2, dataKey: i2 }) => {
22
+ const { columns: r2, rowHeight: o2, onRowClick: a2 } = this.props;
23
+ let l2 = e2, d2 = { height: o2, paddingRight: "2px", paddingTop: "0px", paddingBottom: "0px" };
24
+ return "shortcut" === i2 ? l2 = m(e2) : "description" === i2 && (d2 = { ...d2, fontSize: ".75rem", display: "block", paddingTop: "4px", whiteSpace: "pre-line" }), t(s, { component: "div", className: y(H, z, { [S]: null == a2 }), variant: "body", style: d2, align: null != n2 && r2[n2].numeric ? "right" : "left", children: l2 });
25
+ }, this.headerRenderer = ({ label: e2, columnIndex: n2 }) => {
26
+ const { headerHeight: i2, columns: r2 } = this.props;
27
+ return t(s, { component: "div", className: y(H, z, S), variant: "head", sx: { height: i2, backgroundColor: (e3) => e3.palette.grey[300] }, align: r2[n2].numeric ? "right" : "left", children: t("span", { children: e2 }) });
28
+ };
29
+ }
30
+ static {
31
+ this.defaultProps = { headerHeight: 40, rowHeight: 48 };
32
+ }
33
+ render() {
34
+ const { columns: e2, rowHeight: n2, headerHeight: i2, ...r2 } = this.props;
35
+ return t(v, { children: ({ height: o2, width: a2 }) => t($, { height: o2, width: a2, rowHeight: n2, gridStyle: { direction: "inherit" }, headerHeight: i2, ...r2, rowClassName: this.getRowClassName, children: e2.map(({ dataKey: e3, width: n3, widthLess: i3, ...r3 }, o3) => {
36
+ const l2 = i3 ? a2 - i3 : n3;
37
+ return t(D, { headerRenderer: (e4) => this.headerRenderer({ ...e4, columnIndex: o3 }), className: z, cellRenderer: this.cellRenderer, dataKey: e3, width: l2, ...r3 }, e3);
38
+ }) }) });
39
+ }
40
+ }
41
+ const T = C(N)(({ theme: e2 }) => ({ "& .ReactVirtualized__Table__headerRow": { ..."rtl" === e2.direction && { paddingLeft: "0 !important" }, ..."rtl" !== e2.direction && { paddingRight: void 0 } }, "& .ReactVirtualized__Table__Grid": { outline: "none" }, [`& .${z}`]: { display: "flex", alignItems: "center", boxSizing: "border-box" }, [`& .${I}`]: { cursor: "pointer" }, [`& .${K}`]: { "&:hover:not([disabled])": { backgroundColor: e2.palette.grey[200] } }, [`& .${H}`]: { flex: 1 }, [`& .${S}`]: { cursor: "initial" } }));
42
+ function _(s2) {
43
+ const { commands: c2, ...m2 } = s2, [u2, g2] = f(false), [y2, C2] = f(""), v2 = x(() => {
44
+ let e2 = c2.getAllCommands();
45
+ u2 || (e2 = e2.filter((e3) => e3.command.shortcut())), e2.sort((e3, t3) => e3.command.label().localeCompare(t3.command.label()));
46
+ const t2 = [], n2 = (e3) => e3.replace(/\n\n/g, "\n");
47
+ for (let i2 = 0; i2 < e2.length; i2++) {
48
+ const r2 = e2[i2].command, o2 = r2.shortcut();
49
+ if (Array.isArray(o2)) {
50
+ const e3 = o2;
51
+ for (let i3 = 0; i3 < e3.length; i3++) t2.push({ label: r2.label(), description: n2(r2.description()), shortcut: e3[i3] });
52
+ } else t2.push({ label: r2.label(), description: n2(r2.description()), shortcut: r2.shortcut() });
53
+ }
54
+ return t2;
55
+ }, [u2, c2]), [$2, D2] = f(null);
56
+ b(() => {
57
+ import("fuse.js").then((e2) => {
58
+ D2(new e2.default(v2, { threshold: 0, ignoreLocation: true, keys: ["label", "description"] }));
59
+ });
60
+ }, [v2]);
61
+ const [z2, I2] = f(v2), K2 = y2.length > 0 && 0 === z2.length;
62
+ b(() => {
63
+ $2 && h.debounce(() => {
64
+ if (0 === y2.trim().length) return void I2(v2);
65
+ const e2 = $2.search(y2.trim()), t2 = new Array(e2.length);
66
+ for (let n2 = 0; n2 < e2.length; n2++) t2[n2] = e2[n2].item;
67
+ I2(t2);
68
+ }, 90)();
69
+ }, [$2, y2]);
70
+ return e(n, { style: { height: 440, width: "100%", display: "flex", flexDirection: "column" }, ...m2, children: [e(n, { sx: { display: "flex", alignItems: "center", justifyContent: "end", marginBottom: (e2) => e2.spacing(2), color: (e2) => e2.palette.text.secondary }, children: [t(i, { InputProps: { sx: { backgroundImage: `linear-gradient(${w("#fff", R(5))}, ${w("#fff", R(5))})` }, inputProps: { className: "input", autoFocus: true, spellCheck: false, placeholder: "Type to search key bindings", autoComplete: "off", sx: { paddingTop: (e2) => e2.spacing(1), paddingBottom: (e2) => e2.spacing(1) } }, endAdornment: t(r, { sx: { opacity: y2.length > 0 ? 1 : 0, display: y2.length > 0 ? "flex" : "none" }, position: "end", children: t(o, { "aria-label": "clear search", onClick: () => C2(""), edge: "end", children: t(k, {}) }) }) }, sx: { flex: "1 1 40%", marginRight: (e2) => e2.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (e2) => K2 ? `${e2.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (e2) => K2 ? `${e2.palette.error.main} !important` : void 0 } }, value: y2, onChange: (e2) => {
71
+ C2(e2.target.value);
72
+ }, onKeyDown: (e2) => {
73
+ e2.which === p.Escape && y2.length > 0 && (C2(""), e2.stopPropagation(), e2.preventDefault());
74
+ }, onContextMenu: (e2) => {
75
+ e2.stopPropagation();
76
+ } }), t(a, { sx: { flex: "1 1 60%" }, control: t(l, { checked: u2, onChange: () => g2(!u2) }), label: "Show commands without key bindings", labelPlacement: "start" })] }), t(n, { sx: { flex: "1 1 100%", borderRadius: (e2) => `${e2.shape.borderRadius}px`, border: (e2) => `solid ${e2.palette.divider} 1px`, paddingRight: "1px", overflow: "hidden", "* .MuiTableCell-head": { background: (e2) => e2.palette.background.paper, backgroundImage: `linear-gradient(${w("#fff", R(5))}, ${w("#fff", R(5))})` } }, children: t(T, { rowCount: z2.length, rowGetter: (e2) => z2[e2.index], columns: [{ width: 180, label: "Command", dataKey: "label" }, { width: 260, label: "Key Binding", dataKey: "shortcut" }, { width: 240, label: "Description", dataKey: "description", widthLess: 440 }] }) }), t(n, { sx: { display: "flex", flexShrink: "0", paddingLeft: (e2) => e2.spacing(1), paddingTop: (e2) => e2.spacing(1), paddingRight: (e2) => e2.spacing(1), userSelect: "none", justifyContent: "flex-end" }, children: t(d, { noWrap: true, component: "div", sx: { color: (e2) => K2 ? e2.palette.error.main : e2.palette.text.secondary }, children: `${0 === z2.length ? "No" : z2.length} shortcut key${1 === z2.length ? "" : "s"}${y2.length > 0 ? " found" : ""}` }) })] });
77
+ }
78
+ const P = (e2) => {
79
+ const { title: n2 = "Shortcut Keys", commands: i2, sx: r2, ...o2 } = e2;
80
+ return t(u, { isModal: true, onKeyDown: (e3) => {
81
+ e3.keyCode === p.F1 && e3.preventDefault();
82
+ }, sx: { width: "780px", ...r2 }, title: n2, autoFocusSel: ".input", ...o2, children: t(c, { dividers: true, children: t(_, { commands: i2, sx: { marginBottom: "8px" } }) }) });
83
+ };
84
+ export {
85
+ P as default
86
+ };
@@ -0,0 +1,84 @@
1
+ {
2
+ "name": "@sheetxl/studio-mui",
3
+ "description": "Studio - Spreadsheet UI built with SheetXL SDK using React & MUI.",
4
+ "version": "0.0.0",
5
+ "license": "SEE LICENSE IN <LICENSE>",
6
+ "type": "module",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./types/index.d.ts",
10
+ "browser": "./browser/esm/index.mjs",
11
+ "node": "./node/esm/index.mjs",
12
+ "import": "./browser/esm/index.mjs",
13
+ "require": "./browser/cjs/index.cjs"
14
+ }
15
+ },
16
+ "types": "./types/index.d.ts",
17
+ "module": "./browser/esm/index.mjs",
18
+ "main": "./browser/cjs/index.cjs",
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "sideEffects": [
23
+ "*.css",
24
+ "**/*.css"
25
+ ],
26
+ "author": "Michael T Ford",
27
+ "keywords": [
28
+ "sheetxl",
29
+ "spreadsheet",
30
+ "utilities",
31
+ "sheets",
32
+ "grid",
33
+ "excel",
34
+ "react",
35
+ "material",
36
+ "material-ui",
37
+ "mui",
38
+ "office",
39
+ "automation",
40
+ "charting"
41
+ ],
42
+ "dependencies": {
43
+ "@sheetxl/grid-react": "^0.0.0",
44
+ "@sheetxl/io": "^0.0.0",
45
+ "@sheetxl/react": "^0.0.0",
46
+ "@sheetxl/sdk": "^0.0.0",
47
+ "@sheetxl/utils": "^0.0.0",
48
+ "@sheetxl/utils-mui": "^0.0.0",
49
+ "@sheetxl/utils-react": "^0.0.0",
50
+ "clsx": "^2.1.1",
51
+ "file-saver": "^2.0.5",
52
+ "fuse.js": "^7.0.0",
53
+ "notistack": "^3.0.1",
54
+ "react-color": "^2.19.3",
55
+ "react-error-boundary": "^6.0.0",
56
+ "react-hook-form": "^7.54.2",
57
+ "react-merge-refs": "^3.0.2",
58
+ "react-resizable": "^3.0.5",
59
+ "react-transition-group": "^4.4.5",
60
+ "react-use": "^17.6.0",
61
+ "react-virtualized": "^9.22.6",
62
+ "rooks": "^8.1.0",
63
+ "tinycolor2": "^1.6.0",
64
+ "csstype": "^3.1.3"
65
+ },
66
+ "peerDependencies": {
67
+ "@emotion/cache": "^11.14.0",
68
+ "@emotion/react": "^11.14.0",
69
+ "@emotion/styled": "^11.14.0",
70
+ "@mui/icons-material": "^6.4.2",
71
+ "@mui/material": "^6.4.2",
72
+ "@mui/styled-engine": "^6.4.2",
73
+ "@mui/system": "^6.4.2",
74
+ "@mui/utils": "^6.4.2",
75
+ "react": "^19.1.0",
76
+ "react-dom": "^19.1.0"
77
+ },
78
+ "devDependencies": {
79
+ "@types/file-saver": "^2.0.5",
80
+ "@types/react-resizable": "^3.0.8",
81
+ "@types/react-transition-group": "^4.4.6",
82
+ "@types/react-virtualized": "^9.22.0"
83
+ }
84
+ }