@bagelink/vue 1.2.81 → 1.2.83

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.
Files changed (59) hide show
  1. package/dist/components/Btn.vue.d.ts +1 -1
  2. package/dist/components/Btn.vue.d.ts.map +1 -1
  3. package/dist/components/DataPreview.vue.d.ts +16 -5
  4. package/dist/components/DataPreview.vue.d.ts.map +1 -1
  5. package/dist/components/Icon/Icon.vue.d.ts +4 -1
  6. package/dist/components/Icon/Icon.vue.d.ts.map +1 -1
  7. package/dist/components/ModalForm.vue.d.ts +2 -1
  8. package/dist/components/ModalForm.vue.d.ts.map +1 -1
  9. package/dist/components/dataTable/DataTable.vue.d.ts.map +1 -1
  10. package/dist/components/dataTable/useSorting.d.ts +1 -1
  11. package/dist/components/dataTable/useSorting.d.ts.map +1 -1
  12. package/dist/components/dataTable/useTableData.d.ts +7 -6
  13. package/dist/components/dataTable/useTableData.d.ts.map +1 -1
  14. package/dist/components/dataTable/useTableVirtualization.d.ts.map +1 -1
  15. package/dist/components/form/BagelForm.vue.d.ts +4 -10
  16. package/dist/components/form/BagelForm.vue.d.ts.map +1 -1
  17. package/dist/components/form/BglMultiStepForm.vue.d.ts +4 -3
  18. package/dist/components/form/BglMultiStepForm.vue.d.ts.map +1 -1
  19. package/dist/components/form/FieldArray.vue.d.ts +3 -2
  20. package/dist/components/form/FieldArray.vue.d.ts.map +1 -1
  21. package/dist/composables/index.d.ts +5 -5
  22. package/dist/composables/index.d.ts.map +1 -1
  23. package/dist/composables/useSchemaField.d.ts +5 -12
  24. package/dist/composables/useSchemaField.d.ts.map +1 -1
  25. package/dist/index.cjs +142 -228
  26. package/dist/index.d.ts +1 -1
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.mjs +143 -229
  29. package/dist/plugins/modalTypes.d.ts +3 -2
  30. package/dist/plugins/modalTypes.d.ts.map +1 -1
  31. package/dist/style.css +89 -89
  32. package/dist/types/BagelForm.d.ts +14 -11
  33. package/dist/types/BagelForm.d.ts.map +1 -1
  34. package/dist/types/TableSchema.d.ts +9 -9
  35. package/dist/types/TableSchema.d.ts.map +1 -1
  36. package/dist/utils/BagelFormUtils.d.ts +4 -3
  37. package/dist/utils/BagelFormUtils.d.ts.map +1 -1
  38. package/dist/utils/useSearch.d.ts +44 -0
  39. package/dist/utils/useSearch.d.ts.map +1 -0
  40. package/package.json +1 -1
  41. package/src/components/DataPreview.vue +16 -5
  42. package/src/components/Icon/Icon.vue +12 -3
  43. package/src/components/ModalForm.vue +6 -9
  44. package/src/components/dataTable/DataTable.vue +11 -14
  45. package/src/components/dataTable/useSorting.ts +1 -1
  46. package/src/components/dataTable/useTableData.ts +19 -42
  47. package/src/components/dataTable/useTableVirtualization.ts +4 -8
  48. package/src/components/form/BagelForm.vue +32 -97
  49. package/src/components/form/BglMultiStepForm.vue +7 -6
  50. package/src/components/form/FieldArray.vue +54 -45
  51. package/src/components/form/inputs/RichText/index.vue +1 -1
  52. package/src/composables/index.ts +12 -13
  53. package/src/composables/useSchemaField.ts +37 -35
  54. package/src/index.ts +1 -1
  55. package/src/plugins/modalTypes.ts +3 -2
  56. package/src/types/BagelForm.ts +22 -14
  57. package/src/types/TableSchema.ts +9 -9
  58. package/src/utils/BagelFormUtils.ts +4 -3
  59. package/src/utils/{search.ts → useSearch.ts} +1 -2
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { defineComponent, reactive, provide, createElementBlock, openBlock, renderSlot, ref, computed, inject, watch, normalizeClass, createElementVNode, createVNode, unref, createCommentVNode, toDisplayString, Transition, withCtx, Fragment, renderList, createBlock, isRef, useSlots, resolveDirective, withDirectives, resolveDynamicComponent, mergeProps, withKeys, withModifiers, createTextVNode, normalizeStyle, onMounted, onUnmounted, nextTick, resolveComponent, isVNode, h as h$2, getCurrentScope, onScopeDispose, toValue, getCurrentInstance, shallowRef, mergeModels, useCssVars, useModel, vModelCheckbox, createApp, pushScopeId, popScopeId, withScopeId, normalizeProps, guardReactiveProps, toRef, createSlots, vModelText, Comment, Text, vModelRadio, TransitionGroup, vModelDynamic, onBeforeUnmount } from "vue";
4
+ import { defineComponent, reactive, provide, createElementBlock, openBlock, renderSlot, ref, computed, inject, watch, normalizeClass, createElementVNode, createVNode, unref, createCommentVNode, toDisplayString, Transition, withCtx, Fragment, renderList, createBlock, isRef, useSlots, resolveDirective, withDirectives, resolveDynamicComponent, mergeProps, withKeys, withModifiers, createTextVNode, normalizeStyle, onMounted, onUnmounted, nextTick, resolveComponent, isVNode, h as h$2, toRef, toValue, getCurrentScope, onScopeDispose, getCurrentInstance, shallowRef, mergeModels, useCssVars, useModel, vModelCheckbox, createApp, pushScopeId, popScopeId, withScopeId, normalizeProps, guardReactiveProps, createSlots, vModelText, Comment, Text, vModelRadio, TransitionGroup, vModelDynamic, onBeforeUnmount } from "vue";
5
5
  import { RouterLink } from "vue-router";
6
6
  const _sfc_main$1g = /* @__PURE__ */ defineComponent({
7
7
  __name: "Accordion",
@@ -17,7 +17,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
17
17
  };
18
18
  }
19
19
  });
20
- const _hoisted_1$13 = ["aria-expanded", "aria-controls"];
20
+ const _hoisted_1$12 = ["aria-expanded", "aria-controls"];
21
21
  const _hoisted_2$N = { class: "accordion-label" };
22
22
  const _hoisted_3$G = ["id", "aria-hidden"];
23
23
  const _sfc_main$1f = /* @__PURE__ */ defineComponent({
@@ -94,7 +94,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
94
94
  }, [
95
95
  createVNode(unref(_sfc_main$t), { icon: computedIcon.value }, null, 8, ["icon"])
96
96
  ], 2)) : createCommentVNode("", true)
