ng-inail-common 2.0.32-beta.7 → 2.0.32

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.
Files changed (27) hide show
  1. package/bundles/ng-inail-common.umd.js +113 -30
  2. package/bundles/ng-inail-common.umd.js.map +1 -1
  3. package/bundles/ng-inail-common.umd.min.js +2 -2
  4. package/bundles/ng-inail-common.umd.min.js.map +1 -1
  5. package/esm2015/lib/components/core/form/input-date/input-date.component.js +29 -17
  6. package/esm2015/lib/components/core/form/input-number/input-number.component.js +38 -6
  7. package/esm2015/lib/components/core/form/input-text/input-text.component.js +16 -8
  8. package/esm2015/lib/components/core/form/radio-select/radio-select.component.js +2 -2
  9. package/esm2015/lib/components/core/layout/menu/menu.component.js +6 -6
  10. package/esm2015/lib/components/core/table/table/table.component.js +2 -1
  11. package/esm2015/lib/components/core/table/tr-accordion/tr-accordion.component.js +1 -1
  12. package/esm2015/lib/components/core/ux/alert/alert.component.js +3 -3
  13. package/esm2015/lib/components/core/ux/confirm/confirm.component.js +3 -3
  14. package/esm2015/lib/components/core/ux/feedback/feedback.component.js +4 -3
  15. package/esm2015/lib/components/core/ux/modal/modal.component.js +20 -3
  16. package/esm2015/lib/utils/date.operators.js +9 -1
  17. package/fesm2015/ng-inail-common.js +110 -31
  18. package/fesm2015/ng-inail-common.js.map +1 -1
  19. package/lib/components/core/form/input-date/input-date.component.d.ts +14 -7
  20. package/lib/components/core/form/input-number/input-number.component.d.ts +1 -0
  21. package/lib/components/core/form/input-text/input-text.component.d.ts +7 -5
  22. package/lib/components/core/layout/menu/menu.component.d.ts +2 -2
  23. package/lib/components/core/ux/feedback/feedback.component.d.ts +2 -1
  24. package/lib/components/core/ux/modal/modal.component.d.ts +5 -0
  25. package/lib/utils/date.operators.d.ts +4 -0
  26. package/ng-inail-common.metadata.json +1 -1
  27. package/package.json +1 -1
@@ -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 la voce di menu selezionata.
1675
+ * Emette l'oggetto MenuItem associato alla voce di menu sulla quale si e' cliccato.
1676
1676
  */
1677
- _this.select = new core.EventEmitter();
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.select.emit(item);
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 (select)=\"select.emit($event)\"\n (currentItem)=\"currentItemHandler($event, item)\">\n </inail-menu>\n </li>\n </ng-container>\n </ul>\n</ng-container>\n\n\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
- select: [{ type: core.Output }],
2127
+ itemClick: [{ type: core.Output }],
2128
2128
  currentItem: [{ type: core.Output }],
2129
2129
  menu: [{ type: core.ViewChild, args: ['menu',] }]
2130
2130
  };
@@ -3194,7 +3194,16 @@
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
 
3206
+ var ONLY_DIGITS_ACCEPTED_INPUTS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'Backspace', 'Delete', 'Tab', 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'];
3198
3207
  var InputTextComponent = /** @class */ (function (_super) {
3199
3208
  __extends(InputTextComponent, _super);
3200
3209
  function InputTextComponent(cdr, datePipe, libConfig) {
@@ -3206,6 +3215,7 @@
3206
3215
  _this.libConfig = libConfig;
3207
3216
  _this.placeholder = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.inputTextComponent) === null || _b === void 0 ? void 0 : _b.placeholder, undefined);
3208
3217
  _this.isDate = false;
3218
+ _this.onlyDigits = false;
3209
3219
  _this.valueChange = new core.EventEmitter();
3210
3220
  _this.preventPasting = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.inputTextComponent) === null || _d === void 0 ? void 0 : _d.preventPasting, false);
3211
3221
  _this.logPrefix = "[inail-input-text]";
