ng-inail-common 2.0.29 → 2.0.30-beta.11

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 (76) hide show
  1. package/bundles/ng-inail-common.umd.js +610 -394
  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/base.component.js +15 -5
  6. package/esm2015/lib/components/core/basic-ux-element.component.js +13 -5
  7. package/esm2015/lib/components/core/form/checkbox/checkbox.component.js +12 -6
  8. package/esm2015/lib/components/core/form/form-element.component.js +24 -9
  9. package/esm2015/lib/components/core/form/input-date/input-date.component.js +43 -217
  10. package/esm2015/lib/components/core/form/input-file/input-file.component.js +21 -10
  11. package/esm2015/lib/components/core/form/input-number/input-number.component.js +38 -13
  12. package/esm2015/lib/components/core/form/input-text/input-text.component.js +18 -23
  13. package/esm2015/lib/components/core/form/input-time/input-time.component.js +169 -0
  14. package/esm2015/lib/components/core/form/multi-select/multi-select.component.js +19 -9
  15. package/esm2015/lib/components/core/form/radio-select/radio-select.component.js +16 -7
  16. package/esm2015/lib/components/core/form/select/select.component.js +18 -10
  17. package/esm2015/lib/components/core/form/textarea/textarea.component.js +19 -9
  18. package/esm2015/lib/components/core/layout/breadcrumb/breadcrumb.component.js +8 -5
  19. package/esm2015/lib/components/core/layout/menu/menu.component.js +21 -9
  20. package/esm2015/lib/components/core/responsive-element.component.js +13 -5
  21. package/esm2015/lib/components/core/table/table/table.component.js +17 -12
  22. package/esm2015/lib/components/core/table/tr-checkbox/tr-checkbox.component.js +12 -7
  23. package/esm2015/lib/components/core/ux/accordion/accordion.component.js +17 -10
  24. package/esm2015/lib/components/core/ux/alert/alert.component.js +16 -12
  25. package/esm2015/lib/components/core/ux/button/button.component.js +8 -5
  26. package/esm2015/lib/components/core/ux/confirm/confirm.component.js +19 -15
  27. package/esm2015/lib/components/core/ux/feedback/feedback.component.js +16 -9
  28. package/esm2015/lib/components/core/ux/modal/modal.component.js +16 -9
  29. package/esm2015/lib/components/core/ux/page-title/page-title.component.js +14 -7
  30. package/esm2015/lib/components/core/ux/popover/popover.component.js +15 -6
  31. package/esm2015/lib/components/core/ux/progress-bar/progress-bar.component.js +8 -5
  32. package/esm2015/lib/components/core/ux/selector/selector.component.js +17 -11
  33. package/esm2015/lib/components/core/ux/tab-group/tab-group.component.js +8 -5
  34. package/esm2015/lib/components/core/ux/tab-pane/tab-pane.component.js +13 -8
  35. package/esm2015/lib/components/core/ux/wizard/wizard.component.js +14 -9
  36. package/esm2015/lib/ng-inail-common.config.js +3 -0
  37. package/esm2015/lib/ng-inail-common.module.js +18 -3
  38. package/esm2015/public-api.js +3 -1
  39. package/fesm2015/ng-inail-common.js +578 -396
  40. package/fesm2015/ng-inail-common.js.map +1 -1
  41. package/lib/components/core/base.component.d.ts +5 -1
  42. package/lib/components/core/basic-ux-element.component.d.ts +4 -1
  43. package/lib/components/core/form/checkbox/checkbox.component.d.ts +3 -1
  44. package/lib/components/core/form/form-element.component.d.ts +5 -1
  45. package/lib/components/core/form/input-date/input-date.component.d.ts +10 -1
  46. package/lib/components/core/form/input-file/input-file.component.d.ts +3 -1
  47. package/lib/components/core/form/input-number/input-number.component.d.ts +8 -1
  48. package/lib/components/core/form/input-text/input-text.component.d.ts +3 -1
  49. package/lib/components/core/form/input-time/input-time.component.d.ts +48 -0
  50. package/lib/components/core/form/multi-select/multi-select.component.d.ts +3 -1
  51. package/lib/components/core/form/radio-select/radio-select.component.d.ts +3 -1
  52. package/lib/components/core/form/select/select.component.d.ts +3 -1
  53. package/lib/components/core/form/textarea/textarea.component.d.ts +3 -1
  54. package/lib/components/core/layout/breadcrumb/breadcrumb.component.d.ts +3 -1
  55. package/lib/components/core/layout/menu/menu.component.d.ts +3 -1
  56. package/lib/components/core/responsive-element.component.d.ts +4 -1
  57. package/lib/components/core/table/table/table.component.d.ts +3 -1
  58. package/lib/components/core/table/tr-checkbox/tr-checkbox.component.d.ts +3 -1
  59. package/lib/components/core/ux/accordion/accordion.component.d.ts +3 -1
  60. package/lib/components/core/ux/alert/alert.component.d.ts +3 -1
  61. package/lib/components/core/ux/button/button.component.d.ts +3 -1
  62. package/lib/components/core/ux/confirm/confirm.component.d.ts +3 -1
  63. package/lib/components/core/ux/feedback/feedback.component.d.ts +3 -1
  64. package/lib/components/core/ux/modal/modal.component.d.ts +3 -1
  65. package/lib/components/core/ux/page-title/page-title.component.d.ts +3 -1
  66. package/lib/components/core/ux/popover/popover.component.d.ts +3 -1
  67. package/lib/components/core/ux/progress-bar/progress-bar.component.d.ts +3 -1
  68. package/lib/components/core/ux/selector/selector.component.d.ts +3 -1
  69. package/lib/components/core/ux/tab-group/tab-group.component.d.ts +3 -1
  70. package/lib/components/core/ux/tab-pane/tab-pane.component.d.ts +3 -1
  71. package/lib/components/core/ux/wizard/wizard.component.d.ts +3 -1
  72. package/lib/ng-inail-common.config.d.ts +170 -0
  73. package/lib/ng-inail-common.module.d.ts +3 -0
  74. package/ng-inail-common.metadata.json +1 -1
  75. package/package.json +1 -1
  76. package/public-api.d.ts +2 -0
@@ -61,6 +61,8 @@
61
61
  };
62
62
  var setPageScroll = function (scroll) { return document.getElementsByTagName('html')[0].style['overflow-y'] = scroll ? 'scroll' : 'hidden'; };
63
63
 
64
+ var NG_INAIL_COMMON_CONFIG = new core.InjectionToken('NG_INAIL_COMMON_CONFIG');
65
+
64
66
  (function (LogLevel) {
65
67
  LogLevel["LOG"] = "log";
66
68
  LogLevel["TRACE"] = "trace";
@@ -71,15 +73,18 @@
71
73
  })(exports.LogLevel || (exports.LogLevel = {}));
72
74
  var CHANGE_DETECTION_STRATEGY = core.ChangeDetectionStrategy.OnPush;
73
75
  // export const CHANGE_DETECTION_STRATEGY = ChangeDetectionStrategy.Default;
76
+ var getConfigValue = function (value, defaultValue) { return value != undefined ? value : defaultValue; };
74
77
  var BaseComponent = /** @class */ (function () {
75
- function BaseComponent(baseComponentCdr) {
78
+ function BaseComponent(baseComponentCdr, baseElementLibConfig) {
76
79
  var _this = this;
80
+ var _a;
77
81
  this.baseComponentCdr = baseComponentCdr;
82
+ this.baseElementLibConfig = baseElementLibConfig;
78
83
  /**
79
84
  * Se true effettua il log direttamente nella console.
80
85
  * Altrimenti emette l'evento log
81
86
  */
82
- this.logOnConsole = false;
87
+ this.logOnConsole = getConfigValue((_a = this.baseElementLibConfig) === null || _a === void 0 ? void 0 : _a.logOnConsole, false);
83
88
  /**
84
89
  *
85
90
  */
@@ -96,6 +101,11 @@
96
101
  this.log = new core.EventEmitter();
97
102
  saveEE();
98
103
  }
104
+ BaseComponent.prototype.overrideConfig = function (config) {
105
+ if (config) {
106
+ this.logOnConsole = getConfigValue(config.logOnConsole, this.logOnConsole);
107
+ }
108
+ };
99
109
  BaseComponent.prototype.ngOnChanges = function (changes) {
100
110
  this.emitDebug('ngOnChanges');
101
111
  this.emitDebug(changes);
@@ -152,7 +162,8 @@
152
162
  },] }
153
163
  ];
154
164
  BaseComponent.ctorParameters = function () { return [
155
- { type: core.ChangeDetectorRef }
165
+ { type: core.ChangeDetectorRef },
166
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
156
167
  ]; };
157
168
  BaseComponent.propDecorators = {
158
169
  log: [{ type: core.Output }],
@@ -477,12 +488,18 @@
477
488
 
478
489
  var BasicUxElementComponent = /** @class */ (function (_super) {
479
490
  __extends(BasicUxElementComponent, _super);
480
- function BasicUxElementComponent(uxElementCdr) {
481
- var _this = _super.call(this, uxElementCdr) || this;
491
+ function BasicUxElementComponent(uxElementCdr, uxElementLibConfig) {
492
+ var _this = _super.call(this, uxElementCdr, uxElementLibConfig) || this;
482
493
  _this.uxElementCdr = uxElementCdr;
494
+ _this.uxElementLibConfig = uxElementLibConfig;
483
495
  _this.id = uuidv4();
484
496
  return _this;
485
497
  }
498
+ BasicUxElementComponent.prototype.overrideConfig = function (config) {
499
+ if (config) {
500
+ _super.prototype.overrideConfig.call(this, config);
501
+ }
502
+ };
486
503
  BasicUxElementComponent.prototype.ngOnChanges = function (changes) {
487
504
  _super.prototype.ngOnChanges.call(this, changes);
488
505
  };
@@ -504,7 +521,8 @@
504
521
  },] }
505
522
  ];
506
523
  BasicUxElementComponent.ctorParameters = function () { return [
507
- { type: core.ChangeDetectorRef }
524
+ { type: core.ChangeDetectorRef },
525
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
508
526
  ]; };
509
527
  BasicUxElementComponent.propDecorators = {
510
528
  id: [{ type: core.Input }],
@@ -513,9 +531,10 @@
513
531
 
514
532
  var ResponsiveElementComponent = /** @class */ (function (_super) {
515
533
  __extends(ResponsiveElementComponent, _super);
516
- function ResponsiveElementComponent(responsiveElementCdr) {
517
- var _this = _super.call(this, responsiveElementCdr) || this;
534
+ function ResponsiveElementComponent(responsiveElementCdr, responsiveElementLibConfig) {
535
+ var _this = _super.call(this, responsiveElementCdr, responsiveElementLibConfig) || this;
518
536
  _this.responsiveElementCdr = responsiveElementCdr;
537
+ _this.responsiveElementLibConfig = responsiveElementLibConfig;
519
538
  _this.xs = 12;
520
539
  _this.xsClass = function () { return _this.xs != undefined ? "col-xs-" + _this.xs + " " : ''; };
521
540
  _this.smClass = function () { return _this.sm != undefined ? "col-sm-" + _this.sm + " " : ''; };
@@ -524,6 +543,11 @@
524
543
  _this.getResponsiveClass = function () { return ("" + _this.xsClass() + _this.smClass() + _this.mdClass() + _this.lgClass()).trim(); };
525
544
  return _this;
526
545
  }
546
+ ResponsiveElementComponent.prototype.overrideConfig = function (config) {
547
+ if (config) {
548
+ _super.prototype.overrideConfig.call(this, config);
549
+ }
550
+ };
527
551
  ResponsiveElementComponent.prototype.ngOnChanges = function (changes) {
528
552
  _super.prototype.ngOnChanges.call(this, changes);
529
553
  };
@@ -541,7 +565,8 @@
541
565
  },] }
542
566
  ];
543
567
  ResponsiveElementComponent.ctorParameters = function () { return [
544
- { type: core.ChangeDetectorRef }
568
+ { type: core.ChangeDetectorRef },
569
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
545
570
  ]; };
546
571
  ResponsiveElementComponent.propDecorators = {
547
572
  lg: [{ type: core.Input }],
@@ -1599,10 +1624,13 @@
1599
1624
  var ɵ1 = cloneItems;
1600
1625
  var MenuComponent = /** @class */ (function (_super) {
1601
1626
  __extends(MenuComponent, _super);
1602
- function MenuComponent(router, cdr) {
1603
- var _this = _super.call(this, cdr) || this;
1627
+ function MenuComponent(router, cdr, libConfig) {
1628
+ var _this = this;
1629
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1630
+ _this = _super.call(this, cdr, libConfig) || this;
1604
1631
  _this.router = router;
1605
1632
  _this.cdr = cdr;
1633
+ _this.libConfig = libConfig;
1606
1634
  /**
1607
1635
  * Elemento parent del menu.
1608
1636
  * ( Questo input non deve essere passato, serve internamente per far funzionare il menu )
@@ -1614,24 +1642,30 @@
1614
1642
  * quando la proprieta linkRegex matcha
1615
1643
  * con l'url corrente
1616
1644
  */
1617
- _this.disableLinkOverwriting = false;
1645
+ _this.disableLinkOverwriting = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.menuComponent) === null || _b === void 0 ? void 0 : _b.disableLinkOverwriting, false);
1618
1646
  /**
1619
1647
  * Se true indica che le voci del menu sono collassabili.
1620
1648
  * Questa impostazione viene sovrascritta se specificato diversamente
1621
1649
  * negli elementi del menu
1622
1650
  */
1623
- _this.collapsible = false;
1651
+ _this.collapsible = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.menuComponent) === null || _d === void 0 ? void 0 : _d.collapsible, false);
1652
+ /**
1653
+ * Indica lo stato iniziale del menu, se colassato o espanso.
1654
+ * Questa impostazione viene sovrascritta se specificato diversamente
1655
+ * negli elementi del menu
1656
+ */
1657
+ _this.collapsed = getConfigValue((_f = (_e = _this.libConfig) === null || _e === void 0 ? void 0 : _e.menuComponent) === null || _f === void 0 ? void 0 : _f.collapsed, undefined);
1624
1658
  /**
1625
1659
  * Se true abilita l'effetto fisarmonica
1626
1660
  * sulle voci di menu espandibili.
1627
1661
  */
1628
- _this.collapseOther = false;
1662
+ _this.collapseOther = getConfigValue((_h = (_g = _this.libConfig) === null || _g === void 0 ? void 0 : _g.menuComponent) === null || _h === void 0 ? void 0 : _h.collapseOther, false);
1629
1663
  /**
1630
1664
  * Se true espande automaticamente il percorso
1631
1665
  * verso un elemento
1632
1666
  * quando questo si riferisce all'url corrente
1633
1667
  */
1634
- _this.expandAutomatically = true;
1668
+ _this.expandAutomatically = getConfigValue((_k = (_j = _this.libConfig) === null || _j === void 0 ? void 0 : _j.menuComponent) === null || _k === void 0 ? void 0 : _k.expandAutomatically, true);
1635
1669
  /**
1636
1670
  * Emette la voce di menu selezionata.
1637
1671
  */
@@ -1741,6 +1775,7 @@
1741
1775
  _this.espandiItem = function (item) { return _this.setCollapsed(item, 'show'); };
1742
1776
  _this.collassaItem = function (item) { return _this.setCollapsed(item, 'hide'); };
1743
1777
  _this.toggleItem = function (item) { return _this.setCollapsed(item, 'toggle'); };
1778
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.menuComponent);
1744
1779
  _this.logPrefix = '[inail-menu]';
