@bagelink/vue 1.0.38 → 1.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -19,7 +19,7 @@ const _sfc_main$1n = /* @__PURE__ */ vue.defineComponent({
19
19
  };
20
20
  }
21
21
  });
22
- const _hoisted_1$1a = ["aria-expanded", "aria-controls"];
22
+ const _hoisted_1$1b = ["aria-expanded", "aria-controls"];
23
23
  const _hoisted_2$T = { class: "accordion-label" };
24
24
  const _hoisted_3$I = ["id", "aria-hidden"];
25
25
  const _sfc_main$1m = /* @__PURE__ */ vue.defineComponent({
@@ -96,7 +96,7 @@ const _sfc_main$1m = /* @__PURE__ */ vue.defineComponent({
96
96
  }, [
97
97
  vue.createVNode(vue.unref(_sfc_main$s), { icon: computedIcon.value }, null, 8, ["icon"])
98
98
  ], 2)) : vue.createCommentVNode("", true)
99
- ], 8, _hoisted_1$1a),
99
+ ], 8, _hoisted_1$1b),
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$1m, [["__scopeId", "data-v-3334f637"]]);
125
- const _hoisted_1$19 = { class: "relative" };
125
+ const _hoisted_1$1a = { class: "relative" };
126
126
  const _sfc_main$1l = /* @__PURE__ */ vue.defineComponent({
127
127
  __name: "AddressSearch",
128
128
  emits: ["addressSelected"],
@@ -145,7 +145,7 @@ const _sfc_main$1l = /* @__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$19, [
148
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1a, [
149
149
  vue.createVNode(vue.unref(_sfc_main$W), {
150
150
  ref_key: "suggestion",
151
151
  ref: suggestion,
@@ -181,7 +181,7 @@ const _sfc_main$1l = /* @__PURE__ */ vue.defineComponent({
181
181
  };
182
182
  }
183
183
  });
184
- const _hoisted_1$18 = {
184
+ const _hoisted_1$19 = {
185
185
  key: 1,
186
186
  class: "bgl_btn-flex"
187
187
  };
@@ -251,7 +251,7 @@ const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({
251
251
  key: 0,
252
252
  class: "h-100p",
253
253
  size: "15"
254
- })) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$18, [
254
+ })) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$19, [
255
255
  _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$s), {
256
256
  key: 0,
257
257
  icon: _ctx.icon,
@@ -276,7 +276,7 @@ const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({
276
276
  }
277
277
  });
278
278
  const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["__scopeId", "data-v-bfc435b3"]]);
279
- const _hoisted_1$17 = ["dismissable"];
279
+ const _hoisted_1$18 = ["dismissable"];
280
280
  const _hoisted_2$S = { class: "m-0" };
281
281
  const _sfc_main$1j = /* @__PURE__ */ vue.defineComponent({
282
282
  __name: "Alert",
@@ -314,12 +314,12 @@ const _sfc_main$1j = /* @__PURE__ */ vue.defineComponent({
314
314
  icon: "close",
315
315
  onClick: _cache[0] || (_cache[0] = ($event) => isDismissed.value = true)
316
316
  })
317
- ], 10, _hoisted_1$17)) : vue.createCommentVNode("", true);
317
+ ], 10, _hoisted_1$18)) : vue.createCommentVNode("", true);
318
318
  };
319
319
  }
320
320
  });
321
321
  const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["__scopeId", "data-v-064bdd20"]]);
322
- const _hoisted_1$16 = ["src", "alt"];
322
+ const _hoisted_1$17 = ["src", "alt"];
323
323
  const _sfc_main$1i = /* @__PURE__ */ vue.defineComponent({
324
324
  __name: "Avatar",
325
325
  props: {
@@ -338,7 +338,7 @@ const _sfc_main$1i = /* @__PURE__ */ vue.defineComponent({
338
338
  key: 0,
339
339
  src: _ctx.src,
340
340
  alt: _ctx.name
341
- }, null, 8, _hoisted_1$16)) : (vue.openBlock(), vue.createElementBlock("p", {
341
+ }, null, 8, _hoisted_1$17)) : (vue.openBlock(), vue.createElementBlock("p", {
342
342
  key: 1,
343
343
  style: vue.normalizeStyle({ "line-height": `${_ctx.size}px`, "font-size": `calc(1.5rem * ${_ctx.size} / 50)` })
344
344
  }, vue.toDisplayString((_ctx.fallback || vue.unref(initials)(_ctx.name || "")).toUpperCase()), 5))
@@ -377,7 +377,7 @@ const _sfc_main$1h = /* @__PURE__ */ vue.defineComponent({
377
377
  }
378
378
  });
379
379
  const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["__scopeId", "data-v-689f051f"]]);
380
- const _hoisted_1$15 = ["src"];
380
+ const _hoisted_1$16 = ["src"];
381
381
  const _hoisted_2$R = ["autoplay", "muted", "loop", "controls", "playsinline"];
382
382
  const _hoisted_3$H = ["src", "type"];
