@simonbackx/vue-app-navigation 2.11.1 → 2.12.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.
package/dist/index.js
CHANGED
|
@@ -845,10 +845,16 @@ const _ComponentWithProperties = class _ComponentWithProperties {
|
|
|
845
845
|
this.vnode = null;
|
|
846
846
|
}
|
|
847
847
|
}
|
|
848
|
+
/**
|
|
849
|
+
* @deprecated
|
|
850
|
+
*/
|
|
848
851
|
setDisplayStyle(style) {
|
|
849
852
|
this.modalDisplayStyle = style;
|
|
850
853
|
return this;
|
|
851
854
|
}
|
|
855
|
+
/**
|
|
856
|
+
* @deprecated
|
|
857
|
+
*/
|
|
852
858
|
setAnimated(animated) {
|
|
853
859
|
this.animated = animated;
|
|
854
860
|
return this;
|
|
@@ -2380,7 +2386,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2380
2386
|
}
|
|
2381
2387
|
const style = options.modalDisplayStyle ?? component.modalDisplayStyle ?? "cover";
|
|
2382
2388
|
component.setDisplayStyle(style);
|
|
2383
|
-
if ((style === "popup" || style === "sheet" || style === "side-view") && ((_a = stackComponent.value) == null ? void 0 : _a.$el).offsetWidth > 800 || style === "sheet" && ((_b = stackComponent.value) == null ? void 0 : _b.$el).offsetWidth > 700) {
|
|
2389
|
+
if ((style === "popup" || style === "sheet" || style === "side-view") && (options.forceModalDisplay === true || ((_a = stackComponent.value) == null ? void 0 : _a.$el).offsetWidth > 800 || style === "sheet" && ((_b = stackComponent.value) == null ? void 0 : _b.$el).offsetWidth > 700)) {
|
|
2384
2390
|
const c = new ComponentWithProperties(_sfc_main$1, {
|
|
2385
2391
|
root: component,
|
|
2386
2392
|
className: options.modalClass ?? style,
|
|
@@ -2610,7 +2616,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2610
2616
|
(_a = pop(options)) == null ? void 0 : _a.catch(console.error);
|
|
2611
2617
|
};
|
|
2612
2618
|
const onClick = (event) => {
|
|
2613
|
-
if (mainContent.value && !mainContent.value.contains(event.target) && document.body.contains(event.target)) {
|
|
2619
|
+
if (mainContent.value && event.target && !mainContent.value.contains(event.target) && (event.target.isConnected && document.body.contains(event.target))) {
|
|
2614
2620
|
dismiss().catch(console.error);
|
|
2615
2621
|
event.preventDefault();
|
|
2616
2622
|
}
|
|
@@ -2641,7 +2647,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2641
2647
|
component: _ctx.root
|
|
2642
2648
|
}, null, 8, ["component"]))
|
|
2643
2649
|
])
|
|
2644
|
-
], 512)
|
|
2650
|
+
], 512),
|
|
2651
|
+
_cache[0] || (_cache[0] = createElementVNode("div", { class: "background" }, null, -1))
|
|
2645
2652
|
], 6);
|
|
2646
2653
|
};
|
|
2647
2654
|
}
|
|
@@ -63,6 +63,12 @@ export declare class ComponentWithProperties {
|
|
|
63
63
|
componentInstance(): ComponentPublicInstance | null;
|
|
64
64
|
shouldNavigateAway(): Promise<boolean>;
|
|
65
65
|
destroy(vnode: VNode): void;
|
|
66
|
+
/**
|
|
67
|
+
* @deprecated
|
|
68
|
+
*/
|
|
66
69
|
setDisplayStyle(style: ModalDisplayStyle): ComponentWithProperties;
|
|
70
|
+
/**
|
|
71
|
+
* @deprecated
|
|
72
|
+
*/
|
|
67
73
|
setAnimated(animated: boolean): ComponentWithProperties;
|
|
68
74
|
}
|
|
@@ -48,6 +48,10 @@ export interface PushOptions {
|
|
|
48
48
|
* Reverse the animation if possible. Defaults to false
|
|
49
49
|
*/
|
|
50
50
|
reverse?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Ignore client width checks, always display as modal, also on mobile devices.
|
|
53
|
+
*/
|
|
54
|
+
forceModalDisplay?: boolean;
|
|
51
55
|
modalDisplayStyle?: ModalDisplayStyle;
|
|
52
56
|
modalClass?: string;
|
|
53
57
|
modalCssStyle?: string;
|