serverside_pivot 0.0.91 → 0.0.95
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/README.md +182 -182
- package/dist/react/chunks/{ContextMenu-Bt5_3bmD.mjs → ContextMenu-1G-o1ms9.mjs} +52 -49
- package/dist/react/chunks/{DetailDrawer-Eb4EpVHG.mjs → DetailDrawer-DCKIxSpW.mjs} +1 -1
- package/dist/react/chunks/{DetailSidePanel-BTcHOiKr.mjs → DetailSidePanel-DgUWPBQk.mjs} +1 -1
- package/dist/react/chunks/{DetailSurfaceContent-B3ZNKh7q.mjs → DetailSurfaceContent-BEL6xuaZ.mjs} +46 -37
- package/dist/react/chunks/{ECharts2dRenderer-C3Qv0uAa.mjs → ECharts2dRenderer-Dgkp9_1P.mjs} +412 -410
- package/dist/react/chunks/{ECharts3dRenderer-BB_7-fOt.mjs → ECharts3dRenderer-70VOp8V0.mjs} +2211 -3197
- package/dist/react/chunks/{EditSidePanel-C2cAvxlK.mjs → EditSidePanel-CygqVXLX.mjs} +77 -65
- package/dist/react/chunks/{InlineDetailPanel-BXLAw1o3.mjs → InlineDetailPanel-BUBRWdFW.mjs} +1 -1
- package/dist/react/chunks/{PivotCharts-Bw6Swoa3.mjs → PivotCharts-VX5-mEEp.mjs} +2206 -1396
- package/dist/react/chunks/{ReportEditor-D4V0ry2B.mjs → ReportEditor-B5j-CU9-.mjs} +614 -319
- package/dist/react/chunks/{SidebarPanel-xO59p_2o.mjs → SidebarPanel-LXUE6nPd.mjs} +1793 -1390
- package/dist/react/chunks/{SparklineDetailGraph-Bu85X7OJ.mjs → SparklineDetailGraph-Cfe2KcOp.mjs} +88 -58
- package/dist/react/chunks/installCanvasRenderer-C4h5pc1p.mjs +21174 -0
- package/dist/react/chunks/react-CDa-ADnG.mjs +31199 -0
- package/dist/react/chunks/{xlsx.mini.min-vfxHk3Ry.mjs → xlsx.mini.min-CzdkdH3N.mjs} +5 -5
- package/dist/react/components/Charts/ChartRenderers.d.ts +5 -73
- package/dist/react/components/Charts/ChartWorkspace.d.ts +3 -34
- package/dist/react/components/Charts/ECharts2dRenderer.d.ts +2 -5
- package/dist/react/components/Charts/ECharts3dRenderer.d.ts +2 -6
- package/dist/react/components/Charts/PivotCharts.d.ts +2 -9
- package/dist/react/components/Charts/chartEnhancements.d.ts +17 -66
- package/dist/react/components/Charts/chartExportPresentation.d.ts +5 -19
- package/dist/react/components/Charts/chartMath.d.ts +4 -4
- package/dist/react/components/Charts/useChartExportMenu.d.ts +4 -12
- package/dist/react/components/DashTanstackPivot.react.d.ts +36 -0
- package/dist/react/components/Filters/ColumnFilter.d.ts +2 -12
- package/dist/react/components/Filters/DateRangeFilter.d.ts +2 -7
- package/dist/react/components/Filters/FilterPopover.d.ts +2 -13
- package/dist/react/components/Filters/MultiSelectFilter.d.ts +2 -11
- package/dist/react/components/Filters/NumericRangeFilter.d.ts +2 -7
- package/dist/react/components/Notification.d.ts +2 -6
- package/dist/react/components/PivotAppBar.d.ts +2 -2
- package/dist/react/components/PivotErrorBoundary.d.ts +11 -7
- package/dist/react/components/PivotSmallComponents.d.ts +2 -3
- package/dist/react/components/PivotWorkspaceCanvas.d.ts +2 -5
- package/dist/react/components/PivotWorkspaceControls.d.ts +4 -8
- package/dist/react/components/PivotWorkspaceShell.d.ts +4 -12
- package/dist/react/components/RuntimeDataError.d.ts +2 -7
- package/dist/react/components/Sidebar/ColumnTreeItem.d.ts +2 -13
- package/dist/react/components/Sidebar/ReportEditor.d.ts +7 -20
- package/dist/react/components/Sidebar/SidebarFilterItem.d.ts +2 -13
- package/dist/react/components/Sidebar/SidebarPanel.d.ts +1 -2
- package/dist/react/components/Sidebar/ToolPanelSection.d.ts +2 -13
- package/dist/react/components/Sidebar/customCategoryUtils.d.ts +31 -62
- package/dist/react/components/Sidebar/formulaUtils.d.ts +16 -18
- package/dist/react/components/SkeletonRow.d.ts +2 -5
- package/dist/react/components/Table/ContextMenu.d.ts +2 -8
- package/dist/react/components/Table/DetailDrawer.d.ts +2 -11
- package/dist/react/components/Table/DetailSidePanel.d.ts +2 -11
- package/dist/react/components/Table/DetailSurfaceContent.d.ts +2 -11
- package/dist/react/components/Table/EditSidePanel.d.ts +2 -20
- package/dist/react/components/Table/EditableCell.d.ts +2 -28
- package/dist/react/components/Table/InlineDetailPanel.d.ts +2 -13
- package/dist/react/components/Table/PivotTableBody.d.ts +3 -3
- package/dist/react/components/Table/SparklineCell.d.ts +2 -17
- package/dist/react/components/Table/SparklineDetailGraph.d.ts +2 -5
- package/dist/react/components/Table/StatusBar.d.ts +2 -7
- package/dist/react/contexts/PivotConfigContext.d.ts +5 -33
- package/dist/react/contexts/PivotThemeContext.d.ts +7 -4
- package/dist/react/contexts/PivotValueDisplayContext.d.ts +5 -9
- package/dist/react/hooks/useChartState.d.ts +2 -71
- package/dist/react/hooks/useColumnDefs.d.ts +3 -68
- package/dist/react/hooks/useColumnVirtualizer.d.ts +1 -30
- package/dist/react/hooks/useDetailDrillThrough.d.ts +2 -36
- package/dist/react/hooks/useFilteredData.d.ts +4 -2
- package/dist/react/hooks/useFormatState.d.ts +2 -39
- package/dist/react/hooks/usePersistence.d.ts +4 -5
- package/dist/react/hooks/usePivotFieldInteractions.d.ts +2 -23
- package/dist/react/hooks/usePivotNormalization.d.ts +127 -461
- package/dist/react/hooks/usePivotRenderCounter.d.ts +2 -1
- package/dist/react/hooks/usePivotTransactions.d.ts +2 -23
- package/dist/react/hooks/useRenderHelpers.d.ts +3 -71
- package/dist/react/hooks/useReportMode.d.ts +2 -28
- package/dist/react/hooks/useRowCache.d.ts +16 -15
- package/dist/react/hooks/useRuntimeDataCommit.d.ts +2 -22
- package/dist/react/hooks/useRuntimeProfiling.d.ts +2 -13
- package/dist/react/hooks/useRuntimeTransport.d.ts +2 -18
- package/dist/react/hooks/useServerSideRowModel.d.ts +1 -50
- package/dist/react/hooks/useServerSideViewportController.d.ts +1 -64
- package/dist/react/hooks/useSidebarUI.d.ts +2 -32
- package/dist/react/hooks/useStickyStyles.d.ts +2 -23
- package/dist/react/index.mjs +15 -9
- package/dist/react/presentation/headerFormatting.d.ts +28 -11
- package/dist/react/presentation/safeCellContent.d.ts +22 -5
- package/dist/react/react.d.ts +3 -0
- package/dist/react/runtime/PivotRuntimeRoot.d.ts +1 -1
- package/dist/react/runtime/client/clientPivotTransport.d.ts +5 -1
- package/dist/react/runtime/client/clientResponsePostProcessor.d.ts +50 -0
- package/dist/react/runtime/client/types.d.ts +5 -0
- package/dist/react/runtime/createRuntimeCellPresentation.d.ts +2 -7
- package/dist/react/runtime/createRuntimeExportCommands.d.ts +2 -71
- package/dist/react/runtime/createRuntimeRowPinCommand.d.ts +2 -9
- package/dist/react/runtime/displayColumnOrder.d.ts +4 -4
- package/dist/react/runtime/httpTransport.d.ts +1 -0
- package/dist/react/runtime/runtime-contract.generated.d.ts +3 -0
- package/dist/react/runtime/runtimeContract.d.ts +3 -0
- package/dist/react/runtime/runtimeDomains.d.ts +18 -0
- package/dist/react/runtime/useChartWorkspacePresentation.d.ts +2 -45
- package/dist/react/runtime/useCoreRuntime.d.ts +4 -1
- package/dist/react/runtime/useCoreRuntimeStage.d.ts +1 -1
- package/dist/react/runtime/useRuntimeCellSelection.d.ts +2 -40
- package/dist/react/runtime/useRuntimeChartCanvasCommands.d.ts +7 -31
- package/dist/react/runtime/useRuntimeChartCanvasResize.d.ts +2 -13
- package/dist/react/runtime/useRuntimeChartCanvasVerticalResize.d.ts +2 -9
- package/dist/react/runtime/useRuntimeChartDefinitionCommands.d.ts +2 -14
- package/dist/react/runtime/useRuntimeChartFloatingInteractions.d.ts +2 -28
- package/dist/react/runtime/useRuntimeChartModels.d.ts +2 -62
- package/dist/react/runtime/useRuntimeChartPanelSizing.d.ts +2 -12
- package/dist/react/runtime/useRuntimeChartRequestDispatch.d.ts +2 -4
- package/dist/react/runtime/useRuntimeClipboardExportPresentation.d.ts +2 -152
- package/dist/react/runtime/useRuntimeClipboardPaste.d.ts +2 -7
- package/dist/react/runtime/useRuntimeColorScalePresentation.d.ts +2 -55
- package/dist/react/runtime/useRuntimeColumnAutoSizing.d.ts +2 -26
- package/dist/react/runtime/useRuntimeColumnCommands.d.ts +2 -22
- package/dist/react/runtime/useRuntimeColumnMeasurement.d.ts +2 -11
- package/dist/react/runtime/useRuntimeDataRetry.d.ts +2 -12
- package/dist/react/runtime/useRuntimeDisplayNavigation.d.ts +2 -11
- package/dist/react/runtime/useRuntimeEditCellIdentity.d.ts +2 -18
- package/dist/react/runtime/useRuntimeEditChangeTracking.d.ts +2 -28
- package/dist/react/runtime/useRuntimeEditComparisonState.d.ts +2 -35
- package/dist/react/runtime/useRuntimeEditDispatch.d.ts +2 -43
- package/dist/react/runtime/useRuntimeEditOwnership.d.ts +2 -28
- package/dist/react/runtime/useRuntimeEditPresentation.d.ts +2 -32
- package/dist/react/runtime/useRuntimeEditStatePersistence.d.ts +2 -24
- package/dist/react/runtime/useRuntimeExportState.d.ts +5 -5
- package/dist/react/runtime/useRuntimeFilterPopover.d.ts +2 -19
- package/dist/react/runtime/useRuntimeLayoutHistory.d.ts +2 -40
- package/dist/react/runtime/useRuntimeOptimisticCellState.d.ts +2 -27
- package/dist/react/runtime/useRuntimeRequestSession.d.ts +2 -76
- package/dist/react/runtime/useRuntimeResponseLifecycle.d.ts +2 -43
- package/dist/react/runtime/useRuntimeResponsePostCommit.d.ts +2 -15
- package/dist/react/runtime/useRuntimeRowEditSessions.d.ts +2 -28
- package/dist/react/runtime/useRuntimeRowEditing.d.ts +2 -18
- package/dist/react/runtime/useRuntimeRowSelection.d.ts +2 -14
- package/dist/react/runtime/useRuntimeSelectionFormatting.d.ts +2 -30
- package/dist/react/runtime/useRuntimeStructuralSync.d.ts +2 -61
- package/dist/react/runtime/useRuntimeViewRestoreScroll.d.ts +2 -5
- package/dist/react/runtime/useRuntimeViewSnapshot.d.ts +2 -196
- package/dist/react/runtime/useRuntimeViewportTableData.d.ts +2 -23
- package/dist/react/runtime/useWorkspaceStatusPresentation.d.ts +2 -109
- package/dist/react/utils/Icons.d.ts +2 -45
- package/dist/react/utils/chartModelBuilders.d.ts +76 -230
- package/dist/react/utils/columnOrder.d.ts +8 -12
- package/dist/react/utils/dataBars.d.ts +3 -7
- package/dist/react/utils/domEvents.d.ts +1 -1
- package/dist/react/utils/editing.d.ts +12 -47
- package/dist/react/utils/exportUtils.d.ts +30 -101
- package/dist/react/utils/fieldPanelLayout.d.ts +12 -61
- package/dist/react/utils/filterOptions.d.ts +4 -4
- package/dist/react/utils/helpers.d.ts +16 -18
- package/dist/react/utils/horizontalViewport.d.ts +1 -12
- package/dist/react/utils/layoutRows.d.ts +3 -3
- package/dist/react/utils/measureAxis.d.ts +6 -22
- package/dist/react/utils/pivotLayoutUtils.d.ts +3 -2
- package/dist/react/utils/pivotProfiler.d.ts +3 -3
- package/dist/react/utils/reportEditorSelection.d.ts +1 -23
- package/dist/react/utils/rowSpanning.d.ts +3 -6
- package/dist/react/utils/savedReports.d.ts +4 -7
- package/dist/react/utils/sorting.d.ts +8 -14
- package/dist/react/utils/sparklineDetail.d.ts +5 -8
- package/dist/react/utils/sparklines.d.ts +10 -78
- package/dist/react/utils/styles.d.ts +19 -308
- package/package.json +114 -114
- package/dist/react/chunks/installCanvasRenderer-B7sfDGoL.mjs +0 -21281
- package/dist/react/chunks/react-CPZZxtSo.mjs +0 -26999
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import e, { useState as be, useRef as mt, useEffect as er } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { z, Z as fe, _ as Wr, $ as Br, a0 as xt, a1 as Je, a2 as Ir, a3 as Lr, a4 as Pr, a5 as Fe, a6 as Qe, a7 as et, F as Or, a8 as Hr, a9 as Ur, aa as jr, ab as Pe, ac as tr, ad as Vr, ae as Ht, af as Zr, ag as Yr, ah as Kr, ai as Gr, aj as Nr, ak as Xr } from "./react-CDa-ADnG.mjs";
|
|
3
3
|
const Jr = ({ column: t, theme: n, styles: s, onFilter: a, currentFilter: l, options: g, optionMeta: u, onSearchOptions: E, onLoadMoreOptions: d, onOpen: $ }) => {
|
|
4
4
|
const [i, m] = be(!1), T = l && (l.conditions || l.value), L = () => m(!1), _ = () => {
|
|
5
5
|
const D = !i;
|
|
@@ -87,21 +87,24 @@ const Jr = ({ column: t, theme: n, styles: s, onFilter: a, currentFilter: l, opt
|
|
|
87
87
|
height: `${h.getTotalSize()}px`,
|
|
88
88
|
width: "100%",
|
|
89
89
|
position: "relative"
|
|
90
|
-
} }, h.getVirtualItems().map(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
90
|
+
} }, h.getVirtualItems().map(
|
|
91
|
+
/** @param {any} [virtualRow] @returns {any} */
|
|
92
|
+
(k) => /* @__PURE__ */ e.createElement(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
key: k.index,
|
|
96
|
+
style: {
|
|
97
|
+
position: "absolute",
|
|
98
|
+
top: 0,
|
|
99
|
+
left: 0,
|
|
100
|
+
width: "100%",
|
|
101
|
+
height: `${k.size}px`,
|
|
102
|
+
transform: `translateY(${k.start}px)`
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
a(s[k.index], k.index)
|
|
106
|
+
)
|
|
107
|
+
)) : n
|
|
105
108
|
)
|
|
106
109
|
);
|
|
107
110
|
}, rr = ({ column: t, level: n, theme: s, styles: a, handlePinColumn: l, colSearch: g, selectedCols: u, setSelectedCols: E, onDrop: d, sectionId: $ }) => {
|
|
@@ -123,11 +126,26 @@ const Jr = ({ column: t, theme: n, styles: s, onFilter: a, currentFilter: l, opt
|
|
|
123
126
|
const R = (v) => {
|
|
124
127
|
v.stopPropagation();
|
|
125
128
|
const U = new Set(u), Q = h ? xt(t) : [t.id];
|
|
126
|
-
Q.every(
|
|
129
|
+
Q.every(
|
|
130
|
+
/** @param {any} [id] @returns {any} */
|
|
131
|
+
(ee) => U.has(ee)
|
|
132
|
+
) ? Q.forEach(
|
|
133
|
+
/** @param {any} [id] @returns {any} */
|
|
134
|
+
(ee) => U.delete(ee)
|
|
135
|
+
) : Q.forEach(
|
|
136
|
+
/** @param {any} [id] @returns {any} */
|
|
137
|
+
(ee) => U.add(ee)
|
|
138
|
+
), E(U);
|
|
127
139
|
}, B = (v) => {
|
|
128
140
|
if (v.stopPropagation(), h) {
|
|
129
|
-
const U = Ir(t), Q = U.some(
|
|
130
|
-
|
|
141
|
+
const U = Ir(t), Q = U.some(
|
|
142
|
+
/** @param {any} [c] @returns {any} */
|
|
143
|
+
(V) => !V.getIsVisible()
|
|
144
|
+
);
|
|
145
|
+
U.forEach(
|
|
146
|
+
/** @param {any} [c] @returns {any} */
|
|
147
|
+
(V) => V.toggleVisibility(Q)
|
|
148
|
+
);
|
|
131
149
|
} else
|
|
132
150
|
t.toggleVisibility();
|
|
133
151
|
}, M = (v, U) => {
|
|
@@ -238,22 +256,28 @@ const Jr = ({ column: t, theme: n, styles: s, onFilter: a, currentFilter: l, opt
|
|
|
238
256
|
),
|
|
239
257
|
!h && /* @__PURE__ */ e.createElement("div", { className: "pin-controls" }, /* @__PURE__ */ e.createElement("button", { onClick: (v) => M(v, "left"), title: "Pin Column Left", "aria-label": "Pin Column Left" }, /* @__PURE__ */ e.createElement(z.PinLeft, null)), /* @__PURE__ */ e.createElement("button", { onClick: (v) => M(v, !1), title: "Unpin Column", "aria-label": "Unpin Column" }, /* @__PURE__ */ e.createElement(z.Unpin, null)), /* @__PURE__ */ e.createElement("button", { onClick: (v) => M(v, "right"), title: "Pin Column Right", "aria-label": "Pin Column Right" }, /* @__PURE__ */ e.createElement(z.PinRight, null)))
|
|
240
258
|
),
|
|
241
|
-
h && i && /* @__PURE__ */ e.createElement("div", { style: { display: "flex", flexDirection: "column" } }, t.columns.filter(
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
259
|
+
h && i && /* @__PURE__ */ e.createElement("div", { style: { display: "flex", flexDirection: "column" } }, t.columns.filter(
|
|
260
|
+
/** @param {any} [child] @returns {any} */
|
|
261
|
+
(v) => Je(v, $)
|
|
262
|
+
).map(
|
|
263
|
+
/** @param {any} [child] @returns {any} */
|
|
264
|
+
(v) => /* @__PURE__ */ e.createElement(
|
|
265
|
+
rr,
|
|
266
|
+
{
|
|
267
|
+
key: v.id,
|
|
268
|
+
column: v,
|
|
269
|
+
level: n + 1,
|
|
270
|
+
theme: s,
|
|
271
|
+
styles: a,
|
|
272
|
+
handlePinColumn: l,
|
|
273
|
+
colSearch: g,
|
|
274
|
+
selectedCols: u,
|
|
275
|
+
setSelectedCols: E,
|
|
276
|
+
onDrop: d,
|
|
277
|
+
sectionId: $
|
|
278
|
+
}
|
|
279
|
+
)
|
|
280
|
+
))
|
|
257
281
|
);
|
|
258
282
|
}, nr = /\b[A-Za-z_][A-Za-z0-9_]*\b/g, lr = /^[A-Za-z_][A-Za-z0-9_]*$/, tt = /\[([^\]]+)\]/g, qr = /* @__PURE__ */ new Set(["abs", "round", "ceil", "floor", "max", "min", "int", "float"]), Qr = /* @__PURE__ */ new Set(["True", "False", "None", "and", "or", "not", "if", "else", "in", "is"]), Ee = {
|
|
259
283
|
type: "line",
|
|
@@ -378,20 +402,29 @@ function ln(t, n) {
|
|
|
378
402
|
__isNew: !0
|
|
379
403
|
};
|
|
380
404
|
}
|
|
381
|
-
const Vt = (t) => String(t || "").split(",").map((n) => n.trim()).filter(Boolean),
|
|
405
|
+
const Vt = (t) => String(t || "").split(",").map((n) => n.trim()).filter(Boolean), Zt = (t) => String(t || "").trim().replace(/\s+/g, " ").toLowerCase(), sr = (t) => t && (t.__editingField || t.field) ? t.__editingField || t.field : "";
|
|
382
406
|
function an(t, n) {
|
|
383
407
|
const s = Array.isArray(t) ? t : [], a = sr(n);
|
|
384
408
|
if (!a) return s;
|
|
385
|
-
const l = s.findIndex(
|
|
409
|
+
const l = s.findIndex(
|
|
410
|
+
/** @param {any} [dimension] @returns {any} */
|
|
411
|
+
(g) => g && g.field === a
|
|
412
|
+
);
|
|
386
413
|
return l >= 0 ? s.slice(0, l) : s;
|
|
387
414
|
}
|
|
388
|
-
function
|
|
415
|
+
function Yt(t) {
|
|
389
416
|
const n = [];
|
|
390
|
-
return (t && Array.isArray(t.rules) ? t.rules : []).forEach(
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
417
|
+
return (t && Array.isArray(t.rules) ? t.rules : []).forEach(
|
|
418
|
+
/** @param {any} [rule] @returns {any} */
|
|
419
|
+
(s) => {
|
|
420
|
+
(s && s.condition && Array.isArray(s.condition.clauses) ? s.condition.clauses : []).forEach(
|
|
421
|
+
/** @param {any} [clause] @returns {any} */
|
|
422
|
+
(l) => {
|
|
423
|
+
l && l.field && n.push(l.field);
|
|
424
|
+
}
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
), Array.from(new Set(n));
|
|
395
428
|
}
|
|
396
429
|
function on(t, n) {
|
|
397
430
|
const s = (Array.isArray(t) ? t : []).filter((a) => a && typeof a == "object").filter((a) => !a._isTotal && a._path !== "__grand_total__" && a._path !== "__color_scale_stats__");
|
|
@@ -400,12 +433,19 @@ function on(t, n) {
|
|
|
400
433
|
function sn(t, n) {
|
|
401
434
|
return !Array.isArray(t) || t.length === 0 || !Array.isArray(n) || n.length === 0 ? !1 : n.every((s) => t.some((a) => a && Object.prototype.hasOwnProperty.call(a, s)));
|
|
402
435
|
}
|
|
403
|
-
const cn = (t, n) => (n && Array.isArray(n.rules) ? n.rules : []).map(
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
436
|
+
const cn = (t, n) => (n && Array.isArray(n.rules) ? n.rules : []).map(
|
|
437
|
+
/** @param {any} [rule] @returns {any} */
|
|
438
|
+
(s) => ({
|
|
439
|
+
label: s && s.label ? s.label : "Rule",
|
|
440
|
+
count: t.reduce(
|
|
441
|
+
/** @param {any} [matches] @param {any} [row] @returns {any} */
|
|
442
|
+
(a, l) => Pr(l, s.condition) ? a + 1 : a,
|
|
443
|
+
0
|
|
444
|
+
)
|
|
445
|
+
})
|
|
446
|
+
), un = e.lazy(() => import(
|
|
407
447
|
/* webpackChunkName: "pivot-report-editor" */
|
|
408
|
-
"./ReportEditor-
|
|
448
|
+
"./ReportEditor-B5j-CU9-.mjs"
|
|
409
449
|
).then((t) => ({
|
|
410
450
|
default: t.ReportEditor
|
|
411
451
|
}))), pn = (t) => /* @__PURE__ */ e.createElement(e.Suspense, { fallback: /* @__PURE__ */ e.createElement("div", { role: "status", style: { padding: "16px" } }, "Loading report builder…") }, /* @__PURE__ */ e.createElement(un, { ...t }));
|
|
@@ -420,7 +460,10 @@ function Kt({
|
|
|
420
460
|
onDeleteField: E
|
|
421
461
|
}) {
|
|
422
462
|
const d = e.useMemo(
|
|
423
|
-
() => (t || []).filter(
|
|
463
|
+
() => (t || []).filter(
|
|
464
|
+
/** @param {any} [field] @returns {any} */
|
|
465
|
+
(o) => o && !tr(o)
|
|
466
|
+
),
|
|
424
467
|
[t]
|
|
425
468
|
), $ = e.useMemo(
|
|
426
469
|
() => Fe(n || []),
|
|
@@ -430,11 +473,17 @@ function Kt({
|
|
|
430
473
|
[i, $]
|
|
431
474
|
), L = e.useMemo(() => {
|
|
432
475
|
const o = /* @__PURE__ */ new Set(), A = [];
|
|
433
|
-
return d.forEach(
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
476
|
+
return d.forEach(
|
|
477
|
+
/** @param {any} [field] @returns {any} */
|
|
478
|
+
(R) => {
|
|
479
|
+
R && !o.has(R) && (o.add(R), A.push(R));
|
|
480
|
+
}
|
|
481
|
+
), T.forEach(
|
|
482
|
+
/** @param {any} [dimension] @returns {any} */
|
|
483
|
+
(R) => {
|
|
484
|
+
R && R.field && !o.has(R.field) && (o.add(R.field), A.push(R.field));
|
|
485
|
+
}
|
|
486
|
+
), A;
|
|
438
487
|
}, [T, d]), _ = e.useMemo(
|
|
439
488
|
() => {
|
|
440
489
|
const o = qe(a, d, "date");
|
|
@@ -480,16 +529,23 @@ function Kt({
|
|
|
480
529
|
return window.addEventListener("keydown", o), () => window.removeEventListener("keydown", o);
|
|
481
530
|
}, [i]);
|
|
482
531
|
const W = e.useCallback((o, A) => {
|
|
483
|
-
m(
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
532
|
+
m(
|
|
533
|
+
/** @param {any} [current] @returns {any} */
|
|
534
|
+
(R) => {
|
|
535
|
+
if (!R) return R;
|
|
536
|
+
const B = [...R.rules || []];
|
|
537
|
+
return B[o] = typeof A == "function" ? A(B[o]) : A, { ...R, rules: B };
|
|
538
|
+
}
|
|
539
|
+
);
|
|
488
540
|
}, []), O = e.useCallback((o, A, R) => {
|
|
489
|
-
W(
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
541
|
+
W(
|
|
542
|
+
o,
|
|
543
|
+
/** @param {any} [rule] @returns {any} */
|
|
544
|
+
(B) => {
|
|
545
|
+
const M = B.condition || { op: "AND", clauses: [] }, H = [...M.clauses || []];
|
|
546
|
+
return H[A] = { ...H[A], ...R }, { ...B, condition: { ...M, clauses: H } };
|
|
547
|
+
}
|
|
548
|
+
);
|
|
493
549
|
}, [W]), k = e.useCallback(() => {
|
|
494
550
|
const o = Fe([i])[0];
|
|
495
551
|
if (!o || !o.name) {
|
|
@@ -504,20 +560,29 @@ function Kt({
|
|
|
504
560
|
g && g("Choose the source field to group.", "warning");
|
|
505
561
|
return;
|
|
506
562
|
}
|
|
507
|
-
const A = sr(i), R =
|
|
508
|
-
if ($.some(
|
|
563
|
+
const A = sr(i), R = Zt(o.name);
|
|
564
|
+
if ($.some(
|
|
565
|
+
/** @param {any} [dimension] @returns {any} */
|
|
566
|
+
(M) => M && M.field !== A && Zt(M.name) === R
|
|
567
|
+
)) {
|
|
509
568
|
g && g(`A category named "${o.name}" already exists.`, "warning");
|
|
510
569
|
return;
|
|
511
570
|
}
|
|
512
571
|
if (o.kind === "category") {
|
|
513
572
|
const M = new Set(L);
|
|
514
|
-
if (
|
|
573
|
+
if (Yt(o).find(
|
|
574
|
+
/** @param {any} [field] @returns {any} */
|
|
575
|
+
(x) => !M.has(x)
|
|
576
|
+
)) {
|
|
515
577
|
g && g("A category can only use base fields or categories defined before it.", "warning");
|
|
516
578
|
return;
|
|
517
579
|
}
|
|
518
|
-
const K =
|
|
580
|
+
const K = Yt(o);
|
|
519
581
|
if (sn(y, K)) {
|
|
520
|
-
const x = cn(y, o).find(
|
|
582
|
+
const x = cn(y, o).find(
|
|
583
|
+
/** @param {any} [summary] @returns {any} */
|
|
584
|
+
(F) => F.count === 0
|
|
585
|
+
);
|
|
521
586
|
if (x) {
|
|
522
587
|
g && g(`"${x.label}" does not match any current row. Adjust the condition before applying.`, "warning");
|
|
523
588
|
return;
|
|
@@ -538,10 +603,22 @@ function Kt({
|
|
|
538
603
|
return;
|
|
539
604
|
}
|
|
540
605
|
}
|
|
541
|
-
s(
|
|
606
|
+
s(
|
|
607
|
+
/** @param {any} [previous] @returns {any} */
|
|
608
|
+
(M) => [...Fe(M || []).filter(
|
|
609
|
+
/** @param {any} [dimension] @returns {any} */
|
|
610
|
+
(x) => x.id !== o.id && x.field !== o.field && x.field !== A
|
|
611
|
+
), o]
|
|
612
|
+
), m(null), g && g(`Applied ${o.name}.`, "success");
|
|
542
613
|
}, [L, _, i, $, D, s, g, y]), P = e.useCallback((o) => {
|
|
543
614
|
const A = Fe([o])[0];
|
|
544
|
-
A && (s(
|
|
615
|
+
A && (s(
|
|
616
|
+
/** @param {any} [previous] @returns {any} */
|
|
617
|
+
(R) => Fe(R || []).filter(
|
|
618
|
+
/** @param {any} [item] @returns {any} */
|
|
619
|
+
(B) => B.field !== A.field
|
|
620
|
+
)
|
|
621
|
+
), typeof E == "function" && E(A.field), i && i.field === A.field && m(null), g && g(`Removed ${A.name}.`, "success"));
|
|
545
622
|
}, [i, E, s, g]);
|
|
546
623
|
return /* @__PURE__ */ e.createElement("div", { style: {
|
|
547
624
|
border: `1px solid ${l.border}`,
|
|
@@ -582,28 +659,31 @@ function Kt({
|
|
|
582
659
|
},
|
|
583
660
|
/* @__PURE__ */ e.createElement(z.NumberFormat, null),
|
|
584
661
|
" Number Bins"
|
|
585
|
-
)), $.length > 0 && /* @__PURE__ */ e.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "6px" } }, $.map(
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
"
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
662
|
+
)), $.length > 0 && /* @__PURE__ */ e.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "6px" } }, $.map(
|
|
663
|
+
/** @param {any} [dimension] @returns {any} */
|
|
664
|
+
(o) => {
|
|
665
|
+
const A = o.kind || "category", R = A === "date_group" ? `${u(o.sourceField)} by ${o.granularity}` : A === "number_group" ? `${u(o.sourceField)} every ${o.binSize}` : `${o.rules.length} rule${o.rules.length === 1 ? "" : "s"} | fallback: ${o.fallbackLabel}`;
|
|
666
|
+
return /* @__PURE__ */ e.createElement(
|
|
667
|
+
"div",
|
|
668
|
+
{
|
|
669
|
+
key: o.field,
|
|
670
|
+
style: {
|
|
671
|
+
border: `1px solid ${l.border}`,
|
|
672
|
+
background: l.background,
|
|
673
|
+
borderRadius: "10px",
|
|
674
|
+
padding: "8px",
|
|
675
|
+
display: "flex",
|
|
676
|
+
alignItems: "center",
|
|
677
|
+
gap: "8px"
|
|
678
|
+
}
|
|
679
|
+
},
|
|
680
|
+
A === "number_group" ? /* @__PURE__ */ e.createElement(z.NumberFormat, null) : /* @__PURE__ */ e.createElement(z.Branch, null),
|
|
681
|
+
/* @__PURE__ */ e.createElement("div", { style: { minWidth: 0, flex: 1 } }, /* @__PURE__ */ e.createElement("div", { style: { fontSize: "12px", fontWeight: 800, color: l.text, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" } }, o.name), /* @__PURE__ */ e.createElement("div", { style: { fontSize: "10px", color: l.textSec } }, R)),
|
|
682
|
+
/* @__PURE__ */ e.createElement("button", { type: "button", onClick: () => m(jt(d, o)), style: w() }, /* @__PURE__ */ e.createElement(z.Edit, null), " Edit"),
|
|
683
|
+
/* @__PURE__ */ e.createElement("button", { type: "button", onClick: () => P(o), style: { ...w(), color: "#B91C1C" } }, /* @__PURE__ */ e.createElement(z.Delete, null))
|
|
684
|
+
);
|
|
685
|
+
}
|
|
686
|
+
)), i && /* @__PURE__ */ e.createElement(
|
|
607
687
|
"div",
|
|
608
688
|
{
|
|
609
689
|
role: "presentation",
|
|
@@ -705,7 +785,10 @@ function Kt({
|
|
|
705
785
|
}),
|
|
706
786
|
style: h
|
|
707
787
|
},
|
|
708
|
-
_.map(
|
|
788
|
+
_.map(
|
|
789
|
+
/** @param {any} [field] @returns {any} */
|
|
790
|
+
(o) => /* @__PURE__ */ e.createElement("option", { key: o, value: o }, u(o))
|
|
791
|
+
)
|
|
709
792
|
)), /* @__PURE__ */ e.createElement("label", { style: { display: "flex", flexDirection: "column", gap: "4px", fontSize: "10px", fontWeight: 800, color: l.textSec, textTransform: "uppercase", letterSpacing: "0.4px" } }, "Date Part", /* @__PURE__ */ e.createElement(
|
|
710
793
|
"select",
|
|
711
794
|
{
|
|
@@ -713,7 +796,7 @@ function Kt({
|
|
|
713
796
|
onChange: (o) => m({ ...i, granularity: o.target.value }),
|
|
714
797
|
style: h
|
|
715
798
|
},
|
|
716
|
-
Array.from(
|
|
799
|
+
Array.from(Yr).map((o) => /* @__PURE__ */ e.createElement("option", { key: o, value: o }, fe(o)))
|
|
717
800
|
)), /* @__PURE__ */ e.createElement("label", { style: { display: "flex", flexDirection: "column", gap: "4px", fontSize: "10px", fontWeight: 800, color: l.textSec, textTransform: "uppercase", letterSpacing: "0.4px" } }, "Fiscal Start", /* @__PURE__ */ e.createElement(
|
|
718
801
|
"select",
|
|
719
802
|
{
|
|
@@ -741,7 +824,10 @@ function Kt({
|
|
|
741
824
|
}),
|
|
742
825
|
style: h
|
|
743
826
|
},
|
|
744
|
-
D.map(
|
|
827
|
+
D.map(
|
|
828
|
+
/** @param {any} [field] @returns {any} */
|
|
829
|
+
(o) => /* @__PURE__ */ e.createElement("option", { key: o, value: o }, u(o))
|
|
830
|
+
)
|
|
745
831
|
)), /* @__PURE__ */ e.createElement("label", { style: { display: "flex", flexDirection: "column", gap: "4px", fontSize: "10px", fontWeight: 800, color: l.textSec, textTransform: "uppercase", letterSpacing: "0.4px" } }, "Bin Size", /* @__PURE__ */ e.createElement(
|
|
746
832
|
"input",
|
|
747
833
|
{
|
|
@@ -776,73 +862,103 @@ function Kt({
|
|
|
776
862
|
onChange: (o) => m({ ...i, precision: o.target.value }),
|
|
777
863
|
style: h
|
|
778
864
|
}
|
|
779
|
-
))), (!i.kind || i.kind === "category") && (i.rules || []).map(
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
{
|
|
792
|
-
|
|
793
|
-
onChange: (M) => W(A, { ...o, label: M.target.value }),
|
|
794
|
-
style: h,
|
|
795
|
-
placeholder: "Category value"
|
|
796
|
-
}
|
|
797
|
-
), /* @__PURE__ */ e.createElement(
|
|
798
|
-
"select",
|
|
799
|
-
{
|
|
800
|
-
value: R.op || "AND",
|
|
801
|
-
onChange: (M) => W(A, { ...o, condition: { ...R, op: M.target.value } }),
|
|
802
|
-
style: h
|
|
803
|
-
},
|
|
804
|
-
/* @__PURE__ */ e.createElement("option", { value: "AND" }, "AND"),
|
|
805
|
-
/* @__PURE__ */ e.createElement("option", { value: "OR" }, "OR")
|
|
806
|
-
), /* @__PURE__ */ e.createElement(
|
|
807
|
-
"button",
|
|
808
|
-
{
|
|
809
|
-
type: "button",
|
|
810
|
-
onClick: () => m({ ...i, rules: (i.rules || []).filter((M, H) => H !== A) }),
|
|
811
|
-
style: { ...w(), padding: "6px", justifyContent: "center", color: "#B91C1C" },
|
|
812
|
-
title: "Remove rule"
|
|
813
|
-
},
|
|
814
|
-
/* @__PURE__ */ e.createElement(z.Close, null)
|
|
815
|
-
)), B.map((M, H) => {
|
|
816
|
-
const K = tn.has(M.operator), x = Ut.has(M.operator);
|
|
817
|
-
return /* @__PURE__ */ e.createElement("div", { key: `${o.id || A}:${H}`, style: { display: "grid", gridTemplateColumns: K ? "1fr 130px 28px" : "1fr 130px 1fr 28px", gap: "6px", alignItems: "center" } }, /* @__PURE__ */ e.createElement(
|
|
818
|
-
"select",
|
|
865
|
+
))), (!i.kind || i.kind === "category") && (i.rules || []).map(
|
|
866
|
+
/** @param {any} [rule] @param {any} [ruleIndex] @returns {any} */
|
|
867
|
+
(o, A) => {
|
|
868
|
+
const R = o.condition || { op: "AND", clauses: [] }, B = R.clauses || [];
|
|
869
|
+
return /* @__PURE__ */ e.createElement("div", { key: o.id || A, style: {
|
|
870
|
+
border: `1px solid ${l.border}`,
|
|
871
|
+
borderRadius: "10px",
|
|
872
|
+
padding: "8px",
|
|
873
|
+
background: l.hover || "#F8FAFC",
|
|
874
|
+
display: "flex",
|
|
875
|
+
flexDirection: "column",
|
|
876
|
+
gap: "8px"
|
|
877
|
+
} }, /* @__PURE__ */ e.createElement("div", { style: { display: "grid", gridTemplateColumns: "1fr 78px 28px", gap: "8px", alignItems: "center" } }, /* @__PURE__ */ e.createElement(
|
|
878
|
+
"input",
|
|
819
879
|
{
|
|
820
|
-
value:
|
|
821
|
-
onChange: (
|
|
822
|
-
style: h
|
|
823
|
-
|
|
824
|
-
|
|
880
|
+
value: o.label || "",
|
|
881
|
+
onChange: (M) => W(A, { ...o, label: M.target.value }),
|
|
882
|
+
style: h,
|
|
883
|
+
placeholder: "Category value"
|
|
884
|
+
}
|
|
825
885
|
), /* @__PURE__ */ e.createElement(
|
|
826
886
|
"select",
|
|
827
887
|
{
|
|
828
|
-
value:
|
|
829
|
-
onChange: (
|
|
830
|
-
const v = F.target.value;
|
|
831
|
-
O(A, H, {
|
|
832
|
-
operator: v,
|
|
833
|
-
values: Ut.has(v) ? M.values && M.values.length ? M.values : Vt(M.value) : M.values
|
|
834
|
-
});
|
|
835
|
-
},
|
|
888
|
+
value: R.op || "AND",
|
|
889
|
+
onChange: (M) => W(A, { ...o, condition: { ...R, op: M.target.value } }),
|
|
836
890
|
style: h
|
|
837
891
|
},
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
892
|
+
/* @__PURE__ */ e.createElement("option", { value: "AND" }, "AND"),
|
|
893
|
+
/* @__PURE__ */ e.createElement("option", { value: "OR" }, "OR")
|
|
894
|
+
), /* @__PURE__ */ e.createElement(
|
|
895
|
+
"button",
|
|
841
896
|
{
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
897
|
+
type: "button",
|
|
898
|
+
onClick: () => m({ ...i, rules: (i.rules || []).filter(
|
|
899
|
+
/** @param {any} [_] @param {any} [index] @returns {any} */
|
|
900
|
+
(M, H) => H !== A
|
|
901
|
+
) }),
|
|
902
|
+
style: { ...w(), padding: "6px", justifyContent: "center", color: "#B91C1C" },
|
|
903
|
+
title: "Remove rule"
|
|
904
|
+
},
|
|
905
|
+
/* @__PURE__ */ e.createElement(z.Close, null)
|
|
906
|
+
)), B.map(
|
|
907
|
+
/** @param {any} [clause] @param {any} [clauseIndex] @returns {any} */
|
|
908
|
+
(M, H) => {
|
|
909
|
+
const K = tn.has(M.operator), x = Ut.has(M.operator);
|
|
910
|
+
return /* @__PURE__ */ e.createElement("div", { key: `${o.id || A}:${H}`, style: { display: "grid", gridTemplateColumns: K ? "1fr 130px 28px" : "1fr 130px 1fr 28px", gap: "6px", alignItems: "center" } }, /* @__PURE__ */ e.createElement(
|
|
911
|
+
"select",
|
|
912
|
+
{
|
|
913
|
+
value: M.field || "",
|
|
914
|
+
onChange: (F) => O(A, H, { field: F.target.value }),
|
|
915
|
+
style: h
|
|
916
|
+
},
|
|
917
|
+
L.map(
|
|
918
|
+
/** @param {any} [field] @returns {any} */
|
|
919
|
+
(F) => /* @__PURE__ */ e.createElement("option", { key: F, value: F }, u(F))
|
|
920
|
+
)
|
|
921
|
+
), /* @__PURE__ */ e.createElement(
|
|
922
|
+
"select",
|
|
923
|
+
{
|
|
924
|
+
value: M.operator || "eq",
|
|
925
|
+
onChange: (F) => {
|
|
926
|
+
const v = F.target.value;
|
|
927
|
+
O(A, H, {
|
|
928
|
+
operator: v,
|
|
929
|
+
values: Ut.has(v) ? M.values && M.values.length ? M.values : Vt(M.value) : M.values
|
|
930
|
+
});
|
|
931
|
+
},
|
|
932
|
+
style: h
|
|
933
|
+
},
|
|
934
|
+
en.map((F) => /* @__PURE__ */ e.createElement("option", { key: F.value, value: F.value }, F.label))
|
|
935
|
+
), !K && /* @__PURE__ */ e.createElement(
|
|
936
|
+
"input",
|
|
937
|
+
{
|
|
938
|
+
value: x ? (M.values || []).join(", ") : M.value || "",
|
|
939
|
+
onChange: (F) => O(A, H, x ? { values: Vt(F.target.value), value: F.target.value } : { value: F.target.value }),
|
|
940
|
+
style: h,
|
|
941
|
+
placeholder: x ? "A, B, C" : "Value"
|
|
942
|
+
}
|
|
943
|
+
), /* @__PURE__ */ e.createElement(
|
|
944
|
+
"button",
|
|
945
|
+
{
|
|
946
|
+
type: "button",
|
|
947
|
+
onClick: () => W(A, {
|
|
948
|
+
...o,
|
|
949
|
+
condition: {
|
|
950
|
+
...R,
|
|
951
|
+
clauses: B.filter(
|
|
952
|
+
/** @param {any} [_] @param {any} [index] @returns {any} */
|
|
953
|
+
(F, v) => v !== H
|
|
954
|
+
)
|
|
955
|
+
}
|
|
956
|
+
}),
|
|
957
|
+
style: { ...w(), padding: "6px", justifyContent: "center", color: "#B91C1C" },
|
|
958
|
+
title: "Remove condition"
|
|
959
|
+
},
|
|
960
|
+
/* @__PURE__ */ e.createElement(z.Close, null)
|
|
961
|
+
));
|
|
846
962
|
}
|
|
847
963
|
), /* @__PURE__ */ e.createElement(
|
|
848
964
|
"button",
|
|
@@ -852,30 +968,15 @@ function Kt({
|
|
|
852
968
|
...o,
|
|
853
969
|
condition: {
|
|
854
970
|
...R,
|
|
855
|
-
clauses: B
|
|
971
|
+
clauses: [...B, or(L)]
|
|
856
972
|
}
|
|
857
973
|
}),
|
|
858
|
-
style: { ...w(),
|
|
859
|
-
title: "Remove condition"
|
|
974
|
+
style: { ...w(), alignSelf: "flex-start" }
|
|
860
975
|
},
|
|
861
|
-
|
|
976
|
+
"+ Condition"
|
|
862
977
|
));
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
{
|
|
866
|
-
type: "button",
|
|
867
|
-
onClick: () => W(A, {
|
|
868
|
-
...o,
|
|
869
|
-
condition: {
|
|
870
|
-
...R,
|
|
871
|
-
clauses: [...B, or(L)]
|
|
872
|
-
}
|
|
873
|
-
}),
|
|
874
|
-
style: { ...w(), alignSelf: "flex-start" }
|
|
875
|
-
},
|
|
876
|
-
"+ Condition"
|
|
877
|
-
));
|
|
878
|
-
}), (!i.kind || i.kind === "category") && /* @__PURE__ */ e.createElement(
|
|
978
|
+
}
|
|
979
|
+
), (!i.kind || i.kind === "category") && /* @__PURE__ */ e.createElement(
|
|
879
980
|
"button",
|
|
880
981
|
{
|
|
881
982
|
type: "button",
|
|
@@ -904,13 +1005,24 @@ function Gt(t, n = []) {
|
|
|
904
1005
|
};
|
|
905
1006
|
cr(s).forEach(g);
|
|
906
1007
|
let u = s.replace(tt, " ");
|
|
907
|
-
return (Array.isArray(n) ? n : Array.from(n || [])).map((d) => String(d || "").trim()).filter((d) => d && !lr.test(d)).sort((d, $) => $.length - d.length).forEach(
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
1008
|
+
return (Array.isArray(n) ? n : Array.from(n || [])).map((d) => String(d || "").trim()).filter((d) => d && !lr.test(d)).sort((d, $) => $.length - d.length).forEach(
|
|
1009
|
+
/** @param {any} [reference] @returns {any} */
|
|
1010
|
+
(d) => {
|
|
1011
|
+
const $ = new RegExp(`(^|[^A-Za-z0-9_])${ar(d)}(?=$|[^A-Za-z0-9_])`, "g");
|
|
1012
|
+
u = u.replace(
|
|
1013
|
+
$,
|
|
1014
|
+
/** @param {any} [match] @param {any} [prefix] @returns {any} */
|
|
1015
|
+
(i, m) => (g(d), `${m} `)
|
|
1016
|
+
);
|
|
1017
|
+
}
|
|
1018
|
+
), u.replace(
|
|
1019
|
+
nr,
|
|
1020
|
+
/** @param {any} [token] @param {any} [offset] @returns {any} */
|
|
1021
|
+
(d, $) => {
|
|
1022
|
+
const i = u.slice($ + d.length).trimStart();
|
|
1023
|
+
return Qr.has(d) || qr.has(d) && i.startsWith("(") || g(d), d;
|
|
1024
|
+
}
|
|
1025
|
+
), a;
|
|
914
1026
|
}
|
|
915
1027
|
function le(t) {
|
|
916
1028
|
const n = String(t || "").trim();
|
|
@@ -939,10 +1051,13 @@ function fn(t, n, s) {
|
|
|
939
1051
|
}), u;
|
|
940
1052
|
}
|
|
941
1053
|
function yt(t, n, s) {
|
|
942
|
-
t(
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
1054
|
+
t(
|
|
1055
|
+
/** @param {any} [prev] @returns {any} */
|
|
1056
|
+
(a) => {
|
|
1057
|
+
const l = [...a];
|
|
1058
|
+
return l[n] ? (l[n] = s(l[n]), l) : a;
|
|
1059
|
+
}
|
|
1060
|
+
);
|
|
946
1061
|
}
|
|
947
1062
|
function Nt(t) {
|
|
948
1063
|
return !t || typeof t.closest != "function" ? !1 : !!t.closest('button, input, select, textarea, [contenteditable="true"]');
|
|
@@ -1034,7 +1149,10 @@ function yn(t, n, s = null, a = null, l = "measures", g = [], u = []) {
|
|
|
1034
1149
|
return { tone: "warning", text: "Parentheses are unbalanced." };
|
|
1035
1150
|
if (d) {
|
|
1036
1151
|
const k = Array.isArray(g) ? g : [], P = new Set(
|
|
1037
|
-
k.map(
|
|
1152
|
+
k.map(
|
|
1153
|
+
/** @param {any} [option] @returns {any} */
|
|
1154
|
+
(B) => B && B.id
|
|
1155
|
+
).filter(Boolean)
|
|
1038
1156
|
), o = cr(E);
|
|
1039
1157
|
if (o.length === 0)
|
|
1040
1158
|
return {
|
|
@@ -1048,7 +1166,10 @@ function yn(t, n, s = null, a = null, l = "measures", g = [], u = []) {
|
|
|
1048
1166
|
text: `Rendered columns must use brackets: ${R.join(", ")}`
|
|
1049
1167
|
};
|
|
1050
1168
|
if (P.size > 0) {
|
|
1051
|
-
const B = o.filter(
|
|
1169
|
+
const B = o.filter(
|
|
1170
|
+
/** @param {any} [columnId] @returns {any} */
|
|
1171
|
+
(M) => !P.has(M)
|
|
1172
|
+
);
|
|
1052
1173
|
if (B.length > 0)
|
|
1053
1174
|
return {
|
|
1054
1175
|
tone: "warning",
|
|
@@ -1069,23 +1190,47 @@ function yn(t, n, s = null, a = null, l = "measures", g = [], u = []) {
|
|
|
1069
1190
|
tone: "warning",
|
|
1070
1191
|
text: "Add at least one value or formula reference before creating formulas."
|
|
1071
1192
|
};
|
|
1072
|
-
const m = i.filter(
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1193
|
+
const m = i.filter(
|
|
1194
|
+
/** @param {any} [config] @returns {any} */
|
|
1195
|
+
(k) => k.agg === "formula"
|
|
1196
|
+
), T = /* @__PURE__ */ new Map();
|
|
1197
|
+
m.forEach(
|
|
1198
|
+
/** @param {any} [config] @returns {any} */
|
|
1199
|
+
(k) => {
|
|
1200
|
+
const P = k.field === s ? ve(a || N(k), k.field) : N(k);
|
|
1201
|
+
P && (T.set(P, P), T.set(P.toLowerCase(), P));
|
|
1202
|
+
}
|
|
1203
|
+
);
|
|
1204
|
+
const L = i.filter(
|
|
1205
|
+
/** @param {any} [config] @returns {any} */
|
|
1206
|
+
(k) => k.agg !== "formula"
|
|
1207
|
+
).map(
|
|
1208
|
+
/** @param {any} [config] @returns {any} */
|
|
1209
|
+
(k) => k.field
|
|
1210
|
+
).filter(Boolean), _ = new Set(L), D = /* @__PURE__ */ new Set([...L, ...m.map(
|
|
1211
|
+
/** @param {any} [config] @returns {any} */
|
|
1212
|
+
(k) => k.field === s ? ve(a || N(k), k.field) : N(k)
|
|
1213
|
+
).filter(Boolean), ...Array.isArray(u) ? u : []]), y = Array.from(D), h = Gt(E, y), w = h.map(
|
|
1214
|
+
/** @param {any} [token] @returns {any} */
|
|
1215
|
+
(k) => T.get(k) || T.get(k.toLowerCase()) || k
|
|
1216
|
+
), W = w.filter(
|
|
1217
|
+
/** @param {any} [token] @returns {any} */
|
|
1218
|
+
(k) => !D.has(k) && !_.has(k)
|
|
1219
|
+
);
|
|
1078
1220
|
if (W.length > 0)
|
|
1079
1221
|
return {
|
|
1080
1222
|
tone: "warning",
|
|
1081
1223
|
text: `Unknown fields: ${W.join(", ")}`
|
|
1082
1224
|
};
|
|
1083
1225
|
const O = s ? ve(a || s, s) : null;
|
|
1084
|
-
if (s && O && i.some(
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1226
|
+
if (s && O && i.some(
|
|
1227
|
+
/** @param {any} [config] @returns {any} */
|
|
1228
|
+
(P) => {
|
|
1229
|
+
if (!P || P.field === s) return !1;
|
|
1230
|
+
const o = P.agg === "formula" ? N(P) : P.field;
|
|
1231
|
+
return String(o || "").toLowerCase() === O.toLowerCase();
|
|
1232
|
+
}
|
|
1233
|
+
))
|
|
1089
1234
|
return {
|
|
1090
1235
|
tone: "warning",
|
|
1091
1236
|
text: `Reference key "${O}" is already in use.`
|
|
@@ -1097,10 +1242,22 @@ function yn(t, n, s = null, a = null, l = "measures", g = [], u = []) {
|
|
|
1097
1242
|
};
|
|
1098
1243
|
if (s && O) {
|
|
1099
1244
|
const k = {};
|
|
1100
|
-
m.forEach(
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1245
|
+
m.forEach(
|
|
1246
|
+
/** @param {any} [config] @returns {any} */
|
|
1247
|
+
(R) => {
|
|
1248
|
+
const B = R.field === s ? O : N(R), M = R.field === s ? E : String(R.formula || ""), H = Gt(M, y).map(
|
|
1249
|
+
/** @param {any} [token] @returns {any} */
|
|
1250
|
+
(K) => T.get(K) || T.get(K.toLowerCase()) || K
|
|
1251
|
+
).filter(
|
|
1252
|
+
/** @param {any} [token] @returns {any} */
|
|
1253
|
+
(K) => K !== B && m.some(
|
|
1254
|
+
/** @param {any} [candidate] @returns {any} */
|
|
1255
|
+
(x) => N(x) === K || x.field === s && O === K
|
|
1256
|
+
)
|
|
1257
|
+
);
|
|
1258
|
+
k[B] = H;
|
|
1259
|
+
}
|
|
1260
|
+
);
|
|
1104
1261
|
const P = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), A = (R) => {
|
|
1105
1262
|
if (P.has(R)) return !0;
|
|
1106
1263
|
if (o.has(R)) return !1;
|
|
@@ -1173,13 +1330,18 @@ function Sn({ item: t, idx: n, setValConfigs: s, theme: a, colFields: l = [], on
|
|
|
1173
1330
|
const y = [];
|
|
1174
1331
|
return E.canUsePivotSeries && y.push({ value: "pivot", label: "Linked pivot" }), E.canUseFieldSeries && y.push({ value: "field", label: "Series field" }), y;
|
|
1175
1332
|
}, [E]), $ = vt(u.source || "pivot", E) ? u.source || "pivot" : E.defaultSource, i = e.useCallback((y) => {
|
|
1176
|
-
yt(
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1333
|
+
yt(
|
|
1334
|
+
s,
|
|
1335
|
+
n,
|
|
1336
|
+
/** @param {any} [current] @returns {any} */
|
|
1337
|
+
(h) => {
|
|
1338
|
+
const w = bt(h.sparkline) || { ...Ee }, W = pr({ ...w, ...y }, E);
|
|
1339
|
+
return W ? {
|
|
1340
|
+
...h,
|
|
1341
|
+
sparkline: W
|
|
1342
|
+
} : h;
|
|
1343
|
+
}
|
|
1344
|
+
);
|
|
1183
1345
|
}, [E, n, s]), m = e.useCallback((y) => y.stopPropagation(), []), T = [
|
|
1184
1346
|
{ value: "line", label: "Line" },
|
|
1185
1347
|
{ value: "area", label: "Area" },
|
|
@@ -1238,26 +1400,29 @@ function Sn({ item: t, idx: n, setValConfigs: s, theme: a, colFields: l = [], on
|
|
|
1238
1400
|
},
|
|
1239
1401
|
"×"
|
|
1240
1402
|
)),
|
|
1241
|
-
/* @__PURE__ */ e.createElement("div", { style: D }, /* @__PURE__ */ e.createElement("span", { style: _ }, "Data source"), d.length > 0 ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { style: { display: "flex", gap: "4px" } }, d.map(
|
|
1242
|
-
|
|
1243
|
-
{
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1403
|
+
/* @__PURE__ */ e.createElement("div", { style: D }, /* @__PURE__ */ e.createElement("span", { style: _ }, "Data source"), d.length > 0 ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { style: { display: "flex", gap: "4px" } }, d.map(
|
|
1404
|
+
/** @param {any} p0 @returns {any} */
|
|
1405
|
+
({ value: y, label: h }) => /* @__PURE__ */ e.createElement(
|
|
1406
|
+
"button",
|
|
1407
|
+
{
|
|
1408
|
+
key: y,
|
|
1409
|
+
type: "button",
|
|
1410
|
+
onClick: () => i({ source: y }),
|
|
1411
|
+
style: {
|
|
1412
|
+
flex: 1,
|
|
1413
|
+
padding: "4px 0",
|
|
1414
|
+
fontSize: "11px",
|
|
1415
|
+
fontWeight: 600,
|
|
1416
|
+
borderRadius: "6px",
|
|
1417
|
+
cursor: "pointer",
|
|
1418
|
+
border: `1px solid ${$ === y ? a.primary : a.border}`,
|
|
1419
|
+
background: $ === y ? `${a.primary}18` : a.headerSubtleBg || a.background,
|
|
1420
|
+
color: $ === y ? a.primary : a.textSec
|
|
1421
|
+
}
|
|
1422
|
+
},
|
|
1423
|
+
h
|
|
1424
|
+
)
|
|
1425
|
+
)), /* @__PURE__ */ e.createElement("div", { style: { marginTop: "5px", fontSize: "10px", color: a.textSec, lineHeight: 1.4 } }, $ === "pivot" ? "Trend values are collected across the pivot columns. Source value cells stay numeric unless hidden." : "Each cell already contains the full data series for its row.")) : /* @__PURE__ */ e.createElement(
|
|
1261
1426
|
"div",
|
|
1262
1427
|
{
|
|
1263
1428
|
"data-value-sparkline-unavailable": "true",
|
|
@@ -1426,20 +1591,30 @@ function dr({ item: t, idx: n, setValConfigs: s, theme: a, colFields: l = [], fi
|
|
|
1426
1591
|
[l, t]
|
|
1427
1592
|
), L = !!$, _ = !!($ && vt($.source || "pivot", T)), D = e.useCallback((W) => W.stopPropagation(), []), y = e.useCallback(() => {
|
|
1428
1593
|
let W = !1;
|
|
1429
|
-
return yt(
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
)
|
|
1434
|
-
|
|
1435
|
-
|
|
1594
|
+
return yt(
|
|
1595
|
+
s,
|
|
1596
|
+
n,
|
|
1597
|
+
/** @param {any} [current] @returns {any} */
|
|
1598
|
+
(O) => {
|
|
1599
|
+
const k = pr(
|
|
1600
|
+
O.sparkline || Ee,
|
|
1601
|
+
T
|
|
1602
|
+
);
|
|
1603
|
+
return k ? (W = !0, { ...O, sparkline: k }) : O;
|
|
1604
|
+
}
|
|
1605
|
+
), W;
|
|
1436
1606
|
}, [T, n, s]), h = e.useCallback((W) => {
|
|
1437
1607
|
if (W.stopPropagation(), L) {
|
|
1438
1608
|
if (m) {
|
|
1439
1609
|
u && u("This trend is defined by the app. You can adjust its settings, but not remove it here.", "info");
|
|
1440
1610
|
return;
|
|
1441
1611
|
}
|
|
1442
|
-
yt(
|
|
1612
|
+
yt(
|
|
1613
|
+
s,
|
|
1614
|
+
n,
|
|
1615
|
+
/** @param {any} [current] @returns {any} */
|
|
1616
|
+
(O) => ({ ...O, sparkline: !1 })
|
|
1617
|
+
), u && u("Removed trend column.", "info");
|
|
1443
1618
|
} else T.canUseAny && y() ? (d(!0), u && u("Trend column enabled.", "success")) : u && u("Trend needs a column field, or a Series aggregation for field data.", "warning");
|
|
1444
1619
|
}, [T.canUseAny, L, y, n, m, s, u]), w = e.useCallback((W) => {
|
|
1445
1620
|
if (W.stopPropagation(), !T.canUseAny) {
|
|
@@ -1624,20 +1799,32 @@ function kn({ item: t, idx: n, valConfigs: s, setValConfigs: a, theme: l, onClos
|
|
|
1624
1799
|
i.current.setSelectionRange(x, x);
|
|
1625
1800
|
}, [t.field]);
|
|
1626
1801
|
const _ = e.useMemo(
|
|
1627
|
-
() => s.filter(
|
|
1802
|
+
() => s.filter(
|
|
1803
|
+
/** @param {any} [config] @returns {any} */
|
|
1804
|
+
(x) => x && x.field
|
|
1805
|
+
),
|
|
1628
1806
|
[s]
|
|
1629
1807
|
), D = e.useMemo(
|
|
1630
|
-
() => _.filter(
|
|
1808
|
+
() => _.filter(
|
|
1809
|
+
/** @param {any} [config] @returns {any} */
|
|
1810
|
+
(x) => x.agg !== "formula"
|
|
1811
|
+
),
|
|
1631
1812
|
[_]
|
|
1632
1813
|
), y = e.useMemo(
|
|
1633
|
-
() => _.filter(
|
|
1814
|
+
() => _.filter(
|
|
1815
|
+
/** @param {any} [config] @returns {any} */
|
|
1816
|
+
(x) => x.agg === "formula" && x.field !== t.field
|
|
1817
|
+
),
|
|
1634
1818
|
[t.field, _]
|
|
1635
1819
|
), h = e.useMemo(
|
|
1636
1820
|
() => (Array.isArray(E) ? E : []).filter((x) => x && x.id && x.id !== t.field),
|
|
1637
1821
|
[E, t.field]
|
|
1638
1822
|
), w = e.useMemo(
|
|
1639
1823
|
() => {
|
|
1640
|
-
const x = new Set(_.map(
|
|
1824
|
+
const x = new Set(_.map(
|
|
1825
|
+
/** @param {any} [c] @returns {any} */
|
|
1826
|
+
(F) => F.field
|
|
1827
|
+
).filter(Boolean));
|
|
1641
1828
|
return (Array.isArray(d) ? d : []).filter((F) => !x.has(F));
|
|
1642
1829
|
},
|
|
1643
1830
|
[d, _]
|
|
@@ -1663,37 +1850,40 @@ function kn({ item: t, idx: n, valConfigs: s, setValConfigs: a, theme: l, onClos
|
|
|
1663
1850
|
[h, m.formulaRef, m.formulaScope, t.field, D]
|
|
1664
1851
|
), o = m.label !== (t.label || "") || m.formula !== (t.formula || "") || m.formulaRef !== N(t) || m.formulaScope !== ze(t.formulaScope), A = e.useCallback(() => {
|
|
1665
1852
|
const x = ve(m.formulaRef, t.field);
|
|
1666
|
-
a(
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
...U,
|
|
1682
|
-
label: m.label,
|
|
1683
|
-
formula: m.formula,
|
|
1684
|
-
formulaRef: V,
|
|
1685
|
-
formulaScope: m.formulaScope
|
|
1686
|
-
}, Q && Q !== V)
|
|
1687
|
-
for (let Y = 0; Y < v.length; Y += 1) {
|
|
1688
|
-
if (Y === n) continue;
|
|
1689
|
-
const te = v[Y];
|
|
1690
|
-
!te || te.agg !== "formula" || !te.formula || (v[Y] = {
|
|
1691
|
-
...te,
|
|
1692
|
-
formula: fn(te.formula, Q, V)
|
|
1693
|
-
});
|
|
1853
|
+
a(
|
|
1854
|
+
/** @param {any} [prev] @returns {any} */
|
|
1855
|
+
(F) => {
|
|
1856
|
+
const v = [...F], U = v[n];
|
|
1857
|
+
if (!U) return F;
|
|
1858
|
+
const Q = N(U);
|
|
1859
|
+
let V = x;
|
|
1860
|
+
const ee = new Set(
|
|
1861
|
+
v.filter((Z, te) => Z && te !== n).map((Z) => Z.agg === "formula" ? N(Z) : Z.field).filter(Boolean).map((Z) => String(Z).toLowerCase())
|
|
1862
|
+
);
|
|
1863
|
+
if (ee.has(V.toLowerCase())) {
|
|
1864
|
+
let Z = 2, te = `${V}${Z}`;
|
|
1865
|
+
for (; ee.has(te.toLowerCase()); )
|
|
1866
|
+
Z += 1, te = `${V}${Z}`;
|
|
1867
|
+
V = te;
|
|
1694
1868
|
}
|
|
1695
|
-
|
|
1696
|
-
|
|
1869
|
+
if (v[n] = {
|
|
1870
|
+
...U,
|
|
1871
|
+
label: m.label,
|
|
1872
|
+
formula: m.formula,
|
|
1873
|
+
formulaRef: V,
|
|
1874
|
+
formulaScope: m.formulaScope
|
|
1875
|
+
}, Q && Q !== V)
|
|
1876
|
+
for (let Z = 0; Z < v.length; Z += 1) {
|
|
1877
|
+
if (Z === n) continue;
|
|
1878
|
+
const te = v[Z];
|
|
1879
|
+
!te || te.agg !== "formula" || !te.formula || (v[Z] = {
|
|
1880
|
+
...te,
|
|
1881
|
+
formula: fn(te.formula, Q, V)
|
|
1882
|
+
});
|
|
1883
|
+
}
|
|
1884
|
+
return v;
|
|
1885
|
+
}
|
|
1886
|
+
);
|
|
1697
1887
|
}, [m.formula, m.formulaRef, m.formulaScope, m.label, n, t.field, a]), R = e.useCallback(() => {
|
|
1698
1888
|
T({
|
|
1699
1889
|
label: t.label || "",
|
|
@@ -1705,7 +1895,10 @@ function kn({ item: t, idx: n, valConfigs: s, setValConfigs: a, theme: l, onClos
|
|
|
1705
1895
|
const F = i.current;
|
|
1706
1896
|
if (!F) return;
|
|
1707
1897
|
const v = m.formula || "", U = F.selectionStart ?? v.length, Q = F.selectionEnd ?? v.length, V = `${v.slice(0, U)}${x}${v.slice(Q)}`;
|
|
1708
|
-
T(
|
|
1898
|
+
T(
|
|
1899
|
+
/** @param {any} [prev] @returns {any} */
|
|
1900
|
+
(Z) => ({ ...Z, formula: V })
|
|
1901
|
+
);
|
|
1709
1902
|
const ee = U + x.length;
|
|
1710
1903
|
setTimeout(() => {
|
|
1711
1904
|
i.current && (i.current.focus(), i.current.setSelectionRange(ee, ee));
|
|
@@ -1787,7 +1980,10 @@ function kn({ item: t, idx: n, valConfigs: s, setValConfigs: a, theme: l, onClos
|
|
|
1787
1980
|
"input",
|
|
1788
1981
|
{
|
|
1789
1982
|
value: m.label,
|
|
1790
|
-
onChange: (x) => T(
|
|
1983
|
+
onChange: (x) => T(
|
|
1984
|
+
/** @param {any} [prev] @returns {any} */
|
|
1985
|
+
(F) => ({ ...F, label: x.target.value })
|
|
1986
|
+
),
|
|
1791
1987
|
placeholder: "Formula label",
|
|
1792
1988
|
style: {
|
|
1793
1989
|
border: `1px solid ${l.border}`,
|
|
@@ -1804,7 +2000,10 @@ function kn({ item: t, idx: n, valConfigs: s, setValConfigs: a, theme: l, onClos
|
|
|
1804
2000
|
"input",
|
|
1805
2001
|
{
|
|
1806
2002
|
value: m.formulaRef,
|
|
1807
|
-
onChange: (x) => T(
|
|
2003
|
+
onChange: (x) => T(
|
|
2004
|
+
/** @param {any} [prev] @returns {any} */
|
|
2005
|
+
(F) => ({ ...F, formulaRef: ve(x.target.value, t.field) })
|
|
2006
|
+
),
|
|
1808
2007
|
placeholder: "formula1",
|
|
1809
2008
|
style: {
|
|
1810
2009
|
border: `1px solid ${l.border}`,
|
|
@@ -1823,11 +2022,14 @@ function kn({ item: t, idx: n, valConfigs: s, setValConfigs: a, theme: l, onClos
|
|
|
1823
2022
|
value: m.formulaScope,
|
|
1824
2023
|
onChange: (x) => {
|
|
1825
2024
|
const F = ze(x.target.value);
|
|
1826
|
-
T(
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
2025
|
+
T(
|
|
2026
|
+
/** @param {any} [prev] @returns {any} */
|
|
2027
|
+
(v) => ({
|
|
2028
|
+
...v,
|
|
2029
|
+
formulaScope: F,
|
|
2030
|
+
formula: v.formula || (F === "columns" ? Xt(h) : Et(D))
|
|
2031
|
+
})
|
|
2032
|
+
);
|
|
1831
2033
|
},
|
|
1832
2034
|
style: {
|
|
1833
2035
|
border: `1px solid ${l.border}`,
|
|
@@ -1847,7 +2049,10 @@ function kn({ item: t, idx: n, valConfigs: s, setValConfigs: a, theme: l, onClos
|
|
|
1847
2049
|
{
|
|
1848
2050
|
ref: i,
|
|
1849
2051
|
value: m.formula,
|
|
1850
|
-
onChange: (x) => T(
|
|
2052
|
+
onChange: (x) => T(
|
|
2053
|
+
/** @param {any} [prev] @returns {any} */
|
|
2054
|
+
(F) => ({ ...F, formula: x.target.value })
|
|
2055
|
+
),
|
|
1851
2056
|
placeholder: P,
|
|
1852
2057
|
rows: 4,
|
|
1853
2058
|
style: {
|
|
@@ -1875,16 +2080,22 @@ function kn({ item: t, idx: n, valConfigs: s, setValConfigs: a, theme: l, onClos
|
|
|
1875
2080
|
fontSize: "10px",
|
|
1876
2081
|
lineHeight: "14px"
|
|
1877
2082
|
} }, W.text), /* @__PURE__ */ e.createElement("div", { style: { fontSize: "10px", color: l.textSec } }, "Ctrl/Cmd + Enter applies")),
|
|
1878
|
-
/* @__PURE__ */ e.createElement("div", { style: { display: "flex", gap: "8px", flexWrap: "wrap", marginBottom: "12px" } }, k.map(
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
2083
|
+
/* @__PURE__ */ e.createElement("div", { style: { display: "flex", gap: "8px", flexWrap: "wrap", marginBottom: "12px" } }, k.map(
|
|
2084
|
+
/** @param {any} [template] @returns {any} */
|
|
2085
|
+
(x) => /* @__PURE__ */ e.createElement(
|
|
2086
|
+
"button",
|
|
2087
|
+
{
|
|
2088
|
+
key: x.label,
|
|
2089
|
+
type: "button",
|
|
2090
|
+
onClick: () => T(
|
|
2091
|
+
/** @param {any} [prev] @returns {any} */
|
|
2092
|
+
(F) => ({ ...F, formula: x.value })
|
|
2093
|
+
),
|
|
2094
|
+
style: H
|
|
2095
|
+
},
|
|
2096
|
+
x.label
|
|
2097
|
+
)
|
|
2098
|
+
), ["+", "-", "*", "/", "(", ")", "* 100"].map((x) => /* @__PURE__ */ e.createElement(
|
|
1888
2099
|
"button",
|
|
1889
2100
|
{
|
|
1890
2101
|
key: x,
|
|
@@ -1895,51 +2106,63 @@ function kn({ item: t, idx: n, valConfigs: s, setValConfigs: a, theme: l, onClos
|
|
|
1895
2106
|
},
|
|
1896
2107
|
x
|
|
1897
2108
|
))),
|
|
1898
|
-
/* @__PURE__ */ e.createElement("div", { style: { display: "grid", gridTemplateColumns: "1fr", gap: "12px", marginBottom: "14px" } }, xe(m.formulaScope) ? /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement("div", { style: { fontSize: "10px", color: l.textSec, textTransform: "uppercase", letterSpacing: "0.5px", marginBottom: "6px" } }, "Rendered Columns"), /* @__PURE__ */ e.createElement("div", { style: { display: "flex", gap: "6px", flexWrap: "wrap" } }, h.map(
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
2109
|
+
/* @__PURE__ */ e.createElement("div", { style: { display: "grid", gridTemplateColumns: "1fr", gap: "12px", marginBottom: "14px" } }, xe(m.formulaScope) ? /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement("div", { style: { fontSize: "10px", color: l.textSec, textTransform: "uppercase", letterSpacing: "0.5px", marginBottom: "6px" } }, "Rendered Columns"), /* @__PURE__ */ e.createElement("div", { style: { display: "flex", gap: "6px", flexWrap: "wrap" } }, h.map(
|
|
2110
|
+
/** @param {any} [column] @returns {any} */
|
|
2111
|
+
(x) => /* @__PURE__ */ e.createElement(
|
|
2112
|
+
"button",
|
|
2113
|
+
{
|
|
2114
|
+
key: x.id,
|
|
2115
|
+
type: "button",
|
|
2116
|
+
onMouseDown: (F) => F.preventDefault(),
|
|
2117
|
+
onClick: () => B(le(x.id)),
|
|
2118
|
+
style: H,
|
|
2119
|
+
title: `Insert ${x.id}`
|
|
2120
|
+
},
|
|
2121
|
+
x.label || x.id
|
|
2122
|
+
)
|
|
2123
|
+
), h.length === 0 && /* @__PURE__ */ e.createElement("span", { style: { fontSize: "11px", color: l.textSec } }, "Render the pivot once, or type a bracketed column id directly."))) : /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement("div", { style: { fontSize: "10px", color: l.textSec, textTransform: "uppercase", letterSpacing: "0.5px", marginBottom: "6px" } }, "Measures"), /* @__PURE__ */ e.createElement("div", { style: { display: "flex", gap: "6px", flexWrap: "wrap" } }, D.map(
|
|
2124
|
+
/** @param {any} [config] @returns {any} */
|
|
2125
|
+
(x) => /* @__PURE__ */ e.createElement(
|
|
2126
|
+
"button",
|
|
2127
|
+
{
|
|
2128
|
+
key: x.field,
|
|
2129
|
+
type: "button",
|
|
2130
|
+
onMouseDown: (F) => F.preventDefault(),
|
|
2131
|
+
onClick: () => B(ye(x.field)),
|
|
2132
|
+
style: H,
|
|
2133
|
+
title: `Insert ${x.field}`
|
|
2134
|
+
},
|
|
2135
|
+
x.field
|
|
2136
|
+
)
|
|
2137
|
+
))), !xe(m.formulaScope) && y.length > 0 && /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement("div", { style: { fontSize: "10px", color: l.textSec, textTransform: "uppercase", letterSpacing: "0.5px", marginBottom: "6px" } }, "Formula References"), /* @__PURE__ */ e.createElement("div", { style: { display: "flex", gap: "6px", flexWrap: "wrap" } }, y.map(
|
|
2138
|
+
/** @param {any} [config] @returns {any} */
|
|
2139
|
+
(x) => /* @__PURE__ */ e.createElement(
|
|
2140
|
+
"button",
|
|
2141
|
+
{
|
|
2142
|
+
key: x.field,
|
|
2143
|
+
type: "button",
|
|
2144
|
+
onMouseDown: (F) => F.preventDefault(),
|
|
2145
|
+
onClick: () => B(ye(N(x))),
|
|
2146
|
+
style: H,
|
|
2147
|
+
title: `${N(x)}${x.label ? ` (${x.label})` : ""}`
|
|
2148
|
+
},
|
|
2149
|
+
N(x)
|
|
2150
|
+
)
|
|
2151
|
+
))), !xe(m.formulaScope) && w.length > 0 && /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement("div", { style: { fontSize: "10px", color: l.textSec, textTransform: "uppercase", letterSpacing: "0.5px", marginBottom: "6px" } }, "Data Fields (auto-aggregated as sum)"), /* @__PURE__ */ e.createElement("div", { style: { display: "flex", gap: "6px", flexWrap: "wrap" } }, w.map(
|
|
2152
|
+
/** @param {any} [f] @returns {any} */
|
|
2153
|
+
(x) => /* @__PURE__ */ e.createElement(
|
|
2154
|
+
"button",
|
|
2155
|
+
{
|
|
2156
|
+
key: x,
|
|
2157
|
+
type: "button",
|
|
2158
|
+
onMouseDown: (F) => F.preventDefault(),
|
|
2159
|
+
onClick: () => B(ye(x)),
|
|
2160
|
+
style: { ...H, borderColor: `${l.primary}66`, color: l.primary, background: `${l.primary}0d` },
|
|
2161
|
+
title: `Insert: ${x}`
|
|
2162
|
+
},
|
|
2163
|
+
fe(x)
|
|
2164
|
+
)
|
|
2165
|
+
)))),
|
|
1943
2166
|
/* @__PURE__ */ e.createElement("div", { style: { display: "flex", justifyContent: "space-between", gap: "8px", flexWrap: "wrap" } }, /* @__PURE__ */ e.createElement(
|
|
1944
2167
|
"button",
|
|
1945
2168
|
{
|
|
@@ -2147,10 +2370,13 @@ function qt({
|
|
|
2147
2370
|
}
|
|
2148
2371
|
function Qt({ measureAxis: t, setMeasureAxis: n, theme: s, valueSelectStyle: a, regularValueCount: l }) {
|
|
2149
2372
|
const g = e.useMemo(() => Pe(t), [t]), u = e.useCallback((d) => {
|
|
2150
|
-
typeof n == "function" && n(
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2373
|
+
typeof n == "function" && n(
|
|
2374
|
+
/** @param {any} [previous] @returns {any} */
|
|
2375
|
+
($) => ({
|
|
2376
|
+
...Pe($),
|
|
2377
|
+
...typeof d == "function" ? d(Pe($)) : d
|
|
2378
|
+
})
|
|
2379
|
+
);
|
|
2154
2380
|
}, [n]), E = {
|
|
2155
2381
|
...a,
|
|
2156
2382
|
width: "112px",
|
|
@@ -2209,631 +2435,556 @@ function Qt({ measureAxis: t, setMeasureAxis: n, theme: s, valueSelectStyle: a,
|
|
|
2209
2435
|
}
|
|
2210
2436
|
), "Zero")), /* @__PURE__ */ e.createElement("span", { style: { fontSize: "10px", color: s.textSec } }, l, " selected"));
|
|
2211
2437
|
}
|
|
2212
|
-
const Fn = e.memo(
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
[
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
()
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
}, [G, w]), $t = e.useCallback((r, f, p, b) => {
|
|
2354
|
-
if (typeof v != "function") return;
|
|
2355
|
-
ot({ field: r, zone: f, idx: p, label: b }), w && w(`Picked up ${b}. Focus a target field or zone and press Enter.`, "info");
|
|
2356
|
-
}, [v, w]), Xe = e.useCallback((r, f = null) => {
|
|
2357
|
-
if (!G || typeof v != "function") return !1;
|
|
2358
|
-
const p = Be[r] || [], b = Number(f), S = Number.isFinite(b) ? Math.max(0, Math.min(Math.floor(b), p.length)) : p.length, I = v({
|
|
2359
|
-
field: G.field,
|
|
2360
|
-
srcZone: G.zone,
|
|
2361
|
-
srcIdx: G.idx,
|
|
2362
|
-
targetZone: r,
|
|
2363
|
-
targetIdx: S,
|
|
2364
|
-
source: "layout:keyboard-drop"
|
|
2365
|
-
});
|
|
2366
|
-
return I !== !1 && (w && w(`Moved ${G.label}.`, "success"), ot(null)), I !== !1;
|
|
2367
|
-
}, [G, v, w, Be]), Ft = e.useCallback((r, f, p, b, S) => {
|
|
2368
|
-
if (!Nt(r.target)) {
|
|
2369
|
-
if (r.key === "Escape") {
|
|
2370
|
-
r.preventDefault(), r.stopPropagation(), Ne();
|
|
2371
|
-
return;
|
|
2372
|
-
}
|
|
2373
|
-
r.key !== "Enter" && r.key !== " " || (r.preventDefault(), r.stopPropagation(), G ? Xe(p, b) : $t(f, p, b, S));
|
|
2374
|
-
}
|
|
2375
|
-
}, [Ne, Xe, G, $t]), Ar = e.useCallback((r, f) => {
|
|
2376
|
-
if (!Nt(r.target)) {
|
|
2377
|
-
if (r.key === "Escape") {
|
|
2378
|
-
r.preventDefault(), r.stopPropagation(), Ne();
|
|
2438
|
+
const Fn = e.memo(
|
|
2439
|
+
/** @param {any} p0 @returns {any} */
|
|
2440
|
+
function({
|
|
2441
|
+
sidebarTab: n,
|
|
2442
|
+
setSidebarTab: s,
|
|
2443
|
+
rowFields: a,
|
|
2444
|
+
setRowFields: l,
|
|
2445
|
+
colFields: g,
|
|
2446
|
+
setColFields: u,
|
|
2447
|
+
valConfigs: E,
|
|
2448
|
+
setValConfigs: d,
|
|
2449
|
+
measureAxis: $ = {},
|
|
2450
|
+
setMeasureAxis: i = null,
|
|
2451
|
+
columnVisibility: m,
|
|
2452
|
+
setColumnVisibility: T,
|
|
2453
|
+
columnPinning: L,
|
|
2454
|
+
setColumnPinning: _,
|
|
2455
|
+
availableFields: D,
|
|
2456
|
+
table: y,
|
|
2457
|
+
pinningPresets: h,
|
|
2458
|
+
showNotification: w,
|
|
2459
|
+
filterAnchorEl: W,
|
|
2460
|
+
setFilterAnchorEl: O,
|
|
2461
|
+
colSearch: k,
|
|
2462
|
+
setColSearch: P,
|
|
2463
|
+
colTypeFilter: o,
|
|
2464
|
+
setColTypeFilter: A,
|
|
2465
|
+
selectedCols: R,
|
|
2466
|
+
setSelectedCols: B,
|
|
2467
|
+
dropLine: M,
|
|
2468
|
+
onDragStart: H,
|
|
2469
|
+
onDragOver: K,
|
|
2470
|
+
onDrop: x,
|
|
2471
|
+
onDragEnd: F,
|
|
2472
|
+
onKeyboardFieldDrop: v,
|
|
2473
|
+
handleHeaderFilter: U,
|
|
2474
|
+
handleFilterClick: Q,
|
|
2475
|
+
requestFilterOptions: V,
|
|
2476
|
+
handleExpandAllRows: ee,
|
|
2477
|
+
handlePinColumn: Z,
|
|
2478
|
+
toggleAllColumnsPinned: te,
|
|
2479
|
+
activeFilterCol: Cn,
|
|
2480
|
+
closeFilterPopover: wn,
|
|
2481
|
+
filterOptions: Me,
|
|
2482
|
+
filterOptionMeta: Oe = {},
|
|
2483
|
+
clientFilterOptionMap: He = {},
|
|
2484
|
+
data: Se,
|
|
2485
|
+
sidebarWidth: rt,
|
|
2486
|
+
setSidebarWidth: St,
|
|
2487
|
+
fieldPanelSizes: Ue,
|
|
2488
|
+
setFieldPanelSizes: nt,
|
|
2489
|
+
fixedSparklineValueKeys: lt = [],
|
|
2490
|
+
sparklineFields: Rn = null,
|
|
2491
|
+
displayedColumnOptions: fr = [],
|
|
2492
|
+
reportEditorSelection: gr = null,
|
|
2493
|
+
showReportConfigColumn: mr = !0,
|
|
2494
|
+
setShowReportConfigColumn: xr = null,
|
|
2495
|
+
formulaErrors: he = {},
|
|
2496
|
+
serverSide: je = !1
|
|
2497
|
+
}) {
|
|
2498
|
+
Or("SidebarPanel");
|
|
2499
|
+
const { theme: c, styles: Y } = Hr(), {
|
|
2500
|
+
filters: ae,
|
|
2501
|
+
setFilters: at,
|
|
2502
|
+
pivotMode: yr,
|
|
2503
|
+
reportDef: br,
|
|
2504
|
+
setReportDef: Er,
|
|
2505
|
+
savedReports: vr,
|
|
2506
|
+
setSavedReports: Sr,
|
|
2507
|
+
activeReportId: hr,
|
|
2508
|
+
setActiveReportId: kr,
|
|
2509
|
+
customDimensions: _e,
|
|
2510
|
+
setCustomDimensions: ht
|
|
2511
|
+
} = Ur(), [Ve, kt] = e.useState({ columnId: null, anchorEl: null }), [ke, Ce] = e.useState(null), [se, ge] = e.useState(null), [we, Cr] = e.useState("report"), Ze = e.useRef(null), [wr, Ye] = e.useState(null), pe = e.useRef(null), Ct = e.useRef(0), Ke = e.useRef(null), ce = e.useRef(null), [G, ot] = e.useState(null), [it, wt] = e.useState(""), st = e.useMemo(
|
|
2512
|
+
() => new Set(Array.isArray(lt) ? lt : []),
|
|
2513
|
+
[lt]
|
|
2514
|
+
), X = e.useCallback(
|
|
2515
|
+
(r) => jr(r, _e),
|
|
2516
|
+
[_e]
|
|
2517
|
+
), Rt = e.useMemo(
|
|
2518
|
+
() => Pe($),
|
|
2519
|
+
[$]
|
|
2520
|
+
), de = Rt.labelField || "Measure Name", Re = e.useMemo(
|
|
2521
|
+
() => (D || []).filter(
|
|
2522
|
+
/** @param {any} [field] @returns {any} */
|
|
2523
|
+
(r) => r
|
|
2524
|
+
),
|
|
2525
|
+
[D]
|
|
2526
|
+
), J = e.useMemo(
|
|
2527
|
+
() => Re.filter(
|
|
2528
|
+
/** @param {any} [field] @returns {any} */
|
|
2529
|
+
(r) => r && !tr(r)
|
|
2530
|
+
),
|
|
2531
|
+
[Re]
|
|
2532
|
+
), Te = Array.isArray(E) && E.length > 0 && de && !Re.includes(de), De = e.useMemo(
|
|
2533
|
+
() => Te ? [de, ...Re] : Re,
|
|
2534
|
+
[Re, de, Te]
|
|
2535
|
+
), We = it.trim().toLowerCase(), Ge = e.useCallback((r) => {
|
|
2536
|
+
if (!We) return !0;
|
|
2537
|
+
const f = Te && r === de ? "measure name measure names metric metrics value values" : "";
|
|
2538
|
+
return String(r || "").toLowerCase().includes(We) || String(X(r) || "").toLowerCase().includes(We) || f.includes(We);
|
|
2539
|
+
}, [X, de, We, Te]), ct = e.useMemo(
|
|
2540
|
+
() => De.length > 8 ? De.filter(Ge) : De,
|
|
2541
|
+
[De, Ge]
|
|
2542
|
+
), ut = e.useMemo(
|
|
2543
|
+
() => J.length > 8 ? J.filter(Ge) : J,
|
|
2544
|
+
[J, Ge]
|
|
2545
|
+
), Dt = e.useCallback((r) => {
|
|
2546
|
+
l(
|
|
2547
|
+
/** @param {any} [prev] @returns {any} */
|
|
2548
|
+
(f) => (f || []).filter(
|
|
2549
|
+
/** @param {any} [item] @returns {any} */
|
|
2550
|
+
(p) => p !== r
|
|
2551
|
+
)
|
|
2552
|
+
), u(
|
|
2553
|
+
/** @param {any} [prev] @returns {any} */
|
|
2554
|
+
(f) => (f || []).filter(
|
|
2555
|
+
/** @param {any} [item] @returns {any} */
|
|
2556
|
+
(p) => p !== r
|
|
2557
|
+
)
|
|
2558
|
+
), d(
|
|
2559
|
+
/** @param {any} [prev] @returns {any} */
|
|
2560
|
+
(f) => (f || []).filter(
|
|
2561
|
+
/** @param {any} [item] @returns {any} */
|
|
2562
|
+
(p) => !(p && p.field === r)
|
|
2563
|
+
)
|
|
2564
|
+
), at(
|
|
2565
|
+
/** @param {any} [prev] @returns {any} */
|
|
2566
|
+
(f) => {
|
|
2567
|
+
if (!f || !Object.prototype.hasOwnProperty.call(f, r)) return f;
|
|
2568
|
+
const p = { ...f };
|
|
2569
|
+
return delete p[r], p;
|
|
2570
|
+
}
|
|
2571
|
+
);
|
|
2572
|
+
}, [u, at, l, d]), Rr = e.useCallback((r) => {
|
|
2573
|
+
const f = pe.current;
|
|
2574
|
+
if (!f) return;
|
|
2575
|
+
const p = 60, b = 12, S = f.getBoundingClientRect(), I = r.clientY, q = I - S.top, C = S.bottom - I;
|
|
2576
|
+
let j = 0;
|
|
2577
|
+
if (q < p && q >= 0 ? j = -1 : C < p && C >= 0 && (j = 1), j === 0) {
|
|
2578
|
+
ce.current && (cancelAnimationFrame(ce.current), ce.current = null);
|
|
2379
2579
|
return;
|
|
2380
2580
|
}
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2581
|
+
const ie = () => {
|
|
2582
|
+
pe.current && (pe.current.scrollTop += j * b, ce.current = requestAnimationFrame(ie));
|
|
2583
|
+
};
|
|
2584
|
+
ce.current || (ce.current = requestAnimationFrame(ie));
|
|
2585
|
+
}, []), At = e.useCallback(() => {
|
|
2586
|
+
ce.current && (cancelAnimationFrame(ce.current), ce.current = null);
|
|
2587
|
+
}, []), oe = e.useMemo(
|
|
2588
|
+
() => E.filter(
|
|
2589
|
+
/** @param {any} [config] @returns {any} */
|
|
2590
|
+
(r) => r && r.agg === "formula"
|
|
2591
|
+
),
|
|
2592
|
+
[E]
|
|
2593
|
+
), me = e.useMemo(
|
|
2594
|
+
() => oe.length,
|
|
2595
|
+
[oe]
|
|
2596
|
+
), Ae = e.useMemo(
|
|
2597
|
+
() => E.filter(
|
|
2598
|
+
/** @param {any} [config] @returns {any} */
|
|
2599
|
+
(r) => r && r.agg !== "formula"
|
|
2600
|
+
).length,
|
|
2601
|
+
[E]
|
|
2602
|
+
), Dr = e.useMemo(() => [
|
|
2603
|
+
{ id: "rows", label: "Rows", icon: /* @__PURE__ */ e.createElement(z.List, null) },
|
|
2604
|
+
{ id: "cols", label: "Columns", icon: /* @__PURE__ */ e.createElement(z.Columns, null) },
|
|
2605
|
+
{ id: "vals", label: "Values", icon: /* @__PURE__ */ e.createElement(z.Sigma, null) },
|
|
2606
|
+
{ id: "filter", label: "Filters", icon: /* @__PURE__ */ e.createElement(z.Filter, null) }
|
|
2607
|
+
], []), Be = e.useMemo(() => ({
|
|
2608
|
+
filter: Object.keys(ae || {}).filter((r) => r !== "global"),
|
|
2609
|
+
rows: a || [],
|
|
2610
|
+
cols: g || [],
|
|
2611
|
+
vals: E || []
|
|
2612
|
+
}), [g, ae, a, E]), Ne = e.useCallback(() => {
|
|
2613
|
+
G && w && w("Keyboard move cancelled.", "info"), ot(null);
|
|
2614
|
+
}, [G, w]), $t = e.useCallback((r, f, p, b) => {
|
|
2615
|
+
if (typeof v != "function") return;
|
|
2616
|
+
ot({ field: r, zone: f, idx: p, label: b }), w && w(`Picked up ${b}. Focus a target field or zone and press Enter.`, "info");
|
|
2617
|
+
}, [v, w]), Xe = e.useCallback((r, f = null) => {
|
|
2618
|
+
if (!G || typeof v != "function") return !1;
|
|
2619
|
+
const p = Be[r] || [], b = Number(f), S = Number.isFinite(b) ? Math.max(0, Math.min(Math.floor(b), p.length)) : p.length, I = v({
|
|
2620
|
+
field: G.field,
|
|
2621
|
+
srcZone: G.zone,
|
|
2622
|
+
srcIdx: G.idx,
|
|
2623
|
+
targetZone: r,
|
|
2624
|
+
targetIdx: S,
|
|
2625
|
+
source: "layout:keyboard-drop"
|
|
2626
|
+
});
|
|
2627
|
+
return I !== !1 && (w && w(`Moved ${G.label}.`, "success"), ot(null)), I !== !1;
|
|
2628
|
+
}, [G, v, w, Be]), Ft = e.useCallback((r, f, p, b, S) => {
|
|
2629
|
+
if (!Nt(r.target)) {
|
|
2630
|
+
if (r.key === "Escape") {
|
|
2631
|
+
r.preventDefault(), r.stopPropagation(), Ne();
|
|
2632
|
+
return;
|
|
2633
|
+
}
|
|
2634
|
+
r.key !== "Enter" && r.key !== " " || (r.preventDefault(), r.stopPropagation(), G ? Xe(p, b) : $t(f, p, b, S));
|
|
2433
2635
|
}
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
d((p) => {
|
|
2442
|
-
const b = [...p], S = b[r];
|
|
2443
|
-
return S ? (b[r] = { ...S, weightField: f }, b) : p;
|
|
2444
|
-
});
|
|
2445
|
-
}, [d, w]), zr = e.useCallback((r, f) => {
|
|
2446
|
-
d((p) => {
|
|
2447
|
-
const b = [...p], S = b[r];
|
|
2448
|
-
return S ? (b[r] = {
|
|
2449
|
-
...S,
|
|
2450
|
-
windowFn: f === "none" ? null : f
|
|
2451
|
-
}, b) : p;
|
|
2452
|
-
});
|
|
2453
|
-
}, [d]), Bt = e.useCallback(() => {
|
|
2454
|
-
const r = xn(E), f = E.filter((I) => I && I.agg !== "formula"), p = `Formula ${me + 1}`, b = Et(f), S = dn(p, E, r);
|
|
2455
|
-
Ce(r), ge(r), d((I) => [
|
|
2456
|
-
...I,
|
|
2457
|
-
{
|
|
2458
|
-
field: r,
|
|
2459
|
-
agg: "formula",
|
|
2460
|
-
label: p,
|
|
2461
|
-
formula: b,
|
|
2462
|
-
formulaRef: S,
|
|
2463
|
-
formulaScope: "measures"
|
|
2636
|
+
}, [Ne, Xe, G, $t]), Ar = e.useCallback((r, f) => {
|
|
2637
|
+
if (!Nt(r.target)) {
|
|
2638
|
+
if (r.key === "Escape") {
|
|
2639
|
+
r.preventDefault(), r.stopPropagation(), Ne();
|
|
2640
|
+
return;
|
|
2641
|
+
}
|
|
2642
|
+
!G || r.key !== "Enter" && r.key !== " " || (r.preventDefault(), r.stopPropagation(), Xe(f, (Be[f] || []).length));
|
|
2464
2643
|
}
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2644
|
+
}, [Ne, Xe, G, Be]), $r = e.useCallback((r) => {
|
|
2645
|
+
r.preventDefault();
|
|
2646
|
+
const f = r.clientX, p = rt || 288;
|
|
2647
|
+
Ke.current = { startX: f, startWidth: p };
|
|
2648
|
+
const b = (I) => {
|
|
2649
|
+
const q = I.clientX - Ke.current.startX, C = Math.max(200, Math.min(520, Ke.current.startWidth + q));
|
|
2650
|
+
St(C);
|
|
2651
|
+
}, S = () => {
|
|
2652
|
+
Ke.current = null, window.removeEventListener("mousemove", b), window.removeEventListener("mouseup", S);
|
|
2653
|
+
};
|
|
2654
|
+
window.addEventListener("mousemove", b), window.addEventListener("mouseup", S);
|
|
2655
|
+
}, [rt, St]), zt = e.useCallback((r, f) => {
|
|
2656
|
+
typeof nt == "function" && nt(
|
|
2657
|
+
/** @param {any} [prev] @returns {any} */
|
|
2658
|
+
(p) => {
|
|
2659
|
+
const b = Vr(p, r, f), S = p && p[r] ? p[r] : null, I = b[r];
|
|
2660
|
+
return S && S.width === I.width && S.height === I.height ? p : b;
|
|
2661
|
+
}
|
|
2662
|
+
);
|
|
2663
|
+
}, [nt]), Mt = Y.dropZone && Y.dropZone.padding || "8px", _t = e.useMemo(() => {
|
|
2664
|
+
const r = { ...Y.dropZone || {} };
|
|
2665
|
+
return delete r.minHeight, delete r.maxHeight, delete r.overflowY, delete r.padding, delete r.border, delete r.boxShadow, r;
|
|
2666
|
+
}, [Y.dropZone]), Tt = e.useCallback((r) => {
|
|
2667
|
+
if (Me && Me[r]) return Me[r];
|
|
2668
|
+
if (He && He[r]) return He[r];
|
|
2669
|
+
if (!y || !y.getColumn) return [];
|
|
2670
|
+
if (!y.getColumn(r)) return [];
|
|
2671
|
+
const p = /* @__PURE__ */ new Set();
|
|
2672
|
+
return (y.getCoreRowModel ? y.getCoreRowModel().rows : []).forEach(
|
|
2673
|
+
/** @param {any} [row] @returns {any} */
|
|
2674
|
+
(S) => {
|
|
2675
|
+
const I = S.getValue(r);
|
|
2676
|
+
I != null && I !== "" && p.add(I);
|
|
2677
|
+
}
|
|
2678
|
+
), Array.from(p).sort((S, I) => String(S).localeCompare(String(I), void 0, { numeric: !0, sensitivity: "base" }));
|
|
2679
|
+
}, [He, Me, y]), ue = e.useMemo(() => ({
|
|
2499
2680
|
border: `1px solid ${c.border}`,
|
|
2681
|
+
background: c.headerSubtleBg || c.surfaceInset || c.background,
|
|
2682
|
+
color: c.text,
|
|
2683
|
+
cursor: "pointer",
|
|
2500
2684
|
borderRadius: c.radiusSm || "8px",
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
"
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2685
|
+
fontSize: "9px",
|
|
2686
|
+
lineHeight: 1.2,
|
|
2687
|
+
padding: "1px 4px",
|
|
2688
|
+
minHeight: "20px",
|
|
2689
|
+
outline: "none"
|
|
2690
|
+
}), [c.background, c.border, c.headerSubtleBg, c.radiusSm, c.surfaceInset, c.text]), Wt = e.useCallback((r, f) => {
|
|
2691
|
+
d(
|
|
2692
|
+
/** @param {any} [prev] @returns {any} */
|
|
2693
|
+
(p) => {
|
|
2694
|
+
const b = [...p], S = b[r];
|
|
2695
|
+
if (!S) return p;
|
|
2696
|
+
if (Ht(f) && !S.weightField) {
|
|
2697
|
+
const I = Array.isArray(J) && J.length > 0 ? J.find((j) => j !== S.field) || J[0] : "", q = typeof window < "u" ? window.prompt(
|
|
2698
|
+
`Weight field for weighted average of ${fe(S.field)}`,
|
|
2699
|
+
S.weightField || I || ""
|
|
2700
|
+
) : S.weightField || I || "", C = typeof q == "string" ? q.trim() : "";
|
|
2701
|
+
return C ? Array.isArray(J) && J.length > 0 && !J.includes(C) ? (w && w(`Unknown weight field: ${C}`, "warning"), p) : (b[r] = { ...S, agg: f, weightField: C }, b) : (w && w("Weighted average requires a weight field.", "warning"), p);
|
|
2702
|
+
}
|
|
2703
|
+
return b[r] = { ...S, agg: f }, b;
|
|
2518
2704
|
}
|
|
2705
|
+
);
|
|
2706
|
+
}, [J, d, w]), Fr = e.useCallback((r, f) => {
|
|
2707
|
+
if (!f) {
|
|
2708
|
+
w && w("Weighted average requires a weight field.", "warning");
|
|
2709
|
+
return;
|
|
2519
2710
|
}
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
title: "Clear search",
|
|
2526
|
-
onClick: () => wt(""),
|
|
2527
|
-
style: {
|
|
2528
|
-
border: "none",
|
|
2529
|
-
background: "transparent",
|
|
2530
|
-
color: c.textSec,
|
|
2531
|
-
cursor: "pointer",
|
|
2532
|
-
padding: 0,
|
|
2533
|
-
display: "flex",
|
|
2534
|
-
alignItems: "center"
|
|
2711
|
+
d(
|
|
2712
|
+
/** @param {any} [prev] @returns {any} */
|
|
2713
|
+
(p) => {
|
|
2714
|
+
const b = [...p], S = b[r];
|
|
2715
|
+
return S ? (b[r] = { ...S, weightField: f }, b) : p;
|
|
2535
2716
|
}
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2717
|
+
);
|
|
2718
|
+
}, [d, w]), zr = e.useCallback((r, f) => {
|
|
2719
|
+
d(
|
|
2720
|
+
/** @param {any} [prev] @returns {any} */
|
|
2721
|
+
(p) => {
|
|
2722
|
+
const b = [...p], S = b[r];
|
|
2723
|
+
return S ? (b[r] = {
|
|
2724
|
+
...S,
|
|
2725
|
+
windowFn: f === "none" ? null : f
|
|
2726
|
+
}, b) : p;
|
|
2727
|
+
}
|
|
2728
|
+
);
|
|
2729
|
+
}, [d]), Bt = e.useCallback(() => {
|
|
2730
|
+
const r = xn(E), f = E.filter(
|
|
2731
|
+
/** @param {any} [config] @returns {any} */
|
|
2732
|
+
(I) => I && I.agg !== "formula"
|
|
2733
|
+
), p = `Formula ${me + 1}`, b = Et(f), S = dn(p, E, r);
|
|
2734
|
+
Ce(r), ge(r), d(
|
|
2735
|
+
/** @param {any} [prev] @returns {any} */
|
|
2736
|
+
(I) => [
|
|
2737
|
+
...I,
|
|
2738
|
+
{
|
|
2739
|
+
field: r,
|
|
2740
|
+
agg: "formula",
|
|
2741
|
+
label: p,
|
|
2742
|
+
formula: b,
|
|
2743
|
+
formulaRef: S,
|
|
2744
|
+
formulaScope: "measures"
|
|
2745
|
+
}
|
|
2746
|
+
]
|
|
2747
|
+
), w && (f.length === 0 ? w("Added a formula column. Add at least one regular value measure to reference in it.", "warning") : w(`Added ${p}.`, "success"));
|
|
2748
|
+
}, [me, ge, d, Ce, w, E]), Mr = (r, f) => {
|
|
2749
|
+
r.stopPropagation(), pe.current && (Ct.current = pe.current.scrollTop), kt(
|
|
2750
|
+
/** @param {any} [prev] @returns {any} */
|
|
2751
|
+
(p) => p.columnId === f ? { columnId: null, anchorEl: null } : { columnId: f, anchorEl: r.currentTarget }
|
|
2752
|
+
), V && V(f);
|
|
2753
|
+
}, _r = () => kt({ columnId: null, anchorEl: null });
|
|
2754
|
+
e.useEffect(() => {
|
|
2755
|
+
pe.current && Ve.columnId && (pe.current.scrollTop = Ct.current);
|
|
2756
|
+
}, [Me, Ve.columnId]), e.useEffect(() => {
|
|
2757
|
+
if (oe.length === 0) {
|
|
2758
|
+
ke !== null && Ce(null), se !== null && ge(null);
|
|
2759
|
+
return;
|
|
2566
2760
|
}
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2761
|
+
oe.some(
|
|
2762
|
+
/** @param {any} [config] @returns {any} */
|
|
2763
|
+
(f) => f.field === ke
|
|
2764
|
+
) || Ce(oe[oe.length - 1].field), se && !oe.some(
|
|
2765
|
+
/** @param {any} [config] @returns {any} */
|
|
2766
|
+
(f) => f.field === se
|
|
2767
|
+
) && ge(null);
|
|
2768
|
+
}, [ke, oe, se]);
|
|
2769
|
+
const pt = e.useMemo(
|
|
2770
|
+
() => E.findIndex(
|
|
2771
|
+
/** @param {any} [config] @returns {any} */
|
|
2772
|
+
(r) => r && r.agg === "formula" && r.field === se
|
|
2773
|
+
),
|
|
2774
|
+
[se, E]
|
|
2775
|
+
), dt = pt >= 0 ? E[pt] : null, It = e.useCallback((r) => {
|
|
2776
|
+
Ce(r), ge(r);
|
|
2777
|
+
}, []), Ie = e.useCallback((r) => {
|
|
2778
|
+
const f = E[r] && E[r].agg === "formula" ? E[r].field : null;
|
|
2779
|
+
if (d(
|
|
2780
|
+
/** @param {any} [prev] @returns {any} */
|
|
2781
|
+
(p) => p.filter(
|
|
2782
|
+
/** @param {any} [_] @param {any} [index] @returns {any} */
|
|
2783
|
+
(b, S) => S !== r
|
|
2784
|
+
)
|
|
2785
|
+
), f && f === ke) {
|
|
2786
|
+
const p = oe.find(
|
|
2787
|
+
/** @param {any} [config] @returns {any} */
|
|
2788
|
+
(b) => b.field !== f
|
|
2789
|
+
);
|
|
2790
|
+
Ce(p ? p.field : null);
|
|
2580
2791
|
}
|
|
2581
|
-
|
|
2582
|
-
"
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
onClick: () => s("filters"),
|
|
2587
|
-
style: {
|
|
2588
|
-
padding: "8px 16px",
|
|
2589
|
-
cursor: "pointer",
|
|
2590
|
-
borderBottom: n === "filters" ? `2px solid ${c.primary}` : "none",
|
|
2591
|
-
fontWeight: n === "filters" ? 600 : 400,
|
|
2592
|
-
color: n === "filters" ? c.primary : c.textSec,
|
|
2792
|
+
f && f === se && ge(null);
|
|
2793
|
+
}, [ke, oe, se, d, E]), $e = yr === "report", Lt = Math.max(rt || 288, $e ? 380 : 0), Pt = (r, f) => {
|
|
2794
|
+
if (r <= 8) return null;
|
|
2795
|
+
const p = it.trim().length > 0;
|
|
2796
|
+
return /* @__PURE__ */ e.createElement("div", { style: {
|
|
2593
2797
|
display: "flex",
|
|
2594
2798
|
alignItems: "center",
|
|
2595
|
-
gap: "6px"
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
customDimensions: _e,
|
|
2641
|
-
setCustomDimensions: ht,
|
|
2642
|
-
data: Se,
|
|
2643
|
-
theme: c,
|
|
2644
|
-
showNotification: w,
|
|
2645
|
-
getFieldLabel: X,
|
|
2646
|
-
onDeleteField: Dt
|
|
2647
|
-
}
|
|
2648
|
-
), /* @__PURE__ */ e.createElement("div", { style: { fontSize: "10px", color: c.textSec, textTransform: "uppercase", letterSpacing: "0.5px", marginBottom: "6px", padding: "0 2px" } }, /* @__PURE__ */ e.createElement(z.Database, { style: { verticalAlign: "middle", marginRight: "4px" } }), "Available Fields — click to add"), Pt(J.length, ut.length), /* @__PURE__ */ e.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: "4px", marginBottom: "14px" } }, ut.map((r) => {
|
|
2649
|
-
const f = E.some((p) => p && p.field === r && p.agg !== "formula");
|
|
2650
|
-
return /* @__PURE__ */ e.createElement(
|
|
2799
|
+
gap: "6px",
|
|
2800
|
+
margin: "0 2px 8px",
|
|
2801
|
+
padding: "5px 8px",
|
|
2802
|
+
border: `1px solid ${c.border}`,
|
|
2803
|
+
borderRadius: c.radiusSm || "8px",
|
|
2804
|
+
background: c.headerSubtleBg || c.surfaceInset || c.background
|
|
2805
|
+
} }, /* @__PURE__ */ e.createElement(z.Search, { style: { flexShrink: 0, color: c.textSec } }), /* @__PURE__ */ e.createElement(
|
|
2806
|
+
"input",
|
|
2807
|
+
{
|
|
2808
|
+
type: "search",
|
|
2809
|
+
"aria-label": "Search available fields",
|
|
2810
|
+
placeholder: `Search ${r} fields...`,
|
|
2811
|
+
value: it,
|
|
2812
|
+
onChange: (b) => wt(b.target.value),
|
|
2813
|
+
style: {
|
|
2814
|
+
flex: 1,
|
|
2815
|
+
minWidth: 0,
|
|
2816
|
+
border: "none",
|
|
2817
|
+
outline: "none",
|
|
2818
|
+
background: "transparent",
|
|
2819
|
+
color: c.text,
|
|
2820
|
+
fontSize: "12px"
|
|
2821
|
+
}
|
|
2822
|
+
}
|
|
2823
|
+
), p && /* @__PURE__ */ e.createElement(
|
|
2824
|
+
"button",
|
|
2825
|
+
{
|
|
2826
|
+
type: "button",
|
|
2827
|
+
"aria-label": "Clear available field search",
|
|
2828
|
+
title: "Clear search",
|
|
2829
|
+
onClick: () => wt(""),
|
|
2830
|
+
style: {
|
|
2831
|
+
border: "none",
|
|
2832
|
+
background: "transparent",
|
|
2833
|
+
color: c.textSec,
|
|
2834
|
+
cursor: "pointer",
|
|
2835
|
+
padding: 0,
|
|
2836
|
+
display: "flex",
|
|
2837
|
+
alignItems: "center"
|
|
2838
|
+
}
|
|
2839
|
+
},
|
|
2840
|
+
/* @__PURE__ */ e.createElement(z.Close, null)
|
|
2841
|
+
), p && /* @__PURE__ */ e.createElement("span", { style: { fontSize: "10px", color: c.textSec, whiteSpace: "nowrap" } }, f, "/", r));
|
|
2842
|
+
};
|
|
2843
|
+
return /* @__PURE__ */ e.createElement("div", { style: { position: "relative", display: "flex", flexShrink: 0 } }, /* @__PURE__ */ e.createElement("div", { ref: pe, style: { ...Y.sidebar, width: `${Lt}px`, minWidth: `${Lt}px` }, role: "complementary", "aria-label": "Tool Panel", onDragOver: Rr, onDragLeave: At, onDrop: At }, /* @__PURE__ */ e.createElement(
|
|
2651
2844
|
"div",
|
|
2652
2845
|
{
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2846
|
+
id: "pivot-sidebar-keyboard-dnd-help",
|
|
2847
|
+
style: { position: "absolute", width: 1, height: 1, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0 0 0 0)", whiteSpace: "nowrap", border: 0 }
|
|
2848
|
+
},
|
|
2849
|
+
"Press Enter or Space on a field to pick it up. Focus a target field or zone and press Enter or Space to drop it. Press Escape to cancel."
|
|
2850
|
+
), $e ? /* @__PURE__ */ e.createElement("div", { style: { display: "flex", borderBottom: `1px solid ${c.border}`, marginBottom: "16px" } }, [
|
|
2851
|
+
{ id: "report", label: "Builder", icon: /* @__PURE__ */ e.createElement(z.Report, null) },
|
|
2852
|
+
{ id: "fields", label: "Fields", icon: /* @__PURE__ */ e.createElement(z.Sigma, null) },
|
|
2853
|
+
{ id: "columns", label: "Columns", icon: /* @__PURE__ */ e.createElement(z.Columns, null) }
|
|
2854
|
+
].map((r) => /* @__PURE__ */ e.createElement(
|
|
2855
|
+
"div",
|
|
2856
|
+
{
|
|
2857
|
+
key: r.id,
|
|
2858
|
+
onClick: () => Cr(r.id),
|
|
2657
2859
|
style: {
|
|
2658
|
-
padding: "
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
fontWeight:
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
userSelect: "none"
|
|
2669
|
-
},
|
|
2670
|
-
title: f ? `${X(r)} already in values` : `Add ${X(r)} to values`
|
|
2860
|
+
padding: "8px 14px",
|
|
2861
|
+
cursor: "pointer",
|
|
2862
|
+
borderBottom: we === r.id ? `2px solid ${c.primary}` : "2px solid transparent",
|
|
2863
|
+
fontWeight: we === r.id ? 600 : 400,
|
|
2864
|
+
color: we === r.id ? c.primary : c.textSec,
|
|
2865
|
+
display: "flex",
|
|
2866
|
+
alignItems: "center",
|
|
2867
|
+
gap: "5px",
|
|
2868
|
+
fontSize: "13px"
|
|
2869
|
+
}
|
|
2671
2870
|
},
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
)
|
|
2675
|
-
}), J.length > 8 && ut.length === 0 && /* @__PURE__ */ e.createElement("div", { style: { width: "100%", padding: "8px 2px", fontSize: "11px", color: c.textSec } }, "No fields match the current search.")), /* @__PURE__ */ e.createElement("div", { style: { borderTop: `1px solid ${c.border}`, paddingTop: "10px", marginBottom: "8px" } }, /* @__PURE__ */ e.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", padding: "0 2px 8px 2px", flexWrap: "wrap" } }, /* @__PURE__ */ e.createElement("button", { type: "button", onClick: Bt, style: { border: `1px solid ${c.primary}66`, background: `${c.primary}12`, color: c.primary, borderRadius: "999px", cursor: "pointer", padding: "4px 10px", fontSize: "11px", fontWeight: 700 } }, "+ Add Formula"), /* @__PURE__ */ e.createElement("span", { style: { fontSize: "10px", color: c.textSec } }, Ae, " value", Ae === 1 ? "" : "s", " · ", me, " formula", me === 1 ? "" : "s")), /* @__PURE__ */ e.createElement(
|
|
2676
|
-
Qt,
|
|
2677
|
-
{
|
|
2678
|
-
measureAxis: $,
|
|
2679
|
-
setMeasureAxis: i,
|
|
2680
|
-
theme: c,
|
|
2681
|
-
valueSelectStyle: ue,
|
|
2682
|
-
regularValueCount: Ae
|
|
2683
|
-
}
|
|
2684
|
-
)), E.map((r, f) => {
|
|
2685
|
-
const p = r && r.agg === "formula";
|
|
2686
|
-
if (!r) return null;
|
|
2687
|
-
const b = wr === f;
|
|
2688
|
-
return /* @__PURE__ */ e.createElement(
|
|
2871
|
+
r.icon,
|
|
2872
|
+
r.label
|
|
2873
|
+
))) : /* @__PURE__ */ e.createElement("div", { style: { display: "flex", borderBottom: `1px solid ${c.border}`, marginBottom: "16px" } }, /* @__PURE__ */ e.createElement(
|
|
2689
2874
|
"div",
|
|
2690
2875
|
{
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
}
|
|
2699
|
-
onDragLeave: () => Ze(null),
|
|
2700
|
-
onDrop: (S) => {
|
|
2701
|
-
S.preventDefault();
|
|
2702
|
-
const I = Ye.current;
|
|
2703
|
-
Ze(null), Ye.current = null, !(I === null || I === f) && d((q) => {
|
|
2704
|
-
const C = [...q], [j] = C.splice(I, 1);
|
|
2705
|
-
return C.splice(f, 0, j), C;
|
|
2706
|
-
});
|
|
2707
|
-
},
|
|
2708
|
-
onDragEnd: () => {
|
|
2709
|
-
Ye.current = null, Ze(null);
|
|
2710
|
-
},
|
|
2711
|
-
style: { marginBottom: "6px", borderTop: b ? `2px solid ${c.primary}` : "2px solid transparent", cursor: "grab" }
|
|
2876
|
+
onClick: () => s("fields"),
|
|
2877
|
+
style: {
|
|
2878
|
+
padding: "8px 16px",
|
|
2879
|
+
cursor: "pointer",
|
|
2880
|
+
borderBottom: n === "fields" ? `2px solid ${c.primary}` : "none",
|
|
2881
|
+
fontWeight: n === "fields" ? 600 : 400,
|
|
2882
|
+
color: n === "fields" ? c.primary : c.textSec
|
|
2883
|
+
}
|
|
2712
2884
|
},
|
|
2713
|
-
|
|
2714
|
-
)
|
|
2715
|
-
|
|
2716
|
-
"input",
|
|
2717
|
-
{
|
|
2718
|
-
placeholder: "Search columns...",
|
|
2719
|
-
value: k,
|
|
2720
|
-
onChange: (r) => P(r.target.value),
|
|
2721
|
-
style: { border: "none", background: "transparent", marginLeft: "10px", outline: "none", width: "100%", color: c.text, fontSize: "13px" }
|
|
2722
|
-
}
|
|
2723
|
-
)), (() => {
|
|
2724
|
-
const p = D.map((b) => {
|
|
2725
|
-
const S = y.getColumn(b);
|
|
2726
|
-
return S || { id: b, header: X(b), columnDef: { header: X(b) } };
|
|
2727
|
-
}).filter((b) => {
|
|
2728
|
-
const S = b.columnDef && typeof b.columnDef.header == "string" ? b.columnDef.header : typeof b.header == "string" ? b.header : b.id;
|
|
2729
|
-
return String(S).toLowerCase().includes(k.toLowerCase()) || b.id.toLowerCase().includes(k.toLowerCase());
|
|
2730
|
-
});
|
|
2731
|
-
return /* @__PURE__ */ e.createElement("div", { style: { display: "flex", flexDirection: "column" } }, p.map((b) => /* @__PURE__ */ e.createElement(
|
|
2732
|
-
Jr,
|
|
2885
|
+
"Fields"
|
|
2886
|
+
), /* @__PURE__ */ e.createElement(
|
|
2887
|
+
"div",
|
|
2733
2888
|
{
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
}
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
availableFields: D,
|
|
2751
|
-
customDimensions: _e,
|
|
2752
|
-
setCustomDimensions: ht,
|
|
2753
|
-
data: Se,
|
|
2754
|
-
theme: c,
|
|
2755
|
-
showNotification: w,
|
|
2756
|
-
getFieldLabel: X,
|
|
2757
|
-
onDeleteField: Dt
|
|
2758
|
-
}
|
|
2759
|
-
), /* @__PURE__ */ e.createElement("div", { style: Z.sectionTitleSm }, /* @__PURE__ */ e.createElement(z.Database, null), " Available Fields"), Pt(De.length, ct.length), /* @__PURE__ */ e.createElement(
|
|
2760
|
-
qt,
|
|
2761
|
-
{
|
|
2762
|
-
panelId: "availableFields",
|
|
2763
|
-
panelLabel: "Available Fields",
|
|
2764
|
-
size: Ue && Ue.availableFields,
|
|
2765
|
-
onSizeChange: zt,
|
|
2766
|
-
theme: c,
|
|
2767
|
-
outerStyle: _t,
|
|
2768
|
-
contentStyle: {
|
|
2769
|
-
display: "flex",
|
|
2770
|
-
flexWrap: "wrap",
|
|
2771
|
-
gap: "4px",
|
|
2772
|
-
alignContent: "flex-start",
|
|
2773
|
-
padding: "2px 12px 12px 2px"
|
|
2774
|
-
}
|
|
2775
|
-
},
|
|
2776
|
-
ct.map((r) => {
|
|
2777
|
-
const f = Te && r === de, p = f ? "Measure Names" : X(r), b = f ? "measureAxis" : "pool";
|
|
2778
|
-
return /* @__PURE__ */ e.createElement(
|
|
2779
|
-
"div",
|
|
2780
|
-
{
|
|
2781
|
-
key: f ? `__measure_axis__${r}` : r,
|
|
2782
|
-
draggable: !0,
|
|
2783
|
-
"data-sidebar-field-chip": f ? "measure-axis-label" : "available",
|
|
2784
|
-
role: "button",
|
|
2785
|
-
tabIndex: 0,
|
|
2786
|
-
"aria-describedby": "pivot-sidebar-keyboard-dnd-help",
|
|
2787
|
-
"aria-grabbed": G && G.zone === b && G.field === r ? "true" : "false",
|
|
2788
|
-
"aria-label": `Move ${p}`,
|
|
2789
|
-
onDragStart: (S) => H(S, r, b),
|
|
2790
|
-
onDragEnd: F,
|
|
2791
|
-
onKeyDown: (S) => Ft(S, r, b, -1, p),
|
|
2792
|
-
title: f ? "Drag to Rows or Columns to show measure names" : `Move ${X(r)}`,
|
|
2793
|
-
style: {
|
|
2794
|
-
padding: "4px 8px",
|
|
2795
|
-
fontSize: "11px",
|
|
2796
|
-
lineHeight: 1.2,
|
|
2797
|
-
fontWeight: f ? 700 : 500,
|
|
2798
|
-
fontFamily: "'Inter', ui-sans-serif, system-ui, sans-serif",
|
|
2799
|
-
borderRadius: c.radiusSm || c.radius || "10px",
|
|
2800
|
-
border: f ? `1px dashed ${c.primary}` : `1px solid ${c.isDark ? c.border : "#D7DDEA"}`,
|
|
2801
|
-
background: f ? `${c.primary}12` : c.isDark ? c.background : c.surfaceInset || "#ffffff",
|
|
2802
|
-
color: f ? c.primary : c.isDark ? c.text : "#334155",
|
|
2803
|
-
display: "inline-flex",
|
|
2804
|
-
alignItems: "center",
|
|
2805
|
-
gap: "4px",
|
|
2806
|
-
boxShadow: c.isDark ? "none" : c.shadowInset || "0 1px 2px rgba(0,0,0,0.04)",
|
|
2807
|
-
cursor: "grab",
|
|
2808
|
-
userSelect: "none",
|
|
2809
|
-
minHeight: "24px"
|
|
2810
|
-
}
|
|
2811
|
-
},
|
|
2812
|
-
f && /* @__PURE__ */ e.createElement(z.Sigma, null),
|
|
2813
|
-
p
|
|
2814
|
-
);
|
|
2815
|
-
}),
|
|
2816
|
-
De.length > 8 && ct.length === 0 && /* @__PURE__ */ e.createElement("div", { style: { width: "100%", padding: "8px 2px", fontSize: "11px", color: c.textSec } }, "No fields match the current search.")
|
|
2817
|
-
)), Dr.map((r) => {
|
|
2818
|
-
const f = Be[r.id] || [];
|
|
2819
|
-
return /* @__PURE__ */ e.createElement("div", { key: r.id, style: { marginBottom: "20px" } }, /* @__PURE__ */ e.createElement("div", { style: Z.sectionTitle }, r.icon, r.label), r.id === "vals" && /* @__PURE__ */ e.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", padding: "0 4px 8px 4px", flexWrap: "wrap" } }, /* @__PURE__ */ e.createElement(
|
|
2820
|
-
"button",
|
|
2889
|
+
onClick: () => s("filters"),
|
|
2890
|
+
style: {
|
|
2891
|
+
padding: "8px 16px",
|
|
2892
|
+
cursor: "pointer",
|
|
2893
|
+
borderBottom: n === "filters" ? `2px solid ${c.primary}` : "none",
|
|
2894
|
+
fontWeight: n === "filters" ? 600 : 400,
|
|
2895
|
+
color: n === "filters" ? c.primary : c.textSec,
|
|
2896
|
+
display: "flex",
|
|
2897
|
+
alignItems: "center",
|
|
2898
|
+
gap: "6px"
|
|
2899
|
+
}
|
|
2900
|
+
},
|
|
2901
|
+
"Filters",
|
|
2902
|
+
Object.keys(ae).length > 0 && /* @__PURE__ */ e.createElement("div", { style: { width: "6px", height: "6px", borderRadius: "50%", background: "#d32f2f" } })
|
|
2903
|
+
), /* @__PURE__ */ e.createElement(
|
|
2904
|
+
"div",
|
|
2821
2905
|
{
|
|
2822
|
-
|
|
2823
|
-
onClick: Bt,
|
|
2906
|
+
onClick: () => s("columns"),
|
|
2824
2907
|
style: {
|
|
2825
|
-
|
|
2826
|
-
background: `${c.primary}12`,
|
|
2827
|
-
color: c.primary,
|
|
2828
|
-
borderRadius: "999px",
|
|
2908
|
+
padding: "8px 16px",
|
|
2829
2909
|
cursor: "pointer",
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2910
|
+
borderBottom: n === "columns" ? `2px solid ${c.primary}` : "none",
|
|
2911
|
+
fontWeight: n === "columns" ? 600 : 400,
|
|
2912
|
+
color: n === "columns" ? c.primary : c.textSec
|
|
2833
2913
|
}
|
|
2834
2914
|
},
|
|
2835
|
-
"
|
|
2836
|
-
),
|
|
2915
|
+
"Columns"
|
|
2916
|
+
)), $e && we === "report" ? /* @__PURE__ */ e.createElement("div", { style: { flex: 1, overflowY: "auto", padding: "0 12px 12px" } }, /* @__PURE__ */ e.createElement(
|
|
2917
|
+
pn,
|
|
2918
|
+
{
|
|
2919
|
+
reportDef: br,
|
|
2920
|
+
setReportDef: Er,
|
|
2921
|
+
availableFields: D,
|
|
2922
|
+
customDimensions: _e,
|
|
2923
|
+
theme: c,
|
|
2924
|
+
styles: Y,
|
|
2925
|
+
data: Se,
|
|
2926
|
+
valConfigs: E,
|
|
2927
|
+
colFields: g,
|
|
2928
|
+
setColFields: u,
|
|
2929
|
+
setValConfigs: d,
|
|
2930
|
+
savedReports: vr,
|
|
2931
|
+
setSavedReports: Sr,
|
|
2932
|
+
activeReportId: hr,
|
|
2933
|
+
setActiveReportId: kr,
|
|
2934
|
+
showNotification: w,
|
|
2935
|
+
requestedSelection: gr,
|
|
2936
|
+
showReportConfigColumn: mr,
|
|
2937
|
+
setShowReportConfigColumn: xr
|
|
2938
|
+
}
|
|
2939
|
+
)) : $e && we === "fields" ? /* @__PURE__ */ e.createElement("div", { style: { padding: "0 4px" } }, /* @__PURE__ */ e.createElement(
|
|
2940
|
+
Kt,
|
|
2941
|
+
{
|
|
2942
|
+
availableFields: D,
|
|
2943
|
+
customDimensions: _e,
|
|
2944
|
+
setCustomDimensions: ht,
|
|
2945
|
+
data: Se,
|
|
2946
|
+
theme: c,
|
|
2947
|
+
showNotification: w,
|
|
2948
|
+
getFieldLabel: X,
|
|
2949
|
+
onDeleteField: Dt
|
|
2950
|
+
}
|
|
2951
|
+
), /* @__PURE__ */ e.createElement("div", { style: { fontSize: "10px", color: c.textSec, textTransform: "uppercase", letterSpacing: "0.5px", marginBottom: "6px", padding: "0 2px" } }, /* @__PURE__ */ e.createElement(z.Database, { style: { verticalAlign: "middle", marginRight: "4px" } }), "Available Fields — click to add"), Pt(J.length, ut.length), /* @__PURE__ */ e.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: "4px", marginBottom: "14px" } }, ut.map(
|
|
2952
|
+
/** @param {any} [f] @returns {any} */
|
|
2953
|
+
(r) => {
|
|
2954
|
+
const f = E.some(
|
|
2955
|
+
/** @param {any} [c] @returns {any} */
|
|
2956
|
+
(p) => p && p.field === r && p.agg !== "formula"
|
|
2957
|
+
);
|
|
2958
|
+
return /* @__PURE__ */ e.createElement(
|
|
2959
|
+
"div",
|
|
2960
|
+
{
|
|
2961
|
+
key: r,
|
|
2962
|
+
onClick: () => {
|
|
2963
|
+
f || d(
|
|
2964
|
+
/** @param {any} [prev] @returns {any} */
|
|
2965
|
+
(p) => [...p, { field: r, agg: "sum", label: X(r) }]
|
|
2966
|
+
);
|
|
2967
|
+
},
|
|
2968
|
+
style: {
|
|
2969
|
+
padding: "3px 9px",
|
|
2970
|
+
fontSize: "11px",
|
|
2971
|
+
lineHeight: 1.4,
|
|
2972
|
+
fontWeight: 500,
|
|
2973
|
+
borderRadius: "999px",
|
|
2974
|
+
border: `1px solid ${f || c.isDark ? c.border : "#D7DDEA"}`,
|
|
2975
|
+
background: f ? c.select || c.headerBg : c.isDark ? c.background : "#ffffff",
|
|
2976
|
+
color: f ? c.primary : c.text,
|
|
2977
|
+
cursor: f ? "default" : "pointer",
|
|
2978
|
+
opacity: f ? 0.6 : 1,
|
|
2979
|
+
userSelect: "none"
|
|
2980
|
+
},
|
|
2981
|
+
title: f ? `${X(r)} already in values` : `Add ${X(r)} to values`
|
|
2982
|
+
},
|
|
2983
|
+
X(r),
|
|
2984
|
+
f ? " ✓" : ""
|
|
2985
|
+
);
|
|
2986
|
+
}
|
|
2987
|
+
), J.length > 8 && ut.length === 0 && /* @__PURE__ */ e.createElement("div", { style: { width: "100%", padding: "8px 2px", fontSize: "11px", color: c.textSec } }, "No fields match the current search.")), /* @__PURE__ */ e.createElement("div", { style: { borderTop: `1px solid ${c.border}`, paddingTop: "10px", marginBottom: "8px" } }, /* @__PURE__ */ e.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", padding: "0 2px 8px 2px", flexWrap: "wrap" } }, /* @__PURE__ */ e.createElement("button", { type: "button", onClick: Bt, style: { border: `1px solid ${c.primary}66`, background: `${c.primary}12`, color: c.primary, borderRadius: "999px", cursor: "pointer", padding: "4px 10px", fontSize: "11px", fontWeight: 700 } }, "+ Add Formula"), /* @__PURE__ */ e.createElement("span", { style: { fontSize: "10px", color: c.textSec } }, Ae, " value", Ae === 1 ? "" : "s", " · ", me, " formula", me === 1 ? "" : "s")), /* @__PURE__ */ e.createElement(
|
|
2837
2988
|
Qt,
|
|
2838
2989
|
{
|
|
2839
2990
|
measureAxis: $,
|
|
@@ -2842,498 +2993,750 @@ const Fn = e.memo(function({
|
|
|
2842
2993
|
valueSelectStyle: ue,
|
|
2843
2994
|
regularValueCount: Ae
|
|
2844
2995
|
}
|
|
2845
|
-
)),
|
|
2846
|
-
|
|
2996
|
+
)), E.map(
|
|
2997
|
+
/** @param {any} [item] @param {any} [idx] @returns {any} */
|
|
2998
|
+
(r, f) => {
|
|
2999
|
+
const p = r && r.agg === "formula";
|
|
3000
|
+
if (!r) return null;
|
|
3001
|
+
const b = wr === f;
|
|
3002
|
+
return /* @__PURE__ */ e.createElement(
|
|
3003
|
+
"div",
|
|
3004
|
+
{
|
|
3005
|
+
key: r.field || f,
|
|
3006
|
+
draggable: !0,
|
|
3007
|
+
onDragStart: () => {
|
|
3008
|
+
Ze.current = f;
|
|
3009
|
+
},
|
|
3010
|
+
onDragOver: (S) => {
|
|
3011
|
+
S.preventDefault(), Ye(f);
|
|
3012
|
+
},
|
|
3013
|
+
onDragLeave: () => Ye(null),
|
|
3014
|
+
onDrop: (S) => {
|
|
3015
|
+
S.preventDefault();
|
|
3016
|
+
const I = Ze.current;
|
|
3017
|
+
Ye(null), Ze.current = null, !(I === null || I === f) && d(
|
|
3018
|
+
/** @param {any} [prev] @returns {any} */
|
|
3019
|
+
(q) => {
|
|
3020
|
+
const C = [...q], [j] = C.splice(I, 1);
|
|
3021
|
+
return C.splice(f, 0, j), C;
|
|
3022
|
+
}
|
|
3023
|
+
);
|
|
3024
|
+
},
|
|
3025
|
+
onDragEnd: () => {
|
|
3026
|
+
Ze.current = null, Ye(null);
|
|
3027
|
+
},
|
|
3028
|
+
style: { marginBottom: "6px", borderTop: b ? `2px solid ${c.primary}` : "2px solid transparent", cursor: "grab" }
|
|
3029
|
+
},
|
|
3030
|
+
p ? /* @__PURE__ */ e.createElement(Jt, { item: r, idx: f, selected: r.field === se, onSelect: It, onRemove: Ie, setValConfigs: d, theme: c, styles: Y, dropLine: null, zoneId: "vals", valueSelectStyle: ue, colFields: g, fixedSparklineValueKeySet: st, showNotification: w, serverError: he && he[r.field] || null }) : /* @__PURE__ */ e.createElement("div", { style: { ...Y.chip, flexWrap: "wrap", alignItems: "flex-start" } }, /* @__PURE__ */ e.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", minWidth: 0, flex: 1 } }, /* @__PURE__ */ e.createElement(z.DragIndicator, { style: { flexShrink: 0, opacity: 0.4 } }), /* @__PURE__ */ e.createElement("b", { style: { fontWeight: 500, minWidth: 0, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" } }, X(r.field))), /* @__PURE__ */ e.createElement("div", { style: { display: "flex", alignItems: "center", gap: "4px", marginLeft: "8px", flexWrap: "nowrap", flexShrink: 0 } }, /* @__PURE__ */ e.createElement("select", { value: r.agg, onChange: (S) => Wt(f, S.target.value), style: { ...ue, width: "74px" } }, /* @__PURE__ */ e.createElement("option", { value: "sum" }, "Sum"), /* @__PURE__ */ e.createElement("option", { value: "avg" }, "Avg"), /* @__PURE__ */ e.createElement("option", { value: "count" }, "Cnt"), /* @__PURE__ */ e.createElement("option", { value: "min" }, "Min"), /* @__PURE__ */ e.createElement("option", { value: "max" }, "Max"), /* @__PURE__ */ e.createElement("option", { value: "weighted_avg" }, "WAvg")), /* @__PURE__ */ e.createElement("span", { onClick: () => Ie(f), style: { cursor: "pointer", color: "#9CA3AF", display: "flex", alignItems: "center" } }, /* @__PURE__ */ e.createElement(z.Close, null))))
|
|
3031
|
+
);
|
|
3032
|
+
}
|
|
3033
|
+
), E.length === 0 && /* @__PURE__ */ e.createElement("div", { style: { opacity: 0.5, fontSize: "11px", padding: "12px", textAlign: "center" } }, "No value fields. Click a field above or add a formula.")) : !$e && n === "filters" ? /* @__PURE__ */ e.createElement("div", { style: { flex: 1, overflowY: "auto", display: "flex", flexDirection: "column", padding: "8px" } }, /* @__PURE__ */ e.createElement("div", { style: { marginBottom: "10px", display: "flex", alignItems: "center", background: c.background, borderRadius: "6px", padding: "4px 8px", border: `1px solid ${c.border}` } }, /* @__PURE__ */ e.createElement(z.Search, null), /* @__PURE__ */ e.createElement(
|
|
3034
|
+
"input",
|
|
2847
3035
|
{
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
),
|
|
2854
|
-
|
|
3036
|
+
placeholder: "Search columns...",
|
|
3037
|
+
value: k,
|
|
3038
|
+
onChange: (r) => P(r.target.value),
|
|
3039
|
+
style: { border: "none", background: "transparent", marginLeft: "10px", outline: "none", width: "100%", color: c.text, fontSize: "13px" }
|
|
3040
|
+
}
|
|
3041
|
+
)), (() => {
|
|
3042
|
+
const p = D.map(
|
|
3043
|
+
/** @param {any} [field] @returns {any} */
|
|
3044
|
+
(b) => {
|
|
3045
|
+
const S = y.getColumn(b);
|
|
3046
|
+
return S || { id: b, header: X(b), columnDef: { header: X(b) } };
|
|
3047
|
+
}
|
|
3048
|
+
).filter(
|
|
3049
|
+
/** @param {any} [col] @returns {any} */
|
|
3050
|
+
(b) => {
|
|
3051
|
+
const S = b.columnDef && typeof b.columnDef.header == "string" ? b.columnDef.header : typeof b.header == "string" ? b.header : b.id;
|
|
3052
|
+
return String(S).toLowerCase().includes(k.toLowerCase()) || b.id.toLowerCase().includes(k.toLowerCase());
|
|
3053
|
+
}
|
|
3054
|
+
);
|
|
3055
|
+
return /* @__PURE__ */ e.createElement("div", { style: { display: "flex", flexDirection: "column" } }, p.map(
|
|
3056
|
+
/** @param {any} [col] @returns {any} */
|
|
3057
|
+
(b) => /* @__PURE__ */ e.createElement(
|
|
3058
|
+
Jr,
|
|
3059
|
+
{
|
|
3060
|
+
key: b.id,
|
|
3061
|
+
column: b,
|
|
3062
|
+
theme: c,
|
|
3063
|
+
styles: Y,
|
|
3064
|
+
onFilter: (
|
|
3065
|
+
/** @param {any} [val] @returns {any} */
|
|
3066
|
+
((S) => U(b.id, S))
|
|
3067
|
+
),
|
|
3068
|
+
currentFilter: ae[b.id],
|
|
3069
|
+
options: Tt(b.id),
|
|
3070
|
+
optionMeta: Oe && Oe[b.id],
|
|
3071
|
+
onSearchOptions: je ? (
|
|
3072
|
+
/** @param {any} [search] @returns {any} */
|
|
3073
|
+
((S) => V && V(b.id, { search: S, offset: 0 }))
|
|
3074
|
+
) : void 0,
|
|
3075
|
+
onLoadMoreOptions: je ? (
|
|
3076
|
+
/** @param {any} [search] @param {any} [offset] @returns {any} */
|
|
3077
|
+
((S, I) => V && V(b.id, { search: S, offset: I }))
|
|
3078
|
+
) : void 0,
|
|
3079
|
+
onOpen: V
|
|
3080
|
+
}
|
|
3081
|
+
)
|
|
3082
|
+
));
|
|
3083
|
+
})()) : ($e ? we !== "columns" : n !== "columns") ? /* @__PURE__ */ e.createElement(e.Fragment, null, n === "fields" && /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement(
|
|
3084
|
+
Kt,
|
|
2855
3085
|
{
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
3086
|
+
availableFields: D,
|
|
3087
|
+
customDimensions: _e,
|
|
3088
|
+
setCustomDimensions: ht,
|
|
3089
|
+
data: Se,
|
|
3090
|
+
theme: c,
|
|
3091
|
+
showNotification: w,
|
|
3092
|
+
getFieldLabel: X,
|
|
3093
|
+
onDeleteField: Dt
|
|
3094
|
+
}
|
|
3095
|
+
), /* @__PURE__ */ e.createElement("div", { style: Y.sectionTitleSm }, /* @__PURE__ */ e.createElement(z.Database, null), " Available Fields"), Pt(De.length, ct.length), /* @__PURE__ */ e.createElement(
|
|
2862
3096
|
qt,
|
|
2863
3097
|
{
|
|
2864
|
-
panelId:
|
|
2865
|
-
panelLabel:
|
|
2866
|
-
size: Ue && Ue
|
|
3098
|
+
panelId: "availableFields",
|
|
3099
|
+
panelLabel: "Available Fields",
|
|
3100
|
+
size: Ue && Ue.availableFields,
|
|
2867
3101
|
onSizeChange: zt,
|
|
2868
3102
|
theme: c,
|
|
2869
3103
|
outerStyle: _t,
|
|
2870
|
-
contentStyle: {
|
|
3104
|
+
contentStyle: {
|
|
3105
|
+
display: "flex",
|
|
3106
|
+
flexWrap: "wrap",
|
|
3107
|
+
gap: "4px",
|
|
3108
|
+
alignContent: "flex-start",
|
|
3109
|
+
padding: "2px 12px 12px 2px"
|
|
3110
|
+
}
|
|
2871
3111
|
},
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
{
|
|
2875
|
-
"
|
|
2876
|
-
role: "group",
|
|
2877
|
-
tabIndex: 0,
|
|
2878
|
-
"aria-label": `${r.label} drop zone`,
|
|
2879
|
-
"aria-describedby": "pivot-sidebar-keyboard-dnd-help",
|
|
2880
|
-
onKeyDown: (p) => Ar(p, r.id),
|
|
2881
|
-
onDragOver: (p) => {
|
|
2882
|
-
p.target === p.currentTarget ? K(p, r.id, f.length) : (p.preventDefault(), p.dataTransfer && (p.dataTransfer.dropEffect = "move"));
|
|
2883
|
-
},
|
|
2884
|
-
onDrop: (p) => x(p, r.id)
|
|
2885
|
-
},
|
|
2886
|
-
f.map((p, b) => {
|
|
2887
|
-
const S = r.id === "vals" ? p.field : p, I = r.id === "vals" ? p.agg === "formula" ? p.label || "Formula" : X(p.field) : X(p), q = (r.id === "rows" || r.id === "cols") && S === de && Rt.placement !== "none";
|
|
3112
|
+
ct.map(
|
|
3113
|
+
/** @param {any} [f] @returns {any} */
|
|
3114
|
+
(r) => {
|
|
3115
|
+
const f = Te && r === de, p = f ? "Measure Names" : X(r), b = f ? "measureAxis" : "pool";
|
|
2888
3116
|
return /* @__PURE__ */ e.createElement(
|
|
2889
3117
|
"div",
|
|
2890
3118
|
{
|
|
2891
|
-
key:
|
|
3119
|
+
key: f ? `__measure_axis__${r}` : r,
|
|
2892
3120
|
draggable: !0,
|
|
2893
|
-
"data-sidebar-field-chip": "
|
|
3121
|
+
"data-sidebar-field-chip": f ? "measure-axis-label" : "available",
|
|
2894
3122
|
role: "button",
|
|
2895
3123
|
tabIndex: 0,
|
|
2896
3124
|
"aria-describedby": "pivot-sidebar-keyboard-dnd-help",
|
|
2897
|
-
"aria-grabbed": G && G.zone ===
|
|
2898
|
-
"aria-label": `Move ${
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
showNotification: w,
|
|
2921
|
-
serverError: he && he[p.field] || null
|
|
2922
|
-
}
|
|
2923
|
-
) : /* @__PURE__ */ e.createElement("div", { style: {
|
|
2924
|
-
...Z.chip,
|
|
2925
|
-
...r.id === "vals" ? { flexWrap: "wrap", alignItems: "flex-start" } : {}
|
|
2926
|
-
} }, M && M.zone === r.id && M.idx === b && /* @__PURE__ */ e.createElement("div", { style: { ...Z.dropLine, top: -2 } }), /* @__PURE__ */ e.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", minWidth: 0, flex: 1 } }, /* @__PURE__ */ e.createElement(z.DragIndicator, null), /* @__PURE__ */ e.createElement("b", { style: { fontWeight: 500, display: "block", minWidth: 0, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" } }, I)), r.id === "vals" && /* @__PURE__ */ e.createElement("div", { style: { display: "flex", alignItems: "center", gap: "4px", marginLeft: "8px", flexWrap: "nowrap", flexShrink: 0 } }, /* @__PURE__ */ e.createElement("select", { value: p.agg, onChange: (C) => Wt(b, C.target.value), style: { ...ue, width: "74px" }, title: "Aggregation" }, /* @__PURE__ */ e.createElement("option", { value: "sum" }, "Sum"), /* @__PURE__ */ e.createElement("option", { value: "avg" }, "Avg"), /* @__PURE__ */ e.createElement("option", { value: "count" }, "Cnt"), /* @__PURE__ */ e.createElement("option", { value: "min" }, "Min"), /* @__PURE__ */ e.createElement("option", { value: "max" }, "Max"), /* @__PURE__ */ e.createElement("option", { value: "weighted_avg" }, "WAvg"), /* @__PURE__ */ e.createElement("option", { value: "array_agg" }, "Series")), Ht(p.agg) && /* @__PURE__ */ e.createElement("select", { value: p.weightField || "", onChange: (C) => Fr(b, C.target.value), style: { ...ue, width: "92px" }, title: "Weight field" }, /* @__PURE__ */ e.createElement("option", { value: "", disabled: !0 }, "Weight"), J.map((C) => /* @__PURE__ */ e.createElement("option", { key: C, value: C }, X(C)))), /* @__PURE__ */ e.createElement("select", { value: p.windowFn || "none", onChange: (C) => zr(b, C.target.value), style: { ...ue, width: "56px" } }, /* @__PURE__ */ e.createElement("option", { value: "none" }, "Norm"), /* @__PURE__ */ e.createElement("option", { value: "percent_of_row" }, "%Row"), /* @__PURE__ */ e.createElement("option", { value: "percent_of_col" }, "%Col"), /* @__PURE__ */ e.createElement("option", { value: "percent_of_grand_total" }, "%Tot"))), /* @__PURE__ */ e.createElement("div", { style: { display: "flex", gap: "4px", marginLeft: "auto", alignItems: "center" } }, r.id === "filter" && /* @__PURE__ */ e.createElement("div", { onClick: (C) => Mr(C, S), style: { cursor: "pointer", display: "flex", alignItems: "center", padding: "2px", borderRadius: "4px" } }, /* @__PURE__ */ e.createElement(z.Filter, null)), /* @__PURE__ */ e.createElement("span", { onClick: () => {
|
|
2927
|
-
if (q && typeof i == "function") {
|
|
2928
|
-
i((C) => ({
|
|
2929
|
-
...Pe(C),
|
|
2930
|
-
placement: "none"
|
|
2931
|
-
}));
|
|
2932
|
-
return;
|
|
2933
|
-
}
|
|
2934
|
-
if (r.id === "filter") {
|
|
2935
|
-
const C = { ...ae };
|
|
2936
|
-
delete C[S], at(C);
|
|
2937
|
-
}
|
|
2938
|
-
r.id === "rows" && l((C) => C.filter((j) => j !== S)), r.id === "cols" && u((C) => C.filter((j) => j !== S)), r.id === "vals" && Ie(b);
|
|
2939
|
-
}, style: { cursor: "pointer", color: "#9CA3AF", display: "flex", alignItems: "center" } }, /* @__PURE__ */ e.createElement(z.Close, null))), r.id === "filter" && Ve.columnId === S && /* @__PURE__ */ e.createElement(
|
|
2940
|
-
Yr,
|
|
2941
|
-
{
|
|
2942
|
-
column: { header: I, id: S },
|
|
2943
|
-
anchorEl: Ve.anchorEl,
|
|
2944
|
-
onClose: _r,
|
|
2945
|
-
onFilter: (C) => U(S, C),
|
|
2946
|
-
currentFilter: ae[S],
|
|
2947
|
-
options: Tt(S),
|
|
2948
|
-
optionMeta: Oe && Oe[S],
|
|
2949
|
-
onSearchOptions: je ? (C) => V && V(S, { search: C, offset: 0 }) : void 0,
|
|
2950
|
-
onLoadMoreOptions: je ? (C, j) => V && V(S, { search: C, offset: j }) : void 0,
|
|
2951
|
-
theme: c
|
|
3125
|
+
"aria-grabbed": G && G.zone === b && G.field === r ? "true" : "false",
|
|
3126
|
+
"aria-label": `Move ${p}`,
|
|
3127
|
+
onDragStart: (S) => H(S, r, b),
|
|
3128
|
+
onDragEnd: F,
|
|
3129
|
+
onKeyDown: (S) => Ft(S, r, b, -1, p),
|
|
3130
|
+
title: f ? "Drag to Rows or Columns to show measure names" : `Move ${X(r)}`,
|
|
3131
|
+
style: {
|
|
3132
|
+
padding: "4px 8px",
|
|
3133
|
+
fontSize: "11px",
|
|
3134
|
+
lineHeight: 1.2,
|
|
3135
|
+
fontWeight: f ? 700 : 500,
|
|
3136
|
+
fontFamily: "'Inter', ui-sans-serif, system-ui, sans-serif",
|
|
3137
|
+
borderRadius: c.radiusSm || c.radius || "10px",
|
|
3138
|
+
border: f ? `1px dashed ${c.primary}` : `1px solid ${c.isDark ? c.border : "#D7DDEA"}`,
|
|
3139
|
+
background: f ? `${c.primary}12` : c.isDark ? c.background : c.surfaceInset || "#ffffff",
|
|
3140
|
+
color: f ? c.primary : c.isDark ? c.text : "#334155",
|
|
3141
|
+
display: "inline-flex",
|
|
3142
|
+
alignItems: "center",
|
|
3143
|
+
gap: "4px",
|
|
3144
|
+
boxShadow: c.isDark ? "none" : c.shadowInset || "0 1px 2px rgba(0,0,0,0.04)",
|
|
3145
|
+
cursor: "grab",
|
|
3146
|
+
userSelect: "none",
|
|
3147
|
+
minHeight: "24px"
|
|
2952
3148
|
}
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
item: p,
|
|
2957
|
-
idx: b,
|
|
2958
|
-
setValConfigs: d,
|
|
2959
|
-
theme: c,
|
|
2960
|
-
valueSelectStyle: ue,
|
|
2961
|
-
colFields: g,
|
|
2962
|
-
fixedSparklineValueKeySet: st,
|
|
2963
|
-
showNotification: w
|
|
2964
|
-
}
|
|
2965
|
-
), M && M.zone === r.id && M.idx === b + 1 && /* @__PURE__ */ e.createElement("div", { style: { ...Z.dropLine, bottom: -2 } })),
|
|
2966
|
-
r.id === "filter" && ae[S] && ae[S].conditions && /* @__PURE__ */ e.createElement("div", { style: { fontSize: "10px", color: c.primary, padding: "0 8px 4px 8px", marginTop: "-4px" } }, ae[S].conditions.map((C) => `${C.type}: ${C.value}${C.caseSensitive ? " (Match Case)" : ""}`).join(` ${ae[S].operator} `))
|
|
3149
|
+
},
|
|
3150
|
+
f && /* @__PURE__ */ e.createElement(z.Sigma, null),
|
|
3151
|
+
p
|
|
2967
3152
|
);
|
|
2968
|
-
}
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
3153
|
+
}
|
|
3154
|
+
),
|
|
3155
|
+
De.length > 8 && ct.length === 0 && /* @__PURE__ */ e.createElement("div", { style: { width: "100%", padding: "8px 2px", fontSize: "11px", color: c.textSec } }, "No fields match the current search.")
|
|
3156
|
+
)), Dr.map(
|
|
3157
|
+
/** @param {any} [zone] @returns {any} */
|
|
3158
|
+
(r) => {
|
|
3159
|
+
const f = Be[r.id] || [];
|
|
3160
|
+
return /* @__PURE__ */ e.createElement("div", { key: r.id, style: { marginBottom: "20px" } }, /* @__PURE__ */ e.createElement("div", { style: Y.sectionTitle }, r.icon, r.label), r.id === "vals" && /* @__PURE__ */ e.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", padding: "0 4px 8px 4px", flexWrap: "wrap" } }, /* @__PURE__ */ e.createElement(
|
|
3161
|
+
"button",
|
|
3162
|
+
{
|
|
3163
|
+
type: "button",
|
|
3164
|
+
onClick: Bt,
|
|
3165
|
+
style: {
|
|
3166
|
+
border: `1px solid ${c.primary}66`,
|
|
3167
|
+
background: `${c.primary}12`,
|
|
3168
|
+
color: c.primary,
|
|
3169
|
+
borderRadius: "999px",
|
|
3170
|
+
cursor: "pointer",
|
|
3171
|
+
padding: "4px 10px",
|
|
3172
|
+
fontSize: "11px",
|
|
3173
|
+
fontWeight: 700
|
|
3174
|
+
}
|
|
3175
|
+
},
|
|
3176
|
+
"+ Add Formula"
|
|
3177
|
+
), /* @__PURE__ */ e.createElement("span", { style: { fontSize: "10px", color: c.textSec } }, Ae, " value measure", Ae === 1 ? "" : "s", " available"), me > 0 && /* @__PURE__ */ e.createElement("span", { style: { fontSize: "10px", color: c.textSec } }, me, " formula", me === 1 ? "" : "s"), /* @__PURE__ */ e.createElement(
|
|
3178
|
+
Qt,
|
|
3179
|
+
{
|
|
3180
|
+
measureAxis: $,
|
|
3181
|
+
setMeasureAxis: i,
|
|
3182
|
+
theme: c,
|
|
3183
|
+
valueSelectStyle: ue,
|
|
3184
|
+
regularValueCount: Ae
|
|
3185
|
+
}
|
|
3186
|
+
)), r.id === "rows" && a.length > 0 && /* @__PURE__ */ e.createElement("div", { style: { display: "flex", gap: "4px", padding: "0 4px 6px 4px" } }, /* @__PURE__ */ e.createElement(
|
|
3187
|
+
"button",
|
|
3188
|
+
{
|
|
3189
|
+
title: "Expand all hierarchy levels",
|
|
3190
|
+
onClick: () => ee(!0),
|
|
3191
|
+
style: { flex: 1, border: `1px solid ${c.primary}`, background: c.select, cursor: "pointer", padding: "3px 6px", fontSize: "11px", color: c.primary, borderRadius: "4px", fontWeight: 600 }
|
|
3192
|
+
},
|
|
3193
|
+
"+ Expand All"
|
|
3194
|
+
), /* @__PURE__ */ e.createElement(
|
|
3195
|
+
"button",
|
|
3196
|
+
{
|
|
3197
|
+
title: "Collapse all rows",
|
|
3198
|
+
onClick: () => ee(!1),
|
|
3199
|
+
style: { flex: 1, border: `1px solid ${c.border}`, background: c.background, cursor: "pointer", padding: "3px 6px", fontSize: "11px", color: c.textSec, borderRadius: "4px" }
|
|
3200
|
+
},
|
|
3201
|
+
"- Collapse All"
|
|
3202
|
+
)), /* @__PURE__ */ e.createElement(
|
|
3203
|
+
qt,
|
|
3204
|
+
{
|
|
3205
|
+
panelId: r.id,
|
|
3206
|
+
panelLabel: r.label,
|
|
3207
|
+
size: Ue && Ue[r.id],
|
|
3208
|
+
onSizeChange: zt,
|
|
3209
|
+
theme: c,
|
|
3210
|
+
outerStyle: _t,
|
|
3211
|
+
contentStyle: { padding: `${Mt} 12px 12px ${Mt}` }
|
|
3212
|
+
},
|
|
3213
|
+
/* @__PURE__ */ e.createElement(
|
|
3214
|
+
"div",
|
|
3215
|
+
{
|
|
3216
|
+
"data-sidebar-drop-zone": r.id,
|
|
3217
|
+
role: "group",
|
|
3218
|
+
tabIndex: 0,
|
|
3219
|
+
"aria-label": `${r.label} drop zone`,
|
|
3220
|
+
"aria-describedby": "pivot-sidebar-keyboard-dnd-help",
|
|
3221
|
+
onKeyDown: (p) => Ar(p, r.id),
|
|
3222
|
+
onDragOver: (p) => {
|
|
3223
|
+
p.target === p.currentTarget ? K(p, r.id, f.length) : (p.preventDefault(), p.dataTransfer && (p.dataTransfer.dropEffect = "move"));
|
|
3224
|
+
},
|
|
3225
|
+
onDrop: (p) => x(p, r.id)
|
|
3226
|
+
},
|
|
3227
|
+
f.map(
|
|
3228
|
+
/** @param {any} [item] @param {any} [idx] @returns {any} */
|
|
3229
|
+
(p, b) => {
|
|
3230
|
+
const S = r.id === "vals" ? p.field : p, I = r.id === "vals" ? p.agg === "formula" ? p.label || "Formula" : X(p.field) : X(p), q = (r.id === "rows" || r.id === "cols") && S === de && Rt.placement !== "none";
|
|
3231
|
+
return /* @__PURE__ */ e.createElement(
|
|
3232
|
+
"div",
|
|
3233
|
+
{
|
|
3234
|
+
key: b,
|
|
3235
|
+
draggable: !0,
|
|
3236
|
+
"data-sidebar-field-chip": "zone",
|
|
3237
|
+
role: "button",
|
|
3238
|
+
tabIndex: 0,
|
|
3239
|
+
"aria-describedby": "pivot-sidebar-keyboard-dnd-help",
|
|
3240
|
+
"aria-grabbed": G && G.zone === r.id && G.idx === b ? "true" : "false",
|
|
3241
|
+
"aria-label": `Move ${I}`,
|
|
3242
|
+
onKeyDown: (C) => Ft(C, p, r.id, b, I),
|
|
3243
|
+
onDragStart: (C) => H(C, p, r.id, b),
|
|
3244
|
+
onDragOver: (C) => K(C, r.id, b),
|
|
3245
|
+
onDragEnd: F
|
|
3246
|
+
},
|
|
3247
|
+
r.id === "vals" && p.agg === "formula" ? /* @__PURE__ */ e.createElement(
|
|
3248
|
+
Jt,
|
|
3249
|
+
{
|
|
3250
|
+
item: p,
|
|
3251
|
+
idx: b,
|
|
3252
|
+
selected: p.field === ke,
|
|
3253
|
+
onSelect: It,
|
|
3254
|
+
onRemove: Ie,
|
|
3255
|
+
setValConfigs: d,
|
|
3256
|
+
theme: c,
|
|
3257
|
+
styles: Y,
|
|
3258
|
+
dropLine: M,
|
|
3259
|
+
zoneId: r.id,
|
|
3260
|
+
valueSelectStyle: ue,
|
|
3261
|
+
colFields: g,
|
|
3262
|
+
fixedSparklineValueKeySet: st,
|
|
3263
|
+
showNotification: w,
|
|
3264
|
+
serverError: he && he[p.field] || null
|
|
3265
|
+
}
|
|
3266
|
+
) : /* @__PURE__ */ e.createElement("div", { style: {
|
|
3267
|
+
...Y.chip,
|
|
3268
|
+
...r.id === "vals" ? { flexWrap: "wrap", alignItems: "flex-start" } : {}
|
|
3269
|
+
} }, M && M.zone === r.id && M.idx === b && /* @__PURE__ */ e.createElement("div", { style: { ...Y.dropLine, top: -2 } }), /* @__PURE__ */ e.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", minWidth: 0, flex: 1 } }, /* @__PURE__ */ e.createElement(z.DragIndicator, null), /* @__PURE__ */ e.createElement("b", { style: { fontWeight: 500, display: "block", minWidth: 0, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" } }, I)), r.id === "vals" && /* @__PURE__ */ e.createElement("div", { style: { display: "flex", alignItems: "center", gap: "4px", marginLeft: "8px", flexWrap: "nowrap", flexShrink: 0 } }, /* @__PURE__ */ e.createElement("select", { value: p.agg, onChange: (C) => Wt(b, C.target.value), style: { ...ue, width: "74px" }, title: "Aggregation" }, /* @__PURE__ */ e.createElement("option", { value: "sum" }, "Sum"), /* @__PURE__ */ e.createElement("option", { value: "avg" }, "Avg"), /* @__PURE__ */ e.createElement("option", { value: "count" }, "Cnt"), /* @__PURE__ */ e.createElement("option", { value: "min" }, "Min"), /* @__PURE__ */ e.createElement("option", { value: "max" }, "Max"), /* @__PURE__ */ e.createElement("option", { value: "weighted_avg" }, "WAvg"), /* @__PURE__ */ e.createElement("option", { value: "array_agg" }, "Series")), Ht(p.agg) && /* @__PURE__ */ e.createElement("select", { value: p.weightField || "", onChange: (C) => Fr(b, C.target.value), style: { ...ue, width: "92px" }, title: "Weight field" }, /* @__PURE__ */ e.createElement("option", { value: "", disabled: !0 }, "Weight"), J.map(
|
|
3270
|
+
/** @param {any} [fieldName] @returns {any} */
|
|
3271
|
+
(C) => /* @__PURE__ */ e.createElement("option", { key: C, value: C }, X(C))
|
|
3272
|
+
)), /* @__PURE__ */ e.createElement("select", { value: p.windowFn || "none", onChange: (C) => zr(b, C.target.value), style: { ...ue, width: "56px" } }, /* @__PURE__ */ e.createElement("option", { value: "none" }, "Norm"), /* @__PURE__ */ e.createElement("option", { value: "percent_of_row" }, "%Row"), /* @__PURE__ */ e.createElement("option", { value: "percent_of_col" }, "%Col"), /* @__PURE__ */ e.createElement("option", { value: "percent_of_grand_total" }, "%Tot"))), /* @__PURE__ */ e.createElement("div", { style: { display: "flex", gap: "4px", marginLeft: "auto", alignItems: "center" } }, r.id === "filter" && /* @__PURE__ */ e.createElement("div", { onClick: (C) => Mr(C, S), style: { cursor: "pointer", display: "flex", alignItems: "center", padding: "2px", borderRadius: "4px" } }, /* @__PURE__ */ e.createElement(z.Filter, null)), /* @__PURE__ */ e.createElement("span", { onClick: () => {
|
|
3273
|
+
if (q && typeof i == "function") {
|
|
3274
|
+
i(
|
|
3275
|
+
/** @param {any} [previous] @returns {any} */
|
|
3276
|
+
(C) => ({
|
|
3277
|
+
...Pe(C),
|
|
3278
|
+
placement: "none"
|
|
3279
|
+
})
|
|
3280
|
+
);
|
|
3281
|
+
return;
|
|
3282
|
+
}
|
|
3283
|
+
if (r.id === "filter") {
|
|
3284
|
+
const C = { ...ae };
|
|
3285
|
+
delete C[S], at(C);
|
|
3286
|
+
}
|
|
3287
|
+
r.id === "rows" && l(
|
|
3288
|
+
/** @param {any} [p] @returns {any} */
|
|
3289
|
+
(C) => C.filter(
|
|
3290
|
+
/** @param {any} [x] @returns {any} */
|
|
3291
|
+
(j) => j !== S
|
|
3292
|
+
)
|
|
3293
|
+
), r.id === "cols" && u(
|
|
3294
|
+
/** @param {any} [p] @returns {any} */
|
|
3295
|
+
(C) => C.filter(
|
|
3296
|
+
/** @param {any} [x] @returns {any} */
|
|
3297
|
+
(j) => j !== S
|
|
3298
|
+
)
|
|
3299
|
+
), r.id === "vals" && Ie(b);
|
|
3300
|
+
}, style: { cursor: "pointer", color: "#9CA3AF", display: "flex", alignItems: "center" } }, /* @__PURE__ */ e.createElement(z.Close, null))), r.id === "filter" && Ve.columnId === S && /* @__PURE__ */ e.createElement(
|
|
3301
|
+
Zr,
|
|
3302
|
+
{
|
|
3303
|
+
column: { header: I, id: S },
|
|
3304
|
+
anchorEl: Ve.anchorEl,
|
|
3305
|
+
onClose: _r,
|
|
3306
|
+
onFilter: (
|
|
3307
|
+
/** @param {any} [filterValue] @returns {any} */
|
|
3308
|
+
((C) => U(S, C))
|
|
3309
|
+
),
|
|
3310
|
+
currentFilter: ae[S],
|
|
3311
|
+
options: Tt(S),
|
|
3312
|
+
optionMeta: Oe && Oe[S],
|
|
3313
|
+
onSearchOptions: je ? (
|
|
3314
|
+
/** @param {any} [search] @returns {any} */
|
|
3315
|
+
((C) => V && V(S, { search: C, offset: 0 }))
|
|
3316
|
+
) : void 0,
|
|
3317
|
+
onLoadMoreOptions: je ? (
|
|
3318
|
+
/** @param {any} [search] @param {any} [offset] @returns {any} */
|
|
3319
|
+
((C, j) => V && V(S, { search: C, offset: j }))
|
|
3320
|
+
) : void 0,
|
|
3321
|
+
theme: c
|
|
3322
|
+
}
|
|
3323
|
+
), r.id === "vals" && /* @__PURE__ */ e.createElement(
|
|
3324
|
+
dr,
|
|
3325
|
+
{
|
|
3326
|
+
item: p,
|
|
3327
|
+
idx: b,
|
|
3328
|
+
setValConfigs: d,
|
|
3329
|
+
theme: c,
|
|
3330
|
+
valueSelectStyle: ue,
|
|
3331
|
+
colFields: g,
|
|
3332
|
+
fixedSparklineValueKeySet: st,
|
|
3333
|
+
showNotification: w
|
|
3334
|
+
}
|
|
3335
|
+
), M && M.zone === r.id && M.idx === b + 1 && /* @__PURE__ */ e.createElement("div", { style: { ...Y.dropLine, bottom: -2 } })),
|
|
3336
|
+
r.id === "filter" && ae[S] && ae[S].conditions && /* @__PURE__ */ e.createElement("div", { style: { fontSize: "10px", color: c.primary, padding: "0 8px 4px 8px", marginTop: "-4px" } }, ae[S].conditions.map(
|
|
3337
|
+
/** @param {any} [c] @returns {any} */
|
|
3338
|
+
(C) => `${C.type}: ${C.value}${C.caseSensitive ? " (Match Case)" : ""}`
|
|
3339
|
+
).join(` ${ae[S].operator} `))
|
|
3340
|
+
);
|
|
3341
|
+
}
|
|
3342
|
+
),
|
|
3343
|
+
f.length === 0 && /* @__PURE__ */ e.createElement("div", { style: { opacity: 0.5, fontSize: "11px", padding: "8px", textAlign: "center", pointerEvents: "none" } }, "Drag fields here"),
|
|
3344
|
+
/* @__PURE__ */ e.createElement("div", { style: { height: 20 }, onDragOver: (p) => K(p, r.id, f.length), onDrop: (p) => x(p, r.id) })
|
|
3345
|
+
)
|
|
3346
|
+
));
|
|
2988
3347
|
}
|
|
2989
|
-
}
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
/* @__PURE__ */ e.createElement(z.Close, null)
|
|
3006
|
-
)), /* @__PURE__ */ e.createElement("div", { style: { display: "flex", gap: "6px", flexWrap: "wrap" } }, [
|
|
3007
|
-
{ value: "all", label: "All", icon: "📊" },
|
|
3008
|
-
{ value: "number", label: "Numbers", icon: "🔢" },
|
|
3009
|
-
{ value: "string", label: "Text", icon: "📝" },
|
|
3010
|
-
{ value: "date", label: "Dates", icon: "📅" }
|
|
3011
|
-
].map((r) => /* @__PURE__ */ e.createElement(
|
|
3012
|
-
"button",
|
|
3013
|
-
{
|
|
3014
|
-
key: r.value,
|
|
3015
|
-
onClick: () => A(r.value),
|
|
3016
|
-
style: {
|
|
3017
|
-
padding: "6px 12px",
|
|
3018
|
-
borderRadius: "6px",
|
|
3019
|
-
border: "none",
|
|
3020
|
-
background: o === r.value ? c.primary : c.background,
|
|
3021
|
-
color: o === r.value ? "#fff" : c.text,
|
|
3022
|
-
cursor: "pointer",
|
|
3023
|
-
fontSize: "11px",
|
|
3024
|
-
fontWeight: 600,
|
|
3025
|
-
display: "flex",
|
|
3026
|
-
alignItems: "center",
|
|
3027
|
-
gap: "4px",
|
|
3028
|
-
transition: "all 0.2s",
|
|
3029
|
-
boxShadow: o === r.value ? "0 2px 4px rgba(0,0,0,0.1)" : "none"
|
|
3030
|
-
},
|
|
3031
|
-
onMouseEnter: (f) => {
|
|
3032
|
-
o !== r.value && (f.currentTarget.style.background = c.hover);
|
|
3033
|
-
},
|
|
3034
|
-
onMouseLeave: (f) => {
|
|
3035
|
-
o !== r.value && (f.currentTarget.style.background = c.background);
|
|
3348
|
+
)) : /* @__PURE__ */ e.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "16px", height: "100%", overflow: "hidden" } }, /* @__PURE__ */ e.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "10px", padding: "8px", background: c.headerBg, borderRadius: "8px", boxShadow: "0 1px 3px rgba(0,0,0,0.08)" } }, /* @__PURE__ */ e.createElement("div", { style: { display: "flex", alignItems: "center", background: c.background, borderRadius: "6px", padding: "8px 12px", border: `2px solid ${c.border}`, transition: "border-color 0.2s" } }, /* @__PURE__ */ e.createElement(z.Search, null), /* @__PURE__ */ e.createElement(
|
|
3349
|
+
"input",
|
|
3350
|
+
{
|
|
3351
|
+
placeholder: "Search columns...",
|
|
3352
|
+
value: k,
|
|
3353
|
+
onChange: (r) => P(r.target.value),
|
|
3354
|
+
style: {
|
|
3355
|
+
border: "none",
|
|
3356
|
+
background: "transparent",
|
|
3357
|
+
marginLeft: "10px",
|
|
3358
|
+
outline: "none",
|
|
3359
|
+
width: "100%",
|
|
3360
|
+
color: c.text,
|
|
3361
|
+
fontSize: "13px",
|
|
3362
|
+
fontWeight: 500
|
|
3363
|
+
}
|
|
3036
3364
|
}
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
fontWeight: 600,
|
|
3052
|
-
boxShadow: "0 1px 2px rgba(0,0,0,0.05)",
|
|
3053
|
-
transition: "all 0.2s"
|
|
3054
|
-
},
|
|
3055
|
-
onMouseEnter: (r) => r.currentTarget.style.boxShadow = "0 2px 4px rgba(0,0,0,0.1)",
|
|
3056
|
-
onMouseLeave: (r) => r.currentTarget.style.boxShadow = "0 1px 2px rgba(0,0,0,0.05)"
|
|
3057
|
-
},
|
|
3058
|
-
/* @__PURE__ */ e.createElement(z.Visibility, { style: { fontSize: "14px" } }),
|
|
3059
|
-
/* @__PURE__ */ e.createElement("span", null, "Show All")
|
|
3060
|
-
), /* @__PURE__ */ e.createElement(
|
|
3061
|
-
"button",
|
|
3062
|
-
{
|
|
3063
|
-
onClick: () => y.toggleAllColumnsVisible(!1),
|
|
3064
|
-
style: {
|
|
3065
|
-
...Z.btn,
|
|
3066
|
-
padding: "8px 12px",
|
|
3067
|
-
fontSize: "11px",
|
|
3068
|
-
flex: 1,
|
|
3069
|
-
justifyContent: "center",
|
|
3070
|
-
background: c.background,
|
|
3071
|
-
fontWeight: 600,
|
|
3072
|
-
boxShadow: "0 1px 2px rgba(0,0,0,0.05)",
|
|
3073
|
-
transition: "all 0.2s"
|
|
3365
|
+
), k && /* @__PURE__ */ e.createElement(
|
|
3366
|
+
"span",
|
|
3367
|
+
{
|
|
3368
|
+
onClick: () => P(""),
|
|
3369
|
+
style: {
|
|
3370
|
+
cursor: "pointer",
|
|
3371
|
+
display: "flex",
|
|
3372
|
+
padding: "4px",
|
|
3373
|
+
borderRadius: "4px",
|
|
3374
|
+
background: c.hover,
|
|
3375
|
+
transition: "background 0.2s"
|
|
3376
|
+
},
|
|
3377
|
+
onMouseEnter: (r) => r.currentTarget.style.background = c.select,
|
|
3378
|
+
onMouseLeave: (r) => r.currentTarget.style.background = c.hover
|
|
3074
3379
|
},
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3380
|
+
/* @__PURE__ */ e.createElement(z.Close, null)
|
|
3381
|
+
)), /* @__PURE__ */ e.createElement("div", { style: { display: "flex", gap: "6px", flexWrap: "wrap" } }, [
|
|
3382
|
+
{ value: "all", label: "All", icon: "📊" },
|
|
3383
|
+
{ value: "number", label: "Numbers", icon: "🔢" },
|
|
3384
|
+
{ value: "string", label: "Text", icon: "📝" },
|
|
3385
|
+
{ value: "date", label: "Dates", icon: "📅" }
|
|
3386
|
+
].map((r) => /* @__PURE__ */ e.createElement(
|
|
3387
|
+
"button",
|
|
3388
|
+
{
|
|
3389
|
+
key: r.value,
|
|
3390
|
+
onClick: () => A(r.value),
|
|
3391
|
+
style: {
|
|
3392
|
+
padding: "6px 12px",
|
|
3393
|
+
borderRadius: "6px",
|
|
3394
|
+
border: "none",
|
|
3395
|
+
background: o === r.value ? c.primary : c.background,
|
|
3396
|
+
color: o === r.value ? "#fff" : c.text,
|
|
3397
|
+
cursor: "pointer",
|
|
3398
|
+
fontSize: "11px",
|
|
3399
|
+
fontWeight: 600,
|
|
3400
|
+
display: "flex",
|
|
3401
|
+
alignItems: "center",
|
|
3402
|
+
gap: "4px",
|
|
3403
|
+
transition: "all 0.2s",
|
|
3404
|
+
boxShadow: o === r.value ? "0 2px 4px rgba(0,0,0,0.1)" : "none"
|
|
3405
|
+
},
|
|
3406
|
+
onMouseEnter: (f) => {
|
|
3407
|
+
o !== r.value && (f.currentTarget.style.background = c.hover);
|
|
3408
|
+
},
|
|
3409
|
+
onMouseLeave: (f) => {
|
|
3410
|
+
o !== r.value && (f.currentTarget.style.background = c.background);
|
|
3411
|
+
}
|
|
3094
3412
|
},
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
},
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
color: c.primary,
|
|
3115
|
-
background: c.background,
|
|
3116
|
-
borderRadius: "6px",
|
|
3117
|
-
boxShadow: "0 1px 2px rgba(0,0,0,0.05)"
|
|
3118
|
-
} }, R.size, " Column", R.size > 1 ? "s" : "", " Selected"), /* @__PURE__ */ e.createElement(
|
|
3119
|
-
"button",
|
|
3120
|
-
{
|
|
3121
|
-
onClick: () => B(/* @__PURE__ */ new Set()),
|
|
3122
|
-
style: {
|
|
3123
|
-
border: "none",
|
|
3124
|
-
background: c.background,
|
|
3125
|
-
cursor: "pointer",
|
|
3126
|
-
display: "flex",
|
|
3127
|
-
color: c.textSec,
|
|
3128
|
-
padding: "4px",
|
|
3129
|
-
borderRadius: "4px",
|
|
3130
|
-
transition: "all 0.2s"
|
|
3413
|
+
/* @__PURE__ */ e.createElement("span", null, r.icon),
|
|
3414
|
+
/* @__PURE__ */ e.createElement("span", null, r.label)
|
|
3415
|
+
)))), /* @__PURE__ */ e.createElement("div", { style: { display: "flex", gap: "6px", padding: "0 8px" } }, /* @__PURE__ */ e.createElement(
|
|
3416
|
+
"button",
|
|
3417
|
+
{
|
|
3418
|
+
onClick: () => y.toggleAllColumnsVisible(!0),
|
|
3419
|
+
style: {
|
|
3420
|
+
...Y.btn,
|
|
3421
|
+
padding: "8px 12px",
|
|
3422
|
+
fontSize: "11px",
|
|
3423
|
+
flex: 1,
|
|
3424
|
+
justifyContent: "center",
|
|
3425
|
+
background: c.background,
|
|
3426
|
+
fontWeight: 600,
|
|
3427
|
+
boxShadow: "0 1px 2px rgba(0,0,0,0.05)",
|
|
3428
|
+
transition: "all 0.2s"
|
|
3429
|
+
},
|
|
3430
|
+
onMouseEnter: (r) => r.currentTarget.style.boxShadow = "0 2px 4px rgba(0,0,0,0.1)",
|
|
3431
|
+
onMouseLeave: (r) => r.currentTarget.style.boxShadow = "0 1px 2px rgba(0,0,0,0.05)"
|
|
3131
3432
|
},
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3433
|
+
/* @__PURE__ */ e.createElement(z.Visibility, { style: { fontSize: "14px" } }),
|
|
3434
|
+
/* @__PURE__ */ e.createElement("span", null, "Show All")
|
|
3435
|
+
), /* @__PURE__ */ e.createElement(
|
|
3436
|
+
"button",
|
|
3437
|
+
{
|
|
3438
|
+
onClick: () => y.toggleAllColumnsVisible(!1),
|
|
3439
|
+
style: {
|
|
3440
|
+
...Y.btn,
|
|
3441
|
+
padding: "8px 12px",
|
|
3442
|
+
fontSize: "11px",
|
|
3443
|
+
flex: 1,
|
|
3444
|
+
justifyContent: "center",
|
|
3445
|
+
background: c.background,
|
|
3446
|
+
fontWeight: 600,
|
|
3447
|
+
boxShadow: "0 1px 2px rgba(0,0,0,0.05)",
|
|
3448
|
+
transition: "all 0.2s"
|
|
3449
|
+
},
|
|
3450
|
+
onMouseEnter: (r) => r.currentTarget.style.boxShadow = "0 2px 4px rgba(0,0,0,0.1)",
|
|
3451
|
+
onMouseLeave: (r) => r.currentTarget.style.boxShadow = "0 1px 2px rgba(0,0,0,0.05)"
|
|
3141
3452
|
},
|
|
3142
|
-
style: {
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3453
|
+
/* @__PURE__ */ e.createElement(z.VisibilityOff, { style: { fontSize: "14px" } }),
|
|
3454
|
+
/* @__PURE__ */ e.createElement("span", null, "Hide All")
|
|
3455
|
+
), /* @__PURE__ */ e.createElement(
|
|
3456
|
+
"button",
|
|
3457
|
+
{
|
|
3458
|
+
onClick: () => te(!1),
|
|
3459
|
+
style: {
|
|
3460
|
+
...Y.btn,
|
|
3461
|
+
padding: "8px 12px",
|
|
3462
|
+
fontSize: "11px",
|
|
3463
|
+
flex: 1,
|
|
3464
|
+
justifyContent: "center",
|
|
3465
|
+
background: c.background,
|
|
3466
|
+
fontWeight: 600,
|
|
3467
|
+
boxShadow: "0 1px 2px rgba(0,0,0,0.05)",
|
|
3468
|
+
transition: "all 0.2s"
|
|
3469
|
+
},
|
|
3470
|
+
onMouseEnter: (r) => r.currentTarget.style.boxShadow = "0 2px 4px rgba(0,0,0,0.1)",
|
|
3471
|
+
onMouseLeave: (r) => r.currentTarget.style.boxShadow = "0 1px 2px rgba(0,0,0,0.05)"
|
|
3152
3472
|
},
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3473
|
+
/* @__PURE__ */ e.createElement(z.Unpin, { style: { fontSize: "14px" } }),
|
|
3474
|
+
/* @__PURE__ */ e.createElement("span", null, "Unpin All")
|
|
3475
|
+
)), R.size > 0 && /* @__PURE__ */ e.createElement("div", { style: {
|
|
3476
|
+
display: "flex",
|
|
3477
|
+
flexDirection: "column",
|
|
3478
|
+
gap: "8px",
|
|
3479
|
+
background: `linear-gradient(135deg, ${c.select}ee, ${c.select}dd)`,
|
|
3480
|
+
padding: "12px",
|
|
3481
|
+
borderRadius: "8px",
|
|
3482
|
+
border: `2px solid ${c.primary}66`,
|
|
3483
|
+
boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
|
|
3484
|
+
margin: "0 8px"
|
|
3485
|
+
} }, /* @__PURE__ */ e.createElement("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" } }, /* @__PURE__ */ e.createElement("span", { style: {
|
|
3486
|
+
fontSize: "12px",
|
|
3487
|
+
fontWeight: 700,
|
|
3488
|
+
padding: "4px 10px",
|
|
3489
|
+
color: c.primary,
|
|
3490
|
+
background: c.background,
|
|
3491
|
+
borderRadius: "6px",
|
|
3492
|
+
boxShadow: "0 1px 2px rgba(0,0,0,0.05)"
|
|
3493
|
+
} }, R.size, " Column", R.size > 1 ? "s" : "", " Selected"), /* @__PURE__ */ e.createElement(
|
|
3494
|
+
"button",
|
|
3495
|
+
{
|
|
3496
|
+
onClick: () => B(/* @__PURE__ */ new Set()),
|
|
3497
|
+
style: {
|
|
3498
|
+
border: "none",
|
|
3499
|
+
background: c.background,
|
|
3500
|
+
cursor: "pointer",
|
|
3501
|
+
display: "flex",
|
|
3502
|
+
color: c.textSec,
|
|
3503
|
+
padding: "4px",
|
|
3504
|
+
borderRadius: "4px",
|
|
3505
|
+
transition: "all 0.2s"
|
|
3506
|
+
},
|
|
3507
|
+
onMouseEnter: (r) => r.currentTarget.style.background = c.hover,
|
|
3508
|
+
onMouseLeave: (r) => r.currentTarget.style.background = c.background
|
|
3163
3509
|
},
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3510
|
+
/* @__PURE__ */ e.createElement(z.Close, null)
|
|
3511
|
+
)), /* @__PURE__ */ e.createElement("div", { style: { display: "flex", gap: "6px", flexWrap: "wrap" } }, /* @__PURE__ */ e.createElement(
|
|
3512
|
+
"button",
|
|
3513
|
+
{
|
|
3514
|
+
onClick: () => {
|
|
3515
|
+
Array.from(R).forEach((r) => Z(r, "left")), B(/* @__PURE__ */ new Set());
|
|
3516
|
+
},
|
|
3517
|
+
style: {
|
|
3518
|
+
...Y.btn,
|
|
3519
|
+
padding: "6px 12px",
|
|
3520
|
+
fontSize: "11px",
|
|
3521
|
+
background: c.background,
|
|
3522
|
+
flex: 1,
|
|
3523
|
+
justifyContent: "center",
|
|
3524
|
+
fontWeight: 600,
|
|
3525
|
+
boxShadow: "0 1px 2px rgba(0,0,0,0.05)",
|
|
3526
|
+
transition: "all 0.2s"
|
|
3527
|
+
},
|
|
3528
|
+
onMouseEnter: (r) => r.currentTarget.style.boxShadow = "0 2px 4px rgba(0,0,0,0.1)",
|
|
3529
|
+
onMouseLeave: (r) => r.currentTarget.style.boxShadow = "0 1px 2px rgba(0,0,0,0.05)"
|
|
3174
3530
|
},
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3531
|
+
/* @__PURE__ */ e.createElement(z.PinLeft, null),
|
|
3532
|
+
/* @__PURE__ */ e.createElement("span", null, "Pin Left")
|
|
3533
|
+
), /* @__PURE__ */ e.createElement(
|
|
3534
|
+
"button",
|
|
3535
|
+
{
|
|
3536
|
+
onClick: () => {
|
|
3537
|
+
Array.from(R).forEach((r) => Z(r, !1)), B(/* @__PURE__ */ new Set());
|
|
3538
|
+
},
|
|
3539
|
+
style: {
|
|
3540
|
+
...Y.btn,
|
|
3541
|
+
padding: "6px 12px",
|
|
3542
|
+
fontSize: "11px",
|
|
3543
|
+
background: c.background,
|
|
3544
|
+
flex: 1,
|
|
3545
|
+
justifyContent: "center",
|
|
3546
|
+
fontWeight: 600,
|
|
3547
|
+
boxShadow: "0 1px 2px rgba(0,0,0,0.05)",
|
|
3548
|
+
transition: "all 0.2s"
|
|
3549
|
+
},
|
|
3550
|
+
onMouseEnter: (r) => r.currentTarget.style.boxShadow = "0 2px 4px rgba(0,0,0,0.1)",
|
|
3551
|
+
onMouseLeave: (r) => r.currentTarget.style.boxShadow = "0 1px 2px rgba(0,0,0,0.05)"
|
|
3185
3552
|
},
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3553
|
+
/* @__PURE__ */ e.createElement(z.Unpin, null),
|
|
3554
|
+
/* @__PURE__ */ e.createElement("span", null, "Unpin")
|
|
3555
|
+
), /* @__PURE__ */ e.createElement(
|
|
3556
|
+
"button",
|
|
3557
|
+
{
|
|
3558
|
+
onClick: () => {
|
|
3559
|
+
Array.from(R).forEach((r) => Z(r, "right")), B(/* @__PURE__ */ new Set());
|
|
3560
|
+
},
|
|
3561
|
+
style: {
|
|
3562
|
+
...Y.btn,
|
|
3563
|
+
padding: "6px 12px",
|
|
3564
|
+
fontSize: "11px",
|
|
3565
|
+
background: c.background,
|
|
3566
|
+
flex: 1,
|
|
3567
|
+
justifyContent: "center",
|
|
3568
|
+
fontWeight: 600,
|
|
3569
|
+
boxShadow: "0 1px 2px rgba(0,0,0,0.05)",
|
|
3570
|
+
transition: "all 0.2s"
|
|
3571
|
+
},
|
|
3572
|
+
onMouseEnter: (r) => r.currentTarget.style.boxShadow = "0 2px 4px rgba(0,0,0,0.1)",
|
|
3573
|
+
onMouseLeave: (r) => r.currentTarget.style.boxShadow = "0 1px 2px rgba(0,0,0,0.05)"
|
|
3196
3574
|
},
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
},
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3575
|
+
/* @__PURE__ */ e.createElement(z.PinRight, null),
|
|
3576
|
+
/* @__PURE__ */ e.createElement("span", null, "Pin Right")
|
|
3577
|
+
))), /* @__PURE__ */ e.createElement("div", { style: { flex: 1, overflowY: "auto", display: "flex", flexDirection: "column" } }, (() => {
|
|
3578
|
+
const f = y.getAllColumns().filter(
|
|
3579
|
+
/** @param {any} [c] @returns {any} */
|
|
3580
|
+
(C) => !C.parent && C.id !== "no_data"
|
|
3581
|
+
).filter(
|
|
3582
|
+
/** @param {any} [col] @returns {any} */
|
|
3583
|
+
(C) => {
|
|
3584
|
+
if (o === "all") return !0;
|
|
3585
|
+
let j = "string";
|
|
3586
|
+
if (E.find(
|
|
3587
|
+
/** @param {any} [v] @returns {any} */
|
|
3588
|
+
(re) => C.id.includes(re.field)
|
|
3589
|
+
))
|
|
3590
|
+
j = "number";
|
|
3591
|
+
else if (Se && Se.length > 0) {
|
|
3592
|
+
const re = Se[0];
|
|
3593
|
+
let ne = re[C.id];
|
|
3594
|
+
if (ne === void 0 && C.accessorFn)
|
|
3595
|
+
try {
|
|
3596
|
+
ne = C.accessorFn(re);
|
|
3597
|
+
} catch {
|
|
3598
|
+
}
|
|
3599
|
+
typeof ne == "number" ? j = "number" : ne instanceof Date ? j = "date" : typeof ne == "string" && (!isNaN(Number(ne)) && ne.trim() !== "" ? j = "number" : !isNaN(Date.parse(ne)) && ne.includes("-") && (j = "date"));
|
|
3215
3600
|
}
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3601
|
+
return j === o;
|
|
3602
|
+
}
|
|
3603
|
+
), p = f.filter(
|
|
3604
|
+
/** @param {any} [c] @returns {any} */
|
|
3605
|
+
(C) => Je(C, "left")
|
|
3606
|
+
), b = f.filter(
|
|
3607
|
+
/** @param {any} [c] @returns {any} */
|
|
3608
|
+
(C) => Je(C, "right")
|
|
3609
|
+
), S = f.filter(
|
|
3610
|
+
/** @param {any} [c] @returns {any} */
|
|
3611
|
+
(C) => Je(C, "unpinned")
|
|
3612
|
+
), I = (C, j) => C.map(
|
|
3613
|
+
/** @param {any} [column] @returns {any} */
|
|
3614
|
+
(ie) => /* @__PURE__ */ e.createElement(
|
|
3615
|
+
rr,
|
|
3616
|
+
{
|
|
3617
|
+
key: ie.id,
|
|
3618
|
+
column: ie,
|
|
3619
|
+
level: 0,
|
|
3620
|
+
theme: c,
|
|
3621
|
+
styles: Y,
|
|
3622
|
+
handlePinColumn: Z,
|
|
3623
|
+
colSearch: k,
|
|
3624
|
+
selectedCols: R,
|
|
3625
|
+
setSelectedCols: B,
|
|
3626
|
+
onDrop: q,
|
|
3627
|
+
sectionId: j
|
|
3628
|
+
}
|
|
3629
|
+
)
|
|
3630
|
+
), q = (C, j, ie) => {
|
|
3631
|
+
let re;
|
|
3632
|
+
const ne = L || { left: [], right: [] };
|
|
3633
|
+
if (ie) {
|
|
3634
|
+
const Le = j === "left" ? ne.left : j === "right" ? ne.right : null;
|
|
3635
|
+
if (Le) {
|
|
3636
|
+
if (re = Le.indexOf(ie), re === -1) {
|
|
3637
|
+
const ft = y.getColumn(ie);
|
|
3638
|
+
if (ft && Nr(ft)) {
|
|
3639
|
+
const Ot = xt(ft).find(
|
|
3640
|
+
/** @param {any} [id] @returns {any} */
|
|
3641
|
+
(Tr) => Le.includes(Tr)
|
|
3642
|
+
);
|
|
3643
|
+
Ot && (re = Le.indexOf(Ot));
|
|
3644
|
+
}
|
|
3245
3645
|
}
|
|
3646
|
+
re === -1 && (re = void 0);
|
|
3246
3647
|
}
|
|
3247
|
-
re === -1 && (re = void 0);
|
|
3248
3648
|
}
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3649
|
+
j === "left" ? Z(C, "left", re) : j === "right" ? Z(C, "right", re) : Z(C, !1);
|
|
3650
|
+
};
|
|
3651
|
+
return /* @__PURE__ */ e.createElement(e.Fragment, null, p.length > 0 && /* @__PURE__ */ e.createElement(
|
|
3652
|
+
gt,
|
|
3653
|
+
{
|
|
3654
|
+
title: "Pinned Left",
|
|
3655
|
+
count: p.length,
|
|
3656
|
+
theme: c,
|
|
3657
|
+
styles: Y,
|
|
3658
|
+
sectionId: "left",
|
|
3659
|
+
onDrop: q
|
|
3660
|
+
},
|
|
3661
|
+
I(p, "left")
|
|
3662
|
+
), b.length > 0 && /* @__PURE__ */ e.createElement(
|
|
3663
|
+
gt,
|
|
3664
|
+
{
|
|
3665
|
+
title: "Pinned Right",
|
|
3666
|
+
count: b.length,
|
|
3667
|
+
theme: c,
|
|
3668
|
+
styles: Y,
|
|
3669
|
+
sectionId: "right",
|
|
3670
|
+
onDrop: q
|
|
3671
|
+
},
|
|
3672
|
+
I(b, "right")
|
|
3673
|
+
), /* @__PURE__ */ e.createElement(
|
|
3674
|
+
gt,
|
|
3675
|
+
{
|
|
3676
|
+
title: "Columns",
|
|
3677
|
+
count: S.length,
|
|
3678
|
+
theme: c,
|
|
3679
|
+
styles: Y,
|
|
3680
|
+
sectionId: "unpinned",
|
|
3681
|
+
onDrop: q
|
|
3682
|
+
},
|
|
3683
|
+
I(S, "unpinned")
|
|
3684
|
+
));
|
|
3685
|
+
})()), h && h.length > 0 && /* @__PURE__ */ e.createElement("div", { style: { padding: "8px", borderTop: `1px solid ${c.border}` } }, /* @__PURE__ */ e.createElement("div", { style: Y.sectionTitle }, "Pinning Presets"), /* @__PURE__ */ e.createElement("div", { style: { display: "flex", gap: "4px", flexWrap: "wrap" } }, h.map(
|
|
3686
|
+
/** @param {any} [preset] @param {any} [i] @returns {any} */
|
|
3687
|
+
(r, f) => /* @__PURE__ */ e.createElement(
|
|
3688
|
+
"button",
|
|
3689
|
+
{
|
|
3690
|
+
key: f,
|
|
3691
|
+
onClick: () => {
|
|
3692
|
+
_(r.config), w(`Applied preset: ${r.name}`);
|
|
3693
|
+
},
|
|
3694
|
+
style: { ...Y.btn, fontSize: "11px", background: c.headerBg }
|
|
3695
|
+
},
|
|
3696
|
+
r.name
|
|
3697
|
+
)
|
|
3698
|
+
))), /* @__PURE__ */ e.createElement("div", { style: { fontSize: "11px", color: c.textSec, fontStyle: "italic", padding: "8px", background: c.headerBg, borderTop: `1px solid ${c.border}44` } }, /* @__PURE__ */ e.createElement(z.Lock, { style: { verticalAlign: "middle", marginRight: "4px", opacity: 0.5 } }), "Drag columns or use pin icons to freeze areas."))), dt && /* @__PURE__ */ e.createElement(
|
|
3699
|
+
kn,
|
|
3265
3700
|
{
|
|
3266
|
-
|
|
3267
|
-
|
|
3701
|
+
item: dt,
|
|
3702
|
+
idx: pt,
|
|
3703
|
+
valConfigs: E,
|
|
3704
|
+
setValConfigs: d,
|
|
3268
3705
|
theme: c,
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3706
|
+
onClose: () => ge(null),
|
|
3707
|
+
onRemove: Ie,
|
|
3708
|
+
displayedColumnOptions: fr,
|
|
3709
|
+
availableRawFields: J,
|
|
3710
|
+
serverError: he && he[dt.field] || null
|
|
3711
|
+
}
|
|
3274
3712
|
), /* @__PURE__ */ e.createElement(
|
|
3275
|
-
|
|
3713
|
+
"div",
|
|
3276
3714
|
{
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
key: f,
|
|
3290
|
-
onClick: () => {
|
|
3291
|
-
_(r.config), w(`Applied preset: ${r.name}`);
|
|
3715
|
+
onMouseDown: $r,
|
|
3716
|
+
style: {
|
|
3717
|
+
position: "absolute",
|
|
3718
|
+
right: 0,
|
|
3719
|
+
top: 0,
|
|
3720
|
+
bottom: 0,
|
|
3721
|
+
width: "5px",
|
|
3722
|
+
cursor: "col-resize",
|
|
3723
|
+
zIndex: 10,
|
|
3724
|
+
background: "transparent"
|
|
3725
|
+
},
|
|
3726
|
+
title: "Drag to resize panel"
|
|
3292
3727
|
},
|
|
3293
|
-
|
|
3294
|
-
},
|
|
3295
|
-
r.name
|
|
3296
|
-
)))), /* @__PURE__ */ e.createElement("div", { style: { fontSize: "11px", color: c.textSec, fontStyle: "italic", padding: "8px", background: c.headerBg, borderTop: `1px solid ${c.border}44` } }, /* @__PURE__ */ e.createElement(z.Lock, { style: { verticalAlign: "middle", marginRight: "4px", opacity: 0.5 } }), "Drag columns or use pin icons to freeze areas."))), dt && /* @__PURE__ */ e.createElement(
|
|
3297
|
-
kn,
|
|
3298
|
-
{
|
|
3299
|
-
item: dt,
|
|
3300
|
-
idx: pt,
|
|
3301
|
-
valConfigs: E,
|
|
3302
|
-
setValConfigs: d,
|
|
3303
|
-
theme: c,
|
|
3304
|
-
onClose: () => ge(null),
|
|
3305
|
-
onRemove: Ie,
|
|
3306
|
-
displayedColumnOptions: fr,
|
|
3307
|
-
availableRawFields: J,
|
|
3308
|
-
serverError: he && he[dt.field] || null
|
|
3309
|
-
}
|
|
3310
|
-
), /* @__PURE__ */ e.createElement(
|
|
3311
|
-
"div",
|
|
3312
|
-
{
|
|
3313
|
-
onMouseDown: $r,
|
|
3314
|
-
style: {
|
|
3728
|
+
/* @__PURE__ */ e.createElement("div", { style: {
|
|
3315
3729
|
position: "absolute",
|
|
3316
3730
|
right: 0,
|
|
3317
3731
|
top: 0,
|
|
3318
3732
|
bottom: 0,
|
|
3319
|
-
width: "
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
/* @__PURE__ */ e.createElement("div", { style: {
|
|
3327
|
-
position: "absolute",
|
|
3328
|
-
right: 0,
|
|
3329
|
-
top: 0,
|
|
3330
|
-
bottom: 0,
|
|
3331
|
-
width: "2px",
|
|
3332
|
-
background: c.border,
|
|
3333
|
-
transition: "background 0.15s"
|
|
3334
|
-
} })
|
|
3335
|
-
));
|
|
3336
|
-
});
|
|
3733
|
+
width: "2px",
|
|
3734
|
+
background: c.border,
|
|
3735
|
+
transition: "background 0.15s"
|
|
3736
|
+
} })
|
|
3737
|
+
));
|
|
3738
|
+
}
|
|
3739
|
+
);
|
|
3337
3740
|
export {
|
|
3338
3741
|
Fn as SidebarPanel
|
|
3339
3742
|
};
|