@coolon/angular-ui-powerups 16.1.0-alpha.324 → 16.1.0-alpha.325

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.
@@ -8,6 +8,7 @@ export declare class ActivityRef<D, R, E> {
8
8
  private _complete;
9
9
  private _activity;
10
10
  private deferredResult;
11
+ private readonly destroyed;
11
12
  private readonly focusedModel;
12
13
  private readonly _activityBusy;
13
14
  constructor(activityClass: Constructable<Activity<D, R, E>>, activityData: D, onComplete: (activityRef: ActivityRef<D, R, E>) => void);
@@ -21,4 +22,12 @@ export declare class ActivityRef<D, R, E> {
21
22
  cancel(): void;
22
23
  get activityResult(): Promise<R>;
23
24
  get activityBusy(): import("@coolon/pectin").ValueModel<boolean>;
25
+ /**
26
+ * Resolves once the activity's component has been destroyed. The result settles first, and the
27
+ * component can stay on the page after it, as a slide-down's activity does while the slide-down
28
+ * closes. So the models an activity reads are disposed after this, not after the result.
29
+ */
30
+ get whenDestroyed(): Promise<void>;
31
+ /** The outlet calls this once it has destroyed the activity's component. */
32
+ notifyActivityDestroyed(): void;
24
33
  }
@@ -62,6 +62,12 @@ export declare class ActivityContainerComponent<D, R, E> extends AbstractInterac
62
62
  */
63
63
  isCleaningUp(): boolean;
64
64
  waitForInteractionContextCleanupToFinish(): Promise<any>;
65
+ /**
66
+ * Resolves once every activity the container holds has been destroyed, the finished ones included.
67
+ * An activity's result settles before its component leaves the page, so an owner disposes the
68
+ * models it gave the activity after this, not after the result.
69
+ */
70
+ whenClosed(): Promise<void>;
65
71
  /**
66
72
  * Register a one-shot callback invoked the moment the container has no active activity left
67
73
  * (the last activity completed via done()/cancel()). It fires BEFORE route synchronisation, so
@@ -51,6 +51,12 @@ export declare class SlideDownInteractionContextComponent<D, R, E> extends Dispo
51
51
  confirmThenExecute<R1>(confirm: Confirm, operation: (interactionContext: InteractionContext) => (Promise<R1> | R1)): Promise<R1>;
52
52
  isActive(): boolean;
53
53
  startActivity<D1, R1, E1>(activityType: Constructable<Activity<D1, R1, E1>>, data?: D1, options?: InteractionContext.Options): Promise<R1>;
54
+ /**
55
+ * Resolves once the slide-down's activities have left the page. An activity's result settles while
56
+ * it is still shown, as the slide-down closes, so models given to it are disposed after this:
57
+ * `try { await slideDown.startActivity(...) } finally { slideDown.whenClosed().then(() => garbage.dispose()) }`.
58
+ */
59
+ whenClosed(): Promise<void>;
54
60
  onAnimationDone(): void;
55
61
  static ɵfac: i0.ɵɵFactoryDeclaration<SlideDownInteractionContextComponent<any, any, any>, [{ optional: true; }]>;
56
62
  static ɵcmp: i0.ɵɵComponentDeclaration<SlideDownInteractionContextComponent<any, any, any>, "aup-slide-down-interaction-context", never, { "opensChoicesAs": { "alias": "opensChoicesAs"; "required": false; }; "dynamicHeight": { "alias": "dynamicHeight"; "required": false; }; }, {}, never, never, false, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolon/angular-ui-powerups",
3
- "version": "16.1.0-alpha.324",
3
+ "version": "16.1.0-alpha.325",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^16.2.9",
6
6
  "@angular/common": "^16.2.9",
@@ -12,7 +12,7 @@
12
12
  "@angular/platform-browser-dynamic": "^16.2.9",
13
13
  "@angular/material-moment-adapter": "^16.2.10",
14
14
  "@angular/router": "^16.2.9",
15
- "@coolon/pectin": "^5.0.0-alpha.147",
15
+ "@coolon/pectin": "^5.0.0-alpha.149",
16
16
  "fast-typescript-memoize": "^1.1.1",
17
17
  "lodash-es": "^4.17.21",
18
18
  "marked": "4.0.10",