@coolon/angular-ui-powerups 16.1.0-alpha.310 → 16.1.0-alpha.311
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/assets/activities/activities.scss +14 -4
- package/assets/interaction.scss +19 -0
- package/esm2022/lib/components/commands/button-renderer/button-renderer.component.mjs +20 -3
- package/esm2022/lib/components/commands/command/command.component.mjs +25 -3
- package/esm2022/lib/components/commands/group/popup-menu/more-menu.component.mjs +1 -1
- package/esm2022/lib/components/commands/group/popup-menu/popup-menu.component.mjs +1 -1
- package/esm2022/lib/components/forms/password-input/password-input.component.mjs +1 -1
- package/esm2022/lib/components/forms/string-input/string-input.component.mjs +1 -1
- package/esm2022/lib/components/forms/sub-form-list/sub-form-list.component.mjs +1 -1
- package/esm2022/lib/components/tables/filter/table-filter-model.mjs +18 -5
- package/esm2022/lib/components/tables/renderer/table-action-column/table-action-column.component.mjs +1 -1
- package/esm2022/lib/interaction/components/activity-actions/activity-actions.component.mjs +1 -1
- package/esm2022/lib/interaction/components/activity-body/activity-body.component.mjs +12 -2
- package/esm2022/lib/interaction/components/activity-container/activity-container.component.mjs +8 -4
- package/esm2022/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.mjs +1 -1
- package/esm2022/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.mjs +1 -1
- package/esm2022/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.mjs +1 -1
- package/esm2022/lib/interaction/components/add-card-activity/add-card-activity.component.mjs +1 -1
- package/esm2022/lib/interaction/components/alert-renderer/alert-renderer.component.mjs +1 -1
- package/esm2022/lib/interaction/components/confirm-renderer/confirm-renderer.component.mjs +1 -1
- package/esm2022/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.mjs +1 -1
- package/esm2022/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.mjs +4 -2
- package/esm2022/lib/interaction/exports.mjs +4 -1
- package/esm2022/lib/interaction/interaction.module.mjs +5 -1
- package/esm2022/lib/interaction/services/hosted-interaction-context.mjs +93 -0
- package/esm2022/lib/interaction/services/interaction.service.mjs +7 -4
- package/esm2022/lib/interaction/services/mat-bottom-sheet-interaction/bottom-sheet-interaction-context-factory.mjs +38 -0
- package/esm2022/lib/interaction/services/mat-bottom-sheet-interaction/bottom-sheet-interaction-context.mjs +39 -0
- package/esm2022/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.mjs +17 -86
- package/esm2022/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.mjs +22 -2
- package/esm2022/lib/place/place-router.mjs +5 -2
- package/fesm2022/coolon-angular-ui-powerups.mjs +255 -66
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/commands/button-renderer/button-renderer.component.d.ts +6 -1
- package/lib/components/commands/command/command.component.d.ts +14 -1
- package/lib/components/tables/filter/table-filter-model.d.ts +5 -0
- package/lib/interaction/components/activity-body/activity-body.component.d.ts +6 -1
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +6 -0
- package/lib/interaction/exports.d.ts +3 -0
- package/lib/interaction/interaction.module.d.ts +12 -11
- package/lib/interaction/services/hosted-interaction-context.d.ts +42 -0
- package/lib/interaction/services/interaction.service.d.ts +5 -2
- package/lib/interaction/services/mat-bottom-sheet-interaction/bottom-sheet-interaction-context-factory.d.ts +18 -0
- package/lib/interaction/services/mat-bottom-sheet-interaction/bottom-sheet-interaction-context.d.ts +14 -0
- package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.d.ts +4 -16
- package/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.d.ts +9 -0
- package/package.json +1 -1
|
@@ -19,6 +19,11 @@ export declare class ButtonRendererComponent extends PopupAwareComponent {
|
|
|
19
19
|
private readonly densityArea;
|
|
20
20
|
/** How much room the button takes (see {@link Density}): its own, else its area's. */
|
|
21
21
|
density?: Density;
|
|
22
|
+
/** Whether the button fills the renderer's box (see `CommandComponent.fill`). */
|
|
23
|
+
fill: boolean;
|
|
24
|
+
/** What the label does in a box narrower than it (see `CommandComponent.labelOverflow`). */
|
|
25
|
+
labelOverflow: 'visible' | 'ellipsis';
|
|
26
|
+
protected get ellipsis(): boolean;
|
|
22
27
|
get dense(): boolean;
|
|
23
28
|
get compact(): boolean;
|
|
24
29
|
private get resolvedDensity();
|
|
@@ -33,5 +38,5 @@ export declare class ButtonRendererComponent extends PopupAwareComponent {
|
|
|
33
38
|
get renderAsMenuItem(): boolean;
|
|
34
39
|
focus(): void;
|
|
35
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonRendererComponent, never>;
|
|
36
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonRendererComponent, "aup-button-renderer", never, { "faces$": { "alias": "faces$"; "required": false; }; "faces": { "alias": "faces"; "required": false; }; "enabled$": { "alias": "enabled$"; "required": false; }; "enabled": { "alias": "enabled"; "required": false; }; "busy$": { "alias": "busy$"; "required": false; }; "busy": { "alias": "busy"; "required": false; }; "alignFace": { "alias": "alignFace"; "required": false; }; "forceRenderAsButton": { "alias": "forceRenderAsButton"; "required": false; }; "density": { "alias": "density"; "required": false; }; }, {}, never, never, false, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonRendererComponent, "aup-button-renderer", never, { "faces$": { "alias": "faces$"; "required": false; }; "faces": { "alias": "faces"; "required": false; }; "enabled$": { "alias": "enabled$"; "required": false; }; "enabled": { "alias": "enabled"; "required": false; }; "busy$": { "alias": "busy$"; "required": false; }; "busy": { "alias": "busy"; "required": false; }; "alignFace": { "alias": "alignFace"; "required": false; }; "forceRenderAsButton": { "alias": "forceRenderAsButton"; "required": false; }; "density": { "alias": "density"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "labelOverflow": { "alias": "labelOverflow"; "required": false; }; }, {}, never, never, false, never>;
|
|
37
42
|
}
|
|
@@ -19,6 +19,16 @@ export declare class CommandComponent extends PopupAwareComponent {
|
|
|
19
19
|
alignFace: HorizontalAlignment;
|
|
20
20
|
/** How much room the button takes (see {@link Density}); unset, it follows its area's. */
|
|
21
21
|
density?: Density;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the button fills this command's box, which the page then sizes, with a square hover and focus layer. For a
|
|
24
|
+
* button that is a segment of a larger control, such as the × at the end of a filter. An icon button fills the whole
|
|
25
|
+
* box; a text button fills its width and keeps its own height. With `alignFace` start or end, the face sits at that
|
|
26
|
+
* end of the box.
|
|
27
|
+
*/
|
|
28
|
+
fill: boolean;
|
|
29
|
+
/** What the label does in a box narrower than it: 'ellipsis' lets the button shrink and cuts the label short with "…". */
|
|
30
|
+
labelOverflow: CommandComponent.LabelOverflow;
|
|
31
|
+
protected get ellipsis(): boolean;
|
|
22
32
|
protected button: ButtonRendererComponent;
|
|
23
33
|
readonly faces$: ListModelChain<CommandFace>;
|
|
24
34
|
readonly buttonStyle$: ValueModelChain<string>;
|
|
@@ -33,5 +43,8 @@ export declare class CommandComponent extends PopupAwareComponent {
|
|
|
33
43
|
isActive(face: CommandFace): boolean;
|
|
34
44
|
requestFocus(): void;
|
|
35
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommandComponent, never>;
|
|
36
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CommandComponent, "aup-command", never, { "command": { "alias": "command"; "required": false; }; "face$": { "alias": "face$"; "required": false; }; "face": { "alias": "face"; "required": false; }; "busyFace$": { "alias": "busyFace$"; "required": false; }; "busyFace": { "alias": "busyFace"; "required": false; }; "alignFace": { "alias": "alignFace"; "required": false; }; "density": { "alias": "density"; "required": false; }; }, {}, never, never, false, never>;
|
|
46
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CommandComponent, "aup-command", never, { "command": { "alias": "command"; "required": false; }; "face$": { "alias": "face$"; "required": false; }; "face": { "alias": "face"; "required": false; }; "busyFace$": { "alias": "busyFace$"; "required": false; }; "busyFace": { "alias": "busyFace"; "required": false; }; "alignFace": { "alias": "alignFace"; "required": false; }; "density": { "alias": "density"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "labelOverflow": { "alias": "labelOverflow"; "required": false; }; }, {}, never, never, false, never>;
|
|
47
|
+
}
|
|
48
|
+
export declare namespace CommandComponent {
|
|
49
|
+
type LabelOverflow = 'visible' | 'ellipsis';
|
|
37
50
|
}
|
|
@@ -8,6 +8,11 @@ export declare class TableFilterModel<Row> extends GarbageCollector {
|
|
|
8
8
|
private readonly _rowPredicate;
|
|
9
9
|
private readonly inUpdate;
|
|
10
10
|
readonly filteredRows$: ListModel<Row>;
|
|
11
|
+
/**
|
|
12
|
+
* The rows the search alone leaves in, before the row predicate. A filter bar counts its choices against these, so
|
|
13
|
+
* that a count agrees with what the table would show once the choice is made.
|
|
14
|
+
*/
|
|
15
|
+
readonly searchedRows$: ListModel<Row>;
|
|
11
16
|
constructor(options: TableFilterModel.Configuration<Row>);
|
|
12
17
|
get highlightText$(): ValueModel<string>;
|
|
13
18
|
useSearchText(searchText$: ValueModel<string>): void;
|
|
@@ -3,6 +3,11 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
export declare class ActivityBodyComponent extends DisposableComponent {
|
|
4
4
|
fullWidth: boolean;
|
|
5
5
|
fullHeight: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Whether the body scrolls inside the height its activity leaves it, with the title and the actions kept in place. The
|
|
8
|
+
* activity must lay out as a column and bound its own height.
|
|
9
|
+
*/
|
|
10
|
+
scroll: boolean;
|
|
6
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<ActivityBodyComponent, never>;
|
|
7
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ActivityBodyComponent, "aup-activity-body", never, { "fullWidth": { "alias": "fullWidth"; "required": false; }; "fullHeight": { "alias": "fullHeight"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ActivityBodyComponent, "aup-activity-body", never, { "fullWidth": { "alias": "fullWidth"; "required": false; }; "fullHeight": { "alias": "fullHeight"; "required": false; }; "scroll": { "alias": "scroll"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
8
13
|
}
|
|
@@ -80,6 +80,12 @@ export declare class ActivityContainerComponent<D, R, E> extends AbstractInterac
|
|
|
80
80
|
private blurFocusWithinContainer;
|
|
81
81
|
finaliseActivityStates(): void;
|
|
82
82
|
private getSelectedOutlet;
|
|
83
|
+
/**
|
|
84
|
+
* The first activity appears in place, and only a nested one slides in. The tab group has already
|
|
85
|
+
* rendered, empty, by the time the first activity's tab arrives, so Material treats that tab as
|
|
86
|
+
* moving from a selected one and would slide it in from the side; the surface opening around it
|
|
87
|
+
* is the only entrance it needs.
|
|
88
|
+
*/
|
|
83
89
|
protected getTabAnimationDuration(): string;
|
|
84
90
|
protected getTabAnimationDurationInMillis(): number;
|
|
85
91
|
getSelectedTabIndex(): number;
|
|
@@ -47,3 +47,6 @@ export * from "./services/interaction.service";
|
|
|
47
47
|
export * from "./services/modal-interaction-context.factory";
|
|
48
48
|
export * from "./services/mat-dialog-interaction/dialog-interaction-context-factory";
|
|
49
49
|
export * from "./services/mat-dialog-interaction/dialog-interaction-context";
|
|
50
|
+
export * from "./services/hosted-interaction-context";
|
|
51
|
+
export * from "./services/mat-bottom-sheet-interaction/bottom-sheet-interaction-context-factory";
|
|
52
|
+
export * from "./services/mat-bottom-sheet-interaction/bottom-sheet-interaction-context";
|
|
@@ -30,18 +30,19 @@ import * as i28 from "./components/alert-renderer/alert-renderer.component";
|
|
|
30
30
|
import * as i29 from "@angular/common";
|
|
31
31
|
import * as i30 from "@angular/material/button";
|
|
32
32
|
import * as i31 from "@angular/material/dialog";
|
|
33
|
-
import * as i32 from "@angular/material/
|
|
34
|
-
import * as i33 from "@angular/
|
|
35
|
-
import * as i34 from "@angular/
|
|
36
|
-
import * as i35 from "@angular/
|
|
37
|
-
import * as i36 from "
|
|
38
|
-
import * as i37 from "../
|
|
39
|
-
import * as i38 from "
|
|
40
|
-
import * as i39 from "@angular/
|
|
41
|
-
import * as i40 from "@angular/material/
|
|
42
|
-
import * as i41 from "@angular/
|
|
33
|
+
import * as i32 from "@angular/material/bottom-sheet";
|
|
34
|
+
import * as i33 from "@angular/material/tabs";
|
|
35
|
+
import * as i34 from "@angular/cdk/portal";
|
|
36
|
+
import * as i35 from "@angular/router";
|
|
37
|
+
import * as i36 from "@angular/material/icon";
|
|
38
|
+
import * as i37 from "../directives/directives.module";
|
|
39
|
+
import * as i38 from "../components/components.module";
|
|
40
|
+
import * as i39 from "@angular/forms";
|
|
41
|
+
import * as i40 from "@angular/material/input";
|
|
42
|
+
import * as i41 from "@angular/material/form-field";
|
|
43
|
+
import * as i42 from "@angular/cdk/a11y";
|
|
43
44
|
export declare class InteractionModule {
|
|
44
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<InteractionModule, never>;
|
|
45
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<InteractionModule, [typeof i1.ActivityContainerComponent, typeof i2.ConfirmationDialogComponent, typeof i3.ConfirmThenDialogComponent, typeof i4.ConfirmThenExecuteDialogComponent, typeof i5.AlertDialogComponent, typeof i6.ActivityOutletComponent, typeof i7.InPlaceInteractionContextComponent, typeof i8.SlideDownInteractionContextComponent, typeof i9.AddItemInteractionContextComponent, typeof i10.ActivityActionsComponent, typeof i11.PopupInteractionContextComponent, typeof i12.StringInputActivity, typeof i13.SelectInputActivity, typeof i14.InputActivity, typeof i15.InteractionContextTriggerForDirective, typeof i16.Activity, typeof i17.ActivityTitleComponent, typeof i18.ActivityBodyComponent, typeof i10.ActivityActionsComponent, typeof i19.AbstractActivityTriggerComponent, typeof i20.PopupActivityTriggerComponent, typeof i21.InlineActivityTriggerComponent, typeof i22.ModalActivityTriggerComponent, typeof i23.AddCardActivityComponent, typeof i24.InlineStringEditorComponent, typeof i25.AbstractDialogComponent, typeof i26.AbstractConfirmDialogComponent, typeof i27.ConfirmRendererComponent, typeof i28.AlertRendererComponent], [typeof i29.CommonModule, typeof i30.MatButtonModule, typeof i31.MatDialogModule, typeof i32.
|
|
46
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<InteractionModule, [typeof i1.ActivityContainerComponent, typeof i2.ConfirmationDialogComponent, typeof i3.ConfirmThenDialogComponent, typeof i4.ConfirmThenExecuteDialogComponent, typeof i5.AlertDialogComponent, typeof i6.ActivityOutletComponent, typeof i7.InPlaceInteractionContextComponent, typeof i8.SlideDownInteractionContextComponent, typeof i9.AddItemInteractionContextComponent, typeof i10.ActivityActionsComponent, typeof i11.PopupInteractionContextComponent, typeof i12.StringInputActivity, typeof i13.SelectInputActivity, typeof i14.InputActivity, typeof i15.InteractionContextTriggerForDirective, typeof i16.Activity, typeof i17.ActivityTitleComponent, typeof i18.ActivityBodyComponent, typeof i10.ActivityActionsComponent, typeof i19.AbstractActivityTriggerComponent, typeof i20.PopupActivityTriggerComponent, typeof i21.InlineActivityTriggerComponent, typeof i22.ModalActivityTriggerComponent, typeof i23.AddCardActivityComponent, typeof i24.InlineStringEditorComponent, typeof i25.AbstractDialogComponent, typeof i26.AbstractConfirmDialogComponent, typeof i27.ConfirmRendererComponent, typeof i28.AlertRendererComponent], [typeof i29.CommonModule, typeof i30.MatButtonModule, typeof i31.MatDialogModule, typeof i32.MatBottomSheetModule, typeof i33.MatTabsModule, typeof i34.PortalModule, typeof i35.RouterModule, typeof i36.MatIconModule, typeof i37.DirectivesModule, typeof i38.ComponentsModule, typeof i39.FormsModule, typeof i40.MatInputModule, typeof i41.MatFormFieldModule, typeof i42.A11yModule], [typeof i1.ActivityContainerComponent, typeof i6.ActivityOutletComponent, typeof i17.ActivityTitleComponent, typeof i7.InPlaceInteractionContextComponent, typeof i9.AddItemInteractionContextComponent, typeof i10.ActivityActionsComponent, typeof i11.PopupInteractionContextComponent, typeof i15.InteractionContextTriggerForDirective, typeof i12.StringInputActivity, typeof i13.SelectInputActivity, typeof i18.ActivityBodyComponent, typeof i20.PopupActivityTriggerComponent, typeof i21.InlineActivityTriggerComponent, typeof i22.ModalActivityTriggerComponent, typeof i23.AddCardActivityComponent, typeof i24.InlineStringEditorComponent, typeof i8.SlideDownInteractionContextComponent, typeof i27.ConfirmRendererComponent, typeof i28.AlertRendererComponent]>;
|
|
46
47
|
static ɵinj: i0.ɵɵInjectorDeclaration<InteractionModule>;
|
|
47
48
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Constructable, Disposable } from '@coolon/pectin';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { AbstractInteractionContext } from '../abstract-interaction-context';
|
|
4
|
+
import type { Activity } from '../activity';
|
|
5
|
+
import type { ActivityContainerComponent } from '../components/activity-container/activity-container.component';
|
|
6
|
+
import type { InteractionContext } from '../interaction-context';
|
|
7
|
+
import type { InteractionService } from './interaction.service';
|
|
8
|
+
/**
|
|
9
|
+
* A modal surface that hosts one activity container, such as a dialog or a sheet: what a
|
|
10
|
+
* {@link HostedInteractionContext} needs to run an activity in it and close it afterwards.
|
|
11
|
+
*/
|
|
12
|
+
export interface ActivityHost {
|
|
13
|
+
readonly activityContainer: ActivityContainerComponent<unknown, unknown, unknown>;
|
|
14
|
+
close(): void;
|
|
15
|
+
afterOpened(): Observable<unknown>;
|
|
16
|
+
afterClosed(): Observable<unknown>;
|
|
17
|
+
backdropClick(): Observable<MouseEvent>;
|
|
18
|
+
keydownEvents(): Observable<KeyboardEvent>;
|
|
19
|
+
/** Fits the surface to its content again, where the surface needs telling. */
|
|
20
|
+
updateSize(): void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Runs each activity in a modal surface of its own, opened for it and closed when it finishes. Escape
|
|
24
|
+
* cancels the activity, and so does a click on the backdrop where the activity allows it. Activities
|
|
25
|
+
* started from inside it stack in the same surface, as its container's own tabs. A subclass decides
|
|
26
|
+
* which surface: a dialog, or a sheet from the foot of the screen.
|
|
27
|
+
*/
|
|
28
|
+
export declare abstract class HostedInteractionContext extends AbstractInteractionContext {
|
|
29
|
+
readonly identifier: string;
|
|
30
|
+
private readonly api;
|
|
31
|
+
private garbage;
|
|
32
|
+
private activityContainer;
|
|
33
|
+
protected constructor(identifier: string, api: InteractionService.Api);
|
|
34
|
+
/** Opens a new surface holding an activity container, not yet started. */
|
|
35
|
+
protected abstract openHost(): ActivityHost;
|
|
36
|
+
cancelActiveActivity(): Promise<boolean>;
|
|
37
|
+
dispose(): void;
|
|
38
|
+
registerDisposable<T extends Disposable>(disposable: T): T;
|
|
39
|
+
isActive(): boolean;
|
|
40
|
+
protected createAndLaunchActivity<D, R, E>(activityType: Constructable<Activity<D, R, E>>, data: D, options?: InteractionContext.Options): Promise<R>;
|
|
41
|
+
private canClose;
|
|
42
|
+
}
|
|
@@ -26,10 +26,13 @@ export declare class InteractionService {
|
|
|
26
26
|
*/
|
|
27
27
|
createModalInteractionContextFor(disposable: Disposable.Collector): InteractionContext;
|
|
28
28
|
/**
|
|
29
|
-
* Creates a new model interaction context that will be disposed along with the component.
|
|
29
|
+
* Creates a new model interaction context that will be disposed along with the component. Its activities
|
|
30
|
+
* open where `factory` puts them, a dialog unless the app provides otherwise; pass one, such as
|
|
31
|
+
* `BottomSheetInteractionContextFactory`, for this context alone to use another surface.
|
|
30
32
|
* @param disposable
|
|
33
|
+
* @param factory
|
|
31
34
|
*/
|
|
32
|
-
createModalInteractionContextDisposedWith(disposable: Disposable.Collector): InteractionContext;
|
|
35
|
+
createModalInteractionContextDisposedWith(disposable: Disposable.Collector, factory?: ModalInteractionContextFactory): InteractionContext;
|
|
33
36
|
registerInplaceInteractionContext(interactionContext: InPlaceInteractionContext): void;
|
|
34
37
|
/**
|
|
35
38
|
* Creates an interaction context that will prevent any other contexts from starting an
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MatBottomSheet } from '@angular/material/bottom-sheet';
|
|
2
|
+
import type { InteractionContext } from '../../interaction-context';
|
|
3
|
+
import type { InteractionService } from '../interaction.service';
|
|
4
|
+
import { ModalInteractionContextFactory } from '../modal-interaction-context.factory';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* Creates contexts that run their activities in a sheet from the foot of the screen. Pass it to
|
|
8
|
+
* `InteractionService.createModalInteractionContextDisposedWith` for a context that uses sheets while
|
|
9
|
+
* the app's own modal contexts stay dialogs, or provide it as the `ModalInteractionContextFactory` for
|
|
10
|
+
* every modal context to use them.
|
|
11
|
+
*/
|
|
12
|
+
export declare class BottomSheetInteractionContextFactory extends ModalInteractionContextFactory {
|
|
13
|
+
private readonly bottomSheet;
|
|
14
|
+
constructor(bottomSheet: MatBottomSheet);
|
|
15
|
+
createInteractionContext(identifier: string, api: InteractionService.Api): InteractionContext;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BottomSheetInteractionContextFactory, never>;
|
|
17
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BottomSheetInteractionContextFactory>;
|
|
18
|
+
}
|
package/lib/interaction/services/mat-bottom-sheet-interaction/bottom-sheet-interaction-context.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MatBottomSheet, MatBottomSheetConfig } from '@angular/material/bottom-sheet';
|
|
2
|
+
import { ActivityHost, HostedInteractionContext } from '../hosted-interaction-context';
|
|
3
|
+
import type { InteractionService } from '../interaction.service';
|
|
4
|
+
/**
|
|
5
|
+
* Runs each activity in a sheet that rises from the foot of the screen, as a phone shows a choice. The
|
|
6
|
+
* sheet is as tall as its activity, up to most of the screen. An activity started from inside one
|
|
7
|
+
* slides in over it in the same sheet, and its own Back returns to the one before.
|
|
8
|
+
*/
|
|
9
|
+
export declare class BottomSheetInteractionContext extends HostedInteractionContext {
|
|
10
|
+
private readonly bottomSheet;
|
|
11
|
+
readonly config: MatBottomSheetConfig;
|
|
12
|
+
constructor(identifier: string, api: InteractionService.Api, bottomSheet: MatBottomSheet, config: MatBottomSheetConfig);
|
|
13
|
+
protected openHost(): ActivityHost;
|
|
14
|
+
}
|
|
@@ -1,22 +1,10 @@
|
|
|
1
1
|
import { MatDialog, MatDialogConfig } from '@angular/material/dialog';
|
|
2
|
-
import {
|
|
3
|
-
import { AbstractInteractionContext } from '../../abstract-interaction-context';
|
|
4
|
-
import type { Activity } from '../../activity';
|
|
5
|
-
import type { InteractionContext } from '../../interaction-context';
|
|
2
|
+
import { ActivityHost, HostedInteractionContext } from '../hosted-interaction-context';
|
|
6
3
|
import type { InteractionService } from '../interaction.service';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
private readonly api;
|
|
4
|
+
/** Runs each activity in a dialog of its own, centred over the page. */
|
|
5
|
+
export declare class DialogInteractionContext extends HostedInteractionContext {
|
|
10
6
|
private readonly dialogService;
|
|
11
7
|
readonly config: MatDialogConfig;
|
|
12
|
-
private garbage;
|
|
13
|
-
private _currentActivityRef;
|
|
14
|
-
private activityContainer;
|
|
15
8
|
constructor(identifier: string, api: InteractionService.Api, dialogService: MatDialog, config: MatDialogConfig);
|
|
16
|
-
|
|
17
|
-
dispose(): void;
|
|
18
|
-
registerDisposable<T extends Disposable>(disposable: T): T;
|
|
19
|
-
isActive(): boolean;
|
|
20
|
-
protected createAndLaunchActivity<D, R, E>(activityType: Constructable<Activity<D, R, E>>, data: D, options?: InteractionContext.Options): Promise<R>;
|
|
21
|
-
private canClose;
|
|
9
|
+
protected openHost(): ActivityHost;
|
|
22
10
|
}
|
|
@@ -24,6 +24,7 @@ export declare class RemoveLastInteractionFromUrlNavigationSession extends Navig
|
|
|
24
24
|
private finished;
|
|
25
25
|
private gotPopState;
|
|
26
26
|
private selfHealing;
|
|
27
|
+
private restoringPlaceParameters;
|
|
27
28
|
constructor(context: NavigationContext, startingUrl: string, interactionFreeUrl: UrlSnapshot);
|
|
28
29
|
get isInteractionSync(): boolean;
|
|
29
30
|
notifyActive(): void;
|
|
@@ -32,7 +33,15 @@ export declare class RemoveLastInteractionFromUrlNavigationSession extends Navig
|
|
|
32
33
|
onRouterCancelled(event: NavigationCancel): void;
|
|
33
34
|
private selfHealIfBackWasDropped;
|
|
34
35
|
private finishUp;
|
|
36
|
+
/**
|
|
37
|
+
* The pop lands on the history entry from before the interaction opened, so it also takes back any place parameter
|
|
38
|
+
* changed while the interaction was open. A filter chosen in a sheet is one: the place wrote it into the
|
|
39
|
+
* interaction's entry, and the pop restores the filter the page had before. When the popped url differs from the
|
|
40
|
+
* interaction-free url, the latter is pushed after it, through the router so that its state follows. A change made
|
|
41
|
+
* outside an interaction pushes an entry too (PlaceRouter.notifyVisitSegmentChanged), so Back undoes either.
|
|
42
|
+
*/
|
|
35
43
|
onRouterEnd(event: NavigationEnd): void;
|
|
44
|
+
private poppedUrlLostPlaceParameters;
|
|
36
45
|
handleCanDeactivateCancelledEventScenario(locationTriggerUrl: string): void;
|
|
37
46
|
get finishedPromise(): Promise<boolean>;
|
|
38
47
|
}
|