@citruslime/ui 4.0.2-beta.13 → 4.0.2-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
1
  import { Icon } from "@iconify/vue";
2
2
  import { defineComponent, ref, createElementBlock, openBlock, renderSlot, normalizeProps, guardReactiveProps, Fragment, createElementVNode, normalizeClass, createVNode, unref, Transition, withCtx, withDirectives, mergeProps, vShow, createBlock, Teleport, renderList, toDisplayString, createCommentVNode, computed, createTextVNode, mergeModels, useModel, watch, createSlots, vModelDynamic, shallowRef, toValue, toRefs, withKeys, onMounted, onUnmounted, withModifiers, nextTick, useAttrs, resolveComponent, inject, vModelCheckbox, watchEffect, vModelText, useCssVars, toHandlers, normalizeStyle, isRef, useSlots, provide } from "vue";
3
3
  import { generateStringId, highlightText, isTouchDevice, validateEmail as validateEmail$1, escapeStringForRegExp } from "@citruslime/utils";
4
- import { useFocusWithin, onKeyDown, toArray, unrefElement, tryOnScopeDispose, onClickOutside, useBreakpoints, breakpointsTailwind, useTimeoutFn, useMouseInElement, useMediaQuery, useThrottle, useDebounceFn, useMouse, useDraggable, defaultDocument, tryOnMounted, useThrottleFn, useWindowSize, useElementSize, useElementBounding } from "@vueuse/core";
4
+ import { useFocusWithin, onKeyDown, toArray, unrefElement, tryOnScopeDispose, onClickOutside, useBreakpoints, breakpointsTailwind, useTimeoutFn, useMouseInElement, useThrottle, useMediaQuery, useDebounceFn, useMouse, useDraggable, defaultDocument, tryOnMounted, useThrottleFn, useWindowSize, useElementSize, useElementBounding } from "@vueuse/core";
5
5
  import { useI18n, createI18n } from "vue-i18n";
6
6
  import { createFocusTrap } from "focus-trap";
7
7
  import { copy } from "@citruslime/vue-utils";
8
8
  import { DateTime } from "luxon";
9
9
  import { DatePicker } from "v-calendar";
10
10
  import { useCurrencyInput } from "vue-currency-input";
11
- const _hoisted_1$12 = { class: "cl:overflow-hidden" };
11
+ const _hoisted_1$13 = { class: "cl:overflow-hidden" };
12
12
  const _sfc_main$1h = /* @__PURE__ */ defineComponent({
13
13
  __name: "cl-ui-accordion",
14
14
  props: {
@@ -42,15 +42,15 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
42
42
  }
43
43
  }
44
44
  return (_ctx, _cache) => {
45
- return openBlock(), createElementBlock("div", _hoisted_1$12, [
45
+ return openBlock(), createElementBlock("div", _hoisted_1$13, [
46
46
  renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ isItemOpen, toggleItem })))
47
47
  ]);
48
48
  };
49
49
  }
50
50
  });
51
- const _hoisted_1$11 = { class: "cl:absolute cl:left-5 cl:top-5" };
51
+ const _hoisted_1$12 = { class: "cl:absolute cl:left-5 cl:top-5" };
52
52
  const _hoisted_2$L = { 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
@@ -78,7 +78,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
78
78
  }]),
79
79
  onClick: toggle
80
80
  }, [
81
- createElementVNode("div", _hoisted_1$11, [
81
+ createElementVNode("div", _hoisted_1$12, [
82
82
  createVNode(unref(Icon), {
83
83
  class: normalizeClass(["cl:duration-300 cl:ease-in-out cl:text-grey-3 cl:transform-gpu cl:transition-transform", {
84
84
  "cl:rotate-180": _ctx.open
@@ -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" }), [
@@ -115,9 +115,9 @@ const _export_sfc = (sfc, props) => {
115
115
  return target;
116
116
  };
117
117
  const _sfc_main$1f = {};
118
- const _hoisted_1$10 = { class: "cl:border-b cl:border-grey-1 cl:font-semibold cl:pl-14 cl:pr-4 cl:py-2 cl:text-grey-3 cl:text-sm" };
118
+ const _hoisted_1$11 = { class: "cl:border-b cl:border-grey-1 cl:font-semibold cl:pl-14 cl:pr-4 cl:py-2 cl:text-grey-3 cl:text-sm" };
119
119
  function _sfc_render$7(_ctx, _cache) {
120
- return openBlock(), createElementBlock("div", _hoisted_1$10, [
120
+ return openBlock(), createElementBlock("div", _hoisted_1$11, [
121
121
  renderSlot(_ctx.$slots, "default")
122
122
  ]);
123
123
  }
@@ -134,7 +134,7 @@ function showNotification(notification) {
134
134
  function removeNotification(notification) {
135
135
  notifications.value = notifications.value.filter((n) => n.id !== notification.id);
136
136
  }
137
- const _hoisted_1$$ = ["onClick"];
137
+ const _hoisted_1$10 = ["onClick"];
138
138
  const _hoisted_2$K = { class: "cl:flex-1 cl:select-none cl:text-ellipsis cl:w-64" };
139
139
  const _sfc_main$1e = /* @__PURE__ */ defineComponent({
140
140
  ...{
@@ -181,14 +181,14 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
181
181
  size: 16,
182
182
  weight: "bold"
183
183
  })
184
- ], 16, _hoisted_1$$);
184
+ ], 16, _hoisted_1$10);
185
185
  }), 128))
186
186
  ], 2)
187
187
  ], 8, ["to"]);
188
188
  };
189
189
  }
190
190
  });
191
- const _hoisted_1$_ = { class: "cl:absolute cl:flex cl:flex-wrap cl:h-full cl:max-h-full cl:max-w-full cl:min-h-full cl:min-w-full cl:w-full cl:xl:h-screen cl:xl:max-h-screen cl:xl:min-h-screen" };
191
+ const _hoisted_1$$ = { class: "cl:absolute cl:flex cl:flex-wrap cl:h-full cl:max-h-full cl:max-w-full cl:min-h-full cl:min-w-full cl:w-full cl:xl:h-screen cl:xl:max-h-screen cl:xl:min-h-screen" };
192
192
  const _sfc_main$1d = /* @__PURE__ */ defineComponent({
193
193
  __name: "cl-ui-app",
194
194
  props: {
@@ -200,7 +200,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
200
200
  createVNode(_sfc_main$1e, {
201
201
  "header-visible": _ctx.$slots.header ? true : false
202
202
  }, null, 8, ["header-visible"]),
203
- createElementVNode("div", _hoisted_1$_, [
203
+ createElementVNode("div", _hoisted_1$$, [
204
204
  renderSlot(_ctx.$slots, "header"),
205
205
  createElementVNode("div", {
206
206
  class: normalizeClass(["cl:content-start cl:flex cl:flex-nowrap cl:h-dscreen cl:items-stretch cl:max-h-full cl:relative cl:w-full cl:xl:max-h-screen", {
@@ -224,12 +224,12 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
224
224
  }
225
225
  });
226
226
  const _sfc_main$1c = {};
227
- const _hoisted_1$Z = { class: "loading-spinner" };
227
+ const _hoisted_1$_ = { class: "loading-spinner" };
228
228
  function _sfc_render$6(_ctx, _cache) {
229
- return openBlock(), createElementBlock("div", _hoisted_1$Z);
229
+ return openBlock(), createElementBlock("div", _hoisted_1$_);
230
230
  }
231
231
  const clUiLoadingSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$6], ["__scopeId", "data-v-1eee625a"]]);
232
- const _hoisted_1$Y = ["disabled"];
232
+ const _hoisted_1$Z = ["disabled"];
233
233
  const _hoisted_2$J = {
234
234
  key: 0,
235
235
  class: "cl:absolute cl:bg-secondary-default/40 cl:flex cl:h-full cl:items-center cl:justify-center cl:left-0 cl:rounded-sm cl:top-0 cl:w-full"
@@ -283,7 +283,7 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
283
283
  _ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_2$J, [
284
284
  createVNode(clUiLoadingSpinner, { class: "cl:-translate-x-1/2 cl:after:h-6! cl:after:w-6! cl:h-6! cl:w-6!" })
285
285
  ])) : createCommentVNode("", true)
286
- ], 16, _hoisted_1$Y);
286
+ ], 16, _hoisted_1$Z);
287
287
  };
288
288
  }
289
289
  });
@@ -300,7 +300,7 @@ const buttonSizes = [
300
300
  "medium",
301
301
  "large"
302
302
  ];
303
- const _hoisted_1$X = { key: 0 };
303
+ const _hoisted_1$Y = { key: 0 };
304
304
  const _sfc_main$1a = /* @__PURE__ */ defineComponent({
305
305
  __name: "cl-ui-card",
306
306
  props: {
@@ -314,7 +314,7 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
314
314
  "cl:cursor-pointer cl:hover:shadow-xl cl:hover:border-grey-0": _ctx.hover
315
315
  }])
