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

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 (150) hide show
  1. package/browser/esm/{ByeL_BZuJ2kl8gtf.mjs → 0IBZhOJaVmzJxuTv.mjs} +1 -1
  2. package/browser/esm/2nRxqrNYbmEn8fS8.mjs +386 -0
  3. package/browser/esm/{fb126BNj3F8URR19.mjs → 7fVZXXuonYb6Z7FU.mjs} +3 -3
  4. package/browser/esm/BAzhmMX4Fk_qnUTp.mjs +414 -0
  5. package/browser/esm/BGL3x0W74D7qZXlf.mjs +318 -0
  6. package/browser/esm/BHGr2gsFofTdAFxq.mjs +515 -0
  7. package/browser/esm/{DU3J8Gcf-WpBxNYg.mjs → BKhcJI-G15D3kGap.mjs} +4 -4
  8. package/browser/esm/BNbub9weuqm3mcoF.mjs +335 -0
  9. package/browser/esm/BSv9MVJaz1DVEffm.mjs +975 -0
  10. package/browser/esm/BWfLpYmd3cSgJ0C6.mjs +141 -0
  11. package/browser/esm/BZqwbIE8qzjSOYcJ.mjs +582 -0
  12. package/browser/esm/BZy9xUrYpAtnKeji.mjs +1288 -0
  13. package/browser/esm/{CIu1bjPJe_x31Oww.mjs → BnkwC5rsg9LZyhoP.mjs} +3 -3
  14. package/browser/esm/BpJsBv413cNQpyg0.mjs +319 -0
  15. package/browser/esm/BpVrgbVISiTDyFR3.mjs +197 -0
  16. package/browser/esm/BsngRDhvVYGVBJeK.mjs +1546 -0
  17. package/browser/esm/{C1Rp2hZrApo5MUc8.mjs → C29TKq47CbXs652l.mjs} +2 -2
  18. package/browser/esm/{CEvZe2cZK-voZTif.mjs → C8p2iMad_NNCwGI_.mjs} +5 -5
  19. package/browser/esm/CBzXksWnb-1gGEWZ.mjs +212 -0
  20. package/browser/esm/{IQLeaAbtGTipUsOD.mjs → CFIAWgpU3UyepLBn.mjs} +25 -24
  21. package/browser/esm/CJD4jF4m9cBGHzr_.mjs +31 -0
  22. package/browser/esm/{CjznclrKqJRi7u9O.mjs → CMc7G7cevxzPGxr9.mjs} +2 -2
  23. package/browser/esm/{B1Yp_uy1vFHcJB3U.mjs → CYtULLhY9M2m3DeH.mjs} +1 -1
  24. package/browser/esm/CeF35ZeFP28Do5Zx.mjs +1379 -0
  25. package/browser/esm/{xKiLJKiLxto8SayF.mjs → CjYKDxU4EP2Kf_vo.mjs} +2 -2
  26. package/browser/esm/{D8al_cJ4U-NgzwoK.mjs → Cq82lvdjyBvlJ8xJ.mjs} +19 -17
  27. package/browser/esm/{X1Db3b_7b_7OuCk6.mjs → CuRxFAO42JkQvMEx.mjs} +1 -1
  28. package/browser/esm/Cvk2yY90hpgXWMAt.mjs +103 -0
  29. package/browser/esm/D0slJycx3nq53qmf.mjs +14 -0
  30. package/browser/esm/{9eKCkvqpMQwqcXiw.mjs → D2jzliMwAo2ENpfi.mjs} +1 -1
  31. package/browser/esm/D5Fn0Hqllwv5HY6i.mjs +7581 -0
  32. package/browser/esm/D5N4nGaZsXtrHAOh.mjs +831 -0
  33. package/browser/esm/D7AqPfyhMiuda5l5.mjs +412 -0
  34. package/browser/esm/DHZA48ZMCETvHmeP.mjs +161 -0
  35. package/browser/esm/DX2_vf7WX6uRLaOZ.mjs +94 -0
  36. package/browser/esm/DaxpbAF1ShkT7hNU.mjs +490 -0
  37. package/browser/esm/{D6S8kVTzOjCn0-SK.mjs → Db3oHfXiRtcH015t.mjs} +162 -156
  38. package/browser/esm/Dt47Huh1l3C4_5_w.mjs +87 -0
  39. package/browser/esm/{DmCQbW4zwkT_Rq88.mjs → DtPt0phL7m56YfHZ.mjs} +1 -1
  40. package/browser/esm/{CoSiOS-og0zFw4Ws.mjs → DtTDaXmnWUoG4VBO.mjs} +2 -2
  41. package/browser/esm/{DHY19rkSiiRZxShC.mjs → DuuyN4-7K6_io2Py.mjs} +3 -3
  42. package/browser/esm/{yZxC4qUENOlMhVUH.mjs → NeGeLF3gbGMZyV6E.mjs} +1 -1
  43. package/browser/esm/PY3Br5Bo_TxcCnCU.mjs +252 -0
  44. package/browser/esm/WIhvQtBkGiw-oFUs.mjs +2566 -0
  45. package/browser/esm/WgIvwAENeO8LANax.mjs +437 -0
  46. package/browser/esm/{DBtc4lku0uHVcqWn.mjs → Yjq3p_7eVGFw2Jod.mjs} +3 -3
  47. package/browser/esm/index.mjs +1053 -192
  48. package/browser/esm/jFRFCWlkD7Dsrhkh.mjs +236 -0
  49. package/browser/esm/lKXEDVt2ow1NlWJj.mjs +392 -0
  50. package/browser/esm/{Blaj2R5hYxtLAW__.mjs → oC0OwOddhOD0OoCJ.mjs} +6 -6
  51. package/browser/esm/{sFOAxZpxXo-qvDSp.mjs → tIKqpsA0vNXH9EgU.mjs} +1 -1
  52. package/browser/esm/{5cbK03T_Oh3tNdR7.mjs → u84rSnESjxqB6gay.mjs} +1 -1
  53. package/licenses/dependencies.txt +94 -94
  54. package/node/esm/{BcwMb6CyVfvEwbHn.mjs → B8Ls4Eh1k8-Yiry_.mjs} +1 -1
  55. package/node/esm/{CKu1AtRgyltyEdEN.mjs → B9X3n8MglL4OitAV.mjs} +1 -1
  56. package/node/esm/{ETK6T6G0SIcFXDe5.mjs → BBGoyqs2L_ccSH1e.mjs} +40 -40
  57. package/node/esm/BLv99aovW4R3C5PE.mjs +515 -0
  58. package/node/esm/BUGU_5lUtnCRlp3n.mjs +519 -0
  59. package/node/esm/BalROFG_oa9PFs9Q.mjs +141 -0
  60. package/node/esm/{ah3CUg4-VmNstGk_.mjs → BqVxnA1mo52ubjdf.mjs} +2 -2
  61. package/node/esm/C3FCh9xju2SccUIE.mjs +1283 -0
  62. package/node/esm/{Bb1sLMqXWKjdve23.mjs → C4F6WY8M4nkLyxdb.mjs} +2 -2
  63. package/node/esm/CKWeipCqqpLnLE5e.mjs +391 -0
  64. package/node/esm/CTnVNfz4eqFnM92M.mjs +212 -0
  65. package/node/esm/Cfi_ly8fBDZZdiZT.mjs +72 -0
  66. package/node/esm/CgKa6JuyJ1tTodev.mjs +1703 -0
  67. package/node/esm/{cqzp431iNSLWictb.mjs → Cq53M7bAUSXMNq1f.mjs} +22 -22
  68. package/node/esm/{BYsG3KYVmxSe_CIQ.mjs → Cr8AYWUoU-XVt0hu.mjs} +1 -1
  69. package/node/esm/CyuOE595I2e-U4cG.mjs +236 -0
  70. package/node/esm/D72CupF9mfy2D1Xa.mjs +94 -0
  71. package/node/esm/{DNSjK5DAH3M14Qbc.mjs → DGDHFK8okuVbRCe5.mjs} +1 -1
  72. package/node/esm/{B8SQfjKjzYHLxzZR.mjs → DJFkALt4XrwkMbnU.mjs} +163 -157
  73. package/node/esm/DJpwI8PlKBI2rk0r.mjs +319 -0
  74. package/node/esm/{DZzvTQxIKr9LbEsA.mjs → DQaGPUYbgL4Y5YZW.mjs} +32 -30
  75. package/node/esm/{D9rzScOA9pEYFrtz.mjs → DsNYnq4NtYBxPmeA.mjs} +20 -20
  76. package/node/esm/DygDgOpa9sJ6YFVS.mjs +385 -0
  77. package/node/esm/Dz0Hg87UcJ-awwiI.mjs +489 -0
  78. package/node/esm/M7YxvRPGCuxuk9aK.mjs +142 -0
  79. package/node/esm/QNjtpX8rIpqGGLEJ.mjs +1379 -0
  80. package/node/esm/{B_jRGdwGFkudwmL-.mjs → ZzvsynJTCSuChYS-.mjs} +1 -1
  81. package/node/esm/{ci8d-mF1H9wnYzix.mjs → di_8-pXh90j4BO4j.mjs} +1 -1
  82. package/node/esm/dm8dmEaTIqfmgyeL.mjs +412 -0
  83. package/node/esm/{D6oQL8knsPpgdXuk.mjs → fmya3XQnTGyQisvT.mjs} +2 -2
  84. package/node/esm/gPYAb_A0T5ZwcQ1E.mjs +318 -0
  85. package/node/esm/index.mjs +8915 -13417
  86. package/node/esm/wB8xMpyJ_NvE16yG.mjs +975 -0
  87. package/node/esm/zGAcd4Jr7wkvXDBS.mjs +197 -0
  88. package/package.json +9 -9
  89. package/resources/locales/de/groups.cmd.json +4 -0
  90. package/resources/locales/de/ui.msg.json +100 -1
  91. package/resources/locales/en/groups.cmd.json +4 -0
  92. package/resources/locales/en/ui.msg.json +100 -1
  93. package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +4 -4
  94. package/types/src/anomalies/AnomaliesPlugin.d.ts +5 -0
  95. package/types/src/anomalies/AnomaliesTaskPane.d.ts +17 -0
  96. package/types/src/anomalies/index.d.ts +3 -0
  97. package/types/src/border/BorderPopupButton.d.ts +1 -1
  98. package/types/src/border/BorderTemplateIcon.d.ts +6 -1
  99. package/types/src/chart/ChartFormatPanel.d.ts +20 -0
  100. package/types/src/chart/ChartPlugin.d.ts +6 -0
  101. package/types/src/chart/index.d.ts +3 -0
  102. package/types/src/color/ColorPopupButton.d.ts +1 -1
  103. package/types/src/command/AccountingStyleCommandButton.d.ts +1 -1
  104. package/types/src/command/DocThemeCommandButton.d.ts +1 -1
  105. package/types/src/command/FontFamilyCommandButton.d.ts +1 -1
  106. package/types/src/command/FontSizeCommandButton.d.ts +1 -1
  107. package/types/src/command/InsertCellControlCommandButton.d.ts +17 -0
  108. package/types/src/command/LanguageCommandButton.d.ts +1 -1
  109. package/types/src/command/LocaleCommandButton.d.ts +1 -1
  110. package/types/src/command/index.d.ts +1 -0
  111. package/types/src/comments/CommentCard.d.ts +2 -2
  112. package/types/src/conditionalFormat/IconPickerPopupButton.d.ts +1 -1
  113. package/types/src/conditions/ConditionEditor.d.ts +1 -1
  114. package/types/src/conditions/OperatorAndParamEditor.d.ts +1 -1
  115. package/types/src/conditions/OperatorSelectPopupButton.d.ts +1 -1
  116. package/types/src/conditions/useFormulaOption.d.ts +2 -2
  117. package/types/src/dialog/WorkbookStatisticsDialog.d.ts +1 -1
  118. package/types/src/fill/PatternPopupButton.d.ts +1 -1
  119. package/types/src/format/BorderPreview.d.ts +11 -4
  120. package/types/src/format/useFormatSelection.d.ts +4 -4
  121. package/types/src/formulaBar/IFormulaBar.d.ts +4 -2
  122. package/types/src/formulaBar/MobileFormulaBar.d.ts +18 -6
  123. package/types/src/formulaBar/MobileInputToolbar.d.ts +9 -3
  124. package/types/src/formulaBar/useFormulaBarSession.d.ts +6 -3
  125. package/types/src/index.d.ts +15 -6
  126. package/types/src/itemsPanel/ItemsPanel.d.ts +5 -0
  127. package/types/src/named/NamedDetailsPanel.d.ts +2 -2
  128. package/types/src/protection/ProtectedCellsPanel.d.ts +2 -2
  129. package/types/src/protection/{SheetProtectionPanel.d.ts → WorksheetProtectionPanel.d.ts} +6 -6
  130. package/types/src/protection/index.d.ts +1 -1
  131. package/types/src/slicer/PresetSlicerStylesCommandButton.d.ts +2 -2
  132. package/types/src/statusBar/PendingStatus.d.ts +19 -0
  133. package/types/src/statusBar/index.d.ts +1 -0
  134. package/types/src/studio/StudioProps.d.ts +10 -10
  135. package/types/src/template/TemplatePanel.d.ts +5 -1
  136. package/types/src/theme/ThemeSelectPopupButton.d.ts +1 -1
  137. package/types/src/toolbar/WorkbookToolbars.d.ts +1 -1
  138. package/types/src/workbook/DefaultRenderers.d.ts +31 -19
  139. package/types/src/workbook/WorkbookContextMenu.d.ts +4 -0
  140. package/types/src/workbook/WorkbookElement.d.ts +5 -4
  141. package/types/src/workbook/WorkbookStrip.d.ts +8 -7
  142. package/types/src/workbook/index.d.ts +1 -1
  143. package/browser/esm/Biy7bhzzzPb5sfRN.mjs +0 -152
  144. package/browser/esm/COv-m-c2byCgvU3M.mjs +0 -14861
  145. package/browser/esm/CtEFHbzYNvYjDYvi.mjs +0 -236
  146. package/browser/esm/Die9NXVFveHvcCT-.mjs +0 -4205
  147. package/browser/esm/sam1KGQZ59B_fADz.mjs +0 -1941
  148. package/node/esm/BYVLi0md4AYuDsB_.mjs +0 -236
  149. package/node/esm/BYwXhrEwkRAt9nJS.mjs +0 -71
  150. package/node/esm/Cmt8Wv806N7NmE4Y.mjs +0 -3344