97
- ], 8, _hoisted_1$13),
97
+ ], 8, _hoisted_1$12),
98
98
  createVNode(Transition, { name: "expand" }, {
99
99
  default: withCtx(() => [
100
100
  unref(isOpen) ? (openBlock(), createElementBlock("div", {
@@ -120,7 +120,7 @@ const _export_sfc = (sfc, props2) => {
120
120
  return target;
121
121
  };
122
122
  const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["__scopeId", "data-v-3334f637"]]);
123
- const _hoisted_1$12 = { class: "relative" };
123
+ const _hoisted_1$11 = { class: "relative" };
124
124
  const _sfc_main$1e = /* @__PURE__ */ defineComponent({
125
125
  __name: "AddressSearch",
126
126
  emits: ["addressSelected"],
@@ -143,7 +143,7 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
143
143
  (_a = suggestion.value) == null ? void 0 : _a.show();
144
144
  }
145
145
  return (_ctx, _cache) => {
146
- return openBlock(), createElementBlock("div", _hoisted_1$12, [
146
+ return openBlock(), createElementBlock("div", _hoisted_1$11, [
147
147
  createVNode(unref(_sfc_main$Y), {
148
148
  ref_key: "suggestion",
149
149
  ref: suggestion,
@@ -179,7 +179,7 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
179
179
  };
180
180
  }
181
181
  });
182
- const _hoisted_1$11 = {
182
+ const _hoisted_1$10 = {
183
183
  key: 1,
184
184
  class: "bgl_btn-flex"
185
185
  };
@@ -252,7 +252,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
252
252
  key: 0,
253
253
  class: "h-100p",
254
254
  size: "15"
255
- })) : (openBlock(), createElementBlock("div", _hoisted_1$11, [
255
+ })) : (openBlock(), createElementBlock("div", _hoisted_1$10, [
256
256
  _ctx.icon ? (openBlock(), createBlock(unref(_sfc_main$t), {
257
257
  key: 0,
258
258
  icon: _ctx.icon,
@@ -277,7 +277,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
277
277
  }
278
278
  });
279
279
  const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["__scopeId", "data-v-99c4aa53"]]);
280
- const _hoisted_1$10 = ["dismissable"];
280
+ const _hoisted_1$$ = ["dismissable"];
281
281
  const _hoisted_2$M = { class: "m-0" };
282
282
  const _sfc_main$1c = /* @__PURE__ */ defineComponent({
283
283
  __name: "Alert",
@@ -317,12 +317,12 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
317
317
  icon: "close",
318
318
  onClick: _cache[0] || (_cache[0] = ($event) => isDismissed.value = true)
319
319
  })
320
- ], 10, _hoisted_1$10)) : createCommentVNode("", true);
320
+ ], 10, _hoisted_1$$)) : createCommentVNode("", true);
321
321
  };
322
322
  }
323
323
  });
324
324
  const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["__scopeId", "data-v-15c4ee95"]]);
325
- const _hoisted_1$$ = ["src", "alt"];
325
+ const _hoisted_1$_ = ["src", "alt"];
326
326
  const _sfc_main$1b = /* @__PURE__ */ defineComponent({
327
327
  __name: "Avatar",
328
328
  props: {
@@ -341,7 +341,7 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
341
341
  key: 0,
342
342
  src: _ctx.src,
343
343
  alt: _ctx.name
344
- }, null, 8, _hoisted_1$$)) : (openBlock(), createElementBlock("p", {
344
+ }, null, 8, _hoisted_1$_)) : (openBlock(), createElementBlock("p", {
345
345
  key: 1,
346
346
  style: normalizeStyle({ "line-height": `${_ctx.size}px`, "font-size": `calc(1.5rem * ${_ctx.size} / 50)` })
347
347
  }, toDisplayString((_ctx.fallback || unref(initials)(_ctx.name || "")).toUpperCase()), 5))
@@ -380,7 +380,7 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
380
380
  }
381
381
  });
382
382
  const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["__scopeId", "data-v-689f051f"]]);
383
- const _hoisted_1$_ = ["src"];
383
+ const _hoisted_1$Z = ["src"];
384
384
  const _hoisted_2$L = ["autoplay", "muted", "loop", "controls", "playsinline"];
385
385
  const _hoisted_3$F = ["src", "type"];
386
386
  const _sfc_main$19 = /* @__PURE__ */ defineComponent({
@@ -460,7 +460,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
460
460
  allowfullscreen: "",
461
461
  title: "Video",
462
462
  allow: "autoplay"
463
- }, null, 12, _hoisted_1$_)) : _ctx.src ? (openBlock(), createElementBlock("video", {
463
+ }, null, 12, _hoisted_1$Z)) : _ctx.src ? (openBlock(), createElementBlock("video", {
464
464
  key: 1,
465
465
  ref_key: "video",
466
466
  ref: video,
@@ -547,7 +547,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
547
547
  }
548
548
  });
549
549
  const CalendarPopover = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["__scopeId", "data-v-6f51f6b3"]]);
550
- const _hoisted_1$Z = { class: "agenda-view" };
550
+ const _hoisted_1$Y = { class: "agenda-view" };
551
551
  const _hoisted_2$K = ["data-date", "onClick"];
552
552
  const _hoisted_3$E = { class: "event-content" };
553
553
  const _hoisted_4$r = { class: "event-time" };
@@ -651,7 +651,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
651
651
  }
652
652
  });
653
653
  return (_ctx, _cache) => {
654
- return openBlock(), createElementBlock("div", _hoisted_1$Z, [
654
+ return openBlock(), createElementBlock("div", _hoisted_1$Y, [
655
655
  _cache[0] || (_cache[0] = createElementVNode("div", { class: "agenda-header" }, [
656
656
  createElementVNode("div", { class: "time-column" }, " Time "),
657
657
  createElementVNode("div", { class: "event-column" }, " Event ")
@@ -689,7 +689,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
689
689
  }
690
690
  });
691
691
  const AgendaView = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["__scopeId", "data-v-1e2b483b"]]);
692
- const _hoisted_1$Y = { class: "w-100p overflow-hidden m_overflow h-100p grid" };
692
+ const _hoisted_1$X = { class: "w-100p overflow-hidden m_overflow h-100p grid" };
693
693
  const _hoisted_2$J = { class: "border-bottom me-1 txt-center p-05 dayGrid" };
694
694
  const _hoisted_3$D = { class: "overflow h-100p pe-05" };
695
695
  const _hoisted_4$q = { class: "time-column" };
@@ -835,7 +835,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
835
835
  }
836
836
  });
