@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,2001 +1,154 @@
1
- import { Component, HostBinding, Input, ChangeDetectionStrategy, ViewChild, ChangeDetectorRef, ContentChildren, EventEmitter, Output, forwardRef, ɵɵdefineInjectable, Injectable, InjectionToken, HostListener, NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { OverlayModule } from '@angular/cdk/overlay';
4
- import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
5
- import { BehaviorSubject } from 'rxjs';
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
- class GoAButtonComponent {
12
- constructor() {
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
- /**
23
- * Adds class goa-button to the host.
24
- * @ignore
25
- */
26
- get primaryBinding() {
27
- return true;
28
- }
29
- /**
30
- * Adds class goa--secondary to the host if the buttonStyle = secondary.
31
- * @ignore
32
- */
33
- get secondaryBinding() {
34
- return this.buttonType === 'secondary';
35
- }
36
- /**
37
- * Adds class goa--tertiary to the host if the buttonStyle = tertiary.
38
- * @ignore
39
- */
40
- get tertiaryBinding() {
41
- return this.buttonType === 'tertiary';
42
- }
43
- /**
44
- * Adds class btn-small to the host if the buttonSize = small.
45
- * @ignore
46
- */
47
- get smallBinding() {
48
- return this.buttonSize === 'small';
49
- }
50
- /* eslint-disable @angular-eslint/no-empty-lifecycle-method */
51
- ngOnInit() { }
52
- }
53
- GoAButtonComponent.decorators = [
54
- { type: Component, args: [{
55
- selector:
56
- // eslint-disable-next-line @angular-eslint/component-selector
57
- 'button[goa-button], input[type="button"][goa-button], input[type="submit"][goa-button]',
58
- template: "<ng-content></ng-content>\n",
59
- 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}"]
60
- },] }
61
- ];
62
- GoAButtonComponent.ctorParameters = () => [];
63
- GoAButtonComponent.propDecorators = {
64
- primaryBinding: [{ type: HostBinding, args: ['class.goa-button',] }],
65
- secondaryBinding: [{ type: HostBinding, args: ['class.goa--secondary',] }],
66
- tertiaryBinding: [{ type: HostBinding, args: ['class.goa--tertiary',] }],
67
- smallBinding: [{ type: HostBinding, args: ['class.btn-small',] }],
68
- buttonType: [{ type: Input }],
69
- buttonSize: [{ type: Input }]
70
- };
71
-
72
- /**
73
- * A logo for a Government of Alberta hosted microsite.
74
- * selector: goa-microsite-logo
75
- */
76
- class GoAMicrositeLogoComponent {
77
- constructor() {
78
- /**
79
- * The home page URL of the microsite.
80
- */
81
- this.serviceHome = 'https://www.alberta.ca/index.aspx';
82
- }
83
- /**
84
- * @ignore
85
- */
86
- ngOnInit() {
87
- if (this.serviceName === undefined || this.serviceName === null) {
88
- throw new TypeError(`Input 'serviceName' is required.`);
89
- }
90
- }
91
- }
92
- GoAMicrositeLogoComponent.decorators = [
93
- { type: Component, args: [{
94
- selector: 'goa-microsite-logo',
95
- 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",
96
- 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}}"]
97
- },] }
98
- ];
99
- GoAMicrositeLogoComponent.ctorParameters = () => [];
100
- GoAMicrositeLogoComponent.propDecorators = {
101
- serviceName: [{ type: Input }],
102
- serviceHome: [{ type: Input }]
103
- };
104
-
105
- /**
106
- * A header component for a Government of Alberta hosted microsite.
107
- * selector: goa-header
108
- */
109
- class GoAHeaderComponent {
110
- // ServiceLevel = this.ServiceLevel;
111
- constructor() {
112
- /**
113
- * The home page URL of the microsite.
114
- */
115
- this.serviceHome = 'https://www.alberta.ca/index.aspx';
116
- }
117
- /**
118
- * @ignore
119
- */
120
- ngOnInit() {
121
- this.checkRequiredProps('serviceLevel', 'serviceName', 'serviceHome');
122
- }
123
- serviceLevelCssClass() {
124
- return `service-level--${this.serviceLevel.toLowerCase()}`;
125
- }
126
- serviceLevelFormatted() {
127
- return this.serviceLevel.toLowerCase();
128
- }
129
- checkRequiredProps(...props) {
130
- props.forEach(prop => {
131
- if (!this[prop]) {
132
- throw new TypeError(`Input '${prop}' is required.`);
133
- }
134
- });
135
- }
136
- }
137
- GoAHeaderComponent.decorators = [
138
- { type: Component, args: [{
139
- selector: 'goa-header',
140
- 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",
141
- 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}"]
142
- },] }
143
- ];
144
- GoAHeaderComponent.ctorParameters = () => [];
145
- GoAHeaderComponent.propDecorators = {
146
- serviceName: [{ type: Input }],
147
- serviceHome: [{ type: Input }],
148
- serviceLevel: [{ type: Input }]
149
- };
150
-
151
- /**
152
- * Styles an anchor Design system compliant.
153
- * selector: a[goa-button]
154
- * @example <a goa-button linkType='right' href='...'>Text</a>
155
- */
156
- class GoAButtonLinkComponent {
157
- constructor() {
158
- /**
159
- * The type of arrow to use.
160
- */
161
- this.linkType = 'right';
162
- /**
163
- * The size of the button, controls font size and padding.
164
- */
165
- this.buttonSize = 'normal';
166
- }
167
- /**
168
- * Adds class goa-link-button to the host.
169
- * @ignore
170
- */
171
- get primaryBinding() {
172
- return true;
173
- }
174
- /**
175
- * Adds class right-arrow to the host if the linkType = right.
176
- * @ignore
177
- */
178
- get rightBinding() {
179
- return this.linkType === 'right';
180
- }
181
- /**
182
- * Adds class right-arrow to the host if the linkType = right.
183
- * @ignore
184
- */
185
- get upBinding() {
186
- return this.linkType === 'up';
187
- }
188
- /**
189
- * Adds class btn-small to the host if the buttonSize = small.
190
- * @ignore
191
- */
192
- get smallBinding() {
193
- return this.buttonSize === 'small';
194
- }
195
- /* eslint-disable @angular-eslint/no-empty-lifecycle-method */
196
- ngOnInit() { }
197
- }
198
- GoAButtonLinkComponent.decorators = [
199
- { type: Component, args: [{
200
- // eslint-disable-next-line @angular-eslint/component-selector
201
- selector: 'a[goa-button]',
202
- template: "<span>\n <ng-content></ng-content>\n</span>",
203
- 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}"]
204
- },] }
205
- ];
206
- GoAButtonLinkComponent.ctorParameters = () => [];
207
- GoAButtonLinkComponent.propDecorators = {
208
- primaryBinding: [{ type: HostBinding, args: ['class.goa-link-button',] }],
209
- rightBinding: [{ type: HostBinding, args: ['class.right-arrow',] }],
210
- upBinding: [{ type: HostBinding, args: ['class.up-arrow',] }],
211
- smallBinding: [{ type: HostBinding, args: ['class.btn-small',] }],
212
- linkType: [{ type: Input }],
213
- buttonSize: [{ type: Input }]
214
- };
215
-
216
- /**
217
- * Option component with to use with GoADropdown.
218
- * selector: goa-option
219
- */
220
- class GoAOptionComponent {
221
- constructor() {
222
- /**
223
- * Is the option currently selected
224
- * @ignore
225
- */
226
- this.selected = false;
227
- /**
228
- * Is the option selected by default?
229
- */
230
- this.defaultSelected = false;
231
- }
232
- /**
233
- * Lifecycle hook OnInit
234
- * @ignore
235
- */
236
- ngOnInit() {
237
- if (this.id === undefined || this.id === null) {
238
- throw new TypeError(`Input 'id' is required.`);
239
- }
240
- if (this.label === undefined || this.label === null) {
241
- throw new TypeError(`Input 'label' is required.`);
242
- }
243
- this.selected = this.defaultSelected;
244
- }
245
- }
246
- GoAOptionComponent.decorators = [
247
- { type: Component, args: [{
248
- selector: 'goa-option',
249
- template: "<ng-template #optionTemplate>\n <div class=\"goa-option\">\n <ng-content></ng-content>\n </div>\n</ng-template>",
250
- changeDetection: ChangeDetectionStrategy.OnPush,
251
- styles: [""]
252
- },] }
253
- ];
254
- GoAOptionComponent.ctorParameters = () => [];
255
- GoAOptionComponent.propDecorators = {
256
- id: [{ type: Input }],
257
- value: [{ type: Input }],
258
- label: [{ type: Input }],
259
- defaultSelected: [{ type: Input }],
260
- optionTemplate: [{ type: ViewChild, args: ['optionTemplate',] }]
261
- };
262
-
263
- /**
264
- * Option grouping component with to use with GoADropdown.
265
- * selector: goa-option-group
266
- */
267
- class GoAOptionGroupComponent {
268
- constructor(cdr) {
269
- this.cdr = cdr;
270
- }
271
- /**
272
- * Lifecycle hook OnInit
273
- * @ignore
274
- */
275
- ngOnInit() {
276
- if (this.label === undefined || this.label === null || this.label === '') {
277
- throw new TypeError(`The input 'label' is required.`);
278
- }
279
- }
280
- /**
281
- * Lifecycle hook AfterViewInit
282
- * @ignore
283
- */
284
- ngAfterViewInit() {
285
- this._filteredOptions = [...this.options];
286
- // The template output cache is populated by child components during render, so tell angular that
287
- // there have been changes during the render here.
288
- this.cdr.detectChanges();
289
- }
290
- }
291
- GoAOptionGroupComponent.decorators = [
292
- { type: Component, args: [{
293
- selector: 'goa-option-group',
294
- 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>",
295
- styles: [".goa-option-group{font-weight:700}.goa-option-group .group-options{padding-left:1em;font-weight:400}"]
296
- },] }
297
- ];
298
- GoAOptionGroupComponent.ctorParameters = () => [
299
- { type: ChangeDetectorRef }
300
- ];
301
- GoAOptionGroupComponent.propDecorators = {
302
- label: [{ type: Input }],
303
- options: [{ type: ContentChildren, args: [GoAOptionComponent, { descendants: true },] }],
304
- optionGroupTemplate: [{ type: ViewChild, args: ['optionGroupTemplate',] }]
305
- };
306
-
307
- /**
308
- * A dropdown component with Government of Alberta styling.
309
- * selector: goa-dropdown
310
- */
311
- class GoADropdownComponent {
312
- constructor(cdr) {
313
- this.cdr = cdr;
314
- /**
315
- * boolean for if the dropdown is open.
316
- * @ignore
317
- */
318
- this._isOpen = false;
319
- /**
320
- * Is the required error tripped?
321
- * @ignore
322
- */
323
- this._requiredError = false;
324
- /**
325
- * This position config ensures that the top "start" corner of the overlay
326
- * is aligned with with the bottom "start" of the origin by default (overlapping
327
- * the trigger completely). If the panel cannot fit below the trigger, it
328
- * will fall back to a position above the trigger.
329
- * @ignore
330
- */
331
- this._positions = [
332
- {
333
- originX: 'start',
334
- originY: 'bottom',
335
- overlayX: 'start',
336
- overlayY: 'top',
337
- },
338
- {
339
- originX: 'start',
340
- originY: 'top',
341
- overlayX: 'start',
342
- overlayY: 'bottom',
343
- },
344
- ];
345
- /**
346
- * All options currently matching filter including groups.
347
- * @ignore
348
- */
349
- this._allFilteredOptions = [];
350
- /**
351
- * Whats the mode for typeahead.
352
- */
353
- this.typeaheadMode = 'none';
354
- /**
355
- * Is the select disabled.
356
- */
357
- this.disabled = false;
358
- /**
359
- * @ignore
360
- */
361
- this._multiple = false;
362
- /**
363
- * @ignore
364
- */
365
- this._required = false;
366
- /**
367
- * Event emitted containing the value field of all selected options when the selection changes.
368
- */
369
- this.selectionChange = new EventEmitter();
370
- }
371
- /**
372
- * Update the selected options, select the options with the given ids
373
- */
374
- set selectedIds(ids) {
375
- if (this.allOptions === undefined) {
376
- // aren't initialized yet, return
377
- return;
378
- }
379
- if (ids === null || ids === undefined) {
380
- ids = [];
381
- }
382
- if (ids.length > 1 && this.multiple === false) {
383
- throw new Error('Cannot select multiple options when the dropdown has multiple set to false.');
384
- }
385
- const selectedOptions = [];
386
- this.allOptions.forEach(option => {
387
- if (ids.includes(option.id)) {
388
- option.selected = true;
389
- selectedOptions.push(option);
390
- }
391
- else {
392
- option.selected = false;
393
- }
394
- });
395
- this.selectionChanged(selectedOptions, true);
396
- }
397
- /**
398
- * Is multiple selection?
399
- */
400
- set multiple(value) {
401
- this._multiple = value;
402
- if (this._multiple === false) {
403
- // If we have changed from multiple to no multiple then deselect everything.
404
- this.selectedItems.forEach(option => {
405
- option.selected = false;
406
- });
407
- }
408
- }
409
- get multiple() {
410
- return this._multiple;
411
- }
412
- /**
413
- * Is a selection required?
414
- */
415
- set required(value) {
416
- this._required = value;
417
- this._requiredError = this.selectedItems.length === 0 && this._required === true;
418
- }
419
- get required() {
420
- return this._required;
421
- }
422
- /**
423
- * Lifecycle hook OnInit
424
- * @ignore
425
- */
426
- /* eslint-disable @angular-eslint/no-empty-lifecycle-method */
427
- ngOnInit() { }
428
- /**
429
- * Lifecycle hook AfterViewInit
430
- * @ignore
431
- */
432
- ngAfterViewInit() {
433
- this._triggerRect = this.textInput.nativeElement.getBoundingClientRect();
434
- this._filteredOptions = [...this.options];
435
- this._allFilteredOptions = [...this.allOptions];
436
- if (this.selectedItems.length > 0) {
437
- this.setTextInput(this.selectedItems[0].label);
438
- }
439
- // The template output cache is populated by child components during render,
440
- // so tell angular that there have been changes during the render here.
441
- this.cdr.detectChanges();
442
- }
443
- /**
444
- * Called when user updates the text in the searchbox.
445
- * @param text The text of the input
446
- * @ignore
447
- */
448
- onFilterChange(text) {
449
- // open the dropdown if it is not already
450
- if (!this._isOpen === true) {
451
- this._isOpen = true;
452
- }
453
- this.filterOptions(text);
454
- }
455
- /**
456
- * Handler for keyboard events when menu is open.
457
- * @param event keyboard event
458
- * @ignore
459
- */
460
- overlayKeydown(event) {
461
- if (event.code === 'Enter' || event.code === 'NumpadEnter') {
462
- this.optionClicked(this._activeOption);
463
- }
464
- else if (event.code === 'ArrowDown') {
465
- this._activeIndex = (this._activeIndex + 1) % this._allFilteredOptions.length;
466
- this._activeOption = this._allFilteredOptions[this._activeIndex];
467
- }
468
- else if (event.code === 'ArrowUp') {
469
- if (this._activeIndex > 0) {
470
- this._activeIndex = this._activeIndex - 1;
471
- this._activeOption = this._allFilteredOptions[this._activeIndex];
472
- }
473
- }
474
- }
475
- /**
476
- * Sets the active option. Active option is the option that when enter is pressed is selected.
477
- * @param option The option to make the active option
478
- * @ignore
479
- */
480
- setActiveOption(option) {
481
- this._activeOption = option;
482
- this._activeIndex = this._allFilteredOptions.findIndex((filteredOption) => filteredOption.id === option.id);
483
- }
484
- /**
485
- * Handler for when the input is clicked.
486
- * @ignore
487
- */
488
- inputClicked() {
489
- if (this.disabled === false) {
490
- this._isOpen = !this._isOpen;
491
- // set the active option to the first in the list
492
- if (this._allFilteredOptions.length > 0) {
493
- this._activeOption = this._allFilteredOptions[0];
494
- this._activeIndex = 0;
495
- }
496
- }
1
+ import * as i0 from '@angular/core';
2
+ import { forwardRef, Directive, HostListener, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
3
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
4
+
5
+ class ValueDirective {
6
+ constructor(elementRef) {
7
+ this.elementRef = elementRef;
8
+ this._value = "";
9
+ /* eslint-disable @typescript-eslint/no-explicit-any */
10
+ this.onChange = () => { };
11
+ this.onTouched = () => { };
497
12
  }
498
- /**
499
- * Handler for when descendant an option is clicked.
500
- * @ignore
501
- */
502
- optionClicked(option) {
503
- let selectedOptions = [];
504
- if (this.multiple === true) {
505
- option.selected = !option.selected;
506
- selectedOptions = this.selectedItems;
507
- }
508
- else {
509
- option.selected = !option.selected;
510
- this.selectedItems.forEach((o) => {
511
- if (option.id !== o.id) {
512
- // change all options that weren't selected to false without notifying change
513
- o.selected = false;
514
- }
515
- selectedOptions = [option];
516
- });
517
- }
518
- this.selectionChanged(selectedOptions, true);
519
- if (this.multiple === false) {
520
- // close the dropdown if we are in single selection mode
521
- this._isOpen = false;
522
- }
523
- }
524
- /**
525
- * Update view when selection changes
526
- * @param options
527
- * @ignore
528
- */
529
- selectionChanged(options, emitEvent) {
530
- if (options.length > 0) {
531
- const selectedOptions = options.map(o => o.label).join(', ');
532
- this._requiredError = false;
533
- this.setTextInput(selectedOptions);
534
- }
535
- else {
536
- this._requiredError = this.required;
537
- this.setTextInput('');
538
- }
539
- if (emitEvent === true) {
540
- this.emitChange(options);
541
- }
542
- }
543
- /**
544
- * Emit selection change
545
- * @ignore
546
- */
547
- emitChange(options) {
548
- const values = options.map((option) => option.value);
549
- this.selectionChange.emit(values);
550
- }
551
- /**
552
- * Gets all the currently selected options
553
- * @ignore
554
- */
555
- get selectedItems() {
556
- if (this.allOptions === undefined) {
557
- return [];
558
- }
559
- return [...this.allOptions.filter((option) => option.selected === true)];
560
- }
561
- /**
562
- * Set the text of the input.
563
- * @param value The value to set
564
- * @ignore
565
- */
566
- setTextInput(value) {
567
- if (this.textInput) {
568
- this.textInput.nativeElement.value = value;
569
- // Exact matches show whole list?
570
- this.filterOptions('');
571
- }
572
- }
573
- /**
574
- * Update the filtered options with the passed in filter text.
575
- * @param filterText The text to filter by
576
- * @ignore
577
- */
578
- filterOptions(filterText) {
579
- this.optionGroups.forEach(group => {
580
- group._filteredOptions = group.options.filter(this.typeaheadFilter.bind(this, filterText, this.typeaheadMode));
581
- });
582
- this._filteredOptions = this.options.filter(this.typeaheadFilter.bind(this, filterText, this.typeaheadMode));
583
- this._allFilteredOptions = this.allOptions.filter(this.typeaheadFilter.bind(this, filterText, this.typeaheadMode));
584
- // The filters have changed so update the active option incase it has been filtered out.
585
- this._activeOption = this._allFilteredOptions[this._activeIndex % this._allFilteredOptions.length];
586
- }
587
- /**
588
- * Filter for typeahead with logic for what mode we are in.
589
- * @param option
590
- * @ignore
591
- */
592
- typeaheadFilter(filterText, typeaheadMode, option) {
593
- if (typeaheadMode === 'none' || this.typeaheadMode === undefined) {
594
- return true;
595
- }
596
- if (typeaheadMode === 'startsWith') {
597
- return option.label.toLocaleLowerCase().startsWith(filterText.toLocaleLowerCase());
598
- }
599
- if (typeaheadMode === 'contains') {
600
- return option.label.toLocaleLowerCase().includes(filterText.toLocaleLowerCase());
601
- }
602
- }
603
- }
604
- GoADropdownComponent.decorators = [
605
- { type: Component, args: [{
606
- selector: 'goa-dropdown',
607
- 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",
608
- 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}"]
609
- },] }
610
- ];
611
- GoADropdownComponent.ctorParameters = () => [
612
- { type: ChangeDetectorRef }
613
- ];
614
- GoADropdownComponent.propDecorators = {
615
- typeaheadMode: [{ type: Input }],
616
- menuHeight: [{ type: Input }],
617
- label: [{ type: Input }],
618
- description: [{ type: Input }],
619
- selectedIds: [{ type: Input }],
620
- disabled: [{ type: Input }],
621
- multiple: [{ type: Input }],
622
- required: [{ type: Input }],
623
- textInput: [{ type: ViewChild, args: ['textInput',] }],
624
- allOptions: [{ type: ContentChildren, args: [GoAOptionComponent, { descendants: true },] }],
625
- options: [{ type: ContentChildren, args: [GoAOptionComponent, { descendants: false },] }],
626
- optionGroups: [{ type: ContentChildren, args: [GoAOptionGroupComponent, { descendants: false },] }],
627
- selectionChange: [{ type: Output }]
628
- };
629
-
630
- const GOA_CHECKBOX_CONTROL_VALUE_ACCESSOR = {
631
- provide: NG_VALUE_ACCESSOR,
632
- useExisting: forwardRef(() => GoACheckboxComponent),
633
- multi: true
634
- };
635
- /**
636
- * Checkbox component with Government of Alberta styling.
637
- * selector: goa-checkbox
638
- */
639
- class GoACheckboxComponent {
640
- constructor(_changeDetectorRef) {
641
- this._changeDetectorRef = _changeDetectorRef;
642
- /**
643
- * @ignore
644
- */
645
- this._indeterminate = false;
646
- /**
647
- * The position to display the label/text for the checbox. Valid values are before and after.
648
- */
649
- this.labelPosition = 'after';
650
- /**
651
- * Event emitted containing the source checkbox, and whether or not it is checked.
652
- */
653
- this.selectionChange = new EventEmitter();
654
- /**
655
- * @ignore
656
- */
657
- this._propagateChange = (_) => { };
658
- this.uniqueId = `goa-checkbox-${GoACheckboxComponent.idNum++}`;
13
+ get value() {
14
+ return this._value;
659
15
  }
660
- /**
661
- * Boolean indicating whether or not the checkbox should display as indeterminate
662
- * (i.e. it has associated 'child' checkboxes, some of which are selected).
663
- */
664
- get indeterminate() { return this._indeterminate; }
665
- set indeterminate(value) {
666
- // only do something if value has changed from current
667
- if (value !== this.indeterminate) {
668
- this._indeterminate = value;
669
- // can't be indeterminate and checked, so clear checked
670
- if (this._indeterminate) {
671
- this.checked = false;
672
- }
16
+ set value(val) {
17
+ if (val !== this._value) {
18
+ this._value = val;
19
+ this.onChange(this._value);
20
+ this.onTouched();
21
+ this.elementRef.nativeElement.value = val;
673
22
  }
674
23
  }
675
- /**
676
- * Boolean indicating if the checkbox is required and not checked
677
- * @ignore
678
- */
679
- hasError() {
680
- return this.required && !this.checked;
681
- }
682
- /**
683
- * Implemented as part of ControlValueAccessor.
684
- * @param value The model bound property, i.e. the value of checked
685
- * @ignore
686
- */
687
24
  writeValue(value) {
688
- if ((value !== undefined) && (value !== null)) {
689
- this.checked = value;
690
- this._changeDetectorRef.detectChanges();
25
+ if (value) {
26
+ this.value = value;
691
27
  }
692
28
  }
693
- /**
694
- * Implemented as part of ControlValueAccessor.
695
- * @param fn The function to call on change. Provided by ControlValueAccessor
696
- * @ignore
697
- */
698
29
  registerOnChange(fn) {
699
- this._propagateChange = fn;
30
+ this.onChange = fn;
700
31
  }
701
- /**
702
- * Implemented as part of ControlValueAccessor.
703
- * @param fn The function to call on touch. Provided by ControlValueAccessor
704
- * @ignore
705
- */
706
32
  registerOnTouched(fn) {
707
- this._onTouchedCallback = fn;
708
- }
709
- ;
710
- /**
711
- * Toggles the checked value of the checkbox
712
- * @ignore
713
- */
714
- toggle() {
715
- this.checked = !this.checked;
716
- }
717
- /**
718
- * User interaction event on click of the checkbox or its label to indicate toggling of the current checked status.
719
- * Emits selectionChange to parent components.
720
- * @ignore
721
- */
722
- onChange(event) {
723
- event.stopPropagation();
724
- this.toggle();
725
- // user manually clicking overrides indeterminate and sets it to false
726
- // this is because if they click and set to checked/unchecked, all 'child' checkboxes should get set to
727
- // checked/unchecked (by user routine, not here), so this checkbox is no longer indeterminate
728
- this.indeterminate = false;
729
- const checkBoxChange = {
730
- source: this,
731
- checked: this.checked
732
- };
733
- this._propagateChange(this.checked);
734
- this.selectionChange.emit(checkBoxChange);
735
- }
736
- }
737
- /**
738
- * @ignore
739
- */
740
- GoACheckboxComponent.idNum = 0;
741
- GoACheckboxComponent.decorators = [
742
- { type: Component, args: [{
743
- selector: 'goa-checkbox',
744
- 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",
745
- //register our custom ControlValueAccessor with angular DI system so angular knows how to get instance of it for ngModel binding
746
- providers: [GOA_CHECKBOX_CONTROL_VALUE_ACCESSOR],
747
- changeDetection: ChangeDetectionStrategy.OnPush,
748
- 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}"]
749
- },] }
750
- ];
751
- GoACheckboxComponent.ctorParameters = () => [
752
- { type: ChangeDetectorRef }
753
- ];
754
- GoACheckboxComponent.propDecorators = {
755
- value: [{ type: Input }],
756
- checked: [{ type: Input }],
757
- disabled: [{ type: Input }],
758
- required: [{ type: Input }],
759
- indeterminate: [{ type: Input }],
760
- labelPosition: [{ type: Input }],
761
- selectionChange: [{ type: Output }]
762
- };
763
-
764
- class GoARadioChange {
765
- }
766
-
767
- class GoARadioService {
768
- constructor() {
769
- this.radioChangeMessage = new BehaviorSubject(new GoARadioChange());
770
- }
771
- selectRadio(radioChange) {
772
- this.radioChangeMessage.next(radioChange);
773
- }
774
- }
775
- GoARadioService.ɵprov = ɵɵdefineInjectable({ factory: function GoARadioService_Factory() { return new GoARadioService(); }, token: GoARadioService, providedIn: "root" });
776
- GoARadioService.decorators = [
777
- { type: Injectable, args: [{
778
- providedIn: 'root',
779
- },] }
780
- ];
781
- GoARadioService.ctorParameters = () => [];
782
-
783
- /**
784
- * Control value accessor to use for the component's provider
785
- * @ignore
786
- */
787
- const GOA_RADIO_CONTROL_VALUE_ACCESSOR = {
788
- provide: NG_VALUE_ACCESSOR,
789
- useExisting: forwardRef(() => GoARadioComponent),
790
- multi: true
791
- };
792
- /**
793
- * Radiobutton component with Government of Alberta styling.
794
- */
795
- class GoARadioComponent {
796
- constructor(_changeDetector, _radioService) {
797
- this._changeDetector = _changeDetector;
798
- this._radioService = _radioService;
799
- /**
800
- * The position to display the label/text for the radiobutton. Valid values are before and after.
801
- */
802
- this.labelPosition = 'after';
803
- /**
804
- * Event emitted containing the source radiobutton, and whether or not it is checked.
805
- */
806
- this.selectionChange = new EventEmitter();
807
- /**
808
- * @ignore
809
- */
810
- this._propagateChange = (_) => { };
811
- this.uniqueId = `goa-radiobutton-${GoARadioComponent.idNum++}`;
812
- }
813
- /**
814
- * Lifecycle hook OnInit. Used to subscribe to radio change messages from the radioService in order to know whether or not
815
- * this radio should be checked or not.
816
- * @ignore
817
- */
818
- ngOnInit() {
819
- this.radioServiceSubscription = this._radioService.radioChangeMessage.subscribe(rcm => {
820
- if (rcm && rcm.source && rcm.source.name === this.name && rcm.source.uniqueId !== this.uniqueId) {
821
- this.checked = false;
822
- this._changeDetector.detectChanges();
823
- }
824
- });
825
- }
826
- /**
827
- * Lifecycle hook OnDestroy. Used to unsubscribe from the radio change messages.
828
- * @ignore
829
- */
830
- ngOnDestroy() {
831
- this.radioServiceSubscription.unsubscribe();
832
- }
833
- /**
834
- * Boolean indicating if the radiobutton is required and not checked
835
- * @ignore
836
- */
837
- hasError() {
838
- return this.required && !this.checked;
839
- }
840
- /**
841
- * Marks the radio button as needing checking for change detection.
842
- * This method is exposed because the parent radio group will directly
843
- * update bound properties of the radio button.
844
- */
845
- markForCheck() {
846
- // When group value changes, the button will not be notified. Use `markForCheck` to explicitly
847
- // update radio button's status
848
- this._changeDetector.markForCheck();
849
- }
850
- /**
851
- * Implemented as part of ControlValueAccessor.
852
- * @param value The model bound property, i.e. the value of checked
853
- * @ignore
854
- */
855
- writeValue(value) {
856
- if ((value !== undefined) && (value !== null)) {
857
- this.checked = value;
858
- this._changeDetector.detectChanges();
859
- }
860
- }
861
- /**
862
- * Implemented as part of ControlValueAccessor.
863
- * @param fn The function to call on change. Provided by ControlValueAccessor
864
- * @ignore
865
- */
866
- registerOnChange(fn) {
867
- this._propagateChange = fn;
868
- }
869
- /**
870
- * Implemented as part of ControlValueAccessor.
871
- * @param fn The function to call on touch. Provided by ControlValueAccessor
872
- * @ignore
873
- */
874
- registerOnTouched(fn) {
875
- this._onTouchedCallback = fn;
876
- }
877
- ;
878
- /**
879
- * User interaction event on click of the radiobutton or its label to indicate toggling of the current checked status.
880
- * Emits selectionChange to parent components.
881
- * @ignore
882
- */
883
- onClick() {
884
- // flip the checked state of this radio
885
- this.checked = !this.checked;
886
- // emit radio change event for those interested
887
- const radioChange = {
888
- source: this,
889
- checked: this.checked
890
- };
891
- this._propagateChange(this.checked);
892
- this.selectionChange.emit(radioChange);
893
- // notify other radios in group/with same name via radio service so they know to flip their states to not checked
894
- this._radioService.selectRadio(radioChange);
895
- }
896
- }
897
- /**
898
- * Used to generate unique Id for this component
899
- * @ignore
900
- */
901
- GoARadioComponent.idNum = 0;
902
- GoARadioComponent.decorators = [
903
- { type: Component, args: [{
904
- selector: 'goa-radio',
905
- 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",
906
- //register our custom ControlValueAccessor with angular DI system so angular knows how to get instance of it for ngModel binding
907
- providers: [GOA_RADIO_CONTROL_VALUE_ACCESSOR],
908
- changeDetection: ChangeDetectionStrategy.OnPush,
909
- 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}"]
910
- },] }
911
- ];
912
- GoARadioComponent.ctorParameters = () => [
913
- { type: ChangeDetectorRef },
914
- { type: GoARadioService }
915
- ];
916
- GoARadioComponent.propDecorators = {
917
- name: [{ type: Input }],
918
- value: [{ type: Input }],
919
- checked: [{ type: Input }],
920
- disabled: [{ type: Input }],
921
- required: [{ type: Input }],
922
- labelPosition: [{ type: Input }],
923
- selectionChange: [{ type: Output }]
924
- };
925
-
926
- /**
927
- * Control value accessor to use for the component's provider
928
- * @ignore
929
- */
930
- const GOA_RADIO_GROUP_CONTROL_VALUE_ACCESSOR = {
931
- provide: NG_VALUE_ACCESSOR,
932
- useExisting: forwardRef(() => GoARadioGroupComponent),
933
- multi: true
934
- };
935
- /**
936
- * Injection token that can be used to inject instances of `GoARadioGroupComponent`. It serves as
937
- * alternative token to the actual `GoARadioGroupComponent` class which could cause unnecessary
938
- * retention of the class and its component metadata.
939
- * @ignore
940
- */
941
- const GOA_RADIO_GROUP = new InjectionToken('GoARadioGroup');
942
- /**
943
- * Radiobutton group component with Government of Alberta styling. Used to group a set of related radio buttons.
944
- */
945
- class GoARadioGroupComponent {
946
- constructor(_changeDetector, _radioService) {
947
- this._changeDetector = _changeDetector;
948
- this._radioService = _radioService;
949
- /**
950
- * @ignore
951
- */
952
- this._name = `goa-radio-group-${GoARadioGroupComponent.idNum++}`;
953
- /**
954
- * @ignore
955
- */
956
- this._value = null;
957
- /**
958
- * @ignore
959
- */
960
- this._labelPosition = 'after';
961
- /**
962
- * The error message to display when the radio group selection is required and nothing has been selected
963
- */
964
- this.requiredErrorMessage = 'Please select one of the provided options.';
965
- /**
966
- * Event emitted containing the source radiobutton, and whether or not it is checked.
967
- */
968
- this.selectionChange = new EventEmitter();
969
- /**
970
- * @ignore
971
- */
972
- this._propagateChange = (_) => { };
973
- this.uniqueId = `goa-radiobutton-group-${GoARadioGroupComponent.idNum++}`;
974
- }
975
- /**
976
- * Indicates the "group" or set of radios this radio belongs to.
977
- */
978
- get name() { return this._name; }
979
- set name(value) {
980
- this._name = value;
981
- this._updateRadioButtonNames();
982
- }
983
- /**
984
- * Value/unique identifier for the object the radiobutton represents.
985
- */
986
- get value() { return this._value; }
987
- set value(newValue) {
988
- if (this._value !== newValue) {
989
- // Set this before proceeding to ensure no circular loop occurs with selection.
990
- this._value = newValue;
991
- this._updateSelectedRadioFromValue();
992
- this._setSelectedRadioToChecked();
993
- }
994
- }
995
- /**
996
- * The currently selected radio.
997
- */
998
- get selected() { return this._selected; }
999
- set selected(selected) {
1000
- this._selected = selected;
1001
- this.value = selected ? selected.value : null;
1002
- this._setSelectedRadioToChecked();
1003
- }
1004
- /**
1005
- * Boolean indicating whether or not the radiobutton is disabled.
1006
- */
1007
- get disabled() { return this._disabled; }
1008
- set disabled(value) {
1009
- this._disabled = value;
1010
- this._updateRadioButtonDisabled();
1011
- }
1012
- /**
1013
- * Boolean indicating whether or not the radiobutton is required.
1014
- */
1015
- get required() { return this._required; }
1016
- set required(value) {
1017
- this._required = value;
1018
- this._updateRadioButtonRequired();
1019
- }
1020
- /**
1021
- * The position to display the label/text for the radiobutton. Valid values are before and after.
1022
- */
1023
- get labelPosition() {
1024
- return this._labelPosition;
33
+ this.onTouched = fn;
34
+ }
35
+ listenForValueChange(value) {
36
+ this.value = value;
37
+ }
38
+ }
39
+ ValueDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ValueDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
40
+ ValueDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: ValueDirective, selector: "[goaValue]", host: { listeners: { "_change": "listenForValueChange($event.detail.value)" } }, providers: [
41
+ {
42
+ provide: NG_VALUE_ACCESSOR,
43
+ useExisting: forwardRef(() => ValueDirective),
44
+ multi: true,
45
+ },
46
+ ], ngImport: i0 });
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ValueDirective, decorators: [{
48
+ type: Directive,
49
+ args: [{
50
+ selector: "[goaValue]",
51
+ providers: [
52
+ {
53
+ provide: NG_VALUE_ACCESSOR,
54
+ useExisting: forwardRef(() => ValueDirective),
55
+ multi: true,
56
+ },
57
+ ],
58
+ }]
59
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { listenForValueChange: [{
60
+ type: HostListener,
61
+ args: ["_change", ["$event.detail.value"]]
62
+ }] } });
63
+ class ValueListDirective {
64
+ constructor(elementRef) {
65
+ this.elementRef = elementRef;
66
+ this._value = [];
67
+ this.onChange = () => { };
68
+ this.onTouched = () => { };
1025
69
  }
1026
- set labelPosition(position) {
1027
- this._labelPosition = position === 'before' ? 'before' : 'after';
1028
- this._updateRadioButtonLabelPosition();
1029
- }
1030
- /**
1031
- * Lifecycle hook AfterContentInit. Used to set properties on child radios based on the radio group's properties.
1032
- * @ignore
1033
- */
1034
- ngAfterContentInit() {
1035
- this._updateRadioButtonNames();
1036
- this._updateRadioButtonDisabled();
1037
- this._updateRadioButtonRequired();
1038
- this._updateRadioButtonLabelPosition();
1039
- this._updateSelectedRadioFromValue();
1040
- }
1041
- /**
1042
- * Lifecycle hook OnInit. Used to subscribe to radio change messages from the radioService in order to set the 'selected' property
1043
- * of the radio group based on which radio was selected
1044
- * @ignore
1045
- */
1046
- ngOnInit() {
1047
- this.radioServiceSubscription = this._radioService.radioChangeMessage.subscribe(rcm => {
1048
- if (rcm && rcm.source && rcm.source.name === this.name && rcm.checked) {
1049
- this.selected = this._radios.find(r => r.uniqueId === rcm.source.uniqueId);
1050
- this.selectionChange.emit(rcm);
1051
- }
1052
- });
1053
- }
1054
- /**
1055
- * Lifecycle hook OnDestroy. Used to unsubscribe from the radio change messages.
1056
- * @ignore
1057
- */
1058
- ngOnDestroy() {
1059
- this.radioServiceSubscription.unsubscribe();
1060
- }
1061
- /**
1062
- * Updates the `selected` radio button from the internal _value state.
1063
- */
1064
- _updateSelectedRadioFromValue() {
1065
- // If the value already matches the selected radio, do nothing.
1066
- const isAlreadySelected = this._selected !== undefined && this._selected !== null && this._selected.value === this._value;
1067
- // need to wrap in setTimeout because _radios hasnt resolved yet when Input setter fires, need to get to next cycle in page lifecycle
1068
- setTimeout(() => {
1069
- if (this._radios && !isAlreadySelected) {
1070
- this._selected = null;
1071
- this._radios.forEach(radio => {
1072
- radio.checked = this.value === radio.value;
1073
- if (radio.checked) {
1074
- this._selected = radio;
1075
- }
1076
- });
1077
- }
1078
- });
1079
- }
1080
- /**
1081
- * Sets the selected radio to checked if it is not already checked
1082
- */
1083
- _setSelectedRadioToChecked() {
1084
- if (this.selected && !this.selected.checked) {
1085
- this.selected.checked = true;
1086
- }
1087
- }
1088
- /**
1089
- * Updates the 'name' property of the child radio buttons to match that of the group so they all function together
1090
- */
1091
- _updateRadioButtonNames() {
1092
- if (this._radios) {
1093
- this._radios.forEach(radio => {
1094
- radio.name = this.name;
1095
- radio.markForCheck();
1096
- });
1097
- }
1098
- }
1099
- /**
1100
- * Updates the 'disabled' property of the child radio buttons to match the disabled state of the radio group
1101
- */
1102
- _updateRadioButtonDisabled() {
1103
- if (this._radios) {
1104
- this._radios.forEach(radio => {
1105
- radio.required = this._required;
1106
- radio.markForCheck();
1107
- });
1108
- }
1109
- }
1110
- /**
1111
- * Updates the 'required' property of the child radio buttons to match the required state of the radio group
1112
- */
1113
- _updateRadioButtonRequired() {
1114
- if (this._radios) {
1115
- this._radios.forEach(radio => {
1116
- radio.required = this._required;
1117
- radio.markForCheck();
1118
- });
1119
- }
70
+ get value() {
71
+ return this._value;
1120
72
  }
1121
- /**
1122
- * Updates the 'labelPosition' property of the child radio buttons to match the labelPosition state of the radio group
1123
- */
1124
- _updateRadioButtonLabelPosition() {
1125
- if (this._radios) {
1126
- this._radios.forEach(radio => {
1127
- radio.labelPosition = this._labelPosition;
1128
- radio.markForCheck();
1129
- });
73
+ set value(val) {
74
+ if (val && val !== this._value) {
75
+ this._setValue(val);
76
+ this.elementRef.nativeElement.value = JSON.stringify(val);
1130
77
  }
1131
78
  }
1132
- /**
1133
- * Boolean indicating if the radiobutton is required and not checked
1134
- * @ignore
1135
- */
1136
- hasError() {
1137
- const hasSelectedRadio = this._radios.some(r => r.checked);
1138
- return this.required && !hasSelectedRadio;
1139
- }
1140
- /**
1141
- * Implemented as part of ControlValueAccessor.
1142
- * @param value The model bound property, i.e. the value of checked
1143
- * @ignore
1144
- */
1145
79
  writeValue(value) {
1146
- if ((value !== undefined) && (value !== null)) {
1147
- this.selected = value;
1148
- this._changeDetector.detectChanges();
80
+ if (value) {
81
+ this.value = value;
1149
82
  }
1150
83
  }
1151
- /**
1152
- * Implemented as part of ControlValueAccessor.
1153
- * @param fn The function to call on change. Provided by ControlValueAccessor
1154
- * @ignore
1155
- */
1156
84
  registerOnChange(fn) {
1157
- this._propagateChange = fn;
85
+ this.onChange = fn;
1158
86
  }
1159
- /**
1160
- * Implemented as part of ControlValueAccessor.
1161
- * @param fn The function to call on touch. Provided by ControlValueAccessor
1162
- * @ignore
1163
- */
1164
87
  registerOnTouched(fn) {
1165
- this._onTouchedCallback = fn;
1166
- }
1167
- ;
1168
- }
1169
- /**
1170
- * Used to generate unique Id for this component
1171
- * @ignore
1172
- */
1173
- GoARadioGroupComponent.idNum = 0;
1174
- GoARadioGroupComponent.decorators = [
1175
- { type: Component, args: [{
1176
- selector: 'goa-radio-group',
1177
- 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",
1178
- providers: [
1179
- GOA_RADIO_GROUP_CONTROL_VALUE_ACCESSOR,
1180
- { provide: GOA_RADIO_GROUP, useExisting: GoARadioGroupComponent }
1181
- ],
1182
- changeDetection: ChangeDetectionStrategy.OnPush,
1183
- 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}"]
1184
- },] }
1185
- ];
1186
- GoARadioGroupComponent.ctorParameters = () => [
1187
- { type: ChangeDetectorRef },
1188
- { type: GoARadioService }
1189
- ];
1190
- GoARadioGroupComponent.propDecorators = {
1191
- _radios: [{ type: ContentChildren, args: [forwardRef(() => GoARadioComponent), { descendants: true },] }],
1192
- title: [{ type: Input }],
1193
- helperText: [{ type: Input }],
1194
- requiredErrorMessage: [{ type: Input }],
1195
- name: [{ type: Input }],
1196
- value: [{ type: Input }],
1197
- selected: [{ type: Input }],
1198
- disabled: [{ type: Input }],
1199
- required: [{ type: Input }],
1200
- labelPosition: [{ type: Input }],
1201
- selectionChange: [{ type: Output }]
1202
- };
1203
-
1204
- /**
1205
- * Callout component to describe important changes or facts.
1206
- * selector: goa-callout
1207
- */
1208
- class GoACalloutComponent {
1209
- constructor() {
1210
- /**
1211
- * The type of the callout, changes stylings and icons.
1212
- */
1213
- this.type = 'information';
1214
- }
1215
- /**
1216
- * @ignore
1217
- */
1218
- ngOnInit() {
1219
- if (this.title === undefined || this.title === null) {
1220
- throw new TypeError(`Input 'title' is required.`);
1221
- }
1222
- }
1223
- }
1224
- GoACalloutComponent.decorators = [
1225
- { type: Component, args: [{
1226
- selector: 'goa-callout',
1227
- 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",
1228
- 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}"]
1229
- },] }
1230
- ];
1231
- GoACalloutComponent.ctorParameters = () => [];
1232
- GoACalloutComponent.propDecorators = {
1233
- type: [{ type: Input }],
1234
- title: [{ type: Input }]
1235
- };
1236
-
1237
- /**
1238
- * Government of Alberta styled notification, comes in 4 variants: emergency, event, information, important.
1239
- * Can set the message and optionally a link url.
1240
- * selector: goa-notification
1241
- */
1242
- class GoANotificationComponent {
1243
- constructor(_changeDetectorRef) {
1244
- this._changeDetectorRef = _changeDetectorRef;
1245
- /**
1246
- * Whether or not the notification has been dismissed.
1247
- * @ignore
1248
- */
1249
- this._isDismissed = false;
1250
- /**
1251
- * The type of the notification, changes stylings and icons.
1252
- */
1253
- this.type = 'information';
1254
- /**
1255
- * Can the notification be dismissed?
1256
- */
1257
- this.isDismissable = true;
1258
- /**
1259
- * Event emitted when the notification has been dismissed by the user.
1260
- */
1261
- this.dismiss = new EventEmitter();
1262
- }
1263
- /**
1264
- * @ignore
1265
- */
1266
- ngOnInit() {
1267
- }
1268
- /**
1269
- * @ignore
1270
- */
1271
- dismissClick() {
1272
- this._isDismissed = true;
1273
- this._changeDetectorRef.detectChanges();
1274
- this.dismiss.emit();
1275
- }
1276
- }
1277
- GoANotificationComponent.decorators = [
1278
- { type: Component, args: [{
1279
- selector: 'goa-notification',
1280
- 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",
1281
- 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%}"]
1282
- },] }
1283
- ];
1284
- GoANotificationComponent.ctorParameters = () => [
1285
- { type: ChangeDetectorRef }
1286
- ];
1287
- GoANotificationComponent.propDecorators = {
1288
- type: [{ type: Input }],
1289
- message: [{ type: Input }],
1290
- notificationUrl: [{ type: Input }],
1291
- isDismissable: [{ type: Input }],
1292
- dismiss: [{ type: Output }]
1293
- };
1294
-
1295
- /**
1296
- * Government of Alberta styled notification banner. Contains one or more notifications.
1297
- * selector: goa-notification-banner
1298
- */
1299
- class GoANotificationBannerComponent {
1300
- constructor() {
1301
- /**
1302
- * The accessibility title for the notification banner. Is not displayed.
1303
- */
1304
- this.title = 'Notifications';
1305
- }
1306
- /**
1307
- * @ignore
1308
- */
1309
- ngOnInit() {
1310
- }
1311
- }
1312
- GoANotificationBannerComponent.decorators = [
1313
- { type: Component, args: [{
1314
- selector: 'goa-notification-banner',
1315
- 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",
1316
- 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}"]
1317
- },] }
1318
- ];
1319
- GoANotificationBannerComponent.ctorParameters = () => [];
1320
- GoANotificationBannerComponent.propDecorators = {
1321
- title: [{ type: Input }],
1322
- _notifications: [{ type: ContentChildren, args: [GoANotificationComponent, { descendants: false },] }]
1323
- };
1324
-
1325
- class GoASkeletonImageContentComponent {
1326
- constructor() {
1327
- this.rows = 1;
1328
- this.arr = Array;
1329
- }
1330
- }
1331
- GoASkeletonImageContentComponent.decorators = [
1332
- { type: Component, args: [{
1333
- selector: 'goa-skeleton-image-content',
1334
- 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",
1335
- 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}"]
1336
- },] }
1337
- ];
1338
- GoASkeletonImageContentComponent.ctorParameters = () => [];
1339
- GoASkeletonImageContentComponent.propDecorators = {
1340
- rows: [{ type: Input }]
1341
- };
1342
-
1343
- class GoASkeletonElementComponent {
1344
- constructor() {
1345
- this.type = 'text';
1346
- }
1347
- get elementClass() {
1348
- return `skeleton ${this.type}`;
1349
- }
1350
- }
1351
- GoASkeletonElementComponent.decorators = [
1352
- { type: Component, args: [{
1353
- selector: 'goa-skeleton-element',
1354
- template: "<div [ngClass]=\"elementClass\"></div>",
1355
- 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}"]
1356
- },] }
1357
- ];
1358
- GoASkeletonElementComponent.ctorParameters = () => [];
1359
- GoASkeletonElementComponent.propDecorators = {
1360
- type: [{ type: Input }]
1361
- };
1362
-
1363
- /**
1364
- * Header component used for Government of Alberta cards.
1365
- * Put header content inside of component and it will project to the header section of the card.
1366
- * selector: goa-card-header
1367
- * @example <goa-card><goa-card-header>My content</goa-card-header></goa-card>
1368
- */
1369
- class GoACardHeaderComponent {
1370
- constructor() { }
1371
- /**
1372
- * @ignore
1373
- */
1374
- ngOnInit() {
1375
- }
1376
- }
1377
- GoACardHeaderComponent.decorators = [
1378
- { type: Component, args: [{
1379
- selector: 'goa-card-header',
1380
- template: "<ng-container>\n <ng-content></ng-content>\n</ng-container>",
1381
- styles: [""]
1382
- },] }
1383
- ];
1384
- GoACardHeaderComponent.ctorParameters = () => [];
1385
-
1386
- /**
1387
- * Footer component used for Government of Alberta cards.
1388
- * Put footer content inside of component and it will project to the confootertent section of the card.
1389
- * selector: goa-card-footer
1390
- * @example <goa-card><goa-card-footer>My content</goa-card-footer></goa-card>
1391
- */
1392
- class GoACardFooterComponent {
1393
- constructor() { }
1394
- /**
1395
- * @ignore
1396
- */
1397
- ngOnInit() {
1398
- }
1399
- }
1400
- GoACardFooterComponent.decorators = [
1401
- { type: Component, args: [{
1402
- selector: 'goa-card-footer',
1403
- template: "<ng-container>\n <ng-content></ng-content>\n</ng-container>",
1404
- styles: [""]
1405
- },] }
1406
- ];
1407
- GoACardFooterComponent.ctorParameters = () => [];
1408
-
1409
- /**
1410
- * cardImage image component used for Government of Alberta cards.
1411
- * It will project to the content section of the card.
1412
- * selector: goa-card-thumb-image
1413
- * @example <goa-card><goa-card-thumb-image url="" alt=""></goa-card-thumb-image></goa-card>
1414
- */
1415
- class GoACardThumbImageComponent {
1416
- constructor() { }
1417
- /**
1418
- * @ignore
1419
- */
1420
- ngOnInit() { }
1421
- }
1422
- GoACardThumbImageComponent.decorators = [
1423
- { type: Component, args: [{
1424
- selector: 'goa-card-thumb-image',
1425
- template: "<ng-container>\n <img src=\"{{url}}\" [attr.alt]=\"alt\">\n</ng-container>",
1426
- styles: [":host iframe,:host img{position:absolute;top:0;left:0;width:100%;height:100%;border:none}"]
1427
- },] }
1428
- ];
1429
- GoACardThumbImageComponent.ctorParameters = () => [];
1430
- GoACardThumbImageComponent.propDecorators = {
1431
- url: [{ type: Input }],
1432
- alt: [{ type: Input }]
1433
- };
1434
-
1435
- /**
1436
- * Content component used for Government of Alberta cards.
1437
- * Put content inside of component and it will project to the content section of the card.
1438
- * selector: goa-card-content
1439
- * @example <goa-card><goa-card-content>My content</goa-card-content></goa-card>
1440
- */
1441
- class GoACardContentComponent {
1442
- constructor() { }
1443
- /**
1444
- * @ignore
1445
- */
1446
- ngOnInit() {
1447
- }
1448
- }
1449
- GoACardContentComponent.decorators = [
1450
- { type: Component, args: [{
1451
- selector: 'goa-card-content',
1452
- template: "<ng-container>\n <ng-content></ng-content>\n</ng-container>",
1453
- styles: [""]
1454
- },] }
1455
- ];
1456
- GoACardContentComponent.ctorParameters = () => [];
1457
-
1458
- /**
1459
- * Card component with Government of Alberta styling.
1460
- * Place desired sub-components (goa-card-thumb-image, goa-card-header, goa-card-content, goa-card-footer) inside of content.
1461
- * selector: goa-card
1462
- */
1463
- class GoACardComponent {
1464
- constructor() {
1465
- /**
1466
- * What percentage of container width to take.
1467
- */
1468
- this.cardSize = 'full';
1469
- }
1470
- /**
1471
- * @ignore
1472
- */
1473
- ngOnInit() {
1474
- }
1475
- }
1476
- GoACardComponent.decorators = [
1477
- { type: Component, args: [{
1478
- selector: 'goa-card',
1479
- 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",
1480
- 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}"]
1481
- },] }
1482
- ];
1483
- GoACardComponent.ctorParameters = () => [];
1484
- GoACardComponent.propDecorators = {
1485
- cardSize: [{ type: Input }],
1486
- titleUrl: [{ type: Input }],
1487
- isSkeleton: [{ type: Input }]
1488
- };
1489
-
1490
- /**
1491
- * A wrapper/group for a set of card display
1492
- */
1493
- class GoACardGroupComponent {
1494
- constructor() { }
1495
- /* eslint-disable @angular-eslint/no-empty-lifecycle-method */
1496
- ngOnInit() { }
1497
- }
1498
- GoACardGroupComponent.decorators = [
1499
- { type: Component, args: [{
1500
- selector: 'goa-card-group',
1501
- 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",
1502
- 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}"]
1503
- },] }
1504
- ];
1505
- GoACardGroupComponent.ctorParameters = () => [];
1506
- GoACardGroupComponent.propDecorators = {
1507
- layout: [{ type: Input }],
1508
- title: [{ type: Input }],
1509
- cardItems: [{ type: Input }]
1510
- };
1511
-
1512
- class GoAHeroBannerContentComponent {
1513
- constructor() { }
1514
- ngOnInit() {
1515
- }
1516
- }
1517
- GoAHeroBannerContentComponent.decorators = [
1518
- { type: Component, args: [{
1519
- selector: 'goa-hero-banner-content',
1520
- template: "<ng-container>\n <p class=\"goa-hero-banner-content\" role=\"note\">\n <ng-content></ng-content>\n </p>\n</ng-container>\n",
1521
- 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}"]
1522
- },] }
1523
- ];
1524
- GoAHeroBannerContentComponent.ctorParameters = () => [];
1525
-
1526
- class GoAHeroBannerLinkComponent {
1527
- constructor() { }
1528
- ngOnInit() {
1529
- }
1530
- }
1531
- GoAHeroBannerLinkComponent.decorators = [
1532
- { type: Component, args: [{
1533
- selector: 'goa-hero-banner-link',
1534
- 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",
1535
- 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}"]
1536
- },] }
1537
- ];
1538
- GoAHeroBannerLinkComponent.ctorParameters = () => [];
1539
- GoAHeroBannerLinkComponent.propDecorators = {
1540
- url: [{ type: Input }]
1541
- };
1542
-
1543
- class GoAHeroBannerComponent {
1544
- constructor() { }
1545
- ngOnInit() {
88
+ this.onTouched = fn;
1546
89
  }
1547
- }
1548
- GoAHeroBannerComponent.decorators = [
1549
- { type: Component, args: [{
1550
- selector: 'goa-hero-banner',
1551
- 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",
1552
- 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}"]
1553
- },] }
1554
- ];
1555
- GoAHeroBannerComponent.ctorParameters = () => [];
1556
- GoAHeroBannerComponent.propDecorators = {
1557
- title: [{ type: Input }],
1558
- backgroundUrl: [{ type: Input }]
1559
- };
1560
-
1561
- /**
1562
- * A page load indicator component with Government of Alberta styling.
1563
- * selector: goa-page-load-indicator
1564
- */
1565
- class GoAPageLoadIndicatorComponent {
1566
- constructor() {
1567
- /**
1568
- * Sets the page loader visibility state.
1569
- */
1570
- this.visible = false;
1571
- /**
1572
- * The type of page loader, deterministic and indeterministic.
1573
- */
1574
- this.type = 'infinite';
1575
- /**
1576
- * The message to display while loading.
1577
- */
1578
- this.message = '';
1579
- /**
1580
- * Sets the percentage value of the page loader while set to progress type, 0 - 100 percent.
1581
- */
1582
- this.value = 0;
1583
- /**
1584
- * Sets the page to locked and does not accept user input. When not set the component
1585
- * can be used as a child element without blocking user input.
1586
- */
1587
- this.pagelock = true;
1588
- /**
1589
- * Sets the progress indicator display type size.
1590
- */
1591
- this.displayType = 'large';
1592
- /**
1593
- * Set defaults
1594
- */
1595
- this.strokeDashoffsetDefault = 280;
1596
- this.progressMaxValue = 283;
1597
- this.strokeDashoffset = 0;
1598
- }
1599
- ngOnInit() {
1600
- if (this.type !== 'progress') {
1601
- this.strokeDashoffset = this.strokeDashoffsetDefault;
1602
- }
1603
- }
1604
- ngOnChanges(changes) {
1605
- if (changes.visible) {
1606
- this.blockScrollingToggle(changes.visible.currentValue);
1607
- }
1608
- if (changes.value) {
1609
- if (this.type === 'progress') {
1610
- this.setProgress(changes.value.currentValue);
1611
- }
1612
- }
1613
- }
1614
- /**
1615
- * Toggles the page scrolling based on page load indicator's visibility.
1616
- * @param isBlock The flag to enable/disable page scroll.
1617
- * @ignore
1618
- */
1619
- blockScrollingToggle(isBlock) {
1620
- if (!isBlock || !this.pagelock) {
1621
- document.body.style.removeProperty('height');
1622
- document.body.style.removeProperty('overflow');
1623
- }
1624
- else {
1625
- document.body.style.height = '100%';
1626
- document.body.style.overflow = 'hidden';
1627
- }
1628
- }
1629
- /**
1630
- * Blocks the keyboard input when page load indicator is visible.
1631
- * @ignore
1632
- */
1633
- disableKeyboardInputHandler(event) {
1634
- if (this.visible) {
1635
- event.returnValue = false;
1636
- event.preventDefault();
1637
- }
1638
- }
1639
- ngOnDestroy() {
1640
- this.blockScrollingToggle(false);
1641
- }
1642
- setProgress(progress) {
1643
- if (this.type !== 'progress') {
1644
- return;
1645
- }
1646
- ;
1647
- if (progress === 0) {
1648
- this.strokeDashoffset = this.progressMaxValue;
90
+ listenForValueChange(value) {
91
+ if (!value) {
92
+ this._setValue(undefined);
1649
93
  return;
1650
94
  }
1651
- if (progress >= 100) {
1652
- return;
1653
- }
1654
- const value = this.progressMaxValue - Math.round(this.progressMaxValue * progress / 100);
1655
- this.strokeDashoffset = value;
1656
- }
1657
- }
1658
- GoAPageLoadIndicatorComponent.decorators = [
1659
- { type: Component, args: [{
1660
- selector: 'goa-page-load-indicator',
1661
- 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",
1662
- 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%}"]
1663
- },] }
1664
- ];
1665
- GoAPageLoadIndicatorComponent.ctorParameters = () => [];
1666
- GoAPageLoadIndicatorComponent.propDecorators = {
1667
- visible: [{ type: Input }],
1668
- type: [{ type: Input }],
1669
- message: [{ type: Input }],
1670
- value: [{ type: Input }],
1671
- pagelock: [{ type: Input }],
1672
- displayType: [{ type: Input }],
1673
- disableKeyboardInputHandler: [{ type: HostListener, args: ['document:keydown', ['$event'],] }]
1674
- };
1675
-
1676
- /**
1677
- * A page load indicator component with Government of Alberta styling.
1678
- * selector: goa-element-load-indicator
1679
- */
1680
- class GoAElementLoadIndicatorComponent {
1681
- constructor() {
1682
- /**
1683
- * Sets the page loader visibility state.
1684
- */
1685
- this.visible = true;
1686
- /**
1687
- * The diameter of the loader in pixels.
1688
- */
1689
- this.size = 'default';
1690
- /**
1691
- * The base color of the spinner.
1692
- */
1693
- this.baseColour = '#c8eef9';
1694
- /**
1695
- * The spinner color of the spinner.
1696
- */
1697
- this.spinnerColour = '#0070c4';
1698
- this.radius = this.size === 'small' ? 16 : 18;
1699
- this.innerRadius = this.radius - 4;
1700
- this.diameter = this.radius * 2;
1701
- this.dashArray = this.innerRadius * Math.PI * 2;
1702
- this.dashOffset = this.innerRadius * Math.PI * 0.5;
1703
- this.viewBox = `0 0 ${this.diameter} ${this.diameter}`;
1704
- }
1705
- /**
1706
- * @ignore
1707
- */
1708
- ngOnChanges(changes) {
1709
- if (changes.size) {
1710
- this.radius = changes.size.currentValue === 'small' ? 16 : 18;
1711
- this.innerRadius = this.radius - 4;
1712
- this.diameter = this.radius * 2;
1713
- this.viewBox = `0 0 ${this.diameter} ${this.diameter}`;
1714
- this.dashArray = this.innerRadius * Math.PI * 2;
1715
- this.dashOffset = this.innerRadius * Math.PI * 0.5;
1716
- }
1717
- }
1718
- /**
1719
- * @ignore
1720
- */
1721
- ngOnInit() { }
1722
- }
1723
- GoAElementLoadIndicatorComponent.decorators = [
1724
- { type: Component, args: [{
1725
- selector: 'goa-element-load-indicator',
1726
- 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",
1727
- 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%}"]
1728
- },] }
1729
- ];
1730
- GoAElementLoadIndicatorComponent.ctorParameters = () => [];
1731
- GoAElementLoadIndicatorComponent.propDecorators = {
1732
- visible: [{ type: Input }],
1733
- size: [{ type: Input }],
1734
- baseColour: [{ type: Input }],
1735
- spinnerColour: [{ type: Input }]
1736
- };
95
+ try {
96
+ this.value = JSON.parse(value);
97
+ }
98
+ catch (e) {
99
+ // we still need to trigger the events to prevent any previous valid value to remain set.
100
+ const v = value.match(/^[\w\s,]*$/) ? value.split(",") : undefined;
101
+ this._setValue(v);
102
+ }
103
+ }
104
+ _setValue(value) {
105
+ this._value = value;
106
+ this.onChange(value);
107
+ this.onTouched();
108
+ }
109
+ }
110
+ ValueListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ValueListDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
111
+ ValueListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: ValueListDirective, selector: "[goaValueList]", host: { listeners: { "_change": "listenForValueChange($event.detail.value)" } }, providers: [
112
+ {
113
+ provide: NG_VALUE_ACCESSOR,
114
+ useExisting: forwardRef(() => ValueListDirective),
115
+ multi: true,
116
+ },
117
+ ], ngImport: i0 });
118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ValueListDirective, decorators: [{
119
+ type: Directive,
120
+ args: [{
121
+ selector: "[goaValueList]",
122
+ providers: [
123
+ {
124
+ provide: NG_VALUE_ACCESSOR,
125
+ useExisting: forwardRef(() => ValueListDirective),
126
+ multi: true,
127
+ },
128
+ ],
129
+ }]
130
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { listenForValueChange: [{
131
+ type: HostListener,
132
+ args: ["_change", ["$event.detail.value"]]
133
+ }] } });
1737
134
 