383
383
  const _sfc_main$1g = /* @__PURE__ */ vue.defineComponent({
@@ -457,7 +457,7 @@ const _sfc_main$1g = /* @__PURE__ */ vue.defineComponent({
457
457
  allowfullscreen: "",
458
458
  title: "Video",
459
459
  allow: "autoplay"
460
- }, null, 12, _hoisted_1$15)) : _ctx.src ? (vue.openBlock(), vue.createElementBlock("video", {
460
+ }, null, 12, _hoisted_1$16)) : _ctx.src ? (vue.openBlock(), vue.createElementBlock("video", {
461
461
  key: 1,
462
462
  ref_key: "video",
463
463
  ref: video,
@@ -608,7 +608,7 @@ function translate(key, locale2 = "en-US") {
608
608
  const language = languageKeys[key] || {};
609
609
  return language[locale2] || key;
610
610
  }
611
- const _hoisted_1$14 = { class: "flex gap-05 space-between pb-1 datePick" };
611
+ const _hoisted_1$15 = { class: "flex gap-05 space-between pb-1 datePick" };
612
612
  const _hoisted_2$Q = { class: "flex gap-1 m_gap-025" };
613
613
  const _sfc_main$1f = /* @__PURE__ */ vue.defineComponent({
614
614
  __name: "Header",
@@ -688,7 +688,7 @@ const _sfc_main$1f = /* @__PURE__ */ vue.defineComponent({
688
688
  emit2("updatedPeriod", currentPeriod.value);
689
689
  }
690
690
  return (_ctx, _cache) => {
691
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$14, [
691
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$15, [
692
692
  vue.createElementVNode("div", _hoisted_2$Q, [
693
693
  vue.createVNode(vue.unref(Btn), {
694
694
  flat: "",
@@ -739,7 +739,7 @@ const EVENT_COLORS = {
739
739
  };
740
740
  const DATE_TIME_STRING_PATTERN = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/;
741
741
  const DATE_TIME_STRING_FULL_DAY_PATTERN = /^\d{4}-\d{2}-\d{2}$/;
742
- const _hoisted_1$13 = ["id"];
742
+ const _hoisted_1$14 = ["id"];
743
743
  const _hoisted_2$P = { class: "flex txt14 flex column align-items-start gap-025 opacity-6" };
744
744
  const _hoisted_3$G = {
745
745
  key: 0,
@@ -749,8 +749,8 @@ const _hoisted_4$u = {
749
749
  key: 1,
750
750
  class: "agenda__event-location flex gap-025"
751
751
  };
752
- const _hoisted_5$p = { class: "agenda__event-title" };
753
- const _hoisted_6$l = {
752
+ const _hoisted_5$q = { class: "agenda__event-title" };
753
+ const _hoisted_6$m = {
754
754
  key: 0,
755
755
  class: "agenda__event-with txt14 opacity-6"
756
756
  };
@@ -846,25 +846,25 @@ const _sfc_main$1e = /* @__PURE__ */ vue.defineComponent({
846
846
  ])) : vue.createCommentVNode("", true)
847
847
  ]),
848
848
  vue.createElementVNode("div", null, [
849
- vue.createElementVNode("div", _hoisted_5$p, vue.toDisplayString(__props.calendarEvent.title), 1),
850
- __props.calendarEvent.with ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$l, [
849
+ vue.createElementVNode("div", _hoisted_5$q, vue.toDisplayString(__props.calendarEvent.title), 1),
850
+ __props.calendarEvent.with ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$m, [
851
851
  vue.createVNode(vue.unref(_sfc_main$s), {
852
852
  icon: icons.user
853
853
  }, null, 8, ["icon"]),
854
854
  vue.createTextVNode(" " + vue.toDisplayString(__props.calendarEvent.with), 1)
855
855
  ])) : vue.createCommentVNode("", true)
856
856
  ])
857
- ], 8, _hoisted_1$13);
857
+ ], 8, _hoisted_1$14);
858
858
  };
859
859
  }
860
860
  });
861
861
  const AgendaEventTile = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["__scopeId", "data-v-5740437b"]]);
862
- const _hoisted_1$12 = { class: "agenda__wrapper grid align-items-start gap-1 h-100p" };
862
+ const _hoisted_1$13 = { class: "agenda__wrapper grid align-items-start gap-1 h-100p" };
863
863
  const _hoisted_2$O = { class: "m_sticky" };
864
864
  const _hoisted_3$F = { class: "agenda__header-day-name txt-center" };
865
865
  const _hoisted_4$t = { class: "agenda__header-date flex justify-content-center rounded p-025 txt24 line-height-04" };
866
- const _hoisted_5$o = { class: "agenda__content flex column w-100p h-100p min-h-100px pt-05 border-start ps-1 m_pt-0 min-h-50px" };
867
- const _hoisted_6$k = {
866
+ const _hoisted_5$p = { class: "agenda__content flex column w-100p h-100p min-h-100px pt-05 border-start ps-1 m_pt-0 min-h-50px" };
867
+ const _hoisted_6$l = {
868
868
  key: 0,
869
869
  class: "align-items-center flex justify-content-center h-100p opacity-6"
870
870
  };
@@ -892,13 +892,13 @@ const _sfc_main$1d = /* @__PURE__ */ vue.defineComponent({
892
892
  setup(__props, { emit: __emit }) {
893
893
  const emit2 = __emit;
894
894
  return (_ctx, _cache) => {
895
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$12, [
895
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$13, [
896
896
  vue.createElementVNode("header", _hoisted_2$O, [
897
897
  vue.createElementVNode("div", _hoisted_3$F, vue.toDisplayString(__props.day.dayName.slice(0, 3)), 1),
898
898
  vue.createElementVNode("div", _hoisted_4$t, vue.toDisplayString(__props.day.dateTimeString.substring(8, 10)), 1)
899
899
  ]),
900
- vue.createElementVNode("div", _hoisted_5$o, [
901
- __props.day.events.length === 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$k, vue.toDisplayString(vue.unref(getLanguage)(vue.unref(languageKeys).noEvent, __props.time.CALENDAR_LOCALE)), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$g, [
900
+ vue.createElementVNode("div", _hoisted_5$p, [
901
+ __props.day.events.length === 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$l, vue.toDisplayString(vue.unref(getLanguage)(vue.unref(languageKeys).noEvent, __props.time.CALENDAR_LOCALE)), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$g, [
902
902
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.day.events, (dayEvent) => {
903
903
  return vue.openBlock(), vue.createBlock(AgendaEventTile, {
904
904
  key: `agenda_event_${dayEvent.id}`,
@@ -1594,7 +1594,7 @@ class EventFlyoutPosition {
1594
1594
  return { top: eventElementDOMRect.top, left: null };
1595
1595
  }
1596
1596
  }
1597
- const _hoisted_1$11 = {
1597
+ const _hoisted_1$12 = {
1598
1598
  key: 0,
1599
1599
  class: "event-flyout__relative-wrapper"
1600
1600
  };
@@ -1604,11 +1604,11 @@ const _hoisted_3$E = {
1604
1604
  class: "event-flyout__menu-editable"
1605
1605
  };
1606
1606
  const _hoisted_4$s = { class: "event-flyout__menu-close" };
1607
- const _hoisted_5$n = {
1607
+ const _hoisted_5$o = {
1608
1608
  key: 0,
1609
1609
  class: "event-flyout__info-wrapper"
1610
1610
  };
1611
- const _hoisted_6$j = {
1611
+ const _hoisted_6$k = {
1612
1612
  key: 0,
1613
1613
  class: "event-flyout__row is-title"
1614
1614
  };
@@ -1628,7 +1628,7 @@ const _hoisted_10$7 = {
1628
1628
  key: 4,
1629
1629
  class: "event-flyout__row is-topic"
1630
1630
  };
1631
- const _hoisted_11$6 = {
1631
+ const _hoisted_11$7 = {
1632
1632
  key: 5,
1633
1633
  class: "event-flyout__row is-description"
1634
1634
  };
@@ -1806,7 +1806,7 @@ const _sfc_main$1c = /* @__PURE__ */ vue.defineComponent({
1806
1806
  class: vue.normalizeClass(["event-flyout p-05 bg-white", { "is-visible": isVisible.value, "is-not-editable": !isEditable.value }]),
1807
1807
  style: vue.normalizeStyle(eventFlyoutInlineStyles.value)
1808
1808
  }, [
1809
- !__props.config.eventDialog || !__props.config.eventDialog.isCustom ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$11, [
1809
+ !__props.config.eventDialog || !__props.config.eventDialog.isCustom ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$12, [
1810
1810
  vue.createElementVNode("div", _hoisted_2$N, [
1811
1811
  isEditable.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$E, [
1812
1812
  vue.createVNode(vue.unref(_sfc_main$s), {
@@ -1828,8 +1828,8 @@ const _sfc_main$1c = /* @__PURE__ */ vue.defineComponent({
1828
1828
  }, null, 8, ["icon"])
1829
1829
  ])
1830
1830
  ]),
1831
- calendarEvent.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$n, [
1832
- calendarEvent.value.title ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$j, [
1831
+ calendarEvent.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$o, [
1832
+ calendarEvent.value.title ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$k, [
1833
1833
  vue.createElementVNode("div", {
1834
1834
  class: "event-flyout__color-icon",
1835
1835
  style: vue.normalizeStyle({ backgroundColor: eventBackgroundColor.value })
@@ -1855,7 +1855,7 @@ const _sfc_main$1c = /* @__PURE__ */ vue.defineComponent({
1855
1855
  }, null, 8, ["icon"]),
1856
1856
  vue.createTextVNode(" " + vue.toDisplayString(calendarEvent.value.topic), 1)
1857
1857
  ])) : vue.createCommentVNode("", true),
1858
- calendarEvent.value.description ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$6, [
1858
+ calendarEvent.value.description ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$7, [
1859
1859
  vue.createVNode(vue.unref(_sfc_main$s), {
1860
1860
  icon: icons.description
1861
1861
  }, null, 8, ["icon"]),
@@ -1873,7 +1873,7 @@ const _sfc_main$1c = /* @__PURE__ */ vue.defineComponent({
1873
1873
  };
1874
1874
  }
1875
1875
  });
1876
- const _hoisted_1$10 = {
1876
+ const _hoisted_1$11 = {
1877
1877
  key: 0,
1878
1878
  class: "calendar-month__event"
1879
1879
  };
@@ -1883,7 +1883,7 @@ const _hoisted_4$r = {
1883
1883
  key: 0,
1884
1884
  class: "calendar-month__event-time opacity-6 flex-shrink-0"
1885
1885
  };
1886
- const _hoisted_5$m = { class: "calendar-month__event-title1 white-space ellipsis" };
1886
+ const _hoisted_5$n = { class: "calendar-month__event-title1 white-space ellipsis" };
1887
1887
  const eventIdPrefix = "calendar-month__event-";
1888
1888
  const _sfc_main$1b = /* @__PURE__ */ vue.defineComponent({
1889
1889
  __name: "Event",
@@ -1965,7 +1965,7 @@ const _sfc_main$1b = /* @__PURE__ */ vue.defineComponent({
1965
1965
  setColors();
1966
1966
  });
1967
1967
  return (_ctx, _cache) => {
1968
- return __props.config.isSmall ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$10)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
1968
+ return __props.config.isSmall ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$11)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
1969
1969
  isCustomEvent.value ? (vue.openBlock(), vue.createElementBlock("div", {
1970
1970
  key: 0,
1971
1971
  id: elementId.value,
@@ -1987,14 +1987,14 @@ const _sfc_main$1b = /* @__PURE__ */ vue.defineComponent({
1987
1987
  }, [
1988
1988
  _cache[0] || (_cache[0] = vue.createElementVNode("span", { class: "calendar-month__event-color round flex-shrink-0" }, null, -1)),
1989
1989
  eventTimeStart.value && !__props.calendarEvent.originalEvent ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$r, vue.toDisplayString(eventTimeStart.value), 1)) : vue.createCommentVNode("", true),
1990
- vue.createElementVNode("span", _hoisted_5$m, vue.toDisplayString(__props.calendarEvent.title), 1)
1990
+ vue.createElementVNode("span", _hoisted_5$n, vue.toDisplayString(__props.calendarEvent.title), 1)
1991
1991
  ], 42, _hoisted_3$D))
1992
1992
  ], 64));
1993
1993
  };
1994
1994
  }
1995
1995
  });
1996
1996
  const Event = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["__scopeId", "data-v-3c4101df"]]);
1997
- const _hoisted_1$$ = ["id"];
1997
+ const _hoisted_1$10 = ["id"];
1998
1998
  const _hoisted_2$L = { class: "w-100p flex justify-content-end txt14 p-025 m_h-100p" };
1999
1999
  const _hoisted_3$C = { class: "calendar-month_events" };
2000
2000
  const _hoisted_4$q = {
@@ -2131,12 +2131,12 @@ const _sfc_main$1a = /* @__PURE__ */ vue.defineComponent({
2131
2131
  }, vue.toDisplayString(vue.unref(getLanguage)(vue.unref(languageKeys).moreEvents, __props.time.CALENDAR_LOCALE)), 1)) : vue.createCommentVNode("", true)
2132
2132
  ])
2133
2133
  ], true)
2134
- ], 42, _hoisted_1$$)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$q));
2134
+ ], 42, _hoisted_1$10)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$q));
2135
2135
  };
2136
2136
  }
2137
2137
  });
2138
2138
  const Day$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["__scopeId", "data-v-c1dfa100"]]);
2139
- const _hoisted_1$_ = { class: "txt12 normal block color-black pb-025" };
2139
+ const _hoisted_1$$ = { class: "txt12 normal block color-black pb-025" };
2140
2140
  const _sfc_main$19 = /* @__PURE__ */ vue.defineComponent({
2141
2141
  __name: "WeekDay",
2142
2142
  props: {
@@ -2144,11 +2144,11 @@ const _sfc_main$19 = /* @__PURE__ */ vue.defineComponent({
2144
2144
  },
2145
2145
  setup(__props) {
2146
2146
  return (_ctx, _cache) => {
2147
- return vue.openBlock(), vue.createElementBlock("span", _hoisted_1$_, vue.toDisplayString(_ctx.day.dayName), 1);
2147
+ return vue.openBlock(), vue.createElementBlock("span", _hoisted_1$$, vue.toDisplayString(_ctx.day.dayName), 1);
2148
2148
  };
2149
2149
  }
2150
2150
  });
2151
- const _hoisted_1$Z = { class: "calendar-month relative column w-100p h-100p overflow-y flex flex-stretch" };
2151
+ const _hoisted_1$_ = { class: "calendar-month relative column w-100p h-100p overflow-y flex flex-stretch" };
2152
2152
  const _hoisted_2$K = { class: "flex space-between" };
2153
2153
  const _hoisted_3$B = { class: "calendar-month__weeks h-100p flex-grow flex flex-stretch column space-between" };
2154
2154
  const _hoisted_4$p = {
@@ -2257,7 +2257,7 @@ const _sfc_main$18 = /* @__PURE__ */ vue.defineComponent({
2257
2257
  });
2258
2258
  return (_ctx, _cache) => {
2259
2259
  var _a;
2260
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$Z, [
2260
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$_, [
2261
2261
  vue.createElementVNode("div", _hoisted_2$K, [
2262
2262
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(month.value[0], (day, dayIndex) => {
2263
2263
  return vue.openBlock(), vue.createBlock(_sfc_main$19, {
@@ -2534,18 +2534,18 @@ class EventChange {
2534
2534
  this.dayEnd = `${endHourString}:00`;
2535
2535
  }
2536
2536
  }
2537
- const _hoisted_1$Y = ["data-ref"];
2537
+ const _hoisted_1$Z = ["data-ref"];
2538
2538
  const _hoisted_2$J = { class: "calendar-week__event-row is-title" };
2539
2539
  const _hoisted_3$A = { class: "calendar-week__event-row is-time flex" };
2540
2540
  const _hoisted_4$o = {
2541
2541
  key: 0,
2542
2542
  class: "calendar-week__event-row is-location"
2543
2543
  };
2544
- const _hoisted_5$l = {
2544
+ const _hoisted_5$m = {
2545
2545
  key: 1,
2546
2546
  class: "calendar-week__event-row is-with"
2547
2547
  };
2548
- const _hoisted_6$i = {
2548
+ const _hoisted_6$j = {
2549
2549
  key: 2,
2550
2550
  class: "calendar-week__event-row is-topic"
2551
2551
  };
@@ -2911,14 +2911,14 @@ const _sfc_main$17 = /* @__PURE__ */ vue.defineComponent({
2911
2911
  }, null, 8, ["icon"]),
2912
2912
  vue.createElementVNode("span", null, vue.toDisplayString(event.value.location), 1)
2913
2913
  ])) : vue.createCommentVNode("", true),
2914
- event.value.with ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$l, [
2914
+ event.value.with ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$m, [
2915
2915
  vue.createVNode(vue.unref(_sfc_main$s), {
2916
2916
  icon: icons.value.user,
2917
2917
  class: "calendar-week__event-icon"
2918
2918
  }, null, 8, ["icon"]),
2919
2919
  vue.createElementVNode("span", null, vue.toDisplayString(event.value.with), 1)
2920
2920
  ])) : vue.createCommentVNode("", true),
2921
- event.value.topic ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$i, [
2921
+ event.value.topic ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$j, [
2922
2922
  vue.createVNode(vue.unref(_sfc_main$s), {
2923
2923
  icon: icons.value.topic,
2924
2924
  class: "calendar-week__event-icon"
@@ -2955,12 +2955,12 @@ const _sfc_main$17 = /* @__PURE__ */ vue.defineComponent({
2955
2955
  class: "calendar-week__event-resize calendar-week__event-resize-down",
2956
2956
  onMousedown: _cache[1] || (_cache[1] = ($event) => resizeEvent("down"))
2957
2957
  }, null, 32)) : vue.createCommentVNode("", true)
2958
- ], 46, _hoisted_1$Y);
2958
+ ], 46, _hoisted_1$Z);
2959
2959
  };
2960
2960
  }
2961
2961
  });
2962
2962
  const DayEvent = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["__scopeId", "data-v-c512b81d"]]);
2963
- const _hoisted_1$X = ["id", "onClick"];
2963
+ const _hoisted_1$Y = ["id", "onClick"];
2964
2964
  const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
2965
2965
  __name: "Day",
2966
2966
  props: {
@@ -3098,14 +3098,14 @@ const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
3098
3098
  class: vue.normalizeClass(["calendar-week__day-interval", { "has-border": interval.hasBorder }]),
3099
3099
  style: vue.normalizeStyle(intervalStyles.value),
3100
3100
  onClick: ($event) => handleClickOnInterval(interval)
3101
- }, vue.toDisplayString(__props.time.getLocalizedTime(interval.intervalStart)), 15, _hoisted_1$X);
3101
+ }, vue.toDisplayString(__props.time.getLocalizedTime(interval.intervalStart)), 15, _hoisted_1$Y);
3102
3102
  }), 128)) : vue.createCommentVNode("", true)
