@bagelink/vue 0.0.170 → 0.0.182
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/DataPreview.vue.d.ts.map +1 -1
- package/dist/components/DropDown.vue.d.ts.map +1 -1
- package/dist/components/TableSchema.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/Checkbox.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/TextInput.vue.d.ts +15 -8
- package/dist/components/form/inputs/TextInput.vue.d.ts.map +1 -1
- package/dist/components/formkit/FileUploader.vue.d.ts +5 -0
- package/dist/components/formkit/FileUploader.vue.d.ts.map +1 -1
- package/dist/index.cjs +133 -64
- package/dist/index.mjs +133 -64
- package/dist/style.css +64 -37
- package/package.json +1 -1
- package/src/components/DataPreview.vue +33 -15
- package/src/components/DropDown.vue +35 -33
- package/src/components/TableSchema.vue +82 -84
- package/src/components/form/inputs/Checkbox.vue +21 -18
- package/src/components/form/inputs/TextInput.vue +70 -8
- package/src/components/formkit/FileUploader.vue +7 -4
package/dist/index.mjs
CHANGED
|
@@ -14606,7 +14606,7 @@ const _hoisted_3$H = { class: "full-nav" };
|
|
|
14606
14606
|
const _hoisted_4$q = { class: "nav-scroll" };
|
|
14607
14607
|
const _hoisted_5$l = { class: "nav-links-wrapper" };
|
|
14608
14608
|
const _hoisted_6$h = { class: "icon-font" };
|
|
14609
|
-
const _hoisted_7$
|
|
14609
|
+
const _hoisted_7$d = { class: "tooltip" };
|
|
14610
14610
|
const _hoisted_8$7 = { class: "bot-buttons-wrapper" };
|
|
14611
14611
|
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
14612
14612
|
__name: "NavBar",
|
|
@@ -14644,7 +14644,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
14644
14644
|
}, {
|
|
14645
14645
|
default: withCtx(() => [
|
|
14646
14646
|
createElementVNode("div", _hoisted_6$h, toDisplayString(link.materialIcon), 1),
|
|
14647
|
-
createElementVNode("div", _hoisted_7$
|
|
14647
|
+
createElementVNode("div", _hoisted_7$d, toDisplayString(link.localized ? link.localized : link.label), 1)
|
|
14648
14648
|
]),
|
|
14649
14649
|
_: 2
|
|
14650
14650
|
}, 1032, ["to"]);
|
|
@@ -14820,8 +14820,8 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
14820
14820
|
setup(__props, { emit: __emit }) {
|
|
14821
14821
|
const props2 = __props;
|
|
14822
14822
|
const emit2 = __emit;
|
|
14823
|
-
|
|
14824
|
-
|
|
14823
|
+
let isOpen = ref(false);
|
|
14824
|
+
let selectedOption = ref(props2.modelValue);
|
|
14825
14825
|
function toggleDropdown() {
|
|
14826
14826
|
isOpen.value = !isOpen.value;
|
|
14827
14827
|
}
|
|
@@ -14832,11 +14832,11 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
14832
14832
|
}
|
|
14833
14833
|
return (_ctx, _cache) => {
|
|
14834
14834
|
return openBlock(), createElementBlock("div", {
|
|
14835
|
-
class: normalizeClass(["dropdown", { opendrop: isOpen
|
|
14835
|
+
class: normalizeClass(["dropdown", { opendrop: unref(isOpen) }]),
|
|
14836
14836
|
onClick: toggleDropdown
|
|
14837
14837
|
}, [
|
|
14838
14838
|
createElementVNode("div", _hoisted_1$U, [
|
|
14839
|
-
createTextVNode(toDisplayString(selectedOption
|
|
14839
|
+
createTextVNode(toDisplayString(unref(selectedOption) || __props.placeholder) + " ", 1),
|
|
14840
14840
|
createVNode(unref(_sfc_main$R), { icon: "keyboard_arrow_down" })
|
|
14841
14841
|
]),
|
|
14842
14842
|
createElementVNode("div", _hoisted_2$M, [
|
|
@@ -14996,7 +14996,7 @@ const _hoisted_3$C = { class: "comment-top" };
|
|
|
14996
14996
|
const _hoisted_4$n = { class: "comment-owner" };
|
|
14997
14997
|
const _hoisted_5$j = { class: "comment-time" };
|
|
14998
14998
|
const _hoisted_6$g = { class: "comment-actions" };
|
|
14999
|
-
const _hoisted_7$
|
|
14999
|
+
const _hoisted_7$c = ["innerHTML"];
|
|
15000
15000
|
const _hoisted_8$6 = { class: "new-comment" };
|
|
15001
15001
|
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
15002
15002
|
__name: "Comments",
|
|
@@ -15085,7 +15085,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
15085
15085
|
key: 1,
|
|
15086
15086
|
class: "editor-wrapper",
|
|
15087
15087
|
innerHTML: comment.body_html
|
|
15088
|
-
}, null, 8, _hoisted_7$
|
|
15088
|
+
}, null, 8, _hoisted_7$c))
|
|
15089
15089
|
], 2);
|
|
15090
15090
|
}), 128))
|
|
15091
15091
|
]),
|
|
@@ -15309,7 +15309,7 @@ const _hoisted_3$B = { class: "row first-row" };
|
|
|
15309
15309
|
const _hoisted_4$m = ["onClick"];
|
|
15310
15310
|
const _hoisted_5$i = { class: "flex" };
|
|
15311
15311
|
const _hoisted_6$f = ["onClick"];
|
|
15312
|
-
const _hoisted_7$
|
|
15312
|
+
const _hoisted_7$b = { key: 1 };
|
|
15313
15313
|
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
15314
15314
|
__name: "TableSchema",
|
|
15315
15315
|
props: {
|
|
@@ -15349,10 +15349,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
15349
15349
|
const columns = computed(
|
|
15350
15350
|
() => {
|
|
15351
15351
|
var _a;
|
|
15352
|
-
return ((_a = props2.schema) == null ? void 0 : _a.call(props2)) || Object.keys(props2.data[0]).map((k) => ({
|
|
15353
|
-
id: k,
|
|
15354
|
-
inputType: "PlainText"
|
|
15355
|
-
}));
|
|
15352
|
+
return ((_a = props2.schema) == null ? void 0 : _a.call(props2)) || Object.keys(props2.data[0]).map((k) => ({ id: k, inputType: "PlainText" }));
|
|
15356
15353
|
}
|
|
15357
15354
|
);
|
|
15358
15355
|
return (_ctx, _cache) => {
|
|
@@ -15399,9 +15396,14 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
15399
15396
|
key: 0,
|
|
15400
15397
|
row,
|
|
15401
15398
|
field
|
|
15402
|
-
}, void 0, true) : (openBlock(), createElementBlock("div", _hoisted_7$
|
|
15399
|
+
}, void 0, true) : (openBlock(), createElementBlock("div", _hoisted_7$b, [
|
|
15403
15400
|
(field["v-if"] ? field["v-if"](row[field.id], row) : true) ? (openBlock(), createBlock(resolveDynamicComponent(field.$el || field.$cmp || "div"), mergeProps({ key: 0 }, bindAttrs(field.attrs, row[field.id], row), {
|
|
15404
|
-
src: field.$el === "img" ? (_a = row[field.id]) == null ? void 0 : _a.url : ""
|
|
15401
|
+
src: field.$el === "img" ? (_a = row[field.id]) == null ? void 0 : _a.url : "",
|
|
15402
|
+
"onUpdate:modelValue": ($event) => {
|
|
15403
|
+
var _a2;
|
|
15404
|
+
return (_a2 = field == null ? void 0 : field.onUpdate) == null ? void 0 : _a2.call(field, $event, row[field.id], row);
|
|
15405
|
+
},
|
|
15406
|
+
modelValue: row[field.id]
|
|
15405
15407
|
}), {
|
|
15406
15408
|
default: withCtx(() => {
|
|
15407
15409
|
var _a2;
|
|
@@ -15410,7 +15412,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
15410
15412
|
];
|
|
15411
15413
|
}),
|
|
15412
15414
|
_: 2
|
|
15413
|
-
}, 1040, ["src"])) : createCommentVNode("", true)
|
|
15415
|
+
}, 1040, ["src", "onUpdate:modelValue", "modelValue"])) : createCommentVNode("", true)
|
|
15414
15416
|
]))
|
|
15415
15417
|
]);
|
|
15416
15418
|
}), 128))
|
|
@@ -15422,7 +15424,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
15422
15424
|
};
|
|
15423
15425
|
}
|
|
15424
15426
|
});
|
|
15425
|
-
const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-
|
|
15427
|
+
const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-8cd8ab82"]]);
|
|
15426
15428
|
const _sfc_main$E = {};
|
|
15427
15429
|
const _hoisted_1$M = { class: "flex space-between" };
|
|
15428
15430
|
function _sfc_render$1(_ctx, _cache) {
|
|
@@ -15506,7 +15508,7 @@ const _hoisted_6$e = {
|
|
|
15506
15508
|
key: 0,
|
|
15507
15509
|
class: "person-card-details"
|
|
15508
15510
|
};
|
|
15509
|
-
const _hoisted_7$
|
|
15511
|
+
const _hoisted_7$a = {
|
|
15510
15512
|
key: 1,
|
|
15511
15513
|
class: "person-card-details"
|
|
15512
15514
|
};
|
|
@@ -15576,7 +15578,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
15576
15578
|
}, toDisplayString(phone.phone), 1);
|
|
15577
15579
|
}), 128))
|
|
15578
15580
|
])) : createCommentVNode("", true),
|
|
15579
|
-
((_b = _ctx.person.email) == null ? void 0 : _b.length) ? (openBlock(), createElementBlock("div", _hoisted_7$
|
|
15581
|
+
((_b = _ctx.person.email) == null ? void 0 : _b.length) ? (openBlock(), createElementBlock("div", _hoisted_7$a, [
|
|
15580
15582
|
createVNode(unref(_sfc_main$R), { icon: "email" }),
|
|
15581
15583
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.person.email, (email) => {
|
|
15582
15584
|
return openBlock(), createElementBlock("p", {
|
|
@@ -15602,10 +15604,14 @@ const _hoisted_2$D = {
|
|
|
15602
15604
|
key: 0,
|
|
15603
15605
|
class: "mb-3 mt-0"
|
|
15604
15606
|
};
|
|
15605
|
-
const _hoisted_3$z = {
|
|
15606
|
-
|
|
15607
|
-
|
|
15608
|
-
|
|
15607
|
+
const _hoisted_3$z = {
|
|
15608
|
+
key: 0,
|
|
15609
|
+
class: "data-row"
|
|
15610
|
+
};
|
|
15611
|
+
const _hoisted_4$k = { class: "key" };
|
|
15612
|
+
const _hoisted_5$g = { key: 1 };
|
|
15613
|
+
const _hoisted_6$d = { class: "key" };
|
|
15614
|
+
const _hoisted_7$9 = { class: "vlue" };
|
|
15609
15615
|
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
15610
15616
|
__name: "DataPreview",
|
|
15611
15617
|
props: {
|
|
@@ -15616,34 +15622,55 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
15616
15622
|
setup(__props) {
|
|
15617
15623
|
const i18nT = useI18nT();
|
|
15618
15624
|
const keysToIgnore = ["id", "person_id", "person", "created_at", "updated_at"];
|
|
15625
|
+
const props2 = __props;
|
|
15626
|
+
const itemData = ref(props2.data);
|
|
15627
|
+
const bindAttrs = (attrs, field, row) => {
|
|
15628
|
+
const arr = Object.entries(attrs || {}).map(([key, value]) => [
|
|
15629
|
+
key,
|
|
15630
|
+
typeof value === "function" ? value(field, row) : value
|
|
15631
|
+
]);
|
|
15632
|
+
const resolvedAttrs = Object.fromEntries(arr);
|
|
15633
|
+
return resolvedAttrs;
|
|
15634
|
+
};
|
|
15619
15635
|
return (_ctx, _cache) => {
|
|
15620
15636
|
var _a;
|
|
15621
15637
|
return _ctx.data ? (openBlock(), createElementBlock("div", _hoisted_1$J, [
|
|
15622
15638
|
_ctx.title ? (openBlock(), createElementBlock("h3", _hoisted_2$D, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
15623
15639
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.schema || [], (field) => {
|
|
15624
|
-
return openBlock(), createElementBlock(
|
|
15625
|
-
key: field.id
|
|
15626
|
-
class: "data-row"
|
|
15640
|
+
return openBlock(), createElementBlock(Fragment$1, {
|
|
15641
|
+
key: field.id
|
|
15627
15642
|
}, [
|
|
15628
|
-
|
|
15629
|
-
|
|
15630
|
-
|
|
15631
|
-
|
|
15632
|
-
|
|
15633
|
-
|
|
15634
|
-
|
|
15635
|
-
|
|
15643
|
+
(field["v-if"] ? field["v-if"](itemData.value[field.id], itemData.value) : true) ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
|
|
15644
|
+
createElementVNode("div", _hoisted_4$k, toDisplayString((field == null ? void 0 : field.label) || unref(keyToLabel)(field.id)), 1),
|
|
15645
|
+
(openBlock(), createBlock(resolveDynamicComponent(field.$el || "div"), mergeProps({
|
|
15646
|
+
class: "vlue",
|
|
15647
|
+
modelValue: itemData.value[field.id],
|
|
15648
|
+
"onUpdate:modelValue": [($event) => itemData.value[field.id] = $event, ($event) => {
|
|
15649
|
+
var _a2;
|
|
15650
|
+
return (_a2 = field == null ? void 0 : field.onUpdate) == null ? void 0 : _a2.call(field, $event, _ctx.data[field.id], itemData.value);
|
|
15651
|
+
}]
|
|
15652
|
+
}, bindAttrs(field.attrs, itemData.value[field.id], itemData.value)), {
|
|
15653
|
+
default: withCtx(() => {
|
|
15654
|
+
var _a2;
|
|
15655
|
+
return [
|
|
15656
|
+
createTextVNode(toDisplayString(((_a2 = field == null ? void 0 : field.transform) == null ? void 0 : _a2.call(field, itemData.value[field.id] || field.defaultValue, itemData.value)) || itemData.value[field.id] || ""), 1)
|
|
15657
|
+
];
|
|
15658
|
+
}),
|
|
15659
|
+
_: 2
|
|
15660
|
+
}, 1040, ["modelValue", "onUpdate:modelValue"]))
|
|
15661
|
+
])) : createCommentVNode("", true)
|
|
15662
|
+
], 64);
|
|
15636
15663
|
}), 128)),
|
|
15637
|
-
!((_a = _ctx.schema) == null ? void 0 : _a.length) ? (openBlock(), createElementBlock("div",
|
|
15638
|
-
(openBlock(true), createElementBlock(Fragment$1, null, renderList(Object.entries(
|
|
15664
|
+
!((_a = _ctx.schema) == null ? void 0 : _a.length) ? (openBlock(), createElementBlock("div", _hoisted_5$g, [
|
|
15665
|
+
(openBlock(true), createElementBlock(Fragment$1, null, renderList(Object.entries(itemData.value).filter(
|
|
15639
15666
|
([key]) => !keysToIgnore.includes(key)
|
|
15640
15667
|
), ([key, value]) => {
|
|
15641
15668
|
return openBlock(), createElementBlock("div", {
|
|
15642
15669
|
class: "data-row",
|
|
15643
15670
|
key
|
|
15644
15671
|
}, [
|
|
15645
|
-
createElementVNode("div",
|
|
15646
|
-
createElementVNode("div",
|
|
15672
|
+
createElementVNode("div", _hoisted_6$d, toDisplayString(unref(i18nT)(unref(keyToLabel)(key))), 1),
|
|
15673
|
+
createElementVNode("div", _hoisted_7$9, toDisplayString(value), 1)
|
|
15647
15674
|
]);
|
|
15648
15675
|
}), 128))
|
|
15649
15676
|
])) : createCommentVNode("", true),
|
|
@@ -15652,7 +15679,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
15652
15679
|
};
|
|
15653
15680
|
}
|
|
15654
15681
|
});
|
|
15655
|
-
const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-
|
|
15682
|
+
const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-dc2757c4"]]);
|
|
15656
15683
|
const _withScopeId$2 = (n) => (pushScopeId("data-v-fe5af582"), n = n(), popScopeId(), n);
|
|
15657
15684
|
const _hoisted_1$I = { class: "bar-chart" };
|
|
15658
15685
|
const _hoisted_2$C = {
|
|
@@ -17043,13 +17070,17 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
17043
17070
|
(v) => {
|
|
17044
17071
|
if (v === void 0 || v === val.value)
|
|
17045
17072
|
return;
|
|
17073
|
+
console.log("v", v);
|
|
17046
17074
|
val.value = v;
|
|
17047
17075
|
},
|
|
17048
17076
|
{ immediate: true }
|
|
17049
17077
|
);
|
|
17050
17078
|
watch(
|
|
17051
17079
|
() => val.value,
|
|
17052
|
-
(v) =>
|
|
17080
|
+
(v) => {
|
|
17081
|
+
if (v !== props2.modelValue)
|
|
17082
|
+
emits("update:modelValue", v);
|
|
17083
|
+
}
|
|
17053
17084
|
);
|
|
17054
17085
|
return (_ctx, _cache) => {
|
|
17055
17086
|
return openBlock(), createElementBlock("label", _hoisted_1$H, [
|
|
@@ -17066,7 +17097,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
17066
17097
|
};
|
|
17067
17098
|
}
|
|
17068
17099
|
});
|
|
17069
|
-
const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-
|
|
17100
|
+
const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-6b168ea9"]]);
|
|
17070
17101
|
const _hoisted_1$G = { class: "bagel-input" };
|
|
17071
17102
|
const _hoisted_2$B = { class: "mt-1" };
|
|
17072
17103
|
const _hoisted_3$x = {
|
|
@@ -17741,7 +17772,8 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
17741
17772
|
props: {
|
|
17742
17773
|
context: {},
|
|
17743
17774
|
dragDropLabel: { default: "Drag and drop your files here" },
|
|
17744
|
-
browseLabel: { default: "or browse" }
|
|
17775
|
+
browseLabel: { default: "or browse" },
|
|
17776
|
+
multiple: { type: Boolean, default: false }
|
|
17745
17777
|
},
|
|
17746
17778
|
setup(__props) {
|
|
17747
17779
|
const bagel = useBagel();
|
|
@@ -17759,9 +17791,12 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
17759
17791
|
var _a, _b;
|
|
17760
17792
|
return ((_b = (_a = props2 == null ? void 0 : props2.context) == null ? void 0 : _a.attrs) == null ? void 0 : _b.browseLabel) || (props2 == null ? void 0 : props2.browseLabel);
|
|
17761
17793
|
});
|
|
17794
|
+
const computedMultiple = computed(() => {
|
|
17795
|
+
var _a, _b;
|
|
17796
|
+
return !!(((_b = (_a = props2 == null ? void 0 : props2.context) == null ? void 0 : _a.attrs) == null ? void 0 : _b.multiple) || (props2 == null ? void 0 : props2.multiple));
|
|
17797
|
+
});
|
|
17762
17798
|
const allowUpload = computed(() => {
|
|
17763
|
-
|
|
17764
|
-
const tooManyFiles = !((_a = props2.context) == null ? void 0 : _a.attrs.multiple) && files.value.length > 0;
|
|
17799
|
+
const tooManyFiles = !computedMultiple.value && files.value.length > 0;
|
|
17765
17800
|
return !tooManyFiles;
|
|
17766
17801
|
});
|
|
17767
17802
|
const openFileDialog = () => {
|
|
@@ -17781,9 +17816,9 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
17781
17816
|
(_h = (_g = (_f = dropCircle.value) == null ? void 0 : _f.style) == null ? void 0 : _g.setProperty) == null ? void 0 : _h.call(_g, "top", `${top2}px`);
|
|
17782
17817
|
}
|
|
17783
17818
|
function emitValue() {
|
|
17784
|
-
var _a
|
|
17785
|
-
if (!
|
|
17786
|
-
return (
|
|
17819
|
+
var _a;
|
|
17820
|
+
if (!computedMultiple.value)
|
|
17821
|
+
return (_a = props2.context) == null ? void 0 : _a.node.input(files.value[0].serverFile);
|
|
17787
17822
|
return alert("not implemented");
|
|
17788
17823
|
}
|
|
17789
17824
|
const isImg = (file) => {
|
|
@@ -17837,16 +17872,16 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
17837
17872
|
uploadFiles();
|
|
17838
17873
|
}
|
|
17839
17874
|
onMounted(() => {
|
|
17840
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
17875
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
17841
17876
|
(_a = dropZoneEl.value) == null ? void 0 : _a.addEventListener("dragover", animateCircle);
|
|
17842
|
-
if (!
|
|
17877
|
+
if (!computedMultiple.value && ((_b = props2.context) == null ? void 0 : _b.value)) {
|
|
17843
17878
|
files.value.push({
|
|
17844
|
-
serverFile: (
|
|
17879
|
+
serverFile: (_c = props2.context) == null ? void 0 : _c.value,
|
|
17845
17880
|
uploaded: true,
|
|
17846
17881
|
uploading: false,
|
|
17847
17882
|
progress: 100,
|
|
17848
|
-
dataUrl: (
|
|
17849
|
-
name: (
|
|
17883
|
+
dataUrl: (_e = (_d = props2.context) == null ? void 0 : _d.value) == null ? void 0 : _e.url,
|
|
17884
|
+
name: (_g = (_f = props2.context) == null ? void 0 : _f.value) == null ? void 0 : _g.name
|
|
17850
17885
|
});
|
|
17851
17886
|
}
|
|
17852
17887
|
});
|
|
@@ -17867,7 +17902,6 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
17867
17902
|
void addFiles(filesToAdd);
|
|
17868
17903
|
}
|
|
17869
17904
|
return (_ctx, _cache) => {
|
|
17870
|
-
var _a;
|
|
17871
17905
|
return openBlock(), createElementBlock("div", _hoisted_1$B, [
|
|
17872
17906
|
createElementVNode("div", {
|
|
17873
17907
|
ref_key: "dropZoneEl",
|
|
@@ -17939,7 +17973,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
17939
17973
|
onChange: handleFileInput,
|
|
17940
17974
|
ref_key: "fileInputEl",
|
|
17941
17975
|
ref: fileInputEl,
|
|
17942
|
-
multiple:
|
|
17976
|
+
multiple: computedMultiple.value
|
|
17943
17977
|
}, null, 40, _hoisted_8$1)
|
|
17944
17978
|
]);
|
|
17945
17979
|
};
|
|
@@ -18123,7 +18157,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
18123
18157
|
}, [
|
|
18124
18158
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(variables.value, (v) => {
|
|
18125
18159
|
var _a;
|
|
18126
|
-
return openBlock(), createBlock(unref(
|
|
18160
|
+
return openBlock(), createBlock(unref(TextInput), {
|
|
18127
18161
|
key: v,
|
|
18128
18162
|
placeholder: `Variable ${v}`,
|
|
18129
18163
|
modelValue: (_a = unref(val)) == null ? void 0 : _a[v - 1],
|
|
@@ -21976,7 +22010,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
21976
22010
|
});
|
|
21977
22011
|
const _hoisted_1$h = ["title"];
|
|
21978
22012
|
const _hoisted_2$e = ["for"];
|
|
21979
|
-
const _hoisted_3$c = ["id", "placeholder", "required", "pattern"];
|
|
22013
|
+
const _hoisted_3$c = ["id", "type", "placeholder", "disabled", "required", "pattern"];
|
|
21980
22014
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
21981
22015
|
__name: "TextInput",
|
|
21982
22016
|
props: {
|
|
@@ -21985,10 +22019,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
21985
22019
|
placeholder: {},
|
|
21986
22020
|
modelValue: { default: "" },
|
|
21987
22021
|
label: {},
|
|
21988
|
-
editMode: { type: Boolean, default: true },
|
|
21989
22022
|
small: { type: Boolean },
|
|
21990
22023
|
required: { type: Boolean },
|
|
21991
22024
|
pattern: {},
|
|
22025
|
+
shrink: { type: Boolean },
|
|
22026
|
+
toggleEdit: { type: Boolean, default: false },
|
|
22027
|
+
type: { default: "text" },
|
|
21992
22028
|
nativeInputAttrs: {}
|
|
21993
22029
|
},
|
|
21994
22030
|
emits: ["update:modelValue", "debounce"],
|
|
@@ -21996,9 +22032,28 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
21996
22032
|
const emit2 = __emit;
|
|
21997
22033
|
const props2 = __props;
|
|
21998
22034
|
let inputVal = ref();
|
|
22035
|
+
let editMode = ref(!props2.toggleEdit);
|
|
22036
|
+
const input2 = ref();
|
|
22037
|
+
const toggleEditAction = () => {
|
|
22038
|
+
if (editMode.value) {
|
|
22039
|
+
editMode.value = false;
|
|
22040
|
+
emit2("debounce", inputVal.value);
|
|
22041
|
+
emit2("update:modelValue", inputVal.value);
|
|
22042
|
+
} else {
|
|
22043
|
+
editMode.value = true;
|
|
22044
|
+
setTimeout(() => {
|
|
22045
|
+
var _a;
|
|
22046
|
+
return (_a = input2.value) == null ? void 0 : _a.focus();
|
|
22047
|
+
}, 10);
|
|
22048
|
+
}
|
|
22049
|
+
};
|
|
21999
22050
|
watch(
|
|
22000
22051
|
() => inputVal.value,
|
|
22001
22052
|
(newVal) => {
|
|
22053
|
+
if (props2.toggleEdit)
|
|
22054
|
+
return;
|
|
22055
|
+
if (newVal === props2.modelValue)
|
|
22056
|
+
return;
|
|
22002
22057
|
emit2("update:modelValue", newVal);
|
|
22003
22058
|
debounce(() => emit2("debounce", newVal));
|
|
22004
22059
|
}
|
|
@@ -22013,7 +22068,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
22013
22068
|
);
|
|
22014
22069
|
return (_ctx, _cache) => {
|
|
22015
22070
|
return openBlock(), createElementBlock("div", {
|
|
22016
|
-
class: normalizeClass(["bagel-input", { small: _ctx.small }]),
|
|
22071
|
+
class: normalizeClass(["bagel-input", { small: _ctx.small, shrink: _ctx.shrink, toggleEdit: _ctx.toggleEdit, editMode: unref(editMode) }]),
|
|
22017
22072
|
title: _ctx.title
|
|
22018
22073
|
}, [
|
|
22019
22074
|
createElementVNode("label", { for: _ctx.id }, [
|
|
@@ -22021,19 +22076,33 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
22021
22076
|
withDirectives(createElementVNode("input", mergeProps({
|
|
22022
22077
|
id: _ctx.id,
|
|
22023
22078
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(inputVal) ? inputVal.value = $event : inputVal = $event),
|
|
22024
|
-
type:
|
|
22079
|
+
type: _ctx.type,
|
|
22080
|
+
ref_key: "input",
|
|
22081
|
+
ref: input2,
|
|
22025
22082
|
placeholder: _ctx.placeholder || _ctx.label,
|
|
22026
|
-
|
|
22083
|
+
disabled: !unref(editMode),
|
|
22027
22084
|
required: _ctx.required,
|
|
22028
22085
|
pattern: _ctx.pattern
|
|
22029
|
-
}, _ctx.nativeInputAttrs
|
|
22030
|
-
|
|
22086
|
+
}, _ctx.nativeInputAttrs, {
|
|
22087
|
+
onDblclick: toggleEditAction,
|
|
22088
|
+
onKeydown: withKeys(toggleEditAction, ["enter"])
|
|
22089
|
+
}), null, 16, _hoisted_3$c), [
|
|
22090
|
+
[vModelDynamic, unref(inputVal)]
|
|
22031
22091
|
])
|
|
22032
|
-
], 8, _hoisted_2$e)
|
|
22092
|
+
], 8, _hoisted_2$e),
|
|
22093
|
+
_ctx.toggleEdit ? (openBlock(), createBlock(unref(Btn), {
|
|
22094
|
+
key: 0,
|
|
22095
|
+
class: "toggleEditBtn",
|
|
22096
|
+
thin: "",
|
|
22097
|
+
onClick: toggleEditAction,
|
|
22098
|
+
icon: unref(editMode) ? "check" : "edit",
|
|
22099
|
+
flat: ""
|
|
22100
|
+
}, null, 8, ["icon"])) : createCommentVNode("", true)
|
|
22033
22101
|
], 10, _hoisted_1$h);
|
|
22034
22102
|
};
|
|
22035
22103
|
}
|
|
22036
22104
|
});
|
|
22105
|
+
const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-7b082166"]]);
|
|
22037
22106
|
const _hoisted_1$g = ["title"];
|
|
22038
22107
|
const _hoisted_2$d = { key: 0 };
|
|
22039
22108
|
const _hoisted_3$b = {
|
|
@@ -28839,7 +28908,7 @@ export {
|
|
|
28839
28908
|
TableField,
|
|
28840
28909
|
TableSchema,
|
|
28841
28910
|
TextArea,
|
|
28842
|
-
|
|
28911
|
+
TextInput,
|
|
28843
28912
|
_sfc_main$q as TextVariableExamples,
|
|
28844
28913
|
TextVariablesInput,
|
|
28845
28914
|
ToggleSwitchInput,
|