@skyux/indicators 6.13.0 → 6.16.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 +823 -721
- package/esm2020/lib/modules/alert/alert.component.mjs +19 -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/key-info/key-info.component.mjs +3 -3
- package/esm2020/lib/modules/label/label.component.mjs +82 -29
- package/esm2020/lib/modules/label/label.module.mjs +19 -4
- package/esm2020/lib/modules/shared/indicator-description-type.mjs +1 -1
- package/esm2020/lib/modules/shared/sky-indicators-resources.module.mjs +17 -1
- package/esm2020/lib/modules/status-indicator/status-indicator.component.mjs +52 -44
- package/esm2020/testing/alert/alert-harness-filters.mjs +2 -0
- package/esm2020/testing/alert/alert-harness.mjs +72 -0
- package/esm2020/testing/alert-fixture.mjs +2 -1
- package/esm2020/testing/public-api.mjs +7 -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 +179 -1
- package/fesm2015/skyux-indicators-testing.mjs.map +1 -1
- package/fesm2015/skyux-indicators.mjs +199 -106
- package/fesm2015/skyux-indicators.mjs.map +1 -1
- package/fesm2020/skyux-indicators-testing.mjs +157 -1
- package/fesm2020/skyux-indicators-testing.mjs.map +1 -1
- package/fesm2020/skyux-indicators.mjs +199 -106
- package/fesm2020/skyux-indicators.mjs.map +1 -1
- package/lib/modules/alert/alert.component.d.ts +8 -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 +20 -5
- package/lib/modules/label/label.module.d.ts +4 -2
- package/lib/modules/shared/indicator-description-type.d.ts +1 -1
- package/lib/modules/status-indicator/status-indicator.component.d.ts +5 -10
- 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 +5 -4
- package/testing/public-api.d.ts +6 -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
|
@@ -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 });
|
|
@@ -152,11 +155,27 @@ const RESOURCES = {
|
|
|
152
155
|
'EN-US': {
|
|
153
156
|
skyux_alert_close: { message: 'Close the alert' },
|
|
154
157
|
skyux_help_inline_button_title: { message: 'Show help content' },
|
|
158
|
+
skyux_label_sr_attention: { message: 'Attention:' },
|
|
159
|
+
skyux_label_sr_caution: { message: 'Caution:' },
|
|
160
|
+
skyux_label_sr_completed: { message: 'Completed:' },
|
|
161
|
+
skyux_label_sr_danger: { message: 'Danger:' },
|
|
162
|
+
skyux_label_sr_error: { message: 'Error:' },
|
|
163
|
+
skyux_label_sr_important_info: { message: 'Important information:' },
|
|
164
|
+
skyux_label_sr_important_warning: { message: 'Important warning:' },
|
|
165
|
+
skyux_label_sr_success: { message: 'Success:' },
|
|
166
|
+
skyux_label_sr_warning: { message: 'Warning:' },
|
|
167
|
+
skyux_status_indicator_sr_attention: { message: 'Attention:' },
|
|
168
|
+
skyux_status_indicator_sr_caution: { message: 'Caution:' },
|
|
155
169
|
skyux_status_indicator_sr_completed: { message: 'Completed:' },
|
|
170
|
+
skyux_status_indicator_sr_danger: { message: 'Danger:' },
|
|
156
171
|
skyux_status_indicator_sr_error: { message: 'Error:' },
|
|
157
172
|
skyux_status_indicator_sr_important_info: {
|
|
158
173
|
message: 'Important information:',
|
|
159
174
|
},
|
|
175
|
+
skyux_status_indicator_sr_important_warning: {
|
|
176
|
+
message: 'Important warning:',
|
|
177
|
+
},
|
|
178
|
+
skyux_status_indicator_sr_success: { message: 'Success:' },
|
|
160
179
|
skyux_status_indicator_sr_warning: { message: 'Warning:' },
|
|
161
180
|
skyux_tokens_dismiss_button_title: { message: 'Remove item' },
|
|
162
181
|
skyux_wait_aria_alt_text: { message: 'Loading.' },
|
|
@@ -240,44 +259,48 @@ class SkyIndicatorIconUtility {
|
|
|
240
259
|
}
|
|
241
260
|
}
|
|
242
261
|
|
|
262
|
+
var _SkyAlertComponent_instances, _SkyAlertComponent_updateAlertIcon;
|
|
243
263
|
const ALERT_TYPE_DEFAULT = 'warning';
|
|
244
264
|
class SkyAlertComponent {
|
|
245
265
|
constructor() {
|
|
266
|
+
_SkyAlertComponent_instances.add(this);
|
|
246
267
|
/**
|
|
247
268
|
* Fires when users close the alert.
|
|
248
269
|
*/
|
|
249
270
|
this.closedChange = new EventEmitter();
|
|
271
|
+
this.alertTypeOrDefault = ALERT_TYPE_DEFAULT;
|
|
250
272
|
}
|
|
273
|
+
// TODO: Change alertType to SkyIndicatorIconType in a breaking change.
|
|
251
274
|
/**
|
|
252
275
|
* Specifies a style for the alert to determine the icon and background color.
|
|
253
276
|
* The valid options are `danger`, `info`, `success`, and `warning`.
|
|
254
277
|
* @default "warning"
|
|
255
278
|
*/
|
|
256
279
|
set alertType(value) {
|
|
257
|
-
this.
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
280
|
+
if (value !== this.alertTypeOrDefault) {
|
|
281
|
+
this.alertTypeOrDefault =
|
|
282
|
+
value || ALERT_TYPE_DEFAULT;
|
|
283
|
+
__classPrivateFieldGet(this, _SkyAlertComponent_instances, "m", _SkyAlertComponent_updateAlertIcon).call(this);
|
|
284
|
+
}
|
|
262
285
|
}
|
|
263
286
|
ngOnInit() {
|
|
264
|
-
this.
|
|
287
|
+
__classPrivateFieldGet(this, _SkyAlertComponent_instances, "m", _SkyAlertComponent_updateAlertIcon).call(this);
|
|
265
288
|
}
|
|
266
289
|
close() {
|
|
267
290
|
this.closed = true;
|
|
268
291
|
this.closedChange.emit(true);
|
|
269
292
|
}
|
|
270
|
-
updateAlertIcon() {
|
|
271
|
-
const indicatorIcon = SkyIndicatorIconUtility.getIconsForType(this.alertType);
|
|
272
|
-
this.alertBaseIcon = indicatorIcon.modernThemeBaseIcon;
|
|
273
|
-
this.alertTopIcon = indicatorIcon.modernThemeTopIcon;
|
|
274
|
-
}
|
|
275
293
|
}
|
|
294
|
+
_SkyAlertComponent_instances = new WeakSet(), _SkyAlertComponent_updateAlertIcon = function _SkyAlertComponent_updateAlertIcon() {
|
|
295
|
+
const indicatorIcon = SkyIndicatorIconUtility.getIconsForType(this.alertTypeOrDefault);
|
|
296
|
+
this.alertBaseIcon = indicatorIcon.modernThemeBaseIcon;
|
|
297
|
+
this.alertTopIcon = indicatorIcon.modernThemeTopIcon;
|
|
298
|
+
};
|
|
276
299
|
SkyAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
277
|
-
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':
|
|
300
|
+
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{--sky-alert-before-display: initial;--sky-alert-border-left-width: 30px;--sky-alert-close-icon-default-display: initial;--sky-alert-close-icon-modern-display: none;--sky-alert-content-padding-top-bottom: 10px;--sky-alert-content-padding-left-right: 0;--sky-alert-icon-default-display: initial;--sky-alert-icon-modern-display: none;--sky-alert-info-background-color: var(--sky-background-color-info)}:host-context(.sky-theme-modern) .sky-alert{--sky-alert-before-display: none;--sky-alert-border-left-width: 7px;--sky-alert-close-icon-default-display: none;--sky-alert-close-icon-modern-display: initial;--sky-alert-content-padding-left-right: var(--sky-padding-even-md);--sky-alert-content-padding-top-bottom: var(--sky-padding-even-md);--sky-alert-icon-default-display: none;--sky-alert-icon-modern-display: initial;--sky-alert-info-background-color: var(--sky-background-color-info-light)}.sky-theme-modern .sky-alert{--sky-alert-before-display: none;--sky-alert-border-left-width: 7px;--sky-alert-close-icon-default-display: none;--sky-alert-close-icon-modern-display: initial;--sky-alert-content-padding-left-right: var(--sky-padding-even-md);--sky-alert-content-padding-top-bottom: var(--sky-padding-even-md);--sky-alert-icon-default-display: none;--sky-alert-icon-modern-display: initial;--sky-alert-info-background-color: var(--sky-background-color-info-light)}.sky-alert{padding:0 10px;margin-bottom:20px;border-left:solid var(--sky-alert-border-left-width);color:var(--sky-text-color-default);display:flex;flex-direction:row;align-items:center}.sky-alert .sky-alert-content{padding:var(--sky-alert-content-padding-top-bottom) var(--sky-alert-content-padding-left-right);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:var(--sky-text-color-default)}.sky-alert button{margin-left:auto;width:32px;height:32px}.sky-alert.sky-alert-info:before,.sky-alert.sky-alert-success:before,.sky-alert.sky-alert-warning:before,.sky-alert.sky-alert-danger:before{font-family:FontAwesome;margin-left:-32px;margin-right:19px;color:#fff;display:var(--sky-alert-before-display)}.sky-alert.sky-alert-info{background-color:var(--sky-alert-info-background-color);border-color:var(--sky-highlight-color-info)}.sky-alert.sky-alert-info:before{content:\"\\f06a\";margin-left:-31px;margin-right:20px}.sky-alert.sky-alert-success{background-color:var(--sky-background-color-success);border-color:var(--sky-highlight-color-success)}.sky-alert.sky-alert-success:before{content:\"\\f00c\"}.sky-alert.sky-alert-warning{background-color:var(--sky-background-color-warning);border-color:var(--sky-highlight-color-warning)}.sky-alert.sky-alert-warning:before{content:\"\\f071\"}.sky-alert.sky-alert-danger{background-color:var(--sky-background-color-danger);border-color:var(--sky-highlight-color-danger)}.sky-alert.sky-alert-danger:before{content:\"\\f071\"}.sky-alert-close{cursor:pointer;font-weight:700;line-height:1;margin:0;padding:0;color:var(--sky-text-color-default);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-icon-theme-default{display:var(--sky-alert-icon-default-display)}.sky-alert-icon-theme-modern{display:var(--sky-alert-icon-modern-display)}.sky-alert-close-icon-theme-default{display:var(--sky-alert-icon-default-display)}.sky-alert-close-icon-theme-modern{display:var(--sky-alert-close-icon-modern-display)}.sky-alert-info .sky-alert-icon-theme-modern{color:var(--sky-highlight-color-info)}.sky-alert-success .sky-alert-icon-theme-modern{color:var(--sky-highlight-color-success)}.sky-alert-warning .sky-alert-icon-theme-modern{color:var(--sky-highlight-color-warning)}.sky-alert-danger .sky-alert-icon-theme-modern{color:var(--sky-highlight-color-danger)}\n"], components: [{ type: SkyIconStackComponent, selector: "sky-icon-stack", inputs: ["size", "baseIcon", "topIcon"] }, { type: SkyIconComponent, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i3.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "skyLibResources": i1$1.SkyLibResourcesPipe } });
|
|
278
301
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyAlertComponent, decorators: [{
|
|
279
302
|
type: Component,
|
|
280
|
-
args: [{ selector: 'sky-alert', template: "<div\n class=\"sky-alert\"\n [skyThemeClass]=\"{\n 'sky-rounded-corners': 'default',\n 'sky-box sky-elevation-1': 'modern'\n }\"\n role=\"alert\"\n [hidden]=\"closed\"\n [ngClass]=\"{\n 'sky-alert-info':
|
|
303
|
+
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{--sky-alert-before-display: initial;--sky-alert-border-left-width: 30px;--sky-alert-close-icon-default-display: initial;--sky-alert-close-icon-modern-display: none;--sky-alert-content-padding-top-bottom: 10px;--sky-alert-content-padding-left-right: 0;--sky-alert-icon-default-display: initial;--sky-alert-icon-modern-display: none;--sky-alert-info-background-color: var(--sky-background-color-info)}:host-context(.sky-theme-modern) .sky-alert{--sky-alert-before-display: none;--sky-alert-border-left-width: 7px;--sky-alert-close-icon-default-display: none;--sky-alert-close-icon-modern-display: initial;--sky-alert-content-padding-left-right: var(--sky-padding-even-md);--sky-alert-content-padding-top-bottom: var(--sky-padding-even-md);--sky-alert-icon-default-display: none;--sky-alert-icon-modern-display: initial;--sky-alert-info-background-color: var(--sky-background-color-info-light)}.sky-theme-modern .sky-alert{--sky-alert-before-display: none;--sky-alert-border-left-width: 7px;--sky-alert-close-icon-default-display: none;--sky-alert-close-icon-modern-display: initial;--sky-alert-content-padding-left-right: var(--sky-padding-even-md);--sky-alert-content-padding-top-bottom: var(--sky-padding-even-md);--sky-alert-icon-default-display: none;--sky-alert-icon-modern-display: initial;--sky-alert-info-background-color: var(--sky-background-color-info-light)}.sky-alert{padding:0 10px;margin-bottom:20px;border-left:solid var(--sky-alert-border-left-width);color:var(--sky-text-color-default);display:flex;flex-direction:row;align-items:center}.sky-alert .sky-alert-content{padding:var(--sky-alert-content-padding-top-bottom) var(--sky-alert-content-padding-left-right);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:var(--sky-text-color-default)}.sky-alert button{margin-left:auto;width:32px;height:32px}.sky-alert.sky-alert-info:before,.sky-alert.sky-alert-success:before,.sky-alert.sky-alert-warning:before,.sky-alert.sky-alert-danger:before{font-family:FontAwesome;margin-left:-32px;margin-right:19px;color:#fff;display:var(--sky-alert-before-display)}.sky-alert.sky-alert-info{background-color:var(--sky-alert-info-background-color);border-color:var(--sky-highlight-color-info)}.sky-alert.sky-alert-info:before{content:\"\\f06a\";margin-left:-31px;margin-right:20px}.sky-alert.sky-alert-success{background-color:var(--sky-background-color-success);border-color:var(--sky-highlight-color-success)}.sky-alert.sky-alert-success:before{content:\"\\f00c\"}.sky-alert.sky-alert-warning{background-color:var(--sky-background-color-warning);border-color:var(--sky-highlight-color-warning)}.sky-alert.sky-alert-warning:before{content:\"\\f071\"}.sky-alert.sky-alert-danger{background-color:var(--sky-background-color-danger);border-color:var(--sky-highlight-color-danger)}.sky-alert.sky-alert-danger:before{content:\"\\f071\"}.sky-alert-close{cursor:pointer;font-weight:700;line-height:1;margin:0;padding:0;color:var(--sky-text-color-default);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-icon-theme-default{display:var(--sky-alert-icon-default-display)}.sky-alert-icon-theme-modern{display:var(--sky-alert-icon-modern-display)}.sky-alert-close-icon-theme-default{display:var(--sky-alert-icon-default-display)}.sky-alert-close-icon-theme-modern{display:var(--sky-alert-close-icon-modern-display)}.sky-alert-info .sky-alert-icon-theme-modern{color:var(--sky-highlight-color-info)}.sky-alert-success .sky-alert-icon-theme-modern{color:var(--sky-highlight-color-success)}.sky-alert-warning .sky-alert-icon-theme-modern{color:var(--sky-highlight-color-warning)}.sky-alert-danger .sky-alert-icon-theme-modern{color:var(--sky-highlight-color-danger)}\n"] }]
|
|
281
304
|
}], propDecorators: { alertType: [{
|
|
282
305
|
type: Input
|
|
283
306
|
}], closeable: [{
|
|
@@ -323,24 +346,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
323
346
|
* @internal
|
|
324
347
|
*/
|
|
325
348
|
class SkyExpansionIndicatorComponent {
|
|
349
|
+
constructor() {
|
|
350
|
+
this.directionOrDefault = 'up';
|
|
351
|
+
}
|
|
326
352
|
/**
|
|
327
353
|
* Specifies whether the chevron points up or down.
|
|
328
354
|
*/
|
|
329
355
|
set direction(value) {
|
|
330
356
|
/* istanbul ignore else */
|
|
331
|
-
if (value != this.
|
|
332
|
-
this.
|
|
357
|
+
if (value != this.directionOrDefault) {
|
|
358
|
+
this.directionOrDefault = value ? value : 'up';
|
|
333
359
|
}
|
|
334
360
|
}
|
|
335
|
-
get direction() {
|
|
336
|
-
return this._direction || 'up';
|
|
337
|
-
}
|
|
338
361
|
}
|
|
339
362
|
SkyExpansionIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyExpansionIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
340
|
-
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-' +
|
|
363
|
+
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"] }] });
|
|
341
364
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyExpansionIndicatorComponent, decorators: [{
|
|
342
365
|
type: Component,
|
|
343
|
-
args: [{ selector: 'sky-expansion-indicator', template: "<div\n aria-hidden=\"true\"\n class=\"sky-expansion-indicator\"\n [ngClass]=\"['sky-expansion-indicator-' +
|
|
366
|
+
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"] }]
|
|
344
367
|
}], propDecorators: { direction: [{
|
|
345
368
|
type: Input
|
|
346
369
|
}] } });
|
|
@@ -373,37 +396,36 @@ class SkyChevronComponent {
|
|
|
373
396
|
* Fires when the direction of the chevron changes.
|
|
374
397
|
*/
|
|
375
398
|
this.directionChange = new EventEmitter();
|
|
399
|
+
this.ariaExpanded = true;
|
|
400
|
+
this.directionOrDefault = 'up';
|
|
376
401
|
}
|
|
377
402
|
/**
|
|
378
403
|
* Specifies whether the chevron points up or down.
|
|
379
404
|
*/
|
|
380
405
|
set direction(value) {
|
|
381
406
|
/* istanbul ignore else */
|
|
382
|
-
if (value != this.
|
|
383
|
-
this.
|
|
407
|
+
if (value != this.directionOrDefault) {
|
|
408
|
+
this.directionOrDefault = value ? value : 'up';
|
|
384
409
|
/* istanbul ignore else */
|
|
385
|
-
if (
|
|
410
|
+
if (this.directionOrDefault === 'up') {
|
|
386
411
|
this.ariaExpanded = true;
|
|
387
412
|
}
|
|
388
|
-
else if (this.
|
|
413
|
+
else if (this.directionOrDefault === 'down') {
|
|
389
414
|
this.ariaExpanded = false;
|
|
390
415
|
}
|
|
391
416
|
}
|
|
392
417
|
}
|
|
393
|
-
get direction() {
|
|
394
|
-
return this._direction || 'up';
|
|
395
|
-
}
|
|
396
418
|
chevronClick(event) {
|
|
397
419
|
event.stopPropagation();
|
|
398
|
-
this.direction = this.
|
|
399
|
-
this.directionChange.emit(this.
|
|
420
|
+
this.direction = this.directionOrDefault === 'up' ? 'down' : 'up';
|
|
421
|
+
this.directionChange.emit(this.directionOrDefault);
|
|
400
422
|
}
|
|
401
423
|
}
|
|
402
424
|
SkyChevronComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyChevronComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
403
|
-
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-' +
|
|
425
|
+
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"] }] });
|
|
404
426
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyChevronComponent, decorators: [{
|
|
405
427
|
type: Component,
|
|
406
|
-
args: [{ selector: 'sky-chevron', template: "<button\n class=\"sky-chevron\"\n type=\"button\"\n [attr.aria-controls]=\"ariaControls\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.aria-label]=\"ariaLabel\"\n [disabled]=\"disabled\"\n [ngClass]=\"['sky-chevron-' +
|
|
428
|
+
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"] }]
|
|
407
429
|
}], propDecorators: { ariaControls: [{
|
|
408
430
|
type: Input
|
|
409
431
|
}], ariaLabel: [{
|
|
@@ -540,10 +562,10 @@ class SkyKeyInfoComponent {
|
|
|
540
562
|
}
|
|
541
563
|
}
|
|
542
564
|
SkyKeyInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyKeyInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
543
|
-
SkyKeyInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyKeyInfoComponent, selector: "sky-key-info", inputs: { layout: "layout" }, ngImport: i0, template: "<div\n class=\"sky-key-info\"\n [ngClass]=\"{\n 'sky-key-info-horizontal': layout === 'horizontal'\n }\"\n>\n <div class=\"sky-key-info-value sky-headline\">\n <ng-content select=\"sky-key-info-value\"> </ng-content>\n </div>\n <div class=\"sky-key-info-label sky-field-label sky-font-data-label\">\n <span skyTrim><ng-content select=\"sky-key-info-label\"></ng-content></span\n ><span class=\"sky-
|
|
565
|
+
SkyKeyInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyKeyInfoComponent, selector: "sky-key-info", inputs: { layout: "layout" }, ngImport: i0, template: "<div\n class=\"sky-key-info\"\n [ngClass]=\"{\n 'sky-key-info-horizontal': layout === 'horizontal'\n }\"\n>\n <div class=\"sky-key-info-value sky-headline\">\n <ng-content select=\"sky-key-info-value\"> </ng-content>\n </div>\n <div class=\"sky-key-info-label sky-field-label sky-font-data-label\">\n <span skyTrim><ng-content select=\"sky-key-info-label\"></ng-content></span\n ><span class=\"sky-control-help-container\"\n ><ng-content select=\".sky-control-help\"></ng-content\n ></span>\n </div>\n</div>\n", styles: [".sky-key-info,.sky-key-info.sky-key-info-horizontal .sky-key-info-value,.sky-key-info.sky-key-info-horizontal .sky-key-info-label{display:inline-block}.sky-key-info.sky-key-info-horizontal .sky-key-info-label{padding:0 0 0 5px}:host-context(.sky-theme-modern) .sky-key-info.sky-key-info-horizontal .sky-key-info-label{padding:0 0 0 5px}.sky-theme-modern .sky-key-info.sky-key-info-horizontal .sky-key-info-label{padding:0 0 0 5px}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.λ4, selector: "[skyTrim]" }] });
|
|
544
566
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyKeyInfoComponent, decorators: [{
|
|
545
567
|
type: Component,
|
|
546
|
-
args: [{ selector: 'sky-key-info', template: "<div\n class=\"sky-key-info\"\n [ngClass]=\"{\n 'sky-key-info-horizontal': layout === 'horizontal'\n }\"\n>\n <div class=\"sky-key-info-value sky-headline\">\n <ng-content select=\"sky-key-info-value\"> </ng-content>\n </div>\n <div class=\"sky-key-info-label sky-field-label sky-font-data-label\">\n <span skyTrim><ng-content select=\"sky-key-info-label\"></ng-content></span\n ><span class=\"sky-
|
|
568
|
+
args: [{ selector: 'sky-key-info', template: "<div\n class=\"sky-key-info\"\n [ngClass]=\"{\n 'sky-key-info-horizontal': layout === 'horizontal'\n }\"\n>\n <div class=\"sky-key-info-value sky-headline\">\n <ng-content select=\"sky-key-info-value\"> </ng-content>\n </div>\n <div class=\"sky-key-info-label sky-field-label sky-font-data-label\">\n <span skyTrim><ng-content select=\"sky-key-info-label\"></ng-content></span\n ><span class=\"sky-control-help-container\"\n ><ng-content select=\".sky-control-help\"></ng-content\n ></span>\n </div>\n</div>\n", styles: [".sky-key-info,.sky-key-info.sky-key-info-horizontal .sky-key-info-value,.sky-key-info.sky-key-info-horizontal .sky-key-info-label{display:inline-block}.sky-key-info.sky-key-info-horizontal .sky-key-info-label{padding:0 0 0 5px}:host-context(.sky-theme-modern) .sky-key-info.sky-key-info-horizontal .sky-key-info-label{padding:0 0 0 5px}.sky-theme-modern .sky-key-info.sky-key-info-horizontal .sky-key-info-label{padding:0 0 0 5px}\n"] }]
|
|
547
569
|
}], propDecorators: { layout: [{
|
|
548
570
|
type: Input
|
|
549
571
|
}] } });
|
|
@@ -574,61 +596,126 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
574
596
|
}]
|
|
575
597
|
}] });
|
|
576
598
|
|
|
577
|
-
var
|
|
599
|
+
var _SkyLabelComponent_instances, _SkyLabelComponent__descriptionType, _SkyLabelComponent__customDescription, _SkyLabelComponent_changeDetector, _SkyLabelComponent_descriptionTypeResourceSubscription, _SkyLabelComponent_resources, _SkyLabelComponent_updateIcon, _SkyLabelComponent_updateDescriptionComputed, _SkyLabelComponent_unsubscribe;
|
|
578
600
|
const LABEL_TYPE_DEFAULT = 'info';
|
|
579
601
|
class SkyLabelComponent {
|
|
580
|
-
constructor() {
|
|
602
|
+
constructor(changeDetector, resources) {
|
|
603
|
+
_SkyLabelComponent_instances.add(this);
|
|
581
604
|
this.labelTypeOrDefault = LABEL_TYPE_DEFAULT;
|
|
582
|
-
|
|
605
|
+
_SkyLabelComponent__descriptionType.set(this, void 0);
|
|
606
|
+
_SkyLabelComponent__customDescription.set(this, void 0);
|
|
607
|
+
_SkyLabelComponent_changeDetector.set(this, void 0);
|
|
608
|
+
_SkyLabelComponent_descriptionTypeResourceSubscription.set(this, void 0);
|
|
609
|
+
_SkyLabelComponent_resources.set(this, void 0);
|
|
610
|
+
__classPrivateFieldSet(this, _SkyLabelComponent_changeDetector, changeDetector, "f");
|
|
611
|
+
__classPrivateFieldSet(this, _SkyLabelComponent_resources, resources, "f");
|
|
583
612
|
}
|
|
584
613
|
/**
|
|
585
614
|
* The type of label to display.
|
|
586
|
-
* @
|
|
615
|
+
* @default 'info'
|
|
587
616
|
*/
|
|
588
617
|
set labelType(value) {
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
this.labelTypeOrDefault = LABEL_TYPE_DEFAULT;
|
|
592
|
-
}
|
|
593
|
-
else {
|
|
594
|
-
this.labelTypeOrDefault = __classPrivateFieldGet(this, _SkyLabelComponent__labelType, "f");
|
|
595
|
-
}
|
|
596
|
-
this.updateIcon();
|
|
618
|
+
this.labelTypeOrDefault = value === undefined ? LABEL_TYPE_DEFAULT : value;
|
|
619
|
+
__classPrivateFieldGet(this, _SkyLabelComponent_instances, "m", _SkyLabelComponent_updateIcon).call(this);
|
|
597
620
|
}
|
|
598
|
-
|
|
599
|
-
|
|
621
|
+
/**
|
|
622
|
+
* Specifies the predefined text to be read by screen readers for users who cannot see the indicator icon.
|
|
623
|
+
* This property is optional but will be required in future versions of SKY UX.
|
|
624
|
+
*/
|
|
625
|
+
set descriptionType(value) {
|
|
626
|
+
__classPrivateFieldSet(this, _SkyLabelComponent__descriptionType, value, "f");
|
|
627
|
+
__classPrivateFieldGet(this, _SkyLabelComponent_instances, "m", _SkyLabelComponent_updateDescriptionComputed).call(this);
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* Specifies the text to be read by screen readers for users who cannot see
|
|
631
|
+
* the indicator icon when `descriptionType` is `custom`.
|
|
632
|
+
*/
|
|
633
|
+
set customDescription(value) {
|
|
634
|
+
__classPrivateFieldSet(this, _SkyLabelComponent__customDescription, value, "f");
|
|
635
|
+
__classPrivateFieldGet(this, _SkyLabelComponent_instances, "m", _SkyLabelComponent_updateDescriptionComputed).call(this);
|
|
636
|
+
}
|
|
637
|
+
ngOnInit() {
|
|
638
|
+
__classPrivateFieldGet(this, _SkyLabelComponent_instances, "m", _SkyLabelComponent_updateIcon).call(this);
|
|
600
639
|
}
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
this.icon = indicatorIcon.defaultThemeIcon;
|
|
604
|
-
this.baseIcon = indicatorIcon.modernThemeBaseIcon;
|
|
605
|
-
this.topIcon = indicatorIcon.modernThemeTopIcon;
|
|
640
|
+
ngOnDestroy() {
|
|
641
|
+
__classPrivateFieldGet(this, _SkyLabelComponent_instances, "m", _SkyLabelComponent_unsubscribe).call(this);
|
|
606
642
|
}
|
|
607
643
|
}
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
644
|
+
_SkyLabelComponent__descriptionType = new WeakMap(), _SkyLabelComponent__customDescription = new WeakMap(), _SkyLabelComponent_changeDetector = new WeakMap(), _SkyLabelComponent_descriptionTypeResourceSubscription = new WeakMap(), _SkyLabelComponent_resources = new WeakMap(), _SkyLabelComponent_instances = new WeakSet(), _SkyLabelComponent_updateIcon = function _SkyLabelComponent_updateIcon() {
|
|
645
|
+
const indicatorIcon = SkyIndicatorIconUtility.getIconsForType(this.labelTypeOrDefault);
|
|
646
|
+
this.icon = indicatorIcon.defaultThemeIcon;
|
|
647
|
+
this.baseIcon = indicatorIcon.modernThemeBaseIcon;
|
|
648
|
+
this.topIcon = indicatorIcon.modernThemeTopIcon;
|
|
649
|
+
}, _SkyLabelComponent_updateDescriptionComputed = function _SkyLabelComponent_updateDescriptionComputed() {
|
|
650
|
+
__classPrivateFieldGet(this, _SkyLabelComponent_instances, "m", _SkyLabelComponent_unsubscribe).call(this);
|
|
651
|
+
if (__classPrivateFieldGet(this, _SkyLabelComponent__descriptionType, "f")) {
|
|
652
|
+
switch (__classPrivateFieldGet(this, _SkyLabelComponent__descriptionType, "f")) {
|
|
653
|
+
case 'none':
|
|
654
|
+
this.descriptionComputed = undefined;
|
|
655
|
+
break;
|
|
656
|
+
case 'custom':
|
|
657
|
+
this.descriptionComputed = __classPrivateFieldGet(this, _SkyLabelComponent__customDescription, "f");
|
|
658
|
+
break;
|
|
659
|
+
default:
|
|
660
|
+
__classPrivateFieldSet(this, _SkyLabelComponent_descriptionTypeResourceSubscription, __classPrivateFieldGet(this, _SkyLabelComponent_resources, "f")
|
|
661
|
+
.getString('skyux_label_sr_' + __classPrivateFieldGet(this, _SkyLabelComponent__descriptionType, "f").replace(/-/g, '_'))
|
|
662
|
+
.subscribe((value) => {
|
|
663
|
+
this.descriptionComputed = value;
|
|
664
|
+
__classPrivateFieldGet(this, _SkyLabelComponent_changeDetector, "f").markForCheck();
|
|
665
|
+
}), "f");
|
|
666
|
+
break;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
else {
|
|
670
|
+
this.descriptionComputed = undefined;
|
|
671
|
+
}
|
|
672
|
+
}, _SkyLabelComponent_unsubscribe = function _SkyLabelComponent_unsubscribe() {
|
|
673
|
+
if (__classPrivateFieldGet(this, _SkyLabelComponent_descriptionTypeResourceSubscription, "f")) {
|
|
674
|
+
__classPrivateFieldGet(this, _SkyLabelComponent_descriptionTypeResourceSubscription, "f").unsubscribe();
|
|
675
|
+
__classPrivateFieldSet(this, _SkyLabelComponent_descriptionTypeResourceSubscription, undefined, "f");
|
|
676
|
+
}
|
|
677
|
+
};
|
|
678
|
+
SkyLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLabelComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.SkyLibResourcesService }], target: i0.ɵɵFactoryTarget.Component });
|
|
679
|
+
SkyLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SkyLabelComponent, selector: "sky-label", inputs: { labelType: "labelType", descriptionType: "descriptionType", customDescription: "customDescription" }, 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 *ngIf=\"descriptionComputed\" class=\"sky-screen-reader-only\">\n {{ descriptionComputed }}\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"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
611
680
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLabelComponent, decorators: [{
|
|
612
681
|
type: Component,
|
|
613
|
-
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"] }]
|
|
614
|
-
}], propDecorators: { labelType: [{
|
|
682
|
+
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 *ngIf=\"descriptionComputed\" class=\"sky-screen-reader-only\">\n {{ descriptionComputed }}\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"] }]
|
|
683
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$1.SkyLibResourcesService }]; }, propDecorators: { labelType: [{
|
|
684
|
+
type: Input
|
|
685
|
+
}], descriptionType: [{
|
|
686
|
+
type: Input
|
|
687
|
+
}], customDescription: [{
|
|
615
688
|
type: Input
|
|
616
689
|
}] } });
|
|
617
690
|
|
|
618
691
|
class SkyLabelModule {
|
|
619
692
|
}
|
|
620
693
|
SkyLabelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
621
|
-
SkyLabelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLabelModule, declarations: [SkyLabelComponent], imports: [CommonModule,
|
|
622
|
-
|
|
694
|
+
SkyLabelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLabelModule, declarations: [SkyLabelComponent], imports: [CommonModule,
|
|
695
|
+
SkyI18nModule,
|
|
696
|
+
SkyIconModule,
|
|
697
|
+
SkyIndicatorsResourcesModule], exports: [SkyLabelComponent] });
|
|
698
|
+
SkyLabelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLabelModule, imports: [[
|
|
699
|
+
CommonModule,
|
|
700
|
+
SkyI18nModule,
|
|
701
|
+
SkyIconModule,
|
|
702
|
+
SkyIndicatorsResourcesModule,
|
|
703
|
+
]] });
|
|
623
704
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyLabelModule, decorators: [{
|
|
624
705
|
type: NgModule,
|
|
625
706
|
args: [{
|
|
626
707
|
declarations: [SkyLabelComponent],
|
|
627
|
-
imports: [
|
|
708
|
+
imports: [
|
|
709
|
+
CommonModule,
|
|
710
|
+
SkyI18nModule,
|
|
711
|
+
SkyIconModule,
|
|
712
|
+
SkyIndicatorsResourcesModule,
|
|
713
|
+
],
|
|
628
714
|
exports: [SkyLabelComponent],
|
|
629
715
|
}]
|
|
630
716
|
}] });
|
|
631
717
|
|
|
718
|
+
var _SkyStatusIndicatorComponent_instances, _SkyStatusIndicatorComponent_changeDetector, _SkyStatusIndicatorComponent_resources, _SkyStatusIndicatorComponent__descriptionType, _SkyStatusIndicatorComponent__customDescription, _SkyStatusIndicatorComponent_updateIcon, _SkyStatusIndicatorComponent_updateDescriptionComputed;
|
|
632
719
|
const INDICATOR_TYPE_DEFAULT = 'warning';
|
|
633
720
|
/**
|
|
634
721
|
* Displays status text with an icon matching the specified indicator type.
|
|
@@ -638,19 +725,23 @@ const INDICATOR_TYPE_DEFAULT = 'warning';
|
|
|
638
725
|
*/
|
|
639
726
|
class SkyStatusIndicatorComponent {
|
|
640
727
|
constructor(changeDetector, resources) {
|
|
641
|
-
this
|
|
642
|
-
this.
|
|
728
|
+
_SkyStatusIndicatorComponent_instances.add(this);
|
|
729
|
+
this.indicatorTypeOrDefault = INDICATOR_TYPE_DEFAULT;
|
|
730
|
+
_SkyStatusIndicatorComponent_changeDetector.set(this, void 0);
|
|
731
|
+
_SkyStatusIndicatorComponent_resources.set(this, void 0);
|
|
732
|
+
_SkyStatusIndicatorComponent__descriptionType.set(this, void 0);
|
|
733
|
+
_SkyStatusIndicatorComponent__customDescription.set(this, void 0);
|
|
734
|
+
__classPrivateFieldSet(this, _SkyStatusIndicatorComponent_changeDetector, changeDetector, "f");
|
|
735
|
+
__classPrivateFieldSet(this, _SkyStatusIndicatorComponent_resources, resources, "f");
|
|
643
736
|
}
|
|
644
737
|
/**
|
|
645
738
|
* Specifies a style for the status indicator to determine the icon.
|
|
646
739
|
* @default "warning"
|
|
647
740
|
*/
|
|
648
741
|
set indicatorType(value) {
|
|
649
|
-
this.
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
get indicatorType() {
|
|
653
|
-
return this._indicatorType || INDICATOR_TYPE_DEFAULT;
|
|
742
|
+
this.indicatorTypeOrDefault =
|
|
743
|
+
value === undefined ? INDICATOR_TYPE_DEFAULT : value;
|
|
744
|
+
__classPrivateFieldGet(this, _SkyStatusIndicatorComponent_instances, "m", _SkyStatusIndicatorComponent_updateIcon).call(this);
|
|
654
745
|
}
|
|
655
746
|
/**
|
|
656
747
|
* Specifies the predefined text to be read by screen readers for users
|
|
@@ -658,59 +749,61 @@ class SkyStatusIndicatorComponent {
|
|
|
658
749
|
* @required
|
|
659
750
|
*/
|
|
660
751
|
set descriptionType(value) {
|
|
661
|
-
this
|
|
662
|
-
this.
|
|
752
|
+
__classPrivateFieldSet(this, _SkyStatusIndicatorComponent__descriptionType, value, "f");
|
|
753
|
+
__classPrivateFieldGet(this, _SkyStatusIndicatorComponent_instances, "m", _SkyStatusIndicatorComponent_updateDescriptionComputed).call(this);
|
|
663
754
|
}
|
|
664
755
|
get descriptionType() {
|
|
665
|
-
return this
|
|
756
|
+
return __classPrivateFieldGet(this, _SkyStatusIndicatorComponent__descriptionType, "f");
|
|
666
757
|
}
|
|
667
758
|
/**
|
|
668
759
|
* Specifies the text to be read by screen readers for users who cannot see
|
|
669
760
|
* the indicator icon when `descriptionType` is `custom`.
|
|
670
761
|
*/
|
|
671
762
|
set customDescription(value) {
|
|
672
|
-
this
|
|
673
|
-
this.
|
|
763
|
+
__classPrivateFieldSet(this, _SkyStatusIndicatorComponent__customDescription, value, "f");
|
|
764
|
+
__classPrivateFieldGet(this, _SkyStatusIndicatorComponent_instances, "m", _SkyStatusIndicatorComponent_updateDescriptionComputed).call(this);
|
|
674
765
|
}
|
|
675
766
|
get customDescription() {
|
|
676
|
-
return this
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
this.icon = indicatorIcon.defaultThemeIcon;
|
|
681
|
-
this.baseIcon = indicatorIcon.modernThemeBaseIcon;
|
|
682
|
-
this.topIcon = indicatorIcon.modernThemeTopIcon;
|
|
683
|
-
}
|
|
684
|
-
updateDescriptionComputed() {
|
|
685
|
-
if (this.descriptionType) {
|
|
686
|
-
switch (this.descriptionType) {
|
|
687
|
-
case 'none':
|
|
688
|
-
this.descriptionComputed = '';
|
|
689
|
-
break;
|
|
690
|
-
case 'custom':
|
|
691
|
-
this.descriptionComputed = this.customDescription;
|
|
692
|
-
break;
|
|
693
|
-
default:
|
|
694
|
-
this.resources
|
|
695
|
-
.getString('skyux_status_indicator_sr_' +
|
|
696
|
-
this.descriptionType.replace(/-/g, '_'))
|
|
697
|
-
.subscribe((value) => {
|
|
698
|
-
this.descriptionComputed = value;
|
|
699
|
-
this.changeDetector.markForCheck();
|
|
700
|
-
});
|
|
701
|
-
break;
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
else {
|
|
705
|
-
this.descriptionComputed = undefined;
|
|
706
|
-
}
|
|
767
|
+
return __classPrivateFieldGet(this, _SkyStatusIndicatorComponent__customDescription, "f");
|
|
768
|
+
}
|
|
769
|
+
ngOnInit() {
|
|
770
|
+
__classPrivateFieldGet(this, _SkyStatusIndicatorComponent_instances, "m", _SkyStatusIndicatorComponent_updateIcon).call(this);
|
|
707
771
|
}
|
|
708
772
|
}
|
|
773
|
+
_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() {
|
|
774
|
+
const indicatorIcon = SkyIndicatorIconUtility.getIconsForType(this.indicatorTypeOrDefault);
|
|
775
|
+
this.icon = indicatorIcon.defaultThemeIcon;
|
|
776
|
+
this.baseIcon = indicatorIcon.modernThemeBaseIcon;
|
|
777
|
+
this.topIcon = indicatorIcon.modernThemeTopIcon;
|
|
778
|
+
}, _SkyStatusIndicatorComponent_updateDescriptionComputed = function _SkyStatusIndicatorComponent_updateDescriptionComputed() {
|
|
779
|
+
if (this.descriptionType) {
|
|
780
|
+
switch (this.descriptionType) {
|
|
781
|
+
case 'none':
|
|
782
|
+
this.descriptionComputed = '';
|
|
783
|
+
break;
|
|
784
|
+
case 'custom':
|
|
785
|
+
this.descriptionComputed = this.customDescription;
|
|
786
|
+
break;
|
|
787
|
+
default:
|
|
788
|
+
__classPrivateFieldGet(this, _SkyStatusIndicatorComponent_resources, "f")
|
|
789
|
+
.getString('skyux_status_indicator_sr_' +
|
|
790
|
+
this.descriptionType.replace(/-/g, '_'))
|
|
791
|
+
.subscribe((value) => {
|
|
792
|
+
this.descriptionComputed = value;
|
|
793
|
+
__classPrivateFieldGet(this, _SkyStatusIndicatorComponent_changeDetector, "f").markForCheck();
|
|
794
|
+
});
|
|
795
|
+
break;
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
else {
|
|
799
|
+
this.descriptionComputed = undefined;
|
|
800
|
+
}
|
|
801
|
+
};
|
|
709
802
|
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 });
|
|
710
|
-
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-' +
|
|
803
|
+
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-control-help-container\"\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}: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 });
|
|
711
804
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SkyStatusIndicatorComponent, decorators: [{
|
|
712
805
|
type: Component,
|
|
713
|
-
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-' +
|
|
806
|
+
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-control-help-container\"\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}: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"] }]
|
|
714
807
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$1.SkyLibResourcesService }]; }, propDecorators: { indicatorType: [{
|
|
715
808
|
type: Input
|
|
716
809
|
}], descriptionType: [{
|