@villedemontreal/angular-ui 14.0.1 → 14.2.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/esm2020/lib/alert/alert.component.mjs +2 -2
- package/esm2020/lib/alert/index.mjs +3 -3
- package/esm2020/lib/alert/module.mjs +2 -2
- package/esm2020/lib/avatar/avatar.component.mjs +2 -2
- package/esm2020/lib/avatar/index.mjs +2 -2
- package/esm2020/lib/avatar/module.mjs +2 -2
- package/esm2020/lib/badge/badge.component.mjs +2 -2
- package/esm2020/lib/badge/index.mjs +2 -2
- package/esm2020/lib/badge/module.mjs +2 -2
- package/esm2020/lib/bao.module.mjs +23 -11
- package/esm2020/lib/breadcrumb/breadcrumb.component.mjs +2 -2
- package/esm2020/lib/breadcrumb/index.mjs +2 -2
- package/esm2020/lib/breadcrumb/module.mjs +2 -2
- package/esm2020/lib/button/button.component.mjs +3 -3
- package/esm2020/lib/button/index.mjs +2 -2
- package/esm2020/lib/button/module.mjs +2 -2
- package/esm2020/lib/card/card.component.mjs +2 -2
- package/esm2020/lib/card/index.mjs +2 -2
- package/esm2020/lib/card/module.mjs +2 -2
- package/esm2020/lib/checkbox/checkbox-group.component.mjs +2 -2
- package/esm2020/lib/checkbox/checkbox.component.mjs +1 -1
- package/esm2020/lib/checkbox/index.mjs +2 -2
- package/esm2020/lib/checkbox/module.mjs +2 -2
- package/esm2020/lib/common-components/error-text/errorText.component.mjs +2 -2
- package/esm2020/lib/common-components/guiding-text/guidingText.component.mjs +2 -2
- package/esm2020/lib/common-components/index.mjs +2 -2
- package/esm2020/lib/common-components/label-text/labelText.component.mjs +4 -4
- package/esm2020/lib/common-components/module.mjs +6 -3
- package/esm2020/lib/common-components/title-text/titleText.component.mjs +2 -2
- package/esm2020/lib/core/breakpoints.mjs +13 -0
- package/esm2020/lib/core/colors.mjs +1 -1
- package/esm2020/lib/core/index.mjs +8 -0
- package/esm2020/lib/dropdown-menu/dropdown-menu.component.mjs +38 -8
- package/esm2020/lib/dropdown-menu/index.mjs +2 -2
- package/esm2020/lib/dropdown-menu/module.mjs +2 -2
- package/esm2020/lib/file/file-input.component.mjs +319 -0
- package/esm2020/lib/file/file-intl.mjs +65 -0
- package/esm2020/lib/file/file-preview.component.mjs +86 -0
- package/esm2020/lib/file/index.mjs +10 -0
- package/esm2020/lib/file/module.mjs +56 -0
- package/esm2020/lib/header-info/header-info.component.mjs +2 -2
- package/esm2020/lib/header-info/index.mjs +2 -2
- package/esm2020/lib/header-info/module.mjs +2 -2
- package/esm2020/lib/hyperlink/hyperlink.component.mjs +2 -2
- package/esm2020/lib/hyperlink/index.mjs +2 -2
- package/esm2020/lib/hyperlink/module.mjs +2 -2
- package/esm2020/lib/icon/bao-icon-registry.mjs +2 -2
- package/esm2020/lib/icon/icon.component.mjs +2 -2
- package/esm2020/lib/icon/icons-dictionary.mjs +3 -2
- package/esm2020/lib/icon/index.mjs +2 -2
- package/esm2020/lib/icon/module.mjs +2 -2
- package/esm2020/lib/list/index.mjs +2 -2
- package/esm2020/lib/list/list.component.mjs +2 -2
- package/esm2020/lib/list/module.mjs +2 -2
- package/esm2020/lib/modal/index.mjs +2 -2
- package/esm2020/lib/modal/modal-config.mjs +2 -2
- package/esm2020/lib/modal/modal-container.mjs +18 -32
- package/esm2020/lib/modal/modal-directives.mjs +2 -2
- package/esm2020/lib/modal/modal-ref.mjs +4 -1
- package/esm2020/lib/modal/modal.mjs +11 -32
- package/esm2020/lib/modal/module.mjs +5 -20
- package/esm2020/lib/radio/index.mjs +2 -2
- package/esm2020/lib/radio/module.mjs +2 -2
- package/esm2020/lib/radio/radio-group.component.mjs +2 -2
- package/esm2020/lib/radio/radio.component.mjs +1 -1
- package/esm2020/lib/shared/enum/display-mode.mjs +1 -1
- package/esm2020/lib/shared/index.mjs +2 -2
- package/esm2020/lib/snack-bar/index.mjs +12 -0
- package/esm2020/lib/snack-bar/module.mjs +51 -0
- package/esm2020/lib/snack-bar/simple-snack-bar.component.mjs +92 -0
- package/esm2020/lib/snack-bar/snack-bar-animations.mjs +28 -0
- package/esm2020/lib/snack-bar/snack-bar-config.mjs +44 -0
- package/esm2020/lib/snack-bar/snack-bar-container.mjs +273 -0
- package/esm2020/lib/snack-bar/snack-bar-ref.mjs +75 -0
- package/esm2020/lib/snack-bar/snack-bar.mjs +251 -0
- package/esm2020/lib/summary/index.mjs +2 -2
- package/esm2020/lib/summary/list-summary.component.mjs +2 -2
- package/esm2020/lib/summary/module.mjs +2 -2
- package/esm2020/lib/summary/summary.component.mjs +2 -2
- package/esm2020/lib/system-header/index.mjs +8 -0
- package/esm2020/lib/system-header/module.mjs +33 -0
- package/esm2020/lib/system-header/system-header.component.mjs +128 -0
- package/esm2020/lib/tabs/index.mjs +2 -2
- package/esm2020/lib/tabs/module.mjs +2 -2
- package/esm2020/lib/tabs/tabs.component.mjs +2 -2
- package/esm2020/lib/tag/index.mjs +2 -2
- package/esm2020/lib/tag/module.mjs +2 -2
- package/esm2020/lib/tag/tag.component.mjs +2 -2
- package/esm2020/public-api.mjs +5 -2
- package/fesm2015/villedemontreal-angular-ui.mjs +1745 -314
- package/fesm2015/villedemontreal-angular-ui.mjs.map +1 -1
- package/fesm2020/villedemontreal-angular-ui.mjs +1743 -314
- package/fesm2020/villedemontreal-angular-ui.mjs.map +1 -1
- package/lib/alert/index.d.ts +1 -1
- package/lib/bao.module.d.ts +14 -11
- package/lib/button/button.component.d.ts +3 -3
- package/lib/core/breakpoints.d.ts +7 -0
- package/lib/core/index.d.ts +2 -0
- package/lib/dropdown-menu/dropdown-menu.component.d.ts +10 -4
- package/lib/file/file-input.component.d.ts +123 -0
- package/lib/file/file-intl.d.ts +44 -0
- package/lib/file/file-preview.component.d.ts +29 -0
- package/lib/file/index.d.ts +4 -0
- package/lib/file/module.d.ts +13 -0
- package/lib/modal/modal-container.d.ts +4 -5
- package/lib/modal/modal-ref.d.ts +1 -0
- package/lib/modal/modal.d.ts +3 -4
- package/lib/modal/module.d.ts +1 -2
- package/lib/snack-bar/index.d.ts +6 -0
- package/lib/snack-bar/module.d.ts +13 -0
- package/lib/snack-bar/simple-snack-bar.component.d.ts +51 -0
- package/lib/snack-bar/snack-bar-animations.d.ts +8 -0
- package/lib/snack-bar/snack-bar-config.d.ts +55 -0
- package/lib/snack-bar/snack-bar-container.d.ts +111 -0
- package/lib/snack-bar/snack-bar-ref.d.ts +51 -0
- package/lib/snack-bar/snack-bar.d.ts +89 -0
- package/lib/system-header/index.d.ts +2 -0
- package/lib/system-header/module.d.ts +9 -0
- package/lib/system-header/system-header.component.d.ts +41 -0
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
- package/esm2020/lib/modal/modal-animations.mjs +0 -29
- package/lib/modal/modal-animations.d.ts +0 -8
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { AnimationEvent } from '@angular/animations';
|
|
2
|
+
import { AriaLivePoliteness } from '@angular/cdk/a11y';
|
|
3
|
+
import { Platform } from '@angular/cdk/platform';
|
|
4
|
+
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, DomPortal, TemplatePortal } from '@angular/cdk/portal';
|
|
5
|
+
import { ChangeDetectorRef, ComponentRef, ElementRef, EmbeddedViewRef, NgZone, OnDestroy } from '@angular/core';
|
|
6
|
+
import { Observable, Subject } from 'rxjs';
|
|
7
|
+
import { BaoSnackBarConfig } from './snack-bar-config';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
/**
|
|
10
|
+
* Internal interface for a snack bar container.
|
|
11
|
+
* @docs-private
|
|
12
|
+
*/
|
|
13
|
+
export interface IBaoSnackBarContainer {
|
|
14
|
+
snackBarConfig: BaoSnackBarConfig;
|
|
15
|
+
_onAnnounce: Subject<any>;
|
|
16
|
+
_onExit: Subject<any>;
|
|
17
|
+
_onEnter: Subject<any>;
|
|
18
|
+
enter: () => void;
|
|
19
|
+
exit: () => Observable<void>;
|
|
20
|
+
attachTemplatePortal: <C>(portal: TemplatePortal<C>) => EmbeddedViewRef<C>;
|
|
21
|
+
attachComponentPortal: <T>(portal: ComponentPortal<T>) => ComponentRef<T>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Internal component that wraps user-provided snack bar content.
|
|
25
|
+
* @docs-private
|
|
26
|
+
*/
|
|
27
|
+
export declare class BaoSnackBarContainerComponent extends BasePortalOutlet implements OnDestroy, IBaoSnackBarContainer {
|
|
28
|
+
private _ngZone;
|
|
29
|
+
private _elementRef;
|
|
30
|
+
private _changeDetectorRef;
|
|
31
|
+
private _platform;
|
|
32
|
+
/** The snack bar configuration. */
|
|
33
|
+
snackBarConfig: BaoSnackBarConfig;
|
|
34
|
+
/** The portal outlet inside of this container into which the snack bar content will be loaded. */
|
|
35
|
+
_portalOutlet: CdkPortalOutlet;
|
|
36
|
+
private _document;
|
|
37
|
+
private _trackedModals;
|
|
38
|
+
/** Subject for notifying that the snack bar has announced to screen readers. */
|
|
39
|
+
readonly _onAnnounce: Subject<void>;
|
|
40
|
+
/** Subject for notifying that the snack bar has exited from view. */
|
|
41
|
+
readonly _onExit: Subject<void>;
|
|
42
|
+
/** Subject for notifying that the snack bar has finished entering the view. */
|
|
43
|
+
readonly _onEnter: Subject<void>;
|
|
44
|
+
/** The state of the snack bar animations. */
|
|
45
|
+
_animationState: string;
|
|
46
|
+
/** aria-live value for the live region. */
|
|
47
|
+
_live: AriaLivePoliteness;
|
|
48
|
+
/** The number of milliseconds to wait before announcing the snack bar's content. */
|
|
49
|
+
private readonly _announceDelay;
|
|
50
|
+
/** The timeout for announcing the snack bar's content. */
|
|
51
|
+
private _announceTimeoutId;
|
|
52
|
+
/** Whether the component has been destroyed. */
|
|
53
|
+
private _destroyed;
|
|
54
|
+
/**
|
|
55
|
+
* Role of the live region. This is only for Firefox as there is a known issue where Firefox +
|
|
56
|
+
* JAWS does not read out aria-live message.
|
|
57
|
+
*/
|
|
58
|
+
_role?: 'status' | 'alert';
|
|
59
|
+
/** Unique ID of the aria-live element. */
|
|
60
|
+
readonly _liveElementId: string;
|
|
61
|
+
constructor(_ngZone: NgZone, _elementRef: ElementRef<HTMLElement>, _changeDetectorRef: ChangeDetectorRef, _platform: Platform,
|
|
62
|
+
/** The snack bar configuration. */
|
|
63
|
+
snackBarConfig: BaoSnackBarConfig);
|
|
64
|
+
/** Attach a component portal as content to this snack bar container. */
|
|
65
|
+
attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
|
|
66
|
+
/** Attach a template portal as content to this snack bar container. */
|
|
67
|
+
attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;
|
|
68
|
+
/**
|
|
69
|
+
* Attaches a DOM portal to the snack bar container.
|
|
70
|
+
* @deprecated To be turned into a method.
|
|
71
|
+
* @breaking-change 10.0.0
|
|
72
|
+
*/
|
|
73
|
+
attachDomPortal: (portal: DomPortal) => void;
|
|
74
|
+
/** Handle end of animations, updating the state of the snackbar. */
|
|
75
|
+
onAnimationEnd(event: AnimationEvent): void;
|
|
76
|
+
/** Begin animation of snack bar entrance into view. */
|
|
77
|
+
enter(): void;
|
|
78
|
+
/** Begin animation of the snack bar exiting from view. */
|
|
79
|
+
exit(): Observable<void>;
|
|
80
|
+
/** Makes sure the exit callbacks have been invoked when the element is destroyed. */
|
|
81
|
+
ngOnDestroy(): void;
|
|
82
|
+
/**
|
|
83
|
+
* Waits for the zone to settle before removing the element. Helps prevent
|
|
84
|
+
* errors where we end up removing an element which is in the middle of an animation.
|
|
85
|
+
*/
|
|
86
|
+
private completeExit;
|
|
87
|
+
/** Applies the various positioning and user-configured CSS classes to the snack bar. */
|
|
88
|
+
private applySnackBarClasses;
|
|
89
|
+
/**
|
|
90
|
+
* Called after the portal contents have been attached. Can be
|
|
91
|
+
* used to modify the DOM once it's guaranteed to be in place.
|
|
92
|
+
*/
|
|
93
|
+
protected _afterPortalAttached(): void;
|
|
94
|
+
/**
|
|
95
|
+
* Some browsers won't expose the accessibility node of the live element if there is an
|
|
96
|
+
* `aria-modal` and the live element is outside of it. This method works around the issue by
|
|
97
|
+
* pointing the `aria-owns` of all modals to the live element.
|
|
98
|
+
*/
|
|
99
|
+
private _exposeToModals;
|
|
100
|
+
/** Clears the references to the live element from any modals it was added to. */
|
|
101
|
+
private _clearFromModals;
|
|
102
|
+
/** Asserts that no content is already attached to the container. */
|
|
103
|
+
private assertNotAttached;
|
|
104
|
+
/**
|
|
105
|
+
* Starts a timeout to move the snack bar content to the live region so screen readers will
|
|
106
|
+
* announce it.
|
|
107
|
+
*/
|
|
108
|
+
private screenReaderAnnounce;
|
|
109
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaoSnackBarContainerComponent, never>;
|
|
110
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaoSnackBarContainerComponent, "bao-snack-bar-container", never, {}, {}, never, never, false>;
|
|
111
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { OverlayRef } from '@angular/cdk/overlay';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { IBaoSnackBarContainer } from './snack-bar-container';
|
|
4
|
+
/** Event that is emitted when a snack bar is dismissed. */
|
|
5
|
+
export interface IBaoSnackBarDismiss {
|
|
6
|
+
/** Whether the snack bar was dismissed using the action button. */
|
|
7
|
+
dismissedByAction: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Reference to a snack bar dispatched from the snack bar service.
|
|
11
|
+
*/
|
|
12
|
+
export declare class BaoSnackBarRef<T> {
|
|
13
|
+
private _overlayRef;
|
|
14
|
+
/** The instance of the component making up the content of the snack bar. */
|
|
15
|
+
instance: T;
|
|
16
|
+
/**
|
|
17
|
+
* The instance of the component making up the content of the snack bar.
|
|
18
|
+
* @docs-private
|
|
19
|
+
*/
|
|
20
|
+
containerInstance: IBaoSnackBarContainer;
|
|
21
|
+
/** Subject for notifying the user that the snack bar has been dismissed. */
|
|
22
|
+
private readonly _afterDismissed;
|
|
23
|
+
/** Subject for notifying the user that the snack bar has opened and appeared. */
|
|
24
|
+
private readonly _afterOpened;
|
|
25
|
+
/** Subject for notifying the user that the snack bar action was called. */
|
|
26
|
+
private readonly _onAction;
|
|
27
|
+
/**
|
|
28
|
+
* Timeout ID for the duration setTimeout call. Used to clear the timeout if the snackbar is
|
|
29
|
+
* dismissed before the duration passes.
|
|
30
|
+
*/
|
|
31
|
+
private _durationTimeoutId;
|
|
32
|
+
/** Whether the snack bar was dismissed using the action button. */
|
|
33
|
+
private _dismissedByAction;
|
|
34
|
+
constructor(containerInstance: IBaoSnackBarContainer, _overlayRef: OverlayRef);
|
|
35
|
+
/** Dismisses the snack bar. */
|
|
36
|
+
dismiss(): void;
|
|
37
|
+
/** Marks the snackbar action clicked. */
|
|
38
|
+
dismissWithAction(): void;
|
|
39
|
+
/** Dismisses the snack bar after some duration */
|
|
40
|
+
dismissAfter(duration: number): void;
|
|
41
|
+
/** Marks the snackbar as opened */
|
|
42
|
+
open(): void;
|
|
43
|
+
/** Gets an observable that is notified when the snack bar is finished closing. */
|
|
44
|
+
afterDismissed(): Observable<IBaoSnackBarDismiss>;
|
|
45
|
+
/** Gets an observable that is notified when the snack bar has opened and appeared. */
|
|
46
|
+
afterOpened(): Observable<void>;
|
|
47
|
+
/** Gets an observable that is notified when the snack bar action is called. */
|
|
48
|
+
onAction(): Observable<void>;
|
|
49
|
+
/** Cleans up the DOM after closing. */
|
|
50
|
+
private finishDismiss;
|
|
51
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { LiveAnnouncer } from '@angular/cdk/a11y';
|
|
2
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
3
|
+
import { ComponentType } from '@angular/cdk/portal';
|
|
4
|
+
import { EmbeddedViewRef, InjectionToken, Injector, OnDestroy, TemplateRef, Type } from '@angular/core';
|
|
5
|
+
import { ITextOnlySnackBar } from './simple-snack-bar.component';
|
|
6
|
+
import { BaoSnackBarConfig } from './snack-bar-config';
|
|
7
|
+
import { IBaoSnackBarContainer } from './snack-bar-container';
|
|
8
|
+
import { BaoSnackBarRef } from './snack-bar-ref';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export declare function baoFactory(): BaoSnackBarConfig<any>;
|
|
11
|
+
/** Injection token that can be used to specify default snack bar. */
|
|
12
|
+
export declare const BAO_SNACK_BAR_DEFAULT_OPTIONS: InjectionToken<BaoSnackBarConfig<any>>;
|
|
13
|
+
/**
|
|
14
|
+
* Service to dispatch Material Design snack bar messages.
|
|
15
|
+
*/
|
|
16
|
+
export declare class BaoSnackBarService implements OnDestroy {
|
|
17
|
+
private _overlay;
|
|
18
|
+
private _live;
|
|
19
|
+
private _injector;
|
|
20
|
+
private _parentSnackBar;
|
|
21
|
+
private _defaultConfig;
|
|
22
|
+
/** The component that should be rendered as the snack bar's simple component. */
|
|
23
|
+
protected simpleSnackBarComponent: Type<ITextOnlySnackBar>;
|
|
24
|
+
/** The container component that attaches the provided template or component. */
|
|
25
|
+
protected snackBarContainerComponent: Type<IBaoSnackBarContainer>;
|
|
26
|
+
/**
|
|
27
|
+
* Reference to the current snack bar in the view *at this level* (in the Angular injector tree).
|
|
28
|
+
* If there is a parent snack-bar service, all operations should delegate to that parent
|
|
29
|
+
* via `_openedSnackBarRef`.
|
|
30
|
+
*/
|
|
31
|
+
private _snackBarRefAtThisLevel;
|
|
32
|
+
constructor(_overlay: Overlay, _live: LiveAnnouncer, _injector: Injector, _parentSnackBar: BaoSnackBarService, _defaultConfig: BaoSnackBarConfig);
|
|
33
|
+
/** Reference to the currently opened snackbar at *any* level. */
|
|
34
|
+
get _openedSnackBarRef(): BaoSnackBarRef<any> | null;
|
|
35
|
+
set _openedSnackBarRef(value: BaoSnackBarRef<any> | null);
|
|
36
|
+
/**
|
|
37
|
+
* Creates and dispatches a snack bar with a custom component for the content, removing any
|
|
38
|
+
* currently opened snack bars.
|
|
39
|
+
*
|
|
40
|
+
* @param component Component to be instantiated.
|
|
41
|
+
* @param config Extra configuration for the snack bar.
|
|
42
|
+
*/
|
|
43
|
+
openFromComponent<T>(component: ComponentType<T>, config?: BaoSnackBarConfig): BaoSnackBarRef<T>;
|
|
44
|
+
/**
|
|
45
|
+
* Creates and dispatches a snack bar with a custom template for the content, removing any
|
|
46
|
+
* currently opened snack bars.
|
|
47
|
+
*
|
|
48
|
+
* @param template Template to be instantiated.
|
|
49
|
+
* @param config Extra configuration for the snack bar.
|
|
50
|
+
*/
|
|
51
|
+
openFromTemplate(template: TemplateRef<any>, config?: BaoSnackBarConfig): BaoSnackBarRef<EmbeddedViewRef<any>>;
|
|
52
|
+
/**
|
|
53
|
+
* Opens a snackbar with a message and an optional action.
|
|
54
|
+
* @param message The message to show in the snackbar.
|
|
55
|
+
* @param toastType The type of of toast to display the snackbar.
|
|
56
|
+
* @param actionLabelOrIcon The label or icon for the snackbar action.
|
|
57
|
+
* @param showClose If true, the snackbar will require user interaction to close.
|
|
58
|
+
* @param config Additional configuration options for the snackbar.
|
|
59
|
+
*/
|
|
60
|
+
open(config: BaoSnackBarConfig): BaoSnackBarRef<ITextOnlySnackBar>;
|
|
61
|
+
/**
|
|
62
|
+
* Dismisses the currently-visible snack bar.
|
|
63
|
+
*/
|
|
64
|
+
dismiss(): void;
|
|
65
|
+
ngOnDestroy(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Attaches the snack bar container component to the overlay.
|
|
68
|
+
*/
|
|
69
|
+
private attachSnackBarContainer;
|
|
70
|
+
/**
|
|
71
|
+
* Places a new component or a template as the content of the snack bar container.
|
|
72
|
+
*/
|
|
73
|
+
private attach;
|
|
74
|
+
/** Animates the old snack bar out and the new one in. */
|
|
75
|
+
private animateSnackBar;
|
|
76
|
+
/**
|
|
77
|
+
* Creates a new overlay and places it in the correct location.
|
|
78
|
+
* @param config The user-specified snack bar config.
|
|
79
|
+
*/
|
|
80
|
+
private createOverlay;
|
|
81
|
+
/**
|
|
82
|
+
* Creates an injector to be used inside of a snack bar component.
|
|
83
|
+
* @param config Config that was used to create the snack bar.
|
|
84
|
+
* @param snackBarRef Reference to the snack bar.
|
|
85
|
+
*/
|
|
86
|
+
private createInjector;
|
|
87
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaoSnackBarService, [null, null, null, { optional: true; skipSelf: true; }, null]>;
|
|
88
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BaoSnackBarService>;
|
|
89
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./system-header.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "../icon/module";
|
|
5
|
+
export declare class BaoSystemHeaderModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaoSystemHeaderModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<BaoSystemHeaderModule, [typeof i1.BaoSystemHeaderComponent, typeof i1.BaoBackNavigationInsert, typeof i1.BaoBackNavigationComponent], [typeof i2.CommonModule, typeof i3.BaoIconModule], [typeof i1.BaoSystemHeaderComponent, typeof i1.BaoBackNavigationInsert, typeof i1.BaoBackNavigationComponent]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<BaoSystemHeaderModule>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
2
|
+
import { AfterViewInit, ElementRef, OnChanges, OnInit, Renderer2, SimpleChanges, ViewContainerRef } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* This component is dynamically added to replace breadcrumb when System Header is viewed on tablet or mobile screens.
|
|
6
|
+
* Used internally by BaoSystemHeaderComponent only, not to be used by host application.
|
|
7
|
+
*/
|
|
8
|
+
export declare class BaoBackNavigationComponent implements OnChanges {
|
|
9
|
+
private renderer;
|
|
10
|
+
private elementRef;
|
|
11
|
+
link: string;
|
|
12
|
+
constructor(renderer: Renderer2, elementRef: ElementRef<HTMLElement>);
|
|
13
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaoBackNavigationComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaoBackNavigationComponent, "bao-back-navigation-component", never, { "link": "link"; }, {}, never, never, false>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* This directive is to mark the template where the BaoBackNavigationComponent should be dynamically inserted,
|
|
19
|
+
* when a Breadcrumb component needs to be replaced
|
|
20
|
+
*/
|
|
21
|
+
export declare class BaoBackNavigationInsert {
|
|
22
|
+
viewContainerRef: ViewContainerRef;
|
|
23
|
+
constructor(viewContainerRef: ViewContainerRef);
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaoBackNavigationInsert, never>;
|
|
25
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaoBackNavigationInsert, "[backNavigationInsert]", never, {}, {}, never, never, false>;
|
|
26
|
+
}
|
|
27
|
+
export declare class BaoSystemHeaderComponent implements AfterViewInit, OnInit {
|
|
28
|
+
private breakpointObserver;
|
|
29
|
+
private renderer;
|
|
30
|
+
private textContainer;
|
|
31
|
+
private backButtonInsert;
|
|
32
|
+
screenType: 'mobile' | 'tablet' | 'desktop';
|
|
33
|
+
constructor(breakpointObserver: BreakpointObserver, renderer: Renderer2);
|
|
34
|
+
get textContainerChildren(): Element[];
|
|
35
|
+
ngOnInit(): void;
|
|
36
|
+
ngAfterViewInit(): void;
|
|
37
|
+
private formatNavigation;
|
|
38
|
+
private applySizeClass;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaoSystemHeaderComponent, never>;
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaoSystemHeaderComponent, "bao-system-header", never, {}, {}, never, ["a", "bao-breadcrumb", "h1", "bao-tag", "span", "*"], false>;
|
|
41
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
3
|
-
* Licensed under the MIT license.
|
|
4
|
-
* See LICENSE file in the project root for full license information.
|
|
5
|
-
*/
|
|
6
|
-
import { animate, state, style, transition, trigger, query, animateChild, group } from '@angular/animations';
|
|
7
|
-
/**
|
|
8
|
-
* Animations used by MatDialog.
|
|
9
|
-
* @docs-private
|
|
10
|
-
*/
|
|
11
|
-
export const baoModalAnimations = {
|
|
12
|
-
/** Animation that is applied on the modal container by default. */
|
|
13
|
-
modalContainer: trigger('modalContainer', [
|
|
14
|
-
// Note: The `enter` animation transitions to `transform: none`, because for some reason
|
|
15
|
-
// specifying the transform explicitly, causes IE both to blur the modal content and
|
|
16
|
-
// decimate the animation performance. Leaving it as `none` solves both issues.
|
|
17
|
-
state('void, exit', style({ opacity: 0, transform: 'scale(0.7)' })),
|
|
18
|
-
state('enter', style({ transform: 'none' })),
|
|
19
|
-
transition('* => enter', group([
|
|
20
|
-
animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'none', opacity: 1 })),
|
|
21
|
-
query('@*', animateChild(), { optional: true })
|
|
22
|
-
])),
|
|
23
|
-
transition('* => void, * => exit', group([
|
|
24
|
-
animate('75ms cubic-bezier(0.4, 0.0, 0.2, 1)', style({ opacity: 0 })),
|
|
25
|
-
query('@*', animateChild(), { optional: true })
|
|
26
|
-
]))
|
|
27
|
-
])
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwtYW5pbWF0aW9ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXItdWkvc3JjL2xpYi9tb2RhbC9tb2RhbC1hbmltYXRpb25zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7O0dBSUc7QUFDSCxPQUFPLEVBQ0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