@c8y/ngx-components 1018.0.120 → 1018.0.123

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.
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Pipe, Injectable, InjectFlags, InjectionToken, Optional, Inject, isDevMode, EventEmitter, Directive, NgModule, LOCALE_ID, HostListener, Input, Component, Output, HostBinding, forwardRef, TemplateRef, SecurityContext, APP_INITIALIZER, Self, SkipSelf, NgModuleRef, createNgModuleRef, ViewChild, ContentChild, Attribute, ViewContainerRef, ContentChildren, ElementRef, Host, ViewChildren, Injector, importProvidersFrom, ChangeDetectionStrategy, SimpleChange, Type } from '@angular/core';
3
- import { isNaN as isNaN$1, isFinite, castArray, flatten, uniq, sortBy, groupBy, camelCase, isUndefined, throttle as throttle$1, keys, get, each, mapValues, mapKeys, isString, forEach, assign, memoize as memoize$1, find, negate, upperFirst, property as property$1, some, entries, omitBy, min, every, first as first$1, map as map$1, orderBy, flatMap, isEmpty, reduce, union, filter as filter$1, isEqual, snakeCase, matches, cloneDeep, uniqBy, clone, toNumber, isEqualWith, escape as escape$1, escapeRegExp, assignWith, set, findIndex, omit, pick, flow, isNil, chunk, transform, identity, without, indexOf, parseInt as parseInt$1, kebabCase, forOwn } from 'lodash-es';
3
+ import { isNaN as isNaN$1, isFinite, castArray, flatten, uniq, sortBy, groupBy, camelCase, isUndefined, throttle as throttle$1, keys, get, each, mapValues, mapKeys, isString, forEach, assign, find, negate, upperFirst, memoize as memoize$1, property, some, entries, omitBy, min, every, first as first$1, map as map$1, orderBy, flatMap, isEmpty, reduce, union, filter as filter$1, isEqual, snakeCase, matches, cloneDeep, uniqBy, clone, toNumber, isEqualWith, escape as escape$1, escapeRegExp, assignWith, set, findIndex, omit, pick, flow, isNil, chunk, transform, identity, without, indexOf, parseInt as parseInt$1, kebabCase, forOwn } from 'lodash-es';
4
4
  import { merge, of, defer, combineLatest, race, isObservable, from, Subject, BehaviorSubject, fromEvent, pipe, NEVER, concat, throwError, Observable, EMPTY, timer, fromEventPattern, empty, forkJoin, ReplaySubject } from 'rxjs';
5
5
  import { map, distinctUntilChanged, filter, startWith, switchMap, scan, take, shareReplay, debounceTime, tap, catchError, takeUntil, mergeMap, first, share, retryWhen, delay, concatMap, debounce, sample, withLatestFrom, every as every$1, toArray, merge as merge$1, expand, finalize } from 'rxjs/operators';
6
6
  import { __awaiter, __decorate, __metadata } from 'tslib';
@@ -26,7 +26,6 @@ import * as i6 from 'ngx-bootstrap/datepicker';
26
26
  import { BsDatepickerModule } from 'ngx-bootstrap/datepicker';
27
27
  import { defineLocale, enGbLocale, zhCnLocale, ruLocale, ptBrLocale, plLocale, nlLocale, koLocale, jaLocale, frLocale, esLocale, deLocale } from 'ngx-bootstrap/chronos';
28
28
  import { coerceNumberProperty } from '@angular/cdk/coercion';
29
- import { property, sortBy as sortBy$1, isEmpty as isEmpty$1, flatten as flatten$1, get as get$1, set as set$1, pick as pick$1 } from 'lodash';
30
29
  import * as i1$4 from '@angular/platform-browser';
31
30
  import { saveAs } from 'file-saver';
32
31
  import * as i1$5 from 'ngx-bootstrap/dropdown';
@@ -35,6 +34,7 @@ import * as i6$1 from '@angular/cdk/a11y';
35
34
  import { A11yModule } from '@angular/cdk/a11y';
36
35
  import * as i1$a from 'ngx-bootstrap/collapse';
37
36
  import { CollapseModule } from 'ngx-bootstrap/collapse';
37
+ import { sortBy as sortBy$1, isEmpty as isEmpty$1, flatten as flatten$1, get as get$1, set as set$1, pick as pick$1 } from 'lodash';
38
38
  import * as i1$8 from 'ngx-bootstrap/modal';
