@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.cjs CHANGED
@@ -19,7 +19,7 @@ const _sfc_main$1g = /* @__PURE__ */ vue.defineComponent({
19
19
  };
20
20
  }
21
21
  });
22
- const _hoisted_1$13 = ["aria-expanded", "aria-controls"];
22
+ const _hoisted_1$12 = ["aria-expanded", "aria-controls"];
23
23
  const _hoisted_2$N = { class: "accordion-label" };
24
24
  const _hoisted_3$G = ["id", "aria-hidden"];
25
25
  const _sfc_main$1f = /* @__PURE__ */ vue.defineComponent({
@@ -96,7 +96,7 @@ const _sfc_main$1f = /* @__PURE__ */ vue.defineComponent({
96
96
  }, [
97
97
  vue.createVNode(vue.unref(_sfc_main$t), { icon: computedIcon.value }, null, 8, ["icon"])
98
98
  ], 2)) : vue.createCommentVNode("", true)
99
- ], 8, _hoisted_1$13),
99
+ ], 8, _hoisted_1$12),
100
100
  vue.createVNode(vue.Transition, { name: "expand" }, {
101
101
  default: vue.withCtx(() => [
102
102
  vue.unref(isOpen) ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -122,7 +122,7 @@ const _export_sfc = (sfc, props2) => {
122
122
  return target;
123
123
  };
124
124
  const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["__scopeId", "data-v-3334f637"]]);
125
- const _hoisted_1$12 = { class: "relative" };
125
+ const _hoisted_1$11 = { class: "relative" };
126
126
  const _sfc_main$1e = /* @__PURE__ */ vue.defineComponent({
127
127
  __name: "AddressSearch",
128
128
  emits: ["addressSelected"],
@@ -145,7 +145,7 @@ const _sfc_main$1e = /* @__PURE__ */ vue.defineComponent({
145
145
  (_a = suggestion.value) == null ? void 0 : _a.show();
146
146
  }
147
147
  return (_ctx, _cache) => {
148
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$12, [
148
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$11, [
149
149
  vue.createVNode(vue.unref(_sfc_main$Y), {
150
150
  ref_key: "suggestion",
151
151
  ref: suggestion,
@@ -181,7 +181,7 @@ const _sfc_main$1e = /* @__PURE__ */ vue.defineComponent({
181
181
  };
182
182
  }
183
183
  });
184
- const _hoisted_1$11 = {
184
+ const _hoisted_1$10 = {
185
185
  key: 1,
186
186
  class: "bgl_btn-flex"
187
187
  };
@@ -254,7 +254,7 @@ const _sfc_main$1d = /* @__PURE__ */ vue.defineComponent({
254
254
  key: 0,
255
255
  class: "h-100p",
256
256
  size: "15"
257
- })) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$11, [
257
+ })) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$10, [
258
258
  _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$t), {
259
259
  key: 0,
260
260
  icon: _ctx.icon,
@@ -279,7 +279,7 @@ const _sfc_main$1d = /* @__PURE__ */ vue.defineComponent({
279
279
  }
280
280
  });
281
281
  const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["__scopeId", "data-v-99c4aa53"]]);
282
- const _hoisted_1$10 = ["dismissable"];
282
+ const _hoisted_1$$ = ["dismissable"];
283
283
  const _hoisted_2$M = { class: "m-0" };
284
284
  const _sfc_main$1c = /* @__PURE__ */ vue.defineComponent({
285
285
  __name: "Alert",
@@ -319,12 +319,12 @@ const _sfc_main$1c = /* @__PURE__ */ vue.defineComponent({
319
319
  icon: "close",
320
320
  onClick: _cache[0] || (_cache[0] = ($event) => isDismissed.value = true)
321
321
  })
322
- ], 10, _hoisted_1$10)) : vue.createCommentVNode("", true);
322
+ ], 10, _hoisted_1$$)) : vue.createCommentVNode("", true);
323
323
  };
324
324
  }
325
325
  });
326
326
  const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["__scopeId", "data-v-15c4ee95"]]);
327
- const _hoisted_1$$ = ["src", "alt"];
327
+ const _hoisted_1$_ = ["src", "alt"];
328
328
  const _sfc_main$1b = /* @__PURE__ */ vue.defineComponent({
329
329
  __name: "Avatar",
330
330
  props: {
@@ -343,7 +343,7 @@ const _sfc_main$1b = /* @__PURE__ */ vue.defineComponent({
343
343
  key: 0,
344
344
  src: _ctx.src,
345
345
  alt: _ctx.name
346
- }, null, 8, _hoisted_1$$)) : (vue.openBlock(), vue.createElementBlock("p", {
346
+ }, null, 8, _hoisted_1$_)) : (vue.openBlock(), vue.createElementBlock("p", {
347
347
  key: 1,
348
348
  style: vue.normalizeStyle({ "line-height": `${_ctx.size}px`, "font-size": `calc(1.5rem * ${_ctx.size} / 50)` })
349
349
  }, vue.toDisplayString((_ctx.fallback || vue.unref(initials)(_ctx.name || "")).toUpperCase()), 5))
@@ -382,7 +382,7 @@ const _sfc_main$1a = /* @__PURE__ */ vue.defineComponent({
382
382
  }
383
383
  });
384
384
  const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["__scopeId", "data-v-689f051f"]]);
385
- const _hoisted_1$_ = ["src"];
385
+ const _hoisted_1$Z = ["src"];
386
386
  const _hoisted_2$L = ["autoplay", "muted", "loop", "controls", "playsinline"];
387
387
  const _hoisted_3$F = ["src", "type"];
388
388
  const _sfc_main$19 = /* @__PURE__ */ vue.defineComponent({
@@ -462,7 +462,7 @@ const _sfc_main$19 = /* @__PURE__ */ vue.defineComponent({
462
462
  allowfullscreen: "",
463
463
  title: "Video",
464
464
  allow: "autoplay"
465
- }, null, 12, _hoisted_1$_)) : _ctx.src ? (vue.openBlock(), vue.createElementBlock("video", {
465
+ }, null, 12, _hoisted_1$Z)) : _ctx.src ? (vue.openBlock(), vue.createElementBlock("video", {
466
466
  key: 1,
467
467
  ref_key: "video",
468
468
  ref: video,
@@ -549,7 +549,7 @@ const _sfc_main$18 = /* @__PURE__ */ vue.defineComponent({
549
549
  }
550
550
  });
551
551
  const CalendarPopover = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["__scopeId", "data-v-6f51f6b3"]]);
552
- const _hoisted_1$Z = { class: "agenda-view" };
552
+ const _hoisted_1$Y = { class: "agenda-view" };
553
553
  const _hoisted_2$K = ["data-date", "onClick"];
554
554
  const _hoisted_3$E = { class: "event-content" };
555
555
  const _hoisted_4$r = { class: "event-time" };
@@ -653,7 +653,7 @@ const _sfc_main$17 = /* @__PURE__ */ vue.defineComponent({
653
653
  }
654
654
  });
