@daffodil/design 0.94.1 → 0.95.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/README.md +1 -2
- package/accordion/src/accordion-theme.scss +4 -4
- package/article/README.md +4 -27
- package/article/src/article-theme.scss +14 -14
- package/badge/src/badge-theme.scss +0 -6
- package/button/README.md +0 -4
- package/button/src/button/basic/button-theme.scss +17 -42
- package/button/src/button/button-base.scss +12 -3
- package/button/src/button/flat/flat-theme.scss +14 -12
- package/button/src/button/icon/icon-theme.scss +19 -40
- package/button/src/button/stroked/stroked-theme.scss +22 -36
- package/card/src/card/stroked/stroked-theme.scss +1 -1
- package/card/src/card-base.scss +0 -1
- package/fesm2022/daffodil-design-accordion.mjs +285 -188
- package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
- package/fesm2022/daffodil-design-article.mjs +578 -340
- package/fesm2022/daffodil-design-article.mjs.map +1 -1
- package/fesm2022/daffodil-design-badge.mjs +166 -84
- package/fesm2022/daffodil-design-badge.mjs.map +1 -1
- package/fesm2022/daffodil-design-beacon.mjs +109 -47
- package/fesm2022/daffodil-design-beacon.mjs.map +1 -1
- package/fesm2022/daffodil-design-breadcrumb.mjs +384 -277
- package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
- package/fesm2022/daffodil-design-button.mjs +541 -408
- package/fesm2022/daffodil-design-button.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout.mjs +349 -224
- package/fesm2022/daffodil-design-callout.mjs.map +1 -1
- package/fesm2022/daffodil-design-card.mjs +496 -327
- package/fesm2022/daffodil-design-card.mjs.map +1 -1
- package/fesm2022/daffodil-design-checkbox.mjs +373 -313
- package/fesm2022/daffodil-design-checkbox.mjs.map +1 -1
- package/fesm2022/daffodil-design-container.mjs +103 -60
- package/fesm2022/daffodil-design-container.mjs.map +1 -1
- package/fesm2022/daffodil-design-form-field.mjs +441 -352
- package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
- package/fesm2022/daffodil-design-form.mjs +155 -57
- package/fesm2022/daffodil-design-form.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero.mjs +349 -234
- package/fesm2022/daffodil-design-hero.mjs.map +1 -1
- package/fesm2022/daffodil-design-image-lite.mjs +60 -0
- package/fesm2022/daffodil-design-image-lite.mjs.map +1 -0
- package/fesm2022/daffodil-design-image.mjs +245 -107
- package/fesm2022/daffodil-design-image.mjs.map +1 -1
- package/fesm2022/daffodil-design-input.mjs +217 -164
- package/fesm2022/daffodil-design-input.mjs.map +1 -1
- package/fesm2022/daffodil-design-list.mjs +308 -170
- package/fesm2022/daffodil-design-list.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery.mjs +351 -278
- package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu.mjs +525 -417
- package/fesm2022/daffodil-design-menu.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal.mjs +680 -450
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-native-select.mjs +175 -166
- package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar.mjs +145 -68
- package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +376 -226
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator.mjs +296 -192
- package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs +243 -157
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-radio.mjs +382 -300
- package/fesm2022/daffodil-design-radio.mjs.map +1 -1
- package/fesm2022/daffodil-design-select.mjs +424 -364
- package/fesm2022/daffodil-design-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +874 -887
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-spinner.mjs +156 -99
- package/fesm2022/daffodil-design-spinner.mjs.map +1 -1
- package/fesm2022/daffodil-design-switch.mjs +176 -106
- package/fesm2022/daffodil-design-switch.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs.mjs +685 -427
- package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
- package/fesm2022/daffodil-design-tag.mjs +251 -133
- package/fesm2022/daffodil-design-tag.mjs.map +1 -1
- package/fesm2022/daffodil-design-testing.mjs +4 -16
- package/fesm2022/daffodil-design-testing.mjs.map +1 -1
- package/fesm2022/daffodil-design-text-snippet.mjs +140 -54
- package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
- package/fesm2022/daffodil-design-textarea.mjs +170 -150
- package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +658 -481
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree.mjs +456 -469
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design-youtube-player.mjs +168 -115
- package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +1628 -1650
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/form-field/README.md +0 -4
- package/form-field/src/form-field-theme.scss +12 -4
- package/image/README.md +4 -0
- package/image-lite/README.md +58 -0
- package/image-lite/src/image-theme.scss +18 -0
- package/list/src/list-base.scss +3 -4
- package/list/src/list-theme.scss +6 -5
- package/media-gallery/README.md +1 -1
- package/media-gallery/src/media-gallery-theme.scss +3 -3
- package/menu/src/menu-theme.scss +6 -2
- package/notification/src/notification-theme.scss +10 -10
- package/package.json +1 -1
- package/scss/global.scss +17 -11
- package/scss/theme.scss +2 -18
- package/scss/theming/_get-palette.scss +0 -3
- package/scss/theming/_index.scss +0 -1
- package/scss/theming/_light-dark.scss +2 -2
- package/scss/theming/_theme-css-variables.scss +1 -1
- package/scss/theming/create-theme/_create-theme.scss +2 -2
- package/scss/theming/get-font-colors/_get-font-colors.scss +7 -25
- package/scss/theming/get-font-colors/_get-font-colors.spec.scss +0 -12
- package/scss/typography/_classes.scss +0 -6
- package/scss/typography/_index.scss +0 -1
- package/scss/typography/mixins/_sizes.scss +0 -1
- package/scss/typography/utilities/_variables.scss +3 -0
- package/select/src/select-theme.scss +10 -14
- package/switch/src/switch-theme.scss +2 -2
- package/tabs/src/tabs-theme.scss +4 -4
- package/types/daffodil-design-accordion.d.ts +92 -67
- package/types/daffodil-design-article.d.ts +49 -56
- package/types/daffodil-design-badge.d.ts +56 -33
- package/types/daffodil-design-beacon.d.ts +35 -14
- package/types/daffodil-design-breadcrumb.d.ts +89 -85
- package/types/daffodil-design-button.d.ts +128 -146
- package/types/daffodil-design-callout.d.ts +55 -39
- package/types/daffodil-design-card.d.ts +66 -56
- package/types/daffodil-design-checkbox.d.ts +211 -167
- package/types/daffodil-design-container.d.ts +17 -16
- package/types/daffodil-design-form-field.d.ts +273 -240
- package/types/daffodil-design-form.d.ts +21 -21
- package/types/daffodil-design-hero.d.ts +55 -39
- package/types/daffodil-design-image-lite.d.ts +17 -0
- package/types/daffodil-design-image.d.ts +89 -55
- package/types/daffodil-design-input.d.ts +86 -72
- package/types/daffodil-design-list.d.ts +49 -43
- package/types/daffodil-design-media-gallery.d.ts +176 -148
- package/types/daffodil-design-menu.d.ts +177 -169
- package/types/daffodil-design-modal.d.ts +205 -205
- package/types/daffodil-design-native-select.d.ts +94 -84
- package/types/daffodil-design-navbar.d.ts +34 -24
- package/types/daffodil-design-notification.d.ts +82 -67
- package/types/daffodil-design-paginator.d.ts +140 -118
- package/types/daffodil-design-progress-bar.d.ts +92 -74
- package/types/daffodil-design-radio.d.ts +183 -144
- package/types/daffodil-design-select.d.ts +207 -178
- package/types/daffodil-design-sidebar.d.ts +270 -253
- package/types/daffodil-design-spinner.d.ts +49 -36
- package/types/daffodil-design-switch.d.ts +77 -46
- package/types/daffodil-design-tabs.d.ts +248 -198
- package/types/daffodil-design-tag.d.ts +91 -56
- package/types/daffodil-design-testing.d.ts +1 -3
- package/types/daffodil-design-text-snippet.d.ts +48 -37
- package/types/daffodil-design-textarea.d.ts +88 -79
- package/types/daffodil-design-toast.d.ts +175 -183
- package/types/daffodil-design-tree.d.ts +186 -169
- package/types/daffodil-design-youtube-player.d.ts +56 -52
- package/types/daffodil-design.d.ts +614 -695
- package/button/src/button/raised/raised-theme.scss +0 -92
- package/button/src/button/underline/underline-theme.scss +0 -141
- package/fesm2022/daffodil-design-link-set.mjs +0 -160
- package/fesm2022/daffodil-design-link-set.mjs.map +0 -1
- package/fesm2022/daffodil-design-quantity-field.mjs +0 -364
- package/fesm2022/daffodil-design-quantity-field.mjs.map +0 -1
- package/link-set/README.md +0 -86
- package/quantity-field/README.md +0 -63
- package/scss/theming/_configure-theme.scss +0 -120
- package/scss/typography/mixins/_font-weight.scss +0 -14
- package/types/daffodil-design-link-set.d.ts +0 -72
- package/types/daffodil-design-quantity-field.d.ts +0 -171
|
@@ -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","import {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n input,\n output,\n contentChild,\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 styleUrl: './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 _prefix = contentChild(DaffPrefixDirective);\n\n /**\n * @docs-private\n */\n _actions = contentChild(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 dismissible = input(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 closeNotification = output<void>();\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,2BAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,4BAAA,EAAA,EAAA,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;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","names":[],"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"],"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","import {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n input,\n output,\n contentChild,\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 styleUrl: './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 _prefix = contentChild(DaffPrefixDirective);\n\n /**\n * @docs-private\n */\n _actions = contentChild(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 dismissible = input(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 closeNotification = output<void>();\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"],"mappings":";;;;;;;AAqBA,IAAa,mCAAb,MAAa,iCAAgC;CAAhC;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAgC,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAhC;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAgC,cAAA;GAAA,UAAA;GAAA,MAAA,EAAA,gBAAA,6BAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAAhC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAgC,YAAA,CAAA;EAP5C,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,MAAM,EACJ,SAAS,6BACV;EACF,CAAA;;;ACgDD,IAAa,4BAAb,MAAa,0BAAyB;CAsBpC,IAAI,OAAI;EACN,OAAO,KAAK,gBAAgB,WAAW,eAAe,QAAQ,KAAK,gBAAgB,WAAW,eAAe,WAAW,UAAU;CACpI;CAOA,YACU,iBACA,aAAoC;EADpC,KAAA,kBAAA;EACA,KAAA,cAAA;EA7BV,KAAA,UAAU;EAKV,KAAA,UAAU,aAAa,qBAAoB,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CA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A,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAsB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAtB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAsB,SAAA;IAhB/B;IACA;IACA;IACA;IACA;IACA;IACA;GAA8B;GAAA,SAAA;IAG9B;IACA;IACA;IACA;IACA;GAAsB;EAAA,CAAA;CAAA;CAGb;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAsB,SAAA;IAhB/B;IACA;IACA;IACA;IAUA;GAAsB;EAAA,CAAA;CAAA;;AAGb,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAsB,YAAA,CAAA;EAlBlC,MAAA;EAAS,MAAA,CAAA;GACR,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;GACD;GACD,SAAS;IACP;IACA;IACA;IACA;IACA;GACD;EACF,CAAA;;;ACrBD,MAAa,+BAAuC;CAClD;CACA;CACA;CACA;CACA;AACD"}
|
|
@@ -1,194 +1,298 @@
|
|
|
1
|
-
import { CommonModule } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
import { RouterLink, RouterModule } from
|
|
5
|
-
import { FaIconComponent, FontAwesomeModule } from
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
const DaffPaginatorPageOutOfRangeErrorMessage = 'The numberOfPages in the daff-paginator should not be less than the currentPage';
|
|
10
|
-
|
|
1
|
+
import { CommonModule } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, NgModule, computed, input, output } from "@angular/core";
|
|
4
|
+
import { RouterLink, RouterModule } from "@angular/router";
|
|
5
|
+
import { FaIconComponent, FontAwesomeModule } from "@fortawesome/angular-fontawesome";
|
|
6
|
+
import { faChevronLeft, faChevronRight } from "@fortawesome/free-solid-svg-icons";
|
|
7
|
+
const DaffPaginatorNumberOfPagesErrorMessage = "The numberOfPages in the daff-paginator must not be less than 1";
|
|
8
|
+
const DaffPaginatorPageOutOfRangeErrorMessage = "The numberOfPages in the daff-paginator should not be less than the currentPage";
|
|
11
9
|
const visiblePageRange = 2;
|
|
12
|
-
class DaffPaginatorComponent {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
];
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
10
|
+
var DaffPaginatorComponent = class DaffPaginatorComponent {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.faChevronRight = faChevronRight;
|
|
13
|
+
this.faChevronLeft = faChevronLeft;
|
|
14
|
+
this.numberOfPages = input.required(...ngDevMode ? [{ debugName: "numberOfPages" }] : /* istanbul ignore next */ []);
|
|
15
|
+
this.currentPage = input.required(...ngDevMode ? [{ debugName: "currentPage" }] : /* istanbul ignore next */ []);
|
|
16
|
+
this.linkMode = input(false, ...ngDevMode ? [{ debugName: "linkMode" }] : /* istanbul ignore next */ []);
|
|
17
|
+
this.url = input(...ngDevMode ? [void 0, { debugName: "url" }] : /* istanbul ignore next */ []);
|
|
18
|
+
this.queryParam = input("page", ...ngDevMode ? [{ debugName: "queryParam" }] : /* istanbul ignore next */ []);
|
|
19
|
+
this.notifyPageChange = output();
|
|
20
|
+
this._numberOfPagesArray = computed(() => {
|
|
21
|
+
const numberOfPages = this.numberOfPages();
|
|
22
|
+
if (numberOfPages < 1) throw new Error(DaffPaginatorNumberOfPagesErrorMessage);
|
|
23
|
+
else if (numberOfPages < this.currentPage()) throw new Error(DaffPaginatorPageOutOfRangeErrorMessage);
|
|
24
|
+
return numberOfPages < 2 ? [] : Array(numberOfPages - 2).fill(numberOfPages - 2).map((x, i) => i + 2);
|
|
25
|
+
}, ...ngDevMode ? [{ debugName: "_numberOfPagesArray" }] : /* istanbul ignore next */ []);
|
|
26
|
+
this._showFirstEllipsis = computed(() => this.currentPage() >= 4, ...ngDevMode ? [{ debugName: "_showFirstEllipsis" }] : /* istanbul ignore next */ []);
|
|
27
|
+
this._showLastEllipsis = computed(() => this.currentPage() < this.numberOfPages() - visiblePageRange, ...ngDevMode ? [{ debugName: "_showLastEllipsis" }] : /* istanbul ignore next */ []);
|
|
28
|
+
this._disablePrev = computed(() => this.currentPage() === 1, ...ngDevMode ? [{ debugName: "_disablePrev" }] : /* istanbul ignore next */ []);
|
|
29
|
+
this._disableNext = computed(() => this.currentPage() === this.numberOfPages(), ...ngDevMode ? [{ debugName: "_disableNext" }] : /* istanbul ignore next */ []);
|
|
30
|
+
}
|
|
31
|
+
_onNotifyPrevPageChange() {
|
|
32
|
+
this.notifyPageChange.emit(this.currentPage() - 1);
|
|
33
|
+
}
|
|
34
|
+
_onNotifyNextPageChange() {
|
|
35
|
+
this.notifyPageChange.emit(this.currentPage() + 1);
|
|
36
|
+
}
|
|
37
|
+
_onNotifyPageChange(pageNumber) {
|
|
38
|
+
this.notifyPageChange.emit(pageNumber);
|
|
39
|
+
}
|
|
40
|
+
_isSelected(page) {
|
|
41
|
+
return page === this.currentPage();
|
|
42
|
+
}
|
|
43
|
+
_showNumber(pageNumber) {
|
|
44
|
+
return Math.abs(this.currentPage() - pageNumber) < visiblePageRange || this.currentPage() <= visiblePageRange && pageNumber <= 4 || this.currentPage() > this.numberOfPages() - visiblePageRange && pageNumber > this.numberOfPages() - 4;
|
|
45
|
+
}
|
|
46
|
+
_buildPageQueryParams(page) {
|
|
47
|
+
return { [this.queryParam()]: page };
|
|
48
|
+
}
|
|
49
|
+
static {
|
|
50
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
51
|
+
minVersion: "12.0.0",
|
|
52
|
+
version: "22.2.4",
|
|
53
|
+
ngImport: i0,
|
|
54
|
+
type: DaffPaginatorComponent,
|
|
55
|
+
deps: [],
|
|
56
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
static {
|
|
60
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
61
|
+
minVersion: "17.0.0",
|
|
62
|
+
version: "22.2.4",
|
|
63
|
+
type: DaffPaginatorComponent,
|
|
64
|
+
isStandalone: true,
|
|
65
|
+
selector: "daff-paginator",
|
|
66
|
+
inputs: {
|
|
67
|
+
numberOfPages: {
|
|
68
|
+
classPropertyName: "numberOfPages",
|
|
69
|
+
publicName: "numberOfPages",
|
|
70
|
+
isSignal: true,
|
|
71
|
+
isRequired: true,
|
|
72
|
+
transformFunction: null
|
|
73
|
+
},
|
|
74
|
+
currentPage: {
|
|
75
|
+
classPropertyName: "currentPage",
|
|
76
|
+
publicName: "currentPage",
|
|
77
|
+
isSignal: true,
|
|
78
|
+
isRequired: true,
|
|
79
|
+
transformFunction: null
|
|
80
|
+
},
|
|
81
|
+
linkMode: {
|
|
82
|
+
classPropertyName: "linkMode",
|
|
83
|
+
publicName: "linkMode",
|
|
84
|
+
isSignal: true,
|
|
85
|
+
isRequired: false,
|
|
86
|
+
transformFunction: null
|
|
87
|
+
},
|
|
88
|
+
url: {
|
|
89
|
+
classPropertyName: "url",
|
|
90
|
+
publicName: "url",
|
|
91
|
+
isSignal: true,
|
|
92
|
+
isRequired: false,
|
|
93
|
+
transformFunction: null
|
|
94
|
+
},
|
|
95
|
+
queryParam: {
|
|
96
|
+
classPropertyName: "queryParam",
|
|
97
|
+
publicName: "queryParam",
|
|
98
|
+
isSignal: true,
|
|
99
|
+
isRequired: false,
|
|
100
|
+
transformFunction: null
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
outputs: { notifyPageChange: "notifyPageChange" },
|
|
104
|
+
host: {
|
|
105
|
+
attributes: { "role": "navigation" },
|
|
106
|
+
classAttribute: "daff-paginator"
|
|
107
|
+
},
|
|
108
|
+
ngImport: i0,
|
|
109
|
+
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",
|
|
110
|
+
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}@media(hover:hover){.daff-paginator__page-link:hover:after{opacity:1}}.daff-paginator__page-link:active:after,.daff-paginator__page-link.selected:after{opacity:1}\n"],
|
|
111
|
+
dependencies: [{
|
|
112
|
+
kind: "component",
|
|
113
|
+
type: FaIconComponent,
|
|
114
|
+
selector: "fa-icon",
|
|
115
|
+
inputs: [
|
|
116
|
+
"icon",
|
|
117
|
+
"title",
|
|
118
|
+
"animation",
|
|
119
|
+
"mask",
|
|
120
|
+
"flip",
|
|
121
|
+
"size",
|
|
122
|
+
"pull",
|
|
123
|
+
"border",
|
|
124
|
+
"inverse",
|
|
125
|
+
"symbol",
|
|
126
|
+
"rotate",
|
|
127
|
+
"fixedWidth",
|
|
128
|
+
"transform",
|
|
129
|
+
"a11yRole"
|
|
130
|
+
],
|
|
131
|
+
outputs: [
|
|
132
|
+
"iconChange",
|
|
133
|
+
"titleChange",
|
|
134
|
+
"animationChange",
|
|
135
|
+
"maskChange",
|
|
136
|
+
"flipChange",
|
|
137
|
+
"sizeChange",
|
|
138
|
+
"pullChange",
|
|
139
|
+
"borderChange",
|
|
140
|
+
"inverseChange",
|
|
141
|
+
"symbolChange",
|
|
142
|
+
"rotateChange",
|
|
143
|
+
"fixedWidthChange",
|
|
144
|
+
"transformChange",
|
|
145
|
+
"a11yRoleChange"
|
|
146
|
+
]
|
|
147
|
+
}, {
|
|
148
|
+
kind: "directive",
|
|
149
|
+
type: RouterLink,
|
|
150
|
+
selector: "[routerLink]",
|
|
151
|
+
inputs: [
|
|
152
|
+
"target",
|
|
153
|
+
"queryParams",
|
|
154
|
+
"fragment",
|
|
155
|
+
"queryParamsHandling",
|
|
156
|
+
"state",
|
|
157
|
+
"info",
|
|
158
|
+
"relativeTo",
|
|
159
|
+
"preserveFragment",
|
|
160
|
+
"skipLocationChange",
|
|
161
|
+
"replaceUrl",
|
|
162
|
+
"browserUrl",
|
|
163
|
+
"routerLink"
|
|
164
|
+
]
|
|
165
|
+
}],
|
|
166
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
171
|
+
minVersion: "12.0.0",
|
|
172
|
+
version: "22.2.4",
|
|
173
|
+
ngImport: i0,
|
|
174
|
+
type: DaffPaginatorComponent,
|
|
175
|
+
decorators: [{
|
|
176
|
+
type: Component,
|
|
177
|
+
args: [{
|
|
178
|
+
selector: "daff-paginator",
|
|
179
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
180
|
+
host: {
|
|
181
|
+
class: "daff-paginator",
|
|
182
|
+
role: "navigation"
|
|
183
|
+
},
|
|
184
|
+
imports: [FaIconComponent, RouterLink],
|
|
185
|
+
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",
|
|
186
|
+
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}@media(hover:hover){.daff-paginator__page-link:hover:after{opacity:1}}.daff-paginator__page-link:active:after,.daff-paginator__page-link.selected:after{opacity:1}\n"]
|
|
187
|
+
}]
|
|
188
|
+
}],
|
|
189
|
+
propDecorators: {
|
|
190
|
+
numberOfPages: [{
|
|
191
|
+
type: i0.Input,
|
|
192
|
+
args: [{
|
|
193
|
+
isSignal: true,
|
|
194
|
+
alias: "numberOfPages",
|
|
195
|
+
required: true
|
|
196
|
+
}]
|
|
197
|
+
}],
|
|
198
|
+
currentPage: [{
|
|
199
|
+
type: i0.Input,
|
|
200
|
+
args: [{
|
|
201
|
+
isSignal: true,
|
|
202
|
+
alias: "currentPage",
|
|
203
|
+
required: true
|
|
204
|
+
}]
|
|
205
|
+
}],
|
|
206
|
+
linkMode: [{
|
|
207
|
+
type: i0.Input,
|
|
208
|
+
args: [{
|
|
209
|
+
isSignal: true,
|
|
210
|
+
alias: "linkMode",
|
|
211
|
+
required: false
|
|
212
|
+
}]
|
|
213
|
+
}],
|
|
214
|
+
url: [{
|
|
215
|
+
type: i0.Input,
|
|
216
|
+
args: [{
|
|
217
|
+
isSignal: true,
|
|
218
|
+
alias: "url",
|
|
219
|
+
required: false
|
|
220
|
+
}]
|
|
221
|
+
}],
|
|
222
|
+
queryParam: [{
|
|
223
|
+
type: i0.Input,
|
|
224
|
+
args: [{
|
|
225
|
+
isSignal: true,
|
|
226
|
+
alias: "queryParam",
|
|
227
|
+
required: false
|
|
228
|
+
}]
|
|
229
|
+
}],
|
|
230
|
+
notifyPageChange: [{
|
|
231
|
+
type: i0.Output,
|
|
232
|
+
args: ["notifyPageChange"]
|
|
233
|
+
}]
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
var DaffPaginatorModule = class DaffPaginatorModule {
|
|
237
|
+
static {
|
|
238
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
239
|
+
minVersion: "12.0.0",
|
|
240
|
+
version: "22.2.4",
|
|
241
|
+
ngImport: i0,
|
|
242
|
+
type: DaffPaginatorModule,
|
|
243
|
+
deps: [],
|
|
244
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
static {
|
|
248
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
249
|
+
minVersion: "14.0.0",
|
|
250
|
+
version: "22.2.4",
|
|
251
|
+
ngImport: i0,
|
|
252
|
+
type: DaffPaginatorModule,
|
|
253
|
+
imports: [
|
|
254
|
+
CommonModule,
|
|
255
|
+
RouterModule,
|
|
256
|
+
FontAwesomeModule,
|
|
257
|
+
DaffPaginatorComponent
|
|
258
|
+
],
|
|
259
|
+
exports: [DaffPaginatorComponent]
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
static {
|
|
263
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
264
|
+
minVersion: "12.0.0",
|
|
265
|
+
version: "22.2.4",
|
|
266
|
+
ngImport: i0,
|
|
267
|
+
type: DaffPaginatorModule,
|
|
268
|
+
imports: [
|
|
269
|
+
CommonModule,
|
|
270
|
+
RouterModule,
|
|
271
|
+
FontAwesomeModule,
|
|
272
|
+
DaffPaginatorComponent
|
|
273
|
+
]
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
278
|
+
minVersion: "12.0.0",
|
|
279
|
+
version: "22.2.4",
|
|
280
|
+
ngImport: i0,
|
|
281
|
+
type: DaffPaginatorModule,
|
|
282
|
+
decorators: [{
|
|
283
|
+
type: NgModule,
|
|
284
|
+
args: [{
|
|
285
|
+
imports: [
|
|
286
|
+
CommonModule,
|
|
287
|
+
RouterModule,
|
|
288
|
+
FontAwesomeModule,
|
|
289
|
+
DaffPaginatorComponent
|
|
290
|
+
],
|
|
291
|
+
exports: [DaffPaginatorComponent]
|
|
292
|
+
}]
|
|
293
|
+
}]
|
|
294
|
+
});
|
|
295
|
+
const DAFF_PAGINATOR_COMPONENTS = [DaffPaginatorComponent];
|
|
193
296
|
export { DAFF_PAGINATOR_COMPONENTS, DaffPaginatorComponent, DaffPaginatorModule };
|
|
194
|
-
|
|
297
|
+
|
|
298
|
+
//# sourceMappingURL=daffodil-design-paginator.mjs.map
|