ng-inail-common 2.0.30 → 2.0.31-beta.0
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 +29 -1
- 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-time/input-time.component.js +31 -3
- package/fesm2015/ng-inail-common.js +29 -1
- package/fesm2015/ng-inail-common.js.map +1 -1
- package/lib/components/core/form/input-time/input-time.component.d.ts +3 -0
- package/ng-inail-common.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -6742,6 +6742,34 @@
|
|
|
6742
6742
|
ev.preventDefault();
|
|
6743
6743
|
}
|
|
6744
6744
|
};
|
|
6745
|
+
InputTimeComponent.prototype.onFocusOut = function () {
|
|
6746
|
+
this.completaValoreInInput();
|
|
6747
|
+
};
|
|
6748
|
+
InputTimeComponent.prototype.completaParteOrario = function (value) {
|
|
6749
|
+
if (isBlankOrNull(value)) {
|
|
6750
|
+
value = '00';
|
|
6751
|
+
}
|
|
6752
|
+
else if (value.length == 1) {
|
|
6753
|
+
value = "0" + value;
|
|
6754
|
+
}
|
|
6755
|
+
return value;
|
|
6756
|
+
};
|
|
6757
|
+
InputTimeComponent.prototype.completaValoreInInput = function () {
|
|
6758
|
+
if (isNotBlankOrNull(this.inputValue) && (this.inputValue.length < 5 || (this.withSeconds && this.inputValue.length < 8))) {
|
|
6759
|
+
var partiOrario = this.inputValue.split(':');
|
|
6760
|
+
var numeroParti = this.withSeconds ? 3 : 2;
|
|
6761
|
+
for (var i = 0; i < numeroParti; i++) {
|
|
6762
|
+
partiOrario[i] = this.completaParteOrario(partiOrario[i]);
|
|
6763
|
+
}
|
|
6764
|
+
var value = partiOrario[0] + ":" + partiOrario[1];
|
|
6765
|
+
if (partiOrario[2]) {
|
|
6766
|
+
value = value + ":" + partiOrario[2];
|
|
6767
|
+
}
|
|
6768
|
+
if (value && this.isValidValue(value)) {
|
|
6769
|
+
this.setValue(value);
|
|
6770
|
+
}
|
|
6771
|
+
}
|
|
6772
|
+
};
|
|
6745
6773
|
InputTimeComponent.prototype.ngOnDestroy = function () {
|
|
6746
6774
|
_super.prototype.ngOnDestroy.call(this);
|
|
6747
6775
|
};
|
|
@@ -6750,7 +6778,7 @@
|
|
|
6750
6778
|
InputTimeComponent.decorators = [
|
|
6751
6779
|
{ type: core.Component, args: [{
|
|
6752
6780
|
selector: 'inail-input-time',
|
|
6753
|
-
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",
|
|
6781
|
+
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 (focusout)=\"onFocusOut()\"\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",
|
|
6754
6782
|
changeDetection: CHANGE_DETECTION_STRATEGY,
|
|
6755
6783
|
encapsulation: core.ViewEncapsulation.None,
|
|
6756
6784
|
providers: [
|