@sumaris-net/ngx-components 2.6.23-beta2 → 2.6.23-beta4
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/esm2020/src/app/shared/named-filter/named-filter-selector.component.mjs +8 -5
- package/fesm2015/sumaris-net.ngx-components.mjs +6 -3
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +7 -4
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/named-filter/named-filter-selector.component.d.ts +1 -1
|
@@ -21341,13 +21341,16 @@ class NamedFilterSelector extends AppForm {
|
|
|
21341
21341
|
this.registerSubscription(this.form.controls.namedFilter.valueChanges.pipe(debounceTime(100), distinctUntilChanged()).subscribe((value) => this.onFilterChanges(value)));
|
|
21342
21342
|
}
|
|
21343
21343
|
setEntityName(entityName) {
|
|
21344
|
+
if (!entityName || this._entityName === entityName)
|
|
21345
|
+
return;
|
|
21344
21346
|
this._entityName = entityName;
|
|
21345
|
-
|
|
21347
|
+
// add timeout to allow autocompleteConfig to be set
|
|
21348
|
+
setTimeout(() => this.registerAutocompleteField('namedFilter', {
|
|
21346
21349
|
suggestFn: (value, filter) => this.dataService.suggest(value, filter),
|
|
21347
21350
|
attributes: ['name'],
|
|
21348
21351
|
filter: { entityName },
|
|
21349
21352
|
...this.autocompleteConfig
|
|
21350
|
-
});
|
|
21353
|
+
}), 100);
|
|
21351
21354
|
}
|
|
21352
21355
|
markForCheck() {
|
|
21353
21356
|
this.cd.markForCheck();
|
|
@@ -21471,10 +21474,10 @@ class NamedFilterSelector extends AppForm {
|
|
|
21471
21474
|
}
|
|
21472
21475
|
}
|
|
21473
21476
|
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 });
|
|
21474
|
-
NamedFilterSelector.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NamedFilterSelector, selector: "app-named-filter-selector
|
|
21477
|
+
NamedFilterSelector.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NamedFilterSelector, selector: "app-named-filter-selector", inputs: { entityName: "entityName", filterContentProvider: "filterContentProvider", filterImportCallback: "filterImportCallback", filterFormDirty: "filterFormDirty", showButtons: "showButtons", exportFileNamePrefix: "exportFileNamePrefix", autocompleteConfig: "autocompleteConfig" }, outputs: { filterSelected: "filterSelected", filterDeleted: "filterDeleted" }, viewQueries: [{ propertyName: "autocompleteField", first: true, predicate: MatAutocompleteField, descendants: true, static: 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 });
|
|
21475
21478
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NamedFilterSelector, decorators: [{
|
|
21476
21479
|
type: Component,
|
|
21477
|
-
args: [{ selector: 'app-named-filter-selector
|
|
21480
|
+
args: [{ selector: 'app-named-filter-selector', 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"] }]
|
|
21478
21481
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$2.UntypedFormBuilder }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastController }, { type: i2$1.PopoverController }, { type: undefined, decorators: [{
|
|
21479
21482
|
type: Inject,
|
|
21480
21483
|
args: [APP_NAMED_FILTER_SERVICE]
|