@citruslime/ui 4.1.0-beta.0 → 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$u = { class: "cl:overflow-hidden" };
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$u, [
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$t = {
362
+ const _hoisted_3$s = {
363
363
  key: 0,
364
364
  class: "cl:self-center"
365
365
  };
@@ -367,7 +367,7 @@ const _hoisted_4$n = {
367
367
  key: 1,
368
368
  class: "cl:text-danger-dark"
369
369
  };
370
- const _hoisted_5$h = {
370
+ const _hoisted_5$g = {
371
371
  key: 0,
372
372
  class: "cl:pt-1 cl:w-full"
373
373
  };
@@ -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$t, [
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)
@@ -402,7 +402,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
402
402
  renderSlot(_ctx.$slots, "default")
403
403
  ])
404
404
  ], 2),
405
- hasErrors.value ? (openBlock(), createElementBlock("div", _hoisted_5$h, [
405
+ hasErrors.value ? (openBlock(), createElementBlock("div", _hoisted_5$g, [
406
406
  createElementVNode("div", _hoisted_6$b, [
407
407
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.errors, (error, index2) => {
408
408
  return openBlock(), createElementBlock("div", {
@@ -818,9 +818,9 @@ 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$s = { class: "cl:bg-white cl:flex cl:p-2 cl:pb-1 cl:sticky cl:top-0 cl:w-full cl:z-10" };
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
- const _hoisted_5$g = { key: 6 };
823
+ const _hoisted_5$f = { key: 6 };
824
824
  const _sfc_main$14 = /* @__PURE__ */ defineComponent({
825
825
  __name: "cl-ui-combo-box-search",
826
826
  props: {
@@ -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$s, [
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}`,
@@ -1008,7 +1008,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
1008
1008
  onCreateObject: createObject,
1009
1009
  onOptionHighlighted: updateSelectedObjectIndex
1010
1010
  }, null, 8, ["text", "selected-index"])) : createCommentVNode("", true),
1011
- _ctx.errorMessage === "" && _ctx.results !== null ? (openBlock(), createElementBlock("div", _hoisted_5$g, [
1011
+ _ctx.errorMessage === "" && _ctx.results !== null ? (openBlock(), createElementBlock("div", _hoisted_5$f, [
1012
1012
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.results, (result, index2) => {
1013
1013
  return openBlock(), createBlock(_sfc_main$15, {
1014
1014
  key: index2,
@@ -1027,9 +1027,9 @@ 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$r = { class: "cl:pointer-events-none cl:relative cl:top-0.5" };
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
- const _hoisted_5$f = ["disabled"];
1032
+ const _hoisted_5$e = ["disabled"];
1033
1033
  const _hoisted_6$a = ["disabled"];
1034
1034
  const _hoisted_7$8 = { class: "cl:min-h-[16rem] cl:mx-4" };
1035
1035
  const _hoisted_8$7 = { class: "cl:p-2 cl:text-right cl:w-full" };
@@ -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$r, [
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), {
@@ -1288,7 +1288,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
1288
1288
  icon: "ph:caret-down-bold",
1289
1289
  class: "cl:ml-[4px] cl:mt-[9px]"
1290
1290
  })
1291
- ], 10, _hoisted_5$f)) : (openBlock(), createElementBlock("div", {
1291
+ ], 10, _hoisted_5$e)) : (openBlock(), createElementBlock("div", {
1292
1292
  key: 1,
1293
1293
  class: normalizeClass(["cl:border cl:border-grey-2 cl:border-l-0 cl:float-right cl:rounded-l-none cl:rounded-lg cl:text-grey-3 cl:transition-colors cl:w-[27px]", {
1294
1294
  "cl:cursor-default cl:bg-off-white": _ctx.disabled,
@@ -1408,22 +1408,22 @@ const _hoisted_2$D = {
1408
1408
  key: 0,
1409
1409
  class: "cl:w-full"
1410
1410
  };
1411
- const _hoisted_3$q = {
1411
+ const _hoisted_3$p = {
1412
1412
  key: 1,
1413
1413
  class: "cl:leading-10 cl:text-sm cl:w-full"
1414
1414
  };
1415
1415
  const _hoisted_4$k = { class: "cl:float-left" };
1416
- const _hoisted_5$e = { class: "cl:float-right" };
1416
+ const _hoisted_5$d = { class: "cl:float-right" };
1417
1417
  function _sfc_render$5(_ctx, _cache) {
1418
1418
  return openBlock(), createElementBlock("div", _hoisted_1$Q, [
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$q, [
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
  ]),
1426
- createElementVNode("span", _hoisted_5$e, [
1426
+ createElementVNode("span", _hoisted_5$d, [
1427
1427
  renderSlot(_ctx.$slots, "right")
1428
1428
  ])
1429
1429
  ])) : createCommentVNode("", true)
@@ -1499,9 +1499,9 @@ 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$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" };
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
- const _hoisted_5$d = {
1504
+ const _hoisted_5$c = {
1505
1505
  key: 2,
1506
1506
  class: "cl:flex-1 cl:lg:block cl:lg:flex-none"
1507
1507
  };
@@ -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$p, [
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,
@@ -1582,7 +1582,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
1582
1582
  ]),
1583
1583
  _: 1
1584
1584
  }, 8, ["disabled"])) : createCommentVNode("", true),
1585
- _ctx.options.hideViewManager === false ? (openBlock(), createElementBlock("div", _hoisted_5$d, [
1585
+ _ctx.options.hideViewManager === false ? (openBlock(), createElementBlock("div", _hoisted_5$c, [
1586
1586
  renderSlot(_ctx.$slots, "view-manager")
1587
1587
  ])) : createCommentVNode("", true),
1588
1588
  unref(anyFilterableColumns)(_ctx.columns) || unref(anySortableColumns)(_ctx.options, _ctx.columns) ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
@@ -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$o = {
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$o, [
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,9 +2612,9 @@ 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$n = { key: 2 };
2615
+ const _hoisted_3$m = { key: 2 };
2613
2616
  const _hoisted_4$h = ["colspan"];
2614
- const _hoisted_5$c = { class: "cl:flex cl:flex-wrap cl:justify-center cl:text-center cl:text-sm cl:w-full" };
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 };
2616
2619
  const _hoisted_7$7 = {
2617
2620
  key: 1,
@@ -2838,11 +2841,11 @@ 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$n, [
2844
+ ], 64)) : !_ctx.loading ? (openBlock(), createElementBlock("tr", _hoisted_3$m, [
2842
2845
  createElementVNode("td", {
2843
2846
  colspan: _ctx.columns.length
2844
2847
  }, [
2845
- createElementVNode("div", _hoisted_5$c, [
2848
+ createElementVNode("div", _hoisted_5$b, [
2846
2849
  _ctx.$slots.noData && _ctx.request.filters.some((f) => f.filterValue !== "") === false ? (openBlock(), createElementBlock("div", _hoisted_6$9, [
2847
2850
  renderSlot(_ctx.$slots, "noData")
2848
2851
  ])) : (openBlock(), createElementBlock("strong", _hoisted_7$7, toDisplayString(unref(t2)("grid.noData")), 1)),
@@ -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$m = ["disabled"];
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$m),
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,9 +3103,9 @@ 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$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" };
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
- const _hoisted_5$b = { 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" };
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" };
3107
3110
  const _hoisted_7$6 = { class: "cl:flex cl:flex-wrap cl:gap-x-4" };
3108
3111
  const _hoisted_8$5 = { class: "cl:flex cl:flex-col cl:lg:flex-row" };
@@ -3191,7 +3194,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
3191
3194
  words: 2
3192
3195
  })
3193
3196
  ]),
3194
- createElementVNode("div", _hoisted_3$l, [
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", {
@@ -3201,7 +3204,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
3201
3204
  }]),
3202
3205
  inert: _ctx.loading
3203
3206
  }, [
3204
- createElementVNode("div", _hoisted_5$b, [
3207
+ createElementVNode("div", _hoisted_5$a, [
3205
3208
  createElementVNode("div", _hoisted_6$8, [
3206
3209
  createElementVNode("div", _hoisted_7$6, [
3207
3210
  createElementVNode("div", _hoisted_8$5, [
@@ -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,9 +3885,9 @@ 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$k = { class: "cl:max-w-max" };
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
- const _hoisted_5$a = ["min", "disabled", "required", "step", "max"];
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" };
3801
3892
  const _hoisted_7$5 = ["disabled"];
3802
3893
  const _hoisted_8$4 = ["disabled", "title"];
@@ -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$k, [
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",
@@ -3875,7 +3966,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
3875
3966
  required: _ctx.required,
3876
3967
  step: 1 / Math.pow(10, _ctx.precision),
3877
3968
  max: _ctx.max
3878
- }), null, 16, _hoisted_5$a), [
3969
+ }), null, 16, _hoisted_5$9), [
3879
3970
  [
3880
3971
  vModelText,
3881
3972
  value.value,
@@ -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$j = { class: "cl:w-full" };
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$j, [
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 = { class: "cl:flex cl:items-center cl:pointer-events-none cl:px-2 cl:py-1 cl:relative cl:text-grey-3 cl:z-10" };
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.splice(isInArray, 1);
4786
+ selectResult.value = selectResult.value.toSpliced(isInArray, 1);
4698
4787
  }
4699
4788
  } else {
4700
- (_a = selectResult.value) == null ? void 0 : _a.push(value);
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:gap-2 cl:items-center cl:justify-between cl:min-h-8 cl:rounded-lg cl:select-none cl:transition-colors cl:w-full"]),
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", _hoisted_2$q, [
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[5] || (_cache[5] = ($event) => toggleSelectModalState(false)),
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[6] || (_cache[6] = withKeys(withModifiers(($event) => select(displayList.value[highlightIndex.value]), ["stop", "prevent"]), ["space"])),
4937
- _cache[7] || (_cache[7] = withKeys(withModifiers(($event) => select(displayList.value[highlightIndex.value]), ["stop", "prevent"]), ["enter"]))
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, _hoisted_3$i)) : createCommentVNode("", true)
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
  {
@@ -5332,20 +5358,16 @@ const booleanListEntries = computed(() => [
5332
5358
  value: "false"
5333
5359
  }
5334
5360
  ]);
5335
- const _hoisted_1$z = ["inert"];
5336
- const _hoisted_2$o = {
5361
+ const _hoisted_1$z = {
5337
5362
  key: 1,
5338
5363
  class: "cl:w-full"
5339
5364
  };
5365
+ const _hoisted_2$o = ["inert"];
5340
5366
  const _hoisted_3$g = {
5341
- key: 2,
5342
- class: "cl:w-full"
5343
- };
5344
- const _hoisted_4$d = {
5345
5367
  key: 3,
5346
5368
  class: "cl:w-full"
5347
5369
  };
5348
- const _hoisted_5$9 = {
5370
+ const _hoisted_4$d = {
5349
5371
  key: 4,
5350
5372
  class: "cl:w-full"
5351
5373
  };
@@ -5367,7 +5389,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5367
5389
  const emit = __emit;
5368
5390
  const { t: t2, locale: locale2 } = useI18n();
5369
5391
  function getDefaultFilterOperation() {
5370
- 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;
5371
5393
  }
5372
5394
  const currentFilters = computed({
5373
5395
  get: () => props.filter,
@@ -5383,7 +5405,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5383
5405
  const listEntriesAsSelectItems = computed(() => {
5384
5406
  var _a;
5385
5407
  return [
5386
- defaultEmptyListValue,
5408
+ props.column.listMode === "multi" ? defaultSelectAllListValue : defaultEmptyListValue,
5387
5409
  ...((_a = props.column.listEntries) == null ? void 0 : _a.map((x, i) => ({
5388
5410
  id: i,
5389
5411
  name: t2(x.translationKey),
@@ -5391,11 +5413,28 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5391
5413
  }))) ?? []
5392
5414
  ];
5393
5415
  });
5394
- const currentFilterValueAsSelectItem = computed(() => listEntriesAsSelectItems.value.find((x) => x.value === currentFilterValue.value && x.id === selectedListEntryId.value) ?? listEntriesAsSelectItems.value.find((x) => x.value === currentFilterValue.value) ?? null);
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));
5395
5431
  const selectedListEntryId = ref(defaultEmptyListValue.id);
5396
- function updateListColumnSelectItem(value) {
5432
+ function updateListColumnSelectItems(value) {
5397
5433
  if (value && !Array.isArray(value)) {
5398
5434
  selectedListEntryId.value = value.id;
5435
+ } else if (value && Array.isArray(value)) {
5436
+ setOrEqualFilters(value);
5437
+ return;
5399
5438
  }
5400
5439
  if (isNumericListColumn.value) {
5401
5440
  setNumberFilter(null, value == null ? void 0 : value.value);
@@ -5580,6 +5619,24 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5580
5619
  const currentDateFilterValue = computed(() => currentFilterValue.value === "" ? null : currentFilterValue.value);
5581
5620
  const currentDateRangeFilterValue = computed(() => currentFilterValue.value === "" ? null : currentFilterValue.value);
5582
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
+ }
5583
5640
  function setFilter(target, defaultValue) {
5584
5641
  var _a;
5585
5642
  let filterOutput;
@@ -5679,8 +5736,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5679
5736
  key: 0,
5680
5737
  class: normalizeClass(["cl:border cl:border-grey-2 cl:flex cl:relative cl:rounded-md", [
5681
5738
  _ctx.options.hideGridMobileView || isListColumn.value || _ctx.column.type === "boolean" || _ctx.column.type === "slot" && _ctx.column.slotType === "boolean" ? "cl:overflow-visible" : "cl:overflow-hidden cl:lg:overflow-visible!"
5682
- ]]),
5683
- inert: _ctx.loading
5739
+ ]])
5684
5740
  }, [
5685
5741
  _ctx.column.type === "boolean" || _ctx.column.type === "slot" && _ctx.column.slotType === "boolean" ? (openBlock(), createBlock(_sfc_main$J, {
5686
5742
  key: 0,
@@ -5689,6 +5745,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5689
5745
  "is-grid-filter": true,
5690
5746
  class: "cl:bg-white cl:font-normal cl:min-h-0! cl:rounded-lg!",
5691
5747
  "model-value": booleanValueAsSelectItem.value,
5748
+ inert: _ctx.loading,
5692
5749
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => setFilter(null, ($event == null ? void 0 : $event.value) ?? ""))
5693
5750
  }, {
5694
5751
  default: withCtx(({ select, option: option2, index: index2, highlightIndex, isSelected }) => [
@@ -5705,17 +5762,22 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5705
5762
  }, 1032, ["is-selected", "is-highlighted", "onSelect"])
5706
5763
  ]),
5707
5764
  _: 1
5708
- }, 8, ["id", "list", "model-value"])) : isDateColumn.value ? (openBlock(), createElementBlock("div", _hoisted_2$o, [
5765
+ }, 8, ["id", "list", "model-value", "inert"])) : isDateColumn.value ? (openBlock(), createElementBlock("div", _hoisted_1$z, [
5709
5766
  createVNode(_sfc_main$M, {
5710
5767
  id: `${unref(gridId)}-${_ctx.column.name}`,
5711
5768
  "model-value": currentDateFilterValue.value,
5712
5769
  "time-zone": _ctx.timeZone,
5713
5770
  type: _ctx.column.type === "slot" ? _ctx.column.slotType : _ctx.column.type,
5714
5771
  class: "cl:border-none cl:h-[2rem]! cl:lg:text-base! cl:mb-0 cl:pb-1 cl:text-xs cl:w-full readonly-filter",
5772
+ readonly: _ctx.loading,
5715
5773
  "popover-placement": "bottom-start",
5716
5774
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => setFilter(null, $event ?? ""))
5717
- }, null, 8, ["id", "model-value", "time-zone", "type"])
5718
- ])) : isDateRangeColumn.value ? (openBlock(), createElementBlock("div", _hoisted_3$g, [
5775
+ }, null, 8, ["id", "model-value", "time-zone", "type", "readonly"])
5776
+ ])) : isDateRangeColumn.value ? (openBlock(), createElementBlock("div", {
5777
+ key: 2,
5778
+ class: "cl:w-full",
5779
+ inert: _ctx.loading
5780
+ }, [
5719
5781
  createVNode(_sfc_main$L, {
5720
5782
  id: `${unref(gridId)}-${_ctx.column.name}`,
5721
5783
  "model-value": currentDateRangeFilterValue.value,
@@ -5726,13 +5788,14 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5726
5788
  "popover-placement": "bottom-start",
5727
5789
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => setDateRangeFilter($event))
5728
5790
  }, null, 8, ["id", "model-value", "time-zone", "quick-date-scope"])
5729
- ])) : _ctx.column.type === "number" || _ctx.column.type === "slot" && _ctx.column.slotType === "number" ? (openBlock(), createElementBlock("div", _hoisted_4$d, [
5791
+ ], 8, _hoisted_2$o)) : _ctx.column.type === "number" || _ctx.column.type === "slot" && _ctx.column.slotType === "number" ? (openBlock(), createElementBlock("div", _hoisted_3$g, [
5730
5792
  createVNode(_sfc_main$U, {
5731
5793
  id: `${unref(gridId)}-${_ctx.column.name}`,
5732
5794
  "model-value": currentFilterValue.value === "" || isNaN(+currentFilterValue.value) ? null : +currentFilterValue.value,
5733
5795
  format: numericFormat.value,
5734
5796
  precision: _ctx.column.format === unref(NumberFormat).INTEGER ? 0 : unref(getMergedFormatOptions)(numericFormat.value, { locale: unref(locale2), additionalOptions: { maximumFractionDigits: _ctx.column.precision ?? 2 } }).maximumFractionDigits,
5735
5797
  class: "cl:border-none cl:font-normal cl:h-[2rem] cl:lg:text-base cl:mb-0 cl:text-xs cl:w-full readonly-filter",
5798
+ readonly: _ctx.loading,
5736
5799
  "show-arrows": false,
5737
5800
  "allow-empty": true,
5738
5801
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $event !== null ? setNumberFilter(null, $event) : setFilter(null, ""))
@@ -5741,8 +5804,8 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5741
5804
  createElementVNode("span", null, null, -1)
5742
5805
  ])),
5743
5806
  _: 1
5744
- }, 8, ["id", "model-value", "format", "precision"])
5745
- ])) : _ctx.column.type === "string" || _ctx.column.type === "slot" && _ctx.column.slotType === "string" ? (openBlock(), createElementBlock("div", _hoisted_5$9, [
5807
+ }, 8, ["id", "model-value", "format", "precision", "readonly"])
5808
+ ])) : _ctx.column.type === "string" || _ctx.column.type === "slot" && _ctx.column.slotType === "string" ? (openBlock(), createElementBlock("div", _hoisted_4$d, [
5746
5809
  createVNode(_sfc_main$18, {
5747
5810
  id: `${unref(gridId)}-${_ctx.column.name}`,
5748
5811
  modelValue: internalTextInputValue.value,
@@ -5751,21 +5814,27 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5751
5814
  _cache[5] || (_cache[5] = (value) => setFilter(null, value))
5752
5815
  ],
5753
5816
  class: "cl:border-none cl:font-normal cl:h-[2rem] cl:lg:text-base cl:px-3 cl:text-xs readonly-filter",
5817
+ readonly: _ctx.loading,
5754
5818
  onKeySinglePress: handleKeySinglePress
5755
5819
  }, {
5756
5820
  default: withCtx(() => _cache[10] || (_cache[10] = [
5757
5821
  createElementVNode("span", null, null, -1)
5758
5822
  ])),
5759
5823
  _: 1
5760
- }, 8, ["id", "modelValue"])
5824
+ }, 8, ["id", "modelValue", "readonly"])
5761
5825
  ])) : isListColumn.value ? (openBlock(), createBlock(_sfc_main$J, {
5762
5826
  key: 5,
5763
5827
  id: `${unref(gridId)}-${_ctx.column.name}`,
5764
5828
  list: listEntriesAsSelectItems.value,
5765
- "model-value": currentFilterValueAsSelectItem.value,
5766
- class: "cl:bg-white cl:font-normal cl:max-h-52! cl:min-h-0! cl:rounded-lg!",
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",
5767
5835
  "is-grid-filter": true,
5768
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => updateListColumnSelectItem($event))
5836
+ inert: _ctx.loading,
5837
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => updateListColumnSelectItems($event))
5769
5838
  }, {
5770
5839
  default: withCtx(({ select, option: option2, index: index2, highlightIndex, isSelected }) => [
5771
5840
  createVNode(_sfc_main$I, {
@@ -5784,7 +5853,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5784
5853
  }, 1032, ["is-highlighted", "is-selected", "class", "onSelect"])
5785
5854
  ]),
5786
5855
  _: 1
5787
- }, 8, ["id", "list", "model-value"])) : createCommentVNode("", true),
5856
+ }, 8, ["id", "list", "model-value", "can-clear", "placeholder", "inert"])) : createCommentVNode("", true),
5788
5857
  !isDateRangeColumn.value ? (openBlock(), createBlock(_sfc_main$H, {
5789
5858
  key: 6,
5790
5859
  filter: currentFilter.value,
@@ -5795,11 +5864,11 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5795
5864
  "dropdown-position": _ctx.filterDropdownPosition,
5796
5865
  onSelectionChanged: _cache[8] || (_cache[8] = ($event) => immediateRequestOverride.value = true)
5797
5866
  }, null, 8, ["filter", "loading", "column", "default-operation", "dropdown-position"])) : createCommentVNode("", true)
5798
- ], 10, _hoisted_1$z)) : createCommentVNode("", true);
5867
+ ], 2)) : createCommentVNode("", true);
5799
5868
  };
5800
5869
  }
5801
5870
  });
5802
- const clUiGridFilterInput = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-0147943d"]]);
5871
+ const clUiGridFilterInput = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-4bb0f963"]]);
5803
5872
  const _hoisted_1$y = { key: 1 };
5804
5873
  const _sfc_main$F = /* @__PURE__ */ defineComponent({
5805
5874
  __name: "cl-ui-grid-filter",
@@ -5918,10 +5987,27 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
5918
5987
  function updateFilter(filters) {
5919
5988
  if (filters) {
5920
5989
  const request = copy(currentRequest.value);
5921
- request.filters = [
5922
- ...request.filters.filter((f) => f.filterOnColumn !== filters[0].filterOnColumn),
5923
- ...filters
5924
- ];
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
+ }
5925
6011
  request.pageNumber = 1;
5926
6012
  currentRequest.value = request;
5927
6013
  }
@@ -6173,6 +6259,9 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
6173
6259
  set: (value) => emit("update:request", value)
6174
6260
  });
6175
6261
  function performSearch(value) {
6262
+ if (props.loading) {
6263
+ return;
6264
+ }
6176
6265
  debouncedSearch(false);
6177
6266
  if (value === "") {
6178
6267
  searchValue.value = value;
@@ -6199,7 +6288,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
6199
6288
  if (valueOrCancel !== false) {
6200
6289
  performSearch(valueOrCancel);
6201
6290
  }
6202
- }, 1e3);
6291
+ }, 2e3);
6203
6292
  const { t: t2 } = useI18n();
6204
6293
  const gridSearchInputRef = ref();
6205
6294
  __expose({
@@ -6223,7 +6312,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
6223
6312
  ],
6224
6313
  class: "cl:box-border cl:font-light cl:p-2 cl:pr-9 cl:text-sm",
6225
6314
  type: "search",
6226
- inert: _ctx.loading,
6315
+ readonly: _ctx.loading,
6227
6316
  placeholder: _ctx.columns.length > 4 ? unref(t2)("grid.search") : unref(t2)("grid.searchSpecific", { columns: _ctx.columns.map((c) => unref(t2)(c.caption)).join(", ") }),
6228
6317
  onKeypress: _cache[2] || (_cache[2] = withKeys(($event) => performSearch(searchValue.value), ["enter"]))
6229
6318
  }, {
@@ -6231,14 +6320,16 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
6231
6320
  createElementVNode("span", null, null, -1)
6232
6321
  ])),
6233
6322
  _: 1
6234
- }, 8, ["modelValue", "inert", "placeholder"])
6323
+ }, 8, ["modelValue", "readonly", "placeholder"])
6235
6324
  ]),
6236
6325
  searchValue.value ? (openBlock(), createBlock(_component_icon, {
6237
6326
  key: 0,
6238
- class: "cl:absolute cl:cursor-pointer cl:hover:text-link-light cl:lg:right-4 cl:right-1 cl:text-grey-4 cl:top-3 cl:z-10",
6327
+ class: normalizeClass(["cl:absolute cl:cursor-pointer cl:hover:text-link-light cl:lg:right-4 cl:right-1 cl:text-grey-4 cl:top-3 cl:z-10", {
6328
+ "cl:pointer-events-none": _ctx.loading
6329
+ }]),
6239
6330
  icon: "ph:x-bold",
6240
6331
  onClick: _cache[3] || (_cache[3] = withModifiers(($event) => performSearch(""), ["prevent"]))
6241
- })) : createCommentVNode("", true)
6332
+ }, null, 8, ["class"])) : createCommentVNode("", true)
6242
6333
  ])
6243
6334
  ]);
6244
6335
  };