@bagelink/vue 0.0.1082 → 0.0.1090
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/form/inputs/CodeEditor/Index.vue.d.ts +3 -1
- package/dist/components/form/inputs/CodeEditor/Index.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RichText/components/EditorToolbar.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/ToggleInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/index.d.ts.map +1 -1
- package/dist/index.cjs +80 -64
- package/dist/index.mjs +80 -64
- package/dist/style.css +287 -282
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/form/BglForm.vue +11 -11
- package/src/components/form/inputs/CodeEditor/Index.vue +28 -22
- package/src/components/form/inputs/DatePick.vue +459 -0
- package/src/components/form/inputs/RangeInput.vue +1 -1
- package/src/components/form/inputs/RichText/components/EditorToolbar.vue +1 -0
- package/src/components/form/inputs/ToggleInput.vue +2 -0
- package/src/components/form/inputs/index.ts +1 -0
- package/src/styles/layout.css +1 -1
- package/src/styles/theme.css +261 -259
- package/src/utils/index.ts +5 -0
|
@@ -10,6 +10,8 @@ type __VLS_Props = {
|
|
|
10
10
|
modelValue?: string;
|
|
11
11
|
autodetect?: boolean;
|
|
12
12
|
ignoreIllegals?: boolean;
|
|
13
|
+
label?: string;
|
|
14
|
+
height?: string;
|
|
13
15
|
};
|
|
14
16
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
15
17
|
"update:modelValue": (...args: any[]) => void;
|
|
@@ -17,6 +19,6 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
17
19
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
18
20
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
19
21
|
textarea: HTMLTextAreaElement;
|
|
20
|
-
},
|
|
22
|
+
}, HTMLDivElement>;
|
|
21
23
|
export default _default;
|
|
22
24
|
//# sourceMappingURL=Index.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/CodeEditor/Index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/CodeEditor/Index.vue"],"names":[],"mappings":"AA0KA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEtD,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,IAAI,EAAE,SAAS,CAAA;KACf;CACD;AAKD,KAAK,WAAW,GAAG;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;;;;;;;;AAwLF,wBASG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorToolbar.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/inputs/RichText/components/EditorToolbar.vue"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"EditorToolbar.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/inputs/RichText/components/EditorToolbar.vue"],"names":[],"mappings":"AAAA,OAsDO,KAAK,EAAE,aAAa,EAAsC,MAAM,kBAAkB,CAAA;AAKzF,KAAK,WAAW,GAAG;IAClB,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAC3B,CAAC;;;;;;AAmJF,wBAQG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/ToggleInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ToggleInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/ToggleInput.vue"],"names":[],"mappings":"AAiIA,KAAK,WAAW,GAAG;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;AAgBF,KAAK,iBAAiB,GAAG;IACzB,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAClC,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAgDT,OAAO,IAA6B;;uBAVvB,GAAG;;;;EAe7B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;kBA1FL,OAAO;wFAmGrB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEtD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAA"}
|
package/dist/index.cjs
CHANGED
|
@@ -727,7 +727,7 @@ const _hoisted_3$q = {
|
|
|
727
727
|
class: "dots flex-center gap-05 mt-1"
|
|
728
728
|
};
|
|
729
729
|
const _hoisted_4$i = ["onClick"];
|
|
730
|
-
const _hoisted_5$
|
|
730
|
+
const _hoisted_5$h = { class: "Handlers" };
|
|
731
731
|
const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
|
|
732
732
|
__name: "Carousel",
|
|
733
733
|
props: {
|
|
@@ -916,7 +916,7 @@ const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
|
|
|
916
916
|
}, null, 10, _hoisted_4$i);
|
|
917
917
|
}), 128))
|
|
918
918
|
])) : vue.createCommentVNode("", true),
|
|
919
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
919
|
+
vue.createElementVNode("div", _hoisted_5$h, [
|
|
920
920
|
vue.createElementVNode("span", { onClick: prev }, [
|
|
921
921
|
vue.renderSlot(_ctx.$slots, "prev", {
|
|
922
922
|
index: vue.unref(activeSlideIndex),
|
|
@@ -6770,8 +6770,8 @@ const _hoisted_1$1$1 = {
|
|
|
6770
6770
|
const _hoisted_2$1$1 = ["width", "height", "viewBox"];
|
|
6771
6771
|
const _hoisted_3$p = { class: "layer-rectangles" };
|
|
6772
6772
|
const _hoisted_4$h = ["transform", "onMouseover"];
|
|
6773
|
-
const _hoisted_5$
|
|
6774
|
-
const _hoisted_6$
|
|
6773
|
+
const _hoisted_5$g = ["width", "height"];
|
|
6774
|
+
const _hoisted_6$d = {
|
|
6775
6775
|
x: 0 + 10,
|
|
6776
6776
|
y: 0 + 20,
|
|
6777
6777
|
"font-size": `15px`,
|
|
@@ -6807,14 +6807,14 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6807
6807
|
y: 0,
|
|
6808
6808
|
width: r2.width,
|
|
6809
6809
|
height: r2.height
|
|
6810
|
-
}), null, 16, _hoisted_5$
|
|
6810
|
+
}), null, 16, _hoisted_5$g),
|
|
6811
6811
|
vue.renderSlot(_ctx.$slots, "text", {
|
|
6812
6812
|
r: r2,
|
|
6813
6813
|
selected: _ctx.selected === i2
|
|
6814
6814
|
}, () => [
|
|
6815
6815
|
vue.createElementVNode(
|
|
6816
6816
|
"text",
|
|
6817
|
-
_hoisted_6$
|
|
6817
|
+
_hoisted_6$d,
|
|
6818
6818
|
vue.toDisplayString(r2.data.name),
|
|
6819
6819
|
1
|
|
6820
6820
|
/* TEXT */
|
|
@@ -7046,8 +7046,8 @@ const _hoisted_2$x = {
|
|
|
7046
7046
|
};
|
|
7047
7047
|
const _hoisted_3$o = { class: "key" };
|
|
7048
7048
|
const _hoisted_4$g = { class: "m-0" };
|
|
7049
|
-
const _hoisted_5$
|
|
7050
|
-
const _hoisted_6$
|
|
7049
|
+
const _hoisted_5$f = { key: 1 };
|
|
7050
|
+
const _hoisted_6$c = {
|
|
7051
7051
|
key: 0,
|
|
7052
7052
|
class: "data-row"
|
|
7053
7053
|
};
|
|
@@ -7116,10 +7116,10 @@ const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
|
|
|
7116
7116
|
])) : vue.createCommentVNode("", true)
|
|
7117
7117
|
], 64);
|
|
7118
7118
|
}), 128)),
|
|
7119
|
-
!((_a2 = _ctx.schema) == null ? void 0 : _a2.length) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$
|
|
7119
|
+
!((_a2 = _ctx.schema) == null ? void 0 : _a2.length) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$f, [
|
|
7120
7120
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(computedSchema.value, ({ id, label }) => {
|
|
7121
7121
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: id }, [
|
|
7122
|
-
!isUnset(itemData.value[id]) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$
|
|
7122
|
+
!isUnset(itemData.value[id]) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$c, [
|
|
7123
7123
|
vue.createElementVNode("div", _hoisted_7$8, [
|
|
7124
7124
|
vue.createElementVNode("p", _hoisted_8$5, vue.toDisplayString(label), 1)
|
|
7125
7125
|
]),
|
|
@@ -10091,22 +10091,23 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
|
|
|
10091
10091
|
const emit2 = __emit;
|
|
10092
10092
|
const slots = vue.useSlots();
|
|
10093
10093
|
const { showModal } = useModal();
|
|
10094
|
-
const instAt = /* @__PURE__ */ new Date();
|
|
10095
|
-
const timeSinceInst = () => Date.now() - instAt.getTime();
|
|
10096
10094
|
const existingFormState = vue.inject(FORM_STATE_KEY);
|
|
10097
10095
|
const isNested = Boolean(existingFormState && props2.fieldID);
|
|
10098
10096
|
const { data: data2, isDirty } = isNested ? existingFormState : provideBagelFormState(props2.modelValue);
|
|
10097
|
+
let emitDirty = vue.ref(false);
|
|
10099
10098
|
if (!isNested) {
|
|
10100
10099
|
vue.watch(() => props2.modelValue, (newVal) => {
|
|
10101
|
-
if (
|
|
10102
|
-
|
|
10100
|
+
if (emitDirty.value) {
|
|
10101
|
+
emitDirty.value = false;
|
|
10102
|
+
return;
|
|
10103
10103
|
}
|
|
10104
|
+
data2.value = newVal;
|
|
10104
10105
|
}, { deep: true, immediate: true });
|
|
10105
|
-
vue.watch(data2, (newVal) => {
|
|
10106
|
-
if (
|
|
10107
|
-
|
|
10108
|
-
|
|
10109
|
-
|
|
10106
|
+
vue.watch(() => data2, (newVal) => {
|
|
10107
|
+
if (emitDirty.value) return;
|
|
10108
|
+
emitDirty.value = true;
|
|
10109
|
+
emit2("dirty");
|
|
10110
|
+
emit2("update:modelValue", newVal);
|
|
10110
10111
|
}, { deep: true });
|
|
10111
10112
|
}
|
|
10112
10113
|
const form = vue.ref();
|
|
@@ -10509,13 +10510,18 @@ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
|
|
|
10509
10510
|
}
|
|
10510
10511
|
});
|
|
10511
10512
|
const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-03ed2982"]]);
|
|
10512
|
-
const _hoisted_1$E = {
|
|
10513
|
+
const _hoisted_1$E = { class: "mb-05" };
|
|
10514
|
+
const _hoisted_2$t = {
|
|
10513
10515
|
key: 0,
|
|
10514
|
-
class: "
|
|
10516
|
+
class: "label txt-start"
|
|
10517
|
+
};
|
|
10518
|
+
const _hoisted_3$m = {
|
|
10519
|
+
key: 1,
|
|
10520
|
+
class: "code-editor-wrap grid rounded p-1 overflow hm-300px ltr txt-start relative h-100p"
|
|
10515
10521
|
};
|
|
10516
|
-
const
|
|
10517
|
-
const
|
|
10518
|
-
const
|
|
10522
|
+
const _hoisted_4$f = { class: "overflow-hidden absolute inset-0 p-0 m-0 h-100 codeText" };
|
|
10523
|
+
const _hoisted_5$e = ["innerHTML"];
|
|
10524
|
+
const _hoisted_6$b = ["onKeydown"];
|
|
10519
10525
|
const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
10520
10526
|
__name: "Index",
|
|
10521
10527
|
props: {
|
|
@@ -10523,15 +10529,17 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
|
10523
10529
|
readonly: { type: Boolean, default: false },
|
|
10524
10530
|
modelValue: { default: "" },
|
|
10525
10531
|
autodetect: { type: Boolean },
|
|
10526
|
-
ignoreIllegals: { type: Boolean, default: true }
|
|
10532
|
+
ignoreIllegals: { type: Boolean, default: true },
|
|
10533
|
+
label: {},
|
|
10534
|
+
height: { default: "300px" }
|
|
10527
10535
|
},
|
|
10528
10536
|
emits: ["update:modelValue"],
|
|
10529
10537
|
setup(__props, { emit: __emit }) {
|
|
10530
10538
|
const emit2 = __emit;
|
|
10531
10539
|
let hljs = vue.ref(null);
|
|
10540
|
+
let elHeight = vue.ref(__props.height);
|
|
10532
10541
|
let code = vue.ref("");
|
|
10533
10542
|
const textarea = vue.ref();
|
|
10534
|
-
let height = vue.ref("300px");
|
|
10535
10543
|
let loaded = vue.ref(false);
|
|
10536
10544
|
const cannotDetectLanguage = vue.computed(() => {
|
|
10537
10545
|
var _a2;
|
|
@@ -10575,8 +10583,8 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
|
10575
10583
|
}
|
|
10576
10584
|
function adjustHeight() {
|
|
10577
10585
|
var _a2;
|
|
10578
|
-
if (((_a2 = textarea.value) == null ? void 0 : _a2.scrollHeight) && textarea.value.scrollHeight >
|
|
10579
|
-
|
|
10586
|
+
if (((_a2 = textarea.value) == null ? void 0 : _a2.scrollHeight) && textarea.value.scrollHeight > Number.parseInt(elHeight.value)) {
|
|
10587
|
+
elHeight.value = `${textarea.value.scrollHeight}px`;
|
|
10580
10588
|
}
|
|
10581
10589
|
}
|
|
10582
10590
|
vue.onMounted(async () => {
|
|
@@ -10596,40 +10604,43 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
|
10596
10604
|
}
|
|
10597
10605
|
}, { immediate: true });
|
|
10598
10606
|
return (_ctx, _cache) => {
|
|
10599
|
-
return vue.
|
|
10600
|
-
vue.
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
|
|
10604
|
-
|
|
10605
|
-
|
|
10606
|
-
vue.createElementVNode("
|
|
10607
|
-
|
|
10608
|
-
|
|
10609
|
-
|
|
10610
|
-
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
|
|
10618
|
-
|
|
10619
|
-
|
|
10620
|
-
|
|
10621
|
-
|
|
10622
|
-
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
|
|
10626
|
-
|
|
10627
|
-
|
|
10628
|
-
|
|
10607
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$E, [
|
|
10608
|
+
_ctx.label ? (vue.openBlock(), vue.createElementBlock("label", _hoisted_2$t, vue.toDisplayString(_ctx.label), 1)) : vue.createCommentVNode("", true),
|
|
10609
|
+
vue.unref(loaded) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$m, [
|
|
10610
|
+
vue.createElementVNode("div", {
|
|
10611
|
+
class: "relative block h-100",
|
|
10612
|
+
style: vue.normalizeStyle({ height: `calc(${vue.unref(elHeight)} - 2rem)` })
|
|
10613
|
+
}, [
|
|
10614
|
+
vue.createElementVNode("pre", _hoisted_4$f, [
|
|
10615
|
+
_cache[2] || (_cache[2] = vue.createTextVNode(" ")),
|
|
10616
|
+
vue.createElementVNode("code", {
|
|
10617
|
+
class: vue.normalizeClass(["absolute inset-0", className.value]),
|
|
10618
|
+
innerHTML: highlightedCode.value
|
|
10619
|
+
}, null, 10, _hoisted_5$e),
|
|
10620
|
+
_cache[3] || (_cache[3] = vue.createTextVNode("\n "))
|
|
10621
|
+
]),
|
|
10622
|
+
!_ctx.readonly ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("textarea", {
|
|
10623
|
+
key: 0,
|
|
10624
|
+
ref_key: "textarea",
|
|
10625
|
+
ref: textarea,
|
|
10626
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(code) ? code.value = $event : code = $event),
|
|
10627
|
+
class: "code-editor absolute inset-0 bg-transparent overflow-hidden h-100 p-0 m-0 codeText border-none txt-start",
|
|
10628
|
+
spellcheck: "false",
|
|
10629
|
+
placeholder: "Write your code here",
|
|
10630
|
+
"aria-label": "Code Editor",
|
|
10631
|
+
"data-gramm": "false",
|
|
10632
|
+
onKeydown: vue.withKeys(vue.withModifiers(handleTab, ["prevent"]), ["tab"]),
|
|
10633
|
+
onInput: _cache[1] || (_cache[1] = ($event) => emit2("update:modelValue", vue.unref(code)))
|
|
10634
|
+
}, null, 40, _hoisted_6$b)), [
|
|
10635
|
+
[vue.vModelText, vue.unref(code)]
|
|
10636
|
+
]) : vue.createCommentVNode("", true)
|
|
10637
|
+
], 4)
|
|
10638
|
+
])) : vue.createCommentVNode("", true)
|
|
10639
|
+
]);
|
|
10629
10640
|
};
|
|
10630
10641
|
}
|
|
10631
10642
|
});
|
|
10632
|
-
const CodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-
|
|
10643
|
+
const CodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-1fbc9b61"]]);
|
|
10633
10644
|
const _hoisted_1$D = ["title"];
|
|
10634
10645
|
const _hoisted_2$s = ["id", "placeholder", "required"];
|
|
10635
10646
|
const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -20621,7 +20632,7 @@ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
|
|
|
20621
20632
|
};
|
|
20622
20633
|
}
|
|
20623
20634
|
});
|
|
20624
|
-
const RangeInput = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-
|
|
20635
|
+
const RangeInput = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-e606435a"]]);
|
|
20625
20636
|
const tableTools = [
|
|
20626
20637
|
"mergeCells",
|
|
20627
20638
|
"splitCells",
|
|
@@ -20816,7 +20827,7 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
|
20816
20827
|
thin: "",
|
|
20817
20828
|
flat: "",
|
|
20818
20829
|
"aria-label": action.name,
|
|
20819
|
-
class: vue.normalizeClass([action.class, { active: _ctx.selectedStyles.has(action.name) }]),
|
|
20830
|
+
class: vue.normalizeClass([[action.class, { active: _ctx.selectedStyles.has(action.name) }], ""]),
|
|
20820
20831
|
onClick: ($event) => runAction(action.name)
|
|
20821
20832
|
}, null, 8, ["icon", "aria-label", "class", "onClick"])), [
|
|
20822
20833
|
[_directive_tooltip, action.label]
|
|
@@ -20830,7 +20841,7 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
|
20830
20841
|
};
|
|
20831
20842
|
}
|
|
20832
20843
|
});
|
|
20833
|
-
const EditorToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-
|
|
20844
|
+
const EditorToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-33dff8fa"]]);
|
|
20834
20845
|
function createCommandExecutor(state2, commands) {
|
|
20835
20846
|
return {
|
|
20836
20847
|
execute(command, value) {
|
|
@@ -30618,7 +30629,7 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
|
30618
30629
|
};
|
|
30619
30630
|
}
|
|
30620
30631
|
});
|
|
30621
|
-
const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-
|
|
30632
|
+
const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-ebe691ee"]]);
|
|
30622
30633
|
const files = {
|
|
30623
30634
|
setBaseUrl: (baseUrl) => {
|
|
30624
30635
|
if (!baseUrl) return;
|
|
@@ -34548,7 +34559,12 @@ function getFallbackSchema(data2, showFields) {
|
|
|
34548
34559
|
const keys4 = Array.from(new Set((data2 ?? []).flatMap(Object.keys)));
|
|
34549
34560
|
const schema = keys4.map((id) => ({
|
|
34550
34561
|
id,
|
|
34551
|
-
label: keyToLabel(id)
|
|
34562
|
+
label: keyToLabel(id),
|
|
34563
|
+
transform: (val) => {
|
|
34564
|
+
const dateFields = ["created_at", "updated_at"];
|
|
34565
|
+
if (dateFields.includes(id)) return val ? new Date(val).toLocaleString() : val;
|
|
34566
|
+
return val;
|
|
34567
|
+
}
|
|
34552
34568
|
}));
|
|
34553
34569
|
return showFields ? schema.filter((f2) => showFields.includes(f2.id) || !f2.id) : schema;
|
|
34554
34570
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -725,7 +725,7 @@ const _hoisted_3$q = {
|
|
|
725
725
|
class: "dots flex-center gap-05 mt-1"
|
|
726
726
|
};
|
|
727
727
|
const _hoisted_4$i = ["onClick"];
|
|
728
|
-
const _hoisted_5$
|
|
728
|
+
const _hoisted_5$h = { class: "Handlers" };
|
|
729
729
|
const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
730
730
|
__name: "Carousel",
|
|
731
731
|
props: {
|
|
@@ -914,7 +914,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
914
914
|
}, null, 10, _hoisted_4$i);
|
|
915
915
|
}), 128))
|
|
916
916
|
])) : createCommentVNode("", true),
|
|
917
|
-
createElementVNode("div", _hoisted_5$
|
|
917
|
+
createElementVNode("div", _hoisted_5$h, [
|
|
918
918
|
createElementVNode("span", { onClick: prev }, [
|
|
919
919
|
renderSlot(_ctx.$slots, "prev", {
|
|
920
920
|
index: unref(activeSlideIndex),
|
|
@@ -6768,8 +6768,8 @@ const _hoisted_1$1$1 = {
|
|
|
6768
6768
|
const _hoisted_2$1$1 = ["width", "height", "viewBox"];
|
|
6769
6769
|
const _hoisted_3$p = { class: "layer-rectangles" };
|
|
6770
6770
|
const _hoisted_4$h = ["transform", "onMouseover"];
|
|
6771
|
-
const _hoisted_5$
|
|
6772
|
-
const _hoisted_6$
|
|
6771
|
+
const _hoisted_5$g = ["width", "height"];
|
|
6772
|
+
const _hoisted_6$d = {
|
|
6773
6773
|
x: 0 + 10,
|
|
6774
6774
|
y: 0 + 20,
|
|
6775
6775
|
"font-size": `15px`,
|
|
@@ -6805,14 +6805,14 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6805
6805
|
y: 0,
|
|
6806
6806
|
width: r2.width,
|
|
6807
6807
|
height: r2.height
|
|
6808
|
-
}), null, 16, _hoisted_5$
|
|
6808
|
+
}), null, 16, _hoisted_5$g),
|
|
6809
6809
|
renderSlot(_ctx.$slots, "text", {
|
|
6810
6810
|
r: r2,
|
|
6811
6811
|
selected: _ctx.selected === i2
|
|
6812
6812
|
}, () => [
|
|
6813
6813
|
createElementVNode(
|
|
6814
6814
|
"text",
|
|
6815
|
-
_hoisted_6$
|
|
6815
|
+
_hoisted_6$d,
|
|
6816
6816
|
toDisplayString(r2.data.name),
|
|
6817
6817
|
1
|
|
6818
6818
|
/* TEXT */
|
|
@@ -7044,8 +7044,8 @@ const _hoisted_2$x = {
|
|
|
7044
7044
|
};
|
|
7045
7045
|
const _hoisted_3$o = { class: "key" };
|
|
7046
7046
|
const _hoisted_4$g = { class: "m-0" };
|
|
7047
|
-
const _hoisted_5$
|
|
7048
|
-
const _hoisted_6$
|
|
7047
|
+
const _hoisted_5$f = { key: 1 };
|
|
7048
|
+
const _hoisted_6$c = {
|
|
7049
7049
|
key: 0,
|
|
7050
7050
|
class: "data-row"
|
|
7051
7051
|
};
|
|
@@ -7114,10 +7114,10 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
|
7114
7114
|
])) : createCommentVNode("", true)
|
|
7115
7115
|
], 64);
|
|
7116
7116
|
}), 128)),
|
|
7117
|
-
!((_a2 = _ctx.schema) == null ? void 0 : _a2.length) ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
7117
|
+
!((_a2 = _ctx.schema) == null ? void 0 : _a2.length) ? (openBlock(), createElementBlock("div", _hoisted_5$f, [
|
|
7118
7118
|
(openBlock(true), createElementBlock(Fragment, null, renderList(computedSchema.value, ({ id, label }) => {
|
|
7119
7119
|
return openBlock(), createElementBlock(Fragment, { key: id }, [
|
|
7120
|
-
!isUnset(itemData.value[id]) ? (openBlock(), createElementBlock("div", _hoisted_6$
|
|
7120
|
+
!isUnset(itemData.value[id]) ? (openBlock(), createElementBlock("div", _hoisted_6$c, [
|
|
7121
7121
|
createElementVNode("div", _hoisted_7$8, [
|
|
7122
7122
|
createElementVNode("p", _hoisted_8$5, toDisplayString(label), 1)
|
|
7123
7123
|
]),
|
|
@@ -10089,22 +10089,23 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
10089
10089
|
const emit2 = __emit;
|
|
10090
10090
|
const slots = useSlots();
|
|
10091
10091
|
const { showModal } = useModal();
|
|
10092
|
-
const instAt = /* @__PURE__ */ new Date();
|
|
10093
|
-
const timeSinceInst = () => Date.now() - instAt.getTime();
|
|
10094
10092
|
const existingFormState = inject(FORM_STATE_KEY);
|
|
10095
10093
|
const isNested = Boolean(existingFormState && props2.fieldID);
|
|
10096
10094
|
const { data: data2, isDirty } = isNested ? existingFormState : provideBagelFormState(props2.modelValue);
|
|
10095
|
+
let emitDirty = ref(false);
|
|
10097
10096
|
if (!isNested) {
|
|
10098
10097
|
watch(() => props2.modelValue, (newVal) => {
|
|
10099
|
-
if (
|
|
10100
|
-
|
|
10098
|
+
if (emitDirty.value) {
|
|
10099
|
+
emitDirty.value = false;
|
|
10100
|
+
return;
|
|
10101
10101
|
}
|
|
10102
|
+
data2.value = newVal;
|
|
10102
10103
|
}, { deep: true, immediate: true });
|
|
10103
|
-
watch(data2, (newVal) => {
|
|
10104
|
-
if (
|
|
10105
|
-
|
|
10106
|
-
|
|
10107
|
-
|
|
10104
|
+
watch(() => data2, (newVal) => {
|
|
10105
|
+
if (emitDirty.value) return;
|
|
10106
|
+
emitDirty.value = true;
|
|
10107
|
+
emit2("dirty");
|
|
10108
|
+
emit2("update:modelValue", newVal);
|
|
10108
10109
|
}, { deep: true });
|
|
10109
10110
|
}
|
|
10110
10111
|
const form = ref();
|
|
@@ -10507,13 +10508,18 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
10507
10508
|
}
|
|
10508
10509
|
});
|
|
10509
10510
|
const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-03ed2982"]]);
|
|
10510
|
-
const _hoisted_1$E = {
|
|
10511
|
+
const _hoisted_1$E = { class: "mb-05" };
|
|
10512
|
+
const _hoisted_2$t = {
|
|
10511
10513
|
key: 0,
|
|
10512
|
-
class: "
|
|
10514
|
+
class: "label txt-start"
|
|
10515
|
+
};
|
|
10516
|
+
const _hoisted_3$m = {
|
|
10517
|
+
key: 1,
|
|
10518
|
+
class: "code-editor-wrap grid rounded p-1 overflow hm-300px ltr txt-start relative h-100p"
|
|
10513
10519
|
};
|
|
10514
|
-
const
|
|
10515
|
-
const
|
|
10516
|
-
const
|
|
10520
|
+
const _hoisted_4$f = { class: "overflow-hidden absolute inset-0 p-0 m-0 h-100 codeText" };
|
|
10521
|
+
const _hoisted_5$e = ["innerHTML"];
|
|
10522
|
+
const _hoisted_6$b = ["onKeydown"];
|
|
10517
10523
|
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
10518
10524
|
__name: "Index",
|
|
10519
10525
|
props: {
|
|
@@ -10521,15 +10527,17 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
10521
10527
|
readonly: { type: Boolean, default: false },
|
|
10522
10528
|
modelValue: { default: "" },
|
|
10523
10529
|
autodetect: { type: Boolean },
|
|
10524
|
-
ignoreIllegals: { type: Boolean, default: true }
|
|
10530
|
+
ignoreIllegals: { type: Boolean, default: true },
|
|
10531
|
+
label: {},
|
|
10532
|
+
height: { default: "300px" }
|
|
10525
10533
|
},
|
|
10526
10534
|
emits: ["update:modelValue"],
|
|
10527
10535
|
setup(__props, { emit: __emit }) {
|
|
10528
10536
|
const emit2 = __emit;
|
|
10529
10537
|
let hljs = ref(null);
|
|
10538
|
+
let elHeight = ref(__props.height);
|
|
10530
10539
|
let code = ref("");
|
|
10531
10540
|
const textarea = ref();
|
|
10532
|
-
let height = ref("300px");
|
|
10533
10541
|
let loaded = ref(false);
|
|
10534
10542
|
const cannotDetectLanguage = computed(() => {
|
|
10535
10543
|
var _a2;
|
|
@@ -10573,8 +10581,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
10573
10581
|
}
|
|
10574
10582
|
function adjustHeight() {
|
|
10575
10583
|
var _a2;
|
|
10576
|
-
if (((_a2 = textarea.value) == null ? void 0 : _a2.scrollHeight) && textarea.value.scrollHeight >
|
|
10577
|
-
|
|
10584
|
+
if (((_a2 = textarea.value) == null ? void 0 : _a2.scrollHeight) && textarea.value.scrollHeight > Number.parseInt(elHeight.value)) {
|
|
10585
|
+
elHeight.value = `${textarea.value.scrollHeight}px`;
|
|
10578
10586
|
}
|
|
10579
10587
|
}
|
|
10580
10588
|
onMounted(async () => {
|
|
@@ -10594,40 +10602,43 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
10594
10602
|
}
|
|
10595
10603
|
}, { immediate: true });
|
|
10596
10604
|
return (_ctx, _cache) => {
|
|
10597
|
-
return
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
|
|
10604
|
-
createElementVNode("
|
|
10605
|
-
|
|
10606
|
-
|
|
10607
|
-
|
|
10608
|
-
|
|
10609
|
-
|
|
10610
|
-
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
|
|
10618
|
-
|
|
10619
|
-
|
|
10620
|
-
|
|
10621
|
-
|
|
10622
|
-
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
|
|
10626
|
-
|
|
10605
|
+
return openBlock(), createElementBlock("div", _hoisted_1$E, [
|
|
10606
|
+
_ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2$t, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
|
|
10607
|
+
unref(loaded) ? (openBlock(), createElementBlock("div", _hoisted_3$m, [
|
|
10608
|
+
createElementVNode("div", {
|
|
10609
|
+
class: "relative block h-100",
|
|
10610
|
+
style: normalizeStyle({ height: `calc(${unref(elHeight)} - 2rem)` })
|
|
10611
|
+
}, [
|
|
10612
|
+
createElementVNode("pre", _hoisted_4$f, [
|
|
10613
|
+
_cache[2] || (_cache[2] = createTextVNode(" ")),
|
|
10614
|
+
createElementVNode("code", {
|
|
10615
|
+
class: normalizeClass(["absolute inset-0", className.value]),
|
|
10616
|
+
innerHTML: highlightedCode.value
|
|
10617
|
+
}, null, 10, _hoisted_5$e),
|
|
10618
|
+
_cache[3] || (_cache[3] = createTextVNode("\n "))
|
|
10619
|
+
]),
|
|
10620
|
+
!_ctx.readonly ? withDirectives((openBlock(), createElementBlock("textarea", {
|
|
10621
|
+
key: 0,
|
|
10622
|
+
ref_key: "textarea",
|
|
10623
|
+
ref: textarea,
|
|
10624
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(code) ? code.value = $event : code = $event),
|
|
10625
|
+
class: "code-editor absolute inset-0 bg-transparent overflow-hidden h-100 p-0 m-0 codeText border-none txt-start",
|
|
10626
|
+
spellcheck: "false",
|
|
10627
|
+
placeholder: "Write your code here",
|
|
10628
|
+
"aria-label": "Code Editor",
|
|
10629
|
+
"data-gramm": "false",
|
|
10630
|
+
onKeydown: withKeys(withModifiers(handleTab, ["prevent"]), ["tab"]),
|
|
10631
|
+
onInput: _cache[1] || (_cache[1] = ($event) => emit2("update:modelValue", unref(code)))
|
|
10632
|
+
}, null, 40, _hoisted_6$b)), [
|
|
10633
|
+
[vModelText, unref(code)]
|
|
10634
|
+
]) : createCommentVNode("", true)
|
|
10635
|
+
], 4)
|
|
10636
|
+
])) : createCommentVNode("", true)
|
|
10637
|
+
]);
|
|
10627
10638
|
};
|
|
10628
10639
|
}
|
|
10629
10640
|
});
|
|
10630
|
-
const CodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-
|
|
10641
|
+
const CodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-1fbc9b61"]]);
|
|
10631
10642
|
const _hoisted_1$D = ["title"];
|
|
10632
10643
|
const _hoisted_2$s = ["id", "placeholder", "required"];
|
|
10633
10644
|
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
@@ -20619,7 +20630,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
20619
20630
|
};
|
|
20620
20631
|
}
|
|
20621
20632
|
});
|
|
20622
|
-
const RangeInput = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-
|
|
20633
|
+
const RangeInput = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-e606435a"]]);
|
|
20623
20634
|
const tableTools = [
|
|
20624
20635
|
"mergeCells",
|
|
20625
20636
|
"splitCells",
|
|
@@ -20814,7 +20825,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
20814
20825
|
thin: "",
|
|
20815
20826
|
flat: "",
|
|
20816
20827
|
"aria-label": action.name,
|
|
20817
|
-
class: normalizeClass([action.class, { active: _ctx.selectedStyles.has(action.name) }]),
|
|
20828
|
+
class: normalizeClass([[action.class, { active: _ctx.selectedStyles.has(action.name) }], ""]),
|
|
20818
20829
|
onClick: ($event) => runAction(action.name)
|
|
20819
20830
|
}, null, 8, ["icon", "aria-label", "class", "onClick"])), [
|
|
20820
20831
|
[_directive_tooltip, action.label]
|
|
@@ -20828,7 +20839,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
20828
20839
|
};
|
|
20829
20840
|
}
|
|
20830
20841
|
});
|
|
20831
|
-
const EditorToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-
|
|
20842
|
+
const EditorToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-33dff8fa"]]);
|
|
20832
20843
|
function createCommandExecutor(state2, commands) {
|
|
20833
20844
|
return {
|
|
20834
20845
|
execute(command, value) {
|
|
@@ -30616,7 +30627,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
30616
30627
|
};
|
|
30617
30628
|
}
|
|
30618
30629
|
});
|
|
30619
|
-
const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-
|
|
30630
|
+
const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-ebe691ee"]]);
|
|
30620
30631
|
const files = {
|
|
30621
30632
|
setBaseUrl: (baseUrl) => {
|
|
30622
30633
|
if (!baseUrl) return;
|
|
@@ -34546,7 +34557,12 @@ function getFallbackSchema(data2, showFields) {
|
|
|
34546
34557
|
const keys4 = Array.from(new Set((data2 ?? []).flatMap(Object.keys)));
|
|
34547
34558
|
const schema = keys4.map((id) => ({
|
|
34548
34559
|
id,
|
|
34549
|
-
label: keyToLabel(id)
|
|
34560
|
+
label: keyToLabel(id),
|
|
34561
|
+
transform: (val) => {
|
|
34562
|
+
const dateFields = ["created_at", "updated_at"];
|
|
34563
|
+
if (dateFields.includes(id)) return val ? new Date(val).toLocaleString() : val;
|
|
34564
|
+
return val;
|
|
34565
|
+
}
|
|
34550
34566
|
}));
|
|
34551
34567
|
return showFields ? schema.filter((f2) => showFields.includes(f2.id) || !f2.id) : schema;
|
|
34552
34568
|
}
|