1745
1780
  return _this;
1746
1781
  }
@@ -2058,7 +2093,8 @@
2058
2093
  ];
2059
2094
  MenuComponent.ctorParameters = function () { return [
2060
2095
  { type: router.Router },
2061
- { type: core.ChangeDetectorRef }
2096
+ { type: core.ChangeDetectorRef },
2097
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
2062
2098
  ]; };
2063
2099
  MenuComponent.propDecorators = {
2064
2100
  parent: [{ type: core.Input }],
@@ -2084,9 +2120,10 @@
2084
2120
  var ButtonComponent = /** @class */ (function (_super) {
2085
2121
  __extends(ButtonComponent, _super);
2086
2122
  // inizializzazioneTerminata: boolean = false;
2087
- function ButtonComponent(cdr) {
2088
- var _this = _super.call(this, cdr) || this;
2123
+ function ButtonComponent(cdr, libConfig) {
2124
+ var _this = _super.call(this, cdr, libConfig) || this;
2089
2125
  _this.cdr = cdr;
2126
+ _this.libConfig = libConfig;
2090
2127
  _this.onclick = new core.EventEmitter();
2091
2128
  _this.setFocusOnError = false;
2092
2129
  _this.logPrefix = "[inail-button]";
@@ -2138,7 +2175,8 @@
2138
2175
  },] }
2139
2176
  ];
2140
2177
  ButtonComponent.ctorParameters = function () { return [
2141
- { type: core.ChangeDetectorRef }
2178
+ { type: core.ChangeDetectorRef },
2179
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
2142
2180
  ]; };
2143
2181
  ButtonComponent.propDecorators = {
2144
2182
  label: [{ type: core.Input }],
@@ -2844,10 +2882,11 @@
2844
2882
 
2845
2883
  var BreadcrumbComponent = /** @class */ (function (_super) {
2846
2884
  __extends(BreadcrumbComponent, _super);
2847
- function BreadcrumbComponent(router, cdr) {
2848
- var _this = _super.call(this, cdr) || this;
2885
+ function BreadcrumbComponent(router, cdr, libConfig) {
2886
+ var _this = _super.call(this, cdr, libConfig) || this;
2849
2887
  _this.router = router;
2850
2888
  _this.cdr = cdr;
2889
+ _this.libConfig = libConfig;
2851
2890
  _this.logPrefix = '[inail-breadcrumb]';
2852
2891
  _this.detach();
2853
2892
  return _this;
@@ -2911,7 +2950,8 @@
2911
2950
  ];
2912
2951
  BreadcrumbComponent.ctorParameters = function () { return [
2913
2952
  { type: router.Router },
2914
- { type: core.ChangeDetectorRef }
2953
+ { type: core.ChangeDetectorRef },
2954
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
2915
2955
  ]; };
2916
2956
  BreadcrumbComponent.propDecorators = {
2917
2957
  currentPage: [{ type: core.Input }],
@@ -2920,12 +2960,15 @@
2920
2960
 
2921
2961
  var FormElementComponent = /** @class */ (function (_super) {
2922
2962
  __extends(FormElementComponent, _super);
2923
- function FormElementComponent(formElementCdr) {
2924
- var _this = _super.call(this, formElementCdr) || this;
2963
+ function FormElementComponent(formElementCdr, formElementLibConfig) {
2964
+ var _this = this;
2965
+ var _a, _b, _c, _d, _e, _f;
2966
+ _this = _super.call(this, formElementCdr, formElementLibConfig) || this;
2925
2967
  _this.formElementCdr = formElementCdr;
2968
+ _this.formElementLibConfig = formElementLibConfig;
2926
2969
  _this.required = false;
2927
- _this.requiredSimbol = '*';
2928
- _this.requiredSimbolPosition = 'left';
2970
+ _this.requiredSimbol = getConfigValue((_b = (_a = _this.formElementLibConfig) === null || _a === void 0 ? void 0 : _a.formElementComponent) === null || _b === void 0 ? void 0 : _b.requiredSimbol, '*');
2971
+ _this.requiredSimbolPosition = getConfigValue((_d = (_c = _this.formElementLibConfig) === null || _c === void 0 ? void 0 : _c.formElementComponent) === null || _d === void 0 ? void 0 : _d.requiredSimbolPosition, 'left');
2929
2972
  _this.disabled = false;
2930
2973
  _this.readonly = false;
2931
2974
  _this.hasError = false;
@@ -2934,14 +2977,24 @@
2934
2977
  _this.errorChange = new core.EventEmitter();
2935
2978
  _this.enterUp = new core.EventEmitter();
2936
2979
  _this.popover = false;
2980
+ _this.cleanErrorOnChange = getConfigValue((_f = (_e = _this.formElementLibConfig) === null || _e === void 0 ? void 0 : _e.formElementComponent) === null || _f === void 0 ? void 0 : _f.cleanErrorOnChange, true);
2937
2981
  _this.getLabel = function () { return "" + ((_this.required && _this.requiredSimbolPosition === 'left') ? _this.requiredSimbol + " " : '') + _this.label + ((_this.required && _this.requiredSimbolPosition === 'right') ? " " + _this.requiredSimbol : ''); };
2938
2982
  _this.isThereError = function () { return _this.hasError || isNotBlankOrNull(_this.error); };
2939
2983
  _this.showError = function () { return _this.isThereError() && isNotBlankOrNull(_this.error); };
2940
2984
  _this.getAriaDescribedBy = function () { return _this.showError() || isNotBlankOrNull(_this.description) ? _this.id + "-description" : undefined; };
2941
2985
  // showPopover = (): boolean => isNotBlankOrNull(this.popoverHeader) || isNotBlankOrNull(this.popoverContent);
2942
2986
  _this.showPopover = function () { return _this.popover === true; };
2987
+ _super.prototype.overrideConfig.call(_this, formElementLibConfig === null || formElementLibConfig === void 0 ? void 0 : formElementLibConfig.formElementComponent);
2943
2988
  return _this;
2944
2989
  }
2990
+ FormElementComponent.prototype.overrideConfig = function (config) {
2991
+ if (config) {
2992
+ _super.prototype.overrideConfig.call(this, config);
2993
+ this.requiredSimbol = getConfigValue(config.requiredSimbol, this.requiredSimbol);
2994
+ this.requiredSimbolPosition = getConfigValue(config.requiredSimbolPosition, this.requiredSimbolPosition);
2995
+ this.cleanErrorOnChange = getConfigValue(config.cleanErrorOnChange, this.cleanErrorOnChange);
2996
+ }
2997
+ };
2945
2998
  FormElementComponent.prototype.ngOnChanges = function (changes) {
2946
2999
  _super.prototype.ngOnChanges.call(this, changes);
2947
3000
  this.title = this.getNotBlankValue(this.title);
@@ -3004,7 +3057,8 @@
3004
3057
  },] }
3005
3058
  ];
3006
3059
  FormElementComponent.ctorParameters = function () { return [
3007
- { type: core.ChangeDetectorRef }
3060
+ { type: core.ChangeDetectorRef },
3061
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
3008
3062
  ]; };
3009
3063
  FormElementComponent.propDecorators = {
3010
3064
  label: [{ type: core.Input }],
@@ -3030,7 +3084,8 @@
3030
3084
  popoverButtonIcon: [{ type: core.Input }],
3031
3085
  popoverButtonTitle: [{ type: core.Input }],
3032
3086
  popoverHeader: [{ type: core.Input }],
3033
- popoverContent: [{ type: core.Input }]
3087
+ popoverContent: [{ type: core.Input }],
3088
+ cleanErrorOnChange: [{ type: core.Input }]
3034
3089
  };
3035
3090
 
3036
3091
  /**
@@ -3124,23 +3179,26 @@
3124
3179
 
3125
3180
  var InputTextComponent = /** @class */ (function (_super) {
3126
3181
  __extends(InputTextComponent, _super);
3127
- function InputTextComponent(cdr, datePipe) {
3128
- var _this = _super.call(this, cdr) || this;
3182
+ function InputTextComponent(cdr, datePipe, libConfig) {
3183
+ var _this = this;
3184
+ var _a, _b, _c, _d, _e, _f;
3185
+ _this = _super.call(this, cdr, libConfig) || this;
3129
3186
  _this.cdr = cdr;
3130
3187
  _this.datePipe = datePipe;
3188
+ _this.libConfig = libConfig;
3189
+ _this.placeholder = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.inputTextComponent) === null || _b === void 0 ? void 0 : _b.placeholder, undefined);
3131
3190
  _this.isDate = false;
3132
3191
  _this.valueChange = new core.EventEmitter();
3192
+ _this.preventPasting = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.inputTextComponent) === null || _d === void 0 ? void 0 : _d.preventPasting, false);
3133
3193
  _this.logPrefix = "[inail-input-text]";
3194
+ _this.emitDebug('NgInailCommonConfig:');
3195
+ _this.emitDebug((_e = _this.libConfig) === null || _e === void 0 ? void 0 : _e.inputTextComponent);
3196
+ _super.prototype.overrideConfig.call(_this, (_f = _this.libConfig) === null || _f === void 0 ? void 0 : _f.inputTextComponent);
3134
3197
  _this.detach();
3135
3198
  return _this;
3136
3199
  }
3137
3200
  InputTextComponent.prototype.ngOnChanges = function (changes) {
3138
3201
  _super.prototype.ngOnChanges.call(this, changes);
3139
- // Con Form Control
3140
- // if (changes?.formControl?.isFirstChange()) {
3141
- //
3142
- // this.externalformControl = true;
3143
- // }
3144
3202
  this.maxlength = this.getNotBlankValue(this.maxlength);
3145
3203
  this.placeholder = this.getNotBlankValue(this.placeholder);
3146
3204
  this.cdr.detectChanges();
@@ -3165,7 +3223,6 @@
3165
3223
  },
3166
3224
  set: function (value) {
3167
3225
  this.emitDebug("@Input set value: " + this.inputValue + " -> " + value);
3168
- // this.inputValue = value; // Con Form Control
3169
3226
  this.setValue(value);
3170
3227
  },
3171
3228
  enumerable: false,
@@ -3183,21 +3240,13 @@
3183
3240
  this.cdr.detectChanges();
3184
3241
  this.emitDebug("this.valueChange.emit(" + value + ")");
3185
3242
  this.valueChange.emit(value);
3186
- this.cleanError();
3243
+ if (this.cleanErrorOnChange) {
3244
+ this.cleanError();
3245
+ }
3187
3246
  if (this.onChange) {
3188
3247
  this.onChange(value);
3189
3248
  }
3190
3249
  }
3191
- // Con Form Control
3192
- // if (value != this.formControl.value && !this.externalformControl) {
3193
- //
3194
- // this.emitDebug(`update value: ${this.formControl.value} -> ${value}`);
3195
- //
3196
- // // Serve per evitare l'errore ExpressionChangedAfterItHasBeenCheckedError
3197
- // setTimeout(() => {
3198
- // this.formControl.setValue((this.isDate && isDate(value)) ? this.datePipe.transform(value, 'dd/MM/yyyy') : value);
3199
- // })
3200
- // }
3201
3250
  };
3202
3251
  InputTextComponent.prototype.onPaste = function ($event) {
3203
3252
  if (this.preventPasting === true) {
@@ -3227,7 +3276,8 @@
3227
3276
  ];
3228
3277
  InputTextComponent.ctorParameters = function () { return [
3229
3278
  { type: core.ChangeDetectorRef },
3230
- { type: common.DatePipe }
3279
+ { type: common.DatePipe },
3280
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
3231
3281
  ]; };
3232
3282
  InputTextComponent.propDecorators = {
3233
3283
  formControlElement: [{ type: core.ViewChild, args: ['formControl', { static: true },] }],
@@ -3241,17 +3291,22 @@
3241
3291
 
3242
3292
  var SelectComponent = /** @class */ (function (_super) {
3243
3293
  __extends(SelectComponent, _super);
3244
- function SelectComponent(cdr) {
3245
- var _this = _super.call(this, cdr) || this;
3294
+ function SelectComponent(cdr, libConfig) {
3295
+ var _this = this;
3296
+ var _a, _b, _c, _d, _e, _f, _g, _h;
3297
+ _this = _super.call(this, cdr, libConfig) || this;
3246
3298
  _this.cdr = cdr;
3299
+ _this.libConfig = libConfig;
3247
3300
  _this.selectedValue = '';
3248
3301
  _this.options = [];
3249
- _this.blankOption = true;
3250
- _this.blankOptionText = '- seleziona opzione -';
3251
- _this.blankOptionDisabled = false;
3302
+ _this.blankOption = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.selectComponent) === null || _b === void 0 ? void 0 : _b.blankOption, true);
3303
+ _this.blankOptionText = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.selectComponent) === null || _d === void 0 ? void 0 : _d.blankOptionText, '- seleziona opzione -');
3304
+ _this.blankOptionDisabled = getConfigValue((_f = (_e = _this.libConfig) === null || _e === void 0 ? void 0 : _e.selectComponent) === null || _f === void 0 ? void 0 : _f.blankOptionDisabled, false);
3305
+ _this.sort = getConfigValue((_h = (_g = _this.libConfig) === null || _g === void 0 ? void 0 : _g.selectComponent) === null || _h === void 0 ? void 0 : _h.sort, undefined);
3252
3306
  _this.select = new core.EventEmitter();
3253
3307
  _this.valueChange = new core.EventEmitter();
3254
3308
  _this.logPrefix = "[inail-select]";
3309
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.selectComponent);
3255
3310
  _this.detach();
3256
3311
  return _this;
3257
3312
  }
@@ -3304,7 +3359,9 @@
3304
3359
  _this.emitDebug("this.valueChange.emit(" + _this.selectedValue + ")");
3305
3360
  _this.valueChange.emit(_this.selectedValue);
3306
3361
  _this.select.emit(_this.options.find(function (opt) { return (opt === null || opt === void 0 ? void 0 : opt.value) === _this.selectedValue; }));
3307
- _this.cleanError();
3362
+ if (_this.cleanErrorOnChange) {
3363
+ _this.cleanError();
3364
+ }
3308
3365
  if (_this.onChange) {
3309
3366
  _this.onChange(_this.selectedValue);
3310
3367
  }
@@ -3335,7 +3392,8 @@
3335
3392
  },] }
3336
3393
  ];
3337
3394
  SelectComponent.ctorParameters = function () { return [
3338
- { type: core.ChangeDetectorRef }
3395
+ { type: core.ChangeDetectorRef },
3396
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
3339
3397
  ]; };
