@bagelink/vue 0.0.1167 → 0.0.1174

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
@@ -772,7 +772,6 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
772
772
  let translateX2 = ref(0);
773
773
  let lastX = ref(0);
774
774
  let lastTime = ref(0);
775
- let swipeVelocity = ref(0);
776
775
  let accumulatedDeltaX = ref(0);
777
776
  let wheelTimeout;
778
777
  let autoPlayInterval;
@@ -960,7 +959,6 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
960
959
  lastTime.value = Date.now();
961
960
  translateX2.value = getCurrentTransform();
962
961
  velocityTracker.value = [{ time: lastTime.value, position: lastX.value }];
963
- swipeVelocity.value = 0;
964
962
  isPressed.value = true;
965
963
  hasScrollDirectionLock.value = false;
966
964
  if (bglSlider.value) {
@@ -992,7 +990,6 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
992
990
  lastX.value = x2;
993
991
  const cutoffTime = now - VELOCITY_SAMPLE_DURATION;
994
992
  velocityTracker.value = velocityTracker.value.filter((sample) => sample.time >= cutoffTime);
995
- swipeVelocity.value = getAverageVelocity();
996
993
  if (Math.abs(deltaX) > THRESHOLDS.TOUCH) {
997
994
  isDragging.value = true;
998
995
  e.preventDefault();
@@ -1071,7 +1068,6 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
1071
1068
  if (bglSlider.value) bglSlider.value.style.transition = "none";
1072
1069
  }, duration);
1073
1070
  velocityTracker.value = [];
1074
- swipeVelocity.value = 0;
1075
1071
  isDragging.value = false;
1076
1072
  hasScrollDirectionLock.value = false;
1077
1073
  }
@@ -1174,7 +1170,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
1174
1170
  };
1175
1171
  }
1176
1172
  });
1177
- const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-b4d71e9e"]]);
1173
+ const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-519e4d32"]]);
1178
1174
  function _isPlaceholder(a2) {
1179
1175
  return a2 != null && typeof a2 === "object" && a2["@@functional/placeholder"] === true;
1180
1176
  }
@@ -8181,7 +8177,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
8181
8177
  emits: /* @__PURE__ */ mergeModels(["update:selectedItems", "orderBy", "select", "lastItemVisible"], ["update:loading", "update:itemHeight", "update:selectedItems"]),
8182
8178
  setup(__props, { emit: __emit }) {
8183
8179
  useCssVars((_ctx) => ({
8184
- "0984904d": unref(computedItemHeight)
8180
+ "0c6a620a": unref(computedItemHeight)
8185
8181
  }));
8186
8182
  const props2 = __props;
8187
8183
  const emit2 = __emit;
@@ -8196,7 +8192,6 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
8196
8192
  }
8197
8193
  );
8198
8194
  const data2 = computed(() => props2.data);
8199
- ref("");
8200
8195
  const {
8201
8196
  computedSchema,
8202
8197
  computedData,
@@ -8247,7 +8242,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
8247
8242
  mode: "table",
8248
8243
  getRowData: () => row
8249
8244
  });
8250
- return renderField(field, slots);
8245
+ return renderField({ ...field, label: "" }, slots);
8251
8246
  }
8252
8247
  const computedItemHeight = computed(() => `${itemHeight.value}px`);
8253
8248
  watch(
@@ -8361,7 +8356,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
8361
8356
  };
8362
8357
  }
8363
8358
  });