3103
3103
  ]);
3104
3104
  };
3105
3105
  }
3106
3106
  });
3107
3107
  const Day = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["__scopeId", "data-v-87669cec"]]);
3108
- const _hoisted_1$W = { class: "day-timeline absolute top-0 start-0 space-evenly column display-flex" };
3108
+ const _hoisted_1$X = { class: "day-timeline absolute top-0 start-0 space-evenly column display-flex" };
3109
3109
  const _hoisted_2$I = { class: "day-timeline__hour-text line-height-0" };
3110
3110
  const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
3111
3111
  __name: "DayTimeline",
@@ -3133,7 +3133,7 @@ const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
3133
3133
  return props2.time.getLocalizedHour(new Date(2100, 1, 1, hour));
3134
3134
  }
3135
3135
  return (_ctx, _cache) => {
3136
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$W, [
3136
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$X, [
3137
3137
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(timelineHours.value, (hour) => {
3138
3138
  return vue.openBlock(), vue.createElementBlock("div", {
3139
3139
  key: hour,
@@ -3147,7 +3147,7 @@ const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
3147
3147
  }
3148
3148
  });
3149
3149
  const DayTimeline = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-0b3de5c5"]]);
3150
- const _hoisted_1$V = ["id"];
3150
+ const _hoisted_1$W = ["id"];
3151
3151
  const _hoisted_2$H = {
3152
3152
  key: 1,
3153
3153
  class: "week-timeline__event"
@@ -3219,20 +3219,20 @@ const _sfc_main$14 = /* @__PURE__ */ vue.defineComponent({
3219
3219
  zIndex: 1
3220
3220
  }),
3221
3221
  onClick: handleClickOnEvent
3222
- }, vue.toDisplayString(__props.scheduleEvent.title), 13, _hoisted_1$V)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$H));
3222
+ }, vue.toDisplayString(__props.scheduleEvent.title), 13, _hoisted_1$W)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$H));
3223
3223
  };
3224
3224
  }
3225
3225
  });
3226
3226
  const FullDayEvent = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["__scopeId", "data-v-8bd51337"]]);
