ng-inail-common 2.0.30-beta.4 → 2.0.30-beta.8
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/ng-inail-common.umd.js +14 -7
- package/bundles/ng-inail-common.umd.js.map +1 -1
- package/bundles/ng-inail-common.umd.min.js +1 -1
- package/bundles/ng-inail-common.umd.min.js.map +1 -1
- package/esm2015/lib/components/core/form/input-date/input-date.component.js +3 -1
- package/esm2015/lib/components/core/form/input-time/input-time.component.js +13 -8
- package/fesm2015/ng-inail-common.js +14 -7
- package/fesm2015/ng-inail-common.js.map +1 -1
- package/lib/components/core/form/input-time/input-time.component.d.ts +2 -0
- package/ng-inail-common.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -4155,6 +4155,8 @@
|
|
|
4155
4155
|
if (changes.value && !changes.value.firstChange) {
|
|
4156
4156
|
this.hasError = false;
|
|
4157
4157
|
this.error = undefined;
|
|
4158
|
+
this.hasErrorChange.emit(this.hasError);
|
|
4159
|
+
this.errorChange.emit(this.error);
|
|
4158
4160
|
}
|
|
4159
4161
|
// Se cambiano le options o gli array delle date abilitate/disabilitate
|
|
4160
4162
|
// reinizializzo il componente
|
|
@@ -6767,9 +6769,9 @@
|
|
|
6767
6769
|
_this = _super.call(this, cdr, libConfig) || this;
|
|
6768
6770
|
_this.cdr = cdr;
|
|
6769
6771
|
_this.libConfig = libConfig;
|
|
6770
|
-
_this.timeHMRegex = new RegExp(/^((([01]
|
|
6771
|
-
_this.timeHMSRegex = new RegExp(/^((([01]
|
|
6772
|
-
_this.validInputRegx = new RegExp(/^([0-9]+[0-9:]*)$/
|
|
6772
|
+
_this.timeHMRegex = new RegExp(/^((([01]\d)|([2][0-3]))[:]([0-5]\d)$)/);
|
|
6773
|
+
_this.timeHMSRegex = new RegExp(/^((([01]\d)|([2][0-3]))[:]([0-5]\d)[:]([0-5]\d)$)/);
|
|
6774
|
+
_this.validInputRegx = new RegExp(/^([0-9]+[0-9:]*)$/);
|
|
6773
6775
|
_this.nativeInputTypeTime = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.inputTimeComponent) === null || _b === void 0 ? void 0 : _b.nativeInputTypeTime, false);
|
|
6774
6776
|
_this.withSeconds = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.inputTimeComponent) === null || _d === void 0 ? void 0 : _d.withSeconds, false);
|
|
6775
6777
|
_this.selfValidation = getConfigValue((_f = (_e = _this.libConfig) === null || _e === void 0 ? void 0 : _e.inputTimeComponent) === null || _f === void 0 ? void 0 : _f.selfValidation, true);
|
|
@@ -6794,22 +6796,26 @@
|
|
|
6794
6796
|
var _a, _b, _c;
|
|
6795
6797
|
_super.prototype.ngOnChanges.call(this, changes);
|
|
6796
6798
|
if (((_a = changes === null || changes === void 0 ? void 0 : changes.withSeconds) === null || _a === void 0 ? void 0 : _a.currentValue) != undefined) {
|
|
6797
|
-
this.
|
|
6799
|
+
this.defaultPlaceholder = getConfigValue((_c = (_b = this.libConfig) === null || _b === void 0 ? void 0 : _b.inputTimeComponent) === null || _c === void 0 ? void 0 : _c.placeholder, this.withSeconds ? HMS_PLACEHOLDER : HM_PLACEHOLDER);
|
|
6798
6800
|
}
|
|
6799
|
-
this.
|
|
6801
|
+
this.placeholderVisualizzato = this.getNotBlankValue(this.placeholder) || this.defaultPlaceholder;
|
|
6800
6802
|
this.cdr.detectChanges();
|
|
6801
6803
|
};
|
|
6802
6804
|
InputTimeComponent.prototype.ngOnInit = function () {
|
|
6803
6805
|
var _this = this;
|
|
6806
|
+
var _a, _b;
|
|
6804
6807
|
_super.prototype.ngOnInit.call(this);
|
|
6805
6808
|
this.emitDebug("@ViewChild('formControl')");
|
|
6806
6809
|
this.emitDebug(this.formControlElement);
|
|
6810
|
+
this.defaultPlaceholder = getConfigValue((_b = (_a = this.libConfig) === null || _a === void 0 ? void 0 : _a.inputTimeComponent) === null || _b === void 0 ? void 0 : _b.placeholder, this.withSeconds ? HMS_PLACEHOLDER : HM_PLACEHOLDER);
|
|
6811
|
+
this.placeholderVisualizzato = this.getNotBlankValue(this.placeholder) || this.defaultPlaceholder;
|
|
6807
6812
|
if (this.focus) {
|
|
6808
6813
|
this.push(this.focus.subscribe(function (scroll) {
|
|
6809
6814
|
_this.emitDebug("Catch focus!");
|
|
6810
6815
|
setFocus(_this.formControlElement.nativeElement, scroll);
|
|
6811
6816
|
}));
|
|
6812
6817
|
}
|
|
6818
|
+
this.cdr.detectChanges();
|
|
6813
6819
|
};
|
|
6814
6820
|
InputTimeComponent.prototype.ngAfterViewInit = function () {
|
|
6815
6821
|
};
|
|
@@ -6836,6 +6842,7 @@
|
|
|
6836
6842
|
value = this.bonificaValore(value);
|
|
6837
6843
|
this.inputValue = this.isBefore2Points(value) ? value + ":" : value;
|
|
6838
6844
|
if (isNotBlankOrNull(this.inputValue) && this.selfValidation && !this.isValidValue(this.inputValue)) {
|
|
6845
|
+
// console.warn(this.inputValue, this.selfValidation, !this.isValidValue(this.inputValue))
|
|
6839
6846
|
this.setDescError(this.selfValidationError);
|
|
6840
6847
|
}
|
|
6841
6848
|
else {
|
|
@@ -6889,7 +6896,7 @@
|
|
|
6889
6896
|
InputTimeComponent.decorators = [
|
|
6890
6897
|
{ type: core.Component, args: [{
|
|
6891
6898
|
selector: 'inail-input-time',
|
|
6892
|
-
template: "<div class=\"form-group {{getResponsiveClass()}} noPaddingLeft {{class}} inail-input-time\"\n [ngClass]=\"{'has-error': isThereError()}\">\n <label *ngIf=\"label\"\n class=\"control-label {{labelClass}}\"\n [ngClass]=\"{'sr-only': hiddenLabel}\"\n [attr.title]=\"labelTitle\"\n [for]=\"id\"\n [innerHTML]=\"getLabel()\"></label>\n <span *ngIf=\"showPopover()\"\n [style.padding-left.px]=\"5\">\n <inail-popover [iconClass]=\"popoverButtonIcon\"\n [buttonTitle]=\"popoverButtonTitle\"\n [header]=\"popoverHeader\"\n [content]=\"popoverContent\">\n </inail-popover>\n </span>\n <div class=\"form-control-wrapper\"\n [ngClass]=\"{'no-label' : hiddenLabel || !label}\">\n <input #formControl\n [id]=\"id\"\n [attr.type]=\"getType()\"\n [attr.step]=\"getStep()\"\n class=\"form-control {{inputClass}}\"\n [ngClass]=\"{'disabled': disabled}\"\n [attr.name]=\"name\"\n [attr.title]=\"title\"\n [attr.maxlength]=\"getMaxLength()\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.placeholder]=\"
|
|
6899
|
+
template: "<div class=\"form-group {{getResponsiveClass()}} noPaddingLeft {{class}} inail-input-time\"\n [ngClass]=\"{'has-error': isThereError()}\">\n <label *ngIf=\"label\"\n class=\"control-label {{labelClass}}\"\n [ngClass]=\"{'sr-only': hiddenLabel}\"\n [attr.title]=\"labelTitle\"\n [for]=\"id\"\n [innerHTML]=\"getLabel()\"></label>\n <span *ngIf=\"showPopover()\"\n [style.padding-left.px]=\"5\">\n <inail-popover [iconClass]=\"popoverButtonIcon\"\n [buttonTitle]=\"popoverButtonTitle\"\n [header]=\"popoverHeader\"\n [content]=\"popoverContent\">\n </inail-popover>\n </span>\n <div class=\"form-control-wrapper\"\n [ngClass]=\"{'no-label' : hiddenLabel || !label}\">\n <input #formControl\n [id]=\"id\"\n [attr.type]=\"getType()\"\n [attr.step]=\"getStep()\"\n class=\"form-control {{inputClass}}\"\n [ngClass]=\"{'disabled': disabled}\"\n [attr.name]=\"name\"\n [attr.title]=\"title\"\n [attr.maxlength]=\"getMaxLength()\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.placeholder]=\"placeholderVisualizzato\"\n [attr.aria-required]=\"required === true ? true : undefined\"\n [attr.aria-invalid]=\"isThereError() === true ? true : undefined\"\n [attr.aria-describedBy]=\"getAriaDescribedBy()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\"\n (paste)=\"onPaste($event)\"\n (keyup.enter)=\"enterUp.emit()\"\n [(ngModel)]=\"value\">\n </div>\n <div *ngIf=\"showError()\" [id]=\"id+'-description'\">\n <div class=\"msg msg-errore\">\n <strong [innerHTML]=\"'ERRORE: '+this.error\"></strong>\n </div>\n <div *ngIf=\"description\" [innerHTML]=\"this.description\"></div>\n </div>\n <div *ngIf=\"description && !showError()\"\n [id]=\"id+'-description'\"\n [innerHTML]=\"this.description\">\n </div>\n <debug-pre *ngIf=\"showState\">\n <state-propertie [label]=\"'id'\" [propertie]=\"id\"></state-propertie>\n <state-propertie [label]=\"'label'\" [propertie]=\"label\"></state-propertie>\n <state-propertie [label]=\"'inputValue'\" [propertie]=\"inputValue\"></state-propertie>\n <state-propertie [label]=\"'placeholder'\" [propertie]=\"placeholder\"></state-propertie>\n <state-propertie [label]=\"'defaultPlaceholder'\" [propertie]=\"defaultPlaceholder\"></state-propertie>\n <inail-form-element-state-properties [formElement]=\"this\"></inail-form-element-state-properties>\n </debug-pre>\n</div>\n",
|
|
6893
6900
|
changeDetection: CHANGE_DETECTION_STRATEGY,
|
|
6894
6901
|
encapsulation: core.ViewEncapsulation.None,
|
|
6895
6902
|
providers: [
|
|
@@ -6899,7 +6906,7 @@
|
|
|
6899
6906
|
multi: true
|
|
6900
6907
|
}
|
|
6901
6908
|
],
|
|
6902
|
-
styles: [".inail-input-time .form-control-wrapper:after{font-family:FontAwesome;content:\"\\f017\";right:30px;position:absolute;top:30px;
|
|
6909
|
+
styles: [".inail-input-time .form-control-wrapper:after{font-family:FontAwesome;content:\"\\f017\";right:30px;position:absolute;top:30px;font-size:17px}.inail-input-time input[type=time]{padding-right:33px}.inail-input-time .form-control-wrapper.no-label:after{top:11px}"]
|
|
6903
6910
|
},] }
|
|
6904
6911
|
];
|
|
6905
6912
|
InputTimeComponent.ctorParameters = function () { return [
|