316
316
  }, [
317
- _ctx.$slots.image ? (openBlock(), createElementBlock("div", _hoisted_1$X, [
317
+ _ctx.$slots.image ? (openBlock(), createElementBlock("div", _hoisted_1$Y, [
318
318
  renderSlot(_ctx.$slots, "image")
319
319
  ])) : createCommentVNode("", true),
320
320
  _ctx.$slots.title ? (openBlock(), createElementBlock("div", {
@@ -357,9 +357,9 @@ const cardSizes = [
357
357
  "medium",
358
358
  "large"
359
359
  ];
360
- const _hoisted_1$W = { class: "cl:sm:w-auto cl:w-full" };
360
+ const _hoisted_1$X = { class: "cl:sm:w-auto cl:w-full" };
361
361
  const _hoisted_2$I = { 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
  };
@@ -388,12 +388,12 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
388
388
  const props = __props;
389
389
  const hasErrors = computed(() => Object.keys(props.errors ?? []).length > 0);
390
390
  return (_ctx, _cache) => {
391
- return openBlock(), createElementBlock("div", _hoisted_1$W, [
391
+ return openBlock(), createElementBlock("div", _hoisted_1$X, [
392
392
  createElementVNode("div", {
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$I, [
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)
@@ -422,7 +422,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
422
422
  };
423
423
  }
424
424
  });
425
- const _hoisted_1$V = ["type", "maxlength", "disabled", "placeholder"];
425
+ const _hoisted_1$W = ["type", "maxlength", "disabled", "placeholder"];
426
426
  const _sfc_main$18 = /* @__PURE__ */ defineComponent({
427
427
  ...{
428
428
  inheritAttrs: false
@@ -488,7 +488,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
488
488
  placeholder: _ctx.placeholder ?? void 0,
489
489
  onFocus: _cache[1] || (_cache[1] = ($event) => emit("focus")),
490
490
  onBlur: _cache[2] || (_cache[2] = ($event) => emit("blur"))
491
- }), null, 16, _hoisted_1$V), [
491
+ }), null, 16, _hoisted_1$W), [
492
492
  [vModelDynamic, value.value]
493
493
  ])
494
494
  ]),
@@ -573,7 +573,7 @@ function useFocusTrap(target, options = {}) {
573
573
  unpause
574
574
  };
575
575
  }
576
- const _hoisted_1$U = {
576
+ const _hoisted_1$V = {
577
577
  key: 0,
578
578
  class: "cl:mt-1 cl:opacity-60 cl:text-primary-default"
579
579
  };
@@ -673,7 +673,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
673
673
  }])
674
674
  }, [
675
675
  renderSlot(_ctx.$slots, "title"),
676
- _ctx.headerColour === "white" ? (openBlock(), createElementBlock("hr", _hoisted_1$U)) : createCommentVNode("", true)
676
+ _ctx.headerColour === "white" ? (openBlock(), createElementBlock("hr", _hoisted_1$V)) : createCommentVNode("", true)
677
677
  ], 2),
678
678
  createElementVNode("div", _hoisted_2$H, [
679
679
  renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ close })))
@@ -691,7 +691,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
691
691
  };
692
692
  }
693
693
  });
