@bagelink/vue 0.0.1157 → 0.0.1163

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":"Carousel.vue.d.ts","sourceRoot":"","sources":["../../src/components/Carousel.vue"],"names":[],"mappings":"AAgzBA,iBAAS,IAAI,SAIZ;AAED,iBAAS,IAAI,SAIZ;AAmZD,iBAAS,cAAc;WAyFT,OAAO,IAA6B;;yBAbrB,GAAG;;;;YACN,GAAG;;;;YACH,GAAG;;;;;;EAgB5B;AAmCD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmBnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"Carousel.vue.d.ts","sourceRoot":"","sources":["../../src/components/Carousel.vue"],"names":[],"mappings":"AA8yBA,iBAAS,IAAI,SAIZ;AAED,iBAAS,IAAI,SAIZ;AAmZD,iBAAS,cAAc;WAyFT,OAAO,IAA6B;;yBAbrB,GAAG;;;;YACN,GAAG;;;;YACH,GAAG;;;;;;EAgB5B;AAmCD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmBnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ListView.vue.d.ts","sourceRoot":"","sources":["../../src/components/ListView.vue"],"names":[],"mappings":"AA8BA,iBAAS,cAAc;WAqCT,OAAO,IAA6B;;wBAXtB,GAAG;yBACF,GAAG;;;;EAe/B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0RAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ListView.vue.d.ts","sourceRoot":"","sources":["../../src/components/ListView.vue"],"names":[],"mappings":"AAwBA,iBAAS,cAAc;WAmCT,OAAO,IAA6B;;wBAXtB,GAAG;yBACF,GAAG;;;;EAe/B;AAOD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0RAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { BglFormSchemaFnT } from '../..';
2
2
  interface Props {
3
- modelValue: Record<string, any>;
3
+ modelValue?: Record<string, any>;
4
4
  schema?: BglFormSchemaFnT;
5
5
  }
6
6
  declare function handleSubmit(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"BagelForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/form/BagelForm.vue"],"names":[],"mappings":"AAAA,OAkGO,KAAK,EAAkB,gBAAgB,EAAS,MAAM,eAAe,CAAA;AAK5E,UAAU,KAAK;IACd,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC/B,MAAM,CAAC,EAAE,gBAAgB,CAAA;CACzB;AA0CD,iBAAS,YAAY,SAGpB;AAUD,iBAAS,YAAY,YAGpB;AA0BD,iBAAS,cAAc;WA6CT,OAAO,IAA6B;;yBAZrB,GAAG;;;;;YACJ,GAAG;;;;;;EAgB9B;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;YAxJX,gBAAgB;gBADb,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;mBAoK9B,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"BagelForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/form/BagelForm.vue"],"names":[],"mappings":"AAoGA,OAAO,KAAK,EAAkB,gBAAgB,EAAS,MAAM,eAAe,CAAA;AAK5E,UAAU,KAAK;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAChC,MAAM,CAAC,EAAE,gBAAgB,CAAA;CACzB;AA4CD,iBAAS,YAAY,SAGpB;AAUD,iBAAS,YAAY,YAGpB;AA0BD,iBAAS,cAAc;WA6CT,OAAO,IAA6B;;yBAZrB,GAAG;;;;;YACJ,GAAG;;;;;;EAgB9B;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;YA1JX,gBAAgB;gBADZ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;mBAsK/B,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useSchemaField.d.ts","sourceRoot":"","sources":["../../src/composables/useSchemaField.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,CAAA;AAChC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAwBxD,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACvC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC,CAAA;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;CACzD;AAED,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE,qBAAqB,CAAC,CAAC,CAAC;yBA4BtF,cAAc,CAAC,CAAC,CAAC,UAChB,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;QAAE,GAAG,EAAE,CAAC,CAAC;QAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,CAAA;KAAE,KAAK,GAAG,CAAC,KAC1E,KAAK,GAAG,IAAI;0BA3Bc,cAAc,CAAC,CAAC,CAAC;EA8J9C"}
