@bagelink/vue 0.0.1045 → 0.0.1048

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.
@@ -1 +1 @@
1
- {"version":3,"file":"BglComponent.vue.d.ts","sourceRoot":"","sources":["../../src/components/BglComponent.vue"],"names":[],"mappings":"AAgLA,OAAO,EAIN,KAAK,KAAK,EAYV,MAAM,eAAe,CAAA;yBAGL,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,eAChC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAiNxD,mBAAmB,CAAC;;;eA7MtB,KAAK,CAAC,CAAC,CAAC;aACV,MAAM;qBACE,GAAG;qBACH,MAAM;KA0MmG,CAAC,4BAA2B;oBAChI,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;yBAhCgB,GAAG;;;OAqCpB,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA3NzE,wBA2N4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"BglComponent.vue.d.ts","sourceRoot":"","sources":["../../src/components/BglComponent.vue"],"names":[],"mappings":"AAAA,OAgLO,EAIN,KAAK,KAAK,EAYV,MAAM,eAAe,CAAA;yBAGL,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,eAChC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAiNxD,mBAAmB,CAAC;;;eA7MtB,KAAK,CAAC,CAAC,CAAC;aACV,MAAM;qBACE,GAAG;qBACH,MAAM;KA0MmG,CAAC,4BAA2B;oBAChI,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;yBAhCgB,GAAG;;;OAqCpB,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA3NzE,wBA2N4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -4,15 +4,13 @@ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable
4
4
  readonly "onUpdate:modelValue"?: ((value: any) => any) | undefined;
5
5
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue"> & Partial<{}> & {
6
6
  field: Field<T>;
7
- id?: string;
7
+ fieldID?: string;
8
8
  modelValue?: any;
9
9
  parentPath?: string;
10
10
  }> & import('vue').PublicProps;
11
11
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
12
12
  attrs: any;
13
- slots: {
14
- default?(_: {}): any;
15
- };
13
+ slots: {};
16
14
  emit: (evt: "update:modelValue", value: any) => void;
17
15
  }>) => import('vue').VNode & {
18
16
  __ctx?: Awaited<typeof __VLS_setup>;
@@ -1 +1 @@
1
- {"version":3,"file":"BglField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/form/BglField.vue"],"names":[],"mappings":"AAAA,OAyIO,EAIN,KAAK,KAAK,EAYV,MAAM,eAAe,CAAA;yBAML,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,eAChC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAuKxD,mBAAmB,CAAC;;;eAnKtB,KAAK,CAAC,CAAC,CAAC;aACV,MAAM;qBACE,GAAG;qBACH,MAAM;KAgKmG,CAAC,4BAA2B;oBAChI,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;yBAhCgB,GAAG;;;OAqCpB,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAjLzE,wBAiL4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"BglField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/form/BglField.vue"],"names":[],"mappings":"AAAA,OAuIO,EAIN,KAAK,KAAK,EAYV,MAAM,eAAe,CAAA;yBAML,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,eAChC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAwKxD,mBAAmB,CAAC;;;eApKtB,KAAK,CAAC,CAAC,CAAC;kBACL,MAAM;qBACH,GAAG;qBACH,MAAM;KAiKmG,CAAC,4BAA2B;oBAChI,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;OAKD,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAlLzE,wBAkL4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -2,7 +2,7 @@ import { BglFormSchemaFnT } from '../..';
2
2
  export type FormStatus = 'idle' | 'loading' | 'success' | 'error';
3
3
  type __VLS_Props = {
4
4
  label?: string;
5
- id?: string;
5
+ fieldID?: string;
6
6
  schema: BglFormSchemaFnT<any>;
7
7
  modelValue?: {
8
8
  [key: string]: any;
@@ -10,6 +10,7 @@ type __VLS_Props = {
10
10
  onDelete?: (id: string) => void;
11
11
  onSubmit?: (data: any) => void;
12
12
  status?: FormStatus;
13
+ tag?: 'template' | 'form';
13
14
  };
14
15
  declare function validateForm(): boolean;
15
16
  declare function clearForm(): void;
@@ -52,6 +53,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
52
53
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
53
54
  onDirty?: ((...args: any[]) => any) | undefined;
54
55
  }>, {
56
+ tag: "template" | "form";
55
57
  modelValue: {
56
58
  [key: string]: any;
57
59
  };
@@ -1 +1 @@
1
- {"version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K,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -8,7 +8,7 @@ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable
8
8
  } & {
9
9
  bagelFormProps?: Omit<{
10
10
  readonly label?: string | undefined;
11
- readonly id?: string | undefined;
11
+ readonly fieldID?: string | undefined;
12
12
  readonly schema: BglFormSchemaFnT<any>;
13
13
  readonly modelValue?: {
14
14
  [key: string]: any;
@@ -16,6 +16,7 @@ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable
16
16
  readonly onDelete?: ((id: string) => void) | undefined;
17
17
  readonly onSubmit?: (((data: any) => void) & ((...args: any[]) => any)) | undefined;
18
18
  readonly status?: import('./BglForm.vue').FormStatus | undefined;
19
+ readonly tag?: "template" | "form" | undefined;
19
20
  readonly "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
20
21
  readonly onDirty?: ((...args: any[]) => any) | undefined;
21
22
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, ("schema" | `${string}modelValue` | `ref${string}` | `onVnode${string}` | "onSubmit")>;
@@ -1 +1 @@
1
- {"version":3,"file":"BglMultiStepForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/form/BglMultiStepForm.vue"],"names":[],"mappings":"AA6HA,OAAO,EAAa,KAAK,gBAAgB,EAAqB,MAAM,eAAe,CAAA;yBAIlE,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,eAChC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC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AAG,GAAG,MAAM,YAAY,GAAG,MAAM,MAAM,EAAE,GAAG,UAAU,MAAM,EAAE,GAAG,UAAU,CAClF,CACD;gBACO,gBAAgB,CAAC,CAAC,CAAC;MAmQ0F,CAAC,4BAA2B;oBAChI,OAAO,KAAK,EAAE,gBAAgB;;;;;;MAAsB,GAAG,IAAI;WACpE,GAAG;;yBA5CiB,GAAG;uBACL,GAAG;;;;;YACA,GAAG;;UA4CzB,4FAAqC;OAGlC,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAzRzE,wBAyR4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
package/dist/index.cjs CHANGED
@@ -61,7 +61,7 @@ const _sfc_main$17 = /* @__PURE__ */ vue.defineComponent({
61
61
  };
62
62
  }
63
63
  });
64
- const _hoisted_1$T = ["aria-expanded", "aria-controls"];
64
+ const _hoisted_1$U = ["aria-expanded", "aria-controls"];
65
65
  const _hoisted_2$B = { class: "accordion-label" };
66
66
  const _hoisted_3$s = ["id", "aria-hidden"];
67
67
  const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
@@ -138,7 +138,7 @@ const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
138
138
  }, [
139
139
  vue.createVNode(vue.unref(_sfc_main$d), { icon: computedIcon.value }, null, 8, ["icon"])
140
140
  ], 2)) : vue.createCommentVNode("", true)
141
- ], 8, _hoisted_1$T),
141
+ ], 8, _hoisted_1$U),
142
142
  vue.createVNode(vue.Transition, { name: "expand" }, {
143
143
  default: vue.withCtx(() => [
144
144
  vue.unref(isOpen) ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -164,7 +164,7 @@ const _export_sfc = (sfc, props2) => {
164
164
  return target;
165
165
  };
166
166
  const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["__scopeId", "data-v-1e73ca3e"]]);
167
- const _hoisted_1$S = { class: "relative" };
167
+ const _hoisted_1$T = { class: "relative" };
168
168
  const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
169
169
  __name: "AddressSearch",
170
170
  emits: ["addressSelected"],
@@ -187,7 +187,7 @@ const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
187
187
  (_a2 = suggestion.value) == null ? void 0 : _a2.show();
188
188
  }
189
189
  return (_ctx, _cache) => {
190
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$S, [
190
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$T, [
191
191
  vue.createVNode(vue.unref(_sfc_main$W), {
192
192
  ref_key: "suggestion",
193
193
  ref: suggestion,
@@ -223,7 +223,7 @@ const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
223
223
  };
224
224
  }
225
225
  });
226
- const _hoisted_1$R = {
226
+ const _hoisted_1$S = {
227
227
  key: 1,
228
228
  class: "bgl_btn-flex"
229
229
  };
@@ -292,7 +292,7 @@ const _sfc_main$14 = /* @__PURE__ */ vue.defineComponent({
292
292
  _ctx.loading ? (vue.openBlock(), vue.createBlock(vue.unref(Loading), {
293
293
  key: 0,
294
294
  size: "15"
295
- })) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$R, [
295
+ })) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$S, [
296
296
  _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$d), {
297
297
  key: 0,
298
298
  icon: _ctx.icon
@@ -315,7 +315,7 @@ const _sfc_main$14 = /* @__PURE__ */ vue.defineComponent({
315
315
  }
316
316
  });
317
317
  const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["__scopeId", "data-v-c23a3626"]]);
318
- const _hoisted_1$Q = ["dismissable"];
318
+ const _hoisted_1$R = ["dismissable"];
319
319
  const _hoisted_2$A = { class: "m-0" };
320
320
  const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent({
321
321
  __name: "Alert",
@@ -353,12 +353,12 @@ const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent({
353
353
  icon: "close",
354
354
  onClick: _cache[0] || (_cache[0] = ($event) => isDismissed.value = true)
355
355
  })
356
- ], 10, _hoisted_1$Q)) : vue.createCommentVNode("", true);
356
+ ], 10, _hoisted_1$R)) : vue.createCommentVNode("", true);
357
357
  };
