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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/browser/esm/0BWO0bLZ8Vm_dKd2.mjs +582 -0
  2. package/browser/esm/BAbq4-I5f5oUiNaF.mjs +141 -0
  3. package/browser/esm/BED6h6YAwCf1HEQJ.mjs +161 -0
  4. package/browser/esm/{CEvZe2cZK-voZTif.mjs → BXhNFzyEGokTF-BL.mjs} +5 -5
  5. package/browser/esm/BYE9gCDWKyx6mnVs.mjs +381 -0
  6. package/browser/esm/{DBtc4lku0uHVcqWn.mjs → BjvD_4t2KGsZP5V8.mjs} +3 -3
  7. package/browser/esm/{DU3J8Gcf-WpBxNYg.mjs → BknfGJouygmnpFIU.mjs} +4 -4
  8. package/browser/esm/{D8al_cJ4U-NgzwoK.mjs → BlE_8o8tO2AgAlaj.mjs} +19 -17
  9. package/browser/esm/BokqKEpU6TFgfRs6.mjs +252 -0
  10. package/browser/esm/{DHY19rkSiiRZxShC.mjs → Brsh5yscJ_4uKFXp.mjs} +3 -3
  11. package/browser/esm/Bujtz_Guj88d03vI.mjs +831 -0
  12. package/browser/esm/Buqcl7J75MJrhpVE.mjs +1379 -0
  13. package/browser/esm/BvhYPwX3GrRaO9CM.mjs +319 -0
  14. package/browser/esm/C0wlMAIn9iREPK6w.mjs +87 -0
  15. package/browser/esm/C8JU4KsMasmLvojI.mjs +103 -0
  16. package/browser/esm/{CjznclrKqJRi7u9O.mjs → C9pIZVACtl9unFOp.mjs} +2 -2
  17. package/browser/esm/CBD4RiRKbbZtSXV-.mjs +318 -0
  18. package/browser/esm/{Blaj2R5hYxtLAW__.mjs → CEtXsBzEjEKk9GOj.mjs} +6 -6
  19. package/browser/esm/{CIu1bjPJe_x31Oww.mjs → COlZu93LRwuBvjE-.mjs} +3 -3
  20. package/browser/esm/{CoSiOS-og0zFw4Ws.mjs → CTjqDD-swFMZzI-Y.mjs} +2 -2
  21. package/browser/esm/CWkOgdL7mOKiTR62.mjs +975 -0
  22. package/browser/esm/ChSVxkPTIjgcC8PL.mjs +412 -0
  23. package/browser/esm/{5cbK03T_Oh3tNdR7.mjs → ClBvNPeNCAhuVWrG.mjs} +1 -1
  24. package/browser/esm/CyLn6zOOp_biA3xU.mjs +335 -0
  25. package/browser/esm/CynTY0oNtyJnoaBq.mjs +14 -0
  26. package/browser/esm/{xKiLJKiLxto8SayF.mjs → D3rRUK4dIM5gUSmj.mjs} +2 -2
  27. package/browser/esm/D9ISy7VkaRRFJl46.mjs +515 -0
  28. package/browser/esm/{fb126BNj3F8URR19.mjs → DDc6rDuU9JAo1DH_.mjs} +3 -3
  29. package/browser/esm/DDczwkXhz_MHub4z.mjs +197 -0
  30. package/browser/esm/{X1Db3b_7b_7OuCk6.mjs → DEv4pIEgYr5C7etm.mjs} +1 -1
  31. package/browser/esm/DG21x7RKDpge6zAE.mjs +31 -0
  32. package/browser/esm/DJOOed_OtB-XT7f3.mjs +437 -0
  33. package/browser/esm/{9eKCkvqpMQwqcXiw.mjs → DKtJxrpN0axtuQ0l.mjs} +1 -1
  34. package/browser/esm/DRSCS6aLiYmPjUz1.mjs +1543 -0
  35. package/browser/esm/{ByeL_BZuJ2kl8gtf.mjs → DTpRkgsTm_zYnWfW.mjs} +1 -1
  36. package/browser/esm/DV6i9RQZfJiKtEaJ.mjs +2552 -0
  37. package/browser/esm/DdcZrjMLWVukWcU5.mjs +7473 -0
  38. package/browser/esm/Di3BUxA0SqFWWgeg.mjs +94 -0
  39. package/browser/esm/DnGaP5F7mLwCGUYG.mjs +408 -0
  40. package/browser/esm/DpD4fg2WcyiKX_2K.mjs +414 -0
  41. package/browser/esm/{C1Rp2hZrApo5MUc8.mjs → Ds3XRkne7HxcXD8J.mjs} +2 -2
  42. package/browser/esm/{sFOAxZpxXo-qvDSp.mjs → DsoNMWDwHZP8UXQd.mjs} +1 -1
  43. package/browser/esm/G0Inqm6Eqw47dMpa.mjs +212 -0
  44. package/browser/esm/{B1Yp_uy1vFHcJB3U.mjs → HViD4Wfoi0mmqk9w.mjs} +1 -1
  45. package/browser/esm/LZoYSQAYV2wksnDv.mjs +386 -0
  46. package/browser/esm/{CtEFHbzYNvYjDYvi.mjs → QgaAIDUMmBQBsXP9.mjs} +8 -8
  47. package/browser/esm/{D6S8kVTzOjCn0-SK.mjs → YThnrg3PadGs7B4j.mjs} +51 -51
  48. package/browser/esm/index.mjs +1028 -170
  49. package/browser/esm/ttjcNHcFn8O6hfnd.mjs +1288 -0
  50. package/browser/esm/{yZxC4qUENOlMhVUH.mjs → w_JrR69vEpvoyeMy.mjs} +1 -1
  51. package/browser/esm/{DmCQbW4zwkT_Rq88.mjs → xFqkfN8QMCxvsetB.mjs} +1 -1
  52. package/browser/esm/{IQLeaAbtGTipUsOD.mjs → zqilJefihVd7At2T.mjs} +22 -21
  53. package/licenses/dependencies.txt +94 -94
  54. package/node/esm/{BYsG3KYVmxSe_CIQ.mjs → 1bf4gn-2vld4BZ9u.mjs} +1 -1
  55. package/node/esm/{CKu1AtRgyltyEdEN.mjs → 3WghtBXAvCDwcVrq.mjs} +1 -1
  56. package/node/esm/{cqzp431iNSLWictb.mjs → 4HmLH0bPVJCZLgik.mjs} +22 -22
  57. package/node/esm/{BYVLi0md4AYuDsB_.mjs → B0bdb_6p7fQI_ivo.mjs} +28 -28
  58. package/node/esm/BIMkjQUwG4Ih-6Sh.mjs +142 -0
  59. package/node/esm/BNg4QQY0WAPLE0q7.mjs +141 -0
  60. package/node/esm/BPzcW4BejRqso338.mjs +72 -0
  61. package/node/esm/BR45ogAR-hY2bE60.mjs +318 -0
  62. package/node/esm/BlN7G0DVC24zauig.mjs +197 -0
  63. package/node/esm/{ah3CUg4-VmNstGk_.mjs → Bph-sR3l6AYWeuxK.mjs} +2 -2
  64. package/node/esm/CPq-MIdEnc-53JpF.mjs +319 -0
  65. package/node/esm/CSAnTp5rwId0DUb8.mjs +380 -0
  66. package/node/esm/CWcv7UVXF8IUB0PC.mjs +1379 -0
  67. package/node/esm/{D9rzScOA9pEYFrtz.mjs → CYIoK22I6Yvv12_x.mjs} +20 -20
  68. package/node/esm/CZyA9uD4SkTvqp_G.mjs +1283 -0
  69. package/node/esm/{ci8d-mF1H9wnYzix.mjs → CjC6s3RUJQNCF7mP.mjs} +1 -1
  70. package/node/esm/{D6oQL8knsPpgdXuk.mjs → CuMePia6i_8yfJ6S.mjs} +9 -9
  71. package/node/esm/CvRbu8JPxFarsSR-.mjs +412 -0
  72. package/node/esm/{DNSjK5DAH3M14Qbc.mjs → CyafafEgfmjLqE5O.mjs} +1 -1
  73. package/node/esm/D-xqQ5qOSd6WrzwJ.mjs +94 -0
  74. package/node/esm/DLqBHdFp6wvm6EGs.mjs +212 -0
  75. package/node/esm/{BcwMb6CyVfvEwbHn.mjs → DMXLxp3T0E0SRTQc.mjs} +1 -1
  76. package/node/esm/{DZzvTQxIKr9LbEsA.mjs → DWqvf4H5F2wMnZ0L.mjs} +32 -30
  77. package/node/esm/DatM6eEYPpAtIMy-.mjs +405 -0
  78. package/node/esm/Db3dbaYLKUO66T9s.mjs +1689 -0
  79. package/node/esm/{B_jRGdwGFkudwmL-.mjs → DdEzhVqYTrGODXrz.mjs} +1 -1
  80. package/node/esm/DeZJlLk8WJ3BLtLs.mjs +975 -0
  81. package/node/esm/DfCuL8AUxMFoEG2s.mjs +519 -0
  82. package/node/esm/{Bb1sLMqXWKjdve23.mjs → Do-zCKziWhoG5eAv.mjs} +2 -2
  83. package/node/esm/{B8SQfjKjzYHLxzZR.mjs → DpJ2gmZJioCyq8La.mjs} +67 -67
  84. package/node/esm/{ETK6T6G0SIcFXDe5.mjs → XEDcegsv5AGKBfu2.mjs} +40 -40
  85. package/node/esm/index.mjs +8941 -13558
  86. package/node/esm/yCUxQuqVuC4DHKPx.mjs +385 -0
  87. package/node/esm/zITjZ7R4raDqhP-n.mjs +515 -0
  88. package/package.json +9 -9
  89. package/resources/locales/de/ui.msg.json +97 -0
  90. package/resources/locales/en/ui.msg.json +97 -0
  91. package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +4 -4
  92. package/types/src/anomalies/AnomaliesPlugin.d.ts +5 -0
  93. package/types/src/anomalies/AnomaliesTaskPane.d.ts +17 -0
  94. package/types/src/anomalies/index.d.ts +3 -0
  95. package/types/src/border/BorderTemplateIcon.d.ts +6 -1
  96. package/types/src/chart/ChartFormatPanel.d.ts +20 -0
  97. package/types/src/chart/ChartPlugin.d.ts +6 -0
  98. package/types/src/chart/index.d.ts +3 -0
  99. package/types/src/comments/CommentCard.d.ts +2 -2
  100. package/types/src/conditions/useFormulaOption.d.ts +2 -2
  101. package/types/src/dialog/WorkbookStatisticsDialog.d.ts +1 -1
  102. package/types/src/format/BorderPreview.d.ts +11 -4
  103. package/types/src/format/useFormatSelection.d.ts +4 -4
  104. package/types/src/formulaBar/MobileFormulaBar.d.ts +18 -6
  105. package/types/src/formulaBar/MobileInputToolbar.d.ts +9 -3
  106. package/types/src/formulaBar/useFormulaBarSession.d.ts +6 -3
  107. package/types/src/index.d.ts +15 -6
  108. package/types/src/protection/ProtectedCellsPanel.d.ts +2 -2
  109. package/types/src/protection/{SheetProtectionPanel.d.ts → WorksheetProtectionPanel.d.ts} +6 -6
  110. package/types/src/protection/index.d.ts +1 -1
  111. package/types/src/slicer/PresetSlicerStylesCommandButton.d.ts +2 -2
  112. package/types/src/workbook/DefaultRenderers.d.ts +2 -2
  113. package/types/src/workbook/WorkbookContextMenu.d.ts +4 -0
  114. package/browser/esm/Biy7bhzzzPb5sfRN.mjs +0 -152
  115. package/browser/esm/COv-m-c2byCgvU3M.mjs +0 -14861
  116. package/browser/esm/Die9NXVFveHvcCT-.mjs +0 -4205
  117. package/browser/esm/sam1KGQZ59B_fADz.mjs +0 -1941
  118. package/node/esm/BYwXhrEwkRAt9nJS.mjs +0 -71
  119. package/node/esm/Cmt8Wv806N7NmE4Y.mjs +0 -3344