837
837
  return (_ctx, _cache) => {
838
- return openBlock(), createElementBlock("div", _hoisted_1$Y, [
838
+ return openBlock(), createElementBlock("div", _hoisted_1$X, [
839
839
  createElementVNode("div", _hoisted_2$J, [
840
840
  _cache[0] || (_cache[0] = createElementVNode("div", null, null, -1)),
841
841
  createElementVNode("div", null, toDisplayString(unref(formatDate)(_ctx.startDate)), 1)
@@ -901,7 +901,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
901
901
  }
902
902
  });
903
903
  const DayView = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["__scopeId", "data-v-8b1a770f"]]);
904
- const _hoisted_1$X = { class: "month-view" };
904
+ const _hoisted_1$W = { class: "month-view" };
905
905
  const _hoisted_2$I = { class: "month-header" };
906
906
  const _hoisted_3$C = { class: "month-grid" };
907
907
  const _hoisted_4$p = { class: "day-number" };
@@ -987,7 +987,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
987
987
  }
988
988
  }
989
989
  return (_ctx, _cache) => {
990
- return openBlock(), createElementBlock("div", _hoisted_1$X, [
990
+ return openBlock(), createElementBlock("div", _hoisted_1$W, [
991
991
  createElementVNode("div", _hoisted_2$I, [
992
992
  (openBlock(true), createElementBlock(Fragment, null, renderList(weekDays.value, (day) => {
993
993
  return openBlock(), createElementBlock("div", {
@@ -1030,7 +1030,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
1030
1030
  }
1031
1031
  });
1032
1032
  const MonthView = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-0b1117c4"]]);
1033
- const _hoisted_1$W = { class: "w-100p overflow-hidden m_overflow h-100p grid" };
1033
+ const _hoisted_1$V = { class: "w-100p overflow-hidden m_overflow h-100p grid" };
1034
1034
  const _hoisted_2$H = { class: "overflow h-100p pe-05" };
1035
1035
  const _hoisted_3$B = ["onMousedown"];
1036
1036
  const _hoisted_4$o = ["onClick"];
@@ -1294,7 +1294,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
1294
1294
  }
1295
1295
  });
1296
1296
  return (_ctx, _cache) => {
1297
- return openBlock(), createElementBlock("div", _hoisted_1$W, [
1297
+ return openBlock(), createElementBlock("div", _hoisted_1$V, [
1298
1298
  createElementVNode("div", {
1299
1299
  ref_key: "calendarGrid",
1300
1300
  ref: calendarGrid,
@@ -1393,7 +1393,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
1393
1393
  }
1394
1394
  });
1395
1395
  const WeekView = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["__scopeId", "data-v-2d5bca17"]]);
1396
- const _hoisted_1$V = { class: "calendar" };
1396
+ const _hoisted_1$U = { class: "calendar" };
1397
1397
  const _hoisted_2$G = { class: "flex m_block m_pb-1" };
1398
1398
  const _hoisted_3$A = { class: "txt-light my-0" };
1399
1399
  const _hoisted_4$n = { class: "ms-auto flex gap-025" };
@@ -1489,7 +1489,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
1489
1489
  emit2("ready", state2.value);
1490
1490
  });
1491
1491
  return (_ctx, _cache) => {
1492
- return openBlock(), createElementBlock("div", _hoisted_1$V, [
1492
+ return openBlock(), createElementBlock("div", _hoisted_1$U, [
1493
1493
  createElementVNode("div", _hoisted_2$G, [
1494
1494
  createElementVNode("h3", _hoisted_3$A, [
1495
1495
  createElementVNode("b", null, toDisplayString(unref(fmtDate)(currentDate.value, { fmt: "MMMM" })), 1),
@@ -1568,7 +1568,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
1568
1568
  }
1569
1569
  });
1570
1570
  const Index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-840b6594"]]);
1571
- const _hoisted_1$U = {
1571
+ const _hoisted_1$T = {
1572
1572
  key: 0,
1573
1573
  class: "card_label"
1574
1574
  };
@@ -1601,7 +1601,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
1601
1601
  }])
1602
1602
  }, {
1603
1603
  default: withCtx(() => [
1604
- _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_1$U, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
1604
+ _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_1$T, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
1605
1605
  renderSlot(_ctx.$slots, "default")
1606
1606
  ]),
1607
1607
  _: 3
@@ -1611,7 +1611,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
1611
1611
  };
1612
1612
  }
1613
1613
  });
1614
- const _hoisted_1$T = ["dir"];
1614
+ const _hoisted_1$S = ["dir"];
1615
1615
  const _hoisted_2$F = {
1616
1616
  key: 0,
1617
1617
  class: "dots"
@@ -2084,7 +2084,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
2084
2084
  }, void 0, true)
2085
2085
  ])
2086
2086
  ], 2)
2087
- ], 8, _hoisted_1$T);
2087
+ ], 8, _hoisted_1$S);
2088
2088
  };
2089
2089
  }
2090
2090
  });
@@ -8032,13 +8032,13 @@ var script = defineComponent({
8032
8032
  return { bar, canvas, direction, mouse };
8033
8033
  }
8034
8034
  });
