@devtable/dashboard 10.3.0 → 10.3.1

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.
@@ -3024,7 +3024,7 @@ class Xo {
3024
3024
  }), this.instanceRegistry.clear(), this.factoryRegistry.clear();
3025
3025
  }
3026
3026
  }
3027
- const fc = "10.3.0", bf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3027
+ const fc = "10.3.1", bf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3028
3028
  __proto__: null,
3029
3029
  version: fc
3030
3030
  }, Symbol.toStringTag, { value: "Module" }));
@@ -22271,7 +22271,7 @@ const Dk = b.model("PanelsModel", {
22271
22271
  }
22272
22272
  }));
22273
22273
  var Ik = /* @__PURE__ */ ((t) => (t.Use = "use", t.Edit = "edit", t))(Ik || {}), le = /* @__PURE__ */ ((t) => (t.Division = "div", t.Modal = "modal", t.Tabs = "tabs", t))(le || {});
22274
- const jz = {
22274
+ const Yz = {
22275
22275
  div: "Division",
22276
22276
  tabs: "Tabs",
22277
22277
  modal: "Modal"
@@ -22279,11 +22279,11 @@ const jz = {
22279
22279
  div: "rgba(255, 0, 0, 0.2)",
22280
22280
  modal: "rgba(0, 0, 0, 0.2)",
22281
22281
  tabs: "rgba(255, 200, 100, 0.4)"
22282
- }, Yz = {
22282
+ }, Gz = {
22283
22283
  div: "#ff4000",
22284
22284
  modal: "#000",
22285
22285
  tabs: "#ffad18"
22286
- }, Gz = {
22286
+ }, Hz = {
22287
22287
  definition: {
22288
22288
  sqlSnippets: [],
22289
22289
  queries: [],
@@ -22847,7 +22847,7 @@ const Fk = b.model({
22847
22847
  }, t);
22848
22848
  }
22849
22849
  });
22850
- function Hz(t, e) {
22850
+ function Qz(t, e) {
22851
22851
  e.filters && st(t.filters.current, e.filters);
22852
22852
  }
22853
22853
  function Pk({
@@ -24008,17 +24008,21 @@ const pT = D(function() {
24008
24008
  return n ? /* @__PURE__ */ i(w, { grow: !0, position: "center", px: 20, className: "panel-title-wrapper", sx: {
24009
24009
  flexGrow: 1
24010
24010
  }, children: /* @__PURE__ */ i(C, { align: "center", lineClamp: 1, weight: "bold", children: n }) }) : null;
24011
- }), fT = {
24011
+ });
24012
+ function fT(t) {
24013
+ return !["richText", "button"].includes(t);
24014
+ }
24015
+ const mT = {
24012
24016
  border: "1px solid #e9ecef"
24013
- }, mT = {
24017
+ }, gT = {
24014
24018
  border: "1px dashed transparent",
24015
24019
  transition: "border-color 300ms ease",
24016
24020
  "&:hover": {
24017
24021
  borderColor: "#e9ecef"
24018
24022
  }
24019
24023
  };
24020
- function gT(t, e) {
24021
- return t.style.border.enabled ? fT : e ? mT : {
24024
+ function bT(t, e) {
24025
+ return t.style.border.enabled ? mT : e ? gT : {
24022
24026
  border: "1px dashed transparent"
24023
24027
  };
24024
24028
  }
@@ -24028,7 +24032,7 @@ const Ea = D(function({
24028
24032
  }) {
24029
24033
  const {
24030
24034
  inEditMode: r
24031
- } = Et(In), o = e.title ? "calc(100% - 25px - 5px)" : "100%", a = gT(e, r);
24035
+ } = Et(In), o = e.title ? "calc(100% - 25px - 5px)" : "100%", a = bT(e, r), l = fT(e.viz.type) || r;
24032
24036
  return /* @__PURE__ */ i(gc, { value: {
24033
24037
  panel: e,
24034
24038
  data: e.data,
@@ -24044,12 +24048,12 @@ const Ea = D(function({
24044
24048
  height: 28,
24045
24049
  zIndex: 310
24046
24050
  }, children: /* @__PURE__ */ i(Dd, {}) }),
24047
- /* @__PURE__ */ i(aT, { view: n }),
24051
+ l && /* @__PURE__ */ i(aT, { view: n }),
24048
24052
  /* @__PURE__ */ i(pT, {}),
24049
24053
  /* @__PURE__ */ i(Ld, { panel: e, height: o })
24050
24054
  ] }) });
24051
24055
  });
24052
- const bT = z.forwardRef(({
24056
+ const yT = z.forwardRef(({
24053
24057
  h: t
24054
24058
  }, e) => /* @__PURE__ */ i(K, { ref: e, className: "react-grid-customDragHandle", sx: {
24055
24059
  userSelect: "none",
@@ -24061,7 +24065,7 @@ const bT = z.forwardRef(({
24061
24065
  "&:hover": {
24062
24066
  color: "#228be6"
24063
24067
  }
24064
- }, variant: "transparent", children: /* @__PURE__ */ i(wh, { size: 16 }) })), yT = z.forwardRef(({
24068
+ }, variant: "transparent", children: /* @__PURE__ */ i(wh, { size: 16 }) })), xT = z.forwardRef(({
24065
24069
  handleAxis: t,
24066
24070
  ...e
24067
24071
  }, n) => /* @__PURE__ */ i(K, { ref: n, className: "react-grid-customResizeHandle", sx: {
@@ -24074,7 +24078,7 @@ const bT = z.forwardRef(({
24074
24078
  "&:hover": {
24075
24079
  color: "#228be6"
24076
24080
  }
24077
- }, variant: "transparent", ...e, children: /* @__PURE__ */ i(_h, { size: 16 }) })), xT = Yl(jl), vT = D(({
24081
+ }, variant: "transparent", ...e, children: /* @__PURE__ */ i(_h, { size: 16 }) })), vT = Yl(jl), wT = D(({
24078
24082
  view: t,
24079
24083
  className: e = "layout"
24080
24084
  }) => {
@@ -24092,13 +24096,13 @@ const bT = z.forwardRef(({
24092
24096
  }, [n]), s = (l, c, d, p) => {
24093
24097
  d.h < 30 && (d.h = 30, p.h = 30), d.w < 4 && (d.w = 4, p.w = 4);
24094
24098
  };
24095
- return /* @__PURE__ */ i(xT, { onLayoutChange: a, className: `dashboard-layout ${e}`, rowHeight: 1, cols: 36, margin: [0, 0], isBounded: !0, isDraggable: !0, isResizable: !0, layout: o, draggableHandle: ".react-grid-customDragHandle", resizeHandle: /* @__PURE__ */ i(yT, {}), onResize: s, children: r.map((l, c) => /* @__PURE__ */ h("div", { "data-grid": {
24099
+ return /* @__PURE__ */ i(vT, { onLayoutChange: a, className: `dashboard-layout ${e}`, rowHeight: 1, cols: 36, margin: [0, 0], isBounded: !0, isDraggable: !0, isResizable: !0, layout: o, draggableHandle: ".react-grid-customDragHandle", resizeHandle: /* @__PURE__ */ i(xT, {}), onResize: s, children: r.map((l, c) => /* @__PURE__ */ h("div", { "data-grid": {
24096
24100
  ...l.layout
24097
24101
  }, className: "panel-grid-item", children: [
24098
- /* @__PURE__ */ i(bT, { h: l.layout.h }),
24102
+ /* @__PURE__ */ i(yT, { h: l.layout.h }),
24099
24103
  /* @__PURE__ */ i(Ea, { view: t, panel: l })
24100
24104
  ] }, l.id)) });
24101
- }), wT = Yl(jl), _T = D(function({
24105
+ }), _T = Yl(jl), CT = D(function({
24102
24106
  view: e,
24103
24107
  className: n = "layout"
24104
24108
  }) {
@@ -24106,12 +24110,12 @@ const bT = z.forwardRef(({
24106
24110
  panels: r,
24107
24111
  layouts: o
24108
24112
  } = ne().panels.panelsByIDs(e.panelIDs);
24109
- return /* @__PURE__ */ i(wT, { className: `dashboard-layout ${n}`, cols: 36, rowHeight: 1, margin: [0, 0], isDraggable: !1, isResizable: !1, layout: o, children: r.map((a) => /* @__PURE__ */ i("div", { "data-grid": {
24113
+ return /* @__PURE__ */ i(_T, { className: `dashboard-layout ${n}`, cols: 36, rowHeight: 1, margin: [0, 0], isDraggable: !1, isResizable: !1, layout: o, children: r.map((a) => /* @__PURE__ */ i("div", { "data-grid": {
24110
24114
  ...a.layout
24111
24115
  }, className: "panel-grid-item", children: /* @__PURE__ */ i(Ea, { view: e, panel: a }) }, a.id)) });
24112
- }), CT = D(({
24116
+ }), ST = D(({
24113
24117
  children: t
24114
- }) => /* @__PURE__ */ i(V, { pt: 10, pb: 100, children: t })), ST = D(({
24118
+ }) => /* @__PURE__ */ i(V, { pt: 10, pb: 100, children: t })), kT = D(({
24115
24119
  children: t,
24116
24120
  view: e
24117
24121
  }) => {
@@ -24134,7 +24138,7 @@ const bT = z.forwardRef(({
24134
24138
  maxHeight: "calc(100vh - 325px)"
24135
24139
  }
24136
24140
  }, withinPortal: !1, transitionDuration: 0, children: t });
24137
- }), kT = ({
24141
+ }), TT = ({
24138
24142
  variant: t,
24139
24143
  orientation: e
24140
24144
  }) => {
@@ -24151,11 +24155,11 @@ const bT = z.forwardRef(({
24151
24155
  marginLeft: "auto",
24152
24156
  marginRight: "auto"
24153
24157
  }), n;
24154
- }, TT = (t) => t.color ? {
24158
+ }, DT = (t) => t.color ? {
24155
24159
  "&[data-active], &[data-active]:hover": {
24156
24160
  borderColor: t.color ? t.color : "..."
24157
24161
  }
24158
- } : {}, DT = D(({
24162
+ } : {}, IT = D(({
24159
24163
  children: t,
24160
24164
  view: e
24161
24165
  }) => {
@@ -24175,9 +24179,9 @@ const bT = z.forwardRef(({
24175
24179
  zIndex: 320
24176
24180
  }), l = a.tabs.length === 0;
24177
24181
  return /* @__PURE__ */ h(V, { className: "preview-view-tabs", children: [
24178
- /* @__PURE__ */ h(g, { variant: a.variant, orientation: a.orientation, defaultValue: a.tabs.length > 0 ? a.tabs[0].id : "0", styles: kT(a), children: [
24182
+ /* @__PURE__ */ h(g, { variant: a.variant, orientation: a.orientation, defaultValue: a.tabs.length > 0 ? a.tabs[0].id : "0", styles: TT(a), children: [
24179
24183
  /* @__PURE__ */ h(g.List, { grow: a.grow, children: [
24180
- a.tabs.map((c) => /* @__PURE__ */ i(g.Tab, { value: c.id, sx: TT(c), children: c.name ?? c.id }, c.id)),
24184
+ a.tabs.map((c) => /* @__PURE__ */ i(g.Tab, { value: c.id, sx: DT(c), children: c.name ?? c.id }, c.id)),
24181
24185
  /* @__PURE__ */ i(g.Tab, { onClick: a.addTab, value: "add", className: "add-a-tab", children: /* @__PURE__ */ i(Ge, { size: 18, color: "#228be6" }) })
24182
24186
  ] }),
24183
24187
  a.tabs.map((c, d) => {
@@ -24218,35 +24222,35 @@ const bT = z.forwardRef(({
24218
24222
  ] }),
24219
24223
  t
24220
24224
  ] });
24221
- }), IT = D(({
24225
+ }), MT = D(({
24222
24226
  view: t,
24223
24227
  children: e
24224
24228
  }) => {
24225
24229
  switch (t.type) {
24226
24230
  case le.Modal:
24227
- return /* @__PURE__ */ i(ST, { view: t, children: e });
24231
+ return /* @__PURE__ */ i(kT, { view: t, children: e });
24228
24232
  case le.Tabs:
24229
- return /* @__PURE__ */ i(DT, { view: t, children: e });
24233
+ return /* @__PURE__ */ i(IT, { view: t, children: e });
24230
24234
  case le.Division:
24231
24235
  default:
24232
- return /* @__PURE__ */ i(CT, { children: e });
24236
+ return /* @__PURE__ */ i(ST, { children: e });
24233
24237
  }
24234
- }), MT = D(function({
24238
+ }), $T = D(function({
24235
24239
  view: e
24236
24240
  }) {
24237
24241
  return /* @__PURE__ */ i(Aa.Provider, { value: {
24238
24242
  viewPanelInFullScreen: T.noop,
24239
24243
  inFullScreen: !1
24240
- }, children: /* @__PURE__ */ i(V, { className: "dashboard-view", "data-enable-scrollbar": !0, children: /* @__PURE__ */ i(IT, { view: e, children: /* @__PURE__ */ h(V, { sx: {
24244
+ }, children: /* @__PURE__ */ i(V, { className: "dashboard-view", "data-enable-scrollbar": !0, children: /* @__PURE__ */ i(MT, { view: e, children: /* @__PURE__ */ h(V, { sx: {
24241
24245
  position: "relative"
24242
24246
  }, children: [
24243
24247
  /* @__PURE__ */ i(V, { className: "dashboard-sticky-area", sx: {
24244
24248
  position: "sticky",
24245
24249
  top: "0px"
24246
24250
  }, children: /* @__PURE__ */ i(Td, { view: e }) }),
24247
- /* @__PURE__ */ i(vT, { view: e })
24251
+ /* @__PURE__ */ i(wT, { view: e })
24248
24252
  ] }) }) }) });
24249
- }), $T = {
24253
+ }), zT = {
24250
24254
  modal: {
24251
24255
  display: "flex",
24252
24256
  flexDirection: "column",
@@ -24256,17 +24260,17 @@ const bT = z.forwardRef(({
24256
24260
  display: "flex",
24257
24261
  height: "calc(100vh - 88px)"
24258
24262
  }
24259
- }, zT = D(function({
24263
+ }, LT = D(function({
24260
24264
  view: e,
24261
24265
  panel: n,
24262
24266
  exitFullScreen: r
24263
24267
  }) {
24264
- return /* @__PURE__ */ i($e, { opened: !0, fullScreen: !0, onClose: r, title: /* @__PURE__ */ i(M, { color: "blue", size: "xs", onClick: r, leftIcon: /* @__PURE__ */ i(Ch, { size: 20 }), children: "Exit fullscreen" }), styles: $T, children: /* @__PURE__ */ i(w, { grow: !0, sx: {
24268
+ return /* @__PURE__ */ i($e, { opened: !0, fullScreen: !0, onClose: r, title: /* @__PURE__ */ i(M, { color: "blue", size: "xs", onClick: r, leftIcon: /* @__PURE__ */ i(Ch, { size: 20 }), children: "Exit fullscreen" }), styles: zT, children: /* @__PURE__ */ i(w, { grow: !0, sx: {
24265
24269
  flexGrow: 1,
24266
24270
  flexShrink: 0
24267
24271
  }, children: /* @__PURE__ */ i(Ea, { view: e, panel: n }) }) });
24268
24272
  });
24269
- function LT(t, e, n) {
24273
+ function AT(t, e, n) {
24270
24274
  const {
24271
24275
  panels: r
24272
24276
  } = ne(), o = t.id === "Main", [a, s] = z.useState(() => o && r.findByID(e) ? e : null), l = z.useCallback((u) => {
@@ -24281,9 +24285,9 @@ function LT(t, e, n) {
24281
24285
  fullScreenPanel: d
24282
24286
  };
24283
24287
  }
24284
- const AT = D(({
24288
+ const ET = D(({
24285
24289
  children: t
24286
- }) => /* @__PURE__ */ i(V, { children: t })), ET = D(({
24290
+ }) => /* @__PURE__ */ i(V, { children: t })), RT = D(({
24287
24291
  children: t,
24288
24292
  view: e
24289
24293
  }) => {
@@ -24299,11 +24303,11 @@ const AT = D(({
24299
24303
  overflow: "auto"
24300
24304
  }
24301
24305
  }, transitionDuration: 0, children: t });
24302
- }), RT = (t) => t.color ? {
24306
+ }), OT = (t) => t.color ? {
24303
24307
  "&[data-active], &[data-active]:hover": {
24304
24308
  borderColor: t.color ? t.color : "..."
24305
24309
  }
24306
- } : {}, OT = D(({
24310
+ } : {}, FT = D(({
24307
24311
  children: t,
24308
24312
  view: e
24309
24313
  }) => {
@@ -24314,7 +24318,7 @@ const AT = D(({
24314
24318
  padding: r.orientation === "horizontal" ? "16px 0px" : "0"
24315
24319
  }
24316
24320
  }, keepMounted: !1, children: [
24317
- /* @__PURE__ */ i(g.List, { grow: r.grow, children: r.tabs.map((o) => /* @__PURE__ */ i(g.Tab, { value: o.id, sx: RT(o), disabled: !o.view_id, children: o.name ?? o.id }, o.id)) }),
24321
+ /* @__PURE__ */ i(g.List, { grow: r.grow, children: r.tabs.map((o) => /* @__PURE__ */ i(g.Tab, { value: o.id, sx: OT(o), disabled: !o.view_id, children: o.name ?? o.id }, o.id)) }),
24318
24322
  r.tabs.map((o) => {
24319
24323
  const a = n.views.findByID(o.view_id);
24320
24324
  return a ? /* @__PURE__ */ i(g.Panel, { value: o.id, children: /* @__PURE__ */ i(Ra, { view: a }) }, o.id) : null;
@@ -24322,18 +24326,18 @@ const AT = D(({
24322
24326
  ] }),
24323
24327
  t
24324
24328
  ] });
24325
- }), FT = D(({
24329
+ }), PT = D(({
24326
24330
  view: t,
24327
24331
  children: e
24328
24332
  }) => {
24329
24333
  switch (t.type) {
24330
24334
  case le.Modal:
24331
- return /* @__PURE__ */ i(ET, { view: t, children: e });
24335
+ return /* @__PURE__ */ i(RT, { view: t, children: e });
24332
24336
  case le.Tabs:
24333
- return /* @__PURE__ */ i(OT, { view: t, children: e });
24337
+ return /* @__PURE__ */ i(FT, { view: t, children: e });
24334
24338
  case le.Division:
24335
24339
  default:
24336
- return /* @__PURE__ */ i(AT, { children: e });
24340
+ return /* @__PURE__ */ i(ET, { children: e });
24337
24341
  }
24338
24342
  }), Ra = D(function({
24339
24343
  view: e
@@ -24346,27 +24350,27 @@ const AT = D(({
24346
24350
  exitFullScreen: a,
24347
24351
  inFullScreen: s,
24348
24352
  fullScreenPanel: l
24349
- } = LT(e, n, r);
24353
+ } = AT(e, n, r);
24350
24354
  return /* @__PURE__ */ i(Aa.Provider, { value: {
24351
24355
  viewPanelInFullScreen: o,
24352
24356
  inFullScreen: s
24353
24357
  }, children: /* @__PURE__ */ h(V, { className: "dashboard-view", "data-enable-scrollbar": !0, children: [
24354
- s && /* @__PURE__ */ i(zT, { view: e, panel: l, exitFullScreen: a }),
24355
- /* @__PURE__ */ i(FT, { view: e, children: /* @__PURE__ */ h(V, { sx: {
24358
+ s && /* @__PURE__ */ i(LT, { view: e, panel: l, exitFullScreen: a }),
24359
+ /* @__PURE__ */ i(PT, { view: e, children: /* @__PURE__ */ h(V, { sx: {
24356
24360
  position: "relative"
24357
24361
  }, children: [
24358
24362
  !s && /* @__PURE__ */ i(V, { className: "dashboard-sticky-area", sx: {
24359
24363
  position: "sticky",
24360
24364
  top: "0px"
24361
24365
  }, children: /* @__PURE__ */ i(Td, { view: e }) }),
24362
- !s && /* @__PURE__ */ i(_T, { view: e })
24366
+ !s && /* @__PURE__ */ i(CT, { view: e })
24363
24367
  ] }) })
24364
24368
  ] }) });
24365
24369
  });
24366
24370
  function Ad(t) {
24367
24371
  return z.useCallback((e) => e.provideValue(qe.pluginManager, t.pluginManager).provideValue(qe.vizManager, t.vizManager).provideValue(qe.colorManager, t.colorManager), []);
24368
24372
  }
24369
- const PT = D(({
24373
+ const VT = D(({
24370
24374
  headerMenuItems: t = null
24371
24375
  }) => {
24372
24376
  const e = Le(), n = ne(), r = () => {
@@ -24381,7 +24385,7 @@ const PT = D(({
24381
24385
  t
24382
24386
  ] })
24383
24387
  ] });
24384
- }), VT = D(({
24388
+ }), NT = D(({
24385
24389
  saveDashboardChanges: t
24386
24390
  }) => {
24387
24391
  const e = jt(), n = ne(), r = () => {
@@ -24421,7 +24425,7 @@ const PT = D(({
24421
24425
  /* @__PURE__ */ i(He.Dropdown, { children: /* @__PURE__ */ i(He.Item, { icon: /* @__PURE__ */ i(bl, { size: 14, color: "red" }), disabled: !o, onClick: r, children: "Revert Changes" }) })
24422
24426
  ] })
24423
24427
  ] });
24424
- }), NT = D(({
24428
+ }), BT = D(({
24425
24429
  saveDashboardChanges: t,
24426
24430
  headerSlot: e = null,
24427
24431
  headerMenuItems: n
@@ -24459,16 +24463,16 @@ const PT = D(({
24459
24463
  "End Editing",
24460
24464
  /* @__PURE__ */ i(C, { td: "underline", children: o.name })
24461
24465
  ] }) }),
24462
- /* @__PURE__ */ i(VT, { saveDashboardChanges: t })
24466
+ /* @__PURE__ */ i(NT, { saveDashboardChanges: t })
24463
24467
  ] }),
24464
24468
  /* @__PURE__ */ h(w, { position: "right", sx: {
24465
24469
  flexGrow: 1
24466
24470
  }, children: [
24467
24471
  e,
24468
- /* @__PURE__ */ i(PT, { headerMenuItems: n })
24472
+ /* @__PURE__ */ i(VT, { headerMenuItems: n })
24469
24473
  ] })
24470
24474
  ] }) });
24471
- }), BT = {
24475
+ }), qT = {
24472
24476
  position: "fixed",
24473
24477
  top: 60,
24474
24478
  // height of mantine-header
@@ -24478,9 +24482,9 @@ const PT = D(({
24478
24482
  zIndex: 299,
24479
24483
  borderBottom: "1px solid #e9ecef",
24480
24484
  background: "rgba(233,236,239, 0.15)"
24481
- }, qT = D(() => {
24485
+ }, WT = D(() => {
24482
24486
  const t = ne();
24483
- return /* @__PURE__ */ i(V, { sx: BT, pl: {
24487
+ return /* @__PURE__ */ i(V, { sx: qT, pl: {
24484
24488
  base: 200,
24485
24489
  xs: 200,
24486
24490
  sm: 200,
@@ -24501,11 +24505,11 @@ const PT = D(({
24501
24505
  /* @__PURE__ */ i(V, {}),
24502
24506
  /* @__PURE__ */ i(V, {})
24503
24507
  ] }) });
24504
- }), WT = D((t) => /* @__PURE__ */ h(H, { children: [
24505
- /* @__PURE__ */ i(NT, { ...t }),
24506
- /* @__PURE__ */ i(qT, {})
24508
+ }), jT = D((t) => /* @__PURE__ */ h(H, { children: [
24509
+ /* @__PURE__ */ i(BT, { ...t }),
24510
+ /* @__PURE__ */ i(WT, {})
24507
24511
  ] }));
24508
- function jT(t, e, n) {
24512
+ function YT(t, e, n) {
24509
24513
  const r = [];
24510
24514
  return t.filter((o) => "__INTERACTIONS" in o.viz.conf).forEach((o, a) => {
24511
24515
  const s = e[o.id];
@@ -24567,21 +24571,21 @@ function jT(t, e, n) {
24567
24571
  });
24568
24572
  }), r;
24569
24573
  }
24570
- function YT(t, e) {
24574
+ function GT(t, e) {
24571
24575
  const n = t.filters.keyLabelMap;
24572
24576
  return {
24573
- edges: jT(t.panels.list, e, n),
24577
+ edges: YT(t.panels.list, e, n),
24574
24578
  edgeNodes: []
24575
24579
  };
24576
24580
  }
24577
24581
  function Ed(t, e, n) {
24578
24582
  return t * e + t * n;
24579
24583
  }
24580
- function GT(t, e, n) {
24584
+ function HT(t, e, n) {
24581
24585
  return t * e + (t - 1) * n;
24582
24586
  }
24583
- const Qr = 25, Oa = 40, Rd = 25, Fa = 350, HT = 150, QT = 150, Od = 150, Ws = 300, Vr = 40, Fd = 25, KT = 300;
24584
- function UT(t, e) {
24587
+ const Qr = 25, Oa = 40, Rd = 25, Fa = 350, QT = 150, KT = 150, Od = 150, Ws = 300, Vr = 40, Fd = 25, UT = 300;
24588
+ function XT(t, e) {
24585
24589
  const n = T.keyBy(e, (o) => o.id), r = [];
24586
24590
  return t.current.forEach((o, a) => {
24587
24591
  o.panelIDs.forEach((s, l) => {
@@ -24629,14 +24633,14 @@ function UT(t, e) {
24629
24633
  });
24630
24634
  }), r;
24631
24635
  }
24632
- const XT = {
24636
+ const JT = {
24633
24637
  [le.Division]: "Div",
24634
24638
  [le.Modal]: "Modal",
24635
24639
  [le.Tabs]: "Tabs"
24636
- }, JT = Mk;
24637
- function ZT(t) {
24640
+ }, ZT = Mk;
24641
+ function eD(t) {
24638
24642
  return t.current.map((n, r) => {
24639
- const o = GT(n.panelIDs.length, Vr, Fd) + Oa + Rd;
24643
+ const o = HT(n.panelIDs.length, Vr, Fd) + Oa + Rd;
24640
24644
  let a = [];
24641
24645
  return n.type === le.Tabs && (a = n.config.tabs.map((l) => l.view_id)), {
24642
24646
  id: n.id,
@@ -24646,7 +24650,7 @@ function ZT(t) {
24646
24650
  _sub_view_ids: [],
24647
24651
  _tab_view_ids: a,
24648
24652
  data: {
24649
- label: `${XT[n.type]}:${n.name}`
24653
+ label: `${JT[n.type]}:${n.name}`
24650
24654
  },
24651
24655
  position: {
24652
24656
  x: 0,
@@ -24656,14 +24660,14 @@ function ZT(t) {
24656
24660
  targetPosition: Ct.Left,
24657
24661
  className: "light",
24658
24662
  style: {
24659
- backgroundColor: JT[n.type],
24663
+ backgroundColor: ZT[n.type],
24660
24664
  width: Fa,
24661
24665
  height: o
24662
24666
  }
24663
24667
  };
24664
24668
  });
24665
24669
  }
24666
- function eD(t) {
24670
+ function tD(t) {
24667
24671
  const e = T.keyBy(t, (n) => n.id);
24668
24672
  t.forEach((n) => {
24669
24673
  n._node_type !== "view-root" || n._view_type !== le.Tabs || n._tab_view_ids.forEach((r) => {
@@ -24671,13 +24675,13 @@ function eD(t) {
24671
24675
  });
24672
24676
  });
24673
24677
  }
24674
- function tD(t) {
24675
- const e = ZT(t.views);
24676
- eD(e);
24677
- const n = UT(t.views, t.panels.list);
24678
+ function nD(t) {
24679
+ const e = eD(t.views);
24680
+ tD(e);
24681
+ const n = XT(t.views, t.panels.list);
24678
24682
  return [...e, ...n];
24679
24683
  }
24680
- function nD({
24684
+ function rD({
24681
24685
  nodeMap: t,
24682
24686
  nodes: e,
24683
24687
  edges: n
@@ -24691,7 +24695,7 @@ function nD({
24691
24695
  }, Oa));
24692
24696
  });
24693
24697
  }
24694
- function rD({
24698
+ function iD({
24695
24699
  nodeMap: t,
24696
24700
  nodes: e,
24697
24701
  edges: n
@@ -24704,7 +24708,7 @@ function rD({
24704
24708
  s._node_type !== "view-root" || a._node_type !== "view-root" || (a._view_level += 1 + s._view_level, s._sub_view_ids.push(a.id));
24705
24709
  }), e.sort((r, o) => r._node_type === "view-root" && o._node_type === "view-root" ? r._view_level - o._view_level : r._node_type !== "view-root" && o._node_type !== "view-root" ? 0 : r._node_type === "view-root" ? -1 : 1);
24706
24710
  }
24707
- function iD({
24711
+ function oD({
24708
24712
  nodeMap: t,
24709
24713
  nodes: e,
24710
24714
  edges: n
@@ -24716,13 +24720,13 @@ function iD({
24716
24720
  const a = t[o.source], s = t[o.target];
24717
24721
  if (a && s && a.parentNode) {
24718
24722
  const l = t[a.parentNode], c = l.position.x, d = Number(T.get(s, "style.height", 0)), p = Number(l.style.width);
24719
- s.position.x = c + p + KT, l._view_level === 0 && s._sub_view_ids.length === 0 && (a.sourcePosition = Ct.Left, s.targetPosition = Ct.Right, s.position.x *= -1);
24723
+ s.position.x = c + p + UT, l._view_level === 0 && s._sub_view_ids.length === 0 && (a.sourcePosition = Ct.Left, s.targetPosition = Ct.Right, s.position.x *= -1);
24720
24724
  const f = s.position.x, m = T.get(r, f, 0);
24721
24725
  s.position.y = m, r[f] = m + d + Od;
24722
24726
  }
24723
24727
  });
24724
24728
  }
24725
- function oD({
24729
+ function aD({
24726
24730
  nodeMap: t,
24727
24731
  nodes: e,
24728
24732
  edges: n
@@ -24731,10 +24735,10 @@ function oD({
24731
24735
  n.forEach((s) => {
24732
24736
  r.add(s.source), o.add(s.target);
24733
24737
  }), e.filter((s) => s._node_type !== "view-root" || s.id === "Main" || s.parentNode ? !1 : !r.has(s.id) && !o.has(s.id)).forEach((s, l) => {
24734
- s.position.x = Ed(l, Fa, QT), s.position.y = 0 - HT - Od;
24738
+ s.position.x = Ed(l, Fa, KT), s.position.y = 0 - QT - Od;
24735
24739
  });
24736
24740
  }
24737
- function aD({
24741
+ function sD({
24738
24742
  nodeMap: t,
24739
24743
  nodes: e,
24740
24744
  edges: n
@@ -24744,28 +24748,28 @@ function aD({
24744
24748
  nodes: e,
24745
24749
  edges: n
24746
24750
  };
24747
- return oD(r), rD(r), nD(r), iD(r), {
24751
+ return aD(r), iD(r), rD(r), oD(r), {
24748
24752
  nodes: e,
24749
24753
  edges: n
24750
24754
  };
24751
24755
  }
24752
- function sD(t) {
24753
- const e = tD(t), n = T.keyBy(e, (c) => c.id), {
24756
+ function lD(t) {
24757
+ const e = nD(t), n = T.keyBy(e, (c) => c.id), {
24754
24758
  edges: r,
24755
24759
  edgeNodes: o
24756
- } = YT(t, n), a = [...e, ...o], s = T.keyBy(a, (c) => c.id), l = {
24760
+ } = GT(t, n), a = [...e, ...o], s = T.keyBy(a, (c) => c.id), l = {
24757
24761
  edges: T.uniqBy(r, (c) => c.id),
24758
24762
  nodes: a,
24759
24763
  nodeMap: s
24760
24764
  };
24761
- return aD(l);
24765
+ return sD(l);
24762
24766
  }
24763
24767
  const Ni = {
24764
24768
  "builtin:op:open-link": /* @__PURE__ */ i(Ii, { color: "blue", size: 20, radius: "xl", children: /* @__PURE__ */ i(th, { size: 14 }) }),
24765
24769
  "builtin:op:set_filter_values": /* @__PURE__ */ i(Ii, { color: "orange", size: 20, radius: "xl", children: /* @__PURE__ */ i(nh, { size: 14 }) }),
24766
24770
  "builtin:op:clear_filter_values": /* @__PURE__ */ i(Ii, { color: "orange", size: 20, radius: "xl", children: /* @__PURE__ */ i(rh, { size: 14 }) })
24767
24771
  };
24768
- function lD(t) {
24772
+ function cD(t) {
24769
24773
  const e = [];
24770
24774
  return t.forEach((n) => {
24771
24775
  switch (n.schemaRef) {
@@ -24812,14 +24816,14 @@ function lD(t) {
24812
24816
  }
24813
24817
  }), e;
24814
24818
  }
24815
- const cD = pu(({
24819
+ const dD = pu(({
24816
24820
  data: t,
24817
24821
  isConnectable: e,
24818
24822
  sourcePosition: n = Ct.Right,
24819
24823
  targetPosition: r = Ct.Left,
24820
24824
  ...o
24821
24825
  }) => {
24822
- const a = $(() => lD(t.interactions), [t.interactions]);
24826
+ const a = $(() => cD(t.interactions), [t.interactions]);
24823
24827
  return /* @__PURE__ */ h(H, { children: [
24824
24828
  /* @__PURE__ */ i(ds, { type: "target", position: r, isConnectable: e }),
24825
24829
  /* @__PURE__ */ i(V, { sx: {
@@ -24834,19 +24838,19 @@ const cD = pu(({
24834
24838
  /* @__PURE__ */ i(ds, { type: "source", position: n, isConnectable: e })
24835
24839
  ] });
24836
24840
  });
24837
- const dD = {
24838
- interaction: cD
24839
- }, uD = D(() => {
24841
+ const uD = {
24842
+ interaction: dD
24843
+ }, hD = D(() => {
24840
24844
  const t = ne(), {
24841
24845
  edges: e,
24842
24846
  nodes: n
24843
- } = sD(t);
24844
- return /* @__PURE__ */ h(rp, { nodes: n, edges: e, onNodesChange: T.noop, onEdgesChange: T.noop, onConnect: T.noop, className: "interactions-viewer", fitView: !0, nodeTypes: dD, children: [
24847
+ } = lD(t);
24848
+ return /* @__PURE__ */ h(rp, { nodes: n, edges: e, onNodesChange: T.noop, onEdgesChange: T.noop, onConnect: T.noop, className: "interactions-viewer", fitView: !0, nodeTypes: uD, children: [
24845
24849
  /* @__PURE__ */ i(ip, {}),
24846
24850
  /* @__PURE__ */ i(op, {}),
24847
24851
  /* @__PURE__ */ i(ap, {})
24848
24852
  ] });
24849
- }), hD = D(({
24853
+ }), pD = D(({
24850
24854
  opened: t,
24851
24855
  close: e
24852
24856
  }) => {
@@ -24876,10 +24880,10 @@ const dD = {
24876
24880
  }
24877
24881
  },
24878
24882
  zIndex: 300,
24879
- children: /* @__PURE__ */ i(uD, {})
24883
+ children: /* @__PURE__ */ i(hD, {})
24880
24884
  }
24881
24885
  );
24882
- }), pD = {
24886
+ }), fD = {
24883
24887
  "> button": {
24884
24888
  "&:first-of-type": {
24885
24889
  borderTopRightRadius: 0,
@@ -24901,7 +24905,7 @@ const dD = {
24901
24905
  }
24902
24906
  }
24903
24907
  };
24904
- function fD({
24908
+ function mD({
24905
24909
  onClick: t,
24906
24910
  name: e,
24907
24911
  active: n,
@@ -24935,14 +24939,14 @@ function fD({
24935
24939
  }, children: /* @__PURE__ */ i(ih, { size: 16 }) }) })
24936
24940
  ] });
24937
24941
  }
24938
- const mD = D(() => {
24942
+ const gD = D(() => {
24939
24943
  const t = Le(), e = ne(), n = it((o) => () => e.views.setIDOfVIE(o), [e]), r = (o) => {
24940
24944
  t.editor.open(["_VIEWS_", o]);
24941
24945
  };
24942
24946
  return /* @__PURE__ */ h(V, { sx: {
24943
24947
  position: "relative"
24944
24948
  }, children: [
24945
- e.views.options.map((o) => /* @__PURE__ */ i(fD, { active: e.views.idOfVIE === o.value, name: o.label, onClick: n(o.value), openSettings: () => r(o.value) }, o.value)),
24949
+ e.views.options.map((o) => /* @__PURE__ */ i(mD, { active: e.views.idOfVIE === o.value, name: o.label, onClick: n(o.value), openSettings: () => r(o.value) }, o.value)),
24946
24950
  /* @__PURE__ */ i(E, { variant: "dashed" }),
24947
24951
  /* @__PURE__ */ i(M, { variant: "subtle", rightIcon: /* @__PURE__ */ i(on, { size: 14 }), size: "sm", px: "xs", color: "blue", onClick: e.views.addARandomNewView, sx: {
24948
24952
  width: "100%",
@@ -24953,7 +24957,7 @@ const mD = D(() => {
24953
24957
  }
24954
24958
  }, children: "Add a View" })
24955
24959
  ] });
24956
- }), gD = D(() => {
24960
+ }), bD = D(() => {
24957
24961
  const t = Le(), e = ne(), n = () => {
24958
24962
  if (!e.queries.firstID) {
24959
24963
  t.editor.open(["_QUERIES_", ""]);
@@ -24977,7 +24981,7 @@ const mD = D(() => {
24977
24981
  }, zIndex: 299, children: [
24978
24982
  /* @__PURE__ */ h(Nt.Section, { children: [
24979
24983
  /* @__PURE__ */ h(w, { grow: !0, spacing: 0, sx: {
24980
- ...pD,
24984
+ ...fD,
24981
24985
  button: {
24982
24986
  borderWidth: 0,
24983
24987
  borderBottomWidth: 1,
@@ -24994,7 +24998,7 @@ const mD = D(() => {
24994
24998
  height: "30px"
24995
24999
  }, onClick: s, children: /* @__PURE__ */ i(oh, { size: 20 }) }) })
24996
25000
  ] }),
24997
- /* @__PURE__ */ i(hD, { opened: o, close: l })
25001
+ /* @__PURE__ */ i(pD, { opened: o, close: l })
24998
25002
  ] }),
24999
25003
  /* @__PURE__ */ i(Nt.Section, { py: 5, sx: {
25000
25004
  borderBottom: "1px solid #eee"
@@ -25004,12 +25008,12 @@ const mD = D(() => {
25004
25008
  }, children: "Views" }) }),
25005
25009
  /* @__PURE__ */ i(Nt.Section, { grow: !0, sx: {
25006
25010
  overflow: "auto"
25007
- }, children: /* @__PURE__ */ i(mD, {}) }),
25011
+ }, children: /* @__PURE__ */ i(gD, {}) }),
25008
25012
  /* @__PURE__ */ i(Nt.Section, { children: /* @__PURE__ */ i(w, { grow: !0, p: "md", pt: "sm", sx: {
25009
25013
  borderTop: "1px solid #eee"
25010
25014
  }, children: /* @__PURE__ */ i(M, { size: "xs", leftIcon: /* @__PURE__ */ i(ah, { size: 20 }), onClick: () => t.editor.open([]), children: "Settings" }) }) })
25011
25015
  ] });
25012
- }), bD = D(function({
25016
+ }), yD = D(function({
25013
25017
  config: e
25014
25018
  }) {
25015
25019
  return /* @__PURE__ */ h(H, { children: [
@@ -25021,7 +25025,7 @@ const mD = D(() => {
25021
25025
  }
25022
25026
  } })
25023
25027
  ] });
25024
- }), yD = [{
25028
+ }), xD = [{
25025
25029
  label: "2022",
25026
25030
  value: "YYYY"
25027
25031
  }, {
@@ -25036,7 +25040,7 @@ const mD = D(() => {
25036
25040
  }, {
25037
25041
  label: "2022-01-01",
25038
25042
  value: "YYYY-MM-DD"
25039
- }], xD = D(function({
25043
+ }], vD = D(function({
25040
25044
  config: e
25041
25045
  }) {
25042
25046
  return /* @__PURE__ */ h(H, { children: [
@@ -25045,7 +25049,7 @@ const mD = D(() => {
25045
25049
  /* @__PURE__ */ i(ve, { checked: e.clearable, onChange: (n) => e.setClearable(n.currentTarget.checked), disabled: e.max_days > 0, label: "Clearable" }),
25046
25050
  /* @__PURE__ */ i(ve, { checked: e.allowSingleDateInRange, onChange: (n) => e.setAllowSingleDateInRange(n.currentTarget.checked), label: "Allow choosing 1 day" })
25047
25051
  ] }),
25048
- /* @__PURE__ */ i(P, { data: yD, label: "Display Format", value: e.inputFormat, onChange: e.setInputFormat }),
25052
+ /* @__PURE__ */ i(P, { data: xD, label: "Display Format", value: e.inputFormat, onChange: e.setInputFormat }),
25049
25053
  /* @__PURE__ */ i(
25050
25054
  Cd,
25051
25055
  {
@@ -25072,7 +25076,7 @@ const mD = D(() => {
25072
25076
  return /* @__PURE__ */ i(P, { label: "Pick a query", data: r, value: t, onChange: e, allowDeselect: !1, clearable: !0, sx: {
25073
25077
  flexGrow: 1
25074
25078
  }, disabled: o, error: o ? "You need to add a query in Data Settings" : void 0 });
25075
- }), vD = `
25079
+ }), wD = `
25076
25080
  // row
25077
25081
  {
25078
25082
  label: string;
@@ -25083,9 +25087,9 @@ const mD = D(() => {
25083
25087
  const [t, e] = U(!1);
25084
25088
  return /* @__PURE__ */ h(H, { children: [
25085
25089
  /* @__PURE__ */ i(M, { variant: "subtle", compact: !0, onClick: () => e((n) => !n), children: t ? "Close" : "Click to see expected data structure" }),
25086
- /* @__PURE__ */ i(Vo, { in: t, children: /* @__PURE__ */ i(wn, { language: "typescript", noCopy: !0, colorScheme: "dark", children: vD }) })
25090
+ /* @__PURE__ */ i(Vo, { in: t, children: /* @__PURE__ */ i(wn, { language: "typescript", noCopy: !0, colorScheme: "dark", children: wD }) })
25087
25091
  ] });
25088
- }, wD = D(function({
25092
+ }, _D = D(function({
25089
25093
  config: e
25090
25094
  }) {
25091
25095
  const n = () => {
@@ -25146,7 +25150,7 @@ const mD = D(() => {
25146
25150
  /* @__PURE__ */ i(Pa, { value: e.options_query_id, onChange: e.setOptionsQueryID }),
25147
25151
  /* @__PURE__ */ i(Pd, {})
25148
25152
  ] });
25149
- }), _D = D(function({
25153
+ }), CD = D(function({
25150
25154
  config: e
25151
25155
  }) {
25152
25156
  const n = () => {
@@ -25211,7 +25215,7 @@ const mD = D(() => {
25211
25215
  /* @__PURE__ */ i(Pa, { value: e.options_query_id, onChange: e.setOptionsQueryID }),
25212
25216
  /* @__PURE__ */ i(Pd, {})
25213
25217
  ] });
25214
- }), CD = D(function({
25218
+ }), SD = D(function({
25215
25219
  config: e
25216
25220
  }) {
25217
25221
  return /* @__PURE__ */ h(H, { children: [
@@ -25220,7 +25224,7 @@ const mD = D(() => {
25220
25224
  } }),
25221
25225
  /* @__PURE__ */ i(ve, { checked: e.required, onChange: (n) => e.setRequired(n.currentTarget.checked), label: "Required" })
25222
25226
  ] });
25223
- }), SD = `
25227
+ }), kD = `
25224
25228
  // row
25225
25229
  {
25226
25230
  label: string;
@@ -25228,13 +25232,13 @@ const mD = D(() => {
25228
25232
  parent_value: string;
25229
25233
  description?: string;
25230
25234
  }
25231
- `, kD = () => {
25235
+ `, TD = () => {
25232
25236
  const [t, e] = U(!1);
25233
25237
  return /* @__PURE__ */ h(H, { children: [
25234
25238
  /* @__PURE__ */ i(M, { variant: "subtle", compact: !0, onClick: () => e((n) => !n), children: t ? "Close" : "Click to see expected data structure" }),
25235
- /* @__PURE__ */ i(Vo, { in: t, children: /* @__PURE__ */ i(wn, { language: "typescript", noCopy: !0, colorScheme: "dark", children: SD }) })
25239
+ /* @__PURE__ */ i(Vo, { in: t, children: /* @__PURE__ */ i(wn, { language: "typescript", noCopy: !0, colorScheme: "dark", children: kD }) })
25236
25240
  ] });
25237
- }, TD = D(function({
25241
+ }, DD = D(function({
25238
25242
  config: e
25239
25243
  }) {
25240
25244
  return /* @__PURE__ */ h(H, { children: [
@@ -25242,9 +25246,9 @@ const mD = D(() => {
25242
25246
  /* @__PURE__ */ i(E, { label: "Fetch options from database", labelPosition: "center" }),
25243
25247
  /* @__PURE__ */ i(ae, { value: e.default_selection_count, onChange: e.setDefaultSelectionCount, label: "Select first N options by default" }),
25244
25248
  /* @__PURE__ */ i(Pa, { value: e.options_query_id, onChange: e.setOptionsQueryID }),
25245
- /* @__PURE__ */ i(kD, {})
25249
+ /* @__PURE__ */ i(TD, {})
25246
25250
  ] });
25247
- }), DD = D(function({
25251
+ }), ID = D(function({
25248
25252
  filter: e
25249
25253
  }) {
25250
25254
  const [n, r] = z.useState(e.plainDefaultValue);
@@ -25258,14 +25262,14 @@ const mD = D(() => {
25258
25262
  /* @__PURE__ */ i(C, { pt: "lg", pb: "md", color: "gray", children: "Config" }),
25259
25263
  /* @__PURE__ */ i(wn, { language: "json", colorScheme: "dark", noCopy: !0, children: JSON.stringify(e, null, 4) })
25260
25264
  ] });
25261
- }), ID = {
25262
- select: _D,
25263
- "multi-select": wD,
25264
- "tree-select": TD,
25265
- "text-input": CD,
25266
- checkbox: bD,
25267
- "date-range": xD
25268
- }, MD = [{
25265
+ }), MD = {
25266
+ select: CD,
25267
+ "multi-select": _D,
25268
+ "tree-select": DD,
25269
+ "text-input": SD,
25270
+ checkbox: yD,
25271
+ "date-range": vD
25272
+ }, $D = [{
25269
25273
  label: "Select",
25270
25274
  value: "select"
25271
25275
  }, {
@@ -25283,10 +25287,10 @@ const mD = D(() => {
25283
25287
  }, {
25284
25288
  label: "Date Range",
25285
25289
  value: "date-range"
25286
- }], $D = D(function({
25290
+ }], zD = D(function({
25287
25291
  filter: e
25288
25292
  }) {
25289
- const n = ne(), r = z.useMemo(() => ID[e.type], [e.type]);
25293
+ const n = ne(), r = z.useMemo(() => MD[e.type], [e.type]);
25290
25294
  return /* @__PURE__ */ h(w, { grow: !0, spacing: 20, align: "top", children: [
25291
25295
  /* @__PURE__ */ h(V, { sx: {
25292
25296
  maxWidth: "600px"
@@ -25316,13 +25320,13 @@ const mD = D(() => {
25316
25320
  /* @__PURE__ */ i(A, { label: "Label", placeholder: "Label for this field", required: !0, value: e.label, onChange: (o) => {
25317
25321
  e.setLabel(o.currentTarget.value);
25318
25322
  } }),
25319
- /* @__PURE__ */ i(P, { label: "Widget", data: MD, required: !0, value: e.type, onChange: e.setType }),
25323
+ /* @__PURE__ */ i(P, { label: "Widget", data: $D, required: !0, value: e.type, onChange: e.setType }),
25320
25324
  /* @__PURE__ */ i(r, { config: e.config })
25321
25325
  ] })
25322
25326
  ] }),
25323
- /* @__PURE__ */ i(DD, { filter: e })
25327
+ /* @__PURE__ */ i(ID, { filter: e })
25324
25328
  ] });
25325
- }), zD = D(({
25329
+ }), LD = D(({
25326
25330
  id: t
25327
25331
  }) => {
25328
25332
  const e = jt(), n = Le(), r = ne();
@@ -25363,9 +25367,9 @@ const mD = D(() => {
25363
25367
  flexGrow: 1,
25364
25368
  maxHeight: "calc(100% - 52px)",
25365
25369
  overflow: "auto"
25366
- }, children: /* @__PURE__ */ i($D, { filter: o }) })
25370
+ }, children: /* @__PURE__ */ i(zD, { filter: o }) })
25367
25371
  ] });
25368
- }), LD = D(() => {
25372
+ }), AD = D(() => {
25369
25373
  const t = ne(), [e, n] = U(() => JSON.stringify(t.mock_context.current, null, 4)), r = () => {
25370
25374
  try {
25371
25375
  t.mock_context.replace(JSON.parse(e));
@@ -25416,7 +25420,7 @@ const mD = D(() => {
25416
25420
  }, disabled: !o, onClick: r, children: /* @__PURE__ */ i(we, { size: 20 }) })
25417
25421
  ] })
25418
25422
  ] });
25419
- }), AD = D(() => {
25423
+ }), ED = D(() => {
25420
25424
  const {
25421
25425
  panel: t
25422
25426
  } = Je();
@@ -25425,14 +25429,14 @@ const mD = D(() => {
25425
25429
  flexGrow: 1
25426
25430
  }
25427
25431
  } });
25428
- }), ED = D(() => {
25432
+ }), RD = D(() => {
25429
25433
  const {
25430
25434
  panel: t
25431
25435
  } = Je(), {
25432
25436
  style: e
25433
25437
  } = t;
25434
25438
  return /* @__PURE__ */ i(H, { children: /* @__PURE__ */ i(tt, { label: "Border", checked: e.border.enabled, onChange: (n) => e.border.setEnabled(n.currentTarget.checked) }) });
25435
- }), RD = D(() => {
25439
+ }), OD = D(() => {
25436
25440
  const {
25437
25441
  panel: t
25438
25442
  } = Je(), {
@@ -25453,18 +25457,18 @@ const mD = D(() => {
25453
25457
  }
25454
25458
  } });
25455
25459
  });
25456
- function OD() {
25460
+ function FD() {
25457
25461
  return /* @__PURE__ */ h(S, { sx: {
25458
25462
  height: "100%"
25459
25463
  }, children: [
25460
25464
  /* @__PURE__ */ i(E, { label: "Style", labelPosition: "center", variant: "dashed" }),
25461
- /* @__PURE__ */ i(ED, {}),
25462
- /* @__PURE__ */ i(E, { label: "Info", labelPosition: "center", variant: "dashed" }),
25463
25465
  /* @__PURE__ */ i(RD, {}),
25464
- /* @__PURE__ */ i(AD, {})
25466
+ /* @__PURE__ */ i(E, { label: "Info", labelPosition: "center", variant: "dashed" }),
25467
+ /* @__PURE__ */ i(OD, {}),
25468
+ /* @__PURE__ */ i(ED, {})
25465
25469
  ] });
25466
25470
  }
25467
- const FD = ({
25471
+ const PD = ({
25468
25472
  queryID: t
25469
25473
  }) => {
25470
25474
  const e = ne(), {
@@ -25474,7 +25478,7 @@ const FD = ({
25474
25478
  return n === "loading" ? null : r ? /* @__PURE__ */ i(C, { color: "red", size: "md", align: "center", sx: {
25475
25479
  fontFamily: "monospace"
25476
25480
  }, children: r }) : o != null && o.stateMessage ? /* @__PURE__ */ i(C, { color: "gray", align: "center", children: o.stateMessage }) : null;
25477
- }, PD = {
25481
+ }, VD = {
25478
25482
  width: "fit-content",
25479
25483
  minWidth: "100%",
25480
25484
  tableLayout: "fixed",
@@ -25525,7 +25529,7 @@ function Vd({
25525
25529
  });
25526
25530
  return t.length === 0 ? /* @__PURE__ */ i(V, { sx: {
25527
25531
  height: "5em"
25528
- } }) : /* @__PURE__ */ i(ct, { children: /* @__PURE__ */ h(Rt, { sx: PD, children: [
25532
+ } }) : /* @__PURE__ */ i(ct, { children: /* @__PURE__ */ h(Rt, { sx: VD, children: [
25529
25533
  /* @__PURE__ */ i("thead", { children: n.getHeaderGroups().map((r) => /* @__PURE__ */ i("tr", { children: r.headers.map((o) => /* @__PURE__ */ h("th", { style: {
25530
25534
  width: o.getSize()
25531
25535
  }, children: [
@@ -25572,11 +25576,11 @@ const to = D(function({
25572
25576
  overflow: "auto"
25573
25577
  }, children: [
25574
25578
  /* @__PURE__ */ i(_n, { visible: s }),
25575
- /* @__PURE__ */ i(FD, { queryID: e }),
25579
+ /* @__PURE__ */ i(PD, { queryID: e }),
25576
25580
  /* @__PURE__ */ i(Vd, { data: d })
25577
25581
  ] })
25578
25582
  ] });
25579
- }), VD = D(function() {
25583
+ }), ND = D(function() {
25580
25584
  const e = Le(), n = ne(), {
25581
25585
  panel: r
25582
25586
  } = Je(), [o, a] = U(!1), s = (l) => {
@@ -25593,7 +25597,7 @@ const to = D(function({
25593
25597
  ] })
25594
25598
  ] })
25595
25599
  ] });
25596
- }), ND = D(() => {
25600
+ }), BD = D(() => {
25597
25601
  const {
25598
25602
  panel: t
25599
25603
  } = Je();
@@ -25644,7 +25648,7 @@ const to = D(function({
25644
25648
  average: !1
25645
25649
  }
25646
25650
  };
25647
- class BD {
25651
+ class qD {
25648
25652
  constructor(e) {
25649
25653
  Y(this, "panel");
25650
25654
  Y(this, "selected");
@@ -25675,11 +25679,11 @@ class BD {
25675
25679
  }
25676
25680
  }
25677
25681
  }
25678
- function qD() {
25682
+ function WD() {
25679
25683
  const {
25680
25684
  panel: t
25681
25685
  } = Je();
25682
- return kt(() => new BD(t), [t]);
25686
+ return kt(() => new qD(t), [t]);
25683
25687
  }
25684
25688
  const Nd = Nn((t) => ({
25685
25689
  root: {
@@ -25711,7 +25715,7 @@ const Nd = Nn((t) => ({
25711
25715
  overflow: "auto",
25712
25716
  paddingRight: 10
25713
25717
  }
25714
- })), WD = z.forwardRef(function({
25718
+ })), jD = z.forwardRef(function({
25715
25719
  value: e,
25716
25720
  onChange: n,
25717
25721
  data: r,
@@ -25731,18 +25735,18 @@ const Nd = Nn((t) => ({
25731
25735
  /* @__PURE__ */ i(Dt, { value: e.formatter, onChange: (l) => s("formatter", l) }),
25732
25736
  o && /* @__PURE__ */ i(wc, { value: e, onChange: n })
25733
25737
  ] });
25734
- }), jD = (t) => {
25738
+ }), YD = (t) => {
25735
25739
  const {
25736
25740
  uiModel: e
25737
25741
  } = t;
25738
25742
  return /* @__PURE__ */ i(S, { className: "var-list", children: e.variables.map((n) => /* @__PURE__ */ i(M, { variant: e.selected === n ? "filled" : "subtle", color: "gray", onClick: () => e.select(n), children: n.name }, n.name)) });
25739
- }, YD = D(jD), GD = ({
25743
+ }, GD = D(YD), HD = ({
25740
25744
  variable: t,
25741
25745
  data: e
25742
25746
  }) => /* @__PURE__ */ i(w, { style: {
25743
25747
  minHeight: 0,
25744
25748
  height: "calc(100% - 68px)"
25745
- }, children: /* @__PURE__ */ i(Fo, { withBorder: !0, p: "md", children: _c(t, e) }) }), HD = D(GD), QD = (t) => {
25749
+ }, children: /* @__PURE__ */ i(Fo, { withBorder: !0, p: "md", children: _c(t, e) }) }), QD = D(HD), KD = (t) => {
25746
25750
  const e = kt(() => rf(t.variable), [t.variable]), {
25747
25751
  classes: n
25748
25752
  } = Nd(), {
@@ -25756,23 +25760,23 @@ const Nd = Nn((t) => ({
25756
25760
  /* @__PURE__ */ i(K, { variant: "filled", disabled: !e.changed, color: "primary", onClick: e.commit, children: /* @__PURE__ */ i(Sn, { size: 18 }) }),
25757
25761
  /* @__PURE__ */ i(K, { color: "red", onClick: () => t.uiModel.remove(t.variable), children: /* @__PURE__ */ i(Pn, { size: 18 }) })
25758
25762
  ] }),
25759
- /* @__PURE__ */ i(WD, { value: zt(e.copy), onChange: e.update, data: r })
25763
+ /* @__PURE__ */ i(jD, { value: zt(e.copy), onChange: e.update, data: r })
25760
25764
  ] }),
25761
- /* @__PURE__ */ i(HD, { variable: zt(e.copy), data: r })
25765
+ /* @__PURE__ */ i(QD, { variable: zt(e.copy), data: r })
25762
25766
  ] });
25763
- }, KD = D(QD), UD = () => {
25764
- const t = qD(), {
25767
+ }, UD = D(KD), XD = () => {
25768
+ const t = WD(), {
25765
25769
  classes: e
25766
25770
  } = Nd();
25767
25771
  return /* @__PURE__ */ h(w, { className: e.root, noWrap: !0, align: "start", children: [
25768
25772
  /* @__PURE__ */ i(Fo, { withBorder: !0, p: "md", className: "var-list-container", children: /* @__PURE__ */ h(S, { justify: "space-between", children: [
25769
25773
  /* @__PURE__ */ i(V, { className: "var-list-actions", children: /* @__PURE__ */ i(M, { variant: "light", size: "sm", onClick: t.addNew, fullWidth: !0, children: "Add Variable" }) }),
25770
- /* @__PURE__ */ i(YD, { uiModel: t })
25774
+ /* @__PURE__ */ i(GD, { uiModel: t })
25771
25775
  ] }) }),
25772
- t.selected ? /* @__PURE__ */ i(H, { children: /* @__PURE__ */ i(KD, { uiModel: t, variable: t.selected }) }) : /* @__PURE__ */ i("span", { children: "Select or create a new variable on right side" })
25776
+ t.selected ? /* @__PURE__ */ i(H, { children: /* @__PURE__ */ i(UD, { uiModel: t, variable: t.selected }) }) : /* @__PURE__ */ i("span", { children: "Select or create a new variable on right side" })
25773
25777
  ] });
25774
- }, XD = D(UD);
25775
- function JD() {
25778
+ }, JD = D(XD);
25779
+ function ZD() {
25776
25780
  const {
25777
25781
  vizManager: t
25778
25782
  } = Et(Ft);
@@ -25785,7 +25789,7 @@ function JD() {
25785
25789
  return T.orderBy(e, [(n) => n.group, (n) => n.label], ["asc", "asc"]);
25786
25790
  }, [t]);
25787
25791
  }
25788
- const ZD = D(({
25792
+ const eI = D(({
25789
25793
  value: t,
25790
25794
  submit: e
25791
25795
  }) => {
@@ -25793,17 +25797,17 @@ const ZD = D(({
25793
25797
  W(() => {
25794
25798
  r(t);
25795
25799
  }, [t]);
25796
- const o = JD();
25800
+ const o = ZD();
25797
25801
  return /* @__PURE__ */ i(P, { label: "Visualization", value: n, searchable: !0, onChange: r, data: o, rightSection: /* @__PURE__ */ i(K, { disabled: !(t !== n), onClick: () => e(n), children: /* @__PURE__ */ i(we, { size: 20 }) }), maxDropdownHeight: 600 });
25798
25802
  }), js = [];
25799
- function eI(t, e) {
25803
+ function tI(t, e) {
25800
25804
  try {
25801
25805
  return t.resolveComponent(e).createConfig();
25802
25806
  } catch {
25803
25807
  return null;
25804
25808
  }
25805
25809
  }
25806
- function tI() {
25810
+ function nI() {
25807
25811
  const {
25808
25812
  data: t,
25809
25813
  panel: {
@@ -25838,7 +25842,7 @@ function tI() {
25838
25842
  return console.info(ce(x, "message")), null;
25839
25843
  }
25840
25844
  }
25841
- const nI = D(() => {
25845
+ const rI = D(() => {
25842
25846
  const {
25843
25847
  data: t,
25844
25848
  panel: {
@@ -25849,7 +25853,7 @@ const nI = D(() => {
25849
25853
  } = Et(Ft), r = z.useCallback((d) => {
25850
25854
  if (d === e.type)
25851
25855
  return;
25852
- const p = eI(n, d);
25856
+ const p = tI(n, d);
25853
25857
  e.setType(d), e.setConf(p || {});
25854
25858
  }, [e.type]), o = (d) => {
25855
25859
  try {
@@ -25860,7 +25864,7 @@ const nI = D(() => {
25860
25864
  }, a = z.useMemo(() => {
25861
25865
  var d;
25862
25866
  return (d = js.find((p) => p.value === e.type)) == null ? void 0 : d.Panel;
25863
- }, [e.type, js]), s = tI(), l = a ? Ur(a, {
25867
+ }, [e.type, js]), s = nI(), l = a ? Ur(a, {
25864
25868
  data: t,
25865
25869
  conf: e.conf,
25866
25870
  setConf: e.setConf
@@ -25869,7 +25873,7 @@ const nI = D(() => {
25869
25873
  height: "100%",
25870
25874
  overflow: "hidden"
25871
25875
  }, children: [
25872
- /* @__PURE__ */ i(ZD, { submit: r, value: e.type }),
25876
+ /* @__PURE__ */ i(eI, { submit: r, value: e.type }),
25873
25877
  /* @__PURE__ */ h(ct, { children: [
25874
25878
  /* @__PURE__ */ i(S, { pb: 10, sx: {
25875
25879
  flexGrow: 1,
@@ -25879,7 +25883,7 @@ const nI = D(() => {
25879
25883
  !c && /* @__PURE__ */ i(el, { minRows: 20, label: "Config", value: JSON.stringify(e.conf, null, 2), onChange: o })
25880
25884
  ] })
25881
25885
  ] });
25882
- }), rI = D(({
25886
+ }), iI = D(({
25883
25887
  panel: t,
25884
25888
  sourceViewID: e
25885
25889
  }) => {
@@ -25913,7 +25917,7 @@ const nI = D(() => {
25913
25917
  ] })
25914
25918
  ] }) })
25915
25919
  ] });
25916
- }), iI = {
25920
+ }), oI = {
25917
25921
  root: {
25918
25922
  flexGrow: 1,
25919
25923
  width: "100%",
@@ -25936,15 +25940,15 @@ const nI = D(() => {
25936
25940
  height: "100%",
25937
25941
  overflow: "auto"
25938
25942
  }, children: t }),
25939
- /* @__PURE__ */ i(ND, {})
25943
+ /* @__PURE__ */ i(BD, {})
25940
25944
  ] });
25941
- function oI(t) {
25945
+ function aI(t) {
25942
25946
  return !["richText", "button"].includes(t);
25943
25947
  }
25944
- const aI = D(({
25948
+ const sI = D(({
25945
25949
  panel: t
25946
25950
  }) => {
25947
- const e = jt(), n = Le(), r = ne(), [o, a] = U("Data"), s = t.queries, c = oI(t.viz.type) && t.dataLoading, d = c || t.queryErrors.length > 0 || t.queryStateMessages.length > 0 || s.length === 0, p = n.editor.path[1];
25951
+ const e = jt(), n = Le(), r = ne(), [o, a] = U("Data"), s = t.queries, c = aI(t.viz.type) && t.dataLoading, d = c || t.queryErrors.length > 0 || t.queryStateMessages.length > 0 || s.length === 0, p = n.editor.path[1];
25948
25952
  W(() => {
25949
25953
  a((m) => d && m === "Visualization" ? "Data" : m);
25950
25954
  }, [t.id, d]);
@@ -25979,11 +25983,11 @@ const aI = D(({
25979
25983
  " "
25980
25984
  ] }),
25981
25985
  /* @__PURE__ */ h(w, { position: "right", noWrap: !0, children: [
25982
- /* @__PURE__ */ i(rI, { panel: t, sourceViewID: p }),
25986
+ /* @__PURE__ */ i(iI, { panel: t, sourceViewID: p }),
25983
25987
  /* @__PURE__ */ i(M, { size: "xs", variant: "subtle", color: "red", onClick: f, leftIcon: /* @__PURE__ */ i(Pn, { size: 14 }), children: "Delete This Panel" })
25984
25988
  ] })
25985
25989
  ] }),
25986
- /* @__PURE__ */ h(g, { value: o, onTabChange: a, keepMounted: !1, styles: iI, children: [
25990
+ /* @__PURE__ */ h(g, { value: o, onTabChange: a, keepMounted: !1, styles: oI, children: [
25987
25991
  /* @__PURE__ */ h(g.List, { children: [
25988
25992
  /* @__PURE__ */ i(g.Tab, { value: "Data", disabled: c, children: "Data" }),
25989
25993
  /* @__PURE__ */ i(g.Tab, { value: "Panel", children: "Panel" }),
@@ -25993,15 +25997,15 @@ const aI = D(({
25993
25997
  ] }),
25994
25998
  /* @__PURE__ */ h(g.Panel, { value: "Data", children: [
25995
25999
  /* @__PURE__ */ i(_n, { visible: c, exitTransitionDuration: 0 }),
25996
- /* @__PURE__ */ i(VD, {})
26000
+ /* @__PURE__ */ i(ND, {})
25997
26001
  ] }),
25998
- /* @__PURE__ */ i(g.Panel, { value: "Panel", children: /* @__PURE__ */ i(Ys, { children: /* @__PURE__ */ i(OD, {}) }) }),
25999
- /* @__PURE__ */ i(g.Panel, { value: "Variables", children: /* @__PURE__ */ i(XD, {}) }),
26000
- /* @__PURE__ */ i(g.Panel, { value: "Visualization", children: /* @__PURE__ */ i(ct, { children: /* @__PURE__ */ i(Ys, { children: /* @__PURE__ */ i(nI, {}) }) }) }),
26002
+ /* @__PURE__ */ i(g.Panel, { value: "Panel", children: /* @__PURE__ */ i(Ys, { children: /* @__PURE__ */ i(FD, {}) }) }),
26003
+ /* @__PURE__ */ i(g.Panel, { value: "Variables", children: /* @__PURE__ */ i(JD, {}) }),
26004
+ /* @__PURE__ */ i(g.Panel, { value: "Visualization", children: /* @__PURE__ */ i(ct, { children: /* @__PURE__ */ i(Ys, { children: /* @__PURE__ */ i(rI, {}) }) }) }),
26001
26005
  /* @__PURE__ */ i(g.Panel, { value: "Interactions", children: /* @__PURE__ */ i(ct, { children: /* @__PURE__ */ i(Kf, {}) }) })
26002
26006
  ] })
26003
26007
  ] });
26004
- }), sI = D(({
26008
+ }), lI = D(({
26005
26009
  viewID: t,
26006
26010
  panelID: e
26007
26011
  }) => {
@@ -26013,7 +26017,7 @@ const aI = D(({
26013
26017
  "] is not found"
26014
26018
  ] });
26015
26019
  const o = n.panels.findByID(e);
26016
- return o ? /* @__PURE__ */ i(aI, { panel: o }) : /* @__PURE__ */ h(C, { size: 14, children: [
26020
+ return o ? /* @__PURE__ */ i(sI, { panel: o }) : /* @__PURE__ */ h(C, { size: 14, children: [
26017
26021
  "Panel by ID[",
26018
26022
  e,
26019
26023
  "] is not found"
@@ -26030,7 +26034,7 @@ const aI = D(({
26030
26034
  /* @__PURE__ */ i(rs, { width: e, height: n, radius: "xs" })
26031
26035
  ] }), or = ({
26032
26036
  value: t
26033
- }) => t === null || t === "" ? null : /* @__PURE__ */ i(Re, { label: t, disabled: !t, multiline: !0, children: /* @__PURE__ */ i(K, { children: /* @__PURE__ */ i(Bn, { size: 14 }) }) }), lI = ({
26037
+ }) => t === null || t === "" ? null : /* @__PURE__ */ i(Re, { label: t, disabled: !t, multiline: !0, children: /* @__PURE__ */ i(K, { children: /* @__PURE__ */ i(Bn, { size: 14 }) }) }), cI = ({
26034
26038
  column: t
26035
26039
  }) => {
26036
26040
  const {
@@ -26038,7 +26042,7 @@ const aI = D(({
26038
26042
  column_key_text: n
26039
26043
  } = t;
26040
26044
  return e ? /* @__PURE__ */ i(Re, { label: n, disabled: !n, children: /* @__PURE__ */ i(sr, { children: e }) }) : null;
26041
- }, cI = D(({
26045
+ }, dI = D(({
26042
26046
  dataSource: t
26043
26047
  }) => {
26044
26048
  const {
@@ -26092,13 +26096,13 @@ const aI = D(({
26092
26096
  /* @__PURE__ */ i("td", { children: n.ordinal_position }),
26093
26097
  /* @__PURE__ */ i("td", { children: n.column_name }),
26094
26098
  /* @__PURE__ */ i("td", { children: /* @__PURE__ */ i(or, { value: n.column_comment }) }),
26095
- /* @__PURE__ */ i("td", { children: /* @__PURE__ */ i(lI, { column: n }) }),
26099
+ /* @__PURE__ */ i("td", { children: /* @__PURE__ */ i(cI, { column: n }) }),
26096
26100
  /* @__PURE__ */ i("td", { children: n.column_type }),
26097
26101
  /* @__PURE__ */ i("td", { children: n.is_nullable }),
26098
26102
  /* @__PURE__ */ i("td", { children: /* @__PURE__ */ i(or, { value: n.column_default }) })
26099
26103
  ] }, n.column_name)) })
26100
26104
  ] });
26101
- }), dI = D(({
26105
+ }), uI = D(({
26102
26106
  dataSource: t
26103
26107
  }) => {
26104
26108
  const {
@@ -26146,7 +26150,7 @@ const aI = D(({
26146
26150
  /* @__PURE__ */ i("td", { children: r.column_name })
26147
26151
  ] }, r.index_name)) })
26148
26152
  ] });
26149
- }), uI = D(({
26153
+ }), hI = D(({
26150
26154
  dataSource: t
26151
26155
  }) => {
26152
26156
  const {
@@ -26199,29 +26203,29 @@ const aI = D(({
26199
26203
  /* @__PURE__ */ i("td", { children: /* @__PURE__ */ i(or, { value: r.comment }) })
26200
26204
  ] }, r.index_name)) })
26201
26205
  ] });
26202
- }), hI = D(({
26206
+ }), pI = D(({
26203
26207
  dataSource: t
26204
26208
  }) => {
26205
26209
  const {
26206
26210
  indexes: e
26207
26211
  } = t;
26208
- return e.loading || e.empty ? null : t.type === Me.MySQL ? /* @__PURE__ */ i(dI, { dataSource: t }) : t.type === Me.Postgresql ? /* @__PURE__ */ i(uI, { dataSource: t }) : null;
26209
- }), pI = D(({
26212
+ return e.loading || e.empty ? null : t.type === Me.MySQL ? /* @__PURE__ */ i(uI, { dataSource: t }) : t.type === Me.Postgresql ? /* @__PURE__ */ i(hI, { dataSource: t }) : null;
26213
+ }), fI = D(({
26210
26214
  dataSource: t
26211
26215
  }) => /* @__PURE__ */ h(S, { spacing: 40, pt: 10, sx: {
26212
26216
  flexGrow: 1,
26213
26217
  overflow: "auto",
26214
26218
  position: "relative"
26215
26219
  }, children: [
26216
- /* @__PURE__ */ i(ct, { children: /* @__PURE__ */ i(cI, { dataSource: t }) }),
26217
- /* @__PURE__ */ i(ct, { children: /* @__PURE__ */ i(hI, { dataSource: t }) })
26220
+ /* @__PURE__ */ i(ct, { children: /* @__PURE__ */ i(dI, { dataSource: t }) }),
26221
+ /* @__PURE__ */ i(ct, { children: /* @__PURE__ */ i(pI, { dataSource: t }) })
26218
26222
  ] }));
26219
- function fI({
26223
+ function mI({
26220
26224
  table_type: t
26221
26225
  }) {
26222
26226
  return t === "VIEW" ? /* @__PURE__ */ i(vl, { size: 14 }) : t === "BASE TABLE" ? /* @__PURE__ */ i(lh, { size: 14 }) : null;
26223
26227
  }
26224
- const mI = D(({
26228
+ const gI = D(({
26225
26229
  dataSource: t
26226
26230
  }) => {
26227
26231
  const {
@@ -26232,17 +26236,17 @@ const mI = D(({
26232
26236
  ".mantine-NavLink-label": {
26233
26237
  fontFamily: "monospace"
26234
26238
  }
26235
- }, children: Object.entries(e.data).map(([n, r]) => /* @__PURE__ */ i(ji, { label: n, icon: /* @__PURE__ */ i(Xr, { size: 14 }), defaultOpened: t.table_schema === n, pl: 0, childrenOffset: 14, children: r.map((o) => /* @__PURE__ */ i(ji, { label: o.table_name, icon: /* @__PURE__ */ i(fI, { table_type: o.table_type }), onClick: () => {
26239
+ }, children: Object.entries(e.data).map(([n, r]) => /* @__PURE__ */ i(ji, { label: n, icon: /* @__PURE__ */ i(Xr, { size: 14 }), defaultOpened: t.table_schema === n, pl: 0, childrenOffset: 14, children: r.map((o) => /* @__PURE__ */ i(ji, { label: o.table_name, icon: /* @__PURE__ */ i(mI, { table_type: o.table_type }), onClick: () => {
26236
26240
  t.setKeywords(n, o.table_name);
26237
26241
  }, active: t.table_name === o.table_name }, o.table_name)) }, n)) });
26238
- }), gI = ({
26242
+ }), bI = ({
26239
26243
  visible: t
26240
26244
  }) => /* @__PURE__ */ i(V, { py: 10, sx: {
26241
26245
  width: "100%",
26242
26246
  height: "100%",
26243
26247
  overflow: "hidden",
26244
26248
  position: "relative"
26245
- }, children: /* @__PURE__ */ i(_n, { visible: t }) }), bI = [{
26249
+ }, children: /* @__PURE__ */ i(_n, { visible: t }) }), yI = [{
26246
26250
  label: "10",
26247
26251
  value: "10"
26248
26252
  }, {
@@ -26254,7 +26258,7 @@ const mI = D(({
26254
26258
  }, {
26255
26259
  label: "100",
26256
26260
  value: "100"
26257
- }], yI = {
26261
+ }], xI = {
26258
26262
  icon: {
26259
26263
  width: "50px",
26260
26264
  textAlign: "center"
@@ -26264,7 +26268,7 @@ const mI = D(({
26264
26268
  paddingLeft: "50px"
26265
26269
  }
26266
26270
  }
26267
- }, xI = D(({
26271
+ }, vI = D(({
26268
26272
  dataSource: t
26269
26273
  }) => {
26270
26274
  const {
@@ -26282,8 +26286,8 @@ const mI = D(({
26282
26286
  {
26283
26287
  icon: /* @__PURE__ */ i(C, { ta: "center", color: "dimmed", size: 14, children: "Limit" }),
26284
26288
  size: "xs",
26285
- styles: yI,
26286
- data: bI,
26289
+ styles: xI,
26290
+ data: yI,
26287
26291
  value: String(e.limit),
26288
26292
  onChange: (n) => e.setLimit(Number(n))
26289
26293
  }
@@ -26295,7 +26299,7 @@ const mI = D(({
26295
26299
  " rows"
26296
26300
  ] }) })
26297
26301
  ] });
26298
- }), vI = D(({
26302
+ }), wI = D(({
26299
26303
  dataSource: t
26300
26304
  }) => {
26301
26305
  const e = t.tableData;
@@ -26303,8 +26307,8 @@ const mI = D(({
26303
26307
  fontFamily: "monospace"
26304
26308
  }, children: "This table is empty" }) : e.error ? /* @__PURE__ */ i(C, { mt: 20, color: "red", size: "md", align: "center", sx: {
26305
26309
  fontFamily: "monospace"
26306
- }, children: e.error }) : e.page === 1 && e.loading ? /* @__PURE__ */ i(gI, { visible: !0 }) : /* @__PURE__ */ h(ct, { children: [
26307
- /* @__PURE__ */ i(xI, { dataSource: t }),
26310
+ }, children: e.error }) : e.page === 1 && e.loading ? /* @__PURE__ */ i(bI, { visible: !0 }) : /* @__PURE__ */ h(ct, { children: [
26311
+ /* @__PURE__ */ i(vI, { dataSource: t }),
26308
26312
  /* @__PURE__ */ h(V, { py: 10, sx: {
26309
26313
  width: "100%",
26310
26314
  height: "calc(100% - 42px)",
@@ -26315,7 +26319,7 @@ const mI = D(({
26315
26319
  /* @__PURE__ */ i(Vd, { data: e.data })
26316
26320
  ] })
26317
26321
  ] });
26318
- }), wI = {
26322
+ }), _I = {
26319
26323
  root: {
26320
26324
  flexGrow: 1,
26321
26325
  overflow: "auto",
@@ -26327,7 +26331,7 @@ const mI = D(({
26327
26331
  tab: {
26328
26332
  minWidth: 120
26329
26333
  }
26330
- }, _I = D(({
26334
+ }, CI = D(({
26331
26335
  dataSource: t
26332
26336
  }) => (W(() => {
26333
26337
  t.loadTablesIfEmpty();
@@ -26340,20 +26344,20 @@ const mI = D(({
26340
26344
  flexGrow: 0,
26341
26345
  flexShrink: 0,
26342
26346
  position: "relative"
26343
- }, children: /* @__PURE__ */ i(ct, { children: /* @__PURE__ */ i(mI, { dataSource: t }) }) }),
26344
- /* @__PURE__ */ h(g, { defaultValue: "structure", styles: wI, children: [
26347
+ }, children: /* @__PURE__ */ i(ct, { children: /* @__PURE__ */ i(gI, { dataSource: t }) }) }),
26348
+ /* @__PURE__ */ h(g, { defaultValue: "structure", styles: _I, children: [
26345
26349
  /* @__PURE__ */ h(g.List, { children: [
26346
26350
  /* @__PURE__ */ i(g.Tab, { value: "structure", icon: /* @__PURE__ */ i(ch, { size: 14 }), children: "Structure" }),
26347
26351
  /* @__PURE__ */ i(g.Tab, { value: "data", icon: /* @__PURE__ */ i(Xr, { size: 14 }), children: "Data" })
26348
26352
  ] }),
26349
- /* @__PURE__ */ i(g.Panel, { value: "structure", children: /* @__PURE__ */ i(pI, { dataSource: t }) }),
26353
+ /* @__PURE__ */ i(g.Panel, { value: "structure", children: /* @__PURE__ */ i(fI, { dataSource: t }) }),
26350
26354
  /* @__PURE__ */ i(g.Panel, { value: "data", sx: {
26351
26355
  width: "100%",
26352
26356
  height: "calc(100% - 36px)",
26353
26357
  overflow: "hidden"
26354
- }, children: /* @__PURE__ */ i(vI, { dataSource: t }) })
26358
+ }, children: /* @__PURE__ */ i(wI, { dataSource: t }) })
26355
26359
  ] })
26356
- ] }))), CI = {
26360
+ ] }))), SI = {
26357
26361
  modal: {
26358
26362
  paddingLeft: "0px !important",
26359
26363
  paddingRight: "0px !important"
@@ -26389,23 +26393,23 @@ const mI = D(({
26389
26393
  to: "red"
26390
26394
  }, children: t.type })
26391
26395
  ] })
26392
- ] }), zIndex: 320, size: "96vw", overflow: "inside", styles: CI, children: /* @__PURE__ */ i(V, { sx: {
26396
+ ] }), zIndex: 320, size: "96vw", overflow: "inside", styles: SI, children: /* @__PURE__ */ i(V, { sx: {
26393
26397
  height: "calc(100vh - 220px)"
26394
- }, children: /* @__PURE__ */ i(_I, { dataSource: t }) }) }),
26398
+ }, children: /* @__PURE__ */ i(CI, { dataSource: t }) }) }),
26395
26399
  /* @__PURE__ */ i(M, { variant: "subtle", onClick: () => r(!0), px: 16, styles: {
26396
26400
  inner: {
26397
26401
  justifyContent: "flex-start"
26398
26402
  }
26399
26403
  }, ...e, children: "See Table Structure" })
26400
26404
  ] });
26401
- }), SI = Ie(({
26405
+ }), kI = Ie(({
26402
26406
  label: t,
26403
26407
  type: e,
26404
26408
  ...n
26405
26409
  }, r) => /* @__PURE__ */ h(w, { position: "apart", ref: r, ...n, children: [
26406
26410
  /* @__PURE__ */ i(C, { children: t }),
26407
26411
  /* @__PURE__ */ i(C, { children: e })
26408
- ] })), kI = D(({
26412
+ ] })), TI = D(({
26409
26413
  value: t,
26410
26414
  onChange: e
26411
26415
  }) => {
@@ -26431,7 +26435,7 @@ const mI = D(({
26431
26435
  size: "xs",
26432
26436
  px: 10
26433
26437
  } })
26434
- ] }), itemComponent: SI, rightSection: c ? /* @__PURE__ */ i(C, { size: "xs", color: "dimmed", children: c.type }) : void 0, rightSectionWidth: 85, maxDropdownHeight: 280, styles: {
26438
+ ] }), itemComponent: kI, rightSection: c ? /* @__PURE__ */ i(C, { size: "xs", color: "dimmed", children: c.type }) : void 0, rightSectionWidth: 85, maxDropdownHeight: 280, styles: {
26435
26439
  root: {
26436
26440
  flex: 1
26437
26441
  },
@@ -26447,7 +26451,7 @@ const mI = D(({
26447
26451
  }
26448
26452
  }
26449
26453
  }, disabled: o, value: t.key, onChange: l });
26450
- }), TI = (t) => {
26454
+ }), DI = (t) => {
26451
26455
  const {
26452
26456
  queryModel: e
26453
26457
  } = t, n = Le(), r = ne(), a = r.findQueryUsage(e.id).length > 0, s = jt(), l = () => {
@@ -26476,7 +26480,7 @@ const mI = D(({
26476
26480
  }, children: "Delete this Query" }) }) : /* @__PURE__ */ i(M, { color: "red", size: "xs", onClick: l, leftIcon: /* @__PURE__ */ i(Pn, { size: 16 }), sx: {
26477
26481
  alignSelf: "flex-end"
26478
26482
  }, children: "Delete this Query" });
26479
- }, DI = D(TI), II = D(({
26483
+ }, II = D(DI), MI = D(({
26480
26484
  queryModel: t
26481
26485
  }) => {
26482
26486
  const [e, n] = U(t.name);
@@ -26495,7 +26499,7 @@ const mI = D(({
26495
26499
  }, rightSection: /* @__PURE__ */ i(K, { variant: "filled", color: "blue", size: "sm", onClick: () => t.setName(e), disabled: e === t.name, children: /* @__PURE__ */ i(Sn, { size: 16 }) }), onBlur: () => {
26496
26500
  t.setName(e);
26497
26501
  } }),
26498
- /* @__PURE__ */ i(kI, { value: {
26502
+ /* @__PURE__ */ i(TI, { value: {
26499
26503
  type: t.type,
26500
26504
  key: t.key
26501
26505
  }, onChange: ({
@@ -26508,10 +26512,10 @@ const mI = D(({
26508
26512
  /* @__PURE__ */ i(ar, { label: "Run query when these are truthy", placeholder: "Always run this query on load", data: t.conditionOptions, value: [...t.run_by], onChange: t.setRunBy }),
26509
26513
  t.typedAsHTTP && /* @__PURE__ */ i(ar, { label: "Re-run query when these changed", placeholder: "Leave it empty to never re-run this query", data: t.conditionOptions, value: [...t.react_to], onChange: t.setReactTo }),
26510
26514
  /* @__PURE__ */ i(E, { mt: 20, mb: 10, variant: "dashed" }),
26511
- /* @__PURE__ */ i(DI, { queryModel: t })
26515
+ /* @__PURE__ */ i(II, { queryModel: t })
26512
26516
  ] }) });
26513
26517
  });
26514
- function MI() {
26518
+ function $I() {
26515
26519
  const [t, {
26516
26520
  open: e,
26517
26521
  close: n
@@ -26531,7 +26535,7 @@ function MI() {
26531
26535
  /* @__PURE__ */ i(M, { variant: "light", color: "violet", size: "xs", onClick: e, leftIcon: /* @__PURE__ */ i(Bn, { size: 16 }), children: "About parameter 'utils'" })
26532
26536
  ] });
26533
26537
  }
26534
- const $I = ({
26538
+ const zI = ({
26535
26539
  value: t,
26536
26540
  onChange: e
26537
26541
  }) => /* @__PURE__ */ i(V, { sx: {
@@ -26572,7 +26576,7 @@ const $I = ({
26572
26576
  flexShrink: 0,
26573
26577
  flexGrow: 0
26574
26578
  }, children: [
26575
- /* @__PURE__ */ i(w, { position: "left", children: /* @__PURE__ */ i(MI, {}) }),
26579
+ /* @__PURE__ */ i(w, { position: "left", children: /* @__PURE__ */ i($I, {}) }),
26576
26580
  /* @__PURE__ */ h(w, { position: "right", children: [
26577
26581
  /* @__PURE__ */ i(M, { onClick: d, size: "xs", variant: "default", leftIcon: /* @__PURE__ */ i(dh, { size: 16 }), children: "Reset to default" }),
26578
26582
  /* @__PURE__ */ i(M, { onClick: c, color: "red", size: "xs", disabled: !p, leftIcon: /* @__PURE__ */ i(bl, { size: 16 }), children: "Revert Changes" }),
@@ -26580,10 +26584,10 @@ const $I = ({
26580
26584
  ] })
26581
26585
  ] }),
26582
26586
  /* @__PURE__ */ i(C, { size: 14, children: n }),
26583
- /* @__PURE__ */ i($I, { value: a, onChange: s })
26587
+ /* @__PURE__ */ i(zI, { value: a, onChange: s })
26584
26588
  ] });
26585
26589
  });
26586
- function zI({
26590
+ function LI({
26587
26591
  content: t
26588
26592
  }) {
26589
26593
  return /* @__PURE__ */ h(nt, { width: "60vw", shadow: "md", children: [
@@ -26591,7 +26595,7 @@ function zI({
26591
26595
  /* @__PURE__ */ i(nt.Dropdown, { children: /* @__PURE__ */ i(wn, { language: "sql", noCopy: !0, withLineNumbers: !0, children: t }) })
26592
26596
  ] });
26593
26597
  }
26594
- const LI = D(() => {
26598
+ const AI = D(() => {
26595
26599
  const e = [...Le().globalSQLSnippets.list];
26596
26600
  return e.length === 0 ? null : /* @__PURE__ */ h(Rt, { horizontalSpacing: "xs", verticalSpacing: "xs", fontSize: "sm", highlightOnHover: !0, children: [
26597
26601
  /* @__PURE__ */ i("thead", { children: /* @__PURE__ */ h("tr", { children: [
@@ -26605,11 +26609,11 @@ const LI = D(() => {
26605
26609
  } = n;
26606
26610
  return /* @__PURE__ */ h("tr", { children: [
26607
26611
  /* @__PURE__ */ i("td", { children: r }),
26608
- /* @__PURE__ */ i("td", { width: 200, children: /* @__PURE__ */ i(zI, { content: o }) })
26612
+ /* @__PURE__ */ i("td", { width: 200, children: /* @__PURE__ */ i(LI, { content: o }) })
26609
26613
  ] }, r);
26610
26614
  }) })
26611
26615
  ] });
26612
- }), AI = `
26616
+ }), EI = `
26613
26617
  -- You may reference query variables in SQL or VizConfig.
26614
26618
  SELECT *
26615
26619
  FROM commit
@@ -26647,13 +26651,13 @@ WHERE
26647
26651
  ] }),
26648
26652
  /* @__PURE__ */ i(g.Panel, { value: "guide", pt: "xs", children: /* @__PURE__ */ i(wn, { language: "sql", sx: {
26649
26653
  width: "100%"
26650
- }, noCopy: !0, colorScheme: "dark", children: AI }) }),
26654
+ }, noCopy: !0, colorScheme: "dark", children: EI }) }),
26651
26655
  /* @__PURE__ */ i(g.Panel, { value: "local_query_vars", pt: "xs", children: /* @__PURE__ */ i(wn, { language: "json", sx: {
26652
26656
  width: "100%"
26653
26657
  }, noCopy: !0, colorScheme: "dark", children: s }) }),
26654
26658
  /* @__PURE__ */ i(g.Panel, { value: "global_sql_snippets", pt: "xs", children: /* @__PURE__ */ h(S, { spacing: 10, children: [
26655
26659
  /* @__PURE__ */ i(Us, { icon: /* @__PURE__ */ i(ss, { size: 16 }), title: "Global SQL Snippets", children: "SQL snippets worth sharing between dashboards are managed in System Settings by admins." }),
26656
- /* @__PURE__ */ i(LI, {})
26660
+ /* @__PURE__ */ i(AI, {})
26657
26661
  ] }) })
26658
26662
  ] }) });
26659
26663
  }), Va = D(() => {
@@ -26671,7 +26675,7 @@ WHERE
26671
26675
  `),
26672
26676
  post: ["function process_result(res, utils) {", " // your code goes here", " return data", "}"].join(`
26673
26677
  `)
26674
- }, EI = D(({
26678
+ }, RI = D(({
26675
26679
  queryModel: t
26676
26680
  }) => t.typedAsHTTP ? /* @__PURE__ */ h(g, { defaultValue: "pre_process", orientation: "vertical", sx: {
26677
26681
  flexGrow: 1
@@ -26685,7 +26689,7 @@ WHERE
26685
26689
  position: "relative"
26686
26690
  }, p: "sm", children: /* @__PURE__ */ i(Kr, { label: "", value: t.pre_process, onChange: t.setPreProcess, defaultValue: Gs.pre }) }),
26687
26691
  /* @__PURE__ */ i(g.Panel, { value: "post_process", p: "sm", children: /* @__PURE__ */ i(Kr, { label: "", value: t.post_process, onChange: t.setPostProcess, defaultValue: Gs.post }) })
26688
- ] }) : null), RI = D(({
26692
+ ] }) : null), OI = D(({
26689
26693
  queryID: t,
26690
26694
  usage: e
26691
26695
  }) => {
@@ -26745,7 +26749,7 @@ WHERE
26745
26749
  readOnly: s || !e,
26746
26750
  "semanticHighlighting.enabled": !0
26747
26751
  } });
26748
- }, OI = ({
26752
+ }, FI = ({
26749
26753
  value: t,
26750
26754
  height: e = "200px",
26751
26755
  defaultLanguage: n = "sql"
@@ -26758,17 +26762,17 @@ WHERE
26758
26762
  enabled: !1
26759
26763
  },
26760
26764
  readOnly: !0
26761
- } }), FI = D(({
26765
+ } }), PI = D(({
26762
26766
  value: t
26763
26767
  }) => {
26764
26768
  const n = ne().payloadForSQL, r = z.useMemo(() => Go(t, n), [t, n]);
26765
- return /* @__PURE__ */ i(OI, { height: "100%", value: r });
26769
+ return /* @__PURE__ */ i(FI, { height: "100%", value: r });
26766
26770
  }), Hs = {
26767
26771
  pre: ["function process_request({ context, filters, sql }, utils) {", " // modify and return sql", " return sql", "}"].join(`
26768
26772
  `),
26769
26773
  post: ["function process_result(data, utils) {", " // process data and return the result", " return data", "}"].join(`
26770
26774
  `)
26771
- }, PI = D(({
26775
+ }, VI = D(({
26772
26776
  queryModel: t
26773
26777
  }) => {
26774
26778
  const [e, n] = z.useState(t.sql);
@@ -26801,7 +26805,7 @@ WHERE
26801
26805
  /* @__PURE__ */ i(g.Panel, { value: "Edit", sx: {
26802
26806
  position: "relative"
26803
26807
  }, p: "sm", children: /* @__PURE__ */ i(Na, { height: "100%", value: e, onChange: n, theme: "sql-dark", defaultLanguage: "sql" }) }),
26804
- /* @__PURE__ */ i(g.Panel, { value: "Preview", p: 0, pl: 4, children: /* @__PURE__ */ i(FI, { value: t.sql }) }),
26808
+ /* @__PURE__ */ i(g.Panel, { value: "Preview", p: 0, pl: 4, children: /* @__PURE__ */ i(PI, { value: t.sql }) }),
26805
26809
  /* @__PURE__ */ i(g.Panel, { value: "pre_process", sx: {
26806
26810
  position: "relative"
26807
26811
  }, p: "sm", children: /* @__PURE__ */ i(Kr, { label: "", value: t.pre_process, onChange: t.setPreProcess, defaultValue: Hs.pre }) }),
@@ -26811,7 +26815,7 @@ WHERE
26811
26815
  height: "calc(100% - 44px)",
26812
26816
  // Tabs.List
26813
26817
  padding: 0
26814
- }, VI = D(({
26818
+ }, NI = D(({
26815
26819
  queryModel: t
26816
26820
  }) => {
26817
26821
  const e = ne(), n = $(() => t.datasource ? t.typedAsHTTP ? "HTTP" : "SQL" : "Configurations", [t.datasource, t.typedAsHTTP]), [r, o] = U(n);
@@ -26831,13 +26835,13 @@ WHERE
26831
26835
  /* @__PURE__ */ i(g.Tab, { value: "Data", disabled: !t.datasource, children: /* @__PURE__ */ i(Re, { label: "Need to pick a Data Source first", disabled: t.datasource, withinPortal: !0, children: /* @__PURE__ */ i(C, { children: "Data" }) }) }),
26832
26836
  /* @__PURE__ */ i(g.Tab, { value: "Usage", disabled: s, children: /* @__PURE__ */ i(Re, { label: "This query is not used for any filter or panel", disabled: !s, withinPortal: !0, children: /* @__PURE__ */ i(C, { children: "Usage" }) }) })
26833
26837
  ] }),
26834
- /* @__PURE__ */ i(g.Panel, { value: "Configurations", pt: 0, p: 0, children: /* @__PURE__ */ i(II, { queryModel: t }) }),
26838
+ /* @__PURE__ */ i(g.Panel, { value: "Configurations", pt: 0, p: 0, children: /* @__PURE__ */ i(MI, { queryModel: t }) }),
26835
26839
  t.typedAsSQL && /* @__PURE__ */ i(g.Panel, { value: "SQL", sx: zr, children: /* @__PURE__ */ i(S, { sx: {
26836
26840
  height: "100%"
26837
- }, children: /* @__PURE__ */ i(PI, { queryModel: t }) }) }),
26841
+ }, children: /* @__PURE__ */ i(VI, { queryModel: t }) }) }),
26838
26842
  t.typedAsHTTP && /* @__PURE__ */ i(g.Panel, { value: "HTTP", sx: zr, children: /* @__PURE__ */ i(S, { sx: {
26839
26843
  height: "100%"
26840
- }, children: /* @__PURE__ */ i(EI, { queryModel: t }) }) }),
26844
+ }, children: /* @__PURE__ */ i(RI, { queryModel: t }) }) }),
26841
26845
  /* @__PURE__ */ i(g.Panel, { value: "Data", sx: {
26842
26846
  ...zr,
26843
26847
  overflow: "hidden"
@@ -26845,21 +26849,21 @@ WHERE
26845
26849
  /* @__PURE__ */ i(g.Panel, { value: "Usage", sx: {
26846
26850
  ...zr,
26847
26851
  overflow: "hidden"
26848
- }, children: /* @__PURE__ */ i(RI, { queryID: t.id, usage: a }) })
26852
+ }, children: /* @__PURE__ */ i(OI, { queryID: t.id, usage: a }) })
26849
26853
  ] }) });
26850
- }), NI = D(({
26854
+ }), BI = D(({
26851
26855
  id: t
26852
26856
  }) => {
26853
26857
  const n = ne().queries.findByID(t);
26854
26858
  return t === "" ? null : n ? /* @__PURE__ */ i(S, { sx: {
26855
26859
  height: "100%"
26856
- }, spacing: "sm", children: /* @__PURE__ */ i(VI, { queryModel: n }) }) : /* @__PURE__ */ i(C, { size: 14, color: "red", children: "Invalid Query ID" });
26857
- }), BI = D(({
26860
+ }, spacing: "sm", children: /* @__PURE__ */ i(NI, { queryModel: n }) }) : /* @__PURE__ */ i(C, { size: 14, color: "red", children: "Invalid Query ID" });
26861
+ }), qI = D(({
26858
26862
  value: t
26859
26863
  }) => {
26860
26864
  const n = ne().payloadForSQL, r = $(() => Go(t, n), [t, n]);
26861
26865
  return /* @__PURE__ */ i(Na, { height: "100%", value: r });
26862
- }), qI = D(({
26866
+ }), WI = D(({
26863
26867
  item: t,
26864
26868
  remove: e,
26865
26869
  onKeyChanged: n
@@ -26931,10 +26935,10 @@ WHERE
26931
26935
  }, children: /* @__PURE__ */ i(we, { size: 18 }) })
26932
26936
  ] }),
26933
26937
  /* @__PURE__ */ i(g.Panel, { value: "SQL", pt: "sm", children: /* @__PURE__ */ i(Na, { height: "100%", value: p, onChange: u, defaultLanguage: "sql", theme: "sql-dark" }) }),
26934
- /* @__PURE__ */ i(g.Panel, { value: "Preview", pt: "sm", children: /* @__PURE__ */ i(BI, { value: p }) })
26938
+ /* @__PURE__ */ i(g.Panel, { value: "Preview", pt: "sm", children: /* @__PURE__ */ i(qI, { value: p }) })
26935
26939
  ] })
26936
26940
  ] });
26937
- }), WI = D(({
26941
+ }), jI = D(({
26938
26942
  id: t
26939
26943
  }) => {
26940
26944
  const e = Le(), n = ne(), r = $(() => n.sqlSnippets.findByKey(t), [t]);
@@ -26949,17 +26953,17 @@ WHERE
26949
26953
  const o = () => {
26950
26954
  e.editor.setPath(["_SQL_SNIPPETS_", ""]);
26951
26955
  };
26952
- return /* @__PURE__ */ i(qI, { item: r, remove: () => {
26956
+ return /* @__PURE__ */ i(WI, { item: r, remove: () => {
26953
26957
  n.sqlSnippets.removeByKey(t), o();
26954
26958
  }, onKeyChanged: (l) => {
26955
26959
  e.editor.setPath(["_SQL_SNIPPETS_", l]);
26956
26960
  } });
26957
- }), jI = D(({
26961
+ }), YI = D(({
26958
26962
  view: t
26959
26963
  }) => !t || t.type !== le.Division ? null : /* @__PURE__ */ h(S, { children: [
26960
26964
  /* @__PURE__ */ i(E, { mt: 8, mb: 0, label: "Division settings", labelPosition: "center" }),
26961
26965
  /* @__PURE__ */ i(C, { align: "center", size: "xs", color: "dimmed", children: "Under construction" })
26962
- ] })), YI = [{
26966
+ ] })), GI = [{
26963
26967
  value: "default",
26964
26968
  label: "Default"
26965
26969
  }, {
@@ -26968,13 +26972,13 @@ WHERE
26968
26972
  }, {
26969
26973
  value: "pills",
26970
26974
  label: "Pills"
26971
- }], GI = [{
26975
+ }], HI = [{
26972
26976
  value: "horizontal",
26973
26977
  label: "Horizontal"
26974
26978
  }, {
26975
26979
  value: "vertical",
26976
26980
  label: "Vertical"
26977
- }], HI = D(({
26981
+ }], QI = D(({
26978
26982
  view: t
26979
26983
  }) => {
26980
26984
  if (!t || t.type !== le.Tabs)
@@ -26982,11 +26986,11 @@ WHERE
26982
26986
  const e = t.config;
26983
26987
  return /* @__PURE__ */ h(S, { children: [
26984
26988
  /* @__PURE__ */ i(E, { mt: 8, mb: 0, label: "Tabs settings", labelPosition: "center" }),
26985
- /* @__PURE__ */ i(P, { label: "Variant", value: e.variant, onChange: e.setVariant, data: YI }),
26986
- /* @__PURE__ */ i(P, { label: "Orientation", value: e.orientation, onChange: e.setOrientation, data: GI }),
26989
+ /* @__PURE__ */ i(P, { label: "Variant", value: e.variant, onChange: e.setVariant, data: GI }),
26990
+ /* @__PURE__ */ i(P, { label: "Orientation", value: e.orientation, onChange: e.setOrientation, data: HI }),
26987
26991
  /* @__PURE__ */ i(tt, { label: "Grow Tabs", checked: e.grow, onChange: (n) => e.setGrow(n.currentTarget.checked) })
26988
26992
  ] });
26989
- }), QI = ({
26993
+ }), KI = ({
26990
26994
  disabled: t,
26991
26995
  value: e,
26992
26996
  onChange: n
@@ -27002,7 +27006,7 @@ WHERE
27002
27006
  },
27003
27007
  readOnly: t
27004
27008
  } })
27005
- ] }), KI = ({
27009
+ ] }), UI = ({
27006
27010
  value: t,
27007
27011
  onChange: e
27008
27012
  }) => {
@@ -27040,7 +27044,7 @@ WHERE
27040
27044
  }, children: /* @__PURE__ */ i(Il, { size: 14 }) }),
27041
27045
  /* @__PURE__ */ i($e, { size: 800, title: "Customize modal title", opened: n, onClose: o, closeOnClickOutside: !1, withCloseButton: !1, zIndex: 320, children: n && /* @__PURE__ */ h(S, { children: [
27042
27046
  /* @__PURE__ */ i(ve, { mt: 10, label: "Enabled", checked: a.enabled, onChange: (f) => l(f.currentTarget.checked) }),
27043
- /* @__PURE__ */ i(QI, { value: a.func_content, onChange: p, disabled: !a.enabled }),
27047
+ /* @__PURE__ */ i(KI, { value: a.func_content, onChange: p, disabled: !a.enabled }),
27044
27048
  /* @__PURE__ */ h(w, { position: "apart", children: [
27045
27049
  /* @__PURE__ */ i(M, { onClick: u, color: "red", leftIcon: /* @__PURE__ */ i(Ot, { size: 20 }), children: "Rest" }),
27046
27050
  /* @__PURE__ */ h(w, { position: "right", children: [
@@ -27050,7 +27054,7 @@ WHERE
27050
27054
  ] })
27051
27055
  ] }) })
27052
27056
  ] });
27053
- }, UI = D(({
27057
+ }, XI = D(({
27054
27058
  view: t
27055
27059
  }) => {
27056
27060
  if (!t || t.type !== le.Modal)
@@ -27062,20 +27066,20 @@ WHERE
27062
27066
  /* @__PURE__ */ i(A, { label: "Modal Title", value: n, onChange: T.noop, disabled: !0, sx: {
27063
27067
  flexGrow: 1
27064
27068
  } }),
27065
- /* @__PURE__ */ i(KI, { value: e.custom_modal_title, onChange: e.custom_modal_title.replace })
27069
+ /* @__PURE__ */ i(UI, { value: e.custom_modal_title, onChange: e.custom_modal_title.replace })
27066
27070
  ] }),
27067
27071
  /* @__PURE__ */ h(w, { grow: !0, children: [
27068
27072
  /* @__PURE__ */ i(A, { label: "Width", value: e.width, onChange: (r) => e.setWidth(r.currentTarget.value), placeholder: "600px / 50vw" }),
27069
27073
  /* @__PURE__ */ i(A, { label: "Height", value: e.height, onChange: (r) => e.setHeight(r.currentTarget.value), placeholder: "600px / 50vw" })
27070
27074
  ] })
27071
27075
  ] });
27072
- }), XI = D(({
27076
+ }), JI = D(({
27073
27077
  view: t
27074
27078
  }) => /* @__PURE__ */ h(H, { children: [
27075
- /* @__PURE__ */ i(jI, { view: t }),
27076
- /* @__PURE__ */ i(UI, { view: t }),
27077
- /* @__PURE__ */ i(HI, { view: t })
27078
- ] })), JI = [{
27079
+ /* @__PURE__ */ i(YI, { view: t }),
27080
+ /* @__PURE__ */ i(XI, { view: t }),
27081
+ /* @__PURE__ */ i(QI, { view: t })
27082
+ ] })), ZI = [{
27079
27083
  label: "Division",
27080
27084
  value: le.Division
27081
27085
  }, {
@@ -27084,7 +27088,7 @@ WHERE
27084
27088
  }, {
27085
27089
  label: "Tabs",
27086
27090
  value: le.Tabs
27087
- }], ZI = D(({
27091
+ }], eM = D(({
27088
27092
  view: t
27089
27093
  }) => t ? /* @__PURE__ */ h(S, { sx: {
27090
27094
  position: "relative"
@@ -27092,9 +27096,9 @@ WHERE
27092
27096
  /* @__PURE__ */ i(A, { label: "Name", value: t.name, onChange: (e) => {
27093
27097
  t.setName(e.currentTarget.value);
27094
27098
  } }),
27095
- /* @__PURE__ */ i(P, { label: "Type", withinPortal: !0, value: t.type, onChange: t.setType, data: JI }),
27096
- /* @__PURE__ */ i(XI, { view: t })
27097
- ] }) : null), eM = D(({
27099
+ /* @__PURE__ */ i(P, { label: "Type", withinPortal: !0, value: t.type, onChange: t.setType, data: ZI }),
27100
+ /* @__PURE__ */ i(JI, { view: t })
27101
+ ] }) : null), tM = D(({
27098
27102
  id: t
27099
27103
  }) => {
27100
27104
  const e = jt(), n = Le(), r = ne();
@@ -27132,36 +27136,36 @@ WHERE
27132
27136
  flexGrow: 1,
27133
27137
  maxHeight: "calc(100% - 52px)",
27134
27138
  overflow: "auto"
27135
- }, children: /* @__PURE__ */ i(ZI, { view: o }) })
27139
+ }, children: /* @__PURE__ */ i(eM, { view: o }) })
27136
27140
  ] });
27137
27141
  });
27138
- function tM(t) {
27142
+ function nM(t) {
27139
27143
  return t.length === 1 && t[0] === "_QUERY_VARS_";
27140
27144
  }
27141
- function nM(t) {
27145
+ function rM(t) {
27142
27146
  return t.length === 1 && t[0] === "_MOCK_CONTEXT_";
27143
27147
  }
27144
- function rM(t) {
27148
+ function iM(t) {
27145
27149
  return t.length === 2 && t[0] === "_FILTERS_";
27146
27150
  }
27147
- function iM(t) {
27151
+ function oM(t) {
27148
27152
  return t.length === 2 && t[0] === "_SQL_SNIPPETS_";
27149
27153
  }
27150
- function oM(t) {
27154
+ function aM(t) {
27151
27155
  return t.length === 2 && t[0] === "_QUERIES_";
27152
27156
  }
27153
- function aM(t) {
27157
+ function sM(t) {
27154
27158
  return t.length === 2 && t[0] === "_VIEWS_";
27155
27159
  }
27156
- function sM(t) {
27160
+ function lM(t) {
27157
27161
  return t.length === 4 && t[0] === "_VIEWS_" && t[2] === "_PANELS_";
27158
27162
  }
27159
- const lM = D(() => /* @__PURE__ */ i(S, { sx: {
27163
+ const cM = D(() => /* @__PURE__ */ i(S, { sx: {
27160
27164
  height: "100%"
27161
- }, p: "sm", children: /* @__PURE__ */ i(Wd, {}) })), cM = D(() => {
27165
+ }, p: "sm", children: /* @__PURE__ */ i(Wd, {}) })), dM = D(() => {
27162
27166
  const t = Le().editor, e = t.path;
27163
- return tM(e) ? /* @__PURE__ */ i(lM, {}) : nM(e) ? /* @__PURE__ */ i(LD, {}) : rM(e) ? /* @__PURE__ */ i(V, { p: "xs", pl: 20, children: /* @__PURE__ */ i(zD, { id: e[1] }) }) : iM(e) ? /* @__PURE__ */ i(WI, { id: e[1] }) : oM(e) ? /* @__PURE__ */ i(NI, { id: e[1] }) : aM(e) ? /* @__PURE__ */ i(V, { p: "xs", pl: 20, children: /* @__PURE__ */ i(eM, { id: e[1] }) }) : sM(e) ? /* @__PURE__ */ i(sI, { viewID: e[1], panelID: e[3] }) : /* @__PURE__ */ i(V, { children: t.path });
27164
- }), dM = D(() => /* @__PURE__ */ i(cM, {})), uM = D(() => {
27167
+ return nM(e) ? /* @__PURE__ */ i(cM, {}) : rM(e) ? /* @__PURE__ */ i(AD, {}) : iM(e) ? /* @__PURE__ */ i(V, { p: "xs", pl: 20, children: /* @__PURE__ */ i(LD, { id: e[1] }) }) : oM(e) ? /* @__PURE__ */ i(jI, { id: e[1] }) : aM(e) ? /* @__PURE__ */ i(BI, { id: e[1] }) : sM(e) ? /* @__PURE__ */ i(V, { p: "xs", pl: 20, children: /* @__PURE__ */ i(tM, { id: e[1] }) }) : lM(e) ? /* @__PURE__ */ i(lI, { viewID: e[1], panelID: e[3] }) : /* @__PURE__ */ i(V, { children: t.path });
27168
+ }), uM = D(() => /* @__PURE__ */ i(dM, {})), hM = D(() => {
27165
27169
  const t = Le();
27166
27170
  return /* @__PURE__ */ i(M, { variant: "subtle", leftIcon: /* @__PURE__ */ i(on, { size: 14 }), size: "sm", px: "xs", mb: 10, color: "blue", onClick: () => {
27167
27171
  const n = (/* @__PURE__ */ new Date()).getTime().toString(), r = {
@@ -27183,7 +27187,7 @@ const lM = D(() => /* @__PURE__ */ i(S, { sx: {
27183
27187
  justifyContent: "flex-start"
27184
27188
  }
27185
27189
  }, children: "Add a Filter" });
27186
- }), hM = D(({
27190
+ }), pM = D(({
27187
27191
  parentID: t
27188
27192
  }) => {
27189
27193
  const e = ne();
@@ -27198,7 +27202,7 @@ const lM = D(() => /* @__PURE__ */ i(S, { sx: {
27198
27202
  justifyContent: "flex-start"
27199
27203
  }
27200
27204
  }, children: "Add a Panel" }) : null;
27201
- }), pM = D(() => {
27205
+ }), fM = D(() => {
27202
27206
  const t = Le();
27203
27207
  return /* @__PURE__ */ i(M, { variant: "subtle", leftIcon: /* @__PURE__ */ i(on, { size: 14 }), size: "sm", px: "xs", mb: 10, color: "blue", onClick: () => {
27204
27208
  const n = (/* @__PURE__ */ new Date()).getTime().toString(), r = {
@@ -27217,7 +27221,7 @@ const lM = D(() => /* @__PURE__ */ i(S, { sx: {
27217
27221
  justifyContent: "flex-start"
27218
27222
  }
27219
27223
  }, children: "Add a Query" });
27220
- }), fM = D(() => {
27224
+ }), mM = D(() => {
27221
27225
  const t = Le();
27222
27226
  return /* @__PURE__ */ i(M, { variant: "subtle", leftIcon: /* @__PURE__ */ i(on, { size: 14 }), size: "sm", px: "xs", mb: 10, color: "blue", onClick: () => {
27223
27227
  const n = (/* @__PURE__ */ new Date()).getTime().toString(), r = {
@@ -27233,7 +27237,7 @@ const lM = D(() => /* @__PURE__ */ i(S, { sx: {
27233
27237
  justifyContent: "flex-start"
27234
27238
  }
27235
27239
  }, children: "Add a SQL Snippet" });
27236
- }), mM = D(() => {
27240
+ }), gM = D(() => {
27237
27241
  const t = ne();
27238
27242
  return /* @__PURE__ */ i(M, { variant: "subtle", leftIcon: /* @__PURE__ */ i(on, { size: 14 }), size: "sm", px: "xs", mb: 10, color: "blue", onClick: t.views.addARandomNewView, sx: {
27239
27243
  width: "100%",
@@ -27243,23 +27247,23 @@ const lM = D(() => /* @__PURE__ */ i(S, { sx: {
27243
27247
  justifyContent: "flex-start"
27244
27248
  }
27245
27249
  }, children: "Add a View" });
27246
- }), gM = D(({
27250
+ }), bM = D(({
27247
27251
  action_type: t,
27248
27252
  parentID: e
27249
- }) => (ne(), t === "_Add_A_Filter_" ? /* @__PURE__ */ i(uM, {}) : t === "_Add_A_SQL_SNIPPET_" ? /* @__PURE__ */ i(fM, {}) : t === "_Add_A_QUERY_" ? /* @__PURE__ */ i(pM, {}) : t === "_Add_A_VIEW_" ? /* @__PURE__ */ i(mM, {}) : t === "_Add_A_PANEL_" ? /* @__PURE__ */ i(hM, { parentID: e }) : null)), jd = D(({
27253
+ }) => (ne(), t === "_Add_A_Filter_" ? /* @__PURE__ */ i(hM, {}) : t === "_Add_A_SQL_SNIPPET_" ? /* @__PURE__ */ i(mM, {}) : t === "_Add_A_QUERY_" ? /* @__PURE__ */ i(fM, {}) : t === "_Add_A_VIEW_" ? /* @__PURE__ */ i(gM, {}) : t === "_Add_A_PANEL_" ? /* @__PURE__ */ i(pM, { parentID: e }) : null)), jd = D(({
27250
27254
  option: t
27251
27255
  }) => {
27252
27256
  var d;
27253
27257
  const e = Le().editor, n = e.isOptionActive, r = n(e.path, t), o = e.isOptionOpened, a = e.navigate, s = o(t), [l, c] = U(s);
27254
27258
  return W(() => {
27255
27259
  c(s);
27256
- }, [s]), /* @__PURE__ */ i(ji, { active: r, defaultOpened: s, opened: l, onChange: c, label: t.label, onClick: () => a(t), icon: t.Icon ? /* @__PURE__ */ i(t.Icon, { size: 18 }) : null, children: (d = t.children) == null ? void 0 : d.map((p) => p._type === "ACTION" ? /* @__PURE__ */ i(gM, { action_type: p._action_type, parentID: p.parentID }, `_ADD_${p.value}_`) : /* @__PURE__ */ i(jd, { option: p }, p.value)) }, t.label);
27257
- }), bM = D(() => {
27260
+ }, [s]), /* @__PURE__ */ i(ji, { active: r, defaultOpened: s, opened: l, onChange: c, label: t.label, onClick: () => a(t), icon: t.Icon ? /* @__PURE__ */ i(t.Icon, { size: 18 }) : null, children: (d = t.children) == null ? void 0 : d.map((p) => p._type === "ACTION" ? /* @__PURE__ */ i(bM, { action_type: p._action_type, parentID: p.parentID }, `_ADD_${p.value}_`) : /* @__PURE__ */ i(jd, { option: p }, p.value)) }, t.label);
27261
+ }), yM = D(() => {
27258
27262
  const t = Le();
27259
27263
  return /* @__PURE__ */ i(V, { sx: {
27260
27264
  position: "relative"
27261
27265
  }, children: t.editor.navOptions.map((e) => /* @__PURE__ */ i(jd, { option: e }, e.value)) });
27262
- }), yM = D(() => {
27266
+ }), xM = D(() => {
27263
27267
  const t = Le();
27264
27268
  return /* @__PURE__ */ h(Nt, { p: 0, width: {
27265
27269
  base: 200,
@@ -27279,12 +27283,12 @@ const lM = D(() => /* @__PURE__ */ i(S, { sx: {
27279
27283
  }, children: "Settings" }) }),
27280
27284
  /* @__PURE__ */ i(Nt.Section, { grow: !0, sx: {
27281
27285
  overflow: "auto"
27282
- }, children: /* @__PURE__ */ i(bM, {}) }),
27286
+ }, children: /* @__PURE__ */ i(yM, {}) }),
27283
27287
  /* @__PURE__ */ i(Nt.Section, { children: /* @__PURE__ */ i(w, { grow: !0, p: "md", pt: "sm", sx: {
27284
27288
  borderTop: "1px solid #eee"
27285
27289
  }, children: /* @__PURE__ */ i(M, { size: "xs", color: "red", leftIcon: /* @__PURE__ */ i(xl, { size: 18 }), onClick: () => t.editor.close(), children: "Close" }) }) })
27286
27290
  ] });
27287
- }), xM = {
27291
+ }), vM = {
27288
27292
  root: {
27289
27293
  height: "100vh",
27290
27294
  display: "flex",
@@ -27305,20 +27309,20 @@ const lM = D(() => /* @__PURE__ */ i(S, { sx: {
27305
27309
  paddingTop: 0,
27306
27310
  height: "100vh"
27307
27311
  }
27308
- }, vM = D(() => {
27312
+ }, wM = D(() => {
27309
27313
  const t = Le().editor;
27310
27314
  return /* @__PURE__ */ i($e, { onClose: () => t.setSettingsOpen(!1), closeOnEscape: !1, closeOnClickOutside: !1, opened: t.settings_open, fullScreen: !0, title: null, transitionDuration: 0, withCloseButton: !1, withinPortal: !0, zIndex: 300, styles: {
27311
27315
  modal: {
27312
27316
  padding: "0 !important"
27313
27317
  }
27314
- }, children: /* @__PURE__ */ i(tl, { padding: 0, navbar: /* @__PURE__ */ i(yM, {}), styles: xM, children: /* @__PURE__ */ i(dM, {}) }) });
27315
- }), wM = (t) => t.replace(/([^:])(\/\/+)/g, "$1/");
27316
- function _M(t) {
27318
+ }, children: /* @__PURE__ */ i(tl, { padding: 0, navbar: /* @__PURE__ */ i(xM, {}), styles: vM, children: /* @__PURE__ */ i(uM, {}) }) });
27319
+ }), _M = (t) => t.replace(/([^:])(\/\/+)/g, "$1/");
27320
+ function CM(t) {
27317
27321
  W(() => {
27318
27322
  if ($i.__getMonacoInstance())
27319
27323
  return;
27320
27324
  console.log("loading monaco for @devtable/dashboard");
27321
- const n = wM(t);
27325
+ const n = _M(t);
27322
27326
  $i.config({
27323
27327
  paths: {
27324
27328
  vs: n
@@ -27327,7 +27331,7 @@ function _M(t) {
27327
27331
  }, []);
27328
27332
  }
27329
27333
  Mc();
27330
- const CM = {
27334
+ const SM = {
27331
27335
  root: {
27332
27336
  height: "100vh",
27333
27337
  display: "flex",
@@ -27345,7 +27349,7 @@ const CM = {
27345
27349
  // main header & sub header
27346
27350
  height: "100vh"
27347
27351
  }
27348
- }, SM = ({
27352
+ }, kM = ({
27349
27353
  context: t,
27350
27354
  dashboard: e,
27351
27355
  content: n,
@@ -27356,7 +27360,7 @@ const CM = {
27356
27360
  headerSlot: l,
27357
27361
  headerMenuItems: c
27358
27362
  }, d) => {
27359
- _M(a.monacoPath), Gl(a);
27363
+ CM(a.monacoPath), Gl(a);
27360
27364
  const {
27361
27365
  data: p = []
27362
27366
  } = yn(Ho), {
@@ -27379,14 +27383,14 @@ const CM = {
27379
27383
  freezeLayout: m,
27380
27384
  inEditMode: !0
27381
27385
  }, children: /* @__PURE__ */ i(Ft.Provider, { value: k, children: /* @__PURE__ */ h(xi, { configure: I, children: [
27382
- /* @__PURE__ */ i(tl, { padding: 0, header: /* @__PURE__ */ i(WT, { saveDashboardChanges: x, headerSlot: l, headerMenuItems: c }), navbar: /* @__PURE__ */ i(gD, {}), styles: CM, children: /* @__PURE__ */ i(V, { className: `${o} dashboard-root`, sx: {
27386
+ /* @__PURE__ */ i(tl, { padding: 0, header: /* @__PURE__ */ i(jT, { saveDashboardChanges: x, headerSlot: l, headerMenuItems: c }), navbar: /* @__PURE__ */ i(bD, {}), styles: SM, children: /* @__PURE__ */ i(V, { className: `${o} dashboard-root`, sx: {
27383
27387
  position: "relative"
27384
- }, children: v.content.views.visibleViews.map((L) => /* @__PURE__ */ i(MT, { view: L }, L.id)) }) }),
27385
- /* @__PURE__ */ i(vM, {})
27388
+ }, children: v.content.views.visibleViews.map((L) => /* @__PURE__ */ i($T, { view: L }, L.id)) }) }),
27389
+ /* @__PURE__ */ i(wM, {})
27386
27390
  ] }) }) }) }) }) });
27387
- }, Qz = D(Ie(SM));
27391
+ }, Kz = D(Ie(kM));
27388
27392
  Mc();
27389
- const Kz = D(({
27393
+ const Uz = D(({
27390
27394
  context: t,
27391
27395
  dashboard: e,
27392
27396
  content: n,
@@ -27418,7 +27422,7 @@ const Kz = D(({
27418
27422
  inEditMode: !1
27419
27423
  }, children: /* @__PURE__ */ i(V, { className: `${r} dashboard-root`, children: /* @__PURE__ */ i(Ft.Provider, { value: p, children: /* @__PURE__ */ i(xi, { configure: u, children: d.content.views.visibleViews.map((f) => /* @__PURE__ */ i(Ra, { view: f }, f.id)) }) }) }) }) }) }) }) });
27420
27424
  });
27421
- var no = {}, kM = {
27425
+ var no = {}, TM = {
27422
27426
  get exports() {
27423
27427
  return no;
27424
27428
  },
@@ -27473,9 +27477,9 @@ var no = {}, kM = {
27473
27477
  };
27474
27478
  };
27475
27479
  });
27476
- })(kM);
27477
- const TM = no;
27478
- var ro = {}, DM = {
27480
+ })(TM);
27481
+ const DM = no;
27482
+ var ro = {}, IM = {
27479
27483
  get exports() {
27480
27484
  return ro;
27481
27485
  },
@@ -27497,9 +27501,9 @@ var ro = {}, DM = {
27497
27501
  };
27498
27502
  };
27499
27503
  });
27500
- })(DM);
27501
- const IM = ro;
27502
- var io = {}, MM = {
27504
+ })(IM);
27505
+ const MM = ro;
27506
+ var io = {}, $M = {
27503
27507
  get exports() {
27504
27508
  return io;
27505
27509
  },
@@ -27548,9 +27552,9 @@ var io = {}, MM = {
27548
27552
  };
27549
27553
  };
27550
27554
  });
27551
- })(MM);
27552
- const $M = io;
27553
- var oo = {}, zM = {
27555
+ })($M);
27556
+ const zM = io;
27557
+ var oo = {}, LM = {
27554
27558
  get exports() {
27555
27559
  return oo;
27556
27560
  },
@@ -27573,9 +27577,9 @@ var oo = {}, zM = {
27573
27577
  };
27574
27578
  };
27575
27579
  });
27576
- })(zM);
27577
- const LM = oo;
27578
- var ao = {}, AM = {
27580
+ })(LM);
27581
+ const AM = oo;
27582
+ var ao = {}, EM = {
27579
27583
  get exports() {
27580
27584
  return ao;
27581
27585
  },
@@ -27595,9 +27599,9 @@ var ao = {}, AM = {
27595
27599
  };
27596
27600
  };
27597
27601
  });
27598
- })(AM);
27599
- const EM = ao;
27600
- var so = {}, RM = {
27602
+ })(EM);
27603
+ const RM = ao;
27604
+ var so = {}, OM = {
27601
27605
  get exports() {
27602
27606
  return so;
27603
27607
  },
@@ -27733,9 +27737,9 @@ var so = {}, RM = {
27733
27737
  };
27734
27738
  };
27735
27739
  });
27736
- })(RM);
27737
- const OM = so;
27738
- var lo = {}, FM = {
27740
+ })(OM);
27741
+ const FM = so;
27742
+ var lo = {}, PM = {
27739
27743
  get exports() {
27740
27744
  return lo;
27741
27745
  },
@@ -27754,9 +27758,9 @@ var lo = {}, FM = {
27754
27758
  };
27755
27759
  };
27756
27760
  });
27757
- })(FM);
27758
- const PM = lo;
27759
- var co = {}, VM = {
27761
+ })(PM);
27762
+ const VM = lo;
27763
+ var co = {}, NM = {
27760
27764
  get exports() {
27761
27765
  return co;
27762
27766
  },
@@ -27895,9 +27899,9 @@ var co = {}, VM = {
27895
27899
  };
27896
27900
  };
27897
27901
  });
27898
- })(VM);
27899
- const NM = co;
27900
- var uo = {}, BM = {
27902
+ })(NM);
27903
+ const BM = co;
27904
+ var uo = {}, qM = {
27901
27905
  get exports() {
27902
27906
  return uo;
27903
27907
  },
@@ -27916,9 +27920,9 @@ var uo = {}, BM = {
27916
27920
  };
27917
27921
  };
27918
27922
  });
27919
- })(BM);
27920
- const qM = uo;
27921
- var ho = {}, WM = {
27923
+ })(qM);
27924
+ const WM = uo;
27925
+ var ho = {}, jM = {
27922
27926
  get exports() {
27923
27927
  return ho;
27924
27928
  },
@@ -27936,9 +27940,9 @@ var ho = {}, WM = {
27936
27940
  };
27937
27941
  };
27938
27942
  });
27939
- })(WM);
27940
- const jM = ho;
27941
- var po = {}, YM = {
27943
+ })(jM);
27944
+ const YM = ho;
27945
+ var po = {}, GM = {
27942
27946
  get exports() {
27943
27947
  return po;
27944
27948
  },
@@ -27956,9 +27960,9 @@ var po = {}, YM = {
27956
27960
  };
27957
27961
  };
27958
27962
  });
27959
- })(YM);
27960
- const GM = po;
27961
- var fo = {}, HM = {
27963
+ })(GM);
27964
+ const HM = po;
27965
+ var fo = {}, QM = {
27962
27966
  get exports() {
27963
27967
  return fo;
27964
27968
  },
@@ -27992,9 +27996,9 @@ var fo = {}, HM = {
27992
27996
  };
27993
27997
  };
27994
27998
  });
27995
- })(HM);
27996
- const QM = fo;
27997
- var mo = {}, KM = {
27999
+ })(QM);
28000
+ const KM = fo;
28001
+ var mo = {}, UM = {
27998
28002
  get exports() {
27999
28003
  return mo;
28000
28004
  },
@@ -28013,9 +28017,9 @@ var mo = {}, KM = {
28013
28017
  };
28014
28018
  };
28015
28019
  });
28016
- })(KM);
28017
- const UM = mo;
28018
- var go = {}, XM = {
28020
+ })(UM);
28021
+ const XM = mo;
28022
+ var go = {}, JM = {
28019
28023
  get exports() {
28020
28024
  return go;
28021
28025
  },
@@ -28033,9 +28037,9 @@ var go = {}, XM = {
28033
28037
  };
28034
28038
  };
28035
28039
  });
28036
- })(XM);
28037
- const JM = go;
28038
- var bo = {}, ZM = {
28040
+ })(JM);
28041
+ const ZM = go;
28042
+ var bo = {}, e$ = {
28039
28043
  get exports() {
28040
28044
  return bo;
28041
28045
  },
@@ -28053,9 +28057,9 @@ var bo = {}, ZM = {
28053
28057
  };
28054
28058
  };
28055
28059
  });
28056
- })(ZM);
28057
- const e$ = bo;
28058
- var yo = {}, t$ = {
28060
+ })(e$);
28061
+ const t$ = bo;
28062
+ var yo = {}, n$ = {
28059
28063
  get exports() {
28060
28064
  return yo;
28061
28065
  },
@@ -28074,9 +28078,9 @@ var yo = {}, t$ = {
28074
28078
  };
28075
28079
  };
28076
28080
  });
28077
- })(t$);
28078
- const n$ = yo;
28079
- var xo = {}, r$ = {
28081
+ })(n$);
28082
+ const r$ = yo;
28083
+ var xo = {}, i$ = {
28080
28084
  get exports() {
28081
28085
  return xo;
28082
28086
  },
@@ -28095,9 +28099,9 @@ var xo = {}, r$ = {
28095
28099
  };
28096
28100
  };
28097
28101
  });
28098
- })(r$);
28099
- const i$ = xo;
28100
- var vo = {}, o$ = {
28102
+ })(i$);
28103
+ const o$ = xo;
28104
+ var vo = {}, a$ = {
28101
28105
  get exports() {
28102
28106
  return vo;
28103
28107
  },
@@ -28116,9 +28120,9 @@ var vo = {}, o$ = {
28116
28120
  };
28117
28121
  };
28118
28122
  });
28119
- })(o$);
28120
- const a$ = vo;
28121
- var wo = {}, s$ = {
28123
+ })(a$);
28124
+ const s$ = vo;
28125
+ var wo = {}, l$ = {
28122
28126
  get exports() {
28123
28127
  return wo;
28124
28128
  },
@@ -28201,9 +28205,9 @@ var wo = {}, s$ = {
28201
28205
  };
28202
28206
  };
28203
28207
  });
28204
- })(s$);
28205
- const l$ = wo;
28206
- var _o = {}, c$ = {
28208
+ })(l$);
28209
+ const c$ = wo;
28210
+ var _o = {}, d$ = {
28207
28211
  get exports() {
28208
28212
  return _o;
28209
28213
  },
@@ -28232,9 +28236,9 @@ var _o = {}, c$ = {
28232
28236
  };
28233
28237
  };
28234
28238
  });
28235
- })(c$);
28236
- const d$ = _o;
28237
- var Co = {}, u$ = {
28239
+ })(d$);
28240
+ const u$ = _o;
28241
+ var Co = {}, h$ = {
28238
28242
  get exports() {
28239
28243
  return Co;
28240
28244
  },
@@ -28267,9 +28271,9 @@ var Co = {}, u$ = {
28267
28271
  };
28268
28272
  };
28269
28273
  });
28270
- })(u$);
28271
- const h$ = Co;
28272
- var So = {}, p$ = {
28274
+ })(h$);
28275
+ const p$ = Co;
28276
+ var So = {}, f$ = {
28273
28277
  get exports() {
28274
28278
  return So;
28275
28279
  },
@@ -28318,9 +28322,9 @@ var So = {}, p$ = {
28318
28322
  };
28319
28323
  };
28320
28324
  });
28321
- })(p$);
28322
- const f$ = So;
28323
- var ko = {}, m$ = {
28325
+ })(f$);
28326
+ const m$ = So;
28327
+ var ko = {}, g$ = {
28324
28328
  get exports() {
28325
28329
  return ko;
28326
28330
  },
@@ -28339,9 +28343,9 @@ var ko = {}, m$ = {
28339
28343
  });
28340
28344
  };
28341
28345
  });
28342
- })(m$);
28343
- const g$ = ko;
28344
- var To = {}, b$ = {
28346
+ })(g$);
28347
+ const b$ = ko;
28348
+ var To = {}, y$ = {
28345
28349
  get exports() {
28346
28350
  return To;
28347
28351
  },
@@ -28376,9 +28380,9 @@ var To = {}, b$ = {
28376
28380
  });
28377
28381
  };
28378
28382
  });
28379
- })(b$);
28380
- const y$ = To;
28381
- var Do = {}, x$ = {
28383
+ })(y$);
28384
+ const x$ = To;
28385
+ var Do = {}, v$ = {
28382
28386
  get exports() {
28383
28387
  return Do;
28384
28388
  },
@@ -28411,9 +28415,9 @@ var Do = {}, x$ = {
28411
28415
  };
28412
28416
  };
28413
28417
  });
28414
- })(x$);
28415
- const v$ = Do;
28416
- var Io = {}, w$ = {
28418
+ })(v$);
28419
+ const w$ = Do;
28420
+ var Io = {}, _$ = {
28417
28421
  get exports() {
28418
28422
  return Io;
28419
28423
  },
@@ -28462,9 +28466,9 @@ var Io = {}, w$ = {
28462
28466
  };
28463
28467
  };
28464
28468
  });
28465
- })(w$);
28466
- const _$ = Io;
28467
- var Mo = {}, C$ = {
28469
+ })(_$);
28470
+ const C$ = Io;
28471
+ var Mo = {}, S$ = {
28468
28472
  get exports() {
28469
28473
  return Mo;
28470
28474
  },
@@ -28533,9 +28537,9 @@ var Mo = {}, C$ = {
28533
28537
  };
28534
28538
  };
28535
28539
  });
28536
- })(C$);
28537
- const S$ = Mo;
28538
- var $o = {}, k$ = {
28540
+ })(S$);
28541
+ const k$ = Mo;
28542
+ var $o = {}, T$ = {
28539
28543
  get exports() {
28540
28544
  return $o;
28541
28545
  },
@@ -28553,9 +28557,9 @@ var $o = {}, k$ = {
28553
28557
  };
28554
28558
  };
28555
28559
  });
28556
- })(k$);
28557
- const T$ = $o;
28558
- var zo = {}, D$ = {
28560
+ })(T$);
28561
+ const D$ = $o;
28562
+ var zo = {}, I$ = {
28559
28563
  get exports() {
28560
28564
  return zo;
28561
28565
  },
@@ -28573,9 +28577,9 @@ var zo = {}, D$ = {
28573
28577
  };
28574
28578
  };
28575
28579
  });
28576
- })(D$);
28577
- const I$ = zo;
28578
- var Lo = {}, M$ = {
28580
+ })(I$);
28581
+ const M$ = zo;
28582
+ var Lo = {}, $$ = {
28579
28583
  get exports() {
28580
28584
  return Lo;
28581
28585
  },
@@ -28597,9 +28601,9 @@ var Lo = {}, M$ = {
28597
28601
  };
28598
28602
  };
28599
28603
  });
28600
- })(M$);
28601
- const $$ = Lo;
28602
- var Ao = {}, z$ = {
28604
+ })($$);
28605
+ const z$ = Lo;
28606
+ var Ao = {}, L$ = {
28603
28607
  get exports() {
28604
28608
  return Ao;
28605
28609
  },
@@ -28686,9 +28690,9 @@ var Ao = {}, z$ = {
28686
28690
  };
28687
28691
  };
28688
28692
  });
28689
- })(z$);
28690
- const L$ = Ao;
28691
- var Eo = {}, A$ = {
28693
+ })(L$);
28694
+ const A$ = Ao;
28695
+ var Eo = {}, E$ = {
28692
28696
  get exports() {
28693
28697
  return Eo;
28694
28698
  },
@@ -28707,9 +28711,9 @@ var Eo = {}, A$ = {
28707
28711
  };
28708
28712
  };
28709
28713
  });
28710
- })(A$);
28711
- const E$ = Eo;
28712
- var Ro = {}, R$ = {
28714
+ })(E$);
28715
+ const R$ = Eo;
28716
+ var Ro = {}, O$ = {
28713
28717
  get exports() {
28714
28718
  return Ro;
28715
28719
  },
@@ -28740,9 +28744,9 @@ var Ro = {}, R$ = {
28740
28744
  };
28741
28745
  };
28742
28746
  });
28743
- })(R$);
28744
- const O$ = Ro;
28745
- var Oo = {}, F$ = {
28747
+ })(O$);
28748
+ const F$ = Ro;
28749
+ var Oo = {}, P$ = {
28746
28750
  get exports() {
28747
28751
  return Oo;
28748
28752
  },
@@ -28761,55 +28765,55 @@ var Oo = {}, F$ = {
28761
28765
  };
28762
28766
  };
28763
28767
  });
28764
- })(F$);
28765
- const P$ = Oo;
28766
- ee.extend(TM);
28767
- ee.extend(IM);
28768
- ee.extend($M);
28769
- ee.extend(LM);
28770
- ee.extend(EM);
28771
- ee.extend(OM);
28772
- ee.extend(PM);
28773
- ee.extend(NM);
28774
- ee.extend(qM);
28775
- ee.extend(jM);
28776
- ee.extend(GM);
28777
- ee.extend(JM);
28778
- ee.extend(e$);
28779
- ee.extend(n$);
28780
- ee.extend(i$);
28781
- ee.extend(a$);
28782
- ee.extend(QM);
28783
- ee.extend(UM);
28784
- ee.extend(l$);
28785
- ee.extend(d$);
28786
- ee.extend(h$);
28787
- ee.extend(f$);
28788
- ee.extend(g$);
28789
- ee.extend(y$);
28790
- ee.extend(v$);
28791
- ee.extend(_$);
28792
- ee.extend(S$);
28793
- ee.extend(T$);
28794
- ee.extend(I$);
28795
- ee.extend($$);
28796
- ee.extend(L$);
28797
- ee.extend(O$);
28798
- ee.extend(P$);
28799
- ee.extend(E$);
28768
+ })(P$);
28769
+ const V$ = Oo;
28770
+ ee.extend(DM);
28771
+ ee.extend(MM);
28772
+ ee.extend(zM);
28773
+ ee.extend(AM);
28774
+ ee.extend(RM);
28775
+ ee.extend(FM);
28776
+ ee.extend(VM);
28777
+ ee.extend(BM);
28778
+ ee.extend(WM);
28779
+ ee.extend(YM);
28780
+ ee.extend(HM);
28781
+ ee.extend(ZM);
28782
+ ee.extend(t$);
28783
+ ee.extend(r$);
28784
+ ee.extend(o$);
28785
+ ee.extend(s$);
28786
+ ee.extend(KM);
28787
+ ee.extend(XM);
28788
+ ee.extend(c$);
28789
+ ee.extend(u$);
28790
+ ee.extend(p$);
28791
+ ee.extend(m$);
28792
+ ee.extend(b$);
28793
+ ee.extend(x$);
28794
+ ee.extend(w$);
28795
+ ee.extend(C$);
28796
+ ee.extend(k$);
28797
+ ee.extend(D$);
28798
+ ee.extend(M$);
28799
+ ee.extend(z$);
28800
+ ee.extend(A$);
28801
+ ee.extend(F$);
28802
+ ee.extend(V$);
28803
+ ee.extend(R$);
28800
28804
  ee.tz.setDefault("UTC");
28801
- const Uz = () => Promise.resolve().then(() => bf).then(({
28805
+ const Xz = () => Promise.resolve().then(() => bf).then(({
28802
28806
  version: t
28803
28807
  }) => (console.log(`[@devtable/dashboard] version: ${t}`), t));
28804
28808
  export {
28805
28809
  La as ContentModel,
28806
28810
  Kl as ContentModelContextProvider,
28807
28811
  Yp as ContextModel,
28808
- Qz as DashboardEditor,
28812
+ Kz as DashboardEditor,
28809
28813
  gd as DashboardFilterType,
28810
28814
  Ik as DashboardMode,
28811
28815
  Bk as DashboardModel,
28812
- MT as DashboardViewEditor,
28816
+ $T as DashboardViewEditor,
28813
28817
  Ra as DashboardViewRender,
28814
28818
  le as EViewComponentType,
28815
28819
  ps as FilterModel,
@@ -28823,22 +28827,22 @@ export {
28823
28827
  Dk as PanelsModel,
28824
28828
  qp as QueriesModel,
28825
28829
  Bp as QueryModel,
28826
- Kz as ReadOnlyDashboard,
28830
+ Uz as ReadOnlyDashboard,
28827
28831
  Wp as SQLSnippetModel,
28828
28832
  jp as SQLSnippetsModel,
28829
28833
  Mk as ViewComponentTypeBackground,
28830
- Yz as ViewComponentTypeColor,
28831
- jz as ViewComponentTypeName,
28834
+ Gz as ViewComponentTypeColor,
28835
+ Yz as ViewComponentTypeName,
28832
28836
  Rk as ViewModel,
28833
28837
  Ok as ViewsModel,
28834
- Hz as applyPartialDashboard,
28838
+ Qz as applyPartialDashboard,
28835
28839
  Pk as createContentModel,
28836
28840
  wd as createDashboardModel,
28837
28841
  vd as createDashboardViewsModel,
28838
28842
  Lp as getInitialFiltersPayload,
28839
28843
  Tk as getNewPanel,
28840
- Uz as getVersion,
28841
- Gz as initialDashboardContent,
28844
+ Xz as getVersion,
28845
+ Hz as initialDashboardContent,
28842
28846
  ne as useContentModelContext,
28843
28847
  Cf as useFullScreenPanelContext,
28844
28848
  Le as useModelContext,