ng-inail-common 2.0.32-beta.2 → 2.0.32-beta.22
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 +165 -27
- package/bundles/ng-inail-common.umd.js.map +1 -1
- package/bundles/ng-inail-common.umd.min.js +2 -2
- package/bundles/ng-inail-common.umd.min.js.map +1 -1
- package/esm2015/lib/components/core/form/input-date/input-date.component.js +20 -12
- package/esm2015/lib/components/core/form/input-number/input-number.component.js +38 -6
- package/esm2015/lib/components/core/form/radio-select/radio-select.component.js +2 -2
- package/esm2015/lib/components/core/form/select/select.component.js +12 -2
- package/esm2015/lib/components/core/layout/menu/menu.component.js +6 -6
- package/esm2015/lib/components/core/table/table/table.component.js +8 -2
- package/esm2015/lib/components/core/table/tr-accordion/tr-accordion.component.js +63 -0
- package/esm2015/lib/components/core/ux/alert/alert.component.js +3 -3
- package/esm2015/lib/components/core/ux/confirm/confirm.component.js +3 -3
- package/esm2015/lib/components/core/ux/feedback/feedback.component.js +4 -3
- package/esm2015/lib/components/core/ux/modal/modal.component.js +6 -3
- package/esm2015/lib/ng-inail-common.config.js +2 -2
- package/esm2015/lib/ng-inail-common.module.js +6 -3
- package/esm2015/lib/utils/date.operators.js +9 -1
- package/esm2015/public-api.js +2 -1
- package/fesm2015/ng-inail-common.js +157 -28
- package/fesm2015/ng-inail-common.js.map +1 -1
- package/lib/components/core/form/input-date/input-date.component.d.ts +7 -4
- package/lib/components/core/form/input-number/input-number.component.d.ts +1 -0
- package/lib/components/core/layout/menu/menu.component.d.ts +2 -2
- package/lib/components/core/table/table/table.component.d.ts +1 -0
- package/lib/components/core/table/tr-accordion/tr-accordion.component.d.ts +19 -0
- package/lib/components/core/ux/feedback/feedback.component.d.ts +2 -1
- package/lib/components/core/ux/modal/modal.component.d.ts +1 -0
- package/lib/ng-inail-common.config.d.ts +5 -1
- package/lib/utils/date.operators.d.ts +4 -0
- package/ng-inail-common.metadata.json +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -1672,9 +1672,9 @@
|
|
|
1672
1672
|
*/
|
|
1673
1673
|
_this.expandAutomatically = getConfigValue((_k = (_j = _this.libConfig) === null || _j === void 0 ? void 0 : _j.menuComponent) === null || _k === void 0 ? void 0 : _k.expandAutomatically, true);
|
|
1674
1674
|
/**
|
|
1675
|
-
* Emette
|
|
1675
|
+
* Emette l'oggetto MenuItem associato alla voce di menu sulla quale si e' cliccato.
|
|
1676
1676
|
*/
|
|
1677
|
-
_this.
|
|
1677
|
+
_this.itemClick = new core.EventEmitter();
|
|
1678
1678
|
/**
|
|
1679
1679
|
* Emette la voce di menu che corrisponde
|
|
1680
1680
|
* con l'url corrente
|
|
@@ -2042,7 +2042,7 @@
|
|
|
2042
2042
|
}
|
|
2043
2043
|
}
|
|
2044
2044
|
}
|
|
2045
|
-
this.
|
|
2045
|
+
this.itemClick.emit(item);
|
|
2046
2046
|
};
|
|
2047
2047
|
/**
|
|
2048
2048
|
* Effetto fisarmonica
|
|
@@ -2099,7 +2099,7 @@
|
|
|
2099
2099
|
MenuComponent.decorators = [
|
|
2100
2100
|
{ type: core.Component, args: [{
|
|
2101
2101
|
selector: 'inail-menu',
|
|
2102
|
-
template: "<ng-container *ngIf=\"inizializzazioneCompletata\">\n\n <ul #menu\n id=\"{{id}}\"\n [attr.role]=\"'menu'\"\n class=\"inail-menu {{class}}\"\n [ngStyle]=\"{'height.px': (menuHeight$ | async)}\"\n [ngClass]=\"{'livello_2': innerMenu, 'collapsed': isCollapsed()}\">\n\n <debug-pre *ngIf=\"showState\">[inail-menu-intranet]<br>\n <state-propertie [label]=\"'id'\" [propertie]=\"id\"></state-propertie>\n <state-propertie [label]=\"'innerMenu'\" [propertie]=\"innerMenu\"></state-propertie>\n <state-propertie [label]=\"'collapsible'\" [propertie]=\"collapsible\"></state-propertie>\n <state-propertie [label]=\"'collapsed'\" [propertie]=\"collapsed\"></state-propertie>\n <state-propertie [label]=\"'collapseOther'\" [propertie]=\"collapseOther\"></state-propertie>\n <!-- {{elements | json}}-->\n </debug-pre>\n\n <ng-container *ngFor=\"let item of items\">\n\n <li *ngIf=\"showItem(item)\"\n [attr.role]=\"item.link ? 'menuitem' : undefined\"\n [ngClass]=\"{selected: isActive(item)}\"\n class=\"livello_1\">\n <a *ngIf=\"item.link\"\n [id]=\"item.id\"\n [attr.title]=\"getItemTitle(item)\"\n [attr.aria-label]=\"getItemAriaLabel(item)\"\n [attr.tabindex]=\"isCollapsed() ? '-1' : '0'\"\n [routerLink]=\"getItemLink(item)\"\n [queryParams]=\"item.queryParams\"\n [innerHTML]=\"getItemLabel(item)\"\n [attr.aria-expanded]=\"isItemCollapsible(item) ? !item.collapsed : undefined\"\n (click)=\"itemOnClick(item)\"\n (keyup.arrowUp)=\"itemOnArrowUp()\"\n (keyup.arrowDown)=\"itemOnArrowDown()\"\n (keyup.space)=\"itemOnClick($event)\">\n </a>\n <a *ngIf=\"!item.link\"\n [id]=\"item.id\"\n [attr.title]=\"getItemTitle(item)\"\n [attr.aria-label]=\"getItemAriaLabel(item)\"\n [attr.tabindex]=\"isCollapsed() ? '-1' : '0'\"\n role=\"button\"\n [innerHTML]=\"getItemLabel(item)\"\n [attr.aria-expanded]=\"isItemCollapsible(item) ? !item.collapsed : undefined\"\n (click)=\"itemOnClick(item)\"\n (keyup.arrowUp)=\"itemOnArrowUp()\"\n (keyup.arrowDown)=\"itemOnArrowDown()\"\n (keyup.enter)=\"itemOnClick(item)\"\n (keyup.space)=\"itemOnClick(item)\">\n </a>\n <debug-pre *ngIf=\"showState\">[menu-item]<br>\n <state-propertie [label]=\"'id'\" [propertie]=\"item.id\"></state-propertie>\n <state-propertie [label]=\"'collapsible'\" [propertie]=\"item.collapsible\"></state-propertie>\n <state-propertie [label]=\"'collapsed'\" [propertie]=\"item.collapsed\"></state-propertie>\n <!-- {{element | json}}-->\n </debug-pre>\n <inail-menu *ngIf=\"hasSubItems(item)\"\n [id]=\"item.id+'-items'\"\n [activeItem]=\"activeItem\"\n [items]=\"item.subItems\"\n [parent]=\"item\"\n [innerMenu]=\"true\"\n [emitCurrent]=\"emitCurrent\"\n [collapsible]=\"item.collapsible\"\n [collapsed]=\"item.collapsed\"\n [collapseOther]=\"collapseOther\"\n [collapse]=\"collapse\"\n [toggle]=\"toggle\"\n [show]=\"mostraItem\"\n [showState]=\"showState\"\n (
|
|
2102
|
+
template: "<ng-container *ngIf=\"inizializzazioneCompletata\">\n\n <ul #menu\n id=\"{{id}}\"\n [attr.role]=\"'menu'\"\n class=\"inail-menu {{class}}\"\n [ngStyle]=\"{'height.px': (menuHeight$ | async)}\"\n [ngClass]=\"{'livello_2': innerMenu, 'collapsed': isCollapsed()}\">\n\n <debug-pre *ngIf=\"showState\">[inail-menu-intranet]<br>\n <state-propertie [label]=\"'id'\" [propertie]=\"id\"></state-propertie>\n <state-propertie [label]=\"'innerMenu'\" [propertie]=\"innerMenu\"></state-propertie>\n <state-propertie [label]=\"'collapsible'\" [propertie]=\"collapsible\"></state-propertie>\n <state-propertie [label]=\"'collapsed'\" [propertie]=\"collapsed\"></state-propertie>\n <state-propertie [label]=\"'collapseOther'\" [propertie]=\"collapseOther\"></state-propertie>\n <!-- {{elements | json}}-->\n </debug-pre>\n\n <ng-container *ngFor=\"let item of items\">\n\n <li *ngIf=\"showItem(item)\"\n [attr.role]=\"item.link ? 'menuitem' : undefined\"\n [ngClass]=\"{selected: isActive(item)}\"\n class=\"livello_1\">\n <a *ngIf=\"item.link\"\n [id]=\"item.id\"\n [attr.title]=\"getItemTitle(item)\"\n [attr.aria-label]=\"getItemAriaLabel(item)\"\n [attr.tabindex]=\"isCollapsed() ? '-1' : '0'\"\n [routerLink]=\"getItemLink(item)\"\n [queryParams]=\"item.queryParams\"\n [innerHTML]=\"getItemLabel(item)\"\n [attr.aria-expanded]=\"isItemCollapsible(item) ? !item.collapsed : undefined\"\n (click)=\"itemOnClick(item)\"\n (keyup.arrowUp)=\"itemOnArrowUp()\"\n (keyup.arrowDown)=\"itemOnArrowDown()\"\n (keyup.space)=\"itemOnClick($event)\">\n </a>\n <a *ngIf=\"!item.link\"\n [id]=\"item.id\"\n [attr.title]=\"getItemTitle(item)\"\n [attr.aria-label]=\"getItemAriaLabel(item)\"\n [attr.tabindex]=\"isCollapsed() ? '-1' : '0'\"\n role=\"button\"\n [innerHTML]=\"getItemLabel(item)\"\n [attr.aria-expanded]=\"isItemCollapsible(item) ? !item.collapsed : undefined\"\n (click)=\"itemOnClick(item)\"\n (keyup.arrowUp)=\"itemOnArrowUp()\"\n (keyup.arrowDown)=\"itemOnArrowDown()\"\n (keyup.enter)=\"itemOnClick(item)\"\n (keyup.space)=\"itemOnClick(item)\">\n </a>\n <debug-pre *ngIf=\"showState\">[menu-item]<br>\n <state-propertie [label]=\"'id'\" [propertie]=\"item.id\"></state-propertie>\n <state-propertie [label]=\"'collapsible'\" [propertie]=\"item.collapsible\"></state-propertie>\n <state-propertie [label]=\"'collapsed'\" [propertie]=\"item.collapsed\"></state-propertie>\n <!-- {{element | json}}-->\n </debug-pre>\n <inail-menu *ngIf=\"hasSubItems(item)\"\n [id]=\"item.id+'-items'\"\n [activeItem]=\"activeItem\"\n [items]=\"item.subItems\"\n [parent]=\"item\"\n [innerMenu]=\"true\"\n [emitCurrent]=\"emitCurrent\"\n [collapsible]=\"item.collapsible\"\n [collapsed]=\"item.collapsed\"\n [collapseOther]=\"collapseOther\"\n [collapse]=\"collapse\"\n [toggle]=\"toggle\"\n [show]=\"mostraItem\"\n [showState]=\"showState\"\n (itemClick)=\"itemClick.emit($event)\"\n (currentItem)=\"currentItemHandler($event, item)\">\n </inail-menu>\n </li>\n </ng-container>\n </ul>\n</ng-container>\n\n\n",
|
|
2103
2103
|
encapsulation: core.ViewEncapsulation.None,
|
|
2104
2104
|
styles: ["ul.inail-menu{padding:0 10px!important;overflow:hidden;transition:height .3s ease-out}ul.inail-menu.collapsed{height:0}ul.inail-menu ul{padding:0!important}"]
|
|
2105
2105
|
},] }
|
|
@@ -2124,7 +2124,7 @@
|
|
|
2124
2124
|
collapsed: [{ type: core.Input }],
|
|
2125
2125
|
collapseOther: [{ type: core.Input }],
|
|
2126
2126
|
expandAutomatically: [{ type: core.Input }],
|
|
2127
|
-
|
|
2127
|
+
itemClick: [{ type: core.Output }],
|
|
2128
2128
|
currentItem: [{ type: core.Output }],
|
|
2129
2129
|
menu: [{ type: core.ViewChild, args: ['menu',] }]
|
|
2130
2130
|
};
|
|
@@ -3194,6 +3194,14 @@
|
|
|
3194
3194
|
var isValidDateObject = function (s) { return s && !!s.getFullYear(); };
|
|
3195
3195
|
var isInvalidDateObject = function (d) { return d && d.toString() === 'Invalid Date'; };
|
|
3196
3196
|
var addZero = function (n) { return n < 10 ? "0" + n : "" + n; };
|
|
3197
|
+
var isFutureDate = function (s) { return compareDate(new Date(s), new Date()) > 0; };
|
|
3198
|
+
var isPastDate = function (s) { return compareDate(new Date(s), new Date()) < 0; };
|
|
3199
|
+
var isToday = function (s) { return compareDate(new Date(s), new Date()) == 0; };
|
|
3200
|
+
var compareDate = function (d1, d2) {
|
|
3201
|
+
d1.setHours(0, 0, 0, 0);
|
|
3202
|
+
d2.setHours(0, 0, 0, 0);
|
|
3203
|
+
return d1.getTime() > d2.getTime() ? 1 : (d1.getTime() < d2.getTime() ? -1 : 0);
|
|
3204
|
+
};
|
|
3197
3205
|
|
|
3198
3206
|
var InputTextComponent = /** @class */ (function (_super) {
|
|
3199
3207
|
__extends(InputTextComponent, _super);
|
|
@@ -3376,7 +3384,17 @@
|
|
|
3376
3384
|
_this.cdr.detectChanges();
|
|
3377
3385
|
_this.emitDebug("this.valueChange.emit(" + _this.selectedValue + ")");
|
|
3378
3386
|
_this.valueChange.emit(_this.selectedValue);
|
|
3379
|
-
|
|
3387
|
+
var optionToEmit;
|
|
3388
|
+
if (_this.options) {
|
|
3389
|
+
optionToEmit = _this.options.find(function (opt) { return (opt === null || opt === void 0 ? void 0 : opt.value) === _this.selectedValue; });
|
|
3390
|
+
// this.select.emit(this.options.find(opt => opt?.value === this.selectedValue));
|
|
3391
|
+
}
|
|
3392
|
+
if (!optionToEmit && _this.blankOption && _this.selectedValue === '') {
|
|
3393
|
+
optionToEmit = { value: '', label: _this.blankOptionText };
|
|
3394
|
+
}
|
|
3395
|
+
if (optionToEmit) {
|
|
3396
|
+
_this.select.emit(optionToEmit);
|
|
3397
|
+
}
|
|
3380
3398
|
if (_this.cleanErrorOnChange) {
|
|
3381
3399
|
_this.cleanError();
|
|
3382
3400
|
}
|
|
@@ -3583,6 +3601,7 @@
|
|
|
3583
3601
|
// Queste inizializzazioni servono per essere usate nel template
|
|
3584
3602
|
_this.errorType = 'ERROR';
|
|
3585
3603
|
_this.successType = 'SUCCESS';
|
|
3604
|
+
_this.warningType = 'WARNING';
|
|
3586
3605
|
_this.type = 'SUCCESS';
|
|
3587
3606
|
_this.showIcon = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.feedbackComponent) === null || _b === void 0 ? void 0 : _b.showIcon, true);
|
|
3588
3607
|
_this.detailsAsList = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.feedbackComponent) === null || _d === void 0 ? void 0 : _d.detailsAsList, undefined);
|
|
@@ -3637,10 +3656,10 @@
|
|
|
3637
3656
|
FeedbackComponent.decorators = [
|
|
3638
3657
|
{ type: core.Component, args: [{
|
|
3639
3658
|
selector: 'inail-feedback',
|
|
3640
|
-
template: "<div *ngIf=\"!labelFeedback\"\n [id]='id'\n class=\"row feedback-box inail-feedback {{class}}\"\n [ngClass]=\"{'feedback-box-error': type==errorType, 'global-feedback': globalFeedback === true}\">\n <div>\n <div class=\"feedback-header\"\n [ngClass]=\"{'feedback-header-error': type==errorType}\">\n <span>\n <span class=\"fa white-check\"\n [ngClass]=\"{'fa-times': showIcon && type==errorType,\n 'fa-check':showIcon && (type==successType || !type)}\"></span>\n <span tabindex=\"0\" [id]=\"id+'-message'\" class=\"feedback-focusable\" [innerHTML]=\"message\" #mainMessage></span>\n </span>\n </div>\n <div [hidden]=\"!hasContent()\"\n class=\"feedback-content\"\n [ngClass]=\"contentClass\"\n #feedbackContent>\n <p *ngIf=\"contentTitle\">\n <strong>{{contentTitle}}</strong>\n </p>\n <ng-container *ngIf=\"detailsAsList || detailsAsOrderedList\">\n <ol *ngIf=\"detailsAsOrderedList\">\n <li *ngFor=\"let dettaglio of details\" [innerHTML]=\"dettaglio\"></li>\n </ol>\n <ul *ngIf=\"detailsAsList && !detailsAsOrderedList\">\n <li *ngFor=\"let dettaglio of details\" [innerHTML]=\"dettaglio\"></li>\n </ul>\n </ng-container>\n <ng-container *ngIf=\"!(detailsAsList || detailsAsOrderedList)\">\n <p *ngFor=\"let dettaglio of details\" [innerHTML]=\"dettaglio\"></p>\n </ng-container>\n <p
|
|
3659
|
+
template: "<div *ngIf=\"!labelFeedback\"\n [id]='id'\n class=\"row feedback-box inail-feedback {{class}}\"\n [ngClass]=\"{'feedback-box-error': type==errorType, 'feedback-box-warning': type==warningType, 'global-feedback': globalFeedback === true}\">\n <div>\n <div class=\"feedback-header\"\n [ngClass]=\"{'feedback-header-error': type==errorType, 'feedback-header-warning': type==warningType}\">\n <span>\n <span class=\"fa white-check\"\n [ngClass]=\"{'fa-times': showIcon && type==errorType, 'fa-exclamation-triangle': showIcon && type==warningType,\n 'fa-check':showIcon && (type==successType || !type)}\"></span>\n <span tabindex=\"0\" [id]=\"id+'-message'\" class=\"feedback-focusable\" [innerHTML]=\"message\" #mainMessage></span>\n </span>\n </div>\n <div [hidden]=\"!hasContent()\"\n class=\"feedback-content\"\n [ngClass]=\"contentClass\"\n #feedbackContent>\n <p *ngIf=\"contentTitle\">\n <strong>{{contentTitle}}</strong>\n </p>\n <ng-container *ngIf=\"detailsAsList || detailsAsOrderedList\">\n <ol *ngIf=\"detailsAsOrderedList\">\n <li *ngFor=\"let dettaglio of details\" [innerHTML]=\"dettaglio\"></li>\n </ol>\n <ul *ngIf=\"detailsAsList && !detailsAsOrderedList\">\n <li *ngFor=\"let dettaglio of details\" [innerHTML]=\"dettaglio\"></li>\n </ul>\n </ng-container>\n <ng-container *ngIf=\"!(detailsAsList || detailsAsOrderedList)\">\n <p *ngFor=\"let dettaglio of details\" [innerHTML]=\"dettaglio\"></p>\n </ng-container>\n <p [style.padding-bottom]=\"0\">\n <ng-content></ng-content>\n </p>\n </div>\n </div>\n</div>\n<span *ngIf=\"labelFeedback\"\n [id]='id'\n class=\"inail-feedback col-xs-12 form-group {{class}}\"\n [ngClass]=\"{'feedback-box-error': type==errorType, 'feedback-box-warning': type==warningType, 'global-feedback': globalFeedback === true}\">\n <span *ngIf=\"showIcon\"\n class=\"green-check fa fa-check-circle\"\n [ngClass]=\"{\n 'green-check fa-check-circle': type==successType || !type,\n 'red-check fa-times-circle': type==errorType,\n 'red-check fa-exclamation-circle': type==warningType\n }\"></span>\n <strong tabindex=\"0\"\n [id]=\"id+'-message'\"\n class=\"labelFeedback feedback-focusable\"\n [innerHTML]=\"message\" #mainMessage>\n </strong>\n</span>\n",
|
|
3641
3660
|
changeDetection: CHANGE_DETECTION_STRATEGY,
|
|
3642
3661
|
encapsulation: core.ViewEncapsulation.None,
|
|
3643
|
-
styles: [".inail-feedback.feedback-box{margin-bottom:15px!important}.inail-feedback .feedback-content{padding-top:30px!important}.inail-feedback .feedback-content p{padding-top:0!important}.inail-feedback .feedback-header .feedback-focusable:focus{outline:1px dotted #fff!important}.inail-feedback .fa.fa-times-circle{color:#c9291b;margin-right:5px}"]
|
|
3662
|
+
styles: [".inail-feedback.feedback-box{margin-bottom:15px!important}.inail-feedback .feedback-content{padding-top:30px!important}.inail-feedback .feedback-content p{padding-top:0!important}.inail-feedback .feedback-header .feedback-focusable:focus{outline:1px dotted #fff!important}.inail-feedback .fa.fa-times-circle{color:#c9291b;margin-right:5px}.inail-feedback .fa.fa-exclamation-circle{color:#ffaa02;margin-right:5px}.inail-feedback .feedback-header-warning{color:#000;background-color:#ffaa02!important}.inail-feedback .feedback-header.feedback-header-warning span{color:#000}.inail-feedback .feedback-content p:last-child{padding-bottom:0!important}"]
|
|
3644
3663
|
},] }
|
|
3645
3664
|
];
|
|
3646
3665
|
FeedbackComponent.ctorParameters = function () { return [
|
|
@@ -4148,7 +4167,7 @@
|
|
|
4148
4167
|
var ɵ0$3 = isValidInputModel;
|
|
4149
4168
|
var isLongTime = function (o) { return o && (typeof o === 'number'); };
|
|
4150
4169
|
var ɵ1$2 = isLongTime;
|
|
4151
|
-
var ACCEPTED_INPUTS = ['/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'Backspace', 'Delete',
|
|
4170
|
+
var ACCEPTED_INPUTS = ['/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'Backspace', 'Delete', 'Tab', 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'];
|
|
4152
4171
|
var InputDateComponent = /** @class */ (function (_super) {
|
|
4153
4172
|
__extends(InputDateComponent, _super);
|
|
4154
4173
|
function InputDateComponent(cdr, libConfig) {
|
|
@@ -4164,16 +4183,21 @@
|
|
|
4164
4183
|
_this.options = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.inputDateComponent) === null || _b === void 0 ? void 0 : _b.options, undefined);
|
|
4165
4184
|
_this.selfValidation = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.inputDateComponent) === null || _d === void 0 ? void 0 : _d.selfValidation, true);
|
|
4166
4185
|
_this.selfValidationError = getConfigValue((_f = (_e = _this.libConfig) === null || _e === void 0 ? void 0 : _e.inputDateComponent) === null || _f === void 0 ? void 0 : _f.selfValidationError, 'La data inserita non è valida');
|
|
4186
|
+
_this.disableFutureDates = false;
|
|
4187
|
+
_this.disablePastDates = false;
|
|
4167
4188
|
_this.isValidInputValue = function () { return isBlankOrNull(_this.visibleData) || isInItalianFormat(_this.visibleData); };
|
|
4168
4189
|
_this.isThereDataError = function () { return _this.isThereError() || (!_this.isValidInputValue() && _this.selfValidation); };
|
|
4169
4190
|
_this.showDataError = function () { return _this.isThereDataError() && isNotBlankOrNull(_this.getDescError()); };
|
|
4170
4191
|
_this.getDescError = function () { return (_this.selfValidation && isBlankOrNull(_this.error) && !_this.isValidInputValue()) ? _this.selfValidationError : _this.error; };
|
|
4171
4192
|
_this.isEnabledDate = function (date) {
|
|
4172
4193
|
var dateString = dateToString(date, 'ISO8061');
|
|
4194
|
+
console.warn('isDataAbilitata', dateString, _this.isDataAbilitata(dateString));
|
|
4195
|
+
console.warn('isDataDisabilitata', dateString, _this.isDataDisabilitata(dateString));
|
|
4173
4196
|
return _this.isDataAbilitata(dateString) && !_this.isDataDisabilitata(dateString);
|
|
4174
4197
|
};
|
|
4175
|
-
_this.
|
|
4176
|
-
_this.
|
|
4198
|
+
_this.isPasteOrFutureDisableDate = function (data) { return (_this.disablePastDates === true && isPastDate(data)) || (_this.disableFutureDates === true && isFutureDate(data)); };
|
|
4199
|
+
_this.isDataAbilitata = function (data) { return !_this.isPasteOrFutureDisableDate(data) && (_this.enabledDates == undefined || !_this.enabledDates.length || _this.enabledDates.some(function (regex) { return _this.match(data, regex) != undefined; })); };
|
|
4200
|
+
_this.isDataDisabilitata = function (data) { return _this.isPasteOrFutureDisableDate(data) || (_this.disabledDates != undefined && _this.disabledDates.some(function (regex) { return _this.match(data, regex) != undefined; })); };
|
|
4177
4201
|
_this.match = function (date, regex) { return date != undefined && date.match(new RegExp('^'.concat(regex).concat('$'), 'i')); };
|
|
4178
4202
|
_this.isFirstDigitSlash = function (ev) { return ev.key == '/' && _this.visibleData == undefined; };
|
|
4179
4203
|
_this.isDoubleSlash = function (ev) { return ev.key == '/' && ev.key == _this.previousDigit; };
|
|
@@ -4241,7 +4265,7 @@
|
|
|
4241
4265
|
this.setDatepickerDate(this.visibleData);
|
|
4242
4266
|
}
|
|
4243
4267
|
setTimeout(function () {
|
|
4244
|
-
window['$'](_this.formControlElement.nativeElement).on(
|
|
4268
|
+
window['$'](_this.formControlElement.nativeElement).on('change', function () {
|
|
4245
4269
|
_this.emitDebug('onChange');
|
|
4246
4270
|
_this.emitDebug("current visibleData: " + _this.visibleData);
|
|
4247
4271
|
var elem = window['$'](_this.formControlElement.nativeElement)[0];
|
|
@@ -4257,7 +4281,7 @@
|
|
|
4257
4281
|
};
|
|
4258
4282
|
InputDateComponent.prototype.datepickerInit = function () {
|
|
4259
4283
|
var _a, _b;
|
|
4260
|
-
if (((_a = this.disabledDates) === null || _a === void 0 ? void 0 : _a.length) || ((_b = this.enabledDates) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
4284
|
+
if (((_a = this.disabledDates) === null || _a === void 0 ? void 0 : _a.length) || ((_b = this.enabledDates) === null || _b === void 0 ? void 0 : _b.length) || this.disablePastDates === true || this.disableFutureDates === true) {
|
|
4261
4285
|
this.options.beforeShowDay = this.isEnabledDate;
|
|
4262
4286
|
}
|
|
4263
4287
|
window['$'](this.formControlElement.nativeElement).datepicker(this.options);
|
|
@@ -4266,6 +4290,7 @@
|
|
|
4266
4290
|
window['$'](this.formControlElement.nativeElement).datepicker('remove');
|
|
4267
4291
|
};
|
|
4268
4292
|
InputDateComponent.prototype.datepickerReinit = function () {
|
|
4293
|
+
console.warn(this.disablePastDates);
|
|
4269
4294
|
this.datepickerDestroy();
|
|
4270
4295
|
this.datepickerInit();
|
|
4271
4296
|
};
|
|
@@ -4360,6 +4385,8 @@
|
|
|
4360
4385
|
selfValidationError: [{ type: core.Input }],
|
|
4361
4386
|
enabledDates: [{ type: core.Input }],
|
|
4362
4387
|
disabledDates: [{ type: core.Input }],
|
|
4388
|
+
disableFutureDates: [{ type: core.Input }],
|
|
4389
|
+
disablePastDates: [{ type: core.Input }],
|
|
4363
4390
|
reinit: [{ type: core.Input }],
|
|
4364
4391
|
value: [{ type: core.Input }]
|
|
4365
4392
|
};
|
|
@@ -4464,7 +4491,7 @@
|
|
|
4464
4491
|
RadioSelectComponent.decorators = [
|
|
4465
4492
|
{ type: core.Component, args: [{
|
|
4466
4493
|
selector: 'inail-radio-select',
|
|
4467
|
-
template: "<div [id]='id' class=\"{{getResponsiveClass()}} {{class}} noPadding inail-radio-select\" #formControl>\n <fieldset class=\"form-group col-xs-12 noPaddingLeft\" [id]=\"getName()\"\n role=\"radiogroup\"\n [attr.aria-required]=\"required === true ? true : undefined\">\n <legend class=\"radio-legend {{labelClass}}\"\n [ngStyle]=\"{'display': hiddenLabel ? 'none': 'contents'}\"\n [innerHTML]=\"getLabel()\">\n </legend>\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 <br *ngIf=\"!hiddenLabel\">\n <div class=\"radio {{inline === true ? 'inline' : ''}}\" *ngFor=\"let option of options\">\n <label [for]=\"option?.id\">\n <input [attr.id]=\"option?.id\"\n #inputRadio\n type=\"radio\"\n class=\"{{inputClass}} {{option?.class}}\"\n [name]=\"getName()\"\n [attr.title]=\"option?.title || title\"\n [disabled]=\"disabled\"\n [attr.aria-invalid]=\"isThereError() === true ? true : undefined\"\n [attr.aria-describedBy]=\"getAriaDescribedBy()\"\n [value]=\"option?.value\"\n (blur)=\"onBlur()\"\n (keyup.enter)=\"enterUp.emit()\"\n [(ngModel)]=\"value\">\n <span [innerHTML]=\"option?.label\"\n [ngClass]=\"{'sr-only': hiddenLabel}\">\n </span>\n </label>\n <span *ngIf=\"option?.popover === true\"\n [style.padding-left.px]=\"5\">\n <inail-popover [iconClass]=\"option?.popoverButtonIcon\"\n [buttonTitle]=\"option?.popoverButtonTitle\"\n [header]=\"option?.popoverHeader\"\n [content]=\"option?.popoverContent\">\n </inail-popover>\n </span>\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 </fieldset>\n</div>\n",
|
|
4494
|
+
template: "<div [id]='id' class=\"{{getResponsiveClass()}} {{class}} noPadding inail-radio-select\" #formControl>\n <fieldset class=\"form-group col-xs-12 noPaddingLeft\" [id]=\"getName()\"\n role=\"radiogroup\"\n [attr.aria-required]=\"required === true ? true : undefined\">\n <legend class=\"radio-legend {{labelClass}}\"\n [ngStyle]=\"{'display': hiddenLabel ? 'none': 'contents'}\"\n [innerHTML]=\"getLabel()\">\n </legend>\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 <br *ngIf=\"!hiddenLabel\">\n <div class=\"radio {{inline === true ? 'inline' : ''}}\" *ngFor=\"let option of options\">\n <label [for]=\"option?.id\">\n <input [attr.id]=\"option?.id\"\n #inputRadio\n type=\"radio\"\n class=\"{{inputClass}} {{option?.class}}\"\n [attr.name]=\"getName()\"\n [attr.title]=\"option?.title || title\"\n [disabled]=\"disabled\"\n [attr.aria-invalid]=\"isThereError() === true ? true : undefined\"\n [attr.aria-describedBy]=\"getAriaDescribedBy()\"\n [value]=\"option?.value\"\n (blur)=\"onBlur()\"\n (keyup.enter)=\"enterUp.emit()\"\n [(ngModel)]=\"value\">\n <span [innerHTML]=\"option?.label\"\n [ngClass]=\"{'sr-only': hiddenLabel}\">\n </span>\n </label>\n <span *ngIf=\"option?.popover === true\"\n [style.padding-left.px]=\"5\">\n <inail-popover [iconClass]=\"option?.popoverButtonIcon\"\n [buttonTitle]=\"option?.popoverButtonTitle\"\n [header]=\"option?.popoverHeader\"\n [content]=\"option?.popoverContent\">\n </inail-popover>\n </span>\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 </fieldset>\n</div>\n",
|
|
4468
4495
|
changeDetection: CHANGE_DETECTION_STRATEGY,
|
|
4469
4496
|
encapsulation: core.ViewEncapsulation.None,
|
|
4470
4497
|
providers: [
|
|
@@ -4633,6 +4660,7 @@
|
|
|
4633
4660
|
_this.setFocusOnError = getConfigValue((_h = (_g = _this.libConfig) === null || _g === void 0 ? void 0 : _g.modalComponent) === null || _h === void 0 ? void 0 : _h.setFocusOnError, undefined);
|
|
4634
4661
|
_this.preventPageScroll = getConfigValue((_k = (_j = _this.libConfig) === null || _j === void 0 ? void 0 : _j.modalComponent) === null || _k === void 0 ? void 0 : _k.preventPageScroll, true);
|
|
4635
4662
|
_this.closeOnClick = function () { return _this.showModal(false); };
|
|
4663
|
+
_this.scrollContentTop = function () { return document.querySelector("#" + _this.id + " .modal-body").scrollTop = 0; };
|
|
4636
4664
|
_this.setFocusOnLastPageActiveElement = function () {
|
|
4637
4665
|
if (_this.pageActiveElement != undefined) {
|
|
4638
4666
|
if (window['$'](_this.pageActiveElement).length > 0) {
|
|
@@ -4684,9 +4712,11 @@
|
|
|
4684
4712
|
if (this.preventPageScroll) {
|
|
4685
4713
|
setPageScroll(false);
|
|
4686
4714
|
}
|
|
4715
|
+
setTimeout(function () { return _this.scrollContentTop(); }, 300);
|
|
4687
4716
|
}
|
|
4688
4717
|
else {
|
|
4689
4718
|
this.close.emit();
|
|
4719
|
+
setTimeout(function () { return _this.scrollContentTop(); });
|
|
4690
4720
|
if (this.preventPageScroll) {
|
|
4691
4721
|
this.ripristinaPageScroll();
|
|
4692
4722
|
}
|
|
@@ -4764,10 +4794,10 @@
|
|
|
4764
4794
|
ModalComponent.decorators = [
|
|
4765
4795
|
{ type: core.Component, args: [{
|
|
4766
4796
|
selector: 'inail-modal',
|
|
4767
|
-
template: "<div class=\"modal fade inail-modal {{class}}\"\n [id]=\"id\"\n tabindex=\"-1\"\n role=\"dialog\"\n data-keyboard=\"false\"\n data-backdrop=\"static\"\n (keyup.escape)=\"this.showModal(false)\"\n [attr.aria-labelledby]=\"id+'-TITOLO'\">\n <div class=\"vertical-alignment-helper\">\n <div class=\"modal-dialog vertical-align-center\"\n [ngClass]=\"{'medium' : width=='M', 'wide' : width=='L'}\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <span class=\"modal-title\"\n tabindex=\"0\"\n id=\"{{id}}-TITOLO\" [innerHTML]=\"title\"></span>\n <button type=\"button\"\n id=\"{{id}}_close_button\"\n [title]=\"closeButtonTitle\"\n (click)=\"closeOnClick()\"\n (keyup.space)=\"closeOnClick()\"\n (keyup.enter)=\"closeOnClick()\"\n class=\"close\"\n aria-label=\"Close\">\n <span aria-hidden=\"true\">\u00D7</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </div>\n</div>\n",
|
|
4797
|
+
template: "<div class=\"modal fade inail-modal {{class}}\"\n [id]=\"id\"\n tabindex=\"-1\"\n role=\"dialog\"\n data-keyboard=\"false\"\n data-backdrop=\"static\"\n (keyup.escape)=\"this.showModal(false)\"\n [attr.aria-labelledby]=\"id+'-TITOLO'\">\n <div class=\"vertical-alignment-helper\">\n <div class=\"modal-dialog vertical-align-center\"\n [ngClass]=\"{'medium' : width=='M', 'wide' : width=='L'}\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <span class=\"modal-title\"\n tabindex=\"0\"\n id=\"{{id}}-TITOLO\" [innerHTML]=\"title\"></span>\n <button type=\"button\"\n id=\"{{id}}_close_button\"\n [title]=\"closeButtonTitle\"\n (click)=\"closeOnClick()\"\n (keyup.space)=\"closeOnClick()\"\n (keyup.enter)=\"closeOnClick()\"\n class=\"close\"\n aria-label=\"Close\">\n <span aria-hidden=\"true\">\u00D7</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n <div class=\"modal-footer\" #footer [hidden]=\"!(footer.innerText || footer.innerHTML)\">\n <ng-content select=\"[modal-footer]\"></ng-content>\n </div>\n </div>\n </div>\n </div>\n</div>\n",
|
|
4768
4798
|
changeDetection: CHANGE_DETECTION_STRATEGY,
|
|
4769
4799
|
encapsulation: core.ViewEncapsulation.None,
|
|
4770
|
-
styles: [".inail-modal .modal-dialog.medium{width:900px}.inail-modal .modal-dialog.wide{width:1200px}.inail-modal .modal-dialog{max-width:100vw!important}.inail-modal .close:focus,.inail-modal .modal-title:focus{outline:1px dotted #fff!important}"]
|
|
4800
|
+
styles: [".inail-modal .modal-dialog.medium{width:900px}.inail-modal .modal-dialog.wide{width:1200px}.inail-modal .modal-dialog{max-width:100vw!important}.inail-modal .close:focus,.inail-modal .modal-title:focus{outline:1px dotted #fff!important}.inail-modal .modal-header button.close{height:30px}.inail-modal .modal-footer{padding:10px 30px 20px}"]
|
|
4771
4801
|
},] }
|
|
4772
4802
|
];
|
|
4773
4803
|
ModalComponent.ctorParameters = function () { return [
|
|
@@ -4822,10 +4852,10 @@
|
|
|
4822
4852
|
AlertComponent.decorators = [
|
|
4823
4853
|
{ type: core.Component, args: [{
|
|
4824
4854
|
selector: 'inail-alert',
|
|
4825
|
-
template: "<inail-modal #modalComponent\n [id]=\"id\"\n [show]=\"show\"\n [preventPageScroll]=\"preventPageScroll\"\n [class]=\"class\"\n [title]=\"title\"\n [closeButtonTitle]=\"closeButtonTitle\"\n [logOnConsole]=\"logOnConsole\"\n [width]=\"this.width\"\n (close)=\"close.emit($event)\"\n (log)=\"log.emit($event)\">\n <div class=\"row\">\n <p *ngIf=\"message\" [innerHTML]=\"message\"></p>\n <p
|
|
4855
|
+
template: "<inail-modal #modalComponent\n [id]=\"id\"\n [show]=\"show\"\n [preventPageScroll]=\"preventPageScroll\"\n [class]=\"class\"\n [title]=\"title\"\n [closeButtonTitle]=\"closeButtonTitle\"\n [logOnConsole]=\"logOnConsole\"\n [width]=\"this.width\"\n (close)=\"close.emit($event)\"\n (log)=\"log.emit($event)\">\n <div class=\"row\">\n <p *ngIf=\"message\" [innerHTML]=\"message\"></p>\n <p [style.margin-bottom.px]=\"0\">\n <ng-content></ng-content>\n </p>\n </div>\n <ng-container modal-footer>\n <button type=\"button\"\n (click)=\"okOnClick()\"\n class=\"btn btn-primary pull-right noMarginRight\">Ok\n </button>\n </ng-container>\n <!--<div class=\"row alert-footer\">\n <button type=\"button\"\n (click)=\"okOnClick()\"\n class=\"btn btn-primary pull-right\">Ok\n </button>\n </div>-->\n</inail-modal>\n",
|
|
4826
4856
|
changeDetection: CHANGE_DETECTION_STRATEGY,
|
|
4827
4857
|
encapsulation: core.ViewEncapsulation.None,
|
|
4828
|
-
styles: ["
|
|
4858
|
+
styles: [""]
|
|
4829
4859
|
},] }
|
|
4830
4860
|
];
|
|
4831
4861
|
AlertComponent.ctorParameters = function () { return [
|
|
@@ -4901,10 +4931,10 @@
|
|
|
4901
4931
|
ConfirmComponent.decorators = [
|
|
4902
4932
|
{ type: core.Component, args: [{
|
|
4903
4933
|
selector: 'inail-confirm',
|
|
4904
|
-
template: "<inail-modal #modalComponent\n [id]=\"id\"\n [show]=\"show\"\n [preventPageScroll]=\"preventPageScroll\"\n [class]=\"class\"\n [title]=\"title\"\n [closeButtonTitle]=\"closeButtonTitle\"\n [logOnConsole]=\"logOnConsole\"\n [width]=\"width\"\n (close)=\"onClose()\"\n (log)=\"log.emit($event)\">\n <div class=\"row\">\n <p *ngIf=\"message\" [innerHTML]=\"message\"></p>\n <p
|
|
4934
|
+
template: "<inail-modal #modalComponent\n [id]=\"id\"\n [show]=\"show\"\n [preventPageScroll]=\"preventPageScroll\"\n [class]=\"class\"\n [title]=\"title\"\n [closeButtonTitle]=\"closeButtonTitle\"\n [logOnConsole]=\"logOnConsole\"\n [width]=\"width\"\n (close)=\"onClose()\"\n (log)=\"log.emit($event)\">\n <div class=\"row\">\n <p *ngIf=\"message\" [innerHTML]=\"message\"></p>\n <p [style.margin-bottom.px]=\"0\">\n <ng-content></ng-content>\n </p>\n </div>\n <ng-container modal-footer>\n <inail-button [label]=\"rejectButtonLabel\"\n (onclick)=\"rejectOnClick()\">\n </inail-button>\n <inail-button [class]=\"'pull-right'\"\n [setFocusOnError]=\"setFocusOnError\"\n [label]=\"confirmButtonLabel\"\n (onclick)=\"confirmOnClick()\">\n </inail-button>\n </ng-container>\n <!--<div class=\"row confirm-footer\">\n <inail-button [label]=\"rejectButtonLabel\"\n (onclick)=\"rejectOnClick()\">\n </inail-button>\n <inail-button [class]=\"'pull-right'\"\n [setFocusOnError]=\"setFocusOnError\"\n [label]=\"confirmButtonLabel\"\n (onclick)=\"confirmOnClick()\">\n </inail-button>\n </div>-->\n</inail-modal>\n",
|
|
4905
4935
|
changeDetection: CHANGE_DETECTION_STRATEGY,
|
|
4906
4936
|
encapsulation: core.ViewEncapsulation.None,
|
|
4907
|
-
styles: ["
|
|
4937
|
+
styles: [""]
|
|
4908
4938
|
},] }
|
|
4909
4939
|
];
|
|
4910
4940
|
ConfirmComponent.ctorParameters = function () { return [
|
|
@@ -5330,7 +5360,7 @@
|
|
|
5330
5360
|
}
|
|
5331
5361
|
TableComponent.prototype.ngOnChanges = function (changes) {
|
|
5332
5362
|
var _this = this;
|
|
5333
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
5363
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
5334
5364
|
_super.prototype.ngOnChanges.call(this, changes);
|
|
5335
5365
|
// Controllo se la paginazione richiesta e' interna o esterna
|
|
5336
5366
|
if (!this.externalPaginationSorting
|
|
@@ -5393,6 +5423,10 @@
|
|
|
5393
5423
|
if ((_k = changes.selectableRowValues) === null || _k === void 0 ? void 0 : _k.currentValue) {
|
|
5394
5424
|
this.righeSelezionabili = __spread((_l = changes.selectableRowValues) === null || _l === void 0 ? void 0 : _l.currentValue);
|
|
5395
5425
|
}
|
|
5426
|
+
// Righe selezionate in input
|
|
5427
|
+
if ((_m = changes.checkedRows) === null || _m === void 0 ? void 0 : _m.currentValue) {
|
|
5428
|
+
this.righeSelezionate = __spread((_o = changes.checkedRows) === null || _o === void 0 ? void 0 : _o.currentValue);
|
|
5429
|
+
}
|
|
5396
5430
|
this.cdr.detectChanges();
|
|
5397
5431
|
};
|
|
5398
5432
|
// Verifica la congruenza tra pagaNumber e pageIndex
|
|
@@ -5432,6 +5466,7 @@
|
|
|
5432
5466
|
this.lookAtThLabel(this.thLabelComponents);
|
|
5433
5467
|
this.attivaThLabelOrdinamentoSpecificato();
|
|
5434
5468
|
setTimeout(function () { var _a; return _this.visualizzaBaseFooter = ((_a = _this.baseFooter) === null || _a === void 0 ? void 0 : _a.nativeElement.childElementCount) > 0; });
|
|
5469
|
+
this.numeroColonne = document.querySelectorAll("#" + this.id + " th").length;
|
|
5435
5470
|
this.cdr.detectChanges();
|
|
5436
5471
|
};
|
|
5437
5472
|
TableComponent.prototype.ngAfterViewChecked = function () {
|
|
@@ -5835,6 +5870,7 @@
|
|
|
5835
5870
|
detailsLink: [{ type: core.Input }],
|
|
5836
5871
|
selectableRowValues: [{ type: core.Input }],
|
|
5837
5872
|
detailsClick: [{ type: core.Output }],
|
|
5873
|
+
checkedRows: [{ type: core.Input }],
|
|
5838
5874
|
checkedRowsChange: [{ type: core.Output }],
|
|
5839
5875
|
thLabelComponents: [{ type: core.ContentChildren, args: [ThLabelComponent, { descendants: true },] }],
|
|
5840
5876
|
trCheckboxComponents: [{ type: core.ContentChildren, args: [TrCheckboxComponent, { descendants: true },] }],
|
|
@@ -5953,10 +5989,19 @@
|
|
|
5953
5989
|
return _this;
|
|
5954
5990
|
}
|
|
5955
5991
|
InputNumberComponent.prototype.ngOnChanges = function (changes) {
|
|
5992
|
+
var _a;
|
|
5956
5993
|
_super.prototype.ngOnChanges.call(this, changes);
|
|
5957
5994
|
if (changes.value) {
|
|
5995
|
+
// console.warn(changes.value)
|
|
5958
5996
|
this.previousValue = changes.value.previousValue;
|
|
5959
|
-
|
|
5997
|
+
// Se l'input type text non ha il focus.
|
|
5998
|
+
// La normalizzazzione del valore al change del value avviene solamente quando
|
|
5999
|
+
// viene impostato il valore in maniera programmatica.
|
|
6000
|
+
// In caso di digitazione da parte dell'utente la normalizzazione
|
|
6001
|
+
// avverra' alla perdita del focus.
|
|
6002
|
+
if (!(this.formControlElement.nativeElement.id === ((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.id))) {
|
|
6003
|
+
this.normalizzaValore();
|
|
6004
|
+
}
|
|
5960
6005
|
// if (!changes.value.firstChange) {
|
|
5961
6006
|
//
|
|
5962
6007
|
// this.cleanError()
|
|
@@ -6012,15 +6057,38 @@
|
|
|
6012
6057
|
}
|
|
6013
6058
|
}
|
|
6014
6059
|
};
|
|
6060
|
+
InputNumberComponent.prototype.onBlur = function () {
|
|
6061
|
+
this.normalizzaValore();
|
|
6062
|
+
_super.prototype.onBlur.call(this);
|
|
6063
|
+
};
|
|
6064
|
+
// private normalizzaValore() {
|
|
6065
|
+
//
|
|
6066
|
+
// setTimeout(() => {
|
|
6067
|
+
//
|
|
6068
|
+
// if (!this.disabled) {
|
|
6069
|
+
//
|
|
6070
|
+
// if (this.min != undefined && this.inputValue < this.min) {
|
|
6071
|
+
//
|
|
6072
|
+
// this.value = this.previousValue != undefined ? this.previousValue : this.min;
|
|
6073
|
+
//
|
|
6074
|
+
// } else if (this.max != undefined && this.inputValue > this.max) {
|
|
6075
|
+
//
|
|
6076
|
+
// this.value = this.previousValue != undefined ? this.previousValue : this.max;
|
|
6077
|
+
// }
|
|
6078
|
+
// }
|
|
6079
|
+
//
|
|
6080
|
+
// this.cdr.detectChanges();
|
|
6081
|
+
// });
|
|
6082
|
+
// }
|
|
6015
6083
|
InputNumberComponent.prototype.normalizzaValore = function () {
|
|
6016
6084
|
var _this = this;
|
|
6017
6085
|
setTimeout(function () {
|
|
6018
|
-
if (!_this.disabled) {
|
|
6086
|
+
if (!_this.disabled && _this.inputValue != undefined && isNotBlankOrNull("" + _this.inputValue)) {
|
|
6019
6087
|
if (_this.min != undefined && _this.inputValue < _this.min) {
|
|
6020
|
-
_this.value = _this.
|
|
6088
|
+
_this.value = _this.min;
|
|
6021
6089
|
}
|
|
6022
6090
|
else if (_this.max != undefined && _this.inputValue > _this.max) {
|
|
6023
|
-
_this.value = _this.
|
|
6091
|
+
_this.value = _this.max;
|
|
6024
6092
|
}
|
|
6025
6093
|
}
|
|
6026
6094
|
_this.cdr.detectChanges();
|
|
@@ -6831,6 +6899,69 @@
|
|
|
6831
6899
|
value: [{ type: core.Input }]
|
|
6832
6900
|
};
|
|
6833
6901
|
|
|
6902
|
+
var TrAccordionComponent = /** @class */ (function (_super) {
|
|
6903
|
+
__extends(TrAccordionComponent, _super);
|
|
6904
|
+
function TrAccordionComponent(elRef, cdr, libConfig) {
|
|
6905
|
+
var _this = this;
|
|
6906
|
+
var _a, _b;
|
|
6907
|
+
_this = _super.call(this, cdr, libConfig) || this;
|
|
6908
|
+
_this.elRef = elRef;
|
|
6909
|
+
_this.cdr = cdr;
|
|
6910
|
+
_this.libConfig = libConfig;
|
|
6911
|
+
_this.expanded = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.trAccordionComponent) === null || _b === void 0 ? void 0 : _b.expanded, false);
|
|
6912
|
+
_this.expandedChange = new core.EventEmitter();
|
|
6913
|
+
_this.isExpanded = function () { return _this.expanded === true; };
|
|
6914
|
+
_this.logPrefix = '[inail-tr-accordion]';
|
|
6915
|
+
_super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.trAccordionComponent);
|
|
6916
|
+
_this.detach();
|
|
6917
|
+
return _this;
|
|
6918
|
+
}
|
|
6919
|
+
TrAccordionComponent.prototype.ngOnChanges = function (changes) {
|
|
6920
|
+
_super.prototype.ngOnChanges.call(this, changes);
|
|
6921
|
+
this.cdr.detectChanges();
|
|
6922
|
+
};
|
|
6923
|
+
TrAccordionComponent.prototype.ngOnInit = function () {
|
|
6924
|
+
_super.prototype.ngOnInit.call(this);
|
|
6925
|
+
};
|
|
6926
|
+
TrAccordionComponent.prototype.toggle = function (expanded) {
|
|
6927
|
+
if (this.trParent) {
|
|
6928
|
+
this.expanded = (expanded != undefined) ? expanded : this.trParent.hidden;
|
|
6929
|
+
this.trParent.hidden = !this.expanded;
|
|
6930
|
+
this.expandedChange.emit(this.expanded);
|
|
6931
|
+
this.cdr.detectChanges();
|
|
6932
|
+
}
|
|
6933
|
+
};
|
|
6934
|
+
TrAccordionComponent.prototype.ngOnDestroy = function () {
|
|
6935
|
+
_super.prototype.ngOnDestroy.call(this);
|
|
6936
|
+
};
|
|
6937
|
+
TrAccordionComponent.prototype.ngAfterViewInit = function () {
|
|
6938
|
+
var _a, _b, _c, _d;
|
|
6939
|
+
this.trParent = this.elRef.nativeElement;
|
|
6940
|
+
this.colspan = (_d = (_c = (_b = (_a = this.trParent) === null || _a === void 0 ? void 0 : _a.closest('table')) === null || _b === void 0 ? void 0 : _b.querySelector('thead')) === null || _c === void 0 ? void 0 : _c.querySelectorAll('tr th')) === null || _d === void 0 ? void 0 : _d.length;
|
|
6941
|
+
this.toggle(this.expanded);
|
|
6942
|
+
this.cdr.detectChanges();
|
|
6943
|
+
};
|
|
6944
|
+
return TrAccordionComponent;
|
|
6945
|
+
}(BasicUxElementComponent));
|
|
6946
|
+
TrAccordionComponent.decorators = [
|
|
6947
|
+
{ type: core.Component, args: [{
|
|
6948
|
+
selector: '.inail-tr-accordion',
|
|
6949
|
+
template: "<td [colSpan]=\"colspan\" class=\"accordionTab\">\n <form class=\"row form-grey pop\">\n <ng-content select=\"[content]\"></ng-content>\n </form>\n <div class=\"row baseFooter\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n</td>\n",
|
|
6950
|
+
changeDetection: CHANGE_DETECTION_STRATEGY,
|
|
6951
|
+
encapsulation: core.ViewEncapsulation.None,
|
|
6952
|
+
styles: [".inail-tr-accordion .accordionTab div.form-group label{display:block!important}"]
|
|
6953
|
+
},] }
|
|
6954
|
+
];
|
|
6955
|
+
TrAccordionComponent.ctorParameters = function () { return [
|
|
6956
|
+
{ type: core.ElementRef },
|
|
6957
|
+
{ type: core.ChangeDetectorRef },
|
|
6958
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
|
|
6959
|
+
]; };
|
|
6960
|
+
TrAccordionComponent.propDecorators = {
|
|
6961
|
+
expanded: [{ type: core.Input }],
|
|
6962
|
+
expandedChange: [{ type: core.Output }]
|
|
6963
|
+
};
|
|
6964
|
+
|
|
6834
6965
|
var NgInailCommonModule = /** @class */ (function () {
|
|
6835
6966
|
function NgInailCommonModule() {
|
|
6836
6967
|
}
|
|
@@ -6898,7 +7029,8 @@
|
|
|
6898
7029
|
TrCheckboxComponent,
|
|
6899
7030
|
ProgressBarComponent,
|
|
6900
7031
|
MultiSelectComponent,
|
|
6901
|
-
InputTimeComponent
|
|
7032
|
+
InputTimeComponent,
|
|
7033
|
+
TrAccordionComponent
|
|
6902
7034
|
],
|
|
6903
7035
|
imports: [
|
|
6904
7036
|
common.CommonModule,
|
|
@@ -6949,7 +7081,8 @@
|
|
|
6949
7081
|
TrCheckboxComponent,
|
|
6950
7082
|
ProgressBarComponent,
|
|
6951
7083
|
MultiSelectComponent,
|
|
6952
|
-
InputTimeComponent
|
|
7084
|
+
InputTimeComponent,
|
|
7085
|
+
TrAccordionComponent
|
|
6953
7086
|
],
|
|
6954
7087
|
providers: [common.DatePipe]
|
|
6955
7088
|
},] }
|
|
@@ -7013,16 +7146,19 @@
|
|
|
7013
7146
|
exports.TablePageLengthSelectorComponent = TablePageLengthSelectorComponent;
|
|
7014
7147
|
exports.TextareaComponent = TextareaComponent;
|
|
7015
7148
|
exports.ThLabelComponent = ThLabelComponent;
|
|
7149
|
+
exports.TrAccordionComponent = TrAccordionComponent;
|
|
7016
7150
|
exports.TrCheckboxComponent = TrCheckboxComponent;
|
|
7017
7151
|
exports.WizardComponent = WizardComponent;
|
|
7018
7152
|
exports.addZero = addZero;
|
|
7019
7153
|
exports.call = call;
|
|
7020
7154
|
exports.clone = clone;
|
|
7155
|
+
exports.compareDate = compareDate;
|
|
7021
7156
|
exports.dateToString = dateToString;
|
|
7022
7157
|
exports.getConfigValue = getConfigValue;
|
|
7023
7158
|
exports.isAbsolute = isAbsolute;
|
|
7024
7159
|
exports.isBlankOrNull = isBlankOrNull;
|
|
7025
7160
|
exports.isDate = isDate;
|
|
7161
|
+
exports.isFutureDate = isFutureDate;
|
|
7026
7162
|
exports.isHidden = isHidden;
|
|
7027
7163
|
exports.isInISO8601Format = isInISO8601Format;
|
|
7028
7164
|
exports.isInItalianFormat = isInItalianFormat;
|
|
@@ -7031,7 +7167,9 @@
|
|
|
7031
7167
|
exports.isListNotEmptyOrNull = isListNotEmptyOrNull;
|
|
7032
7168
|
exports.isNotBlankOrNull = isNotBlankOrNull;
|
|
7033
7169
|
exports.isNumber = isNumber;
|
|
7170
|
+
exports.isPastDate = isPastDate;
|
|
7034
7171
|
exports.isString = isString;
|
|
7172
|
+
exports.isToday = isToday;
|
|
7035
7173
|
exports.isValidDateObject = isValidDateObject;
|
|
7036
7174
|
exports.isValidRadioValue = isValidRadioValue;
|
|
7037
7175
|
exports.isValidSelectValue = isValidSelectValue;
|