@bagelink/vue 0.0.260 → 0.0.264
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/Card.vue.d.ts +2 -2
- package/dist/components/Modal.vue.d.ts.map +1 -1
- package/dist/components/ModalForm.vue.d.ts +10 -1
- package/dist/components/ModalForm.vue.d.ts.map +1 -1
- package/dist/components/TableSchema.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/JSONInput.vue.d.ts +1 -1
- package/dist/components/form/inputs/JSONInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RichTextEditor.vue.d.ts +1 -1
- package/dist/components/form/inputs/RichTextEditor.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectInput.vue.d.ts +2 -0
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/TextArea.vue.d.ts +3 -1
- package/dist/components/form/inputs/TextArea.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/TextInput.vue.d.ts.map +1 -1
- package/dist/index.cjs +72 -39
- package/dist/index.mjs +72 -39
- package/dist/plugins/modal.d.ts +17 -6
- package/dist/plugins/modal.d.ts.map +1 -1
- package/dist/style.css +42 -42
- package/package.json +1 -1
- package/src/components/Modal.vue +29 -6
- package/src/components/ModalForm.vue +52 -12
- package/src/components/TableSchema.vue +11 -3
- package/src/components/form/BglForm.vue +1 -1
- package/src/components/form/inputs/SelectInput.vue +12 -3
- package/src/components/form/inputs/TextArea.vue +2 -0
- package/src/components/form/inputs/TextInput.vue +55 -15
- package/src/plugins/modal.ts +20 -12
package/dist/index.mjs
CHANGED
|
@@ -2306,6 +2306,9 @@ const ModalPlugin = {
|
|
|
2306
2306
|
modalType,
|
|
2307
2307
|
componentSlots: slots
|
|
2308
2308
|
});
|
|
2309
|
+
if (modalType === "modalForm")
|
|
2310
|
+
return modalStack.value.at(-1);
|
|
2311
|
+
return modalStack.value.at(-1);
|
|
2309
2312
|
};
|
|
2310
2313
|
app.provide(ModalSymbol, {
|
|
2311
2314
|
showModal: (options, slots) => showModal("modal", options, slots),
|
|
@@ -14619,7 +14622,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
14619
14622
|
});
|
|
14620
14623
|
const _hoisted_1$F = { class: "full-nav" };
|
|
14621
14624
|
const _hoisted_2$z = { class: "nav-scroll" };
|
|
14622
|
-
const _hoisted_3$
|
|
14625
|
+
const _hoisted_3$q = { class: "nav-links-wrapper" };
|
|
14623
14626
|
const _hoisted_4$j = { class: "tooltip" };
|
|
14624
14627
|
const _hoisted_5$g = { class: "bot-buttons-wrapper" };
|
|
14625
14628
|
const _hoisted_6$b = { class: "tooltip" };
|
|
@@ -14654,7 +14657,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
14654
14657
|
], 32),
|
|
14655
14658
|
createElementVNode("div", _hoisted_1$F, [
|
|
14656
14659
|
createElementVNode("div", _hoisted_2$z, [
|
|
14657
|
-
createElementVNode("div", _hoisted_3$
|
|
14660
|
+
createElementVNode("div", _hoisted_3$q, [
|
|
14658
14661
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.links, (link) => {
|
|
14659
14662
|
return openBlock(), createBlock(resolveDynamicComponent(link.to ? "router-link" : "div"), {
|
|
14660
14663
|
class: "nav-button",
|
|
@@ -14909,13 +14912,16 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
14909
14912
|
schema: { type: Function },
|
|
14910
14913
|
onSubmit: { type: Function },
|
|
14911
14914
|
onDelete: { type: Function },
|
|
14912
|
-
"onUpdate:isModalVisible": { type: Function }
|
|
14915
|
+
"onUpdate:isModalVisible": { type: Function },
|
|
14916
|
+
onError: { type: Function },
|
|
14917
|
+
modelValue: {}
|
|
14913
14918
|
}, {
|
|
14914
14919
|
"modelValue": { default: {} },
|
|
14915
14920
|
"modelModifiers": {}
|
|
14916
14921
|
}),
|
|
14917
14922
|
emits: ["update:modelValue"],
|
|
14918
|
-
setup(__props) {
|
|
14923
|
+
setup(__props, { expose: __expose }) {
|
|
14924
|
+
const bagel = useBagel();
|
|
14919
14925
|
const props2 = __props;
|
|
14920
14926
|
const modal = ref();
|
|
14921
14927
|
const computedFormSchema = computed(() => {
|
|
@@ -14930,14 +14936,17 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
14930
14936
|
return (_a2 = modal.value) == null ? void 0 : _a2.closeModal();
|
|
14931
14937
|
};
|
|
14932
14938
|
const runSubmit = async () => {
|
|
14933
|
-
var _a2, _b, _c;
|
|
14939
|
+
var _a2, _b, _c, _d;
|
|
14934
14940
|
if (((_b = (_a2 = form.value) == null ? void 0 : _a2.validateForm) == null ? void 0 : _b.call(_a2)) === false)
|
|
14935
14941
|
return;
|
|
14936
14942
|
try {
|
|
14937
14943
|
await ((_c = props2.onSubmit) == null ? void 0 : _c.call(props2, formData.value));
|
|
14938
14944
|
closeModal();
|
|
14939
14945
|
} catch (err) {
|
|
14940
|
-
|
|
14946
|
+
if (props2.onError)
|
|
14947
|
+
props2.onError(err);
|
|
14948
|
+
else
|
|
14949
|
+
(_d = bagel == null ? void 0 : bagel.onError) == null ? void 0 : _d.call(bagel, err);
|
|
14941
14950
|
}
|
|
14942
14951
|
};
|
|
14943
14952
|
const runDelete = () => {
|
|
@@ -14945,6 +14954,10 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
14945
14954
|
(_b = props2.onDelete) == null ? void 0 : _b.call(props2, (_a2 = formData.value) == null ? void 0 : _a2.id);
|
|
14946
14955
|
closeModal();
|
|
14947
14956
|
};
|
|
14957
|
+
function setFormValues(values3) {
|
|
14958
|
+
Object.assign(formData, values3);
|
|
14959
|
+
}
|
|
14960
|
+
__expose({ setFormValues });
|
|
14948
14961
|
return (_ctx, _cache) => {
|
|
14949
14962
|
return openBlock(), createBlock(unref(_sfc_main$y), {
|
|
14950
14963
|
"onOnUpdate:isModalVisible": props2["onUpdate:isModalVisible"],
|
|
@@ -14973,7 +14986,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
14973
14986
|
thin: "",
|
|
14974
14987
|
flat: "",
|
|
14975
14988
|
value: "Cancel",
|
|
14976
|
-
onClick:
|
|
14989
|
+
onClick: closeModal
|
|
14977
14990
|
}),
|
|
14978
14991
|
_ctx.onDelete ? (openBlock(), createBlock(unref(Btn), {
|
|
14979
14992
|
key: 0,
|
|
@@ -14981,13 +14994,13 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
14981
14994
|
icon: "delete",
|
|
14982
14995
|
flat: "",
|
|
14983
14996
|
value: "Delete",
|
|
14984
|
-
onClick:
|
|
14997
|
+
onClick: runDelete,
|
|
14985
14998
|
color: "red"
|
|
14986
14999
|
})) : createCommentVNode("", true)
|
|
14987
15000
|
]),
|
|
14988
15001
|
createVNode(unref(Btn), {
|
|
14989
15002
|
value: "Submit",
|
|
14990
|
-
onClick:
|
|
15003
|
+
onClick: runSubmit
|
|
14991
15004
|
})
|
|
14992
15005
|
]),
|
|
14993
15006
|
key: "0"
|
|
@@ -14996,7 +15009,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
14996
15009
|
};
|
|
14997
15010
|
}
|
|
14998
15011
|
});
|
|
14999
|
-
const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-
|
|
15012
|
+
const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-5c602c4d"]]);
|
|
15000
15013
|
const _hoisted_1$C = { class: "accordion-item" };
|
|
15001
15014
|
const _hoisted_2$w = {
|
|
15002
15015
|
key: 0,
|
|
@@ -15041,7 +15054,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
15041
15054
|
const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-172f43f1"]]);
|
|
15042
15055
|
const _hoisted_1$B = { class: "card list-view grid thin" };
|
|
15043
15056
|
const _hoisted_2$v = { class: "list-header flex gap-3 align-items-top" };
|
|
15044
|
-
const _hoisted_3$
|
|
15057
|
+
const _hoisted_3$p = {
|
|
15045
15058
|
key: 0,
|
|
15046
15059
|
class: "bagel-input search-wrap"
|
|
15047
15060
|
};
|
|
@@ -15065,7 +15078,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
15065
15078
|
return (_ctx, _cache) => {
|
|
15066
15079
|
return openBlock(), createElementBlock("div", _hoisted_1$B, [
|
|
15067
15080
|
createElementVNode("div", _hoisted_2$v, [
|
|
15068
|
-
_ctx.enableSearch ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
15081
|
+
_ctx.enableSearch ? (openBlock(), createElementBlock("div", _hoisted_3$p, [
|
|
15069
15082
|
withDirectives(createElementVNode("input", {
|
|
15070
15083
|
placeholder: _ctx.searchPlaceholder,
|
|
15071
15084
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchTerm.value = $event),
|
|
@@ -15134,7 +15147,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
15134
15147
|
});
|
|
15135
15148
|
const _hoisted_1$z = { class: "card tabs-top" };
|
|
15136
15149
|
const _hoisted_2$t = { class: "tabs grid auto-flow-columns fit-content" };
|
|
15137
|
-
const _hoisted_3$
|
|
15150
|
+
const _hoisted_3$o = ["onClick"];
|
|
15138
15151
|
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
15139
15152
|
__name: "TabbedLayout",
|
|
15140
15153
|
props: {
|
|
@@ -15181,7 +15194,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
15181
15194
|
}, "tab"]),
|
|
15182
15195
|
key: tab,
|
|
15183
15196
|
onClick: ($event) => changeTab(tab)
|
|
15184
|
-
}, toDisplayString(tab), 11, _hoisted_3$
|
|
15197
|
+
}, toDisplayString(tab), 11, _hoisted_3$o);
|
|
15185
15198
|
}), 128))
|
|
15186
15199
|
])
|
|
15187
15200
|
]),
|
|
@@ -15200,7 +15213,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
15200
15213
|
const TabbedLayout = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-09fce741"]]);
|
|
15201
15214
|
const _hoisted_1$y = { class: "comments-wrap" };
|
|
15202
15215
|
const _hoisted_2$s = { class: "comment-list" };
|
|
15203
|
-
const _hoisted_3$
|
|
15216
|
+
const _hoisted_3$n = { class: "comment-top" };
|
|
15204
15217
|
const _hoisted_4$h = { class: "comment-owner" };
|
|
15205
15218
|
const _hoisted_5$e = { class: "comment-time" };
|
|
15206
15219
|
const _hoisted_6$a = { class: "comment-actions" };
|
|
@@ -15260,7 +15273,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
15260
15273
|
}, "comment"]),
|
|
15261
15274
|
key: comment.id
|
|
15262
15275
|
}, [
|
|
15263
|
-
createElementVNode("div", _hoisted_3$
|
|
15276
|
+
createElementVNode("div", _hoisted_3$n, [
|
|
15264
15277
|
createElementVNode("div", _hoisted_4$h, toDisplayString(comment.sender.first_name) + " " + toDisplayString(comment.sender.last_name), 1),
|
|
15265
15278
|
createElementVNode("div", _hoisted_5$e, toDisplayString(comment.updated_at.split("T")[0]), 1),
|
|
15266
15279
|
createElementVNode("div", _hoisted_6$a, [
|
|
@@ -15342,7 +15355,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
15342
15355
|
});
|
|
15343
15356
|
const _hoisted_1$w = { class: "table-list-wrap h-100" };
|
|
15344
15357
|
const _hoisted_2$q = { class: "infinite-wrapper" };
|
|
15345
|
-
const _hoisted_3$
|
|
15358
|
+
const _hoisted_3$m = { class: "row first-row" };
|
|
15346
15359
|
const _hoisted_4$g = ["onClick"];
|
|
15347
15360
|
const _hoisted_5$d = { class: "flex" };
|
|
15348
15361
|
const _hoisted_6$9 = ["onClick"];
|
|
@@ -15383,7 +15396,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
15383
15396
|
return (_ctx, _cache) => {
|
|
15384
15397
|
return openBlock(), createElementBlock("div", _hoisted_1$w, [
|
|
15385
15398
|
createElementVNode("table", _hoisted_2$q, [
|
|
15386
|
-
createElementVNode("thead", _hoisted_3$
|
|
15399
|
+
createElementVNode("thead", _hoisted_3$m, [
|
|
15387
15400
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(computedSchema.value, (field) => {
|
|
15388
15401
|
return openBlock(), createElementBlock("th", {
|
|
15389
15402
|
class: "col",
|
|
@@ -15439,7 +15452,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
15439
15452
|
};
|
|
15440
15453
|
}
|
|
15441
15454
|
});
|
|
15442
|
-
const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-
|
|
15455
|
+
const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-2137a7a8"]]);
|
|
15443
15456
|
const _sfc_main$p = {};
|
|
15444
15457
|
const _hoisted_1$v = { class: "flex space-between" };
|
|
15445
15458
|
function _sfc_render$1(_ctx, _cache) {
|
|
@@ -15479,7 +15492,7 @@ const _hoisted_2$p = {
|
|
|
15479
15492
|
key: 0,
|
|
15480
15493
|
class: "data-row"
|
|
15481
15494
|
};
|
|
15482
|
-
const _hoisted_3$
|
|
15495
|
+
const _hoisted_3$l = { class: "key" };
|
|
15483
15496
|
const _hoisted_4$f = { key: 1 };
|
|
15484
15497
|
const _hoisted_5$c = { class: "key" };
|
|
15485
15498
|
const _hoisted_6$8 = { class: "vlue" };
|
|
@@ -15507,7 +15520,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
15507
15520
|
key: field.id
|
|
15508
15521
|
}, [
|
|
15509
15522
|
unref(iffer)(field, itemData.value) ? (openBlock(), createElementBlock("div", _hoisted_2$p, [
|
|
15510
|
-
createElementVNode("div", _hoisted_3$
|
|
15523
|
+
createElementVNode("div", _hoisted_3$l, toDisplayString((field == null ? void 0 : field.label) || unref(keyToLabel)(field.id)), 1),
|
|
15511
15524
|
createVNode(unref(_sfc_main$h), {
|
|
15512
15525
|
field,
|
|
15513
15526
|
modelValue: itemData.value,
|
|
@@ -15613,7 +15626,7 @@ const _hoisted_2$o = {
|
|
|
15613
15626
|
key: 0,
|
|
15614
15627
|
class: "group-wrap"
|
|
15615
15628
|
};
|
|
15616
|
-
const _hoisted_3$
|
|
15629
|
+
const _hoisted_3$k = { class: "group-title" };
|
|
15617
15630
|
const _hoisted_4$e = {
|
|
15618
15631
|
key: 1,
|
|
15619
15632
|
class: "bar-wrap"
|
|
@@ -15681,7 +15694,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
15681
15694
|
key: i2
|
|
15682
15695
|
}, [
|
|
15683
15696
|
item.group ? (openBlock(), createElementBlock("div", _hoisted_2$o, [
|
|
15684
|
-
createElementVNode("p", _hoisted_3$
|
|
15697
|
+
createElementVNode("p", _hoisted_3$k, toDisplayString(item.group), 1),
|
|
15685
15698
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList((item == null ? void 0 : item.data) || [], (nested, i22) => {
|
|
15686
15699
|
return openBlock(), createElementBlock("div", {
|
|
15687
15700
|
key: i22,
|
|
@@ -15740,9 +15753,9 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
15740
15753
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
15741
15754
|
const { showModal } = useModal();
|
|
15742
15755
|
const props2 = __props;
|
|
15756
|
+
const instAt = /* @__PURE__ */ new Date();
|
|
15743
15757
|
const timeSinceInst = () => (/* @__PURE__ */ new Date()).getTime() - instAt.getTime();
|
|
15744
15758
|
const emit2 = __emit;
|
|
15745
|
-
const instAt = /* @__PURE__ */ new Date();
|
|
15746
15759
|
let isDirty = ref(false);
|
|
15747
15760
|
const data2 = computed({
|
|
15748
15761
|
set: (val) => {
|
|
@@ -15919,7 +15932,7 @@ const _hoisted_2$n = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ create
|
|
|
15919
15932
|
}, [
|
|
15920
15933
|
/* @__PURE__ */ createElementVNode("path", { d: "M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z" })
|
|
15921
15934
|
], -1));
|
|
15922
|
-
const _hoisted_3$
|
|
15935
|
+
const _hoisted_3$j = [
|
|
15923
15936
|
_hoisted_2$n
|
|
15924
15937
|
];
|
|
15925
15938
|
const _hoisted_4$d = ["id"];
|
|
@@ -15945,7 +15958,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
15945
15958
|
createElementVNode("div", {
|
|
15946
15959
|
class: normalizeClass(["check-square", { checked: checked.value }]),
|
|
15947
15960
|
onClick: _cache[0] || (_cache[0] = ($event) => checked.value = !checked.value)
|
|
15948
|
-
}, _hoisted_3$
|
|
15961
|
+
}, _hoisted_3$j, 2),
|
|
15949
15962
|
createElementVNode("label", null, [
|
|
15950
15963
|
withDirectives(createElementVNode("input", {
|
|
15951
15964
|
id: _ctx.id,
|
|
@@ -24622,7 +24635,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
24622
24635
|
});
|
|
24623
24636
|
const _hoisted_1$p = ["title"];
|
|
24624
24637
|
const _hoisted_2$l = { key: 0 };
|
|
24625
|
-
const _hoisted_3$
|
|
24638
|
+
const _hoisted_3$i = ["value", "placeholder"];
|
|
24626
24639
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
24627
24640
|
__name: "JSONInput",
|
|
24628
24641
|
props: {
|
|
@@ -24654,7 +24667,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
24654
24667
|
onInput: handleInput,
|
|
24655
24668
|
class: normalizeClass({ "no-edit": !_ctx.editMode }),
|
|
24656
24669
|
placeholder: _ctx.placeholder
|
|
24657
|
-
}, null, 42, _hoisted_3$
|
|
24670
|
+
}, null, 42, _hoisted_3$i)
|
|
24658
24671
|
], 10, _hoisted_1$p);
|
|
24659
24672
|
};
|
|
24660
24673
|
}
|
|
@@ -25652,7 +25665,7 @@ const _hoisted_1$o = {
|
|
|
25652
25665
|
class: "multiselect__tags"
|
|
25653
25666
|
};
|
|
25654
25667
|
const _hoisted_2$k = { class: "multiselect__tags-wrap" };
|
|
25655
|
-
const _hoisted_3$
|
|
25668
|
+
const _hoisted_3$h = { class: "multiselect__spinner" };
|
|
25656
25669
|
const _hoisted_4$c = { key: 0 };
|
|
25657
25670
|
const _hoisted_5$a = { class: "multiselect__option" };
|
|
25658
25671
|
const _hoisted_6$6 = { class: "multiselect__option" };
|
|
@@ -25747,7 +25760,7 @@ function render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25747
25760
|
renderSlot(_ctx.$slots, "loading", {}, () => [
|
|
25748
25761
|
withDirectives(createVNode(
|
|
25749
25762
|
"div",
|
|
25750
|
-
_hoisted_3$
|
|
25763
|
+
_hoisted_3$h,
|
|
25751
25764
|
null,
|
|
25752
25765
|
512
|
|
25753
25766
|
/* NEED_PATCH */
|
|
@@ -25967,6 +25980,7 @@ script$e.render = render$e;
|
|
|
25967
25980
|
const Multiselect = script$e;
|
|
25968
25981
|
const _hoisted_1$n = { class: "pb-1" };
|
|
25969
25982
|
const _hoisted_2$j = ["for"];
|
|
25983
|
+
const _hoisted_3$g = ["name", "required"];
|
|
25970
25984
|
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
25971
25985
|
__name: "SelectInput",
|
|
25972
25986
|
props: {
|
|
@@ -25976,7 +25990,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
25976
25990
|
modelValue: {},
|
|
25977
25991
|
placeholder: {},
|
|
25978
25992
|
defaultValue: {},
|
|
25979
|
-
options: {}
|
|
25993
|
+
options: {},
|
|
25994
|
+
extraProps: {}
|
|
25980
25995
|
},
|
|
25981
25996
|
emits: ["update:modelValue"],
|
|
25982
25997
|
setup(__props, { emit: __emit }) {
|
|
@@ -26015,7 +26030,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
26015
26030
|
for: _ctx.id
|
|
26016
26031
|
}, [
|
|
26017
26032
|
createTextVNode(toDisplayString(_ctx.label) + " ", 1),
|
|
26018
|
-
createVNode(unref(Multiselect), {
|
|
26033
|
+
createVNode(unref(Multiselect), mergeProps({
|
|
26019
26034
|
ref_key: "multiselect",
|
|
26020
26035
|
ref: multiselect,
|
|
26021
26036
|
id: _ctx.id,
|
|
@@ -26026,7 +26041,15 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
26026
26041
|
placeholder: _ctx.placeholder,
|
|
26027
26042
|
modelValue: seletValue.value,
|
|
26028
26043
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => seletValue.value = $event)
|
|
26029
|
-
}, null,
|
|
26044
|
+
}, _ctx.extraProps), null, 16, ["id", "options", "required", "placeholder", "modelValue"]),
|
|
26045
|
+
withDirectives(createElementVNode("input", mergeProps({
|
|
26046
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => seletValue.value = $event),
|
|
26047
|
+
type: "hidden",
|
|
26048
|
+
name: _ctx.id,
|
|
26049
|
+
required: _ctx.required
|
|
26050
|
+
}, _ctx.extraProps), null, 16, _hoisted_3$g), [
|
|
26051
|
+
[vModelText, seletValue.value]
|
|
26052
|
+
])
|
|
26030
26053
|
], 8, _hoisted_2$j)
|
|
26031
26054
|
]);
|
|
26032
26055
|
};
|
|
@@ -28828,7 +28851,16 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
28828
28851
|
);
|
|
28829
28852
|
return (_ctx, _cache) => {
|
|
28830
28853
|
return openBlock(), createElementBlock("div", {
|
|
28831
|
-
class: normalizeClass(["bagel-input text-input", {
|
|
28854
|
+
class: normalizeClass(["bagel-input text-input", {
|
|
28855
|
+
dense: _ctx.dense,
|
|
28856
|
+
small: _ctx.small,
|
|
28857
|
+
shrink: _ctx.shrink,
|
|
28858
|
+
toggleEdit: _ctx.toggleEdit,
|
|
28859
|
+
editMode: unref(editMode),
|
|
28860
|
+
code: _ctx.code,
|
|
28861
|
+
textInputIconWrap: _ctx.icon,
|
|
28862
|
+
txtInputIconStart: _ctx.iconStart
|
|
28863
|
+
}]),
|
|
28832
28864
|
title: _ctx.title
|
|
28833
28865
|
}, [
|
|
28834
28866
|
createElementVNode("label", { for: _ctx.id }, [
|
|
@@ -28888,14 +28920,14 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
28888
28920
|
};
|
|
28889
28921
|
}
|
|
28890
28922
|
});
|
|
28891
|
-
const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-
|
|
28923
|
+
const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-e116816b"]]);
|
|
28892
28924
|
const _hoisted_1$j = ["title"];
|
|
28893
28925
|
const _hoisted_2$f = { key: 0 };
|
|
28894
28926
|
const _hoisted_3$c = {
|
|
28895
28927
|
key: 1,
|
|
28896
28928
|
class: "character-limit"
|
|
28897
28929
|
};
|
|
28898
|
-
const _hoisted_4$9 = ["value"];
|
|
28930
|
+
const _hoisted_4$9 = ["value", "required"];
|
|
28899
28931
|
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
28900
28932
|
__name: "TextArea",
|
|
28901
28933
|
props: {
|
|
@@ -28906,7 +28938,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
28906
28938
|
editMode: { type: Boolean, default: true },
|
|
28907
28939
|
small: { type: Boolean },
|
|
28908
28940
|
nativeInputAttrs: {},
|
|
28909
|
-
showCharacterLimit: { type: Boolean }
|
|
28941
|
+
showCharacterLimit: { type: Boolean },
|
|
28942
|
+
required: { type: Boolean }
|
|
28910
28943
|
},
|
|
28911
28944
|
emits: ["update:modelValue"],
|
|
28912
28945
|
setup(__props, { emit: __emit }) {
|
|
@@ -28929,12 +28962,12 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
28929
28962
|
value: _ctx.modelValue,
|
|
28930
28963
|
onInput: handleInput,
|
|
28931
28964
|
class: { "no-edit": !_ctx.editMode }
|
|
28932
|
-
}, _ctx.nativeInputAttrs), null, 16, _hoisted_4$9)
|
|
28965
|
+
}, _ctx.nativeInputAttrs, { required: _ctx.required }), null, 16, _hoisted_4$9)
|
|
28933
28966
|
], 10, _hoisted_1$j);
|
|
28934
28967
|
};
|
|
28935
28968
|
}
|
|
28936
28969
|
});
|
|
28937
|
-
const TextArea = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-
|
|
28970
|
+
const TextArea = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-64dc9f53"]]);
|
|
28938
28971
|
const _hoisted_1$i = { class: "primary-checkbox" };
|
|
28939
28972
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
28940
28973
|
__name: "Checkbox",
|
package/dist/plugins/modal.d.ts
CHANGED
|
@@ -1,29 +1,40 @@
|
|
|
1
1
|
import { InjectionKey } from 'vue';
|
|
2
2
|
import type { Plugin } from 'vue';
|
|
3
3
|
import type { BglFormSchemaT, BtnOptions } from '..';
|
|
4
|
-
interface ModalOptions {
|
|
4
|
+
export interface ModalOptions {
|
|
5
5
|
title?: string;
|
|
6
6
|
dismissable?: boolean;
|
|
7
7
|
side?: boolean;
|
|
8
8
|
actions?: BtnOptions[];
|
|
9
9
|
class?: string;
|
|
10
10
|
}
|
|
11
|
-
interface ModalFormOptions {
|
|
11
|
+
export interface ModalFormOptions {
|
|
12
12
|
side?: boolean;
|
|
13
13
|
title?: string;
|
|
14
14
|
dismissable?: boolean;
|
|
15
15
|
schema: BglFormSchemaT<any> | (() => BglFormSchemaT);
|
|
16
|
-
modelValue?: Record<string, any>;
|
|
17
16
|
onSubmit?: (formData: any) => Promise<any>;
|
|
18
17
|
onDelete?: (id: string) => Promise<void>;
|
|
18
|
+
onError?: ((err: any) => void);
|
|
19
|
+
modelValue?: Record<string, any>;
|
|
20
|
+
'onUpdate:modelValue'?: (val: any) => void;
|
|
21
|
+
}
|
|
22
|
+
export interface ModalComponentProps {
|
|
23
|
+
componentSlots: Record<string, any>;
|
|
24
|
+
modalType: 'modal' | 'modalForm';
|
|
25
|
+
modalOptions: ModalOptions | ModalFormOptions;
|
|
26
|
+
}
|
|
27
|
+
export interface ModalFormComponentProps {
|
|
28
|
+
componentSlots: Record<string, any>;
|
|
29
|
+
modalType: 'modalForm';
|
|
30
|
+
modalOptions: ModalFormOptions;
|
|
19
31
|
}
|
|
20
|
-
interface ModalApi {
|
|
32
|
+
export interface ModalApi {
|
|
21
33
|
showModal: (options: ModalOptions, slots?: Record<string, any>) => void;
|
|
22
|
-
showModalForm: (options: ModalFormOptions, slots?: Record<string, any>) =>
|
|
34
|
+
showModalForm: (options: ModalFormOptions, slots?: Record<string, any>) => ModalFormComponentProps | undefined;
|
|
23
35
|
hideModal: (index?: number) => void;
|
|
24
36
|
}
|
|
25
37
|
export declare const ModalSymbol: InjectionKey<ModalApi>;
|
|
26
38
|
export declare const useModal: () => ModalApi;
|
|
27
39
|
export declare const ModalPlugin: Plugin;
|
|
28
|
-
export {};
|
|
29
40
|
//# sourceMappingURL=modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../src/plugins/modal.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EACf,MAAM,KAAK,CAAC;AACb,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhE,
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../src/plugins/modal.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EACf,MAAM,KAAK,CAAC;AACb,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhE,MAAM,WAAW,YAAY;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAChC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,cAAc,CAAC,CAAC;IACrD,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAC3C,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,qBAAqB,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;CAC3C;AAED,MAAM,WAAW,mBAAmB;IACnC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACpC,SAAS,EAAE,OAAO,GAAG,WAAW,CAAC;IACjC,YAAY,EAAE,YAAY,GAAG,gBAAgB,CAAA;CAC7C;AACD,MAAM,WAAW,uBAAuB;IACvC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACpC,SAAS,EAAE,WAAW,CAAC;IACvB,YAAY,EAAE,gBAAgB,CAAA;CAC9B;AACD,MAAM,WAAW,QAAQ;IACxB,SAAS,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;IACxE,aAAa,EAAE,CAAC,OAAO,EAAE,gBAAgB,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,uBAAuB,GAAG,SAAS,CAAC;IAC/G,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,eAAO,MAAM,WAAW,EAAE,YAAY,CAAC,QAAQ,CAAmB,CAAC;AAEnE,eAAO,MAAM,QAAQ,QAAO,QAI3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,MAyCzB,CAAC"}
|