@bagelink/vue 0.0.1084 → 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.
@@ -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
- }, any>;
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":"AAoKA,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;CACxB,CAAC;;;;;;;;AA8KF,wBAQG"}
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,OAqDO,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;;;;;;AAiJF,wBAQG"}
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":"AA+HA,KAAK,WAAW,GAAG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AA;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$g = { class: "Handlers" };
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$g, [
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$f = ["width", "height"];
6774
- const _hoisted_6$c = {
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$f),
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$c,
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$e = { key: 1 };
7050
- const _hoisted_6$b = {
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$e, [
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$b, [
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
  ]),
@@ -10510,13 +10510,18 @@ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
10510
10510
  }
10511
10511
  });
10512
10512
  const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-03ed2982"]]);
10513
- const _hoisted_1$E = {
10513
+ const _hoisted_1$E = { class: "mb-05" };
10514
+ const _hoisted_2$t = {
10514
10515
  key: 0,
10515
- class: "code-editor-wrap grid rounded p-1 overflow hm-300px"
10516
+ class: "label txt-start"
10516
10517
  };
10517
- const _hoisted_2$t = { class: "overflow-hidden absolute inset-0 p-0 m-0 h-100 codeText" };
10518
- const _hoisted_3$m = ["innerHTML"];
10519
- const _hoisted_4$f = ["onKeydown"];
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"
10521
+ };
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"];
10520
10525
  const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
10521
10526
  __name: "Index",
10522
10527
  props: {
@@ -10524,15 +10529,17 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
10524
10529
  readonly: { type: Boolean, default: false },
10525
10530
  modelValue: { default: "" },
10526
10531
  autodetect: { type: Boolean },
10527
- ignoreIllegals: { type: Boolean, default: true }
10532
+ ignoreIllegals: { type: Boolean, default: true },
10533
+ label: {},
10534
+ height: { default: "300px" }
10528
10535
  },
10529
10536
  emits: ["update:modelValue"],
10530
10537
  setup(__props, { emit: __emit }) {
10531
10538
  const emit2 = __emit;
10532
10539
  let hljs = vue.ref(null);
10540
+ let elHeight = vue.ref(__props.height);
10533
10541
  let code = vue.ref("");
10534
10542
  const textarea = vue.ref();
10535
- let height = vue.ref("300px");
10536
10543
  let loaded = vue.ref(false);
10537
10544
  const cannotDetectLanguage = vue.computed(() => {
10538
10545
  var _a2;
@@ -10576,8 +10583,8 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
10576
10583
  }
10577
10584
  function adjustHeight() {
10578
10585
  var _a2;
10579
- if (((_a2 = textarea.value) == null ? void 0 : _a2.scrollHeight) && textarea.value.scrollHeight > 300) {
10580
- height.value = `${textarea.value.scrollHeight}px`;
10586
+ if (((_a2 = textarea.value) == null ? void 0 : _a2.scrollHeight) && textarea.value.scrollHeight > Number.parseInt(elHeight.value)) {
10587
+ elHeight.value = `${textarea.value.scrollHeight}px`;
10581
10588
  }
10582
10589
  }
10583
10590
  vue.onMounted(async () => {
@@ -10597,40 +10604,43 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
10597
10604
  }
10598
10605
  }, { immediate: true });
10599
10606
  return (_ctx, _cache) => {
10600
- return vue.unref(loaded) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$E, [
10601
- vue.createElementVNode("div", {
10602
- class: "relative block h-100",
10603
- style: vue.normalizeStyle({ height: vue.unref(height) })
10604
- }, [
10605
- vue.createElementVNode("pre", _hoisted_2$t, [
10606
- _cache[2] || (_cache[2] = vue.createTextVNode(" ")),
10607
- vue.createElementVNode("code", {
10608
- class: vue.normalizeClass(className.value),
10609
- innerHTML: highlightedCode.value
10610
- }, null, 10, _hoisted_3$m),
10611
- _cache[3] || (_cache[3] = vue.createTextVNode("\n "))
10612
- ]),
10613
- !_ctx.readonly ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("textarea", {
10614
- key: 0,
10615
- ref_key: "textarea",
10616
- ref: textarea,
10617
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(code) ? code.value = $event : code = $event),
10618
- class: "code-editor absolute inset-0 bg-transparent overflow-hidden h-100 p-0 m-0 codeText border-none",
10619
- spellcheck: "false",
10620
- placeholder: "Write your code here",
10621
- "aria-label": "Code Editor",
10622
- "data-gramm": "false",
10623
- onKeydown: vue.withKeys(vue.withModifiers(handleTab, ["prevent"]), ["tab"]),
10624
- onInput: _cache[1] || (_cache[1] = ($event) => emit2("update:modelValue", vue.unref(code)))
10625
- }, null, 40, _hoisted_4$f)), [
10626
- [vue.vModelText, vue.unref(code)]
10627
- ]) : vue.createCommentVNode("", true)
10628
- ], 4)
10629
- ])) : vue.createCommentVNode("", true);
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
+ ]);
10630
10640
  };
