@sumaris-net/ngx-components 2.6.17 → 2.6.19-beta.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.
@@ -21258,6 +21258,7 @@ class NamedFilterSelector extends AppForm {
21258
21258
  filter: {
21259
21259
  entityName: this.entityName,
21260
21260
  },
21261
+ ...this.autocompleteConfig
21261
21262
  });
21262
21263
  this.registerSubscription(this.form.controls.namedFilter.valueChanges.pipe(debounceTime(100), distinctUntilChanged()).subscribe((value) => this.onFilterChanges(value)));
21263
21264
  }
@@ -21380,7 +21381,7 @@ class NamedFilterSelector extends AppForm {
21380
21381
  }
21381
21382
  }
21382
21383
  NamedFilterSelector.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NamedFilterSelector, deps: [{ token: i0.Injector }, { token: i1$2.UntypedFormBuilder }, { token: i0.ChangeDetectorRef }, { token: i2$1.ToastController }, { token: i2$1.PopoverController }, { token: APP_NAMED_FILTER_SERVICE }], target: i0.ɵɵFactoryTarget.Component });
21383
- NamedFilterSelector.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NamedFilterSelector, selector: "app-named-filter-selector[entityName]", inputs: { entityName: "entityName", filterContentProvider: "filterContentProvider", filterFormDirty: "filterFormDirty", showButtons: "showButtons", exportFileNamePrefix: "exportFileNamePrefix" }, outputs: { filterSelected: "filterSelected", filterDeleted: "filterDeleted" }, viewQueries: [{ propertyName: "autocompleteField", first: true, predicate: MatAutocompleteField, descendants: true }], usesInheritance: true, ngImport: i0, template: "<form class=\"form-container\" [formGroup]=\"form\">\n <mat-autocomplete-field\n formControlName=\"namedFilter\"\n [config]=\"autocompleteFields.namedFilter\"\n [placeholder]=\"'COMMON.NAMED_FILTER.TITLE' | translate\"\n [clearable]=\"true\"\n >\n <ng-container matSuffix *ngIf=\"showButtons\">\n <button\n mat-icon-button\n [color]=\"'primary'\"\n [disabled]=\"saveDisabled\"\n [title]=\"'COMMON.NAMED_FILTER.SAVE' | translate\"\n (click)=\"save()\"\n >\n <mat-icon>save</mat-icon>\n <mat-icon *ngIf=\"isNew\" class=\"icon-secondary\" style=\"left: 12px; top: 0px\">add</mat-icon>\n </button>\n <button\n mat-icon-button\n [disabled]=\"deleteDisabled\"\n [title]=\"'COMMON.NAMED_FILTER.DELETE' | translate\"\n (click)=\"delete()\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n <button mat-icon-button [matMenuTriggerFor]=\"moreMenu\">\n <mat-icon>more_vert</mat-icon>\n </button>\n <mat-menu #moreMenu=\"matMenu\">\n <button mat-menu-item (click)=\"export()\" [disabled]=\"isNew\">\n <ion-label>\n <mat-icon>file_download</mat-icon>\n <span>{{ 'COMMON.NAMED_FILTER.EXPORT' | translate }}</span>\n </ion-label>\n </button>\n <button mat-menu-item (click)=\"import($event)\">\n <ion-label>\n <mat-icon>file_upload</mat-icon>\n <span>{{ 'COMMON.NAMED_FILTER.IMPORT' | translate }}</span>\n </ion-label>\n </button>\n </mat-menu>\n </ng-container>\n </mat-autocomplete-field>\n</form>\n", styles: [".filter-name-container{background:transparent!important;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: MatAutocompleteField, selector: "mat-autocomplete-field", inputs: ["equals", "logPrefix", "formControl", "formControlName", "floatLabel", "appearance", "placeholder", "suggestFn", "required", "mobile", "clearable", "debounceTime", "displayWith", "displayAttributes", "displayColumnSizes", "displayColumnNames", "highlightAccent", "showAllOnFocus", "showPanelOnFocus", "autofocus", "config", "i18nPrefix", "noResultMessage", "class", "panelWidth", "matAutocompletePosition", "multiple", "fetchMoreThreshold", "suggestLengthThreshold", "showLoadingSpinner", "debug", "showSearchBar", "stickySearchBar", "applyImplicitValue", "filter", "readonly", "tabindex", "items"], outputs: ["click", "blur", "focus", "dropButtonClick", "keydown.escape", "keyup.enter"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6$1.MatSuffix, selector: "[matSuffix]" }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i8$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i8$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i8$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
21384
+ NamedFilterSelector.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NamedFilterSelector, selector: "app-named-filter-selector[entityName]", inputs: { entityName: "entityName", filterContentProvider: "filterContentProvider", filterFormDirty: "filterFormDirty", showButtons: "showButtons", exportFileNamePrefix: "exportFileNamePrefix", autocompleteConfig: "autocompleteConfig" }, outputs: { filterSelected: "filterSelected", filterDeleted: "filterDeleted" }, viewQueries: [{ propertyName: "autocompleteField", first: true, predicate: MatAutocompleteField, descendants: true }], usesInheritance: true, ngImport: i0, template: "<form class=\"form-container\" [formGroup]=\"form\">\n <mat-autocomplete-field\n formControlName=\"namedFilter\"\n [config]=\"autocompleteFields.namedFilter\"\n [placeholder]=\"'COMMON.NAMED_FILTER.TITLE' | translate\"\n [clearable]=\"true\"\n >\n <ng-container matSuffix *ngIf=\"showButtons\">\n <button\n mat-icon-button\n [color]=\"'primary'\"\n [disabled]=\"saveDisabled\"\n [title]=\"'COMMON.NAMED_FILTER.SAVE' | translate\"\n (click)=\"save()\"\n >\n <mat-icon>save</mat-icon>\n <mat-icon *ngIf=\"isNew\" class=\"icon-secondary\" style=\"left: 12px; top: 0px\">add</mat-icon>\n </button>\n <button\n mat-icon-button\n [disabled]=\"deleteDisabled\"\n [title]=\"'COMMON.NAMED_FILTER.DELETE' | translate\"\n (click)=\"delete()\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n <button mat-icon-button [matMenuTriggerFor]=\"moreMenu\">\n <mat-icon>more_vert</mat-icon>\n </button>\n <mat-menu #moreMenu=\"matMenu\">\n <button mat-menu-item (click)=\"export()\" [disabled]=\"isNew\">\n <ion-label>\n <mat-icon>file_download</mat-icon>\n <span>{{ 'COMMON.NAMED_FILTER.EXPORT' | translate }}</span>\n </ion-label>\n </button>\n <button mat-menu-item (click)=\"import($event)\">\n <ion-label>\n <mat-icon>file_upload</mat-icon>\n <span>{{ 'COMMON.NAMED_FILTER.IMPORT' | translate }}</span>\n </ion-label>\n </button>\n </mat-menu>\n </ng-container>\n </mat-autocomplete-field>\n</form>\n", styles: [".filter-name-container{background:transparent!important;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: MatAutocompleteField, selector: "mat-autocomplete-field", inputs: ["equals", "logPrefix", "formControl", "formControlName", "floatLabel", "appearance", "placeholder", "suggestFn", "required", "mobile", "clearable", "debounceTime", "displayWith", "displayAttributes", "displayColumnSizes", "displayColumnNames", "highlightAccent", "showAllOnFocus", "showPanelOnFocus", "autofocus", "config", "i18nPrefix", "noResultMessage", "class", "panelWidth", "matAutocompletePosition", "multiple", "fetchMoreThreshold", "suggestLengthThreshold", "showLoadingSpinner", "debug", "showSearchBar", "stickySearchBar", "applyImplicitValue", "filter", "readonly", "tabindex", "items"], outputs: ["click", "blur", "focus", "dropButtonClick", "keydown.escape", "keyup.enter"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6$1.MatSuffix, selector: "[matSuffix]" }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i8$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i8$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i8$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
21384
21385
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NamedFilterSelector, decorators: [{
21385
21386
  type: Component,
21386
21387
  args: [{ selector: 'app-named-filter-selector[entityName]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form class=\"form-container\" [formGroup]=\"form\">\n <mat-autocomplete-field\n formControlName=\"namedFilter\"\n [config]=\"autocompleteFields.namedFilter\"\n [placeholder]=\"'COMMON.NAMED_FILTER.TITLE' | translate\"\n [clearable]=\"true\"\n >\n <ng-container matSuffix *ngIf=\"showButtons\">\n <button\n mat-icon-button\n [color]=\"'primary'\"\n [disabled]=\"saveDisabled\"\n [title]=\"'COMMON.NAMED_FILTER.SAVE' | translate\"\n (click)=\"save()\"\n >\n <mat-icon>save</mat-icon>\n <mat-icon *ngIf=\"isNew\" class=\"icon-secondary\" style=\"left: 12px; top: 0px\">add</mat-icon>\n </button>\n <button\n mat-icon-button\n [disabled]=\"deleteDisabled\"\n [title]=\"'COMMON.NAMED_FILTER.DELETE' | translate\"\n (click)=\"delete()\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n <button mat-icon-button [matMenuTriggerFor]=\"moreMenu\">\n <mat-icon>more_vert</mat-icon>\n </button>\n <mat-menu #moreMenu=\"matMenu\">\n <button mat-menu-item (click)=\"export()\" [disabled]=\"isNew\">\n <ion-label>\n <mat-icon>file_download</mat-icon>\n <span>{{ 'COMMON.NAMED_FILTER.EXPORT' | translate }}</span>\n </ion-label>\n </button>\n <button mat-menu-item (click)=\"import($event)\">\n <ion-label>\n <mat-icon>file_upload</mat-icon>\n <span>{{ 'COMMON.NAMED_FILTER.IMPORT' | translate }}</span>\n </ion-label>\n </button>\n </mat-menu>\n </ng-container>\n </mat-autocomplete-field>\n</form>\n", styles: [".filter-name-container{background:transparent!important;overflow:hidden}\n"] }]
@@ -21397,6 +21398,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
21397
21398
  type: Input
21398
21399
  }], exportFileNamePrefix: [{
21399
21400
  type: Input
21401
+ }], autocompleteConfig: [{
21402
+ type: Input
21400
21403
  }], filterSelected: [{
21401
21404
  type: Output
21402
21405
  }], filterDeleted: [{
@@ -23123,7 +23126,7 @@ class InMemoryEntitiesService extends StartableObservableService {
23123
23126
  const res = { data, total };
23124
23127
  const nextOffset = size > 0 ? (offset || 0) + size : total;
23125
23128
  if (nextOffset < total) {
23126
- res.fetchMore = () => this.loadAll(nextOffset, size, sortBy, sortDirection, filter, opts)
23129
+ res.fetchMore = () => this.loadAll(nextOffset, size, sortBy, sortDirection, filter, { ...opts, updateHiddenData: false })
23127
23130
  .then(res => {
23128
23131
  // Update hidden data (remove new fetched item)
23129
23132
  if (res.data?.length) {
@@ -23136,7 +23139,7 @@ class InMemoryEntitiesService extends StartableObservableService {
23136
23139
  }
23137
23140
  finally {
23138
23141
  // Remember hidden data
23139
- if (offset === 0) {
23142
+ if (opts?.updateHiddenData !== false) {
23140
23143
  this._hiddenData = !excludedDataByPagination ? excludedDataByFilter : excludedDataByFilter.concat(...excludedDataByPagination);
23141
23144
  }
23142
23145
  }
@@ -30800,7 +30803,8 @@ class AppEditor {
30800
30803
  }
30801
30804
  }
30802
30805
  setError(value, opts) {
30803
- if (this.errorSubject.value !== value) {
30806
+ // Compare using '!=' to detect null and undefined as same value
30807
+ if (this.errorSubject.value != value) {
30804
30808
  this.errorSubject.next(value);
30805
30809
  if (!opts || opts.emitEvent !== false)
30806
30810
  this.markForCheck();