8364
- const DataTable = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-18572328"]]);
8359
+ const DataTable = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-a1cf8002"]]);
8365
8360
  function useDraggable(options = {}) {
8366
8361
  const isDragging = ref(false);
8367
8362
  const dragElement = ref(null);
@@ -11578,11 +11573,16 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
11578
11573
  const props2 = __props;
11579
11574
  const emit2 = __emit;
11580
11575
  const form = ref();
11581
- let formData = ref(props2.modelValue ? { ...props2.modelValue } : {});
11582
- let initialFormData = ref(props2.modelValue ? { ...props2.modelValue } : {});
11576
+ const formData = ref(structuredClone(props2.modelValue ?? {}));
11577
+ const initialFormData = ref(structuredClone(props2.modelValue ?? {}));
11578
+ onMounted(() => {
11579
+ if (props2.modelValue) {
11580
+ initialFormData.value = structuredClone(props2.modelValue);
11581
+ }
11582
+ });
11583
11583
  watch(() => props2.modelValue, (newValue) => {
11584
11584
  if (newValue !== void 0) {
11585
- formData.value = { ...newValue };
11585
+ formData.value = structuredClone(newValue);
11586
11586
  }
11587
11587
  }, { immediate: true, deep: true });
11588
11588
  const resolvedSchema = computed(() => {
@@ -11603,7 +11603,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
11603
11603
  }
11604
11604
  function handleSubmit() {
11605
11605
  emit2("submit", formData.value);
11606
- initialFormData.value = { ...formData.value };
11606
+ initialFormData.value = structuredClone(formData.value);
11607
11607
  }
11608
11608
  function shouldRenderField(field) {
11609
11609
  const condition = field.vIf ?? field["v-if"];
@@ -11628,7 +11628,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
11628
11628
  if (!shouldRenderField(field)) return null;
11629
11629
  return renderField(field);
11630
11630
  }
11631
- __expose({ form: form.value, isDirty: isDirty.value, validateForm });
11631
+ __expose({ form, isDirty: isDirty.value, validateForm });
11632
11632
  return (_ctx, _cache) => {
11633
11633
  return openBlock(), createElementBlock("form", {
11634
11634
  ref_key: "form",
@@ -38188,38 +38188,36 @@ const _hoisted_2$4 = { class: "flex gap-05" };
38188
38188
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
38189
38189
  __name: "ModalForm",
38190
38190
  props: /* @__PURE__ */ mergeModels({
38191
- side: { type: Boolean },
38192
- title: {},
38193
- width: {},
38194
- dismissable: { type: Boolean },
38195
- actions: {},
38196
38191
  schema: {},
38192
+ modelValue: {},
38193
+ "onUpdate:modelValue": { type: Function },
38197
38194
  onSubmit: { type: Function },
38195
+ onDelete: { type: Function },
38198
38196
  onDuplicate: { type: Function },
38199
38197
  submitText: {},
38200
38198
  cancelText: {},
38201
38199
  deleteText: {},
38202
38200
  duplicateText: {},
38203
- onDelete: { type: Function },
38204
- visible: { type: Boolean },
38205
38201
  onError: { type: Function },
38206
- modelValue: {}
38202
+ side: { type: Boolean },
38203
+ title: {},
38204
+ width: {},
38205
+ dismissable: { type: Boolean },
38206
+ visible: { type: Boolean },
38207
+ actions: {},
38208
+ class: {}
38207
38209
  }, {
38208
38210
  "modelValue": {
38209
38211
  default: {}
38210
38212
  },
38211
38213
  "modelModifiers": {}
38212
38214
  }),
38213
- emits: /* @__PURE__ */ mergeModels(["update:visible"], ["update:modelValue"]),
38215
+ emits: /* @__PURE__ */ mergeModels(["update:modelValue", "update:visible"], ["update:modelValue"]),
38214
38216
  setup(__props, { expose: __expose, emit: __emit }) {
38215
38217
  const props2 = __props;
38216
38218
  const emit2 = __emit;
38217
38219
  const bagel = useBagel();
38218
38220
  const modal = ref();
38219
- const computedFormSchema = computed(() => {
38220
- if (typeof props2.schema === "function") return props2.schema();
38221
- return props2.schema;
38222
- });
38223
38221
  const formData = useModel(__props, "modelValue");
38224
38222
  const form = ref();
38225
38223
  const closeModal = () => {
@@ -38259,7 +38257,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
38259
38257
  visible: _ctx.visible,
38260
38258
  dismissable: _ctx.dismissable,
38261
38259
  title: _ctx.title,
38262
- "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => emit2("update:visible", $event))
38260
+ "onUpdate:visible": _cache[3] || (_cache[3] = ($event) => emit2("update:visible", $event))
38263
38261
  }, createSlots({
38264
38262
  default: withCtx(() => [
38265
38263
  _ctx.visible ? (openBlock(), createBlock(unref(_sfc_main$R), {
@@ -38267,8 +38265,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
38267
38265
  ref_key: "form",
38268
38266
  ref: form,
38269
38267
  modelValue: formData.value,
38270
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => formData.value = $event),
38271
- schema: computedFormSchema.value,
38268
+ "onUpdate:modelValue": [
38269
+ _cache[0] || (_cache[0] = ($event) => formData.value = $event),
38270
+ _cache[1] || (_cache[1] = ($event) => emit2("update:modelValue", $event))
38271
+ ],
38272
+ schema: _ctx.schema,
38272
38273
  onSubmit: runSubmit
38273
38274
  }, null, 8, ["modelValue", "schema"])) : createCommentVNode("", true)
38274
38275
  ]),
@@ -38302,8 +38303,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
38302
38303
  icon: "copy_all",
38303
38304
  flat: "",
38304
38305
  value: _ctx.duplicateText || "Duplicate",
38305
- onClick: _ctx.onDuplicate
38306
- }, null, 8, ["value", "onClick"])) : createCommentVNode("", true),
38306
+ onClick: _cache[2] || (_cache[2] = ($event) => {
38307
+ var _a2;
38308
+ return (_a2 = _ctx.onDuplicate) == null ? void 0 : _a2.call(_ctx, formData.value);
38309
+ })
38310
+ }, null, 8, ["value"])) : createCommentVNode("", true),
38307
38311
  _ctx.onSubmit ? (openBlock(), createBlock(unref(Btn), {
38308
38312
  key: 1,
38309
38313
  value: _ctx.submitText || "Submit",
@@ -38317,7 +38321,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
38317
38321
  };
38318
38322
  }
38319
38323
  });