358
358
  }
359
359
  });
360
360
  const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-57141c32"]]);
361
- const _hoisted_1$P = ["src", "alt"];
361
+ const _hoisted_1$Q = ["src", "alt"];
362
362
  const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({
363
363
  __name: "Avatar",
364
364
  props: {
@@ -377,7 +377,7 @@ const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({
377
377
  key: 0,
378
378
  src: _ctx.src,
379
379
  alt: _ctx.name
380
- }, null, 8, _hoisted_1$P)) : (vue.openBlock(), vue.createElementBlock("p", {
380
+ }, null, 8, _hoisted_1$Q)) : (vue.openBlock(), vue.createElementBlock("p", {
381
381
  key: 1,
382
382
  style: vue.normalizeStyle({ "line-height": `${_ctx.size}px`, "font-size": `calc(1.5rem * ${_ctx.size} / 50)` })
383
383
  }, vue.toDisplayString((_ctx.fallback || vue.unref(initials)(_ctx.name || "")).toUpperCase()), 5))
@@ -561,7 +561,7 @@ const _sfc_main$10 = /* @__PURE__ */ vue.defineComponent({
561
561
  };
562
562
  }
563
563
  });
564
- const _hoisted_1$O = ["src"];
564
+ const _hoisted_1$P = ["src"];
565
565
  const _hoisted_2$z = ["autoplay", "muted", "loop", "controls", "playsinline"];
566
566
  const _hoisted_3$r = ["src", "type"];
567
567
  const _sfc_main$$ = /* @__PURE__ */ vue.defineComponent({
@@ -641,7 +641,7 @@ const _sfc_main$$ = /* @__PURE__ */ vue.defineComponent({
641
641
  allowfullscreen: "",
642
642
  title: "Video",
643
643
  allow: "autoplay"
644
- }, null, 12, _hoisted_1$O)) : _ctx.src ? (vue.openBlock(), vue.createElementBlock("video", {
644
+ }, null, 12, _hoisted_1$P)) : _ctx.src ? (vue.openBlock(), vue.createElementBlock("video", {
645
645
  key: 1,
646
646
  ref_key: "video",
647
647
  ref: video,
@@ -662,7 +662,7 @@ const _sfc_main$$ = /* @__PURE__ */ vue.defineComponent({
662
662
  }
663
663
  });
664
664
  const BglVideo = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-006552f6"]]);
665
- const _hoisted_1$N = {
665
+ const _hoisted_1$O = {
666
666
  key: 0,
667
667
  class: "card_label"
668
668
  };
@@ -695,7 +695,7 @@ const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({
695
695
  }])
696
696
  }, {
697
697
  default: vue.withCtx(() => [
698
- _ctx.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$N, vue.toDisplayString(_ctx.label), 1)) : vue.createCommentVNode("", true),
698
+ _ctx.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$O, vue.toDisplayString(_ctx.label), 1)) : vue.createCommentVNode("", true),
699
699
  vue.renderSlot(_ctx.$slots, "default")
700
700
  ]),
701
701
  _: 3
@@ -705,7 +705,7 @@ const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({
705
705
  };
706
706
  }
707
707
  });
708
- const _hoisted_1$M = ["dir"];
708
+ const _hoisted_1$N = ["dir"];
709
709
  const _hoisted_2$y = {
710
710
  key: 0,
711
711
  class: "blocker"
@@ -918,7 +918,7 @@ const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
918
918
  }, void 0, true)
919
919
  ])
920
920
  ])
921
- ], 14, _hoisted_1$M);
921
+ ], 14, _hoisted_1$N);
922
922
  };
923
923
  }
924
924
  });
@@ -6866,13 +6866,13 @@ var script = vue.defineComponent({
6866
6866
  return { bar, canvas, direction, mouse };
6867
6867
  }
6868
6868
  });
