@sheetxl/studio-mui 1.0.4 → 1.0.6
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.
- package/browser/esm/{N5L4wQxRGEOH_wbp.mjs → 6wAcMpoIZS1ffzqR.mjs} +3 -3
- package/browser/esm/{DHmh3sMFGq4sRPhh.mjs → AVMBYVWPe170RO8d.mjs} +20 -20
- package/browser/esm/{D_r8MdiauI15ds00.mjs → B2k09pbNHOie-ZPU.mjs} +5 -5
- package/browser/esm/B5hj7BR72rs3Xx2-.mjs +40 -0
- package/browser/esm/{jDqohhLNEI6wqjo7.mjs → BK0H9A2QjD4YqPxq.mjs} +2 -2
- package/browser/esm/{CHfzSl32Bs6LVY3G.mjs → BMtR4PaoNnEhVh2U.mjs} +243 -245
- package/browser/esm/{DZngQvRDu3Qh7_uy.mjs → BVQX7HEZNPIvf0Bg.mjs} +1 -1
- package/browser/esm/BZWyHJnsP5yHfByl.mjs +461 -0
- package/browser/esm/{n1z1c9np4M3gMGCX.mjs → BaYDGaXi_5fNEPo1.mjs} +1 -1
- package/browser/esm/{B4vVBfkY4Oq6M196.mjs → BgOevzKxdIm3FqSz.mjs} +4 -4
- package/browser/esm/{BH1Qj4pv8pPWZVhO.mjs → BgvcXlX-fe99mlfa.mjs} +1 -1
- package/browser/esm/{BDSYU5nx_6eGxAa4.mjs → BmJRmCarQ2Y_DhcS.mjs} +6 -6
- package/browser/esm/{Cf6bsmEPyPpiNtxU.mjs → BnIfAdE8Qnu8RF3t.mjs} +1 -1
- package/browser/esm/{B130jd-PqNgY2pV8.mjs → Bu4IunF89gqzLc6A.mjs} +2 -2
- package/browser/esm/{B4EWee1CcAHS5vAA.mjs → BvvD5BVF5uSL-2Ow.mjs} +2 -2
- package/browser/esm/{CzWXYarhfF4mF8fj.mjs → Bzr0CzpORAOD9X-l.mjs} +1 -1
- package/browser/esm/{CEvJVwoVP9nscIcl.mjs → C-lKdgOAbn4Ycu7e.mjs} +2 -2
- package/browser/esm/{CFiyY-_XmW7G0_9y.mjs → C211u9yUXa4149g9.mjs} +1 -1
- package/browser/esm/{DoJ8N6FhUY0kYz9u.mjs → C7RPgX_8hKN1Umxm.mjs} +2 -2
- package/browser/esm/{DqP1sKmMsG0tKwmV.mjs → C9cBnewCaYFf2JV6.mjs} +21 -22
- package/browser/esm/{Cx1r__xbzz-5zZgw.mjs → CA42_0vpQwF292tA.mjs} +1 -1
- package/browser/esm/{D1WSqegx9Zbjc-cL.mjs → CAbY1N8X3Iryy2XC.mjs} +4 -4
- package/browser/esm/{k0bdGBFIHCTGANHW.mjs → CD6iCHysAki3ui3u.mjs} +4 -4
- package/browser/esm/{DVQZtsBbf_Fsh-B6.mjs → CFUur1yDoVOJMuo5.mjs} +1 -1
- package/browser/esm/{npsX_Rztx4_7rCGP.mjs → CHb2gapathcPfhdM.mjs} +5 -5
- package/browser/esm/{94_olh2OyEbGAcNw.mjs → CIZh3NmE8QG5ZkiA.mjs} +2 -2
- package/browser/esm/{BBNFlngSL8Y3242O.mjs → CImvd-NxbJGZOozE.mjs} +1 -1
- package/browser/esm/{Me9wSTkBepRyMDHH.mjs → CO-AxUDR6qjjgpyK.mjs} +2 -2
- package/browser/esm/CQ1ArTuEvBmc7W5I.mjs +695 -0
- package/browser/esm/{uV_YgeJoyPa9SdGV.mjs → CVNzlTdizLlhU05M.mjs} +2 -2
- package/browser/esm/{D2YXkXpEcP-NqHMv.mjs → CXwkm9x8MkCxPz74.mjs} +1 -1
- package/browser/esm/{WQaRUnIjMCkaRwsb.mjs → CZIV7UuyM5VGNrJT.mjs} +4 -4
- package/browser/esm/{BQTUWwRUxgqg4s6Y.mjs → CdK1lF_PdSw6YfAo.mjs} +1 -1
- package/browser/esm/{DoYGmNZ_X3Kvxx3K.mjs → CpgoYQ3P-S7njA7p.mjs} +2 -2
- package/browser/esm/{ph1FP1S-yYM0I269.mjs → CqEyDFDlQ75w1c41.mjs} +2 -2
- package/browser/esm/{BYUokd7Q6y5Xw36U.mjs → CqIX3rp_vI2S2KbN.mjs} +2 -2
- package/browser/esm/{NSuxs1P3kFsoLIMa.mjs → Csmz2j1S5pk-J0B3.mjs} +2 -2
- package/browser/esm/{B0q0gHDAexrBB16B.mjs → CsuFocZfRucugR3q.mjs} +1153 -922
- package/browser/esm/{SHaQophNZjobC_4f.mjs → Cw6wZyiZkwn9DPZn.mjs} +193 -105
- package/browser/esm/{m5mPoZGqgwOCQQOs.mjs → D91G6sYfKgwC24dQ.mjs} +1 -1
- package/browser/esm/{B1SDDlETvGUJ2Ipu.mjs → DF_ssRdRHuBueJgX.mjs} +89 -102
- package/browser/esm/{CWgz8hWLf3OzuMyZ.mjs → DJaMl_5NGyq62zwW.mjs} +1 -1
- package/browser/esm/DLixDE7fzzurotzQ.mjs +826 -0
- package/browser/esm/{dlNcqumPfehZG2ai.mjs → DM86XhEF4qmUnjuK.mjs} +4 -4
- package/browser/esm/{BrFq6SNq-qx1PYZO.mjs → DNXDqUO4_S_N8sSC.mjs} +2 -2
- package/browser/esm/{BMIfZN_dgjS_p-pF.mjs → DfrMUwmPoZFEFJFk.mjs} +1 -1
- package/browser/esm/{BESsacbR41SalUJv.mjs → Dn3ur1I_S9SlR8vu.mjs} +1 -1
- package/browser/esm/{CbCTAkfOjIThF31A.mjs → IUt6EgxYCpZe9iCH.mjs} +2 -2
- package/browser/esm/{a7OD-X4Jjp810Y6v.mjs → JNoXh3IYri5h1W3Y.mjs} +1 -1
- package/browser/esm/{1JW5qOuAMlejsOrm.mjs → LZ2X5C1kjiwUCDGz.mjs} +2 -2
- package/browser/esm/{DlZoddGNGipM3S72.mjs → MSkt-6o2ZLEiAbDl.mjs} +1 -1
- package/browser/esm/{MR6LXUjaCV0DShNi.mjs → bQOt-2VGBciMnvp_.mjs} +3 -3
- package/browser/esm/{CbC8ObddTe-7ix6F.mjs → drMcpHj_xCQ0KxuA.mjs} +4 -4
- package/browser/esm/{DGz8aGpEm8yfccoW.mjs → g-ScvvLFu66BzoGI.mjs} +2 -2
- package/browser/esm/index.mjs +299 -299
- package/browser/esm/{dikVMLRWr5g6T0E7.mjs → j6NYTR7qK3Ra-ctk.mjs} +2 -2
- package/browser/esm/qSdXw8S3Pv-_PPNl.mjs +210 -0
- package/browser/esm/{Bz6OaRkDOpj807bi.mjs → r8gxfS-mY5qhTMtJ.mjs} +2 -2
- package/browser/esm/{DVXQrjSOGoB23arZ.mjs → ro5VSIHWH1Nehr75.mjs} +1 -1
- package/browser/esm/tfUleloRF2hBRjjZ.mjs +996 -0
- package/browser/esm/vTlYAw0bvWP8B4jg.mjs +103 -0
- package/browser/esm/{D8RzgRnl0S1-W_Tx.mjs → vzJavAz2onbnB0zm.mjs} +1183 -1204
- package/browser/esm/{wwSpRKFXL9eeyQND.mjs → xaG6CESboBdgd5SL.mjs} +3 -3
- package/browser/esm/{B0ymykpoTxxHQosi.mjs → ze358yTiZmVH9_vX.mjs} +6 -4
- package/licenses/dependencies.txt +33 -33
- package/node/esm/5WNL9ztJdLI0VLJ7.mjs +997 -0
- package/node/esm/{B_7rer9pnurpMB9J.mjs → 8aFKkKyEL5n7sJAn.mjs} +12 -12
- package/node/esm/{DGieA81teTm8uNPr.mjs → 9Yzu2QTWzvPBNvc4.mjs} +1 -1
- package/node/esm/{DF5w_ZBWiRtITKLQ.mjs → BDGax8JuzpXDLe1U.mjs} +1 -1
- package/node/esm/{BedAzhQqTjs4BBb4.mjs → BMuPM5U4Q2kQVYTt.mjs} +251 -253
- package/node/esm/B_XE-SYyFRwWgVyQ.mjs +2070 -0
- package/node/esm/{C4esZkRHnb4HEK3k.mjs → Bap-XMVZ0X80-MNV.mjs} +2 -2
- package/node/esm/{DHrxhle3aK3XU-Jz.mjs → BghhH54dXAqciBpw.mjs} +2 -2
- package/node/esm/{Diu9L9DJzZCMtFb4.mjs → Bgsi1G5RDBa4Rnmh.mjs} +1 -1
- package/node/esm/{mHNl4j2rIZTqcQqb.mjs → Bj6wKB1N--BJ0A7u.mjs} +1 -1
- package/node/esm/{BBRSP-QRw-F0qQdJ.mjs → Bp6DyaGr7Ah4mCbj.mjs} +2 -2
- package/node/esm/BxIw0JqQD7Ibk44S.mjs +103 -0
- package/node/esm/{BRICG2VkglJJKy0X.mjs → C6J3DXYnvgXi5m4u.mjs} +1 -1
- package/node/esm/{Cr94rxP9x4CWSBhF.mjs → CAXzH3lCFKI5mhsY.mjs} +2 -2
- package/node/esm/CBpG1x4pS6pNfRR1.mjs +461 -0
- package/node/esm/{qYIPGp0bxwW5i6Tn.mjs → CDx7cgKCqLflEubV.mjs} +1 -1
- package/node/esm/{vTyr2di6cTC3sA1F.mjs → CFL1BiUsTE9X1-c8.mjs} +24 -24
- package/node/esm/{BRpSVGr1A8w4AG_c.mjs → CHBfOuyPAMiTojvS.mjs} +97 -110
- package/node/esm/{B1CcqB7Ue-EPkdE-.mjs → CJIgRvLMiUJG79DB.mjs} +1 -1
- package/node/esm/{Bwtmjq_jln0eMEMe.mjs → CcbjmWOlODDY8gGF.mjs} +1 -1
- package/node/esm/CdrSmZ9WDzkEGAXL.mjs +695 -0
- package/node/esm/{MNdDR5PA6J1YEtyL.mjs → Ck0jN6hnefC5Hbsk.mjs} +22 -22
- package/node/esm/{D13aAzbfNwj50sqn.mjs → CkGQNbOwGQPWEcUf.mjs} +2 -2
- package/node/esm/{4mAgDExCti1oMAez.mjs → D283LXrMqi3exI_l.mjs} +1 -1
- package/node/esm/DH0tw27cVxmy7-AI.mjs +40 -0
- package/node/esm/{CBes_pLI-7rJsre4.mjs → DJ4lhPXDGigmgQ-y.mjs} +2 -2
- package/node/esm/{CJszsuCXRBPNuT1A.mjs → DUZYSELfaHMSnDU2.mjs} +1 -1
- package/node/esm/{Bm31UyWMCsJ7z4wJ.mjs → DZYzjxDF58TKD0xV.mjs} +2 -2
- package/node/esm/{Bz0uw5YbQGvhlPhZ.mjs → Debl1EJrMSlRwGcN.mjs} +2 -2
- package/node/esm/{D2eYMCx5eAEJsfP6.mjs → Dga-nEOi0B5TjgH6.mjs} +148 -148
- package/node/esm/{BSZ0bAJn4ODpGusx.mjs → Diszdr1X5yDuuIzT.mjs} +1 -1
- package/node/esm/{suDXa2UiBKJB4nsR.mjs → Dms4poPA6WOC4jyK.mjs} +1 -1
- package/node/esm/{pm_LpeNYjo6Aahu3.mjs → DnjxhVMqfBhfsNHj.mjs} +14 -14
- package/node/esm/{D__UzirlxQlq32Rm.mjs → DsoWGkhZNfvhmpK-.mjs} +2 -2
- package/node/esm/DyKgKDqbquskgXEA.mjs +828 -0
- package/node/esm/{DlSfkSNLCwzofCfS.mjs → DzZb-LzjScchWCpk.mjs} +66 -67
- package/node/esm/{C1y7Z0K9Ougef8dU.mjs → MvXs13X1leYt7rBb.mjs} +2 -2
- package/node/esm/{DXQFo_r4CCCvIubP.mjs → SBp59gHxCkFpvNwi.mjs} +1 -1
- package/node/esm/{n5-pWzwq4pDS4adG.mjs → iJrkLXWLGxVhCmtE.mjs} +1 -1
- package/node/esm/index.mjs +3294 -3031
- package/node/esm/{B7_-3nxcN-ZSDQVT.mjs → l0liY9jxGCFXsxNX.mjs} +1 -1
- package/node/esm/{DvlZnGlon5gwQBxU.mjs → mhPcr4NaFejGRG5p.mjs} +1 -1
- package/node/esm/{9e9_OZYxc0ATDkNI.mjs → vfgV7wwOvzh9iYjc.mjs} +1 -1
- package/package.json +9 -9
- package/resources/locales/de/groups.cmd.json +4 -6
- package/resources/locales/de/ui.msg.json +164 -3
- package/resources/locales/en/groups.cmd.json +4 -6
- package/resources/locales/en/ui.msg.json +164 -3
- package/types/src/anomalies/AnomaliesCommands.d.ts +1 -1
- package/types/src/chart/ChartDetailsPanel.d.ts +34 -0
- package/types/src/chart/ChartDetailsTaskPane.d.ts +9 -0
- package/types/src/chart/ChartFormatPanel.d.ts +12 -14
- package/types/src/chart/command/ChartColorsCommandButton.d.ts +54 -0
- package/types/src/chart/command/ChartStyleCommandButton.d.ts +64 -0
- package/types/src/chart/command/InsertChartCommandButton.d.ts +15 -0
- package/types/src/chart/command/index.d.ts +2 -0
- package/types/src/chart/format/ChartElementFormat.d.ts +54 -0
- package/types/src/chart/pane/ChartPaneModel.d.ts +134 -0
- package/types/src/chart/pane/ChartPaneRow.d.ts +77 -0
- package/types/src/color/ColorSetSwatch.d.ts +34 -0
- package/types/src/color/index.d.ts +1 -0
- package/types/src/command/NumberFormatQuickButtons.d.ts +1 -1
- package/types/src/format/FillPanel.d.ts +1 -3
- package/types/src/format/FormatPanelParts.d.ts +2 -2
- package/types/src/format/FormatPlugin.d.ts +2 -2
- package/types/src/format/FormatTaskPane.d.ts +4 -10
- package/types/src/format/LinePanel.d.ts +0 -2
- package/types/src/format/editor/FormatEditor.d.ts +36 -0
- package/types/src/format/editor/FormatField.d.ts +97 -0
- package/types/src/format/editor/FormatFields.d.ts +20 -0
- package/types/src/format/editor/index.d.ts +4 -0
- package/types/src/format/index.d.ts +1 -0
- package/types/src/format/useFormatSelection.d.ts +0 -2
- package/types/src/index.d.ts +1 -1
- package/types/src/shape/ShapeFormatPanel.d.ts +3 -7
- package/types/src/workbook/DefaultRenderers.d.ts +7 -1
- package/browser/esm/39iN4gKrFnhPhM1Z.mjs +0 -517
- package/browser/esm/BWXXi0teArfwa70E.mjs +0 -72
- package/browser/esm/J519wp1_d0QjzPfN.mjs +0 -516
- package/node/esm/Bc2iZ6Qs3kHdsECK.mjs +0 -1831
- package/node/esm/BvKg2K2J7Us2czkC.mjs +0 -519
- package/node/esm/CwQPIQaC6CcVGkD2.mjs +0 -73
- package/node/esm/CyQekcyEfM7Engbk.mjs +0 -516
- package/types/src/studio/StudioSplitPane.d.ts +0 -60
|
@@ -1,516 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v1.0.4
|
|
3
|
-
*
|
|
4
|
-
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: MIT
|
|
6
|
-
*/
|
|
7
|
-
import { ColorPopupButton as e } from "./index.mjs";
|
|
8
|
-
import { i as a, n as t, o as r, r as n } from "./9e9_OZYxc0ATDkNI.mjs";
|
|
9
|
-
import { t as l } from "./DlSfkSNLCwzofCfS.mjs";
|
|
10
|
-
import { t as s } from "./BvKg2K2J7Us2czkC.mjs";
|
|
11
|
-
import { IFill as i } from "@sheetxl/sdk";
|
|
12
|
-
import { useGridColorScheme as o } from "@sheetxl/react";
|
|
13
|
-
import { useCallbackRef as h, useTranslator as c } from "@sheetxl/utils-react";
|
|
14
|
-
import { memo as d, useEffect as p, useReducer as u, useState as m } from "react";
|
|
15
|
-
import { Fragment as g, jsx as b, jsxs as y } from "react/jsx-runtime";
|
|
16
|
-
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";
|
|
17
|
-
var E = (e) => b(L, {
|
|
18
|
-
variant: "subtitle2",
|
|
19
|
-
component: "div",
|
|
20
|
-
children: e.children
|
|
21
|
-
}), T = (e, a) => {
|
|
22
|
-
const t = a.getChart(), r = a.getPath(), n = a.getParent(), l = () => n ? T(e, n) : "", s = Number(r.split("/").pop());
|
|
23
|
-
switch (a.getElementType()) {
|
|
24
|
-
case "chartArea": return e("chart.pane.element.chartArea");
|
|
25
|
-
case "title": return e("chart.pane.element.title");
|
|
26
|
-
case "legend": return e("chart.pane.element.legend");
|
|
27
|
-
case "legendEntry": return e("chart.pane.element.legendEntry", { index: s + 1 });
|
|
28
|
-
case "plotArea": return e("chart.pane.element.plotArea");
|
|
29
|
-
case "dataTable": return e("chart.pane.element.dataTable");
|
|
30
|
-
case "axis": return ((e, a, t) => {
|
|
31
|
-
const [, r, n] = t.split("/"), l = ((e) => /^(bar|3DBar)/.test(e.getChartType()))(a), s = "category" === n ? !l : "value" !== n || l, i = "series" === n ? e("chart.pane.axisKind.series") : ((e) => /^(xyscatter|bubble)/.test(e.getChartType()))(a) || "value" === n ? e("chart.pane.axisKind.value") : e("chart.pane.axisKind.category"), o = e("chart.pane.axis", {
|
|
32
|
-
side: e(s ? "chart.pane.axisSide.horizontal" : "chart.pane.axisSide.vertical"),
|
|
33
|
-
kind: i
|
|
34
|
-
});
|
|
35
|
-
return "secondary" === r ? e("chart.pane.secondary", { label: o }) : o;
|
|
36
|
-
})(e, t, r);
|
|
37
|
-
case "axisTitle": return e("chart.pane.element.axisTitle", { axis: l() });
|
|
38
|
-
case "gridlines": return r.endsWith("minorGridlines") ? e("chart.pane.element.minorGridlines", { axis: l() }) : e("chart.pane.element.majorGridlines", { axis: l() });
|
|
39
|
-
case "series": return e("chart.pane.element.series", { name: a.getName() ?? "" });
|
|
40
|
-
case "point": return e("chart.pane.element.point", {
|
|
41
|
-
series: l(),
|
|
42
|
-
index: s + 1
|
|
43
|
-
});
|
|
44
|
-
case "marker": return e("chart.pane.element.marker", { owner: l() });
|
|
45
|
-
case "dataLabels": return "series" === n?.getElementType() ? e("chart.pane.element.dataLabels", { series: l() }) : e("chart.pane.element.allDataLabels");
|
|
46
|
-
case "dataLabel": return e("chart.pane.element.dataLabel", { point: l() });
|
|
47
|
-
case "trendline": return e("chart.pane.element.trendline", {
|
|
48
|
-
series: l(),
|
|
49
|
-
index: s + 1
|
|
50
|
-
});
|
|
51
|
-
case "trendlineLabel": return e("chart.pane.element.trendlineLabel", { trendline: l() });
|
|
52
|
-
case "errorBars": return r.endsWith("/x") ? e("chart.pane.element.xErrorBars", { series: l() }) : e("chart.pane.element.yErrorBars", { series: l() });
|
|
53
|
-
case "chartGroup": return e("chart.pane.element.group", { index: s + 1 });
|
|
54
|
-
case "upDownBars": return e("chart.pane.element.upDownBars");
|
|
55
|
-
case "hiLoLines": return e("chart.pane.element.hiLoLines");
|
|
56
|
-
case "dropLines": return e("chart.pane.element.dropLines");
|
|
57
|
-
case "seriesLines": return e("chart.pane.element.seriesLines");
|
|
58
|
-
default: return r;
|
|
59
|
-
}
|
|
60
|
-
}, V = (e, a) => {
|
|
61
|
-
const t = e.getStroke().getFill();
|
|
62
|
-
return t.getType() === i.Type.Solid ? t.getColor() : a.getNormal().getFont().getColor();
|
|
63
|
-
}, P = (e) => {
|
|
64
|
-
const { style: a, sheet: t, disabled: r, label: n } = e, i = c(), h = t.getStyles(), d = "dark" === o(), p = {
|
|
65
|
-
fill: a.getFill(),
|
|
66
|
-
styles: h,
|
|
67
|
-
schemeLookup: h.schemeLookup(),
|
|
68
|
-
darkMode: d,
|
|
69
|
-
disabled: r,
|
|
70
|
-
createCell: (e) => t.createCell(e),
|
|
71
|
-
applyFill: (e, t) => {
|
|
72
|
-
a.setFill(e, { description: t });
|
|
73
|
-
}
|
|
74
|
-
}, u = {
|
|
75
|
-
stroke: a.getStroke(),
|
|
76
|
-
stated: a.toJSON()?.stroke ?? null,
|
|
77
|
-
autoColor: V(a, h),
|
|
78
|
-
styles: h,
|
|
79
|
-
schemeLookup: h.schemeLookup(),
|
|
80
|
-
darkMode: d,
|
|
81
|
-
disabled: r,
|
|
82
|
-
applyStroke: (e, t) => {
|
|
83
|
-
a.setStroke(e, { description: t });
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
return y(g, { children: [
|
|
87
|
-
n ? b(E, { children: n }) : null,
|
|
88
|
-
b(E, { children: i("shape.pane.fill") }),
|
|
89
|
-
b(l, { selection: p }),
|
|
90
|
-
b(E, { children: i("shape.pane.line") }),
|
|
91
|
-
b(s, { selection: u })
|
|
92
|
-
] });
|
|
93
|
-
}, F = (e) => y(C, {
|
|
94
|
-
size: "small",
|
|
95
|
-
fullWidth: !0,
|
|
96
|
-
disabled: e.disabled,
|
|
97
|
-
children: [b(w, { children: e.label }), b(B, {
|
|
98
|
-
label: e.label,
|
|
99
|
-
value: e.value,
|
|
100
|
-
onChange: (a) => e.onChange(a.target.value),
|
|
101
|
-
children: e.options.map((a) => b(k, {
|
|
102
|
-
value: a,
|
|
103
|
-
children: e.labels[a] ?? a
|
|
104
|
-
}, a))
|
|
105
|
-
})]
|
|
106
|
-
}), A = (e) => b(S, {
|
|
107
|
-
label: e.label,
|
|
108
|
-
disabled: e.disabled,
|
|
109
|
-
control: b(x, {
|
|
110
|
-
size: "small",
|
|
111
|
-
checked: e.checked,
|
|
112
|
-
onChange: (a) => e.onChange(a.target.checked)
|
|
113
|
-
})
|
|
114
|
-
}), N = (e) => {
|
|
115
|
-
const [a, t] = m(null), r = () => {
|
|
116
|
-
null !== a && a !== e.value && e.onCommit(a), t(null);
|
|
117
|
-
};
|
|
118
|
-
return b(f, {
|
|
119
|
-
size: "small",
|
|
120
|
-
fullWidth: !0,
|
|
121
|
-
label: e.label,
|
|
122
|
-
disabled: e.disabled,
|
|
123
|
-
value: a ?? e.value,
|
|
124
|
-
onChange: (e) => t(e.target.value),
|
|
125
|
-
onBlur: r,
|
|
126
|
-
onKeyDown: (e) => {
|
|
127
|
-
"Enter" === e.key && r();
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
}, D = [
|
|
131
|
-
"none",
|
|
132
|
-
"single",
|
|
133
|
-
"double"
|
|
134
|
-
], O = [
|
|
135
|
-
"none",
|
|
136
|
-
"single",
|
|
137
|
-
"double"
|
|
138
|
-
], z = (r) => {
|
|
139
|
-
const { font: l, styles: s, disabled: i, run: d } = r, p = c(), u = "dark" === o(), m = h(() => s.recentColors(), [s]), v = l.getColor(), x = {
|
|
140
|
-
none: p("chart.pane.text.lineNone"),
|
|
141
|
-
single: p("chart.pane.text.lineSingle"),
|
|
142
|
-
double: p("chart.pane.text.lineDouble")
|
|
143
|
-
};
|
|
144
|
-
return y(g, { children: [
|
|
145
|
-
b(E, { children: p("chart.pane.text") }),
|
|
146
|
-
b(a, { children: b(N, {
|
|
147
|
-
label: p("format.fontFamily"),
|
|
148
|
-
value: l.getFamily(),
|
|
149
|
-
disabled: i,
|
|
150
|
-
onCommit: (e) => d(() => l.setFamily(e || null))
|
|
151
|
-
}) }),
|
|
152
|
-
b(a, { children: y(n, { children: [b(t, {
|
|
153
|
-
label: p("format.fontSize"),
|
|
154
|
-
value: l.getSize(),
|
|
155
|
-
min: 1,
|
|
156
|
-
max: 400,
|
|
157
|
-
step: 1,
|
|
158
|
-
decimals: !0,
|
|
159
|
-
width: 96,
|
|
160
|
-
disabled: i,
|
|
161
|
-
onChange: (e) => d(() => l.setSize(e))
|
|
162
|
-
}), b(e, {
|
|
163
|
-
icon: "text.colored",
|
|
164
|
-
disabled: i,
|
|
165
|
-
darkMode: u,
|
|
166
|
-
compareRGB: !0,
|
|
167
|
-
selectedColor: v,
|
|
168
|
-
onSelectColor: (e, a) => {
|
|
169
|
-
e && a && s.addRecentColor(e), d(() => l.setColor(e ? e.toString() : null));
|
|
170
|
-
},
|
|
171
|
-
propsPanel: {
|
|
172
|
-
disableAlpha: !0,
|
|
173
|
-
schemeLookup: s.schemeLookup(),
|
|
174
|
-
recentColors: m
|
|
175
|
-
}
|
|
176
|
-
})] }) }),
|
|
177
|
-
b(a, { children: y(n, { children: [b(A, {
|
|
178
|
-
label: p("chart.pane.text.bold"),
|
|
179
|
-
checked: l.getBold(),
|
|
180
|
-
disabled: i,
|
|
181
|
-
onChange: (e) => d(() => l.setBold(e))
|
|
182
|
-
}), b(A, {
|
|
183
|
-
label: p("chart.pane.text.italic"),
|
|
184
|
-
checked: l.getItalic(),
|
|
185
|
-
disabled: i,
|
|
186
|
-
onChange: (e) => d(() => l.setItalic(e))
|
|
187
|
-
})] }) }),
|
|
188
|
-
b(a, { children: y(n, { children: [b(F, {
|
|
189
|
-
label: p("chart.pane.text.underline"),
|
|
190
|
-
value: D.includes(l.getUnderline()) ? l.getUnderline() : "single",
|
|
191
|
-
options: D,
|
|
192
|
-
labels: x,
|
|
193
|
-
disabled: i,
|
|
194
|
-
onChange: (e) => d(() => l.setUnderline(e))
|
|
195
|
-
}), b(F, {
|
|
196
|
-
label: p("chart.pane.text.strike"),
|
|
197
|
-
value: l.getStrike(),
|
|
198
|
-
options: O,
|
|
199
|
-
labels: x,
|
|
200
|
-
disabled: i,
|
|
201
|
-
onChange: (e) => d(() => l.setStrike(e))
|
|
202
|
-
})] }) })
|
|
203
|
-
] });
|
|
204
|
-
}, K = [
|
|
205
|
-
"top",
|
|
206
|
-
"bottom",
|
|
207
|
-
"left",
|
|
208
|
-
"right",
|
|
209
|
-
"corner"
|
|
210
|
-
], G = [
|
|
211
|
-
"center",
|
|
212
|
-
"insideEnd",
|
|
213
|
-
"insideBase",
|
|
214
|
-
"outsideEnd",
|
|
215
|
-
"left",
|
|
216
|
-
"right",
|
|
217
|
-
"top",
|
|
218
|
-
"bottom",
|
|
219
|
-
"bestFit"
|
|
220
|
-
], R = [
|
|
221
|
-
"linear",
|
|
222
|
-
"exponential",
|
|
223
|
-
"logarithmic",
|
|
224
|
-
"polynomial",
|
|
225
|
-
"power",
|
|
226
|
-
"movingAverage"
|
|
227
|
-
], W = [
|
|
228
|
-
"fixedValue",
|
|
229
|
-
"percent",
|
|
230
|
-
"stDev",
|
|
231
|
-
"stError"
|
|
232
|
-
], M = [
|
|
233
|
-
"both",
|
|
234
|
-
"plusValues",
|
|
235
|
-
"minusValues"
|
|
236
|
-
], j = (e) => {
|
|
237
|
-
const { element: a, disabled: l, run: s } = e, i = c(), o = (e, a, t) => b(A, {
|
|
238
|
-
label: e,
|
|
239
|
-
checked: a,
|
|
240
|
-
disabled: l,
|
|
241
|
-
onChange: (e) => s(() => t(e))
|
|
242
|
-
}), h = [], d = () => a;
|
|
243
|
-
switch (a.getElementType()) {
|
|
244
|
-
case "chartArea": {
|
|
245
|
-
const e = d();
|
|
246
|
-
h.push(o(i("chart.pane.roundedCorners"), e.getRoundedCorners(), (a) => e.setRoundedCorners(a)));
|
|
247
|
-
break;
|
|
248
|
-
}
|
|
249
|
-
case "title":
|
|
250
|
-
case "axisTitle": {
|
|
251
|
-
const e = d();
|
|
252
|
-
h.push(o(i("chart.pane.visible"), e.getVisible(), (a) => e.setVisible(a))), h.push(b(N, {
|
|
253
|
-
label: i("chart.pane.titleText"),
|
|
254
|
-
value: e.getText() ?? "",
|
|
255
|
-
disabled: l,
|
|
256
|
-
onCommit: (a) => s(() => e.setText(a || null))
|
|
257
|
-
}, "text")), h.push(o(i("chart.pane.overlay"), e.getOverlay(), (a) => e.setOverlay(a)));
|
|
258
|
-
break;
|
|
259
|
-
}
|
|
260
|
-
case "legend": {
|
|
261
|
-
const e = d();
|
|
262
|
-
h.push(o(i("chart.pane.visible"), e.getVisible(), (a) => e.setVisible(a))), h.push(b(F, {
|
|
263
|
-
label: i("chart.pane.position"),
|
|
264
|
-
value: e.getPosition(),
|
|
265
|
-
options: K,
|
|
266
|
-
disabled: l,
|
|
267
|
-
labels: {
|
|
268
|
-
top: i("chart.pane.side.top"),
|
|
269
|
-
bottom: i("chart.pane.side.bottom"),
|
|
270
|
-
left: i("chart.pane.side.left"),
|
|
271
|
-
right: i("chart.pane.side.right"),
|
|
272
|
-
corner: i("chart.pane.side.corner")
|
|
273
|
-
},
|
|
274
|
-
onChange: (a) => s(() => e.setPosition(a))
|
|
275
|
-
}, "position")), h.push(o(i("chart.pane.overlay"), e.getOverlay(), (a) => e.setOverlay(a)));
|
|
276
|
-
break;
|
|
277
|
-
}
|
|
278
|
-
case "axis": {
|
|
279
|
-
const e = d();
|
|
280
|
-
if (h.push(o(i("chart.pane.visible"), e.getVisible(), (a) => e.setVisible(a))), h.push(o(i("chart.pane.reverse"), e.getReversePlotOrder(), (a) => e.setReversePlotOrder(a))), "value" === e.getKind()) {
|
|
281
|
-
const a = (e, a, r) => b(t, {
|
|
282
|
-
label: e,
|
|
283
|
-
value: a ?? 0,
|
|
284
|
-
min: -0x38d7ea4c68000,
|
|
285
|
-
max: 0x38d7ea4c68000,
|
|
286
|
-
decimals: !0,
|
|
287
|
-
width: 120,
|
|
288
|
-
disabled: l,
|
|
289
|
-
onChange: (e) => s(() => r(e))
|
|
290
|
-
}, e);
|
|
291
|
-
h.push(y(n, { children: [a(i("chart.pane.minimum"), e.getMinimum(), (a) => e.setMinimum(a)), a(i("chart.pane.maximum"), e.getMaximum(), (a) => e.setMaximum(a))] }, "bounds")), h.push(b(N, {
|
|
292
|
-
label: i("chart.pane.numberFormat"),
|
|
293
|
-
value: e.getNumberFormat() ?? "",
|
|
294
|
-
disabled: l,
|
|
295
|
-
onCommit: (a) => s(() => a ? e.setNumberFormat(a) : e.setLinkNumberFormat(!0))
|
|
296
|
-
}, "format"));
|
|
297
|
-
}
|
|
298
|
-
break;
|
|
299
|
-
}
|
|
300
|
-
case "gridlines":
|
|
301
|
-
case "upDownBars":
|
|
302
|
-
case "hiLoLines":
|
|
303
|
-
case "dropLines":
|
|
304
|
-
case "seriesLines": {
|
|
305
|
-
const e = d();
|
|
306
|
-
h.push(o(i("chart.pane.visible"), e.getVisible(), (a) => e.setVisible(a)));
|
|
307
|
-
break;
|
|
308
|
-
}
|
|
309
|
-
case "series": {
|
|
310
|
-
const e = d();
|
|
311
|
-
h.push(o(i("chart.pane.secondaryAxis"), "secondary" === e.getAxisGroup(), (a) => e.setAxisGroup(a ? "secondary" : "primary")));
|
|
312
|
-
const a = e.getGapWidth(), r = e.getOverlap();
|
|
313
|
-
null === a && null === r || h.push(y(n, { children: [null !== r ? b(t, {
|
|
314
|
-
label: i("chart.pane.overlap"),
|
|
315
|
-
value: r,
|
|
316
|
-
min: -100,
|
|
317
|
-
max: 100,
|
|
318
|
-
width: 96,
|
|
319
|
-
disabled: l,
|
|
320
|
-
onChange: (a) => s(() => e.setOverlap(a))
|
|
321
|
-
}) : null, null !== a ? b(t, {
|
|
322
|
-
label: i("chart.pane.gapWidth"),
|
|
323
|
-
value: a,
|
|
324
|
-
min: 0,
|
|
325
|
-
max: 500,
|
|
326
|
-
width: 96,
|
|
327
|
-
disabled: l,
|
|
328
|
-
onChange: (a) => s(() => e.setGapWidth(a))
|
|
329
|
-
}) : null] }, "gap")), /^(line|xyscatter)/.test(e.getChartType()) && h.push(o(i("chart.pane.smooth"), e.getSmooth(), (a) => e.setSmooth(a)));
|
|
330
|
-
break;
|
|
331
|
-
}
|
|
332
|
-
case "dataLabels":
|
|
333
|
-
case "dataLabel": {
|
|
334
|
-
const e = d();
|
|
335
|
-
h.push(o(i("chart.pane.visible"), e.getVisible(), (a) => e.setVisible(a))), h.push(o(i("chart.pane.labels.value"), e.getShowValue(), (a) => e.setShowValue(a))), h.push(o(i("chart.pane.labels.category"), e.getShowCategoryName(), (a) => e.setShowCategoryName(a))), h.push(o(i("chart.pane.labels.series"), e.getShowSeriesName(), (a) => e.setShowSeriesName(a))), h.push(o(i("chart.pane.labels.percentage"), e.getShowPercentage(), (a) => e.setShowPercentage(a))), h.push(o(i("chart.pane.labels.legendKey"), e.getShowLegendKey(), (a) => e.setShowLegendKey(a))), h.push(b(F, {
|
|
336
|
-
label: i("chart.pane.position"),
|
|
337
|
-
value: e.getPosition(),
|
|
338
|
-
options: G,
|
|
339
|
-
disabled: l,
|
|
340
|
-
labels: {
|
|
341
|
-
center: i("chart.pane.labels.center"),
|
|
342
|
-
insideEnd: i("chart.pane.labels.insideEnd"),
|
|
343
|
-
insideBase: i("chart.pane.labels.insideBase"),
|
|
344
|
-
outsideEnd: i("chart.pane.labels.outsideEnd"),
|
|
345
|
-
left: i("chart.pane.side.left"),
|
|
346
|
-
right: i("chart.pane.side.right"),
|
|
347
|
-
top: i("chart.pane.side.top"),
|
|
348
|
-
bottom: i("chart.pane.side.bottom"),
|
|
349
|
-
bestFit: i("chart.pane.labels.bestFit")
|
|
350
|
-
},
|
|
351
|
-
onChange: (a) => s(() => e.setPosition(a))
|
|
352
|
-
}, "position"));
|
|
353
|
-
break;
|
|
354
|
-
}
|
|
355
|
-
case "trendline": {
|
|
356
|
-
const e = d();
|
|
357
|
-
h.push(b(F, {
|
|
358
|
-
label: i("chart.pane.trendline.type"),
|
|
359
|
-
value: e.getType(),
|
|
360
|
-
options: R,
|
|
361
|
-
disabled: l,
|
|
362
|
-
labels: {
|
|
363
|
-
linear: i("chart.pane.trendline.linear"),
|
|
364
|
-
exponential: i("chart.pane.trendline.exponential"),
|
|
365
|
-
logarithmic: i("chart.pane.trendline.logarithmic"),
|
|
366
|
-
polynomial: i("chart.pane.trendline.polynomial"),
|
|
367
|
-
power: i("chart.pane.trendline.power"),
|
|
368
|
-
movingAverage: i("chart.pane.trendline.movingAverage")
|
|
369
|
-
},
|
|
370
|
-
onChange: (a) => s(() => e.setType(a))
|
|
371
|
-
}, "type")), h.push(o(i("chart.pane.trendline.equation"), e.getShowEquation(), (a) => e.setShowEquation(a))), h.push(o(i("chart.pane.trendline.rSquared"), e.getShowRSquared(), (a) => e.setShowRSquared(a))), h.push(y(n, { children: [b(t, {
|
|
372
|
-
label: i("chart.pane.trendline.forward"),
|
|
373
|
-
value: e.getForwardPeriod(),
|
|
374
|
-
min: 0,
|
|
375
|
-
max: 1e6,
|
|
376
|
-
decimals: !0,
|
|
377
|
-
width: 96,
|
|
378
|
-
disabled: l,
|
|
379
|
-
onChange: (a) => s(() => e.setForwardPeriod(a))
|
|
380
|
-
}), b(t, {
|
|
381
|
-
label: i("chart.pane.trendline.backward"),
|
|
382
|
-
value: e.getBackwardPeriod(),
|
|
383
|
-
min: 0,
|
|
384
|
-
max: 1e6,
|
|
385
|
-
decimals: !0,
|
|
386
|
-
width: 96,
|
|
387
|
-
disabled: l,
|
|
388
|
-
onChange: (a) => s(() => e.setBackwardPeriod(a))
|
|
389
|
-
})] }, "periods"));
|
|
390
|
-
break;
|
|
391
|
-
}
|
|
392
|
-
case "errorBars": {
|
|
393
|
-
const e = d();
|
|
394
|
-
h.push(o(i("chart.pane.visible"), e.getVisible(), (a) => e.setVisible(a))), h.push(b(F, {
|
|
395
|
-
label: i("chart.pane.errorBars.type"),
|
|
396
|
-
value: "custom" === e.getType() ? "fixedValue" : e.getType(),
|
|
397
|
-
options: W,
|
|
398
|
-
disabled: l,
|
|
399
|
-
labels: {
|
|
400
|
-
fixedValue: i("chart.pane.errorBars.fixedValue"),
|
|
401
|
-
percent: i("chart.pane.errorBars.percent"),
|
|
402
|
-
stDev: i("chart.pane.errorBars.stDev"),
|
|
403
|
-
stError: i("chart.pane.errorBars.stError")
|
|
404
|
-
},
|
|
405
|
-
onChange: (a) => s(() => e.setType(a))
|
|
406
|
-
}, "type"));
|
|
407
|
-
const a = e.getAmount();
|
|
408
|
-
null !== a && h.push(b(t, {
|
|
409
|
-
label: i("chart.pane.errorBars.amount"),
|
|
410
|
-
value: a,
|
|
411
|
-
min: 0,
|
|
412
|
-
max: 0x38d7ea4c68000,
|
|
413
|
-
decimals: !0,
|
|
414
|
-
width: 120,
|
|
415
|
-
disabled: l,
|
|
416
|
-
onChange: (a) => s(() => e.setAmount(a))
|
|
417
|
-
}, "amount")), h.push(b(F, {
|
|
418
|
-
label: i("chart.pane.errorBars.direction"),
|
|
419
|
-
value: e.getInclude(),
|
|
420
|
-
options: M,
|
|
421
|
-
disabled: l,
|
|
422
|
-
labels: {
|
|
423
|
-
both: i("chart.pane.errorBars.both"),
|
|
424
|
-
plusValues: i("chart.pane.errorBars.plus"),
|
|
425
|
-
minusValues: i("chart.pane.errorBars.minus")
|
|
426
|
-
},
|
|
427
|
-
onChange: (a) => s(() => e.setInclude(a))
|
|
428
|
-
}, "include")), h.push(o(i("chart.pane.errorBars.cap"), e.getEndStyleCap(), (a) => e.setEndStyleCap(a)));
|
|
429
|
-
break;
|
|
430
|
-
}
|
|
431
|
-
case "dataTable": {
|
|
432
|
-
const e = d();
|
|
433
|
-
h.push(o(i("chart.pane.visible"), e.getVisible(), (a) => e.setVisible(a))), h.push(o(i("chart.pane.labels.legendKey"), e.getShowLegendKey(), (a) => e.setShowLegendKey(a))), h.push(o(i("chart.pane.table.horizontal"), e.getShowHorizontalBorder(), (a) => e.setShowHorizontalBorder(a))), h.push(o(i("chart.pane.table.vertical"), e.getShowVerticalBorder(), (a) => e.setShowVerticalBorder(a))), h.push(o(i("chart.pane.table.outline"), e.getShowOutlineBorder(), (a) => e.setShowOutlineBorder(a)));
|
|
434
|
-
break;
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
return 0 === h.length ? null : y(g, { children: [b(E, { children: i("chart.pane.options") }), b(v, {
|
|
438
|
-
sx: {
|
|
439
|
-
...r,
|
|
440
|
-
gap: 1
|
|
441
|
-
},
|
|
442
|
-
children: h.map((e, a) => b(v, { children: e }, a))
|
|
443
|
-
})] });
|
|
444
|
-
}, q = d((e) => {
|
|
445
|
-
const { movable: a, sheet: t } = e, n = c(), l = a.getContent(), [, s] = u((e) => e + 1, 0);
|
|
446
|
-
p(() => l.addListeners({ onAnyChange: s }), [l]);
|
|
447
|
-
const i = t.getView().getChartElementSelection();
|
|
448
|
-
p(() => i.addListeners({ onChange: s }), [i]);
|
|
449
|
-
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 = h((e) => {
|
|
450
|
-
try {
|
|
451
|
-
e(), S(null);
|
|
452
|
-
} catch (e) {
|
|
453
|
-
S(e?.message ?? String(e));
|
|
454
|
-
}
|
|
455
|
-
}, []), N = f.getStyle?.(), D = N?.isITextBoxStyle ? N.getFont() : null, O = "legendEntry" === f.getElementType() ? null : N, K = "upDownBars" === f.getElementType() ? f : null;
|
|
456
|
-
return y(v, {
|
|
457
|
-
sx: {
|
|
458
|
-
...r,
|
|
459
|
-
gap: 2,
|
|
460
|
-
paddingTop: (e) => e.spacing(1)
|
|
461
|
-
},
|
|
462
|
-
children: [
|
|
463
|
-
y(C, {
|
|
464
|
-
size: "small",
|
|
465
|
-
fullWidth: !0,
|
|
466
|
-
children: [b(w, { children: n("chart.pane.element") }), b(B, {
|
|
467
|
-
label: n("chart.pane.element"),
|
|
468
|
-
value: f.getPath(),
|
|
469
|
-
onChange: (e) => ((e) => {
|
|
470
|
-
d(e), S(null);
|
|
471
|
-
const a = l.getElement(e);
|
|
472
|
-
a && "chartArea" !== a.getElementType() ? i.select([a]) : i.clear();
|
|
473
|
-
})(e.target.value),
|
|
474
|
-
children: V.map((e) => b(k, {
|
|
475
|
-
value: e.getPath(),
|
|
476
|
-
children: T(n, e)
|
|
477
|
-
}, e.getPath()))
|
|
478
|
-
})]
|
|
479
|
-
}),
|
|
480
|
-
x ? b(L, {
|
|
481
|
-
variant: "caption",
|
|
482
|
-
color: "error",
|
|
483
|
-
children: x
|
|
484
|
-
}) : null,
|
|
485
|
-
b(j, {
|
|
486
|
-
element: f,
|
|
487
|
-
disabled: F,
|
|
488
|
-
run: A
|
|
489
|
-
}, `options:${f.getPath()}`),
|
|
490
|
-
D ? b(z, {
|
|
491
|
-
font: D,
|
|
492
|
-
styles: t.getStyles(),
|
|
493
|
-
disabled: F,
|
|
494
|
-
run: A
|
|
495
|
-
}, `text:${f.getPath()}`) : null,
|
|
496
|
-
O ? b(P, {
|
|
497
|
-
style: O,
|
|
498
|
-
sheet: t,
|
|
499
|
-
disabled: F
|
|
500
|
-
}, `style:${f.getPath()}`) : null,
|
|
501
|
-
K ? y(g, { children: [b(P, {
|
|
502
|
-
style: K.getUpBarsStyle(),
|
|
503
|
-
sheet: t,
|
|
504
|
-
disabled: F,
|
|
505
|
-
label: n("chart.pane.upBars")
|
|
506
|
-
}, "up"), b(P, {
|
|
507
|
-
style: K.getDownBarsStyle(),
|
|
508
|
-
sheet: t,
|
|
509
|
-
disabled: F,
|
|
510
|
-
label: n("chart.pane.downBars")
|
|
511
|
-
}, "down")] }) : null
|
|
512
|
-
]
|
|
513
|
-
});
|
|
514
|
-
});
|
|
515
|
-
q.displayName = "ChartFormatPanel";
|
|
516
|
-
export { q as ChartFormatPanel };
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
/** Whether the split is a horizontal (`row`) or vertical (`column`) divider. */
|
|
3
|
-
export type SplitPaneOrientation = 'row' | 'column';
|
|
4
|
-
/** Which side the task pane sits on. `before` = `taskSide: 'left'`, `after` = `taskSide: 'right'`. */
|
|
5
|
-
export type SplitPaneSide = 'before' | 'after';
|
|
6
|
-
/**
|
|
7
|
-
* A layout slot key, `${orientation}:${side}` (e.g. `'row:after'`). The resized position is meaningfully
|
|
8
|
-
* different per slot (a horizontal drag isn't a vertical drag, a left pane isn't a right pane), so persisted
|
|
9
|
-
* positions are stored as a map keyed by this. New slots populate lazily as they are used.
|
|
10
|
-
*/
|
|
11
|
-
export type SplitPaneLayoutKey = `${SplitPaneOrientation}:${SplitPaneSide}`;
|
|
12
|
-
/** Context describing which layout slot a position change belongs to. */
|
|
13
|
-
export interface SplitPaneLayout {
|
|
14
|
-
orientation: SplitPaneOrientation;
|
|
15
|
-
side: SplitPaneSide;
|
|
16
|
-
key: SplitPaneLayoutKey;
|
|
17
|
-
}
|
|
18
|
-
export interface StudioSplitPaneProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
19
|
-
mainElement?: React.ReactElement;
|
|
20
|
-
sidebarElement?: React.ReactElement;
|
|
21
|
-
/**
|
|
22
|
-
* The split position. Either a single value (percent as a `number` or `'40%'`, pixels as `'280px'`) applied
|
|
23
|
-
* to whatever layout is active, or a map keyed by {@link SplitPaneLayoutKey} of per-slot percents. Slots
|
|
24
|
-
* missing from the map (or an omitted `position`) fall back to `'40%'`.
|
|
25
|
-
*
|
|
26
|
-
* @remarks When {@link persistKey} is set this acts as the SEED: a slot the user has already resized reads
|
|
27
|
-
* from the persisted map, and any slot they haven't yet resized falls back to this (so `position` wins on
|
|
28
|
-
* first load).
|
|
29
|
-
*/
|
|
30
|
-
position?: number | string | Partial<Record<SplitPaneLayoutKey, number>>;
|
|
31
|
-
/**
|
|
32
|
-
* When set, the split position is self-managed and persisted under this key (via `usePersistentState`
|
|
33
|
-
* against the surrounding persistence store) as a per-slot map. The resized position of each layout slot
|
|
34
|
-
* (horizontal vs vertical split, and eventually before/after side) is remembered independently. Any slot
|
|
35
|
-
* not yet resized is seeded from {@link position}; {@link onPositionChange} still fires if provided.
|
|
36
|
-
*/
|
|
37
|
-
persistKey?: string;
|
|
38
|
-
/**
|
|
39
|
-
* Fired when the user finishes dragging the resizer (not during drag). The second argument identifies the
|
|
40
|
-
* active layout slot so a caller persisting a per-slot map knows which entry to update.
|
|
41
|
-
*/
|
|
42
|
-
onPositionChange?: (position: {
|
|
43
|
-
pixels: number;
|
|
44
|
-
percent: number;
|
|
45
|
-
}, layout: SplitPaneLayout) => void;
|
|
46
|
-
/**
|
|
47
|
-
* Whether the layout should be right to left. This will flip the order of the panes and the direction of the split.
|
|
48
|
-
*
|
|
49
|
-
* @defaultValue 'left'
|
|
50
|
-
*/
|
|
51
|
-
taskSide?: 'left' | 'right';
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Wraps a Workbook element and a taskPane into a split pane.
|
|
55
|
-
*
|
|
56
|
-
* @remarks
|
|
57
|
-
* This adds a split pane to support the task pane alongside the workbook.
|
|
58
|
-
*/
|
|
59
|
-
export declare const StudioSplitPane: React.NamedExoticComponent<StudioSplitPaneProps & React.RefAttributes<HTMLDivElement>>;
|
|
60
|
-
//# sourceMappingURL=StudioSplitPane.d.ts.map
|