3340
3398
  SelectComponent.propDecorators = {
3341
3399
  formControlElement: [{ type: core.ViewChild, args: ['formControl',] }],
@@ -3396,11 +3454,17 @@
3396
3454
 
3397
3455
  var PageTitleComponent = /** @class */ (function (_super) {
3398
3456
  __extends(PageTitleComponent, _super);
3399
- function PageTitleComponent(cdr) {
3400
- var _this = _super.call(this, cdr) || this;
3457
+ function PageTitleComponent(cdr, libConfig) {
3458
+ var _this = this;
3459
+ var _a, _b;
3460
+ _this = _super.call(this, cdr, libConfig) || this;
3401
3461
  _this.cdr = cdr;
3402
- _this.autoCatchFocus = true;
3462
+ _this.libConfig = libConfig;
3463
+ _this.autoCatchFocus = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.pageTitleComponent) === null || _b === void 0 ? void 0 : _b.autoCatchFocus, true);
3403
3464
  _this.logPrefix = '[inail-page-title]';
3465
+ _this.emitDebug('NgInailCommonConfig:');
3466
+ _this.emitDebug(libConfig === null || libConfig === void 0 ? void 0 : libConfig.pageTitleComponent);
3467
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.pageTitleComponent);
3404
3468
  _this.detach();
3405
3469
  return _this;
3406
3470
  }
@@ -3477,7 +3541,8 @@
3477
3541
  },] }
3478
3542
  ];
3479
3543
  PageTitleComponent.ctorParameters = function () { return [
3480
- { type: core.ChangeDetectorRef }
3544
+ { type: core.ChangeDetectorRef },
3545
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
3481
3546
  ]; };
3482
3547
  PageTitleComponent.propDecorators = {
3483
3548
  title: [{ type: core.Input }],
@@ -3491,20 +3556,26 @@
3491
3556
 
3492
3557
  var FeedbackComponent = /** @class */ (function (_super) {
3493
3558
  __extends(FeedbackComponent, _super);
3494
- function FeedbackComponent(cdr) {
3495
- var _this = _super.call(this, cdr) || this;
3559
+ function FeedbackComponent(cdr, libConfig) {
3560
+ var _this = this;
3561
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
3562
+ _this = _super.call(this, cdr, libConfig) || this;
3496
3563
  _this.cdr = cdr;
3564
+ _this.libConfig = libConfig;
3497
3565
  // Queste inizializzazioni servono per essere usate nel template
3498
3566
  _this.errorType = 'ERROR';
3499
3567
  _this.successType = 'SUCCESS';
3500
3568
  _this.type = 'SUCCESS';
3501
- _this.showIcon = true;
3502
- _this.autoCatchFocus = false;
3503
- _this.scrollToFocus = true;
3569
+ _this.showIcon = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.feedbackComponent) === null || _b === void 0 ? void 0 : _b.showIcon, true);
3570
+ _this.detailsAsList = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.feedbackComponent) === null || _d === void 0 ? void 0 : _d.detailsAsList, undefined);
3571
+ _this.detailsAsOrderedList = getConfigValue((_f = (_e = _this.libConfig) === null || _e === void 0 ? void 0 : _e.feedbackComponent) === null || _f === void 0 ? void 0 : _f.detailsAsOrderedList, undefined);
3572
+ _this.autoCatchFocus = getConfigValue((_h = (_g = _this.libConfig) === null || _g === void 0 ? void 0 : _g.feedbackComponent) === null || _h === void 0 ? void 0 : _h.autoCatchFocus, false);
3573
+ _this.scrollToFocus = getConfigValue((_k = (_j = _this.libConfig) === null || _j === void 0 ? void 0 : _j.feedbackComponent) === null || _k === void 0 ? void 0 : _k.scrollToFocus, true);
3504
3574
  _this.labelFeedback = false;
3505
3575
  // hasContent = () => this.feedbackContent?.nativeElement?.childElementCount > 0;
3506
3576
  _this.hasContent = function () { var _a, _b; return isNotBlankOrNull((_b = (_a = _this.feedbackContent) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.textContent); };
3507
3577
  _this.logPrefix = '[inail-feedback]';
3578
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.confirmComponent);
3508
3579
  _this.detach();
3509
3580
  return _this;
3510
3581
  }
@@ -3555,7 +3626,8 @@
3555
3626
  },] }
3556
3627
  ];
3557
3628
  FeedbackComponent.ctorParameters = function () { return [
3558
- { type: core.ChangeDetectorRef }
3629
+ { type: core.ChangeDetectorRef },
3630
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
3559
3631
  ]; };
3560
3632
  FeedbackComponent.propDecorators = {
3561
3633
  mainMessage: [{ type: core.ViewChild, args: ['mainMessage',] }],
@@ -3588,14 +3660,19 @@
3588
3660
 
3589
3661
  var AccordionComponent = /** @class */ (function (_super) {
3590
3662
  __extends(AccordionComponent, _super);
3591
- function AccordionComponent(cdr, renderer) {
3592
- var _this = _super.call(this, cdr) || this;
3663
+ function AccordionComponent(cdr, renderer, libConfig) {
3664
+ var _this = this;
3665
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
3666
+ _this = _super.call(this, cdr, libConfig) || this;
3593
3667
  _this.cdr = cdr;
3594
3668
  _this.renderer = renderer;
3595
- _this.ariaLabelOpened = "Riduce l'accordion";
3596
- _this.ariaLabelClosed = "Espande l'accordion";
3597
- _this.requiredSimbol = '*';
3598
- _this.requiredSimbolPosition = 'left';
3669
+ _this.libConfig = libConfig;
3670
+ _this.ariaLabel = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.accordionComponent) === null || _b === void 0 ? void 0 : _b.ariaLabel, undefined);
3671
+ _this.ariaLabelOpened = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.accordionComponent) === null || _d === void 0 ? void 0 : _d.ariaLabelOpened, "Riduce l'accordion");
3672
+ _this.ariaLabelClosed = getConfigValue((_f = (_e = _this.libConfig) === null || _e === void 0 ? void 0 : _e.accordionComponent) === null || _f === void 0 ? void 0 : _f.ariaLabelClosed, "Espande l'accordion");
3673
+ _this.collapsed = getConfigValue((_h = (_g = _this.libConfig) === null || _g === void 0 ? void 0 : _g.accordionComponent) === null || _h === void 0 ? void 0 : _h.collapsed, undefined);
3674
+ _this.requiredSimbol = getConfigValue((_k = (_j = _this.libConfig) === null || _j === void 0 ? void 0 : _j.accordionComponent) === null || _k === void 0 ? void 0 : _k.requiredSimbol, '*');
3675
+ _this.requiredSimbolPosition = getConfigValue((_m = (_l = _this.libConfig) === null || _l === void 0 ? void 0 : _l.accordionComponent) === null || _m === void 0 ? void 0 : _m.requiredSimbolPosition, 'left');
3599
3676
  _this.ontoggle = new core.EventEmitter();
3600
3677
  _this.getTitle = function () { return "" + ((_this.required && _this.requiredSimbolPosition === 'left') ? _this.requiredSimbol + " " : '') + _this.title + ((_this.required && _this.requiredSimbolPosition === 'right') ? " " + _this.requiredSimbol : ''); };
3601
3678
  _this.panelBodyHeight$ = new rxjs.BehaviorSubject(undefined);
@@ -3631,6 +3708,7 @@
3631
3708
  // }
3632
3709
  };
3633
3710
  _this.logPrefix = '[inail-accordion]';
3711
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.accordionComponent);
3634
3712
  _this.detach();
3635
3713
  return _this;
3636
3714
  }
@@ -3686,7 +3764,8 @@
3686
3764
  ];
3687
3765
  AccordionComponent.ctorParameters = function () { return [
3688
3766
  { type: core.ChangeDetectorRef },
3689
- { type: core.Renderer2 }
3767
+ { type: core.Renderer2 },
3768
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
3690
3769
  ]; };
3691
3770
  AccordionComponent.propDecorators = {
3692
3771
  title: [{ type: core.Input }],
@@ -3707,11 +3786,14 @@
3707
3786
 
3708
3787
  var TabPaneComponent = /** @class */ (function (_super) {
3709
3788
  __extends(TabPaneComponent, _super);
3710
- function TabPaneComponent(cdr) {
3711
- var _this = _super.call(this, cdr) || this;
3789
+ function TabPaneComponent(cdr, libConfig) {
3790
+ var _this = this;
3791
+ var _a, _b, _c, _d;
3792
+ _this = _super.call(this, cdr, libConfig) || this;
3712
3793
  _this.cdr = cdr;
3713
- _this.requiredSimbol = '*';
3714
- _this.requiredSimbolPosition = 'left';
3794
+ _this.libConfig = libConfig;
3795
+ _this.requiredSimbol = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.tabPaneComponent) === null || _b === void 0 ? void 0 : _b.requiredSimbol, '*');
3796
+ _this.requiredSimbolPosition = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.tabPaneComponent) === null || _d === void 0 ? void 0 : _d.requiredSimbolPosition, 'left');
3715
3797
  _this.activeChange = new core.EventEmitter();
3716
3798
  // @Output()
3717
3799
  // selected: EventEmitter<boolean> = new EventEmitter<boolean>();
@@ -3719,6 +3801,7 @@
3719
3801
  _this.doDetechChange = function () { return _this.cdr.detectChanges(); };
3720
3802
  _this.getTitle = function () { return "" + ((_this.required && _this.requiredSimbolPosition === 'left') ? _this.requiredSimbol + " " : '') + _this.title + ((_this.required && _this.requiredSimbolPosition === 'right') ? " " + _this.requiredSimbol : ''); };
3721
3803
  _this.logPrefix = '[inail-tab-pane]';
3804
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.tabPaneComponent);
3722
3805
  _this.detach();
3723
3806
  return _this;
3724
3807
  }
@@ -3752,7 +3835,8 @@
3752
3835
  },] }
3753
3836
  ];
3754
3837
  TabPaneComponent.ctorParameters = function () { return [
3755
- { type: core.ChangeDetectorRef }
3838
+ { type: core.ChangeDetectorRef },
3839
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
3756
3840
  ]; };
3757
3841
  TabPaneComponent.propDecorators = {
3758
3842
  title: [{ type: core.Input }],
@@ -3765,9 +3849,10 @@
3765
3849
 
3766
3850
  var TabGroupComponent = /** @class */ (function (_super) {
3767
3851
  __extends(TabGroupComponent, _super);
3768
- function TabGroupComponent(cdr) {
3769
- var _this = _super.call(this, cdr) || this;
3852
+ function TabGroupComponent(cdr, libConfig) {
3853
+ var _this = _super.call(this, cdr, libConfig) || this;
3770
3854
  _this.cdr = cdr;
3855
+ _this.libConfig = libConfig;
3771
3856
  _this.selected = new core.EventEmitter();
3772
3857
  _this.isActive = function (id) { return _this.panes.some(function (pane) { return pane.id == id && pane.active; }); };
3773
3858
  // getPaneTitle = (pane: TabPaneComponent) => `${pane.title}${pane.required ? ' *' : ''}`;
@@ -3830,7 +3915,8 @@
3830
3915
  },] }
3831
3916
  ];
3832
3917
  TabGroupComponent.ctorParameters = function () { return [
3833
- { type: core.ChangeDetectorRef }
3918
+ { type: core.ChangeDetectorRef },
3919
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
3834
3920
  ]; };
3835
3921
  TabGroupComponent.propDecorators = {
3836
3922
  panes: [{ type: core.ContentChildren, args: [TabPaneComponent,] }],
@@ -3847,10 +3933,18 @@
3847
3933
  // }
3848
3934
  var PopoverComponent = /** @class */ (function (_super) {
3849
3935
  __extends(PopoverComponent, _super);
3850
- function PopoverComponent(cdr) {
3851
- var _this = _super.call(this, cdr) || this;
3936
+ function PopoverComponent(cdr, libConfig) {
3937
+ var _this = this;
3938
+ var _a, _b, _c, _d;
3939
+ _this = _super.call(this, cdr, libConfig) || this;
3852
3940
  _this.cdr = cdr;
3941
+ _this.libConfig = libConfig;
3942
+ // @Input()
3943
+ // data: Popover;
3944
+ _this.iconClass = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.popoverComponent) === null || _b === void 0 ? void 0 : _b.iconClass, undefined);
3945
+ _this.buttonTitle = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.popoverComponent) === null || _d === void 0 ? void 0 : _d.buttonTitle, undefined);
3853
3946
  _this.logPrefix = '[inail-popover]';
3947
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.popoverComponent);
3854
3948
  _this.detach();
3855
3949
  return _this;
3856
3950
  }
@@ -3897,7 +3991,8 @@
3897
3991
  },] }
3898
3992
  ];
3899
3993
  PopoverComponent.ctorParameters = function () { return [
3900
- { type: core.ChangeDetectorRef }
3994
+ { type: core.ChangeDetectorRef },
3995
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
3901
3996
  ]; };
3902
3997
  PopoverComponent.propDecorators = {
3903
3998
  openButton: [{ type: core.ViewChild, args: ['openButton',] }],
@@ -3910,12 +4005,18 @@
3910
4005
 
3911
4006
  var TextareaComponent = /** @class */ (function (_super) {
3912
4007
  __extends(TextareaComponent, _super);
3913
- function TextareaComponent(cdr) {
3914
- var _this = _super.call(this, cdr) || this;
4008
+ function TextareaComponent(cdr, libConfig) {
4009
+ var _this = this;
4010
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
4011
+ _this = _super.call(this, cdr, libConfig) || this;
3915
4012
  _this.cdr = cdr;
4013
+ _this.libConfig = libConfig;
4014
+ _this.placeholder = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.textareaComponent) === null || _b === void 0 ? void 0 : _b.placeholder, undefined);
3916
4015
  _this.valueChange = new core.EventEmitter();
3917
- _this.maxlength = 300;
3918
- _this.rows = 10;
4016
+ _this.maxlength = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.textareaComponent) === null || _d === void 0 ? void 0 : _d.maxlength, 300);
4017
+ _this.rows = getConfigValue((_f = (_e = _this.libConfig) === null || _e === void 0 ? void 0 : _e.textareaComponent) === null || _f === void 0 ? void 0 : _f.rows, 10);
4018
+ _this.cols = getConfigValue((_h = (_g = _this.libConfig) === null || _g === void 0 ? void 0 : _g.textareaComponent) === null || _h === void 0 ? void 0 : _h.cols, undefined);
4019
+ _this.preventPasting = getConfigValue((_k = (_j = _this.libConfig) === null || _j === void 0 ? void 0 : _j.textareaComponent) === null || _k === void 0 ? void 0 : _k.preventPasting, undefined);
3919
4020
  _this.getCaratteriDisponibili = function () { return _this.maxlength - (_this.inputValue ? _this.inputValue.length : 0); };
3920
4021
  _this.isTextTooLong = function () { return _this.inputValue && _this.inputValue.length > _this.maxlength; };
3921
4022
  _this.isThereTextareaError = function () { return _this.isThereError() || _this.isTextTooLong(); };
@@ -3924,6 +4025,7 @@
3924
4025
  ? "Il testo non pu&ograve; essere lungo di " + _this.maxlength + " caratteri"
3925
4026
  : _this.error; };
3926
4027
  _this.logPrefix = "[inail-textarea]";
4028
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.textareaComponent);
3927
4029
  _this.detach();
3928
4030
  return _this;
3929
4031
  }
@@ -3975,7 +4077,9 @@
3975
4077
  this.cdr.detectChanges();
