@skyux/indicators 5.6.0 → 5.7.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/bundles/skyux-indicators.umd.js +55 -55
- package/documentation.json +16 -428
- 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/text-highlight/text-highlight.directive.js +53 -54
- package/esm2015/lib/modules/text-highlight/text-highlight.directive.js.map +1 -1
- package/fesm2015/skyux-indicators.js +54 -55
- package/fesm2015/skyux-indicators.js.map +1 -1
- package/lib/modules/shared/sky-indicators-resources.module.d.ts +1 -1
- package/lib/modules/text-highlight/text-highlight.directive.d.ts +4 -4
- package/package.json +14 -11
|
@@ -507,7 +507,7 @@
|
|
|
507
507
|
/**
|
|
508
508
|
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
509
509
|
* The contents of this file were automatically generated by
|
|
510
|
-
* the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-indicators' schematic.
|
|
510
|
+
* the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-indicators' schematic.
|
|
511
511
|
* To update this file, simply rerun the command.
|
|
512
512
|
*/
|
|
513
513
|
var RESOURCES = {
|
|
@@ -1233,61 +1233,8 @@
|
|
|
1233
1233
|
enumerable: false,
|
|
1234
1234
|
configurable: true
|
|
1235
1235
|
});
|
|
1236
|
-
SkyTextHighlightDirective.prototype.ngOnChanges = function (changes) {
|
|
1237
|
-
if (changes.skyHighlight && !changes.skyHighlight.firstChange) {
|
|
1238
|
-
this.highlight();
|
|
1239
|
-
}
|
|
1240
|
-
};
|
|
1241
|
-
SkyTextHighlightDirective.prototype.ngAfterViewInit = function () {
|
|
1242
|
-
var self = this;
|
|
1243
|
-
this.observer = this.observerService.create(function (mutations) {
|
|
1244
|
-
self.highlight();
|
|
1245
|
-
});
|
|
1246
|
-
this.observeDom();
|
|
1247
|
-
if (this._skyHighlight && this._skyHighlight.length > 0) {
|
|
1248
|
-
this.highlight();
|
|
1249
|
-
}
|
|
1250
|
-
};
|
|
1251
|
-
SkyTextHighlightDirective.prototype.ngOnDestroy = function () {
|
|
1252
|
-
/* istanbul ignore else */
|
|
1253
|
-
if (this.observer) {
|
|
1254
|
-
this.observer.disconnect();
|
|
1255
|
-
}
|
|
1256
|
-
};
|
|
1257
|
-
SkyTextHighlightDirective.prototype.readyForHighlight = function (searchText) {
|
|
1258
|
-
return searchText && searchText.length > 0 && this.el.nativeElement;
|
|
1259
|
-
};
|
|
1260
|
-
SkyTextHighlightDirective.prototype.highlight = function () {
|
|
1261
|
-
/* istanbul ignore else */
|
|
1262
|
-
if (this.observer) {
|
|
1263
|
-
this.observer.disconnect();
|
|
1264
|
-
}
|
|
1265
|
-
var searchText = this._skyHighlight;
|
|
1266
|
-
if (this.existingHighlight) {
|
|
1267
|
-
SkyTextHighlightDirective.removeHighlight(this.el);
|
|
1268
|
-
}
|
|
1269
|
-
/* istanbul ignore else */
|
|
1270
|
-
if (this.readyForHighlight(searchText)) {
|
|
1271
|
-
var node = this.el.nativeElement;
|
|
1272
|
-
// mark all matched text in the DOM
|
|
1273
|
-
SkyTextHighlightDirective.markTextNodes(node, searchText);
|
|
1274
|
-
this.existingHighlight = true;
|
|
1275
|
-
}
|
|
1276
|
-
this.observeDom();
|
|
1277
|
-
};
|
|
1278
|
-
SkyTextHighlightDirective.prototype.observeDom = function () {
|
|
1279
|
-
/* istanbul ignore else */
|
|
1280
|
-
if (this.observer) {
|
|
1281
|
-
var config = {
|
|
1282
|
-
attributes: false,
|
|
1283
|
-
childList: true,
|
|
1284
|
-
characterData: true,
|
|
1285
|
-
};
|
|
1286
|
-
this.observer.observe(this.el.nativeElement, config);
|
|
1287
|
-
}
|
|
1288
|
-
};
|
|
1289
1236
|
SkyTextHighlightDirective.cleanRegex = function (regex) {
|
|
1290
|
-
return regex.replace(/[
|
|
1237
|
+
return regex.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&');
|
|
1291
1238
|
};
|
|
1292
1239
|
SkyTextHighlightDirective.markNode = function (node, searchTerms) {
|
|
1293
1240
|
/* istanbul ignore else */
|
|
@@ -1338,6 +1285,59 @@
|
|
|
1338
1285
|
}
|
|
1339
1286
|
}
|
|
1340
1287
|
};
|
|
1288
|
+
SkyTextHighlightDirective.prototype.ngOnChanges = function (changes) {
|
|
1289
|
+
if (changes.skyHighlight && !changes.skyHighlight.firstChange) {
|
|
1290
|
+
this.highlight();
|
|
1291
|
+
}
|
|
1292
|
+
};
|
|
1293
|
+
SkyTextHighlightDirective.prototype.ngAfterViewInit = function () {
|
|
1294
|
+
var _this = this;
|
|
1295
|
+
this.observer = this.observerService.create(function () {
|
|
1296
|
+
_this.highlight();
|
|
1297
|
+
});
|
|
1298
|
+
this.observeDom();
|
|
1299
|
+
if (this._skyHighlight && this._skyHighlight.length > 0) {
|
|
1300
|
+
this.highlight();
|
|
1301
|
+
}
|
|
1302
|
+
};
|
|
1303
|
+
SkyTextHighlightDirective.prototype.ngOnDestroy = function () {
|
|
1304
|
+
/* istanbul ignore else */
|
|
1305
|
+
if (this.observer) {
|
|
1306
|
+
this.observer.disconnect();
|
|
1307
|
+
}
|
|
1308
|
+
};
|
|
1309
|
+
SkyTextHighlightDirective.prototype.readyForHighlight = function (searchText) {
|
|
1310
|
+
return searchText && searchText.length > 0 && this.el.nativeElement;
|
|
1311
|
+
};
|
|
1312
|
+
SkyTextHighlightDirective.prototype.highlight = function () {
|
|
1313
|
+
/* istanbul ignore else */
|
|
1314
|
+
if (this.observer) {
|
|
1315
|
+
this.observer.disconnect();
|
|
1316
|
+
}
|
|
1317
|
+
var searchText = this._skyHighlight;
|
|
1318
|
+
if (this.existingHighlight) {
|
|
1319
|
+
SkyTextHighlightDirective.removeHighlight(this.el);
|
|
1320
|
+
}
|
|
1321
|
+
/* istanbul ignore else */
|
|
1322
|
+
if (this.readyForHighlight(searchText)) {
|
|
1323
|
+
var node = this.el.nativeElement;
|
|
1324
|
+
// mark all matched text in the DOM
|
|
1325
|
+
SkyTextHighlightDirective.markTextNodes(node, searchText);
|
|
1326
|
+
this.existingHighlight = true;
|
|
1327
|
+
}
|
|
1328
|
+
this.observeDom();
|
|
1329
|
+
};
|
|
1330
|
+
SkyTextHighlightDirective.prototype.observeDom = function () {
|
|
1331
|
+
/* istanbul ignore else */
|
|
1332
|
+
if (this.observer) {
|
|
1333
|
+
var config = {
|
|
1334
|
+
attributes: false,
|
|
1335
|
+
childList: true,
|
|
1336
|
+
characterData: true,
|
|
1337
|
+
};
|
|
1338
|
+
this.observer.observe(this.el.nativeElement, config);
|
|
1339
|
+
}
|
|
1340
|
+
};
|
|
1341
1341
|
return SkyTextHighlightDirective;
|
|
1342
1342
|
}());
|
|
1343
1343
|
SkyTextHighlightDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyTextHighlightDirective, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$2.MutationObserverService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|