6869
- const _hoisted_1$L = {
6869
+ const _hoisted_1$M = {
6870
6870
  key: 0,
6871
6871
  class: "layer-hover-bar"
6872
6872
  };
6873
6873
  const _hoisted_2$x = ["x", "y", "width", "height"];
6874
6874
  function render(_ctx, _cache, $props, $setup, $data, $options) {
6875
- return _ctx.mouse.hover ? (vue.openBlock(), vue.createElementBlock("g", _hoisted_1$L, [
6875
+ return _ctx.mouse.hover ? (vue.openBlock(), vue.createElementBlock("g", _hoisted_1$M, [
6876
6876
  vue.createElementVNode("rect", vue.mergeProps({ class: "hover-bar" }, _ctx.barStyle, {
6877
6877
  x: _ctx.bar.x,
6878
6878
  y: _ctx.bar.y,
@@ -7024,7 +7024,7 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
7024
7024
  };
7025
7025
  }
7026
7026
  });
7027
- const _hoisted_1$K = {
7027
+ const _hoisted_1$L = {
7028
7028
  key: 0,
7029
7029
  class: "data"
7030
7030
  };
@@ -7081,7 +7081,7 @@ const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
7081
7081
  const computedSchema = vue.computed(() => getFallbackSchema([itemData.value], props2.showFields));
7082
7082
  return (_ctx, _cache) => {
7083
7083
  var _a2;
7084
- return __props.data ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$K, [
7084
+ return __props.data ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$L, [
7085
7085
  _ctx.title ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$4), {
7086
7086
  key: 0,
7087
7087
  label: _ctx.title
@@ -9737,7 +9737,7 @@ const _sfc_main$W = /* @__PURE__ */ vue.defineComponent({
9737
9737
  };
9738
9738
  }
9739
9739
  });
9740
- const _hoisted_1$J = { class: "px-1 pt-025 pb-1" };
9740
+ const _hoisted_1$K = { class: "px-1 pt-025 pb-1" };
9741
9741
  const _hoisted_2$v = { class: "ms-1" };
9742
9742
  const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
9743
9743
  __name: "FieldSetVue",
@@ -9747,7 +9747,7 @@ const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
9747
9747
  },
9748
9748
  setup(__props) {
9749
9749
  return (_ctx, _cache) => {
9750
- return vue.openBlock(), vue.createElementBlock("fieldset", _hoisted_1$J, [
9750
+ return vue.openBlock(), vue.createElementBlock("fieldset", _hoisted_1$K, [
9751
9751
  vue.createElementVNode("legend", _hoisted_2$v, vue.toDisplayString(_ctx.legend || _ctx.label), 1),
9752
9752
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
9753
9753
  ]);
@@ -9799,7 +9799,7 @@ function useTabs(group) {
9799
9799
  });
9800
9800
  return { currentTab };
9801
9801
  }
9802
- const _hoisted_1$I = ["onClick"];
9802
+ const _hoisted_1$J = ["onClick"];
9803
9803
  const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
9804
9804
  __name: "TabsNav",
9805
9805
  props: {
@@ -9882,7 +9882,7 @@ const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
9882
9882
  icon: tab.icon
9883
9883
  }, null, 8, ["icon"])) : vue.createCommentVNode("", true),
9884
9884
  vue.createTextVNode(" " + vue.toDisplayString(tabLabel(tab)), 1)
9885
- ], 10, _hoisted_1$I);
9885
+ ], 10, _hoisted_1$J);
9886
9886
  }), 128))
9887
9887
  ], true)
9888
9888
  ], 2);
@@ -9951,11 +9951,12 @@ function useBagelFormState() {
9951
9951
  if (!state2) throw new Error("BagelFormState must be provided");
9952
9952
  return state2;
9953
9953
  }
9954
+ const _hoisted_1$I = { key: 1 };
9954
9955
  const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
9955
9956
  __name: "BglField",
9956
9957
  props: {
9957
9958
  field: {},
9958
- id: {},
9959
+ fieldID: {},
9959
9960
  modelValue: {},
9960
9961
  parentPath: {}
9961
9962
  },
@@ -9981,25 +9982,25 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
9981
9982
  if (props2.field.$el === "file") return FileUpload;
9982
9983
  if (props2.field.$el === "date") return _sfc_main$K;
9983
9984
  if (props2.field.$el === "tabs") return TabsNav;
9984
- if (props2.field.$el === "form") return _sfc_main$R;
9985
+ if (props2.field.$el === "bglform") return _sfc_main$R;
9985
9986
  return props2.field.$el ?? "div";
9986
9987
  });
9987
9988
  const fieldData = vue.computed({
9988
9989
  get: () => {
9989
- if (!props2.id) return props2.field.defaultValue ?? (props2.field.$el === "form" ? {} : "");
9990
- const value = formState == null ? void 0 : formState.getFieldData(props2.id);
9990
+ if (!props2.fieldID) return props2.field.defaultValue ?? (props2.field.$el === "form" ? {} : "");
9991
+ const value = formState == null ? void 0 : formState.getFieldData(props2.fieldID);
9991
9992
  if (props2.field.$el === "form" && !value) return {};
9992
9993
  return value ?? "";
9993
9994
  },
9994
9995
  set: (val) => {
9995
- if (!props2.id) return;
9996
- const currentValue = formState == null ? void 0 : formState.getFieldData(props2.id);
9996
+ if (!props2.fieldID) return;
9997
+ const currentValue = formState == null ? void 0 : formState.getFieldData(props2.fieldID);
9997
9998
  if (JSON.stringify(val) === JSON.stringify(currentValue)) return;
9998
9999
  emit2("update:modelValue", val);
9999
10000
  if (props2.field.onUpdate) {
10000
10001
  props2.field.onUpdate(val, currentValue);
10001
10002
  }
10002
- formState == null ? void 0 : formState.updateField(props2.id, val);
10003
+ formState == null ? void 0 : formState.updateField(props2.fieldID, val);
10003
10004
  }
10004
10005
  });
10005
10006
  const vIf = vue.computed(() => {
@@ -10021,6 +10022,7 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
10021
10022
  );
10022
10023
  const computedAttrs = vue.computed(() => {
10023
10024
  const attrs = { ...customAttrs.value, ...props2.field.attrs };
10025
+ delete attrs.schema;
10024
10026
  return bindAttrs(attrs, fieldData.value, formState == null ? void 0 : formState.data.value);
10025
10027
  });
10026
10028
  const computedClass = vue.computed(
@@ -10033,9 +10035,9 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
10033
10035
  var _a2;
10034
10036
  const _component_BglField = vue.resolveComponent("BglField", true);
10035
10037
  return vIf.value ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(is4.value), vue.mergeProps({ key: 0 }, computedAttrs.value, {
10036
- id: props2.id,
10037
10038
  modelValue: fieldData.value,
10038
10039
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fieldData.value = $event),
10040
+ fieldID: props2.fieldID,
10039
10041
  required: _ctx.field.required,
10040
10042
  class: computedClass.value,
10041
10043
  label: _ctx.field.label,
@@ -10047,17 +10049,19 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
10047
10049
  schema: ((_a2 = _ctx.field.attrs) == null ? void 0 : _a2.schema) ?? void 0
10048
10050
  }), {
10049
10051
  default: vue.withCtx(() => [
10050
- _ctx.field.$el === "form" ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(_ctx.field.children, (child, ii) => {
10051
- return vue.openBlock(), vue.createBlock(_component_BglField, {
10052
- id: [props2.id, child.id].filter(Boolean).join("."),
10053
- key: child.id || ii,
10054
- field: child,
10055
- "parent-path": props2.id
10056
- }, null, 8, ["id", "field", "parent-path"]);
10052
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.field.children, (child, ii) => {
10053
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: ii }, [
10054
+ typeof child !== "string" ? (vue.openBlock(), vue.createBlock(_component_BglField, {
10055
+ key: 0,
10056
+ fieldID: [props2.fieldID, child.id].filter(Boolean).join("."),
10057
+ field: child,
10058
+ "parent-path": props2.fieldID
10059
+ }, null, 8, ["fieldID", "field", "parent-path"])) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$I, vue.toDisplayString(child), 1))
10060
+ ], 64);
10057
10061
  }), 128))
10058
10062
  ]),
10059
- _: 3
10060
- }, 16, ["id", "modelValue", "required", "class", "label", "placeholder", "defaultValue", "disabled", "options", "helptext", "schema"])) : vue.createCommentVNode("", true);
10063
+ _: 1
10064
+ }, 16, ["modelValue", "fieldID", "required", "class", "label", "placeholder", "defaultValue", "disabled", "options", "helptext", "schema"])) : vue.createCommentVNode("", true);
10061
10065
  };
10062
10066
  }
10063
10067
  });