39
39
  import { ModalModule as ModalModule$1, BsModalRef } from 'ngx-bootstrap/modal';
40
40
  import * as i5 from '@angular/forms';
@@ -4643,23 +4643,6 @@ var GroupFragment;
4643
4643
  GroupFragment["dynamicGroupQueryString"] = "c8y_DeviceQueryString";
4644
4644
  })(GroupFragment || (GroupFragment = {}));
4645
4645
 
4646
- /**
4647
- * Decorator to memoize function results.
4648
- * @param resolver Cache key resolver function, used by memoize from lodash.
4649
- */
4650
- function memoize(resolver) {
4651
- return (target, fnName, descriptor) => {
4652
- const fn = descriptor.value;
4653
- descriptor.value = function (...args) {
4654
- const memoizedFnName = `_${fnName}Memoized`;
4655
- if (!this[memoizedFnName]) {
4656
- this[memoizedFnName] = memoize$1(fn, resolver);
4657
- }
4658
- return this[memoizedFnName](...args);
4659
- };
4660
- };
4661
- }
4662
-
4663
4646
  /**
4664
4647
  * AssetTypesService is being used to manage a cache of all existing asset types.
4665
4648
  * This service is injected in the AssetOverviewNavigationFactory class, which will trigger
@@ -4983,18 +4966,12 @@ class GroupService {
4983
4966
  }
4984
4967
  GroupService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: GroupService, deps: [{ token: AssetTypesService }], target: i0.ɵɵFactoryTarget.Injectable });
4985
4968
  GroupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: GroupService, providedIn: 'root' });
4986
- __decorate([
4987
- memoize(property('id')),
4988
- __metadata("design:type", Function),
4989
- __metadata("design:paramtypes", [Object, Object]),
4990
- __metadata("design:returntype", Promise)
4991
- ], GroupService.prototype, "getIcon", null);
4992
4969
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: GroupService, decorators: [{
4993
4970
  type: Injectable,
4994
4971
  args: [{
4995
4972
  providedIn: 'root'
4996
4973
  }]
4997
- }], ctorParameters: function () { return [{ type: AssetTypesService }]; }, propDecorators: { getIcon: [] } });
4974
+ }], ctorParameters: function () { return [{ type: AssetTypesService }]; } });
4998
4975
 
4999
4976
  class GetGroupIconPipe {
5000
4977
  constructor(groupService) {
@@ -5102,6 +5079,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
5102
5079
  args: [{ name: 'humanize' }]
5103
5080
  }] });
5104
5081
 
5082
+ /**
5083
+ * Decorator to memoize function results.
5084
+ * @param resolver Cache key resolver function, used by memoize from lodash.
5085
+ */
5086
+ function memoize(resolver) {
5087
+ return (target, fnName, descriptor) => {
5088
+ const fn = descriptor.value;
5089
+ descriptor.value = function (...args) {
5090
+ const memoizedFnName = `_${fnName}Memoized`;
5091
+ if (!this[memoizedFnName]) {
5092
+ this[memoizedFnName] = memoize$1(fn, resolver);
5093
+ }
5094
+ return this[memoizedFnName](...args);
5095
+ };
5096
+ };
5097
+ }
5098
+
5105
5099
  class Permissions {
5106
5100
  constructor(appState, inventory, user) {
5107
5101
  this.appState = appState;
@@ -5195,13 +5189,13 @@ class Permissions {
5195
5189
  Permissions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: Permissions, deps: [{ token: AppStateService }, { token: i1$1.InventoryService }, { token: i1$1.UserService }], target: i0.ɵɵFactoryTarget.Injectable });
5196
5190
  Permissions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: Permissions, providedIn: 'root' });
5197
5191
  __decorate([
5198
- memoize(property$1('id')),
5192
+ memoize(property('id')),
5199
5193
  __metadata("design:type", Function),
5200
5194
  __metadata("design:paramtypes", [Object]),
5201
5195
  __metadata("design:returntype", Promise)
5202
5196
  ], Permissions.prototype, "checkIfOwner", null);
5203
5197
  __decorate([
5204
- memoize(property$1('id')),
5198
+ memoize(property('id')),
5205
5199
  __metadata("design:type", Function),
5206
5200
  __metadata("design:paramtypes", [Object]),
5207
5201
  __metadata("design:returntype", void 0)