@@ -0,0 +1,212 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.11
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { ICellRange as e } from "@sheetxl/sdk";
8
+ import { addRangeAnnotations as r, clearRangeAnnotations as o, useModelListener as a } from "@sheetxl/react";
9
+ import { DynamicIcon as n } from "@sheetxl/utils-react";
10
+ import { memo as t, useEffect as l, useState as s } from "react";
11
+ import { SimpleTooltip as i } from "@sheetxl/utils-mui";
12
+ import { jsx as c, jsxs as d } from "react/jsx-runtime";
13
+ import { Box as m, Button as u, Chip as h, IconButton as p, Typography as x } from "@mui/material";
14
+ var f = "anomalies", g = {
15
+ formula: "Inconsistent formula",
16
+ formulaRange: "Omits adjacent cells",
17
+ numberStoredAsText: "Number stored as text",
18
+ emptyCellReference: "Refers to an empty cell",
19
+ unlockedFormula: "Unlocked formula",
20
+ hardcodeInRun: "Typed value in a run of formulas",
21
+ styleBreak: "Format break"
22
+ }, y = (e, r) => `'${e.getName().replace(/'/g, "''")}'!${r}`, v = (e) => {
23
+ const r = e.evidence, o = [];
24
+ return void 0 !== r.axis && o.push("row" === r.axis ? "run left and right" : "run above and below"), void 0 !== r.expected && o.push(`run has ${r.expected}`), void 0 !== r.actual && o.push(`here ${r.actual}`), void 0 !== r.reference && o.push(`reads ${r.reference}`), void 0 !== r.omitted && o.push(`stops before ${r.omitted}`), Number(r.thickness) > 1 && o.push(`${r.thickness} thick`), 1 === Number(r.flanks) && o.push("one cell each side"), o.join(" · ");
25
+ }, w = t((t) => {
26
+ const { model: w, args: k, entryKey: b, frame: $, ref: C, ...N } = t, [S, A] = s(() => w?.getSelectedWorksheet() ?? null);
27
+ a(w, { onSheetsChange() {
28
+ A(w?.getSelectedWorksheet() ?? null);
29
+ } });
30
+ const [R, W] = s(null), [D, z] = s(() => /* @__PURE__ */ new Set()), [I, T] = s(0), [j, E] = s(S);
31
+ j !== S && (E(S), W(null), z(/* @__PURE__ */ new Set()));
32
+ const F = () => {
33
+ w && o(w, {
34
+ intent: "working",
35
+ source: f
36
+ });
37
+ };
38
+ if (l(() => F, [w]), !w || !S) return null;
39
+ const M = R?.filter((e) => !D.has(e.key)) ?? [], B = M.reduce((e, r) => e + r.rows * r.cols, 0);
40
+ return d(m, {
41
+ ref: C,
42
+ ...N,
43
+ className: "sxl-anomalies-pane",
44
+ sx: {
45
+ display: "flex",
46
+ flexDirection: "column",
47
+ width: "100%",
48
+ minWidth: 0,
49
+ flex: "1 1 auto",
50
+ height: "100%",
51
+ minHeight: 0,
52
+ overflowX: "hidden"
53
+ },
54
+ children: [d(m, {
55
+ sx: {
56
+ display: "flex",
57
+ alignItems: "center",
58
+ gap: 1,
59
+ flex: "0 0 auto",
60
+ px: 1.5,
61
+ py: 1,
62
+ borderBottom: 1,
63
+ borderColor: "divider"
64
+ },
65
+ children: [c(u, {
66
+ variant: "contained",
67
+ size: "small",
68
+ sx: { textTransform: "none" },
69
+ onClick: () => {
70
+ F();
71
+ const r = performance.now();
72
+ W(((r) => {
73
+ const o = r.getUsedRange();
74
+ return o ? [...o.getRegions(e.Feature.Anomalies)].map((e) => {
75
+ const r = e.getCoords();
76
+ return {
77
+ key: `${r.rowStart},${r.colStart},${r.rowEnd},${r.colEnd}`,
78
+ coords: r,
79
+ address: e.getAddress(),
80
+ rows: e.getRowCount(),
81
+ cols: e.getColumnCount(),
82
+ anomalies: e.getCell().getAnomalies()
83
+ };
84
+ }) : [];
85
+ })(S)), T(Math.round(performance.now() - r)), z(/* @__PURE__ */ new Set());
86
+ },
87
+ children: "Analyze"
88
+ }), c(x, {
89
+ variant: "body2",
90
+ sx: {
91
+ color: "text.secondary",
92
+ minWidth: 0,
93
+ overflow: "hidden",
94
+ textOverflow: "ellipsis",
95
+ whiteSpace: "nowrap"
96
+ },
97
+ children: null === R ? S.getName() : `${S.getName()} · ${M.length} regions · ${B} cells · ${I} ms`
98
+ })]
99
+ }), d(m, {
100
+ className: "sxl-anomalies-list",
101
+ sx: {
102
+ flex: "1 1 auto",
103
+ minHeight: 0,
104
+ overflowY: "auto",
105
+ display: "flex",
106
+ flexDirection: "column",
107
+ gap: 1,
108
+ p: 1.5
109
+ },
110
+ onMouseLeave: F,
111
+ children: [null === R ? c(x, {
112
+ variant: "body2",
113
+ sx: { color: "text.secondary" },
114
+ children: "Analyze lists where this sheet breaks its own patterns."
115
+ }) : 0 === M.length ? c(x, {
116
+ variant: "body2",
117
+ sx: { color: "text.secondary" },
118
+ children: "Nothing breaks a pattern here."
119
+ }) : null, M.map((e) => d(m, {
120
+ className: "sxl-anomalies-card",
121
+ onMouseEnter: () => ((e) => {
122
+ r(w, "working", [{ range: y(S, e.address) }], { source: f });
123
+ })(e),
124
+ onClick: () => {
125
+ S.getRange(e.coords).select();
126
+ },
127
+ sx: {
128
+ display: "flex",
129
+ flexDirection: "column",
130
+ gap: .5,
131
+ flex: "0 0 auto",
132
+ border: 1,
133
+ borderColor: "divider",
134
+ borderRadius: 1,
135
+ px: 1.25,
136
+ py: 1,
137
+ cursor: "pointer",
138
+ "&:hover": { borderColor: "primary.main" }
139
+ },
140
+ children: [d(m, {
141
+ sx: {
142
+ display: "flex",
143
+ alignItems: "center",
144
+ gap: 1
145
+ },
146
+ children: [
147
+ c(x, {
148
+ variant: "body2",
149
+ sx: { fontWeight: 600 },
150
+ children: e.address
151
+ }),
152
+ c(x, {
153
+ variant: "caption",
154
+ sx: { color: "text.secondary" },
155
+ children: `${e.rows}×${e.cols} · rank ${e.anomalies[0]?.rank ?? 0}`
156
+ }),
157
+ c(m, { sx: { flex: "1 1 auto" } }),
158
+ c(i, {
159
+ disableInteractive: !0,
160
+ title: "Dismiss",
161
+ children: c(p, {
162
+ size: "small",
163
+ "aria-label": "Dismiss",
164
+ onClick: (r) => {
165
+ r.stopPropagation(), F(), z((r) => new Set(r).add(e.key));
166
+ },
167
+ children: c(n, { iconKey: "Close" })
168
+ })
169
+ })
170
+ ]
171
+ }), e.anomalies.map((e, r) => {
172
+ const o = e.evidence.corroborated, a = e.evidence.layer;
173
+ return d(m, {
174
+ sx: {
175
+ display: "flex",
176
+ flexDirection: "column",
177
+ gap: .25
178
+ },
179
+ children: [
180
+ c(x, {
181
+ variant: "body2",
182
+ children: `${g[e.check] ?? e.check}${a ? ` · ${a}` : ""}`
183
+ }),
184
+ c(x, {
185
+ variant: "caption",
186
+ sx: {
187
+ color: "text.secondary",
188
+ overflowWrap: "anywhere"
189
+ },
190
+ children: v(e)
191
+ }),
192
+ Array.isArray(o) && o.length > 0 ? c(m, {
193
+ sx: {
194
+ display: "flex",
195
+ flexWrap: "wrap",
196
+ gap: .5
197
+ },
198
+ children: o.map((e) => c(h, {
199
+ size: "small",
200
+ variant: "outlined",
201
+ label: e
202
+ }, e))
203
+ }) : null
204
+ ]
205
+ }, r);
206
+ })]
207
+ }, e.key))]
208
+ })]
209
+ });
210
+ });
211
+ w.displayName = "AnomaliesTaskPane";
212
+ export { w as AnomaliesTaskPane, w as default };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.10
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.11
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.
@@ -1,12 +1,12 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.10
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.11
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
7
  import { ScalarType as t } from "@sheetxl/sdk";