1
+ {"version":3,"file":"useSchemaField.d.ts","sourceRoot":"","sources":["../../src/composables/useSchemaField.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,CAAA;AAChC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAwBxD,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACvC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC,CAAA;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;CACzD;AAED,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE,qBAAqB,CAAC,CAAC,CAAC;yBA4BtF,cAAc,CAAC,CAAC,CAAC,UAChB,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;QAAE,GAAG,EAAE,CAAC,CAAC;QAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,CAAA;KAAE,KAAK,GAAG,CAAC,KAC1E,KAAK,GAAG,IAAI;0BA3Bc,cAAc,CAAC,CAAC,CAAC;EAkK9C"}
package/dist/index.cjs CHANGED
@@ -203,7 +203,7 @@ const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
203
203
  }, null, 8, ["modelValue"])
204
204
  ]),
205
205
  default: vue.withCtx(() => [
206
- vue.createVNode(vue.unref(_sfc_main$e), { class: "-mt-2 hm-300px" }, {
206
+ vue.createVNode(vue.unref(ListView), { class: "-mt-2 hm-300px" }, {
207
207
  default: vue.withCtx(() => [
208
208
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(searchResults), (result2, index2) => {
209
209
  return vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$f), {
@@ -1176,7 +1176,7 @@ const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
1176
1176
  };
1177
1177
  }
1178
1178
  });
1179
- const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-1ae4b9ae"]]);
1179
+ const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-b4d71e9e"]]);
1180
1180
  function _isPlaceholder(a2) {
1181
1181
  return a2 != null && typeof a2 === "object" && a2["@@functional/placeholder"] === true;
1182
1182
  }
@@ -7356,7 +7356,11 @@ function useSchemaField(options) {
7356
7356
  const boundAttrs = bindAttrs(field.attrs, currentValue, rowData);
7357
7357
  Object.entries(boundAttrs).forEach(([key, value]) => {
7358
7358
  if (typeof value === "function") {
7359
- props2[key] = value(currentValue, rowData);
7359
+ if (key.startsWith("on")) {
7360
+ props2[key] = value;
7361
+ } else {
7362
+ props2[key] = value(currentValue, rowData);
7363
+ }
7360
7364
  } else {
7361
7365
  props2[key] = value;
7362
7366
  }
@@ -11568,7 +11572,7 @@ const Flag = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-f99
11568
11572
  const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
11569
11573
  __name: "BagelForm",
11570
11574
  props: {
11571
- modelValue: { default: () => ({}) },
11575
+ modelValue: { default: void 0 },
11572
11576
  schema: { default: void 0 }
11573
11577
  },
11574
11578
  emits: ["update:modelValue", "submit"],
@@ -11576,10 +11580,12 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
11576
11580
  const props2 = __props;
11577
11581
  const emit2 = __emit;
11578
11582
  const form = vue.ref();
11579
- let formData = vue.ref({ ...props2.modelValue });
11580
- let initialFormData = vue.ref({ ...props2.modelValue });
11583
+ let formData = vue.ref(props2.modelValue ? { ...props2.modelValue } : {});
11584
+ let initialFormData = vue.ref(props2.modelValue ? { ...props2.modelValue } : {});
11581
11585
  vue.watch(() => props2.modelValue, (newValue) => {
11582
- formData.value = { ...newValue };
11586
+ if (newValue !== void 0) {
11587
+ formData.value = { ...newValue };
11588
+ }
11583
11589
  }, { immediate: true, deep: true });
11584
11590
  const resolvedSchema = vue.computed(() => {
11585
11591
  if (!props2.schema) return void 0;
@@ -37827,28 +37833,21 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
37827
37833
  };
37828
37834
  }
37829
37835
  });
37830
- const _hoisted_1$b = { class: "list-wrap bgl_card thin grid overflow-hidden h-100 pt-0 pb-05 px-0 m_pb-0" };
37831
- const _hoisted_2$6 = {
37832
- key: 0,
37833
- class: "p-1"
37834
- };
37836
+ const _sfc_main$e = {};
37837
+ const _hoisted_1$b = { class: "list-wrap bgl_card thin grid overflow-hidden pt-0 pb-05 px-0 m_pb-0" };
37838
+ const _hoisted_2$6 = { class: "p-0" };
37835
37839
  const _hoisted_3$4 = { class: "list-content auto-flow-rows align-items-start overflow-y h-100" };
37836
- const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
37837
- __name: "ListView",
37838
- setup(__props) {
37839
- const slots = vue.useSlots();
37840
- return (_ctx, _cache) => {
37841
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [
37842
- vue.unref(slots).header ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$6, [
37843
- vue.renderSlot(_ctx.$slots, "header")
37844
- ])) : vue.createCommentVNode("", true),
37845
- vue.createElementVNode("div", _hoisted_3$4, [
37846
- vue.renderSlot(_ctx.$slots, "default")
37847
- ])
37848
- ]);
37849
- };
37850
- }
37851
- });
37840
+ function _sfc_render$3(_ctx, _cache) {
37841
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [
37842
+ vue.createElementVNode("div", _hoisted_2$6, [
37843
+ vue.renderSlot(_ctx.$slots, "header")
37844
+ ]),
37845
+ vue.createElementVNode("div", _hoisted_3$4, [
37846
+ vue.renderSlot(_ctx.$slots, "default")
37847
+ ])
37848
+ ]);
37849
+ }
37850
+ const ListView = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$3]]);
37852
37851
  const _hoisted_1$a = { class: "flex-center" };
