@bagelink/vue 1.2.111 → 1.2.119
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.map +1 -1
- package/dist/components/form/inputs/CodeEditor/CodeTypes.d.ts +12 -3
- package/dist/components/form/inputs/CodeEditor/CodeTypes.d.ts.map +1 -1
- package/dist/components/form/inputs/CodeEditor/Index.vue.d.ts +2 -16
- package/dist/components/form/inputs/CodeEditor/Index.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/CodeEditor/useHighlight.d.ts +31 -0
- package/dist/components/form/inputs/CodeEditor/useHighlight.d.ts.map +1 -0
- package/dist/index.cjs +221 -176
- package/dist/index.mjs +221 -176
- package/dist/style.css +159 -148
- package/package.json +1 -1
- package/src/components/ImportData.vue +97 -72
- package/src/components/form/inputs/CodeEditor/CodeTypes.ts +14 -8
- package/src/components/form/inputs/CodeEditor/Index.vue +11 -66
- package/src/components/form/inputs/CodeEditor/useHighlight.ts +76 -0
- package/src/styles/inputs.css +148 -137
package/dist/index.mjs
CHANGED
|
@@ -14188,6 +14188,59 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
14188
14188
|
}
|
|
14189
14189
|
});
|
|
14190
14190
|
const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-722373de"]]);
|
|
14191
|
+
function useHighlight() {
|
|
14192
|
+
const hljs = ref(null);
|
|
14193
|
+
const loaded = ref(false);
|
|
14194
|
+
const loadHighlight = async () => {
|
|
14195
|
+
if (loaded.value) return;
|
|
14196
|
+
try {
|
|
14197
|
+
await appendScript("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.0/highlight.min.js", { id: "hljs-cdn" });
|
|
14198
|
+
await appendStyle("https://cdn.jsdelivr.net/npm/highlight.js/styles/atom-one-dark.min.css");
|
|
14199
|
+
if (window.hljs) {
|
|
14200
|
+
hljs.value = window.hljs;
|
|
14201
|
+
loaded.value = true;
|
|
14202
|
+
} else {
|
|
14203
|
+
console.error("Failed to load highlight.js");
|
|
14204
|
+
}
|
|
14205
|
+
} catch (error) {
|
|
14206
|
+
console.error("Error loading highlight.js:", error);
|
|
14207
|
+
}
|
|
14208
|
+
};
|
|
14209
|
+
const escapeHtml = (unsafe) => {
|
|
14210
|
+
return unsafe.replace(/[&<>"']/g, (m2) => {
|
|
14211
|
+
const replacements = {
|
|
14212
|
+
"&": "&",
|
|
14213
|
+
"<": "<",
|
|
14214
|
+
">": ">",
|
|
14215
|
+
'"': """,
|
|
14216
|
+
"'": "'"
|
|
14217
|
+
};
|
|
14218
|
+
return replacements[m2] || "";
|
|
14219
|
+
});
|
|
14220
|
+
};
|
|
14221
|
+
const highlightCode = (code, language, autodetect = true, ignoreIllegals = true) => {
|
|
14222
|
+
if (!hljs.value) return escapeHtml(code);
|
|
14223
|
+
try {
|
|
14224
|
+
const lang = language || "";
|
|
14225
|
+
if (lang && !autodetect && !hljs.value.getLanguage(lang)) {
|
|
14226
|
+
console.warn(`The language "${lang}" is not available.`);
|
|
14227
|
+
return escapeHtml(code);
|
|
14228
|
+
}
|
|
14229
|
+
const result2 = autodetect ? hljs.value.highlightAuto(code) : hljs.value.highlight(code, { language: lang, ignoreIllegals });
|
|
14230
|
+
return result2.value || escapeHtml(code);
|
|
14231
|
+
} catch (error) {
|
|
14232
|
+
console.error("Highlighting error:", error);
|
|
14233
|
+
return escapeHtml(code);
|
|
14234
|
+
}
|
|
14235
|
+
};
|
|
14236
|
+
return {
|
|
14237
|
+
hljs,
|
|
14238
|
+
loaded,
|
|
14239
|
+
loadHighlight,
|
|
14240
|
+
escapeHtml,
|
|
14241
|
+
highlightCode
|
|
14242
|
+
};
|
|
14243
|
+
}
|
|
14191
14244
|
const _hoisted_1$L = {
|
|
14192
14245
|
key: 0,
|
|
14193
14246
|
class: "label"
|
|
@@ -14216,39 +14269,19 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
14216
14269
|
const emit2 = __emit;
|
|
14217
14270
|
const code = ref(props2.modelValue || "");
|
|
14218
14271
|
const editorRef = ref();
|
|
14219
|
-
const loaded =
|
|
14220
|
-
const hljs = ref(null);
|
|
14272
|
+
const { loaded, loadHighlight, highlightCode } = useHighlight();
|
|
14221
14273
|
const maxHeight = computed(() => {
|
|
14222
14274
|
const h2 = props2.height ?? "240px";
|
|
14223
14275
|
return h2.match(/^\d+$/) ? `${h2}px` : h2;
|
|
14224
14276
|
});
|
|
14225
14277
|
const formattedCode = computed(() => {
|
|
14226
|
-
|
|
14227
|
-
|
|
14228
|
-
|
|
14229
|
-
|
|
14230
|
-
|
|
14231
|
-
|
|
14232
|
-
|
|
14233
|
-
const result2 = props2.autodetect ? hljs.value.highlightAuto(code.value) : hljs.value.highlight(code.value, { language: lang, ignoreIllegals: props2.ignoreIllegals });
|
|
14234
|
-
return result2.value || escapeHtml(code.value);
|
|
14235
|
-
} catch (error) {
|
|
14236
|
-
console.error("Highlighting error:", error);
|
|
14237
|
-
return escapeHtml(code.value);
|
|
14238
|
-
}
|
|
14239
|
-
});
|
|
14240
|
-
function escapeHtml(unsafe) {
|
|
14241
|
-
return unsafe.replace(/[&<>"']/g, (m2) => {
|
|
14242
|
-
const replacements = {
|
|
14243
|
-
"&": "&",
|
|
14244
|
-
"<": "<",
|
|
14245
|
-
">": ">",
|
|
14246
|
-
'"': """,
|
|
14247
|
-
"'": "'"
|
|
14248
|
-
};
|
|
14249
|
-
return replacements[m2] || "";
|
|
14250
|
-
});
|
|
14251
|
-
}
|
|
14278
|
+
return highlightCode(
|
|
14279
|
+
code.value,
|
|
14280
|
+
props2.language,
|
|
14281
|
+
props2.autodetect,
|
|
14282
|
+
props2.ignoreIllegals
|
|
14283
|
+
);
|
|
14284
|
+
});
|
|
14252
14285
|
function handleInput(e) {
|
|
14253
14286
|
const target = e.target;
|
|
14254
14287
|
code.value = target.value;
|
|
@@ -14268,18 +14301,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
14268
14301
|
}, 0);
|
|
14269
14302
|
}
|
|
14270
14303
|
onMounted(async () => {
|
|
14271
|
-
|
|
14272
|
-
await appendScript("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.0/highlight.min.js", { id: "hljs-cdn" });
|
|
14273
|
-
await appendStyle("https://cdn.jsdelivr.net/npm/highlight.js/styles/atom-one-dark.min.css");
|
|
14274
|
-
if (window.hljs) {
|
|
14275
|
-
hljs.value = window.hljs;
|
|
14276
|
-
loaded.value = true;
|
|
14277
|
-
} else {
|
|
14278
|
-
console.error("Failed to load highlight.js");
|
|
14279
|
-
}
|
|
14280
|
-
} catch (error) {
|
|
14281
|
-
console.error("Error loading highlight.js:", error);
|
|
14282
|
-
}
|
|
14304
|
+
await loadHighlight();
|
|
14283
14305
|
});
|
|
14284
14306
|
watch(() => props2.modelValue, (newVal) => {
|
|
14285
14307
|
if (newVal !== void 0 && newVal !== code.value) {
|
|
@@ -14292,7 +14314,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
14292
14314
|
style: normalizeStyle({ maxHeight: maxHeight.value })
|
|
14293
14315
|
}, [
|
|
14294
14316
|
_ctx.label ? (openBlock(), createElementBlock("label", _hoisted_1$L, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
|
|
14295
|
-
loaded
|
|
14317
|
+
unref(loaded) ? (openBlock(), createElementBlock("div", {
|
|
14296
14318
|
key: 1,
|
|
14297
14319
|
ref_key: "editorRef",
|
|
14298
14320
|
ref: editorRef,
|
|
@@ -14319,7 +14341,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
14319
14341
|
};
|
|
14320
14342
|
}
|
|
14321
14343
|
});
|
|
14322
|
-
const CodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-
|
|
14344
|
+
const CodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-de01e351"]]);
|
|
14323
14345
|
const _hoisted_1$K = ["title"];
|
|
14324
14346
|
const _hoisted_2$y = { class: "flex bg-input rounded px-025 colorInputPickWrap" };
|
|
14325
14347
|
const _hoisted_3$t = ["id", "placeholder", "required"];
|
|
@@ -32846,53 +32868,65 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
32846
32868
|
const Image$1 = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-2f5e271c"]]);
|
|
32847
32869
|
const _hoisted_1$m = ["textContent"];
|
|
32848
32870
|
const _hoisted_2$d = {
|
|
32871
|
+
key: 0,
|
|
32872
|
+
class: "h-100p flex column justify-content-center"
|
|
32873
|
+
};
|
|
32874
|
+
const _hoisted_3$a = {
|
|
32849
32875
|
key: 1,
|
|
32850
32876
|
class: "loading-container"
|
|
32851
32877
|
};
|
|
32852
|
-
const
|
|
32853
|
-
const
|
|
32878
|
+
const _hoisted_4$6 = { class: "overflow h-100p" };
|
|
32879
|
+
const _hoisted_5$6 = {
|
|
32854
32880
|
key: 0,
|
|
32855
|
-
class: "config-section flex gap-05 pb-2"
|
|
32881
|
+
class: "config-section flex gap-05 pb-2 m_flex-wrap"
|
|
32856
32882
|
};
|
|
32857
|
-
const
|
|
32858
|
-
const
|
|
32859
|
-
const
|
|
32860
|
-
const
|
|
32861
|
-
const
|
|
32862
|
-
const
|
|
32863
|
-
const
|
|
32883
|
+
const _hoisted_6$5 = { key: 1 };
|
|
32884
|
+
const _hoisted_7$4 = { class: "mapping-table" };
|
|
32885
|
+
const _hoisted_8$3 = { class: "field-label" };
|
|
32886
|
+
const _hoisted_9$2 = { class: "grid-span-2 input-size line-height-1 inline-block" };
|
|
32887
|
+
const _hoisted_10$2 = { key: 0 };
|
|
32888
|
+
const _hoisted_11$2 = { key: 2 };
|
|
32889
|
+
const _hoisted_12$2 = { key: 3 };
|
|
32890
|
+
const _hoisted_13$1 = {
|
|
32864
32891
|
key: 0,
|
|
32865
32892
|
class: "field-disabled-reason"
|
|
32866
32893
|
};
|
|
32867
|
-
const
|
|
32868
|
-
const
|
|
32869
|
-
const
|
|
32870
|
-
const
|
|
32871
|
-
const
|
|
32894
|
+
const _hoisted_14$1 = { key: 1 };
|
|
32895
|
+
const _hoisted_15 = { class: "fileColSelect" };
|
|
32896
|
+
const _hoisted_16 = { class: "default-value-container hideLabel" };
|
|
32897
|
+
const _hoisted_17 = { class: "flex gap-05 my-05" };
|
|
32898
|
+
const _hoisted_18 = {
|
|
32872
32899
|
key: 0,
|
|
32873
32900
|
class: "action-buttons"
|
|
32874
32901
|
};
|
|
32875
|
-
const
|
|
32902
|
+
const _hoisted_19 = {
|
|
32876
32903
|
key: 1,
|
|
32877
32904
|
class: "action-buttons"
|
|
32878
32905
|
};
|
|
32879
|
-
const
|
|
32880
|
-
const
|
|
32881
|
-
const
|
|
32882
|
-
const
|
|
32883
|
-
const
|
|
32884
|
-
const
|
|
32906
|
+
const _hoisted_20 = { key: 0 };
|
|
32907
|
+
const _hoisted_21 = { class: "flex space-between gap-1 mb-1 border-bottom pb-05 m_flex-wrap" };
|
|
32908
|
+
const _hoisted_22 = { class: "grid-span-2 input-size line-height-1" };
|
|
32909
|
+
const _hoisted_23 = { class: "grid-span-4 input-size line-height-1 ellipsis-1" };
|
|
32910
|
+
const _hoisted_24 = { class: "grid grid-wrap-7 gap-1 align-items-center m_gap-025 m_pb-1-5" };
|
|
32911
|
+
const _hoisted_25 = { class: "grid-span-2" };
|
|
32912
|
+
const _hoisted_26 = { class: "grid-span-4" };
|
|
32913
|
+
const _hoisted_27 = { class: "flex pt-05" };
|
|
32914
|
+
const _hoisted_28 = { key: 0 };
|
|
32915
|
+
const _hoisted_29 = { class: "pb-05" };
|
|
32916
|
+
const _hoisted_30 = {
|
|
32885
32917
|
key: 0,
|
|
32886
32918
|
class: "mb-05"
|
|
32887
32919
|
};
|
|
32888
|
-
const
|
|
32889
|
-
const
|
|
32890
|
-
const
|
|
32891
|
-
const
|
|
32892
|
-
const
|
|
32893
|
-
const
|
|
32894
|
-
const
|
|
32895
|
-
const
|
|
32920
|
+
const _hoisted_31 = { key: 1 };
|
|
32921
|
+
const _hoisted_32 = { class: "mb-1" };
|
|
32922
|
+
const _hoisted_33 = { key: 0 };
|
|
32923
|
+
const _hoisted_34 = { class: "flex gap-1" };
|
|
32924
|
+
const _hoisted_35 = { class: "default-value-container" };
|
|
32925
|
+
const _hoisted_36 = { class: "action-buttons-cell" };
|
|
32926
|
+
const _hoisted_37 = { class: "flex pt-05" };
|
|
32927
|
+
const _hoisted_38 = { class: "mt-1" };
|
|
32928
|
+
const _hoisted_39 = { class: "flex gap-1 mt-1 space-between" };
|
|
32929
|
+
const _hoisted_40 = { key: 0 };
|
|
32896
32930
|
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
32897
32931
|
__name: "ImportData",
|
|
32898
32932
|
props: {
|
|
@@ -33918,41 +33952,51 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33918
33952
|
class: "line-height-1 m-0 pb-2 txt-center",
|
|
33919
33953
|
textContent: toDisplayString(props2.title || "Upload and Map Data")
|
|
33920
33954
|
}, null, 8, _hoisted_1$m),
|
|
33921
|
-
!file.value ? (openBlock(),
|
|
33922
|
-
|
|
33923
|
-
|
|
33924
|
-
|
|
33925
|
-
|
|
33926
|
-
|
|
33927
|
-
|
|
33928
|
-
|
|
33955
|
+
!file.value ? (openBlock(), createElementBlock("div", _hoisted_2$d, [
|
|
33956
|
+
createVNode(unref(DragOver), {
|
|
33957
|
+
accept: ".csv,.xls,.xlsx",
|
|
33958
|
+
class: "max-h300px w-500px",
|
|
33959
|
+
onAddFiles: unref(addFile),
|
|
33960
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(browse)(false))
|
|
33961
|
+
}, {
|
|
33962
|
+
default: withCtx(() => [
|
|
33963
|
+
createVNode(unref(_sfc_main$15), { class: "flex flex-column items-center justify-center outline-dashed outline-3 bg-input hover h-100p justify-content-center txt-center" }, {
|
|
33964
|
+
default: withCtx(() => [
|
|
33965
|
+
createVNode(unref(_sfc_main$v), {
|
|
33966
|
+
name: "upload",
|
|
33967
|
+
size: "5"
|
|
33968
|
+
}),
|
|
33969
|
+
_cache[30] || (_cache[30] = createElementVNode("p", null, "Drag and drop an Excel or CSV file here", -1)),
|
|
33970
|
+
_cache[31] || (_cache[31] = createElementVNode("u", null, "or click to select a file", -1)),
|
|
33971
|
+
_cache[32] || (_cache[32] = createElementVNode("p", { class: "txt-12 color-gray" }, " Accepts .xlsx, .xls, and .csv files ", -1))
|
|
33972
|
+
]),
|
|
33973
|
+
_: 1
|
|
33974
|
+
})
|
|
33975
|
+
]),
|
|
33976
|
+
_: 1
|
|
33977
|
+
}, 8, ["onAddFiles"])
|
|
33978
|
+
])) : createCommentVNode("", true),
|
|
33979
|
+
isLoading.value ? (openBlock(), createElementBlock("div", _hoisted_3$a, _cache[33] || (_cache[33] = [
|
|
33980
|
+
createElementVNode("div", { class: "spinner" }, null, -1),
|
|
33981
|
+
createElementVNode("p", null, "Processing your file...", -1)
|
|
33982
|
+
]))) : createCommentVNode("", true),
|
|
33983
|
+
createElementVNode("div", _hoisted_4$6, [
|
|
33984
|
+
file.value && !isLoading.value && sheetNames.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_5$6, [
|
|
33985
|
+
withDirectives((openBlock(), createBlock(unref(Btn), {
|
|
33986
|
+
class: "px-1",
|
|
33987
|
+
color: "gray",
|
|
33988
|
+
onClick: _cache[1] || (_cache[1] = ($event) => file.value = null)
|
|
33989
|
+
}, {
|
|
33929
33990
|
default: withCtx(() => [
|
|
33930
33991
|
createVNode(unref(_sfc_main$v), {
|
|
33931
|
-
|
|
33932
|
-
size: "5"
|
|
33992
|
+
icon: "draft",
|
|
33993
|
+
size: "1.5",
|
|
33994
|
+
weight: "300"
|
|
33933
33995
|
}),
|
|
33934
|
-
|
|
33935
|
-
_cache[31] || (_cache[31] = createElementVNode("p", null, "or click to select a file", -1)),
|
|
33936
|
-
_cache[32] || (_cache[32] = createElementVNode("p", { class: "txt-12 color-gray" }, " Accepts .xlsx, .xls, and .csv files ", -1))
|
|
33996
|
+
createElementVNode("p", null, toDisplayString(file.value.name), 1)
|
|
33937
33997
|
]),
|
|
33938
33998
|
_: 1
|
|
33939
|
-
})
|
|
33940
|
-
]),
|
|
33941
|
-
_: 1
|
|
33942
|
-
}, 8, ["onAddFiles"])) : createCommentVNode("", true),
|
|
33943
|
-
isLoading.value ? (openBlock(), createElementBlock("div", _hoisted_2$d, _cache[33] || (_cache[33] = [
|
|
33944
|
-
createElementVNode("div", { class: "spinner" }, null, -1),
|
|
33945
|
-
createElementVNode("p", null, "Processing your file...", -1)
|
|
33946
|
-
]))) : createCommentVNode("", true),
|
|
33947
|
-
createElementVNode("div", _hoisted_3$a, [
|
|
33948
|
-
file.value && !isLoading.value && sheetNames.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4$6, [
|
|
33949
|
-
withDirectives(createVNode(unref(Btn), {
|
|
33950
|
-
value: file.value.name,
|
|
33951
|
-
thin: "",
|
|
33952
|
-
round: "",
|
|
33953
|
-
iconEnd: "edit",
|
|
33954
|
-
onClick: _cache[1] || (_cache[1] = ($event) => file.value = null)
|
|
33955
|
-
}, null, 8, ["value"]), [
|
|
33999
|
+
})), [
|
|
33956
34000
|
[_directive_tooltip, "Change File"]
|
|
33957
34001
|
]),
|
|
33958
34002
|
sheetNames.value.length > 1 ? (openBlock(), createBlock(unref(SelectInput), {
|
|
@@ -33966,13 +34010,14 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33966
34010
|
modelValue: hasHeaders.value,
|
|
33967
34011
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => hasHeaders.value = $event),
|
|
33968
34012
|
label: "Mark this if file has a header row",
|
|
33969
|
-
class: "m-0"
|
|
34013
|
+
class: "m-0",
|
|
34014
|
+
style: { "--bgl-accent-color": "var(--bgl-black)", "--bgl-primary": "var(--bgl-black)" }
|
|
33970
34015
|
}, null, 8, ["modelValue"])
|
|
33971
34016
|
])) : createCommentVNode("", true),
|
|
33972
|
-
file.value && !isLoading.value && fileHeaders.value.length > 0 ? (openBlock(), createElementBlock("div",
|
|
34017
|
+
file.value && !isLoading.value && fileHeaders.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_6$5, [
|
|
33973
34018
|
_cache[37] || (_cache[37] = 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)),
|
|
33974
|
-
createElementVNode("div",
|
|
33975
|
-
_cache[34] || (_cache[34] = createElementVNode("div", { class: "grid grid-wrap-5 gap-1 bold pb-1" }, [
|
|
34019
|
+
createElementVNode("div", _hoisted_7$4, [
|
|
34020
|
+
_cache[34] || (_cache[34] = createElementVNode("div", { class: "grid grid-wrap-5 gap-1 bold pb-1 m_none" }, [
|
|
33976
34021
|
createElementVNode("p", null, "Schema Field"),
|
|
33977
34022
|
createElementVNode("p", null, "Column from File"),
|
|
33978
34023
|
createElementVNode("p", null, "Default Value"),
|
|
@@ -33982,12 +34027,12 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33982
34027
|
(openBlock(true), createElementBlock(Fragment, null, renderList(schemaFields.value, (field) => {
|
|
33983
34028
|
return openBlock(), createElementBlock("div", {
|
|
33984
34029
|
key: field.id,
|
|
33985
|
-
class: normalizeClass(["grid grid-wrap-5 gap-1", { "array-field-row": field.isArrayField || field.$el === "array" }])
|
|
34030
|
+
class: normalizeClass(["grid grid-wrap-5 gap-1 m_gap-025 m_pb-1-5", { "array-field-row": field.isArrayField || field.$el === "array" }])
|
|
33986
34031
|
}, [
|
|
33987
34032
|
createElementVNode("div", null, [
|
|
33988
|
-
createElementVNode("div",
|
|
33989
|
-
|
|
33990
|
-
field.isArrayField ? (openBlock(), createElementBlock("span",
|
|
34033
|
+
createElementVNode("div", _hoisted_8$3, [
|
|
34034
|
+
createElementVNode("p", _hoisted_9$2, toDisplayString(field.label), 1),
|
|
34035
|
+
field.isArrayField ? (openBlock(), createElementBlock("span", _hoisted_10$2, "↳")) : createCommentVNode("", true),
|
|
33991
34036
|
field.$el === "array" ? (openBlock(), createBlock(unref(Pill), {
|
|
33992
34037
|
key: 1,
|
|
33993
34038
|
class: "txt10 ms-05",
|
|
@@ -33995,13 +34040,13 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
33995
34040
|
thin: "",
|
|
33996
34041
|
value: "Array"
|
|
33997
34042
|
})) : createCommentVNode("", true),
|
|
33998
|
-
isFieldRequired(field) ? (openBlock(), createElementBlock("span",
|
|
33999
|
-
getFieldDescription(field).isConditional ? (openBlock(), createElementBlock("span",
|
|
34043
|
+
isFieldRequired(field) ? (openBlock(), createElementBlock("span", _hoisted_11$2, "*")) : createCommentVNode("", true),
|
|
34044
|
+
getFieldDescription(field).isConditional ? (openBlock(), createElementBlock("span", _hoisted_12$2, "†")) : createCommentVNode("", true)
|
|
34000
34045
|
]),
|
|
34001
|
-
field.disabled ? (openBlock(), createElementBlock("div",
|
|
34002
|
-
getFieldDescription(field).isConditional ? (openBlock(), createElementBlock("div",
|
|
34046
|
+
field.disabled ? (openBlock(), createElementBlock("div", _hoisted_13$1, toDisplayString(field.disabledReason), 1)) : createCommentVNode("", true),
|
|
34047
|
+
getFieldDescription(field).isConditional ? (openBlock(), createElementBlock("div", _hoisted_14$1, toDisplayString(getFieldDescription(field).description), 1)) : createCommentVNode("", true)
|
|
34003
34048
|
]),
|
|
34004
|
-
createElementVNode("
|
|
34049
|
+
createElementVNode("div", _hoisted_15, [
|
|
34005
34050
|
createVNode(unref(SelectInput), {
|
|
34006
34051
|
modelValue: fieldMapping[field.id],
|
|
34007
34052
|
"onUpdate:modelValue": ($event) => fieldMapping[field.id] = $event,
|
|
@@ -34013,7 +34058,7 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
34013
34058
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "required", "disabled", "onChange"])
|
|
34014
34059
|
]),
|
|
34015
34060
|
createElementVNode("div", null, [
|
|
34016
|
-
createElementVNode("div",
|
|
34061
|
+
createElementVNode("div", _hoisted_16, [
|
|
34017
34062
|
createTextVNode(toDisplayString(initDefaultValue(field.id)) + " ", 1),
|
|
34018
34063
|
(openBlock(), createBlock(resolveDynamicComponent(unref(renderField)(getFieldWithDefaults(field)))))
|
|
34019
34064
|
])
|
|
@@ -34027,7 +34072,7 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
34027
34072
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
34028
34073
|
]),
|
|
34029
34074
|
createElementVNode("div", null, [
|
|
34030
|
-
createElementVNode("div",
|
|
34075
|
+
createElementVNode("div", _hoisted_17, [
|
|
34031
34076
|
withDirectives(createVNode(unref(Btn), {
|
|
34032
34077
|
thin: "",
|
|
34033
34078
|
disabled: field.disabled,
|
|
@@ -34050,14 +34095,14 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
34050
34095
|
], 2);
|
|
34051
34096
|
}), 128))
|
|
34052
34097
|
]),
|
|
34053
|
-
mappingComplete.value ? (openBlock(), createElementBlock("div",
|
|
34098
|
+
mappingComplete.value ? (openBlock(), createElementBlock("div", _hoisted_18, [
|
|
34054
34099
|
createVNode(unref(Btn), { onClick: showPreview }, {
|
|
34055
34100
|
default: withCtx(() => _cache[35] || (_cache[35] = [
|
|
34056
34101
|
createTextVNode(" Preview Data ")
|
|
34057
34102
|
])),
|
|
34058
34103
|
_: 1
|
|
34059
34104
|
})
|
|
34060
|
-
])) : (openBlock(), createElementBlock("div",
|
|
34105
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_19, _cache[36] || (_cache[36] = [
|
|
34061
34106
|
createElementVNode("div", { class: "mapping-incomplete-message" }, " Please map the required fields to continue ", -1)
|
|
34062
34107
|
])))
|
|
34063
34108
|
])) : createCommentVNode("", true)
|
|
@@ -34069,8 +34114,8 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
34069
34114
|
width: "800"
|
|
34070
34115
|
}, {
|
|
34071
34116
|
default: withCtx(() => [
|
|
34072
|
-
selectedTransformField.value ? (openBlock(), createElementBlock("div",
|
|
34073
|
-
createElementVNode("div",
|
|
34117
|
+
selectedTransformField.value ? (openBlock(), createElementBlock("div", _hoisted_20, [
|
|
34118
|
+
createElementVNode("div", _hoisted_21, [
|
|
34074
34119
|
createElementVNode("p", null, [
|
|
34075
34120
|
_cache[38] || (_cache[38] = createTextVNode("Create transformations for ")),
|
|
34076
34121
|
createElementVNode("strong", null, toDisplayString(selectedTransformField.value.label), 1)
|
|
@@ -34082,33 +34127,33 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
34082
34127
|
onClick: _cache[4] || (_cache[4] = ($event) => autoPopulateTransformations(selectedTransformField.value.id))
|
|
34083
34128
|
})
|
|
34084
34129
|
]),
|
|
34085
|
-
createElementVNode("
|
|
34086
|
-
_cache[39] || (_cache[39] = createElementVNode("
|
|
34087
|
-
createElementVNode("
|
|
34088
|
-
|
|
34089
|
-
|
|
34090
|
-
createElementVNode("th", null, "Action")
|
|
34091
|
-
])
|
|
34130
|
+
createElementVNode("div", null, [
|
|
34131
|
+
_cache[39] || (_cache[39] = createElementVNode("div", { class: "grid grid-wrap-7 gap-1 bold pb-05 m_none" }, [
|
|
34132
|
+
createElementVNode("p", { class: "grid-span-2" }, " Source Value "),
|
|
34133
|
+
createElementVNode("p", { class: "grid-span-4" }, " Target Value "),
|
|
34134
|
+
createElementVNode("p", null, "Action")
|
|
34092
34135
|
], -1)),
|
|
34093
|
-
createElementVNode("
|
|
34136
|
+
createElementVNode("div", null, [
|
|
34094
34137
|
(openBlock(true), createElementBlock(Fragment, null, renderList(transformations[selectedTransformField.value.id] || [], (transform, index2) => {
|
|
34095
|
-
return openBlock(), createElementBlock("
|
|
34096
|
-
|
|
34097
|
-
|
|
34098
|
-
|
|
34099
|
-
|
|
34100
|
-
|
|
34101
|
-
|
|
34102
|
-
|
|
34103
|
-
|
|
34104
|
-
|
|
34105
|
-
|
|
34106
|
-
|
|
34138
|
+
return openBlock(), createElementBlock("div", {
|
|
34139
|
+
key: index2,
|
|
34140
|
+
class: "grid grid-wrap-7 gap-1 align-items-center m_gap-025 m_pb-1-5"
|
|
34141
|
+
}, [
|
|
34142
|
+
createElementVNode("p", _hoisted_22, toDisplayString(transform.sourceValue), 1),
|
|
34143
|
+
createElementVNode("p", _hoisted_23, toDisplayString(transform.targetValue), 1),
|
|
34144
|
+
withDirectives(createVNode(unref(Btn), {
|
|
34145
|
+
class: "mb-05",
|
|
34146
|
+
thin: "",
|
|
34147
|
+
icon: "delete",
|
|
34148
|
+
color: "red",
|
|
34149
|
+
onClick: ($event) => removeTransformation(selectedTransformField.value.id, index2)
|
|
34150
|
+
}, null, 8, ["onClick"]), [
|
|
34151
|
+
[_directive_tooltip, "Remove"]
|
|
34107
34152
|
])
|
|
34108
34153
|
]);
|
|
34109
34154
|
}), 128)),
|
|
34110
|
-
createElementVNode("
|
|
34111
|
-
createElementVNode("
|
|
34155
|
+
createElementVNode("div", _hoisted_24, [
|
|
34156
|
+
createElementVNode("div", _hoisted_25, [
|
|
34112
34157
|
fieldMapping[selectedTransformField.value.id] ? (openBlock(), createBlock(unref(SelectInput), {
|
|
34113
34158
|
key: 0,
|
|
34114
34159
|
modelValue: selectedSourceValue.value,
|
|
@@ -34116,16 +34161,15 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
34116
34161
|
searchable: "",
|
|
34117
34162
|
options: sourceValueOptions.value,
|
|
34118
34163
|
placeholder: "Select source value"
|
|
34119
|
-
}, null, 8, ["modelValue", "options"])) :
|
|
34164
|
+
}, null, 8, ["modelValue", "options"])) : (openBlock(), createBlock(TextInput, {
|
|
34120
34165
|
key: 1,
|
|
34166
|
+
modelValue: selectedSourceValue.value,
|
|
34121
34167
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => selectedSourceValue.value = $event),
|
|
34122
34168
|
type: "text",
|
|
34123
34169
|
placeholder: "Source value"
|
|
34124
|
-
}, null,
|
|
34125
|
-
[vModelText, selectedSourceValue.value]
|
|
34126
|
-
])
|
|
34170
|
+
}, null, 8, ["modelValue"]))
|
|
34127
34171
|
]),
|
|
34128
|
-
createElementVNode("
|
|
34172
|
+
createElementVNode("div", _hoisted_26, [
|
|
34129
34173
|
selectedTransformField.value.options && selectedTransformField.value.options.length > 0 ? (openBlock(), createBlock(unref(SelectInput), {
|
|
34130
34174
|
key: 0,
|
|
34131
34175
|
modelValue: selectedTargetValue.value,
|
|
@@ -34133,29 +34177,27 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
34133
34177
|
searchable: "",
|
|
34134
34178
|
options: selectedTransformField.value.options,
|
|
34135
34179
|
placeholder: "Select target value"
|
|
34136
|
-
}, null, 8, ["modelValue", "options"])) :
|
|
34180
|
+
}, null, 8, ["modelValue", "options"])) : (openBlock(), createBlock(TextInput, {
|
|
34137
34181
|
key: 1,
|
|
34182
|
+
modelValue: selectedTargetValue.value,
|
|
34138
34183
|
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => selectedTargetValue.value = $event),
|
|
34139
34184
|
type: "text",
|
|
34140
34185
|
placeholder: "Target value"
|
|
34141
|
-
}, null,
|
|
34142
|
-
[vModelText, selectedTargetValue.value]
|
|
34143
|
-
])
|
|
34186
|
+
}, null, 8, ["modelValue"]))
|
|
34144
34187
|
]),
|
|
34145
|
-
|
|
34146
|
-
|
|
34147
|
-
|
|
34148
|
-
|
|
34149
|
-
|
|
34150
|
-
|
|
34151
|
-
|
|
34152
|
-
|
|
34153
|
-
])
|
|
34188
|
+
withDirectives(createVNode(unref(Btn), {
|
|
34189
|
+
class: "mb-05",
|
|
34190
|
+
thin: "",
|
|
34191
|
+
icon: "add",
|
|
34192
|
+
color: "primary",
|
|
34193
|
+
onClick: _cache[9] || (_cache[9] = ($event) => addTransformation(selectedTransformField.value.id))
|
|
34194
|
+
}, null, 512), [
|
|
34195
|
+
[_directive_tooltip, "Add"]
|
|
34154
34196
|
])
|
|
34155
34197
|
])
|
|
34156
34198
|
])
|
|
34157
34199
|
]),
|
|
34158
|
-
createElementVNode("div",
|
|
34200
|
+
createElementVNode("div", _hoisted_27, [
|
|
34159
34201
|
createVNode(unref(Btn), {
|
|
34160
34202
|
class: "ms-auto",
|
|
34161
34203
|
value: "Close",
|
|
@@ -34175,9 +34217,9 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
34175
34217
|
default: withCtx(() => {
|
|
34176
34218
|
var _a;
|
|
34177
34219
|
return [
|
|
34178
|
-
selectedRelationField.value ? (openBlock(), createElementBlock("div",
|
|
34179
|
-
createElementVNode("p",
|
|
34180
|
-
!relatedFiles[selectedRelationField.value.id] ? (openBlock(), createElementBlock("div",
|
|
34220
|
+
selectedRelationField.value ? (openBlock(), createElementBlock("div", _hoisted_28, [
|
|
34221
|
+
createElementVNode("p", _hoisted_29, " Upload a file with related data for " + toDisplayString(selectedRelationField.value.label), 1),
|
|
34222
|
+
!relatedFiles[selectedRelationField.value.id] ? (openBlock(), createElementBlock("div", _hoisted_30, [
|
|
34181
34223
|
createVNode(unref(DragOver), {
|
|
34182
34224
|
accept: ".csv,.xls,.xlsx",
|
|
34183
34225
|
onAddFiles: _cache[12] || (_cache[12] = (files2) => {
|
|
@@ -34200,8 +34242,8 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
34200
34242
|
]),
|
|
34201
34243
|
_: 1
|
|
34202
34244
|
})
|
|
34203
|
-
])) : (openBlock(), createElementBlock("div",
|
|
34204
|
-
createElementVNode("div",
|
|
34245
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_31, [
|
|
34246
|
+
createElementVNode("div", _hoisted_32, [
|
|
34205
34247
|
createVNode(unref(Pill), null, {
|
|
34206
34248
|
default: withCtx(() => [
|
|
34207
34249
|
createTextVNode(toDisplayString(relatedFiles[selectedRelationField.value.id].name), 1)
|
|
@@ -34215,9 +34257,9 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
34215
34257
|
onClick: _cache[13] || (_cache[13] = ($event) => relatedFiles[selectedRelationField.value.id] = null)
|
|
34216
34258
|
})
|
|
34217
34259
|
]),
|
|
34218
|
-
relatedFileData[selectedRelationField.value.id] ? (openBlock(), createElementBlock("div",
|
|
34260
|
+
relatedFileData[selectedRelationField.value.id] ? (openBlock(), createElementBlock("div", _hoisted_33, [
|
|
34219
34261
|
_cache[45] || (_cache[45] = createElementVNode("h4", null, "Configure Relationship", -1)),
|
|
34220
|
-
createElementVNode("div",
|
|
34262
|
+
createElementVNode("div", _hoisted_34, [
|
|
34221
34263
|
createVNode(unref(SelectInput), {
|
|
34222
34264
|
modelValue: parentKeyField[selectedRelationField.value.id],
|
|
34223
34265
|
"onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => parentKeyField[selectedRelationField.value.id] = $event),
|
|
@@ -34258,7 +34300,7 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
34258
34300
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options"])
|
|
34259
34301
|
]),
|
|
34260
34302
|
createElementVNode("td", null, [
|
|
34261
|
-
createElementVNode("div",
|
|
34303
|
+
createElementVNode("div", _hoisted_35, [
|
|
34262
34304
|
createTextVNode(toDisplayString(initRelatedDefaultValue(selectedRelationField.value.id, schemaItem.id)) + " ", 1),
|
|
34263
34305
|
(openBlock(), createBlock(resolveDynamicComponent(unref(renderField)(getRelatedFieldWithDefaults(selectedRelationField.value.id, schemaItem)))))
|
|
34264
34306
|
])
|
|
@@ -34272,7 +34314,7 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
34272
34314
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
|
|
34273
34315
|
]),
|
|
34274
34316
|
createElementVNode("td", null, [
|
|
34275
|
-
createElementVNode("div",
|
|
34317
|
+
createElementVNode("div", _hoisted_36, [
|
|
34276
34318
|
createVNode(unref(Btn), {
|
|
34277
34319
|
thin: "",
|
|
34278
34320
|
icon: "transform",
|
|
@@ -34291,7 +34333,7 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
34291
34333
|
])
|
|
34292
34334
|
])) : createCommentVNode("", true)
|
|
34293
34335
|
])),
|
|
34294
|
-
createElementVNode("div",
|
|
34336
|
+
createElementVNode("div", _hoisted_37, [
|
|
34295
34337
|
createVNode(unref(Btn), {
|
|
34296
34338
|
class: "ms-auto",
|
|
34297
34339
|
value: "Close",
|
|
@@ -34307,21 +34349,24 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
34307
34349
|
visible: showPreviewModal.value,
|
|
34308
34350
|
"onUpdate:visible": _cache[21] || (_cache[21] = ($event) => showPreviewModal.value = $event),
|
|
34309
34351
|
title: "Data Preview & Edit",
|
|
34310
|
-
width: "
|
|
34352
|
+
width: "90vw"
|
|
34311
34353
|
}, {
|
|
34312
34354
|
default: withCtx(() => [
|
|
34313
34355
|
createElementVNode("div", null, [
|
|
34314
34356
|
createVNode(unref(Spreadsheet), {
|
|
34315
34357
|
modelValue: previewData.value,
|
|
34316
34358
|
"onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => previewData.value = $event),
|
|
34359
|
+
class: "popupPreviewSpreadsheet",
|
|
34317
34360
|
"column-config": spreadsheetColumns.value,
|
|
34318
34361
|
"allow-add-row": ""
|
|
34319
34362
|
}, null, 8, ["modelValue", "column-config"])
|
|
34320
34363
|
]),
|
|
34321
34364
|
createElementVNode("div", null, [
|
|
34322
|
-
createElementVNode("
|
|
34323
|
-
createElementVNode("div",
|
|
34365
|
+
createElementVNode("p", _hoisted_38, " Showing all " + toDisplayString(previewData.value.length) + " records. You can edit values directly. ", 1),
|
|
34366
|
+
createElementVNode("div", _hoisted_39, [
|
|
34324
34367
|
createVNode(unref(Btn), {
|
|
34368
|
+
flat: "",
|
|
34369
|
+
thin: "",
|
|
34325
34370
|
value: "Cancel",
|
|
34326
34371
|
onClick: _cache[19] || (_cache[19] = ($event) => showPreviewModal.value = false)
|
|
34327
34372
|
}),
|
|
@@ -34343,7 +34388,7 @@ ${unmatchedValues.length} values could not be automatically matched.`);
|
|
|
34343
34388
|
default: withCtx(() => {
|
|
34344
34389
|
var _a, _b, _c;
|
|
34345
34390
|
return [
|
|
34346
|
-
selectedRelatedTransformField.value ? (openBlock(), createElementBlock("div",
|
|
34391
|
+
selectedRelatedTransformField.value ? (openBlock(), createElementBlock("div", _hoisted_40, [
|
|
34347
34392
|
createElementVNode("p", null, [
|
|
34348
34393
|
_cache[47] || (_cache[47] = createTextVNode("Create transformations for ")),
|
|
34349
34394
|
createElementVNode("strong", null, toDisplayString(selectedRelatedTransformField.value.field.label), 1),
|