694
- const _hoisted_1$T = { class: "cl:bg-grey-0 cl:flex cl:p-1 cl:text-left" };
694
+ const _hoisted_1$U = { class: "cl:bg-grey-0 cl:flex cl:p-1 cl:text-left" };
695
695
  const _hoisted_2$G = {
696
696
  key: 0,
697
697
  class: "cl:w-1/2"
@@ -706,7 +706,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
706
706
  emits: ["clear-object"],
707
707
  setup(__props) {
708
708
  return (_ctx, _cache) => {
709
- return openBlock(), createElementBlock("div", _hoisted_1$T, [
709
+ return openBlock(), createElementBlock("div", _hoisted_1$U, [
710
710
  _ctx.additionalText !== "" ? (openBlock(), createElementBlock("div", _hoisted_2$G, toDisplayString(_ctx.additionalText), 1)) : createCommentVNode("", true),
711
711
  createElementVNode("div", {
712
712
  class: normalizeClass({
@@ -729,7 +729,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
729
729
  };
730
730
  }
731
731
  });
732
- const _hoisted_1$S = {
732
+ const _hoisted_1$T = {
733
733
  key: 0,
734
734
  class: "cl:w-1/2"
735
735
  };
@@ -794,7 +794,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
794
794
  onMousemove: _cache[0] || (_cache[0] = ($event) => onHover(true)),
795
795
  onMouseleave: _cache[1] || (_cache[1] = ($event) => onHover(false))
796
796
  }, [
797
- _ctx.option !== null && ((_a = _ctx.option) == null ? void 0 : _a.parentId) !== 0 && ((_b = _ctx.option) == null ? void 0 : _b.parentId) !== void 0 ? (openBlock(), createElementBlock("div", _hoisted_1$S, toDisplayString(displayedParent.value), 1)) : createCommentVNode("", true),
797
+ _ctx.option !== null && ((_a = _ctx.option) == null ? void 0 : _a.parentId) !== 0 && ((_b = _ctx.option) == null ? void 0 : _b.parentId) !== void 0 ? (openBlock(), createElementBlock("div", _hoisted_1$T, toDisplayString(displayedParent.value), 1)) : createCommentVNode("", true),
798
798
  createElementVNode("div", {
799
799
  class: normalizeClass({
800
800
  "cl:w-1/2": displayedParent.value !== "",
@@ -813,12 +813,12 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
813
813
  };
814
814
  }
815
815
  });
816
- const _hoisted_1$R = ["onKeyup"];
816
+ const _hoisted_1$S = ["onKeyup"];
817
817
  const _hoisted_2$E = {
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
823
  const _hoisted_5$g = { 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$E, [
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}`,
@@ -1021,13 +1021,13 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
1021
1021
  }, null, 8, ["option", "index", "selected-index"]);
1022
1022
  }), 128))
1023
1023
  ])) : createCommentVNode("", true)
1024
- ], 42, _hoisted_1$R)) : createCommentVNode("", true);
1024
+ ], 42, _hoisted_1$S)) : createCommentVNode("", true);
1025
1025
  };
1026
1026
  }
1027
1027
  });
1028
- const _hoisted_1$Q = { class: "cl:flex cl:rounded-lg" };
1028
+ const _hoisted_1$R = { class: "cl:flex cl:rounded-lg" };
1029
1029
  const _hoisted_2$D = { 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
1032
  const _hoisted_5$f = ["disabled"];
1033
1033
  const _hoisted_6$a = ["disabled"];
@@ -1240,7 +1240,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
1240
1240
  ref_key: "outsideRef",
1241
1241
  ref: outsideRef
1242
1242
  }, attrs, { class: "cl:relative" }), [
1243
- createElementVNode("div", _hoisted_1$Q, [
1243
+ createElementVNode("div", _hoisted_1$R, [
1244
1244
  createElementVNode("div", _hoisted_2$D, [
1245
1245
  createVNode(_sfc_main$18, {
1246
1246
  id: unref(id),
@@ -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), {
@@ -1403,23 +1403,23 @@ function isComboBoxCreateRequest(objectToTest) {
1403
1403
  return typeof objectToTest.name === "string";
1404
1404
  }
1405
1405
  const _sfc_main$12 = {};
1406
- const _hoisted_1$P = { class: "cl:flex cl:flex-wrap cl:left-0 cl:mt-4 cl:w-full" };
1406
+ const _hoisted_1$Q = { class: "cl:flex cl:flex-wrap cl:left-0 cl:mt-4 cl:w-full" };
1407
1407
  const _hoisted_2$C = {
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
1416
  const _hoisted_5$e = { class: "cl:float-right" };
1417
1417
  function _sfc_render$5(_ctx, _cache) {
1418
- return openBlock(), createElementBlock("div", _hoisted_1$P, [
1418
+ return openBlock(), createElementBlock("div", _hoisted_1$Q, [
1419
1419
  _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_2$C, [
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
  ]),
@@ -1432,15 +1432,15 @@ function _sfc_render$5(_ctx, _cache) {
1432
1432
  const clUiFooter = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$5]]);
1433
1433
  const gridDateFormatLocaleOverride = Symbol();
1434
1434
  const _sfc_main$11 = {};
1435
- const _hoisted_1$O = { class: "cl:h-[33px] cl:px-20 cl:rounded-md skeleton-loader-background" };
1435
+ const _hoisted_1$P = { class: "cl:h-[33px] cl:px-20 cl:rounded-md skeleton-loader-background" };
1436
1436
  function _sfc_render$4(_ctx, _cache) {
1437
- return openBlock(), createElementBlock("div", _hoisted_1$O);
1437
+ return openBlock(), createElementBlock("div", _hoisted_1$P);
1438
1438
  }
1439
1439
  const clUiSkeletonButton = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$4]]);
1440
1440
  const _sfc_main$10 = {};
1441
- const _hoisted_1$N = { class: "cl:h-8 cl:rounded-md skeleton-loader-background" };
1441
+ const _hoisted_1$O = { class: "cl:h-8 cl:rounded-md skeleton-loader-background" };
1442
1442
  function _sfc_render$3(_ctx, _cache) {
1443
- return openBlock(), createElementBlock("div", _hoisted_1$N);
1443
+ return openBlock(), createElementBlock("div", _hoisted_1$O);
1444
1444
  }
1445
1445
  const clUiSkeletonInput = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$3]]);
1446
1446
  const _sfc_main$$ = /* @__PURE__ */ defineComponent({
@@ -1494,12 +1494,12 @@ function anySortableColumns(options, columns) {
1494
1494
  function anyFilterableColumns(columns) {
1495
1495
  return columns.some((c) => isFilterable(c));
1496
1496
  }
1497
- const _hoisted_1$M = {
1497
+ const _hoisted_1$N = {
1498
1498
  key: 0,
1499
1499
  class: "cl:flex cl:gap-2 cl:justify-between cl:mb-2 cl:w-full"
1500
1500
  };
1501
1501
  const _hoisted_2$B = { 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
1504
  const _hoisted_5$d = {
1505
1505
  key: 2,
@@ -1525,7 +1525,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
1525
1525
  const hasFilters = computed(() => props.request.filters.some((f) => f.filterValue !== ""));
1526
1526
  const gridId = inject("cl-ui-grid-id") ?? "cl-ui-grid-filter";
1527
1527
  return (_ctx, _cache) => {
1528
- return _ctx.initialLoad && (_ctx.$slots["additional-grid-actions"] || unref(anyFilterableColumns)(_ctx.columns) || unref(anySortableColumns)(_ctx.options, _ctx.columns)) ? (openBlock(), createElementBlock("div", _hoisted_1$M, [
1528
+ return _ctx.initialLoad && (_ctx.$slots["additional-grid-actions"] || unref(anyFilterableColumns)(_ctx.columns) || unref(anySortableColumns)(_ctx.options, _ctx.columns)) ? (openBlock(), createElementBlock("div", _hoisted_1$N, [
1529
1529
  (openBlock(), createElementBlock(Fragment, null, renderList(2, (n) => {
1530
1530
  return createVNode(unref(clUiSkeletonButton), {
1531
1531
  key: n,
@@ -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,
@@ -1623,7 +1623,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
1623
1623
  };
1624
1624
  }
1625
1625
  });
1626
- const _hoisted_1$L = ["for"];
1626
+ const _hoisted_1$M = ["for"];
1627
1627
  const _hoisted_2$A = ["required", "disabled"];
1628
1628
  const _sfc_main$Z = /* @__PURE__ */ defineComponent({
1629
1629
  ...{
@@ -1694,7 +1694,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
1694
1694
  for: _ctx.$attrs.id ? _ctx.$attrs.id.toString() : ""
1695
1695
  }, [
1696
1696
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
1697
- ], 8, _hoisted_1$L)
1697
+ ], 8, _hoisted_1$M)
1698
1698
  ]),
1699
1699
  key: "0"
1700
1700
  } : void 0,
@@ -1837,7 +1837,9 @@ const messages = {
1837
1837
  invalidFileType: "{filename} is not a valid file type."
1838
1838
  },
1839
1839
  datetime: {
1840
- today: "Today"
1840
+ today: "Today",
1841
+ startDate: "Start Date",
1842
+ endDate: "End Date"
1841
1843
  }
1842
1844
  }
1843
1845
  };
@@ -2307,7 +2309,7 @@ function getValidatedInputState(validationCheck, message) {
2307
2309
  };
2308
2310
  return validation;
2309
2311
  }
2310
- const _hoisted_1$K = {
2312
+ const _hoisted_1$L = {
2311
2313
  key: 3,
2312
2314
  class: "cl:inline-block cl:whitespace-nowrap"
2313
2315
  };
@@ -2315,7 +2317,7 @@ const _hoisted_2$z = {
2315
2317
  key: 4,
2316
2318
  class: "cl:inline-block cl:whitespace-nowrap"
2317
2319
  };
2318
- const _hoisted_3$o = {
2320
+ const _hoisted_3$n = {
2319
2321
  key: 5,
2320
2322
  class: "cl:inline-block cl:whitespace-nowrap"
2321
2323
  };
@@ -2423,7 +2425,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
2423
2425
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
2424
2426
  createTextVNode(toDisplayString(formatDate(_ctx.data[_ctx.column.field], unref(DateFormat).DATETIME)), 1)
2425
2427
  ], 64))
2426
- ], 64)) : _ctx.column.type === "list" && _ctx.column.field !== void 0 && _ctx.column.listEntries !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_1$K, 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$z, toDisplayString(formatNumberToString(_ctx.data[_ctx.column.field], unref(locale2))), 1)) : _ctx.column.field !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_3$o, [
2428
+ ], 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$z, toDisplayString(formatNumberToString(_ctx.data[_ctx.column.field], unref(locale2))), 1)) : _ctx.column.field !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_3$n, [
2427
2429
  createElementVNode("span", {
2428
2430
  title: showUntruncatedStringValue.value ? _ctx.data[_ctx.column.field] : void 0,
2429
2431
  innerHTML: formatString()
@@ -2591,9 +2593,9 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
2591
2593
  };
2592
2594
  }
2593
2595
  });
2594
- const _hoisted_1$J = ["colspan"];
2596
+ const _hoisted_1$K = ["colspan"];
2595
2597
  const _hoisted_2$y = ["colspan"];
2596
- const _hoisted_3$n = { key: 2 };
2598
+ const _hoisted_3$m = { key: 2 };
2597
2599
  const _hoisted_4$h = ["colspan"];
2598
2600
  const _hoisted_5$c = { class: "cl:flex cl:flex-wrap cl:justify-center cl:text-center cl:text-sm cl:w-full" };
2599
2601
  const _hoisted_6$9 = { key: 0 };
@@ -2762,7 +2764,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
2762
2764
  "cl:bg-white/60 skeleton-loader-background": row % 2 === 0
2763
2765
  }
2764
2766
  ])
2765
- }, "   ", 10, _hoisted_1$J)
2767
+ }, "   ", 10, _hoisted_1$K)
2766
2768
  ]);
2767
2769
  }), 128)) : createCommentVNode("", true),
2768
2770
  _ctx.data && ((_a = _ctx.data.results) == null ? void 0 : _a.length) && !_ctx.initialLoad ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
@@ -2822,7 +2824,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
2822
2824
  }, "   ", 8, _hoisted_2$y)
2823
2825
  ], 2);
2824
2826
  }), 128)) : createCommentVNode("", true)
2825
- ], 64)) : !_ctx.loading ? (openBlock(), createElementBlock("tr", _hoisted_3$n, [
2827
+ ], 64)) : !_ctx.loading ? (openBlock(), createElementBlock("tr", _hoisted_3$m, [
2826
2828
  createElementVNode("td", {
2827
2829
  colspan: _ctx.columns.length
2828
2830
  }, [
@@ -2850,9 +2852,9 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
2850
2852
  };
2851
2853
  }
2852
2854
  });
2853
- const _hoisted_1$I = ["value", "inputmode", "disabled", "placeholder"];
2855
+ const _hoisted_1$J = ["value", "inputmode", "disabled", "placeholder"];
2854
2856
  const _hoisted_2$x = { 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" };
2855
- const _hoisted_3$m = ["disabled"];
2857
+ const _hoisted_3$l = ["disabled"];
2856
2858
  const _hoisted_4$g = ["disabled"];
2857
2859
  const _sfc_main$U = /* @__PURE__ */ defineComponent({
2858
2860
  ...{
@@ -3030,7 +3032,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
3030
3032
  _cache[2] || (_cache[2] = withKeys(withModifiers(($event) => incrementOrDecrement(true), ["prevent"]), ["down"])),
3031
3033
  _cache[3] || (_cache[3] = withKeys(withModifiers(($event) => incrementOrDecrement(false), ["prevent"]), ["up"]))
3032
3034
  ]
3033
- }), null, 16, _hoisted_1$I)),
3035
+ }), null, 16, _hoisted_1$J)),
3034
3036
  withDirectives(createElementVNode("div", _hoisted_2$x, [
3035
3037
  createElementVNode("button", {
3036
3038
  class: "cl:bg-secondary-light/30 cl:border cl:border-grey-3 cl:hover:bg-secondary-light/20 cl:px-1 cl:rounded",
@@ -3042,7 +3044,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
3042
3044
  ]
3043
3045
  }, [
3044
3046
  createVNode(_component_icon, { icon: "ph:caret-up-bold" })
3045
- ], 40, _hoisted_3$m),
3047
+ ], 40, _hoisted_3$l),
3046
3048
  createElementVNode("button", {
3047
3049
  class: "cl:bg-secondary-light/30 cl:border cl:border-grey-3 cl:hover:bg-secondary-light/20 cl:px-1 cl:rounded",
3048
3050
  disabled: _ctx.disabled,
@@ -3079,12 +3081,12 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
3079
3081
  };
3080
3082
  }
3081
3083
  });
3082
- const _hoisted_1$H = {
3084
+ const _hoisted_1$I = {
3083
3085
  key: 0,
3084
3086
  class: "cl:flex cl:flex-col cl:lg:flex-row cl:lg:gap-2"
3085
3087
  };
3086
3088
  const _hoisted_2$w = { 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" };
3087
- 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" };
3089
+ 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" };
3088
3090
  const _hoisted_4$f = ["inert"];
3089
3091
  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" };
3090
3092
  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" };
@@ -3163,7 +3165,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
3163
3165
  }
3164
3166
  return (_ctx, _cache) => {
3165
3167
  var _a, _b, _c;
3166
- return _ctx.initialLoad ? (openBlock(), createElementBlock("div", _hoisted_1$H, [
3168
+ return _ctx.initialLoad ? (openBlock(), createElementBlock("div", _hoisted_1$I, [
3167
3169
  createElementVNode("div", _hoisted_2$w, [
3168
3170
  createVNode(unref(_sfc_main$$), { words: 3 }),
3169
3171
  createVNode(unref(_sfc_main$$), {
@@ -3171,7 +3173,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
3171
3173
  words: 2
3172
3174
  })
3173
3175
  ]),
3174
- createElementVNode("div", _hoisted_3$l, [
3176
+ createElementVNode("div", _hoisted_3$k, [
3175
3177
  createVNode(unref(clUiSkeletonInput), { class: "cl:w-64" })
3176
3178
  ])
3177
3179
  ])) : _ctx.loading || ((_b = (_a = _ctx.data) == null ? void 0 : _a.results) == null ? void 0 : _b.length) && _ctx.request ? (openBlock(), createElementBlock("div", {
@@ -3457,7 +3459,7 @@ function getMaxDateValue(max, timeZone, currentValue, calendarType) {
3457
3459
  }
3458
3460
  return currentValue;
3459
3461
  }
3460
- const _hoisted_1$G = { class: "cl:gap-1 cl:grid cl:grid-cols-2" };
3462
+ const _hoisted_1$H = { class: "cl:gap-1 cl:grid cl:grid-cols-2" };
3461
3463
  const _hoisted_2$v = ["onClick"];
3462
3464
  const _sfc_main$S = /* @__PURE__ */ defineComponent({
3463
3465
  __name: "cl-ui-quick-dates-group",
@@ -3470,7 +3472,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
3470
3472
  const emit = __emit;
3471
3473
  const { t: t2 } = useI18n();
3472
3474
  return (_ctx, _cache) => {
3473
- return openBlock(), createElementBlock("div", _hoisted_1$G, [
3475
+ return openBlock(), createElementBlock("div", _hoisted_1$H, [
3474
3476
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dates, (date, index2) => {
3475
3477
  var _a, _b;
3476
3478
  return openBlock(), createElementBlock("button", {
@@ -3585,7 +3587,7 @@ const allQuickDates = [
3585
3587
  ...futureQuickDates,
3586
3588
  ...currentQuickDates
3587
3589
  ];
3588
- const _hoisted_1$F = { class: "cl:p-2 cl:pt-0" };
3590
+ const _hoisted_1$G = { class: "cl:p-2 cl:pt-0" };
3589
3591
  const _hoisted_2$u = {
3590
3592
  key: 0,
3591
3593
  class: "cl:mt-2 cl:opacity-20"
@@ -3632,7 +3634,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
3632
3634
  return groups;
3633
3635
  });
3634
3636
  return (_ctx, _cache) => {
3635
- return openBlock(), createElementBlock("div", _hoisted_1$F, [
3637
+ return openBlock(), createElementBlock("div", _hoisted_1$G, [
3636
3638
  createElementVNode("div", null, toDisplayString(unref(t2)("quickDates.quickDatesHeader")), 1),
3637
3639
  (openBlock(true), createElementBlock(Fragment, null, renderList(quickDateGroups.value, (group, index2) => {
3638
3640
  return openBlock(), createElementBlock("div", {
@@ -3651,208 +3653,6 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
3651
3653
  };
3652
3654
  }
3653
3655
  });
3654
- const _sfc_main$Q = /* @__PURE__ */ defineComponent({
3655
- ...{
3656
- inheritAttrs: false
3657
- },
3658
- __name: "cl-ui-input-date-range-input",
3659
- props: {
3660
- required: { type: Boolean },
3661
- disabled: { type: Boolean },
3662
- dateRangeSelected: { type: Boolean }
3663
- },
3664
- emits: ["togglePopover", "clear"],
3665
- setup(__props) {
3666
- const { t: t2 } = useI18n();
3667
- const togglePopoverButtonAttrs = computed(() => {
3668
- const { class: _, ...result } = useAttrs();
3669
- return result;
3670
- });
3671
- return (_ctx, _cache) => {
3672
- const _component_icon = resolveComponent("icon");
3673
- return openBlock(), createElementBlock("div", {
3674
- class: normalizeClass(["cl:border cl:border-grey-1 cl:flex cl:flex-nowrap cl:flex-row cl:overflow-hidden cl:rounded-md range-input", [
3675
- _ctx.$attrs.class,
3676
- {
3677
- "cl:bg-grey-3": _ctx.disabled
3678
- }
3679
- ]])
3680
- }, [
3681
- createVNode(_sfc_main$1b, mergeProps(togglePopoverButtonAttrs.value, {
3682
- class: ["cl:basis-full cl:border-transparent cl:flex! cl:hover:border-transparent cl:items-center cl:justify-center cl:rounded-l-md cl:rounded-r-none", {
3683
- "cl:text-grey-4 cl:hover:text-grey-3": !_ctx.dateRangeSelected && !_ctx.disabled,
3684
- "cl:text-primary-darker cl:hover:text-primary-dark": _ctx.dateRangeSelected && !_ctx.disabled
3685
- }],
3686
- disabled: _ctx.disabled,
3687
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("togglePopover"))
3688
- }), {
3689
- default: withCtx(() => [
3690
- createVNode(_component_icon, {
3691
- icon: "bi:calendar3",
3692
- class: "cl:text-xl icon"
3693
- })
3694
- ]),
3695
- _: 1
3696
- }, 16, ["disabled", "class"]),
3697
- !_ctx.required ? (openBlock(), createBlock(_sfc_main$1b, {
3698
- key: 0,
3699
- id: _ctx.$attrs.id ? _ctx.$attrs.id + "Clear" : "clUiDateRangeInputClear",
3700
- title: unref(t2)("input.clearDateRange"),
3701
- size: "small",
3702
- class: normalizeClass(["cl:basis-0 cl:border-transparent cl:flex cl:hover:border-transparent cl:items-center cl:justify-center cl:rounded-l-none cl:rounded-r-md", {
3703
- "cl:text-grey-4 cl:hover:text-grey-3": !_ctx.dateRangeSelected && !_ctx.disabled,
3704
- "cl:text-danger-dark cl:hover:text-danger-default": _ctx.dateRangeSelected && !_ctx.disabled
3705
- }]),
3706
- disabled: _ctx.disabled,
3707
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("clear"))
3708
- }, {
3709
- default: withCtx(() => [
3710
- createVNode(_component_icon, {
3711
- icon: "ph:x",
3712
- class: "cl:text-sm clear-icon"
3713
- })
3714
- ]),
3715
- _: 1
3716
- }, 8, ["id", "title", "disabled", "class"])) : createCommentVNode("", true)
3717
- ], 2);
3718
- };
3719
- }
3720
- });
3721
- const _sfc_main$P = /* @__PURE__ */ defineComponent({
3722
- ...{
3723
- inheritAttrs: false
3724
- },
3725
- __name: "cl-ui-input-date-range",
3726
- props: /* @__PURE__ */ mergeModels({
3727
- minDate: { default: null },
3728
- maxDate: { default: null },
3729
- initialCalendarDate: { default: null },
3730
- dateFormatLocale: { default: null },
3731
- timeZone: { default: null },
3732
- disabled: { type: Boolean, default: false },
3733
- required: { type: Boolean, default: false },
3734
- quickDateScope: { default: null },
3735
- popoverPlacement: { default: "auto" }
3736
- }, {
3737
- "modelValue": { required: true },
3738
- "modelModifiers": {}
3739
- }),
3740
- emits: ["update:modelValue"],
3741
- setup(__props) {
3742
- const props = __props;
3743
- const model = useModel(__props, "modelValue");
3744
- const internalTimeZone = computed(() => props.timeZone ?? "UTC");
3745
- const internalCurrentDateRange = computed({
3746
- get() {
3747
- let result = null;
3748
- if (model.value !== null) {
3749
- result = {
3750
- start: DateTime.fromISO(model.value.start, {
3751
- zone: internalTimeZone.value
3752
- }).toJSDate(),
3753
- end: DateTime.fromISO(model.value.end ?? "", {
3754
- zone: internalTimeZone.value
3755
- }).toJSDate()
3756
- };
3757
- }
3758
- return result;
3759
- },
3760
- set(value) {
3761
- if (value !== null) {
3762
- const rangeValue = value;
3763
- model.value = {
3764
- start: convertDateToIsoString(rangeValue.start, "start", false, props.timeZone) ?? "",
3765
- end: convertDateToIsoString(rangeValue.end, "end", false, props.timeZone) ?? ""
3766
- };
3767
- } else {
3768
- model.value = null;
3769
- }
3770
- }
3771
- });
3772
- const { locale: locale2 } = useI18n();
3773
- const internalLocale = computed(() => props.dateFormatLocale ?? locale2.value);
3774
- const popover = computed(() => getPopoverOptions(props.disabled, props.popoverPlacement));
3775
- const currentInitialDate = computed(() => {
3776
- return getInitialCalendarDate(model.value, props.initialCalendarDate, internalTimeZone.value, "dateRange");
3777
- });
3778
- const dateRangeTooltipText = computed(() => {
3779
- return generateDateRangeTooltip(internalCurrentDateRange.value, internalTimeZone.value, internalLocale.value);
3780
- });
3781
- const currentQuickDate = ref(null);
3782
- const calendar = ref(null);
3783
- function handleQuickDateSelection(selectedQuickDate) {
3784
- const newDateRange = getDateRangeForQuickDateSelection(selectedQuickDate, internalTimeZone.value);
3785
- internalCurrentDateRange.value = newDateRange;
3786
- currentQuickDate.value = selectedQuickDate;
3787
- calendar.value.move(newDateRange.start);
3788
- calendar.value.hidePopover();
3789
- }
3790
- const isMediumScreen = useMediaQuery("(min-width: 768px)");
3791
- const dateRangeColumnCount = computed(() => isMediumScreen.value ? 2 : 1);
3792
- const showQuickDates = useMediaQuery("(min-height: 800px)");
3793
- return (_ctx, _cache) => {
3794
- return openBlock(), createBlock(_sfc_main$19, { "show-required-asterisk": _ctx.required }, createSlots({
3795
- label: withCtx(() => [
3796
- renderSlot(_ctx.$slots, "default")
3797
- ]),
3798
- default: withCtx(() => [
3799
- createVNode(unref(DatePicker), {
3800
- ref_key: "calendar",
3801
- ref: calendar,
3802
- modelValue: internalCurrentDateRange.value,
3803
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => internalCurrentDateRange.value = $event),
3804
- modelModifiers: { range: true },
3805
- mode: "date",
3806
- color: "primary",
3807
- "title-position": "left",
3808
- locale: internalLocale.value,
3809
- timezone: internalTimeZone.value,
3810
- columns: dateRangeColumnCount.value,
3811
- popover: popover.value,
3812
- "min-date": _ctx.minDate,
3813
- "max-date": _ctx.maxDate,
3814
- "initial-page": currentInitialDate.value,
3815
- onDayclick: _cache[2] || (_cache[2] = ($event) => currentQuickDate.value = null)
3816
- }, {
3817
- default: withCtx(({ togglePopover }) => [
3818
- createVNode(_sfc_main$Q, mergeProps(_ctx.$attrs, {
3819
- required: _ctx.required,
3820
- disabled: _ctx.disabled,
3821
- "date-range-selected": !!internalCurrentDateRange.value,
3822
- title: dateRangeTooltipText.value,
3823
- onTogglePopover: togglePopover,
3824
- onClear: _cache[0] || (_cache[0] = ($event) => {
3825
- internalCurrentDateRange.value = null;
3826
- currentQuickDate.value = null;
3827
- calendar.value.hidePopover();
3828
- })
3829
- }), null, 16, ["required", "disabled", "date-range-selected", "title", "onTogglePopover"])
3830
- ]),
3831
- footer: withCtx(() => [
3832
- _ctx.quickDateScope !== "none" && unref(showQuickDates) ? (openBlock(), createBlock(_sfc_main$R, {
3833
- key: 0,
3834
- scope: _ctx.quickDateScope,
3835
- "selected-quick-date": currentQuickDate.value,
3836
- "current-date-range": model.value,
3837
- onQuickDateSelected: handleQuickDateSelection
3838
- }, null, 8, ["scope", "selected-quick-date", "current-date-range"])) : createCommentVNode("", true)
3839
- ]),
3840
- _: 1
3841
- }, 8, ["modelValue", "locale", "timezone", "columns", "popover", "min-date", "max-date", "initial-page"])
3842
- ]),
3843
- _: 2
3844
- }, [
3845
- _ctx.$slots[`help-text`] ? {
3846
- name: "helpText",
3847
- fn: withCtx(() => [
3848
- renderSlot(_ctx.$slots, "help-text")
3849
- ]),
3850
- key: "0"
3851
- } : void 0
3852
- ]), 1032, ["show-required-asterisk"]);
3853
- };
3854
- }
3855
- });
3856
3656
  const inputTextTypes = [
3857
3657
  "text",
3858
3658
  "email",
@@ -3860,7 +3660,7 @@ const inputTextTypes = [
3860
3660
  "password",
3861
3661
  "search"
3862
3662
  ];
3863
- const _sfc_main$O = /* @__PURE__ */ defineComponent({
3663
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
3864
3664
  ...{
3865
3665
  inheritAttrs: false
3866
3666
  },
@@ -3964,15 +3764,15 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
3964
3764
  };
3965
3765
  }
3966
3766
  });
3967
- const _hoisted_1$E = { class: "cl:gap-1 cl:grid cl:grid-cols-[auto_1fr_auto_auto] cl:pt-0.5 cl:w-full" };
3767
+ const _hoisted_1$F = { class: "cl:gap-1 cl:grid cl:grid-cols-[auto_1fr_auto_auto] cl:pt-0.5 cl:w-full" };
3968
3768
  const _hoisted_2$t = ["disabled"];
3969
- const _hoisted_3$k = { class: "cl:max-w-max" };
3769
+ const _hoisted_3$j = { class: "cl:max-w-max" };
3970
3770
  const _hoisted_4$e = { class: "cl:flex cl:flex-col cl:gap-1 cl:w-full" };
3971
3771
  const _hoisted_5$a = ["min", "disabled", "required", "step", "max"];
3972
3772
  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" };
3973
3773
  const _hoisted_7$5 = ["disabled"];
3974
3774
  const _hoisted_8$4 = ["disabled", "title"];
3975
- const _sfc_main$N = /* @__PURE__ */ defineComponent({
3775
+ const _sfc_main$P = /* @__PURE__ */ defineComponent({
3976
3776
  ...{
3977
3777
  inheritAttrs: false
3978
3778
  },
@@ -4027,13 +3827,13 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
4027
3827
  "show-required-asterisk": _ctx.required
4028
3828
  }, createSlots({
4029
3829
  default: withCtx(() => [
4030
- createElementVNode("div", _hoisted_1$E, [
3830
+ createElementVNode("div", _hoisted_1$F, [
4031
3831
  createElementVNode("button", {
4032
3832
  disabled: _ctx.disabled,
4033
3833
  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",
4034
3834
  onClick: _cache[0] || (_cache[0] = ($event) => setValueAndFocus(_ctx.min))
4035
3835
  }, toDisplayString(unref(formatNumberAsDecimal)(_ctx.min, _ctx.precision)), 9, _hoisted_2$t),
4036
- createElementVNode("div", _hoisted_3$k, [
3836
+ createElementVNode("div", _hoisted_3$j, [
4037
3837
  withDirectives(createElementVNode("div", _hoisted_4$e, [
4038
3838
  withDirectives(createElementVNode("input", mergeProps({
4039
3839
  ref_key: "sliderRef",
@@ -4110,12 +3910,79 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
4110
3910
  };
4111
3911
  }
4112
3912
  });
4113
- const clUiInputRange = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-82275076"]]);
3913
+ const clUiInputRange = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-82275076"]]);
4114
3914
  const dateTimeCalendarTypes = [
4115
3915
  "date",
4116
3916
  "datetime",
4117
3917
  "time"
4118
3918
  ];
3919
+ const _sfc_main$O = /* @__PURE__ */ defineComponent({
3920
+ ...{
3921
+ inheritAttrs: false
3922
+ },
3923
+ __name: "cl-ui-input-date-range-input",
3924
+ props: {
3925
+ required: { type: Boolean },
3926
+ disabled: { type: Boolean },
3927
+ dateRangeSelected: { type: Boolean }
3928
+ },
3929
+ emits: ["togglePopover", "clear"],
3930
+ setup(__props) {
3931
+ const { t: t2 } = useI18n();
3932
+ const togglePopoverButtonAttrs = computed(() => {
3933
+ const { class: _, ...result } = useAttrs();
3934
+ return result;
3935
+ });
3936
+ return (_ctx, _cache) => {
3937
+ const _component_icon = resolveComponent("icon");
3938
+ return openBlock(), createElementBlock("div", {
3939
+ class: normalizeClass(["cl:border cl:border-grey-1 cl:flex cl:flex-nowrap cl:flex-row cl:overflow-hidden cl:rounded-md range-input", [
3940
+ _ctx.$attrs.class,
3941
+ {
3942
+ "cl:bg-grey-3": _ctx.disabled
3943
+ }
3944
+ ]])
3945
+ }, [
3946
+ createVNode(_sfc_main$1b, mergeProps(togglePopoverButtonAttrs.value, {
3947
+ class: ["cl:basis-full cl:border-transparent cl:flex! cl:hover:border-transparent cl:items-center cl:justify-center cl:rounded-l-md cl:rounded-r-none", {
3948
+ "cl:text-grey-4 cl:hover:text-grey-3": !_ctx.dateRangeSelected && !_ctx.disabled,
3949
+ "cl:text-primary-darker cl:hover:text-primary-dark": _ctx.dateRangeSelected && !_ctx.disabled
3950
+ }],
3951
+ disabled: _ctx.disabled,
3952
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("togglePopover"))
3953
+ }), {
3954
+ default: withCtx(() => [
3955
+ createVNode(_component_icon, {
3956
+ icon: "bi:calendar3",
3957
+ class: "cl:text-xl icon"
3958
+ })
3959
+ ]),
3960
+ _: 1
3961
+ }, 16, ["disabled", "class"]),
3962
+ !_ctx.required ? (openBlock(), createBlock(_sfc_main$1b, {
3963
+ key: 0,
3964
+ id: _ctx.$attrs.id ? _ctx.$attrs.id + "Clear" : "clUiDateRangeInputClear",
3965
+ title: unref(t2)("input.clearDateRange"),
3966
+ size: "small",
3967
+ class: normalizeClass(["cl:basis-0 cl:border-transparent cl:flex cl:hover:border-transparent cl:items-center cl:justify-center cl:rounded-l-none cl:rounded-r-md", {
3968
+ "cl:text-grey-4 cl:hover:text-grey-3": !_ctx.dateRangeSelected && !_ctx.disabled,
3969
+ "cl:text-danger-dark cl:hover:text-danger-default": _ctx.dateRangeSelected && !_ctx.disabled
3970
+ }]),
3971
+ disabled: _ctx.disabled,
3972
+ onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("clear"))
3973
+ }, {
3974
+ default: withCtx(() => [
3975
+ createVNode(_component_icon, {
3976
+ icon: "ph:x",
3977
+ class: "cl:text-sm clear-icon"
3978
+ })
3979
+ ]),
3980
+ _: 1
3981
+ }, 8, ["id", "title", "disabled", "class"])) : createCommentVNode("", true)
3982
+ ], 2);
3983
+ };
3984
+ }
3985
+ });
4119
3986
  const popoverPlacements = [
4120
3987
  "auto",
4121
3988
  "auto-start",
@@ -4129,16 +3996,12 @@ const popoverPlacements = [
4129
3996
  "left-start",
4130
3997
  "left-end"
4131
3998
  ];
4132
- const _hoisted_1$D = {
3999
+ const _hoisted_1$E = {
4133
4000
  key: 1,
4134
4001
  class: "cl:relative"
4135
4002
  };
4136
4003
  const _hoisted_2$s = ["value", "disabled", "placeholder"];
4137
- const _hoisted_3$j = {
4138
- key: 0,
4139
- class: "action-icon cl:absolute cl:bg-transparent cl:flex cl:right-2 cl:text-grey-4 cl:top-3.5"
4140
- };
4141
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
4004
+ const _sfc_main$N = /* @__PURE__ */ defineComponent({
4142
4005
  ...{
4143
4006
  inheritAttrs: false
4144
4007
  },
@@ -4150,7 +4013,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
4150
4013
  placeholder: {},
4151
4014
  required: { type: Boolean },
4152
4015
  disabled: { type: Boolean },
4153
- rangeSelected: { type: Boolean }
4016
+ rangeSelected: { type: Boolean },
4017
+ forceIconDisplay: { type: Boolean }
4154
4018
  },
4155
4019
  emits: ["clear", "reset", "togglePopover", "focus", "blur"],
4156
4020
  setup(__props, { expose: __expose }) {
@@ -4180,13 +4044,13 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
4180
4044
  focus
4181
4045
  });
4182
4046
  return (_ctx, _cache) => {
4183
- return _ctx.type === "dateRange" ? (openBlock(), createBlock(unref(_sfc_main$Q), mergeProps({ key: 0 }, _ctx.$attrs, {
4047
+ return _ctx.type === "dateRange" ? (openBlock(), createBlock(unref(_sfc_main$O), mergeProps({ key: 0 }, _ctx.$attrs, {
4184
4048
  disabled: !!_ctx.disabled,
4185
4049
  required: _ctx.required,
4186
4050
  "date-range-selected": !!_ctx.rangeSelected,
4187
4051
  onTogglePopover: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("togglePopover")),
4188
4052
  onClear: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("clear"))
4189
- }), null, 16, ["disabled", "required", "date-range-selected"])) : (openBlock(), createElementBlock("div", _hoisted_1$D, [
4053
+ }), null, 16, ["disabled", "required", "date-range-selected"])) : (openBlock(), createElementBlock("div", _hoisted_1$E, [
4190
4054
  createElementVNode("input", mergeProps({
4191
4055
  ref_key: "element",
4192
4056
  ref: element
@@ -4203,7 +4067,10 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
4203
4067
  icon: _ctx.type === "time" ? "ph-clock" : "ph:calendar",
4204
4068
  onClick: focus
4205
4069
  }, null, 8, ["icon"]),
4206
- !_ctx.disabled ? (openBlock(), createElementBlock("div", _hoisted_3$j, [
4070
+ !_ctx.disabled ? (openBlock(), createElementBlock("div", {
4071
+ key: 0,
4072
+ class: normalizeClass(["action-icon cl:absolute cl:bg-transparent cl:flex cl:right-2 cl:text-grey-4 cl:top-3.5", { "show-icons": _ctx.forceIconDisplay }])
4073
+ }, [
4207
4074
  _ctx.type !== "time" ? (openBlock(), createBlock(unref(Icon), {
4208
4075
  key: 0,
4209
4076
  class: "cl:cursor-pointer cl:hover:text-link-light",
@@ -4216,13 +4083,13 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
4216
4083
  icon: "ph:x",
4217
4084
  onClick: _cache[5] || (_cache[5] = withModifiers(($event) => _ctx.$emit("clear"), ["prevent"]))
4218
4085
  })) : createCommentVNode("", true)
4219
- ])) : createCommentVNode("", true)
4086
+ ], 2)) : createCommentVNode("", true)
4220
4087
  ]));
4221
4088
  };
4222
4089
  }
4223
4090
  });
4224
- const clUiCalendarInput = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-94999178"]]);
4225
- const _hoisted_1$C = {
4091
+ const clUiCalendarInput = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-8d0a0dc4"]]);
4092
+ const _hoisted_1$D = {
4226
4093
  key: 0,
4227
4094
  class: "cl:px-3 cl:py-3 cl:w-full"
4228
4095
  };
@@ -4230,7 +4097,7 @@ const _hoisted_2$r = {
4230
4097
  key: 0,
4231
4098
  class: "cl:px-3 cl:py-3 cl:w-full"
4232
4099
  };
4233
- const _sfc_main$L = /* @__PURE__ */ defineComponent({
4100
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
4234
4101
  ...{
4235
4102
  inheritAttrs: false
4236
4103
  },
@@ -4246,7 +4113,8 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4246
4113
  required: { type: Boolean, default: false },
4247
4114
  placeholder: { default: null },
4248
4115
  popoverPlacement: { default: "auto" },
4249
- showPopover: { type: Boolean, default: void 0 }
4116
+ showPopover: { type: Boolean, default: void 0 },
4117
+ forceIconDisplay: { type: Boolean, default: false }
4250
4118
  }, {
4251
4119
  "modelValue": { required: true },
4252
4120
  "modelModifiers": {}
@@ -4369,14 +4237,15 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4369
4237
  type: _ctx.type,
4370
4238
  placeholder: _ctx.placeholder,
4371
4239
  required: _ctx.required,
4240
+ "force-icon-display": _ctx.forceIconDisplay,
4372
4241
  disabled: _ctx.disabled,
4373
4242
  onFocus: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("focus")),
4374
4243
  onBlur: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("blur")),
4375
4244
  onClear: _cache[2] || (_cache[2] = ($event) => internalCurrentDateTime.value = null)
4376
- }), null, 16, ["date", "events", "type", "placeholder", "required", "disabled"])
4245
+ }), null, 16, ["date", "events", "type", "placeholder", "required", "force-icon-display", "disabled"])
4377
4246
  ]),
4378
4247
  footer: withCtx(() => [
4379
- todayButtonVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$C, [
4248
+ todayButtonVisible.value ? (openBlock(), createElementBlock("div", _hoisted_1$D, [
4380
4249
  createElementVNode("button", {
4381
4250
  class: "cl:bg-primary-default cl:hover:primary-light cl:px-3 cl:py-1 cl:rounded-md cl:text-black cl:w-full",
4382
4251
  onClick: setToday
@@ -4415,11 +4284,12 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4415
4284
  placeholder: _ctx.placeholder,
4416
4285
  required: _ctx.required,
4417
4286
  disabled: _ctx.disabled,
4287
+ "force-icon-display": _ctx.forceIconDisplay,
4418
4288
  onFocus: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("focus")),
4419
4289
  onBlur: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("blur")),
4420
4290
  onClear: _cache[6] || (_cache[6] = ($event) => internalCurrentDateTime.value = null),
4421
4291
  onReset: _cache[7] || (_cache[7] = ($event) => internalCurrentDateTime.value = unref(getDefaultDate)(_ctx.minDate, _ctx.maxDate, internalTimeZone.value, _ctx.type))
4422
- }), null, 16, ["date", "events", "type", "placeholder", "required", "disabled"])
4292
+ }), null, 16, ["date", "events", "type", "placeholder", "required", "disabled", "force-icon-display"])
4423
4293
  ]),
4424
4294
  footer: withCtx(() => [
4425
4295
  todayButtonVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$r, [
@@ -4445,6 +4315,244 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4445
4315
  };
4446
4316
  }
4447
4317
  });
4318
+ const _hoisted_1$C = {
4319
+ key: 1,
4320
+ class: "cl:flex cl:flex-col cl:gap-2 cl:p-2 cl:w-full"
4321
+ };
4322
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4323
+ ...{
4324
+ inheritAttrs: false
4325
+ },
4326
+ __name: "cl-ui-input-date-range",
4327
+ props: /* @__PURE__ */ mergeModels({
4328
+ minDate: { default: null },
4329
+ maxDate: { default: null },
4330
+ initialCalendarDate: { default: null },
4331
+ dateFormatLocale: { default: null },
4332
+ timeZone: { default: null },
4333
+ disabled: { type: Boolean, default: false },
4334
+ required: { type: Boolean, default: false },
4335
+ quickDateScope: { default: null },
4336
+ popoverPlacement: { default: "auto" },
4337
+ manualDateSelection: { type: Boolean, default: true }
4338
+ }, {
4339
+ "modelValue": { required: true },
4340
+ "modelModifiers": {}
4341
+ }),
4342
+ emits: ["update:modelValue"],
4343
+ setup(__props) {
4344
+ const props = __props;
4345
+ const model = useModel(__props, "modelValue");
4346
+ const internalTimeZone = computed(() => props.timeZone ?? "UTC");
4347
+ const internalCurrentDateRange = computed({
4348
+ get() {
4349
+ let result = null;
4350
+ if (model.value !== null) {
4351
+ result = {
4352
+ start: DateTime.fromISO(model.value.start, {
4353
+ zone: internalTimeZone.value
4354
+ }).toJSDate(),
4355
+ end: DateTime.fromISO(model.value.end ?? "", {
4356
+ zone: internalTimeZone.value
4357
+ }).toJSDate()
4358
+ };
4359
+ }
4360
+ return result;
4361
+ },
4362
+ set(value) {
4363
+ if (value !== null) {
4364
+ const rangeValue = value;
4365
+ model.value = {
4366
+ start: convertDateToIsoString(rangeValue.start, "start", false, props.timeZone) ?? "",
4367
+ end: convertDateToIsoString(rangeValue.end, "end", false, props.timeZone) ?? ""
4368
+ };
4369
+ internalEntrySelectStartDate.value = convertDateToIsoString(rangeValue.start, "start", false, props.timeZone) ?? "";
4370
+ internalEntrySelectEndDate.value = convertDateToIsoString(rangeValue.end, "end", false, props.timeZone) ?? "";
4371
+ } else {
4372
+ model.value = null;
4373
+ }
4374
+ }
4375
+ });
4376
+ watch(() => internalCurrentDateRange.value, (newVal) => {
4377
+ if (!newVal) {
4378
+ internalEntrySelectStartDate.value = null;
4379
+ internalEntrySelectEndDate.value = null;
4380
+ }
4381
+ });
4382
+ const { locale: locale2, t: t2 } = useI18n();
4383
+ const internalLocale = computed(() => props.dateFormatLocale ?? locale2.value);
4384
+ const popover = computed(() => getPopoverOptions(props.disabled, props.popoverPlacement));
4385
+ const currentInitialDate = computed(() => {
4386
+ return getInitialCalendarDate(model.value, props.initialCalendarDate, internalTimeZone.value, "dateRange");
4387
+ });
4388
+ const dateRangeTooltipText = computed(() => {
4389
+ return generateDateRangeTooltip(internalCurrentDateRange.value, internalTimeZone.value, internalLocale.value);
4390
+ });
4391
+ const currentQuickDate = ref(null);
4392
+ const calendar = ref(null);
4393
+ function handleQuickDateSelection(selectedQuickDate) {
4394
+ const newDateRange = getDateRangeForQuickDateSelection(selectedQuickDate, internalTimeZone.value);
4395
+ internalCurrentDateRange.value = newDateRange;
4396
+ currentQuickDate.value = selectedQuickDate;
4397
+ calendar.value.move(newDateRange.start);
4398
+ calendar.value.hidePopover();
4399
+ }
4400
+ const isMediumScreen = useMediaQuery("(min-width: 768px)");
4401
+ const dateRangeColumnCount = computed(() => isMediumScreen.value ? 2 : 1);
4402
+ const showQuickDates = useMediaQuery("(min-height: 800px)");
4403
+ const internalEntrySelectStartDate = ref(null);
4404
+ const internalEntrySelectEndDate = ref(null);
4405
+ function handleEntrySelectDateRangeUpdate() {
4406
+ let startDate = internalEntrySelectStartDate.value ? internalEntrySelectStartDate.value : "";
4407
+ let endDate = internalEntrySelectEndDate.value ? internalEntrySelectEndDate.value : "";
4408
+ let startDateTime = DateTime.fromISO(startDate, { zone: internalTimeZone.value });
4409
+ let endDateTime = DateTime.fromISO(endDate, { zone: internalTimeZone.value });
4410
+ if (!internalEntrySelectStartDate.value && internalEntrySelectEndDate.value || startDateTime.startOf("day") > endDateTime.startOf("day")) {
4411
+ startDateTime = DateTime.fromISO(endDate, { zone: internalTimeZone.value }).minus({ days: 1 });
4412
+ startDate = startDateTime.toISO() ?? "";
4413
+ nextTick(() => {
4414
+ internalEntrySelectStartDate.value = startDate;
4415
+ });
4416
+ } else if (internalEntrySelectStartDate.value && !internalEntrySelectEndDate.value) {
4417
+ const todaysDate = DateTime.now().setZone(internalTimeZone.value).startOf("day");
4418
+ if (startDateTime.startOf("day") > todaysDate) {
4419
+ endDateTime = startDateTime.plus({ days: 1 });
4420
+ endDate = endDateTime.toISO() ?? "";
4421
+ } else {
4422
+ endDate = todaysDate.toISO() ?? "";
4423
+ endDateTime = DateTime.fromISO(endDate, { zone: internalTimeZone.value });
4424
+ }
4425
+ nextTick(() => {
4426
+ internalEntrySelectEndDate.value = endDate;
4427
+ });
4428
+ }
4429
+ if (!internalEntrySelectStartDate.value && !internalEntrySelectEndDate.value) {
4430
+ internalCurrentDateRange.value = null;
4431
+ } else {
4432
+ const formattedStartDate = DateTime.fromISO(startDate, { zone: internalTimeZone.value });
4433
+ const formattedEndDate = DateTime.fromISO(endDate, { zone: internalTimeZone.value });
4434
+ internalCurrentDateRange.value = {
4435
+ start: formattedStartDate.toJSDate(),
4436
+ end: formattedEndDate.toJSDate()
4437
+ };
4438
+ }
4439
+ if (internalCurrentDateRange.value) {
4440
+ calendar.value.move(internalCurrentDateRange.value.start);
4441
+ }
4442
+ }
4443
+ return (_ctx, _cache) => {
4444
+ return openBlock(), createBlock(_sfc_main$19, { "show-required-asterisk": _ctx.required }, createSlots({
4445
+ label: withCtx(() => [
4446
+ renderSlot(_ctx.$slots, "default")
4447
+ ]),
4448
+ default: withCtx(() => [
4449
+ createVNode(unref(DatePicker), {
4450
+ ref_key: "calendar",
4451
+ ref: calendar,
4452
+ modelValue: internalCurrentDateRange.value,
4453
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => internalCurrentDateRange.value = $event),
4454
+ modelModifiers: { range: true },
4455
+ mode: "date",
4456
+ color: "primary",
4457
+ "title-position": "left",
4458
+ locale: internalLocale.value,
4459
+ timezone: internalTimeZone.value,
4460
+ columns: dateRangeColumnCount.value,
4461
+ popover: popover.value,
4462
+ "min-date": _ctx.minDate,
4463
+ "max-date": _ctx.maxDate,
4464
+ "initial-page": currentInitialDate.value,
4465
+ onDayclick: _cache[4] || (_cache[4] = ($event) => currentQuickDate.value = null)
4466
+ }, {
4467
+ default: withCtx(({ togglePopover }) => [
4468
+ createVNode(_sfc_main$O, mergeProps(_ctx.$attrs, {
4469
+ required: _ctx.required,
4470
+ disabled: _ctx.disabled,
4471
+ "date-range-selected": !!internalCurrentDateRange.value,
4472
+ title: dateRangeTooltipText.value,
4473
+ onTogglePopover: togglePopover,
4474
+ onClear: _cache[0] || (_cache[0] = ($event) => {
4475
+ internalCurrentDateRange.value = null;
4476
+ currentQuickDate.value = null;
4477
+ calendar.value.hidePopover();
4478
+ internalEntrySelectStartDate.value = null;
4479
+ internalEntrySelectEndDate.value = null;
4480
+ })
4481
+ }), null, 16, ["required", "disabled", "date-range-selected", "title", "onTogglePopover"])
4482
+ ]),
4483
+ footer: withCtx(() => [
4484
+ _ctx.quickDateScope !== "none" && unref(showQuickDates) ? (openBlock(), createBlock(_sfc_main$R, {
4485
+ key: 0,
4486
+ scope: _ctx.quickDateScope,
4487
+ "selected-quick-date": currentQuickDate.value,
4488
+ "current-date-range": model.value,
4489
+ onQuickDateSelected: handleQuickDateSelection
4490
+ }, null, 8, ["scope", "selected-quick-date", "current-date-range"])) : createCommentVNode("", true),
4491
+ _ctx.manualDateSelection ? (openBlock(), createElementBlock("div", _hoisted_1$C, [
4492
+ createVNode(_sfc_main$M, {
4493
+ id: "dateInputStart",
4494
+ modelValue: internalEntrySelectStartDate.value,
4495
+ "onUpdate:modelValue": [
4496
+ _cache[1] || (_cache[1] = ($event) => internalEntrySelectStartDate.value = $event),
4497
+ handleEntrySelectDateRangeUpdate
4498
+ ],
4499
+ type: "date",
4500
+ "date-format-locale": _ctx.dateFormatLocale,
4501
+ disabled: _ctx.disabled,
4502
+ "time-zone": _ctx.timeZone,
4503
+ "min-date": _ctx.minDate,
4504
+ "max-date": _ctx.maxDate,
4505
+ required: true,
4506
+ "force-icon-display": true,
4507
+ "popover-placement": _ctx.popoverPlacement,
4508
+ "show-popover": true
4509
+ }, {
4510
+ default: withCtx(() => [
4511
+ createTextVNode(toDisplayString(unref(t2)("datetime.startDate")), 1)
4512
+ ]),
4513
+ _: 1
4514
+ }, 8, ["modelValue", "date-format-locale", "disabled", "time-zone", "min-date", "max-date", "popover-placement"]),
4515
+ createVNode(_sfc_main$M, {
4516
+ id: "dateInputEnd",
4517
+ modelValue: internalEntrySelectEndDate.value,
4518
+ "onUpdate:modelValue": [
4519
+ _cache[2] || (_cache[2] = ($event) => internalEntrySelectEndDate.value = $event),
4520
+ handleEntrySelectDateRangeUpdate
4521
+ ],
4522
+ type: "date",
4523
+ "date-format-locale": _ctx.dateFormatLocale,
4524
+ disabled: _ctx.disabled,
4525
+ "time-zone": _ctx.timeZone,
4526
+ "min-date": _ctx.minDate,
4527
+ "max-date": _ctx.maxDate,
4528
+ required: true,
4529
+ "force-icon-display": true,
4530
+ "popover-placement": _ctx.popoverPlacement,
4531
+ "show-popover": true
4532
+ }, {
4533
+ default: withCtx(() => [
4534
+ createTextVNode(toDisplayString(unref(t2)("datetime.endDate")), 1)
4535
+ ]),
4536
+ _: 1
4537
+ }, 8, ["modelValue", "date-format-locale", "disabled", "time-zone", "min-date", "max-date", "popover-placement"])
4538
+ ])) : createCommentVNode("", true)
4539
+ ]),
4540
+ _: 1
4541
+ }, 8, ["modelValue", "locale", "timezone", "columns", "popover", "min-date", "max-date", "initial-page"])
4542
+ ]),
4543
+ _: 2
4544
+ }, [
4545
+ _ctx.$slots[`help-text`] ? {
4546
+ name: "helpText",
4547
+ fn: withCtx(() => [
4548
+ renderSlot(_ctx.$slots, "help-text")
4549
+ ]),
4550
+ key: "0"
4551
+ } : void 0
4552
+ ]), 1032, ["show-required-asterisk"]);
4553
+ };
4554
+ }
4555
+ });
4448
4556
  const _sfc_main$K = /* @__PURE__ */ defineComponent({
4449
4557
  ...{
4450
4558
  inheritAttrs: false
@@ -5515,7 +5623,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5515
5623
  ]),
5516
5624
  _: 1
5517
5625
  }, 8, ["id", "list", "model-value"])) : isDateColumn.value ? (openBlock(), createElementBlock("div", _hoisted_2$o, [
5518
- createVNode(_sfc_main$L, {
5626
+ createVNode(_sfc_main$M, {
5519
5627
  id: `${unref(gridId)}-${_ctx.column.name}`,
5520
5628
  "model-value": currentDateFilterValue.value,
5521
5629
  "time-zone": _ctx.timeZone,
@@ -5525,12 +5633,13 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5525
5633
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => setFilter(null, $event ?? ""))
5526
5634
  }, null, 8, ["id", "model-value", "time-zone", "type"])
5527
5635
  ])) : isDateRangeColumn.value ? (openBlock(), createElementBlock("div", _hoisted_3$g, [
5528
- createVNode(_sfc_main$P, {
5636
+ createVNode(_sfc_main$L, {
5529
5637
  id: `${unref(gridId)}-${_ctx.column.name}`,
5530
5638
  "model-value": currentDateRangeFilterValue.value,
5531
5639
  class: "cl:[&_.clear-icon]:-pb-4 cl:[&_.icon]:text-sm cl:[&_.range-input]:h-[2rem] cl:border-none cl:h-[2rem] cl:mb-0 cl:w-full cl:z-50",
5532
5640
  "time-zone": _ctx.headerDisplayTimezone,
5533
5641
  "quick-date-scope": _ctx.quickDateScope,
5642
+ "manual-date-selection": true,
5534
5643
  "popover-placement": "bottom-start",
5535
5644
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => setDateRangeFilter($event))
5536
5645
  }, null, 8, ["id", "model-value", "time-zone", "quick-date-scope"])
@@ -5607,7 +5716,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
5607
5716
  };
5608
5717
  }
5609
5718
  });
5610
- const clUiGridFilterInput = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-879183d3"]]);
5719
+ const clUiGridFilterInput = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-0147943d"]]);
5611
5720
  const _hoisted_1$y = { key: 1 };
5612
5721
  const _sfc_main$F = /* @__PURE__ */ defineComponent({
5613
5722
  __name: "cl-ui-grid-filter",
@@ -12051,13 +12160,13 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
12051
12160
  clUiHeaderMenu: _sfc_main$r,
12052
12161
  clUiInput,
12053
12162
  clUiInputCheckbox,
12054
- clUiInputDateRange: _sfc_main$P,
12055
- clUiInputDateRangeInput: _sfc_main$Q,
12056
- clUiInputDateTime: _sfc_main$L,
12163
+ clUiInputDateRange: _sfc_main$L,
12164
+ clUiInputDateRangeInput: _sfc_main$O,
12165
+ clUiInputDateTime: _sfc_main$M,
12057
12166
  clUiInputNumber: _sfc_main$U,
12058
12167
  clUiInputRange,
12059
12168
  clUiInputText: _sfc_main$18,
12060
- clUiInputTextArea: _sfc_main$O,
12169
+ clUiInputTextArea: _sfc_main$Q,
12061
12170
  clUiLanguageSwitcher: _sfc_main$m,
12062
12171
  clUiLoadingSpinner,
12063
12172
  clUiLogin: _sfc_main$l,
@@ -12150,13 +12259,13 @@ export {
12150
12259
  _sfc_main$r as clUiHeaderMenu,
12151
12260
  clUiInput,
12152
12261
  clUiInputCheckbox,
12153
- _sfc_main$P as clUiInputDateRange,
12154
- _sfc_main$Q as clUiInputDateRangeInput,
12155
- _sfc_main$L as clUiInputDateTime,
12262
+ _sfc_main$L as clUiInputDateRange,
12263
+ _sfc_main$O as clUiInputDateRangeInput,
12264
+ _sfc_main$M as clUiInputDateTime,
12156
12265
  _sfc_main$U as clUiInputNumber,
12157
12266
  clUiInputRange,
12158
12267
  _sfc_main$18 as clUiInputText,
12159
- _sfc_main$O as clUiInputTextArea,
12268
+ _sfc_main$Q as clUiInputTextArea,
12160
12269
  _sfc_main$m as clUiLanguageSwitcher,
12161
12270
  clUiLoadingSpinner,
12162
12271
  _sfc_main$l as clUiLogin,