@skyux/indicators 5.2.0 → 5.5.0-beta.0

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 (200) hide show
  1. package/README.md +6 -4
  2. package/bundles/skyux-indicators.umd.js +210 -145
  3. package/documentation.json +524 -549
  4. package/esm2015/index.js +38 -0
  5. package/esm2015/index.js.map +1 -0
  6. package/esm2015/{modules → lib/modules}/alert/alert.component.js +4 -4
  7. package/esm2015/lib/modules/alert/alert.component.js.map +1 -0
  8. package/esm2015/lib/modules/alert/alert.module.js +38 -0
  9. package/esm2015/lib/modules/alert/alert.module.js.map +1 -0
  10. package/esm2015/lib/modules/chevron/chevron.component.js +66 -0
  11. package/esm2015/lib/modules/chevron/chevron.component.js.map +1 -0
  12. package/esm2015/lib/modules/chevron/chevron.module.js +38 -0
  13. package/esm2015/lib/modules/chevron/chevron.module.js.map +1 -0
  14. package/esm2015/lib/modules/expansion-indicator/expansion-indicator.component.js +35 -0
  15. package/esm2015/lib/modules/expansion-indicator/expansion-indicator.component.js.map +1 -0
  16. package/esm2015/lib/modules/expansion-indicator/expansion-indicator.module.js +19 -0
  17. package/esm2015/lib/modules/expansion-indicator/expansion-indicator.module.js.map +1 -0
  18. package/esm2015/{modules → lib/modules}/help-inline/help-inline.component.js +4 -4
  19. package/esm2015/lib/modules/help-inline/help-inline.component.js.map +1 -0
  20. package/esm2015/lib/modules/help-inline/help-inline.module.js +38 -0
  21. package/esm2015/lib/modules/help-inline/help-inline.module.js.map +1 -0
  22. package/esm2015/lib/modules/icon/icon-class-list.pipe.js +38 -0
  23. package/esm2015/lib/modules/icon/icon-class-list.pipe.js.map +1 -0
  24. package/esm2015/lib/modules/icon/icon-resolver.service.js +42 -0
  25. package/esm2015/lib/modules/icon/icon-resolver.service.js.map +1 -0
  26. package/esm2015/lib/modules/icon/icon-stack-item.js +2 -0
  27. package/esm2015/lib/modules/icon/icon-stack-item.js.map +1 -0
  28. package/esm2015/lib/modules/icon/icon-stack.component.js +23 -0
  29. package/esm2015/lib/modules/icon/icon-stack.component.js.map +1 -0
  30. package/esm2015/lib/modules/icon/icon.component.js +37 -0
  31. package/esm2015/lib/modules/icon/icon.component.js.map +1 -0
  32. package/esm2015/lib/modules/icon/icon.module.js +21 -0
  33. package/esm2015/lib/modules/icon/icon.module.js.map +1 -0
  34. package/esm2015/lib/modules/icon/types/icon-type.js +2 -0
  35. package/esm2015/lib/modules/icon/types/icon-type.js.map +1 -0
  36. package/esm2015/lib/modules/icon/types/icon-variant-type.js +2 -0
  37. package/esm2015/lib/modules/icon/types/icon-variant-type.js.map +1 -0
  38. package/esm2015/lib/modules/key-info/key-info-label.component.js +18 -0
  39. package/esm2015/lib/modules/key-info/key-info-label.component.js.map +1 -0
  40. package/esm2015/lib/modules/key-info/key-info-value.component.js +18 -0
  41. package/esm2015/lib/modules/key-info/key-info-value.component.js.map +1 -0
  42. package/esm2015/lib/modules/key-info/key-info.component.js +26 -0
  43. package/esm2015/lib/modules/key-info/key-info.component.js.map +1 -0
  44. package/esm2015/lib/modules/key-info/key-info.module.js +32 -0
  45. package/esm2015/lib/modules/key-info/key-info.module.js.map +1 -0
  46. package/esm2015/lib/modules/label/label-type.js +2 -0
  47. package/esm2015/lib/modules/label/label-type.js.map +1 -0
  48. package/esm2015/{modules → lib/modules}/label/label.component.js +4 -4
  49. package/esm2015/lib/modules/label/label.component.js.map +1 -0
  50. package/esm2015/lib/modules/label/label.module.js +19 -0
  51. package/esm2015/lib/modules/label/label.module.js.map +1 -0
  52. package/esm2015/lib/modules/shared/indicator-description-type.js +2 -0
  53. package/esm2015/lib/modules/shared/indicator-description-type.js.map +1 -0
  54. package/esm2015/lib/modules/shared/indicator-icon-type.js +2 -0
  55. package/esm2015/lib/modules/shared/indicator-icon-type.js.map +1 -0
  56. package/esm2015/lib/modules/shared/indicator-icon-utility.js +41 -0
  57. package/esm2015/lib/modules/shared/indicator-icon-utility.js.map +1 -0
  58. package/esm2015/lib/modules/shared/indicator-icon.js +2 -0
  59. package/esm2015/lib/modules/shared/indicator-icon.js.map +1 -0
  60. package/esm2015/lib/modules/shared/sky-indicators-resources.module.js +61 -0
  61. package/esm2015/lib/modules/shared/sky-indicators-resources.module.js.map +1 -0
  62. package/esm2015/lib/modules/status-indicator/status-indicator.component.js +99 -0
  63. package/esm2015/lib/modules/status-indicator/status-indicator.component.js.map +1 -0
  64. package/esm2015/lib/modules/status-indicator/status-indicator.module.js +34 -0
  65. package/esm2015/lib/modules/status-indicator/status-indicator.module.js.map +1 -0
  66. package/esm2015/lib/modules/text-highlight/text-highlight.directive.js +154 -0
  67. package/esm2015/lib/modules/text-highlight/text-highlight.directive.js.map +1 -0
  68. package/esm2015/lib/modules/text-highlight/text-highlight.module.js +18 -0
  69. package/esm2015/lib/modules/text-highlight/text-highlight.module.js.map +1 -0
  70. package/esm2015/{modules → lib/modules}/tokens/token.component.js +6 -5
  71. package/esm2015/lib/modules/tokens/token.component.js.map +1 -0
  72. package/esm2015/lib/modules/tokens/tokens.component.js +304 -0
  73. package/esm2015/lib/modules/tokens/tokens.component.js.map +1 -0
  74. package/esm2015/lib/modules/tokens/tokens.module.js +35 -0
  75. package/esm2015/lib/modules/tokens/tokens.module.js.map +1 -0
  76. package/esm2015/lib/modules/tokens/types/token-selected-event-args.js +2 -0
  77. package/esm2015/lib/modules/tokens/types/token-selected-event-args.js.map +1 -0
  78. package/esm2015/lib/modules/tokens/types/token.js +2 -0
  79. package/esm2015/lib/modules/tokens/types/token.js.map +1 -0
  80. package/esm2015/lib/modules/tokens/types/tokens-message-type.js +24 -0
  81. package/esm2015/lib/modules/tokens/types/tokens-message-type.js.map +1 -0
  82. package/esm2015/lib/modules/tokens/types/tokens-message.js +2 -0
  83. package/esm2015/lib/modules/tokens/types/tokens-message.js.map +1 -0
  84. package/esm2015/lib/modules/wait/wait-adapter.service.js +201 -0
  85. package/esm2015/lib/modules/wait/wait-adapter.service.js.map +1 -0
  86. package/esm2015/lib/modules/wait/wait-page-adapter.service.js +25 -0
  87. package/esm2015/lib/modules/wait/wait-page-adapter.service.js.map +1 -0
  88. package/esm2015/lib/modules/wait/wait-page.component.js +23 -0
  89. package/esm2015/lib/modules/wait/wait-page.component.js.map +1 -0
  90. package/esm2015/lib/modules/wait/wait.component.js +94 -0
  91. package/esm2015/lib/modules/wait/wait.component.js.map +1 -0
  92. package/esm2015/lib/modules/wait/wait.module.js +22 -0
  93. package/esm2015/lib/modules/wait/wait.module.js.map +1 -0
  94. package/esm2015/lib/modules/wait/wait.service.js +164 -0
  95. package/esm2015/lib/modules/wait/wait.service.js.map +1 -0
  96. package/esm2015/skyux-indicators.js +2 -2
  97. package/esm2015/skyux-indicators.js.map +1 -0
  98. package/esm2015/testing/alert-fixture.js +1 -1
  99. package/esm2015/testing/alert-fixture.js.map +1 -0
  100. package/esm2015/testing/label-fixture.js +1 -1
  101. package/esm2015/testing/label-fixture.js.map +1 -0
  102. package/esm2015/testing/public-api.js +1 -1
  103. package/esm2015/testing/public-api.js.map +1 -0
  104. package/esm2015/testing/skyux-indicators-testing.js +1 -1
  105. package/esm2015/testing/skyux-indicators-testing.js.map +1 -0
  106. package/esm2015/testing/wait-fixture.js +1 -1
  107. package/esm2015/testing/wait-fixture.js.map +1 -0
  108. package/fesm2015/skyux-indicators-testing.js.map +1 -1
  109. package/fesm2015/skyux-indicators.js +172 -119
  110. package/fesm2015/skyux-indicators.js.map +1 -1
  111. package/index.d.ts +35 -0
  112. package/{modules → lib/modules}/alert/alert.component.d.ts +0 -0
  113. package/{modules → lib/modules}/alert/alert.module.d.ts +0 -0
  114. package/{modules → lib/modules}/chevron/chevron.component.d.ts +4 -0
  115. package/{modules → lib/modules}/chevron/chevron.module.d.ts +2 -1
  116. package/lib/modules/expansion-indicator/expansion-indicator.component.d.ts +15 -0
  117. package/lib/modules/expansion-indicator/expansion-indicator.module.d.ts +9 -0
  118. package/{modules → lib/modules}/help-inline/help-inline.component.d.ts +0 -0
  119. package/{modules → lib/modules}/help-inline/help-inline.module.d.ts +0 -0
  120. package/{modules → lib/modules}/icon/icon-class-list.pipe.d.ts +0 -0
  121. package/{modules → lib/modules}/icon/icon-resolver.service.d.ts +0 -0
  122. package/{modules → lib/modules}/icon/icon-stack-item.d.ts +0 -0
  123. package/{modules → lib/modules}/icon/icon-stack.component.d.ts +0 -0
  124. package/{modules → lib/modules}/icon/icon.component.d.ts +4 -3
  125. package/{modules → lib/modules}/icon/icon.module.d.ts +0 -0
  126. package/{modules → lib/modules}/icon/types/icon-type.d.ts +0 -0
  127. package/{modules → lib/modules}/icon/types/icon-variant-type.d.ts +0 -0
  128. package/{modules → lib/modules}/key-info/key-info-label.component.d.ts +0 -0
  129. package/{modules → lib/modules}/key-info/key-info-value.component.d.ts +0 -0
  130. package/{modules → lib/modules}/key-info/key-info.component.d.ts +0 -0
  131. package/{modules → lib/modules}/key-info/key-info.module.d.ts +0 -0
  132. package/{modules → lib/modules}/label/label-type.d.ts +0 -0
  133. package/{modules → lib/modules}/label/label.component.d.ts +0 -0
  134. package/{modules → lib/modules}/label/label.module.d.ts +0 -0
  135. package/{modules → lib/modules}/shared/indicator-description-type.d.ts +0 -0
  136. package/{modules → lib/modules}/shared/indicator-icon-type.d.ts +0 -0
  137. package/{modules → lib/modules}/shared/indicator-icon-utility.d.ts +0 -0
  138. package/{modules → lib/modules}/shared/indicator-icon.d.ts +0 -0
  139. package/{modules → lib/modules}/shared/sky-indicators-resources.module.d.ts +0 -0
  140. package/{modules → lib/modules}/status-indicator/status-indicator.component.d.ts +0 -0
  141. package/{modules → lib/modules}/status-indicator/status-indicator.module.d.ts +0 -0
  142. package/{modules → lib/modules}/text-highlight/text-highlight.directive.d.ts +0 -0
  143. package/{modules → lib/modules}/text-highlight/text-highlight.module.d.ts +0 -0
  144. package/{modules → lib/modules}/tokens/token.component.d.ts +0 -0
  145. package/{modules → lib/modules}/tokens/tokens.component.d.ts +1 -1
  146. package/{modules → lib/modules}/tokens/tokens.module.d.ts +0 -0
  147. package/{modules → lib/modules}/tokens/types/token-selected-event-args.d.ts +0 -0
  148. package/{modules → lib/modules}/tokens/types/token.d.ts +0 -0
  149. package/{modules → lib/modules}/tokens/types/tokens-message-type.d.ts +0 -0
  150. package/{modules → lib/modules}/tokens/types/tokens-message.d.ts +0 -0
  151. package/{modules → lib/modules}/wait/wait-adapter.service.d.ts +0 -0
  152. package/{modules → lib/modules}/wait/wait-page-adapter.service.d.ts +0 -0
  153. package/{modules → lib/modules}/wait/wait-page.component.d.ts +0 -0
  154. package/{modules → lib/modules}/wait/wait.component.d.ts +0 -0
  155. package/{modules → lib/modules}/wait/wait.module.d.ts +0 -0
  156. package/{modules → lib/modules}/wait/wait.service.d.ts +0 -0
  157. package/package.json +20 -6
  158. package/skyux-indicators.d.ts +1 -1
  159. package/LICENSE +0 -21
  160. package/esm2015/modules/alert/alert.module.js +0 -38
  161. package/esm2015/modules/chevron/chevron.component.js +0 -61
  162. package/esm2015/modules/chevron/chevron.module.js +0 -34
  163. package/esm2015/modules/help-inline/help-inline.module.js +0 -38
  164. package/esm2015/modules/icon/icon-class-list.pipe.js +0 -37
  165. package/esm2015/modules/icon/icon-resolver.service.js +0 -41
  166. package/esm2015/modules/icon/icon-stack-item.js +0 -2
  167. package/esm2015/modules/icon/icon-stack.component.js +0 -23
  168. package/esm2015/modules/icon/icon.component.js +0 -36
  169. package/esm2015/modules/icon/icon.module.js +0 -21
  170. package/esm2015/modules/icon/types/icon-type.js +0 -2
  171. package/esm2015/modules/icon/types/icon-variant-type.js +0 -2
  172. package/esm2015/modules/key-info/key-info-label.component.js +0 -18
  173. package/esm2015/modules/key-info/key-info-value.component.js +0 -18
  174. package/esm2015/modules/key-info/key-info.component.js +0 -26
  175. package/esm2015/modules/key-info/key-info.module.js +0 -32
  176. package/esm2015/modules/label/label-type.js +0 -2
  177. package/esm2015/modules/label/label.module.js +0 -19
  178. package/esm2015/modules/shared/indicator-description-type.js +0 -2
  179. package/esm2015/modules/shared/indicator-icon-type.js +0 -2
  180. package/esm2015/modules/shared/indicator-icon-utility.js +0 -41
  181. package/esm2015/modules/shared/indicator-icon.js +0 -2
  182. package/esm2015/modules/shared/sky-indicators-resources.module.js +0 -61
  183. package/esm2015/modules/status-indicator/status-indicator.component.js +0 -98
  184. package/esm2015/modules/status-indicator/status-indicator.module.js +0 -34
  185. package/esm2015/modules/text-highlight/text-highlight.directive.js +0 -153
  186. package/esm2015/modules/text-highlight/text-highlight.module.js +0 -18
  187. package/esm2015/modules/tokens/tokens.component.js +0 -304
  188. package/esm2015/modules/tokens/tokens.module.js +0 -35
  189. package/esm2015/modules/tokens/types/token-selected-event-args.js +0 -2
  190. package/esm2015/modules/tokens/types/token.js +0 -2
  191. package/esm2015/modules/tokens/types/tokens-message-type.js +0 -24
  192. package/esm2015/modules/tokens/types/tokens-message.js +0 -2
  193. package/esm2015/modules/wait/wait-adapter.service.js +0 -201
  194. package/esm2015/modules/wait/wait-page-adapter.service.js +0 -25
  195. package/esm2015/modules/wait/wait-page.component.js +0 -23
  196. package/esm2015/modules/wait/wait.component.js +0 -93
  197. package/esm2015/modules/wait/wait.module.js +0 -22
  198. package/esm2015/modules/wait/wait.service.js +0 -162
  199. package/esm2015/public-api.js +0 -36
  200. package/public-api.d.ts +0 -33
