@maltjoy/core-vue 3.26.0 → 3.27.0
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.
|
@@ -61,6 +61,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
61
61
|
type: PropType<TJoyButtonSizes>;
|
|
62
62
|
default: string;
|
|
63
63
|
};
|
|
64
|
+
/** Called just before you close the drawer. Returning false will cancel the closing.
|
|
65
|
+
* This is useful when you need confirmation from the user to close the drawer. */
|
|
66
|
+
onBeforeHide: {
|
|
67
|
+
type: PropType<() => boolean | Promise<boolean>>;
|
|
68
|
+
};
|
|
64
69
|
}, {
|
|
65
70
|
focusTrapReturn: import("@vueuse/integrations/useFocusTrap").UseFocusTrapReturn;
|
|
66
71
|
hasFooterSlots: import("vue").ComputedRef<boolean>;
|
|
@@ -125,6 +130,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
125
130
|
type: PropType<TJoyButtonSizes>;
|
|
126
131
|
default: string;
|
|
127
132
|
};
|
|
133
|
+
/** Called just before you close the drawer. Returning false will cancel the closing.
|
|
134
|
+
* This is useful when you need confirmation from the user to close the drawer. */
|
|
135
|
+
onBeforeHide: {
|
|
136
|
+
type: PropType<() => boolean | Promise<boolean>>;
|
|
137
|
+
};
|
|
128
138
|
}>> & {
|
|
129
139
|
"onDrawer:open"?: (() => any) | undefined;
|
|
130
140
|
"onDrawer:after-open"?: (() => any) | undefined;
|
|
@@ -24,6 +24,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
24
24
|
readonly id?: string | undefined;
|
|
25
25
|
readonly cancelText?: string | undefined;
|
|
26
26
|
readonly confirmText?: string | undefined;
|
|
27
|
+
readonly onBeforeHide?: (() => boolean | Promise<boolean>) | undefined;
|
|
27
28
|
"onDrawer:open"?: (() => any) | undefined;
|
|
28
29
|
"onDrawer:after-open"?: (() => any) | undefined;
|
|
29
30
|
"onDrawer:hide"?: (() => any) | undefined;
|
|
@@ -72,6 +73,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
72
73
|
type: import("vue").PropType<import("../components.types").TJoyButtonSizes>;
|
|
73
74
|
default: string;
|
|
74
75
|
};
|
|
76
|
+
onBeforeHide: {
|
|
77
|
+
type: import("vue").PropType<() => boolean | Promise<boolean>>;
|
|
78
|
+
};
|
|
75
79
|
}>> & {
|
|
76
80
|
"onDrawer:open"?: (() => any) | undefined;
|
|
77
81
|
"onDrawer:after-open"?: (() => any) | undefined;
|
|
@@ -135,6 +139,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
135
139
|
type: import("vue").PropType<import("../components.types").TJoyButtonSizes>;
|
|
136
140
|
default: string;
|
|
137
141
|
};
|
|
142
|
+
onBeforeHide: {
|
|
143
|
+
type: import("vue").PropType<() => boolean | Promise<boolean>>;
|
|
144
|
+
};
|
|
138
145
|
}>> & {
|
|
139
146
|
"onDrawer:open"?: (() => any) | undefined;
|
|
140
147
|
"onDrawer:after-open"?: (() => any) | undefined;
|
|
@@ -228,6 +235,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
228
235
|
type: import("vue").PropType<import("../components.types").TJoyButtonSizes>;
|
|
229
236
|
default: string;
|
|
230
237
|
};
|
|
238
|
+
onBeforeHide: {
|
|
239
|
+
type: import("vue").PropType<() => boolean | Promise<boolean>>;
|
|
240
|
+
};
|
|
231
241
|
}>> & {
|
|
232
242
|
"onDrawer:open"?: (() => any) | undefined;
|
|
233
243
|
"onDrawer:after-open"?: (() => any) | undefined;
|
|
@@ -281,6 +291,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
281
291
|
readonly id?: string | undefined;
|
|
282
292
|
readonly cancelText?: string | undefined;
|
|
283
293
|
readonly confirmText?: string | undefined;
|
|
294
|
+
readonly onBeforeHide?: (() => boolean | Promise<boolean>) | undefined;
|
|
284
295
|
"onDrawer:open"?: (() => any) | undefined;
|
|
285
296
|
"onDrawer:after-open"?: (() => any) | undefined;
|
|
286
297
|
"onDrawer:hide"?: (() => any) | undefined;
|
|
@@ -329,6 +340,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
329
340
|
type: import("vue").PropType<import("../components.types").TJoyButtonSizes>;
|
|
330
341
|
default: string;
|
|
331
342
|
};
|
|
343
|
+
onBeforeHide: {
|
|
344
|
+
type: import("vue").PropType<() => boolean | Promise<boolean>>;
|
|
345
|
+
};
|
|
332
346
|
}>> & {
|
|
333
347
|
"onDrawer:open"?: (() => any) | undefined;
|
|
334
348
|
"onDrawer:after-open"?: (() => any) | undefined;
|
|
@@ -392,6 +406,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
392
406
|
type: import("vue").PropType<import("../components.types").TJoyButtonSizes>;
|
|
393
407
|
default: string;
|
|
394
408
|
};
|
|
409
|
+
onBeforeHide: {
|
|
410
|
+
type: import("vue").PropType<() => boolean | Promise<boolean>>;
|
|
411
|
+
};
|
|
395
412
|
}>> & {
|
|
396
413
|
"onDrawer:open"?: (() => any) | undefined;
|
|
397
414
|
"onDrawer:after-open"?: (() => any) | undefined;
|
|
@@ -485,6 +502,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
485
502
|
type: import("vue").PropType<import("../components.types").TJoyButtonSizes>;
|
|
486
503
|
default: string;
|
|
487
504
|
};
|
|
505
|
+
onBeforeHide: {
|
|
506
|
+
type: import("vue").PropType<() => boolean | Promise<boolean>>;
|
|
507
|
+
};
|
|
488
508
|
}>> & {
|
|
489
509
|
"onDrawer:open"?: (() => any) | undefined;
|
|
490
510
|
"onDrawer:after-open"?: (() => any) | undefined;
|
package/dist/joy-vue.js
CHANGED
|
@@ -2577,6 +2577,11 @@ const Yl = /* @__PURE__ */ J(Kl, [["__scopeId", "data-v-a3d693c3"]]), Zl = ["id"
|
|
|
2577
2577
|
buttonSize: {
|
|
2578
2578
|
type: String,
|
|
2579
2579
|
default: "medium"
|
|
2580
|
+
},
|
|
2581
|
+
/** Called just before you close the drawer. Returning false will cancel the closing.
|
|
2582
|
+
* This is useful when you need confirmation from the user to close the drawer. */
|
|
2583
|
+
onBeforeHide: {
|
|
2584
|
+
type: Function
|
|
2580
2585
|
}
|
|
2581
2586
|
},
|
|
2582
2587
|
emits: ["drawer:open", "drawer:after-open", "drawer:hide", "drawer:after-hide", "drawer:before-unmount", "drawer:confirm"],
|
|
@@ -2589,7 +2594,7 @@ const Yl = /* @__PURE__ */ J(Kl, [["__scopeId", "data-v-a3d693c3"]]), Zl = ["id"
|
|
|
2589
2594
|
return !!P || !!I;
|
|
2590
2595
|
}), d = V(() => a.id || i), b = d.value + "-header";
|
|
2591
2596
|
async function m(P = { fireHideEvent: !0 }) {
|
|
2592
|
-
y.deactivate(), c.value = !1, await qe(), me(!1), P.fireHideEvent && o("drawer:hide");
|
|
2597
|
+
a.onBeforeHide && !await a.onBeforeHide() || (y.deactivate(), c.value = !1, await qe(), me(!1), P.fireHideEvent && o("drawer:hide"));
|
|
2593
2598
|
}
|
|
2594
2599
|
async function _() {
|
|
2595
2600
|
c.value = !0, await qe(), a.focusTrap && !a.elevated && y.activate(), !a.elevated && a.preventBodyScroll && me(!0);
|
|
@@ -2745,7 +2750,7 @@ const Yl = /* @__PURE__ */ J(Kl, [["__scopeId", "data-v-a3d693c3"]]), Zl = ["id"
|
|
|
2745
2750
|
], 8, ["to"])) : j("", !0);
|
|
2746
2751
|
}
|
|
2747
2752
|
});
|
|
2748
|
-
const oi = /* @__PURE__ */ J(ai, [["__scopeId", "data-v-
|
|
2753
|
+
const oi = /* @__PURE__ */ J(ai, [["__scopeId", "data-v-194909c1"]]), li = /* @__PURE__ */ L({
|
|
2749
2754
|
__name: "VJoyDrawerTrigger",
|
|
2750
2755
|
props: {
|
|
2751
2756
|
drawer: {}
|