@daffodil/design 0.39.13 → 0.40.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/examples/basic-accordion/basic-accordion.component.d.ts +3 -0
- package/accordion/examples/basic-accordion/basic-accordion.module.d.ts +6 -0
- package/accordion/examples/daffodil-design-accordion-examples.d.ts +1 -2
- package/accordion/examples/nav-accordion/nav-accordion.component.d.ts +3 -0
- package/accordion/examples/nav-accordion/nav-accordion.module.d.ts +6 -0
- package/accordion/examples/package.json +5 -6
- package/accordion/examples/public_api.d.ts +2 -0
- package/article/examples/article-blockquote/article-blockquote.component.d.ts +3 -0
- package/article/examples/article-code-block/article-code-block.component.d.ts +3 -0
- package/article/examples/article-code-inline/article-code-inline.component.d.ts +3 -0
- package/article/examples/article-examples.module.d.ts +17 -0
- package/article/examples/article-headings/article-headings.component.d.ts +3 -0
- package/article/examples/article-hr/article-hr.component.d.ts +3 -0
- package/article/examples/article-lead/article-lead.component.d.ts +3 -0
- package/article/examples/article-link/article-link.component.d.ts +3 -0
- package/article/examples/article-meta/article-meta.component.d.ts +3 -0
- package/article/examples/article-ol/article-ol.component.d.ts +3 -0
- package/article/examples/article-table/article-table.component.d.ts +3 -0
- package/article/examples/article-ul/article-ul.component.d.ts +3 -0
- package/article/examples/daffodil-design-article-examples.d.ts +1 -1
- package/article/examples/package.json +5 -6
- package/atoms/button/button.component.d.ts +4 -1
- package/atoms/button/button.module.d.ts +7 -0
- package/atoms/container/container.component.d.ts +3 -0
- package/atoms/container/container.module.d.ts +6 -0
- package/atoms/form/checkbox/checkbox.component.d.ts +3 -0
- package/atoms/form/checkbox/checkbox.module.d.ts +8 -0
- package/atoms/form/checkbox/cva/checkbox-cva.directive.d.ts +3 -0
- package/atoms/form/checkbox-set/checkbox-set.component.d.ts +3 -0
- package/atoms/form/error-message/error-message.component.d.ts +3 -0
- package/atoms/form/error-message/error-message.module.d.ts +5 -0
- package/atoms/form/form-field/form-field/form-field.component.d.ts +3 -0
- package/atoms/form/form-field/form-field.module.d.ts +8 -0
- package/atoms/form/input/input.component.d.ts +3 -0
- package/atoms/form/input/input.module.d.ts +6 -0
- package/atoms/form/quantity-field/quantity-field.component.d.ts +3 -0
- package/atoms/form/quantity-field/quantity-field.module.d.ts +11 -0
- package/atoms/form/quantity-field/quantity-input/quantity-input.component.d.ts +3 -0
- package/atoms/form/quantity-field/quantity-select/quantity-select.component.d.ts +3 -0
- package/atoms/form/radio/cva/radio-cva.directive.d.ts +3 -0
- package/atoms/form/radio/radio.component.d.ts +3 -0
- package/atoms/form/radio/radio.module.d.ts +8 -0
- package/atoms/form/radio/registry/radio-registry.d.ts +3 -0
- package/atoms/form/radio-set/radio-set.component.d.ts +3 -0
- package/atoms/form/select/select/select.component.d.ts +3 -0
- package/atoms/form/select/select.module.d.ts +6 -0
- package/atoms/image/image.component.d.ts +3 -0
- package/atoms/image/image.module.d.ts +6 -0
- package/atoms/loading-icon/loading-icon.component.d.ts +3 -0
- package/atoms/loading-icon/loading-icon.module.d.ts +6 -0
- package/atoms/progress-indicator/progress-indicator.component.d.ts +3 -0
- package/atoms/progress-indicator/progress-indicator.module.d.ts +6 -0
- package/button/examples/basic-button/basic-button.component.d.ts +3 -0
- package/button/examples/basic-button/basic-button.module.d.ts +7 -0
- package/button/examples/daffodil-design-button-examples.d.ts +1 -7
- package/button/examples/icon-button/icon-button.component.d.ts +3 -0
- package/button/examples/icon-button/icon-button.module.d.ts +7 -0
- package/button/examples/package.json +5 -6
- package/button/examples/public_api.d.ts +5 -0
- package/button/examples/raised-button/raised-button.component.d.ts +3 -0
- package/button/examples/raised-button/raised-button.module.d.ts +7 -0
- package/button/examples/sizeable-button/sizeable-button.component.d.ts +3 -0
- package/button/examples/sizeable-button/sizeable-button.module.d.ts +7 -0
- package/button/examples/statusable-button/statusable-button.component.d.ts +3 -0
- package/button/examples/statusable-button/statusable-button.module.d.ts +7 -0
- package/button/examples/stroked-button/stroked-button.component.d.ts +3 -0
- package/button/examples/stroked-button/stroked-button.module.d.ts +7 -0
- package/button/examples/underline-button/underline-button.component.d.ts +3 -0
- package/button/examples/underline-button/underline-button.module.d.ts +7 -0
- package/callout/examples/callout-text-alignment/callout-text-alignment.component.d.ts +3 -0
- package/callout/examples/callout-text-alignment/callout-text-alignment.module.d.ts +9 -0
- package/callout/examples/callout-theming/callout-theming.component.d.ts +3 -0
- package/callout/examples/callout-theming/callout-theming.module.d.ts +9 -0
- package/callout/examples/callout-with-grid/callout-with-grid.component.d.ts +3 -0
- package/callout/examples/callout-with-grid/callout-with-grid.module.d.ts +9 -0
- package/callout/examples/compact-callout/compact-callout.component.d.ts +3 -0
- package/callout/examples/compact-callout/compact-callout.module.d.ts +8 -0
- package/callout/examples/daffodil-design-callout-examples.d.ts +1 -0
- package/callout/examples/package.json +5 -6
- package/card/examples/basic-card/basic-card.component.d.ts +3 -0
- package/card/examples/basic-card/basic-card.module.d.ts +8 -0
- package/card/examples/card-orientation/card-orientation.component.d.ts +3 -0
- package/card/examples/card-orientation/card-orientation.module.d.ts +9 -0
- package/card/examples/card-theming/card-theming.component.d.ts +3 -0
- package/card/examples/card-theming/card-theming.module.d.ts +8 -0
- package/card/examples/daffodil-design-card-examples.d.ts +1 -6
- package/card/examples/linkable-card/linkable-card.component.d.ts +3 -0
- package/card/examples/linkable-card/linkable-card.module.d.ts +9 -0
- package/card/examples/package.json +5 -6
- package/card/examples/public_api.d.ts +4 -0
- package/card/examples/raised-card/raised-card.component.d.ts +3 -0
- package/card/examples/raised-card/raised-card.module.d.ts +8 -0
- package/card/examples/stroked-card/stroked-card.component.d.ts +3 -0
- package/card/examples/stroked-card/stroked-card.module.d.ts +9 -0
- package/checkbox/examples/basic-checkbox/basic-checkbox.component.d.ts +3 -0
- package/checkbox/examples/basic-checkbox/basic-checkbox.module.d.ts +7 -0
- package/checkbox/examples/checkbox-set/checkbox-set.component.d.ts +3 -0
- package/checkbox/examples/checkbox-set/checkbox-set.module.d.ts +7 -0
- package/checkbox/examples/daffodil-design-checkbox-examples.d.ts +1 -4
- package/checkbox/examples/package.json +5 -6
- package/container/examples/container-sizes/container-sizes.component.d.ts +3 -0
- package/container/examples/container-sizes/container-sizes.module.d.ts +8 -0
- package/container/examples/daffodil-design-container-examples.d.ts +1 -0
- package/container/examples/package.json +5 -6
- package/core/prefix-suffix/prefix-suffix.module.d.ts +6 -0
- package/core/prefix-suffix/prefix.directive.d.ts +3 -0
- package/core/prefix-suffix/suffix.directive.d.ts +3 -0
- package/core/public_api.d.ts +1 -0
- package/core/theming/functions/computer.d.ts +6 -0
- package/core/theming/initializer.d.ts +8 -0
- package/core/theming/public_api.d.ts +3 -0
- package/core/theming/services/class-setter/theme-class-setter.service.d.ts +31 -0
- package/core/theming/services/os-theme/ostheme.service.d.ts +20 -0
- package/core/theming/services/storage/theme-storage.service.d.ts +28 -0
- package/core/theming/services/theming.service.d.ts +33 -0
- package/core/theming/types/theme.d.ts +8 -0
- package/daff-global.scss +1 -1
- package/daff-theme.scss +9 -9
- package/daff-typography.scss +2 -0
- package/daff-util.scss +2 -0
- package/daffodil-design.d.ts +1 -11
- package/esm2020/accordion/examples/basic-accordion/basic-accordion.component.mjs +12 -0
- package/esm2020/accordion/examples/basic-accordion/basic-accordion.module.mjs +26 -0
- package/esm2020/accordion/examples/daffodil-design-accordion-examples.mjs +5 -0
- package/{esm2015/accordion/examples/index.js → esm2020/accordion/examples/index.mjs} +0 -0
- package/esm2020/accordion/examples/nav-accordion/nav-accordion.component.mjs +12 -0
- package/esm2020/accordion/examples/nav-accordion/nav-accordion.module.mjs +26 -0
- package/esm2020/accordion/examples/public_api.mjs +10 -0
- package/esm2020/article/examples/article-blockquote/article-blockquote.component.mjs +12 -0
- package/esm2020/article/examples/article-code-block/article-code-block.component.mjs +12 -0
- package/esm2020/article/examples/article-code-inline/article-code-inline.component.mjs +12 -0
- package/esm2020/article/examples/article-examples.module.mjs +41 -0
- package/esm2020/article/examples/article-headings/article-headings.component.mjs +12 -0
- package/esm2020/article/examples/article-hr/article-hr.component.mjs +12 -0
- package/esm2020/article/examples/article-lead/article-lead.component.mjs +12 -0
- package/esm2020/article/examples/article-link/article-link.component.mjs +12 -0
- package/esm2020/article/examples/article-meta/article-meta.component.mjs +12 -0
- package/esm2020/article/examples/article-ol/article-ol.component.mjs +12 -0
- package/esm2020/article/examples/article-table/article-table.component.mjs +12 -0
- package/esm2020/article/examples/article-ul/article-ul.component.mjs +12 -0
- package/esm2020/article/examples/daffodil-design-article-examples.mjs +5 -0
- package/{esm2015/article/examples/examples.js → esm2020/article/examples/examples.mjs} +0 -0
- package/{esm2015/article/examples/index.js → esm2020/article/examples/index.mjs} +0 -0
- package/{esm2015/article/examples/public_api.js → esm2020/article/examples/public_api.mjs} +0 -0
- package/esm2020/atoms/button/button.component.mjs +132 -0
- package/esm2020/atoms/button/button.module.mjs +32 -0
- package/{esm2015/atoms/button/public_api.js → esm2020/atoms/button/public_api.mjs} +0 -0
- package/esm2020/atoms/container/container.component.mjs +37 -0
- package/esm2020/atoms/container/container.module.mjs +26 -0
- package/{esm2015/atoms/container/public_api.js → esm2020/atoms/container/public_api.mjs} +0 -0
- package/esm2020/atoms/form/checkbox/checkbox.component.mjs +142 -0
- package/esm2020/atoms/form/checkbox/checkbox.module.mjs +41 -0
- package/esm2020/atoms/form/checkbox/cva/checkbox-cva.directive.mjs +94 -0
- package/{esm2015/atoms/form/checkbox/public_api.js → esm2020/atoms/form/checkbox/public_api.mjs} +0 -0
- package/esm2020/atoms/form/checkbox-set/checkbox-set.component.mjs +38 -0
- package/{esm2015/atoms/form/core/error-state-matcher/error-state-matcher.js → esm2020/atoms/form/core/error-state-matcher/error-state-matcher.mjs} +0 -0
- package/{esm2015/atoms/form/core/public_api.js → esm2020/atoms/form/core/public_api.mjs} +0 -0
- package/esm2020/atoms/form/error-message/error-message.component.mjs +11 -0
- package/esm2020/atoms/form/error-message/error-message.module.mjs +20 -0
- package/{esm2015/atoms/form/error-message/public_api.js → esm2020/atoms/form/error-message/public_api.mjs} +0 -0
- package/esm2020/atoms/form/form-field/form-field/form-field.component.mjs +102 -0
- package/{esm2015/atoms/form/form-field/form-field-control.js → esm2020/atoms/form/form-field/form-field-control.mjs} +0 -0
- package/{esm2015/atoms/form/form-field/form-field-errors.js → esm2020/atoms/form/form-field/form-field-errors.mjs} +0 -0
- package/esm2020/atoms/form/form-field/form-field.module.mjs +36 -0
- package/{esm2015/atoms/form/form-field/public_api.js → esm2020/atoms/form/form-field/public_api.mjs} +0 -0
- package/esm2020/atoms/form/input/input.component.mjs +59 -0
- package/esm2020/atoms/form/input/input.module.mjs +26 -0
- package/{esm2015/atoms/form/input/public_api.js → esm2020/atoms/form/input/public_api.mjs} +0 -0
- package/{esm2015/atoms/form/quantity-field/public_api.js → esm2020/atoms/form/quantity-field/public_api.mjs} +0 -0
- package/esm2020/atoms/form/quantity-field/quantity-field.component.mjs +133 -0
- package/esm2020/atoms/form/quantity-field/quantity-field.module.mjs +48 -0
- package/esm2020/atoms/form/quantity-field/quantity-input/quantity-input.component.mjs +99 -0
- package/esm2020/atoms/form/quantity-field/quantity-select/quantity-select.component.mjs +81 -0
- package/esm2020/atoms/form/radio/cva/radio-cva.directive.mjs +89 -0
- package/{esm2015/atoms/form/radio/public_api.js → esm2020/atoms/form/radio/public_api.mjs} +0 -0
- package/esm2020/atoms/form/radio/radio.component.mjs +132 -0
- package/esm2020/atoms/form/radio/radio.module.mjs +36 -0
- package/esm2020/atoms/form/radio/registry/radio-registry.mjs +54 -0
- package/esm2020/atoms/form/radio-set/radio-set.component.mjs +22 -0
- package/{esm2015/atoms/form/select/public_api.js → esm2020/atoms/form/select/public_api.mjs} +0 -0
- package/esm2020/atoms/form/select/select/select.component.mjs +64 -0
- package/esm2020/atoms/form/select/select.module.mjs +26 -0
- package/esm2020/atoms/image/image.component.mjs +111 -0
- package/esm2020/atoms/image/image.module.mjs +29 -0
- package/{esm2015/atoms/image/public_api.js → esm2020/atoms/image/public_api.mjs} +0 -0
- package/esm2020/atoms/loading-icon/loading-icon.component.mjs +53 -0
- package/esm2020/atoms/loading-icon/loading-icon.module.mjs +26 -0
- package/{esm2015/atoms/loading-icon/public_api.js → esm2020/atoms/loading-icon/public_api.mjs} +0 -0
- package/{esm2015/atoms/progress-indicator/animation/progress-indicator-animation.js → esm2020/atoms/progress-indicator/animation/progress-indicator-animation.mjs} +0 -0
- package/esm2020/atoms/progress-indicator/progress-indicator.component.mjs +81 -0
- package/esm2020/atoms/progress-indicator/progress-indicator.module.mjs +22 -0
- package/{esm2015/atoms/progress-indicator/public_api.js → esm2020/atoms/progress-indicator/public_api.mjs} +0 -0
- package/esm2020/button/examples/basic-button/basic-button.component.mjs +23 -0
- package/esm2020/button/examples/basic-button/basic-button.module.mjs +30 -0
- package/esm2020/button/examples/daffodil-design-button-examples.mjs +5 -0
- package/esm2020/button/examples/icon-button/icon-button.component.mjs +22 -0
- package/esm2020/button/examples/icon-button/icon-button.module.mjs +30 -0
- package/{esm2015/button/examples/index.js → esm2020/button/examples/index.mjs} +0 -0
- package/esm2020/button/examples/public_api.mjs +25 -0
- package/esm2020/button/examples/raised-button/raised-button.component.mjs +23 -0
- package/esm2020/button/examples/raised-button/raised-button.module.mjs +30 -0
- package/esm2020/button/examples/sizeable-button/sizeable-button.component.mjs +21 -0
- package/esm2020/button/examples/sizeable-button/sizeable-button.module.mjs +30 -0
- package/esm2020/button/examples/statusable-button/statusable-button.component.mjs +27 -0
- package/esm2020/button/examples/statusable-button/statusable-button.module.mjs +30 -0
- package/esm2020/button/examples/stroked-button/stroked-button.component.mjs +23 -0
- package/esm2020/button/examples/stroked-button/stroked-button.module.mjs +30 -0
- package/esm2020/button/examples/underline-button/underline-button.component.mjs +23 -0
- package/esm2020/button/examples/underline-button/underline-button.module.mjs +30 -0
- package/esm2020/callout/examples/callout-text-alignment/callout-text-alignment.component.mjs +27 -0
- package/esm2020/callout/examples/callout-text-alignment/callout-text-alignment.module.mjs +41 -0
- package/esm2020/callout/examples/callout-theming/callout-theming.component.mjs +31 -0
- package/esm2020/callout/examples/callout-theming/callout-theming.module.mjs +38 -0
- package/esm2020/callout/examples/callout-with-grid/callout-with-grid.component.mjs +17 -0
- package/esm2020/callout/examples/callout-with-grid/callout-with-grid.module.mjs +41 -0
- package/esm2020/callout/examples/compact-callout/compact-callout.component.mjs +17 -0
- package/esm2020/callout/examples/compact-callout/compact-callout.module.mjs +37 -0
- package/{esm2015/callout/examples/daffodil-design-callout-examples.js → esm2020/callout/examples/daffodil-design-callout-examples.mjs} +0 -0
- package/{esm2015/callout/examples/examples.js → esm2020/callout/examples/examples.mjs} +0 -0
- package/{esm2015/callout/examples/index.js → esm2020/callout/examples/index.mjs} +0 -0
- package/{esm2015/callout/examples/public_api.js → esm2020/callout/examples/public_api.mjs} +0 -0
- package/esm2020/card/examples/basic-card/basic-card.component.mjs +17 -0
- package/esm2020/card/examples/basic-card/basic-card.module.mjs +40 -0
- package/esm2020/card/examples/card-orientation/card-orientation.component.mjs +26 -0
- package/esm2020/card/examples/card-orientation/card-orientation.module.mjs +44 -0
- package/esm2020/card/examples/card-theming/card-theming.component.mjs +32 -0
- package/esm2020/card/examples/card-theming/card-theming.module.mjs +37 -0
- package/esm2020/card/examples/daffodil-design-card-examples.mjs +5 -0
- package/{esm2015/card/examples/index.js → esm2020/card/examples/index.mjs} +0 -0
- package/esm2020/card/examples/linkable-card/linkable-card.component.mjs +30 -0
- package/esm2020/card/examples/linkable-card/linkable-card.module.mjs +44 -0
- package/esm2020/card/examples/public_api.mjs +22 -0
- package/esm2020/card/examples/raised-card/raised-card.component.mjs +28 -0
- package/esm2020/card/examples/raised-card/raised-card.module.mjs +40 -0
- package/esm2020/card/examples/stroked-card/stroked-card.component.mjs +28 -0
- package/esm2020/card/examples/stroked-card/stroked-card.module.mjs +44 -0
- package/esm2020/checkbox/examples/basic-checkbox/basic-checkbox.component.mjs +26 -0
- package/esm2020/checkbox/examples/basic-checkbox/basic-checkbox.module.mjs +34 -0
- package/esm2020/checkbox/examples/checkbox-set/checkbox-set.component.mjs +28 -0
- package/esm2020/checkbox/examples/checkbox-set/checkbox-set.module.mjs +34 -0
- package/esm2020/checkbox/examples/daffodil-design-checkbox-examples.mjs +5 -0
- package/{esm2015/checkbox/examples/examples.js → esm2020/checkbox/examples/examples.mjs} +0 -0
- package/{esm2015/checkbox/examples/index.js → esm2020/checkbox/examples/index.mjs} +0 -0
- package/{esm2015/checkbox/examples/public_api.js → esm2020/checkbox/examples/public_api.mjs} +0 -0
- package/esm2020/container/examples/container-sizes/container-sizes.component.mjs +25 -0
- package/esm2020/container/examples/container-sizes/container-sizes.module.mjs +34 -0
- package/{esm2015/container/examples/daffodil-design-container-examples.js → esm2020/container/examples/daffodil-design-container-examples.mjs} +0 -0
- package/{esm2015/container/examples/examples.js → esm2020/container/examples/examples.mjs} +0 -0
- package/{esm2015/container/examples/index.js → esm2020/container/examples/index.mjs} +0 -0
- package/{esm2015/container/examples/public_api.js → esm2020/container/examples/public_api.mjs} +0 -0
- package/{esm2015/core/article-encapsulated/article-encapsulated-mixin.js → esm2020/core/article-encapsulated/article-encapsulated-mixin.mjs} +0 -0
- package/{esm2015/core/article-encapsulated/public_api.js → esm2020/core/article-encapsulated/public_api.mjs} +0 -0
- package/{esm2015/core/breakpoints/breakpoints.js → esm2020/core/breakpoints/breakpoints.mjs} +0 -0
- package/{esm2015/core/colorable/color-in-palette.js → esm2020/core/colorable/color-in-palette.mjs} +0 -0
- package/{esm2015/core/colorable/colorable-enum.js → esm2020/core/colorable/colorable-enum.mjs} +0 -0
- package/esm2020/core/colorable/colorable-mixin.mjs +42 -0
- package/{esm2015/core/colorable/colorable.js → esm2020/core/colorable/colorable.mjs} +0 -0
- package/{esm2015/core/colorable/public_api.js → esm2020/core/colorable/public_api.mjs} +0 -0
- package/{esm2015/core/compactable/compactable-mixin.js → esm2020/core/compactable/compactable-mixin.mjs} +0 -0
- package/{esm2015/core/compactable/compactable.js → esm2020/core/compactable/compactable.mjs} +0 -0
- package/{esm2015/core/compactable/public_api.js → esm2020/core/compactable/public_api.mjs} +0 -0
- package/{esm2015/core/constructor/constructor.js → esm2020/core/constructor/constructor.mjs} +0 -0
- package/{esm2015/core/manage-container-layout/manage-container-layout-mixin.js → esm2020/core/manage-container-layout/manage-container-layout-mixin.mjs} +0 -0
- package/{esm2015/core/manage-container-layout/public_api.js → esm2020/core/manage-container-layout/public_api.mjs} +0 -0
- package/{esm2015/core/mutable/mutable.js → esm2020/core/mutable/mutable.mjs} +0 -0
- package/esm2020/core/prefix-suffix/prefix-suffix.module.mjs +26 -0
- package/esm2020/core/prefix-suffix/prefix.directive.mjs +24 -0
- package/{esm2015/core/prefix-suffix/prefixable/prefixable-interface.js → esm2020/core/prefix-suffix/prefixable/prefixable-interface.mjs} +0 -0
- package/esm2020/core/prefix-suffix/prefixable/prefixable.mjs +23 -0
- package/{esm2015/core/prefix-suffix/public_api.js → esm2020/core/prefix-suffix/public_api.mjs} +0 -0
- package/esm2020/core/prefix-suffix/suffix.directive.mjs +24 -0
- package/{esm2015/core/prefix-suffix/suffixable/suffixable-interface.js → esm2020/core/prefix-suffix/suffixable/suffixable-interface.mjs} +0 -0
- package/esm2020/core/prefix-suffix/suffixable/suffixable.mjs +23 -0
- package/esm2020/core/public_api.mjs +14 -0
- package/esm2020/core/sizeable/sizeable-mixin.mjs +31 -0
- package/{esm2015/core/sizeable/sizeable.js → esm2020/core/sizeable/sizeable.mjs} +0 -0
- package/{esm2015/core/skeletonable/skeletonable.js → esm2020/core/skeletonable/skeletonable.mjs} +0 -0
- package/esm2020/core/statusable/statusable-mixin.mjs +32 -0
- package/{esm2015/core/statusable/statusable.js → esm2020/core/statusable/statusable.mjs} +0 -0
- package/esm2020/core/text-alignable/text-alignable-mixin.mjs +35 -0
- package/{esm2015/core/text-alignable/text-alignable.js → esm2020/core/text-alignable/text-alignable.mjs} +0 -0
- package/esm2020/core/theming/functions/computer.mjs +18 -0
- package/esm2020/core/theming/initializer.mjs +17 -0
- package/esm2020/core/theming/public_api.mjs +4 -0
- package/esm2020/core/theming/services/class-setter/theme-class-setter.service.mjs +52 -0
- package/esm2020/core/theming/services/os-theme/ostheme.service.mjs +49 -0
- package/esm2020/core/theming/services/storage/theme-storage.service.mjs +65 -0
- package/esm2020/core/theming/services/theming.service.mjs +61 -0
- package/esm2020/core/theming/types/theme.mjs +10 -0
- package/esm2020/daffodil-design.mjs +5 -0
- package/{esm2015/examples/examples.js → esm2020/examples/examples.mjs} +0 -0
- package/{esm2015/examples/public_api.js → esm2020/examples/public_api.mjs} +0 -0
- package/esm2020/hero/examples/compact-hero/compact-hero.component.mjs +17 -0
- package/esm2020/hero/examples/compact-hero/compact-hero.module.mjs +41 -0
- package/{esm2015/hero/examples/daffodil-design-hero-examples.js → esm2020/hero/examples/daffodil-design-hero-examples.mjs} +0 -0
- package/{esm2015/hero/examples/examples.js → esm2020/hero/examples/examples.mjs} +0 -0
- package/esm2020/hero/examples/hero-text-alignment/hero-text-alignment.component.mjs +27 -0
- package/esm2020/hero/examples/hero-text-alignment/hero-text-alignment.module.mjs +41 -0
- package/esm2020/hero/examples/hero-theming/hero-theming.component.mjs +21 -0
- package/esm2020/hero/examples/hero-theming/hero-theming.module.mjs +41 -0
- package/esm2020/hero/examples/hero-with-grid/hero-with-grid.component.mjs +17 -0
- package/esm2020/hero/examples/hero-with-grid/hero-with-grid.module.mjs +41 -0
- package/{esm2015/hero/examples/index.js → esm2020/hero/examples/index.mjs} +0 -0
- package/{esm2015/hero/examples/public_api.js → esm2020/hero/examples/public_api.mjs} +0 -0
- package/esm2020/list/examples/basic-list/basic-list.component.mjs +12 -0
- package/esm2020/list/examples/basic-list/basic-list.module.mjs +30 -0
- package/esm2020/list/examples/daffodil-design-list-examples.mjs +5 -0
- package/{esm2015/list/examples/examples.js → esm2020/list/examples/examples.mjs} +0 -0
- package/esm2020/list/examples/icon-list/icon-list.component.mjs +17 -0
- package/esm2020/list/examples/icon-list/icon-list.module.mjs +34 -0
- package/{esm2015/list/examples/index.js → esm2020/list/examples/index.mjs} +0 -0
- package/esm2020/list/examples/list-examples.module.mjs +39 -0
- package/esm2020/list/examples/multiline-list/multiline-list.component.mjs +12 -0
- package/esm2020/list/examples/multiline-list/multiline-list.module.mjs +34 -0
- package/esm2020/list/examples/nav-list/nav-list.component.mjs +17 -0
- package/esm2020/list/examples/nav-list/nav-list.module.mjs +34 -0
- package/{esm2015/list/examples/public_api.js → esm2020/list/examples/public_api.mjs} +0 -0
- package/esm2020/loading-icon/examples/daffodil-design-loading-icon-examples.mjs +5 -0
- package/{esm2015/loading-icon/examples/examples.js → esm2020/loading-icon/examples/examples.mjs} +0 -0
- package/{esm2015/loading-icon/examples/index.js → esm2020/loading-icon/examples/index.mjs} +0 -0
- package/esm2020/loading-icon/examples/loading-icon-color/loading-icon-color.component.mjs +19 -0
- package/esm2020/loading-icon/examples/loading-icon-color/loading-icon-color.module.mjs +33 -0
- package/esm2020/loading-icon/examples/loading-icon-diameter/loading-icon-diameter.component.mjs +12 -0
- package/esm2020/loading-icon/examples/loading-icon-diameter/loading-icon-diameter.module.mjs +26 -0
- package/{esm2015/loading-icon/examples/public_api.js → esm2020/loading-icon/examples/public_api.mjs} +0 -0
- package/esm2020/media-gallery/examples/basic-media-gallery/basic-media-gallery.component.mjs +12 -0
- package/esm2020/media-gallery/examples/basic-media-gallery/basic-media-gallery.module.mjs +30 -0
- package/esm2020/media-gallery/examples/daffodil-design-media-gallery-examples.mjs +5 -0
- package/{esm2015/media-gallery/examples/examples.js → esm2020/media-gallery/examples/examples.mjs} +0 -0
- package/{esm2015/media-gallery/examples/index.js → esm2020/media-gallery/examples/index.mjs} +0 -0
- package/esm2020/media-gallery/examples/mismatched-sizes-media-gallery/mismatched-sizes-media-gallery.component.mjs +12 -0
- package/esm2020/media-gallery/examples/mismatched-sizes-media-gallery/mismatched-sizes-media-gallery.module.mjs +30 -0
- package/esm2020/media-gallery/examples/public_api.mjs +6 -0
- package/esm2020/modal/examples/basic-modal/basic-modal.component.mjs +20 -0
- package/esm2020/modal/examples/basic-modal/basic-modal.module.mjs +32 -0
- package/esm2020/modal/examples/basic-modal/modal-content.component.mjs +12 -0
- package/esm2020/modal/examples/daffodil-design-modal-examples.mjs +5 -0
- package/{esm2015/modal/examples/index.js → esm2020/modal/examples/index.mjs} +0 -0
- package/{esm2015/modal/examples/public_api.js → esm2020/modal/examples/public_api.mjs} +0 -0
- package/esm2020/molecules/accordion/accordion/accordion.component.mjs +27 -0
- package/esm2020/molecules/accordion/accordion-item/accordion-item.component.mjs +54 -0
- package/esm2020/molecules/accordion/accordion-item-content/accordion-item-content.directive.mjs +22 -0
- package/esm2020/molecules/accordion/accordion-item-title/accordion-item-title.directive.mjs +22 -0
- package/esm2020/molecules/accordion/accordion.module.mjs +54 -0
- package/{esm2015/molecules/accordion/animation/accordion-animation-state.js → esm2020/molecules/accordion/animation/accordion-animation-state.mjs} +0 -0
- package/{esm2015/molecules/accordion/animation/accordion-animation.js → esm2020/molecules/accordion/animation/accordion-animation.mjs} +0 -0
- package/esm2020/molecules/accordion/nav-accordion-item/nav-accordion-item.component.mjs +78 -0
- package/esm2020/molecules/accordion/public_api.mjs +7 -0
- package/esm2020/molecules/article/article/article.component.mjs +30 -0
- package/esm2020/molecules/article/article-lead/article-lead.directive.mjs +22 -0
- package/esm2020/molecules/article/article-meta/article-meta.directive.mjs +22 -0
- package/esm2020/molecules/article/article-title/article-title.directive.mjs +22 -0
- package/esm2020/molecules/article/article.module.mjs +41 -0
- package/{esm2015/molecules/article/public_api.js → esm2020/molecules/article/public_api.mjs} +0 -0
- package/{esm2015/molecules/backdrop/animation/backdrop-animation.js → esm2020/molecules/backdrop/animation/backdrop-animation.mjs} +0 -0
- package/esm2020/molecules/backdrop/backdrop/backdrop.component.mjs +52 -0
- package/esm2020/molecules/backdrop/backdrop.module.mjs +29 -0
- package/{esm2015/molecules/backdrop/public_api.js → esm2020/molecules/backdrop/public_api.mjs} +0 -0
- package/esm2020/molecules/button-set/button-set.component.mjs +20 -0
- package/esm2020/molecules/button-set/button-set.module.mjs +20 -0
- package/{esm2015/molecules/button-set/public_api.js → esm2020/molecules/button-set/public_api.mjs} +0 -0
- package/esm2020/molecules/callout/callout/callout.component.mjs +71 -0
- package/esm2020/molecules/callout/callout-body/callout-body.directive.mjs +22 -0
- package/esm2020/molecules/callout/callout-icon/callout-icon.directive.mjs +22 -0
- package/esm2020/molecules/callout/callout-subtitle/callout-subtitle.directive.mjs +22 -0
- package/esm2020/molecules/callout/callout-tagline/callout-tagline.directive.mjs +22 -0
- package/esm2020/molecules/callout/callout-title/callout-title.directive.mjs +22 -0
- package/esm2020/molecules/callout/callout.module.mjs +51 -0
- package/{esm2015/molecules/callout/public_api.js → esm2020/molecules/callout/public_api.mjs} +0 -0
- package/esm2020/molecules/card/card/card.component.mjs +113 -0
- package/esm2020/molecules/card/card-actions/card-actions.directive.mjs +22 -0
- package/esm2020/molecules/card/card-content/card-content.directive.mjs +22 -0
- package/esm2020/molecules/card/card-icon/card-icon.directive.mjs +22 -0
- package/esm2020/molecules/card/card-image/card-image.directive.mjs +22 -0
- package/esm2020/molecules/card/card-tagline/card-tagline.directive.mjs +22 -0
- package/esm2020/molecules/card/card-title/card-title.directive.mjs +22 -0
- package/esm2020/molecules/card/card.module.mjs +56 -0
- package/{esm2015/molecules/card/public_api.js → esm2020/molecules/card/public_api.mjs} +0 -0
- package/esm2020/molecules/feature/feature/feature.component.mjs +49 -0
- package/esm2020/molecules/feature/feature-icon/feature-icon.directive.mjs +22 -0
- package/esm2020/molecules/feature/feature-subheader/feature-subheader.directive.mjs +22 -0
- package/esm2020/molecules/feature/feature-subtitle/feature-subtitle.directive.mjs +22 -0
- package/esm2020/molecules/feature/feature-title/feature-title.directive.mjs +22 -0
- package/esm2020/molecules/feature/feature.module.mjs +46 -0
- package/{esm2015/molecules/feature/public_api.js → esm2020/molecules/feature/public_api.mjs} +0 -0
- package/esm2020/molecules/hero/hero/hero.component.mjs +72 -0
- package/esm2020/molecules/hero/hero-body/hero-body.directive.mjs +22 -0
- package/esm2020/molecules/hero/hero-icon/hero-icon.directive.mjs +22 -0
- package/esm2020/molecules/hero/hero-subtitle/hero-subtitle.directive.mjs +22 -0
- package/esm2020/molecules/hero/hero-tagline/hero-tagline.directive.mjs +22 -0
- package/esm2020/molecules/hero/hero-title/hero-title.directive.mjs +22 -0
- package/esm2020/molecules/hero/hero.module.mjs +51 -0
- package/{esm2015/molecules/hero/public_api.js → esm2020/molecules/hero/public_api.mjs} +0 -0
- package/esm2020/molecules/image-gallery/gallery-image/gallery-image.component.mjs +25 -0
- package/esm2020/molecules/image-gallery/image-gallery/image-gallery.component.mjs +15 -0
- package/esm2020/molecules/image-gallery/image-gallery.module.mjs +35 -0
- package/{esm2015/molecules/image-gallery/public_api.js → esm2020/molecules/image-gallery/public_api.mjs} +0 -0
- package/esm2020/molecules/image-list/image-list.component.mjs +20 -0
- package/esm2020/molecules/image-list/image-list.module.mjs +26 -0
- package/{esm2015/molecules/image-list/public_api.js → esm2020/molecules/image-list/public_api.mjs} +0 -0
- package/esm2020/molecules/link-set/link-set/link-set.component.mjs +37 -0
- package/esm2020/molecules/link-set/link-set-heading/link-set-heading.directive.mjs +25 -0
- package/esm2020/molecules/link-set/link-set-item/link-set-item.component.mjs +26 -0
- package/esm2020/molecules/link-set/link-set-subheading/link-set-subheading.directive.mjs +25 -0
- package/esm2020/molecules/link-set/link-set.module.mjs +41 -0
- package/{esm2015/molecules/link-set/public_api.js → esm2020/molecules/link-set/public_api.mjs} +0 -0
- package/esm2020/molecules/list/list/list.component.mjs +110 -0
- package/esm2020/molecules/list/list-item/list-item.component.mjs +49 -0
- package/esm2020/molecules/list/list-subheader/list-subheader.directive.mjs +25 -0
- package/esm2020/molecules/list/list.module.mjs +42 -0
- package/{esm2015/molecules/list/public_api.js → esm2020/molecules/list/public_api.mjs} +0 -0
- package/{esm2015/molecules/media-gallery/media-gallery-registration.interface.js → esm2020/molecules/media-gallery/media-gallery-registration.interface.mjs} +0 -0
- package/{esm2015/molecules/media-gallery/media-gallery-token.js → esm2020/molecules/media-gallery/media-gallery-token.mjs} +0 -0
- package/esm2020/molecules/media-gallery/media-gallery.component.mjs +59 -0
- package/esm2020/molecules/media-gallery/media-gallery.module.mjs +34 -0
- package/esm2020/molecules/media-gallery/media-renderer/media-renderer.component.mjs +76 -0
- package/{esm2015/molecules/media-gallery/public_api.js → esm2020/molecules/media-gallery/public_api.mjs} +0 -0
- package/esm2020/molecules/media-gallery/registry/media-gallery.registry.mjs +97 -0
- package/{esm2015/molecules/media-gallery/thumbnail/thumbnail-compat.token.js → esm2020/molecules/media-gallery/thumbnail/thumbnail-compat.token.mjs} +0 -0
- package/{esm2015/molecules/media-gallery/thumbnail/thumbnail-registration.interface.js → esm2020/molecules/media-gallery/thumbnail/thumbnail-registration.interface.mjs} +0 -0
- package/esm2020/molecules/media-gallery/thumbnail/thumbnail.directive.mjs +88 -0
- package/{esm2015/molecules/modal/animations/modal-animation-state.js → esm2020/molecules/modal/animations/modal-animation-state.mjs} +0 -0
- package/{esm2015/molecules/modal/animations/modal-animation.js → esm2020/molecules/modal/animations/modal-animation.mjs} +0 -0
- package/{esm2015/molecules/modal/modal/modal-config.js → esm2020/molecules/modal/modal/modal-config.mjs} +0 -0
- package/esm2020/molecules/modal/modal/modal.component.mjs +79 -0
- package/esm2020/molecules/modal/modal-actions/modal-actions.component.mjs +11 -0
- package/esm2020/molecules/modal/modal-content/modal-content.component.mjs +11 -0
- package/esm2020/molecules/modal/modal-header/modal-header.component.mjs +20 -0
- package/esm2020/molecules/modal/modal-title/modal-title.directive.mjs +22 -0
- package/{esm2015/molecules/modal/modal.js → esm2020/molecules/modal/modal.mjs} +0 -0
- package/esm2020/molecules/modal/modal.module.mjs +52 -0
- package/{esm2015/molecules/modal/public_api.js → esm2020/molecules/modal/public_api.mjs} +0 -0
- package/esm2020/molecules/modal/service/modal.service.mjs +70 -0
- package/esm2020/molecules/navbar/navbar.component.mjs +51 -0
- package/esm2020/molecules/navbar/navbar.module.mjs +20 -0
- package/{esm2015/molecules/navbar/public_api.js → esm2020/molecules/navbar/public_api.mjs} +0 -0
- package/{esm2015/molecules/paginator/paginator-errors.js → esm2020/molecules/paginator/paginator-errors.mjs} +0 -0
- package/esm2020/molecules/paginator/paginator.component.mjs +159 -0
- package/esm2020/molecules/paginator/paginator.module.mjs +34 -0
- package/{esm2015/molecules/paginator/public_api.js → esm2020/molecules/paginator/public_api.mjs} +0 -0
- package/{esm2015/molecules/qty-dropdown/public_api.js → esm2020/molecules/qty-dropdown/public_api.mjs} +0 -0
- package/esm2020/molecules/qty-dropdown/qty-dropdown.component.mjs +115 -0
- package/esm2020/molecules/qty-dropdown/qty-dropdown.module.mjs +42 -0
- package/{esm2015/molecules/sidebar/animation/sidebar-animation-state.js → esm2020/molecules/sidebar/animation/sidebar-animation-state.mjs} +0 -0
- package/{esm2015/molecules/sidebar/animation/sidebar-animation.js → esm2020/molecules/sidebar/animation/sidebar-animation.mjs} +0 -0
- package/{esm2015/molecules/sidebar/helper/sidebar-mode.js → esm2020/molecules/sidebar/helper/sidebar-mode.mjs} +0 -0
- package/{esm2015/molecules/sidebar/public_api.js → esm2020/molecules/sidebar/public_api.mjs} +0 -0
- package/esm2020/molecules/sidebar/sidebar/sidebar.component.mjs +44 -0
- package/esm2020/molecules/sidebar/sidebar-viewport/sidebar-viewport.component.mjs +121 -0
- package/esm2020/molecules/sidebar/sidebar.module.mjs +39 -0
- package/esm2020/navbar/examples/basic-navbar/basic-navbar.component.mjs +12 -0
- package/esm2020/navbar/examples/basic-navbar/basic-navbar.module.mjs +33 -0
- package/esm2020/navbar/examples/contained-navbar/contained-navbar.component.mjs +12 -0
- package/esm2020/navbar/examples/contained-navbar/contained-navbar.module.mjs +33 -0
- package/{esm2015/navbar/examples/daffodil-design-navbar-examples.js → esm2020/navbar/examples/daffodil-design-navbar-examples.mjs} +0 -0
- package/{esm2015/navbar/examples/examples.js → esm2020/navbar/examples/examples.mjs} +0 -0
- package/{esm2015/navbar/examples/index.js → esm2020/navbar/examples/index.mjs} +0 -0
- package/esm2020/navbar/examples/navbar-theming/navbar-theming.component.mjs +28 -0
- package/esm2020/navbar/examples/navbar-theming/navbar-theming.module.mjs +34 -0
- package/{esm2015/navbar/examples/public_api.js → esm2020/navbar/examples/public_api.mjs} +0 -0
- package/esm2020/navbar/examples/raised-navbar/raised-navbar.component.mjs +12 -0
- package/esm2020/navbar/examples/raised-navbar/raised-navbar.module.mjs +30 -0
- package/esm2020/paginator/examples/basic-paginator/basic-paginator.component.mjs +19 -0
- package/esm2020/paginator/examples/daffodil-design-paginator-examples.mjs +5 -0
- package/esm2020/paginator/examples/examples.mjs +5 -0
- package/esm2020/paginator/examples/index.mjs +2 -0
- package/esm2020/paginator/examples/paginator-examples.module.mjs +31 -0
- package/esm2020/paginator/examples/public_api.mjs +4 -0
- package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
- package/esm2020/quantity-field/examples/basic/basic-quantity-field.component.mjs +17 -0
- package/esm2020/quantity-field/examples/basic/basic-quantity-field.module.mjs +37 -0
- package/esm2020/quantity-field/examples/customRange/custom-range-quantity-field.component.mjs +17 -0
- package/esm2020/quantity-field/examples/customRange/custom-range-quantity-field.module.mjs +37 -0
- package/esm2020/quantity-field/examples/daffodil-design-quantity-field-examples.mjs +5 -0
- package/esm2020/quantity-field/examples/disabled/disabled-quantity-field.component.mjs +17 -0
- package/esm2020/quantity-field/examples/disabled/disabled-quantity-field.module.mjs +37 -0
- package/{esm2015/quantity-field/examples/examples.js → esm2020/quantity-field/examples/examples.mjs} +0 -0
- package/{esm2015/quantity-field/examples/index.js → esm2020/quantity-field/examples/index.mjs} +0 -0
- package/esm2020/quantity-field/examples/public_api.mjs +10 -0
- package/esm2020/quantity-field/examples/selectMax/select-max-quantity-field.component.mjs +17 -0
- package/esm2020/quantity-field/examples/selectMax/select-max-quantity-field.module.mjs +37 -0
- package/esm2020/radio/examples/basic-radio/basic-radio.component.mjs +21 -0
- package/esm2020/radio/examples/basic-radio/basic-radio.module.mjs +31 -0
- package/esm2020/radio/examples/daffodil-design-radio-examples.mjs +5 -0
- package/{esm2015/radio/examples/examples.js → esm2020/radio/examples/examples.mjs} +0 -0
- package/{esm2015/radio/examples/index.js → esm2020/radio/examples/index.mjs} +0 -0
- package/{esm2015/radio/examples/public_api.js → esm2020/radio/examples/public_api.mjs} +0 -0
- package/fesm2015/daffodil-design-accordion-examples.mjs +78 -0
- package/fesm2015/daffodil-design-accordion-examples.mjs.map +1 -0
- package/fesm2015/daffodil-design-article-examples.mjs +150 -0
- package/fesm2015/daffodil-design-article-examples.mjs.map +1 -0
- package/fesm2015/daffodil-design-button-examples.mjs +326 -0
- package/fesm2015/daffodil-design-button-examples.mjs.map +1 -0
- package/fesm2015/daffodil-design-callout-examples.mjs +221 -0
- package/fesm2015/daffodil-design-callout-examples.mjs.map +1 -0
- package/fesm2015/daffodil-design-card-examples.mjs +362 -0
- package/fesm2015/daffodil-design-card-examples.mjs.map +1 -0
- package/fesm2015/daffodil-design-checkbox-examples.mjs +123 -0
- package/fesm2015/daffodil-design-checkbox-examples.mjs.map +1 -0
- package/fesm2015/daffodil-design-container-examples.mjs +66 -0
- package/fesm2015/daffodil-design-container-examples.mjs.map +1 -0
- package/fesm2015/daffodil-design-hero-examples.mjs +218 -0
- package/fesm2015/daffodil-design-hero-examples.mjs.map +1 -0
- package/fesm2015/daffodil-design-list-examples.mjs +204 -0
- package/fesm2015/daffodil-design-list-examples.mjs.map +1 -0
- package/fesm2015/daffodil-design-loading-icon-examples.mjs +91 -0
- package/fesm2015/daffodil-design-loading-icon-examples.mjs.map +1 -0
- package/fesm2015/daffodil-design-media-gallery-examples.mjs +86 -0
- package/fesm2015/daffodil-design-media-gallery-examples.mjs.map +1 -0
- package/fesm2015/daffodil-design-modal-examples.mjs +66 -0
- package/fesm2015/daffodil-design-modal-examples.mjs.map +1 -0
- package/fesm2015/daffodil-design-navbar-examples.mjs +180 -0
- package/fesm2015/daffodil-design-navbar-examples.mjs.map +1 -0
- package/fesm2015/daffodil-design-paginator-examples.mjs +57 -0
- package/fesm2015/daffodil-design-paginator-examples.mjs.map +1 -0
- package/fesm2015/daffodil-design-quantity-field-examples.mjs +193 -0
- package/fesm2015/daffodil-design-quantity-field-examples.mjs.map +1 -0
- package/fesm2015/daffodil-design-radio-examples.mjs +62 -0
- package/fesm2015/daffodil-design-radio-examples.mjs.map +1 -0
- package/fesm2015/daffodil-design.mjs +5393 -0
- package/fesm2015/daffodil-design.mjs.map +1 -0
- package/fesm2020/daffodil-design-accordion-examples.mjs +78 -0
- package/fesm2020/daffodil-design-accordion-examples.mjs.map +1 -0
- package/fesm2020/daffodil-design-article-examples.mjs +150 -0
- package/fesm2020/daffodil-design-article-examples.mjs.map +1 -0
- package/fesm2020/daffodil-design-button-examples.mjs +326 -0
- package/fesm2020/daffodil-design-button-examples.mjs.map +1 -0
- package/fesm2020/daffodil-design-callout-examples.mjs +221 -0
- package/fesm2020/daffodil-design-callout-examples.mjs.map +1 -0
- package/fesm2020/daffodil-design-card-examples.mjs +362 -0
- package/fesm2020/daffodil-design-card-examples.mjs.map +1 -0
- package/fesm2020/daffodil-design-checkbox-examples.mjs +123 -0
- package/fesm2020/daffodil-design-checkbox-examples.mjs.map +1 -0
- package/fesm2020/daffodil-design-container-examples.mjs +66 -0
- package/fesm2020/daffodil-design-container-examples.mjs.map +1 -0
- package/fesm2020/daffodil-design-hero-examples.mjs +218 -0
- package/fesm2020/daffodil-design-hero-examples.mjs.map +1 -0
- package/fesm2020/daffodil-design-list-examples.mjs +204 -0
- package/fesm2020/daffodil-design-list-examples.mjs.map +1 -0
- package/fesm2020/daffodil-design-loading-icon-examples.mjs +91 -0
- package/fesm2020/daffodil-design-loading-icon-examples.mjs.map +1 -0
- package/fesm2020/daffodil-design-media-gallery-examples.mjs +86 -0
- package/fesm2020/daffodil-design-media-gallery-examples.mjs.map +1 -0
- package/fesm2020/daffodil-design-modal-examples.mjs +66 -0
- package/fesm2020/daffodil-design-modal-examples.mjs.map +1 -0
- package/fesm2020/daffodil-design-navbar-examples.mjs +180 -0
- package/fesm2020/daffodil-design-navbar-examples.mjs.map +1 -0
- package/fesm2020/daffodil-design-paginator-examples.mjs +57 -0
- package/fesm2020/daffodil-design-paginator-examples.mjs.map +1 -0
- package/fesm2020/daffodil-design-quantity-field-examples.mjs +193 -0
- package/fesm2020/daffodil-design-quantity-field-examples.mjs.map +1 -0
- package/fesm2020/daffodil-design-radio-examples.mjs +62 -0
- package/fesm2020/daffodil-design-radio-examples.mjs.map +1 -0
- package/fesm2020/daffodil-design.mjs +5380 -0
- package/fesm2020/daffodil-design.mjs.map +1 -0
- package/hero/examples/compact-hero/compact-hero.component.d.ts +3 -0
- package/hero/examples/compact-hero/compact-hero.module.d.ts +9 -0
- package/hero/examples/daffodil-design-hero-examples.d.ts +1 -0
- package/hero/examples/hero-text-alignment/hero-text-alignment.component.d.ts +3 -0
- package/hero/examples/hero-text-alignment/hero-text-alignment.module.d.ts +9 -0
- package/hero/examples/hero-theming/hero-theming.component.d.ts +3 -0
- package/hero/examples/hero-theming/hero-theming.module.d.ts +9 -0
- package/hero/examples/hero-with-grid/hero-with-grid.component.d.ts +3 -0
- package/hero/examples/hero-with-grid/hero-with-grid.module.d.ts +9 -0
- package/hero/examples/package.json +5 -6
- package/list/examples/basic-list/basic-list.component.d.ts +3 -0
- package/list/examples/basic-list/basic-list.module.d.ts +7 -0
- package/list/examples/daffodil-design-list-examples.d.ts +1 -4
- package/list/examples/icon-list/icon-list.component.d.ts +3 -0
- package/list/examples/icon-list/icon-list.module.d.ts +8 -0
- package/list/examples/list-examples.module.d.ts +9 -0
- package/list/examples/multiline-list/multiline-list.component.d.ts +3 -0
- package/list/examples/multiline-list/multiline-list.module.d.ts +8 -0
- package/list/examples/nav-list/nav-list.component.d.ts +3 -0
- package/list/examples/nav-list/nav-list.module.d.ts +8 -0
- package/list/examples/package.json +5 -6
- package/loading-icon/examples/daffodil-design-loading-icon-examples.d.ts +1 -1
- package/loading-icon/examples/loading-icon-color/loading-icon-color.component.d.ts +3 -0
- package/loading-icon/examples/loading-icon-color/loading-icon-color.module.d.ts +7 -0
- package/loading-icon/examples/loading-icon-diameter/loading-icon-diameter.component.d.ts +3 -0
- package/loading-icon/examples/loading-icon-diameter/loading-icon-diameter.module.d.ts +6 -0
- package/loading-icon/examples/package.json +5 -6
- package/media-gallery/examples/basic-media-gallery/basic-media-gallery.component.d.ts +3 -0
- package/media-gallery/examples/basic-media-gallery/basic-media-gallery.module.d.ts +6 -0
- package/media-gallery/examples/daffodil-design-media-gallery-examples.d.ts +1 -2
- package/media-gallery/examples/mismatched-sizes-media-gallery/mismatched-sizes-media-gallery.component.d.ts +3 -0
- package/media-gallery/examples/mismatched-sizes-media-gallery/mismatched-sizes-media-gallery.module.d.ts +6 -0
- package/media-gallery/examples/package.json +5 -6
- package/media-gallery/examples/public_api.d.ts +2 -0
- package/modal/examples/basic-modal/basic-modal.component.d.ts +3 -0
- package/modal/examples/basic-modal/basic-modal.module.d.ts +7 -0
- package/modal/examples/basic-modal/modal-content.component.d.ts +3 -0
- package/modal/examples/daffodil-design-modal-examples.d.ts +1 -3
- package/modal/examples/package.json +5 -6
- package/molecules/accordion/accordion/accordion.component.d.ts +3 -0
- package/molecules/accordion/accordion-item/accordion-item.component.d.ts +3 -0
- package/molecules/accordion/accordion-item-content/accordion-item-content.directive.d.ts +3 -0
- package/molecules/accordion/accordion-item-title/accordion-item-title.directive.d.ts +3 -0
- package/molecules/accordion/accordion.module.d.ts +12 -0
- package/molecules/accordion/nav-accordion-item/nav-accordion-item.component.d.ts +3 -0
- package/molecules/accordion/public_api.d.ts +1 -0
- package/molecules/article/article/article.component.d.ts +3 -0
- package/molecules/article/article-lead/article-lead.directive.d.ts +3 -0
- package/molecules/article/article-meta/article-meta.directive.d.ts +3 -0
- package/molecules/article/article-title/article-title.directive.d.ts +3 -0
- package/molecules/article/article.module.d.ts +9 -0
- package/molecules/backdrop/backdrop/backdrop.component.d.ts +3 -0
- package/molecules/backdrop/backdrop.module.d.ts +6 -0
- package/molecules/button-set/button-set.component.d.ts +3 -0
- package/molecules/button-set/button-set.module.d.ts +5 -0
- package/molecules/callout/callout/callout.component.d.ts +3 -0
- package/molecules/callout/callout-body/callout-body.directive.d.ts +3 -0
- package/molecules/callout/callout-icon/callout-icon.directive.d.ts +3 -0
- package/molecules/callout/callout-subtitle/callout-subtitle.directive.d.ts +3 -0
- package/molecules/callout/callout-tagline/callout-tagline.directive.d.ts +3 -0
- package/molecules/callout/callout-title/callout-title.directive.d.ts +3 -0
- package/molecules/callout/callout.module.d.ts +11 -0
- package/molecules/card/card/card.component.d.ts +3 -0
- package/molecules/card/card-actions/card-actions.directive.d.ts +3 -0
- package/molecules/card/card-content/card-content.directive.d.ts +3 -0
- package/molecules/card/card-icon/card-icon.directive.d.ts +3 -0
- package/molecules/card/card-image/card-image.directive.d.ts +3 -0
- package/molecules/card/card-tagline/card-tagline.directive.d.ts +3 -0
- package/molecules/card/card-title/card-title.directive.d.ts +3 -0
- package/molecules/card/card.module.d.ts +12 -0
- package/molecules/feature/feature/feature.component.d.ts +3 -0
- package/molecules/feature/feature-icon/feature-icon.directive.d.ts +3 -0
- package/molecules/feature/feature-subheader/feature-subheader.directive.d.ts +3 -0
- package/molecules/feature/feature-subtitle/feature-subtitle.directive.d.ts +3 -0
- package/molecules/feature/feature-title/feature-title.directive.d.ts +3 -0
- package/molecules/feature/feature.module.d.ts +10 -0
- package/molecules/hero/hero/hero.component.d.ts +3 -0
- package/molecules/hero/hero-body/hero-body.directive.d.ts +3 -0
- package/molecules/hero/hero-icon/hero-icon.directive.d.ts +3 -0
- package/molecules/hero/hero-subtitle/hero-subtitle.directive.d.ts +3 -0
- package/molecules/hero/hero-tagline/hero-tagline.directive.d.ts +3 -0
- package/molecules/hero/hero-title/hero-title.directive.d.ts +3 -0
- package/molecules/hero/hero.module.d.ts +11 -0
- package/molecules/image-gallery/gallery-image/gallery-image.component.d.ts +3 -0
- package/molecules/image-gallery/image-gallery/image-gallery.component.d.ts +3 -0
- package/molecules/image-gallery/image-gallery.module.d.ts +8 -0
- package/molecules/image-list/image-list.component.d.ts +3 -0
- package/molecules/image-list/image-list.module.d.ts +6 -0
- package/molecules/link-set/link-set/link-set.component.d.ts +3 -0
- package/molecules/link-set/link-set-heading/link-set-heading.directive.d.ts +3 -0
- package/molecules/link-set/link-set-item/link-set-item.component.d.ts +3 -0
- package/molecules/link-set/link-set-subheading/link-set-subheading.directive.d.ts +3 -0
- package/molecules/link-set/link-set.module.d.ts +9 -0
- package/molecules/list/list/list.component.d.ts +4 -1
- package/molecules/list/list-item/list-item.component.d.ts +3 -0
- package/molecules/list/list-subheader/list-subheader.directive.d.ts +3 -0
- package/molecules/list/list.module.d.ts +9 -0
- package/molecules/media-gallery/media-gallery.component.d.ts +3 -0
- package/molecules/media-gallery/media-gallery.module.d.ts +8 -0
- package/molecules/media-gallery/media-renderer/media-renderer.component.d.ts +3 -0
- package/molecules/media-gallery/registry/media-gallery.registry.d.ts +3 -0
- package/molecules/media-gallery/thumbnail/thumbnail.directive.d.ts +3 -0
- package/molecules/modal/modal/modal.component.d.ts +3 -0
- package/molecules/modal/modal-actions/modal-actions.component.d.ts +3 -0
- package/molecules/modal/modal-content/modal-content.component.d.ts +3 -0
- package/molecules/modal/modal-header/modal-header.component.d.ts +3 -0
- package/molecules/modal/modal-title/modal-title.directive.d.ts +3 -0
- package/molecules/modal/modal.module.d.ts +12 -0
- package/molecules/modal/service/modal.service.d.ts +3 -0
- package/molecules/navbar/navbar.component.d.ts +3 -0
- package/molecules/navbar/navbar.module.d.ts +5 -0
- package/molecules/paginator/paginator.component.d.ts +3 -0
- package/molecules/paginator/paginator.module.d.ts +8 -0
- package/molecules/qty-dropdown/qty-dropdown.component.d.ts +3 -0
- package/molecules/qty-dropdown/qty-dropdown.module.d.ts +10 -0
- package/molecules/sidebar/sidebar/sidebar.component.d.ts +3 -0
- package/molecules/sidebar/sidebar-viewport/sidebar-viewport.component.d.ts +3 -0
- package/molecules/sidebar/sidebar.module.d.ts +9 -0
- package/navbar/examples/basic-navbar/basic-navbar.component.d.ts +3 -0
- package/navbar/examples/basic-navbar/basic-navbar.module.d.ts +7 -0
- package/navbar/examples/contained-navbar/contained-navbar.component.d.ts +3 -0
- package/navbar/examples/contained-navbar/contained-navbar.module.d.ts +7 -0
- package/navbar/examples/daffodil-design-navbar-examples.d.ts +1 -0
- package/navbar/examples/navbar-theming/navbar-theming.component.d.ts +3 -0
- package/navbar/examples/navbar-theming/navbar-theming.module.d.ts +8 -0
- package/navbar/examples/package.json +5 -6
- package/navbar/examples/raised-navbar/raised-navbar.component.d.ts +3 -0
- package/navbar/examples/raised-navbar/raised-navbar.module.d.ts +7 -0
- package/package.json +154 -14
- package/paginator/examples/basic-paginator/basic-paginator.component.d.ts +8 -0
- package/paginator/examples/daffodil-design-paginator-examples.d.ts +5 -0
- package/paginator/examples/examples.d.ts +2 -0
- package/paginator/examples/index.d.ts +1 -0
- package/paginator/examples/package.json +10 -0
- package/paginator/examples/paginator-examples.module.d.ts +9 -0
- package/paginator/examples/public_api.d.ts +3 -0
- package/quantity-field/examples/basic/basic-quantity-field.component.d.ts +3 -0
- package/quantity-field/examples/basic/basic-quantity-field.module.d.ts +8 -0
- package/quantity-field/examples/customRange/custom-range-quantity-field.component.d.ts +3 -0
- package/quantity-field/examples/customRange/custom-range-quantity-field.module.d.ts +8 -0
- package/quantity-field/examples/daffodil-design-quantity-field-examples.d.ts +1 -4
- package/quantity-field/examples/disabled/disabled-quantity-field.component.d.ts +3 -0
- package/quantity-field/examples/disabled/disabled-quantity-field.module.d.ts +8 -0
- package/quantity-field/examples/package.json +5 -6
- package/quantity-field/examples/public_api.d.ts +4 -0
- package/quantity-field/examples/selectMax/select-max-quantity-field.component.d.ts +3 -0
- package/quantity-field/examples/selectMax/select-max-quantity-field.module.d.ts +8 -0
- package/radio/examples/basic-radio/basic-radio.component.d.ts +3 -0
- package/radio/examples/basic-radio/basic-radio.module.d.ts +7 -0
- package/radio/examples/daffodil-design-radio-examples.d.ts +1 -2
- package/radio/examples/package.json +5 -6
- package/src/atoms/button/README.md +53 -0
- package/src/atoms/container/README.md +18 -0
- package/src/atoms/form/README.md +0 -0
- package/src/atoms/form/checkbox/README.md +0 -0
- package/src/atoms/form/checkbox-set/README.md +0 -0
- package/src/atoms/form/error-message/README.md +11 -0
- package/src/atoms/form/form-field/README.md +36 -0
- package/src/atoms/form/form-label/README.md +0 -0
- package/src/atoms/form/input/README.md +11 -0
- package/src/atoms/form/quantity-field/README.md +25 -0
- package/src/atoms/form/radio/README.md +55 -0
- package/src/atoms/form/radio-set/README.md +0 -0
- package/src/atoms/form/select/README.md +13 -0
- package/src/atoms/image/README.md +21 -0
- package/src/atoms/loading-icon/README.md +7 -0
- package/src/atoms/progress-indicator/README.md +2 -0
- package/src/molecules/accordion/README.md +21 -0
- package/src/molecules/article/README.md +49 -0
- package/src/molecules/backdrop/README.md +13 -0
- package/src/molecules/button-set/README.md +13 -0
- package/src/molecules/callout/README.md +54 -0
- package/src/molecules/card/README.md +60 -0
- package/src/molecules/feature/README.md +48 -0
- package/src/molecules/hero/README.md +54 -0
- package/src/molecules/image-gallery/README.md +31 -0
- package/src/molecules/image-list/README.md +14 -0
- package/src/molecules/link-set/README.md +44 -0
- package/src/molecules/list/README.md +69 -0
- package/src/molecules/media-gallery/README.md +19 -0
- package/src/molecules/modal/README.md +47 -0
- package/src/molecules/navbar/README.md +41 -0
- package/src/molecules/paginator/README.md +11 -0
- package/src/molecules/qty-dropdown/README.md +0 -0
- package/src/molecules/sidebar/README.md +10 -0
- package/src/scss/README.md +7 -0
- package/accordion/examples/daffodil-design-accordion-examples.metadata.json +0 -1
- package/article/examples/daffodil-design-article-examples.metadata.json +0 -1
- package/bundles/daffodil-design-accordion-examples.umd.js +0 -91
- package/bundles/daffodil-design-accordion-examples.umd.js.map +0 -1
- package/bundles/daffodil-design-accordion-examples.umd.min.js +0 -2
- package/bundles/daffodil-design-accordion-examples.umd.min.js.map +0 -1
- package/bundles/daffodil-design-article-examples.umd.js +0 -530
- package/bundles/daffodil-design-article-examples.umd.js.map +0 -1
- package/bundles/daffodil-design-article-examples.umd.min.js +0 -2
- package/bundles/daffodil-design-article-examples.umd.min.js.map +0 -1
- package/bundles/daffodil-design-button-examples.umd.js +0 -298
- package/bundles/daffodil-design-button-examples.umd.js.map +0 -1
- package/bundles/daffodil-design-button-examples.umd.min.js +0 -2
- package/bundles/daffodil-design-button-examples.umd.min.js.map +0 -1
- package/bundles/daffodil-design-callout-examples.umd.js +0 -195
- package/bundles/daffodil-design-callout-examples.umd.js.map +0 -1
- package/bundles/daffodil-design-callout-examples.umd.min.js +0 -2
- package/bundles/daffodil-design-callout-examples.umd.min.js.map +0 -1
- package/bundles/daffodil-design-card-examples.umd.js +0 -321
- package/bundles/daffodil-design-card-examples.umd.js.map +0 -1
- package/bundles/daffodil-design-card-examples.umd.min.js +0 -2
- package/bundles/daffodil-design-card-examples.umd.min.js.map +0 -1
- package/bundles/daffodil-design-checkbox-examples.umd.js +0 -123
- package/bundles/daffodil-design-checkbox-examples.umd.js.map +0 -1
- package/bundles/daffodil-design-checkbox-examples.umd.min.js +0 -2
- package/bundles/daffodil-design-checkbox-examples.umd.min.js.map +0 -1
- package/bundles/daffodil-design-container-examples.umd.js +0 -65
- package/bundles/daffodil-design-container-examples.umd.js.map +0 -1
- package/bundles/daffodil-design-container-examples.umd.min.js +0 -2
- package/bundles/daffodil-design-container-examples.umd.min.js.map +0 -1
- package/bundles/daffodil-design-hero-examples.umd.js +0 -192
- package/bundles/daffodil-design-hero-examples.umd.js.map +0 -1
- package/bundles/daffodil-design-hero-examples.umd.min.js +0 -2
- package/bundles/daffodil-design-hero-examples.umd.min.js.map +0 -1
- package/bundles/daffodil-design-list-examples.umd.js +0 -509
- package/bundles/daffodil-design-list-examples.umd.js.map +0 -1
- package/bundles/daffodil-design-list-examples.umd.min.js +0 -2
- package/bundles/daffodil-design-list-examples.umd.min.js.map +0 -1
- package/bundles/daffodil-design-loading-icon-examples.umd.js +0 -94
- package/bundles/daffodil-design-loading-icon-examples.umd.js.map +0 -1
- package/bundles/daffodil-design-loading-icon-examples.umd.min.js +0 -2
- package/bundles/daffodil-design-loading-icon-examples.umd.min.js.map +0 -1
- package/bundles/daffodil-design-media-gallery-examples.umd.js +0 -95
- package/bundles/daffodil-design-media-gallery-examples.umd.js.map +0 -1
- package/bundles/daffodil-design-media-gallery-examples.umd.min.js +0 -2
- package/bundles/daffodil-design-media-gallery-examples.umd.min.js.map +0 -1
- package/bundles/daffodil-design-modal-examples.umd.js +0 -80
- package/bundles/daffodil-design-modal-examples.umd.js.map +0 -1
- package/bundles/daffodil-design-modal-examples.umd.min.js +0 -2
- package/bundles/daffodil-design-modal-examples.umd.min.js.map +0 -1
- package/bundles/daffodil-design-navbar-examples.umd.js +0 -177
- package/bundles/daffodil-design-navbar-examples.umd.js.map +0 -1
- package/bundles/daffodil-design-navbar-examples.umd.min.js +0 -2
- package/bundles/daffodil-design-navbar-examples.umd.min.js.map +0 -1
- package/bundles/daffodil-design-quantity-field-examples.umd.js +0 -183
- package/bundles/daffodil-design-quantity-field-examples.umd.js.map +0 -1
- package/bundles/daffodil-design-quantity-field-examples.umd.min.js +0 -2
- package/bundles/daffodil-design-quantity-field-examples.umd.min.js.map +0 -1
- package/bundles/daffodil-design-radio-examples.umd.js +0 -68
- package/bundles/daffodil-design-radio-examples.umd.js.map +0 -1
- package/bundles/daffodil-design-radio-examples.umd.min.js +0 -2
- package/bundles/daffodil-design-radio-examples.umd.min.js.map +0 -1
- package/bundles/daffodil-design.umd.js +0 -5781
- package/bundles/daffodil-design.umd.js.map +0 -1
- package/bundles/daffodil-design.umd.min.js +0 -16
- package/bundles/daffodil-design.umd.min.js.map +0 -1
- package/button/examples/daffodil-design-button-examples.metadata.json +0 -1
- package/callout/examples/daffodil-design-callout-examples.metadata.json +0 -1
- package/card/examples/daffodil-design-card-examples.metadata.json +0 -1
- package/checkbox/examples/daffodil-design-checkbox-examples.metadata.json +0 -1
- package/container/examples/daffodil-design-container-examples.metadata.json +0 -1
- package/daffodil-design.metadata.json +0 -1
- package/esm2015/accordion/examples/basic-accordion/basic-accordion.component.js +0 -12
- package/esm2015/accordion/examples/basic-accordion/basic-accordion.module.js +0 -19
- package/esm2015/accordion/examples/daffodil-design-accordion-examples.js +0 -7
- package/esm2015/accordion/examples/nav-accordion/nav-accordion.component.js +0 -12
- package/esm2015/accordion/examples/nav-accordion/nav-accordion.module.js +0 -19
- package/esm2015/accordion/examples/public_api.js +0 -9
- package/esm2015/article/examples/article-blockquote/article-blockquote.component.js +0 -12
- package/esm2015/article/examples/article-code-block/article-code-block.component.js +0 -12
- package/esm2015/article/examples/article-code-inline/article-code-inline.component.js +0 -12
- package/esm2015/article/examples/article-examples.module.js +0 -21
- package/esm2015/article/examples/article-headings/article-headings.component.js +0 -12
- package/esm2015/article/examples/article-hr/article-hr.component.js +0 -12
- package/esm2015/article/examples/article-lead/article-lead.component.js +0 -12
- package/esm2015/article/examples/article-link/article-link.component.js +0 -12
- package/esm2015/article/examples/article-meta/article-meta.component.js +0 -12
- package/esm2015/article/examples/article-ol/article-ol.component.js +0 -12
- package/esm2015/article/examples/article-table/article-table.component.js +0 -12
- package/esm2015/article/examples/article-ul/article-ul.component.js +0 -12
- package/esm2015/article/examples/daffodil-design-article-examples.js +0 -6
- package/esm2015/atoms/button/button.component.js +0 -134
- package/esm2015/atoms/button/button.module.js +0 -22
- package/esm2015/atoms/container/container.component.js +0 -46
- package/esm2015/atoms/container/container.module.js +0 -19
- package/esm2015/atoms/form/checkbox/checkbox.component.js +0 -131
- package/esm2015/atoms/form/checkbox/checkbox.module.js +0 -28
- package/esm2015/atoms/form/checkbox/cva/checkbox-cva.directive.js +0 -89
- package/esm2015/atoms/form/checkbox-set/checkbox-set.component.js +0 -34
- package/esm2015/atoms/form/error-message/error-message.component.js +0 -12
- package/esm2015/atoms/form/error-message/error-message.module.js +0 -15
- package/esm2015/atoms/form/form-field/form-field/form-field.component.js +0 -100
- package/esm2015/atoms/form/form-field/form-field.module.js +0 -24
- package/esm2015/atoms/form/input/input.component.js +0 -56
- package/esm2015/atoms/form/input/input.module.js +0 -19
- package/esm2015/atoms/form/quantity-field/quantity-field.component.js +0 -120
- package/esm2015/atoms/form/quantity-field/quantity-field.module.js +0 -31
- package/esm2015/atoms/form/quantity-field/quantity-input/quantity-input.component.js +0 -100
- package/esm2015/atoms/form/quantity-field/quantity-select/quantity-select.component.js +0 -80
- package/esm2015/atoms/form/radio/cva/radio-cva.directive.js +0 -84
- package/esm2015/atoms/form/radio/radio.component.js +0 -122
- package/esm2015/atoms/form/radio/radio.module.js +0 -25
- package/esm2015/atoms/form/radio/registry/radio-registry.js +0 -52
- package/esm2015/atoms/form/radio-set/radio-set.component.js +0 -24
- package/esm2015/atoms/form/select/select/select.component.js +0 -60
- package/esm2015/atoms/form/select/select.module.js +0 -19
- package/esm2015/atoms/image/image.component.js +0 -109
- package/esm2015/atoms/image/image.module.js +0 -22
- package/esm2015/atoms/loading-icon/loading-icon.component.js +0 -59
- package/esm2015/atoms/loading-icon/loading-icon.module.js +0 -19
- package/esm2015/atoms/progress-indicator/progress-indicator.component.js +0 -87
- package/esm2015/atoms/progress-indicator/progress-indicator.module.js +0 -15
- package/esm2015/button/examples/basic-button/basic-button.component.js +0 -23
- package/esm2015/button/examples/basic-button/basic-button.module.js +0 -21
- package/esm2015/button/examples/daffodil-design-button-examples.js +0 -12
- package/esm2015/button/examples/icon-button/icon-button.component.js +0 -22
- package/esm2015/button/examples/icon-button/icon-button.module.js +0 -21
- package/esm2015/button/examples/public_api.js +0 -24
- package/esm2015/button/examples/raised-button/raised-button.component.js +0 -23
- package/esm2015/button/examples/raised-button/raised-button.module.js +0 -21
- package/esm2015/button/examples/sizeable-button/sizeable-button.component.js +0 -21
- package/esm2015/button/examples/sizeable-button/sizeable-button.module.js +0 -21
- package/esm2015/button/examples/statusable-button/statusable-button.component.js +0 -27
- package/esm2015/button/examples/statusable-button/statusable-button.module.js +0 -21
- package/esm2015/button/examples/stroked-button/stroked-button.component.js +0 -23
- package/esm2015/button/examples/stroked-button/stroked-button.module.js +0 -21
- package/esm2015/button/examples/underline-button/underline-button.component.js +0 -23
- package/esm2015/button/examples/underline-button/underline-button.module.js +0 -21
- package/esm2015/callout/examples/callout-text-alignment/callout-text-alignment.component.js +0 -25
- package/esm2015/callout/examples/callout-text-alignment/callout-text-alignment.module.js +0 -24
- package/esm2015/callout/examples/callout-theming/callout-theming.component.js +0 -29
- package/esm2015/callout/examples/callout-theming/callout-theming.module.js +0 -23
- package/esm2015/callout/examples/callout-with-grid/callout-with-grid.component.js +0 -17
- package/esm2015/callout/examples/callout-with-grid/callout-with-grid.module.js +0 -24
- package/esm2015/callout/examples/compact-callout/compact-callout.component.js +0 -17
- package/esm2015/callout/examples/compact-callout/compact-callout.module.js +0 -22
- package/esm2015/card/examples/basic-card/basic-card.component.js +0 -17
- package/esm2015/card/examples/basic-card/basic-card.module.js +0 -25
- package/esm2015/card/examples/card-orientation/card-orientation.component.js +0 -24
- package/esm2015/card/examples/card-orientation/card-orientation.module.js +0 -27
- package/esm2015/card/examples/card-theming/card-theming.component.js +0 -31
- package/esm2015/card/examples/card-theming/card-theming.module.js +0 -24
- package/esm2015/card/examples/daffodil-design-card-examples.js +0 -11
- package/esm2015/card/examples/linkable-card/linkable-card.component.js +0 -29
- package/esm2015/card/examples/linkable-card/linkable-card.module.js +0 -27
- package/esm2015/card/examples/public_api.js +0 -21
- package/esm2015/card/examples/raised-card/raised-card.component.js +0 -27
- package/esm2015/card/examples/raised-card/raised-card.module.js +0 -25
- package/esm2015/card/examples/stroked-card/stroked-card.component.js +0 -27
- package/esm2015/card/examples/stroked-card/stroked-card.module.js +0 -27
- package/esm2015/checkbox/examples/basic-checkbox/basic-checkbox.component.js +0 -25
- package/esm2015/checkbox/examples/basic-checkbox/basic-checkbox.module.js +0 -23
- package/esm2015/checkbox/examples/checkbox-set/checkbox-set.component.js +0 -27
- package/esm2015/checkbox/examples/checkbox-set/checkbox-set.module.js +0 -23
- package/esm2015/checkbox/examples/daffodil-design-checkbox-examples.js +0 -9
- package/esm2015/container/examples/container-sizes/container-sizes.component.js +0 -23
- package/esm2015/container/examples/container-sizes/container-sizes.module.js +0 -23
- package/esm2015/core/colorable/colorable-mixin.js +0 -43
- package/esm2015/core/prefix-suffix/prefix-suffix.module.js +0 -19
- package/esm2015/core/prefix-suffix/prefix.directive.js +0 -20
- package/esm2015/core/prefix-suffix/prefixable/prefixable.js +0 -24
- package/esm2015/core/prefix-suffix/suffix.directive.js +0 -20
- package/esm2015/core/prefix-suffix/suffixable/suffixable.js +0 -24
- package/esm2015/core/public_api.js +0 -13
- package/esm2015/core/sizeable/sizeable-mixin.js +0 -32
- package/esm2015/core/statusable/statusable-mixin.js +0 -33
- package/esm2015/core/text-alignable/text-alignable-mixin.js +0 -36
- package/esm2015/daffodil-design.js +0 -15
- package/esm2015/hero/examples/compact-hero/compact-hero.component.js +0 -17
- package/esm2015/hero/examples/compact-hero/compact-hero.module.js +0 -26
- package/esm2015/hero/examples/hero-text-alignment/hero-text-alignment.component.js +0 -25
- package/esm2015/hero/examples/hero-text-alignment/hero-text-alignment.module.js +0 -24
- package/esm2015/hero/examples/hero-theming/hero-theming.component.js +0 -20
- package/esm2015/hero/examples/hero-theming/hero-theming.module.js +0 -26
- package/esm2015/hero/examples/hero-with-grid/hero-with-grid.component.js +0 -17
- package/esm2015/hero/examples/hero-with-grid/hero-with-grid.module.js +0 -24
- package/esm2015/list/examples/basic-list/basic-list.component.js +0 -12
- package/esm2015/list/examples/basic-list/basic-list.module.js +0 -21
- package/esm2015/list/examples/daffodil-design-list-examples.js +0 -9
- package/esm2015/list/examples/icon-list/icon-list.component.js +0 -16
- package/esm2015/list/examples/icon-list/icon-list.module.js +0 -23
- package/esm2015/list/examples/list-examples.module.js +0 -24
- package/esm2015/list/examples/multiline-list/multiline-list.component.js +0 -12
- package/esm2015/list/examples/multiline-list/multiline-list.module.js +0 -23
- package/esm2015/list/examples/nav-list/nav-list.component.js +0 -16
- package/esm2015/list/examples/nav-list/nav-list.module.js +0 -23
- package/esm2015/loading-icon/examples/daffodil-design-loading-icon-examples.js +0 -6
- package/esm2015/loading-icon/examples/loading-icon-color/loading-icon-color.component.js +0 -18
- package/esm2015/loading-icon/examples/loading-icon-color/loading-icon-color.module.js +0 -22
- package/esm2015/loading-icon/examples/loading-icon-diameter/loading-icon-diameter.component.js +0 -12
- package/esm2015/loading-icon/examples/loading-icon-diameter/loading-icon-diameter.module.js +0 -19
- package/esm2015/media-gallery/examples/basic-media-gallery/basic-media-gallery.component.js +0 -12
- package/esm2015/media-gallery/examples/basic-media-gallery/basic-media-gallery.module.js +0 -21
- package/esm2015/media-gallery/examples/daffodil-design-media-gallery-examples.js +0 -7
- package/esm2015/media-gallery/examples/mismatched-sizes-media-gallery/mismatched-sizes-media-gallery.component.js +0 -12
- package/esm2015/media-gallery/examples/mismatched-sizes-media-gallery/mismatched-sizes-media-gallery.module.js +0 -21
- package/esm2015/media-gallery/examples/public_api.js +0 -4
- package/esm2015/modal/examples/basic-modal/basic-modal.component.js +0 -24
- package/esm2015/modal/examples/basic-modal/basic-modal.module.js +0 -22
- package/esm2015/modal/examples/basic-modal/modal-content.component.js +0 -12
- package/esm2015/modal/examples/daffodil-design-modal-examples.js +0 -8
- package/esm2015/molecules/accordion/accordion/accordion.component.js +0 -33
- package/esm2015/molecules/accordion/accordion-item/accordion-item.component.js +0 -52
- package/esm2015/molecules/accordion/accordion-item-content/accordion-item-content.directive.js +0 -18
- package/esm2015/molecules/accordion/accordion-item-title/accordion-item-title.directive.js +0 -18
- package/esm2015/molecules/accordion/accordion.module.js +0 -35
- package/esm2015/molecules/accordion/nav-accordion-item/nav-accordion-item.component.js +0 -72
- package/esm2015/molecules/accordion/public_api.js +0 -6
- package/esm2015/molecules/article/article/article.component.js +0 -30
- package/esm2015/molecules/article/article-lead/article-lead.directive.js +0 -18
- package/esm2015/molecules/article/article-meta/article-meta.directive.js +0 -18
- package/esm2015/molecules/article/article-title/article-title.directive.js +0 -18
- package/esm2015/molecules/article/article.module.js +0 -28
- package/esm2015/molecules/backdrop/backdrop/backdrop.component.js +0 -46
- package/esm2015/molecules/backdrop/backdrop.module.js +0 -22
- package/esm2015/molecules/button-set/button-set.component.js +0 -22
- package/esm2015/molecules/button-set/button-set.module.js +0 -15
- package/esm2015/molecules/callout/callout/callout.component.js +0 -75
- package/esm2015/molecules/callout/callout-body/callout-body.directive.js +0 -18
- package/esm2015/molecules/callout/callout-icon/callout-icon.directive.js +0 -18
- package/esm2015/molecules/callout/callout-subtitle/callout-subtitle.directive.js +0 -18
- package/esm2015/molecules/callout/callout-tagline/callout-tagline.directive.js +0 -18
- package/esm2015/molecules/callout/callout-title/callout-title.directive.js +0 -18
- package/esm2015/molecules/callout/callout.module.js +0 -34
- package/esm2015/molecules/card/card/card.component.js +0 -118
- package/esm2015/molecules/card/card-actions/card-actions.directive.js +0 -18
- package/esm2015/molecules/card/card-content/card-content.directive.js +0 -18
- package/esm2015/molecules/card/card-icon/card-icon.directive.js +0 -18
- package/esm2015/molecules/card/card-image/card-image.directive.js +0 -18
- package/esm2015/molecules/card/card-tagline/card-tagline.directive.js +0 -18
- package/esm2015/molecules/card/card-title/card-title.directive.js +0 -18
- package/esm2015/molecules/card/card.module.js +0 -37
- package/esm2015/molecules/feature/feature/feature.component.js +0 -46
- package/esm2015/molecules/feature/feature-icon/feature-icon.directive.js +0 -18
- package/esm2015/molecules/feature/feature-subheader/feature-subheader.directive.js +0 -18
- package/esm2015/molecules/feature/feature-subtitle/feature-subtitle.directive.js +0 -18
- package/esm2015/molecules/feature/feature-title/feature-title.directive.js +0 -18
- package/esm2015/molecules/feature/feature.module.js +0 -31
- package/esm2015/molecules/hero/hero/hero.component.js +0 -76
- package/esm2015/molecules/hero/hero-body/hero-body.directive.js +0 -18
- package/esm2015/molecules/hero/hero-icon/hero-icon.directive.js +0 -18
- package/esm2015/molecules/hero/hero-subtitle/hero-subtitle.directive.js +0 -18
- package/esm2015/molecules/hero/hero-tagline/hero-tagline.directive.js +0 -18
- package/esm2015/molecules/hero/hero-title/hero-title.directive.js +0 -18
- package/esm2015/molecules/hero/hero.module.js +0 -34
- package/esm2015/molecules/image-gallery/gallery-image/gallery-image.component.js +0 -21
- package/esm2015/molecules/image-gallery/image-gallery/image-gallery.component.js +0 -16
- package/esm2015/molecules/image-gallery/image-gallery.module.js +0 -24
- package/esm2015/molecules/image-list/image-list.component.js +0 -22
- package/esm2015/molecules/image-list/image-list.module.js +0 -19
- package/esm2015/molecules/link-set/link-set/link-set.component.js +0 -44
- package/esm2015/molecules/link-set/link-set-heading/link-set-heading.directive.js +0 -21
- package/esm2015/molecules/link-set/link-set-item/link-set-item.component.js +0 -22
- package/esm2015/molecules/link-set/link-set-subheading/link-set-subheading.directive.js +0 -21
- package/esm2015/molecules/link-set/link-set.module.js +0 -28
- package/esm2015/molecules/list/list/list.component.js +0 -106
- package/esm2015/molecules/list/list-item/list-item.component.js +0 -46
- package/esm2015/molecules/list/list-subheader/list-subheader.directive.js +0 -21
- package/esm2015/molecules/list/list.module.js +0 -28
- package/esm2015/molecules/media-gallery/media-gallery.component.js +0 -61
- package/esm2015/molecules/media-gallery/media-gallery.module.js +0 -24
- package/esm2015/molecules/media-gallery/media-renderer/media-renderer.component.js +0 -78
- package/esm2015/molecules/media-gallery/registry/media-gallery.registry.js +0 -86
- package/esm2015/molecules/media-gallery/thumbnail/thumbnail.directive.js +0 -79
- package/esm2015/molecules/modal/modal/modal.component.js +0 -73
- package/esm2015/molecules/modal/modal-actions/modal-actions.component.js +0 -12
- package/esm2015/molecules/modal/modal-content/modal-content.component.js +0 -12
- package/esm2015/molecules/modal/modal-header/modal-header.component.js +0 -22
- package/esm2015/molecules/modal/modal-title/modal-title.directive.js +0 -18
- package/esm2015/molecules/modal/modal.module.js +0 -34
- package/esm2015/molecules/modal/service/modal.service.js +0 -73
- package/esm2015/molecules/navbar/navbar.component.js +0 -58
- package/esm2015/molecules/navbar/navbar.module.js +0 -15
- package/esm2015/molecules/paginator/paginator.component.js +0 -161
- package/esm2015/molecules/paginator/paginator.module.js +0 -23
- package/esm2015/molecules/qty-dropdown/qty-dropdown.component.js +0 -110
- package/esm2015/molecules/qty-dropdown/qty-dropdown.module.js +0 -27
- package/esm2015/molecules/sidebar/sidebar/sidebar.component.js +0 -50
- package/esm2015/molecules/sidebar/sidebar-viewport/sidebar-viewport.component.js +0 -117
- package/esm2015/molecules/sidebar/sidebar.module.js +0 -26
- package/esm2015/navbar/examples/basic-navbar/basic-navbar.component.js +0 -13
- package/esm2015/navbar/examples/basic-navbar/basic-navbar.module.js +0 -20
- package/esm2015/navbar/examples/contained-navbar/contained-navbar.component.js +0 -13
- package/esm2015/navbar/examples/contained-navbar/contained-navbar.module.js +0 -20
- package/esm2015/navbar/examples/navbar-theming/navbar-theming.component.js +0 -27
- package/esm2015/navbar/examples/navbar-theming/navbar-theming.module.js +0 -21
- package/esm2015/navbar/examples/raised-navbar/raised-navbar.component.js +0 -13
- package/esm2015/navbar/examples/raised-navbar/raised-navbar.module.js +0 -19
- package/esm2015/quantity-field/examples/basic/basic-quantity-field.component.js +0 -17
- package/esm2015/quantity-field/examples/basic/basic-quantity-field.module.js +0 -24
- package/esm2015/quantity-field/examples/customRange/custom-range-quantity-field.component.js +0 -17
- package/esm2015/quantity-field/examples/customRange/custom-range-quantity-field.module.js +0 -24
- package/esm2015/quantity-field/examples/daffodil-design-quantity-field-examples.js +0 -9
- package/esm2015/quantity-field/examples/disabled/disabled-quantity-field.component.js +0 -17
- package/esm2015/quantity-field/examples/disabled/disabled-quantity-field.module.js +0 -24
- package/esm2015/quantity-field/examples/public_api.js +0 -6
- package/esm2015/quantity-field/examples/selectMax/select-max-quantity-field.component.js +0 -17
- package/esm2015/quantity-field/examples/selectMax/select-max-quantity-field.module.js +0 -24
- package/esm2015/radio/examples/basic-radio/basic-radio.component.js +0 -22
- package/esm2015/radio/examples/basic-radio/basic-radio.module.js +0 -22
- package/esm2015/radio/examples/daffodil-design-radio-examples.js +0 -7
- package/fesm2015/daffodil-design-accordion-examples.js +0 -68
- package/fesm2015/daffodil-design-accordion-examples.js.map +0 -1
- package/fesm2015/daffodil-design-article-examples.js +0 -162
- package/fesm2015/daffodil-design-article-examples.js.map +0 -1
- package/fesm2015/daffodil-design-button-examples.js +0 -288
- package/fesm2015/daffodil-design-button-examples.js.map +0 -1
- package/fesm2015/daffodil-design-callout-examples.js +0 -168
- package/fesm2015/daffodil-design-callout-examples.js.map +0 -1
- package/fesm2015/daffodil-design-card-examples.js +0 -287
- package/fesm2015/daffodil-design-card-examples.js.map +0 -1
- package/fesm2015/daffodil-design-checkbox-examples.js +0 -104
- package/fesm2015/daffodil-design-checkbox-examples.js.map +0 -1
- package/fesm2015/daffodil-design-container-examples.js +0 -54
- package/fesm2015/daffodil-design-container-examples.js.map +0 -1
- package/fesm2015/daffodil-design-hero-examples.js +0 -165
- package/fesm2015/daffodil-design-hero-examples.js.map +0 -1
- package/fesm2015/daffodil-design-list-examples.js +0 -157
- package/fesm2015/daffodil-design-list-examples.js.map +0 -1
- package/fesm2015/daffodil-design-loading-icon-examples.js +0 -76
- package/fesm2015/daffodil-design-loading-icon-examples.js.map +0 -1
- package/fesm2015/daffodil-design-media-gallery-examples.js +0 -72
- package/fesm2015/daffodil-design-media-gallery-examples.js.map +0 -1
- package/fesm2015/daffodil-design-modal-examples.js +0 -63
- package/fesm2015/daffodil-design-modal-examples.js.map +0 -1
- package/fesm2015/daffodil-design-navbar-examples.js +0 -142
- package/fesm2015/daffodil-design-navbar-examples.js.map +0 -1
- package/fesm2015/daffodil-design-quantity-field-examples.js +0 -154
- package/fesm2015/daffodil-design-quantity-field-examples.js.map +0 -1
- package/fesm2015/daffodil-design-radio-examples.js +0 -55
- package/fesm2015/daffodil-design-radio-examples.js.map +0 -1
- package/fesm2015/daffodil-design.js +0 -4776
- package/fesm2015/daffodil-design.js.map +0 -1
- package/hero/examples/daffodil-design-hero-examples.metadata.json +0 -1
- package/list/examples/daffodil-design-list-examples.metadata.json +0 -1
- package/loading-icon/examples/daffodil-design-loading-icon-examples.metadata.json +0 -1
- package/media-gallery/examples/daffodil-design-media-gallery-examples.metadata.json +0 -1
- package/modal/examples/daffodil-design-modal-examples.metadata.json +0 -1
- package/navbar/examples/daffodil-design-navbar-examples.metadata.json +0 -1
- package/quantity-field/examples/daffodil-design-quantity-field-examples.metadata.json +0 -1
- package/radio/examples/daffodil-design-radio-examples.metadata.json +0 -1
@@ -1,4776 +0,0 @@
|
|
1
|
-
import { Input, Directive, HostBinding, NgModule, ContentChild, Component, ViewEncapsulation, ChangeDetectionStrategy, ElementRef, Renderer2, InjectionToken, ɵɵdefineInjectable, Injectable, ComponentFactoryResolver, Inject, ViewChild, TemplateRef, ViewContainerRef, EventEmitter, Type, ChangeDetectorRef, Output, HostListener, Optional, Self, ContentChildren, SkipSelf, ɵɵinject, NgZone } from '@angular/core';
|
2
|
-
import { CommonModule } from '@angular/common';
|
3
|
-
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
4
|
-
import { faChevronDown, faChevronUp, faChevronRight, faChevronLeft } from '@fortawesome/free-solid-svg-icons';
|
5
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
6
|
-
import { BehaviorSubject, Subject, fromEvent } from 'rxjs';
|
7
|
-
import { takeUntil, filter } from 'rxjs/operators';
|
8
|
-
import { NgControl, FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
9
|
-
import { coerceNumberProperty } from '@angular/cdk/coercion';
|
10
|
-
import { trigger, state, style, transition, animate } from '@angular/animations';
|
11
|
-
import { CdkPortalOutlet, PortalModule, ComponentPortal } from '@angular/cdk/portal';
|
12
|
-
import { OverlayModule, GlobalPositionStrategy, Overlay } from '@angular/cdk/overlay';
|
13
|
-
import { A11yModule } from '@angular/cdk/a11y';
|
14
|
-
|
15
|
-
/**
|
16
|
-
* A mixin for giving a component the ability to prevent article styles from cascading down.
|
17
|
-
*/
|
18
|
-
function daffArticleEncapsulatedMixin(Base) {
|
19
|
-
return class extends Base {
|
20
|
-
constructor(...args) {
|
21
|
-
super(...args);
|
22
|
-
this._renderer.addClass(this._elementRef.nativeElement, `daff-ae`);
|
23
|
-
}
|
24
|
-
};
|
25
|
-
}
|
26
|
-
|
27
|
-
var DaffPaletteEnum;
|
28
|
-
(function (DaffPaletteEnum) {
|
29
|
-
DaffPaletteEnum["PRIMARY"] = "primary";
|
30
|
-
DaffPaletteEnum["SECONDARY"] = "secondary";
|
31
|
-
DaffPaletteEnum["ACCENT"] = "accent";
|
32
|
-
DaffPaletteEnum["TERTIARY"] = "tertiary";
|
33
|
-
DaffPaletteEnum["BLACK"] = "black";
|
34
|
-
DaffPaletteEnum["WHITE"] = "white";
|
35
|
-
DaffPaletteEnum["THEME"] = "theme";
|
36
|
-
DaffPaletteEnum["THEMECONTRAST"] = "theme-contrast";
|
37
|
-
})(DaffPaletteEnum || (DaffPaletteEnum = {}));
|
38
|
-
|
39
|
-
function colorInPalette(color) {
|
40
|
-
return Object.values(DaffPaletteEnum).includes(color);
|
41
|
-
}
|
42
|
-
|
43
|
-
/**
|
44
|
-
* This should be a trait, but typescript only supports mixins.
|
45
|
-
* See: https://github.com/Microsoft/TypeScript/issues/311
|
46
|
-
*
|
47
|
-
* Turns out the material team followed the same path with the color mixin.
|
48
|
-
* https://github.com/angular/material2/blob/master/src/lib/core/common-behaviors/color.ts
|
49
|
-
*/
|
50
|
-
function daffColorMixin(Base, defaultColor) {
|
51
|
-
class DaffColorableMixinClass extends Base {
|
52
|
-
constructor(...args) {
|
53
|
-
super(...args);
|
54
|
-
this.color = defaultColor;
|
55
|
-
}
|
56
|
-
get color() {
|
57
|
-
return this._color;
|
58
|
-
}
|
59
|
-
set color(value) {
|
60
|
-
//Handle the default color
|
61
|
-
const incomingColor = value || defaultColor;
|
62
|
-
if (incomingColor !== undefined && !colorInPalette(incomingColor)) {
|
63
|
-
throw new TypeError(incomingColor + ' is not a valid color for the DaffPalette');
|
64
|
-
}
|
65
|
-
if (incomingColor !== this._color) { //Only run the dom-render if a change occurs
|
66
|
-
//Remove the old color
|
67
|
-
if (this._color) {
|
68
|
-
this._renderer.removeClass(this._elementRef.nativeElement, `daff-${this._color}`);
|
69
|
-
}
|
70
|
-
if (incomingColor) {
|
71
|
-
this._renderer.addClass(this._elementRef.nativeElement, `daff-${incomingColor}`);
|
72
|
-
}
|
73
|
-
this._color = incomingColor;
|
74
|
-
}
|
75
|
-
}
|
76
|
-
}
|
77
|
-
DaffColorableMixinClass.propDecorators = {
|
78
|
-
color: [{ type: Input }]
|
79
|
-
};
|
80
|
-
;
|
81
|
-
return DaffColorableMixinClass;
|
82
|
-
}
|
83
|
-
|
84
|
-
/**
|
85
|
-
*
|
86
|
-
* Prefix can be used to place content before another piece of content in components like
|
87
|
-
* `daff-form-field`, `daff-solo-field`, and `daff-list`.
|
88
|
-
*/
|
89
|
-
class DaffPrefixDirective {
|
90
|
-
constructor() {
|
91
|
-
this.class = true;
|
92
|
-
}
|
93
|
-
}
|
94
|
-
DaffPrefixDirective.decorators = [
|
95
|
-
{ type: Directive, args: [{
|
96
|
-
selector: '[daffPrefix]',
|
97
|
-
},] }
|
98
|
-
];
|
99
|
-
DaffPrefixDirective.propDecorators = {
|
100
|
-
class: [{ type: HostBinding, args: ['class.daff-prefix',] }]
|
101
|
-
};
|
102
|
-
|
103
|
-
/**
|
104
|
-
*
|
105
|
-
* Prefix can be used to place content after another piece of content in components like
|
106
|
-
* `daff-form-field`, `daff-solo-field`, and `daff-list`.
|
107
|
-
*/
|
108
|
-
class DaffSuffixDirective {
|
109
|
-
constructor() {
|
110
|
-
this.class = true;
|
111
|
-
}
|
112
|
-
}
|
113
|
-
DaffSuffixDirective.decorators = [
|
114
|
-
{ type: Directive, args: [{
|
115
|
-
selector: '[daffSuffix]',
|
116
|
-
},] }
|
117
|
-
];
|
118
|
-
DaffSuffixDirective.propDecorators = {
|
119
|
-
class: [{ type: HostBinding, args: ['class.daff-suffix',] }]
|
120
|
-
};
|
121
|
-
|
122
|
-
class DaffPrefixSuffixModule {
|
123
|
-
}
|
124
|
-
DaffPrefixSuffixModule.decorators = [
|
125
|
-
{ type: NgModule, args: [{
|
126
|
-
imports: [],
|
127
|
-
exports: [
|
128
|
-
DaffPrefixDirective,
|
129
|
-
DaffSuffixDirective,
|
130
|
-
],
|
131
|
-
declarations: [
|
132
|
-
DaffPrefixDirective,
|
133
|
-
DaffSuffixDirective,
|
134
|
-
],
|
135
|
-
},] }
|
136
|
-
];
|
137
|
-
|
138
|
-
/**
|
139
|
-
* A mixin for giving a component the ability to place content after another piece of content.
|
140
|
-
*/
|
141
|
-
function daffSuffixableMixin(Base) {
|
142
|
-
class SuffixableDirective extends Base {
|
143
|
-
constructor(...args) {
|
144
|
-
super(...args);
|
145
|
-
}
|
146
|
-
}
|
147
|
-
SuffixableDirective.decorators = [
|
148
|
-
{ type: Directive }
|
149
|
-
];
|
150
|
-
/** @nocollapse */
|
151
|
-
SuffixableDirective.ctorParameters = () => [
|
152
|
-
{ type: Array }
|
153
|
-
];
|
154
|
-
SuffixableDirective.propDecorators = {
|
155
|
-
_suffix: [{ type: ContentChild, args: [DaffSuffixDirective, { static: true },] }]
|
156
|
-
};
|
157
|
-
return SuffixableDirective;
|
158
|
-
}
|
159
|
-
|
160
|
-
/**
|
161
|
-
* A mixin for giving a component the ability to place content before another piece of content.
|
162
|
-
*/
|
163
|
-
function daffPrefixableMixin(Base) {
|
164
|
-
class PrefixableDirective extends Base {
|
165
|
-
constructor(...args) {
|
166
|
-
super(...args);
|
167
|
-
}
|
168
|
-
}
|
169
|
-
PrefixableDirective.decorators = [
|
170
|
-
{ type: Directive }
|
171
|
-
];
|
172
|
-
/** @nocollapse */
|
173
|
-
PrefixableDirective.ctorParameters = () => [
|
174
|
-
{ type: Array }
|
175
|
-
];
|
176
|
-
PrefixableDirective.propDecorators = {
|
177
|
-
_prefix: [{ type: ContentChild, args: [DaffPrefixDirective, { static: true },] }]
|
178
|
-
};
|
179
|
-
return PrefixableDirective;
|
180
|
-
}
|
181
|
-
|
182
|
-
function daffSizeMixin(Base, defaultSize) {
|
183
|
-
class DaffSizeMixinClass extends Base {
|
184
|
-
constructor(...args) {
|
185
|
-
super(...args);
|
186
|
-
this.size = defaultSize;
|
187
|
-
}
|
188
|
-
get size() {
|
189
|
-
return this._size;
|
190
|
-
}
|
191
|
-
set size(value) {
|
192
|
-
// Handles the default size
|
193
|
-
const incomingSize = value || defaultSize;
|
194
|
-
if (incomingSize !== this._size) { //Only run the dom-render if a change occurs
|
195
|
-
//Remove the old size
|
196
|
-
if (this._size) {
|
197
|
-
this._renderer.removeClass(this._elementRef.nativeElement, `daff-${this._size}`);
|
198
|
-
}
|
199
|
-
if (incomingSize) {
|
200
|
-
this._renderer.addClass(this._elementRef.nativeElement, `daff-${incomingSize}`);
|
201
|
-
}
|
202
|
-
this._size = incomingSize;
|
203
|
-
}
|
204
|
-
}
|
205
|
-
}
|
206
|
-
DaffSizeMixinClass.propDecorators = {
|
207
|
-
size: [{ type: Input }]
|
208
|
-
};
|
209
|
-
;
|
210
|
-
return DaffSizeMixinClass;
|
211
|
-
}
|
212
|
-
|
213
|
-
function daffStatusMixin(Base, defaultStatus) {
|
214
|
-
class DaffStatusMixinClass extends Base {
|
215
|
-
constructor(...args) {
|
216
|
-
super(...args);
|
217
|
-
this.status = defaultStatus;
|
218
|
-
}
|
219
|
-
get status() {
|
220
|
-
return this._status;
|
221
|
-
}
|
222
|
-
set status(value) {
|
223
|
-
// Handles the default status
|
224
|
-
const incomingStatus = value || defaultStatus;
|
225
|
-
if (incomingStatus === this._status) { // Only run the dom-render if a change occurs
|
226
|
-
return;
|
227
|
-
}
|
228
|
-
// Removes the old status
|
229
|
-
if (this._status) {
|
230
|
-
this._renderer.removeClass(this._elementRef.nativeElement, `daff-${this._status}`);
|
231
|
-
}
|
232
|
-
if (incomingStatus) {
|
233
|
-
this._renderer.addClass(this._elementRef.nativeElement, `daff-${incomingStatus}`);
|
234
|
-
}
|
235
|
-
this._status = incomingStatus;
|
236
|
-
}
|
237
|
-
}
|
238
|
-
DaffStatusMixinClass.propDecorators = {
|
239
|
-
status: [{ type: Input }]
|
240
|
-
};
|
241
|
-
;
|
242
|
-
return DaffStatusMixinClass;
|
243
|
-
}
|
244
|
-
|
245
|
-
/**
|
246
|
-
* List of classes to add to DaffButtonComponent instances based on host attributes to style as different variants.
|
247
|
-
*/
|
248
|
-
const BUTTON_HOST_ATTRIBUTES = [
|
249
|
-
'daff-button',
|
250
|
-
'daff-stroked-button',
|
251
|
-
'daff-raised-button',
|
252
|
-
'daff-icon-button',
|
253
|
-
'daff-underline-button',
|
254
|
-
];
|
255
|
-
/**
|
256
|
-
* An _elementRef and an instance of renderer2 are needed for the button mixins
|
257
|
-
*/
|
258
|
-
class DaffButtonBase {
|
259
|
-
constructor(_elementRef, _renderer) {
|
260
|
-
this._elementRef = _elementRef;
|
261
|
-
this._renderer = _renderer;
|
262
|
-
}
|
263
|
-
}
|
264
|
-
const _daffButtonBase = daffArticleEncapsulatedMixin(daffPrefixableMixin(daffSuffixableMixin(daffColorMixin(daffStatusMixin(daffSizeMixin(DaffButtonBase, 'md'))))));
|
265
|
-
var DaffButtonTypeEnum;
|
266
|
-
(function (DaffButtonTypeEnum) {
|
267
|
-
DaffButtonTypeEnum["Default"] = "daff-button";
|
268
|
-
DaffButtonTypeEnum["Stroked"] = "daff-stroked-button";
|
269
|
-
DaffButtonTypeEnum["Raised"] = "daff-raised-button";
|
270
|
-
DaffButtonTypeEnum["Icon"] = "daff-icon-button";
|
271
|
-
DaffButtonTypeEnum["Underline"] = "daff-underline-button";
|
272
|
-
})(DaffButtonTypeEnum || (DaffButtonTypeEnum = {}));
|
273
|
-
/**
|
274
|
-
* @inheritdoc
|
275
|
-
*/
|
276
|
-
class DaffButtonComponent extends _daffButtonBase {
|
277
|
-
constructor(elementRef, renderer) {
|
278
|
-
super(elementRef, renderer);
|
279
|
-
this.elementRef = elementRef;
|
280
|
-
this.renderer = renderer;
|
281
|
-
for (const attr of BUTTON_HOST_ATTRIBUTES) {
|
282
|
-
if (this._hasHostAttributes(attr)) {
|
283
|
-
elementRef.nativeElement.classList.add(attr);
|
284
|
-
}
|
285
|
-
}
|
286
|
-
}
|
287
|
-
/**
|
288
|
-
* @docs-private
|
289
|
-
*/
|
290
|
-
ngOnInit() {
|
291
|
-
for (const attr of BUTTON_HOST_ATTRIBUTES) {
|
292
|
-
if (this._hasHostAttributes(attr)) {
|
293
|
-
this.buttonType = attr;
|
294
|
-
}
|
295
|
-
}
|
296
|
-
}
|
297
|
-
/**
|
298
|
-
* @docs-private
|
299
|
-
*/
|
300
|
-
get button() {
|
301
|
-
return this.buttonType === DaffButtonTypeEnum.Default || this.buttonType === undefined;
|
302
|
-
}
|
303
|
-
/**
|
304
|
-
* @docs-private
|
305
|
-
*/
|
306
|
-
get stroked() {
|
307
|
-
return this.buttonType === DaffButtonTypeEnum.Stroked;
|
308
|
-
}
|
309
|
-
/**
|
310
|
-
* @docs-private
|
311
|
-
*/
|
312
|
-
get raised() {
|
313
|
-
return this.buttonType === DaffButtonTypeEnum.Raised;
|
314
|
-
}
|
315
|
-
/**
|
316
|
-
* @docs-private
|
317
|
-
*/
|
318
|
-
get icon() {
|
319
|
-
return this.buttonType === DaffButtonTypeEnum.Icon;
|
320
|
-
}
|
321
|
-
/**
|
322
|
-
* @docs-private
|
323
|
-
*/
|
324
|
-
get underline() {
|
325
|
-
return this.buttonType === DaffButtonTypeEnum.Underline;
|
326
|
-
}
|
327
|
-
_getHostElement() {
|
328
|
-
return this.elementRef.nativeElement;
|
329
|
-
}
|
330
|
-
/**
|
331
|
-
* Gets whether the button has one of the given attributes.
|
332
|
-
* */
|
333
|
-
_hasHostAttributes(...attributes) {
|
334
|
-
return attributes.some(attribute => this._getHostElement().hasAttribute(attribute));
|
335
|
-
}
|
336
|
-
}
|
337
|
-
DaffButtonComponent.decorators = [
|
338
|
-
{ type: Component, args: [{
|
339
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
340
|
-
selector: '' +
|
341
|
-
'button[daff-button]' + ',' +
|
342
|
-
'button[daff-stroked-button]' + ',' +
|
343
|
-
'button[daff-raised-button]' + ',' +
|
344
|
-
'button[daff-icon-button]' + ',' +
|
345
|
-
'button[daff-underline-button]' + ',' +
|
346
|
-
'a[daff-button]' + ',' +
|
347
|
-
'a[daff-stroked-button]' + ',' +
|
348
|
-
'a[daff-raised-button]' + ',' +
|
349
|
-
'a[daff-icon-button]' + ',' +
|
350
|
-
'a[daff-underline-button]',
|
351
|
-
template: "<ng-container *ngIf=\"_prefix\">\n <ng-content select=\"[daffPrefix]\"></ng-content>\n</ng-container>\n<span><ng-content></ng-content></span>\n<ng-container *ngIf=\"_suffix\">\n <ng-content select=\"[daffSuffix]\"></ng-content>\n</ng-container>",
|
352
|
-
//todo(damienwebdev): remove once decorators hit stage 3 - https://github.com/microsoft/TypeScript/issues/7342
|
353
|
-
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
354
|
-
inputs: ['color', 'size', 'status'],
|
355
|
-
encapsulation: ViewEncapsulation.None,
|
356
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
357
|
-
styles: [".daff-button,.daff-raised-button,.daff-stroked-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:4px;position:relative;text-align:center;text-decoration:none;transition:background-color .3s,border-color .3s,box-shadow .3s,color .3s,transform .3s;will-change:background-color,border-color,box-shadow,color;min-width:96px}.daff-button[disabled],.daff-raised-button[disabled],.daff-stroked-button[disabled]{cursor:not-allowed}.daff-button .daff-prefix,.daff-button .daff-suffix,.daff-raised-button .daff-prefix,.daff-raised-button .daff-suffix,.daff-stroked-button .daff-prefix,.daff-stroked-button .daff-suffix{vertical-align:middle}.daff-button .daff-prefix,.daff-raised-button .daff-prefix,.daff-stroked-button .daff-prefix{margin-right:8px}.daff-button .daff-suffix,.daff-raised-button .daff-suffix,.daff-stroked-button .daff-suffix{margin-left:8px}.daff-button.daff-sm,.daff-raised-button.daff-sm,.daff-stroked-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;padding:0 1rem}.daff-button.daff-md,.daff-raised-button.daff-md,.daff-stroked-button.daff-md{font-size:1rem;line-height:3rem;height:3rem;padding:0 1.5rem}.daff-button.daff-lg,.daff-raised-button.daff-lg,.daff-stroked-button.daff-lg{font-size:1.25rem;line-height:3.5rem;height:3.5rem;padding:0 1.5rem}.daff-icon-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:4px;position:relative;text-align:center;text-decoration:none;background:none;border:0;padding:0}.daff-icon-button[disabled]{cursor:not-allowed}.daff-icon-button.daff-sm{font-size:.875rem;line-height:2rem;height:2rem;width:2rem}.daff-icon-button.daff-md{font-size:1rem;line-height:2.5rem;height:2.5rem;width:2.5rem}.daff-icon-button.daff-lg{font-size:1.25rem;line-height:3rem;height:3rem;width:3rem}.daff-underline-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:4px;position:relative;text-align:center;background:transparent;border:0;border-radius:0;line-height:1.25rem;overflow:hidden;text-decoration:none;vertical-align:middle}.daff-underline-button .daff-prefix,.daff-underline-button .daff-suffix{vertical-align:middle}.daff-underline-button .daff-prefix{margin-right:8px}.daff-underline-button .daff-suffix{margin-left:8px}.daff-underline-button[disabled]{cursor:not-allowed}.daff-underline-button[disabled]:active:after,.daff-underline-button[disabled]:hover:after{-webkit-animation:none;animation:none}.daff-underline-button:focus{border-radius:4px}.daff-underline-button:after{bottom:0;content:\"\";height:2px;left:0;opacity:1;position:absolute;width:100%}.daff-underline-button:hover:after{-webkit-animation:none;animation:none}@media (min-width:1024px){.daff-underline-button:hover:after{-webkit-animation:underline-button-hover .7s ease;animation:underline-button-hover .7s ease}}.daff-underline-button.daff-sm{font-size:.875rem;height:1.25rem;padding:0}.daff-underline-button.daff-md{font-size:1rem;height:1.5rem;padding:0 0 4px}.daff-underline-button.daff-lg{font-size:1.25rem;height:1.75rem;padding:0 0 8px}@-webkit-keyframes underline-button-hover{0%{transform:translateX(0)}50%{transform:translateX(100%)}51%{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes underline-button-hover{0%{transform:translateX(0)}50%{transform:translateX(100%)}51%{transform:translateX(-100%)}to{transform:translateX(0)}}"]
|
358
|
-
},] }
|
359
|
-
];
|
360
|
-
/** @nocollapse */
|
361
|
-
DaffButtonComponent.ctorParameters = () => [
|
362
|
-
{ type: ElementRef },
|
363
|
-
{ type: Renderer2 }
|
364
|
-
];
|
365
|
-
DaffButtonComponent.propDecorators = {
|
366
|
-
button: [{ type: HostBinding, args: ['class.daff-button',] }],
|
367
|
-
stroked: [{ type: HostBinding, args: ['class.daff-stroked-button',] }],
|
368
|
-
raised: [{ type: HostBinding, args: ['class.daff-raised-button',] }],
|
369
|
-
icon: [{ type: HostBinding, args: ['class.daff-icon-button',] }],
|
370
|
-
underline: [{ type: HostBinding, args: ['class.daff-underline-button',] }]
|
371
|
-
};
|
372
|
-
|
373
|
-
class DaffButtonModule {
|
374
|
-
}
|
375
|
-
DaffButtonModule.decorators = [
|
376
|
-
{ type: NgModule, args: [{
|
377
|
-
imports: [
|
378
|
-
CommonModule,
|
379
|
-
DaffPrefixSuffixModule,
|
380
|
-
],
|
381
|
-
declarations: [
|
382
|
-
DaffButtonComponent,
|
383
|
-
],
|
384
|
-
exports: [
|
385
|
-
DaffButtonComponent,
|
386
|
-
DaffPrefixSuffixModule,
|
387
|
-
],
|
388
|
-
},] }
|
389
|
-
];
|
390
|
-
|
391
|
-
class DaffErrorStateMatcher {
|
392
|
-
isErrorState(control, formSubmitted) {
|
393
|
-
return control.errors && (control.touched || formSubmitted);
|
394
|
-
}
|
395
|
-
}
|
396
|
-
|
397
|
-
class DaffErrorMessageComponent {
|
398
|
-
}
|
399
|
-
DaffErrorMessageComponent.decorators = [
|
400
|
-
{ type: Component, args: [{
|
401
|
-
selector: 'daff-error-message',
|
402
|
-
template: '<ng-content></ng-content>',
|
403
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
404
|
-
styles: [":host{display:block;font-size:.875rem;margin-top:5px}"]
|
405
|
-
},] }
|
406
|
-
];
|
407
|
-
|
408
|
-
class DaffErrorMessageModule {
|
409
|
-
}
|
410
|
-
DaffErrorMessageModule.decorators = [
|
411
|
-
{ type: NgModule, args: [{
|
412
|
-
exports: [
|
413
|
-
DaffErrorMessageComponent,
|
414
|
-
],
|
415
|
-
declarations: [
|
416
|
-
DaffErrorMessageComponent,
|
417
|
-
],
|
418
|
-
},] }
|
419
|
-
];
|
420
|
-
|
421
|
-
/**
|
422
|
-
*
|
423
|
-
* The class that a form control must **implement** in order to be
|
424
|
-
* used with the DaffFormFieldComponent.
|
425
|
-
*
|
426
|
-
* You may ask: "Why are you implementing an abstract class, not extending it?"
|
427
|
-
* We do this so that the Angular DI container can match the class token. A typical
|
428
|
-
* interface would be "more accurate" here, but since interfaces don't exist
|
429
|
-
* in javascript, they get thrown out by the typescript compiler and cannot
|
430
|
-
* be used for the necessary dependency injection.
|
431
|
-
*/
|
432
|
-
class DaffFormFieldControl {
|
433
|
-
}
|
434
|
-
;
|
435
|
-
|
436
|
-
const DaffFormFieldMissingControlMessage = 'A DaffFormFieldComponent must contain a DaffFormFieldControl';
|
437
|
-
|
438
|
-
// ChangeDetection is ignored because this component needs to be refactored
|
439
|
-
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
440
|
-
class DaffFormFieldComponent {
|
441
|
-
constructor() {
|
442
|
-
/**
|
443
|
-
* @docs-private
|
444
|
-
*/
|
445
|
-
this.faChevronDown = faChevronDown;
|
446
|
-
this.class = true;
|
447
|
-
/**
|
448
|
-
* The tracking property used to determine if the parent form has been submitted,
|
449
|
-
* and thus show an error message (even if the field hasn't been touched).
|
450
|
-
*
|
451
|
-
* @deprecated
|
452
|
-
*/
|
453
|
-
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
454
|
-
this.formSubmitted = false;
|
455
|
-
/**
|
456
|
-
* Tracking property to keep a record of whether or not the
|
457
|
-
* form field should be marked as error.
|
458
|
-
*/
|
459
|
-
this.isError = false;
|
460
|
-
/**
|
461
|
-
* Tracking property to keep a record of whether or not the
|
462
|
-
* form field should be marked as valid.
|
463
|
-
*/
|
464
|
-
this.isValid = false;
|
465
|
-
}
|
466
|
-
/**
|
467
|
-
* @docs
|
468
|
-
*
|
469
|
-
* Determines whether or not the form field should display its focused state.
|
470
|
-
*/
|
471
|
-
get isFocused() {
|
472
|
-
var _a;
|
473
|
-
return (_a = this._control) === null || _a === void 0 ? void 0 : _a.focused;
|
474
|
-
}
|
475
|
-
/**
|
476
|
-
* Keeps the state of the form field consistent with its child DaffFormControl
|
477
|
-
*
|
478
|
-
* TODO: consider whether or not this can be refactored to some kind of
|
479
|
-
* observable to remove unnecessary change detection.
|
480
|
-
*
|
481
|
-
* @docs-private
|
482
|
-
*/
|
483
|
-
ngDoCheck() {
|
484
|
-
var _a;
|
485
|
-
if ((_a = this._control) === null || _a === void 0 ? void 0 : _a.ngControl) {
|
486
|
-
this.isError = this._control.ngControl.errors && (this._control.ngControl.touched);
|
487
|
-
this.isValid = !this._control.ngControl.errors && this._control.ngControl.touched;
|
488
|
-
}
|
489
|
-
}
|
490
|
-
/**
|
491
|
-
* Validate whether or not the FormField is in
|
492
|
-
* a "usable" state.
|
493
|
-
*/
|
494
|
-
_validateFormControl() {
|
495
|
-
if (!this._control) {
|
496
|
-
throw new Error(DaffFormFieldMissingControlMessage);
|
497
|
-
}
|
498
|
-
}
|
499
|
-
/**
|
500
|
-
* Life cycle hook to verify that the form field has an acceptable
|
501
|
-
* child control instance. Mostly useful for development-time
|
502
|
-
* validation of usage.
|
503
|
-
*
|
504
|
-
* @docs-private
|
505
|
-
*/
|
506
|
-
ngAfterContentInit() {
|
507
|
-
this._validateFormControl();
|
508
|
-
}
|
509
|
-
/**
|
510
|
-
* Life cycle hook to verify that the form field has an acceptable
|
511
|
-
* child control instance. Mostly useful for development-time
|
512
|
-
* validation of usage.
|
513
|
-
*
|
514
|
-
* @docs-private
|
515
|
-
*/
|
516
|
-
ngAfterContentChecked() {
|
517
|
-
this._validateFormControl();
|
518
|
-
}
|
519
|
-
}
|
520
|
-
DaffFormFieldComponent.decorators = [
|
521
|
-
{ type: Component, args: [{
|
522
|
-
selector: 'daff-form-field',
|
523
|
-
template: "<div class=\"daff-form-field__control\" [class.daff-error]=\"isError\" [class.daff-valid]=\"isValid\" [class.daff-focus]=\"isFocused\">\n <ng-content></ng-content>\n <div class=\"daff-form-field__icon\" *ngIf=\"_control.controlType=='native-select'\">\n <fa-icon [icon]=\"faChevronDown\"></fa-icon>\n </div>\n</div>\n<ng-content select=\"daff-error-message\"></ng-content>\n",
|
524
|
-
encapsulation: ViewEncapsulation.None,
|
525
|
-
styles: [".daff-form-field{display:block;position:relative}.daff-form-field__control{border-radius:3px;display:inline-block;font-size:1rem;height:inherit;line-height:1.5rem;padding:10px 15px;width:100%}.daff-form-field__icon{display:inline-block;pointer-events:none;position:absolute;right:15px}"]
|
526
|
-
},] }
|
527
|
-
];
|
528
|
-
DaffFormFieldComponent.propDecorators = {
|
529
|
-
class: [{ type: HostBinding, args: ['class.daff-form-field',] }],
|
530
|
-
formSubmitted: [{ type: Input }],
|
531
|
-
_control: [{ type: ContentChild, args: [DaffFormFieldControl,] }]
|
532
|
-
};
|
533
|
-
|
534
|
-
class DaffFormFieldModule {
|
535
|
-
}
|
536
|
-
DaffFormFieldModule.decorators = [
|
537
|
-
{ type: NgModule, args: [{
|
538
|
-
imports: [
|
539
|
-
CommonModule,
|
540
|
-
FontAwesomeModule,
|
541
|
-
DaffErrorMessageModule,
|
542
|
-
],
|
543
|
-
exports: [
|
544
|
-
DaffFormFieldComponent,
|
545
|
-
DaffErrorMessageModule,
|
546
|
-
],
|
547
|
-
declarations: [
|
548
|
-
DaffFormFieldComponent,
|
549
|
-
],
|
550
|
-
},] }
|
551
|
-
];
|
552
|
-
|
553
|
-
const DAFF_MEDIA_GALLERY_TOKEN = new InjectionToken('DAFF_MEDIA_GALLERY_TOKEN');
|
554
|
-
|
555
|
-
const isGallery = (element) => !('gallery' in element);
|
556
|
-
class DaffMediaGalleryRegistry {
|
557
|
-
constructor() {
|
558
|
-
this.galleries = {};
|
559
|
-
}
|
560
|
-
/**
|
561
|
-
* @description
|
562
|
-
* Adds a media element to the internal registry.
|
563
|
-
*/
|
564
|
-
add(gallery, thumbnail) {
|
565
|
-
if (this.galleries[gallery.name]) {
|
566
|
-
let newGallery = this.galleries[gallery.name].getValue();
|
567
|
-
if (thumbnail) {
|
568
|
-
newGallery = Object.assign(Object.assign({}, newGallery), { thumbnails: [
|
569
|
-
...newGallery.thumbnails.filter(t => t !== thumbnail),
|
570
|
-
thumbnail,
|
571
|
-
] });
|
572
|
-
}
|
573
|
-
this.galleries[gallery.name].next(newGallery);
|
574
|
-
}
|
575
|
-
else {
|
576
|
-
this.galleries[gallery.name] = new BehaviorSubject({
|
577
|
-
gallery,
|
578
|
-
thumbnails: thumbnail ? [thumbnail] : [],
|
579
|
-
});
|
580
|
-
}
|
581
|
-
if (this.galleries[gallery.name].getValue().thumbnails.length === 1) {
|
582
|
-
thumbnail.select();
|
583
|
-
}
|
584
|
-
}
|
585
|
-
/**
|
586
|
-
* @description
|
587
|
-
* Removes a thumbnail or gallery from the internal registry.
|
588
|
-
*/
|
589
|
-
remove(element) {
|
590
|
-
if (isGallery(element)) {
|
591
|
-
this.removeGallery(element);
|
592
|
-
}
|
593
|
-
else {
|
594
|
-
this.removeThumbnail(element);
|
595
|
-
}
|
596
|
-
}
|
597
|
-
removeThumbnail(thumbnail) {
|
598
|
-
if (!this.galleries[thumbnail.gallery.name]) {
|
599
|
-
return;
|
600
|
-
}
|
601
|
-
const gallery = this.galleries[thumbnail.gallery.name].getValue();
|
602
|
-
const index = gallery.thumbnails.indexOf(thumbnail);
|
603
|
-
if (index === -1) {
|
604
|
-
return;
|
605
|
-
}
|
606
|
-
this.galleries[thumbnail.gallery.name].next(Object.assign(Object.assign({}, gallery), { thumbnails: [
|
607
|
-
...gallery.thumbnails.slice(0, index),
|
608
|
-
...gallery.thumbnails.slice(index + 1),
|
609
|
-
] }));
|
610
|
-
}
|
611
|
-
removeGallery(gallery) {
|
612
|
-
delete this.galleries[gallery.name];
|
613
|
-
}
|
614
|
-
/**
|
615
|
-
* @description
|
616
|
-
* Selects a media element for a given gallery.
|
617
|
-
*/
|
618
|
-
select(thumbnail) {
|
619
|
-
if (!this.galleries[thumbnail.gallery.name]) {
|
620
|
-
return;
|
621
|
-
}
|
622
|
-
const gallery = this.galleries[thumbnail.gallery.name].getValue();
|
623
|
-
const index = gallery.thumbnails.indexOf(thumbnail);
|
624
|
-
if (thumbnail.selected || index === -1) {
|
625
|
-
return;
|
626
|
-
}
|
627
|
-
this.galleries[thumbnail.gallery.name].next(Object.assign(Object.assign({}, gallery), { thumbnails: [
|
628
|
-
...gallery.thumbnails.filter(m => m !== thumbnail).map(m => m.deselect()),
|
629
|
-
thumbnail.select(),
|
630
|
-
] }));
|
631
|
-
}
|
632
|
-
}
|
633
|
-
/** @nocollapse */ DaffMediaGalleryRegistry.ɵprov = ɵɵdefineInjectable({ factory: function DaffMediaGalleryRegistry_Factory() { return new DaffMediaGalleryRegistry(); }, token: DaffMediaGalleryRegistry, providedIn: "root" });
|
634
|
-
DaffMediaGalleryRegistry.decorators = [
|
635
|
-
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
636
|
-
];
|
637
|
-
|
638
|
-
let uniqueGalleryId = 0;
|
639
|
-
/**
|
640
|
-
* An _elementRef and an instance of renderer2 are needed for the link set mixins
|
641
|
-
*/
|
642
|
-
class DaffMediaGalleryBase {
|
643
|
-
constructor(_elementRef, _renderer) {
|
644
|
-
this._elementRef = _elementRef;
|
645
|
-
this._renderer = _renderer;
|
646
|
-
}
|
647
|
-
}
|
648
|
-
const _daffMediaGalleryBase = daffArticleEncapsulatedMixin((DaffMediaGalleryBase));
|
649
|
-
class DaffMediaGalleryComponent extends _daffMediaGalleryBase {
|
650
|
-
constructor(elementRef, renderer, registry) {
|
651
|
-
super(elementRef, renderer);
|
652
|
-
this.elementRef = elementRef;
|
653
|
-
this.renderer = renderer;
|
654
|
-
this.registry = registry;
|
655
|
-
/**
|
656
|
-
* Adds a class for styling the media gallery
|
657
|
-
*/
|
658
|
-
this.class = true;
|
659
|
-
/**
|
660
|
-
* The name of the gallery
|
661
|
-
*/
|
662
|
-
this.name = `${uniqueGalleryId}`;
|
663
|
-
uniqueGalleryId++;
|
664
|
-
}
|
665
|
-
ngOnInit() {
|
666
|
-
this.registry.add(this);
|
667
|
-
}
|
668
|
-
ngOnDestroy() {
|
669
|
-
this.registry.remove(this);
|
670
|
-
}
|
671
|
-
}
|
672
|
-
DaffMediaGalleryComponent.decorators = [
|
673
|
-
{ type: Component, args: [{
|
674
|
-
selector: 'daff-media-gallery',
|
675
|
-
template: "<div class=\"daff-media-gallery__thumbnails\">\n\t<ng-content select=\"[daffThumbnail]\"></ng-content>\n</div>\n<div class=\"daff-media-gallery__selected-thumbnail\">\n\t<daff-media-renderer></daff-media-renderer>\n</div>",
|
676
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
677
|
-
providers: [
|
678
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
679
|
-
{ provide: DAFF_MEDIA_GALLERY_TOKEN, useExisting: DaffMediaGalleryComponent },
|
680
|
-
],
|
681
|
-
styles: [":host(.daff-media-gallery){display:flex;flex-direction:column}@media (min-width:1024px){:host(.daff-media-gallery){flex-direction:row}}:host(.daff-media-gallery) ::ng-deep .daff-thumbnail{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;display:inline-block;height:64px;width:64px;margin:0 2px;max-width:100%;overflow:hidden;user-select:none}@media (min-width:480px){:host(.daff-media-gallery) ::ng-deep .daff-thumbnail{height:72px;width:72px}}@media (min-width:1024px){:host(.daff-media-gallery) ::ng-deep .daff-thumbnail{display:block;margin:0 0 4px;height:80px;width:80px}}.daff-media-gallery__thumbnails{margin:0 -2px;max-height:100%;order:2}@media (min-width:1024px){.daff-media-gallery__thumbnails{margin:0 8px 0 0;order:1}}.daff-media-gallery__selected-thumbnail{display:block;flex-grow:1;order:1}@media (min-width:1024px){.daff-media-gallery__selected-thumbnail{order:2}}"]
|
682
|
-
},] }
|
683
|
-
];
|
684
|
-
/** @nocollapse */
|
685
|
-
DaffMediaGalleryComponent.ctorParameters = () => [
|
686
|
-
{ type: ElementRef },
|
687
|
-
{ type: Renderer2 },
|
688
|
-
{ type: DaffMediaGalleryRegistry }
|
689
|
-
];
|
690
|
-
DaffMediaGalleryComponent.propDecorators = {
|
691
|
-
class: [{ type: HostBinding, args: ['class.daff-media-gallery',] }],
|
692
|
-
name: [{ type: Input }]
|
693
|
-
};
|
694
|
-
|
695
|
-
/**
|
696
|
-
* Dynamically renders the selected `DaffThumbnailDirective` in a `daff-media-gallery` any time the selected thumbnail
|
697
|
-
* changes.
|
698
|
-
*/
|
699
|
-
class DaffMediaRendererComponent {
|
700
|
-
constructor(componentFactoryResolver, registry, gallery) {
|
701
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
702
|
-
this.registry = registry;
|
703
|
-
this.gallery = gallery;
|
704
|
-
/**
|
705
|
-
* Private tracker for indicating when the component is destroyed.
|
706
|
-
*/
|
707
|
-
this._destroy$ = new Subject();
|
708
|
-
}
|
709
|
-
ngOnInit() {
|
710
|
-
this.registry.galleries[this.gallery.name]
|
711
|
-
.pipe(takeUntil(this._destroy$))
|
712
|
-
.subscribe((gallery) => {
|
713
|
-
/**
|
714
|
-
* Clear out the slot for the dynamically rendered thumbnail
|
715
|
-
*/
|
716
|
-
this.slot.clear();
|
717
|
-
const _selectedThumbnail = gallery.thumbnails.filter(media => media.selected).shift();
|
718
|
-
/**
|
719
|
-
* If there's no selected media, render nothing.
|
720
|
-
*/
|
721
|
-
if (!_selectedThumbnail) {
|
722
|
-
return;
|
723
|
-
}
|
724
|
-
const _selectedThumbnailComponent = _selectedThumbnail.component;
|
725
|
-
/**
|
726
|
-
* Create the component to insert.
|
727
|
-
*/
|
728
|
-
const component = this.componentFactoryResolver.resolveComponentFactory(_selectedThumbnailComponent.constructor);
|
729
|
-
const componentRef = this.slot.createComponent(component);
|
730
|
-
/**
|
731
|
-
* Fill the component with it's values from the original component
|
732
|
-
*/
|
733
|
-
component.inputs.forEach(input => {
|
734
|
-
componentRef.instance[input.propName] = _selectedThumbnailComponent[input.propName];
|
735
|
-
});
|
736
|
-
/**
|
737
|
-
* Trigger a change detection on the component tree, outside the cycle to address
|
738
|
-
* the fact that the component was created outside a typical CD loop.
|
739
|
-
*/
|
740
|
-
componentRef.changeDetectorRef.detectChanges();
|
741
|
-
});
|
742
|
-
}
|
743
|
-
/**
|
744
|
-
* Used to unsubscribe from the dynamic component.
|
745
|
-
*/
|
746
|
-
ngOnDestroy() {
|
747
|
-
this._destroy$.next(true);
|
748
|
-
this._destroy$.unsubscribe();
|
749
|
-
}
|
750
|
-
}
|
751
|
-
DaffMediaRendererComponent.decorators = [
|
752
|
-
{ type: Component, args: [{
|
753
|
-
selector: 'daff-media-renderer',
|
754
|
-
template: "<ng-template></ng-template>\n",
|
755
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
756
|
-
},] }
|
757
|
-
];
|
758
|
-
/** @nocollapse */
|
759
|
-
DaffMediaRendererComponent.ctorParameters = () => [
|
760
|
-
{ type: ComponentFactoryResolver },
|
761
|
-
{ type: DaffMediaGalleryRegistry },
|
762
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DAFF_MEDIA_GALLERY_TOKEN,] }] }
|
763
|
-
];
|
764
|
-
DaffMediaRendererComponent.propDecorators = {
|
765
|
-
slot: [{ type: ViewChild, args: [TemplateRef, { static: true, read: ViewContainerRef },] }]
|
766
|
-
};
|
767
|
-
|
768
|
-
/**
|
769
|
-
* A multi provider injection token that marks a component as renderable for the `DaffMediaRendererComponent`.
|
770
|
-
*/
|
771
|
-
const daffThumbnailCompatToken = new InjectionToken('thumbnailCompatToken');
|
772
|
-
|
773
|
-
/**
|
774
|
-
* A directive marking thumbnails for the `DaffMediaRendererComponent`. Needs to be wrapped in a `daff-media-gallery` component
|
775
|
-
* and needs to be placed on a component that is provided as a `daffThumbnailCompatToken`.
|
776
|
-
*/
|
777
|
-
class DaffThumbnailDirective {
|
778
|
-
constructor(component, cd, registry, gallery) {
|
779
|
-
this.component = component;
|
780
|
-
this.cd = cd;
|
781
|
-
this.registry = registry;
|
782
|
-
this.gallery = gallery;
|
783
|
-
/**
|
784
|
-
* Adds a class for styling a thumbnail
|
785
|
-
*/
|
786
|
-
this.class = true;
|
787
|
-
/**
|
788
|
-
* A prop for determining whether or not the media element is selected.
|
789
|
-
*/
|
790
|
-
this.selected = false;
|
791
|
-
/**
|
792
|
-
* An event that fires after the media element becomes selected.
|
793
|
-
*/
|
794
|
-
this.becameSelected = new EventEmitter();
|
795
|
-
}
|
796
|
-
/**
|
797
|
-
* Adds a class for styling a selected thumbnail
|
798
|
-
*/
|
799
|
-
get selectedClass() {
|
800
|
-
return this.selected;
|
801
|
-
}
|
802
|
-
;
|
803
|
-
/**
|
804
|
-
* Adds a click event to trigger selection of the media element.
|
805
|
-
*
|
806
|
-
* @param event: MouseEvent
|
807
|
-
*/
|
808
|
-
onClick($event) {
|
809
|
-
this.registry.select(this);
|
810
|
-
}
|
811
|
-
ngOnInit() {
|
812
|
-
this.registry.add(this.gallery, this);
|
813
|
-
}
|
814
|
-
ngOnDestroy() {
|
815
|
-
this.registry.remove(this);
|
816
|
-
}
|
817
|
-
select() {
|
818
|
-
this.selected = true;
|
819
|
-
this.becameSelected.emit();
|
820
|
-
this.cd.markForCheck();
|
821
|
-
return this;
|
822
|
-
}
|
823
|
-
deselect() {
|
824
|
-
this.selected = false;
|
825
|
-
this.cd.markForCheck();
|
826
|
-
return this;
|
827
|
-
}
|
828
|
-
}
|
829
|
-
DaffThumbnailDirective.decorators = [
|
830
|
-
{ type: Directive, args: [{
|
831
|
-
selector: '[daffThumbnail]',
|
832
|
-
},] }
|
833
|
-
];
|
834
|
-
/** @nocollapse */
|
835
|
-
DaffThumbnailDirective.ctorParameters = () => [
|
836
|
-
{ type: Type, decorators: [{ type: Inject, args: [daffThumbnailCompatToken,] }] },
|
837
|
-
{ type: ChangeDetectorRef },
|
838
|
-
{ type: DaffMediaGalleryRegistry },
|
839
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DAFF_MEDIA_GALLERY_TOKEN,] }] }
|
840
|
-
];
|
841
|
-
DaffThumbnailDirective.propDecorators = {
|
842
|
-
selectedClass: [{ type: HostBinding, args: ['class.daff-thumbnail--selected',] }],
|
843
|
-
class: [{ type: HostBinding, args: ['class.daff-thumbnail',] }],
|
844
|
-
becameSelected: [{ type: Output }],
|
845
|
-
onClick: [{ type: HostListener, args: ['click', ['$event'],] }]
|
846
|
-
};
|
847
|
-
|
848
|
-
class DaffMediaGalleryModule {
|
849
|
-
}
|
850
|
-
DaffMediaGalleryModule.decorators = [
|
851
|
-
{ type: NgModule, args: [{
|
852
|
-
declarations: [
|
853
|
-
DaffMediaGalleryComponent,
|
854
|
-
DaffThumbnailDirective,
|
855
|
-
DaffMediaRendererComponent,
|
856
|
-
],
|
857
|
-
imports: [
|
858
|
-
CommonModule,
|
859
|
-
],
|
860
|
-
exports: [
|
861
|
-
DaffThumbnailDirective,
|
862
|
-
DaffMediaGalleryComponent,
|
863
|
-
],
|
864
|
-
},] }
|
865
|
-
];
|
866
|
-
|
867
|
-
const validateProperty = (object, prop) => {
|
868
|
-
if (object[prop] === null || object[prop] === undefined || object[prop] === '') {
|
869
|
-
throw new Error(`DaffImageComponent must have a defined ${prop} attribute.`);
|
870
|
-
}
|
871
|
-
};
|
872
|
-
const ɵ0 = validateProperty;
|
873
|
-
const validateProperties = (object, props) => {
|
874
|
-
const invalidProps = props.filter(prop => {
|
875
|
-
try {
|
876
|
-
validateProperty(object, prop);
|
877
|
-
}
|
878
|
-
catch (e) {
|
879
|
-
return true;
|
880
|
-
}
|
881
|
-
return false;
|
882
|
-
});
|
883
|
-
if (invalidProps.length) {
|
884
|
-
throw new Error(`DaffImageComponent must have the ${invalidProps.join(',')} attributes defined.`);
|
885
|
-
}
|
886
|
-
};
|
887
|
-
const ɵ1 = validateProperties;
|
888
|
-
class DaffImageComponent {
|
889
|
-
constructor(sanitizer) {
|
890
|
-
this.sanitizer = sanitizer;
|
891
|
-
// TODO: rename event to not collide with native event (unless that's intentional)
|
892
|
-
// eslint-disable-next-line @angular-eslint/no-output-native
|
893
|
-
this.load = new EventEmitter();
|
894
|
-
}
|
895
|
-
get src() {
|
896
|
-
return this._src;
|
897
|
-
}
|
898
|
-
set src(value) {
|
899
|
-
this._src = value;
|
900
|
-
validateProperty(this, 'src');
|
901
|
-
}
|
902
|
-
get alt() {
|
903
|
-
return this._alt;
|
904
|
-
}
|
905
|
-
set alt(value) {
|
906
|
-
this._alt = value;
|
907
|
-
validateProperty(this, 'alt');
|
908
|
-
}
|
909
|
-
get width() {
|
910
|
-
return this._width;
|
911
|
-
}
|
912
|
-
set width(value) {
|
913
|
-
this._width = value;
|
914
|
-
validateProperty(this, 'width');
|
915
|
-
}
|
916
|
-
get height() {
|
917
|
-
return this._height;
|
918
|
-
}
|
919
|
-
set height(value) {
|
920
|
-
this._height = value;
|
921
|
-
validateProperty(this, 'height');
|
922
|
-
}
|
923
|
-
/**
|
924
|
-
* @docs-private
|
925
|
-
*/
|
926
|
-
ngOnInit() {
|
927
|
-
validateProperties(this, ['src', 'alt', 'width', 'height']);
|
928
|
-
}
|
929
|
-
/**
|
930
|
-
* @docs-private
|
931
|
-
*/
|
932
|
-
get _paddingTop() {
|
933
|
-
if (!this.height || !this.width) {
|
934
|
-
return undefined;
|
935
|
-
}
|
936
|
-
return this.sanitizer.bypassSecurityTrustStyle('calc(' + this.height + ' / ' + this.width + ' * 100%)');
|
937
|
-
}
|
938
|
-
/**
|
939
|
-
* @docs-private
|
940
|
-
*/
|
941
|
-
get maxWidth() {
|
942
|
-
return this.width + 'px';
|
943
|
-
}
|
944
|
-
}
|
945
|
-
DaffImageComponent.decorators = [
|
946
|
-
{ type: Component, args: [{
|
947
|
-
selector: 'daff-image',
|
948
|
-
template: "<div class=\"daff-image__wrapper\" [style.paddingTop]=\"_paddingTop\">\n\t<img [src]=\"src\" [alt]=\"alt\" (load)=\"load.emit\" loading=\"lazy\"/>\n</div>",
|
949
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
950
|
-
providers: [
|
951
|
-
{
|
952
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
953
|
-
provide: daffThumbnailCompatToken, useExisting: DaffImageComponent,
|
954
|
-
},
|
955
|
-
],
|
956
|
-
styles: [":host{display:inline-block;border-radius:inherit;position:relative;width:100%}:host img{position:absolute;left:0;right:0;top:0;bottom:0;height:auto;margin:auto;max-width:100%}.daff-image__wrapper{border-radius:inherit;height:0}"]
|
957
|
-
},] }
|
958
|
-
];
|
959
|
-
/** @nocollapse */
|
960
|
-
DaffImageComponent.ctorParameters = () => [
|
961
|
-
{ type: DomSanitizer }
|
962
|
-
];
|
963
|
-
DaffImageComponent.propDecorators = {
|
964
|
-
src: [{ type: Input }],
|
965
|
-
alt: [{ type: Input }],
|
966
|
-
width: [{ type: Input }],
|
967
|
-
height: [{ type: Input }],
|
968
|
-
load: [{ type: Output }],
|
969
|
-
maxWidth: [{ type: HostBinding, args: ['style.max-width',] }]
|
970
|
-
};
|
971
|
-
|
972
|
-
class DaffImageModule {
|
973
|
-
}
|
974
|
-
DaffImageModule.decorators = [
|
975
|
-
{ type: NgModule, args: [{
|
976
|
-
declarations: [
|
977
|
-
DaffImageComponent,
|
978
|
-
],
|
979
|
-
imports: [
|
980
|
-
CommonModule,
|
981
|
-
],
|
982
|
-
exports: [
|
983
|
-
DaffImageComponent,
|
984
|
-
],
|
985
|
-
entryComponents: [
|
986
|
-
DaffImageComponent,
|
987
|
-
],
|
988
|
-
},] }
|
989
|
-
];
|
990
|
-
|
991
|
-
/**
|
992
|
-
* DaffInputComponent provides the same functionality as a native `<input>` and contains custom styling and functionality.
|
993
|
-
*/
|
994
|
-
class DaffInputComponent {
|
995
|
-
constructor(
|
996
|
-
/**
|
997
|
-
* @docs-private
|
998
|
-
*/
|
999
|
-
ngControl, _elementRef) {
|
1000
|
-
this.ngControl = ngControl;
|
1001
|
-
this._elementRef = _elementRef;
|
1002
|
-
this.focused = false;
|
1003
|
-
}
|
1004
|
-
/**
|
1005
|
-
* @docs-private
|
1006
|
-
*/
|
1007
|
-
focus() {
|
1008
|
-
this.focused = true;
|
1009
|
-
}
|
1010
|
-
/**
|
1011
|
-
* @docs-private
|
1012
|
-
*/
|
1013
|
-
blur() {
|
1014
|
-
this.focused = false;
|
1015
|
-
}
|
1016
|
-
onFocus() {
|
1017
|
-
this._elementRef.nativeElement.focus();
|
1018
|
-
}
|
1019
|
-
}
|
1020
|
-
DaffInputComponent.decorators = [
|
1021
|
-
{ type: Component, args: [{
|
1022
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
1023
|
-
selector: 'input[daff-input]',
|
1024
|
-
template: '<ng-content></ng-content>',
|
1025
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
1026
|
-
providers: [
|
1027
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
1028
|
-
{ provide: DaffFormFieldControl, useExisting: DaffInputComponent },
|
1029
|
-
],
|
1030
|
-
styles: [":host{border:none;border-radius:4px;box-shadow:none;font-size:1rem;line-height:1.5rem;margin:0;padding:0;width:100%;box-sizing:border-box}:host:focus{border:none;box-shadow:none;outline:none}"]
|
1031
|
-
},] }
|
1032
|
-
];
|
1033
|
-
/** @nocollapse */
|
1034
|
-
DaffInputComponent.ctorParameters = () => [
|
1035
|
-
{ type: NgControl, decorators: [{ type: Optional }, { type: Self }] },
|
1036
|
-
{ type: ElementRef }
|
1037
|
-
];
|
1038
|
-
DaffInputComponent.propDecorators = {
|
1039
|
-
formSubmitted: [{ type: Input }],
|
1040
|
-
focus: [{ type: HostListener, args: ['focus',] }],
|
1041
|
-
blur: [{ type: HostListener, args: ['blur',] }]
|
1042
|
-
};
|
1043
|
-
|
1044
|
-
class DaffInputModule {
|
1045
|
-
}
|
1046
|
-
DaffInputModule.decorators = [
|
1047
|
-
{ type: NgModule, args: [{
|
1048
|
-
imports: [
|
1049
|
-
CommonModule,
|
1050
|
-
],
|
1051
|
-
exports: [
|
1052
|
-
DaffInputComponent,
|
1053
|
-
],
|
1054
|
-
declarations: [
|
1055
|
-
DaffInputComponent,
|
1056
|
-
],
|
1057
|
-
},] }
|
1058
|
-
];
|
1059
|
-
|
1060
|
-
class DaffNativeSelectComponent {
|
1061
|
-
constructor(
|
1062
|
-
/**
|
1063
|
-
* @docs-private
|
1064
|
-
*/
|
1065
|
-
ngControl, _elementRef) {
|
1066
|
-
this.ngControl = ngControl;
|
1067
|
-
this._elementRef = _elementRef;
|
1068
|
-
/**
|
1069
|
-
* @docs-private
|
1070
|
-
*/
|
1071
|
-
this.controlType = 'native-select';
|
1072
|
-
this.class = true;
|
1073
|
-
this.focused = false;
|
1074
|
-
}
|
1075
|
-
/**
|
1076
|
-
* @docs-private
|
1077
|
-
*/
|
1078
|
-
focus() {
|
1079
|
-
this.focused = true;
|
1080
|
-
}
|
1081
|
-
/**
|
1082
|
-
* @docs-private
|
1083
|
-
*/
|
1084
|
-
blur() {
|
1085
|
-
this.focused = false;
|
1086
|
-
}
|
1087
|
-
onFocus() {
|
1088
|
-
this._elementRef.nativeElement.focus();
|
1089
|
-
}
|
1090
|
-
}
|
1091
|
-
DaffNativeSelectComponent.decorators = [
|
1092
|
-
{ type: Component, args: [{
|
1093
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
1094
|
-
selector: 'select[daff-native-select]',
|
1095
|
-
template: '<ng-content></ng-content>',
|
1096
|
-
encapsulation: ViewEncapsulation.None,
|
1097
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
1098
|
-
providers: [
|
1099
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
1100
|
-
{ provide: DaffFormFieldControl, useExisting: DaffNativeSelectComponent },
|
1101
|
-
],
|
1102
|
-
styles: [".daff-native-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;background-clip:padding-box;border:0;box-shadow:none;font-size:1rem;line-height:1.5rem;margin:0;min-width:45px;width:100%}.daff-native-select:focus{border:0;box-shadow:none;outline:none}"]
|
1103
|
-
},] }
|
1104
|
-
];
|
1105
|
-
/** @nocollapse */
|
1106
|
-
DaffNativeSelectComponent.ctorParameters = () => [
|
1107
|
-
{ type: NgControl, decorators: [{ type: Optional }, { type: Self }] },
|
1108
|
-
{ type: ElementRef }
|
1109
|
-
];
|
1110
|
-
DaffNativeSelectComponent.propDecorators = {
|
1111
|
-
class: [{ type: HostBinding, args: ['class.daff-native-select',] }],
|
1112
|
-
formSubmitted: [{ type: Input }],
|
1113
|
-
focus: [{ type: HostListener, args: ['focus',] }],
|
1114
|
-
blur: [{ type: HostListener, args: ['blur',] }]
|
1115
|
-
};
|
1116
|
-
|
1117
|
-
class DaffNativeSelectModule {
|
1118
|
-
}
|
1119
|
-
DaffNativeSelectModule.decorators = [
|
1120
|
-
{ type: NgModule, args: [{
|
1121
|
-
imports: [
|
1122
|
-
CommonModule,
|
1123
|
-
],
|
1124
|
-
exports: [
|
1125
|
-
DaffNativeSelectComponent,
|
1126
|
-
],
|
1127
|
-
declarations: [
|
1128
|
-
DaffNativeSelectComponent,
|
1129
|
-
],
|
1130
|
-
},] }
|
1131
|
-
];
|
1132
|
-
|
1133
|
-
let checkboxIdNum = 0;
|
1134
|
-
class DaffCheckboxComponent {
|
1135
|
-
constructor(_cdRef) {
|
1136
|
-
this._cdRef = _cdRef;
|
1137
|
-
/**
|
1138
|
-
* Boolean value to determine whether or not the checkbox is checked.
|
1139
|
-
*/
|
1140
|
-
this._checked = false;
|
1141
|
-
/**
|
1142
|
-
* The id of the checkbox. Must be unique. If not entered by a user then it is generated.
|
1143
|
-
*/
|
1144
|
-
this.id = 'daff-checkbox-' + checkboxIdNum;
|
1145
|
-
/**
|
1146
|
-
* The aria-label of the checkbox.
|
1147
|
-
*/
|
1148
|
-
// eslint-disable-next-line @angular-eslint/no-input-rename
|
1149
|
-
this.label = '';
|
1150
|
-
/**
|
1151
|
-
* Event on whether or not the selection has changed.
|
1152
|
-
*/
|
1153
|
-
this.becameChecked = new EventEmitter();
|
1154
|
-
this.becameUnchecked = new EventEmitter();
|
1155
|
-
/**
|
1156
|
-
* The role of the component. Set to "checkbox".
|
1157
|
-
*
|
1158
|
-
* @docs-private
|
1159
|
-
*/
|
1160
|
-
this.role = 'checkbox';
|
1161
|
-
/**
|
1162
|
-
* Increments id number on new checkbox. Gurantees unique ID on generation.
|
1163
|
-
*/
|
1164
|
-
checkboxIdNum++;
|
1165
|
-
}
|
1166
|
-
get checked() {
|
1167
|
-
return this._checked;
|
1168
|
-
}
|
1169
|
-
set checked(value) {
|
1170
|
-
if (this._checked === value) {
|
1171
|
-
return;
|
1172
|
-
}
|
1173
|
-
if (value === true) {
|
1174
|
-
this.nativeCheckbox.nativeElement.checked = true;
|
1175
|
-
this.becameChecked.emit(this._checked);
|
1176
|
-
}
|
1177
|
-
else {
|
1178
|
-
this.nativeCheckbox.nativeElement.checked = false;
|
1179
|
-
this.becameUnchecked.emit();
|
1180
|
-
}
|
1181
|
-
this._checked = value;
|
1182
|
-
}
|
1183
|
-
/**
|
1184
|
-
* @docs-private
|
1185
|
-
*/
|
1186
|
-
_onChange(val) {
|
1187
|
-
if (val.target.checked) {
|
1188
|
-
this.select();
|
1189
|
-
}
|
1190
|
-
else {
|
1191
|
-
this.deselect();
|
1192
|
-
}
|
1193
|
-
}
|
1194
|
-
;
|
1195
|
-
/**
|
1196
|
-
* @docs-private
|
1197
|
-
*/
|
1198
|
-
get focusClass() {
|
1199
|
-
return this.focused === true;
|
1200
|
-
}
|
1201
|
-
;
|
1202
|
-
/**
|
1203
|
-
* @docs-private
|
1204
|
-
*/
|
1205
|
-
get disabledClass() {
|
1206
|
-
return this.disabled === true;
|
1207
|
-
}
|
1208
|
-
;
|
1209
|
-
/**
|
1210
|
-
* Sets focused to false.
|
1211
|
-
*/
|
1212
|
-
onBlur() {
|
1213
|
-
this.focused = false;
|
1214
|
-
}
|
1215
|
-
/**
|
1216
|
-
* Sets focused to true.
|
1217
|
-
*/
|
1218
|
-
onFocus() {
|
1219
|
-
this.focused = true;
|
1220
|
-
}
|
1221
|
-
/**
|
1222
|
-
* Sets checked to true.
|
1223
|
-
*/
|
1224
|
-
select() {
|
1225
|
-
this.checked = true;
|
1226
|
-
this._cdRef.markForCheck();
|
1227
|
-
}
|
1228
|
-
/**
|
1229
|
-
* Sets checked to false
|
1230
|
-
*/
|
1231
|
-
deselect() {
|
1232
|
-
this.checked = false;
|
1233
|
-
this._cdRef.markForCheck();
|
1234
|
-
}
|
1235
|
-
}
|
1236
|
-
DaffCheckboxComponent.decorators = [
|
1237
|
-
{ type: Component, args: [{
|
1238
|
-
selector: 'daff-checkbox',
|
1239
|
-
template: "<input #inputElement\ntype=\"checkbox\"\n[attr.aria-label]=\"label\"\n[attr.aria-labelledby]=\"labeledBy\"\n[attr.checked]=\"checked ? '' : null\"\n[attr.id] = \"id\"\n[attr.value]=\"value\"\n[attr.name]=\"name\"\n[attr.disabled] = \"disabled ? '' : null\" \n(change)=\"_onChange($event)\"\n(blur)=\"onBlur()\"\n(focus)=\"onFocus()\"\n/>\n<label [attr.for]=\"id\"><ng-content></ng-content></label>",
|
1240
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
1241
|
-
styles: [""]
|
1242
|
-
},] }
|
1243
|
-
];
|
1244
|
-
/** @nocollapse */
|
1245
|
-
DaffCheckboxComponent.ctorParameters = () => [
|
1246
|
-
{ type: ChangeDetectorRef }
|
1247
|
-
];
|
1248
|
-
DaffCheckboxComponent.propDecorators = {
|
1249
|
-
nativeCheckbox: [{ type: ViewChild, args: ['inputElement', { static: true, read: ElementRef },] }],
|
1250
|
-
name: [{ type: Input }],
|
1251
|
-
value: [{ type: Input }],
|
1252
|
-
checked: [{ type: Input }],
|
1253
|
-
id: [{ type: Input }],
|
1254
|
-
label: [{ type: Input, args: ['aria-label',] }],
|
1255
|
-
labeledBy: [{ type: Input, args: ['aria-labelledby',] }],
|
1256
|
-
becameChecked: [{ type: Output }],
|
1257
|
-
becameUnchecked: [{ type: Output }],
|
1258
|
-
role: [{ type: HostBinding, args: ['attr.role',] }],
|
1259
|
-
focusClass: [{ type: HostBinding, args: ['class.focused',] }],
|
1260
|
-
disabledClass: [{ type: HostBinding, args: ['class.disabled',] }]
|
1261
|
-
};
|
1262
|
-
|
1263
|
-
class DaffCheckboxSetComponent {
|
1264
|
-
constructor() {
|
1265
|
-
/**
|
1266
|
-
* The role of the component. Set to "checkbox".
|
1267
|
-
*
|
1268
|
-
* @docs-private
|
1269
|
-
*/
|
1270
|
-
this.role = 'group';
|
1271
|
-
this.valueList = new EventEmitter();
|
1272
|
-
}
|
1273
|
-
getValues() {
|
1274
|
-
const checkboxes = this.checkboxes.toArray();
|
1275
|
-
return this.formArray.value.map((element, index) => element === true ? checkboxes[index].value : false).filter(element => element !== false);
|
1276
|
-
}
|
1277
|
-
}
|
1278
|
-
DaffCheckboxSetComponent.decorators = [
|
1279
|
-
{ type: Component, args: [{
|
1280
|
-
selector: 'daff-checkbox-set',
|
1281
|
-
template: "<ng-content></ng-content>",
|
1282
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
1283
|
-
styles: [""]
|
1284
|
-
},] }
|
1285
|
-
];
|
1286
|
-
DaffCheckboxSetComponent.propDecorators = {
|
1287
|
-
formArray: [{ type: Input }],
|
1288
|
-
name: [{ type: Input }],
|
1289
|
-
role: [{ type: HostBinding, args: ['attr.role',] }],
|
1290
|
-
checkboxes: [{ type: ContentChildren, args: [DaffCheckboxComponent,] }],
|
1291
|
-
valueList: [{ type: Output }]
|
1292
|
-
};
|
1293
|
-
|
1294
|
-
/**
|
1295
|
-
* A directive for binding the DaffCheckboxComponent and the Control Value Accessor.
|
1296
|
-
*/
|
1297
|
-
class DaffCheckboxControlValueAccessorDirective {
|
1298
|
-
constructor(_control, _checkbox) {
|
1299
|
-
this._control = _control;
|
1300
|
-
this._checkbox = _checkbox;
|
1301
|
-
if (this._control != null) {
|
1302
|
-
this._control.valueAccessor = this;
|
1303
|
-
}
|
1304
|
-
}
|
1305
|
-
/**
|
1306
|
-
* A lifecycle method called when the directive is initialized.
|
1307
|
-
*/
|
1308
|
-
ngOnInit() {
|
1309
|
-
// See the note about `writeValue` usage.
|
1310
|
-
this.writeValue(this._control.value);
|
1311
|
-
// Watch for user events on the component to update the state
|
1312
|
-
this._checkbox.becameChecked.subscribe(() => {
|
1313
|
-
this._onChange(true);
|
1314
|
-
});
|
1315
|
-
this._checkbox.becameUnchecked.subscribe(() => {
|
1316
|
-
this._onChange(false);
|
1317
|
-
});
|
1318
|
-
}
|
1319
|
-
/**
|
1320
|
-
* writes a new value down into the component.
|
1321
|
-
*/
|
1322
|
-
writeValue(value) {
|
1323
|
-
value = !!value;
|
1324
|
-
if (value === true) {
|
1325
|
-
this.fireSelect();
|
1326
|
-
}
|
1327
|
-
else {
|
1328
|
-
this.fireDeselect();
|
1329
|
-
}
|
1330
|
-
}
|
1331
|
-
/**
|
1332
|
-
* Registers the change handler
|
1333
|
-
*/
|
1334
|
-
registerOnChange(fn) {
|
1335
|
-
this._onChange = (val) => {
|
1336
|
-
fn(val);
|
1337
|
-
};
|
1338
|
-
}
|
1339
|
-
/**
|
1340
|
-
* Registers the touched handler
|
1341
|
-
*/
|
1342
|
-
registerOnTouched(fn) {
|
1343
|
-
this._onTouched = fn;
|
1344
|
-
}
|
1345
|
-
/**
|
1346
|
-
* Sets the disabled state.
|
1347
|
-
*/
|
1348
|
-
setDisabledState(isDisabled) {
|
1349
|
-
this._checkbox.disabled = isDisabled;
|
1350
|
-
}
|
1351
|
-
/**
|
1352
|
-
* calls the child checkbox's select function
|
1353
|
-
*/
|
1354
|
-
fireSelect() {
|
1355
|
-
this._checkbox.select();
|
1356
|
-
}
|
1357
|
-
/**
|
1358
|
-
* calls the child checkbox's deselect function
|
1359
|
-
*/
|
1360
|
-
fireDeselect() {
|
1361
|
-
this._checkbox.deselect();
|
1362
|
-
}
|
1363
|
-
}
|
1364
|
-
DaffCheckboxControlValueAccessorDirective.decorators = [
|
1365
|
-
{ type: Directive, args: [{
|
1366
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
1367
|
-
selector: 'daff-checkbox[ngModel], daff-checkbox[formControl], daff-checkbox[formControlName]',
|
1368
|
-
},] }
|
1369
|
-
];
|
1370
|
-
/** @nocollapse */
|
1371
|
-
DaffCheckboxControlValueAccessorDirective.ctorParameters = () => [
|
1372
|
-
{ type: NgControl, decorators: [{ type: Optional }, { type: Self }] },
|
1373
|
-
{ type: DaffCheckboxComponent }
|
1374
|
-
];
|
1375
|
-
DaffCheckboxControlValueAccessorDirective.propDecorators = {
|
1376
|
-
value: [{ type: Input }],
|
1377
|
-
name: [{ type: Input }]
|
1378
|
-
};
|
1379
|
-
|
1380
|
-
class DaffCheckboxModule {
|
1381
|
-
}
|
1382
|
-
DaffCheckboxModule.decorators = [
|
1383
|
-
{ type: NgModule, args: [{
|
1384
|
-
exports: [
|
1385
|
-
DaffCheckboxComponent,
|
1386
|
-
DaffCheckboxSetComponent,
|
1387
|
-
DaffCheckboxControlValueAccessorDirective,
|
1388
|
-
],
|
1389
|
-
declarations: [
|
1390
|
-
DaffCheckboxComponent,
|
1391
|
-
DaffCheckboxSetComponent,
|
1392
|
-
DaffCheckboxControlValueAccessorDirective,
|
1393
|
-
],
|
1394
|
-
imports: [
|
1395
|
-
CommonModule,
|
1396
|
-
],
|
1397
|
-
providers: [
|
1398
|
-
DaffCheckboxSetComponent,
|
1399
|
-
],
|
1400
|
-
},] }
|
1401
|
-
];
|
1402
|
-
|
1403
|
-
class DaffQuantityInputComponent {
|
1404
|
-
constructor(ngControl, changeDetectorRef) {
|
1405
|
-
this.ngControl = ngControl;
|
1406
|
-
this.changeDetectorRef = changeDetectorRef;
|
1407
|
-
/**
|
1408
|
-
* @docs
|
1409
|
-
* The minimum number for the quantity input field
|
1410
|
-
*/
|
1411
|
-
this.min = 1;
|
1412
|
-
/**
|
1413
|
-
* @docs
|
1414
|
-
* The maximum number for the quantity input field
|
1415
|
-
*/
|
1416
|
-
this.max = 10;
|
1417
|
-
/**
|
1418
|
-
* A new control for the nested native input.
|
1419
|
-
* We don't bind the native input directly to the inherited form control
|
1420
|
-
* to avoid triggering updates on the input event.
|
1421
|
-
* Instead, we listen for the change event and manually patch form control values.
|
1422
|
-
*/
|
1423
|
-
this._inputControl = new FormControl();
|
1424
|
-
// TODO: should this not use this.input as the source of truth for focused?
|
1425
|
-
this.focused = false;
|
1426
|
-
this._destroyed = new Subject();
|
1427
|
-
}
|
1428
|
-
get value() {
|
1429
|
-
return this.ngControl.control.value;
|
1430
|
-
}
|
1431
|
-
set value(value) {
|
1432
|
-
const val = Math.min(Math.round(coerceNumberProperty(value)), this.max);
|
1433
|
-
this.ngControl.control.patchValue(val);
|
1434
|
-
this._inputControl.patchValue(val);
|
1435
|
-
this.changeDetectorRef.markForCheck();
|
1436
|
-
}
|
1437
|
-
get disabled() {
|
1438
|
-
return this.ngControl.control.disabled;
|
1439
|
-
}
|
1440
|
-
ngOnInit() {
|
1441
|
-
this._inputControl.patchValue(this.ngControl.control.value);
|
1442
|
-
this.setInputDisabled();
|
1443
|
-
this.ngControl.statusChanges.pipe(takeUntil(this._destroyed)).subscribe(() => {
|
1444
|
-
this.setInputDisabled();
|
1445
|
-
});
|
1446
|
-
}
|
1447
|
-
ngOnDestroy() {
|
1448
|
-
this._destroyed.next(true);
|
1449
|
-
}
|
1450
|
-
focus() {
|
1451
|
-
this.focused = true;
|
1452
|
-
this.input.focus();
|
1453
|
-
}
|
1454
|
-
onFocus() {
|
1455
|
-
this.focused = true;
|
1456
|
-
this.ngControl.control.markAsTouched();
|
1457
|
-
}
|
1458
|
-
onBlur() {
|
1459
|
-
// TODO: this.focused = false ?
|
1460
|
-
if (this.value === null || this.value === undefined) {
|
1461
|
-
this.value = 1;
|
1462
|
-
this.changeDetectorRef.markForCheck();
|
1463
|
-
}
|
1464
|
-
}
|
1465
|
-
/**
|
1466
|
-
* Callback function fired when the value changes.
|
1467
|
-
* Used to pass the value back up to the ngControl.
|
1468
|
-
*/
|
1469
|
-
onValueChange(e) {
|
1470
|
-
this.value = e.target.value;
|
1471
|
-
}
|
1472
|
-
setInputDisabled() {
|
1473
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
1474
|
-
this.ngControl.disabled
|
1475
|
-
? this._inputControl.disable()
|
1476
|
-
: this._inputControl.enable();
|
1477
|
-
}
|
1478
|
-
}
|
1479
|
-
DaffQuantityInputComponent.decorators = [
|
1480
|
-
{ type: Component, args: [{
|
1481
|
-
selector: 'daff-quantity-input',
|
1482
|
-
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",
|
1483
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
1484
|
-
},] }
|
1485
|
-
];
|
1486
|
-
/** @nocollapse */
|
1487
|
-
DaffQuantityInputComponent.ctorParameters = () => [
|
1488
|
-
{ type: NgControl },
|
1489
|
-
{ type: ChangeDetectorRef }
|
1490
|
-
];
|
1491
|
-
DaffQuantityInputComponent.propDecorators = {
|
1492
|
-
input: [{ type: ViewChild, args: [DaffInputComponent,] }],
|
1493
|
-
min: [{ type: Input }],
|
1494
|
-
max: [{ type: Input }]
|
1495
|
-
};
|
1496
|
-
|
1497
|
-
/**
|
1498
|
-
* Create an array of numbers from min to max, not including max.
|
1499
|
-
*/
|
1500
|
-
const makeValueArray = (min, max, increment) => Array(max - min).fill(0).map((x, i) => (i * increment) + min);
|
1501
|
-
class DaffQuantitySelectComponent {
|
1502
|
-
constructor(ngControl, changeDetectorRef) {
|
1503
|
-
this.ngControl = ngControl;
|
1504
|
-
this.changeDetectorRef = changeDetectorRef;
|
1505
|
-
/**
|
1506
|
-
* @docs
|
1507
|
-
* The minimum number selectable.
|
1508
|
-
*/
|
1509
|
-
this.min = 1;
|
1510
|
-
/**
|
1511
|
-
* @docs
|
1512
|
-
* The maximum number selectable;
|
1513
|
-
*/
|
1514
|
-
this.max = 10;
|
1515
|
-
/**
|
1516
|
-
* @docs
|
1517
|
-
* Property used to determine whether or not the DaffQuantitySelectComponent is
|
1518
|
-
* used in a situation whether the `max` isn't a true max.
|
1519
|
-
*/
|
1520
|
-
this.extendable = true;
|
1521
|
-
/**
|
1522
|
-
* The amount to increment between "min" and "max".
|
1523
|
-
*/
|
1524
|
-
this.increment = 1;
|
1525
|
-
this._value = 1;
|
1526
|
-
}
|
1527
|
-
get value() {
|
1528
|
-
return this._value;
|
1529
|
-
}
|
1530
|
-
set value(value) {
|
1531
|
-
this._value = value;
|
1532
|
-
this.ngControl.control.patchValue(this._value);
|
1533
|
-
this.changeDetectorRef.markForCheck();
|
1534
|
-
}
|
1535
|
-
/**
|
1536
|
-
* Callback function fired when the value changes.
|
1537
|
-
* Used to pass the value back up to the ngControl.
|
1538
|
-
*/
|
1539
|
-
onValueChange(e) {
|
1540
|
-
this.value = e.target.value;
|
1541
|
-
}
|
1542
|
-
get focused() {
|
1543
|
-
return this.select.focused;
|
1544
|
-
}
|
1545
|
-
focus() {
|
1546
|
-
this.select.focus();
|
1547
|
-
}
|
1548
|
-
/**
|
1549
|
-
* A helper function for easily making options for the `select`.
|
1550
|
-
*/
|
1551
|
-
get valueArray() {
|
1552
|
-
return makeValueArray(this.min, this.max, this.increment);
|
1553
|
-
}
|
1554
|
-
}
|
1555
|
-
DaffQuantitySelectComponent.decorators = [
|
1556
|
-
{ type: Component, args: [{
|
1557
|
-
selector: 'daff-quantity-select',
|
1558
|
-
template: "<select daff-native-select [formControl]=\"ngControl.control\">\n <option *ngFor=\"let item of valueArray\" [value]=\"item\">{{ item }}</option>\n <option [value]=\"max\" *ngIf=\"extendable\">{{ max }}+</option>\n <option [value]=\"max\" *ngIf=\"!extendable\">{{ max }}</option>\n</select>\n",
|
1559
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
1560
|
-
},] }
|
1561
|
-
];
|
1562
|
-
/** @nocollapse */
|
1563
|
-
DaffQuantitySelectComponent.ctorParameters = () => [
|
1564
|
-
{ type: NgControl },
|
1565
|
-
{ type: ChangeDetectorRef }
|
1566
|
-
];
|
1567
|
-
DaffQuantitySelectComponent.propDecorators = {
|
1568
|
-
select: [{ type: ViewChild, args: [DaffNativeSelectComponent,] }],
|
1569
|
-
min: [{ type: Input }],
|
1570
|
-
max: [{ type: Input }],
|
1571
|
-
extendable: [{ type: Input }]
|
1572
|
-
};
|
1573
|
-
|
1574
|
-
class DaffQuantityFieldComponent {
|
1575
|
-
constructor(ngControl, cd) {
|
1576
|
-
this.ngControl = ngControl;
|
1577
|
-
this.cd = cd;
|
1578
|
-
/**
|
1579
|
-
* @docs
|
1580
|
-
* The minimum valid value of the quantity field.
|
1581
|
-
* Must be greater than or equal to 1.
|
1582
|
-
*/
|
1583
|
-
this.min = 1;
|
1584
|
-
/**
|
1585
|
-
* @docs
|
1586
|
-
* The maximum valid value of the quantity field.
|
1587
|
-
* Must be greater than min.
|
1588
|
-
*/
|
1589
|
-
this.max = 500;
|
1590
|
-
/**
|
1591
|
-
* @docs
|
1592
|
-
* The range of numbers acceptable in a quantity dropdown
|
1593
|
-
* before it becomes an input element.
|
1594
|
-
*/
|
1595
|
-
this.selectMax = 10;
|
1596
|
-
this.focused = false;
|
1597
|
-
this.disabled = false;
|
1598
|
-
this._quantity = 1;
|
1599
|
-
this._inputHasBeenShown = false;
|
1600
|
-
if (this.ngControl != null) {
|
1601
|
-
this.ngControl.valueAccessor = this;
|
1602
|
-
}
|
1603
|
-
}
|
1604
|
-
get quantity() {
|
1605
|
-
return this._quantity;
|
1606
|
-
}
|
1607
|
-
set quantity(value) {
|
1608
|
-
this._quantity = coerceNumberProperty(value, 1);
|
1609
|
-
}
|
1610
|
-
/**
|
1611
|
-
* Returns the lesser of max and selectMax.
|
1612
|
-
*/
|
1613
|
-
get _maxFloor() {
|
1614
|
-
return Math.min(this.max, this.selectMax);
|
1615
|
-
}
|
1616
|
-
get controlType() {
|
1617
|
-
// TODO: use enum
|
1618
|
-
return this.showInputField
|
1619
|
-
? 'native-input'
|
1620
|
-
: 'native-select';
|
1621
|
-
}
|
1622
|
-
get showInputField() {
|
1623
|
-
const ret = this._inputHasBeenShown || (this.ngControl
|
1624
|
-
? this.ngControl.value >= this.selectMax
|
1625
|
-
: this.quantity >= this.selectMax);
|
1626
|
-
if (ret) {
|
1627
|
-
this._inputHasBeenShown = true;
|
1628
|
-
}
|
1629
|
-
return ret;
|
1630
|
-
}
|
1631
|
-
get showSelectField() {
|
1632
|
-
return !this.showInputField;
|
1633
|
-
}
|
1634
|
-
onChange(quantity) { }
|
1635
|
-
;
|
1636
|
-
onTouched(quantity) { }
|
1637
|
-
;
|
1638
|
-
writeValue(quantity) {
|
1639
|
-
this.quantity = quantity;
|
1640
|
-
this.cd.markForCheck();
|
1641
|
-
}
|
1642
|
-
registerOnChange(fn) {
|
1643
|
-
this.onChange = fn;
|
1644
|
-
}
|
1645
|
-
registerOnTouched(fn) {
|
1646
|
-
this.onTouched = fn;
|
1647
|
-
}
|
1648
|
-
setDisabledState(isDisabled) {
|
1649
|
-
this.disabled = isDisabled;
|
1650
|
-
}
|
1651
|
-
focus() {
|
1652
|
-
if (this.select) {
|
1653
|
-
this.select.focus();
|
1654
|
-
}
|
1655
|
-
if (this.input) {
|
1656
|
-
this.input.focus();
|
1657
|
-
}
|
1658
|
-
this.focused = true;
|
1659
|
-
}
|
1660
|
-
}
|
1661
|
-
DaffQuantityFieldComponent.decorators = [
|
1662
|
-
{ type: Component, args: [{
|
1663
|
-
selector: 'daff-quantity-field',
|
1664
|
-
template: "<daff-quantity-select\n *ngIf=\"showSelectField\"\n [min]=\"min\" [max]=\"_maxFloor\" [extendable]=\"max > selectMax\">\n</daff-quantity-select>\n<daff-quantity-input\n *ngIf=\"showInputField\"\n [min]=\"min\" [max]=\"max\">\n</daff-quantity-input>\n",
|
1665
|
-
providers: [
|
1666
|
-
{
|
1667
|
-
provide: DaffFormFieldControl,
|
1668
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
1669
|
-
useExisting: DaffQuantityFieldComponent,
|
1670
|
-
},
|
1671
|
-
],
|
1672
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
1673
|
-
},] }
|
1674
|
-
];
|
1675
|
-
/** @nocollapse */
|
1676
|
-
DaffQuantityFieldComponent.ctorParameters = () => [
|
1677
|
-
{ type: NgControl, decorators: [{ type: Optional }, { type: Self }] },
|
1678
|
-
{ type: ChangeDetectorRef }
|
1679
|
-
];
|
1680
|
-
DaffQuantityFieldComponent.propDecorators = {
|
1681
|
-
input: [{ type: ViewChild, args: [DaffQuantityInputComponent,] }],
|
1682
|
-
select: [{ type: ViewChild, args: [DaffQuantitySelectComponent,] }],
|
1683
|
-
min: [{ type: Input }],
|
1684
|
-
max: [{ type: Input }],
|
1685
|
-
selectMax: [{ type: Input }]
|
1686
|
-
};
|
1687
|
-
|
1688
|
-
class DaffQuantityFieldModule {
|
1689
|
-
}
|
1690
|
-
DaffQuantityFieldModule.decorators = [
|
1691
|
-
{ type: NgModule, args: [{
|
1692
|
-
declarations: [
|
1693
|
-
DaffQuantityFieldComponent,
|
1694
|
-
DaffQuantityInputComponent,
|
1695
|
-
DaffQuantitySelectComponent,
|
1696
|
-
],
|
1697
|
-
imports: [
|
1698
|
-
CommonModule,
|
1699
|
-
DaffNativeSelectModule,
|
1700
|
-
DaffInputModule,
|
1701
|
-
ReactiveFormsModule,
|
1702
|
-
],
|
1703
|
-
exports: [
|
1704
|
-
DaffQuantityFieldComponent,
|
1705
|
-
DaffQuantityInputComponent,
|
1706
|
-
DaffQuantitySelectComponent,
|
1707
|
-
],
|
1708
|
-
},] }
|
1709
|
-
];
|
1710
|
-
|
1711
|
-
/**
|
1712
|
-
* An _elementRef and an instance of renderer2 are needed for the Sizeable mixin
|
1713
|
-
*/
|
1714
|
-
class DaffContainerBase {
|
1715
|
-
constructor(_elementRef, _renderer) {
|
1716
|
-
this._elementRef = _elementRef;
|
1717
|
-
this._renderer = _renderer;
|
1718
|
-
}
|
1719
|
-
}
|
1720
|
-
const _daffContainerBase = daffSizeMixin(DaffContainerBase);
|
1721
|
-
/**
|
1722
|
-
* @inheritdoc
|
1723
|
-
*/
|
1724
|
-
class DaffContainerComponent extends _daffContainerBase {
|
1725
|
-
constructor(elementRef, renderer) {
|
1726
|
-
super(elementRef, renderer);
|
1727
|
-
this.elementRef = elementRef;
|
1728
|
-
this.renderer = renderer;
|
1729
|
-
/**
|
1730
|
-
* @docs-private
|
1731
|
-
*/
|
1732
|
-
this.class = true;
|
1733
|
-
}
|
1734
|
-
}
|
1735
|
-
DaffContainerComponent.decorators = [
|
1736
|
-
{ type: Component, args: [{
|
1737
|
-
selector: 'daff-container',
|
1738
|
-
template: '<ng-content></ng-content>',
|
1739
|
-
//todo(damienwebdev): remove once decorators hit stage 3 - https://github.com/microsoft/TypeScript/issues/7342
|
1740
|
-
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
1741
|
-
inputs: ['size'],
|
1742
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
1743
|
-
styles: [":host-context(.daff-manage-container-layout){display:inherit;flex:inherit;flex-direction:inherit;flex-flow:inherit;flex-wrap:inherit;justify-content:inherit;justify-items:inherit;align-items:inherit;align-content:inherit;gap:inherit;grid-template-columns:inherit;grid-template-rows:inherit;grid-template-areas:inherit;grid-template:inherit;grid-auto-columns:inherit;grid-auto-rows:inherit;grid-auto-flow:inherit;grid:inherit;-moz-column-gap:inherit;column-gap:inherit;row-gap:inherit;grid-gap:inherit;grid-column-gap:inherit;grid-row-gap:inherit;place-items:inherit;place-content:inherit}:host{display:block;margin:0 auto;padding:0;width:100%}:host.daff-xs{max-width:640px}:host.daff-sm{max-width:800px}:host.daff-md{max-width:1040px}:host.daff-lg{max-width:1340px}:host.daff-xl{max-width:1920px}"]
|
1744
|
-
},] }
|
1745
|
-
];
|
1746
|
-
/** @nocollapse */
|
1747
|
-
DaffContainerComponent.ctorParameters = () => [
|
1748
|
-
{ type: ElementRef },
|
1749
|
-
{ type: Renderer2 }
|
1750
|
-
];
|
1751
|
-
DaffContainerComponent.propDecorators = {
|
1752
|
-
class: [{ type: HostBinding, args: ['class.daff-container',] }]
|
1753
|
-
};
|
1754
|
-
|
1755
|
-
class DaffContainerModule {
|
1756
|
-
}
|
1757
|
-
DaffContainerModule.decorators = [
|
1758
|
-
{ type: NgModule, args: [{
|
1759
|
-
imports: [
|
1760
|
-
CommonModule,
|
1761
|
-
],
|
1762
|
-
declarations: [
|
1763
|
-
DaffContainerComponent,
|
1764
|
-
],
|
1765
|
-
exports: [
|
1766
|
-
DaffContainerComponent,
|
1767
|
-
],
|
1768
|
-
},] }
|
1769
|
-
];
|
1770
|
-
|
1771
|
-
/**
|
1772
|
-
* An _elementRef and an instance of renderer2 are needed for the Colorable mixin
|
1773
|
-
*/
|
1774
|
-
class DaffLoadingIconBase {
|
1775
|
-
constructor(_elementRef, _renderer) {
|
1776
|
-
this._elementRef = _elementRef;
|
1777
|
-
this._renderer = _renderer;
|
1778
|
-
}
|
1779
|
-
}
|
1780
|
-
const _daffLoadingIconBase = daffColorMixin(DaffLoadingIconBase, 'primary');
|
1781
|
-
/**
|
1782
|
-
* @inheritdoc
|
1783
|
-
*/
|
1784
|
-
class DaffLoadingIconComponent extends _daffLoadingIconBase {
|
1785
|
-
constructor(elementRef, renderer) {
|
1786
|
-
super(elementRef, renderer);
|
1787
|
-
this.elementRef = elementRef;
|
1788
|
-
this.renderer = renderer;
|
1789
|
-
/**
|
1790
|
-
* The (pixel) diameter of the animation
|
1791
|
-
*/
|
1792
|
-
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
1793
|
-
this.diameter = 60;
|
1794
|
-
/**
|
1795
|
-
* @docs-private
|
1796
|
-
*/
|
1797
|
-
this.class = true;
|
1798
|
-
}
|
1799
|
-
/**
|
1800
|
-
* @docs-private
|
1801
|
-
*/
|
1802
|
-
get maxWidth() {
|
1803
|
-
return this.diameter + 'px';
|
1804
|
-
}
|
1805
|
-
}
|
1806
|
-
DaffLoadingIconComponent.decorators = [
|
1807
|
-
{ type: Component, args: [{
|
1808
|
-
selector: 'daff-loading-icon',
|
1809
|
-
template: "<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 100 100\">\n <circle cx=\"50%\" cy=\"50%\" r=\"46\"></circle>\n</svg>",
|
1810
|
-
//todo(damienwebdev): remove once decorators hit stage 3 - https://github.com/microsoft/TypeScript/issues/7342
|
1811
|
-
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
1812
|
-
inputs: ['color'],
|
1813
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
1814
|
-
styles: [":host{display:block}circle{-webkit-animation:rotation linear,circle-animation linear;animation:rotation linear,circle-animation linear;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;fill:transparent;stroke-dasharray:101.1592834456 400;stroke-linecap:round;stroke-width:5px;transform-origin:center}@-webkit-keyframes circle-animation{0%{stroke-dasharray:101.1592834456 400;stroke-dashoffset:101.1592834456}50%{stroke-dasharray:101.1592834456 400;stroke-dashoffset:28.902652413}75%{stroke-dasharray:101.1592834456 400;stroke-dashoffset:0}to{stroke-dasharray:0 400;stroke-dashoffset:-101.1592834456}}@keyframes circle-animation{0%{stroke-dasharray:101.1592834456 400;stroke-dashoffset:101.1592834456}50%{stroke-dasharray:101.1592834456 400;stroke-dashoffset:28.902652413}75%{stroke-dasharray:101.1592834456 400;stroke-dashoffset:0}to{stroke-dasharray:0 400;stroke-dashoffset:-101.1592834456}}@-webkit-keyframes rotation{0%{transform:rotate(-90deg)}50%{transform:rotate(0deg)}50.5%{transform:rotate(0deg)}75%{transform:rotate(90deg)}75.5%{transform:rotate(90deg)}99%{transform:rotate(144deg)}to{transform:rotate(144deg)}}@keyframes rotation{0%{transform:rotate(-90deg)}50%{transform:rotate(0deg)}50.5%{transform:rotate(0deg)}75%{transform:rotate(90deg)}75.5%{transform:rotate(90deg)}99%{transform:rotate(144deg)}to{transform:rotate(144deg)}}"]
|
1815
|
-
},] }
|
1816
|
-
];
|
1817
|
-
/** @nocollapse */
|
1818
|
-
DaffLoadingIconComponent.ctorParameters = () => [
|
1819
|
-
{ type: ElementRef },
|
1820
|
-
{ type: Renderer2 }
|
1821
|
-
];
|
1822
|
-
DaffLoadingIconComponent.propDecorators = {
|
1823
|
-
diameter: [{ type: Input }],
|
1824
|
-
class: [{ type: HostBinding, args: ['class.daff-loading-icon',] }],
|
1825
|
-
maxWidth: [{ type: HostBinding, args: ['style.max-width',] }]
|
1826
|
-
};
|
1827
|
-
|
1828
|
-
class DaffLoadingIconModule {
|
1829
|
-
}
|
1830
|
-
DaffLoadingIconModule.decorators = [
|
1831
|
-
{ type: NgModule, args: [{
|
1832
|
-
imports: [
|
1833
|
-
CommonModule,
|
1834
|
-
],
|
1835
|
-
declarations: [
|
1836
|
-
DaffLoadingIconComponent,
|
1837
|
-
],
|
1838
|
-
exports: [
|
1839
|
-
DaffLoadingIconComponent,
|
1840
|
-
],
|
1841
|
-
},] }
|
1842
|
-
];
|
1843
|
-
|
1844
|
-
const daffProgressIndicatorAnimation = {
|
1845
|
-
fill: trigger('fill', [
|
1846
|
-
state('*', style({ width: '{{ percentage }}%' }), { params: { percentage: 0 } }),
|
1847
|
-
transition('* <=> *', animate(1000)),
|
1848
|
-
]),
|
1849
|
-
};
|
1850
|
-
|
1851
|
-
/**
|
1852
|
-
* An _elementRef and an instance of renderer2 are needed for the Colorable mixin
|
1853
|
-
*/
|
1854
|
-
class DaffProgressIndicatorBase {
|
1855
|
-
constructor(_elementRef, _renderer) {
|
1856
|
-
this._elementRef = _elementRef;
|
1857
|
-
this._renderer = _renderer;
|
1858
|
-
}
|
1859
|
-
}
|
1860
|
-
const _daffProgressIndicatorBase = daffColorMixin(DaffProgressIndicatorBase, 'primary');
|
1861
|
-
/**
|
1862
|
-
* @inheritdoc
|
1863
|
-
*/
|
1864
|
-
class DaffProgressIndicatorComponent extends _daffProgressIndicatorBase {
|
1865
|
-
constructor(elementRef, renderer) {
|
1866
|
-
super(elementRef, renderer);
|
1867
|
-
this.elementRef = elementRef;
|
1868
|
-
this.renderer = renderer;
|
1869
|
-
/**
|
1870
|
-
* @docs-private
|
1871
|
-
*/
|
1872
|
-
this.class = true;
|
1873
|
-
/**
|
1874
|
-
* The percentage completion of the progression,
|
1875
|
-
* expressed as a whole number between 0 and 100.
|
1876
|
-
*
|
1877
|
-
*/
|
1878
|
-
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
1879
|
-
this.percentage = 0;
|
1880
|
-
/**
|
1881
|
-
* An event that emits each time the progression reaches 100%
|
1882
|
-
* and the animation is finished
|
1883
|
-
*/
|
1884
|
-
this.finished = new EventEmitter();
|
1885
|
-
}
|
1886
|
-
/**
|
1887
|
-
* Calculates when the progress animation is fully completed
|
1888
|
-
*
|
1889
|
-
* @param event: AnimationEvent
|
1890
|
-
*/
|
1891
|
-
onAnimationComplete(event) {
|
1892
|
-
// @ts-ignore: @angular/animations typing error on event.toState as string
|
1893
|
-
// See: https://github.com/angular/angular/issues/26507
|
1894
|
-
if (event.toState === '100' || event.toState === 100) {
|
1895
|
-
this.finished.emit();
|
1896
|
-
}
|
1897
|
-
}
|
1898
|
-
/**
|
1899
|
-
* @docs-private
|
1900
|
-
*/
|
1901
|
-
get fillState() {
|
1902
|
-
return {
|
1903
|
-
value: this.percentage,
|
1904
|
-
params: {
|
1905
|
-
percentage: this.percentage,
|
1906
|
-
},
|
1907
|
-
};
|
1908
|
-
}
|
1909
|
-
}
|
1910
|
-
DaffProgressIndicatorComponent.decorators = [
|
1911
|
-
{ type: Component, args: [{
|
1912
|
-
selector: 'daff-progress-indicator',
|
1913
|
-
template: "<div class=\"daff-progress-indicator__fill\" [@fill]=\"fillState\" (@fill.done)=\"onAnimationComplete($event)\"></div>",
|
1914
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
1915
|
-
//todo(damienwebdev): remove once decorators hit stage 3 - https://github.com/microsoft/TypeScript/issues/7342
|
1916
|
-
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
1917
|
-
inputs: ['color'],
|
1918
|
-
animations: [
|
1919
|
-
daffProgressIndicatorAnimation.fill,
|
1920
|
-
],
|
1921
|
-
styles: [":host{display:flex;height:3px;width:100%}"]
|
1922
|
-
},] }
|
1923
|
-
];
|
1924
|
-
/** @nocollapse */
|
1925
|
-
DaffProgressIndicatorComponent.ctorParameters = () => [
|
1926
|
-
{ type: ElementRef },
|
1927
|
-
{ type: Renderer2 }
|
1928
|
-
];
|
1929
|
-
DaffProgressIndicatorComponent.propDecorators = {
|
1930
|
-
class: [{ type: HostBinding, args: ['class.daff-progress-indicator',] }],
|
1931
|
-
percentage: [{ type: Input }],
|
1932
|
-
finished: [{ type: Output }]
|
1933
|
-
};
|
1934
|
-
|
1935
|
-
class DaffProgressIndicatorModule {
|
1936
|
-
}
|
1937
|
-
DaffProgressIndicatorModule.decorators = [
|
1938
|
-
{ type: NgModule, args: [{
|
1939
|
-
declarations: [DaffProgressIndicatorComponent],
|
1940
|
-
imports: [
|
1941
|
-
CommonModule,
|
1942
|
-
],
|
1943
|
-
exports: [DaffProgressIndicatorComponent],
|
1944
|
-
},] }
|
1945
|
-
];
|
1946
|
-
|
1947
|
-
class DaffRadioSetComponent {
|
1948
|
-
constructor() {
|
1949
|
-
/**
|
1950
|
-
* @docs-private
|
1951
|
-
*/
|
1952
|
-
this.role = 'radiogroup';
|
1953
|
-
}
|
1954
|
-
}
|
1955
|
-
DaffRadioSetComponent.decorators = [
|
1956
|
-
{ type: Component, args: [{
|
1957
|
-
selector: 'daff-radio-set',
|
1958
|
-
template: "<ng-content></ng-content>",
|
1959
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
1960
|
-
styles: [""]
|
1961
|
-
},] }
|
1962
|
-
];
|
1963
|
-
/** @nocollapse */
|
1964
|
-
DaffRadioSetComponent.ctorParameters = () => [];
|
1965
|
-
DaffRadioSetComponent.propDecorators = {
|
1966
|
-
name: [{ type: Input }],
|
1967
|
-
role: [{ type: HostBinding, args: ['attr.role',] }]
|
1968
|
-
};
|
1969
|
-
|
1970
|
-
let radioUniqueId = 0;
|
1971
|
-
class DaffRadioComponent {
|
1972
|
-
constructor(radioset) {
|
1973
|
-
this.radioset = radioset;
|
1974
|
-
/**
|
1975
|
-
* @docs-private
|
1976
|
-
*/
|
1977
|
-
this.role = 'radio';
|
1978
|
-
/**
|
1979
|
-
* @docs-private
|
1980
|
-
*/
|
1981
|
-
this._checked = false;
|
1982
|
-
/**
|
1983
|
-
* Output event of selection being changed
|
1984
|
-
*/
|
1985
|
-
this.selectionChange = new EventEmitter();
|
1986
|
-
/**
|
1987
|
-
* The id of the radio. It is uniquely generated but can be overwritten by the user. Must be unique.
|
1988
|
-
*/
|
1989
|
-
this.id = 'daff-radio-' + radioUniqueId;
|
1990
|
-
/**
|
1991
|
-
* Name of the Radio
|
1992
|
-
*/
|
1993
|
-
this.name = '';
|
1994
|
-
/**
|
1995
|
-
* Used for aria-label. Default to name if user does not input a label.
|
1996
|
-
*/
|
1997
|
-
// eslint-disable-next-line @angular-eslint/no-input-rename
|
1998
|
-
this.label = this.name;
|
1999
|
-
this.disabled = false;
|
2000
|
-
this.focused = false;
|
2001
|
-
radioUniqueId++;
|
2002
|
-
}
|
2003
|
-
/**
|
2004
|
-
* @docs-private
|
2005
|
-
*/
|
2006
|
-
get focusClass() {
|
2007
|
-
return this.focused === true;
|
2008
|
-
}
|
2009
|
-
;
|
2010
|
-
/**
|
2011
|
-
* @docs-private
|
2012
|
-
*/
|
2013
|
-
get disabledClass() {
|
2014
|
-
return this.disabled === true;
|
2015
|
-
}
|
2016
|
-
;
|
2017
|
-
/**
|
2018
|
-
* The checked property of the radio
|
2019
|
-
*/
|
2020
|
-
get checked() {
|
2021
|
-
return this._checked;
|
2022
|
-
}
|
2023
|
-
set checked(value) {
|
2024
|
-
if (this._checked !== value) {
|
2025
|
-
this._checked = value;
|
2026
|
-
this.selectionChange.emit(this.value);
|
2027
|
-
}
|
2028
|
-
}
|
2029
|
-
/**
|
2030
|
-
* @docs-private
|
2031
|
-
*/
|
2032
|
-
ngOnInit() {
|
2033
|
-
this.name = this.radioset ? this.radioset.name : this.name;
|
2034
|
-
}
|
2035
|
-
/**
|
2036
|
-
* updates Focus styling
|
2037
|
-
*/
|
2038
|
-
onFocus() {
|
2039
|
-
this.focused = true;
|
2040
|
-
}
|
2041
|
-
/**
|
2042
|
-
* updates Blur styling
|
2043
|
-
*/
|
2044
|
-
onBlur() {
|
2045
|
-
this.focused = false;
|
2046
|
-
}
|
2047
|
-
/**
|
2048
|
-
* toggles checked attribute on
|
2049
|
-
*/
|
2050
|
-
select() {
|
2051
|
-
this.checked = true;
|
2052
|
-
}
|
2053
|
-
/**
|
2054
|
-
* toggles checked attribute off
|
2055
|
-
*/
|
2056
|
-
deselect() {
|
2057
|
-
this.checked = false;
|
2058
|
-
}
|
2059
|
-
onChange() {
|
2060
|
-
this.select();
|
2061
|
-
}
|
2062
|
-
;
|
2063
|
-
}
|
2064
|
-
DaffRadioComponent.decorators = [
|
2065
|
-
{ type: Component, args: [{
|
2066
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
2067
|
-
selector: 'daff-radio',
|
2068
|
-
template: "<input type=\"radio\" \n[attr.checked]=\"checked ? '' : null\" \n[attr.id]=\"id\" \n[attr.name]=\"name\" \n[attr.aria-label]=\"label\"\n[attr.aria-labelledby]=\"labelledby\"\n[attr.value]=\"value\"\n[attr.disabled] = \"disabled ? '' : null\" \n(change)=\"onChange()\"\n(blur)=\"onBlur()\"\n(focus)=\"onFocus()\"/>\n<label [attr.for]=\"id\">\n <ng-content></ng-content>\n</label>",
|
2069
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
2070
|
-
styles: [""]
|
2071
|
-
},] }
|
2072
|
-
];
|
2073
|
-
/** @nocollapse */
|
2074
|
-
DaffRadioComponent.ctorParameters = () => [
|
2075
|
-
{ type: DaffRadioSetComponent, decorators: [{ type: Optional }] }
|
2076
|
-
];
|
2077
|
-
DaffRadioComponent.propDecorators = {
|
2078
|
-
role: [{ type: HostBinding, args: ['attr.role',] }],
|
2079
|
-
focusClass: [{ type: HostBinding, args: ['class.focused',] }],
|
2080
|
-
disabledClass: [{ type: HostBinding, args: ['class.disabled',] }],
|
2081
|
-
selectionChange: [{ type: Output }],
|
2082
|
-
checked: [{ type: Input }],
|
2083
|
-
value: [{ type: Input }],
|
2084
|
-
id: [{ type: Input }],
|
2085
|
-
name: [{ type: Input }],
|
2086
|
-
label: [{ type: Input, args: ['aria-label',] }],
|
2087
|
-
labelledby: [{ type: Input, args: ['aria-labelledby',] }]
|
2088
|
-
};
|
2089
|
-
|
2090
|
-
class DaffRadioRegistry {
|
2091
|
-
constructor() {
|
2092
|
-
this._accessors = [];
|
2093
|
-
}
|
2094
|
-
/**
|
2095
|
-
* @description
|
2096
|
-
* Adds a control to the internal registry.
|
2097
|
-
*/
|
2098
|
-
add(control, accessor) {
|
2099
|
-
this._accessors.push({
|
2100
|
-
control,
|
2101
|
-
accessor,
|
2102
|
-
});
|
2103
|
-
}
|
2104
|
-
/**
|
2105
|
-
* @description
|
2106
|
-
* Removes a control from the internal registry.
|
2107
|
-
*/
|
2108
|
-
remove(accessor) {
|
2109
|
-
for (let i = this._accessors.length - 1; i >= 0; --i) {
|
2110
|
-
if (this._accessors[i]['accessor'] === accessor) {
|
2111
|
-
this._accessors.splice(i, 1);
|
2112
|
-
return;
|
2113
|
-
}
|
2114
|
-
}
|
2115
|
-
}
|
2116
|
-
/**
|
2117
|
-
* @description
|
2118
|
-
* Selects a radio button.
|
2119
|
-
*/
|
2120
|
-
select(accessor) {
|
2121
|
-
this._accessors.forEach((c) => {
|
2122
|
-
if (this._isSameGroup(c, accessor) && c['accessor'] !== accessor) {
|
2123
|
-
c['accessor'].fireDeselect();
|
2124
|
-
}
|
2125
|
-
});
|
2126
|
-
}
|
2127
|
-
_isSameGroup(controlPair, accessor) {
|
2128
|
-
if (!controlPair['control'].control) {
|
2129
|
-
return false;
|
2130
|
-
}
|
2131
|
-
return controlPair['control'].control.parent === accessor._control.control.parent
|
2132
|
-
&& controlPair['accessor'].name === accessor.name;
|
2133
|
-
}
|
2134
|
-
}
|
2135
|
-
/** @nocollapse */ DaffRadioRegistry.ɵprov = ɵɵdefineInjectable({ factory: function DaffRadioRegistry_Factory() { return new DaffRadioRegistry(); }, token: DaffRadioRegistry, providedIn: "root" });
|
2136
|
-
DaffRadioRegistry.decorators = [
|
2137
|
-
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
2138
|
-
];
|
2139
|
-
|
2140
|
-
/**
|
2141
|
-
* ControlValueAccessor functionality for the DaffRadio
|
2142
|
-
*/
|
2143
|
-
class DaffRadioControlValueAccessorDirective {
|
2144
|
-
constructor(_control, _registry, _radio) {
|
2145
|
-
this._control = _control;
|
2146
|
-
this._registry = _registry;
|
2147
|
-
this._radio = _radio;
|
2148
|
-
if (this._control != null) {
|
2149
|
-
this._control.valueAccessor = this;
|
2150
|
-
}
|
2151
|
-
}
|
2152
|
-
ngOnInit() {
|
2153
|
-
this.writeValue(this._control.value);
|
2154
|
-
this._registry.add(this._control, this);
|
2155
|
-
this._radio.selectionChange.subscribe(value => value ? this._onChange() : null);
|
2156
|
-
}
|
2157
|
-
/**
|
2158
|
-
*
|
2159
|
-
* writeValue function from the CVA interface
|
2160
|
-
*/
|
2161
|
-
writeValue(value) {
|
2162
|
-
// the this._onChange null check here is necessary because of an ongoing bug in angular forms
|
2163
|
-
// where writeValue can be called before the component initializes: https://github.com/angular/angular/issues/29218
|
2164
|
-
if (this.value === value && this._onChange) {
|
2165
|
-
this._onChange();
|
2166
|
-
this.fireSelect();
|
2167
|
-
}
|
2168
|
-
}
|
2169
|
-
/**
|
2170
|
-
* registerOnChange implemented from the CVA interface
|
2171
|
-
*/
|
2172
|
-
registerOnChange(fn) {
|
2173
|
-
this._onChange = () => {
|
2174
|
-
fn(this.value);
|
2175
|
-
this._registry.select(this);
|
2176
|
-
};
|
2177
|
-
}
|
2178
|
-
/**
|
2179
|
-
* registerOnTouch implemented from the CVA interface
|
2180
|
-
*/
|
2181
|
-
registerOnTouched(fn) {
|
2182
|
-
this._onTouched = fn;
|
2183
|
-
}
|
2184
|
-
/**
|
2185
|
-
* sets the disabled state.
|
2186
|
-
*/
|
2187
|
-
setDisabledState(isDisabled) {
|
2188
|
-
this._radio.disabled = isDisabled;
|
2189
|
-
}
|
2190
|
-
/**
|
2191
|
-
calls select function for the radio
|
2192
|
-
*/
|
2193
|
-
fireSelect() {
|
2194
|
-
this._radio.select();
|
2195
|
-
}
|
2196
|
-
/**
|
2197
|
-
calls deselect function for the radio
|
2198
|
-
*/
|
2199
|
-
fireDeselect() {
|
2200
|
-
this._radio.deselect();
|
2201
|
-
}
|
2202
|
-
}
|
2203
|
-
DaffRadioControlValueAccessorDirective.decorators = [
|
2204
|
-
{ type: Directive, args: [{
|
2205
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
2206
|
-
selector: 'daff-radio[ngModel], daff-radio[formControl], daff-radio[formControlName]',
|
2207
|
-
},] }
|
2208
|
-
];
|
2209
|
-
/** @nocollapse */
|
2210
|
-
DaffRadioControlValueAccessorDirective.ctorParameters = () => [
|
2211
|
-
{ type: NgControl, decorators: [{ type: Optional }, { type: Self }] },
|
2212
|
-
{ type: DaffRadioRegistry },
|
2213
|
-
{ type: DaffRadioComponent }
|
2214
|
-
];
|
2215
|
-
DaffRadioControlValueAccessorDirective.propDecorators = {
|
2216
|
-
value: [{ type: Input }],
|
2217
|
-
name: [{ type: Input }]
|
2218
|
-
};
|
2219
|
-
|
2220
|
-
class DaffRadioModule {
|
2221
|
-
}
|
2222
|
-
DaffRadioModule.decorators = [
|
2223
|
-
{ type: NgModule, args: [{
|
2224
|
-
exports: [
|
2225
|
-
DaffRadioComponent,
|
2226
|
-
DaffRadioSetComponent,
|
2227
|
-
DaffRadioControlValueAccessorDirective,
|
2228
|
-
],
|
2229
|
-
declarations: [
|
2230
|
-
DaffRadioControlValueAccessorDirective,
|
2231
|
-
DaffRadioComponent,
|
2232
|
-
DaffRadioSetComponent,
|
2233
|
-
],
|
2234
|
-
imports: [
|
2235
|
-
CommonModule,
|
2236
|
-
],
|
2237
|
-
},] }
|
2238
|
-
];
|
2239
|
-
|
2240
|
-
class DaffAccordionItemContentDirective {
|
2241
|
-
constructor() {
|
2242
|
-
/**
|
2243
|
-
* @docs-private
|
2244
|
-
*/
|
2245
|
-
this.class = true;
|
2246
|
-
}
|
2247
|
-
}
|
2248
|
-
DaffAccordionItemContentDirective.decorators = [
|
2249
|
-
{ type: Directive, args: [{
|
2250
|
-
selector: '[daffAccordionItemContent]',
|
2251
|
-
},] }
|
2252
|
-
];
|
2253
|
-
DaffAccordionItemContentDirective.propDecorators = {
|
2254
|
-
class: [{ type: HostBinding, args: ['class.daff-accordion-item__content',] }]
|
2255
|
-
};
|
2256
|
-
|
2257
|
-
class DaffAccordionItemTitleDirective {
|
2258
|
-
constructor() {
|
2259
|
-
/**
|
2260
|
-
* @docs-private
|
2261
|
-
*/
|
2262
|
-
this.class = true;
|
2263
|
-
}
|
2264
|
-
}
|
2265
|
-
DaffAccordionItemTitleDirective.decorators = [
|
2266
|
-
{ type: Directive, args: [{
|
2267
|
-
selector: '[daffAccordionItemTitle]',
|
2268
|
-
},] }
|
2269
|
-
];
|
2270
|
-
DaffAccordionItemTitleDirective.propDecorators = {
|
2271
|
-
class: [{ type: HostBinding, args: ['class.daff-accordion-item__title',] }]
|
2272
|
-
};
|
2273
|
-
|
2274
|
-
const daffAccordionAnimations = {
|
2275
|
-
openAccordion: trigger('openAccordion', [
|
2276
|
-
state('open', style({
|
2277
|
-
visibility: 'visible',
|
2278
|
-
opacity: '1',
|
2279
|
-
height: '*',
|
2280
|
-
})),
|
2281
|
-
state('void', style({
|
2282
|
-
visibility: 'hidden',
|
2283
|
-
overflow: 'hidden',
|
2284
|
-
opacity: '0',
|
2285
|
-
height: '0',
|
2286
|
-
})),
|
2287
|
-
transition('void <=> open', animate('150ms ease-in')),
|
2288
|
-
]),
|
2289
|
-
};
|
2290
|
-
|
2291
|
-
const getAnimationState = (open) => {
|
2292
|
-
if (open) {
|
2293
|
-
return 'open';
|
2294
|
-
}
|
2295
|
-
else {
|
2296
|
-
return 'void';
|
2297
|
-
}
|
2298
|
-
};
|
2299
|
-
|
2300
|
-
class DaffAccordionItemComponent {
|
2301
|
-
constructor() {
|
2302
|
-
/**
|
2303
|
-
* @docs-private
|
2304
|
-
*/
|
2305
|
-
this.faChevronDown = faChevronDown;
|
2306
|
-
/**
|
2307
|
-
* @docs-private
|
2308
|
-
*/
|
2309
|
-
this.faChevronUp = faChevronUp;
|
2310
|
-
/**
|
2311
|
-
* @docs-private
|
2312
|
-
*/
|
2313
|
-
this.class = true;
|
2314
|
-
/**
|
2315
|
-
* @docs-private
|
2316
|
-
*/
|
2317
|
-
this._open = false;
|
2318
|
-
}
|
2319
|
-
/**
|
2320
|
-
* @docs-private
|
2321
|
-
*/
|
2322
|
-
ngOnInit() {
|
2323
|
-
this._open = this.initiallyActive ? this.initiallyActive : this._open;
|
2324
|
-
this._animationState = getAnimationState(this._open);
|
2325
|
-
}
|
2326
|
-
toggleActive() {
|
2327
|
-
this._open = !this._open;
|
2328
|
-
this._animationState = getAnimationState(this._open);
|
2329
|
-
}
|
2330
|
-
}
|
2331
|
-
DaffAccordionItemComponent.decorators = [
|
2332
|
-
{ type: Component, args: [{
|
2333
|
-
selector: 'daff-accordion-item',
|
2334
|
-
template: "<div class=\"daff-accordion-item__header\" (click)=\"toggleActive()\">\n <ng-content select=\"[daffAccordionItemTitle]\"></ng-content>\n <span [hidden]=\"_open\" daffSuffix>\n <fa-icon [icon]=\"faChevronDown\"></fa-icon>\n </span>\n <span [hidden]=\"!_open\" daffSuffix>\n <fa-icon [icon]=\"faChevronUp\"></fa-icon>\n </span>\n</div>\n<div [@openAccordion]=\"_animationState\">\n <ng-content></ng-content>\n</div>",
|
2335
|
-
encapsulation: ViewEncapsulation.None,
|
2336
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
2337
|
-
animations: [
|
2338
|
-
daffAccordionAnimations.openAccordion,
|
2339
|
-
],
|
2340
|
-
styles: [".daff-accordion-item{display:block;padding:15px 0;width:100%}@media (min-width:768px){.daff-accordion-item{padding:30px 0}}.daff-accordion-item__header{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;align-items:center;justify-content:space-between;width:100%}.daff-accordion-item__header .daff-suffix{margin:0 10px}.daff-accordion-item__title{font-weight:700;text-transform:uppercase;font-size:1rem;margin:0}.daff-accordion-item__content{padding-top:15px}@media (min-width:768px){.daff-accordion-item__content{padding-top:30px}}"]
|
2341
|
-
},] }
|
2342
|
-
];
|
2343
|
-
DaffAccordionItemComponent.propDecorators = {
|
2344
|
-
class: [{ type: HostBinding, args: ['class.daff-accordion-item',] }],
|
2345
|
-
initiallyActive: [{ type: Input }]
|
2346
|
-
};
|
2347
|
-
|
2348
|
-
/**
|
2349
|
-
* An _elementRef and an instance of renderer2 are needed for the link set mixins
|
2350
|
-
*/
|
2351
|
-
class DaffAccordionBase {
|
2352
|
-
constructor(_elementRef, _renderer) {
|
2353
|
-
this._elementRef = _elementRef;
|
2354
|
-
this._renderer = _renderer;
|
2355
|
-
}
|
2356
|
-
}
|
2357
|
-
const _daffAccordionBase = daffArticleEncapsulatedMixin((DaffAccordionBase));
|
2358
|
-
class DaffAccordionComponent extends _daffAccordionBase {
|
2359
|
-
constructor(elementRef, renderer) {
|
2360
|
-
super(elementRef, renderer);
|
2361
|
-
this.elementRef = elementRef;
|
2362
|
-
this.renderer = renderer;
|
2363
|
-
}
|
2364
|
-
}
|
2365
|
-
DaffAccordionComponent.decorators = [
|
2366
|
-
{ type: Component, args: [{
|
2367
|
-
selector: 'daff-accordion',
|
2368
|
-
template: "<ng-content></ng-content>",
|
2369
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
2370
|
-
styles: [":host{display:block;width:100%}"]
|
2371
|
-
},] }
|
2372
|
-
];
|
2373
|
-
/** @nocollapse */
|
2374
|
-
DaffAccordionComponent.ctorParameters = () => [
|
2375
|
-
{ type: ElementRef },
|
2376
|
-
{ type: Renderer2 }
|
2377
|
-
];
|
2378
|
-
|
2379
|
-
class DaffNavAccordionItemComponent {
|
2380
|
-
constructor(accordion, navAccordionItemParent) {
|
2381
|
-
this.accordion = accordion;
|
2382
|
-
this.navAccordionItemParent = navAccordionItemParent;
|
2383
|
-
/**
|
2384
|
-
* @docs-private
|
2385
|
-
*/
|
2386
|
-
this.faChevronDown = faChevronDown;
|
2387
|
-
/**
|
2388
|
-
* @docs-private
|
2389
|
-
*/
|
2390
|
-
this.faChevronUp = faChevronUp;
|
2391
|
-
/**
|
2392
|
-
* @docs-private
|
2393
|
-
*/
|
2394
|
-
this._open = false;
|
2395
|
-
/**
|
2396
|
-
* @docs-private
|
2397
|
-
*/
|
2398
|
-
this._level = 0;
|
2399
|
-
}
|
2400
|
-
/**
|
2401
|
-
* @docs-private
|
2402
|
-
*/
|
2403
|
-
get classes() {
|
2404
|
-
return [
|
2405
|
-
'daff-nav-accordion-item',
|
2406
|
-
'daff-nav-accordion-item--level-' + this._level,
|
2407
|
-
];
|
2408
|
-
}
|
2409
|
-
/**
|
2410
|
-
* @docs-private
|
2411
|
-
*/
|
2412
|
-
ngOnInit() {
|
2413
|
-
if (this.navAccordionItemParent && this.accordion === this.navAccordionItemParent.accordion) {
|
2414
|
-
this._level = this.navAccordionItemParent._level + 1;
|
2415
|
-
}
|
2416
|
-
this._open = this.initiallyActive ? this.initiallyActive : this._open;
|
2417
|
-
this._animationState = getAnimationState(this._open);
|
2418
|
-
}
|
2419
|
-
toggleActive() {
|
2420
|
-
this._open = !this._open;
|
2421
|
-
this._animationState = getAnimationState(this._open);
|
2422
|
-
}
|
2423
|
-
}
|
2424
|
-
DaffNavAccordionItemComponent.decorators = [
|
2425
|
-
{ type: Component, args: [{
|
2426
|
-
selector: 'daff-nav-accordion-item',
|
2427
|
-
template: "<div class=\"daff-nav-accordion-item__header\" (click)=\"toggleActive()\">\n <ng-content select=\"[daffAccordionItemTitle]\"></ng-content>\n <span [hidden]=\"_open\" daffSuffix *ngIf=\"_navAccordionItemChild.toArray().length\">\n <fa-icon [icon]=\"faChevronDown\"></fa-icon>\n </span>\n <span [hidden]=\"!_open\" daffSuffix *ngIf=\"_navAccordionItemChild.toArray().length\">\n <fa-icon [icon]=\"faChevronUp\"></fa-icon>\n </span>\n</div>\n<div [@openAccordion]=\"_animationState\">\n <ng-content></ng-content>\n</div>\n",
|
2428
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
2429
|
-
animations: [
|
2430
|
-
daffAccordionAnimations.openAccordion,
|
2431
|
-
],
|
2432
|
-
styles: [":host(.daff-nav-accordion-item--level-1) .daff-nav-accordion-item__header{padding-left:15px}:host(.daff-nav-accordion-item--level-2) .daff-nav-accordion-item__header{padding-left:30px}:host(.daff-nav-accordion-item--level-3) .daff-nav-accordion-item__header{padding-left:45px}:host{display:block;padding-top:6px}.daff-nav-accordion-item__header{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;align-items:center;justify-content:space-between;width:100%;padding-bottom:6px}.daff-nav-accordion-item__header .daff-suffix{margin:0 10px}"]
|
2433
|
-
},] }
|
2434
|
-
];
|
2435
|
-
/** @nocollapse */
|
2436
|
-
DaffNavAccordionItemComponent.ctorParameters = () => [
|
2437
|
-
{ type: DaffAccordionComponent },
|
2438
|
-
{ type: DaffNavAccordionItemComponent, decorators: [{ type: SkipSelf }, { type: Optional }] }
|
2439
|
-
];
|
2440
|
-
DaffNavAccordionItemComponent.propDecorators = {
|
2441
|
-
classes: [{ type: HostBinding, args: ['class',] }],
|
2442
|
-
initiallyActive: [{ type: Input }],
|
2443
|
-
_navAccordionItemChild: [{ type: ContentChildren, args: [DaffNavAccordionItemComponent, { descendants: true },] }]
|
2444
|
-
};
|
2445
|
-
|
2446
|
-
class DaffAccordionModule {
|
2447
|
-
}
|
2448
|
-
DaffAccordionModule.decorators = [
|
2449
|
-
{ type: NgModule, args: [{
|
2450
|
-
imports: [
|
2451
|
-
CommonModule,
|
2452
|
-
FontAwesomeModule,
|
2453
|
-
DaffPrefixSuffixModule,
|
2454
|
-
],
|
2455
|
-
declarations: [
|
2456
|
-
DaffAccordionComponent,
|
2457
|
-
DaffAccordionItemComponent,
|
2458
|
-
DaffNavAccordionItemComponent,
|
2459
|
-
DaffAccordionItemTitleDirective,
|
2460
|
-
DaffAccordionItemContentDirective,
|
2461
|
-
],
|
2462
|
-
exports: [
|
2463
|
-
DaffAccordionComponent,
|
2464
|
-
DaffAccordionItemComponent,
|
2465
|
-
DaffNavAccordionItemComponent,
|
2466
|
-
DaffAccordionItemTitleDirective,
|
2467
|
-
DaffAccordionItemContentDirective,
|
2468
|
-
],
|
2469
|
-
},] }
|
2470
|
-
];
|
2471
|
-
|
2472
|
-
/**
|
2473
|
-
* A component for creating articles within your page.
|
2474
|
-
*/
|
2475
|
-
class DaffArticleComponent {
|
2476
|
-
constructor() {
|
2477
|
-
/**
|
2478
|
-
* @docs-private
|
2479
|
-
*/
|
2480
|
-
this.class = true;
|
2481
|
-
/**
|
2482
|
-
* @docs-private
|
2483
|
-
*/
|
2484
|
-
this.role = 'article';
|
2485
|
-
}
|
2486
|
-
}
|
2487
|
-
DaffArticleComponent.decorators = [
|
2488
|
-
{ type: Component, args: [{
|
2489
|
-
selector: 'daff-article',
|
2490
|
-
template: '<ng-content></ng-content>',
|
2491
|
-
encapsulation: ViewEncapsulation.None,
|
2492
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
2493
|
-
styles: [".daff-article{display:block}.daff-article a:not(.daff-ae *,.daff-ae){font-weight:600;text-decoration:none}.daff-article a:not(.daff-ae *,.daff-ae):hover{text-decoration:underline}.daff-article h1:not(.daff-ae *,.daff-ae),.daff-article h2:not(.daff-ae *,.daff-ae),.daff-article h3:not(.daff-ae *,.daff-ae),.daff-article h4:not(.daff-ae *,.daff-ae),.daff-article h5:not(.daff-ae *,.daff-ae),.daff-article h6:not(.daff-ae *,.daff-ae){margin-bottom:.5rem}.daff-article h2:not(.daff-ae *,.daff-ae),.daff-article h3:not(.daff-ae *,.daff-ae),.daff-article h4:not(.daff-ae *,.daff-ae),.daff-article h5:not(.daff-ae *,.daff-ae),.daff-article h6:not(.daff-ae *,.daff-ae){margin-top:2rem}.daff-article h1:not(.daff-ae *,.daff-ae){font-weight:700;font-size:2rem;line-height:2.25rem}@media (min-width:768px){.daff-article h1:not(.daff-ae *,.daff-ae){font-size:3rem;line-height:3.5rem}}.daff-article h2:not(.daff-ae *,.daff-ae){font-size:2rem;line-height:2.5rem}.daff-article h3:not(.daff-ae *,.daff-ae){font-size:1.5rem;line-height:2rem}.daff-article h4:not(.daff-ae *,.daff-ae){font-size:1.25rem;line-height:1.5rem}.daff-article h5:not(.daff-ae *,.daff-ae){font-size:1.125rem;line-height:1.5rem}.daff-article h6:not(.daff-ae *,.daff-ae){font-size:1rem;line-height:1.5rem}.daff-article p:not(.daff-ae *,.daff-ae){margin:0 0 1rem}.daff-article strong{font-weight:700}.daff-article pre{display:block;border-radius:4px;font-size:.875rem;line-height:1.5rem;margin:0;padding:1.5rem;overflow:auto;white-space:pre-wrap}.daff-article pre code{display:block;padding:0}.daff-article code{display:inline-block;border-radius:4px;font-size:.875rem;line-height:1rem;padding:.25rem}.daff-article__title{font-weight:700;font-size:2rem;line-height:2.25rem}@media (min-width:768px){.daff-article__title{font-size:3rem;line-height:3.5rem}}.daff-article__lead{font-size:1.25rem;line-height:1.75rem;font-weight:400;margin:0}.daff-article__lead code{font-size:1.25rem;line-height:1.5rem;font-weight:400}.daff-article__meta{font-size:.875rem}.daff-article hr{border:0;height:1px;margin:2rem 0}.daff-article blockquote{border-radius:4px;margin:0;padding:1rem 1.5rem}.daff-article blockquote cite{font-size:.875rem;font-weight:400;line-height:1.25rem;display:block;margin-top:1rem}.daff-article table{display:block;border-collapse:collapse;margin:1.5rem 0;overflow:auto;width:100%}.daff-article table th{font-weight:600;outline:0;padding:1rem;text-align:left;vertical-align:bottom;box-sizing:border-box}.daff-article table td{padding:.5rem 1rem;vertical-align:top;box-sizing:border-box}"]
|
2494
|
-
},] }
|
2495
|
-
];
|
2496
|
-
DaffArticleComponent.propDecorators = {
|
2497
|
-
class: [{ type: HostBinding, args: ['class.daff-article',] }],
|
2498
|
-
role: [{ type: HostBinding, args: ['attr.role',] }]
|
2499
|
-
};
|
2500
|
-
|
2501
|
-
class DaffArticleLeadDirective {
|
2502
|
-
constructor() {
|
2503
|
-
/**
|
2504
|
-
* @docs-private
|
2505
|
-
*/
|
2506
|
-
this.class = true;
|
2507
|
-
}
|
2508
|
-
}
|
2509
|
-
DaffArticleLeadDirective.decorators = [
|
2510
|
-
{ type: Directive, args: [{
|
2511
|
-
selector: '[daffArticleLead]',
|
2512
|
-
},] }
|
2513
|
-
];
|
2514
|
-
DaffArticleLeadDirective.propDecorators = {
|
2515
|
-
class: [{ type: HostBinding, args: ['class.daff-article__lead',] }]
|
2516
|
-
};
|
2517
|
-
|
2518
|
-
class DaffArticleMetaDirective {
|
2519
|
-
constructor() {
|
2520
|
-
/**
|
2521
|
-
* @docs-private
|
2522
|
-
*/
|
2523
|
-
this.class = true;
|
2524
|
-
}
|
2525
|
-
}
|
2526
|
-
DaffArticleMetaDirective.decorators = [
|
2527
|
-
{ type: Directive, args: [{
|
2528
|
-
selector: '[daffArticleMeta]',
|
2529
|
-
},] }
|
2530
|
-
];
|
2531
|
-
DaffArticleMetaDirective.propDecorators = {
|
2532
|
-
class: [{ type: HostBinding, args: ['class.daff-article__meta',] }]
|
2533
|
-
};
|
2534
|
-
|
2535
|
-
class DaffArticleTitleDirective {
|
2536
|
-
constructor() {
|
2537
|
-
/**
|
2538
|
-
* @docs-private
|
2539
|
-
*/
|
2540
|
-
this.class = true;
|
2541
|
-
}
|
2542
|
-
}
|
2543
|
-
DaffArticleTitleDirective.decorators = [
|
2544
|
-
{ type: Directive, args: [{
|
2545
|
-
selector: '[daffArticleTitle]',
|
2546
|
-
},] }
|
2547
|
-
];
|
2548
|
-
DaffArticleTitleDirective.propDecorators = {
|
2549
|
-
class: [{ type: HostBinding, args: ['class.daff-article__title',] }]
|
2550
|
-
};
|
2551
|
-
|
2552
|
-
class DaffArticleModule {
|
2553
|
-
}
|
2554
|
-
DaffArticleModule.decorators = [
|
2555
|
-
{ type: NgModule, args: [{
|
2556
|
-
imports: [
|
2557
|
-
CommonModule,
|
2558
|
-
],
|
2559
|
-
declarations: [
|
2560
|
-
DaffArticleComponent,
|
2561
|
-
DaffArticleTitleDirective,
|
2562
|
-
DaffArticleLeadDirective,
|
2563
|
-
DaffArticleMetaDirective,
|
2564
|
-
],
|
2565
|
-
exports: [
|
2566
|
-
DaffArticleComponent,
|
2567
|
-
DaffArticleTitleDirective,
|
2568
|
-
DaffArticleLeadDirective,
|
2569
|
-
DaffArticleMetaDirective,
|
2570
|
-
],
|
2571
|
-
},] }
|
2572
|
-
];
|
2573
|
-
|
2574
|
-
const animationDuration = '350ms';
|
2575
|
-
const backdropTransitionOut = 'cubic-bezier(0.4, 0.0, 1, 1)';
|
2576
|
-
const backdropTransitionIn = 'cubic-bezier(0.0, 0.0, 0.2, 1)';
|
2577
|
-
const daffBackdropAnimations = {
|
2578
|
-
fadeBackdrop: trigger('fadeBackdrop', [
|
2579
|
-
transition(':enter', [
|
2580
|
-
style({ opacity: 0 }),
|
2581
|
-
animate(animationDuration + ' ' + backdropTransitionIn, style({ opacity: 1 })),
|
2582
|
-
]),
|
2583
|
-
transition(':leave', [
|
2584
|
-
animate(animationDuration + ' ' + backdropTransitionOut, style({ opacity: 0 })),
|
2585
|
-
]),
|
2586
|
-
]),
|
2587
|
-
};
|
2588
|
-
|
2589
|
-
class DaffBackdropComponent {
|
2590
|
-
constructor() {
|
2591
|
-
/**
|
2592
|
-
* Determines whether or not the backdrop is transparent.
|
2593
|
-
*/
|
2594
|
-
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
2595
|
-
this.transparent = false;
|
2596
|
-
/**
|
2597
|
-
* Boolean property that determines whether or not the
|
2598
|
-
* backdrop should fill up its containing window.
|
2599
|
-
*/
|
2600
|
-
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
2601
|
-
this.fullscreen = false;
|
2602
|
-
/**
|
2603
|
-
* Output event triggered when the backdrop is clicked.
|
2604
|
-
*/
|
2605
|
-
this.backdropClicked = new EventEmitter();
|
2606
|
-
}
|
2607
|
-
/**
|
2608
|
-
* Animation hook for that controls the backdrops
|
2609
|
-
* entrance and fade animations.
|
2610
|
-
*/
|
2611
|
-
onBackdropClicked() {
|
2612
|
-
this.backdropClicked.emit();
|
2613
|
-
}
|
2614
|
-
}
|
2615
|
-
DaffBackdropComponent.decorators = [
|
2616
|
-
{ type: Component, args: [{
|
2617
|
-
selector: 'daff-backdrop',
|
2618
|
-
template: "<div class=\"daff-backdrop\" [class.daff-backdrop--fullscreen]=\"fullscreen\" [class.daff-backdrop--transparent]=\"transparent\"></div>\n",
|
2619
|
-
animations: [
|
2620
|
-
daffBackdropAnimations.fadeBackdrop,
|
2621
|
-
],
|
2622
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
2623
|
-
styles: [":host{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;-webkit-tap-highlight-color:rgba(0,0,0,0)}.daff-backdrop{background:rgba(0,0,0,.3);height:100%;width:100%}.daff-backdrop--transparent{background:none}.daff-backdrop:active,.daff-backdrop:focus,.daff-backdrop:visited{outline:0}.daff-backdrop--fullscreen{position:absolute}"]
|
2624
|
-
},] }
|
2625
|
-
];
|
2626
|
-
DaffBackdropComponent.propDecorators = {
|
2627
|
-
transparent: [{ type: Input }],
|
2628
|
-
fullscreen: [{ type: Input }],
|
2629
|
-
backdropClicked: [{ type: Output }],
|
2630
|
-
onBackdropClicked: [{ type: HostBinding, args: ['@fadeBackdrop',] }, { type: HostListener, args: ['click',] }]
|
2631
|
-
};
|
2632
|
-
|
2633
|
-
class DaffBackdropModule {
|
2634
|
-
}
|
2635
|
-
DaffBackdropModule.decorators = [
|
2636
|
-
{ type: NgModule, args: [{
|
2637
|
-
imports: [
|
2638
|
-
CommonModule,
|
2639
|
-
],
|
2640
|
-
declarations: [
|
2641
|
-
DaffBackdropComponent,
|
2642
|
-
],
|
2643
|
-
exports: [
|
2644
|
-
DaffBackdropComponent,
|
2645
|
-
],
|
2646
|
-
entryComponents: [
|
2647
|
-
DaffBackdropComponent,
|
2648
|
-
],
|
2649
|
-
},] }
|
2650
|
-
];
|
2651
|
-
|
2652
|
-
class DaffButtonSetComponent {
|
2653
|
-
constructor() {
|
2654
|
-
/**
|
2655
|
-
* @docs-private
|
2656
|
-
*/
|
2657
|
-
this.class = true;
|
2658
|
-
}
|
2659
|
-
}
|
2660
|
-
DaffButtonSetComponent.decorators = [
|
2661
|
-
{ type: Component, args: [{
|
2662
|
-
selector: 'daff-button-set',
|
2663
|
-
template: '<ng-content></ng-content>',
|
2664
|
-
encapsulation: ViewEncapsulation.None,
|
2665
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
2666
|
-
styles: [".daff-button-set{display:flex;flex-direction:column;flex-wrap:wrap}@media (min-width:480px){.daff-button-set{flex-direction:row}}.daff-button-set>*{margin:0 0 5px}.daff-button-set>:last-child{margin:0}@media (min-width:480px){.daff-button-set>*{margin:0 5px 0 0}.daff-button-set>:last-child{margin:0}}"]
|
2667
|
-
},] }
|
2668
|
-
];
|
2669
|
-
DaffButtonSetComponent.propDecorators = {
|
2670
|
-
class: [{ type: HostBinding, args: ['class.daff-button-set',] }]
|
2671
|
-
};
|
2672
|
-
|
2673
|
-
class DaffButtonSetModule {
|
2674
|
-
}
|
2675
|
-
DaffButtonSetModule.decorators = [
|
2676
|
-
{ type: NgModule, args: [{
|
2677
|
-
declarations: [
|
2678
|
-
DaffButtonSetComponent,
|
2679
|
-
],
|
2680
|
-
exports: [
|
2681
|
-
DaffButtonSetComponent,
|
2682
|
-
],
|
2683
|
-
},] }
|
2684
|
-
];
|
2685
|
-
|
2686
|
-
/**
|
2687
|
-
* @deprecated See {@link DaffMediaGalleryComponent}
|
2688
|
-
*/
|
2689
|
-
class DaffImageGalleryComponent {
|
2690
|
-
}
|
2691
|
-
DaffImageGalleryComponent.decorators = [
|
2692
|
-
{ type: Component, args: [{
|
2693
|
-
selector: 'daff-image-gallery',
|
2694
|
-
template: "<div class=\"daff-image-gallery\">\n <div class=\"daff-image-gallery__active-image\">\n <ng-content select=\"[daff-active-image]\"></ng-content>\n </div>\n\n <daff-image-list class=\"daff-image-gallery__image-list\">\n <ng-content select=\"daff-gallery-image\"></ng-content>\n </daff-image-list>\n</div>\n",
|
2695
|
-
encapsulation: ViewEncapsulation.None,
|
2696
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
2697
|
-
styles: [".daff-image-gallery{display:grid;flex-direction:column;grid-template-areas:\"active-image\" \"image-list\";max-height:100%}@media (min-width:1024px){.daff-image-gallery{grid-template-areas:\"image-list active-image\";max-height:-webkit-min-content;max-height:-moz-min-content;max-height:min-content}}.daff-image-gallery__active-image{grid-area:active-image}.daff-image-gallery__active-image img{display:block;max-width:100%}.daff-image-gallery__image-list{grid-area:image-list;margin:5px 0 0;max-height:100%}@media (min-width:1024px){.daff-image-gallery__image-list{margin:0 25px 0 0;max-height:-webkit-fill-available}}.daff-image-gallery__daff-gallery-image img{display:block;opacity:.6;width:90px}.daff-image-gallery__daff-gallery-image--selected img{opacity:1}"]
|
2698
|
-
},] }
|
2699
|
-
];
|
2700
|
-
|
2701
|
-
/**
|
2702
|
-
* @deprecated See {@link DaffThumbnailDirective}
|
2703
|
-
*/
|
2704
|
-
class DaffGalleryImageComponent {
|
2705
|
-
constructor() {
|
2706
|
-
this.class = true;
|
2707
|
-
}
|
2708
|
-
}
|
2709
|
-
DaffGalleryImageComponent.decorators = [
|
2710
|
-
{ type: Component, args: [{
|
2711
|
-
selector: 'daff-gallery-image',
|
2712
|
-
template: "<div class=\"gallery-image__wrapper\">\n <ng-content></ng-content>\n</div>",
|
2713
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
2714
|
-
},] }
|
2715
|
-
];
|
2716
|
-
DaffGalleryImageComponent.propDecorators = {
|
2717
|
-
selected: [{ type: HostBinding, args: ['class.daff-image-gallery__daff-gallery-image--selected',] }, { type: Input }],
|
2718
|
-
class: [{ type: HostBinding, args: ['class.daff-image-gallery__daff-gallery-image',] }]
|
2719
|
-
};
|
2720
|
-
|
2721
|
-
class DaffImageListComponent {
|
2722
|
-
constructor() {
|
2723
|
-
/**
|
2724
|
-
* @docs-private
|
2725
|
-
*/
|
2726
|
-
this.class = true;
|
2727
|
-
}
|
2728
|
-
}
|
2729
|
-
DaffImageListComponent.decorators = [
|
2730
|
-
{ type: Component, args: [{
|
2731
|
-
selector: 'daff-image-list',
|
2732
|
-
template: '<ng-content></ng-content>',
|
2733
|
-
encapsulation: ViewEncapsulation.None,
|
2734
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
2735
|
-
styles: [".daff-image-list{overflow:scroll;white-space:nowrap}.daff-image-list>*{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;margin:0 5px 0 0}@media (min-width:1024px){.daff-image-list>*{display:block;margin:0 0 5px}}.daff-image-list>:last-child{margin:0}::-webkit-scrollbar{height:2px;width:2px}::-webkit-scrollbar-thumb{box-shadow:inset 0 0 3px #b6b6b6;-webkit-box-shadow:inset 0 0 3px #b6b6b6}"]
|
2736
|
-
},] }
|
2737
|
-
];
|
2738
|
-
DaffImageListComponent.propDecorators = {
|
2739
|
-
class: [{ type: HostBinding, args: ['class.daff-image-list',] }]
|
2740
|
-
};
|
2741
|
-
|
2742
|
-
class DaffImageListModule {
|
2743
|
-
}
|
2744
|
-
DaffImageListModule.decorators = [
|
2745
|
-
{ type: NgModule, args: [{
|
2746
|
-
imports: [
|
2747
|
-
CommonModule,
|
2748
|
-
],
|
2749
|
-
declarations: [
|
2750
|
-
DaffImageListComponent,
|
2751
|
-
],
|
2752
|
-
exports: [
|
2753
|
-
DaffImageListComponent,
|
2754
|
-
],
|
2755
|
-
},] }
|
2756
|
-
];
|
2757
|
-
|
2758
|
-
class DaffImageGalleryModule {
|
2759
|
-
}
|
2760
|
-
DaffImageGalleryModule.decorators = [
|
2761
|
-
{ type: NgModule, args: [{
|
2762
|
-
imports: [
|
2763
|
-
CommonModule,
|
2764
|
-
DaffImageListModule,
|
2765
|
-
],
|
2766
|
-
declarations: [
|
2767
|
-
DaffImageGalleryComponent,
|
2768
|
-
DaffGalleryImageComponent,
|
2769
|
-
],
|
2770
|
-
exports: [
|
2771
|
-
DaffImageGalleryComponent,
|
2772
|
-
DaffGalleryImageComponent,
|
2773
|
-
],
|
2774
|
-
},] }
|
2775
|
-
];
|
2776
|
-
|
2777
|
-
/**
|
2778
|
-
* An _elementRef and an instance of renderer2 are needed for the link set mixins
|
2779
|
-
*/
|
2780
|
-
class DaffLinkSetBase {
|
2781
|
-
constructor(_elementRef, _renderer) {
|
2782
|
-
this._elementRef = _elementRef;
|
2783
|
-
this._renderer = _renderer;
|
2784
|
-
}
|
2785
|
-
}
|
2786
|
-
const _daffLinkSetBase = daffArticleEncapsulatedMixin((DaffLinkSetBase));
|
2787
|
-
/**
|
2788
|
-
* DaffLinkSetComponent is a component for displaying a two or more links.
|
2789
|
-
*/
|
2790
|
-
class DaffLinkSetComponent extends _daffLinkSetBase {
|
2791
|
-
constructor(elementRef, renderer) {
|
2792
|
-
super(elementRef, renderer);
|
2793
|
-
this.elementRef = elementRef;
|
2794
|
-
this.renderer = renderer;
|
2795
|
-
/**
|
2796
|
-
* @docs-private
|
2797
|
-
*/
|
2798
|
-
this.class = true;
|
2799
|
-
}
|
2800
|
-
}
|
2801
|
-
DaffLinkSetComponent.decorators = [
|
2802
|
-
{ type: Component, args: [{
|
2803
|
-
selector: 'daff-link-set',
|
2804
|
-
template: '<ng-content></ng-content>',
|
2805
|
-
encapsulation: ViewEncapsulation.None,
|
2806
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
2807
|
-
styles: [".daff-link-set{display:block;margin:0;padding:0}.daff-link-set__heading{font-weight:700;display:block;font-size:1rem;line-height:1em;margin-bottom:15px;text-transform:uppercase}.daff-link-set__subheading{display:block;font-size:1rem;line-height:1.5em}.daff-link-set__item{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:currentColor;display:block;font-size:1em;line-height:1.5em;text-decoration:none;transition:color .15s ease}.daff-link-set__item:hover{text-decoration:underline}.daff-link-set__item[disabled]{cursor:not-allowed}.daff-link-set .daff-link-set{margin-left:10px}"]
|
2808
|
-
},] }
|
2809
|
-
];
|
2810
|
-
/** @nocollapse */
|
2811
|
-
DaffLinkSetComponent.ctorParameters = () => [
|
2812
|
-
{ type: ElementRef },
|
2813
|
-
{ type: Renderer2 }
|
2814
|
-
];
|
2815
|
-
DaffLinkSetComponent.propDecorators = {
|
2816
|
-
class: [{ type: HostBinding, args: ['class.daff-link-set',] }]
|
2817
|
-
};
|
2818
|
-
|
2819
|
-
/**
|
2820
|
-
* A directive for adding a heading to a daff-link-set.
|
2821
|
-
*/
|
2822
|
-
class DaffLinkSetHeadingDirective {
|
2823
|
-
constructor() {
|
2824
|
-
/**
|
2825
|
-
* @docs-private
|
2826
|
-
*/
|
2827
|
-
this.class = true;
|
2828
|
-
}
|
2829
|
-
}
|
2830
|
-
DaffLinkSetHeadingDirective.decorators = [
|
2831
|
-
{ type: Directive, args: [{
|
2832
|
-
selector: '[daffLinkSetHeading]',
|
2833
|
-
},] }
|
2834
|
-
];
|
2835
|
-
DaffLinkSetHeadingDirective.propDecorators = {
|
2836
|
-
class: [{ type: HostBinding, args: ['class.daff-link-set__heading',] }]
|
2837
|
-
};
|
2838
|
-
|
2839
|
-
class DaffLinkSetItemComponent {
|
2840
|
-
constructor() {
|
2841
|
-
/**
|
2842
|
-
* @docs-private
|
2843
|
-
*/
|
2844
|
-
this.class = true;
|
2845
|
-
}
|
2846
|
-
}
|
2847
|
-
DaffLinkSetItemComponent.decorators = [
|
2848
|
-
{ type: Component, args: [{
|
2849
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
2850
|
-
selector: 'a[daff-link-set-item]',
|
2851
|
-
template: '<ng-content></ng-content>',
|
2852
|
-
encapsulation: ViewEncapsulation.None,
|
2853
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
2854
|
-
},] }
|
2855
|
-
];
|
2856
|
-
DaffLinkSetItemComponent.propDecorators = {
|
2857
|
-
class: [{ type: HostBinding, args: ['class.daff-link-set__item',] }]
|
2858
|
-
};
|
2859
|
-
|
2860
|
-
/**
|
2861
|
-
* A directive for adding a subheading to a daff-link-set.
|
2862
|
-
*/
|
2863
|
-
class DaffLinkSetSubheadingDirective {
|
2864
|
-
constructor() {
|
2865
|
-
/**
|
2866
|
-
* @docs-private
|
2867
|
-
*/
|
2868
|
-
this.class = true;
|
2869
|
-
}
|
2870
|
-
}
|
2871
|
-
DaffLinkSetSubheadingDirective.decorators = [
|
2872
|
-
{ type: Directive, args: [{
|
2873
|
-
selector: '[daffLinkSetSubheading]',
|
2874
|
-
},] }
|
2875
|
-
];
|
2876
|
-
DaffLinkSetSubheadingDirective.propDecorators = {
|
2877
|
-
class: [{ type: HostBinding, args: ['class.daff-link-set__subheading',] }]
|
2878
|
-
};
|
2879
|
-
|
2880
|
-
class DaffLinkSetModule {
|
2881
|
-
}
|
2882
|
-
DaffLinkSetModule.decorators = [
|
2883
|
-
{ type: NgModule, args: [{
|
2884
|
-
imports: [
|
2885
|
-
CommonModule,
|
2886
|
-
],
|
2887
|
-
exports: [
|
2888
|
-
DaffLinkSetComponent,
|
2889
|
-
DaffLinkSetHeadingDirective,
|
2890
|
-
DaffLinkSetSubheadingDirective,
|
2891
|
-
DaffLinkSetItemComponent,
|
2892
|
-
],
|
2893
|
-
declarations: [
|
2894
|
-
DaffLinkSetComponent,
|
2895
|
-
DaffLinkSetHeadingDirective,
|
2896
|
-
DaffLinkSetSubheadingDirective,
|
2897
|
-
DaffLinkSetItemComponent,
|
2898
|
-
],
|
2899
|
-
},] }
|
2900
|
-
];
|
2901
|
-
|
2902
|
-
class DaffListItemComponent {
|
2903
|
-
constructor(elementRef) {
|
2904
|
-
this.elementRef = elementRef;
|
2905
|
-
/**
|
2906
|
-
* @docs-private
|
2907
|
-
*/
|
2908
|
-
this.class = true;
|
2909
|
-
}
|
2910
|
-
/**
|
2911
|
-
* Sets the role for a regular `<daff-list-item>` to listitem.
|
2912
|
-
*
|
2913
|
-
* @docs-private
|
2914
|
-
*/
|
2915
|
-
get role() {
|
2916
|
-
return this._isAnchor() ? null : 'listitem';
|
2917
|
-
}
|
2918
|
-
;
|
2919
|
-
_getHostElement() {
|
2920
|
-
return this.elementRef.nativeElement;
|
2921
|
-
}
|
2922
|
-
/** Gets whether a list item has one of the given attributes. */
|
2923
|
-
_isAnchor() {
|
2924
|
-
return this.elementRef.nativeElement.localName === 'a';
|
2925
|
-
}
|
2926
|
-
}
|
2927
|
-
DaffListItemComponent.decorators = [
|
2928
|
-
{ type: Component, args: [{
|
2929
|
-
selector: 'daff-list-item' + ',' +
|
2930
|
-
'a[daff-list-item]',
|
2931
|
-
template: "<ng-container *ngIf=\"_prefix\">\n <ng-content select=\"[daffPrefix]\"></ng-content>\n</ng-container>\n<div class=\"daff-list-item__content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"_suffix\">\n <ng-content select=\"[daffSuffix]\"></ng-content>\n</ng-container>",
|
2932
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
2933
|
-
},] }
|
2934
|
-
];
|
2935
|
-
/** @nocollapse */
|
2936
|
-
DaffListItemComponent.ctorParameters = () => [
|
2937
|
-
{ type: ElementRef }
|
2938
|
-
];
|
2939
|
-
DaffListItemComponent.propDecorators = {
|
2940
|
-
class: [{ type: HostBinding, args: ['class.daff-list-item',] }],
|
2941
|
-
_prefix: [{ type: ContentChild, args: [DaffPrefixDirective,] }],
|
2942
|
-
_suffix: [{ type: ContentChild, args: [DaffSuffixDirective,] }],
|
2943
|
-
role: [{ type: HostBinding, args: ['attr.role',] }]
|
2944
|
-
};
|
2945
|
-
|
2946
|
-
/**
|
2947
|
-
* @deprecated
|
2948
|
-
*/
|
2949
|
-
class DaffListSubheaderDirective {
|
2950
|
-
constructor() {
|
2951
|
-
/**
|
2952
|
-
* @docs-private
|
2953
|
-
*/
|
2954
|
-
this.class = true;
|
2955
|
-
}
|
2956
|
-
}
|
2957
|
-
DaffListSubheaderDirective.decorators = [
|
2958
|
-
{ type: Directive, args: [{
|
2959
|
-
selector: '[daffListSubheader]',
|
2960
|
-
},] }
|
2961
|
-
];
|
2962
|
-
DaffListSubheaderDirective.propDecorators = {
|
2963
|
-
class: [{ type: HostBinding, args: ['class.daff-list__subheader',] }]
|
2964
|
-
};
|
2965
|
-
|
2966
|
-
var DaffListModeEnum;
|
2967
|
-
(function (DaffListModeEnum) {
|
2968
|
-
DaffListModeEnum["Multiline"] = "multi-line";
|
2969
|
-
DaffListModeEnum["Link"] = "link";
|
2970
|
-
DaffListModeEnum["Navigation"] = "navigation";
|
2971
|
-
})(DaffListModeEnum || (DaffListModeEnum = {}));
|
2972
|
-
var DaffListTypeEnum;
|
2973
|
-
(function (DaffListTypeEnum) {
|
2974
|
-
DaffListTypeEnum["Default"] = "daff-list";
|
2975
|
-
DaffListTypeEnum["Nav"] = "daff-nav-list";
|
2976
|
-
})(DaffListTypeEnum || (DaffListTypeEnum = {}));
|
2977
|
-
/**
|
2978
|
-
* An _elementRef and an instance of renderer2 are needed for the list mixins
|
2979
|
-
*/
|
2980
|
-
class DaffListBase {
|
2981
|
-
constructor(_elementRef, _renderer) {
|
2982
|
-
this._elementRef = _elementRef;
|
2983
|
-
this._renderer = _renderer;
|
2984
|
-
}
|
2985
|
-
}
|
2986
|
-
const _daffListBase = daffArticleEncapsulatedMixin((DaffListBase));
|
2987
|
-
class DaffListComponent extends _daffListBase {
|
2988
|
-
constructor(elementRef, renderer) {
|
2989
|
-
super(elementRef, renderer);
|
2990
|
-
this.elementRef = elementRef;
|
2991
|
-
this.renderer = renderer;
|
2992
|
-
}
|
2993
|
-
/**
|
2994
|
-
* @docs-private
|
2995
|
-
*/
|
2996
|
-
get list() {
|
2997
|
-
return this.listType === DaffListTypeEnum.Default;
|
2998
|
-
}
|
2999
|
-
/**
|
3000
|
-
* @docs-private
|
3001
|
-
* @deprecated
|
3002
|
-
* */
|
3003
|
-
get multiline() {
|
3004
|
-
return this.mode === DaffListModeEnum.Multiline;
|
3005
|
-
}
|
3006
|
-
/**
|
3007
|
-
* @docs-private
|
3008
|
-
* @deprecated
|
3009
|
-
* */
|
3010
|
-
get link() {
|
3011
|
-
return this.mode === DaffListModeEnum.Link;
|
3012
|
-
}
|
3013
|
-
/**
|
3014
|
-
* @docs-private
|
3015
|
-
* @deprecated
|
3016
|
-
* */
|
3017
|
-
get navigation() {
|
3018
|
-
return this.mode === DaffListModeEnum.Navigation;
|
3019
|
-
}
|
3020
|
-
/**
|
3021
|
-
* @docs-private
|
3022
|
-
*/
|
3023
|
-
get listType() {
|
3024
|
-
return this._getHostElement().localName;
|
3025
|
-
}
|
3026
|
-
/**
|
3027
|
-
* @docs-private
|
3028
|
-
*/
|
3029
|
-
get nav() {
|
3030
|
-
return this.listType === DaffListTypeEnum.Nav;
|
3031
|
-
}
|
3032
|
-
/**
|
3033
|
-
* Sets the role for a `<daff-nav-list>` to navigation.
|
3034
|
-
*
|
3035
|
-
* @docs-private
|
3036
|
-
*/
|
3037
|
-
get role() {
|
3038
|
-
return this.listType === DaffListTypeEnum.Nav ? 'navigation' : 'list';
|
3039
|
-
}
|
3040
|
-
;
|
3041
|
-
_getHostElement() {
|
3042
|
-
return this.elementRef.nativeElement;
|
3043
|
-
}
|
3044
|
-
}
|
3045
|
-
DaffListComponent.decorators = [
|
3046
|
-
{ type: Component, args: [{
|
3047
|
-
selector: 'daff-list' + ',' +
|
3048
|
-
'daff-nav-list',
|
3049
|
-
template: '<ng-content></ng-content>',
|
3050
|
-
encapsulation: ViewEncapsulation.None,
|
3051
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
3052
|
-
styles: [".daff-list{display:block;margin:0;padding:0}.daff-list .daff-list-item{display:flex;padding:12px 16px}.daff-list .daff-list-item__content{flex-grow:1}.daff-list .daff-list-item__content :first-child{font-weight:700;font-size:1rem;line-height:1.5em;margin:0;padding:0}.daff-list .daff-list-item__content :nth-child(n+2){font-size:1rem;margin:0;padding:0}.daff-list .daff-list-item .daff-prefix,.daff-list .daff-list-item .daff-suffix{display:flex;align-items:center}.daff-list .daff-list-item .daff-prefix{margin-right:24px}.daff-list .daff-list-item .daff-suffix{margin-left:24px}.daff-list__subheader{font-weight:700;text-transform:uppercase;font-size:1rem;padding:0 0 25px}.daff-list--link a,.daff-list--navigation a{text-decoration:none}.daff-list--link a:hover,.daff-list--navigation a:hover{color:#474747}.daff-list--multi-line .daff-list-item{padding:15px 0}.daff-list--multi-line .daff-list-item:first-of-type{padding:0 0 15px}.daff-list--multi-line .daff-list-item:last-of-type{padding:15px 0 0}.daff-list--multi-line .daff-list-item__content :first-child{font-weight:700;font-size:1rem;line-height:1.5rem;margin:0 0 10px;padding:0}.daff-list--multi-line .daff-list-item__content :nth-child(n+2),.daff-nav-list{margin:0;padding:0}.daff-nav-list{display:block}.daff-nav-list .daff-list-item{display:flex;padding:12px 16px}.daff-nav-list .daff-list-item__content{flex-grow:1}.daff-nav-list .daff-list-item__content :first-child{font-weight:700;font-size:1rem;line-height:1.5em;margin:0;padding:0}.daff-nav-list .daff-list-item__content :nth-child(n+2){font-size:1rem;margin:0;padding:0}.daff-nav-list .daff-list-item .daff-prefix,.daff-nav-list .daff-list-item .daff-suffix{display:flex;align-items:center}.daff-nav-list .daff-list-item .daff-prefix{margin-right:24px}.daff-nav-list .daff-list-item .daff-suffix{margin-left:24px}.daff-nav-list .daff-list-item{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none;text-decoration:none}"]
|
3053
|
-
},] }
|
3054
|
-
];
|
3055
|
-
/** @nocollapse */
|
3056
|
-
DaffListComponent.ctorParameters = () => [
|
3057
|
-
{ type: ElementRef },
|
3058
|
-
{ type: Renderer2 }
|
3059
|
-
];
|
3060
|
-
DaffListComponent.propDecorators = {
|
3061
|
-
mode: [{ type: Input }],
|
3062
|
-
list: [{ type: HostBinding, args: ['class.daff-list',] }],
|
3063
|
-
multiline: [{ type: HostBinding, args: ['class.daff-list--multi-line',] }],
|
3064
|
-
link: [{ type: HostBinding, args: ['class.daff-list--link',] }],
|
3065
|
-
navigation: [{ type: HostBinding, args: ['class.daff-list--navigation',] }],
|
3066
|
-
nav: [{ type: HostBinding, args: ['class.daff-nav-list',] }],
|
3067
|
-
role: [{ type: HostBinding, args: ['attr.role',] }]
|
3068
|
-
};
|
3069
|
-
|
3070
|
-
class DaffListModule {
|
3071
|
-
}
|
3072
|
-
DaffListModule.decorators = [
|
3073
|
-
{ type: NgModule, args: [{
|
3074
|
-
imports: [
|
3075
|
-
CommonModule,
|
3076
|
-
DaffPrefixSuffixModule,
|
3077
|
-
],
|
3078
|
-
declarations: [
|
3079
|
-
DaffListComponent,
|
3080
|
-
DaffListSubheaderDirective,
|
3081
|
-
DaffListItemComponent,
|
3082
|
-
],
|
3083
|
-
exports: [
|
3084
|
-
DaffListComponent,
|
3085
|
-
DaffListSubheaderDirective,
|
3086
|
-
DaffListItemComponent,
|
3087
|
-
DaffPrefixSuffixModule,
|
3088
|
-
],
|
3089
|
-
},] }
|
3090
|
-
];
|
3091
|
-
|
3092
|
-
const daffFadeAnimations = {
|
3093
|
-
fade: trigger('fade', [
|
3094
|
-
state('open', style({ opacity: 1 })),
|
3095
|
-
state('closed', style({ opacity: 0 })),
|
3096
|
-
transition('open <=> closed', animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)')),
|
3097
|
-
]),
|
3098
|
-
};
|
3099
|
-
|
3100
|
-
const getAnimationState$1 = (open) => open ? 'open' : 'closed';
|
3101
|
-
|
3102
|
-
class DaffModalComponent {
|
3103
|
-
constructor() {
|
3104
|
-
/**
|
3105
|
-
* Dictates whether or not a modal is open or closed.
|
3106
|
-
*/
|
3107
|
-
this.open = false;
|
3108
|
-
/**
|
3109
|
-
* Event fired when the close animation is completed.
|
3110
|
-
*/
|
3111
|
-
this.animationCompleted = new EventEmitter();
|
3112
|
-
/**
|
3113
|
-
* Event fired when the close animation is completed.
|
3114
|
-
*/
|
3115
|
-
this.closedAnimationCompleted = new EventEmitter();
|
3116
|
-
/**
|
3117
|
-
* Event fired when the backdrop is clicked
|
3118
|
-
* This is often used to close the modal
|
3119
|
-
*/
|
3120
|
-
this.hide = new EventEmitter();
|
3121
|
-
/**
|
3122
|
-
* Hostbinding to set the default modal class on the host element
|
3123
|
-
*
|
3124
|
-
* @docs-private
|
3125
|
-
*/
|
3126
|
-
this.modalClass = true;
|
3127
|
-
}
|
3128
|
-
/**
|
3129
|
-
* Helper method to attach portable content to modal
|
3130
|
-
*/
|
3131
|
-
attachContent(portal) {
|
3132
|
-
this._portalOutlet.attachComponentPortal(portal);
|
3133
|
-
}
|
3134
|
-
/**
|
3135
|
-
* Animation hook that controls the entrance and exit animations
|
3136
|
-
* of the modal
|
3137
|
-
*/
|
3138
|
-
get fadeState() {
|
3139
|
-
return getAnimationState$1(this.open);
|
3140
|
-
}
|
3141
|
-
/**
|
3142
|
-
* Animation event that can used to hook into when
|
3143
|
-
* animations are fully completed. We use this in the DaffModalService
|
3144
|
-
* to determine when to actually remove the dynamically rendered element from the DOM
|
3145
|
-
* so that the animation does not clip as the element is removed.
|
3146
|
-
*/
|
3147
|
-
animationDone(e) {
|
3148
|
-
this.animationCompleted.emit(e);
|
3149
|
-
if (e.toState === 'closed') {
|
3150
|
-
this.closedAnimationCompleted.emit(e);
|
3151
|
-
}
|
3152
|
-
}
|
3153
|
-
}
|
3154
|
-
DaffModalComponent.decorators = [
|
3155
|
-
{ type: Component, args: [{
|
3156
|
-
selector: 'daff-modal',
|
3157
|
-
template: "<ng-template cdkPortalOutlet></ng-template>\n",
|
3158
|
-
animations: [daffFadeAnimations.fade],
|
3159
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
3160
|
-
styles: [":host{display:block;border-radius:4px;height:100%;max-width:80vw;overflow:hidden;padding:24px;z-index:3}@media (min-width:480px){:host{height:auto}}"]
|
3161
|
-
},] }
|
3162
|
-
];
|
3163
|
-
DaffModalComponent.propDecorators = {
|
3164
|
-
open: [{ type: Input }],
|
3165
|
-
_portalOutlet: [{ type: ViewChild, args: [CdkPortalOutlet, { static: true },] }],
|
3166
|
-
modalClass: [{ type: HostBinding, args: ['class.daff-modal',] }],
|
3167
|
-
fadeState: [{ type: HostBinding, args: ['@fade',] }],
|
3168
|
-
animationDone: [{ type: HostListener, args: ['@fade.done', ['$event'],] }]
|
3169
|
-
};
|
3170
|
-
|
3171
|
-
class DaffModalActionsComponent {
|
3172
|
-
}
|
3173
|
-
DaffModalActionsComponent.decorators = [
|
3174
|
-
{ type: Component, args: [{
|
3175
|
-
selector: 'daff-modal-actions',
|
3176
|
-
template: '<ng-content></ng-content>',
|
3177
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
3178
|
-
styles: [":host{display:block;padding-top:24px}"]
|
3179
|
-
},] }
|
3180
|
-
];
|
3181
|
-
|
3182
|
-
class DaffModalContentComponent {
|
3183
|
-
}
|
3184
|
-
DaffModalContentComponent.decorators = [
|
3185
|
-
{ type: Component, args: [{
|
3186
|
-
selector: 'daff-modal-content',
|
3187
|
-
template: '<ng-content></ng-content>',
|
3188
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
3189
|
-
styles: [":host{display:block;margin:0 -24px;max-height:60vh;overflow:auto;padding:0 24px}"]
|
3190
|
-
},] }
|
3191
|
-
];
|
3192
|
-
|
3193
|
-
class DaffModalHeaderComponent {
|
3194
|
-
constructor() {
|
3195
|
-
/**
|
3196
|
-
* @docs-private
|
3197
|
-
*/
|
3198
|
-
this.class = true;
|
3199
|
-
}
|
3200
|
-
}
|
3201
|
-
DaffModalHeaderComponent.decorators = [
|
3202
|
-
{ type: Component, args: [{
|
3203
|
-
selector: 'daff-modal-header',
|
3204
|
-
template: '<ng-content></ng-content>',
|
3205
|
-
encapsulation: ViewEncapsulation.None,
|
3206
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
3207
|
-
styles: [":host{display:block}.daff-modal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.daff-modal-header .daff-modal-title{font-weight:700;font-size:1.25rem;margin:0;padding:0}@media (min-width:480px){.daff-modal-header .daff-modal-title{font-size:1.5rem}}"]
|
3208
|
-
},] }
|
3209
|
-
];
|
3210
|
-
DaffModalHeaderComponent.propDecorators = {
|
3211
|
-
class: [{ type: HostBinding, args: ['class.daff-modal-header',] }]
|
3212
|
-
};
|
3213
|
-
|
3214
|
-
class DaffModalTitleDirective {
|
3215
|
-
constructor() {
|
3216
|
-
/**
|
3217
|
-
* @docs-private
|
3218
|
-
*/
|
3219
|
-
this.class = true;
|
3220
|
-
}
|
3221
|
-
}
|
3222
|
-
DaffModalTitleDirective.decorators = [
|
3223
|
-
{ type: Directive, args: [{
|
3224
|
-
selector: '[daffModalTitle]',
|
3225
|
-
},] }
|
3226
|
-
];
|
3227
|
-
DaffModalTitleDirective.propDecorators = {
|
3228
|
-
class: [{ type: HostBinding, args: ['class.daff-modal-title',] }]
|
3229
|
-
};
|
3230
|
-
|
3231
|
-
class DaffModalModule {
|
3232
|
-
}
|
3233
|
-
DaffModalModule.decorators = [
|
3234
|
-
{ type: NgModule, args: [{
|
3235
|
-
imports: [
|
3236
|
-
CommonModule,
|
3237
|
-
PortalModule,
|
3238
|
-
OverlayModule,
|
3239
|
-
],
|
3240
|
-
exports: [
|
3241
|
-
DaffModalHeaderComponent,
|
3242
|
-
DaffModalTitleDirective,
|
3243
|
-
DaffModalContentComponent,
|
3244
|
-
DaffModalActionsComponent,
|
3245
|
-
],
|
3246
|
-
declarations: [
|
3247
|
-
DaffModalComponent,
|
3248
|
-
DaffModalHeaderComponent,
|
3249
|
-
DaffModalTitleDirective,
|
3250
|
-
DaffModalContentComponent,
|
3251
|
-
DaffModalActionsComponent,
|
3252
|
-
],
|
3253
|
-
},] }
|
3254
|
-
];
|
3255
|
-
|
3256
|
-
class DaffModalService {
|
3257
|
-
constructor(overlay) {
|
3258
|
-
this.overlay = overlay;
|
3259
|
-
this._modals = [];
|
3260
|
-
this.defaultConfiguration = {};
|
3261
|
-
}
|
3262
|
-
_attachModal(overlayRef) {
|
3263
|
-
const modal = overlayRef.attach(new ComponentPortal(DaffModalComponent));
|
3264
|
-
modal.instance.open = true;
|
3265
|
-
return modal;
|
3266
|
-
}
|
3267
|
-
_attachModalContent(component, modal) {
|
3268
|
-
modal.instance.attachContent(new ComponentPortal(component));
|
3269
|
-
}
|
3270
|
-
_createOverlayRef() {
|
3271
|
-
return this.overlay.create({
|
3272
|
-
hasBackdrop: true,
|
3273
|
-
positionStrategy: new GlobalPositionStrategy()
|
3274
|
-
.centerHorizontally()
|
3275
|
-
.centerVertically(),
|
3276
|
-
scrollStrategy: this.overlay.scrollStrategies.block(),
|
3277
|
-
});
|
3278
|
-
}
|
3279
|
-
_removeModal(modal) {
|
3280
|
-
const index = this._modals.indexOf(modal);
|
3281
|
-
if (index === -1) {
|
3282
|
-
throw new Error('The Modal that you are trying to remove does not exist.');
|
3283
|
-
}
|
3284
|
-
modal.overlay.dispose();
|
3285
|
-
this._modals = this._modals.filter(m => m !== modal);
|
3286
|
-
}
|
3287
|
-
open(component, configuration) {
|
3288
|
-
const config = Object.assign(Object.assign({}, this.defaultConfiguration), configuration);
|
3289
|
-
const _ref = this._createOverlayRef();
|
3290
|
-
const _modal = this._attachModal(_ref);
|
3291
|
-
const _attachedModal = this._attachModalContent(component, _modal);
|
3292
|
-
const modal = {
|
3293
|
-
modal: _modal,
|
3294
|
-
overlay: _ref,
|
3295
|
-
};
|
3296
|
-
this._modals.push(modal);
|
3297
|
-
_ref
|
3298
|
-
.backdropClick()
|
3299
|
-
.subscribe(() => config.onBackdropClicked
|
3300
|
-
? config.onBackdropClicked()
|
3301
|
-
: this.close(modal));
|
3302
|
-
return modal;
|
3303
|
-
}
|
3304
|
-
close(modal) {
|
3305
|
-
modal.modal.instance.open = false;
|
3306
|
-
modal.overlay.detachBackdrop();
|
3307
|
-
modal.modal.instance.closedAnimationCompleted.subscribe((e) => this._removeModal(modal));
|
3308
|
-
}
|
3309
|
-
}
|
3310
|
-
/** @nocollapse */ DaffModalService.ɵprov = ɵɵdefineInjectable({ factory: function DaffModalService_Factory() { return new DaffModalService(ɵɵinject(Overlay)); }, token: DaffModalService, providedIn: DaffModalModule });
|
3311
|
-
DaffModalService.decorators = [
|
3312
|
-
{ type: Injectable, args: [{
|
3313
|
-
providedIn: DaffModalModule,
|
3314
|
-
},] }
|
3315
|
-
];
|
3316
|
-
/** @nocollapse */
|
3317
|
-
DaffModalService.ctorParameters = () => [
|
3318
|
-
{ type: Overlay }
|
3319
|
-
];
|
3320
|
-
|
3321
|
-
/**
|
3322
|
-
* A mixin for giving a component the ability to manage a DaffContainerComponent's layout.
|
3323
|
-
* It passes predetermined layout styles down to the container. In order for a component to
|
3324
|
-
* do this, it must implement this mixin.
|
3325
|
-
*/
|
3326
|
-
function daffManageContainerLayoutMixin(Base) {
|
3327
|
-
return class extends Base {
|
3328
|
-
constructor(...args) {
|
3329
|
-
super(...args);
|
3330
|
-
this._renderer.addClass(this._elementRef.nativeElement, `daff-manage-container-layout`);
|
3331
|
-
}
|
3332
|
-
};
|
3333
|
-
}
|
3334
|
-
|
3335
|
-
/**
|
3336
|
-
* An _elementRef is needed for the Colorable mixin
|
3337
|
-
*/
|
3338
|
-
class DaffNavbarBase {
|
3339
|
-
constructor(_elementRef, _renderer) {
|
3340
|
-
this._elementRef = _elementRef;
|
3341
|
-
this._renderer = _renderer;
|
3342
|
-
}
|
3343
|
-
}
|
3344
|
-
const _daffNavbarBase = daffManageContainerLayoutMixin(daffColorMixin(DaffNavbarBase));
|
3345
|
-
/**
|
3346
|
-
* @inheritdoc
|
3347
|
-
*/
|
3348
|
-
class DaffNavbarComponent extends _daffNavbarBase {
|
3349
|
-
constructor(elementRef, renderer) {
|
3350
|
-
super(elementRef, renderer);
|
3351
|
-
this.elementRef = elementRef;
|
3352
|
-
this.renderer = renderer;
|
3353
|
-
this.raised = false;
|
3354
|
-
/**
|
3355
|
-
* @docs-private
|
3356
|
-
*/
|
3357
|
-
this.hostClass = true;
|
3358
|
-
}
|
3359
|
-
/**
|
3360
|
-
* @docs-private
|
3361
|
-
*/
|
3362
|
-
get raisedClass() {
|
3363
|
-
return this.raised;
|
3364
|
-
}
|
3365
|
-
;
|
3366
|
-
}
|
3367
|
-
DaffNavbarComponent.decorators = [
|
3368
|
-
{ type: Component, args: [{
|
3369
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
3370
|
-
selector: 'nav[daff-navbar]',
|
3371
|
-
template: '<ng-content></ng-content>',
|
3372
|
-
//todo(damienwebdev): remove once decorators hit stage 3 - https://github.com/microsoft/TypeScript/issues/7342
|
3373
|
-
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
3374
|
-
inputs: ['color'],
|
3375
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
3376
|
-
styles: [":host{display:flex;align-items:center;height:64px;width:100%;padding:0 16px}"]
|
3377
|
-
},] }
|
3378
|
-
];
|
3379
|
-
/** @nocollapse */
|
3380
|
-
DaffNavbarComponent.ctorParameters = () => [
|
3381
|
-
{ type: ElementRef },
|
3382
|
-
{ type: Renderer2 }
|
3383
|
-
];
|
3384
|
-
DaffNavbarComponent.propDecorators = {
|
3385
|
-
raised: [{ type: Input }],
|
3386
|
-
raisedClass: [{ type: HostBinding, args: ['class.daff-navbar--raised',] }],
|
3387
|
-
hostClass: [{ type: HostBinding, args: ['class.daff-navbar',] }]
|
3388
|
-
};
|
3389
|
-
|
3390
|
-
class DaffNavbarModule {
|
3391
|
-
}
|
3392
|
-
DaffNavbarModule.decorators = [
|
3393
|
-
{ type: NgModule, args: [{
|
3394
|
-
declarations: [
|
3395
|
-
DaffNavbarComponent,
|
3396
|
-
],
|
3397
|
-
exports: [
|
3398
|
-
DaffNavbarComponent,
|
3399
|
-
],
|
3400
|
-
},] }
|
3401
|
-
];
|
3402
|
-
|
3403
|
-
const DaffPaginatorNumberOfPagesErrorMessage = 'The numberOfPages in the daff-paginator must not be less than 1';
|
3404
|
-
const DaffPaginatorPageOutOfRangeErrorMessage = 'The numberOfPages in the daff-paginator should not be less than the currentPage';
|
3405
|
-
|
3406
|
-
/**
|
3407
|
-
* An _elementRef and an instance of renderer2 are needed for the Colorable mixin
|
3408
|
-
*/
|
3409
|
-
class DaffPaginatorBase {
|
3410
|
-
constructor(_elementRef, _renderer) {
|
3411
|
-
this._elementRef = _elementRef;
|
3412
|
-
this._renderer = _renderer;
|
3413
|
-
}
|
3414
|
-
}
|
3415
|
-
const _daffPaginatorBase = daffColorMixin(DaffPaginatorBase);
|
3416
|
-
const visiblePageRange = 2;
|
3417
|
-
/**
|
3418
|
-
* @inheritdoc
|
3419
|
-
*/
|
3420
|
-
class DaffPaginatorComponent extends _daffPaginatorBase {
|
3421
|
-
constructor(elementRef, renderer) {
|
3422
|
-
super(elementRef, renderer);
|
3423
|
-
this.elementRef = elementRef;
|
3424
|
-
this.renderer = renderer;
|
3425
|
-
/**
|
3426
|
-
* @docs-private
|
3427
|
-
*/
|
3428
|
-
this.class = true;
|
3429
|
-
/**
|
3430
|
-
* @docs-private
|
3431
|
-
*/
|
3432
|
-
this.role = 'navigation';
|
3433
|
-
/**
|
3434
|
-
* @docs-private
|
3435
|
-
*/
|
3436
|
-
this.faChevronRight = faChevronRight;
|
3437
|
-
/**
|
3438
|
-
* @docs-private
|
3439
|
-
*/
|
3440
|
-
this.faChevronLeft = faChevronLeft;
|
3441
|
-
/**
|
3442
|
-
* Emits when the current page changes with the new current page.
|
3443
|
-
*/
|
3444
|
-
this.notifyPageChange = new EventEmitter();
|
3445
|
-
const ariaLabel = elementRef.nativeElement.attributes['aria-label'];
|
3446
|
-
this._paginatorId = ariaLabel ? ariaLabel.nodeValue : null;
|
3447
|
-
}
|
3448
|
-
/**
|
3449
|
-
* @docs-private
|
3450
|
-
*/
|
3451
|
-
ngOnChanges() {
|
3452
|
-
if (this.numberOfPages < 1) {
|
3453
|
-
throw new Error(DaffPaginatorNumberOfPagesErrorMessage);
|
3454
|
-
}
|
3455
|
-
else if (this.numberOfPages < this.currentPage) {
|
3456
|
-
throw new Error(DaffPaginatorPageOutOfRangeErrorMessage);
|
3457
|
-
}
|
3458
|
-
this._numberOfPagesArray = this.numberOfPages < 2 ? [] : Array(this.numberOfPages - 2).fill(this.numberOfPages - 2).map((x, i) => i + 2);
|
3459
|
-
}
|
3460
|
-
/**
|
3461
|
-
* Emits the previous page number through notifyPageChange Output.
|
3462
|
-
*
|
3463
|
-
* @docs-private
|
3464
|
-
*/
|
3465
|
-
_onNotifyPrevPageChange() {
|
3466
|
-
this.notifyPageChange.emit(this.currentPage - 1);
|
3467
|
-
}
|
3468
|
-
/**
|
3469
|
-
* Emits the next page number through notifyPageChange Output.
|
3470
|
-
*
|
3471
|
-
* @docs-private
|
3472
|
-
*/
|
3473
|
-
_onNotifyNextPageChange() {
|
3474
|
-
this.notifyPageChange.emit(this.currentPage + 1);
|
3475
|
-
}
|
3476
|
-
/**
|
3477
|
-
* Emits a pageNumber to notifyPageChange Output.
|
3478
|
-
*
|
3479
|
-
* @docs-private
|
3480
|
-
* @param pageNumber a page number
|
3481
|
-
*/
|
3482
|
-
_onNotifyPageChange(pageNumber) {
|
3483
|
-
this.notifyPageChange.emit(pageNumber);
|
3484
|
-
}
|
3485
|
-
/**
|
3486
|
-
* A simple function that determines if the given page number is the current page number.
|
3487
|
-
*
|
3488
|
-
* @docs-private
|
3489
|
-
* @param page a page number
|
3490
|
-
*/
|
3491
|
-
_isSelected(page) {
|
3492
|
-
return page === this.currentPage;
|
3493
|
-
}
|
3494
|
-
/**
|
3495
|
-
* Determines when ellipsis after the first page number should show.
|
3496
|
-
*
|
3497
|
-
* @docs-private
|
3498
|
-
*/
|
3499
|
-
_showFirstEllipsis() {
|
3500
|
-
return this.currentPage >= visiblePageRange + 2;
|
3501
|
-
}
|
3502
|
-
/**
|
3503
|
-
* Determines when ellipsis before the final page number should show.
|
3504
|
-
*
|
3505
|
-
* @docs-private
|
3506
|
-
*/
|
3507
|
-
_showLastEllipsis() {
|
3508
|
-
return this.currentPage < (this.numberOfPages - visiblePageRange);
|
3509
|
-
}
|
3510
|
-
/**
|
3511
|
-
* Determines if the given page number should be shown. The two additional 'or' conditionals are needed
|
3512
|
-
* so the paginator retains the same total width at the extreme page numbers (1 and numberOfPages).
|
3513
|
-
*
|
3514
|
-
* @docs-private
|
3515
|
-
* @param pageNumber page number to check.
|
3516
|
-
*/
|
3517
|
-
_showNumber(pageNumber) {
|
3518
|
-
return Math.abs(this.currentPage - pageNumber) < visiblePageRange
|
3519
|
-
|| (this.currentPage <= visiblePageRange && pageNumber <= 2 * visiblePageRange)
|
3520
|
-
|| (this.currentPage > this.numberOfPages - visiblePageRange && pageNumber > this.numberOfPages - 2 * visiblePageRange);
|
3521
|
-
}
|
3522
|
-
/**
|
3523
|
-
* Determines when the Previous button should be disabled.
|
3524
|
-
*
|
3525
|
-
* @docs-private
|
3526
|
-
*/
|
3527
|
-
_disablePrev() {
|
3528
|
-
return this.currentPage === 1;
|
3529
|
-
}
|
3530
|
-
/**
|
3531
|
-
* Determines when the Next button should be disabled.
|
3532
|
-
*
|
3533
|
-
* @docs-private
|
3534
|
-
*/
|
3535
|
-
_disableNext() {
|
3536
|
-
return this.currentPage === this.numberOfPages;
|
3537
|
-
}
|
3538
|
-
}
|
3539
|
-
DaffPaginatorComponent.decorators = [
|
3540
|
-
{ type: Component, args: [{
|
3541
|
-
selector: 'daff-paginator',
|
3542
|
-
template: "<button type=\"button\" class=\"daff-paginator__previous\"\n [disabled]=\"_disablePrev()\"\n tabindex=\"0\"\n attr.aria-label=\"Go to Previous Page of {{_paginatorId}} Paginator\"\n (click)=\"_onNotifyPrevPageChange()\">\n <fa-icon [icon]=\"faChevronLeft\"></fa-icon> Previous\n</button>\n\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 of {{_paginatorId}} Paginator\"\n (click)=\"_onNotifyPageChange(1)\">\n 1\n</button>\n\n<span class=\"daff-paginator__ellipsis\" *ngIf=\"_showFirstEllipsis()\">...</span>\n\n<ng-container *ngFor=\"let pageNumber of _numberOfPagesArray\">\n <button type=\"button\" class=\"daff-paginator__page-link\"\n [class.selected]=\"_isSelected(pageNumber)\"\n tabindex=\"0\"\n attr.aria-label=\"Go to Page {{pageNumber}} of {{_paginatorId}} Paginator\"\n aria-current=\"_isSelected(pageNumber)\"\n *ngIf=\"_showNumber(pageNumber)\"\n (click)=\"_onNotifyPageChange(pageNumber)\">\n {{ pageNumber }}\n </button>\n</ng-container>\n\n<span class=\"daff-paginator__ellipsis\" *ngIf=\"_showLastEllipsis()\">...</span>\n\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}} of {{_paginatorId}} Paginator\"\n (click)=\"_onNotifyPageChange(numberOfPages)\"\n *ngIf=\"!(numberOfPages < 2)\">\n {{ numberOfPages }}\n</button>\n\n<button class=\"daff-paginator__next\"\n [disabled]=\"_disableNext()\"\n tabindex=\"0\"\n attr.aria-label=\"Go to Next Page of {{_paginatorId}} Paginator\"\n (click)=\"_onNotifyNextPageChange()\">\n Next <fa-icon [icon]=\"faChevronRight\"></fa-icon>\n</button>\n",
|
3543
|
-
//todo(damienwebdev): remove once decorators hit stage 3 - https://github.com/microsoft/TypeScript/issues/7342
|
3544
|
-
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
3545
|
-
inputs: ['color'],
|
3546
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
3547
|
-
styles: [":host{display:flex}.daff-paginator__next,.daff-paginator__previous{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:3px;display:flex;line-height:1em;padding:5px 10px}.daff-paginator__previous fa-icon{margin-right:10px}.daff-paginator__next fa-icon{margin-left:10px}.daff-paginator__ellipsis{padding:5px 10px}.daff-paginator__page-link{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:0;border-radius:3px;display:inline-block;margin:0 5px;padding:5px 10px;transition:background .15s ease}"]
|
3548
|
-
},] }
|
3549
|
-
];
|
3550
|
-
/** @nocollapse */
|
3551
|
-
DaffPaginatorComponent.ctorParameters = () => [
|
3552
|
-
{ type: ElementRef },
|
3553
|
-
{ type: Renderer2 }
|
3554
|
-
];
|
3555
|
-
DaffPaginatorComponent.propDecorators = {
|
3556
|
-
class: [{ type: HostBinding, args: ['class.daff-paginator',] }],
|
3557
|
-
role: [{ type: HostBinding, args: ['attr.role',] }],
|
3558
|
-
numberOfPages: [{ type: Input }],
|
3559
|
-
currentPage: [{ type: Input }],
|
3560
|
-
notifyPageChange: [{ type: Output }]
|
3561
|
-
};
|
3562
|
-
|
3563
|
-
class DaffPaginatorModule {
|
3564
|
-
}
|
3565
|
-
DaffPaginatorModule.decorators = [
|
3566
|
-
{ type: NgModule, args: [{
|
3567
|
-
imports: [
|
3568
|
-
CommonModule,
|
3569
|
-
FontAwesomeModule,
|
3570
|
-
DaffButtonModule,
|
3571
|
-
],
|
3572
|
-
declarations: [
|
3573
|
-
DaffPaginatorComponent,
|
3574
|
-
],
|
3575
|
-
exports: [
|
3576
|
-
DaffPaginatorComponent,
|
3577
|
-
],
|
3578
|
-
},] }
|
3579
|
-
];
|
3580
|
-
|
3581
|
-
/**
|
3582
|
-
* @deprecated See {@link DaffQuantityFieldComponent}
|
3583
|
-
*/
|
3584
|
-
// ChangeDetection is ignored because this component is deprecated and will be removed
|
3585
|
-
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
3586
|
-
class DaffQtyDropdownComponent {
|
3587
|
-
constructor(renderer) {
|
3588
|
-
this.renderer = renderer;
|
3589
|
-
this.dropdownRange = 9;
|
3590
|
-
this.qtyChanged = new EventEmitter();
|
3591
|
-
/**
|
3592
|
-
* @docs-private
|
3593
|
-
*/
|
3594
|
-
this.onChange = (qty) => { };
|
3595
|
-
/**
|
3596
|
-
* @docs-private
|
3597
|
-
*/
|
3598
|
-
this.onTouched = () => { };
|
3599
|
-
}
|
3600
|
-
/**
|
3601
|
-
* @docs-private
|
3602
|
-
*/
|
3603
|
-
ngOnInit() {
|
3604
|
-
this.dropdownItemCounter = Array.from(Array(this.dropdownRange), (x, i) => i);
|
3605
|
-
if (!this.qty) {
|
3606
|
-
this.qty = 1;
|
3607
|
-
}
|
3608
|
-
}
|
3609
|
-
/**
|
3610
|
-
* @docs-private
|
3611
|
-
*/
|
3612
|
-
writeValue(qty) {
|
3613
|
-
this.qty = qty;
|
3614
|
-
this.onChange(this.qty);
|
3615
|
-
}
|
3616
|
-
/**
|
3617
|
-
* @docs-private
|
3618
|
-
*/
|
3619
|
-
registerOnChange(fn) {
|
3620
|
-
this.onChange = fn;
|
3621
|
-
}
|
3622
|
-
/**
|
3623
|
-
* @docs-private
|
3624
|
-
*/
|
3625
|
-
registerOnTouched(fn) {
|
3626
|
-
this.onTouched = fn;
|
3627
|
-
}
|
3628
|
-
/**
|
3629
|
-
* @docs-private
|
3630
|
-
*/
|
3631
|
-
setDisabledState(isDisabled) {
|
3632
|
-
if (this.inputHasBeenShown) {
|
3633
|
-
this.renderer.setProperty(document.getElementById('input_' + this.id), 'disabled', isDisabled);
|
3634
|
-
}
|
3635
|
-
else {
|
3636
|
-
this.renderer.setProperty(document.getElementById('select_' + this.id), 'disabled', isDisabled);
|
3637
|
-
}
|
3638
|
-
}
|
3639
|
-
/**
|
3640
|
-
* @docs-private
|
3641
|
-
*/
|
3642
|
-
get showQtyInputField() {
|
3643
|
-
if (!this.isQtyOutsideDropdownRange() && !this.inputHasBeenShown) {
|
3644
|
-
return false;
|
3645
|
-
}
|
3646
|
-
else {
|
3647
|
-
this.inputHasBeenShown = true;
|
3648
|
-
return true;
|
3649
|
-
}
|
3650
|
-
}
|
3651
|
-
/**
|
3652
|
-
* @docs-private
|
3653
|
-
*/
|
3654
|
-
onChangedWrapper(value) {
|
3655
|
-
value = parseInt(value, 10);
|
3656
|
-
if (value === 10) {
|
3657
|
-
this.selectInput();
|
3658
|
-
}
|
3659
|
-
this.qtyChanged.emit(value);
|
3660
|
-
this.onChange(value);
|
3661
|
-
}
|
3662
|
-
isQtyOutsideDropdownRange() {
|
3663
|
-
return this.qty > this.dropdownRange;
|
3664
|
-
}
|
3665
|
-
selectInput() {
|
3666
|
-
const that = this;
|
3667
|
-
setTimeout(() => {
|
3668
|
-
const input = document.getElementById('input_' + that.id);
|
3669
|
-
input.select();
|
3670
|
-
});
|
3671
|
-
}
|
3672
|
-
}
|
3673
|
-
DaffQtyDropdownComponent.decorators = [
|
3674
|
-
{ type: Component, args: [{
|
3675
|
-
selector: 'daff-qty-dropdown',
|
3676
|
-
template: "<daff-form-field class=\"daff-qty-dropdown\">\n <select daff-native-select *ngIf=\"!showQtyInputField\" id=\"select_{{id}}\" [(ngModel)]=\"qty\" (ngModelChange)=\"onChangedWrapper(qty)\" (blur)=\"onTouched()\">\n <option *ngFor=\"let item of dropdownItemCounter\" [value]=\"item+1\">{{ item+1 }}</option>\n <option value=\"10\">10+</option>\n </select>\n <input daff-input id=\"input_{{id}}\" class=\"daff-qty-dropdown__input\" [(ngModel)]=\"qty\" (ngModelChange)=\"onChangedWrapper(qty)\" (blur)=\"onTouched()\" *ngIf=\"showQtyInputField\">\n</daff-form-field>",
|
3677
|
-
styles: [".daff-qty-dropdown__input{width:50px}"]
|
3678
|
-
},] }
|
3679
|
-
];
|
3680
|
-
/** @nocollapse */
|
3681
|
-
DaffQtyDropdownComponent.ctorParameters = () => [
|
3682
|
-
{ type: Renderer2 }
|
3683
|
-
];
|
3684
|
-
DaffQtyDropdownComponent.propDecorators = {
|
3685
|
-
qty: [{ type: Input }],
|
3686
|
-
id: [{ type: Input }],
|
3687
|
-
qtyChanged: [{ type: Output }]
|
3688
|
-
};
|
3689
|
-
|
3690
|
-
class DaffQtyDropdownModule {
|
3691
|
-
}
|
3692
|
-
DaffQtyDropdownModule.decorators = [
|
3693
|
-
{ type: NgModule, args: [{
|
3694
|
-
imports: [
|
3695
|
-
CommonModule,
|
3696
|
-
FormsModule,
|
3697
|
-
DaffFormFieldModule,
|
3698
|
-
DaffNativeSelectModule,
|
3699
|
-
DaffInputModule,
|
3700
|
-
],
|
3701
|
-
declarations: [
|
3702
|
-
DaffQtyDropdownComponent,
|
3703
|
-
],
|
3704
|
-
exports: [
|
3705
|
-
DaffQtyDropdownComponent,
|
3706
|
-
],
|
3707
|
-
},] }
|
3708
|
-
];
|
3709
|
-
|
3710
|
-
const duration = '350ms';
|
3711
|
-
const sidebarAnimateRemainTransition = 'cubic-bezier(0.4, 0.0, 0.2, 1)';
|
3712
|
-
const sidebarAnimateInTransition = 'cubic-bezier(0.0, 0.0, 0.2, 1)';
|
3713
|
-
const sidebarAnimateOutTransition = 'cubic-bezier(0.4, 0.0, 1, 1)';
|
3714
|
-
const daffSidebarAnimations = {
|
3715
|
-
transformSidebar: trigger('transformSidebar', [
|
3716
|
-
// We remove the `transform` here completely, rather than setting it to zero, because:
|
3717
|
-
// 1. 3d transforms causes text to appear blurry on IE and Edge.
|
3718
|
-
state('open', style({
|
3719
|
-
transform: 'none',
|
3720
|
-
visibility: 'visible',
|
3721
|
-
})),
|
3722
|
-
transition('open => closed', animate(duration + ' ' + sidebarAnimateOutTransition)),
|
3723
|
-
transition('closed => open', animate(duration + ' ' + sidebarAnimateInTransition)),
|
3724
|
-
]),
|
3725
|
-
transformContent: trigger('transformContent', [
|
3726
|
-
state('closed', style({
|
3727
|
-
transform: 'none',
|
3728
|
-
})),
|
3729
|
-
transition('open => closed', animate(duration + ' ' + sidebarAnimateOutTransition)),
|
3730
|
-
transition('closed => open', animate(duration + ' ' + sidebarAnimateInTransition)),
|
3731
|
-
]),
|
3732
|
-
};
|
3733
|
-
var DaffSidebarAnimationStates;
|
3734
|
-
(function (DaffSidebarAnimationStates) {
|
3735
|
-
DaffSidebarAnimationStates["OPEN"] = "open";
|
3736
|
-
DaffSidebarAnimationStates["CLOSED"] = "closed";
|
3737
|
-
})(DaffSidebarAnimationStates || (DaffSidebarAnimationStates = {}));
|
3738
|
-
|
3739
|
-
const getAnimationState$2 = (open, enabled = true) => {
|
3740
|
-
if (!enabled) {
|
3741
|
-
return 'open';
|
3742
|
-
}
|
3743
|
-
if (open && enabled) {
|
3744
|
-
return 'open';
|
3745
|
-
}
|
3746
|
-
else {
|
3747
|
-
return 'closed';
|
3748
|
-
}
|
3749
|
-
};
|
3750
|
-
|
3751
|
-
/**
|
3752
|
-
* DaffSidebar is heavily based upon the work done by the @angular/material2
|
3753
|
-
* team on `mat-drawer` and `mat-sidenav`. `daff-sidebar` is intended to be
|
3754
|
-
* a simplified version (with a different design) of `mat-drawer` which
|
3755
|
-
* follows a stricter "dumb" component pattern than `mat-drawer`
|
3756
|
-
*/
|
3757
|
-
class DaffSidebarComponent {
|
3758
|
-
constructor(_elementRef, _ngZone) {
|
3759
|
-
this._elementRef = _elementRef;
|
3760
|
-
this._ngZone = _ngZone;
|
3761
|
-
this.class = true;
|
3762
|
-
/**
|
3763
|
-
* Event fired when `ESC` key is pressed when the sidebar has focus
|
3764
|
-
*/
|
3765
|
-
this.escapePressed = new EventEmitter();
|
3766
|
-
/**
|
3767
|
-
* Listen to `keydown` events outside the zone so that change detection is not run every
|
3768
|
-
* time a key is pressed. Instead we re-enter the zone only if the `ESC` key is pressed.
|
3769
|
-
*
|
3770
|
-
*/
|
3771
|
-
this._ngZone.runOutsideAngular(() => {
|
3772
|
-
fromEvent(this._elementRef.nativeElement, 'keydown').pipe(filter(event => event.key === 'Escape')).subscribe(event => this._ngZone.run(() => {
|
3773
|
-
this.escapePressed.emit();
|
3774
|
-
event.stopPropagation();
|
3775
|
-
}));
|
3776
|
-
});
|
3777
|
-
}
|
3778
|
-
}
|
3779
|
-
DaffSidebarComponent.decorators = [
|
3780
|
-
{ type: Component, args: [{
|
3781
|
-
selector: 'daff-sidebar',
|
3782
|
-
template: '<ng-content></ng-content>',
|
3783
|
-
encapsulation: ViewEncapsulation.None,
|
3784
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
3785
|
-
styles: [":host{display:block}.daff-sidebar{display:block;height:100%}"]
|
3786
|
-
},] }
|
3787
|
-
];
|
3788
|
-
/** @nocollapse */
|
3789
|
-
DaffSidebarComponent.ctorParameters = () => [
|
3790
|
-
{ type: ElementRef },
|
3791
|
-
{ type: NgZone }
|
3792
|
-
];
|
3793
|
-
DaffSidebarComponent.propDecorators = {
|
3794
|
-
class: [{ type: HostBinding, args: ['class.daff-sidebar',] }],
|
3795
|
-
escapePressed: [{ type: Output }]
|
3796
|
-
};
|
3797
|
-
|
3798
|
-
class DaffSidebarViewportComponent {
|
3799
|
-
constructor(ref) {
|
3800
|
-
this.ref = ref;
|
3801
|
-
/**
|
3802
|
-
* Internal tracking variable for the state of sidebar viewport.
|
3803
|
-
*
|
3804
|
-
* @docs-private
|
3805
|
-
*/
|
3806
|
-
this._opened = false;
|
3807
|
-
/**
|
3808
|
-
* @docs-private
|
3809
|
-
*/
|
3810
|
-
this._mode = 'side';
|
3811
|
-
/**
|
3812
|
-
* Input state for whether or not the backdrop is
|
3813
|
-
* "visible" to the human eye
|
3814
|
-
*/
|
3815
|
-
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
3816
|
-
this.backdropIsVisible = true;
|
3817
|
-
/**
|
3818
|
-
* Event fired when the backdrop is clicked
|
3819
|
-
* This is often used to close the sidebar
|
3820
|
-
*/
|
3821
|
-
this.backdropClicked = new EventEmitter();
|
3822
|
-
}
|
3823
|
-
/**
|
3824
|
-
* The mode to put the sidebar in
|
3825
|
-
*/
|
3826
|
-
get mode() {
|
3827
|
-
return this._mode;
|
3828
|
-
}
|
3829
|
-
set mode(value) {
|
3830
|
-
this._mode = value;
|
3831
|
-
this._animationState = getAnimationState$2(this.opened, this.animationsEnabled);
|
3832
|
-
}
|
3833
|
-
/**
|
3834
|
-
* Property for the "opened" state of the sidebar
|
3835
|
-
*/
|
3836
|
-
get opened() {
|
3837
|
-
return this._opened;
|
3838
|
-
}
|
3839
|
-
set opened(value) {
|
3840
|
-
this._opened = value;
|
3841
|
-
this._animationState = getAnimationState$2(value, this.animationsEnabled);
|
3842
|
-
}
|
3843
|
-
/**
|
3844
|
-
* @docs-private
|
3845
|
-
*/
|
3846
|
-
get animationsEnabled() {
|
3847
|
-
return (this.mode === 'over' || this.mode === 'push') ? true : false;
|
3848
|
-
}
|
3849
|
-
/**
|
3850
|
-
* @docs-private
|
3851
|
-
*/
|
3852
|
-
ngOnInit() {
|
3853
|
-
this._animationState = getAnimationState$2(this.opened, this.animationsEnabled);
|
3854
|
-
}
|
3855
|
-
/**
|
3856
|
-
* @docs-private
|
3857
|
-
*/
|
3858
|
-
ngAfterViewInit() {
|
3859
|
-
if (this.sidebar) {
|
3860
|
-
this.sidebar.escapePressed.subscribe(() => {
|
3861
|
-
this.onEscape();
|
3862
|
-
});
|
3863
|
-
}
|
3864
|
-
}
|
3865
|
-
/**
|
3866
|
-
* @docs-private
|
3867
|
-
*/
|
3868
|
-
_backdropClicked() {
|
3869
|
-
this.backdropClicked.emit();
|
3870
|
-
}
|
3871
|
-
/**
|
3872
|
-
* @docs-private
|
3873
|
-
*/
|
3874
|
-
get hasBackdrop() {
|
3875
|
-
return (this.mode === 'over' || this.mode === 'push');
|
3876
|
-
}
|
3877
|
-
/**
|
3878
|
-
* @docs-private
|
3879
|
-
*/
|
3880
|
-
onEscape() {
|
3881
|
-
if (this.hasBackdrop) {
|
3882
|
-
this.opened = false;
|
3883
|
-
this.ref.markForCheck();
|
3884
|
-
}
|
3885
|
-
}
|
3886
|
-
}
|
3887
|
-
DaffSidebarViewportComponent.decorators = [
|
3888
|
-
{ type: Component, args: [{
|
3889
|
-
selector: 'daff-sidebar-viewport',
|
3890
|
-
template: "<div class=\"daff-sidebar-viewport {{ mode }}\">\n <div class=\"daff-sidebar-viewport__sidebar\" [@transformSidebar]=\"_animationState\" [cdkTrapFocus]=\"opened && (mode === 'over' || mode === 'push')\">\n <ng-content select=\"daff-sidebar\" (escapePressed)=\"onEscape($event)\"></ng-content>\n </div>\n\n <daff-backdrop \n class=\"daff-sidebar-viewport__backdrop\" \n *ngIf=\"hasBackdrop && _opened\"\n [transparent]=\"!backdropIsVisible\" \n (backdropClicked)=\"_backdropClicked()\"></daff-backdrop>\n\n <div class=\"daff-sidebar-viewport__content\" [@transformContent]=\"_animationState\">\n <ng-content></ng-content>\n </div>\n</div>",
|
3891
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
3892
|
-
animations: [
|
3893
|
-
daffSidebarAnimations.transformSidebar,
|
3894
|
-
daffSidebarAnimations.transformContent,
|
3895
|
-
],
|
3896
|
-
styles: [".daff-sidebar-viewport{display:flex;min-height:100%;position:relative;width:100%;z-index:1}.daff-sidebar-viewport__content{flex:0 1 auto;width:100%;will-change:transform;z-index:2}.daff-sidebar-viewport__sidebar{flex-shrink:0;width:250px;will-change:transform,visibility;z-index:4}.daff-sidebar-viewport__backdrop{cursor:pointer;height:100%;position:absolute;width:100%;z-index:3}.daff-sidebar-viewport.push>.daff-sidebar-viewport__sidebar{bottom:0;height:100%;left:0;position:absolute;top:0;transform:translate3d(-250px,0,0);visibility:hidden}.daff-sidebar-viewport.push>.daff-sidebar-viewport__content{transform:translate3d(250px,0,0)}.daff-sidebar-viewport.over>.daff-sidebar-viewport__sidebar{bottom:0;height:100%;left:0;position:absolute;top:0;transform:translate3d(-250px,0,0);visibility:hidden}"]
|
3897
|
-
},] }
|
3898
|
-
];
|
3899
|
-
/** @nocollapse */
|
3900
|
-
DaffSidebarViewportComponent.ctorParameters = () => [
|
3901
|
-
{ type: ChangeDetectorRef }
|
3902
|
-
];
|
3903
|
-
DaffSidebarViewportComponent.propDecorators = {
|
3904
|
-
sidebar: [{ type: ContentChild, args: [DaffSidebarComponent,] }],
|
3905
|
-
mode: [{ type: Input }],
|
3906
|
-
backdropIsVisible: [{ type: Input }],
|
3907
|
-
opened: [{ type: Input }],
|
3908
|
-
backdropClicked: [{ type: Output }]
|
3909
|
-
};
|
3910
|
-
|
3911
|
-
class DaffSidebarModule {
|
3912
|
-
}
|
3913
|
-
DaffSidebarModule.decorators = [
|
3914
|
-
{ type: NgModule, args: [{
|
3915
|
-
imports: [
|
3916
|
-
CommonModule,
|
3917
|
-
DaffBackdropModule,
|
3918
|
-
A11yModule,
|
3919
|
-
],
|
3920
|
-
declarations: [
|
3921
|
-
DaffSidebarComponent,
|
3922
|
-
DaffSidebarViewportComponent,
|
3923
|
-
],
|
3924
|
-
exports: [
|
3925
|
-
DaffSidebarComponent,
|
3926
|
-
DaffSidebarViewportComponent,
|
3927
|
-
],
|
3928
|
-
},] }
|
3929
|
-
];
|
3930
|
-
|
3931
|
-
class DaffHeroBodyDirective {
|
3932
|
-
constructor() {
|
3933
|
-
/**
|
3934
|
-
* @docs-private
|
3935
|
-
*/
|
3936
|
-
this.class = true;
|
3937
|
-
}
|
3938
|
-
}
|
3939
|
-
DaffHeroBodyDirective.decorators = [
|
3940
|
-
{ type: Directive, args: [{
|
3941
|
-
selector: '[daffHeroBody]',
|
3942
|
-
},] }
|
3943
|
-
];
|
3944
|
-
DaffHeroBodyDirective.propDecorators = {
|
3945
|
-
class: [{ type: HostBinding, args: ['class.daff-hero__body',] }]
|
3946
|
-
};
|
3947
|
-
|
3948
|
-
class DaffHeroIconDirective {
|
3949
|
-
constructor() {
|
3950
|
-
/**
|
3951
|
-
* @docs-private
|
3952
|
-
*/
|
3953
|
-
this.class = true;
|
3954
|
-
}
|
3955
|
-
}
|
3956
|
-
DaffHeroIconDirective.decorators = [
|
3957
|
-
{ type: Directive, args: [{
|
3958
|
-
selector: '[daffHeroIcon]',
|
3959
|
-
},] }
|
3960
|
-
];
|
3961
|
-
DaffHeroIconDirective.propDecorators = {
|
3962
|
-
class: [{ type: HostBinding, args: ['class.daff-hero__icon',] }]
|
3963
|
-
};
|
3964
|
-
|
3965
|
-
class DaffHeroSubtitleDirective {
|
3966
|
-
constructor() {
|
3967
|
-
/**
|
3968
|
-
* @docs-private
|
3969
|
-
*/
|
3970
|
-
this.class = true;
|
3971
|
-
}
|
3972
|
-
}
|
3973
|
-
DaffHeroSubtitleDirective.decorators = [
|
3974
|
-
{ type: Directive, args: [{
|
3975
|
-
selector: '[daffHeroSubtitle]',
|
3976
|
-
},] }
|
3977
|
-
];
|
3978
|
-
DaffHeroSubtitleDirective.propDecorators = {
|
3979
|
-
class: [{ type: HostBinding, args: ['class.daff-hero__subtitle',] }]
|
3980
|
-
};
|
3981
|
-
|
3982
|
-
class DaffHeroTaglineDirective {
|
3983
|
-
constructor() {
|
3984
|
-
/**
|
3985
|
-
* @docs-private
|
3986
|
-
*/
|
3987
|
-
this.class = true;
|
3988
|
-
}
|
3989
|
-
}
|
3990
|
-
DaffHeroTaglineDirective.decorators = [
|
3991
|
-
{ type: Directive, args: [{
|
3992
|
-
selector: '[daffHeroTagline]',
|
3993
|
-
},] }
|
3994
|
-
];
|
3995
|
-
DaffHeroTaglineDirective.propDecorators = {
|
3996
|
-
class: [{ type: HostBinding, args: ['class.daff-hero__tagline',] }]
|
3997
|
-
};
|
3998
|
-
|
3999
|
-
class DaffHeroTitleDirective {
|
4000
|
-
constructor() {
|
4001
|
-
/**
|
4002
|
-
* @docs-private
|
4003
|
-
*/
|
4004
|
-
this.class = true;
|
4005
|
-
}
|
4006
|
-
}
|
4007
|
-
DaffHeroTitleDirective.decorators = [
|
4008
|
-
{ type: Directive, args: [{
|
4009
|
-
selector: '[daffHeroTitle]',
|
4010
|
-
},] }
|
4011
|
-
];
|
4012
|
-
DaffHeroTitleDirective.propDecorators = {
|
4013
|
-
class: [{ type: HostBinding, args: ['class.daff-hero__title',] }]
|
4014
|
-
};
|
4015
|
-
|
4016
|
-
function daffCompactableMixin(Base, defaultCompact = false) {
|
4017
|
-
return class extends Base {
|
4018
|
-
constructor(...args) {
|
4019
|
-
super(...args);
|
4020
|
-
this.compact = defaultCompact;
|
4021
|
-
}
|
4022
|
-
get compact() {
|
4023
|
-
return this._compact;
|
4024
|
-
}
|
4025
|
-
set compact(value) {
|
4026
|
-
// Handles the default compact
|
4027
|
-
const incomingCompact = value || defaultCompact;
|
4028
|
-
if (incomingCompact === this._compact) { // Only run the dom-render if a change occurs
|
4029
|
-
return;
|
4030
|
-
}
|
4031
|
-
if (incomingCompact) {
|
4032
|
-
this._renderer.addClass(this._elementRef.nativeElement, `daff-compact`);
|
4033
|
-
}
|
4034
|
-
else {
|
4035
|
-
this._renderer.removeClass(this._elementRef.nativeElement, `daff-compact`);
|
4036
|
-
}
|
4037
|
-
this._compact = incomingCompact;
|
4038
|
-
}
|
4039
|
-
};
|
4040
|
-
}
|
4041
|
-
|
4042
|
-
function daffTextAlignmentMixin(Base, defaultTextAlignment) {
|
4043
|
-
class DaffTextAlignableMixin extends Base {
|
4044
|
-
constructor(...args) {
|
4045
|
-
super(...args);
|
4046
|
-
this.textAlignment = defaultTextAlignment;
|
4047
|
-
}
|
4048
|
-
/**
|
4049
|
-
* Controls text alignment for component-specific UI
|
4050
|
-
*/
|
4051
|
-
get textAlignment() {
|
4052
|
-
return this._textAlignment;
|
4053
|
-
}
|
4054
|
-
set textAlignment(value) {
|
4055
|
-
// Handles the default text alignment
|
4056
|
-
const incomingTextAlignment = value || defaultTextAlignment;
|
4057
|
-
if (incomingTextAlignment === this._textAlignment) { // Only run the dom-render if a change occurs
|
4058
|
-
return;
|
4059
|
-
}
|
4060
|
-
// Removes the old text alignment
|
4061
|
-
if (this._textAlignment) {
|
4062
|
-
this._renderer.removeClass(this._elementRef.nativeElement, `daff-${this._textAlignment}`);
|
4063
|
-
}
|
4064
|
-
if (incomingTextAlignment) {
|
4065
|
-
this._renderer.addClass(this._elementRef.nativeElement, `daff-${incomingTextAlignment}`);
|
4066
|
-
}
|
4067
|
-
this._textAlignment = incomingTextAlignment;
|
4068
|
-
}
|
4069
|
-
}
|
4070
|
-
DaffTextAlignableMixin.propDecorators = {
|
4071
|
-
textAlignment: [{ type: Input }]
|
4072
|
-
};
|
4073
|
-
;
|
4074
|
-
return DaffTextAlignableMixin;
|
4075
|
-
}
|
4076
|
-
|
4077
|
-
var DaffHeroLayoutEnum;
|
4078
|
-
(function (DaffHeroLayoutEnum) {
|
4079
|
-
DaffHeroLayoutEnum["Centered"] = "centered";
|
4080
|
-
})(DaffHeroLayoutEnum || (DaffHeroLayoutEnum = {}));
|
4081
|
-
var DaffHeroSizeEnum;
|
4082
|
-
(function (DaffHeroSizeEnum) {
|
4083
|
-
DaffHeroSizeEnum["Compact"] = "compact";
|
4084
|
-
DaffHeroSizeEnum["Small"] = "small";
|
4085
|
-
})(DaffHeroSizeEnum || (DaffHeroSizeEnum = {}));
|
4086
|
-
/**
|
4087
|
-
* An _elementRef and an instance of renderer2 are needed for the hero mixins
|
4088
|
-
*/
|
4089
|
-
class DaffHeroBase {
|
4090
|
-
constructor(_elementRef, _renderer) {
|
4091
|
-
this._elementRef = _elementRef;
|
4092
|
-
this._renderer = _renderer;
|
4093
|
-
}
|
4094
|
-
}
|
4095
|
-
const _daffHeroBase = daffArticleEncapsulatedMixin(daffManageContainerLayoutMixin(daffColorMixin(daffCompactableMixin(daffTextAlignmentMixin(DaffHeroBase, 'left')))));
|
4096
|
-
/**
|
4097
|
-
* @inheritdoc
|
4098
|
-
*/
|
4099
|
-
class DaffHeroComponent extends _daffHeroBase {
|
4100
|
-
constructor(elementRef, renderer) {
|
4101
|
-
super(elementRef, renderer);
|
4102
|
-
this.elementRef = elementRef;
|
4103
|
-
this.renderer = renderer;
|
4104
|
-
/**
|
4105
|
-
* @docs-private
|
4106
|
-
*/
|
4107
|
-
this.class = true;
|
4108
|
-
}
|
4109
|
-
/**
|
4110
|
-
* @deprecated See {@link DaffTextAlignable}
|
4111
|
-
*/
|
4112
|
-
get centered() {
|
4113
|
-
return this.layout === DaffHeroLayoutEnum.Centered;
|
4114
|
-
}
|
4115
|
-
/**
|
4116
|
-
* @deprecated See {@link DaffCompactable}
|
4117
|
-
*/
|
4118
|
-
get compactClass() {
|
4119
|
-
return this.size === DaffHeroSizeEnum.Compact || this.compact === true || this.size === DaffHeroSizeEnum.Small;
|
4120
|
-
}
|
4121
|
-
}
|
4122
|
-
DaffHeroComponent.decorators = [
|
4123
|
-
{ type: Component, args: [{
|
4124
|
-
selector: 'daff-hero',
|
4125
|
-
template: '<ng-content></ng-content>',
|
4126
|
-
encapsulation: ViewEncapsulation.None,
|
4127
|
-
//todo(damienwebdev): remove once decorators hit stage 3 - https://github.com/microsoft/TypeScript/issues/7342
|
4128
|
-
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
4129
|
-
inputs: ['color', 'compact', 'textAlignment'],
|
4130
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
4131
|
-
styles: [".daff-hero{display:block;padding:64px 24px}@media (min-width:480px){.daff-hero{padding:96px 48px}}.daff-hero__icon{margin:0 0 16px}.daff-hero__tagline{text-transform:uppercase;font-size:.875rem;font-weight:600;letter-spacing:.03125rem;line-height:1rem;margin:0 0 8px;padding:0}.daff-hero__title{font-weight:700;font-size:2.5rem;line-height:2.5rem;margin:0;max-width:1040px;width:100%}@media (min-width:768px){.daff-hero__title{font-size:4.5rem;line-height:4.5rem}}.daff-hero__subtitle{font-size:1.25rem;font-weight:400;line-height:1.75rem;margin:16px 0 0;max-width:672px;width:100%}@media (min-width:768px){.daff-hero__subtitle{font-size:1.5rem;font-weight:400;line-height:2rem}}.daff-hero__subtitle p:first-of-type{margin-top:0}.daff-hero__subtitle p:last-of-type{margin-bottom:0}.daff-hero__body:not(:last-child){margin-bottom:48px}.daff-hero__body:not(:first-child){margin-top:48px}.daff-hero--centered .daff-hero__title{margin:0 auto;text-align:center}.daff-hero--centered .daff-hero__subtitle{margin:24px auto 0;text-align:center}.daff-hero--compact,.daff-hero--small{padding:50px 25px}@media (min-width:480px){.daff-hero--compact,.daff-hero--small{padding:50px}}.daff-hero.daff-compact{padding:48px 24px}@media (min-width:480px){.daff-hero.daff-compact{padding:48px}}.daff-hero.daff-left .daff-hero__icon,.daff-hero.daff-left .daff-hero__subtitle,.daff-hero.daff-left .daff-hero__tagline,.daff-hero.daff-left .daff-hero__title{text-align:left}.daff-hero.daff-center .daff-hero__icon,.daff-hero.daff-center .daff-hero__subtitle,.daff-hero.daff-center .daff-hero__tagline,.daff-hero.daff-center .daff-hero__title{margin-left:auto;margin-right:auto;text-align:center}.daff-hero.daff-right .daff-hero__icon,.daff-hero.daff-right .daff-hero__subtitle,.daff-hero.daff-right .daff-hero__tagline,.daff-hero.daff-right .daff-hero__title{margin-left:auto;text-align:right}"]
|
4132
|
-
},] }
|
4133
|
-
];
|
4134
|
-
/** @nocollapse */
|
4135
|
-
DaffHeroComponent.ctorParameters = () => [
|
4136
|
-
{ type: ElementRef },
|
4137
|
-
{ type: Renderer2 }
|
4138
|
-
];
|
4139
|
-
DaffHeroComponent.propDecorators = {
|
4140
|
-
layout: [{ type: Input }],
|
4141
|
-
size: [{ type: Input }],
|
4142
|
-
class: [{ type: HostBinding, args: ['class.daff-hero',] }],
|
4143
|
-
centered: [{ type: HostBinding, args: ['class.daff-hero--centered',] }],
|
4144
|
-
compactClass: [{ type: HostBinding, args: ['class.daff-hero--compact',] }]
|
4145
|
-
};
|
4146
|
-
|
4147
|
-
class DaffHeroModule {
|
4148
|
-
}
|
4149
|
-
DaffHeroModule.decorators = [
|
4150
|
-
{ type: NgModule, args: [{
|
4151
|
-
imports: [
|
4152
|
-
CommonModule,
|
4153
|
-
],
|
4154
|
-
declarations: [
|
4155
|
-
DaffHeroComponent,
|
4156
|
-
DaffHeroIconDirective,
|
4157
|
-
DaffHeroTaglineDirective,
|
4158
|
-
DaffHeroTitleDirective,
|
4159
|
-
DaffHeroSubtitleDirective,
|
4160
|
-
DaffHeroBodyDirective,
|
4161
|
-
],
|
4162
|
-
exports: [
|
4163
|
-
DaffHeroComponent,
|
4164
|
-
DaffHeroIconDirective,
|
4165
|
-
DaffHeroTaglineDirective,
|
4166
|
-
DaffHeroTitleDirective,
|
4167
|
-
DaffHeroSubtitleDirective,
|
4168
|
-
DaffHeroBodyDirective,
|
4169
|
-
],
|
4170
|
-
},] }
|
4171
|
-
];
|
4172
|
-
|
4173
|
-
class DaffCalloutBodyDirective {
|
4174
|
-
constructor() {
|
4175
|
-
/**
|
4176
|
-
* @docs-private
|
4177
|
-
*/
|
4178
|
-
this.class = true;
|
4179
|
-
}
|
4180
|
-
}
|
4181
|
-
DaffCalloutBodyDirective.decorators = [
|
4182
|
-
{ type: Directive, args: [{
|
4183
|
-
selector: '[daffCalloutBody]',
|
4184
|
-
},] }
|
4185
|
-
];
|
4186
|
-
DaffCalloutBodyDirective.propDecorators = {
|
4187
|
-
class: [{ type: HostBinding, args: ['class.daff-callout__body',] }]
|
4188
|
-
};
|
4189
|
-
|
4190
|
-
class DaffCalloutIconDirective {
|
4191
|
-
constructor() {
|
4192
|
-
/**
|
4193
|
-
* @docs-private
|
4194
|
-
*/
|
4195
|
-
this.class = true;
|
4196
|
-
}
|
4197
|
-
}
|
4198
|
-
DaffCalloutIconDirective.decorators = [
|
4199
|
-
{ type: Directive, args: [{
|
4200
|
-
selector: '[daffCalloutIcon]',
|
4201
|
-
},] }
|
4202
|
-
];
|
4203
|
-
DaffCalloutIconDirective.propDecorators = {
|
4204
|
-
class: [{ type: HostBinding, args: ['class.daff-callout__icon',] }]
|
4205
|
-
};
|
4206
|
-
|
4207
|
-
class DaffCalloutSubtitleDirective {
|
4208
|
-
constructor() {
|
4209
|
-
/**
|
4210
|
-
* @docs-private
|
4211
|
-
*/
|
4212
|
-
this.class = true;
|
4213
|
-
}
|
4214
|
-
}
|
4215
|
-
DaffCalloutSubtitleDirective.decorators = [
|
4216
|
-
{ type: Directive, args: [{
|
4217
|
-
selector: '[daffCalloutSubtitle]',
|
4218
|
-
},] }
|
4219
|
-
];
|
4220
|
-
DaffCalloutSubtitleDirective.propDecorators = {
|
4221
|
-
class: [{ type: HostBinding, args: ['class.daff-callout__subtitle',] }]
|
4222
|
-
};
|
4223
|
-
|
4224
|
-
class DaffCalloutTaglineDirective {
|
4225
|
-
constructor() {
|
4226
|
-
/**
|
4227
|
-
* @docs-private
|
4228
|
-
*/
|
4229
|
-
this.class = true;
|
4230
|
-
}
|
4231
|
-
}
|
4232
|
-
DaffCalloutTaglineDirective.decorators = [
|
4233
|
-
{ type: Directive, args: [{
|
4234
|
-
selector: '[daffCalloutTagline]',
|
4235
|
-
},] }
|
4236
|
-
];
|
4237
|
-
DaffCalloutTaglineDirective.propDecorators = {
|
4238
|
-
class: [{ type: HostBinding, args: ['class.daff-callout__tagline',] }]
|
4239
|
-
};
|
4240
|
-
|
4241
|
-
class DaffCalloutTitleDirective {
|
4242
|
-
constructor() {
|
4243
|
-
/**
|
4244
|
-
* @docs-private
|
4245
|
-
*/
|
4246
|
-
this.class = true;
|
4247
|
-
}
|
4248
|
-
}
|
4249
|
-
DaffCalloutTitleDirective.decorators = [
|
4250
|
-
{ type: Directive, args: [{
|
4251
|
-
selector: '[daffCalloutTitle]',
|
4252
|
-
},] }
|
4253
|
-
];
|
4254
|
-
DaffCalloutTitleDirective.propDecorators = {
|
4255
|
-
class: [{ type: HostBinding, args: ['class.daff-callout__title',] }]
|
4256
|
-
};
|
4257
|
-
|
4258
|
-
var DaffCalloutLayoutEnum;
|
4259
|
-
(function (DaffCalloutLayoutEnum) {
|
4260
|
-
DaffCalloutLayoutEnum["Centered"] = "centered";
|
4261
|
-
})(DaffCalloutLayoutEnum || (DaffCalloutLayoutEnum = {}));
|
4262
|
-
var DaffCalloutSizeEnum;
|
4263
|
-
(function (DaffCalloutSizeEnum) {
|
4264
|
-
DaffCalloutSizeEnum["Compact"] = "compact";
|
4265
|
-
})(DaffCalloutSizeEnum || (DaffCalloutSizeEnum = {}));
|
4266
|
-
/**
|
4267
|
-
* An _elementRef and an instance of renderer2 are needed for the Colorable mixin
|
4268
|
-
*/
|
4269
|
-
class DaffCalloutBase {
|
4270
|
-
constructor(_elementRef, _renderer) {
|
4271
|
-
this._elementRef = _elementRef;
|
4272
|
-
this._renderer = _renderer;
|
4273
|
-
}
|
4274
|
-
}
|
4275
|
-
const _daffCalloutBase = daffArticleEncapsulatedMixin(daffManageContainerLayoutMixin(daffColorMixin(daffCompactableMixin(daffTextAlignmentMixin(DaffCalloutBase, 'left')))));
|
4276
|
-
/**
|
4277
|
-
* @inheritdoc
|
4278
|
-
*/
|
4279
|
-
class DaffCalloutComponent extends _daffCalloutBase {
|
4280
|
-
constructor(elementRef, renderer) {
|
4281
|
-
super(elementRef, renderer);
|
4282
|
-
this.elementRef = elementRef;
|
4283
|
-
this.renderer = renderer;
|
4284
|
-
/**
|
4285
|
-
* @docs-private
|
4286
|
-
*/
|
4287
|
-
this.class = true;
|
4288
|
-
}
|
4289
|
-
/**
|
4290
|
-
* @deprecated See {@link DaffTextAlignable}
|
4291
|
-
*/
|
4292
|
-
get centered() {
|
4293
|
-
return this.layout === DaffCalloutLayoutEnum.Centered;
|
4294
|
-
}
|
4295
|
-
/**
|
4296
|
-
* @deprecated See {@link DaffCompactable}
|
4297
|
-
*/
|
4298
|
-
get compactClass() {
|
4299
|
-
return this.size === DaffCalloutSizeEnum.Compact;
|
4300
|
-
}
|
4301
|
-
}
|
4302
|
-
DaffCalloutComponent.decorators = [
|
4303
|
-
{ type: Component, args: [{
|
4304
|
-
selector: 'daff-callout',
|
4305
|
-
template: '<ng-content></ng-content>',
|
4306
|
-
encapsulation: ViewEncapsulation.None,
|
4307
|
-
//todo(damienwebdev): remove once decorators hit stage 3 - https://github.com/microsoft/TypeScript/issues/7342
|
4308
|
-
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
4309
|
-
inputs: ['color', 'compact', 'textAlignment'],
|
4310
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
4311
|
-
styles: [".daff-callout{display:block;padding:64px 24px}@media (min-width:480px){.daff-callout{padding:96px 48px}}.daff-callout__icon{margin:0 0 16px}.daff-callout__tagline{text-transform:uppercase;font-size:.875rem;font-weight:600;letter-spacing:.03125rem;line-height:1rem;margin:0 0 8px;padding:0}.daff-callout__title{font-weight:700;font-size:1.75rem;line-height:2rem;margin:0;max-width:1040px;overflow-wrap:break-word;padding:0;width:100%}@media (min-width:480px){.daff-callout__title{font-weight:700;font-size:2rem;line-height:2.25rem}}@media (min-width:480px) and (min-width:768px){.daff-callout__title{font-size:3rem;line-height:3.5rem}}.daff-callout__subtitle{font-size:1.25rem;margin:16px 0 0;max-width:592px;padding:0;width:100%}.daff-callout__body:not(:last-child){margin-bottom:48px}.daff-callout__body:not(:first-child){margin-top:48px}.daff-callout__body p:first-of-type{margin-top:0}.daff-callout__body p:last-of-type{margin-bottom:0}.daff-callout--centered .daff-callout__title{margin:0 auto;text-align:center}.daff-callout--centered .daff-callout__subtitle{margin:10px auto 0;text-align:center}@media (min-width:480px){.daff-callout--centered .daff-callout__subtitle{margin:25px auto 0}}.daff-callout--compact{padding:25px}@media (min-width:480px){.daff-callout--compact{padding:25px 50px}}.daff-callout.daff-compact{padding:48px 24px}@media (min-width:480px){.daff-callout.daff-compact{padding:48px}}.daff-callout.daff-left .daff-callout__icon,.daff-callout.daff-left .daff-callout__subtitle,.daff-callout.daff-left .daff-callout__tagline,.daff-callout.daff-left .daff-callout__title{text-align:left}.daff-callout.daff-center .daff-callout__icon,.daff-callout.daff-center .daff-callout__subtitle,.daff-callout.daff-center .daff-callout__tagline,.daff-callout.daff-center .daff-callout__title{margin-left:auto;margin-right:auto;text-align:center}.daff-callout.daff-right .daff-callout__icon,.daff-callout.daff-right .daff-callout__subtitle,.daff-callout.daff-right .daff-callout__tagline,.daff-callout.daff-right .daff-callout__title{margin-left:auto;text-align:right}"]
|
4312
|
-
},] }
|
4313
|
-
];
|
4314
|
-
/** @nocollapse */
|
4315
|
-
DaffCalloutComponent.ctorParameters = () => [
|
4316
|
-
{ type: ElementRef },
|
4317
|
-
{ type: Renderer2 }
|
4318
|
-
];
|
4319
|
-
DaffCalloutComponent.propDecorators = {
|
4320
|
-
layout: [{ type: Input }],
|
4321
|
-
size: [{ type: Input }],
|
4322
|
-
class: [{ type: HostBinding, args: ['class.daff-callout',] }],
|
4323
|
-
centered: [{ type: HostBinding, args: ['class.daff-callout--centered',] }],
|
4324
|
-
compactClass: [{ type: HostBinding, args: ['class.daff-callout--compact',] }]
|
4325
|
-
};
|
4326
|
-
|
4327
|
-
class DaffCalloutModule {
|
4328
|
-
}
|
4329
|
-
DaffCalloutModule.decorators = [
|
4330
|
-
{ type: NgModule, args: [{
|
4331
|
-
imports: [
|
4332
|
-
CommonModule,
|
4333
|
-
],
|
4334
|
-
declarations: [
|
4335
|
-
DaffCalloutComponent,
|
4336
|
-
DaffCalloutIconDirective,
|
4337
|
-
DaffCalloutTitleDirective,
|
4338
|
-
DaffCalloutSubtitleDirective,
|
4339
|
-
DaffCalloutTaglineDirective,
|
4340
|
-
DaffCalloutBodyDirective,
|
4341
|
-
],
|
4342
|
-
exports: [
|
4343
|
-
DaffCalloutComponent,
|
4344
|
-
DaffCalloutIconDirective,
|
4345
|
-
DaffCalloutSubtitleDirective,
|
4346
|
-
DaffCalloutTitleDirective,
|
4347
|
-
DaffCalloutTaglineDirective,
|
4348
|
-
DaffCalloutBodyDirective,
|
4349
|
-
],
|
4350
|
-
},] }
|
4351
|
-
];
|
4352
|
-
|
4353
|
-
class DaffFeatureIconDirective {
|
4354
|
-
constructor() {
|
4355
|
-
/**
|
4356
|
-
* @docs-private
|
4357
|
-
*/
|
4358
|
-
this.class = true;
|
4359
|
-
}
|
4360
|
-
}
|
4361
|
-
DaffFeatureIconDirective.decorators = [
|
4362
|
-
{ type: Directive, args: [{
|
4363
|
-
selector: '[daffFeatureIcon]',
|
4364
|
-
},] }
|
4365
|
-
];
|
4366
|
-
DaffFeatureIconDirective.propDecorators = {
|
4367
|
-
class: [{ type: HostBinding, args: ['class.daff-feature__icon',] }]
|
4368
|
-
};
|
4369
|
-
|
4370
|
-
class DaffFeatureSubheaderDirective {
|
4371
|
-
constructor() {
|
4372
|
-
/**
|
4373
|
-
* @docs-private
|
4374
|
-
*/
|
4375
|
-
this.class = true;
|
4376
|
-
}
|
4377
|
-
}
|
4378
|
-
DaffFeatureSubheaderDirective.decorators = [
|
4379
|
-
{ type: Directive, args: [{
|
4380
|
-
selector: '[daffFeatureSubheader]',
|
4381
|
-
},] }
|
4382
|
-
];
|
4383
|
-
DaffFeatureSubheaderDirective.propDecorators = {
|
4384
|
-
class: [{ type: HostBinding, args: ['class.daff-feature__subheader',] }]
|
4385
|
-
};
|
4386
|
-
|
4387
|
-
class DaffFeatureSubtitleDirective {
|
4388
|
-
constructor() {
|
4389
|
-
/**
|
4390
|
-
* @docs-private
|
4391
|
-
*/
|
4392
|
-
this.class = true;
|
4393
|
-
}
|
4394
|
-
}
|
4395
|
-
DaffFeatureSubtitleDirective.decorators = [
|
4396
|
-
{ type: Directive, args: [{
|
4397
|
-
selector: '[daffFeatureSubtitle]',
|
4398
|
-
},] }
|
4399
|
-
];
|
4400
|
-
DaffFeatureSubtitleDirective.propDecorators = {
|
4401
|
-
class: [{ type: HostBinding, args: ['class.daff-feature__subtitle',] }]
|
4402
|
-
};
|
4403
|
-
|
4404
|
-
class DaffFeatureTitleDirective {
|
4405
|
-
constructor() {
|
4406
|
-
/**
|
4407
|
-
* @docs-private
|
4408
|
-
*/
|
4409
|
-
this.class = true;
|
4410
|
-
}
|
4411
|
-
}
|
4412
|
-
DaffFeatureTitleDirective.decorators = [
|
4413
|
-
{ type: Directive, args: [{
|
4414
|
-
selector: '[daffFeatureTitle]',
|
4415
|
-
},] }
|
4416
|
-
];
|
4417
|
-
DaffFeatureTitleDirective.propDecorators = {
|
4418
|
-
class: [{ type: HostBinding, args: ['class.daff-feature__title',] }]
|
4419
|
-
};
|
4420
|
-
|
4421
|
-
var DaffFeatureModeEnum;
|
4422
|
-
(function (DaffFeatureModeEnum) {
|
4423
|
-
DaffFeatureModeEnum["Compact"] = "compact";
|
4424
|
-
DaffFeatureModeEnum["Normal"] = "normal";
|
4425
|
-
})(DaffFeatureModeEnum || (DaffFeatureModeEnum = {}));
|
4426
|
-
/**
|
4427
|
-
* @deprecated See {@link DaffCardComponent}
|
4428
|
-
*/
|
4429
|
-
class DaffFeatureComponent {
|
4430
|
-
constructor() {
|
4431
|
-
/**
|
4432
|
-
* @docs-private
|
4433
|
-
*/
|
4434
|
-
this.class = true;
|
4435
|
-
this.mode = DaffFeatureModeEnum.Normal;
|
4436
|
-
}
|
4437
|
-
/**
|
4438
|
-
* @docs-private
|
4439
|
-
*/
|
4440
|
-
get compact() {
|
4441
|
-
return this.mode === DaffFeatureModeEnum.Compact;
|
4442
|
-
}
|
4443
|
-
/**
|
4444
|
-
* @docs-private
|
4445
|
-
*/
|
4446
|
-
get normal() {
|
4447
|
-
return this.mode === DaffFeatureModeEnum.Normal;
|
4448
|
-
}
|
4449
|
-
}
|
4450
|
-
DaffFeatureComponent.decorators = [
|
4451
|
-
{ type: Component, args: [{
|
4452
|
-
selector: 'daff-feature',
|
4453
|
-
template: "<ng-content select=\"[daffFeatureIcon]\"></ng-content>\n<div class=\"daff-feature__content\">\n <ng-content select=\"[daffFeatureSubheader]\"></ng-content>\n <ng-content select=\"[daffFeatureTitle]\"></ng-content>\n <ng-content select=\"[daffFeatureSubtitle]\"></ng-content>\n <ng-content></ng-content>\n</div>",
|
4454
|
-
encapsulation: ViewEncapsulation.None,
|
4455
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
4456
|
-
styles: [".daff-feature{border-radius:10px;display:flex}.daff-feature__icon{display:inline-block;max-width:30px}@media (min-width:480px){.daff-feature__icon{max-width:50px}}.daff-feature__subheader{text-transform:uppercase;font-size:.75rem;letter-spacing:.075rem;line-height:1rem}@media (min-width:480px){.daff-feature__subheader{font-size:.875rem}}.daff-feature__title{font-weight:700;margin:0 0 15px;padding:0}.daff-feature__subtitle{font-size:1rem;margin:0;padding:0}.daff-feature--normal{align-items:flex-start;flex-direction:column;padding:25px}@media (min-width:480px){.daff-feature--normal{align-items:center;flex-direction:row;padding:50px}}.daff-feature--normal .daff-feature__icon{margin:0 0 15px}@media (min-width:480px){.daff-feature--normal .daff-feature__icon{margin:0 25px 0 0}}.daff-feature--normal .daff-feature__subheader{margin:0 0 15px}@media (min-width:480px){.daff-feature--normal .daff-feature__subheader{margin:0 0 30px}}.daff-feature--normal .daff-feature__title{font-size:1.25rem;line-height:1.25rem}@media (min-width:480px){.daff-feature--normal .daff-feature__title{font-size:2rem;line-height:2rem}}.daff-feature--compact{align-items:flex-start;flex-direction:column;padding:25px}.daff-feature--compact .daff-feature__icon{margin:0 0 15px}.daff-feature--compact .daff-feature__subheader{margin:0 0 5px}.daff-feature--compact .daff-feature__title{font-size:1.25rem;line-height:1.25rem}@media (min-width:480px){.daff-feature--compact .daff-feature__title{font-size:1.5rem;line-height:1.5rem}}"]
|
4457
|
-
},] }
|
4458
|
-
];
|
4459
|
-
DaffFeatureComponent.propDecorators = {
|
4460
|
-
class: [{ type: HostBinding, args: ['class.daff-feature',] }],
|
4461
|
-
mode: [{ type: Input }],
|
4462
|
-
compact: [{ type: HostBinding, args: ['class.daff-feature--compact',] }],
|
4463
|
-
normal: [{ type: HostBinding, args: ['class.daff-feature--normal',] }]
|
4464
|
-
};
|
4465
|
-
|
4466
|
-
class DaffFeatureModule {
|
4467
|
-
}
|
4468
|
-
DaffFeatureModule.decorators = [
|
4469
|
-
{ type: NgModule, args: [{
|
4470
|
-
imports: [
|
4471
|
-
CommonModule,
|
4472
|
-
],
|
4473
|
-
declarations: [
|
4474
|
-
DaffFeatureComponent,
|
4475
|
-
DaffFeatureTitleDirective,
|
4476
|
-
DaffFeatureSubtitleDirective,
|
4477
|
-
DaffFeatureIconDirective,
|
4478
|
-
DaffFeatureSubheaderDirective,
|
4479
|
-
],
|
4480
|
-
exports: [
|
4481
|
-
DaffFeatureComponent,
|
4482
|
-
DaffFeatureTitleDirective,
|
4483
|
-
DaffFeatureSubtitleDirective,
|
4484
|
-
DaffFeatureIconDirective,
|
4485
|
-
DaffFeatureSubheaderDirective,
|
4486
|
-
],
|
4487
|
-
},] }
|
4488
|
-
];
|
4489
|
-
|
4490
|
-
class DaffCardActionsDirective {
|
4491
|
-
constructor() {
|
4492
|
-
/**
|
4493
|
-
* @docs-private
|
4494
|
-
*/
|
4495
|
-
this.class = true;
|
4496
|
-
}
|
4497
|
-
}
|
4498
|
-
DaffCardActionsDirective.decorators = [
|
4499
|
-
{ type: Directive, args: [{
|
4500
|
-
selector: '[daffCardActions]',
|
4501
|
-
},] }
|
4502
|
-
];
|
4503
|
-
DaffCardActionsDirective.propDecorators = {
|
4504
|
-
class: [{ type: HostBinding, args: ['class.daff-card__actions',] }]
|
4505
|
-
};
|
4506
|
-
|
4507
|
-
class DaffCardContentDirective {
|
4508
|
-
constructor() {
|
4509
|
-
/**
|
4510
|
-
* @docs-private
|
4511
|
-
*/
|
4512
|
-
this.class = true;
|
4513
|
-
}
|
4514
|
-
}
|
4515
|
-
DaffCardContentDirective.decorators = [
|
4516
|
-
{ type: Directive, args: [{
|
4517
|
-
selector: '[daffCardContent]',
|
4518
|
-
},] }
|
4519
|
-
];
|
4520
|
-
DaffCardContentDirective.propDecorators = {
|
4521
|
-
class: [{ type: HostBinding, args: ['class.daff-card__content',] }]
|
4522
|
-
};
|
4523
|
-
|
4524
|
-
class DaffCardIconDirective {
|
4525
|
-
constructor() {
|
4526
|
-
/**
|
4527
|
-
* @docs-private
|
4528
|
-
*/
|
4529
|
-
this.class = true;
|
4530
|
-
}
|
4531
|
-
}
|
4532
|
-
DaffCardIconDirective.decorators = [
|
4533
|
-
{ type: Directive, args: [{
|
4534
|
-
selector: '[daffCardIcon]',
|
4535
|
-
},] }
|
4536
|
-
];
|
4537
|
-
DaffCardIconDirective.propDecorators = {
|
4538
|
-
class: [{ type: HostBinding, args: ['class.daff-card__icon',] }]
|
4539
|
-
};
|
4540
|
-
|
4541
|
-
class DaffCardImageDirective {
|
4542
|
-
constructor() {
|
4543
|
-
/**
|
4544
|
-
* @docs-private
|
4545
|
-
*/
|
4546
|
-
this.class = true;
|
4547
|
-
}
|
4548
|
-
}
|
4549
|
-
DaffCardImageDirective.decorators = [
|
4550
|
-
{ type: Directive, args: [{
|
4551
|
-
selector: '[daffCardImage]',
|
4552
|
-
},] }
|
4553
|
-
];
|
4554
|
-
DaffCardImageDirective.propDecorators = {
|
4555
|
-
class: [{ type: HostBinding, args: ['class.daff-card__image',] }]
|
4556
|
-
};
|
4557
|
-
|
4558
|
-
class DaffCardTaglineDirective {
|
4559
|
-
constructor() {
|
4560
|
-
/**
|
4561
|
-
* @docs-private
|
4562
|
-
*/
|
4563
|
-
this.class = true;
|
4564
|
-
}
|
4565
|
-
}
|
4566
|
-
DaffCardTaglineDirective.decorators = [
|
4567
|
-
{ type: Directive, args: [{
|
4568
|
-
selector: '[daffCardTagline]',
|
4569
|
-
},] }
|
4570
|
-
];
|
4571
|
-
DaffCardTaglineDirective.propDecorators = {
|
4572
|
-
class: [{ type: HostBinding, args: ['class.daff-card__tagline',] }]
|
4573
|
-
};
|
4574
|
-
|
4575
|
-
class DaffCardTitleDirective {
|
4576
|
-
constructor() {
|
4577
|
-
/**
|
4578
|
-
* @docs-private
|
4579
|
-
*/
|
4580
|
-
this.class = true;
|
4581
|
-
}
|
4582
|
-
}
|
4583
|
-
DaffCardTitleDirective.decorators = [
|
4584
|
-
{ type: Directive, args: [{
|
4585
|
-
selector: '[daffCardTitle]',
|
4586
|
-
},] }
|
4587
|
-
];
|
4588
|
-
DaffCardTitleDirective.propDecorators = {
|
4589
|
-
class: [{ type: HostBinding, args: ['class.daff-card__title',] }]
|
4590
|
-
};
|
4591
|
-
|
4592
|
-
var DaffCardTypeEnum;
|
4593
|
-
(function (DaffCardTypeEnum) {
|
4594
|
-
DaffCardTypeEnum["Raised"] = "daff-raised-card";
|
4595
|
-
DaffCardTypeEnum["Stroked"] = "daff-stroked-card";
|
4596
|
-
})(DaffCardTypeEnum || (DaffCardTypeEnum = {}));
|
4597
|
-
var DaffCardOrientationEnum;
|
4598
|
-
(function (DaffCardOrientationEnum) {
|
4599
|
-
DaffCardOrientationEnum["Vertical"] = "vertical";
|
4600
|
-
DaffCardOrientationEnum["Horizontal"] = "horizontal";
|
4601
|
-
})(DaffCardOrientationEnum || (DaffCardOrientationEnum = {}));
|
4602
|
-
/**
|
4603
|
-
* An _elementRef and an instance of renderer2 are needed for the Colorable mixin
|
4604
|
-
*/
|
4605
|
-
class DaffCardBase {
|
4606
|
-
constructor(_elementRef, _renderer) {
|
4607
|
-
this._elementRef = _elementRef;
|
4608
|
-
this._renderer = _renderer;
|
4609
|
-
}
|
4610
|
-
}
|
4611
|
-
const _daffCardBase = daffArticleEncapsulatedMixin(daffColorMixin(DaffCardBase));
|
4612
|
-
/**
|
4613
|
-
* @inheritdoc
|
4614
|
-
*/
|
4615
|
-
class DaffCardComponent extends _daffCardBase {
|
4616
|
-
constructor(elementRef, renderer) {
|
4617
|
-
super(elementRef, renderer);
|
4618
|
-
this.elementRef = elementRef;
|
4619
|
-
this.renderer = renderer;
|
4620
|
-
this._orientation = DaffCardOrientationEnum.Vertical;
|
4621
|
-
this.class = true;
|
4622
|
-
this.cardType = this.initCardType();
|
4623
|
-
}
|
4624
|
-
get orientation() {
|
4625
|
-
return this._orientation;
|
4626
|
-
}
|
4627
|
-
set orientation(value) {
|
4628
|
-
if (value === null || value === undefined || value === '') {
|
4629
|
-
this._orientation = DaffCardOrientationEnum.Vertical;
|
4630
|
-
}
|
4631
|
-
else {
|
4632
|
-
this._orientation = value;
|
4633
|
-
}
|
4634
|
-
}
|
4635
|
-
;
|
4636
|
-
initCardType() {
|
4637
|
-
const values = Object.keys(DaffCardTypeEnum).map((k) => DaffCardTypeEnum[k]);
|
4638
|
-
if (values.indexOf(this._getHostElement().localName) >= 0) {
|
4639
|
-
return this._getHostElement().localName;
|
4640
|
-
}
|
4641
|
-
for (const attr of values) {
|
4642
|
-
if (this._hasHostAttributes(attr)) {
|
4643
|
-
return attr;
|
4644
|
-
}
|
4645
|
-
}
|
4646
|
-
return null;
|
4647
|
-
}
|
4648
|
-
/**
|
4649
|
-
* @docs-private
|
4650
|
-
*/
|
4651
|
-
ngOnInit() {
|
4652
|
-
if (this.cardType) {
|
4653
|
-
this.elementRef.nativeElement.classList.add(this.cardType);
|
4654
|
-
}
|
4655
|
-
}
|
4656
|
-
/**
|
4657
|
-
* @docs-private
|
4658
|
-
*/
|
4659
|
-
get verticalClass() {
|
4660
|
-
return this.orientation === DaffCardOrientationEnum.Vertical;
|
4661
|
-
}
|
4662
|
-
/**
|
4663
|
-
* @docs-private
|
4664
|
-
*/
|
4665
|
-
get horizontalClass() {
|
4666
|
-
return this.orientation === DaffCardOrientationEnum.Horizontal;
|
4667
|
-
}
|
4668
|
-
_getHostElement() {
|
4669
|
-
return this.elementRef.nativeElement;
|
4670
|
-
}
|
4671
|
-
/**
|
4672
|
-
* Gets whether the button has one of the given attributes.
|
4673
|
-
* */
|
4674
|
-
_hasHostAttributes(...attributes) {
|
4675
|
-
return attributes.some(attribute => this._getHostElement().hasAttribute(attribute));
|
4676
|
-
}
|
4677
|
-
}
|
4678
|
-
DaffCardComponent.decorators = [
|
4679
|
-
{ type: Component, args: [{
|
4680
|
-
selector: 'daff-card' + ',' +
|
4681
|
-
'daff-raised-card' + ',' +
|
4682
|
-
'daff-stroked-card' + ',' +
|
4683
|
-
'a[daff-card]' + ',' +
|
4684
|
-
'a[daff-raised-card]' + ',' +
|
4685
|
-
'a[daff-stroked-card]',
|
4686
|
-
template: "<ng-content select=\"[daffCardImage]\"></ng-content>\n<div class=\"daff-card__wrapper\">\n\t<div class=\"daff-card__body\">\n\t\t<ng-content select=\"[daffCardIcon]\"></ng-content>\n\t\t<ng-content select=\"[daffCardTagline]\"></ng-content>\n\t\t<ng-content select=\"[daffCardTitle]\"></ng-content>\n\t\t<ng-content select=\"[daffCardContent]\"></ng-content>\n\t</div>\n\t<ng-content select=\"[daffCardActions]\"></ng-content>\n</div>",
|
4687
|
-
encapsulation: ViewEncapsulation.None,
|
4688
|
-
//todo(damienwebdev): remove once decorators hit stage 3 - https://github.com/microsoft/TypeScript/issues/7342
|
4689
|
-
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
4690
|
-
inputs: ['color'],
|
4691
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
4692
|
-
styles: [".daff-card{display:flex;border-radius:8px}.daff-card__image{display:inline-block;width:100%}.daff-card--vertical{flex-direction:column}.daff-card--vertical .daff-card__image,.daff-card--vertical .daff-card__image img{border-top-left-radius:calc(8px - 1px);border-top-right-radius:calc(8px - 1px)}.daff-card--horizontal{flex-wrap:wrap}@media (min-width:480px){.daff-card--horizontal{flex-direction:row;flex-wrap:nowrap}}.daff-card--horizontal .daff-card__image,.daff-card--horizontal .daff-card__image img{border-top-left-radius:calc(8px - 1px);border-bottom-left-radius:calc(8px - 1px)}.daff-card--horizontal .daff-card__image img{-o-object-fit:cover;object-fit:cover;-o-object-position:center center;object-position:center center;height:100%!important;width:100%}.daff-card__icon{display:block;margin:0 0 .5rem}.daff-card__tagline{text-transform:uppercase;font-size:.875rem;font-weight:600;letter-spacing:.03125rem;line-height:1rem;padding:0;margin:0 0 .25rem}.daff-card__title{font-weight:700;font-size:1.375rem;line-height:1.5rem;margin:0 0 1rem}@media (min-width:480px){.daff-card__title{font-size:1.5rem;line-height:1.75rem}}.daff-card__body{padding:1.5rem}.daff-card__content p:first-of-type{margin-top:0}.daff-card__content p:last-of-type{margin-bottom:0}.daff-card__actions{padding:0 1.5rem 1.5rem}a.daff-card,a.daff-raised-card,a.daff-stroked-card{text-decoration:none;transition:background-color .3s,box-shadow .3s}"]
|
4693
|
-
},] }
|
4694
|
-
];
|
4695
|
-
/** @nocollapse */
|
4696
|
-
DaffCardComponent.ctorParameters = () => [
|
4697
|
-
{ type: ElementRef },
|
4698
|
-
{ type: Renderer2 }
|
4699
|
-
];
|
4700
|
-
DaffCardComponent.propDecorators = {
|
4701
|
-
orientation: [{ type: Input }],
|
4702
|
-
class: [{ type: HostBinding, args: ['class.daff-card',] }],
|
4703
|
-
verticalClass: [{ type: HostBinding, args: ['class.daff-card--vertical',] }],
|
4704
|
-
horizontalClass: [{ type: HostBinding, args: ['class.daff-card--horizontal',] }]
|
4705
|
-
};
|
4706
|
-
|
4707
|
-
class DaffCardModule {
|
4708
|
-
}
|
4709
|
-
DaffCardModule.decorators = [
|
4710
|
-
{ type: NgModule, args: [{
|
4711
|
-
imports: [
|
4712
|
-
CommonModule,
|
4713
|
-
],
|
4714
|
-
declarations: [
|
4715
|
-
DaffCardComponent,
|
4716
|
-
DaffCardIconDirective,
|
4717
|
-
DaffCardImageDirective,
|
4718
|
-
DaffCardTaglineDirective,
|
4719
|
-
DaffCardTitleDirective,
|
4720
|
-
DaffCardContentDirective,
|
4721
|
-
DaffCardActionsDirective,
|
4722
|
-
],
|
4723
|
-
exports: [
|
4724
|
-
DaffCardComponent,
|
4725
|
-
DaffCardIconDirective,
|
4726
|
-
DaffCardImageDirective,
|
4727
|
-
DaffCardTaglineDirective,
|
4728
|
-
DaffCardTitleDirective,
|
4729
|
-
DaffCardContentDirective,
|
4730
|
-
DaffCardActionsDirective,
|
4731
|
-
],
|
4732
|
-
},] }
|
4733
|
-
];
|
4734
|
-
|
4735
|
-
var DaffBreakpoints;
|
4736
|
-
(function (DaffBreakpoints) {
|
4737
|
-
DaffBreakpoints["DESKTOP"] = "(min-width: 1920px)";
|
4738
|
-
DaffBreakpoints["LAPTOP"] = "(min-width: 1440px)";
|
4739
|
-
DaffBreakpoints["SMALL_LAPTOP"] = "(min-width: 1200px)";
|
4740
|
-
DaffBreakpoints["BIG_TABLET"] = "(min-width: 1024px)";
|
4741
|
-
DaffBreakpoints["TABLET"] = "(min-width: 768px)";
|
4742
|
-
DaffBreakpoints["MOBILE"] = "(min-width: 480px)";
|
4743
|
-
})(DaffBreakpoints || (DaffBreakpoints = {}));
|
4744
|
-
|
4745
|
-
/**
|
4746
|
-
* A basic constructor type useful for mixins
|
4747
|
-
* See https://blog.mariusschulz.com/2017/05/26/typescript-2-2-mixin-classes
|
4748
|
-
* for a really good explanation of why mixins are useful.
|
4749
|
-
*/
|
4750
|
-
|
4751
|
-
var DaffStatusEnum;
|
4752
|
-
(function (DaffStatusEnum) {
|
4753
|
-
DaffStatusEnum["Warn"] = "warn";
|
4754
|
-
DaffStatusEnum["Danger"] = "danger";
|
4755
|
-
DaffStatusEnum["Success"] = "success";
|
4756
|
-
})(DaffStatusEnum || (DaffStatusEnum = {}));
|
4757
|
-
|
4758
|
-
var DaffTextAlignmentEnum;
|
4759
|
-
(function (DaffTextAlignmentEnum) {
|
4760
|
-
DaffTextAlignmentEnum["Left"] = "left";
|
4761
|
-
DaffTextAlignmentEnum["Center"] = "center";
|
4762
|
-
DaffTextAlignmentEnum["Right"] = "right";
|
4763
|
-
})(DaffTextAlignmentEnum || (DaffTextAlignmentEnum = {}));
|
4764
|
-
|
4765
|
-
// Core
|
4766
|
-
|
4767
|
-
/*
|
4768
|
-
* Public API Surface of @daffodil/design
|
4769
|
-
*/
|
4770
|
-
|
4771
|
-
/**
|
4772
|
-
* Generated bundle index. Do not edit.
|
4773
|
-
*/
|
4774
|
-
|
4775
|
-
export { DaffAccordionComponent, DaffAccordionItemComponent, DaffAccordionItemContentDirective, DaffAccordionItemTitleDirective, DaffAccordionModule, DaffArticleComponent, DaffArticleLeadDirective, DaffArticleMetaDirective, DaffArticleModule, DaffArticleTitleDirective, DaffBackdropComponent, DaffBackdropModule, DaffBreakpoints, DaffButtonComponent, DaffButtonModule, DaffButtonSetComponent, DaffButtonSetModule, DaffCalloutBodyDirective, DaffCalloutComponent, DaffCalloutIconDirective, DaffCalloutLayoutEnum, DaffCalloutModule, DaffCalloutSizeEnum, DaffCalloutSubtitleDirective, DaffCalloutTaglineDirective, DaffCalloutTitleDirective, DaffCardActionsDirective, DaffCardComponent, DaffCardContentDirective, DaffCardIconDirective, DaffCardImageDirective, DaffCardModule, DaffCardOrientationEnum, DaffCardTaglineDirective, DaffCardTitleDirective, DaffCheckboxComponent, DaffCheckboxControlValueAccessorDirective, DaffCheckboxModule, DaffCheckboxSetComponent, DaffContainerComponent, DaffContainerModule, DaffErrorMessageComponent, DaffErrorMessageModule, DaffErrorStateMatcher, DaffFeatureComponent, DaffFeatureIconDirective, DaffFeatureModeEnum, DaffFeatureModule, DaffFeatureSubheaderDirective, DaffFeatureSubtitleDirective, DaffFeatureTitleDirective, DaffFormFieldComponent, DaffFormFieldControl, DaffFormFieldModule, DaffGalleryImageComponent, DaffHeroBodyDirective, DaffHeroComponent, DaffHeroIconDirective, DaffHeroLayoutEnum, DaffHeroModule, DaffHeroSizeEnum, DaffHeroSubtitleDirective, DaffHeroTaglineDirective, DaffHeroTitleDirective, DaffImageComponent, DaffImageGalleryComponent, DaffImageGalleryModule, DaffImageListComponent, DaffImageListModule, DaffImageModule, DaffInputComponent, DaffInputModule, DaffLinkSetComponent, DaffLinkSetHeadingDirective, DaffLinkSetItemComponent, DaffLinkSetModule, DaffLinkSetSubheadingDirective, DaffListComponent, DaffListItemComponent, DaffListModeEnum, DaffListModule, DaffListSubheaderDirective, DaffLoadingIconComponent, DaffLoadingIconModule, DaffMediaGalleryComponent, DaffMediaGalleryModule, DaffModalActionsComponent, DaffModalComponent, DaffModalContentComponent, DaffModalHeaderComponent, DaffModalModule, DaffModalService, DaffModalTitleDirective, DaffNativeSelectComponent, DaffNativeSelectModule, DaffNavbarComponent, DaffNavbarModule, DaffPaginatorComponent, DaffPaginatorModule, DaffPrefixDirective, DaffPrefixSuffixModule, DaffProgressIndicatorComponent, DaffProgressIndicatorModule, DaffQtyDropdownComponent, DaffQtyDropdownModule, DaffQuantityFieldComponent, DaffQuantityFieldModule, DaffQuantityInputComponent, DaffQuantitySelectComponent, DaffRadioComponent, DaffRadioControlValueAccessorDirective, DaffRadioModule, DaffRadioSetComponent, DaffSidebarComponent, DaffSidebarModule, DaffSidebarViewportComponent, DaffStatusEnum, DaffSuffixDirective, DaffTextAlignmentEnum, DaffThumbnailDirective, daffArticleEncapsulatedMixin, daffCompactableMixin, daffManageContainerLayoutMixin, daffPrefixableMixin, daffSuffixableMixin, daffThumbnailCompatToken, daffProgressIndicatorAnimation as ɵa, DaffRadioRegistry as ɵb, daffAccordionAnimations as ɵc, DaffNavAccordionItemComponent as ɵd, daffBackdropAnimations as ɵe, DAFF_MEDIA_GALLERY_TOKEN as ɵf, DaffMediaGalleryRegistry as ɵg, DaffMediaRendererComponent as ɵi, daffFadeAnimations as ɵj, daffSidebarAnimations as ɵk };
|
4776
|
-
//# sourceMappingURL=daffodil-design.js.map
|