@@ -3271,6 +3281,11 @@
3271
3281
  $event.preventDefault();
3272
3282
  }
3273
3283
  };
3284
+ InputTextComponent.prototype.onKeyDown = function (ev) {
3285
+ if (this.onlyDigits === true && !ONLY_DIGITS_ACCEPTED_INPUTS.some(function (v) { return v === ev.key; }) && ev.ctrlKey == false) {
3286
+ ev.preventDefault();
3287
+ }
3288
+ };
3274
3289
  InputTextComponent.prototype.ngOnDestroy = function () {
3275
3290
  _super.prototype.ngOnDestroy.call(this);
3276
3291
  };
@@ -3279,7 +3294,7 @@
3279
3294
  InputTextComponent.decorators = [
3280
3295
  { type: core.Component, args: [{
3281
3296
  selector: 'inail-input-text',
3282
- template: "<div class=\"form-group {{getResponsiveClass()}} noPaddingLeft {{class}} inail-input-text\"\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 <input #formControl\n type=\"text\"\n [id]=\"id\"\n class=\"form-control {{inputClass}}\"\n [ngClass]=\"{'disabled': disabled}\"\n [attr.name]=\"name\"\n [attr.title]=\"title\"\n [attr.maxlength]=\"maxlength\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.placeholder]=\"placeholder\"\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 (paste)=\"onPaste($event)\"\n (keyup.enter)=\"enterUp.emit()\"\n [(ngModel)]=\"value\">\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]=\"'maxlength'\" [propertie]=\"maxlength\" [hideIfNull]=\"false\"></state-propertie>\n <state-propertie [label]=\"'isDate'\" [propertie]=\"isDate\" [hideIfNull]=\"false\"></state-propertie>\n <state-propertie [label]=\"'placeholder'\" [propertie]=\"placeholder\" [hideIfNull]=\"false\"></state-propertie>\n <inail-form-element-state-properties [formElement]=\"this\"></inail-form-element-state-properties>\n </debug-pre>\n</div>\n",
3297
+ template: "<div class=\"form-group {{getResponsiveClass()}} noPaddingLeft {{class}} inail-input-text\"\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 <input #formControl\n type=\"text\"\n [id]=\"id\"\n class=\"form-control {{inputClass}}\"\n [ngClass]=\"{'disabled': disabled}\"\n [attr.name]=\"name\"\n [attr.title]=\"title\"\n [attr.maxlength]=\"maxlength\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.placeholder]=\"placeholder\"\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 (paste)=\"onPaste($event)\"\n (keyup.enter)=\"enterUp.emit()\"\n (keydown)=\"onKeyDown($event)\"\n [(ngModel)]=\"value\">\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]=\"'maxlength'\" [propertie]=\"maxlength\" [hideIfNull]=\"false\"></state-propertie>\n <state-propertie [label]=\"'isDate'\" [propertie]=\"isDate\" [hideIfNull]=\"false\"></state-propertie>\n <state-propertie [label]=\"'placeholder'\" [propertie]=\"placeholder\" [hideIfNull]=\"false\"></state-propertie>\n <inail-form-element-state-properties [formElement]=\"this\"></inail-form-element-state-properties>\n </debug-pre>\n</div>\n",
3283
3298
  changeDetection: CHANGE_DETECTION_STRATEGY,
3284
3299
  encapsulation: core.ViewEncapsulation.None,
3285
3300
  providers: [
@@ -3302,6 +3317,7 @@
3302
3317
  placeholder: [{ type: core.Input }],
3303
3318
  maxlength: [{ type: core.Input }],
3304
3319
  isDate: [{ type: core.Input }],
3320
+ onlyDigits: [{ type: core.Input }],
3305
3321
  valueChange: [{ type: core.Output }],
3306
3322
  preventPasting: [{ type: core.Input }],
3307
3323
  value: [{ type: core.Input }]
@@ -3593,6 +3609,7 @@
3593
3609
  // Queste inizializzazioni servono per essere usate nel template
3594
3610
  _this.errorType = 'ERROR';
3595
3611
  _this.successType = 'SUCCESS';
3612
+ _this.warningType = 'WARNING';
3596
3613
  _this.type = 'SUCCESS';
3597
3614
  _this.showIcon = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.feedbackComponent) === null || _b === void 0 ? void 0 : _b.showIcon, true);
3598
3615
  _this.detailsAsList = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.feedbackComponent) === null || _d === void 0 ? void 0 : _d.detailsAsList, undefined);
@@ -3647,10 +3664,10 @@
3647
3664
  FeedbackComponent.decorators = [
3648
3665
  { type: core.Component, args: [{
3649
3666
  selector: 'inail-feedback',
3650
- 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><ng-content></ng-content></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, 'global-feedback': globalFeedback === true}\">\n <span *ngIf=\"showIcon\"\n class=\"green-check fa fa-check-circle\"\n [ngClass]=\"{'green-check fa-check-circle': type==successType || !type, 'red-check fa-times-circle': type==errorType}\"></span>\n <strong tabindex=\"0\"\n [id]=\"id+'-message'\"\n class=\"labelFeedback feedback-focusable\"\n [innerHTML]=\"message\" #mainMessage>\n </strong>\n</span>\n",
3667
+ 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",
3651
3668
  changeDetection: CHANGE_DETECTION_STRATEGY,
3652
3669
  encapsulation: core.ViewEncapsulation.None,
3653
- 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}"]
3670
+ 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}"]
3654
3671
  },] }
