@turquoisehealth/pit-viper 2.201.0 → 2.201.1-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10006,50 +10006,40 @@ var Dl = /* @__PURE__ */ function(e) {
|
|
|
10006
10006
|
},
|
|
10007
10007
|
emits: ["handle-settings-icon"],
|
|
10008
10008
|
setup(e) {
|
|
10009
|
-
let n = m(kc, O(null)), c = m(Mc, O([])), d = m(jc, O(null)), f = m(Zc, O(!1)), p = e, { filterModelCleared: h, stagedFilterModel: g, filterModel: _, initStagedSelectedValues: v, clearStagedSelectedValues: b, filterValuesMap: x, fetchFilterValues: S, filterValuesLoadingStatus: C } = ju(), w = O(!1), T = O(!1), D = O(""), A = r(() => c.value.flatMap((e) => Rl(e))), j = r(() => c.value.flatMap((e) => $(e).filterGroup?.fields ?? [])), M = (e) => {
|
|
10010
|
-
let t = _.value;
|
|
10011
|
-
if (!t) return !1;
|
|
10012
|
-
let n = Bl(e) ? Rl(e) : [e.field || ""];
|
|
10013
|
-
if (f.value) {
|
|
10014
|
-
let e = /* @__PURE__ */ new Set();
|
|
10015
|
-
return ee(t, e), n.some((t) => e.has(t));
|
|
10016
|
-
}
|
|
10017
|
-
let r = t;
|
|
10018
|
-
return n.some((e) => !!r[e]);
|
|
10019
|
-
}, N = r(() => c.value.filter((e) => au(e) && !A.value.includes(e.field || "") && !j.value.includes(e.field || "") && (!p.readOnly || M(e))).sort((e, t) => {
|
|
10009
|
+
let n = m(kc, O(null)), c = m(Mc, O([])), d = m(jc, O(null)), f = m(Zc, O(!1)), p = e, { filterModelCleared: h, stagedFilterModel: g, filterModel: _, initStagedSelectedValues: v, clearStagedSelectedValues: b, filterValuesMap: x, fetchFilterValues: S, filterValuesLoadingStatus: C } = ju(), w = O(!1), T = O(!1), D = O(""), A = r(() => c.value.flatMap((e) => Rl(e))), j = r(() => c.value.flatMap((e) => $(e).filterGroup?.fields ?? [])), M = r(() => c.value.filter((e) => au(e) && !A.value.includes(e.field || "") && !j.value.includes(e.field || "")).sort((e, t) => {
|
|
10020
10010
|
let n = Bl(e), r = Bl(t);
|
|
10021
10011
|
return n && !r ? -1 : !n && r ? 1 : 0;
|
|
10022
|
-
})),
|
|
10012
|
+
})), N = r(() => M.value), F = r(() => {
|
|
10023
10013
|
let e = D.value?.trim().toLowerCase() || "";
|
|
10024
|
-
return !e || e === "" ?
|
|
10014
|
+
return !e || e === "" ? N.value : c.value.filter((t) => {
|
|
10025
10015
|
let n = t.headerName?.toLowerCase() || t.field?.toLowerCase();
|
|
10026
10016
|
return n ? n.includes(e) : !1;
|
|
10027
10017
|
});
|
|
10028
|
-
}),
|
|
10029
|
-
let e = [...
|
|
10018
|
+
}), L = r(() => {
|
|
10019
|
+
let e = [...M.value].slice(0, p.maxHorizontalFilters);
|
|
10030
10020
|
return d.value ? [...e.slice(0, p.maxHorizontalFilters - 1), d.value] : e;
|
|
10031
|
-
}),
|
|
10021
|
+
}), R = (e, t) => {
|
|
10032
10022
|
if (!e || typeof e != "object") return;
|
|
10033
10023
|
let n = e;
|
|
10034
10024
|
if (n.filterType && n.filterType !== "join" && n.colId) {
|
|
10035
10025
|
t.add(n.colId);
|
|
10036
10026
|
return;
|
|
10037
10027
|
}
|
|
10038
|
-
n.filterType === "join" && Array.isArray(n.conditions) && n.conditions.forEach((e) =>
|
|
10039
|
-
},
|
|
10028
|
+
n.filterType === "join" && Array.isArray(n.conditions) && n.conditions.forEach((e) => R(e, t));
|
|
10029
|
+
}, ee = r(() => {
|
|
10040
10030
|
let e = _.value;
|
|
10041
10031
|
if (f.value && n.value) {
|
|
10042
10032
|
let t = /* @__PURE__ */ new Set();
|
|
10043
|
-
return
|
|
10033
|
+
return R(e, t), t.size;
|
|
10044
10034
|
}
|
|
10045
10035
|
let t = _.value || {};
|
|
10046
10036
|
return Object.keys(t).length;
|
|
10047
|
-
}),
|
|
10048
|
-
|
|
10049
|
-
},
|
|
10037
|
+
}), z = O(!1), B = () => {
|
|
10038
|
+
z.value = !0;
|
|
10039
|
+
}, te = () => {
|
|
10050
10040
|
if (n.value) {
|
|
10051
|
-
|
|
10052
|
-
for (let e of
|
|
10041
|
+
z.value = !1, v(), f.value ? g.value = n.value.getAdvancedFilterModel() : g.value = n.value.getFilterModel(), w.value = !0;
|
|
10042
|
+
for (let e of N.value) {
|
|
10053
10043
|
let t = e.field;
|
|
10054
10044
|
if (!t) continue;
|
|
10055
10045
|
let r = (x.value[t] || []).length > 0, i = C.value[t] === !0;
|
|
@@ -10060,17 +10050,17 @@ var Dl = /* @__PURE__ */ function(e) {
|
|
|
10060
10050
|
});
|
|
10061
10051
|
}
|
|
10062
10052
|
}
|
|
10063
|
-
}, { clearAllFocuses:
|
|
10064
|
-
n.value && (g.value = null, f.value ? n.value.setAdvancedFilterModel(null) : (n.value.setFilterModel(null), n.value.onFilterChanged()), h.value += 1,
|
|
10065
|
-
},
|
|
10053
|
+
}, { clearAllFocuses: ne } = gl(), V = () => {
|
|
10054
|
+
n.value && (g.value = null, f.value ? n.value.setAdvancedFilterModel(null) : (n.value.setFilterModel(null), n.value.onFilterChanged()), h.value += 1, ne(), T.value = !1);
|
|
10055
|
+
}, U = () => {
|
|
10066
10056
|
w.value = !1, D.value = "";
|
|
10057
|
+
}, W = () => {
|
|
10058
|
+
b(), g.value = null, U();
|
|
10067
10059
|
}, G = () => {
|
|
10068
|
-
b(), g.value = null,
|
|
10069
|
-
}, re = () => {
|
|
10070
|
-
b(), B.value && n.value && (f.value ? n.value.setAdvancedFilterModel(g.value) : (n.value.setFilterModel(g.value), n.value.onFilterChanged())), g.value = null, W();
|
|
10060
|
+
b(), z.value && n.value && (f.value ? n.value.setAdvancedFilterModel(g.value) : (n.value.setFilterModel(g.value), n.value.onFilterChanged())), g.value = null, U();
|
|
10071
10061
|
};
|
|
10072
10062
|
return (e, r) => (E(), o(t, null, [s("div", Zu, [
|
|
10073
|
-
(E(!0), o(t, null, k(
|
|
10063
|
+
(E(!0), o(t, null, k(L.value, (s) => (E(), o(t, { key: s.field }, [I(n) ? (E(), i(Xu, {
|
|
10074
10064
|
key: 0,
|
|
10075
10065
|
"enable-focus-view": p.enableFocusView,
|
|
10076
10066
|
"display-preferences-icon": p.displayPreferencesIcon,
|
|
@@ -10088,19 +10078,19 @@ var Dl = /* @__PURE__ */ function(e) {
|
|
|
10088
10078
|
s("div", Qu, [p.enableVerticalPanel ? (E(), i(I(An), {
|
|
10089
10079
|
key: 0,
|
|
10090
10080
|
label: "All Filters",
|
|
10091
|
-
onClick:
|
|
10081
|
+
onClick: te,
|
|
10092
10082
|
variant: "ghost",
|
|
10093
10083
|
"left-icon": "filter"
|
|
10094
|
-
})) : a("", !0),
|
|
10084
|
+
})) : a("", !0), ee.value > 0 && !p.readOnly ? (E(), o("button", {
|
|
10095
10085
|
key: 1,
|
|
10096
10086
|
class: "pv-button-ghost",
|
|
10097
10087
|
onClick: r[1] ||= (e) => T.value = !0
|
|
10098
10088
|
}, [
|
|
10099
10089
|
u(I(En), { name: "close" }),
|
|
10100
10090
|
r[13] ||= l(" Clear All Filters ", -1),
|
|
10101
|
-
|
|
10091
|
+
ee.value > 0 ? (E(), i(I(Dn), {
|
|
10102
10092
|
key: 0,
|
|
10103
|
-
value:
|
|
10093
|
+
value: ee.value,
|
|
10104
10094
|
variant: "tertiary"
|
|
10105
10095
|
}, null, 8, ["value"])) : a("", !0)
|
|
10106
10096
|
])) : a("", !0)]),
|
|
@@ -10110,16 +10100,16 @@ var Dl = /* @__PURE__ */ function(e) {
|
|
|
10110
10100
|
"onUpdate:modelValue": r[9] ||= (e) => w.value = e,
|
|
10111
10101
|
class: "pv-drawer pv-surface",
|
|
10112
10102
|
"close-on-click-outside": !0,
|
|
10113
|
-
onClickOutside: r[10] ||= (e) =>
|
|
10103
|
+
onClickOutside: r[10] ||= (e) => G(),
|
|
10114
10104
|
style: {
|
|
10115
10105
|
"max-width": "450px",
|
|
10116
10106
|
"z-index": "10"
|
|
10117
10107
|
}
|
|
10118
10108
|
}, {
|
|
10119
|
-
header: H(() => [s("div", $u, [s("p", ed, "All Filters (" + P(
|
|
10109
|
+
header: H(() => [s("div", $u, [s("p", ed, "All Filters (" + P(N.value.length) + ")", 1), s("button", {
|
|
10120
10110
|
class: "pv-button-ghost",
|
|
10121
10111
|
"aria-label": "Close",
|
|
10122
|
-
onClick: r[2] ||= (e) =>
|
|
10112
|
+
onClick: r[2] ||= (e) => W()
|
|
10123
10113
|
}, [u(I(En), { name: "close" })])]), u(I(qi), {
|
|
10124
10114
|
modelValue: D.value,
|
|
10125
10115
|
"onUpdate:modelValue": r[3] ||= (e) => D.value = e,
|
|
@@ -10129,28 +10119,28 @@ var Dl = /* @__PURE__ */ function(e) {
|
|
|
10129
10119
|
key: 1,
|
|
10130
10120
|
variant: "ghost",
|
|
10131
10121
|
label: "Close",
|
|
10132
|
-
onClick: r[8] ||= (e) =>
|
|
10122
|
+
onClick: r[8] ||= (e) => W()
|
|
10133
10123
|
})) : (E(), o(t, { key: 0 }, [s("button", {
|
|
10134
10124
|
class: "pv-button-ghost",
|
|
10135
|
-
onClick: r[5] ||= (e) =>
|
|
10125
|
+
onClick: r[5] ||= (e) => V()
|
|
10136
10126
|
}, "Clear All"), s("div", sd, [u(I(An), {
|
|
10137
10127
|
variant: "ghost",
|
|
10138
10128
|
label: "Cancel",
|
|
10139
|
-
onClick: r[6] ||= (e) =>
|
|
10140
|
-
}),
|
|
10129
|
+
onClick: r[6] ||= (e) => W()
|
|
10130
|
+
}), z.value ? (E(), i(I(An), {
|
|
10141
10131
|
key: 0,
|
|
10142
10132
|
variant: "primary",
|
|
10143
10133
|
label: "Apply",
|
|
10144
|
-
onClick: r[7] ||= (e) =>
|
|
10134
|
+
onClick: r[7] ||= (e) => G()
|
|
10145
10135
|
})) : (E(), i(I(An), {
|
|
10146
10136
|
key: 1,
|
|
10147
10137
|
variant: "primary",
|
|
10148
10138
|
label: "No Changes",
|
|
10149
10139
|
disabled: ""
|
|
10150
10140
|
}))])], 64))])]),
|
|
10151
|
-
default: H(() => [s("div", td, [s("div", nd, [(E(!0), o(t, null, k(
|
|
10141
|
+
default: H(() => [s("div", td, [s("div", nd, [(E(!0), o(t, null, k(F.value, (t, c) => (E(), o("div", {
|
|
10152
10142
|
key: t.field,
|
|
10153
|
-
class: y([{ "pv-border-bottom": c <
|
|
10143
|
+
class: y([{ "pv-border-bottom": c < F.value.length - 1 }, "pv-stack-12"])
|
|
10154
10144
|
}, [s("details", rd, [s("summary", id, [s("span", ad, P(t.headerName), 1)]), s("div", null, [I(n) ? (E(), i(Xu, {
|
|
10155
10145
|
key: 0,
|
|
10156
10146
|
"filter-style": "vertical",
|
|
@@ -10159,7 +10149,7 @@ var Dl = /* @__PURE__ */ function(e) {
|
|
|
10159
10149
|
"display-preferences-icon": p.displayPreferencesIcon,
|
|
10160
10150
|
"focus-text": p.focusText,
|
|
10161
10151
|
"read-only": p.readOnly,
|
|
10162
|
-
onFilterSelectionChanged:
|
|
10152
|
+
onFilterSelectionChanged: B,
|
|
10163
10153
|
onHandleSettingsIcon: r[4] ||= (t) => e.$emit("handle-settings-icon", t)
|
|
10164
10154
|
}, null, 8, [
|
|
10165
10155
|
"enable-focus-view",
|
|
@@ -10186,7 +10176,7 @@ var Dl = /* @__PURE__ */ function(e) {
|
|
|
10186
10176
|
label: "Clear All Filters",
|
|
10187
10177
|
variant: "primary",
|
|
10188
10178
|
size: "lg",
|
|
10189
|
-
onClick:
|
|
10179
|
+
onClick: V
|
|
10190
10180
|
})])]),
|
|
10191
10181
|
_: 1
|
|
10192
10182
|
}, 8, ["modelValue"])], 64));
|