@skyux/indicators 5.7.2 → 6.0.0-beta.2

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