@bagelink/vue 1.4.14 → 1.4.18
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/dist/components/ImportData.vue.d.ts +2 -1
- package/dist/components/ImportData.vue.d.ts.map +1 -1
- package/dist/components/Slider.vue.d.ts +6 -0
- package/dist/components/Slider.vue.d.ts.map +1 -1
- package/dist/index.cjs +436 -164
- package/dist/index.mjs +437 -165
- package/dist/style.css +11 -5
- package/dist/utils/useSearch.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/ImportData.vue +20 -247
- package/src/components/Slider.vue +508 -85
- package/src/components/lightbox/Lightbox.vue +1 -1
- package/src/styles/text.css +8 -0
- package/src/utils/useSearch.ts +22 -3
package/dist/index.cjs
CHANGED
|
@@ -32513,53 +32513,54 @@ const _hoisted_5$6 = {
|
|
|
32513
32513
|
key: 0,
|
|
32514
32514
|
class: "config-section flex gap-05 pb-2 m_flex-wrap"
|
|
32515
32515
|
};
|
|
32516
|
-
const _hoisted_6$5 =
|
|
32517
|
-
const _hoisted_7$4 = {
|
|
32518
|
-
const _hoisted_8$3 = { class: "
|
|
32519
|
-
const _hoisted_9$3 = { class: "
|
|
32520
|
-
const _hoisted_10$2 = {
|
|
32521
|
-
const _hoisted_11$2 = { key:
|
|
32522
|
-
const _hoisted_12$2 = { key:
|
|
32523
|
-
const _hoisted_13$1 = {
|
|
32516
|
+
const _hoisted_6$5 = ["textContent"];
|
|
32517
|
+
const _hoisted_7$4 = { key: 1 };
|
|
32518
|
+
const _hoisted_8$3 = { class: "mapping-table" };
|
|
32519
|
+
const _hoisted_9$3 = { class: "field-label" };
|
|
32520
|
+
const _hoisted_10$2 = { class: "grid-span-2 input-size line-height-1 inline-block" };
|
|
32521
|
+
const _hoisted_11$2 = { key: 0 };
|
|
32522
|
+
const _hoisted_12$2 = { key: 2 };
|
|
32523
|
+
const _hoisted_13$1 = { key: 3 };
|
|
32524
|
+
const _hoisted_14$1 = {
|
|
32524
32525
|
key: 0,
|
|
32525
32526
|
class: "field-disabled-reason"
|
|
32526
32527
|
};
|
|
32527
|
-
const
|
|
32528
|
-
const
|
|
32529
|
-
const
|
|
32530
|
-
const
|
|
32531
|
-
const
|
|
32528
|
+
const _hoisted_15 = { key: 1 };
|
|
32529
|
+
const _hoisted_16 = { class: "fileColSelect" };
|
|
32530
|
+
const _hoisted_17 = { class: "default-value-container hideLabel" };
|
|
32531
|
+
const _hoisted_18 = { class: "flex gap-05 my-05" };
|
|
32532
|
+
const _hoisted_19 = {
|
|
32532
32533
|
key: 0,
|
|
32533
32534
|
class: "action-buttons"
|
|
32534
32535
|
};
|
|
32535
|
-
const
|
|
32536
|
+
const _hoisted_20 = {
|
|
32536
32537
|
key: 1,
|
|
32537
32538
|
class: "action-buttons"
|
|
32538
32539
|
};
|
|
32539
|
-
const
|
|
32540
|
-
const
|
|
32541
|
-
const
|
|
32542
|
-
const
|
|
32543
|
-
const
|
|
32544
|
-
const
|
|
32545
|
-
const
|
|
32546
|
-
const
|
|
32547
|
-
const
|
|
32548
|
-
const
|
|
32549
|
-
const
|
|
32540
|
+
const _hoisted_21 = { key: 0 };
|
|
32541
|
+
const _hoisted_22 = { class: "flex space-between gap-1 mb-1 border-bottom pb-05 m_flex-wrap" };
|
|
32542
|
+
const _hoisted_23 = { class: "grid-span-2 input-size line-height-1" };
|
|
32543
|
+
const _hoisted_24 = { class: "grid-span-4 input-size line-height-1 ellipsis-1" };
|
|
32544
|
+
const _hoisted_25 = { class: "grid grid-wrap-7 gap-1 align-items-center m_gap-025 m_pb-1-5" };
|
|
32545
|
+
const _hoisted_26 = { class: "grid-span-2" };
|
|
32546
|
+
const _hoisted_27 = { class: "grid-span-4" };
|
|
32547
|
+
const _hoisted_28 = { class: "flex pt-05" };
|
|
32548
|
+
const _hoisted_29 = { key: 0 };
|
|
32549
|
+
const _hoisted_30 = { class: "pb-05" };
|
|
32550
|
+
const _hoisted_31 = {
|
|
32550
32551
|
key: 0,
|
|
32551
32552
|
class: "mb-05"
|
|
32552
32553
|
};
|
|
32553
|
-
const
|
|
32554
|
-
const
|
|
32555
|
-
const
|
|
32556
|
-
const
|
|
32557
|
-
const
|
|
32558
|
-
const
|
|
32559
|
-
const
|
|
32560
|
-
const
|
|
32561
|
-
const
|
|
32562
|
-
const
|
|
32554
|
+
const _hoisted_32 = { key: 1 };
|
|
32555
|
+
const _hoisted_33 = { class: "mb-1" };
|
|
32556
|
+
const _hoisted_34 = { key: 0 };
|
|
32557
|
+
const _hoisted_35 = { class: "flex gap-1" };
|
|
32558
|
+
const _hoisted_36 = { class: "default-value-container" };
|
|
32559
|
+
const _hoisted_37 = { class: "action-buttons-cell" };
|
|
32560
|
+
const _hoisted_38 = { class: "flex pt-05" };
|
|
32561
|
+
const _hoisted_39 = { class: "mt-1" };
|
|
32562
|
+
const _hoisted_40 = { class: "flex gap-1 mt-1 space-between" };
|
|
32563
|
+
const _hoisted_41 = { key: 0 };
|
|
32563
32564
|
const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
32564
32565
|
__name: "ImportData",
|
|
32565
32566
|
props: {
|
|
@@ -32596,33 +32597,33 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
|
32596
32597
|
const sheetNames = vue.ref([]);
|
|
32597
32598
|
const selectedSheet = vue.ref("");
|
|
32598
32599
|
const hasHeaders = vue.ref(true);
|
|
32599
|
-
const fieldMapping = vue.reactive({});
|
|
32600
32600
|
const isLoading = vue.ref(false);
|
|
32601
32601
|
const showPreviewModal = vue.ref(false);
|
|
32602
32602
|
const previewData = vue.ref([]);
|
|
32603
32603
|
const mappingComplete = vue.ref(false);
|
|
32604
32604
|
const fileHeaders = vue.ref([]);
|
|
32605
|
-
const defaultValues = vue.reactive({});
|
|
32606
|
-
const transformations = vue.reactive({});
|
|
32607
32605
|
const showTransformDialog = vue.ref(false);
|
|
32608
32606
|
const selectedTransformField = vue.ref(null);
|
|
32607
|
+
const showRelatedDialog = vue.ref(false);
|
|
32608
|
+
const selectedRelationField = vue.ref(null);
|
|
32609
|
+
const selectedSourceValue = vue.ref("");
|
|
32610
|
+
const selectedTargetValue = vue.ref("");
|
|
32611
|
+
const showRelatedTransformDialog = vue.ref(false);
|
|
32612
|
+
const selectedRelatedTransformField = vue.ref(null);
|
|
32613
|
+
const selectedRelatedSourceValue = vue.ref("");
|
|
32614
|
+
const selectedRelatedTargetValue = vue.ref("");
|
|
32615
|
+
const fieldMapping = vue.reactive({});
|
|
32616
|
+
const defaultValues = vue.reactive({});
|
|
32617
|
+
const transformations = vue.reactive({});
|
|
32609
32618
|
const fieldDataTypes = vue.reactive({});
|
|
32610
32619
|
const relatedFiles = vue.reactive({});
|
|
32611
32620
|
const relatedFileData = vue.reactive({});
|
|
32612
32621
|
const relatedFileMappings = vue.reactive({});
|
|
32613
|
-
const showRelatedDialog = vue.ref(false);
|
|
32614
|
-
const selectedRelationField = vue.ref(null);
|
|
32615
32622
|
const relatedKeyField = vue.reactive({});
|
|
32616
32623
|
const parentKeyField = vue.reactive({});
|
|
32617
|
-
const selectedSourceValue = vue.ref("");
|
|
32618
|
-
const selectedTargetValue = vue.ref("");
|
|
32619
32624
|
const relatedFieldDataTypes = vue.reactive({});
|
|
32620
32625
|
const relatedDefaultValues = vue.reactive({});
|
|
32621
32626
|
const relatedTransformations = vue.reactive({});
|
|
32622
|
-
const showRelatedTransformDialog = vue.ref(false);
|
|
32623
|
-
const selectedRelatedTransformField = vue.ref(null);
|
|
32624
|
-
const selectedRelatedSourceValue = vue.ref("");
|
|
32625
|
-
const selectedRelatedTargetValue = vue.ref("");
|
|
32626
32627
|
const formData = vue.ref({});
|
|
32627
32628
|
const { renderField } = useSchemaField({
|
|
32628
32629
|
mode: "form",
|
|
@@ -32774,9 +32775,7 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
|
32774
32775
|
});
|
|
32775
32776
|
return allFields;
|
|
32776
32777
|
}
|
|
32777
|
-
const schemaFields = vue.computed(() =>
|
|
32778
|
-
return getAllFields(props2.schema || []);
|
|
32779
|
-
});
|
|
32778
|
+
const schemaFields = vue.computed(() => getAllFields(vue.toValue(props2.schema) || []));
|
|
32780
32779
|
function isFieldRequired(field) {
|
|
32781
32780
|
if (field.isArrayField && field.parentField) {
|
|
32782
32781
|
return false;
|
|
@@ -32926,9 +32925,7 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
|
32926
32925
|
value = defaultValues[field.id];
|
|
32927
32926
|
useDefault = true;
|
|
32928
32927
|
}
|
|
32929
|
-
if (value === null)
|
|
32930
|
-
return;
|
|
32931
|
-
}
|
|
32928
|
+
if (value === null) return;
|
|
32932
32929
|
if (!useDefault && transformations[field.id] && transformations[field.id].length > 0) {
|
|
32933
32930
|
const transform = transformations[field.id].find(
|
|
32934
32931
|
(t) => t.sourceValue == value || t.sourceValue === String(value)
|
|
@@ -33063,7 +33060,6 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
|
33063
33060
|
return {
|
|
33064
33061
|
key: field.id,
|
|
33065
33062
|
title: field.label,
|
|
33066
|
-
// Special formatting for array child fields
|
|
33067
33063
|
formatter: field.isArrayField ? formatArrayChildValue : void 0
|
|
33068
33064
|
};
|
|
33069
33065
|
});
|
|
@@ -33632,7 +33628,9 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33632
33628
|
size: "1.5",
|
|
33633
33629
|
weight: "300"
|
|
33634
33630
|
}),
|
|
33635
|
-
vue.createElementVNode("p",
|
|
33631
|
+
vue.createElementVNode("p", {
|
|
33632
|
+
textContent: vue.toDisplayString(file.value.name)
|
|
33633
|
+
}, null, 8, _hoisted_6$5)
|
|
33636
33634
|
]),
|
|
33637
33635
|
_: 1
|
|
33638
33636
|
})), [
|
|
@@ -33653,9 +33651,9 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33653
33651
|
style: { "--bgl-accent-color": "var(--bgl-black)", "--bgl-primary": "var(--bgl-black)" }
|
|
33654
33652
|
}, null, 8, ["modelValue"])
|
|
33655
33653
|
])) : vue.createCommentVNode("", true),
|
|
33656
|
-
file.value && !isLoading.value && fileHeaders.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div",
|
|
33654
|
+
file.value && !isLoading.value && fileHeaders.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$4, [
|
|
33657
33655
|
_cache[36] || (_cache[36] = vue.createElementVNode("p", { class: "label pb-1 border-bottom mb-1" }, " Match each required field to a column from your file, set default values, or configure transformations ", -1)),
|
|
33658
|
-
vue.createElementVNode("div",
|
|
33656
|
+
vue.createElementVNode("div", _hoisted_8$3, [
|
|
33659
33657
|
_cache[33] || (_cache[33] = vue.createElementVNode("div", { class: "grid grid-wrap-5 gap-1 bold pb-1 m_none" }, [
|
|
33660
33658
|
vue.createElementVNode("p", null, "Schema Field"),
|
|
33661
33659
|
vue.createElementVNode("p", null, "Column from File"),
|
|
@@ -33669,9 +33667,9 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33669
33667
|
class: vue.normalizeClass(["grid grid-wrap-5 gap-1 m_gap-025 m_pb-1-5", { "array-field-row": field.isArrayField || field.$el === "array" }])
|
|
33670
33668
|
}, [
|
|
33671
33669
|
vue.createElementVNode("div", null, [
|
|
33672
|
-
vue.createElementVNode("div",
|
|
33673
|
-
vue.createElementVNode("p",
|
|
33674
|
-
field.isArrayField ? (vue.openBlock(), vue.createElementBlock("span",
|
|
33670
|
+
vue.createElementVNode("div", _hoisted_9$3, [
|
|
33671
|
+
vue.createElementVNode("p", _hoisted_10$2, vue.toDisplayString(field.label), 1),
|
|
33672
|
+
field.isArrayField ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_11$2, "↳")) : vue.createCommentVNode("", true),
|
|
33675
33673
|
field.$el === "array" ? (vue.openBlock(), vue.createBlock(vue.unref(Pill), {
|
|
33676
33674
|
key: 1,
|
|
33677
33675
|
class: "txt10 ms-05",
|
|
@@ -33679,13 +33677,13 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33679
33677
|
thin: "",
|
|
33680
33678
|
value: "Array"
|
|
33681
33679
|
})) : vue.createCommentVNode("", true),
|
|
33682
|
-
isFieldRequired(field) ? (vue.openBlock(), vue.createElementBlock("span",
|
|
33683
|
-
getFieldDescription(field).isConditional ? (vue.openBlock(), vue.createElementBlock("span",
|
|
33680
|
+
isFieldRequired(field) ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_12$2, "*")) : vue.createCommentVNode("", true),
|
|
33681
|
+
getFieldDescription(field).isConditional ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_13$1, "†")) : vue.createCommentVNode("", true)
|
|
33684
33682
|
]),
|
|
33685
|
-
field.disabled ? (vue.openBlock(), vue.createElementBlock("div",
|
|
33686
|
-
getFieldDescription(field).isConditional ? (vue.openBlock(), vue.createElementBlock("div",
|
|
33683
|
+
field.disabled ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14$1, vue.toDisplayString(field.disabledReason), 1)) : vue.createCommentVNode("", true),
|
|
33684
|
+
getFieldDescription(field).isConditional ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15, vue.toDisplayString(getFieldDescription(field).description), 1)) : vue.createCommentVNode("", true)
|
|
33687
33685
|
]),
|
|
33688
|
-
vue.createElementVNode("div",
|
|
33686
|
+
vue.createElementVNode("div", _hoisted_16, [
|
|
33689
33687
|
vue.createVNode(vue.unref(SelectInput), {
|
|
33690
33688
|
modelValue: fieldMapping[field.id],
|
|
33691
33689
|
"onUpdate:modelValue": ($event) => fieldMapping[field.id] = $event,
|
|
@@ -33698,7 +33696,7 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33698
33696
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "required", "disabled", "onChange"])
|
|
33699
33697
|
]),
|
|
33700
33698
|
vue.createElementVNode("div", null, [
|
|
33701
|
-
vue.createElementVNode("div",
|
|
33699
|
+
vue.createElementVNode("div", _hoisted_17, [
|
|
33702
33700
|
vue.createTextVNode(vue.toDisplayString(initDefaultValue(field.id)) + " ", 1),
|
|
33703
33701
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(renderField)(getFieldWithDefaults(field)))))
|
|
33704
33702
|
])
|
|
@@ -33712,7 +33710,7 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33712
33710
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
33713
33711
|
]),
|
|
33714
33712
|
vue.createElementVNode("div", null, [
|
|
33715
|
-
vue.createElementVNode("div",
|
|
33713
|
+
vue.createElementVNode("div", _hoisted_18, [
|
|
33716
33714
|
vue.withDirectives(vue.createVNode(vue.unref(Btn), {
|
|
33717
33715
|
thin: "",
|
|
33718
33716
|
disabled: field.disabled,
|
|
@@ -33735,7 +33733,7 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33735
33733
|
], 2);
|
|
33736
33734
|
}), 128))
|
|
33737
33735
|
]),
|
|
33738
|
-
mappingComplete.value ? (vue.openBlock(), vue.createElementBlock("div",
|
|
33736
|
+
mappingComplete.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
|
|
33739
33737
|
vue.createVNode(vue.unref(Btn), { onClick: showPreview }, {
|
|
33740
33738
|
default: vue.withCtx(() => _cache[34] || (_cache[34] = [
|
|
33741
33739
|
vue.createTextVNode(" Preview Data ")
|
|
@@ -33743,7 +33741,7 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33743
33741
|
_: 1,
|
|
33744
33742
|
__: [34]
|
|
33745
33743
|
})
|
|
33746
|
-
])) : (vue.openBlock(), vue.createElementBlock("div",
|
|
33744
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_20, _cache[35] || (_cache[35] = [
|
|
33747
33745
|
vue.createElementVNode("div", { class: "mapping-incomplete-message" }, " Please map the required fields to continue ", -1)
|
|
33748
33746
|
])))
|
|
33749
33747
|
])) : vue.createCommentVNode("", true)
|
|
@@ -33755,8 +33753,8 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33755
33753
|
width: "800"
|
|
33756
33754
|
}, {
|
|
33757
33755
|
default: vue.withCtx(() => [
|
|
33758
|
-
selectedTransformField.value ? (vue.openBlock(), vue.createElementBlock("div",
|
|
33759
|
-
vue.createElementVNode("div",
|
|
33756
|
+
selectedTransformField.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_21, [
|
|
33757
|
+
vue.createElementVNode("div", _hoisted_22, [
|
|
33760
33758
|
vue.createElementVNode("p", null, [
|
|
33761
33759
|
_cache[37] || (_cache[37] = vue.createTextVNode("Create transformations for ")),
|
|
33762
33760
|
vue.createElementVNode("strong", null, vue.toDisplayString(selectedTransformField.value.label), 1)
|
|
@@ -33780,8 +33778,8 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33780
33778
|
key: index2,
|
|
33781
33779
|
class: "grid grid-wrap-7 gap-1 align-items-center m_gap-025 m_pb-1-5"
|
|
33782
33780
|
}, [
|
|
33783
|
-
vue.createElementVNode("p",
|
|
33784
|
-
vue.createElementVNode("p",
|
|
33781
|
+
vue.createElementVNode("p", _hoisted_23, vue.toDisplayString(transform.sourceValue), 1),
|
|
33782
|
+
vue.createElementVNode("p", _hoisted_24, vue.toDisplayString(transform.targetValue), 1),
|
|
33785
33783
|
vue.withDirectives(vue.createVNode(vue.unref(Btn), {
|
|
33786
33784
|
class: "mb-05",
|
|
33787
33785
|
thin: "",
|
|
@@ -33793,8 +33791,8 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33793
33791
|
])
|
|
33794
33792
|
]);
|
|
33795
33793
|
}), 128)),
|
|
33796
|
-
vue.createElementVNode("div",
|
|
33797
|
-
vue.createElementVNode("div",
|
|
33794
|
+
vue.createElementVNode("div", _hoisted_25, [
|
|
33795
|
+
vue.createElementVNode("div", _hoisted_26, [
|
|
33798
33796
|
fieldMapping[selectedTransformField.value.id] ? (vue.openBlock(), vue.createBlock(vue.unref(SelectInput), {
|
|
33799
33797
|
key: 0,
|
|
33800
33798
|
modelValue: selectedSourceValue.value,
|
|
@@ -33810,7 +33808,7 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33810
33808
|
placeholder: "Source value"
|
|
33811
33809
|
}, null, 8, ["modelValue"]))
|
|
33812
33810
|
]),
|
|
33813
|
-
vue.createElementVNode("div",
|
|
33811
|
+
vue.createElementVNode("div", _hoisted_27, [
|
|
33814
33812
|
selectedTransformField.value.options && selectedTransformField.value.options.length > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(SelectInput), {
|
|
33815
33813
|
key: 0,
|
|
33816
33814
|
modelValue: selectedTargetValue.value,
|
|
@@ -33838,7 +33836,7 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33838
33836
|
])
|
|
33839
33837
|
])
|
|
33840
33838
|
]),
|
|
33841
|
-
vue.createElementVNode("div",
|
|
33839
|
+
vue.createElementVNode("div", _hoisted_28, [
|
|
33842
33840
|
vue.createVNode(vue.unref(Btn), {
|
|
33843
33841
|
class: "ms-auto",
|
|
33844
33842
|
value: "Close",
|
|
@@ -33858,9 +33856,9 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33858
33856
|
default: vue.withCtx(() => {
|
|
33859
33857
|
var _a;
|
|
33860
33858
|
return [
|
|
33861
|
-
selectedRelationField.value ? (vue.openBlock(), vue.createElementBlock("div",
|
|
33862
|
-
vue.createElementVNode("p",
|
|
33863
|
-
!relatedFiles[selectedRelationField.value.id] ? (vue.openBlock(), vue.createElementBlock("div",
|
|
33859
|
+
selectedRelationField.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_29, [
|
|
33860
|
+
vue.createElementVNode("p", _hoisted_30, " Upload a file with related data for " + vue.toDisplayString(selectedRelationField.value.label), 1),
|
|
33861
|
+
!relatedFiles[selectedRelationField.value.id] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_31, [
|
|
33864
33862
|
vue.createVNode(vue.unref(DragOver), {
|
|
33865
33863
|
accept: ".csv,.xls,.xlsx",
|
|
33866
33864
|
browse: "",
|
|
@@ -33883,8 +33881,8 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33883
33881
|
]),
|
|
33884
33882
|
_: 1
|
|
33885
33883
|
})
|
|
33886
|
-
])) : (vue.openBlock(), vue.createElementBlock("div",
|
|
33887
|
-
vue.createElementVNode("div",
|
|
33884
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_32, [
|
|
33885
|
+
vue.createElementVNode("div", _hoisted_33, [
|
|
33888
33886
|
vue.createVNode(vue.unref(Pill), null, {
|
|
33889
33887
|
default: vue.withCtx(() => [
|
|
33890
33888
|
vue.createTextVNode(vue.toDisplayString(relatedFiles[selectedRelationField.value.id].name), 1)
|
|
@@ -33898,9 +33896,9 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33898
33896
|
onClick: _cache[12] || (_cache[12] = ($event) => relatedFiles[selectedRelationField.value.id] = null)
|
|
33899
33897
|
})
|
|
33900
33898
|
]),
|
|
33901
|
-
relatedFileData[selectedRelationField.value.id] ? (vue.openBlock(), vue.createElementBlock("div",
|
|
33899
|
+
relatedFileData[selectedRelationField.value.id] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_34, [
|
|
33902
33900
|
_cache[44] || (_cache[44] = vue.createElementVNode("h4", null, "Configure Relationship", -1)),
|
|
33903
|
-
vue.createElementVNode("div",
|
|
33901
|
+
vue.createElementVNode("div", _hoisted_35, [
|
|
33904
33902
|
vue.createVNode(vue.unref(SelectInput), {
|
|
33905
33903
|
modelValue: parentKeyField[selectedRelationField.value.id],
|
|
33906
33904
|
"onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => parentKeyField[selectedRelationField.value.id] = $event),
|
|
@@ -33941,7 +33939,7 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33941
33939
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options"])
|
|
33942
33940
|
]),
|
|
33943
33941
|
vue.createElementVNode("td", null, [
|
|
33944
|
-
vue.createElementVNode("div",
|
|
33942
|
+
vue.createElementVNode("div", _hoisted_36, [
|
|
33945
33943
|
vue.createTextVNode(vue.toDisplayString(initRelatedDefaultValue(selectedRelationField.value.id, schemaItem.id)) + " ", 1),
|
|
33946
33944
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(renderField)(getRelatedFieldWithDefaults(selectedRelationField.value.id, schemaItem)))))
|
|
33947
33945
|
])
|
|
@@ -33955,7 +33953,7 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33955
33953
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
33956
33954
|
]),
|
|
33957
33955
|
vue.createElementVNode("td", null, [
|
|
33958
|
-
vue.createElementVNode("div",
|
|
33956
|
+
vue.createElementVNode("div", _hoisted_37, [
|
|
33959
33957
|
vue.createVNode(vue.unref(Btn), {
|
|
33960
33958
|
thin: "",
|
|
33961
33959
|
icon: "transform",
|
|
@@ -33975,7 +33973,7 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33975
33973
|
])
|
|
33976
33974
|
])) : vue.createCommentVNode("", true)
|
|
33977
33975
|
])),
|
|
33978
|
-
vue.createElementVNode("div",
|
|
33976
|
+
vue.createElementVNode("div", _hoisted_38, [
|
|
33979
33977
|
vue.createVNode(vue.unref(Btn), {
|
|
33980
33978
|
class: "ms-auto",
|
|
33981
33979
|
value: "Close",
|
|
@@ -34004,8 +34002,8 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
34004
34002
|
}, null, 8, ["modelValue", "column-config"])
|
|
34005
34003
|
]),
|
|
34006
34004
|
vue.createElementVNode("div", null, [
|
|
34007
|
-
vue.createElementVNode("p",
|
|
34008
|
-
vue.createElementVNode("div",
|
|
34005
|
+
vue.createElementVNode("p", _hoisted_39, " Showing all " + vue.toDisplayString(previewData.value.length) + " records. You can edit values directly. ", 1),
|
|
34006
|
+
vue.createElementVNode("div", _hoisted_40, [
|
|
34009
34007
|
vue.createVNode(vue.unref(Btn), {
|
|
34010
34008
|
flat: "",
|
|
34011
34009
|
thin: "",
|
|
@@ -34030,7 +34028,7 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
34030
34028
|
default: vue.withCtx(() => {
|
|
34031
34029
|
var _a, _b, _c;
|
|
34032
34030
|
return [
|
|
34033
|
-
selectedRelatedTransformField.value ? (vue.openBlock(), vue.createElementBlock("div",
|
|
34031
|
+
selectedRelatedTransformField.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_41, [
|
|
34034
34032
|
vue.createElementVNode("p", null, [
|
|
34035
34033
|
_cache[46] || (_cache[46] = vue.createTextVNode("Create transformations for ")),
|
|
34036
34034
|
vue.createElementVNode("strong", null, vue.toDisplayString(selectedRelatedTransformField.value.field.label), 1),
|
|
@@ -34134,13 +34132,8 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
34134
34132
|
]),
|
|
34135
34133
|
vue.createElementVNode("div", null, [
|
|
34136
34134
|
vue.createVNode(vue.unref(Btn), {
|
|
34135
|
+
value: "Close",
|
|
34137
34136
|
onClick: _cache[27] || (_cache[27] = ($event) => showRelatedTransformDialog.value = false)
|
|
34138
|
-
}, {
|
|
34139
|
-
default: vue.withCtx(() => _cache[48] || (_cache[48] = [
|
|
34140
|
-
vue.createTextVNode(" Close ")
|
|
34141
|
-
])),
|
|
34142
|
-
_: 1,
|
|
34143
|
-
__: [48]
|
|
34144
34137
|
})
|
|
34145
34138
|
])
|
|
34146
34139
|
])) : vue.createCommentVNode("", true)
|
|
@@ -35711,6 +35704,7 @@ const _hoisted_2$3 = {
|
|
|
35711
35704
|
};
|
|
35712
35705
|
const _hoisted_3$3 = ["aria-label", "onClick"];
|
|
35713
35706
|
const dragThreshold = 10;
|
|
35707
|
+
const MAX_EMPTY_REBUILD_ATTEMPTS = 3;
|
|
35714
35708
|
const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
35715
35709
|
__name: "Slider",
|
|
35716
35710
|
props: {
|
|
@@ -35745,6 +35739,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
35745
35739
|
const { innerWidth } = useDevice();
|
|
35746
35740
|
const transformProperty = vue.ref("transform");
|
|
35747
35741
|
const pointerDown = vue.ref(false);
|
|
35742
|
+
const isBuilding = vue.ref(false);
|
|
35748
35743
|
const drag = vue.ref({
|
|
35749
35744
|
startX: 0,
|
|
35750
35745
|
endX: 0,
|
|
@@ -35757,6 +35752,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
35757
35752
|
const linearAnimationFrame = vue.ref(null);
|
|
35758
35753
|
const isHovering = vue.ref(false);
|
|
35759
35754
|
const linearOffset = vue.ref(0);
|
|
35755
|
+
const emptyRebuildAttempts = vue.ref(0);
|
|
35760
35756
|
const perPage = vue.computed(() => {
|
|
35761
35757
|
if (typeof props2.perPage === "number") {
|
|
35762
35758
|
return props2.perPage;
|
|
@@ -35803,10 +35799,40 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
35803
35799
|
if (!innerElements.value.length) return 0;
|
|
35804
35800
|
return config.value.loop ? innerElements.value.length : Math.ceil(innerElements.value.length - perPage.value + 1);
|
|
35805
35801
|
});
|
|
35806
|
-
vue.
|
|
35802
|
+
vue.ref(false);
|
|
35803
|
+
const slotObserver = vue.ref(null);
|
|
35804
|
+
const isMounted = vue.ref(false);
|
|
35805
|
+
const slotContainer = vue.ref(null);
|
|
35806
|
+
vue.onMounted(() => {
|
|
35807
|
+
isMounted.value = true;
|
|
35808
|
+
vue.nextTick(() => {
|
|
35809
|
+
init();
|
|
35810
|
+
});
|
|
35811
|
+
});
|
|
35807
35812
|
vue.onBeforeUnmount(() => {
|
|
35813
|
+
isMounted.value = false;
|
|
35808
35814
|
stopAutoplay();
|
|
35809
35815
|
detachEvents();
|
|
35816
|
+
if (slotObserver.value) {
|
|
35817
|
+
slotObserver.value.disconnect();
|
|
35818
|
+
slotObserver.value = null;
|
|
35819
|
+
}
|
|
35820
|
+
if (carouselRef.value) {
|
|
35821
|
+
carouselRef.value.innerHTML = "";
|
|
35822
|
+
}
|
|
35823
|
+
});
|
|
35824
|
+
vue.onUpdated(() => {
|
|
35825
|
+
if (isMounted.value && !isBuilding.value && emptyRebuildAttempts.value < MAX_EMPTY_REBUILD_ATTEMPTS) {
|
|
35826
|
+
if (slotContainer.value) {
|
|
35827
|
+
const slotElements = Array.from(slotContainer.value.children);
|
|
35828
|
+
if (slotElements.length !== innerElements.value.length || innerElements.value.length === 0) {
|
|
35829
|
+
innerElements.value = slotElements.map((el) => el.cloneNode(true));
|
|
35830
|
+
vue.nextTick(() => {
|
|
35831
|
+
updateSlider();
|
|
35832
|
+
});
|
|
35833
|
+
}
|
|
35834
|
+
}
|
|
35835
|
+
}
|
|
35810
35836
|
});
|
|
35811
35837
|
vue.watch(() => props2, () => {
|
|
35812
35838
|
resizeHandler();
|
|
@@ -35857,10 +35883,12 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
35857
35883
|
}
|
|
35858
35884
|
}
|
|
35859
35885
|
async function init() {
|
|
35860
|
-
if (!carouselRef.value) return;
|
|
35886
|
+
if (!carouselRef.value || !slotContainer.value || !isMounted.value) return;
|
|
35861
35887
|
transformProperty.value = webkitOrNot();
|
|
35862
35888
|
await sleep(10);
|
|
35863
|
-
innerElements.value = Array.from(
|
|
35889
|
+
innerElements.value = Array.from(slotContainer.value.children).map(
|
|
35890
|
+
(el) => el.cloneNode(true)
|
|
35891
|
+
);
|
|
35864
35892
|
if (!innerElements.value.length) {
|
|
35865
35893
|
console.warn("No carousel items found during initialization");
|
|
35866
35894
|
return;
|
|
@@ -35870,7 +35898,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
35870
35898
|
carouselRef.value.style.overflow = "hidden";
|
|
35871
35899
|
carouselRef.value.style.direction = config.value.rtl ? "rtl" : "ltr";
|
|
35872
35900
|
attachEvents();
|
|
35873
|
-
|
|
35901
|
+
setupSlotObserver();
|
|
35874
35902
|
buildSliderFrame();
|
|
35875
35903
|
if (config.value.autoplay !== "disabled") {
|
|
35876
35904
|
startAutoplay();
|
|
@@ -35878,79 +35906,152 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
35878
35906
|
config.value.onInit();
|
|
35879
35907
|
}
|
|
35880
35908
|
function buildSliderFrame() {
|
|
35881
|
-
if (!carouselRef.value) return;
|
|
35882
|
-
|
|
35883
|
-
|
|
35884
|
-
|
|
35885
|
-
|
|
35886
|
-
|
|
35887
|
-
|
|
35888
|
-
|
|
35889
|
-
|
|
35890
|
-
|
|
35891
|
-
|
|
35892
|
-
|
|
35893
|
-
|
|
35894
|
-
carouselRef.value.
|
|
35895
|
-
|
|
35896
|
-
|
|
35897
|
-
|
|
35898
|
-
|
|
35899
|
-
|
|
35900
|
-
|
|
35901
|
-
|
|
35909
|
+
if (!carouselRef.value || !isMounted.value) return;
|
|
35910
|
+
isBuilding.value = true;
|
|
35911
|
+
try {
|
|
35912
|
+
if (!innerElements.value.length) {
|
|
35913
|
+
console.warn("No carousel items found");
|
|
35914
|
+
emptyRebuildAttempts.value++;
|
|
35915
|
+
isBuilding.value = false;
|
|
35916
|
+
return;
|
|
35917
|
+
}
|
|
35918
|
+
emptyRebuildAttempts.value = 0;
|
|
35919
|
+
const originalCount = innerElements.value.length;
|
|
35920
|
+
const widthItem = selectorWidth.value / perPage.value;
|
|
35921
|
+
const itemsToBuild = config.value.loop ? originalCount + 2 * perPage.value : originalCount;
|
|
35922
|
+
carouselRef.value.innerHTML = "";
|
|
35923
|
+
if (!sliderFrame.value) {
|
|
35924
|
+
sliderFrame.value = document.createElement("div");
|
|
35925
|
+
} else {
|
|
35926
|
+
while (sliderFrame.value.firstChild) {
|
|
35927
|
+
sliderFrame.value.removeChild(sliderFrame.value.firstChild);
|
|
35928
|
+
}
|
|
35929
|
+
}
|
|
35930
|
+
sliderFrame.value.style.width = `${widthItem * itemsToBuild}px`;
|
|
35931
|
+
enableTransition();
|
|
35932
|
+
if (config.value.draggable) {
|
|
35933
|
+
carouselRef.value.style.cursor = "-webkit-grab";
|
|
35934
|
+
}
|
|
35935
|
+
const docFragment = document.createDocumentFragment();
|
|
35936
|
+
if (config.value.loop && innerElements.value.length > 0) {
|
|
35937
|
+
for (let i2 = originalCount - perPage.value; i2 < originalCount; i2++) {
|
|
35938
|
+
if (i2 >= 0 && i2 < originalCount) {
|
|
35939
|
+
const original = innerElements.value[i2];
|
|
35940
|
+
const clone2 = original.cloneNode(true);
|
|
35941
|
+
if (clone2 instanceof HTMLElement) {
|
|
35942
|
+
clone2.setAttribute("data-clone", "before");
|
|
35943
|
+
copyAttributesAndEvents(original, clone2);
|
|
35944
|
+
}
|
|
35945
|
+
const wrapped = buildSliderFrameItem(clone2);
|
|
35946
|
+
docFragment.appendChild(wrapped);
|
|
35947
|
+
}
|
|
35948
|
+
}
|
|
35949
|
+
}
|
|
35950
|
+
for (let i2 = 0; i2 < originalCount; i2++) {
|
|
35951
|
+
const element = innerElements.value[i2];
|
|
35952
|
+
const wrapped = buildSliderFrameItem(element.cloneNode(true));
|
|
35953
|
+
docFragment.appendChild(wrapped);
|
|
35954
|
+
}
|
|
35955
|
+
if (config.value.loop && innerElements.value.length > 0) {
|
|
35956
|
+
for (let i2 = 0; i2 < perPage.value; i2++) {
|
|
35957
|
+
if (i2 >= 0 && i2 < originalCount) {
|
|
35958
|
+
const original = innerElements.value[i2];
|
|
35959
|
+
const clone2 = original.cloneNode(true);
|
|
35960
|
+
if (clone2 instanceof HTMLElement) {
|
|
35961
|
+
clone2.setAttribute("data-clone", "after");
|
|
35962
|
+
copyAttributesAndEvents(original, clone2);
|
|
35963
|
+
}
|
|
35964
|
+
const wrapped = buildSliderFrameItem(clone2);
|
|
35965
|
+
docFragment.appendChild(wrapped);
|
|
35966
|
+
}
|
|
35902
35967
|
}
|
|
35903
35968
|
}
|
|
35969
|
+
sliderFrame.value.appendChild(docFragment);
|
|
35970
|
+
carouselRef.value.appendChild(sliderFrame.value);
|
|
35971
|
+
if (currentSlide.value >= innerElements.value.length) {
|
|
35972
|
+
currentSlide.value = Math.max(0, innerElements.value.length - 1);
|
|
35973
|
+
}
|
|
35974
|
+
slideToCurrent();
|
|
35975
|
+
} catch (error) {
|
|
35976
|
+
console.error("Error building slider frame:", error);
|
|
35977
|
+
} finally {
|
|
35978
|
+
isBuilding.value = false;
|
|
35904
35979
|
}
|
|
35905
|
-
|
|
35906
|
-
|
|
35907
|
-
|
|
35980
|
+
}
|
|
35981
|
+
function copyAttributesAndEvents(original, clone2) {
|
|
35982
|
+
if (!(original instanceof HTMLElement) || !(clone2 instanceof HTMLElement)) {
|
|
35983
|
+
return;
|
|
35908
35984
|
}
|
|
35909
|
-
|
|
35910
|
-
|
|
35911
|
-
|
|
35912
|
-
|
|
35913
|
-
|
|
35914
|
-
}
|
|
35985
|
+
const allAttrs = original.attributes;
|
|
35986
|
+
for (let i2 = 0; i2 < allAttrs.length; i2++) {
|
|
35987
|
+
const attr = allAttrs[i2];
|
|
35988
|
+
if (attr.name !== "id") {
|
|
35989
|
+
clone2.setAttribute(attr.name, attr.value);
|
|
35915
35990
|
}
|
|
35916
35991
|
}
|
|
35917
|
-
|
|
35918
|
-
|
|
35919
|
-
|
|
35920
|
-
|
|
35921
|
-
|
|
35922
|
-
|
|
35992
|
+
clone2.addEventListener("click", (e) => {
|
|
35993
|
+
if (typeof original.click === "function") {
|
|
35994
|
+
const clickEvent = new MouseEvent("click", {
|
|
35995
|
+
bubbles: true,
|
|
35996
|
+
cancelable: true,
|
|
35997
|
+
view: window
|
|
35998
|
+
});
|
|
35999
|
+
original.dispatchEvent(clickEvent);
|
|
36000
|
+
e.stopPropagation();
|
|
36001
|
+
}
|
|
36002
|
+
});
|
|
36003
|
+
if (original.tagName === "A" && clone2.tagName === "A") {
|
|
36004
|
+
const originalHref = original.getAttribute("href");
|
|
36005
|
+
if (originalHref) {
|
|
36006
|
+
clone2.addEventListener("click", (e) => {
|
|
36007
|
+
e.preventDefault();
|
|
36008
|
+
if (original.onclick) {
|
|
36009
|
+
original.onclick(new MouseEvent("click"));
|
|
36010
|
+
} else {
|
|
36011
|
+
const targetBlank = original.getAttribute("target") === "_blank";
|
|
36012
|
+
if (targetBlank) {
|
|
36013
|
+
window.open(originalHref, "_blank");
|
|
36014
|
+
} else {
|
|
36015
|
+
window.location.href = originalHref;
|
|
36016
|
+
}
|
|
36017
|
+
}
|
|
36018
|
+
});
|
|
35923
36019
|
}
|
|
35924
36020
|
}
|
|
35925
|
-
slideToCurrent();
|
|
35926
36021
|
}
|
|
35927
36022
|
function buildSliderFrameItem(elm) {
|
|
35928
36023
|
const elementContainer = document.createElement("div");
|
|
35929
36024
|
elementContainer.style.cssFloat = config.value.rtl ? "right" : "left";
|
|
35930
36025
|
elementContainer.style.float = config.value.rtl ? "right" : "left";
|
|
35931
36026
|
elementContainer.style.padding = config.value.slideGap ? `${config.value.slideGap / 2}rem` : "0";
|
|
35932
|
-
const percentage = config.value.loop ? 100 / (innerElements.value.length + perPage.value
|
|
36027
|
+
const percentage = config.value.loop ? 100 / (innerElements.value.length + 2 * perPage.value) : 100 / innerElements.value.length;
|
|
35933
36028
|
elementContainer.style.width = `${percentage}%`;
|
|
35934
36029
|
elementContainer.appendChild(elm);
|
|
35935
36030
|
return elementContainer;
|
|
35936
36031
|
}
|
|
35937
36032
|
function slideToCurrent(enableTransitionFlag) {
|
|
35938
|
-
|
|
35939
|
-
|
|
35940
|
-
|
|
35941
|
-
|
|
36033
|
+
try {
|
|
36034
|
+
if (!isMounted.value || !innerElements.value.length || !sliderFrame.value) return;
|
|
36035
|
+
const currentSlideValue = config.value.loop ? currentSlide.value + perPage.value : currentSlide.value;
|
|
36036
|
+
const offset2 = (config.value.rtl ? 1 : -1) * currentSlideValue * (selectorWidth.value / perPage.value);
|
|
36037
|
+
if (enableTransitionFlag && sliderFrame.value) {
|
|
35942
36038
|
requestAnimationFrame(() => {
|
|
35943
|
-
|
|
35944
|
-
|
|
36039
|
+
if (!isMounted.value || !sliderFrame.value) return;
|
|
36040
|
+
requestAnimationFrame(() => {
|
|
36041
|
+
if (!isMounted.value || !sliderFrame.value) return;
|
|
36042
|
+
enableTransition();
|
|
35945
36043
|
sliderFrame.value.style[transformProperty.value] = `translate3d(${offset2}px, 0, 0)`;
|
|
35946
|
-
}
|
|
36044
|
+
});
|
|
35947
36045
|
});
|
|
35948
|
-
})
|
|
35949
|
-
|
|
35950
|
-
|
|
36046
|
+
} else if (sliderFrame.value) {
|
|
36047
|
+
sliderFrame.value.style[transformProperty.value] = `translate3d(${offset2}px, 0, 0)`;
|
|
36048
|
+
}
|
|
36049
|
+
} catch (error) {
|
|
36050
|
+
console.error("Error in slideToCurrent:", error);
|
|
35951
36051
|
}
|
|
35952
36052
|
}
|
|
35953
36053
|
function prev(howManySlides = 1) {
|
|
36054
|
+
if (!isMounted.value || isBuilding.value || !innerElements.value.length) return;
|
|
35954
36055
|
const beforeChange = currentSlide.value;
|
|
35955
36056
|
if (config.value.loop) {
|
|
35956
36057
|
const isNewIndexClone = currentSlide.value - howManySlides < 0;
|
|
@@ -35980,6 +36081,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
35980
36081
|
}
|
|
35981
36082
|
}
|
|
35982
36083
|
function next(howManySlides = 1) {
|
|
36084
|
+
if (!isMounted.value || isBuilding.value || !innerElements.value.length) return;
|
|
35983
36085
|
const beforeChange = currentSlide.value;
|
|
35984
36086
|
if (config.value.loop) {
|
|
35985
36087
|
const isNewIndexClone = currentSlide.value + howManySlides > innerElements.value.length - perPage.value;
|
|
@@ -36032,6 +36134,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
36032
36134
|
}
|
|
36033
36135
|
}
|
|
36034
36136
|
function updateAfterDrag() {
|
|
36137
|
+
if (!isMounted.value) return;
|
|
36035
36138
|
const movement = (config.value.rtl ? -1 : 1) * (drag.value.endX - drag.value.startX);
|
|
36036
36139
|
const movementDistance = Math.abs(movement);
|
|
36037
36140
|
const howManySliderToSlide = config.value.multipleDrag ? Math.ceil(movementDistance / (selectorWidth.value / perPage.value)) : 1;
|
|
@@ -36063,6 +36166,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
36063
36166
|
};
|
|
36064
36167
|
}
|
|
36065
36168
|
function touchstartHandler(e) {
|
|
36169
|
+
if (isBuilding.value || !isMounted.value) return;
|
|
36066
36170
|
const target = e.target;
|
|
36067
36171
|
const ignoreTags = ["TEXTAREA", "OPTION", "INPUT", "SELECT"].includes(target.nodeName);
|
|
36068
36172
|
if (ignoreTags) {
|
|
@@ -36079,8 +36183,30 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
36079
36183
|
if (isLink || isImage) {
|
|
36080
36184
|
drag.value.preventClick = false;
|
|
36081
36185
|
}
|
|
36186
|
+
if (config.value.autoplay === "linear" && sliderFrame.value) {
|
|
36187
|
+
const currentTransform = getComputedStyle(sliderFrame.value)[transformProperty.value];
|
|
36188
|
+
if (currentTransform && currentTransform !== "none") {
|
|
36189
|
+
try {
|
|
36190
|
+
const matrix2 = new DOMMatrix(currentTransform);
|
|
36191
|
+
const currentX = matrix2.m41;
|
|
36192
|
+
const itemWidth = selectorWidth.value / perPage.value;
|
|
36193
|
+
if (config.value.loop) {
|
|
36194
|
+
const totalPosition = Math.abs(currentX);
|
|
36195
|
+
const slidePosition = Math.round(totalPosition / itemWidth) - perPage.value;
|
|
36196
|
+
currentSlide.value = slidePosition >= 0 ? slidePosition % innerElements.value.length : (innerElements.value.length + slidePosition % innerElements.value.length) % innerElements.value.length;
|
|
36197
|
+
} else {
|
|
36198
|
+
const slidePosition = Math.round(Math.abs(currentX) / itemWidth);
|
|
36199
|
+
currentSlide.value = Math.min(Math.max(slidePosition, 0), innerElements.value.length - perPage.value);
|
|
36200
|
+
}
|
|
36201
|
+
} catch (e22) {
|
|
36202
|
+
console.error("Error parsing transform matrix:", e22);
|
|
36203
|
+
}
|
|
36204
|
+
}
|
|
36205
|
+
stopAutoplay();
|
|
36206
|
+
}
|
|
36082
36207
|
}
|
|
36083
36208
|
function touchendHandler(e) {
|
|
36209
|
+
if (isBuilding.value || !isMounted.value) return;
|
|
36084
36210
|
e.stopPropagation();
|
|
36085
36211
|
if (isDragging.value) {
|
|
36086
36212
|
document.addEventListener("click", function preventClickAfterDrag(event) {
|
|
@@ -36097,11 +36223,12 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
36097
36223
|
updateAfterDrag();
|
|
36098
36224
|
}
|
|
36099
36225
|
clearDrag();
|
|
36100
|
-
if (config.value.autoplay !== "disabled") {
|
|
36226
|
+
if (config.value.autoplay !== "disabled" && !isHovering.value && isMounted.value) {
|
|
36101
36227
|
startAutoplay();
|
|
36102
36228
|
}
|
|
36103
36229
|
}
|
|
36104
36230
|
function touchmoveHandler(e) {
|
|
36231
|
+
if (isBuilding.value || !isMounted.value) return;
|
|
36105
36232
|
e.stopPropagation();
|
|
36106
36233
|
if (drag.value.letItGo === null) {
|
|
36107
36234
|
drag.value.letItGo = Math.abs(drag.value.startY - e.touches[0].pageY) < Math.abs(drag.value.startX - e.touches[0].pageX);
|
|
@@ -36125,6 +36252,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
36125
36252
|
}
|
|
36126
36253
|
}
|
|
36127
36254
|
function mousedownHandler(e) {
|
|
36255
|
+
if (isBuilding.value || !isMounted.value) return;
|
|
36128
36256
|
const target = e.target;
|
|
36129
36257
|
const ignoreTags = ["TEXTAREA", "OPTION", "INPUT", "SELECT"].includes(target.nodeName);
|
|
36130
36258
|
if (ignoreTags) return;
|
|
@@ -36139,8 +36267,30 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
36139
36267
|
if (isLink || isImage) {
|
|
36140
36268
|
drag.value.preventClick = false;
|
|
36141
36269
|
}
|
|
36270
|
+
if (config.value.autoplay === "linear" && sliderFrame.value) {
|
|
36271
|
+
const currentTransform = getComputedStyle(sliderFrame.value)[transformProperty.value];
|
|
36272
|
+
if (currentTransform && currentTransform !== "none") {
|
|
36273
|
+
try {
|
|
36274
|
+
const matrix2 = new DOMMatrix(currentTransform);
|
|
36275
|
+
const currentX = matrix2.m41;
|
|
36276
|
+
const itemWidth = selectorWidth.value / perPage.value;
|
|
36277
|
+
if (config.value.loop) {
|
|
36278
|
+
const totalPosition = Math.abs(currentX);
|
|
36279
|
+
const slidePosition = Math.round(totalPosition / itemWidth) - perPage.value;
|
|
36280
|
+
currentSlide.value = slidePosition >= 0 ? slidePosition % innerElements.value.length : (innerElements.value.length + slidePosition % innerElements.value.length) % innerElements.value.length;
|
|
36281
|
+
} else {
|
|
36282
|
+
const slidePosition = Math.round(Math.abs(currentX) / itemWidth);
|
|
36283
|
+
currentSlide.value = Math.min(Math.max(slidePosition, 0), innerElements.value.length - perPage.value);
|
|
36284
|
+
}
|
|
36285
|
+
} catch (e22) {
|
|
36286
|
+
console.error("Error parsing transform matrix:", e22);
|
|
36287
|
+
}
|
|
36288
|
+
}
|
|
36289
|
+
stopAutoplay();
|
|
36290
|
+
}
|
|
36142
36291
|
}
|
|
36143
36292
|
function mouseupHandler(e) {
|
|
36293
|
+
if (isBuilding.value || !isMounted.value) return;
|
|
36144
36294
|
e.stopPropagation();
|
|
36145
36295
|
if (isDragging.value) {
|
|
36146
36296
|
document.addEventListener("click", function preventClickAfterDrag(event) {
|
|
@@ -36160,11 +36310,12 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
36160
36310
|
updateAfterDrag();
|
|
36161
36311
|
}
|
|
36162
36312
|
clearDrag();
|
|
36163
|
-
if (config.value.autoplay !== "disabled" && !isHovering.value) {
|
|
36313
|
+
if (config.value.autoplay !== "disabled" && !isHovering.value && isMounted.value) {
|
|
36164
36314
|
startAutoplay();
|
|
36165
36315
|
}
|
|
36166
36316
|
}
|
|
36167
36317
|
function mousemoveHandler(e) {
|
|
36318
|
+
if (isBuilding.value || !isMounted.value) return;
|
|
36168
36319
|
e.preventDefault();
|
|
36169
36320
|
if (pointerDown.value) {
|
|
36170
36321
|
drag.value.endX = e.pageX;
|
|
@@ -36187,6 +36338,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
36187
36338
|
}
|
|
36188
36339
|
}
|
|
36189
36340
|
function mouseleaveHandler(e) {
|
|
36341
|
+
if (isBuilding.value || !isMounted.value) return;
|
|
36190
36342
|
if (pointerDown.value) {
|
|
36191
36343
|
pointerDown.value = false;
|
|
36192
36344
|
if (carouselRef.value) {
|
|
@@ -36200,6 +36352,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
36200
36352
|
}
|
|
36201
36353
|
}
|
|
36202
36354
|
function clickHandler2(e) {
|
|
36355
|
+
if (isBuilding.value || !isMounted.value) return;
|
|
36203
36356
|
if (drag.value.preventClick || isDragging.value) {
|
|
36204
36357
|
e.preventDefault();
|
|
36205
36358
|
e.stopPropagation();
|
|
@@ -36210,6 +36363,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
36210
36363
|
}
|
|
36211
36364
|
function dragstartHandler(e) {
|
|
36212
36365
|
var _a;
|
|
36366
|
+
if (isBuilding.value || !isMounted.value) return;
|
|
36213
36367
|
if (config.value.draggable) {
|
|
36214
36368
|
const target = e.target;
|
|
36215
36369
|
const isDraggableElement = target.tagName === "IMG" || target.tagName === "A" || ((_a = target.parentElement) == null ? void 0 : _a.tagName) === "A";
|
|
@@ -36266,10 +36420,11 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
36266
36420
|
}
|
|
36267
36421
|
}
|
|
36268
36422
|
async function startAutoplay() {
|
|
36423
|
+
if (!isMounted.value) return;
|
|
36269
36424
|
stopAutoplay();
|
|
36270
36425
|
if (config.value.autoplay === "standard") {
|
|
36271
36426
|
autoplayTimer.value = window.setInterval(() => {
|
|
36272
|
-
if (!isHovering.value) {
|
|
36427
|
+
if (isMounted.value && !isHovering.value && !isBuilding.value) {
|
|
36273
36428
|
next();
|
|
36274
36429
|
}
|
|
36275
36430
|
}, config.value.autoplayInterval);
|
|
@@ -36288,9 +36443,15 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
36288
36443
|
}
|
|
36289
36444
|
}
|
|
36290
36445
|
function startLinearAutoplay() {
|
|
36291
|
-
|
|
36446
|
+
if (!isMounted.value || !innerElements.value.length) return;
|
|
36447
|
+
const itemWidth = selectorWidth.value / perPage.value;
|
|
36448
|
+
linearOffset.value = currentSlide.value * itemWidth;
|
|
36292
36449
|
let lastTimestamp = 0;
|
|
36293
36450
|
const animate = (timestamp2) => {
|
|
36451
|
+
if (!isMounted.value || !sliderFrame.value) {
|
|
36452
|
+
stopAutoplay();
|
|
36453
|
+
return;
|
|
36454
|
+
}
|
|
36294
36455
|
if (!lastTimestamp) lastTimestamp = timestamp2;
|
|
36295
36456
|
const elapsed = timestamp2 - lastTimestamp;
|
|
36296
36457
|
lastTimestamp = timestamp2;
|
|
@@ -36300,7 +36461,6 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
36300
36461
|
}
|
|
36301
36462
|
const pixelsToMove = elapsed / 1e3 * config.value.autoplaySpeed;
|
|
36302
36463
|
linearOffset.value += pixelsToMove;
|
|
36303
|
-
const itemWidth = selectorWidth.value / perPage.value;
|
|
36304
36464
|
const totalWidth = itemWidth * innerElements.value.length;
|
|
36305
36465
|
if (linearOffset.value >= totalWidth) {
|
|
36306
36466
|
if (config.value.loop) {
|
|
@@ -36308,22 +36468,29 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
36308
36468
|
} else {
|
|
36309
36469
|
linearOffset.value = totalWidth - itemWidth;
|
|
36310
36470
|
stopAutoplay();
|
|
36311
|
-
return;
|
|
36312
36471
|
}
|
|
36313
36472
|
}
|
|
36314
|
-
if (sliderFrame.value) {
|
|
36473
|
+
if (sliderFrame.value && !isBuilding.value) {
|
|
36315
36474
|
const direction = config.value.rtl ? 1 : -1;
|
|
36316
36475
|
sliderFrame.value.style.transition = "none";
|
|
36317
|
-
|
|
36476
|
+
let displayOffset = linearOffset.value;
|
|
36477
|
+
if (config.value.loop) {
|
|
36478
|
+
displayOffset = linearOffset.value + perPage.value * itemWidth;
|
|
36479
|
+
}
|
|
36480
|
+
sliderFrame.value.style[transformProperty.value] = `translate3d(${direction * displayOffset}px, 0, 0)`;
|
|
36318
36481
|
}
|
|
36319
36482
|
const newSlide = Math.floor(linearOffset.value / itemWidth) % innerElements.value.length;
|
|
36320
36483
|
if (newSlide !== currentSlide.value) {
|
|
36321
36484
|
currentSlide.value = newSlide;
|
|
36322
36485
|
config.value.onChange();
|
|
36323
36486
|
}
|
|
36324
|
-
|
|
36487
|
+
if (isMounted.value) {
|
|
36488
|
+
linearAnimationFrame.value = requestAnimationFrame(animate);
|
|
36489
|
+
}
|
|
36325
36490
|
};
|
|
36326
|
-
|
|
36491
|
+
if (isMounted.value) {
|
|
36492
|
+
linearAnimationFrame.value = requestAnimationFrame(animate);
|
|
36493
|
+
}
|
|
36327
36494
|
}
|
|
36328
36495
|
function mouseenterHandler() {
|
|
36329
36496
|
isHovering.value = true;
|
|
@@ -36339,6 +36506,91 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
36339
36506
|
startAutoplay();
|
|
36340
36507
|
}
|
|
36341
36508
|
}
|
|
36509
|
+
function setupSlotObserver() {
|
|
36510
|
+
if (!slotContainer.value || slotObserver.value) return;
|
|
36511
|
+
slotObserver.value = new MutationObserver((mutations) => {
|
|
36512
|
+
if (isBuilding.value || !isMounted.value || emptyRebuildAttempts.value >= MAX_EMPTY_REBUILD_ATTEMPTS) {
|
|
36513
|
+
return;
|
|
36514
|
+
}
|
|
36515
|
+
let needsRebuild = false;
|
|
36516
|
+
for (const mutation of mutations) {
|
|
36517
|
+
if (mutation.type === "childList") {
|
|
36518
|
+
needsRebuild = true;
|
|
36519
|
+
break;
|
|
36520
|
+
}
|
|
36521
|
+
}
|
|
36522
|
+
if (needsRebuild) {
|
|
36523
|
+
vue.nextTick(() => {
|
|
36524
|
+
if (isMounted.value && slotContainer.value) {
|
|
36525
|
+
innerElements.value = Array.from(slotContainer.value.children).map(
|
|
36526
|
+
(el) => el.cloneNode(true)
|
|
36527
|
+
);
|
|
36528
|
+
updateSlider();
|
|
36529
|
+
}
|
|
36530
|
+
});
|
|
36531
|
+
}
|
|
36532
|
+
});
|
|
36533
|
+
slotObserver.value.observe(slotContainer.value, {
|
|
36534
|
+
childList: true,
|
|
36535
|
+
subtree: false,
|
|
36536
|
+
attributes: false,
|
|
36537
|
+
characterData: false
|
|
36538
|
+
});
|
|
36539
|
+
}
|
|
36540
|
+
function updateSlider() {
|
|
36541
|
+
if (!carouselRef.value || !slotContainer.value || isBuilding.value || !isMounted.value) return;
|
|
36542
|
+
if (emptyRebuildAttempts.value >= MAX_EMPTY_REBUILD_ATTEMPTS) {
|
|
36543
|
+
console.warn("Too many rebuild attempts with no items, stopping");
|
|
36544
|
+
return;
|
|
36545
|
+
}
|
|
36546
|
+
try {
|
|
36547
|
+
if (slotObserver.value) {
|
|
36548
|
+
slotObserver.value.disconnect();
|
|
36549
|
+
}
|
|
36550
|
+
const slotElements = Array.from(slotContainer.value.children).map((el) => el.cloneNode(true));
|
|
36551
|
+
if (slotElements.length > 0 || innerElements.value.length > 0 && emptyRebuildAttempts.value === 0) {
|
|
36552
|
+
const previousCount = innerElements.value.length;
|
|
36553
|
+
innerElements.value = slotElements;
|
|
36554
|
+
if (currentSlide.value >= innerElements.value.length) {
|
|
36555
|
+
currentSlide.value = Math.max(0, innerElements.value.length - 1);
|
|
36556
|
+
}
|
|
36557
|
+
const isInitialPopulation = previousCount === 0 && slotElements.length > 0;
|
|
36558
|
+
const wasAutoplay = config.value.autoplay !== "disabled";
|
|
36559
|
+
if (wasAutoplay) {
|
|
36560
|
+
stopAutoplay();
|
|
36561
|
+
}
|
|
36562
|
+
buildSliderFrame();
|
|
36563
|
+
if (wasAutoplay && !isHovering.value && innerElements.value.length > 0) {
|
|
36564
|
+
setTimeout(() => {
|
|
36565
|
+
startAutoplay();
|
|
36566
|
+
}, 50);
|
|
36567
|
+
}
|
|
36568
|
+
}
|
|
36569
|
+
} catch (error) {
|
|
36570
|
+
console.error("Error updating slider:", error);
|
|
36571
|
+
} finally {
|
|
36572
|
+
if (slotObserver.value && slotContainer.value) {
|
|
36573
|
+
slotObserver.value.observe(slotContainer.value, {
|
|
36574
|
+
childList: true,
|
|
36575
|
+
subtree: false,
|
|
36576
|
+
attributes: false,
|
|
36577
|
+
characterData: false
|
|
36578
|
+
});
|
|
36579
|
+
}
|
|
36580
|
+
}
|
|
36581
|
+
}
|
|
36582
|
+
function resetSlider() {
|
|
36583
|
+
emptyRebuildAttempts.value = 0;
|
|
36584
|
+
if (slotContainer.value) {
|
|
36585
|
+
const slotElements = Array.from(slotContainer.value.children).map((el) => el.cloneNode(true));
|
|
36586
|
+
if (slotElements.length > 0) {
|
|
36587
|
+
innerElements.value = slotElements;
|
|
36588
|
+
vue.nextTick(() => {
|
|
36589
|
+
buildSliderFrame();
|
|
36590
|
+
});
|
|
36591
|
+
}
|
|
36592
|
+
}
|
|
36593
|
+
}
|
|
36342
36594
|
__expose({
|
|
36343
36595
|
prev,
|
|
36344
36596
|
next,
|
|
@@ -36350,17 +36602,25 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
36350
36602
|
destroy: destroy2,
|
|
36351
36603
|
currentSlide,
|
|
36352
36604
|
pauseAutoplay,
|
|
36353
|
-
resumeAutoplay
|
|
36605
|
+
resumeAutoplay,
|
|
36606
|
+
updateSlider,
|
|
36607
|
+
resetSlider
|
|
36354
36608
|
});
|
|
36355
36609
|
return (_ctx, _cache) => {
|
|
36356
36610
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [
|
|
36357
36611
|
vue.createElementVNode("div", {
|
|
36358
|
-
ref_key: "
|
|
36359
|
-
ref:
|
|
36360
|
-
class: "carousel-container"
|
|
36612
|
+
ref_key: "slotContainer",
|
|
36613
|
+
ref: slotContainer,
|
|
36614
|
+
class: "carousel-slot-container",
|
|
36615
|
+
style: { "display": "none" }
|
|
36361
36616
|
}, [
|
|
36362
36617
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
36363
36618
|
], 512),
|
|
36619
|
+
vue.createElementVNode("div", {
|
|
36620
|
+
ref_key: "carouselRef",
|
|
36621
|
+
ref: carouselRef,
|
|
36622
|
+
class: "carousel-container"
|
|
36623
|
+
}, null, 512),
|
|
36364
36624
|
props2.dots && totalDots.value > 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$3, [
|
|
36365
36625
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(totalDots.value, (i2) => {
|
|
36366
36626
|
return vue.openBlock(), vue.createElementBlock("button", {
|
|
@@ -36376,7 +36636,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
36376
36636
|
};
|
|
36377
36637
|
}
|
|
36378
36638
|
});
|
|
36379
|
-
const Slider = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-
|
|
36639
|
+
const Slider = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-7225d57d"]]);
|
|
36380
36640
|
const _hoisted_1$4 = { class: "stickyTop" };
|
|
36381
36641
|
const _hoisted_2$2 = {
|
|
36382
36642
|
key: 0,
|
|
@@ -38260,7 +38520,7 @@ const _hoisted_1 = {
|
|
|
38260
38520
|
key: 0,
|
|
38261
38521
|
class: "navigation flex space-between px-3 w-100 absolute m_px-1 m_none z-9"
|
|
38262
38522
|
};
|
|
38263
|
-
const _hoisted_2 = { class: "flex start fixed top-1 w-100 space-between px-1" };
|
|
38523
|
+
const _hoisted_2 = { class: "flex start fixed top-1 w-100 space-between px-1 z-9" };
|
|
38264
38524
|
const _hoisted_3 = {
|
|
38265
38525
|
key: 0,
|
|
38266
38526
|
class: "center"
|
|
@@ -39617,7 +39877,19 @@ function searchItems(params) {
|
|
|
39617
39877
|
const relevance = calculateItemRelevance(item);
|
|
39618
39878
|
return [item, relevance];
|
|
39619
39879
|
});
|
|
39620
|
-
|
|
39880
|
+
const nonZeroItems = scoredItems.filter(([, score]) => score > 0);
|
|
39881
|
+
let filteredItems = nonZeroItems;
|
|
39882
|
+
if (nonZeroItems.length > 0) {
|
|
39883
|
+
const maxScore = Math.max(...nonZeroItems.map(([, score]) => score));
|
|
39884
|
+
if (maxScore > 5) {
|
|
39885
|
+
const threshold = maxScore * 0.25;
|
|
39886
|
+
filteredItems = nonZeroItems.filter(([, score]) => score >= threshold);
|
|
39887
|
+
} else if (maxScore > 2) {
|
|
39888
|
+
const threshold = maxScore * 0.15;
|
|
39889
|
+
filteredItems = nonZeroItems.filter(([, score]) => score >= threshold);
|
|
39890
|
+
}
|
|
39891
|
+
}
|
|
39892
|
+
return filteredItems.sort(([, scoreA], [, scoreB]) => scoreB - scoreA).map(([item]) => item);
|
|
39621
39893
|
}
|
|
39622
39894
|
function useSearch(params) {
|
|
39623
39895
|
const { searchTerm, minChars = 2, serverSearch, debounceMs = 300 } = params;
|