10631
10641
  }
10632
10642
  });
10633
- const CodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-4f1dc18a"]]);
10643
+ const CodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-1fbc9b61"]]);
10634
10644
  const _hoisted_1$D = ["title"];
10635
10645
  const _hoisted_2$s = ["id", "placeholder", "required"];
10636
10646
  const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
@@ -20622,7 +20632,7 @@ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
20622
20632
  };
20623
20633
  }
20624
20634
  });
20625
- const RangeInput = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-fb99b679"]]);
20635
+ const RangeInput = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-e606435a"]]);
20626
20636
  const tableTools = [
20627
20637
  "mergeCells",
20628
20638
  "splitCells",
@@ -20817,7 +20827,7 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
20817
20827
  thin: "",
20818
20828
  flat: "",
20819
20829
  "aria-label": action.name,
20820
- class: vue.normalizeClass([action.class, { active: _ctx.selectedStyles.has(action.name) }]),
20830
+ class: vue.normalizeClass([[action.class, { active: _ctx.selectedStyles.has(action.name) }], ""]),
20821
20831
  onClick: ($event) => runAction(action.name)
20822
20832
  }, null, 8, ["icon", "aria-label", "class", "onClick"])), [
20823
20833
  [_directive_tooltip, action.label]
@@ -20831,7 +20841,7 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
20831
20841
  };
20832
20842
  }
20833
20843
  });
20834
- const EditorToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-f3e90c0a"]]);
20844
+ const EditorToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-33dff8fa"]]);
20835
20845
  function createCommandExecutor(state2, commands) {
20836
20846
  return {
20837
20847
  execute(command, value) {
@@ -30619,7 +30629,7 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
30619
30629
  };
30620
30630
  }
30621
30631
  });
30622
- const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-486451e5"]]);
30632
+ const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-ebe691ee"]]);
30623
30633
  const files = {
30624
30634
  setBaseUrl: (baseUrl) => {
30625
30635
  if (!baseUrl) return;
@@ -34549,7 +34559,12 @@ function getFallbackSchema(data2, showFields) {
34549
34559
  const keys4 = Array.from(new Set((data2 ?? []).flatMap(Object.keys)));
34550
34560
  const schema = keys4.map((id) => ({
34551
34561
  id,
34552
- 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
+ }
34553
34568
  }));
34554
34569
  return showFields ? schema.filter((f2) => showFields.includes(f2.id) || !f2.id) : schema;
34555
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$g = { class: "Handlers" };
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$g, [
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$f = ["width", "height"];
6772
- const _hoisted_6$c = {
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$f),
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$c,
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$e = { key: 1 };
7048
- const _hoisted_6$b = {
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$e, [
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$b, [
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
  ]),
@@ -10508,13 +10508,18 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
10508
10508
  }
10509
10509
  });
10510
10510
  const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-03ed2982"]]);
10511
- const _hoisted_1$E = {
10511
+ const _hoisted_1$E = { class: "mb-05" };
10512
+ const _hoisted_2$t = {
10512
10513
  key: 0,
10513
- class: "code-editor-wrap grid rounded p-1 overflow hm-300px"
10514
+ class: "label txt-start"
10514
10515
  };
10515
- const _hoisted_2$t = { class: "overflow-hidden absolute inset-0 p-0 m-0 h-100 codeText" };
10516
- const _hoisted_3$m = ["innerHTML"];
10517
- const _hoisted_4$f = ["onKeydown"];
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"
10519
+ };
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"];
10518
10523
  const _sfc_main$M = /* @__PURE__ */ defineComponent({
10519
10524
  __name: "Index",
10520
10525
  props: {
@@ -10522,15 +10527,17 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
10522
10527
  readonly: { type: Boolean, default: false },
10523
10528
  modelValue: { default: "" },
10524
10529
  autodetect: { type: Boolean },
10525
- ignoreIllegals: { type: Boolean, default: true }
10530
+ ignoreIllegals: { type: Boolean, default: true },
10531
+ label: {},
10532
+ height: { default: "300px" }
10526
10533
  },
10527
10534
  emits: ["update:modelValue"],
10528
10535
  setup(__props, { emit: __emit }) {
10529
10536
  const emit2 = __emit;
10530
10537
  let hljs = ref(null);
10538
+ let elHeight = ref(__props.height);
10531
10539
  let code = ref("");
10532
10540
  const textarea = ref();
10533
- let height = ref("300px");
10534
10541
  let loaded = ref(false);
10535
10542
  const cannotDetectLanguage = computed(() => {
10536
10543
  var _a2;
@@ -10574,8 +10581,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
10574
10581
  }
10575
10582
  function adjustHeight() {
10576
10583
  var _a2;
10577
- if (((_a2 = textarea.value) == null ? void 0 : _a2.scrollHeight) && textarea.value.scrollHeight > 300) {
10578
- height.value = `${textarea.value.scrollHeight}px`;
10584
+ if (((_a2 = textarea.value) == null ? void 0 : _a2.scrollHeight) && textarea.value.scrollHeight > Number.parseInt(elHeight.value)) {
10585
+ elHeight.value = `${textarea.value.scrollHeight}px`;
10579
10586
  }
10580
10587
  }
10581
10588
  onMounted(async () => {
@@ -10595,40 +10602,43 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
10595
10602
  }
10596
10603
  }, { immediate: true });
10597
10604
  return (_ctx, _cache) => {
10598
- return unref(loaded) ? (openBlock(), createElementBlock("div", _hoisted_1$E, [
10599
- createElementVNode("div", {
10600
- class: "relative block h-100",
10601
- style: normalizeStyle({ height: unref(height) })
10602
- }, [
10603
- createElementVNode("pre", _hoisted_2$t, [
10604
- _cache[2] || (_cache[2] = createTextVNode(" ")),
10605
- createElementVNode("code", {
10606
- class: normalizeClass(className.value),
10607
- innerHTML: highlightedCode.value
10608
- }, null, 10, _hoisted_3$m),
10609
- _cache[3] || (_cache[3] = createTextVNode("\n "))
10610
- ]),
10611
- !_ctx.readonly ? withDirectives((openBlock(), createElementBlock("textarea", {
10612
- key: 0,
10613
- ref_key: "textarea",
10614
- ref: textarea,
10615
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(code) ? code.value = $event : code = $event),
10616
- class: "code-editor absolute inset-0 bg-transparent overflow-hidden h-100 p-0 m-0 codeText border-none",
10617
- spellcheck: "false",
10618
- placeholder: "Write your code here",
10619
- "aria-label": "Code Editor",
10620
- "data-gramm": "false",
10621
- onKeydown: withKeys(withModifiers(handleTab, ["prevent"]), ["tab"]),
10622
- onInput: _cache[1] || (_cache[1] = ($event) => emit2("update:modelValue", unref(code)))
10623
- }, null, 40, _hoisted_4$f)), [
10624
- [vModelText, unref(code)]
10625
- ]) : createCommentVNode("", true)
10626
- ], 4)
10627
- ])) : createCommentVNode("", true);
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
+ ]);
10628
10638
  };
10629
10639
  }
10630
10640
  });
