@citruslime/ui 4.1.0-beta.1 → 4.1.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/citrus-lime-ui.es.js +494 -533
- package/dist/citrus-lime-ui.umd.js +2 -2
- package/dist/components/accordion/header/cl-ui-accordion-header.vue.d.ts +2 -4
- package/dist/components/footer/cl-ui-footer.vue.d.ts +2 -4
- package/dist/components/grid/header/filter-values.d.ts +1 -0
- package/dist/components/grid/types.d.ts +4 -2
- package/dist/components/input-v2/input-number/cl-ui-input-number.vue.d.ts +1 -1
- package/dist/components/input-v2/input-range/cl-ui-input-range.vue.d.ts +1 -1
- package/dist/components/input-v2/input-text/cl-ui-input-text.vue.d.ts +5 -5
- package/dist/components/navigation/item/cl-ui-navigation-item.vue.d.ts +2 -4
- package/dist/components/navigation/section/cl-ui-navigation-section.vue.d.ts +2 -4
- package/dist/components/select/cl-ui-select.vue.d.ts +3 -2
- package/dist/components/select/select-options/cl-ui-select-option.vue.d.ts +2 -0
- package/dist/ui.css +1 -1
- package/dist/utils/i18n/types.d.ts +3 -0
- package/package.json +14 -14
|
@@ -50,7 +50,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
50
50
|
});
|
|
51
51
|
const _hoisted_1$12 = { class: "cl:absolute cl:left-5 cl:top-5" };
|
|
52
52
|
const _hoisted_2$M = { class: "cl:font-semibold cl:ml-10 cl:p-4 cl:select-none cl:text-grey-5" };
|
|
53
|
-
const _hoisted_3$
|
|
53
|
+
const _hoisted_3$t = { class: "cl:overflow-hidden" };
|
|
54
54
|
const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
55
55
|
...{
|
|
56
56
|
inheritAttrs: false
|
|
@@ -91,7 +91,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
91
91
|
renderSlot(_ctx.$slots, "title")
|
|
92
92
|
])
|
|
93
93
|
], 2),
|
|
94
|
-
createElementVNode("div", _hoisted_3$
|
|
94
|
+
createElementVNode("div", _hoisted_3$t, [
|
|
95
95
|
createVNode(Transition, { name: "grow-down" }, {
|
|
96
96
|
default: withCtx(() => [
|
|
97
97
|
withDirectives(createElementVNode("div", mergeProps(_ctx.$attrs, { class: "cl:ml-10 cl:p-4" }), [
|
|
@@ -359,7 +359,7 @@ const cardSizes = [
|
|
|
359
359
|
];
|
|
360
360
|
const _hoisted_1$X = { class: "cl:sm:w-auto cl:w-full" };
|
|
361
361
|
const _hoisted_2$J = { class: "cl:flex cl:flex-nowrap cl:gap-2 cl:text-grey-4 cl:text-xs cl:tracking-widest" };
|
|
362
|
-
const _hoisted_3$
|
|
362
|
+
const _hoisted_3$s = {
|
|
363
363
|
key: 0,
|
|
364
364
|
class: "cl:self-center"
|
|
365
365
|
};
|
|
@@ -393,7 +393,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
393
393
|
class: normalizeClass(["cl:flex", { "cl:flex-col": _ctx.labelPosition === "above", "cl:flex-row-reverse cl:gap-2 cl:items-center cl:justify-end": _ctx.labelPosition === "right" }])
|
|
394
394
|
}, [
|
|
395
395
|
createElementVNode("div", _hoisted_2$J, [
|
|
396
|
-
_ctx.$slots.label ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
396
|
+
_ctx.$slots.label ? (openBlock(), createElementBlock("span", _hoisted_3$s, [
|
|
397
397
|
renderSlot(_ctx.$slots, "label")
|
|
398
398
|
])) : createCommentVNode("", true),
|
|
399
399
|
_ctx.showRequiredAsterisk ? (openBlock(), createElementBlock("span", _hoisted_4$n, "*")) : createCommentVNode("", true)
|
|
@@ -414,7 +414,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
414
414
|
])) : _ctx.errors || _ctx.$slots.helpText ? (openBlock(), createElementBlock("div", _hoisted_7$9, [
|
|
415
415
|
createElementVNode("span", _hoisted_8$8, [
|
|
416
416
|
renderSlot(_ctx.$slots, "helpText", {}, () => [
|
|
417
|
-
_cache[0] || (_cache[0] = createTextVNode(" "))
|
|
417
|
+
_cache[0] || (_cache[0] = createTextVNode(" ", -1))
|
|
418
418
|
])
|
|
419
419
|
])
|
|
420
420
|
])) : createCommentVNode("", true)
|
|
@@ -448,9 +448,8 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
448
448
|
const inputRef = ref();
|
|
449
449
|
const { focused } = useFocusWithin(inputRef);
|
|
450
450
|
watch(focused, () => {
|
|
451
|
-
var _a;
|
|
452
451
|
if (focused.value && props.selectOnFocus) {
|
|
453
|
-
|
|
452
|
+
inputRef.value?.select();
|
|
454
453
|
}
|
|
455
454
|
});
|
|
456
455
|
onKeyDown(true, (e) => emit("keySinglePress", e.key), {
|
|
@@ -458,18 +457,9 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
458
457
|
dedupe: true
|
|
459
458
|
});
|
|
460
459
|
__expose({
|
|
461
|
-
focus: () =>
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
},
|
|
465
|
-
blur: () => {
|
|
466
|
-
var _a;
|
|
467
|
-
return (_a = inputRef.value) == null ? void 0 : _a.blur();
|
|
468
|
-
},
|
|
469
|
-
select: () => {
|
|
470
|
-
var _a;
|
|
471
|
-
return (_a = inputRef.value) == null ? void 0 : _a.select();
|
|
472
|
-
}
|
|
460
|
+
focus: () => inputRef.value?.focus(),
|
|
461
|
+
blur: () => inputRef.value?.blur(),
|
|
462
|
+
select: () => inputRef.value?.select()
|
|
473
463
|
});
|
|
474
464
|
return (_ctx, _cache) => {
|
|
475
465
|
return openBlock(), createBlock(_sfc_main$19, {
|
|
@@ -486,8 +476,8 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
486
476
|
maxlength: _ctx.maxlength ?? void 0,
|
|
487
477
|
disabled: _ctx.disabled,
|
|
488
478
|
placeholder: _ctx.placeholder ?? void 0,
|
|
489
|
-
onFocus: _cache[1] || (_cache[1] = ($event) => emit("focus")),
|
|
490
|
-
onBlur: _cache[2] || (_cache[2] = ($event) => emit("blur"))
|
|
479
|
+
onFocus: _cache[1] || (_cache[1] = ($event) => emit("focus", $event)),
|
|
480
|
+
onBlur: _cache[2] || (_cache[2] = ($event) => emit("blur", $event))
|
|
491
481
|
}), null, 16, _hoisted_1$W), [
|
|
492
482
|
[vModelDynamic, value.value]
|
|
493
483
|
])
|
|
@@ -545,21 +535,29 @@ function useFocusTrap(target, options = {}) {
|
|
|
545
535
|
(els) => {
|
|
546
536
|
if (!els.length)
|
|
547
537
|
return;
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
options.onActivate
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
options.onDeactivate
|
|
538
|
+
if (!trap) {
|
|
539
|
+
trap = createFocusTrap(els, {
|
|
540
|
+
...focusTrapOptions,
|
|
541
|
+
onActivate() {
|
|
542
|
+
hasFocus.value = true;
|
|
543
|
+
if (options.onActivate)
|
|
544
|
+
options.onActivate();
|
|
545
|
+
},
|
|
546
|
+
onDeactivate() {
|
|
547
|
+
hasFocus.value = false;
|
|
548
|
+
if (options.onDeactivate)
|
|
549
|
+
options.onDeactivate();
|
|
550
|
+
}
|
|
551
|
+
});
|
|
552
|
+
if (immediate)
|
|
553
|
+
activate();
|
|
554
|
+
} else {
|
|
555
|
+
const isActive = trap == null ? void 0 : trap.active;
|
|
556
|
+
trap == null ? void 0 : trap.updateContainerElements(els);
|
|
557
|
+
if (!isActive && immediate) {
|
|
558
|
+
activate();
|
|
559
559
|
}
|
|
560
|
-
}
|
|
561
|
-
if (immediate)
|
|
562
|
-
activate();
|
|
560
|
+
}
|
|
563
561
|
},
|
|
564
562
|
{ flush: "post" }
|
|
565
563
|
);
|
|
@@ -747,21 +745,14 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
747
745
|
setup(__props, { emit: __emit }) {
|
|
748
746
|
const props = __props;
|
|
749
747
|
const emit = __emit;
|
|
750
|
-
const displayedText = computed(() =>
|
|
751
|
-
|
|
752
|
-
return ((_a = props.option) == null ? void 0 : _a.name) ?? props.text;
|
|
753
|
-
});
|
|
754
|
-
const displayedParent = computed(() => {
|
|
755
|
-
var _a;
|
|
756
|
-
return ((_a = props.option) == null ? void 0 : _a.parentName) ?? "";
|
|
757
|
-
});
|
|
748
|
+
const displayedText = computed(() => props.option?.name ?? props.text);
|
|
749
|
+
const displayedParent = computed(() => props.option?.parentName ?? "");
|
|
758
750
|
const isHighlighted = ref(false);
|
|
759
751
|
function optionSelected() {
|
|
760
|
-
var _a;
|
|
761
752
|
if (props.isCreateNewOption === true) {
|
|
762
753
|
emit("create-object");
|
|
763
754
|
} else {
|
|
764
|
-
emit("select-object",
|
|
755
|
+
emit("select-object", props.option?.id);
|
|
765
756
|
}
|
|
766
757
|
}
|
|
767
758
|
function onHover(hovered) {
|
|
@@ -783,7 +774,6 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
783
774
|
}
|
|
784
775
|
watch(() => props.selectedIndex, () => updateHighlight());
|
|
785
776
|
return (_ctx, _cache) => {
|
|
786
|
-
var _a, _b;
|
|
787
777
|
return openBlock(), createElementBlock("div", {
|
|
788
778
|
class: normalizeClass(["cl:cursor-pointer cl:duration-75 cl:flex cl:p-1 cl:text-left cl:transition-colors", {
|
|
789
779
|
"cl:bg-white": isHighlighted.value === false,
|
|
@@ -794,7 +784,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
794
784
|
onMousemove: _cache[0] || (_cache[0] = ($event) => onHover(true)),
|
|
795
785
|
onMouseleave: _cache[1] || (_cache[1] = ($event) => onHover(false))
|
|
796
786
|
}, [
|
|
797
|
-
_ctx.option !== null &&
|
|
787
|
+
_ctx.option !== null && _ctx.option?.parentId !== 0 && _ctx.option?.parentId !== void 0 ? (openBlock(), createElementBlock("div", _hoisted_1$T, toDisplayString(displayedParent.value), 1)) : createCommentVNode("", true),
|
|
798
788
|
createElementVNode("div", {
|
|
799
789
|
class: normalizeClass({
|
|
800
790
|
"cl:w-1/2": displayedParent.value !== "",
|
|
@@ -818,7 +808,7 @@ const _hoisted_2$F = {
|
|
|
818
808
|
key: 0,
|
|
819
809
|
class: "cl:absolute cl:bg-off-white cl:flex cl:h-full cl:items-center cl:justify-center cl:top-0 cl:w-full cl:z-20"
|
|
820
810
|
};
|
|
821
|
-
const _hoisted_3$
|
|
811
|
+
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
812
|
const _hoisted_4$m = { class: "cl:inline-block cl:w-full" };
|
|
823
813
|
const _hoisted_5$f = { key: 6 };
|
|
824
814
|
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
@@ -903,10 +893,9 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
903
893
|
}
|
|
904
894
|
}
|
|
905
895
|
function scroll() {
|
|
906
|
-
var _a;
|
|
907
896
|
if (props.results && props.results.length > 1) {
|
|
908
897
|
const heightOffset = 34;
|
|
909
|
-
|
|
898
|
+
container.value?.scrollTo(0, (currentSelection.value + 1) * heightOffset - heightOffset * 2);
|
|
910
899
|
}
|
|
911
900
|
}
|
|
912
901
|
function updateAddNewOption() {
|
|
@@ -923,25 +912,15 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
923
912
|
if (props.isVisible === true) {
|
|
924
913
|
searchText.value = "";
|
|
925
914
|
search();
|
|
926
|
-
nextTick(() =>
|
|
927
|
-
var _a, _b;
|
|
928
|
-
return (_b = (_a = container.value) == null ? void 0 : _a.querySelector("input")) == null ? void 0 : _b.focus();
|
|
929
|
-
});
|
|
915
|
+
nextTick(() => container.value?.querySelector("input")?.focus());
|
|
930
916
|
}
|
|
931
917
|
}
|
|
932
918
|
watch(() => props.results, () => updateAddNewOption());
|
|
933
919
|
watch(() => props.errorMessage, () => updateAddNewOption());
|
|
934
920
|
watch(() => props.isVisible, () => onVisibilityChanged());
|
|
935
|
-
onMounted(() =>
|
|
936
|
-
|
|
937
|
-
return (_a = container.value) == null ? void 0 : _a.addEventListener("keydown", onKeyboardShiftTab);
|
|
938
|
-
});
|
|
939
|
-
onUnmounted(() => {
|
|
940
|
-
var _a;
|
|
941
|
-
return (_a = container.value) == null ? void 0 : _a.removeEventListener("keydown", onKeyboardShiftTab);
|
|
942
|
-
});
|
|
921
|
+
onMounted(() => container.value?.addEventListener("keydown", onKeyboardShiftTab));
|
|
922
|
+
onUnmounted(() => container.value?.removeEventListener("keydown", onKeyboardShiftTab));
|
|
943
923
|
return (_ctx, _cache) => {
|
|
944
|
-
var _a;
|
|
945
924
|
return _ctx.isVisible ? (openBlock(), createElementBlock("div", {
|
|
946
925
|
key: 0,
|
|
947
926
|
ref_key: "container",
|
|
@@ -958,7 +937,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
958
937
|
_ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_2$F, [
|
|
959
938
|
createVNode(clUiLoadingSpinner)
|
|
960
939
|
])) : createCommentVNode("", true),
|
|
961
|
-
createElementVNode("div", _hoisted_3$
|
|
940
|
+
createElementVNode("div", _hoisted_3$r, [
|
|
962
941
|
createElementVNode("div", _hoisted_4$m, [
|
|
963
942
|
createVNode(_sfc_main$18, {
|
|
964
943
|
id: `cl-ui-combo-box-search-input-${_ctx.objectType}`,
|
|
@@ -970,9 +949,9 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
970
949
|
onKeyup: search,
|
|
971
950
|
onBlur: hideDropdown
|
|
972
951
|
}, {
|
|
973
|
-
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
952
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
974
953
|
createElementVNode("span", null, null, -1)
|
|
975
|
-
])),
|
|
954
|
+
])]),
|
|
976
955
|
_: 1
|
|
977
956
|
}, 8, ["id", "modelValue", "placeholder"])
|
|
978
957
|
])
|
|
@@ -989,7 +968,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
989
968
|
"additional-text": _ctx.objectParentType,
|
|
990
969
|
class: "cl:bg-grey-2 cl:mt-1"
|
|
991
970
|
}, null, 8, ["text", "additional-text"])) : createCommentVNode("", true),
|
|
992
|
-
_ctx.results !== null &&
|
|
971
|
+
_ctx.results !== null && _ctx.results?.length === 0 && searchText.value.trim() !== "" && _ctx.canCreateNewObject === false && _ctx.errorMessage === "" ? (openBlock(), createBlock(_sfc_main$16, {
|
|
993
972
|
key: 3,
|
|
994
973
|
text: unref(t2)("comboBox.noResults", { value: searchText.value })
|
|
995
974
|
}, null, 8, ["text"])) : createCommentVNode("", true),
|
|
@@ -1027,7 +1006,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
1027
1006
|
});
|
|
1028
1007
|
const _hoisted_1$R = { class: "cl:flex cl:rounded-lg" };
|
|
1029
1008
|
const _hoisted_2$E = { class: "cl:inline-block cl:w-full" };
|
|
1030
|
-
const _hoisted_3$
|
|
1009
|
+
const _hoisted_3$q = { class: "cl:pointer-events-none cl:relative cl:top-0.5" };
|
|
1031
1010
|
const _hoisted_4$l = { class: "cl:absolute cl:flex cl:float-right cl:font-semibold cl:mt-[5px] cl:right-2 cl:text-danger-default cl:text-sm cl:z-10" };
|
|
1032
1011
|
const _hoisted_5$e = ["disabled"];
|
|
1033
1012
|
const _hoisted_6$a = ["disabled"];
|
|
@@ -1079,8 +1058,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
1079
1058
|
const objectToCreateValid = ref(true);
|
|
1080
1059
|
const comboBoxBottomOfView = ref(false);
|
|
1081
1060
|
function toggleDropdown(forcedState) {
|
|
1082
|
-
|
|
1083
|
-
const comboPosition = ((_a = outsideRef.value) == null ? void 0 : _a.getBoundingClientRect().top) || 0;
|
|
1061
|
+
const comboPosition = outsideRef.value?.getBoundingClientRect().top || 0;
|
|
1084
1062
|
comboBoxBottomOfView.value = window.innerHeight - comboPosition < 280;
|
|
1085
1063
|
if (!props.disabled) {
|
|
1086
1064
|
if (typeof forcedState !== "undefined") {
|
|
@@ -1103,12 +1081,11 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
1103
1081
|
toggleDropdown(false);
|
|
1104
1082
|
}
|
|
1105
1083
|
function selectObject(id2) {
|
|
1106
|
-
var _a;
|
|
1107
1084
|
const item = getComboBoxItemById(id2 ?? 0);
|
|
1108
1085
|
selectedItem.value = item;
|
|
1109
1086
|
toggleDropdown(false);
|
|
1110
1087
|
if (!props.openDropDownOnFocus) {
|
|
1111
|
-
|
|
1088
|
+
inputRef.value?.focus();
|
|
1112
1089
|
}
|
|
1113
1090
|
}
|
|
1114
1091
|
function getComboBoxItemById(id2) {
|
|
@@ -1124,10 +1101,9 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
1124
1101
|
return currentItem;
|
|
1125
1102
|
}
|
|
1126
1103
|
function createObject() {
|
|
1127
|
-
var _a;
|
|
1128
1104
|
createObjectRequest.value = {
|
|
1129
1105
|
name: objectToCreateValue.value,
|
|
1130
|
-
parentId:
|
|
1106
|
+
parentId: parentItem.value?.id ?? 0
|
|
1131
1107
|
};
|
|
1132
1108
|
emit("create-object", createObjectRequest.value);
|
|
1133
1109
|
}
|
|
@@ -1139,8 +1115,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
1139
1115
|
emit("create-parent-object", createObjectRequest.value);
|
|
1140
1116
|
}
|
|
1141
1117
|
function handleObjectCreateResponse() {
|
|
1142
|
-
|
|
1143
|
-
if ((_a = props.objectCreatedResponse) == null ? void 0 : _a.error) {
|
|
1118
|
+
if (props.objectCreatedResponse?.error) {
|
|
1144
1119
|
showNotification({
|
|
1145
1120
|
message: t2("comboBox.createFailed", {
|
|
1146
1121
|
name: objectToCreateValue.value,
|
|
@@ -1149,13 +1124,12 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
1149
1124
|
colour: "danger",
|
|
1150
1125
|
duration: 1e4
|
|
1151
1126
|
});
|
|
1152
|
-
} else if (
|
|
1127
|
+
} else if (props.objectCreatedResponse?.id) {
|
|
1153
1128
|
handleSuccessfulObjectCreation();
|
|
1154
1129
|
}
|
|
1155
1130
|
}
|
|
1156
1131
|
function handleParentObjectCreateResponse() {
|
|
1157
|
-
|
|
1158
|
-
if ((_a = props.parentObjectCreatedResponse) == null ? void 0 : _a.id) {
|
|
1132
|
+
if (props.parentObjectCreatedResponse?.id) {
|
|
1159
1133
|
parentItem.value = {
|
|
1160
1134
|
id: props.parentObjectCreatedResponse.id,
|
|
1161
1135
|
name: props.parentObjectCreatedResponse.name ?? ""
|
|
@@ -1163,23 +1137,22 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
1163
1137
|
}
|
|
1164
1138
|
}
|
|
1165
1139
|
function handleSuccessfulObjectCreation() {
|
|
1166
|
-
var _a, _b, _c, _d, _e;
|
|
1167
1140
|
showNotification({
|
|
1168
1141
|
message: t2("comboBox.createSuccessful", {
|
|
1169
1142
|
object: props.objectType,
|
|
1170
|
-
name:
|
|
1143
|
+
name: props.objectCreatedResponse?.name ?? ""
|
|
1171
1144
|
}),
|
|
1172
1145
|
colour: "primary",
|
|
1173
1146
|
duration: 1e4
|
|
1174
1147
|
});
|
|
1175
1148
|
let parentName = "";
|
|
1176
|
-
if (parentItem.value && parentItem.value.id ===
|
|
1149
|
+
if (parentItem.value && parentItem.value.id === props.objectCreatedResponse?.parentId) {
|
|
1177
1150
|
parentName = parentItem.value.name;
|
|
1178
1151
|
}
|
|
1179
1152
|
selectedItem.value = {
|
|
1180
|
-
id:
|
|
1181
|
-
name:
|
|
1182
|
-
parentId:
|
|
1153
|
+
id: props.objectCreatedResponse?.id ?? 0,
|
|
1154
|
+
name: props.objectCreatedResponse?.name ?? "",
|
|
1155
|
+
parentId: props.objectCreatedResponse?.parentId ?? 0,
|
|
1183
1156
|
parentName
|
|
1184
1157
|
};
|
|
1185
1158
|
}
|
|
@@ -1216,10 +1189,9 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
1216
1189
|
});
|
|
1217
1190
|
const inputRef = ref();
|
|
1218
1191
|
function handleEscapeKeyPress() {
|
|
1219
|
-
var _a;
|
|
1220
1192
|
toggleDropdown(false);
|
|
1221
1193
|
if (!props.openDropDownOnFocus) {
|
|
1222
|
-
|
|
1194
|
+
inputRef.value?.focus();
|
|
1223
1195
|
}
|
|
1224
1196
|
}
|
|
1225
1197
|
function focusInternal() {
|
|
@@ -1229,10 +1201,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
1229
1201
|
emit("focus");
|
|
1230
1202
|
}
|
|
1231
1203
|
__expose({
|
|
1232
|
-
focus: () =>
|
|
1233
|
-
var _a;
|
|
1234
|
-
return (_a = inputRef.value) == null ? void 0 : _a.focus();
|
|
1235
|
-
}
|
|
1204
|
+
focus: () => inputRef.value?.focus()
|
|
1236
1205
|
});
|
|
1237
1206
|
return (_ctx, _cache) => {
|
|
1238
1207
|
const _component_cl_ui_combo_box = resolveComponent("cl-ui-combo-box", true);
|
|
@@ -1258,13 +1227,13 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
1258
1227
|
onFocus: focusInternal,
|
|
1259
1228
|
onKeydown: _cache[2] || (_cache[2] = withKeys(($event) => toggleDropdown(true), ["enter"]))
|
|
1260
1229
|
}, {
|
|
1261
|
-
default: withCtx(() => _cache[8] || (_cache[8] = [
|
|
1230
|
+
default: withCtx(() => [..._cache[8] || (_cache[8] = [
|
|
1262
1231
|
createElementVNode("span", null, null, -1)
|
|
1263
|
-
])),
|
|
1232
|
+
])]),
|
|
1264
1233
|
_: 1
|
|
1265
1234
|
}, 8, ["id", "modelValue", "class", "placeholder", "disabled"])
|
|
1266
1235
|
]),
|
|
1267
|
-
withDirectives(createElementVNode("div", _hoisted_3$
|
|
1236
|
+
withDirectives(createElementVNode("div", _hoisted_3$q, [
|
|
1268
1237
|
createElementVNode("div", _hoisted_4$l, [
|
|
1269
1238
|
createTextVNode(toDisplayString(unref(t2)("comboBox.required")) + " ", 1),
|
|
1270
1239
|
createVNode(unref(Icon), {
|
|
@@ -1408,7 +1377,7 @@ const _hoisted_2$D = {
|
|
|
1408
1377
|
key: 0,
|
|
1409
1378
|
class: "cl:w-full"
|
|
1410
1379
|
};
|
|
1411
|
-
const _hoisted_3$
|
|
1380
|
+
const _hoisted_3$p = {
|
|
1412
1381
|
key: 1,
|
|
1413
1382
|
class: "cl:leading-10 cl:text-sm cl:w-full"
|
|
1414
1383
|
};
|
|
@@ -1419,7 +1388,7 @@ function _sfc_render$5(_ctx, _cache) {
|
|
|
1419
1388
|
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_2$D, [
|
|
1420
1389
|
renderSlot(_ctx.$slots, "default")
|
|
1421
1390
|
])) : createCommentVNode("", true),
|
|
1422
|
-
_ctx.$slots.left || _ctx.$slots.right ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
1391
|
+
_ctx.$slots.left || _ctx.$slots.right ? (openBlock(), createElementBlock("div", _hoisted_3$p, [
|
|
1423
1392
|
createElementVNode("span", _hoisted_4$k, [
|
|
1424
1393
|
renderSlot(_ctx.$slots, "left")
|
|
1425
1394
|
]),
|
|
@@ -1455,17 +1424,14 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
1455
1424
|
setup(__props) {
|
|
1456
1425
|
return (_ctx, _cache) => {
|
|
1457
1426
|
return openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.rows, (row) => {
|
|
1458
|
-
return openBlock(), createElementBlock("div", mergeProps({
|
|
1459
|
-
key: row,
|
|
1460
|
-
ref_for: true
|
|
1461
|
-
}, _ctx.$attrs, { class: "cl:flex cl:gap-1 cl:items-start" }), [
|
|
1427
|
+
return openBlock(), createElementBlock("div", mergeProps({ key: row }, { ref_for: true }, _ctx.$attrs, { class: "cl:flex cl:gap-1 cl:items-start" }), [
|
|
1462
1428
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.words, (word) => {
|
|
1463
1429
|
return openBlock(), createElementBlock("span", {
|
|
1464
1430
|
key: word,
|
|
1465
1431
|
class: "cl:rounded-full cl:w-16 skeleton-loader-background"
|
|
1466
1432
|
}, [
|
|
1467
1433
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1468
|
-
_cache[0] || (_cache[0] = createTextVNode(" "))
|
|
1434
|
+
_cache[0] || (_cache[0] = createTextVNode(" ", -1))
|
|
1469
1435
|
])
|
|
1470
1436
|
]);
|
|
1471
1437
|
}), 128))
|
|
@@ -1499,7 +1465,7 @@ const _hoisted_1$N = {
|
|
|
1499
1465
|
class: "cl:flex cl:gap-2 cl:justify-between cl:mb-2 cl:w-full"
|
|
1500
1466
|
};
|
|
1501
1467
|
const _hoisted_2$C = { key: 1 };
|
|
1502
|
-
const _hoisted_3$
|
|
1468
|
+
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
1469
|
const _hoisted_4$j = { class: "cl:basis-full cl:col-span-2 cl:grow cl:lg:basis-0" };
|
|
1504
1470
|
const _hoisted_5$c = {
|
|
1505
1471
|
key: 2,
|
|
@@ -1540,7 +1506,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
1540
1506
|
}, [
|
|
1541
1507
|
createElementVNode("strong", null, toDisplayString(unref(t2)("grid.gridTools")), 1)
|
|
1542
1508
|
], 2),
|
|
1543
|
-
createElementVNode("div", _hoisted_3$
|
|
1509
|
+
createElementVNode("div", _hoisted_3$o, [
|
|
1544
1510
|
createElementVNode("div", _hoisted_4$j, [
|
|
1545
1511
|
renderSlot(_ctx.$slots, "additional-grid-actions", normalizeProps(guardReactiveProps({
|
|
1546
1512
|
loading: _ctx.loading,
|
|
@@ -1606,6 +1572,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
1606
1572
|
unref(anyFilterableColumns)(_ctx.columns) ? (openBlock(), createBlock(_sfc_main$1b, {
|
|
1607
1573
|
key: 0,
|
|
1608
1574
|
id: `${unref(gridId)}-clear-filters`,
|
|
1575
|
+
"clear-filters-button": "",
|
|
1609
1576
|
size: "small",
|
|
1610
1577
|
colour: "danger",
|
|
1611
1578
|
disabled: !hasFilters.value || _ctx.loading,
|
|
@@ -1647,14 +1614,8 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
1647
1614
|
const emit = __emit;
|
|
1648
1615
|
const inputRef = ref();
|
|
1649
1616
|
__expose({
|
|
1650
|
-
focus: () =>
|
|
1651
|
-
|
|
1652
|
-
return (_a = inputRef.value) == null ? void 0 : _a.focus();
|
|
1653
|
-
},
|
|
1654
|
-
blur: () => {
|
|
1655
|
-
var _a;
|
|
1656
|
-
return (_a = inputRef.value) == null ? void 0 : _a.blur();
|
|
1657
|
-
}
|
|
1617
|
+
focus: () => inputRef.value?.focus(),
|
|
1618
|
+
blur: () => inputRef.value?.blur()
|
|
1658
1619
|
});
|
|
1659
1620
|
return (_ctx, _cache) => {
|
|
1660
1621
|
return openBlock(), createBlock(_sfc_main$19, {
|
|
@@ -1767,6 +1728,7 @@ const messages = {
|
|
|
1767
1728
|
greaterthan: "Greater than",
|
|
1768
1729
|
equalorlessthan: "Less than or equal to",
|
|
1769
1730
|
equalorgreaterthan: "Greater than or equal to",
|
|
1731
|
+
orequal: "One of",
|
|
1770
1732
|
availableMethods: "Available filter methods",
|
|
1771
1733
|
true: "True",
|
|
1772
1734
|
false: "False",
|
|
@@ -1776,6 +1738,8 @@ const messages = {
|
|
|
1776
1738
|
after: "After",
|
|
1777
1739
|
onOrBefore: "On or before",
|
|
1778
1740
|
onOrAfter: "On or after",
|
|
1741
|
+
selectAll: "Select all",
|
|
1742
|
+
allEntriesSelected: "All entries selected",
|
|
1779
1743
|
page: "Page",
|
|
1780
1744
|
pageSize: "Page Size",
|
|
1781
1745
|
totalRecords: "Total Records",
|
|
@@ -2068,11 +2032,10 @@ function getPartsForValue(intlFormat, value, ...types) {
|
|
|
2068
2032
|
return intlFormat.formatToParts(value).filter((part) => types.includes(part.type)).map((part) => part.value);
|
|
2069
2033
|
}
|
|
2070
2034
|
function callNumberFormatterImpl(value, options) {
|
|
2071
|
-
var _a;
|
|
2072
2035
|
if (isNaN(value)) {
|
|
2073
2036
|
return "";
|
|
2074
2037
|
} else {
|
|
2075
|
-
return
|
|
2038
|
+
return newNumberFormatImpl(options)?.format(value) ?? null;
|
|
2076
2039
|
}
|
|
2077
2040
|
}
|
|
2078
2041
|
function newNumberFormatImpl(options) {
|
|
@@ -2084,9 +2047,9 @@ function newNumberFormatImpl(options) {
|
|
|
2084
2047
|
}
|
|
2085
2048
|
}
|
|
2086
2049
|
function buildFormatOptions(format, options) {
|
|
2087
|
-
const normalisedLocale = toValue(options
|
|
2050
|
+
const normalisedLocale = toValue(options?.locale) || unref(locale);
|
|
2088
2051
|
const i18nFormat = getNumberFormat(normalisedLocale);
|
|
2089
|
-
const additionalOptions = copy(toValue(options
|
|
2052
|
+
const additionalOptions = copy(toValue(options?.additionalOptions) ?? {});
|
|
2090
2053
|
let style = "decimal";
|
|
2091
2054
|
switch (format) {
|
|
2092
2055
|
case NumberFormat.PERCENTAGE:
|
|
@@ -2140,7 +2103,7 @@ function CitrusLimeUI() {
|
|
|
2140
2103
|
}
|
|
2141
2104
|
const { t } = i18n.global;
|
|
2142
2105
|
function validateMinValue(minimumValue, typeOfValue, valueName, actualValue, timeZone) {
|
|
2143
|
-
return new Promise((resolve) => {
|
|
2106
|
+
return new Promise(((resolve) => {
|
|
2144
2107
|
let validatedState = {
|
|
2145
2108
|
valid: false,
|
|
2146
2109
|
message: ""
|
|
@@ -2156,7 +2119,7 @@ function validateMinValue(minimumValue, typeOfValue, valueName, actualValue, tim
|
|
|
2156
2119
|
case "tel":
|
|
2157
2120
|
case "text":
|
|
2158
2121
|
case "url":
|
|
2159
|
-
isValid = (
|
|
2122
|
+
isValid = (actualValue?.length ?? 0) >= (Number(minimumValue) || 0);
|
|
2160
2123
|
validatedState = getValidatedInputState(isValid, t("input.greaterOrEqualToCharacters", {
|
|
2161
2124
|
label: valueName,
|
|
2162
2125
|
min: minimumValue.toString()
|
|
@@ -2215,10 +2178,10 @@ function validateMinValue(minimumValue, typeOfValue, valueName, actualValue, tim
|
|
|
2215
2178
|
}
|
|
2216
2179
|
}
|
|
2217
2180
|
resolve(validatedState);
|
|
2218
|
-
});
|
|
2181
|
+
}));
|
|
2219
2182
|
}
|
|
2220
2183
|
function validateMaxValue(maximumValue, typeOfValue, valueName, actualValue, timeZone) {
|
|
2221
|
-
return new Promise((resolve) => {
|
|
2184
|
+
return new Promise(((resolve) => {
|
|
2222
2185
|
let validatedState = {
|
|
2223
2186
|
valid: false,
|
|
2224
2187
|
message: ""
|
|
@@ -2234,7 +2197,7 @@ function validateMaxValue(maximumValue, typeOfValue, valueName, actualValue, tim
|
|
|
2234
2197
|
case "tel":
|
|
2235
2198
|
case "text":
|
|
2236
2199
|
case "url":
|
|
2237
|
-
isValid = (
|
|
2200
|
+
isValid = (actualValue?.length ?? 0) <= (Number(maximumValue) || 0);
|
|
2238
2201
|
validatedState = getValidatedInputState(isValid, t("input.lessOrEqualToCharacters", {
|
|
2239
2202
|
label: valueName,
|
|
2240
2203
|
max: maximumValue.toString()
|
|
@@ -2290,22 +2253,22 @@ function validateMaxValue(maximumValue, typeOfValue, valueName, actualValue, tim
|
|
|
2290
2253
|
}
|
|
2291
2254
|
}
|
|
2292
2255
|
resolve(validatedState);
|
|
2293
|
-
});
|
|
2256
|
+
}));
|
|
2294
2257
|
}
|
|
2295
2258
|
function validateRequired(valueName, value) {
|
|
2296
|
-
return new Promise((resolve) => {
|
|
2259
|
+
return new Promise(((resolve) => {
|
|
2297
2260
|
const isValid = value !== void 0 && value !== null && value !== "" && value.toString().trim() !== "";
|
|
2298
2261
|
const validatedState = getValidatedInputState(isValid, t("input.valueIsRequired", { label: valueName }));
|
|
2299
2262
|
resolve(validatedState);
|
|
2300
|
-
});
|
|
2263
|
+
}));
|
|
2301
2264
|
}
|
|
2302
2265
|
function validateEmail(valueName, value) {
|
|
2303
|
-
return new Promise((resolve) => {
|
|
2266
|
+
return new Promise(((resolve) => {
|
|
2304
2267
|
const regex = /[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/;
|
|
2305
2268
|
const isValid = value === "" || regex.exec(value) !== null;
|
|
2306
2269
|
const validatedState = getValidatedInputState(isValid, t("input.valueNotValidEmail", { label: valueName }));
|
|
2307
2270
|
resolve(validatedState);
|
|
2308
|
-
});
|
|
2271
|
+
}));
|
|
2309
2272
|
}
|
|
2310
2273
|
function getValidatedInputState(validationCheck, message) {
|
|
2311
2274
|
const validation = {
|
|
@@ -2322,7 +2285,7 @@ const _hoisted_2$A = {
|
|
|
2322
2285
|
key: 4,
|
|
2323
2286
|
class: "cl:inline-block cl:whitespace-nowrap"
|
|
2324
2287
|
};
|
|
2325
|
-
const _hoisted_3$
|
|
2288
|
+
const _hoisted_3$n = {
|
|
2326
2289
|
key: 5,
|
|
2327
2290
|
class: "cl:inline-block cl:whitespace-nowrap"
|
|
2328
2291
|
};
|
|
@@ -2348,11 +2311,11 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
2348
2311
|
let date;
|
|
2349
2312
|
if (props.timeZone) {
|
|
2350
2313
|
date = DateTime.fromISO(value, {
|
|
2351
|
-
locale:
|
|
2314
|
+
locale: dateFormatLocaleOverride?.value ?? locale2.value
|
|
2352
2315
|
}).setZone(props.timeZone);
|
|
2353
2316
|
} else {
|
|
2354
2317
|
date = DateTime.fromISO(value, {
|
|
2355
|
-
locale:
|
|
2318
|
+
locale: dateFormatLocaleOverride?.value ?? locale2.value,
|
|
2356
2319
|
zone: "UTC"
|
|
2357
2320
|
});
|
|
2358
2321
|
}
|
|
@@ -2416,7 +2379,6 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
2416
2379
|
}
|
|
2417
2380
|
}
|
|
2418
2381
|
return (_ctx, _cache) => {
|
|
2419
|
-
var _a;
|
|
2420
2382
|
return _ctx.column.type === "slot" ? renderSlot(_ctx.$slots, _ctx.column.name, {
|
|
2421
2383
|
key: 0,
|
|
2422
2384
|
formattedStringContent: formatString()
|
|
@@ -2433,7 +2395,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
2433
2395
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
2434
2396
|
createTextVNode(toDisplayString(formatDate(_ctx.data[_ctx.column.field], unref(DateFormat).DATETIME)), 1)
|
|
2435
2397
|
], 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)(
|
|
2398
|
+
], 64)) : _ctx.column.type === "list" && _ctx.column.field !== void 0 && _ctx.column.listEntries !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_1$L, toDisplayString(unref(t2)(_ctx.column.listEntries.find((entry) => entry.value === _ctx.data[_ctx.column.field])?.translationKey ?? "")), 1)) : _ctx.column.type === "number" && _ctx.column.field !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_2$A, toDisplayString(formatNumberToString(_ctx.data[_ctx.column.field], unref(locale2))), 1)) : _ctx.column.field !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_3$n, [
|
|
2437
2399
|
createElementVNode("span", {
|
|
2438
2400
|
title: showUntruncatedStringValue.value ? _ctx.data[_ctx.column.field] : void 0,
|
|
2439
2401
|
innerHTML: formatString()
|
|
@@ -2460,13 +2422,10 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
2460
2422
|
const { t: t2 } = useI18n();
|
|
2461
2423
|
const currentRecord = ref(copy(props.data));
|
|
2462
2424
|
const edited = computed(() => props.column.field !== void 0 && currentRecord.value[props.column.field] !== props.data[props.column.field]);
|
|
2463
|
-
const listEntries = computed(() => {
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
name: t2(entry.translationKey)
|
|
2468
|
-
}))) ?? [];
|
|
2469
|
-
});
|
|
2425
|
+
const listEntries = computed(() => props.column.listEntries?.map((entry, id) => ({
|
|
2426
|
+
id,
|
|
2427
|
+
name: t2(entry.translationKey)
|
|
2428
|
+
})) ?? []);
|
|
2470
2429
|
watchEffect(() => currentRecord.value = copy(props.data));
|
|
2471
2430
|
watch(currentRecord, (newValue) => {
|
|
2472
2431
|
const property = props.column.field ?? "";
|
|
@@ -2609,7 +2568,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
2609
2568
|
});
|
|
2610
2569
|
const _hoisted_1$K = ["colspan"];
|
|
2611
2570
|
const _hoisted_2$z = ["colspan"];
|
|
2612
|
-
const _hoisted_3$
|
|
2571
|
+
const _hoisted_3$m = { key: 2 };
|
|
2613
2572
|
const _hoisted_4$h = ["colspan"];
|
|
2614
2573
|
const _hoisted_5$b = { class: "cl:flex cl:flex-wrap cl:justify-center cl:text-center cl:text-sm cl:w-full" };
|
|
2615
2574
|
const _hoisted_6$9 = { key: 0 };
|
|
@@ -2676,22 +2635,19 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
2676
2635
|
}
|
|
2677
2636
|
}
|
|
2678
2637
|
const clickCounters = ref({});
|
|
2679
|
-
watch(() => props.data, () =>
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
}
|
|
2693
|
-
])) ?? []);
|
|
2694
|
-
}, {
|
|
2638
|
+
watch(() => props.data, () => clickCounters.value = Object.fromEntries(props.data?.results?.map((_, i) => [
|
|
2639
|
+
[i],
|
|
2640
|
+
{
|
|
2641
|
+
count: 0,
|
|
2642
|
+
target: null,
|
|
2643
|
+
reset: useTimeoutFn(() => {
|
|
2644
|
+
if (clickCounters.value[i]) {
|
|
2645
|
+
clickCounters.value[i].count = 0;
|
|
2646
|
+
clickCounters.value[i].target = null;
|
|
2647
|
+
}
|
|
2648
|
+
}, 400, { immediate: false })
|
|
2649
|
+
}
|
|
2650
|
+
]) ?? []), {
|
|
2695
2651
|
deep: true,
|
|
2696
2652
|
immediate: true
|
|
2697
2653
|
});
|
|
@@ -2713,10 +2669,9 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
2713
2669
|
}
|
|
2714
2670
|
}
|
|
2715
2671
|
function handleRowSelect(rowIndex, row, event) {
|
|
2716
|
-
var _a;
|
|
2717
2672
|
const { target } = event;
|
|
2718
2673
|
if (target && target instanceof HTMLElement) {
|
|
2719
|
-
const rowspan =
|
|
2674
|
+
const rowspan = target.closest("td")?.getAttribute("rowspan");
|
|
2720
2675
|
if (rowspan && parseInt(rowspan) > 1) {
|
|
2721
2676
|
return;
|
|
2722
2677
|
}
|
|
@@ -2731,15 +2686,13 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
2731
2686
|
selectedRowIndex.value = void 0;
|
|
2732
2687
|
}
|
|
2733
2688
|
function displayBorderForEndOfGroup(data, index2) {
|
|
2734
|
-
|
|
2735
|
-
const grouping = (_a = props.options) == null ? void 0 : _a.groupByField;
|
|
2689
|
+
const grouping = props.options?.groupByField;
|
|
2736
2690
|
const currentRow = data.results[index2];
|
|
2737
2691
|
const nextRow = data.results[index2 + 1];
|
|
2738
2692
|
return !!grouping && index2 < data.results.length - 1 && currentRow[grouping] !== nextRow[grouping];
|
|
2739
2693
|
}
|
|
2740
2694
|
function getGroupGridAreaSpan(data, index2) {
|
|
2741
|
-
|
|
2742
|
-
const grouping = (_a = props.options) == null ? void 0 : _a.groupByField;
|
|
2695
|
+
const grouping = props.options?.groupByField;
|
|
2743
2696
|
if (grouping) {
|
|
2744
2697
|
const previousRow = data.results[index2 - 1];
|
|
2745
2698
|
const currentRow = data.results[index2];
|
|
@@ -2760,13 +2713,11 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
2760
2713
|
watch(() => props.options.rowSelectionEnabled, clearSelectedRow);
|
|
2761
2714
|
watch(() => props.request, clearSelectedRow);
|
|
2762
2715
|
watch(selectedRowIndex, () => {
|
|
2763
|
-
|
|
2764
|
-
if (selectedRowIndex.value !== void 0 && ((_a = props.data) == null ? void 0 : _a.results[selectedRowIndex.value])) {
|
|
2716
|
+
if (selectedRowIndex.value !== void 0 && props.data?.results[selectedRowIndex.value]) {
|
|
2765
2717
|
emit("row-select", props.data.results[selectedRowIndex.value]);
|
|
2766
2718
|
}
|
|
2767
2719
|
});
|
|
2768
2720
|
return (_ctx, _cache) => {
|
|
2769
|
-
var _a;
|
|
2770
2721
|
return openBlock(), createElementBlock("tbody", null, [
|
|
2771
2722
|
_ctx.initialLoad ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.request.pageSize, (row) => {
|
|
2772
2723
|
return openBlock(), createElementBlock("tr", { key: row }, [
|
|
@@ -2781,9 +2732,8 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
2781
2732
|
}, " ", 10, _hoisted_1$K)
|
|
2782
2733
|
]);
|
|
2783
2734
|
}), 128)) : createCommentVNode("", true),
|
|
2784
|
-
_ctx.data &&
|
|
2735
|
+
_ctx.data && _ctx.data.results?.length && !_ctx.initialLoad ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
2785
2736
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.data.results, (row, index2) => {
|
|
2786
|
-
var _a2;
|
|
2787
2737
|
return openBlock(), createBlock(_sfc_main$W, {
|
|
2788
2738
|
key: index2,
|
|
2789
2739
|
data: row,
|
|
@@ -2801,7 +2751,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
2801
2751
|
"cl:border-b-2 cl:border-solid cl:border-primary-dark": displayBorderForEndOfGroup(_ctx.data, index2)
|
|
2802
2752
|
}]),
|
|
2803
2753
|
"row-index": index2,
|
|
2804
|
-
"group-by":
|
|
2754
|
+
"group-by": _ctx.options?.groupByField ?? "",
|
|
2805
2755
|
"group-grid-area-span": getGroupGridAreaSpan(_ctx.data, index2),
|
|
2806
2756
|
onClick: ($event) => {
|
|
2807
2757
|
_ctx.editMode ? () => {
|
|
@@ -2838,7 +2788,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
2838
2788
|
}, " ", 8, _hoisted_2$z)
|
|
2839
2789
|
], 2);
|
|
2840
2790
|
}), 128)) : createCommentVNode("", true)
|
|
2841
|
-
], 64)) : !_ctx.loading ? (openBlock(), createElementBlock("tr", _hoisted_3$
|
|
2791
|
+
], 64)) : !_ctx.loading ? (openBlock(), createElementBlock("tr", _hoisted_3$m, [
|
|
2842
2792
|
createElementVNode("td", {
|
|
2843
2793
|
colspan: _ctx.columns.length
|
|
2844
2794
|
}, [
|
|
@@ -2868,7 +2818,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
2868
2818
|
});
|
|
2869
2819
|
const _hoisted_1$J = ["value", "inputmode", "disabled", "placeholder"];
|
|
2870
2820
|
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$
|
|
2821
|
+
const _hoisted_3$l = ["disabled"];
|
|
2872
2822
|
const _hoisted_4$g = ["disabled"];
|
|
2873
2823
|
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
2874
2824
|
...{
|
|
@@ -2911,8 +2861,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
2911
2861
|
stagingValueChanged.value = false;
|
|
2912
2862
|
if (selectInputValueTriggered.value || props.selectOnFocus || modelValue.value === 0) {
|
|
2913
2863
|
setTimeout(() => {
|
|
2914
|
-
|
|
2915
|
-
(_b = inputRef.value) == null ? void 0 : _b.setSelectionRange(0, ((_a = stagingValue.value) == null ? void 0 : _a.length) ?? 0);
|
|
2864
|
+
inputRef.value?.setSelectionRange(0, stagingValue.value?.length ?? 0);
|
|
2916
2865
|
});
|
|
2917
2866
|
}
|
|
2918
2867
|
selectInputValueTriggered.value = false;
|
|
@@ -3000,19 +2949,12 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
3000
2949
|
}
|
|
3001
2950
|
const selectInputValueTriggered = ref(false);
|
|
3002
2951
|
function selectInputValue() {
|
|
3003
|
-
var _a;
|
|
3004
2952
|
selectInputValueTriggered.value = true;
|
|
3005
|
-
|
|
2953
|
+
inputRef.value?.focus();
|
|
3006
2954
|
}
|
|
3007
2955
|
__expose({
|
|
3008
|
-
focus: () =>
|
|
3009
|
-
|
|
3010
|
-
return (_a = inputRef.value) == null ? void 0 : _a.focus();
|
|
3011
|
-
},
|
|
3012
|
-
blur: () => {
|
|
3013
|
-
var _a;
|
|
3014
|
-
return (_a = inputRef.value) == null ? void 0 : _a.blur();
|
|
3015
|
-
},
|
|
2956
|
+
focus: () => inputRef.value?.focus(),
|
|
2957
|
+
blur: () => inputRef.value?.blur(),
|
|
3016
2958
|
select: () => selectInputValue()
|
|
3017
2959
|
});
|
|
3018
2960
|
return (_ctx, _cache) => {
|
|
@@ -3058,7 +3000,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
3058
3000
|
]
|
|
3059
3001
|
}, [
|
|
3060
3002
|
createVNode(_component_icon, { icon: "ph:caret-up-bold" })
|
|
3061
|
-
], 40, _hoisted_3$
|
|
3003
|
+
], 40, _hoisted_3$l),
|
|
3062
3004
|
createElementVNode("button", {
|
|
3063
3005
|
class: "cl:bg-secondary-light/30 cl:border cl:border-grey-3 cl:hover:bg-secondary-light/20 cl:px-1 cl:rounded",
|
|
3064
3006
|
disabled: _ctx.disabled,
|
|
@@ -3100,7 +3042,7 @@ const _hoisted_1$I = {
|
|
|
3100
3042
|
class: "cl:flex cl:flex-col cl:lg:flex-row cl:lg:gap-2"
|
|
3101
3043
|
};
|
|
3102
3044
|
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$
|
|
3045
|
+
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
3046
|
const _hoisted_4$f = ["inert"];
|
|
3105
3047
|
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
3048
|
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" };
|
|
@@ -3140,10 +3082,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3140
3082
|
const props = __props;
|
|
3141
3083
|
const emit = __emit;
|
|
3142
3084
|
const { t: t2 } = useI18n();
|
|
3143
|
-
const totalPages = computed(() =>
|
|
3144
|
-
var _a;
|
|
3145
|
-
return props.data !== null ? Math.ceil((((_a = props.data) == null ? void 0 : _a.totalRecords) ?? 0) / props.request.pageSize) : 1;
|
|
3146
|
-
});
|
|
3085
|
+
const totalPages = computed(() => props.data !== null ? Math.ceil((props.data?.totalRecords ?? 0) / props.request.pageSize) : 1);
|
|
3147
3086
|
const pageNumbers = computed(() => {
|
|
3148
3087
|
const calculatedPageNumbers = Array.from(Array(totalPages.value + 1).keys());
|
|
3149
3088
|
let results = [];
|
|
@@ -3158,7 +3097,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3158
3097
|
function setPage(pageNumber) {
|
|
3159
3098
|
if (props.showUnsavedChangesWarning === false || window.confirm(t2("grid.unsavedChangesWarningMessage"))) {
|
|
3160
3099
|
const filterRequest = copy(props.request);
|
|
3161
|
-
pageNumber
|
|
3100
|
+
pageNumber ??= 1;
|
|
3162
3101
|
if (filterRequest.pageNumber !== pageNumber) {
|
|
3163
3102
|
filterRequest.pageNumber = Math.max(Math.min(Math.trunc(pageNumber), totalPages.value), 1);
|
|
3164
3103
|
emit("update:request", filterRequest);
|
|
@@ -3182,7 +3121,6 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3182
3121
|
}
|
|
3183
3122
|
}
|
|
3184
3123
|
return (_ctx, _cache) => {
|
|
3185
|
-
var _a, _b, _c;
|
|
3186
3124
|
return _ctx.initialLoad ? (openBlock(), createElementBlock("div", _hoisted_1$I, [
|
|
3187
3125
|
createElementVNode("div", _hoisted_2$x, [
|
|
3188
3126
|
createVNode(unref(_sfc_main$$), { words: 3 }),
|
|
@@ -3191,10 +3129,10 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3191
3129
|
words: 2
|
|
3192
3130
|
})
|
|
3193
3131
|
]),
|
|
3194
|
-
createElementVNode("div", _hoisted_3$
|
|
3132
|
+
createElementVNode("div", _hoisted_3$k, [
|
|
3195
3133
|
createVNode(unref(clUiSkeletonInput), { class: "cl:w-64" })
|
|
3196
3134
|
])
|
|
3197
|
-
])) : _ctx.loading ||
|
|
3135
|
+
])) : _ctx.loading || _ctx.data?.results?.length && _ctx.request ? (openBlock(), createElementBlock("div", {
|
|
3198
3136
|
key: 1,
|
|
3199
3137
|
class: normalizeClass(["cl:flex cl:flex-wrap cl:lg:gap-2", {
|
|
3200
3138
|
"cl:opacity-40": _ctx.loading
|
|
@@ -3210,7 +3148,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3210
3148
|
]),
|
|
3211
3149
|
createElementVNode("div", _hoisted_10$3, [
|
|
3212
3150
|
createElementVNode("span", _hoisted_11$3, toDisplayString(unref(t2)("grid.totalRecords")), 1),
|
|
3213
|
-
createElementVNode("span", null, toDisplayString(unref(formatNumberAsInteger)(
|
|
3151
|
+
createElementVNode("span", null, toDisplayString(unref(formatNumberAsInteger)(_ctx.data?.totalRecords ?? 0)), 1)
|
|
3214
3152
|
]),
|
|
3215
3153
|
_ctx.options.hidePageSizeOptions === false ? (openBlock(), createElementBlock("div", _hoisted_12$1, [
|
|
3216
3154
|
createElementVNode("span", _hoisted_13$1, toDisplayString(unref(t2)("grid.pageSize")), 1),
|
|
@@ -3308,9 +3246,9 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3308
3246
|
autocomplete: "off",
|
|
3309
3247
|
"onUpdate:modelValue": setPage
|
|
3310
3248
|
}, {
|
|
3311
|
-
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
3249
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
3312
3250
|
createElementVNode("span", null, null, -1)
|
|
3313
|
-
])),
|
|
3251
|
+
])]),
|
|
3314
3252
|
_: 1
|
|
3315
3253
|
}, 8, ["model-value", "max", "disabled"])
|
|
3316
3254
|
])
|
|
@@ -3319,6 +3257,94 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3319
3257
|
};
|
|
3320
3258
|
}
|
|
3321
3259
|
});
|
|
3260
|
+
const gridColumnTypes = [
|
|
3261
|
+
"string",
|
|
3262
|
+
"boolean",
|
|
3263
|
+
"number",
|
|
3264
|
+
"date",
|
|
3265
|
+
"datetime",
|
|
3266
|
+
"dateRange",
|
|
3267
|
+
"list",
|
|
3268
|
+
"slot"
|
|
3269
|
+
];
|
|
3270
|
+
function isGridColumn(objectToTest) {
|
|
3271
|
+
return typeof objectToTest.caption === "string" && typeof objectToTest.name === "string" && typeof objectToTest.type === "string";
|
|
3272
|
+
}
|
|
3273
|
+
function isGridColumnArray(arrayToTest) {
|
|
3274
|
+
let arrayIsValid = Array.isArray(arrayToTest);
|
|
3275
|
+
if (arrayIsValid) {
|
|
3276
|
+
for (const objectToTest of arrayToTest) {
|
|
3277
|
+
if (!isGridColumn(objectToTest)) {
|
|
3278
|
+
arrayIsValid = false;
|
|
3279
|
+
break;
|
|
3280
|
+
}
|
|
3281
|
+
}
|
|
3282
|
+
}
|
|
3283
|
+
return arrayIsValid;
|
|
3284
|
+
}
|
|
3285
|
+
const stringFormats = [
|
|
3286
|
+
"ellipsis",
|
|
3287
|
+
"wrap-text"
|
|
3288
|
+
];
|
|
3289
|
+
var FilterOperation = /* @__PURE__ */ ((FilterOperation2) => {
|
|
3290
|
+
FilterOperation2[FilterOperation2["CONTAINS"] = 0] = "CONTAINS";
|
|
3291
|
+
FilterOperation2[FilterOperation2["NOT_CONTAINS"] = 1] = "NOT_CONTAINS";
|
|
3292
|
+
FilterOperation2[FilterOperation2["EQUAL"] = 2] = "EQUAL";
|
|
3293
|
+
FilterOperation2[FilterOperation2["NOT_EQUAL"] = 3] = "NOT_EQUAL";
|
|
3294
|
+
FilterOperation2[FilterOperation2["STARTS_WITH"] = 4] = "STARTS_WITH";
|
|
3295
|
+
FilterOperation2[FilterOperation2["ENDS_WITH"] = 5] = "ENDS_WITH";
|
|
3296
|
+
FilterOperation2[FilterOperation2["GREATER_THAN"] = 6] = "GREATER_THAN";
|
|
3297
|
+
FilterOperation2[FilterOperation2["LESS_THAN"] = 7] = "LESS_THAN";
|
|
3298
|
+
FilterOperation2[FilterOperation2["EQUAL_OR_GREATER_THAN"] = 8] = "EQUAL_OR_GREATER_THAN";
|
|
3299
|
+
FilterOperation2[FilterOperation2["EQUAL_OR_LESS_THAN"] = 9] = "EQUAL_OR_LESS_THAN";
|
|
3300
|
+
FilterOperation2[FilterOperation2["AND_CONTAINS"] = 10] = "AND_CONTAINS";
|
|
3301
|
+
FilterOperation2[FilterOperation2["OR_EQUAL"] = 11] = "OR_EQUAL";
|
|
3302
|
+
return FilterOperation2;
|
|
3303
|
+
})(FilterOperation || {});
|
|
3304
|
+
const filterMethodTypes = [
|
|
3305
|
+
"equal",
|
|
3306
|
+
"notequal",
|
|
3307
|
+
"contains",
|
|
3308
|
+
"notcontains",
|
|
3309
|
+
"lessthan",
|
|
3310
|
+
"greaterthan",
|
|
3311
|
+
"startswith",
|
|
3312
|
+
"endswith",
|
|
3313
|
+
"equalorlessthan",
|
|
3314
|
+
"equalorgreaterthan",
|
|
3315
|
+
"andcontains",
|
|
3316
|
+
"orequal"
|
|
3317
|
+
];
|
|
3318
|
+
function isFilterArgs(objectToTest) {
|
|
3319
|
+
return typeof objectToTest.filterOnColumn === "string" && typeof objectToTest.filterOperation === "number" && typeof objectToTest.filterValue === "string";
|
|
3320
|
+
}
|
|
3321
|
+
function isSortArgs(objectToTest) {
|
|
3322
|
+
return objectToTest === null || typeof objectToTest.sortByAscending === "boolean" && typeof objectToTest.sortOnColumn === "string";
|
|
3323
|
+
}
|
|
3324
|
+
function isFilterRequest(objectToTest) {
|
|
3325
|
+
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);
|
|
3326
|
+
if (objectValid) {
|
|
3327
|
+
for (const filterArgs of objectToTest.filters) {
|
|
3328
|
+
if (!isFilterArgs(filterArgs)) {
|
|
3329
|
+
objectValid = false;
|
|
3330
|
+
break;
|
|
3331
|
+
}
|
|
3332
|
+
}
|
|
3333
|
+
}
|
|
3334
|
+
return objectValid;
|
|
3335
|
+
}
|
|
3336
|
+
function isFilterResponse(objectToTest, resultValidator) {
|
|
3337
|
+
let objectValid = typeof objectToTest.results === "object" && Array.isArray(objectToTest.results) && typeof objectToTest.totalRecords === "number";
|
|
3338
|
+
if (objectValid) {
|
|
3339
|
+
for (const result of objectToTest.results) {
|
|
3340
|
+
if (!resultValidator(result)) {
|
|
3341
|
+
objectValid = false;
|
|
3342
|
+
break;
|
|
3343
|
+
}
|
|
3344
|
+
}
|
|
3345
|
+
}
|
|
3346
|
+
return objectValid;
|
|
3347
|
+
}
|
|
3322
3348
|
function convertDateToIsoString(dateToConvert, forcedTimeOfDay, includeOffset, selectedTimeZone) {
|
|
3323
3349
|
const internalTimeZone = selectedTimeZone ?? "UTC";
|
|
3324
3350
|
let returnValueDate = DateTime.fromJSDate(dateToConvert, { zone: internalTimeZone }).setZone(internalTimeZone);
|
|
@@ -3329,7 +3355,7 @@ function convertDateToIsoString(dateToConvert, forcedTimeOfDay, includeOffset, s
|
|
|
3329
3355
|
}
|
|
3330
3356
|
let returnValue = returnValueDate.toISO({ includeOffset });
|
|
3331
3357
|
if (selectedTimeZone === null) {
|
|
3332
|
-
returnValue =
|
|
3358
|
+
returnValue = returnValue?.replace("Z", "") ?? null;
|
|
3333
3359
|
}
|
|
3334
3360
|
return returnValue;
|
|
3335
3361
|
}
|
|
@@ -3495,12 +3521,11 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
3495
3521
|
return (_ctx, _cache) => {
|
|
3496
3522
|
return openBlock(), createElementBlock("div", _hoisted_1$H, [
|
|
3497
3523
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dates, (date, index2) => {
|
|
3498
|
-
var _a, _b;
|
|
3499
3524
|
return openBlock(), createElementBlock("button", {
|
|
3500
3525
|
key: index2,
|
|
3501
3526
|
class: normalizeClass(["cl:border cl:cursor-pointer cl:py-1 cl:rounded-md cl:text-center", {
|
|
3502
|
-
"cl:bg-primary-lighter/30 cl:border-primary-default cl:font-bold cl:hover:border-primary-darker":
|
|
3503
|
-
"cl:border-grey-2 cl:hover:border-grey-3 cl:hover:opacity-95 cl:opacity-60":
|
|
3527
|
+
"cl:bg-primary-lighter/30 cl:border-primary-default cl:font-bold cl:hover:border-primary-darker": _ctx.selectedQuickDate?.name === date.name,
|
|
3528
|
+
"cl:border-grey-2 cl:hover:border-grey-3 cl:hover:opacity-95 cl:opacity-60": _ctx.selectedQuickDate?.name !== date.name
|
|
3504
3529
|
}]),
|
|
3505
3530
|
onClick: ($event) => emit("quick-date-selected", date)
|
|
3506
3531
|
}, [
|
|
@@ -3740,14 +3765,8 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
3740
3765
|
}
|
|
3741
3766
|
}
|
|
3742
3767
|
__expose({
|
|
3743
|
-
focus: () =>
|
|
3744
|
-
|
|
3745
|
-
return (_a = inputRef.value) == null ? void 0 : _a.focus();
|
|
3746
|
-
},
|
|
3747
|
-
blur: () => {
|
|
3748
|
-
var _a;
|
|
3749
|
-
return (_a = inputRef.value) == null ? void 0 : _a.blur();
|
|
3750
|
-
}
|
|
3768
|
+
focus: () => inputRef.value?.focus(),
|
|
3769
|
+
blur: () => inputRef.value?.blur()
|
|
3751
3770
|
});
|
|
3752
3771
|
return (_ctx, _cache) => {
|
|
3753
3772
|
return openBlock(), createBlock(_sfc_main$19, {
|
|
@@ -3794,7 +3813,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
3794
3813
|
});
|
|
3795
3814
|
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
3815
|
const _hoisted_2$u = ["disabled"];
|
|
3797
|
-
const _hoisted_3$
|
|
3816
|
+
const _hoisted_3$j = { class: "cl:max-w-max" };
|
|
3798
3817
|
const _hoisted_4$e = { class: "cl:flex cl:flex-col cl:gap-1 cl:w-full" };
|
|
3799
3818
|
const _hoisted_5$9 = ["min", "disabled", "required", "step", "max"];
|
|
3800
3819
|
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" };
|
|
@@ -3834,19 +3853,12 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
3834
3853
|
const showRegularInput = ref(false);
|
|
3835
3854
|
const displayValue = useThrottle(value, 50);
|
|
3836
3855
|
function setValueAndFocus(newValue) {
|
|
3837
|
-
var _a;
|
|
3838
3856
|
value.value = newValue;
|
|
3839
|
-
|
|
3857
|
+
sliderRef.value?.focus();
|
|
3840
3858
|
}
|
|
3841
3859
|
__expose({
|
|
3842
|
-
focus: () =>
|
|
3843
|
-
|
|
3844
|
-
return ((_a = sliderRef.value) == null ? void 0 : _a.focus()) || ((_b = inputRef.value) == null ? void 0 : _b.focus());
|
|
3845
|
-
},
|
|
3846
|
-
blur: () => {
|
|
3847
|
-
var _a, _b;
|
|
3848
|
-
return ((_a = sliderRef.value) == null ? void 0 : _a.blur()) || ((_b = inputRef.value) == null ? void 0 : _b.blur());
|
|
3849
|
-
}
|
|
3860
|
+
focus: () => sliderRef.value?.focus() || inputRef.value?.focus(),
|
|
3861
|
+
blur: () => sliderRef.value?.blur() || inputRef.value?.blur()
|
|
3850
3862
|
});
|
|
3851
3863
|
return (_ctx, _cache) => {
|
|
3852
3864
|
const _component_icon = resolveComponent("icon");
|
|
@@ -3861,7 +3873,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
3861
3873
|
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
3874
|
onClick: _cache[0] || (_cache[0] = ($event) => setValueAndFocus(_ctx.min))
|
|
3863
3875
|
}, toDisplayString(unref(formatNumberAsDecimal)(_ctx.min, _ctx.precision)), 9, _hoisted_2$u),
|
|
3864
|
-
createElementVNode("div", _hoisted_3$
|
|
3876
|
+
createElementVNode("div", _hoisted_3$j, [
|
|
3865
3877
|
withDirectives(createElementVNode("div", _hoisted_4$e, [
|
|
3866
3878
|
withDirectives(createElementVNode("input", mergeProps({
|
|
3867
3879
|
ref_key: "sliderRef",
|
|
@@ -4049,8 +4061,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
4049
4061
|
const props = __props;
|
|
4050
4062
|
const element = ref(null);
|
|
4051
4063
|
function focus() {
|
|
4052
|
-
|
|
4053
|
-
(_a = element.value) == null ? void 0 : _a.focus();
|
|
4064
|
+
element.value?.focus();
|
|
4054
4065
|
}
|
|
4055
4066
|
const { t: t2 } = useI18n();
|
|
4056
4067
|
const currentPlaceholder = computed(() => {
|
|
@@ -4228,8 +4239,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
4228
4239
|
});
|
|
4229
4240
|
__expose({
|
|
4230
4241
|
focus() {
|
|
4231
|
-
|
|
4232
|
-
(_a = input.value) == null ? void 0 : _a.focus();
|
|
4242
|
+
input.value?.focus();
|
|
4233
4243
|
}
|
|
4234
4244
|
});
|
|
4235
4245
|
return (_ctx, _cache) => {
|
|
@@ -4348,7 +4358,7 @@ const _hoisted_1$C = {
|
|
|
4348
4358
|
class: "cl:flex cl:gap-2 cl:p-2 cl:w-full"
|
|
4349
4359
|
};
|
|
4350
4360
|
const _hoisted_2$r = { class: "cl:w-full" };
|
|
4351
|
-
const _hoisted_3$
|
|
4361
|
+
const _hoisted_3$i = { class: "cl:w-full" };
|
|
4352
4362
|
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
4353
4363
|
...{
|
|
4354
4364
|
inheritAttrs: false
|
|
@@ -4544,7 +4554,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
4544
4554
|
_: 1
|
|
4545
4555
|
}, 8, ["modelValue", "date-format-locale", "disabled", "time-zone", "min-date", "max-date", "popover-placement"])
|
|
4546
4556
|
]),
|
|
4547
|
-
createElementVNode("div", _hoisted_3$
|
|
4557
|
+
createElementVNode("div", _hoisted_3$i, [
|
|
4548
4558
|
createVNode(_sfc_main$M, {
|
|
4549
4559
|
id: "dateInputEnd",
|
|
4550
4560
|
modelValue: internalEntrySelectEndDate.value,
|
|
@@ -4609,8 +4619,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
4609
4619
|
}
|
|
4610
4620
|
});
|
|
4611
4621
|
const _hoisted_1$B = ["value", "readonly", "placeholder", "disabled", "onKeydown"];
|
|
4612
|
-
const _hoisted_2$q =
|
|
4613
|
-
const _hoisted_3$i = ["id", "tabindex", "inert", "onKeydown"];
|
|
4622
|
+
const _hoisted_2$q = ["id", "tabindex", "inert", "onKeydown"];
|
|
4614
4623
|
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
4615
4624
|
...{
|
|
4616
4625
|
inheritAttrs: false
|
|
@@ -4627,7 +4636,8 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4627
4636
|
isGridFilter: { type: Boolean, default: false },
|
|
4628
4637
|
openDropDownOnFocus: { type: Boolean, default: true },
|
|
4629
4638
|
allowFiltering: { type: Boolean, default: false },
|
|
4630
|
-
useListView: { type: Boolean, default: (props) => Array.isArray(props.modelValue) }
|
|
4639
|
+
useListView: { type: Boolean, default: (props) => Array.isArray(props.modelValue) },
|
|
4640
|
+
readonly: { type: Boolean, default: false }
|
|
4631
4641
|
},
|
|
4632
4642
|
emits: ["update:model-value"],
|
|
4633
4643
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -4651,7 +4661,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4651
4661
|
if (isSelectItem(item)) {
|
|
4652
4662
|
return item.name;
|
|
4653
4663
|
}
|
|
4654
|
-
return item
|
|
4664
|
+
return item?.toString();
|
|
4655
4665
|
}
|
|
4656
4666
|
});
|
|
4657
4667
|
const searchTerm = ref("");
|
|
@@ -4689,49 +4699,51 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4689
4699
|
setSearchTerm("");
|
|
4690
4700
|
}
|
|
4691
4701
|
function select(value) {
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4702
|
+
if (props.readonly === false && value !== null && value !== void 0) {
|
|
4703
|
+
if (Array.isArray(selectResult.value)) {
|
|
4704
|
+
const isInArray = selectResult.value.indexOf(value);
|
|
4705
|
+
if (isInArray > -1) {
|
|
4706
|
+
if (selectResult.value.length > 1 || props.canClear) {
|
|
4707
|
+
selectResult.value = selectResult.value.toSpliced(isInArray, 1);
|
|
4708
|
+
}
|
|
4709
|
+
} else {
|
|
4710
|
+
selectResult.value = [
|
|
4711
|
+
...selectResult.value,
|
|
4712
|
+
value
|
|
4713
|
+
];
|
|
4698
4714
|
}
|
|
4699
4715
|
} else {
|
|
4700
|
-
(
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
selectResult.value = value;
|
|
4716
|
+
if (props.canClear && selectResult.value === value) {
|
|
4717
|
+
selectResult.value = null;
|
|
4718
|
+
} else {
|
|
4719
|
+
selectResult.value = value;
|
|
4720
|
+
}
|
|
4721
|
+
toggleSelectModalState();
|
|
4707
4722
|
}
|
|
4708
|
-
toggleSelectModalState();
|
|
4709
4723
|
}
|
|
4710
4724
|
}
|
|
4711
4725
|
function moveHighlightToStart(event) {
|
|
4712
|
-
|
|
4713
|
-
if (selectModalVisible.value || props.useListView) {
|
|
4726
|
+
if (props.readonly === false && (selectModalVisible.value || props.useListView)) {
|
|
4714
4727
|
event.stopPropagation();
|
|
4715
4728
|
highlightIndex.value = 0;
|
|
4716
|
-
|
|
4729
|
+
selectModalRef.value?.scrollTo({
|
|
4717
4730
|
top: 0,
|
|
4718
4731
|
behavior: "instant"
|
|
4719
4732
|
});
|
|
4720
4733
|
}
|
|
4721
4734
|
}
|
|
4722
4735
|
function moveHighlightToEnd(event) {
|
|
4723
|
-
|
|
4724
|
-
if (selectModalVisible.value || props.useListView) {
|
|
4736
|
+
if (props.readonly === false && (selectModalVisible.value || props.useListView)) {
|
|
4725
4737
|
event.stopPropagation();
|
|
4726
4738
|
highlightIndex.value = displayList.value.length - 1;
|
|
4727
|
-
|
|
4739
|
+
selectModalRef.value?.scrollTo({
|
|
4728
4740
|
top: selectModalRef.value.scrollHeight,
|
|
4729
4741
|
behavior: "instant"
|
|
4730
4742
|
});
|
|
4731
4743
|
}
|
|
4732
4744
|
}
|
|
4733
4745
|
function moveHighlightBackwards(event) {
|
|
4734
|
-
if (selectModalVisible.value || props.useListView) {
|
|
4746
|
+
if (props.readonly === false && (selectModalVisible.value || props.useListView)) {
|
|
4735
4747
|
event.stopPropagation();
|
|
4736
4748
|
if (highlightIndex.value === -1) {
|
|
4737
4749
|
moveHighlightToStart(event);
|
|
@@ -4744,7 +4756,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4744
4756
|
}
|
|
4745
4757
|
}
|
|
4746
4758
|
function moveHighlightForwards(event) {
|
|
4747
|
-
if (selectModalVisible.value || props.useListView) {
|
|
4759
|
+
if (props.readonly === false && (selectModalVisible.value || props.useListView)) {
|
|
4748
4760
|
event.stopPropagation();
|
|
4749
4761
|
if (highlightIndex.value < displayList.value.length - 1) {
|
|
4750
4762
|
highlightIndex.value++;
|
|
@@ -4758,8 +4770,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4758
4770
|
return !!value && typeof value === "object" && "name" in value && typeof value.name === "string" && "id" in value && typeof value.id === "number";
|
|
4759
4771
|
}
|
|
4760
4772
|
function scrollToHighlight() {
|
|
4761
|
-
|
|
4762
|
-
const highlightedElement = (_a = selectModalRef.value) == null ? void 0 : _a.children.item(highlightIndex.value);
|
|
4773
|
+
const highlightedElement = selectModalRef.value?.children.item(highlightIndex.value);
|
|
4763
4774
|
if (selectModalRef.value && highlightedElement) {
|
|
4764
4775
|
selectModalRef.value.scrollTo({
|
|
4765
4776
|
top: highlightedElement.offsetTop - 16,
|
|
@@ -4769,7 +4780,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4769
4780
|
}
|
|
4770
4781
|
function handleEnterPress(event) {
|
|
4771
4782
|
if (selectModalVisible.value) {
|
|
4772
|
-
select(displayList.value[highlightIndex.value]);
|
|
4783
|
+
select(displayList.value[highlightIndex.value] ?? null);
|
|
4773
4784
|
setSearchTerm("");
|
|
4774
4785
|
event.target.focus();
|
|
4775
4786
|
} else {
|
|
@@ -4813,12 +4824,11 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4813
4824
|
}));
|
|
4814
4825
|
let ignoreFocus = false;
|
|
4815
4826
|
function focus() {
|
|
4816
|
-
var _a;
|
|
4817
4827
|
if (!ignoreFocus && props.openDropDownOnFocus) {
|
|
4818
4828
|
toggleSelectModalState(true);
|
|
4819
4829
|
}
|
|
4820
4830
|
ignoreFocus = false;
|
|
4821
|
-
|
|
4831
|
+
inputElement.value?.focus();
|
|
4822
4832
|
}
|
|
4823
4833
|
function disableKeyboardEventForSearching(fn) {
|
|
4824
4834
|
return (...args) => {
|
|
@@ -4837,6 +4847,10 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4837
4847
|
function ignoreFocusEvent() {
|
|
4838
4848
|
ignoreFocus = true;
|
|
4839
4849
|
}
|
|
4850
|
+
function handleMouseClick(option2) {
|
|
4851
|
+
select(option2);
|
|
4852
|
+
highlightIndex.value = -1;
|
|
4853
|
+
}
|
|
4840
4854
|
__expose({
|
|
4841
4855
|
focus
|
|
4842
4856
|
});
|
|
@@ -4867,7 +4881,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4867
4881
|
class: normalizeClass([[inputClasses.value, {
|
|
4868
4882
|
"cl:border cl:border-grey-2": _ctx.isGridFilter === false,
|
|
4869
4883
|
"cl:border-link-light": unref(inputFocused) && !_ctx.openDropDownOnFocus && _ctx.isGridFilter === false
|
|
4870
|
-
}], "cl:flex cl:
|
|
4884
|
+
}], "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
4885
|
onToggleModal: onInputClick
|
|
4872
4886
|
}, {
|
|
4873
4887
|
default: withCtx(() => [
|
|
@@ -4876,10 +4890,10 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4876
4890
|
ref: inputElement,
|
|
4877
4891
|
type: "text",
|
|
4878
4892
|
autocomplete: "off",
|
|
4879
|
-
value: isCurrentlySearchable.value ? searchTerm.value : selectResultAsString.value,
|
|
4893
|
+
value: isCurrentlySearchable.value ? searchTerm.value : props.isGridFilter ? _ctx.placeholder || selectResultAsString.value : selectResultAsString.value,
|
|
4880
4894
|
readonly: _ctx.allowFiltering === false,
|
|
4881
4895
|
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,
|
|
4896
|
+
placeholder: (props.isGridFilter ? _ctx.placeholder || selectResultAsString.value : selectResultAsString.value || _ctx.placeholder) || void 0,
|
|
4883
4897
|
disabled: _ctx.disabled,
|
|
4884
4898
|
onKeydown: [
|
|
4885
4899
|
preventInputKeyEventWhenNonEditable,
|
|
@@ -4891,7 +4905,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4891
4905
|
withKeys(withModifiers(moveHighlightForwards, ["prevent"]), ["down"]),
|
|
4892
4906
|
withKeys(withModifiers(moveHighlightToStart, ["prevent"]), ["home"]),
|
|
4893
4907
|
withKeys(withModifiers(moveHighlightToEnd, ["prevent"]), ["end"]),
|
|
4894
|
-
_cache[4] || (_cache[4] = withKeys(
|
|
4908
|
+
_cache[4] || (_cache[4] = withKeys(($event) => disableKeyboardEventForSearching(handleEnterPress), ["space"])),
|
|
4895
4909
|
withKeys(withModifiers(handleEnterPress, ["stop", "prevent"]), ["enter"])
|
|
4896
4910
|
],
|
|
4897
4911
|
onInput: _cache[0] || (_cache[0] = ($event) => setSearchTerm($event.target.value)),
|
|
@@ -4899,7 +4913,10 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4899
4913
|
onFocus: focus,
|
|
4900
4914
|
onSelect: withModifiers(preventInputSelection, ["stop", "prevent"])
|
|
4901
4915
|
}), null, 16, _hoisted_1$B),
|
|
4902
|
-
createElementVNode("div",
|
|
4916
|
+
createElementVNode("div", {
|
|
4917
|
+
class: "cl:cursor-pointer cl:flex cl:items-center cl:px-2 cl:py-1 cl:relative cl:text-grey-3 cl:z-10",
|
|
4918
|
+
onClick: _cache[5] || (_cache[5] = withModifiers(($event) => isCurrentlySearchable.value ? toggleSelectModalState(false) : onInputClick(), ["stop", "prevent"]))
|
|
4919
|
+
}, [
|
|
4903
4920
|
createVNode(_component_icon, {
|
|
4904
4921
|
icon: selectModalVisible.value ? "ph:caret-up-bold" : "ph:caret-down-bold"
|
|
4905
4922
|
}, null, 8, ["icon"])
|
|
@@ -4919,10 +4936,11 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4919
4936
|
"cl:absolute cl:border-t-0 cl:left-0 cl:rounded-t-none cl:top-8 cl:min-h-20 cl:max-h-56 cl:text-sm": !_ctx.isGridFilter && props.useListView === false,
|
|
4920
4937
|
"cl:max-h-28": props.useListView,
|
|
4921
4938
|
"cl:overflow-y-auto": _ctx.disabled === false,
|
|
4922
|
-
"cl:overflow-hidden": _ctx.disabled
|
|
4939
|
+
"cl:overflow-hidden": _ctx.disabled,
|
|
4940
|
+
"cl:text-grey-3": _ctx.readonly
|
|
4923
4941
|
}],
|
|
4924
4942
|
inert: _ctx.disabled,
|
|
4925
|
-
onBlur: _cache[
|
|
4943
|
+
onBlur: _cache[6] || (_cache[6] = ($event) => toggleSelectModalState(false)),
|
|
4926
4944
|
onKeyup: [
|
|
4927
4945
|
withKeys(moveHighlightToStart, ["tab"]),
|
|
4928
4946
|
withKeys(moveHighlightToStart, ["right"]),
|
|
@@ -4933,30 +4951,31 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4933
4951
|
withKeys(withModifiers(moveHighlightForwards, ["prevent"]), ["down"]),
|
|
4934
4952
|
withKeys(withModifiers(moveHighlightToStart, ["prevent"]), ["home"]),
|
|
4935
4953
|
withKeys(withModifiers(moveHighlightToEnd, ["prevent"]), ["end"]),
|
|
4936
|
-
_cache[
|
|
4937
|
-
_cache[
|
|
4954
|
+
_cache[7] || (_cache[7] = withKeys(withModifiers(($event) => select(displayList.value[highlightIndex.value]), ["stop", "prevent"]), ["space"])),
|
|
4955
|
+
_cache[8] || (_cache[8] = withKeys(withModifiers(($event) => select(displayList.value[highlightIndex.value]), ["stop", "prevent"]), ["enter"]))
|
|
4938
4956
|
]
|
|
4939
4957
|
}), [
|
|
4940
4958
|
(openBlock(true), createElementBlock(Fragment, null, renderList(displayList.value, (option2, index2) => {
|
|
4941
4959
|
return openBlock(), createElementBlock("div", { key: index2 }, [
|
|
4942
|
-
renderSlot(_ctx.$slots, "default", mergeProps({ ref_for: true }, { option: option2, index: index2, select, highlightIndex: highlightIndex.value, isSelected }), () => [
|
|
4960
|
+
renderSlot(_ctx.$slots, "default", mergeProps({ ref_for: true }, { option: option2, index: index2, select: handleMouseClick, highlightIndex: highlightIndex.value, isSelected }), () => [
|
|
4943
4961
|
(openBlock(), createBlock(_component_cl_ui_select_option, {
|
|
4944
4962
|
id: unref(id) + "-option-" + (isSelectItem(option2) ? option2.id : index2),
|
|
4945
4963
|
key: index2,
|
|
4946
4964
|
disabled: _ctx.disabled,
|
|
4947
4965
|
"is-highlighted": highlightIndex.value === index2,
|
|
4948
4966
|
"is-selected": isSelected(option2),
|
|
4949
|
-
|
|
4967
|
+
readonly: _ctx.readonly,
|
|
4968
|
+
onSelect: ($event) => handleMouseClick(option2)
|
|
4950
4969
|
}, {
|
|
4951
4970
|
default: withCtx(() => [
|
|
4952
4971
|
createTextVNode(toDisplayString(isSelectItem(option2) ? option2.name : option2), 1)
|
|
4953
4972
|
]),
|
|
4954
4973
|
_: 2
|
|
4955
|
-
}, 1032, ["id", "disabled", "is-highlighted", "is-selected", "onSelect"]))
|
|
4974
|
+
}, 1032, ["id", "disabled", "is-highlighted", "is-selected", "readonly", "onSelect"]))
|
|
4956
4975
|
])
|
|
4957
4976
|
]);
|
|
4958
4977
|
}), 128))
|
|
4959
|
-
], 16,
|
|
4978
|
+
], 16, _hoisted_2$q)) : createCommentVNode("", true)
|
|
4960
4979
|
], 2)
|
|
4961
4980
|
]),
|
|
4962
4981
|
_: 2
|
|
@@ -4978,112 +4997,29 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
4978
4997
|
props: {
|
|
4979
4998
|
isSelected: { type: Boolean, default: false },
|
|
4980
4999
|
isHighlighted: { type: Boolean, default: false },
|
|
4981
|
-
disabled: { type: Boolean, default: false }
|
|
5000
|
+
disabled: { type: Boolean, default: false },
|
|
5001
|
+
readonly: { type: Boolean, default: false }
|
|
4982
5002
|
},
|
|
4983
5003
|
emits: ["select"],
|
|
4984
5004
|
setup(__props, { emit: __emit }) {
|
|
4985
5005
|
const emit = __emit;
|
|
4986
5006
|
return (_ctx, _cache) => {
|
|
4987
5007
|
return openBlock(), createElementBlock("div", {
|
|
4988
|
-
class: normalizeClass(["cl:px-2 cl:py-0.5", _ctx.disabled ? "cl:bg-grey-1 cl:border-grey-2 cl:placeholder-grey-3" :
|
|
4989
|
-
"cl:
|
|
5008
|
+
class: normalizeClass(["cl:px-2 cl:py-0.5", _ctx.disabled ? "cl:bg-grey-1 cl:border-grey-2 cl:placeholder-grey-3" : {
|
|
5009
|
+
"cl:cursor-pointer": _ctx.readonly === false,
|
|
5010
|
+
"cl:bg-primary-lighter": _ctx.isSelected && _ctx.isHighlighted === false,
|
|
5011
|
+
"cl:hover:bg-primary-default": _ctx.readonly === false && _ctx.isSelected && _ctx.isHighlighted === false,
|
|
4990
5012
|
"cl:bg-primary-default": _ctx.isSelected && _ctx.isHighlighted,
|
|
4991
|
-
"cl:hover:bg-link-lighter": _ctx.isSelected === false && _ctx.isHighlighted === false,
|
|
5013
|
+
"cl:hover:bg-link-lighter": _ctx.readonly === false && _ctx.isSelected === false && _ctx.isHighlighted === false,
|
|
4992
5014
|
"cl:bg-link-lighter": _ctx.isSelected === false && _ctx.isHighlighted
|
|
4993
|
-
}]
|
|
4994
|
-
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.disabled ? null : emit("select"))
|
|
5015
|
+
}]),
|
|
5016
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.readonly || _ctx.disabled ? null : emit("select"))
|
|
4995
5017
|
}, [
|
|
4996
5018
|
renderSlot(_ctx.$slots, "default")
|
|
4997
5019
|
], 2);
|
|
4998
5020
|
};
|
|
4999
5021
|
}
|
|
5000
5022
|
});
|
|
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
5023
|
const defaultFilterMethod = {
|
|
5088
5024
|
method: "equal",
|
|
5089
5025
|
icon: "mdi:equal",
|
|
@@ -5147,6 +5083,13 @@ const filterMethods = [
|
|
|
5147
5083
|
],
|
|
5148
5084
|
key: "notequal"
|
|
5149
5085
|
},
|
|
5086
|
+
{
|
|
5087
|
+
method: "orequal",
|
|
5088
|
+
icon: "mdi:set-none",
|
|
5089
|
+
description: "One of",
|
|
5090
|
+
allowedTypes: ["list"],
|
|
5091
|
+
key: "orequal"
|
|
5092
|
+
},
|
|
5150
5093
|
defaultDateTimeFilterMethod,
|
|
5151
5094
|
{
|
|
5152
5095
|
method: "greaterthan",
|
|
@@ -5227,6 +5170,11 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
5227
5170
|
} else if (typeof props.column.slotType !== "undefined" && typeof props.column.field !== "undefined") {
|
|
5228
5171
|
methods = filterMethods.filter((f) => f.allowedTypes.includes(props.column.slotType));
|
|
5229
5172
|
}
|
|
5173
|
+
if ((props.column.type === "list" || props.column.type === "slot" && props.column.slotType === "list") && props.column.listMode === "multi") {
|
|
5174
|
+
methods = methods.filter((m) => m.method === "orequal");
|
|
5175
|
+
} else {
|
|
5176
|
+
methods = methods.filter((m) => m.method !== "orequal");
|
|
5177
|
+
}
|
|
5230
5178
|
if (props.column.type === "date" || props.column.type === "datetime" || props.column.slotType === "date" || props.column.slotType === "datetime") {
|
|
5231
5179
|
methods.forEach((m) => {
|
|
5232
5180
|
m.description = t2(`grid.${m.key}`);
|
|
@@ -5239,15 +5187,11 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
5239
5187
|
return methods;
|
|
5240
5188
|
});
|
|
5241
5189
|
const currentFilterMethod = computed(() => {
|
|
5242
|
-
|
|
5243
|
-
let filterMethod = (_a = props.filter) == null ? void 0 : _a.filterMethod;
|
|
5190
|
+
let filterMethod = props.filter?.filterMethod;
|
|
5244
5191
|
if (typeof filterMethod === "undefined") {
|
|
5245
5192
|
filterMethod = FilterOperation[props.defaultOperation].replace("_", "").toLowerCase();
|
|
5246
5193
|
}
|
|
5247
|
-
return allowedFilterMethods.value.find((m) =>
|
|
5248
|
-
var _a2;
|
|
5249
|
-
return m.method.toLowerCase() === ((_a2 = filterMethod == null ? void 0 : filterMethod.removeNonAlphanumeric()) == null ? void 0 : _a2.toLowerCase());
|
|
5250
|
-
});
|
|
5194
|
+
return allowedFilterMethods.value.find((m) => m.method.toLowerCase() === filterMethod?.removeNonAlphanumeric()?.toLowerCase());
|
|
5251
5195
|
});
|
|
5252
5196
|
function setFilterMethod(filterMethod) {
|
|
5253
5197
|
let filterOutput;
|
|
@@ -5294,11 +5238,10 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
5294
5238
|
}, [
|
|
5295
5239
|
createElementVNode("strong", _hoisted_2$p, toDisplayString(unref(t2)("grid.availableMethods")), 1),
|
|
5296
5240
|
(openBlock(true), createElementBlock(Fragment, null, renderList(allowedFilterMethods.value, (filterMethod, index2) => {
|
|
5297
|
-
var _a;
|
|
5298
5241
|
return openBlock(), createElementBlock("span", {
|
|
5299
5242
|
key: index2,
|
|
5300
5243
|
class: normalizeClass(["cl:cursor-pointer cl:hover:bg-grey-0 cl:px-4 cl:py-1 cl:transition-colors cl:w-full", {
|
|
5301
|
-
"cl:bg-primary-default cl:opacity-80": filterMethod.method ===
|
|
5244
|
+
"cl:bg-primary-default cl:opacity-80": filterMethod.method === currentFilterMethod.value?.method
|
|
5302
5245
|
}]),
|
|
5303
5246
|
onClick: withModifiers(($event) => setFilterMethod(filterMethod.method), ["prevent"])
|
|
5304
5247
|
}, [
|
|
@@ -5319,6 +5262,11 @@ const defaultEmptyListValue = {
|
|
|
5319
5262
|
name: "",
|
|
5320
5263
|
value: ""
|
|
5321
5264
|
};
|
|
5265
|
+
const defaultSelectAllListValue = computed(() => ({
|
|
5266
|
+
id: -2,
|
|
5267
|
+
name: i18n.global.t("grid.selectAll"),
|
|
5268
|
+
value: ""
|
|
5269
|
+
}));
|
|
5322
5270
|
const booleanListEntries = computed(() => [
|
|
5323
5271
|
defaultEmptyListValue,
|
|
5324
5272
|
{
|
|
@@ -5363,7 +5311,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5363
5311
|
const emit = __emit;
|
|
5364
5312
|
const { t: t2, locale: locale2 } = useI18n();
|
|
5365
5313
|
function getDefaultFilterOperation() {
|
|
5366
|
-
return props.column.type === "string" || props.column.slotType === "string" ? FilterOperation.CONTAINS : props.column.type === "datetime" || props.column.slotType === "datetime" || props.column.type === "date" || props.column.slotType === "date" ? FilterOperation.LESS_THAN : FilterOperation.EQUAL;
|
|
5314
|
+
return isListColumn.value && props.column.listMode === "multi" ? FilterOperation.OR_EQUAL : props.column.type === "string" || props.column.slotType === "string" ? FilterOperation.CONTAINS : props.column.type === "datetime" || props.column.slotType === "datetime" || props.column.type === "date" || props.column.slotType === "date" ? FilterOperation.LESS_THAN : FilterOperation.EQUAL;
|
|
5367
5315
|
}
|
|
5368
5316
|
const currentFilters = computed({
|
|
5369
5317
|
get: () => props.filter,
|
|
@@ -5376,40 +5324,52 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5376
5324
|
const isStringColumn = computed(() => props.column.type === "string" || props.column.type === "slot" && props.column.slotType === "string");
|
|
5377
5325
|
const numericFormat = computed(() => props.column.format === NumberFormat.INTEGER ? NumberFormat.DECIMAL : props.column.format ?? NumberFormat.DECIMAL);
|
|
5378
5326
|
const booleanValueAsSelectItem = computed(() => booleanListEntries.value.find((x) => x.value === currentFilterValue.value.toString()) ?? null);
|
|
5379
|
-
const listEntriesAsSelectItems = computed(() =>
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5327
|
+
const listEntriesAsSelectItems = computed(() => [
|
|
5328
|
+
props.column.listMode === "multi" ? defaultSelectAllListValue.value : defaultEmptyListValue,
|
|
5329
|
+
...props.column.listEntries?.map((x, i) => ({
|
|
5330
|
+
id: i,
|
|
5331
|
+
name: t2(x.translationKey),
|
|
5332
|
+
value: x.value.toString()
|
|
5333
|
+
})) ?? []
|
|
5334
|
+
]);
|
|
5335
|
+
const currentFilterValueAsSelectItems = computed(() => {
|
|
5336
|
+
if (props.column.listMode !== "multi") {
|
|
5337
|
+
const item = listEntriesAsSelectItems.value.find((x) => x.value === currentFilterValue.value && x.id === selectedListEntryId.value) ?? listEntriesAsSelectItems.value.find((x) => x.value === currentFilterValue.value) ?? null;
|
|
5338
|
+
return item ? item : null;
|
|
5339
|
+
} else {
|
|
5340
|
+
const filters = props.filter?.filter((f) => f.filterOperation === FilterOperation.OR_EQUAL).map((f) => f.filterValue);
|
|
5341
|
+
const filteredListEntries = listEntriesAsSelectItems.value.filter((x) => filters?.includes(x.value));
|
|
5342
|
+
if (filteredListEntries.length === props.column.listEntries?.length) {
|
|
5343
|
+
filteredListEntries.push(defaultSelectAllListValue.value);
|
|
5344
|
+
}
|
|
5345
|
+
return filteredListEntries;
|
|
5346
|
+
}
|
|
5389
5347
|
});
|
|
5390
|
-
const
|
|
5348
|
+
const selectAllCurrentlyHighlighted = computed(() => Array.isArray(currentFilterValueAsSelectItems.value) && currentFilterValueAsSelectItems.value.some((x) => x.id === defaultSelectAllListValue.value.id));
|
|
5391
5349
|
const selectedListEntryId = ref(defaultEmptyListValue.id);
|
|
5392
|
-
function
|
|
5350
|
+
function updateListColumnSelectItems(value) {
|
|
5393
5351
|
if (value && !Array.isArray(value)) {
|
|
5394
5352
|
selectedListEntryId.value = value.id;
|
|
5353
|
+
} else if (value && Array.isArray(value)) {
|
|
5354
|
+
setOrEqualFilters(value);
|
|
5355
|
+
return;
|
|
5395
5356
|
}
|
|
5396
5357
|
if (isNumericListColumn.value) {
|
|
5397
|
-
setNumberFilter(null, value
|
|
5358
|
+
setNumberFilter(null, value?.value);
|
|
5398
5359
|
} else {
|
|
5399
|
-
setFilter(null, value
|
|
5360
|
+
setFilter(null, value?.value);
|
|
5400
5361
|
}
|
|
5401
5362
|
}
|
|
5402
5363
|
const immediateRequestOverride = ref(false);
|
|
5403
5364
|
const performImmediateRequest = computed(() => immediateRequestOverride.value || isStringColumn.value === false);
|
|
5404
5365
|
const internalFilter = computed({
|
|
5405
5366
|
get() {
|
|
5406
|
-
|
|
5407
|
-
let result = (_a = currentFilters.value) == null ? void 0 : _a[0];
|
|
5367
|
+
let result = currentFilters.value?.[0];
|
|
5408
5368
|
if (result) {
|
|
5409
5369
|
if (isDateColumn.value) {
|
|
5410
|
-
if ((
|
|
5411
|
-
const startFilter =
|
|
5412
|
-
const endFilter =
|
|
5370
|
+
if ((props.filter?.length ?? 0) > 1) {
|
|
5371
|
+
const startFilter = currentFilters.value?.find((f) => f.filterOperation === FilterOperation.EQUAL_OR_GREATER_THAN);
|
|
5372
|
+
const endFilter = currentFilters.value?.find((f) => f.filterOperation === FilterOperation.LESS_THAN);
|
|
5413
5373
|
if (startFilter && endFilter) {
|
|
5414
5374
|
result = {
|
|
5415
5375
|
filterOnColumn: props.column.field,
|
|
@@ -5434,9 +5394,9 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5434
5394
|
filterValue: date.plus({ milliseconds: 1 }).toISO() ?? ""
|
|
5435
5395
|
};
|
|
5436
5396
|
}
|
|
5437
|
-
} else if (isDateRangeColumn.value && (
|
|
5438
|
-
const startFilter =
|
|
5439
|
-
const endFilter =
|
|
5397
|
+
} else if (isDateRangeColumn.value && (props.filter?.length ?? 0) > 1) {
|
|
5398
|
+
const startFilter = currentFilters.value?.find((f) => f.filterOperation === FilterOperation.EQUAL_OR_GREATER_THAN);
|
|
5399
|
+
const endFilter = currentFilters.value?.find((f) => f.filterOperation === FilterOperation.EQUAL_OR_LESS_THAN);
|
|
5440
5400
|
if (startFilter && endFilter) {
|
|
5441
5401
|
result = {
|
|
5442
5402
|
filterOnColumn: props.column.field,
|
|
@@ -5456,9 +5416,9 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5456
5416
|
let filters = null;
|
|
5457
5417
|
if (isDateColumn.value) {
|
|
5458
5418
|
const dateFilter = value;
|
|
5459
|
-
const equalsFilter =
|
|
5460
|
-
const lessThanOrEqualFilter =
|
|
5461
|
-
const greaterThanFilter =
|
|
5419
|
+
const equalsFilter = dateFilter?.filterMethod && checkDateFilter(dateFilter.filterMethod, dateFilter.filterValue, "equal");
|
|
5420
|
+
const lessThanOrEqualFilter = dateFilter?.filterMethod && checkDateFilter(dateFilter.filterMethod, dateFilter.filterValue, "equalorlessthan");
|
|
5421
|
+
const greaterThanFilter = dateFilter?.filterMethod && checkDateFilter(dateFilter.filterMethod, dateFilter.filterValue, "greaterthan");
|
|
5462
5422
|
if (equalsFilter) {
|
|
5463
5423
|
let date = DateTime.fromISO(dateFilter.filterValue, {
|
|
5464
5424
|
zone: props.timeZone ?? "UTC"
|
|
@@ -5508,7 +5468,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5508
5468
|
}
|
|
5509
5469
|
];
|
|
5510
5470
|
}
|
|
5511
|
-
} else if (isDateRangeColumn.value &&
|
|
5471
|
+
} else if (isDateRangeColumn.value && value?.filterValue) {
|
|
5512
5472
|
const dateRange = value.filterValue;
|
|
5513
5473
|
const startDate = DateTime.fromISO(dateRange.start, {
|
|
5514
5474
|
zone: props.timeZone ?? "UTC"
|
|
@@ -5544,7 +5504,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5544
5504
|
}
|
|
5545
5505
|
}
|
|
5546
5506
|
}
|
|
5547
|
-
if (
|
|
5507
|
+
if (value?.filterValue === "" || performImmediateRequest.value) {
|
|
5548
5508
|
updateFilterDebounced(false);
|
|
5549
5509
|
currentFilters.value = filters;
|
|
5550
5510
|
immediateRequestOverride.value = false;
|
|
@@ -5557,7 +5517,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5557
5517
|
if (filtersOrCancel !== false) {
|
|
5558
5518
|
currentFilters.value = filtersOrCancel;
|
|
5559
5519
|
}
|
|
5560
|
-
},
|
|
5520
|
+
}, 3e3);
|
|
5561
5521
|
const currentFilter = computed({
|
|
5562
5522
|
get: () => internalFilter.value,
|
|
5563
5523
|
set(value) {
|
|
@@ -5569,18 +5529,32 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5569
5529
|
const isEqualFilter = operation === expectedOperation;
|
|
5570
5530
|
return isValidValue && isEqualFilter && isDateColumn.value;
|
|
5571
5531
|
}
|
|
5572
|
-
const currentFilterValue = computed(() =>
|
|
5573
|
-
var _a;
|
|
5574
|
-
return ((_a = internalFilter.value) == null ? void 0 : _a.filterValue) ?? "";
|
|
5575
|
-
});
|
|
5532
|
+
const currentFilterValue = computed(() => internalFilter.value?.filterValue ?? "");
|
|
5576
5533
|
const currentDateFilterValue = computed(() => currentFilterValue.value === "" ? null : currentFilterValue.value);
|
|
5577
5534
|
const currentDateRangeFilterValue = computed(() => currentFilterValue.value === "" ? null : currentFilterValue.value);
|
|
5578
5535
|
const filterable = computed(() => isFilterable(props.column));
|
|
5536
|
+
function setOrEqualFilters(value) {
|
|
5537
|
+
const selectAllCurrentlySelected = value.some((x) => x.id === defaultSelectAllListValue.value.id);
|
|
5538
|
+
if (value.length === 0 || selectAllCurrentlySelected === false && selectAllCurrentlyHighlighted.value) {
|
|
5539
|
+
setOrEqualFiltersImpl([defaultSelectAllListValue.value.value]);
|
|
5540
|
+
} else if (selectAllCurrentlySelected && selectAllCurrentlyHighlighted.value === false) {
|
|
5541
|
+
setOrEqualFiltersImpl(listEntriesAsSelectItems.value.map((x) => x.value));
|
|
5542
|
+
} else {
|
|
5543
|
+
setOrEqualFiltersImpl(value.map((x) => x.value));
|
|
5544
|
+
}
|
|
5545
|
+
function setOrEqualFiltersImpl(values) {
|
|
5546
|
+
currentFilters.value = values.map((x) => ({
|
|
5547
|
+
filterOnColumn: props.column.field,
|
|
5548
|
+
filterOperation: FilterOperation.OR_EQUAL,
|
|
5549
|
+
filterMethod: "orequal",
|
|
5550
|
+
filterValue: x
|
|
5551
|
+
}));
|
|
5552
|
+
}
|
|
5553
|
+
}
|
|
5579
5554
|
function setFilter(target, defaultValue) {
|
|
5580
|
-
var _a;
|
|
5581
5555
|
let filterOutput;
|
|
5582
5556
|
let nextValue = defaultValue;
|
|
5583
|
-
const previousValue =
|
|
5557
|
+
const previousValue = internalFilter.value?.filterValue.toString() ?? "";
|
|
5584
5558
|
const hasNextValue = !!nextValue.trim();
|
|
5585
5559
|
const hasPreviousValue = !!previousValue.trim();
|
|
5586
5560
|
if (hasNextValue === false && hasPreviousValue) {
|
|
@@ -5618,11 +5592,10 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5618
5592
|
setFilter(null, isNaN(inputValue) ? "" : inputValue.toString());
|
|
5619
5593
|
}
|
|
5620
5594
|
function setDateRangeFilter(value) {
|
|
5621
|
-
var _a;
|
|
5622
5595
|
let filterOutput;
|
|
5623
5596
|
let preventEmit = false;
|
|
5624
5597
|
if (internalFilter.value) {
|
|
5625
|
-
preventEmit =
|
|
5598
|
+
preventEmit = internalFilter.value?.filterValue === value;
|
|
5626
5599
|
filterOutput = copy(internalFilter.value);
|
|
5627
5600
|
filterOutput.filterValue = value ?? "";
|
|
5628
5601
|
} else if (value !== null && typeof props.column.field !== "undefined") {
|
|
@@ -5648,6 +5621,14 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5648
5621
|
setFilter(null, internalTextInputValue.value);
|
|
5649
5622
|
}
|
|
5650
5623
|
}
|
|
5624
|
+
function handleStringInputBlur(e) {
|
|
5625
|
+
const target = e.relatedTarget;
|
|
5626
|
+
if (target && target.closest("[clear-filters-button]")) {
|
|
5627
|
+
return;
|
|
5628
|
+
}
|
|
5629
|
+
immediateRequestOverride.value = true;
|
|
5630
|
+
setFilter(null, internalTextInputValue.value);
|
|
5631
|
+
}
|
|
5651
5632
|
watch(() => currentFilterValue.value, () => {
|
|
5652
5633
|
internalTextInputValue.value = currentFilterValue.value;
|
|
5653
5634
|
}, {
|
|
@@ -5665,8 +5646,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5665
5646
|
});
|
|
5666
5647
|
const gridId = inject("cl-ui-grid-id") ?? "cl-ui-grid-filter";
|
|
5667
5648
|
watch(() => props.filter, () => {
|
|
5668
|
-
|
|
5669
|
-
if (((_a = props.filter) == null ? void 0 : _a.length) === 0) {
|
|
5649
|
+
if (props.filter?.length === 0) {
|
|
5670
5650
|
selectedListEntryId.value = defaultEmptyListValue.id;
|
|
5671
5651
|
}
|
|
5672
5652
|
});
|
|
@@ -5685,7 +5665,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5685
5665
|
class: "cl:bg-white cl:font-normal cl:min-h-0! cl:rounded-lg!",
|
|
5686
5666
|
"model-value": booleanValueAsSelectItem.value,
|
|
5687
5667
|
inert: _ctx.loading,
|
|
5688
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => setFilter(null,
|
|
5668
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => setFilter(null, $event?.value ?? ""))
|
|
5689
5669
|
}, {
|
|
5690
5670
|
default: withCtx(({ select, option: option2, index: index2, highlightIndex, isSelected }) => [
|
|
5691
5671
|
createVNode(_sfc_main$I, {
|
|
@@ -5739,9 +5719,9 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5739
5719
|
"allow-empty": true,
|
|
5740
5720
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $event !== null ? setNumberFilter(null, $event) : setFilter(null, ""))
|
|
5741
5721
|
}, {
|
|
5742
|
-
default: withCtx(() => _cache[
|
|
5722
|
+
default: withCtx(() => [..._cache[10] || (_cache[10] = [
|
|
5743
5723
|
createElementVNode("span", null, null, -1)
|
|
5744
|
-
])),
|
|
5724
|
+
])]),
|
|
5745
5725
|
_: 1
|
|
5746
5726
|
}, 8, ["id", "model-value", "format", "precision", "readonly"])
|
|
5747
5727
|
])) : _ctx.column.type === "string" || _ctx.column.type === "slot" && _ctx.column.slotType === "string" ? (openBlock(), createElementBlock("div", _hoisted_4$d, [
|
|
@@ -5754,22 +5734,27 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5754
5734
|
],
|
|
5755
5735
|
class: "cl:border-none cl:font-normal cl:h-[2rem] cl:lg:text-base cl:px-3 cl:text-xs readonly-filter",
|
|
5756
5736
|
readonly: _ctx.loading,
|
|
5757
|
-
onKeySinglePress: handleKeySinglePress
|
|
5737
|
+
onKeySinglePress: handleKeySinglePress,
|
|
5738
|
+
onBlur: _cache[6] || (_cache[6] = ($event) => handleStringInputBlur($event))
|
|
5758
5739
|
}, {
|
|
5759
|
-
default: withCtx(() => _cache[
|
|
5740
|
+
default: withCtx(() => [..._cache[11] || (_cache[11] = [
|
|
5760
5741
|
createElementVNode("span", null, null, -1)
|
|
5761
|
-
])),
|
|
5742
|
+
])]),
|
|
5762
5743
|
_: 1
|
|
5763
5744
|
}, 8, ["id", "modelValue", "readonly"])
|
|
5764
5745
|
])) : isListColumn.value ? (openBlock(), createBlock(_sfc_main$J, {
|
|
5765
5746
|
key: 5,
|
|
5766
5747
|
id: `${unref(gridId)}-${_ctx.column.name}`,
|
|
5767
5748
|
list: listEntriesAsSelectItems.value,
|
|
5768
|
-
"model-value":
|
|
5769
|
-
|
|
5749
|
+
"model-value": currentFilterValueAsSelectItems.value,
|
|
5750
|
+
"use-list-view": false,
|
|
5751
|
+
"allow-filtering": true,
|
|
5752
|
+
"can-clear": props.column.listMode === "multi",
|
|
5753
|
+
placeholder: selectAllCurrentlyHighlighted.value ? unref(t2)("grid.allEntriesSelected") : void 0,
|
|
5754
|
+
class: "cl:bg-white cl:font-normal! cl:max-h-52! cl:min-h-0! cl:placeholder:text-xs cl:rounded-lg! cl:text-xs",
|
|
5770
5755
|
"is-grid-filter": true,
|
|
5771
|
-
|
|
5772
|
-
"onUpdate:modelValue": _cache[
|
|
5756
|
+
readonly: _ctx.loading,
|
|
5757
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => updateListColumnSelectItems($event))
|
|
5773
5758
|
}, {
|
|
5774
5759
|
default: withCtx(({ select, option: option2, index: index2, highlightIndex, isSelected }) => [
|
|
5775
5760
|
createVNode(_sfc_main$I, {
|
|
@@ -5788,22 +5773,22 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5788
5773
|
}, 1032, ["is-highlighted", "is-selected", "class", "onSelect"])
|
|
5789
5774
|
]),
|
|
5790
5775
|
_: 1
|
|
5791
|
-
}, 8, ["id", "list", "model-value", "
|
|
5776
|
+
}, 8, ["id", "list", "model-value", "can-clear", "placeholder", "readonly"])) : createCommentVNode("", true),
|
|
5792
5777
|
!isDateRangeColumn.value ? (openBlock(), createBlock(_sfc_main$H, {
|
|
5793
5778
|
key: 6,
|
|
5794
5779
|
filter: currentFilter.value,
|
|
5795
|
-
"onUpdate:filter": _cache[
|
|
5780
|
+
"onUpdate:filter": _cache[8] || (_cache[8] = ($event) => currentFilter.value = $event),
|
|
5796
5781
|
loading: _ctx.loading,
|
|
5797
5782
|
column: _ctx.column,
|
|
5798
5783
|
"default-operation": getDefaultFilterOperation(),
|
|
5799
5784
|
"dropdown-position": _ctx.filterDropdownPosition,
|
|
5800
|
-
onSelectionChanged: _cache[
|
|
5785
|
+
onSelectionChanged: _cache[9] || (_cache[9] = ($event) => immediateRequestOverride.value = true)
|
|
5801
5786
|
}, null, 8, ["filter", "loading", "column", "default-operation", "dropdown-position"])) : createCommentVNode("", true)
|
|
5802
5787
|
], 2)) : createCommentVNode("", true);
|
|
5803
5788
|
};
|
|
5804
5789
|
}
|
|
5805
5790
|
});
|
|
5806
|
-
const clUiGridFilterInput = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-
|
|
5791
|
+
const clUiGridFilterInput = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-a9b5c9ab"]]);
|
|
5807
5792
|
const _hoisted_1$y = { key: 1 };
|
|
5808
5793
|
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
5809
5794
|
__name: "cl-ui-grid-filter",
|
|
@@ -5898,8 +5883,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
5898
5883
|
}));
|
|
5899
5884
|
});
|
|
5900
5885
|
function isActiveSort(column, isAscending) {
|
|
5901
|
-
|
|
5902
|
-
return ((_a = currentRequest.value.sort) == null ? void 0 : _a.sortOnColumn) === column.field && ((_b = currentRequest.value.sort) == null ? void 0 : _b.sortByAscending) === isAscending;
|
|
5886
|
+
return currentRequest.value.sort?.sortOnColumn === column.field && currentRequest.value.sort?.sortByAscending === isAscending;
|
|
5903
5887
|
}
|
|
5904
5888
|
function setSort(field) {
|
|
5905
5889
|
if (typeof field !== "undefined") {
|
|
@@ -5922,10 +5906,27 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
5922
5906
|
function updateFilter(filters) {
|
|
5923
5907
|
if (filters) {
|
|
5924
5908
|
const request = copy(currentRequest.value);
|
|
5925
|
-
request.filters
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5909
|
+
const filteredRequests = request.filters.filter((f) => f.filterOnColumn !== filters[0].filterOnColumn);
|
|
5910
|
+
if (filters.some((f) => f.filterOperation === FilterOperation.OR_EQUAL)) {
|
|
5911
|
+
if (filters.every((f) => f.filterValue === "")) {
|
|
5912
|
+
request.filters = filteredRequests;
|
|
5913
|
+
} else if (filters.some((f) => f.filterValue === "")) {
|
|
5914
|
+
request.filters = [
|
|
5915
|
+
...filteredRequests,
|
|
5916
|
+
...filters.filter((f) => f.filterValue !== "")
|
|
5917
|
+
];
|
|
5918
|
+
} else {
|
|
5919
|
+
request.filters = [
|
|
5920
|
+
...filteredRequests,
|
|
5921
|
+
...filters
|
|
5922
|
+
];
|
|
5923
|
+
}
|
|
5924
|
+
} else {
|
|
5925
|
+
request.filters = [
|
|
5926
|
+
...filteredRequests,
|
|
5927
|
+
...filters
|
|
5928
|
+
];
|
|
5929
|
+
}
|
|
5929
5930
|
request.pageNumber = 1;
|
|
5930
5931
|
currentRequest.value = request;
|
|
5931
5932
|
}
|
|
@@ -5958,12 +5959,12 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
5958
5959
|
currentHandle = handle;
|
|
5959
5960
|
const rect = currentHandle.getBoundingClientRect();
|
|
5960
5961
|
const table = currentHandle.closest("table");
|
|
5961
|
-
const tableRect = table
|
|
5962
|
+
const tableRect = table?.getBoundingClientRect();
|
|
5962
5963
|
const th = currentHandle.closest("th");
|
|
5963
|
-
const thRect = th
|
|
5964
|
-
initialWidth =
|
|
5964
|
+
const thRect = th?.getBoundingClientRect();
|
|
5965
|
+
initialWidth = thRect?.width ?? 0;
|
|
5965
5966
|
rightResizeBarPosition.value = index2 === visibleColumns.value.length - 1 ? rect.right : rect.right - 5;
|
|
5966
|
-
leftResizeBarPosition.value =
|
|
5967
|
+
leftResizeBarPosition.value = thRect?.left ?? 0;
|
|
5967
5968
|
if (tableRect) {
|
|
5968
5969
|
resizeBarTop.value = tableRect.top;
|
|
5969
5970
|
resizeBarHeight.value = tableRect.height;
|
|
@@ -6206,14 +6207,11 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
6206
6207
|
if (valueOrCancel !== false) {
|
|
6207
6208
|
performSearch(valueOrCancel);
|
|
6208
6209
|
}
|
|
6209
|
-
},
|
|
6210
|
+
}, 3e3);
|
|
6210
6211
|
const { t: t2 } = useI18n();
|
|
6211
6212
|
const gridSearchInputRef = ref();
|
|
6212
6213
|
__expose({
|
|
6213
|
-
focusMegaSearch: () =>
|
|
6214
|
-
var _a;
|
|
6215
|
-
return (_a = gridSearchInputRef.value) == null ? void 0 : _a.focus();
|
|
6216
|
-
}
|
|
6214
|
+
focusMegaSearch: () => gridSearchInputRef.value?.focus()
|
|
6217
6215
|
});
|
|
6218
6216
|
return (_ctx, _cache) => {
|
|
6219
6217
|
const _component_icon = resolveComponent("icon");
|
|
@@ -6234,9 +6232,9 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
6234
6232
|
placeholder: _ctx.columns.length > 4 ? unref(t2)("grid.search") : unref(t2)("grid.searchSpecific", { columns: _ctx.columns.map((c) => unref(t2)(c.caption)).join(", ") }),
|
|
6235
6233
|
onKeypress: _cache[2] || (_cache[2] = withKeys(($event) => performSearch(searchValue.value), ["enter"]))
|
|
6236
6234
|
}, {
|
|
6237
|
-
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
6235
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
6238
6236
|
createElementVNode("span", null, null, -1)
|
|
6239
|
-
])),
|
|
6237
|
+
])]),
|
|
6240
6238
|
_: 1
|
|
6241
6239
|
}, 8, ["modelValue", "readonly", "placeholder"])
|
|
6242
6240
|
]),
|
|
@@ -6951,7 +6949,7 @@ function _dispatchEvent(info) {
|
|
|
6951
6949
|
}, info));
|
|
6952
6950
|
}
|
|
6953
6951
|
var dragEl, parentEl, ghostEl, rootEl, nextEl, lastDownEl, cloneEl, cloneHidden, oldIndex, newIndex, oldDraggableIndex, newDraggableIndex, activeGroup, putSortable, awaitingDragStarted = false, ignoreNextClick = false, sortables = [], tapEvt, touchEvt, lastDx, lastDy, tapDistanceLeft, tapDistanceTop, moved, lastTarget, lastDirection, pastFirstInvertThresh = false, isCircumstantialInvert = false, targetMoveDistance, ghostRelativeParent, ghostRelativeParentInitialScroll = [], _silent = false, savedInputChecked = [];
|
|
6954
|
-
var documentExists = typeof document !== "undefined", PositionGhostAbsolutely = IOS, CSSFloatProperty = Edge || IE11OrLess ? "cssFloat" : "float", supportDraggable = documentExists && !ChromeForAndroid && !IOS && "draggable" in document.createElement("div"), supportCssPointerEvents = function() {
|
|
6952
|
+
var documentExists = typeof document !== "undefined", PositionGhostAbsolutely = IOS, CSSFloatProperty = Edge || IE11OrLess ? "cssFloat" : "float", supportDraggable = documentExists && !ChromeForAndroid && !IOS && "draggable" in document.createElement("div"), supportCssPointerEvents = (function() {
|
|
6955
6953
|
if (!documentExists) return;
|
|
6956
6954
|
if (IE11OrLess) {
|
|
6957
6955
|
return false;
|
|
@@ -6959,7 +6957,7 @@ var documentExists = typeof document !== "undefined", PositionGhostAbsolutely =
|
|
|
6959
6957
|
var el = document.createElement("x");
|
|
6960
6958
|
el.style.cssText = "pointer-events:auto";
|
|
6961
6959
|
return el.style.pointerEvents === "auto";
|
|
6962
|
-
}(), _detectDirection = function _detectDirection2(el, options) {
|
|
6960
|
+
})(), _detectDirection = function _detectDirection2(el, options) {
|
|
6963
6961
|
var elCSS = css(el), elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth), child1 = getChild(el, 0, options), child2 = getChild(el, 1, options), firstChildCSS = child1 && css(child1), secondChildCSS = child2 && css(child2), firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width, secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
|
|
6964
6962
|
if (elCSS.display === "flex") {
|
|
6965
6963
|
return elCSS.flexDirection === "column" || elCSS.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
@@ -8633,7 +8631,6 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
8633
8631
|
}),
|
|
8634
8632
|
emits: /* @__PURE__ */ mergeModels(["update:columns", "update:request", "data-request", "row-edit", "row-edit-cancelled", "edit-start", "edit-end", "row-select", "view-manager-visible", "clear-filters-clicked"], ["update:selectedRowIndex"]),
|
|
8635
8633
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
8636
|
-
var _a;
|
|
8637
8634
|
const props = __props;
|
|
8638
8635
|
const selectedRowIndex = useModel(__props, "selectedRowIndex");
|
|
8639
8636
|
const emit = __emit;
|
|
@@ -8682,9 +8679,8 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
8682
8679
|
return width;
|
|
8683
8680
|
}
|
|
8684
8681
|
function setColumnStyles() {
|
|
8685
|
-
var _a2;
|
|
8686
8682
|
const result = {};
|
|
8687
|
-
if (window.innerWidth >= 1024 ||
|
|
8683
|
+
if (window.innerWidth >= 1024 || props.options?.hideGridMobileView) {
|
|
8688
8684
|
currentColumns.value.forEach((c) => {
|
|
8689
8685
|
const value = c.customWidth ? `${c.customWidth}px` : c.width ? `${c.width}px` : "";
|
|
8690
8686
|
result[`${c.name}`] = `width: ${value}; min-width: ${value};`;
|
|
@@ -8695,11 +8691,11 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
8695
8691
|
function getStyleForColumn(name) {
|
|
8696
8692
|
return columnStyles.value[name] ?? "";
|
|
8697
8693
|
}
|
|
8698
|
-
|
|
8694
|
+
const shouldSetBlankColumn = computed(() => {
|
|
8699
8695
|
const columnWithNoWidthSet = visibleColumns.value.every((x) => x.width !== void 0 || x.customWidth !== void 0);
|
|
8700
8696
|
const columnWidthDoesNotExceedGridWidth = visibleColumns.value.reduce((acc, x) => acc + (x.customWidth ?? x.width ?? 0), 0) < getGridWidth();
|
|
8701
8697
|
return columnWithNoWidthSet && columnWidthDoesNotExceedGridWidth;
|
|
8702
|
-
}
|
|
8698
|
+
});
|
|
8703
8699
|
const currentRequest = computed({
|
|
8704
8700
|
get: () => props.request,
|
|
8705
8701
|
set: (value) => emit("update:request", value)
|
|
@@ -8713,12 +8709,11 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
8713
8709
|
emit("clear-filters-clicked");
|
|
8714
8710
|
}
|
|
8715
8711
|
function resetGrouping() {
|
|
8716
|
-
var _a2;
|
|
8717
8712
|
if (gridOptions.value.groupByField) {
|
|
8718
8713
|
currentRequest.value = {
|
|
8719
8714
|
...currentRequest.value,
|
|
8720
8715
|
sort: {
|
|
8721
|
-
sortByAscending:
|
|
8716
|
+
sortByAscending: props.request.sort?.sortByAscending ?? false,
|
|
8722
8717
|
sortOnColumn: gridOptions.value.groupByField
|
|
8723
8718
|
}
|
|
8724
8719
|
};
|
|
@@ -8737,7 +8732,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
8737
8732
|
immediate: true
|
|
8738
8733
|
});
|
|
8739
8734
|
const gridData = computed(() => props.data);
|
|
8740
|
-
const internalEditMode = ref(false);
|
|
8735
|
+
const internalEditMode = ref(props.options.forceEditMode ?? false);
|
|
8741
8736
|
const editMode = computed({
|
|
8742
8737
|
get: () => props.options.forceEditMode || internalEditMode.value,
|
|
8743
8738
|
set(value) {
|
|
@@ -8769,7 +8764,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
8769
8764
|
};
|
|
8770
8765
|
}
|
|
8771
8766
|
});
|
|
8772
|
-
const searchValue = ref(
|
|
8767
|
+
const searchValue = ref(props.request.filters.find((f) => f.filterMethod === "andcontains" || f.filterOperation === FilterOperation.AND_CONTAINS)?.filterValue ?? "");
|
|
8773
8768
|
const searchableColumns = computed(() => props.columns.filter((c) => (c.type === "string" || c.type === "slot" && c.slotType === "string") && c.searchable));
|
|
8774
8769
|
watch(() => props.loading, () => {
|
|
8775
8770
|
isInitialLoad.value = false;
|
|
@@ -8784,29 +8779,20 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
8784
8779
|
watch(() => props.data, () => {
|
|
8785
8780
|
setPageNumberIfPageNumberExceedsAvailablePages();
|
|
8786
8781
|
function setPageNumberIfPageNumberExceedsAvailablePages() {
|
|
8787
|
-
|
|
8788
|
-
if (((_a2 = props.data) == null ? void 0 : _a2.results.length) === 0 && currentRequest.value.pageNumber > 1) {
|
|
8782
|
+
if (props.data?.results.length === 0 && currentRequest.value.pageNumber > 1) {
|
|
8789
8783
|
currentRequest.value.pageNumber = props.data.totalRecords > 0 ? Math.ceil(props.data.totalRecords / currentRequest.value.pageSize) : 1;
|
|
8790
8784
|
}
|
|
8791
8785
|
}
|
|
8792
8786
|
});
|
|
8793
8787
|
function changeColumnWidth(columnIndex, newWidth) {
|
|
8794
|
-
|
|
8795
|
-
visibleColumns.value[columnIndex].customWidth = newWidth;
|
|
8796
|
-
} else if (visibleColumns.value[columnIndex].width && visibleColumns.value[columnIndex].width > newWidth) {
|
|
8797
|
-
visibleColumns.value[columnIndex].customWidth = void 0;
|
|
8798
|
-
} else {
|
|
8799
|
-
visibleColumns.value[columnIndex].customWidth = newWidth;
|
|
8800
|
-
}
|
|
8788
|
+
visibleColumns.value[columnIndex].customWidth = newWidth;
|
|
8801
8789
|
setColumnStyles();
|
|
8802
8790
|
}
|
|
8803
8791
|
watch(() => props.options.groupByField, resetGrouping, { immediate: true });
|
|
8792
|
+
watch(() => props.columns, setColumnStyles, { deep: true });
|
|
8804
8793
|
const gridSearchRef = ref();
|
|
8805
8794
|
__expose({
|
|
8806
|
-
focusMegaSearch: () =>
|
|
8807
|
-
var _a2;
|
|
8808
|
-
return (_a2 = gridSearchRef.value) == null ? void 0 : _a2.focusMegaSearch();
|
|
8809
|
-
}
|
|
8795
|
+
focusMegaSearch: () => gridSearchRef.value?.focusMegaSearch()
|
|
8810
8796
|
});
|
|
8811
8797
|
return (_ctx, _cache) => {
|
|
8812
8798
|
return openBlock(), createElementBlock("div", _hoisted_1$u, [
|
|
@@ -8882,7 +8868,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
8882
8868
|
span: 1
|
|
8883
8869
|
}, null, 4);
|
|
8884
8870
|
}), 128)),
|
|
8885
|
-
shouldSetBlankColumn
|
|
8871
|
+
shouldSetBlankColumn.value ? (openBlock(), createElementBlock("col", _hoisted_4$a)) : createCommentVNode("", true)
|
|
8886
8872
|
], 2),
|
|
8887
8873
|
createVNode(_sfc_main$E, {
|
|
8888
8874
|
request: headerRequest.value,
|
|
@@ -9102,8 +9088,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
9102
9088
|
const request = useModel(__props, "request");
|
|
9103
9089
|
const { t: t2 } = useI18n();
|
|
9104
9090
|
function isActiveSort(column, isAscending) {
|
|
9105
|
-
|
|
9106
|
-
return ((_a = request.value.sort) == null ? void 0 : _a.sortOnColumn) === column.field && ((_b = request.value.sort) == null ? void 0 : _b.sortByAscending) === isAscending;
|
|
9091
|
+
return request.value.sort?.sortOnColumn === column.field && request.value.sort?.sortByAscending === isAscending;
|
|
9107
9092
|
}
|
|
9108
9093
|
function setSort(field) {
|
|
9109
9094
|
if (typeof field !== "undefined") {
|
|
@@ -9259,13 +9244,12 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
9259
9244
|
const isSmallGrid = computed(() => props.options.smallGridText ?? false);
|
|
9260
9245
|
const isAlternatingRows = computed(() => props.options.alternatingRows ?? false);
|
|
9261
9246
|
return (_ctx, _cache) => {
|
|
9262
|
-
var _a;
|
|
9263
9247
|
return openBlock(), createElementBlock("div", _hoisted_1$q, [
|
|
9264
9248
|
_ctx.initialLoad && _ctx.pageSize > 0 ? (openBlock(), createBlock(_sfc_main$y, {
|
|
9265
9249
|
key: 0,
|
|
9266
9250
|
"page-size": _ctx.pageSize,
|
|
9267
9251
|
"column-count": _ctx.columns.length
|
|
9268
|
-
}, null, 8, ["page-size", "column-count"])) : (
|
|
9252
|
+
}, null, 8, ["page-size", "column-count"])) : (_ctx.data?.results.length ?? 0) < 1 && _ctx.initialLoad === false ? (openBlock(), createElementBlock("div", {
|
|
9269
9253
|
key: 1,
|
|
9270
9254
|
class: normalizeClass(["cl:col-[1_/_-1] cl:text-center cl:w-full", [
|
|
9271
9255
|
isSmallGrid.value ? "cl:p-1" : "cl:p-2"
|
|
@@ -9332,11 +9316,11 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
9332
9316
|
let date;
|
|
9333
9317
|
if (props.timeZone) {
|
|
9334
9318
|
date = DateTime.fromISO(value, {
|
|
9335
|
-
locale:
|
|
9319
|
+
locale: dateFormatLocaleOverride?.value ?? locale2.value
|
|
9336
9320
|
}).setZone(props.timeZone);
|
|
9337
9321
|
} else {
|
|
9338
9322
|
date = DateTime.fromISO(value, {
|
|
9339
|
-
locale:
|
|
9323
|
+
locale: dateFormatLocaleOverride?.value ?? locale2.value,
|
|
9340
9324
|
zone: "UTC"
|
|
9341
9325
|
});
|
|
9342
9326
|
}
|
|
@@ -9397,7 +9381,6 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
9397
9381
|
}
|
|
9398
9382
|
}
|
|
9399
9383
|
return (_ctx, _cache) => {
|
|
9400
|
-
var _a;
|
|
9401
9384
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
9402
9385
|
class: [
|
|
9403
9386
|
_ctx.isSmallGrid ? "cl:px-1 cl:py-1.5 cl:text-xs" : "cl:p-2 cl:text-sm"
|
|
@@ -9424,7 +9407,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
9424
9407
|
key: 3,
|
|
9425
9408
|
id: unref(id),
|
|
9426
9409
|
class: "cl:inline-block cl:whitespace-nowrap"
|
|
9427
|
-
}, toDisplayString(unref(t2)(
|
|
9410
|
+
}, toDisplayString(unref(t2)(_ctx.column.listEntries.find((entry) => entry.value === _ctx.data[_ctx.column.field])?.translationKey ?? "")), 9, _hoisted_2$h)) : _ctx.column.type === "number" && _ctx.column.field !== void 0 ? (openBlock(), createElementBlock("span", {
|
|
9428
9411
|
key: 4,
|
|
9429
9412
|
id: unref(id),
|
|
9430
9413
|
class: "cl:inline-block cl:whitespace-nowrap"
|
|
@@ -9441,13 +9424,13 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
9441
9424
|
const _sfc_main$u = {};
|
|
9442
9425
|
const _hoisted_1$o = { class: "cl:border cl:border-off-white cl:border-t cl:flex cl:justify-between cl:p-2" };
|
|
9443
9426
|
function _sfc_render$2(_ctx, _cache) {
|
|
9444
|
-
return openBlock(), createElementBlock("div", _hoisted_1$o, _cache[0] || (_cache[0] = [
|
|
9427
|
+
return openBlock(), createElementBlock("div", _hoisted_1$o, [..._cache[0] || (_cache[0] = [
|
|
9445
9428
|
createElementVNode("div", { class: "cl:flex cl:gap-2 cl:w-full" }, [
|
|
9446
9429
|
createElementVNode("p", { class: "cl:animate-pulse cl:basis-3/12 cl:bg-grey-1 cl:leading-none cl:rounded-full" }, " "),
|
|
9447
9430
|
createElementVNode("p", { class: "cl:animate-pulse cl:basis-1/12 cl:bg-grey-1 cl:leading-none cl:rounded-full" }, " ")
|
|
9448
9431
|
], -1),
|
|
9449
9432
|
createElementVNode("p", { class: "cl:animate-pulse cl:basis-1/12 cl:bg-grey-1 cl:leading-none cl:rounded-full" }, " ", -1)
|
|
9450
|
-
]));
|
|
9433
|
+
])]);
|
|
9451
9434
|
}
|
|
9452
9435
|
const clUiGridLiteFooterSkeleton = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$2]]);
|
|
9453
9436
|
const _hoisted_1$n = { class: "cl:flex cl:gap-4" };
|
|
@@ -9480,10 +9463,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
9480
9463
|
const props = __props;
|
|
9481
9464
|
const request = useModel(__props, "request");
|
|
9482
9465
|
const { t: t2 } = useI18n();
|
|
9483
|
-
const totalPages = computed(() =>
|
|
9484
|
-
var _a;
|
|
9485
|
-
return props.data !== null ? Math.ceil((((_a = props.data) == null ? void 0 : _a.totalRecords) ?? 0) / request.value.pageSize) : 1;
|
|
9486
|
-
});
|
|
9466
|
+
const totalPages = computed(() => props.data !== null ? Math.ceil((props.data?.totalRecords ?? 0) / request.value.pageSize) : 1);
|
|
9487
9467
|
const pageNumbers = computed(() => {
|
|
9488
9468
|
const calculatedPageNumbers = Array.from(Array(totalPages.value + 1).keys());
|
|
9489
9469
|
let results = [];
|
|
@@ -9497,7 +9477,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
9497
9477
|
});
|
|
9498
9478
|
function setPage(pageNumber) {
|
|
9499
9479
|
const filterRequest = copy(request.value);
|
|
9500
|
-
pageNumber
|
|
9480
|
+
pageNumber ??= 1;
|
|
9501
9481
|
if (filterRequest.pageNumber !== pageNumber) {
|
|
9502
9482
|
filterRequest.pageNumber = Math.max(Math.min(Math.trunc(pageNumber), totalPages.value), 1);
|
|
9503
9483
|
request.value = filterRequest;
|
|
@@ -9510,10 +9490,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
9510
9490
|
50
|
|
9511
9491
|
];
|
|
9512
9492
|
const availablePageSizes = computed(() => {
|
|
9513
|
-
return pageSizes.filter((size) =>
|
|
9514
|
-
var _a;
|
|
9515
|
-
return size <= (((_a = props.data) == null ? void 0 : _a.totalRecords) ?? 0);
|
|
9516
|
-
});
|
|
9493
|
+
return pageSizes.filter((size) => size <= (props.data?.totalRecords ?? 0));
|
|
9517
9494
|
});
|
|
9518
9495
|
function setPageSize(pageSize) {
|
|
9519
9496
|
const filterRequest = copy(request.value);
|
|
@@ -9522,9 +9499,8 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
9522
9499
|
request.value = filterRequest;
|
|
9523
9500
|
}
|
|
9524
9501
|
return (_ctx, _cache) => {
|
|
9525
|
-
var _a;
|
|
9526
9502
|
const _component_icon = resolveComponent("icon");
|
|
9527
|
-
return _ctx.initialLoad ? (openBlock(), createBlock(clUiGridLiteFooterSkeleton, { key: 0 })) :
|
|
9503
|
+
return _ctx.initialLoad ? (openBlock(), createBlock(clUiGridLiteFooterSkeleton, { key: 0 })) : _ctx.data?.results.length && request.value && totalPages.value > 1 ? (openBlock(), createElementBlock("div", {
|
|
9528
9504
|
key: 1,
|
|
9529
9505
|
class: normalizeClass(["cl:border-off-white cl:border-t cl:flex cl:flex-wrap cl:gap-y-2 cl:justify-between cl:p-2 cl:text-grey-4", [
|
|
9530
9506
|
_ctx.options.smallGridText ? "cl:px-1 cl:py-1.5 cl:text-xs" : "cl:p-2 cl:text-sm"
|
|
@@ -9823,8 +9799,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
9823
9799
|
const showQuickDates = useMediaQuery("(min-height: 800px)");
|
|
9824
9800
|
__expose({
|
|
9825
9801
|
focus() {
|
|
9826
|
-
|
|
9827
|
-
(_a = input.value) == null ? void 0 : _a.focus();
|
|
9802
|
+
input.value?.focus();
|
|
9828
9803
|
}
|
|
9829
9804
|
});
|
|
9830
9805
|
return (_ctx, _cache) => {
|
|
@@ -10014,12 +9989,10 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
10014
9989
|
);
|
|
10015
9990
|
__expose({
|
|
10016
9991
|
focus() {
|
|
10017
|
-
|
|
10018
|
-
(_a = inputRef.value) == null ? void 0 : _a.focus();
|
|
9992
|
+
inputRef.value?.focus();
|
|
10019
9993
|
},
|
|
10020
9994
|
blur() {
|
|
10021
|
-
|
|
10022
|
-
(_a = inputRef.value) == null ? void 0 : _a.blur();
|
|
9995
|
+
inputRef.value?.blur();
|
|
10023
9996
|
}
|
|
10024
9997
|
});
|
|
10025
9998
|
return (_ctx, _cache) => {
|
|
@@ -10101,8 +10074,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
10101
10074
|
const showNumericInput = ref(false);
|
|
10102
10075
|
__expose({
|
|
10103
10076
|
focus() {
|
|
10104
|
-
|
|
10105
|
-
(_a = sliderRef.value) == null ? void 0 : _a.focus();
|
|
10077
|
+
sliderRef.value?.focus();
|
|
10106
10078
|
}
|
|
10107
10079
|
});
|
|
10108
10080
|
return (_ctx, _cache) => {
|
|
@@ -10131,9 +10103,9 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
10131
10103
|
disabled: _ctx.disabled,
|
|
10132
10104
|
placeholder: _ctx.placeholder
|
|
10133
10105
|
}, {
|
|
10134
|
-
default: withCtx(() => _cache[5] || (_cache[5] = [
|
|
10106
|
+
default: withCtx(() => [..._cache[5] || (_cache[5] = [
|
|
10135
10107
|
createElementVNode("span", null, null, -1)
|
|
10136
|
-
])),
|
|
10108
|
+
])]),
|
|
10137
10109
|
_: 1
|
|
10138
10110
|
}, 8, ["modelValue", "format", "precision", "min", "max", "step", "disabled", "placeholder"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
10139
10111
|
withDirectives(createElementVNode("input", {
|
|
@@ -10319,9 +10291,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
10319
10291
|
const focused = ref(false);
|
|
10320
10292
|
const lostFocus = ref(false);
|
|
10321
10293
|
const showRequiredAsterisk = computed(() => {
|
|
10322
|
-
var _a;
|
|
10323
10294
|
let showAsterisk = props.isRequired;
|
|
10324
|
-
if (lostFocus.value &&
|
|
10295
|
+
if (lostFocus.value && currentValue.value?.toString().trim() === "" && props.requiredText.trim() !== "") {
|
|
10325
10296
|
showAsterisk = false;
|
|
10326
10297
|
}
|
|
10327
10298
|
return !props.hideRequiredAsterisk && showAsterisk;
|
|
@@ -10345,10 +10316,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
10345
10316
|
const displayValidationMessage = ref(true);
|
|
10346
10317
|
const internalErrors = ref([]);
|
|
10347
10318
|
const errors = computed(() => {
|
|
10348
|
-
var _a, _b;
|
|
10349
10319
|
return [
|
|
10350
|
-
...
|
|
10351
|
-
...
|
|
10320
|
+
...internalErrors.value?.filter((e) => (e?.length ?? 0) > 0) ?? [],
|
|
10321
|
+
...props.externalErrors?.filter((e) => (e?.length ?? 0) > 0) ?? []
|
|
10352
10322
|
].join("\n");
|
|
10353
10323
|
});
|
|
10354
10324
|
const currencyInputOptions = computed(() => {
|
|
@@ -10509,19 +10479,17 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
10509
10479
|
);
|
|
10510
10480
|
__expose({
|
|
10511
10481
|
focus() {
|
|
10512
|
-
var _a, _b;
|
|
10513
10482
|
if (props.inputType === "currency") {
|
|
10514
|
-
|
|
10483
|
+
currencyInputRef?.value?.focus();
|
|
10515
10484
|
} else {
|
|
10516
|
-
|
|
10485
|
+
inputElement.value?.focus();
|
|
10517
10486
|
}
|
|
10518
10487
|
},
|
|
10519
10488
|
blur() {
|
|
10520
|
-
var _a, _b;
|
|
10521
10489
|
if (props.inputType === "currency") {
|
|
10522
|
-
|
|
10490
|
+
currencyInputRef?.value?.blur();
|
|
10523
10491
|
} else {
|
|
10524
|
-
|
|
10492
|
+
inputElement.value?.blur();
|
|
10525
10493
|
}
|
|
10526
10494
|
}
|
|
10527
10495
|
});
|
|
@@ -10910,9 +10878,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
10910
10878
|
placeholder: unref(t2)("login.email"),
|
|
10911
10879
|
autocomplete: "username"
|
|
10912
10880
|
}, {
|
|
10913
|
-
default: withCtx(() => _cache[4] || (_cache[4] = [
|
|
10881
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
10914
10882
|
createElementVNode("span", null, null, -1)
|
|
10915
|
-
])),
|
|
10883
|
+
])]),
|
|
10916
10884
|
_: 1
|
|
10917
10885
|
}, 8, ["modelValue", "class", "errors", "placeholder"]),
|
|
10918
10886
|
usernameValid.value ? (openBlock(), createElementBlock("div", _hoisted_9, toDisplayString(unref(t2)("login.validEmail")), 1)) : createCommentVNode("", true)
|
|
@@ -10953,9 +10921,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
10953
10921
|
placeholder: unref(t2)("login.password"),
|
|
10954
10922
|
autocomplete: "current-password"
|
|
10955
10923
|
}, {
|
|
10956
|
-
default: withCtx(() => _cache[5] || (_cache[5] = [
|
|
10924
|
+
default: withCtx(() => [..._cache[5] || (_cache[5] = [
|
|
10957
10925
|
createElementVNode("span", null, null, -1)
|
|
10958
|
-
])),
|
|
10926
|
+
])]),
|
|
10959
10927
|
_: 1
|
|
10960
10928
|
}, 8, ["modelValue", "class", "type", "placeholder"])
|
|
10961
10929
|
])
|
|
@@ -10976,22 +10944,19 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
10976
10944
|
])
|
|
10977
10945
|
], 2),
|
|
10978
10946
|
createVNode(Transition, { name: "cl:grow-down" }, {
|
|
10979
|
-
default: withCtx(() =>
|
|
10980
|
-
|
|
10981
|
-
|
|
10982
|
-
|
|
10983
|
-
|
|
10984
|
-
|
|
10985
|
-
|
|
10986
|
-
|
|
10987
|
-
|
|
10988
|
-
|
|
10989
|
-
|
|
10990
|
-
|
|
10991
|
-
|
|
10992
|
-
])
|
|
10993
|
-
];
|
|
10994
|
-
}),
|
|
10947
|
+
default: withCtx(() => [
|
|
10948
|
+
withDirectives(createElementVNode("span", _hoisted_13, [
|
|
10949
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.errors, (error, index2) => {
|
|
10950
|
+
return openBlock(), createElementBlock("div", {
|
|
10951
|
+
id: "cl-ui-login-errors",
|
|
10952
|
+
key: index2,
|
|
10953
|
+
class: "cl:font-semibold"
|
|
10954
|
+
}, toDisplayString(error), 1);
|
|
10955
|
+
}), 128))
|
|
10956
|
+
], 512), [
|
|
10957
|
+
[vShow, _ctx.errors?.length]
|
|
10958
|
+
])
|
|
10959
|
+
]),
|
|
10995
10960
|
_: 1
|
|
10996
10961
|
})
|
|
10997
10962
|
])
|
|
@@ -11050,7 +11015,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
11050
11015
|
}
|
|
11051
11016
|
});
|
|
11052
11017
|
}
|
|
11053
|
-
emit("open-state", !!
|
|
11018
|
+
emit("open-state", !!group?.open, groupID);
|
|
11054
11019
|
}
|
|
11055
11020
|
const size = useWindowSize();
|
|
11056
11021
|
watch(
|
|
@@ -11408,9 +11373,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
11408
11373
|
}
|
|
11409
11374
|
});
|
|
11410
11375
|
function handleDrop(payload) {
|
|
11411
|
-
var _a;
|
|
11412
11376
|
if (props.disabled === false) {
|
|
11413
|
-
const filesUploaded = [...
|
|
11377
|
+
const filesUploaded = [...payload?.dataTransfer?.files];
|
|
11414
11378
|
validateAndEmitFiles(filesUploaded);
|
|
11415
11379
|
}
|
|
11416
11380
|
}
|
|
@@ -11571,9 +11535,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
11571
11535
|
}
|
|
11572
11536
|
}
|
|
11573
11537
|
const canDeselect = computed(() => {
|
|
11574
|
-
var _a;
|
|
11575
11538
|
if (Array.isArray(currentSelection.value)) {
|
|
11576
|
-
return props.required === false || (
|
|
11539
|
+
return props.required === false || (currentSelection.value?.length ?? 0) > 1;
|
|
11577
11540
|
} else {
|
|
11578
11541
|
return !props.required;
|
|
11579
11542
|
}
|
|
@@ -11994,14 +11957,13 @@ function concatenatePath(...fragments) {
|
|
|
11994
11957
|
return fragments.map((f) => f.replace(/ /g, "_")).join(" ");
|
|
11995
11958
|
}
|
|
11996
11959
|
function findNodeByPath(rootNodes, path) {
|
|
11997
|
-
var _a;
|
|
11998
11960
|
const pathFragments = path.split(" ");
|
|
11999
11961
|
let currentNode = void 0;
|
|
12000
11962
|
for (const fragment of pathFragments) {
|
|
12001
11963
|
if (!currentNode) {
|
|
12002
11964
|
currentNode = rootNodes.find((node) => node.id === fragment);
|
|
12003
11965
|
} else {
|
|
12004
|
-
currentNode =
|
|
11966
|
+
currentNode = currentNode.children?.find((node) => node.id === fragment);
|
|
12005
11967
|
}
|
|
12006
11968
|
if (!currentNode) {
|
|
12007
11969
|
break;
|
|
@@ -12036,7 +11998,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12036
11998
|
}),
|
|
12037
11999
|
emits: /* @__PURE__ */ mergeModels(["recalculate-tree-path", "set-child-node-height"], ["update:selectedPath"]),
|
|
12038
12000
|
setup(__props, { emit: __emit }) {
|
|
12039
|
-
var _a;
|
|
12040
12001
|
const props = __props;
|
|
12041
12002
|
const selectedPath = useModel(__props, "selectedPath");
|
|
12042
12003
|
const emit = __emit;
|
|
@@ -12048,7 +12009,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
12048
12009
|
const childSubtreeDivs = ref([]);
|
|
12049
12010
|
const childSubtreeHeights = computed(() => childSubtreeDivs.value.map((el) => useElementSize(el)));
|
|
12050
12011
|
const childSubtreeBoundingBoxes = computed(() => childSubtreeDivs.value.map((el) => useElementBounding(el)));
|
|
12051
|
-
const childNodeContentHeights = ref(new Array(
|
|
12012
|
+
const childNodeContentHeights = ref(new Array(props.rootNode.children?.length ?? 0).fill(0));
|
|
12052
12013
|
const treePathBranchesAt = ref([]);
|
|
12053
12014
|
function recalculateTreePathBranches() {
|
|
12054
12015
|
nodeContentBoundingBox.update();
|