@skyux/indicators 6.11.2 → 6.14.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.
- package/documentation.json +448 -402
- package/esm2020/lib/modules/alert/alert.component.mjs +9 -5
- package/esm2020/lib/modules/icon/icon-stack.component.mjs +1 -1
- package/esm2020/lib/modules/icon/icon.component.mjs +1 -1
- package/esm2020/lib/modules/key-info/key-info.component.mjs +2 -1
- package/esm2020/lib/modules/label/label.component.mjs +20 -6
- package/esm2020/testing/alert/alert-harness-filters.mjs +2 -0
- package/esm2020/testing/alert/alert-harness.mjs +71 -0
- package/esm2020/testing/alert-fixture.mjs +2 -1
- package/esm2020/testing/label-fixture.mjs +1 -1
- package/esm2020/testing/public-api.mjs +6 -1
- package/esm2020/testing/tokens/token-harness-filters.mjs +2 -0
- package/esm2020/testing/tokens/token-harness.mjs +44 -0
- package/esm2020/testing/tokens/tokens-harness-filters.mjs +2 -0
- package/esm2020/testing/tokens/tokens-harness.mjs +42 -0
- package/fesm2015/skyux-indicators-testing.mjs +178 -1
- package/fesm2015/skyux-indicators-testing.mjs.map +1 -1
- package/fesm2015/skyux-indicators.mjs +28 -9
- package/fesm2015/skyux-indicators.mjs.map +1 -1
- package/fesm2020/skyux-indicators-testing.mjs +156 -1
- package/fesm2020/skyux-indicators-testing.mjs.map +1 -1
- package/fesm2020/skyux-indicators.mjs +28 -9
- package/fesm2020/skyux-indicators.mjs.map +1 -1
- package/lib/modules/alert/alert.component.d.ts +2 -0
- package/lib/modules/icon/icon-stack.component.d.ts +2 -2
- package/lib/modules/icon/icon.component.d.ts +1 -1
- package/lib/modules/key-info/key-info.component.d.ts +1 -1
- package/lib/modules/label/label.component.d.ts +7 -6
- package/package.json +6 -5
- package/testing/alert/alert-harness-filters.d.ts +6 -0
- package/testing/alert/alert-harness.d.ts +36 -0
- package/testing/alert-fixture.d.ts +1 -0
- package/testing/label-fixture.d.ts +2 -2
- package/testing/public-api.d.ts +5 -0
- package/testing/tokens/token-harness-filters.d.ts +10 -0
- package/testing/tokens/token-harness.d.ts +26 -0
- package/testing/tokens/tokens-harness-filters.d.ts +6 -0
- package/testing/tokens/tokens-harness.d.ts +27 -0
|
@@ -1,8 +1,106 @@
|
|
|
1
|
+
import { __awaiter, __classPrivateFieldGet } from 'tslib';
|
|
2
|
+
import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
3
|
+
import { SkyComponentHarness } from '@skyux/core/testing';
|
|
1
4
|
import { By } from '@angular/platform-browser';
|
|
2
5
|
import { SkyAppTestUtility } from '@skyux-sdk/testing';
|
|
3
6
|
|
|
7
|
+
var _SkyTokenHarness_getDismissButton, _SkyTokenHarness_getWrapper;
|
|
8
|
+
/**
|
|
9
|
+
* Harness for interacting with a token component in tests.
|
|
10
|
+
*/
|
|
11
|
+
class SkyTokenHarness extends ComponentHarness {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
_SkyTokenHarness_getDismissButton.set(this, this.locatorForOptional('button.sky-token-btn-close'));
|
|
15
|
+
_SkyTokenHarness_getWrapper.set(this, this.locatorFor('.sky-token'));
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
19
|
+
* `SkyTokenHarness` that meets certain criteria.
|
|
20
|
+
*/
|
|
21
|
+
static with(filters) {
|
|
22
|
+
return new HarnessPredicate(this, filters).addOption('text', filters.text, (harness, test) => __awaiter(this, void 0, void 0, function* () { return HarnessPredicate.stringMatches(yield (yield harness.host()).text(), test); }));
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Dismisses the token.
|
|
26
|
+
*/
|
|
27
|
+
dismiss() {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
if (!(yield this.isDismissible())) {
|
|
30
|
+
throw new Error('Could not dismiss the token because it is not dismissable.');
|
|
31
|
+
}
|
|
32
|
+
return (yield __classPrivateFieldGet(this, _SkyTokenHarness_getDismissButton, "f").call(this)).click();
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Returns the text content of the token.
|
|
37
|
+
*/
|
|
38
|
+
getText() {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
return (yield this.host()).text();
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Whether the token is dismissible.
|
|
45
|
+
*/
|
|
46
|
+
isDismissible() {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
return yield (yield __classPrivateFieldGet(this, _SkyTokenHarness_getWrapper, "f").call(this)).hasClass('sky-token-dismissable');
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
_SkyTokenHarness_getDismissButton = new WeakMap(), _SkyTokenHarness_getWrapper = new WeakMap();
|
|
53
|
+
SkyTokenHarness.hostSelector = 'sky-token';
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Harness for interacting with a tokens component in tests.
|
|
57
|
+
*/
|
|
58
|
+
class SkyTokensHarness extends SkyComponentHarness {
|
|
59
|
+
/**
|
|
60
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
61
|
+
* `SkyTokensHarness` that meets certain criteria.
|
|
62
|
+
*/
|
|
63
|
+
static with(filters) {
|
|
64
|
+
return SkyTokensHarness.getDataSkyIdPredicate(filters);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Dismisses all tokens, or tokens that meet certain criteria.
|
|
68
|
+
*/
|
|
69
|
+
dismissTokens(filters) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
const tokens = yield this.getTokens(filters);
|
|
72
|
+
for (const token of tokens) {
|
|
73
|
+
yield token.dismiss();
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Returns a list of tokens.
|
|
79
|
+
*/
|
|
80
|
+
getTokens(filters) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
return this.locatorForAll(SkyTokenHarness.with(filters || {}))();
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Returns the text content of all tokens.
|
|
87
|
+
*/
|
|
88
|
+
getTokensText() {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
const tokens = yield this.getTokens();
|
|
91
|
+
const values = [];
|
|
92
|
+
for (const token of tokens) {
|
|
93
|
+
values.push(yield token.getText());
|
|
94
|
+
}
|
|
95
|
+
return values;
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
SkyTokensHarness.hostSelector = 'sky-tokens';
|
|
100
|
+
|
|
4
101
|
/**
|
|
5
102
|
* Allows interaction with a SKY UX alert component.
|
|
103
|
+
* @deprecated Use `SkyAlertHarness` instead.
|
|
6
104
|
*/
|
|
7
105
|
class SkyAlertFixture {
|
|
8
106
|
constructor(fixture, skyTestId) {
|
|
@@ -127,9 +225,88 @@ class SkyWaitFixture {
|
|
|
127
225
|
}
|
|
128
226
|
}
|
|
129
227
|
|
|
228
|
+
var _SkyAlertHarness_getAlert, _SkyAlertHarness_getContent, _SkyAlertHarness_getCloseButton;
|
|
229
|
+
/**
|
|
230
|
+
* Harness for interacting with an alert component in tests.
|
|
231
|
+
*/
|
|
232
|
+
class SkyAlertHarness extends SkyComponentHarness {
|
|
233
|
+
constructor() {
|
|
234
|
+
super(...arguments);
|
|
235
|
+
_SkyAlertHarness_getAlert.set(this, this.locatorFor('.sky-alert'));
|
|
236
|
+
_SkyAlertHarness_getContent.set(this, this.locatorFor('.sky-alert-content'));
|
|
237
|
+
_SkyAlertHarness_getCloseButton.set(this, this.locatorFor('.sky-alert-close'));
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
241
|
+
* `SkyAlertHarness` that meets certain criteria.
|
|
242
|
+
*/
|
|
243
|
+
static with(filters) {
|
|
244
|
+
return SkyAlertHarness.getDataSkyIdPredicate(filters);
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Gets the current alert type.
|
|
248
|
+
*/
|
|
249
|
+
getAlertType() {
|
|
250
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
251
|
+
const alert = yield __classPrivateFieldGet(this, _SkyAlertHarness_getAlert, "f").call(this);
|
|
252
|
+
if (yield alert.hasClass('sky-alert-danger')) {
|
|
253
|
+
return 'danger';
|
|
254
|
+
}
|
|
255
|
+
if (yield alert.hasClass('sky-alert-info')) {
|
|
256
|
+
return 'info';
|
|
257
|
+
}
|
|
258
|
+
if (yield alert.hasClass('sky-alert-success')) {
|
|
259
|
+
return 'success';
|
|
260
|
+
}
|
|
261
|
+
if (yield alert.hasClass('sky-alert-warning')) {
|
|
262
|
+
return 'warning';
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Gets the current alert text.
|
|
268
|
+
*/
|
|
269
|
+
getText() {
|
|
270
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
271
|
+
return yield (yield __classPrivateFieldGet(this, _SkyAlertHarness_getContent, "f").call(this)).text();
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Closes the alert.
|
|
276
|
+
*/
|
|
277
|
+
close() {
|
|
278
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
279
|
+
if (!(yield this.isCloseable())) {
|
|
280
|
+
throw new Error('The alert is not closeable.');
|
|
281
|
+
}
|
|
282
|
+
(yield __classPrivateFieldGet(this, _SkyAlertHarness_getCloseButton, "f").call(this)).click();
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Indicates whether the user has closed the alert.
|
|
287
|
+
*/
|
|
288
|
+
isClosed() {
|
|
289
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
290
|
+
const alert = yield __classPrivateFieldGet(this, _SkyAlertHarness_getAlert, "f").call(this);
|
|
291
|
+
return yield alert.getProperty('hidden');
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Indicates whether the user can close the alert.
|
|
296
|
+
*/
|
|
297
|
+
isCloseable() {
|
|
298
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
299
|
+
const closeBtn = yield __classPrivateFieldGet(this, _SkyAlertHarness_getCloseButton, "f").call(this);
|
|
300
|
+
return !(yield closeBtn.getProperty('hidden'));
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
_SkyAlertHarness_getAlert = new WeakMap(), _SkyAlertHarness_getContent = new WeakMap(), _SkyAlertHarness_getCloseButton = new WeakMap();
|
|
305
|
+
SkyAlertHarness.hostSelector = 'sky-alert';
|
|
306
|
+
|
|
130
307
|
/**
|
|
131
308
|
* Generated bundle index. Do not edit.
|
|
132
309
|
*/
|
|
133
310
|
|
|
134
|
-
export { SkyAlertFixture, SkyLabelFixture, SkyWaitFixture };
|
|
311
|
+
export { SkyAlertFixture, SkyAlertHarness, SkyLabelFixture, SkyTokenHarness, SkyTokensHarness, SkyWaitFixture };
|
|
135
312
|
//# sourceMappingURL=skyux-indicators-testing.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skyux-indicators-testing.mjs","sources":["../../../../../libs/components/indicators/testing/src/alert-fixture.ts","../../../../../libs/components/indicators/testing/src/label-fixture.ts","../../../../../libs/components/indicators/testing/src/wait-fixture.ts","../../../../../libs/components/indicators/testing/src/skyux-indicators-testing.ts"],"sourcesContent":["import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\n/**\n * Allows interaction with a SKY UX alert component.\n */\nexport class SkyAlertFixture {\n /**\n * The alert's current text.\n */\n public get text(): string {\n return SkyAppTestUtility.getText(this.debugEl);\n }\n\n /**\n * A flag indicating whether the alert can be closed.\n */\n public get closeable(): boolean {\n const closeBtnEl = this.getCloseBtnEl();\n\n return SkyAppTestUtility.isVisible(closeBtnEl);\n }\n\n /**\n * Returns a flag indicating whether the alert is closed.\n */\n public get closed(): boolean {\n return !SkyAppTestUtility.isVisible(this.getAlertEl());\n }\n\n /**\n * The alert's current type.\n */\n public get alertType(): string {\n const clsList = this.getAlertEl().nativeElement.classList;\n\n if (clsList.contains('sky-alert-danger')) {\n return 'danger';\n }\n\n if (clsList.contains('sky-alert-info')) {\n return 'info';\n }\n\n if (clsList.contains('sky-alert-success')) {\n return 'success';\n }\n\n if (clsList.contains('sky-alert-warning')) {\n return 'warning';\n }\n\n return undefined;\n }\n\n private debugEl: DebugElement;\n\n constructor(fixture: ComponentFixture<any>, skyTestId: string) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-alert'\n );\n }\n\n /**\n * Closes the alert. If the alert is not closeable, an error is thrown.\n */\n public close(): void {\n if (this.closeable) {\n const closeBtnEl = this.getCloseBtnEl();\n\n closeBtnEl.triggerEventHandler('click', {});\n } else {\n throw new Error('The alert is not closeable.');\n }\n }\n\n private getAlertEl(): DebugElement {\n return this.debugEl.query(By.css('.sky-alert'));\n }\n\n private getCloseBtnEl(): DebugElement {\n return this.debugEl.query(By.css('.sky-alert-close'));\n }\n}\n","import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\n/**\n * Allows interaction with a SKY UX label component.\n */\nexport class SkyLabelFixture {\n /**\n * The label's current type.\n */\n public get labelType(): string {\n const clsList = this.getLabelEl().nativeElement.classList;\n\n if (clsList.contains('sky-label-danger')) {\n return 'danger';\n }\n\n if (clsList.contains('sky-label-info')) {\n return 'info';\n }\n\n if (clsList.contains('sky-label-success')) {\n return 'success';\n }\n\n if (clsList.contains('sky-label-warning')) {\n return 'warning';\n }\n\n return undefined;\n }\n\n /**\n * The label's current text.\n */\n public get text(): string {\n const labelEl = this.getLabelEl();\n\n return SkyAppTestUtility.getText(labelEl);\n }\n\n private debugEl: DebugElement;\n\n constructor(fixture: ComponentFixture<any>, skyTestId: string) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-label'\n );\n }\n\n private getLabelEl(): DebugElement {\n return this.debugEl.query(By.css('.sky-label'));\n }\n}\n","import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\nexport class SkyWaitFixture {\n public get isWaiting(): boolean {\n return this.innerWaitComponentContainsClass('.sky-wait-mask');\n }\n\n public get isFullPage(): boolean {\n return this.innerWaitComponentContainsClass('.sky-wait-mask-loading-fixed');\n }\n\n public get ariaLabel(): string {\n const div: HTMLDivElement =\n this.debugEl.nativeElement.querySelector('.sky-wait-mask');\n return div.getAttribute('aria-label');\n }\n\n public get isNonBlocking(): boolean {\n return this.innerWaitComponentContainsClass(\n '.sky-wait-mask-loading-non-blocking'\n );\n }\n\n private debugEl: DebugElement;\n\n constructor(fixture: ComponentFixture<any>, skyTestId: string) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-wait'\n );\n }\n\n private innerWaitComponentContainsClass(className: string): boolean {\n const element: HTMLDivElement =\n this.debugEl.nativeElement.querySelector(className);\n return element !== null;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAKA;;AAEG;MACU,eAAe,CAAA;IAmD1B,WAAY,CAAA,OAA8B,EAAE,SAAiB,EAAA;AAC3D,QAAA,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,uBAAuB,CACtD,OAAO,EACP,SAAS,EACT,WAAW,CACZ,CAAC;KACH;AAxDD;;AAEG;AACH,IAAA,IA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;AAChB,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;KACjD;AACF;;MCpDY,cAAc,CAAA;IAuBzB,WAAY,CAAA,OAA8B,EAAE,SAAiB,EAAA;AAC3D,QAAA,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,uBAAuB,CACtD,OAAO,EACP,SAAS,EACT,UAAU,CACX,CAAC;KACH;AA5BD,IAAA,IAAW,SAAS,GAAA;AAClB,QAAA,OAAO,IAAI,CAAC,+BAA+B,CAAC,gBAAgB,CAAC,CAAC;KAC/D;AAED,IAAA,IAAW,UAAU,GAAA;AACnB,QAAA,OAAO,IAAI,CAAC,+BAA+B,CAAC,8BAA8B,CAAC,CAAC;KAC7E;AAED,IAAA,IAAW,SAAS,GAAA;AAClB,QAAA,MAAM,GAAG,GACP,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;AAC7D,QAAA,OAAO,GAAG,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;KACvC;AAED,IAAA,IAAW,aAAa,GAAA;AACtB,QAAA,OAAO,IAAI,CAAC,+BAA+B,CACzC,qCAAqC,CACtC,CAAC;KACH;AAYO,IAAA,+BAA+B,CAAC,SAAiB,EAAA;AACvD,QAAA,MAAM,OAAO,GACX,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QACtD,OAAO,OAAO,KAAK,IAAI,CAAC;KACzB;AACF;;ACxCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"skyux-indicators-testing.mjs","sources":["../../../../../libs/components/indicators/testing/src/tokens/token-harness.ts","../../../../../libs/components/indicators/testing/src/tokens/tokens-harness.ts","../../../../../libs/components/indicators/testing/src/alert-fixture.ts","../../../../../libs/components/indicators/testing/src/label-fixture.ts","../../../../../libs/components/indicators/testing/src/wait-fixture.ts","../../../../../libs/components/indicators/testing/src/alert/alert-harness.ts","../../../../../libs/components/indicators/testing/src/skyux-indicators-testing.ts"],"sourcesContent":["import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport { SkyTokenHarnessFilters } from './token-harness-filters';\n\n/**\n * Harness for interacting with a token component in tests.\n */\nexport class SkyTokenHarness extends ComponentHarness {\n public static hostSelector = 'sky-token';\n\n #getDismissButton = this.locatorForOptional('button.sky-token-btn-close');\n\n #getWrapper = this.locatorFor('.sky-token');\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a\n * `SkyTokenHarness` that meets certain criteria.\n */\n public static with(\n filters: SkyTokenHarnessFilters\n ): HarnessPredicate<SkyTokenHarness> {\n return new HarnessPredicate(this, filters).addOption(\n 'text',\n filters.text,\n async (harness, test) =>\n HarnessPredicate.stringMatches(\n await (await harness.host()).text(),\n test\n )\n );\n }\n\n /**\n * Dismisses the token.\n */\n public async dismiss(): Promise<void> {\n if (!(await this.isDismissible())) {\n throw new Error(\n 'Could not dismiss the token because it is not dismissable.'\n );\n }\n\n return (await this.#getDismissButton()).click();\n }\n\n /**\n * Returns the text content of the token.\n */\n public async getText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /**\n * Whether the token is dismissible.\n */\n public async isDismissible(): Promise<boolean> {\n return await (await this.#getWrapper()).hasClass('sky-token-dismissable');\n }\n}\n","import { SkyComponentHarness } from '@skyux/core/testing';\n\nimport { SkyTokenHarness } from './token-harness';\nimport { SkyTokenHarnessFilters } from './token-harness-filters';\nimport { SkyTokensHarnessFilters } from './tokens-harness-filters';\n\n/**\n * Harness for interacting with a tokens component in tests.\n */\nexport class SkyTokensHarness extends SkyComponentHarness {\n public static hostSelector = 'sky-tokens';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a\n * `SkyTokensHarness` that meets certain criteria.\n */\n public static with(filters: SkyTokensHarnessFilters) {\n return SkyTokensHarness.getDataSkyIdPredicate(filters);\n }\n\n /**\n * Dismisses all tokens, or tokens that meet certain criteria.\n */\n public async dismissTokens(filters?: SkyTokenHarnessFilters): Promise<void> {\n const tokens = await this.getTokens(filters);\n for (const token of tokens) {\n await token.dismiss();\n }\n }\n\n /**\n * Returns a list of tokens.\n */\n public async getTokens(\n filters?: SkyTokenHarnessFilters\n ): Promise<SkyTokenHarness[]> {\n return this.locatorForAll(SkyTokenHarness.with(filters || {}))();\n }\n\n /**\n * Returns the text content of all tokens.\n */\n public async getTokensText(): Promise<string[]> {\n const tokens = await this.getTokens();\n const values: string[] = [];\n\n for (const token of tokens) {\n values.push(await token.getText());\n }\n\n return values;\n }\n}\n","import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\n/**\n * Allows interaction with a SKY UX alert component.\n * @deprecated Use `SkyAlertHarness` instead.\n */\nexport class SkyAlertFixture {\n /**\n * The alert's current text.\n */\n public get text(): string {\n return SkyAppTestUtility.getText(this.debugEl);\n }\n\n /**\n * A flag indicating whether the alert can be closed.\n */\n public get closeable(): boolean {\n const closeBtnEl = this.getCloseBtnEl();\n\n return SkyAppTestUtility.isVisible(closeBtnEl);\n }\n\n /**\n * Returns a flag indicating whether the alert is closed.\n */\n public get closed(): boolean {\n return !SkyAppTestUtility.isVisible(this.getAlertEl());\n }\n\n /**\n * The alert's current type.\n */\n public get alertType(): string {\n const clsList = this.getAlertEl().nativeElement.classList;\n\n if (clsList.contains('sky-alert-danger')) {\n return 'danger';\n }\n\n if (clsList.contains('sky-alert-info')) {\n return 'info';\n }\n\n if (clsList.contains('sky-alert-success')) {\n return 'success';\n }\n\n if (clsList.contains('sky-alert-warning')) {\n return 'warning';\n }\n\n return undefined;\n }\n\n private debugEl: DebugElement;\n\n constructor(fixture: ComponentFixture<any>, skyTestId: string) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-alert'\n );\n }\n\n /**\n * Closes the alert. If the alert is not closeable, an error is thrown.\n */\n public close(): void {\n if (this.closeable) {\n const closeBtnEl = this.getCloseBtnEl();\n\n closeBtnEl.triggerEventHandler('click', {});\n } else {\n throw new Error('The alert is not closeable.');\n }\n }\n\n private getAlertEl(): DebugElement {\n return this.debugEl.query(By.css('.sky-alert'));\n }\n\n private getCloseBtnEl(): DebugElement {\n return this.debugEl.query(By.css('.sky-alert-close'));\n }\n}\n","import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { By } from '@angular/platform-browser';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\n/**\n * Allows interaction with a SKY UX label component.\n */\nexport class SkyLabelFixture {\n /**\n * The label's current type.\n */\n public get labelType(): string | undefined {\n const clsList = this.getLabelEl().nativeElement.classList;\n\n if (clsList.contains('sky-label-danger')) {\n return 'danger';\n }\n\n if (clsList.contains('sky-label-info')) {\n return 'info';\n }\n\n if (clsList.contains('sky-label-success')) {\n return 'success';\n }\n\n if (clsList.contains('sky-label-warning')) {\n return 'warning';\n }\n\n return undefined;\n }\n\n /**\n * The label's current text.\n */\n public get text(): string | undefined {\n const labelEl = this.getLabelEl();\n\n return SkyAppTestUtility.getText(labelEl);\n }\n\n private debugEl: DebugElement;\n\n constructor(fixture: ComponentFixture<any>, skyTestId: string) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-label'\n );\n }\n\n private getLabelEl(): DebugElement {\n return this.debugEl.query(By.css('.sky-label'));\n }\n}\n","import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { SkyAppTestUtility } from '@skyux-sdk/testing';\n\nexport class SkyWaitFixture {\n public get isWaiting(): boolean {\n return this.innerWaitComponentContainsClass('.sky-wait-mask');\n }\n\n public get isFullPage(): boolean {\n return this.innerWaitComponentContainsClass('.sky-wait-mask-loading-fixed');\n }\n\n public get ariaLabel(): string {\n const div: HTMLDivElement =\n this.debugEl.nativeElement.querySelector('.sky-wait-mask');\n return div.getAttribute('aria-label');\n }\n\n public get isNonBlocking(): boolean {\n return this.innerWaitComponentContainsClass(\n '.sky-wait-mask-loading-non-blocking'\n );\n }\n\n private debugEl: DebugElement;\n\n constructor(fixture: ComponentFixture<any>, skyTestId: string) {\n this.debugEl = SkyAppTestUtility.getDebugElementByTestId(\n fixture,\n skyTestId,\n 'sky-wait'\n );\n }\n\n private innerWaitComponentContainsClass(className: string): boolean {\n const element: HTMLDivElement =\n this.debugEl.nativeElement.querySelector(className);\n return element !== null;\n }\n}\n","import { HarnessPredicate } from '@angular/cdk/testing';\nimport { SkyComponentHarness } from '@skyux/core/testing';\nimport { SkyIndicatorIconType } from '@skyux/indicators';\n\nimport { SkyAlertHarnessFilters } from './alert-harness-filters';\n\n/**\n * Harness for interacting with an alert component in tests.\n */\nexport class SkyAlertHarness extends SkyComponentHarness {\n public static hostSelector = 'sky-alert';\n\n #getAlert = this.locatorFor('.sky-alert');\n #getContent = this.locatorFor('.sky-alert-content');\n #getCloseButton = this.locatorFor('.sky-alert-close');\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a\n * `SkyAlertHarness` that meets certain criteria.\n */\n public static with(\n filters: SkyAlertHarnessFilters\n ): HarnessPredicate<SkyAlertHarness> {\n return SkyAlertHarness.getDataSkyIdPredicate(filters);\n }\n\n /**\n * Gets the current alert type.\n */\n public async getAlertType(): Promise<SkyIndicatorIconType> {\n const alert = await this.#getAlert();\n\n if (await alert.hasClass('sky-alert-danger')) {\n return 'danger';\n }\n\n if (await alert.hasClass('sky-alert-info')) {\n return 'info';\n }\n\n if (await alert.hasClass('sky-alert-success')) {\n return 'success';\n }\n\n if (await alert.hasClass('sky-alert-warning')) {\n return 'warning';\n }\n }\n\n /**\n * Gets the current alert text.\n */\n public async getText(): Promise<string> {\n return await (await this.#getContent()).text();\n }\n\n /**\n * Closes the alert.\n */\n public async close(): Promise<void> {\n if (!(await this.isCloseable())) {\n throw new Error('The alert is not closeable.');\n }\n\n (await this.#getCloseButton()).click();\n }\n\n /**\n * Indicates whether the user has closed the alert.\n */\n public async isClosed(): Promise<boolean> {\n const alert = await this.#getAlert();\n\n return await alert.getProperty('hidden');\n }\n\n /**\n * Indicates whether the user can close the alert.\n */\n public async isCloseable(): Promise<boolean> {\n const closeBtn = await this.#getCloseButton();\n return !(await closeBtn.getProperty('hidden'));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAIA;;AAEG;AACG,MAAO,eAAgB,SAAQ,gBAAgB,CAAA;AAArD,IAAA,WAAA,GAAA;;AAGE,QAAA,iCAAA,CAAA,GAAA,CAAA,IAAA,EAAoB,IAAI,CAAC,kBAAkB,CAAC,4BAA4B,CAAC,CAAC,CAAA;AAE1E,QAAA,2BAAA,CAAA,GAAA,CAAA,IAAA,EAAc,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAA;KA8C7C;AA5CC;;;AAGG;IACI,OAAO,IAAI,CAChB,OAA+B,EAAA;QAE/B,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,CAClD,MAAM,EACN,OAAO,CAAC,IAAI,EACZ,CAAO,OAAO,EAAE,IAAI,oDAClB,OAAA,gBAAgB,CAAC,aAAa,CAC5B,MAAM,CAAC,MAAM,OAAO,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,EACnC,IAAI,CACL,CAAA,EAAA,CAAA,CACJ,CAAC;KACH;AAED;;AAEG;IACU,OAAO,GAAA;;YAClB,IAAI,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC,EAAE;AACjC,gBAAA,MAAM,IAAI,KAAK,CACb,4DAA4D,CAC7D,CAAC;AACH,aAAA;AAED,YAAA,OAAO,CAAC,MAAM,sBAAA,CAAA,IAAI,EAAkB,iCAAA,EAAA,GAAA,CAAA,CAAA,IAAA,CAAtB,IAAI,CAAoB,EAAE,KAAK,EAAE,CAAC;SACjD,CAAA,CAAA;A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|
9
9
|
import * as i2 from '@skyux/core';
|
|
10
10
|
import { SkyTrimModule, MutationObserverService } from '@skyux/core';
|
|
11
|
+
import { __classPrivateFieldSet, __classPrivateFieldGet } from 'tslib';
|
|
11
12
|
import { trigger, transition, style, animate } from '@angular/animations';
|
|
12
13
|
import { Subject, BehaviorSubject, defer } from 'rxjs';
|
|
13
14
|
import { takeUntil, finalize } from 'rxjs/operators';
|
|
@@ -246,7 +247,9 @@ class SkyAlertComponent {
|
|
|
246
247
|
* Fires when users close the alert.
|
|
247
248
|
*/
|
|
248
249
|
this.closedChange = new EventEmitter();
|
|
250
|
+
this.alertTypeOrDefault = ALERT_TYPE_DEFAULT;
|
|
249
251
|
}
|
|
252
|
+
// TODO: Change alertType to SkyIndicatorIconType in a breaking change.
|
|
250
253
|
/**
|
|
251
254
|
* Specifies a style for the alert to determine the icon and background color.
|
|
252
255
|
* The valid options are `danger`, `info`, `success`, and `warning`.
|
|
@@ -254,10 +257,12 @@ class SkyAlertComponent {
|
|
|
254
257
|
*/
|
|
255
258
|
set alertType(value) {
|
|
256
259
|
this._alertType = value;
|
|
260
|
+
this.alertTypeOrDefault =
|
|
261
|
+
value || ALERT_TYPE_DEFAULT;
|
|
257
262
|
this.updateAlertIcon();
|
|
258
263
|
}
|
|
259
264
|
get alertType() {
|
|
260
|
-
return this._alertType
|
|
265
|
+
return this._alertType;
|
|
261
266
|
}
|
|
262
267
|
ngOnInit() {
|
|
263
268
|
this.updateAlertIcon();
|
|
@@ -267,16 +272,16 @@ class SkyAlertComponent {
|
|
|
267
272
|
this.closedChange.emit(true);
|
|
268
273
|
}
|
|
269
274
|
updateAlertIcon() {
|
|
270
|
-
const indicatorIcon = SkyIndicatorIconUtility.getIconsForType(this.
|
|
275
|
+
const indicatorIcon = SkyIndicatorIconUtility.getIconsForType(this.alertTypeOrDefault);
|
|
271
276
|
this.alertBaseIcon = indicatorIcon.modernThemeBaseIcon;
|
|
272
277
|
this.alertTopIcon = indicatorIcon.modernThemeTopIcon;
|
|
273
278
|
}
|
|
274
279
|
}
|
|
275
280
|
SkyAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
276
|
-
SkyAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyAlertComponent, selector: "sky-alert", inputs: { alertType: "alertType", closeable: "closeable", closed: "closed" }, outputs: { closedChange: "closedChange" }, ngImport: i0, template: "<div\n class=\"sky-alert\"\n [skyThemeClass]=\"{\n 'sky-rounded-corners': 'default',\n 'sky-box sky-elevation-1': 'modern'\n }\"\n role=\"alert\"\n [hidden]=\"closed\"\n [ngClass]=\"{\n 'sky-alert-info':
|
|
281
|
+
SkyAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyAlertComponent, selector: "sky-alert", inputs: { alertType: "alertType", closeable: "closeable", closed: "closed" }, outputs: { closedChange: "closedChange" }, ngImport: i0, template: "<div\n class=\"sky-alert\"\n [skyThemeClass]=\"{\n 'sky-rounded-corners': 'default',\n 'sky-box sky-elevation-1': 'modern'\n }\"\n role=\"alert\"\n [hidden]=\"closed\"\n [ngClass]=\"{\n 'sky-alert-info': alertTypeOrDefault === 'info',\n 'sky-alert-success': alertTypeOrDefault === 'success',\n 'sky-alert-warning': alertTypeOrDefault === 'warning',\n 'sky-alert-danger': alertTypeOrDefault === 'danger',\n 'sky-alert-closeable': closeable\n }\"\n>\n <div aria-hidden=\"true\" class=\"sky-alert-icon-theme-modern\">\n <sky-icon-stack [baseIcon]=\"alertBaseIcon\" [topIcon]=\"alertTopIcon\">\n </sky-icon-stack>\n </div>\n <div class=\"sky-alert-content\">\n <ng-content></ng-content>\n </div>\n <button\n class=\"sky-alert-close\"\n type=\"button\"\n [attr.aria-label]=\"'skyux_alert_close' | skyLibResources\"\n [hidden]=\"!closeable\"\n (click)=\"close()\"\n >\n <span aria-hidden=\"true\">\n <sky-icon class=\"sky-alert-close-icon-theme-default\" icon=\"close\">\n </sky-icon>\n <sky-icon\n class=\"sky-alert-close-icon-theme-modern\"\n icon=\"close\"\n iconType=\"skyux\"\n size=\"2x\"\n >\n </sky-icon>\n </span>\n </button>\n</div>\n", styles: [".sky-alert{padding:0 10px;margin-bottom:20px;border-left:solid 30px;color:#212327;display:flex;flex-direction:row;align-items:center}.sky-alert .sky-alert-content{padding-top:10px;padding-bottom:10px;width:100%}.sky-alert .sky-alert-content ::ng-deep a{color:#212327cc;text-decoration:underline}.sky-alert .sky-alert-content ::ng-deep a:hover{color:#212327}.sky-alert button{margin-left:auto;width:32px;height:32px}.sky-alert.sky-alert-info{background-color:#81d4f7;border-color:#00b4f1}.sky-alert.sky-alert-info:before{content:\"\\f06a\";font-family:FontAwesome;margin-left:-31px;margin-right:20px;color:#fff}.sky-alert.sky-alert-success{background-color:#b7da9b;border-color:#72bf44}.sky-alert.sky-alert-success:before{content:\"\\f00c\";font-family:FontAwesome;margin-left:-32px;margin-right:19px;color:#fff}.sky-alert.sky-alert-warning{background-color:#ffd597;border-color:#fbb034}.sky-alert.sky-alert-warning:before{content:\"\\f071\";font-family:FontAwesome;margin-left:-32px;margin-right:19px;color:#fff}.sky-alert.sky-alert-danger{background-color:#f7a08f;border-color:#ef4044}.sky-alert.sky-alert-danger:before{content:\"\\f071\";font-family:FontAwesome;margin-left:-32px;margin-right:19px;color:#fff}.sky-alert-close{cursor:pointer;font-weight:700;line-height:1;margin:0;padding:0;color:#212327;opacity:.8;border:none;background-color:transparent;display:none}.sky-alert-close:hover{opacity:1}.sky-alert-closeable .sky-alert-close{display:block}.sky-alert-close-icon-theme-modern,.sky-alert-icon-theme-modern{display:none}:host-context(.sky-theme-modern) .sky-alert{border-left-width:7px}:host-context(.sky-theme-modern) .sky-alert .sky-alert-content{padding:15px}:host-context(.sky-theme-modern) .sky-alert.sky-alert-info{background-color:#c1e8fb}:host-context(.sky-theme-modern) .sky-alert-info:before,:host-context(.sky-theme-modern) .sky-alert-success:before,:host-context(.sky-theme-modern) .sky-alert-warning:before,:host-context(.sky-theme-modern) .sky-alert-danger:before{display:none}:host-context(.sky-theme-modern) .sky-alert-info .sky-alert-icon-theme-modern{color:#00b4f1}:host-context(.sky-theme-modern) .sky-alert-success .sky-alert-icon-theme-modern{color:#72bf44}:host-context(.sky-theme-modern) .sky-alert-warning .sky-alert-icon-theme-modern{color:#fbb034}:host-context(.sky-theme-modern) .sky-alert-danger .sky-alert-icon-theme-modern{color:#ef4044}:host-context(.sky-theme-modern) .sky-alert-icon-theme-modern{display:block}:host-context(.sky-theme-modern) .sky-alert-close-icon-theme-default{display:none}:host-context(.sky-theme-modern) .sky-alert-close-icon-theme-modern{display:inline}.sky-theme-modern .sky-alert{border-left-width:7px}.sky-theme-modern .sky-alert .sky-alert-content{padding:15px}.sky-theme-modern .sky-alert.sky-alert-info{background-color:#c1e8fb}.sky-theme-modern .sky-alert-info:before,.sky-theme-modern .sky-alert-success:before,.sky-theme-modern .sky-alert-warning:before,.sky-theme-modern .sky-alert-danger:before{display:none}.sky-theme-modern .sky-alert-info .sky-alert-icon-theme-modern{color:#00b4f1}.sky-theme-modern .sky-alert-success .sky-alert-icon-theme-modern{color:#72bf44}.sky-theme-modern .sky-alert-warning .sky-alert-icon-theme-modern{color:#fbb034}.sky-theme-modern .sky-alert-danger .sky-alert-icon-theme-modern{color:#ef4044}.sky-theme-modern .sky-alert-icon-theme-modern{display:block}.sky-theme-modern .sky-alert-close-icon-theme-default{display:none}.sky-theme-modern .sky-alert-close-icon-theme-modern{display:inline}\n"], components: [{ type: SkyIconStackComponent, selector: "sky-icon-stack", inputs: ["size", "baseIcon", "topIcon"] }, { type: SkyIconComponent, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i3.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "skyLibResources": i1$1.SkyLibResourcesPipe } });
|
|
277
282
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyAlertComponent, decorators: [{
|
|
278
283
|
type: Component,
|
|
279
|
-
args: [{ selector: 'sky-alert', template: "<div\n class=\"sky-alert\"\n [skyThemeClass]=\"{\n 'sky-rounded-corners': 'default',\n 'sky-box sky-elevation-1': 'modern'\n }\"\n role=\"alert\"\n [hidden]=\"closed\"\n [ngClass]=\"{\n 'sky-alert-info':
|
|
284
|
+
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': alertTypeOrDefault === 'info',\n 'sky-alert-success': alertTypeOrDefault === 'success',\n 'sky-alert-warning': alertTypeOrDefault === 'warning',\n 'sky-alert-danger': alertTypeOrDefault === 'danger',\n 'sky-alert-closeable': closeable\n }\"\n>\n <div aria-hidden=\"true\" class=\"sky-alert-icon-theme-modern\">\n <sky-icon-stack [baseIcon]=\"alertBaseIcon\" [topIcon]=\"alertTopIcon\">\n </sky-icon-stack>\n </div>\n <div class=\"sky-alert-content\">\n <ng-content></ng-content>\n </div>\n <button\n class=\"sky-alert-close\"\n type=\"button\"\n [attr.aria-label]=\"'skyux_alert_close' | skyLibResources\"\n [hidden]=\"!closeable\"\n (click)=\"close()\"\n >\n <span aria-hidden=\"true\">\n <sky-icon class=\"sky-alert-close-icon-theme-default\" icon=\"close\">\n </sky-icon>\n <sky-icon\n class=\"sky-alert-close-icon-theme-modern\"\n icon=\"close\"\n iconType=\"skyux\"\n size=\"2x\"\n >\n </sky-icon>\n </span>\n </button>\n</div>\n", styles: [".sky-alert{padding:0 10px;margin-bottom:20px;border-left:solid 30px;color:#212327;display:flex;flex-direction:row;align-items:center}.sky-alert .sky-alert-content{padding-top:10px;padding-bottom:10px;width:100%}.sky-alert .sky-alert-content ::ng-deep a{color:#212327cc;text-decoration:underline}.sky-alert .sky-alert-content ::ng-deep a:hover{color:#212327}.sky-alert button{margin-left:auto;width:32px;height:32px}.sky-alert.sky-alert-info{background-color:#81d4f7;border-color:#00b4f1}.sky-alert.sky-alert-info:before{content:\"\\f06a\";font-family:FontAwesome;margin-left:-31px;margin-right:20px;color:#fff}.sky-alert.sky-alert-success{background-color:#b7da9b;border-color:#72bf44}.sky-alert.sky-alert-success:before{content:\"\\f00c\";font-family:FontAwesome;margin-left:-32px;margin-right:19px;color:#fff}.sky-alert.sky-alert-warning{background-color:#ffd597;border-color:#fbb034}.sky-alert.sky-alert-warning:before{content:\"\\f071\";font-family:FontAwesome;margin-left:-32px;margin-right:19px;color:#fff}.sky-alert.sky-alert-danger{background-color:#f7a08f;border-color:#ef4044}.sky-alert.sky-alert-danger:before{content:\"\\f071\";font-family:FontAwesome;margin-left:-32px;margin-right:19px;color:#fff}.sky-alert-close{cursor:pointer;font-weight:700;line-height:1;margin:0;padding:0;color:#212327;opacity:.8;border:none;background-color:transparent;display:none}.sky-alert-close:hover{opacity:1}.sky-alert-closeable .sky-alert-close{display:block}.sky-alert-close-icon-theme-modern,.sky-alert-icon-theme-modern{display:none}:host-context(.sky-theme-modern) .sky-alert{border-left-width:7px}:host-context(.sky-theme-modern) .sky-alert .sky-alert-content{padding:15px}:host-context(.sky-theme-modern) .sky-alert.sky-alert-info{background-color:#c1e8fb}:host-context(.sky-theme-modern) .sky-alert-info:before,:host-context(.sky-theme-modern) .sky-alert-success:before,:host-context(.sky-theme-modern) .sky-alert-warning:before,:host-context(.sky-theme-modern) .sky-alert-danger:before{display:none}:host-context(.sky-theme-modern) .sky-alert-info .sky-alert-icon-theme-modern{color:#00b4f1}:host-context(.sky-theme-modern) .sky-alert-success .sky-alert-icon-theme-modern{color:#72bf44}:host-context(.sky-theme-modern) .sky-alert-warning .sky-alert-icon-theme-modern{color:#fbb034}:host-context(.sky-theme-modern) .sky-alert-danger .sky-alert-icon-theme-modern{color:#ef4044}:host-context(.sky-theme-modern) .sky-alert-icon-theme-modern{display:block}:host-context(.sky-theme-modern) .sky-alert-close-icon-theme-default{display:none}:host-context(.sky-theme-modern) .sky-alert-close-icon-theme-modern{display:inline}.sky-theme-modern .sky-alert{border-left-width:7px}.sky-theme-modern .sky-alert .sky-alert-content{padding:15px}.sky-theme-modern .sky-alert.sky-alert-info{background-color:#c1e8fb}.sky-theme-modern .sky-alert-info:before,.sky-theme-modern .sky-alert-success:before,.sky-theme-modern .sky-alert-warning:before,.sky-theme-modern .sky-alert-danger:before{display:none}.sky-theme-modern .sky-alert-info .sky-alert-icon-theme-modern{color:#00b4f1}.sky-theme-modern .sky-alert-success .sky-alert-icon-theme-modern{color:#72bf44}.sky-theme-modern .sky-alert-warning .sky-alert-icon-theme-modern{color:#fbb034}.sky-theme-modern .sky-alert-danger .sky-alert-icon-theme-modern{color:#ef4044}.sky-theme-modern .sky-alert-icon-theme-modern{display:block}.sky-theme-modern .sky-alert-close-icon-theme-default{display:none}.sky-theme-modern .sky-alert-close-icon-theme-modern{display:inline}\n"] }]
|
|
280
285
|
}], propDecorators: { alertType: [{
|
|
281
286
|
type: Input
|
|
282
287
|
}], closeable: [{
|
|
@@ -534,6 +539,7 @@ class SkyKeyInfoComponent {
|
|
|
534
539
|
* value or in a horizontal layout with the label beside the value.
|
|
535
540
|
* @default "vertical"
|
|
536
541
|
*/
|
|
542
|
+
// TODO: More strongly type this in a future breaking change.
|
|
537
543
|
this.layout = 'vertical';
|
|
538
544
|
}
|
|
539
545
|
}
|
|
@@ -572,30 +578,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
572
578
|
}]
|
|
573
579
|
}] });
|
|
574
580
|
|
|
581
|
+
var _SkyLabelComponent__labelType;
|
|
582
|
+
const LABEL_TYPE_DEFAULT = 'info';
|
|
575
583
|
class SkyLabelComponent {
|
|
584
|
+
constructor() {
|
|
585
|
+
this.labelTypeOrDefault = LABEL_TYPE_DEFAULT;
|
|
586
|
+
_SkyLabelComponent__labelType.set(this, void 0);
|
|
587
|
+
}
|
|
576
588
|
/**
|
|
577
589
|
* The type of label to display.
|
|
578
590
|
* @required
|
|
579
591
|
*/
|
|
580
592
|
set labelType(value) {
|
|
581
|
-
this
|
|
593
|
+
__classPrivateFieldSet(this, _SkyLabelComponent__labelType, value, "f");
|
|
594
|
+
if (__classPrivateFieldGet(this, _SkyLabelComponent__labelType, "f") === undefined) {
|
|
595
|
+
this.labelTypeOrDefault = LABEL_TYPE_DEFAULT;
|
|
596
|
+
}
|
|
597
|
+
else {
|
|
598
|
+
this.labelTypeOrDefault = __classPrivateFieldGet(this, _SkyLabelComponent__labelType, "f");
|
|
599
|
+
}
|
|
582
600
|
this.updateIcon();
|
|
583
601
|
}
|
|
584
602
|
get labelType() {
|
|
585
|
-
return this
|
|
603
|
+
return __classPrivateFieldGet(this, _SkyLabelComponent__labelType, "f");
|
|
586
604
|
}
|
|
587
605
|
updateIcon() {
|
|
588
|
-
const indicatorIcon = SkyIndicatorIconUtility.getIconsForType(this.
|
|
606
|
+
const indicatorIcon = SkyIndicatorIconUtility.getIconsForType(this.labelTypeOrDefault);
|
|
589
607
|
this.icon = indicatorIcon.defaultThemeIcon;
|
|
590
608
|
this.baseIcon = indicatorIcon.modernThemeBaseIcon;
|
|
591
609
|
this.topIcon = indicatorIcon.modernThemeTopIcon;
|
|
592
610
|
}
|
|
593
611
|
}
|
|
612
|
+
_SkyLabelComponent__labelType = new WeakMap();
|
|
594
613
|
SkyLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
595
|
-
SkyLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyLabelComponent, selector: "sky-label", inputs: { labelType: "labelType" }, ngImport: i0, template: "<span class=\"sky-label\" [ngClass]=\"'sky-label-' +
|
|
614
|
+
SkyLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyLabelComponent, selector: "sky-label", inputs: { labelType: "labelType" }, ngImport: i0, template: "<span class=\"sky-label\" [ngClass]=\"'sky-label-' + labelTypeOrDefault\">\n <span class=\"sky-label-icon-theme-default\">\n <sky-icon [icon]=\"icon\"></sky-icon>\n </span>\n <span class=\"sky-label-icon-theme-modern\">\n <sky-icon-stack size=\"xs\" [baseIcon]=\"baseIcon\" [topIcon]=\"topIcon\">\n </sky-icon-stack>\n </span>\n <span class=\"sky-label-text\">\n <ng-content></ng-content>\n </span>\n</span>\n", styles: [".sky-label{color:#212327;display:inline;border-radius:10rem;font-weight:400;line-height:2.2;margin:0 3px;padding:.3em .6em;white-space:nowrap}.sky-label-success{background-color:#b7da9b}.sky-label-info{background-color:#81d4f7}.sky-label-warning{background-color:#ffd597}.sky-label-danger{background-color:#f7a08f}.sky-label-text{display:inline-block;padding-left:5px}.sky-label-icon-theme-modern{display:none}:host-context(.sky-theme-modern) .sky-label{align-items:center;display:inline-flex;line-height:1}:host-context(.sky-theme-modern) .sky-label.sky-label-info{background-color:#c1e8fb}:host-context(.sky-theme-modern) .sky-label.sky-label-info,:host-context(.sky-theme-modern) .sky-label.sky-label-success{padding:4px 15px 4px 6px}:host-context(.sky-theme-modern) .sky-label.sky-label-warning,:host-context(.sky-theme-modern) .sky-label.sky-label-danger{padding:4px 15px 4px 9px}:host-context(.sky-theme-modern) .sky-label-icon-theme-default{display:none}:host-context(.sky-theme-modern) .sky-label-icon-theme-modern{display:block}:host-context(.sky-theme-modern) .sky-label-info .sky-label-icon-theme-modern{color:#00b4f1}:host-context(.sky-theme-modern) .sky-label-success .sky-label-icon-theme-modern{color:#72bf44}:host-context(.sky-theme-modern) .sky-label-warning .sky-label-icon-theme-modern{color:#fbb034}:host-context(.sky-theme-modern) .sky-label-danger .sky-label-icon-theme-modern{color:#ef4044}.sky-theme-modern .sky-label{align-items:center;display:inline-flex;line-height:1}.sky-theme-modern .sky-label.sky-label-info{background-color:#c1e8fb}.sky-theme-modern .sky-label.sky-label-info,.sky-theme-modern .sky-label.sky-label-success{padding:4px 15px 4px 6px}.sky-theme-modern .sky-label.sky-label-warning,.sky-theme-modern .sky-label.sky-label-danger{padding:4px 15px 4px 9px}.sky-theme-modern .sky-label-icon-theme-default{display:none}.sky-theme-modern .sky-label-icon-theme-modern{display:block}.sky-theme-modern .sky-label-info .sky-label-icon-theme-modern{color:#00b4f1}.sky-theme-modern .sky-label-success .sky-label-icon-theme-modern{color:#72bf44}.sky-theme-modern .sky-label-warning .sky-label-icon-theme-modern{color:#fbb034}.sky-theme-modern .sky-label-danger .sky-label-icon-theme-modern{color:#ef4044}\n"], components: [{ type: SkyIconComponent, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { type: SkyIconStackComponent, selector: "sky-icon-stack", inputs: ["size", "baseIcon", "topIcon"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
596
615
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLabelComponent, decorators: [{
|
|
597
616
|
type: Component,
|
|
598
|
-
args: [{ selector: 'sky-label', template: "<span class=\"sky-label\" [ngClass]=\"'sky-label-' +
|
|
617
|
+
args: [{ selector: 'sky-label', template: "<span class=\"sky-label\" [ngClass]=\"'sky-label-' + labelTypeOrDefault\">\n <span class=\"sky-label-icon-theme-default\">\n <sky-icon [icon]=\"icon\"></sky-icon>\n </span>\n <span class=\"sky-label-icon-theme-modern\">\n <sky-icon-stack size=\"xs\" [baseIcon]=\"baseIcon\" [topIcon]=\"topIcon\">\n </sky-icon-stack>\n </span>\n <span class=\"sky-label-text\">\n <ng-content></ng-content>\n </span>\n</span>\n", styles: [".sky-label{color:#212327;display:inline;border-radius:10rem;font-weight:400;line-height:2.2;margin:0 3px;padding:.3em .6em;white-space:nowrap}.sky-label-success{background-color:#b7da9b}.sky-label-info{background-color:#81d4f7}.sky-label-warning{background-color:#ffd597}.sky-label-danger{background-color:#f7a08f}.sky-label-text{display:inline-block;padding-left:5px}.sky-label-icon-theme-modern{display:none}:host-context(.sky-theme-modern) .sky-label{align-items:center;display:inline-flex;line-height:1}:host-context(.sky-theme-modern) .sky-label.sky-label-info{background-color:#c1e8fb}:host-context(.sky-theme-modern) .sky-label.sky-label-info,:host-context(.sky-theme-modern) .sky-label.sky-label-success{padding:4px 15px 4px 6px}:host-context(.sky-theme-modern) .sky-label.sky-label-warning,:host-context(.sky-theme-modern) .sky-label.sky-label-danger{padding:4px 15px 4px 9px}:host-context(.sky-theme-modern) .sky-label-icon-theme-default{display:none}:host-context(.sky-theme-modern) .sky-label-icon-theme-modern{display:block}:host-context(.sky-theme-modern) .sky-label-info .sky-label-icon-theme-modern{color:#00b4f1}:host-context(.sky-theme-modern) .sky-label-success .sky-label-icon-theme-modern{color:#72bf44}:host-context(.sky-theme-modern) .sky-label-warning .sky-label-icon-theme-modern{color:#fbb034}:host-context(.sky-theme-modern) .sky-label-danger .sky-label-icon-theme-modern{color:#ef4044}.sky-theme-modern .sky-label{align-items:center;display:inline-flex;line-height:1}.sky-theme-modern .sky-label.sky-label-info{background-color:#c1e8fb}.sky-theme-modern .sky-label.sky-label-info,.sky-theme-modern .sky-label.sky-label-success{padding:4px 15px 4px 6px}.sky-theme-modern .sky-label.sky-label-warning,.sky-theme-modern .sky-label.sky-label-danger{padding:4px 15px 4px 9px}.sky-theme-modern .sky-label-icon-theme-default{display:none}.sky-theme-modern .sky-label-icon-theme-modern{display:block}.sky-theme-modern .sky-label-info .sky-label-icon-theme-modern{color:#00b4f1}.sky-theme-modern .sky-label-success .sky-label-icon-theme-modern{color:#72bf44}.sky-theme-modern .sky-label-warning .sky-label-icon-theme-modern{color:#fbb034}.sky-theme-modern .sky-label-danger .sky-label-icon-theme-modern{color:#ef4044}\n"] }]
|
|
599
618
|
}], propDecorators: { labelType: [{
|
|
600
619
|
type: Input
|
|
601
620
|
}] } });
|