10631
- const CodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-4f1dc18a"]]);
10641
+ const CodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-1fbc9b61"]]);
10632
10642
  const _hoisted_1$D = ["title"];
10633
10643
  const _hoisted_2$s = ["id", "placeholder", "required"];
10634
10644
  const _sfc_main$L = /* @__PURE__ */ defineComponent({
@@ -20620,7 +20630,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
20620
20630
  };
20621
20631
  }
20622
20632
  });
20623
- const RangeInput = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-fb99b679"]]);
20633
+ const RangeInput = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-e606435a"]]);
20624
20634
  const tableTools = [
20625
20635
  "mergeCells",
20626
20636
  "splitCells",
@@ -20815,7 +20825,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
20815
20825
  thin: "",
20816
20826
  flat: "",
20817
20827
  "aria-label": action.name,
20818
- class: normalizeClass([action.class, { active: _ctx.selectedStyles.has(action.name) }]),
20828
+ class: normalizeClass([[action.class, { active: _ctx.selectedStyles.has(action.name) }], ""]),
20819
20829
  onClick: ($event) => runAction(action.name)
20820
20830
  }, null, 8, ["icon", "aria-label", "class", "onClick"])), [
20821
20831
  [_directive_tooltip, action.label]
@@ -20829,7 +20839,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
20829
20839
  };
20830
20840
  }
20831
20841
  });
20832
- const EditorToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-f3e90c0a"]]);
20842
+ const EditorToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-33dff8fa"]]);
20833
20843
  function createCommandExecutor(state2, commands) {
20834
20844
  return {
20835
20845
  execute(command, value) {
@@ -30617,7 +30627,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
30617
30627
  };
30618
30628
  }
30619
30629
  });
30620
- const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-486451e5"]]);
30630
+ const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-ebe691ee"]]);
30621
30631
  const files = {
30622
30632
  setBaseUrl: (baseUrl) => {
30623
30633
  if (!baseUrl) return;
@@ -34547,7 +34557,12 @@ function getFallbackSchema(data2, showFields) {
34547
34557
  const keys4 = Array.from(new Set((data2 ?? []).flatMap(Object.keys)));
34548
34558
  const schema = keys4.map((id) => ({
34549
34559
  id,
34550
- 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
+ }
34551
34566
  }));
34552
34567
  return showFields ? schema.filter((f2) => showFields.includes(f2.id) || !f2.id) : schema;
34553
34568
  }