@skyux/indicators 6.14.0 → 6.15.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 +372 -549
- package/esm2020/lib/modules/alert/alert.component.mjs +15 -14
- package/esm2020/lib/modules/chevron/chevron.component.mjs +11 -12
- package/esm2020/lib/modules/expansion-indicator/expansion-indicator.component.mjs +8 -8
- package/esm2020/lib/modules/icon/icon-stack-item.mjs +1 -1
- package/esm2020/lib/modules/icon/icon-stack.component.mjs +4 -1
- package/esm2020/lib/modules/icon/icon.component.mjs +1 -1
- package/esm2020/lib/modules/label/label.component.mjs +15 -22
- package/esm2020/lib/modules/status-indicator/status-indicator.component.mjs +52 -44
- package/esm2020/testing/alert/alert-harness.mjs +2 -1
- package/esm2020/testing/alert-fixture.mjs +1 -1
- package/fesm2015/skyux-indicators-testing.mjs +1 -0
- package/fesm2015/skyux-indicators-testing.mjs.map +1 -1
- package/fesm2015/skyux-indicators.mjs +99 -97
- package/fesm2015/skyux-indicators.mjs.map +1 -1
- package/fesm2020/skyux-indicators-testing.mjs +1 -0
- package/fesm2020/skyux-indicators-testing.mjs.map +1 -1
- package/fesm2020/skyux-indicators.mjs +99 -97
- package/fesm2020/skyux-indicators.mjs.map +1 -1
- package/lib/modules/alert/alert.component.d.ts +6 -8
- package/lib/modules/chevron/chevron.component.d.ts +4 -5
- package/lib/modules/expansion-indicator/expansion-indicator.component.d.ts +2 -3
- package/lib/modules/icon/icon-stack-item.d.ts +3 -0
- package/lib/modules/icon/icon-stack.component.d.ts +3 -0
- package/lib/modules/icon/icon.component.d.ts +5 -4
- package/lib/modules/label/label.component.d.ts +4 -4
- package/lib/modules/status-indicator/status-indicator.component.d.ts +5 -10
- package/package.json +5 -5
- package/testing/alert/alert-harness.d.ts +1 -1
- package/testing/alert-fixture.d.ts +4 -4
|
@@ -35,6 +35,7 @@ export class SkyAlertHarness extends SkyComponentHarness {
|
|
|
35
35
|
if (await alert.hasClass('sky-alert-warning')) {
|
|
36
36
|
return 'warning';
|
|
37
37
|
}
|
|
38
|
+
return undefined;
|
|
38
39
|
}
|
|
39
40
|
/**
|
|
40
41
|
* Gets the current alert text.
|
|
@@ -68,4 +69,4 @@ export class SkyAlertHarness extends SkyComponentHarness {
|
|
|
68
69
|
}
|
|
69
70
|
_SkyAlertHarness_getAlert = new WeakMap(), _SkyAlertHarness_getContent = new WeakMap(), _SkyAlertHarness_getCloseButton = new WeakMap();
|
|
70
71
|
SkyAlertHarness.hostSelector = 'sky-alert';
|
|
71
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
72
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxlcnQtaGFybmVzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9pbmRpY2F0b3JzL3Rlc3Rpbmcvc3JjL2FsZXJ0L2FsZXJ0LWhhcm5lc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFDQSxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUsxRDs7R0FFRztBQUNILE1BQU0sT0FBTyxlQUFnQixTQUFRLG1CQUFtQjtJQUF4RDs7UUFHRSxvQ0FBWSxJQUFJLENBQUMsVUFBVSxDQUFDLFlBQVksQ0FBQyxFQUFDO1FBQzFDLHNDQUFjLElBQUksQ0FBQyxVQUFVLENBQUMsb0JBQW9CLENBQUMsRUFBQztRQUNwRCwwQ0FBa0IsSUFBSSxDQUFDLFVBQVUsQ0FBQyxrQkFBa0IsQ0FBQyxFQUFDO0lBdUV4RCxDQUFDO0lBckVDOzs7T0FHRztJQUNJLE1BQU0sQ0FBQyxJQUFJLENBQ2hCLE9BQStCO1FBRS9CLE9BQU8sZUFBZSxDQUFDLHFCQUFxQixDQUFDLE9BQU8sQ0FBQyxD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b3BlcnR5KCdoaWRkZW4nKTtcbiAgfVxuXG4gIC8qKlxuICAgKiBJbmRpY2F0ZXMgd2hldGhlciB0aGUgdXNlciBjYW4gY2xvc2UgdGhlIGFsZXJ0LlxuICAgKi9cbiAgcHVibGljIGFzeW5jIGlzQ2xvc2VhYmxlKCk6IFByb21pc2U8Ym9vbGVhbj4ge1xuICAgIGNvbnN0IGNsb3NlQnRuID0gYXdhaXQgdGhpcy4jZ2V0Q2xvc2VCdXR0b24oKTtcbiAgICByZXR1cm4gIShhd2FpdCBjbG9zZUJ0bi5nZXRQcm9wZXJ0eSgnaGlkZGVuJykpO1xuICB9XG59XG4iXX0=
|
|
@@ -65,4 +65,4 @@ export class SkyAlertFixture {
|
|
|
65
65
|
return this.debugEl.query(By.css('.sky-alert-close'));
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
68
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxlcnQtZml4dHVyZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9pbmRpY2F0b3JzL3Rlc3Rpbmcvc3JjL2FsZXJ0LWZpeHR1cmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBQy9DLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBRXZEOzs7R0FHRztBQUNILE1BQU0sT0FBTyxlQUFlO0lBbUQxQixZQUFZLE9BQWtDLEVBQUUsU0FBaUI7UUFDL0QsSUFBSSxDQUFDLE9BQU8sR0FBRyxpQkFBaUIsQ0FBQyx1QkFBdUIsQ0FDdEQsT0FBTyxFQUNQLFNBQVMsRUFDVCxXQUFXLENBQ1osQ0FBQztJQ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RlIGdldEFsZXJ0RWwoKTogRGVidWdFbGVtZW50IHtcbiAgICByZXR1cm4gdGhpcy5kZWJ1Z0VsLnF1ZXJ5KEJ5LmNzcygnLnNreS1hbGVydCcpKTtcbiAgfVxuXG4gIHByaXZhdGUgZ2V0Q2xvc2VCdG5FbCgpOiBEZWJ1Z0VsZW1lbnQge1xuICAgIHJldHVybiB0aGlzLmRlYnVnRWwucXVlcnkoQnkuY3NzKCcuc2t5LWFsZXJ0LWNsb3NlJykpO1xuICB9XG59XG4iXX0=
|
|
@@ -1 +1 @@
|
|
|
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,I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BAAA,EAAA,GAAA,CAAA,CAAA,IAAA,CAAd,IAAI,CAAY,CAAC;AAErC,YAAA,OAAO,MAAM,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;SAC1C,CAAA,CAAA;AAAA,KAAA;AAED;;AAEG;IACU,WAAW,GAAA;;AACtB,YAAA,MAAM,QAAQ,GAAG,MAAM,sBAAA,CAAA,IAAI,EAAgB,+BAAA,EAAA,GAAA,CAAA,CAAA,IAAA,CAApB,IAAI,CAAkB,CAAC;YAC9C,OAAO,EAAE,MAAM,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;SAChD,CAAA,CAAA;AAAA,KAAA;;;AAxEa,eAAY,CAAA,YAAA,GAAG,WAAW;;ACV1C;;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 | undefined {\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 | undefined {\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 | undefined {\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<unknown>, 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 | undefined> {\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 return undefined;\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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AAA,GAAA,CAAA,CAAA,IAAA,CAApB,IAAI,CAAkB,EAAE,KAAK,EAAE,CAAC;SACxC,CAAA,CAAA;AAAA,KAAA;AAED;;AAEG;IACU,QAAQ,GAAA;;AACnB,YAAA,MAAM,KAAK,GAAG,MAAM,sBAAA,CAAA,IAAI,EAAU,yBAAA,EAAA,GAAA,CAAA,CAAA,IAAA,CAAd,IAAI,CAAY,CAAC;AAErC,YAAA,OAAO,MAAM,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;SAC1C,CAAA,CAAA;AAAA,KAAA;AAED;;AAEG;IACU,WAAW,GAAA;;AACtB,YAAA,MAAM,QAAQ,GAAG,MAAM,sBAAA,CAAA,IAAI,EAAgB,+BAAA,EAAA,GAAA,CAAA,CAAA,IAAA,CAApB,IAAI,CAAkB,CAAC;YAC9C,OAAO,EAAE,MAAM,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;SAChD,CAAA,CAAA;AAAA,KAAA;;;AA1Ea,eAAY,CAAA,YAAA,GAAG,WAAW;;ACV1C;;AAEG;;;;"}
|
|
@@ -6,9 +6,9 @@ import * as i1$1 from '@skyux/i18n';
|
|
|
6
6
|
import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
|
|
7
7
|
import * as i3 from '@skyux/theme';
|
|
8
8
|
import { SkyThemeIconManifestModule, SkyThemeModule } from '@skyux/theme';
|
|
9
|
+
import { __classPrivateFieldGet, __classPrivateFieldSet } from 'tslib';
|
|
9
10
|
import * as i2 from '@skyux/core';
|
|
10
11
|
import { SkyTrimModule, MutationObserverService } from '@skyux/core';
|
|
11
|
-
import { __classPrivateFieldSet, __classPrivateFieldGet } from 'tslib';
|
|
12
12
|
import { trigger, transition, style, animate } from '@angular/animations';
|
|
13
13
|
import { Subject, BehaviorSubject, defer } from 'rxjs';
|
|
14
14
|
import { takeUntil, finalize } from 'rxjs/operators';
|
|
@@ -85,6 +85,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
85
85
|
}]
|
|
86
86
|
}], ctorParameters: function () { return [{ type: SkyIconResolverService }]; } });
|
|
87
87
|
|
|
88
|
+
/**
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
88
91
|
class SkyIconStackComponent {
|
|
89
92
|
}
|
|
90
93
|
SkyIconStackComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyIconStackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -240,9 +243,11 @@ class SkyIndicatorIconUtility {
|
|
|
240
243
|
}
|
|
241
244
|
}
|
|
242
245
|
|
|
246
|
+
var _SkyAlertComponent_instances, _SkyAlertComponent_updateAlertIcon;
|
|
243
247
|
const ALERT_TYPE_DEFAULT = 'warning';
|
|
244
248
|
class SkyAlertComponent {
|
|
245
249
|
constructor() {
|
|
250
|
+
_SkyAlertComponent_instances.add(this);
|
|
246
251
|
/**
|
|
247
252
|
* Fires when users close the alert.
|
|
248
253
|
*/
|
|
@@ -256,27 +261,25 @@ class SkyAlertComponent {
|
|
|
256
261
|
* @default "warning"
|
|
257
262
|
*/
|
|
258
263
|
set alertType(value) {
|
|
259
|
-
this.
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
get alertType() {
|
|
265
|
-
return this._alertType;
|
|
264
|
+
if (value !== this.alertTypeOrDefault) {
|
|
265
|
+
this.alertTypeOrDefault =
|
|
266
|
+
value || ALERT_TYPE_DEFAULT;
|
|
267
|
+
__classPrivateFieldGet(this, _SkyAlertComponent_instances, "m", _SkyAlertComponent_updateAlertIcon).call(this);
|
|
268
|
+
}
|
|
266
269
|
}
|
|
267
270
|
ngOnInit() {
|
|
268
|
-
this.
|
|
271
|
+
__classPrivateFieldGet(this, _SkyAlertComponent_instances, "m", _SkyAlertComponent_updateAlertIcon).call(this);
|
|
269
272
|
}
|
|
270
273
|
close() {
|
|
271
274
|
this.closed = true;
|
|
272
275
|
this.closedChange.emit(true);
|
|
273
276
|
}
|
|
274
|
-
updateAlertIcon() {
|
|
275
|
-
const indicatorIcon = SkyIndicatorIconUtility.getIconsForType(this.alertTypeOrDefault);
|
|
276
|
-
this.alertBaseIcon = indicatorIcon.modernThemeBaseIcon;
|
|
277
|
-
this.alertTopIcon = indicatorIcon.modernThemeTopIcon;
|
|
278
|
-
}
|
|
279
277
|
}
|
|
278
|
+
_SkyAlertComponent_instances = new WeakSet(), _SkyAlertComponent_updateAlertIcon = function _SkyAlertComponent_updateAlertIcon() {
|
|
279
|
+
const indicatorIcon = SkyIndicatorIconUtility.getIconsForType(this.alertTypeOrDefault);
|
|
280
|
+
this.alertBaseIcon = indicatorIcon.modernThemeBaseIcon;
|
|
281
|
+
this.alertTopIcon = indicatorIcon.modernThemeTopIcon;
|
|
282
|
+
};
|
|
280
283
|
SkyAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
281
284
|
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 } });
|
|
282
285
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyAlertComponent, decorators: [{
|
|
@@ -327,24 +330,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
327
330
|
* @internal
|
|
328
331
|
*/
|
|
329
332
|
class SkyExpansionIndicatorComponent {
|
|
333
|
+
constructor() {
|
|
334
|
+
this.directionOrDefault = 'up';
|
|
335
|
+
}
|
|
330
336
|
/**
|
|
331
337
|
* Specifies whether the chevron points up or down.
|
|
332
338
|
*/
|
|
333
339
|
set direction(value) {
|
|
334
340
|
/* istanbul ignore else */
|
|
335
|
-
if (value != this.
|
|
336
|
-
this.
|
|
341
|
+
if (value != this.directionOrDefault) {
|
|
342
|
+
this.directionOrDefault = value ? value : 'up';
|
|
337
343
|
}
|
|
338
344
|
}
|
|
339
|
-
get direction() {
|
|
340
|
-
return this._direction || 'up';
|
|
341
|
-
}
|
|
342
345
|
}
|
|
343
346
|
SkyExpansionIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyExpansionIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
344
|
-
SkyExpansionIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyExpansionIndicatorComponent, selector: "sky-expansion-indicator", inputs: { direction: "direction" }, ngImport: i0, template: "<div\n aria-hidden=\"true\"\n class=\"sky-expansion-indicator\"\n [ngClass]=\"['sky-expansion-indicator-' +
|
|
347
|
+
SkyExpansionIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyExpansionIndicatorComponent, selector: "sky-expansion-indicator", inputs: { direction: "direction" }, ngImport: i0, template: "<div\n aria-hidden=\"true\"\n class=\"sky-expansion-indicator\"\n [ngClass]=\"['sky-expansion-indicator-' + directionOrDefault]\"\n>\n <ng-container *skyThemeIf=\"'default'\">\n <ng-container *ngTemplateOutlet=\"icon\"></ng-container>\n </ng-container>\n <ng-container *skyThemeIf=\"'modern'\">\n <span class=\"sky-expansion-indicator-glyph-container\">\n <ng-container *ngTemplateOutlet=\"icon\"></ng-container>\n </span>\n </ng-container>\n</div>\n\n<ng-template #icon>\n <i class=\"sky-expansion-indicator-part sky-expansion-indicator-left\"> </i>\n <i class=\"sky-expansion-indicator-part sky-expansion-indicator-right\"> </i>\n</ng-template>\n", styles: [".sky-expansion-indicator{display:inline-block;border:none;background-color:transparent;flex-shrink:0;height:24px;margin:0;overflow:hidden;width:24px;position:relative;vertical-align:top}.sky-expansion-indicator-part{border-color:#cdcfd2;border-style:solid;border-width:3px 0 0 0;display:inline-block;height:10px;position:absolute;top:10px;transition:transform .25s,left .25s;vertical-align:top;width:10px}.sky-expansion-indicator-up .sky-expansion-indicator-left{left:7px;transform:rotate(-45deg)}.sky-expansion-indicator-up .sky-expansion-indicator-right{left:7px;transform:rotate(45deg)}.sky-expansion-indicator-down .sky-expansion-indicator-left{left:2px;transform:rotate(45deg)}.sky-expansion-indicator-down .sky-expansion-indicator-right{left:12px;transform:rotate(-45deg)}:host-context(.sky-theme-modern) .sky-expansion-indicator{height:26px;width:26px}:host-context(.sky-theme-modern) .sky-expansion-indicator-part{background:#686c73;border:none;height:2px;width:11px;top:13px}:host-context(.sky-theme-modern) .sky-expansion-indicator-glyph-container{transform:scale(.68);display:inline-block;position:absolute;top:3.5px;left:4px}:host-context(.sky-theme-modern) .sky-expansion-indicator-left{border-radius:1px 0 0 1px}:host-context(.sky-theme-modern) .sky-expansion-indicator-right{border-radius:0 1px 1px 0}:host-context(.sky-theme-modern) .sky-expansion-indicator-left{left:4px}:host-context(.sky-theme-modern) .sky-expansion-indicator-right{left:10.5px}.sky-theme-modern .sky-expansion-indicator{height:26px;width:26px}.sky-theme-modern .sky-expansion-indicator-part{background:#686c73;border:none;height:2px;width:11px;top:13px}.sky-theme-modern .sky-expansion-indicator-glyph-container{transform:scale(.68);display:inline-block;position:absolute;top:3.5px;left:4px}.sky-theme-modern .sky-expansion-indicator-left{border-radius:1px 0 0 1px}.sky-theme-modern .sky-expansion-indicator-right{border-radius:0 1px 1px 0}.sky-theme-modern .sky-expansion-indicator-left{left:4px}.sky-theme-modern .sky-expansion-indicator-right{left:10.5px}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
345
348
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyExpansionIndicatorComponent, decorators: [{
|
|
346
349
|
type: Component,
|
|
347
|
-
args: [{ selector: 'sky-expansion-indicator', template: "<div\n aria-hidden=\"true\"\n class=\"sky-expansion-indicator\"\n [ngClass]=\"['sky-expansion-indicator-' +
|
|
350
|
+
args: [{ selector: 'sky-expansion-indicator', template: "<div\n aria-hidden=\"true\"\n class=\"sky-expansion-indicator\"\n [ngClass]=\"['sky-expansion-indicator-' + directionOrDefault]\"\n>\n <ng-container *skyThemeIf=\"'default'\">\n <ng-container *ngTemplateOutlet=\"icon\"></ng-container>\n </ng-container>\n <ng-container *skyThemeIf=\"'modern'\">\n <span class=\"sky-expansion-indicator-glyph-container\">\n <ng-container *ngTemplateOutlet=\"icon\"></ng-container>\n </span>\n </ng-container>\n</div>\n\n<ng-template #icon>\n <i class=\"sky-expansion-indicator-part sky-expansion-indicator-left\"> </i>\n <i class=\"sky-expansion-indicator-part sky-expansion-indicator-right\"> </i>\n</ng-template>\n", styles: [".sky-expansion-indicator{display:inline-block;border:none;background-color:transparent;flex-shrink:0;height:24px;margin:0;overflow:hidden;width:24px;position:relative;vertical-align:top}.sky-expansion-indicator-part{border-color:#cdcfd2;border-style:solid;border-width:3px 0 0 0;display:inline-block;height:10px;position:absolute;top:10px;transition:transform .25s,left .25s;vertical-align:top;width:10px}.sky-expansion-indicator-up .sky-expansion-indicator-left{left:7px;transform:rotate(-45deg)}.sky-expansion-indicator-up .sky-expansion-indicator-right{left:7px;transform:rotate(45deg)}.sky-expansion-indicator-down .sky-expansion-indicator-left{left:2px;transform:rotate(45deg)}.sky-expansion-indicator-down .sky-expansion-indicator-right{left:12px;transform:rotate(-45deg)}:host-context(.sky-theme-modern) .sky-expansion-indicator{height:26px;width:26px}:host-context(.sky-theme-modern) .sky-expansion-indicator-part{background:#686c73;border:none;height:2px;width:11px;top:13px}:host-context(.sky-theme-modern) .sky-expansion-indicator-glyph-container{transform:scale(.68);display:inline-block;position:absolute;top:3.5px;left:4px}:host-context(.sky-theme-modern) .sky-expansion-indicator-left{border-radius:1px 0 0 1px}:host-context(.sky-theme-modern) .sky-expansion-indicator-right{border-radius:0 1px 1px 0}:host-context(.sky-theme-modern) .sky-expansion-indicator-left{left:4px}:host-context(.sky-theme-modern) .sky-expansion-indicator-right{left:10.5px}.sky-theme-modern .sky-expansion-indicator{height:26px;width:26px}.sky-theme-modern .sky-expansion-indicator-part{background:#686c73;border:none;height:2px;width:11px;top:13px}.sky-theme-modern .sky-expansion-indicator-glyph-container{transform:scale(.68);display:inline-block;position:absolute;top:3.5px;left:4px}.sky-theme-modern .sky-expansion-indicator-left{border-radius:1px 0 0 1px}.sky-theme-modern .sky-expansion-indicator-right{border-radius:0 1px 1px 0}.sky-theme-modern .sky-expansion-indicator-left{left:4px}.sky-theme-modern .sky-expansion-indicator-right{left:10.5px}\n"] }]
|
|
348
351
|
}], propDecorators: { direction: [{
|
|
349
352
|
type: Input
|
|
350
353
|
}] } });
|
|
@@ -377,37 +380,36 @@ class SkyChevronComponent {
|
|
|
377
380
|
* Fires when the direction of the chevron changes.
|
|
378
381
|
*/
|
|
379
382
|
this.directionChange = new EventEmitter();
|
|
383
|
+
this.ariaExpanded = true;
|
|
384
|
+
this.directionOrDefault = 'up';
|
|
380
385
|
}
|
|
381
386
|
/**
|
|
382
387
|
* Specifies whether the chevron points up or down.
|
|
383
388
|
*/
|
|
384
389
|
set direction(value) {
|
|
385
390
|
/* istanbul ignore else */
|
|
386
|
-
if (value != this.
|
|
387
|
-
this.
|
|
391
|
+
if (value != this.directionOrDefault) {
|
|
392
|
+
this.directionOrDefault = value ? value : 'up';
|
|
388
393
|
/* istanbul ignore else */
|
|
389
|
-
if (
|
|
394
|
+
if (this.directionOrDefault === 'up') {
|
|
390
395
|
this.ariaExpanded = true;
|
|
391
396
|
}
|
|
392
|
-
else if (this.
|
|
397
|
+
else if (this.directionOrDefault === 'down') {
|
|
393
398
|
this.ariaExpanded = false;
|
|
394
399
|
}
|
|
395
400
|
}
|
|
396
401
|
}
|
|
397
|
-
get direction() {
|
|
398
|
-
return this._direction || 'up';
|
|
399
|
-
}
|
|
400
402
|
chevronClick(event) {
|
|
401
403
|
event.stopPropagation();
|
|
402
|
-
this.direction = this.
|
|
403
|
-
this.directionChange.emit(this.
|
|
404
|
+
this.direction = this.directionOrDefault === 'up' ? 'down' : 'up';
|
|
405
|
+
this.directionChange.emit(this.directionOrDefault);
|
|
404
406
|
}
|
|
405
407
|
}
|
|
406
408
|
SkyChevronComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyChevronComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
407
|
-
SkyChevronComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyChevronComponent, selector: "sky-chevron", inputs: { ariaControls: "ariaControls", ariaLabel: "ariaLabel", direction: "direction", disabled: "disabled" }, outputs: { directionChange: "directionChange" }, ngImport: i0, template: "<button\n class=\"sky-chevron\"\n type=\"button\"\n [attr.aria-controls]=\"ariaControls\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.aria-label]=\"ariaLabel\"\n [disabled]=\"disabled\"\n [ngClass]=\"['sky-chevron-' +
|
|
409
|
+
SkyChevronComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyChevronComponent, selector: "sky-chevron", inputs: { ariaControls: "ariaControls", ariaLabel: "ariaLabel", direction: "direction", disabled: "disabled" }, outputs: { directionChange: "directionChange" }, ngImport: i0, template: "<button\n class=\"sky-chevron\"\n type=\"button\"\n [attr.aria-controls]=\"ariaControls\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.aria-label]=\"ariaLabel\"\n [disabled]=\"disabled\"\n [ngClass]=\"['sky-chevron-' + directionOrDefault]\"\n [skyThemeClass]=\"{\n 'sky-btn sky-btn-icon-borderless': 'modern'\n }\"\n (click)=\"chevronClick($event)\"\n>\n <sky-expansion-indicator\n [direction]=\"directionOrDefault\"\n ></sky-expansion-indicator>\n</button>\n", styles: ["button{background:lightblue}.sky-chevron{border:none;background-color:transparent;flex-shrink:0;height:24px;margin:0;padding:0;overflow:hidden;width:24px;cursor:pointer;position:relative;vertical-align:top}.sky-chevron:hover .sky-chevron-part{border-color:#979ba2}\n"], components: [{ type: SkyExpansionIndicatorComponent, selector: "sky-expansion-indicator", inputs: ["direction"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }] });
|
|
408
410
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyChevronComponent, decorators: [{
|
|
409
411
|
type: Component,
|
|
410
|
-
args: [{ selector: 'sky-chevron', template: "<button\n class=\"sky-chevron\"\n type=\"button\"\n [attr.aria-controls]=\"ariaControls\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.aria-label]=\"ariaLabel\"\n [disabled]=\"disabled\"\n [ngClass]=\"['sky-chevron-' +
|
|
412
|
+
args: [{ selector: 'sky-chevron', template: "<button\n class=\"sky-chevron\"\n type=\"button\"\n [attr.aria-controls]=\"ariaControls\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.aria-label]=\"ariaLabel\"\n [disabled]=\"disabled\"\n [ngClass]=\"['sky-chevron-' + directionOrDefault]\"\n [skyThemeClass]=\"{\n 'sky-btn sky-btn-icon-borderless': 'modern'\n }\"\n (click)=\"chevronClick($event)\"\n>\n <sky-expansion-indicator\n [direction]=\"directionOrDefault\"\n ></sky-expansion-indicator>\n</button>\n", styles: ["button{background:lightblue}.sky-chevron{border:none;background-color:transparent;flex-shrink:0;height:24px;margin:0;padding:0;overflow:hidden;width:24px;cursor:pointer;position:relative;vertical-align:top}.sky-chevron:hover .sky-chevron-part{border-color:#979ba2}\n"] }]
|
|
411
413
|
}], propDecorators: { ariaControls: [{
|
|
412
414
|
type: Input
|
|
413
415
|
}], ariaLabel: [{
|
|
@@ -578,38 +580,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
578
580
|
}]
|
|
579
581
|
}] });
|
|
580
582
|
|
|
581
|
-
var
|
|
583
|
+
var _SkyLabelComponent_instances, _SkyLabelComponent_updateIcon;
|
|
582
584
|
const LABEL_TYPE_DEFAULT = 'info';
|
|
583
585
|
class SkyLabelComponent {
|
|
584
586
|
constructor() {
|
|
587
|
+
_SkyLabelComponent_instances.add(this);
|
|
585
588
|
this.labelTypeOrDefault = LABEL_TYPE_DEFAULT;
|
|
586
|
-
_SkyLabelComponent__labelType.set(this, void 0);
|
|
587
589
|
}
|
|
588
590
|
/**
|
|
589
591
|
* The type of label to display.
|
|
590
|
-
* @
|
|
592
|
+
* @default 'info'
|
|
591
593
|
*/
|
|
592
594
|
set labelType(value) {
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
this.labelTypeOrDefault = LABEL_TYPE_DEFAULT;
|
|
596
|
-
}
|
|
597
|
-
else {
|
|
598
|
-
this.labelTypeOrDefault = __classPrivateFieldGet(this, _SkyLabelComponent__labelType, "f");
|
|
599
|
-
}
|
|
600
|
-
this.updateIcon();
|
|
595
|
+
this.labelTypeOrDefault = value === undefined ? LABEL_TYPE_DEFAULT : value;
|
|
596
|
+
__classPrivateFieldGet(this, _SkyLabelComponent_instances, "m", _SkyLabelComponent_updateIcon).call(this);
|
|
601
597
|
}
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
}
|
|
605
|
-
updateIcon() {
|
|
606
|
-
const indicatorIcon = SkyIndicatorIconUtility.getIconsForType(this.labelTypeOrDefault);
|
|
607
|
-
this.icon = indicatorIcon.defaultThemeIcon;
|
|
608
|
-
this.baseIcon = indicatorIcon.modernThemeBaseIcon;
|
|
609
|
-
this.topIcon = indicatorIcon.modernThemeTopIcon;
|
|
598
|
+
ngOnInit() {
|
|
599
|
+
__classPrivateFieldGet(this, _SkyLabelComponent_instances, "m", _SkyLabelComponent_updateIcon).call(this);
|
|
610
600
|
}
|
|
611
601
|
}
|
|
612
|
-
|
|
602
|
+
_SkyLabelComponent_instances = new WeakSet(), _SkyLabelComponent_updateIcon = function _SkyLabelComponent_updateIcon() {
|
|
603
|
+
const indicatorIcon = SkyIndicatorIconUtility.getIconsForType(this.labelTypeOrDefault);
|
|
604
|
+
this.icon = indicatorIcon.defaultThemeIcon;
|
|
605
|
+
this.baseIcon = indicatorIcon.modernThemeBaseIcon;
|
|
606
|
+
this.topIcon = indicatorIcon.modernThemeTopIcon;
|
|
607
|
+
};
|
|
613
608
|
SkyLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
614
609
|
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"] }] });
|
|
615
610
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLabelComponent, decorators: [{
|
|
@@ -633,6 +628,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
633
628
|
}]
|
|
634
629
|
}] });
|
|
635
630
|
|
|
631
|
+
var _SkyStatusIndicatorComponent_instances, _SkyStatusIndicatorComponent_changeDetector, _SkyStatusIndicatorComponent_resources, _SkyStatusIndicatorComponent__descriptionType, _SkyStatusIndicatorComponent__customDescription, _SkyStatusIndicatorComponent_updateIcon, _SkyStatusIndicatorComponent_updateDescriptionComputed;
|
|
636
632
|
const INDICATOR_TYPE_DEFAULT = 'warning';
|
|
637
633
|
/**
|
|
638
634
|
* Displays status text with an icon matching the specified indicator type.
|
|
@@ -642,19 +638,23 @@ const INDICATOR_TYPE_DEFAULT = 'warning';
|
|
|
642
638
|
*/
|
|
643
639
|
class SkyStatusIndicatorComponent {
|
|
644
640
|
constructor(changeDetector, resources) {
|
|
645
|
-
this
|
|
646
|
-
this.
|
|
641
|
+
_SkyStatusIndicatorComponent_instances.add(this);
|
|
642
|
+
this.indicatorTypeOrDefault = INDICATOR_TYPE_DEFAULT;
|
|
643
|
+
_SkyStatusIndicatorComponent_changeDetector.set(this, void 0);
|
|
644
|
+
_SkyStatusIndicatorComponent_resources.set(this, void 0);
|
|
645
|
+
_SkyStatusIndicatorComponent__descriptionType.set(this, void 0);
|
|
646
|
+
_SkyStatusIndicatorComponent__customDescription.set(this, void 0);
|
|
647
|
+
__classPrivateFieldSet(this, _SkyStatusIndicatorComponent_changeDetector, changeDetector, "f");
|
|
648
|
+
__classPrivateFieldSet(this, _SkyStatusIndicatorComponent_resources, resources, "f");
|
|
647
649
|
}
|
|
648
650
|
/**
|
|
649
651
|
* Specifies a style for the status indicator to determine the icon.
|
|
650
652
|
* @default "warning"
|
|
651
653
|
*/
|
|
652
654
|
set indicatorType(value) {
|
|
653
|
-
this.
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
get indicatorType() {
|
|
657
|
-
return this._indicatorType || INDICATOR_TYPE_DEFAULT;
|
|
655
|
+
this.indicatorTypeOrDefault =
|
|
656
|
+
value === undefined ? INDICATOR_TYPE_DEFAULT : value;
|
|
657
|
+
__classPrivateFieldGet(this, _SkyStatusIndicatorComponent_instances, "m", _SkyStatusIndicatorComponent_updateIcon).call(this);
|
|
658
658
|
}
|
|
659
659
|
/**
|
|
660
660
|
* Specifies the predefined text to be read by screen readers for users
|
|
@@ -662,59 +662,61 @@ class SkyStatusIndicatorComponent {
|
|
|
662
662
|
* @required
|
|
663
663
|
*/
|
|
664
664
|
set descriptionType(value) {
|
|
665
|
-
this
|
|
666
|
-
this.
|
|
665
|
+
__classPrivateFieldSet(this, _SkyStatusIndicatorComponent__descriptionType, value, "f");
|
|
666
|
+
__classPrivateFieldGet(this, _SkyStatusIndicatorComponent_instances, "m", _SkyStatusIndicatorComponent_updateDescriptionComputed).call(this);
|
|
667
667
|
}
|
|
668
668
|
get descriptionType() {
|
|
669
|
-
return this
|
|
669
|
+
return __classPrivateFieldGet(this, _SkyStatusIndicatorComponent__descriptionType, "f");
|
|
670
670
|
}
|
|
671
671
|
/**
|
|
672
672
|
* Specifies the text to be read by screen readers for users who cannot see
|
|
673
673
|
* the indicator icon when `descriptionType` is `custom`.
|
|
674
674
|
*/
|
|
675
675
|
set customDescription(value) {
|
|
676
|
-
this
|
|
677
|
-
this.
|
|
676
|
+
__classPrivateFieldSet(this, _SkyStatusIndicatorComponent__customDescription, value, "f");
|
|
677
|
+
__classPrivateFieldGet(this, _SkyStatusIndicatorComponent_instances, "m", _SkyStatusIndicatorComponent_updateDescriptionComputed).call(this);
|
|
678
678
|
}
|
|
679
679
|
get customDescription() {
|
|
680
|
-
return this
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
this.icon = indicatorIcon.defaultThemeIcon;
|
|
685
|
-
this.baseIcon = indicatorIcon.modernThemeBaseIcon;
|
|
686
|
-
this.topIcon = indicatorIcon.modernThemeTopIcon;
|
|
687
|
-
}
|
|
688
|
-
updateDescriptionComputed() {
|
|
689
|
-
if (this.descriptionType) {
|
|
690
|
-
switch (this.descriptionType) {
|
|
691
|
-
case 'none':
|
|
692
|
-
this.descriptionComputed = '';
|
|
693
|
-
break;
|
|
694
|
-
case 'custom':
|
|
695
|
-
this.descriptionComputed = this.customDescription;
|
|
696
|
-
break;
|
|
697
|
-
default:
|
|
698
|
-
this.resources
|
|
699
|
-
.getString('skyux_status_indicator_sr_' +
|
|
700
|
-
this.descriptionType.replace(/-/g, '_'))
|
|
701
|
-
.subscribe((value) => {
|
|
702
|
-
this.descriptionComputed = value;
|
|
703
|
-
this.changeDetector.markForCheck();
|
|
704
|
-
});
|
|
705
|
-
break;
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
else {
|
|
709
|
-
this.descriptionComputed = undefined;
|
|
710
|
-
}
|
|
680
|
+
return __classPrivateFieldGet(this, _SkyStatusIndicatorComponent__customDescription, "f");
|
|
681
|
+
}
|
|
682
|
+
ngOnInit() {
|
|
683
|
+
__classPrivateFieldGet(this, _SkyStatusIndicatorComponent_instances, "m", _SkyStatusIndicatorComponent_updateIcon).call(this);
|
|
711
684
|
}
|
|
712
685
|
}
|
|
686
|
+
_SkyStatusIndicatorComponent_changeDetector = new WeakMap(), _SkyStatusIndicatorComponent_resources = new WeakMap(), _SkyStatusIndicatorComponent__descriptionType = new WeakMap(), _SkyStatusIndicatorComponent__customDescription = new WeakMap(), _SkyStatusIndicatorComponent_instances = new WeakSet(), _SkyStatusIndicatorComponent_updateIcon = function _SkyStatusIndicatorComponent_updateIcon() {
|
|
687
|
+
const indicatorIcon = SkyIndicatorIconUtility.getIconsForType(this.indicatorTypeOrDefault);
|
|
688
|
+
this.icon = indicatorIcon.defaultThemeIcon;
|
|
689
|
+
this.baseIcon = indicatorIcon.modernThemeBaseIcon;
|
|
690
|
+
this.topIcon = indicatorIcon.modernThemeTopIcon;
|
|
691
|
+
}, _SkyStatusIndicatorComponent_updateDescriptionComputed = function _SkyStatusIndicatorComponent_updateDescriptionComputed() {
|
|
692
|
+
if (this.descriptionType) {
|
|
693
|
+
switch (this.descriptionType) {
|
|
694
|
+
case 'none':
|
|
695
|
+
this.descriptionComputed = '';
|
|
696
|
+
break;
|
|
697
|
+
case 'custom':
|
|
698
|
+
this.descriptionComputed = this.customDescription;
|
|
699
|
+
break;
|
|
700
|
+
default:
|
|
701
|
+
__classPrivateFieldGet(this, _SkyStatusIndicatorComponent_resources, "f")
|
|
702
|
+
.getString('skyux_status_indicator_sr_' +
|
|
703
|
+
this.descriptionType.replace(/-/g, '_'))
|
|
704
|
+
.subscribe((value) => {
|
|
705
|
+
this.descriptionComputed = value;
|
|
706
|
+
__classPrivateFieldGet(this, _SkyStatusIndicatorComponent_changeDetector, "f").markForCheck();
|
|
707
|
+
});
|
|
708
|
+
break;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
else {
|
|
712
|
+
this.descriptionComputed = undefined;
|
|
713
|
+
}
|
|
714
|
+
};
|
|
713
715
|
SkyStatusIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyStatusIndicatorComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.SkyLibResourcesService }], target: i0.ɵɵFactoryTarget.Component });
|
|
714
|
-
SkyStatusIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyStatusIndicatorComponent, selector: "sky-status-indicator", inputs: { indicatorType: "indicatorType", descriptionType: "descriptionType", customDescription: "customDescription" }, ngImport: i0, template: "<div *ngIf=\"descriptionType\" class=\"sky-status-indicator\">\n <div\n aria-hidden=\"true\"\n class=\"sky-margin-inline-xs sky-status-indicator-icon\"\n [ngClass]=\"'sky-status-indicator-icon-' +
|
|
716
|
+
SkyStatusIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyStatusIndicatorComponent, selector: "sky-status-indicator", inputs: { indicatorType: "indicatorType", descriptionType: "descriptionType", customDescription: "customDescription" }, ngImport: i0, template: "<div *ngIf=\"descriptionType\" class=\"sky-status-indicator\">\n <div\n aria-hidden=\"true\"\n class=\"sky-margin-inline-xs sky-status-indicator-icon\"\n [ngClass]=\"'sky-status-indicator-icon-' + indicatorTypeOrDefault\"\n >\n <span class=\"sky-status-indicator-icon-default\">\n <sky-icon [icon]=\"icon\"></sky-icon>\n </span>\n <span class=\"sky-status-indicator-icon-modern\">\n <sky-icon-stack size=\"xs\" [baseIcon]=\"baseIcon\" [topIcon]=\"topIcon\">\n </sky-icon-stack>\n </span>\n </div>\n <div class=\"sky-status-indicator-message-wrapper\">\n <span *ngIf=\"descriptionComputed\" class=\"sky-screen-reader-only\">\n {{ descriptionComputed }}\n </span>\n <span class=\"sky-status-indicator-message\" skyTrim\n ><ng-content></ng-content></span\n ><span class=\"sky-status-indicator-help\"\n ><ng-content select=\".sky-control-help\"></ng-content\n ></span>\n </div>\n</div>\n", styles: [".sky-status-indicator{align-items:baseline;display:flex}.sky-status-indicator-icon{flex-shrink:1}.sky-status-indicator-icon-modern{display:none}.sky-status-indicator-icon-info{color:#00b4f1}.sky-status-indicator-icon-success{color:#72bf44}.sky-status-indicator-icon-warning{color:#fbb034}.sky-status-indicator-icon-danger{color:#ef4044}.sky-status-indicator-help:not(:empty){margin-left:var(--sky-margin-inline-sm)}:host-context(.sky-theme-modern) .sky-status-indicator-icon-default{display:none}:host-context(.sky-theme-modern) .sky-status-indicator-icon-modern{display:inline}.sky-theme-modern .sky-status-indicator-icon-default{display:none}.sky-theme-modern .sky-status-indicator-icon-modern{display:inline}\n"], components: [{ type: SkyIconComponent, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { type: SkyIconStackComponent, selector: "sky-icon-stack", inputs: ["size", "baseIcon", "topIcon"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.λ4, selector: "[skyTrim]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
715
717
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyStatusIndicatorComponent, decorators: [{
|
|
716
718
|
type: Component,
|
|
717
|
-
args: [{ selector: 'sky-status-indicator', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"descriptionType\" class=\"sky-status-indicator\">\n <div\n aria-hidden=\"true\"\n class=\"sky-margin-inline-xs sky-status-indicator-icon\"\n [ngClass]=\"'sky-status-indicator-icon-' +
|
|
719
|
+
args: [{ selector: 'sky-status-indicator', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"descriptionType\" class=\"sky-status-indicator\">\n <div\n aria-hidden=\"true\"\n class=\"sky-margin-inline-xs sky-status-indicator-icon\"\n [ngClass]=\"'sky-status-indicator-icon-' + indicatorTypeOrDefault\"\n >\n <span class=\"sky-status-indicator-icon-default\">\n <sky-icon [icon]=\"icon\"></sky-icon>\n </span>\n <span class=\"sky-status-indicator-icon-modern\">\n <sky-icon-stack size=\"xs\" [baseIcon]=\"baseIcon\" [topIcon]=\"topIcon\">\n </sky-icon-stack>\n </span>\n </div>\n <div class=\"sky-status-indicator-message-wrapper\">\n <span *ngIf=\"descriptionComputed\" class=\"sky-screen-reader-only\">\n {{ descriptionComputed }}\n </span>\n <span class=\"sky-status-indicator-message\" skyTrim\n ><ng-content></ng-content></span\n ><span class=\"sky-status-indicator-help\"\n ><ng-content select=\".sky-control-help\"></ng-content\n ></span>\n </div>\n</div>\n", styles: [".sky-status-indicator{align-items:baseline;display:flex}.sky-status-indicator-icon{flex-shrink:1}.sky-status-indicator-icon-modern{display:none}.sky-status-indicator-icon-info{color:#00b4f1}.sky-status-indicator-icon-success{color:#72bf44}.sky-status-indicator-icon-warning{color:#fbb034}.sky-status-indicator-icon-danger{color:#ef4044}.sky-status-indicator-help:not(:empty){margin-left:var(--sky-margin-inline-sm)}:host-context(.sky-theme-modern) .sky-status-indicator-icon-default{display:none}:host-context(.sky-theme-modern) .sky-status-indicator-icon-modern{display:inline}.sky-theme-modern .sky-status-indicator-icon-default{display:none}.sky-theme-modern .sky-status-indicator-icon-modern{display:inline}\n"] }]
|
|
718
720
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$1.SkyLibResourcesService }]; }, propDecorators: { indicatorType: [{
|
|
719
721
|
type: Input
|
|
720
722
|
}], descriptionType: [{
|