@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, transform, identity, flow, isNil, chunk, 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, transform, identity, flow, isNil, chunk, without, indexOf, parseInt as parseInt$1, kebabCase, forOwn } from 'lodash-es';
4
4
  import { merge, of, defer, combineLatest, race, isObservable, from, Subject, BehaviorSubject, NEVER, fromEvent, pipe, 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 * as i2 from '@angular/cdk/scrolling';
@@ -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';
@@ -4870,23 +4870,6 @@ var GroupFragment;
4870
4870
  GroupFragment["dynamicGroupQueryString"] = "c8y_DeviceQueryString";
4871
4871
  })(GroupFragment || (GroupFragment = {}));
4872
4872
 
4873
- /**
4874
- * Decorator to memoize function results.
4875
- * @param resolver Cache key resolver function, used by memoize from lodash.
4876
- */
4877
- function memoize(resolver) {
4878
- return (target, fnName, descriptor) => {
4879
- const fn = descriptor.value;
4880
- descriptor.value = function (...args) {
4881
- const memoizedFnName = `_${fnName}Memoized`;
4882
- if (!this[memoizedFnName]) {
4883
- this[memoizedFnName] = memoize$1(fn, resolver);
4884
- }
4885
- return this[memoizedFnName](...args);
4886
- };
4887
- };
4888
- }
4889
-
4890
4873
  const MO_TYPES = [
4891
4874
  'asset',
4892
4875
  'dynamicGroup',
@@ -5024,18 +5007,12 @@ class GroupService {
5024
5007
  }
5025
5008
  GroupService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: GroupService, deps: [{ token: AssetTypesService }], target: i0.ɵɵFactoryTarget.Injectable });
5026
5009
  GroupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: GroupService, providedIn: 'root' });
5027
- __decorate([
5028
- memoize(property('id')),
5029
- __metadata("design:type", Function),
5030
- __metadata("design:paramtypes", [Object, Object]),
5031
- __metadata("design:returntype", Promise)
5032
- ], GroupService.prototype, "getIcon", null);
5033
5010
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: GroupService, decorators: [{
5034
5011
  type: Injectable,
5035
5012
  args: [{
5036
5013
  providedIn: 'root'
5037
5014
  }]
5038
- }], ctorParameters: function () { return [{ type: AssetTypesService }]; }, propDecorators: { getIcon: [] } });
5015
+ }], ctorParameters: function () { return [{ type: AssetTypesService }]; } });
5039
5016
 
5040
5017
  class GetGroupIconPipe {
5041
5018
  constructor(groupService) {
@@ -5141,6 +5118,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
5141
5118
  args: [{ name: 'humanize' }]
5142
5119
  }] });
5143
5120
 
5121
+ /**
5122
+ * Decorator to memoize function results.
5123
+ * @param resolver Cache key resolver function, used by memoize from lodash.
5124
+ */
5125
+ function memoize(resolver) {
5126
+ return (target, fnName, descriptor) => {
5127
+ const fn = descriptor.value;
5128
+ descriptor.value = function (...args) {
5129
+ const memoizedFnName = `_${fnName}Memoized`;
5130
+ if (!this[memoizedFnName]) {
5131
+ this[memoizedFnName] = memoize$1(fn, resolver);
5132
+ }
5133
+ return this[memoizedFnName](...args);
5134
+ };
5135
+ };
5136
+ }
5137
+
5144
5138
  class Permissions {
5145
5139
  constructor(appState, inventory, user) {
5146
5140
  this.appState = appState;
@@ -5230,13 +5224,13 @@ class Permissions {
5230
5224
  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 });
5231
5225
  Permissions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: Permissions, providedIn: 'root' });
5232
5226
  __decorate([
5233
- memoize(property$1('id')),
5227
+ memoize(property('id')),
5234
5228
  __metadata("design:type", Function),
5235
5229
  __metadata("design:paramtypes", [Object]),
5236
5230
  __metadata("design:returntype", Promise)
5237
5231
  ], Permissions.prototype, "checkIfOwner", null);
5238
5232
  __decorate([
5239
- memoize(property$1('id')),
5233
+ memoize(property('id')),
5240
5234
  __metadata("design:type", Function),
5241
5235
  __metadata("design:paramtypes", [Object]),
5242
5236
  __metadata("design:returntype", void 0)