3976
4078
  this.emitDebug("this.valueChange.emit(" + value + ")");
3977
4079
  this.valueChange.emit(value);
3978
- this.cleanError();
4080
+ if (this.cleanErrorOnChange) {
4081
+ this.cleanError();
4082
+ }
3979
4083
  if (this.onChange) {
3980
4084
  this.onChange(value);
3981
4085
  }
@@ -4008,7 +4112,8 @@
4008
4112
  },] }
4009
4113
  ];
4010
4114
  TextareaComponent.ctorParameters = function () { return [
4011
- { type: core.ChangeDetectorRef }
4115
+ { type: core.ChangeDetectorRef },
4116
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
4012
4117
  ]; };
4013
4118
  TextareaComponent.propDecorators = {
4014
4119
  formControlElement: [{ type: core.ViewChild, args: ['formControl', { static: true },] }],
@@ -4025,16 +4130,26 @@
4025
4130
  var ɵ0$3 = isValidInputModel;
4026
4131
  var isLongTime = function (o) { return o && (typeof o === 'number'); };
4027
4132
  var ɵ1$2 = isLongTime;
4133
+ var ACCEPTED_INPUTS = ['/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'Backspace', 'Delete', "Tab", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"];
4028
4134
  var InputDateComponent = /** @class */ (function (_super) {
4029
4135
  __extends(InputDateComponent, _super);
4030
- function InputDateComponent(cdr) {
4031
- var _this = _super.call(this, cdr) || this;
4136
+ function InputDateComponent(cdr, libConfig) {
4137
+ var _this = this;
4138
+ var _a, _b, _c, _d, _e, _f;
4139
+ _this = _super.call(this, cdr, libConfig) || this;
4032
4140
  _this.cdr = cdr;
4141
+ _this.libConfig = libConfig;
4033
4142
  _this.valueChange = new core.EventEmitter();
4143
+ // @Input()
4144
+ // modelFormat: DateFormat;
4145
+ // https://bootstrap-datepicker.readthedocs.io/en/latest/options.html
4146
+ _this.options = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.inputDateComponent) === null || _b === void 0 ? void 0 : _b.options, undefined);
4147
+ _this.selfValidation = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.inputDateComponent) === null || _d === void 0 ? void 0 : _d.selfValidation, true);
4148
+ _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');
4034
4149
  _this.isValidInputValue = function () { return isBlankOrNull(_this.visibleData) || isInItalianFormat(_this.visibleData); };
4035
- _this.isThereDataError = function () { return _this.isThereError() || !_this.isValidInputValue(); };
4150
+ _this.isThereDataError = function () { return _this.isThereError() || (!_this.isValidInputValue() && _this.selfValidation); };
4036
4151
  _this.showDataError = function () { return _this.isThereDataError() && isNotBlankOrNull(_this.getDescError()); };
4037
- _this.getDescError = function () { return (isBlankOrNull(_this.error) && !_this.isValidInputValue()) ? "La data inserita non &egrave; valida" : _this.error; };
4152
+ _this.getDescError = function () { return (_this.selfValidation && isBlankOrNull(_this.error) && !_this.isValidInputValue()) ? _this.selfValidationError : _this.error; };
4038
4153
  _this.isEnabledDate = function (date) {
4039
4154
  var dateString = dateToString(date, 'ISO8061');
4040
4155
  return _this.isDataAbilitata(dateString) && !_this.isDataDisabilitata(dateString);
@@ -4042,16 +4157,20 @@
4042
4157
  _this.isDataAbilitata = function (data) { return _this.enabledDates == undefined || !_this.enabledDates.length || _this.enabledDates.some(function (regex) { return _this.match(data, regex) != undefined; }); };
4043
4158
  _this.isDataDisabilitata = function (data) { return _this.disabledDates != undefined && _this.disabledDates.some(function (regex) { return _this.match(data, regex) != undefined; }); };
4044
4159
  _this.match = function (date, regex) { return date != undefined && date.match(new RegExp('^'.concat(regex).concat('$'), 'i')); };
4160
+ _this.isFirstDigitSlash = function (ev) { return ev.key == '/' && _this.visibleData == undefined; };
4161
+ _this.isDoubleSlash = function (ev) { return ev.key == '/' && ev.key == _this.previousDigit; };
4162
+ _this.isWrongDigit = function (ev) { return _this.isFirstDigitSlash(ev) || _this.isDoubleSlash(ev); };
4045
4163
  _this.logPrefix = "[inail-input-date]";
4164
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.inputDateComponent);
4046
4165
  _this.detach();
4047
4166
  return _this;
4048
4167
  }
4049
4168
  InputDateComponent.prototype.ngOnChanges = function (changes) {
4050
4169
  _super.prototype.ngOnChanges.call(this, changes);
4051
- if (changes.value && !changes.value.firstChange) {
4052
- this.hasError = false;
4053
- this.error = undefined;
4054
- }
4170
+ // if (changes.value && !changes.value.firstChange && this.cleanErrorOnChange) {
4171
+ //
4172
+ // this.cleanError();
4173
+ // }
4055
4174
  // Se cambiano le options o gli array delle date abilitate/disabilitate
4056
4175
  // reinizializzo il componente
4057
4176
  if ((changes.options && !changes.options.firstChange)
@@ -4168,7 +4287,9 @@
4168
4287
  _this.setDatepickerDate(_this.visibleData);
4169
4288
  }
4170
4289
  });
4171
- this.cleanError();
4290
+ if (this.cleanErrorOnChange) {
4291
+ this.cleanError();
4292
+ }
4172
4293
  this.cdr.detectChanges();
4173
4294
  if (this.onChange) {
4174
4295
  this.onChange(value);
@@ -4181,12 +4302,22 @@
4181
4302
  InputDateComponent.prototype.setDatepickerDate = function (date) {
4182
4303
  window['$'](this.formControlElement.nativeElement).datepicker('setDate', date);
4183
4304
  };
4305
+ InputDateComponent.prototype.onKeyDown = function (ev) {
4306
+ // console.warn(ev)
4307
+ // console.warn(this.visibleData, `${this.visibleData}`)
4308
+ if ((!ACCEPTED_INPUTS.some(function (v) { return v === ev.key; }) || this.isWrongDigit(ev)) && ev.ctrlKey == false) {
4309
+ ev.preventDefault();
4310
+ }
4311
+ else {
4312
+ this.previousDigit = ev.key;
4313
+ }
4314
+ };
4184
4315
  return InputDateComponent;
4185
4316
  }(FormElementComponent));
4186
4317
  InputDateComponent.decorators = [
4187
4318
  { type: core.Component, args: [{
4188
4319
  selector: 'inail-input-date',
4189
- template: "<div class=\"date datePicker {{getResponsiveClass()}} noPaddingLeft {{class}}\"\n [ngClass]=\"{'has-error': isThereDataError()}\">\n <div class=\"form-group\">\n <div class=\"input-relative\">\n <label *ngIf=\"label\"\n [ngClass]=\"{'sr-only': hiddenLabel}\"\n class=\"control-label {{labelClass}}\"\n title=\"{{labelTitle}}\"\n for=\"{{id}}\" [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 id=\"{{id}}\"\n #formControl\n class=\"form-control\"\n [ngClass]=\"inputClass\"\n title=\"GG/MM/AAAA\"\n placeholder=\"GG/MM/AAAA\"\n type=\"text\"\n (change)=\"onChangeHandler($event)\"\n (paste)=\"onChangeHandler($event)\"\n (keyup)=\"onChangeHandler($event)\"\n [disabled]=\"this.disabled\"\n [readonly]=\"this.readonly\"\n [attr.aria-required]=\"required === true ? true : undefined\"\n [attr.aria-invalid]=\"isThereDataError() === true ? true : undefined\"\n [attr.aria-describedBy]=\"getAriaDescribedBy()\"\n (keyup.enter)=\"enterUp.emit()\"\n [(ngModel)]=\"this.visibleData\">\n <em class=\"fa fa-calendar\"\n title=\"Calendario\"\n (click)=\"formControl.focus()\"></em>\n </div>\n <div *ngIf=\"showDataError()\" [id]=\"id+'-description'\">\n <div class=\"msg msg-errore\">\n <strong [innerHTML]=\"'ERRORE: '+getDescError()\"></strong>\n </div>\n <div *ngIf=\"description\" [innerHTML]=\"description\"></div>\n </div>\n <div *ngIf=\"description && !showDataError()\"\n [id]=\"id+'-description'\"\n [innerHTML]=\"this.description\">\n </div>\n </div>\n</div>\n",
4320
+ template: "<div class=\"date datePicker {{getResponsiveClass()}} noPaddingLeft {{class}}\"\n [ngClass]=\"{'has-error': isThereDataError()}\">\n <div class=\"form-group\">\n <div class=\"input-relative\">\n <label *ngIf=\"label\"\n [ngClass]=\"{'sr-only': hiddenLabel}\"\n class=\"control-label {{labelClass}}\"\n title=\"{{labelTitle}}\"\n for=\"{{id}}\" [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 id=\"{{id}}\"\n #formControl\n class=\"form-control\"\n [ngClass]=\"inputClass\"\n title=\"GG/MM/AAAA\"\n placeholder=\"GG/MM/AAAA\"\n type=\"text\"\n (change)=\"onChangeHandler($event)\"\n (paste)=\"onChangeHandler($event)\"\n (keyup)=\"onChangeHandler($event)\"\n [disabled]=\"this.disabled\"\n [readonly]=\"this.readonly\"\n [attr.aria-required]=\"required === true ? true : undefined\"\n [attr.aria-invalid]=\"isThereDataError() === true ? true : undefined\"\n [attr.aria-describedBy]=\"getAriaDescribedBy()\"\n (keyup.enter)=\"enterUp.emit()\"\n (keydown)=\"onKeyDown($event)\"\n [(ngModel)]=\"this.visibleData\">\n <em class=\"fa fa-calendar\"\n title=\"Calendario\"\n (click)=\"formControl.focus()\"></em>\n </div>\n <div *ngIf=\"showDataError()\" [id]=\"id+'-description'\">\n <div class=\"msg msg-errore\">\n <strong [innerHTML]=\"'ERRORE: '+getDescError()\"></strong>\n </div>\n <div *ngIf=\"description\" [innerHTML]=\"description\"></div>\n </div>\n <div *ngIf=\"description && !showDataError()\"\n [id]=\"id+'-description'\"\n [innerHTML]=\"this.description\">\n </div>\n </div>\n</div>\n",
4190
4321
  changeDetection: CHANGE_DETECTION_STRATEGY,
4191
4322
  encapsulation: core.ViewEncapsulation.None,
4192
4323
  providers: [
@@ -4200,233 +4331,39 @@
4200
4331
  },] }
4201
4332
  ];
4202
4333
  InputDateComponent.ctorParameters = function () { return [
4203
- { type: core.ChangeDetectorRef }
4334
+ { type: core.ChangeDetectorRef },
4335
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
4204
4336
  ]; };
4205
4337
  InputDateComponent.propDecorators = {
4206
4338
  formControlElement: [{ type: core.ViewChild, args: ['formControl', { static: true },] }],
4207
4339
  valueChange: [{ type: core.Output }],
4208
4340
  options: [{ type: core.Input }],
4341
+ selfValidation: [{ type: core.Input }],
4342
+ selfValidationError: [{ type: core.Input }],
4209
4343
  enabledDates: [{ type: core.Input }],
4210
4344
  disabledDates: [{ type: core.Input }],
4211
4345
  reinit: [{ type: core.Input }],
4212
4346
  value: [{ type: core.Input }]
4213
4347
  };
4214
- // export class InputDateComponent extends FormElementComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {
4215
- //
4216
- // @ViewChild('formControl', {static: true})
4217
- // formControlElement: ElementRef<HTMLElement>;
4218
- //
4219
- // visibleData: string;
4220
- //
4221
- // changed: boolean;
4222
- //
4223
- // @Output()
4224
- // valueChange = new EventEmitter<string>();
4225
- //
4226
- // // @Input()
4227
- // // modelFormat: DateFormat;
4228
- //
4229
- // @Input()
4230
- // datepickerOptions: any;
4231
- //
4232
- // @Input()
4233
- // enabledDates: string[];
4234
- //
4235
- // @Input()
4236
- // disabledDates: string[];
4237
- //
4238
- // constructor(private cdr: ChangeDetectorRef) {
4239
- // super(cdr);
4240
- // this.detach();
4241
- // }
4242
- //
4243
- // ngOnChanges(changes: DatePickerChanges) {
4244
- //
4245
- // super.ngOnChanges(changes);
4246
- // this.emitDebug(`ngOnChanges:`);
4247
- // this.emitDebug(changes);
4248
- //
4249
- // if (changes.value && !changes.value.firstChange) {
4250
- //
4251
- // this.hasError = false;
4252
- // this.error = undefined;
4253
- // }
4254
- //
4255
- // this.cdr.detectChanges();
4256
- // }
4257
- //
4258
- // ngOnInit() {
4259
- //
4260
- // this.logPrefix = `[inail-input-date][${this.label}]`;
4261
- // super.ngOnInit();
4262
- //
4263
- // if (!this.datepickerOptions) {
4264
- //
4265
- // this.datepickerOptions = {
4266
- // autoclose: true,
4267
- // format: 'dd/mm/yyyy',
4268
- // weekStart: 1,
4269
- // todayBtn: 'linked',
4270
- // language: 'it',
4271
- // todayHighlight: true,
4272
- // orientation: 'auto top',
4273
- // enableOnReadonly: false
4274
- // };
4275
- // }
4276
- //
4277
- // if (this.disabledDates != undefined || this.enabledDates != undefined) {
4278
- //
4279
- // this.datepickerOptions.beforeShowDay = this.isEnabledDate
4280
- // }
4281
- //
4282
- // this.cdr.detectChanges();
4283
- // }
4284
- //
4285
- // private isEnabledDate = (date) => {
4286
- //
4287
- // // @ts-ignore
4288
- // var dateString = $.datepicker.formatDate('yy-mm-dd', date);
4289
- // return this.isDataAbilitata(dateString) && !this.isDataDisabilitata(dateString);
4290
- // };
4291
- //
4292
- // private isDataAbilitata = (data: string) => this.enabledDates == undefined || this.enabledDates.some(regex => this.match(data, regex) != undefined);
4293
- // private isDataDisabilitata = (data: string) => this.disabledDates != undefined && this.disabledDates.some(regex => this.match(data, regex) != undefined);
4294
- //
4295
- // match = (date: string, regex: string) => date != undefined && date.match(new RegExp('^'.concat(regex).concat('$'), 'i'));
4296
- //
4297
- // ngAfterViewInit(): void {
4298
- //
4299
- // this.emitDebug('ngAfterViewInit');
4300
- // this.emitDebug('nativeElement');
4301
- // this.emitDebug(this.formControlElement?.nativeElement);
4302
- //
4303
- // // Inizializzazione della libreria datepicker
4304
- // window['$'](this.formControlElement.nativeElement).datepicker(this.datepickerOptions);
4305
- //
4306
- // if (this.visibleData && isDate(this.visibleData)) {
4307
- //
4308
- // this.setDatepickerDate(this.visibleData)
4309
- // }
4310
- //
4311
- // setTimeout(() => {
4312
- //
4313
- // // @ts-ignore
4314
- // $('#' + this.id).on("change", () => {
4315
- //
4316
- // this.emitDebug('onChange');
4317
- // this.emitDebug(`visibleData: ${this.visibleData}`);
4318
- //
4319
- // // @ts-ignore
4320
- // let elem = $('#' + this.id)[0]
4321
- //
4322
- // this.emitDebug(`nativeElement value: ${elem?.value}`);
4323
- //
4324
- // if (elem != undefined && elem.value != this.visibleData) {
4325
- //
4326
- // this.emitDebug(`update value: ${this.value} -> ${elem.value}`);
4327
- // this.value = elem.value;
4328
- // }
4329
- //
4330
- // this.cdr.detectChanges();
4331
- // });
4332
- // });
4333
- //
4334
- // if (this.showPopover()) {
4335
- //
4336
- // // @ts-ignore
4337
- // $(`#${this.id}-popover`).popover();
4338
- // }
4339
- //
4340
- // this.cdr.detectChanges();
4341
- // }
4342
- //
4343
- // ngOnDestroy(): void {
4344
- //
4345
- // super.ngOnDestroy();
4346
- // }
4347
- //
4348
- // @Input()
4349
- // set value(val) {
4350
- //
4351
- // // console.warn('val', val, this.visibleData)
4352
- //
4353
- // let validFormat = isValidInputFormat(val);
4354
- //
4355
- // // console.warn('validFormat', validFormat)
4356
- //
4357
- // if (isNotBlankOrNull(val)) {
4358
- //
4359
- // this.visibleData = validFormat ? toItalianFormat(val) : val;
4360
- // } else {
4361
- //
4362
- // this.visibleData = undefined
4363
- // }
4364
- //
4365
- // // console.warn('visibleData', this.visibleData)
4366
- //
4367
- // setTimeout(() => {
4368
- //
4369
- // let vChange = validFormat ? toISO8601Format(this.visibleData) : this.visibleData
4370
- //
4371
- // // console.warn('vChange', vChange)
4372
- //
4373
- // this.valueChange.emit(validFormat ? toISO8601Format(this.visibleData) : this.visibleData);
4374
- //
4375
- // if (validFormat) {
4376
- //
4377
- // // console.warn(this.visibleData)
4378
- // this.setDatepickerDate(this.visibleData);
4379
- // }
4380
- // });
4381
- // }
4382
- //
4383
- // get isValid(): boolean {
4384
- //
4385
- // return isBlankOrNull(this.visibleData) || isInItalianFormat(this.visibleData);
4386
- // }
4387
- //
4388
- // checkDescError(): boolean {
4389
- //
4390
- // let descError: string = this.getDescError();
4391
- // return this.checkError() && isNotBlankOrNull(descError);
4392
- // }
4393
- //
4394
- // checkError(): boolean {
4395
- //
4396
- // return !this.isValid || this.hasError || isNotBlankOrNull(this.error);
4397
- // }
4398
- //
4399
- // getDescError(): string {
4400
- //
4401
- // return (isNotBlankOrNull(this.error) && !this.isValid)
4402
- // ? 'La data inserita non &egrave; valida'
4403
- // : this.error;
4404
- // }
4405
- //
4406
- // onChangeHandler($event: any) {
4407
- //
4408
- // // console.info('onChange', $event.target.value)
4409
- // this.value = $event.target.value;
4410
- // }
4411
- //
4412
- // private setDatepickerDate(date: string) {
4413
- //
4414
- // window['$'](this.formControlElement.nativeElement).datepicker('setDate', date);
4415
- // }
4416
- // }
4417
4348
 
4418
4349
  var clone$1 = function (obj) { return obj ? JSON.parse(JSON.stringify(obj)) : obj; };
4419
4350
  var ɵ0$4 = clone$1;
4420
4351
  var RadioSelectComponent = /** @class */ (function (_super) {
4421
4352
  __extends(RadioSelectComponent, _super);
4422
- function RadioSelectComponent(cdr) {
4423
- var _this = _super.call(this, cdr) || this;
4353
+ function RadioSelectComponent(cdr, libConfig) {
4354
+ var _this = this;
4355
+ var _a, _b, _c, _d;
4356
+ _this = _super.call(this, cdr, libConfig) || this;
4424
4357
  _this.cdr = cdr;
4358
+ _this.libConfig = libConfig;
4425
4359
  _this.selectedValue = '';
4360
+ _this.sort = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.radioSelectComponent) === null || _b === void 0 ? void 0 : _b.sort, undefined);
4361
+ _this.inline = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.radioSelectComponent) === null || _d === void 0 ? void 0 : _d.inline, false);
4426
4362
  _this.select = new core.EventEmitter();
4427
4363
  _this.valueChange = new core.EventEmitter();
4428
4364
  _this.getName = function () { return _this.name || _this.id + "-name"; };
4429
4365
  _this.logPrefix = "[inail-radio-select]";
4366
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.radioSelectComponent);
4430
4367
  _this.detach();
