@turquoisehealth/pit-viper 2.189.1-dev.1 → 2.189.2-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.
- package/package.json +1 -1
- package/pv-components/dist/stats/vue/base/stats.html +1 -1
- package/pv-components/dist/stats/vue/visualizations/stats.html +1 -1
- package/pv-components/dist/stats/web/pv-menu-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-multi-select-button-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-query-builder-input-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-select-button-stats.html +1 -1
- package/pv-components/dist/vue/base/components/base/PvMenu/types.d.ts +2 -0
- package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +3 -0
- package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/types.d.ts +2 -0
- package/pv-components/dist/vue/base/pv-components-base.mjs +372 -353
- package/pv-components/dist/vue/base/pv-components-base.mjs.map +1 -1
- package/pv-components/dist/vue/visualizations/components/base/PvMenu/types.d.ts +2 -0
- package/pv-components/dist/vue/visualizations/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +3 -0
- package/pv-components/dist/vue/visualizations/components/base/PvMultiSelectButton/types.d.ts +2 -0
- package/pv-components/dist/vue/visualizations/components/charts/PvChart/constants.d.ts +1 -0
- package/pv-components/dist/vue/visualizations/components/charts/PvDataTableWithChart/types.d.ts +2 -0
- package/pv-components/dist/vue/visualizations/components/tables/PvDataTable/table-components/FilterPanel.vue.d.ts +1 -0
- package/pv-components/dist/vue/visualizations/components/tables/PvDataTable/table-components/SetFilter.vue.d.ts +1 -0
- package/pv-components/dist/vue/visualizations/components/tables/PvDataTable/types.d.ts +2 -0
- package/pv-components/dist/vue/visualizations/components/tables/PvDataTable/useSetFilter.d.ts +1 -0
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +703 -643
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs.map +1 -1
- package/pv-components/dist/web/components/pv-menu/pv-menu.js +22 -16
- package/pv-components/dist/web/components/pv-multi-select-button/pv-multi-select-button.js +41 -22
- package/pv-components/dist/web/components/pv-query-builder-input/pv-query-builder-input.js +412 -410
- package/pv-components/dist/web/components/pv-select-button/pv-select-button.js +726 -720
- package/pv-components/dist/web/pv-components.iife.js +1 -1
- package/pv-components/dist/web/pv-components.iife.js.map +1 -1
|
@@ -1940,7 +1940,7 @@ var Ar = Symbol("SelectedItemsKey"), jr = Symbol("EnableCascadeSelectionKey"), M
|
|
|
1940
1940
|
}, null, 8, ["name"])], 8, zr)) : a("v-if", !0)
|
|
1941
1941
|
], 14, Lr));
|
|
1942
1942
|
}
|
|
1943
|
-
}), [["styles", [".pv-menu-item-disabled[data-v-
|
|
1943
|
+
}), [["styles", [".pv-menu-item-disabled[data-v-2deec5f6]{pointer-events:none;color:#7d898d;border-radius:4px}.pv-menu-item{&[data-v-2deec5f6]{cursor:pointer;border-radius:var(--popover-list-item-radius,4px);transition-property:background-color;transition-duration:.15s}&[data-v-2deec5f6]:hover,&[data-v-2deec5f6]:focus-visible{background-color:var(--popover-list-item-hover-background-color,#f5f5f5)}&[data-v-2deec5f6]:active{background-color:var(--popover-list-item-pressed-background-color,#ebebeb)}}.pv-radio[data-v-2deec5f6]:indeterminate{background-color:unset!important;border-color:var(--color-border,#e3e7ea)!important}.pv-menu-item-expand-chevron[data-v-2deec5f6]{flex-shrink:0;margin-left:auto;padding:4px}.pv-menu-item-disabled .pv-menu-item-expand-chevron[data-v-2deec5f6]{pointer-events:auto;color:inherit}"]], ["__scopeId", "data-v-2deec5f6"]]), Vr = ["data-active"], Hr = { key: 0 }, Ur = 4, Wr = /* @__PURE__ */ f({
|
|
1944
1944
|
inheritAttrs: !1,
|
|
1945
1945
|
__name: "PvMenuItem",
|
|
1946
1946
|
props: /* @__PURE__ */ v({
|
|
@@ -1989,10 +1989,10 @@ var Ar = Symbol("SelectedItemsKey"), jr = Symbol("EnableCascadeSelectionKey"), M
|
|
|
1989
1989
|
}, w = r(() => ({ paddingLeft: `${i.level * 12 + 12}px` })), T = r(() => {
|
|
1990
1990
|
let { level: e, config: t, itemClass: n, ...r } = i;
|
|
1991
1991
|
return r;
|
|
1992
|
-
}), E = r(() => (v.value.length > 0 || (i.totalChildCount ?? 0) > 0) && i.level < Ur), O = r(() => E.value ? l.value ? m.value : !0 : !1), k = r(() => m.value ? "chevron-down" : "chevron-right"), A = (e) => s && Array.isArray(s.value) ? s.value.some((t) => t.id === e.id) : c.value.includes(e.id), N =
|
|
1992
|
+
}), E = r(() => (v.value.length > 0 || (i.totalChildCount ?? 0) > 0) && i.level < Ur), O = r(() => E.value ? l.value ? m.value || !!i.disabled : !0 : !1), k = r(() => m.value ? "chevron-down" : "chevron-right"), A = (e) => s && Array.isArray(s.value) ? s.value.some((t) => t.id === e.id) : c.value.includes(e.id), N = (e) => A(e) ? !0 : f?.value?.has(i.id) ? !(p?.value?.get(i.id))?.has(e.id) : !1, te = n, P = r(() => g.value || i.totalChildCount == null ? !1 : i.totalChildCount > v.value.length), F = async () => {
|
|
1993
1993
|
if (h.value) return;
|
|
1994
1994
|
if (!i.handleSeeMore) {
|
|
1995
|
-
|
|
1995
|
+
te("see-more", {
|
|
1996
1996
|
parentId: i.id,
|
|
1997
1997
|
offset: v.value.length
|
|
1998
1998
|
});
|
|
@@ -2024,7 +2024,7 @@ var Ar = Symbol("SelectedItemsKey"), jr = Symbol("EnableCascadeSelectionKey"), M
|
|
|
2024
2024
|
} finally {
|
|
2025
2025
|
h.value = !1;
|
|
2026
2026
|
}
|
|
2027
|
-
},
|
|
2027
|
+
}, ne = (e) => {
|
|
2028
2028
|
if (l.value && E.value && e.option.id === i.id && !d.value) {
|
|
2029
2029
|
S();
|
|
2030
2030
|
return;
|
|
@@ -2033,9 +2033,9 @@ var Ar = Symbol("SelectedItemsKey"), jr = Symbol("EnableCascadeSelectionKey"), M
|
|
|
2033
2033
|
let t = c.value.indexOf(e.option.id);
|
|
2034
2034
|
t > -1 ? c.value = [...c.value.slice(0, t), ...c.value.slice(t + 1)] : c.value = [...c.value, e.option.id];
|
|
2035
2035
|
}
|
|
2036
|
-
|
|
2037
|
-
},
|
|
2038
|
-
|
|
2036
|
+
te("handle-selected", e);
|
|
2037
|
+
}, I = (e) => {
|
|
2038
|
+
te("handle-selected", e);
|
|
2039
2039
|
};
|
|
2040
2040
|
return (n, r) => {
|
|
2041
2041
|
let s = ee("PvMenuItem", !0);
|
|
@@ -2047,7 +2047,7 @@ var Ar = Symbol("SelectedItemsKey"), jr = Symbol("EnableCascadeSelectionKey"), M
|
|
|
2047
2047
|
showChevron: re(l) && E.value,
|
|
2048
2048
|
chevronIcon: k.value,
|
|
2049
2049
|
expanded: m.value,
|
|
2050
|
-
onHandleSelected:
|
|
2050
|
+
onHandleSelected: ne,
|
|
2051
2051
|
onToggleExpanded: S,
|
|
2052
2052
|
selected: A(i)
|
|
2053
2053
|
}), null, 16, [
|
|
@@ -2063,32 +2063,34 @@ var Ar = Symbol("SelectedItemsKey"), jr = Symbol("EnableCascadeSelectionKey"), M
|
|
|
2063
2063
|
key: 0,
|
|
2064
2064
|
role: "list",
|
|
2065
2065
|
style: C(w.value)
|
|
2066
|
-
}, [(D(!0), o(t, null, M(v.value, (t) => (D(), o("li", {
|
|
2066
|
+
}, [(D(!0), o(t, null, M(v.value, (t) => de((D(), o("li", {
|
|
2067
2067
|
key: t.id,
|
|
2068
2068
|
"data-active": A(t) ? "true" : null,
|
|
2069
2069
|
class: x(e.itemClass)
|
|
2070
2070
|
}, [u(s, y({ ref_for: !0 }, t, {
|
|
2071
|
+
disabled: i.disabled || t.disabled,
|
|
2071
2072
|
selectedIds: c.value,
|
|
2072
2073
|
"onUpdate:selectedIds": r[0] ||= (e) => c.value = e,
|
|
2073
2074
|
config: t.config ?? e.config,
|
|
2074
2075
|
queryText: e.queryText,
|
|
2075
2076
|
highlightSearchText: e.highlightSearchText,
|
|
2076
2077
|
level: e.level + 1,
|
|
2077
|
-
onHandleSelected:
|
|
2078
|
-
onSeeMore: r[1] ||= (e) =>
|
|
2078
|
+
onHandleSelected: I,
|
|
2079
|
+
onSeeMore: r[1] ||= (e) => te("see-more", e)
|
|
2079
2080
|
}), null, 16, [
|
|
2081
|
+
"disabled",
|
|
2080
2082
|
"selectedIds",
|
|
2081
2083
|
"config",
|
|
2082
2084
|
"queryText",
|
|
2083
2085
|
"highlightSearchText",
|
|
2084
2086
|
"level"
|
|
2085
|
-
])], 10, Vr))), 128)),
|
|
2087
|
+
])], 10, Vr)), [[ce, !i.disabled || N(t)]])), 128)), P.value ? (D(), o("li", Hr, [u(Er, {
|
|
2086
2088
|
class: "pv-text-brand",
|
|
2087
2089
|
variant: "ghost",
|
|
2088
2090
|
label: "See more",
|
|
2089
2091
|
loading: h.value,
|
|
2090
2092
|
"data-testid": "pv-menu-item-see-more",
|
|
2091
|
-
onClick:
|
|
2093
|
+
onClick: F
|
|
2092
2094
|
}, null, 8, ["loading"])])) : a("v-if", !0)], 4)) : a("v-if", !0)], 64);
|
|
2093
2095
|
};
|
|
2094
2096
|
}
|
|
@@ -2106,7 +2108,8 @@ var Ar = Symbol("SelectedItemsKey"), jr = Symbol("EnableCascadeSelectionKey"), M
|
|
|
2106
2108
|
isLoading: { type: Boolean },
|
|
2107
2109
|
singleSelect: { type: Boolean },
|
|
2108
2110
|
enableCascadeSelection: { type: Boolean },
|
|
2109
|
-
hasMoreOptions: { type: Boolean }
|
|
2111
|
+
hasMoreOptions: { type: Boolean },
|
|
2112
|
+
readOnly: { type: Boolean }
|
|
2110
2113
|
}, {
|
|
2111
2114
|
selectedItems: { default: () => [] },
|
|
2112
2115
|
selectedItemsModifiers: {}
|
|
@@ -2120,6 +2123,7 @@ var Ar = Symbol("SelectedItemsKey"), jr = Symbol("EnableCascadeSelectionKey"), M
|
|
|
2120
2123
|
e !== c.value && (c.value = e);
|
|
2121
2124
|
}), O(Ar, l), O(jr, r(() => !!i.enableCascadeSelection));
|
|
2122
2125
|
let d = _(Mr, void 0), f = _(Fr, j(!1)), p = _(Nr, void 0), m = _(Pr, void 0), h = r(() => i.singleSelect || i.config?.variant === "radio"), g = (e) => {
|
|
2126
|
+
if (i.readOnly) return;
|
|
2123
2127
|
let t = e.option, n;
|
|
2124
2128
|
if (i.enableCascadeSelection && t.children?.length) {
|
|
2125
2129
|
let e;
|
|
@@ -2154,23 +2158,25 @@ var Ar = Symbol("SelectedItemsKey"), jr = Symbol("EnableCascadeSelectionKey"), M
|
|
|
2154
2158
|
}, v = r(() => new Set(l.value.map((e) => e.id))), b = (e) => {
|
|
2155
2159
|
for (let t of e) if (v.value.has(t.id) || t.children?.length && b(t.children)) return !0;
|
|
2156
2160
|
return !1;
|
|
2157
|
-
}, S = (e) => v.value.has(e.id) || i.enableCascadeSelection && e.children?.length && b(e.children) ? !0 : null, C = (e, t) => t
|
|
2161
|
+
}, S = (e) => v.value.has(e.id) || i.enableCascadeSelection && e.children?.length && b(e.children) ? !0 : null, C = (e, t) => !!(!t || v.value.has(e.id) || p?.value?.has(e.id) || e.children?.length && b(e.children));
|
|
2158
2162
|
return (n, r) => (D(), o("ul", Gr, [(D(!0), o(t, null, M(e.options, (t) => de((D(), o("li", {
|
|
2159
2163
|
key: t.id,
|
|
2160
2164
|
"data-active": S(t),
|
|
2161
2165
|
"data-testid": e.itemTestId,
|
|
2162
2166
|
class: x(e.itemClass)
|
|
2163
2167
|
}, [u(Wr, y({ ref_for: !0 }, t, {
|
|
2168
|
+
disabled: i.readOnly || t.disabled,
|
|
2164
2169
|
config: e.config,
|
|
2165
2170
|
itemClass: e.itemClass,
|
|
2166
2171
|
queryText: e.queryText,
|
|
2167
2172
|
onHandleSelected: g,
|
|
2168
2173
|
onSeeMore: r[0] ||= (e) => s("see-more", e)
|
|
2169
2174
|
}), null, 16, [
|
|
2175
|
+
"disabled",
|
|
2170
2176
|
"config",
|
|
2171
2177
|
"itemClass",
|
|
2172
2178
|
"queryText"
|
|
2173
|
-
])], 10, Kr)), [[ce, C(t, e.isLoading)]])), 128)), e.hasMoreOptions ? (D(), o("li", qr, [u(Er, {
|
|
2179
|
+
])], 10, Kr)), [[ce, C(t, e.isLoading || i.readOnly)]])), 128)), e.hasMoreOptions && !i.readOnly ? (D(), o("li", qr, [u(Er, {
|
|
2174
2180
|
class: "pv-text-brand",
|
|
2175
2181
|
variant: "ghost",
|
|
2176
2182
|
label: "See more",
|
|
@@ -2299,7 +2299,7 @@ var si = Symbol("SelectedItemsKey"), ci = Symbol("EnableCascadeSelectionKey"), l
|
|
|
2299
2299
|
}, null, 8, ["name"])], 8, gi)) : a("v-if", !0)
|
|
2300
2300
|
], 14, mi));
|
|
2301
2301
|
}
|
|
2302
|
-
}), [["styles", [".pv-menu-item-disabled[data-v-
|
|
2302
|
+
}), [["styles", [".pv-menu-item-disabled[data-v-2deec5f6]{pointer-events:none;color:#7d898d;border-radius:4px}.pv-menu-item{&[data-v-2deec5f6]{cursor:pointer;border-radius:var(--popover-list-item-radius,4px);transition-property:background-color;transition-duration:.15s}&[data-v-2deec5f6]:hover,&[data-v-2deec5f6]:focus-visible{background-color:var(--popover-list-item-hover-background-color,#f5f5f5)}&[data-v-2deec5f6]:active{background-color:var(--popover-list-item-pressed-background-color,#ebebeb)}}.pv-radio[data-v-2deec5f6]:indeterminate{background-color:unset!important;border-color:var(--color-border,#e3e7ea)!important}.pv-menu-item-expand-chevron[data-v-2deec5f6]{flex-shrink:0;margin-left:auto;padding:4px}.pv-menu-item-disabled .pv-menu-item-expand-chevron[data-v-2deec5f6]{pointer-events:auto;color:inherit}"]], ["__scopeId", "data-v-2deec5f6"]]), vi = ["data-active"], yi = { key: 0 }, bi = 4, xi = /* @__PURE__ */ f({
|
|
2303
2303
|
inheritAttrs: !1,
|
|
2304
2304
|
__name: "PvMenuItem",
|
|
2305
2305
|
props: /* @__PURE__ */ y({
|
|
@@ -2348,10 +2348,10 @@ var si = Symbol("SelectedItemsKey"), ci = Symbol("EnableCascadeSelectionKey"), l
|
|
|
2348
2348
|
}, C = r(() => ({ paddingLeft: `${i.level * 12 + 12}px` })), T = r(() => {
|
|
2349
2349
|
let { level: e, config: t, itemClass: n, ...r } = i;
|
|
2350
2350
|
return r;
|
|
2351
|
-
}), E = r(() => (v.value.length > 0 || (i.totalChildCount ?? 0) > 0) && i.level < bi), ee = r(() => E.value ? l.value ? m.value : !0 : !1), D = r(() => m.value ? "chevron-down" : "chevron-right"), k = (e) => s && Array.isArray(s.value) ? s.value.some((t) => t.id === e.id) : c.value.includes(e.id), A =
|
|
2351
|
+
}), E = r(() => (v.value.length > 0 || (i.totalChildCount ?? 0) > 0) && i.level < bi), ee = r(() => E.value ? l.value ? m.value || !!i.disabled : !0 : !1), D = r(() => m.value ? "chevron-down" : "chevron-right"), k = (e) => s && Array.isArray(s.value) ? s.value.some((t) => t.id === e.id) : c.value.includes(e.id), A = (e) => k(e) ? !0 : f?.value?.has(i.id) ? !(p?.value?.get(i.id))?.has(e.id) : !1, j = n, N = r(() => g.value || i.totalChildCount == null ? !1 : i.totalChildCount > v.value.length), ne = async () => {
|
|
2352
2352
|
if (h.value) return;
|
|
2353
2353
|
if (!i.handleSeeMore) {
|
|
2354
|
-
|
|
2354
|
+
j("see-more", {
|
|
2355
2355
|
parentId: i.id,
|
|
2356
2356
|
offset: v.value.length
|
|
2357
2357
|
});
|
|
@@ -2383,7 +2383,7 @@ var si = Symbol("SelectedItemsKey"), ci = Symbol("EnableCascadeSelectionKey"), l
|
|
|
2383
2383
|
} finally {
|
|
2384
2384
|
h.value = !1;
|
|
2385
2385
|
}
|
|
2386
|
-
},
|
|
2386
|
+
}, F = (e) => {
|
|
2387
2387
|
if (l.value && E.value && e.option.id === i.id && !d.value) {
|
|
2388
2388
|
x();
|
|
2389
2389
|
return;
|
|
@@ -2392,9 +2392,9 @@ var si = Symbol("SelectedItemsKey"), ci = Symbol("EnableCascadeSelectionKey"), l
|
|
|
2392
2392
|
let t = c.value.indexOf(e.option.id);
|
|
2393
2393
|
t > -1 ? c.value = [...c.value.slice(0, t), ...c.value.slice(t + 1)] : c.value = [...c.value, e.option.id];
|
|
2394
2394
|
}
|
|
2395
|
-
|
|
2396
|
-
},
|
|
2397
|
-
|
|
2395
|
+
j("handle-selected", e);
|
|
2396
|
+
}, I = (e) => {
|
|
2397
|
+
j("handle-selected", e);
|
|
2398
2398
|
};
|
|
2399
2399
|
return (n, r) => {
|
|
2400
2400
|
let s = P("PvMenuItem", !0);
|
|
@@ -2406,7 +2406,7 @@ var si = Symbol("SelectedItemsKey"), ci = Symbol("EnableCascadeSelectionKey"), l
|
|
|
2406
2406
|
showChevron: R(l) && E.value,
|
|
2407
2407
|
chevronIcon: D.value,
|
|
2408
2408
|
expanded: m.value,
|
|
2409
|
-
onHandleSelected:
|
|
2409
|
+
onHandleSelected: F,
|
|
2410
2410
|
onToggleExpanded: x,
|
|
2411
2411
|
selected: k(i)
|
|
2412
2412
|
}), null, 16, [
|
|
@@ -2422,32 +2422,34 @@ var si = Symbol("SelectedItemsKey"), ci = Symbol("EnableCascadeSelectionKey"), l
|
|
|
2422
2422
|
key: 0,
|
|
2423
2423
|
role: "list",
|
|
2424
2424
|
style: w(C.value)
|
|
2425
|
-
}, [(O(!0), o(t, null, te(v.value, (t) => (O(), o("li", {
|
|
2425
|
+
}, [(O(!0), o(t, null, te(v.value, (t) => de((O(), o("li", {
|
|
2426
2426
|
key: t.id,
|
|
2427
2427
|
"data-active": k(t) ? "true" : null,
|
|
2428
2428
|
class: S(e.itemClass)
|
|
2429
2429
|
}, [u(s, b({ ref_for: !0 }, t, {
|
|
2430
|
+
disabled: i.disabled || t.disabled,
|
|
2430
2431
|
selectedIds: c.value,
|
|
2431
2432
|
"onUpdate:selectedIds": r[0] ||= (e) => c.value = e,
|
|
2432
2433
|
config: t.config ?? e.config,
|
|
2433
2434
|
queryText: e.queryText,
|
|
2434
2435
|
highlightSearchText: e.highlightSearchText,
|
|
2435
2436
|
level: e.level + 1,
|
|
2436
|
-
onHandleSelected:
|
|
2437
|
-
onSeeMore: r[1] ||= (e) =>
|
|
2437
|
+
onHandleSelected: I,
|
|
2438
|
+
onSeeMore: r[1] ||= (e) => j("see-more", e)
|
|
2438
2439
|
}), null, 16, [
|
|
2440
|
+
"disabled",
|
|
2439
2441
|
"selectedIds",
|
|
2440
2442
|
"config",
|
|
2441
2443
|
"queryText",
|
|
2442
2444
|
"highlightSearchText",
|
|
2443
2445
|
"level"
|
|
2444
|
-
])], 10, vi))), 128)),
|
|
2446
|
+
])], 10, vi)), [[ce, !i.disabled || A(t)]])), 128)), N.value ? (O(), o("li", yi, [u(lt, {
|
|
2445
2447
|
class: "pv-text-brand",
|
|
2446
2448
|
variant: "ghost",
|
|
2447
2449
|
label: "See more",
|
|
2448
2450
|
loading: h.value,
|
|
2449
2451
|
"data-testid": "pv-menu-item-see-more",
|
|
2450
|
-
onClick:
|
|
2452
|
+
onClick: ne
|
|
2451
2453
|
}, null, 8, ["loading"])])) : a("v-if", !0)], 4)) : a("v-if", !0)], 64);
|
|
2452
2454
|
};
|
|
2453
2455
|
}
|
|
@@ -2465,7 +2467,8 @@ var si = Symbol("SelectedItemsKey"), ci = Symbol("EnableCascadeSelectionKey"), l
|
|
|
2465
2467
|
isLoading: { type: Boolean },
|
|
2466
2468
|
singleSelect: { type: Boolean },
|
|
2467
2469
|
enableCascadeSelection: { type: Boolean },
|
|
2468
|
-
hasMoreOptions: { type: Boolean }
|
|
2470
|
+
hasMoreOptions: { type: Boolean },
|
|
2471
|
+
readOnly: { type: Boolean }
|
|
2469
2472
|
}, {
|
|
2470
2473
|
selectedItems: { default: () => [] },
|
|
2471
2474
|
selectedItemsModifiers: {}
|
|
@@ -2479,6 +2482,7 @@ var si = Symbol("SelectedItemsKey"), ci = Symbol("EnableCascadeSelectionKey"), l
|
|
|
2479
2482
|
e !== c.value && (c.value = e);
|
|
2480
2483
|
}), k(si, l), k(ci, r(() => !!i.enableCascadeSelection));
|
|
2481
2484
|
let d = _(li, void 0), f = _(fi, M(!1)), p = _(ui, void 0), m = _(di, void 0), h = r(() => i.singleSelect || i.config?.variant === "radio"), g = (e) => {
|
|
2485
|
+
if (i.readOnly) return;
|
|
2482
2486
|
let t = e.option, n;
|
|
2483
2487
|
if (i.enableCascadeSelection && t.children?.length) {
|
|
2484
2488
|
let e;
|
|
@@ -2513,23 +2517,25 @@ var si = Symbol("SelectedItemsKey"), ci = Symbol("EnableCascadeSelectionKey"), l
|
|
|
2513
2517
|
}, v = r(() => new Set(l.value.map((e) => e.id))), y = (e) => {
|
|
2514
2518
|
for (let t of e) if (v.value.has(t.id) || t.children?.length && y(t.children)) return !0;
|
|
2515
2519
|
return !1;
|
|
2516
|
-
}, x = (e) => v.value.has(e.id) || i.enableCascadeSelection && e.children?.length && y(e.children) ? !0 : null, C = (e, t) => t
|
|
2520
|
+
}, x = (e) => v.value.has(e.id) || i.enableCascadeSelection && e.children?.length && y(e.children) ? !0 : null, C = (e, t) => !!(!t || v.value.has(e.id) || p?.value?.has(e.id) || e.children?.length && y(e.children));
|
|
2517
2521
|
return (n, r) => (O(), o("ul", Si, [(O(!0), o(t, null, te(e.options, (t) => de((O(), o("li", {
|
|
2518
2522
|
key: t.id,
|
|
2519
2523
|
"data-active": x(t),
|
|
2520
2524
|
"data-testid": e.itemTestId,
|
|
2521
2525
|
class: S(e.itemClass)
|
|
2522
2526
|
}, [u(xi, b({ ref_for: !0 }, t, {
|
|
2527
|
+
disabled: i.readOnly || t.disabled,
|
|
2523
2528
|
config: e.config,
|
|
2524
2529
|
itemClass: e.itemClass,
|
|
2525
2530
|
queryText: e.queryText,
|
|
2526
2531
|
onHandleSelected: g,
|
|
2527
2532
|
onSeeMore: r[0] ||= (e) => s("see-more", e)
|
|
2528
2533
|
}), null, 16, [
|
|
2534
|
+
"disabled",
|
|
2529
2535
|
"config",
|
|
2530
2536
|
"itemClass",
|
|
2531
2537
|
"queryText"
|
|
2532
|
-
])], 10, Ci)), [[ce, C(t, e.isLoading)]])), 128)), e.hasMoreOptions ? (O(), o("li", wi, [u(lt, {
|
|
2538
|
+
])], 10, Ci)), [[ce, C(t, e.isLoading || i.readOnly)]])), 128)), e.hasMoreOptions && !i.readOnly ? (O(), o("li", wi, [u(lt, {
|
|
2533
2539
|
class: "pv-text-brand",
|
|
2534
2540
|
variant: "ghost",
|
|
2535
2541
|
label: "See more",
|
|
@@ -2588,6 +2594,10 @@ var si = Symbol("SelectedItemsKey"), ci = Symbol("EnableCascadeSelectionKey"), l
|
|
|
2588
2594
|
default: !1
|
|
2589
2595
|
},
|
|
2590
2596
|
disabled: { type: Boolean },
|
|
2597
|
+
readOnly: {
|
|
2598
|
+
type: Boolean,
|
|
2599
|
+
default: !1
|
|
2600
|
+
},
|
|
2591
2601
|
enableCascadeSelection: {
|
|
2592
2602
|
type: Boolean,
|
|
2593
2603
|
default: !1
|
|
@@ -2734,7 +2744,7 @@ var si = Symbol("SelectedItemsKey"), ci = Symbol("EnableCascadeSelectionKey"), l
|
|
|
2734
2744
|
}, ce = r({
|
|
2735
2745
|
get: () => B.value,
|
|
2736
2746
|
set: (e) => {
|
|
2737
|
-
re(e);
|
|
2747
|
+
c.readOnly || re(e);
|
|
2738
2748
|
}
|
|
2739
2749
|
}), le = () => {
|
|
2740
2750
|
P.value = "", D.value = !1;
|
|
@@ -2850,8 +2860,13 @@ var si = Symbol("SelectedItemsKey"), ci = Symbol("EnableCascadeSelectionKey"), l
|
|
|
2850
2860
|
"model-value": P.value,
|
|
2851
2861
|
"onUpdate:modelValue": r[1] ||= (e) => P.value = e,
|
|
2852
2862
|
class: "pv-stack-4",
|
|
2853
|
-
placeholder: e.searchPlaceholder
|
|
2854
|
-
|
|
2863
|
+
placeholder: e.searchPlaceholder,
|
|
2864
|
+
disabled: e.readOnly
|
|
2865
|
+
}, null, 8, [
|
|
2866
|
+
"model-value",
|
|
2867
|
+
"placeholder",
|
|
2868
|
+
"disabled"
|
|
2869
|
+
])])),
|
|
2855
2870
|
R(Se) ? (O(), o("div", Di, [N(n.$slots, "header", C(g(ye.value)))])) : a("v-if", !0),
|
|
2856
2871
|
fe.value.length > 0 ? (O(), o(t, { key: 2 }, [ve.value ? (O(!0), o(t, { key: 0 }, te(_e.value, ([t, i], s) => (O(), o("div", { key: t }, [
|
|
2857
2872
|
n.$slots[t] ? N(n.$slots, t, { key: 0 }) : t === "other" ? a("v-if", !0) : (O(), o("span", Oi, I(t), 1)),
|
|
@@ -2866,6 +2881,7 @@ var si = Symbol("SelectedItemsKey"), ci = Symbol("EnableCascadeSelectionKey"), l
|
|
|
2866
2881
|
isLoading: e.isLoading,
|
|
2867
2882
|
enableCascadeSelection: e.enableCascadeSelection,
|
|
2868
2883
|
hasMoreOptions: s === _e.value.length - 1 && y.value && !e.isLoading,
|
|
2884
|
+
readOnly: e.readOnly,
|
|
2869
2885
|
onSeeMore: E
|
|
2870
2886
|
}, null, 8, [
|
|
2871
2887
|
"selectedItems",
|
|
@@ -2875,7 +2891,8 @@ var si = Symbol("SelectedItemsKey"), ci = Symbol("EnableCascadeSelectionKey"), l
|
|
|
2875
2891
|
"itemTestId",
|
|
2876
2892
|
"isLoading",
|
|
2877
2893
|
"enableCascadeSelection",
|
|
2878
|
-
"hasMoreOptions"
|
|
2894
|
+
"hasMoreOptions",
|
|
2895
|
+
"readOnly"
|
|
2879
2896
|
]),
|
|
2880
2897
|
_e.value && s !== _e.value.length - 1 ? (O(), o("div", ki)) : a("v-if", !0)
|
|
2881
2898
|
]))), 128)) : (O(), i(Ti, {
|
|
@@ -2889,6 +2906,7 @@ var si = Symbol("SelectedItemsKey"), ci = Symbol("EnableCascadeSelectionKey"), l
|
|
|
2889
2906
|
itemClass: "pv-stack-4",
|
|
2890
2907
|
enableCascadeSelection: e.enableCascadeSelection,
|
|
2891
2908
|
hasMoreOptions: y.value && !e.isLoading,
|
|
2909
|
+
readOnly: e.readOnly,
|
|
2892
2910
|
onSeeMore: E
|
|
2893
2911
|
}, null, 8, [
|
|
2894
2912
|
"selectedItems",
|
|
@@ -2897,10 +2915,11 @@ var si = Symbol("SelectedItemsKey"), ci = Symbol("EnableCascadeSelectionKey"), l
|
|
|
2897
2915
|
"queryText",
|
|
2898
2916
|
"itemTestId",
|
|
2899
2917
|
"enableCascadeSelection",
|
|
2900
|
-
"hasMoreOptions"
|
|
2918
|
+
"hasMoreOptions",
|
|
2919
|
+
"readOnly"
|
|
2901
2920
|
]))], 64)) : a("v-if", !0),
|
|
2902
2921
|
e.isLoading ? (O(), o("div", Ai, [u(Je, { variant: "dark" })])) : fe.value.length === 0 ? (O(), o(t, { key: 4 }, [R(Ce) ? N(n.$slots, "no-results", C(b({ key: 0 }, ye.value))) : (O(), i(zt, { key: 1 }))], 64)) : a("v-if", !0),
|
|
2903
|
-
s("div", ji, [R(we) ? N(n.$slots, "footer", C(b({ key: 0 }, ye.value))) : a("v-if", !0), e.menuActionsVariant ? (O(), i(dt, {
|
|
2922
|
+
s("div", ji, [R(we) ? N(n.$slots, "footer", C(b({ key: 0 }, ye.value))) : a("v-if", !0), e.menuActionsVariant && !e.readOnly ? (O(), i(dt, {
|
|
2904
2923
|
key: 1,
|
|
2905
2924
|
variant: e.menuActionsVariant,
|
|
2906
2925
|
disabled: e.isLoading,
|