655
655
  return (_ctx, _cache) => {
656
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$Z, [
656
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$Y, [
657
657
  _cache[0] || (_cache[0] = vue.createElementVNode("div", { class: "agenda-header" }, [
658
658
  vue.createElementVNode("div", { class: "time-column" }, " Time "),
659
659
  vue.createElementVNode("div", { class: "event-column" }, " Event ")
@@ -691,7 +691,7 @@ const _sfc_main$17 = /* @__PURE__ */ vue.defineComponent({
691
691
  }
692
692
  });
693
693
  const AgendaView = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["__scopeId", "data-v-1e2b483b"]]);
694
- const _hoisted_1$Y = { class: "w-100p overflow-hidden m_overflow h-100p grid" };
694
+ const _hoisted_1$X = { class: "w-100p overflow-hidden m_overflow h-100p grid" };
695
695
  const _hoisted_2$J = { class: "border-bottom me-1 txt-center p-05 dayGrid" };
696
696
  const _hoisted_3$D = { class: "overflow h-100p pe-05" };
697
697
  const _hoisted_4$q = { class: "time-column" };
@@ -837,7 +837,7 @@ const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
837
837
  }
838
838
  });
839
839
  return (_ctx, _cache) => {
840
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$Y, [
840
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$X, [
841
841
  vue.createElementVNode("div", _hoisted_2$J, [
842
842
  _cache[0] || (_cache[0] = vue.createElementVNode("div", null, null, -1)),
843
843
  vue.createElementVNode("div", null, vue.toDisplayString(vue.unref(formatDate)(_ctx.startDate)), 1)
@@ -903,7 +903,7 @@ const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
903
903
  }
904
904
  });
905
905
  const DayView = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["__scopeId", "data-v-8b1a770f"]]);
906
- const _hoisted_1$X = { class: "month-view" };
906
+ const _hoisted_1$W = { class: "month-view" };
907
907
  const _hoisted_2$I = { class: "month-header" };
908
908
  const _hoisted_3$C = { class: "month-grid" };
909
909
  const _hoisted_4$p = { class: "day-number" };
@@ -989,7 +989,7 @@ const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
989
989
  }
990
990
  }
991
991
  return (_ctx, _cache) => {
992
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$X, [
992
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$W, [
993
993
  vue.createElementVNode("div", _hoisted_2$I, [
994
994
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(weekDays.value, (day) => {
995
995
  return vue.openBlock(), vue.createElementBlock("div", {
@@ -1032,7 +1032,7 @@ const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
1032
1032
  }
1033
1033
  });
1034
1034
  const MonthView = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-0b1117c4"]]);
1035
- const _hoisted_1$W = { class: "w-100p overflow-hidden m_overflow h-100p grid" };
1035
+ const _hoisted_1$V = { class: "w-100p overflow-hidden m_overflow h-100p grid" };
1036
1036
  const _hoisted_2$H = { class: "overflow h-100p pe-05" };
1037
1037
  const _hoisted_3$B = ["onMousedown"];
1038
1038
  const _hoisted_4$o = ["onClick"];
@@ -1296,7 +1296,7 @@ const _sfc_main$14 = /* @__PURE__ */ vue.defineComponent({
1296
1296
  }
1297
1297
  });
1298
1298
  return (_ctx, _cache) => {
1299
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$W, [
1299
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$V, [
1300
1300
  vue.createElementVNode("div", {
1301
1301
  ref_key: "calendarGrid",
1302
1302
  ref: calendarGrid,
@@ -1395,7 +1395,7 @@ const _sfc_main$14 = /* @__PURE__ */ vue.defineComponent({
1395
1395
  }
1396
1396
  });
1397
1397
  const WeekView = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["__scopeId", "data-v-2d5bca17"]]);
1398
- const _hoisted_1$V = { class: "calendar" };
1398
+ const _hoisted_1$U = { class: "calendar" };
1399
1399
  const _hoisted_2$G = { class: "flex m_block m_pb-1" };
1400
1400
  const _hoisted_3$A = { class: "txt-light my-0" };
1401
1401
  const _hoisted_4$n = { class: "ms-auto flex gap-025" };
@@ -1491,7 +1491,7 @@ const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent({
1491
1491
  emit2("ready", state2.value);
1492
1492
  });
1493
1493
  return (_ctx, _cache) => {
1494
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$V, [
1494
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$U, [
1495
1495
  vue.createElementVNode("div", _hoisted_2$G, [
1496
1496
  vue.createElementVNode("h3", _hoisted_3$A, [
1497
1497
  vue.createElementVNode("b", null, vue.toDisplayString(vue.unref(fmtDate)(currentDate.value, { fmt: "MMMM" })), 1),
@@ -1570,7 +1570,7 @@ const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent({
1570
1570
  }
1571
1571
  });
1572
1572
  const Index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-840b6594"]]);
1573
- const _hoisted_1$U = {
1573
+ const _hoisted_1$T = {
1574
1574
  key: 0,
1575
1575
  class: "card_label"
1576
1576
  };
@@ -1603,7 +1603,7 @@ const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({
1603
1603
  }])
1604
1604
  }, {
1605
1605
  default: vue.withCtx(() => [
1606
- _ctx.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$U, vue.toDisplayString(_ctx.label), 1)) : vue.createCommentVNode("", true),
1606
+ _ctx.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$T, vue.toDisplayString(_ctx.label), 1)) : vue.createCommentVNode("", true),
1607
1607
  vue.renderSlot(_ctx.$slots, "default")
1608
1608
  ]),
1609
1609
  _: 3
@@ -1613,7 +1613,7 @@ const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({
1613
1613
  };
1614
1614
  }
1615
1615
  });
1616
- const _hoisted_1$T = ["dir"];
1616
+ const _hoisted_1$S = ["dir"];
1617
1617
  const _hoisted_2$F = {
1618
1618
  key: 0,
1619
1619
  class: "dots"
@@ -2086,7 +2086,7 @@ const _sfc_main$11 = /* @__PURE__ */ vue.defineComponent({
2086
2086
  }, void 0, true)
2087
2087
  ])
2088
2088
  ], 2)
2089
- ], 8, _hoisted_1$T);
2089
+ ], 8, _hoisted_1$S);
2090
2090
  };
