@devtable/dashboard 13.27.11 → 13.27.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dashboard.es.js
CHANGED
|
@@ -6126,7 +6126,7 @@ class vl {
|
|
|
6126
6126
|
}), this.instanceRegistry.clear(), this.factoryRegistry.clear();
|
|
6127
6127
|
}
|
|
6128
6128
|
}
|
|
6129
|
-
const gp = "13.27.
|
|
6129
|
+
const gp = "13.27.12", Cw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6130
6130
|
__proto__: null,
|
|
6131
6131
|
version: gp
|
|
6132
6132
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -27487,13 +27487,13 @@ const V$ = ({
|
|
|
27487
27487
|
const s = lt(), a = !!t.options_query_id, {
|
|
27488
27488
|
state: o,
|
|
27489
27489
|
error: l
|
|
27490
|
-
} = s.getDataStuffByID(t.options_query_id), c = o === "loading", d = t.min_width ? t.min_width : "200px", u = a ? c : !1, h = (p) => i(
|
|
27490
|
+
} = s.getDataStuffByID(t.options_query_id), c = o === "loading", d = t.min_width ? t.min_width : "200px", u = a ? c : !1, h = T(() => t.initialSelection(n), [n, t.initialSelection]), p = (m) => i(m, !1);
|
|
27491
27491
|
return /* @__PURE__ */ r.jsx(q$, { label: e, options: t.options, style: {
|
|
27492
27492
|
minWidth: "160px",
|
|
27493
27493
|
width: d,
|
|
27494
27494
|
maxWidth: u ? d : "unset",
|
|
27495
27495
|
borderColor: "#e9ecef"
|
|
27496
|
-
}, disabled: u, value:
|
|
27496
|
+
}, disabled: u, value: [...h], onChange: p, errorMessage: l, required: t.required });
|
|
27497
27497
|
}), W$ = pe(({
|
|
27498
27498
|
label: e,
|
|
27499
27499
|
description: t,
|
|
@@ -28713,8 +28713,12 @@ const gP = x.model("FilterDateRangeConfigMeta", {
|
|
|
28713
28713
|
default_selection_count: l
|
|
28714
28714
|
});
|
|
28715
28715
|
},
|
|
28716
|
-
get
|
|
28717
|
-
|
|
28716
|
+
get defaultSelection() {
|
|
28717
|
+
const t = e.filter.formattedDefaultValue;
|
|
28718
|
+
return Array.isArray(t) && t.length > 0 || !e.usingQuery ? t : e.options.slice(0, e.default_selection_count).map((n) => n.value);
|
|
28719
|
+
},
|
|
28720
|
+
initialSelection(t) {
|
|
28721
|
+
return t || this.defaultSelection;
|
|
28718
28722
|
},
|
|
28719
28723
|
truthy(t) {
|
|
28720
28724
|
return Array.isArray(t) && t.length > 0;
|
|
@@ -28729,12 +28733,12 @@ const gP = x.model("FilterDateRangeConfigMeta", {
|
|
|
28729
28733
|
setDefaultSelection() {
|
|
28730
28734
|
if (e.optionsLoading)
|
|
28731
28735
|
return;
|
|
28732
|
-
const t = ft(e).content.filters, n = et(e).key, i = new Set(e.options.map((
|
|
28733
|
-
|
|
28736
|
+
const t = ft(e).content.filters, n = et(e).key, i = new Set(e.options.map((o) => o.value)), a = (t.values[n] ?? []).filter((o) => i.has(o));
|
|
28737
|
+
a.length > 0 ? (console.debug(`setting filter[${e.filter.key}] to validValues: `, JSON.stringify(a)), t.setValueByKey(n, a)) : (console.debug(`setting filter[${e.filter.key}] to default: `, JSON.stringify(e.defaultSelection)), t.setValueByKey(n, e.defaultSelection));
|
|
28734
28738
|
}
|
|
28735
28739
|
})).actions((e) => ({
|
|
28736
28740
|
afterCreate() {
|
|
28737
|
-
dn(e, Bt(() => Qn(e.
|
|
28741
|
+
dn(e, Bt(() => Qn(e.defaultSelection), e.setDefaultSelection, {
|
|
28738
28742
|
fireImmediately: !0,
|
|
28739
28743
|
delay: 0
|
|
28740
28744
|
}));
|
|
@@ -29828,13 +29832,13 @@ const _x = x.model("FiltersRenderModel", {
|
|
|
29828
29832
|
}
|
|
29829
29833
|
})).actions((e) => ({
|
|
29830
29834
|
setValues(t) {
|
|
29831
|
-
e.values = t;
|
|
29835
|
+
console.debug("setting filter values: ", JSON.stringify(t)), e.values = t;
|
|
29832
29836
|
},
|
|
29833
29837
|
patchValues(t) {
|
|
29834
29838
|
e.values = C.defaults({}, t, e.values);
|
|
29835
29839
|
},
|
|
29836
29840
|
setValueByKey(t, n) {
|
|
29837
|
-
e.values = {
|
|
29841
|
+
console.debug(`setting filter[${t}] to value: `, JSON.stringify(n)), e.values = {
|
|
29838
29842
|
...e.values,
|
|
29839
29843
|
[t]: n
|
|
29840
29844
|
};
|