@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.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { defineComponent, reactive, provide, openBlock, createElementBlock, renderSlot, ref, computed, inject, watch, normalizeClass, createElementVNode, unref, createVNode, createCommentVNode, toDisplayString, Transition, withCtx, isRef, Fragment, renderList, createBlock, useSlots, resolveDirective, withDirectives, resolveDynamicComponent, mergeProps, withModifiers, withKeys, createTextVNode, normalizeStyle, useCssVars, onMounted, Comment, Text, nextTick, onBeforeUnmount, onUnmounted, resolveComponent, isVNode, h as h$2, getCurrentScope, onScopeDispose, toValue, getCurrentInstance, shallowRef, mergeModels, useModel, normalizeProps, vModelCheckbox, pushScopeId, popScopeId, guardReactiveProps, withScopeId, createApp, vModelText, vModelRadio, TransitionGroup, vModelDynamic, toRef, createSlots } from "vue";
4
+ import { defineComponent, reactive, provide, openBlock, createElementBlock, renderSlot, ref, computed, inject, watch, normalizeClass, createElementVNode, unref, createVNode, createCommentVNode, toDisplayString, Transition, withCtx, isRef, Fragment, renderList, createBlock, useSlots, resolveDirective, withDirectives, resolveDynamicComponent, mergeProps, withModifiers, withKeys, createTextVNode, normalizeStyle, useCssVars, onMounted, Comment, Text, nextTick, onBeforeUnmount, onUnmounted, resolveComponent, isVNode, h as h$2, getCurrentScope, onScopeDispose, toValue, getCurrentInstance, shallowRef, mergeModels, useModel, normalizeProps, vModelCheckbox, pushScopeId, popScopeId, guardReactiveProps, withScopeId, createApp, toRef, vModelText, vModelRadio, TransitionGroup, vModelDynamic, createSlots } from "vue";
5
5
  import { RouterLink } from "vue-router";
6
6
  const _sfc_main$1n = /* @__PURE__ */ defineComponent({
7
7
  __name: "Accordion",
@@ -17,7 +17,7 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
17
17
  };
18
18
  }
19
19
  });
20
- const _hoisted_1$1a = ["aria-expanded", "aria-controls"];
20
+ const _hoisted_1$1b = ["aria-expanded", "aria-controls"];
21
21
  const _hoisted_2$T = { class: "accordion-label" };
22
22
  const _hoisted_3$I = ["id", "aria-hidden"];
23
23
  const _sfc_main$1m = /* @__PURE__ */ defineComponent({
@@ -94,7 +94,7 @@ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
94
94
  }, [
95
95
  createVNode(unref(_sfc_main$s), { icon: computedIcon.value }, null, 8, ["icon"])
96
96
  ], 2)) : createCommentVNode("", true)
97
- ], 8, _hoisted_1$1a),
97
+ ], 8, _hoisted_1$1b),
98
98
  createVNode(Transition, { name: "expand" }, {
99
99
  default: withCtx(() => [
100
100
  unref(isOpen) ? (openBlock(), createElementBlock("div", {
@@ -120,7 +120,7 @@ const _export_sfc = (sfc, props2) => {
120
120
  return target;
121
121
  };
122
122
  const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["__scopeId", "data-v-3334f637"]]);
123
- const _hoisted_1$19 = { class: "relative" };
123
+ const _hoisted_1$1a = { class: "relative" };
124
124
  const _sfc_main$1l = /* @__PURE__ */ defineComponent({
125
125
  __name: "AddressSearch",
126
126
  emits: ["addressSelected"],
@@ -143,7 +143,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
143
143
  (_a = suggestion.value) == null ? void 0 : _a.show();
144
144
  }
145
145
  return (_ctx, _cache) => {
146
- return openBlock(), createElementBlock("div", _hoisted_1$19, [
146
+ return openBlock(), createElementBlock("div", _hoisted_1$1a, [
147
147
  createVNode(unref(_sfc_main$W), {
148
148
  ref_key: "suggestion",
149
149
  ref: suggestion,
@@ -179,7 +179,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
179
179
  };
180
180
  }
181
181
  });
182
- const _hoisted_1$18 = {
182
+ const _hoisted_1$19 = {
183
183
  key: 1,
184
184
  class: "bgl_btn-flex"
185
185
  };
@@ -249,7 +249,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
249
249
  key: 0,
250
250
  class: "h-100p",
251
251
  size: "15"
252
- })) : (openBlock(), createElementBlock("div", _hoisted_1$18, [
252
+ })) : (openBlock(), createElementBlock("div", _hoisted_1$19, [
253
253
  _ctx.icon ? (openBlock(), createBlock(unref(_sfc_main$s), {
254
254
  key: 0,
255
255
  icon: _ctx.icon,
@@ -274,7 +274,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
274
274
  }
275
275
  });
276
276
  const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["__scopeId", "data-v-bfc435b3"]]);
277
- const _hoisted_1$17 = ["dismissable"];
277
+ const _hoisted_1$18 = ["dismissable"];
278
278
  const _hoisted_2$S = { class: "m-0" };
279
279
  const _sfc_main$1j = /* @__PURE__ */ defineComponent({
280
280
  __name: "Alert",
@@ -312,12 +312,12 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
312
312
  icon: "close",
313
313
  onClick: _cache[0] || (_cache[0] = ($event) => isDismissed.value = true)
314
314
  })
315
- ], 10, _hoisted_1$17)) : createCommentVNode("", true);
315
+ ], 10, _hoisted_1$18)) : createCommentVNode("", true);
316
316
  };
317
317
  }
318
318
  });
319
319
  const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["__scopeId", "data-v-064bdd20"]]);
320
- const _hoisted_1$16 = ["src", "alt"];
320
+ const _hoisted_1$17 = ["src", "alt"];
321
321
  const _sfc_main$1i = /* @__PURE__ */ defineComponent({
322
322
  __name: "Avatar",
323
323
  props: {
@@ -336,7 +336,7 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
336
336
  key: 0,
337
337
  src: _ctx.src,
338
338
  alt: _ctx.name
339
- }, null, 8, _hoisted_1$16)) : (openBlock(), createElementBlock("p", {
339
+ }, null, 8, _hoisted_1$17)) : (openBlock(), createElementBlock("p", {
340
340
  key: 1,
341
341
  style: normalizeStyle({ "line-height": `${_ctx.size}px`, "font-size": `calc(1.5rem * ${_ctx.size} / 50)` })
342
342
  }, toDisplayString((_ctx.fallback || unref(initials)(_ctx.name || "")).toUpperCase()), 5))
@@ -375,7 +375,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
375
375
  }
376
376
  });
377
377
  const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["__scopeId", "data-v-689f051f"]]);
378
- const _hoisted_1$15 = ["src"];
378
+ const _hoisted_1$16 = ["src"];
379
379
  const _hoisted_2$R = ["autoplay", "muted", "loop", "controls", "playsinline"];
380
380
  const _hoisted_3$H = ["src", "type"];