2091
2091
  }
2092
2092
  });
@@ -8034,13 +8034,13 @@ var script = vue.defineComponent({
8034
8034
  return { bar, canvas, direction, mouse };
8035
8035
  }
8036
8036
  });
8037
- const _hoisted_1$S = {
8037
+ const _hoisted_1$R = {
8038
8038
  key: 0,
8039
8039
  class: "layer-hover-bar"
8040
8040
  };
8041
8041
  const _hoisted_2$E = ["x", "y", "width", "height"];
8042
8042
  function render(_ctx, _cache, $props, $setup, $data, $options) {
8043
- return _ctx.mouse.hover ? (vue.openBlock(), vue.createElementBlock("g", _hoisted_1$S, [
8043
+ return _ctx.mouse.hover ? (vue.openBlock(), vue.createElementBlock("g", _hoisted_1$R, [
8044
8044
  vue.createElementVNode("rect", vue.mergeProps({ class: "hover-bar" }, _ctx.barStyle, {
8045
8045
  x: _ctx.bar.x,
8046
8046
  y: _ctx.bar.y,
@@ -8241,7 +8241,7 @@ ${indent}}`;
8241
8241
  return typeof field.$el === "object" ? field.$el : componentMap[field.$el] ?? field.$el ?? "div";
8242
8242
  }
8243
8243
  function renderChild(child, slots) {
8244
- if (typeof child === "string") return child;
8244
+ if (typeof child === "string") return vue.h(child);
8245
8245
  if (vue.isVNode(child)) return child;
8246
8246
  return renderField(
8247
8247
  child,
@@ -8249,8 +8249,9 @@ ${indent}}`;
8249
8249
  );
8250
8250
  }
8251
8251
  function renderField(field, slots) {
8252
+ var _a;
8252
8253
  const Component = getComponent(field);
8253
- if (!Component) return null;
8254
+ if (!Component) return;
8254
8255
  const rowData = (getFormData == null ? void 0 : getFormData()) || {};
8255
8256
  const condition = field.vIf ?? field["v-if"];
8256
8257
  if (condition !== void 0) {
@@ -8259,14 +8260,14 @@ ${indent}}`;
8259
8260
  field.id ? rowData == null ? void 0 : rowData[field.id] : void 0,
8260
8261
  rowData
8261
8262
  )) {
8262
- return null;
8263
+ return;
8263
8264
  }
8264
8265
  } else if (typeof condition === "string") {
8265
8266
  if (!(rowData == null ? void 0 : rowData[condition])) {
8266
- return null;
8267
+ return;
8267
8268
  }
8268
8269
  } else if (!condition) {
8269
- return null;
8270
+ return;
8270
8271
  }
8271
8272
  }
8272
8273
  const {
@@ -8345,23 +8346,24 @@ ${indent}}`;
8345
8346
  Object.entries(fieldSlots).forEach(([name, slot]) => {
8346
8347
  componentSlots[name] = () => {
8347
8348
  if (Array.isArray(slot)) {
8348
- return slot.map((schemaField) => renderField(schemaField, slots));
8349
- }
8350
- if (vue.isVNode(slot)) {
8351
- return slot;
8352
- }
8353
- if (typeof slot === "function") {
8354
- const slotFn = slot;
8355
- return slotFn({ row: rowData, field });
8349
+ return slot.map((schemaField) => {
8350
+ if (typeof schemaField === "function") {
8351
+ const slotFn = schemaField;
8352
+ return slotFn({ row: rowData, field });
8353
+ }
8354
+ if (vue.isVNode(schemaField)) {
8355
+ return schemaField;
8356
+ }
8357
+ return renderField(schemaField, slots);
8358
+ });
8356
8359
  }
8357
- return slot;
8358
8360
  };
8359
8361
  });
8360
8362
  }
8361
- const slotContent = field.id && (slots == null ? void 0 : slots[field.id]) ? slots[field.id]({ row: rowData, field }) : void 0;
8363
+ const slotContent = field.id ? (_a = slots == null ? void 0 : slots[field.id]) == null ? void 0 : _a.call(slots, { row: rowData, field }) : void 0;
8362
8364
  if (mode === "preview") {
8363
8365
  if (!includeUnset && (transformedValue === void 0 || transformedValue === null || transformedValue.length === 0)) {
8364
- return null;
8366
+ return;
8365
8367
  }
8366
8368
  return vue.h("div", { class: "preview-field" }, [
8367
8369
  vue.h("div", { class: "field-label" }, `${field.label || keyToLabel(field.id || "")}:`),
@@ -8385,27 +8387,13 @@ function useTableData(options) {
8385
8387
  const sortDirection = vue.ref("ASC");
8386
8388
  const schemaState = vue.ref("loading");
8387
8389
  const resolvedSchema = vue.ref([]);
8388
- function getValue(value) {
8389
- if (value === void 0 || value === null) {
8390
- return void 0;
8391
- }
8392
- try {
8393
- if (value && typeof value === "object" && "value" in value) {
8394
- return value.value;
8395
- }
8396
- return value;
8397
- } catch (error) {
8398
- console.error("Error in getValue:", error);
8399
- return void 0;
8400
- }
8401
- }
8402
- async function resolveSchemaAsync() {
8390
+ function resolveSchema() {
8403
8391
  try {
8404
8392
  schemaState.value = "loading";
8405
8393
  const dataValue = options.data.value || [];
8406
8394
  const schema = useBglSchema({
8407
- schema: await getValue(options.schema),
8408
- columns: getValue(options.columns),
8395
+ schema: options.schema,
8396
+ columns: options.columns,
8409
8397
  data: dataValue
8410
8398
  });
8411
8399
  if (Array.isArray(schema) && schema.length > 0) {
@@ -8414,6 +8402,7 @@ function useTableData(options) {
8414
8402
  const firstItem = dataValue[0];
8415
8403
  resolvedSchema.value = Object.keys(firstItem || {}).filter((key) => key !== "id" && !key.startsWith("_")).map((key) => ({
8416
8404
  id: key,
8405
+ // Cast to any to resolve type issues with Path<T>
8417
8406
  label: keyToLabel(key),
8418
8407
  $el: "div",
8419
8408
  transform: (val) => {
@@ -8433,15 +8422,12 @@ function useTableData(options) {
8433
8422
  }
8434
8423
  }
8435
8424
  vue.watch([
8436
- () => getValue(options.schema),
8437
- () => getValue(options.columns),
8438
- () => options.data.value
8425
+ options.schema || vue.toRef({}),
8426
+ options.columns || vue.toRef([]),
8427
+ options.data
8439
8428
  ], () => {
8440
- resolveSchemaAsync();
8429
+ resolveSchema();
8441
8430
  }, { immediate: true });
8442
- vue.onMounted(() => {
8443
- resolveSchemaAsync();
8444
- });
8445
8431
  const computedSchema = vue.computed(() => resolvedSchema.value);
8446
8432
  function transform(rowData) {
8447
8433
  const transformed = { ...rowData };
@@ -8482,8 +8468,8 @@ function useTableData(options) {
8482
8468
  if (!Array.isArray(currentData) || currentData.length === 0) {
8483
8469
  return [];
8484
8470
  }
8485
- const useServerSortValue = getValue(options.useServerSort);
8486
- if (!sortField.value || useServerSortValue === true) {
8471
+ const useServerSortValue = vue.computed(() => vue.toValue(options.useServerSort));
8472
+ if (!sortField.value || useServerSortValue.value === true) {
8487
8473
  return currentData.map(transform);
8488
8474
  }
8489
8475
  return currentData.map(transform).sort((a2, z2) => {
@@ -8528,7 +8514,7 @@ function useTableData(options) {
8528
8514
  schemaState: vue.computed(() => schemaState.value)
8529
8515
  };
8530
8516
  }
8531
- const _hoisted_1$R = { class: "data-preview" };
8517
+ const _hoisted_1$Q = { class: "data-preview" };
8532
8518
  const _hoisted_2$D = {
8533
8519
  key: 1,
8534
8520
  class: "empty-preview"
@@ -8536,13 +8522,13 @@ const _hoisted_2$D = {
8536
8522
  const _sfc_main$$ = /* @__PURE__ */ vue.defineComponent({
8537
8523
  __name: "DataPreview",
8538
8524
  props: {
8539
- schema: { type: Function },
8525
+ modelValue: {},
8526
+ includeUnset: { type: Boolean },
8527
+ schema: {},
8540
8528
  columns: {},
8541
- useServerSort: { type: Boolean },
8529
+ useServerSort: {},
8542
8530
  selectable: { type: Boolean },
8543
- onLastItemVisible: { type: Function },
8544
- modelValue: {},
8545
- includeUnset: { type: Boolean }
8531
+ onLastItemVisible: { type: Function }
8546
8532
  },
8547
8533
  setup(__props) {
8548
8534
  const props2 = __props;
@@ -8575,7 +8561,7 @@ const _sfc_main$$ = /* @__PURE__ */ vue.defineComponent({
8575
8561
  onUpdateModelValue: void 0
8576
8562
  });
8577
8563
  return (_ctx, _cache) => {
8578
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$R, [
8564
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$Q, [
8579
8565
  vue.unref(computedSchema) && vue.unref(computedSchema).length > 0 ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(vue.unref(computedSchema), (field) => {
8580
8566
  return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(renderField)(field, vue.unref(slots))), {
8581
8567
  key: field.id
@@ -8585,7 +8571,7 @@ const _sfc_main$$ = /* @__PURE__ */ vue.defineComponent({
8585
8571
  };
8586
8572
  }
8587
8573
  });
8588
- const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-430b1998"]]);
8574
+ const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-d084907a"]]);
8589
8575
  function useTableSelection(options) {
8590
8576
  const allSelectorEl = vue.ref();
8591
8577
  const computedSelectedItems = vue.computed(() => options.selectedItems.value);
@@ -9502,12 +9488,7 @@ function useTableVirtualization(options) {
9502
9488
  await until(() => lastItemEl.value).toBeTruthy();
9503
9489
  useIntersectionObserver(lastItemEl, ([entry]) => {
9504
9490
  var _a;
9505
- let dataLength = 0;
9506
- if (vue.isRef(options.data) && options.data.value) {
9507
- dataLength = Array.isArray(options.data.value) ? options.data.value.length : 0;
9508
- } else if (Array.isArray(options.data)) {
9509
- dataLength = options.data.length;
9510
- }
9491
+ const dataLength = vue.toValue(options.data).length || 0;
9511
9492
  if (entry.isIntersecting && dataLength > 0) {
9512
9493
  (_a = options.onLastItemVisible) == null ? void 0 : _a.call(options);
9513
9494
  }
@@ -9522,30 +9503,26 @@ function useTableVirtualization(options) {
9522
9503
  registerLastItemObserver
9523
9504
  };
9524
9505
  }
9525
- const _hoisted_1$Q = {
9506
+ const _hoisted_1$P = {
9526
9507
  key: 0,
9527
9508
  class: "loading-table-wrapper z-99 h-100 w-100 absolute inset"
9528
9509
  };
9529
- const _hoisted_2$C = {
9530
- key: 1,
9531
- class: "flex-center h-300px txt-red"
9532
- };
9533
- const _hoisted_3$x = { class: "infinite-wrapper" };
9534
- const _hoisted_4$l = { class: "row first-row" };
9535
- const _hoisted_5$l = { key: 0 };
9536
- const _hoisted_6$h = ["onClick"];
9537
- const _hoisted_7$d = { class: "flex" };
9538
- const _hoisted_8$8 = ["onClick"];
9539
- const _hoisted_9$5 = { key: 0 };
9540
- const _hoisted_10$5 = ["value"];
9541
- const _hoisted_11$5 = { key: 1 };
9510
+ const _hoisted_2$C = { class: "infinite-wrapper" };
9511
+ const _hoisted_3$x = { class: "row first-row" };
9512
+ const _hoisted_4$l = { key: 0 };
9513
+ const _hoisted_5$l = ["onClick"];
9514
+ const _hoisted_6$h = { class: "flex" };
9515
+ const _hoisted_7$d = ["onClick"];
9516
+ const _hoisted_8$8 = { key: 0 };
9517
+ const _hoisted_9$5 = ["value"];
9518
+ const _hoisted_10$5 = { key: 1 };
9542
9519
  const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({
9543
9520
  __name: "DataTable",
9544
9521
  props: /* @__PURE__ */ vue.mergeModels({
9545
9522
  data: {},
9546
- schema: { type: Function },
9523
+ schema: {},
9547
9524
  columns: {},
9548
- useServerSort: { type: Boolean },
9525
+ useServerSort: {},
9549
9526
  selectable: { type: Boolean },
9550
9527
  onLastItemVisible: { type: Function }
9551
9528
  }, {
@@ -9559,7 +9536,7 @@ const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({
9559
9536
  emits: /* @__PURE__ */ vue.mergeModels(["orderBy", "select", "lastItemVisible"], ["update:loading", "update:itemHeight", "update:selectedItems"]),
9560
9537
  setup(__props, { emit: __emit }) {
9561
9538
  vue.useCssVars((_ctx) => ({
9562
- "18d61d81": vue.unref(computedItemHeight)
9539
+ "6f015429": vue.unref(computedItemHeight)
9563
9540
  }));
9564
9541
  const props2 = __props;
9565
9542
  const emit2 = __emit;
@@ -9577,8 +9554,7 @@ const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({
9577
9554
  sortField,
9578
9555
  sortDirection,
9579
9556
  toggleSort,
9580
- cleanTransformedData,
9581
- schemaState
9557
+ cleanTransformedData
9582
9558
  } = useTableData({
9583
9559
  data: data2,
9584
9560
  schema,
@@ -9655,20 +9631,20 @@ const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({
9655
9631
  scrollTo(0);
9656
9632
  }
9657
9633
  );
9658
- const showLoading = vue.computed(() => loading.value || schemaState.value === "loading");
9634
+ const showLoading = vue.computed(() => loading.value);
9659
9635
  return (_ctx, _cache) => {
9660
9636
  return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ class: "table-list-wrap h-100" }, vue.unref(containerProps), {
9661
9637
  class: { "loading-table": showLoading.value }
9662
9638
  }), [
9663
- showLoading.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$Q, _cache[4] || (_cache[4] = [
9639
+ showLoading.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$P, _cache[4] || (_cache[4] = [
9664
9640
  vue.createElementVNode("div", { class: "loading-table-animation fixed oval top-7" }, null, -1)
9665
- ]))) : vue.unref(schemaState) === "error" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$C, " Error loading table schema ")) : vue.createCommentVNode("", true),
9641
+ ]))) : vue.createCommentVNode("", true),
9666
9642
  vue.createElementVNode("div", vue.mergeProps(vue.unref(wrapperProps), {
9667
9643
  class: { "pointer-events-none": showLoading.value }
9668
9644
  }), [
9669
- vue.createElementVNode("table", _hoisted_3$x, [
9670
- vue.createElementVNode("thead", _hoisted_4$l, [
9671
- vue.unref(isSelectable) ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_5$l, [
9645
+ vue.createElementVNode("table", _hoisted_2$C, [
9646
+ vue.createElementVNode("thead", _hoisted_3$x, [
9647
+ vue.unref(isSelectable) ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_4$l, [
9672
9648
  vue.createElementVNode("input", {
9673
9649
  ref_key: "allSelectorEl",
9674
9650
  ref: allSelectorEl,
@@ -9684,7 +9660,7 @@ const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({
9684
9660
  class: "col",
9685
9661
  onClick: ($event) => vue.unref(toggleSort)((field == null ? void 0 : field.id) || "")
9686
9662
  }, [
9687
- vue.createElementVNode("div", _hoisted_7$d, [
9663
+ vue.createElementVNode("div", _hoisted_6$h, [
9688
9664
  vue.createTextVNode(vue.toDisplayString(field.label || vue.unref(keyToLabel)(field == null ? void 0 : field.id)) + " ", 1),
9689
9665
  vue.createElementVNode("div", {
9690
9666
  class: vue.normalizeClass(["list-arrows", { sorted: vue.unref(sortField) === (field == null ? void 0 : field.id) }])
@@ -9695,7 +9671,7 @@ const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({
9695
9671
  }, null, 8, ["class"])
9696
9672
  ], 2)
9697
9673
  ])
9698
- ], 8, _hoisted_6$h);
9674
+ ], 8, _hoisted_5$l);
9699
9675
  }), 128))
9700
9676
  ]),
9701
9677
  vue.createElementVNode("tbody", null, [
@@ -9705,7 +9681,7 @@ const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({
9705
9681
  class: vue.normalizeClass(["row row-item position-relative", { selected: (row == null ? void 0 : row.id) && vue.unref(computedSelectedItems).includes(row.id) }]),
9706
9682
  onClick: ($event) => vue.unref(toggleSelectItem)(row)
9707
9683
  }, [
9708
- vue.unref(isSelectable) ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_9$5, [
9684
+ vue.unref(isSelectable) ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_8$8, [
9709
9685
  vue.createElementVNode("div", {
9710
9686
  onClick: _cache[3] || (_cache[3] = vue.withModifiers(() => {
9711
9687
  }, ["stop"]))
@@ -9714,26 +9690,27 @@ const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({
9714
9690
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => selectedItems.value = $event),
9715
9691
  type: "checkbox",
9716
9692
  value: (row == null ? void 0 : row.id) || ""
9717
- }, null, 8, _hoisted_10$5), [
9693
+ }, null, 8, _hoisted_9$5), [
9718
9694
  [vue.vModelCheckbox, selectedItems.value]
9719
9695
  ])
9720
9696
  ])
9721
9697
  ])) : vue.createCommentVNode("", true),
9722
9698
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(computedSchema), (field) => {
9699
+ var _a;
9723
9700
  return vue.openBlock(), vue.createElementBlock("td", {
9724
9701
  key: `${field.id}-${(row == null ? void 0 : row.id) || Math.random()}`,
9725
9702
  class: "col"
9726
9703
  }, [
9727
- field.id && vue.unref(slots)[field.id] ? vue.renderSlot(_ctx.$slots, field.id, {
9704
+ field.id && ((_a = vue.unref(slots)) == null ? void 0 : _a[field.id]) ? vue.renderSlot(_ctx.$slots, field.id, {
9728
9705
  key: 0,
9729
9706
  row,
9730
9707
  field
9731
- }, void 0, true) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$5, [
9708
+ }, void 0, true) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_10$5, [
9732
9709
  (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(renderFieldForRow(field, row))))
9733
9710
  ]))
9734
9711
  ]);
9735
9712
  }), 128))
9736
- ], 10, _hoisted_8$8);
9713
+ ], 10, _hoisted_7$d);
9737
9714
  }), 128)),
9738
9715
  props2.onLastItemVisible !== void 0 ? (vue.openBlock(), vue.createElementBlock("tr", {
9739
9716
  key: 0,
@@ -9748,7 +9725,7 @@ const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({
9748
9725
  };
9749
9726
  }
9750
9727
  });
9751
- const DataTable = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-382d1c94"]]);
9728
+ const DataTable = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-b10460ed"]]);
9752
9729
  function useDraggable(options = {}) {
9753
9730
  const isDragging = vue.ref(false);
9754
9731
  const dragElement = vue.ref(null);
@@ -12937,7 +12914,7 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
12937
12914
  };
12938
12915
  }
12939
12916
  });
12940
- const _hoisted_1$P = { class: "px-1 pt-025 pb-1" };
12917
+ const _hoisted_1$O = { class: "px-1 pt-025 pb-1" };
12941
12918
  const _hoisted_2$B = { class: "ms-1" };
12942
12919
  const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
12943
12920
  __name: "FieldSetVue",
@@ -12947,7 +12924,7 @@ const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
12947
12924
  },
12948
12925
  setup(__props) {
12949
12926
  return (_ctx, _cache) => {
12950
- return vue.openBlock(), vue.createElementBlock("fieldset", _hoisted_1$P, [
12927
+ return vue.openBlock(), vue.createElementBlock("fieldset", _hoisted_1$O, [
12951
12928
  vue.createElementVNode("legend", _hoisted_2$B, vue.toDisplayString(_ctx.legend || _ctx.label), 1),
12952
12929
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
12953
12930
  ]);
@@ -13474,7 +13451,6 @@ function getNestedValue(obj, path, defaultValue = void 0) {
13474
13451
  }
13475
13452
  return current ?? defaultValue;
13476
13453
  }
13477
- const _hoisted_1$O = { class: "flex-center h-300px" };
13478
13454
  const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
13479
13455
  __name: "BagelForm",
13480
13456
  props: {
@@ -13493,10 +13469,7 @@ const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
13493
13469
  const formData = vue.ref(clone2(props2.modelValue ?? {}));
13494
13470
  const initialFormData = vue.ref(clone2(props2.modelValue ?? {}));
13495
13471
  const formState = vue.ref("idle");
13496
- const schemaState = vue.ref("loaded");
13497
- const resolvedSchemaData = vue.ref();
13498
- const schemaRef = vue.toRef(props2, "schema");
13499
- const resolvedSchema = vue.computed(() => resolvedSchemaData.value);
13472
+ const resolvedSchema = vue.computed(() => vue.toValue(props2.schema));
13500
13473
  const isDirty = vue.computed(() => {
13501
13474
  try {
13502
13475
  return JSON.stringify(formData.value) !== JSON.stringify(initialFormData.value);
@@ -13506,42 +13479,12 @@ const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
13506
13479
  });
13507
13480
  vue.onMounted(() => {
13508
13481
  if (props2.modelValue) initialFormData.value = clone2(props2.modelValue);
13509
- refreshSchema();
13510
13482
  });
13511
13483
  vue.watch(() => props2.modelValue, (val) => {
13512
13484
  if (val !== void 0) formData.value = clone2(val);
13513
13485
  }, { immediate: true, deep: true });
13514
- async function resolveSchema(schema) {
13515
- if (!schema) {
13516
- resolvedSchemaData.value = void 0;
13517
- schemaState.value = "loaded";
13518
- return;
13519
- }
13520
- try {
13521
- schemaState.value = "loading";
13522
- const isPromise = (obj) => obj && typeof obj.then === "function";
13523
- let result2;
13524
- if (typeof schema === "function") {
13525
- result2 = schema();
13526
- result2 = isPromise(result2) ? await result2 : result2;
13527
- } else {
13528
- result2 = isPromise(schema) ? await schema : schema;
13529
- }
13530
- resolvedSchemaData.value = result2;
13531
- schemaState.value = "loaded";
13532
- } catch (error) {
13533
- console.error("Schema error:", error);
13534
- schemaState.value = "error";
13535
- resolvedSchemaData.value = void 0;
13536
- }
13537
- }
13538
- async function refreshSchema() {
13539
- await resolveSchema(props2.schema);
13540
- return resolvedSchemaData.value;
13541
- }
13542
- vue.watch(schemaRef, resolveSchema, { immediate: true, deep: true });
13543
- function updateFormData(fieldId, value) {
13544
- const keys4 = fieldId.split(".");
13486
+ function updateFormData({ fieldId, value }) {
13487
+ const keys4 = (fieldId == null ? void 0 : fieldId.split(".")) || [];
13545
13488
  const newData = clone2(formData.value);
13546
13489
  let current = newData;
13547
13490
  for (let i2 = 0; i2 < keys4.length - 1; i2++) {
@@ -13588,7 +13531,7 @@ const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
13588
13531
  onUpdateModelValue: (field, value) => {
13589
13532
  var _a;
13590
13533
  if (!field.id) return;
13591
- updateFormData(field.id, value);
13534
+ updateFormData({ fieldId: field.id, value });
13592
13535
  (_a = field.onUpdate) == null ? void 0 : _a.call(field, value, formData.value);
13593
13536
  }
13594
13537
  });
@@ -13597,10 +13540,10 @@ const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
13597
13540
  const input = event.target;
13598
13541
  if (input.name) {
13599
13542
  const value = input.type === "checkbox" ? input.checked : input.value;
13600
- updateFormData(input.name, value);
13543
+ updateFormData({ fieldId: input.name, value });
13601
13544
  }
13602
13545
  }
13603
- __expose({ form, isDirty, validateForm, resolveSchema, refreshSchema, checkValidity });
13546
+ __expose({ form, isDirty, validateForm, checkValidity });
13604
13547
  return (_ctx, _cache) => {
13605
13548
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
13606
13549
  formState.value !== "success" || !_ctx.$slots.success ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
@@ -13612,30 +13555,19 @@ const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
13612
13555
  onSubmit: vue.withModifiers(handleSubmit, ["prevent"]),
13613
13556
  onInput: handleSlotInputChange
13614
13557
  }, [
13615
- schemaState.value === "loading" ? vue.renderSlot(_ctx.$slots, "loading", { key: 0 }, () => [
13616
- vue.createElementVNode("div", _hoisted_1$O, [
13617
- vue.createVNode(vue.unref(Loading))
13618
- ])
13619
- ]) : schemaState.value === "error" ? vue.renderSlot(_ctx.$slots, "schema-error", { key: 1 }, () => [
13620
- _cache[0] || (_cache[0] = vue.createElementVNode("div", { class: "flex-center h-300px txt-red" }, " Error loading form ", -1))
13621
- ]) : resolvedSchema.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 2 }, vue.renderList(resolvedSchema.value, (field) => {
13558
+ resolvedSchema.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(resolvedSchema.value, (field) => {
13622
13559
  return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(renderSchemaField(field)), {
13623
13560
  key: field.id
13624
13561
  });
13625
- }), 128)) : vue.renderSlot(_ctx.$slots, "default", { key: 3 }),
13562
+ }), 128)) : vue.renderSlot(_ctx.$slots, "default", { key: 1 }),
13626
13563
  vue.renderSlot(_ctx.$slots, "submit", {
13627
13564
  submit: handleSubmit,
13628
13565
  isDirty: isDirty.value,
13629
13566
  validateForm,
13630
- formState: formState.value,
13631
- schemaState: schemaState.value
13567
+ formState: formState.value
13632
13568
  })
13633
13569
  ], 34)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
13634
- schemaState.value === "loading" ? vue.renderSlot(_ctx.$slots, "loading", { key: 0 }, () => [
13635
- vue.createVNode(vue.unref(Loading))
13636
- ]) : schemaState.value === "error" ? vue.renderSlot(_ctx.$slots, "schema-error", { key: 1 }, () => [
13637
- _cache[1] || (_cache[1] = vue.createElementVNode("div", { class: "flex-center h-300px txt-red" }, " Error loading form ", -1))
13638
- ]) : resolvedSchema.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 2 }, vue.renderList(resolvedSchema.value, (field) => {
13570
+ resolvedSchema.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(resolvedSchema.value, (field) => {
13639
13571
  return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(renderSchemaField(field)), {
13640
13572
  key: field.id,
13641
13573
  class: vue.normalizeClass(props2.class)
@@ -13702,11 +13634,11 @@ const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({
13702
13634
  return isValid;
13703
13635
  }
13704
13636
  const computedSchema = vue.computed(
13705
- () => useBglSchema({ schema: props2.schema })
13637
+ () => useBglSchema({ schema: vue.toValue(props2.schema) })
13706
13638
  );
13707
13639
  const filteredSchema = vue.computed(() => {
13708
13640
  const schema = computedSchema.value;
13709
- return schema.filter((step, index2) => {
13641
+ return schema.filter((step, _index) => {
13710
13642
  if (step.vIf !== void 0 || step["v-if"] !== void 0) {
13711
13643
  const condition = step.vIf ?? step["v-if"];
13712
13644
  if (typeof condition === "function") {
@@ -13928,7 +13860,7 @@ const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({
13928
13860
  };
13929
13861
  }
13930
13862
  });
13931
- const BglMultiStepForm = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-9c0b618c"]]);
13863
+ const BglMultiStepForm = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-8f701fbc"]]);
13932
13864
  const _hoisted_1$M = {
13933
13865
  key: 0,
13934
13866
  class: "label mb-05"
@@ -13976,10 +13908,6 @@ const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
13976
13908
  const minimizedItems = vue.ref([]);
13977
13909
  const internalData = vue.ref(props2.modelValue || []);
13978
13910
  const schemaState = vue.ref("loaded");
13979
- const resolvedSchemaData = vue.ref([]);
13980
- vue.watch(() => props2.modelValue, (newValue) => {
13981
- internalData.value = newValue || [];
13982
- }, { deep: true });
13983
13911
  const primitiveSchema = vue.computed(() => {
13984
13912
  if (props2.type === "text") {
13985
13913
  return [{ id: "value", type: "text", label: "", $el: "text" }];
@@ -13988,36 +13916,13 @@ const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
13988
13916
  }
13989
13917
  return [];
13990
13918
  });
13991
- async function resolveSchema() {
13992
- if (props2.type !== "object") {
13993
- resolvedSchemaData.value = primitiveSchema.value;
13994
- schemaState.value = "loaded";
13995
- return;
13996
- }
13997
- if (!props2.schema) {
13998
- resolvedSchemaData.value = [];
13999
- schemaState.value = "loaded";
14000
- return;
14001
- }
14002
- try {
14003
- schemaState.value = "loading";
14004
- const isPromise = (obj) => obj && typeof obj.then === "function";
14005
- let result2;
14006
- if (typeof props2.schema === "function") {
14007
- result2 = props2.schema();
14008
- result2 = isPromise(result2) ? await result2 : result2;
14009
- } else {
14010
- result2 = isPromise(props2.schema) ? await props2.schema : props2.schema;
14011
- }
14012
- resolvedSchemaData.value = result2;
14013
- schemaState.value = "loaded";
14014
- } catch (error) {
14015
- console.error("Schema error:", error);
14016
- schemaState.value = "error";
14017
- resolvedSchemaData.value = [];
14018
- }
14019
- }
14020
- vue.onMounted(resolveSchema);
13919
+ const resolvedSchemaData = vue.computed(() => {
13920
+ if (props2.type !== "object") return primitiveSchema.value;
13921
+ return vue.toValue(props2.schema);
13922
+ });
13923
+ vue.watch(() => props2.modelValue, (newValue) => {
13924
+ internalData.value = newValue || [];
13925
+ }, { deep: true });
14021
13926
  function emitValue() {
14022
13927
  emit2("update:modelValue", internalData.value);
14023
13928
  }
@@ -14047,10 +13952,14 @@ const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
14047
13952
  }
14048
13953
  const isPrimitiveType = vue.computed(() => props2.type === "text" || props2.type === "number");
14049
13954
  const canRenderItems = vue.computed(
14050
- () => isPrimitiveType.value || props2.type === "object" && resolvedSchemaData.value.length > 0
13955
+ () => {
13956
+ var _a;
13957
+ return isPrimitiveType.value || props2.type === "object" && Number((_a = resolvedSchemaData.value) == null ? void 0 : _a.length) > 0;
13958
+ }
14051
13959
  );
14052
13960
  const showMinimizeButton = vue.computed(() => {
14053
- return resolvedSchemaData.value.length > 2 || resolvedSchemaData.value.some((schema) => schema.$el === "richtext");
13961
+ var _a, _b;
13962
+ return Number((_a = resolvedSchemaData.value) == null ? void 0 : _a.length) > 2 || ((_b = resolvedSchemaData.value) == null ? void 0 : _b.some((schema) => schema.$el === "richtext"));
14054
13963
  });
14055
13964
  return (_ctx, _cache) => {
14056
13965
  return vue.openBlock(), vue.createElementBlock("div", {
@@ -14077,7 +13986,7 @@ const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
14077
13986
  minimizedItems.value[i2] ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_5$j, vue.toDisplayString(_ctx.label) + " " + vue.toDisplayString(i2 + 1), 1)) : (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$V), {
14078
13987
  key: 1,
14079
13988
  "model-value": isPrimitiveType.value ? { value: item } : item,
14080
- schema: resolvedSchemaData.value,
13989
+ schema: vue.unref(resolvedSchemaData),
14081
13990
  "onUpdate:modelValue": (val) => updateItem(i2, val)
14082
13991
  }, null, 8, ["model-value", "schema", "onUpdate:modelValue"])),
14083
13992
  vue.createElementVNode("div", _hoisted_6$f, [
@@ -18918,7 +18827,7 @@ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
18918
18827
  });
18919
18828
  vue.watch(() => editor.state.content, (newValue) => {
18920
18829
  var _a;
18921
- if ((_a = editor.state.doc) == null ? void 0 : _a.body.innerHTML) {
18830
+ if ((_a = editor.state.doc) == null ? void 0 : _a.body) {
18922
18831
  editor.state.doc.body.dir = hasRTL.value ? "rtl" : "ltr";
18923
18832
  }
18924
18833
  emit2("update:modelValue", newValue);
@@ -19006,7 +18915,7 @@ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
19006
18915
  };
19007
18916
  }
19008
18917
  });
19009
- const RichText = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-2782b5dd"]]);
18918
+ const RichText = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-d643f2ae"]]);
19010
18919
  const _hoisted_1$t = { key: 0 };
19011
18920
  const _hoisted_2$j = { class: "flex gap-05" };
19012
18921
  const _hoisted_3$g = ["disabled"];
@@ -32559,8 +32468,9 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
32559
32468
  props: {
32560
32469
  icon: {},
32561
32470
  name: {},
32562
- size: {},
32471
+ size: { default: 1 },
32563
32472
  color: {},
32473
+ round: { type: Boolean },
32564
32474
  weight: {}
32565
32475
  },
32566
32476
  setup(__props) {
@@ -32575,9 +32485,15 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
32575
32485
  return (_ctx, _cache) => {
32576
32486
  return iconRenderType.value === "material" ? (vue.openBlock(), vue.createElementBlock("span", {
32577
32487
  key: 0,
32578
- class: "bgl_icon-font",
32579
- style: vue.normalizeStyle({ "fontSize": `${_ctx.size}rem`, color: _ctx.color, "font-variation-settings": `'wght' ${_ctx.weight || 400}` })
32580
- }, vue.toDisplayString(iconRender.value), 5)) : iconRenderType.value === "font-awesome" ? (vue.openBlock(), vue.createElementBlock("span", {
32488
+ class: vue.normalizeClass(["bgl_icon-font", { "round flex aspect-ratio-1 justify-content-center": _ctx.round }]),
32489
+ style: vue.normalizeStyle({
32490
+ "fontSize": `${_ctx.size}rem`,
32491
+ color: _ctx.color,
32492
+ "font-variation-settings": `'wght' ${_ctx.weight || 400}`,
32493
+ "width": _ctx.round ? `calc(${_ctx.size}rem * 2)` : "auto",
32494
+ "height": _ctx.round ? `calc(${_ctx.size}rem * 2)` : "auto"
32495
+ })
32496
+ }, vue.toDisplayString(iconRender.value), 7)) : iconRenderType.value === "font-awesome" ? (vue.openBlock(), vue.createElementBlock("span", {
32581
32497
  key: 1,
32582
32498
  class: vue.normalizeClass(["fa far bgl_icon-font", [`fa-${iconRender.value}`, { "fa-brands": isFaBrand.value }]]),
32583
32499
  style: vue.normalizeStyle({ "fontSize": `${_ctx.size}rem`, color: _ctx.color, "font-variation-settings": `'wght' ${_ctx.weight || 400}` })
@@ -33809,7 +33725,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
33809
33725
  };
33810
33726
  }
33811
33727
  });
33812
- const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-1c0f6894"]]);
33728
+ const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-c62c6888"]]);
33813
33729
  const _hoisted_1$8 = { class: "full-nav" };
33814
33730
  const _hoisted_2$6 = { class: "nav-scroll" };
33815
33731
  const _hoisted_3$5 = { class: "nav-links-wrapper" };
@@ -36226,14 +36142,12 @@ function useValidateFieldValue(inputVal, getInput, validateFn, getFormData) {
36226
36142
  );
36227
36143
  }
36228
36144
  function useBglSchema({ schema, columns, data: data2 } = {}) {
36229
- let _schema = schema;
36230
- if (typeof _schema === "function") {
36231
- _schema = _schema();
36232
- }
36233
- if (_schema) {
36234
- return columns && columns.length > 0 ? _schema.filter((f2) => columns.includes(f2.id)) : _schema;
36145
+ const _schema = vue.computed(() => vue.toValue(schema));
36146
+ const _columns = vue.computed(() => vue.toValue(columns));
36147
+ if (_schema.value) {
36148
+ return _columns.value && _columns.value.length > 0 ? _schema.value.filter((f2) => _columns.value.includes(f2.id)) : _schema.value;
36235
36149
  }
36236
- return getFallbackSchema(data2, columns);
36150
+ return getFallbackSchema(data2, _columns.value);
36237
36151
  }
36238
36152
  function localRef(key, initialValue) {
36239
36153
  const storedValue = localStorage.getItem(key);