design-angular-kit 1.0.0-16 → 1.0.0-18

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 (218) hide show
  1. package/README.md +31 -6
  2. package/assets/i18n/en.json +4 -1
  3. package/assets/i18n/it.json +4 -1
  4. package/esm2022/lib/abstracts/abstract-form.component.mjs +186 -0
  5. package/esm2022/lib/abstracts/abstract.component.mjs +45 -0
  6. package/esm2022/lib/components/components.module.mjs +188 -0
  7. package/esm2022/lib/components/core/accordion/accordion.component.mjs +38 -0
  8. package/esm2022/lib/components/core/alert/alert.component.mjs +74 -0
  9. package/esm2022/lib/components/core/badge/badge.directive.mjs +38 -0
  10. package/esm2022/lib/components/core/button/button.directive.mjs +85 -0
  11. package/esm2022/lib/components/core/callout/callout.component.mjs +57 -0
  12. package/esm2022/lib/components/core/card/card.component.mjs +64 -0
  13. package/esm2022/lib/components/core/carousel/carousel/carousel.component.mjs +89 -0
  14. package/esm2022/lib/components/core/carousel/carousel-item/carousel-item.component.mjs +19 -0
  15. package/esm2022/lib/components/core/carousel/carousel.module.mjs +23 -0
  16. package/esm2022/lib/components/core/chip/chip.component.mjs +96 -0
  17. package/esm2022/lib/components/core/collapse/collapse.component.mjs +101 -0
  18. package/esm2022/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.mjs +24 -0
  19. package/esm2022/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.mjs +11 -0
  20. package/esm2022/lib/components/core/dimmer/dimmer.component.mjs +59 -0
  21. package/esm2022/lib/components/core/dimmer/dimmer.module.mjs +27 -0
  22. package/esm2022/lib/components/core/dropdown/dropdown/dropdown.component.mjs +143 -0
  23. package/esm2022/lib/components/core/dropdown/dropdown-item/dropdown-item.component.mjs +68 -0
  24. package/esm2022/lib/components/core/dropdown/dropdown.module.mjs +18 -0
  25. package/esm2022/lib/components/core/forward/forward.directive.mjs +53 -0
  26. package/esm2022/lib/components/core/link/link.component.mjs +46 -0
  27. package/esm2022/lib/components/core/list/list/list.component.mjs +17 -0
  28. package/esm2022/lib/components/core/list/list-item/list-item.component.mjs +40 -0
  29. package/esm2022/lib/components/core/list/list.module.mjs +23 -0
  30. package/esm2022/lib/components/core/modal/modal.component.mjs +164 -0
  31. package/esm2022/lib/components/core/notifications/notifications.component.mjs +111 -0
  32. package/esm2022/lib/components/core/pagination/pagination.component.mjs +133 -0
  33. package/esm2022/lib/components/core/popover/popover.directive.mjs +175 -0
  34. package/esm2022/lib/components/core/progress-bar/progress-bar.component.mjs +35 -0
  35. package/esm2022/lib/components/core/progress-button/progress-button.component.mjs +27 -0
  36. package/esm2022/lib/components/core/spinner/spinner.component.mjs +36 -0
  37. package/esm2022/lib/components/core/steppers/steppers-container/steppers-container.component.mjs +138 -0
  38. package/esm2022/lib/components/core/steppers/steppers-item/steppers-item.component.mjs +19 -0
  39. package/esm2022/lib/components/core/steppers/steppers.module.mjs +23 -0
  40. package/esm2022/lib/components/core/tab/tab-container/tab-container.component.mjs +60 -0
  41. package/esm2022/lib/components/core/tab/tab-item/tab-item.component.mjs +36 -0
  42. package/esm2022/lib/components/core/tab/tab.module.mjs +23 -0
  43. package/esm2022/lib/components/core/table/table.component.mjs +57 -0
  44. package/esm2022/lib/components/core/tooltip/tooltip.directive.mjs +142 -0
  45. package/esm2022/lib/components/form/checkbox/checkbox.component.mjs +49 -0
  46. package/esm2022/lib/components/form/form.module.mjs +55 -0
  47. package/esm2022/lib/components/form/input/input.component.mjs +239 -0
  48. package/esm2022/lib/components/form/password-input/password-input.component.mjs +155 -0
  49. package/esm2022/lib/components/form/radio-button/radio-button.component.mjs +69 -0
  50. package/esm2022/lib/components/form/range/range.component.mjs +64 -0
  51. package/esm2022/lib/components/form/rating/rating.component.mjs +51 -0
  52. package/esm2022/lib/components/form/select/select.component.mjs +70 -0
  53. package/esm2022/lib/components/form/textarea/textarea.component.mjs +47 -0
  54. package/esm2022/lib/components/form/upload-drag-drop/upload-drag-drop.component.mjs +140 -0
  55. package/esm2022/lib/components/form/upload-file-list/upload-file-list.component.mjs +112 -0
  56. package/esm2022/lib/components/navigation/back-button/back-button.component.mjs +71 -0
  57. package/esm2022/lib/components/navigation/back-to-top/back-to-top.component.mjs +64 -0
  58. package/esm2022/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.mjs +57 -0
  59. package/esm2022/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.mjs +23 -0
  60. package/esm2022/lib/components/navigation/breadcrumbs/breadcrumbs.module.mjs +18 -0
  61. package/esm2022/lib/components/navigation/header/header.component.mjs +58 -0
  62. package/esm2022/lib/components/utils/error-page/error-page.component.mjs +81 -0
  63. package/esm2022/lib/components/utils/icon/icon.component.mjs +55 -0
  64. package/esm2022/lib/components/utils/language-switcher/language-switcher.component.mjs +41 -0
  65. package/esm2022/lib/design-angular-kit.module.mjs +68 -0
  66. package/{esm2020 → esm2022}/lib/interfaces/form.mjs +1 -1
  67. package/esm2022/lib/interfaces/icon.mjs +165 -0
  68. package/esm2022/lib/pipes/mark-matching-text.pipe.mjs +37 -0
  69. package/esm2022/lib/services/notification/notification.service.mjs +120 -0
  70. package/esm2022/lib/utils/file-utils.mjs +73 -0
  71. package/esm2022/lib/utils/regex.mjs +31 -0
  72. package/esm2022/lib/validators/it-validators.mjs +153 -0
  73. package/esm2022/public_api.mjs +85 -0
  74. package/fesm2022/design-angular-kit.mjs +4615 -0
  75. package/fesm2022/design-angular-kit.mjs.map +1 -0
  76. package/lib/abstracts/abstract-form.component.d.ts +4 -4
  77. package/lib/abstracts/abstract.component.d.ts +3 -3
  78. package/lib/components/components.module.d.ts +32 -52
  79. package/lib/components/core/accordion/accordion.component.d.ts +6 -5
  80. package/lib/components/core/alert/alert.component.d.ts +5 -5
  81. package/lib/components/core/badge/badge.directive.d.ts +5 -5
  82. package/lib/components/core/button/button.directive.d.ts +11 -11
  83. package/lib/components/core/callout/callout.component.d.ts +7 -7
  84. package/lib/components/core/card/card.component.d.ts +8 -8
  85. package/lib/components/core/carousel/carousel/carousel.component.d.ts +10 -10
  86. package/lib/components/core/carousel/carousel-item/carousel-item.component.d.ts +4 -4
  87. package/lib/components/core/carousel/carousel.module.d.ts +8 -0
  88. package/lib/components/core/chip/chip.component.d.ts +6 -3
  89. package/lib/components/core/collapse/collapse.component.d.ts +8 -8
  90. package/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.d.ts +3 -3
  91. package/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.d.ts +3 -3
  92. package/lib/components/core/dimmer/dimmer.component.d.ts +4 -4
  93. package/lib/components/core/dimmer/dimmer.module.d.ts +9 -0
  94. package/lib/components/core/dropdown/dropdown/dropdown.component.d.ts +14 -9
  95. package/lib/components/core/dropdown/dropdown-item/dropdown-item.component.d.ts +8 -8
  96. package/lib/components/core/dropdown/dropdown.module.d.ts +8 -0
  97. package/lib/components/core/forward/forward.directive.d.ts +3 -3
  98. package/lib/components/core/link/link.component.d.ts +9 -8
  99. package/lib/components/core/list/list/list.component.d.ts +4 -4
  100. package/lib/components/core/list/list-item/list-item.component.d.ts +9 -9
  101. package/lib/components/core/list/list.module.d.ts +8 -0
  102. package/lib/components/core/modal/modal.component.d.ts +11 -11
  103. package/lib/components/core/notifications/notifications.component.d.ts +6 -6
  104. package/lib/components/core/pagination/pagination.component.d.ts +8 -8
  105. package/lib/components/core/popover/popover.directive.d.ts +3 -3
  106. package/lib/components/core/progress-bar/progress-bar.component.d.ts +6 -6
  107. package/lib/components/core/progress-button/progress-button.component.d.ts +5 -5
  108. package/lib/components/core/spinner/spinner.component.d.ts +5 -5
  109. package/lib/components/core/steppers/steppers-container/steppers-container.component.d.ts +37 -13
  110. package/lib/components/core/steppers/steppers-item/steppers-item.component.d.ts +5 -5
  111. package/lib/components/core/steppers/steppers.module.d.ts +8 -0
  112. package/lib/components/core/tab/tab-container/tab-container.component.d.ts +9 -9
  113. package/lib/components/core/tab/tab-item/tab-item.component.d.ts +8 -8
  114. package/lib/components/core/tab/tab.module.d.ts +8 -0
  115. package/lib/components/core/table/table.component.d.ts +12 -12
  116. package/lib/components/core/tooltip/tooltip.directive.d.ts +3 -3
  117. package/lib/components/form/checkbox/checkbox.component.d.ts +12 -10
  118. package/lib/components/form/form.module.d.ts +16 -0
  119. package/lib/components/form/input/input.component.d.ts +18 -13
  120. package/lib/components/form/password-input/password-input.component.d.ts +11 -6
  121. package/lib/components/form/radio-button/radio-button.component.d.ts +6 -6
  122. package/lib/components/form/range/range.component.d.ts +42 -0
  123. package/lib/components/form/rating/rating.component.d.ts +24 -0
  124. package/lib/components/form/select/select.component.d.ts +11 -6
  125. package/lib/components/form/textarea/textarea.component.d.ts +5 -5
  126. package/lib/components/form/upload-drag-drop/upload-drag-drop.component.d.ts +4 -4
  127. package/lib/components/form/upload-file-list/upload-file-list.component.d.ts +6 -6
  128. package/lib/components/navigation/back-button/back-button.component.d.ts +3 -3
  129. package/lib/components/navigation/back-to-top/back-to-top.component.d.ts +7 -7
  130. package/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.d.ts +6 -6
  131. package/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.d.ts +6 -6
  132. package/lib/components/navigation/breadcrumbs/breadcrumbs.module.d.ts +8 -0
  133. package/lib/components/navigation/header/header.component.d.ts +6 -6
  134. package/lib/components/utils/error-page/error-page.component.d.ts +6 -6
  135. package/lib/components/utils/icon/icon.component.d.ts +7 -7
  136. package/lib/components/utils/language-switcher/language-switcher.component.d.ts +4 -4
  137. package/lib/design-angular-kit.module.d.ts +3 -4
  138. package/lib/interfaces/core.d.ts +16 -16
  139. package/lib/interfaces/form.d.ts +3 -3
  140. package/lib/interfaces/icon.d.ts +4 -4
  141. package/lib/pipes/mark-matching-text.pipe.d.ts +4 -4
  142. package/lib/services/{notifications/notifications.service.d.ts → notification/notification.service.d.ts} +3 -3
  143. package/lib/utils/boolean-input.d.ts +1 -1
  144. package/lib/utils/regex.d.ts +5 -0
  145. package/lib/validators/it-validators.d.ts +4 -0
  146. package/package.json +13 -19
  147. package/public_api.d.ts +13 -4
  148. package/esm2020/lib/abstracts/abstract-form.component.mjs +0 -188
  149. package/esm2020/lib/abstracts/abstract.component.mjs +0 -45
  150. package/esm2020/lib/components/components.module.mjs +0 -256
  151. package/esm2020/lib/components/core/accordion/accordion.component.mjs +0 -35
  152. package/esm2020/lib/components/core/alert/alert.component.mjs +0 -73
  153. package/esm2020/lib/components/core/badge/badge.directive.mjs +0 -37
  154. package/esm2020/lib/components/core/button/button.directive.mjs +0 -84
  155. package/esm2020/lib/components/core/callout/callout.component.mjs +0 -57
  156. package/esm2020/lib/components/core/card/card.component.mjs +0 -64
  157. package/esm2020/lib/components/core/carousel/carousel/carousel.component.mjs +0 -89
  158. package/esm2020/lib/components/core/carousel/carousel-item/carousel-item.component.mjs +0 -19
  159. package/esm2020/lib/components/core/chip/chip.component.mjs +0 -89
  160. package/esm2020/lib/components/core/collapse/collapse.component.mjs +0 -101
  161. package/esm2020/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.mjs +0 -24
  162. package/esm2020/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.mjs +0 -11
  163. package/esm2020/lib/components/core/dimmer/dimmer.component.mjs +0 -59
  164. package/esm2020/lib/components/core/dropdown/dropdown/dropdown.component.mjs +0 -130
  165. package/esm2020/lib/components/core/dropdown/dropdown-item/dropdown-item.component.mjs +0 -68
  166. package/esm2020/lib/components/core/forward/forward.directive.mjs +0 -52
  167. package/esm2020/lib/components/core/link/link.component.mjs +0 -40
  168. package/esm2020/lib/components/core/list/list/list.component.mjs +0 -17
  169. package/esm2020/lib/components/core/list/list-item/list-item.component.mjs +0 -41
  170. package/esm2020/lib/components/core/modal/modal.component.mjs +0 -163
  171. package/esm2020/lib/components/core/notifications/notifications.component.mjs +0 -110
  172. package/esm2020/lib/components/core/pagination/pagination.component.mjs +0 -131
  173. package/esm2020/lib/components/core/popover/popover.directive.mjs +0 -174
  174. package/esm2020/lib/components/core/progress-bar/progress-bar.component.mjs +0 -34
  175. package/esm2020/lib/components/core/progress-button/progress-button.component.mjs +0 -27
  176. package/esm2020/lib/components/core/rating/rating.component.mjs +0 -49
  177. package/esm2020/lib/components/core/spinner/spinner.component.mjs +0 -35
  178. package/esm2020/lib/components/core/steppers/steppers-container/steppers-container.component.mjs +0 -127
  179. package/esm2020/lib/components/core/steppers/steppers-item/steppers-item.component.mjs +0 -19
  180. package/esm2020/lib/components/core/tab/tab-container/tab-container.component.mjs +0 -59
  181. package/esm2020/lib/components/core/tab/tab-item/tab-item.component.mjs +0 -36
  182. package/esm2020/lib/components/core/table/table.component.mjs +0 -57
  183. package/esm2020/lib/components/core/tooltip/tooltip.directive.mjs +0 -141
  184. package/esm2020/lib/components/form/checkbox/checkbox.component.mjs +0 -40
  185. package/esm2020/lib/components/form/input/input.component.mjs +0 -232
  186. package/esm2020/lib/components/form/password-input/password-input.component.mjs +0 -152
  187. package/esm2020/lib/components/form/radio-button/radio-button.component.mjs +0 -68
  188. package/esm2020/lib/components/form/select/select.component.mjs +0 -62
  189. package/esm2020/lib/components/form/textarea/textarea.component.mjs +0 -46
  190. package/esm2020/lib/components/form/upload-drag-drop/upload-drag-drop.component.mjs +0 -139
  191. package/esm2020/lib/components/form/upload-file-list/upload-file-list.component.mjs +0 -104
  192. package/esm2020/lib/components/navigation/back-button/back-button.component.mjs +0 -69
  193. package/esm2020/lib/components/navigation/back-to-top/back-to-top.component.mjs +0 -64
  194. package/esm2020/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.mjs +0 -56
  195. package/esm2020/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.mjs +0 -23
  196. package/esm2020/lib/components/navigation/header/header.component.mjs +0 -57
  197. package/esm2020/lib/components/utils/error-page/error-page.component.mjs +0 -79
  198. package/esm2020/lib/components/utils/icon/icon.component.mjs +0 -55
  199. package/esm2020/lib/components/utils/language-switcher/language-switcher.component.mjs +0 -39
  200. package/esm2020/lib/design-angular-kit.module.mjs +0 -68
  201. package/esm2020/lib/interfaces/icon.mjs +0 -162
  202. package/esm2020/lib/pipes/mark-matching-text.pipe.mjs +0 -36
  203. package/esm2020/lib/services/notifications/notifications.service.mjs +0 -120
  204. package/esm2020/lib/utils/file-utils.mjs +0 -73
  205. package/esm2020/lib/utils/regex.mjs +0 -26
  206. package/esm2020/lib/validators/it-validators.mjs +0 -147
  207. package/esm2020/public_api.mjs +0 -74
  208. package/fesm2015/design-angular-kit.mjs +0 -4422
  209. package/fesm2015/design-angular-kit.mjs.map +0 -1
  210. package/fesm2020/design-angular-kit.mjs +0 -4354
  211. package/fesm2020/design-angular-kit.mjs.map +0 -1
  212. package/lib/components/core/rating/rating.component.d.ts +0 -24
  213. /package/{esm2020 → esm2022}/design-angular-kit.mjs +0 -0
  214. /package/{esm2020 → esm2022}/lib/design-angular-kit-config.mjs +0 -0
  215. /package/{esm2020 → esm2022}/lib/interfaces/core.mjs +0 -0
  216. /package/{esm2020 → esm2022}/lib/interfaces/design-angular-kit-init.mjs +0 -0
  217. /package/{esm2020 → esm2022}/lib/interfaces/utils.mjs +0 -0
  218. /package/{esm2020 → esm2022}/lib/utils/boolean-input.mjs +0 -0