@@ -0,0 +1,35 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { SkyI18nModule } from '@skyux/i18n';
4
+ import { SkyTokenComponent } from './token.component';
5
+ import { SkyTokensComponent } from './tokens.component';
6
+ import { SkyIconModule } from '../icon/icon.module';
7
+ import { SkyIndicatorsResourcesModule } from '../shared/sky-indicators-resources.module';
8
+ import * as i0 from "@angular/core";
9
+ export class SkyTokensModule {
10
+ }
11
+ SkyTokensModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyTokensModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
12
+ SkyTokensModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyTokensModule, declarations: [SkyTokenComponent, SkyTokensComponent], imports: [CommonModule,
13
+ SkyI18nModule,
14
+ SkyIconModule,
15
+ SkyIndicatorsResourcesModule], exports: [SkyTokenComponent, SkyTokensComponent] });
16
+ SkyTokensModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyTokensModule, imports: [[
17
+ CommonModule,
18
+ SkyI18nModule,
19
+ SkyIconModule,
20
+ SkyIndicatorsResourcesModule,
21
+ ]] });
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyTokensModule, decorators: [{
23
+ type: NgModule,
24
+ args: [{
25
+ declarations: [SkyTokenComponent, SkyTokensComponent],
26
+ imports: [
27
+ CommonModule,
28
+ SkyI18nModule,
29
+ SkyIconModule,
30
+ SkyIndicatorsResourcesModule,
31
+ ],
32
+ exports: [SkyTokenComponent, SkyTokensComponent],
33
+ }]
34
+ }] });
35
+ //# sourceMappingURL=tokens.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/tokens/tokens.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;;AAYzF,MAAM,OAAO,eAAe;;6GAAf,eAAe;8GAAf,eAAe,iBATX,iBAAiB,EAAE,kBAAkB,aAElD,YAAY;QACZ,aAAa;QACb,aAAa;QACb,4BAA4B,aAEpB,iBAAiB,EAAE,kBAAkB;8GAEpC,eAAe,YARjB;YACP,YAAY;YACZ,aAAa;YACb,aAAa;YACb,4BAA4B;SAC7B;4FAGU,eAAe;kBAV3B,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,iBAAiB,EAAE,kBAAkB,CAAC;oBACrD,OAAO,EAAE;wBACP,YAAY;wBACZ,aAAa;wBACb,aAAa;wBACb,4BAA4B;qBAC7B;oBACD,OAAO,EAAE,CAAC,iBAAiB,EAAE,kBAAkB,CAAC;iBACjD","sourcesContent":["import { NgModule } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\n\nimport { SkyI18nModule } from '@skyux/i18n';\n\nimport { SkyTokenComponent } from './token.component';\n\nimport { SkyTokensComponent } from './tokens.component';\n\nimport { SkyIconModule } from '../icon/icon.module';\n\nimport { SkyIndicatorsResourcesModule } from '../shared/sky-indicators-resources.module';\n\n@NgModule({\n declarations: [SkyTokenComponent, SkyTokensComponent],\n imports: [\n CommonModule,\n SkyI18nModule,\n SkyIconModule,\n SkyIndicatorsResourcesModule,\n ],\n exports: [SkyTokenComponent, SkyTokensComponent],\n})\nexport class SkyTokensModule {}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=token-selected-event-args.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-selected-event-args.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/indicators/src/lib/modules/tokens/types/token-selected-event-args.ts"],"names":[],"mappings":"","sourcesContent":["import { SkyToken } from './token';\n\nexport interface SkyTokenSelectedEventArgs {\n /**\n * Indicates the currently selected token.\n */\n token?: SkyToken;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=token.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/indicators/src/lib/modules/tokens/types/token.ts"],"names":[],"mappings":"","sourcesContent":["export interface SkyToken {\n /**\n * Specifies the token's contents.\n */\n value: any;\n}\n"]}
@@ -0,0 +1,24 @@
1
+ export var SkyTokensMessageType;
2
+ (function (SkyTokensMessageType) {
3
+ /**
4
+ * Places focus on the last token in the list.
5
+ */
6
+ SkyTokensMessageType[SkyTokensMessageType["FocusLastToken"] = 0] = "FocusLastToken";
7
+ /**
8
+ * Places focus on the token that is currently selected.
9
+ */
10
+ SkyTokensMessageType[SkyTokensMessageType["FocusActiveToken"] = 1] = "FocusActiveToken";
11
+ /**
12
+ * Places focus on the token before the currently selected token.
13
+ */
14
+ SkyTokensMessageType[SkyTokensMessageType["FocusPreviousToken"] = 2] = "FocusPreviousToken";
15
+ /**
16
+ * Places focus on the token after the currently selected token.
17
+ */
18
+ SkyTokensMessageType[SkyTokensMessageType["FocusNextToken"] = 3] = "FocusNextToken";
19
+ /**
20
+ * Removes the token that is currently selected from the list of tokens.
21
+ */
22
+ SkyTokensMessageType[SkyTokensMessageType["RemoveActiveToken"] = 4] = "RemoveActiveToken";
23
+ })(SkyTokensMessageType || (SkyTokensMessageType = {}));
24
+ //# sourceMappingURL=tokens-message-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens-message-type.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/indicators/src/lib/modules/tokens/types/tokens-message-type.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,oBAyBX;AAzBD,WAAY,oBAAoB;IAC9B;;OAEG;IACH,mFAAkB,CAAA;IAElB;;OAEG;IACH,uFAAoB,CAAA;IAEpB;;OAEG;IACH,2FAAsB,CAAA;IAEtB;;OAEG;IACH,mFAAkB,CAAA;IAElB;;OAEG;IACH,yFAAqB,CAAA;AACvB,CAAC,EAzBW,oBAAoB,KAApB,oBAAoB,QAyB/B","sourcesContent":["export enum SkyTokensMessageType {\n /**\n * Places focus on the last token in the list.\n */\n FocusLastToken = 0,\n\n /**\n * Places focus on the token that is currently selected.\n */\n FocusActiveToken = 1,\n\n /**\n * Places focus on the token before the currently selected token.\n */\n FocusPreviousToken = 2,\n\n /**\n * Places focus on the token after the currently selected token.\n */\n FocusNextToken = 3,\n\n /**\n * Removes the token that is currently selected from the list of tokens.\n */\n RemoveActiveToken = 4,\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=tokens-message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens-message.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/indicators/src/lib/modules/tokens/types/tokens-message.ts"],"names":[],"mappings":"","sourcesContent":["import { SkyTokensMessageType } from './tokens-message-type';\n\nexport interface SkyTokensMessage {\n /**\n * Specifies the type of message.\n */\n type?: SkyTokensMessageType;\n}\n"]}
@@ -0,0 +1,201 @@
1
+ import { Injectable, RendererFactory2, } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ // Need to add the following to classes which contain static methods.
4
+ // See: https://github.com/ng-packagr/ng-packagr/issues/641
5
+ /**
6
+ * @internal
7
+ * @dynamic
8
+ */
9
+ export class SkyWaitAdapterService {
10
+ constructor(rendererFactory) {
11
+ this.rendererFactory = rendererFactory;
12
+ this.renderer = this.rendererFactory.createRenderer(undefined, undefined);
13
+ }
14
+ ngOnDestroy() {
15
+ this.clearListeners();
16
+ }
17
+ setWaitBounds(waitEl) {
18
+ this.renderer.setStyle(waitEl.nativeElement.parentElement, 'position', 'relative');
19
+ }
20
+ removeWaitBounds(waitEl) {
21
+ this.renderer.removeStyle(waitEl.nativeElement.parentElement, 'position');
22
+ }
23
+ setBusyState(waitEl, isFullPage, isWaiting, isNonBlocking = false, waitComponentId) {
24
+ const busyEl = isFullPage
25
+ ? document.body
26
+ : waitEl.nativeElement.parentElement;
27
+ if (!isNonBlocking) {
28
+ if (isWaiting) {
29
+ this.renderer.setAttribute(busyEl, 'aria-busy', 'true');
30
+ // Remove focus from page when full page blocking wait
31
+ if (isFullPage || busyEl.contains(document.activeElement)) {
32
+ this.clearDocumentFocus();
33
+ }
34
+ if (isFullPage) {
35
+ SkyWaitAdapterService.isPageWaitActive = true;
36
+ const endListenerFunc = this.renderer.listen(document.body, 'keydown', (event) => {
37
+ /*istanbul ignore else */
38
+ if (event.key) {
39
+ /* istanbul ignore else */
40
+ if (event.key.toLowerCase() === 'tab') {
41
+ event.target.blur();
42
+ event.preventDefault();
43
+ event.stopPropagation();
44
+ event.stopImmediatePropagation();
45
+ this.clearDocumentFocus();
46
+ }
47
+ }
48
+ });
49
+ SkyWaitAdapterService.busyElements[waitComponentId] = {
50
+ listener: endListenerFunc,
51
+ busyEl: undefined,
52
+ };
53
+ }
54
+ else {
55
+ const endListenerFunc = this.renderer.listen(busyEl, 'focusin', (event) => {
56
+ /* istanbul ignore else */
57
+ if (!isNonBlocking) {
58
+ event.preventDefault();
59
+ event.stopPropagation();
60
+ event.stopImmediatePropagation();
61
+ if (SkyWaitAdapterService.isPageWaitActive) {
62
+ this.clearDocumentFocus();
63
+ }
64
+ else {
65
+ // Propagate tab navigation if attempted into waited element
66
+ const target = event.target;
67
+ target.blur();
68
+ this.focusNextElement(target, this.isShift(event), busyEl);
69
+ }
70
+ }
71
+ });
72
+ SkyWaitAdapterService.busyElements[waitComponentId] = {
73
+ listener: endListenerFunc,
74
+ busyEl: busyEl,
75
+ };
76
+ }
77
+ }
78
+ else {
79
+ this.renderer.removeAttribute(busyEl, 'aria-busy');
80
+ if (isFullPage) {
81
+ SkyWaitAdapterService.isPageWaitActive = false;
82
+ }
83
+ if (waitComponentId in SkyWaitAdapterService.busyElements) {
84
+ SkyWaitAdapterService.busyElements[waitComponentId].listener();
85
+ delete SkyWaitAdapterService.busyElements[waitComponentId];
86
+ }
87
+ }
88
+ }
89
+ }
90
+ focusNextElement(targetElement, shiftKey, busyEl) {
91
+ const focussable = this.getFocussableElements();
92
+ // If shift tab, go in the other direction
93
+ const modifier = shiftKey ? -1 : 1;
94
+ // Find the next navigable element that isn't waiting
95
+ const startingIndex = focussable.indexOf(targetElement);
96
+ let curIndex = startingIndex + modifier;
97
+ while (focussable[curIndex] &&
98
+ this.isElementBusyOrHidden(focussable[curIndex])) {
99
+ curIndex += modifier;
100
+ }
101
+ if (focussable[curIndex] &&
102
+ !this.isElementBusyOrHidden(focussable[curIndex])) {
103
+ focussable[curIndex].focus();
104
+ }
105
+ else {
106
+ // Try wrapping the navigation
107
+ /* istanbul ignore next */
108
+ /* sanity check */
109
+ curIndex = modifier > 0 ? 0 : focussable.length - 1;
110
+ while (curIndex !== startingIndex &&
111
+ focussable[curIndex] &&
112
+ this.isElementBusyOrHidden(focussable[curIndex])) {
113
+ /* istanbul ignore next */
114
+ /* sanity check */
115
+ curIndex += modifier;
116
+ }
117
+ /* istanbul ignore else */
118
+ /* sanity check */
119
+ if (focussable[curIndex] &&
120
+ !this.isElementBusyOrHidden(focussable[curIndex])) {
121
+ focussable[curIndex].focus();
122
+ }
123
+ else {
124
+ // No valid target, wipe focus
125
+ this.clearDocumentFocus();
126
+ }
127
+ }
128
+ // clear focussableElements list
129
+ this.focussableElements = undefined;
130
+ }
131
+ isShift(event) {
132
+ // Determine if shift+tab was used based on element order
133
+ const elements = this.getFocussableElements().filter((elem) => !this.isElementHidden(elem));
134
+ const previousInd = elements.indexOf(event.relatedTarget);
135
+ const currentInd = elements.indexOf(event.target);
136
+ return (previousInd === currentInd + 1 ||
137
+ (previousInd === 0 && currentInd === elements.length - 1) ||
138
+ previousInd > currentInd ||
139
+ !event.relatedTarget);
140
+ }
141
+ isElementHidden(element) {
142
+ const style = window.getComputedStyle(element);
143
+ return style.display === 'none' || style.visibility === 'hidden';
144
+ }
145
+ isElementBusyOrHidden(element) {
146
+ if (this.isElementHidden(element)) {
147
+ return true;
148
+ }
149
+ for (const key of Object.keys(SkyWaitAdapterService.busyElements)) {
150
+ const parentElement = SkyWaitAdapterService.busyElements[key].busyEl;
151
+ if (parentElement && parentElement.contains(element)) {
152
+ return true;
153
+ }
154
+ }
155
+ return false;
156
+ }
157
+ clearDocumentFocus() {
158
+ /* istanbul ignore else */
159
+ if (document.activeElement && document.activeElement.blur) {
160
+ document.activeElement.blur();
161
+ }
162
+ document.body.focus();
163
+ }
164
+ getFocussableElements() {
165
+ // Keep this cached so we can reduce querys
166
+ if (this.focussableElements) {
167
+ return this.focussableElements;
168
+ }
169
+ // Select all possible focussable elements
170
+ const focussableElements = 'a[href], ' +
171
+ 'area[href], ' +
172
+ "input:not([disabled]):not([tabindex='-1']), " +
173
+ "button:not([disabled]):not([tabindex='-1']), " +
174
+ "select:not([disabled]):not([tabindex='-1']), " +
175
+ "textarea:not([disabled]):not([tabindex='-1']), " +
176
+ 'iframe, object, embed, ' +
177
+ "*[tabindex]:not([tabindex='-1']), " +
178
+ '*[contenteditable=true]';
179
+ this.focussableElements = Array.prototype.filter.call(document.body.querySelectorAll(focussableElements), (element) => {
180
+ return (element.offsetWidth > 0 ||
181
+ element.offsetHeight > 0 ||
182
+ element === document.activeElement);
183
+ });
184
+ return this.focussableElements;
185
+ }
186
+ clearListeners() {
187
+ SkyWaitAdapterService.isPageWaitActive = false;
188
+ for (const key of Object.keys(SkyWaitAdapterService.busyElements)) {
189
+ SkyWaitAdapterService.busyElements[key].listener();
190
+ delete SkyWaitAdapterService.busyElements[key];
191
+ }
192
+ }
193
+ }
194
+ SkyWaitAdapterService.isPageWaitActive = false;
195
+ SkyWaitAdapterService.busyElements = {};
196
+ SkyWaitAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyWaitAdapterService, deps: [{ token: i0.RendererFactory2 }], target: i0.ɵɵFactoryTarget.Injectable });
197
+ SkyWaitAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyWaitAdapterService });
198
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyWaitAdapterService, decorators: [{
199
+ type: Injectable
200
+ }], ctorParameters: function () { return [{ type: i0.RendererFactory2 }]; } });
201
+ //# sourceMappingURL=wait-adapter.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wait-adapter.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/wait/wait-adapter.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAGV,gBAAgB,GACjB,MAAM,eAAe,CAAC;;AAEvB,qEAAqE;AACrE,2DAA2D;AAC3D;;;GAGG;AAEH,MAAM,OAAO,qBAAqB;IAUhC,YAAoB,eAAiC;QAAjC,oBAAe,GAAf,eAAe,CAAkB;QACnD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAC5E,CAAC;IAEM,WAAW;QAChB,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAEM,aAAa,CAAC,MAAkB;QACrC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CACpB,MAAM,CAAC,aAAa,CAAC,aAAa,EAClC,UAAU,EACV,UAAU,CACX,CAAC;IACJ,CAAC;IAEM,gBAAgB,CAAC,MAAkB;QACxC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,aAAa,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IAC5E,CAAC;IAEM,YAAY,CACjB,MAAkB,EAClB,UAAmB,EACnB,SAAkB,EAClB,aAAa,GAAG,KAAK,EACrB,eAAwB;QAExB,MAAM,MAAM,GAAG,UAAU;YACvB,CAAC,CAAC,QAAQ,CAAC,IAAI;YACf,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC;QAEvC,IAAI,CAAC,aAAa,EAAE;YAClB,IAAI,SAAS,EAAE;gBACb,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;gBAExD,sDAAsD;gBACtD,IAAI,UAAU,IAAI,M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DAAiD;YACjD,yBAAyB;YACzB,oCAAoC;YACpC,yBAAyB,CAAC;QAE5B,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CACnD,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,EAClD,CAAC,OAAY,EAAE,EAAE;YACf,OAAO,CACL,OAAO,CAAC,WAAW,GAAG,CAAC;gBACvB,OAAO,CAAC,YAAY,GAAG,CAAC;gBACxB,OAAO,KAAK,QAAQ,CAAC,aAAa,CACnC,CAAC;QACJ,CAAC,CACF,CAAC;QACF,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACjC,CAAC;IAEO,cAAc;QACpB,qBAAqB,CAAC,gBAAgB,GAAG,KAAK,CAAC;QAC/C,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,YAAY,CAAC,EAAE;YACjE,qBAAqB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;YACnD,OAAO,qBAAqB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;SAChD;IACH,CAAC;;AA3Pc,sCAAgB,GAAG,KAAK,CAAC;AACzB,kCAAY,GAEvB,EAAE,CAAC;mHAJI,qBAAqB;uHAArB,qBAAqB;4FAArB,qBAAqB;kBADjC,UAAU","sourcesContent":["import {\n ElementRef,\n Injectable,\n OnDestroy,\n Renderer2,\n RendererFactory2,\n} from '@angular/core';\n\n// Need to add the following to classes which contain static methods.\n// See: https://github.com/ng-packagr/ng-packagr/issues/641\n/**\n * @internal\n * @dynamic\n */\n@Injectable()\nexport class SkyWaitAdapterService implements OnDestroy {\n private static isPageWaitActive = false;\n private static busyElements: {\n [key: string]: { busyEl: HTMLElement; listener: any };\n } = {};\n\n private focussableElements: HTMLElement[];\n\n private renderer: Renderer2;\n\n constructor(private rendererFactory: RendererFactory2) {\n this.renderer = this.rendererFactory.createRenderer(undefined, undefined);\n }\n\n public ngOnDestroy(): void {\n this.clearListeners();\n }\n\n public setWaitBounds(waitEl: ElementRef): void {\n this.renderer.setStyle(\n waitEl.nativeElement.parentElement,\n 'position',\n 'relative'\n );\n }\n\n public removeWaitBounds(waitEl: ElementRef): void {\n this.renderer.removeStyle(waitEl.nativeElement.parentElement, 'position');\n }\n\n public setBusyState(\n waitEl: ElementRef,\n isFullPage: boolean,\n isWaiting: boolean,\n isNonBlocking = false,\n waitComponentId?: string\n ): void {\n const busyEl = isFullPage\n ? document.body\n : waitEl.nativeElement.parentElement;\n\n if (!isNonBlocking) {\n if (isWaiting) {\n this.renderer.setAttribute(busyEl, 'aria-busy', 'true');\n\n // Remove focus from page when full page blocking wait\n if (isFullPage || busyEl.contains(document.activeElement)) {\n this.clearDocumentFocus();\n }\n\n if (isFullPage) {\n SkyWaitAdapterService.isPageWaitActive = true;\n const endListenerFunc = this.renderer.listen(\n document.body,\n 'keydown',\n (event: KeyboardEvent) => {\n /*istanbul ignore else */\n if (event.key) {\n /* istanbul ignore else */\n if (event.key.toLowerCase() === 'tab') {\n (event.target as any).blur();\n event.preventDefault();\n event.stopPropagation();\n event.stopImmediatePropagation();\n this.clearDocumentFocus();\n }\n }\n }\n );\n SkyWaitAdapterService.busyElements[waitComponentId] = {\n listener: endListenerFunc,\n busyEl: undefined,\n };\n } else {\n const endListenerFunc = this.renderer.listen(\n busyEl,\n 'focusin',\n (event: KeyboardEvent) => {\n /* istanbul ignore else */\n if (!isNonBlocking) {\n event.preventDefault();\n event.stopPropagation();\n event.stopImmediatePropagation();\n\n if (SkyWaitAdapterService.isPageWaitActive) {\n this.clearDocumentFocus();\n } else {\n // Propagate tab navigation if attempted into waited element\n const target: any = event.target;\n target.blur();\n this.focusNextElement(target, this.isShift(event), busyEl);\n }\n }\n }\n );\n SkyWaitAdapterService.busyElements[waitComponentId] = {\n listener: endListenerFunc,\n busyEl: busyEl,\n };\n }\n } else {\n this.renderer.removeAttribute(busyEl, 'aria-busy');\n\n if (isFullPage) {\n SkyWaitAdapterService.isPageWaitActive = false;\n }\n if (waitComponentId in SkyWaitAdapterService.busyElements) {\n SkyWaitAdapterService.busyElements[waitComponentId].listener();\n delete SkyWaitAdapterService.busyElements[waitComponentId];\n }\n }\n }\n }\n\n private focusNextElement(\n targetElement: HTMLElement,\n shiftKey: boolean,\n busyEl: Element\n ): void {\n const focussable = this.getFocussableElements();\n\n // If shift tab, go in the other direction\n const modifier = shiftKey ? -1 : 1;\n\n // Find the next navigable element that isn't waiting\n const startingIndex = focussable.indexOf(targetElement);\n let curIndex = startingIndex + modifier;\n while (\n focussable[curIndex] &&\n this.isElementBusyOrHidden(focussable[curIndex])\n ) {\n curIndex += modifier;\n }\n\n if (\n focussable[curIndex] &&\n !this.isElementBusyOrHidden(focussable[curIndex])\n ) {\n focussable[curIndex].focus();\n } else {\n // Try wrapping the navigation\n /* istanbul ignore next */\n /* sanity check */\n curIndex = modifier > 0 ? 0 : focussable.length - 1;\n while (\n curIndex !== startingIndex &&\n focussable[curIndex] &&\n this.isElementBusyOrHidden(focussable[curIndex])\n ) {\n /* istanbul ignore next */\n /* sanity check */\n curIndex += modifier;\n }\n\n /* istanbul ignore else */\n /* sanity check */\n if (\n focussable[curIndex] &&\n !this.isElementBusyOrHidden(focussable[curIndex])\n ) {\n focussable[curIndex].focus();\n } else {\n // No valid target, wipe focus\n this.clearDocumentFocus();\n }\n }\n\n // clear focussableElements list\n this.focussableElements = undefined;\n }\n\n private isShift(event: Event): boolean {\n // Determine if shift+tab was used based on element order\n const elements = this.getFocussableElements().filter(\n (elem) => !this.isElementHidden(elem)\n );\n\n const previousInd = elements.indexOf((event as any).relatedTarget);\n const currentInd = elements.indexOf(event.target as HTMLElement);\n\n return (\n previousInd === currentInd + 1 ||\n (previousInd === 0 && currentInd === elements.length - 1) ||\n previousInd > currentInd ||\n !(event as any).relatedTarget\n );\n }\n\n private isElementHidden(element: any): boolean {\n const style = window.getComputedStyle(element);\n return style.display === 'none' || style.visibility === 'hidden';\n }\n\n private isElementBusyOrHidden(element: any): boolean {\n if (this.isElementHidden(element)) {\n return true;\n }\n\n for (const key of Object.keys(SkyWaitAdapterService.busyElements)) {\n const parentElement = SkyWaitAdapterService.busyElements[key].busyEl;\n if (parentElement && parentElement.contains(element)) {\n return true;\n }\n }\n return false;\n }\n\n private clearDocumentFocus(): void {\n /* istanbul ignore else */\n if (document.activeElement && (document.activeElement as any).blur) {\n (document.activeElement as any).blur();\n }\n document.body.focus();\n }\n\n private getFocussableElements(): HTMLElement[] {\n // Keep this cached so we can reduce querys\n if (this.focussableElements) {\n return this.focussableElements;\n }\n\n // Select all possible focussable elements\n const focussableElements =\n 'a[href], ' +\n 'area[href], ' +\n \"input:not([disabled]):not([tabindex='-1']), \" +\n \"button:not([disabled]):not([tabindex='-1']), \" +\n \"select:not([disabled]):not([tabindex='-1']), \" +\n \"textarea:not([disabled]):not([tabindex='-1']), \" +\n 'iframe, object, embed, ' +\n \"*[tabindex]:not([tabindex='-1']), \" +\n '*[contenteditable=true]';\n\n this.focussableElements = Array.prototype.filter.call(\n document.body.querySelectorAll(focussableElements),\n (element: any) => {\n return (\n element.offsetWidth > 0 ||\n element.offsetHeight > 0 ||\n element === document.activeElement\n );\n }\n );\n return this.focussableElements;\n }\n\n private clearListeners(): void {\n SkyWaitAdapterService.isPageWaitActive = false;\n for (const key of Object.keys(SkyWaitAdapterService.busyElements)) {\n SkyWaitAdapterService.busyElements[key].listener();\n delete SkyWaitAdapterService.busyElements[key];\n }\n }\n}\n"]}
@@ -0,0 +1,25 @@
1
+ import { Injectable } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * @internal
5
+ */
6
+ export class SkyWaitPageAdapterService {
7
+ addPageWaitEl() {
8
+ document.body.appendChild(document.createElement('sky-wait-page'));
9
+ }
10
+ removePageWaitEl() {
11
+ const waitEl = document.querySelector('sky-wait-page');
12
+ if (waitEl) {
13
+ document.body.removeChild(waitEl);
14
+ }
15
+ }
16
+ }
17
+ SkyWaitPageAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyWaitPageAdapterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
18
+ SkyWaitPageAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyWaitPageAdapterService, providedIn: 'root' });
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyWaitPageAdapterService, decorators: [{
20
+ type: Injectable,
21
+ args: [{
22
+ providedIn: 'root',
23
+ }]
24
+ }] });
25
+ //# sourceMappingURL=wait-page-adapter.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wait-page-adapter.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/wait/wait-page-adapter.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;;AAE3C;;GAEG;AAIH,MAAM,OAAO,yBAAyB;IAC7B,aAAa;QAClB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC;IACrE,CAAC;IAEM,gBAAgB;QACrB,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;QACvD,IAAI,MAAM,EAAE;YACV,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;SACnC;IACH,CAAC;;uHAVU,yBAAyB;2HAAzB,yBAAyB,cAFxB,MAAM;4FAEP,yBAAyB;kBAHrC,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB","sourcesContent":["import { Injectable } from '@angular/core';\n\n/**\n * @internal\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SkyWaitPageAdapterService {\n public addPageWaitEl(): void {\n document.body.appendChild(document.createElement('sky-wait-page'));\n }\n\n public removePageWaitEl(): void {\n const waitEl = document.querySelector('sky-wait-page');\n if (waitEl) {\n document.body.removeChild(waitEl);\n }\n }\n}\n"]}
@@ -0,0 +1,23 @@
1
+ import { Component, Input } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ import * as i1 from "./wait.component";
4
+ /**
5
+ * @internal
6
+ */
7
+ export class SkyWaitPageComponent {
8
+ }
9
+ SkyWaitPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyWaitPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10
+ SkyWaitPageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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: i1.SkyWaitComponent, selector: "sky-wait", inputs: ["ariaLabel", "isWaiting", "isFullPage", "isNonBlocking"] }] });
11
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyWaitPageComponent, decorators: [{
12
+ type: Component,
13
+ args: [{
14
+ selector: 'sky-wait-page',
15
+ templateUrl: './wait-page.component.html',
16
+ styleUrls: ['./wait-page.component.scss'],
17
+ }]
18
+ }], propDecorators: { hasBlockingWait: [{
19
+ type: Input
20
+ }], hasNonBlockingWait: [{
21
+ type: Input
22
+ }] } });
23
+ //# sourceMappingURL=wait-page.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wait-page.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/wait/wait-page.component.ts","../../../../../../../../libs/components/indicators/src/lib/modules/wait/wait-page.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;;;AAEjD;;GAEG;AAMH,MAAM,OAAO,oBAAoB;;kHAApB,oBAAoB;sGAApB,oBAAoB,+ICVjC,2PASA;4FDCa,oBAAoB;kBALhC,SAAS;mBAAC;oBACT,QAAQ,EAAE,eAAe;oBACzB,WAAW,EAAE,4BAA4B;oBACzC,SAAS,EAAE,CAAC,4BAA4B,CAAC;iBAC1C;8BAGQ,eAAe;sBADrB,KAAK;gBAIC,kBAAkB;sBADxB,KAAK","sourcesContent":["import { Component, Input } from '@angular/core';\n\n/**\n * @internal\n */\n@Component({\n selector: 'sky-wait-page',\n templateUrl: './wait-page.component.html',\n styleUrls: ['./wait-page.component.scss'],\n})\nexport class SkyWaitPageComponent {\n @Input()\n public hasBlockingWait: boolean;\n\n @Input()\n public hasNonBlockingWait: boolean;\n}\n","<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"]}
@@ -0,0 +1,94 @@
1
+ import { Component, ElementRef, Input, Optional } from '@angular/core';
2
+ import { SkyLibResourcesService } from '@skyux/i18n';
3
+ import { BehaviorSubject } from 'rxjs';
4
+ import { SkyWaitAdapterService } from './wait-adapter.service';
5
+ import * as i0 from "@angular/core";
6
+ import * as i1 from "./wait-adapter.service";
7
+ import * as i2 from "@skyux/i18n";
8
+ import * as i3 from "@angular/common";
9
+ let nextId = 0;
10
+ export class SkyWaitComponent {
11
+ constructor(elRef, adapterService, resourceService) {
12
+ this.elRef = elRef;
13
+ this.adapterService = adapterService;
14
+ this.resourceService = resourceService;
15
+ this.ariaLabelStream = new BehaviorSubject('');
16
+ this.id = `sky-wait-${++nextId}`;
17
+ }
18
+ /**
19
+ * When set to `true`, wait indication appears on the parent element of the `sky-wait` component.
20
+ */
21
+ set isWaiting(value) {
22
+ if (value && !this._isFullPage) {
23
+ this.adapterService.setWaitBounds(this.elRef);
24
+ }
25
+ else if (!value && !this._isFullPage) {
26
+ this.adapterService.removeWaitBounds(this.elRef);
27
+ }
28
+ this.adapterService.setBusyState(this.elRef, this.isFullPage, value, this.isNonBlocking, this.id);
29
+ this._isWaiting = value;
30
+ }
31
+ get isWaiting() {
32
+ return this._isWaiting;
33
+ }
34
+ /**
35
+ * When set to `true`, wait indication appears on the page level instead of the
36
+ * parent element level. We recommend that you use the `beginBlockingPageWait` or
37
+ * `beginNonBlockingPageWait` functions of the `SkyWaitService` instead of setting this
38
+ * on the component level.
39
+ * @default false
40
+ */
41
+ set isFullPage(value) {
42
+ /* istanbul ignore else: untestable */
43
+ if (value) {
44
+ this.adapterService.removeWaitBounds(this.elRef);
45
+ }
46
+ else if (!value && this._isWaiting) {
47
+ this.adapterService.setWaitBounds(this.elRef);
48
+ }
49
+ this._isFullPage = value;
50
+ }
51
+ get isFullPage() {
52
+ return this._isFullPage;
53
+ }
54
+ ngOnInit() {
55
+ this.publishAriaLabel();
56
+ }
57
+ publishAriaLabel() {
58
+ if (this.ariaLabel) {
59
+ this.ariaLabelStream.next(this.ariaLabel);
60
+ return;
61
+ }
62
+ /* istanbul ignore else */
63
+ if (this.resourceService) {
64
+ const type = this.isFullPage ? '_page' : '';
65
+ const blocking = this.isNonBlocking ? '' : '_blocking';
66
+ const key = `skyux_wait${type}${blocking}_aria_alt_text`;
67
+ this.resourceService.getString(key).subscribe((value) => {
68
+ this.ariaLabelStream.next(value);
69
+ });
70
+ }
71
+ }
72
+ }
73
+ SkyWaitComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyWaitComponent, deps: [{ token: i0.ElementRef }, { token: i1.SkyWaitAdapterService }, { token: i2.SkyLibResourcesService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
74
+ SkyWaitComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i3.AsyncPipe } });
75
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyWaitComponent, decorators: [{
76
+ type: Component,
77
+ args: [{
78
+ selector: 'sky-wait',
79
+ templateUrl: './wait.component.html',
80
+ styleUrls: ['./wait.component.scss'],
81
+ providers: [SkyWaitAdapterService],
82
+ }]
83
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.SkyWaitAdapterService }, { type: i2.SkyLibResourcesService, decorators: [{
84
+ type: Optional
85
+ }] }]; }, propDecorators: { ariaLabel: [{
86
+ type: Input
87
+ }], isWaiting: [{
88
+ type: Input
89
+ }], isFullPage: [{
90
+ type: Input
91
+ }], isNonBlocking: [{
92
+ type: Input
93
+ }] } });
94
+ //# sourceMappingURL=wait.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wait.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/wait/wait.component.ts","../../../../../../../../libs/components/indicators/src/lib/modules/wait/wait.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAU,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAEvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;;;;;AAE/D,IAAI,MAAM,GAAG,CAAC,CAAC;AAQf,MAAM,OAAO,gBAAgB;IA2E3B,YACU,KAAiB,EACjB,cAAqC,EACzB,eAAuC;QAFnD,UAAK,GAAL,KAAK,CAAY;QACjB,mBAAc,GAAd,cAAc,CAAuB;QACzB,oBAAe,GAAf,eAAe,CAAwB;QATtD,oBAAe,GAAG,IAAI,eAAe,CAAS,EAAE,CAAC,CAAC;QAEjD,OAAE,GAAG,YA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AC;YAC1C,OAAO;SACR;QAED,0BAA0B;QAC1B,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;YAC5C,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC;YACvD,MAAM,GAAG,GAAG,aAAa,IAAI,GAAG,QAAQ,gBAAgB,CAAC;YACzD,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,KAAa,EAAE,EAAE;gBAC9D,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnC,CAAC,CAAC,CAAC;SACJ;IACH,CAAC;;8GApGU,gBAAgB;kGAAhB,gBAAgB,yJAFhB,CAAC,qBAAqB,CAAC,0BCdpC,ogBAiBA;4FDDa,gBAAgB;kBAN5B,SAAS;mBAAC;oBACT,QAAQ,EAAE,UAAU;oBACpB,WAAW,EAAE,uBAAuB;oBACpC,SAAS,EAAE,CAAC,uBAAuB,CAAC;oBACpC,SAAS,EAAE,CAAC,qBAAqB,CAAC;iBACnC;;0BA+EI,QAAQ;4CApEJ,SAAS;sBADf,KAAK;gBAOK,SAAS;sBADnB,KAAK;gBA+BK,UAAU;sBADpB,KAAK;gBAsBC,aAAa;sBADnB,KAAK","sourcesContent":["import { Component, ElementRef, Input, OnInit, Optional } from '@angular/core';\n\nimport { SkyLibResourcesService } from '@skyux/i18n';\n\nimport { BehaviorSubject } from 'rxjs';\n\nimport { SkyWaitAdapterService } from './wait-adapter.service';\n\nlet nextId = 0;\n\n@Component({\n selector: 'sky-wait',\n templateUrl: './wait.component.html',\n styleUrls: ['./wait.component.scss'],\n providers: [SkyWaitAdapterService],\n})\nexport class SkyWaitComponent implements OnInit {\n /**\n * Specifies an ARIA label for the wait icon while an element or page loads.\n * This sets the icon's `aria-label` attribute\n * [to support accessibility](https://developer.blackbaud.com/skyux/learn/accessibility).\n * The default value varies based on whether the wait is for an element or a page\n * and whether it is a blocking wait. For example, the default for a page-blocking\n * wait is \"Page loading. Please wait.\"\n */\n @Input()\n public ariaLabel: string;\n\n /**\n * When set to `true`, wait indication appears on the parent element of the `sky-wait` component.\n */\n @Input()\n public set isWaiting(value: boolean) {\n if (value && !this._isFullPage) {\n this.adapterService.setWaitBounds(this.elRef);\n } else if (!value && !this._isFullPage) {\n this.adapterService.removeWaitBounds(this.elRef);\n }\n\n this.adapterService.setBusyState(\n this.elRef,\n this.isFullPage,\n value,\n this.isNonBlocking,\n this.id\n );\n\n this._isWaiting = value;\n }\n\n public get isWaiting(): boolean {\n return this._isWaiting;\n }\n\n /**\n * When set to `true`, wait indication appears on the page level instead of the\n * parent element level. We recommend that you use the `beginBlockingPageWait` or\n * `beginNonBlockingPageWait` functions of the `SkyWaitService` instead of setting this\n * on the component level.\n * @default false\n */\n @Input()\n public set isFullPage(value: boolean) {\n /* istanbul ignore else: untestable */\n if (value) {\n this.adapterService.removeWaitBounds(this.elRef);\n } else if (!value && this._isWaiting) {\n this.adapterService.setWaitBounds(this.elRef);\n }\n\n this._isFullPage = value;\n }\n\n public get isFullPage(): boolean {\n return this._isFullPage;\n }\n\n /**\n * When set to `true`, wait indication appears in the bottom left corner of the element\n * instead of hiding the entire parent element.\n * @default false\n */\n @Input()\n public isNonBlocking: boolean;\n\n public ariaLabelStream = new BehaviorSubject<string>('');\n\n private id = `sky-wait-${++nextId}`;\n private _isFullPage: boolean;\n private _isWaiting: boolean;\n\n constructor(\n private elRef: ElementRef,\n private adapterService: SkyWaitAdapterService,\n @Optional() private resourceService: SkyLibResourcesService\n ) {}\n\n public ngOnInit(): void {\n this.publishAriaLabel();\n }\n\n private publishAriaLabel(): void {\n if (this.ariaLabel) {\n this.ariaLabelStream.next(this.ariaLabel);\n return;\n }\n\n /* istanbul ignore else */\n if (this.resourceService) {\n const type = this.isFullPage ? '_page' : '';\n const blocking = this.isNonBlocking ? '' : '_blocking';\n const key = `skyux_wait${type}${blocking}_aria_alt_text`;\n this.resourceService.getString(key).subscribe((value: string) => {\n this.ariaLabelStream.next(value);\n });\n }\n }\n}\n","<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"]}
@@ -0,0 +1,22 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { SkyI18nModule } from '@skyux/i18n';
4
+ import { SkyIndicatorsResourcesModule } from '../shared/sky-indicators-resources.module';
5
+ import { SkyWaitComponent } from './wait.component';
6
+ import { SkyWaitPageComponent } from './wait-page.component';
7
+ import * as i0 from "@angular/core";
8
+ export class SkyWaitModule {
9
+ }
10
+ SkyWaitModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyWaitModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
11
+ SkyWaitModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyWaitModule, declarations: [SkyWaitComponent, SkyWaitPageComponent], imports: [CommonModule, SkyI18nModule, SkyIndicatorsResourcesModule], exports: [SkyWaitComponent] });
12
+ SkyWaitModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyWaitModule, imports: [[CommonModule, SkyI18nModule, SkyIndicatorsResourcesModule]] });
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyWaitModule, decorators: [{
14
+ type: NgModule,
15
+ args: [{
16
+ declarations: [SkyWaitComponent, SkyWaitPageComponent],
17
+ imports: [CommonModule, SkyI18nModule, SkyIndicatorsResourcesModule],
18
+ exports: [SkyWaitComponent],
19
+ entryComponents: [SkyWaitPageComponent],
20
+ }]
21
+ }] });
22
+ //# sourceMappingURL=wait.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wait.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/wait/wait.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AAEzF,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;;AAQ7D,MAAM,OAAO,aAAa;;2GAAb,aAAa;4GAAb,aAAa,iBALT,gBAAgB,EAAE,oBAAoB,aAC3C,YAAY,EAAE,aAAa,EAAE,4BAA4B,aACzD,gBAAgB;4GAGf,aAAa,YAJf,CAAC,YAAY,EAAE,aAAa,EAAE,4BAA4B,CAAC;4FAIzD,aAAa;kBANzB,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,gBAAgB,EAAE,oBAAoB,CAAC;oBACtD,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,4BAA4B,CAAC;oBACpE,OAAO,EAAE,CAAC,gBAAgB,CAAC;oBAC3B,eAAe,EAAE,CAAC,oBAAoB,CAAC;iBACxC","sourcesContent":["import { NgModule } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\n\nimport { SkyI18nModule } from '@skyux/i18n';\n\nimport { SkyIndicatorsResourcesModule } from '../shared/sky-indicators-resources.module';\n\nimport { SkyWaitComponent } from './wait.component';\n\nimport { SkyWaitPageComponent } from './wait-page.component';\n\n@NgModule({\n declarations: [SkyWaitComponent, SkyWaitPageComponent],\n imports: [CommonModule, SkyI18nModule, SkyIndicatorsResourcesModule],\n exports: [SkyWaitComponent],\n entryComponents: [SkyWaitPageComponent],\n})\nexport class SkyWaitModule {}\n"]}