@daffodil/design 0.91.0 → 0.92.3-rc.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/accordion/README.md +26 -38
- package/accordion/index.d.ts +2 -2
- package/article/README.md +66 -46
- package/article/index.d.ts +22 -1
- package/article/src/article-theme.scss +12 -0
- package/breadcrumb/README.md +6 -1
- package/breadcrumb/index.d.ts +65 -11
- package/breadcrumb/src/breadcrumb-theme.scss +1 -1
- package/button/README.md +36 -33
- package/button/index.d.ts +26 -5
- package/button/src/button/basic/button-theme.scss +4 -2
- package/button/src/button/button-base.scss +26 -3
- package/button/src/button/icon/icon-theme.scss +10 -6
- package/button/src/button/raised/raised-theme.scss +4 -2
- package/callout/README.md +15 -27
- package/card/README.md +36 -61
- package/container/README.md +18 -23
- package/fesm2022/daffodil-design-accordion.mjs +13 -13
- package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
- package/fesm2022/daffodil-design-article.mjs +168 -26
- package/fesm2022/daffodil-design-article.mjs.map +1 -1
- package/fesm2022/daffodil-design-breadcrumb.mjs +180 -28
- package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
- package/fesm2022/daffodil-design-button.mjs +83 -42
- package/fesm2022/daffodil-design-button.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout.mjs +23 -23
- package/fesm2022/daffodil-design-callout.mjs.map +1 -1
- package/fesm2022/daffodil-design-card.mjs +33 -33
- package/fesm2022/daffodil-design-card.mjs.map +1 -1
- package/fesm2022/daffodil-design-checkbox.mjs +13 -13
- package/fesm2022/daffodil-design-checkbox.mjs.map +1 -1
- package/fesm2022/daffodil-design-container.mjs +8 -8
- package/fesm2022/daffodil-design-container.mjs.map +1 -1
- package/fesm2022/daffodil-design-form-field.mjs +26 -26
- package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
- package/fesm2022/daffodil-design-form.mjs +9 -9
- package/fesm2022/daffodil-design-form.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero.mjs +23 -23
- package/fesm2022/daffodil-design-hero.mjs.map +1 -1
- package/fesm2022/daffodil-design-image.mjs +8 -8
- package/fesm2022/daffodil-design-image.mjs.map +1 -1
- package/fesm2022/daffodil-design-input.mjs +18 -14
- package/fesm2022/daffodil-design-input.mjs.map +1 -1
- package/fesm2022/daffodil-design-link-set.mjs +25 -17
- package/fesm2022/daffodil-design-link-set.mjs.map +1 -1
- package/fesm2022/daffodil-design-list.mjs +16 -16
- package/fesm2022/daffodil-design-list.mjs.map +1 -1
- package/fesm2022/daffodil-design-loading-icon.mjs +8 -8
- package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery.mjs +13 -13
- package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu.mjs +223 -60
- package/fesm2022/daffodil-design-menu.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal.mjs +33 -29
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-native-select.mjs +47 -41
- package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar.mjs +25 -21
- package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +16 -16
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator.mjs +7 -7
- package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs +10 -10
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-quantity-field.mjs +17 -14
- package/fesm2022/daffodil-design-quantity-field.mjs.map +1 -1
- package/fesm2022/daffodil-design-radio.mjs +16 -16
- package/fesm2022/daffodil-design-radio.mjs.map +1 -1
- package/fesm2022/daffodil-design-select.mjs +6 -6
- package/fesm2022/daffodil-design-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +25 -25
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-spinner.mjs +99 -0
- package/fesm2022/daffodil-design-spinner.mjs.map +1 -0
- package/fesm2022/daffodil-design-switch.mjs +3 -3
- package/fesm2022/daffodil-design-switch.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs.mjs +15 -15
- package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
- package/fesm2022/daffodil-design-tag.mjs +7 -7
- package/fesm2022/daffodil-design-tag.mjs.map +1 -1
- package/fesm2022/daffodil-design-text-snippet.mjs +6 -8
- package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
- package/fesm2022/daffodil-design-textarea.mjs +6 -3
- package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +23 -25
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree.mjs +152 -103
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design-youtube-player.mjs +6 -6
- package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +385 -326
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/form-field/README.md +50 -85
- package/form-field/index.d.ts +11 -9
- package/hero/README.md +5 -5
- package/image/README.md +2 -2
- package/index.d.ts +184 -270
- package/input/README.md +4 -4
- package/input/index.d.ts +4 -3
- package/link-set/index.d.ts +9 -1
- package/list/README.md +2 -2
- package/loading-icon/README.md +1 -1
- package/loading-icon/index.d.ts +1 -1
- package/media-gallery/README.md +3 -3
- package/menu/README.md +107 -10
- package/menu/index.d.ts +143 -11
- package/modal/README.md +1 -1
- package/modal/index.d.ts +23 -15
- package/native-select/README.md +4 -4
- package/native-select/index.d.ts +8 -7
- package/navbar/README.md +23 -17
- package/navbar/index.d.ts +12 -2
- package/navbar/src/navbar-theme.scss +4 -46
- package/notification/README.md +4 -4
- package/package.json +1 -1
- package/paginator/README.md +42 -6
- package/paginator/index.d.ts +4 -2
- package/progress-bar/README.md +3 -3
- package/quantity-field/README.md +4 -4
- package/quantity-field/index.d.ts +4 -1
- package/radio/README.md +1 -1
- package/scss/theme.scss +7 -1
- package/scss/theming/_color-palettes.scss +0 -6
- package/select/README.md +4 -4
- package/sidebar/README.md +6 -6
- package/spinner/README.md +57 -0
- package/spinner/index.d.ts +53 -0
- package/spinner/src/spinner-theme.scss +62 -0
- package/switch/README.md +4 -4
- package/switch/index.d.ts +2 -2
- package/tabs/README.md +1 -1
- package/tabs/index.d.ts +2 -2
- package/tag/README.md +24 -30
- package/tag/index.d.ts +1 -1
- package/text-snippet/README.md +1 -1
- package/text-snippet/src/text-snippet-theme.scss +12 -0
- package/textarea/README.md +4 -4
- package/textarea/index.d.ts +4 -4
- package/toast/README.md +4 -4
- package/tree/README.md +39 -22
- package/tree/index.d.ts +57 -90
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-design-navbar.mjs","sources":["../../../libs/design/navbar/src/navbar/navbar.component.ts","../../../libs/design/navbar/src/navbar.module.ts","../../../libs/design/navbar/src/navbar.ts","../../../libs/design/navbar/src/daffodil-design-navbar.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"daffodil-design-navbar.mjs","sources":["../../../libs/design/navbar/src/navbar/navbar.component.ts","../../../libs/design/navbar/src/navbar.module.ts","../../../libs/design/navbar/src/navbar.ts","../../../libs/design/navbar/src/daffodil-design-navbar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n input,\n} from '@angular/core';\n\nimport { DaffManageContainerLayoutDirective } from '@daffodil/design';\n\n/**\n * Navbar is a flexible and extensible component that provides a container for navigation elements.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'nav[daff-navbar]',\n styleUrl: './navbar.component.scss',\n template: '<ng-content></ng-content>',\n hostDirectives: [\n { directive: DaffManageContainerLayoutDirective },\n ],\n host: {\n class: 'daff-navbar',\n '[class.elevated]': 'elevated()',\n '[class.blurred]': 'blurred()',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffNavbarComponent {\n /**\n * Whether the navbar should have an elevated appearance with a shadow effect.\n */\n elevated = input(false);\n\n /**\n * Whether the navbar should have a blurred background effect.\n */\n blurred = input(false);\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffNavbarComponent } from './navbar/navbar.component';\n\n/**\n * @deprecated in favor of {@link DAFF_NAVBAR_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffNavbarComponent,\n ],\n exports: [\n DaffNavbarComponent,\n ],\n})\nexport class DaffNavbarModule { }\n","import { DaffNavbarComponent } from './navbar/navbar.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_NAVBAR_COMPONENTS = <const> [\n DaffNavbarComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAQA;;AAEG;MAgBU,mBAAmB,CAAA;AAfhC,IAAA,WAAA,GAAA;AAgBE;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,oDAAC;AAEvB;;AAEG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,KAAK,mDAAC;AACvB,IAAA;kIAVY,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mBAAmB,shBAXpB,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,8JAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,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B,GAAW;IAC5C,mBAAmB;;;ACNrB;;AAEG;;;;"}
|
|
@@ -19,10 +19,10 @@ import { faTimes } from '@fortawesome/free-solid-svg-icons';
|
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
21
|
class DaffNotificationActionsDirective {
|
|
22
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
23
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
22
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffNotificationActionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
23
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffNotificationActionsDirective, isStandalone: true, selector: "[daffNotificationActions]", host: { classAttribute: "daff-notification__actions" }, ngImport: i0 }); }
|
|
24
24
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffNotificationActionsDirective, decorators: [{
|
|
26
26
|
type: Directive,
|
|
27
27
|
args: [{
|
|
28
28
|
selector: '[daffNotificationActions]',
|
|
@@ -87,10 +87,10 @@ class DaffNotificationComponent {
|
|
|
87
87
|
onCloseNotification(event) {
|
|
88
88
|
this.closeNotification.emit();
|
|
89
89
|
}
|
|
90
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
91
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
90
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffNotificationComponent, deps: [{ token: i1.DaffStatusableDirective }, { token: i1.DaffOrientableDirective }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
91
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: DaffNotificationComponent, isStandalone: true, selector: "daff-notification", inputs: { dismissible: "dismissible" }, outputs: { closeNotification: "closeNotification" }, host: { attributes: { "tabindex": "0" }, properties: { "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"] }, { directive: i1.DaffOrientableDirective, inputs: ["orientation", "orientation"] }], 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.daff-horizontal .daff-notification__actions{padding:.5rem 0}.daff-notification.daff-vertical .daff-notification__body{flex-direction:column;gap:1rem}.daff-notification.daff-horizontal .daff-prefix{padding:.75rem 0 .75rem 1rem}.daff-notification.daff-horizontal .daff-notification__message{align-self:center}.daff-notification.daff-horizontal .daff-notification__body{flex-direction:row;gap:0;padding:0}.daff-notification.daff-horizontal .daff-notification__content{flex-direction:row;flex-wrap:wrap;flex-grow:1;padding:.75rem 1rem .75rem .75rem}.daff-notification.daff-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"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
92
92
|
}
|
|
93
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
93
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffNotificationComponent, decorators: [{
|
|
94
94
|
type: Component,
|
|
95
95
|
args: [{ selector: 'daff-notification', hostDirectives: [
|
|
96
96
|
{ directive: DaffArticleEncapsulatedDirective },
|
|
@@ -134,10 +134,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
134
134
|
* ```
|
|
135
135
|
*/
|
|
136
136
|
class DaffNotificationMessageDirective {
|
|
137
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
138
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
137
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffNotificationMessageDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
138
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffNotificationMessageDirective, isStandalone: true, selector: "[daffNotificationMessage]", host: { classAttribute: "daff-notification__message" }, ngImport: i0 }); }
|
|
139
139
|
}
|
|
140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffNotificationMessageDirective, decorators: [{
|
|
141
141
|
type: Directive,
|
|
142
142
|
args: [{
|
|
143
143
|
selector: '[daffNotificationMessage]',
|
|
@@ -157,10 +157,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
157
157
|
* ```
|
|
158
158
|
*/
|
|
159
159
|
class DaffNotificationTitleDirective {
|
|
160
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
161
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
160
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffNotificationTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
161
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffNotificationTitleDirective, isStandalone: true, selector: "[daffNotificationTitle]", host: { classAttribute: "daff-notification__title" }, ngImport: i0 }); }
|
|
162
162
|
}
|
|
163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffNotificationTitleDirective, decorators: [{
|
|
164
164
|
type: Directive,
|
|
165
165
|
args: [{
|
|
166
166
|
selector: '[daffNotificationTitle]',
|
|
@@ -174,8 +174,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
174
174
|
* @deprecated in favor of {@link DAFF_NOTIFICATION_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.
|
|
175
175
|
*/
|
|
176
176
|
class DaffNotificationModule {
|
|
177
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
178
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
177
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffNotificationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
178
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffNotificationModule, imports: [CommonModule,
|
|
179
179
|
DaffPrefixSuffixModule,
|
|
180
180
|
FontAwesomeModule,
|
|
181
181
|
DaffNotificationComponent,
|
|
@@ -186,12 +186,12 @@ class DaffNotificationModule {
|
|
|
186
186
|
DaffNotificationMessageDirective,
|
|
187
187
|
DaffNotificationTitleDirective,
|
|
188
188
|
DaffPrefixSuffixModule] }); }
|
|
189
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
189
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffNotificationModule, imports: [CommonModule,
|
|
190
190
|
DaffPrefixSuffixModule,
|
|
191
191
|
FontAwesomeModule,
|
|
192
192
|
DaffNotificationComponent, DaffPrefixSuffixModule] }); }
|
|
193
193
|
}
|
|
194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffNotificationModule, decorators: [{
|
|
195
195
|
type: NgModule,
|
|
196
196
|
args: [{
|
|
197
197
|
imports: [
|
|
@@ -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-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":["/* 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 DaffOrientableDirective,\n DaffPrefixDirective,\n DaffStatusableDirective,\n DaffStatusEnum,\n} from '@daffodil/design';\n\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 directive: DaffOrientableDirective,\n inputs: ['orientation'],\n },\n ],\n host: {\n 'class': 'daff-notification',\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(\n private statusDirective: DaffStatusableDirective,\n private orientation: DaffOrientableDirective,\n ) {\n this.orientation.defaultOrientation = 'vertical';\n }\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 * 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 { 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 ],\n exports: [\n DaffNotificationComponent,\n DaffNotificationActionsDirective,\n DaffNotificationMessageDirective,\n DaffNotificationTitleDirective,\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 { 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 DaffPrefixDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;AAGA;;;;;;;;;;AAUG;MAQU,gCAAgC,CAAA;iIAAhC,gCAAgC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;qHAAhC,gCAAgC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2B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GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YAhB/B,YAAY;YACZ,sBAAsB;YACtB,iBAAiB;AACjB,YAAA,yBAAyB,EAUzB,sBAAsB,CAAA,EAAA,CAAA,CAAA;;2FAGb,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAlBlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,sBAAsB;wBACtB,iBAAiB;wBACjB,yBAAyB;wBACzB,gCAAgC;wBAChC,gCAAgC;wBAChC,8BAA8B;AAC/B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,yBAAyB;wBACzB,gCAAgC;wBAChC,gCAAgC;wBAChC,8BAA8B;wBAC9B,sBAAsB;AACvB,qBAAA;AACF,iBAAA;;;ACxBD;;AAEG;AACI,MAAM,4BAA4B,GAAW;IAClD,yBAAyB;IACzB,gCAAgC;IAChC,gCAAgC;IAChC,8BAA8B;IAC9B,mBAAmB;;;ACfrB;;AAEG;;;;"}
|
|
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-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":["/* 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 DaffOrientableDirective,\n DaffPrefixDirective,\n DaffStatusableDirective,\n DaffStatusEnum,\n} from '@daffodil/design';\n\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 directive: DaffOrientableDirective,\n inputs: ['orientation'],\n },\n ],\n host: {\n 'class': 'daff-notification',\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(\n private statusDirective: DaffStatusableDirective,\n private orientation: DaffOrientableDirective,\n ) {\n this.orientation.defaultOrientation = 'vertical';\n }\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 * 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 { 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 ],\n exports: [\n DaffNotificationComponent,\n DaffNotificationActionsDirective,\n DaffNotificationMessageDirective,\n DaffNotificationTitleDirective,\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 { 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 DaffPrefixDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;AAGA;;;;;;;;;;AAUG;MAQU,gCAAgC,CAAA;kIAAhC,gCAAgC,EA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A,CAAA;AAGb,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YAhB/B,YAAY;YACZ,sBAAsB;YACtB,iBAAiB;AACjB,YAAA,yBAAyB,EAUzB,sBAAsB,CAAA,EAAA,CAAA,CAAA;;4FAGb,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAlBlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,sBAAsB;wBACtB,iBAAiB;wBACjB,yBAAyB;wBACzB,gCAAgC;wBAChC,gCAAgC;wBAChC,8BAA8B;AAC/B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,yBAAyB;wBACzB,gCAAgC;wBAChC,gCAAgC;wBAChC,8BAA8B;wBAC9B,sBAAsB;AACvB,qBAAA;AACF,iBAAA;;;ACxBD;;AAEG;AACI,MAAM,4BAA4B,GAAW;IAClD,yBAAyB;IACzB,gCAAgC;IAChC,gCAAgC;IAChC,8BAA8B;IAC9B,mBAAmB;;;ACfrB;;AAEG;;;;"}
|
|
@@ -129,10 +129,10 @@ class DaffPaginatorComponent {
|
|
|
129
129
|
[this.queryParam]: page,
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
133
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
132
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffPaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
133
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", 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: "@if (!linkMode) {\n <button type=\"button\" class=\"daff-paginator__previous\"\n [disabled]=\"_disablePrev\"\n tabindex=\"0\"\n attr.aria-label=\"Go to Previous Page\"\n (click)=\"_onNotifyPrevPageChange()\">\n <fa-icon [icon]=\"faChevronLeft\" size=\"sm\"></fa-icon> Previous\n </button>\n}\n@if (linkMode) {\n @if (!_disablePrev) {\n <a class=\"daff-paginator__previous\"\n attr.aria-label=\"Go to Previous Page\"\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 }\n @if (_disablePrev) {\n <span class=\"daff-paginator__previous disabled\"\n attr.aria-label=\"Go to Previous Page\"\n [attr.disabled]=\"true\">\n <fa-icon [icon]=\"faChevronLeft\" size=\"sm\"></fa-icon><span>Previous</span>\n </span>\n }\n}\n\n@if (!linkMode) {\n <button type=\"button\" class=\"daff-paginator__page-link\"\n [class.selected]=\"_isSelected(1)\"\n tabindex=\"0\"\n attr.aria-label=\"Go to Page 1\"\n (click)=\"_onNotifyPageChange(1)\">\n <span>1</span>\n </button>\n}\n\n@if (linkMode) {\n <a 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\">\n <span>1</span>\n </a>\n}\n\n@if (_showFirstEllipsis) {\n <span class=\"daff-paginator__ellipsis\">...</span>\n}\n\n@for (pageNumber of _numberOfPagesArray; track pageNumber) {\n @if (_showNumber(pageNumber)) {\n @if (!linkMode) {\n <button 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}}\"\n aria-current=\"_isSelected(pageNumber)\"\n (click)=\"_onNotifyPageChange(pageNumber)\">\n <span>{{ pageNumber }}</span>\n </button>\n }\n @if (linkMode) {\n <a 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}}\">\n <span>{{ pageNumber }}</span>\n </a>\n }\n }\n}\n\n@if (_showLastEllipsis) {\n <span class=\"daff-paginator__ellipsis\">...</span>\n}\n\n@if (!(numberOfPages < 2)) {\n @if (!linkMode) {\n <button type=\"button\" class=\"daff-paginator__page-link\"\n [class.selected]=\"_isSelected(numberOfPages)\"\n tabindex=\"0\"\n attr.aria-label=\"Go To Page {{numberOfPages}}\"\n (click)=\"_onNotifyPageChange(numberOfPages)\">\n <span>{{ numberOfPages }}</span>\n </button>\n }\n @if (linkMode) {\n <a 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}}\">\n <span>{{ numberOfPages }}</span>\n </a>\n }\n}\n\n@if (!linkMode) {\n <button class=\"daff-paginator__next\"\n [disabled]=\"_disableNext\"\n tabindex=\"0\"\n attr.aria-label=\"Go to Next Page\"\n (click)=\"_onNotifyNextPageChange()\">\n Next <fa-icon [icon]=\"faChevronRight\" size=\"sm\"></fa-icon>\n </button>\n}\n@if (linkMode) {\n @if (!_disableNext) {\n <a class=\"daff-paginator__next\"\n [routerLink]=\"url\"\n attr.aria-label=\"Go to Next Page\"\n queryParamsHandling=\"merge\"\n [queryParams]=\"_buildPageQueryParams(currentPage + 1)\">\n <span>Next</span><fa-icon [icon]=\"faChevronRight\" size=\"sm\"></fa-icon>\n </a>\n }\n\n @if (_disableNext) {\n <span class=\"daff-paginator__next disabled\"\n attr.aria-label=\"Go to Next Page\"\n [attr.disabled]=\"true\">\n <span>Next</span><fa-icon [icon]=\"faChevronRight\" size=\"sm\"></fa-icon>\n </span>\n }\n}\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"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
134
134
|
}
|
|
135
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffPaginatorComponent, decorators: [{
|
|
136
136
|
type: Component,
|
|
137
137
|
args: [{ selector: 'daff-paginator', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
138
138
|
'class': 'daff-paginator',
|
|
@@ -159,17 +159,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
159
159
|
* @deprecated in favor of {@link DAFF_PAGINATOR_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.
|
|
160
160
|
*/
|
|
161
161
|
class DaffPaginatorModule {
|
|
162
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
163
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
162
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffPaginatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
163
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffPaginatorModule, imports: [CommonModule,
|
|
164
164
|
RouterModule,
|
|
165
165
|
FontAwesomeModule,
|
|
166
166
|
DaffPaginatorComponent], exports: [DaffPaginatorComponent] }); }
|
|
167
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
167
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffPaginatorModule, imports: [CommonModule,
|
|
168
168
|
RouterModule,
|
|
169
169
|
FontAwesomeModule,
|
|
170
170
|
DaffPaginatorComponent] }); }
|
|
171
171
|
}
|
|
172
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
172
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffPaginatorModule, decorators: [{
|
|
173
173
|
type: NgModule,
|
|
174
174
|
args: [{
|
|
175
175
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-design-paginator.mjs","sources":["../../../libs/design/paginator/src/utils/paginator-errors.ts","../../../libs/design/paginator/src/paginator/paginator.component.ts","../../../libs/design/paginator/src/paginator/paginator.component.html","../../../libs/design/paginator/src/paginator.module.ts","../../../libs/design/paginator/src/paginator.ts","../../../libs/design/paginator/src/daffodil-design-paginator.ts"],"sourcesContent":["export const DaffPaginatorNumberOfPagesErrorMessage = 'The numberOfPages in the daff-paginator must not be less than 1';\nexport const DaffPaginatorPageOutOfRangeErrorMessage = 'The numberOfPages in the daff-paginator should not be less than the currentPage';\n","/* eslint-disable quote-props */\nimport {\n Component,\n Input,\n Output,\n EventEmitter,\n OnChanges,\n ChangeDetectionStrategy,\n} from '@angular/core';\nimport {\n Params,\n RouterModule,\n} from '@angular/router';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport {\n faChevronRight,\n faChevronLeft,\n} from '@fortawesome/free-solid-svg-icons';\n\nimport {\n DaffPaginatorNumberOfPagesErrorMessage,\n DaffPaginatorPageOutOfRangeErrorMessage,\n} from '../utils/paginator-errors';\n\nconst visiblePageRange = 2;\n\n@Component({\n selector: 'daff-paginator',\n styleUrls: ['./paginator.component.scss'],\n templateUrl: './paginator.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'daff-paginator',\n 'role': 'navigation',\n },\n imports: [\n FaIconComponent,\n RouterModule,\n ],\n})\nexport class DaffPaginatorComponent implements OnChanges {\n /**\n * @docs-private\n */\n faChevronRight = faChevronRight;\n /**\n * @docs-private\n */\n faChevronLeft = faChevronLeft;\n\n /**\n * The total number of pages the paginator tracks. This number can change dynamically, but the end user is responsible for keeping numberOfPages\n * and currentPage in sync. For example, if the numberOfPages is dynamically changed to a value less than the currentPage, the paginator will break.\n */\n @Input() numberOfPages: number;\n\n /**\n * The currently selected page.\n */\n @Input() currentPage: number;\n\n /**\n * Replace the paginator buttons with links. `url` is required if using this mode.\n */\n @Input() linkMode = false;\n\n /**\n * The url to which to navigate if the paginator is in link mode.\n * This paginator component will set the page query param.\n */\n @Input() url?: string;\n\n /**\n * The query param to which the paginator component will set the current page value in link mode.\n */\n @Input() queryParam = 'page';\n\n /**\n * @docs-private\n */\n _numberOfPagesArray: number[];\n\n /**\n * Emits when the current page changes with the new current page.\n */\n @Output() notifyPageChange: EventEmitter<any> = new EventEmitter();\n\n /**\n * Determines when ellipsis after the first page number should show.\n *\n * @docs-private\n */\n get _showFirstEllipsis(): boolean {\n return this.currentPage >= visiblePageRange+2;\n }\n\n /**\n * Determines when ellipsis before the final page number should show.\n *\n * @docs-private\n */\n get _showLastEllipsis(): boolean {\n return this.currentPage < (this.numberOfPages - visiblePageRange);\n }\n\n /**\n * Determines when the Previous button should be disabled.\n *\n * @docs-private\n */\n get _disablePrev(): boolean {\n return this.currentPage === 1;\n }\n\n /**\n * Determines when the Next button should be disabled.\n *\n * @docs-private\n */\n get _disableNext(): boolean {\n return this.currentPage === this.numberOfPages;\n }\n\n /**\n * @docs-private\n */\n ngOnChanges() {\n if(this.numberOfPages < 1) {\n throw new Error(DaffPaginatorNumberOfPagesErrorMessage);\n } else if(this.numberOfPages < this.currentPage) {\n throw new Error(DaffPaginatorPageOutOfRangeErrorMessage);\n }\n\n this._numberOfPagesArray = this.numberOfPages < 2 ? [] : Array(this.numberOfPages-2).fill(this.numberOfPages-2).map((x,i)=>i+2);\n }\n\n /**\n * Emits the previous page number through notifyPageChange Output.\n *\n * @docs-private\n */\n _onNotifyPrevPageChange() {\n this.notifyPageChange.emit(this.currentPage - 1);\n }\n\n /**\n * Emits the next page number through notifyPageChange Output.\n *\n * @docs-private\n */\n _onNotifyNextPageChange() {\n this.notifyPageChange.emit(this.currentPage + 1);\n }\n\n /**\n * Emits a pageNumber to notifyPageChange Output.\n *\n * @docs-private\n */\n _onNotifyPageChange(pageNumber: number) {\n this.notifyPageChange.emit(pageNumber);\n }\n\n /**\n * A simple function that determines if the given page number is the current page number.\n *\n * @docs-private\n */\n _isSelected(page: number): boolean {\n return page === this.currentPage;\n }\n\n /**\n * Determines if the given page number should be shown. The two additional 'or' conditionals are needed\n * so the paginator retains the same total width at the extreme page numbers (1 and numberOfPages).\n *\n * @docs-private\n */\n _showNumber(pageNumber: number): boolean {\n return Math.abs(this.currentPage - pageNumber) < visiblePageRange\n || (this.currentPage <= visiblePageRange && pageNumber <= 2*visiblePageRange)\n || (this.currentPage > this.numberOfPages - visiblePageRange && pageNumber > this.numberOfPages - 2*visiblePageRange);\n }\n\n /**\n * @docs-private\n */\n _buildPageQueryParams(page: number): Params {\n return {\n [this.queryParam]: page,\n };\n }\n}\n","@if (!linkMode) {\n <button type=\"button\" class=\"daff-paginator__previous\"\n [disabled]=\"_disablePrev\"\n tabindex=\"0\"\n attr.aria-label=\"Go to Previous Page\"\n (click)=\"_onNotifyPrevPageChange()\">\n <fa-icon [icon]=\"faChevronLeft\" size=\"sm\"></fa-icon> Previous\n </button>\n}\n@if (linkMode) {\n @if (!_disablePrev) {\n <a class=\"daff-paginator__previous\"\n attr.aria-label=\"Go to Previous Page\"\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 }\n @if (_disablePrev) {\n <span class=\"daff-paginator__previous disabled\"\n attr.aria-label=\"Go to Previous Page\"\n [attr.disabled]=\"true\">\n <fa-icon [icon]=\"faChevronLeft\" size=\"sm\"></fa-icon><span>Previous</span>\n </span>\n }\n}\n\n@if (!linkMode) {\n <button type=\"button\" class=\"daff-paginator__page-link\"\n [class.selected]=\"_isSelected(1)\"\n tabindex=\"0\"\n attr.aria-label=\"Go to Page 1\"\n (click)=\"_onNotifyPageChange(1)\">\n <span>1</span>\n </button>\n}\n\n@if (linkMode) {\n <a 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\">\n <span>1</span>\n </a>\n}\n\n@if (_showFirstEllipsis) {\n <span class=\"daff-paginator__ellipsis\">...</span>\n}\n\n@for (pageNumber of _numberOfPagesArray; track pageNumber) {\n @if (_showNumber(pageNumber)) {\n @if (!linkMode) {\n <button 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}}\"\n aria-current=\"_isSelected(pageNumber)\"\n (click)=\"_onNotifyPageChange(pageNumber)\">\n <span>{{ pageNumber }}</span>\n </button>\n }\n @if (linkMode) {\n <a 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}}\">\n <span>{{ pageNumber }}</span>\n </a>\n }\n }\n}\n\n@if (_showLastEllipsis) {\n <span class=\"daff-paginator__ellipsis\">...</span>\n}\n\n@if (!(numberOfPages < 2)) {\n @if (!linkMode) {\n <button type=\"button\" class=\"daff-paginator__page-link\"\n [class.selected]=\"_isSelected(numberOfPages)\"\n tabindex=\"0\"\n attr.aria-label=\"Go To Page {{numberOfPages}}\"\n (click)=\"_onNotifyPageChange(numberOfPages)\">\n <span>{{ numberOfPages }}</span>\n </button>\n }\n @if (linkMode) {\n <a 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}}\">\n <span>{{ numberOfPages }}</span>\n </a>\n }\n}\n\n@if (!linkMode) {\n <button class=\"daff-paginator__next\"\n [disabled]=\"_disableNext\"\n tabindex=\"0\"\n attr.aria-label=\"Go to Next Page\"\n (click)=\"_onNotifyNextPageChange()\">\n Next <fa-icon [icon]=\"faChevronRight\" size=\"sm\"></fa-icon>\n </button>\n}\n@if (linkMode) {\n @if (!_disableNext) {\n <a class=\"daff-paginator__next\"\n [routerLink]=\"url\"\n attr.aria-label=\"Go to Next Page\"\n queryParamsHandling=\"merge\"\n [queryParams]=\"_buildPageQueryParams(currentPage + 1)\">\n <span>Next</span><fa-icon [icon]=\"faChevronRight\" size=\"sm\"></fa-icon>\n </a>\n }\n\n @if (_disableNext) {\n <span class=\"daff-paginator__next disabled\"\n attr.aria-label=\"Go to Next Page\"\n [attr.disabled]=\"true\">\n <span>Next</span><fa-icon [icon]=\"faChevronRight\" size=\"sm\"></fa-icon>\n </span>\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\n\nimport { DaffPaginatorComponent } from './paginator/paginator.component';\n\n/**\n * @deprecated in favor of {@link DAFF_PAGINATOR_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n RouterModule,\n FontAwesomeModule,\n DaffPaginatorComponent,\n ],\n exports: [\n DaffPaginatorComponent,\n ],\n})\nexport class DaffPaginatorModule {}\n","import { DaffPaginatorComponent } from './paginator/paginator.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_PAGINATOR_COMPONENTS = <const> [\n DaffPaginatorComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAO,MAAM,sCAAsC,GAAG,iEAAiE;AAChH,MAAM,uCAAuC,GAAG,iFAAiF;;ACDxI;AAwBA,MAAM,gBAAgB,GAAG,CAAC;MAgBb,sBAAsB,CAAA;AAdnC,IAAA,WAAA,GAAA;AAeE;;AAEG;QACH,IAAA,CAAA,cAAc,GAAG,cAAc;AAC/B;;AAEG;QACH,IAAA,CAAA,aAAa,GAAG,aAAa;AAa7B;;AAEG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK;AAQzB;;AAEG;QACM,IAAA,CAAA,UAAU,GAAG,MAAM;AAO5B;;AAEG;AACO,QAAA,IAAA,CAAA,gBAAgB,GAAsB,IAAI,YAAY,EAAE;AA2GnE,IAAA;AAzGC;;;;AAIG;AACH,IAAA,IAAI,kBAAkB,GAAA;AACpB,QAAA,OAAO,IAAI,CAAC,WAAW,IAAI,gBAAgB,GAAC,CAAC;IAC/C;AAEA;;;;AAIG;AACH,IAAA,IAAI,iBAAiB,GAAA;QACnB,OAAO,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,aAAa,GAAG,gBAAgB,CAAC;IACnE;AAEA;;;;AAIG;AACH,IAAA,IAAI,YAAY,GAAA;AACd,QAAA,OAAO,IAAI,CAAC,WAAW,KAAK,CAAC;IAC/B;AAEA;;;;AAIG;AACH,IAAA,IAAI,YAAY,GAAA;AACd,QAAA,OAAO,IAAI,CAAC,WAAW,KAAK,IAAI,CAA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EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAT5B,YAAY;YACZ,YAAY;YACZ,iBAAiB;YACjB,sBAAsB,CAAA,EAAA,CAAA,CAAA;;2FAMb,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAX/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,YAAY;wBACZ,iBAAiB;wBACjB,sBAAsB;AACvB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,sBAAsB;AACvB,qBAAA;AACF,iBAAA;;;AClBD;;AAEG;AACI,MAAM,yBAAyB,GAAW;IAC/C,sBAAsB;;;ACNxB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"daffodil-design-paginator.mjs","sources":["../../../libs/design/paginator/src/utils/paginator-errors.ts","../../../libs/design/paginator/src/paginator/paginator.component.ts","../../../libs/design/paginator/src/paginator/paginator.component.html","../../../libs/design/paginator/src/paginator.module.ts","../../../libs/design/paginator/src/paginator.ts","../../../libs/design/paginator/src/daffodil-design-paginator.ts"],"sourcesContent":["export const DaffPaginatorNumberOfPagesErrorMessage = 'The numberOfPages in the daff-paginator must not be less than 1';\nexport const DaffPaginatorPageOutOfRangeErrorMessage = 'The numberOfPages in the daff-paginator should not be less than the currentPage';\n","/* eslint-disable quote-props */\nimport {\n Component,\n Input,\n Output,\n EventEmitter,\n OnChanges,\n ChangeDetectionStrategy,\n} from '@angular/core';\nimport {\n Params,\n RouterModule,\n} from '@angular/router';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport {\n faChevronRight,\n faChevronLeft,\n} from '@fortawesome/free-solid-svg-icons';\n\nimport {\n DaffPaginatorNumberOfPagesErrorMessage,\n DaffPaginatorPageOutOfRangeErrorMessage,\n} from '../utils/paginator-errors';\n\nconst visiblePageRange = 2;\n\n@Component({\n selector: 'daff-paginator',\n styleUrls: ['./paginator.component.scss'],\n templateUrl: './paginator.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'daff-paginator',\n 'role': 'navigation',\n },\n imports: [\n FaIconComponent,\n RouterModule,\n ],\n})\nexport class DaffPaginatorComponent implements OnChanges {\n /**\n * @docs-private\n */\n faChevronRight = faChevronRight;\n /**\n * @docs-private\n */\n faChevronLeft = faChevronLeft;\n\n /**\n * The total number of pages the paginator tracks. This number can change dynamically, but the end user is responsible for keeping `numberOfPages`\n * and `currentPage` in sync.\n *\n * For example, if the `numberOfPages` is dynamically changed to a value less than the `currentPage`, the paginator will break.\n */\n @Input() numberOfPages: number;\n\n /**\n * The currently selected page.\n */\n @Input() currentPage: number;\n\n /**\n * Replace the paginator buttons with links. `url` is required if using this mode.\n */\n @Input() linkMode = false;\n\n /**\n * The url to which to navigate if the paginator is in link mode.\n * This paginator component will set the page query param.\n */\n @Input() url?: string;\n\n /**\n * The query param to which the paginator component will set the current page value in link mode.\n */\n @Input() queryParam = 'page';\n\n /**\n * @docs-private\n */\n _numberOfPagesArray: number[];\n\n /**\n * Emits when the current page changes with the new current page.\n */\n @Output() notifyPageChange: EventEmitter<any> = new EventEmitter();\n\n /**\n * Determines when ellipsis after the first page number should show.\n *\n * @docs-private\n */\n get _showFirstEllipsis(): boolean {\n return this.currentPage >= visiblePageRange+2;\n }\n\n /**\n * Determines when ellipsis before the final page number should show.\n *\n * @docs-private\n */\n get _showLastEllipsis(): boolean {\n return this.currentPage < (this.numberOfPages - visiblePageRange);\n }\n\n /**\n * Determines when the Previous button should be disabled.\n *\n * @docs-private\n */\n get _disablePrev(): boolean {\n return this.currentPage === 1;\n }\n\n /**\n * Determines when the Next button should be disabled.\n *\n * @docs-private\n */\n get _disableNext(): boolean {\n return this.currentPage === this.numberOfPages;\n }\n\n /**\n * @docs-private\n */\n ngOnChanges() {\n if(this.numberOfPages < 1) {\n throw new Error(DaffPaginatorNumberOfPagesErrorMessage);\n } else if(this.numberOfPages < this.currentPage) {\n throw new Error(DaffPaginatorPageOutOfRangeErrorMessage);\n }\n\n this._numberOfPagesArray = this.numberOfPages < 2 ? [] : Array(this.numberOfPages-2).fill(this.numberOfPages-2).map((x,i)=>i+2);\n }\n\n /**\n * Emits the previous page number through notifyPageChange Output.\n *\n * @docs-private\n */\n _onNotifyPrevPageChange() {\n this.notifyPageChange.emit(this.currentPage - 1);\n }\n\n /**\n * Emits the next page number through notifyPageChange Output.\n *\n * @docs-private\n */\n _onNotifyNextPageChange() {\n this.notifyPageChange.emit(this.currentPage + 1);\n }\n\n /**\n * Emits a pageNumber to notifyPageChange Output.\n *\n * @docs-private\n */\n _onNotifyPageChange(pageNumber: number) {\n this.notifyPageChange.emit(pageNumber);\n }\n\n /**\n * A simple function that determines if the given page number is the current page number.\n *\n * @docs-private\n */\n _isSelected(page: number): boolean {\n return page === this.currentPage;\n }\n\n /**\n * Determines if the given page number should be shown. The two additional 'or' conditionals are needed\n * so the paginator retains the same total width at the extreme page numbers (1 and numberOfPages).\n *\n * @docs-private\n */\n _showNumber(pageNumber: number): boolean {\n return Math.abs(this.currentPage - pageNumber) < visiblePageRange\n || (this.currentPage <= visiblePageRange && pageNumber <= 2*visiblePageRange)\n || (this.currentPage > this.numberOfPages - visiblePageRange && pageNumber > this.numberOfPages - 2*visiblePageRange);\n }\n\n /**\n * @docs-private\n */\n _buildPageQueryParams(page: number): Params {\n return {\n [this.queryParam]: page,\n };\n }\n}\n","@if (!linkMode) {\n <button type=\"button\" class=\"daff-paginator__previous\"\n [disabled]=\"_disablePrev\"\n tabindex=\"0\"\n attr.aria-label=\"Go to Previous Page\"\n (click)=\"_onNotifyPrevPageChange()\">\n <fa-icon [icon]=\"faChevronLeft\" size=\"sm\"></fa-icon> Previous\n </button>\n}\n@if (linkMode) {\n @if (!_disablePrev) {\n <a class=\"daff-paginator__previous\"\n attr.aria-label=\"Go to Previous Page\"\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 }\n @if (_disablePrev) {\n <span class=\"daff-paginator__previous disabled\"\n attr.aria-label=\"Go to Previous Page\"\n [attr.disabled]=\"true\">\n <fa-icon [icon]=\"faChevronLeft\" size=\"sm\"></fa-icon><span>Previous</span>\n </span>\n }\n}\n\n@if (!linkMode) {\n <button type=\"button\" class=\"daff-paginator__page-link\"\n [class.selected]=\"_isSelected(1)\"\n tabindex=\"0\"\n attr.aria-label=\"Go to Page 1\"\n (click)=\"_onNotifyPageChange(1)\">\n <span>1</span>\n </button>\n}\n\n@if (linkMode) {\n <a 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\">\n <span>1</span>\n </a>\n}\n\n@if (_showFirstEllipsis) {\n <span class=\"daff-paginator__ellipsis\">...</span>\n}\n\n@for (pageNumber of _numberOfPagesArray; track pageNumber) {\n @if (_showNumber(pageNumber)) {\n @if (!linkMode) {\n <button 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}}\"\n aria-current=\"_isSelected(pageNumber)\"\n (click)=\"_onNotifyPageChange(pageNumber)\">\n <span>{{ pageNumber }}</span>\n </button>\n }\n @if (linkMode) {\n <a 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}}\">\n <span>{{ pageNumber }}</span>\n </a>\n }\n }\n}\n\n@if (_showLastEllipsis) {\n <span class=\"daff-paginator__ellipsis\">...</span>\n}\n\n@if (!(numberOfPages < 2)) {\n @if (!linkMode) {\n <button type=\"button\" class=\"daff-paginator__page-link\"\n [class.selected]=\"_isSelected(numberOfPages)\"\n tabindex=\"0\"\n attr.aria-label=\"Go To Page {{numberOfPages}}\"\n (click)=\"_onNotifyPageChange(numberOfPages)\">\n <span>{{ numberOfPages }}</span>\n </button>\n }\n @if (linkMode) {\n <a 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}}\">\n <span>{{ numberOfPages }}</span>\n </a>\n }\n}\n\n@if (!linkMode) {\n <button class=\"daff-paginator__next\"\n [disabled]=\"_disableNext\"\n tabindex=\"0\"\n attr.aria-label=\"Go to Next Page\"\n (click)=\"_onNotifyNextPageChange()\">\n Next <fa-icon [icon]=\"faChevronRight\" size=\"sm\"></fa-icon>\n </button>\n}\n@if (linkMode) {\n @if (!_disableNext) {\n <a class=\"daff-paginator__next\"\n [routerLink]=\"url\"\n attr.aria-label=\"Go to Next Page\"\n queryParamsHandling=\"merge\"\n [queryParams]=\"_buildPageQueryParams(currentPage + 1)\">\n <span>Next</span><fa-icon [icon]=\"faChevronRight\" size=\"sm\"></fa-icon>\n </a>\n }\n\n @if (_disableNext) {\n <span class=\"daff-paginator__next disabled\"\n attr.aria-label=\"Go to Next Page\"\n [attr.disabled]=\"true\">\n <span>Next</span><fa-icon [icon]=\"faChevronRight\" size=\"sm\"></fa-icon>\n </span>\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\n\nimport { DaffPaginatorComponent } from './paginator/paginator.component';\n\n/**\n * @deprecated in favor of {@link DAFF_PAGINATOR_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n RouterModule,\n FontAwesomeModule,\n DaffPaginatorComponent,\n ],\n exports: [\n DaffPaginatorComponent,\n ],\n})\nexport class DaffPaginatorModule {}\n","import { DaffPaginatorComponent } from './paginator/paginator.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_PAGINATOR_COMPONENTS = <const> [\n DaffPaginatorComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAO,MAAM,sCAAsC,GAAG,iEAAiE;AAChH,MAAM,uCAAuC,GAAG,iFAAiF;;ACDxI;AAwBA,MAAM,gBAAgB,GAAG,CAAC;MAgBb,sBAAsB,CAAA;AAdnC,IAAA,WAAA,GAAA;AAeE;;AAEG;QACH,IAAA,CAAA,cAAc,GAAG,cAAc;AAC/B;;AAEG;QACH,IAAA,CAAA,aAAa,GAAG,aAAa;AAe7B;;AAEG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK;AAQzB;;AAEG;QACM,IAAA,CAAA,UAAU,GAAG,MAAM;AAO5B;;AAEG;AACO,QAAA,IAAA,CAAA,gBAAgB,GAAsB,IAAI,YAAY,EAAE;AA2GnE,IAAA;AAzGC;;;;AAIG;AACH,IAAA,IAAI,kBAAkB,GAAA;AACpB,QAAA,OAAO,IAAI,CAAC,WAAW,IAAI,gBAAgB,GAAC,CAAC;IAC/C;AAEA;;;;AAIG;AACH,IAAA,IAAI,iBAAiB,GAAA;QACnB,OAAO,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,aAAa,GAAG,gBAAgB,CAAC;IACnE;AAEA;;;;AAIG;AACH,IAAA,IAAI,YAAY,GAAA;AACd,QAAA,OAAO,IAAI,CAAC,WAAW,KAAK,CAAC;IAC/B;AAEA;;;;AAIG;AACH,IAAA,IAAI,YAAY,GAAA;AACd,QAAA,OAAO,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,aAAa;IAChD;AAEA;;AAEG;IACH,WAAW,GAAA;AACT,QAAA,IAAG,IAAI,CAAC,a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BAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,YAAY;wBACZ,iBAAiB;wBACjB,sBAAsB;AACvB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,sBAAsB;AACvB,qBAAA;AACF,iBAAA;;;AClBD;;AAEG;AACI,MAAM,yBAAyB,GAAW;IAC/C,sBAAsB;;;ACNxB;;AAEG;;;;"}
|
|
@@ -13,10 +13,10 @@ import { DaffColorableDirective } from '@daffodil/design';
|
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
15
|
class DaffProgressBarLabelDirective {
|
|
16
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
17
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
16
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffProgressBarLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
17
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: DaffProgressBarLabelDirective, isStandalone: true, selector: "daff-progress-bar-label", ngImport: i0 }); }
|
|
18
18
|
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffProgressBarLabelDirective, decorators: [{
|
|
20
20
|
type: Directive,
|
|
21
21
|
args: [{
|
|
22
22
|
/* eslint-disable-next-line @angular-eslint/directive-selector */
|
|
@@ -109,10 +109,10 @@ class DaffProgressBarComponent {
|
|
|
109
109
|
this.finished.emit();
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
113
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
112
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffProgressBarComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.DaffColorableDirective }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
113
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: DaffProgressBarComponent, isStandalone: true, selector: "daff-progress-bar", inputs: { percentage: "percentage", ariaLabel: ["aria-label", "ariaLabel"], indeterminate: ["indeterminate", "indeterminate", booleanAttribute] }, outputs: { finished: "finished" }, host: { properties: { "class.indeterminate": "indeterminate" }, classAttribute: "daff-progress-bar" }, queries: [{ propertyName: "_label", first: true, predicate: DaffProgressBarLabelDirective, descendants: true }], hostDirectives: [{ directive: i1.DaffColorableDirective, inputs: ["color", "color"] }], ngImport: i0, template: "@if (_label) {\n\t<div class=\"daff-progress-bar__label\"\n\t\t[attr.id]=\"id\">\n\t\t<ng-content select=\"daff-progress-bar-label\"></ng-content>\n\t</div>\n}\n<div class=\"daff-progress-bar__track\"\n\trole=\"progressbar\"\n\taria-valuemin=\"0\"\n\taria-valuemax=\"100\"\n\t[attr.aria-valuenow]=\"ariaValueNow\"\n\t[attr.aria-labelledby]=\"ariaLabelledBy\">\n\t@if (indeterminate) {\n\t\t<div class=\"daff-progress-bar__fill indeterminate-bar\" aria-hidden=\"true\"></div>\n\t} @else {\n\t\t<div class=\"daff-progress-bar__fill determinate-bar\"\n\t\t\taria-hidden=\"true\"\n\t\t\t[style.transform]=\"_determinateBarTransform()\"\n\t\t\t(transitionend)=\"onTransitionEnd($event)\">\n\t\t</div>\n\t}\n</div>", styles: [":host(.daff-progress-bar){display:flex;flex-direction:column;align-items:flex-start;gap:.5rem;width:100%}:host(.daff-progress-bar) .daff-progress-bar__label{font-size:.875rem;line-height:1rem}:host(.daff-progress-bar) .daff-progress-bar__track{height:4px;position:relative;width:100%}:host(.daff-progress-bar) .daff-progress-bar__fill{height:4px;width:100%;transform:scaleX(0);transform-origin:0 center}:host(.daff-progress-bar) .daff-progress-bar__fill.determinate-bar{transition:transform .1s ease-in-out}:host(.daff-progress-bar).indeterminate{overflow:hidden}:host(.daff-progress-bar).indeterminate .indeterminate-bar{height:100%;width:100%;animation:indeterminate-animation 1.5s infinite linear;transform-origin:0% 50%}@keyframes indeterminate-animation{0%{transform:translate(0) scaleX(0)}20%{transform:translate(0) scaleX(25%)}to{transform:translate(100%) scaleX(25%)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
114
114
|
}
|
|
115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffProgressBarComponent, decorators: [{
|
|
116
116
|
type: Component,
|
|
117
117
|
args: [{ selector: 'daff-progress-bar', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
|
|
118
118
|
{
|
|
@@ -142,14 +142,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
142
142
|
* @deprecated in favor of {@link DAFF_PROGRESS_BAR_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.
|
|
143
143
|
*/
|
|
144
144
|
class DaffProgressBarModule {
|
|
145
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
146
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
145
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
146
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffProgressBarModule, imports: [CommonModule,
|
|
147
147
|
DaffProgressBarComponent,
|
|
148
148
|
DaffProgressBarLabelDirective], exports: [DaffProgressBarComponent,
|
|
149
149
|
DaffProgressBarLabelDirective] }); }
|
|
150
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
150
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffProgressBarModule, imports: [CommonModule] }); }
|
|
151
151
|
}
|
|
152
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffProgressBarModule, decorators: [{
|
|
153
153
|
type: NgModule,
|
|
154
154
|
args: [{
|
|
155
155
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-design-progress-bar.mjs","sources":["../../../libs/design/progress-bar/src/progress-bar-label/progress-bar-label.directive.ts","../../../libs/design/progress-bar/src/progress-bar.component.ts","../../../libs/design/progress-bar/src/progress-bar.component.html","../../../libs/design/progress-bar/src/progress-bar.module.ts","../../../libs/design/progress-bar/src/progress-bar.ts","../../../libs/design/progress-bar/src/daffodil-design-progress-bar.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n/**\n * Use label to help users understand what the progress represents.\n *\n * @usage\n * ```html\n * <daff-progress-bar-label>File upload</daff-progress-bar-label>\n * ```\n */\n@Directive({\n /* eslint-disable-next-line @angular-eslint/directive-selector */\n selector: 'daff-progress-bar-label',\n})\nexport class DaffProgressBarLabelDirective {}\n","import {\n Component,\n Input,\n ChangeDetectionStrategy,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n booleanAttribute,\n ContentChild,\n} from '@angular/core';\n\nimport { DaffColorableDirective } from '@daffodil/design';\n\nimport { DaffProgressBarLabelDirective } from './progress-bar-label/progress-bar-label.directive';\n\nexport const clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max);\n\nlet daffProgressBarId = 0;\n\n/**\n * A progress bar provides visual feedback about the duration or progress of a task or operation.\n *\n * @usage\n * ```html\n * <daff-progress-bar>\n * <daff-progress-bar-label>File upload</daff-progress-bar-label>\n * </daff-progress-bar>\n * ```\n */\n@Component({\n selector: 'daff-progress-bar',\n templateUrl: './progress-bar.component.html',\n styleUrls: ['./progress-bar.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: DaffColorableDirective,\n inputs: ['color'],\n },\n ],\n host: {\n class: 'daff-progress-bar',\n '[class.indeterminate]': 'indeterminate',\n },\n})\nexport class DaffProgressBarComponent {\n constructor(\n private _changeDetectorRef: ChangeDetectorRef,\n private colorable: DaffColorableDirective,\n ) {\n this.colorable.defaultColor = 'primary';\n }\n\n private _percentage = 0;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffProgressBarLabelDirective) _label: DaffProgressBarLabelDirective;\n\n /**\n * Sets the percentage completion of the progression,\n * expressed as a whole number between 0 and 100.\n */\n @Input() get percentage(): number {\n return this._percentage;\n };\n set percentage(val: number) {\n this._percentage = clamp(val, 0, 100);\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * @docs-private\n */\n get ariaValueNow() {\n return this.indeterminate ? null : this.percentage;\n }\n\n /**\n * @docs-private\n */\n get ariaLabelledBy() {\n if(!this.ariaLabel && this.id) {\n return this.id;\n }\n }\n\n /**\n * @docs-private\n *\n * The unique id of the progress bar.\n */\n id = 'daff-progress-bar-' + ++daffProgressBarId;\n\n /**\n * An `aria-label` for the progress bar.\n */\n @Input('aria-label') ariaLabel = '';\n\n /**\n * Property to set the animation of a progress bar to\n * run for an indefinite amount of time.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress\n **/\n @Input({ transform: booleanAttribute }) indeterminate = false;\n\n /**\n * @docs-private\n *\n * Returns the transform style for the determinate progress bar.\n */\n _determinateBarTransform(): string {\n return `scaleX(${this.percentage / 100})`;\n }\n\n /**\n * An event that emits each time the progression reaches 100%\n * and the animation is finished.\n */\n @Output() finished: EventEmitter<void> = new EventEmitter();\n\n /**\n * @docs-private\n *\n * Handles the CSS transition end event.\n */\n onTransitionEnd(event: TransitionEvent): void {\n if (event.propertyName === 'transform' && this.percentage === 100) {\n this.finished.emit();\n }\n }\n}\n","@if (_label) {\n\t<div class=\"daff-progress-bar__label\"\n\t\t[attr.id]=\"id\">\n\t\t<ng-content select=\"daff-progress-bar-label\"></ng-content>\n\t</div>\n}\n<div class=\"daff-progress-bar__track\"\n\trole=\"progressbar\"\n\taria-valuemin=\"0\"\n\taria-valuemax=\"100\"\n\t[attr.aria-valuenow]=\"ariaValueNow\"\n\t[attr.aria-labelledby]=\"ariaLabelledBy\">\n\t@if (indeterminate) {\n\t\t<div class=\"daff-progress-bar__fill indeterminate-bar\" aria-hidden=\"true\"></div>\n\t} @else {\n\t\t<div class=\"daff-progress-bar__fill determinate-bar\"\n\t\t\taria-hidden=\"true\"\n\t\t\t[style.transform]=\"_determinateBarTransform()\"\n\t\t\t(transitionend)=\"onTransitionEnd($event)\">\n\t\t</div>\n\t}\n</div>","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffProgressBarLabelDirective } from './progress-bar-label/progress-bar-label.directive';\nimport { DaffProgressBarComponent } from './progress-bar.component';\n\n/**\n * @deprecated in favor of {@link DAFF_PROGRESS_BAR_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffProgressBarComponent,\n DaffProgressBarLabelDirective,\n ],\n exports: [\n DaffProgressBarComponent,\n DaffProgressBarLabelDirective,\n ],\n})\nexport class DaffProgressBarModule { }\n","import { DaffProgressBarLabelDirective } from './progress-bar-label/progress-bar-label.directive';\nimport { DaffProgressBarComponent } from './progress-bar.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_PROGRESS_BAR_COMPONENTS = <const> [\n DaffProgressBarComponent,\n DaffProgressBarLabelDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAEA;;;;;;;AAOG;MAKU,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"daffodil-design-progress-bar.mjs","sources":["../../../libs/design/progress-bar/src/progress-bar-label/progress-bar-label.directive.ts","../../../libs/design/progress-bar/src/progress-bar.component.ts","../../../libs/design/progress-bar/src/progress-bar.component.html","../../../libs/design/progress-bar/src/progress-bar.module.ts","../../../libs/design/progress-bar/src/progress-bar.ts","../../../libs/design/progress-bar/src/daffodil-design-progress-bar.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n/**\n * Use label to help users understand what the progress represents.\n *\n * @usage\n * ```html\n * <daff-progress-bar-label>File upload</daff-progress-bar-label>\n * ```\n */\n@Directive({\n /* eslint-disable-next-line @angular-eslint/directive-selector */\n selector: 'daff-progress-bar-label',\n})\nexport class DaffProgressBarLabelDirective {}\n","import {\n Component,\n Input,\n ChangeDetectionStrategy,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n booleanAttribute,\n ContentChild,\n} from '@angular/core';\n\nimport { DaffColorableDirective } from '@daffodil/design';\n\nimport { DaffProgressBarLabelDirective } from './progress-bar-label/progress-bar-label.directive';\n\nexport const clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max);\n\nlet daffProgressBarId = 0;\n\n/**\n * A progress bar provides visual feedback about the duration or progress of a task or operation.\n *\n * @usage\n * ```html\n * <daff-progress-bar>\n * <daff-progress-bar-label>File upload</daff-progress-bar-label>\n * </daff-progress-bar>\n * ```\n */\n@Component({\n selector: 'daff-progress-bar',\n templateUrl: './progress-bar.component.html',\n styleUrls: ['./progress-bar.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: DaffColorableDirective,\n inputs: ['color'],\n },\n ],\n host: {\n class: 'daff-progress-bar',\n '[class.indeterminate]': 'indeterminate',\n },\n})\nexport class DaffProgressBarComponent {\n constructor(\n private _changeDetectorRef: ChangeDetectorRef,\n private colorable: DaffColorableDirective,\n ) {\n this.colorable.defaultColor = 'primary';\n }\n\n private _percentage = 0;\n\n /**\n * @docs-private\n */\n @ContentChild(DaffProgressBarLabelDirective) _label: DaffProgressBarLabelDirective;\n\n /**\n * Sets the percentage completion of the progression,\n * expressed as a whole number between 0 and 100.\n */\n @Input() get percentage(): number {\n return this._percentage;\n };\n set percentage(val: number) {\n this._percentage = clamp(val, 0, 100);\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * @docs-private\n */\n get ariaValueNow() {\n return this.indeterminate ? null : this.percentage;\n }\n\n /**\n * @docs-private\n */\n get ariaLabelledBy() {\n if(!this.ariaLabel && this.id) {\n return this.id;\n }\n }\n\n /**\n * @docs-private\n *\n * The unique id of the progress bar.\n */\n id = 'daff-progress-bar-' + ++daffProgressBarId;\n\n /**\n * An `aria-label` for the progress bar.\n */\n @Input('aria-label') ariaLabel = '';\n\n /**\n * Property to set the animation of a progress bar to\n * run for an indefinite amount of time.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress\n **/\n @Input({ transform: booleanAttribute }) indeterminate = false;\n\n /**\n * @docs-private\n *\n * Returns the transform style for the determinate progress bar.\n */\n _determinateBarTransform(): string {\n return `scaleX(${this.percentage / 100})`;\n }\n\n /**\n * An event that emits each time the progression reaches 100%\n * and the animation is finished.\n */\n @Output() finished: EventEmitter<void> = new EventEmitter();\n\n /**\n * @docs-private\n *\n * Handles the CSS transition end event.\n */\n onTransitionEnd(event: TransitionEvent): void {\n if (event.propertyName === 'transform' && this.percentage === 100) {\n this.finished.emit();\n }\n }\n}\n","@if (_label) {\n\t<div class=\"daff-progress-bar__label\"\n\t\t[attr.id]=\"id\">\n\t\t<ng-content select=\"daff-progress-bar-label\"></ng-content>\n\t</div>\n}\n<div class=\"daff-progress-bar__track\"\n\trole=\"progressbar\"\n\taria-valuemin=\"0\"\n\taria-valuemax=\"100\"\n\t[attr.aria-valuenow]=\"ariaValueNow\"\n\t[attr.aria-labelledby]=\"ariaLabelledBy\">\n\t@if (indeterminate) {\n\t\t<div class=\"daff-progress-bar__fill indeterminate-bar\" aria-hidden=\"true\"></div>\n\t} @else {\n\t\t<div class=\"daff-progress-bar__fill determinate-bar\"\n\t\t\taria-hidden=\"true\"\n\t\t\t[style.transform]=\"_determinateBarTransform()\"\n\t\t\t(transitionend)=\"onTransitionEnd($event)\">\n\t\t</div>\n\t}\n</div>","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffProgressBarLabelDirective } from './progress-bar-label/progress-bar-label.directive';\nimport { DaffProgressBarComponent } from './progress-bar.component';\n\n/**\n * @deprecated in favor of {@link DAFF_PROGRESS_BAR_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffProgressBarComponent,\n DaffProgressBarLabelDirective,\n ],\n exports: [\n DaffProgressBarComponent,\n DaffProgressBarLabelDirective,\n ],\n})\nexport class DaffProgressBarModule { }\n","import { DaffProgressBarLabelDirective } from './progress-bar-label/progress-bar-label.directive';\nimport { DaffProgressBarComponent } from './progress-bar.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_PROGRESS_BAR_COMPONENTS = <const> [\n DaffProgressBarComponent,\n DaffProgressBarLabelDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAEA;;;;;;;AAOG;MAKU,6BAA6B,CAAA;kIAA7B,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,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B;YACxB,6BAA6B,CAAA,EAAA,CAAA,CAAA;AAGpB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAT9B,YAAY,CAAA,EAAA,CAAA,CAAA;;4FASH,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAXjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,wBAAwB;wBACxB,6BAA6B;AAC9B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,wBAAwB;wBACxB,6BAA6B;AAC9B,qBAAA;AACF,iBAAA;;;AChBD;;AAEG;AACI,MAAM,4BAA4B,GAAW;IAClD,wBAAwB;IACxB,6BAA6B;;;ACR/B;;AAEG;;;;"}
|
|
@@ -86,10 +86,10 @@ class DaffQuantityInputComponent {
|
|
|
86
86
|
? this._inputControl.disable()
|
|
87
87
|
: this._inputControl.enable();
|
|
88
88
|
}
|
|
89
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
90
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
89
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffQuantityInputComponent, deps: [{ token: i1.NgControl }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
90
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: DaffQuantityInputComponent, isStandalone: true, selector: "daff-quantity-input", inputs: { min: "min", max: "max" }, viewQueries: [{ propertyName: "input", first: true, predicate: DaffInputComponent, descendants: true }], ngImport: i0, template: "<input daff-input\n type=\"number\"\n [attr.max]=\"max\"\n [attr.min]=\"min\"\n [attr.step]=\"1\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (change)=\"onValueChange($event)\"\n [formControl]=\"_inputControl\"\n>\n", dependencies: [{ kind: "component", type: DaffInputComponent, selector: "input[daff-input]", inputs: ["disabled", "required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
91
91
|
}
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffQuantityInputComponent, decorators: [{
|
|
93
93
|
type: Component,
|
|
94
94
|
args: [{ selector: 'daff-quantity-input', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
95
95
|
DaffInputComponent,
|
|
@@ -164,10 +164,10 @@ class DaffQuantitySelectComponent {
|
|
|
164
164
|
get valueArray() {
|
|
165
165
|
return makeValueArray(this.min, this.max, this.increment);
|
|
166
166
|
}
|
|
167
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
168
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
167
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffQuantitySelectComponent, deps: [{ token: i1.NgControl }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
168
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: DaffQuantitySelectComponent, isStandalone: true, selector: "daff-quantity-select", inputs: { min: "min", max: "max", extendable: "extendable" }, viewQueries: [{ propertyName: "select", first: true, predicate: DaffNativeSelectComponent, descendants: true }], ngImport: i0, template: "<select daff-native-select\n [formControl]=\"ngControl.control\"\n (focus)=\"onFocus()\"\n >\n @for (item of valueArray; track item) {\n <option [value]=\"item\">{{ item }}</option>\n }\n @if (extendable) {\n <option [value]=\"max\">{{ max }}+</option>\n } @else {\n <option [value]=\"max\">{{ max }}</option>\n }\n</select>\n", dependencies: [{ kind: "component", type: DaffNativeSelectComponent, selector: "select[daff-native-select]", inputs: ["disabled", "required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
169
169
|
}
|
|
170
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
170
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffQuantitySelectComponent, decorators: [{
|
|
171
171
|
type: Component,
|
|
172
172
|
args: [{ selector: 'daff-quantity-select', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
173
173
|
DaffNativeSelectComponent,
|
|
@@ -184,6 +184,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
184
184
|
type: Input
|
|
185
185
|
}] } });
|
|
186
186
|
|
|
187
|
+
/**
|
|
188
|
+
* @deprecated in favor of DaffSfQuantityFieldComponent. Deprecated in version 0.92.0. Will be removed in version 0.95.0.
|
|
189
|
+
*/
|
|
187
190
|
class DaffQuantityFieldComponent extends DaffFormFieldControl {
|
|
188
191
|
get focused() {
|
|
189
192
|
return !!(this.input?.focused || this.select?.focused);
|
|
@@ -291,15 +294,15 @@ class DaffQuantityFieldComponent extends DaffFormFieldControl {
|
|
|
291
294
|
return this.input.value;
|
|
292
295
|
}
|
|
293
296
|
}
|
|
294
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
295
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
297
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffQuantityFieldComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
298
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: DaffQuantityFieldComponent, isStandalone: true, selector: "daff-quantity-field", inputs: { min: "min", max: "max", selectMax: "selectMax", id: "id" }, providers: [
|
|
296
299
|
{
|
|
297
300
|
provide: DaffFormFieldControl,
|
|
298
301
|
useExisting: DaffQuantityFieldComponent,
|
|
299
302
|
},
|
|
300
303
|
], viewQueries: [{ propertyName: "input", first: true, predicate: DaffQuantityInputComponent, descendants: true }, { propertyName: "select", first: true, predicate: DaffQuantitySelectComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (showSelectField) {\n <daff-quantity-select\n [min]=\"min\"\n [max]=\"_maxFloor\"\n [extendable]=\"max > selectMax\"\n [id]=\"id\">\n </daff-quantity-select>\n}\n@if (showInputField) {\n <daff-quantity-input\n [min]=\"min\"\n [max]=\"max\"\n [id]=\"id\">\n </daff-quantity-input>\n}\n", dependencies: [{ kind: "component", type: DaffQuantityInputComponent, selector: "daff-quantity-input", inputs: ["min", "max"] }, { kind: "component", type: DaffQuantitySelectComponent, selector: "daff-quantity-select", inputs: ["min", "max", "extendable"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
301
304
|
}
|
|
302
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
305
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffQuantityFieldComponent, decorators: [{
|
|
303
306
|
type: Component,
|
|
304
307
|
args: [{ selector: 'daff-quantity-field', providers: [
|
|
305
308
|
{
|
|
@@ -331,16 +334,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
331
334
|
}] } });
|
|
332
335
|
|
|
333
336
|
/**
|
|
334
|
-
* @deprecated in favor of
|
|
337
|
+
* @deprecated in favor of DaffSfQuantityFieldComponent. Deprecated in version 0.92.0. Will be removed in version 0.95.0.
|
|
335
338
|
*/
|
|
336
339
|
class DaffQuantityFieldModule {
|
|
337
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
338
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
340
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffQuantityFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
341
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffQuantityFieldModule, imports: [CommonModule,
|
|
339
342
|
DaffQuantityFieldComponent], exports: [DaffQuantityFieldComponent] }); }
|
|
340
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
343
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffQuantityFieldModule, imports: [CommonModule,
|
|
341
344
|
DaffQuantityFieldComponent] }); }
|
|
342
345
|
}
|
|
343
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
346
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffQuantityFieldModule, decorators: [{
|
|
344
347
|
type: NgModule,
|
|
345
348
|
args: [{
|
|
346
349
|
imports: [
|