@skyux/indicators 5.5.0 → 5.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/skyux-indicators.umd.js +205 -205
- package/documentation.json +121 -533
- package/esm2015/lib/modules/alert/alert.component.js.map +1 -1
- package/esm2015/lib/modules/alert/alert.module.js +3 -3
- package/esm2015/lib/modules/alert/alert.module.js.map +1 -1
- package/esm2015/lib/modules/chevron/chevron.module.js +2 -2
- package/esm2015/lib/modules/chevron/chevron.module.js.map +1 -1
- package/esm2015/lib/modules/expansion-indicator/expansion-indicator.module.js +2 -2
- package/esm2015/lib/modules/expansion-indicator/expansion-indicator.module.js.map +1 -1
- package/esm2015/lib/modules/help-inline/help-inline.module.js +1 -1
- package/esm2015/lib/modules/help-inline/help-inline.module.js.map +1 -1
- package/esm2015/lib/modules/icon/icon-class-list.pipe.js.map +1 -1
- package/esm2015/lib/modules/icon/icon-resolver.service.js.map +1 -1
- package/esm2015/lib/modules/icon/icon.component.js.map +1 -1
- package/esm2015/lib/modules/icon/icon.module.js +4 -4
- package/esm2015/lib/modules/icon/icon.module.js.map +1 -1
- package/esm2015/lib/modules/key-info/key-info.module.js +1 -1
- package/esm2015/lib/modules/key-info/key-info.module.js.map +1 -1
- package/esm2015/lib/modules/label/label.component.js.map +1 -1
- package/esm2015/lib/modules/label/label.module.js +1 -1
- package/esm2015/lib/modules/label/label.module.js.map +1 -1
- package/esm2015/lib/modules/shared/indicator-icon-utility.js.map +1 -1
- package/esm2015/lib/modules/shared/sky-indicators-resources.module.js +1 -1
- package/esm2015/lib/modules/shared/sky-indicators-resources.module.js.map +1 -1
- package/esm2015/lib/modules/status-indicator/status-indicator.component.js.map +1 -1
- package/esm2015/lib/modules/status-indicator/status-indicator.module.js +2 -2
- package/esm2015/lib/modules/status-indicator/status-indicator.module.js.map +1 -1
- package/esm2015/lib/modules/text-highlight/text-highlight.directive.js +53 -54
- package/esm2015/lib/modules/text-highlight/text-highlight.directive.js.map +1 -1
- package/esm2015/lib/modules/text-highlight/text-highlight.module.js.map +1 -1
- package/esm2015/lib/modules/tokens/token.component.js.map +1 -1
- package/esm2015/lib/modules/tokens/tokens.component.js +1 -1
- package/esm2015/lib/modules/tokens/tokens.component.js.map +1 -1
- package/esm2015/lib/modules/tokens/tokens.module.js +3 -3
- package/esm2015/lib/modules/tokens/tokens.module.js.map +1 -1
- package/esm2015/lib/modules/wait/wait.component.js.map +1 -1
- package/esm2015/lib/modules/wait/wait.module.js +2 -2
- package/esm2015/lib/modules/wait/wait.module.js.map +1 -1
- package/esm2015/lib/modules/wait/wait.service.js.map +1 -1
- package/esm2015/testing/alert-fixture.js.map +1 -1
- package/esm2015/testing/label-fixture.js.map +1 -1
- package/esm2015/testing/wait-fixture.js.map +1 -1
- package/fesm2015/skyux-indicators-testing.js.map +1 -1
- package/fesm2015/skyux-indicators.js +146 -147
- package/fesm2015/skyux-indicators.js.map +1 -1
- package/lib/modules/status-indicator/status-indicator.component.d.ts +1 -1
- package/lib/modules/text-highlight/text-highlight.directive.d.ts +4 -4
- package/lib/modules/tokens/tokens.component.d.ts +1 -1
- package/package.json +14 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/alert/alert.component.ts","../../../../../../../../libs/components/indicators/src/lib/modules/alert/alert.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;AAI/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;;;;;;;
|
|
1
|
+
{"version":3,"file":"alert.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/alert/alert.component.ts","../../../../../../../../libs/components/indicators/src/lib/modules/alert/alert.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,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/icon-stack-item';\nimport { SkyIndicatorIconType } from '../shared/indicator-icon-type';\nimport { SkyIndicatorIconUtility } from '../shared/indicator-icon-utility';\n\nconst ALERT_TYPE_DEFAULT = 'warning';\n\n@Component({\n selector: 'sky-alert',\n styleUrls: ['./alert.component.scss'],\n templateUrl: './alert.component.html',\n})\nexport class SkyAlertComponent implements OnInit {\n /**\n * Specifies a style for the alert to determine the icon and background color.\n * The valid options are `danger`, `info`, `success`, and `warning`.\n * @default \"warning\"\n */\n @Input()\n public set alertType(value: string) {\n this._alertType = value;\n this.updateAlertIcon();\n }\n\n public get alertType(): string {\n return this._alertType || ALERT_TYPE_DEFAULT;\n }\n\n /**\n * Indicates whether to include a close button for users to dismiss the alert.\n * @default false\n */\n @Input()\n public closeable: boolean;\n\n /**\n * Indicates whether the alert is closed.\n * @default false\n */\n @Input()\n public closed: boolean;\n\n /**\n * Fires when users close the alert.\n */\n @Output()\n public closedChange = new EventEmitter<boolean>();\n\n public alertBaseIcon: SkyIconStackItem;\n\n public alertTopIcon: SkyIconStackItem;\n\n private _alertType: string;\n\n public ngOnInit(): void {\n this.updateAlertIcon();\n }\n\n public close(): void {\n this.closed = true;\n this.closedChange.emit(true);\n }\n\n private updateAlertIcon(): void {\n const indicatorIcon = SkyIndicatorIconUtility.getIconsForType(\n this.alertType as SkyIndicatorIconType\n );\n\n this.alertBaseIcon = indicatorIcon.modernThemeBaseIcon;\n this.alertTopIcon = indicatorIcon.modernThemeTopIcon;\n }\n}\n","<div\n class=\"sky-alert\"\n [skyThemeClass]=\"{\n 'sky-rounded-corners': 'default',\n 'sky-box sky-elevation-1': 'modern'\n }\"\n role=\"alert\"\n [hidden]=\"closed\"\n [ngClass]=\"{\n 'sky-alert-info': alertType === 'info',\n 'sky-alert-success': alertType === 'success',\n 'sky-alert-warning': alertType === 'warning',\n 'sky-alert-danger': alertType === 'danger',\n 'sky-alert-closeable': closeable\n }\"\n>\n <div aria-hidden=\"true\" class=\"sky-alert-icon-theme-modern\">\n <sky-icon-stack [baseIcon]=\"alertBaseIcon\" [topIcon]=\"alertTopIcon\">\n </sky-icon-stack>\n </div>\n <div class=\"sky-alert-content\">\n <ng-content></ng-content>\n </div>\n <button\n class=\"sky-alert-close\"\n type=\"button\"\n [attr.aria-label]=\"'skyux_alert_close' | skyLibResources\"\n [hidden]=\"!closeable\"\n (click)=\"close()\"\n >\n <span aria-hidden=\"true\">\n <sky-icon class=\"sky-alert-close-icon-theme-default\" icon=\"close\">\n </sky-icon>\n <sky-icon\n class=\"sky-alert-close-icon-theme-modern\"\n icon=\"close\"\n iconType=\"skyux\"\n size=\"2x\"\n >\n </sky-icon>\n </span>\n </button>\n</div>\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
1
|
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { NgModule } from '@angular/core';
|
|
3
3
|
import { SkyI18nModule } from '@skyux/i18n';
|
|
4
|
-
import { SkyIndicatorsResourcesModule } from '../shared/sky-indicators-resources.module';
|
|
5
|
-
import { SkyIconModule } from '../icon/icon.module';
|
|
6
4
|
import { SkyThemeModule } from '@skyux/theme';
|
|
5
|
+
import { SkyIconModule } from '../icon/icon.module';
|
|
6
|
+
import { SkyIndicatorsResourcesModule } from '../shared/sky-indicators-resources.module';
|
|
7
7
|
import { SkyAlertComponent } from './alert.component';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export class SkyAlertModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/alert/alert.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"alert.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/alert/alert.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AAEzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;;AAatD,MAAM,OAAO,cAAc;;4GAAd,cAAc;6GAAd,cAAc,iBAVV,iBAAiB,aAE9B,YAAY;QACZ,aAAa;QACb,aAAa;QACb,4BAA4B;QAC5B,cAAc,aAEN,iBAAiB;6GAEhB,cAAc,YAThB;YACP,YAAY;YACZ,aAAa;YACb,aAAa;YACb,4BAA4B;YAC5B,cAAc;SACf;4FAGU,cAAc;kBAX1B,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;oBACjC,OAAO,EAAE;wBACP,YAAY;wBACZ,aAAa;wBACb,aAAa;wBACb,4BAA4B;wBAC5B,cAAc;qBACf;oBACD,OAAO,EAAE,CAAC,iBAAiB,CAAC;iBAC7B","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SkyI18nModule } from '@skyux/i18n';\nimport { SkyThemeModule } from '@skyux/theme';\n\nimport { SkyIconModule } from '../icon/icon.module';\nimport { SkyIndicatorsResourcesModule } from '../shared/sky-indicators-resources.module';\n\nimport { SkyAlertComponent } from './alert.component';\n\n@NgModule({\n declarations: [SkyAlertComponent],\n imports: [\n CommonModule,\n SkyI18nModule,\n SkyIconModule,\n SkyIndicatorsResourcesModule,\n SkyThemeModule,\n ],\n exports: [SkyAlertComponent],\n})\nexport class SkyAlertModule {}\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
1
|
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { NgModule } from '@angular/core';
|
|
3
3
|
import { SkyI18nModule } from '@skyux/i18n';
|
|
4
4
|
import { SkyThemeModule } from '@skyux/theme';
|
|
5
|
+
import { SkyExpansionIndicatorModule } from '../expansion-indicator/expansion-indicator.module';
|
|
5
6
|
import { SkyIndicatorsResourcesModule } from '../shared/sky-indicators-resources.module';
|
|
6
7
|
import { SkyChevronComponent } from './chevron.component';
|
|
7
|
-
import { SkyExpansionIndicatorModule } from '../expansion-indicator/expansion-indicator.module';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export class SkyChevronModule {
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chevron.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/chevron/chevron.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"chevron.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/chevron/chevron.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AAChG,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AAEzF,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;;AAa1D,MAAM,OAAO,gBAAgB;;8GAAhB,gBAAgB;+GAAhB,gBAAgB,iBAVZ,mBAAmB,aAEhC,YAAY;QACZ,aAAa;QACb,4BAA4B;QAC5B,cAAc;QACd,2BAA2B,aAEnB,mBAAmB;+GAElB,gBAAgB,YATlB;YACP,YAAY;YACZ,aAAa;YACb,4BAA4B;YAC5B,cAAc;YACd,2BAA2B;SAC5B;4FAGU,gBAAgB;kBAX5B,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;oBACnC,OAAO,EAAE;wBACP,YAAY;wBACZ,aAAa;wBACb,4BAA4B;wBAC5B,cAAc;wBACd,2BAA2B;qBAC5B;oBACD,OAAO,EAAE,CAAC,mBAAmB,CAAC;iBAC/B","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SkyI18nModule } from '@skyux/i18n';\nimport { SkyThemeModule } from '@skyux/theme';\n\nimport { SkyExpansionIndicatorModule } from '../expansion-indicator/expansion-indicator.module';\nimport { SkyIndicatorsResourcesModule } from '../shared/sky-indicators-resources.module';\n\nimport { SkyChevronComponent } from './chevron.component';\n\n@NgModule({\n declarations: [SkyChevronComponent],\n imports: [\n CommonModule,\n SkyI18nModule,\n SkyIndicatorsResourcesModule,\n SkyThemeModule,\n SkyExpansionIndicatorModule,\n ],\n exports: [SkyChevronComponent],\n})\nexport class SkyChevronModule {}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
1
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import {
|
|
2
|
+
import { NgModule } from '@angular/core';
|
|
4
3
|
import { SkyThemeModule } from '@skyux/theme';
|
|
4
|
+
import { SkyExpansionIndicatorComponent } from './expansion-indicator.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export class SkyExpansionIndicatorModule {
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expansion-indicator.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/expansion-indicator/expansion-indicator.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"expansion-indicator.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/expansion-indicator/expansion-indicator.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;;AAOjF,MAAM,OAAO,2BAA2B;;yHAA3B,2BAA2B;0HAA3B,2BAA2B,iBAJvB,8BAA8B,aACnC,YAAY,EAAE,cAAc,aAC5B,8BAA8B;0HAE7B,2BAA2B,YAH7B,CAAC,YAAY,EAAE,cAAc,CAAC;4FAG5B,2BAA2B;kBALvC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,8BAA8B,CAAC;oBAC9C,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;oBACvC,OAAO,EAAE,CAAC,8BAA8B,CAAC;iBAC1C","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SkyThemeModule } from '@skyux/theme';\n\nimport { SkyExpansionIndicatorComponent } from './expansion-indicator.component';\n\n@NgModule({\n declarations: [SkyExpansionIndicatorComponent],\n imports: [CommonModule, SkyThemeModule],\n exports: [SkyExpansionIndicatorComponent],\n})\nexport class SkyExpansionIndicatorModule {}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
1
|
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { NgModule } from '@angular/core';
|
|
3
3
|
import { SkyI18nModule } from '@skyux/i18n';
|
|
4
4
|
import { SkyThemeModule } from '@skyux/theme';
|
|
5
5
|
import { SkyIconModule } from '../icon/icon.module';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help-inline.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/help-inline/help-inline.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"help-inline.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/help-inline/help-inline.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AAEzF,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;;AAajE,MAAM,OAAO,mBAAmB;;iHAAnB,mBAAmB;kHAAnB,mBAAmB,iBAVf,sBAAsB,aAEnC,YAAY;QACZ,aAAa;QACb,aAAa;QACb,4BAA4B;QAC5B,cAAc,aAEN,sBAAsB;kHAErB,mBAAmB,YATrB;YACP,YAAY;YACZ,aAAa;YACb,aAAa;YACb,4BAA4B;YAC5B,cAAc;SACf;4FAGU,mBAAmB;kBAX/B,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE;wBACP,YAAY;wBACZ,aAAa;wBACb,aAAa;wBACb,4BAA4B;wBAC5B,cAAc;qBACf;oBACD,OAAO,EAAE,CAAC,sBAAsB,CAAC;iBAClC","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SkyI18nModule } from '@skyux/i18n';\nimport { SkyThemeModule } from '@skyux/theme';\n\nimport { SkyIconModule } from '../icon/icon.module';\nimport { SkyIndicatorsResourcesModule } from '../shared/sky-indicators-resources.module';\n\nimport { SkyHelpInlineComponent } from './help-inline.component';\n\n@NgModule({\n declarations: [SkyHelpInlineComponent],\n imports: [\n CommonModule,\n SkyI18nModule,\n SkyIconModule,\n SkyIndicatorsResourcesModule,\n SkyThemeModule,\n ],\n exports: [SkyHelpInlineComponent],\n})\nexport class SkyHelpInlineModule {}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-class-list.pipe.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/icon/icon-class-list.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;;;
|
|
1
|
+
{"version":3,"file":"icon-class-list.pipe.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/icon/icon-class-list.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;;;AAGjE;;GAEG;AAIH,MAAM,OAAO,oBAAoB;IAC/B,YAAoB,QAAgC;QAAhC,aAAQ,GAAR,QAAQ,CAAwB;IAAG,CAAC;IAEjD,SAAS,CACd,IAAY,EACZ,QAAiB,EACjB,IAAa,EACb,UAAoB,EACpB,OAA4B;QAE5B,IAAI,SAAmB,CAAC;QAExB,IAAI,QAAQ,KAAK,OAAO,EAAE;YACxB,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAC9D,SAAS,GAAG,CAAC,QAAQ,GAAG,YAAY,CAAC,CAAC;SACvC;aAAM;YACL,SAAS,GAAG,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,CAAC,CAAC;SAClC;QAED,IAAI,IAAI,EAAE;YACR,SAAS,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;SAC9B;QAED,IAAI,UAAU,EAAE;YACd,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACzB;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;;kHA5BU,oBAAoB;gHAApB,oBAAoB;4FAApB,oBAAoB;kBAHhC,IAAI;mBAAC;oBACJ,IAAI,EAAE,kBAAkB;iBACzB","sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\nimport { SkyIconResolverService } from './icon-resolver.service';\nimport { SkyIconVariantType } from './types/icon-variant-type';\n\n/**\n * @internal\n */\n@Pipe({\n name: 'skyIconClassList',\n})\nexport class SkyIconClassListPipe implements PipeTransform {\n constructor(private resolver: SkyIconResolverService) {}\n\n public transform(\n icon: string,\n iconType?: string,\n size?: string,\n fixedWidth?: boolean,\n variant?: SkyIconVariantType\n ): string[] {\n let classList: string[];\n\n if (iconType === 'skyux') {\n const resolvedIcon = this.resolver.resolveIcon(icon, variant);\n classList = ['sky-i-' + resolvedIcon];\n } else {\n classList = ['fa', 'fa-' + icon];\n }\n\n if (size) {\n classList.push('fa-' + size);\n }\n\n if (fixedWidth) {\n classList.push('fa-fw');\n }\n\n return classList;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-resolver.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/icon/icon-resolver.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"icon-resolver.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/icon/icon-resolver.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAEL,2BAA2B,GAC5B,MAAM,cAAc,CAAC;;;AAItB;;GAEG;AAIH,MAAM,OAAO,sBAAsB;IAGjC,YAAY,WAAwC;QAF5C,aAAQ,GAAG,IAAI,GAAG,EAAqC,CAAC;QAG9D,mDAAmD;QACnD,KAAK,MAAM,KAAK,IAAI,WAAW,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE;YACpD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;SACtC;IACH,CAAC;IAEM,WAAW,CAAC,QAAgB,EAAE,OAA4B;QAC/D,MAAM,eAAe,GAAG,OAAO,IAAI,GAAG,QAAQ,IAAI,OAAO,EAAE,CAAC;QAE5D,IAAI,eAAe,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE;YACzD,iDAAiD;YACjD,OAAO,eAAe,CAAC;SACxB;QAED,IAAI,OAAO,KAAK,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;YACtD,8EAA8E;YAC9E,4EAA4E;YAC5E,MAAM,YAAY,GAAG,GAAG,QAAQ,OAAO,CAAC;YAExC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE;gBACnC,OAAO,YAAY,CAAC;aACrB;SACF;QAED,oCAAoC;QACpC,OAAO,QAAQ,CAAC;IAClB,CAAC;;oHA9BU,sBAAsB;wHAAtB,sBAAsB,cAFrB,MAAM;4FAEP,sBAAsB;kBAHlC,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB","sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n SkyThemeIconManifestGlyph,\n SkyThemeIconManifestService,\n} from '@skyux/theme';\n\nimport { SkyIconVariantType } from './types/icon-variant-type';\n\n/**\n * @internal\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SkyIconResolverService {\n private glyphMap = new Map<string, SkyThemeIconManifestGlyph>();\n\n constructor(manifestSvc: SkyThemeIconManifestService) {\n // Map the icons by name for more efficient lookup.\n for (const glyph of manifestSvc.getManifest().glyphs) {\n this.glyphMap.set(glyph.name, glyph);\n }\n }\n\n public resolveIcon(iconName: string, variant?: SkyIconVariantType): string {\n const variantIconName = variant && `${iconName}-${variant}`;\n\n if (variantIconName && this.glyphMap.has(variantIconName)) {\n // A variant was specified and exists; return it.\n return variantIconName;\n }\n\n if (variant !== 'line' && !this.glyphMap.has(iconName)) {\n // Either the solid variant was specified and doesn't exist, or no variant was\n // specified and a non-variant doesn't exist; fall back to the line variant.\n const lineIconName = `${iconName}-line`;\n\n if (this.glyphMap.has(lineIconName)) {\n return lineIconName;\n }\n }\n\n // Fall back to the icon name as-is.\n return iconName;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/icon/icon.component.ts","../../../../../../../../libs/components/indicators/src/lib/modules/icon/icon.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"icon.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/icon/icon.component.ts","../../../../../../../../libs/components/indicators/src/lib/modules/icon/icon.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;;;;AAW1E,MAAM,OAAO,gBAAgB;IAN7B;QAgBE;;;;;WAKG;QAEI,aAAQ,GAAgB,IAAI,CAAC;KAqBrC;;8GAtCY,gBAAgB;kGAAhB,gBAAgB,4JCX7B,0JAOA;4FDIa,gBAAgB;kBAN5B,SAAS;mBAAC;oBACT,QAAQ,EAAE,UAAU;oBACpB,WAAW,EAAE,uBAAuB;oBACpC,SAAS,EAAE,CAAC,uBAAuB,CAAC;oBACpC,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;8BASQ,IAAI;sBADV,KAAK;gBAUC,QAAQ;sBADd,KAAK;gBAQC,IAAI;sBADV,KAAK;gBAOC,UAAU;sBADhB,KAAK;gBAQC,OAAO;sBADb,KAAK","sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { SkyIconType } from './types/icon-type';\nimport { SkyIconVariantType } from './types/icon-variant-type';\n\n@Component({\n selector: 'sky-icon',\n templateUrl: './icon.component.html',\n styleUrls: ['./icon.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SkyIconComponent {\n /**\n * Specifies the name of\n * [the Font Awesome 4.7 icon](https://fontawesome.com/v4.7/icons/) to\n * display. Do not specify the `fa fa-` classes.\n * @required\n */\n @Input()\n public icon: string;\n\n /**\n * Specifies the type of icon to display. Specifying `\"fa\"` will display a Font Awesome icon,\n * while specifying `\"skyux\"` will display an icon from the custom SKY UX icon font. Note that\n * the custom SKY UX icon font is currently in beta.\n * @default \"fa\"\n */\n @Input()\n public iconType: SkyIconType = 'fa';\n\n /**\n * Specifies the size of the icon using\n * [Font Awesome sizes](https://fontawesome.com/how-to-use/on-the-web/styling/sizing-icons).\n */\n @Input()\n public size: string;\n\n /**\n * Indicates whether the icon has a fixed width.\n */\n @Input()\n public fixedWidth: boolean;\n\n /**\n * Specifies the icon variant (`\"line\"` or `\"solid\"`). If the variant doesn't exist for the\n * specified icon, the normal icon is displayed.\n */\n @Input()\n public variant: SkyIconVariantType;\n}\n","<i\n *ngIf=\"icon\"\n aria-hidden=\"true\"\n class=\"sky-icon\"\n [ngClass]=\"icon | skyIconClassList: iconType:size:fixedWidth:variant\"\n>\n</i>\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
1
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import {
|
|
4
|
-
import { SkyIconStackComponent } from './icon-stack.component';
|
|
5
|
-
import { SkyIconClassListPipe } from './icon-class-list.pipe';
|
|
2
|
+
import { NgModule } from '@angular/core';
|
|
6
3
|
import { SkyThemeIconManifestModule } from '@skyux/theme';
|
|
4
|
+
import { SkyIconClassListPipe } from './icon-class-list.pipe';
|
|
5
|
+
import { SkyIconStackComponent } from './icon-stack.component';
|
|
6
|
+
import { SkyIconComponent } from './icon.component';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export class SkyIconModule {
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/icon/icon.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"icon.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/icon/icon.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;;AAOpD,MAAM,OAAO,aAAa;;2GAAb,aAAa;4GAAb,aAAa,iBAJT,oBAAoB,EAAE,gBAAgB,EAAE,qBAAqB,aAClE,YAAY,EAAE,0BAA0B,aACxC,gBAAgB,EAAE,qBAAqB;4GAEtC,aAAa,YAHf,CAAC,YAAY,EAAE,0BAA0B,CAAC;4FAGxC,aAAa;kBALzB,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,oBAAoB,EAAE,gBAAgB,EAAE,qBAAqB,CAAC;oBAC7E,OAAO,EAAE,CAAC,YAAY,EAAE,0BAA0B,CAAC;oBACnD,OAAO,EAAE,CAAC,gBAAgB,EAAE,qBAAqB,CAAC;iBACnD","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SkyThemeIconManifestModule } from '@skyux/theme';\n\nimport { SkyIconClassListPipe } from './icon-class-list.pipe';\nimport { SkyIconStackComponent } from './icon-stack.component';\nimport { SkyIconComponent } from './icon.component';\n\n@NgModule({\n declarations: [SkyIconClassListPipe, SkyIconComponent, SkyIconStackComponent],\n imports: [CommonModule, SkyThemeIconManifestModule],\n exports: [SkyIconComponent, SkyIconStackComponent],\n})\nexport class SkyIconModule {}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
1
|
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { NgModule } from '@angular/core';
|
|
3
3
|
import { SkyKeyInfoLabelComponent } from './key-info-label.component';
|
|
4
4
|
import { SkyKeyInfoValueComponent } from './key-info-value.component';
|
|
5
5
|
import { SkyKeyInfoComponent } from './key-info.component';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key-info.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/key-info/key-info.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"key-info.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/key-info/key-info.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;;AAe3D,MAAM,OAAO,gBAAgB;;8GAAhB,gBAAgB;+GAAhB,gBAAgB,iBAXzB,mBAAmB;QACnB,wBAAwB;QACxB,wBAAwB,aAEhB,YAAY,aAEpB,mBAAmB;QACnB,wBAAwB;QACxB,wBAAwB;+GAGf,gBAAgB,YAPlB,CAAC,YAAY,CAAC;4FAOZ,gBAAgB;kBAb5B,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,mBAAmB;wBACnB,wBAAwB;wBACxB,wBAAwB;qBACzB;oBACD,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE;wBACP,mBAAmB;wBACnB,wBAAwB;wBACxB,wBAAwB;qBACzB;iBACF","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { SkyKeyInfoLabelComponent } from './key-info-label.component';\nimport { SkyKeyInfoValueComponent } from './key-info-value.component';\nimport { SkyKeyInfoComponent } from './key-info.component';\n\n@NgModule({\n declarations: [\n SkyKeyInfoComponent,\n SkyKeyInfoLabelComponent,\n SkyKeyInfoValueComponent,\n ],\n imports: [CommonModule],\n exports: [\n SkyKeyInfoComponent,\n SkyKeyInfoLabelComponent,\n SkyKeyInfoValueComponent,\n ],\n})\nexport class SkyKeyInfoModule {}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/label/label.component.ts","../../../../../../../../libs/components/indicators/src/lib/modules/label/label.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"label.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/label/label.component.ts","../../../../../../../../libs/components/indicators/src/lib/modules/label/label.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;;;;;AAS3E,MAAM,OAAO,iBAAiB;IAC5B;;;OAGG;IACH,IACW,SAAS,CAAC,KAAmB;QACtC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAED,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC;IACnC,CAAC;IAUO,UAAU;QAChB,MAAM,aAAa,GAAG,uBAAuB,CAAC,eAAe,CAC3D,IAAI,CAAC,SAAS,CACf,CAAC;QAEF,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC,gBAAgB,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,aAAa,CAAC,mBAAmB,CAAC;QAClD,IAAI,CAAC,OAAO,GAAG,aAAa,CAAC,kBAAkB,CAAC;IAClD,CAAC;;+GA/BU,iBAAiB;mGAAjB,iBAAiB,qFCZ9B,oaAYA;4FDAa,iBAAiB;kBAL7B,SAAS;mBAAC;oBACT,QAAQ,EAAE,WAAW;oBACrB,WAAW,EAAE,wBAAwB;oBACrC,SAAS,EAAE,CAAC,wBAAwB,CAAC;iBACtC;8BAOY,SAAS;sBADnB,KAAK","sourcesContent":["import { Component, Input } from '@angular/core';\n\nimport { SkyIconStackItem } from '../icon/icon-stack-item';\nimport { SkyIndicatorIconUtility } from '../shared/indicator-icon-utility';\n\nimport { SkyLabelType } from './label-type';\n\n@Component({\n selector: 'sky-label',\n templateUrl: './label.component.html',\n styleUrls: ['./label.component.scss'],\n})\nexport class SkyLabelComponent {\n /**\n * The type of label to display.\n * @required\n */\n @Input()\n public set labelType(value: SkyLabelType) {\n this._labelType = value;\n this.updateIcon();\n }\n\n public get labelType(): SkyLabelType {\n return this._labelType || 'info';\n }\n\n public baseIcon: SkyIconStackItem;\n\n public icon: string;\n\n public topIcon: SkyIconStackItem;\n\n private _labelType: SkyLabelType;\n\n private updateIcon(): void {\n const indicatorIcon = SkyIndicatorIconUtility.getIconsForType(\n this.labelType\n );\n\n this.icon = indicatorIcon.defaultThemeIcon;\n this.baseIcon = indicatorIcon.modernThemeBaseIcon;\n this.topIcon = indicatorIcon.modernThemeTopIcon;\n }\n}\n","<span class=\"sky-label\" [ngClass]=\"'sky-label-' + labelType\">\n <span class=\"sky-label-icon-theme-default\">\n <sky-icon [icon]=\"icon\"></sky-icon>\n </span>\n <span class=\"sky-label-icon-theme-modern\">\n <sky-icon-stack size=\"xs\" [baseIcon]=\"baseIcon\" [topIcon]=\"topIcon\">\n </sky-icon-stack>\n </span>\n <span class=\"sky-label-text\">\n <ng-content></ng-content>\n </span>\n</span>\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
1
|
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { NgModule } from '@angular/core';
|
|
3
3
|
import { SkyIconModule } from '../icon/icon.module';
|
|
4
4
|
import { SkyLabelComponent } from './label.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/label/label.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"label.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/label/label.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;;AAOtD,MAAM,OAAO,cAAc;;4GAAd,cAAc;6GAAd,cAAc,iBAJV,iBAAiB,aACtB,YAAY,EAAE,aAAa,aAC3B,iBAAiB;6GAEhB,cAAc,YAHhB,CAAC,YAAY,EAAE,aAAa,CAAC;4FAG3B,cAAc;kBAL1B,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;oBACjC,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;oBACtC,OAAO,EAAE,CAAC,iBAAiB,CAAC;iBAC7B","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { SkyIconModule } from '../icon/icon.module';\n\nimport { SkyLabelComponent } from './label.component';\n\n@NgModule({\n declarations: [SkyLabelComponent],\n imports: [CommonModule, SkyIconModule],\n exports: [SkyLabelComponent],\n})\nexport class SkyLabelModule {}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indicator-icon-utility.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/shared/indicator-icon-utility.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"indicator-icon-utility.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/shared/indicator-icon-utility.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,OAAO,uBAAuB;IAC3B,MAAM,CAAC,eAAe,CAC3B,aAAmC;QAEnC,IAAI,IAAY,CAAC;QACjB,IAAI,QAAgB,CAAC;QACrB,IAAI,OAAe,CAAC;QAEpB,2CAA2C;QAC3C,QAAQ,aAAa,EAAE;YACrB,KAAK,QAAQ,CAAC;YACd,KAAK,SAAS;gBACZ,IAAI,GAAG,SAAS,CAAC;gBACjB,QAAQ,GAAG,gBAAgB,CAAC;gBAC5B,OAAO,GAAG,aAAa,CAAC;gBACxB,MAAM;YACR,KAAK,MAAM;gBACT,IAAI,GAAG,oBAAoB,CAAC;gBAC5B,QAAQ,GAAG,cAAc,CAAC;gBAC1B,OAAO,GAAG,QAAQ,CAAC;gBACnB,MAAM;YACR,KAAK,SAAS;gBACZ,IAAI,GAAG,OAAO,CAAC;gBACf,QAAQ,GAAG,cAAc,CAAC;gBAC1B,OAAO,GAAG,OAAO,CAAC;gBAClB,MAAM;SACT;QAED,OAAO;YACL,gBAAgB,EAAE,IAAI;YACtB,mBAAmB,EAAE;gBACnB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,OAAO;aAClB;YACD,kBAAkB,EAAE;gBAClB,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,OAAO;aAClB;SACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { SkyIndicatorIcon } from './indicator-icon';\nimport { SkyIndicatorIconType } from './indicator-icon-type';\n\n/**\n * @internl\n */\nexport class SkyIndicatorIconUtility {\n public static getIconsForType(\n indicatorType: SkyIndicatorIconType\n ): SkyIndicatorIcon {\n let icon: string;\n let baseIcon: string;\n let topIcon: string;\n\n // tslint:disable-next-line: switch-default\n switch (indicatorType) {\n case 'danger':\n case 'warning':\n icon = 'warning';\n baseIcon = 'triangle-solid';\n topIcon = 'exclamation';\n break;\n case 'info':\n icon = 'exclamation-circle';\n baseIcon = 'circle-solid';\n topIcon = 'help-i';\n break;\n case 'success':\n icon = 'check';\n baseIcon = 'circle-solid';\n topIcon = 'check';\n break;\n }\n\n return {\n defaultThemeIcon: icon,\n modernThemeBaseIcon: {\n icon: baseIcon,\n iconType: 'skyux',\n },\n modernThemeTopIcon: {\n icon: topIcon,\n iconType: 'skyux',\n },\n };\n }\n}\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* To update this file, simply rerun the command.
|
|
6
6
|
*/
|
|
7
7
|
import { NgModule } from '@angular/core';
|
|
8
|
-
import {
|
|
8
|
+
import { SKY_LIB_RESOURCES_PROVIDERS, SkyI18nModule, getLibStringForLocale, } from '@skyux/i18n';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
const RESOURCES = {
|
|
11
11
|
'EN-US': {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sky-indicators-resources.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/shared/sky-indicators-resources.module.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"sky-indicators-resources.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/shared/sky-indicators-resources.module.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,2BAA2B,EAE3B,aAAa,EAGb,qBAAqB,GACtB,MAAM,aAAa,CAAC;;AAErB,MAAM,SA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E!\n * The contents of this file were automatically generated by\n * the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-indicators' schematic.\n * To update this file, simply rerun the command.\n */\nimport { NgModule } from '@angular/core';\nimport {\n SKY_LIB_RESOURCES_PROVIDERS,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n getLibStringForLocale,\n} from '@skyux/i18n';\n\nconst RESOURCES: { [locale: string]: SkyLibResources } = {\n 'EN-US': {\n skyux_alert_close: { message: 'Close the alert' },\n skyux_help_inline_button_title: { message: 'Show help content' },\n skyux_status_indicator_sr_completed: { message: 'Completed:' },\n skyux_status_indicator_sr_error: { message: 'Error:' },\n skyux_status_indicator_sr_important_info: {\n message: 'Important information:',\n },\n skyux_status_indicator_sr_warning: { message: 'Warning:' },\n skyux_tokens_dismiss_button_title: { message: 'Remove item' },\n skyux_wait_aria_alt_text: { message: 'Loading.' },\n skyux_wait_blocking_aria_alt_text: { message: 'Loading. Please wait.' },\n skyux_wait_page_aria_alt_text: { message: 'Page loading.' },\n skyux_wait_page_blocking_aria_alt_text: {\n message: 'Page loading. Please wait.',\n },\n },\n};\n\nexport class SkyIndicatorsResourcesProvider implements SkyLibResourcesProvider {\n public getString(localeInfo: SkyAppLocaleInfo, name: string): string {\n return getLibStringForLocale(RESOURCES, localeInfo.locale, name);\n }\n}\n\n/**\n * Import into any component library module that needs to use resource strings.\n */\n@NgModule({\n exports: [SkyI18nModule],\n providers: [\n {\n provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyIndicatorsResourcesProvider,\n multi: true,\n },\n ],\n})\nexport class SkyIndicatorsResourcesModule {}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-indicator.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/status-indicator/status-indicator.component.ts","../../../../../../../../libs/components/indicators/src/lib/modules/status-indicator/status-indicator.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,KAAK,GACN,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"status-indicator.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/status-indicator/status-indicator.component.ts","../../../../../../../../libs/components/indicators/src/lib/modules/status-indicator/status-indicator.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAKrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;;;;;;AAE3E,MAAM,sBAAsB,GAAyB,SAAS,CAAC;AAQ/D,MAAM,OAAO,2BAA2B;IA4DtC,YACU,cAAiC,EACjC,SAAiC;QADjC,mBAAc,GAAd,cAAc,CAAmB;QACjC,cAAS,GAAT,SAAS,CAAwB;IACxC,CAAC;IA9DJ;;;;OAIG;IACH,IACW,aAAa,CAAC,KAA2B;QAClD,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAC5B,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAED,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,cAAc,IAAI,sBAAsB,CAAC;IACvD,CAAC;IAED;;;;;OAKG;IACH,IACW,eAAe,CAAC,KAAkC;QAC3D,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;QAC9B,IAAI,CAAC,yBAAyB,EAAE,CAAC;IACnC,CAAC;IAED,IAAW,eAAe;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACH,IACW,iBAAiB,CAAC,KAAa;QACxC,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QAChC,IAAI,CAAC,yBAAyB,EAAE,CAAC;IACnC,CAAC;IAED,IAAW,iBAAiB;QAC1B,OAAO,IAAI,CAAC,kBAAkB,CA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AiB;sBAD3B,KAAK","sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Input,\n} from '@angular/core';\nimport { SkyLibResourcesService } from '@skyux/i18n';\n\nimport { SkyIconStackItem } from '../icon/icon-stack-item';\nimport { SkyIndicatorDescriptionType } from '../shared/indicator-description-type';\nimport { SkyIndicatorIconType } from '../shared/indicator-icon-type';\nimport { SkyIndicatorIconUtility } from '../shared/indicator-icon-utility';\n\nconst INDICATOR_TYPE_DEFAULT: SkyIndicatorIconType = 'warning';\n\n@Component({\n selector: 'sky-status-indicator',\n templateUrl: './status-indicator.component.html',\n styleUrls: ['./status-indicator.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SkyStatusIndicatorComponent {\n /**\n * Specifies a style for the status indicator to determine the icon.\n * The valid options are `danger`, `info`, `success`, and `warning`.\n * @default \"warning\"\n */\n @Input()\n public set indicatorType(value: SkyIndicatorIconType) {\n this._indicatorType = value;\n this.updateIcon();\n }\n\n public get indicatorType(): SkyIndicatorIconType {\n return this._indicatorType || INDICATOR_TYPE_DEFAULT;\n }\n\n /**\n * Specifies the predefined text to be read by screen readers for users\n * who cannot see the indicator icon. The valid options are `none`, `custom`,\n * `error`, `warning`, `completed`, and `important-info`.\n * @required\n */\n @Input()\n public set descriptionType(value: SkyIndicatorDescriptionType) {\n this._descriptionType = value;\n this.updateDescriptionComputed();\n }\n\n public get descriptionType(): SkyIndicatorDescriptionType {\n return this._descriptionType;\n }\n\n /**\n * Specifies the text to be read by screen readers for users who cannot see\n * the indicator icon when `descriptionType` is `custom`.\n */\n @Input()\n public set customDescription(value: string) {\n this._customDescription = value;\n this.updateDescriptionComputed();\n }\n\n public get customDescription(): string {\n return this._customDescription;\n }\n\n public descriptionComputed: string;\n\n public baseIcon: SkyIconStackItem;\n\n public icon: string;\n\n public topIcon: SkyIconStackItem;\n\n private _indicatorType: SkyIndicatorIconType;\n\n private _descriptionType: SkyIndicatorDescriptionType;\n\n private _customDescription: string;\n\n constructor(\n private changeDetector: ChangeDetectorRef,\n private resources: SkyLibResourcesService\n ) {}\n\n private updateIcon(): void {\n const indicatorIcon = SkyIndicatorIconUtility.getIconsForType(\n this.indicatorType\n );\n\n this.icon = indicatorIcon.defaultThemeIcon;\n this.baseIcon = indicatorIcon.modernThemeBaseIcon;\n this.topIcon = indicatorIcon.modernThemeTopIcon;\n }\n\n private updateDescriptionComputed(): void {\n if (this.descriptionType) {\n switch (this.descriptionType) {\n case 'none':\n this.descriptionComputed = '';\n break;\n case 'custom':\n this.descriptionComputed = this.customDescription;\n break;\n default:\n this.resources\n .getString(\n 'skyux_status_indicator_sr_' +\n this.descriptionType.replace(/-/g, '_')\n )\n .subscribe((value) => {\n this.descriptionComputed = value;\n this.changeDetector.markForCheck();\n });\n\n break;\n }\n } else {\n this.descriptionComputed = undefined;\n }\n }\n}\n","<div *ngIf=\"descriptionType\" class=\"sky-status-indicator\">\n <div\n aria-hidden=\"true\"\n class=\"sky-margin-inline-xs sky-status-indicator-icon\"\n [ngClass]=\"'sky-status-indicator-icon-' + indicatorType\"\n >\n <span class=\"sky-status-indicator-icon-default\">\n <sky-icon [icon]=\"icon\"></sky-icon>\n </span>\n <span class=\"sky-status-indicator-icon-modern\">\n <sky-icon-stack size=\"xs\" [baseIcon]=\"baseIcon\" [topIcon]=\"topIcon\">\n </sky-icon-stack>\n </span>\n </div>\n <div class=\"sky-status-indicator-message-wrapper\">\n <span *ngIf=\"descriptionComputed\" class=\"sky-screen-reader-only\">\n {{ descriptionComputed }}\n </span>\n <span class=\"sky-status-indicator-message\">\n <ng-content></ng-content>\n </span>\n </div>\n</div>\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
1
|
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { NgModule } from '@angular/core';
|
|
3
3
|
import { SkyI18nModule } from '@skyux/i18n';
|
|
4
|
-
import { SkyIndicatorsResourcesModule } from '../shared/sky-indicators-resources.module';
|
|
5
4
|
import { SkyIconModule } from '../icon/icon.module';
|
|
5
|
+
import { SkyIndicatorsResourcesModule } from '../shared/sky-indicators-resources.module';
|
|
6
6
|
import { SkyStatusIndicatorComponent } from './status-indicator.component';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export class SkyStatusIndicatorModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-indicator.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/status-indicator/status-indicator.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"status-indicator.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/status-indicator/status-indicator.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AAEzF,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;;AAY3E,MAAM,OAAO,wBAAwB;;sHAAxB,wBAAwB;uHAAxB,wBAAwB,iBATpB,2BAA2B,aAExC,YAAY;QACZ,aAAa;QACb,aAAa;QACb,4BAA4B,aAEpB,2BAA2B;uHAE1B,wBAAwB,YAR1B;YACP,YAAY;YACZ,aAAa;YACb,aAAa;YACb,4BAA4B;SAC7B;4FAGU,wBAAwB;kBAVpC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,2BAA2B,CAAC;oBAC3C,OAAO,EAAE;wBACP,YAAY;wBACZ,aAAa;wBACb,aAAa;wBACb,4BAA4B;qBAC7B;oBACD,OAAO,EAAE,CAAC,2BAA2B,CAAC;iBACvC","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SkyI18nModule } from '@skyux/i18n';\n\nimport { SkyIconModule } from '../icon/icon.module';\nimport { SkyIndicatorsResourcesModule } from '../shared/sky-indicators-resources.module';\n\nimport { SkyStatusIndicatorComponent } from './status-indicator.component';\n\n@NgModule({\n declarations: [SkyStatusIndicatorComponent],\n imports: [\n CommonModule,\n SkyI18nModule,\n SkyIconModule,\n SkyIndicatorsResourcesModule,\n ],\n exports: [SkyStatusIndicatorComponent],\n})\nexport class SkyStatusIndicatorModule {}\n"]}
|
|
@@ -35,61 +35,8 @@ export class SkyTextHighlightDirective {
|
|
|
35
35
|
this._skyHighlight = [value];
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
ngOnChanges(changes) {
|
|
39
|
-
if (changes.skyHighlight && !changes.skyHighlight.firstChange) {
|
|
40
|
-
this.highlight();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
ngAfterViewInit() {
|
|
44
|
-
const self = this;
|
|
45
|
-
this.observer = this.observerService.create((mutations) => {
|
|
46
|
-
self.highlight();
|
|
47
|
-
});
|
|
48
|
-
this.observeDom();
|
|
49
|
-
if (this._skyHighlight && this._skyHighlight.length > 0) {
|
|
50
|
-
this.highlight();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
ngOnDestroy() {
|
|
54
|
-
/* istanbul ignore else */
|
|
55
|
-
if (this.observer) {
|
|
56
|
-
this.observer.disconnect();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
readyForHighlight(searchText) {
|
|
60
|
-
return searchText && searchText.length > 0 && this.el.nativeElement;
|
|
61
|
-
}
|
|
62
|
-
highlight() {
|
|
63
|
-
/* istanbul ignore else */
|
|
64
|
-
if (this.observer) {
|
|
65
|
-
this.observer.disconnect();
|
|
66
|
-
}
|
|
67
|
-
const searchText = this._skyHighlight;
|
|
68
|
-
if (this.existingHighlight) {
|
|
69
|
-
SkyTextHighlightDirective.removeHighlight(this.el);
|
|
70
|
-
}
|
|
71
|
-
/* istanbul ignore else */
|
|
72
|
-
if (this.readyForHighlight(searchText)) {
|
|
73
|
-
const node = this.el.nativeElement;
|
|
74
|
-
// mark all matched text in the DOM
|
|
75
|
-
SkyTextHighlightDirective.markTextNodes(node, searchText);
|
|
76
|
-
this.existingHighlight = true;
|
|
77
|
-
}
|
|
78
|
-
this.observeDom();
|
|
79
|
-
}
|
|
80
|
-
observeDom() {
|
|
81
|
-
/* istanbul ignore else */
|
|
82
|
-
if (this.observer) {
|
|
83
|
-
const config = {
|
|
84
|
-
attributes: false,
|
|
85
|
-
childList: true,
|
|
86
|
-
characterData: true,
|
|
87
|
-
};
|
|
88
|
-
this.observer.observe(this.el.nativeElement, config);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
38
|
static cleanRegex(regex) {
|
|
92
|
-
return regex.replace(/[
|
|
39
|
+
return regex.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&');
|
|
93
40
|
}
|
|
94
41
|
static markNode(node, searchTerms) {
|
|
95
42
|
/* istanbul ignore else */
|
|
@@ -140,6 +87,58 @@ export class SkyTextHighlightDirective {
|
|
|
140
87
|
}
|
|
141
88
|
}
|
|
142
89
|
}
|
|
90
|
+
ngOnChanges(changes) {
|
|
91
|
+
if (changes.skyHighlight && !changes.skyHighlight.firstChange) {
|
|
92
|
+
this.highlight();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
ngAfterViewInit() {
|
|
96
|
+
this.observer = this.observerService.create(() => {
|
|
97
|
+
this.highlight();
|
|
98
|
+
});
|
|
99
|
+
this.observeDom();
|
|
100
|
+
if (this._skyHighlight && this._skyHighlight.length > 0) {
|
|
101
|
+
this.highlight();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
ngOnDestroy() {
|
|
105
|
+
/* istanbul ignore else */
|
|
106
|
+
if (this.observer) {
|
|
107
|
+
this.observer.disconnect();
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
readyForHighlight(searchText) {
|
|
111
|
+
return searchText && searchText.length > 0 && this.el.nativeElement;
|
|
112
|
+
}
|
|
113
|
+
highlight() {
|
|
114
|
+
/* istanbul ignore else */
|
|
115
|
+
if (this.observer) {
|
|
116
|
+
this.observer.disconnect();
|
|
117
|
+
}
|
|
118
|
+
const searchText = this._skyHighlight;
|
|
119
|
+
if (this.existingHighlight) {
|
|
120
|
+
SkyTextHighlightDirective.removeHighlight(this.el);
|
|
121
|
+
}
|
|
122
|
+
/* istanbul ignore else */
|
|
123
|
+
if (this.readyForHighlight(searchText)) {
|
|
124
|
+
const node = this.el.nativeElement;
|
|
125
|
+
// mark all matched text in the DOM
|
|
126
|
+
SkyTextHighlightDirective.markTextNodes(node, searchText);
|
|
127
|
+
this.existingHighlight = true;
|
|
128
|
+
}
|
|
129
|
+
this.observeDom();
|
|
130
|
+
}
|
|
131
|
+
observeDom() {
|
|
132
|
+
/* istanbul ignore else */
|
|
133
|
+
if (this.observer) {
|
|
134
|
+
const config = {
|
|
135
|
+
attributes: false,
|
|
136
|
+
childList: true,
|
|
137
|
+
characterData: true,
|
|
138
|
+
};
|
|
139
|
+
this.observer.observe(this.el.nativeElement, config);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
143
142
|
}
|
|
144
143
|
SkyTextHighlightDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyTextHighlightDirective, deps: [{ token: i0.ElementRef }, { token: i1.MutationObserverService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
145
144
|
SkyTextHighlightDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: SkyTextHighlightDirective, selector: "[skyHighlight]", inputs: { skyHighlight: "skyHighlight" }, usesOnChanges: true, ngImport: i0 });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-highlight.directive.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/text-highlight/text-highlight.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EACT,UAAU,EACV,KAAK,GAIN,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"text-highlight.directive.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/text-highlight/text-highlight.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EACT,UAAU,EACV,KAAK,GAIN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;;;AAEtD,MAAM,SAAS,GAAG,oBAAoB,CAAC;AAEvC,qEAAqE;AACrE,2DAA2D;AAC3D,WAAW;AACX;;;;GAIG;AAIH,MAAM,OAAO,yBAAyB;IA6BpC,YACU,EAAc,EACd,eAAwC;QADxC,OAAE,GAAF,EAAE,CAAY;QACd,oBAAe,GAAf,eAAe,CAAyB;QAR1C,sBAAiB,GAAG,KAAK,CAAC;IAS/B,CAAC;IA7BJ;;OAEG;IACH,IACW,YAAY,CAAC,KAAwB;QAC9C,KAAK,GAAG,KAAK,IAAI,EAAE,CAAC;QACpB,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;QAExB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACxB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YACpD,+EAA+E;YAC/E,4CAA4C;YAC5C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;gBACpC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;YAC7B,CAAC,CAAC,CAAC;SACJ;aAAM;YACL,IAAI,CAAC,aAAa,GAAG,CAAC,KAAe,CAAC,CAAC;SACxC;IACH,CAAC;IAaO,MAAM,CAAC,UAAU,CAAC,KAAa;QACrC,OAAO,KAAK,CAAC,OAA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BACjB,SAAS,EAAE,IAAI;gBACf,aAAa,EAAE,IAAI;aACpB,CAAC;YACF,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;SACtD;IACH,CAAC;;uHAlKU,yBAAyB;2GAAzB,yBAAyB;4FAAzB,yBAAyB;kBAHrC,SAAS;mBAAC;oBACT,QAAQ,EAAE,gBAAgB;iBAC3B;uIAQY,YAAY;sBADtB,KAAK","sourcesContent":["import {\n AfterViewInit,\n Directive,\n ElementRef,\n Input,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n} from '@angular/core';\nimport { MutationObserverService } from '@skyux/core';\n\nconst className = 'sky-highlight-mark';\n\n// Need to add the following to classes which contain static methods.\n// See: https://github.com/ng-packagr/ng-packagr/issues/641\n// @dynamic\n/**\n * Highlights all matching text within DOM elements that it is placed on.\n * The directive is only valid for elements that contain content, so you\n * cannot place it on `ng-template`, `ng-content`, or `ng-container` tags.\n */\n@Directive({\n selector: '[skyHighlight]',\n})\nexport class SkyTextHighlightDirective\n implements OnChanges, AfterViewInit, OnDestroy\n{\n /**\n * Specifies the text to highlight.\n */\n @Input()\n public set skyHighlight(value: string | string[]) {\n value = value || [];\n this._skyHighlight = [];\n\n if (Array.isArray(value)) {\n this._skyHighlight = value.filter((item) => !!item);\n // Reorder strings by their length in descending order to avoid missing matches\n // that contain substrings of other matches.\n this._skyHighlight.sort(function (a, b) {\n return b.length - a.length;\n });\n } else {\n this._skyHighlight = [value as string];\n }\n }\n\n private existingHighlight = false;\n\n private observer: MutationObserver;\n\n private _skyHighlight: string[];\n\n constructor(\n private el: ElementRef,\n private observerService: MutationObserverService\n ) {}\n\n private static cleanRegex(regex: string): string {\n return regex.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n private static markNode(node: any, searchTerms: string[]): number {\n /* istanbul ignore else */\n if (searchTerms) {\n const text = node.nodeValue;\n for (let i = 0; i < searchTerms.length; i++) {\n searchTerms[i] = this.cleanRegex(searchTerms[i]);\n }\n const searchRegex = new RegExp(searchTerms.join('|'), 'gi');\n const match = searchRegex.exec(text);\n if (match) {\n // Split apart text node with mark tags in the middle on the search term.\n const matchIndex = match.index;\n\n const middle = node.splitText(matchIndex);\n middle.splitText(searchRegex.lastIndex - matchIndex);\n const middleClone = middle.cloneNode(true);\n\n const markNode = document.createElement('mark');\n markNode.className = className;\n markNode.appendChild(middleClone);\n middle.parentNode.replaceChild(markNode, middle);\n\n return 1;\n }\n }\n return 0;\n }\n\n private static markTextNodes(\n node: HTMLElement,\n searchTerms: string[]\n ): number {\n if (node.nodeType === 3) {\n return SkyTextHighlightDirective.markNode(node, searchTerms);\n } else if (node.nodeType === 1 && node.childNodes) {\n for (let i = 0; i < node.childNodes.length; i++) {\n const childNode = node.childNodes[i] as HTMLElement;\n i += SkyTextHighlightDirective.markTextNodes(childNode, searchTerms);\n }\n }\n\n return 0;\n }\n\n private static removeHighlight(el: ElementRef): void {\n const matchedElements = el.nativeElement.querySelectorAll(\n `mark.${className}`\n ) as NodeList;\n\n /* istanbul ignore else */\n /* sanity check */\n if (matchedElements) {\n for (let i = 0; i < matchedElements.length; i++) {\n const node = matchedElements[i];\n const parentNode = node.parentNode;\n\n parentNode.replaceChild(node.firstChild, node);\n parentNode.normalize();\n }\n }\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.skyHighlight && !changes.skyHighlight.firstChange) {\n this.highlight();\n }\n }\n\n public ngAfterViewInit(): void {\n this.observer = this.observerService.create(() => {\n this.highlight();\n });\n\n this.observeDom();\n if (this._skyHighlight && this._skyHighlight.length > 0) {\n this.highlight();\n }\n }\n\n public ngOnDestroy(): void {\n /* istanbul ignore else */\n if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n private readyForHighlight(searchText: string[]): boolean {\n return searchText && searchText.length > 0 && this.el.nativeElement;\n }\n\n private highlight(): void {\n /* istanbul ignore else */\n if (this.observer) {\n this.observer.disconnect();\n }\n\n const searchText = this._skyHighlight;\n\n if (this.existingHighlight) {\n SkyTextHighlightDirective.removeHighlight(this.el);\n }\n\n /* istanbul ignore else */\n if (this.readyForHighlight(searchText)) {\n const node: HTMLElement = this.el.nativeElement;\n\n // mark all matched text in the DOM\n SkyTextHighlightDirective.markTextNodes(node, searchText);\n this.existingHighlight = true;\n }\n\n this.observeDom();\n }\n\n private observeDom(): void {\n /* istanbul ignore else */\n if (this.observer) {\n const config = {\n attributes: false,\n childList: true,\n characterData: true,\n };\n this.observer.observe(this.el.nativeElement, config);\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-highlight.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/text-highlight/text-highlight.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"text-highlight.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/indicators/src/lib/modules/text-highlight/text-highlight.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;;AAOvE,MAAM,OAAO,sBAAsB;;oHAAtB,sBAAsB;qHAAtB,sBAAsB,iBAJlB,yBAAyB,aAC9B,yBAAyB;qHAGxB,sBAAsB,aAFtB,CAAC,uBAAuB,CAAC;4FAEzB,sBAAsB;kBALlC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,yBAAyB,CAAC;oBACzC,OAAO,EAAE,CAAC,yBAAyB,CAAC;oBACpC,SAAS,EAAE,CAAC,uBAAuB,CAAC;iBACrC","sourcesContent":["import { NgModule } from '@angular/core';\nimport { MutationObserverService } from '@skyux/core';\n\nimport { SkyTextHighlightDirective } from './text-highlight.directive';\n\n@NgModule({\n declarations: [SkyTextHighlightDirective],\n exports: [SkyTextHighlightDirective],\n providers: [MutationObserverService],\n})\nexport class SkyTextHighlightModule {}\n"]}
|