@simonbackx/vue-app-navigation 1.25.0 → 1.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.
@@ -1,9 +1,10 @@
1
- import { Vue } from "vue-property-decorator";
2
1
  import { ComponentWithProperties } from "./ComponentWithProperties";
3
- import StackComponent from "./StackComponent.vue";
2
+ import { NavigationMixin } from "./NavigationMixin";
4
3
  import { PushOptions } from "./PushOptions";
5
- export default class ModalStackComponent extends Vue {
4
+ import StackComponent from "./StackComponent.vue";
5
+ export default class ModalStackComponent extends NavigationMixin {
6
6
  readonly root: ComponentWithProperties;
7
+ readonly initialComponents: ComponentWithProperties[] | null;
7
8
  stackComponent: StackComponent;
8
9
  present(options: PushOptions): void;
9
10
  /**
@@ -7,6 +7,7 @@ import { PushOptions } from "./PushOptions";
7
7
  import Sheet from "./Sheet.vue";
8
8
  import SideView from "./SideView.vue";
9
9
  import SplitViewController from "./SplitViewController.vue";
10
+ import ModalStackComponent from "./ModalStackComponent.vue";
10
11
  export declare class NavigationMixin extends Vue {
11
12
  emitParents(event: string, data: any): void;
12
13
  show(options: PushOptions | ComponentWithProperties): void;
@@ -26,6 +27,7 @@ export declare class NavigationMixin extends Vue {
26
27
  get modalOrPopup(): NavigationController | Popup | Sheet | SideView | null;
27
28
  get modalNavigationController(): NavigationController | null;
28
29
  get splitViewController(): SplitViewController | null;
30
+ get modalStackComponent(): ModalStackComponent | null;
29
31
  /**
30
32
  * Return the first child of a parent that listens for the pop event
31
33
  */
@@ -1,13 +1,13 @@
1
1
  import { ComponentWithProperties } from "./ComponentWithProperties";
2
2
  import { PopOptions } from './PopOptions';
3
- import { ModalMixin } from './ModalMixin';
4
- export default class Popup extends ModalMixin {
3
+ import { NavigationMixin } from "./NavigationMixin";
4
+ export default class Popup extends NavigationMixin {
5
5
  root: ComponentWithProperties;
6
6
  className: string;
7
7
  get buildClass(): string;
8
8
  get shouldAppear(): boolean;
9
9
  get pushDown(): 1 | 0 | 2;
10
- get isFocused(): boolean;
10
+ isFocused(): boolean;
11
11
  onClick(event: any): void;
12
12
  activated(): void;
13
13
  deactivated(): void;
@@ -1,13 +1,13 @@
1
1
  import { ComponentWithProperties } from "./ComponentWithProperties";
2
2
  import { PopOptions } from './PopOptions';
3
- import { ModalMixin } from './ModalMixin';
4
- export default class Sheet extends ModalMixin {
3
+ import { NavigationMixin } from "./NavigationMixin";
4
+ export default class Sheet extends NavigationMixin {
5
5
  root: ComponentWithProperties;
6
6
  get shouldAppear(): boolean;
7
7
  onClick(event: any): void;
8
8
  activated(): void;
9
9
  deactivated(): void;
10
- get isFocused(): boolean;
10
+ isFocused(): boolean;
11
11
  dismiss(options?: PopOptions): Promise<false | undefined>;
12
12
  onKey(event: any): void;
13
13
  shouldNavigateAway(): Promise<boolean>;
@@ -1,11 +1,11 @@
1
1
  import { ComponentWithProperties } from "./ComponentWithProperties";
2
+ import { NavigationMixin } from "./NavigationMixin";
2
3
  import { PopOptions } from './PopOptions';
3
- import { ModalMixin } from './ModalMixin';
4
- export default class SideView extends ModalMixin {
4
+ export default class SideView extends NavigationMixin {
5
5
  root: ComponentWithProperties;
6
6
  get shouldAppear(): boolean;
7
7
  get pushDown(): 1 | 0 | 2;
8
- get isFocused(): boolean;
8
+ isFocused(): boolean;
9
9
  activated(): void;
10
10
  deactivated(): void;
11
11
  dismiss(options?: PopOptions): Promise<false | undefined>;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@simonbackx/vue-app-navigation",
3
3
  "main": "./dist/main.js",
4
4
  "types": "./dist/index.d.ts",
5
- "version": "1.25.0",
5
+ "version": "1.27.0",
6
6
  "sideEffects": [
7
7
  "*.vue",
8
8
  "*.css"
@@ -1,15 +0,0 @@
1
- import { Vue } from "vue-property-decorator";
2
- import ModalStackComponent from "./ModalStackComponent.vue";
3
- import { PopOptions } from "./PopOptions";
4
- export declare class ModalMixin extends Vue {
5
- get modalStackComponent(): ModalStackComponent | null;
6
- /**
7
- * Call one of the pop listeners of a parent or grandparent. E.g. to go back in a navigation controller.
8
- * @param options Options that should get applied to the pop of the first parent that listens for the pop event
9
- */
10
- pop(options?: PopOptions): void;
11
- /**
12
- * Return the first child of a parent that listens for the pop event
13
- */
14
- getPoppableParent(): any | null;
15
- }