1738
135
  class AngularComponentsModule {
1739
136
  }
1740
- AngularComponentsModule.decorators = [
1741
- { type: NgModule, args: [{
1742
- imports: [CommonModule, OverlayModule],
1743
- exports: [
1744
- FormsModule,
1745
- OverlayModule,
1746
- CommonModule,
1747
- GoAButtonComponent,
1748
- GoAMicrositeLogoComponent,
1749
- GoAHeaderComponent,
1750
- GoAButtonLinkComponent,
1751
- GoAOptionComponent,
1752
- GoADropdownComponent,
1753
- GoAOptionGroupComponent,
1754
- GoACheckboxComponent,
1755
- GoACalloutComponent,
1756
- GoACardGroupComponent,
1757
- GoANotificationComponent,
1758
- GoANotificationBannerComponent,
1759
- GoACardComponent,
1760
- GoACardHeaderComponent,
1761
- GoACardFooterComponent,
1762
- GoACardContentComponent,
1763
- GoACardThumbImageComponent,
1764
- GoARadioComponent,
1765
- GoARadioGroupComponent,
1766
- GoAHeroBannerComponent,
1767
- GoAHeroBannerContentComponent,
1768
- GoAHeroBannerLinkComponent,
1769
- GoAPageLoadIndicatorComponent,
1770
- GoASkeletonImageContentComponent,
1771
- GoASkeletonElementComponent,
1772
- GoAElementLoadIndicatorComponent,
1773
- ],
1774
- declarations: [
1775
- GoAButtonComponent,
1776
- GoAMicrositeLogoComponent,
1777
- GoAHeaderComponent,
1778
- GoAButtonLinkComponent,
1779
- GoAOptionComponent,
1780
- GoADropdownComponent,
1781
- GoAOptionGroupComponent,
1782
- GoACheckboxComponent,
1783
- GoACalloutComponent,
1784
- GoACardGroupComponent,
1785
- GoANotificationComponent,
1786
- GoANotificationBannerComponent,
1787
- GoACardComponent,
1788
- GoACardHeaderComponent,
1789
- GoACardFooterComponent,
1790
- GoACardContentComponent,
1791
- GoACardThumbImageComponent,
1792
- GoARadioComponent,
1793
- GoARadioGroupComponent,
1794
- GoAHeroBannerComponent,
1795
- GoAHeroBannerContentComponent,
1796
- GoAHeroBannerLinkComponent,
1797
- GoAPageLoadIndicatorComponent,
1798
- GoASkeletonImageContentComponent,
1799
- GoASkeletonElementComponent,
1800
- GoAElementLoadIndicatorComponent,
1801
- ],
1802
- providers: [GoARadioService],
1803
- },] }
1804
- ];
1805
-
1806
- class GoACheckboxChange {
1807
- }
1808
-
1809
- class GoABadgeComponent {
1810
- constructor() {
1811
- this.type = 'light';
1812
- }
1813
- get badgeClass() {
1814
- return `badge-${this.type}`;
1815
- }
1816
- /* eslint-disable @angular-eslint/no-empty-lifecycle-method */
1817
- ngOnInit() { }
1818
- }
1819
- GoABadgeComponent.decorators = [
1820
- { type: Component, args: [{
1821
- selector: 'goa-badge',
1822
- 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",
1823
- changeDetection: ChangeDetectionStrategy.OnPush,
1824
- 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}"]
1825
- },] }
1826
- ];
1827
- GoABadgeComponent.ctorParameters = () => [];
1828
- GoABadgeComponent.propDecorators = {
1829
- type: [{ type: Input }]
1830
- };
1831
-
1832
- class GoAAppVersionHeaderComponent {
1833
- constructor() {
1834
- this.isProdEnvironment = false;
1835
- this.environment = '';
1836
- this.version = '';
1837
- this.closed = new EventEmitter();
1838
- }
1839
- ngOnInit() {
1840
- }
1841
- onCloseClick() {
1842
- this.closed.next(true);
1843
- }
1844
- }
1845
- GoAAppVersionHeaderComponent.decorators = [
1846
- { type: Component, args: [{
1847
- selector: 'goa-app-version-header',
1848
- 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",
1849
- changeDetection: ChangeDetectionStrategy.OnPush,
1850
- 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}"]
1851
- },] }
1852
- ];
1853
- GoAAppVersionHeaderComponent.ctorParameters = () => [];
1854
- GoAAppVersionHeaderComponent.propDecorators = {
1855
- isProdEnvironment: [{ type: Input }],
1856
- environment: [{ type: Input }],
1857
- version: [{ type: Input }],
1858
- closed: [{ type: Output }]
1859
- };
1860
-
1861
- class GoANumberInputComponent {
1862
- constructor() {
1863
- this._value = 0;
1864
- /**
1865
- * Sets the step value that is used when incrementing / decrementing
1866
- *
1867
- * @memberof GoANumberInputComponent
1868
- */
1869
- this.step = 1;
1870
- /**
1871
- * An event that fires whenever the value is changed
1872
- *
1873
- * @type {EventEmitter<number>}
1874
- * @memberof GoANumberInputComponent
1875
- */
1876
- this.valueChanged = new EventEmitter();
1877
- }
1878
- /**
1879
- * The value of the NumberInput
1880
- *
1881
- * @memberof GoANumberInputComponent
1882
- */
1883
- set value(val) {
1884
- const newVal = this.clampValue(val);
1885
- if (this._value !== newVal) {
1886
- this.valueChanged.emit(newVal);
1887
- this._value = newVal;
1888
- }
1889
- }
1890
- get value() {
1891
- return this._value;
1892
- }
1893
- /**
1894
- * Sets the minimum value that the number input can take
1895
- *
1896
- * @memberof GoANumberInputComponent
1897
- */
1898
- set min(min) {
1899
- this._min = min;
1900
- this.value = this._value;
1901
- }
1902
- get min() {
1903
- return this._min;
1904
- }
1905
- /**
1906
- * Sets the maximum value that the number input can take
1907
- *
1908
- * @memberof GoANumberInputComponent
1909
- */
1910
- set max(max) {
1911
- this._max = max;
1912
- this.value = this._value;
1913
- }
1914
- get max() {
1915
- return this._max;
1916
- }
1917
- /**
1918
- * Increment the number input
1919
- *
1920
- * @memberof GoANumberInputComponent
1921
- */
1922
- increment() {
1923
- this.input.stepUp();
1924
- this.updateFromInput();
1925
- }
1926
- /**
1927
- * Decrement the number input
1928
- *
1929
- * @memberof GoANumberInputComponent
1930
- */
1931
- decrement() {
1932
- this.input.stepDown();
1933
- this.updateFromInput();
1934
- }
1935
- updateFromInput() {
1936
- const inputVal = this.input.valueAsNumber;
1937
- this.value = inputVal;
1938
- // if the value has been clamped then update the input
1939
- if (inputVal !== this.value) {
1940
- this.input.valueAsNumber = this.value;
1941
- }
1942
- }
1943
- get input() {
1944
- return this.inputElement.nativeElement;
1945
- }
1946
- clampValue(val) {
1947
- if (this.max !== undefined) {
1948
- val = Math.min(this.max, val);
1949
- }
1950
- if (this.min !== undefined) {
1951
- val = Math.max(val, this.min);
1952
- }
1953
- return val;
1954
- }
1955
- }
1956
- GoANumberInputComponent.decorators = [
1957
- { type: Component, args: [{
1958
- selector: 'goa-number-input',
1959
- 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",
1960
- 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}"]
1961
- },] }
1962
- ];
1963
- GoANumberInputComponent.propDecorators = {
1964
- inputElement: [{ type: ViewChild, args: ['input',] }],
1965
- name: [{ type: Input }],
1966
- disabled: [{ type: Input }],
1967
- step: [{ type: Input }],
1968
- valueChanged: [{ type: Output }],
1969
- value: [{ type: Input }],
1970
- min: [{ type: Input }],
1971
- max: [{ type: Input }]
1972
- };
1973
-
1974
- class ExperimentalComponentsModule {
1975
- }
1976
- ExperimentalComponentsModule.decorators = [
1977
- { type: NgModule, args: [{
1978
- imports: [
1979
- CommonModule,
1980
- AngularComponentsModule
1981
- ],
1982
- exports: [
1983
- GoABadgeComponent,
1984
- GoAAppVersionHeaderComponent,
1985
- GoANumberInputComponent,
1986
- ],
1987
- declarations: [
1988
- GoABadgeComponent,
1989
- GoAAppVersionHeaderComponent,
1990
- GoANumberInputComponent,
1991
- ],
1992
- providers: [],
1993
- },] }
1994
- ];
137
+ AngularComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AngularComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
138
+ AngularComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AngularComponentsModule, declarations: [ValueDirective, ValueListDirective], exports: [ValueDirective, ValueListDirective] });
139
+ AngularComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AngularComponentsModule });
140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AngularComponentsModule, decorators: [{
141
+ type: NgModule,
142
+ args: [{
143
+ declarations: [ValueDirective, ValueListDirective],
144
+ exports: [ValueDirective, ValueListDirective],
145
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
146
+ }]
147
+ }] });
1995
148
 