38320
- const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-7a736620"]]);
38324
+ const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-1c0f6894"]]);
38321
38325
  const _hoisted_1$5 = { class: "full-nav" };
38322
38326
  const _hoisted_2$3 = { class: "nav-scroll" };
38323
38327
  const _hoisted_3$2 = { class: "nav-links-wrapper" };
@@ -1,72 +1,18 @@
1
- import { BglFormSchemaFnT, BtnOptions, ThemeType } from '..';
2
1
  import { InjectionKey, Plugin } from 'vue';
3
- export interface ModalOptions {
4
- title?: string;
5
- dismissable?: boolean;
6
- side?: boolean;
7
- width?: string;
8
- actions?: BtnOptions[];
9
- class?: string;
10
- visible?: boolean;
11
- }
12
- export interface ModalFormOptions extends ModalOptions {
13
- 'schema': BglFormSchemaFnT<any>;
14
- 'onSubmit'?: (formData: any) => any;
15
- 'submitText'?: string;
16
- 'cancelText'?: string;
17
- 'deleteText'?: string;
18
- 'duplicateText'?: string;
19
- 'onDelete'?: (id: string) => Promise<void>;
20
- 'onDuplicate'?: (formData: any) => Promise<void>;
21
- 'onError'?: (err: any) => void;
22
- 'modelValue'?: {
23
- [key: string]: any;
24
- };
25
- 'onUpdate:modelValue'?: (val: any) => void;
26
- }
27
- export interface ModalConfirmOptions {
28
- 'title': string;
29
- 'message': string;
30
- 'confirmText'?: string;
31
- 'confirmBtnColor'?: ThemeType;
32
- 'cancelText'?: string;
33
- 'cancelBtnColor'?: ThemeType;
34
- 'resolve': (val: boolean) => void;
35
- 'onUpdate:visible': () => void;
36
- 'visible': boolean;
37
- }
38
- type ModalType = 'modal' | 'modalForm' | 'confirmModal';
39
- type ConfirmModalUserOptions = string | {
40
- title: string;
41
- message: string;
42
- confirmText?: string;
43
- cancelText?: string;
44
- confirmBtnColor?: string;
45
- cancelBtnColor?: string;
46
- };
47
- export interface ModalComponentProps {
48
- componentSlots: {
49
- [key: string]: any;
50
- };
51
- modalType: ModalType;
52
- modalOptions: ModalOptions | ModalFormOptions | ModalConfirmOptions;
53
- }
54
- export interface ModalFormComponentProps extends ModalComponentProps {
55
- modalType: 'modalForm';
56
- modalOptions: ModalFormOptions;
57
- }
2
+ import { ConfirmModalUserOptions, ModalComponentProps, ModalFormComponentProps, ModalFormOptions, ModalOptions } from './modalTypes';
58
3
  export interface ModalApi {
59
4
  showModal: (options: ModalOptions, slots?: {
60
5
  [key: string]: any;
61
6
  }) => ModalComponentProps | undefined;
62
- showModalForm: (options: ModalFormOptions, slots?: {
7
+ showModalForm: <T extends {
8
+ [key: string]: any;
9
+ }>(options: ModalFormOptions<T>, slots?: {
63
10
  [key: string]: any;
64
- }) => ModalFormComponentProps | undefined;
11
+ }) => ModalFormComponentProps<T> | undefined;
65
12
  hideModal: (index?: number) => void;
66
13
  confirmModal: (options: ConfirmModalUserOptions) => Promise<boolean>;
67
14
  }