4431
4368
  return _this;
4432
4369
  }
@@ -4486,7 +4423,9 @@
4486
4423
  _this.emitDebug("this.valueChange.emit(" + _this.selectedValue + ")");
4487
4424
  _this.valueChange.emit(_this.selectedValue);
4488
4425
  _this.select.emit(_this.options.find(function (opt) { return (opt === null || opt === void 0 ? void 0 : opt.value) === _this.selectedValue; }));
4489
- _this.cleanError();
4426
+ if (_this.cleanErrorOnChange) {
4427
+ _this.cleanError();
4428
+ }
4490
4429
  if (_this.onChange) {
4491
4430
  _this.onChange(_this.selectedValue);
4492
4431
  }
@@ -4521,7 +4460,8 @@
4521
4460
  },] }
4522
4461
  ];
4523
4462
  RadioSelectComponent.ctorParameters = function () { return [
4524
- { type: core.ChangeDetectorRef }
4463
+ { type: core.ChangeDetectorRef },
4464
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
4525
4465
  ]; };
4526
4466
  RadioSelectComponent.propDecorators = {
4527
4467
  formControlElement: [{ type: core.ViewChild, args: ['formControl',] }],
@@ -4544,9 +4484,10 @@
4544
4484
 
4545
4485
  var CheckboxComponent = /** @class */ (function (_super) {
4546
4486
  __extends(CheckboxComponent, _super);
4547
- function CheckboxComponent(cdr) {
4548
- var _this = _super.call(this, cdr) || this;
4487
+ function CheckboxComponent(cdr, libConfig) {
4488
+ var _this = _super.call(this, cdr, libConfig) || this;
4549
4489
  _this.cdr = cdr;
4490
+ _this.libConfig = libConfig;
4550
4491
  _this.checkedChange = new core.EventEmitter();
4551
4492
  _this.checkboxClick = new core.EventEmitter();
4552
4493
  _this.click = new core.EventEmitter();
@@ -4560,6 +4501,7 @@
4560
4501
  _this.state.firstChange = false;
4561
4502
  };
4562
4503
  _this.logPrefix = "[inail-checkbox]";
4504
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.checkboxComponent);
4563
4505
  _this.detach();
4564
4506
  return _this;
4565
4507
  }
@@ -4605,7 +4547,9 @@
4605
4547
  this.emitDebug("this.checkedChange.emit(" + value + ")");
4606
4548
  this.checkedChange.emit(value);
4607
4549
  this.emitState();
4608
- this.cleanError();
4550
+ if (this.cleanErrorOnChange) {
4551
+ this.cleanError();
4552
+ }
4609
4553
  if (this.onChange) {
4610
4554
  this.onChange(value);
4611
4555
  }
@@ -4640,7 +4584,8 @@
4640
4584
  },] }
4641
4585
  ];
4642
4586
  CheckboxComponent.ctorParameters = function () { return [
4643
- { type: core.ChangeDetectorRef }
4587
+ { type: core.ChangeDetectorRef },
4588
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
4644
4589
  ]; };
4645
4590
  CheckboxComponent.propDecorators = {
4646
4591
  formControlElement: [{ type: core.ViewChild, args: ['formControl', { static: true },] }],
@@ -4657,13 +4602,18 @@
4657
4602
  var PREVENT_PADDING_STYLE_CLASS = 'inail-modal-prevent-padding-style';
4658
4603
  var ModalComponent = /** @class */ (function (_super) {
4659
4604
  __extends(ModalComponent, _super);
4660
- function ModalComponent(cdr) {
4661
- var _this = _super.call(this, cdr) || this;
4605
+ function ModalComponent(cdr, libConfig) {
4606
+ var _this = this;
4607
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
4608
+ _this = _super.call(this, cdr, libConfig) || this;
4662
4609
  _this.cdr = cdr;
4663
- _this.closeButtonTitle = 'Chiudi modale';
4610
+ _this.libConfig = libConfig;
4611
+ _this.title = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.modalComponent) === null || _b === void 0 ? void 0 : _b.title, undefined);
4612
+ _this.closeButtonTitle = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.modalComponent) === null || _d === void 0 ? void 0 : _d.closeButtonTitle, 'Chiudi modale');
4664
4613
  _this.close = new core.EventEmitter();
4665
- _this.width = 'M';
4666
- _this.preventPageScroll = true;
4614
+ _this.width = getConfigValue((_f = (_e = _this.libConfig) === null || _e === void 0 ? void 0 : _e.modalComponent) === null || _f === void 0 ? void 0 : _f.width, 'M');
4615
+ _this.setFocusOnError = getConfigValue((_h = (_g = _this.libConfig) === null || _g === void 0 ? void 0 : _g.modalComponent) === null || _h === void 0 ? void 0 : _h.setFocusOnError, undefined);
4616
+ _this.preventPageScroll = getConfigValue((_k = (_j = _this.libConfig) === null || _j === void 0 ? void 0 : _j.modalComponent) === null || _k === void 0 ? void 0 : _k.preventPageScroll, true);
4667
4617
  _this.closeOnClick = function () { return _this.showModal(false); };
4668
4618
  _this.setFocusOnLastPageActiveElement = function () {
4669
4619
  if (_this.pageActiveElement != undefined) {
@@ -4676,6 +4626,7 @@
4676
4626
  }
4677
4627
  };
4678
4628
  _this.logPrefix = '[inail-modal]';
4629
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.modalComponent);
4679
4630
  _this.detach();
4680
4631
  return _this;
4681
4632
  }
@@ -4802,7 +4753,8 @@
4802
4753
  },] }
4803
4754
  ];
4804
4755
  ModalComponent.ctorParameters = function () { return [
4805
- { type: core.ChangeDetectorRef }
4756
+ { type: core.ChangeDetectorRef },
4757
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
4806
4758
  ]; };
4807
4759
  ModalComponent.propDecorators = {
4808
4760
  title: [{ type: core.Input }],
@@ -4816,18 +4768,21 @@
4816
4768
 
4817
4769
  var AlertComponent = /** @class */ (function (_super) {
4818
4770
  __extends(AlertComponent, _super);
4819
- function AlertComponent(_cdr) {
4820
- var _this = _super.call(this, _cdr) || this;
4771
+ function AlertComponent(_cdr, libConfig) {
4772
+ var _this = this;
4773
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
4774
+ _this = _super.call(this, _cdr, libConfig) || this;
4821
4775
  _this._cdr = _cdr;
4822
- _this.closeButtonTitle = 'Chiudi modale';
4776
+ _this.libConfig = libConfig;
4823
4777
  _this.close = new core.EventEmitter();
4824
- _this.width = 'M';
4825
- _this.preventPageScroll = true;
4778
+ _this.setFocusOnError = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.alertComponent) === null || _b === void 0 ? void 0 : _b.setFocusOnError, undefined);
4779
+ _this.preventPageScroll = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.alertComponent) === null || _d === void 0 ? void 0 : _d.preventPageScroll, true);
4826
4780
  _this.okOnClick = function () { var _a; return (_a = _this.show) === null || _a === void 0 ? void 0 : _a.emit(false); };
4827
4781
  _this.logPrefix = '[inail-alert]';
4828
- _this.title = 'Messaggio informativo';
4829
- _this.width = 'S';
4830
- _this.closeButtonTitle = 'Chiudi messaggio informativo';
4782
+ _this.title = getConfigValue((_f = (_e = _this.libConfig) === null || _e === void 0 ? void 0 : _e.alertComponent) === null || _f === void 0 ? void 0 : _f.title, 'Messaggio informativo');
4783
+ _this.width = getConfigValue((_h = (_g = _this.libConfig) === null || _g === void 0 ? void 0 : _g.alertComponent) === null || _h === void 0 ? void 0 : _h.width, 'S');
4784
+ _this.closeButtonTitle = getConfigValue((_k = (_j = _this.libConfig) === null || _j === void 0 ? void 0 : _j.alertComponent) === null || _k === void 0 ? void 0 : _k.closeButtonTitle, 'Chiudi messaggio informativo');
4785
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.alertComponent);
4831
4786
  _this.detach();
4832
4787
  return _this;
4833
4788
  }
@@ -4856,7 +4811,8 @@
4856
4811
  },] }
4857
4812
  ];
4858
4813
  AlertComponent.ctorParameters = function () { return [
4859
- { type: core.ChangeDetectorRef }
4814
+ { type: core.ChangeDetectorRef },
4815
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
4860
4816
  ]; };
4861
4817
  AlertComponent.propDecorators = {
4862
4818
  title: [{ type: core.Input }],
@@ -4872,22 +4828,25 @@
4872
4828
 
4873
4829
  var ConfirmComponent = /** @class */ (function (_super) {
4874
4830
  __extends(ConfirmComponent, _super);
4875
- function ConfirmComponent(_cdr) {
4876
- var _this = _super.call(this, _cdr) || this;
4831
+ function ConfirmComponent(_cdr, libConfig) {
4832
+ var _this = this;
4833
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
4834
+ _this = _super.call(this, _cdr, libConfig) || this;
4877
4835
  _this._cdr = _cdr;
4878
- _this.closeButtonTitle = 'Chiudi modale';
4836
+ _this.libConfig = libConfig;
4879
4837
  _this.close = new core.EventEmitter();
4880
- _this.width = 'M';
4881
- _this.preventPageScroll = true;
4882
- _this.confirmButtonLabel = 'Si';
4883
- _this.rejectButtonLabel = 'No';
4838
+ _this.setFocusOnError = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.confirmComponent) === null || _b === void 0 ? void 0 : _b.setFocusOnError, undefined);
4839
+ _this.preventPageScroll = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.confirmComponent) === null || _d === void 0 ? void 0 : _d.preventPageScroll, true);
4840
+ _this.confirmButtonLabel = getConfigValue((_f = (_e = _this.libConfig) === null || _e === void 0 ? void 0 : _e.confirmComponent) === null || _f === void 0 ? void 0 : _f.confirmButtonLabel, 'Si');
4841
+ _this.rejectButtonLabel = getConfigValue((_h = (_g = _this.libConfig) === null || _g === void 0 ? void 0 : _g.confirmComponent) === null || _h === void 0 ? void 0 : _h.rejectButtonLabel, 'No');
4884
4842
  _this.confirm = new core.EventEmitter();
4885
4843
  _this.reject = new core.EventEmitter();
4886
4844
  _this.logPrefix = '[inail-confirm]';
4887
- _this.title = 'Conferma operazione';
4888
- _this.message = 'Confermare l\'operazione richiesta?';
4889
- _this.width = 'S';
4890
- _this.closeButtonTitle = 'Chiudi modale di conferma';
4845
+ _this.title = getConfigValue((_k = (_j = _this.libConfig) === null || _j === void 0 ? void 0 : _j.confirmComponent) === null || _k === void 0 ? void 0 : _k.title, 'Conferma operazione');
4846
+ _this.message = getConfigValue((_m = (_l = _this.libConfig) === null || _l === void 0 ? void 0 : _l.confirmComponent) === null || _m === void 0 ? void 0 : _m.message, 'Confermare l\'operazione richiesta?');
4847
+ _this.width = getConfigValue((_p = (_o = _this.libConfig) === null || _o === void 0 ? void 0 : _o.confirmComponent) === null || _p === void 0 ? void 0 : _p.width, 'S');
4848
+ _this.closeButtonTitle = getConfigValue((_r = (_q = _this.libConfig) === null || _q === void 0 ? void 0 : _q.confirmComponent) === null || _r === void 0 ? void 0 : _r.closeButtonTitle, 'Chiudi modale di conferma');
4849
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.confirmComponent);
4891
4850
  _this.detach();