8
- import { useTranslator as e } from "@sheetxl/utils-react";
9
- import { Fragment as o, memo as r, useMemo as i } from "react";
8
+ import { useTranslator as o } from "@sheetxl/utils-react";
9
+ import { Fragment as e, memo as r, useMemo as i } from "react";
10
10
  import { OptionsDialog as a } from "@sheetxl/utils-mui";
11
11
  import { jsx as l, jsxs as n } from "react/jsx-runtime";
12
12
  import { Box as s, Typography as c } from "@mui/material";
@@ -17,54 +17,56 @@ var u = ["Ok"], g = [
17
17
  t.Boolean,
18
18
  t.Error
19
19
  ], p = r((r) => {
20
- const { context: p, onDone: m, options: b = u, defaultOption: k = b?.[0], sx: S, ...x } = r, y = e(), h = i(() => {
21
- const e = p?.().getWorkbook();
22
- if (!e) return null;
23
- const o = (e) => {
24
- const o = e.getTypedCounts(g);
20
+ const { context: p, onDone: m, options: b = u, defaultOption: k = b?.[0], sx: S, ...x } = r, y = o(), h = i(() => {
21
+ const o = p?.().getWorkbook();
22
+ if (!o) return null;
23
+ const e = (o) => {
24
+ const e = o.getTypedCounts(g);
25
25
  return [
26
26
  {
27
27
  labelKey: d("workbookStatistics.cellsWithData"),
28
- value: e.getCount().toLocaleString()
28
+ value: o.getCount().toLocaleString()
29
29
  },
30
30
  {
31
31
  labelKey: d("workbookStatistics.numbers"),
32
- value: (o[t.Number] ?? 0).toLocaleString()
32
+ value: (e[t.Number] ?? 0).toLocaleString()
33
33
  },
34
34
  {
35
35
  labelKey: d("workbookStatistics.text"),
36
- value: (o[t.String] ?? 0).toLocaleString()
36
+ value: (e[t.String] ?? 0).toLocaleString()
37
37
  },
38
38
  {
39
39
  labelKey: d("workbookStatistics.booleans"),
40
- value: (o[t.Boolean] ?? 0).toLocaleString()
40
+ value: (e[t.Boolean] ?? 0).toLocaleString()
41
41
  },
42
42
  {
43
43
  labelKey: d("workbookStatistics.errors"),
44
- value: (o[t.Error] ?? 0).toLocaleString()
44
+ value: (e[t.Error] ?? 0).toLocaleString()
45
45
  }
46
46
  ];
47
- }, r = e.getSelectedSheet(), i = r.getUsedRange()?.getCoords(), a = i ? r.getRange({
48
- rowStart: i.rowEnd,
49
- colStart: i.colEnd,
50
- rowEnd: i.rowEnd,
51
- colEnd: i.colEnd
47
+ }, r = {
48
+ titleKey: d("workbookStatistics.workbook"),
49
+ subTitle: null,
50
+ rows: [{
51
+ labelKey: d("workbookStatistics.sheets"),
52
+ value: o.getWorksheets().getCount().toLocaleString()
53
+ }, ...e(o.getStats({ onError: "ignore" }))]
54
+ }, i = o.getSelectedWorksheet();
55
+ if (!i) return [r];
56
+ const a = i.getUsedRange()?.getCoords(), l = a ? i.getRange({
57
+ rowStart: a.rowEnd,
58
+ colStart: a.colEnd,
59
+ rowEnd: a.rowEnd,
60
+ colEnd: a.colEnd
52
61
  }).getAddress() : "–";
53
62
  return [{
54
63
  titleKey: d("workbookStatistics.currentSheet"),
55
- subTitle: r.getName(),
64
+ subTitle: i.getName(),
56
65
  rows: [{
57
66
  labelKey: d("workbookStatistics.endOfSheet"),
58
- value: a
59
- }, ...o(r.getStats({ onError: "ignore" }))]
60
- }, {
61
- titleKey: d("workbookStatistics.workbook"),
62
- subTitle: null,
63
- rows: [{
64
- labelKey: d("workbookStatistics.sheets"),
65
- value: e.getSheets().getCount().toLocaleString()
66
- }, ...o(e.getStats({ onError: "ignore" }))]
67
- }];
67
+ value: l
68
+ }, ...e(i.getStats({ onError: "ignore" }))]
69
+ }, r];
68
70
  }, [p]);
69
71
  return l(a, {
70
72
  title: y("workbookStatistics.title"),
@@ -107,7 +109,7 @@ var u = ["Ok"], g = [
107
109
  columnGap: (t) => t.spacing(2),
108
110
  rowGap: (t) => t.spacing(.25)
109
111
  },
110
- children: t.rows.map((t) => n(o, { children: [l(c, {
112
+ children: t.rows.map((t) => n(e, { children: [l(c, {
111
113
  variant: "body2",
112
114
  component: "div",
113
115
  color: "text.secondary",