@sumaris-net/ngx-components 1.19.11-rc2 → 1.19.11-rc5
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/bundles/sumaris-net.ngx-components.umd.js +6 -9
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/admin/services/person.service.js +3 -3
- package/esm2015/src/app/core/form/list.form.js +1 -1
- package/esm2015/src/app/core/services/model/referential.model.js +1 -4
- package/esm2015/src/app/shared/pipes/form.pipes.js +6 -6
- package/fesm2015/sumaris-net.ngx-components.js +6 -9
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/services/model/referential.model.d.ts +1 -2
- package/src/app/shared/pipes/form.pipes.d.ts +3 -3
- package/src/theme/_ngx-components.globals.scss +1 -0
- package/src/theme/_ngx-components.scss +2 -0
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -4765,7 +4765,7 @@
|
|
|
4765
4765
|
function FormGetControlPipe() {
|
|
4766
4766
|
}
|
|
4767
4767
|
FormGetControlPipe.prototype.transform = function (form, path) {
|
|
4768
|
-
return form.get(path);
|
|
4768
|
+
return (form && path && form.get(path) || form);
|
|
4769
4769
|
};
|
|
4770
4770
|
return FormGetControlPipe;
|
|
4771
4771
|
}());
|
|
@@ -4778,7 +4778,7 @@
|
|
|
4778
4778
|
function FormGetArrayPipe() {
|
|
4779
4779
|
}
|
|
4780
4780
|
FormGetArrayPipe.prototype.transform = function (form, path) {
|
|
4781
|
-
return form.get(path);
|
|
4781
|
+
return (form && path && form.get(path) || form);
|
|
4782
4782
|
};
|
|
4783
4783
|
return FormGetArrayPipe;
|
|
4784
4784
|
}());
|
|
@@ -4791,7 +4791,7 @@
|
|
|
4791
4791
|
function FormGetGroupPipe() {
|
|
4792
4792
|
}
|
|
4793
4793
|
FormGetGroupPipe.prototype.transform = function (form, path) {
|
|
4794
|
-
return form.get(path);
|
|
4794
|
+
return (form && path && form.get(path) || form);
|
|
4795
4795
|
};
|
|
4796
4796
|
return FormGetGroupPipe;
|
|
4797
4797
|
}());
|
|
@@ -4822,7 +4822,7 @@
|
|
|
4822
4822
|
// store the params, in case they change
|
|
4823
4823
|
this._lastPath = path;
|
|
4824
4824
|
// set the value
|
|
4825
|
-
var control =
|
|
4825
|
+
var control = path ? form.get(path) : form;
|
|
4826
4826
|
this.value = control === null || control === void 0 ? void 0 : control.value;
|
|
4827
4827
|
// if there is a subscription to onLangChange, clean it
|
|
4828
4828
|
this._dispose();
|
|
@@ -14677,9 +14677,6 @@
|
|
|
14677
14677
|
// A referential entity should always have a 'id' filled (can be negative is local and temporary)
|
|
14678
14678
|
return EntityUtils.isNotEmpty(obj, 'id');
|
|
14679
14679
|
};
|
|
14680
|
-
ReferentialUtils.isNotEmptyReferential = function (obj) {
|
|
14681
|
-
return EntityUtils.isNotEmpty(obj, 'id');
|
|
14682
|
-
};
|
|
14683
14680
|
ReferentialUtils.isEmpty = function (obj) {
|
|
14684
14681
|
return EntityUtils.isEmpty(obj, 'id');
|
|
14685
14682
|
};
|
|
@@ -23286,7 +23283,7 @@
|
|
|
23286
23283
|
selector: 'app-list-form',
|
|
23287
23284
|
template: "\n<ng-container *ngIf=\"!loading; else listSkeleton\">\n\n <!-- List -->\n <ion-list class=\"ion-no-padding\" >\n\n <ng-container *ngFor=\"let itemControl of itemControls; index as i; last as last\">\n <ion-item *ngIf=\"itemControl.value; let item\"\n [class.disabled]=\"disabled\" tappable\n (click)=\"onItemClick($event, item)\"\n [color]=\"selection.isSelected(item) ? 'secondary100' : undefined\"\n [button]=\"selectionChanges.observers.length > 0\">\n <ion-label>{{displayWith(item)}}</ion-label>\n\n <!-- buttons -->\n <ion-buttons slot=\"end\" *ngIf=\"enabled\" class=\"action-buttons\">\n <ion-button fill=\"clear\" (click)=\"removeAt(i)\">\n <ion-icon slot=\"icon-only\" name=\"trash\"></ion-icon>\n </ion-button>\n\n <ion-button *ngFor=\"let button of options.buttons\"\n fill=\"clear\" [color]=\"button.color\"\n [class.cdk-visually-hidden]=\"button.disabled|async\"\n (click)=\"onItemButtonClick(button, $event, item, i)\"\n [title]=\"(button.title || '')|translate\">\n <ion-icon slot=\"icon-only\" [name]=\"button.icon\"></ion-icon>\n </ion-button>\n\n </ion-buttons>\n </ion-item>\n </ng-container>\n </ion-list>\n\n <!-- Add button -->\n <ion-button color=\"tertiary\" fill=\"clear\"\n *ngIf=\"enabled && onNewItem.observers.length; else emptyText\"\n [title]=\"'COMMON.BTN_ADD'|translate\"\n (click)=\"onNewClick($event)\" >\n <ion-icon slot=\"start\" name=\"add\"></ion-icon>\n <ion-label translate>COMMON.BTN_ADD</ion-label>\n </ion-button>\n\n <!-- Empty (if readonly) -->\n <ng-template #emptyText>\n <ion-text *ngIf=\"!length\" color=\"medium\"><i translate>COMMON.EMPTY_OPTION</i></ion-text>\n </ng-template>\n</ng-container>\n\n<ng-template #listSkeleton>\n\n <ion-list>\n <ng-container *ngTemplateOutlet=\"itemSkeleton\"></ng-container>\n <ng-container *ngTemplateOutlet=\"itemSkeleton\"></ng-container>\n <ng-container *ngTemplateOutlet=\"itemSkeleton\"></ng-container>\n </ion-list>\n\n</ng-template>\n\n<ng-template #itemSkeleton>\n\n <ion-item>\n <ion-label>\n <ion-skeleton-text animated style=\"width: 60%\"></ion-skeleton-text>\n </ion-label>\n </ion-item>\n\n</ng-template>\n",
|
|
23288
23285
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
23289
|
-
styles: [":host{--ion-item-background-selected:var(--ion-color-secondary100);--ion-item-
|
|
23286
|
+
styles: [":host{--ion-item-background-selected:var(--ion-color-secondary100);--ion-item-color-selected:var(--ion-color-secondary100-contrast)}ion-item.disabled ion-label{color:var(--ion-color-medium-shade,grey)}ion-item{--min-height:48px;--ion-item-background-color-hover:var(--ion-color-light);--ion-item-color-hover:var(--ion-color-light-contrast)}ion-item .action-buttons{visibility:hidden;display:none}ion-item:hover{height:var(--min-height);background-color:var(--ion-item-background-color-hover)}ion-item:hover .action-buttons{margin-top:-1px;visibility:visible;display:block}ion-item:hover ion-label,ion-item:hover ion-text{color:var(--ion-item-color-hover)}ion-item.selected{--ion-item-background-color-hover:var(--ion-item-background-selected)!important;--ion-item-color-hover:var(--ion-item-color-selected)!important;background-color:var(--ion-item-background-selected)}ion-item.selected ion-label,ion-item.selected ion-text{color:var(--ion-item-color-selected)}"]
|
|
23290
23287
|
},] }
|
|
23291
23288
|
];
|
|
23292
23289
|
AppListForm.ctorParameters = function () { return [
|
|
@@ -30037,7 +30034,7 @@
|
|
|
30037
30034
|
PersonService.prototype.suggest = function (value, filter, sortBy, sortDirection) {
|
|
30038
30035
|
return __awaiter(this, void 0, void 0, function () {
|
|
30039
30036
|
return __generator(this, function (_a) {
|
|
30040
|
-
if (
|
|
30037
|
+
if (EntityUtils.isNotEmpty(value, 'id'))
|
|
30041
30038
|
return [2 /*return*/, { data: [value] }];
|
|
30042
30039
|
value = (typeof value === 'string' && value !== '*') && value || undefined;
|
|
30043
30040
|
sortBy = sortBy || filter.searchAttribute || (filter.searchAttributes && filter.searchAttributes[0]);
|