@@ -10065,12 +10069,13 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
10065
10069
  __name: "BglForm",
10066
10070
  props: {
10067
10071
  label: {},
10068
- id: {},
10072
+ fieldID: {},
10069
10073
  schema: {},
10070
10074
  modelValue: { default: () => ({}) },
10071
10075
  onDelete: {},
10072
10076
  onSubmit: {},
10073
- status: {}
10077
+ status: {},
10078
+ tag: { default: "form" }
10074
10079
  },
10075
10080
  emits: ["update:modelValue", "submit", "dirty"],
10076
10081
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -10081,7 +10086,7 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
10081
10086
  const instAt = /* @__PURE__ */ new Date();
10082
10087
  const timeSinceInst = () => Date.now() - instAt.getTime();
10083
10088
  const existingFormState = vue.inject(FORM_STATE_KEY);
10084
- const isNested = Boolean(existingFormState && props2.id);
10089
+ const isNested = Boolean(existingFormState && props2.fieldID);
10085
10090
  const { data: data2, isDirty } = isNested ? existingFormState : provideBagelFormState(props2.modelValue);
10086
10091
  if (!isNested) {
10087
10092
  vue.watch(() => props2.modelValue, (newVal) => {
@@ -10159,13 +10164,13 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
10159
10164
  });
10160
10165
  return (_ctx, _cache) => {
10161
10166
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
10162
- _ctx.id ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
10167
+ _ctx.tag === "template" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
10163
10168
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(computedSchema.value, (field, i2) => {
10164
10169
  return vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$S), {
10165
- id: [_ctx.id, field.id].filter(Boolean).join("."),
10166
10170
  key: field.id || `${i2}p`,
10171
+ fieldID: field.id,
10167
10172
  field
10168
- }, null, 8, ["id", "field"]);
10173
+ }, null, 8, ["fieldID", "field"]);
10169
10174
  }), 128)),
10170
10175
  vue.renderSlot(_ctx.$slots, "submit", {
10171
10176
  submit: runSubmit,
@@ -10185,10 +10190,10 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
10185
10190
  }, null, 8, ["label"])) : vue.createCommentVNode("", true),
10186
10191
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(computedSchema.value, (field, i2) => {
10187
10192
  return vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$S), {
10188
- id: field.id,
10189
10193
  key: field.id || `${i2}p`,
10194
+ fieldID: field.id,
10190
10195
  field
10191
- }, null, 8, ["id", "field"]);
10196
+ }, null, 8, ["fieldID", "field"]);
10192
10197
  }), 128)),
10193
10198
  vue.renderSlot(_ctx.$slots, "submit", {
10194
10199
  submit: runSubmit,
@@ -34393,7 +34398,7 @@ function findBglFieldById(id, _schema) {
34393
34398
  for (const field of _schema) {
34394
34399
  if (field.id === id) return field;
34395
34400
  if (field.children && Number(field.children.length) > 0) {
34396
- const child = findBglFieldById(id, field.children);
34401
+ const child = findBglFieldById(id, field.children.filter((c2) => typeof c2 !== "string"));
34397
34402
  if (child) return child;
34398
34403
  }
34399
34404
  }
package/dist/index.mjs CHANGED
@@ -59,7 +59,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
59
59
  };
60
60
  }
61
61
  });
62
- const _hoisted_1$T = ["aria-expanded", "aria-controls"];
62
+ const _hoisted_1$U = ["aria-expanded", "aria-controls"];
63
63
  const _hoisted_2$B = { class: "accordion-label" };
64
64
  const _hoisted_3$s = ["id", "aria-hidden"];
65
65
  const _sfc_main$16 = /* @__PURE__ */ defineComponent({
@@ -136,7 +136,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
136
136
  }, [
137
137
  createVNode(unref(_sfc_main$d), { icon: computedIcon.value }, null, 8, ["icon"])
138
138
  ], 2)) : createCommentVNode("", true)
139
- ], 8, _hoisted_1$T),
139
+ ], 8, _hoisted_1$U),
140
140
  createVNode(Transition, { name: "expand" }, {
141
141
  default: withCtx(() => [
142
142
  unref(isOpen) ? (openBlock(), createElementBlock("div", {
@@ -162,7 +162,7 @@ const _export_sfc = (sfc, props2) => {
162
162
  return target;
163
163
  };
164
164
  const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["__scopeId", "data-v-1e73ca3e"]]);
165
- const _hoisted_1$S = { class: "relative" };
165
+ const _hoisted_1$T = { class: "relative" };
166
166
  const _sfc_main$15 = /* @__PURE__ */ defineComponent({
167
167
  __name: "AddressSearch",
168
168
  emits: ["addressSelected"],
@@ -185,7 +185,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
185
185
  (_a2 = suggestion.value) == null ? void 0 : _a2.show();
186
186
  }
187
187
  return (_ctx, _cache) => {
188
- return openBlock(), createElementBlock("div", _hoisted_1$S, [
188
+ return openBlock(), createElementBlock("div", _hoisted_1$T, [
189
189
  createVNode(unref(_sfc_main$W), {
190
190
  ref_key: "suggestion",
191
191
  ref: suggestion,
@@ -221,7 +221,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
221
221
  };
222
222
  }
223
223
  });
224
- const _hoisted_1$R = {
224
+ const _hoisted_1$S = {
225
225
  key: 1,
226
226
  class: "bgl_btn-flex"
227
227
  };
@@ -290,7 +290,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
290
290
  _ctx.loading ? (openBlock(), createBlock(unref(Loading), {
291
291
  key: 0,
292
292
  size: "15"
293
- })) : (openBlock(), createElementBlock("div", _hoisted_1$R, [
293
+ })) : (openBlock(), createElementBlock("div", _hoisted_1$S, [
294
294
  _ctx.icon ? (openBlock(), createBlock(unref(_sfc_main$d), {
295
295
  key: 0,
296
296
  icon: _ctx.icon
@@ -313,7 +313,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
313
313
  }
314
314
  });
315
315
  const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["__scopeId", "data-v-c23a3626"]]);
316
- const _hoisted_1$Q = ["dismissable"];
316
+ const _hoisted_1$R = ["dismissable"];
317
317
  const _hoisted_2$A = { class: "m-0" };
318
318
  const _sfc_main$13 = /* @__PURE__ */ defineComponent({
319
319
  __name: "Alert",
@@ -351,12 +351,12 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
351
351
  icon: "close",
352
352
  onClick: _cache[0] || (_cache[0] = ($event) => isDismissed.value = true)
353
353
  })
354
- ], 10, _hoisted_1$Q)) : createCommentVNode("", true);
354
+ ], 10, _hoisted_1$R)) : createCommentVNode("", true);
355
355
  };
356
356
  }
357
357
  });
358
358
  const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-57141c32"]]);
359
- const _hoisted_1$P = ["src", "alt"];
359
+ const _hoisted_1$Q = ["src", "alt"];
360
360
  const _sfc_main$12 = /* @__PURE__ */ defineComponent({
361
361
  __name: "Avatar",
362
362
  props: {
@@ -375,7 +375,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
375
375
  key: 0,
376
376
  src: _ctx.src,
377
377
  alt: _ctx.name
378
- }, null, 8, _hoisted_1$P)) : (openBlock(), createElementBlock("p", {
378
+ }, null, 8, _hoisted_1$Q)) : (openBlock(), createElementBlock("p", {
379
379
  key: 1,
380
380
  style: normalizeStyle({ "line-height": `${_ctx.size}px`, "font-size": `calc(1.5rem * ${_ctx.size} / 50)` })
381
381
  }, toDisplayString((_ctx.fallback || unref(initials)(_ctx.name || "")).toUpperCase()), 5))
@@ -559,7 +559,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
559
559
  };
