@sumaris-net/ngx-components 0.17.2 → 0.17.6
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/ngx-sumaris-components.umd.js +23 -7
- package/bundles/ngx-sumaris-components.umd.js.map +1 -1
- package/bundles/ngx-sumaris-components.umd.min.js +1 -1
- package/bundles/ngx-sumaris-components.umd.min.js.map +1 -1
- package/esm2015/src/app/core/form/editor.class.js +20 -8
- package/esm2015/src/app/shared/material/boolean/material.boolean.js +2 -2
- package/esm2015/src/app/shared/observables.js +1 -1
- package/fesm2015/ngx-sumaris-components.js +19 -7
- package/fesm2015/ngx-sumaris-components.js.map +1 -1
- package/ngx-sumaris-components.metadata.json +1 -1
- package/package.json +1 -1
- package/src/app/core/form/editor.class.d.ts +5 -2
|
@@ -5450,7 +5450,7 @@
|
|
|
5450
5450
|
MatBooleanField.decorators = [
|
|
5451
5451
|
{ type: i0.Component, args: [{
|
|
5452
5452
|
selector: 'mat-boolean-field',
|
|
5453
|
-
template: "<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled\">\n <input matInput hidden type=\"text\" readonly\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\">\n <ion-text>{{(formControl.value ? 'COMMON.YES' : 'COMMON.NO') | translate }}</ion-text>\n</mat-form-field>\n\n<ng-template #writable>\n <ng-container [ngSwitch]=\"style\">\n\n <!-- Radio -->\n <mat-form-field *ngSwitchCase=\"'radio'\"\n [floatLabel]=\"showRadio && (!floatLabel || floatLabel === 'auto') ? 'always': floatLabel\"\n class=\"mat-boolean-field mat-boolean-field-radio\">\n <mat-label *ngIf=\"placeholder && floatLabel!=='never'\">\n {{placeholder}}\n <span [hidden]=\"showRadio\">({{'COMMON.YES'|translate}}/{{'COMMON.NO'|translate}})</span>\n </mat-label>\n\n <input matInput #fakeInput type=\"text\" readonly=\"true\"\n [formControl]=\"formControl\"\n (focus)=\"_onFocusFakeInput($event)\"\n [required]=\"required\"\n [class.cdk-visually-hidden]=\"showRadio\"\n [tabindex]=\"tabindex\">\n\n <!-- radio button -->\n <mat-radio-group [hidden]=\"!showRadio\"\n [formControl]=\"formControl\"\n (change)=\"onRadioValueChanged($event)\">\n <mat-radio-button #yesButton [value]=\"true\">\n <span translate>COMMON.YES</span>\n </mat-radio-button> \n <mat-radio-button #noButton [value]=\"false\">\n <span translate>COMMON.NO</span>\n </mat-radio-button>\n </mat-radio-group>\n\n <div matSuffix #injectMatSuffix></div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n\n <!-- Checkbox -->\n <mat-form-field *ngSwitchCase=\"'checkbox'\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-boolean-field mat-boolean-field-checkbox\">\n <mat-label *ngIf=\"placeholder && !showRadio\">\n {{placeholder}}\n </mat-label>\n\n <input matInput #matInput\n [formControl]=\"formControl\"\n (focus)=\"_onFocusFakeInput($event)\"\n [required]=\"required\"\n [class.cdk-visually-hidden]=\"showRadio\"\n [tabindex]=\"tabindex\">\n\n <ion-label> </ion-label>\n\n <!-- checkbox, when compact -->\n <mat-checkbox #checkboxButton\n [formControl]=\"formControl\"\n (change)=\"onCheckboxValueChanged($event)\"\n [indeterminate]=\"value===undefined\"\n [hidden]=\"!showRadio\"\n [tabindex]=\"tabindex\">\n </mat-checkbox>\n\n <div matSuffix #injectMatSuffix></div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n\n <!-- Buttons -->\n <mat-form-field *ngSwitchCase=\"'button'\"\n [floatLabel]=\"floatLabel === 'never' ? 'never' : 'always'\"\n class=\"mat-boolean-field mat-boolean-field-button\">\n <input matInput type=\"text\" hidden\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [required]=\"required\">\n <ion-grid class=\"ion-no-padding\" *ngIf=\"!formControl.disabled; else disabledLabel\">\n <ion-row class=\"ion-no-padding\">\n <!-- Yes button -->\n <ion-col>\n <ion-button style=\"width: 100%;\"\n class=\"mat-form-field-button\"\n [tabindex]=\"_tabindex\"\n (click)=\"writeValue(true, $event)\"\n (keyup.enter)=\"writeValue(true, $event)\"\n [color]=\"_value == null ? '
|
|
5453
|
+
template: "<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled\">\n <input matInput hidden type=\"text\" readonly\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\">\n <ion-text>{{(formControl.value ? 'COMMON.YES' : 'COMMON.NO') | translate }}</ion-text>\n</mat-form-field>\n\n<ng-template #writable>\n <ng-container [ngSwitch]=\"style\">\n\n <!-- Radio -->\n <mat-form-field *ngSwitchCase=\"'radio'\"\n [floatLabel]=\"showRadio && (!floatLabel || floatLabel === 'auto') ? 'always': floatLabel\"\n class=\"mat-boolean-field mat-boolean-field-radio\">\n <mat-label *ngIf=\"placeholder && floatLabel!=='never'\">\n {{placeholder}}\n <span [hidden]=\"showRadio\">({{'COMMON.YES'|translate}}/{{'COMMON.NO'|translate}})</span>\n </mat-label>\n\n <input matInput #fakeInput type=\"text\" readonly=\"true\"\n [formControl]=\"formControl\"\n (focus)=\"_onFocusFakeInput($event)\"\n [required]=\"required\"\n [class.cdk-visually-hidden]=\"showRadio\"\n [tabindex]=\"tabindex\">\n\n <!-- radio button -->\n <mat-radio-group [hidden]=\"!showRadio\"\n [formControl]=\"formControl\"\n (change)=\"onRadioValueChanged($event)\">\n <mat-radio-button #yesButton [value]=\"true\">\n <span translate>COMMON.YES</span>\n </mat-radio-button> \n <mat-radio-button #noButton [value]=\"false\">\n <span translate>COMMON.NO</span>\n </mat-radio-button>\n </mat-radio-group>\n\n <div matSuffix #injectMatSuffix></div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n\n <!-- Checkbox -->\n <mat-form-field *ngSwitchCase=\"'checkbox'\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-boolean-field mat-boolean-field-checkbox\">\n <mat-label *ngIf=\"placeholder && !showRadio\">\n {{placeholder}}\n </mat-label>\n\n <input matInput #matInput\n [formControl]=\"formControl\"\n (focus)=\"_onFocusFakeInput($event)\"\n [required]=\"required\"\n [class.cdk-visually-hidden]=\"showRadio\"\n [tabindex]=\"tabindex\">\n\n <ion-label> </ion-label>\n\n <!-- checkbox, when compact -->\n <mat-checkbox #checkboxButton\n [formControl]=\"formControl\"\n (change)=\"onCheckboxValueChanged($event)\"\n [indeterminate]=\"value===undefined\"\n [hidden]=\"!showRadio\"\n [tabindex]=\"tabindex\">\n </mat-checkbox>\n\n <div matSuffix #injectMatSuffix></div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n\n <!-- Buttons -->\n <mat-form-field *ngSwitchCase=\"'button'\"\n [floatLabel]=\"floatLabel === 'never' ? 'never' : 'always'\"\n class=\"mat-boolean-field mat-boolean-field-button\">\n <input matInput type=\"text\" hidden\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [required]=\"required\">\n <ion-grid class=\"ion-no-padding\" *ngIf=\"!formControl.disabled; else disabledLabel\">\n <ion-row class=\"ion-no-padding\">\n <!-- Yes button -->\n <ion-col>\n <ion-button style=\"width: 100%;\"\n class=\"mat-form-field-button\"\n [tabindex]=\"_tabindex\"\n (click)=\"writeValue(true, $event)\"\n (keyup.enter)=\"writeValue(true, $event)\"\n [color]=\"_value == null ? 'tertiary' : (_value === true) ? 'accent' : 'light'\">\n <ion-icon slot=\"start\" name=\"checkmark\"></ion-icon>\n {{'COMMON.YES'|translate}}\n </ion-button>\n </ion-col>\n <!-- No button -->\n <ion-col>\n <ion-button style=\"width: 100%;\"\n class=\"mat-form-field-button\"\n [tabindex]=\"_tabindex !== undefined ? (_tabindex + 1) : undefined\"\n (click)=\"writeValue(false, $event)\"\n (keyup.enter)=\"writeValue(false, $event)\"\n [color]=\"_value == null ? 'danger' : (_value === false) ? 'accent' : 'light'\">\n <ion-icon slot=\"start\" name=\"close\"></ion-icon>\n {{'COMMON.NO'|translate}}\n </ion-button>\n </ion-col>\n </ion-row>\n </ion-grid>\n <ng-template #disabledLabel>\n <ion-label><i translate>COMMON.EMPTY_OPTION</i></ion-label>\n </ng-template>\n\n <div matSuffix #injectMatSuffix></div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n </ng-container>\n\n <div class=\"cdk-visually-hidden\">\n <div #suffix><ng-content select=\"[matSuffix]\"></ng-content></div>\n </div>\n\n</ng-template>\n\n\n",
|
|
5454
5454
|
providers: [
|
|
5455
5455
|
DEFAULT_VALUE_ACCESSOR$1
|
|
5456
5456
|
],
|
|
@@ -24508,11 +24508,12 @@
|
|
|
24508
24508
|
this._enabled = false;
|
|
24509
24509
|
this._dirty = false;
|
|
24510
24510
|
this._loading = true;
|
|
24511
|
+
this._selectedTabIndex = 0;
|
|
24511
24512
|
this.debug = false;
|
|
24512
|
-
this.selectedTabIndex = 0;
|
|
24513
24513
|
this.submitted = false;
|
|
24514
24514
|
this.toolbar = null;
|
|
24515
24515
|
this.formButtonsBar = null;
|
|
24516
|
+
this.selectedTabIndexChange = new i0.EventEmitter();
|
|
24516
24517
|
options = Object.assign({ tabCount: 1, tabGroupAnimationDuration: '200ms', enableSwipe: true }, options);
|
|
24517
24518
|
this.tabCount = options.tabCount;
|
|
24518
24519
|
this.tabGroupAnimationDuration = options.tabGroupAnimationDuration;
|
|
@@ -24596,6 +24597,16 @@
|
|
|
24596
24597
|
enumerable: false,
|
|
24597
24598
|
configurable: true
|
|
24598
24599
|
});
|
|
24600
|
+
Object.defineProperty(AppTabEditor.prototype, "selectedTabIndex", {
|
|
24601
|
+
get: function () {
|
|
24602
|
+
return this._selectedTabIndex;
|
|
24603
|
+
},
|
|
24604
|
+
set: function (value) {
|
|
24605
|
+
this.setSelectedTabIndex(value);
|
|
24606
|
+
},
|
|
24607
|
+
enumerable: false,
|
|
24608
|
+
configurable: true
|
|
24609
|
+
});
|
|
24599
24610
|
AppTabEditor.prototype.ngOnInit = function () {
|
|
24600
24611
|
var _this = this;
|
|
24601
24612
|
this.queryTabIndexParamName = this.queryTabIndexParamName || 'tab';
|
|
@@ -24629,6 +24640,7 @@
|
|
|
24629
24640
|
};
|
|
24630
24641
|
AppTabEditor.prototype.ngOnDestroy = function () {
|
|
24631
24642
|
this._subscription.unsubscribe();
|
|
24643
|
+
this.selectedTabIndexChange.complete();
|
|
24632
24644
|
};
|
|
24633
24645
|
AppTabEditor.prototype.addChildForm = function (form) {
|
|
24634
24646
|
if (!form)
|
|
@@ -24972,11 +24984,13 @@
|
|
|
24972
24984
|
else if (value > this.tabCount - 1) {
|
|
24973
24985
|
value = this.tabCount - 1;
|
|
24974
24986
|
}
|
|
24975
|
-
this.
|
|
24976
|
-
|
|
24977
|
-
|
|
24987
|
+
this._selectedTabIndex = value;
|
|
24988
|
+
this.selectedTabIndexChange.next(value);
|
|
24989
|
+
if (this.tabGroup && (!opts || opts.realignInkBar !== false)) {
|
|
24978
24990
|
this.tabGroup.selectedIndex = value;
|
|
24979
|
-
|
|
24991
|
+
this.markForCheck();
|
|
24992
|
+
// Wait tab change in UI, before realign ink tab
|
|
24993
|
+
setTimeout(function () { return _this.tabGroup.realignInkBar(); }, 200);
|
|
24980
24994
|
}
|
|
24981
24995
|
else if (!opts || opts.emitEvent !== false) {
|
|
24982
24996
|
this.markForCheck();
|
|
@@ -25152,7 +25166,9 @@
|
|
|
25152
25166
|
tabGroup: [{ type: i0.ViewChild, args: ['tabGroup', { static: true },] }],
|
|
25153
25167
|
toolbar: [{ type: i0.ViewChild, args: [ToolbarToken,] }],
|
|
25154
25168
|
formButtonsBar: [{ type: i0.ViewChild, args: [FormButtonsBarToken, { static: true },] }],
|
|
25155
|
-
content: [{ type: i0.ViewChild, args: [i1$5.IonContent, { static: true },] }]
|
|
25169
|
+
content: [{ type: i0.ViewChild, args: [i1$5.IonContent, { static: true },] }],
|
|
25170
|
+
selectedTabIndex: [{ type: i0.Input }],
|
|
25171
|
+
selectedTabIndexChange: [{ type: i0.Output }]
|
|
25156
25172
|
};
|
|
25157
25173
|
|
|
25158
25174
|
var AppEditorOptions = /** @class */ (function (_super) {
|