@@ -1,4354 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, Renderer2, ElementRef, ChangeDetectorRef, EventEmitter, Component, Input, Output, ChangeDetectionStrategy, ViewChild, InjectionToken, Inject, Directive, HostBinding, Optional, Host, ContentChildren, HostListener, TemplateRef, Injectable, Self, Pipe, ViewChildren, NgModule } from '@angular/core';
3
- import * as i1$1 from '@ngx-translate/core';
4
- import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
5
- import { HttpClientModule, HttpClient } from '@angular/common/http';
6
- import { TranslateHttpLoader } from '@ngx-translate/http-loader';
7
- import * as i1 from '@angular/common';
8
- import { DOCUMENT, CommonModule, NgIf, NgForOf } from '@angular/common';
9
- import * as i2 from '@angular/forms';
10
- import { FormControl, Validators, ReactiveFormsModule } from '@angular/forms';
11
- import * as i1$2 from '@angular/router';
12
- import { RouterLink } from '@angular/router';
13
- import { Collapse, Alert, CarouselBI, Dropdown, Modal, Notification, Popover, Tab, Tooltip, InputPassword, ProgressDonut, BackToTop } from 'bootstrap-italia';
14
- import { startWith, Subject, filter, Observable, of, debounceTime, distinctUntilChanged, switchMap, map, tap, take, forkJoin } from 'rxjs';
15
- import * as i1$3 from '@angular/platform-browser';
16
- import { trigger, transition, style, animate } from '@angular/animations';
17
-
18
- class AbstractComponent {
19
- constructor() {
20
- /**
21
- * The element ID
22
- */
23
- this.id = this.getDefaultId();
24
- this._renderer = inject(Renderer2);
25
- this._elementRef = inject(ElementRef);
26
- this._changeDetectorRef = inject(ChangeDetectorRef);
27
- this.valueChanges = new EventEmitter();
28
- }
29
- ngAfterViewInit() {
30
- this._renderer.removeAttribute(this._elementRef.nativeElement, 'id');
31
- }
32
- ngOnChanges(changes) {
33
- this.valueChanges.next(); // The inputs were changed
34
- }
35
- /**
36
- * Generate unique id for components
37
- * @private
38
- */
39
- getDefaultId() {
40
- const name = this.constructor.name.replace('Component', '');
41
- const kebabName = name.replace(/[A-Z]+(?![a-z])|[A-Z]/g, ($, ofs) => (ofs ? '-' : '') + $.toLowerCase());
42
- return `it-${kebabName}-${AbstractComponent.instances++}`;
43
- }
44
- }
45
- /**
46
- * Counter of active instances
47
- * @private
48
- */
49
- AbstractComponent.instances = 0;
50
- AbstractComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: AbstractComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
51
- AbstractComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: AbstractComponent, selector: "ng-component", inputs: { id: "id" }, outputs: { valueChanges: "valueChanges" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true });
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: AbstractComponent, decorators: [{
53
- type: Component,
54
- args: [{ template: '' }]
55
- }], ctorParameters: function () { return []; }, propDecorators: { id: [{
56
- type: Input
57
- }], valueChanges: [{
58
- type: Output
59
- }] } });
60
-
61
- /**
62
- * Check if boolean input has true value and not is `undefined`
63
- * @param booleanInput the boolean input
64
- */
65
- function isTrueBooleanInput(booleanInput) {
66
- return booleanInput !== undefined && (booleanInput === true || booleanInput === 'true');
67
- }
68
- /**
69
- * Check if boolean input has false value or is `undefined`
70
- * @param booleanInput the boolean input
71
- */
72
- function isFalseBooleanInput(booleanInput) {
73
- return booleanInput === undefined || booleanInput === false || booleanInput === 'false';
74
- }
75
-
76
- class CollapseComponent extends AbstractComponent {
77
- constructor() {
78
- super(...arguments);
79
- /**
80
- * Custom class
81
- */
82
- this.class = '';
83
- /**
84
- * This event fires immediately when the show method is called.
85
- */
86
- this.showEvent = new EventEmitter();
87
- /**
88
- * This event is triggered when the tooltip has been made visible to the user (it will wait for the CSS transitions to complete).
89
- */
90
- this.shownEvent = new EventEmitter();
91
- /**
92
- * This event fires immediately when the hide method is called.
93
- */
94
- this.hideEvent = new EventEmitter();
95
- /**
96
- * This event is raised when the tooltip has finished being hidden from the user (it will wait for the CSS transitions to complete).
97
- */
98
- this.hiddenEvent = new EventEmitter();
99
- }
100
- get isMulti() {
101
- return isTrueBooleanInput(this.multi);
102
- }
103
- get isOpenedOnStart() {
104
- return isTrueBooleanInput(this.opened);
105
- }
106
- ngAfterViewInit() {
107
- super.ngAfterViewInit();
108
- this._renderer.removeAttribute(this._elementRef.nativeElement, 'class');
109
- if (this.collapseDiv) {
110
- const element = this.collapseDiv.nativeElement;
111
- this.collapse = Collapse.getOrCreateInstance(element, {
112
- toggle: this.isOpenedOnStart
113
- });
114
- element.addEventListener('show.bs.collapse', event => this.showEvent.emit(event));
115
- element.addEventListener('shown.bs.collapse', event => this.shownEvent.emit(event));
116
- element.addEventListener('hide.bs.collapse', event => this.hideEvent.emit(event));
117
- element.addEventListener('hidden.bs.collapse', event => this.hiddenEvent.emit(event));
118
- }
119
- }
120
- /**
121
- * Shows a resealable item
122
- * NOTE: Returns to the caller before the collapsable element has actually been shown (onShown event).
123
- */
124
- show() {
125
- this.collapse?.show();
126
- }
127
- /**
128
- * Hides a resealable item
129
- * NOTE: Returns to the caller before the collapsable element has actually been hidden (onHidden Event)
130
- */
131
- hide() {
132
- this.collapse?.hide();
133
- }
134
- /**
135
- * Toggle a collapsible item to show or hide it.
136
- * NOTE: Returns to the caller before the collapsable element has actually been shown or hidden (onShown and onHidden events)
137
- */
138
- toggle() {
139
- this.collapse?.toggle();
140
- }
141
- /**
142
- * Eliminates the possibility of an item being resealable
143
- */
144
- dispose() {
145
- this.collapse?.dispose();
146
- }
147
- }
148
- CollapseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: CollapseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
149
- CollapseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: CollapseComponent, selector: "it-collapse", inputs: { multi: "multi", opened: "opened", class: "class" }, outputs: { showEvent: "showEvent", shownEvent: "shownEvent", hideEvent: "hideEvent", hiddenEvent: "hiddenEvent" }, viewQueries: [{ propertyName: "collapseDiv", first: true, predicate: ["collapse"], descendants: true }], exportAs: ["itCollapse"], usesInheritance: true, ngImport: i0, template: "<div [id]=\"id\" class=\"collapse {{class}}\" [class.multi-collapse]=\"isMulti\" #collapse>\n <ng-content></ng-content>\n</div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
150
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: CollapseComponent, decorators: [{
151
- type: Component,
152
- args: [{ selector: 'it-collapse', exportAs: 'itCollapse', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [id]=\"id\" class=\"collapse {{class}}\" [class.multi-collapse]=\"isMulti\" #collapse>\n <ng-content></ng-content>\n</div>\n" }]
153
- }], propDecorators: { multi: [{
154
- type: Input
155
- }], opened: [{
156
- type: Input
157
- }], class: [{
158
- type: Input
159
- }], showEvent: [{
160
- type: Output
161
- }], shownEvent: [{
162
- type: Output
163
- }], hideEvent: [{
164
- type: Output
165
- }], hiddenEvent: [{
166
- type: Output
167
- }], collapseDiv: [{
168
- type: ViewChild,
169
- args: ['collapse']
170
- }] } });
171
-
172
- /**
173
- * Accordion
174
- * @description Build vertically collapsible accordions based on Collapse.
175
- */
176
- class AccordionComponent extends CollapseComponent {
177
- constructor() {
178
- super(...arguments);
179
- this.isCollapsed = true;
180
- }
181
- ngAfterViewInit() {
182
- super.ngAfterViewInit();
183
- this._renderer.removeAttribute(this._elementRef.nativeElement, 'title');
184
- this.isCollapsed = !this.isOpenedOnStart;
185
- this.hideEvent.subscribe(() => {
186
- this.isCollapsed = true;
187
- this._changeDetectorRef.detectChanges();
188
- });
189
- this.showEvent.subscribe(() => {
190
- this.isCollapsed = false;
191
- this._changeDetectorRef.detectChanges();
192
- });
193
- }
194
- }
195
- AccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: AccordionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
196
- AccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: AccordionComponent, selector: "it-accordion[title]", inputs: { title: "title" }, exportAs: ["itAccordion"], usesInheritance: true, ngImport: i0, template: "<div class=\"accordion\">\n <div class=\"accordion-item\">\n\n <h2 class=\"accordion-header\" id=\"collapse-{{id}}-heading\">\n <button\n class=\"accordion-button\"\n type=\"button\"\n data-bs-toggle=\"collapse\"\n [class.collapsed]=\"isCollapsed\"\n [attr.data-bs-target]=\"'#collapse-' + id\"\n [attr.aria-controls]=\"'collapse-' + id\"\n [attr.aria-expanded]=\"isOpenedOnStart ? 'true' : 'false'\">\n {{title}}\n </button>\n </h2>\n\n <div #collapse id=\"collapse-{{id}}\" role=\"region\"\n class=\"accordion-collapse collapse {{class}}\"\n [attr.aria-labelledby]=\"'collapse-' + id + '-heading'\">\n\n <div class=\"accordion-body\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n</div>\n\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
197
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: AccordionComponent, decorators: [{
198
- type: Component,
199
- args: [{ selector: 'it-accordion[title]', exportAs: 'itAccordion', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"accordion\">\n <div class=\"accordion-item\">\n\n <h2 class=\"accordion-header\" id=\"collapse-{{id}}-heading\">\n <button\n class=\"accordion-button\"\n type=\"button\"\n data-bs-toggle=\"collapse\"\n [class.collapsed]=\"isCollapsed\"\n [attr.data-bs-target]=\"'#collapse-' + id\"\n [attr.aria-controls]=\"'collapse-' + id\"\n [attr.aria-expanded]=\"isOpenedOnStart ? 'true' : 'false'\">\n {{title}}\n </button>\n </h2>\n\n <div #collapse id=\"collapse-{{id}}\" role=\"region\"\n class=\"accordion-collapse collapse {{class}}\"\n [attr.aria-labelledby]=\"'collapse-' + id + '-heading'\">\n\n <div class=\"accordion-body\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n</div>\n\n" }]
200
- }], propDecorators: { title: [{
201
- type: Input
202
- }] } });
203
-
204
- const DESIGN_ANGULAR_KIT_CONFIG = new InjectionToken('DesignAngularKitConfig');
205
- class DesignAngularKitConfig {
206
- constructor(nextInit) {
207
- this.initConfig = nextInit;
208
- }
209
- /**
210
- * The initial path in the `href` attribute in the `IconComponent` component
211
- * @default './bootstrap-italia/dist/svg/sprites.svg'
212
- */
213
- get iconHref() {
214
- return this.initConfig?.iconHref || './bootstrap-italia/dist/svg/sprites.svg';
215
- }
216
- }
217
-
218
- class IconComponent {
219
- constructor(config) {
220
- this.config = config;
221
- }
222
- /**
223
- * Return the icon href
224
- */
225
- get iconHref() {
226
- return `${this.config.iconHref}#it-${this.name}`;
227
- }
228
- /**
229
- * Return the icon class
230
- */
231
- get iconClass() {
232
- let iconClass = 'icon';
233
- if (this.size) {
234
- iconClass += ` icon-${this.size}`;
235
- }
236
- if (this.color) {
237
- iconClass += ` icon-${this.color}`;
238
- }
239
- if (isTrueBooleanInput(this.padded)) {
240
- iconClass += ` icon-padded`;
241
- }
242
- if (this.svgClass) {
243
- iconClass += ` ${this.svgClass}`;
244
- }
245
- return iconClass;
246
- }
247
- }
248
- IconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: IconComponent, deps: [{ token: DESIGN_ANGULAR_KIT_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
249
- IconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: IconComponent, selector: "it-icon[name]", inputs: { name: "name", size: "size", color: "color", padded: "padded", svgClass: "svgClass" }, ngImport: i0, template: "<svg [class]=\"iconClass\">\n <use [attr.href]=\"iconHref\" [attr.xlink:href]=\"iconHref\"></use>\n</svg>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
250
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: IconComponent, decorators: [{
251
- type: Component,
252
- args: [{ selector: 'it-icon[name]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg [class]=\"iconClass\">\n <use [attr.href]=\"iconHref\" [attr.xlink:href]=\"iconHref\"></use>\n</svg>\n" }]
253
- }], ctorParameters: function () { return [{ type: DesignAngularKitConfig, decorators: [{
254
- type: Inject,
255
- args: [DESIGN_ANGULAR_KIT_CONFIG]
256
- }] }]; }, propDecorators: { name: [{
257
- type: Input
258
- }], size: [{
259
- type: Input
260
- }], color: [{
261
- type: Input
262
- }], padded: [{
263
- type: Input
264
- }], svgClass: [{
265
- type: Input
266
- }] } });
267
-
268
- /**
269
- * Alert
270
- * @description You can provide feedback to the user via alert messages.
271
- */
272
- class AlertComponent extends AbstractComponent {
273
- constructor() {
274
- super(...arguments);
275
- /**
276
- * The alert color
277
- * @default info
278
- */
279
- this.color = 'info';
280
- /**
281
- * This event fires immediately when the instance's close method is called.
282
- */
283
- this.closeEvent = new EventEmitter();
284
- /**
285
- * This event fires when the alert has been closed (it will wait for CSS transitions to complete).
286
- */
287
- this.closedEvent = new EventEmitter();
288
- }
289
- get isDismissible() {
290
- return isTrueBooleanInput(this.dismissible);
291
- }
292
- ngAfterViewInit() {
293
- super.ngAfterViewInit();
294
- if (this.alertElement) {
295
- const element = this.alertElement.nativeElement;
296
- this.alert = Alert.getOrCreateInstance(element);
297
- element.addEventListener('close.bs.alert', event => this.closeEvent.emit(event));
298
- element.addEventListener('closed.bs.alert', event => this.closedEvent.emit(event));
299
- }
300
- }
301
- /**
302
- * Close an alert by removing it from the DOM.
303
- * If the `.fade` and `.show` classes are present in the element, the alert will be closed with a disappearing effect.
304
- */
305
- close() {
306
- this.alert?.close();
307
- }
308
- /**
309
- * The alert is removed
310
- */
311
- dispose() {
312
- this.alert?.dispose();
313
- }
314
- }
315
- AlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: AlertComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
316
- AlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: AlertComponent, selector: "it-alert", inputs: { color: "color", dismissible: "dismissible" }, outputs: { closeEvent: "closeEvent", closedEvent: "closedEvent" }, viewQueries: [{ propertyName: "alertElement", first: true, predicate: ["alertElement"], descendants: true }], exportAs: ["itAlert"], usesInheritance: true, ngImport: i0, template: "<div class=\"alert alert-{{color}}\" #alertElement\n [class.alert-dismissible]=\"isDismissible\"\n [class.fade]=\"isDismissible\"\n [class.show]=\"isDismissible\"\n role=\"alert\">\n <h4 class=\"alert-heading\">\n <ng-content select=\"[heading]\"></ng-content>\n </h4>\n\n <ng-content></ng-content>\n\n <button *ngIf=\"isDismissible\"\n type=\"button\"\n class=\"btn-close\"\n data-bs-dismiss=\"alert\"\n [attr.aria-label]=\"'it.core.close-alert'|translate\">\n <it-icon name=\"close\"></it-icon>\n </button>\n</div>\n", styles: [".alert-heading:empty{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "it-icon[name]", inputs: ["name", "size", "color", "padded", "svgClass"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
317
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: AlertComponent, decorators: [{
318
- type: Component,
319
- args: [{ selector: 'it-alert', exportAs: 'itAlert', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"alert alert-{{color}}\" #alertElement\n [class.alert-dismissible]=\"isDismissible\"\n [class.fade]=\"isDismissible\"\n [class.show]=\"isDismissible\"\n role=\"alert\">\n <h4 class=\"alert-heading\">\n <ng-content select=\"[heading]\"></ng-content>\n </h4>\n\n <ng-content></ng-content>\n\n <button *ngIf=\"isDismissible\"\n type=\"button\"\n class=\"btn-close\"\n data-bs-dismiss=\"alert\"\n [attr.aria-label]=\"'it.core.close-alert'|translate\">\n <it-icon name=\"close\"></it-icon>\n </button>\n</div>\n", styles: [".alert-heading:empty{display:none}\n"] }]
320
- }], propDecorators: { color: [{
321
- type: Input
322
- }], dismissible: [{
323
- type: Input
324
- }], closeEvent: [{
325
- type: Output
326
- }], closedEvent: [{
327
- type: Output
328
- }], alertElement: [{
329
- type: ViewChild,
330
- args: ['alertElement']
331
- }] } });
332
-
333
- /**
334
- * Badge
335
- * @description Useful for small counters and labels
336
- */
337
- class BadgeDirective {
338
- get badgeClass() {
339
- let badgeClass = 'badge';
340
- if (isTrueBooleanInput(this.rounded)) {
341
- badgeClass += ` rounded-pill`;
342
- }
343
- if (this.color) {
344
- badgeClass += ` bg-${this.color}`;
345
- }
346
- return badgeClass;
347
- }
348
- }
349
- BadgeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: BadgeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
350
- BadgeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.6", type: BadgeDirective, selector: "[itBadge]", inputs: { color: ["itBadge", "color"], rounded: "rounded" }, host: { properties: { "class": "this.badgeClass" } }, exportAs: ["itBadge"], ngImport: i0 });
351
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: BadgeDirective, decorators: [{
352
- type: Directive,
353
- args: [{
354
- selector: '[itBadge]',
355
- exportAs: 'itBadge'
356
- }]
357
- }], propDecorators: { color: [{
358
- type: Input,
359
- args: ['itBadge']
360
- }], rounded: [{
361
- type: Input
362
- }], badgeClass: [{
363
- type: HostBinding,
364
- args: ['class']
365
- }] } });
366
-
367
- class ProgressBarComponent {
368
- /**
369
- * Return the background color
370
- */
371
- get bgColor() {
372
- if (!this.color) {
373
- return '';
374
- }
375
- return ` bg-${this.color}`;
376
- }
377
- get isIndeterminate() {
378
- return isTrueBooleanInput(this.indeterminate);
379
- }
380
- }
381
- ProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
382
- ProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: ProgressBarComponent, selector: "it-progress-bar[value]", inputs: { value: "value", showLabel: "showLabel", indeterminate: "indeterminate", color: "color" }, ngImport: i0, template: "<div class=\"progress-bar-wrapper\">\n <div *ngIf=\"showLabel\" class=\"progress-bar-label\">\n <span class=\"visually-hidden\">{{'it.core.progress'|translate}} </span>{{value}}%\n </div>\n <div class=\"progress\"\n [class.progress-color]=\"!!color\"\n [class.progress-indeterminate]=\"isIndeterminate\">\n\n <div *ngIf=\"isIndeterminate; else determinate\" class=\"progress-bar{{bgColor}}\" role=\"progressbar\"></div>\n <ng-template #determinate>\n <div class=\"progress-bar{{bgColor}}\" role=\"progressbar\" [style.width.%]=\"value\"\n [attr.aria-valuenow]=\"value\" aria-valuemin=\"0\" aria-valuemax=\"100\"></div>\n </ng-template>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
383
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ProgressBarComponent, decorators: [{
384
- type: Component,
385
- args: [{ selector: 'it-progress-bar[value]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"progress-bar-wrapper\">\n <div *ngIf=\"showLabel\" class=\"progress-bar-label\">\n <span class=\"visually-hidden\">{{'it.core.progress'|translate}} </span>{{value}}%\n </div>\n <div class=\"progress\"\n [class.progress-color]=\"!!color\"\n [class.progress-indeterminate]=\"isIndeterminate\">\n\n <div *ngIf=\"isIndeterminate; else determinate\" class=\"progress-bar{{bgColor}}\" role=\"progressbar\"></div>\n <ng-template #determinate>\n <div class=\"progress-bar{{bgColor}}\" role=\"progressbar\" [style.width.%]=\"value\"\n [attr.aria-valuenow]=\"value\" aria-valuemin=\"0\" aria-valuemax=\"100\"></div>\n </ng-template>\n </div>\n</div>\n" }]
386
- }], propDecorators: { value: [{
387
- type: Input
388
- }], showLabel: [{
389
- type: Input
390
- }], indeterminate: [{
391
- type: Input
392
- }], color: [{
393
- type: Input
394
- }] } });
395
-
396
- class ProgressButtonComponent {
397
- get isProgress() {
398
- return typeof this.progress === 'number' || isTrueBooleanInput(this.progress);
399
- }
400
- get progressValue() {
401
- return typeof this.progress === 'number' ? this.progress : 0;
402
- }
403
- get isIndeterminate() {
404
- return typeof this.progress !== 'number' && isTrueBooleanInput(this.progress);
405
- }
406
- }
407
- ProgressButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ProgressButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
408
- ProgressButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: ProgressButtonComponent, selector: "button[itButton][progress]", inputs: { progress: "progress", progressColor: "progressColor" }, ngImport: i0, template: "<ng-content></ng-content>\n\n<it-progress-bar *ngIf=\"isProgress\"\n [value]=\"progressValue\"\n [indeterminate]=\"isIndeterminate\"\n [color]=\"progressColor\"></it-progress-bar>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ProgressBarComponent, selector: "it-progress-bar[value]", inputs: ["value", "showLabel", "indeterminate", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
409
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ProgressButtonComponent, decorators: [{
410
- type: Component,
411
- args: [{ selector: 'button[itButton][progress]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n\n<it-progress-bar *ngIf=\"isProgress\"\n [value]=\"progressValue\"\n [indeterminate]=\"isIndeterminate\"\n [color]=\"progressColor\"></it-progress-bar>\n" }]
412
- }], propDecorators: { progress: [{
413
- type: Input
414
- }], progressColor: [{
415
- type: Input
416
- }] } });
417
-
418
- /**
419
- * Button
420
- * @description Bootstrap italia custom button styles
421
- */
422
- class ButtonDirective {
423
- constructor(progressButtonComponent) {
424
- this.progressButtonComponent = progressButtonComponent;
425
- this.isFocus = false;
426
- }
427
- onFocus() {
428
- this.isFocus = true;
429
- }
430
- onBlur() {
431
- this.isFocus = false;
432
- }
433
- get hostClasses() {
434
- let cssClass = 'btn';
435
- if (this.color) {
436
- cssClass += ` btn-${this.color}`;
437
- }
438
- if (this.size) {
439
- cssClass += ` btn-${this.size}`;
440
- }
441
- if (this.block) {
442
- cssClass += ' btn-block';
443
- }
444
- if (isTrueBooleanInput(this.disabled)) {
445
- cssClass += ' disabled';
446
- }
447
- if (this.isFocus) {
448
- cssClass += ' focus--mouse';
449
- }
450
- if (this.icons?.length && !this.progressButtonComponent) {
451
- cssClass += ' btn-icon';
452
- }
453
- if (!!this.progressButtonComponent) {
454
- cssClass += ' btn-progress';
455
- }
456
- return cssClass;
457
- }
458
- }
459
- ButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ButtonDirective, deps: [{ token: ProgressButtonComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
460
- ButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.6", type: ButtonDirective, selector: "[itButton]", inputs: { color: ["itButton", "color"], size: "size", block: "block", disabled: "disabled" }, host: { listeners: { "focus": "onFocus()", "blur": "onBlur()" }, properties: { "disabled": "this.disabled", "class": "this.hostClasses" } }, queries: [{ propertyName: "icons", predicate: IconComponent }], exportAs: ["itButton"], ngImport: i0 });
461
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ButtonDirective, decorators: [{
462
- type: Directive,
463
- args: [{
464
- selector: '[itButton]',
465
- exportAs: 'itButton'
466
- }]
467
- }], ctorParameters: function () { return [{ type: ProgressButtonComponent, decorators: [{
468
- type: Optional
469
- }, {
470
- type: Host
471
- }] }]; }, propDecorators: { color: [{
472
- type: Input,
473
- args: ['itButton']
474
- }], size: [{
475
- type: Input
476
- }], block: [{
477
- type: Input
478
- }], disabled: [{
479
- type: Input
480
- }, {
481
- type: HostBinding,
482
- args: ['disabled']
483
- }], icons: [{
484
- type: ContentChildren,
485
- args: [IconComponent]
486
- }], onFocus: [{
487
- type: HostListener,
488
- args: ['focus']
489
- }], onBlur: [{
490
- type: HostListener,
491
- args: ['blur']
492
- }], hostClasses: [{
493
- type: HostBinding,
494
- args: ['class']
495
- }] } });
496
-
497
- /**
498
- * Callout
499
- * @description Callouts can be used to highlight certain parts of the text that require particular attention. They may contain error messages, warnings, hints, etc.
500
- */
501
- class CalloutComponent {
502
- constructor() {
503
- /**
504
- * Callout appearance
505
- * - <b>default</b>
506
- * - <b>highlight</b>: Callout version with border only on the left side
507
- * - <b>more</b>: It looks radically different from the other styles available and is suitable for more extensive texts
508
- * @default default
509
- */
510
- this.appearance = 'default';
511
- }
512
- get iconName() {
513
- if (this.icon) {
514
- return this.icon;
515
- }
516
- if (this.appearance === 'more') {
517
- return 'zoom-in';
518
- }
519
- switch (this.color) {
520
- case 'success':
521
- return 'check-circle';
522
- case 'warning':
523
- return 'help-circle';
524
- case 'danger':
525
- return 'close-circle';
526
- case 'important':
527
- case 'note':
528
- default:
529
- return 'info-circle';
530
- }
531
- }
532
- }
533
- CalloutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: CalloutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
534
- CalloutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: CalloutComponent, selector: "it-callout", inputs: { label: "label", hiddenLabel: "hiddenLabel", color: "color", appearance: "appearance", icon: "icon" }, ngImport: i0, template: "<div class=\"callout {{color}}\" [class.callout-highlight]=\"appearance === 'highlight'\"\n [class.callout-more]=\"appearance === 'more'\">\n\n <div *ngIf=\"appearance === 'default'; else inner\" class=\"callout-inner\">\n <ng-container *ngTemplateOutlet=\"inner\"></ng-container>\n </div>\n</div>\n\n<ng-template #inner>\n <div class=\"callout-title\" *ngIf=\"label\">\n <it-icon [name]=\"iconName\"></it-icon>\n <span *ngIf=\"hiddenLabel\" class=\"visually-hidden\">{{ hiddenLabel }}</span>\n <span class=\"text\">{{ label }}</span>\n </div>\n <p class=\"callout-big-text\">\n <ng-content select=\"[bigText]\"></ng-content>\n </p>\n <ng-content></ng-content>\n</ng-template>\n", styles: [".callout-big-text:empty{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "it-icon[name]", inputs: ["name", "size", "color", "padded", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
535
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: CalloutComponent, decorators: [{
536
- type: Component,
537
- args: [{ selector: 'it-callout', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"callout {{color}}\" [class.callout-highlight]=\"appearance === 'highlight'\"\n [class.callout-more]=\"appearance === 'more'\">\n\n <div *ngIf=\"appearance === 'default'; else inner\" class=\"callout-inner\">\n <ng-container *ngTemplateOutlet=\"inner\"></ng-container>\n </div>\n</div>\n\n<ng-template #inner>\n <div class=\"callout-title\" *ngIf=\"label\">\n <it-icon [name]=\"iconName\"></it-icon>\n <span *ngIf=\"hiddenLabel\" class=\"visually-hidden\">{{ hiddenLabel }}</span>\n <span class=\"text\">{{ label }}</span>\n </div>\n <p class=\"callout-big-text\">\n <ng-content select=\"[bigText]\"></ng-content>\n </p>\n <ng-content></ng-content>\n</ng-template>\n", styles: [".callout-big-text:empty{display:none}\n"] }]
538
- }], propDecorators: { label: [{
539
- type: Input
540
- }], hiddenLabel: [{
541
- type: Input
542
- }], color: [{
543
- type: Input
544
- }], appearance: [{
545
- type: Input
546
- }], icon: [{
547
- type: Input
548
- }] } });
549
-
550
- /**
551
- * Card
552
- * @description A container of texts and images with many options and variations.
553
- */
554
- class CardComponent extends AbstractComponent {
555
- constructor() {
556
- super(...arguments);
557
- /**
558
- * It serves to space the cards in their mobile version.
559
- * @default true
560
- */
561
- this.space = true;
562
- /**
563
- * Custom card class
564
- * @default ''
565
- */
566
- this.cardClass = '';
567
- /**
568
- * Custom card body class
569
- * @default ''
570
- */
571
- this.bodyClass = '';
572
- }
573
- get isSpace() {
574
- return isTrueBooleanInput(this.space);
575
- }
576
- get isTeaser() {
577
- return isTrueBooleanInput(this.teaser);
578
- }
579
- get isHasImage() {
580
- return isTrueBooleanInput(this.hasImage);
581
- }
582
- get isRounded() {
583
- return isTrueBooleanInput(this.rounded);
584
- }
585
- get isShadow() {
586
- return isTrueBooleanInput(this.shadow);
587
- }
588
- }
589
- CardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: CardComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
590
- CardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: CardComponent, selector: "it-card", inputs: { space: "space", teaser: "teaser", hasImage: "hasImage", rounded: "rounded", shadow: "shadow", cardClass: "cardClass", bodyClass: "bodyClass" }, usesInheritance: true, ngImport: i0, template: "<div class=\"card-wrapper\" [class.card-space]=\"isSpace\">\n <div class=\"card {{cardClass}}\"\n [class.card-teaser]=\"isTeaser\"\n [class.card-img.no-after]=\"isHasImage\"\n [class.shadow]=\"isShadow\"\n [class.rounded]=\"isRounded\">\n\n <ng-content select=\"[beforeBody]\"></ng-content>\n\n <div class=\"card-body {{bodyClass}}\">\n <ng-content></ng-content>\n </div>\n\n </div>\n</div>\n", styles: [".card-body:empty{display:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
591
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: CardComponent, decorators: [{
592
- type: Component,
593
- args: [{ selector: 'it-card', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"card-wrapper\" [class.card-space]=\"isSpace\">\n <div class=\"card {{cardClass}}\"\n [class.card-teaser]=\"isTeaser\"\n [class.card-img.no-after]=\"isHasImage\"\n [class.shadow]=\"isShadow\"\n [class.rounded]=\"isRounded\">\n\n <ng-content select=\"[beforeBody]\"></ng-content>\n\n <div class=\"card-body {{bodyClass}}\">\n <ng-content></ng-content>\n </div>\n\n </div>\n</div>\n", styles: [".card-body:empty{display:none}\n"] }]
594
- }], propDecorators: { space: [{
595
- type: Input
596
- }], teaser: [{
597
- type: Input
598
- }], hasImage: [{
599
- type: Input
600
- }], rounded: [{
601
- type: Input
602
- }], shadow: [{
603
- type: Input
604
- }], cardClass: [{
605
- type: Input
606
- }], bodyClass: [{
607
- type: Input
608
- }] } });
609
-
610
- /**
611
- * Carousel Item
612
- * @description element, image or text slide of carousel
613
- */
614
- class CarouselItemComponent extends AbstractComponent {
615
- }
616
- CarouselItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: CarouselItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
617
- CarouselItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: CarouselItemComponent, selector: "it-carousel-item", viewQueries: [{ propertyName: "htmlContent", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
618
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: CarouselItemComponent, decorators: [{
619
- type: Component,
620
- args: [{ selector: 'it-carousel-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n" }]
621
- }], propDecorators: { htmlContent: [{
622
- type: ViewChild,
623
- args: [TemplateRef]
624
- }] } });
625
-
626
- /**
627
- * Carousel
628
- * @description A presentation component for scrolling through elements, images or text slides.
629
- */
630
- class CarouselComponent {
631
- constructor(_changeDetectorRef) {
632
- this._changeDetectorRef = _changeDetectorRef;
633
- /**
634
- * The carousel type
635
- * @default default
636
- */
637
- this.type = 'default';
638
- /**
639
- * Custom class in splide__track element
640
- * @default ''
641
- */
642
- this.trackClass = '';
643
- }
644
- get typeClass() {
645
- const typeClass = 'it-carousel-landscape-abstract';
646
- return this.type === 'default' ? typeClass : typeClass + `-${this.type}`;
647
- }
648
- get isFullCarousel() {
649
- return isTrueBooleanInput(this.fullCarousel);
650
- }
651
- get isBigImg() {
652
- return isTrueBooleanInput(this.bigImg);
653
- }
654
- get isStandardImage() {
655
- return isTrueBooleanInput(this.standardImage);
656
- }
657
- get isLined() {
658
- return isTrueBooleanInput(this.lined);
659
- }
660
- ngAfterViewInit() {
661
- this.carousel = CarouselBI.getOrCreateInstance(this.carouselDiv.nativeElement);
662
- this.items?.changes.pipe(// When carousel items changes (dynamic add/remove)
663
- startWith(undefined)).subscribe(() => {
664
- this.itemSubscriptions?.forEach(sub => sub.unsubscribe()); // Remove old subscriptions
665
- this.itemSubscriptions = this.items?.map(item => item.valueChanges.subscribe(() => {
666
- this._changeDetectorRef.detectChanges(); // DetectChanges when carousel item attributes changes
667
- }));
668
- this._changeDetectorRef.detectChanges(); // Force update html render
669
- });
670
- }
671
- ngOnDestroy() {
672
- this.itemSubscriptions?.forEach(item => item.unsubscribe());
673
- }
674
- /**
675
- * Removes CarouselBI features
676
- */
677
- dispose() {
678
- this.carousel?.dispose();
679
- }
680
- }
681
- CarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: CarouselComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
682
- CarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: CarouselComponent, selector: "it-carousel", inputs: { title: "title", type: "type", trackClass: "trackClass", fullCarousel: "fullCarousel", bigImg: "bigImg", standardImage: "standardImage", lined: "lined" }, queries: [{ propertyName: "items", predicate: CarouselItemComponent }], viewQueries: [{ propertyName: "carouselDiv", first: true, predicate: ["carousel"], descendants: true }], exportAs: ["itCarousel"], ngImport: i0, template: "<div #carousel class=\"it-carousel-wrapper splide {{typeClass}}\"\n [class.it-full-carousel]=\"isFullCarousel\"\n [class.it-big-img]=\"isBigImg\"\n [class.it-standard-image]=\"isStandardImage\"\n data-bs-carousel-splide>\n\n <div class=\"it-header-block\" *ngIf=\"title\">\n <div class=\"it-header-block-title\">\n <h2>{{title}}</h2>\n </div>\n </div>\n\n <div class=\"splide__track {{trackClass}}\">\n <ul class=\"splide__list\">\n <li *ngFor=\"let item of items\" class=\"splide__slide\" [class.lined_slide]=\"isLined\">\n <div class=\"it-single-slide-wrapper\">\n <ng-container *ngTemplateOutlet=\"item.htmlContent\"></ng-container>\n </div>\n </li>\n </ul>\n </div>\n</div>\n", styles: [".splide__container{box-sizing:border-box;position:relative}.splide__list{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:flex;height:100%;margin:0!important;padding:0!important;transform-style:preserve-3d}.splide.is-initialized:not(.is-active) .splide__list{display:block}.splide__pagination{align-items:center;display:flex;flex-wrap:wrap;justify-content:center;margin:0;pointer-events:none}.splide__pagination li{display:inline-block;line-height:1;list-style-type:none;margin:0;pointer-events:auto}.splide__progress__bar{width:0}.splide{outline:none;position:relative;visibility:hidden}.splide.is-initialized,.splide.is-rendered{visibility:visible}.splide__slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;box-sizing:border-box;flex-shrink:0;list-style-type:none!important;margin:0;outline:none;position:relative}.splide__slide img{vertical-align:bottom}.splide__slider{position:relative}.splide__spinner{animation:splide-loading 1s linear infinite;border:2px solid #999;border-left-color:transparent;border-radius:50%;contain:strict;display:inline-block;height:20px;inset:0;margin:auto;position:absolute;width:20px}.splide__track{overflow:hidden;position:relative;z-index:0}@keyframes splide-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.splide--draggable>.splide__slider>.splide__track,.splide--draggable>.splide__track{-webkit-user-select:none;user-select:none}.splide--fade>.splide__slider>.splide__track>.splide__list,.splide--fade>.splide__track>.splide__list{display:block}.splide--fade>.splide__slider>.splide__track>.splide__list>.splide__slide,.splide--fade>.splide__track>.splide__list>.splide__slide{left:0;opacity:0;position:absolute;top:0;z-index:0}.splide--fade>.splide__slider>.splide__track>.splide__list>.splide__slide.is-active,.splide--fade>.splide__track>.splide__list>.splide__slide.is-active{opacity:1;position:relative;z-index:1}.splide--rtl{direction:rtl}.splide--ttb.is-active>.splide__slider>.splide__track>.splide__list,.splide--ttb.is-active>.splide__track>.splide__list{display:block}.splide__arrow{align-items:center;background:#ccc;border:0;border-radius:50%;cursor:pointer;display:flex;height:2em;justify-content:center;opacity:.7;padding:0;position:absolute;top:50%;transform:translateY(-50%);width:2em;z-index:1}.splide__arrow svg{fill:#000;height:1.2em;width:1.2em}.splide__arrow:hover{opacity:.9}.splide__arrow:focus{outline:none}.splide__arrow--prev{left:1em}.splide__arrow--prev svg{transform:scaleX(-1)}.splide__arrow--next{right:1em}.splide__pagination{bottom:.5em;left:0;padding:0 1em;position:absolute;right:0;z-index:1}.splide__pagination__page{background:#ccc;border:0;border-radius:50%;display:inline-block;height:8px;margin:3px;opacity:.7;padding:0;transition:transform .2s linear;width:8px}.splide__pagination__page.is-active{background:#fff;transform:scale(1.4)}.splide__pagination__page:hover{cursor:pointer;opacity:.9}.splide__pagination__page:focus{outline:none}.splide__progress__bar{background:#ccc;height:3px}.splide--nav>.splide__slider>.splide__track>.splide__list>.splide__slide,.splide--nav>.splide__track>.splide__list>.splide__slide{border:3px solid transparent;cursor:pointer}.splide--nav>.splide__slider>.splide__track>.splide__list>.splide__slide.is-active,.splide--nav>.splide__track>.splide__list>.splide__slide.is-active{border:3px solid #000}.splide--nav>.splide__slider>.splide__track>.splide__list>.splide__slide:focus,.splide--nav>.splide__track>.splide__list>.splide__slide:focus{outline:none}.splide--rtl>.splide__arrows .splide__arrow--prev,.splide--rtl>.splide__slider>.splide__track>.splide__arrows .splide__arrow--prev,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--prev{left:auto;right:1em}.splide--rtl>.splide__arrows .splide__arrow--prev svg,.splide--rtl>.splide__slider>.splide__track>.splide__arrows .splide__arrow--prev svg,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--prev svg{transform:scaleX(1)}.splide--rtl>.splide__arrows .splide__arrow--next,.splide--rtl>.splide__slider>.splide__track>.splide__arrows .splide__arrow--next,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--next{left:1em;right:auto}.splide--rtl>.splide__arrows .splide__arrow--next svg,.splide--rtl>.splide__slider>.splide__track>.splide__arrows .splide__arrow--next svg,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--next svg{transform:scaleX(-1)}.splide--ttb>.splide__arrows .splide__arrow,.splide--ttb>.splide__slider>.splide__track>.splide__arrows .splide__arrow,.splide--ttb>.splide__track>.splide__arrows .splide__arrow{left:50%;transform:translate(-50%)}.splide--ttb>.splide__arrows .splide__arrow--prev,.splide--ttb>.splide__slider>.splide__track>.splide__arrows .splide__arrow--prev,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--prev{top:1em}.splide--ttb>.splide__arrows .splide__arrow--prev svg,.splide--ttb>.splide__slider>.splide__track>.splide__arrows .splide__arrow--prev svg,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--prev svg{transform:rotate(-90deg)}.splide--ttb>.splide__arrows .splide__arrow--next,.splide--ttb>.splide__slider>.splide__track>.splide__arrows .splide__arrow--next,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--next{bottom:1em;top:auto}.splide--ttb>.splide__arrows .splide__arrow--next svg,.splide--ttb>.splide__slider>.splide__track>.splide__arrows .splide__arrow--next svg,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--next svg{transform:rotate(90deg)}.splide--ttb>.splide__pagination,.splide--ttb>.splide__slider>.splide__pagination{display:flex;flex-direction:column;inset:0 .5em 0 auto;padding:1em 0}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
683
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: CarouselComponent, decorators: [{
684
- type: Component,
685
- args: [{ selector: 'it-carousel', exportAs: 'itCarousel', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #carousel class=\"it-carousel-wrapper splide {{typeClass}}\"\n [class.it-full-carousel]=\"isFullCarousel\"\n [class.it-big-img]=\"isBigImg\"\n [class.it-standard-image]=\"isStandardImage\"\n data-bs-carousel-splide>\n\n <div class=\"it-header-block\" *ngIf=\"title\">\n <div class=\"it-header-block-title\">\n <h2>{{title}}</h2>\n </div>\n </div>\n\n <div class=\"splide__track {{trackClass}}\">\n <ul class=\"splide__list\">\n <li *ngFor=\"let item of items\" class=\"splide__slide\" [class.lined_slide]=\"isLined\">\n <div class=\"it-single-slide-wrapper\">\n <ng-container *ngTemplateOutlet=\"item.htmlContent\"></ng-container>\n </div>\n </li>\n </ul>\n </div>\n</div>\n", styles: [".splide__container{box-sizing:border-box;position:relative}.splide__list{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:flex;height:100%;margin:0!important;padding:0!important;transform-style:preserve-3d}.splide.is-initialized:not(.is-active) .splide__list{display:block}.splide__pagination{align-items:center;display:flex;flex-wrap:wrap;justify-content:center;margin:0;pointer-events:none}.splide__pagination li{display:inline-block;line-height:1;list-style-type:none;margin:0;pointer-events:auto}.splide__progress__bar{width:0}.splide{outline:none;position:relative;visibility:hidden}.splide.is-initialized,.splide.is-rendered{visibility:visible}.splide__slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;box-sizing:border-box;flex-shrink:0;list-style-type:none!important;margin:0;outline:none;position:relative}.splide__slide img{vertical-align:bottom}.splide__slider{position:relative}.splide__spinner{animation:splide-loading 1s linear infinite;border:2px solid #999;border-left-color:transparent;border-radius:50%;contain:strict;display:inline-block;height:20px;inset:0;margin:auto;position:absolute;width:20px}.splide__track{overflow:hidden;position:relative;z-index:0}@keyframes splide-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.splide--draggable>.splide__slider>.splide__track,.splide--draggable>.splide__track{-webkit-user-select:none;user-select:none}.splide--fade>.splide__slider>.splide__track>.splide__list,.splide--fade>.splide__track>.splide__list{display:block}.splide--fade>.splide__slider>.splide__track>.splide__list>.splide__slide,.splide--fade>.splide__track>.splide__list>.splide__slide{left:0;opacity:0;position:absolute;top:0;z-index:0}.splide--fade>.splide__slider>.splide__track>.splide__list>.splide__slide.is-active,.splide--fade>.splide__track>.splide__list>.splide__slide.is-active{opacity:1;position:relative;z-index:1}.splide--rtl{direction:rtl}.splide--ttb.is-active>.splide__slider>.splide__track>.splide__list,.splide--ttb.is-active>.splide__track>.splide__list{display:block}.splide__arrow{align-items:center;background:#ccc;border:0;border-radius:50%;cursor:pointer;display:flex;height:2em;justify-content:center;opacity:.7;padding:0;position:absolute;top:50%;transform:translateY(-50%);width:2em;z-index:1}.splide__arrow svg{fill:#000;height:1.2em;width:1.2em}.splide__arrow:hover{opacity:.9}.splide__arrow:focus{outline:none}.splide__arrow--prev{left:1em}.splide__arrow--prev svg{transform:scaleX(-1)}.splide__arrow--next{right:1em}.splide__pagination{bottom:.5em;left:0;padding:0 1em;position:absolute;right:0;z-index:1}.splide__pagination__page{background:#ccc;border:0;border-radius:50%;display:inline-block;height:8px;margin:3px;opacity:.7;padding:0;transition:transform .2s linear;width:8px}.splide__pagination__page.is-active{background:#fff;transform:scale(1.4)}.splide__pagination__page:hover{cursor:pointer;opacity:.9}.splide__pagination__page:focus{outline:none}.splide__progress__bar{background:#ccc;height:3px}.splide--nav>.splide__slider>.splide__track>.splide__list>.splide__slide,.splide--nav>.splide__track>.splide__list>.splide__slide{border:3px solid transparent;cursor:pointer}.splide--nav>.splide__slider>.splide__track>.splide__list>.splide__slide.is-active,.splide--nav>.splide__track>.splide__list>.splide__slide.is-active{border:3px solid #000}.splide--nav>.splide__slider>.splide__track>.splide__list>.splide__slide:focus,.splide--nav>.splide__track>.splide__list>.splide__slide:focus{outline:none}.splide--rtl>.splide__arrows .splide__arrow--prev,.splide--rtl>.splide__slider>.splide__track>.splide__arrows .splide__arrow--prev,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--prev{left:auto;right:1em}.splide--rtl>.splide__arrows .splide__arrow--prev svg,.splide--rtl>.splide__slider>.splide__track>.splide__arrows .splide__arrow--prev svg,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--prev svg{transform:scaleX(1)}.splide--rtl>.splide__arrows .splide__arrow--next,.splide--rtl>.splide__slider>.splide__track>.splide__arrows .splide__arrow--next,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--next{left:1em;right:auto}.splide--rtl>.splide__arrows .splide__arrow--next svg,.splide--rtl>.splide__slider>.splide__track>.splide__arrows .splide__arrow--next svg,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--next svg{transform:scaleX(-1)}.splide--ttb>.splide__arrows .splide__arrow,.splide--ttb>.splide__slider>.splide__track>.splide__arrows .splide__arrow,.splide--ttb>.splide__track>.splide__arrows .splide__arrow{left:50%;transform:translate(-50%)}.splide--ttb>.splide__arrows .splide__arrow--prev,.splide--ttb>.splide__slider>.splide__track>.splide__arrows .splide__arrow--prev,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--prev{top:1em}.splide--ttb>.splide__arrows .splide__arrow--prev svg,.splide--ttb>.splide__slider>.splide__track>.splide__arrows .splide__arrow--prev svg,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--prev svg{transform:rotate(-90deg)}.splide--ttb>.splide__arrows .splide__arrow--next,.splide--ttb>.splide__slider>.splide__track>.splide__arrows .splide__arrow--next,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--next{bottom:1em;top:auto}.splide--ttb>.splide__arrows .splide__arrow--next svg,.splide--ttb>.splide__slider>.splide__track>.splide__arrows .splide__arrow--next svg,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--next svg{transform:rotate(90deg)}.splide--ttb>.splide__pagination,.splide--ttb>.splide__slider>.splide__pagination{display:flex;flex-direction:column;inset:0 .5em 0 auto;padding:1em 0}\n"] }]
686
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { title: [{
687
- type: Input
688
- }], type: [{
689
- type: Input
690
- }], trackClass: [{
691
- type: Input
692
- }], fullCarousel: [{
693
- type: Input
694
- }], bigImg: [{
695
- type: Input
696
- }], standardImage: [{
697
- type: Input
698
- }], lined: [{
699
- type: Input
700
- }], items: [{
701
- type: ContentChildren,
702
- args: [CarouselItemComponent]
703
- }], carouselDiv: [{
704
- type: ViewChild,
705
- args: ['carousel']
706
- }] } });
707
-
708
- class LinkComponent extends AbstractComponent {
709
- constructor() {
710
- super(...arguments);
711
- /**
712
- * Custom class
713
- */
714
- this.class = '';
715
- }
716
- get isExternalLink() {
717
- return isTrueBooleanInput(this.externalLink);
718
- }
719
- get isDisabled() {
720
- return isTrueBooleanInput(this.disabled);
721
- }
722
- ngAfterViewInit() {
723
- super.ngAfterViewInit();
724
- this._renderer.removeAttribute(this._elementRef.nativeElement, 'class');
725
- }
726
- }
727
- LinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: LinkComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
728
- LinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: LinkComponent, selector: "it-link", inputs: { href: "href", externalLink: "externalLink", disabled: "disabled", class: "class" }, usesInheritance: true, ngImport: i0, template: "<a *ngIf=\"!isExternalLink; else externalLink\" [id]=\"id\" [class]=\"class\" [routerLink]=\"isDisabled ? null : href\">\n <ng-container *ngTemplateOutlet=\"linkContent\"></ng-container>\n</a>\n<ng-template #externalLink>\n <a [id]=\"id\" [class]=\"class\" [attr.href]=\"isDisabled ? null : href\">\n <ng-container *ngTemplateOutlet=\"linkContent\"></ng-container>\n </a>\n</ng-template>\n\n<ng-template #linkContent>\n <ng-content></ng-content>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
729
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: LinkComponent, decorators: [{
730
- type: Component,
731
- args: [{ selector: 'it-link', changeDetection: ChangeDetectionStrategy.OnPush, template: "<a *ngIf=\"!isExternalLink; else externalLink\" [id]=\"id\" [class]=\"class\" [routerLink]=\"isDisabled ? null : href\">\n <ng-container *ngTemplateOutlet=\"linkContent\"></ng-container>\n</a>\n<ng-template #externalLink>\n <a [id]=\"id\" [class]=\"class\" [attr.href]=\"isDisabled ? null : href\">\n <ng-container *ngTemplateOutlet=\"linkContent\"></ng-container>\n </a>\n</ng-template>\n\n<ng-template #linkContent>\n <ng-content></ng-content>\n</ng-template>\n" }]
732
- }], propDecorators: { href: [{
733
- type: Input
734
- }], externalLink: [{
735
- type: Input
736
- }], disabled: [{
737
- type: Input
738
- }], class: [{
739
- type: Input
740
- }] } });
741
-
742
- class DropdownItemComponent extends LinkComponent {
743
- constructor() {
744
- super(...arguments);
745
- /**
746
- * The icon position
747
- * @default right
748
- */
749
- this.iconPosition = 'right';
750
- /**
751
- * Change icon color if menu is dark
752
- * @default false
753
- */
754
- this.isDark = false;
755
- }
756
- get isDivider() {
757
- return isTrueBooleanInput(this.divider);
758
- }
759
- get isActive() {
760
- return isTrueBooleanInput(this.active);
761
- }
762
- get isLarge() {
763
- return isTrueBooleanInput(this.large);
764
- }
765
- get linkClass() {
766
- let linkClass = `list-item ${this.isActive ? 'active' : 'dropdown-item'}`;
767
- if (this.isDisabled) {
768
- linkClass += ' disabled';
769
- }
770
- if (this.isLarge) {
771
- linkClass += ' large';
772
- }
773
- if (this.iconName) {
774
- linkClass += ` ${this.iconPosition === 'right' ? 'right-icon' : 'left-icon'}`;
775
- }
776
- return linkClass;
777
- }
778
- setDark(dark) {
779
- if (this.isDark !== dark) {
780
- this.isDark = dark;
781
- this._changeDetectorRef.detectChanges();
782
- }
783
- }
784
- }
785
- DropdownItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: DropdownItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
786
- DropdownItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: DropdownItemComponent, selector: "it-dropdown-item", inputs: { divider: "divider", active: "active", large: "large", iconName: "iconName", iconPosition: "iconPosition" }, usesInheritance: true, ngImport: i0, template: "<li>\n <span *ngIf=\"isDivider; else item\" class=\"divider\"></span>\n\n <ng-template #item>\n <it-link [class]=\"linkClass\" [id]=\"id\" [href]=\"href\" [externalLink]=\"externalLink\" [disabled]=\"disabled\">\n <it-icon *ngIf=\"iconName && iconPosition === 'left'\"\n size=\"sm\"\n [name]=\"iconName\"\n [color]=\"isDark ? 'light' : 'primary'\"\n [svgClass]=\"iconPosition\"></it-icon>\n\n <span><ng-content></ng-content></span>\n\n <it-icon *ngIf=\"iconName && iconPosition === 'right'\"\n size=\"sm\"\n [name]=\"iconName\"\n [color]=\"isDark ? 'light' : 'primary'\"\n [svgClass]=\"iconPosition\"></it-icon>\n\n <span *ngIf=\"isActive\" class=\"visually-hidden\">{{'it.core.active'|translate}}</span>\n </it-link>\n </ng-template>\n</li>\n", styles: [".list-item.disabled{pointer-events:none;cursor:default}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LinkComponent, selector: "it-link", inputs: ["href", "externalLink", "disabled", "class"] }, { kind: "component", type: IconComponent, selector: "it-icon[name]", inputs: ["name", "size", "color", "padded", "svgClass"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
787
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: DropdownItemComponent, decorators: [{
788
- type: Component,
789
- args: [{ selector: 'it-dropdown-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<li>\n <span *ngIf=\"isDivider; else item\" class=\"divider\"></span>\n\n <ng-template #item>\n <it-link [class]=\"linkClass\" [id]=\"id\" [href]=\"href\" [externalLink]=\"externalLink\" [disabled]=\"disabled\">\n <it-icon *ngIf=\"iconName && iconPosition === 'left'\"\n size=\"sm\"\n [name]=\"iconName\"\n [color]=\"isDark ? 'light' : 'primary'\"\n [svgClass]=\"iconPosition\"></it-icon>\n\n <span><ng-content></ng-content></span>\n\n <it-icon *ngIf=\"iconName && iconPosition === 'right'\"\n size=\"sm\"\n [name]=\"iconName\"\n [color]=\"isDark ? 'light' : 'primary'\"\n [svgClass]=\"iconPosition\"></it-icon>\n\n <span *ngIf=\"isActive\" class=\"visually-hidden\">{{'it.core.active'|translate}}</span>\n </it-link>\n </ng-template>\n</li>\n", styles: [".list-item.disabled{pointer-events:none;cursor:default}\n"] }]
790
- }], propDecorators: { divider: [{
791
- type: Input
792
- }], active: [{
793
- type: Input
794
- }], large: [{
795
- type: Input
796
- }], iconName: [{
797
- type: Input
798
- }], iconPosition: [{
799
- type: Input
800
- }] } });
801
-
802
- class DropdownComponent extends AbstractComponent {
803
- constructor() {
804
- super(...arguments);
805
- /**
806
- * Fires immediately when the show instance method is called.
807
- */
808
- this.showEvent = new EventEmitter();
809
- /**
810
- * Fired when the dropdown has been made visible to the user and CSS transitions have completed.
811
- */
812
- this.shownEvent = new EventEmitter();
813
- /**
814
- * Fires immediately when the hide instance method has been called.
815
- */
816
- this.hideEvent = new EventEmitter();
817
- /**
818
- * Fired when the dropdown has finished being hidden from the user and CSS transitions have completed.
819
- */
820
- this.hiddenEvent = new EventEmitter();
821
- }
822
- get buttonClass() {
823
- let btnClass = 'btn dropdown-toggle';
824
- if (this.color) {
825
- btnClass += ` btn-${this.color}`;
826
- }
827
- else {
828
- btnClass += ` btn-dropdown`;
829
- }
830
- return btnClass;
831
- }
832
- get isFullWidth() {
833
- return isTrueBooleanInput(this.fullWidth);
834
- }
835
- get isDark() {
836
- return isTrueBooleanInput(this.dark);
837
- }
838
- ngOnChanges(changes) {
839
- if (changes['dark'] && !changes['dark'].firstChange) {
840
- this.setDarkItems();
841
- }
842
- super.ngOnChanges(changes);
843
- }
844
- ngAfterViewInit() {
845
- super.ngAfterViewInit();
846
- this.setDarkItems();
847
- if (this.dropdownButton) {
848
- const element = this.dropdownButton.nativeElement;
849
- this.dropdown = Dropdown.getOrCreateInstance(element);
850
- element.addEventListener('show.bs.dropdown', event => this.showEvent.emit(event));
851
- element.addEventListener('shown.bs.dropdown', event => this.shownEvent.emit(event));
852
- element.addEventListener('hide.bs.dropdown', event => this.hideEvent.emit(event));
853
- element.addEventListener('hidden.bs.dropdown', event => this.hiddenEvent.emit(event));
854
- }
855
- }
856
- /**
857
- * Set child items dark mode
858
- * @private
859
- */
860
- setDarkItems() {
861
- this.items?.forEach(item => {
862
- item.setDark(this.isDark);
863
- });
864
- }
865
- /**
866
- * Toggles the dropdown menu of a given navbar or tabbed navigation.
867
- */
868
- toggle() {
869
- this.dropdown?.toggle();
870
- }
871
- /**
872
- * Shows the dropdown menu of a given navbar or tabbed navigation.
873
- */
874
- show() {
875
- this.dropdown?.show();
876
- }
877
- /**
878
- * Hides the dropdown menu of a given navbar or tabbed navigation.
879
- */
880
- hide() {
881
- this.dropdown?.hide();
882
- }
883
- /**
884
- * Updates the position of an element's dropdown.
885
- */
886
- update() {
887
- this.dropdown?.update();
888
- }
889
- /**
890
- * Destroys an element's dropdown. (Removes stored data on the DOM element)
891
- */
892
- dispose() {
893
- this.dropdown?.dispose();
894
- }
895
- }
896
- DropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: DropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
897
- DropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: DropdownComponent, selector: "it-dropdown", inputs: { color: "color", direction: "direction", fullWidth: "fullWidth", dark: "dark" }, outputs: { showEvent: "showEvent", shownEvent: "shownEvent", hideEvent: "hideEvent", hiddenEvent: "hiddenEvent" }, queries: [{ propertyName: "items", predicate: DropdownItemComponent }], viewQueries: [{ propertyName: "dropdownButton", first: true, predicate: ["dropdownButton"], descendants: true }], exportAs: ["itDropdown"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"dropdown {{direction}}\">\n <button #dropdownButton [id]=\"id\"\n [class]=\"buttonClass\"\n type=\"button\"\n data-bs-toggle=\"dropdown\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\">\n <ng-content select=\"[button]\"></ng-content>\n <it-icon svgClass=\"icon-expand\" name=\"expand\" size=\"sm\" [color]=\"this.color ? 'light' : 'primary'\"></it-icon>\n </button>\n\n <div class=\"dropdown-menu\" [class.full-width]=\"isFullWidth\" [class.dark]=\"isDark\" [attr.aria-labelledby]=\"id\">\n <div class=\"link-list-wrapper\">\n <div class=\"link-list-heading\">\n <ng-content select=\"[listHeading]\"></ng-content>\n </div>\n <ul class=\"link-list\">\n <ng-content select=\"[list]\"></ng-content>\n </ul>\n </div>\n </div>\n</div>\n", styles: [".link-list-heading:empty{display:none}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "it-icon[name]", inputs: ["name", "size", "color", "padded", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
898
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: DropdownComponent, decorators: [{
899
- type: Component,
900
- args: [{ selector: 'it-dropdown', exportAs: 'itDropdown', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"dropdown {{direction}}\">\n <button #dropdownButton [id]=\"id\"\n [class]=\"buttonClass\"\n type=\"button\"\n data-bs-toggle=\"dropdown\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\">\n <ng-content select=\"[button]\"></ng-content>\n <it-icon svgClass=\"icon-expand\" name=\"expand\" size=\"sm\" [color]=\"this.color ? 'light' : 'primary'\"></it-icon>\n </button>\n\n <div class=\"dropdown-menu\" [class.full-width]=\"isFullWidth\" [class.dark]=\"isDark\" [attr.aria-labelledby]=\"id\">\n <div class=\"link-list-wrapper\">\n <div class=\"link-list-heading\">\n <ng-content select=\"[listHeading]\"></ng-content>\n </div>\n <ul class=\"link-list\">\n <ng-content select=\"[list]\"></ng-content>\n </ul>\n </div>\n </div>\n</div>\n", styles: [".link-list-heading:empty{display:none}\n"] }]
901
- }], propDecorators: { color: [{
902
- type: Input
903
- }], direction: [{
904
- type: Input
905
- }], fullWidth: [{
906
- type: Input
907
- }], dark: [{
908
- type: Input
909
- }], items: [{
910
- type: ContentChildren,
911
- args: [DropdownItemComponent]
912
- }], showEvent: [{
913
- type: Output
914
- }], shownEvent: [{
915
- type: Output
916
- }], hideEvent: [{
917
- type: Output
918
- }], hiddenEvent: [{
919
- type: Output
920
- }], dropdownButton: [{
921
- type: ViewChild,
922
- args: ['dropdownButton']
923
- }] } });
924
-
925
- class ListComponent {
926
- get isLinkList() {
927
- return isTrueBooleanInput(this.linkList);
928
- }
929
- }
930
- ListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
931
- ListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: ListComponent, selector: "it-list", inputs: { linkList: "linkList" }, ngImport: i0, template: "<div [class]=\"isLinkList? 'link-list-wrapper' : 'it-list-wrapper'\">\n <ul [class]=\"isLinkList? 'link-list' : 'it-list'\">\n <ng-content></ng-content>\n </ul>\n</div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
932
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ListComponent, decorators: [{
933
- type: Component,
934
- args: [{ selector: 'it-list', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"isLinkList? 'link-list-wrapper' : 'it-list-wrapper'\">\n <ul [class]=\"isLinkList? 'link-list' : 'it-list'\">\n <ng-content></ng-content>\n </ul>\n</div>\n" }]
935
- }], propDecorators: { linkList: [{
936
- type: Input
937
- }] } });
938
-
939
- class ListItemComponent extends LinkComponent {
940
- get itemClass() {
941
- let itemClass = 'list-item';
942
- if (isTrueBooleanInput(this.active)) {
943
- itemClass += ` active`;
944
- }
945
- if (isTrueBooleanInput(this.large)) {
946
- itemClass += ` large`;
947
- }
948
- if (isTrueBooleanInput(this.iconLeft)) {
949
- itemClass += ` icon-left`;
950
- }
951
- if (this.class) {
952
- itemClass += ` ${this.class}`;
953
- }
954
- return itemClass;
955
- }
956
- }
957
- ListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ListItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
958
- ListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: ListItemComponent, selector: "it-list-item", inputs: { active: "active", large: "large", iconLeft: "iconLeft", avatar: "avatar", image: "image" }, usesInheritance: true, ngImport: i0, template: "<li>\n <ng-template #content>\n <div class=\"it-rounded-icon\">\n <ng-content select=\"[icon]\"></ng-content>\n </div>\n\n <div *ngIf=\"avatar\" class=\"avatar size-lg\">\n <img [attr.src]=\"avatar\" alt=\"avatar\">\n </div>\n\n <div *ngIf=\"image\" class=\"it-thumb\">\n <img [attr.src]=\"image\" alt=\"thumb\">\n </div>\n\n <div class=\"it-right-zone\">\n <span class=\"text\">\n <ng-content></ng-content>\n </span>\n <ng-content select=\"[action]\"></ng-content>\n\n <span class=\"it-multiple\">\n <span class=\"metadata\">\n <ng-content select=\"[metadata]\"></ng-content>\n </span>\n\n <ng-content select=\"[multiple]\"></ng-content>\n </span>\n </div>\n </ng-template>\n\n\n <div *ngIf=\"!href; else link\" [class]=\"itemClass\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n\n <ng-template #link>\n <it-link [class]=\"itemClass\" [href]=\"href\" [externalLink]=\"externalLink\" [disabled]=\"disabled\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </it-link>\n </ng-template>\n</li>\n", styles: [".metadata:empty,.it-rounded-icon:empty{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LinkComponent, selector: "it-link", inputs: ["href", "externalLink", "disabled", "class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
959
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ListItemComponent, decorators: [{
960
- type: Component,
961
- args: [{ selector: 'it-list-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<li>\n <ng-template #content>\n <div class=\"it-rounded-icon\">\n <ng-content select=\"[icon]\"></ng-content>\n </div>\n\n <div *ngIf=\"avatar\" class=\"avatar size-lg\">\n <img [attr.src]=\"avatar\" alt=\"avatar\">\n </div>\n\n <div *ngIf=\"image\" class=\"it-thumb\">\n <img [attr.src]=\"image\" alt=\"thumb\">\n </div>\n\n <div class=\"it-right-zone\">\n <span class=\"text\">\n <ng-content></ng-content>\n </span>\n <ng-content select=\"[action]\"></ng-content>\n\n <span class=\"it-multiple\">\n <span class=\"metadata\">\n <ng-content select=\"[metadata]\"></ng-content>\n </span>\n\n <ng-content select=\"[multiple]\"></ng-content>\n </span>\n </div>\n </ng-template>\n\n\n <div *ngIf=\"!href; else link\" [class]=\"itemClass\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n\n <ng-template #link>\n <it-link [class]=\"itemClass\" [href]=\"href\" [externalLink]=\"externalLink\" [disabled]=\"disabled\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </it-link>\n </ng-template>\n</li>\n", styles: [".metadata:empty,.it-rounded-icon:empty{display:none}\n"] }]
962
- }], propDecorators: { active: [{
963
- type: Input
964
- }], large: [{
965
- type: Input
966
- }], iconLeft: [{
967
- type: Input
968
- }], avatar: [{
969
- type: Input
970
- }], image: [{
971
- type: Input
972
- }] } });
973
-
974
- /**
975
- * Modal windows
976
- * @description To show featured content, notifications to users, or personalized content.
977
- */
978
- class ModalComponent extends AbstractComponent {
979
- constructor() {
980
- super(...arguments);
981
- /**
982
- * Show/Hide close button on header
983
- * @default true
984
- */
985
- this.closeButton = true;
986
- /**
987
- * To have modals that appear with fades
988
- * @default true
989
- */
990
- this.fade = true;
991
- /**
992
- * This event fires immediately when the instance method show is called.
993
- */
994
- this.showEvent = new EventEmitter();
995
- /**
996
- * This event fires when the modal has been made visible to the user (it will wait for CSS transitions to complete).
997
- */
998
- this.shownEvent = new EventEmitter();
999
- /**
1000
- * This event is raised immediately when the instance method hide has been called.
1001
- */
1002
- this.hideEvent = new EventEmitter();
1003
- /**
1004
- * This event fires when the modal has finished hiding from the user (it will wait for CSS transitions to complete).
1005
- */
1006
- this.hiddenEvent = new EventEmitter();
1007
- /**
1008
- * This event is fired when the modal is displayed, its background is static and a click outside the modal or a press
1009
- * of the esc key occurs and data-bs-keyboard is set to false.
1010
- */
1011
- this.hidePreventedEvent = new EventEmitter();
1012
- }
1013
- ngAfterViewInit() {
1014
- super.ngAfterViewInit();
1015
- this._renderer.removeAttribute(this._elementRef.nativeElement, 'title');
1016
- if (this.modalElement) {
1017
- const element = this.modalElement.nativeElement;
1018
- this.modal = Modal.getOrCreateInstance(element);
1019
- element.addEventListener('show.bs.modal', event => this.showEvent.emit(event));
1020
- element.addEventListener('shown.bs.modal', event => this.shownEvent.emit(event));
1021
- element.addEventListener('hide.bs.modal', event => this.hideEvent.emit(event));
1022
- element.addEventListener('hidden.bs.modal', event => this.hiddenEvent.emit(event));
1023
- element.addEventListener('hidePrevented.bs.modal', event => this.hidePreventedEvent.emit(event));
1024
- }
1025
- }
1026
- get isCloseButton() {
1027
- return isTrueBooleanInput(this.closeButton);
1028
- }
1029
- get isFooterShadow() {
1030
- return isTrueBooleanInput(this.footerShadow);
1031
- }
1032
- get modalClass() {
1033
- let modalClass = 'modal';
1034
- if (isTrueBooleanInput(this.fade)) {
1035
- modalClass += ` fade`;
1036
- }
1037
- if (isTrueBooleanInput(this.alertModal)) {
1038
- modalClass += ` alert-modal`;
1039
- }
1040
- if (isTrueBooleanInput(this.dialogLinkList)) {
1041
- modalClass += ` it-dialog-link-list`;
1042
- }
1043
- if (isTrueBooleanInput(this.popconfirm)) {
1044
- modalClass += ` popconfirm-modal`;
1045
- }
1046
- if (isTrueBooleanInput(this.scrollable)) {
1047
- modalClass += ` it-dialog-scrollable`;
1048
- }
1049
- return modalClass;
1050
- }
1051
- get dialogClass() {
1052
- let dialogClass = 'modal-dialog';
1053
- if (this.alignment) {
1054
- dialogClass += ` modal-dialog-${this.alignment}`;
1055
- }
1056
- if (this.size) {
1057
- dialogClass += ` modal-${this.size}`;
1058
- }
1059
- return dialogClass;
1060
- }
1061
- /**
1062
- * Manually activate/deactivate a modal. Returns to the caller before the modal has actually been shown or hidden
1063
- */
1064
- toggle() {
1065
- this.modal?.toggle();
1066
- }
1067
- /**
1068
- * Manually open a modal. Returns to the caller before the modal has actually been displayed
1069
- */
1070
- show() {
1071
- this.modal?.show();
1072
- }
1073
- /**
1074
- * Manually hide a modal. Returns to the caller before the modal has actually been hidden
1075
- */
1076
- hide() {
1077
- this.modal?.hide();
1078
- }
1079
- /**
1080
- * Manually reposition the modal if the height of the modal changes when it is opened (in case a scroll bar appears).
1081
- */
1082
- handleUpdate() {
1083
- this.modal?.handleUpdate();
1084
- }
1085
- /**
1086
- * Destroys the modal of an element.
1087
- */
1088
- dispose() {
1089
- this.modal?.dispose();
1090
- }
1091
- }
1092
- ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ModalComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1093
- ModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: ModalComponent, selector: "it-modal", inputs: { closeButton: "closeButton", alertModal: "alertModal", dialogLinkList: "dialogLinkList", popconfirm: "popconfirm", scrollable: "scrollable", fade: "fade", alignment: "alignment", size: "size", footerShadow: "footerShadow" }, outputs: { showEvent: "showEvent", shownEvent: "shownEvent", hideEvent: "hideEvent", hiddenEvent: "hiddenEvent", hidePreventedEvent: "hidePreventedEvent" }, viewQueries: [{ propertyName: "modalElement", first: true, predicate: ["modalElement"], descendants: true }], exportAs: ["itModal"], usesInheritance: true, ngImport: i0, template: "<div #modalElement [id]=\"id\"\n [class]=\"modalClass\"\n tabindex=\"-1\"\n role=\"dialog\"\n aria-hidden=\"true\"\n [attr.aria-labelledby]=\"id+'-title'\"\n [attr.aria-describedby]=\"id+'-description'\">\n\n <div [class]=\"dialogClass\">\n <div class=\"modal-content\" role=\"document\">\n <div class=\"modal-header\">\n <ng-content select=\"[beforeTitle]\"></ng-content>\n\n <h2 class=\"modal-title h5\" id=\"{{id}}-title\">\n <ng-content select=\"[modalTitle]\"></ng-content>\n </h2>\n\n <button *ngIf=\"isCloseButton\" type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\"\n [attr.aria-label]=\"'it.core.close-modal'|translate\"></button>\n </div>\n\n <div class=\"modal-body\">\n <div id=\"{{id}}-description\">\n <ng-content select=\"[description]\"></ng-content>\n </div>\n <ng-content></ng-content>\n </div>\n\n <div class=\"modal-footer\" [class.modal-footer-shadow]=\"isFooterShadow\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </div>\n </div>\n\n</div>\n", styles: [".modal-footer:empty{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1094
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ModalComponent, decorators: [{
1095
- type: Component,
1096
- args: [{ selector: 'it-modal', exportAs: 'itModal', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #modalElement [id]=\"id\"\n [class]=\"modalClass\"\n tabindex=\"-1\"\n role=\"dialog\"\n aria-hidden=\"true\"\n [attr.aria-labelledby]=\"id+'-title'\"\n [attr.aria-describedby]=\"id+'-description'\">\n\n <div [class]=\"dialogClass\">\n <div class=\"modal-content\" role=\"document\">\n <div class=\"modal-header\">\n <ng-content select=\"[beforeTitle]\"></ng-content>\n\n <h2 class=\"modal-title h5\" id=\"{{id}}-title\">\n <ng-content select=\"[modalTitle]\"></ng-content>\n </h2>\n\n <button *ngIf=\"isCloseButton\" type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\"\n [attr.aria-label]=\"'it.core.close-modal'|translate\"></button>\n </div>\n\n <div class=\"modal-body\">\n <div id=\"{{id}}-description\">\n <ng-content select=\"[description]\"></ng-content>\n </div>\n <ng-content></ng-content>\n </div>\n\n <div class=\"modal-footer\" [class.modal-footer-shadow]=\"isFooterShadow\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </div>\n </div>\n\n</div>\n", styles: [".modal-footer:empty{display:none}\n"] }]
1097
- }], propDecorators: { closeButton: [{
1098
- type: Input
1099
- }], alertModal: [{
1100
- type: Input
1101
- }], dialogLinkList: [{
1102
- type: Input
1103
- }], popconfirm: [{
1104
- type: Input
1105
- }], scrollable: [{
1106
- type: Input
1107
- }], fade: [{
1108
- type: Input
1109
- }], alignment: [{
1110
- type: Input
1111
- }], size: [{
1112
- type: Input
1113
- }], footerShadow: [{
1114
- type: Input
1115
- }], showEvent: [{
1116
- type: Output
1117
- }], shownEvent: [{
1118
- type: Output
1119
- }], hideEvent: [{
1120
- type: Output
1121
- }], hiddenEvent: [{
1122
- type: Output
1123
- }], hidePreventedEvent: [{
1124
- type: Output
1125
- }], modalElement: [{
1126
- type: ViewChild,
1127
- args: ['modalElement', { static: false }]
1128
- }] } });
1129
-
1130
- var NotificationType;
1131
- (function (NotificationType) {
1132
- NotificationType["Standard"] = "standard";
1133
- NotificationType["Success"] = "success";
1134
- NotificationType["Error"] = "error";
1135
- NotificationType["Info"] = "info";
1136
- NotificationType["Warning"] = "warning";
1137
- })(NotificationType || (NotificationType = {}));
1138
- var NotificationPosition;
1139
- (function (NotificationPosition) {
1140
- NotificationPosition["Top"] = "top-fix mt-3";
1141
- NotificationPosition["Bottom"] = "bottom-fix mb-3";
1142
- NotificationPosition["Left"] = "left-fix ms-3";
1143
- NotificationPosition["Right"] = "right-fix me-3";
1144
- })(NotificationPosition || (NotificationPosition = {}));
1145
-
1146
- class NotificationsService {
1147
- constructor() {
1148
- this.subject = new Subject();
1149
- }
1150
- /**
1151
- * Listen on notification arrived
1152
- * @param filterType filter type of notification
1153
- */
1154
- onNotification(filterType) {
1155
- return this.subject.asObservable().pipe(filter(n => n && (!filterType || (n.type === filterType))));
1156
- }
1157
- /**
1158
- * Show new notification
1159
- * @param notification notification
1160
- */
1161
- addNotification(notification) {
1162
- this.subject.next(notification);
1163
- }
1164
- /**
1165
- * Create new Standard notification
1166
- * @param title notification title
1167
- * @param message notification message
1168
- * @param dismissible notification dismissible
1169
- * @param duration notification duration (milliseconds)
1170
- * @param position notification position
1171
- */
1172
- standard(title, message, dismissible, duration, position) {
1173
- this.addNotification({
1174
- type: NotificationType.Standard,
1175
- message,
1176
- title,
1177
- duration,
1178
- dismissible,
1179
- position
1180
- });
1181
- }
1182
- /**
1183
- * Create new Success notification
1184
- * @param title notification title
1185
- * @param message notification message
1186
- * @param dismissible notification dismissible
1187
- * @param duration notification duration (milliseconds)
1188
- * @param position notification position
1189
- */
1190
- success(title, message, dismissible, duration, position) {
1191
- this.addNotification({
1192
- type: NotificationType.Success,
1193
- message,
1194
- title,
1195
- duration,
1196
- dismissible,
1197
- position
1198
- });
1199
- }
1200
- /**
1201
- * Create new Error notification
1202
- * @param title notification title
1203
- * @param message notification message
1204
- * @param dismissible notification dismissible
1205
- * @param duration notification duration (milliseconds)
1206
- * @param position notification position
1207
- */
1208
- error(title, message, dismissible, duration, position) {
1209
- this.addNotification({
1210
- type: NotificationType.Error,
1211
- message,
1212
- title,
1213
- duration,
1214
- dismissible,
1215
- position
1216
- });
1217
- }
1218
- /**
1219
- * Create new Warning notification
1220
- * @param title notification title
1221
- * @param message notification message
1222
- * @param dismissible notification dismissible
1223
- * @param duration notification duration (milliseconds)
1224
- * @param position notification position
1225
- */
1226
- warning(title, message, dismissible, duration, position) {
1227
- this.addNotification({
1228
- type: NotificationType.Warning,
1229
- message,
1230
- title,
1231
- duration,
1232
- dismissible,
1233
- position
1234
- });
1235
- }
1236
- /**
1237
- * Create new Info notification
1238
- * @param title notification title
1239
- * @param message notification message
1240
- * @param dismissible notification dismissible
1241
- * @param duration notification duration (milliseconds)
1242
- * @param position notification position
1243
- */
1244
- info(title, message, dismissible, duration, position) {
1245
- this.addNotification({
1246
- type: NotificationType.Info,
1247
- message,
1248
- title,
1249
- duration,
1250
- dismissible,
1251
- position
1252
- });
1253
- }
1254
- }
1255
- NotificationsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: NotificationsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1256
- NotificationsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: NotificationsService, providedIn: 'root' });
1257
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: NotificationsService, decorators: [{
1258
- type: Injectable,
1259
- args: [{ providedIn: 'root' }]
1260
- }] });
1261
-
1262
- class NotificationsComponent {
1263
- constructor(_changeDetectorRef, _notificationService) {
1264
- this._changeDetectorRef = _changeDetectorRef;
1265
- this._notificationService = _notificationService;
1266
- /**
1267
- * Default notifications duration (milliseconds)
1268
- * @default 8000
1269
- */
1270
- this.duration = 8000;
1271
- /**
1272
- * Default notifications is dismissible
1273
- * @default true
1274
- */
1275
- this.dismissible = true;
1276
- this.notificationCount = 0;
1277
- this.notifications = [];
1278
- this.subscription = this._notificationService.onNotification().subscribe(notification => {
1279
- if (!notification.duration) {
1280
- notification.duration = this.duration; // Add duration if not is set
1281
- }
1282
- if (!notification.position && this.position) {
1283
- notification.position = this.position; // Add position if not is set
1284
- }
1285
- if (notification.dismissible === undefined && isTrueBooleanInput(this.dismissible)) {
1286
- notification.dismissible = true; // Add dismissible if not is set
1287
- }
1288
- if (!notification.icon) {
1289
- notification.icon = this.getNotificationIcon(notification);
1290
- }
1291
- const newNotification = {
1292
- ...notification,
1293
- id: `${notification.type}-${this.notificationCount++}-notification`
1294
- };
1295
- this.notifications.push(newNotification);
1296
- this._changeDetectorRef.detectChanges();
1297
- setTimeout(() => {
1298
- // Show the notification
1299
- new Notification(document.getElementById(newNotification.id), {
1300
- timeout: notification.duration
1301
- }).show();
1302
- // Clear notification after the duration
1303
- setTimeout(() => {
1304
- const index = this.notifications.findIndex(n => n.id === newNotification.id);
1305
- if (index > -1) {
1306
- this.notifications.splice(index, 1);
1307
- if (!this.notifications.length) {
1308
- this.notificationCount = 0;
1309
- }
1310
- this._changeDetectorRef.detectChanges();
1311
- }
1312
- }, notification.duration);
1313
- }, 200);
1314
- });
1315
- }
1316
- ngOnDestroy() {
1317
- this.subscription.unsubscribe();
1318
- }
1319
- get NotificationType() {
1320
- return NotificationType;
1321
- }
1322
- /**
1323
- * Hide the notification
1324
- * @param id
1325
- */
1326
- hideNotification(id) {
1327
- Notification.getInstance(document.getElementById(id))?.hide();
1328
- }
1329
- /**
1330
- * Retrieve the icon name by notification type
1331
- * @param notification the notification
1332
- * @protected
1333
- */
1334
- getNotificationIcon(notification) {
1335
- switch (notification.type) {
1336
- case NotificationType.Success:
1337
- return 'check-circle';
1338
- case NotificationType.Error:
1339
- return 'close-circle';
1340
- case NotificationType.Warning:
1341
- return 'error';
1342
- case NotificationType.Info:
1343
- return 'info-circle';
1344
- case NotificationType.Standard:
1345
- default:
1346
- return undefined;
1347
- }
1348
- }
1349
- }
1350
- NotificationsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: NotificationsComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: NotificationsService }], target: i0.ɵɵFactoryTarget.Component });
1351
- NotificationsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: NotificationsComponent, selector: "it-notifications", inputs: { duration: "duration", position: "position", dismissible: "dismissible" }, ngImport: i0, template: "<div *ngFor=\"let notification of notifications\"\n [id]=\"notification.id\"\n class=\"notification {{notification.position}} {{notification.type}}\"\n [class.with-icon]=\"!!notification.icon\"\n [class.dismissable]=\"notification.dismissible\"\n role=\"alert\" [attr.aria-labelledby]=\"notification.id+'-title'\">\n\n <h2 [id]=\"notification.id+'-title'\" class=\"h5\">\n <it-icon *ngIf=\"!!notification.icon\" [name]=\"notification.icon\"></it-icon>\n <ng-container>{{notification.title}}</ng-container>\n </h2>\n <p *ngIf=\"notification.message\">{{notification.message}}</p>\n\n <button *ngIf=\"notification.dismissible\" type=\"button\" class=\"btn notification-close\"\n (click)=\"hideNotification(notification.id)\">\n <it-icon name=\"close\"></it-icon>\n <span class=\"visually-hidden\">{{'it.core.close-notification'|translate:{ title: notification.title } }}</span>\n </button>\n</div>\n", styles: [".notification{z-index:10000}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "it-icon[name]", inputs: ["name", "size", "color", "padded", "svgClass"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1352
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: NotificationsComponent, decorators: [{
1353
- type: Component,
1354
- args: [{ selector: 'it-notifications', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngFor=\"let notification of notifications\"\n [id]=\"notification.id\"\n class=\"notification {{notification.position}} {{notification.type}}\"\n [class.with-icon]=\"!!notification.icon\"\n [class.dismissable]=\"notification.dismissible\"\n role=\"alert\" [attr.aria-labelledby]=\"notification.id+'-title'\">\n\n <h2 [id]=\"notification.id+'-title'\" class=\"h5\">\n <it-icon *ngIf=\"!!notification.icon\" [name]=\"notification.icon\"></it-icon>\n <ng-container>{{notification.title}}</ng-container>\n </h2>\n <p *ngIf=\"notification.message\">{{notification.message}}</p>\n\n <button *ngIf=\"notification.dismissible\" type=\"button\" class=\"btn notification-close\"\n (click)=\"hideNotification(notification.id)\">\n <it-icon name=\"close\"></it-icon>\n <span class=\"visually-hidden\">{{'it.core.close-notification'|translate:{ title: notification.title } }}</span>\n </button>\n</div>\n", styles: [".notification{z-index:10000}\n"] }]
1355
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: NotificationsService }]; }, propDecorators: { duration: [{
1356
- type: Input
1357
- }], position: [{
1358
- type: Input
1359
- }], dismissible: [{
1360
- type: Input
1361
- }] } });
1362
-
1363
- class AbstractFormComponent extends AbstractComponent {
1364
- constructor(_translateService, _ngControl) {
1365
- super();
1366
- this._translateService = _translateService;
1367
- this._ngControl = _ngControl;
1368
- /**
1369
- * Validation color display mode (validation triggered if field is touched or not pristine)
1370
- * - <b>true</b>: Always show the validation color
1371
- * - <b>false</b>: Never show validation color
1372
- * - <b>only-valid</b>: Show only valid validation color
1373
- * - <b>only-invalid</b>: Show only invalid validation color
1374
- * @default <b>only-invalid</b>: Show only invalid validation color
1375
- */
1376
- this.validationMode = 'only-invalid';
1377
- this.onChange = (_) => {
1378
- };
1379
- this.onTouched = () => {
1380
- };
1381
- this.control = new FormControl();
1382
- this._ngControl && (this._ngControl.valueAccessor = this);
1383
- }
1384
- /**
1385
- * Set the disabled state
1386
- */
1387
- set disabled(isDisabled) {
1388
- this.setDisabledState(isTrueBooleanInput(isDisabled));
1389
- }
1390
- /**
1391
- * Check if field is invalid (Validation failed)
1392
- */
1393
- get isInvalid() {
1394
- if (this.validationMode === 'only-valid' || (this.validationMode !== 'only-invalid' && isFalseBooleanInput(this.validationMode))) {
1395
- return undefined;
1396
- }
1397
- if (this._ngControl) {
1398
- return this._ngControl.invalid === true && (!this._ngControl.pristine || this._ngControl.touched === true);
1399
- }
1400
- return this.control.invalid && (!this.control.pristine || this.control.touched);
1401
- }
1402
- /**
1403
- * Check if field is valid (Validation successful)
1404
- */
1405
- get isValid() {
1406
- if (this.validationMode === 'only-invalid' || (this.validationMode !== 'only-valid' && isFalseBooleanInput(this.validationMode))) {
1407
- return undefined;
1408
- }
1409
- if (this._ngControl) {
1410
- return this._ngControl.valid === true && (!this._ngControl.pristine || this._ngControl.touched === true);
1411
- }
1412
- return this.control.valid && (!this.control.pristine || this.control.touched);
1413
- }
1414
- /**
1415
- * Return the invalid message string from TranslateService
1416
- */
1417
- get invalidMessage() {
1418
- if (this.control.hasError('required')) {
1419
- return this._translateService.get('it.errors.required-field');
1420
- }
1421
- return this._translateService.get('it.errors.invalid-field');
1422
- }
1423
- ngOnInit() {
1424
- if (this._ngControl?.control) {
1425
- this.control.setValidators(this._ngControl.control.validator);
1426
- }
1427
- }
1428
- registerOnChange(fn) {
1429
- this.control.valueChanges.subscribe(fn);
1430
- this.onChange = fn;
1431
- }
1432
- registerOnTouched(fn) {
1433
- this.onTouched = fn;
1434
- }
1435
- setDisabledState(isDisabled) {
1436
- if (isDisabled) {
1437
- return this.control.disable();
1438
- }
1439
- this.control.enable();
1440
- }
1441
- writeValue(value) {
1442
- this.control.setValue(value, { emitEvent: false });
1443
- this._changeDetectorRef.detectChanges();
1444
- }
1445
- /**
1446
- * Mark the control as touched
1447
- */
1448
- markAsTouched() {
1449
- if (!this.control.touched) {
1450
- this.onTouched();
1451
- }
1452
- }
1453
- /**
1454
- * Fired to check if form control is touched
1455
- */
1456
- ngDoCheck() {
1457
- if (!this._ngControl?.control) {
1458
- return;
1459
- }
1460
- const ngControl = this._ngControl.control;
1461
- if (this.control.touched !== ngControl.touched) {
1462
- if (ngControl.touched) {
1463
- this.control.markAsTouched();
1464
- }
1465
- else {
1466
- this.control.markAsUntouched();
1467
- }
1468
- this._changeDetectorRef.detectChanges();
1469
- }
1470
- if (this.control.pristine !== ngControl.pristine) {
1471
- if (ngControl.pristine) {
1472
- this.control.markAsPristine();
1473
- }
1474
- else {
1475
- this.control.markAsDirty();
1476
- }
1477
- this._changeDetectorRef.detectChanges();
1478
- }
1479
- }
1480
- /**
1481
- * Add the validators in control and parent control
1482
- * @param validators the validators
1483
- * @protected
1484
- */
1485
- addValidators(validators) {
1486
- if (!Array.isArray(validators)) {
1487
- validators = [validators];
1488
- }
1489
- validators.forEach(validator => {
1490
- if (!this.control.hasValidator(validator)) {
1491
- this.control.addValidators(validator);
1492
- }
1493
- if (this._ngControl?.control && !this._ngControl.control.hasValidator(validator)) {
1494
- this._ngControl.control.addValidators(validator);
1495
- }
1496
- });
1497
- }
1498
- /**
1499
- * Reports whether the control with the given path has the error specified. <br/>
1500
- * If the control is not present, false is returned.
1501
- * @param errorCode The code of the error to check
1502
- * @param path A list of control names that designates how to move from the current control
1503
- * to the control that should be queried for errors.
1504
- * @returns whether the given error is present in the control at the given path.
1505
- */
1506
- hasError(errorCode, path) {
1507
- if (this._ngControl) {
1508
- return this._ngControl.hasError(errorCode, path);
1509
- }
1510
- return this.control.hasError(errorCode, path);
1511
- }
1512
- /**
1513
- * Reports error data for the control with the given path.
1514
- * @param errorCode The code of the error to check
1515
- * @param path A list of control names that designates how to move from the current control
1516
- * to the control that should be queried for errors.
1517
- * @returns error data for that particular error. If the control or error is not present,
1518
- * null is returned.
1519
- */
1520
- getError(errorCode, path) {
1521
- if (this._ngControl) {
1522
- return this._ngControl.getError(errorCode, path);
1523
- }
1524
- return this.control.getError(errorCode, path);
1525
- }
1526
- }
1527
- AbstractFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: AbstractFormComponent, deps: [{ token: i1$1.TranslateService }, { token: i2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
1528
- AbstractFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: AbstractFormComponent, selector: "ng-component", inputs: { label: "label", validationMode: "validationMode", disabled: "disabled" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
1529
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: AbstractFormComponent, decorators: [{
1530
- type: Component,
1531
- args: [{ template: '' }]
1532
- }], ctorParameters: function () { return [{ type: i1$1.TranslateService }, { type: i2.NgControl, decorators: [{
1533
- type: Self
1534
- }, {
1535
- type: Optional
1536
- }] }]; }, propDecorators: { label: [{
1537
- type: Input
1538
- }], validationMode: [{
1539
- type: Input
1540
- }], disabled: [{
1541
- type: Input
1542
- }] } });
1543
-
1544
- /**
1545
- * General Email Regex (RFC 5322 Official Standard)
1546
- * http://emailregex.com/
1547
- */
1548
- const EMAIL_REGEX = /(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/;
1549
- /**
1550
- * Phone number Regex
1551
- */
1552
- const PHONE_NUMBER_REGEX = /^\s*(?:\+?(\d{1,3}))?[-. (]*(\d{3})[-. )]*(\d{3})[-. ]*(\d{3})(?: *x(\d+))?\s*$/;
1553
- /**
1554
- * URL Regex
1555
- */
1556
- const URL_REGEX = /(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/;
1557
- /**
1558
- * The italian tax code Regex (Codice Fiscale)
1559
- */
1560
- const ITALIAN_TAX_CODE_REGEX = /^[A-Za-z]{6}[0-9]{2}[A-Za-z]{1}[0-9]{2}[A-Za-z]{1}[0-9]{3}[A-Za-z]{1}$/i;
1561
- /**
1562
- * The VAT number Regex (Partita iva)
1563
- */
1564
- const VAT_NUMBER_REGEX = /^[0-9]{11}$/;
1565
- /**
1566
- * Italian CAP Regex
1567
- */
1568
- const CAP_REGEX = /^[0-9]{5}$/;
1569
-
1570
- class ItValidators {
1571
- /**
1572
- * Static pattern validator with custom error
1573
- * @param regex
1574
- * @param error
1575
- */
1576
- static customPattern(regex, error) {
1577
- return (control) => {
1578
- if (!control.value) {
1579
- // if control is empty return no error
1580
- return null;
1581
- }
1582
- // test the value of the control against the regexp supplied
1583
- const valid = regex.test(control.value);
1584
- // if true, return no error (no error), else return error passed in the second parameter
1585
- return valid ? null : error;
1586
- };
1587
- }
1588
- /**
1589
- * Set Validator if the condition is satisfied
1590
- * @param validator the validator to apply if the condition is true
1591
- * @param condition the condition
1592
- */
1593
- static conditional(validator, condition) {
1594
- return formControl => {
1595
- if (!formControl.parent) {
1596
- return null;
1597
- }
1598
- if (condition(formControl)) {
1599
- return validator(formControl);
1600
- }
1601
- return null;
1602
- };
1603
- }
1604
- /**
1605
- * Check whether our password and confirm password are a match
1606
- * @param control
1607
- * @param passwordControlName the password formControlName
1608
- * @param confirmControlName the confirmPassword formControlName
1609
- */
1610
- static passwordMatch(control, passwordControlName = 'password', confirmControlName = 'confirmPassword') {
1611
- const confirmControl = control.get(confirmControlName); // confirmPassword form control
1612
- if (!confirmControl) {
1613
- return null;
1614
- }
1615
- const passwordControl = control.get(passwordControlName); // password form control
1616
- const password = passwordControl?.value; // get password from our password form control
1617
- // compare is the password match
1618
- if ((password && !confirmControl.value) || (confirmControl.value && password !== confirmControl.value)) {
1619
- // if they don't match, set an error in our confirmPassword form control
1620
- confirmControl?.setErrors({ noPasswordMatch: true });
1621
- confirmControl?.markAsTouched();
1622
- return control;
1623
- }
1624
- if (password && passwordControl?.touched) {
1625
- confirmControl?.markAsTouched();
1626
- }
1627
- return null;
1628
- }
1629
- /**
1630
- * Password validator
1631
- * @param minLength minimum password length - default 10
1632
- * @param hasNumber check whether the entered password has a number - default true
1633
- * @param hasCapitalCase check whether the entered password has upper case letter - default true
1634
- * @param hasSmallCase check whether the entered password has a lower-case letter - default true
1635
- * @param hasSpecialCharacters check whether the entered password has a special character - default true
1636
- * @param required the field is required - default true
1637
- */
1638
- static password(minLength = 10, hasNumber = true, hasCapitalCase = true, hasSmallCase = true, hasSpecialCharacters = true, required = true) {
1639
- const validators = [Validators.minLength(minLength)];
1640
- if (hasNumber) {
1641
- validators.push(ItValidators.customPattern(/\d/, { hasNumber }));
1642
- }
1643
- if (hasCapitalCase) {
1644
- validators.push(ItValidators.customPattern(/[A-Z]/, { hasCapitalCase }));
1645
- }
1646
- if (hasSmallCase) {
1647
- validators.push(ItValidators.customPattern(/[a-z]/, { hasSmallCase }));
1648
- }
1649
- if (hasSpecialCharacters) {
1650
- validators.push(ItValidators.customPattern(new RegExp(`[${ItValidators.SpecialCharacterPattern}]`), { hasSpecialCharacters }));
1651
- }
1652
- if (required) {
1653
- validators.push(Validators.required);
1654
- }
1655
- return Validators.compose(validators);
1656
- }
1657
- /**
1658
- * Email validator
1659
- */
1660
- static get email() {
1661
- return Validators.compose([
1662
- Validators.email,
1663
- ItValidators.customPattern(EMAIL_REGEX, { invalidEmail: true })
1664
- ]);
1665
- }
1666
- /**
1667
- * Phone number validator
1668
- */
1669
- static get tel() {
1670
- return ItValidators.customPattern(PHONE_NUMBER_REGEX, { invalidTel: true });
1671
- }
1672
- /**
1673
- * URL validator
1674
- */
1675
- static get url() {
1676
- return ItValidators.customPattern(URL_REGEX, { invalidUrl: true });
1677
- }
1678
- /**
1679
- * Italian Tax Code validator
1680
- */
1681
- static get taxCode() {
1682
- return ItValidators.customPattern(ITALIAN_TAX_CODE_REGEX, { invalidTaxCode: true });
1683
- }
1684
- /**
1685
- * VAT Number validator
1686
- */
1687
- static get vatNumber() {
1688
- return ItValidators.customPattern(VAT_NUMBER_REGEX, { invalidVatNumber: true });
1689
- }
1690
- /**
1691
- * Italian Postal Code validator (CAP)
1692
- */
1693
- static get cap() {
1694
- return ItValidators.customPattern(CAP_REGEX, { invalidCap: true });
1695
- }
1696
- /**
1697
- * Check if value is a valid RegExp
1698
- */
1699
- static get regExp() {
1700
- return (control) => {
1701
- try {
1702
- if (control?.value) {
1703
- new RegExp(control.value);
1704
- }
1705
- }
1706
- catch (e) {
1707
- return { invalidRegex: true };
1708
- }
1709
- return null;
1710
- };
1711
- }
1712
- }
1713
- ItValidators.SpecialCharacterPattern = '!@#$%&*_+=;:|,.';
1714
-
1715
- class MarkMatchingTextPipe {
1716
- constructor(domSanitizer) {
1717
- this.domSanitizer = domSanitizer;
1718
- }
1719
- transform(allString, searchString) {
1720
- if (!searchString) {
1721
- return allString;
1722
- }
1723
- else if (!allString) {
1724
- return "";
1725
- }
1726
- // Check if search string is a substring of pivot string (no case-sensitive)
1727
- const idxOfMatchString = allString.toLowerCase().indexOf(searchString.toLowerCase());
1728
- if (idxOfMatchString !== -1) {
1729
- // retrieve the exactly substring
1730
- const matchingString = allString.substring(idxOfMatchString, idxOfMatchString + searchString.length);
1731
- // Replace original string marking as <strong> (bold) the matchinng substring
1732
- const regEx = new RegExp('(' + matchingString + ')', 'gi');
1733
- const res = allString.replace(regEx, '<mark>$1</mark>');
1734
- return this.domSanitizer.bypassSecurityTrustHtml(res);
1735
- }
1736
- return allString;
1737
- }
1738
- }
1739
- MarkMatchingTextPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MarkMatchingTextPipe, deps: [{ token: i1$3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
1740
- MarkMatchingTextPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.6", ngImport: i0, type: MarkMatchingTextPipe, name: "markMatchingText" });
1741
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MarkMatchingTextPipe, decorators: [{
1742
- type: Pipe,
1743
- args: [{
1744
- name: 'markMatchingText'
1745
- }]
1746
- }], ctorParameters: function () { return [{ type: i1$3.DomSanitizer }]; } });
1747
-
1748
- class InputComponent extends AbstractFormComponent {
1749
- constructor() {
1750
- super(...arguments);
1751
- /**
1752
- * The input type
1753
- * @default text
1754
- */
1755
- this.type = 'text';
1756
- /**
1757
- * The input placeholder
1758
- */
1759
- this.placeholder = '';
1760
- /**
1761
- * The max date value [Used only in type = 'date']
1762
- * @default '9999-12-31'
1763
- * @example 'yyyy-mm-dd'
1764
- */
1765
- this.maxDate = '9999-12-31';
1766
- /**
1767
- * Time span [ms] has passed without another source emission, to delay data filtering.
1768
- * Useful when the user is typing multiple letters
1769
- * @default 300 [ms]
1770
- */
1771
- this.autocompleteDebounceTime = 300;
1772
- /**
1773
- * Fired when the Autocomplete Item has been selected
1774
- */
1775
- this.autocompleteSelectedEvent = new EventEmitter();
1776
- this.showAutocompletion = false;
1777
- /** Observable da cui vengono emessi i risultati dell'auto completamento */
1778
- this.autocompleteResults$ = new Observable();
1779
- }
1780
- get isActiveLabel() {
1781
- const value = this.control.value;
1782
- if ((!!value && value !== 0) || value === 0 || !!this.placeholder) {
1783
- return true;
1784
- }
1785
- if (this.type === 'number' && (isTrueBooleanInput(this.currency) || isTrueBooleanInput(this.percentage))) {
1786
- return true;
1787
- }
1788
- return this.type === 'date' || this.type === 'time' || this.type === 'color';
1789
- }
1790
- /**
1791
- * Check is readonly field
1792
- */
1793
- get isReadonly() {
1794
- return this.readonly === 'plaintext' || isTrueBooleanInput(this.readonly);
1795
- }
1796
- /**
1797
- * Return the invalid message string from TranslateService
1798
- */
1799
- get invalidMessage() {
1800
- if (this.hasError('min') && this.min) {
1801
- return this._translateService.get('it.errors.min-invalid', {
1802
- min: this.min
1803
- });
1804
- }
1805
- if (this.hasError('max') && this.max) {
1806
- return this._translateService.get('it.errors.max-invalid', {
1807
- max: this.max
1808
- });
1809
- }
1810
- if (this.hasError('minlength')) {
1811
- const error = this.getError('minlength');
1812
- return this._translateService.get('it.errors.min-length-invalid', { min: error.requiredLength });
1813
- }
1814
- if (this.hasError('maxlength')) {
1815
- const error = this.getError('maxlength');
1816
- return this._translateService.get('it.errors.max-length-invalid', { max: error.requiredLength });
1817
- }
1818
- if (this.hasError('email') || this.hasError('invalidEmail')) {
1819
- return this._translateService.get('it.errors.email-invalid');
1820
- }
1821
- if (this.hasError('invalidTel')) {
1822
- return this._translateService.get('it.errors.tel-invalid');
1823
- }
1824
- if (this.hasError('invalidUrl')) {
1825
- return this._translateService.get('it.errors.url-invalid');
1826
- }
1827
- if (this.hasError('invalidTaxCode')) {
1828
- return this._translateService.get('it.errors.tax-code-invalid');
1829
- }
1830
- if (this.hasError('invalidVatNumber')) {
1831
- return this._translateService.get('it.errors.vat-number-invalid');
1832
- }
1833
- if (this.hasError('invalidCap')) {
1834
- return this._translateService.get('it.errors.cap-invalid');
1835
- }
1836
- if (this.hasError('invalidRegex')) {
1837
- return this._translateService.get('it.errors.regex-invalid');
1838
- }
1839
- if (this.hasError('pattern')) {
1840
- const error = this.getError('pattern');
1841
- return this._translateService.get('it.errors.pattern-invalid', { pattern: error.requiredPattern });
1842
- }
1843
- return super.invalidMessage;
1844
- }
1845
- ngOnInit() {
1846
- super.ngOnInit();
1847
- const validators = [];
1848
- switch (this.type) {
1849
- case 'number':
1850
- if (isTrueBooleanInput(this.percentage)) {
1851
- this.min = this.min || 0;
1852
- this.max = this.max || 100;
1853
- }
1854
- // Dynamic min/max validators
1855
- validators.push((control) => this.min ? Validators.min(this.min)(control) : null);
1856
- validators.push((control) => this.max ? Validators.max(this.max)(control) : null);
1857
- break;
1858
- case 'email':
1859
- validators.push(ItValidators.email);
1860
- break;
1861
- case 'tel':
1862
- validators.push(ItValidators.tel);
1863
- break;
1864
- case 'url':
1865
- validators.push(ItValidators.url);
1866
- break;
1867
- }
1868
- this.addValidators(validators);
1869
- this.autocompleteResults$ = this.getAutocompleteResults$();
1870
- }
1871
- /**
1872
- * Increment or decrease the input number value of step
1873
- * @param decrease true to decrease value
1874
- */
1875
- incrementNumber(decrease = false) {
1876
- if (this.type !== 'number') {
1877
- return;
1878
- }
1879
- const step = (this.step === 'any' ? 1 : (this.step ?? 1));
1880
- let value = Number(this.control.value);
1881
- value = (isNaN(value) ? 0 : value) + (decrease ? -step : step);
1882
- value = Math.round(value * 1e12) / 1e12; // prevent js decimal error
1883
- if (this.min !== undefined && value < this.min) {
1884
- value = this.min;
1885
- }
1886
- else if (this.max !== undefined && value > this.max) {
1887
- value = this.max;
1888
- }
1889
- this.control.setValue(value);
1890
- }
1891
- /**
1892
- * Create the autocomplete list
1893
- */
1894
- getAutocompleteResults$() {
1895
- if (this.type !== 'search') {
1896
- return of({ searchedValue: '', relatedEntries: [] });
1897
- }
1898
- return this.control.valueChanges.pipe(debounceTime(this.autocompleteDebounceTime), // Delay filter data after time span has passed without another source emission, useful when the user is typing multiple letters
1899
- distinctUntilChanged(), // Only if searchValue is distinct in comparison to the last value
1900
- switchMap(searchedValue => {
1901
- if (!this.autocompleteData) {
1902
- return of({ searchedValue, relatedEntries: [] });
1903
- }
1904
- const autoCompleteData$ = Array.isArray(this.autocompleteData) ? of(this.autocompleteData) : this.autocompleteData(searchedValue);
1905
- return autoCompleteData$.pipe(map(autocompleteData => {
1906
- if (!searchedValue) {
1907
- return { searchedValue, relatedEntries: [] };
1908
- }
1909
- const lowercaseValue = searchedValue.toLowerCase();
1910
- const relatedEntries = autocompleteData.filter(item => item.value?.toLowerCase().includes(lowercaseValue));
1911
- return { searchedValue, relatedEntries };
1912
- }));
1913
- }));
1914
- }
1915
- onEntryClick(entry, event) {
1916
- // Se non è stato definito un link associato all'elemento dell'autocomplete, probabilmente il desiderata
1917
- // non è effettuare la navigazione al default '#', pertanto in tal caso meglio annullare la navigazione.
1918
- if (!entry.link) {
1919
- event.preventDefault();
1920
- }
1921
- this.autocompleteSelectedEvent.next(entry);
1922
- this.control.setValue(entry.value);
1923
- this.showAutocompletion = false;
1924
- }
1925
- autocompleteItemTrackByValueFn(index, item) {
1926
- return item.value;
1927
- }
1928
- onKeyDown() {
1929
- this.showAutocompletion = this.type === 'search';
1930
- }
1931
- }
1932
- InputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: InputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1933
- InputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: InputComponent, selector: "it-input", inputs: { type: "type", placeholder: "placeholder", description: "description", readonly: "readonly", maxDate: "maxDate", minDate: "minDate", max: "max", min: "min", step: "step", currency: "currency", percentage: "percentage", adaptive: "adaptive", autocompleteData: "autocompleteData", autocompleteDebounceTime: "autocompleteDebounceTime" }, outputs: { autocompleteSelectedEvent: "autocompleteSelectedEvent" }, usesInheritance: true, ngImport: i0, template: "<div class=\"form-group\">\n <div class=\"input-group\">\n <div class=\"input-group-prepend\" [class.d-none]=\"!prependText.hasChildNodes() && !prepend.hasChildNodes()\">\n <div #prepend>\n <ng-content select=\"[prepend]\"></ng-content>\n </div>\n <div class=\"input-group-text\" #prependText>\n <ng-content select=\"[prependText]\"></ng-content>\n </div>\n </div>\n\n <label *ngIf=\"label\" [for]=\"id\" [class.active]=\"isActiveLabel\"\n [class.empty-prepend-label]=\"!prependText.hasChildNodes() && !prepend.hasChildNodes()\">\n {{label}}\n </label>\n\n <span *ngIf=\"type === 'number'\"\n class=\"input-number\"\n [class.input-number-currency]=\"currency\"\n [class.input-number-percentage]=\"percentage\"\n [class.input-number-adaptive]=\"adaptive\">\n\n <input type=\"number\"\n [id]=\"id\"\n [step]=\"step ?? null\"\n [class.is-invalid]=\"isInvalid\"\n [class.is-valid]=\"isValid\"\n [formControl]=\"control\"\n [placeholder]=\"placeholder\"\n [readonly]=\"isReadonly\"\n [attr.aria-describedby]=\"id + '-description'\"\n (blur)=\"markAsTouched()\" />\n\n <button type=\"button\" class=\"input-number-add\" (click)=\"incrementNumber()\">\n <span class=\"visually-hidden\">{{'it.form.increase-value'}}</span>\n </button>\n <button type=\"button\" class=\"input-number-sub\" (click)=\"incrementNumber(true)\">\n <span class=\"visually-hidden\">{{'it.form.decrease-value'}}</span>\n </button>\n </span>\n\n <input *ngIf=\"type !== 'number'\"\n [id]=\"id\"\n [type]=\"type\"\n [max]=\"type === 'date' ? maxDate : undefined\"\n [min]=\"type === 'date' ? minDate : undefined\"\n [class.form-control]=\"readonly !== 'plaintext'\"\n [class.form-control-plaintext]=\"readonly === 'plaintext'\"\n [class.is-invalid]=\"isInvalid\"\n [class.is-valid]=\"isValid\"\n [formControl]=\"control\"\n [placeholder]=\"placeholder\"\n [readonly]=\"isReadonly\"\n (keydown)=\"onKeyDown()\"\n [attr.aria-describedby]=\"id + '-description'\"\n (blur)=\"markAsTouched()\">\n\n <div class=\"input-group-append\">\n <ng-content select=\"[append]\"></ng-content>\n\n <div class=\"input-group-text\">\n <ng-content select=\"[appendText]\"></ng-content>\n </div>\n </div>\n </div>\n\n <small *ngIf=\"description\" [id]=\"id + '-description'\" class=\"form-text\">{{description}}</small>\n\n <!-- INIZIO gestione AUTOCOMPLETAMENTO -->\n <ng-container *ngIf=\"type === 'search'\">\n <!-- Icona lente per autocompletamento -->\n <span class=\"autocomplete-icon\" aria-hidden=\"true\">\n <it-icon name=\"search\" size=\"sm\"></it-icon>\n </span>\n\n <ng-container *ngIf=\"autocompleteResults$ | async as autocomplete\">\n <!-- Lista di autocompletamento -->\n <ul class=\"autocomplete-list\" [class.autocomplete-list-show]=\"autocomplete.relatedEntries?.length && showAutocompletion\">\n <li *ngFor=\"let entry of autocomplete.relatedEntries; trackBy: autocompleteItemTrackByValueFn\"\n (click)=\"onEntryClick(entry, $event)\">\n <a [href]=\"entry.link\">\n <ng-container *ngTemplateOutlet=\"autocompleteItemTemplate\"></ng-container>\n </a>\n <ng-template #autocompleteItemTemplate>\n <div class=\"avatar size-sm\" *ngIf=\"entry.avatarSrcPath\">\n <img [src]=\"entry.avatarSrcPath\" [alt]=\"entry.avatarAltText\">\n </div>\n <it-icon *ngIf=\"entry.icon\" [name]=\"entry.icon\" size=\"sm\"></it-icon>\n <span class=\"autocomplete-list-text\">\n <span [innerHTML]=\"entry.value | markMatchingText: autocomplete.searchedValue\"></span>\n <em *ngIf=\"entry.label\">{{entry.label}}</em>\n </span>\n </ng-template>\n </li>\n </ul>\n </ng-container>\n </ng-container>\n <!-- FINE gestione AUTOCOMPLETAMENTO -->\n\n <div *ngIf=\"isInvalid\" class=\"form-feedback just-validate-error-label\" [id]=\"id + '-error'\">\n <div #customError>\n <ng-content select=\"[error]\"></ng-content>\n </div>\n <ng-container *ngIf=\"!customError.hasChildNodes()\">{{invalidMessage | async}}</ng-container>\n </div>\n</div>\n", styles: [".form-group label{z-index:1000}.form-group input:focus:not(.focus--mouse){box-shadow:inherit!important;border-color:inherit!important}.form-group .input-number button.input-number-add{top:0}.form-group .input-number button.input-number-sub{bottom:0}.form-group .input-group-text:empty{display:none}.form-group label.empty-prepend-label{left:auto!important;max-width:100%!important}.form-group label:not(.active):has(+ input:-webkit-autofill){transform:translateY(-75%)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: IconComponent, selector: "it-icon[name]", inputs: ["name", "size", "color", "padded", "svgClass"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: MarkMatchingTextPipe, name: "markMatchingText" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1934
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: InputComponent, decorators: [{
1935
- type: Component,
1936
- args: [{ selector: 'it-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-group\">\n <div class=\"input-group\">\n <div class=\"input-group-prepend\" [class.d-none]=\"!prependText.hasChildNodes() && !prepend.hasChildNodes()\">\n <div #prepend>\n <ng-content select=\"[prepend]\"></ng-content>\n </div>\n <div class=\"input-group-text\" #prependText>\n <ng-content select=\"[prependText]\"></ng-content>\n </div>\n </div>\n\n <label *ngIf=\"label\" [for]=\"id\" [class.active]=\"isActiveLabel\"\n [class.empty-prepend-label]=\"!prependText.hasChildNodes() && !prepend.hasChildNodes()\">\n {{label}}\n </label>\n\n <span *ngIf=\"type === 'number'\"\n class=\"input-number\"\n [class.input-number-currency]=\"currency\"\n [class.input-number-percentage]=\"percentage\"\n [class.input-number-adaptive]=\"adaptive\">\n\n <input type=\"number\"\n [id]=\"id\"\n [step]=\"step ?? null\"\n [class.is-invalid]=\"isInvalid\"\n [class.is-valid]=\"isValid\"\n [formControl]=\"control\"\n [placeholder]=\"placeholder\"\n [readonly]=\"isReadonly\"\n [attr.aria-describedby]=\"id + '-description'\"\n (blur)=\"markAsTouched()\" />\n\n <button type=\"button\" class=\"input-number-add\" (click)=\"incrementNumber()\">\n <span class=\"visually-hidden\">{{'it.form.increase-value'}}</span>\n </button>\n <button type=\"button\" class=\"input-number-sub\" (click)=\"incrementNumber(true)\">\n <span class=\"visually-hidden\">{{'it.form.decrease-value'}}</span>\n </button>\n </span>\n\n <input *ngIf=\"type !== 'number'\"\n [id]=\"id\"\n [type]=\"type\"\n [max]=\"type === 'date' ? maxDate : undefined\"\n [min]=\"type === 'date' ? minDate : undefined\"\n [class.form-control]=\"readonly !== 'plaintext'\"\n [class.form-control-plaintext]=\"readonly === 'plaintext'\"\n [class.is-invalid]=\"isInvalid\"\n [class.is-valid]=\"isValid\"\n [formControl]=\"control\"\n [placeholder]=\"placeholder\"\n [readonly]=\"isReadonly\"\n (keydown)=\"onKeyDown()\"\n [attr.aria-describedby]=\"id + '-description'\"\n (blur)=\"markAsTouched()\">\n\n <div class=\"input-group-append\">\n <ng-content select=\"[append]\"></ng-content>\n\n <div class=\"input-group-text\">\n <ng-content select=\"[appendText]\"></ng-content>\n </div>\n </div>\n </div>\n\n <small *ngIf=\"description\" [id]=\"id + '-description'\" class=\"form-text\">{{description}}</small>\n\n <!-- INIZIO gestione AUTOCOMPLETAMENTO -->\n <ng-container *ngIf=\"type === 'search'\">\n <!-- Icona lente per autocompletamento -->\n <span class=\"autocomplete-icon\" aria-hidden=\"true\">\n <it-icon name=\"search\" size=\"sm\"></it-icon>\n </span>\n\n <ng-container *ngIf=\"autocompleteResults$ | async as autocomplete\">\n <!-- Lista di autocompletamento -->\n <ul class=\"autocomplete-list\" [class.autocomplete-list-show]=\"autocomplete.relatedEntries?.length && showAutocompletion\">\n <li *ngFor=\"let entry of autocomplete.relatedEntries; trackBy: autocompleteItemTrackByValueFn\"\n (click)=\"onEntryClick(entry, $event)\">\n <a [href]=\"entry.link\">\n <ng-container *ngTemplateOutlet=\"autocompleteItemTemplate\"></ng-container>\n </a>\n <ng-template #autocompleteItemTemplate>\n <div class=\"avatar size-sm\" *ngIf=\"entry.avatarSrcPath\">\n <img [src]=\"entry.avatarSrcPath\" [alt]=\"entry.avatarAltText\">\n </div>\n <it-icon *ngIf=\"entry.icon\" [name]=\"entry.icon\" size=\"sm\"></it-icon>\n <span class=\"autocomplete-list-text\">\n <span [innerHTML]=\"entry.value | markMatchingText: autocomplete.searchedValue\"></span>\n <em *ngIf=\"entry.label\">{{entry.label}}</em>\n </span>\n </ng-template>\n </li>\n </ul>\n </ng-container>\n </ng-container>\n <!-- FINE gestione AUTOCOMPLETAMENTO -->\n\n <div *ngIf=\"isInvalid\" class=\"form-feedback just-validate-error-label\" [id]=\"id + '-error'\">\n <div #customError>\n <ng-content select=\"[error]\"></ng-content>\n </div>\n <ng-container *ngIf=\"!customError.hasChildNodes()\">{{invalidMessage | async}}</ng-container>\n </div>\n</div>\n", styles: [".form-group label{z-index:1000}.form-group input:focus:not(.focus--mouse){box-shadow:inherit!important;border-color:inherit!important}.form-group .input-number button.input-number-add{top:0}.form-group .input-number button.input-number-sub{bottom:0}.form-group .input-group-text:empty{display:none}.form-group label.empty-prepend-label{left:auto!important;max-width:100%!important}.form-group label:not(.active):has(+ input:-webkit-autofill){transform:translateY(-75%)}\n"] }]
1937
- }], propDecorators: { type: [{
1938
- type: Input
1939
- }], placeholder: [{
1940
- type: Input
1941
- }], description: [{
1942
- type: Input
1943
- }], readonly: [{
1944
- type: Input
1945
- }], maxDate: [{
1946
- type: Input
1947
- }], minDate: [{
1948
- type: Input
1949
- }], max: [{
1950
- type: Input
1951
- }], min: [{
1952
- type: Input
1953
- }], step: [{
1954
- type: Input
1955
- }], currency: [{
1956
- type: Input
1957
- }], percentage: [{
1958
- type: Input
1959
- }], adaptive: [{
1960
- type: Input
1961
- }], autocompleteData: [{
1962
- type: Input
1963
- }], autocompleteDebounceTime: [{
1964
- type: Input
1965
- }], autocompleteSelectedEvent: [{
1966
- type: Output
1967
- }] } });
1968
-
1969
- class PaginationComponent {
1970
- constructor() {
1971
- /**
1972
- * Number of pages closest to the current one to display
1973
- * @default 5
1974
- */
1975
- this.visiblePages = 5;
1976
- /**
1977
- * Available Changer values
1978
- * @default [10, 25, 50, 100]
1979
- */
1980
- this.changerValues = [10, 25, 50, 100];
1981
- /**
1982
- * Fired when page is changed. Emit the new index of page
1983
- */
1984
- this.pageEvent = new EventEmitter();
1985
- /**
1986
- * Fired when changer is changed. Emit the new changer value
1987
- */
1988
- this.changerEvent = new EventEmitter();
1989
- /**
1990
- * The pages
1991
- * @protected
1992
- */
1993
- this.pages = [];
1994
- /**
1995
- * Jump to page input
1996
- * @protected
1997
- */
1998
- this.jumpToPage = new FormControl(null);
1999
- this.jumpToPage.valueChanges.pipe(debounceTime(300), // Delay filter data after time span has passed without another source emission
2000
- distinctUntilChanged(), filter(value => !!value && this.jumpToPage.valid)).subscribe(value => {
2001
- this.pageEvent.emit(value - 1);
2002
- });
2003
- }
2004
- get isSimpleMode() {
2005
- return isTrueBooleanInput(this.simpleMode);
2006
- }
2007
- get isTextLinks() {
2008
- return isTrueBooleanInput(this.textLinks);
2009
- }
2010
- get isShowJumpToPage() {
2011
- return isTrueBooleanInput(this.showJumpToPage);
2012
- }
2013
- ngOnChanges(changes) {
2014
- this.pages = this.calculatePages();
2015
- if (changes['currentPage']) {
2016
- this.jumpToPage.setValue(null, { emitEvent: false });
2017
- }
2018
- }
2019
- /**
2020
- * Create array to generate pagination of `visiblePages` element
2021
- */
2022
- calculatePages() {
2023
- if (this.isSimpleMode) {
2024
- return [this.currentPage];
2025
- }
2026
- const length = this.pageNumbers > this.visiblePages ? this.visiblePages : this.pageNumbers;
2027
- const halfVisiblePages = Math.floor(this.visiblePages / 2);
2028
- let start = (this.currentPage > halfVisiblePages && this.pageNumbers > this.visiblePages) ?
2029
- this.currentPage - halfVisiblePages + 1 : 1;
2030
- if (this.pageNumbers > this.visiblePages) {
2031
- if ((this.currentPage + 1) >= this.pageNumbers) {
2032
- start -= halfVisiblePages;
2033
- }
2034
- else if (this.currentPage >= (this.pageNumbers - halfVisiblePages)) {
2035
- start -= (this.pageNumbers - (this.currentPage + 1));
2036
- }
2037
- }
2038
- return Array.from({ length }, (_, i) => i + start);
2039
- }
2040
- /**
2041
- * On click page change
2042
- * @param event click event
2043
- * @param newPage the new page of table
2044
- */
2045
- pageChange(event, newPage) {
2046
- event.preventDefault();
2047
- this.pageEvent.emit(newPage - 1); // emit new page index
2048
- }
2049
- /**
2050
- * On click changer
2051
- * @param event click event
2052
- * @param value the new changer value
2053
- */
2054
- changerChange(event, value) {
2055
- event.preventDefault();
2056
- this.changerEvent.emit(value); // emit new changer value
2057
- }
2058
- }
2059
- PaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2060
- PaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: PaginationComponent, selector: "it-pagination[currentPage][pageNumbers]", inputs: { currentPage: "currentPage", pageNumbers: "pageNumbers", visiblePages: "visiblePages", alignment: "alignment", simpleMode: "simpleMode", textLinks: "textLinks", currentChanger: "currentChanger", changerValues: "changerValues", showJumpToPage: "showJumpToPage" }, outputs: { pageEvent: "pageEvent", changerEvent: "changerEvent" }, usesOnChanges: true, ngImport: i0, template: "<nav class=\"pagination-wrapper\"\n [class.justify-content-center]=\"alignment==='center'\"\n [class.justify-content-end]=\"alignment==='end'\"\n [class.pagination-total]=\"totalNumberText.hasChildNodes()\">\n\n <ul *ngIf=\"pages.length\" class=\"pagination\">\n <li class=\"page-item\" [class.disabled]=\"currentPage < 1\">\n <a class=\"page-link\" [class.text]=\"isTextLinks\" href=\"#\" (click)=\"pageChange($event, currentPage)\">\n <it-icon *ngIf=\"!isTextLinks\" name=\"chevron-left\" color=\"primary\"></it-icon>\n <span class=\"visually-hidden\">\n {{(isTextLinks ? 'it.core.page' : 'it.core.previous-page') | translate}}\n </span>\n <ng-container *ngIf=\"isTextLinks\">{{'it.core.previous' | translate}}</ng-container>\n </a>\n </li>\n\n <ng-container *ngIf=\"isSimpleMode; else defaultView\">\n <li class=\"page-item\"><span class=\"page-link\" aria-current=\"page\">{{currentPage + 1}}</span></li>\n <li class=\"page-item\"><span class=\"page-link\">/</span></li>\n <li class=\"page-item\"><span class=\"page-link\">{{pageNumbers}}</span></li>\n <li class=\"page-item visually-hidden\">\n <a class=\"page-link\" href=\"#\" aria-current=\"page\">\n {{'it.core.page-of-total'|translate : {page: (currentPage + 1), total: pageNumbers} }}\n </a>\n </li>\n </ng-container>\n <ng-template #defaultView>\n <ng-container *ngIf=\"pageNumbers > visiblePages && pages[0] >= 2\">\n <li class=\"page-item\">\n <a class=\"page-link\" href=\"#\" (click)=\"pageChange($event, 1)\">1</a>\n </li>\n <li class=\"page-item\" *ngIf=\"pages[0] >= 3\">\n <span class=\"page-link\">...</span>\n </li>\n </ng-container>\n\n <li class=\"page-item\" *ngFor=\"let page of pages\">\n <a class=\"page-link\" aria-current=\"page\" *ngIf=\"page === (currentPage + 1); else inactivePage\">\n <span class=\"d-inline-block d-sm-none\">{{'it.core.page'|translate}}</span> {{page}}\n </a>\n <ng-template #inactivePage>\n <a class=\"page-link\" href=\"#\" (click)=\"pageChange($event, page)\">{{page}}</a>\n </ng-template>\n </li>\n\n <ng-container *ngIf=\"pageNumbers > visiblePages && pages[pages.length - 1] < pageNumbers\">\n <li class=\"page-item\" *ngIf=\"pages[pages.length - 1] < (pageNumbers - 1)\">\n <span class=\"page-link\">...</span>\n </li>\n <li class=\"page-item\">\n <a class=\"page-link\" href=\"#\" (click)=\"pageChange($event, pageNumbers)\">{{pageNumbers}}</a>\n </li>\n </ng-container>\n </ng-template>\n\n <li class=\"page-item\" [class.disabled]=\"currentPage >= pageNumbers - 1\">\n <a class=\"page-link\" [class.text]=\"isTextLinks\" href=\"#\" (click)=\"pageChange($event, currentPage + 2)\">\n <span class=\"visually-hidden\">\n {{(isTextLinks ? 'it.core.page' : 'it.core.next-page') | translate}}\n </span>\n <ng-container *ngIf=\"isTextLinks\">{{'it.core.next' | translate}}</ng-container>\n <it-icon *ngIf=\"!isTextLinks\" name=\"chevron-right\" color=\"primary\"></it-icon>\n </a>\n </li>\n </ul>\n\n <it-dropdown *ngIf=\"currentChanger !== undefined\">\n <span button>{{currentChanger}} / {{'it.core.page' | translate | lowercase}}</span>\n <ng-container list>\n <it-dropdown-item *ngFor=\"let value of changerValues\" href=\"#\" externalLink=\"true\"\n (click)=\"changerChange($event, value)\">\n {{value}} / {{'it.core.page' | translate | lowercase}}\n </it-dropdown-item>\n </ng-container>\n </it-dropdown>\n\n <it-input *ngIf=\"isShowJumpToPage\" type=\"number\" [min]=\"1\" [max]=\"pageNumbers\"\n [label]=\"('it.core.go-to' | translate) + '...'\" [formControl]=\"jumpToPage\"></it-input>\n\n <p [class.d-none]=\"!totalNumberText.hasChildNodes()\" #totalNumberText>\n <ng-content></ng-content>\n </p>\n</nav>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: DropdownComponent, selector: "it-dropdown", inputs: ["color", "direction", "fullWidth", "dark"], outputs: ["showEvent", "shownEvent", "hideEvent", "hiddenEvent"], exportAs: ["itDropdown"] }, { kind: "component", type: DropdownItemComponent, selector: "it-dropdown-item", inputs: ["divider", "active", "large", "iconName", "iconPosition"] }, { kind: "component", type: InputComponent, selector: "it-input", inputs: ["type", "placeholder", "description", "readonly", "maxDate", "minDate", "max", "min", "step", "currency", "percentage", "adaptive", "autocompleteData", "autocompleteDebounceTime"], outputs: ["autocompleteSelectedEvent"] }, { kind: "component", type: IconComponent, selector: "it-icon[name]", inputs: ["name", "size", "color", "padded", "svgClass"] }, { kind: "pipe", type: i1.LowerCasePipe, name: "lowercase" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2061
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: PaginationComponent, decorators: [{
2062
- type: Component,
2063
- args: [{ selector: 'it-pagination[currentPage][pageNumbers]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav class=\"pagination-wrapper\"\n [class.justify-content-center]=\"alignment==='center'\"\n [class.justify-content-end]=\"alignment==='end'\"\n [class.pagination-total]=\"totalNumberText.hasChildNodes()\">\n\n <ul *ngIf=\"pages.length\" class=\"pagination\">\n <li class=\"page-item\" [class.disabled]=\"currentPage < 1\">\n <a class=\"page-link\" [class.text]=\"isTextLinks\" href=\"#\" (click)=\"pageChange($event, currentPage)\">\n <it-icon *ngIf=\"!isTextLinks\" name=\"chevron-left\" color=\"primary\"></it-icon>\n <span class=\"visually-hidden\">\n {{(isTextLinks ? 'it.core.page' : 'it.core.previous-page') | translate}}\n </span>\n <ng-container *ngIf=\"isTextLinks\">{{'it.core.previous' | translate}}</ng-container>\n </a>\n </li>\n\n <ng-container *ngIf=\"isSimpleMode; else defaultView\">\n <li class=\"page-item\"><span class=\"page-link\" aria-current=\"page\">{{currentPage + 1}}</span></li>\n <li class=\"page-item\"><span class=\"page-link\">/</span></li>\n <li class=\"page-item\"><span class=\"page-link\">{{pageNumbers}}</span></li>\n <li class=\"page-item visually-hidden\">\n <a class=\"page-link\" href=\"#\" aria-current=\"page\">\n {{'it.core.page-of-total'|translate : {page: (currentPage + 1), total: pageNumbers} }}\n </a>\n </li>\n </ng-container>\n <ng-template #defaultView>\n <ng-container *ngIf=\"pageNumbers > visiblePages && pages[0] >= 2\">\n <li class=\"page-item\">\n <a class=\"page-link\" href=\"#\" (click)=\"pageChange($event, 1)\">1</a>\n </li>\n <li class=\"page-item\" *ngIf=\"pages[0] >= 3\">\n <span class=\"page-link\">...</span>\n </li>\n </ng-container>\n\n <li class=\"page-item\" *ngFor=\"let page of pages\">\n <a class=\"page-link\" aria-current=\"page\" *ngIf=\"page === (currentPage + 1); else inactivePage\">\n <span class=\"d-inline-block d-sm-none\">{{'it.core.page'|translate}}</span> {{page}}\n </a>\n <ng-template #inactivePage>\n <a class=\"page-link\" href=\"#\" (click)=\"pageChange($event, page)\">{{page}}</a>\n </ng-template>\n </li>\n\n <ng-container *ngIf=\"pageNumbers > visiblePages && pages[pages.length - 1] < pageNumbers\">\n <li class=\"page-item\" *ngIf=\"pages[pages.length - 1] < (pageNumbers - 1)\">\n <span class=\"page-link\">...</span>\n </li>\n <li class=\"page-item\">\n <a class=\"page-link\" href=\"#\" (click)=\"pageChange($event, pageNumbers)\">{{pageNumbers}}</a>\n </li>\n </ng-container>\n </ng-template>\n\n <li class=\"page-item\" [class.disabled]=\"currentPage >= pageNumbers - 1\">\n <a class=\"page-link\" [class.text]=\"isTextLinks\" href=\"#\" (click)=\"pageChange($event, currentPage + 2)\">\n <span class=\"visually-hidden\">\n {{(isTextLinks ? 'it.core.page' : 'it.core.next-page') | translate}}\n </span>\n <ng-container *ngIf=\"isTextLinks\">{{'it.core.next' | translate}}</ng-container>\n <it-icon *ngIf=\"!isTextLinks\" name=\"chevron-right\" color=\"primary\"></it-icon>\n </a>\n </li>\n </ul>\n\n <it-dropdown *ngIf=\"currentChanger !== undefined\">\n <span button>{{currentChanger}} / {{'it.core.page' | translate | lowercase}}</span>\n <ng-container list>\n <it-dropdown-item *ngFor=\"let value of changerValues\" href=\"#\" externalLink=\"true\"\n (click)=\"changerChange($event, value)\">\n {{value}} / {{'it.core.page' | translate | lowercase}}\n </it-dropdown-item>\n </ng-container>\n </it-dropdown>\n\n <it-input *ngIf=\"isShowJumpToPage\" type=\"number\" [min]=\"1\" [max]=\"pageNumbers\"\n [label]=\"('it.core.go-to' | translate) + '...'\" [formControl]=\"jumpToPage\"></it-input>\n\n <p [class.d-none]=\"!totalNumberText.hasChildNodes()\" #totalNumberText>\n <ng-content></ng-content>\n </p>\n</nav>\n" }]
2064
- }], ctorParameters: function () { return []; }, propDecorators: { currentPage: [{
2065
- type: Input
2066
- }], pageNumbers: [{
2067
- type: Input
2068
- }], visiblePages: [{
2069
- type: Input
2070
- }], alignment: [{
2071
- type: Input
2072
- }], simpleMode: [{
2073
- type: Input
2074
- }], textLinks: [{
2075
- type: Input
2076
- }], currentChanger: [{
2077
- type: Input
2078
- }], changerValues: [{
2079
- type: Input
2080
- }], showJumpToPage: [{
2081
- type: Input
2082
- }], pageEvent: [{
2083
- type: Output
2084
- }], changerEvent: [{
2085
- type: Output
2086
- }] } });
2087
-
2088
- class PopoverDirective {
2089
- constructor(_elementRef) {
2090
- this._elementRef = _elementRef;
2091
- /**
2092
- * This event fires immediately when the show method is called.
2093
- */
2094
- this.showEvent = new EventEmitter();
2095
- /**
2096
- * This event is triggered when the tooltip has been made visible to the user (it will wait for the CSS transitions to complete).
2097
- */
2098
- this.shownEvent = new EventEmitter();
2099
- /**
2100
- * This event fires immediately when the hide method is called.
2101
- */
2102
- this.hideEvent = new EventEmitter();
2103
- /**
2104
- * This event is raised when the tooltip has finished being hidden from the user (it will wait for the CSS transitions to complete).
2105
- */
2106
- this.hiddenEvent = new EventEmitter();
2107
- /**
2108
- * This event fires after the show event when the tooltip template has been added to the DOM.
2109
- */
2110
- this.insertedEvent = new EventEmitter();
2111
- this.element = this._elementRef.nativeElement;
2112
- }
2113
- /**
2114
- * Define the popover content
2115
- * @param content the popover content
2116
- */
2117
- set content(content) {
2118
- this.element.setAttribute('data-bs-content', content);
2119
- }
2120
- /**
2121
- * Define the popover title
2122
- * @param title the popover title
2123
- */
2124
- set popoverTitle(title) {
2125
- if (title) {
2126
- this.element.setAttribute('title', title);
2127
- this.element.setAttribute('data-bs-original-title', title);
2128
- }
2129
- }
2130
- /**
2131
- * Define the popover placement
2132
- * @param placement
2133
- */
2134
- set popoverPlacement(placement) {
2135
- this.element.setAttribute('data-bs-placement', placement);
2136
- }
2137
- /**
2138
- * Appends the popover to a specific element.
2139
- * @param container
2140
- */
2141
- set popoverContainer(container) {
2142
- if (container) {
2143
- this.element.setAttribute('data-container', container);
2144
- }
2145
- }
2146
- /**
2147
- * Indicates whether the title contains html
2148
- * @param html true if contain html
2149
- */
2150
- set popoverHtml(html) {
2151
- this.element.setAttribute('data-bs-html', isTrueBooleanInput(html) ? 'true' : 'false');
2152
- }
2153
- /**
2154
- * How popover is triggered
2155
- * - 'hover': To open the Popover on hover of the mouse over the element
2156
- * - 'focus': To ignore popovers on the user's next click of an element other than the toggle element.
2157
- * @param trigger
2158
- */
2159
- set popoverTrigger(trigger) {
2160
- if (trigger) {
2161
- this.element.setAttribute('data-bs-trigger', trigger);
2162
- }
2163
- }
2164
- ngAfterViewInit() {
2165
- this.element.setAttribute('data-bs-toggle', 'popover');
2166
- this.popover = Popover.getOrCreateInstance(this.element);
2167
- this.element.addEventListener('show.bs.popover', event => this.showEvent.emit(event));
2168
- this.element.addEventListener('shown.bs.popover', event => this.shownEvent.emit(event));
2169
- this.element.addEventListener('hide.bs.popover', event => this.hideEvent.emit(event));
2170
- this.element.addEventListener('hidden.bs.popover', event => this.hiddenEvent.emit(event));
2171
- this.element.addEventListener('inserted.bs.popover', event => this.insertedEvent.emit(event));
2172
- }
2173
- ngOnDestroy() {
2174
- this.dispose();
2175
- }
2176
- /**
2177
- * Shows the popover of an item.
2178
- */
2179
- show() {
2180
- this.popover?.show();
2181
- }
2182
- /**
2183
- * Hide the popover of an element.
2184
- */
2185
- hide() {
2186
- this.popover?.hide();
2187
- }
2188
- /**
2189
- * Activate / Deactivate the popover of an element
2190
- */
2191
- toggle() {
2192
- this.popover?.toggle();
2193
- }
2194
- /**
2195
- * Hides and destroys the popover of an element.
2196
- */
2197
- dispose() {
2198
- this.popover?.dispose();
2199
- }
2200
- /**
2201
- * Gives the popover of an element a chance to be shown.
2202
- */
2203
- enable() {
2204
- this.popover?.enable();
2205
- }
2206
- /**
2207
- * Removes the ability to show the popover of an element.
2208
- */
2209
- disable() {
2210
- this.popover?.disable();
2211
- }
2212
- /**
2213
- * Toggles the possibility that the popover of an element is shown or hidden.
2214
- */
2215
- toggleEnabled() {
2216
- this.popover?.disable();
2217
- }
2218
- /**
2219
- * Updates the position of an element's popover.
2220
- */
2221
- update() {
2222
- this.popover?.disable();
2223
- }
2224
- }
2225
- PopoverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: PopoverDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
2226
- PopoverDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.6", type: PopoverDirective, selector: "[itPopover]", inputs: { content: ["itPopover", "content"], popoverTitle: "popoverTitle", popoverPlacement: "popoverPlacement", popoverContainer: "popoverContainer", popoverHtml: "popoverHtml", popoverTrigger: "popoverTrigger" }, outputs: { showEvent: "showEvent", shownEvent: "shownEvent", hideEvent: "hideEvent", hiddenEvent: "hiddenEvent", insertedEvent: "insertedEvent" }, exportAs: ["itPopover"], ngImport: i0 });
2227
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: PopoverDirective, decorators: [{
2228
- type: Directive,
2229
- args: [{
2230
- selector: '[itPopover]',
2231
- exportAs: 'itPopover'
2232
- }]
2233
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { content: [{
2234
- type: Input,
2235
- args: ['itPopover']
2236
- }], popoverTitle: [{
2237
- type: Input
2238
- }], popoverPlacement: [{
2239
- type: Input
2240
- }], popoverContainer: [{
2241
- type: Input
2242
- }], popoverHtml: [{
2243
- type: Input
2244
- }], popoverTrigger: [{
2245
- type: Input
2246
- }], showEvent: [{
2247
- type: Output
2248
- }], shownEvent: [{
2249
- type: Output
2250
- }], hideEvent: [{
2251
- type: Output
2252
- }], hiddenEvent: [{
2253
- type: Output
2254
- }], insertedEvent: [{
2255
- type: Output
2256
- }] } });
2257
-
2258
- class RatingComponent extends AbstractFormComponent {
2259
- constructor() {
2260
- super(...arguments);
2261
- /**
2262
- * Number of stars to show
2263
- * @default 5
2264
- */
2265
- this.starCount = 5;
2266
- this.stars = this.generateStars();
2267
- }
2268
- ngOnChanges(changes) {
2269
- super.ngOnChanges(changes);
2270
- if (changes['starCount'] || !this.stars.length) {
2271
- this.stars = this.generateStars();
2272
- }
2273
- }
2274
- ngOnInit() {
2275
- super.ngOnInit();
2276
- if (!this.control.value && !!this.value) {
2277
- this.writeValue(this.value);
2278
- this.onChange(this.value);
2279
- }
2280
- }
2281
- /**
2282
- * Generate the array of stars
2283
- * @private
2284
- */
2285
- generateStars() {
2286
- return Array.from({ length: this.starCount }, (_, i) => i + 1).reverse();
2287
- }
2288
- }
2289
- RatingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: RatingComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2290
- RatingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: RatingComponent, selector: "it-rating", inputs: { value: "value", starCount: "starCount" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<fieldset class=\"rating\"\n [class.rating-label]=\"!!label\"\n [class.rating-read-only]=\"control.disabled\">\n <legend>\n <span>{{label}}</span>\n <span class=\"visually-hidden\">\n {{'it.core.rating-star'|translate : { current: control.value || 0, total: stars.length } }}\n </span>\n </legend>\n\n <ng-container *ngFor=\"let starValue of stars\">\n <input [id]=\"id + '-' + starValue\"\n type=\"radio\"\n [name]=\"id\"\n [value]=\"starValue\"\n [attr.aria-hidden]=\"control.disabled\"\n [formControl]=\"control\" />\n\n <label class=\"full\" [for]=\"id + '-' + starValue\">\n <it-icon name=\"star-full\" size=\"sm\"></it-icon>\n <span class=\"visually-hidden\">\n {{'it.core.rate-star'|translate : { current: starValue, total: stars.length } }}\n </span>\n </label>\n </ng-container>\n\n</fieldset>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: IconComponent, selector: "it-icon[name]", inputs: ["name", "size", "color", "padded", "svgClass"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2291
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: RatingComponent, decorators: [{
2292
- type: Component,
2293
- args: [{ selector: 'it-rating', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fieldset class=\"rating\"\n [class.rating-label]=\"!!label\"\n [class.rating-read-only]=\"control.disabled\">\n <legend>\n <span>{{label}}</span>\n <span class=\"visually-hidden\">\n {{'it.core.rating-star'|translate : { current: control.value || 0, total: stars.length } }}\n </span>\n </legend>\n\n <ng-container *ngFor=\"let starValue of stars\">\n <input [id]=\"id + '-' + starValue\"\n type=\"radio\"\n [name]=\"id\"\n [value]=\"starValue\"\n [attr.aria-hidden]=\"control.disabled\"\n [formControl]=\"control\" />\n\n <label class=\"full\" [for]=\"id + '-' + starValue\">\n <it-icon name=\"star-full\" size=\"sm\"></it-icon>\n <span class=\"visually-hidden\">\n {{'it.core.rate-star'|translate : { current: starValue, total: stars.length } }}\n </span>\n </label>\n </ng-container>\n\n</fieldset>\n" }]
2294
- }], propDecorators: { value: [{
2295
- type: Input
2296
- }], starCount: [{
2297
- type: Input
2298
- }] } });
2299
-
2300
- class SpinnerComponent {
2301
- constructor() {
2302
- /**
2303
- * The spinner is active
2304
- */
2305
- this.active = true;
2306
- }
2307
- get isActive() {
2308
- return isTrueBooleanInput(this.active);
2309
- }
2310
- get isSmall() {
2311
- return isTrueBooleanInput(this.small);
2312
- }
2313
- get isDouble() {
2314
- return isTrueBooleanInput(this.double);
2315
- }
2316
- }
2317
- SpinnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2318
- SpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: SpinnerComponent, selector: "it-spinner", inputs: { active: "active", small: "small", double: "double" }, ngImport: i0, template: "<div class=\"progress-spinner\"\n [class.progress-spinner-double]=\"isDouble\"\n [class.progress-spinner-active]=\"isActive\"\n [class.size-sm]=\"isSmall\">\n <div *ngIf=\"isDouble\" class=\"progress-spinner-inner\"></div>\n <div *ngIf=\"isDouble\" class=\"progress-spinner-inner\"></div>\n <span class=\"visually-hidden\">{{'it.core.loading'|translate}}...</span>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2319
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: SpinnerComponent, decorators: [{
2320
- type: Component,
2321
- args: [{ selector: 'it-spinner', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"progress-spinner\"\n [class.progress-spinner-double]=\"isDouble\"\n [class.progress-spinner-active]=\"isActive\"\n [class.size-sm]=\"isSmall\">\n <div *ngIf=\"isDouble\" class=\"progress-spinner-inner\"></div>\n <div *ngIf=\"isDouble\" class=\"progress-spinner-inner\"></div>\n <span class=\"visually-hidden\">{{'it.core.loading'|translate}}...</span>\n</div>\n" }]
2322
- }], propDecorators: { active: [{
2323
- type: Input
2324
- }], small: [{
2325
- type: Input
2326
- }], double: [{
2327
- type: Input
2328
- }] } });
2329
-
2330
- class SteppersItemComponent extends AbstractComponent {
2331
- }
2332
- SteppersItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: SteppersItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2333
- SteppersItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: SteppersItemComponent, selector: "it-steppers-item[label]", inputs: { label: "label", icon: "icon" }, viewQueries: [{ propertyName: "htmlContent", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
2334
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: SteppersItemComponent, decorators: [{
2335
- type: Component,
2336
- args: [{ selector: 'it-steppers-item[label]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n" }]
2337
- }], propDecorators: { label: [{
2338
- type: Input
2339
- }], icon: [{
2340
- type: Input
2341
- }], htmlContent: [{
2342
- type: ViewChild,
2343
- args: [TemplateRef]
2344
- }] } });
2345
-
2346
- class SteppersContainerComponent {
2347
- constructor(_changeDetectorRef) {
2348
- this._changeDetectorRef = _changeDetectorRef;
2349
- /**
2350
- * Show the stepper header
2351
- * @default true
2352
- */
2353
- this.showHeader = true;
2354
- /**
2355
- * Show the back button
2356
- * @default true
2357
- */
2358
- this.showBackButton = true;
2359
- /**
2360
- * Show the forward button
2361
- * @default true
2362
- */
2363
- this.showForwardButton = true;
2364
- /**
2365
- * Show the confirm button
2366
- * @default false
2367
- */
2368
- this.showConfirmButton = false;
2369
- /**
2370
- * Show the save button
2371
- * @default false
2372
- */
2373
- this.showSaveButton = false;
2374
- this.backClick = new EventEmitter();
2375
- this.forwardClick = new EventEmitter();
2376
- this.confirmClick = new EventEmitter();
2377
- this.saveClick = new EventEmitter();
2378
- }
2379
- get isShowHeader() {
2380
- return isTrueBooleanInput(this.showHeader);
2381
- }
2382
- get isSteppersNumber() {
2383
- return isTrueBooleanInput(this.steppersNumber);
2384
- }
2385
- get isDark() {
2386
- return isTrueBooleanInput(this.dark);
2387
- }
2388
- get isShowBackButton() {
2389
- return isTrueBooleanInput(this.showBackButton);
2390
- }
2391
- get isShowForwardButton() {
2392
- return isTrueBooleanInput(this.showForwardButton);
2393
- }
2394
- get isShowConfirmButton() {
2395
- return isTrueBooleanInput(this.showConfirmButton);
2396
- }
2397
- get isConfirmLoading() {
2398
- return isTrueBooleanInput(this.confirmLoading);
2399
- }
2400
- get isShowSaveButton() {
2401
- return isTrueBooleanInput(this.showSaveButton);
2402
- }
2403
- get isSaveLoading() {
2404
- return isTrueBooleanInput(this.saveLoading);
2405
- }
2406
- ngAfterViewInit() {
2407
- this.steps?.changes.pipe(// When steps changes (dynamic add/remove)
2408
- startWith(undefined)).subscribe(() => {
2409
- this.stepsSubscriptions?.forEach(sub => sub.unsubscribe()); // Remove old subscriptions
2410
- this.stepsSubscriptions = this.steps?.map(step => step.valueChanges.subscribe(() => {
2411
- this._changeDetectorRef.detectChanges(); // DetectChanges when step attributes changes
2412
- }));
2413
- this._changeDetectorRef.detectChanges(); // Force update html render
2414
- });
2415
- }
2416
- ngOnDestroy() {
2417
- this.stepsSubscriptions?.forEach(step => step.unsubscribe());
2418
- }
2419
- }
2420
- SteppersContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: SteppersContainerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2421
- SteppersContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: SteppersContainerComponent, selector: "it-steppers-container[activeStep]", inputs: { activeStep: "activeStep", showHeader: "showHeader", dark: "dark", steppersNumber: "steppersNumber", progressStyle: "progressStyle", progressColor: "progressColor", showBackButton: "showBackButton", showForwardButton: "showForwardButton", showConfirmButton: "showConfirmButton", confirmLoading: "confirmLoading", showSaveButton: "showSaveButton", saveLoading: "saveLoading" }, outputs: { backClick: "backClick", forwardClick: "forwardClick", confirmClick: "confirmClick", saveClick: "saveClick" }, queries: [{ propertyName: "steps", predicate: SteppersItemComponent }], ngImport: i0, template: "<div class=\"steppers\" [class.bg-dark]=\"isDark\">\n <div *ngIf=\"isShowHeader\" class=\"steppers-header\">\n <ul>\n <li *ngFor=\"let step of steps; let i = index\"\n [class.confirmed]=\"i < activeStep\"\n [class.active]=\"i === activeStep\"\n [class.no-line]=\"i === activeStep && isSteppersNumber\">\n\n <it-icon *ngIf=\"step.icon && !isSteppersNumber\" [name]=\"step.icon\"></it-icon>\n <span *ngIf=\"isSteppersNumber\" class=\"steppers-number\">\n <ng-container *ngIf=\"i < activeStep; else showNumber\">\n <ng-container *ngTemplateOutlet=\"checkIcon\"></ng-container>\n </ng-container>\n <ng-template #showNumber>\n <span class=\"visually-hidden\">{{'it.core.step' | translate}} </span>{{i + 1}}\n </ng-template>\n </span>\n\n {{step.label}}\n\n <ng-container *ngIf=\"i < activeStep && !isSteppersNumber\">\n <ng-container *ngTemplateOutlet=\"checkIcon\"></ng-container>\n </ng-container>\n <span *ngIf=\"i === activeStep\" class=\"visually-hidden\">{{'it.core.active' | translate}}</span>\n </li>\n </ul>\n <span class=\"steppers-index\" aria-hidden=\"true\">\n <ng-container\n *ngIf=\"!isSteppersNumber; else showNumbers\">{{(activeStep + 1) + '/' + steps?.length}}</ng-container>\n <ng-template #showNumbers>\n <span *ngFor=\"let step of steps; let i = index\" [class.active]=\"i === activeStep\">{{i + 1}}</span>\n </ng-template>\n </span>\n </div>\n\n <div *ngIf=\"steps?.get(activeStep) as step\" class=\"steppers-content\" aria-live=\"polite\">\n <ng-container *ngTemplateOutlet=\"step.htmlContent\"></ng-container>\n </div>\n\n <nav *ngIf=\"isShowBackButton || isShowSaveButton || isShowForwardButton || isShowConfirmButton || !!progressStyle\"\n class=\"steppers-nav\">\n <button *ngIf=\"isShowBackButton\" type=\"button\" itButton=\"outline-primary\" size=\"sm\" class=\"steppers-btn-prev\"\n (click)=\"backClick.emit(activeStep)\">\n <it-icon name=\"chevron-left\" color=\"primary\"></it-icon>\n {{'it.core.back' | translate}}\n </button>\n\n <ng-container *ngIf=\"!!progressStyle\">\n <ul *ngIf=\"progressStyle === 'dots'; else progressBar\" class=\"steppers-dots\">\n <li *ngFor=\"let step of steps; let i = index\" [class.done]=\"i < activeStep\">\n <span class=\"visually-hidden\">\n {{'it.core.step-of' | translate: { current: activeStep + 1, available: steps?.length } }}\n {{i < activeStep ? ('- ' + ('it.core.confirmed' | translate)) : ''}}\n </span>\n </li>\n </ul>\n\n <ng-template #progressBar>\n <div class=\"steppers-progress\">\n <it-progress-bar [color]=\"progressColor\" [value]=\"(activeStep/(steps?.length||1)) * 100\"></it-progress-bar>\n </div>\n </ng-template>\n </ng-container>\n\n <button *ngIf=\"isShowSaveButton\" type=\"button\" itButton=\"primary\" size=\"sm\" class=\"steppers-btn-save\"\n [progress]=\"isSaveLoading\" [disabled]=\"isSaveLoading\" (click)=\"saveClick.emit(activeStep)\">\n {{'it.general.save' | translate}}\n </button>\n\n <button *ngIf=\"isShowForwardButton\" type=\"button\" itButton=\"outline-primary\" size=\"sm\" class=\"steppers-btn-next\"\n (click)=\"forwardClick.emit(activeStep)\">\n {{'it.core.forward' | translate}}\n <it-icon name=\"chevron-right\" color=\"primary\"></it-icon>\n </button>\n\n <button *ngIf=\"isShowConfirmButton\" type=\"button\" itButton=\"primary\" size=\"sm\"\n class=\"steppers-btn-confirm d-lg-block\"\n [progress]=\"isConfirmLoading\" [disabled]=\"isConfirmLoading\"\n (click)=\"confirmClick.emit(activeStep)\">\n {{'it.core.confirm' | translate}}\n </button>\n </nav>\n</div>\n\n<ng-template #checkIcon>\n <it-icon name=\"check\" class=\"steppers-success\"></it-icon>\n <span class=\"visually-hidden\">{{'it.core.confirmed' | translate}}</span>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ButtonDirective, selector: "[itButton]", inputs: ["itButton", "size", "block", "disabled"], exportAs: ["itButton"] }, { kind: "component", type: ProgressBarComponent, selector: "it-progress-bar[value]", inputs: ["value", "showLabel", "indeterminate", "color"] }, { kind: "component", type: ProgressButtonComponent, selector: "button[itButton][progress]", inputs: ["progress", "progressColor"] }, { kind: "component", type: IconComponent, selector: "it-icon[name]", inputs: ["name", "size", "color", "padded", "svgClass"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2422
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: SteppersContainerComponent, decorators: [{
2423
- type: Component,
2424
- args: [{ selector: 'it-steppers-container[activeStep]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"steppers\" [class.bg-dark]=\"isDark\">\n <div *ngIf=\"isShowHeader\" class=\"steppers-header\">\n <ul>\n <li *ngFor=\"let step of steps; let i = index\"\n [class.confirmed]=\"i < activeStep\"\n [class.active]=\"i === activeStep\"\n [class.no-line]=\"i === activeStep && isSteppersNumber\">\n\n <it-icon *ngIf=\"step.icon && !isSteppersNumber\" [name]=\"step.icon\"></it-icon>\n <span *ngIf=\"isSteppersNumber\" class=\"steppers-number\">\n <ng-container *ngIf=\"i < activeStep; else showNumber\">\n <ng-container *ngTemplateOutlet=\"checkIcon\"></ng-container>\n </ng-container>\n <ng-template #showNumber>\n <span class=\"visually-hidden\">{{'it.core.step' | translate}} </span>{{i + 1}}\n </ng-template>\n </span>\n\n {{step.label}}\n\n <ng-container *ngIf=\"i < activeStep && !isSteppersNumber\">\n <ng-container *ngTemplateOutlet=\"checkIcon\"></ng-container>\n </ng-container>\n <span *ngIf=\"i === activeStep\" class=\"visually-hidden\">{{'it.core.active' | translate}}</span>\n </li>\n </ul>\n <span class=\"steppers-index\" aria-hidden=\"true\">\n <ng-container\n *ngIf=\"!isSteppersNumber; else showNumbers\">{{(activeStep + 1) + '/' + steps?.length}}</ng-container>\n <ng-template #showNumbers>\n <span *ngFor=\"let step of steps; let i = index\" [class.active]=\"i === activeStep\">{{i + 1}}</span>\n </ng-template>\n </span>\n </div>\n\n <div *ngIf=\"steps?.get(activeStep) as step\" class=\"steppers-content\" aria-live=\"polite\">\n <ng-container *ngTemplateOutlet=\"step.htmlContent\"></ng-container>\n </div>\n\n <nav *ngIf=\"isShowBackButton || isShowSaveButton || isShowForwardButton || isShowConfirmButton || !!progressStyle\"\n class=\"steppers-nav\">\n <button *ngIf=\"isShowBackButton\" type=\"button\" itButton=\"outline-primary\" size=\"sm\" class=\"steppers-btn-prev\"\n (click)=\"backClick.emit(activeStep)\">\n <it-icon name=\"chevron-left\" color=\"primary\"></it-icon>\n {{'it.core.back' | translate}}\n </button>\n\n <ng-container *ngIf=\"!!progressStyle\">\n <ul *ngIf=\"progressStyle === 'dots'; else progressBar\" class=\"steppers-dots\">\n <li *ngFor=\"let step of steps; let i = index\" [class.done]=\"i < activeStep\">\n <span class=\"visually-hidden\">\n {{'it.core.step-of' | translate: { current: activeStep + 1, available: steps?.length } }}\n {{i < activeStep ? ('- ' + ('it.core.confirmed' | translate)) : ''}}\n </span>\n </li>\n </ul>\n\n <ng-template #progressBar>\n <div class=\"steppers-progress\">\n <it-progress-bar [color]=\"progressColor\" [value]=\"(activeStep/(steps?.length||1)) * 100\"></it-progress-bar>\n </div>\n </ng-template>\n </ng-container>\n\n <button *ngIf=\"isShowSaveButton\" type=\"button\" itButton=\"primary\" size=\"sm\" class=\"steppers-btn-save\"\n [progress]=\"isSaveLoading\" [disabled]=\"isSaveLoading\" (click)=\"saveClick.emit(activeStep)\">\n {{'it.general.save' | translate}}\n </button>\n\n <button *ngIf=\"isShowForwardButton\" type=\"button\" itButton=\"outline-primary\" size=\"sm\" class=\"steppers-btn-next\"\n (click)=\"forwardClick.emit(activeStep)\">\n {{'it.core.forward' | translate}}\n <it-icon name=\"chevron-right\" color=\"primary\"></it-icon>\n </button>\n\n <button *ngIf=\"isShowConfirmButton\" type=\"button\" itButton=\"primary\" size=\"sm\"\n class=\"steppers-btn-confirm d-lg-block\"\n [progress]=\"isConfirmLoading\" [disabled]=\"isConfirmLoading\"\n (click)=\"confirmClick.emit(activeStep)\">\n {{'it.core.confirm' | translate}}\n </button>\n </nav>\n</div>\n\n<ng-template #checkIcon>\n <it-icon name=\"check\" class=\"steppers-success\"></it-icon>\n <span class=\"visually-hidden\">{{'it.core.confirmed' | translate}}</span>\n</ng-template>\n" }]
2425
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { activeStep: [{
2426
- type: Input
2427
- }], showHeader: [{
2428
- type: Input
2429
- }], dark: [{
2430
- type: Input
2431
- }], steppersNumber: [{
2432
- type: Input
2433
- }], progressStyle: [{
2434
- type: Input
2435
- }], progressColor: [{
2436
- type: Input
2437
- }], showBackButton: [{
2438
- type: Input
2439
- }], showForwardButton: [{
2440
- type: Input
2441
- }], showConfirmButton: [{
2442
- type: Input
2443
- }], confirmLoading: [{
2444
- type: Input
2445
- }], showSaveButton: [{
2446
- type: Input
2447
- }], saveLoading: [{
2448
- type: Input
2449
- }], steps: [{
2450
- type: ContentChildren,
2451
- args: [SteppersItemComponent]
2452
- }], backClick: [{
2453
- type: Output
2454
- }], forwardClick: [{
2455
- type: Output
2456
- }], confirmClick: [{
2457
- type: Output
2458
- }], saveClick: [{
2459
- type: Output
2460
- }] } });
2461
-
2462
- class TabItemComponent extends AbstractComponent {
2463
- constructor() {
2464
- super(...arguments);
2465
- /**
2466
- * Custom class
2467
- */
2468
- this.class = '';
2469
- }
2470
- ngAfterViewInit() {
2471
- super.ngAfterViewInit();
2472
- this._renderer.removeAttribute(this._elementRef.nativeElement, 'class');
2473
- }
2474
- }
2475
- TabItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: TabItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2476
- TabItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: TabItemComponent, selector: "it-tab-item", inputs: { label: "label", icon: "icon", active: "active", disabled: "disabled", class: "class" }, viewQueries: [{ propertyName: "htmlContent", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
2477
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: TabItemComponent, decorators: [{
2478
- type: Component,
2479
- args: [{ selector: 'it-tab-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n" }]
2480
- }], propDecorators: { label: [{
2481
- type: Input
2482
- }], icon: [{
2483
- type: Input
2484
- }], active: [{
2485
- type: Input
2486
- }], disabled: [{
2487
- type: Input
2488
- }], class: [{
2489
- type: Input
2490
- }], htmlContent: [{
2491
- type: ViewChild,
2492
- args: [TemplateRef]
2493
- }] } });
2494
-
2495
- class TabContainerComponent extends AbstractComponent {
2496
- isTrueBooleanInput(booleanInput) {
2497
- return isTrueBooleanInput(booleanInput);
2498
- }
2499
- ngAfterViewInit() {
2500
- super.ngAfterViewInit();
2501
- this.tabs?.changes.pipe(// When tabs changes (dynamic add/remove)
2502
- startWith(undefined), tap(() => {
2503
- this.tabSubscriptions?.forEach(sub => sub.unsubscribe()); // Remove old subscriptions
2504
- this.tabSubscriptions = this.tabs?.map(tab => tab.valueChanges.subscribe(() => {
2505
- this._changeDetectorRef.detectChanges(); // DetectChanges when tab-item attributes changes
2506
- }));
2507
- this._changeDetectorRef.detectChanges(); // Force update html render
2508
- }), switchMap(() => this.tabNavLinks?.changes.pipe(startWith(undefined)) || of(undefined))).subscribe(() => {
2509
- // Init tabs from bootstrap-italia
2510
- this.tabNavLinks?.forEach(tabNavLink => {
2511
- const triggerEl = tabNavLink.nativeElement, tabTrigger = Tab.getOrCreateInstance(triggerEl);
2512
- if (triggerEl.getAttribute('tab-listener') !== 'true') {
2513
- triggerEl.addEventListener('click', event => {
2514
- event.preventDefault();
2515
- tabTrigger.show();
2516
- });
2517
- triggerEl.setAttribute('tab-listener', 'true'); // Prevents multiple insertion of the listener
2518
- }
2519
- });
2520
- });
2521
- }
2522
- ngOnDestroy() {
2523
- this.tabSubscriptions?.forEach(sub => sub.unsubscribe());
2524
- }
2525
- }
2526
- TabContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: TabContainerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2527
- TabContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: TabContainerComponent, selector: "it-tab-container", inputs: { auto: "auto", iconText: "iconText", dark: "dark" }, queries: [{ propertyName: "tabs", predicate: TabItemComponent }], viewQueries: [{ propertyName: "tabNavLinks", predicate: ["tabNavLinks"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ul class=\"nav nav-tabs\"\n [class.auto]=\"isTrueBooleanInput(auto)\"\n [class.nav-tabs-icon-text]=\"isTrueBooleanInput(iconText)\"\n [class.nav-dark]=\"isTrueBooleanInput(dark)\"\n role=\"tablist\">\n\n <li class=\"nav-item\" *ngFor=\"let tab of tabs\">\n <a #tabNavLinks [id]=\"tab.id+'-tab-link'\"\n role=\"tab\"\n class=\"nav-link\"\n [class.active]=\"isTrueBooleanInput(tab.active)\"\n [class.disabled]=\"isTrueBooleanInput(tab.disabled)\"\n [attr.href]=\"'#'+tab.id+'-tab'\"\n [attr.aria-controls]=\"tab.id+'-tab'\">\n <it-icon *ngIf=\"tab.icon\" [name]=\"tab.icon\" class=\"me-2\"></it-icon>\n {{tab.label}}\n </a>\n </li>\n</ul>\n\n<div class=\"tab-content\">\n <div *ngFor=\"let tab of tabs\"\n [id]=\"tab.id+'-tab'\"\n class=\"tab-pane p-4 fade {{tab.class ?? ''}}\"\n [class.active]=\"isTrueBooleanInput(tab.active)\"\n [class.show]=\"isTrueBooleanInput(tab.active)\"\n role=\"tabpanel\"\n [attr.aria-labelledby]=\"tab.id+'-tab-link'\">\n <ng-container *ngTemplateOutlet=\"tab.htmlContent\"></ng-container>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "it-icon[name]", inputs: ["name", "size", "color", "padded", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2528
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: TabContainerComponent, decorators: [{
2529
- type: Component,
2530
- args: [{ selector: 'it-tab-container', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ul class=\"nav nav-tabs\"\n [class.auto]=\"isTrueBooleanInput(auto)\"\n [class.nav-tabs-icon-text]=\"isTrueBooleanInput(iconText)\"\n [class.nav-dark]=\"isTrueBooleanInput(dark)\"\n role=\"tablist\">\n\n <li class=\"nav-item\" *ngFor=\"let tab of tabs\">\n <a #tabNavLinks [id]=\"tab.id+'-tab-link'\"\n role=\"tab\"\n class=\"nav-link\"\n [class.active]=\"isTrueBooleanInput(tab.active)\"\n [class.disabled]=\"isTrueBooleanInput(tab.disabled)\"\n [attr.href]=\"'#'+tab.id+'-tab'\"\n [attr.aria-controls]=\"tab.id+'-tab'\">\n <it-icon *ngIf=\"tab.icon\" [name]=\"tab.icon\" class=\"me-2\"></it-icon>\n {{tab.label}}\n </a>\n </li>\n</ul>\n\n<div class=\"tab-content\">\n <div *ngFor=\"let tab of tabs\"\n [id]=\"tab.id+'-tab'\"\n class=\"tab-pane p-4 fade {{tab.class ?? ''}}\"\n [class.active]=\"isTrueBooleanInput(tab.active)\"\n [class.show]=\"isTrueBooleanInput(tab.active)\"\n role=\"tabpanel\"\n [attr.aria-labelledby]=\"tab.id+'-tab-link'\">\n <ng-container *ngTemplateOutlet=\"tab.htmlContent\"></ng-container>\n </div>\n</div>\n" }]
2531
- }], propDecorators: { auto: [{
2532
- type: Input
2533
- }], iconText: [{
2534
- type: Input
2535
- }], dark: [{
2536
- type: Input
2537
- }], tabs: [{
2538
- type: ContentChildren,
2539
- args: [TabItemComponent]
2540
- }], tabNavLinks: [{
2541
- type: ViewChildren,
2542
- args: ['tabNavLinks']
2543
- }] } });
2544
-
2545
- class TableComponent {
2546
- constructor() {
2547
- /**
2548
- * Responsive tables allow you to scroll tables horizontally with ease.
2549
- * @default responsive
2550
- */
2551
- this.responsive = 'responsive';
2552
- }
2553
- get isStriped() {
2554
- return isTrueBooleanInput(this.striped);
2555
- }
2556
- get isHover() {
2557
- return isTrueBooleanInput(this.hover);
2558
- }
2559
- get isBordered() {
2560
- return isTrueBooleanInput(this.bordered);
2561
- }
2562
- get isBorderless() {
2563
- return isTrueBooleanInput(this.borderless);
2564
- }
2565
- get isCompact() {
2566
- return isTrueBooleanInput(this.compact);
2567
- }
2568
- get isCaptionTop() {
2569
- return isTrueBooleanInput(this.captionTop);
2570
- }
2571
- }
2572
- TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2573
- TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: TableComponent, selector: "it-table", inputs: { color: "color", headColor: "headColor", alignment: "alignment", striped: "striped", hover: "hover", bordered: "bordered", borderless: "borderless", compact: "compact", captionTop: "captionTop", responsive: "responsive" }, ngImport: i0, template: "<div [class]=\"responsive ? 'table-' + responsive : undefined\">\n <table class=\"table{{color ? ' table-' + color : '' }}{{alignment ? ' ' + alignment : '' }}\"\n [class.table-striped]=\"isStriped\"\n [class.table-hover]=\"isHover\"\n [class.table-bordered]=\"isBordered\"\n [class.table-borderless]=\"isBorderless\"\n [class.table-sm]=\"isCompact\"\n [class.caption-top]=\"isCaptionTop\">\n <caption>\n <ng-content select=\"[caption]\"></ng-content>\n </caption>\n <thead [class]=\"headColor ? 'table-' + headColor : undefined\">\n <ng-content select=\"[thead]\"></ng-content>\n </thead>\n <tbody>\n <ng-content select=\"[tbody]\"></ng-content>\n </tbody>\n <tfoot>\n <ng-content select=\"[tfoot]\"></ng-content>\n </tfoot>\n </table>\n</div>\n", styles: ["caption:empty{display:none}caption:empty~thead{border-top:none!important}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2574
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: TableComponent, decorators: [{
2575
- type: Component,
2576
- args: [{ selector: 'it-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"responsive ? 'table-' + responsive : undefined\">\n <table class=\"table{{color ? ' table-' + color : '' }}{{alignment ? ' ' + alignment : '' }}\"\n [class.table-striped]=\"isStriped\"\n [class.table-hover]=\"isHover\"\n [class.table-bordered]=\"isBordered\"\n [class.table-borderless]=\"isBorderless\"\n [class.table-sm]=\"isCompact\"\n [class.caption-top]=\"isCaptionTop\">\n <caption>\n <ng-content select=\"[caption]\"></ng-content>\n </caption>\n <thead [class]=\"headColor ? 'table-' + headColor : undefined\">\n <ng-content select=\"[thead]\"></ng-content>\n </thead>\n <tbody>\n <ng-content select=\"[tbody]\"></ng-content>\n </tbody>\n <tfoot>\n <ng-content select=\"[tfoot]\"></ng-content>\n </tfoot>\n </table>\n</div>\n", styles: ["caption:empty{display:none}caption:empty~thead{border-top:none!important}\n"] }]
2577
- }], propDecorators: { color: [{
2578
- type: Input
2579
- }], headColor: [{
2580
- type: Input
2581
- }], alignment: [{
2582
- type: Input
2583
- }], striped: [{
2584
- type: Input
2585
- }], hover: [{
2586
- type: Input
2587
- }], bordered: [{
2588
- type: Input
2589
- }], borderless: [{
2590
- type: Input
2591
- }], compact: [{
2592
- type: Input
2593
- }], captionTop: [{
2594
- type: Input
2595
- }], responsive: [{
2596
- type: Input
2597
- }] } });
2598
-
2599
- class TooltipDirective {
2600
- constructor(_elementRef) {
2601
- this._elementRef = _elementRef;
2602
- /**
2603
- * This event fires immediately when the show method is called.
2604
- */
2605
- this.showEvent = new EventEmitter();
2606
- /**
2607
- * This event is triggered when the tooltip has been made visible to the user (it will wait for the CSS transitions to complete).
2608
- */
2609
- this.shownEvent = new EventEmitter();
2610
- /**
2611
- * This event fires immediately when the hide method is called.
2612
- */
2613
- this.hideEvent = new EventEmitter();
2614
- /**
2615
- * This event is raised when the tooltip has finished being hidden from the user (it will wait for the CSS transitions to complete).
2616
- */
2617
- this.hiddenEvent = new EventEmitter();
2618
- /**
2619
- * This event fires after the show event when the tooltip template has been added to the DOM.
2620
- */
2621
- this.insertedEvent = new EventEmitter();
2622
- this.element = this._elementRef.nativeElement;
2623
- }
2624
- /**
2625
- * Define the tooltip title
2626
- * @param title the tooltip title
2627
- */
2628
- set title(title) {
2629
- if (title) {
2630
- // this.element.setAttribute("title", title);
2631
- this.element.setAttribute('data-bs-original-title', title);
2632
- }
2633
- }
2634
- /**
2635
- * Define the tooltip placement
2636
- * @param placement
2637
- */
2638
- set tooltipPlacement(placement) {
2639
- this.element.setAttribute('data-bs-placement', placement);
2640
- }
2641
- /**
2642
- * Indicates whether the title contains html
2643
- * @param html true if contain html
2644
- */
2645
- set tooltipHtml(html) {
2646
- this.element.setAttribute('data-bs-html', isTrueBooleanInput(html) ? 'true' : 'false');
2647
- }
2648
- ngAfterViewInit() {
2649
- this.element.setAttribute('data-bs-toggle', 'tooltip');
2650
- this.tooltip = Tooltip.getOrCreateInstance(this.element);
2651
- this.element.addEventListener('show.bs.tooltip', event => this.showEvent.emit(event));
2652
- this.element.addEventListener('shown.bs.tooltip', event => this.shownEvent.emit(event));
2653
- this.element.addEventListener('hide.bs.tooltip', event => this.hideEvent.emit(event));
2654
- this.element.addEventListener('hidden.bs.tooltip', event => this.hiddenEvent.emit(event));
2655
- this.element.addEventListener('inserted.bs.tooltip', event => this.insertedEvent.emit(event));
2656
- }
2657
- ngOnDestroy() {
2658
- this.dispose();
2659
- }
2660
- /**
2661
- * Shows the tooltip of an item.
2662
- */
2663
- show() {
2664
- this.tooltip?.show();
2665
- }
2666
- /**
2667
- * Hide the tooltip of an element.
2668
- */
2669
- hide() {
2670
- this.tooltip?.hide();
2671
- }
2672
- /**
2673
- * Activate / Deactivate the tooltip of an element
2674
- */
2675
- toggle() {
2676
- this.tooltip?.toggle();
2677
- }
2678
- /**
2679
- * Hides and destroys the tooltip of an element.
2680
- */
2681
- dispose() {
2682
- this.tooltip?.dispose();
2683
- }
2684
- /**
2685
- * Gives the tooltip of an element a chance to be shown.
2686
- */
2687
- enable() {
2688
- this.tooltip?.enable();
2689
- }
2690
- /**
2691
- * Removes the ability to show the tooltip of an element.
2692
- */
2693
- disable() {
2694
- this.tooltip?.disable();
2695
- }
2696
- /**
2697
- * Toggles the possibility that the tooltip of an element is shown or hidden.
2698
- */
2699
- toggleEnabled() {
2700
- this.tooltip?.disable();
2701
- }
2702
- /**
2703
- * Updates the position of an element's tooltip.
2704
- */
2705
- update() {
2706
- this.tooltip?.disable();
2707
- }
2708
- }
2709
- TooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: TooltipDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
2710
- TooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.6", type: TooltipDirective, selector: "[itTooltip]", inputs: { title: ["itTooltip", "title"], tooltipPlacement: "tooltipPlacement", tooltipHtml: "tooltipHtml" }, outputs: { showEvent: "showEvent", shownEvent: "shownEvent", hideEvent: "hideEvent", hiddenEvent: "hiddenEvent", insertedEvent: "insertedEvent" }, exportAs: ["itTooltip"], ngImport: i0 });
2711
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: TooltipDirective, decorators: [{
2712
- type: Directive,
2713
- args: [{
2714
- selector: '[itTooltip]',
2715
- exportAs: 'itTooltip'
2716
- }]
2717
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { title: [{
2718
- type: Input,
2719
- args: ['itTooltip']
2720
- }], tooltipPlacement: [{
2721
- type: Input
2722
- }], tooltipHtml: [{
2723
- type: Input
2724
- }], showEvent: [{
2725
- type: Output
2726
- }], shownEvent: [{
2727
- type: Output
2728
- }], hideEvent: [{
2729
- type: Output
2730
- }], hiddenEvent: [{
2731
- type: Output
2732
- }], insertedEvent: [{
2733
- type: Output
2734
- }] } });
2735
-
2736
- class CheckboxComponent extends AbstractFormComponent {
2737
- get isIndeterminate() {
2738
- return isTrueBooleanInput(this.indeterminate);
2739
- }
2740
- get isGroup() {
2741
- return isTrueBooleanInput(this.group);
2742
- }
2743
- ngOnInit() {
2744
- super.ngOnInit();
2745
- if (this.control.value || this.checked === undefined) {
2746
- return;
2747
- }
2748
- const value = isTrueBooleanInput(this.checked);
2749
- this.writeValue(value);
2750
- return this.onChange(value);
2751
- }
2752
- }
2753
- CheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: CheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2754
- CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: CheckboxComponent, selector: "it-checkbox", inputs: { toggle: "toggle", inline: "inline", group: "group", checked: "checked", indeterminate: "indeterminate" }, usesInheritance: true, ngImport: i0, template: "<ng-container>\n <div class=\"form-check\"\n [class.form-check-group]=\"isGroup\"\n [class.form-check-inline]=\"inline\">\n\n <div *ngIf=\"toggle; else defaultStyle\" class=\"toggles\">\n <label [for]=\"id\">\n <ng-container *ngTemplateOutlet=\"htmlLabel\"></ng-container>\n <input [id]=\"id\"\n type=\"checkbox\"\n [formControl]=\"control\"\n [attr.aria-describedby]=\"id + '-help'\">\n <span class=\"lever\"></span>\n </label>\n </div>\n\n <ng-template #defaultStyle>\n <input [id]=\"id\"\n type=\"checkbox\"\n class=\"form-check-input\"\n [class.is-invalid]=\"isInvalid\"\n [class.is-valid]=\"isValid\"\n [class.semi-checked]=\"isIndeterminate\"\n [formControl]=\"control\"\n [attr.aria-describedby]=\"id + '-help'\">\n <label class=\"form-check-label\" [for]=\"id\">\n <ng-container *ngTemplateOutlet=\"htmlLabel\"></ng-container>\n </label>\n </ng-template>\n\n <small *ngIf=\"isGroup\" [id]=\"id + '-help'\" class=\"form-text\">\n <ng-content></ng-content>\n </small>\n\n <div *ngIf=\"isInvalid && isGroup\" class=\"form-feedback just-validate-error-label\" [id]=\"id + '-error'\">\n <ng-container *ngTemplateOutlet=\"error\"></ng-container>\n </div>\n </div>\n\n <div *ngIf=\"isInvalid && !isGroup\" class=\"form-feedback just-validate-error-label\" [id]=\"id + '-error'\">\n <ng-container *ngTemplateOutlet=\"error\"></ng-container>\n </div>\n</ng-container>\n\n<ng-template #error>\n <div #customError>\n <ng-content select=\"[error]\"></ng-content>\n </div>\n <ng-container *ngIf=\"!customError.hasChildNodes()\">{{invalidMessage | async}}</ng-container>\n</ng-template>\n\n<ng-template #htmlLabel>\n <div #customLabel>\n <ng-content select=\"[label]\"></ng-content>\n </div>\n <ng-container *ngIf=\"!customLabel.hasChildNodes()\">{{label}}</ng-container>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2755
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: CheckboxComponent, decorators: [{
2756
- type: Component,
2757
- args: [{ selector: 'it-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container>\n <div class=\"form-check\"\n [class.form-check-group]=\"isGroup\"\n [class.form-check-inline]=\"inline\">\n\n <div *ngIf=\"toggle; else defaultStyle\" class=\"toggles\">\n <label [for]=\"id\">\n <ng-container *ngTemplateOutlet=\"htmlLabel\"></ng-container>\n <input [id]=\"id\"\n type=\"checkbox\"\n [formControl]=\"control\"\n [attr.aria-describedby]=\"id + '-help'\">\n <span class=\"lever\"></span>\n </label>\n </div>\n\n <ng-template #defaultStyle>\n <input [id]=\"id\"\n type=\"checkbox\"\n class=\"form-check-input\"\n [class.is-invalid]=\"isInvalid\"\n [class.is-valid]=\"isValid\"\n [class.semi-checked]=\"isIndeterminate\"\n [formControl]=\"control\"\n [attr.aria-describedby]=\"id + '-help'\">\n <label class=\"form-check-label\" [for]=\"id\">\n <ng-container *ngTemplateOutlet=\"htmlLabel\"></ng-container>\n </label>\n </ng-template>\n\n <small *ngIf=\"isGroup\" [id]=\"id + '-help'\" class=\"form-text\">\n <ng-content></ng-content>\n </small>\n\n <div *ngIf=\"isInvalid && isGroup\" class=\"form-feedback just-validate-error-label\" [id]=\"id + '-error'\">\n <ng-container *ngTemplateOutlet=\"error\"></ng-container>\n </div>\n </div>\n\n <div *ngIf=\"isInvalid && !isGroup\" class=\"form-feedback just-validate-error-label\" [id]=\"id + '-error'\">\n <ng-container *ngTemplateOutlet=\"error\"></ng-container>\n </div>\n</ng-container>\n\n<ng-template #error>\n <div #customError>\n <ng-content select=\"[error]\"></ng-content>\n </div>\n <ng-container *ngIf=\"!customError.hasChildNodes()\">{{invalidMessage | async}}</ng-container>\n</ng-template>\n\n<ng-template #htmlLabel>\n <div #customLabel>\n <ng-content select=\"[label]\"></ng-content>\n </div>\n <ng-container *ngIf=\"!customLabel.hasChildNodes()\">{{label}}</ng-container>\n</ng-template>\n" }]
2758
- }], propDecorators: { toggle: [{
2759
- type: Input
2760
- }], inline: [{
2761
- type: Input
2762
- }], group: [{
2763
- type: Input
2764
- }], checked: [{
2765
- type: Input
2766
- }], indeterminate: [{
2767
- type: Input
2768
- }] } });
2769
-
2770
- class PasswordInputComponent extends AbstractFormComponent {
2771
- constructor() {
2772
- super(...arguments);
2773
- /**
2774
- * The field is required
2775
- * @default true
2776
- */
2777
- this.required = true;
2778
- /**
2779
- * The password minimum length
2780
- * @default 10
2781
- */
2782
- this.minLength = 10;
2783
- /**
2784
- * The password must contain at least one number
2785
- * @default true
2786
- */
2787
- this.useNumber = true;
2788
- /**
2789
- * The password must contain at least one uppercase character
2790
- * @default true
2791
- */
2792
- this.useCapitalCase = true;
2793
- /**
2794
- * The password must contain at least one lowercase character
2795
- * @default true
2796
- */
2797
- this.useSmallCase = true;
2798
- /**
2799
- * The password must contain at least one special character
2800
- * @default true
2801
- */
2802
- this.useSpecialCharacters = true;
2803
- /**
2804
- * The input placeholder
2805
- */
2806
- this.placeholder = '';
2807
- /**
2808
- * Is the confirmation password field
2809
- * @default false
2810
- */
2811
- this.confirmPasswordField = false;
2812
- }
2813
- ngOnInit() {
2814
- super.ngOnInit();
2815
- if (!this.isConfirmPasswordField) {
2816
- this.addValidators(ItValidators.password(this.minLength, this.useNumber, this.useCapitalCase, this.useSmallCase, this.useSpecialCharacters, this.required));
2817
- }
2818
- else if (this.required) {
2819
- this.addValidators(Validators.required);
2820
- }
2821
- }
2822
- ngAfterViewInit() {
2823
- super.ngAfterViewInit();
2824
- if (this.inputElement) {
2825
- this.inputPasswordBs = InputPassword.getOrCreateInstance(this.inputElement.nativeElement, {
2826
- showText: this.isStrengthMeter,
2827
- minimumLength: this.minLength
2828
- });
2829
- }
2830
- }
2831
- get isStrengthMeter() {
2832
- return !this.isConfirmPasswordField && isTrueBooleanInput(this.showStrengthMeter);
2833
- }
2834
- get isConfirmPasswordField() {
2835
- return isTrueBooleanInput(this.confirmPasswordField);
2836
- }
2837
- /**
2838
- * Return the invalid message string from TranslateService
2839
- */
2840
- get invalidMessage() {
2841
- if (this.hasError('noPasswordMatch')) {
2842
- return this._translateService.get('it.errors.password-no-match');
2843
- }
2844
- if (this.hasError('minlength')) {
2845
- return this._translateService.get('it.errors.password-min-length', {
2846
- minLength: this.minLength
2847
- });
2848
- }
2849
- if (this.hasError('hasNumber')) {
2850
- return this._translateService.get('it.errors.password-number');
2851
- }
2852
- if (this.hasError('hasCapitalCase')) {
2853
- return this._translateService.get('it.errors.password-capital-case');
2854
- }
2855
- if (this.hasError('hasSmallCase')) {
2856
- return this._translateService.get('it.errors.password-capital-case');
2857
- }
2858
- if (this.hasError('hasSpecialCharacters')) {
2859
- return this._translateService.get('it.errors.password-special-character');
2860
- }
2861
- return super.invalidMessage;
2862
- }
2863
- /**
2864
- * Retrieve the default StrengthMeter description message from TranslateService
2865
- */
2866
- get strengthMeterDescription() {
2867
- const keys = ['it.form.password-strength-meter.description.default'];
2868
- if (this.useNumber) {
2869
- keys.push('it.form.password-strength-meter.description.number');
2870
- }
2871
- if (this.useCapitalCase) {
2872
- keys.push('it.form.password-strength-meter.description.capital-case');
2873
- }
2874
- if (this.useSpecialCharacters) {
2875
- keys.push('it.form.password-strength-meter.description.special-character');
2876
- }
2877
- return this._translateService.get(keys, { minLength: this.minLength }).pipe(map(labels => Object.values(labels).join(', ')));
2878
- }
2879
- }
2880
- PasswordInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: PasswordInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2881
- PasswordInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: PasswordInputComponent, selector: "it-password-input", inputs: { required: "required", minLength: "minLength", useNumber: "useNumber", useCapitalCase: "useCapitalCase", useSmallCase: "useSmallCase", useSpecialCharacters: "useSpecialCharacters", placeholder: "placeholder", description: "description", showStrengthMeter: "showStrengthMeter", confirmPasswordField: "confirmPasswordField" }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"form-group\">\n <label *ngIf=\"label\" [for]=\"id\" [class.active]=\"!!control.value || !!placeholder\">{{label}}</label>\n <input [id]=\"id\" #input\n type=\"password\"\n class=\"form-control input-password\"\n [class.is-invalid]=\"isInvalid\"\n [class.is-valid]=\"isValid\"\n [formControl]=\"control\"\n [placeholder]=\"placeholder\"\n [attr.aria-describedby]=\"id + '-description'\"\n [autocomplete]=\"isConfirmPasswordField ? 'off' : undefined\">\n\n <span class=\"password-icon\" aria-hidden=\"true\">\n <it-icon name=\"password-visible\" size=\"sm\" class=\"password-icon-visible\"></it-icon>\n <it-icon name=\"password-invisible\" size=\"sm\" class=\"password-icon-invisible d-none\"></it-icon>\n </span>\n\n <div *ngIf=\"isInvalid\" [id]=\"id + '-error'\" class=\"form-feedback just-validate-error-label\">\n <div #customError>\n <ng-content select=\"[error]\"></ng-content>\n </div>\n <ng-container *ngIf=\"!customError.hasChildNodes()\">{{invalidMessage | async}}</ng-container>\n </div>\n\n <small *ngIf=\"description !== undefined && !isStrengthMeter\" [id]=\"id + '-description'\" class=\"form-text\">\n {{description !== true ? description : (strengthMeterDescription | async)}}\n </small>\n\n <small class=\"password-caps form-text text-warning position-absolute bg-white w-100\">\n {{'it.form.caps-inserted' | translate}}\n </small>\n\n <div *ngIf=\"isStrengthMeter\" class=\"password-strength-meter\">\n <small [id]=\"id + '-description'\" class=\"form-text text-muted\"\n [attr.data-bs-short-pass]=\"'it.form.password-strength-meter.password-short' | translate\"\n [attr.data-bs-bad-pas]=\"'it.form.password-strength-meter.password-bad' | translate\"\n [attr.data-bs-good-pass]=\"'it.form.password-strength-meter.password-good' | translate\"\n [attr.data-bs-strong-pass]=\"'it.form.password-strength-meter.password-strong' | translate\">\n {{description !== undefined && description !== true ? description : (strengthMeterDescription | async)}}\n </small>\n\n <div class=\"password-meter progress rounded-0 position-absolute\">\n <div class=\"row position-absolute w-100 m-0\">\n <div class=\"col-3 border-start border-end border-white\"></div>\n <div class=\"col-3 border-start border-end border-white\"></div>\n <div class=\"col-3 border-start border-end border-white\"></div>\n <div class=\"col-3 border-start border-end border-white\"></div>\n </div>\n <div class=\"progress-bar bg-muted\" role=\"progressbar\" aria-valuenow=\"0\" aria-valuemin=\"0\"\n aria-valuemax=\"100\"></div>\n </div>\n </div>\n</div>\n", styles: [".form-group input:focus:not(.focus--mouse){box-shadow:inherit!important;border-color:inherit!important}.form-group label:not(.active):has(+ input:-webkit-autofill){transform:translateY(-75%)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: IconComponent, selector: "it-icon[name]", inputs: ["name", "size", "color", "padded", "svgClass"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2882
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: PasswordInputComponent, decorators: [{
2883
- type: Component,
2884
- args: [{ selector: 'it-password-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-group\">\n <label *ngIf=\"label\" [for]=\"id\" [class.active]=\"!!control.value || !!placeholder\">{{label}}</label>\n <input [id]=\"id\" #input\n type=\"password\"\n class=\"form-control input-password\"\n [class.is-invalid]=\"isInvalid\"\n [class.is-valid]=\"isValid\"\n [formControl]=\"control\"\n [placeholder]=\"placeholder\"\n [attr.aria-describedby]=\"id + '-description'\"\n [autocomplete]=\"isConfirmPasswordField ? 'off' : undefined\">\n\n <span class=\"password-icon\" aria-hidden=\"true\">\n <it-icon name=\"password-visible\" size=\"sm\" class=\"password-icon-visible\"></it-icon>\n <it-icon name=\"password-invisible\" size=\"sm\" class=\"password-icon-invisible d-none\"></it-icon>\n </span>\n\n <div *ngIf=\"isInvalid\" [id]=\"id + '-error'\" class=\"form-feedback just-validate-error-label\">\n <div #customError>\n <ng-content select=\"[error]\"></ng-content>\n </div>\n <ng-container *ngIf=\"!customError.hasChildNodes()\">{{invalidMessage | async}}</ng-container>\n </div>\n\n <small *ngIf=\"description !== undefined && !isStrengthMeter\" [id]=\"id + '-description'\" class=\"form-text\">\n {{description !== true ? description : (strengthMeterDescription | async)}}\n </small>\n\n <small class=\"password-caps form-text text-warning position-absolute bg-white w-100\">\n {{'it.form.caps-inserted' | translate}}\n </small>\n\n <div *ngIf=\"isStrengthMeter\" class=\"password-strength-meter\">\n <small [id]=\"id + '-description'\" class=\"form-text text-muted\"\n [attr.data-bs-short-pass]=\"'it.form.password-strength-meter.password-short' | translate\"\n [attr.data-bs-bad-pas]=\"'it.form.password-strength-meter.password-bad' | translate\"\n [attr.data-bs-good-pass]=\"'it.form.password-strength-meter.password-good' | translate\"\n [attr.data-bs-strong-pass]=\"'it.form.password-strength-meter.password-strong' | translate\">\n {{description !== undefined && description !== true ? description : (strengthMeterDescription | async)}}\n </small>\n\n <div class=\"password-meter progress rounded-0 position-absolute\">\n <div class=\"row position-absolute w-100 m-0\">\n <div class=\"col-3 border-start border-end border-white\"></div>\n <div class=\"col-3 border-start border-end border-white\"></div>\n <div class=\"col-3 border-start border-end border-white\"></div>\n <div class=\"col-3 border-start border-end border-white\"></div>\n </div>\n <div class=\"progress-bar bg-muted\" role=\"progressbar\" aria-valuenow=\"0\" aria-valuemin=\"0\"\n aria-valuemax=\"100\"></div>\n </div>\n </div>\n</div>\n", styles: [".form-group input:focus:not(.focus--mouse){box-shadow:inherit!important;border-color:inherit!important}.form-group label:not(.active):has(+ input:-webkit-autofill){transform:translateY(-75%)}\n"] }]
2885
- }], propDecorators: { required: [{
2886
- type: Input
2887
- }], minLength: [{
2888
- type: Input
2889
- }], useNumber: [{
2890
- type: Input
2891
- }], useCapitalCase: [{
2892
- type: Input
2893
- }], useSmallCase: [{
2894
- type: Input
2895
- }], useSpecialCharacters: [{
2896
- type: Input
2897
- }], placeholder: [{
2898
- type: Input
2899
- }], description: [{
2900
- type: Input
2901
- }], showStrengthMeter: [{
2902
- type: Input
2903
- }], confirmPasswordField: [{
2904
- type: Input
2905
- }], inputElement: [{
2906
- type: ViewChild,
2907
- args: ['input']
2908
- }] } });
2909
-
2910
- class RadioButtonComponent extends AbstractFormComponent {
2911
- constructor() {
2912
- super(...arguments);
2913
- /**
2914
- * If show radio inline
2915
- * @default false
2916
- */
2917
- this.inline = false;
2918
- /**
2919
- * If is radio group
2920
- * @default false
2921
- */
2922
- this.group = false;
2923
- }
2924
- get isInline() {
2925
- return isTrueBooleanInput(this.inline);
2926
- }
2927
- get isGroup() {
2928
- return isTrueBooleanInput(this.group);
2929
- }
2930
- get name() {
2931
- let name = '';
2932
- if (this._ngControl) {
2933
- name = this._ngControl.name?.toString() || '';
2934
- // Retrieve parent name, prevent duplicate name inside FormArray or nested FormGroup
2935
- let control = this._ngControl.control?.parent;
2936
- while (control?.parent) {
2937
- const controls = control?.parent?.controls || {};
2938
- const parentName = Object.keys(controls).find(name => control === controls[name]) || null;
2939
- if (!parentName) {
2940
- break;
2941
- }
2942
- name = `${parentName}.${name}`; // parent.0.radioName
2943
- control = control.parent;
2944
- }
2945
- }
2946
- return name;
2947
- }
2948
- ngOnInit() {
2949
- super.ngOnInit();
2950
- if (this.control.value || !this.value || isFalseBooleanInput(this.checked)) {
2951
- return;
2952
- }
2953
- this.writeValue(this.value);
2954
- return this.onChange(this.value);
2955
- }
2956
- }
2957
- RadioButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: RadioButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2958
- RadioButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: RadioButtonComponent, selector: "it-radio-button[value]", inputs: { value: "value", inline: "inline", group: "group", checked: "checked" }, usesInheritance: true, ngImport: i0, template: "<ng-container>\n <div class=\"form-check\"\n [class.form-check-group]=\"isGroup\"\n [class.form-check-inline]=\"isInline\">\n\n <input\n [id]=\"id\"\n type=\"radio\"\n [value]=\"value\"\n class=\"form-check-input\"\n [name]=\"name\"\n [class.is-invalid]=\"isInvalid\"\n [class.is-valid]=\"isValid\"\n [formControl]=\"control\"\n [attr.aria-describedby]=\"id + '-help'\">\n\n <label class=\"form-check-label\" [for]=\"id\">\n <div #customLabel>\n <ng-content select=\"[label]\"></ng-content>\n </div>\n <ng-container *ngIf=\"!customLabel.hasChildNodes()\">{{label}}</ng-container>\n </label>\n\n <small *ngIf=\"isGroup\" [id]=\"id + '-help'\" class=\"form-text\">\n <ng-content></ng-content>\n </small>\n\n <div *ngIf=\"isInvalid && isGroup\" class=\"form-feedback just-validate-error-label\" [id]=\"id + '-error'\">\n <div #customError>\n <ng-content select=\"[error]\"></ng-content>\n </div>\n <ng-container *ngIf=\"!customError.hasChildNodes()\">{{invalidMessage | async}}</ng-container>\n </div>\n\n </div>\n\n <div *ngIf=\"isInvalid && !isGroup\" class=\"form-feedback just-validate-error-label\" [id]=\"id + '-error'\">\n <div #customError>\n <ng-content select=\"[error]\"></ng-content>\n </div>\n <ng-container *ngIf=\"!customError.hasChildNodes()\">{{invalidMessage | async}}</ng-container>\n </div>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2959
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: RadioButtonComponent, decorators: [{
2960
- type: Component,
2961
- args: [{ selector: 'it-radio-button[value]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container>\n <div class=\"form-check\"\n [class.form-check-group]=\"isGroup\"\n [class.form-check-inline]=\"isInline\">\n\n <input\n [id]=\"id\"\n type=\"radio\"\n [value]=\"value\"\n class=\"form-check-input\"\n [name]=\"name\"\n [class.is-invalid]=\"isInvalid\"\n [class.is-valid]=\"isValid\"\n [formControl]=\"control\"\n [attr.aria-describedby]=\"id + '-help'\">\n\n <label class=\"form-check-label\" [for]=\"id\">\n <div #customLabel>\n <ng-content select=\"[label]\"></ng-content>\n </div>\n <ng-container *ngIf=\"!customLabel.hasChildNodes()\">{{label}}</ng-container>\n </label>\n\n <small *ngIf=\"isGroup\" [id]=\"id + '-help'\" class=\"form-text\">\n <ng-content></ng-content>\n </small>\n\n <div *ngIf=\"isInvalid && isGroup\" class=\"form-feedback just-validate-error-label\" [id]=\"id + '-error'\">\n <div #customError>\n <ng-content select=\"[error]\"></ng-content>\n </div>\n <ng-container *ngIf=\"!customError.hasChildNodes()\">{{invalidMessage | async}}</ng-container>\n </div>\n\n </div>\n\n <div *ngIf=\"isInvalid && !isGroup\" class=\"form-feedback just-validate-error-label\" [id]=\"id + '-error'\">\n <div #customError>\n <ng-content select=\"[error]\"></ng-content>\n </div>\n <ng-container *ngIf=\"!customError.hasChildNodes()\">{{invalidMessage | async}}</ng-container>\n </div>\n</ng-container>\n" }]
2962
- }], propDecorators: { value: [{
2963
- type: Input
2964
- }], inline: [{
2965
- type: Input
2966
- }], group: [{
2967
- type: Input
2968
- }], checked: [{
2969
- type: Input
2970
- }] } });
2971
-
2972
- class SelectComponent extends AbstractFormComponent {
2973
- ngOnInit() {
2974
- super.ngOnInit();
2975
- if (this.control.value) {
2976
- return;
2977
- }
2978
- const selectedOption = this.options?.find(this.optionIsSelected);
2979
- if (selectedOption) {
2980
- this.writeValue(selectedOption.value);
2981
- return this.onChange(selectedOption.value);
2982
- }
2983
- const selectedGroupOption = this.groups?.flatMap(g => g.options).find(this.optionIsSelected);
2984
- if (selectedGroupOption) {
2985
- this.writeValue(selectedGroupOption.value);
2986
- this.onChange(selectedGroupOption.value);
2987
- }
2988
- }
2989
- /**
2990
- * Check if the option is selected
2991
- * @param option the option
2992
- */
2993
- optionIsSelected(option) {
2994
- if (option.selected === true) {
2995
- return true;
2996
- }
2997
- if (typeof option.selected === 'function') {
2998
- return option.selected(this.control.value);
2999
- }
3000
- return false;
3001
- }
3002
- /**
3003
- * Check if the option is disabled
3004
- * @param option the option
3005
- */
3006
- optionIsDisabled(option) {
3007
- if (option.disabled === true) {
3008
- return true;
3009
- }
3010
- if (typeof option.disabled === 'function') {
3011
- return option.disabled(this.control.value);
3012
- }
3013
- return false;
3014
- }
3015
- }
3016
- SelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: SelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3017
- SelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: SelectComponent, selector: "it-select", inputs: { options: "options", groups: "groups", description: "description" }, usesInheritance: true, ngImport: i0, template: "<div class=\"select-wrapper\">\n <label [for]=\"id\">{{label}}</label>\n <select [id]=\"id\" [formControl]=\"control\" [attr.aria-describedby]=\"id + '-description'\">\n <ng-container *ngIf=\"options\">\n <option *ngFor=\"let option of options\" [disabled]=\"optionIsDisabled(option)\" [value]=\"option.value\">\n {{option.text ?? option.value}}\n </option>\n </ng-container>\n\n <ng-container *ngIf=\"groups\">\n <optgroup *ngFor=\"let group of groups\" [label]=\"group.label\">\n <option *ngFor=\"let option of group.options\" [disabled]=\"optionIsDisabled(option)\" [value]=\"option.value\">\n {{option.text ?? option.value}}\n </option>\n </optgroup>\n </ng-container>\n </select>\n <small *ngIf=\"description\" [id]=\"id + '-description'\" class=\"form-text\">{{description}}</small>\n</div>\n", styles: [".select-wrapper{margin-bottom:1.7rem}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
3018
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: SelectComponent, decorators: [{
3019
- type: Component,
3020
- args: [{ selector: 'it-select', template: "<div class=\"select-wrapper\">\n <label [for]=\"id\">{{label}}</label>\n <select [id]=\"id\" [formControl]=\"control\" [attr.aria-describedby]=\"id + '-description'\">\n <ng-container *ngIf=\"options\">\n <option *ngFor=\"let option of options\" [disabled]=\"optionIsDisabled(option)\" [value]=\"option.value\">\n {{option.text ?? option.value}}\n </option>\n </ng-container>\n\n <ng-container *ngIf=\"groups\">\n <optgroup *ngFor=\"let group of groups\" [label]=\"group.label\">\n <option *ngFor=\"let option of group.options\" [disabled]=\"optionIsDisabled(option)\" [value]=\"option.value\">\n {{option.text ?? option.value}}\n </option>\n </optgroup>\n </ng-container>\n </select>\n <small *ngIf=\"description\" [id]=\"id + '-description'\" class=\"form-text\">{{description}}</small>\n</div>\n", styles: [".select-wrapper{margin-bottom:1.7rem}\n"] }]
3021
- }], propDecorators: { options: [{
3022
- type: Input
3023
- }], groups: [{
3024
- type: Input
3025
- }], description: [{
3026
- type: Input
3027
- }] } });
3028
-
3029
- class TextareaComponent extends AbstractFormComponent {
3030
- constructor() {
3031
- super(...arguments);
3032
- /**
3033
- * Textarea Rows
3034
- * @default 3
3035
- */
3036
- this.rows = 3;
3037
- /**
3038
- * The textarea placeholder
3039
- */
3040
- this.placeholder = '';
3041
- }
3042
- /**
3043
- * Return the invalid message string from TranslateService
3044
- */
3045
- get invalidMessage() {
3046
- if (this.control.hasError('maxlength')) {
3047
- const error = this.getError('maxlength');
3048
- return this._translateService.get('it.errors.max-length-invalid', { max: error.requiredLength });
3049
- }
3050
- if (this.control.hasError('pattern')) {
3051
- const error = this.getError('pattern');
3052
- return this._translateService.get('it.errors.pattern-invalid', { pattern: error.requiredPattern });
3053
- }
3054
- return super.invalidMessage;
3055
- }
3056
- }
3057
- TextareaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: TextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3058
- TextareaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: TextareaComponent, selector: "it-textarea", inputs: { rows: "rows", placeholder: "placeholder", description: "description" }, usesInheritance: true, ngImport: i0, template: "<div class=\"form-group\">\n <label *ngIf=\"label\" [for]=\"id\" [class.active]=\"!!control.value || !!placeholder\">{{label}}</label>\n <textarea\n [id]=\"id\"\n [rows]=\"rows\"\n [class.is-invalid]=\"isInvalid\"\n [class.is-valid]=\"isValid\"\n [placeholder]=\"placeholder\"\n [formControl]=\"control\"\n (blur)=\"markAsTouched()\"></textarea>\n\n <small *ngIf=\"description\" [id]=\"id + '-description'\" class=\"form-text\">{{description}}</small>\n <div *ngIf=\"isInvalid\" class=\"form-feedback just-validate-error-label\" [id]=\"id + '-error'\">\n <div #customError><ng-content select=\"[error]\"></ng-content></div>\n <ng-container *ngIf=\"!customError.hasChildNodes()\">{{invalidMessage | async}}</ng-container>\n </div>\n</div>\n", styles: ["textarea.is-invalid{border-color:#cc334d}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3059
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: TextareaComponent, decorators: [{
3060
- type: Component,
3061
- args: [{ selector: 'it-textarea', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-group\">\n <label *ngIf=\"label\" [for]=\"id\" [class.active]=\"!!control.value || !!placeholder\">{{label}}</label>\n <textarea\n [id]=\"id\"\n [rows]=\"rows\"\n [class.is-invalid]=\"isInvalid\"\n [class.is-valid]=\"isValid\"\n [placeholder]=\"placeholder\"\n [formControl]=\"control\"\n (blur)=\"markAsTouched()\"></textarea>\n\n <small *ngIf=\"description\" [id]=\"id + '-description'\" class=\"form-text\">{{description}}</small>\n <div *ngIf=\"isInvalid\" class=\"form-feedback just-validate-error-label\" [id]=\"id + '-error'\">\n <div #customError><ng-content select=\"[error]\"></ng-content></div>\n <ng-container *ngIf=\"!customError.hasChildNodes()\">{{invalidMessage | async}}</ng-container>\n </div>\n</div>\n", styles: ["textarea.is-invalid{border-color:#cc334d}\n"] }]
3062
- }], propDecorators: { rows: [{
3063
- type: Input
3064
- }], placeholder: [{
3065
- type: Input
3066
- }], description: [{
3067
- type: Input
3068
- }] } });
3069
-
3070
- class FileUtils {
3071
- /**
3072
- * Return the file size string
3073
- * @param file the file
3074
- * @param decimals decimal to show
3075
- */
3076
- static getFileSizeString(file, decimals = 2) {
3077
- const bytes = file.size;
3078
- if (!+bytes) {
3079
- return '0 Bytes';
3080
- }
3081
- const k = 1024;
3082
- const dm = decimals < 0 ? 0 : decimals;
3083
- const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
3084
- const i = Math.floor(Math.log(bytes) / Math.log(k));
3085
- return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;
3086
- }
3087
- /**
3088
- * Convert a file to base64 string
3089
- * @param file the base64 string
3090
- */
3091
- static fileToBase64(file) {
3092
- const reader = new FileReader();
3093
- reader.readAsDataURL(file);
3094
- return new Observable(observer => {
3095
- reader.onload = (e) => {
3096
- const target = e.target;
3097
- if (!target || !target.result || target.result instanceof ArrayBuffer) {
3098
- return observer.error('Error on parse');
3099
- }
3100
- observer.next(target.result);
3101
- observer.complete();
3102
- };
3103
- reader.onerror = error => {
3104
- observer.error(error);
3105
- };
3106
- });
3107
- }
3108
- /**
3109
- * Convert base64 to Blob
3110
- * @param base64 the base64 string
3111
- * @param mimeType the <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types">MIME type</a> (example 'application/pdf')
3112
- */
3113
- static base64ToBlob(base64, mimeType) {
3114
- const byteString = window.atob(base64);
3115
- const arrayBuffer = new ArrayBuffer(byteString.length);
3116
- const int8Array = new Uint8Array(arrayBuffer);
3117
- for (let i = 0; i < byteString.length; i++) {
3118
- int8Array[i] = byteString.charCodeAt(i);
3119
- }
3120
- return new Blob([int8Array], { type: mimeType });
3121
- }
3122
- /**
3123
- * Convert base64 to File
3124
- * @param base64 the base64 string
3125
- * @param mimeType the <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types">MIME type</a> (example 'application/pdf')
3126
- * @param filename the file name
3127
- */
3128
- static base64ToFile(base64, mimeType, filename) {
3129
- const fileBlob = FileUtils.base64ToBlob(base64, mimeType);
3130
- return new File([fileBlob], filename, { type: mimeType });
3131
- }
3132
- /**
3133
- * Extract the MIME type from base64 string
3134
- * @param base64 the base64 string
3135
- */
3136
- static getMimeTypeFromBase64(base64) {
3137
- const mime = base64.match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);
3138
- return (mime && mime.length) ? mime[1] : undefined;
3139
- }
3140
- }
3141
-
3142
- class UploadDragDropComponent extends AbstractComponent {
3143
- constructor() {
3144
- super(...arguments);
3145
- /**
3146
- * The accepted file type to upload <br>
3147
- * Possible values: <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types">MIME Types</a> separated by comma
3148
- * @example application/pdf,image/png
3149
- * @default *
3150
- */
3151
- this.accept = '*';
3152
- /**
3153
- * Fired when file start to upload
3154
- */
3155
- this.fileStartUpload = new EventEmitter();
3156
- this.isDragover = false;
3157
- this.isLoading = false;
3158
- this.isSuccess = false;
3159
- }
3160
- ngAfterViewInit() {
3161
- super.ngAfterViewInit();
3162
- if (this.donutElement) {
3163
- this.donut = ProgressDonut.getOrCreateInstance(this.donutElement.nativeElement);
3164
- }
3165
- }
3166
- // Dragover listener
3167
- onDragOver(evt) {
3168
- evt.preventDefault();
3169
- evt.stopPropagation();
3170
- this.isDragover = !this.isLoading;
3171
- }
3172
- // Dragleave listener
3173
- onDragLeave(evt) {
3174
- evt.preventDefault();
3175
- evt.stopPropagation();
3176
- this.isDragover = false;
3177
- }
3178
- // Drop leave listener
3179
- onDrop(evt) {
3180
- evt.preventDefault();
3181
- evt.stopPropagation();
3182
- this.isDragover = false;
3183
- const files = evt.dataTransfer?.files;
3184
- if (this.isLoading || !files?.length) {
3185
- return;
3186
- }
3187
- this.start(files[0]);
3188
- }
3189
- /**
3190
- * On load file from input
3191
- * @param event
3192
- */
3193
- onLoadFile(event) {
3194
- const files = event.target?.files;
3195
- if (!files?.length) {
3196
- return;
3197
- }
3198
- this.start(files[0]);
3199
- }
3200
- /**
3201
- * Start the upload file
3202
- * @param file
3203
- */
3204
- start(file) {
3205
- if (this.accept !== '*' && !this.accept.includes(file.type)) {
3206
- return;
3207
- }
3208
- this.reset();
3209
- this.isLoading = true;
3210
- const splitName = file.name.split('.');
3211
- this.filename = splitName[0];
3212
- this.extension = splitName[1]?.toUpperCase();
3213
- this.fileSize = FileUtils.getFileSizeString(file);
3214
- this.fileStartUpload.emit(file);
3215
- }
3216
- /**
3217
- * Percentage of upload
3218
- * @param value the percentage [0 - 100]
3219
- */
3220
- progress(value) {
3221
- if (!this.isLoading) {
3222
- return;
3223
- }
3224
- if (value >= 100) {
3225
- this.success();
3226
- }
3227
- else {
3228
- this.donut?.set(((value < 0) ? 0 : value) / 100);
3229
- }
3230
- }
3231
- /**
3232
- * Upload success
3233
- */
3234
- success() {
3235
- this.isLoading = false;
3236
- this.isSuccess = true;
3237
- this._changeDetectorRef.detectChanges();
3238
- }
3239
- /**
3240
- * Reset file uploader
3241
- */
3242
- reset() {
3243
- this.isLoading = false;
3244
- this.isSuccess = false;
3245
- this.filename = this.extension = this.fileSize = undefined;
3246
- this.donut?.set(0);
3247
- this._changeDetectorRef.detectChanges();
3248
- }
3249
- }
3250
- UploadDragDropComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: UploadDragDropComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3251
- UploadDragDropComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: UploadDragDropComponent, selector: "it-upload-drag-drop", inputs: { accept: "accept" }, outputs: { fileStartUpload: "fileStartUpload" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" } }, viewQueries: [{ propertyName: "donutElement", first: true, predicate: ["donutElement"], descendants: true }], exportAs: ["itUploadDragDrop"], usesInheritance: true, ngImport: i0, template: "<div class=\"upload-dragdrop\" [class.dragover]=\"isDragover\" [class.loading]=\"isLoading\" [class.success]=\"isSuccess\">\n <div class=\"upload-dragdrop-image\">\n <img src=\"/bootstrap-italia/dist/assets/upload-drag-drop-icon.svg\" alt=\"drag-drop-icon\" aria-hidden=\"true\">\n <div class=\"upload-dragdrop-loading\">\n <div class=\"progress-donut\" #donutElement></div>\n </div>\n <div class=\"upload-dragdrop-success\">\n <it-icon name=\"check\"></it-icon>\n </div>\n </div>\n <div class=\"upload-dragdrop-text\">\n <p class=\"upload-dragdrop-weight\">\n <it-icon name=\"file\" size=\"xs\"></it-icon>\n {{extension}} ({{fileSize}})\n </p>\n <h5>{{filename || ('it.form.upload-drag-file'|translate)}}</h5>\n <p *ngIf=\"isLoading\">{{'it.form.upload-loading'|translate}}</p>\n <p *ngIf=\"isSuccess\">{{'it.form.upload-complete'|translate}}</p>\n <p *ngIf=\"!isLoading && !isSuccess\">{{'it.form.upload-or'|translate}}\n <input type=\"file\" [id]=\"id\" class=\"upload-dragdrop-input\" [accept]=\"accept\" (change)=\"onLoadFile($event)\"/>\n <label [for]=\"id\">{{'it.form.upload-select-device'|translate}}</label>\n </p>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "it-icon[name]", inputs: ["name", "size", "color", "padded", "svgClass"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3252
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: UploadDragDropComponent, decorators: [{
3253
- type: Component,
3254
- args: [{ selector: 'it-upload-drag-drop', exportAs: 'itUploadDragDrop', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"upload-dragdrop\" [class.dragover]=\"isDragover\" [class.loading]=\"isLoading\" [class.success]=\"isSuccess\">\n <div class=\"upload-dragdrop-image\">\n <img src=\"/bootstrap-italia/dist/assets/upload-drag-drop-icon.svg\" alt=\"drag-drop-icon\" aria-hidden=\"true\">\n <div class=\"upload-dragdrop-loading\">\n <div class=\"progress-donut\" #donutElement></div>\n </div>\n <div class=\"upload-dragdrop-success\">\n <it-icon name=\"check\"></it-icon>\n </div>\n </div>\n <div class=\"upload-dragdrop-text\">\n <p class=\"upload-dragdrop-weight\">\n <it-icon name=\"file\" size=\"xs\"></it-icon>\n {{extension}} ({{fileSize}})\n </p>\n <h5>{{filename || ('it.form.upload-drag-file'|translate)}}</h5>\n <p *ngIf=\"isLoading\">{{'it.form.upload-loading'|translate}}</p>\n <p *ngIf=\"isSuccess\">{{'it.form.upload-complete'|translate}}</p>\n <p *ngIf=\"!isLoading && !isSuccess\">{{'it.form.upload-or'|translate}}\n <input type=\"file\" [id]=\"id\" class=\"upload-dragdrop-input\" [accept]=\"accept\" (change)=\"onLoadFile($event)\"/>\n <label [for]=\"id\">{{'it.form.upload-select-device'|translate}}</label>\n </p>\n </div>\n</div>\n" }]
3255
- }], propDecorators: { accept: [{
3256
- type: Input
3257
- }], fileStartUpload: [{
3258
- type: Output
3259
- }], donutElement: [{
3260
- type: ViewChild,
3261
- args: ['donutElement']
3262
- }], onDragOver: [{
3263
- type: HostListener,
3264
- args: ['dragover', ['$event']]
3265
- }], onDragLeave: [{
3266
- type: HostListener,
3267
- args: ['dragleave', ['$event']]
3268
- }], onDrop: [{
3269
- type: HostListener,
3270
- args: ['drop', ['$event']]
3271
- }] } });
3272
-
3273
- class UploadFileListComponent extends AbstractComponent {
3274
- constructor() {
3275
- super(...arguments);
3276
- /**
3277
- * The accepted file type to upload <br>
3278
- * Possible values: <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types">MIME Types</a> separated by comma
3279
- * @example application/pdf,image/png
3280
- * @default *
3281
- */
3282
- this.accept = '*';
3283
- /**
3284
- * If upload multiple files
3285
- */
3286
- this.multiple = true;
3287
- /**
3288
- * Fired when upload new files
3289
- */
3290
- this.uploadFiles = new EventEmitter();
3291
- /**
3292
- * Fired on delete item button click
3293
- */
3294
- this.deleteItem = new EventEmitter();
3295
- /**
3296
- * Cache to preview image
3297
- */
3298
- this.previewImages = new Map();
3299
- }
3300
- ngOnInit() {
3301
- if (this.isImageList && this.accept === '*') {
3302
- this.accept = 'image/*';
3303
- }
3304
- }
3305
- ngOnChanges(changes) {
3306
- if (changes['fileList'] && this.isImageList) {
3307
- const images$ = this.fileList.map(item => FileUtils.fileToBase64(item.file).pipe(take(1), tap(base64 => this.previewImages.set(item.id, base64))));
3308
- forkJoin(images$).subscribe(() => {
3309
- this._changeDetectorRef.detectChanges();
3310
- super.ngOnChanges(changes);
3311
- });
3312
- }
3313
- else {
3314
- super.ngOnChanges(changes);
3315
- }
3316
- }
3317
- get isMultipleInput() {
3318
- return isTrueBooleanInput(this.multiple);
3319
- }
3320
- get isImageList() {
3321
- return isTrueBooleanInput(this.images);
3322
- }
3323
- get isHideLoadButton() {
3324
- return isTrueBooleanInput(this.hideLoadButton);
3325
- }
3326
- /**
3327
- * On load file from input
3328
- * @param event
3329
- */
3330
- onLoadFiles(event) {
3331
- const files = event.target?.files;
3332
- if (!files || !files.length) {
3333
- return;
3334
- }
3335
- this.uploadFiles.emit(files);
3336
- }
3337
- /**
3338
- * Get the file size string
3339
- * @param file
3340
- */
3341
- getFileSize(file) {
3342
- return FileUtils.getFileSizeString(file);
3343
- }
3344
- }
3345
- UploadFileListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: UploadFileListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3346
- UploadFileListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: UploadFileListComponent, selector: "it-upload-file-list[fileList]", inputs: { fileList: "fileList", accept: "accept", multiple: "multiple", images: "images", hideLoadButton: "hideLoadButton" }, outputs: { uploadFiles: "uploadFiles", deleteItem: "deleteItem" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"!isHideLoadButton\">\n <input type=\"file\" [id]=\"id\" class=\"upload\" [accept]=\"accept\" [multiple]=\"isMultipleInput\"\n (change)=\"onLoadFiles($event)\" />\n <label [for]=\"id\">\n <it-icon name=\"upload\" size=\"sm\"></it-icon>\n <span>{{'it.form.upload'|translate}}</span>\n </label>\n</ng-container>\n\n<ul class=\"upload-file-list\" [class.upload-file-list-image]=\"isImageList\" *ngIf=\"fileList.length\">\n <li *ngFor=\"let item of fileList\" class=\"upload-file\"\n [class.error]=\"item.error\"\n [class.uploading]=\"!item.error && item.progress !== undefined && item.progress > 0 && item.progress < 100\"\n [class.success]=\"!item.error && (!item.progress || item.progress >= 100)\">\n\n <div class=\"upload-image\" *ngIf=\"isImageList; else icon\">\n <img [attr.src]=\"previewImages.get(item.id)\" [alt]=\"item.file.name\" />\n </div>\n <ng-template #icon>\n <it-icon name=\"file\" size=\"sm\" [color]=\"!item.error ? (item.progress ? 'secondary' : 'primary') : 'danger'\"></it-icon>\n </ng-template>\n\n <p [itTooltip]=\"item.tooltip\">\n <span class=\"visually-hidden\">{{'it.form.uploaded-file'|translate : { name: item.file.name } }}</span>\n {{item.file.name}} <span class=\"upload-file-weight\">{{getFileSize(item.file)}}</span>\n </p>\n\n <button *ngIf=\"item.removable && (!item.progress || item.progress < 100)\" type=\"button\" (click)=\"deleteItem.emit(item)\">\n <span class=\"visually-hidden\">{{'it.form.delete-file'|translate : { name: item.file.name } }}</span>\n <it-icon name=\"close\"></it-icon>\n </button>\n <button *ngIf=\"(!item.removable && !item.progress) || (item.progress !== undefined && item.progress >= 100)\" type=\"button\" disabled>\n <span class=\"visually-hidden\">{{'it.form.upload-complete'|translate}}</span>\n <it-icon name=\"check\"></it-icon>\n </button>\n\n <it-progress-bar *ngIf=\"!item.error && item.progress !== undefined && item.progress > 0 && item.progress < 100\"\n [value]=\"item.progress\"></it-progress-bar>\n </li>\n</ul>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ProgressBarComponent, selector: "it-progress-bar[value]", inputs: ["value", "showLabel", "indeterminate", "color"] }, { kind: "directive", type: TooltipDirective, selector: "[itTooltip]", inputs: ["itTooltip", "tooltipPlacement", "tooltipHtml"], outputs: ["showEvent", "shownEvent", "hideEvent", "hiddenEvent", "insertedEvent"], exportAs: ["itTooltip"] }, { kind: "component", type: IconComponent, selector: "it-icon[name]", inputs: ["name", "size", "color", "padded", "svgClass"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
3347
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: UploadFileListComponent, decorators: [{
3348
- type: Component,
3349
- args: [{ selector: 'it-upload-file-list[fileList]', template: "<ng-container *ngIf=\"!isHideLoadButton\">\n <input type=\"file\" [id]=\"id\" class=\"upload\" [accept]=\"accept\" [multiple]=\"isMultipleInput\"\n (change)=\"onLoadFiles($event)\" />\n <label [for]=\"id\">\n <it-icon name=\"upload\" size=\"sm\"></it-icon>\n <span>{{'it.form.upload'|translate}}</span>\n </label>\n</ng-container>\n\n<ul class=\"upload-file-list\" [class.upload-file-list-image]=\"isImageList\" *ngIf=\"fileList.length\">\n <li *ngFor=\"let item of fileList\" class=\"upload-file\"\n [class.error]=\"item.error\"\n [class.uploading]=\"!item.error && item.progress !== undefined && item.progress > 0 && item.progress < 100\"\n [class.success]=\"!item.error && (!item.progress || item.progress >= 100)\">\n\n <div class=\"upload-image\" *ngIf=\"isImageList; else icon\">\n <img [attr.src]=\"previewImages.get(item.id)\" [alt]=\"item.file.name\" />\n </div>\n <ng-template #icon>\n <it-icon name=\"file\" size=\"sm\" [color]=\"!item.error ? (item.progress ? 'secondary' : 'primary') : 'danger'\"></it-icon>\n </ng-template>\n\n <p [itTooltip]=\"item.tooltip\">\n <span class=\"visually-hidden\">{{'it.form.uploaded-file'|translate : { name: item.file.name } }}</span>\n {{item.file.name}} <span class=\"upload-file-weight\">{{getFileSize(item.file)}}</span>\n </p>\n\n <button *ngIf=\"item.removable && (!item.progress || item.progress < 100)\" type=\"button\" (click)=\"deleteItem.emit(item)\">\n <span class=\"visually-hidden\">{{'it.form.delete-file'|translate : { name: item.file.name } }}</span>\n <it-icon name=\"close\"></it-icon>\n </button>\n <button *ngIf=\"(!item.removable && !item.progress) || (item.progress !== undefined && item.progress >= 100)\" type=\"button\" disabled>\n <span class=\"visually-hidden\">{{'it.form.upload-complete'|translate}}</span>\n <it-icon name=\"check\"></it-icon>\n </button>\n\n <it-progress-bar *ngIf=\"!item.error && item.progress !== undefined && item.progress > 0 && item.progress < 100\"\n [value]=\"item.progress\"></it-progress-bar>\n </li>\n</ul>\n" }]
3350
- }], propDecorators: { fileList: [{
3351
- type: Input
3352
- }], accept: [{
3353
- type: Input
3354
- }], multiple: [{
3355
- type: Input
3356
- }], images: [{
3357
- type: Input
3358
- }], hideLoadButton: [{
3359
- type: Input
3360
- }], uploadFiles: [{
3361
- type: Output
3362
- }], deleteItem: [{
3363
- type: Output
3364
- }] } });
3365
-
3366
- class BackButtonComponent {
3367
- constructor(_location) {
3368
- this._location = _location;
3369
- /**
3370
- * Back button style
3371
- * - <b>link</b>: use a link with icon and text
3372
- * - <b>button</b>: use a button with icon and text
3373
- * @default button
3374
- */
3375
- this.buttonStyle = 'button';
3376
- /**
3377
- * Button direction
3378
- * - <b>left</b>: Back direction
3379
- * - <b>up</b>: Upper direction
3380
- * @default left
3381
- */
3382
- this.direction = 'left';
3383
- /**
3384
- * Show/Hide icon
3385
- * @default true
3386
- */
3387
- this.showIcon = true;
3388
- /**
3389
- * Show/Hide text
3390
- * @default true
3391
- */
3392
- this.showText = true;
3393
- }
3394
- get isShowIcon() {
3395
- return isTrueBooleanInput(this.showIcon);
3396
- }
3397
- get isShowText() {
3398
- return isTrueBooleanInput(this.showText);
3399
- }
3400
- /**
3401
- * Go back function
3402
- */
3403
- goBack(event) {
3404
- event.preventDefault();
3405
- if (this.backFn) {
3406
- return this.backFn(this._location);
3407
- }
3408
- this._location.back();
3409
- }
3410
- }
3411
- BackButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: BackButtonComponent, deps: [{ token: i1.Location }], target: i0.ɵɵFactoryTarget.Component });
3412
- BackButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: BackButtonComponent, selector: "it-back-button", inputs: { buttonStyle: "buttonStyle", direction: "direction", showIcon: "showIcon", showText: "showText", backFn: "backFn" }, exportAs: ["itBackButton"], ngImport: i0, template: "<a *ngIf=\"buttonStyle === 'link'\" href=\"#\" class=\"go-back\" (click)=\"goBack($event)\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</a>\n\n<button *ngIf=\"buttonStyle === 'button'\" itButton=\"primary\" class=\"go-back\" (click)=\"goBack($event)\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</button>\n\n<ng-template #content>\n <it-icon *ngIf=\"isShowIcon\"\n size=\"sm\"\n [name]=\"direction === 'left' ? 'arrow-left' : 'arrow-up'\"\n [color]=\"buttonStyle === 'link' ? 'primary' : 'white'\"\n [class.me-2]=\"isShowText\"></it-icon>\n\n <span [class.visually-hidden]=\"!isShowText\">\n {{(direction === 'left' ? 'it.navigation.go-back' : 'it.navigation.upper-level') | translate}}\n </span>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ButtonDirective, selector: "[itButton]", inputs: ["itButton", "size", "block", "disabled"], exportAs: ["itButton"] }, { kind: "component", type: IconComponent, selector: "it-icon[name]", inputs: ["name", "size", "color", "padded", "svgClass"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3413
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: BackButtonComponent, decorators: [{
3414
- type: Component,
3415
- args: [{ selector: 'it-back-button', exportAs: 'itBackButton', changeDetection: ChangeDetectionStrategy.OnPush, template: "<a *ngIf=\"buttonStyle === 'link'\" href=\"#\" class=\"go-back\" (click)=\"goBack($event)\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</a>\n\n<button *ngIf=\"buttonStyle === 'button'\" itButton=\"primary\" class=\"go-back\" (click)=\"goBack($event)\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</button>\n\n<ng-template #content>\n <it-icon *ngIf=\"isShowIcon\"\n size=\"sm\"\n [name]=\"direction === 'left' ? 'arrow-left' : 'arrow-up'\"\n [color]=\"buttonStyle === 'link' ? 'primary' : 'white'\"\n [class.me-2]=\"isShowText\"></it-icon>\n\n <span [class.visually-hidden]=\"!isShowText\">\n {{(direction === 'left' ? 'it.navigation.go-back' : 'it.navigation.upper-level') | translate}}\n </span>\n</ng-template>\n" }]
3416
- }], ctorParameters: function () { return [{ type: i1.Location }]; }, propDecorators: { buttonStyle: [{
3417
- type: Input
3418
- }], direction: [{
3419
- type: Input
3420
- }], showIcon: [{
3421
- type: Input
3422
- }], showText: [{
3423
- type: Input
3424
- }], backFn: [{
3425
- type: Input
3426
- }] } });
3427
-
3428
- class BackToTopComponent extends AbstractComponent {
3429
- get isSmall() {
3430
- return isTrueBooleanInput(this.small);
3431
- }
3432
- get isShadow() {
3433
- return isTrueBooleanInput(this.shadow);
3434
- }
3435
- get isDark() {
3436
- return isTrueBooleanInput(this.dark);
3437
- }
3438
- ngAfterViewInit() {
3439
- super.ngAfterViewInit();
3440
- if (this.backToTopElement) {
3441
- const element = this.backToTopElement.nativeElement;
3442
- this.backToTop = BackToTop.getOrCreateInstance(element);
3443
- }
3444
- }
3445
- /**
3446
- * Show button
3447
- */
3448
- show() {
3449
- this.backToTop?.show();
3450
- }
3451
- /**
3452
- * Hide the button
3453
- */
3454
- hide() {
3455
- this.backToTop?.hide();
3456
- }
3457
- /**
3458
- * Activates the scroll animation towards the Y coordinate indicated by the positionTop option
3459
- */
3460
- scrollToTop() {
3461
- this.backToTop?.scrollToTop();
3462
- }
3463
- /**
3464
- * Eliminate component features
3465
- */
3466
- dispose() {
3467
- this.backToTop?.dispose();
3468
- }
3469
- }
3470
- BackToTopComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: BackToTopComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3471
- BackToTopComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: BackToTopComponent, selector: "it-back-to-top", inputs: { small: "small", shadow: "shadow", dark: "dark" }, viewQueries: [{ propertyName: "backToTopElement", first: true, predicate: ["backToTop"], descendants: true }], exportAs: ["itBackToTop"], usesInheritance: true, ngImport: i0, template: "<a #backToTop [id]=\"id\"\n href=\"#\"\n aria-hidden=\"true\"\n class=\"back-to-top\"\n [class.back-to-top-small]=\"isSmall\"\n [class.shadow]=\"isShadow\"\n [class.dark]=\"isDark\">\n\n <it-icon name=\"arrow-up\" [color]=\"isDark ? 'secondary' : 'light'\"></it-icon>\n</a>\n", dependencies: [{ kind: "component", type: IconComponent, selector: "it-icon[name]", inputs: ["name", "size", "color", "padded", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3472
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: BackToTopComponent, decorators: [{
3473
- type: Component,
3474
- args: [{ selector: 'it-back-to-top', exportAs: 'itBackToTop', changeDetection: ChangeDetectionStrategy.OnPush, template: "<a #backToTop [id]=\"id\"\n href=\"#\"\n aria-hidden=\"true\"\n class=\"back-to-top\"\n [class.back-to-top-small]=\"isSmall\"\n [class.shadow]=\"isShadow\"\n [class.dark]=\"isDark\">\n\n <it-icon name=\"arrow-up\" [color]=\"isDark ? 'secondary' : 'light'\"></it-icon>\n</a>\n" }]
3475
- }], propDecorators: { small: [{
3476
- type: Input
3477
- }], shadow: [{
3478
- type: Input
3479
- }], dark: [{
3480
- type: Input
3481
- }], backToTopElement: [{
3482
- type: ViewChild,
3483
- args: ['backToTop']
3484
- }] } });
3485
-
3486
- class BreadcrumbItemComponent extends LinkComponent {
3487
- get isActive() {
3488
- return isTrueBooleanInput(this.active);
3489
- }
3490
- }
3491
- BreadcrumbItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: BreadcrumbItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3492
- BreadcrumbItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: BreadcrumbItemComponent, selector: "it-breadcrumb-item", inputs: { active: "active", iconName: "iconName" }, viewQueries: [{ propertyName: "htmlContent", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
3493
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: BreadcrumbItemComponent, decorators: [{
3494
- type: Component,
3495
- args: [{ selector: 'it-breadcrumb-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n" }]
3496
- }], propDecorators: { active: [{
3497
- type: Input
3498
- }], iconName: [{
3499
- type: Input
3500
- }], htmlContent: [{
3501
- type: ViewChild,
3502
- args: [TemplateRef]
3503
- }] } });
3504
-
3505
- class BreadcrumbComponent {
3506
- constructor(_changeDetectorRef) {
3507
- this._changeDetectorRef = _changeDetectorRef;
3508
- /**
3509
- * The character to use as separator
3510
- * @default /
3511
- */
3512
- this.separator = '/';
3513
- }
3514
- get isDark() {
3515
- return isTrueBooleanInput(this.dark);
3516
- }
3517
- ngAfterViewInit() {
3518
- this.items?.changes.pipe(// When breadcrumb items changes (dynamic add/remove)
3519
- startWith(undefined)).subscribe(() => {
3520
- this.itemSubscriptions?.forEach(sub => sub.unsubscribe()); // Remove old subscriptions
3521
- this.itemSubscriptions = this.items?.map(item => item.valueChanges.subscribe(() => {
3522
- this._changeDetectorRef.detectChanges(); // DetectChanges when breadcrumb item attributes changes
3523
- }));
3524
- this._changeDetectorRef.detectChanges(); // Force update html render
3525
- });
3526
- }
3527
- ngOnDestroy() {
3528
- this.itemSubscriptions?.forEach(item => item.unsubscribe());
3529
- }
3530
- /**
3531
- * Check if index is last item
3532
- * @param index
3533
- */
3534
- isLastItem(index) {
3535
- return !!this.items && index >= (this.items.length - 1);
3536
- }
3537
- }
3538
- BreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: BreadcrumbComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
3539
- BreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: BreadcrumbComponent, selector: "it-breadcrumb", inputs: { separator: "separator", dark: "dark" }, queries: [{ propertyName: "items", predicate: BreadcrumbItemComponent }], ngImport: i0, template: "<nav class=\"breadcrumb-container\" [attr.aria-label]=\"'it.navigation.navigation-path'|translate\">\n <ol class=\"breadcrumb\" [class.dark]=\"isDark\" [class.px-3]=\"isDark\">\n <li *ngFor=\"let item of items; let i = index\"\n class=\"breadcrumb-item\"\n [class.active]=\"item.isActive\"\n [attr.aria-current]=\"item.isActive ? 'page' : null\">\n\n <it-icon *ngIf=\"item.iconName\"\n [name]=\"item.iconName\"\n [color]=\"isDark ? 'white' : 'secondary'\"\n size=\"sm\"\n svgClass=\"align-top me-1\"></it-icon>\n\n <it-link *ngIf=\"!item.isActive && !isLastItem(i); else activeContent\"\n [href]=\"item.href\" [class]=\"item.class\" [externalLink]=\"item.externalLink\" [disabled]=\"item.disabled\">\n <ng-container *ngTemplateOutlet=\"item.htmlContent\"></ng-container>\n </it-link>\n\n <ng-template #activeContent>\n <ng-container *ngTemplateOutlet=\"item.htmlContent\"></ng-container>\n </ng-template>\n\n <span *ngIf=\"!isLastItem(i)\" class=\"separator\">{{separator}}</span>\n </li>\n </ol>\n</nav>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LinkComponent, selector: "it-link", inputs: ["href", "externalLink", "disabled", "class"] }, { kind: "component", type: IconComponent, selector: "it-icon[name]", inputs: ["name", "size", "color", "padded", "svgClass"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3540
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: BreadcrumbComponent, decorators: [{
3541
- type: Component,
3542
- args: [{ selector: 'it-breadcrumb', changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav class=\"breadcrumb-container\" [attr.aria-label]=\"'it.navigation.navigation-path'|translate\">\n <ol class=\"breadcrumb\" [class.dark]=\"isDark\" [class.px-3]=\"isDark\">\n <li *ngFor=\"let item of items; let i = index\"\n class=\"breadcrumb-item\"\n [class.active]=\"item.isActive\"\n [attr.aria-current]=\"item.isActive ? 'page' : null\">\n\n <it-icon *ngIf=\"item.iconName\"\n [name]=\"item.iconName\"\n [color]=\"isDark ? 'white' : 'secondary'\"\n size=\"sm\"\n svgClass=\"align-top me-1\"></it-icon>\n\n <it-link *ngIf=\"!item.isActive && !isLastItem(i); else activeContent\"\n [href]=\"item.href\" [class]=\"item.class\" [externalLink]=\"item.externalLink\" [disabled]=\"item.disabled\">\n <ng-container *ngTemplateOutlet=\"item.htmlContent\"></ng-container>\n </it-link>\n\n <ng-template #activeContent>\n <ng-container *ngTemplateOutlet=\"item.htmlContent\"></ng-container>\n </ng-template>\n\n <span *ngIf=\"!isLastItem(i)\" class=\"separator\">{{separator}}</span>\n </li>\n </ol>\n</nav>\n" }]
3543
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { separator: [{
3544
- type: Input
3545
- }], dark: [{
3546
- type: Input
3547
- }], items: [{
3548
- type: ContentChildren,
3549
- args: [BreadcrumbItemComponent]
3550
- }] } });
3551
-
3552
- class HeaderComponent extends AbstractComponent {
3553
- /**
3554
- * TODO: complete header
3555
- */
3556
- constructor() {
3557
- super();
3558
- this.showSlim = true;
3559
- this.loginStyle = 'full';
3560
- this.smallHeader = true;
3561
- this.showSearch = true;
3562
- this.loginClick = new EventEmitter();
3563
- this.searchClick = new EventEmitter();
3564
- }
3565
- get isLight() {
3566
- return isTrueBooleanInput(this.light);
3567
- }
3568
- get isShowSlim() {
3569
- return isTrueBooleanInput(this.showSlim);
3570
- }
3571
- get isSmallHeader() {
3572
- return isTrueBooleanInput(this.smallHeader);
3573
- }
3574
- get isShowSearch() {
3575
- return isTrueBooleanInput(this.showSearch);
3576
- }
3577
- }
3578
- HeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: HeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3579
- HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: HeaderComponent, selector: "it-header", inputs: { light: "light", showSlim: "showSlim", slimTitle: "slimTitle", loginStyle: "loginStyle", smallHeader: "smallHeader", showSearch: "showSearch" }, outputs: { loginClick: "loginClick", searchClick: "searchClick" }, usesInheritance: true, ngImport: i0, template: "<header class=\"it-header-wrapper\">\n <div *ngIf=\"isShowSlim\" class=\"it-header-slim-wrapper\" [class.theme-light]=\"isLight\">\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"it-header-slim-wrapper-content\">\n <a class=\"d-none d-lg-block navbar-brand\" href=\"#\">{{slimTitle}}</a>\n <div class=\"nav-mobile\">\n <nav [attr.aria-label]=\"'it.navigation.secondary-navigation'|translate\">\n <a class=\"it-opener d-lg-none\" data-bs-toggle=\"collapse\" href=\"#menuC1\" role=\"button\"\n aria-expanded=\"false\" aria-controls=\"menuC1\">\n <span>{{slimTitle}}</span>\n <it-icon name=\"expand\"></it-icon>\n </a>\n <div class=\"link-list-wrapper collapse\" id=\"menuC1\">\n <ng-content select=\"[slimLinkList]\"></ng-content>\n </div>\n </nav>\n </div>\n <div class=\"it-header-slim-right-zone\">\n <!-- TODO: add language dropdown -->\n <ng-content select=\"[slimRightZone]\"></ng-content>\n <div *ngIf=\"loginStyle === 'default'\" class=\"it-access-top-wrapper\">\n <a class=\"btn btn-primary btn-sm\" (click)=\"loginClick.emit($event)\">\n {{'it.navigation.login'|translate}}\n </a>\n </div>\n </div>\n <button *ngIf=\"loginStyle === 'full'\" itButton=\"primary\" class=\"btn-full\" (click)=\"loginClick.emit($event)\">\n <span class=\"rounded-icon\">\n <it-icon name=\"user\" color=\"primary\"></it-icon>\n <span class=\"d-none d-lg-block\">{{'it.navigation.full-login'|translate}}</span>\n </span>\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"it-nav-wrapper\">\n <div class=\"it-header-center-wrapper\" [class.it-small-header]=\"isSmallHeader\">\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"it-header-center-content-wrapper\">\n <div class=\"it-brand-wrapper\">\n <ng-content select=\"[brand]\"></ng-content>\n </div>\n <div class=\"it-right-zone\">\n <ng-content select=\"[rightZone]\"></ng-content>\n\n <div class=\"it-search-wrapper\" *ngIf=\"isShowSearch\">\n <span class=\"d-none d-md-block\">{{'it.navigation.search'|translate}}</span>\n <a class=\"search-link rounded-icon\" [attr.aria-label]=\"'it.navigation.website-search'|translate\" (click)=\"searchClick.emit($event)\">\n <it-icon name=\"search\"></it-icon>\n </a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- TODO: complete header -->\n </div>\n</header>\n", styles: [".nav-mobile:has(.link-list-wrapper:empty){display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: ButtonDirective, selector: "[itButton]", inputs: ["itButton", "size", "block", "disabled"], exportAs: ["itButton"] }, { kind: "component", type: IconComponent, selector: "it-icon[name]", inputs: ["name", "size", "color", "padded", "svgClass"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3580
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: HeaderComponent, decorators: [{
3581
- type: Component,
3582
- args: [{ selector: 'it-header', changeDetection: ChangeDetectionStrategy.OnPush, template: "<header class=\"it-header-wrapper\">\n <div *ngIf=\"isShowSlim\" class=\"it-header-slim-wrapper\" [class.theme-light]=\"isLight\">\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"it-header-slim-wrapper-content\">\n <a class=\"d-none d-lg-block navbar-brand\" href=\"#\">{{slimTitle}}</a>\n <div class=\"nav-mobile\">\n <nav [attr.aria-label]=\"'it.navigation.secondary-navigation'|translate\">\n <a class=\"it-opener d-lg-none\" data-bs-toggle=\"collapse\" href=\"#menuC1\" role=\"button\"\n aria-expanded=\"false\" aria-controls=\"menuC1\">\n <span>{{slimTitle}}</span>\n <it-icon name=\"expand\"></it-icon>\n </a>\n <div class=\"link-list-wrapper collapse\" id=\"menuC1\">\n <ng-content select=\"[slimLinkList]\"></ng-content>\n </div>\n </nav>\n </div>\n <div class=\"it-header-slim-right-zone\">\n <!-- TODO: add language dropdown -->\n <ng-content select=\"[slimRightZone]\"></ng-content>\n <div *ngIf=\"loginStyle === 'default'\" class=\"it-access-top-wrapper\">\n <a class=\"btn btn-primary btn-sm\" (click)=\"loginClick.emit($event)\">\n {{'it.navigation.login'|translate}}\n </a>\n </div>\n </div>\n <button *ngIf=\"loginStyle === 'full'\" itButton=\"primary\" class=\"btn-full\" (click)=\"loginClick.emit($event)\">\n <span class=\"rounded-icon\">\n <it-icon name=\"user\" color=\"primary\"></it-icon>\n <span class=\"d-none d-lg-block\">{{'it.navigation.full-login'|translate}}</span>\n </span>\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"it-nav-wrapper\">\n <div class=\"it-header-center-wrapper\" [class.it-small-header]=\"isSmallHeader\">\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"it-header-center-content-wrapper\">\n <div class=\"it-brand-wrapper\">\n <ng-content select=\"[brand]\"></ng-content>\n </div>\n <div class=\"it-right-zone\">\n <ng-content select=\"[rightZone]\"></ng-content>\n\n <div class=\"it-search-wrapper\" *ngIf=\"isShowSearch\">\n <span class=\"d-none d-md-block\">{{'it.navigation.search'|translate}}</span>\n <a class=\"search-link rounded-icon\" [attr.aria-label]=\"'it.navigation.website-search'|translate\" (click)=\"searchClick.emit($event)\">\n <it-icon name=\"search\"></it-icon>\n </a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- TODO: complete header -->\n </div>\n</header>\n", styles: [".nav-mobile:has(.link-list-wrapper:empty){display:none}\n"] }]
3583
- }], ctorParameters: function () { return []; }, propDecorators: { light: [{
3584
- type: Input
3585
- }], showSlim: [{
3586
- type: Input
3587
- }], slimTitle: [{
3588
- type: Input
3589
- }], loginStyle: [{
3590
- type: Input
3591
- }], smallHeader: [{
3592
- type: Input
3593
- }], showSearch: [{
3594
- type: Input
3595
- }], loginClick: [{
3596
- type: Output
3597
- }], searchClick: [{
3598
- type: Output
3599
- }] } });
3600
-
3601
- class LanguageSwitcherComponent {
3602
- constructor(translateService) {
3603
- this.translateService = translateService;
3604
- this.currentLang$ = translateService.onLangChange.pipe(startWith({ lang: translateService.currentLang }), map(event => this.availableLanguages?.find(l => l.code === event.lang)));
3605
- }
3606
- ngOnInit() {
3607
- if (!this.availableLanguages) {
3608
- this.availableLanguages = this.translateService.getLangs().map(lang => ({
3609
- code: lang,
3610
- label: lang,
3611
- ...(lang === 'it' && { label: 'ITA' }),
3612
- ...(lang === 'en' && { label: 'ENG' })
3613
- }));
3614
- }
3615
- }
3616
- /**
3617
- * Change the current language
3618
- * @param lang the language code
3619
- */
3620
- changeLanguage(lang) {
3621
- this.translateService.use(lang);
3622
- }
3623
- }
3624
- LanguageSwitcherComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: LanguageSwitcherComponent, deps: [{ token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
3625
- LanguageSwitcherComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: LanguageSwitcherComponent, selector: "it-language-switcher", inputs: { availableLanguages: "availableLanguages" }, ngImport: i0, template: "<it-dropdown>\n <ng-container button>\n <span class=\"visually-hidden\">{{'it.utils.selected' | translate: { lang: (currentLang$ | async)?.label } }}</span>\n <span>{{(currentLang$ | async)?.label || ('it.utils.select-language' | translate)}}</span>\n </ng-container>\n\n <ng-container list>\n <it-dropdown-item *ngFor=\"let lang of availableLanguages\" (click)=\"changeLanguage(lang.code)\"\n [active]=\"lang.code === (currentLang$ | async)?.code\">\n {{lang.label}}\n <span class=\"visually-hidden\" *ngIf=\"lang.code === (currentLang$ | async)?.code\">\n {{'it.utils.selected' | translate}}\n </span>\n </it-dropdown-item>\n </ng-container>\n</it-dropdown>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DropdownComponent, selector: "it-dropdown", inputs: ["color", "direction", "fullWidth", "dark"], outputs: ["showEvent", "shownEvent", "hideEvent", "hiddenEvent"], exportAs: ["itDropdown"] }, { kind: "component", type: DropdownItemComponent, selector: "it-dropdown-item", inputs: ["divider", "active", "large", "iconName", "iconPosition"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3626
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: LanguageSwitcherComponent, decorators: [{
3627
- type: Component,
3628
- args: [{ selector: 'it-language-switcher', changeDetection: ChangeDetectionStrategy.OnPush, template: "<it-dropdown>\n <ng-container button>\n <span class=\"visually-hidden\">{{'it.utils.selected' | translate: { lang: (currentLang$ | async)?.label } }}</span>\n <span>{{(currentLang$ | async)?.label || ('it.utils.select-language' | translate)}}</span>\n </ng-container>\n\n <ng-container list>\n <it-dropdown-item *ngFor=\"let lang of availableLanguages\" (click)=\"changeLanguage(lang.code)\"\n [active]=\"lang.code === (currentLang$ | async)?.code\">\n {{lang.label}}\n <span class=\"visually-hidden\" *ngIf=\"lang.code === (currentLang$ | async)?.code\">\n {{'it.utils.selected' | translate}}\n </span>\n </it-dropdown-item>\n </ng-container>\n</it-dropdown>\n" }]
3629
- }], ctorParameters: function () { return [{ type: i1$1.TranslateService }]; }, propDecorators: { availableLanguages: [{
3630
- type: Input
3631
- }] } });
3632
-
3633
- class ErrorPageComponent {
3634
- constructor(route) {
3635
- this.route = route;
3636
- /**
3637
- * Show/Hide error code
3638
- * @default true - show
3639
- */
3640
- this.showErrorCode = true;
3641
- /**
3642
- * Show/Hide back button
3643
- * @default true - show
3644
- */
3645
- this.showBackButton = true;
3646
- /**
3647
- * Show/Hide home button
3648
- * @default true - show
3649
- */
3650
- this.showHomeButton = true;
3651
- this.route.data.subscribe(data => {
3652
- if (!this.errorCode && data['errorCode']) {
3653
- this.errorCode = data['errorCode']; // Get errorCode from route data
3654
- }
3655
- if (data['showErrorCode'] !== undefined) {
3656
- this.showErrorCode = data['showErrorCode']; // Get showErrorCode from route data
3657
- }
3658
- if (!this.errorTitle && data['errorTitle']) {
3659
- this.errorTitle = data['errorTitle']; // Get errorTitle from route data
3660
- }
3661
- if (!this.errorDescription && data['errorDescription']) {
3662
- this.errorDescription = data['errorDescription']; // Get errorDescription from route data
3663
- }
3664
- if (data['showBackButton'] !== undefined) {
3665
- this.showBackButton = data['showBackButton']; // Get showBackButton from route data
3666
- }
3667
- if (data['showHomeButton'] !== undefined) {
3668
- this.showHomeButton = data['showHomeButton']; // Get showHomeButton from route data
3669
- }
3670
- });
3671
- }
3672
- get isDefaultErrorCode() {
3673
- return this.errorCode === 404 || this.errorCode === 403 || this.errorCode === 500;
3674
- }
3675
- get isShowErrorCode() {
3676
- return isTrueBooleanInput(this.showErrorCode);
3677
- }
3678
- get isShowBackButton() {
3679
- return isTrueBooleanInput(this.showBackButton);
3680
- }
3681
- get isShowHomeButton() {
3682
- return isTrueBooleanInput(this.showHomeButton);
3683
- }
3684
- }
3685
- ErrorPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ErrorPageComponent, deps: [{ token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
3686
- ErrorPageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: ErrorPageComponent, selector: "it-error-page", inputs: { errorCode: "errorCode", showErrorCode: "showErrorCode", errorTitle: "errorTitle", errorDescription: "errorDescription", showBackButton: "showBackButton", showHomeButton: "showHomeButton" }, ngImport: i0, template: "<div class=\"container text-center mt-5\">\n <h1 *ngIf=\"errorCode && isShowErrorCode\">{{errorCode}}</h1>\n <h2>\n <ng-container *ngIf=\"!errorTitle && isDefaultErrorCode; else customTitle\">\n {{'it.utils.error-page.' + errorCode + '.title' | translate}}\n </ng-container>\n <ng-template #customTitle>{{(errorTitle || 'it.errors.generic') | translate}}</ng-template>\n </h2>\n\n <p class=\"mt-3 w-75 mx-auto\">\n <ng-container\n *ngIf=\"!errorDescription && isDefaultErrorCode; else customDescription\">\n {{'it.utils.error-page.' + errorCode + '.description' | translate}}\n </ng-container>\n <ng-template #customDescription>\n {{(errorDescription || 'it.errors.generic-support-message') | translate}}\n </ng-template>\n </p>\n\n <div class=\"mt-5\" *ngIf=\"isShowBackButton || isShowHomeButton\">\n <it-back-button *ngIf=\"isShowBackButton\"></it-back-button>\n <a *ngIf=\"isShowHomeButton\" itButton=\"outline-primary\" class=\"ms-3\" routerLink=\"/\"\n title=\"{{'it.utils.error-page.go-to-homepage' | translate}}\">\n {{'it.utils.error-page.go-to-homepage' | translate}}\n </a>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: ButtonDirective, selector: "[itButton]", inputs: ["itButton", "size", "block", "disabled"], exportAs: ["itButton"] }, { kind: "component", type: BackButtonComponent, selector: "it-back-button", inputs: ["buttonStyle", "direction", "showIcon", "showText", "backFn"], exportAs: ["itBackButton"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3687
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ErrorPageComponent, decorators: [{
3688
- type: Component,
3689
- args: [{ selector: 'it-error-page', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"container text-center mt-5\">\n <h1 *ngIf=\"errorCode && isShowErrorCode\">{{errorCode}}</h1>\n <h2>\n <ng-container *ngIf=\"!errorTitle && isDefaultErrorCode; else customTitle\">\n {{'it.utils.error-page.' + errorCode + '.title' | translate}}\n </ng-container>\n <ng-template #customTitle>{{(errorTitle || 'it.errors.generic') | translate}}</ng-template>\n </h2>\n\n <p class=\"mt-3 w-75 mx-auto\">\n <ng-container\n *ngIf=\"!errorDescription && isDefaultErrorCode; else customDescription\">\n {{'it.utils.error-page.' + errorCode + '.description' | translate}}\n </ng-container>\n <ng-template #customDescription>\n {{(errorDescription || 'it.errors.generic-support-message') | translate}}\n </ng-template>\n </p>\n\n <div class=\"mt-5\" *ngIf=\"isShowBackButton || isShowHomeButton\">\n <it-back-button *ngIf=\"isShowBackButton\"></it-back-button>\n <a *ngIf=\"isShowHomeButton\" itButton=\"outline-primary\" class=\"ms-3\" routerLink=\"/\"\n title=\"{{'it.utils.error-page.go-to-homepage' | translate}}\">\n {{'it.utils.error-page.go-to-homepage' | translate}}\n </a>\n </div>\n</div>\n" }]
3690
- }], ctorParameters: function () { return [{ type: i1$2.ActivatedRoute }]; }, propDecorators: { errorCode: [{
3691
- type: Input
3692
- }], showErrorCode: [{
3693
- type: Input
3694
- }], errorTitle: [{
3695
- type: Input
3696
- }], errorDescription: [{
3697
- type: Input
3698
- }], showBackButton: [{
3699
- type: Input
3700
- }], showHomeButton: [{
3701
- type: Input
3702
- }] } });
3703
-
3704
- class ChipComponent {
3705
- constructor() {
3706
- this._label = '';
3707
- this._showCloseButton = false;
3708
- this._size = '';
3709
- this._color = undefined;
3710
- this._disabled = false;
3711
- this._icon = undefined;
3712
- this._avatar = undefined;
3713
- this._altAvatar = '';
3714
- /**
3715
- * Evento emesso al click sul bottone di chiusura
3716
- */
3717
- this.closeEvent = new EventEmitter();
3718
- this.iconClose = 'close';
3719
- }
3720
- /**
3721
- * Indica la label
3722
- */
3723
- set label(value) { this._label = value; }
3724
- get label() { return this._label; }
3725
- /**
3726
- * Indica se mostrate il pulante di chisura
3727
- */
3728
- set showCloseButton(value) { this._showCloseButton = value; }
3729
- get showCloseButton() { return this._showCloseButton; }
3730
- /**
3731
- * Indica il size
3732
- */
3733
- set size(value) { this._size = value; }
3734
- get size() { return this._size; }
3735
- /**
3736
- * Indica il colore della chip
3737
- */
3738
- set color(value) { this._color = value; }
3739
- get color() { return this._color; }
3740
- /**
3741
- * Indica se la chip è disabilitata
3742
- */
3743
- set disabled(value) { this._disabled = value; }
3744
- get disabled() { return this._disabled; }
3745
- /**
3746
- * Indica il nome dell'icona, se valorizzata viene mostrata
3747
- */
3748
- set icon(value) { this._icon = value; }
3749
- get icon() { return this._icon; }
3750
- /**
3751
- * Indica l'url dell'avatar, se valorizzata viene mostrata
3752
- */
3753
- set avatar(value) { this._avatar = value; }
3754
- get avatar() { return this._avatar; }
3755
- /**
3756
- * Indica il valore da aggiungere al parametro alt, di default ''
3757
- */
3758
- set altAvatar(value) { this._altAvatar = value; }
3759
- get altAvatar() { return this._altAvatar; }
3760
- clickToClose() {
3761
- this.closeEvent.emit();
3762
- }
3763
- }
3764
- ChipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3765
- ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: ChipComponent, selector: "it-chip", inputs: { label: "label", showCloseButton: "showCloseButton", size: "size", color: "color", disabled: "disabled", icon: "icon", avatar: "avatar", altAvatar: "altAvatar" }, outputs: { closeEvent: "closeEvent" }, ngImport: i0, template: "<div class=\"chip\" [ngClass]=\"[!showCloseButton ? 'chip-simple': 'alert', size === 'lg' ? 'chip-lg': '', color ? 'chip-' + color : '', disabled ? 'chip-disabled' : '']\">\n <svg *ngIf=\"icon\" class=\"icon icon-xs\"><use [attr.href]=\"'./bootstrap-italia/dist/svg/sprites.svg#it-' + icon\" [attr.xlink:href]=\"'./bootstrap-italia/dist/svg/sprites.svg#it-' + icon\"></use></svg>\n <div *ngIf=\"avatar\" class=\"avatar size-xs\">\n <img [src]=\"avatar\" [alt]=\"altAvatar\">\n </div>\n <span class=\"chip-label\">{{ label }}</span>\n <button *ngIf=\"showCloseButton\" (click)=\"clickToClose()\" [disabled]=\"disabled\">\n <svg class=\"icon\"><use href=\"./bootstrap-italia/dist/svg/sprites.svg#it-close\" xlink:href=\"./bootstrap-italia/dist/svg/sprites.svg#it-close\"></use></svg>\n <span class=\"visually-hidden\">{{ 'it.core.remove' | translate }} {{ label }}</span>\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3766
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ChipComponent, decorators: [{
3767
- type: Component,
3768
- args: [{ selector: 'it-chip', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"chip\" [ngClass]=\"[!showCloseButton ? 'chip-simple': 'alert', size === 'lg' ? 'chip-lg': '', color ? 'chip-' + color : '', disabled ? 'chip-disabled' : '']\">\n <svg *ngIf=\"icon\" class=\"icon icon-xs\"><use [attr.href]=\"'./bootstrap-italia/dist/svg/sprites.svg#it-' + icon\" [attr.xlink:href]=\"'./bootstrap-italia/dist/svg/sprites.svg#it-' + icon\"></use></svg>\n <div *ngIf=\"avatar\" class=\"avatar size-xs\">\n <img [src]=\"avatar\" [alt]=\"altAvatar\">\n </div>\n <span class=\"chip-label\">{{ label }}</span>\n <button *ngIf=\"showCloseButton\" (click)=\"clickToClose()\" [disabled]=\"disabled\">\n <svg class=\"icon\"><use href=\"./bootstrap-italia/dist/svg/sprites.svg#it-close\" xlink:href=\"./bootstrap-italia/dist/svg/sprites.svg#it-close\"></use></svg>\n <span class=\"visually-hidden\">{{ 'it.core.remove' | translate }} {{ label }}</span>\n </button>\n</div>\n" }]
3769
- }], propDecorators: { label: [{
3770
- type: Input
3771
- }], showCloseButton: [{
3772
- type: Input
3773
- }], size: [{
3774
- type: Input
3775
- }], color: [{
3776
- type: Input
3777
- }], disabled: [{
3778
- type: Input
3779
- }], icon: [{
3780
- type: Input
3781
- }], avatar: [{
3782
- type: Input
3783
- }], altAvatar: [{
3784
- type: Input
3785
- }], closeEvent: [{
3786
- type: Output
3787
- }] } });
3788
-
3789
- class ForwardDirective {
3790
- constructor(document) {
3791
- this.document = document;
3792
- this._itForward = undefined;
3793
- }
3794
- /**
3795
- * Indica, se HTMLElement, l'elemento a cui navigare, o se stringa, il selettore che selezionerà l'elemento a cui navigare.
3796
- */
3797
- set itForward(value) { this._itForward = value; }
3798
- get itForward() { return this._itForward; }
3799
- onClick(event) {
3800
- event.preventDefault();
3801
- if (this.itForward) {
3802
- if (typeof this.itForward === 'string') {
3803
- this.document?.querySelector(this.itForward)?.scrollIntoView({
3804
- behavior: 'smooth',
3805
- block: 'start',
3806
- inline: "nearest"
3807
- });
3808
- }
3809
- else if (this.itForward instanceof HTMLElement) {
3810
- this.itForward.scrollIntoView({
3811
- behavior: 'smooth',
3812
- block: 'start',
3813
- inline: "nearest"
3814
- });
3815
- }
3816
- }
3817
- }
3818
- }
3819
- ForwardDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ForwardDirective, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
3820
- ForwardDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.6", type: ForwardDirective, selector: "[itForward]", inputs: { itForward: "itForward" }, host: { listeners: { "click": "onClick($event)" }, classAttribute: "forward" }, ngImport: i0 });
3821
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ForwardDirective, decorators: [{
3822
- type: Directive,
3823
- args: [{
3824
- selector: '[itForward]',
3825
- // eslint-disable-next-line @angular-eslint/no-host-metadata-property
3826
- host: { 'class': 'forward' }
3827
- }]
3828
- }], ctorParameters: function () { return [{ type: Document, decorators: [{
3829
- type: Inject,
3830
- args: [DOCUMENT]
3831
- }] }]; }, propDecorators: { itForward: [{
3832
- type: Input
3833
- }], onClick: [{
3834
- type: HostListener,
3835
- args: ['click', ['$event']]
3836
- }] } });
3837
-
3838
- class DimmerComponent {
3839
- constructor(elementRef) {
3840
- this.elementRef = elementRef;
3841
- this._active = false;
3842
- this._color = '';
3843
- }
3844
- /**
3845
- * Dimmer status
3846
- * @default false
3847
- */
3848
- set active(value) { this._active = value; }
3849
- ;
3850
- get active() { return this._active; }
3851
- /**
3852
- * Colore del dimmer
3853
- * @default ''
3854
- */
3855
- set color(value) { this._color = value; }
3856
- ;
3857
- get color() { return this._color; }
3858
- ngOnInit() {
3859
- this.elementRef?.nativeElement?.parentElement?.classList?.add('dimmable');
3860
- }
3861
- }
3862
- DimmerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: DimmerComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
3863
- DimmerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: DimmerComponent, selector: "it-dimmer", inputs: { active: "active", color: "color" }, ngImport: i0, template: "<div class=\"dimmer\" *ngIf=\"active\" @fade [ngClass]=\"[color]\">\n <div class=\"dimmer-inner\">\n <ng-content></ng-content>\n </div>\n</div>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [
3864
- trigger('fade', [
3865
- transition(':enter', [
3866
- style({ opacity: 0 }),
3867
- animate('150ms', style({ opacity: 0.92 })),
3868
- ]),
3869
- transition(':leave', [
3870
- animate('150ms', style({ opacity: 0 })),
3871
- ]),
3872
- ])
3873
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3874
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: DimmerComponent, decorators: [{
3875
- type: Component,
3876
- args: [{ selector: 'it-dimmer', changeDetection: ChangeDetectionStrategy.OnPush, animations: [
3877
- trigger('fade', [
3878
- transition(':enter', [
3879
- style({ opacity: 0 }),
3880
- animate('150ms', style({ opacity: 0.92 })),
3881
- ]),
3882
- transition(':leave', [
3883
- animate('150ms', style({ opacity: 0 })),
3884
- ]),
3885
- ])
3886
- ], template: "<div class=\"dimmer\" *ngIf=\"active\" @fade [ngClass]=\"[color]\">\n <div class=\"dimmer-inner\">\n <ng-content></ng-content>\n </div>\n</div>" }]
3887
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { active: [{
3888
- type: Input
3889
- }], color: [{
3890
- type: Input
3891
- }] } });
3892
-
3893
- class DimmerButtonsComponent {
3894
- constructor() {
3895
- this._hasOneButton = false;
3896
- }
3897
- /**
3898
- * Indica se abbiamo 1 solo bottone
3899
- * @default false
3900
- */
3901
- set hasOneButton(value) { this._hasOneButton = value; }
3902
- ;
3903
- get hasOneButton() { return this._hasOneButton; }
3904
- }
3905
- DimmerButtonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: DimmerButtonsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3906
- DimmerButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: DimmerButtonsComponent, selector: "it-dimmer-buttons", inputs: { hasOneButton: "hasOneButton" }, ngImport: i0, template: "<div class=\"dimmer-buttons bg-dark\" [ngClass]=\"{'single-button': hasOneButton}\">\n <ng-content></ng-content>\n</div>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3907
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: DimmerButtonsComponent, decorators: [{
3908
- type: Component,
3909
- args: [{ selector: 'it-dimmer-buttons', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"dimmer-buttons bg-dark\" [ngClass]=\"{'single-button': hasOneButton}\">\n <ng-content></ng-content>\n</div>" }]
3910
- }], propDecorators: { hasOneButton: [{
3911
- type: Input
3912
- }] } });
3913
-
3914
- class DimmerIconComponent {
3915
- }
3916
- DimmerIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: DimmerIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3917
- DimmerIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: DimmerIconComponent, selector: "it-dimmer-icon", ngImport: i0, template: "<div class=\"dimmer-icon\">\n <ng-content></ng-content>\n</div>", changeDetection: i0.ChangeDetectionStrategy.OnPush });
3918
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: DimmerIconComponent, decorators: [{
3919
- type: Component,
3920
- args: [{ selector: 'it-dimmer-icon', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"dimmer-icon\">\n <ng-content></ng-content>\n</div>" }]
3921
- }] });
3922
-
3923
- /**
3924
- * Core components
3925
- */
3926
- const core = [
3927
- AccordionComponent,
3928
- AlertComponent,
3929
- BadgeDirective,
3930
- ButtonDirective,
3931
- CalloutComponent,
3932
- CardComponent,
3933
- CarouselComponent,
3934
- CarouselItemComponent,
3935
- ChipComponent,
3936
- CollapseComponent,
3937
- DimmerButtonsComponent,
3938
- DimmerComponent,
3939
- DimmerIconComponent,
3940
- DropdownComponent,
3941
- DropdownItemComponent,
3942
- ForwardDirective,
3943
- LinkComponent,
3944
- ListComponent,
3945
- ListItemComponent,
3946
- ModalComponent,
3947
- NotificationsComponent,
3948
- PaginationComponent,
3949
- PopoverDirective,
3950
- ProgressBarComponent,
3951
- ProgressButtonComponent,
3952
- RatingComponent,
3953
- SpinnerComponent,
3954
- SteppersContainerComponent,
3955
- SteppersItemComponent,
3956
- TabContainerComponent,
3957
- TabItemComponent,
3958
- TableComponent,
3959
- TooltipDirective
3960
- ];
3961
- /**
3962
- * Form components
3963
- */
3964
- const form = [
3965
- CheckboxComponent,
3966
- InputComponent,
3967
- PasswordInputComponent,
3968
- RadioButtonComponent,
3969
- SelectComponent,
3970
- TextareaComponent,
3971
- UploadDragDropComponent,
3972
- UploadFileListComponent
3973
- ];
3974
- /**
3975
- * Navigation Components
3976
- */
3977
- const navigation = [
3978
- BackButtonComponent,
3979
- BackToTopComponent,
3980
- BreadcrumbComponent,
3981
- BreadcrumbItemComponent,
3982
- HeaderComponent
3983
- ];
3984
- /**
3985
- * Utils components
3986
- */
3987
- const utils = [
3988
- IconComponent,
3989
- ErrorPageComponent,
3990
- LanguageSwitcherComponent,
3991
- MarkMatchingTextPipe
3992
- ];
3993
- class ComponentsModule {
3994
- }
3995
- ComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3996
- ComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.6", ngImport: i0, type: ComponentsModule, declarations: [AccordionComponent,
3997
- AlertComponent,
3998
- BadgeDirective,
3999
- ButtonDirective,
4000
- CalloutComponent,
4001
- CardComponent,
4002
- CarouselComponent,
4003
- CarouselItemComponent,
4004
- ChipComponent,
4005
- CollapseComponent,
4006
- DimmerButtonsComponent,
4007
- DimmerComponent,
4008
- DimmerIconComponent,
4009
- DropdownComponent,
4010
- DropdownItemComponent,
4011
- ForwardDirective,
4012
- LinkComponent,
4013
- ListComponent,
4014
- ListItemComponent,
4015
- ModalComponent,
4016
- NotificationsComponent,
4017
- PaginationComponent,
4018
- PopoverDirective,
4019
- ProgressBarComponent,
4020
- ProgressButtonComponent,
4021
- RatingComponent,
4022
- SpinnerComponent,
4023
- SteppersContainerComponent,
4024
- SteppersItemComponent,
4025
- TabContainerComponent,
4026
- TabItemComponent,
4027
- TableComponent,
4028
- TooltipDirective, CheckboxComponent,
4029
- InputComponent,
4030
- PasswordInputComponent,
4031
- RadioButtonComponent,
4032
- SelectComponent,
4033
- TextareaComponent,
4034
- UploadDragDropComponent,
4035
- UploadFileListComponent, BackButtonComponent,
4036
- BackToTopComponent,
4037
- BreadcrumbComponent,
4038
- BreadcrumbItemComponent,
4039
- HeaderComponent, IconComponent,
4040
- ErrorPageComponent,
4041
- LanguageSwitcherComponent,
4042
- MarkMatchingTextPipe], imports: [CommonModule,
4043
- TranslateModule,
4044
- ReactiveFormsModule,
4045
- NgIf,
4046
- NgForOf,
4047
- RouterLink], exports: [AccordionComponent,
4048
- AlertComponent,
4049
- BadgeDirective,
4050
- ButtonDirective,
4051
- CalloutComponent,
4052
- CardComponent,
4053
- CarouselComponent,
4054
- CarouselItemComponent,
4055
- ChipComponent,
4056
- CollapseComponent,
4057
- DimmerButtonsComponent,
4058
- DimmerComponent,
4059
- DimmerIconComponent,
4060
- DropdownComponent,
4061
- DropdownItemComponent,
4062
- ForwardDirective,
4063
- LinkComponent,
4064
- ListComponent,
4065
- ListItemComponent,
4066
- ModalComponent,
4067
- NotificationsComponent,
4068
- PaginationComponent,
4069
- PopoverDirective,
4070
- ProgressBarComponent,
4071
- ProgressButtonComponent,
4072
- RatingComponent,
4073
- SpinnerComponent,
4074
- SteppersContainerComponent,
4075
- SteppersItemComponent,
4076
- TabContainerComponent,
4077
- TabItemComponent,
4078
- TableComponent,
4079
- TooltipDirective, CheckboxComponent,
4080
- InputComponent,
4081
- PasswordInputComponent,
4082
- RadioButtonComponent,
4083
- SelectComponent,
4084
- TextareaComponent,
4085
- UploadDragDropComponent,
4086
- UploadFileListComponent, BackButtonComponent,
4087
- BackToTopComponent,
4088
- BreadcrumbComponent,
4089
- BreadcrumbItemComponent,
4090
- HeaderComponent, IconComponent,
4091
- ErrorPageComponent,
4092
- LanguageSwitcherComponent,
4093
- MarkMatchingTextPipe] });
4094
- ComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ComponentsModule, imports: [CommonModule,
4095
- TranslateModule,
4096
- ReactiveFormsModule] });
4097
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: ComponentsModule, decorators: [{
4098
- type: NgModule,
4099
- args: [{
4100
- declarations: [
4101
- ...core,
4102
- ...form,
4103
- ...navigation,
4104
- ...utils
4105
- ],
4106
- imports: [
4107
- CommonModule,
4108
- TranslateModule,
4109
- ReactiveFormsModule,
4110
- NgIf,
4111
- NgForOf,
4112
- RouterLink
4113
- ],
4114
- exports: [
4115
- ...core,
4116
- ...form,
4117
- ...navigation,
4118
- ...utils
4119
- ]
4120
- }]
4121
- }] });
4122
-
4123
- class DesignAngularKitModule {
4124
- constructor(translateService) {
4125
- this.translateService = translateService;
4126
- translateService.addLangs(['it', 'en']); // Adds 'it' and 'eng' as available languages.
4127
- translateService.use('it');
4128
- }
4129
- static forRoot(initConfig) {
4130
- return {
4131
- ngModule: DesignAngularKitModule,
4132
- providers: [
4133
- {
4134
- provide: DESIGN_ANGULAR_KIT_CONFIG,
4135
- useValue: new DesignAngularKitConfig(initConfig)
4136
- }
4137
- ]
4138
- };
4139
- }
4140
- }
4141
- DesignAngularKitModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: DesignAngularKitModule, deps: [{ token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.NgModule });
4142
- DesignAngularKitModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.6", ngImport: i0, type: DesignAngularKitModule, imports: [ComponentsModule,
4143
- HttpClientModule, i1$1.TranslateModule], exports: [ComponentsModule,
4144
- TranslateModule] });
4145
- DesignAngularKitModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: DesignAngularKitModule, imports: [ComponentsModule,
4146
- HttpClientModule,
4147
- TranslateModule.forChild({
4148
- loader: {
4149
- provide: TranslateLoader,
4150
- useFactory: (http) => new TranslateHttpLoader(http, '/bootstrap-italia/i18n/'),
4151
- deps: [HttpClient]
4152
- },
4153
- extend: true,
4154
- isolate: false,
4155
- defaultLanguage: 'it'
4156
- }), ComponentsModule,
4157
- TranslateModule] });
4158
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: DesignAngularKitModule, decorators: [{
4159
- type: NgModule,
4160
- args: [{
4161
- declarations: [],
4162
- imports: [
4163
- ComponentsModule,
4164
- HttpClientModule,
4165
- TranslateModule.forChild({
4166
- loader: {
4167
- provide: TranslateLoader,
4168
- useFactory: (http) => new TranslateHttpLoader(http, '/bootstrap-italia/i18n/'),
4169
- deps: [HttpClient]
4170
- },
4171
- extend: true,
4172
- isolate: false,
4173
- defaultLanguage: 'it'
4174
- })
4175
- ],
4176
- exports: [
4177
- ComponentsModule,
4178
- TranslateModule
4179
- ]
4180
- }]
4181
- }], ctorParameters: function () { return [{ type: i1$1.TranslateService }]; } });
4182
-
4183
- const IconNameArray = [
4184
- 'arrow-down',
4185
- 'arrow-down-circle',
4186
- 'arrow-down-triangle',
4187
- 'arrow-left',
4188
- 'arrow-left-circle',
4189
- 'arrow-left-triangle',
4190
- 'arrow-right',
4191
- 'arrow-right-circle',
4192
- 'arrow-right-triangle',
4193
- 'arrow-up',
4194
- 'arrow-up-circle',
4195
- 'arrow-up-triangle',
4196
- 'ban',
4197
- 'bookmark',
4198
- 'box',
4199
- 'burger',
4200
- 'calendar',
4201
- 'camera',
4202
- 'card',
4203
- 'chart-line',
4204
- 'check',
4205
- 'check-circle',
4206
- 'chevron-left',
4207
- 'chevron-right',
4208
- 'clip',
4209
- 'clock',
4210
- 'close',
4211
- 'close-big',
4212
- 'close-circle',
4213
- 'comment',
4214
- 'copy',
4215
- 'delete',
4216
- 'download',
4217
- 'error',
4218
- 'exchange-circle',
4219
- 'expand',
4220
- 'external-link',
4221
- 'flag',
4222
- 'folder',
4223
- 'fullscreen',
4224
- 'funnel',
4225
- 'hearing',
4226
- 'help',
4227
- 'help-circle',
4228
- 'horn',
4229
- 'inbox',
4230
- 'info-circle',
4231
- 'key',
4232
- 'link',
4233
- 'list',
4234
- 'locked',
4235
- 'logout',
4236
- 'mail',
4237
- 'mail-open',
4238
- 'map-marker',
4239
- 'map-marker-circle',
4240
- 'map-marker-minus',
4241
- 'map-marker-plus',
4242
- 'maximize',
4243
- 'maximize-alt',
4244
- 'minimize',
4245
- 'minus',
4246
- 'minus-circle',
4247
- 'more-actions',
4248
- 'more-items',
4249
- 'note',
4250
- 'pa',
4251
- 'password-invisible',
4252
- 'password-visible',
4253
- 'pencil',
4254
- 'piattaforme',
4255
- 'pin',
4256
- 'plug',
4257
- 'plus',
4258
- 'plus-circle',
4259
- 'presentation',
4260
- 'print',
4261
- 'refresh',
4262
- 'restore',
4263
- 'rss',
4264
- 'rss-square',
4265
- 'search',
4266
- 'settings',
4267
- 'share',
4268
- 'software',
4269
- 'star-full',
4270
- 'star-outline',
4271
- 'telephone',
4272
- 'tool',
4273
- 'unlocked',
4274
- 'upload',
4275
- 'user',
4276
- 'video',
4277
- 'warning',
4278
- 'warning-circle',
4279
- 'wifi',
4280
- 'zoom-in',
4281
- 'zoom-out',
4282
- // Files
4283
- 'file',
4284
- 'files',
4285
- 'file-audio',
4286
- 'file-compressed',
4287
- 'file-csv',
4288
- 'file-json',
4289
- 'file-odp',
4290
- 'file-ods',
4291
- 'file-odt',
4292
- 'file-pdf',
4293
- 'file-pdf-ext',
4294
- 'file-sheet',
4295
- 'file-slides',
4296
- 'file-txt',
4297
- 'file-video',
4298
- 'file-xml',
4299
- // Platforms
4300
- 'behance',
4301
- 'facebook',
4302
- 'facebook-square',
4303
- 'figma',
4304
- 'figma-square',
4305
- 'flickr',
4306
- 'flickr-square',
4307
- 'github',
4308
- 'instagram',
4309
- 'linkedin',
4310
- 'linkedin-square',
4311
- 'mastodon',
4312
- 'mastodon-square',
4313
- 'medium',
4314
- 'medium-square',
4315
- 'pinterest',
4316
- 'pinterest-square',
4317
- 'quora',
4318
- 'quora-square',
4319
- 'reddit',
4320
- 'reddit-square',
4321
- 'slack',
4322
- 'slack-square',
4323
- 'snapchat',
4324
- 'snapchat-square',
4325
- 'stackexchange',
4326
- 'stackexchange-square',
4327
- 'stackoverflow',
4328
- 'stackoverflow-square',
4329
- 'telegram',
4330
- 'tiktok',
4331
- 'tiktok-square',
4332
- 'twitter',
4333
- 'twitter-square',
4334
- 'vimeo',
4335
- 'vimeo-square',
4336
- 'whatsapp',
4337
- 'whatsapp-square',
4338
- 'youtube',
4339
- 'google',
4340
- // Extra
4341
- 'designers-italia',
4342
- 'team-digitale'
4343
- ];
4344
-
4345
- /*
4346
- * Public API Surface of design-angular-kit
4347
- */
4348
-
4349
- /**
4350
- * Generated bundle index. Do not edit.
4351
- */
4352
-
4353
- export { AccordionComponent, AlertComponent, BackButtonComponent, BackToTopComponent, BadgeDirective, BreadcrumbComponent, BreadcrumbItemComponent, ButtonDirective, CAP_REGEX, CalloutComponent, CardComponent, CarouselComponent, CarouselItemComponent, CheckboxComponent, ChipComponent, CollapseComponent, ComponentsModule, DESIGN_ANGULAR_KIT_CONFIG, DesignAngularKitConfig, DesignAngularKitModule, DimmerButtonsComponent, DimmerComponent, DimmerIconComponent, DropdownComponent, DropdownItemComponent, EMAIL_REGEX, ErrorPageComponent, FileUtils, ForwardDirective, HeaderComponent, ITALIAN_TAX_CODE_REGEX, IconComponent, IconNameArray, InputComponent, ItValidators, LanguageSwitcherComponent, LinkComponent, ListComponent, ListItemComponent, MarkMatchingTextPipe, ModalComponent, NotificationPosition, NotificationType, NotificationsComponent, NotificationsService, PHONE_NUMBER_REGEX, PaginationComponent, PasswordInputComponent, PopoverDirective, ProgressBarComponent, ProgressButtonComponent, RadioButtonComponent, RatingComponent, SelectComponent, SpinnerComponent, SteppersContainerComponent, SteppersItemComponent, TabContainerComponent, TabItemComponent, TableComponent, TextareaComponent, TooltipDirective, URL_REGEX, UploadDragDropComponent, UploadFileListComponent, VAT_NUMBER_REGEX };
4354
- //# sourceMappingURL=design-angular-kit.mjs.map