@citruslime/ui 4.1.0-beta.1 → 4.1.0-beta.2
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$t = { 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$t, [
|
|
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$s = {
|
|
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$s, [
|
|
397
397
|
renderSlot(_ctx.$slots, "label")
|
|
398
398
|
])) : createCommentVNode("", true),
|
|
399
399
|
_ctx.showRequiredAsterisk ? (openBlock(), createElementBlock("span", _hoisted_4$n, "*")) : createCommentVNode("", true)
|
|
@@ -818,7 +818,7 @@ const _hoisted_2$F = {
|
|
|
818
818
|
key: 0,
|
|
819
819
|
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"
|
|
820
820
|
};
|
|
821
|
-
const _hoisted_3$
|
|
821
|
+
const _hoisted_3$r = { class: "cl:bg-white cl:flex cl:p-2 cl:pb-1 cl:sticky cl:top-0 cl:w-full cl:z-10" };
|
|
822
822
|
const _hoisted_4$m = { class: "cl:inline-block cl:w-full" };
|
|
823
823
|
const _hoisted_5$f = { key: 6 };
|
|
824
824
|
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
@@ -958,7 +958,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
958
958
|
_ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_2$F, [
|
|
959
959
|
createVNode(clUiLoadingSpinner)
|
|
960
960
|
])) : createCommentVNode("", true),
|
|
961
|
-
createElementVNode("div", _hoisted_3$
|
|
961
|
+
createElementVNode("div", _hoisted_3$r, [
|
|
962
962
|
createElementVNode("div", _hoisted_4$m, [
|
|
963
963
|
createVNode(_sfc_main$18, {
|
|
964
964
|
id: `cl-ui-combo-box-search-input-${_ctx.objectType}`,
|
|
@@ -1027,7 +1027,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
1027
1027
|
});
|
|
1028
1028
|
const _hoisted_1$R = { class: "cl:flex cl:rounded-lg" };
|
|
1029
1029
|
const _hoisted_2$E = { class: "cl:inline-block cl:w-full" };
|
|
1030
|
-
const _hoisted_3$
|
|
1030
|
+
const _hoisted_3$q = { class: "cl:pointer-events-none cl:relative cl:top-0.5" };
|
|
1031
1031
|
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" };
|
|
1032
1032
|
const _hoisted_5$e = ["disabled"];
|
|
1033
1033
|
const _hoisted_6$a = ["disabled"];
|
|
@@ -1264,7 +1264,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
1264
1264
|
_: 1
|
|
1265
1265
|
}, 8, ["id", "modelValue", "class", "placeholder", "disabled"])
|
|
1266
1266
|
]),
|
|
1267
|
-
withDirectives(createElementVNode("div", _hoisted_3$
|
|
1267
|
+
withDirectives(createElementVNode("div", _hoisted_3$q, [
|
|
1268
1268
|
createElementVNode("div", _hoisted_4$l, [
|
|
1269
1269
|
createTextVNode(toDisplayString(unref(t2)("comboBox.required")) + " ", 1),
|
|
1270
1270
|
createVNode(unref(Icon), {
|
|
@@ -1408,7 +1408,7 @@ const _hoisted_2$D = {
|
|
|
1408
1408
|
key: 0,
|
|
1409
1409
|
class: "cl:w-full"
|
|
1410
1410
|
};
|
|
1411
|
-
const _hoisted_3$
|
|
1411
|
+
const _hoisted_3$p = {
|
|
1412
1412
|
key: 1,
|
|
1413
1413
|
class: "cl:leading-10 cl:text-sm cl:w-full"
|
|
1414
1414
|
};
|
|
@@ -1419,7 +1419,7 @@ function _sfc_render$5(_ctx, _cache) {
|
|
|
1419
1419
|
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_2$D, [
|
|
1420
1420
|
renderSlot(_ctx.$slots, "default")
|
|
1421
1421
|
])) : createCommentVNode("", true),
|
|
1422
|
-
_ctx.$slots.left || _ctx.$slots.right ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
1422
|
+
_ctx.$slots.left || _ctx.$slots.right ? (openBlock(), createElementBlock("div", _hoisted_3$p, [
|
|
1423
1423
|
createElementVNode("span", _hoisted_4$k, [
|
|
1424
1424
|
renderSlot(_ctx.$slots, "left")
|
|
1425
1425
|
]),
|
|
@@ -1499,7 +1499,7 @@ const _hoisted_1$N = {
|
|
|
1499
1499
|
class: "cl:flex cl:gap-2 cl:justify-between cl:mb-2 cl:w-full"
|
|
1500
1500
|
};
|
|
1501
1501
|
const _hoisted_2$C = { key: 1 };
|
|
1502
|
-
const _hoisted_3$
|
|
1502
|
+
const _hoisted_3$o = { class: "cl:flex cl:flex-wrap cl:gap-1 cl:lg:flex-nowrap cl:lg:gap-2 cl:md:justify-end cl:pb-2" };
|
|
1503
1503
|
const _hoisted_4$j = { class: "cl:basis-full cl:col-span-2 cl:grow cl:lg:basis-0" };
|
|
1504
1504
|
const _hoisted_5$c = {
|
|
1505
1505
|
key: 2,
|
|
@@ -1540,7 +1540,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
1540
1540
|
}, [
|
|
1541
1541
|
createElementVNode("strong", null, toDisplayString(unref(t2)("grid.gridTools")), 1)
|
|
1542
1542
|
], 2),
|
|
1543
|
-
createElementVNode("div", _hoisted_3$
|
|
1543
|
+
createElementVNode("div", _hoisted_3$o, [
|
|
1544
1544
|
createElementVNode("div", _hoisted_4$j, [
|
|
1545
1545
|
renderSlot(_ctx.$slots, "additional-grid-actions", normalizeProps(guardReactiveProps({
|
|
1546
1546
|
loading: _ctx.loading,
|
|
@@ -1767,6 +1767,7 @@ const messages = {
|
|
|
1767
1767
|
greaterthan: "Greater than",
|
|
1768
1768
|
equalorlessthan: "Less than or equal to",
|
|
1769
1769
|
equalorgreaterthan: "Greater than or equal to",
|
|
1770
|
+
orequal: "One of",
|
|
1770
1771
|
availableMethods: "Available filter methods",
|
|
1771
1772
|
true: "True",
|
|
1772
1773
|
false: "False",
|
|
@@ -1776,6 +1777,8 @@ const messages = {
|
|
|
1776
1777
|
after: "After",
|
|
1777
1778
|
onOrBefore: "On or before",
|
|
1778
1779
|
onOrAfter: "On or after",
|
|
1780
|
+
selectAll: "Select all",
|
|
1781
|
+
allEntriesSelected: "All entries selected",
|
|
1779
1782
|
page: "Page",
|
|
1780
1783
|
pageSize: "Page Size",
|
|
1781
1784
|
totalRecords: "Total Records",
|
|
@@ -2322,7 +2325,7 @@ const _hoisted_2$A = {
|
|
|
2322
2325
|
key: 4,
|
|
2323
2326
|
class: "cl:inline-block cl:whitespace-nowrap"
|
|
2324
2327
|
};
|
|
2325
|
-
const _hoisted_3$
|
|
2328
|
+
const _hoisted_3$n = {
|
|
2326
2329
|
key: 5,
|
|
2327
2330
|
class: "cl:inline-block cl:whitespace-nowrap"
|
|
2328
2331
|
};
|
|
@@ -2433,7 +2436,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
2433
2436
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
2434
2437
|
createTextVNode(toDisplayString(formatDate(_ctx.data[_ctx.column.field], unref(DateFormat).DATETIME)), 1)
|
|
2435
2438
|
], 64))
|
|
2436
|
-
], 64)) : _ctx.column.type === "list" && _ctx.column.field !== void 0 && _ctx.column.listEntries !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_1$L, toDisplayString(unref(t2)(((_a = _ctx.column.listEntries.find((entry) => entry.value === _ctx.data[_ctx.column.field])) == null ? void 0 : _a.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$
|
|
2439
|
+
], 64)) : _ctx.column.type === "list" && _ctx.column.field !== void 0 && _ctx.column.listEntries !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_1$L, toDisplayString(unref(t2)(((_a = _ctx.column.listEntries.find((entry) => entry.value === _ctx.data[_ctx.column.field])) == null ? void 0 : _a.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$n, [
|
|
2437
2440
|
createElementVNode("span", {
|
|
2438
2441
|
title: showUntruncatedStringValue.value ? _ctx.data[_ctx.column.field] : void 0,
|
|
2439
2442
|
innerHTML: formatString()
|
|
@@ -2609,7 +2612,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
2609
2612
|
});
|
|
2610
2613
|
const _hoisted_1$K = ["colspan"];
|
|
2611
2614
|
const _hoisted_2$z = ["colspan"];
|
|
2612
|
-
const _hoisted_3$
|
|
2615
|
+
const _hoisted_3$m = { key: 2 };
|
|
2613
2616
|
const _hoisted_4$h = ["colspan"];
|
|
2614
2617
|
const _hoisted_5$b = { class: "cl:flex cl:flex-wrap cl:justify-center cl:text-center cl:text-sm cl:w-full" };
|
|
2615
2618
|
const _hoisted_6$9 = { key: 0 };
|
|
@@ -2838,7 +2841,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
2838
2841
|
}, " ", 8, _hoisted_2$z)
|
|
2839
2842
|
], 2);
|
|
2840
2843
|
}), 128)) : createCommentVNode("", true)
|
|
2841
|
-
], 64)) : !_ctx.loading ? (openBlock(), createElementBlock("tr", _hoisted_3$
|
|
2844
|
+
], 64)) : !_ctx.loading ? (openBlock(), createElementBlock("tr", _hoisted_3$m, [
|
|
2842
2845
|
createElementVNode("td", {
|
|
2843
2846
|
colspan: _ctx.columns.length
|
|
2844
2847
|
}, [
|
|
@@ -2868,7 +2871,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
2868
2871
|
});
|
|
2869
2872
|
const _hoisted_1$J = ["value", "inputmode", "disabled", "placeholder"];
|
|
2870
2873
|
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" };
|
|
2871
|
-
const _hoisted_3$
|
|
2874
|
+
const _hoisted_3$l = ["disabled"];
|
|
2872
2875
|
const _hoisted_4$g = ["disabled"];
|
|
2873
2876
|
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
2874
2877
|
...{
|
|
@@ -3058,7 +3061,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
3058
3061
|
]
|
|
3059
3062
|
}, [
|
|
3060
3063
|
createVNode(_component_icon, { icon: "ph:caret-up-bold" })
|
|
3061
|
-
], 40, _hoisted_3$
|
|
3064
|
+
], 40, _hoisted_3$l),
|
|
3062
3065
|
createElementVNode("button", {
|
|
3063
3066
|
class: "cl:bg-secondary-light/30 cl:border cl:border-grey-3 cl:hover:bg-secondary-light/20 cl:px-1 cl:rounded",
|
|
3064
3067
|
disabled: _ctx.disabled,
|
|
@@ -3100,7 +3103,7 @@ const _hoisted_1$I = {
|
|
|
3100
3103
|
class: "cl:flex cl:flex-col cl:lg:flex-row cl:lg:gap-2"
|
|
3101
3104
|
};
|
|
3102
3105
|
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" };
|
|
3103
|
-
const _hoisted_3$
|
|
3106
|
+
const _hoisted_3$k = { class: "cl:border cl:border-off-white cl:lg:px-4 cl:lg:py-3 cl:mt-2 cl:p-2 cl:rounded-lg" };
|
|
3104
3107
|
const _hoisted_4$f = ["inert"];
|
|
3105
3108
|
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" };
|
|
3106
3109
|
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" };
|
|
@@ -3191,7 +3194,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3191
3194
|
words: 2
|
|
3192
3195
|
})
|
|
3193
3196
|
]),
|
|
3194
|
-
createElementVNode("div", _hoisted_3$
|
|
3197
|
+
createElementVNode("div", _hoisted_3$k, [
|
|
3195
3198
|
createVNode(unref(clUiSkeletonInput), { class: "cl:w-64" })
|
|
3196
3199
|
])
|
|
3197
3200
|
])) : _ctx.loading || ((_b = (_a = _ctx.data) == null ? void 0 : _a.results) == null ? void 0 : _b.length) && _ctx.request ? (openBlock(), createElementBlock("div", {
|
|
@@ -3319,6 +3322,94 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3319
3322
|
};
|
|
3320
3323
|
}
|
|
3321
3324
|
});
|
|
3325
|
+
const gridColumnTypes = [
|
|
3326
|
+
"string",
|
|
3327
|
+
"boolean",
|
|
3328
|
+
"number",
|
|
3329
|
+
"date",
|
|
3330
|
+
"datetime",
|
|
3331
|
+
"dateRange",
|
|
3332
|
+
"list",
|
|
3333
|
+
"slot"
|
|
3334
|
+
];
|
|
3335
|
+
function isGridColumn(objectToTest) {
|
|
3336
|
+
return typeof objectToTest.caption === "string" && typeof objectToTest.name === "string" && typeof objectToTest.type === "string";
|
|
3337
|
+
}
|
|
3338
|
+
function isGridColumnArray(arrayToTest) {
|
|
3339
|
+
let arrayIsValid = Array.isArray(arrayToTest);
|
|
3340
|
+
if (arrayIsValid) {
|
|
3341
|
+
for (const objectToTest of arrayToTest) {
|
|
3342
|
+
if (!isGridColumn(objectToTest)) {
|
|
3343
|
+
arrayIsValid = false;
|
|
3344
|
+
break;
|
|
3345
|
+
}
|
|
3346
|
+
}
|
|
3347
|
+
}
|
|
3348
|
+
return arrayIsValid;
|
|
3349
|
+
}
|
|
3350
|
+
const stringFormats = [
|
|
3351
|
+
"ellipsis",
|
|
3352
|
+
"wrap-text"
|
|
3353
|
+
];
|
|
3354
|
+
var FilterOperation = /* @__PURE__ */ ((FilterOperation2) => {
|
|
3355
|
+
FilterOperation2[FilterOperation2["CONTAINS"] = 0] = "CONTAINS";
|
|
3356
|
+
FilterOperation2[FilterOperation2["NOT_CONTAINS"] = 1] = "NOT_CONTAINS";
|
|
3357
|
+
FilterOperation2[FilterOperation2["EQUAL"] = 2] = "EQUAL";
|
|
3358
|
+
FilterOperation2[FilterOperation2["NOT_EQUAL"] = 3] = "NOT_EQUAL";
|
|
3359
|
+
FilterOperation2[FilterOperation2["STARTS_WITH"] = 4] = "STARTS_WITH";
|
|
3360
|
+
FilterOperation2[FilterOperation2["ENDS_WITH"] = 5] = "ENDS_WITH";
|
|
3361
|
+
FilterOperation2[FilterOperation2["GREATER_THAN"] = 6] = "GREATER_THAN";
|
|
3362
|
+
FilterOperation2[FilterOperation2["LESS_THAN"] = 7] = "LESS_THAN";
|
|
3363
|
+
FilterOperation2[FilterOperation2["EQUAL_OR_GREATER_THAN"] = 8] = "EQUAL_OR_GREATER_THAN";
|
|
3364
|
+
FilterOperation2[FilterOperation2["EQUAL_OR_LESS_THAN"] = 9] = "EQUAL_OR_LESS_THAN";
|
|
3365
|
+
FilterOperation2[FilterOperation2["AND_CONTAINS"] = 10] = "AND_CONTAINS";
|
|
3366
|
+
FilterOperation2[FilterOperation2["OR_EQUAL"] = 11] = "OR_EQUAL";
|
|
3367
|
+
return FilterOperation2;
|
|
3368
|
+
})(FilterOperation || {});
|
|
3369
|
+
const filterMethodTypes = [
|
|
3370
|
+
"equal",
|
|
3371
|
+
"notequal",
|
|
3372
|
+
"contains",
|
|
3373
|
+
"notcontains",
|
|
3374
|
+
"lessthan",
|
|
3375
|
+
"greaterthan",
|
|
3376
|
+
"startswith",
|
|
3377
|
+
"endswith",
|
|
3378
|
+
"equalorlessthan",
|
|
3379
|
+
"equalorgreaterthan",
|
|
3380
|
+
"andcontains",
|
|
3381
|
+
"orequal"
|
|
3382
|
+
];
|
|
3383
|
+
function isFilterArgs(objectToTest) {
|
|
3384
|
+
return typeof objectToTest.filterOnColumn === "string" && typeof objectToTest.filterOperation === "number" && typeof objectToTest.filterValue === "string";
|
|
3385
|
+
}
|
|
3386
|
+
function isSortArgs(objectToTest) {
|
|
3387
|
+
return objectToTest === null || typeof objectToTest.sortByAscending === "boolean" && typeof objectToTest.sortOnColumn === "string";
|
|
3388
|
+
}
|
|
3389
|
+
function isFilterRequest(objectToTest) {
|
|
3390
|
+
let objectValid = typeof objectToTest.filters === "object" && Array.isArray(objectToTest.filters) && typeof objectToTest.pageNumber === "number" && typeof objectToTest.pageSize === "number" && typeof objectToTest.sort === "object" && isSortArgs(objectToTest.sort);
|
|
3391
|
+
if (objectValid) {
|
|
3392
|
+
for (const filterArgs of objectToTest.filters) {
|
|
3393
|
+
if (!isFilterArgs(filterArgs)) {
|
|
3394
|
+
objectValid = false;
|
|
3395
|
+
break;
|
|
3396
|
+
}
|
|
3397
|
+
}
|
|
3398
|
+
}
|
|
3399
|
+
return objectValid;
|
|
3400
|
+
}
|
|
3401
|
+
function isFilterResponse(objectToTest, resultValidator) {
|
|
3402
|
+
let objectValid = typeof objectToTest.results === "object" && Array.isArray(objectToTest.results) && typeof objectToTest.totalRecords === "number";
|
|
3403
|
+
if (objectValid) {
|
|
3404
|
+
for (const result of objectToTest.results) {
|
|
3405
|
+
if (!resultValidator(result)) {
|
|
3406
|
+
objectValid = false;
|
|
3407
|
+
break;
|
|
3408
|
+
}
|
|
3409
|
+
}
|
|
3410
|
+
}
|
|
3411
|
+
return objectValid;
|
|
3412
|
+
}
|
|
3322
3413
|
function convertDateToIsoString(dateToConvert, forcedTimeOfDay, includeOffset, selectedTimeZone) {
|
|
3323
3414
|
const internalTimeZone = selectedTimeZone ?? "UTC";
|
|
3324
3415
|
let returnValueDate = DateTime.fromJSDate(dateToConvert, { zone: internalTimeZone }).setZone(internalTimeZone);
|
|
@@ -3794,7 +3885,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
3794
3885
|
});
|
|
3795
3886
|
const _hoisted_1$F = { class: "cl:gap-1 cl:grid cl:grid-cols-[auto_1fr_auto_auto] cl:pt-0.5 cl:w-full" };
|
|
3796
3887
|
const _hoisted_2$u = ["disabled"];
|
|
3797
|
-
const _hoisted_3$
|
|
3888
|
+
const _hoisted_3$j = { class: "cl:max-w-max" };
|
|
3798
3889
|
const _hoisted_4$e = { class: "cl:flex cl:flex-col cl:gap-1 cl:w-full" };
|
|
3799
3890
|
const _hoisted_5$9 = ["min", "disabled", "required", "step", "max"];
|
|
3800
3891
|
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" };
|
|
@@ -3861,7 +3952,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
3861
3952
|
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",
|
|
3862
3953
|
onClick: _cache[0] || (_cache[0] = ($event) => setValueAndFocus(_ctx.min))
|
|
3863
3954
|
}, toDisplayString(unref(formatNumberAsDecimal)(_ctx.min, _ctx.precision)), 9, _hoisted_2$u),
|
|
3864
|
-
createElementVNode("div", _hoisted_3$
|
|
3955
|
+
createElementVNode("div", _hoisted_3$j, [
|
|
3865
3956
|
withDirectives(createElementVNode("div", _hoisted_4$e, [
|
|
3866
3957
|
withDirectives(createElementVNode("input", mergeProps({
|
|
3867
3958
|
ref_key: "sliderRef",
|
|
@@ -4348,7 +4439,7 @@ const _hoisted_1$C = {
|
|
|
4348
4439
|
class: "cl:flex cl:gap-2 cl:p-2 cl:w-full"
|
|
4349
4440
|
};
|
|
4350
4441
|
const _hoisted_2$r = { class: "cl:w-full" };
|
|
4351
|
-
const _hoisted_3$
|
|
4442
|
+
const _hoisted_3$i = { class: "cl:w-full" };
|
|
4352
4443
|
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
4353
4444
|
...{
|
|
4354
4445
|
inheritAttrs: false
|
|
@@ -4544,7 +4635,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
4544
4635
|
_: 1
|
|
4545
4636
|
}, 8, ["modelValue", "date-format-locale", "disabled", "time-zone", "min-date", "max-date", "popover-placement"])
|
|
4546
4637
|
]),
|
|
4547
|
-
createElementVNode("div", _hoisted_3$
|
|
4638
|
+
createElementVNode("div", _hoisted_3$i, [
|
|
4548
4639
|
createVNode(_sfc_main$M, {
|
|
4549
4640
|
id: "dateInputEnd",
|
|
4550
4641
|
modelValue: internalEntrySelectEndDate.value,
|
|
@@ -4609,8 +4700,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
4609
4700
|
}
|
|
4610
4701
|
});
|
|
4611
4702
|
const _hoisted_1$B = ["value", "readonly", "placeholder", "disabled", "onKeydown"];
|
|
4612
|
-
const _hoisted_2$q =
|
|
4613
|
-
const _hoisted_3$i = ["id", "tabindex", "inert", "onKeydown"];
|
|
4703
|
+
const _hoisted_2$q = ["id", "tabindex", "inert", "onKeydown"];
|
|
4614
4704
|
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
4615
4705
|
...{
|
|
4616
4706
|
inheritAttrs: false
|
|
@@ -4689,15 +4779,17 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4689
4779
|
setSearchTerm("");
|
|
4690
4780
|
}
|
|
4691
4781
|
function select(value) {
|
|
4692
|
-
var _a;
|
|
4693
4782
|
if (Array.isArray(selectResult.value)) {
|
|
4694
4783
|
const isInArray = selectResult.value.indexOf(value);
|
|
4695
4784
|
if (isInArray > -1) {
|
|
4696
4785
|
if (selectResult.value.length > 1 || props.canClear) {
|
|
4697
|
-
selectResult.value.
|
|
4786
|
+
selectResult.value = selectResult.value.toSpliced(isInArray, 1);
|
|
4698
4787
|
}
|
|
4699
4788
|
} else {
|
|
4700
|
-
|
|
4789
|
+
selectResult.value = [
|
|
4790
|
+
...selectResult.value,
|
|
4791
|
+
value
|
|
4792
|
+
];
|
|
4701
4793
|
}
|
|
4702
4794
|
} else {
|
|
4703
4795
|
if (props.canClear && selectResult.value === value) {
|
|
@@ -4867,7 +4959,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4867
4959
|
class: normalizeClass([[inputClasses.value, {
|
|
4868
4960
|
"cl:border cl:border-grey-2": _ctx.isGridFilter === false,
|
|
4869
4961
|
"cl:border-link-light": unref(inputFocused) && !_ctx.openDropDownOnFocus && _ctx.isGridFilter === false
|
|
4870
|
-
}], "cl:flex cl:
|
|
4962
|
+
}], "cl:flex cl:items-center cl:justify-between cl:min-h-8 cl:rounded-lg cl:select-none cl:transition-colors cl:w-full"]),
|
|
4871
4963
|
onToggleModal: onInputClick
|
|
4872
4964
|
}, {
|
|
4873
4965
|
default: withCtx(() => [
|
|
@@ -4876,10 +4968,10 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4876
4968
|
ref: inputElement,
|
|
4877
4969
|
type: "text",
|
|
4878
4970
|
autocomplete: "off",
|
|
4879
|
-
value: isCurrentlySearchable.value ? searchTerm.value : selectResultAsString.value,
|
|
4971
|
+
value: isCurrentlySearchable.value ? searchTerm.value : props.isGridFilter ? _ctx.placeholder || selectResultAsString.value : selectResultAsString.value,
|
|
4880
4972
|
readonly: _ctx.allowFiltering === false,
|
|
4881
4973
|
class: [inputClasses.value, "cl:disabled:border-grey-2 cl:disabled:placeholder-grey-3 cl:outline-none cl:overflow-hidden cl:px-2 cl:py-1 cl:rounded-lg cl:text-ellipsis cl:transition-colors cl:w-full cl:whitespace-nowrap"],
|
|
4882
|
-
placeholder: selectResultAsString.value || _ctx.placeholder || void 0,
|
|
4974
|
+
placeholder: (props.isGridFilter ? _ctx.placeholder || selectResultAsString.value : selectResultAsString.value || _ctx.placeholder) || void 0,
|
|
4883
4975
|
disabled: _ctx.disabled,
|
|
4884
4976
|
onKeydown: [
|
|
4885
4977
|
preventInputKeyEventWhenNonEditable,
|
|
@@ -4899,7 +4991,10 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4899
4991
|
onFocus: focus,
|
|
4900
4992
|
onSelect: withModifiers(preventInputSelection, ["stop", "prevent"])
|
|
4901
4993
|
}), null, 16, _hoisted_1$B),
|
|
4902
|
-
createElementVNode("div",
|
|
4994
|
+
createElementVNode("div", {
|
|
4995
|
+
class: "cl:cursor-pointer cl:flex cl:items-center cl:px-2 cl:py-1 cl:relative cl:text-grey-3 cl:z-10",
|
|
4996
|
+
onClick: _cache[5] || (_cache[5] = withModifiers(($event) => isCurrentlySearchable.value ? toggleSelectModalState(false) : onInputClick(), ["stop", "prevent"]))
|
|
4997
|
+
}, [
|
|
4903
4998
|
createVNode(_component_icon, {
|
|
4904
4999
|
icon: selectModalVisible.value ? "ph:caret-up-bold" : "ph:caret-down-bold"
|
|
4905
5000
|
}, null, 8, ["icon"])
|
|
@@ -4922,7 +5017,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4922
5017
|
"cl:overflow-hidden": _ctx.disabled
|
|
4923
5018
|
}],
|
|
4924
5019
|
inert: _ctx.disabled,
|
|
4925
|
-
onBlur: _cache[
|
|
5020
|
+
onBlur: _cache[6] || (_cache[6] = ($event) => toggleSelectModalState(false)),
|
|
4926
5021
|
onKeyup: [
|
|
4927
5022
|
withKeys(moveHighlightToStart, ["tab"]),
|
|
4928
5023
|
withKeys(moveHighlightToStart, ["right"]),
|
|
@@ -4933,8 +5028,8 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4933
5028
|
withKeys(withModifiers(moveHighlightForwards, ["prevent"]), ["down"]),
|
|
4934
5029
|
withKeys(withModifiers(moveHighlightToStart, ["prevent"]), ["home"]),
|
|
4935
5030
|
withKeys(withModifiers(moveHighlightToEnd, ["prevent"]), ["end"]),
|
|
4936
|
-
_cache[
|
|
4937
|
-
_cache[
|
|
5031
|
+
_cache[7] || (_cache[7] = withKeys(withModifiers(($event) => select(displayList.value[highlightIndex.value]), ["stop", "prevent"]), ["space"])),
|
|
5032
|
+
_cache[8] || (_cache[8] = withKeys(withModifiers(($event) => select(displayList.value[highlightIndex.value]), ["stop", "prevent"]), ["enter"]))
|
|
4938
5033
|
]
|
|
4939
5034
|
}), [
|
|
4940
5035
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayList.value, (option2, index2) => {
|
|
@@ -4956,7 +5051,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4956
5051
|
])
|
|
4957
5052
|
]);
|
|
4958
5053
|
}), 128))
|
|
4959
|
-
], 16,
|
|
5054
|
+
], 16, _hoisted_2$q)) : createCommentVNode("", true)
|
|
4960
5055
|
], 2)
|
|
4961
5056
|
]),
|
|
4962
5057
|
_: 2
|
|
@@ -4998,92 +5093,6 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
4998
5093
|
};
|
|
4999
5094
|
}
|
|
5000
5095
|
});
|
|
5001
|
-
const gridColumnTypes = [
|
|
5002
|
-
"string",
|
|
5003
|
-
"boolean",
|
|
5004
|
-
"number",
|
|
5005
|
-
"date",
|
|
5006
|
-
"datetime",
|
|
5007
|
-
"dateRange",
|
|
5008
|
-
"list",
|
|
5009
|
-
"slot"
|
|
5010
|
-
];
|
|
5011
|
-
function isGridColumn(objectToTest) {
|
|
5012
|
-
return typeof objectToTest.caption === "string" && typeof objectToTest.name === "string" && typeof objectToTest.type === "string";
|
|
5013
|
-
}
|
|
5014
|
-
function isGridColumnArray(arrayToTest) {
|
|
5015
|
-
let arrayIsValid = Array.isArray(arrayToTest);
|
|
5016
|
-
if (arrayIsValid) {
|
|
5017
|
-
for (const objectToTest of arrayToTest) {
|
|
5018
|
-
if (!isGridColumn(objectToTest)) {
|
|
5019
|
-
arrayIsValid = false;
|
|
5020
|
-
break;
|
|
5021
|
-
}
|
|
5022
|
-
}
|
|
5023
|
-
}
|
|
5024
|
-
return arrayIsValid;
|
|
5025
|
-
}
|
|
5026
|
-
const stringFormats = [
|
|
5027
|
-
"ellipsis",
|
|
5028
|
-
"wrap-text"
|
|
5029
|
-
];
|
|
5030
|
-
var FilterOperation = /* @__PURE__ */ ((FilterOperation2) => {
|
|
5031
|
-
FilterOperation2[FilterOperation2["CONTAINS"] = 0] = "CONTAINS";
|
|
5032
|
-
FilterOperation2[FilterOperation2["NOT_CONTAINS"] = 1] = "NOT_CONTAINS";
|
|
5033
|
-
FilterOperation2[FilterOperation2["EQUAL"] = 2] = "EQUAL";
|
|
5034
|
-
FilterOperation2[FilterOperation2["NOT_EQUAL"] = 3] = "NOT_EQUAL";
|
|
5035
|
-
FilterOperation2[FilterOperation2["STARTS_WITH"] = 4] = "STARTS_WITH";
|
|
5036
|
-
FilterOperation2[FilterOperation2["ENDS_WITH"] = 5] = "ENDS_WITH";
|
|
5037
|
-
FilterOperation2[FilterOperation2["GREATER_THAN"] = 6] = "GREATER_THAN";
|
|
5038
|
-
FilterOperation2[FilterOperation2["LESS_THAN"] = 7] = "LESS_THAN";
|
|
5039
|
-
FilterOperation2[FilterOperation2["EQUAL_OR_GREATER_THAN"] = 8] = "EQUAL_OR_GREATER_THAN";
|
|
5040
|
-
FilterOperation2[FilterOperation2["EQUAL_OR_LESS_THAN"] = 9] = "EQUAL_OR_LESS_THAN";
|
|
5041
|
-
FilterOperation2[FilterOperation2["AND_CONTAINS"] = 10] = "AND_CONTAINS";
|
|
5042
|
-
return FilterOperation2;
|
|
5043
|
-
})(FilterOperation || {});
|
|
5044
|
-
const filterMethodTypes = [
|
|
5045
|
-
"equal",
|
|
5046
|
-
"notequal",
|
|
5047
|
-
"contains",
|
|
5048
|
-
"notcontains",
|
|
5049
|
-
"lessthan",
|
|
5050
|
-
"greaterthan",
|
|
5051
|
-
"startswith",
|
|
5052
|
-
"endswith",
|
|
5053
|
-
"equalorlessthan",
|
|
5054
|
-
"equalorgreaterthan",
|
|
5055
|
-
"andcontains"
|
|
5056
|
-
];
|
|
5057
|
-
function isFilterArgs(objectToTest) {
|
|
5058
|
-
return typeof objectToTest.filterOnColumn === "string" && typeof objectToTest.filterOperation === "number" && typeof objectToTest.filterValue === "string";
|
|
5059
|
-
}
|
|
5060
|
-
function isSortArgs(objectToTest) {
|
|
5061
|
-
return objectToTest === null || typeof objectToTest.sortByAscending === "boolean" && typeof objectToTest.sortOnColumn === "string";
|
|
5062
|
-
}
|
|
5063
|
-
function isFilterRequest(objectToTest) {
|
|
5064
|
-
let objectValid = typeof objectToTest.filters === "object" && Array.isArray(objectToTest.filters) && typeof objectToTest.pageNumber === "number" && typeof objectToTest.pageSize === "number" && typeof objectToTest.sort === "object" && isSortArgs(objectToTest.sort);
|
|
5065
|
-
if (objectValid) {
|
|
5066
|
-
for (const filterArgs of objectToTest.filters) {
|
|
5067
|
-
if (!isFilterArgs(filterArgs)) {
|
|
5068
|
-
objectValid = false;
|
|
5069
|
-
break;
|
|
5070
|
-
}
|
|
5071
|
-
}
|
|
5072
|
-
}
|
|
5073
|
-
return objectValid;
|
|
5074
|
-
}
|
|
5075
|
-
function isFilterResponse(objectToTest, resultValidator) {
|
|
5076
|
-
let objectValid = typeof objectToTest.results === "object" && Array.isArray(objectToTest.results) && typeof objectToTest.totalRecords === "number";
|
|
5077
|
-
if (objectValid) {
|
|
5078
|
-
for (const result of objectToTest.results) {
|
|
5079
|
-
if (!resultValidator(result)) {
|
|
5080
|
-
objectValid = false;
|
|
5081
|
-
break;
|
|
5082
|
-
}
|
|
5083
|
-
}
|
|
5084
|
-
}
|
|
5085
|
-
return objectValid;
|
|
5086
|
-
}
|
|
5087
5096
|
const defaultFilterMethod = {
|
|
5088
5097
|
method: "equal",
|
|
5089
5098
|
icon: "mdi:equal",
|
|
@@ -5147,6 +5156,13 @@ const filterMethods = [
|
|
|
5147
5156
|
],
|
|
5148
5157
|
key: "notequal"
|
|
5149
5158
|
},
|
|
5159
|
+
{
|
|
5160
|
+
method: "orequal",
|
|
5161
|
+
icon: "mdi:set-none",
|
|
5162
|
+
description: "One of",
|
|
5163
|
+
allowedTypes: ["list"],
|
|
5164
|
+
key: "orequal"
|
|
5165
|
+
},
|
|
5150
5166
|
defaultDateTimeFilterMethod,
|
|
5151
5167
|
{
|
|
5152
5168
|
method: "greaterthan",
|
|
@@ -5227,6 +5243,11 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
5227
5243
|
} else if (typeof props.column.slotType !== "undefined" && typeof props.column.field !== "undefined") {
|
|
5228
5244
|
methods = filterMethods.filter((f) => f.allowedTypes.includes(props.column.slotType));
|
|
5229
5245
|
}
|
|
5246
|
+
if ((props.column.type === "list" || props.column.type === "slot" && props.column.slotType === "list") && props.column.listMode === "multi") {
|
|
5247
|
+
methods = methods.filter((m) => m.method === "orequal");
|
|
5248
|
+
} else {
|
|
5249
|
+
methods = methods.filter((m) => m.method !== "orequal");
|
|
5250
|
+
}
|
|
5230
5251
|
if (props.column.type === "date" || props.column.type === "datetime" || props.column.slotType === "date" || props.column.slotType === "datetime") {
|
|
5231
5252
|
methods.forEach((m) => {
|
|
5232
5253
|
m.description = t2(`grid.${m.key}`);
|
|
@@ -5319,6 +5340,11 @@ const defaultEmptyListValue = {
|
|
|
5319
5340
|
name: "",
|
|
5320
5341
|
value: ""
|
|
5321
5342
|
};
|
|
5343
|
+
const defaultSelectAllListValue = {
|
|
5344
|
+
id: -2,
|
|
5345
|
+
name: i18n.global.t("grid.selectAll"),
|
|
5346
|
+
value: ""
|
|
5347
|
+
};
|
|
5322
5348
|
const booleanListEntries = computed(() => [
|
|
5323
5349
|
defaultEmptyListValue,
|
|
5324
5350
|
{
|
|
@@ -5363,7 +5389,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5363
5389
|
const emit = __emit;
|
|
5364
5390
|
const { t: t2, locale: locale2 } = useI18n();
|
|
5365
5391
|
function getDefaultFilterOperation() {
|
|
5366
|
-
return props.column.type === "string" || props.column.slotType === "string" ? FilterOperation.CONTAINS : props.column.type === "datetime" || props.column.slotType === "datetime" || props.column.type === "date" || props.column.slotType === "date" ? FilterOperation.LESS_THAN : FilterOperation.EQUAL;
|
|
5392
|
+
return isListColumn.value && props.column.listMode === "multi" ? FilterOperation.OR_EQUAL : props.column.type === "string" || props.column.slotType === "string" ? FilterOperation.CONTAINS : props.column.type === "datetime" || props.column.slotType === "datetime" || props.column.type === "date" || props.column.slotType === "date" ? FilterOperation.LESS_THAN : FilterOperation.EQUAL;
|
|
5367
5393
|
}
|
|
5368
5394
|
const currentFilters = computed({
|
|
5369
5395
|
get: () => props.filter,
|
|
@@ -5379,7 +5405,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5379
5405
|
const listEntriesAsSelectItems = computed(() => {
|
|
5380
5406
|
var _a;
|
|
5381
5407
|
return [
|
|
5382
|
-
defaultEmptyListValue,
|
|
5408
|
+
props.column.listMode === "multi" ? defaultSelectAllListValue : defaultEmptyListValue,
|
|
5383
5409
|
...((_a = props.column.listEntries) == null ? void 0 : _a.map((x, i) => ({
|
|
5384
5410
|
id: i,
|
|
5385
5411
|
name: t2(x.translationKey),
|
|
@@ -5387,11 +5413,28 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5387
5413
|
}))) ?? []
|
|
5388
5414
|
];
|
|
5389
5415
|
});
|
|
5390
|
-
const
|
|
5416
|
+
const currentFilterValueAsSelectItems = computed(() => {
|
|
5417
|
+
var _a, _b;
|
|
5418
|
+
if (props.column.listMode !== "multi") {
|
|
5419
|
+
const item = listEntriesAsSelectItems.value.find((x) => x.value === currentFilterValue.value && x.id === selectedListEntryId.value) ?? listEntriesAsSelectItems.value.find((x) => x.value === currentFilterValue.value) ?? null;
|
|
5420
|
+
return item ? item : null;
|
|
5421
|
+
} else {
|
|
5422
|
+
const filters = (_a = props.filter) == null ? void 0 : _a.filter((f) => f.filterOperation === FilterOperation.OR_EQUAL).map((f) => f.filterValue);
|
|
5423
|
+
const filteredListEntries = listEntriesAsSelectItems.value.filter((x) => filters == null ? void 0 : filters.includes(x.value));
|
|
5424
|
+
if (filteredListEntries.length === ((_b = props.column.listEntries) == null ? void 0 : _b.length)) {
|
|
5425
|
+
filteredListEntries.push(defaultSelectAllListValue);
|
|
5426
|
+
}
|
|
5427
|
+
return filteredListEntries;
|
|
5428
|
+
}
|
|
5429
|
+
});
|
|
5430
|
+
const selectAllCurrentlyHighlighted = computed(() => Array.isArray(currentFilterValueAsSelectItems.value) && currentFilterValueAsSelectItems.value.some((x) => x.id === defaultSelectAllListValue.id));
|
|
5391
5431
|
const selectedListEntryId = ref(defaultEmptyListValue.id);
|
|
5392
|
-
function
|
|
5432
|
+
function updateListColumnSelectItems(value) {
|
|
5393
5433
|
if (value && !Array.isArray(value)) {
|
|
5394
5434
|
selectedListEntryId.value = value.id;
|
|
5435
|
+
} else if (value && Array.isArray(value)) {
|
|
5436
|
+
setOrEqualFilters(value);
|
|
5437
|
+
return;
|
|
5395
5438
|
}
|
|
5396
5439
|
if (isNumericListColumn.value) {
|
|
5397
5440
|
setNumberFilter(null, value == null ? void 0 : value.value);
|
|
@@ -5576,6 +5619,24 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5576
5619
|
const currentDateFilterValue = computed(() => currentFilterValue.value === "" ? null : currentFilterValue.value);
|
|
5577
5620
|
const currentDateRangeFilterValue = computed(() => currentFilterValue.value === "" ? null : currentFilterValue.value);
|
|
5578
5621
|
const filterable = computed(() => isFilterable(props.column));
|
|
5622
|
+
function setOrEqualFilters(value) {
|
|
5623
|
+
const selectAllCurrentlySelected = value.some((x) => x.id === defaultSelectAllListValue.id);
|
|
5624
|
+
if (value.length === 0 || selectAllCurrentlySelected === false && selectAllCurrentlyHighlighted.value) {
|
|
5625
|
+
setOrEqualFiltersImpl([defaultSelectAllListValue.value]);
|
|
5626
|
+
} else if (selectAllCurrentlySelected && selectAllCurrentlyHighlighted.value === false) {
|
|
5627
|
+
setOrEqualFiltersImpl(listEntriesAsSelectItems.value.map((x) => x.value));
|
|
5628
|
+
} else {
|
|
5629
|
+
setOrEqualFiltersImpl(value.map((x) => x.value));
|
|
5630
|
+
}
|
|
5631
|
+
function setOrEqualFiltersImpl(values) {
|
|
5632
|
+
currentFilters.value = values.map((x) => ({
|
|
5633
|
+
filterOnColumn: props.column.field,
|
|
5634
|
+
filterOperation: FilterOperation.OR_EQUAL,
|
|
5635
|
+
filterMethod: "orequal",
|
|
5636
|
+
filterValue: x
|
|
5637
|
+
}));
|
|
5638
|
+
}
|
|
5639
|
+
}
|
|
5579
5640
|
function setFilter(target, defaultValue) {
|
|
5580
5641
|
var _a;
|
|
5581
5642
|
let filterOutput;
|
|
@@ -5765,11 +5826,15 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5765
5826
|
key: 5,
|
|
5766
5827
|
id: `${unref(gridId)}-${_ctx.column.name}`,
|
|
5767
5828
|
list: listEntriesAsSelectItems.value,
|
|
5768
|
-
"model-value":
|
|
5769
|
-
|
|
5829
|
+
"model-value": currentFilterValueAsSelectItems.value,
|
|
5830
|
+
"use-list-view": false,
|
|
5831
|
+
"allow-filtering": true,
|
|
5832
|
+
"can-clear": props.column.listMode === "multi",
|
|
5833
|
+
placeholder: selectAllCurrentlyHighlighted.value ? unref(t2)("grid.allEntriesSelected") : void 0,
|
|
5834
|
+
class: "cl:bg-white cl:font-normal! cl:max-h-52! cl:min-h-0! cl:placeholder:text-xs cl:rounded-lg! cl:text-xs",
|
|
5770
5835
|
"is-grid-filter": true,
|
|
5771
5836
|
inert: _ctx.loading,
|
|
5772
|
-
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) =>
|
|
5837
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => updateListColumnSelectItems($event))
|
|
5773
5838
|
}, {
|
|
5774
5839
|
default: withCtx(({ select, option: option2, index: index2, highlightIndex, isSelected }) => [
|
|
5775
5840
|
createVNode(_sfc_main$I, {
|
|
@@ -5788,7 +5853,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5788
5853
|
}, 1032, ["is-highlighted", "is-selected", "class", "onSelect"])
|
|
5789
5854
|
]),
|
|
5790
5855
|
_: 1
|
|
5791
|
-
}, 8, ["id", "list", "model-value", "inert"])) : createCommentVNode("", true),
|
|
5856
|
+
}, 8, ["id", "list", "model-value", "can-clear", "placeholder", "inert"])) : createCommentVNode("", true),
|
|
5792
5857
|
!isDateRangeColumn.value ? (openBlock(), createBlock(_sfc_main$H, {
|
|
5793
5858
|
key: 6,
|
|
5794
5859
|
filter: currentFilter.value,
|
|
@@ -5803,7 +5868,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5803
5868
|
};
|
|
5804
5869
|
}
|
|
5805
5870
|
});
|
|
5806
|
-
const clUiGridFilterInput = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-
|
|
5871
|
+
const clUiGridFilterInput = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-4bb0f963"]]);
|
|
5807
5872
|
const _hoisted_1$y = { key: 1 };
|
|
5808
5873
|
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
5809
5874
|
__name: "cl-ui-grid-filter",
|
|
@@ -5922,10 +5987,27 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
5922
5987
|
function updateFilter(filters) {
|
|
5923
5988
|
if (filters) {
|
|
5924
5989
|
const request = copy(currentRequest.value);
|
|
5925
|
-
request.filters
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5990
|
+
const filteredRequests = request.filters.filter((f) => f.filterOnColumn !== filters[0].filterOnColumn);
|
|
5991
|
+
if (filters.some((f) => f.filterOperation === FilterOperation.OR_EQUAL)) {
|
|
5992
|
+
if (filters.every((f) => f.filterValue === "")) {
|
|
5993
|
+
request.filters = filteredRequests;
|
|
5994
|
+
} else if (filters.some((f) => f.filterValue === "")) {
|
|
5995
|
+
request.filters = [
|
|
5996
|
+
...filteredRequests,
|
|
5997
|
+
...filters.filter((f) => f.filterValue !== "")
|
|
5998
|
+
];
|
|
5999
|
+
} else {
|
|
6000
|
+
request.filters = [
|
|
6001
|
+
...filteredRequests,
|
|
6002
|
+
...filters
|
|
6003
|
+
];
|
|
6004
|
+
}
|
|
6005
|
+
} else {
|
|
6006
|
+
request.filters = [
|
|
6007
|
+
...filteredRequests,
|
|
6008
|
+
...filters
|
|
6009
|
+
];
|
|
6010
|
+
}
|
|
5929
6011
|
request.pageNumber = 1;
|
|
5930
6012
|
currentRequest.value = request;
|
|
5931
6013
|
}
|