@sumaris-net/ngx-components 2.6.4-rc6 → 2.6.4-rc8

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.
@@ -23000,15 +23000,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
23000
23000
  type: Directive
23001
23001
  }], ctorParameters: function () { return [{ type: GraphqlService }, { type: PlatformService }, { type: undefined }, { type: undefined }, { type: undefined }]; } });
23002
23002
 
23003
- class NamedFilter extends Entity {
23003
+ let NamedFilter = class NamedFilter extends Entity {
23004
23004
  fromObject(source, opts) {
23005
23005
  this.name = source.name;
23006
23006
  this.entityName = source.entityName;
23007
- this.content = source.content;
23008
23007
  this.recorderPersonId = source.recorderPersonId;
23009
23008
  this.recorderDepartmentId = source.recorderDepartmentId;
23009
+ try {
23010
+ this.content = typeof source?.content === 'string' ? JSON.parse(source?.content) : source?.content || undefined;
23011
+ }
23012
+ catch (e) {
23013
+ console.error('[named-filter] can\'t parse content json', source);
23014
+ throw e;
23015
+ }
23010
23016
  }
23011
- }
23017
+ asObject(opts) {
23018
+ const target = super.asObject(opts);
23019
+ if (opts?.minify) {
23020
+ target.content = JSON.stringify(this.content);
23021
+ }
23022
+ return target;
23023
+ }
23024
+ };
23025
+ NamedFilter = __decorate([
23026
+ EntityClass({ typename: 'NamedFilterVO' })
23027
+ ], NamedFilter);
23012
23028
  let NamedFilterFilter = class NamedFilterFilter extends EntityFilter {
23013
23029
  constructor() {
23014
23030
  super(...arguments);
@@ -23031,7 +23047,7 @@ NamedFilterFilter = __decorate([
23031
23047
  const APP_NAMED_FILTER_SERVICE = new InjectionToken('namedFilterService');
23032
23048
  // @dynamic
23033
23049
  class AbstractNamedFilterService extends BaseEntityService {
23034
- constructor(graphql, platform, accountService, dataType, filterType, network, translate, options) {
23050
+ constructor(graphql, platform, dataType, filterType, options) {
23035
23051
  super(graphql, platform, dataType, filterType, {
23036
23052
  defaultSortBy: 'name',
23037
23053
  defaultSortDirection: 'asc',
@@ -23039,11 +23055,8 @@ class AbstractNamedFilterService extends BaseEntityService {
23039
23055
  });
23040
23056
  this.graphql = graphql;
23041
23057
  this.platform = platform;
23042
- this.accountService = accountService;
23043
23058
  this.dataType = dataType;
23044
23059
  this.filterType = filterType;
23045
- this.network = network;
23046
- this.translate = translate;
23047
23060
  this.options = options;
23048
23061
  this._logPrefix = '[named-filter-service] ';
23049
23062
  }
@@ -23097,7 +23110,7 @@ AbstractNamedFilterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0
23097
23110
  AbstractNamedFilterService.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: AbstractNamedFilterService, usesInheritance: true, ngImport: i0 });
23098
23111
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AbstractNamedFilterService, decorators: [{
23099
23112
  type: Directive
23100
- }], ctorParameters: function () { return [{ type: GraphqlService }, { type: PlatformService }, { type: AccountService }, { type: undefined }, { type: undefined }, { type: NetworkService }, { type: i1$2.TranslateService }, { type: undefined }]; } });
23113
+ }], ctorParameters: function () { return [{ type: GraphqlService }, { type: PlatformService }, { type: undefined }, { type: undefined }, { type: undefined }]; } });
23101
23114
 
23102
23115
  class AppGraphQLModule {
23103
23116
  constructor() {