@maas/vue-equipment 1.0.0-beta.40 → 1.0.0-beta.41

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@maas/vue-equipment/nuxt",
3
3
  "configKey": "vueEquipment",
4
- "version": "1.0.0-beta.39",
4
+ "version": "1.0.0-beta.40",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -11,11 +11,11 @@ type __VLS_Slots = {} & {
11
11
  default?: (props: typeof __VLS_1) => any;
12
12
  };
13
13
  declare const __VLS_base: import("vue").DefineComponent<MagicCommandItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
14
- enter: () => any;
15
14
  click: (event: MouseEvent) => any;
15
+ enter: () => any;
16
16
  }, string, import("vue").PublicProps, Readonly<MagicCommandItemProps> & Readonly<{
17
- onEnter?: (() => any) | undefined;
18
17
  onClick?: ((event: MouseEvent) => any) | undefined;
18
+ onEnter?: (() => any) | undefined;
19
19
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
20
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
21
  declare const _default: typeof __VLS_export;
@@ -11,11 +11,11 @@ type __VLS_Slots = {} & {
11
11
  default?: (props: typeof __VLS_1) => any;
12
12
  };
13
13
  declare const __VLS_base: import("vue").DefineComponent<MagicCommandItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
14
- enter: () => any;
15
14
  click: (event: MouseEvent) => any;
15
+ enter: () => any;
16
16
  }, string, import("vue").PublicProps, Readonly<MagicCommandItemProps> & Readonly<{
17
- onEnter?: (() => any) | undefined;
18
17
  onClick?: ((event: MouseEvent) => any) | undefined;
18
+ onEnter?: (() => any) | undefined;
19
19
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
20
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
21
  declare const _default: typeof __VLS_export;
@@ -214,6 +214,9 @@ export function useDraggableDrag(args) {
214
214
  );
215
215
  for (let i = 0; i < mappedSnapPoints.value.length; i++) {
216
216
  const snapPoint = mappedSnapPoints.value[i];
217
+ if (!snapPoint) {
218
+ return;
219
+ }
217
220
  const targetVector = vectorBetweenCoordinates(
218
221
  intermediateDraggedCoords,
219
222
  snapPoint
@@ -238,6 +241,9 @@ export function useDraggableDrag(args) {
238
241
  function findClosestSnapPoint() {
239
242
  const draggedCoords = { x: draggedX.value, y: draggedY.value };
240
243
  const closestSnapPoint = mappedSnapPoints.value.reduce((a, b) => {
244
+ if (!a) {
245
+ return b;
246
+ }
241
247
  return calculateDistance(a, draggedCoords) < calculateDistance(b, draggedCoords) ? a : b;
242
248
  }, mappedSnapPoints.value[0]);
243
249
  return closestSnapPoint;
@@ -310,6 +316,12 @@ export function useDraggableDrag(args) {
310
316
  });
311
317
  }
312
318
  function onPointerdown(e) {
319
+ const isSelect = ["SELECT", "OPTION"].includes(
320
+ e.target.tagName
321
+ );
322
+ if (isSelect) {
323
+ return;
324
+ }
313
325
  const scrollLockValue = toValue(scrollLock);
314
326
  if (scrollLockValue) {
315
327
  if (typeof scrollLockValue === "object" && scrollLockValue.padding) {
@@ -138,6 +138,9 @@ export function useDraggableSnap(args) {
138
138
  easing = toValue(animation).snap?.easing
139
139
  } = args2;
140
140
  const snapPoint = snapPointsMap.value[`x${x}y${y}`];
141
+ if (!snapPoint) {
142
+ return;
143
+ }
141
144
  emitter.emit("beforeSnap", { id: toValue(id), snapPoint });
142
145
  cancelInterpolation();
143
146
  interpolationIdY.value = interpolate({
@@ -410,6 +410,12 @@ export function useDrawerDrag(args) {
410
410
  if (dragging.value) {
411
411
  return;
412
412
  } else {
413
+ const isSelect = ["SELECT", "OPTION"].includes(
414
+ e.target.tagName
415
+ );
416
+ if (isSelect) {
417
+ return;
418
+ }
413
419
  dragging.value = true;
414
420
  pointerdownTarget = e.target;
415
421
  guardedSetPointerCapture({
@@ -1,6 +1,6 @@
1
1
  export declare function useMagicEmitter(): {
2
2
  on: {
3
- <Key extends "progress" | "collision" | keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents | keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents | "acceptAll" | "rejectAll" | "acceptSelected" | keyof import("../../../MagicAccordion/src/types/index.js").AccordionEvents>(type: Key, handler: import("mitt").Handler<({
3
+ <Key extends "progress" | "acceptAll" | "acceptSelected" | "rejectAll" | "collision" | keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents | keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents | keyof import("../../../MagicAccordion/src/types/index.js").AccordionEvents>(type: Key, handler: import("mitt").Handler<({
4
4
  beforeEnter: string | {
5
5
  id: string;
6
6
  viewId: string;
@@ -74,26 +74,26 @@ export declare function useMagicEmitter(): {
74
74
  } & Omit<{
75
75
  beforeSnap: {
76
76
  id: string;
77
- snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
77
+ snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
78
78
  } | {
79
79
  id: string;
80
- snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
80
+ snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
81
81
  };
82
82
  snapTo: {
83
83
  id: string;
84
- snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
84
+ snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
85
85
  duration?: number;
86
86
  } | {
87
87
  id: string;
88
- snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
88
+ snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
89
89
  duration?: number;
90
90
  };
91
91
  afterSnap: {
92
92
  id: string;
93
- snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
93
+ snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
94
94
  } | {
95
95
  id: string;
96
- snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
96
+ snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
97
97
  };
98
98
  beforeDrag: {
99
99
  id: string;
@@ -341,26 +341,26 @@ export declare function useMagicEmitter(): {
341
341
  } & Omit<{
342
342
  beforeSnap: {
343
343
  id: string;
344
- snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
344
+ snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
345
345
  } | {
346
346
  id: string;
347
- snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
347
+ snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
348
348
  };
349
349
  snapTo: {
350
350
  id: string;
351
- snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
351
+ snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
352
352
  duration?: number;
353
353
  } | {
354
354
  id: string;
355
- snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
355
+ snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
356
356
  duration?: number;
357
357
  };
358
358
  afterSnap: {
359
359
  id: string;
360
- snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
360
+ snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
361
361
  } | {
362
362
  id: string;
363
- snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
363
+ snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
364
364
  };
365
365
  beforeDrag: {
366
366
  id: string;
@@ -536,7 +536,7 @@ export declare function useMagicEmitter(): {
536
536
  } & Omit<object, keyof import("../../../MagicToast/src/types/index.js").ToastEvents>, "collision">, keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents>, keyof import("../../../MagicMenu/src/types/index.js").MenuEvents>, keyof import("../../../MagicModal/src/types/index.js").ModalEvents>, keyof import("../../../MagicDrawer/src/types/index.js").DrawerEvents>, keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents>, keyof import("../../../MagicCookie/src/types/index.js").CookieEvents>, keyof import("../../../MagicAccordion/src/types/index.js").AccordionEvents>>): void;
537
537
  };
538
538
  off: {
539
- <Key extends "progress" | "collision" | keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents | keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents | "acceptAll" | "rejectAll" | "acceptSelected" | keyof import("../../../MagicAccordion/src/types/index.js").AccordionEvents>(type: Key, handler?: import("mitt").Handler<({
539
+ <Key extends "progress" | "acceptAll" | "acceptSelected" | "rejectAll" | "collision" | keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents | keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents | keyof import("../../../MagicAccordion/src/types/index.js").AccordionEvents>(type: Key, handler?: import("mitt").Handler<({
540
540
  beforeEnter: string | {
541
541
  id: string;
542
542
  viewId: string;
@@ -610,26 +610,26 @@ export declare function useMagicEmitter(): {
610
610
  } & Omit<{
611
611
  beforeSnap: {
612
612
  id: string;
613
- snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
613
+ snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
614
614
  } | {
615
615
  id: string;
616
- snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
616
+ snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
617
617
  };
618
618
  snapTo: {
619
619
  id: string;
620
- snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
620
+ snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
621
621
  duration?: number;
622
622
  } | {
623
623
  id: string;
624
- snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
624
+ snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
625
625
  duration?: number;
626
626
  };
627
627
  afterSnap: {
628
628
  id: string;
629
- snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
629
+ snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
630
630
  } | {
631
631
  id: string;
632
- snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
632
+ snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
633
633
  };
634
634
  beforeDrag: {
635
635
  id: string;
@@ -877,26 +877,26 @@ export declare function useMagicEmitter(): {
877
877
  } & Omit<{
878
878
  beforeSnap: {
879
879
  id: string;
880
- snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
880
+ snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
881
881
  } | {
882
882
  id: string;
883
- snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
883
+ snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
884
884
  };
885
885
  snapTo: {
886
886
  id: string;
887
- snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
887
+ snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
888
888
  duration?: number;
889
889
  } | {
890
890
  id: string;
891
- snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
891
+ snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
892
892
  duration?: number;
893
893
  };
894
894
  afterSnap: {
895
895
  id: string;
896
- snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
896
+ snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
897
897
  } | {
898
898
  id: string;
899
- snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
899
+ snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
900
900
  };
901
901
  beforeDrag: {
902
902
  id: string;
@@ -1072,7 +1072,7 @@ export declare function useMagicEmitter(): {
1072
1072
  } & Omit<object, keyof import("../../../MagicToast/src/types/index.js").ToastEvents>, "collision">, keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents>, keyof import("../../../MagicMenu/src/types/index.js").MenuEvents>, keyof import("../../../MagicModal/src/types/index.js").ModalEvents>, keyof import("../../../MagicDrawer/src/types/index.js").DrawerEvents>, keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents>, keyof import("../../../MagicCookie/src/types/index.js").CookieEvents>, keyof import("../../../MagicAccordion/src/types/index.js").AccordionEvents>>): void;
1073
1073
  };
1074
1074
  emit: {
1075
- <Key extends "progress" | "collision" | keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents | keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents | "acceptAll" | "rejectAll" | "acceptSelected" | keyof import("../../../MagicAccordion/src/types/index.js").AccordionEvents>(type: Key, event: ({
1075
+ <Key extends "progress" | "acceptAll" | "acceptSelected" | "rejectAll" | "collision" | keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents | keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents | keyof import("../../../MagicAccordion/src/types/index.js").AccordionEvents>(type: Key, event: ({
1076
1076
  beforeEnter: string | {
1077
1077
  id: string;
1078
1078
  viewId: string;
@@ -1146,26 +1146,26 @@ export declare function useMagicEmitter(): {
1146
1146
  } & Omit<{
1147
1147
  beforeSnap: {
1148
1148
  id: string;
1149
- snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
1149
+ snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
1150
1150
  } | {
1151
1151
  id: string;
1152
- snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
1152
+ snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
1153
1153
  };
1154
1154
  snapTo: {
1155
1155
  id: string;
1156
- snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
1156
+ snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
1157
1157
  duration?: number;
1158
1158
  } | {
1159
1159
  id: string;
1160
- snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
1160
+ snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
1161
1161
  duration?: number;
1162
1162
  };
1163
1163
  afterSnap: {
1164
1164
  id: string;
1165
- snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
1165
+ snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
1166
1166
  } | {
1167
1167
  id: string;
1168
- snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
1168
+ snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
1169
1169
  };
1170
1170
  beforeDrag: {
1171
1171
  id: string;
@@ -1339,7 +1339,7 @@ export declare function useMagicEmitter(): {
1339
1339
  leave: string;
1340
1340
  afterLeave: string;
1341
1341
  } & Omit<object, keyof import("../../../MagicToast/src/types/index.js").ToastEvents>, "collision">, keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents>, keyof import("../../../MagicMenu/src/types/index.js").MenuEvents>, keyof import("../../../MagicModal/src/types/index.js").ModalEvents>, keyof import("../../../MagicDrawer/src/types/index.js").DrawerEvents>, keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents>, keyof import("../../../MagicCookie/src/types/index.js").CookieEvents>, keyof import("../../../MagicAccordion/src/types/index.js").AccordionEvents>)[Key]): void;
1342
- <Key extends "progress" | "collision" | keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents | keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents | "acceptAll" | "rejectAll" | "acceptSelected" | keyof import("../../../MagicAccordion/src/types/index.js").AccordionEvents>(type: undefined extends ({
1342
+ <Key extends "progress" | "acceptAll" | "acceptSelected" | "rejectAll" | "collision" | keyof import("../../../MagicPlayer/src/types/index.js").PlayerEvents | keyof import("../../../MagicDraggable/src/types/index.js").DraggableEvents | keyof import("../../../MagicAccordion/src/types/index.js").AccordionEvents>(type: undefined extends ({
1343
1343
  beforeEnter: string | {
1344
1344
  id: string;
1345
1345
  viewId: string;
@@ -1413,26 +1413,26 @@ export declare function useMagicEmitter(): {
1413
1413
  } & Omit<{
1414
1414
  beforeSnap: {
1415
1415
  id: string;
1416
- snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
1416
+ snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
1417
1417
  } | {
1418
1418
  id: string;
1419
- snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
1419
+ snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
1420
1420
  };
1421
1421
  snapTo: {
1422
1422
  id: string;
1423
- snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
1423
+ snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
1424
1424
  duration?: number;
1425
1425
  } | {
1426
1426
  id: string;
1427
- snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
1427
+ snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
1428
1428
  duration?: number;
1429
1429
  };
1430
1430
  afterSnap: {
1431
1431
  id: string;
1432
- snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
1432
+ snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
1433
1433
  } | {
1434
1434
  id: string;
1435
- snapPoint: import("../../../MagicDraggable/src/types/index.js").DraggableSnapPoint;
1435
+ snapPoint: import("../../../MagicDrawer/src/types/index.js").DrawerSnapPoint;
1436
1436
  };
1437
1437
  beforeDrag: {
1438
1438
  id: string;
@@ -10,11 +10,11 @@ type __VLS_Slots = {} & {
10
10
  default?: (props: typeof __VLS_1) => any;
11
11
  };
12
12
  declare const __VLS_base: import("vue").DefineComponent<MagicMenuItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
13
- enter: () => any;
14
13
  click: (event: MouseEvent) => any;
14
+ enter: () => any;
15
15
  }, string, import("vue").PublicProps, Readonly<MagicMenuItemProps> & Readonly<{
16
- onEnter?: (() => any) | undefined;
17
16
  onClick?: ((event: MouseEvent) => any) | undefined;
17
+ onEnter?: (() => any) | undefined;
18
18
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
19
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
20
  declare const _default: typeof __VLS_export;
@@ -10,11 +10,11 @@ type __VLS_Slots = {} & {
10
10
  default?: (props: typeof __VLS_1) => any;
11
11
  };
12
12
  declare const __VLS_base: import("vue").DefineComponent<MagicMenuItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
13
- enter: () => any;
14
13
  click: (event: MouseEvent) => any;
14
+ enter: () => any;
15
15
  }, string, import("vue").PublicProps, Readonly<MagicMenuItemProps> & Readonly<{
16
- onEnter?: (() => any) | undefined;
17
16
  onClick?: ((event: MouseEvent) => any) | undefined;
17
+ onEnter?: (() => any) | undefined;
18
18
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
19
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
20
  declare const _default: typeof __VLS_export;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maas/vue-equipment",
3
3
  "description": "Our Frontend Toolkit, Free and Open Source",
4
- "version": "1.0.0-beta.40",
4
+ "version": "1.0.0-beta.41",
5
5
  "contributors": [
6
6
  {
7
7
  "name": "Robin Scholz",