4892
4851
  return _this;
4893
4852
  }
@@ -4931,7 +4890,8 @@
4931
4890
  },] }
4932
4891
  ];
4933
4892
  ConfirmComponent.ctorParameters = function () { return [
4934
- { type: core.ChangeDetectorRef }
4893
+ { type: core.ChangeDetectorRef },
4894
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
4935
4895
  ]; };
4936
4896
  ConfirmComponent.propDecorators = {
4937
4897
  title: [{ type: core.Input }],
@@ -5226,18 +5186,22 @@
5226
5186
 
5227
5187
  var TrCheckboxComponent = /** @class */ (function (_super) {
5228
5188
  __extends(TrCheckboxComponent, _super);
5229
- function TrCheckboxComponent(cdr) {
5230
- var _this = _super.call(this, cdr) || this;
5189
+ function TrCheckboxComponent(cdr, libConfig) {
5190
+ var _this = this;
5191
+ var _a, _b;
5192
+ _this = _super.call(this, cdr, libConfig) || this;
5231
5193
  _this.cdr = cdr;
5194
+ _this.libConfig = libConfig;
5232
5195
  // @Input()
5233
5196
  // checkAll: boolean = false;
5234
- _this.hiddenLabel = true;
5197
+ _this.hiddenLabel = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.trCheckboxComponent) === null || _b === void 0 ? void 0 : _b.hiddenLabel, true);
5235
5198
  _this.disabled = false;
5236
5199
  _this.initComplete = new rxjs.ReplaySubject();
5237
5200
  _this.onclick = new core.EventEmitter();
5238
5201
  _this.onDestroy = new core.EventEmitter();
5239
5202
  _this.checked = false;
5240
5203
  _this.logPrefix = "[inail-tr-checkbox]";
5204
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.trCheckboxComponent);
5241
5205
  _this.detach();
5242
5206
  return _this;
5243
5207
  }
@@ -5279,7 +5243,8 @@
5279
5243
  },] }
5280
5244
  ];
5281
5245
  TrCheckboxComponent.ctorParameters = function () { return [
5282
- { type: core.ChangeDetectorRef }
5246
+ { type: core.ChangeDetectorRef },
5247
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
5283
5248
  ]; };
5284
5249
  TrCheckboxComponent.propDecorators = {
5285
5250
  label: [{ type: core.Input }],
@@ -5297,26 +5262,29 @@
5297
5262
  var DESC = 'desc';
5298
5263
  var TableComponent = /** @class */ (function (_super) {
5299
5264
  __extends(TableComponent, _super);
5300
- function TableComponent(cdr, renderer) {
5301
- var _this = _super.call(this, cdr) || this;
5265
+ function TableComponent(cdr, renderer, libConfig) {
5266
+ var _this = this;
5267
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
5268
+ _this = _super.call(this, cdr, libConfig) || this;
5302
5269
  _this.cdr = cdr;
5303
5270
  _this.renderer = renderer;
5271
+ _this.libConfig = libConfig;
5304
5272
  _this.externalPaginationSorting = false;
5305
5273
  _this.displayedDataChange = new core.EventEmitter();
5306
- _this.elementsPerPage = DEFAULT_TABLE_LENGTH$1;
5274
+ _this.elementsPerPage = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.tableComponent) === null || _b === void 0 ? void 0 : _b.elementsPerPage, DEFAULT_TABLE_LENGTH$1);
5307
5275
  // -----------------------------------------------------------------------
5308
- _this.elementsPerPageOptions = [10, 25, 50, 100];
5276
+ _this.elementsPerPageOptions = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.tableComponent) === null || _d === void 0 ? void 0 : _d.elementsPerPageOptions, [10, 25, 50, 100]);
5309
5277
  // @Input()
5310
5278
  // waiting: boolean = false;
5311
5279
  // @Input()
5312
5280
  // waitingText: string = 'Recupero in corso...';
5313
5281
  _this.noDataFound = false;
5314
- _this.noDataFoundText = 'Nessun elemento trovato';
5282
+ _this.noDataFoundText = getConfigValue((_f = (_e = _this.libConfig) === null || _e === void 0 ? void 0 : _e.tableComponent) === null || _f === void 0 ? void 0 : _f.noDataFoundText, 'Nessun elemento trovato');
5315
5283
  _this.disablePagination = false;
5316
5284
  _this.pagination = new core.EventEmitter();
5317
- _this.tallRows = false;
5318
- _this.captionHidden = false;
5319
- _this.bgWhite = true;
5285
+ _this.tallRows = getConfigValue((_h = (_g = _this.libConfig) === null || _g === void 0 ? void 0 : _g.tableComponent) === null || _h === void 0 ? void 0 : _h.tallRows, false);
5286
+ _this.captionHidden = getConfigValue((_k = (_j = _this.libConfig) === null || _j === void 0 ? void 0 : _j.tableComponent) === null || _k === void 0 ? void 0 : _k.captionHidden, false);
5287
+ _this.bgWhite = getConfigValue((_m = (_l = _this.libConfig) === null || _l === void 0 ? void 0 : _l.tableComponent) === null || _m === void 0 ? void 0 : _m.bgWhite, true);
5320
5288
  _this.detailsClick = new core.EventEmitter();
5321
5289
  _this.checkedRowsChange = new core.EventEmitter();
5322
5290
  _this.visualizzaBaseFooter = true;
@@ -5335,6 +5303,7 @@
5335
5303
  _this.isThCheckbox = function (trcb) { return document.querySelectorAll("th #" + trcb.id).length > 0; };
5336
5304
  _this.isSelezionabile = function (value) { return _this.righeSelezionabili.some(function (valoreSelezionabile) { return valoreSelezionabile == value; }); };
5337
5305
  _this.logPrefix = '[inail-table]';
5306
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.tableComponent);
5338
5307
  _this.detach();
5339
5308
  return _this;
5340
5309
  }
@@ -5816,7 +5785,8 @@
5816
5785
  ];
5817
5786
  TableComponent.ctorParameters = function () { return [
5818
5787
  { type: core.ChangeDetectorRef },
5819
- { type: core.Renderer2 }
5788
+ { type: core.Renderer2 },
5789
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
5820
5790
  ]; };
5821
5791
  TableComponent.propDecorators = {
5822
5792
  dataSource: [{ type: core.Input }],
@@ -5851,15 +5821,22 @@
5851
5821
 
5852
5822
  var InputFileComponent = /** @class */ (function (_super) {
5853
5823
  __extends(InputFileComponent, _super);
5854
- function InputFileComponent(cdr) {
5855
- var _this = _super.call(this, cdr) || this;
5824
+ function InputFileComponent(cdr, libConfig) {
5825
+ var _this = this;
5826
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
5827
+ _this = _super.call(this, cdr, libConfig) || this;
5856
5828
  _this.cdr = cdr;
5857
- _this.chooseButtonText = 'Scegli il file';
5858
- _this.addButtonText = 'Aggiungi';
5859
- _this.chooseButton = true;
5860
- _this.addButton = true;
5829
+ _this.libConfig = libConfig;
5830
+ _this.placeholder = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.inputFileComponent) === null || _b === void 0 ? void 0 : _b.placeholder, undefined);
5831
+ _this.chooseButtonText = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.inputFileComponent) === null || _d === void 0 ? void 0 : _d.chooseButtonText, 'Scegli il file');
5832
+ _this.addButtonText = getConfigValue((_f = (_e = _this.libConfig) === null || _e === void 0 ? void 0 : _e.inputFileComponent) === null || _f === void 0 ? void 0 : _f.addButtonText, 'Aggiungi');
5833
+ _this.chooseButton = getConfigValue((_h = (_g = _this.libConfig) === null || _g === void 0 ? void 0 : _g.inputFileComponent) === null || _h === void 0 ? void 0 : _h.chooseButton, true);
5834
+ _this.addButton = getConfigValue((_k = (_j = _this.libConfig) === null || _j === void 0 ? void 0 : _j.inputFileComponent) === null || _k === void 0 ? void 0 : _k.addButton, true);
5835
+ /** Estensioni accettate separate da virgola (esempio: ".pdf, .txt, .doc") */
5836
+ _this.accept = getConfigValue((_m = (_l = _this.libConfig) === null || _l === void 0 ? void 0 : _l.inputFileComponent) === null || _m === void 0 ? void 0 : _m.accept, undefined);
5861
5837
  _this.fileChange = new core.EventEmitter();
5862
5838
  _this.logPrefix = "[inail-input-file]";
5839
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.inputFileComponent);
5863
5840
  _this.detach();
5864
5841
  return _this;
5865
5842
  }
@@ -5894,7 +5871,9 @@
5894
5871
  if (!this.addButton) {
5895
5872
  this.fileChange.emit(this.fileModel);
5896
5873
  }
5897
- this.cleanError();
5874
+ if (this.cleanErrorOnChange) {
5875
+ this.cleanError();
5876
+ }
5898
5877
  this.cdr.detectChanges();
5899
5878
  };
5900
5879
  InputFileComponent.prototype.reset = function () {
@@ -5913,7 +5892,8 @@
5913
5892
  },] }
5914
5893
  ];
5915
5894
  InputFileComponent.ctorParameters = function () { return [
5916
- { type: core.ChangeDetectorRef }
5895
+ { type: core.ChangeDetectorRef },
5896
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
5917
5897
  ]; };
5918
5898
  InputFileComponent.propDecorators = {
5919
5899
  placeholder: [{ type: core.Input }],
@@ -5926,14 +5906,26 @@
5926
5906
  inputText: [{ type: core.ViewChild, args: ['inputText', { static: true },] }]
5927
5907
  };
5928
5908
 
5909
+ var ACCEPTED_INPUTS$1 = [',', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'Backspace', 'Delete', "Tab", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"];
5929
5910
  var InputNumberComponent = /** @class */ (function (_super) {
5930
5911
  __extends(InputNumberComponent, _super);
5931
- function InputNumberComponent(cdr) {
5932
- var _this = _super.call(this, cdr) || this;
5912
+ function InputNumberComponent(cdr, libConfig) {
5913
+ var _this = this;
5914
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
5915
+ _this = _super.call(this, cdr, libConfig) || this;
5933
5916
  _this.cdr = cdr;
5934
- _this.hideArrows = false;
5917
+ _this.libConfig = libConfig;
5918
+ _this.max = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.inputNumberComponent) === null || _b === void 0 ? void 0 : _b.max, undefined);
5919
+ _this.min = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.inputNumberComponent) === null || _d === void 0 ? void 0 : _d.min, undefined);
5920
+ _this.step = getConfigValue((_f = (_e = _this.libConfig) === null || _e === void 0 ? void 0 : _e.inputNumberComponent) === null || _f === void 0 ? void 0 : _f.step, undefined);
5921
+ _this.numberOfDecimals = getConfigValue((_h = (_g = _this.libConfig) === null || _g === void 0 ? void 0 : _g.inputNumberComponent) === null || _h === void 0 ? void 0 : _h.numberOfDecimals, undefined);
5922
+ _this.hideArrows = getConfigValue((_k = (_j = _this.libConfig) === null || _j === void 0 ? void 0 : _j.inputNumberComponent) === null || _k === void 0 ? void 0 : _k.hideArrows, false);
5935
5923
  _this.valueChange = new core.EventEmitter();
5924
+ _this.isFirstDigitComma = function (ev) { return ev.key == ',' && _this.inputValue == undefined; };
5925
+ _this.isWrongMinus = function (ev) { return ev.key == '-' && ev.key == _this.previousDigit; };
5926
+ _this.isWrongDigit = function (ev) { return _this.isFirstDigitComma(ev) || _this.isWrongMinus(ev); };
5936
5927
  _this.logPrefix = "[inail-input-number]";
5928
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.inputNumberComponent);
5937
5929
  _this.detach();
5938
5930
  return _this;
5939
5931
  }
@@ -5942,10 +5934,10 @@
5942
5934
  if (changes.value) {
5943
5935
  this.previousValue = changes.value.previousValue;
5944
5936
  this.normalizzaValore();
5945
- if (!changes.value.firstChange) {
5946
- this.hasError = false;
5947
- this.error = undefined;
5948
- }
5937
+ // if (!changes.value.firstChange) {
5938
+ //
5939
+ // this.cleanError()
5940
+ // }
5949
5941
  }
5950
5942
  this.cdr.detectChanges();
5951
5943
  };
@@ -5989,7 +5981,9 @@
5989
5981
  this.cdr.detectChanges();
5990
5982
  this.emitDebug("this.valueChange.emit(" + value + ")");
5991
5983
  this.valueChange.emit(value);
5992
- this.cleanError();
5984
+ if (this.cleanErrorOnChange) {
5985
+ this.cleanError();
5986
+ }
5993
5987
  if (this.onChange) {
5994
5988
  this.onChange(value);
5995
5989
  }
@@ -6033,12 +6027,22 @@
6033
6027
  }
6034
6028
  return true;
6035
6029
  };
6030
+ InputNumberComponent.prototype.onKeyDown = function (ev) {
6031
+ // console.warn(ev)
6032
+ // console.warn(`${this.inputValue}`)
6033
+ if ((!ACCEPTED_INPUTS$1.some(function (v) { return v === ev.key; }) || this.isWrongDigit(ev)) && ev.ctrlKey == false) {
6034
+ ev.preventDefault();
6035
+ }
6036
+ else {
6037
+ this.previousDigit = ev.key;
6038
+ }
6039
+ };
6036
6040
  return InputNumberComponent;
6037
6041
  }(FormElementComponent));
