@sumaris-net/ngx-components 1.19.11-rc4 → 1.19.11
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 -12
- 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/core.module.js +1 -6
- 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 -12
- 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 +3 -4
- package/src/app/shared/pipes/form.pipes.d.ts +3 -3
- 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-color-selected:var(--ion-color-secondary100-contrast)}ion-item.disabled ion-label{color:var(--ion-color-medium-shade,grey)}ion-item{--min-height:48px
|
|
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;background-color:var(--ion-item-background)}ion-item ion-label,ion-item ion-text{color:var(--ion-item-color)}ion-item .action-buttons{visibility:hidden;display:none}ion-item:hover{height:var(--min-height);--ion-item-background-color:var(--ion-color-light);--ion-item-color:var(--ion-color-light-contrast)}ion-item:hover .action-buttons{margin-top:-1px;visibility:visible;display:block}ion-item.selected{--ion-item-background-color-hover:var(--ion-item-background-selected)!important;--ion-item-color-hover:var(--ion-item-color-selected)!important}"]
|
|
23290
23287
|
},] }
|
|
23291
23288
|
];
|
|
23292
23289
|
AppListForm.ctorParameters = function () { return [
|
|
@@ -24352,7 +24349,6 @@
|
|
|
24352
24349
|
ionicCache.CacheModule,
|
|
24353
24350
|
i3$2.IonicStorageModule,
|
|
24354
24351
|
ngxJdenticon.NgxJdenticonModule,
|
|
24355
|
-
i1$2.TranslateModule.forChild(),
|
|
24356
24352
|
// Sub modules
|
|
24357
24353
|
AppGraphQLModule,
|
|
24358
24354
|
AppMenuModule
|
|
@@ -24394,8 +24390,6 @@
|
|
|
24394
24390
|
exports: [
|
|
24395
24391
|
SharedModule,
|
|
24396
24392
|
i3.RouterModule,
|
|
24397
|
-
i1$5.IonicModule,
|
|
24398
|
-
i1$2.TranslateModule,
|
|
24399
24393
|
// Sub modules
|
|
24400
24394
|
AppGraphQLModule,
|
|
24401
24395
|
AppMenuModule,
|
|
@@ -30037,7 +30031,7 @@
|
|
|
30037
30031
|
PersonService.prototype.suggest = function (value, filter, sortBy, sortDirection) {
|
|
30038
30032
|
return __awaiter(this, void 0, void 0, function () {
|
|
30039
30033
|
return __generator(this, function (_a) {
|
|
30040
|
-
if (
|
|
30034
|
+
if (EntityUtils.isNotEmpty(value, 'id'))
|
|
30041
30035
|
return [2 /*return*/, { data: [value] }];
|
|
30042
30036
|
value = (typeof value === 'string' && value !== '*') && value || undefined;
|
|
30043
30037
|
sortBy = sortBy || filter.searchAttribute || (filter.searchAttributes && filter.searchAttributes[0]);
|