@citruslime/ui 4.1.0-beta.12 → 4.1.0-beta.14
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.
|
@@ -50,7 +50,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
50
50
|
});
|
|
51
51
|
const _hoisted_1$12 = { class: "cl:absolute cl:left-5 cl:top-5" };
|
|
52
52
|
const _hoisted_2$M = { class: "cl:font-semibold cl:ml-10 cl:p-4 cl:select-none cl:text-grey-5" };
|
|
53
|
-
const _hoisted_3$
|
|
53
|
+
const _hoisted_3$u = { class: "cl:overflow-hidden" };
|
|
54
54
|
const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
55
55
|
...{
|
|
56
56
|
inheritAttrs: false
|
|
@@ -91,7 +91,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
91
91
|
renderSlot(_ctx.$slots, "title")
|
|
92
92
|
])
|
|
93
93
|
], 2),
|
|
94
|
-
createElementVNode("div", _hoisted_3$
|
|
94
|
+
createElementVNode("div", _hoisted_3$u, [
|
|
95
95
|
createVNode(Transition, { name: "grow-down" }, {
|
|
96
96
|
default: withCtx(() => [
|
|
97
97
|
withDirectives(createElementVNode("div", mergeProps(_ctx.$attrs, { class: "cl:ml-10 cl:p-4" }), [
|
|
@@ -359,7 +359,7 @@ const cardSizes = [
|
|
|
359
359
|
];
|
|
360
360
|
const _hoisted_1$X = { class: "cl:sm:w-auto cl:w-full" };
|
|
361
361
|
const _hoisted_2$J = { class: "cl:flex cl:flex-nowrap cl:gap-2 cl:text-grey-4 cl:text-xs cl:tracking-widest" };
|
|
362
|
-
const _hoisted_3$
|
|
362
|
+
const _hoisted_3$t = {
|
|
363
363
|
key: 0,
|
|
364
364
|
class: "cl:self-center"
|
|
365
365
|
};
|
|
@@ -393,7 +393,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
393
393
|
class: normalizeClass(["cl:flex", { "cl:flex-col": _ctx.labelPosition === "above", "cl:flex-row-reverse cl:gap-2 cl:items-center cl:justify-end": _ctx.labelPosition === "right" }])
|
|
394
394
|
}, [
|
|
395
395
|
createElementVNode("div", _hoisted_2$J, [
|
|
396
|
-
_ctx.$slots.label ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
396
|
+
_ctx.$slots.label ? (openBlock(), createElementBlock("span", _hoisted_3$t, [
|
|
397
397
|
renderSlot(_ctx.$slots, "label")
|
|
398
398
|
])) : createCommentVNode("", true),
|
|
399
399
|
_ctx.showRequiredAsterisk ? (openBlock(), createElementBlock("span", _hoisted_4$n, "*")) : createCommentVNode("", true)
|
|
@@ -808,7 +808,7 @@ const _hoisted_2$F = {
|
|
|
808
808
|
key: 0,
|
|
809
809
|
class: "cl:absolute cl:bg-off-white cl:flex cl:h-full cl:items-center cl:justify-center cl:top-0 cl:w-full cl:z-20"
|
|
810
810
|
};
|
|
811
|
-
const _hoisted_3$
|
|
811
|
+
const _hoisted_3$s = { class: "cl:bg-white cl:flex cl:p-2 cl:pb-1 cl:sticky cl:top-0 cl:w-full cl:z-10" };
|
|
812
812
|
const _hoisted_4$m = { class: "cl:inline-block cl:w-full" };
|
|
813
813
|
const _hoisted_5$f = { key: 6 };
|
|
814
814
|
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
@@ -937,7 +937,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
937
937
|
_ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_2$F, [
|
|
938
938
|
createVNode(clUiLoadingSpinner)
|
|
939
939
|
])) : createCommentVNode("", true),
|
|
940
|
-
createElementVNode("div", _hoisted_3$
|
|
940
|
+
createElementVNode("div", _hoisted_3$s, [
|
|
941
941
|
createElementVNode("div", _hoisted_4$m, [
|
|
942
942
|
createVNode(_sfc_main$18, {
|
|
943
943
|
id: `cl-ui-combo-box-search-input-${_ctx.objectType}`,
|
|
@@ -1006,7 +1006,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
1006
1006
|
});
|
|
1007
1007
|
const _hoisted_1$R = { class: "cl:flex cl:rounded-lg" };
|
|
1008
1008
|
const _hoisted_2$E = { class: "cl:inline-block cl:w-full" };
|
|
1009
|
-
const _hoisted_3$
|
|
1009
|
+
const _hoisted_3$r = { class: "cl:pointer-events-none cl:relative cl:top-0.5" };
|
|
1010
1010
|
const _hoisted_4$l = { class: "cl:absolute cl:flex cl:float-right cl:font-semibold cl:mt-[5px] cl:right-2 cl:text-danger-default cl:text-sm cl:z-10" };
|
|
1011
1011
|
const _hoisted_5$e = ["disabled"];
|
|
1012
1012
|
const _hoisted_6$a = ["disabled"];
|
|
@@ -1233,7 +1233,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
1233
1233
|
_: 1
|
|
1234
1234
|
}, 8, ["id", "modelValue", "class", "placeholder", "disabled"])
|
|
1235
1235
|
]),
|
|
1236
|
-
withDirectives(createElementVNode("div", _hoisted_3$
|
|
1236
|
+
withDirectives(createElementVNode("div", _hoisted_3$r, [
|
|
1237
1237
|
createElementVNode("div", _hoisted_4$l, [
|
|
1238
1238
|
createTextVNode(toDisplayString(unref(t2)("comboBox.required")) + " ", 1),
|
|
1239
1239
|
createVNode(unref(Icon), {
|
|
@@ -1377,7 +1377,7 @@ const _hoisted_2$D = {
|
|
|
1377
1377
|
key: 0,
|
|
1378
1378
|
class: "cl:w-full"
|
|
1379
1379
|
};
|
|
1380
|
-
const _hoisted_3$
|
|
1380
|
+
const _hoisted_3$q = {
|
|
1381
1381
|
key: 1,
|
|
1382
1382
|
class: "cl:leading-10 cl:text-sm cl:w-full"
|
|
1383
1383
|
};
|
|
@@ -1388,7 +1388,7 @@ function _sfc_render$5(_ctx, _cache) {
|
|
|
1388
1388
|
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_2$D, [
|
|
1389
1389
|
renderSlot(_ctx.$slots, "default")
|
|
1390
1390
|
])) : createCommentVNode("", true),
|
|
1391
|
-
_ctx.$slots.left || _ctx.$slots.right ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
1391
|
+
_ctx.$slots.left || _ctx.$slots.right ? (openBlock(), createElementBlock("div", _hoisted_3$q, [
|
|
1392
1392
|
createElementVNode("span", _hoisted_4$k, [
|
|
1393
1393
|
renderSlot(_ctx.$slots, "left")
|
|
1394
1394
|
]),
|
|
@@ -1465,7 +1465,7 @@ const _hoisted_1$N = {
|
|
|
1465
1465
|
class: "cl:flex cl:gap-2 cl:justify-between cl:mb-2 cl:w-full"
|
|
1466
1466
|
};
|
|
1467
1467
|
const _hoisted_2$C = { key: 1 };
|
|
1468
|
-
const _hoisted_3$
|
|
1468
|
+
const _hoisted_3$p = { class: "cl:flex cl:flex-wrap cl:gap-1 cl:lg:flex-nowrap cl:lg:gap-2 cl:md:justify-end cl:pb-2" };
|
|
1469
1469
|
const _hoisted_4$j = { class: "cl:basis-full cl:col-span-2 cl:grow cl:lg:basis-0" };
|
|
1470
1470
|
const _hoisted_5$c = {
|
|
1471
1471
|
key: 2,
|
|
@@ -1506,7 +1506,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
1506
1506
|
}, [
|
|
1507
1507
|
createElementVNode("strong", null, toDisplayString(unref(t2)("grid.gridTools")), 1)
|
|
1508
1508
|
], 2),
|
|
1509
|
-
createElementVNode("div", _hoisted_3$
|
|
1509
|
+
createElementVNode("div", _hoisted_3$p, [
|
|
1510
1510
|
createElementVNode("div", _hoisted_4$j, [
|
|
1511
1511
|
renderSlot(_ctx.$slots, "additional-grid-actions", normalizeProps(guardReactiveProps({
|
|
1512
1512
|
loading: _ctx.loading,
|
|
@@ -1739,6 +1739,7 @@ const messages = {
|
|
|
1739
1739
|
onOrBefore: "On or before",
|
|
1740
1740
|
onOrAfter: "On or after",
|
|
1741
1741
|
selectAll: "Select all",
|
|
1742
|
+
clearAll: "Clear all",
|
|
1742
1743
|
allEntriesSelected: "All entries selected",
|
|
1743
1744
|
page: "Page",
|
|
1744
1745
|
pageSize: "Page Size",
|
|
@@ -1806,7 +1807,8 @@ const messages = {
|
|
|
1806
1807
|
endDate: "End Date"
|
|
1807
1808
|
},
|
|
1808
1809
|
select: {
|
|
1809
|
-
displayTextOverflow: "{count} options selected"
|
|
1810
|
+
displayTextOverflow: "{count} options selected",
|
|
1811
|
+
notFound: "Not found"
|
|
1810
1812
|
}
|
|
1811
1813
|
}
|
|
1812
1814
|
};
|
|
@@ -2285,7 +2287,7 @@ const _hoisted_2$A = {
|
|
|
2285
2287
|
key: 4,
|
|
2286
2288
|
class: "cl:inline-block cl:whitespace-nowrap"
|
|
2287
2289
|
};
|
|
2288
|
-
const _hoisted_3$
|
|
2290
|
+
const _hoisted_3$o = {
|
|
2289
2291
|
key: 5,
|
|
2290
2292
|
class: "cl:inline-block cl:whitespace-nowrap"
|
|
2291
2293
|
};
|
|
@@ -2395,7 +2397,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
2395
2397
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
2396
2398
|
createTextVNode(toDisplayString(formatDate(_ctx.data[_ctx.column.field], unref(DateFormat).DATETIME)), 1)
|
|
2397
2399
|
], 64))
|
|
2398
|
-
], 64)) : _ctx.column.type === "list" && _ctx.column.field !== void 0 && _ctx.column.listEntries !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_1$L, toDisplayString(unref(t2)(_ctx.column.listEntries.find((entry) => entry.value === _ctx.data[_ctx.column.field])?.translationKey ?? "")), 1)) : _ctx.column.type === "number" && _ctx.column.field !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_2$A, toDisplayString(formatNumberToString(_ctx.data[_ctx.column.field], unref(locale2))), 1)) : _ctx.column.field !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
2400
|
+
], 64)) : _ctx.column.type === "list" && _ctx.column.field !== void 0 && _ctx.column.listEntries !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_1$L, toDisplayString(unref(t2)(_ctx.column.listEntries.find((entry) => entry.value === _ctx.data[_ctx.column.field])?.translationKey ?? "")), 1)) : _ctx.column.type === "number" && _ctx.column.field !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_2$A, toDisplayString(formatNumberToString(_ctx.data[_ctx.column.field], unref(locale2))), 1)) : _ctx.column.field !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_3$o, [
|
|
2399
2401
|
createElementVNode("span", {
|
|
2400
2402
|
title: showUntruncatedStringValue.value ? _ctx.data[_ctx.column.field] : void 0,
|
|
2401
2403
|
innerHTML: formatString()
|
|
@@ -2568,7 +2570,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
2568
2570
|
});
|
|
2569
2571
|
const _hoisted_1$K = ["colspan"];
|
|
2570
2572
|
const _hoisted_2$z = ["colspan"];
|
|
2571
|
-
const _hoisted_3$
|
|
2573
|
+
const _hoisted_3$n = { key: 2 };
|
|
2572
2574
|
const _hoisted_4$h = ["colspan"];
|
|
2573
2575
|
const _hoisted_5$b = { class: "cl:flex cl:flex-wrap cl:justify-center cl:text-center cl:text-sm cl:w-full" };
|
|
2574
2576
|
const _hoisted_6$9 = { key: 0 };
|
|
@@ -2788,7 +2790,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
2788
2790
|
}, " ", 8, _hoisted_2$z)
|
|
2789
2791
|
], 2);
|
|
2790
2792
|
}), 128)) : createCommentVNode("", true)
|
|
2791
|
-
], 64)) : !_ctx.loading ? (openBlock(), createElementBlock("tr", _hoisted_3$
|
|
2793
|
+
], 64)) : !_ctx.loading ? (openBlock(), createElementBlock("tr", _hoisted_3$n, [
|
|
2792
2794
|
createElementVNode("td", {
|
|
2793
2795
|
colspan: _ctx.columns.length
|
|
2794
2796
|
}, [
|
|
@@ -2818,7 +2820,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
2818
2820
|
});
|
|
2819
2821
|
const _hoisted_1$J = ["value", "inputmode", "disabled", "placeholder"];
|
|
2820
2822
|
const _hoisted_2$y = { class: "cl:absolute cl:flex-col cl:flex-nowrap cl:h-full cl:hidden cl:justify-between cl:py-0.5 cl:right-1 cl:text-xs cl:top-0 cl:xl:flex" };
|
|
2821
|
-
const _hoisted_3$
|
|
2823
|
+
const _hoisted_3$m = ["disabled"];
|
|
2822
2824
|
const _hoisted_4$g = ["disabled"];
|
|
2823
2825
|
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
2824
2826
|
...{
|
|
@@ -3000,7 +3002,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
3000
3002
|
]
|
|
3001
3003
|
}, [
|
|
3002
3004
|
createVNode(_component_icon, { icon: "ph:caret-up-bold" })
|
|
3003
|
-
], 40, _hoisted_3$
|
|
3005
|
+
], 40, _hoisted_3$m),
|
|
3004
3006
|
createElementVNode("button", {
|
|
3005
3007
|
class: "cl:bg-secondary-light/30 cl:border cl:border-grey-3 cl:hover:bg-secondary-light/20 cl:px-1 cl:rounded",
|
|
3006
3008
|
disabled: _ctx.disabled,
|
|
@@ -3042,7 +3044,7 @@ const _hoisted_1$I = {
|
|
|
3042
3044
|
class: "cl:flex cl:flex-col cl:lg:flex-row cl:lg:gap-2"
|
|
3043
3045
|
};
|
|
3044
3046
|
const _hoisted_2$x = { class: "cl:border cl:border-off-white cl:flex cl:items-center cl:lg:px-4 cl:lg:py-3 cl:mt-2 cl:p-2 cl:rounded-lg cl:w-full" };
|
|
3045
|
-
const _hoisted_3$
|
|
3047
|
+
const _hoisted_3$l = { class: "cl:border cl:border-off-white cl:lg:px-4 cl:lg:py-3 cl:mt-2 cl:p-2 cl:rounded-lg" };
|
|
3046
3048
|
const _hoisted_4$f = ["inert"];
|
|
3047
3049
|
const _hoisted_5$a = { class: "cl:basis-full cl:bg-off-white cl:border cl:border-grey-1 cl:flex cl:flex-1 cl:items-center cl:justify-between cl:lg:basis-0 cl:lg:px-4 cl:lg:py-3 cl:mt-2 cl:p-2 cl:rounded-lg cl:shadow cl:text-sm" };
|
|
3048
3050
|
const _hoisted_6$8 = { class: "cl:flex cl:flex-wrap cl:gap-x-4 cl:gap-y-2 cl:items-center cl:justify-between cl:w-full" };
|
|
@@ -3129,7 +3131,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3129
3131
|
words: 2
|
|
3130
3132
|
})
|
|
3131
3133
|
]),
|
|
3132
|
-
createElementVNode("div", _hoisted_3$
|
|
3134
|
+
createElementVNode("div", _hoisted_3$l, [
|
|
3133
3135
|
createVNode(unref(clUiSkeletonInput), { class: "cl:w-64" })
|
|
3134
3136
|
])
|
|
3135
3137
|
])) : _ctx.loading || _ctx.data?.results?.length && _ctx.request ? (openBlock(), createElementBlock("div", {
|
|
@@ -3813,7 +3815,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
3813
3815
|
});
|
|
3814
3816
|
const _hoisted_1$F = { class: "cl:gap-1 cl:grid cl:grid-cols-[auto_1fr_auto_auto] cl:pt-0.5 cl:w-full" };
|
|
3815
3817
|
const _hoisted_2$u = ["disabled"];
|
|
3816
|
-
const _hoisted_3$
|
|
3818
|
+
const _hoisted_3$k = { class: "cl:max-w-max" };
|
|
3817
3819
|
const _hoisted_4$e = { class: "cl:flex cl:flex-col cl:gap-1 cl:w-full" };
|
|
3818
3820
|
const _hoisted_5$9 = ["min", "disabled", "required", "step", "max"];
|
|
3819
3821
|
const _hoisted_6$7 = { class: "cl:bg-white cl:border cl:border-grey-2 cl:leading-none cl:rounded-full cl:text-center cl:text-xs" };
|
|
@@ -3873,7 +3875,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
3873
3875
|
class: "cl:active:bg-grey-0 cl:bg-white cl:border cl:border-grey-2 cl:disabled:bg-grey-1 cl:hover:bg-off-white cl:leading-none cl:min-w-[26px] cl:p-[5px] cl:rounded-full cl:shadow cl:text-xs cl:transition-colors",
|
|
3874
3876
|
onClick: _cache[0] || (_cache[0] = ($event) => setValueAndFocus(_ctx.min))
|
|
3875
3877
|
}, toDisplayString(unref(formatNumberAsDecimal)(_ctx.min, _ctx.precision)), 9, _hoisted_2$u),
|
|
3876
|
-
createElementVNode("div", _hoisted_3$
|
|
3878
|
+
createElementVNode("div", _hoisted_3$k, [
|
|
3877
3879
|
withDirectives(createElementVNode("div", _hoisted_4$e, [
|
|
3878
3880
|
withDirectives(createElementVNode("input", mergeProps({
|
|
3879
3881
|
ref_key: "sliderRef",
|
|
@@ -4360,7 +4362,7 @@ const _hoisted_1$C = {
|
|
|
4360
4362
|
class: "cl:flex cl:gap-2 cl:p-2 cl:w-full"
|
|
4361
4363
|
};
|
|
4362
4364
|
const _hoisted_2$r = { class: "cl:w-full" };
|
|
4363
|
-
const _hoisted_3$
|
|
4365
|
+
const _hoisted_3$j = { class: "cl:w-full" };
|
|
4364
4366
|
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
4365
4367
|
...{
|
|
4366
4368
|
inheritAttrs: false
|
|
@@ -4558,7 +4560,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
4558
4560
|
_: 1
|
|
4559
4561
|
}, 8, ["modelValue", "date-format-locale", "disabled", "time-zone", "min-date", "max-date", "popover-placement"])
|
|
4560
4562
|
]),
|
|
4561
|
-
createElementVNode("div", _hoisted_3$
|
|
4563
|
+
createElementVNode("div", _hoisted_3$j, [
|
|
4562
4564
|
createVNode(_sfc_main$M, {
|
|
4563
4565
|
id: "dateInputEnd",
|
|
4564
4566
|
modelValue: internalEntrySelectEndDate.value,
|
|
@@ -4624,6 +4626,10 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
4624
4626
|
});
|
|
4625
4627
|
const _hoisted_1$B = ["value", "readonly", "placeholder", "disabled", "onKeydown"];
|
|
4626
4628
|
const _hoisted_2$q = ["id", "tabindex", "inert", "onKeydown"];
|
|
4629
|
+
const _hoisted_3$i = {
|
|
4630
|
+
key: 1,
|
|
4631
|
+
class: "cl:p-1 cl:select-none cl:text-grey-3"
|
|
4632
|
+
};
|
|
4627
4633
|
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
4628
4634
|
...{
|
|
4629
4635
|
inheritAttrs: false
|
|
@@ -4669,10 +4675,18 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4669
4675
|
}
|
|
4670
4676
|
});
|
|
4671
4677
|
const searchTerm = ref("");
|
|
4672
|
-
const displayList = computed(() =>
|
|
4673
|
-
const
|
|
4674
|
-
|
|
4675
|
-
|
|
4678
|
+
const displayList = computed(() => {
|
|
4679
|
+
const itemsToFilterBasedOnSearchTerm = props.list.filter((d) => !isSelectItem(d) || isSelectItem(d) && d.id > -1);
|
|
4680
|
+
const filteredDisplayList = itemsToFilterBasedOnSearchTerm.filter((entry) => {
|
|
4681
|
+
const term = isSelectItem(entry) ? entry.name : entry;
|
|
4682
|
+
return term.toString().toLowerCase().includes(searchTerm.value.trim().toLowerCase());
|
|
4683
|
+
});
|
|
4684
|
+
const itemsToExcludeFromSearchTermFiltering = props.list.filter((d) => isSelectItem(d) && d.id < 0);
|
|
4685
|
+
return [
|
|
4686
|
+
...searchTerm.value.trim() === "" ? itemsToExcludeFromSearchTermFiltering : [],
|
|
4687
|
+
...filteredDisplayList
|
|
4688
|
+
];
|
|
4689
|
+
});
|
|
4676
4690
|
const isCurrentlySearchable = computed(() => selectModalVisible.value && props.allowFiltering);
|
|
4677
4691
|
const highlightIndex = ref(-1);
|
|
4678
4692
|
const outsideRef = ref();
|
|
@@ -4783,14 +4797,24 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4783
4797
|
}
|
|
4784
4798
|
}
|
|
4785
4799
|
function handleEnterPress(event) {
|
|
4786
|
-
|
|
4800
|
+
const isMultiSelect = Array.isArray(selectResult.value);
|
|
4801
|
+
if (selectModalVisible.value && (!isMultiSelect || highlightIndex.value !== -1 && isMultiSelect)) {
|
|
4787
4802
|
select(displayList.value[highlightIndex.value] ?? null);
|
|
4788
4803
|
setSearchTerm("");
|
|
4789
4804
|
event.target.focus();
|
|
4805
|
+
} else if (props.allowFiltering && isMultiSelect && searchTerm.value.trim() !== "") {
|
|
4806
|
+
const displayListExcludingDefaultValues = displayList.value.filter((d) => !isSelectItem(d) || isSelectItem(d) && d.id > -1);
|
|
4807
|
+
if (displayListExcludingDefaultValues.length > 0) {
|
|
4808
|
+
selectMultipleValues(displayListExcludingDefaultValues);
|
|
4809
|
+
toggleSelectModalState(false);
|
|
4810
|
+
}
|
|
4790
4811
|
} else {
|
|
4791
4812
|
toggleSelectModalState(true);
|
|
4792
4813
|
}
|
|
4793
4814
|
}
|
|
4815
|
+
function selectMultipleValues(values) {
|
|
4816
|
+
selectResult.value = values;
|
|
4817
|
+
}
|
|
4794
4818
|
function handleEscapePress(event) {
|
|
4795
4819
|
toggleSelectModalState(false);
|
|
4796
4820
|
if (props.openDropDownOnFocus) {
|
|
@@ -4855,6 +4879,9 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4855
4879
|
select(option2);
|
|
4856
4880
|
highlightIndex.value = -1;
|
|
4857
4881
|
}
|
|
4882
|
+
watch(searchTerm, () => {
|
|
4883
|
+
highlightIndex.value = -1;
|
|
4884
|
+
});
|
|
4858
4885
|
__expose({
|
|
4859
4886
|
focus
|
|
4860
4887
|
});
|
|
@@ -4959,7 +4986,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4959
4986
|
_cache[8] || (_cache[8] = withKeys(withModifiers(($event) => select(displayList.value[highlightIndex.value]), ["stop", "prevent"]), ["enter"]))
|
|
4960
4987
|
]
|
|
4961
4988
|
}), [
|
|
4962
|
-
(openBlock(true), createElementBlock(Fragment,
|
|
4989
|
+
displayList.value.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(displayList.value, (option2, index2) => {
|
|
4963
4990
|
return openBlock(), createElementBlock("div", { key: index2 }, [
|
|
4964
4991
|
renderSlot(_ctx.$slots, "default", mergeProps({ ref_for: true }, { option: option2, index: index2, select: handleMouseClick, highlightIndex: highlightIndex.value, isSelected }), () => [
|
|
4965
4992
|
(openBlock(), createBlock(_component_cl_ui_select_option, {
|
|
@@ -4978,7 +5005,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4978
5005
|
}, 1032, ["id", "disabled", "is-highlighted", "is-selected", "readonly", "onSelect"]))
|
|
4979
5006
|
])
|
|
4980
5007
|
]);
|
|
4981
|
-
}), 128))
|
|
5008
|
+
}), 128)) : (openBlock(), createElementBlock("span", _hoisted_3$i, toDisplayString(unref(t2)("select.notFound")), 1))
|
|
4982
5009
|
], 16, _hoisted_2$q)) : createCommentVNode("", true)
|
|
4983
5010
|
], 2)
|
|
4984
5011
|
]),
|
|
@@ -5271,6 +5298,11 @@ const defaultSelectAllListValue = computed(() => ({
|
|
|
5271
5298
|
name: i18n.global.t("grid.selectAll"),
|
|
5272
5299
|
value: ""
|
|
5273
5300
|
}));
|
|
5301
|
+
const defaultClearAllListValue = computed(() => ({
|
|
5302
|
+
id: -3,
|
|
5303
|
+
name: i18n.global.t("grid.clearAll"),
|
|
5304
|
+
value: ""
|
|
5305
|
+
}));
|
|
5274
5306
|
const booleanListEntries = computed(() => [
|
|
5275
5307
|
defaultEmptyListValue,
|
|
5276
5308
|
{
|
|
@@ -5328,14 +5360,25 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5328
5360
|
const isStringColumn = computed(() => props.column.type === "string" || props.column.type === "slot" && props.column.slotType === "string");
|
|
5329
5361
|
const numericFormat = computed(() => props.column.format === NumberFormat.INTEGER ? NumberFormat.DECIMAL : props.column.format ?? NumberFormat.DECIMAL);
|
|
5330
5362
|
const booleanValueAsSelectItem = computed(() => booleanListEntries.value.find((x) => x.value === currentFilterValue.value.toString()) ?? null);
|
|
5331
|
-
const listEntriesAsSelectItems = computed(() =>
|
|
5332
|
-
|
|
5333
|
-
|
|
5363
|
+
const listEntriesAsSelectItems = computed(() => {
|
|
5364
|
+
const baseItems = [
|
|
5365
|
+
props.column.listMode === "multi" ? defaultSelectAllListValue.value : defaultEmptyListValue,
|
|
5366
|
+
...props.column.listMode === "multi" && props.filter?.length && props.filter.length > 0 ? [defaultClearAllListValue.value] : []
|
|
5367
|
+
];
|
|
5368
|
+
const selectedFilterValues = props.filter?.filter((f) => f.filterOperation === FilterOperation.OR_EQUAL).map((f) => f.filterValue) ?? [];
|
|
5369
|
+
const allListEntries = props.column.listEntries?.map((x, i) => ({
|
|
5334
5370
|
id: i,
|
|
5335
5371
|
name: t2(x.translationKey),
|
|
5336
5372
|
value: x.value.toString()
|
|
5337
|
-
})) ?? []
|
|
5338
|
-
|
|
5373
|
+
})) ?? [];
|
|
5374
|
+
const selectedListEntries = allListEntries.filter((entry) => selectedFilterValues.includes(entry.value));
|
|
5375
|
+
const unselectedListEntries = allListEntries.filter((entry) => !selectedFilterValues.includes(entry.value));
|
|
5376
|
+
return [
|
|
5377
|
+
...baseItems,
|
|
5378
|
+
...selectedListEntries,
|
|
5379
|
+
...unselectedListEntries
|
|
5380
|
+
];
|
|
5381
|
+
});
|
|
5339
5382
|
const currentFilterValueAsSelectItems = computed(() => {
|
|
5340
5383
|
if (props.column.listMode !== "multi") {
|
|
5341
5384
|
const item = listEntriesAsSelectItems.value.find((x) => x.value === currentFilterValue.value && x.id === selectedListEntryId.value) ?? listEntriesAsSelectItems.value.find((x) => x.value === currentFilterValue.value) ?? null;
|
|
@@ -5539,7 +5582,8 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5539
5582
|
const filterable = computed(() => isFilterable(props.column));
|
|
5540
5583
|
function setOrEqualFilters(value) {
|
|
5541
5584
|
const selectAllCurrentlySelected = value.some((x) => x.id === defaultSelectAllListValue.value.id);
|
|
5542
|
-
|
|
5585
|
+
const clearAllCurrentlySelected = value.some((x) => x.id === defaultClearAllListValue.value.id);
|
|
5586
|
+
if (value.length === 0 || selectAllCurrentlySelected === false && selectAllCurrentlyHighlighted.value || clearAllCurrentlySelected) {
|
|
5543
5587
|
setOrEqualFiltersImpl([defaultSelectAllListValue.value.value]);
|
|
5544
5588
|
} else if (selectAllCurrentlySelected && selectAllCurrentlyHighlighted.value === false) {
|
|
5545
5589
|
setOrEqualFiltersImpl(listEntriesAsSelectItems.value.map((x) => x.value));
|
|
@@ -5795,7 +5839,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5795
5839
|
};
|
|
5796
5840
|
}
|
|
5797
5841
|
});
|
|
5798
|
-
const clUiGridFilterInput = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-
|
|
5842
|
+
const clUiGridFilterInput = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-0de4e508"]]);
|
|
5799
5843
|
const _hoisted_1$y = { key: 1 };
|
|
5800
5844
|
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
5801
5845
|
__name: "cl-ui-grid-filter",
|