8035
- const _hoisted_1$S = {
8035
+ const _hoisted_1$R = {
8036
8036
  key: 0,
8037
8037
  class: "layer-hover-bar"
8038
8038
  };
8039
8039
  const _hoisted_2$E = ["x", "y", "width", "height"];
8040
8040
  function render(_ctx, _cache, $props, $setup, $data, $options) {
8041
- return _ctx.mouse.hover ? (openBlock(), createElementBlock("g", _hoisted_1$S, [
8041
+ return _ctx.mouse.hover ? (openBlock(), createElementBlock("g", _hoisted_1$R, [
8042
8042
  createElementVNode("rect", mergeProps({ class: "hover-bar" }, _ctx.barStyle, {
8043
8043
  x: _ctx.bar.x,
8044
8044
  y: _ctx.bar.y,
@@ -8239,7 +8239,7 @@ ${indent}}`;
8239
8239
  return typeof field.$el === "object" ? field.$el : componentMap[field.$el] ?? field.$el ?? "div";
8240
8240
  }
8241
8241
  function renderChild(child, slots) {
8242
- if (typeof child === "string") return child;
8242
+ if (typeof child === "string") return h$2(child);
8243
8243
  if (isVNode(child)) return child;
8244
8244
  return renderField(
8245
8245
  child,
@@ -8247,8 +8247,9 @@ ${indent}}`;
8247
8247
  );
8248
8248
  }
8249
8249
  function renderField(field, slots) {
8250
+ var _a;
8250
8251
  const Component = getComponent(field);
8251
- if (!Component) return null;
8252
+ if (!Component) return;
8252
8253
  const rowData = (getFormData == null ? void 0 : getFormData()) || {};
8253
8254
  const condition = field.vIf ?? field["v-if"];
8254
8255
  if (condition !== void 0) {
@@ -8257,14 +8258,14 @@ ${indent}}`;
8257
8258
  field.id ? rowData == null ? void 0 : rowData[field.id] : void 0,
8258
8259
  rowData
8259
8260
  )) {
8260
- return null;
8261
+ return;
8261
8262
  }
8262
8263
  } else if (typeof condition === "string") {
8263
8264
  if (!(rowData == null ? void 0 : rowData[condition])) {
8264
- return null;
8265
+ return;
8265
8266
  }
8266
8267
  } else if (!condition) {
8267
- return null;
8268
+ return;
8268
8269
  }
8269
8270
  }
8270
8271
  const {
@@ -8343,23 +8344,24 @@ ${indent}}`;
8343
8344
  Object.entries(fieldSlots).forEach(([name, slot]) => {
8344
8345
  componentSlots[name] = () => {
8345
8346
  if (Array.isArray(slot)) {
8346
- return slot.map((schemaField) => renderField(schemaField, slots));
8347
- }
8348
- if (isVNode(slot)) {
8349
- return slot;
8350
- }
8351
- if (typeof slot === "function") {
8352
- const slotFn = slot;
8353
- return slotFn({ row: rowData, field });
8347
+ return slot.map((schemaField) => {
8348
+ if (typeof schemaField === "function") {
8349
+ const slotFn = schemaField;
8350
+ return slotFn({ row: rowData, field });
8351
+ }
8352
+ if (isVNode(schemaField)) {
8353
+ return schemaField;
8354
+ }
8355
+ return renderField(schemaField, slots);
8356
+ });
8354
8357
  }
8355
- return slot;
8356
8358
  };
8357
8359
  });
8358
8360
  }
8359
- const slotContent = field.id && (slots == null ? void 0 : slots[field.id]) ? slots[field.id]({ row: rowData, field }) : void 0;
8361
+ const slotContent = field.id ? (_a = slots == null ? void 0 : slots[field.id]) == null ? void 0 : _a.call(slots, { row: rowData, field }) : void 0;
8360
8362
  if (mode === "preview") {
8361
8363
  if (!includeUnset && (transformedValue === void 0 || transformedValue === null || transformedValue.length === 0)) {
8362
- return null;
8364
+ return;
8363
8365
  }
8364
8366
  return h$2("div", { class: "preview-field" }, [
8365
8367
  h$2("div", { class: "field-label" }, `${field.label || keyToLabel(field.id || "")}:`),
@@ -8383,27 +8385,13 @@ function useTableData(options) {
8383
8385
  const sortDirection = ref("ASC");
8384
8386
  const schemaState = ref("loading");
8385
8387
  const resolvedSchema = ref([]);
8386
- function getValue(value) {
8387
- if (value === void 0 || value === null) {
8388
- return void 0;
8389
- }
8390
- try {
8391
- if (value && typeof value === "object" && "value" in value) {
8392
- return value.value;
8393
- }
8394
- return value;
8395
- } catch (error) {
8396
- console.error("Error in getValue:", error);
8397
- return void 0;
8398
- }
8399
- }
8400
- async function resolveSchemaAsync() {
8388
+ function resolveSchema() {
8401
8389
  try {
8402
8390
  schemaState.value = "loading";
8403
8391
  const dataValue = options.data.value || [];
8404
8392
  const schema = useBglSchema({
8405
- schema: await getValue(options.schema),
8406
- columns: getValue(options.columns),
8393
+ schema: options.schema,
8394
+ columns: options.columns,
8407
8395
  data: dataValue
8408
8396
  });
8409
8397
  if (Array.isArray(schema) && schema.length > 0) {
@@ -8412,6 +8400,7 @@ function useTableData(options) {
8412
8400
  const firstItem = dataValue[0];
8413
8401
  resolvedSchema.value = Object.keys(firstItem || {}).filter((key) => key !== "id" && !key.startsWith("_")).map((key) => ({
8414
8402
  id: key,
8403
+ // Cast to any to resolve type issues with Path<T>
8415
8404
  label: keyToLabel(key),
8416
8405
  $el: "div",
8417
8406
  transform: (val) => {
@@ -8431,15 +8420,12 @@ function useTableData(options) {
8431
8420
  }
8432
8421
  }
8433
8422
  watch([
8434
- () => getValue(options.schema),
8435
- () => getValue(options.columns),
8436
- () => options.data.value
8423
+ options.schema || toRef({}),
8424
+ options.columns || toRef([]),
8425
+ options.data
8437
8426
  ], () => {
8438
- resolveSchemaAsync();
8427
+ resolveSchema();
8439
8428
  }, { immediate: true });
8440
- onMounted(() => {
8441
- resolveSchemaAsync();
8442
- });
8443
8429
  const computedSchema = computed(() => resolvedSchema.value);
8444
8430
  function transform(rowData) {
8445
8431
  const transformed = { ...rowData };
@@ -8480,8 +8466,8 @@ function useTableData(options) {
8480
8466
  if (!Array.isArray(currentData) || currentData.length === 0) {
8481
8467
  return [];
8482
8468
  }
8483
- const useServerSortValue = getValue(options.useServerSort);
8484
- if (!sortField.value || useServerSortValue === true) {
8469
+ const useServerSortValue = computed(() => toValue(options.useServerSort));
8470
+ if (!sortField.value || useServerSortValue.value === true) {
8485
8471
  return currentData.map(transform);
8486
8472
  }
8487
8473
  return currentData.map(transform).sort((a2, z2) => {
@@ -8526,7 +8512,7 @@ function useTableData(options) {
8526
8512
  schemaState: computed(() => schemaState.value)
8527
8513
  };
8528
8514
  }
8529
- const _hoisted_1$R = { class: "data-preview" };
8515
+ const _hoisted_1$Q = { class: "data-preview" };
8530
8516
  const _hoisted_2$D = {
8531
8517
  key: 1,
8532
8518
  class: "empty-preview"
@@ -8534,13 +8520,13 @@ const _hoisted_2$D = {
8534
8520
  const _sfc_main$$ = /* @__PURE__ */ defineComponent({
8535
8521
  __name: "DataPreview",
8536
8522
  props: {
8537
- schema: { type: Function },
8523
+ modelValue: {},
8524
+ includeUnset: { type: Boolean },
8525
+ schema: {},
8538
8526
  columns: {},
8539
- useServerSort: { type: Boolean },
8527
+ useServerSort: {},
8540
8528
  selectable: { type: Boolean },
8541
- onLastItemVisible: { type: Function },
8542
- modelValue: {},
8543
- includeUnset: { type: Boolean }
8529
+ onLastItemVisible: { type: Function }
8544
8530
  },
8545
8531
  setup(__props) {
8546
8532
  const props2 = __props;
@@ -8573,7 +8559,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
8573
8559
  onUpdateModelValue: void 0
8574
8560
  });
8575
8561
  return (_ctx, _cache) => {
8576
- return openBlock(), createElementBlock("div", _hoisted_1$R, [
8562
+ return openBlock(), createElementBlock("div", _hoisted_1$Q, [
8577
8563
  unref(computedSchema) && unref(computedSchema).length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(computedSchema), (field) => {
8578
8564
  return openBlock(), createBlock(resolveDynamicComponent(unref(renderField)(field, unref(slots))), {
8579
8565
  key: field.id
@@ -8583,7 +8569,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
8583
8569
  };
8584
8570
  }
8585
8571
  });
8586
- const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-430b1998"]]);
8572
+ const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-d084907a"]]);
8587
8573
  function useTableSelection(options) {
8588
8574
  const allSelectorEl = ref();
8589
8575
  const computedSelectedItems = computed(() => options.selectedItems.value);
@@ -9500,12 +9486,7 @@ function useTableVirtualization(options) {
9500
9486
  await until(() => lastItemEl.value).toBeTruthy();
9501
9487
  useIntersectionObserver(lastItemEl, ([entry]) => {
9502
9488
  var _a;
9503
- let dataLength = 0;
9504
- if (isRef(options.data) && options.data.value) {
9505
- dataLength = Array.isArray(options.data.value) ? options.data.value.length : 0;
9506
- } else if (Array.isArray(options.data)) {
9507
- dataLength = options.data.length;
9508
- }
9489
+ const dataLength = toValue(options.data).length || 0;
9509
9490
  if (entry.isIntersecting && dataLength > 0) {
9510
9491
  (_a = options.onLastItemVisible) == null ? void 0 : _a.call(options);
9511
9492
  }
@@ -9520,30 +9501,26 @@ function useTableVirtualization(options) {
9520
9501
  registerLastItemObserver
9521
9502
  };
9522
9503
  }
9523
- const _hoisted_1$Q = {
9504
+ const _hoisted_1$P = {
9524
9505
  key: 0,
9525
9506
  class: "loading-table-wrapper z-99 h-100 w-100 absolute inset"
9526
9507
  };
9527
- const _hoisted_2$C = {
9528
- key: 1,
9529
- class: "flex-center h-300px txt-red"
9530
- };
9531
- const _hoisted_3$x = { class: "infinite-wrapper" };
9532
- const _hoisted_4$l = { class: "row first-row" };
9533
- const _hoisted_5$l = { key: 0 };
9534
- const _hoisted_6$h = ["onClick"];
9535
- const _hoisted_7$d = { class: "flex" };
9536
- const _hoisted_8$8 = ["onClick"];
9537
- const _hoisted_9$5 = { key: 0 };
9538
- const _hoisted_10$5 = ["value"];
9539
- const _hoisted_11$5 = { key: 1 };
9508
+ const _hoisted_2$C = { class: "infinite-wrapper" };
9509
+ const _hoisted_3$x = { class: "row first-row" };
9510
+ const _hoisted_4$l = { key: 0 };
9511
+ const _hoisted_5$l = ["onClick"];
9512
+ const _hoisted_6$h = { class: "flex" };
9513
+ const _hoisted_7$d = ["onClick"];
9514
+ const _hoisted_8$8 = { key: 0 };
9515
+ const _hoisted_9$5 = ["value"];
9516
+ const _hoisted_10$5 = { key: 1 };
9540
9517
  const _sfc_main$_ = /* @__PURE__ */ defineComponent({
9541
9518
  __name: "DataTable",
9542
9519
  props: /* @__PURE__ */ mergeModels({
9543
9520
  data: {},
9544
- schema: { type: Function },
9521
+ schema: {},
9545
9522
  columns: {},
9546
- useServerSort: { type: Boolean },
9523
+ useServerSort: {},
9547
9524
  selectable: { type: Boolean },
9548
9525
  onLastItemVisible: { type: Function }
9549
9526
  }, {
@@ -9557,7 +9534,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
9557
9534
  emits: /* @__PURE__ */ mergeModels(["orderBy", "select", "lastItemVisible"], ["update:loading", "update:itemHeight", "update:selectedItems"]),
9558
9535
  setup(__props, { emit: __emit }) {
9559
9536
  useCssVars((_ctx) => ({
9560
- "18d61d81": unref(computedItemHeight)
9537
+ "6f015429": unref(computedItemHeight)
9561
9538
  }));
9562
9539
  const props2 = __props;
9563
9540
  const emit2 = __emit;
@@ -9575,8 +9552,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
9575
9552
  sortField,
9576
9553
  sortDirection,
9577
9554
  toggleSort,
9578
- cleanTransformedData,
9579
- schemaState
9555
+ cleanTransformedData
9580
9556
  } = useTableData({
9581
9557
  data: data2,
9582
9558
  schema,
@@ -9653,20 +9629,20 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
9653
9629
  scrollTo(0);
9654
9630
  }
9655
9631
  );
9656
- const showLoading = computed(() => loading.value || schemaState.value === "loading");
9632
+ const showLoading = computed(() => loading.value);
9657
9633
  return (_ctx, _cache) => {
9658
9634
  return openBlock(), createElementBlock("div", mergeProps({ class: "table-list-wrap h-100" }, unref(containerProps), {
9659
9635
  class: { "loading-table": showLoading.value }
9660
9636
  }), [
9661
- showLoading.value ? (openBlock(), createElementBlock("div", _hoisted_1$Q, _cache[4] || (_cache[4] = [
9637
+ showLoading.value ? (openBlock(), createElementBlock("div", _hoisted_1$P, _cache[4] || (_cache[4] = [
9662
9638
  createElementVNode("div", { class: "loading-table-animation fixed oval top-7" }, null, -1)
9663
- ]))) : unref(schemaState) === "error" ? (openBlock(), createElementBlock("div", _hoisted_2$C, " Error loading table schema ")) : createCommentVNode("", true),
9639
+ ]))) : createCommentVNode("", true),
9664
9640
  createElementVNode("div", mergeProps(unref(wrapperProps), {
9665
9641
  class: { "pointer-events-none": showLoading.value }
9666
9642
  }), [
9667
- createElementVNode("table", _hoisted_3$x, [
9668
- createElementVNode("thead", _hoisted_4$l, [
9669
- unref(isSelectable) ? (openBlock(), createElementBlock("th", _hoisted_5$l, [
9643
+ createElementVNode("table", _hoisted_2$C, [
9644
+ createElementVNode("thead", _hoisted_3$x, [
9645
+ unref(isSelectable) ? (openBlock(), createElementBlock("th", _hoisted_4$l, [
9670
9646
  createElementVNode("input", {
9671
9647
  ref_key: "allSelectorEl",
9672
9648
  ref: allSelectorEl,
@@ -9682,7 +9658,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
9682
9658
  class: "col",
9683
9659
  onClick: ($event) => unref(toggleSort)((field == null ? void 0 : field.id) || "")
9684
9660
  }, [
9685
- createElementVNode("div", _hoisted_7$d, [
9661
+ createElementVNode("div", _hoisted_6$h, [
9686
9662
  createTextVNode(toDisplayString(field.label || unref(keyToLabel)(field == null ? void 0 : field.id)) + " ", 1),
9687
9663
  createElementVNode("div", {
9688
9664
  class: normalizeClass(["list-arrows", { sorted: unref(sortField) === (field == null ? void 0 : field.id) }])
@@ -9693,7 +9669,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
9693
9669
  }, null, 8, ["class"])
9694
9670
  ], 2)
9695
9671
  ])
9696
- ], 8, _hoisted_6$h);
9672
+ ], 8, _hoisted_5$l);
9697
9673
  }), 128))
9698
9674
  ]),
9699
9675
  createElementVNode("tbody", null, [
@@ -9703,7 +9679,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
9703
9679
  class: normalizeClass(["row row-item position-relative", { selected: (row == null ? void 0 : row.id) && unref(computedSelectedItems).includes(row.id) }]),
9704
9680
  onClick: ($event) => unref(toggleSelectItem)(row)
9705
9681
  }, [
9706
- unref(isSelectable) ? (openBlock(), createElementBlock("td", _hoisted_9$5, [
9682
+ unref(isSelectable) ? (openBlock(), createElementBlock("td", _hoisted_8$8, [
9707
9683
  createElementVNode("div", {
9708
9684
  onClick: _cache[3] || (_cache[3] = withModifiers(() => {
9709
9685
  }, ["stop"]))
@@ -9712,26 +9688,27 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
9712
9688
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => selectedItems.value = $event),
9713
9689
  type: "checkbox",
9714
9690
  value: (row == null ? void 0 : row.id) || ""
9715
- }, null, 8, _hoisted_10$5), [
9691
+ }, null, 8, _hoisted_9$5), [
9716
9692
  [vModelCheckbox, selectedItems.value]
9717
9693
  ])
9718
9694
  ])
9719
9695
  ])) : createCommentVNode("", true),
9720
9696
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(computedSchema), (field) => {
9697
+ var _a;
9721
9698
  return openBlock(), createElementBlock("td", {
9722
9699
  key: `${field.id}-${(row == null ? void 0 : row.id) || Math.random()}`,
9723
9700
  class: "col"
9724
9701
  }, [
9725
- field.id && unref(slots)[field.id] ? renderSlot(_ctx.$slots, field.id, {
9702
+ field.id && ((_a = unref(slots)) == null ? void 0 : _a[field.id]) ? renderSlot(_ctx.$slots, field.id, {
9726
9703
  key: 0,
9727
9704
  row,
9728
9705
  field
9729
- }, void 0, true) : (openBlock(), createElementBlock("div", _hoisted_11$5, [
9706
+ }, void 0, true) : (openBlock(), createElementBlock("div", _hoisted_10$5, [
9730
9707
  (openBlock(), createBlock(resolveDynamicComponent(renderFieldForRow(field, row))))
9731
9708
  ]))
9732
9709
  ]);
9733
9710
  }), 128))
9734
- ], 10, _hoisted_8$8);
9711
+ ], 10, _hoisted_7$d);
9735
9712
  }), 128)),
9736
9713
  props2.onLastItemVisible !== void 0 ? (openBlock(), createElementBlock("tr", {
9737
9714
  key: 0,
@@ -9746,7 +9723,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
9746
9723
  };
9747
9724
  }
9748
9725
  });
9749
- const DataTable = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-382d1c94"]]);
9726
+ const DataTable = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-b10460ed"]]);
9750
9727
  function useDraggable(options = {}) {
9751
9728
  const isDragging = ref(false);
9752
9729
  const dragElement = ref(null);
@@ -12935,7 +12912,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
12935
12912
  };
12936
12913
  }
12937
12914
  });
12938
- const _hoisted_1$P = { class: "px-1 pt-025 pb-1" };
12915
+ const _hoisted_1$O = { class: "px-1 pt-025 pb-1" };
12939
12916
  const _hoisted_2$B = { class: "ms-1" };
12940
12917
  const _sfc_main$X = /* @__PURE__ */ defineComponent({
12941
12918
  __name: "FieldSetVue",
@@ -12945,7 +12922,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
12945
12922
  },
12946
12923
  setup(__props) {
12947
12924
  return (_ctx, _cache) => {
12948
- return openBlock(), createElementBlock("fieldset", _hoisted_1$P, [
12925
+ return openBlock(), createElementBlock("fieldset", _hoisted_1$O, [
12949
12926
  createElementVNode("legend", _hoisted_2$B, toDisplayString(_ctx.legend || _ctx.label), 1),
12950
12927
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
12951
12928
  ]);
@@ -13472,7 +13449,6 @@ function getNestedValue(obj, path, defaultValue = void 0) {
13472
13449
  }
13473
13450
  return current ?? defaultValue;
13474
13451
  }
13475
- const _hoisted_1$O = { class: "flex-center h-300px" };
13476
13452
  const _sfc_main$V = /* @__PURE__ */ defineComponent({
13477
13453
  __name: "BagelForm",
13478
13454
  props: {
@@ -13491,10 +13467,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
13491
13467
  const formData = ref(clone2(props2.modelValue ?? {}));
13492
13468
  const initialFormData = ref(clone2(props2.modelValue ?? {}));
13493
13469
  const formState = ref("idle");
13494
- const schemaState = ref("loaded");
13495
- const resolvedSchemaData = ref();
13496
- const schemaRef = toRef(props2, "schema");
13497
- const resolvedSchema = computed(() => resolvedSchemaData.value);
13470
+ const resolvedSchema = computed(() => toValue(props2.schema));
13498
13471
  const isDirty = computed(() => {
13499
13472
  try {
13500
13473
  return JSON.stringify(formData.value) !== JSON.stringify(initialFormData.value);
@@ -13504,42 +13477,12 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
13504
13477
  });
13505
13478
  onMounted(() => {
13506
13479
  if (props2.modelValue) initialFormData.value = clone2(props2.modelValue);
13507
- refreshSchema();
13508
13480
  });
13509
13481
  watch(() => props2.modelValue, (val) => {
13510
13482
  if (val !== void 0) formData.value = clone2(val);
13511
13483
  }, { immediate: true, deep: true });
13512
- async function resolveSchema(schema) {
13513
- if (!schema) {
13514
- resolvedSchemaData.value = void 0;
13515
- schemaState.value = "loaded";
13516
- return;
13517
- }
13518
- try {
13519
- schemaState.value = "loading";
13520
- const isPromise = (obj) => obj && typeof obj.then === "function";
13521
- let result2;
13522
- if (typeof schema === "function") {
13523
- result2 = schema();
13524
- result2 = isPromise(result2) ? await result2 : result2;
13525
- } else {
13526
- result2 = isPromise(schema) ? await schema : schema;
13527
- }
13528
- resolvedSchemaData.value = result2;
13529
- schemaState.value = "loaded";
13530
- } catch (error) {
13531
- console.error("Schema error:", error);
13532
- schemaState.value = "error";
13533
- resolvedSchemaData.value = void 0;
13534
- }
13535
- }
13536
- async function refreshSchema() {
13537
- await resolveSchema(props2.schema);
13538
- return resolvedSchemaData.value;
13539
- }
13540
- watch(schemaRef, resolveSchema, { immediate: true, deep: true });
13541
- function updateFormData(fieldId, value) {
13542
- const keys4 = fieldId.split(".");
13484
+ function updateFormData({ fieldId, value }) {
13485
+ const keys4 = (fieldId == null ? void 0 : fieldId.split(".")) || [];
13543
13486
  const newData = clone2(formData.value);
13544
13487
  let current = newData;
13545
13488
  for (let i2 = 0; i2 < keys4.length - 1; i2++) {
@@ -13586,7 +13529,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
13586
13529
  onUpdateModelValue: (field, value) => {
13587
13530
  var _a;
13588
13531
  if (!field.id) return;
13589
- updateFormData(field.id, value);
13532
+ updateFormData({ fieldId: field.id, value });
13590
13533
  (_a = field.onUpdate) == null ? void 0 : _a.call(field, value, formData.value);
13591
13534
  }
13592
13535
  });
@@ -13595,10 +13538,10 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
13595
13538
  const input = event.target;
13596
13539
  if (input.name) {
13597
13540
  const value = input.type === "checkbox" ? input.checked : input.value;
13598
- updateFormData(input.name, value);
13541
+ updateFormData({ fieldId: input.name, value });
13599
13542
  }
13600
13543
  }
13601
- __expose({ form, isDirty, validateForm, resolveSchema, refreshSchema, checkValidity });
13544
+ __expose({ form, isDirty, validateForm, checkValidity });
13602
13545
  return (_ctx, _cache) => {
13603
13546
  return openBlock(), createElementBlock(Fragment, null, [
13604
13547
  formState.value !== "success" || !_ctx.$slots.success ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
@@ -13610,30 +13553,19 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
13610
13553
  onSubmit: withModifiers(handleSubmit, ["prevent"]),
13611
13554
  onInput: handleSlotInputChange
13612
13555
  }, [
13613
- schemaState.value === "loading" ? renderSlot(_ctx.$slots, "loading", { key: 0 }, () => [
13614
- createElementVNode("div", _hoisted_1$O, [
13615
- createVNode(unref(Loading))
13616
- ])
13617
- ]) : schemaState.value === "error" ? renderSlot(_ctx.$slots, "schema-error", { key: 1 }, () => [
13618
- _cache[0] || (_cache[0] = createElementVNode("div", { class: "flex-center h-300px txt-red" }, " Error loading form ", -1))
13619
- ]) : resolvedSchema.value ? (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(resolvedSchema.value, (field) => {
13556
+ resolvedSchema.value ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(resolvedSchema.value, (field) => {
13620
13557
  return openBlock(), createBlock(resolveDynamicComponent(renderSchemaField(field)), {
13621
13558
  key: field.id
13622
13559
  });
13623
- }), 128)) : renderSlot(_ctx.$slots, "default", { key: 3 }),
13560
+ }), 128)) : renderSlot(_ctx.$slots, "default", { key: 1 }),
13624
13561
  renderSlot(_ctx.$slots, "submit", {
13625
13562
  submit: handleSubmit,
13626
13563
  isDirty: isDirty.value,
13627
13564
  validateForm,
13628
- formState: formState.value,
13629
- schemaState: schemaState.value
13565
+ formState: formState.value
13630
13566
  })
13631
13567
  ], 34)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
13632
- schemaState.value === "loading" ? renderSlot(_ctx.$slots, "loading", { key: 0 }, () => [
13633
- createVNode(unref(Loading))
13634
- ]) : schemaState.value === "error" ? renderSlot(_ctx.$slots, "schema-error", { key: 1 }, () => [
13635
- _cache[1] || (_cache[1] = createElementVNode("div", { class: "flex-center h-300px txt-red" }, " Error loading form ", -1))
13636
- ]) : resolvedSchema.value ? (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(resolvedSchema.value, (field) => {
13568
+ resolvedSchema.value ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(resolvedSchema.value, (field) => {
13637
13569
  return openBlock(), createBlock(resolveDynamicComponent(renderSchemaField(field)), {
13638
13570
  key: field.id,
13639
13571
  class: normalizeClass(props2.class)
@@ -13700,11 +13632,11 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
13700
13632
  return isValid;
13701
13633
  }
13702
13634
  const computedSchema = computed(
13703
- () => useBglSchema({ schema: props2.schema })
13635
+ () => useBglSchema({ schema: toValue(props2.schema) })
13704
13636
  );
13705
13637
  const filteredSchema = computed(() => {
13706
13638
  const schema = computedSchema.value;
13707
- return schema.filter((step, index2) => {
13639
+ return schema.filter((step, _index) => {
13708
13640
  if (step.vIf !== void 0 || step["v-if"] !== void 0) {
13709
13641
  const condition = step.vIf ?? step["v-if"];
13710
13642
  if (typeof condition === "function") {
@@ -13926,7 +13858,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
13926
13858
  };
13927
13859
  }
13928
13860
  });
13929
- const BglMultiStepForm = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-9c0b618c"]]);
13861
+ const BglMultiStepForm = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-8f701fbc"]]);
13930
13862
  const _hoisted_1$M = {
13931
13863
  key: 0,
13932
13864
  class: "label mb-05"
@@ -13974,10 +13906,6 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
13974
13906
  const minimizedItems = ref([]);
13975
13907
  const internalData = ref(props2.modelValue || []);
13976
13908
  const schemaState = ref("loaded");
13977
- const resolvedSchemaData = ref([]);
13978
- watch(() => props2.modelValue, (newValue) => {
13979
- internalData.value = newValue || [];
13980
- }, { deep: true });
13981
13909
  const primitiveSchema = computed(() => {
13982
13910
  if (props2.type === "text") {
13983
13911
  return [{ id: "value", type: "text", label: "", $el: "text" }];
@@ -13986,36 +13914,13 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
13986
13914
  }
13987
13915
  return [];
13988
13916
  });
13989
- async function resolveSchema() {
13990
- if (props2.type !== "object") {
13991
- resolvedSchemaData.value = primitiveSchema.value;
13992
- schemaState.value = "loaded";
13993
- return;
13994
- }
13995
- if (!props2.schema) {
13996
- resolvedSchemaData.value = [];
13997
- schemaState.value = "loaded";
13998
- return;
13999
- }
14000
- try {
14001
- schemaState.value = "loading";
14002
- const isPromise = (obj) => obj && typeof obj.then === "function";
14003
- let result2;
14004
- if (typeof props2.schema === "function") {
14005
- result2 = props2.schema();
14006
- result2 = isPromise(result2) ? await result2 : result2;
14007
- } else {
14008
- result2 = isPromise(props2.schema) ? await props2.schema : props2.schema;
14009
- }
14010
- resolvedSchemaData.value = result2;
14011
- schemaState.value = "loaded";
14012
- } catch (error) {
14013
- console.error("Schema error:", error);
14014
- schemaState.value = "error";
14015
- resolvedSchemaData.value = [];
14016
- }
14017
- }
14018
- onMounted(resolveSchema);
13917
+ const resolvedSchemaData = computed(() => {
13918
+ if (props2.type !== "object") return primitiveSchema.value;
13919
+ return toValue(props2.schema);
13920
+ });
13921
+ watch(() => props2.modelValue, (newValue) => {
13922
+ internalData.value = newValue || [];
13923
+ }, { deep: true });
14019
13924
  function emitValue() {
14020
13925
  emit2("update:modelValue", internalData.value);
14021
13926
  }
@@ -14045,10 +13950,14 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
14045
13950
  }
14046
13951
  const isPrimitiveType = computed(() => props2.type === "text" || props2.type === "number");
14047
13952
  const canRenderItems = computed(
14048
- () => isPrimitiveType.value || props2.type === "object" && resolvedSchemaData.value.length > 0
13953
+ () => {
13954
+ var _a;
13955
+ return isPrimitiveType.value || props2.type === "object" && Number((_a = resolvedSchemaData.value) == null ? void 0 : _a.length) > 0;
13956
+ }
14049
13957
  );
14050
13958
  const showMinimizeButton = computed(() => {
14051
- return resolvedSchemaData.value.length > 2 || resolvedSchemaData.value.some((schema) => schema.$el === "richtext");
13959
+ var _a, _b;
13960
+ return Number((_a = resolvedSchemaData.value) == null ? void 0 : _a.length) > 2 || ((_b = resolvedSchemaData.value) == null ? void 0 : _b.some((schema) => schema.$el === "richtext"));
14052
13961
  });
14053
13962
  return (_ctx, _cache) => {
14054
13963
  return openBlock(), createElementBlock("div", {
@@ -14075,7 +13984,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
14075
13984
  minimizedItems.value[i2] ? (openBlock(), createElementBlock("p", _hoisted_5$j, toDisplayString(_ctx.label) + " " + toDisplayString(i2 + 1), 1)) : (openBlock(), createBlock(unref(_sfc_main$V), {
14076
13985
  key: 1,
14077
13986
  "model-value": isPrimitiveType.value ? { value: item } : item,
14078
- schema: resolvedSchemaData.value,
13987
+ schema: unref(resolvedSchemaData),
14079
13988
  "onUpdate:modelValue": (val) => updateItem(i2, val)
14080
13989
  }, null, 8, ["model-value", "schema", "onUpdate:modelValue"])),
14081
13990
  createElementVNode("div", _hoisted_6$f, [
@@ -18916,7 +18825,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
18916
18825
  });
18917
18826
  watch(() => editor.state.content, (newValue) => {
18918
18827
  var _a;
18919
- if ((_a = editor.state.doc) == null ? void 0 : _a.body.innerHTML) {
18828
+ if ((_a = editor.state.doc) == null ? void 0 : _a.body) {
18920
18829
  editor.state.doc.body.dir = hasRTL.value ? "rtl" : "ltr";
18921
18830
  }
18922
18831
  emit2("update:modelValue", newValue);
@@ -19004,7 +18913,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
19004
18913
  };
19005
18914
  }
19006
18915
  });
19007
- const RichText = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-2782b5dd"]]);
18916
+ const RichText = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-d643f2ae"]]);
19008
18917
  const _hoisted_1$t = { key: 0 };
19009
18918
  const _hoisted_2$j = { class: "flex gap-05" };
19010
18919
  const _hoisted_3$g = ["disabled"];
@@ -32557,8 +32466,9 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
32557
32466
  props: {
32558
32467
  icon: {},
32559
32468
  name: {},
32560
- size: {},
32469
+ size: { default: 1 },
32561
32470
  color: {},
32471
+ round: { type: Boolean },
32562
32472
  weight: {}
32563
32473
  },
32564
32474
  setup(__props) {
@@ -32573,9 +32483,15 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
32573
32483
  return (_ctx, _cache) => {
32574
32484
  return iconRenderType.value === "material" ? (openBlock(), createElementBlock("span", {
32575
32485
  key: 0,
32576
- class: "bgl_icon-font",
32577
- style: normalizeStyle({ "fontSize": `${_ctx.size}rem`, color: _ctx.color, "font-variation-settings": `'wght' ${_ctx.weight || 400}` })
32578
- }, toDisplayString(iconRender.value), 5)) : iconRenderType.value === "font-awesome" ? (openBlock(), createElementBlock("span", {
32486
+ class: normalizeClass(["bgl_icon-font", { "round flex aspect-ratio-1 justify-content-center": _ctx.round }]),
32487
+ style: normalizeStyle({
32488
+ "fontSize": `${_ctx.size}rem`,
32489
+ color: _ctx.color,
32490
+ "font-variation-settings": `'wght' ${_ctx.weight || 400}`,
32491
+ "width": _ctx.round ? `calc(${_ctx.size}rem * 2)` : "auto",
32492
+ "height": _ctx.round ? `calc(${_ctx.size}rem * 2)` : "auto"
32493
+ })
32494
+ }, toDisplayString(iconRender.value), 7)) : iconRenderType.value === "font-awesome" ? (openBlock(), createElementBlock("span", {
32579
32495
  key: 1,
32580
32496
  class: normalizeClass(["fa far bgl_icon-font", [`fa-${iconRender.value}`, { "fa-brands": isFaBrand.value }]]),
32581
32497
  style: normalizeStyle({ "fontSize": `${_ctx.size}rem`, color: _ctx.color, "font-variation-settings": `'wght' ${_ctx.weight || 400}` })
@@ -33807,7 +33723,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
33807
33723
  };
33808
33724
  }
33809
33725
  });
33810
- const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-1c0f6894"]]);
33726
+ const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-c62c6888"]]);
33811
33727
  const _hoisted_1$8 = { class: "full-nav" };
33812
33728
  const _hoisted_2$6 = { class: "nav-scroll" };
33813
33729
  const _hoisted_3$5 = { class: "nav-links-wrapper" };
@@ -36224,14 +36140,12 @@ function useValidateFieldValue(inputVal, getInput, validateFn, getFormData) {
36224
36140
  );
36225
36141
  }
36226
36142
  function useBglSchema({ schema, columns, data: data2 } = {}) {
36227
- let _schema = schema;
36228
- if (typeof _schema === "function") {
36229
- _schema = _schema();
36230
- }
36231
- if (_schema) {
36232
- return columns && columns.length > 0 ? _schema.filter((f2) => columns.includes(f2.id)) : _schema;
36143
+ const _schema = computed(() => toValue(schema));
36144
+ const _columns = computed(() => toValue(columns));
36145
+ if (_schema.value) {
36146
+ return _columns.value && _columns.value.length > 0 ? _schema.value.filter((f2) => _columns.value.includes(f2.id)) : _schema.value;
36233
36147
  }
36234
- return getFallbackSchema(data2, columns);
36148
+ return getFallbackSchema(data2, _columns.value);
36235
36149
  }
36236
36150
  function localRef(key, initialValue) {
36237
36151
  const storedValue = localStorage.getItem(key);