381
381
  const _sfc_main$1g = /* @__PURE__ */ defineComponent({
@@ -455,7 +455,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
455
455
  allowfullscreen: "",
456
456
  title: "Video",
457
457
  allow: "autoplay"
458
- }, null, 12, _hoisted_1$15)) : _ctx.src ? (openBlock(), createElementBlock("video", {
458
+ }, null, 12, _hoisted_1$16)) : _ctx.src ? (openBlock(), createElementBlock("video", {
459
459
  key: 1,
460
460
  ref_key: "video",
461
461
  ref: video,
@@ -606,7 +606,7 @@ function translate(key, locale2 = "en-US") {
606
606
  const language = languageKeys[key] || {};
607
607
  return language[locale2] || key;
608
608
  }
609
- const _hoisted_1$14 = { class: "flex gap-05 space-between pb-1 datePick" };
609
+ const _hoisted_1$15 = { class: "flex gap-05 space-between pb-1 datePick" };
610
610
  const _hoisted_2$Q = { class: "flex gap-1 m_gap-025" };
611
611
  const _sfc_main$1f = /* @__PURE__ */ defineComponent({
612
612
  __name: "Header",
@@ -686,7 +686,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
686
686
  emit2("updatedPeriod", currentPeriod.value);
687
687
  }
688
688
  return (_ctx, _cache) => {
689
- return openBlock(), createElementBlock("div", _hoisted_1$14, [
689
+ return openBlock(), createElementBlock("div", _hoisted_1$15, [
690
690
  createElementVNode("div", _hoisted_2$Q, [
691
691
  createVNode(unref(Btn), {
692
692
  flat: "",
@@ -737,7 +737,7 @@ const EVENT_COLORS = {
737
737
  };
738
738
  const DATE_TIME_STRING_PATTERN = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/;
739
739
  const DATE_TIME_STRING_FULL_DAY_PATTERN = /^\d{4}-\d{2}-\d{2}$/;
740
- const _hoisted_1$13 = ["id"];
740
+ const _hoisted_1$14 = ["id"];
741
741
  const _hoisted_2$P = { class: "flex txt14 flex column align-items-start gap-025 opacity-6" };
742
742
  const _hoisted_3$G = {
743
743
  key: 0,
@@ -747,8 +747,8 @@ const _hoisted_4$u = {
747
747
  key: 1,
748
748
  class: "agenda__event-location flex gap-025"
749
749
  };
750
- const _hoisted_5$p = { class: "agenda__event-title" };
751
- const _hoisted_6$l = {
750
+ const _hoisted_5$q = { class: "agenda__event-title" };
751
+ const _hoisted_6$m = {
752
752
  key: 0,
753
753
  class: "agenda__event-with txt14 opacity-6"
754
754
  };
@@ -844,25 +844,25 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
844
844
  ])) : createCommentVNode("", true)
845
845
  ]),
846
846
  createElementVNode("div", null, [
847
- createElementVNode("div", _hoisted_5$p, toDisplayString(__props.calendarEvent.title), 1),
848
- __props.calendarEvent.with ? (openBlock(), createElementBlock("div", _hoisted_6$l, [
847
+ createElementVNode("div", _hoisted_5$q, toDisplayString(__props.calendarEvent.title), 1),
848
+ __props.calendarEvent.with ? (openBlock(), createElementBlock("div", _hoisted_6$m, [
849
849
  createVNode(unref(_sfc_main$s), {
850
850
  icon: icons.user
851
851
  }, null, 8, ["icon"]),
852
852
  createTextVNode(" " + toDisplayString(__props.calendarEvent.with), 1)
853
853
  ])) : createCommentVNode("", true)
854
854
  ])
855
- ], 8, _hoisted_1$13);
855
+ ], 8, _hoisted_1$14);
856
856
  };
857
857
  }
858
858
  });
859
859
  const AgendaEventTile = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["__scopeId", "data-v-5740437b"]]);
860
- const _hoisted_1$12 = { class: "agenda__wrapper grid align-items-start gap-1 h-100p" };
860
+ const _hoisted_1$13 = { class: "agenda__wrapper grid align-items-start gap-1 h-100p" };
861
861
  const _hoisted_2$O = { class: "m_sticky" };
862
862
  const _hoisted_3$F = { class: "agenda__header-day-name txt-center" };
863
863
  const _hoisted_4$t = { class: "agenda__header-date flex justify-content-center rounded p-025 txt24 line-height-04" };
864
- 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" };
865
- const _hoisted_6$k = {
864
+ 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" };
865
+ const _hoisted_6$l = {
866
866
  key: 0,
867
867
  class: "align-items-center flex justify-content-center h-100p opacity-6"
868
868
  };
@@ -890,13 +890,13 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
890
890
  setup(__props, { emit: __emit }) {
891
891
  const emit2 = __emit;
892
892
  return (_ctx, _cache) => {
893
- return openBlock(), createElementBlock("div", _hoisted_1$12, [
893
+ return openBlock(), createElementBlock("div", _hoisted_1$13, [
894
894
  createElementVNode("header", _hoisted_2$O, [
895
895
  createElementVNode("div", _hoisted_3$F, toDisplayString(__props.day.dayName.slice(0, 3)), 1),
896
896
  createElementVNode("div", _hoisted_4$t, toDisplayString(__props.day.dateTimeString.substring(8, 10)), 1)
897
897
  ]),
898
- createElementVNode("div", _hoisted_5$o, [
899
- __props.day.events.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_6$k, toDisplayString(unref(getLanguage)(unref(languageKeys).noEvent, __props.time.CALENDAR_LOCALE)), 1)) : (openBlock(), createElementBlock("div", _hoisted_7$g, [
898
+ createElementVNode("div", _hoisted_5$p, [
899
+ __props.day.events.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_6$l, toDisplayString(unref(getLanguage)(unref(languageKeys).noEvent, __props.time.CALENDAR_LOCALE)), 1)) : (openBlock(), createElementBlock("div", _hoisted_7$g, [
900
900
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.day.events, (dayEvent) => {
901
901
  return openBlock(), createBlock(AgendaEventTile, {
902
902
  key: `agenda_event_${dayEvent.id}`,
@@ -1592,7 +1592,7 @@ class EventFlyoutPosition {
1592
1592
  return { top: eventElementDOMRect.top, left: null };
1593
1593
  }
1594
1594
  }
1595
- const _hoisted_1$11 = {
1595
+ const _hoisted_1$12 = {
1596
1596
  key: 0,
1597
1597
  class: "event-flyout__relative-wrapper"
1598
1598
  };
@@ -1602,11 +1602,11 @@ const _hoisted_3$E = {
1602
1602
  class: "event-flyout__menu-editable"
1603
1603
  };
1604
1604
  const _hoisted_4$s = { class: "event-flyout__menu-close" };
1605
- const _hoisted_5$n = {
1605
+ const _hoisted_5$o = {
1606
1606
  key: 0,
1607
1607
  class: "event-flyout__info-wrapper"
1608
1608
  };
1609
- const _hoisted_6$j = {
1609
+ const _hoisted_6$k = {
1610
1610
  key: 0,
1611
1611
  class: "event-flyout__row is-title"
1612
1612
  };
@@ -1626,7 +1626,7 @@ const _hoisted_10$7 = {
1626
1626
  key: 4,
1627
1627
  class: "event-flyout__row is-topic"
1628
1628
  };
1629
- const _hoisted_11$6 = {
1629
+ const _hoisted_11$7 = {
1630
1630
  key: 5,
1631
1631
  class: "event-flyout__row is-description"
1632
1632
  };
@@ -1804,7 +1804,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
1804
1804
  class: normalizeClass(["event-flyout p-05 bg-white", { "is-visible": isVisible.value, "is-not-editable": !isEditable.value }]),
1805
1805
  style: normalizeStyle(eventFlyoutInlineStyles.value)
1806
1806
  }, [
1807
- !__props.config.eventDialog || !__props.config.eventDialog.isCustom ? (openBlock(), createElementBlock("div", _hoisted_1$11, [
1807
+ !__props.config.eventDialog || !__props.config.eventDialog.isCustom ? (openBlock(), createElementBlock("div", _hoisted_1$12, [
1808
1808
  createElementVNode("div", _hoisted_2$N, [
1809
1809
  isEditable.value ? (openBlock(), createElementBlock("span", _hoisted_3$E, [
1810
1810
  createVNode(unref(_sfc_main$s), {
@@ -1826,8 +1826,8 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
1826
1826
  }, null, 8, ["icon"])
1827
1827
  ])
1828
1828
  ]),
1829
- calendarEvent.value ? (openBlock(), createElementBlock("div", _hoisted_5$n, [
1830
- calendarEvent.value.title ? (openBlock(), createElementBlock("div", _hoisted_6$j, [
1829
+ calendarEvent.value ? (openBlock(), createElementBlock("div", _hoisted_5$o, [
1830
+ calendarEvent.value.title ? (openBlock(), createElementBlock("div", _hoisted_6$k, [
1831
1831
  createElementVNode("div", {
1832
1832
  class: "event-flyout__color-icon",
1833
1833
  style: normalizeStyle({ backgroundColor: eventBackgroundColor.value })
@@ -1853,7 +1853,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
1853
1853
  }, null, 8, ["icon"]),
1854
1854
  createTextVNode(" " + toDisplayString(calendarEvent.value.topic), 1)
1855
1855
  ])) : createCommentVNode("", true),
1856
- calendarEvent.value.description ? (openBlock(), createElementBlock("div", _hoisted_11$6, [
1856
+ calendarEvent.value.description ? (openBlock(), createElementBlock("div", _hoisted_11$7, [
1857
1857
  createVNode(unref(_sfc_main$s), {
1858
1858
  icon: icons.description
1859
1859
  }, null, 8, ["icon"]),
@@ -1871,7 +1871,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
1871
1871
  };
1872
1872
  }
1873
1873
  });
1874
- const _hoisted_1$10 = {
1874
+ const _hoisted_1$11 = {
1875
1875
  key: 0,
1876
1876
  class: "calendar-month__event"
1877
1877
  };
@@ -1881,7 +1881,7 @@ const _hoisted_4$r = {
1881
1881
  key: 0,
1882
1882
  class: "calendar-month__event-time opacity-6 flex-shrink-0"
1883
1883
  };
1884
- const _hoisted_5$m = { class: "calendar-month__event-title1 white-space ellipsis" };
1884
+ const _hoisted_5$n = { class: "calendar-month__event-title1 white-space ellipsis" };
1885
1885
  const eventIdPrefix = "calendar-month__event-";
1886
1886
  const _sfc_main$1b = /* @__PURE__ */ defineComponent({
1887
1887
  __name: "Event",
@@ -1963,7 +1963,7 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
1963
1963
  setColors();
1964
1964
  });
1965
1965
  return (_ctx, _cache) => {
1966
- return __props.config.isSmall ? (openBlock(), createElementBlock("div", _hoisted_1$10)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1966
+ return __props.config.isSmall ? (openBlock(), createElementBlock("div", _hoisted_1$11)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1967
1967
  isCustomEvent.value ? (openBlock(), createElementBlock("div", {
1968
1968
  key: 0,
1969
1969
  id: elementId.value,
@@ -1985,14 +1985,14 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
1985
1985
  }, [
1986
1986
  _cache[0] || (_cache[0] = createElementVNode("span", { class: "calendar-month__event-color round flex-shrink-0" }, null, -1)),
1987
1987
  eventTimeStart.value && !__props.calendarEvent.originalEvent ? (openBlock(), createElementBlock("span", _hoisted_4$r, toDisplayString(eventTimeStart.value), 1)) : createCommentVNode("", true),
1988
- createElementVNode("span", _hoisted_5$m, toDisplayString(__props.calendarEvent.title), 1)
1988
+ createElementVNode("span", _hoisted_5$n, toDisplayString(__props.calendarEvent.title), 1)
1989
1989
  ], 42, _hoisted_3$D))
1990
1990
  ], 64));
1991
1991
  };
1992
1992
  }
1993
1993
  });
1994
1994
  const Event = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["__scopeId", "data-v-3c4101df"]]);
1995
- const _hoisted_1$$ = ["id"];
1995
+ const _hoisted_1$10 = ["id"];
1996
1996
  const _hoisted_2$L = { class: "w-100p flex justify-content-end txt14 p-025 m_h-100p" };
1997
1997
  const _hoisted_3$C = { class: "calendar-month_events" };
1998
1998
  const _hoisted_4$q = {
@@ -2129,12 +2129,12 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
2129
2129
  }, toDisplayString(unref(getLanguage)(unref(languageKeys).moreEvents, __props.time.CALENDAR_LOCALE)), 1)) : createCommentVNode("", true)
2130
2130
  ])
2131
2131
  ], true)
2132
- ], 42, _hoisted_1$$)) : (openBlock(), createElementBlock("div", _hoisted_4$q));
2132
+ ], 42, _hoisted_1$10)) : (openBlock(), createElementBlock("div", _hoisted_4$q));
2133
2133
  };
2134
2134
  }
2135
2135
  });
2136
2136
  const Day$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["__scopeId", "data-v-c1dfa100"]]);
2137
- const _hoisted_1$_ = { class: "txt12 normal block color-black pb-025" };
2137
+ const _hoisted_1$$ = { class: "txt12 normal block color-black pb-025" };
2138
2138
  const _sfc_main$19 = /* @__PURE__ */ defineComponent({
2139
2139
  __name: "WeekDay",
2140
2140
  props: {
@@ -2142,11 +2142,11 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
2142
2142
  },
2143
2143
  setup(__props) {
2144
2144
  return (_ctx, _cache) => {
2145
- return openBlock(), createElementBlock("span", _hoisted_1$_, toDisplayString(_ctx.day.dayName), 1);
2145
+ return openBlock(), createElementBlock("span", _hoisted_1$$, toDisplayString(_ctx.day.dayName), 1);
2146
2146
  };
2147
2147
  }
2148
2148
  });
2149
- const _hoisted_1$Z = { class: "calendar-month relative column w-100p h-100p overflow-y flex flex-stretch" };
2149
+ const _hoisted_1$_ = { class: "calendar-month relative column w-100p h-100p overflow-y flex flex-stretch" };
2150
2150
  const _hoisted_2$K = { class: "flex space-between" };
2151
2151
  const _hoisted_3$B = { class: "calendar-month__weeks h-100p flex-grow flex flex-stretch column space-between" };
2152
2152
  const _hoisted_4$p = {
@@ -2255,7 +2255,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
2255
2255
  });
2256
2256
  return (_ctx, _cache) => {
2257
2257
  var _a;
2258
- return openBlock(), createElementBlock("div", _hoisted_1$Z, [
2258
+ return openBlock(), createElementBlock("div", _hoisted_1$_, [
2259
2259
  createElementVNode("div", _hoisted_2$K, [
2260
2260
  (openBlock(true), createElementBlock(Fragment, null, renderList(month.value[0], (day, dayIndex) => {
2261
2261
  return openBlock(), createBlock(_sfc_main$19, {
@@ -2532,18 +2532,18 @@ class EventChange {
2532
2532
  this.dayEnd = `${endHourString}:00`;
2533
2533
  }
2534
2534
  }
2535
- const _hoisted_1$Y = ["data-ref"];
2535
+ const _hoisted_1$Z = ["data-ref"];
2536
2536
  const _hoisted_2$J = { class: "calendar-week__event-row is-title" };
2537
2537
  const _hoisted_3$A = { class: "calendar-week__event-row is-time flex" };
2538
2538
  const _hoisted_4$o = {
2539
2539
  key: 0,
2540
2540
  class: "calendar-week__event-row is-location"
2541
2541
  };
2542
- const _hoisted_5$l = {
2542
+ const _hoisted_5$m = {
2543
2543
  key: 1,
2544
2544
  class: "calendar-week__event-row is-with"
2545
2545
  };
2546
- const _hoisted_6$i = {
2546
+ const _hoisted_6$j = {
2547
2547
  key: 2,
2548
2548
  class: "calendar-week__event-row is-topic"
2549
2549
  };
@@ -2909,14 +2909,14 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
2909
2909
  }, null, 8, ["icon"]),
2910
2910
  createElementVNode("span", null, toDisplayString(event.value.location), 1)
2911
2911
  ])) : createCommentVNode("", true),
2912
- event.value.with ? (openBlock(), createElementBlock("div", _hoisted_5$l, [
2912
+ event.value.with ? (openBlock(), createElementBlock("div", _hoisted_5$m, [
2913
2913
  createVNode(unref(_sfc_main$s), {
2914
2914
  icon: icons.value.user,
2915
2915
  class: "calendar-week__event-icon"
2916
2916
  }, null, 8, ["icon"]),
2917
2917
  createElementVNode("span", null, toDisplayString(event.value.with), 1)
2918
2918
  ])) : createCommentVNode("", true),
2919
- event.value.topic ? (openBlock(), createElementBlock("div", _hoisted_6$i, [
2919
+ event.value.topic ? (openBlock(), createElementBlock("div", _hoisted_6$j, [
2920
2920
  createVNode(unref(_sfc_main$s), {
2921
2921
  icon: icons.value.topic,
2922
2922
  class: "calendar-week__event-icon"
@@ -2953,12 +2953,12 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
2953
2953
  class: "calendar-week__event-resize calendar-week__event-resize-down",
2954
2954
  onMousedown: _cache[1] || (_cache[1] = ($event) => resizeEvent("down"))
2955
2955
  }, null, 32)) : createCommentVNode("", true)
2956
- ], 46, _hoisted_1$Y);
2956
+ ], 46, _hoisted_1$Z);
2957
2957
  };
2958
2958
  }
2959
2959
  });
2960
2960
  const DayEvent = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["__scopeId", "data-v-c512b81d"]]);
2961
- const _hoisted_1$X = ["id", "onClick"];
2961
+ const _hoisted_1$Y = ["id", "onClick"];
2962
2962
  const _sfc_main$16 = /* @__PURE__ */ defineComponent({
2963
2963
  __name: "Day",
2964
2964
  props: {
@@ -3096,14 +3096,14 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
3096
3096
  class: normalizeClass(["calendar-week__day-interval", { "has-border": interval.hasBorder }]),
3097
3097
  style: normalizeStyle(intervalStyles.value),
3098
3098
  onClick: ($event) => handleClickOnInterval(interval)
3099
- }, toDisplayString(__props.time.getLocalizedTime(interval.intervalStart)), 15, _hoisted_1$X);
3099
+ }, toDisplayString(__props.time.getLocalizedTime(interval.intervalStart)), 15, _hoisted_1$Y);
3100
3100
  }), 128)) : createCommentVNode("", true)
3101
3101
  ]);
3102
3102
  };
3103
3103
  }
3104
3104
  });
3105
3105
  const Day = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["__scopeId", "data-v-87669cec"]]);
3106
- const _hoisted_1$W = { class: "day-timeline absolute top-0 start-0 space-evenly column display-flex" };
3106
+ const _hoisted_1$X = { class: "day-timeline absolute top-0 start-0 space-evenly column display-flex" };
3107
3107
  const _hoisted_2$I = { class: "day-timeline__hour-text line-height-0" };
3108
3108
  const _sfc_main$15 = /* @__PURE__ */ defineComponent({
3109
3109
  __name: "DayTimeline",
@@ -3131,7 +3131,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
3131
3131
  return props2.time.getLocalizedHour(new Date(2100, 1, 1, hour));
3132
3132
  }
3133
3133
  return (_ctx, _cache) => {
3134
- return openBlock(), createElementBlock("div", _hoisted_1$W, [
3134
+ return openBlock(), createElementBlock("div", _hoisted_1$X, [
3135
3135
  (openBlock(true), createElementBlock(Fragment, null, renderList(timelineHours.value, (hour) => {
3136
3136
  return openBlock(), createElementBlock("div", {
3137
3137
  key: hour,
@@ -3145,7 +3145,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
3145
3145
  }
3146
3146
  });
3147
3147
  const DayTimeline = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-0b3de5c5"]]);
3148
- const _hoisted_1$V = ["id"];
3148
+ const _hoisted_1$W = ["id"];
3149
3149
  const _hoisted_2$H = {
3150
3150
  key: 1,
3151
3151
  class: "week-timeline__event"
@@ -3217,20 +3217,20 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
3217
3217
  zIndex: 1
3218
3218
  }),
3219
3219
  onClick: handleClickOnEvent
3220
- }, toDisplayString(__props.scheduleEvent.title), 13, _hoisted_1$V)) : (openBlock(), createElementBlock("div", _hoisted_2$H));
3220
+ }, toDisplayString(__props.scheduleEvent.title), 13, _hoisted_1$W)) : (openBlock(), createElementBlock("div", _hoisted_2$H));
3221
3221
  };
3222
3222
  }
3223
3223
  });
3224
3224
  const FullDayEvent = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["__scopeId", "data-v-8bd51337"]]);
3225
- const _hoisted_1$U = {
3225
+ const _hoisted_1$V = {
3226
3226
  class: "week-timeline flex space-between border-bottom ms-3-5",
3227
3227
  style: { "margin-inline-end": "0.5em" }
3228
3228
  };
3229
3229
  const _hoisted_2$G = ["onClick"];
3230
3230
  const _hoisted_3$z = { class: "flex justify-content-center gap-025 txt12 pb-025" };
3231
3231
  const _hoisted_4$n = { class: "" };
3232
- const _hoisted_5$k = { class: "week-timeline__date txt14 round inline-flex justify-content-center" };
3233
- const _hoisted_6$h = { class: "week-timeline__events" };
3232
+ const _hoisted_5$l = { class: "week-timeline__date txt14 round inline-flex justify-content-center" };
3233
+ const _hoisted_6$i = { class: "week-timeline__events" };
3234
3234
  const _sfc_main$13 = /* @__PURE__ */ defineComponent({
3235
3235
  __name: "WeekTimeline",
3236
3236
  props: {
@@ -3252,7 +3252,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
3252
3252
  return date2;
3253
3253
  }
3254
3254
  return (_ctx, _cache) => {
3255
- return openBlock(), createElementBlock("div", _hoisted_1$U, [
3255
+ return openBlock(), createElementBlock("div", _hoisted_1$V, [
3256
3256
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.days, (day, dayIndex) => {
3257
3257
  return openBlock(), createElementBlock("div", {
3258
3258
  key: dayIndex,
@@ -3263,9 +3263,9 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
3263
3263
  }, [
3264
3264
  createElementVNode("div", _hoisted_3$z, [
3265
3265
  createElementVNode("div", _hoisted_4$n, toDisplayString(day.dayName.charAt(0).toUpperCase() + day.dayName.slice(1, 3).toLowerCase()), 1),
3266
- createElementVNode("div", _hoisted_5$k, toDisplayString(getDaysDate(day)), 1)
3266
+ createElementVNode("div", _hoisted_5$l, toDisplayString(getDaysDate(day)), 1)
3267
3267
  ]),
3268
- createElementVNode("div", _hoisted_6$h, [
3268
+ createElementVNode("div", _hoisted_6$i, [
3269
3269
  (openBlock(true), createElementBlock(Fragment, null, renderList(day.fullDayEvents, (event, key) => {
3270
3270
  return openBlock(), createElementBlock(Fragment, { key }, [
3271
3271
  key !== "date" ? (openBlock(), createBlock(FullDayEvent, {
@@ -3285,7 +3285,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
3285
3285
  }
3286
3286
  });
3287
3287
  const WeekTimeline = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-18ecf6c3"]]);
3288
- const _hoisted_1$T = { class: "calendar-week__wrapper relative ps-3-5" };
3288
+ const _hoisted_1$U = { class: "calendar-week__wrapper relative ps-3-5" };
3289
3289
  const _hoisted_2$F = { class: "calendar-week" };
3290
3290
  const _hoisted_3$y = { class: "calendar-week__events" };
3291
3291
  const _sfc_main$12 = /* @__PURE__ */ defineComponent({
@@ -3514,7 +3514,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
3514
3514
  onEventWasClicked: handleClickOnEvent,
3515
3515
  onDayWasClicked: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("dayWasClicked", $event))
3516
3516
  }, null, 8, ["days", "time", "full-day-events", "config", "mode"]),
3517
- createElementVNode("div", _hoisted_1$T, [
3517
+ createElementVNode("div", _hoisted_1$U, [
3518
3518
  !__props.config.eventDialog || !__props.config.eventDialog.isDisabled ? (openBlock(), createBlock(_sfc_main$1c, {
3519
3519
  key: 0,
3520
3520
  "calendar-event-prop": selectedEvent.value,
@@ -3635,7 +3635,7 @@ ${_Errors.SUFFIX}`);
3635
3635
  __publicField(_Errors, "MISSING_TIME_END_WARNING", `${_Errors.PREFIX} required event property 'time.end' is missing
3636
3636
  ${_Errors.SUFFIX}`);
3637
3637
  let Errors = _Errors;
3638
- const _hoisted_1$S = { class: "calendar-root-wrapper txt16" };
3638
+ const _hoisted_1$T = { class: "calendar-root-wrapper txt16" };
3639
3639
  const _hoisted_2$E = ["data-lang"];
3640
3640
  const _hoisted_3$x = {
3641
3641
  key: 0,
@@ -3815,7 +3815,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
3815
3815
  }
3816
3816
  return (_ctx, _cache) => {
3817
3817
  var _a2, _b2;
3818
- return openBlock(), createElementBlock("div", _hoisted_1$S, [
3818
+ return openBlock(), createElementBlock("div", _hoisted_1$T, [
3819
3819
  createElementVNode("div", {
3820
3820
  ref_key: "calendarRoot",
3821
3821
  ref: calendarRoot,
@@ -3919,7 +3919,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
3919
3919
  };
3920
3920
  }
3921
3921
  });
3922
- const _hoisted_1$R = {
3922
+ const _hoisted_1$S = {
3923
3923
  key: 0,
3924
3924
  class: "card_label"
3925
3925
  };
@@ -3952,7 +3952,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
3952
3952
  }])
3953
3953
  }, {
3954
3954
  default: withCtx(() => [
3955
- _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_1$R, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
3955
+ _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_1$S, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
3956
3956
  renderSlot(_ctx.$slots, "default")
3957
3957
  ]),
3958
3958
  _: 3
@@ -3962,7 +3962,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
3962
3962
  };
3963
3963
  }
3964
3964
  });
3965
- const _hoisted_1$Q = ["dir"];
3965
+ const _hoisted_1$R = ["dir"];
3966
3966
  const _hoisted_2$D = {
3967
3967
  key: 0,
3968
3968
  class: "dots"
@@ -4420,7 +4420,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
4420
4420
  }, void 0, true)
4421
4421
  ])
4422
4422
  ])
4423
- ], 14, _hoisted_1$Q);
4423
+ ], 14, _hoisted_1$R);
4424
4424
  };
4425
4425
  }
4426
4426
  });
@@ -10260,8 +10260,8 @@ const _hoisted_1$1$1 = {
10260
10260
  const _hoisted_2$1$1 = ["width", "height", "viewBox"];
10261
10261
  const _hoisted_3$v = { class: "layer-rectangles" };
10262
10262
  const _hoisted_4$l = ["transform", "onMouseover"];
10263
- const _hoisted_5$j = ["width", "height"];
10264
- const _hoisted_6$g = {
10263
+ const _hoisted_5$k = ["width", "height"];
10264
+ const _hoisted_6$h = {
10265
10265
  x: 0 + 10,
10266
10266
  y: 0 + 20,
10267
10267
  "font-size": `15px`,
@@ -10297,14 +10297,14 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
10297
10297
  y: 0,
10298
10298
  width: r2.width,
10299
10299
  height: r2.height
10300
- }), null, 16, _hoisted_5$j),
10300
+ }), null, 16, _hoisted_5$k),
10301
10301
  renderSlot(_ctx.$slots, "text", {
10302
10302
  r: r2,
10303
10303
  selected: _ctx.selected === i2
10304
10304
  }, () => [
10305
10305
  createElementVNode(
10306
10306
  "text",
10307
- _hoisted_6$g,
10307
+ _hoisted_6$h,
10308
10308
  toDisplayString(r2.data.name),
10309
10309
  1
10310
10310
  /* TEXT */
@@ -10368,13 +10368,13 @@ var script = defineComponent({
10368
10368
  return { bar, canvas, direction, mouse };
10369
10369
  }
10370
10370
  });
10371
- const _hoisted_1$P = {
10371
+ const _hoisted_1$Q = {
10372
10372
  key: 0,
10373
10373
  class: "layer-hover-bar"
10374
10374
  };
10375
10375
  const _hoisted_2$C = ["x", "y", "width", "height"];
10376
10376
  function render(_ctx, _cache, $props, $setup, $data, $options) {
10377
- return _ctx.mouse.hover ? (openBlock(), createElementBlock("g", _hoisted_1$P, [
10377
+ return _ctx.mouse.hover ? (openBlock(), createElementBlock("g", _hoisted_1$Q, [
10378
10378
  createElementVNode("rect", mergeProps({ class: "hover-bar" }, _ctx.barStyle, {
10379
10379
  x: _ctx.bar.x,
10380
10380
  y: _ctx.bar.y,
@@ -10686,6 +10686,8 @@ const SRC_VALUE_COMPONENTS = /* @__PURE__ */ new Set(["img", "iframe"]);
10686
10686
  function useTableData(options) {
10687
10687
  const sortField = ref("");
10688
10688
  const sortDirection = ref("ASC");
10689
+ const schemaState = ref("loading");
10690
+ const resolvedSchema = ref([]);
10689
10691
  function getValue(value) {
10690
10692
  if (value === void 0 || value === null) {
10691
10693
  return void 0;
@@ -10700,31 +10702,50 @@ function useTableData(options) {
10700
10702
  return void 0;
10701
10703
  }
10702
10704
  }
10703
- const computedSchema = computed(() => {
10704
- const dataValue = options.data.value || [];
10705
- const schema = useBglSchema({
10706
- schema: getValue(options.schema),
10707
- columns: getValue(options.columns),
10708
- data: dataValue
10709
- });
10710
- if (Array.isArray(schema) && schema.length > 0) {
10711
- return schema.filter((field) => field && field.id);
10712
- }
10713
- if (Array.isArray(dataValue) && dataValue.length > 0) {
10714
- const firstItem = dataValue[0];
10715
- return Object.keys(firstItem || {}).filter((key) => key !== "id" && !key.startsWith("_")).map((key) => ({
10716
- id: key,
10717
- label: keyToLabel(key),
10718
- $el: "div",
10719
- transform: (val) => {
10720
- const dateFields = ["created_at", "updated_at"];
10721
- if (dateFields.includes(key)) return val ? new Date(val).toLocaleString() : val;
10722
- return val;
10723
- }
10724
- }));
10705
+ async function resolveSchemaAsync() {
10706
+ try {
10707
+ schemaState.value = "loading";
10708
+ const dataValue = options.data.value || [];
10709
+ const schema = await useBglSchema({
10710
+ schema: getValue(options.schema),
10711
+ columns: getValue(options.columns),
10712
+ data: dataValue
10713
+ });
10714
+ if (Array.isArray(schema) && schema.length > 0) {
10715
+ resolvedSchema.value = schema.filter((field) => field && field.id);
10716
+ } else if (Array.isArray(dataValue) && dataValue.length > 0) {
10717
+ const firstItem = dataValue[0];
10718
+ resolvedSchema.value = Object.keys(firstItem || {}).filter((key) => key !== "id" && !key.startsWith("_")).map((key) => ({
10719
+ id: key,
10720
+ label: keyToLabel(key),
10721
+ $el: "div",
10722
+ transform: (val) => {
10723
+ const dateFields = ["created_at", "updated_at"];
10724
+ if (dateFields.includes(key)) return val ? new Date(val).toLocaleString() : val;
10725
+ return val;
10726
+ }
10727
+ }));
10728
+ } else {
10729
+ resolvedSchema.value = [];
10730
+ }
10731
+ schemaState.value = "loaded";
10732
+ } catch (error) {
10733
+ console.error("Error resolving schema:", error);
10734
+ schemaState.value = "error";
10735
+ resolvedSchema.value = [];
10725
10736
  }
10726
- return [];
10737
+ }
10738
+ watch([
10739
+ () => getValue(options.schema),
10740
+ () => getValue(options.columns),
10741
+ () => options.data.value
10742
+ ], () => {
10743
+ resolveSchemaAsync();
10744
+ }, { immediate: true });
10745
+ onMounted(() => {
10746
+ resolveSchemaAsync();
10727
10747
  });
10748
+ const computedSchema = computed(() => resolvedSchema.value);
10728
10749
  function transform(rowData) {
10729
10750
  const transformed = { ...rowData };
10730
10751
  const schemaFields = computedSchema.value.filter((f2) => f2.id);
@@ -10806,10 +10827,11 @@ function useTableData(options) {
10806
10827
  sortField: computed(() => sortField.value),
10807
10828
  sortDirection: computed(() => sortDirection.value),
10808
10829
  toggleSort,
10809
- cleanTransformedData
10830
+ cleanTransformedData,
10831
+ schemaState: computed(() => schemaState.value)
10810
10832
  };
10811
10833
  }
10812
- const _hoisted_1$O = { class: "data-preview" };
10834
+ const _hoisted_1$P = { class: "data-preview" };
10813
10835
  const _hoisted_2$B = {
10814
10836
  key: 1,
10815
10837
  class: "empty-preview"
@@ -10855,7 +10877,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
10855
10877
  includeUnset: props2.includeUnset
10856
10878
  });
10857
10879
  return (_ctx, _cache) => {
10858
- return openBlock(), createElementBlock("div", _hoisted_1$O, [
10880
+ return openBlock(), createElementBlock("div", _hoisted_1$P, [
10859
10881
  unref(computedSchema) && unref(computedSchema).length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(computedSchema), (field) => {
10860
10882
  return openBlock(), createBlock(resolveDynamicComponent(unref(renderField)(field, unref(slots))), {
10861
10883
  key: field.id
@@ -11506,19 +11528,23 @@ function useTableVirtualization(options) {
11506
11528
  registerLastItemObserver
11507
11529
  };
11508
11530
  }
11509
- const _hoisted_1$N = {
11531
+ const _hoisted_1$O = {
11510
11532
  key: 0,
11511
11533
  class: "loading-table-wrapper z-99 h-100 w-100 absolute inset"
11512
11534
  };
11513
- const _hoisted_2$A = { class: "infinite-wrapper" };
11514
- const _hoisted_3$u = { class: "row first-row" };
11515
- const _hoisted_4$k = { key: 0 };
11516
- const _hoisted_5$i = ["onClick"];
11517
- const _hoisted_6$f = { class: "flex" };
11518
- const _hoisted_7$c = ["onClick"];
11519
- const _hoisted_8$7 = { key: 0 };
11520
- const _hoisted_9$6 = ["value"];
11521
- const _hoisted_10$6 = { key: 1 };
11535
+ const _hoisted_2$A = {
11536
+ key: 1,
11537
+ class: "flex-center h-300px txt-red"
11538
+ };
11539
+ const _hoisted_3$u = { class: "infinite-wrapper" };
11540
+ const _hoisted_4$k = { class: "row first-row" };
11541
+ const _hoisted_5$j = { key: 0 };
11542
+ const _hoisted_6$g = ["onClick"];
11543
+ const _hoisted_7$c = { class: "flex" };
11544
+ const _hoisted_8$7 = ["onClick"];
11545
+ const _hoisted_9$6 = { key: 0 };
11546
+ const _hoisted_10$6 = ["value"];
11547
+ const _hoisted_11$6 = { key: 1 };
11522
11548
  const _sfc_main$Y = /* @__PURE__ */ defineComponent({
11523
11549
  __name: "DataTable",
11524
11550
  props: /* @__PURE__ */ mergeModels({
@@ -11539,7 +11565,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
11539
11565
  emits: /* @__PURE__ */ mergeModels(["orderBy", "select", "lastItemVisible"], ["update:loading", "update:itemHeight", "update:selectedItems"]),
11540
11566
  setup(__props, { emit: __emit }) {
11541
11567
  useCssVars((_ctx) => ({
11542
- "31aad8d2": unref(computedItemHeight)
11568
+ "03db8ce0": unref(computedItemHeight)
11543
11569
  }));
11544
11570
  const props2 = __props;
11545
11571
  const emit2 = __emit;
@@ -11557,7 +11583,8 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
11557
11583
  sortField,
11558
11584
  sortDirection,
11559
11585
  toggleSort,
11560
- cleanTransformedData
11586
+ cleanTransformedData,
11587
+ schemaState
11561
11588
  } = useTableData({ data: data2, schema, columns, useServerSort, onSort: (field, direction) => {
11562
11589
  emit2("orderBy", `${field} ${direction}`.trim());
11563
11590
  } });
@@ -11628,14 +11655,14 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
11628
11655
  );
11629
11656
  return (_ctx, _cache) => {
11630
11657
  return openBlock(), createElementBlock("div", mergeProps({ class: "table-list-wrap h-100" }, unref(containerProps), {
11631
- class: { "loading-table": loading.value }
11658
+ class: { "loading-table": loading.value || unref(schemaState) === "loading" }
11632
11659
  }), [
11633
- loading.value ? (openBlock(), createElementBlock("div", _hoisted_1$N, _cache[4] || (_cache[4] = [
11660
+ loading.value || unref(schemaState) === "loading" ? (openBlock(), createElementBlock("div", _hoisted_1$O, _cache[4] || (_cache[4] = [
11634
11661
  createElementVNode("div", { class: "loading-table-animation absolute oval" }, null, -1)
11635
- ]))) : (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 1 }, unref(wrapperProps))), [
11636
- createElementVNode("table", _hoisted_2$A, [
11637
- createElementVNode("thead", _hoisted_3$u, [
11638
- unref(isSelectable) ? (openBlock(), createElementBlock("th", _hoisted_4$k, [
11662
+ ]))) : unref(schemaState) === "error" ? (openBlock(), createElementBlock("div", _hoisted_2$A, " Error loading table schema ")) : (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 2 }, unref(wrapperProps))), [
11663
+ createElementVNode("table", _hoisted_3$u, [
11664
+ createElementVNode("thead", _hoisted_4$k, [
11665
+ unref(isSelectable) ? (openBlock(), createElementBlock("th", _hoisted_5$j, [
11639
11666
  createElementVNode("input", {
11640
11667
  ref_key: "allSelectorEl",
11641
11668
  ref: allSelectorEl,
@@ -11652,7 +11679,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
11652
11679
  class: "col",
11653
11680
  onClick: ($event) => unref(toggleSort)((field == null ? void 0 : field.id) || "")
11654
11681
  }, [
11655
- createElementVNode("div", _hoisted_6$f, [
11682
+ createElementVNode("div", _hoisted_7$c, [
11656
11683
  createTextVNode(toDisplayString(field.label || unref(keyToLabel)(field == null ? void 0 : field.id)) + " ", 1),
11657
11684
  createElementVNode("div", {
11658
11685
  class: normalizeClass(["list-arrows", { sorted: unref(sortField) === (field == null ? void 0 : field.id) }])
@@ -11663,7 +11690,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
11663
11690
  }, null, 8, ["class"])
11664
11691
  ], 2)
11665
11692
  ])
11666
- ], 8, _hoisted_5$i);
11693
+ ], 8, _hoisted_6$g);
11667
11694
  }), 128))
11668
11695
  ]),
11669
11696
  createElementVNode("tbody", null, [
@@ -11673,7 +11700,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
11673
11700
  class: normalizeClass(["row row-item position-relative", { selected: (row == null ? void 0 : row.id) && unref(computedSelectedItems).includes(row.id) }]),
11674
11701
  onClick: ($event) => unref(toggleSelectItem)(row)
11675
11702
  }, [
11676
- unref(isSelectable) ? (openBlock(), createElementBlock("td", _hoisted_8$7, [
11703
+ unref(isSelectable) ? (openBlock(), createElementBlock("td", _hoisted_9$6, [
11677
11704
  createElementVNode("div", {
11678
11705
  onClick: _cache[3] || (_cache[3] = withModifiers(() => {
11679
11706
  }, ["stop"]))
@@ -11682,7 +11709,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
11682
11709
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => selectedItems.value = $event),
11683
11710
  type: "checkbox",
11684
11711
  value: (row == null ? void 0 : row.id) || ""
11685
- }, null, 8, _hoisted_9$6), [
11712
+ }, null, 8, _hoisted_10$6), [
11686
11713
  [vModelCheckbox, selectedItems.value]
11687
11714
  ])
11688
11715
  ])
@@ -11696,12 +11723,12 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
11696
11723
  key: 0,
11697
11724
  row,
11698
11725
  field
11699
- }, void 0, true) : (openBlock(), createElementBlock("div", _hoisted_10$6, [
11726
+ }, void 0, true) : (openBlock(), createElementBlock("div", _hoisted_11$6, [
11700
11727
  (openBlock(), createBlock(resolveDynamicComponent(renderFieldForRow(field, row))))
11701
11728
  ]))
11702
11729
  ]);
11703
11730
  }), 128))
11704
- ], 10, _hoisted_7$c);
11731
+ ], 10, _hoisted_8$7);
11705
11732
  }), 128)),
11706
11733
  props2.onLastItemVisible !== void 0 ? (openBlock(), createElementBlock("tr", {
11707
11734
  key: 0,
@@ -11716,7 +11743,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
11716
11743
  };
11717
11744
  }
11718
11745
  });
11719
- const DataTable = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-43f28baa"]]);
11746
+ const DataTable = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-30ec790f"]]);
11720
11747
  function useDraggable(options = {}) {
11721
11748
  const isDragging = ref(false);
11722
11749
  const dragElement = ref(null);
@@ -14896,7 +14923,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
14896
14923
  };
14897
14924
  }
14898
14925
  });
14899
- const _hoisted_1$M = { class: "px-1 pt-025 pb-1" };
14926
+ const _hoisted_1$N = { class: "px-1 pt-025 pb-1" };
14900
14927
  const _hoisted_2$z = { class: "ms-1" };
14901
14928
  const _sfc_main$V = /* @__PURE__ */ defineComponent({
14902
14929
  __name: "FieldSetVue",
@@ -14906,7 +14933,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
14906
14933
  },
14907
14934
  setup(__props) {
14908
14935
  return (_ctx, _cache) => {
14909
- return openBlock(), createElementBlock("fieldset", _hoisted_1$M, [
14936
+ return openBlock(), createElementBlock("fieldset", _hoisted_1$N, [
14910
14937
  createElementVNode("legend", _hoisted_2$z, toDisplayString(_ctx.legend || _ctx.label), 1),
14911
14938
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
14912
14939
  ]);
@@ -15354,6 +15381,7 @@ function getNestedValue(obj, path, defaultValue = void 0) {
15354
15381
  }
15355
15382
  return current ?? defaultValue;
15356
15383
  }
15384
+ const _hoisted_1$M = { class: "flex-center h-300px" };
15357
15385
  const _sfc_main$T = /* @__PURE__ */ defineComponent({
15358
15386
  __name: "BagelForm",
15359
15387
  props: {
@@ -15367,52 +15395,65 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
15367
15395
  setup(__props, { expose: __expose, emit: __emit }) {
15368
15396
  const props2 = __props;
15369
15397
  const emit2 = __emit;
15370
- function safeClone2(obj) {
15371
- if (!obj) return obj;
15372
- try {
15373
- return JSON.parse(JSON.stringify(obj));
15374
- } catch (e) {
15375
- console.warn("Failed to clone object:", e);
15376
- return obj;
15377
- }
15378
- }
15398
+ const clone2 = (obj) => !obj ? obj : JSON.parse(JSON.stringify(obj));
15379
15399
  const form = ref();
15380
- const formData = ref(safeClone2(props2.modelValue ?? {}));
15381
- const initialFormData = ref(safeClone2(props2.modelValue ?? {}));
15382
- onMounted(() => {
15383
- if (props2.modelValue) {
15384
- initialFormData.value = safeClone2(props2.modelValue);
15385
- }
15386
- });
15400
+ const formData = ref(clone2(props2.modelValue ?? {}));
15401
+ const initialFormData = ref(clone2(props2.modelValue ?? {}));
15387
15402
  const formState = ref("idle");
15388
- watch(() => props2.modelValue, (newValue) => {
15389
- if (newValue !== void 0) {
15390
- formData.value = safeClone2(newValue);
15391
- }
15392
- }, { immediate: true, deep: true });
15393
- const resolvedSchema = computed(() => {
15394
- if (!props2.schema) return void 0;
15395
- return typeof props2.schema === "function" ? props2.schema() : props2.schema;
15396
- });
15403
+ const schemaState = ref("loaded");
15404
+ const resolvedSchemaData = ref();
15405
+ const schemaRef = toRef(props2, "schema");
15406
+ const resolvedSchema = computed(() => resolvedSchemaData.value);
15397
15407
  const isDirty = computed(() => {
15398
15408
  try {
15399
- const current = JSON.stringify(formData.value);
15400
- const initial = JSON.stringify(initialFormData.value);
15401
- return current !== initial;
15402
- } catch (e) {
15403
- console.warn("Failed to compare form data:", e);
15409
+ return JSON.stringify(formData.value) !== JSON.stringify(initialFormData.value);
15410
+ } catch {
15404
15411
  return false;
15405
15412
  }
15406
15413
  });
15414
+ onMounted(() => {
15415
+ if (props2.modelValue) initialFormData.value = clone2(props2.modelValue);
15416
+ refreshSchema();
15417
+ });
15418
+ watch(() => props2.modelValue, (val) => {
15419
+ if (val !== void 0) formData.value = clone2(val);
15420
+ }, { immediate: true, deep: true });
15421
+ async function resolveSchema(schema) {
15422
+ if (!schema) {
15423
+ resolvedSchemaData.value = void 0;
15424
+ schemaState.value = "loaded";
15425
+ return;
15426
+ }
15427
+ try {
15428
+ schemaState.value = "loading";
15429
+ const isPromise = (obj) => obj && typeof obj.then === "function";
15430
+ let result2;
15431
+ if (typeof schema === "function") {
15432
+ result2 = schema();
15433
+ result2 = isPromise(result2) ? await result2 : result2;
15434
+ } else {
15435
+ result2 = isPromise(schema) ? await schema : schema;
15436
+ }
15437
+ resolvedSchemaData.value = result2;
15438
+ schemaState.value = "loaded";
15439
+ } catch (error) {
15440
+ console.error("Schema error:", error);
15441
+ schemaState.value = "error";
15442
+ resolvedSchemaData.value = void 0;
15443
+ }
15444
+ }
15445
+ async function refreshSchema() {
15446
+ await resolveSchema(props2.schema);
15447
+ return resolvedSchemaData.value;
15448
+ }
15449
+ watch(schemaRef, resolveSchema, { immediate: true, deep: true });
15407
15450
  function updateFormData(fieldId, value) {
15408
15451
  const keys4 = fieldId.split(".");
15409
- const newData = safeClone2(formData.value);
15452
+ const newData = clone2(formData.value);
15410
15453
  let current = newData;
15411
15454
  for (let i2 = 0; i2 < keys4.length - 1; i2++) {
15412
15455
  const key = keys4[i2];
15413
- if (!current[key] || typeof current[key] !== "object") {
15414
- current[key] = {};
15415
- }
15456
+ if (!current[key] || typeof current[key] !== "object") current[key] = {};
15416
15457
  current = current[key];
15417
15458
  }
15418
15459
  current[keys4[keys4.length - 1]] = value;
@@ -15425,38 +15466,34 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
15425
15466
  if (formState.value === "submitting") return;
15426
15467
  formState.value = "submitting";
15427
15468
  await ((_a = props2.onSubmit) == null ? void 0 : _a.call(props2, formData.value));
15428
- initialFormData.value = safeClone2(formData.value);
15469
+ initialFormData.value = clone2(formData.value);
15429
15470
  formState.value = "success";
15430
15471
  window.parent.postMessage({ type: "BAGEL_FORM_SUCCESS", data: JSON.stringify(formData.value) }, "*");
15431
15472
  } catch (error) {
15432
- console.error("Form submission error:", error);
15473
+ console.error("Submit error:", error);
15433
15474
  formState.value = "error";
15434
15475
  }
15435
15476
  }
15436
- function validateForm() {
15437
- if (!form.value) return false;
15438
- return form.value.reportValidity();
15439
- }
15477
+ const validateForm = () => {
15478
+ var _a;
15479
+ return ((_a = form.value) == null ? void 0 : _a.reportValidity()) ?? false;
15480
+ };
15440
15481
  const { renderField } = useSchemaField({
15441
15482
  mode: "form",
15442
- getRowData: () => {
15443
- return {
15444
- ...formData.value,
15445
- // Add a special getter to handle nested paths
15446
- get: (path) => getNestedValue(formData.value, path, "")
15447
- };
15448
- },
15483
+ getRowData: () => ({
15484
+ ...formData.value,
15485
+ get: (path) => getNestedValue(formData.value, path, "")
15486
+ }),
15449
15487
  onUpdate: (field, value) => {
15450
15488
  var _a;
15451
- if (!field.id) return;
15452
- updateFormData(field.id, value);
15453
- (_a = field.onUpdate) == null ? void 0 : _a.call(field, value, formData.value);
15489
+ if (field.id) {
15490
+ updateFormData(field.id, value);
15491
+ (_a = field.onUpdate) == null ? void 0 : _a.call(field, value, formData.value);
15492
+ }
15454
15493
  }
15455
15494
  });
15456
- function renderSchemaField(field) {
15457
- return renderField(field);
15458
- }
15459
- __expose({ form, isDirty: isDirty.value, validateForm });
15495
+ const renderSchemaField = (field) => renderField(field);
15496
+ __expose({ form, isDirty, validateForm, resolveSchema, refreshSchema });
15460
15497
  return (_ctx, _cache) => {
15461
15498
  return openBlock(), createElementBlock(Fragment, null, [
15462
15499
  formState.value !== "success" || !_ctx.$slots.success ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
@@ -15467,23 +15504,36 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
15467
15504
  class: normalizeClass(props2.class),
15468
15505
  onSubmit: withModifiers(handleSubmit, ["prevent"])
15469
15506
  }, [
15470
- resolvedSchema.value ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(resolvedSchema.value, (field) => {
15507
+ schemaState.value === "loading" ? renderSlot(_ctx.$slots, "loading", { key: 0 }, () => [
15508
+ createElementVNode("div", _hoisted_1$M, [
15509
+ createVNode(unref(Loading))
15510
+ ])
15511
+ ]) : schemaState.value === "error" ? renderSlot(_ctx.$slots, "schema-error", { key: 1 }, () => [
15512
+ _cache[0] || (_cache[0] = createElementVNode("div", { class: "flex-center h-300px txt-red" }, " Error loading form ", -1))
15513
+ ]) : resolvedSchema.value ? (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(resolvedSchema.value, (field) => {
15471
15514
  return openBlock(), createBlock(resolveDynamicComponent(renderSchemaField(field)), {
15472
15515
  key: field.id
15473
15516
  });
15474
- }), 128)) : renderSlot(_ctx.$slots, "default", { key: 1 }),
15517
+ }), 128)) : renderSlot(_ctx.$slots, "default", { key: 3 }),
15475
15518
  renderSlot(_ctx.$slots, "submit", {
15476
15519
  submit: handleSubmit,
15477
15520
  isDirty: isDirty.value,
15478
15521
  validateForm,
15479
- formState: formState.value
15522
+ formState: formState.value,
15523
+ schemaState: schemaState.value
15480
15524
  })
15481
- ], 34)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(resolvedSchema.value, (field) => {
15482
- return openBlock(), createBlock(resolveDynamicComponent(renderSchemaField(field)), {
15483
- key: field.id,
15484
- class: normalizeClass(props2.class)
15485
- }, null, 8, ["class"]);
15486
- }), 128))
15525
+ ], 34)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
15526
+ schemaState.value === "loading" ? renderSlot(_ctx.$slots, "loading", { key: 0 }, () => [
15527
+ createVNode(unref(Loading))
15528
+ ]) : schemaState.value === "error" ? renderSlot(_ctx.$slots, "schema-error", { key: 1 }, () => [
15529
+ _cache[1] || (_cache[1] = createElementVNode("div", { class: "flex-center h-300px txt-red" }, " Error loading form ", -1))
15530
+ ]) : resolvedSchema.value ? (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(resolvedSchema.value, (field) => {
15531
+ return openBlock(), createBlock(resolveDynamicComponent(renderSchemaField(field)), {
15532
+ key: field.id,
15533
+ class: normalizeClass(props2.class)
15534
+ }, null, 8, ["class"]);
15535
+ }), 128)) : createCommentVNode("", true)
15536
+ ], 64))
15487
15537
  ], 64)) : createCommentVNode("", true),
15488
15538
  formState.value === "success" ? renderSlot(_ctx.$slots, "success", { key: 1 }) : createCommentVNode("", true),
15489
15539
  formState.value === "error" ? renderSlot(_ctx.$slots, "error", { key: 2 }) : createCommentVNode("", true)
@@ -15497,10 +15547,18 @@ const _hoisted_2$y = {
15497
15547
  class: "ps-025 border-start mb-05"
15498
15548
  };
15499
15549
  const _hoisted_3$t = {
15550
+ key: 0,
15551
+ class: "flex-center h-300px"
15552
+ };
15553
+ const _hoisted_4$j = {
15554
+ key: 1,
15555
+ class: "flex-center h-300px txt-red"
15556
+ };
15557
+ const _hoisted_5$i = {
15500
15558
  key: 0,
15501
15559
  class: "minimizedText txt14 p-025 opacity-7"
15502
15560
  };
15503
- const _hoisted_4$j = { class: "bg-gray-80 -my-05 px-025 pt-065 pb-05 txt-center space-between flex column" };
15561
+ const _hoisted_6$f = { class: "bg-gray-80 -my-05 px-025 pt-065 pb-05 txt-center space-between flex column" };
15504
15562
  const _sfc_main$S = /* @__PURE__ */ defineComponent({
15505
15563
  __name: "FieldArray",
15506
15564
  props: {
@@ -15527,109 +15585,114 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
15527
15585
  const props2 = __props;
15528
15586
  const emit2 = __emit;
15529
15587
  const minimizedItems = ref([]);
15530
- const data2 = ref(props2.modelValue || []);
15588
+ const internalData = ref(props2.modelValue || []);
15589
+ const schemaState = ref("loaded");
15590
+ const resolvedSchemaData = ref([]);
15591
+ async function resolveSchema() {
15592
+ if (!props2.schema) {
15593
+ resolvedSchemaData.value = [];
15594
+ schemaState.value = "loaded";
15595
+ return;
15596
+ }
15597
+ try {
15598
+ schemaState.value = "loading";
15599
+ const isPromise = (obj) => obj && typeof obj.then === "function";
15600
+ let result2;
15601
+ if (typeof props2.schema === "function") {
15602
+ result2 = props2.schema();
15603
+ result2 = isPromise(result2) ? await result2 : result2;
15604
+ } else {
15605
+ result2 = isPromise(props2.schema) ? await props2.schema : props2.schema;
15606
+ }
15607
+ resolvedSchemaData.value = result2;
15608
+ schemaState.value = "loaded";
15609
+ } catch (error) {
15610
+ console.error("Schema error:", error);
15611
+ schemaState.value = "error";
15612
+ resolvedSchemaData.value = [];
15613
+ }
15614
+ }
15615
+ onMounted(() => {
15616
+ resolveSchema();
15617
+ });
15531
15618
  function emitValue() {
15532
- emit2("update:modelValue", data2.value);
15619
+ emit2("update:modelValue", internalData.value);
15533
15620
  }
15534
15621
  function deleteItem(i2) {
15535
- data2.value.splice(i2, 1);
15622
+ internalData.value.splice(i2, 1);
15536
15623
  emitValue();
15537
15624
  }
15538
15625
  function addItem() {
15539
- data2.value.push({});
15626
+ internalData.value.push({});
15540
15627
  emitValue();
15541
15628
  }
15542
15629
  function toggleMinimized(index2) {
15543
15630
  minimizedItems.value[index2] = !minimizedItems.value[index2];
15544
15631
  }
15545
- const computedField = computed(
15546
- () => ({
15547
- label: props2.label,
15548
- placeholder: props2.placeholder,
15549
- children: props2.children,
15550
- // class: props.class,
15551
- attrs: props2.attrs,
15552
- required: props2.required,
15553
- disabled: props2.disabled,
15554
- helptext: props2.helptext,
15555
- options: props2.options,
15556
- defaultValue: props2.defaultValue,
15557
- transform: props2.transform,
15558
- $el: props2.el
15559
- })
15560
- );
15561
- const resolvedSchema = computed(() => {
15562
- if (!props2.schema) return [];
15563
- return typeof props2.schema === "function" ? props2.schema() : props2.schema;
15564
- });
15565
- const { renderField } = useSchemaField({
15566
- mode: "form",
15567
- getRowData: () => data2.value,
15568
- onUpdate: (field, value) => {
15569
- if (!field.id) return;
15570
- const index2 = Number.parseInt(field.id);
15571
- if (Number.isNaN(index2)) return;
15572
- data2.value[index2] = value;
15573
- emitValue();
15574
- }
15575
- });
15632
+ function updateItem(index2, value) {
15633
+ internalData.value[index2] = value;
15634
+ emitValue();
15635
+ }
15576
15636
  return (_ctx, _cache) => {
15577
15637
  return openBlock(), createElementBlock("div", {
15578
15638
  class: normalizeClass(props2.class)
15579
15639
  }, [
15580
15640
  createElementVNode("p", _hoisted_1$L, toDisplayString(_ctx.label), 1),
15581
- resolvedSchema.value ? (openBlock(), createElementBlock("div", _hoisted_2$y, [
15582
- (openBlock(true), createElementBlock(Fragment, null, renderList(data2.value, (_2, i2) => {
15583
- return openBlock(), createElementBlock("div", {
15584
- key: i2,
15585
- outline: "",
15586
- thin: "",
15587
- class: normalizeClass(["mb-05 itemBox transition ps-05 pb-025 pt-025 radius-05 gap-05 overflow-hidden", { minimized: minimizedItems.value[i2] }])
15588
- }, [
15589
- minimizedItems.value[i2] ? (openBlock(), createElementBlock("p", _hoisted_3$t, toDisplayString(_ctx.label) + " " + toDisplayString(i2 + 1), 1)) : (openBlock(), createBlock(unref(_sfc_main$T), {
15590
- key: 1,
15591
- modelValue: data2.value[i2],
15592
- "onUpdate:modelValue": [($event) => data2.value[i2] = $event, emitValue],
15593
- schema: resolvedSchema.value
15594
- }, null, 8, ["modelValue", "onUpdate:modelValue", "schema"])),
15595
- createElementVNode("div", _hoisted_4$j, [
15596
- resolvedSchema.value.length > 4 ? (openBlock(), createBlock(unref(Btn), {
15597
- key: 0,
15598
- class: "block rotate-180 txt10 opacity-7 p-025",
15599
- flat: "",
15600
- thin: "",
15601
- icon: "keyboard_arrow_down",
15602
- onClick: ($event) => toggleMinimized(i2)
15603
- }, null, 8, ["onClick"])) : createCommentVNode("", true),
15604
- props2.delete ? (openBlock(), createBlock(unref(Btn), {
15641
+ resolvedSchemaData.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$y, [
15642
+ schemaState.value === "loading" ? (openBlock(), createElementBlock("div", _hoisted_3$t, [
15643
+ createVNode(unref(Loading))
15644
+ ])) : schemaState.value === "error" ? (openBlock(), createElementBlock("div", _hoisted_4$j, " Error ")) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
15645
+ (openBlock(true), createElementBlock(Fragment, null, renderList(internalData.value, (item, i2) => {
15646
+ return openBlock(), createElementBlock("div", {
15647
+ key: i2,
15648
+ outline: "",
15649
+ thin: "",
15650
+ class: normalizeClass(["mb-05 itemBox transition ps-05 pb-025 pt-025 radius-05 gap-05 overflow-hidden", { minimized: minimizedItems.value[i2] }])
15651
+ }, [
15652
+ minimizedItems.value[i2] ? (openBlock(), createElementBlock("p", _hoisted_5$i, toDisplayString(_ctx.label) + " " + toDisplayString(i2 + 1), 1)) : (openBlock(), createBlock(unref(_sfc_main$T), {
15605
15653
  key: 1,
15606
- icon: "delete",
15607
- class: "txt10 opacity-7",
15608
- thin: "",
15609
- flat: "",
15610
- onClick: ($event) => deleteItem(i2)
15611
- }, null, 8, ["onClick"])) : createCommentVNode("", true)
15612
- ])
15613
- ], 2);
15614
- }), 128)),
15615
- _ctx.add ? (openBlock(), createBlock(unref(Btn), {
15616
- key: 0,
15617
- thin: "",
15618
- icon: "add",
15619
- color: "gray",
15620
- class: "txt12",
15621
- onClick: addItem
15622
- }, {
15623
- default: withCtx(() => [
15624
- createElementVNode("p", null, toDisplayString(_ctx.label), 1)
15625
- ]),
15626
- _: 1
15627
- })) : createCommentVNode("", true)
15628
- ])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(data2.value, (_2, i2) => {
15629
- return openBlock(), createBlock(resolveDynamicComponent(unref(renderField)({ ...computedField.value, id: String(i2) })), {
15630
- key: i2,
15631
- "onUpdate:modelValue": emitValue
15632
- });
15654
+ "model-value": item,
15655
+ schema: resolvedSchemaData.value,
15656
+ "onUpdate:modelValue": (val) => updateItem(i2, val)
15657
+ }, null, 8, ["model-value", "schema", "onUpdate:modelValue"])),
15658
+ createElementVNode("div", _hoisted_6$f, [
15659
+ resolvedSchemaData.value.length > 4 ? (openBlock(), createBlock(unref(Btn), {
15660
+ key: 0,
15661
+ class: "block rotate-180 txt10 opacity-7 p-025",
15662
+ flat: "",
15663
+ thin: "",
15664
+ icon: "keyboard_arrow_down",
15665
+ onClick: ($event) => toggleMinimized(i2)
15666
+ }, null, 8, ["onClick"])) : createCommentVNode("", true),
15667
+ props2.delete ? (openBlock(), createBlock(unref(Btn), {
15668
+ key: 1,
15669
+ icon: "delete",
15670
+ class: "txt10 opacity-7",
15671
+ thin: "",
15672
+ flat: "",
15673
+ onClick: ($event) => deleteItem(i2)
15674
+ }, null, 8, ["onClick"])) : createCommentVNode("", true)
15675
+ ])
15676
+ ], 2);
15677
+ }), 128)),
15678
+ _ctx.add ? (openBlock(), createBlock(unref(Btn), {
15679
+ key: 0,
15680
+ thin: "",
15681
+ icon: "add",
15682
+ color: "gray",
15683
+ class: "txt12",
15684
+ onClick: addItem
15685
+ }, {
15686
+ default: withCtx(() => [
15687
+ createElementVNode("p", null, toDisplayString(_ctx.label), 1)
15688
+ ]),
15689
+ _: 1
15690
+ })) : createCommentVNode("", true)
15691
+ ], 64))
15692
+ ])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(internalData.value, (_2, i2) => {
15693
+ return openBlock(), createElementBlock("div", { key: i2 }, _cache[0] || (_cache[0] = [
15694
+ createElementVNode("p", null, "No schema available", -1)
15695
+ ]));
15633
15696
  }), 128))
15634
15697
  ], 2);
15635
15698
  };
@@ -34124,7 +34187,7 @@ const _hoisted_1$c = { class: "flex-center" };
34124
34187
  const _sfc_main$f = /* @__PURE__ */ defineComponent({
34125
34188
  __name: "Loading",
34126
34189
  props: {
34127
- size: { default: 64 },
34190
+ size: { default: 50 },
34128
34191
  thickness: {},
34129
34192
  duration: { default: 1.2 },
34130
34193
  type: { default: "ring" },
@@ -34139,7 +34202,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
34139
34202
  const computedSize = computed(() => standardSize(__props.size));
34140
34203
  const animationDuration = computed(() => `${__props.duration}s`);
34141
34204
  const computedBorder = computed(() => {
34142
- const borderValue = __props.thickness ?? Number.parseInt(computedSize.value) / 7;
34205
+ const borderValue = __props.thickness ?? Math.max(Number.parseInt(computedSize.value) / 9, 2);
34143
34206
  return standardSize(borderValue);
34144
34207
  });
34145
34208
  return (_ctx, _cache) => {
@@ -34185,7 +34248,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
34185
34248
  };
34186
34249
  }
34187
34250
  });
34188
- const Loading = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-2e27b3c1"]]);
34251
+ const Loading = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-221a3053"]]);
34189
34252
  const _hoisted_1$b = ["id"];
34190
34253
  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>';
34191
34254
  const leafletScriptUrl = "https://unpkg.com/leaflet@1.9.4/dist/leaflet.js";
@@ -36218,10 +36281,17 @@ function useBagelFormState() {
36218
36281
  if (!state2) throw new Error("BagelFormState must be provided");
36219
36282
  return state2;
36220
36283
  }
36221
- function useBglSchema({ schema, columns, data: data2 } = {}) {
36284
+ async function useBglSchema({ schema, columns, data: data2 } = {}) {
36222
36285
  let _schema = schema;
36223
36286
  if (typeof _schema === "function") {
36224
- _schema = _schema();
36287
+ const result2 = _schema();
36288
+ if (result2 instanceof Promise) {
36289
+ _schema = await result2;
36290
+ } else {
36291
+ _schema = result2;
36292
+ }
36293
+ } else if (_schema instanceof Promise) {
36294
+ _schema = await _schema;
36225
36295
  }
36226
36296
  if (_schema) {
36227
36297
  return columns && columns.length > 0 ? _schema.filter((f2) => columns.includes(f2.id)) : _schema;