68
15
  export declare const ModalSymbol: InjectionKey<ModalApi>;
69
16
  export declare function useModal(): ModalApi;
70
17
  export declare const ModalPlugin: Plugin;
71
- export {};
72
18
  //# sourceMappingURL=modal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../src/plugins/modal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,KAAK,CAAA;AAK/C,MAAM,WAAW,YAAY;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,UAAU,EAAE,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,WAAW,gBAAiB,SAAQ,YAAY;IACrD,QAAQ,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAA;IAC/B,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,GAAG,CAAA;IACnC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1C,aAAa,CAAC,EAAE,CAA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CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,KAAK,uBAAuB,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA;IACzJ,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,YAAY,EAAE,CAAC,OAAO,EAAE,uBAAuB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;CACpE;AAED,eAAO,MAAM,WAAW,EAAE,YAAY,CAAC,QAAQ,CAAmB,CAAA;AAElE,wBAAgB,QAAQ,IAAI,QAAQ,CAInC;AAED,eAAO,MAAM,WAAW,EAAE,MAsEzB,CAAA"}
@@ -0,0 +1,66 @@
1
+ import { BglFormSchemaFnT, BtnOptions, ThemeType } from '..';
2
+ export interface ModalOptions {
3
+ title?: string;
4
+ dismissable?: boolean;
5
+ side?: boolean;
6
+ width?: string;
7
+ actions?: BtnOptions[];
8
+ class?: string;
9
+ visible?: boolean;
10
+ }
11
+ export interface ModalConfirmOptions {
12
+ 'title': string;
13
+ 'message': string;
14
+ 'confirmText'?: string;
15
+ 'confirmBtnColor'?: ThemeType;
16
+ 'cancelText'?: string;
17
+ 'cancelBtnColor'?: ThemeType;
18
+ 'resolve': (val: boolean) => void;
19
+ 'onUpdate:visible': () => void;
20
+ 'visible': boolean;
21
+ }
22
+ export type ModalType = 'modal' | 'modalForm' | 'confirmModal';
23
+ export type ConfirmModalUserOptions = string | {
24
+ title: string;
25
+ message: string;
26
+ confirmText?: string;
27
+ cancelText?: string;
28
+ confirmBtnColor?: string;
29
+ cancelBtnColor?: string;
30
+ };
31
+ export interface ModalComponentProps {
32
+ componentSlots: {
33
+ [key: string]: any;
34
+ };
35
+ modalType: ModalType;
36
+ modalOptions: ModalOptions | ModalFormOptions | ModalConfirmOptions;
37
+ }
38
+ export interface ModalFormComponentProps<T extends {
39
+ [key: string]: any;
40
+ } = any> extends ModalComponentProps {
41
+ modalType: 'modalForm';
42
+ modalOptions: ModalFormOptions<T>;
43
+ }
44
+ export interface ModalFormOptions<T extends {
45
+ [key: string]: any;
46
+ } = any> {
47
+ 'schema': BglFormSchemaFnT<T>;
48
+ 'modelValue'?: T;
49
+ 'onUpdate:modelValue'?: (val: T) => void;
50
+ 'onSubmit'?: (formData: T) => any;
51
+ 'onDelete'?: (formData: T) => Promise<void>;
52
+ 'onDuplicate'?: (formData: T) => Promise<void>;
53
+ 'submitText'?: string;
54
+ 'cancelText'?: string;
55
+ 'deleteText'?: string;
56
+ 'duplicateText'?: string;
57
+ 'onError'?: (err: any) => void;
58
+ 'side'?: boolean;
59
+ 'title'?: string;
60
+ 'width'?: string;
61
+ 'dismissable'?: boolean;
62
+ 'visible'?: boolean;
63
+ 'actions'?: BtnOptions[];
64
+ 'class'?: string;
65
+ }
66
+ //# sourceMappingURL=modalTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modalTypes.d.ts","sourceRoot":"","sources":["../../src/plugins/modalTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE5E,MAAM,WAAW,YAAY;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,UAAU,EAAE,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,WAAW,mBAAmB;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,iBAAiB,CAAC,EAAE,SAAS,CAAA;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,gBAAgB,CAA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