@abgov/angular-components 1.8.0-beta.9 → 2.0.0-alpha.10

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