@@ -0,0 +1,515 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.12
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 { ColorPopupButton as e } from "./index.mjs";
8
+ import { a, c as t, i as n, o as r, t as l } from "./gPYAb_A0T5ZwcQ1E.mjs";
9
+ import { t as s } from "./BUGU_5lUtnCRlp3n.mjs";
10
+ import { IFill as i } from "@sheetxl/sdk";
11
+ import { useGridColorScheme as o } from "@sheetxl/react";
12
+ import { useCallbackRef as c, useTranslator as h } from "@sheetxl/utils-react";
13
+ import { memo as d, useEffect as p, useReducer as u, useState as m } from "react";
14
+ import { Fragment as g, jsx as b, jsxs as y } from "react/jsx-runtime";
15
+ import { Box as v, Checkbox as x, FormControl as C, FormControlLabel as S, InputLabel as w, MenuItem as k, Select as B, TextField as f, Typography as L } from "@mui/material";
16
+ var E = (e) => b(L, {
17
+ variant: "subtitle2",
18
+ component: "div",
19
+ children: e.children
20
+ }), T = (e, a) => {
21
+ const t = a.getChart(), n = a.getPath(), r = a.getParent(), l = () => r ? T(e, r) : "", s = Number(n.split("/").pop());
22
+ switch (a.getElementType()) {
23
+ case "chartArea": return e("chart.pane.element.chartArea");
24
+ case "title": return e("chart.pane.element.title");
25
+ case "legend": return e("chart.pane.element.legend");
26
+ case "legendEntry": return e("chart.pane.element.legendEntry", { index: s + 1 });
27
+ case "plotArea": return e("chart.pane.element.plotArea");
28
+ case "dataTable": return e("chart.pane.element.dataTable");
29
+ case "axis": return ((e, a, t) => {
30
+ const [, n, r] = t.split("/"), l = ((e) => /^(bar|3DBar)/.test(e.getChartType()))(a), s = "category" === r ? !l : "value" !== r || l, i = "series" === r ? e("chart.pane.axisKind.series") : ((e) => /^(xyscatter|bubble)/.test(e.getChartType()))(a) || "value" === r ? e("chart.pane.axisKind.value") : e("chart.pane.axisKind.category"), o = e("chart.pane.axis", {
31
+ side: e(s ? "chart.pane.axisSide.horizontal" : "chart.pane.axisSide.vertical"),
32
+ kind: i
33
+ });
34
+ return "secondary" === n ? e("chart.pane.secondary", { label: o }) : o;
35
+ })(e, t, n);
36
+ case "axisTitle": return e("chart.pane.element.axisTitle", { axis: l() });
37
+ case "gridlines": return n.endsWith("minorGridlines") ? e("chart.pane.element.minorGridlines", { axis: l() }) : e("chart.pane.element.majorGridlines", { axis: l() });
38
+ case "series": return e("chart.pane.element.series", { name: a.getName() ?? "" });
39
+ case "point": return e("chart.pane.element.point", {
40
+ series: l(),
41
+ index: s + 1
42
+ });
43
+ case "marker": return e("chart.pane.element.marker", { owner: l() });
44
+ case "dataLabels": return "series" === r?.getElementType() ? e("chart.pane.element.dataLabels", { series: l() }) : e("chart.pane.element.allDataLabels");
45
+ case "dataLabel": return e("chart.pane.element.dataLabel", { point: l() });
46
+ case "trendline": return e("chart.pane.element.trendline", {
47
+ series: l(),
48
+ index: s + 1
49
+ });
50
+ case "trendlineLabel": return e("chart.pane.element.trendlineLabel", { trendline: l() });
51
+ case "errorBars": return n.endsWith("/x") ? e("chart.pane.element.xErrorBars", { series: l() }) : e("chart.pane.element.yErrorBars", { series: l() });
52
+ case "chartGroup": return e("chart.pane.element.group", { index: s + 1 });
53
+ case "upDownBars": return e("chart.pane.element.upDownBars");
54
+ case "hiLoLines": return e("chart.pane.element.hiLoLines");
55
+ case "dropLines": return e("chart.pane.element.dropLines");
56
+ case "seriesLines": return e("chart.pane.element.seriesLines");
57
+ default: return n;
58
+ }
59
+ }, V = (e, a) => {
60
+ const t = e.getStroke().getFill();
61
+ return t.getType() === i.Type.Solid ? t.getColor() : a.getNormal().getFont().getColor();
62
+ }, P = (e) => {
63
+ const { style: a, sheet: t, disabled: n, label: r } = e, i = h(), c = t.getStyles(), d = "dark" === o(), p = {
64
+ fill: a.getFill(),
65
+ styles: c,
66
+ schemeLookup: c.schemeLookup(),
67
+ darkMode: d,
68
+ disabled: n,
69
+ createCell: (e) => t.createCell(e),
70
+ applyFill: (e, t) => {
71
+ a.setFill(e, { description: t });
72
+ }
73
+ }, u = {
74
+ stroke: a.getStroke(),
75
+ stated: a.toJSON()?.stroke ?? null,
76
+ autoColor: V(a, c),
77
+ styles: c,
78
+ schemeLookup: c.schemeLookup(),
79
+ darkMode: d,
80
+ disabled: n,
81
+ applyStroke: (e, t) => {
82
+ a.setStroke(e, { description: t });
83
+ }
84
+ };
85
+ return y(g, { children: [
86
+ r ? b(E, { children: r }) : null,
87
+ b(E, { children: i("shape.pane.fill") }),
88
+ b(l, { selection: p }),
89
+ b(E, { children: i("shape.pane.line") }),
90
+ b(s, { selection: u })
91
+ ] });
92
+ }, F = (e) => y(C, {
93
+ size: "small",
94
+ fullWidth: !0,
95
+ disabled: e.disabled,
96
+ children: [b(w, { children: e.label }), b(B, {
97
+ label: e.label,
98
+ value: e.value,
99
+ onChange: (a) => e.onChange(a.target.value),
100
+ children: e.options.map((a) => b(k, {
101
+ value: a,
102
+ children: e.labels[a] ?? a
103
+ }, a))
104
+ })]
105
+ }), A = (e) => b(S, {
106
+ label: e.label,
107
+ disabled: e.disabled,
108
+ control: b(x, {
109
+ size: "small",
110
+ checked: e.checked,
111
+ onChange: (a) => e.onChange(a.target.checked)
112
+ })
113
+ }), N = (e) => {
114
+ const [a, t] = m(null), n = () => {
115
+ null !== a && a !== e.value && e.onCommit(a), t(null);
116
+ };
117
+ return b(f, {
118
+ size: "small",
119
+ fullWidth: !0,
120
+ label: e.label,
121
+ disabled: e.disabled,
122
+ value: a ?? e.value,
123
+ onChange: (e) => t(e.target.value),
124
+ onBlur: n,
125
+ onKeyDown: (e) => {
126
+ "Enter" === e.key && n();
127
+ }
128
+ });
129
+ }, D = [
130
+ "none",
131
+ "single",
132
+ "double"
133
+ ], O = [
134
+ "none",
135
+ "single",
136
+ "double"
137
+ ], z = (t) => {
138
+ const { font: l, styles: s, disabled: i, run: d } = t, p = h(), u = "dark" === o(), m = c(() => s.recentColors(), [s]), v = l.getColor(), x = {
139
+ none: p("chart.pane.text.lineNone"),
140
+ single: p("chart.pane.text.lineSingle"),
141
+ double: p("chart.pane.text.lineDouble")
142
+ };
143
+ return y(g, { children: [
144
+ b(E, { children: p("chart.pane.text") }),
145
+ b(r, { children: b(N, {
146
+ label: p("format.fontFamily"),
147
+ value: l.getFamily(),
148
+ disabled: i,
149
+ onCommit: (e) => d(() => l.setFamily(e || null))
150
+ }) }),
151
+ b(r, { children: y(a, { children: [b(n, {
152
+ label: p("format.fontSize"),
153
+ value: l.getSize(),
154
+ min: 1,
155
+ max: 400,
156
+ step: 1,
157
+ decimals: !0,
158
+ width: 96,
159
+ disabled: i,
160
+ onChange: (e) => d(() => l.setSize(e))
161
+ }), b(e, {
162
+ icon: "text.colored",
163
+ disabled: i,
164
+ darkMode: u,
165
+ compareRGB: !0,
166
+ selectedColor: v,
167
+ onSelectColor: (e, a) => {
168
+ e && a && s.addRecentColor(e), d(() => l.setColor(e ? e.toString() : null));
169
+ },
170
+ propsPanel: {
171
+ disableAlpha: !0,
172
+ schemeLookup: s.schemeLookup(),
173
+ recentColors: m
174
+ }
175
+ })] }) }),
176
+ b(r, { children: y(a, { children: [b(A, {
177
+ label: p("chart.pane.text.bold"),
178
+ checked: l.getBold(),
179
+ disabled: i,
180
+ onChange: (e) => d(() => l.setBold(e))
181
+ }), b(A, {
182
+ label: p("chart.pane.text.italic"),
183
+ checked: l.getItalic(),
184
+ disabled: i,
185
+ onChange: (e) => d(() => l.setItalic(e))
186
+ })] }) }),
187
+ b(r, { children: y(a, { children: [b(F, {
188
+ label: p("chart.pane.text.underline"),
189
+ value: D.includes(l.getUnderline()) ? l.getUnderline() : "single",
190
+ options: D,
191
+ labels: x,
192
+ disabled: i,
193
+ onChange: (e) => d(() => l.setUnderline(e))
194
+ }), b(F, {
195
+ label: p("chart.pane.text.strike"),
196
+ value: l.getStrike(),
197
+ options: O,
198
+ labels: x,
199
+ disabled: i,
200
+ onChange: (e) => d(() => l.setStrike(e))
201
+ })] }) })
202
+ ] });
203
+ }, K = [
204
+ "top",
205
+ "bottom",
206
+ "left",
207
+ "right",
208
+ "corner"
209
+ ], G = [
210
+ "center",
211
+ "insideEnd",
212
+ "insideBase",
213
+ "outsideEnd",
214
+ "left",
215
+ "right",
216
+ "top",
217
+ "bottom",
218
+ "bestFit"
219
+ ], R = [
220
+ "linear",
221
+ "exponential",
222
+ "logarithmic",
223
+ "polynomial",
224
+ "power",
225
+ "movingAverage"
226
+ ], W = [
227
+ "fixedValue",
228
+ "percent",
229
+ "stDev",
230
+ "stError"
231
+ ], M = [
232
+ "both",
233
+ "plusValues",
234
+ "minusValues"
235
+ ], q = (e) => {
236
+ const { element: r, disabled: l, run: s } = e, i = h(), o = (e, a, t) => b(A, {
237
+ label: e,
238
+ checked: a,
239
+ disabled: l,
240
+ onChange: (e) => s(() => t(e))
241
+ }), c = [], d = () => r;
242
+ switch (r.getElementType()) {
243
+ case "chartArea": {
244
+ const e = d();
245
+ c.push(o(i("chart.pane.roundedCorners"), e.getRoundedCorners(), (a) => e.setRoundedCorners(a)));
246
+ break;
247
+ }
248
+ case "title":
249
+ case "axisTitle": {
250
+ const e = d();
251
+ c.push(o(i("chart.pane.visible"), e.getVisible(), (a) => e.setVisible(a))), c.push(b(N, {
252
+ label: i("chart.pane.titleText"),
253
+ value: e.getText() ?? "",
254
+ disabled: l,
255
+ onCommit: (a) => s(() => e.setText(a || null))
256
+ }, "text")), c.push(o(i("chart.pane.overlay"), e.getOverlay(), (a) => e.setOverlay(a)));
257
+ break;
258
+ }
259
+ case "legend": {
260
+ const e = d();
261
+ c.push(o(i("chart.pane.visible"), e.getVisible(), (a) => e.setVisible(a))), c.push(b(F, {
262
+ label: i("chart.pane.position"),
263
+ value: e.getPosition(),
264
+ options: K,
265
+ disabled: l,
266
+ labels: {
267
+ top: i("chart.pane.side.top"),
268
+ bottom: i("chart.pane.side.bottom"),
269
+ left: i("chart.pane.side.left"),
270
+ right: i("chart.pane.side.right"),
271
+ corner: i("chart.pane.side.corner")
272
+ },
273
+ onChange: (a) => s(() => e.setPosition(a))
274
+ }, "position")), c.push(o(i("chart.pane.overlay"), e.getOverlay(), (a) => e.setOverlay(a)));
275
+ break;
276
+ }
277
+ case "axis": {
278
+ const e = d();
279
+ if (c.push(o(i("chart.pane.visible"), e.getVisible(), (a) => e.setVisible(a))), c.push(o(i("chart.pane.reverse"), e.getReversePlotOrder(), (a) => e.setReversePlotOrder(a))), "value" === e.getKind()) {
280
+ const t = (e, a, t) => b(n, {
281
+ label: e,
282
+ value: a ?? 0,
283
+ min: -0x38d7ea4c68000,
284
+ max: 0x38d7ea4c68000,
285
+ decimals: !0,
286
+ width: 120,
287
+ disabled: l,
288
+ onChange: (e) => s(() => t(e))
289
+ }, e);
290
+ c.push(y(a, { children: [t(i("chart.pane.minimum"), e.getMinimum(), (a) => e.setMinimum(a)), t(i("chart.pane.maximum"), e.getMaximum(), (a) => e.setMaximum(a))] }, "bounds")), c.push(b(N, {
291
+ label: i("chart.pane.numberFormat"),
292
+ value: e.getNumberFormat() ?? "",
293
+ disabled: l,
294
+ onCommit: (a) => s(() => a ? e.setNumberFormat(a) : e.setLinkNumberFormat(!0))
295
+ }, "format"));
296
+ }
297
+ break;
298
+ }
299
+ case "gridlines":
300
+ case "upDownBars":
301
+ case "hiLoLines":
302
+ case "dropLines":
303
+ case "seriesLines": {
304
+ const e = d();
305
+ c.push(o(i("chart.pane.visible"), e.getVisible(), (a) => e.setVisible(a)));
306
+ break;
307
+ }
308
+ case "series": {
309
+ const e = d();
310
+ c.push(o(i("chart.pane.secondaryAxis"), "secondary" === e.getAxisGroup(), (a) => e.setAxisGroup(a ? "secondary" : "primary")));
311
+ const t = e.getGapWidth(), r = e.getOverlap();
312
+ null === t && null === r || c.push(y(a, { children: [null !== r ? b(n, {
313
+ label: i("chart.pane.overlap"),
314
+ value: r,
315
+ min: -100,
316
+ max: 100,
317
+ width: 96,
318
+ disabled: l,
319
+ onChange: (a) => s(() => e.setOverlap(a))
320
+ }) : null, null !== t ? b(n, {
321
+ label: i("chart.pane.gapWidth"),
322
+ value: t,
323
+ min: 0,
324
+ max: 500,
325
+ width: 96,
326
+ disabled: l,
327
+ onChange: (a) => s(() => e.setGapWidth(a))
328
+ }) : null] }, "gap")), /^(line|xyscatter)/.test(e.getChartType()) && c.push(o(i("chart.pane.smooth"), e.getSmooth(), (a) => e.setSmooth(a)));
329
+ break;
330
+ }
331
+ case "dataLabels":
332
+ case "dataLabel": {
333
+ const e = d();
334
+ c.push(o(i("chart.pane.visible"), e.getVisible(), (a) => e.setVisible(a))), c.push(o(i("chart.pane.labels.value"), e.getShowValue(), (a) => e.setShowValue(a))), c.push(o(i("chart.pane.labels.category"), e.getShowCategoryName(), (a) => e.setShowCategoryName(a))), c.push(o(i("chart.pane.labels.series"), e.getShowSeriesName(), (a) => e.setShowSeriesName(a))), c.push(o(i("chart.pane.labels.percentage"), e.getShowPercentage(), (a) => e.setShowPercentage(a))), c.push(o(i("chart.pane.labels.legendKey"), e.getShowLegendKey(), (a) => e.setShowLegendKey(a))), c.push(b(F, {
335
+ label: i("chart.pane.position"),
336
+ value: e.getPosition(),
337
+ options: G,
338
+ disabled: l,
339
+ labels: {
340
+ center: i("chart.pane.labels.center"),
341
+ insideEnd: i("chart.pane.labels.insideEnd"),
342
+ insideBase: i("chart.pane.labels.insideBase"),
343
+ outsideEnd: i("chart.pane.labels.outsideEnd"),
344
+ left: i("chart.pane.side.left"),
345
+ right: i("chart.pane.side.right"),
346
+ top: i("chart.pane.side.top"),
347
+ bottom: i("chart.pane.side.bottom"),
348
+ bestFit: i("chart.pane.labels.bestFit")
349
+ },
350
+ onChange: (a) => s(() => e.setPosition(a))
351
+ }, "position"));
352
+ break;
353
+ }
354
+ case "trendline": {
355
+ const e = d();
356
+ c.push(b(F, {
357
+ label: i("chart.pane.trendline.type"),
358
+ value: e.getType(),
359
+ options: R,
360
+ disabled: l,
361
+ labels: {
362
+ linear: i("chart.pane.trendline.linear"),
363
+ exponential: i("chart.pane.trendline.exponential"),
364
+ logarithmic: i("chart.pane.trendline.logarithmic"),
365
+ polynomial: i("chart.pane.trendline.polynomial"),
366
+ power: i("chart.pane.trendline.power"),
367
+ movingAverage: i("chart.pane.trendline.movingAverage")
368
+ },
369
+ onChange: (a) => s(() => e.setType(a))
370
+ }, "type")), c.push(o(i("chart.pane.trendline.equation"), e.getShowEquation(), (a) => e.setShowEquation(a))), c.push(o(i("chart.pane.trendline.rSquared"), e.getShowRSquared(), (a) => e.setShowRSquared(a))), c.push(y(a, { children: [b(n, {
371
+ label: i("chart.pane.trendline.forward"),
372
+ value: e.getForwardPeriod(),
373
+ min: 0,
374
+ max: 1e6,
375
+ decimals: !0,
376
+ width: 96,
377
+ disabled: l,
378
+ onChange: (a) => s(() => e.setForwardPeriod(a))
379
+ }), b(n, {
380
+ label: i("chart.pane.trendline.backward"),
381
+ value: e.getBackwardPeriod(),
382
+ min: 0,
383
+ max: 1e6,
384
+ decimals: !0,
385
+ width: 96,
386
+ disabled: l,
387
+ onChange: (a) => s(() => e.setBackwardPeriod(a))
388
+ })] }, "periods"));
389
+ break;
390
+ }
391
+ case "errorBars": {
392
+ const e = d();
393
+ c.push(o(i("chart.pane.visible"), e.getVisible(), (a) => e.setVisible(a))), c.push(b(F, {
394
+ label: i("chart.pane.errorBars.type"),
395
+ value: "custom" === e.getType() ? "fixedValue" : e.getType(),
396
+ options: W,
397
+ disabled: l,
398
+ labels: {
399
+ fixedValue: i("chart.pane.errorBars.fixedValue"),
400
+ percent: i("chart.pane.errorBars.percent"),
401
+ stDev: i("chart.pane.errorBars.stDev"),
402
+ stError: i("chart.pane.errorBars.stError")
403
+ },
404
+ onChange: (a) => s(() => e.setType(a))
405
+ }, "type"));
406
+ const a = e.getAmount();
407
+ null !== a && c.push(b(n, {
408
+ label: i("chart.pane.errorBars.amount"),
409
+ value: a,
410
+ min: 0,
411
+ max: 0x38d7ea4c68000,
412
+ decimals: !0,
413
+ width: 120,
414
+ disabled: l,
415
+ onChange: (a) => s(() => e.setAmount(a))
416
+ }, "amount")), c.push(b(F, {
417
+ label: i("chart.pane.errorBars.direction"),
418
+ value: e.getInclude(),
419
+ options: M,
420
+ disabled: l,
421
+ labels: {
422
+ both: i("chart.pane.errorBars.both"),
423
+ plusValues: i("chart.pane.errorBars.plus"),
424
+ minusValues: i("chart.pane.errorBars.minus")
425
+ },
426
+ onChange: (a) => s(() => e.setInclude(a))
427
+ }, "include")), c.push(o(i("chart.pane.errorBars.cap"), e.getEndStyleCap(), (a) => e.setEndStyleCap(a)));
428
+ break;
429
+ }
430
+ case "dataTable": {
431
+ const e = d();
432
+ c.push(o(i("chart.pane.visible"), e.getVisible(), (a) => e.setVisible(a))), c.push(o(i("chart.pane.labels.legendKey"), e.getShowLegendKey(), (a) => e.setShowLegendKey(a))), c.push(o(i("chart.pane.table.horizontal"), e.getShowHorizontalBorder(), (a) => e.setShowHorizontalBorder(a))), c.push(o(i("chart.pane.table.vertical"), e.getShowVerticalBorder(), (a) => e.setShowVerticalBorder(a))), c.push(o(i("chart.pane.table.outline"), e.getShowOutlineBorder(), (a) => e.setShowOutlineBorder(a)));
433
+ break;
434
+ }
435
+ }
436
+ return 0 === c.length ? null : y(g, { children: [b(E, { children: i("chart.pane.options") }), b(v, {
437
+ sx: {
438
+ ...t,
439
+ gap: 1
440
+ },
441
+ children: c.map((e, a) => b(v, { children: e }, a))
442
+ })] });
443
+ }, j = d((e) => {
444
+ const { movable: a, sheet: n } = e, r = h(), l = a.getContent(), [, s] = u((e) => e + 1, 0);
445
+ p(() => l.addListeners({ onAnyChange: s }), [l]);
446
+ const i = n.getView().getChartElementSelection();
447
+ p(() => i.addListeners({ onChange: s }), [i]);
448
+ const [o, d] = m("chartArea"), [x, S] = m(null), f = (i.getChart() === l ? i.getActive() : null) ?? l.getElement(o) ?? l.getChartArea(), E = l.getElements(), V = E.includes(f) ? E : [...E, f], F = l.isReadOnly(), A = c((e) => {
449
+ try {
450
+ e(), S(null);
451
+ } catch (e) {
452
+ S(e?.message ?? String(e));
453
+ }
454
+ }, []), N = f.getStyle?.(), D = N?.isITextBoxStyle ? N.getFont() : null, O = "legendEntry" === f.getElementType() ? null : N, K = "upDownBars" === f.getElementType() ? f : null;
455
+ return y(v, {
456
+ sx: {
457
+ ...t,
458
+ gap: 2,
459
+ paddingTop: (e) => e.spacing(1)
460
+ },
461
+ children: [
462
+ y(C, {
463
+ size: "small",
464
+ fullWidth: !0,
465
+ children: [b(w, { children: r("chart.pane.element") }), b(B, {
466
+ label: r("chart.pane.element"),
467
+ value: f.getPath(),
468
+ onChange: (e) => ((e) => {
469
+ d(e), S(null);
470
+ const a = l.getElement(e);
471
+ a && "chartArea" !== a.getElementType() ? i.select([a]) : i.clear();
472
+ })(e.target.value),
473
+ children: V.map((e) => b(k, {
474
+ value: e.getPath(),
475
+ children: T(r, e)
476
+ }, e.getPath()))
477
+ })]
478
+ }),
479
+ x ? b(L, {
480
+ variant: "caption",
481
+ color: "error",
482
+ children: x
483
+ }) : null,
484
+ b(q, {
485
+ element: f,
486
+ disabled: F,
487
+ run: A
488
+ }, `options:${f.getPath()}`),
489
+ D ? b(z, {
490
+ font: D,
491
+ styles: n.getStyles(),
492
+ disabled: F,
493
+ run: A
494
+ }, `text:${f.getPath()}`) : null,
495
+ O ? b(P, {
496
+ style: O,
497
+ sheet: n,
498
+ disabled: F
499
+ }, `style:${f.getPath()}`) : null,
500
+ K ? y(g, { children: [b(P, {
501
+ style: K.getUpBarsStyle(),
502
+ sheet: n,
503
+ disabled: F,
504
+ label: r("chart.pane.upBars")
505
+ }, "up"), b(P, {
506
+ style: K.getDownBarsStyle(),
507
+ sheet: n,
508
+ disabled: F,
509
+ label: r("chart.pane.downBars")
510
+ }, "down")] }) : null
511
+ ]
512
+ });
513
+ });
514
+ j.displayName = "ChartFormatPanel";
515
+ export { j as ChartFormatPanel };