37853
37852
  const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
37854
37853
  __name: "Loading",
@@ -40810,7 +40809,7 @@ exports.JSONInput = JSONInput;
40810
40809
  exports.Layout = Layout;
40811
40810
  exports.Lineart = _sfc_main$Y;
40812
40811
  exports.ListItem = _sfc_main$f;
40813
- exports.ListView = _sfc_main$e;
40812
+ exports.ListView = ListView;
40814
40813
  exports.Loading = Loading;
40815
40814
  exports.MapEmbed = _sfc_main$c;
40816
40815
  exports.Modal = _sfc_main$b;
package/dist/index.mjs CHANGED
@@ -201,7 +201,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
201
201
  }, null, 8, ["modelValue"])
202
202
  ]),
203
203
  default: withCtx(() => [
204
- createVNode(unref(_sfc_main$e), { class: "-mt-2 hm-300px" }, {
204
+ createVNode(unref(ListView), { class: "-mt-2 hm-300px" }, {
205
205
  default: withCtx(() => [
206
206
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(searchResults), (result2, index2) => {
207
207
  return openBlock(), createBlock(unref(_sfc_main$f), {
@@ -1174,7 +1174,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
1174
1174
  };
1175
1175
  }
1176
1176
  });
1177
- const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-1ae4b9ae"]]);
1177
+ const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-b4d71e9e"]]);
1178
1178
  function _isPlaceholder(a2) {
1179
1179
  return a2 != null && typeof a2 === "object" && a2["@@functional/placeholder"] === true;
1180
1180
  }
@@ -7354,7 +7354,11 @@ function useSchemaField(options) {
7354
7354
  const boundAttrs = bindAttrs(field.attrs, currentValue, rowData);
7355
7355
  Object.entries(boundAttrs).forEach(([key, value]) => {
7356
7356
  if (typeof value === "function") {
7357
- props2[key] = value(currentValue, rowData);
7357
+ if (key.startsWith("on")) {
7358
+ props2[key] = value;
7359
+ } else {
7360
+ props2[key] = value(currentValue, rowData);
7361
+ }
7358
7362
  } else {
7359
7363
  props2[key] = value;
7360
7364
  }
@@ -11566,7 +11570,7 @@ const Flag = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-f99
11566
11570
  const _sfc_main$R = /* @__PURE__ */ defineComponent({
11567
11571
  __name: "BagelForm",
11568
11572
  props: {
11569
- modelValue: { default: () => ({}) },
11573
+ modelValue: { default: void 0 },
11570
11574
  schema: { default: void 0 }
11571
11575
  },
11572
11576
  emits: ["update:modelValue", "submit"],
@@ -11574,10 +11578,12 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
11574
11578
  const props2 = __props;
11575
11579
  const emit2 = __emit;
11576
11580
  const form = ref();
11577
- let formData = ref({ ...props2.modelValue });
11578
- let initialFormData = ref({ ...props2.modelValue });
11581
+ let formData = ref(props2.modelValue ? { ...props2.modelValue } : {});
11582
+ let initialFormData = ref(props2.modelValue ? { ...props2.modelValue } : {});
11579
11583
  watch(() => props2.modelValue, (newValue) => {
11580
- formData.value = { ...newValue };
11584
+ if (newValue !== void 0) {
11585
+ formData.value = { ...newValue };
11586
+ }
11581
11587
  }, { immediate: true, deep: true });
11582
11588
  const resolvedSchema = computed(() => {
11583
11589
  if (!props2.schema) return void 0;
@@ -37825,28 +37831,21 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
37825
37831
  };
37826
37832
  }
37827
37833
  });
37828
- const _hoisted_1$b = { class: "list-wrap bgl_card thin grid overflow-hidden h-100 pt-0 pb-05 px-0 m_pb-0" };
37829
- const _hoisted_2$6 = {
37830
- key: 0,
37831
- class: "p-1"
37832
- };
37834
+ const _sfc_main$e = {};
37835
+ const _hoisted_1$b = { class: "list-wrap bgl_card thin grid overflow-hidden pt-0 pb-05 px-0 m_pb-0" };
37836
+ const _hoisted_2$6 = { class: "p-0" };
37833
37837
  const _hoisted_3$4 = { class: "list-content auto-flow-rows align-items-start overflow-y h-100" };
37834
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
37835
- __name: "ListView",
37836
- setup(__props) {
37837
- const slots = useSlots();
37838
- return (_ctx, _cache) => {
37839
- return openBlock(), createElementBlock("div", _hoisted_1$b, [
37840
- unref(slots).header ? (openBlock(), createElementBlock("div", _hoisted_2$6, [
37841
- renderSlot(_ctx.$slots, "header")
37842
- ])) : createCommentVNode("", true),
37843
- createElementVNode("div", _hoisted_3$4, [
37844
- renderSlot(_ctx.$slots, "default")
37845
- ])
37846
- ]);
37847
- };
37848
- }
37849
- });
37838
+ function _sfc_render$3(_ctx, _cache) {
37839
+ return openBlock(), createElementBlock("div", _hoisted_1$b, [
37840
+ createElementVNode("div", _hoisted_2$6, [
37841
+ renderSlot(_ctx.$slots, "header")
37842
+ ]),
37843
+ createElementVNode("div", _hoisted_3$4, [
37844
+ renderSlot(_ctx.$slots, "default")
37845
+ ])
37846
+ ]);
37847
+ }
37848
+ const ListView = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$3]]);
37850
37849
  const _hoisted_1$a = { class: "flex-center" };
37851
37850
  const _sfc_main$d = /* @__PURE__ */ defineComponent({
37852
37851
  __name: "Loading",
@@ -40809,7 +40808,7 @@ export {
40809
40808
  Layout,
40810
40809
  _sfc_main$Y as Lineart,
40811
40810
  _sfc_main$f as ListItem,
40812
- _sfc_main$e as ListView,
40811
+ ListView,
40813
40812
  Loading,
40814
40813
  _sfc_main$c as MapEmbed,
40815
40814
  _sfc_main$b as Modal,
package/dist/style.css CHANGED
@@ -356,13 +356,13 @@ display: block;
356
356
  padding: 0;
357
357
  }
358
358
 
359
- .BglCarousel[data-v-1ae4b9ae] {
359
+ .BglCarousel[data-v-b4d71e9e] {
360
360
  position: relative;
361
361
  width: 100%;
362
362
  overflow: hidden;
363
363
  touch-action: pan-y pinch-zoom; /* Allow vertical scrolling */
364
364
  }
365
- .bgl-slider[data-v-1ae4b9ae] {
365
+ .bgl-slider[data-v-b4d71e9e] {
366
366
  display: flex;
367
367
  position: relative;
368
368
  width: 100%;
@@ -375,26 +375,26 @@ display: block;
375
375
  -webkit-user-select: none;
376
376
  user-select: none;
377
377
  }
378
- .bgl-slider[data-v-1ae4b9ae] > * {
378
+ .bgl-slider[data-v-b4d71e9e] > * {
379
379
  flex: 0 0 calc((100% - (var(--item-count) - 1) * 1%) / var(--item-count));
380
380
  width: calc((100% - (var(--item-count) - 1) * 1%) / var(--item-count));
381
381
  min-width: calc((100% - (var(--item-count) - 1) * 1%) / var(--item-count));
382
382
  position: relative;
383
383
  overflow: hidden;
384
384
  }
385
- .bgl-slider.slides-1[data-v-1ae4b9ae] > * {
385
+ .bgl-slider.slides-1[data-v-b4d71e9e] > * {
386
386
  flex: 0 0 100%;
387
387
  width: 100%;
388
388
  min-width: 100%;
389
389
  }
390
- .dragging .bgl-slider[data-v-1ae4b9ae] > * {
390
+ .dragging .bgl-slider[data-v-b4d71e9e] > * {
391
391
  pointer-events: none;
392
392
  user-select: none;
393
393
  }
394
- .autoHeight[data-v-1ae4b9ae] {
394
+ .autoHeight[data-v-b4d71e9e] {
395
395
  transition: height ease 0.7s;
396
396
  }
397
- .dots[data-v-1ae4b9ae] {
397
+ .dots[data-v-b4d71e9e] {
398
398
  display: flex;
399
399
  justify-content: center;
400
400
  align-items: center;
@@ -402,7 +402,7 @@ display: block;
402
402
  margin-top: 1rem;
403
403
  gap: 8px;
404
404
  }
405
- .dot[data-v-1ae4b9ae] {
405
+ .dot[data-v-b4d71e9e] {
406
406
  height: 10px;
407
407
  width: 10px;
408
408
  border-radius: 50%;
@@ -411,10 +411,10 @@ display: block;
411
411
  transition: opacity 0.3s ease;
412
412
  cursor: pointer;
413
413
  }
414
- .dot[data-v-1ae4b9ae]:hover {
414
+ .dot[data-v-b4d71e9e]:hover {
415
415
  opacity: 0.6;
416
416
  }
417
- .dot.current[data-v-1ae4b9ae] {
417
+ .dot.current[data-v-b4d71e9e] {
418
418
  opacity: 0.8;
419
419
  }
420
420
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "0.0.1157",
4
+ "version": "0.0.1163",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -56,7 +56,6 @@ let lastTime = $ref(0)
56
56
  let swipeVelocity = $ref(0)
57
57
  let accumulatedDeltaX = $ref(0)
58
58
 
59
- // Timers
60
59
  let timeout: NodeJS.Timeout
61
60
  let wheelTimeout: NodeJS.Timeout
62
61
  let autoPlayInterval: NodeJS.Timeout
@@ -139,14 +139,14 @@ export function useDraggable(options: DraggableOptions = {}) {
139
139
  return 2
140
140
  }
141
141
 
142
- function resetDragStyles(dragEl: DraggableElement) {
143
- if (defaultOptions.mode === 'ghost') {
144
- dragEl.style.opacity = ''
145
- dragEl.style.transform = ''
146
- } else {
147
- dragEl.style.opacity = ''
148
- }
149
- }
142
+ // function resetDragStyles(dragEl: DraggableElement) {
143
+ // if (defaultOptions.mode === 'ghost') {
144
+ // dragEl.style.opacity = ''
145
+ // dragEl.style.transform = ''
146
+ // } else {
147
+ // dragEl.style.opacity = ''
148
+ // }
149
+ // }
150
150
 
151
151
  function cacheElementPositions(draggedList: DraggableElement[]) {
152
152
  POSITION_CACHE.clear()
@@ -1,12 +1,9 @@
1
1
  <script lang="ts" setup>
2
- import { useSlots } from 'vue'
3
-
4
- const slots = useSlots()
5
2
  </script>
6
3
 
7
4
  <template>
8
- <div class="list-wrap bgl_card thin grid overflow-hidden h-100 pt-0 pb-05 px-0 m_pb-0">
9
- <div v-if="slots.header" class="p-1">
5
+ <div class="list-wrap bgl_card thin grid overflow-hidden pt-0 pb-05 px-0 m_pb-0">
6
+ <div class="p-0">
10
7
  <slot name="header" />
11
8
  </div>
12
9
  <div class="list-content auto-flow-rows align-items-start overflow-y h-100">
@@ -1,16 +1,16 @@
1
1
  <script setup lang="ts">
2
2
  import type { BglFormSchemaT, BglFormSchemaFnT, Field } from '@bagelink/vue'
3
3
  import type { VNode } from 'vue'
4
- import { h, watch } from 'vue'
4
+ import { watch } from 'vue'
5
5
  import { useSchemaField } from '../../composables/useSchemaField'
6
6
 
7
7
  interface Props {
8
- modelValue: Record<string, any>
8
+ modelValue?: Record<string, any>
9
9
  schema?: BglFormSchemaFnT
10
10
  }
11
11
 
12
12
  const props = withDefaults(defineProps<Props>(), {
13
- modelValue: () => ({}),
13
+ modelValue: undefined,
14
14
  schema: undefined
15
15
  })
16
16
 
@@ -20,12 +20,14 @@ const emit = defineEmits<{
20
20
  }>()
21
21
 
22
22
  const form = $ref<HTMLFormElement>()
23
- let formData = $ref({ ...props.modelValue })
24
- let initialFormData = $ref({ ...props.modelValue })
23
+ let formData = $ref(props.modelValue ? { ...props.modelValue } : {})
24
+ let initialFormData = $ref(props.modelValue ? { ...props.modelValue } : {})
25
25
 
26
- // Keep formData in sync with modelValue prop
26
+ // Keep formData in sync with modelValue prop only if it's provided
27
27
  watch(() => props.modelValue, (newValue) => {
28
- formData = { ...newValue }
28
+ if (newValue !== undefined) {
29
+ formData = { ...newValue }
30
+ }
29
31
  }, { immediate: true, deep: true })
30
32
 
31
33
  const resolvedSchema = $computed<BglFormSchemaT | undefined>(() => {
@@ -132,7 +132,11 @@ export function useSchemaField<T extends Record<string, any>>(options: UseSchema
132
132
  const boundAttrs = bindAttrs(field.attrs, currentValue, rowData)
133
133
  Object.entries(boundAttrs).forEach(([key, value]) => {
134
134
  if (typeof value === 'function') {
135
- props[key] = value(currentValue, rowData)
135
+ if (key.startsWith('on')) {
136
+ props[key] = value
137
+ } else {
138
+ props[key] = value(currentValue, rowData)
139
+ }
136
140
  } else {
137
141
  props[key] = value
138
142
  }