560
560
  }
561
561
  });
562
- const _hoisted_1$O = ["src"];
562
+ const _hoisted_1$P = ["src"];
563
563
  const _hoisted_2$z = ["autoplay", "muted", "loop", "controls", "playsinline"];
564
564
  const _hoisted_3$r = ["src", "type"];
565
565
  const _sfc_main$$ = /* @__PURE__ */ defineComponent({
@@ -639,7 +639,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
639
639
  allowfullscreen: "",
640
640
  title: "Video",
641
641
  allow: "autoplay"
642
- }, null, 12, _hoisted_1$O)) : _ctx.src ? (openBlock(), createElementBlock("video", {
642
+ }, null, 12, _hoisted_1$P)) : _ctx.src ? (openBlock(), createElementBlock("video", {
643
643
  key: 1,
644
644
  ref_key: "video",
645
645
  ref: video,
@@ -660,7 +660,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
660
660
  }
661
661
  });
662
662
  const BglVideo = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-006552f6"]]);
663
- const _hoisted_1$N = {
663
+ const _hoisted_1$O = {
664
664
  key: 0,
665
665
  class: "card_label"
666
666
  };
@@ -693,7 +693,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
693
693
  }])
694
694
  }, {
695
695
  default: withCtx(() => [
696
- _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_1$N, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
696
+ _ctx.label ? (openBlock(), createElementBlock("span", _hoisted_1$O, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
697
697
  renderSlot(_ctx.$slots, "default")
698
698
  ]),
699
699
  _: 3
@@ -703,7 +703,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
703
703
  };
704
704
  }
705
705
  });
706
- const _hoisted_1$M = ["dir"];
706
+ const _hoisted_1$N = ["dir"];
707
707
  const _hoisted_2$y = {
708
708
  key: 0,
709
709
  class: "blocker"
@@ -916,7 +916,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
916
916
  }, void 0, true)
917
917
  ])
918
918
  ])
919
- ], 14, _hoisted_1$M);
919
+ ], 14, _hoisted_1$N);
920
920
  };
921
921
  }
922
922
  });
@@ -6864,13 +6864,13 @@ var script = defineComponent({
6864
6864
  return { bar, canvas, direction, mouse };
6865
6865
  }
6866
6866
  });
6867
- const _hoisted_1$L = {
6867
+ const _hoisted_1$M = {
6868
6868
  key: 0,
6869
6869
  class: "layer-hover-bar"
6870
6870
  };
6871
6871
  const _hoisted_2$x = ["x", "y", "width", "height"];
6872
6872
  function render(_ctx, _cache, $props, $setup, $data, $options) {
6873
- return _ctx.mouse.hover ? (openBlock(), createElementBlock("g", _hoisted_1$L, [
6873
+ return _ctx.mouse.hover ? (openBlock(), createElementBlock("g", _hoisted_1$M, [
6874
6874
  createElementVNode("rect", mergeProps({ class: "hover-bar" }, _ctx.barStyle, {
6875
6875
  x: _ctx.bar.x,
6876
6876
  y: _ctx.bar.y,
@@ -7022,7 +7022,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
7022
7022
  };
7023
7023
  }
7024
7024
  });
7025
- const _hoisted_1$K = {
7025
+ const _hoisted_1$L = {
7026
7026
  key: 0,
7027
7027
  class: "data"
7028
7028
  };
@@ -7079,7 +7079,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
7079
7079
  const computedSchema = computed(() => getFallbackSchema([itemData.value], props2.showFields));
7080
7080
  return (_ctx, _cache) => {
7081
7081
  var _a2;
7082
- return __props.data ? (openBlock(), createElementBlock("div", _hoisted_1$K, [
7082
+ return __props.data ? (openBlock(), createElementBlock("div", _hoisted_1$L, [
7083
7083
  _ctx.title ? (openBlock(), createBlock(unref(_sfc_main$4), {
7084
7084
  key: 0,
7085
7085
  label: _ctx.title
@@ -9735,7 +9735,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
9735
9735
  };
9736
9736
  }
9737
9737
  });
9738
- const _hoisted_1$J = { class: "px-1 pt-025 pb-1" };
9738
+ const _hoisted_1$K = { class: "px-1 pt-025 pb-1" };
9739
9739
  const _hoisted_2$v = { class: "ms-1" };
9740
9740
  const _sfc_main$V = /* @__PURE__ */ defineComponent({
9741
9741
  __name: "FieldSetVue",
@@ -9745,7 +9745,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
9745
9745
  },
9746
9746
  setup(__props) {
9747
9747
  return (_ctx, _cache) => {
9748
- return openBlock(), createElementBlock("fieldset", _hoisted_1$J, [
9748
+ return openBlock(), createElementBlock("fieldset", _hoisted_1$K, [
9749
9749
  createElementVNode("legend", _hoisted_2$v, toDisplayString(_ctx.legend || _ctx.label), 1),
9750
9750
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
9751
9751
  ]);
@@ -9797,7 +9797,7 @@ function useTabs(group) {
9797
9797
  });
9798
9798
  return { currentTab };
9799
9799
  }
9800
- const _hoisted_1$I = ["onClick"];
9800
+ const _hoisted_1$J = ["onClick"];
9801
9801
  const _sfc_main$T = /* @__PURE__ */ defineComponent({
9802
9802
  __name: "TabsNav",
9803
9803
  props: {
@@ -9880,7 +9880,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
9880
9880
  icon: tab.icon
9881
9881
  }, null, 8, ["icon"])) : createCommentVNode("", true),
9882
9882
  createTextVNode(" " + toDisplayString(tabLabel(tab)), 1)
9883
- ], 10, _hoisted_1$I);
9883
+ ], 10, _hoisted_1$J);
9884
9884
  }), 128))
9885
9885
  ], true)
9886
9886
  ], 2);
@@ -9949,11 +9949,12 @@ function useBagelFormState() {
9949
9949
  if (!state2) throw new Error("BagelFormState must be provided");
9950
9950
  return state2;
9951
9951
  }
9952
+ const _hoisted_1$I = { key: 1 };
9952
9953
  const _sfc_main$S = /* @__PURE__ */ defineComponent({
9953
9954
  __name: "BglField",
9954
9955
  props: {
9955
9956
  field: {},
9956
- id: {},
9957
+ fieldID: {},
9957
9958
  modelValue: {},
9958
9959
  parentPath: {}
9959
9960
  },
@@ -9979,25 +9980,25 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
9979
9980
  if (props2.field.$el === "file") return FileUpload;
9980
9981
  if (props2.field.$el === "date") return _sfc_main$K;
9981
9982
  if (props2.field.$el === "tabs") return TabsNav;
9982
- if (props2.field.$el === "form") return _sfc_main$R;
9983
+ if (props2.field.$el === "bglform") return _sfc_main$R;
9983
9984
  return props2.field.$el ?? "div";
9984
9985
  });
9985
9986
  const fieldData = computed({
9986
9987
  get: () => {
9987
- if (!props2.id) return props2.field.defaultValue ?? (props2.field.$el === "form" ? {} : "");
9988
- const value = formState == null ? void 0 : formState.getFieldData(props2.id);
9988
+ if (!props2.fieldID) return props2.field.defaultValue ?? (props2.field.$el === "form" ? {} : "");
9989
+ const value = formState == null ? void 0 : formState.getFieldData(props2.fieldID);
9989
9990
  if (props2.field.$el === "form" && !value) return {};
9990
9991
  return value ?? "";
9991
9992
  },
9992
9993
  set: (val) => {
9993
- if (!props2.id) return;
9994
- const currentValue = formState == null ? void 0 : formState.getFieldData(props2.id);
9994
+ if (!props2.fieldID) return;
9995
+ const currentValue = formState == null ? void 0 : formState.getFieldData(props2.fieldID);
9995
9996
  if (JSON.stringify(val) === JSON.stringify(currentValue)) return;
9996
9997
  emit2("update:modelValue", val);
9997
9998
  if (props2.field.onUpdate) {
9998
9999
  props2.field.onUpdate(val, currentValue);
9999
10000
  }
10000
- formState == null ? void 0 : formState.updateField(props2.id, val);
10001
+ formState == null ? void 0 : formState.updateField(props2.fieldID, val);
10001
10002
  }
10002
10003
  });
10003
10004
  const vIf = computed(() => {
@@ -10019,6 +10020,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
10019
10020
  );
10020
10021
  const computedAttrs = computed(() => {
10021
10022
  const attrs = { ...customAttrs.value, ...props2.field.attrs };
10023
+ delete attrs.schema;
10022
10024
  return bindAttrs(attrs, fieldData.value, formState == null ? void 0 : formState.data.value);
10023
10025
  });
10024
10026
  const computedClass = computed(
@@ -10031,9 +10033,9 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
10031
10033
  var _a2;
10032
10034
  const _component_BglField = resolveComponent("BglField", true);
10033
10035
  return vIf.value ? (openBlock(), createBlock(resolveDynamicComponent(is4.value), mergeProps({ key: 0 }, computedAttrs.value, {
10034
- id: props2.id,
10035
10036
  modelValue: fieldData.value,
10036
10037
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fieldData.value = $event),
10038
+ fieldID: props2.fieldID,
10037
10039
  required: _ctx.field.required,
10038
10040
  class: computedClass.value,
10039
10041
  label: _ctx.field.label,
@@ -10045,17 +10047,19 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
10045
10047
  schema: ((_a2 = _ctx.field.attrs) == null ? void 0 : _a2.schema) ?? void 0
10046
10048
  }), {
10047
10049
  default: withCtx(() => [
10048
- _ctx.field.$el === "form" ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.field.children, (child, ii) => {
10049
- return openBlock(), createBlock(_component_BglField, {
10050
- id: [props2.id, child.id].filter(Boolean).join("."),
10051
- key: child.id || ii,
10052
- field: child,
10053
- "parent-path": props2.id
10054
- }, null, 8, ["id", "field", "parent-path"]);
10050
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.field.children, (child, ii) => {
10051
+ return openBlock(), createElementBlock(Fragment, { key: ii }, [
10052
+ typeof child !== "string" ? (openBlock(), createBlock(_component_BglField, {
10053
+ key: 0,
10054
+ fieldID: [props2.fieldID, child.id].filter(Boolean).join("."),
10055
+ field: child,
10056
+ "parent-path": props2.fieldID
10057
+ }, null, 8, ["fieldID", "field", "parent-path"])) : (openBlock(), createElementBlock("span", _hoisted_1$I, toDisplayString(child), 1))
10058
+ ], 64);
10055
10059
  }), 128))
10056
10060
  ]),
10057
- _: 3
10058
- }, 16, ["id", "modelValue", "required", "class", "label", "placeholder", "defaultValue", "disabled", "options", "helptext", "schema"])) : createCommentVNode("", true);
10061
+ _: 1
10062
+ }, 16, ["modelValue", "fieldID", "required", "class", "label", "placeholder", "defaultValue", "disabled", "options", "helptext", "schema"])) : createCommentVNode("", true);
10059
10063
  };
