@skyux/indicators 5.9.4 → 6.0.0-beta.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 (171) hide show
  1. package/documentation.json +4 -4
  2. package/esm2020/index.mjs +38 -0
  3. package/esm2020/lib/modules/alert/alert.component.mjs +56 -0
  4. package/esm2020/lib/modules/alert/alert.module.mjs +38 -0
  5. package/esm2020/lib/modules/chevron/chevron.component.mjs +62 -0
  6. package/esm2020/lib/modules/chevron/chevron.module.mjs +38 -0
  7. package/esm2020/lib/modules/expansion-indicator/expansion-indicator.component.mjs +31 -0
  8. package/esm2020/lib/modules/expansion-indicator/expansion-indicator.module.mjs +19 -0
  9. package/esm2020/lib/modules/help-inline/help-inline.component.mjs +26 -0
  10. package/esm2020/lib/modules/help-inline/help-inline.module.mjs +38 -0
  11. package/esm2020/lib/modules/icon/icon-class-list.pipe.mjs +38 -0
  12. package/esm2020/lib/modules/icon/icon-resolver.service.mjs +42 -0
  13. package/esm2020/lib/modules/icon/icon-stack-item.mjs +2 -0
  14. package/esm2020/lib/modules/icon/icon-stack.component.mjs +19 -0
  15. package/esm2020/lib/modules/icon/icon.component.mjs +32 -0
  16. package/esm2020/lib/modules/icon/icon.module.mjs +21 -0
  17. package/esm2020/lib/modules/icon/types/icon-type.mjs +2 -0
  18. package/esm2020/lib/modules/icon/types/icon-variant-type.mjs +2 -0
  19. package/esm2020/lib/modules/key-info/key-info-label.component.mjs +18 -0
  20. package/esm2020/lib/modules/key-info/key-info-value.component.mjs +18 -0
  21. package/esm2020/lib/modules/key-info/key-info.component.mjs +22 -0
  22. package/esm2020/lib/modules/key-info/key-info.module.mjs +32 -0
  23. package/esm2020/lib/modules/label/label-type.mjs +2 -0
  24. package/esm2020/lib/modules/label/label.component.mjs +34 -0
  25. package/esm2020/lib/modules/label/label.module.mjs +19 -0
  26. package/esm2020/lib/modules/shared/indicator-description-type.mjs +2 -0
  27. package/esm2020/lib/modules/shared/indicator-icon-type.mjs +2 -0
  28. package/esm2020/lib/modules/shared/indicator-icon-utility.mjs +40 -0
  29. package/esm2020/lib/modules/shared/indicator-icon.mjs +2 -0
  30. package/esm2020/lib/modules/shared/sky-indicators-resources.module.mjs +61 -0
  31. package/esm2020/lib/modules/status-indicator/status-indicator.component.mjs +94 -0
  32. package/esm2020/lib/modules/status-indicator/status-indicator.module.mjs +34 -0
  33. package/esm2020/lib/modules/text-highlight/text-highlight.directive.mjs +153 -0
  34. package/esm2020/lib/modules/text-highlight/text-highlight.module.mjs +18 -0
  35. package/esm2020/lib/modules/tokens/token.component.mjs +107 -0
  36. package/esm2020/lib/modules/tokens/tokens.component.mjs +296 -0
  37. package/esm2020/lib/modules/tokens/tokens.module.mjs +35 -0
  38. package/esm2020/lib/modules/tokens/types/token-selected-event-args.mjs +2 -0
  39. package/esm2020/lib/modules/tokens/types/token.mjs +2 -0
  40. package/esm2020/lib/modules/tokens/types/tokens-message-type.mjs +24 -0
  41. package/esm2020/lib/modules/tokens/types/tokens-message.mjs +2 -0
  42. package/esm2020/lib/modules/wait/wait-adapter.service.mjs +201 -0
  43. package/esm2020/lib/modules/wait/wait-page-adapter.service.mjs +25 -0
  44. package/esm2020/lib/modules/wait/wait-page.component.mjs +19 -0
  45. package/esm2020/lib/modules/wait/wait.component.mjs +89 -0
  46. package/esm2020/lib/modules/wait/wait.module.mjs +21 -0
  47. package/esm2020/lib/modules/wait/wait.service.mjs +164 -0
  48. package/esm2020/skyux-indicators.mjs +5 -0
  49. package/esm2020/testing/alert-fixture.mjs +67 -0
  50. package/esm2020/testing/label-fixture.mjs +40 -0
  51. package/esm2020/testing/public-api.mjs +4 -0
  52. package/esm2020/testing/skyux-indicators-testing.mjs +5 -0
  53. package/esm2020/testing/wait-fixture.mjs +24 -0
  54. package/fesm2015/{skyux-indicators-testing.js → skyux-indicators-testing.mjs} +1 -1
  55. package/fesm2015/skyux-indicators-testing.mjs.map +1 -0
  56. package/fesm2015/skyux-indicators.mjs +1827 -0
  57. package/fesm2015/skyux-indicators.mjs.map +1 -0
  58. package/fesm2020/skyux-indicators-testing.mjs +135 -0
  59. package/fesm2020/skyux-indicators-testing.mjs.map +1 -0
  60. package/{fesm2015/skyux-indicators.js → fesm2020/skyux-indicators.mjs} +126 -188
  61. package/fesm2020/skyux-indicators.mjs.map +1 -0
  62. package/package.json +38 -14
  63. package/testing/package.json +5 -5
  64. package/bundles/skyux-indicators-testing.umd.js +0 -187
  65. package/bundles/skyux-indicators.umd.js +0 -2463
  66. package/esm2015/index.js +0 -38
  67. package/esm2015/index.js.map +0 -1
  68. package/esm2015/lib/modules/alert/alert.component.js +0 -60
  69. package/esm2015/lib/modules/alert/alert.component.js.map +0 -1
  70. package/esm2015/lib/modules/alert/alert.module.js +0 -38
  71. package/esm2015/lib/modules/alert/alert.module.js.map +0 -1
  72. package/esm2015/lib/modules/chevron/chevron.component.js +0 -66
  73. package/esm2015/lib/modules/chevron/chevron.component.js.map +0 -1
  74. package/esm2015/lib/modules/chevron/chevron.module.js +0 -38
  75. package/esm2015/lib/modules/chevron/chevron.module.js.map +0 -1
  76. package/esm2015/lib/modules/expansion-indicator/expansion-indicator.component.js +0 -35
  77. package/esm2015/lib/modules/expansion-indicator/expansion-indicator.component.js.map +0 -1
  78. package/esm2015/lib/modules/expansion-indicator/expansion-indicator.module.js +0 -19
  79. package/esm2015/lib/modules/expansion-indicator/expansion-indicator.module.js.map +0 -1
  80. package/esm2015/lib/modules/help-inline/help-inline.component.js +0 -30
  81. package/esm2015/lib/modules/help-inline/help-inline.component.js.map +0 -1
  82. package/esm2015/lib/modules/help-inline/help-inline.module.js +0 -38
  83. package/esm2015/lib/modules/help-inline/help-inline.module.js.map +0 -1
  84. package/esm2015/lib/modules/icon/icon-class-list.pipe.js +0 -38
  85. package/esm2015/lib/modules/icon/icon-class-list.pipe.js.map +0 -1
  86. package/esm2015/lib/modules/icon/icon-resolver.service.js +0 -42
  87. package/esm2015/lib/modules/icon/icon-resolver.service.js.map +0 -1
  88. package/esm2015/lib/modules/icon/icon-stack-item.js +0 -2
  89. package/esm2015/lib/modules/icon/icon-stack-item.js.map +0 -1
  90. package/esm2015/lib/modules/icon/icon-stack.component.js +0 -23
  91. package/esm2015/lib/modules/icon/icon-stack.component.js.map +0 -1
  92. package/esm2015/lib/modules/icon/icon.component.js +0 -37
  93. package/esm2015/lib/modules/icon/icon.component.js.map +0 -1
  94. package/esm2015/lib/modules/icon/icon.module.js +0 -21
  95. package/esm2015/lib/modules/icon/icon.module.js.map +0 -1
  96. package/esm2015/lib/modules/icon/types/icon-type.js +0 -2
  97. package/esm2015/lib/modules/icon/types/icon-type.js.map +0 -1
  98. package/esm2015/lib/modules/icon/types/icon-variant-type.js +0 -2
  99. package/esm2015/lib/modules/icon/types/icon-variant-type.js.map +0 -1
  100. package/esm2015/lib/modules/key-info/key-info-label.component.js +0 -18
  101. package/esm2015/lib/modules/key-info/key-info-label.component.js.map +0 -1
  102. package/esm2015/lib/modules/key-info/key-info-value.component.js +0 -18
  103. package/esm2015/lib/modules/key-info/key-info-value.component.js.map +0 -1
  104. package/esm2015/lib/modules/key-info/key-info.component.js +0 -26
  105. package/esm2015/lib/modules/key-info/key-info.component.js.map +0 -1
  106. package/esm2015/lib/modules/key-info/key-info.module.js +0 -32
  107. package/esm2015/lib/modules/key-info/key-info.module.js.map +0 -1
  108. package/esm2015/lib/modules/label/label-type.js +0 -2
  109. package/esm2015/lib/modules/label/label-type.js.map +0 -1
  110. package/esm2015/lib/modules/label/label.component.js +0 -38
  111. package/esm2015/lib/modules/label/label.component.js.map +0 -1
  112. package/esm2015/lib/modules/label/label.module.js +0 -19
  113. package/esm2015/lib/modules/label/label.module.js.map +0 -1
  114. package/esm2015/lib/modules/shared/indicator-description-type.js +0 -2
  115. package/esm2015/lib/modules/shared/indicator-description-type.js.map +0 -1
  116. package/esm2015/lib/modules/shared/indicator-icon-type.js +0 -2
  117. package/esm2015/lib/modules/shared/indicator-icon-type.js.map +0 -1
  118. package/esm2015/lib/modules/shared/indicator-icon-utility.js +0 -41
  119. package/esm2015/lib/modules/shared/indicator-icon-utility.js.map +0 -1
  120. package/esm2015/lib/modules/shared/indicator-icon.js +0 -2
  121. package/esm2015/lib/modules/shared/indicator-icon.js.map +0 -1
  122. package/esm2015/lib/modules/shared/sky-indicators-resources.module.js +0 -61
  123. package/esm2015/lib/modules/shared/sky-indicators-resources.module.js.map +0 -1
  124. package/esm2015/lib/modules/status-indicator/status-indicator.component.js +0 -99
  125. package/esm2015/lib/modules/status-indicator/status-indicator.component.js.map +0 -1
  126. package/esm2015/lib/modules/status-indicator/status-indicator.module.js +0 -34
  127. package/esm2015/lib/modules/status-indicator/status-indicator.module.js.map +0 -1
  128. package/esm2015/lib/modules/text-highlight/text-highlight.directive.js +0 -153
  129. package/esm2015/lib/modules/text-highlight/text-highlight.directive.js.map +0 -1
  130. package/esm2015/lib/modules/text-highlight/text-highlight.module.js +0 -18
  131. package/esm2015/lib/modules/text-highlight/text-highlight.module.js.map +0 -1
  132. package/esm2015/lib/modules/tokens/token.component.js +0 -112
  133. package/esm2015/lib/modules/tokens/token.component.js.map +0 -1
  134. package/esm2015/lib/modules/tokens/tokens.component.js +0 -304
  135. package/esm2015/lib/modules/tokens/tokens.component.js.map +0 -1
  136. package/esm2015/lib/modules/tokens/tokens.module.js +0 -35
  137. package/esm2015/lib/modules/tokens/tokens.module.js.map +0 -1
  138. package/esm2015/lib/modules/tokens/types/token-selected-event-args.js +0 -2
  139. package/esm2015/lib/modules/tokens/types/token-selected-event-args.js.map +0 -1
  140. package/esm2015/lib/modules/tokens/types/token.js +0 -2
  141. package/esm2015/lib/modules/tokens/types/token.js.map +0 -1
  142. package/esm2015/lib/modules/tokens/types/tokens-message-type.js +0 -24
  143. package/esm2015/lib/modules/tokens/types/tokens-message-type.js.map +0 -1
  144. package/esm2015/lib/modules/tokens/types/tokens-message.js +0 -2
  145. package/esm2015/lib/modules/tokens/types/tokens-message.js.map +0 -1
  146. package/esm2015/lib/modules/wait/wait-adapter.service.js +0 -201
  147. package/esm2015/lib/modules/wait/wait-adapter.service.js.map +0 -1
  148. package/esm2015/lib/modules/wait/wait-page-adapter.service.js +0 -25
  149. package/esm2015/lib/modules/wait/wait-page-adapter.service.js.map +0 -1
  150. package/esm2015/lib/modules/wait/wait-page.component.js +0 -23
  151. package/esm2015/lib/modules/wait/wait-page.component.js.map +0 -1
  152. package/esm2015/lib/modules/wait/wait.component.js +0 -94
  153. package/esm2015/lib/modules/wait/wait.component.js.map +0 -1
  154. package/esm2015/lib/modules/wait/wait.module.js +0 -22
  155. package/esm2015/lib/modules/wait/wait.module.js.map +0 -1
  156. package/esm2015/lib/modules/wait/wait.service.js +0 -164
  157. package/esm2015/lib/modules/wait/wait.service.js.map +0 -1
  158. package/esm2015/skyux-indicators.js +0 -5
  159. package/esm2015/skyux-indicators.js.map +0 -1
  160. package/esm2015/testing/alert-fixture.js +0 -67
  161. package/esm2015/testing/alert-fixture.js.map +0 -1
  162. package/esm2015/testing/label-fixture.js +0 -40
  163. package/esm2015/testing/label-fixture.js.map +0 -1
  164. package/esm2015/testing/public-api.js +0 -4
  165. package/esm2015/testing/public-api.js.map +0 -1
  166. package/esm2015/testing/skyux-indicators-testing.js +0 -5
  167. package/esm2015/testing/skyux-indicators-testing.js.map +0 -1
  168. package/esm2015/testing/wait-fixture.js +0 -24
  169. package/esm2015/testing/wait-fixture.js.map +0 -1
  170. package/fesm2015/skyux-indicators-testing.js.map +0 -1
  171. package/fesm2015/skyux-indicators.js.map +0 -1
