@abgov/angular-components 2.0.0-beta.1 → 2.0.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/README.md +3 -45
- package/abgov-angular-components.d.ts +1 -0
- package/bundles/abgov-angular-components.umd.js +129 -2513
- package/bundles/abgov-angular-components.umd.js.map +1 -1
- package/esm2015/index.js +2 -26
- package/esm2015/lib/angular-components.module.js +16 -91
- package/esm2015/lib/value-directive.js +133 -0
- package/fesm2015/abgov-angular-components.js +117 -2001
- package/fesm2015/abgov-angular-components.js.map +1 -1
- package/index.d.ts +1 -25
- package/lib/angular-components.module.d.ts +7 -0
- package/lib/value-directive.d.ts +34 -0
- package/package.json +7 -12
- package/abgov-angular-components.metadata.json +0 -1
- package/esm2015/experimental/app-version-header/app-version-header.component.js +0 -30
- package/esm2015/experimental/badge/badge.component.js +0 -24
- package/esm2015/experimental/components.module.js +0 -28
- package/esm2015/experimental/index.js +0 -5
- package/esm2015/experimental/number-input/number-input.component.js +0 -151
- package/esm2015/lib/button/button.component.js +0 -66
- package/esm2015/lib/button-link/button-link.component.js +0 -66
- package/esm2015/lib/callout/callout.component.js +0 -34
- package/esm2015/lib/card/card.component.js +0 -37
- package/esm2015/lib/card/content/card-content.component.js +0 -24
- package/esm2015/lib/card/footer/card-footer.component.js +0 -24
- package/esm2015/lib/card/header/card-header.component.js +0 -24
- package/esm2015/lib/card/thumb/card-thumb.component.js +0 -27
- package/esm2015/lib/card-group/card.group.component.js +0 -23
- package/esm2015/lib/checkbox/checkbox-change.js +0 -3
- package/esm2015/lib/checkbox/checkbox.component.js +0 -136
- package/esm2015/lib/dropdown/dropdown.component.js +0 -326
- package/esm2015/lib/dropdown/option/option.component.js +0 -48
- package/esm2015/lib/dropdown/option-group/option-group.component.js +0 -46
- package/esm2015/lib/element-load-indicator/element-load-indicator.component.js +0 -63
- package/esm2015/lib/header/header.component.js +0 -47
- package/esm2015/lib/hero-banner/content/hero-banner-content.component.js +0 -15
- package/esm2015/lib/hero-banner/hero-banner.component.js +0 -21
- package/esm2015/lib/hero-banner/link/hero-banner-link.component.js +0 -18
- package/esm2015/lib/microsite-logo/microsite-logo.component.js +0 -34
- package/esm2015/lib/notification/notification.component.js +0 -59
- package/esm2015/lib/notification-banner/notification-banner.component.js +0 -32
- package/esm2015/lib/page-load-indicator/page-load-indicator.component.js +0 -117
- package/esm2015/lib/radio/radio-change.js +0 -3
- package/esm2015/lib/radio/radio.component.js +0 -146
- package/esm2015/lib/radio/radio.service.js +0 -20
- package/esm2015/lib/radio-group/radio-group.component.js +0 -282
- package/esm2015/lib/skeleton/skeleton-element.component.js +0 -21
- package/esm2015/lib/skeleton/skeleton-image-content.component.js +0 -19
- package/experimental/app-version-header/app-version-header.component.d.ts +0 -10
- package/experimental/badge/badge.component.d.ts +0 -7
- package/experimental/components.module.d.ts +0 -2
- package/experimental/index.d.ts +0 -4
- package/experimental/number-input/number-input.component.d.ts +0 -66
- package/lib/button/button.component.d.ts +0 -37
- package/lib/button-link/button-link.component.d.ts +0 -38
- package/lib/callout/callout.component.d.ts +0 -20
- package/lib/card/card.component.d.ts +0 -23
- package/lib/card/content/card-content.component.d.ts +0 -14
- package/lib/card/footer/card-footer.component.d.ts +0 -14
- package/lib/card/header/card-header.component.d.ts +0 -14
- package/lib/card/thumb/card-thumb.component.d.ts +0 -22
- package/lib/card-group/card.group.component.d.ts +0 -32
- package/lib/checkbox/checkbox-change.d.ts +0 -7
- package/lib/checkbox/checkbox.component.d.ts +0 -100
- package/lib/dropdown/dropdown.component.d.ts +0 -193
- package/lib/dropdown/option/option.component.d.ts +0 -39
- package/lib/dropdown/option-group/option-group.component.d.ts +0 -38
- package/lib/element-load-indicator/element-load-indicator.component.d.ts +0 -38
- package/lib/header/header.component.d.ts +0 -29
- package/lib/hero-banner/content/hero-banner-content.component.d.ts +0 -5
- package/lib/hero-banner/hero-banner.component.d.ts +0 -9
- package/lib/hero-banner/link/hero-banner-link.component.d.ts +0 -6
- package/lib/microsite-logo/microsite-logo.component.d.ts +0 -20
- package/lib/notification/notification.component.d.ts +0 -43
- package/lib/notification-banner/notification-banner.component.d.ts +0 -22
- package/lib/page-load-indicator/page-load-indicator.component.d.ts +0 -55
- package/lib/radio/radio-change.d.ts +0 -7
- package/lib/radio/radio.component.d.ts +0 -119
- package/lib/radio/radio.service.d.ts +0 -7
- package/lib/radio-group/radio-group.component.d.ts +0 -190
- package/lib/skeleton/skeleton-element.component.d.ts +0 -5
- package/lib/skeleton/skeleton-image-content.component.d.ts +0 -5
- package/theme.css +0 -164
- package/theme.css.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@abgov/angular-components', ['exports', '@angular/core', '@angular/
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.abgov = global.abgov || {}, global.abgov["angular-components"] = {}), global.ng.core, global.ng.
|
|
5
|
-
})(this, (function (exports, i0,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@abgov/angular-components', ['exports', '@angular/core', '@angular/forms'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.abgov = global.abgov || {}, global.abgov["angular-components"] = {}), global.ng.core, global.ng.forms));
|
|
5
|
+
})(this, (function (exports, i0, forms) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -24,2554 +24,170 @@
|
|
|
24
24
|
|
|
25
25
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
26
|
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
* The appearance style of the button.
|
|
35
|
-
*/
|
|
36
|
-
this.buttonType = 'primary';
|
|
37
|
-
/**
|
|
38
|
-
* The size of the button, controls font size and padding.
|
|
39
|
-
*/
|
|
40
|
-
this.buttonSize = 'normal';
|
|
27
|
+
var ValueDirective = /** @class */ (function () {
|
|
28
|
+
function ValueDirective(elementRef) {
|
|
29
|
+
this.elementRef = elementRef;
|
|
30
|
+
this._value = "";
|
|
31
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
32
|
+
this.onChange = function () { };
|
|
33
|
+
this.onTouched = function () { };
|
|
41
34
|
}
|
|
42
|
-
Object.defineProperty(
|
|
43
|
-
/**
|
|
44
|
-
* Adds class goa-button to the host.
|
|
45
|
-
* @ignore
|
|
46
|
-
*/
|
|
47
|
-
get: function () {
|
|
48
|
-
return true;
|
|
49
|
-
},
|
|
50
|
-
enumerable: false,
|
|
51
|
-
configurable: true
|
|
52
|
-
});
|
|
53
|
-
Object.defineProperty(GoAButtonComponent.prototype, "secondaryBinding", {
|
|
54
|
-
/**
|
|
55
|
-
* Adds class goa--secondary to the host if the buttonStyle = secondary.
|
|
56
|
-
* @ignore
|
|
57
|
-
*/
|
|
58
|
-
get: function () {
|
|
59
|
-
return this.buttonType === 'secondary';
|
|
60
|
-
},
|
|
61
|
-
enumerable: false,
|
|
62
|
-
configurable: true
|
|
63
|
-
});
|
|
64
|
-
Object.defineProperty(GoAButtonComponent.prototype, "tertiaryBinding", {
|
|
65
|
-
/**
|
|
66
|
-
* Adds class goa--tertiary to the host if the buttonStyle = tertiary.
|
|
67
|
-
* @ignore
|
|
68
|
-
*/
|
|
69
|
-
get: function () {
|
|
70
|
-
return this.buttonType === 'tertiary';
|
|
71
|
-
},
|
|
72
|
-
enumerable: false,
|
|
73
|
-
configurable: true
|
|
74
|
-
});
|
|
75
|
-
Object.defineProperty(GoAButtonComponent.prototype, "smallBinding", {
|
|
76
|
-
/**
|
|
77
|
-
* Adds class btn-small to the host if the buttonSize = small.
|
|
78
|
-
* @ignore
|
|
79
|
-
*/
|
|
80
|
-
get: function () {
|
|
81
|
-
return this.buttonSize === 'small';
|
|
82
|
-
},
|
|
83
|
-
enumerable: false,
|
|
84
|
-
configurable: true
|
|
85
|
-
});
|
|
86
|
-
/* eslint-disable @angular-eslint/no-empty-lifecycle-method */
|
|
87
|
-
GoAButtonComponent.prototype.ngOnInit = function () { };
|
|
88
|
-
return GoAButtonComponent;
|
|
89
|
-
}());
|
|
90
|
-
GoAButtonComponent.decorators = [
|
|
91
|
-
{ type: i0.Component, args: [{
|
|
92
|
-
selector:
|
|
93
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
|
94
|
-
'button[goa-button], input[type="button"][goa-button], input[type="submit"][goa-button]',
|
|
95
|
-
template: "<ng-content></ng-content>\n",
|
|
96
|
-
styles: [":host.goa-button{box-sizing:border-box;min-width:70px;padding:12px;border:2px solid #0070c4;border-radius:4px;background:#0070c4;cursor:pointer;color:#fff;font-size:18px;font-weight:700;line-height:1em}:host.goa-button.btn-small{font-size:16px;padding:8px;margin:12px 12px 0 0}:host.goa-button:last-of-type{margin-right:0}:host.goa-button:disabled,:host.goa-button:disabled.goa--secondary,:host.goa-button:disabled.goa--tertiary{pointer-events:none;color:#666;background-color:#f1f1f1;border-color:#f1f1f1}:host.goa-button:hover{border-color:#004f84;background:#004f84}:host.goa-button:focus,:host.goa-button:active{border-color:#004f84;box-shadow:0 0 0 3px #feba35;background:#004f84;outline:none}:host.goa-button.goa--secondary{border:2px solid #0070c4;background:#fff;color:#0070c4}:host.goa-button.goa--secondary:hover{border-color:#004f84;background:#fff;color:#004f84}:host.goa-button.goa--secondary:focus,:host.goa-button.goa--secondary:active{color:#004f84;background-color:#fff;border:2px solid #004f84;box-shadow:0 0 0 3px #feba35;outline:none}:host.goa-button.goa--tertiary{border-color:#dcdcdc;background:#fff;color:#0070c4}:host.goa-button.goa--tertiary:hover{background:#fff;color:#004f84}:host.goa-button.goa--tertiary:focus,:host.goa-button.goa--tertiary:active{border:2px solid #004f84;color:#004f84;background-color:#fff;box-shadow:0 0 0 3px #feba35;outline:none}:host.goa-button.goa--borderless{background:none;color:var(--color-blue-500);border:none;transition:transform .1s ease-in-out;transform:scale(1)}:host.goa-button.goa--borderless:hover{background:var(--color-blue-100);color:var(--color-blue-500)}:host.goa-button.goa--borderless:focus,:host.goa-button.goa--borderless:active{background-color:var(--color-blue-100);outline:none;box-shadow:none}:host.goa-button.goa--borderless:active{transform:scale(.95)}:host.goa-button.goa--red{color:var(--color-red-500);background:none;border:none;transition:transform .1s ease-in-out;transform:scale(1)}:host.goa-button.goa--red:hover{background:var(--color-red-100);color:var(--color-red-500)}:host.goa-button.goa--red:focus,:host.goa-button.goa--red:active{background:var(--color-red-100);color:var(--color-red-500);outline:none;box-shadow:none}:host.goa-button.goa--red:active{transform:scale(.95)}\n"]
|
|
97
|
-
},] }
|
|
98
|
-
];
|
|
99
|
-
GoAButtonComponent.ctorParameters = function () { return []; };
|
|
100
|
-
GoAButtonComponent.propDecorators = {
|
|
101
|
-
primaryBinding: [{ type: i0.HostBinding, args: ['class.goa-button',] }],
|
|
102
|
-
secondaryBinding: [{ type: i0.HostBinding, args: ['class.goa--secondary',] }],
|
|
103
|
-
tertiaryBinding: [{ type: i0.HostBinding, args: ['class.goa--tertiary',] }],
|
|
104
|
-
smallBinding: [{ type: i0.HostBinding, args: ['class.btn-small',] }],
|
|
105
|
-
buttonType: [{ type: i0.Input }],
|
|
106
|
-
buttonSize: [{ type: i0.Input }]
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* A logo for a Government of Alberta hosted microsite.
|
|
111
|
-
* selector: goa-microsite-logo
|
|
112
|
-
*/
|
|
113
|
-
var GoAMicrositeLogoComponent = /** @class */ (function () {
|
|
114
|
-
function GoAMicrositeLogoComponent() {
|
|
115
|
-
/**
|
|
116
|
-
* The home page URL of the microsite.
|
|
117
|
-
*/
|
|
118
|
-
this.serviceHome = 'https://www.alberta.ca/index.aspx';
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* @ignore
|
|
122
|
-
*/
|
|
123
|
-
GoAMicrositeLogoComponent.prototype.ngOnInit = function () {
|
|
124
|
-
if (this.serviceName === undefined || this.serviceName === null) {
|
|
125
|
-
throw new TypeError("Input 'serviceName' is required.");
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
return GoAMicrositeLogoComponent;
|
|
129
|
-
}());
|
|
130
|
-
GoAMicrositeLogoComponent.decorators = [
|
|
131
|
-
{ type: i0.Component, args: [{
|
|
132
|
-
selector: 'goa-microsite-logo',
|
|
133
|
-
template: "<a href=\"{{serviceHome}}\" attr.aria-label=\"{{serviceHome}}\" class=\"microsite-link\">\n <span class=\"image-desktop-tablet\"></span>\n <span class=\"image-mobile\"></span>\n <span class=\"name\">\n {{serviceName}}\n </span>\n</a>\n",
|
|
134
|
-
styles: ["a.microsite-link{color:inherit;text-decoration:none;white-space:nowrap;display:flex;align-items:center;height:66px}a.microsite-link:focus,a.microsite-link:hover,a.microsite-link:active{outline:none}a.microsite-link .image-desktop-tablet{width:150px;height:42px;display:inline-block;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='149.351' height='42' viewBox='0 0 149.351 42'%3E%3Cdefs%3E%3Cstyle%3E.a%7Bfill:none;%7D.b%7Bclip-path:url(%23a);%7D.c%7Bfill:%2300aad2;%7D.d%7Bfill:%235f6a72;%7D%3C/style%3E%3CclipPath id='a'%3E%3Crect class='a' width='149.351' height='42'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg class='b'%3E%3Crect class='c' width='13.555' height='13.555' transform='translate(135.796 21.524)'/%3E%3Cpath class='d' d='M63.082,33.088c-1.383.138-2.835.277-4.357.346.553-4.357,2.835-10.373,5.671-9.405,1.66.553.761,5.671-1.314,9.059m-3.527,2.974a3.761,3.761,0,0,1-1.245,0,.851.851,0,0,0,.346-.692v-.553c.761,0,1.936-.138,3.389-.277a4.327,4.327,0,0,1-2.49,1.521M76.844,25.688c1.8-1.66,2.7-1.521,2.9-1.106.484.968-1.591,4.357-5.671,6.224a10.328,10.328,0,0,1,2.766-5.118m66.736,1.66c-.207-3.389-3.181-3.942-3.6-2.974-.138.346,1.106.207,1.106,2.628,0,3.942-4.011,9.129-9.129,9.129-5.532,0-6.985-4.357-7.261-6.432-.207-1.452.138-3.458-2.351-3.181-1.729.207-3.25,3.527-5.463,6.362-1.867,2.42-2.7,2.213-2.282.138.553-2.628,2.7-8.714,5.187-9.129,1.176-.207,1.591,1.8,2.075.553s.069-4.011-2.559-4.011c-1.8,0-3.942,1.936-5.74,4.08-1.521,1.936-9.336,13.416-12.656,10.927-1.521-1.176-1.383-5.878-.415-11.411,3.873-1.521,7.123-1.037,8.921-.138.9.415,1.037.346.622-.622-.553-1.452-3.665-3.734-8.575-2.7-.138,0-.207.069-.346.069.415-1.8.83-3.665,1.383-5.463.484-1.66,1.8-4.5-1.729-4.979-1.106-.207-.622.346-1.037,1.867-.692,2.766-1.521,6.362-2.144,10.028a19.745,19.745,0,0,0-7.538,8.091,38.59,38.59,0,0,0,.9-4.772,1.589,1.589,0,0,0-1.245-1.729c-.761-.207-1.729.138-2.628,1.452-2.144,3.043-4.841,7.815-8.99,9.82-2.974,1.452-4.288,0-4.357-2.282a9.869,9.869,0,0,0,1.521-.553c5.394-2.351,7.192-5.947,5.878-8.16-1.314-2.075-4.979-1.452-7.953,1.66a11.175,11.175,0,0,0-2.7,6.5c-1.245.277-2.628.484-4.219.692,2.49-4.08,2.282-9.613-1.383-10.581-4.288-1.106-6.432,3.043-7.331,6.5.346-3.873.9-7.745,1.591-11.549.346-1.66,1.452-4.5-2.075-4.979-1.106-.207-.968.346-.9,1.867.138,2.075-2.144,14.454-.968,19.848-1.521.484-2.144,1.66-.207,2.835,1.383.83,4.357,1.106,7.331-.346a9.3,9.3,0,0,0,2.766-2.144c1.8-.207,3.665-.553,5.394-.83.277,2.42,1.867,4.219,5.463,3.873,5.118-.484,9.682-6.777,11.411-9.82-.346,3.25-2.42,10.373,1.176,10.028,1.383-.138.83-.346.9-1.591.346-4.288,3.873-7.953,7.4-10.166-.622,5.256-.415,9.958,2.006,11.411,4.426,2.766,10.581-4.5,14.039-8.921-1.729,3.942-2.7,8.921-.138,9.682,3.043.9,5.463-4.219,8.3-8.091.346,2.766,2.213,7.607,9.682,7.607,8.022-.069,13.071-4.91,12.863-10.1m-108.3,8.645A66.439,66.439,0,0,1,27.4,32.534a59.168,59.168,0,0,0,6.777-2.974,54.453,54.453,0,0,0,1.106,6.432m20.4,3.873c-.069-.207-.622.069-1.106,0-1.452-.207-3.389-2.213-3.942-5.463-1.037-5.878-.415-11.687,1.314-20.332.346-1.66,1.452-4.5-2.075-5.048-1.106-.138-.553.415-.83,1.867C47.66,17.32,42.4,21.954,37.149,25.066,36.6,17.735,36.8,9.505,38.186,4.526c1.176-4.219,2.559-3.458.83-4.357s-3.734.277-5.325,3.458S24.839,23.89,13.221,35.439C7.273,41.317,1.879,38.274.842,37.375c-.9-.761-1.176.415-.138,1.591,4.772,5.256,11.826,2.282,14.384-.277,7.054-7.054,15.283-22.268,18.6-28.7a98.251,98.251,0,0,0,.277,16.874,50.129,50.129,0,0,1-8.3,3.181c-1.66.415-2.7,1.106-2.7,1.867s1.106,1.521,2.7,2.282c2.835,1.383,11.2,5.256,13.209,6.5,1.729,1.037,2.628.207,3.112-.9.692-1.452-1.176-2.282-2.974-2.766a60.545,60.545,0,0,1-1.66-9.267c4.219-2.628,8.437-6.086,10.788-10.443C47.522,20.916,46,33.3,49.873,38.482a5.451,5.451,0,0,0,4.564,2.213c.968-.069,1.383-.692,1.245-.83' transform='translate(-0.038 0.124)'/%3E%3C/g%3E%3C/svg%3E\");background-repeat:no-repeat;background-size:contain;background-position:center center}@media screen and (max-width: 767px){a.microsite-link .image-desktop-tablet{display:none}}@media screen and (min-width: 768px) and (max-width: 1199px){a.microsite-link .image-mobile{display:none}}@media screen and (min-width: 1200px){a.microsite-link .image-mobile{display:none}}@media screen and (max-width: 767px){a.microsite-link .image-mobile{width:34px;height:34px;display:inline-block;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='16' height='16' viewBox='0 0 16 16'%3E%3Cdefs%3E%3Cstyle%3E.a%7Bfill:none;%7D.b%7Bfill:%2300aad2;%7D.c%7Bclip-path:url(%23a);%7D.d%7Bfill:%23fff;%7D%3C/style%3E%3CclipPath id='a'%3E%3Crect class='a' width='14' height='14' transform='translate(-0.345 -0.21)'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg transform='translate(0 -0.135)'%3E%3Ccircle class='b' cx='8' cy='8' r='8' transform='translate(0 0.135)'/%3E%3Cg transform='translate(1.345 1.344)'%3E%3Cg class='c' transform='translate(0 0)'%3E%3Cpath class='d' d='M12.612,13.636a16.24,16.24,0,0,1-1.86-.822,13.436,13.436,0,0,0,1.6-.708,11.312,11.312,0,0,0,.264,1.53M16.032,7.3c-.266-.034-.128.091-.2.442a5.465,5.465,0,0,1-2.8,3.338,16.141,16.141,0,0,1,.249-4.84c.275-1,.6-.813.2-1.022-.427-.22-.887.071-1.258.813A27.247,27.247,0,0,1,7.4,13.522a2.141,2.141,0,0,1-2.918.461c-.206-.174-.282.095-.026.37a2.412,2.412,0,0,0,3.387-.082A32.715,32.715,0,0,0,12.219,7.51a23.541,23.541,0,0,0,.063,3.971,11.464,11.464,0,0,1-1.964.749c-.388.1-.628.26-.635.439-.007.2.253.363.63.541.67.318,2.633,1.246,3.117,1.527.414.24.616.053.739-.207.16-.338-.279-.533-.7-.661a13.175,13.175,0,0,1-.382-2.179,7.143,7.143,0,0,0,2.547-2.454,4.7,4.7,0,0,0,.4-1.133,2.125,2.125,0,0,0,.048-.742s-.007-.054-.048-.059' transform='translate(-3.51 -3.943)'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E\");background-repeat:no-repeat;background-size:contain;background-position:center center}}a.microsite-link .name{margin-left:8px;font-size:16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media screen and (min-width: 1200px){a.microsite-link .name{margin-left:28px}}@media screen and (min-width: 768px) and (max-width: 1199px){a.microsite-link .name{margin-left:28px}}\n"]
|
|
135
|
-
},] }
|
|
136
|
-
];
|
|
137
|
-
GoAMicrositeLogoComponent.ctorParameters = function () { return []; };
|
|
138
|
-
GoAMicrositeLogoComponent.propDecorators = {
|
|
139
|
-
serviceName: [{ type: i0.Input }],
|
|
140
|
-
serviceHome: [{ type: i0.Input }]
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* A header component for a Government of Alberta hosted microsite.
|
|
145
|
-
* selector: goa-header
|
|
146
|
-
*/
|
|
147
|
-
var GoAHeaderComponent = /** @class */ (function () {
|
|
148
|
-
// ServiceLevel = this.ServiceLevel;
|
|
149
|
-
function GoAHeaderComponent() {
|
|
150
|
-
/**
|
|
151
|
-
* The home page URL of the microsite.
|
|
152
|
-
*/
|
|
153
|
-
this.serviceHome = 'https://www.alberta.ca/index.aspx';
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* @ignore
|
|
157
|
-
*/
|
|
158
|
-
GoAHeaderComponent.prototype.ngOnInit = function () {
|
|
159
|
-
this.checkRequiredProps('serviceLevel', 'serviceName', 'serviceHome');
|
|
160
|
-
};
|
|
161
|
-
GoAHeaderComponent.prototype.serviceLevelCssClass = function () {
|
|
162
|
-
return "service-level--" + this.serviceLevel.toLowerCase();
|
|
163
|
-
};
|
|
164
|
-
GoAHeaderComponent.prototype.serviceLevelFormatted = function () {
|
|
165
|
-
return this.serviceLevel.toLowerCase();
|
|
166
|
-
};
|
|
167
|
-
GoAHeaderComponent.prototype.checkRequiredProps = function () {
|
|
168
|
-
var _this = this;
|
|
169
|
-
var props = [];
|
|
170
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
171
|
-
props[_i] = arguments[_i];
|
|
172
|
-
}
|
|
173
|
-
props.forEach(function (prop) {
|
|
174
|
-
if (!_this[prop]) {
|
|
175
|
-
throw new TypeError("Input '" + prop + "' is required.");
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
};
|
|
179
|
-
return GoAHeaderComponent;
|
|
180
|
-
}());
|
|
181
|
-
GoAHeaderComponent.decorators = [
|
|
182
|
-
{ type: i0.Component, args: [{
|
|
183
|
-
selector: 'goa-header',
|
|
184
|
-
template: "<header class=\"goa-header goa-official-site-header\">\n <div>\n <span class=\"service-level\" [ngClass]=\"serviceLevelCssClass()\">\n {{ serviceLevelFormatted() }}\n </span>\n </div>\n <div\n *ngIf=\"serviceLevel === 'live'; else elseNotLive\"\n class=\"site-text\"\n i18n=\"Alberta.ca official site text on header\"\n >\n An official site of the\n <a href=\"https://www.alberta.ca/index.aspx\" class=\"web-link\"\n >Alberta Government</a\n >\n </div>\n <ng-template #elseNotLive>\n <div class=\"site-text\" i18n=\"Alberta.ca site text on header\">\n This is a new\n <a href=\"https://www.alberta.ca/index.aspx\" class=\"web-link\"\n >Alberta Government</a\n >\n service\n </div>\n </ng-template>\n</header>\n<header class=\"goa-header goa-microsite-header\">\n <goa-microsite-logo\n [serviceName]=\"serviceName\"\n [serviceHome]=\"serviceHome\"\n ></goa-microsite-logo>\n <ng-content></ng-content>\n</header>\n",
|
|
185
|
-
styles: [".goa-header{display:flex;align-items:center;padding-left:28px;padding-right:28px}@media screen and (min-width: 768px) and (max-width: 1199px){.goa-header{padding-left:28px;padding-right:28px}}@media screen and (max-width: 767px){.goa-header{padding-left:28px;padding-right:28px}}.goa-header.goa-microsite-header,.goa-header>.goa-microsite-header{background-color:#fff;top:0;display:flex;justify-content:space-between}.goa-header.goa-official-site-header,.goa-header>.goa-official-site-header{font-size:12px;background-color:#f1f1f1;line-height:22px}.goa-header.goa-official-site-header .site-text,.goa-header>.goa-official-site-header .site-text{white-space:nowrap;padding:0 4px}.goa-header.goa-official-site-header .service-level,.goa-header>.goa-official-site-header .service-level{padding:0 3px;font-weight:bold;vertical-align:baseline;text-transform:capitalize}.goa-header.goa-official-site-header .service-level--alpha,.goa-header>.goa-official-site-header .service-level--alpha{background-color:#feba35;color:#333}.goa-header.goa-official-site-header .service-level--beta,.goa-header>.goa-official-site-header .service-level--beta{background-color:#0081a2;color:#fff}.goa-header.goa-official-site-header .service-level--live,.goa-header>.goa-official-site-header .service-level--live{height:16px;width:16px;padding:0;color:transparent;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='16' height='16' viewBox='0 0 16 16'%3E%3Cdefs%3E%3Cstyle%3E.a%7Bfill:none;%7D.b%7Bfill:%2300aad2;%7D.c%7Bclip-path:url(%23a);%7D.d%7Bfill:%23fff;%7D%3C/style%3E%3CclipPath id='a'%3E%3Crect class='a' width='14' height='14' transform='translate(-0.345 -0.21)'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg transform='translate(0 -0.135)'%3E%3Ccircle class='b' cx='8' cy='8' r='8' transform='translate(0 0.135)'/%3E%3Cg transform='translate(1.345 1.344)'%3E%3Cg class='c' transform='translate(0 0)'%3E%3Cpath class='d' d='M12.612,13.636a16.24,16.24,0,0,1-1.86-.822,13.436,13.436,0,0,0,1.6-.708,11.312,11.312,0,0,0,.264,1.53M16.032,7.3c-.266-.034-.128.091-.2.442a5.465,5.465,0,0,1-2.8,3.338,16.141,16.141,0,0,1,.249-4.84c.275-1,.6-.813.2-1.022-.427-.22-.887.071-1.258.813A27.247,27.247,0,0,1,7.4,13.522a2.141,2.141,0,0,1-2.918.461c-.206-.174-.282.095-.026.37a2.412,2.412,0,0,0,3.387-.082A32.715,32.715,0,0,0,12.219,7.51a23.541,23.541,0,0,0,.063,3.971,11.464,11.464,0,0,1-1.964.749c-.388.1-.628.26-.635.439-.007.2.253.363.63.541.67.318,2.633,1.246,3.117,1.527.414.24.616.053.739-.207.16-.338-.279-.533-.7-.661a13.175,13.175,0,0,1-.382-2.179,7.143,7.143,0,0,0,2.547-2.454,4.7,4.7,0,0,0,.4-1.133,2.125,2.125,0,0,0,.048-.742s-.007-.054-.048-.059' transform='translate(-3.51 -3.943)'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E\");background-repeat:no-repeat;background-size:contain;background-position:center center}.goa-header .web-link{color:#0070c4;text-align:left}\n"]
|
|
186
|
-
},] }
|
|
187
|
-
];
|
|
188
|
-
GoAHeaderComponent.ctorParameters = function () { return []; };
|
|
189
|
-
GoAHeaderComponent.propDecorators = {
|
|
190
|
-
serviceName: [{ type: i0.Input }],
|
|
191
|
-
serviceHome: [{ type: i0.Input }],
|
|
192
|
-
serviceLevel: [{ type: i0.Input }]
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Styles an anchor Design system compliant.
|
|
197
|
-
* selector: a[goa-button]
|
|
198
|
-
* @example <a goa-button linkType='right' href='...'>Text</a>
|
|
199
|
-
*/
|
|
200
|
-
var GoAButtonLinkComponent = /** @class */ (function () {
|
|
201
|
-
function GoAButtonLinkComponent() {
|
|
202
|
-
/**
|
|
203
|
-
* The type of arrow to use.
|
|
204
|
-
*/
|
|
205
|
-
this.linkType = 'right';
|
|
206
|
-
/**
|
|
207
|
-
* The size of the button, controls font size and padding.
|
|
208
|
-
*/
|
|
209
|
-
this.buttonSize = 'normal';
|
|
210
|
-
}
|
|
211
|
-
Object.defineProperty(GoAButtonLinkComponent.prototype, "primaryBinding", {
|
|
212
|
-
/**
|
|
213
|
-
* Adds class goa-link-button to the host.
|
|
214
|
-
* @ignore
|
|
215
|
-
*/
|
|
216
|
-
get: function () {
|
|
217
|
-
return true;
|
|
218
|
-
},
|
|
219
|
-
enumerable: false,
|
|
220
|
-
configurable: true
|
|
221
|
-
});
|
|
222
|
-
Object.defineProperty(GoAButtonLinkComponent.prototype, "rightBinding", {
|
|
223
|
-
/**
|
|
224
|
-
* Adds class right-arrow to the host if the linkType = right.
|
|
225
|
-
* @ignore
|
|
226
|
-
*/
|
|
227
|
-
get: function () {
|
|
228
|
-
return this.linkType === 'right';
|
|
229
|
-
},
|
|
230
|
-
enumerable: false,
|
|
231
|
-
configurable: true
|
|
232
|
-
});
|
|
233
|
-
Object.defineProperty(GoAButtonLinkComponent.prototype, "upBinding", {
|
|
234
|
-
/**
|
|
235
|
-
* Adds class right-arrow to the host if the linkType = right.
|
|
236
|
-
* @ignore
|
|
237
|
-
*/
|
|
238
|
-
get: function () {
|
|
239
|
-
return this.linkType === 'up';
|
|
240
|
-
},
|
|
241
|
-
enumerable: false,
|
|
242
|
-
configurable: true
|
|
243
|
-
});
|
|
244
|
-
Object.defineProperty(GoAButtonLinkComponent.prototype, "smallBinding", {
|
|
245
|
-
/**
|
|
246
|
-
* Adds class btn-small to the host if the buttonSize = small.
|
|
247
|
-
* @ignore
|
|
248
|
-
*/
|
|
35
|
+
Object.defineProperty(ValueDirective.prototype, "value", {
|
|
249
36
|
get: function () {
|
|
250
|
-
return this.
|
|
251
|
-
},
|
|
252
|
-
enumerable: false,
|
|
253
|
-
configurable: true
|
|
254
|
-
});
|
|
255
|
-
/* eslint-disable @angular-eslint/no-empty-lifecycle-method */
|
|
256
|
-
GoAButtonLinkComponent.prototype.ngOnInit = function () { };
|
|
257
|
-
return GoAButtonLinkComponent;
|
|
258
|
-
}());
|
|
259
|
-
GoAButtonLinkComponent.decorators = [
|
|
260
|
-
{ type: i0.Component, args: [{
|
|
261
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
|
262
|
-
selector: 'a[goa-button]',
|
|
263
|
-
template: "<span>\n <ng-content></ng-content>\n</span>",
|
|
264
|
-
styles: ["@charset \"UTF-8\";:host.goa-link-button{display:inline-block;text-decoration:none}:host.goa-link-button{box-sizing:border-box;min-width:70px;padding:12px;border:2px solid #0070c4;border-radius:4px;background:#0070c4;cursor:pointer;color:#fff;font-size:18px;font-weight:700;line-height:1em}:host.goa-link-button.btn-small{font-size:16px;padding:8px;margin:12px 12px 0 0}:host.goa-link-button:last-of-type{margin-right:0}:host.goa-link-button:disabled,:host.goa-link-button:disabled.goa--secondary,:host.goa-link-button:disabled.goa--tertiary{pointer-events:none;color:#666;background-color:#f1f1f1;border-color:#f1f1f1}:host.goa-link-button:hover{border-color:#004f84;background:#004f84}:host.goa-link-button:focus,:host.goa-link-button:active{border-color:#004f84;box-shadow:0 0 0 3px #feba35;background:#004f84;outline:none}:host.goa-link-button.goa--secondary{border:2px solid #0070c4;background:#fff;color:#0070c4}:host.goa-link-button.goa--secondary:hover{border-color:#004f84;background:#fff;color:#004f84}:host.goa-link-button.goa--secondary:focus,:host.goa-link-button.goa--secondary:active{color:#004f84;background-color:#fff;border:2px solid #004f84;box-shadow:0 0 0 3px #feba35;outline:none}:host.goa-link-button.goa--tertiary{border-color:#dcdcdc;background:#fff;color:#0070c4}:host.goa-link-button.goa--tertiary:hover{background:#fff;color:#004f84}:host.goa-link-button.goa--tertiary:focus,:host.goa-link-button.goa--tertiary:active{border:2px solid #004f84;color:#004f84;background-color:#fff;box-shadow:0 0 0 3px #feba35;outline:none}:host.goa-link-button.goa--borderless{background:none;color:var(--color-blue-500);border:none;transition:transform .1s ease-in-out;transform:scale(1)}:host.goa-link-button.goa--borderless:hover{background:var(--color-blue-100);color:var(--color-blue-500)}:host.goa-link-button.goa--borderless:focus,:host.goa-link-button.goa--borderless:active{background-color:var(--color-blue-100);outline:none;box-shadow:none}:host.goa-link-button.goa--borderless:active{transform:scale(.95)}:host.goa-link-button.goa--red{color:var(--color-red-500);background:none;border:none;transition:transform .1s ease-in-out;transform:scale(1)}:host.goa-link-button.goa--red:hover{background:var(--color-red-100);color:var(--color-red-500)}:host.goa-link-button.goa--red:focus,:host.goa-link-button.goa--red:active{background:var(--color-red-100);color:var(--color-red-500);outline:none;box-shadow:none}:host.goa-link-button.goa--red:active{transform:scale(.95)}:host.goa-link-button.right-arrow:after{color:#fff;margin-left:8px;content:\"\\2192\"}:host.goa-link-button.up-arrow:after{color:#fff;margin-left:8px;content:\"\\2191\"}:host.goa-link-button:visited,:host.goa-link-button:link{color:#fff}\n"]
|
|
265
|
-
},] }
|
|
266
|
-
];
|
|
267
|
-
GoAButtonLinkComponent.ctorParameters = function () { return []; };
|
|
268
|
-
GoAButtonLinkComponent.propDecorators = {
|
|
269
|
-
primaryBinding: [{ type: i0.HostBinding, args: ['class.goa-link-button',] }],
|
|
270
|
-
rightBinding: [{ type: i0.HostBinding, args: ['class.right-arrow',] }],
|
|
271
|
-
upBinding: [{ type: i0.HostBinding, args: ['class.up-arrow',] }],
|
|
272
|
-
smallBinding: [{ type: i0.HostBinding, args: ['class.btn-small',] }],
|
|
273
|
-
linkType: [{ type: i0.Input }],
|
|
274
|
-
buttonSize: [{ type: i0.Input }]
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* Option component with to use with GoADropdown.
|
|
279
|
-
* selector: goa-option
|
|
280
|
-
*/
|
|
281
|
-
var GoAOptionComponent = /** @class */ (function () {
|
|
282
|
-
function GoAOptionComponent() {
|
|
283
|
-
/**
|
|
284
|
-
* Is the option currently selected
|
|
285
|
-
* @ignore
|
|
286
|
-
*/
|
|
287
|
-
this.selected = false;
|
|
288
|
-
/**
|
|
289
|
-
* Is the option selected by default?
|
|
290
|
-
*/
|
|
291
|
-
this.defaultSelected = false;
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* Lifecycle hook OnInit
|
|
295
|
-
* @ignore
|
|
296
|
-
*/
|
|
297
|
-
GoAOptionComponent.prototype.ngOnInit = function () {
|
|
298
|
-
if (this.id === undefined || this.id === null) {
|
|
299
|
-
throw new TypeError("Input 'id' is required.");
|
|
300
|
-
}
|
|
301
|
-
if (this.label === undefined || this.label === null) {
|
|
302
|
-
throw new TypeError("Input 'label' is required.");
|
|
303
|
-
}
|
|
304
|
-
this.selected = this.defaultSelected;
|
|
305
|
-
};
|
|
306
|
-
return GoAOptionComponent;
|
|
307
|
-
}());
|
|
308
|
-
GoAOptionComponent.decorators = [
|
|
309
|
-
{ type: i0.Component, args: [{
|
|
310
|
-
selector: 'goa-option',
|
|
311
|
-
template: "<ng-template #optionTemplate>\n <div class=\"goa-option\">\n <ng-content></ng-content>\n </div>\n</ng-template>",
|
|
312
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
313
|
-
styles: [""]
|
|
314
|
-
},] }
|
|
315
|
-
];
|
|
316
|
-
GoAOptionComponent.ctorParameters = function () { return []; };
|
|
317
|
-
GoAOptionComponent.propDecorators = {
|
|
318
|
-
id: [{ type: i0.Input }],
|
|
319
|
-
value: [{ type: i0.Input }],
|
|
320
|
-
label: [{ type: i0.Input }],
|
|
321
|
-
defaultSelected: [{ type: i0.Input }],
|
|
322
|
-
optionTemplate: [{ type: i0.ViewChild, args: ['optionTemplate',] }]
|
|
323
|
-
};
|
|
324
|
-
|
|
325
|
-
/*! *****************************************************************************
|
|
326
|
-
Copyright (c) Microsoft Corporation.
|
|
327
|
-
|
|
328
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
329
|
-
purpose with or without fee is hereby granted.
|
|
330
|
-
|
|
331
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
332
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
333
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
334
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
335
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
336
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
337
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
338
|
-
***************************************************************************** */
|
|
339
|
-
/* global Reflect, Promise */
|
|
340
|
-
var extendStatics = function (d, b) {
|
|
341
|
-
extendStatics = Object.setPrototypeOf ||
|
|
342
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
343
|
-
function (d, b) { for (var p in b)
|
|
344
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
345
|
-
d[p] = b[p]; };
|
|
346
|
-
return extendStatics(d, b);
|
|
347
|
-
};
|
|
348
|
-
function __extends(d, b) {
|
|
349
|
-
if (typeof b !== "function" && b !== null)
|
|
350
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
351
|
-
extendStatics(d, b);
|
|
352
|
-
function __() { this.constructor = d; }
|
|
353
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
354
|
-
}
|
|
355
|
-
var __assign = function () {
|
|
356
|
-
__assign = Object.assign || function __assign(t) {
|
|
357
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
358
|
-
s = arguments[i];
|
|
359
|
-
for (var p in s)
|
|
360
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
361
|
-
t[p] = s[p];
|
|
362
|
-
}
|
|
363
|
-
return t;
|
|
364
|
-
};
|
|
365
|
-
return __assign.apply(this, arguments);
|
|
366
|
-
};
|
|
367
|
-
function __rest(s, e) {
|
|
368
|
-
var t = {};
|
|
369
|
-
for (var p in s)
|
|
370
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
371
|
-
t[p] = s[p];
|
|
372
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
373
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
374
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
375
|
-
t[p[i]] = s[p[i]];
|
|
376
|
-
}
|
|
377
|
-
return t;
|
|
378
|
-
}
|
|
379
|
-
function __decorate(decorators, target, key, desc) {
|
|
380
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
381
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
382
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
383
|
-
else
|
|
384
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
385
|
-
if (d = decorators[i])
|
|
386
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
387
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
388
|
-
}
|
|
389
|
-
function __param(paramIndex, decorator) {
|
|
390
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
391
|
-
}
|
|
392
|
-
function __metadata(metadataKey, metadataValue) {
|
|
393
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
394
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
395
|
-
}
|
|
396
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
397
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
398
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
399
|
-
function fulfilled(value) { try {
|
|
400
|
-
step(generator.next(value));
|
|
401
|
-
}
|
|
402
|
-
catch (e) {
|
|
403
|
-
reject(e);
|
|
404
|
-
} }
|
|
405
|
-
function rejected(value) { try {
|
|
406
|
-
step(generator["throw"](value));
|
|
407
|
-
}
|
|
408
|
-
catch (e) {
|
|
409
|
-
reject(e);
|
|
410
|
-
} }
|
|
411
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
412
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
413
|
-
});
|
|
414
|
-
}
|
|
415
|
-
function __generator(thisArg, body) {
|
|
416
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
417
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
418
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
419
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
420
|
-
function step(op) {
|
|
421
|
-
if (f)
|
|
422
|
-
throw new TypeError("Generator is already executing.");
|
|
423
|
-
while (_)
|
|
424
|
-
try {
|
|
425
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
426
|
-
return t;
|
|
427
|
-
if (y = 0, t)
|
|
428
|
-
op = [op[0] & 2, t.value];
|
|
429
|
-
switch (op[0]) {
|
|
430
|
-
case 0:
|
|
431
|
-
case 1:
|
|
432
|
-
t = op;
|
|
433
|
-
break;
|
|
434
|
-
case 4:
|
|
435
|
-
_.label++;
|
|
436
|
-
return { value: op[1], done: false };
|
|
437
|
-
case 5:
|
|
438
|
-
_.label++;
|
|
439
|
-
y = op[1];
|
|
440
|
-
op = [0];
|
|
441
|
-
continue;
|
|
442
|
-
case 7:
|
|
443
|
-
op = _.ops.pop();
|
|
444
|
-
_.trys.pop();
|
|
445
|
-
continue;
|
|
446
|
-
default:
|
|
447
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
448
|
-
_ = 0;
|
|
449
|
-
continue;
|
|
450
|
-
}
|
|
451
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
452
|
-
_.label = op[1];
|
|
453
|
-
break;
|
|
454
|
-
}
|
|
455
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
456
|
-
_.label = t[1];
|
|
457
|
-
t = op;
|
|
458
|
-
break;
|
|
459
|
-
}
|
|
460
|
-
if (t && _.label < t[2]) {
|
|
461
|
-
_.label = t[2];
|
|
462
|
-
_.ops.push(op);
|
|
463
|
-
break;
|
|
464
|
-
}
|
|
465
|
-
if (t[2])
|
|
466
|
-
_.ops.pop();
|
|
467
|
-
_.trys.pop();
|
|
468
|
-
continue;
|
|
469
|
-
}
|
|
470
|
-
op = body.call(thisArg, _);
|
|
471
|
-
}
|
|
472
|
-
catch (e) {
|
|
473
|
-
op = [6, e];
|
|
474
|
-
y = 0;
|
|
475
|
-
}
|
|
476
|
-
finally {
|
|
477
|
-
f = t = 0;
|
|
478
|
-
}
|
|
479
|
-
if (op[0] & 5)
|
|
480
|
-
throw op[1];
|
|
481
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
485
|
-
if (k2 === undefined)
|
|
486
|
-
k2 = k;
|
|
487
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
488
|
-
}) : (function (o, m, k, k2) {
|
|
489
|
-
if (k2 === undefined)
|
|
490
|
-
k2 = k;
|
|
491
|
-
o[k2] = m[k];
|
|
492
|
-
});
|
|
493
|
-
function __exportStar(m, o) {
|
|
494
|
-
for (var p in m)
|
|
495
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
496
|
-
__createBinding(o, m, p);
|
|
497
|
-
}
|
|
498
|
-
function __values(o) {
|
|
499
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
500
|
-
if (m)
|
|
501
|
-
return m.call(o);
|
|
502
|
-
if (o && typeof o.length === "number")
|
|
503
|
-
return {
|
|
504
|
-
next: function () {
|
|
505
|
-
if (o && i >= o.length)
|
|
506
|
-
o = void 0;
|
|
507
|
-
return { value: o && o[i++], done: !o };
|
|
508
|
-
}
|
|
509
|
-
};
|
|
510
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
511
|
-
}
|
|
512
|
-
function __read(o, n) {
|
|
513
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
514
|
-
if (!m)
|
|
515
|
-
return o;
|
|
516
|
-
var i = m.call(o), r, ar = [], e;
|
|
517
|
-
try {
|
|
518
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
519
|
-
ar.push(r.value);
|
|
520
|
-
}
|
|
521
|
-
catch (error) {
|
|
522
|
-
e = { error: error };
|
|
523
|
-
}
|
|
524
|
-
finally {
|
|
525
|
-
try {
|
|
526
|
-
if (r && !r.done && (m = i["return"]))
|
|
527
|
-
m.call(i);
|
|
528
|
-
}
|
|
529
|
-
finally {
|
|
530
|
-
if (e)
|
|
531
|
-
throw e.error;
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
return ar;
|
|
535
|
-
}
|
|
536
|
-
/** @deprecated */
|
|
537
|
-
function __spread() {
|
|
538
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
539
|
-
ar = ar.concat(__read(arguments[i]));
|
|
540
|
-
return ar;
|
|
541
|
-
}
|
|
542
|
-
/** @deprecated */
|
|
543
|
-
function __spreadArrays() {
|
|
544
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
545
|
-
s += arguments[i].length;
|
|
546
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
547
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
548
|
-
r[k] = a[j];
|
|
549
|
-
return r;
|
|
550
|
-
}
|
|
551
|
-
function __spreadArray(to, from, pack) {
|
|
552
|
-
if (pack || arguments.length === 2)
|
|
553
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
554
|
-
if (ar || !(i in from)) {
|
|
555
|
-
if (!ar)
|
|
556
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
557
|
-
ar[i] = from[i];
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
561
|
-
}
|
|
562
|
-
function __await(v) {
|
|
563
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
564
|
-
}
|
|
565
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
566
|
-
if (!Symbol.asyncIterator)
|
|
567
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
568
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
569
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
570
|
-
function verb(n) { if (g[n])
|
|
571
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
572
|
-
function resume(n, v) { try {
|
|
573
|
-
step(g[n](v));
|
|
574
|
-
}
|
|
575
|
-
catch (e) {
|
|
576
|
-
settle(q[0][3], e);
|
|
577
|
-
} }
|
|
578
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
579
|
-
function fulfill(value) { resume("next", value); }
|
|
580
|
-
function reject(value) { resume("throw", value); }
|
|
581
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
582
|
-
resume(q[0][0], q[0][1]); }
|
|
583
|
-
}
|
|
584
|
-
function __asyncDelegator(o) {
|
|
585
|
-
var i, p;
|
|
586
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
587
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
588
|
-
}
|
|
589
|
-
function __asyncValues(o) {
|
|
590
|
-
if (!Symbol.asyncIterator)
|
|
591
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
592
|
-
var m = o[Symbol.asyncIterator], i;
|
|
593
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
594
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
595
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
596
|
-
}
|
|
597
|
-
function __makeTemplateObject(cooked, raw) {
|
|
598
|
-
if (Object.defineProperty) {
|
|
599
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
600
|
-
}
|
|
601
|
-
else {
|
|
602
|
-
cooked.raw = raw;
|
|
603
|
-
}
|
|
604
|
-
return cooked;
|
|
605
|
-
}
|
|
606
|
-
;
|
|
607
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
608
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
609
|
-
}) : function (o, v) {
|
|
610
|
-
o["default"] = v;
|
|
611
|
-
};
|
|
612
|
-
function __importStar(mod) {
|
|
613
|
-
if (mod && mod.__esModule)
|
|
614
|
-
return mod;
|
|
615
|
-
var result = {};
|
|
616
|
-
if (mod != null)
|
|
617
|
-
for (var k in mod)
|
|
618
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
619
|
-
__createBinding(result, mod, k);
|
|
620
|
-
__setModuleDefault(result, mod);
|
|
621
|
-
return result;
|
|
622
|
-
}
|
|
623
|
-
function __importDefault(mod) {
|
|
624
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
625
|
-
}
|
|
626
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
627
|
-
if (kind === "a" && !f)
|
|
628
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
629
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
630
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
631
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
632
|
-
}
|
|
633
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
634
|
-
if (kind === "m")
|
|
635
|
-
throw new TypeError("Private method is not writable");
|
|
636
|
-
if (kind === "a" && !f)
|
|
637
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
638
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
639
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
640
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
/**
|
|
644
|
-
* Option grouping component with to use with GoADropdown.
|
|
645
|
-
* selector: goa-option-group
|
|
646
|
-
*/
|
|
647
|
-
var GoAOptionGroupComponent = /** @class */ (function () {
|
|
648
|
-
function GoAOptionGroupComponent(cdr) {
|
|
649
|
-
this.cdr = cdr;
|
|
650
|
-
}
|
|
651
|
-
/**
|
|
652
|
-
* Lifecycle hook OnInit
|
|
653
|
-
* @ignore
|
|
654
|
-
*/
|
|
655
|
-
GoAOptionGroupComponent.prototype.ngOnInit = function () {
|
|
656
|
-
if (this.label === undefined || this.label === null || this.label === '') {
|
|
657
|
-
throw new TypeError("The input 'label' is required.");
|
|
658
|
-
}
|
|
659
|
-
};
|
|
660
|
-
/**
|
|
661
|
-
* Lifecycle hook AfterViewInit
|
|
662
|
-
* @ignore
|
|
663
|
-
*/
|
|
664
|
-
GoAOptionGroupComponent.prototype.ngAfterViewInit = function () {
|
|
665
|
-
this._filteredOptions = __spreadArray([], __read(this.options));
|
|
666
|
-
// The template output cache is populated by child components during render, so tell angular that
|
|
667
|
-
// there have been changes during the render here.
|
|
668
|
-
this.cdr.detectChanges();
|
|
669
|
-
};
|
|
670
|
-
return GoAOptionGroupComponent;
|
|
671
|
-
}());
|
|
672
|
-
GoAOptionGroupComponent.decorators = [
|
|
673
|
-
{ type: i0.Component, args: [{
|
|
674
|
-
selector: 'goa-option-group',
|
|
675
|
-
template: "<!--Grab the <option> template from the GoAOption -->\n<ng-template #optionGroupTemplate>\n <div class=\"goa-option-group\">\n {{label}}\n <div class=\"group-options\">\n <ng-container class=\"goa-option\"> \n <ng-template *ngFor=\"let option of _filteredOptions\" [ngTemplateOutlet]=\"option.optionTemplate\"></ng-template>\n </ng-container>\n </div>\n </div>\n</ng-template>",
|
|
676
|
-
styles: [".goa-option-group{font-weight:bold}.goa-option-group .group-options{padding-left:1em;font-weight:normal}\n"]
|
|
677
|
-
},] }
|
|
678
|
-
];
|
|
679
|
-
GoAOptionGroupComponent.ctorParameters = function () { return [
|
|
680
|
-
{ type: i0.ChangeDetectorRef }
|
|
681
|
-
]; };
|
|
682
|
-
GoAOptionGroupComponent.propDecorators = {
|
|
683
|
-
label: [{ type: i0.Input }],
|
|
684
|
-
options: [{ type: i0.ContentChildren, args: [GoAOptionComponent, { descendants: true },] }],
|
|
685
|
-
optionGroupTemplate: [{ type: i0.ViewChild, args: ['optionGroupTemplate',] }]
|
|
686
|
-
};
|
|
687
|
-
|
|
688
|
-
/**
|
|
689
|
-
* A dropdown component with Government of Alberta styling.
|
|
690
|
-
* selector: goa-dropdown
|
|
691
|
-
*/
|
|
692
|
-
var GoADropdownComponent = /** @class */ (function () {
|
|
693
|
-
function GoADropdownComponent(cdr) {
|
|
694
|
-
this.cdr = cdr;
|
|
695
|
-
/**
|
|
696
|
-
* boolean for if the dropdown is open.
|
|
697
|
-
* @ignore
|
|
698
|
-
*/
|
|
699
|
-
this._isOpen = false;
|
|
700
|
-
/**
|
|
701
|
-
* Is the required error tripped?
|
|
702
|
-
* @ignore
|
|
703
|
-
*/
|
|
704
|
-
this._requiredError = false;
|
|
705
|
-
/**
|
|
706
|
-
* This position config ensures that the top "start" corner of the overlay
|
|
707
|
-
* is aligned with with the bottom "start" of the origin by default (overlapping
|
|
708
|
-
* the trigger completely). If the panel cannot fit below the trigger, it
|
|
709
|
-
* will fall back to a position above the trigger.
|
|
710
|
-
* @ignore
|
|
711
|
-
*/
|
|
712
|
-
this._positions = [
|
|
713
|
-
{
|
|
714
|
-
originX: 'start',
|
|
715
|
-
originY: 'bottom',
|
|
716
|
-
overlayX: 'start',
|
|
717
|
-
overlayY: 'top',
|
|
718
|
-
},
|
|
719
|
-
{
|
|
720
|
-
originX: 'start',
|
|
721
|
-
originY: 'top',
|
|
722
|
-
overlayX: 'start',
|
|
723
|
-
overlayY: 'bottom',
|
|
724
|
-
},
|
|
725
|
-
];
|
|
726
|
-
/**
|
|
727
|
-
* All options currently matching filter including groups.
|
|
728
|
-
* @ignore
|
|
729
|
-
*/
|
|
730
|
-
this._allFilteredOptions = [];
|
|
731
|
-
/**
|
|
732
|
-
* Whats the mode for typeahead.
|
|
733
|
-
*/
|
|
734
|
-
this.typeaheadMode = 'none';
|
|
735
|
-
/**
|
|
736
|
-
* Is the select disabled.
|
|
737
|
-
*/
|
|
738
|
-
this.disabled = false;
|
|
739
|
-
/**
|
|
740
|
-
* @ignore
|
|
741
|
-
*/
|
|
742
|
-
this._multiple = false;
|
|
743
|
-
/**
|
|
744
|
-
* @ignore
|
|
745
|
-
*/
|
|
746
|
-
this._required = false;
|
|
747
|
-
/**
|
|
748
|
-
* Event emitted containing the value field of all selected options when the selection changes.
|
|
749
|
-
*/
|
|
750
|
-
this.selectionChange = new i0.EventEmitter();
|
|
751
|
-
}
|
|
752
|
-
Object.defineProperty(GoADropdownComponent.prototype, "selectedIds", {
|
|
753
|
-
/**
|
|
754
|
-
* Update the selected options, select the options with the given ids
|
|
755
|
-
*/
|
|
756
|
-
set: function (ids) {
|
|
757
|
-
if (this.allOptions === undefined) {
|
|
758
|
-
// aren't initialized yet, return
|
|
759
|
-
return;
|
|
760
|
-
}
|
|
761
|
-
if (ids === null || ids === undefined) {
|
|
762
|
-
ids = [];
|
|
763
|
-
}
|
|
764
|
-
if (ids.length > 1 && this.multiple === false) {
|
|
765
|
-
throw new Error('Cannot select multiple options when the dropdown has multiple set to false.');
|
|
766
|
-
}
|
|
767
|
-
var selectedOptions = [];
|
|
768
|
-
this.allOptions.forEach(function (option) {
|
|
769
|
-
if (ids.includes(option.id)) {
|
|
770
|
-
option.selected = true;
|
|
771
|
-
selectedOptions.push(option);
|
|
772
|
-
}
|
|
773
|
-
else {
|
|
774
|
-
option.selected = false;
|
|
775
|
-
}
|
|
776
|
-
});
|
|
777
|
-
this.selectionChanged(selectedOptions, true);
|
|
778
|
-
},
|
|
779
|
-
enumerable: false,
|
|
780
|
-
configurable: true
|
|
781
|
-
});
|
|
782
|
-
Object.defineProperty(GoADropdownComponent.prototype, "multiple", {
|
|
783
|
-
get: function () {
|
|
784
|
-
return this._multiple;
|
|
785
|
-
},
|
|
786
|
-
/**
|
|
787
|
-
* Is multiple selection?
|
|
788
|
-
*/
|
|
789
|
-
set: function (value) {
|
|
790
|
-
this._multiple = value;
|
|
791
|
-
if (this._multiple === false) {
|
|
792
|
-
// If we have changed from multiple to no multiple then deselect everything.
|
|
793
|
-
this.selectedItems.forEach(function (option) {
|
|
794
|
-
option.selected = false;
|
|
795
|
-
});
|
|
796
|
-
}
|
|
797
|
-
},
|
|
798
|
-
enumerable: false,
|
|
799
|
-
configurable: true
|
|
800
|
-
});
|
|
801
|
-
Object.defineProperty(GoADropdownComponent.prototype, "required", {
|
|
802
|
-
get: function () {
|
|
803
|
-
return this._required;
|
|
804
|
-
},
|
|
805
|
-
/**
|
|
806
|
-
* Is a selection required?
|
|
807
|
-
*/
|
|
808
|
-
set: function (value) {
|
|
809
|
-
this._required = value;
|
|
810
|
-
this._requiredError = this.selectedItems.length === 0 && this._required === true;
|
|
811
|
-
},
|
|
812
|
-
enumerable: false,
|
|
813
|
-
configurable: true
|
|
814
|
-
});
|
|
815
|
-
/**
|
|
816
|
-
* Lifecycle hook OnInit
|
|
817
|
-
* @ignore
|
|
818
|
-
*/
|
|
819
|
-
/* eslint-disable @angular-eslint/no-empty-lifecycle-method */
|
|
820
|
-
GoADropdownComponent.prototype.ngOnInit = function () { };
|
|
821
|
-
/**
|
|
822
|
-
* Lifecycle hook AfterViewInit
|
|
823
|
-
* @ignore
|
|
824
|
-
*/
|
|
825
|
-
GoADropdownComponent.prototype.ngAfterViewInit = function () {
|
|
826
|
-
this._triggerRect = this.textInput.nativeElement.getBoundingClientRect();
|
|
827
|
-
this._filteredOptions = __spreadArray([], __read(this.options));
|
|
828
|
-
this._allFilteredOptions = __spreadArray([], __read(this.allOptions));
|
|
829
|
-
if (this.selectedItems.length > 0) {
|
|
830
|
-
this.setTextInput(this.selectedItems[0].label);
|
|
831
|
-
}
|
|
832
|
-
// The template output cache is populated by child components during render,
|
|
833
|
-
// so tell angular that there have been changes during the render here.
|
|
834
|
-
this.cdr.detectChanges();
|
|
835
|
-
};
|
|
836
|
-
/**
|
|
837
|
-
* Called when user updates the text in the searchbox.
|
|
838
|
-
* @param text The text of the input
|
|
839
|
-
* @ignore
|
|
840
|
-
*/
|
|
841
|
-
GoADropdownComponent.prototype.onFilterChange = function (text) {
|
|
842
|
-
// open the dropdown if it is not already
|
|
843
|
-
if (!this._isOpen === true) {
|
|
844
|
-
this._isOpen = true;
|
|
845
|
-
}
|
|
846
|
-
this.filterOptions(text);
|
|
847
|
-
};
|
|
848
|
-
/**
|
|
849
|
-
* Handler for keyboard events when menu is open.
|
|
850
|
-
* @param event keyboard event
|
|
851
|
-
* @ignore
|
|
852
|
-
*/
|
|
853
|
-
GoADropdownComponent.prototype.overlayKeydown = function (event) {
|
|
854
|
-
if (event.code === 'Enter' || event.code === 'NumpadEnter') {
|
|
855
|
-
this.optionClicked(this._activeOption);
|
|
856
|
-
}
|
|
857
|
-
else if (event.code === 'ArrowDown') {
|
|
858
|
-
this._activeIndex = (this._activeIndex + 1) % this._allFilteredOptions.length;
|
|
859
|
-
this._activeOption = this._allFilteredOptions[this._activeIndex];
|
|
860
|
-
}
|
|
861
|
-
else if (event.code === 'ArrowUp') {
|
|
862
|
-
if (this._activeIndex > 0) {
|
|
863
|
-
this._activeIndex = this._activeIndex - 1;
|
|
864
|
-
this._activeOption = this._allFilteredOptions[this._activeIndex];
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
};
|
|
868
|
-
/**
|
|
869
|
-
* Sets the active option. Active option is the option that when enter is pressed is selected.
|
|
870
|
-
* @param option The option to make the active option
|
|
871
|
-
* @ignore
|
|
872
|
-
*/
|
|
873
|
-
GoADropdownComponent.prototype.setActiveOption = function (option) {
|
|
874
|
-
this._activeOption = option;
|
|
875
|
-
this._activeIndex = this._allFilteredOptions.findIndex(function (filteredOption) { return filteredOption.id === option.id; });
|
|
876
|
-
};
|
|
877
|
-
/**
|
|
878
|
-
* Handler for when the input is clicked.
|
|
879
|
-
* @ignore
|
|
880
|
-
*/
|
|
881
|
-
GoADropdownComponent.prototype.inputClicked = function () {
|
|
882
|
-
if (this.disabled === false) {
|
|
883
|
-
this._isOpen = !this._isOpen;
|
|
884
|
-
// set the active option to the first in the list
|
|
885
|
-
if (this._allFilteredOptions.length > 0) {
|
|
886
|
-
this._activeOption = this._allFilteredOptions[0];
|
|
887
|
-
this._activeIndex = 0;
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
};
|
|
891
|
-
/**
|
|
892
|
-
* Handler for when descendant an option is clicked.
|
|
893
|
-
* @ignore
|
|
894
|
-
*/
|
|
895
|
-
GoADropdownComponent.prototype.optionClicked = function (option) {
|
|
896
|
-
var selectedOptions = [];
|
|
897
|
-
if (this.multiple === true) {
|
|
898
|
-
option.selected = !option.selected;
|
|
899
|
-
selectedOptions = this.selectedItems;
|
|
900
|
-
}
|
|
901
|
-
else {
|
|
902
|
-
option.selected = !option.selected;
|
|
903
|
-
this.selectedItems.forEach(function (o) {
|
|
904
|
-
if (option.id !== o.id) {
|
|
905
|
-
// change all options that weren't selected to false without notifying change
|
|
906
|
-
o.selected = false;
|
|
907
|
-
}
|
|
908
|
-
selectedOptions = [option];
|
|
909
|
-
});
|
|
910
|
-
}
|
|
911
|
-
this.selectionChanged(selectedOptions, true);
|
|
912
|
-
if (this.multiple === false) {
|
|
913
|
-
// close the dropdown if we are in single selection mode
|
|
914
|
-
this._isOpen = false;
|
|
915
|
-
}
|
|
916
|
-
};
|
|
917
|
-
/**
|
|
918
|
-
* Update view when selection changes
|
|
919
|
-
* @param options
|
|
920
|
-
* @ignore
|
|
921
|
-
*/
|
|
922
|
-
GoADropdownComponent.prototype.selectionChanged = function (options, emitEvent) {
|
|
923
|
-
if (options.length > 0) {
|
|
924
|
-
var selectedOptions = options.map(function (o) { return o.label; }).join(', ');
|
|
925
|
-
this._requiredError = false;
|
|
926
|
-
this.setTextInput(selectedOptions);
|
|
927
|
-
}
|
|
928
|
-
else {
|
|
929
|
-
this._requiredError = this.required;
|
|
930
|
-
this.setTextInput('');
|
|
931
|
-
}
|
|
932
|
-
if (emitEvent === true) {
|
|
933
|
-
this.emitChange(options);
|
|
934
|
-
}
|
|
935
|
-
};
|
|
936
|
-
/**
|
|
937
|
-
* Emit selection change
|
|
938
|
-
* @ignore
|
|
939
|
-
*/
|
|
940
|
-
GoADropdownComponent.prototype.emitChange = function (options) {
|
|
941
|
-
var values = options.map(function (option) { return option.value; });
|
|
942
|
-
this.selectionChange.emit(values);
|
|
943
|
-
};
|
|
944
|
-
Object.defineProperty(GoADropdownComponent.prototype, "selectedItems", {
|
|
945
|
-
/**
|
|
946
|
-
* Gets all the currently selected options
|
|
947
|
-
* @ignore
|
|
948
|
-
*/
|
|
949
|
-
get: function () {
|
|
950
|
-
if (this.allOptions === undefined) {
|
|
951
|
-
return [];
|
|
952
|
-
}
|
|
953
|
-
return __spreadArray([], __read(this.allOptions.filter(function (option) { return option.selected === true; })));
|
|
37
|
+
return this._value;
|
|
954
38
|
},
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
* @ignore
|
|
962
|
-
*/
|
|
963
|
-
GoADropdownComponent.prototype.setTextInput = function (value) {
|
|
964
|
-
if (this.textInput) {
|
|
965
|
-
this.textInput.nativeElement.value = value;
|
|
966
|
-
// Exact matches show whole list?
|
|
967
|
-
this.filterOptions('');
|
|
968
|
-
}
|
|
969
|
-
};
|
|
970
|
-
/**
|
|
971
|
-
* Update the filtered options with the passed in filter text.
|
|
972
|
-
* @param filterText The text to filter by
|
|
973
|
-
* @ignore
|
|
974
|
-
*/
|
|
975
|
-
GoADropdownComponent.prototype.filterOptions = function (filterText) {
|
|
976
|
-
var _this = this;
|
|
977
|
-
this.optionGroups.forEach(function (group) {
|
|
978
|
-
group._filteredOptions = group.options.filter(_this.typeaheadFilter.bind(_this, filterText, _this.typeaheadMode));
|
|
979
|
-
});
|
|
980
|
-
this._filteredOptions = this.options.filter(this.typeaheadFilter.bind(this, filterText, this.typeaheadMode));
|
|
981
|
-
this._allFilteredOptions = this.allOptions.filter(this.typeaheadFilter.bind(this, filterText, this.typeaheadMode));
|
|
982
|
-
// The filters have changed so update the active option incase it has been filtered out.
|
|
983
|
-
this._activeOption = this._allFilteredOptions[this._activeIndex % this._allFilteredOptions.length];
|
|
984
|
-
};
|
|
985
|
-
/**
|
|
986
|
-
* Filter for typeahead with logic for what mode we are in.
|
|
987
|
-
* @param option
|
|
988
|
-
* @ignore
|
|
989
|
-
*/
|
|
990
|
-
GoADropdownComponent.prototype.typeaheadFilter = function (filterText, typeaheadMode, option) {
|
|
991
|
-
if (typeaheadMode === 'none' || this.typeaheadMode === undefined) {
|
|
992
|
-
return true;
|
|
993
|
-
}
|
|
994
|
-
if (typeaheadMode === 'startsWith') {
|
|
995
|
-
return option.label.toLocaleLowerCase().startsWith(filterText.toLocaleLowerCase());
|
|
996
|
-
}
|
|
997
|
-
if (typeaheadMode === 'contains') {
|
|
998
|
-
return option.label.toLocaleLowerCase().includes(filterText.toLocaleLowerCase());
|
|
999
|
-
}
|
|
1000
|
-
};
|
|
1001
|
-
return GoADropdownComponent;
|
|
1002
|
-
}());
|
|
1003
|
-
GoADropdownComponent.decorators = [
|
|
1004
|
-
{ type: i0.Component, args: [{
|
|
1005
|
-
selector: 'goa-dropdown',
|
|
1006
|
-
template: "<div class=\"goa-dropdown\" [ngClass]=\"{\n 'single-selection': multiple === false,\n 'has-error': _requiredError === true,\n 'opened': _isOpen,\n 'disabled': disabled === true\n }\"> \n <label class=\"dropdown-label\">{{label}}\n <span *ngIf=\"required\" class=\"required-label\" i18n=\"Required label for dropdown\">(Required)</span>\n <div (click)=\"inputClicked()\" class=\"dropdown-grouping\" cdkOverlayOrigin #trigger=\"cdkOverlayOrigin\">\n <i class=\"goa-select-icon\"></i>\n <input class=\"dropdown-textbox margin-override\" \n #textInput \n (input)=\"onFilterChange($event.target.value)\"\n type=\"text\" \n [attr.readonly]=\"typeaheadMode === 'none' ? 'readonly' : null\"\n [attr.disabled]=\"disabled === true ? 'true' : null\"\n placeholder=\"{{description}}\"> \n <ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayViewportMargin]=\"20\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"_isOpen = false\"\n (overlayKeydown)=\"overlayKeydown($event)\"\n (detach)=\"_isOpen = false\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"_isOpen\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n [cdkConnectedOverlayMinWidth]=\"_triggerRect?.width\"\n [cdkConnectedOverlayHeight]=\"menuHeight\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n >\n <div class=\"dropdown-menu\">\n <div *ngFor=\"let optionGroup of optionGroups\" class=\"option-group\">\n <div *ngIf=\"optionGroup._filteredOptions.length > 0\">\n <div class=\"option-group-label\">\n {{optionGroup.label}}\n </div>\n <!--Grab the <option> template from the GoAOption -->\n <div class=\"option\"\n [ngClass]=\"{\n 'selected': option.selected,\n 'active': option.id === _activeOption.id\n }\"\n *ngFor=\"let option of (optionGroup._filteredOptions)\" \n (click)=\"optionClicked(option)\"\n (mouseover)=\"setActiveOption(option)\">\n <ng-template [ngTemplateOutlet]=\"option.optionTemplate\"></ng-template>\n </div>\n </div>\n </div>\n <!--Grab the <option> template from the GoAOption -->\n <div class=\"option\" \n [ngClass]=\"{\n 'selected': option.selected,\n 'active': option.id === _activeOption.id\n }\"\n *ngFor=\"let option of (_filteredOptions)\" \n (click)=\"optionClicked(option)\"\n (mouseover)=\"setActiveOption(option)\"> \n <ng-template [ngTemplateOutlet]=\"option.optionTemplate\"></ng-template>\n </div>\n </div> \n </ng-template> \n </div>\n <span *ngIf=\"!_requiredError\" class=\"helper-text\">{{description}}</span>\n <span *ngIf=\"_requiredError === true\" class=\"error-text\" i18n=\"Required warning for dropdown\">At least one item must be selected.</span> \n </label>\n</div>\n",
|
|
1007
|
-
styles: [".dropdown-overlay{position:absolute;top:0;left:0;right:0;bottom:0}.dropdown-menu{border:solid 1px #dcdcdc;border-radius:4px;background:#fff;padding:0;margin-top:3px;width:100%;overflow-y:auto}.dropdown-menu .option-group .option-group-label{font-weight:bold;padding:4px 12px}.dropdown-menu .option-group .option{font-weight:normal;padding:4px 24px}.dropdown-menu .option{padding:4px 12px;color:#0070c4;border:1px solid #f1f1f1}.dropdown-menu .option.selected{background-color:#0070c4;color:#fff}.dropdown-menu .option.selected.active{background-color:#004f84;color:#fff}.dropdown-menu .option.active{background-color:#f1f1f1;color:#333}.goa-dropdown{position:relative}.goa-dropdown .dropdown-grouping input[type=text]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding-right:30px!important}.goa-dropdown .dropdown-grouping.disabled{opacity:30%}.goa-dropdown .dropdown-grouping .dropdown-textbox{box-sizing:border-box;width:100%;margin:8px 0 0;padding:12px 8px 12px 12px;border-radius:4px;border:1px solid #666;font-size:18px;font-weight:400;color:#0070c4;-webkit-appearance:none;-moz-appearance:none;appearance:none}.goa-dropdown .dropdown-grouping .dropdown-textbox:disabled{opacity:.3;pointer-events:none}.goa-dropdown .dropdown-grouping .dropdown-textbox::-ms-expand{display:none}.goa-dropdown .dropdown-grouping .dropdown-textbox:hover{border:1px solid #0070c4}.goa-dropdown .dropdown-grouping .dropdown-textbox:focus{box-shadow:0 0 0 3px #feba35;outline:none}.goa-dropdown .dropdown-grouping .dropdown-textbox.margin-override{margin:0}.goa-dropdown .dropdown-grouping .dropdown-textbox-filter{font-size:14px!important;border:none!important;margin:0!important}.goa-dropdown .dropdown-grouping .dropdown-textbox-filter{box-sizing:border-box;width:100%;margin:8px 0 0;padding:12px 8px 12px 12px;border-radius:4px;border:1px solid #666;font-size:18px;font-weight:400;color:#0070c4;-webkit-appearance:none;-moz-appearance:none;appearance:none}.goa-dropdown .dropdown-grouping .dropdown-textbox-filter:disabled{opacity:.3;pointer-events:none}.goa-dropdown .dropdown-grouping .dropdown-textbox-filter::-ms-expand{display:none}.goa-dropdown .dropdown-grouping .dropdown-textbox-filter:hover{border:1px solid #0070c4}.goa-dropdown .dropdown-grouping .dropdown-textbox-filter:focus{box-shadow:0 0 0 3px #feba35;outline:none}.goa-dropdown .dropdown-grouping .dropdown-textbox-filter:focus{box-shadow:none!important;outline:none}.goa-dropdown i.goa-select-icon{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cpath class='' opacity='1' d='M11.29,15.7a1,1,0,0,0,1.41,0l6-6A1,1,0,1,0,17.29,8.3L12,13.58,6.71,8.3a1,1,0,0,0-1.42,0,1,1,0,0,0,0,1.41Z'/%3E%3C/svg%3E%0A\");background-repeat:no-repeat;background-size:contain;background-position:center center;left:auto;right:8px;width:24px;height:24px;pointer-events:none;position:absolute;margin-top:16px;color:#0070c4}.goa-dropdown.disabled i.goa-select-icon{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cpath class='' opacity='0.3' d='M11.29,15.7a1,1,0,0,0,1.41,0l6-6A1,1,0,1,0,17.29,8.3L12,13.58,6.71,8.3a1,1,0,0,0-1.42,0,1,1,0,0,0,0,1.41Z'/%3E%3C/svg%3E%0A\");background-repeat:no-repeat;background-size:contain;background-position:center center}.goa-dropdown.opened i.goa-select-icon{transform:rotate(180deg)}.goa-dropdown.has-error .dropdown-grouping .dropdown-textbox{border:solid 2px #fc1921}.goa-dropdown .dropdown-label{font-size:18px;font-weight:bold;color:#333}.goa-dropdown .required-label{margin-left:8px;font-size:14px;color:#666}.goa-dropdown .helper-text{font-size:14px;font-weight:normal;color:#333}.goa-dropdown .error-text{color:#fc1921;font-size:14px}\n"]
|
|
1008
|
-
},] }
|
|
1009
|
-
];
|
|
1010
|
-
GoADropdownComponent.ctorParameters = function () { return [
|
|
1011
|
-
{ type: i0.ChangeDetectorRef }
|
|
1012
|
-
]; };
|
|
1013
|
-
GoADropdownComponent.propDecorators = {
|
|
1014
|
-
typeaheadMode: [{ type: i0.Input }],
|
|
1015
|
-
menuHeight: [{ type: i0.Input }],
|
|
1016
|
-
label: [{ type: i0.Input }],
|
|
1017
|
-
description: [{ type: i0.Input }],
|
|
1018
|
-
selectedIds: [{ type: i0.Input }],
|
|
1019
|
-
disabled: [{ type: i0.Input }],
|
|
1020
|
-
multiple: [{ type: i0.Input }],
|
|
1021
|
-
required: [{ type: i0.Input }],
|
|
1022
|
-
textInput: [{ type: i0.ViewChild, args: ['textInput',] }],
|
|
1023
|
-
allOptions: [{ type: i0.ContentChildren, args: [GoAOptionComponent, { descendants: true },] }],
|
|
1024
|
-
options: [{ type: i0.ContentChildren, args: [GoAOptionComponent, { descendants: false },] }],
|
|
1025
|
-
optionGroups: [{ type: i0.ContentChildren, args: [GoAOptionGroupComponent, { descendants: false },] }],
|
|
1026
|
-
selectionChange: [{ type: i0.Output }]
|
|
1027
|
-
};
|
|
1028
|
-
|
|
1029
|
-
var GOA_CHECKBOX_CONTROL_VALUE_ACCESSOR = {
|
|
1030
|
-
provide: forms.NG_VALUE_ACCESSOR,
|
|
1031
|
-
useExisting: i0.forwardRef(function () { return GoACheckboxComponent; }),
|
|
1032
|
-
multi: true
|
|
1033
|
-
};
|
|
1034
|
-
/**
|
|
1035
|
-
* Checkbox component with Government of Alberta styling.
|
|
1036
|
-
* selector: goa-checkbox
|
|
1037
|
-
*/
|
|
1038
|
-
var GoACheckboxComponent = /** @class */ (function () {
|
|
1039
|
-
function GoACheckboxComponent(_changeDetectorRef) {
|
|
1040
|
-
this._changeDetectorRef = _changeDetectorRef;
|
|
1041
|
-
/**
|
|
1042
|
-
* @ignore
|
|
1043
|
-
*/
|
|
1044
|
-
this._indeterminate = false;
|
|
1045
|
-
/**
|
|
1046
|
-
* The position to display the label/text for the checbox. Valid values are before and after.
|
|
1047
|
-
*/
|
|
1048
|
-
this.labelPosition = 'after';
|
|
1049
|
-
/**
|
|
1050
|
-
* Event emitted containing the source checkbox, and whether or not it is checked.
|
|
1051
|
-
*/
|
|
1052
|
-
this.selectionChange = new i0.EventEmitter();
|
|
1053
|
-
/**
|
|
1054
|
-
* @ignore
|
|
1055
|
-
*/
|
|
1056
|
-
this._propagateChange = function (_) { };
|
|
1057
|
-
this.uniqueId = "goa-checkbox-" + GoACheckboxComponent.idNum++;
|
|
1058
|
-
}
|
|
1059
|
-
Object.defineProperty(GoACheckboxComponent.prototype, "indeterminate", {
|
|
1060
|
-
/**
|
|
1061
|
-
* Boolean indicating whether or not the checkbox should display as indeterminate
|
|
1062
|
-
* (i.e. it has associated 'child' checkboxes, some of which are selected).
|
|
1063
|
-
*/
|
|
1064
|
-
get: function () { return this._indeterminate; },
|
|
1065
|
-
set: function (value) {
|
|
1066
|
-
// only do something if value has changed from current
|
|
1067
|
-
if (value !== this.indeterminate) {
|
|
1068
|
-
this._indeterminate = value;
|
|
1069
|
-
// can't be indeterminate and checked, so clear checked
|
|
1070
|
-
if (this._indeterminate) {
|
|
1071
|
-
this.checked = false;
|
|
1072
|
-
}
|
|
39
|
+
set: function (val) {
|
|
40
|
+
if (val !== this._value) {
|
|
41
|
+
this._value = val;
|
|
42
|
+
this.onChange(this._value);
|
|
43
|
+
this.onTouched();
|
|
44
|
+
this.elementRef.nativeElement.value = val;
|
|
1073
45
|
}
|
|
1074
46
|
},
|
|
1075
47
|
enumerable: false,
|
|
1076
48
|
configurable: true
|
|
1077
49
|
});
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
*/
|
|
1082
|
-
GoACheckboxComponent.prototype.hasError = function () {
|
|
1083
|
-
return this.required && !this.checked;
|
|
1084
|
-
};
|
|
1085
|
-
/**
|
|
1086
|
-
* Implemented as part of ControlValueAccessor.
|
|
1087
|
-
* @param value The model bound property, i.e. the value of checked
|
|
1088
|
-
* @ignore
|
|
1089
|
-
*/
|
|
1090
|
-
GoACheckboxComponent.prototype.writeValue = function (value) {
|
|
1091
|
-
if ((value !== undefined) && (value !== null)) {
|
|
1092
|
-
this.checked = value;
|
|
1093
|
-
this._changeDetectorRef.detectChanges();
|
|
1094
|
-
}
|
|
1095
|
-
};
|
|
1096
|
-
/**
|
|
1097
|
-
* Implemented as part of ControlValueAccessor.
|
|
1098
|
-
* @param fn The function to call on change. Provided by ControlValueAccessor
|
|
1099
|
-
* @ignore
|
|
1100
|
-
*/
|
|
1101
|
-
GoACheckboxComponent.prototype.registerOnChange = function (fn) {
|
|
1102
|
-
this._propagateChange = fn;
|
|
1103
|
-
};
|
|
1104
|
-
/**
|
|
1105
|
-
* Implemented as part of ControlValueAccessor.
|
|
1106
|
-
* @param fn The function to call on touch. Provided by ControlValueAccessor
|
|
1107
|
-
* @ignore
|
|
1108
|
-
*/
|
|
1109
|
-
GoACheckboxComponent.prototype.registerOnTouched = function (fn) {
|
|
1110
|
-
this._onTouchedCallback = fn;
|
|
1111
|
-
};
|
|
1112
|
-
;
|
|
1113
|
-
/**
|
|
1114
|
-
* Toggles the checked value of the checkbox
|
|
1115
|
-
* @ignore
|
|
1116
|
-
*/
|
|
1117
|
-
GoACheckboxComponent.prototype.toggle = function () {
|
|
1118
|
-
this.checked = !this.checked;
|
|
1119
|
-
};
|
|
1120
|
-
/**
|
|
1121
|
-
* User interaction event on click of the checkbox or its label to indicate toggling of the current checked status.
|
|
1122
|
-
* Emits selectionChange to parent components.
|
|
1123
|
-
* @ignore
|
|
1124
|
-
*/
|
|
1125
|
-
GoACheckboxComponent.prototype.onChange = function (event) {
|
|
1126
|
-
event.stopPropagation();
|
|
1127
|
-
this.toggle();
|
|
1128
|
-
// user manually clicking overrides indeterminate and sets it to false
|
|
1129
|
-
// this is because if they click and set to checked/unchecked, all 'child' checkboxes should get set to
|
|
1130
|
-
// checked/unchecked (by user routine, not here), so this checkbox is no longer indeterminate
|
|
1131
|
-
this.indeterminate = false;
|
|
1132
|
-
var checkBoxChange = {
|
|
1133
|
-
source: this,
|
|
1134
|
-
checked: this.checked
|
|
1135
|
-
};
|
|
1136
|
-
this._propagateChange(this.checked);
|
|
1137
|
-
this.selectionChange.emit(checkBoxChange);
|
|
1138
|
-
};
|
|
1139
|
-
return GoACheckboxComponent;
|
|
1140
|
-
}());
|
|
1141
|
-
/**
|
|
1142
|
-
* @ignore
|
|
1143
|
-
*/
|
|
1144
|
-
GoACheckboxComponent.idNum = 0;
|
|
1145
|
-
GoACheckboxComponent.decorators = [
|
|
1146
|
-
{ type: i0.Component, args: [{
|
|
1147
|
-
selector: 'goa-checkbox',
|
|
1148
|
-
template: "\n<div class=\"goa-checkbox\" [ngClass]=\"{'goa-checkbox-disabled': disabled, 'has-error': hasError(), 'goa-checkbox-label-before': labelPosition === 'before'}\">\n <label class=\"goa-checkbox-layout\" [attr.for]=\"uniqueId\">\n <div class=\"goa-checkbox-container\"\n [ngClass]=\"{'goa-checkbox-selected': checked, 'goa-checkbox-indeterminate': indeterminate}\">\n <input type=\"checkbox\"\n [id]=\"uniqueId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [attr.value]=\"value\"\n (change)=\"onChange($event)\"\n />\n <svg *ngIf=\"checked\" id='checkmark' xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 12.18\" class=\"goa-checkmark\">\n <path d=\"M5.09,9.64,1.27,5.82,0,7.09l5.09,5.09L16,1.27,14.73,0Z\"/>\n </svg>\n <svg *ngIf=\"indeterminate\" id='dashmark' xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 15 2\" class=\"goa-indeterminate\">\n <rect width=\"15\" height=\"2\"/>\n </svg>\n </div>\n <div class=\"goa-checkbox-label\">\n <ng-content></ng-content>\n </div>\n </label>\n</div>\n",
|
|
1149
|
-
//register our custom ControlValueAccessor with angular DI system so angular knows how to get instance of it for ngModel binding
|
|
1150
|
-
providers: [GOA_CHECKBOX_CONTROL_VALUE_ACCESSOR],
|
|
1151
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1152
|
-
styles: [".goa-checkbox input[type=checkbox]{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;outline:0;-webkit-appearance:none}.goa-checkbox .goa-checkbox-label{z-index:2;box-sizing:border-box;margin:0;padding:0 0 0 8px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:46px;display:flex;align-items:center}.goa-checkbox.goa-checkbox-disabled{opacity:30%}.goa-checkbox.goa-checkbox-disabled .goa-checkbox-label{cursor:default}.goa-checkbox.has-error .goa-checkbox-container{border:solid 2px #fc1921;color:#fc1921}.goa-checkbox.has-error .goa-checkbox-container svg{fill:#fc1921}.goa-checkbox .goa-checkbox-container{box-sizing:border-box;border:1px solid #666;border-radius:2px;height:24px;line-height:24px;width:24px;display:flex;flex-direction:column;justify-content:center;padding:3px}.goa-checkbox .goa-checkbox-container svg{display:none;flex:1 1 auto;fill:#fff}.goa-checkbox .goa-checkbox-container.goa-checkbox-selected{background-color:#0070c4}.goa-checkbox .goa-checkbox-container.goa-checkbox-selected .goa-checkmark{display:block!important}.goa-checkbox .goa-checkbox-container.goa-checkbox-selected .goa-indeterminate{display:none!important}.goa-checkbox .goa-checkbox-container.goa-checkbox-indeterminate{background-color:#0070c4}.goa-checkbox .goa-checkbox-container.goa-checkbox-indeterminate .goa-checkmark{display:none}.goa-checkbox .goa-checkbox-container.goa-checkbox-indeterminate .goa-indeterminate{display:block}.goa-checkbox .goa-checkbox-container:hover:not(.goa-checkbox-selected):not(.goa-checkbox-indeterminate){background-color:#f1f1f1}.goa-checkbox .goa-checkbox-container:focus-within{box-shadow:0 0 0 3px #feba35;outline:none}.goa-checkbox.goa-checkbox-label-before .goa-checkbox-container{order:1;margin-left:8px;margin-right:auto}.goa-checkbox-layout{display:inline-flex;align-items:center;line-height:2.5rem}\n"]
|
|
1153
|
-
},] }
|
|
1154
|
-
];
|
|
1155
|
-
GoACheckboxComponent.ctorParameters = function () { return [
|
|
1156
|
-
{ type: i0.ChangeDetectorRef }
|
|
1157
|
-
]; };
|
|
1158
|
-
GoACheckboxComponent.propDecorators = {
|
|
1159
|
-
value: [{ type: i0.Input }],
|
|
1160
|
-
checked: [{ type: i0.Input }],
|
|
1161
|
-
disabled: [{ type: i0.Input }],
|
|
1162
|
-
required: [{ type: i0.Input }],
|
|
1163
|
-
indeterminate: [{ type: i0.Input }],
|
|
1164
|
-
labelPosition: [{ type: i0.Input }],
|
|
1165
|
-
selectionChange: [{ type: i0.Output }]
|
|
1166
|
-
};
|
|
1167
|
-
|
|
1168
|
-
var GoARadioChange = /** @class */ (function () {
|
|
1169
|
-
function GoARadioChange() {
|
|
1170
|
-
}
|
|
1171
|
-
return GoARadioChange;
|
|
1172
|
-
}());
|
|
1173
|
-
|
|
1174
|
-
var GoARadioService = /** @class */ (function () {
|
|
1175
|
-
function GoARadioService() {
|
|
1176
|
-
this.radioChangeMessage = new rxjs.BehaviorSubject(new GoARadioChange());
|
|
1177
|
-
}
|
|
1178
|
-
GoARadioService.prototype.selectRadio = function (radioChange) {
|
|
1179
|
-
this.radioChangeMessage.next(radioChange);
|
|
1180
|
-
};
|
|
1181
|
-
return GoARadioService;
|
|
1182
|
-
}());
|
|
1183
|
-
GoARadioService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function GoARadioService_Factory() { return new GoARadioService(); }, token: GoARadioService, providedIn: "root" });
|
|
1184
|
-
GoARadioService.decorators = [
|
|
1185
|
-
{ type: i0.Injectable, args: [{
|
|
1186
|
-
providedIn: 'root',
|
|
1187
|
-
},] }
|
|
1188
|
-
];
|
|
1189
|
-
GoARadioService.ctorParameters = function () { return []; };
|
|
1190
|
-
|
|
1191
|
-
/**
|
|
1192
|
-
* Control value accessor to use for the component's provider
|
|
1193
|
-
* @ignore
|
|
1194
|
-
*/
|
|
1195
|
-
var GOA_RADIO_CONTROL_VALUE_ACCESSOR = {
|
|
1196
|
-
provide: forms.NG_VALUE_ACCESSOR,
|
|
1197
|
-
useExisting: i0.forwardRef(function () { return GoARadioComponent; }),
|
|
1198
|
-
multi: true
|
|
1199
|
-
};
|
|
1200
|
-
/**
|
|
1201
|
-
* Radiobutton component with Government of Alberta styling.
|
|
1202
|
-
*/
|
|
1203
|
-
var GoARadioComponent = /** @class */ (function () {
|
|
1204
|
-
function GoARadioComponent(_changeDetector, _radioService) {
|
|
1205
|
-
this._changeDetector = _changeDetector;
|
|
1206
|
-
this._radioService = _radioService;
|
|
1207
|
-
/**
|
|
1208
|
-
* The position to display the label/text for the radiobutton. Valid values are before and after.
|
|
1209
|
-
*/
|
|
1210
|
-
this.labelPosition = 'after';
|
|
1211
|
-
/**
|
|
1212
|
-
* Event emitted containing the source radiobutton, and whether or not it is checked.
|
|
1213
|
-
*/
|
|
1214
|
-
this.selectionChange = new i0.EventEmitter();
|
|
1215
|
-
/**
|
|
1216
|
-
* @ignore
|
|
1217
|
-
*/
|
|
1218
|
-
this._propagateChange = function (_) { };
|
|
1219
|
-
this.uniqueId = "goa-radiobutton-" + GoARadioComponent.idNum++;
|
|
1220
|
-
}
|
|
1221
|
-
/**
|
|
1222
|
-
* Lifecycle hook OnInit. Used to subscribe to radio change messages from the radioService in order to know whether or not
|
|
1223
|
-
* this radio should be checked or not.
|
|
1224
|
-
* @ignore
|
|
1225
|
-
*/
|
|
1226
|
-
GoARadioComponent.prototype.ngOnInit = function () {
|
|
1227
|
-
var _this = this;
|
|
1228
|
-
this.radioServiceSubscription = this._radioService.radioChangeMessage.subscribe(function (rcm) {
|
|
1229
|
-
if (rcm && rcm.source && rcm.source.name === _this.name && rcm.source.uniqueId !== _this.uniqueId) {
|
|
1230
|
-
_this.checked = false;
|
|
1231
|
-
_this._changeDetector.detectChanges();
|
|
1232
|
-
}
|
|
1233
|
-
});
|
|
1234
|
-
};
|
|
1235
|
-
/**
|
|
1236
|
-
* Lifecycle hook OnDestroy. Used to unsubscribe from the radio change messages.
|
|
1237
|
-
* @ignore
|
|
1238
|
-
*/
|
|
1239
|
-
GoARadioComponent.prototype.ngOnDestroy = function () {
|
|
1240
|
-
this.radioServiceSubscription.unsubscribe();
|
|
1241
|
-
};
|
|
1242
|
-
/**
|
|
1243
|
-
* Boolean indicating if the radiobutton is required and not checked
|
|
1244
|
-
* @ignore
|
|
1245
|
-
*/
|
|
1246
|
-
GoARadioComponent.prototype.hasError = function () {
|
|
1247
|
-
return this.required && !this.checked;
|
|
1248
|
-
};
|
|
1249
|
-
/**
|
|
1250
|
-
* Marks the radio button as needing checking for change detection.
|
|
1251
|
-
* This method is exposed because the parent radio group will directly
|
|
1252
|
-
* update bound properties of the radio button.
|
|
1253
|
-
*/
|
|
1254
|
-
GoARadioComponent.prototype.markForCheck = function () {
|
|
1255
|
-
// When group value changes, the button will not be notified. Use `markForCheck` to explicitly
|
|
1256
|
-
// update radio button's status
|
|
1257
|
-
this._changeDetector.markForCheck();
|
|
1258
|
-
};
|
|
1259
|
-
/**
|
|
1260
|
-
* Implemented as part of ControlValueAccessor.
|
|
1261
|
-
* @param value The model bound property, i.e. the value of checked
|
|
1262
|
-
* @ignore
|
|
1263
|
-
*/
|
|
1264
|
-
GoARadioComponent.prototype.writeValue = function (value) {
|
|
1265
|
-
if ((value !== undefined) && (value !== null)) {
|
|
1266
|
-
this.checked = value;
|
|
1267
|
-
this._changeDetector.detectChanges();
|
|
50
|
+
ValueDirective.prototype.writeValue = function (value) {
|
|
51
|
+
if (value) {
|
|
52
|
+
this.value = value;
|
|
1268
53
|
}
|
|
1269
54
|
};
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
* @param fn The function to call on change. Provided by ControlValueAccessor
|
|
1273
|
-
* @ignore
|
|
1274
|
-
*/
|
|
1275
|
-
GoARadioComponent.prototype.registerOnChange = function (fn) {
|
|
1276
|
-
this._propagateChange = fn;
|
|
55
|
+
ValueDirective.prototype.registerOnChange = function (fn) {
|
|
56
|
+
this.onChange = fn;
|
|
1277
57
|
};
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
* @param fn The function to call on touch. Provided by ControlValueAccessor
|
|
1281
|
-
* @ignore
|
|
1282
|
-
*/
|
|
1283
|
-
GoARadioComponent.prototype.registerOnTouched = function (fn) {
|
|
1284
|
-
this._onTouchedCallback = fn;
|
|
58
|
+
ValueDirective.prototype.registerOnTouched = function (fn) {
|
|
59
|
+
this.onTouched = fn;
|
|
1285
60
|
};
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
* User interaction event on click of the radiobutton or its label to indicate toggling of the current checked status.
|
|
1289
|
-
* Emits selectionChange to parent components.
|
|
1290
|
-
* @ignore
|
|
1291
|
-
*/
|
|
1292
|
-
GoARadioComponent.prototype.onClick = function () {
|
|
1293
|
-
// flip the checked state of this radio
|
|
1294
|
-
this.checked = !this.checked;
|
|
1295
|
-
// emit radio change event for those interested
|
|
1296
|
-
var radioChange = {
|
|
1297
|
-
source: this,
|
|
1298
|
-
checked: this.checked
|
|
1299
|
-
};
|
|
1300
|
-
this._propagateChange(this.checked);
|
|
1301
|
-
this.selectionChange.emit(radioChange);
|
|
1302
|
-
// notify other radios in group/with same name via radio service so they know to flip their states to not checked
|
|
1303
|
-
this._radioService.selectRadio(radioChange);
|
|
61
|
+
ValueDirective.prototype.listenForValueChange = function (value) {
|
|
62
|
+
this.value = value;
|
|
1304
63
|
};
|
|
1305
|
-
return
|
|
1306
|
-
}());
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
*/
|
|
1340
|
-
var GOA_RADIO_GROUP_CONTROL_VALUE_ACCESSOR = {
|
|
1341
|
-
provide: forms.NG_VALUE_ACCESSOR,
|
|
1342
|
-
useExisting: i0.forwardRef(function () { return GoARadioGroupComponent; }),
|
|
1343
|
-
multi: true
|
|
1344
|
-
};
|
|
1345
|
-
/**
|
|
1346
|
-
* Injection token that can be used to inject instances of `GoARadioGroupComponent`. It serves as
|
|
1347
|
-
* alternative token to the actual `GoARadioGroupComponent` class which could cause unnecessary
|
|
1348
|
-
* retention of the class and its component metadata.
|
|
1349
|
-
* @ignore
|
|
1350
|
-
*/
|
|
1351
|
-
var GOA_RADIO_GROUP = new i0.InjectionToken('GoARadioGroup');
|
|
1352
|
-
/**
|
|
1353
|
-
* Radiobutton group component with Government of Alberta styling. Used to group a set of related radio buttons.
|
|
1354
|
-
*/
|
|
1355
|
-
var GoARadioGroupComponent = /** @class */ (function () {
|
|
1356
|
-
function GoARadioGroupComponent(_changeDetector, _radioService) {
|
|
1357
|
-
this._changeDetector = _changeDetector;
|
|
1358
|
-
this._radioService = _radioService;
|
|
1359
|
-
/**
|
|
1360
|
-
* @ignore
|
|
1361
|
-
*/
|
|
1362
|
-
this._name = "goa-radio-group-" + GoARadioGroupComponent.idNum++;
|
|
1363
|
-
/**
|
|
1364
|
-
* @ignore
|
|
1365
|
-
*/
|
|
1366
|
-
this._value = null;
|
|
1367
|
-
/**
|
|
1368
|
-
* @ignore
|
|
1369
|
-
*/
|
|
1370
|
-
this._labelPosition = 'after';
|
|
1371
|
-
/**
|
|
1372
|
-
* The error message to display when the radio group selection is required and nothing has been selected
|
|
1373
|
-
*/
|
|
1374
|
-
this.requiredErrorMessage = 'Please select one of the provided options.';
|
|
1375
|
-
/**
|
|
1376
|
-
* Event emitted containing the source radiobutton, and whether or not it is checked.
|
|
1377
|
-
*/
|
|
1378
|
-
this.selectionChange = new i0.EventEmitter();
|
|
1379
|
-
/**
|
|
1380
|
-
* @ignore
|
|
1381
|
-
*/
|
|
1382
|
-
this._propagateChange = function (_) { };
|
|
1383
|
-
this.uniqueId = "goa-radiobutton-group-" + GoARadioGroupComponent.idNum++;
|
|
1384
|
-
}
|
|
1385
|
-
Object.defineProperty(GoARadioGroupComponent.prototype, "name", {
|
|
1386
|
-
/**
|
|
1387
|
-
* Indicates the "group" or set of radios this radio belongs to.
|
|
1388
|
-
*/
|
|
1389
|
-
get: function () { return this._name; },
|
|
1390
|
-
set: function (value) {
|
|
1391
|
-
this._name = value;
|
|
1392
|
-
this._updateRadioButtonNames();
|
|
1393
|
-
},
|
|
1394
|
-
enumerable: false,
|
|
1395
|
-
configurable: true
|
|
1396
|
-
});
|
|
1397
|
-
Object.defineProperty(GoARadioGroupComponent.prototype, "value", {
|
|
1398
|
-
/**
|
|
1399
|
-
* Value/unique identifier for the object the radiobutton represents.
|
|
1400
|
-
*/
|
|
1401
|
-
get: function () { return this._value; },
|
|
1402
|
-
set: function (newValue) {
|
|
1403
|
-
if (this._value !== newValue) {
|
|
1404
|
-
// Set this before proceeding to ensure no circular loop occurs with selection.
|
|
1405
|
-
this._value = newValue;
|
|
1406
|
-
this._updateSelectedRadioFromValue();
|
|
1407
|
-
this._setSelectedRadioToChecked();
|
|
1408
|
-
}
|
|
1409
|
-
},
|
|
1410
|
-
enumerable: false,
|
|
1411
|
-
configurable: true
|
|
1412
|
-
});
|
|
1413
|
-
Object.defineProperty(GoARadioGroupComponent.prototype, "selected", {
|
|
1414
|
-
/**
|
|
1415
|
-
* The currently selected radio.
|
|
1416
|
-
*/
|
|
1417
|
-
get: function () { return this._selected; },
|
|
1418
|
-
set: function (selected) {
|
|
1419
|
-
this._selected = selected;
|
|
1420
|
-
this.value = selected ? selected.value : null;
|
|
1421
|
-
this._setSelectedRadioToChecked();
|
|
1422
|
-
},
|
|
1423
|
-
enumerable: false,
|
|
1424
|
-
configurable: true
|
|
1425
|
-
});
|
|
1426
|
-
Object.defineProperty(GoARadioGroupComponent.prototype, "disabled", {
|
|
1427
|
-
/**
|
|
1428
|
-
* Boolean indicating whether or not the radiobutton is disabled.
|
|
1429
|
-
*/
|
|
1430
|
-
get: function () { return this._disabled; },
|
|
1431
|
-
set: function (value) {
|
|
1432
|
-
this._disabled = value;
|
|
1433
|
-
this._updateRadioButtonDisabled();
|
|
1434
|
-
},
|
|
1435
|
-
enumerable: false,
|
|
1436
|
-
configurable: true
|
|
1437
|
-
});
|
|
1438
|
-
Object.defineProperty(GoARadioGroupComponent.prototype, "required", {
|
|
1439
|
-
/**
|
|
1440
|
-
* Boolean indicating whether or not the radiobutton is required.
|
|
1441
|
-
*/
|
|
1442
|
-
get: function () { return this._required; },
|
|
1443
|
-
set: function (value) {
|
|
1444
|
-
this._required = value;
|
|
1445
|
-
this._updateRadioButtonRequired();
|
|
1446
|
-
},
|
|
1447
|
-
enumerable: false,
|
|
1448
|
-
configurable: true
|
|
1449
|
-
});
|
|
1450
|
-
Object.defineProperty(GoARadioGroupComponent.prototype, "labelPosition", {
|
|
1451
|
-
/**
|
|
1452
|
-
* The position to display the label/text for the radiobutton. Valid values are before and after.
|
|
1453
|
-
*/
|
|
64
|
+
return ValueDirective;
|
|
65
|
+
}());
|
|
66
|
+
ValueDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ValueDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
67
|
+
ValueDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: ValueDirective, selector: "[goaValue]", host: { listeners: { "_change": "listenForValueChange($event.detail.value)" } }, providers: [
|
|
68
|
+
{
|
|
69
|
+
provide: forms.NG_VALUE_ACCESSOR,
|
|
70
|
+
useExisting: i0.forwardRef(function () { return ValueDirective; }),
|
|
71
|
+
multi: true,
|
|
72
|
+
},
|
|
73
|
+
], ngImport: i0__namespace });
|
|
74
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ValueDirective, decorators: [{
|
|
75
|
+
type: i0.Directive,
|
|
76
|
+
args: [{
|
|
77
|
+
selector: "[goaValue]",
|
|
78
|
+
providers: [
|
|
79
|
+
{
|
|
80
|
+
provide: forms.NG_VALUE_ACCESSOR,
|
|
81
|
+
useExisting: i0.forwardRef(function () { return ValueDirective; }),
|
|
82
|
+
multi: true,
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
}]
|
|
86
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { listenForValueChange: [{
|
|
87
|
+
type: i0.HostListener,
|
|
88
|
+
args: ["_change", ["$event.detail.value"]]
|
|
89
|
+
}] } });
|
|
90
|
+
var ValueListDirective = /** @class */ (function () {
|
|
91
|
+
function ValueListDirective(elementRef) {
|
|
92
|
+
this.elementRef = elementRef;
|
|
93
|
+
this._value = [];
|
|
94
|
+
this.onChange = function () { };
|
|
95
|
+
this.onTouched = function () { };
|
|
96
|
+
}
|
|
97
|
+
Object.defineProperty(ValueListDirective.prototype, "value", {
|
|
1454
98
|
get: function () {
|
|
1455
|
-
return this.
|
|
1456
|
-
},
|
|
1457
|
-
set: function (position) {
|
|
1458
|
-
this._labelPosition = position === 'before' ? 'before' : 'after';
|
|
1459
|
-
this._updateRadioButtonLabelPosition();
|
|
99
|
+
return this._value;
|
|
1460
100
|
},
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
* Lifecycle hook AfterContentInit. Used to set properties on child radios based on the radio group's properties.
|
|
1466
|
-
* @ignore
|
|
1467
|
-
*/
|
|
1468
|
-
GoARadioGroupComponent.prototype.ngAfterContentInit = function () {
|
|
1469
|
-
this._updateRadioButtonNames();
|
|
1470
|
-
this._updateRadioButtonDisabled();
|
|
1471
|
-
this._updateRadioButtonRequired();
|
|
1472
|
-
this._updateRadioButtonLabelPosition();
|
|
1473
|
-
this._updateSelectedRadioFromValue();
|
|
1474
|
-
};
|
|
1475
|
-
/**
|
|
1476
|
-
* Lifecycle hook OnInit. Used to subscribe to radio change messages from the radioService in order to set the 'selected' property
|
|
1477
|
-
* of the radio group based on which radio was selected
|
|
1478
|
-
* @ignore
|
|
1479
|
-
*/
|
|
1480
|
-
GoARadioGroupComponent.prototype.ngOnInit = function () {
|
|
1481
|
-
var _this = this;
|
|
1482
|
-
this.radioServiceSubscription = this._radioService.radioChangeMessage.subscribe(function (rcm) {
|
|
1483
|
-
if (rcm && rcm.source && rcm.source.name === _this.name && rcm.checked) {
|
|
1484
|
-
_this.selected = _this._radios.find(function (r) { return r.uniqueId === rcm.source.uniqueId; });
|
|
1485
|
-
_this.selectionChange.emit(rcm);
|
|
1486
|
-
}
|
|
1487
|
-
});
|
|
1488
|
-
};
|
|
1489
|
-
/**
|
|
1490
|
-
* Lifecycle hook OnDestroy. Used to unsubscribe from the radio change messages.
|
|
1491
|
-
* @ignore
|
|
1492
|
-
*/
|
|
1493
|
-
GoARadioGroupComponent.prototype.ngOnDestroy = function () {
|
|
1494
|
-
this.radioServiceSubscription.unsubscribe();
|
|
1495
|
-
};
|
|
1496
|
-
/**
|
|
1497
|
-
* Updates the `selected` radio button from the internal _value state.
|
|
1498
|
-
*/
|
|
1499
|
-
GoARadioGroupComponent.prototype._updateSelectedRadioFromValue = function () {
|
|
1500
|
-
var _this = this;
|
|
1501
|
-
// If the value already matches the selected radio, do nothing.
|
|
1502
|
-
var isAlreadySelected = this._selected !== undefined && this._selected !== null && this._selected.value === this._value;
|
|
1503
|
-
// need to wrap in setTimeout because _radios hasnt resolved yet when Input setter fires, need to get to next cycle in page lifecycle
|
|
1504
|
-
setTimeout(function () {
|
|
1505
|
-
if (_this._radios && !isAlreadySelected) {
|
|
1506
|
-
_this._selected = null;
|
|
1507
|
-
_this._radios.forEach(function (radio) {
|
|
1508
|
-
radio.checked = _this.value === radio.value;
|
|
1509
|
-
if (radio.checked) {
|
|
1510
|
-
_this._selected = radio;
|
|
1511
|
-
}
|
|
1512
|
-
});
|
|
101
|
+
set: function (val) {
|
|
102
|
+
if (val && val !== this._value) {
|
|
103
|
+
this._setValue(val);
|
|
104
|
+
this.elementRef.nativeElement.value = JSON.stringify(val);
|
|
1513
105
|
}
|
|
1514
|
-
});
|
|
1515
|
-
};
|
|
1516
|
-
/**
|
|
1517
|
-
* Sets the selected radio to checked if it is not already checked
|
|
1518
|
-
*/
|
|
1519
|
-
GoARadioGroupComponent.prototype._setSelectedRadioToChecked = function () {
|
|
1520
|
-
if (this.selected && !this.selected.checked) {
|
|
1521
|
-
this.selected.checked = true;
|
|
1522
|
-
}
|
|
1523
|
-
};
|
|
1524
|
-
/**
|
|
1525
|
-
* Updates the 'name' property of the child radio buttons to match that of the group so they all function together
|
|
1526
|
-
*/
|
|
1527
|
-
GoARadioGroupComponent.prototype._updateRadioButtonNames = function () {
|
|
1528
|
-
var _this = this;
|
|
1529
|
-
if (this._radios) {
|
|
1530
|
-
this._radios.forEach(function (radio) {
|
|
1531
|
-
radio.name = _this.name;
|
|
1532
|
-
radio.markForCheck();
|
|
1533
|
-
});
|
|
1534
|
-
}
|
|
1535
|
-
};
|
|
1536
|
-
/**
|
|
1537
|
-
* Updates the 'disabled' property of the child radio buttons to match the disabled state of the radio group
|
|
1538
|
-
*/
|
|
1539
|
-
GoARadioGroupComponent.prototype._updateRadioButtonDisabled = function () {
|
|
1540
|
-
var _this = this;
|
|
1541
|
-
if (this._radios) {
|
|
1542
|
-
this._radios.forEach(function (radio) {
|
|
1543
|
-
radio.required = _this._required;
|
|
1544
|
-
radio.markForCheck();
|
|
1545
|
-
});
|
|
1546
|
-
}
|
|
1547
|
-
};
|
|
1548
|
-
/**
|
|
1549
|
-
* Updates the 'required' property of the child radio buttons to match the required state of the radio group
|
|
1550
|
-
*/
|
|
1551
|
-
GoARadioGroupComponent.prototype._updateRadioButtonRequired = function () {
|
|
1552
|
-
var _this = this;
|
|
1553
|
-
if (this._radios) {
|
|
1554
|
-
this._radios.forEach(function (radio) {
|
|
1555
|
-
radio.required = _this._required;
|
|
1556
|
-
radio.markForCheck();
|
|
1557
|
-
});
|
|
1558
|
-
}
|
|
1559
|
-
};
|
|
1560
|
-
/**
|
|
1561
|
-
* Updates the 'labelPosition' property of the child radio buttons to match the labelPosition state of the radio group
|
|
1562
|
-
*/
|
|
1563
|
-
GoARadioGroupComponent.prototype._updateRadioButtonLabelPosition = function () {
|
|
1564
|
-
var _this = this;
|
|
1565
|
-
if (this._radios) {
|
|
1566
|
-
this._radios.forEach(function (radio) {
|
|
1567
|
-
radio.labelPosition = _this._labelPosition;
|
|
1568
|
-
radio.markForCheck();
|
|
1569
|
-
});
|
|
1570
|
-
}
|
|
1571
|
-
};
|
|
1572
|
-
/**
|
|
1573
|
-
* Boolean indicating if the radiobutton is required and not checked
|
|
1574
|
-
* @ignore
|
|
1575
|
-
*/
|
|
1576
|
-
GoARadioGroupComponent.prototype.hasError = function () {
|
|
1577
|
-
var hasSelectedRadio = this._radios.some(function (r) { return r.checked; });
|
|
1578
|
-
return this.required && !hasSelectedRadio;
|
|
1579
|
-
};
|
|
1580
|
-
/**
|
|
1581
|
-
* Implemented as part of ControlValueAccessor.
|
|
1582
|
-
* @param value The model bound property, i.e. the value of checked
|
|
1583
|
-
* @ignore
|
|
1584
|
-
*/
|
|
1585
|
-
GoARadioGroupComponent.prototype.writeValue = function (value) {
|
|
1586
|
-
if ((value !== undefined) && (value !== null)) {
|
|
1587
|
-
this.selected = value;
|
|
1588
|
-
this._changeDetector.detectChanges();
|
|
1589
|
-
}
|
|
1590
|
-
};
|
|
1591
|
-
/**
|
|
1592
|
-
* Implemented as part of ControlValueAccessor.
|
|
1593
|
-
* @param fn The function to call on change. Provided by ControlValueAccessor
|
|
1594
|
-
* @ignore
|
|
1595
|
-
*/
|
|
1596
|
-
GoARadioGroupComponent.prototype.registerOnChange = function (fn) {
|
|
1597
|
-
this._propagateChange = fn;
|
|
1598
|
-
};
|
|
1599
|
-
/**
|
|
1600
|
-
* Implemented as part of ControlValueAccessor.
|
|
1601
|
-
* @param fn The function to call on touch. Provided by ControlValueAccessor
|
|
1602
|
-
* @ignore
|
|
1603
|
-
*/
|
|
1604
|
-
GoARadioGroupComponent.prototype.registerOnTouched = function (fn) {
|
|
1605
|
-
this._onTouchedCallback = fn;
|
|
1606
|
-
};
|
|
1607
|
-
;
|
|
1608
|
-
return GoARadioGroupComponent;
|
|
1609
|
-
}());
|
|
1610
|
-
/**
|
|
1611
|
-
* Used to generate unique Id for this component
|
|
1612
|
-
* @ignore
|
|
1613
|
-
*/
|
|
1614
|
-
GoARadioGroupComponent.idNum = 0;
|
|
1615
|
-
GoARadioGroupComponent.decorators = [
|
|
1616
|
-
{ type: i0.Component, args: [{
|
|
1617
|
-
selector: 'goa-radio-group',
|
|
1618
|
-
template: "<div class=\"goa-radio-group\" [ngClass]=\"{'goa-radio-group-disabled': disabled}\">\n <span *ngIf=\"title\" class=\"radio-group-title\">{{title}}</span>\n <span *ngIf=\"required\" class=\"required-label\" i18n=\"Required label for dropdown\">(Required)</span>\n <div *ngIf=\"helperText\" class=\"helper-text\">{{helperText}}</div>\n <div class=\"goa-radios\">\n <ng-content></ng-content>\n </div>\n <div *ngIf=\"hasError()\" class=\"error-text\">{{requiredErrorMessage}}</div>\n</div>\n",
|
|
1619
|
-
providers: [
|
|
1620
|
-
GOA_RADIO_GROUP_CONTROL_VALUE_ACCESSOR,
|
|
1621
|
-
{ provide: GOA_RADIO_GROUP, useExisting: GoARadioGroupComponent }
|
|
1622
|
-
],
|
|
1623
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1624
|
-
styles: [".goa-radio-group{margin-top:28px}.goa-radio-group.goa-radio-group-disabled.goa-radios{opacity:30%;cursor:default}.goa-radio-group .radio-group-title{font-size:18px;font-weight:bold;color:#333;line-height:28px}.goa-radio-group .helper-text{font-size:14px;font-weight:normal;color:#333;margin-bottom:20px}.goa-radio-group .required-label{margin-left:8px;font-size:14px;color:#666}.goa-radio-group .error-text{color:#fc1921;font-size:14px;margin-bottom:20px}\n"]
|
|
1625
|
-
},] }
|
|
1626
|
-
];
|
|
1627
|
-
GoARadioGroupComponent.ctorParameters = function () { return [
|
|
1628
|
-
{ type: i0.ChangeDetectorRef },
|
|
1629
|
-
{ type: GoARadioService }
|
|
1630
|
-
]; };
|
|
1631
|
-
GoARadioGroupComponent.propDecorators = {
|
|
1632
|
-
_radios: [{ type: i0.ContentChildren, args: [i0.forwardRef(function () { return GoARadioComponent; }), { descendants: true },] }],
|
|
1633
|
-
title: [{ type: i0.Input }],
|
|
1634
|
-
helperText: [{ type: i0.Input }],
|
|
1635
|
-
requiredErrorMessage: [{ type: i0.Input }],
|
|
1636
|
-
name: [{ type: i0.Input }],
|
|
1637
|
-
value: [{ type: i0.Input }],
|
|
1638
|
-
selected: [{ type: i0.Input }],
|
|
1639
|
-
disabled: [{ type: i0.Input }],
|
|
1640
|
-
required: [{ type: i0.Input }],
|
|
1641
|
-
labelPosition: [{ type: i0.Input }],
|
|
1642
|
-
selectionChange: [{ type: i0.Output }]
|
|
1643
|
-
};
|
|
1644
|
-
|
|
1645
|
-
/**
|
|
1646
|
-
* Callout component to describe important changes or facts.
|
|
1647
|
-
* selector: goa-callout
|
|
1648
|
-
*/
|
|
1649
|
-
var GoACalloutComponent = /** @class */ (function () {
|
|
1650
|
-
function GoACalloutComponent() {
|
|
1651
|
-
/**
|
|
1652
|
-
* The type of the callout, changes stylings and icons.
|
|
1653
|
-
*/
|
|
1654
|
-
this.type = 'information';
|
|
1655
|
-
}
|
|
1656
|
-
/**
|
|
1657
|
-
* @ignore
|
|
1658
|
-
*/
|
|
1659
|
-
GoACalloutComponent.prototype.ngOnInit = function () {
|
|
1660
|
-
if (this.title === undefined || this.title === null) {
|
|
1661
|
-
throw new TypeError("Input 'title' is required.");
|
|
1662
|
-
}
|
|
1663
|
-
};
|
|
1664
|
-
return GoACalloutComponent;
|
|
1665
|
-
}());
|
|
1666
|
-
GoACalloutComponent.decorators = [
|
|
1667
|
-
{ type: i0.Component, args: [{
|
|
1668
|
-
selector: 'goa-callout',
|
|
1669
|
-
template: "<div\n class=\"goa-callout\"\n [ngClass]=\"{\n 'goa--event': type === 'event',\n 'goa--important': type === 'important',\n 'goa--emergency': type === 'emergency',\n 'goa--success': type === 'success'\n }\"\n>\n <div>\n <h3>{{ title }}</h3>\n <div class=\"messages\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n",
|
|
1670
|
-
styles: [".goa-callout{box-sizing:border-box;display:inline-block;position:relative;width:100%;margin:24px 0 0;padding:23px 24px;border-width:0;border-left-width:48px;border-style:solid;border-color:#0070c4;background:#f1f1f1}.goa-callout *:first-child{margin-top:0}.goa-callout *:last-child{margin-bottom:0}.goa-callout.goa--important{border-color:#feba35}.goa-callout.goa--emergency{border-color:#ec040b}.goa-callout.goa--error{border-color:#ec040b}.goa-callout.goa--success{border-color:#00853f}.goa-callout:before{position:absolute;top:28px;left:-36px;width:24px;height:24px;content:\"\";background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,20a9,9,0,1,1,9-9A9,9,0,0,1,12,21Z'/%3E%3Cpath fill='%23fff' d='M15.16,15.5h-2V9a1,1,0,0,0-1-1H9.82a1,1,0,0,0,0,2h1.36V15.5h-2a1,1,0,1,0,0,2h6a1,1,0,0,0,0-2Z'/%3E%3Cpath fill='%23fff' d='M12,7.33A1.29,1.29,0,1,0,10.73,6,1.29,1.29,0,0,0,12,7.33Z'/%3E%3C/svg%3E\");background-color:transparent;background-repeat:no-repeat;background-position:center center}.goa-callout.goa--emergency:before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M11,9.41v4.52a1,1,0,0,0,2,0V9.41a1,1,0,0,0-2,0Z'/%3E%3Cpath fill='%23fff' d='M12,16.15a1.29,1.29,0,1,0,1.29,1.29A1.29,1.29,0,0,0,12,16.15Z'/%3E%3Cpath fill='%23fff' d='M22.87,20.14l-10-17.32a1,1,0,0,0-1.74,0l-10,17.32a1,1,0,0,0,0,1,1,1,0,0,0,.87.5H22a1,1,0,0,0,.87-.5A1,1,0,0,0,22.87,20.14Zm-19.14-.5L12,5.32l8.27,14.32Z'/%3E%3C/svg%3E\");background-color:transparent;background-repeat:no-repeat;background-position:center center}.goa-callout.goa--error:before{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><defs><style>.a{fill:none;}.b{fill:white;}<\\/style></defs><rect class=\"a\" width=\"24\" height=\"24\"/><path class=\"b\" d=\"M48.1,23a11,11,0,1,0-11-11A10.968,10.968,0,0,0,48.1,23Zm0-20a9,9,0,1,1-9,9A8.963,8.963,0,0,1,48.1,3Z\" transform=\"translate(-36)\"/><path class=\"b\" d=\"M43.6,16.4a.967.967,0,0,0,1.4,0l3-3,3,3a.967.967,0,0,0,1.4,0,.967.967,0,0,0,0-1.4l-3-3,3-3A.99.99,0,0,0,51,7.6l-3,3-3-3A.99.99,0,0,0,43.6,9l3,3-3,3A1.2,1.2,0,0,0,43.6,16.4Z\" transform=\"translate(-36)\"/></svg>');background-repeat:no-repeat;background-size:contain;background-position:center center}.goa-callout.goa--important:before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,20a9,9,0,1,1,9-9A9,9,0,0,1,12,21Z'/%3E%3Cpath fill='%23000' d='M12,14.46a1,1,0,0,0,1-1V6.57a1,1,0,0,0-2,0v6.89A1,1,0,0,0,12,14.46Z'/%3E%3Cpath fill='%23000' d='M12,15.68A1.29,1.29,0,1,0,13.29,17,1.29,1.29,0,0,0,12,15.68Z'/%3E%3C/svg%3E\");background-color:transparent;background-repeat:no-repeat;background-position:center center}.goa-callout.goa--event:before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M3.27,22.85H20.73a2.14,2.14,0,0,0,2.14-2.14V5A2.14,2.14,0,0,0,20.73,2.9h-2.1v2h2.1a.14.14,0,0,1,.14.14V8.31H3.13V5a.14.14,0,0,1,.14-.14H5.48V6.28a1,1,0,1,0,2,0V1.85a1,1,0,1,0-2,0v1H3.27A2.14,2.14,0,0,0,1.13,5V20.71A2.14,2.14,0,0,0,3.27,22.85Zm17.6-12.54v10.4a.14.14,0,0,1-.14.14H3.27a.14.14,0,0,1-.14-.14V10.31Z'/%3E%3Cpath fill='%23fff' d='M16.45,7.28a1,1,0,0,0,1-1V1.85a1,1,0,0,0-2,0v1h-1.8v2h1.8V6.28A1,1,0,0,0,16.45,7.28Z'/%3E%3Cpath fill='%23fff' d='M11.47,7.28a1,1,0,0,0,1-1V1.85a1,1,0,1,0-2,0v1H8.66v2h1.81V6.28A1,1,0,0,0,11.47,7.28Z'/%3E%3Crect fill='%23fff' x='6.67' y='11.52' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='11.22' y='11.52' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='15.77' y='11.52' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='3.64' y='15.83' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='8.19' y='15.83' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='12.74' y='15.83' width='2.33' height='2.33'/%3E%3C/svg%3E\");background-color:transparent;background-repeat:no-repeat;background-position:center center}.goa-callout.goa--event:before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M3.27,22.85H20.73a2.14,2.14,0,0,0,2.14-2.14V5A2.14,2.14,0,0,0,20.73,2.9h-2.1v2h2.1a.14.14,0,0,1,.14.14V8.31H3.13V5a.14.14,0,0,1,.14-.14H5.48V6.28a1,1,0,1,0,2,0V1.85a1,1,0,1,0-2,0v1H3.27A2.14,2.14,0,0,0,1.13,5V20.71A2.14,2.14,0,0,0,3.27,22.85Zm17.6-12.54v10.4a.14.14,0,0,1-.14.14H3.27a.14.14,0,0,1-.14-.14V10.31Z'/%3E%3Cpath fill='%23fff' d='M16.45,7.28a1,1,0,0,0,1-1V1.85a1,1,0,0,0-2,0v1h-1.8v2h1.8V6.28A1,1,0,0,0,16.45,7.28Z'/%3E%3Cpath fill='%23fff' d='M11.47,7.28a1,1,0,0,0,1-1V1.85a1,1,0,1,0-2,0v1H8.66v2h1.81V6.28A1,1,0,0,0,11.47,7.28Z'/%3E%3Crect fill='%23fff' x='6.67' y='11.52' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='11.22' y='11.52' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='15.77' y='11.52' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='3.64' y='15.83' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='8.19' y='15.83' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='12.74' y='15.83' width='2.33' height='2.33'/%3E%3C/svg%3E\");background-color:transparent;background-repeat:no-repeat;background-position:center center}.goa-callout.goa--success:before{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><defs><style>.a{fill:none;}.b{fill:white;}<\\/style></defs><g transform=\"translate(-23 -68)\"><rect class=\"a\" width=\"24\" height=\"24\" transform=\"translate(23 68)\"/><path class=\"b\" d=\"M12,23A11,11,0,1,0,1,12,10.968,10.968,0,0,0,12,23ZM12,3a9,9,0,1,1-9,9A8.963,8.963,0,0,1,12,3Z\" transform=\"translate(23 68)\"/><path class=\"b\" d=\"M10.9,16.4a.908.908,0,0,0,.7.3h.1a.842.842,0,0,0,.7-.4L17.6,9a.913.913,0,0,0-.2-1.4,1,1,0,0,0-1.4.3l-4.5,6.3L8,10.5a.99.99,0,0,0-1.4,1.4Z\" transform=\"translate(23 68)\"/></g></svg>');background-repeat:no-repeat;background-size:contain;background-position:center center}.goa-callout .messages{margin-bottom:0;margin-top:1em}\n"]
|
|
1671
|
-
},] }
|
|
1672
|
-
];
|
|
1673
|
-
GoACalloutComponent.ctorParameters = function () { return []; };
|
|
1674
|
-
GoACalloutComponent.propDecorators = {
|
|
1675
|
-
type: [{ type: i0.Input }],
|
|
1676
|
-
title: [{ type: i0.Input }]
|
|
1677
|
-
};
|
|
1678
|
-
|
|
1679
|
-
/**
|
|
1680
|
-
* Government of Alberta styled notification, comes in 4 variants: emergency, event, information, important.
|
|
1681
|
-
* Can set the message and optionally a link url.
|
|
1682
|
-
* selector: goa-notification
|
|
1683
|
-
*/
|
|
1684
|
-
var GoANotificationComponent = /** @class */ (function () {
|
|
1685
|
-
function GoANotificationComponent(_changeDetectorRef) {
|
|
1686
|
-
this._changeDetectorRef = _changeDetectorRef;
|
|
1687
|
-
/**
|
|
1688
|
-
* Whether or not the notification has been dismissed.
|
|
1689
|
-
* @ignore
|
|
1690
|
-
*/
|
|
1691
|
-
this._isDismissed = false;
|
|
1692
|
-
/**
|
|
1693
|
-
* The type of the notification, changes stylings and icons.
|
|
1694
|
-
*/
|
|
1695
|
-
this.type = 'information';
|
|
1696
|
-
/**
|
|
1697
|
-
* Can the notification be dismissed?
|
|
1698
|
-
*/
|
|
1699
|
-
this.isDismissable = true;
|
|
1700
|
-
/**
|
|
1701
|
-
* Event emitted when the notification has been dismissed by the user.
|
|
1702
|
-
*/
|
|
1703
|
-
this.dismiss = new i0.EventEmitter();
|
|
1704
|
-
}
|
|
1705
|
-
/**
|
|
1706
|
-
* @ignore
|
|
1707
|
-
*/
|
|
1708
|
-
GoANotificationComponent.prototype.ngOnInit = function () {
|
|
1709
|
-
};
|
|
1710
|
-
/**
|
|
1711
|
-
* @ignore
|
|
1712
|
-
*/
|
|
1713
|
-
GoANotificationComponent.prototype.dismissClick = function () {
|
|
1714
|
-
this._isDismissed = true;
|
|
1715
|
-
this._changeDetectorRef.detectChanges();
|
|
1716
|
-
this.dismiss.emit();
|
|
1717
|
-
};
|
|
1718
|
-
return GoANotificationComponent;
|
|
1719
|
-
}());
|
|
1720
|
-
GoANotificationComponent.decorators = [
|
|
1721
|
-
{ type: i0.Component, args: [{
|
|
1722
|
-
selector: 'goa-notification',
|
|
1723
|
-
template: "\n<div class=\"goa-notification\"\n [ngClass]=\"{\n 'dismissed': _isDismissed === true,\n 'goa--event': type === 'event',\n 'goa--important': type === 'important',\n 'goa--emergency': type === 'emergency'\n }\">\n <div class=\"content\">\n <a *ngIf=\"notificationUrl\" class=\"message\" href={{notificationUrl}}>{{message}}</a>\n <span *ngIf=\"!notificationUrl\" class=\"message\">{{message}}</span>\n <a *ngIf=\"isDismissable === true\" class=\"close\" i18n-title title=\"Dismiss\" (click)=\"dismissClick()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n <path d=\"M 15.99 14.54C 15.99 14.54 14.54 15.99 14.54 15.99 14.54 15.99 8 9.45 8 9.45 8 9.45 1.46 15.99 1.46 15.99 1.46 15.99 0.01 14.54 0.01 14.54 0.01 14.54 6.55 8 6.55 8 6.55 8 0.01 1.46 0.01 1.46 0.01 1.46 1.46 0.01 1.46 0.01 1.46 0.01 8 6.55 8 6.55 8 6.55 14.54 0.01 14.54 0.01 14.54 0.01 15.99 1.46 15.99 1.46 15.99 1.46 9.45 8 9.45 8 9.45 8 15.99 14.54 15.99 14.54Z\"/>\n </svg>\n </a>\n </div>\n</div>\n\n",
|
|
1724
|
-
styles: [".goa-notification{box-sizing:border-box;display:inline-block;position:relative;width:100%;padding-left:72px;padding-right:72px;color:#fff;background:#0070c4}.goa-notification.dismissed{display:none}@media screen and (min-width: 768px) and (max-width: 1199px){.goa-notification{padding-left:24px;padding-right:24px}}@media screen and (max-width: 767px){.goa-notification{padding-left:24px;padding-right:24px}}.goa-notification .content{box-sizing:border-box;display:flex;width:100%;margin:0;position:relative;padding:0 36px}.goa-notification .content .message{flex:1 0 0;box-sizing:border-box;min-height:56px;padding:28px 0}.goa-notification .content .close{flex:0 1 auto;color:#fff}.goa-notification a{color:#fff}.goa-notification a:hover,.goa-notification a:focus{color:#fff;text-decoration:none}.goa-notification.goa--event{background-color:#00853f}.goa-notification.goa--important{background-color:#feba35}.goa-notification.goa--important .message{color:#333}.goa-notification.goa--important a{color:#333}.goa-notification.goa--important a:hover,.goa-notification.goa--important a:focus{color:#333}.goa-notification.goa--emergency{background-color:#ec040b}.goa-notification .close{align-self:center;position:absolute;right:12px;cursor:pointer}.goa-notification .close svg{fill:#fff;color:#fff}.goa-notification .content:before{position:absolute;top:50%;left:6px;width:24px;height:24px;margin-top:-12px;content:\"\";background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,20a9,9,0,1,1,9-9A9,9,0,0,1,12,21Z'/%3E%3Cpath fill='%23fff' d='M15.16,15.5h-2V9a1,1,0,0,0-1-1H9.82a1,1,0,0,0,0,2h1.36V15.5h-2a1,1,0,1,0,0,2h6a1,1,0,0,0,0-2Z'/%3E%3Cpath fill='%23fff' d='M12,7.33A1.29,1.29,0,1,0,10.73,6,1.29,1.29,0,0,0,12,7.33Z'/%3E%3C/svg%3E\");background-color:transparent;background-repeat:no-repeat;background-position:center center}.goa-notification.goa--emergency .content:before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M11,9.41v4.52a1,1,0,0,0,2,0V9.41a1,1,0,0,0-2,0Z'/%3E%3Cpath fill='%23fff' d='M12,16.15a1.29,1.29,0,1,0,1.29,1.29A1.29,1.29,0,0,0,12,16.15Z'/%3E%3Cpath fill='%23fff' d='M22.87,20.14l-10-17.32a1,1,0,0,0-1.74,0l-10,17.32a1,1,0,0,0,0,1,1,1,0,0,0,.87.5H22a1,1,0,0,0,.87-.5A1,1,0,0,0,22.87,20.14Zm-19.14-.5L12,5.32l8.27,14.32Z'/%3E%3C/svg%3E\");background-color:transparent;background-repeat:no-repeat;background-position:center center}.goa-notification.goa--important .content:before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,20a9,9,0,1,1,9-9A9,9,0,0,1,12,21Z'/%3E%3Cpath fill='%23000' d='M12,14.46a1,1,0,0,0,1-1V6.57a1,1,0,0,0-2,0v6.89A1,1,0,0,0,12,14.46Z'/%3E%3Cpath fill='%23000' d='M12,15.68A1.29,1.29,0,1,0,13.29,17,1.29,1.29,0,0,0,12,15.68Z'/%3E%3C/svg%3E\");background-color:transparent;background-repeat:no-repeat;background-position:center center}.goa-notification.goa--event .content:before{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M3.27,22.85H20.73a2.14,2.14,0,0,0,2.14-2.14V5A2.14,2.14,0,0,0,20.73,2.9h-2.1v2h2.1a.14.14,0,0,1,.14.14V8.31H3.13V5a.14.14,0,0,1,.14-.14H5.48V6.28a1,1,0,1,0,2,0V1.85a1,1,0,1,0-2,0v1H3.27A2.14,2.14,0,0,0,1.13,5V20.71A2.14,2.14,0,0,0,3.27,22.85Zm17.6-12.54v10.4a.14.14,0,0,1-.14.14H3.27a.14.14,0,0,1-.14-.14V10.31Z'/%3E%3Cpath fill='%23fff' d='M16.45,7.28a1,1,0,0,0,1-1V1.85a1,1,0,0,0-2,0v1h-1.8v2h1.8V6.28A1,1,0,0,0,16.45,7.28Z'/%3E%3Cpath fill='%23fff' d='M11.47,7.28a1,1,0,0,0,1-1V1.85a1,1,0,1,0-2,0v1H8.66v2h1.81V6.28A1,1,0,0,0,11.47,7.28Z'/%3E%3Crect fill='%23fff' x='6.67' y='11.52' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='11.22' y='11.52' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='15.77' y='11.52' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='3.64' y='15.83' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='8.19' y='15.83' width='2.33' height='2.33'/%3E%3Crect fill='%23fff' x='12.74' y='15.83' width='2.33' height='2.33'/%3E%3C/svg%3E\");background-color:transparent;background-repeat:no-repeat;background-position:center center}\n"]
|
|
1725
|
-
},] }
|
|
1726
|
-
];
|
|
1727
|
-
GoANotificationComponent.ctorParameters = function () { return [
|
|
1728
|
-
{ type: i0.ChangeDetectorRef }
|
|
1729
|
-
]; };
|
|
1730
|
-
GoANotificationComponent.propDecorators = {
|
|
1731
|
-
type: [{ type: i0.Input }],
|
|
1732
|
-
message: [{ type: i0.Input }],
|
|
1733
|
-
notificationUrl: [{ type: i0.Input }],
|
|
1734
|
-
isDismissable: [{ type: i0.Input }],
|
|
1735
|
-
dismiss: [{ type: i0.Output }]
|
|
1736
|
-
};
|
|
1737
|
-
|
|
1738
|
-
/**
|
|
1739
|
-
* Government of Alberta styled notification banner. Contains one or more notifications.
|
|
1740
|
-
* selector: goa-notification-banner
|
|
1741
|
-
*/
|
|
1742
|
-
var GoANotificationBannerComponent = /** @class */ (function () {
|
|
1743
|
-
function GoANotificationBannerComponent() {
|
|
1744
|
-
/**
|
|
1745
|
-
* The accessibility title for the notification banner. Is not displayed.
|
|
1746
|
-
*/
|
|
1747
|
-
this.title = 'Notifications';
|
|
1748
|
-
}
|
|
1749
|
-
/**
|
|
1750
|
-
* @ignore
|
|
1751
|
-
*/
|
|
1752
|
-
GoANotificationBannerComponent.prototype.ngOnInit = function () {
|
|
1753
|
-
};
|
|
1754
|
-
return GoANotificationBannerComponent;
|
|
1755
|
-
}());
|
|
1756
|
-
GoANotificationBannerComponent.decorators = [
|
|
1757
|
-
{ type: i0.Component, args: [{
|
|
1758
|
-
selector: 'goa-notification-banner',
|
|
1759
|
-
template: "<div class=\"goa-notifications\">\r\n <h2 class=\"title\">{{title}}</h2>\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n",
|
|
1760
|
-
styles: [".goa-notifications .title{position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);left:-10px;width:1px;height:1px;white-space:nowrap}.goa-notifications ul{box-sizing:border-box;display:inline-block;width:100%;margin:0;padding:0;list-style-type:none}.goa-notifications ul li{box-sizing:border-box;display:block;width:100%;margin:0;padding:0}\n"]
|
|
1761
|
-
},] }
|
|
1762
|
-
];
|
|
1763
|
-
GoANotificationBannerComponent.ctorParameters = function () { return []; };
|
|
1764
|
-
GoANotificationBannerComponent.propDecorators = {
|
|
1765
|
-
title: [{ type: i0.Input }],
|
|
1766
|
-
_notifications: [{ type: i0.ContentChildren, args: [GoANotificationComponent, { descendants: false },] }]
|
|
1767
|
-
};
|
|
1768
|
-
|
|
1769
|
-
var GoASkeletonImageContentComponent = /** @class */ (function () {
|
|
1770
|
-
function GoASkeletonImageContentComponent() {
|
|
1771
|
-
this.rows = 1;
|
|
1772
|
-
this.arr = Array;
|
|
1773
|
-
}
|
|
1774
|
-
return GoASkeletonImageContentComponent;
|
|
1775
|
-
}());
|
|
1776
|
-
GoASkeletonImageContentComponent.decorators = [
|
|
1777
|
-
{ type: i0.Component, args: [{
|
|
1778
|
-
selector: 'goa-skeleton-image-content',
|
|
1779
|
-
template: "<div class=\"skeleton-image-content\">\n <goa-skeleton-element type=\"thumbnail\"></goa-skeleton-element>\n <div class=\"skeleton-image-content__text\">\n <goa-skeleton-element\n type=\"title\"\n *ngFor=\"let i of arr(rows).fill(1)\"\n ></goa-skeleton-element>\n </div>\n</div>\n",
|
|
1780
|
-
styles: ["@-webkit-keyframes pulse{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}:root{--fs-xs: .75rem;--fs-sm: .875rem;--fs-base: 1.125rem;--fs-lg: 1.25rem;--fs-xl: 1.5rem;--fs-2xl: 2.25rem;--fs-3xl: 3rem;--fw-thin: 100;--fw-light: 300;--fw-regular: 400;--fw-medium: 500;--fw-bold: 700;--fw-black: 900}@keyframes pulse{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}[data-skeleton]{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[data-skeleton] *{border-color:#ddd!important;color:transparent!important}[data-skeleton] p,[data-skeleton] a{background-color:#ddd!important;-webkit-animation:pulse 2s infinite ease-in-out;animation:pulse 2s infinite ease-in-out;display:inline;line-height:0!important;font-size:50%!important}[data-skeleton] p:after,[data-skeleton] a:after{content:\"\"!important;display:block!important;margin-bottom:1rem!important;background-size:contain}[data-skeleton] h1,[data-skeleton] h2,[data-skeleton] h3,[data-skeleton] h4,[data-skeleton] h5,[data-skeleton] h6{background-color:#ddd!important;-webkit-animation:pulse 2s infinite ease-in-out;animation:pulse 2s infinite ease-in-out;margin-bottom:1rem}[data-skeleton] h1{height:calc(.6 * 3rem)!important;height:calc(.6 * var(--fs-3xl))!important}[data-skeleton] h2{height:calc(.6 * 2.25rem)!important;height:calc(.6 * var(--fs-2xl))!important}[data-skeleton] h3{height:calc(.6 * 1.5rem)!important;height:calc(.6 * var(--fs-xl))!important}[data-skeleton] h4{height:calc(.6 * 1.25rem)!important;height:calc(.6 * var(--fs-lg))!important}[data-skeleton] img{background-color:#ddd!important;-webkit-animation:pulse 2s infinite ease-in-out;animation:pulse 2s infinite ease-in-out}.skeleton{background-color:#ddd!important;-webkit-animation:pulse 2s infinite ease-in-out;animation:pulse 2s infinite ease-in-out;background:#dcdcdc;overflow:hidden;margin:10px 0}.skeleton.text{width:100%;height:12px;border-radius:4px}.skeleton.paragraph{width:100%;height:70px;border-radius:4px}.skeleton.title{width:50%;height:20px;margin-bottom:15px;border-radius:4px}.skeleton.avatar{width:100px;height:100px;border-radius:50%}.skeleton.thumbnail{width:100px;height:100px;border-radius:4px}.skeleton-image-content{display:flex;flex-direction:row;grid-gap:30px;gap:30px}.skeleton-image-content__text{flex:1 1 auto}.skeleton-content{display:grid;grid-template-columns:1fr;grid-gap:30px;gap:30px;align-items:left}.goa-card{box-sizing:border-box;background:#fff;border:1px solid #dcdcdc;transition:opacity .3s ease-in-out}.goa-card .card-content{padding:28px;border-top:8px solid #0081a2}.goa-card .card-content .goa-title,.goa-card .card-content .goa-text,.goa-card .card-content .goa-content{margin-bottom:28px}.goa-card .card-content .goa-text{color:#333;font-size:1.125rem;font-size:var(--fs-base);line-height:28px}.goa-card .card-content .goa-footer{font-size:1.125rem;font-size:var(--fs-base)}.goa-card .card-content .goa-title{font-size:1.5rem;font-size:var(--fs-xl);font-weight:400;line-height:32px}.goa-card .goa-poster{position:relative;display:block;padding:56.25% 0 0;overflow:hidden;background:#e5e5e5}.goa-card .goa-poster:empty{display:none}.goa-card .goa-poster img,.goa-card .goa-poster iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:none}.goa-card .goa-poster-image img{display:block;width:100%;-o-object-fit:cover;object-fit:cover}.goa-card.card-auto{width:auto}.goa-card.card-auto .card{flex-basis:auto;width:auto}.goa-card a:hover{color:#004f84;text-decoration:none}.goa-card a:focus{outline:3px solid #feba35;outline-offset:0}.goa-card[data-skeleton] .goa-poster-image{background-color:#ddd!important;-webkit-animation:pulse 2s infinite ease-in-out;animation:pulse 2s infinite ease-in-out;padding-bottom:56.25%}.goa-card[data-skeleton] .goa-poster-image img{display:none}.goa-card[data-skeleton] .goa-title{margin-bottom:1rem}.goa-card[data-skeleton] .goa-footer{background-color:#ddd!important;-webkit-animation:pulse 2s infinite ease-in-out;animation:pulse 2s infinite ease-in-out;max-height:1rem}\n"]
|
|
1781
|
-
},] }
|
|
1782
|
-
];
|
|
1783
|
-
GoASkeletonImageContentComponent.ctorParameters = function () { return []; };
|
|
1784
|
-
GoASkeletonImageContentComponent.propDecorators = {
|
|
1785
|
-
rows: [{ type: i0.Input }]
|
|
1786
|
-
};
|
|
1787
|
-
|
|
1788
|
-
var GoASkeletonElementComponent = /** @class */ (function () {
|
|
1789
|
-
function GoASkeletonElementComponent() {
|
|
1790
|
-
this.type = 'text';
|
|
1791
|
-
}
|
|
1792
|
-
Object.defineProperty(GoASkeletonElementComponent.prototype, "elementClass", {
|
|
1793
|
-
get: function () {
|
|
1794
|
-
return "skeleton " + this.type;
|
|
1795
106
|
},
|
|
1796
107
|
enumerable: false,
|
|
1797
108
|
configurable: true
|
|
1798
109
|
});
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
{ type: i0.Component, args: [{
|
|
1803
|
-
selector: 'goa-skeleton-element',
|
|
1804
|
-
template: "<div [ngClass]=\"elementClass\"></div>",
|
|
1805
|
-
styles: ["@-webkit-keyframes pulse{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}:root{--fs-xs: .75rem;--fs-sm: .875rem;--fs-base: 1.125rem;--fs-lg: 1.25rem;--fs-xl: 1.5rem;--fs-2xl: 2.25rem;--fs-3xl: 3rem;--fw-thin: 100;--fw-light: 300;--fw-regular: 400;--fw-medium: 500;--fw-bold: 700;--fw-black: 900}@keyframes pulse{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}[data-skeleton]{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[data-skeleton] *{border-color:#ddd!important;color:transparent!important}[data-skeleton] p,[data-skeleton] a{background-color:#ddd!important;-webkit-animation:pulse 2s infinite ease-in-out;animation:pulse 2s infinite ease-in-out;display:inline;line-height:0!important;font-size:50%!important}[data-skeleton] p:after,[data-skeleton] a:after{content:\"\"!important;display:block!important;margin-bottom:1rem!important;background-size:contain}[data-skeleton] h1,[data-skeleton] h2,[data-skeleton] h3,[data-skeleton] h4,[data-skeleton] h5,[data-skeleton] h6{background-color:#ddd!important;-webkit-animation:pulse 2s infinite ease-in-out;animation:pulse 2s infinite ease-in-out;margin-bottom:1rem}[data-skeleton] h1{height:calc(.6 * 3rem)!important;height:calc(.6 * var(--fs-3xl))!important}[data-skeleton] h2{height:calc(.6 * 2.25rem)!important;height:calc(.6 * var(--fs-2xl))!important}[data-skeleton] h3{height:calc(.6 * 1.5rem)!important;height:calc(.6 * var(--fs-xl))!important}[data-skeleton] h4{height:calc(.6 * 1.25rem)!important;height:calc(.6 * var(--fs-lg))!important}[data-skeleton] img{background-color:#ddd!important;-webkit-animation:pulse 2s infinite ease-in-out;animation:pulse 2s infinite ease-in-out}.skeleton{background-color:#ddd!important;-webkit-animation:pulse 2s infinite ease-in-out;animation:pulse 2s infinite ease-in-out;background:#dcdcdc;overflow:hidden;margin:10px 0}.skeleton.text{width:100%;height:12px;border-radius:4px}.skeleton.paragraph{width:100%;height:70px;border-radius:4px}.skeleton.title{width:50%;height:20px;margin-bottom:15px;border-radius:4px}.skeleton.avatar{width:100px;height:100px;border-radius:50%}.skeleton.thumbnail{width:100px;height:100px;border-radius:4px}.skeleton-image-content{display:flex;flex-direction:row;grid-gap:30px;gap:30px}.skeleton-image-content__text{flex:1 1 auto}.skeleton-content{display:grid;grid-template-columns:1fr;grid-gap:30px;gap:30px;align-items:left}.goa-card{box-sizing:border-box;background:#fff;border:1px solid #dcdcdc;transition:opacity .3s ease-in-out}.goa-card .card-content{padding:28px;border-top:8px solid #0081a2}.goa-card .card-content .goa-title,.goa-card .card-content .goa-text,.goa-card .card-content .goa-content{margin-bottom:28px}.goa-card .card-content .goa-text{color:#333;font-size:1.125rem;font-size:var(--fs-base);line-height:28px}.goa-card .card-content .goa-footer{font-size:1.125rem;font-size:var(--fs-base)}.goa-card .card-content .goa-title{font-size:1.5rem;font-size:var(--fs-xl);font-weight:400;line-height:32px}.goa-card .goa-poster{position:relative;display:block;padding:56.25% 0 0;overflow:hidden;background:#e5e5e5}.goa-card .goa-poster:empty{display:none}.goa-card .goa-poster img,.goa-card .goa-poster iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:none}.goa-card .goa-poster-image img{display:block;width:100%;-o-object-fit:cover;object-fit:cover}.goa-card.card-auto{width:auto}.goa-card.card-auto .card{flex-basis:auto;width:auto}.goa-card a:hover{color:#004f84;text-decoration:none}.goa-card a:focus{outline:3px solid #feba35;outline-offset:0}.goa-card[data-skeleton] .goa-poster-image{background-color:#ddd!important;-webkit-animation:pulse 2s infinite ease-in-out;animation:pulse 2s infinite ease-in-out;padding-bottom:56.25%}.goa-card[data-skeleton] .goa-poster-image img{display:none}.goa-card[data-skeleton] .goa-title{margin-bottom:1rem}.goa-card[data-skeleton] .goa-footer{background-color:#ddd!important;-webkit-animation:pulse 2s infinite ease-in-out;animation:pulse 2s infinite ease-in-out;max-height:1rem}\n"]
|
|
1806
|
-
},] }
|
|
1807
|
-
];
|
|
1808
|
-
GoASkeletonElementComponent.ctorParameters = function () { return []; };
|
|
1809
|
-
GoASkeletonElementComponent.propDecorators = {
|
|
1810
|
-
type: [{ type: i0.Input }]
|
|
1811
|
-
};
|
|
1812
|
-
|
|
1813
|
-
/**
|
|
1814
|
-
* Header component used for Government of Alberta cards.
|
|
1815
|
-
* Put header content inside of component and it will project to the header section of the card.
|
|
1816
|
-
* selector: goa-card-header
|
|
1817
|
-
* @example <goa-card><goa-card-header>My content</goa-card-header></goa-card>
|
|
1818
|
-
*/
|
|
1819
|
-
var GoACardHeaderComponent = /** @class */ (function () {
|
|
1820
|
-
function GoACardHeaderComponent() {
|
|
1821
|
-
}
|
|
1822
|
-
/**
|
|
1823
|
-
* @ignore
|
|
1824
|
-
*/
|
|
1825
|
-
GoACardHeaderComponent.prototype.ngOnInit = function () {
|
|
1826
|
-
};
|
|
1827
|
-
return GoACardHeaderComponent;
|
|
1828
|
-
}());
|
|
1829
|
-
GoACardHeaderComponent.decorators = [
|
|
1830
|
-
{ type: i0.Component, args: [{
|
|
1831
|
-
selector: 'goa-card-header',
|
|
1832
|
-
template: "<ng-container>\n <ng-content></ng-content>\n</ng-container>",
|
|
1833
|
-
styles: [""]
|
|
1834
|
-
},] }
|
|
1835
|
-
];
|
|
1836
|
-
GoACardHeaderComponent.ctorParameters = function () { return []; };
|
|
1837
|
-
|
|
1838
|
-
/**
|
|
1839
|
-
* Footer component used for Government of Alberta cards.
|
|
1840
|
-
* Put footer content inside of component and it will project to the confootertent section of the card.
|
|
1841
|
-
* selector: goa-card-footer
|
|
1842
|
-
* @example <goa-card><goa-card-footer>My content</goa-card-footer></goa-card>
|
|
1843
|
-
*/
|
|
1844
|
-
var GoACardFooterComponent = /** @class */ (function () {
|
|
1845
|
-
function GoACardFooterComponent() {
|
|
1846
|
-
}
|
|
1847
|
-
/**
|
|
1848
|
-
* @ignore
|
|
1849
|
-
*/
|
|
1850
|
-
GoACardFooterComponent.prototype.ngOnInit = function () {
|
|
1851
|
-
};
|
|
1852
|
-
return GoACardFooterComponent;
|
|
1853
|
-
}());
|
|
1854
|
-
GoACardFooterComponent.decorators = [
|
|
1855
|
-
{ type: i0.Component, args: [{
|
|
1856
|
-
selector: 'goa-card-footer',
|
|
1857
|
-
template: "<ng-container>\n <ng-content></ng-content>\n</ng-container>",
|
|
1858
|
-
styles: [""]
|
|
1859
|
-
},] }
|
|
1860
|
-
];
|
|
1861
|
-
GoACardFooterComponent.ctorParameters = function () { return []; };
|
|
1862
|
-
|
|
1863
|
-
/**
|
|
1864
|
-
* cardImage image component used for Government of Alberta cards.
|
|
1865
|
-
* It will project to the content section of the card.
|
|
1866
|
-
* selector: goa-card-thumb-image
|
|
1867
|
-
* @example <goa-card><goa-card-thumb-image url="" alt=""></goa-card-thumb-image></goa-card>
|
|
1868
|
-
*/
|
|
1869
|
-
var GoACardThumbImageComponent = /** @class */ (function () {
|
|
1870
|
-
function GoACardThumbImageComponent() {
|
|
1871
|
-
}
|
|
1872
|
-
/**
|
|
1873
|
-
* @ignore
|
|
1874
|
-
*/
|
|
1875
|
-
GoACardThumbImageComponent.prototype.ngOnInit = function () { };
|
|
1876
|
-
return GoACardThumbImageComponent;
|
|
1877
|
-
}());
|
|
1878
|
-
GoACardThumbImageComponent.decorators = [
|
|
1879
|
-
{ type: i0.Component, args: [{
|
|
1880
|
-
selector: 'goa-card-thumb-image',
|
|
1881
|
-
template: "<ng-container>\n <img src=\"{{url}}\" [attr.alt]=\"alt\">\n</ng-container>",
|
|
1882
|
-
styles: [":host img,:host iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:none}\n"]
|
|
1883
|
-
},] }
|
|
1884
|
-
];
|
|
1885
|
-
GoACardThumbImageComponent.ctorParameters = function () { return []; };
|
|
1886
|
-
GoACardThumbImageComponent.propDecorators = {
|
|
1887
|
-
url: [{ type: i0.Input }],
|
|
1888
|
-
alt: [{ type: i0.Input }]
|
|
1889
|
-
};
|
|
1890
|
-
|
|
1891
|
-
/**
|
|
1892
|
-
* Content component used for Government of Alberta cards.
|
|
1893
|
-
* Put content inside of component and it will project to the content section of the card.
|
|
1894
|
-
* selector: goa-card-content
|
|
1895
|
-
* @example <goa-card><goa-card-content>My content</goa-card-content></goa-card>
|
|
1896
|
-
*/
|
|
1897
|
-
var GoACardContentComponent = /** @class */ (function () {
|
|
1898
|
-
function GoACardContentComponent() {
|
|
1899
|
-
}
|
|
1900
|
-
/**
|
|
1901
|
-
* @ignore
|
|
1902
|
-
*/
|
|
1903
|
-
GoACardContentComponent.prototype.ngOnInit = function () {
|
|
1904
|
-
};
|
|
1905
|
-
return GoACardContentComponent;
|
|
1906
|
-
}());
|
|
1907
|
-
GoACardContentComponent.decorators = [
|
|
1908
|
-
{ type: i0.Component, args: [{
|
|
1909
|
-
selector: 'goa-card-content',
|
|
1910
|
-
template: "<ng-container>\n <ng-content></ng-content>\n</ng-container>",
|
|
1911
|
-
styles: [""]
|
|
1912
|
-
},] }
|
|
1913
|
-
];
|
|
1914
|
-
GoACardContentComponent.ctorParameters = function () { return []; };
|
|
1915
|
-
|
|
1916
|
-
/**
|
|
1917
|
-
* Card component with Government of Alberta styling.
|
|
1918
|
-
* Place desired sub-components (goa-card-thumb-image, goa-card-header, goa-card-content, goa-card-footer) inside of content.
|
|
1919
|
-
* selector: goa-card
|
|
1920
|
-
*/
|
|
1921
|
-
var GoACardComponent = /** @class */ (function () {
|
|
1922
|
-
function GoACardComponent() {
|
|
1923
|
-
/**
|
|
1924
|
-
* What percentage of container width to take.
|
|
1925
|
-
*/
|
|
1926
|
-
this.cardSize = 'full';
|
|
1927
|
-
}
|
|
1928
|
-
/**
|
|
1929
|
-
* @ignore
|
|
1930
|
-
*/
|
|
1931
|
-
GoACardComponent.prototype.ngOnInit = function () {
|
|
1932
|
-
};
|
|
1933
|
-
return GoACardComponent;
|
|
1934
|
-
}());
|
|
1935
|
-
GoACardComponent.decorators = [
|
|
1936
|
-
{ type: i0.Component, args: [{
|
|
1937
|
-
selector: 'goa-card',
|
|
1938
|
-
template: "<div\n class=\"goa-card\"\n [ngClass]=\"{\n 'card-auto': cardSize === 'auto'\n }\" [attr.data-skeleton]=\"isSkeleton ? '' : null\"\n>\n <div class=\"goa-poster\">\n <ng-content select=\"goa-card-thumb-image\"></ng-content>\n </div>\n <div class=\"card-content\">\n <a class=\"goa-title\" href=\"{{ titleUrl }}\">\n <ng-content select=\"goa-card-header\"></ng-content>\n </a>\n <div class=\"goa-text\">\n <ng-content select=\"goa-card-content\"></ng-content>\n </div>\n <div class=\"goa-footer\">\n <ng-content select=\"goa-card-footer\"></ng-content>\n </div>\n </div>\n</div>\n",
|
|
1939
|
-
styles: [":root{--fs-xs: .75rem;--fs-sm: .875rem;--fs-base: 1.125rem;--fs-lg: 1.25rem;--fs-xl: 1.5rem;--fs-2xl: 2.25rem;--fs-3xl: 3rem;--fw-thin: 100;--fw-light: 300;--fw-regular: 400;--fw-medium: 500;--fw-bold: 700;--fw-black: 900}@-webkit-keyframes pulse{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}@keyframes pulse{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}[data-skeleton]{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[data-skeleton] *{border-color:#ddd!important;color:transparent!important}[data-skeleton] p,[data-skeleton] a{background-color:#ddd!important;-webkit-animation:pulse 2s infinite ease-in-out;animation:pulse 2s infinite ease-in-out;display:inline;line-height:0!important;font-size:50%!important}[data-skeleton] p:after,[data-skeleton] a:after{content:\"\"!important;display:block!important;margin-bottom:1rem!important;background-size:contain}[data-skeleton] h1,[data-skeleton] h2,[data-skeleton] h3,[data-skeleton] h4,[data-skeleton] h5,[data-skeleton] h6{background-color:#ddd!important;-webkit-animation:pulse 2s infinite ease-in-out;animation:pulse 2s infinite ease-in-out;margin-bottom:1rem}[data-skeleton] h1{height:calc(.6 * 3rem)!important;height:calc(.6 * var(--fs-3xl))!important}[data-skeleton] h2{height:calc(.6 * 2.25rem)!important;height:calc(.6 * var(--fs-2xl))!important}[data-skeleton] h3{height:calc(.6 * 1.5rem)!important;height:calc(.6 * var(--fs-xl))!important}[data-skeleton] h4{height:calc(.6 * 1.25rem)!important;height:calc(.6 * var(--fs-lg))!important}[data-skeleton] img{background-color:#ddd!important;-webkit-animation:pulse 2s infinite ease-in-out;animation:pulse 2s infinite ease-in-out}.skeleton{background-color:#ddd!important;-webkit-animation:pulse 2s infinite ease-in-out;animation:pulse 2s infinite ease-in-out;background:#dcdcdc;overflow:hidden;margin:10px 0}.skeleton.text{width:100%;height:12px;border-radius:4px}.skeleton.paragraph{width:100%;height:70px;border-radius:4px}.skeleton.title{width:50%;height:20px;margin-bottom:15px;border-radius:4px}.skeleton.avatar{width:100px;height:100px;border-radius:50%}.skeleton.thumbnail{width:100px;height:100px;border-radius:4px}.skeleton-image-content{display:flex;flex-direction:row;grid-gap:30px;gap:30px}.skeleton-image-content__text{flex:1 1 auto}.skeleton-content{display:grid;grid-template-columns:1fr;grid-gap:30px;gap:30px;align-items:left}.goa-card{box-sizing:border-box;background:#fff;border:1px solid #dcdcdc;transition:opacity .3s ease-in-out}.goa-card .card-content{padding:28px;border-top:8px solid #0081a2}.goa-card .card-content .goa-title,.goa-card .card-content .goa-text,.goa-card .card-content .goa-content{margin-bottom:28px}.goa-card .card-content .goa-text{color:#333;font-size:1.125rem;font-size:var(--fs-base);line-height:28px}.goa-card .card-content .goa-footer{font-size:1.125rem;font-size:var(--fs-base)}.goa-card .card-content .goa-title{font-size:1.5rem;font-size:var(--fs-xl);font-weight:400;line-height:32px}.goa-card .goa-poster{position:relative;display:block;padding:56.25% 0 0;overflow:hidden;background:#e5e5e5}.goa-card .goa-poster:empty{display:none}.goa-card .goa-poster img,.goa-card .goa-poster iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:none}.goa-card .goa-poster-image img{display:block;width:100%;-o-object-fit:cover;object-fit:cover}.goa-card.card-auto{width:auto}.goa-card.card-auto .card{flex-basis:auto;width:auto}.goa-card a:hover{color:#004f84;text-decoration:none}.goa-card a:focus{outline:3px solid #feba35;outline-offset:0}.goa-card[data-skeleton] .goa-poster-image{background-color:#ddd!important;-webkit-animation:pulse 2s infinite ease-in-out;animation:pulse 2s infinite ease-in-out;padding-bottom:56.25%}.goa-card[data-skeleton] .goa-poster-image img{display:none}.goa-card[data-skeleton] .goa-title{margin-bottom:1rem}.goa-card[data-skeleton] .goa-footer{background-color:#ddd!important;-webkit-animation:pulse 2s infinite ease-in-out;animation:pulse 2s infinite ease-in-out;max-height:1rem}\n"]
|
|
1940
|
-
},] }
|
|
1941
|
-
];
|
|
1942
|
-
GoACardComponent.ctorParameters = function () { return []; };
|
|
1943
|
-
GoACardComponent.propDecorators = {
|
|
1944
|
-
cardSize: [{ type: i0.Input }],
|
|
1945
|
-
titleUrl: [{ type: i0.Input }],
|
|
1946
|
-
isSkeleton: [{ type: i0.Input }]
|
|
1947
|
-
};
|
|
1948
|
-
|
|
1949
|
-
/**
|
|
1950
|
-
* A wrapper/group for a set of card display
|
|
1951
|
-
*/
|
|
1952
|
-
var GoACardGroupComponent = /** @class */ (function () {
|
|
1953
|
-
function GoACardGroupComponent() {
|
|
1954
|
-
}
|
|
1955
|
-
/* eslint-disable @angular-eslint/no-empty-lifecycle-method */
|
|
1956
|
-
GoACardGroupComponent.prototype.ngOnInit = function () { };
|
|
1957
|
-
return GoACardGroupComponent;
|
|
1958
|
-
}());
|
|
1959
|
-
GoACardGroupComponent.decorators = [
|
|
1960
|
-
{ type: i0.Component, args: [{
|
|
1961
|
-
selector: 'goa-card-group',
|
|
1962
|
-
template: "<ng-container>\n <div class=\"goa-card-group\">\n <div class=\"card-group-title\">{{ title }}</div>\n <div\n [ngClass]=\"{\n 'card-group-basic': layout === 'basic',\n 'card-group-column': layout === 'column'\n }\"\n >\n <ng-content></ng-content>\n <div *ngFor=\"let card of cardItems\">\n <goa-card titleUrl=\"{{ card.titleUrl }}\">\n <goa-card-thumb-image\n url=\"{{ card.cardImageUrl }}\"\n alt=\"hero pic\"\n ></goa-card-thumb-image>\n <goa-card-header>{{ card.title }}</goa-card-header>\n <goa-card-content>{{ card.description }}</goa-card-content>\n </goa-card>\n </div>\n </div>\n </div>\n</ng-container>\n",
|
|
1963
|
-
styles: [".goa-card-group{margin-top:14px;vertical-align:top}.goa-card-group .card-group-title{font-size:24px;font-weight:bold;color:#333}.goa-card-group .card-group-basic{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch}.goa-card-group .card-group-basic>div{margin:14px 10px}.goa-card-group .card-group-basic-vue>div{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch}.goa-card-group .card-group-basic-vue>div>div{margin:14px 10px}.goa-card-group .card-group-column{display:inline-block;flex-direction:column;-moz-column-count:3;column-count:3;flex-wrap:wrap;align-items:stretch}.goa-card-group .card-group-column>div{margin:14px}.goa-card-group .card-group-column-vue>div{display:inline-block;flex-direction:column;-moz-column-count:3;column-count:3;flex-wrap:wrap;align-items:stretch}.goa-card-group .card-group-column>div>div{margin:14px}\n"]
|
|
1964
|
-
},] }
|
|
1965
|
-
];
|
|
1966
|
-
GoACardGroupComponent.ctorParameters = function () { return []; };
|
|
1967
|
-
GoACardGroupComponent.propDecorators = {
|
|
1968
|
-
layout: [{ type: i0.Input }],
|
|
1969
|
-
title: [{ type: i0.Input }],
|
|
1970
|
-
cardItems: [{ type: i0.Input }]
|
|
1971
|
-
};
|
|
1972
|
-
|
|
1973
|
-
var GoAHeroBannerContentComponent = /** @class */ (function () {
|
|
1974
|
-
function GoAHeroBannerContentComponent() {
|
|
1975
|
-
}
|
|
1976
|
-
GoAHeroBannerContentComponent.prototype.ngOnInit = function () {
|
|
1977
|
-
};
|
|
1978
|
-
return GoAHeroBannerContentComponent;
|
|
1979
|
-
}());
|
|
1980
|
-
GoAHeroBannerContentComponent.decorators = [
|
|
1981
|
-
{ type: i0.Component, args: [{
|
|
1982
|
-
selector: 'goa-hero-banner-content',
|
|
1983
|
-
template: "<ng-container>\n <p class=\"goa-hero-banner-content\" role=\"note\">\n <ng-content></ng-content>\n </p>\n</ng-container>\n",
|
|
1984
|
-
styles: [".goa-hero-banner-content{font-size:24px;line-height:32px;margin:0;color:#fff}@media screen and (min-width: 768px) and (max-width: 1199px){.goa-hero-banner-content{width:80%}}@media screen and (min-width: 1200px){.goa-hero-banner-content{width:40%}}.goa-hero-banner-content:last-of-type{margin-bottom:28px}\n"]
|
|
1985
|
-
},] }
|
|
1986
|
-
];
|
|
1987
|
-
GoAHeroBannerContentComponent.ctorParameters = function () { return []; };
|
|
1988
|
-
|
|
1989
|
-
var GoAHeroBannerLinkComponent = /** @class */ (function () {
|
|
1990
|
-
function GoAHeroBannerLinkComponent() {
|
|
1991
|
-
}
|
|
1992
|
-
GoAHeroBannerLinkComponent.prototype.ngOnInit = function () {
|
|
1993
|
-
};
|
|
1994
|
-
return GoAHeroBannerLinkComponent;
|
|
1995
|
-
}());
|
|
1996
|
-
GoAHeroBannerLinkComponent.decorators = [
|
|
1997
|
-
{ type: i0.Component, args: [{
|
|
1998
|
-
selector: 'goa-hero-banner-link',
|
|
1999
|
-
template: "<ng-container>\n <a class=\"goa-link-button right-arrow\" [href]=\"url\" role=\"link\">\n <ng-content></ng-content>\n </a>\n</ng-container>\n",
|
|
2000
|
-
styles: ["@charset \"UTF-8\";.goa-link-button.goa-link-button{display:inline-block;text-decoration:none}.goa-link-button.goa-link-button{box-sizing:border-box;min-width:70px;padding:12px;border:2px solid #0070c4;border-radius:4px;background:#0070c4;cursor:pointer;color:#fff;font-size:18px;font-weight:700;line-height:1em}.goa-link-button.goa-link-button.btn-small{font-size:16px;padding:8px;margin:12px 12px 0 0}.goa-link-button.goa-link-button:last-of-type{margin-right:0}.goa-link-button.goa-link-button:disabled,.goa-link-button.goa-link-button:disabled.goa--secondary,.goa-link-button.goa-link-button:disabled.goa--tertiary{pointer-events:none;color:#666;background-color:#f1f1f1;border-color:#f1f1f1}.goa-link-button.goa-link-button:hover{border-color:#004f84;background:#004f84}.goa-link-button.goa-link-button:focus,.goa-link-button.goa-link-button:active{border-color:#004f84;box-shadow:0 0 0 3px #feba35;background:#004f84;outline:none}.goa-link-button.goa-link-button.goa--secondary{border:2px solid #0070c4;background:#fff;color:#0070c4}.goa-link-button.goa-link-button.goa--secondary:hover{border-color:#004f84;background:#fff;color:#004f84}.goa-link-button.goa-link-button.goa--secondary:focus,.goa-link-button.goa-link-button.goa--secondary:active{color:#004f84;background-color:#fff;border:2px solid #004f84;box-shadow:0 0 0 3px #feba35;outline:none}.goa-link-button.goa-link-button.goa--tertiary{border-color:#dcdcdc;background:#fff;color:#0070c4}.goa-link-button.goa-link-button.goa--tertiary:hover{background:#fff;color:#004f84}.goa-link-button.goa-link-button.goa--tertiary:focus,.goa-link-button.goa-link-button.goa--tertiary:active{border:2px solid #004f84;color:#004f84;background-color:#fff;box-shadow:0 0 0 3px #feba35;outline:none}.goa-link-button.goa-link-button.goa--borderless{background:none;color:var(--color-blue-500);border:none;transition:transform .1s ease-in-out;transform:scale(1)}.goa-link-button.goa-link-button.goa--borderless:hover{background:var(--color-blue-100);color:var(--color-blue-500)}.goa-link-button.goa-link-button.goa--borderless:focus,.goa-link-button.goa-link-button.goa--borderless:active{background-color:var(--color-blue-100);outline:none;box-shadow:none}.goa-link-button.goa-link-button.goa--borderless:active{transform:scale(.95)}.goa-link-button.goa-link-button.goa--red{color:var(--color-red-500);background:none;border:none;transition:transform .1s ease-in-out;transform:scale(1)}.goa-link-button.goa-link-button.goa--red:hover{background:var(--color-red-100);color:var(--color-red-500)}.goa-link-button.goa-link-button.goa--red:focus,.goa-link-button.goa-link-button.goa--red:active{background:var(--color-red-100);color:var(--color-red-500);outline:none;box-shadow:none}.goa-link-button.goa-link-button.goa--red:active{transform:scale(.95)}.goa-link-button.goa-link-button.right-arrow:after{color:#fff;margin-left:8px;content:\"\\2192\"}.goa-link-button.goa-link-button.up-arrow:after{color:#fff;margin-left:8px;content:\"\\2191\"}.goa-link-button.goa-link-button:visited,.goa-link-button.goa-link-button:link{color:#fff}\n"]
|
|
2001
|
-
},] }
|
|
2002
|
-
];
|
|
2003
|
-
GoAHeroBannerLinkComponent.ctorParameters = function () { return []; };
|
|
2004
|
-
GoAHeroBannerLinkComponent.propDecorators = {
|
|
2005
|
-
url: [{ type: i0.Input }]
|
|
2006
|
-
};
|
|
2007
|
-
|
|
2008
|
-
var GoAHeroBannerComponent = /** @class */ (function () {
|
|
2009
|
-
function GoAHeroBannerComponent() {
|
|
2010
|
-
}
|
|
2011
|
-
GoAHeroBannerComponent.prototype.ngOnInit = function () {
|
|
2012
|
-
};
|
|
2013
|
-
return GoAHeroBannerComponent;
|
|
2014
|
-
}());
|
|
2015
|
-
GoAHeroBannerComponent.decorators = [
|
|
2016
|
-
{ type: i0.Component, args: [{
|
|
2017
|
-
selector: 'goa-hero-banner',
|
|
2018
|
-
template: "<div class=\"goa-hero\"\n style=\"background-image: linear-gradient(rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.40) 40%, rgba(0, 0, 0, 0.6) 100%), url({{backgroundUrl}});\"\n>\n <h1 role=\"heading\">{{ title }}</h1>\n <ng-content select=\"goa-hero-banner-content\"></ng-content>\n <ng-content select=\"goa-hero-banner-link\"></ng-content>\n</div>\n",
|
|
2019
|
-
styles: [".goa-hero{box-sizing:border-box;display:flex;justify-content:flex-end;align-items:stretch;flex-direction:column;height:600px;border-bottom:8px solid #0081a2;color:#fff;background-position:center center;width:100%;padding:56px 28px}.goa-hero h1{margin:0 0 28px;padding:0;font-size:48px;line-height:56px;font-weight:700;color:#fff}\n"]
|
|
2020
|
-
},] }
|
|
2021
|
-
];
|
|
2022
|
-
GoAHeroBannerComponent.ctorParameters = function () { return []; };
|
|
2023
|
-
GoAHeroBannerComponent.propDecorators = {
|
|
2024
|
-
title: [{ type: i0.Input }],
|
|
2025
|
-
backgroundUrl: [{ type: i0.Input }]
|
|
2026
|
-
};
|
|
2027
|
-
|
|
2028
|
-
/**
|
|
2029
|
-
* A page load indicator component with Government of Alberta styling.
|
|
2030
|
-
* selector: goa-page-load-indicator
|
|
2031
|
-
*/
|
|
2032
|
-
var GoAPageLoadIndicatorComponent = /** @class */ (function () {
|
|
2033
|
-
function GoAPageLoadIndicatorComponent() {
|
|
2034
|
-
/**
|
|
2035
|
-
* Sets the page loader visibility state.
|
|
2036
|
-
*/
|
|
2037
|
-
this.visible = false;
|
|
2038
|
-
/**
|
|
2039
|
-
* The type of page loader, deterministic and indeterministic.
|
|
2040
|
-
*/
|
|
2041
|
-
this.type = 'infinite';
|
|
2042
|
-
/**
|
|
2043
|
-
* The message to display while loading.
|
|
2044
|
-
*/
|
|
2045
|
-
this.message = '';
|
|
2046
|
-
/**
|
|
2047
|
-
* Sets the percentage value of the page loader while set to progress type, 0 - 100 percent.
|
|
2048
|
-
*/
|
|
2049
|
-
this.value = 0;
|
|
2050
|
-
/**
|
|
2051
|
-
* Sets the page to locked and does not accept user input. When not set the component
|
|
2052
|
-
* can be used as a child element without blocking user input.
|
|
2053
|
-
*/
|
|
2054
|
-
this.pagelock = true;
|
|
2055
|
-
/**
|
|
2056
|
-
* Sets the progress indicator display type size.
|
|
2057
|
-
*/
|
|
2058
|
-
this.displayType = 'large';
|
|
2059
|
-
/**
|
|
2060
|
-
* Set defaults
|
|
2061
|
-
*/
|
|
2062
|
-
this.strokeDashoffsetDefault = 280;
|
|
2063
|
-
this.progressMaxValue = 283;
|
|
2064
|
-
this.strokeDashoffset = 0;
|
|
2065
|
-
}
|
|
2066
|
-
GoAPageLoadIndicatorComponent.prototype.ngOnInit = function () {
|
|
2067
|
-
if (this.type !== 'progress') {
|
|
2068
|
-
this.strokeDashoffset = this.strokeDashoffsetDefault;
|
|
110
|
+
ValueListDirective.prototype.writeValue = function (value) {
|
|
111
|
+
if (value) {
|
|
112
|
+
this.value = value;
|
|
2069
113
|
}
|
|
2070
114
|
};
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
this.blockScrollingToggle(changes.visible.currentValue);
|
|
2074
|
-
}
|
|
2075
|
-
if (changes.value) {
|
|
2076
|
-
if (this.type === 'progress') {
|
|
2077
|
-
this.setProgress(changes.value.currentValue);
|
|
2078
|
-
}
|
|
2079
|
-
}
|
|
2080
|
-
};
|
|
2081
|
-
/**
|
|
2082
|
-
* Toggles the page scrolling based on page load indicator's visibility.
|
|
2083
|
-
* @param isBlock The flag to enable/disable page scroll.
|
|
2084
|
-
* @ignore
|
|
2085
|
-
*/
|
|
2086
|
-
GoAPageLoadIndicatorComponent.prototype.blockScrollingToggle = function (isBlock) {
|
|
2087
|
-
if (!isBlock || !this.pagelock) {
|
|
2088
|
-
document.body.style.removeProperty('height');
|
|
2089
|
-
document.body.style.removeProperty('overflow');
|
|
2090
|
-
}
|
|
2091
|
-
else {
|
|
2092
|
-
document.body.style.height = '100%';
|
|
2093
|
-
document.body.style.overflow = 'hidden';
|
|
2094
|
-
}
|
|
2095
|
-
};
|
|
2096
|
-
/**
|
|
2097
|
-
* Blocks the keyboard input when page load indicator is visible.
|
|
2098
|
-
* @ignore
|
|
2099
|
-
*/
|
|
2100
|
-
GoAPageLoadIndicatorComponent.prototype.disableKeyboardInputHandler = function (event) {
|
|
2101
|
-
if (this.visible) {
|
|
2102
|
-
event.returnValue = false;
|
|
2103
|
-
event.preventDefault();
|
|
2104
|
-
}
|
|
115
|
+
ValueListDirective.prototype.registerOnChange = function (fn) {
|
|
116
|
+
this.onChange = fn;
|
|
2105
117
|
};
|
|
2106
|
-
|
|
2107
|
-
this.
|
|
118
|
+
ValueListDirective.prototype.registerOnTouched = function (fn) {
|
|
119
|
+
this.onTouched = fn;
|
|
2108
120
|
};
|
|
2109
|
-
|
|
2110
|
-
if (
|
|
121
|
+
ValueListDirective.prototype.listenForValueChange = function (value) {
|
|
122
|
+
if (!value) {
|
|
123
|
+
this._setValue(undefined);
|
|
2111
124
|
return;
|
|
2112
125
|
}
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
this.strokeDashoffset = this.progressMaxValue;
|
|
2116
|
-
return;
|
|
2117
|
-
}
|
|
2118
|
-
if (progress >= 100) {
|
|
2119
|
-
return;
|
|
2120
|
-
}
|
|
2121
|
-
var value = this.progressMaxValue - Math.round(this.progressMaxValue * progress / 100);
|
|
2122
|
-
this.strokeDashoffset = value;
|
|
2123
|
-
};
|
|
2124
|
-
return GoAPageLoadIndicatorComponent;
|
|
2125
|
-
}());
|
|
2126
|
-
GoAPageLoadIndicatorComponent.decorators = [
|
|
2127
|
-
{ type: i0.Component, args: [{
|
|
2128
|
-
selector: 'goa-page-load-indicator',
|
|
2129
|
-
template: "<div *ngIf=\"visible\" class=\"progress-container--{{ displayType }}\">\n <svg\n [ngClass]=\"{\n 'svg': displayType === 'large',\n 'svg--small': displayType === 'small'\n }\"\n fill=\"none\"\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <circle class=\"base-circle\" cx=\"50\" cy=\"50\" r=\"45\"/>\n <circle\n [ngClass]=\"{\n 'progress-circle--infinite': type === 'infinite',\n 'progress-circle': type === 'progress'\n }\"\n cx=\"50\"\n cy=\"50\"\n r=\"45\"\n [style.stroke-dashoffset]=\"strokeDashoffset\"/>\n </svg>\n\n <span class=\"progress-message--{{ displayType }}\">\n {{ message }}\n </span>\n</div>\n",
|
|
2130
|
-
styles: [".svg{max-width:100px}.svg--small{max-width:65px}@-webkit-keyframes circle-animation{0%{stroke-dashoffset:75;transform:rotate(0)}to{stroke-dashoffset:75;transform:rotate(360deg)}}@keyframes circle-animation{0%{stroke-dashoffset:75;transform:rotate(0)}to{stroke-dashoffset:75;transform:rotate(360deg)}}.base-circle{display:block;fill:transparent;stroke:#c8eef9;stroke-width:7px}.progress-circle,.progress-circle--infinite{display:block;fill:transparent;stroke:#0070c4;stroke-linecap:round;stroke-dasharray:283;stroke-dashoffset:280;stroke-width:7px;transform-origin:50% 50%}.progress-circle--infinite{-webkit-animation:circle-animation 1.2s linear infinite;animation:circle-animation 1.2s linear infinite}.progress-message,.progress-message--small,.progress-message--large{font-style:normal;font-weight:normal}.progress-message--large{margin-top:32px;font-size:24px;color:#000}.progress-message--small{margin-top:18px;font-size:18px;color:#000}.progress-container,.progress-container--large,.progress-container--small{display:flex;flex-direction:column;align-items:center;justify-content:center;background:white}.progress-container--large{width:100%;height:100%}\n"]
|
|
2131
|
-
},] }
|
|
2132
|
-
];
|
|
2133
|
-
GoAPageLoadIndicatorComponent.ctorParameters = function () { return []; };
|
|
2134
|
-
GoAPageLoadIndicatorComponent.propDecorators = {
|
|
2135
|
-
visible: [{ type: i0.Input }],
|
|
2136
|
-
type: [{ type: i0.Input }],
|
|
2137
|
-
message: [{ type: i0.Input }],
|
|
2138
|
-
value: [{ type: i0.Input }],
|
|
2139
|
-
pagelock: [{ type: i0.Input }],
|
|
2140
|
-
displayType: [{ type: i0.Input }],
|
|
2141
|
-
disableKeyboardInputHandler: [{ type: i0.HostListener, args: ['document:keydown', ['$event'],] }]
|
|
2142
|
-
};
|
|
2143
|
-
|
|
2144
|
-
/**
|
|
2145
|
-
* A page load indicator component with Government of Alberta styling.
|
|
2146
|
-
* selector: goa-element-load-indicator
|
|
2147
|
-
*/
|
|
2148
|
-
var GoAElementLoadIndicatorComponent = /** @class */ (function () {
|
|
2149
|
-
function GoAElementLoadIndicatorComponent() {
|
|
2150
|
-
/**
|
|
2151
|
-
* Sets the page loader visibility state.
|
|
2152
|
-
*/
|
|
2153
|
-
this.visible = true;
|
|
2154
|
-
/**
|
|
2155
|
-
* The diameter of the loader in pixels.
|
|
2156
|
-
*/
|
|
2157
|
-
this.size = 'default';
|
|
2158
|
-
/**
|
|
2159
|
-
* The base color of the spinner.
|
|
2160
|
-
*/
|
|
2161
|
-
this.baseColour = '#c8eef9';
|
|
2162
|
-
/**
|
|
2163
|
-
* The spinner color of the spinner.
|
|
2164
|
-
*/
|
|
2165
|
-
this.spinnerColour = '#0070c4';
|
|
2166
|
-
this.radius = this.size === 'small' ? 16 : 18;
|
|
2167
|
-
this.innerRadius = this.radius - 4;
|
|
2168
|
-
this.diameter = this.radius * 2;
|
|
2169
|
-
this.dashArray = this.innerRadius * Math.PI * 2;
|
|
2170
|
-
this.dashOffset = this.innerRadius * Math.PI * 0.5;
|
|
2171
|
-
this.viewBox = "0 0 " + this.diameter + " " + this.diameter;
|
|
2172
|
-
}
|
|
2173
|
-
/**
|
|
2174
|
-
* @ignore
|
|
2175
|
-
*/
|
|
2176
|
-
GoAElementLoadIndicatorComponent.prototype.ngOnChanges = function (changes) {
|
|
2177
|
-
if (changes.size) {
|
|
2178
|
-
this.radius = changes.size.currentValue === 'small' ? 16 : 18;
|
|
2179
|
-
this.innerRadius = this.radius - 4;
|
|
2180
|
-
this.diameter = this.radius * 2;
|
|
2181
|
-
this.viewBox = "0 0 " + this.diameter + " " + this.diameter;
|
|
2182
|
-
this.dashArray = this.innerRadius * Math.PI * 2;
|
|
2183
|
-
this.dashOffset = this.innerRadius * Math.PI * 0.5;
|
|
126
|
+
try {
|
|
127
|
+
this.value = JSON.parse(value);
|
|
2184
128
|
}
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
];
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
129
|
+
catch (e) {
|
|
130
|
+
// we still need to trigger the events to prevent any previous valid value to remain set.
|
|
131
|
+
var v = value.match(/^[\w\s,]*$/) ? value.split(",") : undefined;
|
|
132
|
+
this._setValue(v);
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
ValueListDirective.prototype._setValue = function (value) {
|
|
136
|
+
this._value = value;
|
|
137
|
+
this.onChange(value);
|
|
138
|
+
this.onTouched();
|
|
139
|
+
};
|
|
140
|
+
return ValueListDirective;
|
|
141
|
+
}());
|
|
142
|
+
ValueListDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ValueListDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
143
|
+
ValueListDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: ValueListDirective, selector: "[goaValueList]", host: { listeners: { "_change": "listenForValueChange($event.detail.value)" } }, providers: [
|
|
144
|
+
{
|
|
145
|
+
provide: forms.NG_VALUE_ACCESSOR,
|
|
146
|
+
useExisting: i0.forwardRef(function () { return ValueListDirective; }),
|
|
147
|
+
multi: true,
|
|
148
|
+
},
|
|
149
|
+
], ngImport: i0__namespace });
|
|
150
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ValueListDirective, decorators: [{
|
|
151
|
+
type: i0.Directive,
|
|
152
|
+
args: [{
|
|
153
|
+
selector: "[goaValueList]",
|
|
154
|
+
providers: [
|
|
155
|
+
{
|
|
156
|
+
provide: forms.NG_VALUE_ACCESSOR,
|
|
157
|
+
useExisting: i0.forwardRef(function () { return ValueListDirective; }),
|
|
158
|
+
multi: true,
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
}]
|
|
162
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { listenForValueChange: [{
|
|
163
|
+
type: i0.HostListener,
|
|
164
|
+
args: ["_change", ["$event.detail.value"]]
|
|
165
|
+
}] } });
|
|
2206
166
|
|
|
2207
167
|
var AngularComponentsModule = /** @class */ (function () {
|
|
2208
168
|
function AngularComponentsModule() {
|
|
2209
169
|
}
|
|
2210
170
|
return AngularComponentsModule;
|
|
2211
171
|
}());
|
|
2212
|
-
AngularComponentsModule
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
GoAOptionComponent,
|
|
2224
|
-
GoADropdownComponent,
|
|
2225
|
-
GoAOptionGroupComponent,
|
|
2226
|
-
GoACheckboxComponent,
|
|
2227
|
-
GoACalloutComponent,
|
|
2228
|
-
GoACardGroupComponent,
|
|
2229
|
-
GoANotificationComponent,
|
|
2230
|
-
GoANotificationBannerComponent,
|
|
2231
|
-
GoACardComponent,
|
|
2232
|
-
GoACardHeaderComponent,
|
|
2233
|
-
GoACardFooterComponent,
|
|
2234
|
-
GoACardContentComponent,
|
|
2235
|
-
GoACardThumbImageComponent,
|
|
2236
|
-
GoARadioComponent,
|
|
2237
|
-
GoARadioGroupComponent,
|
|
2238
|
-
GoAHeroBannerComponent,
|
|
2239
|
-
GoAHeroBannerContentComponent,
|
|
2240
|
-
GoAHeroBannerLinkComponent,
|
|
2241
|
-
GoAPageLoadIndicatorComponent,
|
|
2242
|
-
GoASkeletonImageContentComponent,
|
|
2243
|
-
GoASkeletonElementComponent,
|
|
2244
|
-
GoAElementLoadIndicatorComponent,
|
|
2245
|
-
],
|
|
2246
|
-
declarations: [
|
|
2247
|
-
GoAButtonComponent,
|
|
2248
|
-
GoAMicrositeLogoComponent,
|
|
2249
|
-
GoAHeaderComponent,
|
|
2250
|
-
GoAButtonLinkComponent,
|
|
2251
|
-
GoAOptionComponent,
|
|
2252
|
-
GoADropdownComponent,
|
|
2253
|
-
GoAOptionGroupComponent,
|
|
2254
|
-
GoACheckboxComponent,
|
|
2255
|
-
GoACalloutComponent,
|
|
2256
|
-
GoACardGroupComponent,
|
|
2257
|
-
GoANotificationComponent,
|
|
2258
|
-
GoANotificationBannerComponent,
|
|
2259
|
-
GoACardComponent,
|
|
2260
|
-
GoACardHeaderComponent,
|
|
2261
|
-
GoACardFooterComponent,
|
|
2262
|
-
GoACardContentComponent,
|
|
2263
|
-
GoACardThumbImageComponent,
|
|
2264
|
-
GoARadioComponent,
|
|
2265
|
-
GoARadioGroupComponent,
|
|
2266
|
-
GoAHeroBannerComponent,
|
|
2267
|
-
GoAHeroBannerContentComponent,
|
|
2268
|
-
GoAHeroBannerLinkComponent,
|
|
2269
|
-
GoAPageLoadIndicatorComponent,
|
|
2270
|
-
GoASkeletonImageContentComponent,
|
|
2271
|
-
GoASkeletonElementComponent,
|
|
2272
|
-
GoAElementLoadIndicatorComponent,
|
|
2273
|
-
],
|
|
2274
|
-
providers: [GoARadioService],
|
|
2275
|
-
},] }
|
|
2276
|
-
];
|
|
2277
|
-
|
|
2278
|
-
var GoACheckboxChange = /** @class */ (function () {
|
|
2279
|
-
function GoACheckboxChange() {
|
|
2280
|
-
}
|
|
2281
|
-
return GoACheckboxChange;
|
|
2282
|
-
}());
|
|
2283
|
-
|
|
2284
|
-
var GoABadgeComponent = /** @class */ (function () {
|
|
2285
|
-
function GoABadgeComponent() {
|
|
2286
|
-
this.type = 'light';
|
|
2287
|
-
}
|
|
2288
|
-
Object.defineProperty(GoABadgeComponent.prototype, "badgeClass", {
|
|
2289
|
-
get: function () {
|
|
2290
|
-
return "badge-" + this.type;
|
|
2291
|
-
},
|
|
2292
|
-
enumerable: false,
|
|
2293
|
-
configurable: true
|
|
2294
|
-
});
|
|
2295
|
-
/* eslint-disable @angular-eslint/no-empty-lifecycle-method */
|
|
2296
|
-
GoABadgeComponent.prototype.ngOnInit = function () { };
|
|
2297
|
-
return GoABadgeComponent;
|
|
2298
|
-
}());
|
|
2299
|
-
GoABadgeComponent.decorators = [
|
|
2300
|
-
{ type: i0.Component, args: [{
|
|
2301
|
-
selector: 'goa-badge',
|
|
2302
|
-
template: "<div class=\"goa-badge\" [ngClass]=\"badgeClass\">\n <ng-content class=\"goa-badge-icon\" select=\"mat-icon,.goa-badge-icon\"></ng-content>\n <div class=\"goa-badge-content\">\n <ng-content></ng-content>\n </div>\n</div>\n",
|
|
2303
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2304
|
-
styles: [":global .goa-badge-icon{font-size:14px}.goa-badge{display:inline-flex;align-items:center;border-radius:4px;padding:0 .5rem;grid-gap:4px;gap:4px}.goa-badge+.goa-badge{margin-left:.25rem}.goa-badge-content{text-transform:capitalize;font-size:14px;font-weight:400;line-height:24px}.goa-badge.badge-information{background-color:#f1f1f1;color:#005daa}.goa-badge.badge-success{background-color:#00853f;color:#fff}.goa-badge.badge-warning{background-color:#feba35;color:#333}.goa-badge.badge-emergency{background-color:#ec040b;color:#fff}.goa-badge.badge-dark{background-color:#333;color:#fff}.goa-badge.badge-midtone{background-color:#767676;color:#fff}.goa-badge.badge-light{background-color:#fff;color:#333}.goa-badge.badge-inactive{background-color:#fff;color:#333}\n"]
|
|
2305
|
-
},] }
|
|
2306
|
-
];
|
|
2307
|
-
GoABadgeComponent.ctorParameters = function () { return []; };
|
|
2308
|
-
GoABadgeComponent.propDecorators = {
|
|
2309
|
-
type: [{ type: i0.Input }]
|
|
2310
|
-
};
|
|
2311
|
-
|
|
2312
|
-
var GoAAppVersionHeaderComponent = /** @class */ (function () {
|
|
2313
|
-
function GoAAppVersionHeaderComponent() {
|
|
2314
|
-
this.isProdEnvironment = false;
|
|
2315
|
-
this.environment = '';
|
|
2316
|
-
this.version = '';
|
|
2317
|
-
this.closed = new i0.EventEmitter();
|
|
2318
|
-
}
|
|
2319
|
-
GoAAppVersionHeaderComponent.prototype.ngOnInit = function () {
|
|
2320
|
-
};
|
|
2321
|
-
GoAAppVersionHeaderComponent.prototype.onCloseClick = function () {
|
|
2322
|
-
this.closed.next(true);
|
|
2323
|
-
};
|
|
2324
|
-
return GoAAppVersionHeaderComponent;
|
|
2325
|
-
}());
|
|
2326
|
-
GoAAppVersionHeaderComponent.decorators = [
|
|
2327
|
-
{ type: i0.Component, args: [{
|
|
2328
|
-
selector: 'goa-app-version-header',
|
|
2329
|
-
template: "<div\n *ngIf=\"!isProdEnvironment && (closed | async) === null\"\n class=\"goa-app-version-header\"\n>\n <span class=\"content-wrapper\">\n <span class=\"environment-and-version\">{{ environment }} {{ version }}</span>\n <span class=\"close\" (click)=\"onCloseClick()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"ionicon\"\n viewBox=\"0 0 512 512\"\n >\n <title>Close</title>\n <path\n fill=\"currentColor\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"32\"\n d=\"M368 368L144 144M368 144L144 368\"\n />\n </svg>\n </span>\n </span>\n</div>\n",
|
|
2330
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2331
|
-
styles: [".goa-app-version-header{display:flex;justify-content:center;background-color:#dcdcdc}.goa-app-version-header .content-wrapper{display:flex;flex:1 1 auto;margin:0 24px;max-width:1200px}@media (min-width: 768px){.goa-app-version-header .content-wrapper{margin:0 72px}}.goa-app-version-header .content-wrapper .environment-and-version{display:flex;flex:1 1 auto;justify-content:center;padding-left:20px}.goa-app-version-header .content-wrapper .close{margin-left:auto;width:20px;text-align:right;font-weight:bold;font-size:small;align-self:center;cursor:pointer;display:flex}.goa-app-version-header .content-wrapper .close svg{color:#0070c4}\n"]
|
|
2332
|
-
},] }
|
|
2333
|
-
];
|
|
2334
|
-
GoAAppVersionHeaderComponent.ctorParameters = function () { return []; };
|
|
2335
|
-
GoAAppVersionHeaderComponent.propDecorators = {
|
|
2336
|
-
isProdEnvironment: [{ type: i0.Input }],
|
|
2337
|
-
environment: [{ type: i0.Input }],
|
|
2338
|
-
version: [{ type: i0.Input }],
|
|
2339
|
-
closed: [{ type: i0.Output }]
|
|
2340
|
-
};
|
|
2341
|
-
|
|
2342
|
-
var GoANumberInputComponent = /** @class */ (function () {
|
|
2343
|
-
function GoANumberInputComponent() {
|
|
2344
|
-
this._isTouched = false;
|
|
2345
|
-
/**
|
|
2346
|
-
* Sets the step value that is used when incrementing / decrementing
|
|
2347
|
-
*
|
|
2348
|
-
* @memberof GoANumberInputComponent
|
|
2349
|
-
*/
|
|
2350
|
-
this.step = 1;
|
|
2351
|
-
/**
|
|
2352
|
-
* An event that fires whenever the value is changed
|
|
2353
|
-
*
|
|
2354
|
-
* @type {EventEmitter<number | undefined | null>}
|
|
2355
|
-
* @memberof GoANumberInputComponent
|
|
2356
|
-
*/
|
|
2357
|
-
this.valueChanged = new i0.EventEmitter();
|
|
2358
|
-
}
|
|
2359
|
-
Object.defineProperty(GoANumberInputComponent.prototype, "input", {
|
|
2360
|
-
get: function () {
|
|
2361
|
-
var _a;
|
|
2362
|
-
return (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.nativeElement;
|
|
2363
|
-
},
|
|
2364
|
-
enumerable: false,
|
|
2365
|
-
configurable: true
|
|
2366
|
-
});
|
|
2367
|
-
Object.defineProperty(GoANumberInputComponent.prototype, "value", {
|
|
2368
|
-
get: function () {
|
|
2369
|
-
return this._value;
|
|
2370
|
-
},
|
|
2371
|
-
/**
|
|
2372
|
-
* The value of the NumberInput
|
|
2373
|
-
*
|
|
2374
|
-
* @memberof GoANumberInputComponent
|
|
2375
|
-
*/
|
|
2376
|
-
set: function (val) {
|
|
2377
|
-
var _a;
|
|
2378
|
-
var newVal = (val === undefined || val === null || Number.isNaN(val)) ? null : this.clampValue(val);
|
|
2379
|
-
if (this._value !== newVal) {
|
|
2380
|
-
this._value = newVal;
|
|
2381
|
-
(_a = this.onChange) === null || _a === void 0 ? void 0 : _a.call(this, newVal);
|
|
2382
|
-
this.valueChanged.emit(newVal);
|
|
2383
|
-
}
|
|
2384
|
-
if (this.input && this.input.valueAsNumber !== newVal) {
|
|
2385
|
-
this.input.valueAsNumber = newVal;
|
|
2386
|
-
}
|
|
2387
|
-
},
|
|
2388
|
-
enumerable: false,
|
|
2389
|
-
configurable: true
|
|
2390
|
-
});
|
|
2391
|
-
Object.defineProperty(GoANumberInputComponent.prototype, "min", {
|
|
2392
|
-
get: function () {
|
|
2393
|
-
return this._min;
|
|
2394
|
-
},
|
|
2395
|
-
/**
|
|
2396
|
-
* Sets the minimum value that the number input can take
|
|
2397
|
-
*
|
|
2398
|
-
* @memberof GoANumberInputComponent
|
|
2399
|
-
*/
|
|
2400
|
-
set: function (min) {
|
|
2401
|
-
this._min = min;
|
|
2402
|
-
// force reevaluation / clamping
|
|
2403
|
-
this.value = this._value;
|
|
2404
|
-
},
|
|
2405
|
-
enumerable: false,
|
|
2406
|
-
configurable: true
|
|
2407
|
-
});
|
|
2408
|
-
Object.defineProperty(GoANumberInputComponent.prototype, "max", {
|
|
2409
|
-
get: function () {
|
|
2410
|
-
return this._max;
|
|
2411
|
-
},
|
|
2412
|
-
/**
|
|
2413
|
-
* Sets the maximum value that the number input can take
|
|
2414
|
-
*
|
|
2415
|
-
* @memberof GoANumberInputComponent
|
|
2416
|
-
*/
|
|
2417
|
-
set: function (max) {
|
|
2418
|
-
this._max = max;
|
|
2419
|
-
// force reevaluation / clamping
|
|
2420
|
-
this.value = this._value;
|
|
2421
|
-
},
|
|
2422
|
-
enumerable: false,
|
|
2423
|
-
configurable: true
|
|
2424
|
-
});
|
|
2425
|
-
GoANumberInputComponent.prototype.clampValue = function (val) {
|
|
2426
|
-
if (Number.isFinite(this.max)) {
|
|
2427
|
-
val = Math.min(this.max, val);
|
|
2428
|
-
}
|
|
2429
|
-
if (Number.isFinite(this.min)) {
|
|
2430
|
-
val = Math.max(val, this.min);
|
|
2431
|
-
}
|
|
2432
|
-
return val;
|
|
2433
|
-
};
|
|
2434
|
-
GoANumberInputComponent.prototype.markTouched = function () {
|
|
2435
|
-
var _a;
|
|
2436
|
-
if (this._isTouched === false) {
|
|
2437
|
-
this._isTouched = true;
|
|
2438
|
-
(_a = this.onTouched) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
2439
|
-
}
|
|
2440
|
-
};
|
|
2441
|
-
GoANumberInputComponent.prototype.handleInput = function (event) {
|
|
2442
|
-
var _a;
|
|
2443
|
-
var inputString = (_a = event.data) !== null && _a !== void 0 ? _a : '';
|
|
2444
|
-
// If someone is typing a negative number, let them
|
|
2445
|
-
if (inputString.trim() !== '-') {
|
|
2446
|
-
this.value = event.target.valueAsNumber;
|
|
2447
|
-
}
|
|
2448
|
-
};
|
|
2449
|
-
/**
|
|
2450
|
-
* Increment the number input
|
|
2451
|
-
*
|
|
2452
|
-
* @memberof GoANumberInputComponent
|
|
2453
|
-
*/
|
|
2454
|
-
GoANumberInputComponent.prototype.increment = function () {
|
|
2455
|
-
// use built-in browser increment logic
|
|
2456
|
-
this.input.stepUp();
|
|
2457
|
-
this.value = this.input.valueAsNumber;
|
|
2458
|
-
};
|
|
2459
|
-
/**
|
|
2460
|
-
* Decrement the number input
|
|
2461
|
-
*
|
|
2462
|
-
* @memberof GoANumberInputComponent
|
|
2463
|
-
*/
|
|
2464
|
-
GoANumberInputComponent.prototype.decrement = function () {
|
|
2465
|
-
// use built-in browser decrement logic
|
|
2466
|
-
this.input.stepDown();
|
|
2467
|
-
this.value = this.input.valueAsNumber;
|
|
2468
|
-
};
|
|
2469
|
-
// CONTROL VALUE ACCESSOR INTERFACE
|
|
2470
|
-
GoANumberInputComponent.prototype.writeValue = function (value) {
|
|
2471
|
-
this.value = value;
|
|
2472
|
-
};
|
|
2473
|
-
GoANumberInputComponent.prototype.registerOnChange = function (handler) {
|
|
2474
|
-
this.onChange = handler;
|
|
2475
|
-
};
|
|
2476
|
-
GoANumberInputComponent.prototype.registerOnTouched = function (handler) {
|
|
2477
|
-
this.onTouched = handler;
|
|
2478
|
-
};
|
|
2479
|
-
GoANumberInputComponent.prototype.setDisabledState = function (isDisabled) {
|
|
2480
|
-
this.disabled = isDisabled;
|
|
2481
|
-
};
|
|
2482
|
-
return GoANumberInputComponent;
|
|
2483
|
-
}());
|
|
2484
|
-
GoANumberInputComponent.decorators = [
|
|
2485
|
-
{ type: i0.Component, args: [{
|
|
2486
|
-
selector: 'goa-number-input',
|
|
2487
|
-
template: "<div (focusout)=\"markTouched()\" class=\"number-input-container\">\n <button\n [disabled]=\"disabled || (min !== undefined && value <= min)\"\n goa-button\n buttonType=\"primary\"\n buttonSize=\"small\"\n type=\"button\"\n (click)=\"decrement()\"\n >\n <svg width=\"1em\" height=\"100%\" viewBox=\"0 0 100 100\">\n <line x1=\"25%\" y1=\"50%\" x2=\"75%\" y2=\"50%\" stroke-width=\"15%\" />\n </svg>\n </button>\n\n <input\n #numberInput\n type=\"number\"\n [min]=\"min\"\n [max]=\"max\"\n [value]=\"value\"\n [step]=\"step\"\n [disabled]=\"disabled\"\n (input)=\"handleInput($event)\"\n />\n\n <button\n goa-button\n [disabled]=\"disabled || (max !== undefined && value >= max)\"\n buttonType=\"primary\"\n buttonSize=\"small\"\n type=\"button\"\n (click)=\"increment()\"\n >\n <svg width=\"1em\" height=\"100%\" viewBox=\"0 0 100 100\">\n <line x1=\"25%\" y1=\"50%\" x2=\"75%\" y2=\"50%\" stroke-width=\"15%\" />\n <line x1=\"50%\" y1=\"25%\" x2=\"50%\" y2=\"75%\" stroke-width=\"15%\" />\n </svg>\n </button>\n</div>\n",
|
|
2488
|
-
providers: [
|
|
2489
|
-
{
|
|
2490
|
-
provide: forms.NG_VALUE_ACCESSOR,
|
|
2491
|
-
useExisting: i0.forwardRef(function () { return GoANumberInputComponent; }),
|
|
2492
|
-
multi: true
|
|
2493
|
-
},
|
|
2494
|
-
],
|
|
2495
|
-
styles: ["::ng-deep .ng-touched.ng-invalid>.number-input-container{border:2px solid #fc1921;border-radius:6px}:host{display:block}.number-input-container{display:flex;flex-direction:row;align-items:stretch;height:40px;padding:0;outline:0px}.number-input-container>input{border:solid 1px #dcdcdc;min-width:75px;width:0;flex:1;border-radius:0;padding:6px;-moz-appearance:textfield}.number-input-container>input:focus-visible{outline:unset;border-color:#feba35;border-width:2px}.number-input-container>input::-webkit-outer-spin-button,.number-input-container>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number-input-container>:first-child{border-radius:4px 0 0 4px}.number-input-container>:last-child{border-radius:0 4px 4px 0}.number-input-container>button{min-width:30px;margin:0;padding:0;z-index:1;font-size:20px}.number-input-container>button>svg{stroke:#fff}.number-input-container>button:disabled>svg{stroke:#666}.number-input-container>button:hover>svg{stroke:#fff}\n"]
|
|
2496
|
-
},] }
|
|
2497
|
-
];
|
|
2498
|
-
GoANumberInputComponent.propDecorators = {
|
|
2499
|
-
inputElement: [{ type: i0.ViewChild, args: ['numberInput',] }],
|
|
2500
|
-
disabled: [{ type: i0.Input }],
|
|
2501
|
-
step: [{ type: i0.Input }],
|
|
2502
|
-
valueChanged: [{ type: i0.Output }],
|
|
2503
|
-
value: [{ type: i0.Input }],
|
|
2504
|
-
min: [{ type: i0.Input }],
|
|
2505
|
-
max: [{ type: i0.Input }]
|
|
2506
|
-
};
|
|
2507
|
-
|
|
2508
|
-
var ExperimentalComponentsModule = /** @class */ (function () {
|
|
2509
|
-
function ExperimentalComponentsModule() {
|
|
2510
|
-
}
|
|
2511
|
-
return ExperimentalComponentsModule;
|
|
2512
|
-
}());
|
|
2513
|
-
ExperimentalComponentsModule.decorators = [
|
|
2514
|
-
{ type: i0.NgModule, args: [{
|
|
2515
|
-
imports: [
|
|
2516
|
-
common.CommonModule,
|
|
2517
|
-
AngularComponentsModule
|
|
2518
|
-
],
|
|
2519
|
-
exports: [
|
|
2520
|
-
GoABadgeComponent,
|
|
2521
|
-
GoAAppVersionHeaderComponent,
|
|
2522
|
-
GoANumberInputComponent,
|
|
2523
|
-
],
|
|
2524
|
-
declarations: [
|
|
2525
|
-
GoABadgeComponent,
|
|
2526
|
-
GoAAppVersionHeaderComponent,
|
|
2527
|
-
GoANumberInputComponent,
|
|
2528
|
-
],
|
|
2529
|
-
providers: [],
|
|
2530
|
-
},] }
|
|
2531
|
-
];
|
|
172
|
+
AngularComponentsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AngularComponentsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
173
|
+
AngularComponentsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AngularComponentsModule, declarations: [ValueDirective, ValueListDirective], exports: [ValueDirective, ValueListDirective] });
|
|
174
|
+
AngularComponentsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AngularComponentsModule });
|
|
175
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AngularComponentsModule, decorators: [{
|
|
176
|
+
type: i0.NgModule,
|
|
177
|
+
args: [{
|
|
178
|
+
declarations: [ValueDirective, ValueListDirective],
|
|
179
|
+
exports: [ValueDirective, ValueListDirective],
|
|
180
|
+
schemas: [i0.CUSTOM_ELEMENTS_SCHEMA],
|
|
181
|
+
}]
|
|
182
|
+
}] });
|
|
2532
183
|
|
|
2533
184
|
/**
|
|
2534
185
|
* Generated bundle index. Do not edit.
|
|
2535
186
|
*/
|
|
2536
187
|
|
|
2537
188
|
exports.AngularComponentsModule = AngularComponentsModule;
|
|
2538
|
-
exports.
|
|
2539
|
-
exports.
|
|
2540
|
-
exports.GOA_RADIO_CONTROL_VALUE_ACCESSOR = GOA_RADIO_CONTROL_VALUE_ACCESSOR;
|
|
2541
|
-
exports.GOA_RADIO_GROUP = GOA_RADIO_GROUP;
|
|
2542
|
-
exports.GOA_RADIO_GROUP_CONTROL_VALUE_ACCESSOR = GOA_RADIO_GROUP_CONTROL_VALUE_ACCESSOR;
|
|
2543
|
-
exports.GoAAppVersionHeaderComponent = GoAAppVersionHeaderComponent;
|
|
2544
|
-
exports.GoABadgeComponent = GoABadgeComponent;
|
|
2545
|
-
exports.GoAButtonComponent = GoAButtonComponent;
|
|
2546
|
-
exports.GoAButtonLinkComponent = GoAButtonLinkComponent;
|
|
2547
|
-
exports.GoACalloutComponent = GoACalloutComponent;
|
|
2548
|
-
exports.GoACardComponent = GoACardComponent;
|
|
2549
|
-
exports.GoACardContentComponent = GoACardContentComponent;
|
|
2550
|
-
exports.GoACardFooterComponent = GoACardFooterComponent;
|
|
2551
|
-
exports.GoACardGroupComponent = GoACardGroupComponent;
|
|
2552
|
-
exports.GoACardHeaderComponent = GoACardHeaderComponent;
|
|
2553
|
-
exports.GoACardThumbImageComponent = GoACardThumbImageComponent;
|
|
2554
|
-
exports.GoACheckboxChange = GoACheckboxChange;
|
|
2555
|
-
exports.GoACheckboxComponent = GoACheckboxComponent;
|
|
2556
|
-
exports.GoADropdownComponent = GoADropdownComponent;
|
|
2557
|
-
exports.GoAElementLoadIndicatorComponent = GoAElementLoadIndicatorComponent;
|
|
2558
|
-
exports.GoAHeaderComponent = GoAHeaderComponent;
|
|
2559
|
-
exports.GoAHeroBannerComponent = GoAHeroBannerComponent;
|
|
2560
|
-
exports.GoAHeroBannerContentComponent = GoAHeroBannerContentComponent;
|
|
2561
|
-
exports.GoAHeroBannerLinkComponent = GoAHeroBannerLinkComponent;
|
|
2562
|
-
exports.GoAMicrositeLogoComponent = GoAMicrositeLogoComponent;
|
|
2563
|
-
exports.GoANotificationBannerComponent = GoANotificationBannerComponent;
|
|
2564
|
-
exports.GoANotificationComponent = GoANotificationComponent;
|
|
2565
|
-
exports.GoANumberInputComponent = GoANumberInputComponent;
|
|
2566
|
-
exports.GoAOptionComponent = GoAOptionComponent;
|
|
2567
|
-
exports.GoAOptionGroupComponent = GoAOptionGroupComponent;
|
|
2568
|
-
exports.GoAPageLoadIndicatorComponent = GoAPageLoadIndicatorComponent;
|
|
2569
|
-
exports.GoARadioChange = GoARadioChange;
|
|
2570
|
-
exports.GoARadioComponent = GoARadioComponent;
|
|
2571
|
-
exports.GoARadioGroupComponent = GoARadioGroupComponent;
|
|
2572
|
-
exports.GoARadioService = GoARadioService;
|
|
2573
|
-
exports.GoASkeletonElementComponent = GoASkeletonElementComponent;
|
|
2574
|
-
exports.GoASkeletonImageContentComponent = GoASkeletonImageContentComponent;
|
|
189
|
+
exports.ValueDirective = ValueDirective;
|
|
190
|
+
exports.ValueListDirective = ValueListDirective;
|
|
2575
191
|
|
|
2576
192
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2577
193
|
|