3227
- const _hoisted_1$U = {
3227
+ const _hoisted_1$V = {
3228
3228
  class: "week-timeline flex space-between border-bottom ms-3-5",
3229
3229
  style: { "margin-inline-end": "0.5em" }
3230
3230
  };
3231
3231
  const _hoisted_2$G = ["onClick"];
3232
3232
  const _hoisted_3$z = { class: "flex justify-content-center gap-025 txt12 pb-025" };
3233
3233
  const _hoisted_4$n = { class: "" };
3234
- const _hoisted_5$k = { class: "week-timeline__date txt14 round inline-flex justify-content-center" };
3235
- const _hoisted_6$h = { class: "week-timeline__events" };
3234
+ const _hoisted_5$l = { class: "week-timeline__date txt14 round inline-flex justify-content-center" };
3235
+ const _hoisted_6$i = { class: "week-timeline__events" };
3236
3236
  const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent({
3237
3237
  __name: "WeekTimeline",
3238
3238
  props: {
@@ -3254,7 +3254,7 @@ const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent({
3254
3254
  return date2;
3255
3255
  }
3256
3256
  return (_ctx, _cache) => {
3257
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$U, [
3257
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$V, [
3258
3258
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.days, (day, dayIndex) => {
3259
3259
  return vue.openBlock(), vue.createElementBlock("div", {
3260
3260
  key: dayIndex,
@@ -3265,9 +3265,9 @@ const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent({
3265
3265
  }, [
3266
3266
  vue.createElementVNode("div", _hoisted_3$z, [
3267
3267
  vue.createElementVNode("div", _hoisted_4$n, vue.toDisplayString(day.dayName.charAt(0).toUpperCase() + day.dayName.slice(1, 3).toLowerCase()), 1),
3268
- vue.createElementVNode("div", _hoisted_5$k, vue.toDisplayString(getDaysDate(day)), 1)
3268
+ vue.createElementVNode("div", _hoisted_5$l, vue.toDisplayString(getDaysDate(day)), 1)
3269
3269
  ]),
3270
- vue.createElementVNode("div", _hoisted_6$h, [
3270
+ vue.createElementVNode("div", _hoisted_6$i, [
3271
3271
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(day.fullDayEvents, (event, key) => {
3272
3272
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key }, [
3273
3273
  key !== "date" ? (vue.openBlock(), vue.createBlock(FullDayEvent, {
@@ -3287,7 +3287,7 @@ const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent({
3287
3287
  }
3288
3288
  });
3289
3289
  const WeekTimeline = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-18ecf6c3"]]);
3290
- const _hoisted_1$T = { class: "calendar-week__wrapper relative ps-3-5" };
3290
+ const _hoisted_1$U = { class: "calendar-week__wrapper relative ps-3-5" };
3291
3291
  const _hoisted_2$F = { class: "calendar-week" };
3292
3292
  const _hoisted_3$y = { class: "calendar-week__events" };
3293
3293
  const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({
@@ -3516,7 +3516,7 @@ const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({
3516
3516
  onEventWasClicked: handleClickOnEvent,
3517
3517
  onDayWasClicked: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("dayWasClicked", $event))
3518
3518
  }, null, 8, ["days", "time", "full-day-events", "config", "mode"]),
3519
- vue.createElementVNode("div", _hoisted_1$T, [
3519
+ vue.createElementVNode("div", _hoisted_1$U, [
3520
3520
  !__props.config.eventDialog || !__props.config.eventDialog.isDisabled ? (vue.openBlock(), vue.createBlock(_sfc_main$1c, {
3521
3521
  key: 0,
3522
3522
  "calendar-event-prop": selectedEvent.value,
@@ -3637,7 +3637,7 @@ ${_Errors.SUFFIX}`);
3637
3637
  __publicField(_Errors, "MISSING_TIME_END_WARNING", `${_Errors.PREFIX} required event property 'time.end' is missing
3638
3638
  ${_Errors.SUFFIX}`);
3639
3639
  let Errors = _Errors;
3640
- const _hoisted_1$S = { class: "calendar-root-wrapper txt16" };
3640
+ const _hoisted_1$T = { class: "calendar-root-wrapper txt16" };
3641
3641
  const _hoisted_2$E = ["data-lang"];
3642
3642
  const _hoisted_3$x = {
3643
3643
  key: 0,
@@ -3817,7 +3817,7 @@ const _sfc_main$11 = /* @__PURE__ */ vue.defineComponent({
3817
3817
  }
3818
3818
  return (_ctx, _cache) => {
3819
3819
  var _a2, _b2;
3820
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$S, [
3820
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$T, [
3821
3821
  vue.createElementVNode("div", {
3822
3822
  ref_key: "calendarRoot",
3823
3823
  ref: calendarRoot,
@@ -3921,7 +3921,7 @@ const _sfc_main$11 = /* @__PURE__ */ vue.defineComponent({
3921
3921
  };
3922
3922
  }
3923
3923
  });
3924
- const _hoisted_1$R = {
3924
+ const _hoisted_1$S = {
3925
3925
  key: 0,
3926
3926
  class: "card_label"
3927
3927
  };
@@ -3954,7 +3954,7 @@ const _sfc_main$10 = /* @__PURE__ */ vue.defineComponent({
3954
3954
  }])
3955
3955
  }, {
3956
3956
  default: vue.withCtx(() => [
3957
- _ctx.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$R, vue.toDisplayString(_ctx.label), 1)) : vue.createCommentVNode("", true),
3957
+ _ctx.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$S, vue.toDisplayString(_ctx.label), 1)) : vue.createCommentVNode("", true),
3958
3958
  vue.renderSlot(_ctx.$slots, "default")
3959
3959
  ]),
3960
3960
  _: 3
@@ -3964,7 +3964,7 @@ const _sfc_main$10 = /* @__PURE__ */ vue.defineComponent({
3964
3964
  };
3965
3965
  }
3966
3966
  });
3967
- const _hoisted_1$Q = ["dir"];
3967
+ const _hoisted_1$R = ["dir"];
3968
3968
  const _hoisted_2$D = {
3969
3969
  key: 0,
3970
3970
  class: "dots"
@@ -4422,7 +4422,7 @@ const _sfc_main$$ = /* @__PURE__ */ vue.defineComponent({
4422
4422
  }, void 0, true)
4423
4423
  ])
4424
4424
  ])
4425
- ], 14, _hoisted_1$Q);
4425
+ ], 14, _hoisted_1$R);
4426
4426
  };
4427
4427
  }
4428
4428
  });
@@ -10262,8 +10262,8 @@ const _hoisted_1$1$1 = {
10262
10262
  const _hoisted_2$1$1 = ["width", "height", "viewBox"];
10263
10263
  const _hoisted_3$v = { class: "layer-rectangles" };
10264
10264
  const _hoisted_4$l = ["transform", "onMouseover"];
10265
- const _hoisted_5$j = ["width", "height"];
10266
- const _hoisted_6$g = {
10265
+ const _hoisted_5$k = ["width", "height"];
10266
+ const _hoisted_6$h = {
10267
10267
  x: 0 + 10,
10268
10268
  y: 0 + 20,
10269
10269
  "font-size": `15px`,
@@ -10299,14 +10299,14 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
10299
10299
  y: 0,
10300
10300
  width: r2.width,
10301
10301
  height: r2.height
10302
- }), null, 16, _hoisted_5$j),
10302
+ }), null, 16, _hoisted_5$k),
10303
10303
  vue.renderSlot(_ctx.$slots, "text", {
10304
10304
  r: r2,
10305
10305
  selected: _ctx.selected === i2
10306
10306
  }, () => [
10307
10307
  vue.createElementVNode(
10308
10308
  "text",
10309
- _hoisted_6$g,
10309
+ _hoisted_6$h,
10310
10310
  vue.toDisplayString(r2.data.name),
10311
10311
  1
10312
10312
  /* TEXT */
@@ -10370,13 +10370,13 @@ var script = vue.defineComponent({
10370
10370
  return { bar, canvas, direction, mouse };
10371
10371
  }
10372
10372
  });
10373
- const _hoisted_1$P = {
10373
+ const _hoisted_1$Q = {
10374
10374
  key: 0,
10375
10375
  class: "layer-hover-bar"
10376
10376
  };
10377
10377
  const _hoisted_2$C = ["x", "y", "width", "height"];
10378
10378
  function render(_ctx, _cache, $props, $setup, $data, $options) {
10379
- return _ctx.mouse.hover ? (vue.openBlock(), vue.createElementBlock("g", _hoisted_1$P, [
10379
+ return _ctx.mouse.hover ? (vue.openBlock(), vue.createElementBlock("g", _hoisted_1$Q, [
10380
10380
  vue.createElementVNode("rect", vue.mergeProps({ class: "hover-bar" }, _ctx.barStyle, {
10381
10381
  x: _ctx.bar.x,
10382
10382
  y: _ctx.bar.y,
@@ -10688,6 +10688,8 @@ const SRC_VALUE_COMPONENTS = /* @__PURE__ */ new Set(["img", "iframe"]);
10688
10688
  function useTableData(options) {
10689
10689
  const sortField = vue.ref("");
10690
10690
  const sortDirection = vue.ref("ASC");
10691
+ const schemaState = vue.ref("loading");
10692
+ const resolvedSchema = vue.ref([]);
10691
10693
  function getValue(value) {
10692
10694
  if (value === void 0 || value === null) {
10693
10695
  return void 0;
@@ -10702,31 +10704,50 @@ function useTableData(options) {
10702
10704
  return void 0;
10703
10705
  }
10704
10706
  }
10705
- const computedSchema = vue.computed(() => {
10706
- const dataValue = options.data.value || [];
10707
- const schema = useBglSchema({
10708
- schema: getValue(options.schema),
10709
- columns: getValue(options.columns),
10710
- data: dataValue
10711
- });
10712
- if (Array.isArray(schema) && schema.length > 0) {
10713
- return schema.filter((field) => field && field.id);
10714
- }
10715
- if (Array.isArray(dataValue) && dataValue.length > 0) {
10716
- const firstItem = dataValue[0];
10717
- return Object.keys(firstItem || {}).filter((key) => key !== "id" && !key.startsWith("_")).map((key) => ({
10718
- id: key,
10719
- label: keyToLabel(key),
10720
- $el: "div",
10721
- transform: (val) => {
10722
- const dateFields = ["created_at", "updated_at"];
10723
- if (dateFields.includes(key)) return val ? new Date(val).toLocaleString() : val;
10724
- return val;
10725
- }
10726
- }));
10707
+ async function resolveSchemaAsync() {
10708
+ try {
10709
+ schemaState.value = "loading";
10710
+ const dataValue = options.data.value || [];
10711
+ const schema = await useBglSchema({
10712
+ schema: getValue(options.schema),
10713
+ columns: getValue(options.columns),
10714
+ data: dataValue
10715
+ });
10716
+ if (Array.isArray(schema) && schema.length > 0) {
10717
+ resolvedSchema.value = schema.filter((field) => field && field.id);
10718
+ } else if (Array.isArray(dataValue) && dataValue.length > 0) {
10719
+ const firstItem = dataValue[0];
10720
+ resolvedSchema.value = Object.keys(firstItem || {}).filter((key) => key !== "id" && !key.startsWith("_")).map((key) => ({
10721
+ id: key,
10722
+ label: keyToLabel(key),
10723
+ $el: "div",
10724
+ transform: (val) => {
10725
+ const dateFields = ["created_at", "updated_at"];
10726
+ if (dateFields.includes(key)) return val ? new Date(val).toLocaleString() : val;
10727
+ return val;
10728
+ }
10729
+ }));
10730
+ } else {
10731
+ resolvedSchema.value = [];
10732
+ }
10733
+ schemaState.value = "loaded";
10734
+ } catch (error) {
10735
+ console.error("Error resolving schema:", error);
10736
+ schemaState.value = "error";
10737
+ resolvedSchema.value = [];
10727
10738
  }
10728
- return [];
10739
+ }
10740
+ vue.watch([
10741
+ () => getValue(options.schema),
10742
+ () => getValue(options.columns),
10743
+ () => options.data.value
10744
+ ], () => {
10745
+ resolveSchemaAsync();
10746
+ }, { immediate: true });
10747
+ vue.onMounted(() => {
10748
+ resolveSchemaAsync();
10729
10749
  });
10750
+ const computedSchema = vue.computed(() => resolvedSchema.value);
10730
10751
  function transform(rowData) {
10731
10752
  const transformed = { ...rowData };
10732
10753
  const schemaFields = computedSchema.value.filter((f2) => f2.id);
@@ -10808,10 +10829,11 @@ function useTableData(options) {
10808
10829
  sortField: vue.computed(() => sortField.value),
10809
10830
  sortDirection: vue.computed(() => sortDirection.value),
10810
10831
  toggleSort,
10811
- cleanTransformedData
10832
+ cleanTransformedData,
10833
+ schemaState: vue.computed(() => schemaState.value)
10812
10834
  };
10813
10835
  }
10814
- const _hoisted_1$O = { class: "data-preview" };
10836
+ const _hoisted_1$P = { class: "data-preview" };
10815
10837
  const _hoisted_2$B = {
10816
10838
  key: 1,
10817
10839
  class: "empty-preview"
@@ -10857,7 +10879,7 @@ const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
10857
10879
  includeUnset: props2.includeUnset
10858
10880
  });
10859
10881
  return (_ctx, _cache) => {
10860
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$O, [
10882
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$P, [
10861
10883
  vue.unref(computedSchema) && vue.unref(computedSchema).length > 0 ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(vue.unref(computedSchema), (field) => {
10862
10884
  return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(renderField)(field, vue.unref(slots))), {
10863
10885
  key: field.id
@@ -11508,19 +11530,23 @@ function useTableVirtualization(options) {
11508
11530
  registerLastItemObserver
11509
11531
  };
11510
11532
  }
11511
- const _hoisted_1$N = {
11533
+ const _hoisted_1$O = {
11512
11534
  key: 0,
11513
11535
  class: "loading-table-wrapper z-99 h-100 w-100 absolute inset"
11514
11536
  };
11515
- const _hoisted_2$A = { class: "infinite-wrapper" };
11516
- const _hoisted_3$u = { class: "row first-row" };
11517
- const _hoisted_4$k = { key: 0 };
11518
- const _hoisted_5$i = ["onClick"];
11519
- const _hoisted_6$f = { class: "flex" };
11520
- const _hoisted_7$c = ["onClick"];
11521
- const _hoisted_8$7 = { key: 0 };
11522
- const _hoisted_9$6 = ["value"];
11523
- const _hoisted_10$6 = { key: 1 };
11537
+ const _hoisted_2$A = {
11538
+ key: 1,
11539
+ class: "flex-center h-300px txt-red"
11540
+ };
11541
+ const _hoisted_3$u = { class: "infinite-wrapper" };
11542
+ const _hoisted_4$k = { class: "row first-row" };
11543
+ const _hoisted_5$j = { key: 0 };
11544
+ const _hoisted_6$g = ["onClick"];
11545
+ const _hoisted_7$c = { class: "flex" };
11546
+ const _hoisted_8$7 = ["onClick"];
11547
+ const _hoisted_9$6 = { key: 0 };
11548
+ const _hoisted_10$6 = ["value"];
11549
+ const _hoisted_11$6 = { key: 1 };
11524
11550
  const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
11525
11551
  __name: "DataTable",
11526
11552
  props: /* @__PURE__ */ vue.mergeModels({
@@ -11541,7 +11567,7 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
11541
11567
  emits: /* @__PURE__ */ vue.mergeModels(["orderBy", "select", "lastItemVisible"], ["update:loading", "update:itemHeight", "update:selectedItems"]),
11542
11568
  setup(__props, { emit: __emit }) {
11543
11569
  vue.useCssVars((_ctx) => ({
11544
- "31aad8d2": vue.unref(computedItemHeight)
11570
+ "03db8ce0": vue.unref(computedItemHeight)
11545
11571
  }));
11546
11572
  const props2 = __props;
11547
11573
  const emit2 = __emit;
@@ -11559,7 +11585,8 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
11559
11585
  sortField,
11560
11586
  sortDirection,
11561
11587
  toggleSort,
11562
- cleanTransformedData
11588
+ cleanTransformedData,
11589
+ schemaState
11563
11590
  } = useTableData({ data: data2, schema, columns, useServerSort, onSort: (field, direction) => {
11564
11591
  emit2("orderBy", `${field} ${direction}`.trim());
11565
11592
  } });
@@ -11630,14 +11657,14 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
11630
11657
  );
11631
11658
  return (_ctx, _cache) => {
11632
11659
  return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ class: "table-list-wrap h-100" }, vue.unref(containerProps), {
11633
- class: { "loading-table": loading.value }
11660
+ class: { "loading-table": loading.value || vue.unref(schemaState) === "loading" }
11634
11661
  }), [
11635
- loading.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$N, _cache[4] || (_cache[4] = [
11662
+ loading.value || vue.unref(schemaState) === "loading" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$O, _cache[4] || (_cache[4] = [
11636
11663
  vue.createElementVNode("div", { class: "loading-table-animation absolute oval" }, null, -1)
11637
- ]))) : (vue.openBlock(), vue.createElementBlock("div", vue.normalizeProps(vue.mergeProps({ key: 1 }, vue.unref(wrapperProps))), [
11638
- vue.createElementVNode("table", _hoisted_2$A, [
11639
- vue.createElementVNode("thead", _hoisted_3$u, [
11640
- vue.unref(isSelectable) ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_4$k, [
11664
+ ]))) : vue.unref(schemaState) === "error" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$A, " Error loading table schema ")) : (vue.openBlock(), vue.createElementBlock("div", vue.normalizeProps(vue.mergeProps({ key: 2 }, vue.unref(wrapperProps))), [
11665
+ vue.createElementVNode("table", _hoisted_3$u, [
11666
+ vue.createElementVNode("thead", _hoisted_4$k, [
11667
+ vue.unref(isSelectable) ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_5$j, [
11641
11668
  vue.createElementVNode("input", {
11642
11669
  ref_key: "allSelectorEl",
11643
11670
  ref: allSelectorEl,
@@ -11654,7 +11681,7 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
11654
11681
  class: "col",
11655
11682
  onClick: ($event) => vue.unref(toggleSort)((field == null ? void 0 : field.id) || "")
11656
11683
  }, [
11657
- vue.createElementVNode("div", _hoisted_6$f, [
11684
+ vue.createElementVNode("div", _hoisted_7$c, [
11658
11685
  vue.createTextVNode(vue.toDisplayString(field.label || vue.unref(keyToLabel)(field == null ? void 0 : field.id)) + " ", 1),
11659
11686
  vue.createElementVNode("div", {
11660
11687
  class: vue.normalizeClass(["list-arrows", { sorted: vue.unref(sortField) === (field == null ? void 0 : field.id) }])
@@ -11665,7 +11692,7 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
11665
11692
  }, null, 8, ["class"])
11666
11693
  ], 2)
11667
11694
  ])
11668
- ], 8, _hoisted_5$i);
11695
+ ], 8, _hoisted_6$g);
11669
11696
  }), 128))
11670
11697
  ]),
11671
11698
  vue.createElementVNode("tbody", null, [
@@ -11675,7 +11702,7 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
11675
11702
  class: vue.normalizeClass(["row row-item position-relative", { selected: (row == null ? void 0 : row.id) && vue.unref(computedSelectedItems).includes(row.id) }]),
11676
11703
  onClick: ($event) => vue.unref(toggleSelectItem)(row)
11677
11704
  }, [
11678
- vue.unref(isSelectable) ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_8$7, [
11705
+ vue.unref(isSelectable) ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_9$6, [
11679
11706
  vue.createElementVNode("div", {
11680
11707
  onClick: _cache[3] || (_cache[3] = vue.withModifiers(() => {
11681
11708
  }, ["stop"]))
@@ -11684,7 +11711,7 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
11684
11711
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => selectedItems.value = $event),
11685
11712
  type: "checkbox",
11686
11713
  value: (row == null ? void 0 : row.id) || ""
11687
- }, null, 8, _hoisted_9$6), [
11714
+ }, null, 8, _hoisted_10$6), [
11688
11715
  [vue.vModelCheckbox, selectedItems.value]
11689
11716
  ])
11690
11717
  ])
@@ -11698,12 +11725,12 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
11698
11725
  key: 0,
11699
11726
  row,
11700
11727
  field
11701
- }, void 0, true) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_10$6, [
11728
+ }, void 0, true) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$6, [
11702
11729
  (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(renderFieldForRow(field, row))))
11703
11730
  ]))
11704
11731
  ]);
11705
11732
  }), 128))
11706
- ], 10, _hoisted_7$c);
11733
+ ], 10, _hoisted_8$7);
11707
11734
  }), 128)),
11708
11735
  props2.onLastItemVisible !== void 0 ? (vue.openBlock(), vue.createElementBlock("tr", {
11709
11736
  key: 0,
@@ -11718,7 +11745,7 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
11718
11745
  };
11719
11746
  }
11720
11747
  });
11721
- const DataTable = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-43f28baa"]]);
11748
+ const DataTable = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-30ec790f"]]);
11722
11749
  function useDraggable(options = {}) {
11723
11750
  const isDragging = vue.ref(false);
11724
11751
  const dragElement = vue.ref(null);
@@ -14898,7 +14925,7 @@ const _sfc_main$W = /* @__PURE__ */ vue.defineComponent({
14898
14925
  };
14899
14926
  }
14900
14927
  });
14901
- const _hoisted_1$M = { class: "px-1 pt-025 pb-1" };
14928
+ const _hoisted_1$N = { class: "px-1 pt-025 pb-1" };
14902
14929
  const _hoisted_2$z = { class: "ms-1" };
14903
14930
  const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
14904
14931
  __name: "FieldSetVue",
@@ -14908,7 +14935,7 @@ const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
14908
14935
  },
14909
14936
  setup(__props) {
14910
14937
  return (_ctx, _cache) => {
14911
- return vue.openBlock(), vue.createElementBlock("fieldset", _hoisted_1$M, [
14938
+ return vue.openBlock(), vue.createElementBlock("fieldset", _hoisted_1$N, [
14912
14939
  vue.createElementVNode("legend", _hoisted_2$z, vue.toDisplayString(_ctx.legend || _ctx.label), 1),
14913
14940
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
14914
14941
  ]);
@@ -15356,6 +15383,7 @@ function getNestedValue(obj, path, defaultValue = void 0) {
15356
15383
  }
15357
15384
  return current ?? defaultValue;
15358
15385
  }
15386
+ const _hoisted_1$M = { class: "flex-center h-300px" };
15359
15387
  const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
15360
15388
  __name: "BagelForm",
15361
15389
  props: {
@@ -15369,52 +15397,65 @@ const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
15369
15397
  setup(__props, { expose: __expose, emit: __emit }) {
15370
15398
  const props2 = __props;
15371
15399
  const emit2 = __emit;
15372
- function safeClone2(obj) {
15373
- if (!obj) return obj;
15374
- try {
15375
- return JSON.parse(JSON.stringify(obj));
15376
- } catch (e) {
15377
- console.warn("Failed to clone object:", e);
15378
- return obj;
15379
- }
15380
- }
15400
+ const clone2 = (obj) => !obj ? obj : JSON.parse(JSON.stringify(obj));
15381
15401
  const form = vue.ref();
15382
- const formData = vue.ref(safeClone2(props2.modelValue ?? {}));
15383
- const initialFormData = vue.ref(safeClone2(props2.modelValue ?? {}));
15384
- vue.onMounted(() => {
15385
- if (props2.modelValue) {
15386
- initialFormData.value = safeClone2(props2.modelValue);
15387
- }
15388
- });
15402
+ const formData = vue.ref(clone2(props2.modelValue ?? {}));
15403
+ const initialFormData = vue.ref(clone2(props2.modelValue ?? {}));
15389
15404
  const formState = vue.ref("idle");
15390
- vue.watch(() => props2.modelValue, (newValue) => {
15391
- if (newValue !== void 0) {
15392
- formData.value = safeClone2(newValue);
15393
- }
15394
- }, { immediate: true, deep: true });
15395
- const resolvedSchema = vue.computed(() => {
15396
- if (!props2.schema) return void 0;
15397
- return typeof props2.schema === "function" ? props2.schema() : props2.schema;
15398
- });
15405
+ const schemaState = vue.ref("loaded");
15406
+ const resolvedSchemaData = vue.ref();
15407
+ const schemaRef = vue.toRef(props2, "schema");
15408
+ const resolvedSchema = vue.computed(() => resolvedSchemaData.value);
15399
15409
  const isDirty = vue.computed(() => {
15400
15410
  try {
15401
- const current = JSON.stringify(formData.value);
15402
- const initial = JSON.stringify(initialFormData.value);
15403
- return current !== initial;
15404
- } catch (e) {
15405
- console.warn("Failed to compare form data:", e);
15411
+ return JSON.stringify(formData.value) !== JSON.stringify(initialFormData.value);
15412
+ } catch {
15406
15413
  return false;
15407
15414
  }
15408
15415
  });
15416
+ vue.onMounted(() => {
15417
+ if (props2.modelValue) initialFormData.value = clone2(props2.modelValue);
15418
+ refreshSchema();
15419
+ });
15420
+ vue.watch(() => props2.modelValue, (val) => {
15421
+ if (val !== void 0) formData.value = clone2(val);
15422
+ }, { immediate: true, deep: true });
15423
+ async function resolveSchema(schema) {
15424
+ if (!schema) {
15425
+ resolvedSchemaData.value = void 0;
15426
+ schemaState.value = "loaded";
15427
+ return;
15428
+ }
15429
+ try {
15430
+ schemaState.value = "loading";
15431
+ const isPromise = (obj) => obj && typeof obj.then === "function";
15432
+ let result2;
15433
+ if (typeof schema === "function") {
15434
+ result2 = schema();
15435
+ result2 = isPromise(result2) ? await result2 : result2;
15436
+ } else {
15437
+ result2 = isPromise(schema) ? await schema : schema;
15438
+ }
15439
+ resolvedSchemaData.value = result2;
15440
+ schemaState.value = "loaded";
15441
+ } catch (error) {
15442
+ console.error("Schema error:", error);
15443
+ schemaState.value = "error";
15444
+ resolvedSchemaData.value = void 0;
15445
+ }
15446
+ }
15447
+ async function refreshSchema() {
15448
+ await resolveSchema(props2.schema);
15449
+ return resolvedSchemaData.value;
15450
+ }
15451
+ vue.watch(schemaRef, resolveSchema, { immediate: true, deep: true });
15409
15452
  function updateFormData(fieldId, value) {
15410
15453
  const keys4 = fieldId.split(".");
15411
- const newData = safeClone2(formData.value);
15454
+ const newData = clone2(formData.value);
15412
15455
  let current = newData;
15413
15456
  for (let i2 = 0; i2 < keys4.length - 1; i2++) {
15414
15457
  const key = keys4[i2];
15415
- if (!current[key] || typeof current[key] !== "object") {
15416
- current[key] = {};
15417
- }
15458
+ if (!current[key] || typeof current[key] !== "object") current[key] = {};
15418
15459
  current = current[key];
15419
15460
  }
15420
15461
  current[keys4[keys4.length - 1]] = value;
@@ -15427,38 +15468,34 @@ const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
15427
15468
  if (formState.value === "submitting") return;
15428
15469
  formState.value = "submitting";
15429
15470
  await ((_a = props2.onSubmit) == null ? void 0 : _a.call(props2, formData.value));
15430
- initialFormData.value = safeClone2(formData.value);
15471
+ initialFormData.value = clone2(formData.value);
15431
15472
  formState.value = "success";
15432
15473
  window.parent.postMessage({ type: "BAGEL_FORM_SUCCESS", data: JSON.stringify(formData.value) }, "*");
15433
15474
  } catch (error) {
15434
- console.error("Form submission error:", error);
15475
+ console.error("Submit error:", error);
15435
15476
  formState.value = "error";
15436
15477
  }
15437
15478
  }
15438
- function validateForm() {
15439
- if (!form.value) return false;
15440
- return form.value.reportValidity();
15441
- }
15479
+ const validateForm = () => {
15480
+ var _a;
15481
+ return ((_a = form.value) == null ? void 0 : _a.reportValidity()) ?? false;
15482
+ };
15442
15483
  const { renderField } = useSchemaField({
15443
15484
  mode: "form",
15444
- getRowData: () => {
15445
- return {
15446
- ...formData.value,
15447
- // Add a special getter to handle nested paths
15448
- get: (path) => getNestedValue(formData.value, path, "")
15449
- };
15450
- },
15485
+ getRowData: () => ({
15486
+ ...formData.value,
15487
+ get: (path) => getNestedValue(formData.value, path, "")
15488
+ }),
15451
15489
  onUpdate: (field, value) => {
15452
15490
  var _a;
15453
- if (!field.id) return;
15454
- updateFormData(field.id, value);
15455
- (_a = field.onUpdate) == null ? void 0 : _a.call(field, value, formData.value);
15491
+ if (field.id) {
15492
+ updateFormData(field.id, value);
15493
+ (_a = field.onUpdate) == null ? void 0 : _a.call(field, value, formData.value);
15494
+ }
15456
15495
  }
15457
15496
  });
15458
- function renderSchemaField(field) {
15459
- return renderField(field);
15460
- }
15461
- __expose({ form, isDirty: isDirty.value, validateForm });
15497
+ const renderSchemaField = (field) => renderField(field);
15498
+ __expose({ form, isDirty, validateForm, resolveSchema, refreshSchema });
15462
15499
  return (_ctx, _cache) => {
15463
15500
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
15464
15501
  formState.value !== "success" || !_ctx.$slots.success ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
@@ -15469,23 +15506,36 @@ const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
15469
15506
  class: vue.normalizeClass(props2.class),
15470
15507
  onSubmit: vue.withModifiers(handleSubmit, ["prevent"])
15471
15508
  }, [
15472
- resolvedSchema.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(resolvedSchema.value, (field) => {
15509
+ schemaState.value === "loading" ? vue.renderSlot(_ctx.$slots, "loading", { key: 0 }, () => [
15510
+ vue.createElementVNode("div", _hoisted_1$M, [
15511
+ vue.createVNode(vue.unref(Loading))
15512
+ ])
15513
+ ]) : schemaState.value === "error" ? vue.renderSlot(_ctx.$slots, "schema-error", { key: 1 }, () => [
15514
+ _cache[0] || (_cache[0] = vue.createElementVNode("div", { class: "flex-center h-300px txt-red" }, " Error loading form ", -1))
15515
+ ]) : resolvedSchema.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 2 }, vue.renderList(resolvedSchema.value, (field) => {
15473
15516
  return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(renderSchemaField(field)), {
15474
15517
  key: field.id
15475
15518
  });
15476
- }), 128)) : vue.renderSlot(_ctx.$slots, "default", { key: 1 }),
15519
+ }), 128)) : vue.renderSlot(_ctx.$slots, "default", { key: 3 }),
15477
15520
  vue.renderSlot(_ctx.$slots, "submit", {
15478
15521
  submit: handleSubmit,
15479
15522
  isDirty: isDirty.value,
15480
15523
  validateForm,
15481
- formState: formState.value
15524
+ formState: formState.value,
15525
+ schemaState: schemaState.value
15482
15526
  })
15483
- ], 34)) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(resolvedSchema.value, (field) => {
15484
- return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(renderSchemaField(field)), {
15485
- key: field.id,
15486
- class: vue.normalizeClass(props2.class)
15487
- }, null, 8, ["class"]);
15488
- }), 128))
15527
+ ], 34)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
15528
+ schemaState.value === "loading" ? vue.renderSlot(_ctx.$slots, "loading", { key: 0 }, () => [
15529
+ vue.createVNode(vue.unref(Loading))
15530
+ ]) : schemaState.value === "error" ? vue.renderSlot(_ctx.$slots, "schema-error", { key: 1 }, () => [
15531
+ _cache[1] || (_cache[1] = vue.createElementVNode("div", { class: "flex-center h-300px txt-red" }, " Error loading form ", -1))
15532
+ ]) : resolvedSchema.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 2 }, vue.renderList(resolvedSchema.value, (field) => {
15533
+ return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(renderSchemaField(field)), {
15534
+ key: field.id,
15535
+ class: vue.normalizeClass(props2.class)
15536
+ }, null, 8, ["class"]);
15537
+ }), 128)) : vue.createCommentVNode("", true)
15538
+ ], 64))
15489
15539
  ], 64)) : vue.createCommentVNode("", true),
15490
15540
  formState.value === "success" ? vue.renderSlot(_ctx.$slots, "success", { key: 1 }) : vue.createCommentVNode("", true),
15491
15541
  formState.value === "error" ? vue.renderSlot(_ctx.$slots, "error", { key: 2 }) : vue.createCommentVNode("", true)
@@ -15499,10 +15549,18 @@ const _hoisted_2$y = {
15499
15549
  class: "ps-025 border-start mb-05"
15500
15550
  };
15501
15551
  const _hoisted_3$t = {
15552
+ key: 0,
15553
+ class: "flex-center h-300px"
15554
+ };
15555
+ const _hoisted_4$j = {
15556
+ key: 1,
15557
+ class: "flex-center h-300px txt-red"
15558
+ };
15559
+ const _hoisted_5$i = {
15502
15560
  key: 0,
15503
15561
  class: "minimizedText txt14 p-025 opacity-7"
15504
15562
  };
15505
- const _hoisted_4$j = { class: "bg-gray-80 -my-05 px-025 pt-065 pb-05 txt-center space-between flex column" };
15563
+ const _hoisted_6$f = { class: "bg-gray-80 -my-05 px-025 pt-065 pb-05 txt-center space-between flex column" };
15506
15564
  const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
15507
15565
  __name: "FieldArray",
15508
15566
  props: {
@@ -15529,109 +15587,114 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
15529
15587
  const props2 = __props;
15530
15588
  const emit2 = __emit;
15531
15589
  const minimizedItems = vue.ref([]);
15532
- const data2 = vue.ref(props2.modelValue || []);
15590
+ const internalData = vue.ref(props2.modelValue || []);
15591
+ const schemaState = vue.ref("loaded");
15592
+ const resolvedSchemaData = vue.ref([]);
15593
+ async function resolveSchema() {
15594
+ if (!props2.schema) {
15595
+ resolvedSchemaData.value = [];
15596
+ schemaState.value = "loaded";
15597
+ return;
15598
+ }
15599
+ try {
15600
+ schemaState.value = "loading";
15601
+ const isPromise = (obj) => obj && typeof obj.then === "function";
15602
+ let result2;
15603
+ if (typeof props2.schema === "function") {
15604
+ result2 = props2.schema();
15605
+ result2 = isPromise(result2) ? await result2 : result2;
15606
+ } else {
15607
+ result2 = isPromise(props2.schema) ? await props2.schema : props2.schema;
15608
+ }
15609
+ resolvedSchemaData.value = result2;
15610
+ schemaState.value = "loaded";
15611
+ } catch (error) {
15612
+ console.error("Schema error:", error);
15613
+ schemaState.value = "error";
15614
+ resolvedSchemaData.value = [];
15615
+ }
15616
+ }
15617
+ vue.onMounted(() => {
15618
+ resolveSchema();
15619
+ });
15533
15620
  function emitValue() {
15534
- emit2("update:modelValue", data2.value);
15621
+ emit2("update:modelValue", internalData.value);
15535
15622
  }
15536
15623
  function deleteItem(i2) {
15537
- data2.value.splice(i2, 1);
15624
+ internalData.value.splice(i2, 1);
15538
15625
  emitValue();
15539
15626
  }
15540
15627
  function addItem() {
15541
- data2.value.push({});
15628
+ internalData.value.push({});
15542
15629
  emitValue();
15543
15630
  }
15544
15631
  function toggleMinimized(index2) {
15545
15632
  minimizedItems.value[index2] = !minimizedItems.value[index2];
15546
15633
  }
15547
- const computedField = vue.computed(
15548
- () => ({
15549
- label: props2.label,
15550
- placeholder: props2.placeholder,
15551
- children: props2.children,
15552
- // class: props.class,
15553
- attrs: props2.attrs,
15554
- required: props2.required,
15555
- disabled: props2.disabled,
15556
- helptext: props2.helptext,
15557
- options: props2.options,
15558
- defaultValue: props2.defaultValue,
15559
- transform: props2.transform,
15560
- $el: props2.el
15561
- })
15562
- );
15563
- const resolvedSchema = vue.computed(() => {
15564
- if (!props2.schema) return [];
15565
- return typeof props2.schema === "function" ? props2.schema() : props2.schema;
15566
- });
15567
- const { renderField } = useSchemaField({
15568
- mode: "form",
15569
- getRowData: () => data2.value,
15570
- onUpdate: (field, value) => {
15571
- if (!field.id) return;
15572
- const index2 = Number.parseInt(field.id);
15573
- if (Number.isNaN(index2)) return;
15574
- data2.value[index2] = value;
15575
- emitValue();
15576
- }
15577
- });
15634
+ function updateItem(index2, value) {
15635
+ internalData.value[index2] = value;
15636
+ emitValue();
15637
+ }
15578
15638
  return (_ctx, _cache) => {
15579
15639
  return vue.openBlock(), vue.createElementBlock("div", {
15580
15640
  class: vue.normalizeClass(props2.class)
15581
15641
  }, [
15582
15642
  vue.createElementVNode("p", _hoisted_1$L, vue.toDisplayString(_ctx.label), 1),
15583
- resolvedSchema.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$y, [
15584
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(data2.value, (_2, i2) => {
15585
- return vue.openBlock(), vue.createElementBlock("div", {
15586
- key: i2,
15587
- outline: "",
15588
- thin: "",
15589
- class: vue.normalizeClass(["mb-05 itemBox transition ps-05 pb-025 pt-025 radius-05 gap-05 overflow-hidden", { minimized: minimizedItems.value[i2] }])
15590
- }, [
15591
- minimizedItems.value[i2] ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_3$t, vue.toDisplayString(_ctx.label) + " " + vue.toDisplayString(i2 + 1), 1)) : (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$T), {
15592
- key: 1,
15593
- modelValue: data2.value[i2],
15594
- "onUpdate:modelValue": [($event) => data2.value[i2] = $event, emitValue],
15595
- schema: resolvedSchema.value
15596
- }, null, 8, ["modelValue", "onUpdate:modelValue", "schema"])),
15597
- vue.createElementVNode("div", _hoisted_4$j, [
15598
- resolvedSchema.value.length > 4 ? (vue.openBlock(), vue.createBlock(vue.unref(Btn), {
15599
- key: 0,
15600
- class: "block rotate-180 txt10 opacity-7 p-025",
15601
- flat: "",
15602
- thin: "",
15603
- icon: "keyboard_arrow_down",
15604
- onClick: ($event) => toggleMinimized(i2)
15605
- }, null, 8, ["onClick"])) : vue.createCommentVNode("", true),
15606
- props2.delete ? (vue.openBlock(), vue.createBlock(vue.unref(Btn), {
15643
+ resolvedSchemaData.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$y, [
15644
+ schemaState.value === "loading" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$t, [
15645
+ vue.createVNode(vue.unref(Loading))
15646
+ ])) : schemaState.value === "error" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$j, " Error ")) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
15647
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(internalData.value, (item, i2) => {
15648
+ return vue.openBlock(), vue.createElementBlock("div", {
15649
+ key: i2,
15650
+ outline: "",
15651
+ thin: "",
15652
+ class: vue.normalizeClass(["mb-05 itemBox transition ps-05 pb-025 pt-025 radius-05 gap-05 overflow-hidden", { minimized: minimizedItems.value[i2] }])
15653
+ }, [
15654
+ minimizedItems.value[i2] ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_5$i, vue.toDisplayString(_ctx.label) + " " + vue.toDisplayString(i2 + 1), 1)) : (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$T), {
15607
15655
  key: 1,
15608
- icon: "delete",
15609
- class: "txt10 opacity-7",
15610
- thin: "",
15611
- flat: "",
15612
- onClick: ($event) => deleteItem(i2)
15613
- }, null, 8, ["onClick"])) : vue.createCommentVNode("", true)
15614
- ])
15615
- ], 2);
15616
- }), 128)),
15617
- _ctx.add ? (vue.openBlock(), vue.createBlock(vue.unref(Btn), {
15618
- key: 0,
15619
- thin: "",
15620
- icon: "add",
15621
- color: "gray",
15622
- class: "txt12",
15623
- onClick: addItem
15624
- }, {
15625
- default: vue.withCtx(() => [
15626
- vue.createElementVNode("p", null, vue.toDisplayString(_ctx.label), 1)
15627
- ]),
15628
- _: 1
15629
- })) : vue.createCommentVNode("", true)
15630
- ])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(data2.value, (_2, i2) => {
15631
- return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(renderField)({ ...computedField.value, id: String(i2) })), {
15632
- key: i2,
15633
- "onUpdate:modelValue": emitValue
15634
- });
15656
+ "model-value": item,
15657
+ schema: resolvedSchemaData.value,
15658
+ "onUpdate:modelValue": (val) => updateItem(i2, val)
15659
+ }, null, 8, ["model-value", "schema", "onUpdate:modelValue"])),
15660
+ vue.createElementVNode("div", _hoisted_6$f, [
15661
+ resolvedSchemaData.value.length > 4 ? (vue.openBlock(), vue.createBlock(vue.unref(Btn), {
15662
+ key: 0,
15663
+ class: "block rotate-180 txt10 opacity-7 p-025",
15664
+ flat: "",
15665
+ thin: "",
15666
+ icon: "keyboard_arrow_down",
15667
+ onClick: ($event) => toggleMinimized(i2)
15668
+ }, null, 8, ["onClick"])) : vue.createCommentVNode("", true),
15669
+ props2.delete ? (vue.openBlock(), vue.createBlock(vue.unref(Btn), {
15670
+ key: 1,
15671
+ icon: "delete",
15672
+ class: "txt10 opacity-7",
15673
+ thin: "",
15674
+ flat: "",
15675
+ onClick: ($event) => deleteItem(i2)
15676
+ }, null, 8, ["onClick"])) : vue.createCommentVNode("", true)
15677
+ ])
15678
+ ], 2);
15679
+ }), 128)),
15680
+ _ctx.add ? (vue.openBlock(), vue.createBlock(vue.unref(Btn), {
15681
+ key: 0,
15682
+ thin: "",
15683
+ icon: "add",
15684
+ color: "gray",
15685
+ class: "txt12",
15686
+ onClick: addItem
15687
+ }, {
15688
+ default: vue.withCtx(() => [
15689
+ vue.createElementVNode("p", null, vue.toDisplayString(_ctx.label), 1)
15690
+ ]),
15691
+ _: 1
15692
+ })) : vue.createCommentVNode("", true)
15693
+ ], 64))
15694
+ ])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(internalData.value, (_2, i2) => {
15695
+ return vue.openBlock(), vue.createElementBlock("div", { key: i2 }, _cache[0] || (_cache[0] = [
15696
+ vue.createElementVNode("p", null, "No schema available", -1)
15697
+ ]));
15635
15698
  }), 128))
15636
15699
  ], 2);
15637
15700
  };
@@ -34126,7 +34189,7 @@ const _hoisted_1$c = { class: "flex-center" };
34126
34189
  const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
34127
34190
  __name: "Loading",
34128
34191
  props: {
34129
- size: { default: 64 },
34192
+ size: { default: 50 },
34130
34193
  thickness: {},
34131
34194
  duration: { default: 1.2 },
34132
34195
  type: { default: "ring" },
@@ -34141,7 +34204,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
34141
34204
  const computedSize = vue.computed(() => standardSize(__props.size));
34142
34205
  const animationDuration = vue.computed(() => `${__props.duration}s`);
34143
34206
  const computedBorder = vue.computed(() => {
34144
- const borderValue = __props.thickness ?? Number.parseInt(computedSize.value) / 7;
34207
+ const borderValue = __props.thickness ?? Math.max(Number.parseInt(computedSize.value) / 9, 2);
34145
34208
  return standardSize(borderValue);
34146
34209
  });
34147
34210
  return (_ctx, _cache) => {
@@ -34187,7 +34250,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
34187
34250
  };
34188
34251
  }
34189
34252
  });
34190
- const Loading = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-2e27b3c1"]]);
34253
+ const Loading = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-221a3053"]]);
34191
34254
  const _hoisted_1$b = ["id"];
34192
34255
  const defaultMarkerSVG = '<svg width="28" height="38" viewBox="0 0 28 38" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.2263 37.7955C17.0897 37.7955 19.4109 37.0138 19.4109 36.0496C19.4109 35.0854 17.0897 34.3037 14.2263 34.3037C11.363 34.3037 9.04175 35.0854 9.04175 36.0496C9.04175 37.0138 11.363 37.7955 14.2263 37.7955Z" fill="black" fill-opacity="0.1"/><path d="M14.2265 0.549591C21.2842 0.549591 27.0131 6.23786 27.0787 13.28V13.4024C27.0787 19.3328 24.4759 24.4306 21.5627 28.2764C18.6511 32.12 15.4577 34.6754 14.3457 35.5097C14.2748 35.5629 14.1778 35.5629 14.1068 35.5097C12.9947 34.675 9.80135 32.1197 6.88984 28.2762C3.97665 24.4304 1.37378 19.3328 1.37378 13.4024C1.37378 6.30387 7.12806 0.549591 14.2265 0.549591Z" fill="#ED1b3E" stroke="#ED6C6F"/><path d="M14.2263 21.6185C18.7639 21.6185 22.4424 17.94 22.4424 13.4024C22.4424 8.86477 18.7639 5.18631 14.2263 5.18631C9.68872 5.18631 6.01025 8.86477 6.01025 13.4024C6.01025 17.94 9.68872 21.6185 14.2263 21.6185Z" fill="white"/></svg>';
34193
34256
  const leafletScriptUrl = "https://unpkg.com/leaflet@1.9.4/dist/leaflet.js";
@@ -36220,10 +36283,17 @@ function useBagelFormState() {
36220
36283
  if (!state2) throw new Error("BagelFormState must be provided");
36221
36284
  return state2;
36222
36285
  }
36223
- function useBglSchema({ schema, columns, data: data2 } = {}) {
36286
+ async function useBglSchema({ schema, columns, data: data2 } = {}) {
36224
36287
  let _schema = schema;
36225
36288
  if (typeof _schema === "function") {
36226
- _schema = _schema();
36289
+ const result2 = _schema();
36290
+ if (result2 instanceof Promise) {
36291
+ _schema = await result2;
36292
+ } else {
36293
+ _schema = result2;
36294
+ }
36295
+ } else if (_schema instanceof Promise) {
36296
+ _schema = await _schema;
36227
36297
  }
36228
36298
  if (_schema) {
36229
36299
  return columns && columns.length > 0 ? _schema.filter((f2) => columns.includes(f2.id)) : _schema;