@@ -0,0 +1,1827 @@
1
+ import * as i1 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { Injectable, Pipe, Component, Input, ChangeDetectionStrategy, NgModule, EventEmitter, Output, Directive, ViewChildren, Optional } from '@angular/core';
5
+ import * as i1$1 from '@skyux/i18n';
6
+ import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
7
+ import * as i3 from '@skyux/theme';
8
+ import { SkyThemeIconManifestModule, SkyThemeModule } from '@skyux/theme';
9
+ import * as i1$2 from '@skyux/core';
10
+ import { MutationObserverService } from '@skyux/core';
11
+ import { trigger, transition, style, animate } from '@angular/animations';
12
+ import { Subject, BehaviorSubject, defer } from 'rxjs';
13
+ import { takeUntil, finalize } from 'rxjs/operators';
14
+
15
+ /**
16
+ * @internal
17
+ */
18
+ class SkyIconResolverService {
19
+ constructor(manifestSvc) {
20
+ this.glyphMap = new Map();
21
+ // Map the icons by name for more efficient lookup.
22
+ for (const glyph of manifestSvc.getManifest().glyphs) {
23
+ this.glyphMap.set(glyph.name, glyph);
24
+ }
25
+ }
26
+ resolveIcon(iconName, variant) {
27
+ const variantIconName = variant && `${iconName}-${variant}`;
28
+ if (variantIconName && this.glyphMap.has(variantIconName)) {
29
+ // A variant was specified and exists; return it.
30
+ return variantIconName;
31
+ }
32
+ if (variant !== 'line' && !this.glyphMap.has(iconName)) {
33
+ // Either the solid variant was specified and doesn't exist, or no variant was
34
+ // specified and a non-variant doesn't exist; fall back to the line variant.
35
+ const lineIconName = `${iconName}-line`;
36
+ if (this.glyphMap.has(lineIconName)) {
37
+ return lineIconName;
38
+ }
39
+ }
40
+ // Fall back to the icon name as-is.
41
+ return iconName;
42
+ }
43
+ }
44
+ SkyIconResolverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyIconResolverService, deps: [{ token: i3.SkyThemeIconManifestService }], target: i0.ɵɵFactoryTarget.Injectable });
45
+ SkyIconResolverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyIconResolverService, providedIn: 'root' });
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyIconResolverService, decorators: [{
47
+ type: Injectable,
48
+ args: [{
49
+ providedIn: 'root',
50
+ }]
51
+ }], ctorParameters: function () { return [{ type: i3.SkyThemeIconManifestService }]; } });
52
+
53
+ /**
54
+ * @internal
55
+ */
56
+ class SkyIconClassListPipe {
57
+ constructor(resolver) {
58
+ this.resolver = resolver;
59
+ }
60
+ transform(icon, iconType, size, fixedWidth, variant) {
61
+ let classList;
62
+ if (iconType === 'skyux') {
63
+ const resolvedIcon = this.resolver.resolveIcon(icon, variant);
64
+ classList = ['sky-i-' + resolvedIcon];
65
+ }
66
+ else {
67
+ classList = ['fa', 'fa-' + icon];
68
+ }
69
+ if (size) {
70
+ classList.push('fa-' + size);
71
+ }
72
+ if (fixedWidth) {
73
+ classList.push('fa-fw');
74
+ }
75
+ return classList;
76
+ }
77
+ }
78
+ SkyIconClassListPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyIconClassListPipe, deps: [{ token: SkyIconResolverService }], target: i0.ɵɵFactoryTarget.Pipe });
79
+ SkyIconClassListPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyIconClassListPipe, name: "skyIconClassList" });
80
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyIconClassListPipe, decorators: [{
81
+ type: Pipe,
82
+ args: [{
83
+ name: 'skyIconClassList',
84
+ }]
85
+ }], ctorParameters: function () { return [{ type: SkyIconResolverService }]; } });
86
+
87
+ class SkyIconStackComponent {
88
+ }
89
+ SkyIconStackComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyIconStackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
90
+ SkyIconStackComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyIconStackComponent, selector: "sky-icon-stack", inputs: { size: "size", baseIcon: "baseIcon", topIcon: "topIcon" }, ngImport: i0, template: "<span\n aria-hidden=\"true\"\n class=\"sky-icon-stack fa-stack\"\n [ngClass]=\"size ? 'fa-' + size + ' sky-icon-stack-size-' + size : ''\"\n>\n <i\n *ngIf=\"baseIcon\"\n class=\"sky-icon fa-stack-2x\"\n [ngClass]=\"baseIcon.icon | skyIconClassList: baseIcon.iconType\"\n ></i>\n <i\n *ngIf=\"topIcon\"\n class=\"sky-icon fa-stack-1x fa-inverse sky-icon-inverse\"\n [ngClass]=\"topIcon.icon | skyIconClassList: topIcon.iconType\"\n ></i>\n</span>\n", styles: [":host{display:inline-block;vertical-align:bottom}.sky-icon-stack-size-xs.fa-stack{width:1.25em;height:1.25em;line-height:1.25em}.sky-icon-stack-size-xs .fa-stack-2x{font-size:1.25em}.sky-icon-stack-size-xs .fa-stack-1x{font-size:.625em}.fa-stack-1x.sky-i-check:before{position:relative;top:1px}.fa-stack-1x.sky-i-exclamation:before{position:relative;top:2px;left:-.5px}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-icon-inverse{color:#121212}.sky-theme-modern.sky-theme-mode-dark .sky-icon-inverse{color:#121212}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "skyIconClassList": SkyIconClassListPipe } });
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyIconStackComponent, decorators: [{
92
+ type: Component,
93
+ args: [{ selector: 'sky-icon-stack', template: "<span\n aria-hidden=\"true\"\n class=\"sky-icon-stack fa-stack\"\n [ngClass]=\"size ? 'fa-' + size + ' sky-icon-stack-size-' + size : ''\"\n>\n <i\n *ngIf=\"baseIcon\"\n class=\"sky-icon fa-stack-2x\"\n [ngClass]=\"baseIcon.icon | skyIconClassList: baseIcon.iconType\"\n ></i>\n <i\n *ngIf=\"topIcon\"\n class=\"sky-icon fa-stack-1x fa-inverse sky-icon-inverse\"\n [ngClass]=\"topIcon.icon | skyIconClassList: topIcon.iconType\"\n ></i>\n</span>\n", styles: [":host{display:inline-block;vertical-align:bottom}.sky-icon-stack-size-xs.fa-stack{width:1.25em;height:1.25em;line-height:1.25em}.sky-icon-stack-size-xs .fa-stack-2x{font-size:1.25em}.sky-icon-stack-size-xs .fa-stack-1x{font-size:.625em}.fa-stack-1x.sky-i-check:before{position:relative;top:1px}.fa-stack-1x.sky-i-exclamation:before{position:relative;top:2px;left:-.5px}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-icon-inverse{color:#121212}.sky-theme-modern.sky-theme-mode-dark .sky-icon-inverse{color:#121212}\n"] }]
94
+ }], propDecorators: { size: [{
95
+ type: Input
96
+ }], baseIcon: [{
97
+ type: Input
98
+ }], topIcon: [{
99
+ type: Input
100
+ }] } });
101
+
102
+ class SkyIconComponent {
103
+ constructor() {
104
+ /**
105
+ * Specifies the type of icon to display. Specifying `"fa"` will display a Font Awesome icon,
106
+ * while specifying `"skyux"` will display an icon from the custom SKY UX icon font. Note that
107
+ * the custom SKY UX icon font is currently in beta.
108
+ * @default "fa"
109
+ */
110
+ this.iconType = 'fa';
111
+ }
112
+ }
113
+ SkyIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
114
+ SkyIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyIconComponent, selector: "sky-icon", inputs: { icon: "icon", iconType: "iconType", size: "size", fixedWidth: "fixedWidth", variant: "variant" }, ngImport: i0, template: "<i\n *ngIf=\"icon\"\n aria-hidden=\"true\"\n class=\"sky-icon\"\n [ngClass]=\"icon | skyIconClassList: iconType:size:fixedWidth:variant\"\n>\n</i>\n", styles: [":host{display:inline-block}i{display:inherit}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "skyIconClassList": SkyIconClassListPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
115
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyIconComponent, decorators: [{
116
+ type: Component,
117
+ args: [{ selector: 'sky-icon', changeDetection: ChangeDetectionStrategy.OnPush, template: "<i\n *ngIf=\"icon\"\n aria-hidden=\"true\"\n class=\"sky-icon\"\n [ngClass]=\"icon | skyIconClassList: iconType:size:fixedWidth:variant\"\n>\n</i>\n", styles: [":host{display:inline-block}i{display:inherit}\n"] }]
118
+ }], propDecorators: { icon: [{
119
+ type: Input
120
+ }], iconType: [{
121
+ type: Input
122
+ }], size: [{
123
+ type: Input
124
+ }], fixedWidth: [{
125
+ type: Input
126
+ }], variant: [{
127
+ type: Input
128
+ }] } });
129
+
130
+ class SkyIconModule {
131
+ }
132
+ SkyIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
133
+ SkyIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyIconModule, declarations: [SkyIconClassListPipe, SkyIconComponent, SkyIconStackComponent], imports: [CommonModule, SkyThemeIconManifestModule], exports: [SkyIconComponent, SkyIconStackComponent] });
134
+ SkyIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyIconModule, imports: [[CommonModule, SkyThemeIconManifestModule]] });
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyIconModule, decorators: [{
136
+ type: NgModule,
137
+ args: [{
138
+ declarations: [SkyIconClassListPipe, SkyIconComponent, SkyIconStackComponent],
139
+ imports: [CommonModule, SkyThemeIconManifestModule],
140
+ exports: [SkyIconComponent, SkyIconStackComponent],
141
+ }]
142
+ }] });
143
+
144
+ /**
145
+ * NOTICE: DO NOT MODIFY THIS FILE!
146
+ * The contents of this file were automatically generated by
147
+ * the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-indicators' schematic.
148
+ * To update this file, simply rerun the command.
149
+ */
150
+ const RESOURCES = {
151
+ 'EN-US': {
152
+ skyux_alert_close: { message: 'Close the alert' },
153
+ skyux_help_inline_button_title: { message: 'Show help content' },
154
+ skyux_status_indicator_sr_completed: { message: 'Completed:' },
155
+ skyux_status_indicator_sr_error: { message: 'Error:' },
156
+ skyux_status_indicator_sr_important_info: {
157
+ message: 'Important information:',
158
+ },
159
+ skyux_status_indicator_sr_warning: { message: 'Warning:' },
160
+ skyux_tokens_dismiss_button_title: { message: 'Remove item' },
161
+ skyux_wait_aria_alt_text: { message: 'Loading.' },
162
+ skyux_wait_blocking_aria_alt_text: { message: 'Loading. Please wait.' },
163
+ skyux_wait_page_aria_alt_text: { message: 'Page loading.' },
164
+ skyux_wait_page_blocking_aria_alt_text: {
165
+ message: 'Page loading. Please wait.',
166
+ },
167
+ },
168
+ };
169
+ class SkyIndicatorsResourcesProvider {
170
+ getString(localeInfo, name) {
171
+ return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
172
+ }
173
+ }
174
+ /**
175
+ * Import into any component library module that needs to use resource strings.
176
+ */
177
+ class SkyIndicatorsResourcesModule {
178
+ }
179
+ SkyIndicatorsResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyIndicatorsResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
180
+ SkyIndicatorsResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyIndicatorsResourcesModule, exports: [SkyI18nModule] });
181
+ SkyIndicatorsResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyIndicatorsResourcesModule, providers: [
182
+ {
183
+ provide: SKY_LIB_RESOURCES_PROVIDERS,
184
+ useClass: SkyIndicatorsResourcesProvider,
185
+ multi: true,
186
+ },
187
+ ], imports: [SkyI18nModule] });
188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyIndicatorsResourcesModule, decorators: [{
189
+ type: NgModule,
190
+ args: [{
191
+ exports: [SkyI18nModule],
192
+ providers: [
193
+ {
194
+ provide: SKY_LIB_RESOURCES_PROVIDERS,
195
+ useClass: SkyIndicatorsResourcesProvider,
196
+ multi: true,
197
+ },
198
+ ],
199
+ }]
200
+ }] });
201
+
202
+ /**
203
+ * @internl
204
+ */
205
+ class SkyIndicatorIconUtility {
206
+ static getIconsForType(indicatorType) {
207
+ let icon;
208
+ let baseIcon;
209
+ let topIcon;
210
+ switch (indicatorType) {
211
+ case 'danger':
212
+ case 'warning':
213
+ icon = 'warning';
214
+ baseIcon = 'triangle-solid';
215
+ topIcon = 'exclamation';
216
+ break;
217
+ case 'info':
218
+ icon = 'exclamation-circle';
219
+ baseIcon = 'circle-solid';
220
+ topIcon = 'help-i';
221
+ break;
222
+ case 'success':
223
+ icon = 'check';
224
+ baseIcon = 'circle-solid';
225
+ topIcon = 'check';
226
+ break;
227
+ }
228
+ return {
229
+ defaultThemeIcon: icon,
230
+ modernThemeBaseIcon: {
231
+ icon: baseIcon,
232
+ iconType: 'skyux',
233
+ },
234
+ modernThemeTopIcon: {
235
+ icon: topIcon,
236
+ iconType: 'skyux',
237
+ },
238
+ };
239
+ }
240
+ }
241
+
242
+ const ALERT_TYPE_DEFAULT = 'warning';
243
+ class SkyAlertComponent {
244
+ constructor() {
245
+ /**
246
+ * Fires when users close the alert.
247
+ */
248
+ this.closedChange = new EventEmitter();
249
+ }
250
+ /**
251
+ * Specifies a style for the alert to determine the icon and background color.
252
+ * The valid options are `danger`, `info`, `success`, and `warning`.
253
+ * @default "warning"
254
+ */
255
+ set alertType(value) {
256
+ this._alertType = value;
257
+ this.updateAlertIcon();
258
+ }
259
+ get alertType() {
260
+ return this._alertType || ALERT_TYPE_DEFAULT;
261
+ }
262
+ ngOnInit() {
263
+ this.updateAlertIcon();
264
+ }
265
+ close() {
266
+ this.closed = true;
267
+ this.closedChange.emit(true);
268
+ }
269
+ updateAlertIcon() {
270
+ const indicatorIcon = SkyIndicatorIconUtility.getIconsForType(this.alertType);
271
+ this.alertBaseIcon = indicatorIcon.modernThemeBaseIcon;
272
+ this.alertTopIcon = indicatorIcon.modernThemeTopIcon;
273
+ }
274
+ }
275
+ SkyAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
276
+ SkyAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyAlertComponent, selector: "sky-alert", inputs: { alertType: "alertType", closeable: "closeable", closed: "closed" }, outputs: { closedChange: "closedChange" }, ngImport: i0, template: "<div\n class=\"sky-alert\"\n [skyThemeClass]=\"{\n 'sky-rounded-corners': 'default',\n 'sky-box sky-elevation-1': 'modern'\n }\"\n role=\"alert\"\n [hidden]=\"closed\"\n [ngClass]=\"{\n 'sky-alert-info': alertType === 'info',\n 'sky-alert-success': alertType === 'success',\n 'sky-alert-warning': alertType === 'warning',\n 'sky-alert-danger': alertType === 'danger',\n 'sky-alert-closeable': closeable\n }\"\n>\n <div aria-hidden=\"true\" class=\"sky-alert-icon-theme-modern\">\n <sky-icon-stack [baseIcon]=\"alertBaseIcon\" [topIcon]=\"alertTopIcon\">\n </sky-icon-stack>\n </div>\n <div class=\"sky-alert-content\">\n <ng-content></ng-content>\n </div>\n <button\n class=\"sky-alert-close\"\n type=\"button\"\n [attr.aria-label]=\"'skyux_alert_close' | skyLibResources\"\n [hidden]=\"!closeable\"\n (click)=\"close()\"\n >\n <span aria-hidden=\"true\">\n <sky-icon class=\"sky-alert-close-icon-theme-default\" icon=\"close\">\n </sky-icon>\n <sky-icon\n class=\"sky-alert-close-icon-theme-modern\"\n icon=\"close\"\n iconType=\"skyux\"\n size=\"2x\"\n >\n </sky-icon>\n </span>\n </button>\n</div>\n", styles: [".sky-alert{padding:0 10px;margin-bottom:20px;border-left:solid 30px;color:#212327;display:flex;flex-direction:row;align-items:center}.sky-alert .sky-alert-content{padding-top:10px;padding-bottom:10px;width:100%}.sky-alert .sky-alert-content ::ng-deep a{color:#212327cc;text-decoration:underline}.sky-alert .sky-alert-content ::ng-deep a:hover{color:#212327}.sky-alert button{margin-left:auto;width:32px;height:32px}.sky-alert.sky-alert-info{background-color:#81d4f7;border-color:#00b4f1}.sky-alert.sky-alert-info:before{content:\"\\f06a\";font-family:FontAwesome;margin-left:-31px;margin-right:20px;color:#fff}.sky-alert.sky-alert-success{background-color:#b7da9b;border-color:#72bf44}.sky-alert.sky-alert-success:before{content:\"\\f00c\";font-family:FontAwesome;margin-left:-32px;margin-right:19px;color:#fff}.sky-alert.sky-alert-warning{background-color:#ffd597;border-color:#fbb034}.sky-alert.sky-alert-warning:before{content:\"\\f071\";font-family:FontAwesome;margin-left:-32px;margin-right:19px;color:#fff}.sky-alert.sky-alert-danger{background-color:#f7a08f;border-color:#ef4044}.sky-alert.sky-alert-danger:before{content:\"\\f071\";font-family:FontAwesome;margin-left:-32px;margin-right:19px;color:#fff}.sky-alert-close{cursor:pointer;font-weight:700;line-height:1;margin:0;padding:0;color:#212327;opacity:.8;border:none;background-color:transparent;display:none}.sky-alert-close:hover{opacity:1}.sky-alert-closeable .sky-alert-close{display:block}.sky-alert-close-icon-theme-modern,.sky-alert-icon-theme-modern{display:none}:host-context(.sky-theme-modern) .sky-alert{border-left-width:7px}:host-context(.sky-theme-modern) .sky-alert .sky-alert-content{padding:15px}:host-context(.sky-theme-modern) .sky-alert.sky-alert-info{background-color:#c1e8fb}:host-context(.sky-theme-modern) .sky-alert-info:before,:host-context(.sky-theme-modern) .sky-alert-success:before,:host-context(.sky-theme-modern) .sky-alert-warning:before,:host-context(.sky-theme-modern) .sky-alert-danger:before{display:none}:host-context(.sky-theme-modern) .sky-alert-info .sky-alert-icon-theme-modern{color:#00b4f1}:host-context(.sky-theme-modern) .sky-alert-success .sky-alert-icon-theme-modern{color:#72bf44}:host-context(.sky-theme-modern) .sky-alert-warning .sky-alert-icon-theme-modern{color:#fbb034}:host-context(.sky-theme-modern) .sky-alert-danger .sky-alert-icon-theme-modern{color:#ef4044}:host-context(.sky-theme-modern) .sky-alert-icon-theme-modern{display:block}:host-context(.sky-theme-modern) .sky-alert-close-icon-theme-default{display:none}:host-context(.sky-theme-modern) .sky-alert-close-icon-theme-modern{display:inline}.sky-theme-modern .sky-alert{border-left-width:7px}.sky-theme-modern .sky-alert .sky-alert-content{padding:15px}.sky-theme-modern .sky-alert.sky-alert-info{background-color:#c1e8fb}.sky-theme-modern .sky-alert-info:before,.sky-theme-modern .sky-alert-success:before,.sky-theme-modern .sky-alert-warning:before,.sky-theme-modern .sky-alert-danger:before{display:none}.sky-theme-modern .sky-alert-info .sky-alert-icon-theme-modern{color:#00b4f1}.sky-theme-modern .sky-alert-success .sky-alert-icon-theme-modern{color:#72bf44}.sky-theme-modern .sky-alert-warning .sky-alert-icon-theme-modern{color:#fbb034}.sky-theme-modern .sky-alert-danger .sky-alert-icon-theme-modern{color:#ef4044}.sky-theme-modern .sky-alert-icon-theme-modern{display:block}.sky-theme-modern .sky-alert-close-icon-theme-default{display:none}.sky-theme-modern .sky-alert-close-icon-theme-modern{display:inline}\n"], components: [{ type: SkyIconStackComponent, selector: "sky-icon-stack", inputs: ["size", "baseIcon", "topIcon"] }, { type: SkyIconComponent, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i3.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "skyLibResources": i1$1.SkyLibResourcesPipe } });
277
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyAlertComponent, decorators: [{
278
+ type: Component,
279
+ args: [{ selector: 'sky-alert', template: "<div\n class=\"sky-alert\"\n [skyThemeClass]=\"{\n 'sky-rounded-corners': 'default',\n 'sky-box sky-elevation-1': 'modern'\n }\"\n role=\"alert\"\n [hidden]=\"closed\"\n [ngClass]=\"{\n 'sky-alert-info': alertType === 'info',\n 'sky-alert-success': alertType === 'success',\n 'sky-alert-warning': alertType === 'warning',\n 'sky-alert-danger': alertType === 'danger',\n 'sky-alert-closeable': closeable\n }\"\n>\n <div aria-hidden=\"true\" class=\"sky-alert-icon-theme-modern\">\n <sky-icon-stack [baseIcon]=\"alertBaseIcon\" [topIcon]=\"alertTopIcon\">\n </sky-icon-stack>\n </div>\n <div class=\"sky-alert-content\">\n <ng-content></ng-content>\n </div>\n <button\n class=\"sky-alert-close\"\n type=\"button\"\n [attr.aria-label]=\"'skyux_alert_close' | skyLibResources\"\n [hidden]=\"!closeable\"\n (click)=\"close()\"\n >\n <span aria-hidden=\"true\">\n <sky-icon class=\"sky-alert-close-icon-theme-default\" icon=\"close\">\n </sky-icon>\n <sky-icon\n class=\"sky-alert-close-icon-theme-modern\"\n icon=\"close\"\n iconType=\"skyux\"\n size=\"2x\"\n >\n </sky-icon>\n </span>\n </button>\n</div>\n", styles: [".sky-alert{padding:0 10px;margin-bottom:20px;border-left:solid 30px;color:#212327;display:flex;flex-direction:row;align-items:center}.sky-alert .sky-alert-content{padding-top:10px;padding-bottom:10px;width:100%}.sky-alert .sky-alert-content ::ng-deep a{color:#212327cc;text-decoration:underline}.sky-alert .sky-alert-content ::ng-deep a:hover{color:#212327}.sky-alert button{margin-left:auto;width:32px;height:32px}.sky-alert.sky-alert-info{background-color:#81d4f7;border-color:#00b4f1}.sky-alert.sky-alert-info:before{content:\"\\f06a\";font-family:FontAwesome;margin-left:-31px;margin-right:20px;color:#fff}.sky-alert.sky-alert-success{background-color:#b7da9b;border-color:#72bf44}.sky-alert.sky-alert-success:before{content:\"\\f00c\";font-family:FontAwesome;margin-left:-32px;margin-right:19px;color:#fff}.sky-alert.sky-alert-warning{background-color:#ffd597;border-color:#fbb034}.sky-alert.sky-alert-warning:before{content:\"\\f071\";font-family:FontAwesome;margin-left:-32px;margin-right:19px;color:#fff}.sky-alert.sky-alert-danger{background-color:#f7a08f;border-color:#ef4044}.sky-alert.sky-alert-danger:before{content:\"\\f071\";font-family:FontAwesome;margin-left:-32px;margin-right:19px;color:#fff}.sky-alert-close{cursor:pointer;font-weight:700;line-height:1;margin:0;padding:0;color:#212327;opacity:.8;border:none;background-color:transparent;display:none}.sky-alert-close:hover{opacity:1}.sky-alert-closeable .sky-alert-close{display:block}.sky-alert-close-icon-theme-modern,.sky-alert-icon-theme-modern{display:none}:host-context(.sky-theme-modern) .sky-alert{border-left-width:7px}:host-context(.sky-theme-modern) .sky-alert .sky-alert-content{padding:15px}:host-context(.sky-theme-modern) .sky-alert.sky-alert-info{background-color:#c1e8fb}:host-context(.sky-theme-modern) .sky-alert-info:before,:host-context(.sky-theme-modern) .sky-alert-success:before,:host-context(.sky-theme-modern) .sky-alert-warning:before,:host-context(.sky-theme-modern) .sky-alert-danger:before{display:none}:host-context(.sky-theme-modern) .sky-alert-info .sky-alert-icon-theme-modern{color:#00b4f1}:host-context(.sky-theme-modern) .sky-alert-success .sky-alert-icon-theme-modern{color:#72bf44}:host-context(.sky-theme-modern) .sky-alert-warning .sky-alert-icon-theme-modern{color:#fbb034}:host-context(.sky-theme-modern) .sky-alert-danger .sky-alert-icon-theme-modern{color:#ef4044}:host-context(.sky-theme-modern) .sky-alert-icon-theme-modern{display:block}:host-context(.sky-theme-modern) .sky-alert-close-icon-theme-default{display:none}:host-context(.sky-theme-modern) .sky-alert-close-icon-theme-modern{display:inline}.sky-theme-modern .sky-alert{border-left-width:7px}.sky-theme-modern .sky-alert .sky-alert-content{padding:15px}.sky-theme-modern .sky-alert.sky-alert-info{background-color:#c1e8fb}.sky-theme-modern .sky-alert-info:before,.sky-theme-modern .sky-alert-success:before,.sky-theme-modern .sky-alert-warning:before,.sky-theme-modern .sky-alert-danger:before{display:none}.sky-theme-modern .sky-alert-info .sky-alert-icon-theme-modern{color:#00b4f1}.sky-theme-modern .sky-alert-success .sky-alert-icon-theme-modern{color:#72bf44}.sky-theme-modern .sky-alert-warning .sky-alert-icon-theme-modern{color:#fbb034}.sky-theme-modern .sky-alert-danger .sky-alert-icon-theme-modern{color:#ef4044}.sky-theme-modern .sky-alert-icon-theme-modern{display:block}.sky-theme-modern .sky-alert-close-icon-theme-default{display:none}.sky-theme-modern .sky-alert-close-icon-theme-modern{display:inline}\n"] }]
280
+ }], propDecorators: { alertType: [{
281
+ type: Input
282
+ }], closeable: [{
283
+ type: Input
284
+ }], closed: [{
285
+ type: Input
286
+ }], closedChange: [{
287
+ type: Output
288
+ }] } });
289
+
290
+ class SkyAlertModule {
291
+ }
292
+ SkyAlertModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
293
+ SkyAlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyAlertModule, declarations: [SkyAlertComponent], imports: [CommonModule,
294
+ SkyI18nModule,
295
+ SkyIconModule,
296
+ SkyIndicatorsResourcesModule,
297
+ SkyThemeModule], exports: [SkyAlertComponent] });
298
+ SkyAlertModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyAlertModule, imports: [[
299
+ CommonModule,
300
+ SkyI18nModule,
301
+ SkyIconModule,
302
+ SkyIndicatorsResourcesModule,
303
+ SkyThemeModule,
304
+ ]] });
305
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyAlertModule, decorators: [{
306
+ type: NgModule,
307
+ args: [{
308
+ declarations: [SkyAlertComponent],
309
+ imports: [
310
+ CommonModule,
311
+ SkyI18nModule,
312
+ SkyIconModule,
313
+ SkyIndicatorsResourcesModule,
314
+ SkyThemeModule,
315
+ ],
316
+ exports: [SkyAlertComponent],
317
+ }]
318
+ }] });
319
+
320
+ /**
321
+ * Displays a chevron icon.
322
+ * @internal
323
+ */
324
+ class SkyExpansionIndicatorComponent {
325
+ /**
326
+ * Specifies whether the chevron points up or down.
327
+ */
328
+ set direction(value) {
329
+ /* istanbul ignore else */
330
+ if (value != this._direction) {
331
+ this._direction = value;
332
+ }
333
+ }
334
+ get direction() {
335
+ return this._direction || 'up';
336
+ }
337
+ }
338
+ SkyExpansionIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyExpansionIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
339
+ SkyExpansionIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyExpansionIndicatorComponent, selector: "sky-expansion-indicator", inputs: { direction: "direction" }, ngImport: i0, template: "<div\n aria-hidden=\"true\"\n class=\"sky-expansion-indicator\"\n [ngClass]=\"['sky-expansion-indicator-' + direction]\"\n>\n <ng-container *skyThemeIf=\"'default'\">\n <ng-container *ngTemplateOutlet=\"icon\"></ng-container>\n </ng-container>\n <ng-container *skyThemeIf=\"'modern'\">\n <span class=\"sky-expansion-indicator-glyph-container\">\n <ng-container *ngTemplateOutlet=\"icon\"></ng-container>\n </span>\n </ng-container>\n</div>\n\n<ng-template #icon>\n <i class=\"sky-expansion-indicator-part sky-expansion-indicator-left\"> </i>\n <i class=\"sky-expansion-indicator-part sky-expansion-indicator-right\"> </i>\n</ng-template>\n", styles: [".sky-expansion-indicator{display:inline-block;border:none;background-color:transparent;flex-shrink:0;height:24px;margin:0;overflow:hidden;width:24px;position:relative;vertical-align:top}.sky-expansion-indicator-part{border-color:#cdcfd2;border-style:solid;border-width:3px 0 0 0;display:inline-block;height:10px;position:absolute;top:10px;transition:transform .25s,left .25s;vertical-align:top;width:10px}.sky-expansion-indicator-up .sky-expansion-indicator-left{left:7px;transform:rotate(-45deg)}.sky-expansion-indicator-up .sky-expansion-indicator-right{left:7px;transform:rotate(45deg)}.sky-expansion-indicator-down .sky-expansion-indicator-left{left:2px;transform:rotate(45deg)}.sky-expansion-indicator-down .sky-expansion-indicator-right{left:12px;transform:rotate(-45deg)}:host-context(.sky-theme-modern) .sky-expansion-indicator{height:26px;width:26px}:host-context(.sky-theme-modern) .sky-expansion-indicator-part{background:#686c73;border:none;height:2px;width:11px;top:13px}:host-context(.sky-theme-modern) .sky-expansion-indicator-glyph-container{transform:scale(.68);display:inline-block;position:absolute;top:3.5px;left:4px}:host-context(.sky-theme-modern) .sky-expansion-indicator-left{border-radius:1px 0 0 1px}:host-context(.sky-theme-modern) .sky-expansion-indicator-right{border-radius:0 1px 1px 0}:host-context(.sky-theme-modern) .sky-expansion-indicator-left{left:4px}:host-context(.sky-theme-modern) .sky-expansion-indicator-right{left:10.5px}.sky-theme-modern .sky-expansion-indicator{height:26px;width:26px}.sky-theme-modern .sky-expansion-indicator-part{background:#686c73;border:none;height:2px;width:11px;top:13px}.sky-theme-modern .sky-expansion-indicator-glyph-container{transform:scale(.68);display:inline-block;position:absolute;top:3.5px;left:4px}.sky-theme-modern .sky-expansion-indicator-left{border-radius:1px 0 0 1px}.sky-theme-modern .sky-expansion-indicator-right{border-radius:0 1px 1px 0}.sky-theme-modern .sky-expansion-indicator-left{left:4px}.sky-theme-modern .sky-expansion-indicator-right{left:10.5px}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
340
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyExpansionIndicatorComponent, decorators: [{
341
+ type: Component,
342
+ args: [{ selector: 'sky-expansion-indicator', template: "<div\n aria-hidden=\"true\"\n class=\"sky-expansion-indicator\"\n [ngClass]=\"['sky-expansion-indicator-' + direction]\"\n>\n <ng-container *skyThemeIf=\"'default'\">\n <ng-container *ngTemplateOutlet=\"icon\"></ng-container>\n </ng-container>\n <ng-container *skyThemeIf=\"'modern'\">\n <span class=\"sky-expansion-indicator-glyph-container\">\n <ng-container *ngTemplateOutlet=\"icon\"></ng-container>\n </span>\n </ng-container>\n</div>\n\n<ng-template #icon>\n <i class=\"sky-expansion-indicator-part sky-expansion-indicator-left\"> </i>\n <i class=\"sky-expansion-indicator-part sky-expansion-indicator-right\"> </i>\n</ng-template>\n", styles: [".sky-expansion-indicator{display:inline-block;border:none;background-color:transparent;flex-shrink:0;height:24px;margin:0;overflow:hidden;width:24px;position:relative;vertical-align:top}.sky-expansion-indicator-part{border-color:#cdcfd2;border-style:solid;border-width:3px 0 0 0;display:inline-block;height:10px;position:absolute;top:10px;transition:transform .25s,left .25s;vertical-align:top;width:10px}.sky-expansion-indicator-up .sky-expansion-indicator-left{left:7px;transform:rotate(-45deg)}.sky-expansion-indicator-up .sky-expansion-indicator-right{left:7px;transform:rotate(45deg)}.sky-expansion-indicator-down .sky-expansion-indicator-left{left:2px;transform:rotate(45deg)}.sky-expansion-indicator-down .sky-expansion-indicator-right{left:12px;transform:rotate(-45deg)}:host-context(.sky-theme-modern) .sky-expansion-indicator{height:26px;width:26px}:host-context(.sky-theme-modern) .sky-expansion-indicator-part{background:#686c73;border:none;height:2px;width:11px;top:13px}:host-context(.sky-theme-modern) .sky-expansion-indicator-glyph-container{transform:scale(.68);display:inline-block;position:absolute;top:3.5px;left:4px}:host-context(.sky-theme-modern) .sky-expansion-indicator-left{border-radius:1px 0 0 1px}:host-context(.sky-theme-modern) .sky-expansion-indicator-right{border-radius:0 1px 1px 0}:host-context(.sky-theme-modern) .sky-expansion-indicator-left{left:4px}:host-context(.sky-theme-modern) .sky-expansion-indicator-right{left:10.5px}.sky-theme-modern .sky-expansion-indicator{height:26px;width:26px}.sky-theme-modern .sky-expansion-indicator-part{background:#686c73;border:none;height:2px;width:11px;top:13px}.sky-theme-modern .sky-expansion-indicator-glyph-container{transform:scale(.68);display:inline-block;position:absolute;top:3.5px;left:4px}.sky-theme-modern .sky-expansion-indicator-left{border-radius:1px 0 0 1px}.sky-theme-modern .sky-expansion-indicator-right{border-radius:0 1px 1px 0}.sky-theme-modern .sky-expansion-indicator-left{left:4px}.sky-theme-modern .sky-expansion-indicator-right{left:10.5px}\n"] }]
343
+ }], propDecorators: { direction: [{
344
+ type: Input
345
+ }] } });
346
+
347
+ class SkyExpansionIndicatorModule {
348
+ }
349
+ SkyExpansionIndicatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyExpansionIndicatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
350
+ SkyExpansionIndicatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyExpansionIndicatorModule, declarations: [SkyExpansionIndicatorComponent], imports: [CommonModule, SkyThemeModule], exports: [SkyExpansionIndicatorComponent] });
351
+ SkyExpansionIndicatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyExpansionIndicatorModule, imports: [[CommonModule, SkyThemeModule]] });
352
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyExpansionIndicatorModule, decorators: [{
353
+ type: NgModule,
354
+ args: [{
355
+ declarations: [SkyExpansionIndicatorComponent],
356
+ imports: [CommonModule, SkyThemeModule],
357
+ exports: [SkyExpansionIndicatorComponent],
358
+ }]
359
+ }] });
360
+
361
+ /**
362
+ * Creates an accessible button that wraps the chevron icon.
363
+ * @internal
364
+ */
365
+ class SkyChevronComponent {
366
+ constructor() {
367
+ /**
368
+ * Indicates whether to disable the chevron button.
369
+ */
370
+ this.disabled = false;
371
+ /**
372
+ * Fires when the direction of the chevron changes.
373
+ */
374
+ this.directionChange = new EventEmitter();
375
+ }
376
+ /**
377
+ * Specifies whether the chevron points up or down.
378
+ */
379
+ set direction(value) {
380
+ /* istanbul ignore else */
381
+ if (value != this._direction) {
382
+ this._direction = value;
383
+ /* istanbul ignore else */
384
+ if (value === 'up') {
385
+ this.ariaExpanded = true;
386
+ }
387
+ else if (this.direction === 'down') {
388
+ this.ariaExpanded = false;
389
+ }
390
+ }
391
+ }
392
+ get direction() {
393
+ return this._direction || 'up';
394
+ }
395
+ chevronClick(event) {
396
+ event.stopPropagation();
397
+ this.direction = this.direction === 'up' ? 'down' : 'up';
398
+ this.directionChange.emit(this.direction);
399
+ }
400
+ }
401
+ SkyChevronComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyChevronComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
402
+ SkyChevronComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyChevronComponent, selector: "sky-chevron", inputs: { ariaControls: "ariaControls", ariaLabel: "ariaLabel", direction: "direction", disabled: "disabled" }, outputs: { directionChange: "directionChange" }, ngImport: i0, template: "<button\n class=\"sky-chevron\"\n type=\"button\"\n [attr.aria-controls]=\"ariaControls\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.aria-label]=\"ariaLabel\"\n [disabled]=\"disabled\"\n [ngClass]=\"['sky-chevron-' + direction]\"\n [skyThemeClass]=\"{\n 'sky-btn sky-btn-icon-borderless': 'modern'\n }\"\n (click)=\"chevronClick($event)\"\n>\n <sky-expansion-indicator [direction]=\"direction\"></sky-expansion-indicator>\n</button>\n", styles: ["button{background:lightblue}.sky-chevron{border:none;background-color:transparent;flex-shrink:0;height:24px;margin:0;padding:0;overflow:hidden;width:24px;cursor:pointer;position:relative;vertical-align:top}.sky-chevron:hover .sky-chevron-part{border-color:#979ba2}\n"], components: [{ type: SkyExpansionIndicatorComponent, selector: "sky-expansion-indicator", inputs: ["direction"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }] });
403
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyChevronComponent, decorators: [{
404
+ type: Component,
405
+ args: [{ selector: 'sky-chevron', template: "<button\n class=\"sky-chevron\"\n type=\"button\"\n [attr.aria-controls]=\"ariaControls\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.aria-label]=\"ariaLabel\"\n [disabled]=\"disabled\"\n [ngClass]=\"['sky-chevron-' + direction]\"\n [skyThemeClass]=\"{\n 'sky-btn sky-btn-icon-borderless': 'modern'\n }\"\n (click)=\"chevronClick($event)\"\n>\n <sky-expansion-indicator [direction]=\"direction\"></sky-expansion-indicator>\n</button>\n", styles: ["button{background:lightblue}.sky-chevron{border:none;background-color:transparent;flex-shrink:0;height:24px;margin:0;padding:0;overflow:hidden;width:24px;cursor:pointer;position:relative;vertical-align:top}.sky-chevron:hover .sky-chevron-part{border-color:#979ba2}\n"] }]
406
+ }], propDecorators: { ariaControls: [{
407
+ type: Input
408
+ }], ariaLabel: [{
409
+ type: Input
410
+ }], direction: [{
411
+ type: Input
412
+ }], disabled: [{
413
+ type: Input
414
+ }], directionChange: [{
415
+ type: Output
416
+ }] } });
417
+
418
+ class SkyChevronModule {
419
+ }
420
+ SkyChevronModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyChevronModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
421
+ SkyChevronModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyChevronModule, declarations: [SkyChevronComponent], imports: [CommonModule,
422
+ SkyI18nModule,
423
+ SkyIndicatorsResourcesModule,
424
+ SkyThemeModule,
425
+ SkyExpansionIndicatorModule], exports: [SkyChevronComponent] });
426
+ SkyChevronModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyChevronModule, imports: [[
427
+ CommonModule,
428
+ SkyI18nModule,
429
+ SkyIndicatorsResourcesModule,
430
+ SkyThemeModule,
431
+ SkyExpansionIndicatorModule,
432
+ ]] });
433
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyChevronModule, decorators: [{
434
+ type: NgModule,
435
+ args: [{
436
+ declarations: [SkyChevronComponent],
437
+ imports: [
438
+ CommonModule,
439
+ SkyI18nModule,
440
+ SkyIndicatorsResourcesModule,
441
+ SkyThemeModule,
442
+ SkyExpansionIndicatorModule,
443
+ ],
444
+ exports: [SkyChevronComponent],
445
+ }]
446
+ }] });
447
+
448
+ class SkyHelpInlineComponent {
449
+ constructor() {
450
+ /**
451
+ * Fires when the user clicks the help inline button.
452
+ */
453
+ this.actionClick = new EventEmitter();
454
+ }
455
+ onClick() {
456
+ this.actionClick.emit();
457
+ }
458
+ }
459
+ SkyHelpInlineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyHelpInlineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
460
+ SkyHelpInlineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyHelpInlineComponent, selector: "sky-help-inline", outputs: { actionClick: "actionClick" }, ngImport: i0, template: "<button\n class=\"sky-help-inline\"\n type=\"button\"\n [attr.aria-label]=\"'skyux_help_inline_button_title' | skyLibResources\"\n (click)=\"onClick()\"\n>\n <sky-icon *skyThemeIf=\"'default'\" icon=\"info-circle\"> </sky-icon>\n <sky-icon-stack\n *skyThemeIf=\"'modern'\"\n size=\"xs\"\n [baseIcon]=\"{\n icon: 'circle-solid',\n iconType: 'skyux'\n }\"\n [topIcon]=\"{\n icon: 'help-i',\n iconType: 'skyux'\n }\"\n >\n </sky-icon-stack>\n</button>\n", styles: [".sky-help-inline{color:#0974a1;font-size:15px;background-color:transparent;border:none;display:inline-block}.sky-help-inline:hover{color:#065171;transition:color .15s;cursor:pointer}:host-context(.sky-theme-modern) .sky-help-inline ::ng-deep .fa-stack-2x{font-size:16px}:host-context(.sky-theme-modern) .sky-help-inline ::ng-deep .fa-stack-1x{font-size:10px}.sky-theme-modern .sky-help-inline ::ng-deep .fa-stack-2x{font-size:16px}.sky-theme-modern .sky-help-inline ::ng-deep .fa-stack-1x{font-size:10px}\n"], components: [{ type: SkyIconComponent, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { type: SkyIconStackComponent, selector: "sky-icon-stack", inputs: ["size", "baseIcon", "topIcon"] }], directives: [{ type: i3.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }], pipes: { "skyLibResources": i1$1.SkyLibResourcesPipe } });
461
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyHelpInlineComponent, decorators: [{
462
+ type: Component,
463
+ args: [{ selector: 'sky-help-inline', template: "<button\n class=\"sky-help-inline\"\n type=\"button\"\n [attr.aria-label]=\"'skyux_help_inline_button_title' | skyLibResources\"\n (click)=\"onClick()\"\n>\n <sky-icon *skyThemeIf=\"'default'\" icon=\"info-circle\"> </sky-icon>\n <sky-icon-stack\n *skyThemeIf=\"'modern'\"\n size=\"xs\"\n [baseIcon]=\"{\n icon: 'circle-solid',\n iconType: 'skyux'\n }\"\n [topIcon]=\"{\n icon: 'help-i',\n iconType: 'skyux'\n }\"\n >\n </sky-icon-stack>\n</button>\n", styles: [".sky-help-inline{color:#0974a1;font-size:15px;background-color:transparent;border:none;display:inline-block}.sky-help-inline:hover{color:#065171;transition:color .15s;cursor:pointer}:host-context(.sky-theme-modern) .sky-help-inline ::ng-deep .fa-stack-2x{font-size:16px}:host-context(.sky-theme-modern) .sky-help-inline ::ng-deep .fa-stack-1x{font-size:10px}.sky-theme-modern .sky-help-inline ::ng-deep .fa-stack-2x{font-size:16px}.sky-theme-modern .sky-help-inline ::ng-deep .fa-stack-1x{font-size:10px}\n"] }]
464
+ }], propDecorators: { actionClick: [{
465
+ type: Output
466
+ }] } });
467
+
468
+ class SkyHelpInlineModule {
469
+ }
470
+ SkyHelpInlineModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyHelpInlineModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
471
+ SkyHelpInlineModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyHelpInlineModule, declarations: [SkyHelpInlineComponent], imports: [CommonModule,
472
+ SkyI18nModule,
473
+ SkyIconModule,
474
+ SkyIndicatorsResourcesModule,
475
+ SkyThemeModule], exports: [SkyHelpInlineComponent] });
476
+ SkyHelpInlineModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyHelpInlineModule, imports: [[
477
+ CommonModule,
478
+ SkyI18nModule,
479
+ SkyIconModule,
480
+ SkyIndicatorsResourcesModule,
481
+ SkyThemeModule,
482
+ ]] });
483
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyHelpInlineModule, decorators: [{
484
+ type: NgModule,
485
+ args: [{
486
+ declarations: [SkyHelpInlineComponent],
487
+ imports: [
488
+ CommonModule,
489
+ SkyI18nModule,
490
+ SkyIconModule,
491
+ SkyIndicatorsResourcesModule,
492
+ SkyThemeModule,
493
+ ],
494
+ exports: [SkyHelpInlineComponent],
495
+ }]
496
+ }] });
497
+
498
+ /**
499
+ * Specifies a label to display in smaller, plain text under or beside the value.
500
+ * @required
501
+ */
502
+ class SkyKeyInfoLabelComponent {
503
+ }
504
+ SkyKeyInfoLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyKeyInfoLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
505
+ SkyKeyInfoLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyKeyInfoLabelComponent, selector: "sky-key-info-label", ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
506
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyKeyInfoLabelComponent, decorators: [{
507
+ type: Component,
508
+ args: [{
509
+ selector: 'sky-key-info-label',
510
+ template: '<ng-content></ng-content>',
511
+ }]
512
+ }] });
513
+
514
+ /**
515
+ * Specifies a value to display in larger, bold text.
516
+ * @required
517
+ */
518
+ class SkyKeyInfoValueComponent {
519
+ }
520
+ SkyKeyInfoValueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyKeyInfoValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
521
+ SkyKeyInfoValueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyKeyInfoValueComponent, selector: "sky-key-info-value", ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
522
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyKeyInfoValueComponent, decorators: [{
523
+ type: Component,
524
+ args: [{
525
+ selector: 'sky-key-info-value',
526
+ template: '<ng-content></ng-content>',
527
+ }]
528
+ }] });
529
+
530
+ class SkyKeyInfoComponent {
531
+ constructor() {
532
+ /**
533
+ * Specifies whether to display key info in a `vertical` layout with the label under the
534
+ * value or in a `horizontal` layout with the label beside the value.
535
+ * @default "vertical"
536
+ */
537
+ this.layout = 'vertical';
538
+ }
539
+ }
540
+ SkyKeyInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyKeyInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
541
+ SkyKeyInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyKeyInfoComponent, selector: "sky-key-info", inputs: { layout: "layout" }, ngImport: i0, template: "<div\n class=\"sky-key-info\"\n [ngClass]=\"{\n 'sky-key-info-horizontal': layout === 'horizontal'\n }\"\n>\n <div class=\"sky-key-info-value sky-headline\">\n <ng-content select=\"sky-key-info-value\"> </ng-content>\n </div>\n <div class=\"sky-key-info-label sky-field-label sky-font-data-label\">\n <ng-content select=\"sky-key-info-label\"> </ng-content>\n </div>\n</div>\n", styles: [".sky-key-info,.sky-key-info.sky-key-info-horizontal .sky-key-info-value,.sky-key-info.sky-key-info-horizontal .sky-key-info-label{display:inline-block}.sky-key-info.sky-key-info-horizontal .sky-key-info-label{padding:0 0 0 5px}:host-context(.sky-theme-modern) .sky-key-info.sky-key-info-horizontal .sky-key-info-label{padding:0 0 0 5px}.sky-theme-modern .sky-key-info.sky-key-info-horizontal .sky-key-info-label{padding:0 0 0 5px}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
542
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyKeyInfoComponent, decorators: [{
543
+ type: Component,
544
+ args: [{ selector: 'sky-key-info', template: "<div\n class=\"sky-key-info\"\n [ngClass]=\"{\n 'sky-key-info-horizontal': layout === 'horizontal'\n }\"\n>\n <div class=\"sky-key-info-value sky-headline\">\n <ng-content select=\"sky-key-info-value\"> </ng-content>\n </div>\n <div class=\"sky-key-info-label sky-field-label sky-font-data-label\">\n <ng-content select=\"sky-key-info-label\"> </ng-content>\n </div>\n</div>\n", styles: [".sky-key-info,.sky-key-info.sky-key-info-horizontal .sky-key-info-value,.sky-key-info.sky-key-info-horizontal .sky-key-info-label{display:inline-block}.sky-key-info.sky-key-info-horizontal .sky-key-info-label{padding:0 0 0 5px}:host-context(.sky-theme-modern) .sky-key-info.sky-key-info-horizontal .sky-key-info-label{padding:0 0 0 5px}.sky-theme-modern .sky-key-info.sky-key-info-horizontal .sky-key-info-label{padding:0 0 0 5px}\n"] }]
545
+ }], propDecorators: { layout: [{
546
+ type: Input
547
+ }] } });
548
+
549
+ class SkyKeyInfoModule {
550
+ }
551
+ SkyKeyInfoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyKeyInfoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
552
+ SkyKeyInfoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyKeyInfoModule, declarations: [SkyKeyInfoComponent,
553
+ SkyKeyInfoLabelComponent,
554
+ SkyKeyInfoValueComponent], imports: [CommonModule], exports: [SkyKeyInfoComponent,
555
+ SkyKeyInfoLabelComponent,
556
+ SkyKeyInfoValueComponent] });
557
+ SkyKeyInfoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyKeyInfoModule, imports: [[CommonModule]] });
558
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyKeyInfoModule, decorators: [{
559
+ type: NgModule,
560
+ args: [{
561
+ declarations: [
562
+ SkyKeyInfoComponent,
563
+ SkyKeyInfoLabelComponent,
564
+ SkyKeyInfoValueComponent,
565
+ ],
566
+ imports: [CommonModule],
567
+ exports: [
568
+ SkyKeyInfoComponent,
569
+ SkyKeyInfoLabelComponent,
570
+ SkyKeyInfoValueComponent,
571
+ ],
572
+ }]
573
+ }] });
574
+
575
+ class SkyLabelComponent {
576
+ /**
577
+ * The type of label to display.
578
+ * @required
579
+ */
580
+ set labelType(value) {
581
+ this._labelType = value;
582
+ this.updateIcon();
583
+ }
584
+ get labelType() {
585
+ return this._labelType || 'info';
586
+ }
587
+ updateIcon() {
588
+ const indicatorIcon = SkyIndicatorIconUtility.getIconsForType(this.labelType);
589
+ this.icon = indicatorIcon.defaultThemeIcon;
590
+ this.baseIcon = indicatorIcon.modernThemeBaseIcon;
591
+ this.topIcon = indicatorIcon.modernThemeTopIcon;
592
+ }
593
+ }
594
+ SkyLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
595
+ SkyLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyLabelComponent, selector: "sky-label", inputs: { labelType: "labelType" }, ngImport: i0, template: "<span class=\"sky-label\" [ngClass]=\"'sky-label-' + labelType\">\n <span class=\"sky-label-icon-theme-default\">\n <sky-icon [icon]=\"icon\"></sky-icon>\n </span>\n <span class=\"sky-label-icon-theme-modern\">\n <sky-icon-stack size=\"xs\" [baseIcon]=\"baseIcon\" [topIcon]=\"topIcon\">\n </sky-icon-stack>\n </span>\n <span class=\"sky-label-text\">\n <ng-content></ng-content>\n </span>\n</span>\n", styles: [".sky-label{color:#212327;display:inline;border-radius:10rem;font-weight:400;line-height:2.2;margin:0 3px;padding:.3em .6em;white-space:nowrap}.sky-label-success{background-color:#b7da9b}.sky-label-info{background-color:#81d4f7}.sky-label-warning{background-color:#ffd597}.sky-label-danger{background-color:#f7a08f}.sky-label-text{display:inline-block;padding-left:5px}.sky-label-icon-theme-modern{display:none}:host-context(.sky-theme-modern) .sky-label{align-items:center;display:inline-flex;line-height:1}:host-context(.sky-theme-modern) .sky-label.sky-label-info{background-color:#c1e8fb}:host-context(.sky-theme-modern) .sky-label.sky-label-info,:host-context(.sky-theme-modern) .sky-label.sky-label-success{padding:4px 15px 4px 6px}:host-context(.sky-theme-modern) .sky-label.sky-label-warning,:host-context(.sky-theme-modern) .sky-label.sky-label-danger{padding:4px 15px 4px 9px}:host-context(.sky-theme-modern) .sky-label-icon-theme-default{display:none}:host-context(.sky-theme-modern) .sky-label-icon-theme-modern{display:block}:host-context(.sky-theme-modern) .sky-label-info .sky-label-icon-theme-modern{color:#00b4f1}:host-context(.sky-theme-modern) .sky-label-success .sky-label-icon-theme-modern{color:#72bf44}:host-context(.sky-theme-modern) .sky-label-warning .sky-label-icon-theme-modern{color:#fbb034}:host-context(.sky-theme-modern) .sky-label-danger .sky-label-icon-theme-modern{color:#ef4044}.sky-theme-modern .sky-label{align-items:center;display:inline-flex;line-height:1}.sky-theme-modern .sky-label.sky-label-info{background-color:#c1e8fb}.sky-theme-modern .sky-label.sky-label-info,.sky-theme-modern .sky-label.sky-label-success{padding:4px 15px 4px 6px}.sky-theme-modern .sky-label.sky-label-warning,.sky-theme-modern .sky-label.sky-label-danger{padding:4px 15px 4px 9px}.sky-theme-modern .sky-label-icon-theme-default{display:none}.sky-theme-modern .sky-label-icon-theme-modern{display:block}.sky-theme-modern .sky-label-info .sky-label-icon-theme-modern{color:#00b4f1}.sky-theme-modern .sky-label-success .sky-label-icon-theme-modern{color:#72bf44}.sky-theme-modern .sky-label-warning .sky-label-icon-theme-modern{color:#fbb034}.sky-theme-modern .sky-label-danger .sky-label-icon-theme-modern{color:#ef4044}\n"], components: [{ type: SkyIconComponent, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { type: SkyIconStackComponent, selector: "sky-icon-stack", inputs: ["size", "baseIcon", "topIcon"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
596
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLabelComponent, decorators: [{
597
+ type: Component,
598
+ args: [{ selector: 'sky-label', template: "<span class=\"sky-label\" [ngClass]=\"'sky-label-' + labelType\">\n <span class=\"sky-label-icon-theme-default\">\n <sky-icon [icon]=\"icon\"></sky-icon>\n </span>\n <span class=\"sky-label-icon-theme-modern\">\n <sky-icon-stack size=\"xs\" [baseIcon]=\"baseIcon\" [topIcon]=\"topIcon\">\n </sky-icon-stack>\n </span>\n <span class=\"sky-label-text\">\n <ng-content></ng-content>\n </span>\n</span>\n", styles: [".sky-label{color:#212327;display:inline;border-radius:10rem;font-weight:400;line-height:2.2;margin:0 3px;padding:.3em .6em;white-space:nowrap}.sky-label-success{background-color:#b7da9b}.sky-label-info{background-color:#81d4f7}.sky-label-warning{background-color:#ffd597}.sky-label-danger{background-color:#f7a08f}.sky-label-text{display:inline-block;padding-left:5px}.sky-label-icon-theme-modern{display:none}:host-context(.sky-theme-modern) .sky-label{align-items:center;display:inline-flex;line-height:1}:host-context(.sky-theme-modern) .sky-label.sky-label-info{background-color:#c1e8fb}:host-context(.sky-theme-modern) .sky-label.sky-label-info,:host-context(.sky-theme-modern) .sky-label.sky-label-success{padding:4px 15px 4px 6px}:host-context(.sky-theme-modern) .sky-label.sky-label-warning,:host-context(.sky-theme-modern) .sky-label.sky-label-danger{padding:4px 15px 4px 9px}:host-context(.sky-theme-modern) .sky-label-icon-theme-default{display:none}:host-context(.sky-theme-modern) .sky-label-icon-theme-modern{display:block}:host-context(.sky-theme-modern) .sky-label-info .sky-label-icon-theme-modern{color:#00b4f1}:host-context(.sky-theme-modern) .sky-label-success .sky-label-icon-theme-modern{color:#72bf44}:host-context(.sky-theme-modern) .sky-label-warning .sky-label-icon-theme-modern{color:#fbb034}:host-context(.sky-theme-modern) .sky-label-danger .sky-label-icon-theme-modern{color:#ef4044}.sky-theme-modern .sky-label{align-items:center;display:inline-flex;line-height:1}.sky-theme-modern .sky-label.sky-label-info{background-color:#c1e8fb}.sky-theme-modern .sky-label.sky-label-info,.sky-theme-modern .sky-label.sky-label-success{padding:4px 15px 4px 6px}.sky-theme-modern .sky-label.sky-label-warning,.sky-theme-modern .sky-label.sky-label-danger{padding:4px 15px 4px 9px}.sky-theme-modern .sky-label-icon-theme-default{display:none}.sky-theme-modern .sky-label-icon-theme-modern{display:block}.sky-theme-modern .sky-label-info .sky-label-icon-theme-modern{color:#00b4f1}.sky-theme-modern .sky-label-success .sky-label-icon-theme-modern{color:#72bf44}.sky-theme-modern .sky-label-warning .sky-label-icon-theme-modern{color:#fbb034}.sky-theme-modern .sky-label-danger .sky-label-icon-theme-modern{color:#ef4044}\n"] }]
599
+ }], propDecorators: { labelType: [{
600
+ type: Input
601
+ }] } });
602
+
603
+ class SkyLabelModule {
604
+ }
605
+ SkyLabelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
606
+ SkyLabelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLabelModule, declarations: [SkyLabelComponent], imports: [CommonModule, SkyIconModule], exports: [SkyLabelComponent] });
607
+ SkyLabelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLabelModule, imports: [[CommonModule, SkyIconModule]] });
608
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLabelModule, decorators: [{
609
+ type: NgModule,
610
+ args: [{
611
+ declarations: [SkyLabelComponent],
612
+ imports: [CommonModule, SkyIconModule],
613
+ exports: [SkyLabelComponent],
614
+ }]
615
+ }] });
616
+
617
+ const INDICATOR_TYPE_DEFAULT = 'warning';
618
+ class SkyStatusIndicatorComponent {
619
+ constructor(changeDetector, resources) {
620
+ this.changeDetector = changeDetector;
621
+ this.resources = resources;
622
+ }
623
+ /**
624
+ * Specifies a style for the status indicator to determine the icon.
625
+ * The valid options are `danger`, `info`, `success`, and `warning`.
626
+ * @default "warning"
627
+ */
628
+ set indicatorType(value) {
629
+ this._indicatorType = value;
630
+ this.updateIcon();
631
+ }
632
+ get indicatorType() {
633
+ return this._indicatorType || INDICATOR_TYPE_DEFAULT;
634
+ }
635
+ /**
636
+ * Specifies the predefined text to be read by screen readers for users
637
+ * who cannot see the indicator icon. The valid options are `none`, `custom`,
638
+ * `error`, `warning`, `completed`, and `important-info`.
639
+ * @required
640
+ */
641
+ set descriptionType(value) {
642
+ this._descriptionType = value;
643
+ this.updateDescriptionComputed();
644
+ }
645
+ get descriptionType() {
646
+ return this._descriptionType;
647
+ }
648
+ /**
649
+ * Specifies the text to be read by screen readers for users who cannot see
650
+ * the indicator icon when `descriptionType` is `custom`.
651
+ */
652
+ set customDescription(value) {
653
+ this._customDescription = value;
654
+ this.updateDescriptionComputed();
655
+ }
656
+ get customDescription() {
657
+ return this._customDescription;
658
+ }
659
+ updateIcon() {
660
+ const indicatorIcon = SkyIndicatorIconUtility.getIconsForType(this.indicatorType);
661
+ this.icon = indicatorIcon.defaultThemeIcon;
662
+ this.baseIcon = indicatorIcon.modernThemeBaseIcon;
663
+ this.topIcon = indicatorIcon.modernThemeTopIcon;
664
+ }
665
+ updateDescriptionComputed() {
666
+ if (this.descriptionType) {
667
+ switch (this.descriptionType) {
668
+ case 'none':
669
+ this.descriptionComputed = '';
670
+ break;
671
+ case 'custom':
672
+ this.descriptionComputed = this.customDescription;
673
+ break;
674
+ default:
675
+ this.resources
676
+ .getString('skyux_status_indicator_sr_' +
677
+ this.descriptionType.replace(/-/g, '_'))
678
+ .subscribe((value) => {
679
+ this.descriptionComputed = value;
680
+ this.changeDetector.markForCheck();
681
+ });
682
+ break;
683
+ }
684
+ }
685
+ else {
686
+ this.descriptionComputed = undefined;
687
+ }
688
+ }
689
+ }
690
+ SkyStatusIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyStatusIndicatorComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.SkyLibResourcesService }], target: i0.ɵɵFactoryTarget.Component });
691
+ SkyStatusIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyStatusIndicatorComponent, selector: "sky-status-indicator", inputs: { indicatorType: "indicatorType", descriptionType: "descriptionType", customDescription: "customDescription" }, ngImport: i0, template: "<div *ngIf=\"descriptionType\" class=\"sky-status-indicator\">\n <div\n aria-hidden=\"true\"\n class=\"sky-margin-inline-xs sky-status-indicator-icon\"\n [ngClass]=\"'sky-status-indicator-icon-' + indicatorType\"\n >\n <span class=\"sky-status-indicator-icon-default\">\n <sky-icon [icon]=\"icon\"></sky-icon>\n </span>\n <span class=\"sky-status-indicator-icon-modern\">\n <sky-icon-stack size=\"xs\" [baseIcon]=\"baseIcon\" [topIcon]=\"topIcon\">\n </sky-icon-stack>\n </span>\n </div>\n <div class=\"sky-status-indicator-message-wrapper\">\n <span *ngIf=\"descriptionComputed\" class=\"sky-screen-reader-only\">\n {{ descriptionComputed }}\n </span>\n <span class=\"sky-status-indicator-message\">\n <ng-content></ng-content>\n </span>\n </div>\n</div>\n", styles: [".sky-status-indicator{align-items:baseline;display:flex}.sky-status-indicator-icon{flex-shrink:1}.sky-status-indicator-icon-modern{display:none}.sky-status-indicator-icon-info{color:#00b4f1}.sky-status-indicator-icon-success{color:#72bf44}.sky-status-indicator-icon-warning{color:#fbb034}.sky-status-indicator-icon-danger{color:#ef4044}:host-context(.sky-theme-modern) .sky-status-indicator-icon-default{display:none}:host-context(.sky-theme-modern) .sky-status-indicator-icon-modern{display:inline}.sky-theme-modern .sky-status-indicator-icon-default{display:none}.sky-theme-modern .sky-status-indicator-icon-modern{display:inline}\n"], components: [{ type: SkyIconComponent, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { type: SkyIconStackComponent, selector: "sky-icon-stack", inputs: ["size", "baseIcon", "topIcon"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
692
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyStatusIndicatorComponent, decorators: [{
693
+ type: Component,
694
+ args: [{ selector: 'sky-status-indicator', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"descriptionType\" class=\"sky-status-indicator\">\n <div\n aria-hidden=\"true\"\n class=\"sky-margin-inline-xs sky-status-indicator-icon\"\n [ngClass]=\"'sky-status-indicator-icon-' + indicatorType\"\n >\n <span class=\"sky-status-indicator-icon-default\">\n <sky-icon [icon]=\"icon\"></sky-icon>\n </span>\n <span class=\"sky-status-indicator-icon-modern\">\n <sky-icon-stack size=\"xs\" [baseIcon]=\"baseIcon\" [topIcon]=\"topIcon\">\n </sky-icon-stack>\n </span>\n </div>\n <div class=\"sky-status-indicator-message-wrapper\">\n <span *ngIf=\"descriptionComputed\" class=\"sky-screen-reader-only\">\n {{ descriptionComputed }}\n </span>\n <span class=\"sky-status-indicator-message\">\n <ng-content></ng-content>\n </span>\n </div>\n</div>\n", styles: [".sky-status-indicator{align-items:baseline;display:flex}.sky-status-indicator-icon{flex-shrink:1}.sky-status-indicator-icon-modern{display:none}.sky-status-indicator-icon-info{color:#00b4f1}.sky-status-indicator-icon-success{color:#72bf44}.sky-status-indicator-icon-warning{color:#fbb034}.sky-status-indicator-icon-danger{color:#ef4044}:host-context(.sky-theme-modern) .sky-status-indicator-icon-default{display:none}:host-context(.sky-theme-modern) .sky-status-indicator-icon-modern{display:inline}.sky-theme-modern .sky-status-indicator-icon-default{display:none}.sky-theme-modern .sky-status-indicator-icon-modern{display:inline}\n"] }]
695
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$1.SkyLibResourcesService }]; }, propDecorators: { indicatorType: [{
696
+ type: Input
697
+ }], descriptionType: [{
698
+ type: Input
699
+ }], customDescription: [{
700
+ type: Input
701
+ }] } });
702
+
703
+ class SkyStatusIndicatorModule {
704
+ }
705
+ SkyStatusIndicatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyStatusIndicatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
706
+ SkyStatusIndicatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyStatusIndicatorModule, declarations: [SkyStatusIndicatorComponent], imports: [CommonModule,
707
+ SkyI18nModule,
708
+ SkyIconModule,
709
+ SkyIndicatorsResourcesModule], exports: [SkyStatusIndicatorComponent] });
710
+ SkyStatusIndicatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyStatusIndicatorModule, imports: [[
711
+ CommonModule,
712
+ SkyI18nModule,
713
+ SkyIconModule,
714
+ SkyIndicatorsResourcesModule,
715
+ ]] });
716
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyStatusIndicatorModule, decorators: [{
717
+ type: NgModule,
718
+ args: [{
719
+ declarations: [SkyStatusIndicatorComponent],
720
+ imports: [
721
+ CommonModule,
722
+ SkyI18nModule,
723
+ SkyIconModule,
724
+ SkyIndicatorsResourcesModule,
725
+ ],
726
+ exports: [SkyStatusIndicatorComponent],
727
+ }]
728
+ }] });
729
+
730
+ const className = 'sky-highlight-mark';
731
+ // Need to add the following to classes which contain static methods.
732
+ // See: https://github.com/ng-packagr/ng-packagr/issues/641
733
+ // @dynamic
734
+ /**
735
+ * Highlights all matching text within DOM elements that it is placed on.
736
+ * The directive is only valid for elements that contain content, so you
737
+ * cannot place it on `ng-template`, `ng-content`, or `ng-container` tags.
738
+ */
739
+ class SkyTextHighlightDirective {
740
+ constructor(el, observerService) {
741
+ this.el = el;
742
+ this.observerService = observerService;
743
+ this.existingHighlight = false;
744
+ }
745
+ /**
746
+ * Specifies the text to highlight.
747
+ */
748
+ set skyHighlight(value) {
749
+ value = value || [];
750
+ this._skyHighlight = [];
751
+ if (Array.isArray(value)) {
752
+ this._skyHighlight = value.filter((item) => !!item);
753
+ // Reorder strings by their length in descending order to avoid missing matches
754
+ // that contain substrings of other matches.
755
+ this._skyHighlight.sort(function (a, b) {
756
+ return b.length - a.length;
757
+ });
758
+ }
759
+ else {
760
+ this._skyHighlight = [value];
761
+ }
762
+ }
763
+ static cleanRegex(regex) {
764
+ return regex.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&');
765
+ }
766
+ static markNode(node, searchTerms) {
767
+ /* istanbul ignore else */
768
+ if (searchTerms) {
769
+ const text = node.nodeValue;
770
+ for (let i = 0; i < searchTerms.length; i++) {
771
+ searchTerms[i] = this.cleanRegex(searchTerms[i]);
772
+ }
773
+ const searchRegex = new RegExp(searchTerms.join('|'), 'gi');
774
+ const match = searchRegex.exec(text);
775
+ if (match) {
776
+ // Split apart text node with mark tags in the middle on the search term.
777
+ const matchIndex = match.index;
778
+ const middle = node.splitText(matchIndex);
779
+ middle.splitText(searchRegex.lastIndex - matchIndex);
780
+ const middleClone = middle.cloneNode(true);
781
+ const markNode = document.createElement('mark');
782
+ markNode.className = className;
783
+ markNode.appendChild(middleClone);
784
+ middle.parentNode.replaceChild(markNode, middle);
785
+ return 1;
786
+ }
787
+ }
788
+ return 0;
789
+ }
790
+ static markTextNodes(node, searchTerms) {
791
+ if (node.nodeType === 3) {
792
+ return SkyTextHighlightDirective.markNode(node, searchTerms);
793
+ }
794
+ else if (node.nodeType === 1 && node.childNodes) {
795
+ for (let i = 0; i < node.childNodes.length; i++) {
796
+ const childNode = node.childNodes[i];
797
+ i += SkyTextHighlightDirective.markTextNodes(childNode, searchTerms);
798
+ }
799
+ }
800
+ return 0;
801
+ }
802
+ static removeHighlight(el) {
803
+ const matchedElements = el.nativeElement.querySelectorAll(`mark.${className}`);
804
+ /* istanbul ignore else */
805
+ /* sanity check */
806
+ if (matchedElements) {
807
+ for (let i = 0; i < matchedElements.length; i++) {
808
+ const node = matchedElements[i];
809
+ const parentNode = node.parentNode;
810
+ parentNode.replaceChild(node.firstChild, node);
811
+ parentNode.normalize();
812
+ }
813
+ }
814
+ }
815
+ ngOnChanges(changes) {
816
+ if (changes.skyHighlight && !changes.skyHighlight.firstChange) {
817
+ this.highlight();
818
+ }
819
+ }
820
+ ngAfterViewInit() {
821
+ this.observer = this.observerService.create(() => {
822
+ this.highlight();
823
+ });
824
+ this.observeDom();
825
+ if (this._skyHighlight && this._skyHighlight.length > 0) {
826
+ this.highlight();
827
+ }
828
+ }
829
+ ngOnDestroy() {
830
+ /* istanbul ignore else */
831
+ if (this.observer) {
832
+ this.observer.disconnect();
833
+ }
834
+ }
835
+ readyForHighlight(searchText) {
836
+ return searchText && searchText.length > 0 && this.el.nativeElement;
837
+ }
838
+ highlight() {
839
+ /* istanbul ignore else */
840
+ if (this.observer) {
841
+ this.observer.disconnect();
842
+ }
843
+ const searchText = this._skyHighlight;
844
+ if (this.existingHighlight) {
845
+ SkyTextHighlightDirective.removeHighlight(this.el);
846
+ }
847
+ /* istanbul ignore else */
848
+ if (this.readyForHighlight(searchText)) {
849
+ const node = this.el.nativeElement;
850
+ // mark all matched text in the DOM
851
+ SkyTextHighlightDirective.markTextNodes(node, searchText);
852
+ this.existingHighlight = true;
853
+ }
854
+ this.observeDom();
855
+ }
856
+ observeDom() {
857
+ /* istanbul ignore else */
858
+ if (this.observer) {
859
+ const config = {
860
+ attributes: false,
861
+ childList: true,
862
+ characterData: true,
863
+ };
864
+ this.observer.observe(this.el.nativeElement, config);
865
+ }
866
+ }
867
+ }
868
+ SkyTextHighlightDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyTextHighlightDirective, deps: [{ token: i0.ElementRef }, { token: i1$2.MutationObserverService }], target: i0.ɵɵFactoryTarget.Directive });
869
+ SkyTextHighlightDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: SkyTextHighlightDirective, selector: "[skyHighlight]", inputs: { skyHighlight: "skyHighlight" }, usesOnChanges: true, ngImport: i0 });
870
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyTextHighlightDirective, decorators: [{
871
+ type: Directive,
872
+ args: [{
873
+ selector: '[skyHighlight]',
874
+ }]
875
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$2.MutationObserverService }]; }, propDecorators: { skyHighlight: [{
876
+ type: Input
877
+ }] } });
878
+
879
+ class SkyTextHighlightModule {
880
+ }
881
+ SkyTextHighlightModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyTextHighlightModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
882
+ SkyTextHighlightModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyTextHighlightModule, declarations: [SkyTextHighlightDirective], exports: [SkyTextHighlightDirective] });
883
+ SkyTextHighlightModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyTextHighlightModule, providers: [MutationObserverService] });
884
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyTextHighlightModule, decorators: [{
885
+ type: NgModule,
886
+ args: [{
887
+ declarations: [SkyTextHighlightDirective],
888
+ exports: [SkyTextHighlightDirective],
889
+ providers: [MutationObserverService],
890
+ }]
891
+ }] });
892
+
893
+ class SkyTokenComponent {
894
+ constructor(elementRef, resourcesService) {
895
+ this.elementRef = elementRef;
896
+ this.resourcesService = resourcesService;
897
+ /**
898
+ * Fires when users click the close button or press the `Backspace` key to dismiss the token.
899
+ */
900
+ this.dismiss = new EventEmitter();
901
+ /**
902
+ * Fires when users place focus on the token by navigating to it with the `Tab` key.
903
+ */
904
+ this.tokenFocus = new EventEmitter();
905
+ }
906
+ /**
907
+ * Indicates whether to disable the token to prevent users from selecting it, dismissing it,
908
+ * or navigating to it with the arrow keys. When the token is disabled,
909
+ * users can still place focus on it using the `Tab` key.
910
+ * @default true
911
+ */
912
+ set disabled(value) {
913
+ this._disabled = value;
914
+ }
915
+ get disabled() {
916
+ return !!this._disabled;
917
+ }
918
+ /**
919
+ * Specifies an ARIA label for the token's close button. This sets the button's `aria-label`
920
+ * [to support accessibility](https://developer.blackbaud.com/skyux/learn/accessibility).
921
+ * @default "Remove item"
922
+ */
923
+ set ariaLabel(value) {
924
+ this._ariaLabel = value;
925
+ }
926
+ get ariaLabel() {
927
+ return (this._ariaLabel || this.getString('skyux_tokens_dismiss_button_title'));
928
+ }
929
+ /**
930
+ * Indicates whether users can remove the token from the list by selecting the close button
931
+ * or pressing the `Backspace` key.
932
+ * @default true
933
+ */
934
+ set dismissible(value) {
935
+ this._dismissible = value;
936
+ }
937
+ get dismissible() {
938
+ return this._dismissible !== false;
939
+ }
940
+ /**
941
+ * Indicates whether users can press the `Tab` key to place focus on the token. This does not
942
+ * affect the ability to select the token, dismiss it, or navigate to it with the arrow keys.
943
+ * @default true
944
+ */
945
+ set focusable(value) {
946
+ this._focusable = value;
947
+ }
948
+ get focusable() {
949
+ return this._focusable !== false;
950
+ }
951
+ /**
952
+ * @internal
953
+ */
954
+ get tabIndex() {
955
+ return this.focusable ? 0 : -1;
956
+ }
957
+ dismissToken(event) {
958
+ event.stopPropagation();
959
+ this.dismiss.emit();
960
+ }
961
+ focusElement() {
962
+ this.elementRef.nativeElement.querySelector('.sky-token').focus();
963
+ }
964
+ setTokenActive(tokenActive) {
965
+ this.tokenActive = tokenActive;
966
+ }
967
+ setCloseActive(closeActive) {
968
+ this.closeActive = closeActive;
969
+ }
970
+ getString(key) {
971
+ // TODO: Need to implement the async `getString` method in a breaking change.
972
+ return this.resourcesService.getStringForLocale({ locale: 'en-US' }, key);
973
+ }
974
+ }
975
+ SkyTokenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyTokenComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.SkyLibResourcesService }], target: i0.ɵɵFactoryTarget.Component });
976
+ SkyTokenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyTokenComponent, selector: "sky-token", inputs: { disabled: "disabled", ariaLabel: "ariaLabel", dismissible: "dismissible", focusable: "focusable" }, outputs: { dismiss: "dismiss", tokenFocus: "tokenFocus" }, ngImport: i0, template: "<div\n class=\"sky-token sky-btn sky-btn-default\"\n role=\"button\"\n [attr.aria-disabled]=\"disabled\"\n [attr.tabindex]=\"tabIndex\"\n [ngClass]=\"{\n 'sky-btn-disabled': disabled,\n 'sky-token-dismissable': dismissible,\n 'sky-token-active': tokenActive && !closeActive\n }\"\n (document:mouseup)=\"setTokenActive(false)\"\n (focus)=\"tokenFocus.emit()\"\n (mousedown)=\"setTokenActive(true)\"\n>\n <ng-content></ng-content>\n <button\n *ngIf=\"dismissible\"\n class=\"sky-btn sky-token-btn-close\"\n type=\"button\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.tabindex]=\"tabIndex\"\n [attr.title]=\"ariaLabel\"\n [disabled]=\"disabled\"\n [ngClass]=\"{\n 'sky-token-btn-close-active': closeActive\n }\"\n (click)=\"dismissToken($event)\"\n (document:mouseup)=\"setCloseActive(false)\"\n (mousedown)=\"setCloseActive(true)\"\n >\n <sky-icon class=\"sky-token-btn-close-icon-default\" icon=\"times\"></sky-icon>\n <sky-icon\n class=\"sky-token-btn-close-icon-modern\"\n icon=\"close\"\n iconType=\"skyux\"\n >\n </sky-icon>\n </button>\n</div>\n", styles: [".sky-token{background-color:#c1e8fb;border:1px solid #00b4f1;overflow:hidden;padding:2px 8px;display:inline-block;-webkit-user-select:none;user-select:none}.sky-token:hover,.sky-token:focus{background-color:#91d6f8;border-color:#008ebe;cursor:pointer}.sky-token:focus{box-shadow:0 0 8px #00b4f199;border:1px solid #00b4f1;outline:none}.sky-btn-disabled{cursor:default;-webkit-user-select:none;user-select:none}.sky-token-btn-close{background:transparent;padding:0;border:0;margin-left:2px;opacity:.9}.sky-token-btn-close:hover,.sky-token-btn-close:focus{opacity:1}.sky-token-btn-close-icon-modern{display:none}:host-context(.sky-theme-modern) .sky-token{align-items:center;display:inline-flex;padding:1px 5px;font-size:14px}:host-context(.sky-theme-modern) .sky-token.sky-btn-disabled{color:#212327}:host-context(.sky-theme-modern) .sky-token:not(.sky-btn-disabled){border:none;box-shadow:inset 0 0 0 1px #81d4f7}:host-context(.sky-theme-modern) .sky-token.sky-token-dismissable{padding-right:1px}:host-context(.sky-theme-modern) .sky-token:hover:not(:active){border:none;box-shadow:inset 0 0 0 1px #1870b8}:host-context(.sky-theme-modern) .sky-token.sky-token-active{border:none;box-shadow:inset 0 0 0 2px #1870b8}:host-context(.sky-theme-modern) .sky-token:focus:not(:active){border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d}:host-context(.sky-theme-modern) .sky-token:focus,:host-context(.sky-theme-modern) .sky-token:hover{background-color:#c1e8fb}:host-context(.sky-theme-modern) .sky-token-btn-close{align-items:center;border-radius:5px;display:flex;height:20px;margin-left:5px;width:20px}:host-context(.sky-theme-modern) .sky-token-btn-close:hover{border:none;box-shadow:inset 0 0 0 1px transparent}:host-context(.sky-theme-modern) .sky-token-btn-close.sky-token-btn-close-active{border:none;box-shadow:inset 0 0 0 2px #1870b8}:host-context(.sky-theme-modern) .sky-token-btn-close:focus{outline:none}:host-context(.sky-theme-modern) .sky-token-btn-close:focus:not(:active){border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d}:host-context(.sky-theme-modern) .sky-token-btn-close-icon-default{display:none}:host-context(.sky-theme-modern) .sky-token-btn-close-icon-modern{display:inline-block;width:100%}.sky-theme-modern .sky-token{align-items:center;display:inline-flex;padding:1px 5px;font-size:14px}.sky-theme-modern .sky-token.sky-btn-disabled{color:#212327}.sky-theme-modern .sky-token:not(.sky-btn-disabled){border:none;box-shadow:inset 0 0 0 1px #81d4f7}.sky-theme-modern .sky-token.sky-token-dismissable{padding-right:1px}.sky-theme-modern .sky-token:hover:not(:active){border:none;box-shadow:inset 0 0 0 1px #1870b8}.sky-theme-modern .sky-token.sky-token-active{border:none;box-shadow:inset 0 0 0 2px #1870b8}.sky-theme-modern .sky-token:focus:not(:active){border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d}.sky-theme-modern .sky-token:focus,.sky-theme-modern .sky-token:hover{background-color:#c1e8fb}.sky-theme-modern .sky-token-btn-close{align-items:center;border-radius:5px;display:flex;height:20px;margin-left:5px;width:20px}.sky-theme-modern .sky-token-btn-close:hover{border:none;box-shadow:inset 0 0 0 1px transparent}.sky-theme-modern .sky-token-btn-close.sky-token-btn-close-active{border:none;box-shadow:inset 0 0 0 2px #1870b8}.sky-theme-modern .sky-token-btn-close:focus{outline:none}.sky-theme-modern .sky-token-btn-close:focus:not(:active){border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d}.sky-theme-modern .sky-token-btn-close-icon-default{display:none}.sky-theme-modern .sky-token-btn-close-icon-modern{display:inline-block;width:100%}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-token{background-color:#c1e8fb}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-token,:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-token-btn-close{color:#212327}.sky-theme-modern.sky-theme-mode-dark .sky-token{background-color:#c1e8fb}.sky-theme-modern.sky-theme-mode-dark .sky-token,.sky-theme-modern.sky-theme-mode-dark .sky-token-btn-close{color:#212327}\n"], components: [{ type: SkyIconComponent, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
977
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyTokenComponent, decorators: [{
978
+ type: Component,
979
+ args: [{ selector: 'sky-token', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"sky-token sky-btn sky-btn-default\"\n role=\"button\"\n [attr.aria-disabled]=\"disabled\"\n [attr.tabindex]=\"tabIndex\"\n [ngClass]=\"{\n 'sky-btn-disabled': disabled,\n 'sky-token-dismissable': dismissible,\n 'sky-token-active': tokenActive && !closeActive\n }\"\n (document:mouseup)=\"setTokenActive(false)\"\n (focus)=\"tokenFocus.emit()\"\n (mousedown)=\"setTokenActive(true)\"\n>\n <ng-content></ng-content>\n <button\n *ngIf=\"dismissible\"\n class=\"sky-btn sky-token-btn-close\"\n type=\"button\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.tabindex]=\"tabIndex\"\n [attr.title]=\"ariaLabel\"\n [disabled]=\"disabled\"\n [ngClass]=\"{\n 'sky-token-btn-close-active': closeActive\n }\"\n (click)=\"dismissToken($event)\"\n (document:mouseup)=\"setCloseActive(false)\"\n (mousedown)=\"setCloseActive(true)\"\n >\n <sky-icon class=\"sky-token-btn-close-icon-default\" icon=\"times\"></sky-icon>\n <sky-icon\n class=\"sky-token-btn-close-icon-modern\"\n icon=\"close\"\n iconType=\"skyux\"\n >\n </sky-icon>\n </button>\n</div>\n", styles: [".sky-token{background-color:#c1e8fb;border:1px solid #00b4f1;overflow:hidden;padding:2px 8px;display:inline-block;-webkit-user-select:none;user-select:none}.sky-token:hover,.sky-token:focus{background-color:#91d6f8;border-color:#008ebe;cursor:pointer}.sky-token:focus{box-shadow:0 0 8px #00b4f199;border:1px solid #00b4f1;outline:none}.sky-btn-disabled{cursor:default;-webkit-user-select:none;user-select:none}.sky-token-btn-close{background:transparent;padding:0;border:0;margin-left:2px;opacity:.9}.sky-token-btn-close:hover,.sky-token-btn-close:focus{opacity:1}.sky-token-btn-close-icon-modern{display:none}:host-context(.sky-theme-modern) .sky-token{align-items:center;display:inline-flex;padding:1px 5px;font-size:14px}:host-context(.sky-theme-modern) .sky-token.sky-btn-disabled{color:#212327}:host-context(.sky-theme-modern) .sky-token:not(.sky-btn-disabled){border:none;box-shadow:inset 0 0 0 1px #81d4f7}:host-context(.sky-theme-modern) .sky-token.sky-token-dismissable{padding-right:1px}:host-context(.sky-theme-modern) .sky-token:hover:not(:active){border:none;box-shadow:inset 0 0 0 1px #1870b8}:host-context(.sky-theme-modern) .sky-token.sky-token-active{border:none;box-shadow:inset 0 0 0 2px #1870b8}:host-context(.sky-theme-modern) .sky-token:focus:not(:active){border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d}:host-context(.sky-theme-modern) .sky-token:focus,:host-context(.sky-theme-modern) .sky-token:hover{background-color:#c1e8fb}:host-context(.sky-theme-modern) .sky-token-btn-close{align-items:center;border-radius:5px;display:flex;height:20px;margin-left:5px;width:20px}:host-context(.sky-theme-modern) .sky-token-btn-close:hover{border:none;box-shadow:inset 0 0 0 1px transparent}:host-context(.sky-theme-modern) .sky-token-btn-close.sky-token-btn-close-active{border:none;box-shadow:inset 0 0 0 2px #1870b8}:host-context(.sky-theme-modern) .sky-token-btn-close:focus{outline:none}:host-context(.sky-theme-modern) .sky-token-btn-close:focus:not(:active){border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d}:host-context(.sky-theme-modern) .sky-token-btn-close-icon-default{display:none}:host-context(.sky-theme-modern) .sky-token-btn-close-icon-modern{display:inline-block;width:100%}.sky-theme-modern .sky-token{align-items:center;display:inline-flex;padding:1px 5px;font-size:14px}.sky-theme-modern .sky-token.sky-btn-disabled{color:#212327}.sky-theme-modern .sky-token:not(.sky-btn-disabled){border:none;box-shadow:inset 0 0 0 1px #81d4f7}.sky-theme-modern .sky-token.sky-token-dismissable{padding-right:1px}.sky-theme-modern .sky-token:hover:not(:active){border:none;box-shadow:inset 0 0 0 1px #1870b8}.sky-theme-modern .sky-token.sky-token-active{border:none;box-shadow:inset 0 0 0 2px #1870b8}.sky-theme-modern .sky-token:focus:not(:active){border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d}.sky-theme-modern .sky-token:focus,.sky-theme-modern .sky-token:hover{background-color:#c1e8fb}.sky-theme-modern .sky-token-btn-close{align-items:center;border-radius:5px;display:flex;height:20px;margin-left:5px;width:20px}.sky-theme-modern .sky-token-btn-close:hover{border:none;box-shadow:inset 0 0 0 1px transparent}.sky-theme-modern .sky-token-btn-close.sky-token-btn-close-active{border:none;box-shadow:inset 0 0 0 2px #1870b8}.sky-theme-modern .sky-token-btn-close:focus{outline:none}.sky-theme-modern .sky-token-btn-close:focus:not(:active){border:none;box-shadow:inset 0 0 0 2px #1870b8,0 1px 3px #0000004d}.sky-theme-modern .sky-token-btn-close-icon-default{display:none}.sky-theme-modern .sky-token-btn-close-icon-modern{display:inline-block;width:100%}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-token{background-color:#c1e8fb}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-token,:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-token-btn-close{color:#212327}.sky-theme-modern.sky-theme-mode-dark .sky-token{background-color:#c1e8fb}.sky-theme-modern.sky-theme-mode-dark .sky-token,.sky-theme-modern.sky-theme-mode-dark .sky-token-btn-close{color:#212327}\n"] }]
980
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.SkyLibResourcesService }]; }, propDecorators: { disabled: [{
981
+ type: Input
982
+ }], ariaLabel: [{
983
+ type: Input
984
+ }], dismissible: [{
985
+ type: Input
986
+ }], focusable: [{
987
+ type: Input
988
+ }], dismiss: [{
989
+ type: Output
990
+ }], tokenFocus: [{
991
+ type: Output
992
+ }] } });
993
+
994
+ var SkyTokensMessageType;
995
+ (function (SkyTokensMessageType) {
996
+ /**
997
+ * Places focus on the last token in the list.
998
+ */
999
+ SkyTokensMessageType[SkyTokensMessageType["FocusLastToken"] = 0] = "FocusLastToken";
1000
+ /**
1001
+ * Places focus on the token that is currently selected.
1002
+ */
1003
+ SkyTokensMessageType[SkyTokensMessageType["FocusActiveToken"] = 1] = "FocusActiveToken";
1004
+ /**
1005
+ * Places focus on the token before the currently selected token.
1006
+ */
1007
+ SkyTokensMessageType[SkyTokensMessageType["FocusPreviousToken"] = 2] = "FocusPreviousToken";
1008
+ /**
1009
+ * Places focus on the token after the currently selected token.
1010
+ */
1011
+ SkyTokensMessageType[SkyTokensMessageType["FocusNextToken"] = 3] = "FocusNextToken";
1012
+ /**
1013
+ * Removes the token that is currently selected from the list of tokens.
1014
+ */
1015
+ SkyTokensMessageType[SkyTokensMessageType["RemoveActiveToken"] = 4] = "RemoveActiveToken";
1016
+ })(SkyTokensMessageType || (SkyTokensMessageType = {}));
1017
+
1018
+ class SkyTokensComponent {
1019
+ constructor(changeDetector) {
1020
+ this.changeDetector = changeDetector;
1021
+ /**
1022
+ * Fires when users navigate through the tokens list with the `Tab` key
1023
+ * and attempt to move past the final token in the list.
1024
+ */
1025
+ this.focusIndexOverRange = new EventEmitter();
1026
+ /**
1027
+ * Fires when usersnavigate through the tokens list with the `Tab` key
1028
+ * and attempt to move before the first token in the list.
1029
+ */
1030
+ this.focusIndexUnderRange = new EventEmitter();
1031
+ /**
1032
+ * Fires when users select a token in the list. This event emits the selected token.
1033
+ */
1034
+ this.tokenSelected = new EventEmitter();
1035
+ /**
1036
+ * Fires when the tokens in the list change.
1037
+ * This event emits an array of the tokens in the updated list.
1038
+ */
1039
+ this.tokensChange = new EventEmitter();
1040
+ this.ngUnsubscribe = new Subject();
1041
+ // Angular calls the trackBy function without applying the component instance's scope.
1042
+ // Use a fat-arrow function so the current component instance's trackWith property can
1043
+ // be referenced.
1044
+ this.trackTokenFn = (_index, item) => {
1045
+ if (this.trackWith) {
1046
+ return item.value[this.trackWith];
1047
+ }
1048
+ return item;
1049
+ };
1050
+ }
1051
+ /**
1052
+ * Indicates whether to disable the tokens list to prevent users from selecting tokens,
1053
+ * dismissing tokens, or navigating through the list with the arrow keys. When the tokens list
1054
+ * is disabled, users can still place focus on items in the list using the `Tab` key.
1055
+ * @default false
1056
+ */
1057
+ set disabled(value) {
1058
+ this._disabled = value;
1059
+ }
1060
+ get disabled() {
1061
+ return !!this._disabled;
1062
+ }
1063
+ /**
1064
+ * Indicates whether users can remove tokens from the list by selecting their close buttons
1065
+ * or pressing the `Backspace` key.
1066
+ * @default true
1067
+ */
1068
+ set dismissible(value) {
1069
+ this._dismissible = value;
1070
+ }
1071
+ get dismissible() {
1072
+ return this._dismissible !== false;
1073
+ }
1074
+ /**
1075
+ * Specifies the token property to display for each item in the tokens list.
1076
+ * @default "name"
1077
+ */
1078
+ set displayWith(value) {
1079
+ this._displayWith = value;
1080
+ }
1081
+ get displayWith() {
1082
+ return this._displayWith || 'name';
1083
+ }
1084
+ /**
1085
+ * Indicates whether users can focus on items in the list using the `Tab` key.
1086
+ * This does not affect the ability of users to select tokens, dismiss tokens,
1087
+ * or navigate through the list with the arrow keys.
1088
+ * @default true
1089
+ */
1090
+ set focusable(value) {
1091
+ this._focusable = value;
1092
+ }
1093
+ get focusable() {
1094
+ return this._focusable !== false;
1095
+ }
1096
+ /**
1097
+ * Specifies an array of tokens to include in the list.
1098
+ */
1099
+ set tokens(value) {
1100
+ this._tokens = value;
1101
+ this.tokensChange.emit(this._tokens);
1102
+ }
1103
+ get tokens() {
1104
+ return this._tokens || [];
1105
+ }
1106
+ /**
1107
+ * Specifies an observable of `SkyTokensMessage` that can place focus on a
1108
+ * particular token or remove the active token from the list.
1109
+ */
1110
+ set messageStream(value) {
1111
+ this._messageStream = value;
1112
+ this.initMessageStream();
1113
+ }
1114
+ get messageStream() {
1115
+ return this._messageStream;
1116
+ }
1117
+ /**
1118
+ * @internal
1119
+ */
1120
+ get activeIndex() {
1121
+ return this._activeIndex || 0;
1122
+ }
1123
+ set activeIndex(value) {
1124
+ if (value >= this.tokens.length) {
1125
+ value = this.tokens.length - 1;
1126
+ this.focusIndexOverRange.emit();
1127
+ }
1128
+ if (value < 0) {
1129
+ value = 0;
1130
+ this.focusIndexUnderRange.emit();
1131
+ }
1132
+ this._activeIndex = value;
1133
+ }
1134
+ ngOnDestroy() {
1135
+ this.ngUnsubscribe.next();
1136
+ this.ngUnsubscribe.complete();
1137
+ }
1138
+ onTokenClick(token) {
1139
+ if (this.disabled) {
1140
+ return;
1141
+ }
1142
+ this.notifyTokenSelected(token);
1143
+ }
1144
+ onTokenKeyDown(event) {
1145
+ if (!this.disabled) {
1146
+ switch (event.key) {
1147
+ case 'Left':
1148
+ case 'ArrowLeft':
1149
+ this.messageStream.next({
1150
+ type: SkyTokensMessageType.FocusPreviousToken,
1151
+ });
1152
+ event.preventDefault();
1153
+ break;
1154
+ case 'Right':
1155
+ case 'ArrowRight':
1156
+ this.messageStream.next({
1157
+ type: SkyTokensMessageType.FocusNextToken,
1158
+ });
1159
+ event.preventDefault();
1160
+ break;
1161
+ }
1162
+ }
1163
+ }
1164
+ selectToken(token) {
1165
+ if (!this.disabled) {
1166
+ this.notifyTokenSelected(token);
1167
+ }
1168
+ }
1169
+ removeToken(token) {
1170
+ this.tokens = this.tokens.filter((t) => t !== token);
1171
+ this.changeDetector.detectChanges();
1172
+ }
1173
+ focusPreviousToken() {
1174
+ this.activeIndex--;
1175
+ this.focusActiveToken();
1176
+ }
1177
+ focusNextToken() {
1178
+ this.activeIndex++;
1179
+ this.focusActiveToken();
1180
+ }
1181
+ focusLastToken() {
1182
+ this.activeIndex = this.tokenComponents.length - 1;
1183
+ this.focusActiveToken();
1184
+ }
1185
+ focusActiveToken() {
1186
+ const tokenComponent = this.tokenComponents.find((_comp, i) => {
1187
+ return this.activeIndex === i;
1188
+ });
1189
+ if (tokenComponent) {
1190
+ tokenComponent.focusElement();
1191
+ }
1192
+ }
1193
+ removeActiveToken() {
1194
+ const token = this.tokens[this.activeIndex];
1195
+ if (token) {
1196
+ this.removeToken(token);
1197
+ }
1198
+ }
1199
+ initMessageStream() {
1200
+ if (this.messageStreamSub) {
1201
+ this.messageStreamSub.unsubscribe();
1202
+ }
1203
+ if (this.messageStream) {
1204
+ this.messageStreamSub = this.messageStream
1205
+ .pipe(takeUntil(this.ngUnsubscribe))
1206
+ .subscribe((message) => {
1207
+ switch (message.type) {
1208
+ case SkyTokensMessageType.FocusLastToken:
1209
+ this.focusLastToken();
1210
+ break;
1211
+ case SkyTokensMessageType.FocusActiveToken:
1212
+ this.focusActiveToken();
1213
+ break;
1214
+ case SkyTokensMessageType.FocusPreviousToken:
1215
+ this.focusPreviousToken();
1216
+ break;
1217
+ case SkyTokensMessageType.FocusNextToken:
1218
+ this.focusNextToken();
1219
+ break;
1220
+ case SkyTokensMessageType.RemoveActiveToken:
1221
+ this.removeActiveToken();
1222
+ break;
1223
+ }
1224
+ });
1225
+ }
1226
+ }
1227
+ notifyTokenSelected(token) {
1228
+ this.tokenSelected.emit({
1229
+ token,
1230
+ });
1231
+ }
1232
+ }
1233
+ SkyTokensComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyTokensComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1234
+ SkyTokensComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyTokensComponent, selector: "sky-tokens", inputs: { disabled: "disabled", dismissible: "dismissible", displayWith: "displayWith", trackWith: "trackWith", focusable: "focusable", tokens: "tokens", messageStream: "messageStream" }, outputs: { focusIndexOverRange: "focusIndexOverRange", focusIndexUnderRange: "focusIndexUnderRange", tokenSelected: "tokenSelected", tokensChange: "tokensChange" }, viewQueries: [{ propertyName: "tokenComponents", predicate: SkyTokenComponent, descendants: true }], ngImport: i0, template: "<div\n *ngIf=\"tokens\"\n class=\"sky-tokens\"\n [@blockAnimationOnLoad]\n [attr.role]=\"tokens && tokens.length ? 'list' : null\"\n>\n <sky-token\n *ngFor=\"let token of tokens; let i = index; trackBy: trackTokenFn\"\n role=\"listitem\"\n [@.disabled]=\"!trackWith\"\n [@dismiss]\n [disabled]=\"disabled\"\n [dismissible]=\"dismissible\"\n [focusable]=\"focusable\"\n (dismiss)=\"removeToken(token)\"\n (click)=\"onTokenClick(token)\"\n (keydown)=\"onTokenKeyDown($event)\"\n (keyup.enter)=\"selectToken(token); $event.preventDefault()\"\n (tokenFocus)=\"activeIndex = i\"\n >\n {{ token.value[displayWith] }}\n </sky-token>\n <div class=\"sky-tokens-content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";.sky-tokens{display:flex;flex-wrap:wrap;align-items:baseline;margin:-2px}.sky-tokens .sky-tokens-content,.sky-tokens ::ng-deep sky-token{flex:0 0 auto;display:inline-flex;padding:2px}.sky-tokens .sky-tokens-content{flex-grow:1;flex-basis:0px}.sky-tokens .sky-tokens-content:before{content:\"\\200b\"}\n"], components: [{ type: SkyTokenComponent, selector: "sky-token", inputs: ["disabled", "ariaLabel", "dismissible", "focusable"], outputs: ["dismiss", "tokenFocus"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], animations: [
1235
+ trigger('blockAnimationOnLoad', [transition(':enter', [])]),
1236
+ trigger('dismiss', [
1237
+ transition(':enter', [
1238
+ style({
1239
+ opacity: 0,
1240
+ width: 0,
1241
+ }),
1242
+ animate('150ms ease-in', style({
1243
+ opacity: 1,
1244
+ width: '*',
1245
+ })),
1246
+ ]),
1247
+ transition(':leave', [
1248
+ animate('150ms ease-in', style({
1249
+ opacity: 0,
1250
+ width: 0,
1251
+ })),
1252
+ ]),
1253
+ ]),
1254
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1255
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyTokensComponent, decorators: [{
1256
+ type: Component,
1257
+ args: [{ selector: 'sky-tokens', changeDetection: ChangeDetectionStrategy.OnPush, animations: [
1258
+ trigger('blockAnimationOnLoad', [transition(':enter', [])]),
1259
+ trigger('dismiss', [
1260
+ transition(':enter', [
1261
+ style({
1262
+ opacity: 0,
1263
+ width: 0,
1264
+ }),
1265
+ animate('150ms ease-in', style({
1266
+ opacity: 1,
1267
+ width: '*',
1268
+ })),
1269
+ ]),
1270
+ transition(':leave', [
1271
+ animate('150ms ease-in', style({
1272
+ opacity: 0,
1273
+ width: 0,
1274
+ })),
1275
+ ]),
1276
+ ]),
1277
+ ], template: "<div\n *ngIf=\"tokens\"\n class=\"sky-tokens\"\n [@blockAnimationOnLoad]\n [attr.role]=\"tokens && tokens.length ? 'list' : null\"\n>\n <sky-token\n *ngFor=\"let token of tokens; let i = index; trackBy: trackTokenFn\"\n role=\"listitem\"\n [@.disabled]=\"!trackWith\"\n [@dismiss]\n [disabled]=\"disabled\"\n [dismissible]=\"dismissible\"\n [focusable]=\"focusable\"\n (dismiss)=\"removeToken(token)\"\n (click)=\"onTokenClick(token)\"\n (keydown)=\"onTokenKeyDown($event)\"\n (keyup.enter)=\"selectToken(token); $event.preventDefault()\"\n (tokenFocus)=\"activeIndex = i\"\n >\n {{ token.value[displayWith] }}\n </sky-token>\n <div class=\"sky-tokens-content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";.sky-tokens{display:flex;flex-wrap:wrap;align-items:baseline;margin:-2px}.sky-tokens .sky-tokens-content,.sky-tokens ::ng-deep sky-token{flex:0 0 auto;display:inline-flex;padding:2px}.sky-tokens .sky-tokens-content{flex-grow:1;flex-basis:0px}.sky-tokens .sky-tokens-content:before{content:\"\\200b\"}\n"] }]
1278
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { disabled: [{
1279
+ type: Input
1280
+ }], dismissible: [{
1281
+ type: Input
1282
+ }], displayWith: [{
1283
+ type: Input
1284
+ }], trackWith: [{
1285
+ type: Input
1286
+ }], focusable: [{
1287
+ type: Input
1288
+ }], tokens: [{
1289
+ type: Input
1290
+ }], messageStream: [{
1291
+ type: Input
1292
+ }], focusIndexOverRange: [{
1293
+ type: Output
1294
+ }], focusIndexUnderRange: [{
1295
+ type: Output
1296
+ }], tokenSelected: [{
1297
+ type: Output
1298
+ }], tokensChange: [{
1299
+ type: Output
1300
+ }], tokenComponents: [{
1301
+ type: ViewChildren,
1302
+ args: [SkyTokenComponent]
1303
+ }] } });
1304
+
1305
+ class SkyTokensModule {
1306
+ }
1307
+ SkyTokensModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyTokensModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1308
+ SkyTokensModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyTokensModule, declarations: [SkyTokenComponent, SkyTokensComponent], imports: [CommonModule,
1309
+ SkyI18nModule,
1310
+ SkyIconModule,
1311
+ SkyIndicatorsResourcesModule], exports: [SkyTokenComponent, SkyTokensComponent] });
1312
+ SkyTokensModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyTokensModule, imports: [[
1313
+ CommonModule,
1314
+ SkyI18nModule,
1315
+ SkyIconModule,
1316
+ SkyIndicatorsResourcesModule,
1317
+ ]] });
1318
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyTokensModule, decorators: [{
1319
+ type: NgModule,
1320
+ args: [{
1321
+ declarations: [SkyTokenComponent, SkyTokensComponent],
1322
+ imports: [
1323
+ CommonModule,
1324
+ SkyI18nModule,
1325
+ SkyIconModule,
1326
+ SkyIndicatorsResourcesModule,
1327
+ ],
1328
+ exports: [SkyTokenComponent, SkyTokensComponent],
1329
+ }]
1330
+ }] });
1331
+
1332
+ // Need to add the following to classes which contain static methods.
1333
+ // See: https://github.com/ng-packagr/ng-packagr/issues/641
1334
+ /**
1335
+ * @internal
1336
+ * @dynamic
1337
+ */
1338
+ class SkyWaitAdapterService {
1339
+ constructor(rendererFactory) {
1340
+ this.rendererFactory = rendererFactory;
1341
+ this.renderer = this.rendererFactory.createRenderer(undefined, undefined);
1342
+ }
1343
+ ngOnDestroy() {
1344
+ this.clearListeners();
1345
+ }
1346
+ setWaitBounds(waitEl) {
1347
+ this.renderer.setStyle(waitEl.nativeElement.parentElement, 'position', 'relative');
1348
+ }
1349
+ removeWaitBounds(waitEl) {
1350
+ this.renderer.removeStyle(waitEl.nativeElement.parentElement, 'position');
1351
+ }
1352
+ setBusyState(waitEl, isFullPage, isWaiting, isNonBlocking = false, waitComponentId) {
1353
+ const busyEl = isFullPage
1354
+ ? document.body
1355
+ : waitEl.nativeElement.parentElement;
1356
+ if (!isNonBlocking) {
1357
+ if (isWaiting) {
1358
+ this.renderer.setAttribute(busyEl, 'aria-busy', 'true');
1359
+ // Remove focus from page when full page blocking wait
1360
+ if (isFullPage || busyEl.contains(document.activeElement)) {
1361
+ this.clearDocumentFocus();
1362
+ }
1363
+ if (isFullPage) {
1364
+ SkyWaitAdapterService.isPageWaitActive = true;
1365
+ const endListenerFunc = this.renderer.listen(document.body, 'keydown', (event) => {
1366
+ /*istanbul ignore else */
1367
+ if (event.key) {
1368
+ /* istanbul ignore else */
1369
+ if (event.key.toLowerCase() === 'tab') {
1370
+ event.target.blur();
1371
+ event.preventDefault();
1372
+ event.stopPropagation();
1373
+ event.stopImmediatePropagation();
1374
+ this.clearDocumentFocus();
1375
+ }
1376
+ }
1377
+ });
1378
+ SkyWaitAdapterService.busyElements[waitComponentId] = {
1379
+ listener: endListenerFunc,
1380
+ busyEl: undefined,
1381
+ };
1382
+ }
1383
+ else {
1384
+ const endListenerFunc = this.renderer.listen(busyEl, 'focusin', (event) => {
1385
+ /* istanbul ignore else */
1386
+ if (!isNonBlocking) {
1387
+ event.preventDefault();
1388
+ event.stopPropagation();
1389
+ event.stopImmediatePropagation();
1390
+ if (SkyWaitAdapterService.isPageWaitActive) {
1391
+ this.clearDocumentFocus();
1392
+ }
1393
+ else {
1394
+ // Propagate tab navigation if attempted into waited element
1395
+ const target = event.target;
1396
+ target.blur();
1397
+ this.focusNextElement(target, this.isShift(event), busyEl);
1398
+ }
1399
+ }
1400
+ });
1401
+ SkyWaitAdapterService.busyElements[waitComponentId] = {
1402
+ listener: endListenerFunc,
1403
+ busyEl: busyEl,
1404
+ };
1405
+ }
1406
+ }
1407
+ else {
1408
+ this.renderer.removeAttribute(busyEl, 'aria-busy');
1409
+ if (isFullPage) {
1410
+ SkyWaitAdapterService.isPageWaitActive = false;
1411
+ }
1412
+ if (waitComponentId in SkyWaitAdapterService.busyElements) {
1413
+ SkyWaitAdapterService.busyElements[waitComponentId].listener();
1414
+ delete SkyWaitAdapterService.busyElements[waitComponentId];
1415
+ }
1416
+ }
1417
+ }
1418
+ }
1419
+ focusNextElement(targetElement, shiftKey, busyEl) {
1420
+ const focussable = this.getFocussableElements();
1421
+ // If shift tab, go in the other direction
1422
+ const modifier = shiftKey ? -1 : 1;
1423
+ // Find the next navigable element that isn't waiting
1424
+ const startingIndex = focussable.indexOf(targetElement);
1425
+ let curIndex = startingIndex + modifier;
1426
+ while (focussable[curIndex] &&
1427
+ this.isElementBusyOrHidden(focussable[curIndex])) {
1428
+ curIndex += modifier;
1429
+ }
1430
+ if (focussable[curIndex] &&
1431
+ !this.isElementBusyOrHidden(focussable[curIndex])) {
1432
+ focussable[curIndex].focus();
1433
+ }
1434
+ else {
1435
+ // Try wrapping the navigation
1436
+ /* istanbul ignore next */
1437
+ /* sanity check */
1438
+ curIndex = modifier > 0 ? 0 : focussable.length - 1;
1439
+ while (curIndex !== startingIndex &&
1440
+ focussable[curIndex] &&
1441
+ this.isElementBusyOrHidden(focussable[curIndex])) {
1442
+ /* istanbul ignore next */
1443
+ /* sanity check */
1444
+ curIndex += modifier;
1445
+ }
1446
+ /* istanbul ignore else */
1447
+ /* sanity check */
1448
+ if (focussable[curIndex] &&
1449
+ !this.isElementBusyOrHidden(focussable[curIndex])) {
1450
+ focussable[curIndex].focus();
1451
+ }
1452
+ else {
1453
+ // No valid target, wipe focus
1454
+ this.clearDocumentFocus();
1455
+ }
1456
+ }
1457
+ // clear focussableElements list
1458
+ this.focussableElements = undefined;
1459
+ }
1460
+ isShift(event) {
1461
+ // Determine if shift+tab was used based on element order
1462
+ const elements = this.getFocussableElements().filter((elem) => !this.isElementHidden(elem));
1463
+ const previousInd = elements.indexOf(event.relatedTarget);
1464
+ const currentInd = elements.indexOf(event.target);
1465
+ return (previousInd === currentInd + 1 ||
1466
+ (previousInd === 0 && currentInd === elements.length - 1) ||
1467
+ previousInd > currentInd ||
1468
+ !event.relatedTarget);
1469
+ }
1470
+ isElementHidden(element) {
1471
+ const style = window.getComputedStyle(element);
1472
+ return style.display === 'none' || style.visibility === 'hidden';
1473
+ }
1474
+ isElementBusyOrHidden(element) {
1475
+ if (this.isElementHidden(element)) {
1476
+ return true;
1477
+ }
1478
+ for (const key of Object.keys(SkyWaitAdapterService.busyElements)) {
1479
+ const parentElement = SkyWaitAdapterService.busyElements[key].busyEl;
1480
+ if (parentElement && parentElement.contains(element)) {
1481
+ return true;
1482
+ }
1483
+ }
1484
+ return false;
1485
+ }
1486
+ clearDocumentFocus() {
1487
+ /* istanbul ignore else */
1488
+ if (document.activeElement && document.activeElement.blur) {
1489
+ document.activeElement.blur();
1490
+ }
1491
+ document.body.focus();
1492
+ }
1493
+ getFocussableElements() {
1494
+ // Keep this cached so we can reduce querys
1495
+ if (this.focussableElements) {
1496
+ return this.focussableElements;
1497
+ }
1498
+ // Select all possible focussable elements
1499
+ const focussableElements = 'a[href], ' +
1500
+ 'area[href], ' +
1501
+ "input:not([disabled]):not([tabindex='-1']), " +
1502
+ "button:not([disabled]):not([tabindex='-1']), " +
1503
+ "select:not([disabled]):not([tabindex='-1']), " +
1504
+ "textarea:not([disabled]):not([tabindex='-1']), " +
1505
+ 'iframe, object, embed, ' +
1506
+ "*[tabindex]:not([tabindex='-1']), " +
1507
+ '*[contenteditable=true]';
1508
+ this.focussableElements = Array.prototype.filter.call(document.body.querySelectorAll(focussableElements), (element) => {
1509
+ return (element.offsetWidth > 0 ||
1510
+ element.offsetHeight > 0 ||
1511
+ element === document.activeElement);
1512
+ });
1513
+ return this.focussableElements;
1514
+ }
1515
+ clearListeners() {
1516
+ SkyWaitAdapterService.isPageWaitActive = false;
1517
+ for (const key of Object.keys(SkyWaitAdapterService.busyElements)) {
1518
+ SkyWaitAdapterService.busyElements[key].listener();
1519
+ delete SkyWaitAdapterService.busyElements[key];
1520
+ }
1521
+ }
1522
+ }
1523
+ SkyWaitAdapterService.isPageWaitActive = false;
1524
+ SkyWaitAdapterService.busyElements = {};
1525
+ SkyWaitAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyWaitAdapterService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
1526
+ SkyWaitAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyWaitAdapterService });
1527
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyWaitAdapterService, decorators: [{
1528
+ type: Injectable
1529
+ }], ctorParameters: function () { return [{ type: i0.RendererFactory2 }]; } });
1530
+
1531
+ let nextId = 0;
1532
+ class SkyWaitComponent {
1533
+ constructor(elRef, adapterService, resourceService) {
1534
+ this.elRef = elRef;
1535
+ this.adapterService = adapterService;
1536
+ this.resourceService = resourceService;
1537
+ this.ariaLabelStream = new BehaviorSubject('');
1538
+ this.id = `sky-wait-${++nextId}`;
1539
+ }
1540
+ /**
1541
+ * When set to `true`, wait indication appears on the parent element of the `sky-wait` component.
1542
+ */
1543
+ set isWaiting(value) {
1544
+ if (value && !this._isFullPage) {
1545
+ this.adapterService.setWaitBounds(this.elRef);
1546
+ }
1547
+ else if (!value && !this._isFullPage) {
1548
+ this.adapterService.removeWaitBounds(this.elRef);
1549
+ }
1550
+ this.adapterService.setBusyState(this.elRef, this.isFullPage, value, this.isNonBlocking, this.id);
1551
+ this._isWaiting = value;
1552
+ }
1553
+ get isWaiting() {
1554
+ return this._isWaiting;
1555
+ }
1556
+ /**
1557
+ * When set to `true`, wait indication appears on the page level instead of the
1558
+ * parent element level. We recommend that you use the `beginBlockingPageWait` or
1559
+ * `beginNonBlockingPageWait` functions of the `SkyWaitService` instead of setting this
1560
+ * on the component level.
1561
+ * @default false
1562
+ */
1563
+ set isFullPage(value) {
1564
+ /* istanbul ignore else: untestable */
1565
+ if (value) {
1566
+ this.adapterService.removeWaitBounds(this.elRef);
1567
+ }
1568
+ else if (!value && this._isWaiting) {
1569
+ this.adapterService.setWaitBounds(this.elRef);
1570
+ }
1571
+ this._isFullPage = value;
1572
+ }
1573
+ get isFullPage() {
1574
+ return this._isFullPage;
1575
+ }
1576
+ ngOnInit() {
1577
+ this.publishAriaLabel();
1578
+ }
1579
+ publishAriaLabel() {
1580
+ if (this.ariaLabel) {
1581
+ this.ariaLabelStream.next(this.ariaLabel);
1582
+ return;
1583
+ }
1584
+ /* istanbul ignore else */
1585
+ if (this.resourceService) {
1586
+ const type = this.isFullPage ? '_page' : '';
1587
+ const blocking = this.isNonBlocking ? '' : '_blocking';
1588
+ const key = `skyux_wait${type}${blocking}_aria_alt_text`;
1589
+ this.resourceService.getString(key).subscribe((value) => {
1590
+ this.ariaLabelStream.next(value);
1591
+ });
1592
+ }
1593
+ }
1594
+ }
1595
+ SkyWaitComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyWaitComponent, deps: [{ token: i0.ElementRef }, { token: SkyWaitAdapterService }, { token: i1$1.SkyLibResourcesService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1596
+ SkyWaitComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyWaitComponent, selector: "sky-wait", inputs: { ariaLabel: "ariaLabel", isWaiting: "isWaiting", isFullPage: "isFullPage", isNonBlocking: "isNonBlocking" }, providers: [SkyWaitAdapterService], ngImport: i0, template: "<div class=\"sky-wait-container\">\n <div\n *ngIf=\"isWaiting\"\n class=\"sky-wait-mask\"\n [attr.aria-label]=\"ariaLabelStream | async\"\n [ngClass]=\"{\n 'sky-wait-mask-loading-fixed': isFullPage,\n 'sky-wait-mask-loading-non-blocking': isNonBlocking,\n 'sky-wait-mask-loading-blocking': !isNonBlocking\n }\"\n >\n <div class=\"sky-wait\">\n <div class=\"sky-wait-double-bounce1\"></div>\n <div class=\"sky-wait-double-bounce2\"></div>\n </div>\n </div>\n</div>\n", styles: [".sky-wait-mask-loading-blocking{margin:auto;position:absolute;top:0;right:0;left:0;bottom:0;background-color:#ffffffb3;z-index:1000}.sky-wait-mask-loading-fixed{position:fixed}.sky-wait{width:50px;height:50px;margin-top:-25px;margin-left:-25px;position:absolute;top:50%;left:50%}.sky-wait-mask-loading-non-blocking{bottom:0}.sky-wait-mask-loading-non-blocking .sky-wait{top:auto;right:auto;bottom:0;left:0;margin-left:auto;margin-right:auto}.sky-wait-double-bounce1,.sky-wait-double-bounce2{width:100%;height:100%;border-radius:50%;background-color:#72bf44;opacity:.6;position:absolute;top:0;left:0;animation:sk-bounce 2s infinite ease-in-out}.sky-wait-double-bounce2{animation-delay:-1s}@keyframes sk-bounce{0%,to{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}.sky-wait-container.sky-wait-active{position:relative}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i1.AsyncPipe } });
1597
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyWaitComponent, decorators: [{
1598
+ type: Component,
1599
+ args: [{ selector: 'sky-wait', providers: [SkyWaitAdapterService], template: "<div class=\"sky-wait-container\">\n <div\n *ngIf=\"isWaiting\"\n class=\"sky-wait-mask\"\n [attr.aria-label]=\"ariaLabelStream | async\"\n [ngClass]=\"{\n 'sky-wait-mask-loading-fixed': isFullPage,\n 'sky-wait-mask-loading-non-blocking': isNonBlocking,\n 'sky-wait-mask-loading-blocking': !isNonBlocking\n }\"\n >\n <div class=\"sky-wait\">\n <div class=\"sky-wait-double-bounce1\"></div>\n <div class=\"sky-wait-double-bounce2\"></div>\n </div>\n </div>\n</div>\n", styles: [".sky-wait-mask-loading-blocking{margin:auto;position:absolute;top:0;right:0;left:0;bottom:0;background-color:#ffffffb3;z-index:1000}.sky-wait-mask-loading-fixed{position:fixed}.sky-wait{width:50px;height:50px;margin-top:-25px;margin-left:-25px;position:absolute;top:50%;left:50%}.sky-wait-mask-loading-non-blocking{bottom:0}.sky-wait-mask-loading-non-blocking .sky-wait{top:auto;right:auto;bottom:0;left:0;margin-left:auto;margin-right:auto}.sky-wait-double-bounce1,.sky-wait-double-bounce2{width:100%;height:100%;border-radius:50%;background-color:#72bf44;opacity:.6;position:absolute;top:0;left:0;animation:sk-bounce 2s infinite ease-in-out}.sky-wait-double-bounce2{animation-delay:-1s}@keyframes sk-bounce{0%,to{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}.sky-wait-container.sky-wait-active{position:relative}\n"] }]
1600
+ }], ctorParameters: function () {
1601
+ return [{ type: i0.ElementRef }, { type: SkyWaitAdapterService }, { type: i1$1.SkyLibResourcesService, decorators: [{
1602
+ type: Optional
1603
+ }] }];
1604
+ }, propDecorators: { ariaLabel: [{
1605
+ type: Input
1606
+ }], isWaiting: [{
1607
+ type: Input
1608
+ }], isFullPage: [{
1609
+ type: Input
1610
+ }], isNonBlocking: [{
1611
+ type: Input
1612
+ }] } });
1613
+
1614
+ /**
1615
+ * @internal
1616
+ */
1617
+ class SkyWaitPageComponent {
1618
+ }
1619
+ SkyWaitPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyWaitPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1620
+ SkyWaitPageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyWaitPageComponent, selector: "sky-wait-page", inputs: { hasBlockingWait: "hasBlockingWait", hasNonBlockingWait: "hasNonBlockingWait" }, ngImport: i0, template: "<div class=\"sky-wait-page\">\n <sky-wait\n [isFullPage]=\"true\"\n [isNonBlocking]=\"true\"\n [isWaiting]=\"hasNonBlockingWait\"\n >\n </sky-wait>\n <sky-wait [isFullPage]=\"true\" [isWaiting]=\"hasBlockingWait\"> </sky-wait>\n</div>\n", styles: [".sky-wait-page ::ng-deep .sky-wait-mask-loading-fixed{z-index:2000}\n"], components: [{ type: SkyWaitComponent, selector: "sky-wait", inputs: ["ariaLabel", "isWaiting", "isFullPage", "isNonBlocking"] }] });
1621
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyWaitPageComponent, decorators: [{
1622
+ type: Component,
1623
+ args: [{ selector: 'sky-wait-page', template: "<div class=\"sky-wait-page\">\n <sky-wait\n [isFullPage]=\"true\"\n [isNonBlocking]=\"true\"\n [isWaiting]=\"hasNonBlockingWait\"\n >\n </sky-wait>\n <sky-wait [isFullPage]=\"true\" [isWaiting]=\"hasBlockingWait\"> </sky-wait>\n</div>\n", styles: [".sky-wait-page ::ng-deep .sky-wait-mask-loading-fixed{z-index:2000}\n"] }]
1624
+ }], propDecorators: { hasBlockingWait: [{
1625
+ type: Input
1626
+ }], hasNonBlockingWait: [{
1627
+ type: Input
1628
+ }] } });
1629
+
1630
+ class SkyWaitModule {
1631
+ }
1632
+ SkyWaitModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyWaitModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1633
+ SkyWaitModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyWaitModule, declarations: [SkyWaitComponent, SkyWaitPageComponent], imports: [CommonModule, SkyI18nModule, SkyIndicatorsResourcesModule], exports: [SkyWaitComponent] });
1634
+ SkyWaitModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyWaitModule, imports: [[CommonModule, SkyI18nModule, SkyIndicatorsResourcesModule]] });
1635
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyWaitModule, decorators: [{
1636
+ type: NgModule,
1637
+ args: [{
1638
+ declarations: [SkyWaitComponent, SkyWaitPageComponent],
1639
+ imports: [CommonModule, SkyI18nModule, SkyIndicatorsResourcesModule],
1640
+ exports: [SkyWaitComponent],
1641
+ }]
1642
+ }] });
1643
+
1644
+ /**
1645
+ * @internal
1646
+ */
1647
+ class SkyWaitPageAdapterService {
1648
+ addPageWaitEl() {
1649
+ document.body.appendChild(document.createElement('sky-wait-page'));
1650
+ }
1651
+ removePageWaitEl() {
1652
+ const waitEl = document.querySelector('sky-wait-page');
1653
+ if (waitEl) {
1654
+ document.body.removeChild(waitEl);
1655
+ }
1656
+ }
1657
+ }
1658
+ SkyWaitPageAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyWaitPageAdapterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1659
+ SkyWaitPageAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyWaitPageAdapterService, providedIn: 'root' });
1660
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyWaitPageAdapterService, decorators: [{
1661
+ type: Injectable,
1662
+ args: [{
1663
+ providedIn: 'root',
1664
+ }]
1665
+ }] });
1666
+
1667
+ // Need to add the following to classes which contain static methods.
1668
+ // See: https://github.com/ng-packagr/ng-packagr/issues/641
1669
+ // @dynamic
1670
+ class SkyWaitService {
1671
+ constructor(resolver, appRef, waitAdapter, windowSvc) {
1672
+ this.resolver = resolver;
1673
+ this.appRef = appRef;
1674
+ this.waitAdapter = waitAdapter;
1675
+ this.windowSvc = windowSvc;
1676
+ }
1677
+ /**
1678
+ * Starts a blocking page wait on the page.
1679
+ */
1680
+ beginBlockingPageWait() {
1681
+ this.beginPageWait(true);
1682
+ }
1683
+ /**
1684
+ * Starts a non-blocking page wait on the page.
1685
+ */
1686
+ beginNonBlockingPageWait() {
1687
+ this.beginPageWait(false);
1688
+ }
1689
+ /**
1690
+ * Ends a blocking page wait on the page. Blocking page wait indication
1691
+ * is removed when all running blocking page waits are ended.
1692
+ */
1693
+ endBlockingPageWait() {
1694
+ this.endPageWait(true);
1695
+ }
1696
+ /**
1697
+ * Ends a non-blocking page wait on the page. Non-blocking page wait indication
1698
+ * is removed when all running non-blocking page waits are ended.
1699
+ */
1700
+ endNonBlockingPageWait() {
1701
+ this.endPageWait(false);
1702
+ }
1703
+ /**
1704
+ * Clears all blocking and non-blocking page waits on the page.
1705
+ */
1706
+ clearAllPageWaits() {
1707
+ this.clearPageWait(true);
1708
+ this.clearPageWait(false);
1709
+ }
1710
+ /**
1711
+ * @internal
1712
+ */
1713
+ dispose() {
1714
+ if (SkyWaitService.waitComponent) {
1715
+ SkyWaitService.waitComponent = undefined;
1716
+ SkyWaitService.pageWaitBlockingCount = 0;
1717
+ SkyWaitService.pageWaitNonBlockingCount = 0;
1718
+ this.waitAdapter.removePageWaitEl();
1719
+ }
1720
+ }
1721
+ /**
1722
+ * Launches a page wait and automatically stops when the specific asynchronous event completes.
1723
+ */
1724
+ blockingWrap(observable) {
1725
+ return defer(() => {
1726
+ this.beginBlockingPageWait();
1727
+ return observable.pipe(finalize(() => this.endBlockingPageWait()));
1728
+ });
1729
+ }
1730
+ /**
1731
+ * Launches a non-blocking page wait and automatically stops when the specific
1732
+ * asynchronous event completes.
1733
+ */
1734
+ nonBlockingWrap(observable) {
1735
+ return defer(() => {
1736
+ this.beginNonBlockingPageWait();
1737
+ return observable.pipe(finalize(() => this.endNonBlockingPageWait()));
1738
+ });
1739
+ }
1740
+ setWaitComponentProperties(isBlocking) {
1741
+ if (isBlocking) {
1742
+ SkyWaitService.waitComponent.hasBlockingWait = true;
1743
+ SkyWaitService.pageWaitBlockingCount++;
1744
+ }
1745
+ else {
1746
+ SkyWaitService.waitComponent.hasNonBlockingWait = true;
1747
+ SkyWaitService.pageWaitNonBlockingCount++;
1748
+ }
1749
+ }
1750
+ beginPageWait(isBlocking) {
1751
+ if (!SkyWaitService.waitComponent) {
1752
+ /*
1753
+ Dynamic component creation needs to be done in a timeout to prevent ApplicationRef from
1754
+ crashing when wait service is called in Angular lifecycle functions.
1755
+ */
1756
+ this.windowSvc.nativeWindow.setTimeout(() => {
1757
+ // Ensuring here that we recheck this after the setTimeout is over so that we don't clash
1758
+ // with any other waits that are created.
1759
+ if (!SkyWaitService.waitComponent) {
1760
+ const factory = this.resolver.resolveComponentFactory(SkyWaitPageComponent);
1761
+ this.waitAdapter.addPageWaitEl();
1762
+ const cmpRef = this.appRef.bootstrap(factory);
1763
+ SkyWaitService.waitComponent = cmpRef.instance;
1764
+ }
1765
+ this.setWaitComponentProperties(isBlocking);
1766
+ });
1767
+ }
1768
+ else {
1769
+ this.setWaitComponentProperties(isBlocking);
1770
+ }
1771
+ }
1772
+ endPageWait(isBlocking) {
1773
+ /*
1774
+ Needs to yield so that wait creation can finish
1775
+ before it is dismissed in the event of a race.
1776
+ */
1777
+ this.windowSvc.nativeWindow.setTimeout(() => {
1778
+ if (SkyWaitService.waitComponent) {
1779
+ if (isBlocking) {
1780
+ if (SkyWaitService.pageWaitBlockingCount > 0) {
1781
+ SkyWaitService.pageWaitBlockingCount--;
1782
+ }
1783
+ if (SkyWaitService.pageWaitBlockingCount < 1) {
1784
+ SkyWaitService.waitComponent.hasBlockingWait = false;
1785
+ }
1786
+ }
1787
+ else {
1788
+ if (SkyWaitService.pageWaitNonBlockingCount > 0) {
1789
+ SkyWaitService.pageWaitNonBlockingCount--;
1790
+ }
1791
+ if (SkyWaitService.pageWaitNonBlockingCount < 1) {
1792
+ SkyWaitService.waitComponent.hasNonBlockingWait = false;
1793
+ }
1794
+ }
1795
+ }
1796
+ });
1797
+ }
1798
+ clearPageWait(isBlocking) {
1799
+ if (SkyWaitService.waitComponent) {
1800
+ if (isBlocking) {
1801
+ SkyWaitService.pageWaitBlockingCount = 0;
1802
+ SkyWaitService.waitComponent.hasBlockingWait = false;
1803
+ }
1804
+ else {
1805
+ SkyWaitService.pageWaitNonBlockingCount = 0;
1806
+ SkyWaitService.waitComponent.hasNonBlockingWait = false;
1807
+ }
1808
+ }
1809
+ }
1810
+ }
1811
+ SkyWaitService.pageWaitBlockingCount = 0;
1812
+ SkyWaitService.pageWaitNonBlockingCount = 0;
1813
+ SkyWaitService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyWaitService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }, { token: SkyWaitPageAdapterService }, { token: i1$2.SkyAppWindowRef }], target: i0.ɵɵFactoryTarget.Injectable });
1814
+ SkyWaitService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyWaitService, providedIn: 'root' });
1815
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyWaitService, decorators: [{
1816
+ type: Injectable,
1817
+ args: [{
1818
+ providedIn: 'root',
1819
+ }]
1820
+ }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: SkyWaitPageAdapterService }, { type: i1$2.SkyAppWindowRef }]; } });
1821
+
1822
+ /**
1823
+ * Generated bundle index. Do not edit.
1824
+ */
1825
+
1826
+ export { SkyAlertModule, SkyChevronModule, SkyExpansionIndicatorModule, SkyHelpInlineModule, SkyIconModule, SkyKeyInfoModule, SkyLabelModule, SkyStatusIndicatorModule, SkyTextHighlightModule, SkyTokensMessageType, SkyTokensModule, SkyWaitModule, SkyWaitService, SkyAlertComponent as λ1, SkyStatusIndicatorComponent as λ10, SkyTextHighlightDirective as λ11, SkyTokenComponent as λ12, SkyTokensComponent as λ13, SkyWaitComponent as λ14, SkyExpansionIndicatorComponent as λ15, SkyChevronComponent as λ2, SkyHelpInlineComponent as λ3, SkyIconComponent as λ4, SkyIconStackComponent as λ5, SkyKeyInfoLabelComponent as λ6, SkyKeyInfoValueComponent as λ7, SkyKeyInfoComponent as λ8, SkyLabelComponent as λ9 };
1827
+ //# sourceMappingURL=skyux-indicators.mjs.map