6038
6042
  InputNumberComponent.decorators = [
6039
6043
  { type: core.Component, args: [{
6040
6044
  selector: 'inail-input-number',
6041
- template: "<div class=\"form-group {{getResponsiveClass()}} noPaddingLeft {{class}} inail-input-number\"\n [ngClass]=\"{'has-error': isThereError(), 'no-arrows': hideArrows}\">\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=\"number\"\n [id]=\"id\"\n class=\"form-control {{inputClass}}\"\n [ngClass]=\"{'disabled': disabled}\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.name]=\"name\"\n [attr.title]=\"title\"\n [attr.max]=\"max\"\n [attr.min]=\"min\"\n [attr.step]=\"step\"\n [attr.aria-required]=\"required === true ? true : undefined\"\n [attr.aria-invalid]=\"isThereError() === true ? true : undefined\"\n [attr.aria-describedBy]=\"getAriaDescribedBy()\"\n (keyup)=\"onKeyUp()\"\n (blur)=\"onBlur()\"\n (keyup.enter)=\"enterUp.emit()\"\n [value]=\"inputValue\"\n [(ngModel)]='value'>\n <!--<input type=\"text\"\n *ngIf=\"disabled\"\n [id]=\"id\"\n class=\"form-control disabled {{inputClass}}\"\n [attr.name]=\"name\"\n [attr.title]=\"title\"\n [disabled]=\"disabled\"\n [attr.aria-describedBy]=\"getAriaDescribedBy()\"\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</div>\n",
6045
+ template: "<div class=\"form-group {{getResponsiveClass()}} noPaddingLeft {{class}} inail-input-number\"\n [ngClass]=\"{'has-error': isThereError(), 'no-arrows': hideArrows}\">\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=\"number\"\n [id]=\"id\"\n class=\"form-control {{inputClass}}\"\n [ngClass]=\"{'disabled': disabled}\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.name]=\"name\"\n [attr.title]=\"title\"\n [attr.max]=\"max\"\n [attr.min]=\"min\"\n [attr.step]=\"step\"\n [attr.aria-required]=\"required === true ? true : undefined\"\n [attr.aria-invalid]=\"isThereError() === true ? true : undefined\"\n [attr.aria-describedBy]=\"getAriaDescribedBy()\"\n (keyup)=\"onKeyUp()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\"\n (keyup.enter)=\"enterUp.emit()\"\n [value]=\"inputValue\"\n [(ngModel)]='value'>\n <!--<input type=\"text\"\n *ngIf=\"disabled\"\n [id]=\"id\"\n class=\"form-control disabled {{inputClass}}\"\n [attr.name]=\"name\"\n [attr.title]=\"title\"\n [disabled]=\"disabled\"\n [attr.aria-describedBy]=\"getAriaDescribedBy()\"\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</div>\n",
6042
6046
  changeDetection: CHANGE_DETECTION_STRATEGY,
6043
6047
  encapsulation: core.ViewEncapsulation.None,
6044
6048
  providers: [
@@ -6052,7 +6056,8 @@
6052
6056
  },] }
6053
6057
  ];
6054
6058
  InputNumberComponent.ctorParameters = function () { return [
6055
- { type: core.ChangeDetectorRef }
6059
+ { type: core.ChangeDetectorRef },
6060
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
6056
6061
  ]; };
6057
6062
  InputNumberComponent.propDecorators = {
6058
6063
  formControlElement: [{ type: core.ViewChild, args: ['formControl', { static: true },] }],
@@ -6110,18 +6115,22 @@
6110
6115
 
6111
6116
  var SelectorComponent = /** @class */ (function (_super) {
6112
6117
  __extends(SelectorComponent, _super);
6113
- function SelectorComponent(cdr, re2) {
6114
- var _this = _super.call(this, cdr) || this;
6118
+ function SelectorComponent(cdr, re2, libConfig) {
6119
+ var _this = this;
6120
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
6121
+ _this = _super.call(this, cdr, libConfig) || this;
6115
6122
  _this.cdr = cdr;
6116
6123
  _this.re2 = re2;
6117
- _this.showNumber = false;
6118
- _this.fullNavigation = true;
6119
- _this.contentsHidden = true;
6124
+ _this.libConfig = libConfig;
6125
+ _this.showNumber = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.selectorComponent) === null || _b === void 0 ? void 0 : _b.showNumber, false);
6126
+ _this.separator = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.selectorComponent) === null || _d === void 0 ? void 0 : _d.separator, undefined);
6127
+ _this.fullNavigation = getConfigValue((_f = (_e = _this.libConfig) === null || _e === void 0 ? void 0 : _e.selectorComponent) === null || _f === void 0 ? void 0 : _f.fullNavigation, true);
6128
+ _this.contentsHidden = getConfigValue((_h = (_g = _this.libConfig) === null || _g === void 0 ? void 0 : _g.selectorComponent) === null || _h === void 0 ? void 0 : _h.contentsHidden, true);
6120
6129
  _this.currentItem = 0;
6121
6130
  _this.currentItemChange = new core.EventEmitter();
6122
6131
  _this.itemChange = new core.EventEmitter();
6123
- _this.prevButtonTitle = 'scorri selettore a destra';
6124
- _this.nextButtonTitle = 'scorri selettore a sinistra';
6132
+ _this.prevButtonTitle = getConfigValue((_k = (_j = _this.libConfig) === null || _j === void 0 ? void 0 : _j.selectorComponent) === null || _k === void 0 ? void 0 : _k.prevButtonTitle, 'scorri selettore a destra');
6133
+ _this.nextButtonTitle = getConfigValue((_m = (_l = _this.libConfig) === null || _l === void 0 ? void 0 : _l.selectorComponent) === null || _m === void 0 ? void 0 : _m.nextButtonTitle, 'scorri selettore a sinistra');
6125
6134
  _this.inizializzazioneContenutiCompletata = false;
6126
6135
  _this.totalTranslate = 0;
6127
6136
  _this.getItemLabel = function (item, isLast) { return "" + item.label + (item.required ? ' *' : '') + (isNotBlankOrNull(_this.separator) ? ' ' : '') + (!isLast && isNotBlankOrNull(_this.separator) ? _this.separator : ''); };
@@ -6132,6 +6141,7 @@
6132
6141
  _this.re2.setStyle(_this.slickTrack.nativeElement, 'transform', "translate(" + _this.totalTranslate + "px)");
6133
6142
  };
6134
6143
  _this.logPrefix = '[inail-selector]';
6144
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.selectorComponent);
6135
6145
  _this.detach();
6136
6146
  return _this;
6137
6147
  }
@@ -6282,7 +6292,8 @@
6282
6292
  ];
6283
6293
  SelectorComponent.ctorParameters = function () { return [
6284
6294
  { type: core.ChangeDetectorRef },
6285
- { type: core.Renderer2 }
6295
+ { type: core.Renderer2 },
6296
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
6286
6297
  ]; };
6287
6298
  SelectorComponent.propDecorators = {
6288
6299
  items: [{ type: core.Input }],
@@ -6306,20 +6317,24 @@
6306
6317
 
6307
6318
  var WizardComponent = /** @class */ (function (_super) {
6308
6319
  __extends(WizardComponent, _super);
6309
- function WizardComponent(cdr, re2) {
6310
- var _this = _super.call(this, cdr) || this;
6320
+ function WizardComponent(cdr, re2, libConfig) {
6321
+ var _this = this;
6322
+ var _a, _b, _c, _d, _e, _f;
6323
+ _this = _super.call(this, cdr, libConfig) || this;
6311
6324
  _this.cdr = cdr;
6312
6325
  _this.re2 = re2;
6326
+ _this.libConfig = libConfig;
6313
6327
  _this.showNumber = true;
6314
6328
  _this.separator = '>';
6315
- _this.contentsHidden = true;
6329
+ _this.contentsHidden = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.wizardComponent) === null || _b === void 0 ? void 0 : _b.contentsHidden, true);
6316
6330
  _this.currentStep = 0;
6317
6331
  _this.currentStepChange = new core.EventEmitter();
6318
6332
  _this.stepChange = new core.EventEmitter();
6319
6333
  _this.switchTo = new core.EventEmitter();
6320
- _this.prevButtonTitle = 'scorri wizard a destra';
6321
- _this.nextButtonTitle = 'scorri wizard a sinistra';
6334
+ _this.prevButtonTitle = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.wizardComponent) === null || _d === void 0 ? void 0 : _d.prevButtonTitle, 'scorri wizard a destra');
6335
+ _this.nextButtonTitle = getConfigValue((_f = (_e = _this.libConfig) === null || _e === void 0 ? void 0 : _e.wizardComponent) === null || _f === void 0 ? void 0 : _f.nextButtonTitle, 'scorri wizard a sinistra');
6322
6336
  _this.logPrefix = '[inail-wizard]';
6337
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.wizardComponent);
6323
6338
  _this.detach();
6324
6339
  return _this;
6325
6340
  }
@@ -6387,7 +6402,8 @@
6387
6402
  ];
6388
6403
  WizardComponent.ctorParameters = function () { return [
6389
6404
  { type: core.ChangeDetectorRef },
6390
- { type: core.Renderer2 }
6405
+ { type: core.Renderer2 },
6406
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
6391
6407
  ]; };
6392
6408
  WizardComponent.propDecorators = {
6393
6409
  steps: [{ type: core.Input }],
@@ -6407,9 +6423,10 @@
6407
6423
 
6408
6424
  var ProgressBarComponent = /** @class */ (function (_super) {
6409
6425
  __extends(ProgressBarComponent, _super);
6410
- function ProgressBarComponent(cdr) {
6411
- var _this = _super.call(this, cdr) || this;
6426
+ function ProgressBarComponent(cdr, libConfig) {
6427
+ var _this = _super.call(this, cdr, libConfig) || this;
6412
6428
  _this.cdr = cdr;
6429
+ _this.libConfig = libConfig;
6413
6430
  _this.valuenow = 0;
6414
6431
  _this.logPrefix = "[inail-progress-bar]";
6415
6432
  _this.detach();
@@ -6448,7 +6465,8 @@
6448
6465
  },] }
6449
6466
  ];
6450
6467
  ProgressBarComponent.ctorParameters = function () { return [
6451
- { type: core.ChangeDetectorRef }
6468
+ { type: core.ChangeDetectorRef },
6469
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
6452
6470
  ]; };
6453
6471
  ProgressBarComponent.propDecorators = {
6454
6472
  label: [{ type: core.Input }],
@@ -6457,13 +6475,17 @@
6457
6475
 
6458
6476
  var MultiSelectComponent = /** @class */ (function (_super) {
6459
6477
  __extends(MultiSelectComponent, _super);
6460
- function MultiSelectComponent(cdr) {
6461
- var _this = _super.call(this, cdr) || this;
6478
+ function MultiSelectComponent(cdr, libConfig) {
6479
+ var _this = this;
6480
+ var _a, _b, _c, _d;
6481
+ _this = _super.call(this, cdr, libConfig) || this;
6462
6482
  _this.cdr = cdr;
6483
+ _this.libConfig = libConfig;
6463
6484
  _this.options = [];
6464
6485
  _this.values = [];
6465
6486
  _this.valuesChange = new core.EventEmitter();
6466
- _this.placeholder = '- seleziona opzioni -';
6487
+ _this.placeholder = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.multiSelectComponent) === null || _b === void 0 ? void 0 : _b.placeholder, '- seleziona opzioni -');
6488
+ _this.sort = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.multiSelectComponent) === null || _d === void 0 ? void 0 : _d.sort, undefined);
6467
6489
  _this.toggle = function () { return window['$'](_this.formControlElement.nativeElement).dropdown('toggle'); };
6468
6490
  _this.isExpanded = function () { return _this.formControlElement.nativeElement.getAttribute('aria-expanded') === 'true'; };
6469
6491
  _this.hasFormControlFocus = function () { return _this.formControlElement.nativeElement.matches(':focus'); };
@@ -6473,6 +6495,7 @@
6473
6495
  _this.pushValue = function (value) { return _this.values = _this.options.filter(function (opt) { return opt.value === value || _this.isChecked(opt.value); }).map(function (opt) { return opt.value; }); };
6474
6496
  _this.isFocusOut = function () { return window['$'](_this.multiSelect.nativeElement).find(document.activeElement).length == 0; };
6475
6497
  _this.logPrefix = "[inail-multi-select]";
6498
+ _super.prototype.overrideConfig.call(_this, libConfig === null || libConfig === void 0 ? void 0 : libConfig.multiSelectComponent);
6476
6499
  _this.detach();
6477
6500
  return _this;
6478
6501
  }
@@ -6544,11 +6567,15 @@
6544
6567
  if (!cb.firstChange) {
6545
6568
  if (cb.checked && !this.isChecked(cb.value)) {
6546
6569
  this.pushValue(cb.value);
6547
- this.cleanError();
6570
+ if (this.cleanErrorOnChange) {
6571
+ this.cleanError();
6572
+ }
6548
6573
  }
6549
6574
  else if (!cb.checked && this.isChecked(cb.value)) {
6550
6575
  this.values = this.values.filter(function (value) { return value != cb.value; });
6551
- this.cleanError();
6576
+ if (this.cleanErrorOnChange) {
6577
+ this.cleanError();
6578
+ }
6552
6579
  }
6553
6580
  this.valuesChange.emit(this.values);
6554
6581
  this.inputTextValue = this.getInputTextValue();
@@ -6567,7 +6594,8 @@
6567
6594
  },] }
6568
6595
  ];
6569
6596
  MultiSelectComponent.ctorParameters = function () { return [
6570
- { type: core.ChangeDetectorRef }
6597
+ { type: core.ChangeDetectorRef },
6598
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
6571
6599
  ]; };
6572
6600
  MultiSelectComponent.propDecorators = {
6573
6601
  multiSelect: [{ type: core.ViewChild, args: ['multiSelect', { static: true },] }],
@@ -6580,9 +6608,192 @@
6580
6608
  sort: [{ type: core.Input }]
6581
6609
  };
6582
6610
 
