@dashspec/renderer 0.1.29 → 0.1.30
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/CHANGELOG.md +17 -0
- package/dist/{chunk-5QEL4G7I.js → chunk-76OGTPVF.js} +8 -3
- package/dist/chunk-76OGTPVF.js.map +1 -0
- package/dist/{core-DXB9suSF.d.ts → core-CtA4jk0f.d.ts} +20 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/index.d.ts +13 -4
- package/dist/index.js +59 -44
- package/dist/index.js.map +1 -1
- package/dist/schema.json +3 -0
- package/docs/json-format.md +1 -0
- package/docs/theming.md +6 -0
- package/package.json +1 -1
- package/dist/chunk-5QEL4G7I.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -116,7 +116,7 @@ import {
|
|
|
116
116
|
translator,
|
|
117
117
|
validateDocument,
|
|
118
118
|
widgetChecks
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-76OGTPVF.js";
|
|
120
120
|
import {
|
|
121
121
|
createStateProxy,
|
|
122
122
|
getPath,
|
|
@@ -2320,6 +2320,7 @@ import { useCallback as useCallback2, useEffect as useEffect2, useId as useId3,
|
|
|
2320
2320
|
|
|
2321
2321
|
// src/components/controls.tsx
|
|
2322
2322
|
import {
|
|
2323
|
+
useContext as useContext3,
|
|
2323
2324
|
useEffect,
|
|
2324
2325
|
useId as useId2,
|
|
2325
2326
|
useLayoutEffect,
|
|
@@ -2328,7 +2329,7 @@ import {
|
|
|
2328
2329
|
useState
|
|
2329
2330
|
} from "react";
|
|
2330
2331
|
import { createPortal } from "react-dom";
|
|
2331
|
-
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2332
|
+
import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2332
2333
|
var Chevron = () => /* @__PURE__ */ jsx7("svg", { className: "ds-pill-chev", viewBox: "0 0 16 16", width: "14", height: "14", "aria-hidden": "true", children: /* @__PURE__ */ jsx7(
|
|
2333
2334
|
"path",
|
|
2334
2335
|
{
|
|
@@ -2340,7 +2341,12 @@ var Chevron = () => /* @__PURE__ */ jsx7("svg", { className: "ds-pill-chev", vie
|
|
|
2340
2341
|
strokeLinejoin: "round"
|
|
2341
2342
|
}
|
|
2342
2343
|
) });
|
|
2343
|
-
var Arrow = ({ dir }) =>
|
|
2344
|
+
var Arrow = ({ dir }) => {
|
|
2345
|
+
const icons = useContext3(DashboardContext)?.options.ui?.icons;
|
|
2346
|
+
const own = dir === "left" ? icons?.previous : icons?.next;
|
|
2347
|
+
return own ? /* @__PURE__ */ jsx7(Fragment3, { children: own }) : /* @__PURE__ */ jsx7(DefaultArrow, { dir });
|
|
2348
|
+
};
|
|
2349
|
+
var DefaultArrow = ({ dir }) => /* @__PURE__ */ jsx7("svg", { viewBox: "0 0 16 16", width: "15", height: "15", "aria-hidden": "true", children: /* @__PURE__ */ jsx7(
|
|
2344
2350
|
"path",
|
|
2345
2351
|
{
|
|
2346
2352
|
d: dir === "left" ? "M13 8H3m4-4L3 8l4 4" : "M3 8h10M9 4l4 4-4 4",
|
|
@@ -3014,7 +3020,7 @@ function DateControl({
|
|
|
3014
3020
|
}
|
|
3015
3021
|
|
|
3016
3022
|
// src/components/FilterBar.tsx
|
|
3017
|
-
import { Fragment as
|
|
3023
|
+
import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
3018
3024
|
var PRESET_LABELS = {
|
|
3019
3025
|
today: "Today",
|
|
3020
3026
|
yesterday: "Yesterday",
|
|
@@ -3313,7 +3319,7 @@ var icon = (d) => /* @__PURE__ */ jsx8(
|
|
|
3313
3319
|
);
|
|
3314
3320
|
var BAR_ICONS = {
|
|
3315
3321
|
sliders: icon(
|
|
3316
|
-
/* @__PURE__ */ jsxs6(
|
|
3322
|
+
/* @__PURE__ */ jsxs6(Fragment4, { children: [
|
|
3317
3323
|
/* @__PURE__ */ jsx8("path", { d: "M3 6h9M15 6h2M3 14h3M9 14h8" }),
|
|
3318
3324
|
/* @__PURE__ */ jsx8("circle", { cx: "13.5", cy: "6", r: "1.8" }),
|
|
3319
3325
|
/* @__PURE__ */ jsx8("circle", { cx: "7.5", cy: "14", r: "1.8" })
|
|
@@ -3321,13 +3327,13 @@ var BAR_ICONS = {
|
|
|
3321
3327
|
),
|
|
3322
3328
|
filter: icon(/* @__PURE__ */ jsx8("path", { d: "M3 4h14l-5.5 6.5V16l-3-1.5v-4z", strokeLinejoin: "round" })),
|
|
3323
3329
|
calendar: icon(
|
|
3324
|
-
/* @__PURE__ */ jsxs6(
|
|
3330
|
+
/* @__PURE__ */ jsxs6(Fragment4, { children: [
|
|
3325
3331
|
/* @__PURE__ */ jsx8("rect", { x: "3", y: "4.5", width: "14", height: "12", rx: "2" }),
|
|
3326
3332
|
/* @__PURE__ */ jsx8("path", { d: "M3 8.5h14M7 2.5v4M13 2.5v4" })
|
|
3327
3333
|
] })
|
|
3328
3334
|
),
|
|
3329
3335
|
search: icon(
|
|
3330
|
-
/* @__PURE__ */ jsxs6(
|
|
3336
|
+
/* @__PURE__ */ jsxs6(Fragment4, { children: [
|
|
3331
3337
|
/* @__PURE__ */ jsx8("circle", { cx: "9", cy: "9", r: "5" }),
|
|
3332
3338
|
/* @__PURE__ */ jsx8("path", { d: "M13 13l4 4" })
|
|
3333
3339
|
] })
|
|
@@ -3428,7 +3434,7 @@ function FilterBar() {
|
|
|
3428
3434
|
} : void 0,
|
|
3429
3435
|
children: [
|
|
3430
3436
|
/* @__PURE__ */ jsxs6(Track, { segmented: bar.look === "segmented", children: [
|
|
3431
|
-
bar.icon !== "none" && /* @__PURE__ */ jsx8("span", { className: "ds-filters-icon", "aria-hidden": "true", children: BAR_ICONS[bar.icon ?? "sliders"] ?? BAR_ICONS.sliders }),
|
|
3437
|
+
bar.icon !== "none" && /* @__PURE__ */ jsx8("span", { className: "ds-filters-icon", "aria-hidden": "true", children: options.ui?.icons?.filterBar ?? BAR_ICONS[bar.icon ?? "sliders"] ?? BAR_ICONS.sliders }),
|
|
3432
3438
|
shown.map(
|
|
3433
3439
|
(v) => options.onFilterSelect ? (
|
|
3434
3440
|
// Builder: a click selects the filter to configure it instead of opening it.
|
|
@@ -3557,7 +3563,7 @@ function FilterDrawer({ active, children }) {
|
|
|
3557
3563
|
] });
|
|
3558
3564
|
}
|
|
3559
3565
|
function Track({ segmented, children }) {
|
|
3560
|
-
return segmented ? /* @__PURE__ */ jsx8("div", { className: "ds-filters-track", children }) : /* @__PURE__ */ jsx8(
|
|
3566
|
+
return segmented ? /* @__PURE__ */ jsx8("div", { className: "ds-filters-track", children }) : /* @__PURE__ */ jsx8(Fragment4, { children });
|
|
3561
3567
|
}
|
|
3562
3568
|
|
|
3563
3569
|
// src/widgets/builtins/Filter.tsx
|
|
@@ -3770,7 +3776,7 @@ function InfoTip({ text }) {
|
|
|
3770
3776
|
}
|
|
3771
3777
|
|
|
3772
3778
|
// src/widgets/shared/clickable.ts
|
|
3773
|
-
import { useContext as
|
|
3779
|
+
import { useContext as useContext5 } from "react";
|
|
3774
3780
|
|
|
3775
3781
|
// src/components/PanelFrame.tsx
|
|
3776
3782
|
import { useCallback as useCallback4, useEffect as useEffect4, useId as useId4, useMemo as useMemo3, useRef as useRef5, useState as useState4 } from "react";
|
|
@@ -3830,10 +3836,10 @@ var Boundary = class extends Component {
|
|
|
3830
3836
|
};
|
|
3831
3837
|
|
|
3832
3838
|
// src/components/Slot.tsx
|
|
3833
|
-
import { createContext as createContext3, useContext as
|
|
3834
|
-
import { Fragment as
|
|
3839
|
+
import { createContext as createContext3, useContext as useContext4 } from "react";
|
|
3840
|
+
import { Fragment as Fragment5, jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3835
3841
|
var NodeScopeContext = createContext3({});
|
|
3836
|
-
var useNodeScope = () =>
|
|
3842
|
+
var useNodeScope = () => useContext4(NodeScopeContext);
|
|
3837
3843
|
var SlotOwnerContext = createContext3(null);
|
|
3838
3844
|
var SlotChildContext = createContext3(null);
|
|
3839
3845
|
function slotChildren(def, name) {
|
|
@@ -3851,9 +3857,9 @@ function Slot({
|
|
|
3851
3857
|
empty
|
|
3852
3858
|
}) {
|
|
3853
3859
|
const { options } = useDashboard();
|
|
3854
|
-
const owner =
|
|
3860
|
+
const owner = useContext4(SlotOwnerContext);
|
|
3855
3861
|
const outer = useNodeScope();
|
|
3856
|
-
const renderChild =
|
|
3862
|
+
const renderChild = useContext4(SlotChildContext);
|
|
3857
3863
|
if (!owner || !renderChild) return null;
|
|
3858
3864
|
const ids = slotChildren(owner.def, name);
|
|
3859
3865
|
const editing = options.mode === "edit";
|
|
@@ -3882,7 +3888,7 @@ function Slot({
|
|
|
3882
3888
|
}
|
|
3883
3889
|
) });
|
|
3884
3890
|
}
|
|
3885
|
-
var SlotItem = ({ children }) => /* @__PURE__ */ jsx13(
|
|
3891
|
+
var SlotItem = ({ children }) => /* @__PURE__ */ jsx13(Fragment5, { children });
|
|
3886
3892
|
|
|
3887
3893
|
// src/components/PanelFrame.tsx
|
|
3888
3894
|
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
@@ -4452,7 +4458,7 @@ function LoadingState({ text }) {
|
|
|
4452
4458
|
|
|
4453
4459
|
// src/widgets/shared/clickable.ts
|
|
4454
4460
|
function useClickable(panelId, activate) {
|
|
4455
|
-
const ctx =
|
|
4461
|
+
const ctx = useContext5(DashboardContext);
|
|
4456
4462
|
const def = ctx && panelId ? findPanel(ctx.runtime.doc, panelId) : void 0;
|
|
4457
4463
|
const on = def?.on;
|
|
4458
4464
|
if (on?.click === void 0) return { onClick: activate };
|
|
@@ -4500,7 +4506,7 @@ function useCountUp(target, ms = 700) {
|
|
|
4500
4506
|
}
|
|
4501
4507
|
|
|
4502
4508
|
// src/widgets/builtins/Kpi.tsx
|
|
4503
|
-
import { Fragment as
|
|
4509
|
+
import { Fragment as Fragment6, jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
4504
4510
|
var Kpi = defineWidget({
|
|
4505
4511
|
...KpiContract,
|
|
4506
4512
|
implements: "kpi",
|
|
@@ -4551,7 +4557,7 @@ var Kpi = defineWidget({
|
|
|
4551
4557
|
children: empty ? (
|
|
4552
4558
|
// No value is not zero: the author's text, else a dash.
|
|
4553
4559
|
/* @__PURE__ */ jsx15("span", { className: "ds-kpi-empty", children: spec.emptyText || "\u2014" })
|
|
4554
|
-
) : /* @__PURE__ */ jsxs11(
|
|
4560
|
+
) : /* @__PURE__ */ jsxs11(Fragment6, { children: [
|
|
4555
4561
|
/* @__PURE__ */ jsxs11(
|
|
4556
4562
|
"span",
|
|
4557
4563
|
{
|
|
@@ -5323,7 +5329,7 @@ var Table = defineWidget({
|
|
|
5323
5329
|
|
|
5324
5330
|
// src/widgets/builtins/Tiles.tsx
|
|
5325
5331
|
import "zod";
|
|
5326
|
-
import { Fragment as
|
|
5332
|
+
import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5327
5333
|
var Tiles = defineWidget({
|
|
5328
5334
|
...TilesContract,
|
|
5329
5335
|
implements: "tiles",
|
|
@@ -5407,7 +5413,7 @@ var Tiles = defineWidget({
|
|
|
5407
5413
|
return spec.captionInline ? /* @__PURE__ */ jsxs17("span", { className: "ds-tile-main", children: [
|
|
5408
5414
|
valueEl,
|
|
5409
5415
|
capEl
|
|
5410
|
-
] }) : /* @__PURE__ */ jsxs17(
|
|
5416
|
+
] }) : /* @__PURE__ */ jsxs17(Fragment7, { children: [
|
|
5411
5417
|
valueEl,
|
|
5412
5418
|
capEl
|
|
5413
5419
|
] });
|
|
@@ -5425,7 +5431,7 @@ var Tiles = defineWidget({
|
|
|
5425
5431
|
function CountUp({ value, render }) {
|
|
5426
5432
|
const n = toNumber(value);
|
|
5427
5433
|
const shown = useCountUp(n ?? value);
|
|
5428
|
-
return /* @__PURE__ */ jsx22(
|
|
5434
|
+
return /* @__PURE__ */ jsx22(Fragment7, { children: render(n === void 0 ? value : shown) });
|
|
5429
5435
|
}
|
|
5430
5436
|
function tplValue(t, row, helpers) {
|
|
5431
5437
|
try {
|
|
@@ -6045,7 +6051,7 @@ function cartesian(data, source, spec, type, h, colors) {
|
|
|
6045
6051
|
}
|
|
6046
6052
|
|
|
6047
6053
|
// src/widgets/builtins/charts.tsx
|
|
6048
|
-
import { Fragment as
|
|
6054
|
+
import { Fragment as Fragment8, jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
6049
6055
|
var chartEvents = ["click", "doubleClick", "hover", "hoverEnd", "legendClick", "brush", "datazoom"];
|
|
6050
6056
|
var BarChart2 = defineWidget({
|
|
6051
6057
|
...BarChartContract,
|
|
@@ -6076,7 +6082,7 @@ var BarChart2 = defineWidget({
|
|
|
6076
6082
|
const legend = c.coloured || avgText || c.legend.length > 0;
|
|
6077
6083
|
return /* @__PURE__ */ jsxs19("div", { className: "ds-chart", children: [
|
|
6078
6084
|
legend && /* @__PURE__ */ jsxs19("ul", { className: "ds-chart-legend", children: [
|
|
6079
|
-
c.coloured && /* @__PURE__ */ jsxs19(
|
|
6085
|
+
c.coloured && /* @__PURE__ */ jsxs19(Fragment8, { children: [
|
|
6080
6086
|
/* @__PURE__ */ jsxs19("li", { children: [
|
|
6081
6087
|
/* @__PURE__ */ jsx25("span", { className: "ds-swatch", style: { background: colors?.good } }),
|
|
6082
6088
|
spec.legendLabels?.above ?? "At or above avg"
|
|
@@ -6364,7 +6370,7 @@ var MatrixChart = defineWidget({
|
|
|
6364
6370
|
});
|
|
6365
6371
|
|
|
6366
6372
|
// src/widgets/builtins/layout.tsx
|
|
6367
|
-
import { Fragment as
|
|
6373
|
+
import { Fragment as Fragment9 } from "react";
|
|
6368
6374
|
import "zod";
|
|
6369
6375
|
import { jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
6370
6376
|
var Row = defineWidget({
|
|
@@ -6446,7 +6452,7 @@ var Repeater = defineWidget({
|
|
|
6446
6452
|
}) }) : /* @__PURE__ */ jsx26("div", { className: "ds-state", children: spec.emptyText });
|
|
6447
6453
|
return /* @__PURE__ */ jsx26("div", { className: "ds-repeater", style, children: rows.map((row, i) => (
|
|
6448
6454
|
// biome-ignore lint/suspicious/noArrayIndexKey: rows have no guaranteed id
|
|
6449
|
-
/* @__PURE__ */ jsx26(
|
|
6455
|
+
/* @__PURE__ */ jsx26(Fragment9, { children: renderSlot("item", { item: row, index: i, className: "ds-repeater-item" }) }, i)
|
|
6450
6456
|
)) });
|
|
6451
6457
|
}
|
|
6452
6458
|
});
|
|
@@ -6533,6 +6539,7 @@ function Grid({
|
|
|
6533
6539
|
columns,
|
|
6534
6540
|
rowHeight,
|
|
6535
6541
|
gap,
|
|
6542
|
+
exactHeights = false,
|
|
6536
6543
|
children,
|
|
6537
6544
|
editable = false,
|
|
6538
6545
|
onLayoutChange,
|
|
@@ -6559,15 +6566,19 @@ function Grid({
|
|
|
6559
6566
|
return () => ro.disconnect();
|
|
6560
6567
|
}, [wrapEl]);
|
|
6561
6568
|
const base = useMemo7(() => layoutsForView(layouts, view, columns), [layouts, view, columns]);
|
|
6569
|
+
const exact = exactHeights && !editable;
|
|
6570
|
+
const unit = rowHeight + gap;
|
|
6562
6571
|
const { rgl, panels, cols } = useMemo7(() => {
|
|
6563
|
-
|
|
6572
|
+
const scale2 = (l) => exact ? (l ?? []).map((i) => ({ ...i, y: i.y * unit, h: i.h * unit, minH: void 0, maxH: void 0 })) : l ?? [];
|
|
6573
|
+
const scaled = exact ? Object.fromEntries(Object.entries(base.layouts).map(([bp, l]) => [bp, scale2(l)])) : base.layouts;
|
|
6574
|
+
if (!hidden?.size || editable) return { rgl: scaled, panels: base.panels, cols: base.cols };
|
|
6564
6575
|
const keep = (l) => (l ?? []).filter((i) => !hidden.has(i.i));
|
|
6565
6576
|
return {
|
|
6566
|
-
rgl: Object.fromEntries(Object.entries(
|
|
6577
|
+
rgl: Object.fromEntries(Object.entries(scaled).map(([bp, l]) => [bp, keep(l)])),
|
|
6567
6578
|
panels: base.panels.filter((p) => !hidden.has(p)),
|
|
6568
6579
|
cols: base.cols
|
|
6569
6580
|
};
|
|
6570
|
-
}, [base, hidden, editable]);
|
|
6581
|
+
}, [base, hidden, editable, exact, unit]);
|
|
6571
6582
|
const [fitRows, setFitRows] = useState7({});
|
|
6572
6583
|
const fitted = useMemo7(() => {
|
|
6573
6584
|
if (editable || base.fit.size === 0) return rgl;
|
|
@@ -6582,12 +6593,12 @@ function Grid({
|
|
|
6582
6593
|
}
|
|
6583
6594
|
return (l ?? []).map((i) => {
|
|
6584
6595
|
const want = base.fit.has(i.i) ? rowWant.get(i.y) : void 0;
|
|
6585
|
-
return want && want > i.h ? { ...i, h: want } : i;
|
|
6596
|
+
return want && (exact || want > i.h) ? { ...i, h: want } : i;
|
|
6586
6597
|
});
|
|
6587
6598
|
})()
|
|
6588
6599
|
])
|
|
6589
6600
|
);
|
|
6590
|
-
}, [rgl, base.fit, fitRows, editable]);
|
|
6601
|
+
}, [rgl, base.fit, fitRows, editable, exact]);
|
|
6591
6602
|
const observeFit = (panel) => (el) => {
|
|
6592
6603
|
const prev = fitObservers.current.get(panel);
|
|
6593
6604
|
if (prev) {
|
|
@@ -6601,7 +6612,7 @@ function Grid({
|
|
|
6601
6612
|
const px = target2?.offsetHeight ?? 0;
|
|
6602
6613
|
el.removeAttribute("data-measuring");
|
|
6603
6614
|
if (!px) return;
|
|
6604
|
-
const rows = Math.ceil((px + gap) / (rowHeight + gap));
|
|
6615
|
+
const rows = exact ? Math.ceil(px) + gap : Math.ceil((px + gap) / (rowHeight + gap));
|
|
6605
6616
|
setFitRows((r) => {
|
|
6606
6617
|
const cur = r[panel];
|
|
6607
6618
|
if (cur === rows) return r;
|
|
@@ -6664,12 +6675,13 @@ function Grid({
|
|
|
6664
6675
|
return /* @__PURE__ */ jsx27("div", { ref: setWrapEl, children: /* @__PURE__ */ jsx27(
|
|
6665
6676
|
ResponsiveGrid,
|
|
6666
6677
|
{
|
|
6667
|
-
className: editable ? "ds-grid ds-grid-edit" : "ds-grid",
|
|
6678
|
+
className: editable ? "ds-grid ds-grid-edit" : exact ? "ds-grid ds-grid-exact" : "ds-grid",
|
|
6679
|
+
style: exact ? { "--ds-grid-gap": `${gap}px` } : void 0,
|
|
6668
6680
|
layouts: breakpoint ? { [breakpoint]: rgl[breakpoint] ?? [] } : fitted,
|
|
6669
6681
|
breakpoints: breakpoint ? { [breakpoint]: 0 } : BREAKPOINT_MIN,
|
|
6670
6682
|
cols: breakpoint ? { [breakpoint]: cols[breakpoint] } : cols,
|
|
6671
|
-
rowHeight,
|
|
6672
|
-
margin: [gap, gap],
|
|
6683
|
+
rowHeight: exact ? 1 : rowHeight,
|
|
6684
|
+
margin: exact ? [gap, 0] : [gap, gap],
|
|
6673
6685
|
containerPadding: [0, 0],
|
|
6674
6686
|
isDraggable: editable,
|
|
6675
6687
|
isResizable: editable,
|
|
@@ -6852,11 +6864,11 @@ function ModalHost() {
|
|
|
6852
6864
|
}
|
|
6853
6865
|
|
|
6854
6866
|
// src/components/Provider.tsx
|
|
6855
|
-
import { createContext as createContext4, useContext as
|
|
6867
|
+
import { createContext as createContext4, useContext as useContext6, useRef as useRef11 } from "react";
|
|
6856
6868
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
6857
6869
|
var SettingsContext = createContext4({});
|
|
6858
6870
|
function DashSpecProvider({ children, ...settings }) {
|
|
6859
|
-
const outer =
|
|
6871
|
+
const outer = useContext6(SettingsContext);
|
|
6860
6872
|
const last = useRef11(
|
|
6861
6873
|
void 0
|
|
6862
6874
|
);
|
|
@@ -6869,7 +6881,7 @@ function shallowEqual2(a, b) {
|
|
|
6869
6881
|
return ka.length === Object.keys(b).length && ka.every((k) => Object.is(a[k], b[k]));
|
|
6870
6882
|
}
|
|
6871
6883
|
function useDashSpecSettings() {
|
|
6872
|
-
return
|
|
6884
|
+
return useContext6(SettingsContext);
|
|
6873
6885
|
}
|
|
6874
6886
|
var LISTS = ["designSystems", "widgets", "datasourceTypes", "trustedOrigins"];
|
|
6875
6887
|
var MAPS = ["aliases", "actions", "functions", "themes", "context", "data", "connections", "connectionMap"];
|
|
@@ -6883,7 +6895,8 @@ function mergeSettings(outer, inner) {
|
|
|
6883
6895
|
for (const k of MAPS) if (isObj(o[k]) && isObj(i[k])) out[k] = { ...o[k], ...i[k] };
|
|
6884
6896
|
if (isObj(o.ui) && isObj(i.ui)) {
|
|
6885
6897
|
const filters = isObj(o.ui.filters) && isObj(i.ui.filters) ? { ...o.ui.filters, ...i.ui.filters } : i.ui.filters ?? o.ui.filters;
|
|
6886
|
-
|
|
6898
|
+
const icons = isObj(o.ui.icons) && isObj(i.ui.icons) ? { ...o.ui.icons, ...i.ui.icons } : i.ui.icons ?? o.ui.icons;
|
|
6899
|
+
out.ui = { ...o.ui, ...i.ui, ...filters ? { filters } : {}, ...icons ? { icons } : {} };
|
|
6887
6900
|
}
|
|
6888
6901
|
return out;
|
|
6889
6902
|
}
|
|
@@ -6901,7 +6914,7 @@ function pickTheme(name, themes, fallback) {
|
|
|
6901
6914
|
|
|
6902
6915
|
// src/components/Tour.tsx
|
|
6903
6916
|
import { useCallback as useCallback6, useEffect as useEffect10, useId as useId5, useLayoutEffect as useLayoutEffect3, useRef as useRef12, useState as useState8 } from "react";
|
|
6904
|
-
import { Fragment as
|
|
6917
|
+
import { Fragment as Fragment10, jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
6905
6918
|
var useClientLayoutEffect = typeof window === "undefined" ? useEffect10 : useLayoutEffect3;
|
|
6906
6919
|
function panelElement(root, id) {
|
|
6907
6920
|
if (!root || !id) return null;
|
|
@@ -6978,7 +6991,7 @@ function TourButton({ steps }) {
|
|
|
6978
6991
|
}, [isOpen]);
|
|
6979
6992
|
if (steps.length === 0) return null;
|
|
6980
6993
|
const last = at === steps.length - 1;
|
|
6981
|
-
return /* @__PURE__ */ jsxs22(
|
|
6994
|
+
return /* @__PURE__ */ jsxs22(Fragment10, { children: [
|
|
6982
6995
|
/* @__PURE__ */ jsx30(
|
|
6983
6996
|
"button",
|
|
6984
6997
|
{
|
|
@@ -7307,7 +7320,8 @@ var RENDERER_CSS = `
|
|
|
7307
7320
|
.ds-flow .ds-tiles { height: auto; overflow-y: visible; }
|
|
7308
7321
|
/* Grid items with fit: the panel takes its natural height (at least the cell's), so the grid can measure it. */
|
|
7309
7322
|
[data-fit] > .ds-fit { height: 100%; }
|
|
7310
|
-
.ds-
|
|
7323
|
+
.ds-grid-exact > .react-grid-item { padding-bottom: var(--ds-grid-gap); }
|
|
7324
|
+
.ds-fit > .ds-panel { height: auto !important; min-height: 100% !important; }
|
|
7311
7325
|
/* While measuring, the panel takes only its content's height (no stretching), then goes back. */
|
|
7312
7326
|
.ds-fit[data-measuring] > .ds-panel { min-height: 0 !important; }
|
|
7313
7327
|
.ds-fit[data-measuring] .ds-panel-body, .ds-fit[data-measuring] .ds-panel-body > * { flex: none !important; height: auto !important; }
|
|
@@ -7724,7 +7738,7 @@ function releaseDefaultPrefix(owner) {
|
|
|
7724
7738
|
}
|
|
7725
7739
|
|
|
7726
7740
|
// src/components/DashboardRenderer.tsx
|
|
7727
|
-
import { Fragment as
|
|
7741
|
+
import { Fragment as Fragment11, jsx as jsx31, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
7728
7742
|
function usesScripts(doc) {
|
|
7729
7743
|
const handler = (h) => {
|
|
7730
7744
|
if (typeof h === "string") return isCallbackSource(h);
|
|
@@ -8196,7 +8210,7 @@ function DashboardBody({
|
|
|
8196
8210
|
const grid = doc.spec.grid;
|
|
8197
8211
|
const tour = editable ? NO_STEPS : doc.spec.tour ?? NO_STEPS;
|
|
8198
8212
|
const hidden = useHiddenPanels(Object.keys(doc.spec.panels));
|
|
8199
|
-
return /* @__PURE__ */ jsxs23(
|
|
8213
|
+
return /* @__PURE__ */ jsxs23(Fragment11, { children: [
|
|
8200
8214
|
!hideHeader && (head.title || head.synced || tour.length > 0) && /* @__PURE__ */ jsxs23("div", { className: "ds-header", children: [
|
|
8201
8215
|
head.title && /* @__PURE__ */ jsx31("h2", { className: "ds-title", children: head.title }),
|
|
8202
8216
|
head.description && /* @__PURE__ */ jsx31("p", { className: "ds-desc", children: head.description }),
|
|
@@ -8239,6 +8253,7 @@ function DashboardBody({
|
|
|
8239
8253
|
columns: grid.columns,
|
|
8240
8254
|
rowHeight: grid.rowHeight,
|
|
8241
8255
|
gap: grid.gap,
|
|
8256
|
+
exactHeights: grid.exactHeights,
|
|
8242
8257
|
editable,
|
|
8243
8258
|
hidden,
|
|
8244
8259
|
...breakpoint ? { breakpoint } : {},
|