@simonbackx/vue-app-navigation 1.28.0 → 2.0.0-alpha.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.d.ts +15 -15
- package/dist/index.js +2008 -0
- package/dist/main.css +346 -7
- package/dist/src/ComponentWithProperties.d.ts +8 -5
- package/dist/src/ComponentWithPropertiesInstance.d.ts +24 -6
- package/dist/src/FramedComponent.vue.d.ts +28 -8
- package/dist/src/HistoryManager.d.ts +1 -1
- package/dist/src/ModalMixin.d.ts +413 -12
- package/dist/src/ModalStackComponent.vue.d.ts +209 -12
- package/dist/src/ModalStackComponentFinderMixin.d.ts +5 -5
- package/dist/src/NavigationController.vue.d.ts +63 -32
- package/dist/src/NavigationMixin.d.ts +28 -47
- package/dist/src/Plugin.d.ts +5 -0
- package/dist/src/Popup.vue.d.ts +34 -14
- package/dist/src/PushOptions.d.ts +2 -1
- package/dist/src/Sheet.vue.d.ts +432 -11
- package/dist/src/SideView.vue.d.ts +432 -11
- package/dist/src/SplitViewController.vue.d.ts +190 -16
- package/dist/src/StackComponent.vue.d.ts +13 -6
- package/dist/test/index.d.ts +1 -0
- package/dist/test/vite.config.d.ts +2 -0
- package/package.json +24 -25
- package/dist/main.css.map +0 -1
- package/dist/main.js +0 -2
- package/dist/main.js.map +0 -1
|
@@ -1,9 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { PushOptions } from './PushOptions';
|
|
2
|
+
import { PopOptions } from './PopOptions';
|
|
3
|
+
import { ComponentWithProperties } from './ComponentWithProperties';
|
|
4
|
+
import { PropType } from 'vue';
|
|
5
|
+
|
|
6
|
+
declare const _default: import('vue').DefineComponent<{
|
|
7
|
+
root: {
|
|
8
|
+
required: true;
|
|
9
|
+
type: typeof ComponentWithProperties;
|
|
10
|
+
};
|
|
11
|
+
initialComponents: {
|
|
12
|
+
default: null;
|
|
13
|
+
type: PropType<ComponentWithProperties[] | null>;
|
|
14
|
+
};
|
|
15
|
+
animationType: {
|
|
16
|
+
default: string;
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
};
|
|
19
|
+
customProvide: {
|
|
20
|
+
type: ObjectConstructor;
|
|
21
|
+
default: null;
|
|
22
|
+
};
|
|
23
|
+
}, {
|
|
24
|
+
originalPop: (options?: PopOptions | undefined) => void;
|
|
25
|
+
}, {
|
|
7
26
|
components: ComponentWithProperties[];
|
|
8
27
|
mainComponent: ComponentWithProperties | null;
|
|
9
28
|
transitionName: string;
|
|
@@ -12,41 +31,53 @@ export default class NavigationController extends Vue {
|
|
|
12
31
|
previousScrollPosition: number;
|
|
13
32
|
nextInternalScrollPosition: number;
|
|
14
33
|
savedInternalScrollPositions: number[];
|
|
15
|
-
|
|
16
|
-
initialComponents: ComponentWithProperties[] | null;
|
|
17
|
-
animationType: string;
|
|
18
|
-
child: FramedComponent;
|
|
19
|
-
beforeMount(): void;
|
|
34
|
+
}, {}, {
|
|
20
35
|
freezeSize(): void;
|
|
21
36
|
growSize(width: number, height: number): void;
|
|
22
37
|
unfreezeSize(): void;
|
|
23
|
-
getInternalScrollElement(element?:
|
|
38
|
+
getInternalScrollElement(element?: Element | null): HTMLElement | null;
|
|
24
39
|
getScrollElement(element?: HTMLElement | null): HTMLElement;
|
|
25
40
|
shouldAnimate(): boolean;
|
|
26
|
-
/**
|
|
27
|
-
* popOptions = how to handle the pop of replace. animated and count are ignored
|
|
28
|
-
* -> should get moved to separate configurations in the future
|
|
29
|
-
*/
|
|
30
41
|
push(options: PushOptions): Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* Whether user interaction might prevent destructive navigation away from components.
|
|
33
|
-
*/
|
|
34
42
|
shouldNavigateAway(): Promise<boolean>;
|
|
35
43
|
popToRoot(options?: PopOptions): Promise<ComponentWithProperties[] | undefined>;
|
|
36
|
-
getPoppableParent():
|
|
37
|
-
/**
|
|
38
|
-
* force: whether "shouldNavigateAway" of child components is ignored
|
|
39
|
-
*/
|
|
44
|
+
getPoppableParent(): import('vue').ComponentInternalInstance | null;
|
|
40
45
|
pop(options?: PopOptions): Promise<ComponentWithProperties[] | undefined>;
|
|
41
|
-
beforeEnter(insertedElement:
|
|
42
|
-
beforeLeave(_element:
|
|
46
|
+
beforeEnter(insertedElement: Element): void;
|
|
47
|
+
beforeLeave(_element: Element): void;
|
|
43
48
|
beforeBeforeEnterAnimation(): void;
|
|
44
49
|
finishedEnterAnimation(): void;
|
|
45
|
-
enter(element:
|
|
50
|
+
enter(element: any, done: () => void): void;
|
|
46
51
|
getScrollOuterHeight(scrollElement: HTMLElement): number;
|
|
47
|
-
leave(element:
|
|
48
|
-
afterLeave(element:
|
|
49
|
-
afterEnter(element:
|
|
50
|
-
enterCancelled(_element:
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
leave(element: any, done: () => void): void;
|
|
53
|
+
afterLeave(element: any): void;
|
|
54
|
+
afterEnter(element: any): void;
|
|
55
|
+
enterCancelled(_element: any): void;
|
|
56
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("didPush" | "didPop" | "showDetail" | "present")[], "didPush" | "didPop" | "showDetail" | "present", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
57
|
+
root: {
|
|
58
|
+
required: true;
|
|
59
|
+
type: typeof ComponentWithProperties;
|
|
60
|
+
};
|
|
61
|
+
initialComponents: {
|
|
62
|
+
default: null;
|
|
63
|
+
type: PropType<ComponentWithProperties[] | null>;
|
|
64
|
+
};
|
|
65
|
+
animationType: {
|
|
66
|
+
default: string;
|
|
67
|
+
type: StringConstructor;
|
|
68
|
+
};
|
|
69
|
+
customProvide: {
|
|
70
|
+
type: ObjectConstructor;
|
|
71
|
+
default: null;
|
|
72
|
+
};
|
|
73
|
+
}>> & {
|
|
74
|
+
onDidPush?: ((...args: any[]) => any) | undefined;
|
|
75
|
+
onDidPop?: ((...args: any[]) => any) | undefined;
|
|
76
|
+
onShowDetail?: ((...args: any[]) => any) | undefined;
|
|
77
|
+
onPresent?: ((...args: any[]) => any) | undefined;
|
|
78
|
+
}, {
|
|
79
|
+
customProvide: Record<string, any>;
|
|
80
|
+
initialComponents: ComponentWithProperties[] | null;
|
|
81
|
+
animationType: string;
|
|
82
|
+
}, {}>;
|
|
83
|
+
export default _default;
|
|
@@ -1,48 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import NavigationController from "./NavigationController.vue";
|
|
1
|
+
import { PushOptions } from './PushOptions';
|
|
2
|
+
import { default as Popup } from './Popup.vue';
|
|
4
3
|
import { PopOptions } from './PopOptions';
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
*/
|
|
32
|
-
getPoppableParent(): any | null;
|
|
33
|
-
/**
|
|
34
|
-
* Whether the current navivation controller above this component can pop (it has more than one child). Excluding modal view controllers
|
|
35
|
-
*/
|
|
36
|
-
canPop: boolean;
|
|
37
|
-
canDismiss: boolean;
|
|
38
|
-
activated(): void;
|
|
39
|
-
beforeMount(): void;
|
|
40
|
-
/**
|
|
41
|
-
* Return the first navigation controller that can get popped, excluding the modal navigation controller and the stack component
|
|
42
|
-
* Note: this shouldn't be a getter to disable vue caching getters
|
|
43
|
-
*/
|
|
44
|
-
private getPoppableNavigationController;
|
|
45
|
-
isFocused(): boolean;
|
|
46
|
-
calculateCanPop(): boolean;
|
|
47
|
-
calculateCanDismiss(): boolean;
|
|
48
|
-
}
|
|
4
|
+
import { ComponentWithProperties } from './ComponentWithProperties';
|
|
5
|
+
import { DefineComponent, Ref } from 'vue';
|
|
6
|
+
|
|
7
|
+
export declare function usePop(): (options?: PopOptions) => void;
|
|
8
|
+
export declare function useShowDetail(): (options: PushOptions | ComponentWithProperties) => Promise<void>;
|
|
9
|
+
export declare function useShow(): (options: PushOptions | ComponentWithProperties) => Promise<void>;
|
|
10
|
+
export declare function usePresent(): (options: PushOptions | ComponentWithProperties) => Promise<void>;
|
|
11
|
+
export declare function useDismiss(): (options?: PopOptions) => Promise<void>;
|
|
12
|
+
export declare function useCanPop(): Ref<boolean>;
|
|
13
|
+
export declare function useCanDismiss(): Ref<boolean>;
|
|
14
|
+
export declare function useFocused(): boolean | Ref<boolean>;
|
|
15
|
+
/**
|
|
16
|
+
* @returns To detect whether you are in a popup
|
|
17
|
+
*/
|
|
18
|
+
export declare function usePopup(): Ref<InstanceType<typeof Popup> | null> | InstanceType<typeof Popup> | null;
|
|
19
|
+
export declare const NavigationMixin: DefineComponent<{}, {
|
|
20
|
+
show: ReturnType<typeof useShow>;
|
|
21
|
+
showDetail: ReturnType<typeof useShowDetail>;
|
|
22
|
+
present: ReturnType<typeof usePresent>;
|
|
23
|
+
pop: ReturnType<typeof usePop>;
|
|
24
|
+
dismiss: ReturnType<typeof useDismiss>;
|
|
25
|
+
canPop: ReturnType<typeof useCanPop>;
|
|
26
|
+
canDismiss: ReturnType<typeof useCanDismiss>;
|
|
27
|
+
isFocused: ReturnType<typeof useFocused>;
|
|
28
|
+
popup: ReturnType<typeof usePopup>;
|
|
29
|
+
}>;
|
package/dist/src/Popup.vue.d.ts
CHANGED
|
@@ -1,17 +1,37 @@
|
|
|
1
|
-
import { ComponentWithProperties } from "./ComponentWithProperties";
|
|
2
1
|
import { PopOptions } from './PopOptions';
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { ComponentWithProperties } from './ComponentWithProperties';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
5
5
|
root: ComponentWithProperties;
|
|
6
6
|
className: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
7
|
+
}>, {
|
|
8
|
+
className: string;
|
|
9
|
+
}>, {
|
|
10
|
+
dismiss: import('vue').ShallowRef<(options?: PopOptions | undefined) => Promise<false | undefined>>;
|
|
11
|
+
pop: import('vue').ShallowRef<(options?: PopOptions | undefined) => Promise<false | undefined>>;
|
|
12
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
13
|
+
root: ComponentWithProperties;
|
|
14
|
+
className: string;
|
|
15
|
+
}>, {
|
|
16
|
+
className: string;
|
|
17
|
+
}>>>, {
|
|
18
|
+
className: string;
|
|
19
|
+
}, {}>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
22
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
23
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
24
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
25
|
+
} : {
|
|
26
|
+
type: import('vue').PropType<T[K]>;
|
|
27
|
+
required: true;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
type __VLS_WithDefaults<P, D> = {
|
|
31
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
32
|
+
default: D[K];
|
|
33
|
+
}> : P[K];
|
|
34
|
+
};
|
|
35
|
+
type __VLS_Prettify<T> = {
|
|
36
|
+
[K in keyof T]: T[K];
|
|
37
|
+
} & {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ComponentWithProperties, ModalDisplayStyle } from
|
|
1
|
+
import { ComponentWithProperties, ModalDisplayStyle } from './ComponentWithProperties';
|
|
2
|
+
|
|
2
3
|
export interface PushOptions {
|
|
3
4
|
/**
|
|
4
5
|
* Insert one or multiple components. Only the last one is animated if animations are required
|