10060
10064
  }
10061
10065
  });
@@ -10063,12 +10067,13 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
10063
10067
  __name: "BglForm",
10064
10068
  props: {
10065
10069
  label: {},
10066
- id: {},
10070
+ fieldID: {},
10067
10071
  schema: {},
10068
10072
  modelValue: { default: () => ({}) },
10069
10073
  onDelete: {},
10070
10074
  onSubmit: {},
10071
- status: {}
10075
+ status: {},
10076
+ tag: { default: "form" }
10072
10077
  },
10073
10078
  emits: ["update:modelValue", "submit", "dirty"],
10074
10079
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -10079,7 +10084,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
10079
10084
  const instAt = /* @__PURE__ */ new Date();
10080
10085
  const timeSinceInst = () => Date.now() - instAt.getTime();
10081
10086
  const existingFormState = inject(FORM_STATE_KEY);
10082
- const isNested = Boolean(existingFormState && props2.id);
10087
+ const isNested = Boolean(existingFormState && props2.fieldID);
10083
10088
  const { data: data2, isDirty } = isNested ? existingFormState : provideBagelFormState(props2.modelValue);
10084
10089
  if (!isNested) {
10085
10090
  watch(() => props2.modelValue, (newVal) => {
@@ -10157,13 +10162,13 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
10157
10162
  });
10158
10163
  return (_ctx, _cache) => {
10159
10164
  return openBlock(), createElementBlock(Fragment, null, [
10160
- _ctx.id ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
10165
+ _ctx.tag === "template" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
10161
10166
  (openBlock(true), createElementBlock(Fragment, null, renderList(computedSchema.value, (field, i2) => {
10162
10167
  return openBlock(), createBlock(unref(_sfc_main$S), {
10163
- id: [_ctx.id, field.id].filter(Boolean).join("."),
10164
10168
  key: field.id || `${i2}p`,
10169
+ fieldID: field.id,
10165
10170
  field
10166
- }, null, 8, ["id", "field"]);
10171
+ }, null, 8, ["fieldID", "field"]);
10167
10172
  }), 128)),
10168
10173
  renderSlot(_ctx.$slots, "submit", {
10169
10174
  submit: runSubmit,
@@ -10183,10 +10188,10 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
10183
10188
  }, null, 8, ["label"])) : createCommentVNode("", true),
10184
10189
  (openBlock(true), createElementBlock(Fragment, null, renderList(computedSchema.value, (field, i2) => {
10185
10190
  return openBlock(), createBlock(unref(_sfc_main$S), {
10186
- id: field.id,
10187
10191
  key: field.id || `${i2}p`,
10192
+ fieldID: field.id,
10188
10193
  field
10189
- }, null, 8, ["id", "field"]);
10194
+ }, null, 8, ["fieldID", "field"]);
10190
10195
  }), 128)),
