@daffodil/design 0.87.1 → 0.88.1
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/accordion/accordion/accordion-item/accordion-item.component.d.ts +1 -9
- package/accordion/accordion/accordion-item-title/accordion-item-title.directive.d.ts +0 -4
- package/article/article/article.component.d.ts +0 -8
- package/article/article-meta/article-meta.directive.d.ts +0 -4
- package/atoms/form/form-field/form-field/form-field.component.d.ts +3 -2
- package/atoms/form/form-field/form-field-control.d.ts +3 -1
- package/atoms/form/native-select/native-select.component.d.ts +11 -0
- package/breadcrumb/breadcrumb/breadcrumb.component.d.ts +0 -4
- package/breadcrumb/breadcrumb-item/breadcrumb-item.directive.d.ts +0 -12
- package/button/button/basic/button.component.d.ts +0 -4
- package/button/button/button-base.directive.d.ts +0 -18
- package/button/button/flat/flat.component.d.ts +0 -4
- package/button/button/icon/icon.component.d.ts +0 -4
- package/button/button/stroked/stroked.component.d.ts +0 -4
- package/button/button/underline/underline.component.d.ts +0 -4
- package/button/src/button/button-base.scss +3 -3
- package/callout/README.md +38 -40
- package/callout/callout/callout.component.d.ts +13 -5
- package/callout/callout-body/callout-body.directive.d.ts +9 -4
- package/callout/callout-icon/callout-icon.directive.d.ts +9 -4
- package/callout/callout-subtitle/callout-subtitle.directive.d.ts +8 -4
- package/callout/callout-tagline/callout-tagline.directive.d.ts +8 -4
- package/callout/callout-title/callout-title.directive.d.ts +8 -4
- package/card/README.md +52 -44
- package/card/card/basic/basic.component.d.ts +18 -4
- package/card/card/raised/raised.component.d.ts +3 -4
- package/card/card/stroked/stroked.component.d.ts +18 -4
- package/card/card-actions/card-actions.directive.d.ts +8 -4
- package/card/card-base.directive.d.ts +8 -16
- package/card/card-content/card-content.directive.d.ts +9 -4
- package/card/card-icon/card-icon.directive.d.ts +8 -4
- package/card/card-image/card-image.directive.d.ts +8 -4
- package/card/card-tagline/card-tagline.directive.d.ts +8 -4
- package/card/card-title/card-title.directive.d.ts +8 -4
- package/card/card.d.ts +1 -0
- package/card/examples/elevated-card/elevated-card.component.d.ts +5 -0
- package/card/examples/public_api.d.ts +3 -3
- package/card/helpers/card-orientation.d.ts +17 -0
- package/card/public_api.d.ts +9 -8
- package/card/src/card-base-theme.scss +40 -58
- package/container/container/container.component.d.ts +0 -4
- package/core/public_api.d.ts +1 -0
- package/core/sticky/public_api.d.ts +1 -0
- package/core/sticky/sticky-tracker.directive.d.ts +23 -0
- package/fesm2022/daffodil-design-accordion.mjs +13 -55
- package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
- package/fesm2022/daffodil-design-article.mjs +14 -32
- package/fesm2022/daffodil-design-article.mjs.map +1 -1
- package/fesm2022/daffodil-design-breadcrumb.mjs +15 -38
- package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
- package/fesm2022/daffodil-design-button.mjs +41 -108
- package/fesm2022/daffodil-design-button.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout.mjs +91 -73
- package/fesm2022/daffodil-design-callout.mjs.map +1 -1
- package/fesm2022/daffodil-design-card-examples.mjs +17 -32
- package/fesm2022/daffodil-design-card-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-card.mjs +167 -145
- package/fesm2022/daffodil-design-card.mjs.map +1 -1
- package/fesm2022/daffodil-design-container.mjs +7 -13
- package/fesm2022/daffodil-design-container.mjs.map +1 -1
- package/fesm2022/daffodil-design-form-field-examples.mjs +7 -7
- package/fesm2022/daffodil-design-form-field-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero-examples.mjs +18 -1
- package/fesm2022/daffodil-design-hero-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero.mjs +102 -71
- package/fesm2022/daffodil-design-hero.mjs.map +1 -1
- package/fesm2022/daffodil-design-image.mjs +5 -12
- package/fesm2022/daffodil-design-image.mjs.map +1 -1
- package/fesm2022/daffodil-design-input-examples.mjs +6 -6
- package/fesm2022/daffodil-design-input-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-input.mjs +60 -35
- package/fesm2022/daffodil-design-input.mjs.map +1 -1
- package/fesm2022/daffodil-design-list-examples.mjs +14 -10
- package/fesm2022/daffodil-design-list-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-list.mjs +111 -98
- package/fesm2022/daffodil-design-list.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery.mjs +7 -17
- package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu.mjs +26 -63
- package/fesm2022/daffodil-design-menu.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal.mjs +63 -130
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar.mjs +7 -20
- package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification-examples.mjs +16 -41
- package/fesm2022/daffodil-design-notification-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +112 -116
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator.mjs +8 -21
- package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar-examples.mjs +6 -6
- package/fesm2022/daffodil-design-progress-bar-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs +74 -115
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-quantity-field.mjs +11 -3
- package/fesm2022/daffodil-design-quantity-field.mjs.map +1 -1
- package/fesm2022/daffodil-design-select-examples.mjs +4 -4
- package/fesm2022/daffodil-design-select-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-select.mjs +50 -117
- package/fesm2022/daffodil-design-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar-examples.mjs +29 -3
- package/fesm2022/daffodil-design-sidebar-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +39 -78
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-sticky-examples.mjs +25 -0
- package/fesm2022/daffodil-design-sticky-examples.mjs.map +1 -0
- package/fesm2022/daffodil-design-tabs.mjs +54 -131
- package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
- package/fesm2022/daffodil-design-text-snippet.mjs +17 -8
- package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
- package/fesm2022/daffodil-design-textarea-examples.mjs +3 -3
- package/fesm2022/daffodil-design-textarea-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-textarea.mjs +49 -25
- package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +42 -128
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree.mjs +26 -70
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +164 -17
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/hero/README.md +39 -25
- package/hero/examples/basic-hero/basic-hero.component.d.ts +6 -0
- package/hero/examples/public_api.d.ts +1 -0
- package/hero/hero/hero.component.d.ts +21 -4
- package/hero/hero-body/hero-body.directive.d.ts +10 -4
- package/hero/hero-icon/hero-icon.directive.d.ts +10 -4
- package/hero/hero-subtitle/hero-subtitle.directive.d.ts +8 -4
- package/hero/hero-tagline/hero-tagline.directive.d.ts +8 -4
- package/hero/hero-title/hero-title.directive.d.ts +8 -4
- package/image/image/image.component.d.ts +0 -4
- package/input/input.component.d.ts +29 -9
- package/list/README.md +43 -13
- package/list/examples/multiline-list/multiline-list.component.d.ts +1 -0
- package/list/list/list.component.d.ts +12 -24
- package/list/list-item/list-item.component.d.ts +13 -20
- package/list/list-item-title/list-item-title.directive.d.ts +13 -0
- package/list/list.d.ts +8 -2
- package/list/list.module.d.ts +4 -3
- package/list/nav-list/nav-list.component.d.ts +17 -0
- package/list/public_api.d.ts +5 -2
- package/list/src/list-base.scss +40 -0
- package/list/src/list-theme.scss +5 -0
- package/media-gallery/media-gallery/media-gallery.component.d.ts +0 -6
- package/menu/menu/menu.component.d.ts +0 -12
- package/menu/menu-activator/menu-activator.component.d.ts +4 -5
- package/menu/menu-item/menu-item.component.d.ts +0 -10
- package/modal/modal/modal.component.d.ts +12 -33
- package/modal/modal-actions/modal-actions.component.d.ts +0 -4
- package/modal/modal-close/modal-close.directive.d.ts +1 -8
- package/modal/modal-content/modal-content.component.d.ts +0 -4
- package/modal/modal-header/modal-header.component.d.ts +0 -4
- package/modal/modal-title/modal-title.directive.d.ts +0 -11
- package/navbar/navbar/navbar.component.d.ts +0 -8
- package/navbar/src/navbar-theme.scss +2 -1
- package/notification/README.md +39 -24
- package/notification/examples/default-notification/default-notification.component.d.ts +0 -2
- package/notification/examples/public_api.d.ts +1 -5
- package/notification/helpers/notification-orientation.d.ts +17 -0
- package/notification/notification/notification.component.d.ts +39 -23
- package/notification/notification-actions/notification-actions.directive.d.ts +11 -4
- package/notification/notification-message/notification-message.directive.d.ts +9 -4
- package/notification/notification-subtitle/notification-subtitle.directive.d.ts +3 -4
- package/notification/notification-title/notification-title.directive.d.ts +8 -4
- package/notification/public_api.d.ts +6 -5
- package/package.json +1 -1
- package/paginator/paginator/paginator.component.d.ts +0 -11
- package/progress-bar/README.md +31 -8
- package/progress-bar/progress-bar-label/progress-bar-label.directive.d.ts +9 -5
- package/progress-bar/progress-bar.component.d.ts +39 -35
- package/progress-bar/public_api.d.ts +2 -2
- package/quantity-field/quantity-field.component.d.ts +10 -0
- package/scss/global.scss +0 -1
- package/select/select/select.component.d.ts +13 -25
- package/select/select.d.ts +1 -2
- package/sidebar/README.md +67 -72
- package/sidebar/examples/over-and-under-sidebars/over-and-under-sidebars.component.d.ts +0 -1
- package/sidebar/examples/sidebar-sides/sidebar-sides.component.d.ts +11 -0
- package/sidebar/sidebar/sidebar.component.d.ts +0 -9
- package/sidebar/sidebar-footer/sidebar-footer.component.d.ts +0 -4
- package/sidebar/sidebar-header/sidebar-header-action/sidebar-header-action.directive.d.ts +3 -0
- package/sidebar/sidebar-header/sidebar-header.component.d.ts +0 -4
- package/sidebar/sidebar-viewport/sidebar-viewport.component.d.ts +0 -17
- package/sticky/examples/basic-sticky/basic-sticky.component.d.ts +5 -0
- package/sticky/examples/index.d.ts +1 -0
- package/sticky/examples/public_api.d.ts +2 -0
- package/tabs/README.md +38 -14
- package/tabs/tabs/tab/tab.component.d.ts +4 -16
- package/tabs/tabs/tab-activator/tab-activator.component.d.ts +6 -27
- package/tabs/tabs/tab-label/tab-label.component.d.ts +5 -2
- package/tabs/tabs/tab-panel/tab-panel.component.d.ts +7 -24
- package/tabs/tabs/tabs.component.d.ts +5 -11
- package/text-snippet/README.md +31 -3
- package/text-snippet/text-snippet.component.d.ts +17 -2
- package/textarea/textarea.component.d.ts +25 -5
- package/toast/README.md +47 -21
- package/toast/interfaces/toast-action.d.ts +4 -5
- package/toast/interfaces/toast-options.d.ts +3 -1
- package/toast/interfaces/toast.d.ts +22 -7
- package/toast/service/toast.service.d.ts +3 -3
- package/toast/toast/toast-config.d.ts +7 -3
- package/toast/toast/toast-template.component.d.ts +1 -1
- package/toast/toast/toast.component.d.ts +0 -2
- package/toast/toast-actions/toast-actions.directive.d.ts +0 -4
- package/toast/toast-message/toast-message.directive.d.ts +0 -4
- package/toast/toast-title/toast-title.directive.d.ts +0 -4
- package/tree/tree/tree.component.d.ts +0 -6
- package/tree/tree-item/tree-item.directive.d.ts +7 -35
- package/accordion/accordion/animation/accordion-animation-state.d.ts +0 -1
- package/accordion/accordion/animation/accordion-animation.d.ts +0 -4
- package/card/examples/raised-card/raised-card.component.d.ts +0 -11
- package/notification/examples/notification-with-actions/notification-with-actions.component.d.ts +0 -8
- package/progress-bar/animation/progress-bar-animation.d.ts +0 -4
- package/select/animation/select-animation-state.d.ts +0 -7
- package/select/animation/select-animation.d.ts +0 -4
- package/select/animation/state.enum.d.ts +0 -4
@@ -1,101 +1,106 @@
|
|
1
|
-
import {
|
1
|
+
import { CommonModule } from '@angular/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import {
|
3
|
+
import { Directive, EventEmitter, Output, Input, ContentChild, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
4
4
|
import { FaIconComponent, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
5
5
|
import * as i1 from '@daffodil/design';
|
6
6
|
import { DaffStatusEnum, DaffPrefixDirective, DaffArticleEncapsulatedDirective, DaffStatusableDirective, DaffPrefixSuffixModule } from '@daffodil/design';
|
7
7
|
import { faTimes } from '@fortawesome/free-solid-svg-icons';
|
8
8
|
|
9
|
+
/**
|
10
|
+
* Enum for representing the available notification orientations.
|
11
|
+
* See {@link DaffNotificationOrientation} for descriptions of each orientation.
|
12
|
+
*/
|
13
|
+
var DaffNotificationOrientationEnum;
|
14
|
+
(function (DaffNotificationOrientationEnum) {
|
15
|
+
DaffNotificationOrientationEnum["Horizontal"] = "horizontal";
|
16
|
+
DaffNotificationOrientationEnum["Vertical"] = "vertical";
|
17
|
+
})(DaffNotificationOrientationEnum || (DaffNotificationOrientationEnum = {}));
|
18
|
+
|
19
|
+
/* eslint-disable quote-props */
|
20
|
+
/**
|
21
|
+
* Actions is used to include actionable buttons related to the notification (e.g., dismiss, navigate).
|
22
|
+
*
|
23
|
+
* @example
|
24
|
+
* ```html
|
25
|
+
* <div daffNotificationActions>
|
26
|
+
* <button daff-button>Update payment</button>
|
27
|
+
* <button daff-button>Contact support</button>
|
28
|
+
* </div>
|
29
|
+
* ```
|
30
|
+
*/
|
9
31
|
class DaffNotificationActionsDirective {
|
10
|
-
constructor() {
|
11
|
-
/**
|
12
|
-
* @docs-private
|
13
|
-
*/
|
14
|
-
this.class = true;
|
15
|
-
}
|
16
32
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffNotificationActionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
17
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffNotificationActionsDirective, isStandalone: true, selector: "[daffNotificationActions]", host: {
|
33
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffNotificationActionsDirective, isStandalone: true, selector: "[daffNotificationActions]", host: { classAttribute: "daff-notification__actions" }, ngImport: i0 }); }
|
18
34
|
}
|
19
35
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffNotificationActionsDirective, decorators: [{
|
20
36
|
type: Directive,
|
21
37
|
args: [{
|
22
38
|
selector: '[daffNotificationActions]',
|
23
|
-
|
39
|
+
host: {
|
40
|
+
'class': 'daff-notification__actions',
|
41
|
+
},
|
24
42
|
}]
|
25
|
-
}]
|
26
|
-
type: HostBinding,
|
27
|
-
args: ['class.daff-notification__actions']
|
28
|
-
}] } });
|
43
|
+
}] });
|
29
44
|
|
30
|
-
|
31
|
-
(function (DaffNotificationOrientationEnum) {
|
32
|
-
DaffNotificationOrientationEnum["Horizontal"] = "horizontal";
|
33
|
-
DaffNotificationOrientationEnum["Vertical"] = "vertical";
|
34
|
-
})(DaffNotificationOrientationEnum || (DaffNotificationOrientationEnum = {}));
|
45
|
+
/* eslint-disable quote-props */
|
35
46
|
/**
|
36
|
-
*
|
37
|
-
*
|
47
|
+
* Notifications provide contextual feedback or information related to user actions within a page's content.
|
48
|
+
*
|
49
|
+
* Use [Toast](/libs/design/toast/README.md) for app-level alerts.
|
50
|
+
*
|
51
|
+
* @example
|
52
|
+
* ```html
|
53
|
+
* <daff-notification>
|
54
|
+
* <fa-icon daffPrefix [icon]="faExclamation"></fa-icon>
|
55
|
+
* <div daffNotificationTitle>Payment Failed</div>
|
56
|
+
* <div daffNotificationMessage>We were unable to process your payment for order #12345. Please update your payment details and try again.</div>
|
57
|
+
* <div daffNotificationActions>
|
58
|
+
* <button daff-button>Update payment</button>
|
59
|
+
* <button daff-button>Contact support</button>
|
60
|
+
* </div>
|
61
|
+
* </daff-notification>
|
62
|
+
* ```
|
38
63
|
*/
|
39
64
|
class DaffNotificationComponent {
|
40
65
|
/**
|
66
|
+
* @docs-private
|
67
|
+
*
|
41
68
|
* Sets role to alert when `status="warn"` or `status="critical"`.
|
42
69
|
* Sets role to status on all other instances.
|
43
70
|
*/
|
44
|
-
/**
|
45
|
-
* @docs-private
|
46
|
-
*/
|
47
71
|
get role() {
|
48
72
|
return this.statusDirective.status === DaffStatusEnum.Warn || this.statusDirective.status === DaffStatusEnum.Critical ? 'alert' : 'status';
|
49
73
|
}
|
50
74
|
;
|
51
|
-
/**
|
52
|
-
* @docs-private
|
53
|
-
*/
|
54
|
-
get verticalOrientation() {
|
55
|
-
return this.orientation === DaffNotificationOrientationEnum.Vertical;
|
56
|
-
}
|
57
|
-
/**
|
58
|
-
* @docs-private
|
59
|
-
*/
|
60
|
-
get horizontalOrientation() {
|
61
|
-
return this.orientation === DaffNotificationOrientationEnum.Horizontal;
|
62
|
-
}
|
63
75
|
constructor(statusDirective) {
|
64
76
|
this.statusDirective = statusDirective;
|
65
|
-
this.faTimes = faTimes;
|
66
77
|
/**
|
67
78
|
* @docs-private
|
68
79
|
*/
|
69
|
-
this.
|
70
|
-
/**
|
71
|
-
*
|
80
|
+
this.faTimes = faTimes;
|
81
|
+
/** Whether the notification can be dismissed by the user.
|
82
|
+
* Displays a close icon if `true`.
|
72
83
|
*/
|
73
|
-
this.tabindex = '0';
|
74
|
-
/** Whether or not a notification is closable */
|
75
84
|
this.dismissible = false;
|
76
|
-
this._orientation = DaffNotificationOrientationEnum.Vertical;
|
77
85
|
/**
|
78
|
-
*
|
86
|
+
* The orientation of a notification.
|
87
|
+
*/
|
88
|
+
this.orientation = 'vertical';
|
89
|
+
/**
|
90
|
+
* Emits when the notification is closed.
|
79
91
|
*/
|
80
92
|
this.closeNotification = new EventEmitter();
|
81
93
|
}
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
this._orientation = DaffNotificationOrientationEnum.Vertical;
|
88
|
-
}
|
89
|
-
else {
|
90
|
-
this._orientation = value;
|
91
|
-
}
|
92
|
-
}
|
93
|
-
;
|
94
|
+
/**
|
95
|
+
* @docs-private
|
96
|
+
*
|
97
|
+
* Internal handler for the close icon click.
|
98
|
+
*/
|
94
99
|
onCloseNotification(event) {
|
95
100
|
this.closeNotification.emit();
|
96
101
|
}
|
97
102
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffNotificationComponent, deps: [{ token: i1.DaffStatusableDirective }], target: i0.ɵɵFactoryTarget.Component }); }
|
98
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: DaffNotificationComponent, isStandalone: true, selector: "daff-notification", inputs: { dismissible: "dismissible", orientation: "orientation" }, outputs: { closeNotification: "closeNotification" }, host: {
|
103
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: DaffNotificationComponent, isStandalone: true, selector: "daff-notification", inputs: { dismissible: "dismissible", orientation: ["orientation", "orientation", (value) => value || DaffNotificationOrientationEnum.Vertical] }, outputs: { closeNotification: "closeNotification" }, host: { attributes: { "tabindex": "0" }, properties: { "class.vertical": "orientation === \"vertical\"", "class.horizontal": "orientation === \"horizontal\"", "class.dismissible": "dismissible", "attr.role": "role" }, classAttribute: "daff-notification" }, queries: [{ propertyName: "_prefix", first: true, predicate: DaffPrefixDirective, descendants: true }, { propertyName: "_actions", first: true, predicate: DaffNotificationActionsDirective, descendants: true }], hostDirectives: [{ directive: i1.DaffArticleEncapsulatedDirective }, { directive: i1.DaffStatusableDirective, inputs: ["status", "status"] }], ngImport: i0, template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-notification__body\">\n <div class=\"daff-notification__content\">\n <ng-content select=\"[daffNotificationTitle]\"></ng-content>\n <ng-content select=\"[daffNotificationMessage]\"></ng-content>\n </div>\n @if (_actions) {\n <ng-content select=\"[daffNotificationActions]\"></ng-content>\n }\n</div>\n@if (dismissible) {\n <button class=\"daff-notification__close-icon\" (click)=\"onCloseNotification($event)\">\n <fa-icon [icon]=\"faTimes\" [fixedWidth]=\"true\"></fa-icon>\n </button>\n}", styles: [".daff-notification{display:flex;border-radius:.25rem;font-size:1rem;line-height:1.5rem;position:relative}.daff-notification .daff-prefix{padding:1rem 0 1rem 1rem}.daff-notification__close-icon{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;color:currentColor;margin:0;min-height:3rem;height:3rem;min-width:3rem;width:3rem}.daff-notification__body{display:flex;font-size:1rem;line-height:1.5rem;padding:1rem;width:100%}.daff-notification__content{display:flex;flex-direction:column;gap:.25rem}.daff-notification__title{font-size:1rem;font-weight:600;line-height:1.5rem}.daff-notification__message{font-size:1rem;font-weight:400;line-height:1.25rem}.daff-notification__actions{display:flex;gap:.5rem}.daff-notification.dismissible.horizontal .daff-notification__actions{padding:.5rem 0}.daff-notification.vertical .daff-notification__body{flex-direction:column;gap:1rem}.daff-notification.horizontal .daff-prefix{padding:.75rem 0 .75rem 1rem}.daff-notification.horizontal .daff-notification__message{align-self:center}.daff-notification.horizontal .daff-notification__body{flex-direction:row;gap:0;padding:0}.daff-notification.horizontal .daff-notification__content{flex-direction:row;flex-wrap:wrap;flex-grow:1;padding:.75rem 1rem .75rem .75rem}.daff-notification.horizontal .daff-notification__actions{min-height:3rem;padding:.5rem 1rem .5rem 0;margin:0}\n"], dependencies: [{ kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
99
104
|
}
|
100
105
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffNotificationComponent, decorators: [{
|
101
106
|
type: Component,
|
@@ -105,105 +110,96 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
105
110
|
directive: DaffStatusableDirective,
|
106
111
|
inputs: ['status'],
|
107
112
|
},
|
108
|
-
],
|
109
|
-
|
113
|
+
], host: {
|
114
|
+
'class': 'daff-notification',
|
115
|
+
'[class.vertical]': 'orientation === "vertical"',
|
116
|
+
'[class.horizontal]': 'orientation === "horizontal"',
|
117
|
+
'[class.dismissible]': 'dismissible',
|
118
|
+
'tabindex': '0',
|
119
|
+
'[attr.role]': 'role',
|
120
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
110
121
|
FaIconComponent,
|
111
122
|
DaffPrefixDirective,
|
112
|
-
], template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-notification__body\">\n <div class=\"daff-notification__content\">\n <ng-content select=\"[daffNotificationTitle]\"></ng-content>\n <ng-content select=\"[
|
123
|
+
], template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-notification__body\">\n <div class=\"daff-notification__content\">\n <ng-content select=\"[daffNotificationTitle]\"></ng-content>\n <ng-content select=\"[daffNotificationMessage]\"></ng-content>\n </div>\n @if (_actions) {\n <ng-content select=\"[daffNotificationActions]\"></ng-content>\n }\n</div>\n@if (dismissible) {\n <button class=\"daff-notification__close-icon\" (click)=\"onCloseNotification($event)\">\n <fa-icon [icon]=\"faTimes\" [fixedWidth]=\"true\"></fa-icon>\n </button>\n}", styles: [".daff-notification{display:flex;border-radius:.25rem;font-size:1rem;line-height:1.5rem;position:relative}.daff-notification .daff-prefix{padding:1rem 0 1rem 1rem}.daff-notification__close-icon{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;color:currentColor;margin:0;min-height:3rem;height:3rem;min-width:3rem;width:3rem}.daff-notification__body{display:flex;font-size:1rem;line-height:1.5rem;padding:1rem;width:100%}.daff-notification__content{display:flex;flex-direction:column;gap:.25rem}.daff-notification__title{font-size:1rem;font-weight:600;line-height:1.5rem}.daff-notification__message{font-size:1rem;font-weight:400;line-height:1.25rem}.daff-notification__actions{display:flex;gap:.5rem}.daff-notification.dismissible.horizontal .daff-notification__actions{padding:.5rem 0}.daff-notification.vertical .daff-notification__body{flex-direction:column;gap:1rem}.daff-notification.horizontal .daff-prefix{padding:.75rem 0 .75rem 1rem}.daff-notification.horizontal .daff-notification__message{align-self:center}.daff-notification.horizontal .daff-notification__body{flex-direction:row;gap:0;padding:0}.daff-notification.horizontal .daff-notification__content{flex-direction:row;flex-wrap:wrap;flex-grow:1;padding:.75rem 1rem .75rem .75rem}.daff-notification.horizontal .daff-notification__actions{min-height:3rem;padding:.5rem 1rem .5rem 0;margin:0}\n"] }]
|
113
124
|
}], ctorParameters: () => [{ type: i1.DaffStatusableDirective }], propDecorators: { _prefix: [{
|
114
125
|
type: ContentChild,
|
115
126
|
args: [DaffPrefixDirective]
|
116
127
|
}], _actions: [{
|
117
128
|
type: ContentChild,
|
118
129
|
args: [DaffNotificationActionsDirective]
|
119
|
-
}], class: [{
|
120
|
-
type: HostBinding,
|
121
|
-
args: ['class.daff-notification']
|
122
|
-
}], tabindex: [{
|
123
|
-
type: HostBinding,
|
124
|
-
args: ['attr.tabindex']
|
125
|
-
}], role: [{
|
126
|
-
type: HostBinding,
|
127
|
-
args: ['attr.role']
|
128
|
-
}], verticalOrientation: [{
|
129
|
-
type: HostBinding,
|
130
|
-
args: ['class.vertical']
|
131
|
-
}], horizontalOrientation: [{
|
132
|
-
type: HostBinding,
|
133
|
-
args: ['class.horizontal']
|
134
130
|
}], dismissible: [{
|
135
131
|
type: Input
|
136
|
-
}, {
|
137
|
-
type: HostBinding,
|
138
|
-
args: ['class.dismissible']
|
139
132
|
}], orientation: [{
|
140
|
-
type: Input
|
133
|
+
type: Input,
|
134
|
+
args: [{ transform: (value) => value || DaffNotificationOrientationEnum.Vertical }]
|
141
135
|
}], closeNotification: [{
|
142
136
|
type: Output
|
143
137
|
}] } });
|
144
138
|
|
139
|
+
/* eslint-disable quote-props */
|
140
|
+
/**
|
141
|
+
* Message provides additional details or supporting context that supplements
|
142
|
+
* the notification title. Keep this brief—ideally one to two short sentences.
|
143
|
+
*
|
144
|
+
* @example
|
145
|
+
* ```html
|
146
|
+
* <div daffNotificationMessage>We were unable to process your payment for order #12345. Please update your payment details and try again.</div>
|
147
|
+
* ```
|
148
|
+
*/
|
145
149
|
class DaffNotificationMessageDirective {
|
146
|
-
constructor() {
|
147
|
-
/**
|
148
|
-
* @docs-private
|
149
|
-
*/
|
150
|
-
this.class = true;
|
151
|
-
}
|
152
150
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffNotificationMessageDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
153
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffNotificationMessageDirective, isStandalone: true, selector: "[daffNotificationMessage]", host: {
|
151
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffNotificationMessageDirective, isStandalone: true, selector: "[daffNotificationMessage]", host: { classAttribute: "daff-notification__message" }, ngImport: i0 }); }
|
154
152
|
}
|
155
153
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffNotificationMessageDirective, decorators: [{
|
156
154
|
type: Directive,
|
157
155
|
args: [{
|
158
156
|
selector: '[daffNotificationMessage]',
|
159
|
-
|
157
|
+
host: {
|
158
|
+
'class': 'daff-notification__message',
|
159
|
+
},
|
160
160
|
}]
|
161
|
-
}]
|
162
|
-
type: HostBinding,
|
163
|
-
args: ['class.daff-notification__message']
|
164
|
-
}] } });
|
161
|
+
}] });
|
165
162
|
|
163
|
+
/* eslint-disable quote-props */
|
164
|
+
/**
|
165
|
+
* @deprecated in favor of DaffNotificationMessageDirective. Deprecated in version 0.88.0. Will be removed in version 0.91.0.
|
166
|
+
*/
|
166
167
|
class DaffNotificationSubtitleDirective {
|
167
|
-
constructor() {
|
168
|
-
/**
|
169
|
-
* @docs-private
|
170
|
-
*/
|
171
|
-
this.class = true;
|
172
|
-
}
|
173
168
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffNotificationSubtitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
174
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffNotificationSubtitleDirective, isStandalone: true, selector: "[daffNotificationSubtitle]", host: {
|
169
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffNotificationSubtitleDirective, isStandalone: true, selector: "[daffNotificationSubtitle]", host: { classAttribute: "daff-notification__subtitle" }, ngImport: i0 }); }
|
175
170
|
}
|
176
171
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffNotificationSubtitleDirective, decorators: [{
|
177
172
|
type: Directive,
|
178
173
|
args: [{
|
179
174
|
selector: '[daffNotificationSubtitle]',
|
180
|
-
|
175
|
+
host: {
|
176
|
+
'class': 'daff-notification__subtitle',
|
177
|
+
},
|
181
178
|
}]
|
182
|
-
}]
|
183
|
-
type: HostBinding,
|
184
|
-
args: ['class.daff-notification__subtitle']
|
185
|
-
}] } });
|
179
|
+
}] });
|
186
180
|
|
181
|
+
/* eslint-disable quote-props */
|
182
|
+
/**
|
183
|
+
* Title is the primary text summarizing the notification.
|
184
|
+
*
|
185
|
+
* @example
|
186
|
+
* ```html
|
187
|
+
* <div daffNotificationTitle>Payment Failed</div>
|
188
|
+
* ```
|
189
|
+
*/
|
187
190
|
class DaffNotificationTitleDirective {
|
188
|
-
constructor() {
|
189
|
-
/**
|
190
|
-
* @docs-private
|
191
|
-
*/
|
192
|
-
this.class = true;
|
193
|
-
}
|
194
191
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffNotificationTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
195
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffNotificationTitleDirective, isStandalone: true, selector: "[daffNotificationTitle]", host: {
|
192
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DaffNotificationTitleDirective, isStandalone: true, selector: "[daffNotificationTitle]", host: { classAttribute: "daff-notification__title" }, ngImport: i0 }); }
|
196
193
|
}
|
197
194
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffNotificationTitleDirective, decorators: [{
|
198
195
|
type: Directive,
|
199
196
|
args: [{
|
200
197
|
selector: '[daffNotificationTitle]',
|
201
|
-
|
198
|
+
host: {
|
199
|
+
'class': 'daff-notification__title',
|
200
|
+
},
|
202
201
|
}]
|
203
|
-
}]
|
204
|
-
type: HostBinding,
|
205
|
-
args: ['class.daff-notification__title']
|
206
|
-
}] } });
|
202
|
+
}] });
|
207
203
|
|
208
204
|
/**
|
209
205
|
* @deprecated in favor of {@link DAFF_NOTIFICATION_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.
|
@@ -268,5 +264,5 @@ const DAFF_NOTIFICATION_COMPONENTS = [
|
|
268
264
|
* Generated bundle index. Do not edit.
|
269
265
|
*/
|
270
266
|
|
271
|
-
export { DAFF_NOTIFICATION_COMPONENTS, DaffNotificationActionsDirective, DaffNotificationComponent, DaffNotificationMessageDirective, DaffNotificationModule, DaffNotificationSubtitleDirective, DaffNotificationTitleDirective };
|
267
|
+
export { DAFF_NOTIFICATION_COMPONENTS, DaffNotificationActionsDirective, DaffNotificationComponent, DaffNotificationMessageDirective, DaffNotificationModule, DaffNotificationOrientationEnum, DaffNotificationSubtitleDirective, DaffNotificationTitleDirective };
|
272
268
|
//# sourceMappingURL=daffodil-design-notification.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"daffodil-design-notification.mjs","sources":["../../../libs/design/notification/src/notification-actions/notification-actions.directive.ts","../../../libs/design/notification/src/notification/notification.component.ts","../../../libs/design/notification/src/notification/notification.component.html","../../../libs/design/notification/src/notification-message/notification-message.directive.ts","../../../libs/design/notification/src/notification-subtitle/notification-subtitle.directive.ts","../../../libs/design/notification/src/notification-title/notification-title.directive.ts","../../../libs/design/notification/src/notification.module.ts","../../../libs/design/notification/src/notification.ts","../../../libs/design/notification/src/daffodil-design-notification.ts"],"sourcesContent":["import {\n Directive,\n HostBinding,\n} from '@angular/core';\n\n@Directive({\n selector: '[daffNotificationActions]',\n standalone: true,\n})\n\nexport class DaffNotificationActionsDirective {\n\n /**\n * @docs-private\n */\n @HostBinding('class.daff-notification__actions') class = true;\n}\n","import { NgIf } from '@angular/common';\nimport {\n Component,\n Input,\n HostBinding,\n ContentChild,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n Output,\n EventEmitter,\n} from '@angular/core';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport { faTimes } from '@fortawesome/free-solid-svg-icons';\n\nimport {\n DaffArticleEncapsulatedDirective,\n DaffPrefixDirective,\n DaffStatusableDirective,\n DaffStatusEnum,\n} from '@daffodil/design';\n\nimport { DaffNotificationActionsDirective } from '../notification-actions/notification-actions.directive';\n\nexport type DaffNotificationOrientation = 'horizontal' | 'vertical';\n\nenum DaffNotificationOrientationEnum {\n Horizontal = 'horizontal',\n Vertical = 'vertical',\n}\n\n/**\n * DaffNotificationComponent provides a way to display and communicate\n * information related to user actions within a page's content.\n */\n@Component({\n selector: 'daff-notification',\n templateUrl: './notification.component.html',\n styleUrls: ['./notification.component.scss'],\n hostDirectives: [\n { directive: DaffArticleEncapsulatedDirective },\n {\n directive: DaffStatusableDirective,\n inputs: ['status'],\n },\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgIf,\n FaIconComponent,\n DaffPrefixDirective,\n ],\n})\nexport class DaffNotificationComponent {\n faTimes = faTimes;\n\n @ContentChild(DaffPrefixDirective) _prefix: DaffPrefixDirective;\n\n @ContentChild(DaffNotificationActionsDirective) _actions: DaffNotificationActionsDirective;\n\n /**\n * @docs-private\n */\n @HostBinding('class.daff-notification') class = true;\n\n /**\n * @docs-private\n */\n @HostBinding('attr.tabindex') tabindex = '0';\n\n /**\n * Sets role to alert when `status=\"warn\"` or `status=\"critical\"`.\n * Sets role to status on all other instances.\n */\n /**\n * @docs-private\n */\n @HostBinding('attr.role') get role() {\n return this.statusDirective.status === DaffStatusEnum.Warn || this.statusDirective.status === DaffStatusEnum.Critical ? 'alert' : 'status';\n };\n\n /**\n * @docs-private\n */\n @HostBinding('class.vertical') get verticalOrientation() {\n return this.orientation === DaffNotificationOrientationEnum.Vertical;\n }\n\n /**\n * @docs-private\n */\n @HostBinding('class.horizontal') get horizontalOrientation() {\n return this.orientation === DaffNotificationOrientationEnum.Horizontal;\n }\n\n /** Whether or not a notification is closable */\n @Input() @HostBinding('class.dismissible') dismissible = false;\n\n constructor(private statusDirective: DaffStatusableDirective) {}\n\n private _orientation: DaffNotificationOrientation = DaffNotificationOrientationEnum.Vertical;\n\n @Input()\n get orientation() {\n return this._orientation;\n }\n\n set orientation(value: DaffNotificationOrientation) {\n if(value === null || value === undefined || <unknown>value === '') {\n this._orientation = DaffNotificationOrientationEnum.Vertical;\n } else {\n this._orientation = value;\n }\n };\n\n /**\n * Output event triggered when the close icon is clicked.\n */\n @Output() closeNotification: EventEmitter<void> = new EventEmitter();\n\n onCloseNotification(event: Event) {\n this.closeNotification.emit();\n }\n}\n","@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-notification__body\">\n <div class=\"daff-notification__content\">\n <ng-content select=\"[daffNotificationTitle]\"></ng-content>\n <ng-content select=\"[daffNotificationSubtitle]\"></ng-content>\n </div>\n <ng-container *ngIf=\"_actions\">\n <ng-content select=\"[daffNotificationActions]\"></ng-content>\n </ng-container>\n</div>\n<button class=\"daff-notification__close-icon\" *ngIf=\"dismissible\" (click)=\"onCloseNotification($event)\">\n <fa-icon [icon]=\"faTimes\" [fixedWidth]=\"true\"></fa-icon>\n</button>","import {\n Directive,\n HostBinding,\n} from '@angular/core';\n\n@Directive({\n selector: '[daffNotificationMessage]',\n standalone: true,\n})\n\nexport class DaffNotificationMessageDirective {\n\n /**\n * @docs-private\n */\n @HostBinding('class.daff-notification__message') class = true;\n}\n","import {\n Directive,\n HostBinding,\n} from '@angular/core';\n\n@Directive({\n selector: '[daffNotificationSubtitle]',\n standalone: true,\n})\n\nexport class DaffNotificationSubtitleDirective {\n\n /**\n * @docs-private\n */\n @HostBinding('class.daff-notification__subtitle') class = true;\n}\n","import {\n Directive,\n HostBinding,\n} from '@angular/core';\n\n@Directive({\n selector: '[daffNotificationTitle]',\n standalone: true,\n})\n\nexport class DaffNotificationTitleDirective {\n\n /**\n * @docs-private\n */\n @HostBinding('class.daff-notification__title') class = true;\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\n\nimport { DaffPrefixSuffixModule } from '@daffodil/design';\n\nimport { DaffNotificationComponent } from './notification/notification.component';\nimport { DaffNotificationActionsDirective } from './notification-actions/notification-actions.directive';\nimport { DaffNotificationMessageDirective } from './notification-message/notification-message.directive';\nimport { DaffNotificationSubtitleDirective } from './notification-subtitle/notification-subtitle.directive';\nimport { DaffNotificationTitleDirective } from './notification-title/notification-title.directive';\n\n/**\n * @deprecated in favor of {@link DAFF_NOTIFICATION_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffPrefixSuffixModule,\n FontAwesomeModule,\n DaffNotificationComponent,\n DaffNotificationActionsDirective,\n DaffNotificationMessageDirective,\n DaffNotificationTitleDirective,\n DaffNotificationSubtitleDirective,\n ],\n exports: [\n DaffNotificationComponent,\n DaffNotificationActionsDirective,\n DaffNotificationMessageDirective,\n DaffNotificationTitleDirective,\n DaffNotificationSubtitleDirective,\n DaffPrefixSuffixModule,\n ],\n})\nexport class DaffNotificationModule { }\n","import { DaffPrefixDirective } from '@daffodil/design';\n\nimport { DaffNotificationComponent } from './notification/notification.component';\nimport { DaffNotificationActionsDirective } from './notification-actions/notification-actions.directive';\nimport { DaffNotificationMessageDirective } from './notification-message/notification-message.directive';\nimport { DaffNotificationSubtitleDirective } from './notification-subtitle/notification-subtitle.directive';\nimport { DaffNotificationTitleDirective } from './notification-title/notification-title.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_NOTIFICATION_COMPONENTS = <const> [\n DaffNotificationComponent,\n DaffNotificationActionsDirective,\n DaffNotificationMessageDirective,\n DaffNotificationTitleDirective,\n DaffNotificationSubtitleDirective,\n DaffPrefixDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAUa,gCAAgC,CAAA;AAL7C,IAAA,WAAA,GAAA;AAOE;;AAEG;QAC8C,IAAK,CAAA,KAAA,GAAG,IAAI;AAC9D;kIANY,gCAAgC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,C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CAAgC;IAChC,gCAAgC;IAChC,8BAA8B;IAC9B,iCAAiC;IACjC,mBAAmB;;;ACjBrB;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"daffodil-design-notification.mjs","sources":["../../../libs/design/notification/src/helpers/notification-orientation.ts","../../../libs/design/notification/src/notification-actions/notification-actions.directive.ts","../../../libs/design/notification/src/notification/notification.component.ts","../../../libs/design/notification/src/notification/notification.component.html","../../../libs/design/notification/src/notification-message/notification-message.directive.ts","../../../libs/design/notification/src/notification-subtitle/notification-subtitle.directive.ts","../../../libs/design/notification/src/notification-title/notification-title.directive.ts","../../../libs/design/notification/src/notification.module.ts","../../../libs/design/notification/src/notification.ts","../../../libs/design/notification/src/daffodil-design-notification.ts"],"sourcesContent":["/**\n * The available orientations for a notification.\n *\n * | Orientation | Description |\n * | -- | -- |\n * | `vertical` | Stacks notification content from top to bottom. This is the default orientation. |\n * | `horizontal` | Places notification content side-by-side. |\n */\nexport type DaffNotificationOrientation = 'horizontal' | 'vertical';\n\n/**\n * Enum for representing the available notification orientations.\n * See {@link DaffNotificationOrientation} for descriptions of each orientation.\n */\nexport enum DaffNotificationOrientationEnum {\n Horizontal = 'horizontal',\n Vertical = 'vertical',\n}\n","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n/**\n * Actions is used to include actionable buttons related to the notification (e.g., dismiss, navigate).\n *\n * @example\n * ```html\n * <div daffNotificationActions>\n * <button daff-button>Update payment</button>\n * <button daff-button>Contact support</button>\n * </div>\n * ```\n */\n@Directive({\n selector: '[daffNotificationActions]',\n host: {\n 'class': 'daff-notification__actions',\n },\n})\n\nexport class DaffNotificationActionsDirective {}\n","/* eslint-disable quote-props */\nimport {\n Component,\n Input,\n ContentChild,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n Output,\n EventEmitter,\n} from '@angular/core';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport { faTimes } from '@fortawesome/free-solid-svg-icons';\n\nimport {\n DaffArticleEncapsulatedDirective,\n DaffPrefixDirective,\n DaffStatusableDirective,\n DaffStatusEnum,\n} from '@daffodil/design';\n\nimport {\n DaffNotificationOrientation,\n DaffNotificationOrientationEnum,\n} from '../helpers/notification-orientation';\nimport { DaffNotificationActionsDirective } from '../notification-actions/notification-actions.directive';\n\n/**\n * Notifications provide contextual feedback or information related to user actions within a page's content.\n *\n * Use [Toast](/libs/design/toast/README.md) for app-level alerts.\n *\n * @example\n * ```html\n * <daff-notification>\n * <fa-icon daffPrefix [icon]=\"faExclamation\"></fa-icon>\n * <div daffNotificationTitle>Payment Failed</div>\n * <div daffNotificationMessage>We were unable to process your payment for order #12345. Please update your payment details and try again.</div>\n * <div daffNotificationActions>\n * <button daff-button>Update payment</button>\n * <button daff-button>Contact support</button>\n * </div>\n * </daff-notification>\n * ```\n */\n@Component({\n selector: 'daff-notification',\n templateUrl: './notification.component.html',\n styleUrls: ['./notification.component.scss'],\n hostDirectives: [\n { directive: DaffArticleEncapsulatedDirective },\n {\n directive: DaffStatusableDirective,\n inputs: ['status'],\n },\n ],\n host: {\n 'class': 'daff-notification',\n '[class.vertical]': 'orientation === \"vertical\"',\n '[class.horizontal]': 'orientation === \"horizontal\"',\n '[class.dismissible]': 'dismissible',\n 'tabindex': '0',\n '[attr.role]': 'role',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n FaIconComponent,\n DaffPrefixDirective,\n ],\n})\nexport class DaffNotificationComponent {\n /**\n * @docs-private\n */\n faTimes = faTimes;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffPrefixDirective) _prefix: DaffPrefixDirective;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffNotificationActionsDirective) _actions: DaffNotificationActionsDirective;\n\n /**\n * @docs-private\n *\n * Sets role to alert when `status=\"warn\"` or `status=\"critical\"`.\n * Sets role to status on all other instances.\n */\n get role() {\n return this.statusDirective.status === DaffStatusEnum.Warn || this.statusDirective.status === DaffStatusEnum.Critical ? 'alert' : 'status';\n };\n\n /** Whether the notification can be dismissed by the user.\n * Displays a close icon if `true`.\n */\n @Input() dismissible = false;\n\n constructor(private statusDirective: DaffStatusableDirective) {}\n\n /**\n * The orientation of a notification.\n */\n @Input({ transform: (value: DaffNotificationOrientation | null | undefined) => value || DaffNotificationOrientationEnum.Vertical })\n orientation: DaffNotificationOrientation = 'vertical';\n\n /**\n * Emits when the notification is closed.\n */\n @Output() closeNotification: EventEmitter<void> = new EventEmitter();\n\n /**\n * @docs-private\n *\n * Internal handler for the close icon click.\n */\n onCloseNotification(event: Event) {\n this.closeNotification.emit();\n }\n}\n","@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-notification__body\">\n <div class=\"daff-notification__content\">\n <ng-content select=\"[daffNotificationTitle]\"></ng-content>\n <ng-content select=\"[daffNotificationMessage]\"></ng-content>\n </div>\n @if (_actions) {\n <ng-content select=\"[daffNotificationActions]\"></ng-content>\n }\n</div>\n@if (dismissible) {\n <button class=\"daff-notification__close-icon\" (click)=\"onCloseNotification($event)\">\n <fa-icon [icon]=\"faTimes\" [fixedWidth]=\"true\"></fa-icon>\n </button>\n}","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n/**\n * Message provides additional details or supporting context that supplements\n * the notification title. Keep this brief—ideally one to two short sentences.\n *\n * @example\n * ```html\n * <div daffNotificationMessage>We were unable to process your payment for order #12345. Please update your payment details and try again.</div>\n * ```\n */\n@Directive({\n selector: '[daffNotificationMessage]',\n host: {\n 'class': 'daff-notification__message',\n },\n})\n\nexport class DaffNotificationMessageDirective {}\n","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n/**\n * @deprecated in favor of DaffNotificationMessageDirective. Deprecated in version 0.88.0. Will be removed in version 0.91.0.\n */\n@Directive({\n selector: '[daffNotificationSubtitle]',\n host: {\n 'class': 'daff-notification__subtitle',\n },\n})\n\nexport class DaffNotificationSubtitleDirective {}\n","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n/**\n * Title is the primary text summarizing the notification.\n *\n * @example\n * ```html\n * <div daffNotificationTitle>Payment Failed</div>\n * ```\n */\n@Directive({\n selector: '[daffNotificationTitle]',\n host: {\n 'class': 'daff-notification__title',\n },\n})\n\nexport class DaffNotificationTitleDirective {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\n\nimport { DaffPrefixSuffixModule } from '@daffodil/design';\n\nimport { DaffNotificationComponent } from './notification/notification.component';\nimport { DaffNotificationActionsDirective } from './notification-actions/notification-actions.directive';\nimport { DaffNotificationMessageDirective } from './notification-message/notification-message.directive';\nimport { DaffNotificationSubtitleDirective } from './notification-subtitle/notification-subtitle.directive';\nimport { DaffNotificationTitleDirective } from './notification-title/notification-title.directive';\n\n/**\n * @deprecated in favor of {@link DAFF_NOTIFICATION_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffPrefixSuffixModule,\n FontAwesomeModule,\n DaffNotificationComponent,\n DaffNotificationActionsDirective,\n DaffNotificationMessageDirective,\n DaffNotificationTitleDirective,\n DaffNotificationSubtitleDirective,\n ],\n exports: [\n DaffNotificationComponent,\n DaffNotificationActionsDirective,\n DaffNotificationMessageDirective,\n DaffNotificationTitleDirective,\n DaffNotificationSubtitleDirective,\n DaffPrefixSuffixModule,\n ],\n})\nexport class DaffNotificationModule { }\n","import { DaffPrefixDirective } from '@daffodil/design';\n\nimport { DaffNotificationComponent } from './notification/notification.component';\nimport { DaffNotificationActionsDirective } from './notification-actions/notification-actions.directive';\nimport { DaffNotificationMessageDirective } from './notification-message/notification-message.directive';\nimport { DaffNotificationSubtitleDirective } from './notification-subtitle/notification-subtitle.directive';\nimport { DaffNotificationTitleDirective } from './notification-title/notification-title.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_NOTIFICATION_COMPONENTS = <const> [\n DaffNotificationComponent,\n DaffNotificationActionsDirective,\n DaffNotificationMessageDirective,\n DaffNotificationTitleDirective,\n DaffNotificationSubtitleDirective,\n DaffPrefixDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAUA;;;AAGG;IACS;AAAZ,CAAA,UAAY,+BAA+B,EAAA;AACzC,IAAA,+BAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzB,IAAA,+BAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACvB,CAAC,EAHW,+BAA+B,KAA/B,+BAA+B,GAG1C,EAAA,CAAA,CAAA;;ACjBD;AAGA;;;;;;;;;;AAUG;MAQU,gCAAgC,CAAA;kIAAhC,gCAAgC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;sHAAhC,gCAAgC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,4BAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAhC,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAP5C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,2BAA2B;AACrC,oBAAA,IAAI,EAAE;AACJ,wBAAA,OAAO,EAAE,4BAA4B;AACtC,qBAAA;AACF,iBAAA;;;ACnBD;AA0BA;;;;;;;;;;;;;;;;;AAiBG;MA2BU,yBAAyB,CAAA;AAgBpC;;;;;AAKG;AACH,IAAA,IAAI,IAAI,GAAA;QACN,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,KAAK,cAAc,CAAC,IAAI,IAAI,IAAI,CAAC,eAAe,CAAC,MAAM,KAAK,cAAc,CAAC,QAAQ,GAAG,OAAO,GAAG,QAAQ;;;AAQ5I,IAAA,WAAA,CAAoB,eAAwC,EAAA;QAAxC,IAAe,CAAA,e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,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,sBAAsB;wBACtB,iBAAiB;wBACjB,yBAAyB;wBACzB,gCAAgC;wBAChC,gCAAgC;wBAChC,8BAA8B;wBAC9B,iCAAiC;AAClC,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,yBAAyB;wBACzB,gCAAgC;wBAChC,gCAAgC;wBAChC,8BAA8B;wBAC9B,iCAAiC;wBACjC,sBAAsB;AACvB,qBAAA;AACF,iBAAA;;;AC1BD;;AAEG;AACU,MAAA,4BAA4B,GAAW;IAClD,yBAAyB;IACzB,gCAAgC;IAChC,gCAAgC;IAChC,8BAA8B;IAC9B,iCAAiC;IACjC,mBAAmB;;;ACjBrB;;AAEG;;;;"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { NgIf, NgFor, CommonModule } from '@angular/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { EventEmitter, Output, Input,
|
3
|
+
import { EventEmitter, Output, Input, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
4
4
|
import * as i1 from '@angular/router';
|
5
5
|
import { RouterModule } from '@angular/router';
|
6
6
|
import { FaIconComponent, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
@@ -9,18 +9,11 @@ import { faChevronRight, faChevronLeft } from '@fortawesome/free-solid-svg-icons
|
|
9
9
|
const DaffPaginatorNumberOfPagesErrorMessage = 'The numberOfPages in the daff-paginator must not be less than 1';
|
10
10
|
const DaffPaginatorPageOutOfRangeErrorMessage = 'The numberOfPages in the daff-paginator should not be less than the currentPage';
|
11
11
|
|
12
|
+
/* eslint-disable quote-props */
|
12
13
|
const visiblePageRange = 2;
|
13
14
|
class DaffPaginatorComponent {
|
14
15
|
constructor(elementRef) {
|
15
16
|
this.elementRef = elementRef;
|
16
|
-
/**
|
17
|
-
* @docs-private
|
18
|
-
*/
|
19
|
-
this.class = true;
|
20
|
-
/**
|
21
|
-
* @docs-private
|
22
|
-
*/
|
23
|
-
this.role = 'navigation';
|
24
17
|
/**
|
25
18
|
* @docs-private
|
26
19
|
*/
|
@@ -108,7 +101,6 @@ class DaffPaginatorComponent {
|
|
108
101
|
* Emits a pageNumber to notifyPageChange Output.
|
109
102
|
*
|
110
103
|
* @docs-private
|
111
|
-
* @param pageNumber a page number
|
112
104
|
*/
|
113
105
|
_onNotifyPageChange(pageNumber) {
|
114
106
|
this.notifyPageChange.emit(pageNumber);
|
@@ -117,7 +109,6 @@ class DaffPaginatorComponent {
|
|
117
109
|
* A simple function that determines if the given page number is the current page number.
|
118
110
|
*
|
119
111
|
* @docs-private
|
120
|
-
* @param page a page number
|
121
112
|
*/
|
122
113
|
_isSelected(page) {
|
123
114
|
return page === this.currentPage;
|
@@ -127,7 +118,6 @@ class DaffPaginatorComponent {
|
|
127
118
|
* so the paginator retains the same total width at the extreme page numbers (1 and numberOfPages).
|
128
119
|
*
|
129
120
|
* @docs-private
|
130
|
-
* @param pageNumber page number to check.
|
131
121
|
*/
|
132
122
|
_showNumber(pageNumber) {
|
133
123
|
return Math.abs(this.currentPage - pageNumber) < visiblePageRange
|
@@ -143,23 +133,20 @@ class DaffPaginatorComponent {
|
|
143
133
|
};
|
144
134
|
}
|
145
135
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffPaginatorComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
146
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: DaffPaginatorComponent, isStandalone: true, selector: "daff-paginator", inputs: { numberOfPages: "numberOfPages", currentPage: "currentPage", linkMode: "linkMode", url: "url", queryParam: "queryParam" }, outputs: { notifyPageChange: "notifyPageChange" }, host: {
|
136
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: DaffPaginatorComponent, isStandalone: true, selector: "daff-paginator", inputs: { numberOfPages: "numberOfPages", currentPage: "currentPage", linkMode: "linkMode", url: "url", queryParam: "queryParam" }, outputs: { notifyPageChange: "notifyPageChange" }, host: { attributes: { "role": "navigation" }, classAttribute: "daff-paginator" }, usesOnChanges: true, ngImport: i0, template: "<button *ngIf=\"!linkMode\" type=\"button\" class=\"daff-paginator__previous\"\n [disabled]=\"_disablePrev\"\n tabindex=\"0\"\n attr.aria-label=\"Go to Previous Page of {{_paginatorId}} Paginator\"\n (click)=\"_onNotifyPrevPageChange()\">\n <fa-icon [icon]=\"faChevronLeft\" size=\"sm\"></fa-icon> Previous\n</button>\n<ng-container *ngIf=\"linkMode\">\n <a class=\"daff-paginator__previous\"\n *ngIf=\"!_disablePrev\"\n attr.aria-label=\"Go to Previous Page of {{_paginatorId}} Paginator\"\n [routerLink]=\"url\"\n queryParamsHandling=\"merge\"\n [queryParams]=\"_buildPageQueryParams(currentPage - 1)\">\n <fa-icon [icon]=\"faChevronLeft\" size=\"sm\"></fa-icon><span>Previous</span>\n </a>\n <span class=\"daff-paginator__previous disabled\"\n *ngIf=\"_disablePrev\"\n attr.aria-label=\"Go to Previous Page of {{_paginatorId}} Paginator\"\n [attr.disabled]=\"true\">\n <fa-icon [icon]=\"faChevronLeft\" size=\"sm\"></fa-icon><span>Previous</span>\n </span>\n</ng-container>\n\n<button *ngIf=\"!linkMode\" type=\"button\" class=\"daff-paginator__page-link\"\n [class.selected]=\"_isSelected(1)\"\n tabindex=\"0\"\n attr.aria-label=\"Go to Page 1 of {{_paginatorId}} Paginator\"\n (click)=\"_onNotifyPageChange(1)\">\n <span>1</span>\n</button>\n<a *ngIf=\"linkMode\" class=\"daff-paginator__page-link\"\n [routerLink]=\"url\"\n [queryParams]=\"_buildPageQueryParams(1)\"\n queryParamsHandling=\"merge\"\n [class.selected]=\"_isSelected(1)\"\n attr.aria-label=\"Go to Page 1 of {{_paginatorId}} Paginator\"\n><span>1</span></a>\n\n<span class=\"daff-paginator__ellipsis\" *ngIf=\"_showFirstEllipsis\">...</span>\n\n<ng-container *ngFor=\"let pageNumber of _numberOfPagesArray\">\n <ng-container *ngIf=\"_showNumber(pageNumber)\">\n <button *ngIf=\"!linkMode\" type=\"button\" class=\"daff-paginator__page-link\"\n [class.selected]=\"_isSelected(pageNumber)\"\n [attr.data-page-number]=\"pageNumber\"\n tabindex=\"0\"\n attr.aria-label=\"Go to Page {{pageNumber}} of {{_paginatorId}} Paginator\"\n aria-current=\"_isSelected(pageNumber)\"\n (click)=\"_onNotifyPageChange(pageNumber)\">\n <span>{{ pageNumber }}</span>\n </button>\n <a *ngIf=\"linkMode\" class=\"daff-paginator__page-link\"\n [attr.data-page-number]=\"pageNumber\"\n [routerLink]=\"url\"\n [queryParams]=\"_buildPageQueryParams(pageNumber)\"\n queryParamsHandling=\"merge\"\n [class.selected]=\"_isSelected(pageNumber)\"\n attr.aria-label=\"Go to Page {{pageNumber}} of {{_paginatorId}} Paginator\"\n ><span>{{ pageNumber }}</span></a>\n </ng-container>\n</ng-container>\n\n<span class=\"daff-paginator__ellipsis\" *ngIf=\"_showLastEllipsis\">...</span>\n\n<ng-container *ngIf=\"!(numberOfPages < 2)\">\n <button *ngIf=\"!linkMode\" type=\"button\" class=\"daff-paginator__page-link\"\n [class.selected]=\"_isSelected(numberOfPages)\"\n tabindex=\"0\"\n attr.aria-label=\"Go To Page {{numberOfPages}} of {{_paginatorId}} Paginator\"\n (click)=\"_onNotifyPageChange(numberOfPages)\"\n >\n <span>{{ numberOfPages }}</span>\n </button>\n <a *ngIf=\"linkMode\" class=\"daff-paginator__page-link\"\n [routerLink]=\"url\"\n [queryParams]=\"_buildPageQueryParams(numberOfPages)\"\n queryParamsHandling=\"merge\"\n [class.selected]=\"_isSelected(numberOfPages)\"\n attr.aria-label=\"Go to Page {{numberOfPages}} of {{_paginatorId}} Paginator\"\n ><span>{{ numberOfPages }}</span></a>\n</ng-container>\n\n<button *ngIf=\"!linkMode\" class=\"daff-paginator__next\"\n [disabled]=\"_disableNext\"\n tabindex=\"0\"\n attr.aria-label=\"Go to Next Page of {{_paginatorId}} Paginator\"\n (click)=\"_onNotifyNextPageChange()\">\n Next <fa-icon [icon]=\"faChevronRight\" size=\"sm\"></fa-icon>\n</button>\n<ng-container *ngIf=\"linkMode\">\n <a class=\"daff-paginator__next\"\n *ngIf=\"!_disableNext\"\n [routerLink]=\"url\"\n attr.aria-label=\"Go to Next Page of {{_paginatorId}} Paginator\"\n queryParamsHandling=\"merge\"\n [queryParams]=\"_buildPageQueryParams(currentPage + 1)\">\n <span>Next</span><fa-icon [icon]=\"faChevronRight\" size=\"sm\"></fa-icon>\n </a>\n <span class=\"daff-paginator__next disabled\"\n *ngIf=\"_disableNext\"\n attr.aria-label=\"Go to Next Page of {{_paginatorId}} Paginator\"\n [attr.disabled]=\"true\">\n <span>Next</span><fa-icon [icon]=\"faChevronRight\" size=\"sm\"></fa-icon>\n </span>\n</ng-container>\n", styles: [":host{display:flex;gap:.25rem}.daff-paginator__page-link,.daff-paginator__previous,.daff-paginator__next{text-decoration:none}.daff-paginator__previous,.daff-paginator__next{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center;appearance:none;background:none;border:0;border-radius:.25rem;gap:.5rem;height:2rem;padding:0 .5rem}.daff-paginator__previous[disabled],.daff-paginator__next[disabled]{cursor:not-allowed;opacity:.5}.daff-paginator__ellipsis{height:2rem;width:2rem;display:flex;align-items:center;justify-content:center}.daff-paginator__page-link{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center;appearance:none;background:none;border:0;border-radius:.25rem;min-width:2rem;height:2rem;padding:0 .25rem;position:relative}.daff-paginator__page-link span{z-index:2}.daff-paginator__page-link:after{content:\"\";border-radius:.25rem;position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;transition:opacity .3s}.daff-paginator__page-link:hover:after,.daff-paginator__page-link:active:after,.daff-paginator__page-link.selected:after{opacity:1}\n"], dependencies: [{ kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
147
137
|
}
|
148
138
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DaffPaginatorComponent, decorators: [{
|
149
139
|
type: Component,
|
150
|
-
args: [{ selector: 'daff-paginator', changeDetection: ChangeDetectionStrategy.OnPush,
|
140
|
+
args: [{ selector: 'daff-paginator', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
141
|
+
'class': 'daff-paginator',
|
142
|
+
'role': 'navigation',
|
143
|
+
}, imports: [
|
151
144
|
FaIconComponent,
|
152
145
|
RouterModule,
|
153
146
|
NgIf,
|
154
147
|
NgFor,
|
155
148
|
], template: "<button *ngIf=\"!linkMode\" type=\"button\" class=\"daff-paginator__previous\"\n [disabled]=\"_disablePrev\"\n tabindex=\"0\"\n attr.aria-label=\"Go to Previous Page of {{_paginatorId}} Paginator\"\n (click)=\"_onNotifyPrevPageChange()\">\n <fa-icon [icon]=\"faChevronLeft\" size=\"sm\"></fa-icon> Previous\n</button>\n<ng-container *ngIf=\"linkMode\">\n <a class=\"daff-paginator__previous\"\n *ngIf=\"!_disablePrev\"\n attr.aria-label=\"Go to Previous Page of {{_paginatorId}} Paginator\"\n [routerLink]=\"url\"\n queryParamsHandling=\"merge\"\n [queryParams]=\"_buildPageQueryParams(currentPage - 1)\">\n <fa-icon [icon]=\"faChevronLeft\" size=\"sm\"></fa-icon><span>Previous</span>\n </a>\n <span class=\"daff-paginator__previous disabled\"\n *ngIf=\"_disablePrev\"\n attr.aria-label=\"Go to Previous Page of {{_paginatorId}} Paginator\"\n [attr.disabled]=\"true\">\n <fa-icon [icon]=\"faChevronLeft\" size=\"sm\"></fa-icon><span>Previous</span>\n </span>\n</ng-container>\n\n<button *ngIf=\"!linkMode\" type=\"button\" class=\"daff-paginator__page-link\"\n [class.selected]=\"_isSelected(1)\"\n tabindex=\"0\"\n attr.aria-label=\"Go to Page 1 of {{_paginatorId}} Paginator\"\n (click)=\"_onNotifyPageChange(1)\">\n <span>1</span>\n</button>\n<a *ngIf=\"linkMode\" class=\"daff-paginator__page-link\"\n [routerLink]=\"url\"\n [queryParams]=\"_buildPageQueryParams(1)\"\n queryParamsHandling=\"merge\"\n [class.selected]=\"_isSelected(1)\"\n attr.aria-label=\"Go to Page 1 of {{_paginatorId}} Paginator\"\n><span>1</span></a>\n\n<span class=\"daff-paginator__ellipsis\" *ngIf=\"_showFirstEllipsis\">...</span>\n\n<ng-container *ngFor=\"let pageNumber of _numberOfPagesArray\">\n <ng-container *ngIf=\"_showNumber(pageNumber)\">\n <button *ngIf=\"!linkMode\" type=\"button\" class=\"daff-paginator__page-link\"\n [class.selected]=\"_isSelected(pageNumber)\"\n [attr.data-page-number]=\"pageNumber\"\n tabindex=\"0\"\n attr.aria-label=\"Go to Page {{pageNumber}} of {{_paginatorId}} Paginator\"\n aria-current=\"_isSelected(pageNumber)\"\n (click)=\"_onNotifyPageChange(pageNumber)\">\n <span>{{ pageNumber }}</span>\n </button>\n <a *ngIf=\"linkMode\" class=\"daff-paginator__page-link\"\n [attr.data-page-number]=\"pageNumber\"\n [routerLink]=\"url\"\n [queryParams]=\"_buildPageQueryParams(pageNumber)\"\n queryParamsHandling=\"merge\"\n [class.selected]=\"_isSelected(pageNumber)\"\n attr.aria-label=\"Go to Page {{pageNumber}} of {{_paginatorId}} Paginator\"\n ><span>{{ pageNumber }}</span></a>\n </ng-container>\n</ng-container>\n\n<span class=\"daff-paginator__ellipsis\" *ngIf=\"_showLastEllipsis\">...</span>\n\n<ng-container *ngIf=\"!(numberOfPages < 2)\">\n <button *ngIf=\"!linkMode\" type=\"button\" class=\"daff-paginator__page-link\"\n [class.selected]=\"_isSelected(numberOfPages)\"\n tabindex=\"0\"\n attr.aria-label=\"Go To Page {{numberOfPages}} of {{_paginatorId}} Paginator\"\n (click)=\"_onNotifyPageChange(numberOfPages)\"\n >\n <span>{{ numberOfPages }}</span>\n </button>\n <a *ngIf=\"linkMode\" class=\"daff-paginator__page-link\"\n [routerLink]=\"url\"\n [queryParams]=\"_buildPageQueryParams(numberOfPages)\"\n queryParamsHandling=\"merge\"\n [class.selected]=\"_isSelected(numberOfPages)\"\n attr.aria-label=\"Go to Page {{numberOfPages}} of {{_paginatorId}} Paginator\"\n ><span>{{ numberOfPages }}</span></a>\n</ng-container>\n\n<button *ngIf=\"!linkMode\" class=\"daff-paginator__next\"\n [disabled]=\"_disableNext\"\n tabindex=\"0\"\n attr.aria-label=\"Go to Next Page of {{_paginatorId}} Paginator\"\n (click)=\"_onNotifyNextPageChange()\">\n Next <fa-icon [icon]=\"faChevronRight\" size=\"sm\"></fa-icon>\n</button>\n<ng-container *ngIf=\"linkMode\">\n <a class=\"daff-paginator__next\"\n *ngIf=\"!_disableNext\"\n [routerLink]=\"url\"\n attr.aria-label=\"Go to Next Page of {{_paginatorId}} Paginator\"\n queryParamsHandling=\"merge\"\n [queryParams]=\"_buildPageQueryParams(currentPage + 1)\">\n <span>Next</span><fa-icon [icon]=\"faChevronRight\" size=\"sm\"></fa-icon>\n </a>\n <span class=\"daff-paginator__next disabled\"\n *ngIf=\"_disableNext\"\n attr.aria-label=\"Go to Next Page of {{_paginatorId}} Paginator\"\n [attr.disabled]=\"true\">\n <span>Next</span><fa-icon [icon]=\"faChevronRight\" size=\"sm\"></fa-icon>\n </span>\n</ng-container>\n", styles: [":host{display:flex;gap:.25rem}.daff-paginator__page-link,.daff-paginator__previous,.daff-paginator__next{text-decoration:none}.daff-paginator__previous,.daff-paginator__next{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center;appearance:none;background:none;border:0;border-radius:.25rem;gap:.5rem;height:2rem;padding:0 .5rem}.daff-paginator__previous[disabled],.daff-paginator__next[disabled]{cursor:not-allowed;opacity:.5}.daff-paginator__ellipsis{height:2rem;width:2rem;display:flex;align-items:center;justify-content:center}.daff-paginator__page-link{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center;appearance:none;background:none;border:0;border-radius:.25rem;min-width:2rem;height:2rem;padding:0 .25rem;position:relative}.daff-paginator__page-link span{z-index:2}.daff-paginator__page-link:after{content:\"\";border-radius:.25rem;position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;transition:opacity .3s}.daff-paginator__page-link:hover:after,.daff-paginator__page-link:active:after,.daff-paginator__page-link.selected:after{opacity:1}\n"] }]
|
156
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: {
|
157
|
-
type: HostBinding,
|
158
|
-
args: ['class.daff-paginator']
|
159
|
-
}], role: [{
|
160
|
-
type: HostBinding,
|
161
|
-
args: ['attr.role']
|
162
|
-
}], numberOfPages: [{
|
149
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { numberOfPages: [{
|
163
150
|
type: Input
|
164
151
|
}], currentPage: [{
|
165
152
|
type: Input
|