1996
149
  /**
1997
150
  * Generated bundle index. Do not edit.
1998
151
  */
1999
152
 
2000
- export { AngularComponentsModule, ExperimentalComponentsModule, GOA_CHECKBOX_CONTROL_VALUE_ACCESSOR, GOA_RADIO_CONTROL_VALUE_ACCESSOR, GOA_RADIO_GROUP, GOA_RADIO_GROUP_CONTROL_VALUE_ACCESSOR, GoAAppVersionHeaderComponent, GoABadgeComponent, GoAButtonComponent, GoAButtonLinkComponent, GoACalloutComponent, GoACardComponent, GoACardContentComponent, GoACardFooterComponent, GoACardGroupComponent, GoACardHeaderComponent, GoACardThumbImageComponent, GoACheckboxChange, GoACheckboxComponent, GoADropdownComponent, GoAElementLoadIndicatorComponent, GoAHeaderComponent, GoAHeroBannerComponent, GoAHeroBannerContentComponent, GoAHeroBannerLinkComponent, GoAMicrositeLogoComponent, GoANotificationBannerComponent, GoANotificationComponent, GoANumberInputComponent, GoAOptionComponent, GoAOptionGroupComponent, GoAPageLoadIndicatorComponent, GoARadioChange, GoARadioComponent, GoARadioGroupComponent, GoARadioService, GoASkeletonElementComponent, GoASkeletonImageContentComponent };
153
+ export { AngularComponentsModule, ValueDirective, ValueListDirective };
2001
154
  //# sourceMappingURL=abgov-angular-components.js.map