3655
3672
  ];
3656
3673
  FeedbackComponent.ctorParameters = function () { return [
@@ -4158,7 +4175,7 @@
4158
4175
  var ɵ0$3 = isValidInputModel;
4159
4176
  var isLongTime = function (o) { return o && (typeof o === 'number'); };
4160
4177
  var ɵ1$2 = isLongTime;
4161
- var ACCEPTED_INPUTS = ['/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'Backspace', 'Delete', "Tab", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"];
4178
+ var ACCEPTED_INPUTS = ['/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'Backspace', 'Delete', 'Tab', 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'];
4162
4179
  var InputDateComponent = /** @class */ (function (_super) {
4163
4180
  __extends(InputDateComponent, _super);
4164
4181
  function InputDateComponent(cdr, libConfig) {
@@ -4174,17 +4191,25 @@
4174
4191
  _this.options = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.inputDateComponent) === null || _b === void 0 ? void 0 : _b.options, undefined);
4175
4192
  _this.selfValidation = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.inputDateComponent) === null || _d === void 0 ? void 0 : _d.selfValidation, true);
4176
4193
  _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 &egrave; valida');
4194
+ _this.disableFutureDates = false;
4195
+ _this.disablePastDates = false;
4196
+ _this.disableCurrentDate = false;
4197
+ _this.areThereDisabledDates = function () { var _a, _b; return (((_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 || _this.disableCurrentDate === true); };
4198
+ _this.isPasteOrCurrentOrFutureDisabledDate = function (data) { return (_this.disablePastDates === true && isPastDate(data)) || (_this.disableFutureDates === true && isFutureDate(data)) || (_this.disableCurrentDate === true && isToday(data)); };
4199
+ _this.isDataAbilitata = function (data) { return !_this.isPasteOrCurrentOrFutureDisabledDate(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.isPasteOrCurrentOrFutureDisabledDate(data) || (_this.disabledDates != undefined && _this.disabledDates.some(function (regex) { return _this.match(data, regex) != undefined; })); };
4201
+ _this.match = function (date, regex) { return date != undefined && date.match(new RegExp('^'.concat(regex).concat('$'), 'i')); };
4177
4202
  _this.isValidInputValue = function () { return isBlankOrNull(_this.visibleData) || isInItalianFormat(_this.visibleData); };
4178
- _this.isThereDataError = function () { return _this.isThereError() || (!_this.isValidInputValue() && _this.selfValidation); };
4203
+ _this.isNotValidInputData = function () { return !_this.isValidInputValue() || (isNotBlankOrNull(_this.iso8601Data) && _this.areThereDisabledDates() && !_this.isEnabledDate(_this.iso8601Data)); };
4204
+ _this.isThereDataError = function () { return _this.isThereError() || (_this.selfValidation && _this.isNotValidInputData()); };
4179
4205
  _this.showDataError = function () { return _this.isThereDataError() && isNotBlankOrNull(_this.getDescError()); };
4180
- _this.getDescError = function () { return (_this.selfValidation && isBlankOrNull(_this.error) && !_this.isValidInputValue()) ? _this.selfValidationError : _this.error; };
4206
+ _this.getDescError = function () { return (_this.selfValidation && isBlankOrNull(_this.error) && _this.isNotValidInputData()) ? _this.selfValidationError : _this.error; };
4181
4207
  _this.isEnabledDate = function (date) {
4182
- var dateString = dateToString(date, 'ISO8061');
4208
+ var dateString = isString(date) ? date : dateToString(date, 'ISO8061');
4209
+ // console.warn('isDataAbilitata', dateString, this.isDataAbilitata(dateString))
4210
+ // console.warn('isDataDisabilitata', dateString, this.isDataDisabilitata(dateString))
4183
4211
  return _this.isDataAbilitata(dateString) && !_this.isDataDisabilitata(dateString);
4184
4212
  };
4185
- _this.isDataAbilitata = function (data) { return _this.enabledDates == undefined || !_this.enabledDates.length || _this.enabledDates.some(function (regex) { return _this.match(data, regex) != undefined; }); };
4186
- _this.isDataDisabilitata = function (data) { return _this.disabledDates != undefined && _this.disabledDates.some(function (regex) { return _this.match(data, regex) != undefined; }); };
4187
- _this.match = function (date, regex) { return date != undefined && date.match(new RegExp('^'.concat(regex).concat('$'), 'i')); };
4188
4213
  _this.isFirstDigitSlash = function (ev) { return ev.key == '/' && _this.visibleData == undefined; };
4189
4214
  _this.isDoubleSlash = function (ev) { return ev.key == '/' && ev.key == _this.previousDigit; };
4190
4215
  _this.isWrongDigit = function (ev) { return _this.isFirstDigitSlash(ev) || _this.isDoubleSlash(ev); };
@@ -4251,7 +4276,7 @@
4251
4276
  this.setDatepickerDate(this.visibleData);
4252
4277
  }
4253
4278
  setTimeout(function () {
4254
- window['$'](_this.formControlElement.nativeElement).on("change", function () {
4279
+ window['$'](_this.formControlElement.nativeElement).on('change', function () {
4255
4280
  _this.emitDebug('onChange');
4256
4281
  _this.emitDebug("current visibleData: " + _this.visibleData);
4257
4282
  var elem = window['$'](_this.formControlElement.nativeElement)[0];
@@ -4266,8 +4291,7 @@
4266
4291
  this.cdr.detectChanges();
4267
4292
  };
4268
4293
  InputDateComponent.prototype.datepickerInit = function () {
4269
- var _a, _b;
4270
- if (((_a = this.disabledDates) === null || _a === void 0 ? void 0 : _a.length) || ((_b = this.enabledDates) === null || _b === void 0 ? void 0 : _b.length)) {
4294
+ if (this.areThereDisabledDates()) {
4271
4295
  this.options.beforeShowDay = this.isEnabledDate;
4272
4296
  }
4273
4297
  window['$'](this.formControlElement.nativeElement).datepicker(this.options);
@@ -4276,6 +4300,7 @@
4276
4300
  window['$'](this.formControlElement.nativeElement).datepicker('remove');
4277
4301
  };
4278
4302
  InputDateComponent.prototype.datepickerReinit = function () {
4303
+ // console.warn(this.disablePastDates);
4279
4304
  this.datepickerDestroy();
4280
4305
  this.datepickerInit();
4281
4306
  };
@@ -4309,6 +4334,7 @@
4309
4334
  this.cdr.detectChanges();
4310
4335
  setTimeout(function () {
4311
4336
  var emittedValue = validFormat ? toISO8601Format(_this.visibleData) : _this.visibleData;
4337
+ _this.iso8601Data = emittedValue;
4312
4338
  _this.emitDebug("this.valueChange.emit(" + value + ")");
4313
4339
  _this.valueChange.emit(emittedValue);
4314
4340
  if (validFormat) {
@@ -4370,6 +4396,9 @@
4370
4396
  selfValidationError: [{ type: core.Input }],
4371
4397
  enabledDates: [{ type: core.Input }],
4372
4398
  disabledDates: [{ type: core.Input }],
4399
+ disableFutureDates: [{ type: core.Input }],
4400
+ disablePastDates: [{ type: core.Input }],
4401
+ disableCurrentDate: [{ type: core.Input }],
4373
4402
  reinit: [{ type: core.Input }],
4374
4403
  value: [{ type: core.Input }]
4375
4404
  };
@@ -4474,7 +4503,7 @@
4474
4503
  RadioSelectComponent.decorators = [
4475
4504
  { type: core.Component, args: [{
4476
4505
  selector: 'inail-radio-select',
4477
- 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",
4506
+ 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",
4478
4507
  changeDetection: CHANGE_DETECTION_STRATEGY,
4479
4508
  encapsulation: core.ViewEncapsulation.None,
4480
4509
  providers: [
@@ -4643,6 +4672,7 @@
4643
4672
  _this.setFocusOnError = getConfigValue((_h = (_g = _this.libConfig) === null || _g === void 0 ? void 0 : _g.modalComponent) === null || _h === void 0 ? void 0 : _h.setFocusOnError, undefined);
4644
4673
  _this.preventPageScroll = getConfigValue((_k = (_j = _this.libConfig) === null || _j === void 0 ? void 0 : _j.modalComponent) === null || _k === void 0 ? void 0 : _k.preventPageScroll, true);
4645
4674
  _this.closeOnClick = function () { return _this.showModal(false); };
4675
+ _this.scrollContentTop = function () { return document.querySelector("#" + _this.id + " .modal-body").scrollTop = 0; };
4646
4676
  _this.setFocusOnLastPageActiveElement = function () {
4647
4677
  if (_this.pageActiveElement != undefined) {
4648
4678
  if (window['$'](_this.pageActiveElement).length > 0) {
@@ -4694,9 +4724,11 @@
4694
4724
  if (this.preventPageScroll) {
4695
4725
  setPageScroll(false);
4696
4726
  }
4727
+ setTimeout(function () { return _this.scrollContentTop(); }, 300);
4697
4728
  }
4698
4729
  else {
4699
4730
  this.close.emit();
4731
+ setTimeout(function () { return _this.scrollContentTop(); });
4700
4732
  if (this.preventPageScroll) {
4701
4733
  this.ripristinaPageScroll();
4702
4734
  }
@@ -4714,11 +4746,25 @@
4714
4746
  ModalComponent.prototype.inserisciPreventBodyPaddingStyle = function () {
4715
4747
  if (!window['$']("." + PREVENT_PADDING_STYLE_CLASS).length) {
4716
4748
  window['$']('<style>', { class: "" + PREVENT_PADDING_STYLE_CLASS }).text('body.modal-open { padding-right: 0!important; }').appendTo('head');
4749
+ this.rimuoviBodyPaddingRight();
4717
4750
  }
4718
4751
  };
4719
4752
  ModalComponent.prototype.rimuoviPreventBodyPaddingStyle = function () {
4720
4753
  setTimeout(function () { var _a; return (_a = window['$']("." + PREVENT_PADDING_STYLE_CLASS)) === null || _a === void 0 ? void 0 : _a.remove(); }, 500);
4721
4754
  };
4755
+ /**
4756
+ * Rimuove la regola sul padding-right inserita da bootstrap in fase di apertura della modale
4757
+ */
4758
+ ModalComponent.prototype.rimuoviBodyPaddingRight = function () {
4759
+ var counter = 0;
4760
+ var handle = setInterval(function () {
4761
+ if (document.body.style.paddingRight != "" || counter == 100) {
4762
+ window['$']('body').css('padding-right', '');
4763
+ clearInterval(handle);
4764
+ }
4765
+ counter++;
4766
+ }, 5);
4767
+ };
4722
4768
  ModalComponent.prototype.ripristinaPageScroll = function () {
4723
4769
  var counter = 0;
4724
4770
  // Evita il glitch grafico che fa restringere ed allargare
@@ -4774,10 +4820,10 @@
4774
4820
  ModalComponent.decorators = [
4775
4821
  { type: core.Component, args: [{
4776
4822
  selector: 'inail-modal',
4777
- 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",
4823
+ 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",
4778
4824
  changeDetection: CHANGE_DETECTION_STRATEGY,
4779
4825
  encapsulation: core.ViewEncapsulation.None,
4780
- 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}"]
4826
+ 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-content .modal-footer{padding:10px 30px 20px!important}"]
4781
4827
  },] }
4782
4828
  ];
4783
4829
  ModalComponent.ctorParameters = function () { return [
@@ -4832,10 +4878,10 @@
4832
4878
  AlertComponent.decorators = [
4833
4879
  { type: core.Component, args: [{
4834
4880
  selector: 'inail-alert',
4835
- 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 *ngIf=\"!message\">\n <ng-content></ng-content>\n </p>\n </div>\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",
4881
+ 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",
4836
4882
  changeDetection: CHANGE_DETECTION_STRATEGY,
4837
4883
  encapsulation: core.ViewEncapsulation.None,
4838
- styles: [".alert-footer{padding-bottom:20px!important;padding-top:20px!important}.alert-footer button{margin-right:0!important}"]
4884
+ styles: [""]
4839
4885
  },] }
4840
4886
  ];
4841
4887
  AlertComponent.ctorParameters = function () { return [
@@ -4911,10 +4957,10 @@
4911
4957
  ConfirmComponent.decorators = [
4912
4958
  { type: core.Component, args: [{
4913
4959
  selector: 'inail-confirm',
4914
- 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 *ngIf=\"!message\">\n <ng-content></ng-content>\n </p>\n </div>\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",
4960
+ 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 noMarginRight'\"\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",
4915
4961
  changeDetection: CHANGE_DETECTION_STRATEGY,
4916
4962
  encapsulation: core.ViewEncapsulation.None,
4917
- styles: [".confirm-footer{padding-bottom:20px!important;padding-top:20px!important}.confirm-footer button{margin-right:0!important}"]
4963
+ styles: [""]
4918
4964
  },] }
4919
4965
  ];
4920
4966
  ConfirmComponent.ctorParameters = function () { return [
@@ -5446,6 +5492,7 @@
5446
5492
  this.lookAtThLabel(this.thLabelComponents);
5447
5493
  this.attivaThLabelOrdinamentoSpecificato();
5448
5494
  setTimeout(function () { var _a; return _this.visualizzaBaseFooter = ((_a = _this.baseFooter) === null || _a === void 0 ? void 0 : _a.nativeElement.childElementCount) > 0; });
5495
+ this.numeroColonne = document.querySelectorAll("#" + this.id + " th").length;
5449
5496
  this.cdr.detectChanges();
5450
5497
  };
5451
5498
  TableComponent.prototype.ngAfterViewChecked = function () {
@@ -5968,10 +6015,19 @@
5968
6015
  return _this;
5969
6016
  }
5970
6017
  InputNumberComponent.prototype.ngOnChanges = function (changes) {
6018
+ var _a;
5971
6019
  _super.prototype.ngOnChanges.call(this, changes);
5972
6020
  if (changes.value) {
6021
+ // console.warn(changes.value)
5973
6022
  this.previousValue = changes.value.previousValue;
5974
- this.normalizzaValore();
6023
+ // Se l'input type text non ha il focus.
6024
+ // La normalizzazzione del valore al change del value avviene solamente quando
6025
+ // viene impostato il valore in maniera programmatica.
6026
+ // In caso di digitazione da parte dell'utente la normalizzazione
6027
+ // avverra' alla perdita del focus.
6028
+ if (!(this.formControlElement.nativeElement.id === ((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.id))) {
6029
+ this.normalizzaValore();
6030
+ }
5975
6031
  // if (!changes.value.firstChange) {
5976
6032
  //
5977
6033
  // this.cleanError()
@@ -6027,15 +6083,38 @@
6027
6083
  }
6028
6084
  }
6029
6085
  };
6086
+ InputNumberComponent.prototype.onBlur = function () {
6087
+ this.normalizzaValore();
6088
+ _super.prototype.onBlur.call(this);
6089
+ };
6090
+ // private normalizzaValore() {
6091
+ //
6092
+ // setTimeout(() => {
6093
+ //
6094
+ // if (!this.disabled) {
6095
+ //
6096
+ // if (this.min != undefined && this.inputValue < this.min) {
6097
+ //
6098
+ // this.value = this.previousValue != undefined ? this.previousValue : this.min;
6099
+ //
6100
+ // } else if (this.max != undefined && this.inputValue > this.max) {
6101
+ //
6102
+ // this.value = this.previousValue != undefined ? this.previousValue : this.max;
6103
+ // }
6104
+ // }
6105
+ //
6106
+ // this.cdr.detectChanges();
6107
+ // });
6108
+ // }
6030
6109
  InputNumberComponent.prototype.normalizzaValore = function () {
6031
6110
  var _this = this;
6032
6111
  setTimeout(function () {
6033
- if (!_this.disabled) {
6112
+ if (!_this.disabled && _this.inputValue != undefined && isNotBlankOrNull("" + _this.inputValue)) {
6034
6113
  if (_this.min != undefined && _this.inputValue < _this.min) {
6035
- _this.value = _this.previousValue != undefined ? _this.previousValue : _this.min;
6114
+ _this.value = _this.min;
6036
6115
  }
6037
6116
  else if (_this.max != undefined && _this.inputValue > _this.max) {
6038
- _this.value = _this.previousValue != undefined ? _this.previousValue : _this.max;
6117
+ _this.value = _this.max;
6039
6118
  }
6040
6119
  }
6041
6120
  _this.cdr.detectChanges();
@@ -6896,7 +6975,7 @@
6896
6975
  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",
6897
6976
  changeDetection: CHANGE_DETECTION_STRATEGY,
6898
6977
  encapsulation: core.ViewEncapsulation.None,
6899
- styles: [""]
6978
+ styles: [".inail-tr-accordion .accordionTab div.form-group label{display:block!important}"]
6900
6979
  },] }
6901
6980
  ];
6902
6981
  TrAccordionComponent.ctorParameters = function () { return [
@@ -7099,11 +7178,13 @@
7099
7178
  exports.addZero = addZero;
7100
7179
  exports.call = call;
7101
7180
  exports.clone = clone;
7181
+ exports.compareDate = compareDate;
7102
7182
  exports.dateToString = dateToString;
7103
7183
  exports.getConfigValue = getConfigValue;
7104
7184
  exports.isAbsolute = isAbsolute;
7105
7185
  exports.isBlankOrNull = isBlankOrNull;
7106
7186
  exports.isDate = isDate;
7187
+ exports.isFutureDate = isFutureDate;
7107
7188
  exports.isHidden = isHidden;
7108
7189
  exports.isInISO8601Format = isInISO8601Format;
7109
7190
  exports.isInItalianFormat = isInItalianFormat;
@@ -7112,7 +7193,9 @@
7112
7193
  exports.isListNotEmptyOrNull = isListNotEmptyOrNull;
7113
7194
  exports.isNotBlankOrNull = isNotBlankOrNull;
7114
7195
  exports.isNumber = isNumber;
7196
+ exports.isPastDate = isPastDate;
7115
7197
  exports.isString = isString;
7198
+ exports.isToday = isToday;
7116
7199
  exports.isValidDateObject = isValidDateObject;
7117
7200
  exports.isValidRadioValue = isValidRadioValue;
7118
7201
  exports.isValidSelectValue = isValidSelectValue;