@devtable/dashboard 14.21.0 → 14.22.0
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useConfirmBeforeTabClose: (hasChanges: boolean) => void;
|
package/dist/dashboard.es.js
CHANGED
|
@@ -2425,7 +2425,7 @@ function hm() {
|
|
|
2425
2425
|
} = $.useContext(ts);
|
|
2426
2426
|
return e ? document.getElementById(e) : null;
|
|
2427
2427
|
}
|
|
2428
|
-
const rs = "14.
|
|
2428
|
+
const rs = "14.22.0", pm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2429
2429
|
__proto__: null,
|
|
2430
2430
|
version: rs
|
|
2431
2431
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -4728,7 +4728,7 @@ const ti = {
|
|
|
4728
4728
|
function Ye(e, t) {
|
|
4729
4729
|
e.messageChannels.getChannel("viz").emit("rendered", t);
|
|
4730
4730
|
}
|
|
4731
|
-
function
|
|
4731
|
+
function w9(e, t) {
|
|
4732
4732
|
return e.messageChannels.getChannel("viz").on("rendered", t), () => {
|
|
4733
4733
|
e.messageChannels.getChannel("viz").off("rendered", t);
|
|
4734
4734
|
};
|
|
@@ -22936,7 +22936,7 @@ class g5 {
|
|
|
22936
22936
|
};
|
|
22937
22937
|
}
|
|
22938
22938
|
}
|
|
22939
|
-
class
|
|
22939
|
+
class S9 {
|
|
22940
22940
|
constructor(t) {
|
|
22941
22941
|
this.implementation = t;
|
|
22942
22942
|
}
|
|
@@ -24774,12 +24774,12 @@ const P5 = m.model("FilterDateRangeConfigMeta", {
|
|
|
24774
24774
|
p.disabled || d.push(p), p.children.forEach(h);
|
|
24775
24775
|
};
|
|
24776
24776
|
return e.forEach(h), d;
|
|
24777
|
-
}, [e, a]), o = z(() => new Set(i.map((d) => d.value)), [i]), l = z(() => new Set(t.map((d) => d.value)), [t]), s = z(() =>
|
|
24777
|
+
}, [e, a]), o = z(() => new Set(i.map((d) => d.value)), [i]), l = z(() => new Set(t.map((d) => d.value)), [t]), s = z(() => l.size !== o.size ? !1 : Array.from(o).every((d) => l.has(d)), [l, o]);
|
|
24778
24778
|
return {
|
|
24779
24779
|
allValueSet: o,
|
|
24780
24780
|
selectedValueSet: l,
|
|
24781
24781
|
toggleSelectAll: () => {
|
|
24782
|
-
if (
|
|
24782
|
+
if (s) {
|
|
24783
24783
|
n([]);
|
|
24784
24784
|
return;
|
|
24785
24785
|
}
|
|
@@ -25811,7 +25811,7 @@ const nd = m.model("ViewDivisionConfig", {
|
|
|
25811
25811
|
const n = e.panelIDs.filter((a) => a !== t);
|
|
25812
25812
|
e.panelIDs.length = 0, e.panelIDs.push(...n);
|
|
25813
25813
|
}
|
|
25814
|
-
})), on = "13.45.0",
|
|
25814
|
+
})), on = "13.45.0", C9 = {
|
|
25815
25815
|
definition: {
|
|
25816
25816
|
sqlSnippets: [],
|
|
25817
25817
|
queries: [],
|
|
@@ -27900,7 +27900,7 @@ function G3(e) {
|
|
|
27900
27900
|
}, [e]);
|
|
27901
27901
|
}
|
|
27902
27902
|
const Dd = "N/A";
|
|
27903
|
-
function
|
|
27903
|
+
function k9() {
|
|
27904
27904
|
const e = Pr(), t = e.content.views.visibleViews;
|
|
27905
27905
|
return z(() => t.map((i) => {
|
|
27906
27906
|
var o;
|
|
@@ -28574,7 +28574,7 @@ function kz(e, t, n) {
|
|
|
28574
28574
|
fullScreenPanel: d
|
|
28575
28575
|
};
|
|
28576
28576
|
}
|
|
28577
|
-
function
|
|
28577
|
+
function z9(e) {
|
|
28578
28578
|
const t = Pr(), n = z(() => t.content.panels.findByID(e.panelId), [e.panelId]);
|
|
28579
28579
|
return n ? /* @__PURE__ */ r(cz, { withAddon: !1, withPanelTitle: !1, withInteraction: !1, children: /* @__PURE__ */ r(Ei, { panel: n, panelStyle: {} }) }) : null;
|
|
28580
28580
|
}
|
|
@@ -29018,7 +29018,7 @@ const Oz = D(({
|
|
|
29018
29018
|
] }) });
|
|
29019
29019
|
});
|
|
29020
29020
|
var Qz = /* @__PURE__ */ ((e) => (e.Use = "use", e.Edit = "edit", e))(Qz || {});
|
|
29021
|
-
const
|
|
29021
|
+
const T9 = {
|
|
29022
29022
|
[U.Division]: "Division",
|
|
29023
29023
|
[U.Tabs]: "Tabs",
|
|
29024
29024
|
[U.Modal]: "Modal"
|
|
@@ -29026,7 +29026,7 @@ const z9 = {
|
|
|
29026
29026
|
[U.Division]: "rgba(255, 0, 0, 0.2)",
|
|
29027
29027
|
[U.Modal]: "rgba(0, 0, 0, 0.2)",
|
|
29028
29028
|
[U.Tabs]: "rgba(255, 200, 100, 0.4)"
|
|
29029
|
-
},
|
|
29029
|
+
}, D9 = {
|
|
29030
29030
|
[U.Division]: "#ff4000",
|
|
29031
29031
|
[U.Modal]: "#000",
|
|
29032
29032
|
[U.Tabs]: "#ffad18"
|
|
@@ -30808,7 +30808,7 @@ const TT = m.model({
|
|
|
30808
30808
|
}, e);
|
|
30809
30809
|
}
|
|
30810
30810
|
});
|
|
30811
|
-
function
|
|
30811
|
+
function I9(e, t) {
|
|
30812
30812
|
t.filters && je(e.filters.current, t.filters);
|
|
30813
30813
|
}
|
|
30814
30814
|
function DT({
|
|
@@ -36037,9 +36037,21 @@ function gI(e) {
|
|
|
36037
36037
|
}), Jr.init().then((a) => console.log("monaco instance:", a));
|
|
36038
36038
|
}, []);
|
|
36039
36039
|
}
|
|
36040
|
+
const fI = (e) => {
|
|
36041
|
+
const t = ae((n) => {
|
|
36042
|
+
const a = n || window.event;
|
|
36043
|
+
return a.preventDefault(), a && (a.returnValue = ""), "";
|
|
36044
|
+
}, []);
|
|
36045
|
+
N(() => {
|
|
36046
|
+
if (e)
|
|
36047
|
+
return window.addEventListener("beforeunload", t), () => {
|
|
36048
|
+
window.removeEventListener("beforeunload", t);
|
|
36049
|
+
};
|
|
36050
|
+
}, [e]);
|
|
36051
|
+
};
|
|
36040
36052
|
_s();
|
|
36041
36053
|
Fs();
|
|
36042
|
-
const
|
|
36054
|
+
const bI = {
|
|
36043
36055
|
root: {
|
|
36044
36056
|
height: "100vh",
|
|
36045
36057
|
display: "flex",
|
|
@@ -36058,7 +36070,7 @@ const fI = {
|
|
|
36058
36070
|
// main header & sub header
|
|
36059
36071
|
height: "100vh"
|
|
36060
36072
|
}
|
|
36061
|
-
},
|
|
36073
|
+
}, yI = ({
|
|
36062
36074
|
context: e,
|
|
36063
36075
|
dashboard: t,
|
|
36064
36076
|
content: n,
|
|
@@ -36094,7 +36106,7 @@ const fI = {
|
|
|
36094
36106
|
const I = async () => {
|
|
36095
36107
|
await a(v.json, v.content.json);
|
|
36096
36108
|
}, M = Pt(Ii, []), R = Gd(M);
|
|
36097
|
-
return cl("@devtable/dashboard editor", {
|
|
36109
|
+
return fI(v.content.changed), cl("@devtable/dashboard editor", {
|
|
36098
36110
|
context: e,
|
|
36099
36111
|
dashboard: t,
|
|
36100
36112
|
content: n,
|
|
@@ -36125,7 +36137,7 @@ const fI = {
|
|
|
36125
36137
|
},
|
|
36126
36138
|
breakpoint: "xxs"
|
|
36127
36139
|
//FIXME(leto): not sure
|
|
36128
|
-
}, styles:
|
|
36140
|
+
}, styles: bI, children: [
|
|
36129
36141
|
/* @__PURE__ */ r(t6, { onExit: h, saveDashboardChanges: I, headerSlot: s }),
|
|
36130
36142
|
/* @__PURE__ */ r(D6, {}),
|
|
36131
36143
|
/* @__PURE__ */ r(Xe.Main, { children: /* @__PURE__ */ r(V, { className: `${i} dashboard-root`, sx: {
|
|
@@ -36135,7 +36147,7 @@ const fI = {
|
|
|
36135
36147
|
/* @__PURE__ */ r(pI, {})
|
|
36136
36148
|
] }) })
|
|
36137
36149
|
] }) }) }) }) }) }) }) });
|
|
36138
|
-
},
|
|
36150
|
+
}, M9 = D(ee(yI));
|
|
36139
36151
|
const ou = m.model({
|
|
36140
36152
|
id: m.string,
|
|
36141
36153
|
name: m.string,
|
|
@@ -36239,7 +36251,7 @@ const ou = m.model({
|
|
|
36239
36251
|
// setupAutoSave();
|
|
36240
36252
|
// },
|
|
36241
36253
|
}));
|
|
36242
|
-
function
|
|
36254
|
+
function _I({
|
|
36243
36255
|
id: e,
|
|
36244
36256
|
name: t,
|
|
36245
36257
|
dashboard_id: n,
|
|
@@ -36282,7 +36294,7 @@ function yI({
|
|
|
36282
36294
|
}
|
|
36283
36295
|
});
|
|
36284
36296
|
}
|
|
36285
|
-
const
|
|
36297
|
+
const xI = m.model({
|
|
36286
36298
|
id: m.identifier,
|
|
36287
36299
|
name: m.string,
|
|
36288
36300
|
group: m.string,
|
|
@@ -36292,18 +36304,18 @@ const _I = m.model({
|
|
|
36292
36304
|
globalSQLSnippets: od,
|
|
36293
36305
|
context: $i
|
|
36294
36306
|
});
|
|
36295
|
-
function
|
|
36307
|
+
function vI({
|
|
36296
36308
|
id: e,
|
|
36297
36309
|
name: t,
|
|
36298
36310
|
group: n,
|
|
36299
36311
|
content_id: a
|
|
36300
36312
|
}, i, o, l, s, c, d) {
|
|
36301
|
-
return
|
|
36313
|
+
return xI.create({
|
|
36302
36314
|
id: e,
|
|
36303
36315
|
name: t,
|
|
36304
36316
|
group: n,
|
|
36305
36317
|
content_id: a,
|
|
36306
|
-
content:
|
|
36318
|
+
content: _I(i, s, c, d),
|
|
36307
36319
|
datasources: {
|
|
36308
36320
|
list: o
|
|
36309
36321
|
},
|
|
@@ -36315,7 +36327,7 @@ function xI({
|
|
|
36315
36327
|
}
|
|
36316
36328
|
_s();
|
|
36317
36329
|
Fs();
|
|
36318
|
-
const
|
|
36330
|
+
const wI = ({
|
|
36319
36331
|
context: e,
|
|
36320
36332
|
dashboard: t,
|
|
36321
36333
|
content: n,
|
|
@@ -36334,7 +36346,7 @@ const vI = ({
|
|
|
36334
36346
|
data: g = []
|
|
36335
36347
|
} = dn(Pi), {
|
|
36336
36348
|
data: _ = []
|
|
36337
|
-
} = dn(xd), b = $.useMemo(() =>
|
|
36349
|
+
} = dn(xd), b = $.useMemo(() => vI(t, n, g, _, e, s ?? {}, d ?? null), [t, n]);
|
|
36338
36350
|
Qd(b.content, !1), $.useEffect(() => {
|
|
36339
36351
|
b.context.replace(e);
|
|
36340
36352
|
}, [e]), $.useEffect(() => {
|
|
@@ -36372,13 +36384,13 @@ const vI = ({
|
|
|
36372
36384
|
}, children: /* @__PURE__ */ r(Rr.Provider, { value: {
|
|
36373
36385
|
inEditMode: !1
|
|
36374
36386
|
}, children: /* @__PURE__ */ r(V, { className: `${a} dashboard-root`, children: /* @__PURE__ */ r(Kt.Provider, { value: v, children: /* @__PURE__ */ r(qr, { configure: I, children: b.content.views.visibleViews.map((M) => /* @__PURE__ */ r(qi, { view: M }, M.id)) }) }) }) }) }) }) }) }) }) }) }) });
|
|
36375
|
-
},
|
|
36387
|
+
}, L9 = D(wI), V9 = () => Promise.resolve().then(() => pm).then(({
|
|
36376
36388
|
version: e
|
|
36377
36389
|
}) => (console.log(`[@devtable/dashboard] version: ${e}`), e));
|
|
36378
36390
|
export {
|
|
36379
36391
|
dt as APIClient,
|
|
36380
36392
|
on as CURRENT_SCHEMA_VERSION,
|
|
36381
|
-
|
|
36393
|
+
z9 as ClientPanelRender,
|
|
36382
36394
|
jd as ContentModel,
|
|
36383
36395
|
cs as ContentModelContextProvider,
|
|
36384
36396
|
ou as ContentRenderModel,
|
|
@@ -36386,12 +36398,12 @@ export {
|
|
|
36386
36398
|
ba as DEFAULT_CUSTOM_MODAL_TITLE,
|
|
36387
36399
|
f5 as DashboardApiClient,
|
|
36388
36400
|
b5 as DashboardApiFacadeClient,
|
|
36389
|
-
|
|
36401
|
+
M9 as DashboardEditor,
|
|
36390
36402
|
H as DashboardFilterType,
|
|
36391
36403
|
Qz as DashboardMode,
|
|
36392
36404
|
IT as DashboardModel,
|
|
36393
36405
|
is as DashboardModelContextProvider,
|
|
36394
|
-
|
|
36406
|
+
xI as DashboardRenderModel,
|
|
36395
36407
|
ls as DashboardThemeContextProvider,
|
|
36396
36408
|
jz as DashboardViewEditor,
|
|
36397
36409
|
qi as DashboardViewRender,
|
|
@@ -36404,7 +36416,7 @@ export {
|
|
|
36404
36416
|
Md as DescriptionPopover,
|
|
36405
36417
|
k3 as DraftModel,
|
|
36406
36418
|
U as EViewComponentType,
|
|
36407
|
-
|
|
36419
|
+
S9 as FacadeApiClient,
|
|
36408
36420
|
qc as FilterCheckboxConfigMeta,
|
|
36409
36421
|
jc as FilterDateRangeConfigMeta,
|
|
36410
36422
|
td as FilterMeta,
|
|
@@ -36445,15 +36457,15 @@ export {
|
|
|
36445
36457
|
I5 as QueryMeta,
|
|
36446
36458
|
Uz as QueryModel,
|
|
36447
36459
|
vd as QueryRenderModel,
|
|
36448
|
-
|
|
36460
|
+
L9 as ReadOnlyDashboard,
|
|
36449
36461
|
V5 as SQLSnippetMeta,
|
|
36450
36462
|
S3 as SQLSnippetRenderModel,
|
|
36451
36463
|
Yz as SQLSnippetsModel,
|
|
36452
36464
|
Cd as SQLSnippetsRenderModel,
|
|
36453
36465
|
w5 as VariableMeta,
|
|
36454
36466
|
Gz as ViewComponentTypeBackground,
|
|
36455
|
-
|
|
36456
|
-
|
|
36467
|
+
D9 as ViewComponentTypeColor,
|
|
36468
|
+
T9 as ViewComponentTypeName,
|
|
36457
36469
|
nd as ViewDivisionConfig,
|
|
36458
36470
|
d3 as ViewMeta,
|
|
36459
36471
|
rd as ViewModalConfig,
|
|
@@ -36462,13 +36474,13 @@ export {
|
|
|
36462
36474
|
zT as ViewsModel,
|
|
36463
36475
|
cd as ViewsRenderModel,
|
|
36464
36476
|
pz as Viz,
|
|
36465
|
-
|
|
36477
|
+
I9 as applyPartialDashboard,
|
|
36466
36478
|
Lc as configureAPIClient,
|
|
36467
36479
|
DT as createContentModel,
|
|
36468
|
-
|
|
36480
|
+
_I as createContentRenderModel,
|
|
36469
36481
|
ld as createContextMeta,
|
|
36470
36482
|
MT as createDashboardModel,
|
|
36471
|
-
|
|
36483
|
+
vI as createDashboardRenderModel,
|
|
36472
36484
|
z3 as createDraft,
|
|
36473
36485
|
A5 as createFilterCheckboxConfig,
|
|
36474
36486
|
R5 as createFilterDateRangeConfig,
|
|
@@ -36491,10 +36503,10 @@ export {
|
|
|
36491
36503
|
p3 as getInitialViewsRenderModel,
|
|
36492
36504
|
g3 as getNewPanel,
|
|
36493
36505
|
$5 as getStaticDateRangeDefaultValue,
|
|
36494
|
-
|
|
36495
|
-
|
|
36506
|
+
V9 as getVersion,
|
|
36507
|
+
C9 as initialDashboardContent,
|
|
36496
36508
|
Ye as notifyVizRendered,
|
|
36497
|
-
|
|
36509
|
+
w9 as onVizRendered,
|
|
36498
36510
|
wn as pluginManager,
|
|
36499
36511
|
Pr as useDashboardContext,
|
|
36500
36512
|
Mm as useDashboardThemeContext,
|
|
@@ -36508,5 +36520,5 @@ export {
|
|
|
36508
36520
|
Te as useRenderContentModelContext,
|
|
36509
36521
|
Im as useRenderDashboardContext,
|
|
36510
36522
|
rt as useRenderPanelContext,
|
|
36511
|
-
|
|
36523
|
+
k9 as useVisibleFilters
|
|
36512
36524
|
};
|