@daffodil/design 0.71.0 → 0.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -40
- package/accordion/accordion/accordion-item/accordion-item.component.d.ts +1 -3
- package/accordion/accordion.module.d.ts +4 -5
- package/accordion/public_api.d.ts +0 -1
- package/article/README.md +0 -5
- package/article/article.module.d.ts +3 -5
- package/article/examples/article-examples.module.d.ts +8 -9
- package/article/examples/public_api.d.ts +0 -1
- package/article/public_api.d.ts +0 -2
- package/atoms/form/quantity-field/quantity-field.component.d.ts +2 -1
- package/callout/callout/callout.component.d.ts +1 -31
- package/esm2022/accordion/accordion/accordion-item/accordion-item.component.mjs +2 -5
- package/esm2022/accordion/accordion.module.mjs +3 -8
- package/esm2022/accordion/examples/basic-accordion/basic-accordion.component.mjs +1 -1
- package/esm2022/accordion/public_api.mjs +1 -2
- package/esm2022/article/article/article.component.mjs +2 -2
- package/esm2022/article/article.module.mjs +1 -11
- package/esm2022/article/examples/article-examples.module.mjs +7 -8
- package/esm2022/article/examples/examples.mjs +1 -3
- package/esm2022/article/examples/public_api.mjs +1 -2
- package/esm2022/article/public_api.mjs +1 -3
- package/esm2022/atoms/form/quantity-field/quantity-field.component.mjs +7 -4
- package/esm2022/callout/callout/callout.component.mjs +5 -35
- package/esm2022/callout/examples/callout-text-alignment/callout-text-alignment.component.mjs +1 -1
- package/esm2022/callout/examples/callout-theming/callout-theming.component.mjs +1 -1
- package/esm2022/callout/examples/callout-with-grid/callout-with-grid.component.mjs +1 -1
- package/esm2022/callout/examples/compact-callout/compact-callout.component.mjs +1 -1
- package/esm2022/hero/examples/compact-hero/compact-hero.component.mjs +1 -1
- package/esm2022/hero/examples/hero-text-alignment/hero-text-alignment.component.mjs +1 -1
- package/esm2022/hero/examples/hero-theming/hero-theming.component.mjs +1 -1
- package/esm2022/hero/examples/hero-with-grid/hero-with-grid.component.mjs +1 -1
- package/esm2022/hero/hero/hero.component.mjs +5 -36
- package/esm2022/list/examples/basic-list/basic-list.component.mjs +1 -1
- package/esm2022/list/examples/icon-list/icon-list.component.mjs +1 -1
- package/esm2022/list/examples/multiline-list/multiline-list.component.mjs +1 -1
- package/esm2022/list/examples/nav-list/nav-list.component.mjs +1 -1
- package/esm2022/list/list/list.component.mjs +5 -43
- package/esm2022/list/list.module.mjs +1 -6
- package/esm2022/list/public_api.mjs +1 -2
- package/esm2022/menu/menu-activator/menu-activator.component.mjs +1 -1
- package/esm2022/notification/examples/default-notification/default-notification.component.mjs +1 -1
- package/esm2022/notification/examples/{dismissable-notification/dismissable-notification.component.mjs → dismissible-notification/dismissible-notification.component.mjs} +6 -6
- package/esm2022/notification/examples/{dismissable-notification/dismissable-notification.module.mjs → dismissible-notification/dismissible-notification.module.mjs} +10 -10
- package/esm2022/notification/examples/notification-orientations/notification-orientations.component.mjs +1 -1
- package/esm2022/notification/examples/notification-status/notification-status.component.mjs +1 -1
- package/esm2022/notification/examples/public_api.mjs +4 -4
- package/esm2022/notification/notification/notification.component.mjs +6 -6
- package/esm2022/paginator/examples/basic-paginator/basic-paginator.component.mjs +1 -1
- package/esm2022/paginator/examples/link-paginator/link-paginator.component.mjs +1 -1
- package/esm2022/paginator/paginator/paginator.component.mjs +8 -24
- package/esm2022/public_api.mjs +1 -8
- package/esm2022/quantity-field/examples/basic-quantity-field/basic-quantity-field.component.mjs +1 -1
- package/esm2022/quantity-field/examples/custom-range-quantity-field/custom-range-quantity-field.component.mjs +1 -1
- package/esm2022/quantity-field/examples/disabled-quantity-field/disabled-quantity-field.component.mjs +1 -1
- package/esm2022/quantity-field/examples/select-max-quantity-field/select-max-quantity-field.component.mjs +1 -1
- package/esm2022/sidebar/sidebar-viewport-backdrop/sidebar-viewport-backdrop.component.mjs +1 -5
- package/esm2022/tree/tree-item/tree-item.directive.mjs +4 -2
- package/fesm2022/daffodil-design-accordion-examples.mjs +1 -1
- package/fesm2022/daffodil-design-accordion-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-accordion.mjs +4 -34
- package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
- package/fesm2022/daffodil-design-article-examples.mjs +2 -12
- package/fesm2022/daffodil-design-article-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-article.mjs +3 -51
- package/fesm2022/daffodil-design-article.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout-examples.mjs +4 -4
- package/fesm2022/daffodil-design-callout-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout.mjs +5 -35
- package/fesm2022/daffodil-design-callout.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero-examples.mjs +4 -4
- package/fesm2022/daffodil-design-hero-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero.mjs +5 -36
- package/fesm2022/daffodil-design-hero.mjs.map +1 -1
- package/fesm2022/daffodil-design-list-examples.mjs +4 -4
- package/fesm2022/daffodil-design-list-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-list.mjs +5 -70
- package/fesm2022/daffodil-design-list.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification-examples.mjs +17 -17
- package/fesm2022/daffodil-design-notification-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +5 -5
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator-examples.mjs +2 -2
- package/fesm2022/daffodil-design-paginator-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator.mjs +6 -22
- package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
- package/fesm2022/daffodil-design-quantity-field-examples.mjs +4 -4
- package/fesm2022/daffodil-design-quantity-field-examples.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +0 -4
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree.mjs +3 -1
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +64 -602
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/hero/README.md +0 -6
- package/hero/hero/hero.component.d.ts +1 -32
- package/list/README.md +0 -7
- package/list/list/list.component.d.ts +1 -30
- package/list/list.module.d.ts +4 -5
- package/list/public_api.d.ts +0 -1
- package/list/src/list-theme.scss +0 -34
- package/menu/README.md +15 -3
- package/notification/examples/dismissible-notification/dismissible-notification.component.d.ts +6 -0
- package/notification/examples/dismissible-notification/dismissible-notification.module.d.ts +11 -0
- package/notification/notification/notification.component.d.ts +2 -2
- package/package.json +1 -1
- package/paginator/paginator/paginator.component.d.ts +4 -24
- package/paginator/src/paginator-theme.scss +0 -55
- package/public_api.d.ts +0 -6
- package/scss/theme.scss +0 -2
- package/scss/typography/_classes.scss +0 -5
- package/scss/typography/_index.scss +0 -1
- package/scss/typography/mixins/_text-truncate.scss +1 -6
- package/sidebar/sidebar-viewport-backdrop/sidebar-viewport-backdrop.component.d.ts +0 -4
- package/accordion/accordion/accordion-item-content/accordion-item-content.directive.d.ts +0 -12
- package/article/article-lead/article-lead.directive.d.ts +0 -9
- package/article/article-title/article-title.directive.d.ts +0 -9
- package/article/examples/article-lead/article-lead.component.d.ts +0 -5
- package/atoms/progress-indicator/animation/progress-indicator-animation.d.ts +0 -4
- package/atoms/progress-indicator/progress-indicator.component.d.ts +0 -57
- package/atoms/progress-indicator/progress-indicator.module.d.ts +0 -8
- package/atoms/progress-indicator/public_api.d.ts +0 -2
- package/esm2022/accordion/accordion/accordion-item-content/accordion-item-content.directive.mjs +0 -25
- package/esm2022/article/article-lead/article-lead.directive.mjs +0 -22
- package/esm2022/article/article-title/article-title.directive.mjs +0 -22
- package/esm2022/article/examples/article-lead/article-lead.component.mjs +0 -12
- package/esm2022/atoms/progress-indicator/animation/progress-indicator-animation.mjs +0 -8
- package/esm2022/atoms/progress-indicator/progress-indicator.component.mjs +0 -82
- package/esm2022/atoms/progress-indicator/progress-indicator.module.mjs +0 -20
- package/esm2022/atoms/progress-indicator/public_api.mjs +0 -3
- package/esm2022/list/list-subheader/list-subheader.directive.mjs +0 -25
- package/esm2022/molecules/button-set/button-set.component.mjs +0 -23
- package/esm2022/molecules/button-set/button-set.module.mjs +0 -20
- package/esm2022/molecules/button-set/public_api.mjs +0 -3
- package/esm2022/molecules/feature/feature/feature.component.mjs +0 -49
- package/esm2022/molecules/feature/feature-icon/feature-icon.directive.mjs +0 -22
- package/esm2022/molecules/feature/feature-subheader/feature-subheader.directive.mjs +0 -22
- package/esm2022/molecules/feature/feature-subtitle/feature-subtitle.directive.mjs +0 -22
- package/esm2022/molecules/feature/feature-title/feature-title.directive.mjs +0 -22
- package/esm2022/molecules/feature/feature.module.mjs +0 -44
- package/esm2022/molecules/feature/public_api.mjs +0 -7
- package/esm2022/molecules/image-gallery/gallery-image/gallery-image.component.mjs +0 -25
- package/esm2022/molecules/image-gallery/image-gallery/image-gallery.component.mjs +0 -15
- package/esm2022/molecules/image-gallery/image-gallery.module.mjs +0 -33
- package/esm2022/molecules/image-gallery/public_api.mjs +0 -4
- package/esm2022/molecules/image-list/image-list.component.mjs +0 -20
- package/esm2022/molecules/image-list/image-list.module.mjs +0 -24
- package/esm2022/molecules/image-list/public_api.mjs +0 -3
- package/esm2022/molecules/qty-dropdown/public_api.mjs +0 -3
- package/esm2022/molecules/qty-dropdown/qty-dropdown.component.mjs +0 -113
- package/esm2022/molecules/qty-dropdown/qty-dropdown.module.mjs +0 -40
- package/list/list-subheader/list-subheader.directive.d.ts +0 -12
- package/molecules/button-set/button-set.component.d.ts +0 -12
- package/molecules/button-set/button-set.module.d.ts +0 -7
- package/molecules/button-set/public_api.d.ts +0 -2
- package/molecules/feature/feature/feature.component.d.ts +0 -26
- package/molecules/feature/feature-icon/feature-icon.directive.d.ts +0 -9
- package/molecules/feature/feature-subheader/feature-subheader.directive.d.ts +0 -9
- package/molecules/feature/feature-subtitle/feature-subtitle.directive.d.ts +0 -9
- package/molecules/feature/feature-title/feature-title.directive.d.ts +0 -9
- package/molecules/feature/feature.module.d.ts +0 -12
- package/molecules/feature/public_api.d.ts +0 -6
- package/molecules/image-gallery/gallery-image/gallery-image.component.d.ts +0 -10
- package/molecules/image-gallery/image-gallery/image-gallery.component.d.ts +0 -8
- package/molecules/image-gallery/image-gallery.module.d.ts +0 -10
- package/molecules/image-gallery/public_api.d.ts +0 -3
- package/molecules/image-list/image-list.component.d.ts +0 -9
- package/molecules/image-list/image-list.module.d.ts +0 -8
- package/molecules/image-list/public_api.d.ts +0 -2
- package/molecules/qty-dropdown/public_api.d.ts +0 -2
- package/molecules/qty-dropdown/qty-dropdown.component.d.ts +0 -61
- package/molecules/qty-dropdown/qty-dropdown.module.d.ts +0 -12
- package/notification/examples/dismissable-notification/dismissable-notification.component.d.ts +0 -6
- package/notification/examples/dismissable-notification/dismissable-notification.module.d.ts +0 -11
- package/scss/daff-global.scss +0 -5
- package/scss/daff-typography.scss +0 -55
- package/scss/daff-util.scss +0 -5
- package/scss/typography/mixins/_text-transform.scss +0 -4
- package/src/atoms/progress-indicator/progress-indicator-theme.scss +0 -60
@@ -6,11 +6,10 @@ import * as i2$1 from '@fortawesome/angular-fontawesome';
|
|
6
6
|
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
7
7
|
import { faChevronDown } from '@fortawesome/free-solid-svg-icons';
|
8
8
|
import * as i1 from '@angular/forms';
|
9
|
-
import { UntypedFormControl, ReactiveFormsModule
|
9
|
+
import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms';
|
10
10
|
import { coerceNumberProperty } from '@angular/cdk/coercion';
|
11
11
|
import { Subject, fromEventPattern, of, merge, fromEvent, EMPTY, combineLatest } from 'rxjs';
|
12
12
|
import { takeUntil, startWith, map, catchError, filter, shareReplay } from 'rxjs/operators';
|
13
|
-
import { trigger, state, style, transition, animate } from '@angular/animations';
|
14
13
|
import { DaffServerSafePersistenceServiceToken } from '@daffodil/core';
|
15
14
|
|
16
15
|
class DaffErrorStateMatcher {
|
@@ -859,6 +858,7 @@ class DaffQuantityFieldComponent {
|
|
859
858
|
* before it becomes an input element.
|
860
859
|
*/
|
861
860
|
this.selectMax = 10;
|
861
|
+
this.id = '';
|
862
862
|
this.disabled = false;
|
863
863
|
this._quantity = 1;
|
864
864
|
this._inputHasBeenShown = false;
|
@@ -892,13 +892,13 @@ class DaffQuantityFieldComponent {
|
|
892
892
|
}
|
893
893
|
}
|
894
894
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffQuantityFieldComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
895
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.10", type: DaffQuantityFieldComponent, selector: "daff-quantity-field", inputs: { min: "min", max: "max", selectMax: "selectMax" }, providers: [
|
895
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.10", type: DaffQuantityFieldComponent, selector: "daff-quantity-field", inputs: { min: "min", max: "max", selectMax: "selectMax", id: "id" }, providers: [
|
896
896
|
{
|
897
897
|
provide: DaffFormFieldControl,
|
898
898
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
899
899
|
useExisting: DaffQuantityFieldComponent,
|
900
900
|
},
|
901
|
-
], viewQueries: [{ propertyName: "input", first: true, predicate: DaffQuantityInputComponent, descendants: true }, { propertyName: "select", first: true, predicate: DaffQuantitySelectComponent, descendants: true }], ngImport: i0, template: "<daff-quantity-select\n *ngIf=\"showSelectField\"\n [min]=\"min\"
|
901
|
+
], viewQueries: [{ propertyName: "input", first: true, predicate: DaffQuantityInputComponent, descendants: true }, { propertyName: "select", first: true, predicate: DaffQuantitySelectComponent, descendants: true }], ngImport: i0, template: "<daff-quantity-select\n *ngIf=\"showSelectField\"\n [min]=\"min\"\n [max]=\"_maxFloor\"\n [extendable]=\"max > selectMax\"\n [id]=\"id\">\n</daff-quantity-select>\n<daff-quantity-input\n *ngIf=\"showInputField\"\n [min]=\"min\"\n [max]=\"max\"\n [id]=\"id\">\n</daff-quantity-input>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DaffQuantityInputComponent, selector: "daff-quantity-input", inputs: ["min", "max"] }, { kind: "component", type: DaffQuantitySelectComponent, selector: "daff-quantity-select", inputs: ["min", "max", "extendable"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
902
902
|
}
|
903
903
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffQuantityFieldComponent, decorators: [{
|
904
904
|
type: Component,
|
@@ -908,7 +908,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImpo
|
|
908
908
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
909
909
|
useExisting: DaffQuantityFieldComponent,
|
910
910
|
},
|
911
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<daff-quantity-select\n *ngIf=\"showSelectField\"\n [min]=\"min\"
|
911
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<daff-quantity-select\n *ngIf=\"showSelectField\"\n [min]=\"min\"\n [max]=\"_maxFloor\"\n [extendable]=\"max > selectMax\"\n [id]=\"id\">\n</daff-quantity-select>\n<daff-quantity-input\n *ngIf=\"showInputField\"\n [min]=\"min\"\n [max]=\"max\"\n [id]=\"id\">\n</daff-quantity-input>\n" }]
|
912
912
|
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
913
913
|
type: Optional
|
914
914
|
}, {
|
@@ -925,6 +925,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImpo
|
|
925
925
|
type: Input
|
926
926
|
}], selectMax: [{
|
927
927
|
type: Input
|
928
|
+
}], id: [{
|
929
|
+
type: Input
|
928
930
|
}] } });
|
929
931
|
|
930
932
|
class DaffQuantityFieldModule {
|
@@ -964,163 +966,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImpo
|
|
964
966
|
}]
|
965
967
|
}] });
|
966
968
|
|
967
|
-
const daffProgressIndicatorAnimation = {
|
968
|
-
fill: trigger('fill', [
|
969
|
-
state('*', style({ width: '{{ percentage }}%' }), { params: { percentage: 0 } }),
|
970
|
-
transition('* <=> *', animate(1000)),
|
971
|
-
]),
|
972
|
-
};
|
973
|
-
|
974
|
-
var DaffPaletteEnum;
|
975
|
-
(function (DaffPaletteEnum) {
|
976
|
-
DaffPaletteEnum["PRIMARY"] = "primary";
|
977
|
-
DaffPaletteEnum["SECONDARY"] = "secondary";
|
978
|
-
DaffPaletteEnum["ACCENT"] = "accent";
|
979
|
-
DaffPaletteEnum["TERTIARY"] = "tertiary";
|
980
|
-
DaffPaletteEnum["BLACK"] = "black";
|
981
|
-
DaffPaletteEnum["WHITE"] = "white";
|
982
|
-
DaffPaletteEnum["THEME"] = "theme";
|
983
|
-
DaffPaletteEnum["THEMECONTRAST"] = "theme-contrast";
|
984
|
-
})(DaffPaletteEnum || (DaffPaletteEnum = {}));
|
985
|
-
|
986
|
-
function colorInPalette(color) {
|
987
|
-
return Object.values(DaffPaletteEnum).includes(color);
|
988
|
-
}
|
989
|
-
|
990
|
-
/**
|
991
|
-
* This should be a trait, but typescript only supports mixins.
|
992
|
-
* See: https://github.com/Microsoft/TypeScript/issues/311
|
993
|
-
*
|
994
|
-
* Turns out the material team followed the same path with the color mixin.
|
995
|
-
* https://github.com/angular/material2/blob/master/src/lib/core/common-behaviors/color.ts
|
996
|
-
*/
|
997
|
-
function daffColorMixin(Base, defaultColor) {
|
998
|
-
class DaffColorableMixinClass extends Base {
|
999
|
-
get color() {
|
1000
|
-
return this._color;
|
1001
|
-
}
|
1002
|
-
set color(value) {
|
1003
|
-
//Handle the default color
|
1004
|
-
const incomingColor = value || defaultColor;
|
1005
|
-
if (incomingColor !== undefined && !colorInPalette(incomingColor)) {
|
1006
|
-
throw new TypeError(incomingColor + ' is not a valid color for the DaffPalette');
|
1007
|
-
}
|
1008
|
-
if (incomingColor !== this._color) { //Only run the dom-render if a change occurs
|
1009
|
-
//Remove the old color
|
1010
|
-
if (this._color) {
|
1011
|
-
this._renderer.removeClass(this._elementRef.nativeElement, `daff-${this._color}`);
|
1012
|
-
}
|
1013
|
-
if (incomingColor) {
|
1014
|
-
this._renderer.addClass(this._elementRef.nativeElement, `daff-${incomingColor}`);
|
1015
|
-
}
|
1016
|
-
this._color = incomingColor;
|
1017
|
-
}
|
1018
|
-
}
|
1019
|
-
constructor(...args) {
|
1020
|
-
super(...args);
|
1021
|
-
this.color = defaultColor;
|
1022
|
-
}
|
1023
|
-
}
|
1024
|
-
;
|
1025
|
-
// TODO: ugly workaround for https://github.com/microsoft/TypeScript/issues/7342#issuecomment-624298133
|
1026
|
-
Input()(DaffColorableMixinClass.prototype, 'color');
|
1027
|
-
return DaffColorableMixinClass;
|
1028
|
-
}
|
1029
|
-
|
1030
|
-
/**
|
1031
|
-
* An _elementRef and an instance of renderer2 are needed for the Colorable mixin
|
1032
|
-
*/
|
1033
|
-
class DaffProgressIndicatorBase {
|
1034
|
-
constructor(_elementRef, _renderer) {
|
1035
|
-
this._elementRef = _elementRef;
|
1036
|
-
this._renderer = _renderer;
|
1037
|
-
}
|
1038
|
-
}
|
1039
|
-
const _daffProgressIndicatorBase = daffColorMixin(DaffProgressIndicatorBase, 'primary');
|
1040
|
-
/**
|
1041
|
-
* @deprecated in v1.0.0
|
1042
|
-
* Use `DaffProgressBarComponent` instead.
|
1043
|
-
*/
|
1044
|
-
class DaffProgressIndicatorComponent extends _daffProgressIndicatorBase {
|
1045
|
-
/**
|
1046
|
-
* Calculates when the progress animation is fully completed
|
1047
|
-
*
|
1048
|
-
* @param event: AnimationEvent
|
1049
|
-
*/
|
1050
|
-
onAnimationComplete(event) {
|
1051
|
-
// @ts-expect-error: @angular/animations typing error on event.toState as string
|
1052
|
-
// See: https://github.com/angular/angular/issues/26507
|
1053
|
-
if (event.toState === '100' || event.toState === 100) {
|
1054
|
-
this.finished.emit();
|
1055
|
-
}
|
1056
|
-
}
|
1057
|
-
/**
|
1058
|
-
* @docs-private
|
1059
|
-
*/
|
1060
|
-
get fillState() {
|
1061
|
-
return {
|
1062
|
-
value: this.percentage,
|
1063
|
-
params: {
|
1064
|
-
percentage: this.percentage,
|
1065
|
-
},
|
1066
|
-
};
|
1067
|
-
}
|
1068
|
-
constructor(elementRef, renderer) {
|
1069
|
-
super(elementRef, renderer);
|
1070
|
-
this.elementRef = elementRef;
|
1071
|
-
this.renderer = renderer;
|
1072
|
-
/**
|
1073
|
-
* @docs-private
|
1074
|
-
*/
|
1075
|
-
this.class = true;
|
1076
|
-
/**
|
1077
|
-
* The percentage completion of the progression,
|
1078
|
-
* expressed as a whole number between 0 and 100.
|
1079
|
-
*
|
1080
|
-
*/
|
1081
|
-
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
1082
|
-
this.percentage = 0;
|
1083
|
-
/**
|
1084
|
-
* An event that emits each time the progression reaches 100%
|
1085
|
-
* and the animation is finished
|
1086
|
-
*/
|
1087
|
-
this.finished = new EventEmitter();
|
1088
|
-
}
|
1089
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffProgressIndicatorComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
1090
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.10", type: DaffProgressIndicatorComponent, selector: "daff-progress-indicator", inputs: { color: "color", percentage: "percentage" }, outputs: { finished: "finished" }, host: { properties: { "class.daff-progress-indicator": "this.class" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"daff-progress-indicator__fill\" [@fill]=\"fillState\" (@fill.done)=\"onAnimationComplete($event)\"></div>", styles: [":host{display:flex;height:3px;width:100%}\n"], animations: [
|
1091
|
-
daffProgressIndicatorAnimation.fill,
|
1092
|
-
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
1093
|
-
}
|
1094
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffProgressIndicatorComponent, decorators: [{
|
1095
|
-
type: Component,
|
1096
|
-
args: [{ selector: 'daff-progress-indicator', changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['color'], animations: [
|
1097
|
-
daffProgressIndicatorAnimation.fill,
|
1098
|
-
], template: "<div class=\"daff-progress-indicator__fill\" [@fill]=\"fillState\" (@fill.done)=\"onAnimationComplete($event)\"></div>", styles: [":host{display:flex;height:3px;width:100%}\n"] }]
|
1099
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { class: [{
|
1100
|
-
type: HostBinding,
|
1101
|
-
args: ['class.daff-progress-indicator']
|
1102
|
-
}], percentage: [{
|
1103
|
-
type: Input
|
1104
|
-
}], finished: [{
|
1105
|
-
type: Output
|
1106
|
-
}] } });
|
1107
|
-
|
1108
|
-
class DaffProgressIndicatorModule {
|
1109
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffProgressIndicatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
1110
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.10", ngImport: i0, type: DaffProgressIndicatorModule, declarations: [DaffProgressIndicatorComponent], imports: [CommonModule], exports: [DaffProgressIndicatorComponent] }); }
|
1111
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffProgressIndicatorModule, imports: [CommonModule] }); }
|
1112
|
-
}
|
1113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffProgressIndicatorModule, decorators: [{
|
1114
|
-
type: NgModule,
|
1115
|
-
args: [{
|
1116
|
-
declarations: [DaffProgressIndicatorComponent],
|
1117
|
-
imports: [
|
1118
|
-
CommonModule,
|
1119
|
-
],
|
1120
|
-
exports: [DaffProgressIndicatorComponent],
|
1121
|
-
}]
|
1122
|
-
}] });
|
1123
|
-
|
1124
969
|
class DaffRadioSetComponent {
|
1125
970
|
constructor() {
|
1126
971
|
/**
|
@@ -1464,445 +1309,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImpo
|
|
1464
1309
|
}]
|
1465
1310
|
}] });
|
1466
1311
|
|
1467
|
-
/**
|
1468
|
-
* @deprecated in v1.0.0
|
1469
|
-
*/
|
1470
|
-
class DaffButtonSetComponent {
|
1471
|
-
constructor() {
|
1472
|
-
/**
|
1473
|
-
* @docs-private
|
1474
|
-
*/
|
1475
|
-
this.class = true;
|
1476
|
-
}
|
1477
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffButtonSetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
1478
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.10", type: DaffButtonSetComponent, selector: "daff-button-set", host: { properties: { "class.daff-button-set": "this.class" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, 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}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
1479
|
-
}
|
1480
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffButtonSetComponent, decorators: [{
|
1481
|
-
type: Component,
|
1482
|
-
args: [{ selector: 'daff-button-set', template: '<ng-content></ng-content>', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, 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}}\n"] }]
|
1483
|
-
}], propDecorators: { class: [{
|
1484
|
-
type: HostBinding,
|
1485
|
-
args: ['class.daff-button-set']
|
1486
|
-
}] } });
|
1487
|
-
|
1488
|
-
class DaffButtonSetModule {
|
1489
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffButtonSetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
1490
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.10", ngImport: i0, type: DaffButtonSetModule, declarations: [DaffButtonSetComponent], exports: [DaffButtonSetComponent] }); }
|
1491
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffButtonSetModule }); }
|
1492
|
-
}
|
1493
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffButtonSetModule, decorators: [{
|
1494
|
-
type: NgModule,
|
1495
|
-
args: [{
|
1496
|
-
declarations: [
|
1497
|
-
DaffButtonSetComponent,
|
1498
|
-
],
|
1499
|
-
exports: [
|
1500
|
-
DaffButtonSetComponent,
|
1501
|
-
],
|
1502
|
-
}]
|
1503
|
-
}] });
|
1504
|
-
|
1505
|
-
class DaffImageListComponent {
|
1506
|
-
constructor() {
|
1507
|
-
/**
|
1508
|
-
* @docs-private
|
1509
|
-
*/
|
1510
|
-
this.class = true;
|
1511
|
-
}
|
1512
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffImageListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
1513
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.10", type: DaffImageListComponent, selector: "daff-image-list", host: { properties: { "class.daff-image-list": "this.class" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
1514
|
-
}
|
1515
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffImageListComponent, decorators: [{
|
1516
|
-
type: Component,
|
1517
|
-
args: [{ selector: 'daff-image-list', template: '<ng-content></ng-content>', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }]
|
1518
|
-
}], propDecorators: { class: [{
|
1519
|
-
type: HostBinding,
|
1520
|
-
args: ['class.daff-image-list']
|
1521
|
-
}] } });
|
1522
|
-
|
1523
|
-
/**
|
1524
|
-
* @deprecated See {@link DaffMediaGalleryComponent}
|
1525
|
-
*/
|
1526
|
-
class DaffImageGalleryComponent {
|
1527
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffImageGalleryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
1528
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.10", type: DaffImageGalleryComponent, selector: "daff-image-gallery", ngImport: i0, 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", 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: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}\n"], dependencies: [{ kind: "component", type: DaffImageListComponent, selector: "daff-image-list" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
1529
|
-
}
|
1530
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffImageGalleryComponent, decorators: [{
|
1531
|
-
type: Component,
|
1532
|
-
args: [{ selector: 'daff-image-gallery', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, 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", 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: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}\n"] }]
|
1533
|
-
}] });
|
1534
|
-
|
1535
|
-
/**
|
1536
|
-
* @deprecated See {@link DaffThumbnailDirective}
|
1537
|
-
*/
|
1538
|
-
class DaffGalleryImageComponent {
|
1539
|
-
constructor() {
|
1540
|
-
this.class = true;
|
1541
|
-
}
|
1542
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffGalleryImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
1543
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.10", type: DaffGalleryImageComponent, selector: "daff-gallery-image", inputs: { selected: "selected" }, host: { properties: { "class.daff-image-gallery__daff-gallery-image--selected": "this.selected", "class.daff-image-gallery__daff-gallery-image": "this.class" } }, ngImport: i0, template: "<div class=\"gallery-image__wrapper\">\n <ng-content></ng-content>\n</div>", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
1544
|
-
}
|
1545
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffGalleryImageComponent, decorators: [{
|
1546
|
-
type: Component,
|
1547
|
-
args: [{ selector: 'daff-gallery-image', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"gallery-image__wrapper\">\n <ng-content></ng-content>\n</div>" }]
|
1548
|
-
}], propDecorators: { selected: [{
|
1549
|
-
type: HostBinding,
|
1550
|
-
args: ['class.daff-image-gallery__daff-gallery-image--selected']
|
1551
|
-
}, {
|
1552
|
-
type: Input
|
1553
|
-
}], class: [{
|
1554
|
-
type: HostBinding,
|
1555
|
-
args: ['class.daff-image-gallery__daff-gallery-image']
|
1556
|
-
}] } });
|
1557
|
-
|
1558
|
-
class DaffImageListModule {
|
1559
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffImageListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
1560
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.10", ngImport: i0, type: DaffImageListModule, declarations: [DaffImageListComponent], imports: [CommonModule], exports: [DaffImageListComponent] }); }
|
1561
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffImageListModule, imports: [CommonModule] }); }
|
1562
|
-
}
|
1563
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffImageListModule, decorators: [{
|
1564
|
-
type: NgModule,
|
1565
|
-
args: [{
|
1566
|
-
imports: [
|
1567
|
-
CommonModule,
|
1568
|
-
],
|
1569
|
-
declarations: [
|
1570
|
-
DaffImageListComponent,
|
1571
|
-
],
|
1572
|
-
exports: [
|
1573
|
-
DaffImageListComponent,
|
1574
|
-
],
|
1575
|
-
}]
|
1576
|
-
}] });
|
1577
|
-
|
1578
|
-
class DaffImageGalleryModule {
|
1579
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffImageGalleryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
1580
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.10", ngImport: i0, type: DaffImageGalleryModule, declarations: [DaffImageGalleryComponent,
|
1581
|
-
DaffGalleryImageComponent], imports: [CommonModule,
|
1582
|
-
DaffImageListModule], exports: [DaffImageGalleryComponent,
|
1583
|
-
DaffGalleryImageComponent] }); }
|
1584
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffImageGalleryModule, imports: [CommonModule,
|
1585
|
-
DaffImageListModule] }); }
|
1586
|
-
}
|
1587
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffImageGalleryModule, decorators: [{
|
1588
|
-
type: NgModule,
|
1589
|
-
args: [{
|
1590
|
-
imports: [
|
1591
|
-
CommonModule,
|
1592
|
-
DaffImageListModule,
|
1593
|
-
],
|
1594
|
-
declarations: [
|
1595
|
-
DaffImageGalleryComponent,
|
1596
|
-
DaffGalleryImageComponent,
|
1597
|
-
],
|
1598
|
-
exports: [
|
1599
|
-
DaffImageGalleryComponent,
|
1600
|
-
DaffGalleryImageComponent,
|
1601
|
-
],
|
1602
|
-
}]
|
1603
|
-
}] });
|
1604
|
-
|
1605
|
-
/**
|
1606
|
-
* @deprecated See {@link DaffQuantityFieldComponent}
|
1607
|
-
*/
|
1608
|
-
// ChangeDetection is ignored because this component is deprecated and will be removed
|
1609
|
-
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
1610
|
-
class DaffQtyDropdownComponent {
|
1611
|
-
constructor(renderer) {
|
1612
|
-
this.renderer = renderer;
|
1613
|
-
this.dropdownRange = 9;
|
1614
|
-
this.qtyChanged = new EventEmitter();
|
1615
|
-
/**
|
1616
|
-
* @docs-private
|
1617
|
-
*/
|
1618
|
-
this.onChange = (qty) => { };
|
1619
|
-
/**
|
1620
|
-
* @docs-private
|
1621
|
-
*/
|
1622
|
-
this.onTouched = () => { };
|
1623
|
-
}
|
1624
|
-
/**
|
1625
|
-
* @docs-private
|
1626
|
-
*/
|
1627
|
-
ngOnInit() {
|
1628
|
-
this.dropdownItemCounter = Array.from(Array(this.dropdownRange), (x, i) => i);
|
1629
|
-
if (!this.qty) {
|
1630
|
-
this.qty = 1;
|
1631
|
-
}
|
1632
|
-
}
|
1633
|
-
/**
|
1634
|
-
* @docs-private
|
1635
|
-
*/
|
1636
|
-
writeValue(qty) {
|
1637
|
-
this.qty = qty;
|
1638
|
-
this.onChange(this.qty);
|
1639
|
-
}
|
1640
|
-
/**
|
1641
|
-
* @docs-private
|
1642
|
-
*/
|
1643
|
-
registerOnChange(fn) {
|
1644
|
-
this.onChange = fn;
|
1645
|
-
}
|
1646
|
-
/**
|
1647
|
-
* @docs-private
|
1648
|
-
*/
|
1649
|
-
registerOnTouched(fn) {
|
1650
|
-
this.onTouched = fn;
|
1651
|
-
}
|
1652
|
-
/**
|
1653
|
-
* @docs-private
|
1654
|
-
*/
|
1655
|
-
setDisabledState(isDisabled) {
|
1656
|
-
if (this.inputHasBeenShown) {
|
1657
|
-
this.renderer.setProperty(document.getElementById('input_' + this.id), 'disabled', isDisabled);
|
1658
|
-
}
|
1659
|
-
else {
|
1660
|
-
this.renderer.setProperty(document.getElementById('select_' + this.id), 'disabled', isDisabled);
|
1661
|
-
}
|
1662
|
-
}
|
1663
|
-
/**
|
1664
|
-
* @docs-private
|
1665
|
-
*/
|
1666
|
-
get showQtyInputField() {
|
1667
|
-
if (!this.isQtyOutsideDropdownRange() && !this.inputHasBeenShown) {
|
1668
|
-
return false;
|
1669
|
-
}
|
1670
|
-
else {
|
1671
|
-
this.inputHasBeenShown = true;
|
1672
|
-
return true;
|
1673
|
-
}
|
1674
|
-
}
|
1675
|
-
/**
|
1676
|
-
* @docs-private
|
1677
|
-
*/
|
1678
|
-
onChangedWrapper(value) {
|
1679
|
-
value = parseInt(value, 10);
|
1680
|
-
if (value === 10) {
|
1681
|
-
this.selectInput();
|
1682
|
-
}
|
1683
|
-
this.qtyChanged.emit(value);
|
1684
|
-
this.onChange(value);
|
1685
|
-
}
|
1686
|
-
isQtyOutsideDropdownRange() {
|
1687
|
-
return this.qty > this.dropdownRange;
|
1688
|
-
}
|
1689
|
-
selectInput() {
|
1690
|
-
// TODO: readdress this method
|
1691
|
-
// why use `setTimeout` instead of angular patterns?
|
1692
|
-
setTimeout(() => {
|
1693
|
-
const input = document.getElementById('input_' + this.id);
|
1694
|
-
input?.select();
|
1695
|
-
});
|
1696
|
-
}
|
1697
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffQtyDropdownComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
1698
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.10", type: DaffQtyDropdownComponent, selector: "daff-qty-dropdown", inputs: { qty: "qty", id: "id" }, outputs: { qtyChanged: "qtyChanged" }, ngImport: i0, 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>", styles: [".daff-qty-dropdown__input{width:50px}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DaffFormFieldComponent, selector: "daff-form-field", inputs: ["formSubmitted"] }, { kind: "component", type: DaffNativeSelectComponent, selector: "select[daff-native-select]", inputs: ["formSubmitted"] }, { kind: "component", type: DaffInputComponent, selector: "input[daff-input]", inputs: ["formSubmitted"] }] }); }
|
1699
|
-
}
|
1700
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffQtyDropdownComponent, decorators: [{
|
1701
|
-
type: Component,
|
1702
|
-
args: [{ selector: 'daff-qty-dropdown', 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>", styles: [".daff-qty-dropdown__input{width:50px}\n"] }]
|
1703
|
-
}], ctorParameters: () => [{ type: i0.Renderer2 }], propDecorators: { qty: [{
|
1704
|
-
type: Input
|
1705
|
-
}], id: [{
|
1706
|
-
type: Input
|
1707
|
-
}], qtyChanged: [{
|
1708
|
-
type: Output
|
1709
|
-
}] } });
|
1710
|
-
|
1711
|
-
class DaffQtyDropdownModule {
|
1712
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffQtyDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
1713
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.10", ngImport: i0, type: DaffQtyDropdownModule, declarations: [DaffQtyDropdownComponent], imports: [CommonModule,
|
1714
|
-
FormsModule,
|
1715
|
-
DaffFormFieldModule,
|
1716
|
-
DaffNativeSelectModule,
|
1717
|
-
DaffInputModule], exports: [DaffQtyDropdownComponent] }); }
|
1718
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffQtyDropdownModule, imports: [CommonModule,
|
1719
|
-
FormsModule,
|
1720
|
-
DaffFormFieldModule,
|
1721
|
-
DaffNativeSelectModule,
|
1722
|
-
DaffInputModule] }); }
|
1723
|
-
}
|
1724
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffQtyDropdownModule, decorators: [{
|
1725
|
-
type: NgModule,
|
1726
|
-
args: [{
|
1727
|
-
imports: [
|
1728
|
-
CommonModule,
|
1729
|
-
FormsModule,
|
1730
|
-
DaffFormFieldModule,
|
1731
|
-
DaffNativeSelectModule,
|
1732
|
-
DaffInputModule,
|
1733
|
-
],
|
1734
|
-
declarations: [
|
1735
|
-
DaffQtyDropdownComponent,
|
1736
|
-
],
|
1737
|
-
exports: [
|
1738
|
-
DaffQtyDropdownComponent,
|
1739
|
-
],
|
1740
|
-
}]
|
1741
|
-
}] });
|
1742
|
-
|
1743
|
-
var DaffFeatureModeEnum;
|
1744
|
-
(function (DaffFeatureModeEnum) {
|
1745
|
-
DaffFeatureModeEnum["Compact"] = "compact";
|
1746
|
-
DaffFeatureModeEnum["Normal"] = "normal";
|
1747
|
-
})(DaffFeatureModeEnum || (DaffFeatureModeEnum = {}));
|
1748
|
-
/**
|
1749
|
-
* @deprecated See {@link DaffCardComponent}
|
1750
|
-
*/
|
1751
|
-
class DaffFeatureComponent {
|
1752
|
-
constructor() {
|
1753
|
-
/**
|
1754
|
-
* @docs-private
|
1755
|
-
*/
|
1756
|
-
this.class = true;
|
1757
|
-
this.mode = DaffFeatureModeEnum.Normal;
|
1758
|
-
}
|
1759
|
-
/**
|
1760
|
-
* @docs-private
|
1761
|
-
*/
|
1762
|
-
get compact() {
|
1763
|
-
return this.mode === DaffFeatureModeEnum.Compact;
|
1764
|
-
}
|
1765
|
-
/**
|
1766
|
-
* @docs-private
|
1767
|
-
*/
|
1768
|
-
get normal() {
|
1769
|
-
return this.mode === DaffFeatureModeEnum.Normal;
|
1770
|
-
}
|
1771
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffFeatureComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
1772
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.10", type: DaffFeatureComponent, selector: "daff-feature", inputs: { mode: "mode" }, host: { properties: { "class.daff-feature": "this.class", "class.daff-feature--compact": "this.compact", "class.daff-feature--normal": "this.normal" } }, ngImport: i0, 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>", 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}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
1773
|
-
}
|
1774
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffFeatureComponent, decorators: [{
|
1775
|
-
type: Component,
|
1776
|
-
args: [{ selector: 'daff-feature', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, 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>", 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}}\n"] }]
|
1777
|
-
}], propDecorators: { class: [{
|
1778
|
-
type: HostBinding,
|
1779
|
-
args: ['class.daff-feature']
|
1780
|
-
}], mode: [{
|
1781
|
-
type: Input
|
1782
|
-
}], compact: [{
|
1783
|
-
type: HostBinding,
|
1784
|
-
args: ['class.daff-feature--compact']
|
1785
|
-
}], normal: [{
|
1786
|
-
type: HostBinding,
|
1787
|
-
args: ['class.daff-feature--normal']
|
1788
|
-
}] } });
|
1789
|
-
|
1790
|
-
class DaffFeatureIconDirective {
|
1791
|
-
constructor() {
|
1792
|
-
/**
|
1793
|
-
* @docs-private
|
1794
|
-
*/
|
1795
|
-
this.class = true;
|
1796
|
-
}
|
1797
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffFeatureIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
1798
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.10", type: DaffFeatureIconDirective, selector: "[daffFeatureIcon]", host: { properties: { "class.daff-feature__icon": "this.class" } }, ngImport: i0 }); }
|
1799
|
-
}
|
1800
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffFeatureIconDirective, decorators: [{
|
1801
|
-
type: Directive,
|
1802
|
-
args: [{
|
1803
|
-
selector: '[daffFeatureIcon]',
|
1804
|
-
}]
|
1805
|
-
}], propDecorators: { class: [{
|
1806
|
-
type: HostBinding,
|
1807
|
-
args: ['class.daff-feature__icon']
|
1808
|
-
}] } });
|
1809
|
-
|
1810
|
-
class DaffFeatureSubheaderDirective {
|
1811
|
-
constructor() {
|
1812
|
-
/**
|
1813
|
-
* @docs-private
|
1814
|
-
*/
|
1815
|
-
this.class = true;
|
1816
|
-
}
|
1817
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffFeatureSubheaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
1818
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.10", type: DaffFeatureSubheaderDirective, selector: "[daffFeatureSubheader]", host: { properties: { "class.daff-feature__subheader": "this.class" } }, ngImport: i0 }); }
|
1819
|
-
}
|
1820
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffFeatureSubheaderDirective, decorators: [{
|
1821
|
-
type: Directive,
|
1822
|
-
args: [{
|
1823
|
-
selector: '[daffFeatureSubheader]',
|
1824
|
-
}]
|
1825
|
-
}], propDecorators: { class: [{
|
1826
|
-
type: HostBinding,
|
1827
|
-
args: ['class.daff-feature__subheader']
|
1828
|
-
}] } });
|
1829
|
-
|
1830
|
-
class DaffFeatureSubtitleDirective {
|
1831
|
-
constructor() {
|
1832
|
-
/**
|
1833
|
-
* @docs-private
|
1834
|
-
*/
|
1835
|
-
this.class = true;
|
1836
|
-
}
|
1837
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffFeatureSubtitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
1838
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.10", type: DaffFeatureSubtitleDirective, selector: "[daffFeatureSubtitle]", host: { properties: { "class.daff-feature__subtitle": "this.class" } }, ngImport: i0 }); }
|
1839
|
-
}
|
1840
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffFeatureSubtitleDirective, decorators: [{
|
1841
|
-
type: Directive,
|
1842
|
-
args: [{
|
1843
|
-
selector: '[daffFeatureSubtitle]',
|
1844
|
-
}]
|
1845
|
-
}], propDecorators: { class: [{
|
1846
|
-
type: HostBinding,
|
1847
|
-
args: ['class.daff-feature__subtitle']
|
1848
|
-
}] } });
|
1849
|
-
|
1850
|
-
class DaffFeatureTitleDirective {
|
1851
|
-
constructor() {
|
1852
|
-
/**
|
1853
|
-
* @docs-private
|
1854
|
-
*/
|
1855
|
-
this.class = true;
|
1856
|
-
}
|
1857
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffFeatureTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
1858
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.10", type: DaffFeatureTitleDirective, selector: "[daffFeatureTitle]", host: { properties: { "class.daff-feature__title": "this.class" } }, ngImport: i0 }); }
|
1859
|
-
}
|
1860
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffFeatureTitleDirective, decorators: [{
|
1861
|
-
type: Directive,
|
1862
|
-
args: [{
|
1863
|
-
selector: '[daffFeatureTitle]',
|
1864
|
-
}]
|
1865
|
-
}], propDecorators: { class: [{
|
1866
|
-
type: HostBinding,
|
1867
|
-
args: ['class.daff-feature__title']
|
1868
|
-
}] } });
|
1869
|
-
|
1870
|
-
class DaffFeatureModule {
|
1871
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffFeatureModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
1872
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.10", ngImport: i0, type: DaffFeatureModule, declarations: [DaffFeatureComponent,
|
1873
|
-
DaffFeatureTitleDirective,
|
1874
|
-
DaffFeatureSubtitleDirective,
|
1875
|
-
DaffFeatureIconDirective,
|
1876
|
-
DaffFeatureSubheaderDirective], imports: [CommonModule], exports: [DaffFeatureComponent,
|
1877
|
-
DaffFeatureTitleDirective,
|
1878
|
-
DaffFeatureSubtitleDirective,
|
1879
|
-
DaffFeatureIconDirective,
|
1880
|
-
DaffFeatureSubheaderDirective] }); }
|
1881
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffFeatureModule, imports: [CommonModule] }); }
|
1882
|
-
}
|
1883
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffFeatureModule, decorators: [{
|
1884
|
-
type: NgModule,
|
1885
|
-
args: [{
|
1886
|
-
imports: [
|
1887
|
-
CommonModule,
|
1888
|
-
],
|
1889
|
-
declarations: [
|
1890
|
-
DaffFeatureComponent,
|
1891
|
-
DaffFeatureTitleDirective,
|
1892
|
-
DaffFeatureSubtitleDirective,
|
1893
|
-
DaffFeatureIconDirective,
|
1894
|
-
DaffFeatureSubheaderDirective,
|
1895
|
-
],
|
1896
|
-
exports: [
|
1897
|
-
DaffFeatureComponent,
|
1898
|
-
DaffFeatureTitleDirective,
|
1899
|
-
DaffFeatureSubtitleDirective,
|
1900
|
-
DaffFeatureIconDirective,
|
1901
|
-
DaffFeatureSubheaderDirective,
|
1902
|
-
],
|
1903
|
-
}]
|
1904
|
-
}] });
|
1905
|
-
|
1906
1312
|
/**
|
1907
1313
|
*
|
1908
1314
|
* Prefix can be used to place content before another piece of content in components like
|
@@ -2009,6 +1415,62 @@ function daffPrefixableMixin(Base) {
|
|
2009
1415
|
return PrefixableDirective;
|
2010
1416
|
}
|
2011
1417
|
|
1418
|
+
var DaffPaletteEnum;
|
1419
|
+
(function (DaffPaletteEnum) {
|
1420
|
+
DaffPaletteEnum["PRIMARY"] = "primary";
|
1421
|
+
DaffPaletteEnum["SECONDARY"] = "secondary";
|
1422
|
+
DaffPaletteEnum["ACCENT"] = "accent";
|
1423
|
+
DaffPaletteEnum["TERTIARY"] = "tertiary";
|
1424
|
+
DaffPaletteEnum["BLACK"] = "black";
|
1425
|
+
DaffPaletteEnum["WHITE"] = "white";
|
1426
|
+
DaffPaletteEnum["THEME"] = "theme";
|
1427
|
+
DaffPaletteEnum["THEMECONTRAST"] = "theme-contrast";
|
1428
|
+
})(DaffPaletteEnum || (DaffPaletteEnum = {}));
|
1429
|
+
|
1430
|
+
function colorInPalette(color) {
|
1431
|
+
return Object.values(DaffPaletteEnum).includes(color);
|
1432
|
+
}
|
1433
|
+
|
1434
|
+
/**
|
1435
|
+
* This should be a trait, but typescript only supports mixins.
|
1436
|
+
* See: https://github.com/Microsoft/TypeScript/issues/311
|
1437
|
+
*
|
1438
|
+
* Turns out the material team followed the same path with the color mixin.
|
1439
|
+
* https://github.com/angular/material2/blob/master/src/lib/core/common-behaviors/color.ts
|
1440
|
+
*/
|
1441
|
+
function daffColorMixin(Base, defaultColor) {
|
1442
|
+
class DaffColorableMixinClass extends Base {
|
1443
|
+
get color() {
|
1444
|
+
return this._color;
|
1445
|
+
}
|
1446
|
+
set color(value) {
|
1447
|
+
//Handle the default color
|
1448
|
+
const incomingColor = value || defaultColor;
|
1449
|
+
if (incomingColor !== undefined && !colorInPalette(incomingColor)) {
|
1450
|
+
throw new TypeError(incomingColor + ' is not a valid color for the DaffPalette');
|
1451
|
+
}
|
1452
|
+
if (incomingColor !== this._color) { //Only run the dom-render if a change occurs
|
1453
|
+
//Remove the old color
|
1454
|
+
if (this._color) {
|
1455
|
+
this._renderer.removeClass(this._elementRef.nativeElement, `daff-${this._color}`);
|
1456
|
+
}
|
1457
|
+
if (incomingColor) {
|
1458
|
+
this._renderer.addClass(this._elementRef.nativeElement, `daff-${incomingColor}`);
|
1459
|
+
}
|
1460
|
+
this._color = incomingColor;
|
1461
|
+
}
|
1462
|
+
}
|
1463
|
+
constructor(...args) {
|
1464
|
+
super(...args);
|
1465
|
+
this.color = defaultColor;
|
1466
|
+
}
|
1467
|
+
}
|
1468
|
+
;
|
1469
|
+
// TODO: ugly workaround for https://github.com/microsoft/TypeScript/issues/7342#issuecomment-624298133
|
1470
|
+
Input()(DaffColorableMixinClass.prototype, 'color');
|
1471
|
+
return DaffColorableMixinClass;
|
1472
|
+
}
|
1473
|
+
|
2012
1474
|
var DaffBreakpoints;
|
2013
1475
|
(function (DaffBreakpoints) {
|
2014
1476
|
DaffBreakpoints["DESKTOP"] = "(min-width: 1920px)";
|
@@ -2548,5 +2010,5 @@ function daffSizeMixin(Base, defaultSize) {
|
|
2548
2010
|
* Generated bundle index. Do not edit.
|
2549
2011
|
*/
|
2550
2012
|
|
2551
|
-
export { DAFF_THEME_INITIALIZER, DaffBreakpoints,
|
2013
|
+
export { DAFF_THEME_INITIALIZER, DaffBreakpoints, DaffCheckboxComponent, DaffCheckboxControlValueAccessorDirective, DaffCheckboxModule, DaffCheckboxSetComponent, DaffErrorMessageComponent, DaffErrorMessageModule, DaffErrorStateMatcher, DaffFocusStackService, DaffFormFieldComponent, DaffFormFieldControl, DaffFormFieldModule, DaffFormLabelDirective, DaffFormLabelModule, DaffInputComponent, DaffInputModule, DaffNativeSelectComponent, DaffNativeSelectModule, DaffPrefixDirective, DaffPrefixSuffixModule, DaffQuantityFieldComponent, DaffQuantityFieldModule, DaffQuantityInputComponent, DaffQuantitySelectComponent, DaffRadioComponent, DaffRadioControlValueAccessorDirective, DaffRadioModule, DaffRadioSetComponent, DaffSizableEnum, DaffStatusEnum, DaffSuffixDirective, DaffTextAlignmentEnum, DaffTheme, DaffThemingService, daffArticleEncapsulatedMixin, daffColorMixin, daffCompactableMixin, daffFocusableElementsSelector, daffManageContainerLayoutMixin, daffPrefixableMixin, daffSizeMixin, daffSkeletonableMixin, daffStatusMixin, daffSuffixableMixin, daffTextAlignmentMixin };
|
2552
2014
|
//# sourceMappingURL=daffodil-design.mjs.map
|