10191
10196
  renderSlot(_ctx.$slots, "submit", {
10192
10197
  submit: runSubmit,
@@ -34391,7 +34396,7 @@ function findBglFieldById(id, _schema) {
34391
34396
  for (const field of _schema) {
34392
34397
  if (field.id === id) return field;
34393
34398
  if (field.children && Number(field.children.length) > 0) {
34394
- const child = findBglFieldById(id, field.children);
34399
+ const child = findBglFieldById(id, field.children.filter((c2) => typeof c2 !== "string"));
34395
34400
  if (child) return child;
34396
34401
  }
34397
34402
  }
@@ -24,7 +24,7 @@ export interface BaseBagelField<T = {
24
24
  'id'?: string;
25
25
  'label'?: string;
26
26
  'placeholder'?: string;
27
- 'children'?: Field<T>[];
27
+ 'children'?: (Field<T> | string)[];
28
28
  'class'?: AttributeValue | AttributeFn<T>;
29
29
  'attrs'?: Attributes<T>;
30
30
  'required'?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"BagelForm.d.ts","sourceRoot":"","sources":["../../src/types/BagelForm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE3D,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAAA;AAEvG,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,IAAI,CAAC,KAAK,EAAE,GAA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AA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;IAC7D,GAAG,EAAE,QAAQ,GAAG,OAAO,WAAW,CAAA;IAClC,EAAE,EAAE,MAAM,CAAA;CACV;AAED,MAAM,MAAM,KAAK,CAAC,CAAC,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,IAAI,cAAc,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAA;AAC5G,MAAM,MAAM,SAAS,CAAC,CAAC,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,IAAI,KAAK,CAAC,CAAC,CAAC,CAAA;AAE5D,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;AAEnE,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,IAAI,CAAC,MAAM,cAAc,CAAC,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAA"}
@@ -70,7 +70,7 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
70
70
  $el: import('vue').Raw<{
71
71
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
72
72
  label?: string;
73
- id?: string;
73
+ fieldID?: string;
74
74
  schema: import('..').BglFormSchemaFnT<any>;
75
75
  modelValue?: {
76
76
  [key: string]: any;
@@ -78,6 +78,7 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
78
78
  onDelete?: (id: string) => void;
79
79
  onSubmit?: (data: any) => void;
80
80
  status?: import('../components/form/BglForm.vue').FormStatus;
81
+ tag?: "template" | "form";
81
82
  }> & Readonly<{
82
83
  onSubmit?: ((...args: any[]) => any) | undefined;
83
84
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
@@ -93,6 +94,7 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
93
94
  "update:modelValue": (...args: any[]) => void;
94
95
  dirty: (...args: any[]) => void;
95
96
  }, import('vue').PublicProps, {
97
+ tag: "template" | "form";
96
98
  modelValue: {
97
99
  [key: string]: any;
98
100
  };
@@ -105,7 +107,7 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
105
107
  Defaults: {};
106
108
  }, Readonly<{
107
109
  label?: string;
108
- id?: string;
110
+ fieldID?: string;
109
111
  schema: import('..').BglFormSchemaFnT<any>;
110
112
  modelValue?: {
111
113
  [key: string]: any;
@@ -113,6 +115,7 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
113
115
  onDelete?: (id: string) => void;
114
116
  onSubmit?: (data: any) => void;
115
117
  status?: import('../components/form/BglForm.vue').FormStatus;
118
+ tag?: "template" | "form";
116
119
  }> & Readonly<{
117
120
  onSubmit?: ((...args: any[]) => any) | undefined;
118
121
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
@@ -124,6 +127,7 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
124
127
  isDirty: import('vue').Ref<boolean, boolean>;
125
128
  clearForm: () => void;
126
129
  }, {}, {}, {}, {
130
+ tag: "template" | "form";
127
131
  modelValue: {
128
132
  [key: string]: any;
129
133
  };
@@ -133,7 +137,7 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
133
137
  __isSuspense?: never;
134
138
  } & import('vue').ComponentOptionsBase<Readonly<{
135
139
  label?: string;
136
- id?: string;
140
+ fieldID?: string;
137
141
  schema: import('..').BglFormSchemaFnT<any>;
138
142
  modelValue?: {
139
143
  [key: string]: any;
@@ -141,6 +145,7 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
141
145
  onDelete?: (id: string) => void;
142
146
  onSubmit?: (data: any) => void;
143
147
  status?: import('../components/form/BglForm.vue').FormStatus;
148
+ tag?: "template" | "form";
144
149
  }> & Readonly<{
145
150
  onSubmit?: ((...args: any[]) => any) | undefined;
146
151
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
@@ -156,6 +161,7 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
156
161
  "update:modelValue": (...args: any[]) => void;
157
162
  dirty: (...args: any[]) => void;
158
163
  }, string, {
164
+ tag: "template" | "form";
159
165
  modelValue: {
160
166
  [key: string]: any;
161
167
  };
@@ -185,7 +191,7 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
185
191
  $el: import('vue').Raw<{
186
192
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
187
193
  label?: string;
188
- id?: string;
194
+ fieldID?: string;
189
195
  schema: import('..').BglFormSchemaFnT<any>;
190
196
  modelValue?: {
191
197
  [key: string]: any;
@@ -193,6 +199,7 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
193
199
  onDelete?: (id: string) => void;
194
200
  onSubmit?: (data: any) => void;
195
201
  status?: import('../components/form/BglForm.vue').FormStatus;
202
+ tag?: "template" | "form";
196
203
  }> & Readonly<{
197
204
  onSubmit?: ((...args: any[]) => any) | undefined;
198
205
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
@@ -208,6 +215,7 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
208
215
  "update:modelValue": (...args: any[]) => void;
209
216
  dirty: (...args: any[]) => void;
210
217
  }, import('vue').PublicProps, {
218
+ tag: "template" | "form";
211
219
  modelValue: {
212
220
  [key: string]: any;
213
221
  };
@@ -220,7 +228,7 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
220
228
  Defaults: {};
221
229
  }, Readonly<{
222
230
  label?: string;
223
- id?: string;
231
+ fieldID?: string;
224
232
  schema: import('..').BglFormSchemaFnT<any>;
225
233
  modelValue?: {
226
234
  [key: string]: any;
@@ -228,6 +236,7 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
228
236
  onDelete?: (id: string) => void;
229
237
  onSubmit?: (data: any) => void;
230
238
  status?: import('../components/form/BglForm.vue').FormStatus;
239
+ tag?: "template" | "form";
231
240
  }> & Readonly<{
232
241
  onSubmit?: ((...args: any[]) => any) | undefined;
233
242
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
@@ -239,6 +248,7 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
239
248
  isDirty: import('vue').Ref<boolean, boolean>;
240
249
  clearForm: () => void;
241
250
  }, {}, {}, {}, {
251
+ tag: "template" | "form";
242
252
  modelValue: {
243
253
  [key: string]: any;
244
254
  };
@@ -248,7 +258,7 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
248
258
  __isSuspense?: never;
249
259
  } & import('vue').ComponentOptionsBase<Readonly<{
250
260
  label?: string;
251
- id?: string;
261
+ fieldID?: string;
252
262
  schema: import('..').BglFormSchemaFnT<any>;
253
263
  modelValue?: {
254
264
  [key: string]: any;
@@ -256,6 +266,7 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
256
266
  onDelete?: (id: string) => void;
257
267
  onSubmit?: (data: any) => void;
258
268
  status?: import('../components/form/BglForm.vue').FormStatus;
269
+ tag?: "template" | "form";
259
270
  }> & Readonly<{
260
271
  onSubmit?: ((...args: any[]) => any) | undefined;
261
272
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
@@ -271,6 +282,7 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
271
282
  "update:modelValue": (...args: any[]) => void;
272
283
  dirty: (...args: any[]) => void;
273
284
  }, string, {
285
+ tag: "template" | "form";
274
286
  modelValue: {
275
287
  [key: string]: any;
276
288
  };
@@ -1 +1 @@
1
- {"version":3,"file":"BagelFormUtils.d.ts","sourceRoot":"","sources":["../../src/utils/BagelForm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,GAAG,KAAK,OAAO;;gBA6NxC,OAAO;aACV,OAAO;mBApOF,OAAO;sBACJ,MAAM;gBACZ,MAAM;uBACC,MAAM;mBACV,OAAO;mBACP,MAAM;cACX,OAAO,GAAG,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;;;EAyOlD"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "0.0.1045",
4
+ "version": "0.0.1048",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -22,7 +22,7 @@ import { FORM_STATE_KEY } from './useBagelFormState'
22
22
 
23
23
  const props = defineProps<{
24
24
  field: Field<T>
25
- id?: string
25
+ fieldID?: string
26
26
  modelValue?: any
27
27
  parentPath?: string
28
28
  }>()
@@ -51,27 +51,27 @@ const is = $computed(() => {
51
51
  if (props.field.$el === 'file') return FileUpload
52
52
  if (props.field.$el === 'date') return DateInput
53
53
  if (props.field.$el === 'tabs') return TabsNav
54
- if (props.field.$el === 'form') return BglForm
54
+ if (props.field.$el === 'bglform') return BglForm
55
55
  return props.field.$el ?? 'div'
56
56
  })
57
57
 
58
58
  const fieldData = $computed({
59
59
  get: () => {
60
- if (!props.id) return props.field.defaultValue ?? (props.field.$el === 'form' ? {} : '')
61
- const value = formState?.getFieldData(props.id)
60
+ if (!props.fieldID) return props.field.defaultValue ?? (props.field.$el === 'form' ? {} : '')
61
+ const value = formState?.getFieldData(props.fieldID)
62
62
  if (props.field.$el === 'form' && !value) return {}
63
63
  return value ?? ''
64
64
  },
65
65
  set: (val: any) => {
66
- if (!props.id) return
67
- const currentValue = formState?.getFieldData(props.id)
66
+ if (!props.fieldID) return
67
+ const currentValue = formState?.getFieldData(props.fieldID)
68
68
  if (JSON.stringify(val) === JSON.stringify(currentValue)) return
69
69
 
70
70
  emit('update:modelValue', val)
71
71
  if (props.field.onUpdate) {
72
72
  props.field.onUpdate(val, currentValue)
73
73
  }
74
- formState?.updateField(props.id, val)
74
+ formState?.updateField(props.fieldID, val)
75
75
  }
76
76
  })
77
77
 
@@ -94,6 +94,7 @@ const computedOptions = $computed(
94
94
 
95
95
  const computedAttrs = $computed(() => {
96
96
  const attrs = { ...customAttrs, ...props.field.attrs }
97
+ delete attrs.schema
97
98
  return bindAttrs(attrs, fieldData, formState?.data.value)
98
99
  })
99
100
 
@@ -107,8 +108,8 @@ const computedClass = $computed(
107
108
  v-bind="computedAttrs"
108
109
  :is="is"
109
110
  v-if="vIf"
110
- :id="props.id"
111
111
  v-model="fieldData"
112
+ :fieldID="props.fieldID"
112
113
  :required="field.required"
113
114
  :class="computedClass"
114
115
  :label="field.label"
@@ -119,17 +120,14 @@ const computedClass = $computed(
119
120
  :helptext="field.helptext"
120
121
  :schema="field.attrs?.schema ?? undefined"
121
122
  >
122
- <template v-if="field.$el === 'form'">
123
- <slot />
124
- </template>
125
- <template v-else>
123
+ <template v-for="(child, ii) in field.children" :key="ii">
126
124
  <BglField
127
- v-for="(child, ii) in field.children"
128
- :id="[props.id, child.id].filter(Boolean).join('.')"
129
- :key="child.id || ii"
125
+ v-if="(typeof child !== 'string')"
126
+ :fieldID="[props.fieldID, child.id].filter(Boolean).join('.')"
130
127
  :field="child"
131
- :parent-path="props.id"
128
+ :parent-path="props.fieldID"
132
129
  />
130
+ <span v-else>{{ child }}</span>
133
131
  </template>
134
132
  </component>
135
133
  </template>
@@ -8,28 +8,30 @@ export type FormStatus = 'idle' | 'loading' | 'success' | 'error'
8
8
  const props = withDefaults(
9
9
  defineProps<{
10
10
  label?: string
11
- id?: string
11
+ fieldID?: string
12
12
  schema: BglFormSchemaFnT<any>
13
13
  modelValue?: { [key: string]: any }
14
14
  onDelete?: (id: string) => void
15
15
  onSubmit?: (data: any) => void
16
16
  status?: FormStatus
17
+ tag?: 'template' | 'form'
17
18
  }>(),
18
19
  {
19
20
  modelValue: () => ({}),
21
+ tag: 'form',
20
22
  },
21
23
  )
22
24
 
23
25
  const emit = defineEmits(['update:modelValue', 'submit', 'dirty'])
24
26
 
25
- const slots = useSlots()
27
+ const slots = useSlots() as any
26
28
  const { showModal } = useModal()
27
29
  const instAt = new Date()
28
30
  const timeSinceInst = () => Date.now() - instAt.getTime()
29
31
 
30
32
  // Check if we're a nested form
31
33
  const existingFormState = inject<BagelFormState | undefined>(FORM_STATE_KEY)
32
- const isNested = Boolean(existingFormState && props.id)
34
+ const isNested = Boolean(existingFormState && props.fieldID)
33
35
 
34
36
  // Only provide new form state if we're not nested
35
37
  const { data, isDirty } = isNested
@@ -119,11 +121,11 @@ defineExpose({
119
121
  </script>
120
122
 
121
123
  <template>
122
- <template v-if="id">
124
+ <template v-if="tag === 'template'">
123
125
  <BglField
124
126
  v-for="(field, i) in computedSchema"
125
- :id="[id, field.id].filter(Boolean).join('.')"
126
127
  :key="field.id || `${i}p`"
128
+ :fieldID="field.id"
127
129
  :field="field"
128
130
  />
129
131
  <slot name="submit" :submit="runSubmit" :isDirty="isDirty" :validateForm="validateForm" />
@@ -136,8 +138,8 @@ defineExpose({
136
138
  <Title v-if="label" tag="h4" :label="label" />
137
139
  <BglField
138
140
  v-for="(field, i) in computedSchema"
139
- :id="field.id"
140
141
  :key="field.id || `${i}p`"
142
+ :fieldID="field.id"
141
143
  :field="field"
142
144
  />
143
145
  <slot name="submit" :submit="runSubmit" :isDirty="isDirty" :validateForm="validateForm" />
@@ -29,7 +29,7 @@ export interface BaseBagelField<T = { [key: string]: any }> {
29
29
  'id'?: string
30
30
  'label'?: string
31
31
  'placeholder'?: string
32
- 'children'?: Field<T>[]
32
+ 'children'?: (Field<T> | string)[]
33
33
  'class'?: AttributeValue | AttributeFn<T>
34
34
  'attrs'?: Attributes<T>
35
35
  'required'?: boolean
@@ -221,7 +221,7 @@ export function findBglFieldById(id: string, _schema: BglFormSchemaT): Field | u
221
221
  for (const field of _schema) {
222
222
  if (field.id === id) return field
223
223
  if (field.children && Number(field.children.length) > 0) {
224
- const child = findBglFieldById(id, field.children)
224
+ const child = findBglFieldById(id, field.children.filter(c => typeof c !== 'string'))
225
225
  if (child) return child
226
226
  }
227
227
  }