6611
+ var HM_PLACEHOLDER = 'HH:MM';
6612
+ var HMS_PLACEHOLDER = 'HH:MM:SS';
6613
+ var ACCEPTED_INPUTS$2 = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'Backspace', 'Delete', "Tab", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"];
6614
+ var InputTimeComponent = /** @class */ (function (_super) {
6615
+ __extends(InputTimeComponent, _super);
6616
+ function InputTimeComponent(cdr, libConfig) {
6617
+ var _this = this;
6618
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
6619
+ _this = _super.call(this, cdr, libConfig) || this;
6620
+ _this.cdr = cdr;
6621
+ _this.libConfig = libConfig;
6622
+ _this.timeHMRegex = new RegExp(/^((([01]\d)|([2][0-3]))[:]([0-5]\d)$)/);
6623
+ _this.timeHMSRegex = new RegExp(/^((([01]\d)|([2][0-3]))[:]([0-5]\d)[:]([0-5]\d)$)/);
6624
+ _this.validInputRegx = new RegExp(/^([0-9]+[0-9:]*)$/);
6625
+ _this.nativeInputTypeTime = getConfigValue((_b = (_a = _this.libConfig) === null || _a === void 0 ? void 0 : _a.inputTimeComponent) === null || _b === void 0 ? void 0 : _b.nativeInputTypeTime, false);
6626
+ _this.withSeconds = getConfigValue((_d = (_c = _this.libConfig) === null || _c === void 0 ? void 0 : _c.inputTimeComponent) === null || _d === void 0 ? void 0 : _d.withSeconds, false);
6627
+ _this.selfValidation = getConfigValue((_f = (_e = _this.libConfig) === null || _e === void 0 ? void 0 : _e.inputTimeComponent) === null || _f === void 0 ? void 0 : _f.selfValidation, true);
6628
+ _this.selfValidationError = getConfigValue((_h = (_g = _this.libConfig) === null || _g === void 0 ? void 0 : _g.inputTimeComponent) === null || _h === void 0 ? void 0 : _h.selfValidationError, 'Orario non valido');
6629
+ _this.step = getConfigValue((_k = (_j = _this.libConfig) === null || _j === void 0 ? void 0 : _j.inputTimeComponent) === null || _k === void 0 ? void 0 : _k.step, undefined);
6630
+ _this.valueChange = new core.EventEmitter();
6631
+ _this.preventPasting = getConfigValue((_m = (_l = _this.libConfig) === null || _l === void 0 ? void 0 : _l.inputTimeComponent) === null || _m === void 0 ? void 0 : _m.preventPasting, false);
6632
+ _this.getType = function () { return _this.nativeInputTypeTime ? 'time' : 'text'; };
6633
+ _this.getStep = function () { return _this.nativeInputTypeTime ? _this.step : undefined; };
6634
+ _this.getMaxLength = function () { return _this.nativeInputTypeTime ? undefined : (_this.withSeconds ? 8 : 5); };
6635
+ _this.isBefore2Points = function (value) { return (value === null || value === void 0 ? void 0 : value.length) == 2 || (_this.withSeconds == true && (value === null || value === void 0 ? void 0 : value.length) == 5); };
6636
+ _this.isValidValue = function (value) { return _this.withSeconds ? _this.timeHMSRegex.test(value) : _this.timeHMRegex.test(value); };
6637
+ _this.isValidInput = function (value) { return _this.validInputRegx.test(value); };
6638
+ _this.logPrefix = "[inail-input-time]";
6639
+ _this.emitDebug('NgInailCommonConfig:');
6640
+ _this.emitDebug((_o = _this.libConfig) === null || _o === void 0 ? void 0 : _o.inputTimeComponent);
6641
+ _super.prototype.overrideConfig.call(_this, (_p = _this.libConfig) === null || _p === void 0 ? void 0 : _p.inputTimeComponent);
6642
+ _this.detach();
6643
+ return _this;
6644
+ }
6645
+ InputTimeComponent.prototype.ngOnChanges = function (changes) {
6646
+ var _a, _b, _c;
6647
+ _super.prototype.ngOnChanges.call(this, changes);
6648
+ if (((_a = changes === null || changes === void 0 ? void 0 : changes.withSeconds) === null || _a === void 0 ? void 0 : _a.currentValue) != undefined) {
6649
+ this.defaultPlaceholder = getConfigValue((_c = (_b = this.libConfig) === null || _b === void 0 ? void 0 : _b.inputTimeComponent) === null || _c === void 0 ? void 0 : _c.placeholder, this.withSeconds ? HMS_PLACEHOLDER : HM_PLACEHOLDER);
6650
+ }
6651
+ this.placeholderVisualizzato = this.getNotBlankValue(this.placeholder) || this.defaultPlaceholder;
6652
+ this.cdr.detectChanges();
6653
+ };
6654
+ InputTimeComponent.prototype.ngOnInit = function () {
6655
+ var _this = this;
6656
+ var _a, _b;
6657
+ _super.prototype.ngOnInit.call(this);
6658
+ this.emitDebug("@ViewChild('formControl')");
6659
+ this.emitDebug(this.formControlElement);
6660
+ this.defaultPlaceholder = getConfigValue((_b = (_a = this.libConfig) === null || _a === void 0 ? void 0 : _a.inputTimeComponent) === null || _b === void 0 ? void 0 : _b.placeholder, this.withSeconds ? HMS_PLACEHOLDER : HM_PLACEHOLDER);
6661
+ this.placeholderVisualizzato = this.getNotBlankValue(this.placeholder) || this.defaultPlaceholder;
6662
+ if (this.focus) {
6663
+ this.push(this.focus.subscribe(function (scroll) {
6664
+ _this.emitDebug("Catch focus!");
6665
+ setFocus(_this.formControlElement.nativeElement, scroll);
6666
+ }));
6667
+ }
6668
+ this.cdr.detectChanges();
6669
+ };
6670
+ InputTimeComponent.prototype.ngAfterViewInit = function () {
6671
+ };
6672
+ Object.defineProperty(InputTimeComponent.prototype, "value", {
6673
+ get: function () {
6674
+ return this.inputValue;
6675
+ },
6676
+ set: function (value) {
6677
+ this.emitDebug("@Input set value: " + this.inputValue + " -> " + value);
6678
+ this.setValue(value);
6679
+ },
6680
+ enumerable: false,
6681
+ configurable: true
6682
+ });
6683
+ InputTimeComponent.prototype.writeValue = function (value) {
6684
+ this.emitDebug("writeValue: " + value);
6685
+ this.setValue(value);
6686
+ };
6687
+ InputTimeComponent.prototype.setValue = function (value) {
6688
+ this.emitDebug("setValue: " + value);
6689
+ if (this.inputValue != value) {
6690
+ this.emitDebug("update value: " + this.inputValue + " -> " + value);
6691
+ if (!this.nativeInputTypeTime) {
6692
+ value = this.bonificaValore(value);
6693
+ this.inputValue = this.isBefore2Points(value) ? value + ":" : value;
6694
+ if (isNotBlankOrNull(this.inputValue) && this.selfValidation && !this.isValidValue(this.inputValue)) {
6695
+ // console.warn(this.inputValue, this.selfValidation, !this.isValidValue(this.inputValue))
6696
+ this.setDescError(this.selfValidationError);
6697
+ }
6698
+ else {
6699
+ if (this.cleanErrorOnChange) {
6700
+ this.cleanError();
6701
+ }
6702
+ }
6703
+ }
6704
+ else {
6705
+ this.inputValue = value;
6706
+ if (this.cleanErrorOnChange) {
6707
+ this.cleanError();
6708
+ }
6709
+ }
6710
+ this.cdr.detectChanges();
6711
+ this.emitDebug("this.valueChange.emit(" + this.inputValue + ")");
6712
+ this.valueChange.emit(this.inputValue);
6713
+ if (this.onChange) {
6714
+ this.onChange(value);
6715
+ }
6716
+ }
6717
+ };
6718
+ InputTimeComponent.prototype.bonificaValore = function (value) {
6719
+ var valoreBonificato = undefined;
6720
+ if (value != undefined) {
6721
+ var parti = value.replace(/([:]{2,})/g, ':').split(':');
6722
+ if (parti[0] != undefined && parti[0] == '24') {
6723
+ parti[0] = '00';
6724
+ }
6725
+ if (parti[1] != undefined && parti[1] == '60') {
6726
+ parti[1] = '00';
6727
+ }
6728
+ if (parti[2] != undefined && parti[2] == '60') {
6729
+ parti[2] = '00';
6730
+ }
6731
+ valoreBonificato = parti.join(':');
6732
+ }
6733
+ return valoreBonificato;
6734
+ };
6735
+ InputTimeComponent.prototype.onPaste = function ($event) {
6736
+ if (this.preventPasting === true) {
6737
+ $event.preventDefault();
6738
+ }
6739
+ };
6740
+ InputTimeComponent.prototype.onKeyDown = function (ev) {
6741
+ if (!ACCEPTED_INPUTS$2.some(function (v) { return v === ev.key; }) && ev.ctrlKey == false) {
6742
+ ev.preventDefault();
6743
+ }
6744
+ };
6745
+ InputTimeComponent.prototype.ngOnDestroy = function () {
6746
+ _super.prototype.ngOnDestroy.call(this);
6747
+ };
6748
+ return InputTimeComponent;
6749
+ }(FormElementComponent));
6750
+ InputTimeComponent.decorators = [
6751
+ { type: core.Component, args: [{
6752
+ selector: 'inail-input-time',
6753
+ template: "<div class=\"form-group {{getResponsiveClass()}} noPaddingLeft {{class}} inail-input-time\"\n [ngClass]=\"{'has-error': isThereError()}\">\n <label *ngIf=\"label\"\n class=\"control-label {{labelClass}}\"\n [ngClass]=\"{'sr-only': hiddenLabel}\"\n [attr.title]=\"labelTitle\"\n [for]=\"id\"\n [innerHTML]=\"getLabel()\"></label>\n <span *ngIf=\"showPopover()\"\n [style.padding-left.px]=\"5\">\n <inail-popover [iconClass]=\"popoverButtonIcon\"\n [buttonTitle]=\"popoverButtonTitle\"\n [header]=\"popoverHeader\"\n [content]=\"popoverContent\">\n </inail-popover>\n </span>\n <div class=\"form-control-wrapper\"\n [ngClass]=\"{'no-label' : hiddenLabel || !label}\">\n <input #formControl\n [id]=\"id\"\n [attr.type]=\"getType()\"\n [attr.step]=\"getStep()\"\n class=\"form-control {{inputClass}}\"\n [ngClass]=\"{'disabled': disabled}\"\n [attr.name]=\"name\"\n [attr.title]=\"title\"\n [attr.maxlength]=\"getMaxLength()\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.placeholder]=\"placeholderVisualizzato\"\n [attr.aria-required]=\"required === true ? true : undefined\"\n [attr.aria-invalid]=\"isThereError() === true ? true : undefined\"\n [attr.aria-describedBy]=\"getAriaDescribedBy()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\"\n (paste)=\"onPaste($event)\"\n (keyup.enter)=\"enterUp.emit()\"\n [(ngModel)]=\"value\">\n </div>\n <div *ngIf=\"showError()\" [id]=\"id+'-description'\">\n <div class=\"msg msg-errore\">\n <strong [innerHTML]=\"'ERRORE: '+this.error\"></strong>\n </div>\n <div *ngIf=\"description\" [innerHTML]=\"this.description\"></div>\n </div>\n <div *ngIf=\"description && !showError()\"\n [id]=\"id+'-description'\"\n [innerHTML]=\"this.description\">\n </div>\n <debug-pre *ngIf=\"showState\">\n <state-propertie [label]=\"'id'\" [propertie]=\"id\"></state-propertie>\n <state-propertie [label]=\"'label'\" [propertie]=\"label\"></state-propertie>\n <state-propertie [label]=\"'inputValue'\" [propertie]=\"inputValue\"></state-propertie>\n <state-propertie [label]=\"'placeholder'\" [propertie]=\"placeholder\"></state-propertie>\n <state-propertie [label]=\"'defaultPlaceholder'\" [propertie]=\"defaultPlaceholder\"></state-propertie>\n <inail-form-element-state-properties [formElement]=\"this\"></inail-form-element-state-properties>\n </debug-pre>\n</div>\n",
6754
+ changeDetection: CHANGE_DETECTION_STRATEGY,
6755
+ encapsulation: core.ViewEncapsulation.None,
6756
+ providers: [
6757
+ {
6758
+ provide: forms.NG_VALUE_ACCESSOR,
6759
+ useExisting: core.forwardRef(function () { return InputTimeComponent; }),
6760
+ multi: true
6761
+ }
6762
+ ],
6763
+ styles: [".inail-input-time .form-control-wrapper:after{font-family:FontAwesome;content:\"\\f017\";right:30px;position:absolute;top:30px;font-size:17px}.inail-input-time input[type=time]{padding-right:33px}.inail-input-time .form-control-wrapper.no-label:after{top:11px}"]
6764
+ },] }
6765
+ ];
6766
+ InputTimeComponent.ctorParameters = function () { return [
6767
+ { type: core.ChangeDetectorRef },
6768
+ { type: undefined, decorators: [{ type: core.Inject, args: [NG_INAIL_COMMON_CONFIG,] }] }
6769
+ ]; };
6770
+ InputTimeComponent.propDecorators = {
6771
+ formControlElement: [{ type: core.ViewChild, args: ['formControl', { static: true },] }],
6772
+ nativeInputTypeTime: [{ type: core.Input }],
6773
+ withSeconds: [{ type: core.Input }],
6774
+ selfValidation: [{ type: core.Input }],
6775
+ selfValidationError: [{ type: core.Input }],
6776
+ step: [{ type: core.Input }],
6777
+ placeholder: [{ type: core.Input }],
6778
+ valueChange: [{ type: core.Output }],
6779
+ preventPasting: [{ type: core.Input }],
6780
+ value: [{ type: core.Input }]
6781
+ };
6782
+
6583
6783
  var NgInailCommonModule = /** @class */ (function () {
6584
6784
  function NgInailCommonModule() {
6585
6785
  }
6786
+ NgInailCommonModule.forRoot = function (config) {
6787
+ return {
6788
+ ngModule: NgInailCommonModule,
6789
+ providers: [
6790
+ {
6791
+ provide: NG_INAIL_COMMON_CONFIG,
6792
+ useValue: config
6793
+ }
6794
+ ]
6795
+ };
6796
+ };
6586
6797
  return NgInailCommonModule;
6587
6798
  }());
6588
6799
  NgInailCommonModule.decorators = [
@@ -6635,7 +6846,8 @@
6635
6846
  ContainerComponent,
6636
6847
  TrCheckboxComponent,
6637
6848
  ProgressBarComponent,
6638
- MultiSelectComponent
6849
+ MultiSelectComponent,
6850
+ InputTimeComponent
6639
6851
  ],
6640
6852
  imports: [
6641
6853
  common.CommonModule,
@@ -6685,7 +6897,8 @@
6685
6897
  ContainerComponent,
6686
6898
  TrCheckboxComponent,
6687
6899
  ProgressBarComponent,
6688
- MultiSelectComponent
6900
+ MultiSelectComponent,
6901
+ InputTimeComponent
6689
6902
  ],
6690
6903
  providers: [common.DatePipe]
6691
6904
  },] }
@@ -6722,12 +6935,14 @@
6722
6935
  exports.InputFileComponent = InputFileComponent;
6723
6936
  exports.InputNumberComponent = InputNumberComponent;
6724
6937
  exports.InputTextComponent = InputTextComponent;
6938
+ exports.InputTimeComponent = InputTimeComponent;
6725
6939
  exports.LoaderComponent = LoaderComponent;
6726
6940
  exports.MenuComponent = MenuComponent;
6727
6941
  exports.MenuIntranetComponent = MenuIntranetComponent;
6728
6942
  exports.MenuItem = MenuItem;
6729
6943
  exports.ModalComponent = ModalComponent;
6730
6944
  exports.MultiSelectComponent = MultiSelectComponent;
6945
+ exports.NG_INAIL_COMMON_CONFIG = NG_INAIL_COMMON_CONFIG;
6731
6946
  exports.NavigazioneInternaComponent = NavigazioneInternaComponent;
6732
6947
  exports.NavigazionePrincipaleComponent = NavigazionePrincipaleComponent;
6733
6948
  exports.NavigazioneSecondariaComponent = NavigazioneSecondariaComponent;
@@ -6754,6 +6969,7 @@
6754
6969
  exports.call = call;
6755
6970
  exports.clone = clone;
6756
6971
  exports.dateToString = dateToString;
6972
+ exports.getConfigValue = getConfigValue;
6757
6973
  exports.isAbsolute = isAbsolute;
6758
6974
  exports.isBlankOrNull = isBlankOrNull;
6759
6975
  exports.isDate = isDate;