design-angular-kit 1.0.0-2 → 1.0.0-21

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 (220) hide show
  1. package/README.md +102 -26
  2. package/assets/i18n/en.json +122 -0
  3. package/assets/i18n/it.json +52 -11
  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 +192 -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 +47 -0
  65. package/esm2022/lib/design-angular-kit-config.mjs +15 -0
  66. package/esm2022/lib/design-angular-kit.module.mjs +68 -0
  67. package/esm2022/lib/interfaces/core.mjs +16 -0
  68. package/esm2022/lib/interfaces/design-angular-kit-init.mjs +2 -0
  69. package/esm2022/lib/interfaces/form.mjs +2 -0
  70. package/esm2022/lib/interfaces/icon.mjs +165 -0
  71. package/esm2022/lib/interfaces/utils.mjs +2 -0
  72. package/esm2022/lib/pipes/mark-matching-text.pipe.mjs +37 -0
  73. package/esm2022/lib/services/notification/notification.service.mjs +120 -0
  74. package/esm2022/lib/utils/file-utils.mjs +73 -0
  75. package/esm2022/lib/utils/regex.mjs +31 -0
  76. package/esm2022/lib/validators/it-validators.mjs +153 -0
  77. package/esm2022/public_api.mjs +85 -0
  78. package/fesm2022/design-angular-kit.mjs +4649 -0
  79. package/fesm2022/design-angular-kit.mjs.map +1 -0
  80. package/lib/abstracts/{abstract-form-component.d.ts → abstract-form.component.d.ts} +12 -10
  81. package/lib/abstracts/abstract.component.d.ts +24 -8
  82. package/lib/components/components.module.d.ts +40 -0
  83. package/lib/components/core/accordion/accordion.component.d.ts +11 -9
  84. package/lib/components/core/alert/alert.component.d.ts +32 -5
  85. package/lib/components/core/badge/badge.directive.d.ts +12 -6
  86. package/lib/components/core/button/button.directive.d.ts +24 -17
  87. package/lib/components/core/callout/callout.component.d.ts +26 -17
  88. package/lib/components/core/card/card.component.d.ts +23 -13
  89. package/lib/components/core/carousel/carousel/carousel.component.d.ts +34 -15
  90. package/lib/components/core/carousel/carousel-item/carousel-item.component.d.ts +8 -3
  91. package/lib/components/core/carousel/carousel.module.d.ts +8 -0
  92. package/lib/components/core/chip/chip.component.d.ts +8 -5
  93. package/lib/components/core/collapse/collapse.component.d.ts +16 -15
  94. package/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.d.ts +3 -3
  95. package/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.d.ts +3 -3
  96. package/lib/components/core/dimmer/dimmer.component.d.ts +4 -4
  97. package/lib/components/core/dimmer/dimmer.module.d.ts +9 -0
  98. package/lib/components/core/dropdown/dropdown/dropdown.component.d.ts +53 -10
  99. package/lib/components/core/dropdown/dropdown-item/dropdown-item.component.d.ts +8 -13
  100. package/lib/components/core/dropdown/dropdown.module.d.ts +8 -0
  101. package/lib/components/core/forward/forward.directive.d.ts +3 -3
  102. package/lib/components/core/link/link.component.d.ts +9 -10
  103. package/lib/components/core/list/list/list.component.d.ts +6 -5
  104. package/lib/components/core/list/list-item/list-item.component.d.ts +12 -8
  105. package/lib/components/core/list/list.module.d.ts +8 -0
  106. package/lib/components/core/modal/modal.component.d.ts +83 -14
  107. package/lib/components/core/notifications/notifications.component.d.ts +25 -11
  108. package/lib/components/core/pagination/pagination.component.d.ts +71 -10
  109. package/lib/components/core/popover/popover.directive.d.ts +15 -14
  110. package/lib/components/core/progress-bar/progress-bar.component.d.ts +6 -6
  111. package/lib/components/core/progress-button/progress-button.component.d.ts +5 -5
  112. package/lib/components/core/spinner/spinner.component.d.ts +6 -6
  113. package/lib/components/core/steppers/steppers-container/steppers-container.component.d.ts +128 -0
  114. package/lib/components/core/steppers/steppers-item/steppers-item.component.d.ts +20 -0
  115. package/lib/components/core/steppers/steppers.module.d.ts +8 -0
  116. package/lib/components/core/tab/tab-container/tab-container.component.d.ts +14 -12
  117. package/lib/components/core/tab/tab-item/tab-item.component.d.ts +11 -11
  118. package/lib/components/core/tab/tab.module.d.ts +8 -0
  119. package/lib/components/core/table/table.component.d.ts +14 -14
  120. package/lib/components/core/tooltip/tooltip.directive.d.ts +12 -11
  121. package/lib/components/form/checkbox/checkbox.component.d.ts +13 -10
  122. package/lib/components/form/form.module.d.ts +16 -0
  123. package/lib/components/form/input/input.component.d.ts +59 -13
  124. package/lib/components/form/password-input/password-input.component.d.ts +33 -8
  125. package/lib/components/form/radio-button/radio-button.component.d.ts +7 -6
  126. package/lib/components/form/range/range.component.d.ts +42 -0
  127. package/lib/components/form/rating/rating.component.d.ts +24 -0
  128. package/lib/components/form/select/select.component.d.ts +12 -6
  129. package/lib/components/form/textarea/textarea.component.d.ts +5 -5
  130. package/lib/components/form/upload-drag-drop/upload-drag-drop.component.d.ts +8 -7
  131. package/lib/components/form/upload-file-list/upload-file-list.component.d.ts +11 -9
  132. package/lib/components/navigation/back-button/back-button.component.d.ts +4 -4
  133. package/lib/components/navigation/back-to-top/back-to-top.component.d.ts +28 -13
  134. package/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.d.ts +11 -9
  135. package/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.d.ts +6 -6
  136. package/lib/components/navigation/breadcrumbs/breadcrumbs.module.d.ts +8 -0
  137. package/lib/components/navigation/header/header.component.d.ts +9 -13
  138. package/lib/components/utils/error-page/error-page.component.d.ts +44 -0
  139. package/lib/components/utils/icon/icon.component.d.ts +14 -16
  140. package/lib/components/utils/language-switcher/language-switcher.component.d.ts +27 -0
  141. package/lib/design-angular-kit-config.d.ts +16 -0
  142. package/lib/design-angular-kit.module.d.ts +9 -4
  143. package/lib/interfaces/core.d.ts +40 -16
  144. package/lib/interfaces/design-angular-kit-init.d.ts +7 -0
  145. package/lib/interfaces/form.d.ts +32 -8
  146. package/lib/interfaces/icon.d.ts +4 -3
  147. package/lib/interfaces/utils.d.ts +10 -0
  148. package/lib/pipes/mark-matching-text.pipe.d.ts +10 -0
  149. package/lib/services/{notifications/notifications.service.d.ts → notification/notification.service.d.ts} +20 -20
  150. package/lib/utils/boolean-input.d.ts +1 -1
  151. package/lib/utils/file-utils.d.ts +5 -0
  152. package/lib/utils/regex.d.ts +5 -0
  153. package/lib/validators/it-validators.d.ts +16 -9
  154. package/package.json +13 -17
  155. package/public_api.d.ts +21 -4
  156. package/esm2020/lib/abstracts/abstract-form-component.mjs +0 -165
  157. package/esm2020/lib/abstracts/abstract.component.mjs +0 -20
  158. package/esm2020/lib/components/core/accordion/accordion.component.mjs +0 -20
  159. package/esm2020/lib/components/core/alert/alert.component.mjs +0 -29
  160. package/esm2020/lib/components/core/badge/badge.directive.mjs +0 -34
  161. package/esm2020/lib/components/core/button/button.directive.mjs +0 -78
  162. package/esm2020/lib/components/core/callout/callout.component.mjs +0 -59
  163. package/esm2020/lib/components/core/card/card.component.mjs +0 -58
  164. package/esm2020/lib/components/core/carousel/carousel/carousel.component.mjs +0 -66
  165. package/esm2020/lib/components/core/carousel/carousel-item/carousel-item.component.mjs +0 -14
  166. package/esm2020/lib/components/core/chip/chip.component.mjs +0 -89
  167. package/esm2020/lib/components/core/collapse/collapse.component.mjs +0 -96
  168. package/esm2020/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.mjs +0 -24
  169. package/esm2020/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.mjs +0 -11
  170. package/esm2020/lib/components/core/dimmer/dimmer.component.mjs +0 -59
  171. package/esm2020/lib/components/core/dropdown/dropdown/dropdown.component.mjs +0 -60
  172. package/esm2020/lib/components/core/dropdown/dropdown-item/dropdown-item.component.mjs +0 -71
  173. package/esm2020/lib/components/core/forward/forward.directive.mjs +0 -51
  174. package/esm2020/lib/components/core/link/link.component.mjs +0 -39
  175. package/esm2020/lib/components/core/list/list/list.component.mjs +0 -13
  176. package/esm2020/lib/components/core/list/list-item/list-item.component.mjs +0 -36
  177. package/esm2020/lib/components/core/modal/modal.component.mjs +0 -98
  178. package/esm2020/lib/components/core/notifications/notifications.component.mjs +0 -66
  179. package/esm2020/lib/components/core/pagination/pagination.component.mjs +0 -51
  180. package/esm2020/lib/components/core/popover/popover.directive.mjs +0 -176
  181. package/esm2020/lib/components/core/progress-bar/progress-bar.component.mjs +0 -34
  182. package/esm2020/lib/components/core/progress-button/progress-button.component.mjs +0 -27
  183. package/esm2020/lib/components/core/spinner/spinner.component.mjs +0 -35
  184. package/esm2020/lib/components/core/tab/tab-container/tab-container.component.mjs +0 -33
  185. package/esm2020/lib/components/core/tab/tab-item/tab-item.component.mjs +0 -36
  186. package/esm2020/lib/components/core/table/table.component.mjs +0 -57
  187. package/esm2020/lib/components/core/tooltip/tooltip.directive.mjs +0 -140
  188. package/esm2020/lib/components/form/checkbox/checkbox.component.mjs +0 -40
  189. package/esm2020/lib/components/form/input/input.component.mjs +0 -159
  190. package/esm2020/lib/components/form/password-input/password-input.component.mjs +0 -112
  191. package/esm2020/lib/components/form/radio-button/radio-button.component.mjs +0 -53
  192. package/esm2020/lib/components/form/select/select.component.mjs +0 -62
  193. package/esm2020/lib/components/form/textarea/textarea.component.mjs +0 -46
  194. package/esm2020/lib/components/form/upload-drag-drop/upload-drag-drop.component.mjs +0 -134
  195. package/esm2020/lib/components/form/upload-file-list/upload-file-list.component.mjs +0 -99
  196. package/esm2020/lib/components/navigation/back-button/back-button.component.mjs +0 -69
  197. package/esm2020/lib/components/navigation/back-to-top/back-to-top.component.mjs +0 -39
  198. package/esm2020/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.mjs +0 -45
  199. package/esm2020/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.mjs +0 -23
  200. package/esm2020/lib/components/navigation/header/header.component.mjs +0 -61
  201. package/esm2020/lib/components/utils/icon/icon.component.mjs +0 -54
  202. package/esm2020/lib/components/utils/not-found-page/not-found-page.component.mjs +0 -13
  203. package/esm2020/lib/design-angular-kit.module.mjs +0 -42
  204. package/esm2020/lib/interfaces/core.mjs +0 -16
  205. package/esm2020/lib/interfaces/form.mjs +0 -2
  206. package/esm2020/lib/interfaces/icon.mjs +0 -2
  207. package/esm2020/lib/modules/components.module.mjs +0 -241
  208. package/esm2020/lib/services/notifications/notifications.service.mjs +0 -122
  209. package/esm2020/lib/utils/file-utils.mjs +0 -65
  210. package/esm2020/lib/utils/regex.mjs +0 -26
  211. package/esm2020/lib/validators/it-validators.mjs +0 -131
  212. package/esm2020/public_api.mjs +0 -64
  213. package/fesm2015/design-angular-kit.mjs +0 -3271
  214. package/fesm2015/design-angular-kit.mjs.map +0 -1
  215. package/fesm2020/design-angular-kit.mjs +0 -3231
  216. package/fesm2020/design-angular-kit.mjs.map +0 -1
  217. package/lib/components/utils/not-found-page/not-found-page.component.d.ts +0 -5
  218. package/lib/modules/components.module.d.ts +0 -57
  219. /package/{esm2020 → esm2022}/design-angular-kit.mjs +0 -0
  220. /package/{esm2020 → esm2022}/lib/utils/boolean-input.mjs +0 -0
@@ -1,3231 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, Input, Self, Optional, Directive, HostBinding, ChangeDetectionStrategy, ContentChildren, HostListener, TemplateRef, ViewChild, EventEmitter, Output, Injectable, Inject, NgModule } from '@angular/core';
3
- import * as i2$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 i2$2 from '@angular/router';
12
- import { RouterLink } from '@angular/router';
13
- import { CarouselBI, Collapse, Modal, Notification, Popover, Tooltip, InputPassword, ProgressDonut } from 'bootstrap-italia';
14
- import { Subject, filter, Observable, take } from 'rxjs';
15
- import { trigger, transition, style, animate } from '@angular/animations';
16
-
17
- class AbstractComponent {
18
- constructor(_renderer, _elementRef) {
19
- this._renderer = _renderer;
20
- this._elementRef = _elementRef;
21
- }
22
- ngAfterViewInit() {
23
- this._renderer.removeAttribute(this._elementRef.nativeElement, 'id');
24
- }
25
- }
26
- AbstractComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbstractComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
27
- AbstractComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AbstractComponent, selector: "ng-component", inputs: { id: "id" }, ngImport: i0, template: '', isInline: true });
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbstractComponent, decorators: [{
29
- type: Component,
30
- args: [{ template: '' }]
31
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { id: [{
32
- type: Input
33
- }] } });
34
-
35
- /**
36
- * Check if boolean input has true value and not is `undefined`
37
- * @param booleanInput the boolean input
38
- */
39
- function isTrueBooleanInput(booleanInput) {
40
- return booleanInput !== undefined && (booleanInput === true || booleanInput === 'true');
41
- }
42
- /**
43
- * Check if boolean input has false value or is `undefined`
44
- * @param booleanInput the boolean input
45
- */
46
- function isFalseBooleanInput(booleanInput) {
47
- return booleanInput === undefined || booleanInput === false || booleanInput === 'false';
48
- }
49
-
50
- class AbstractFormComponent extends AbstractComponent {
51
- constructor(_ngControl, _translateService, _renderer, _elementRef) {
52
- super(_renderer, _elementRef);
53
- this._ngControl = _ngControl;
54
- this._translateService = _translateService;
55
- this._renderer = _renderer;
56
- this._elementRef = _elementRef;
57
- /**
58
- * Validation color display mode (validation triggered if field is touched or not pristine)
59
- * - <b>true</b>: Always show the validation color
60
- * - <b>false</b>: Never show validation color
61
- * - <b>only-valid</b>: Show only valid validation color
62
- * - <b>only-invalid</b>: Show only invalid validation color
63
- * @default <b>only-invalid</b>: Show only invalid validation color
64
- */
65
- this.validationMode = 'only-invalid';
66
- this.onChange = (_) => {
67
- };
68
- this.onTouched = () => {
69
- };
70
- this.control = new FormControl();
71
- this._ngControl && (this._ngControl.valueAccessor = this);
72
- }
73
- /**
74
- * Check if field is invalid (Validation failed)
75
- */
76
- get isInvalid() {
77
- if (this.validationMode === 'only-valid' || (this.validationMode !== 'only-invalid' && isFalseBooleanInput(this.validationMode))) {
78
- return undefined;
79
- }
80
- if (this._ngControl) {
81
- return this._ngControl.invalid === true && (!this._ngControl.pristine || this._ngControl.touched === true);
82
- }
83
- return this.control.invalid && (!this.control.pristine || this.control.touched);
84
- }
85
- /**
86
- * Check if field is valid (Validation successful)
87
- */
88
- get isValid() {
89
- if (this.validationMode === 'only-invalid' || (this.validationMode !== 'only-valid' && isFalseBooleanInput(this.validationMode))) {
90
- return undefined;
91
- }
92
- if (this._ngControl) {
93
- return this._ngControl.valid === true && (!this._ngControl.pristine || this._ngControl.touched === true);
94
- }
95
- return this.control.valid && (!this.control.pristine || this.control.touched);
96
- }
97
- /**
98
- * Return the invalid message string from TranslateService
99
- */
100
- get invalidMessage() {
101
- if (this.control.hasError('required')) {
102
- return this._translateService.get('it.errors.required-field');
103
- }
104
- return this._translateService.get('it.errors.invalid-field');
105
- }
106
- ngOnInit() {
107
- if (this._ngControl) {
108
- this.control.setValidators(this._ngControl.control.validator);
109
- }
110
- }
111
- registerOnChange(fn) {
112
- this.control.valueChanges.subscribe(fn);
113
- this.onChange = fn;
114
- }
115
- registerOnTouched(fn) {
116
- this.onTouched = fn;
117
- }
118
- setDisabledState(isDisabled) {
119
- if (isDisabled) {
120
- return this.control.disable();
121
- }
122
- this.control.enable();
123
- }
124
- writeValue(value) {
125
- this.control.setValue(value, { emitEvent: false });
126
- }
127
- /**
128
- * Mark the control as touched
129
- */
130
- markAsTouched() {
131
- if (!this.control.touched) {
132
- this.onTouched();
133
- }
134
- }
135
- /**
136
- * Fired to check if form control is touched
137
- */
138
- ngDoCheck() {
139
- if (this.control.touched) {
140
- return;
141
- }
142
- if (this._ngControl?.control?.touched) {
143
- this.control.markAsTouched();
144
- }
145
- }
146
- /**
147
- * Add the validators in control and parent control
148
- * @param validators the validators
149
- * @protected
150
- */
151
- addValidators(validators) {
152
- if (!Array.isArray(validators)) {
153
- validators = [validators];
154
- }
155
- validators.forEach(validator => {
156
- if (!this.control.hasValidator(validator)) {
157
- this.control.addValidators(validator);
158
- }
159
- if (this._ngControl?.control && !this._ngControl.control.hasValidator(validator)) {
160
- this._ngControl.control.addValidators(validator);
161
- }
162
- });
163
- }
164
- /**
165
- * Reports whether the control with the given path has the error specified. <br/>
166
- * If the control is not present, false is returned.
167
- * @param errorCode The code of the error to check
168
- * @param path A list of control names that designates how to move from the current control
169
- * to the control that should be queried for errors.
170
- * @returns whether the given error is present in the control at the given path.
171
- */
172
- hasError(errorCode, path) {
173
- if (this._ngControl) {
174
- return this._ngControl.hasError(errorCode, path);
175
- }
176
- return this.control.hasError(errorCode, path);
177
- }
178
- /**
179
- * Reports error data for the control with the given path.
180
- * @param errorCode The code of the error to check
181
- * @param path A list of control names that designates how to move from the current control
182
- * to the control that should be queried for errors.
183
- * @returns error data for that particular error. If the control or error is not present,
184
- * null is returned.
185
- */
186
- getError(errorCode, path) {
187
- if (this._ngControl) {
188
- return this._ngControl.getError(errorCode, path);
189
- }
190
- return this.control.getError(errorCode, path);
191
- }
192
- }
193
- AbstractFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbstractFormComponent, deps: [{ token: i2.NgControl, optional: true, self: true }, { token: i2$1.TranslateService }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
194
- AbstractFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AbstractFormComponent, selector: "ng-component", inputs: { label: "label", validationMode: "validationMode" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
195
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbstractFormComponent, decorators: [{
196
- type: Component,
197
- args: [{ template: '' }]
198
- }], ctorParameters: function () { return [{ type: i2.NgControl, decorators: [{
199
- type: Self
200
- }, {
201
- type: Optional
202
- }] }, { type: i2$1.TranslateService }, { type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { label: [{
203
- type: Input
204
- }], validationMode: [{
205
- type: Input
206
- }] } });
207
-
208
- class AccordionComponent extends AbstractComponent {
209
- ngAfterViewInit() {
210
- super.ngAfterViewInit();
211
- this._renderer.removeAttribute(this._elementRef.nativeElement, 'title');
212
- }
213
- }
214
- AccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AccordionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
215
- AccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AccordionComponent, selector: "it-accordion[id][title]", inputs: { title: "title", opened: "opened" }, 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 px-0\"\n type=\"button\"\n data-bs-toggle=\"collapse\"\n [class.collapsed]=\"!opened\"\n [attr.data-bs-target]=\"'#collapse-' + id\"\n [attr.aria-controls]=\"'collapse-' + id\"\n [attr.aria-expanded]=\"opened ? 'true' : 'false'\">\n {{title}}\n </button>\n </h2>\n\n <div id=\"collapse-{{id}}\"\n class=\"accordion-collapse collapse\"\n role=\"region\"\n [class.show]=\"opened\"\n [attr.aria-labelledby]=\"'collapse-' + id + '-heading'\">\n\n <div class=\"accordion-body p-0\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n</div>\n\n", styles: [""] });
216
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AccordionComponent, decorators: [{
217
- type: Component,
218
- args: [{ selector: 'it-accordion[id][title]', 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 px-0\"\n type=\"button\"\n data-bs-toggle=\"collapse\"\n [class.collapsed]=\"!opened\"\n [attr.data-bs-target]=\"'#collapse-' + id\"\n [attr.aria-controls]=\"'collapse-' + id\"\n [attr.aria-expanded]=\"opened ? 'true' : 'false'\">\n {{title}}\n </button>\n </h2>\n\n <div id=\"collapse-{{id}}\"\n class=\"accordion-collapse collapse\"\n role=\"region\"\n [class.show]=\"opened\"\n [attr.aria-labelledby]=\"'collapse-' + id + '-heading'\">\n\n <div class=\"accordion-body p-0\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n</div>\n\n" }]
219
- }], propDecorators: { title: [{
220
- type: Input
221
- }], opened: [{
222
- type: Input
223
- }] } });
224
-
225
- class IconComponent {
226
- constructor(_renderer, _elementRef) {
227
- this._renderer = _renderer;
228
- this._elementRef = _elementRef;
229
- /**
230
- * Custom class
231
- */
232
- this.class = '';
233
- }
234
- /**
235
- * Return the icon href
236
- */
237
- get iconHref() {
238
- return `/bootstrap-italia/dist/svg/sprites.svg#it-${this.name}`;
239
- }
240
- /**
241
- * Return the icon class
242
- */
243
- get iconClass() {
244
- let iconClass = 'icon';
245
- if (this.size) {
246
- iconClass += ` icon-${this.size}`;
247
- }
248
- if (this.color) {
249
- iconClass += ` icon-${this.color}`;
250
- }
251
- if (this.class) {
252
- iconClass += ` ${this.class}`;
253
- }
254
- return iconClass;
255
- }
256
- ngAfterViewInit() {
257
- this._renderer.removeAttribute(this._elementRef.nativeElement, 'class');
258
- }
259
- }
260
- IconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IconComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
261
- IconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: IconComponent, selector: "it-icon[name]", inputs: { name: "name", size: "size", color: "color", padded: "padded", class: "class" }, ngImport: i0, template: "<svg [class]=\"iconClass\" [class.icon-padded]=\"padded\">\n <use [attr.href]=\"iconHref\" [attr.xlink:href]=\"iconHref\"></use>\n</svg>\n", styles: [""] });
262
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: IconComponent, decorators: [{
263
- type: Component,
264
- args: [{ selector: 'it-icon[name]', template: "<svg [class]=\"iconClass\" [class.icon-padded]=\"padded\">\n <use [attr.href]=\"iconHref\" [attr.xlink:href]=\"iconHref\"></use>\n</svg>\n" }]
265
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { name: [{
266
- type: Input
267
- }], size: [{
268
- type: Input
269
- }], color: [{
270
- type: Input
271
- }], padded: [{
272
- type: Input
273
- }], class: [{
274
- type: Input
275
- }] } });
276
-
277
- class AlertComponent {
278
- constructor() {
279
- /**
280
- * The alert color
281
- * @default info
282
- */
283
- this.color = 'info';
284
- }
285
- get isDismissible() {
286
- return isTrueBooleanInput(this.dismissible);
287
- }
288
- }
289
- AlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
290
- AlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AlertComponent, selector: "it-alert", inputs: { color: "color", dismissible: "dismissible" }, ngImport: i0, template: "<div class=\"alert alert-{{color}}\"\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", "class"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
291
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AlertComponent, decorators: [{
292
- type: Component,
293
- args: [{ selector: 'it-alert', template: "<div class=\"alert alert-{{color}}\"\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"] }]
294
- }], propDecorators: { color: [{
295
- type: Input
296
- }], dismissible: [{
297
- type: Input
298
- }] } });
299
-
300
- class BadgeDirective {
301
- get badgeClass() {
302
- let badgeClass = 'badge';
303
- if (isTrueBooleanInput(this.rounded)) {
304
- badgeClass += ` rounded-pill`;
305
- }
306
- if (this.color) {
307
- badgeClass += ` bg-${this.color}`;
308
- }
309
- return badgeClass;
310
- }
311
- }
312
- BadgeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BadgeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
313
- BadgeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: BadgeDirective, selector: "[itBadge]", inputs: { color: ["itBadge", "color"], rounded: "rounded" }, host: { properties: { "class": "this.badgeClass" } }, exportAs: ["itBadge"], ngImport: i0 });
314
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BadgeDirective, decorators: [{
315
- type: Directive,
316
- args: [{
317
- selector: '[itBadge]',
318
- exportAs: 'itBadge'
319
- }]
320
- }], propDecorators: { color: [{
321
- type: Input,
322
- args: ['itBadge']
323
- }], rounded: [{
324
- type: Input,
325
- args: ['rounded']
326
- }], badgeClass: [{
327
- type: HostBinding,
328
- args: ['class']
329
- }] } });
330
-
331
- class ProgressBarComponent {
332
- /**
333
- * Return the background color
334
- */
335
- get bgColor() {
336
- if (!this.color) {
337
- return '';
338
- }
339
- return ` bg-${this.color}`;
340
- }
341
- get isIndeterminate() {
342
- return isTrueBooleanInput(this.indeterminate);
343
- }
344
- }
345
- ProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
346
- ProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", 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", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
347
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ProgressBarComponent, decorators: [{
348
- type: Component,
349
- 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" }]
350
- }], propDecorators: { value: [{
351
- type: Input
352
- }], showLabel: [{
353
- type: Input
354
- }], indeterminate: [{
355
- type: Input
356
- }], color: [{
357
- type: Input
358
- }] } });
359
-
360
- class ButtonDirective {
361
- constructor() {
362
- this.isFocus = false;
363
- }
364
- onFocus() {
365
- this.isFocus = true;
366
- }
367
- onBlur() {
368
- this.isFocus = false;
369
- }
370
- get hostClasses() {
371
- let cssClass = 'btn';
372
- if (this.color) {
373
- cssClass += ` btn-${this.color}`;
374
- }
375
- if (this.size) {
376
- cssClass += ` btn-${this.size}`;
377
- }
378
- if (this.block) {
379
- cssClass += ' btn-block';
380
- }
381
- if (isTrueBooleanInput(this.disabled)) {
382
- cssClass += ' disabled';
383
- }
384
- if (this.isFocus) {
385
- cssClass += ' focus--mouse';
386
- }
387
- if (this.icons?.length && !this.progressBar) {
388
- cssClass += ' btn-icon';
389
- }
390
- if (this.progressBar) {
391
- cssClass += ' btn-progress';
392
- }
393
- return cssClass;
394
- }
395
- }
396
- ButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
397
- ButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", 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 }, { propertyName: "progressBar", predicate: ProgressBarComponent }], exportAs: ["itButton"], ngImport: i0 });
398
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ButtonDirective, decorators: [{
399
- type: Directive,
400
- args: [{
401
- selector: '[itButton]',
402
- exportAs: 'itButton'
403
- }]
404
- }], propDecorators: { color: [{
405
- type: Input,
406
- args: ['itButton']
407
- }], size: [{
408
- type: Input
409
- }], block: [{
410
- type: Input
411
- }], disabled: [{
412
- type: Input
413
- }, {
414
- type: HostBinding,
415
- args: ['disabled']
416
- }], icons: [{
417
- type: ContentChildren,
418
- args: [IconComponent]
419
- }], progressBar: [{
420
- type: ContentChildren,
421
- args: [ProgressBarComponent]
422
- }], onFocus: [{
423
- type: HostListener,
424
- args: ['focus']
425
- }], onBlur: [{
426
- type: HostListener,
427
- args: ['blur']
428
- }], hostClasses: [{
429
- type: HostBinding,
430
- args: ['class']
431
- }] } });
432
-
433
- class CalloutComponent {
434
- constructor(_renderer, _elementRef) {
435
- this._renderer = _renderer;
436
- this._elementRef = _elementRef;
437
- /**
438
- * Callout appearance
439
- * - <b>default</b>
440
- * - <b>highlight</b>: Callout version with border only on the left side
441
- * - <b>more</b>: It looks radically different from the other styles available and is suitable for more extensive texts
442
- * @default default
443
- */
444
- this.appearance = 'default';
445
- }
446
- /**
447
- * Retrieve the current icon to show
448
- */
449
- get iconName() {
450
- if (this.icon) {
451
- return this.icon;
452
- }
453
- if (this.appearance === 'more') {
454
- return 'zoom-in';
455
- }
456
- switch (this.color) {
457
- case 'success':
458
- return 'check-circle';
459
- case 'warning':
460
- return 'help-circle';
461
- case 'danger':
462
- return 'close-circle';
463
- case 'important':
464
- case 'note':
465
- default:
466
- return 'info-circle';
467
- }
468
- }
469
- ngAfterViewInit() {
470
- this._renderer.removeAttribute(this._elementRef.nativeElement, 'title');
471
- }
472
- }
473
- CalloutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CalloutComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
474
- CalloutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: CalloutComponent, selector: "it-callout", inputs: { title: "title", icon: "icon", color: "color", appearance: "appearance" }, ngImport: i0, template: "<div class=\"callout {{color}}\"\n [class.callout-highlight]=\"appearance === 'highlight'\"\n [class.callout-more]=\"appearance === 'more'\">\n\n <div class=\"callout-title\" *ngIf=\"title\">\n <it-icon [name]=\"iconName\"></it-icon>\n <span class=\"visually-hidden\">{{title}}</span>\n {{title}}\n </div>\n <p class=\"callout-big-text\">\n <ng-content select=\"[bigText]\"></ng-content>\n </p>\n <ng-content></ng-content>\n</div>\n", styles: [".callout-big-text: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", "class"] }] });
475
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CalloutComponent, decorators: [{
476
- type: Component,
477
- args: [{ selector: 'it-callout', template: "<div class=\"callout {{color}}\"\n [class.callout-highlight]=\"appearance === 'highlight'\"\n [class.callout-more]=\"appearance === 'more'\">\n\n <div class=\"callout-title\" *ngIf=\"title\">\n <it-icon [name]=\"iconName\"></it-icon>\n <span class=\"visually-hidden\">{{title}}</span>\n {{title}}\n </div>\n <p class=\"callout-big-text\">\n <ng-content select=\"[bigText]\"></ng-content>\n </p>\n <ng-content></ng-content>\n</div>\n", styles: [".callout-big-text:empty{display:none}\n"] }]
478
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { title: [{
479
- type: Input
480
- }], icon: [{
481
- type: Input
482
- }], color: [{
483
- type: Input
484
- }], appearance: [{
485
- type: Input
486
- }] } });
487
-
488
- class CardComponent extends AbstractComponent {
489
- constructor() {
490
- super(...arguments);
491
- /**
492
- * It serves to space the cards in their mobile version.
493
- * @default true
494
- */
495
- this.space = true;
496
- /**
497
- * Custom card class
498
- */
499
- this.cardClass = '';
500
- /**
501
- * Custom card body class
502
- */
503
- this.bodyClass = '';
504
- }
505
- get isSpace() {
506
- return isTrueBooleanInput(this.space);
507
- }
508
- get isTeaser() {
509
- return isTrueBooleanInput(this.teaser);
510
- }
511
- get isHasImage() {
512
- return isTrueBooleanInput(this.hasImage);
513
- }
514
- get isRounded() {
515
- return isTrueBooleanInput(this.rounded);
516
- }
517
- get isShadow() {
518
- return isTrueBooleanInput(this.shadow);
519
- }
520
- }
521
- CardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
522
- CardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", 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"] });
523
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardComponent, decorators: [{
524
- type: Component,
525
- args: [{ selector: 'it-card', 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"] }]
526
- }], propDecorators: { space: [{
527
- type: Input
528
- }], teaser: [{
529
- type: Input
530
- }], hasImage: [{
531
- type: Input
532
- }], rounded: [{
533
- type: Input
534
- }], shadow: [{
535
- type: Input
536
- }], cardClass: [{
537
- type: Input
538
- }], bodyClass: [{
539
- type: Input
540
- }] } });
541
-
542
- class CarouselItemComponent {
543
- }
544
- CarouselItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CarouselItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
545
- CarouselItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: CarouselItemComponent, selector: "it-carousel-item", viewQueries: [{ propertyName: "htmlContent", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n", styles: [""] });
546
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CarouselItemComponent, decorators: [{
547
- type: Component,
548
- args: [{ selector: 'it-carousel-item', template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n" }]
549
- }], propDecorators: { htmlContent: [{
550
- type: ViewChild,
551
- args: [TemplateRef]
552
- }] } });
553
-
554
- class CarouselComponent {
555
- constructor() {
556
- /**
557
- * The carousel type
558
- * @default default
559
- */
560
- this.type = 'default';
561
- /**
562
- * Custom class in splide__track element
563
- */
564
- this.trackClass = '';
565
- }
566
- get typeClass() {
567
- const typeClass = 'it-carousel-landscape-abstract';
568
- return this.type === 'default' ? typeClass : typeClass + `-${this.type}`;
569
- }
570
- get isFullCarousel() {
571
- return isTrueBooleanInput(this.fullCarousel);
572
- }
573
- get isBigImg() {
574
- return isTrueBooleanInput(this.bigImg);
575
- }
576
- get isLined() {
577
- return isTrueBooleanInput(this.lined);
578
- }
579
- ngAfterViewInit() {
580
- this.carousel = CarouselBI.getOrCreateInstance(this.carouselDiv.nativeElement);
581
- }
582
- /**
583
- * Removes CarouselBI features
584
- */
585
- dispose() {
586
- this.carousel?.dispose();
587
- }
588
- }
589
- CarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
590
- CarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: CarouselComponent, selector: "it-carousel", inputs: { title: "title", type: "type", trackClass: "trackClass", fullCarousel: "fullCarousel", bigImg: "bigImg", lined: "lined" }, queries: [{ propertyName: "items", predicate: CarouselItemComponent }], viewQueries: [{ propertyName: "carouselDiv", first: true, predicate: ["carousel"], descendants: true }], exportAs: ["itCarousel"], ngImport: i0, template: "<div class=\"it-carousel-wrapper splide {{typeClass}}\"\n [class.it-full-carousel]=\"isFullCarousel\"\n [class.it-big-img]=\"isBigImg\"\n data-bs-carousel-splide #carousel>\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"] }] });
591
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CarouselComponent, decorators: [{
592
- type: Component,
593
- args: [{ selector: 'it-carousel', exportAs: 'itCarousel', template: "<div class=\"it-carousel-wrapper splide {{typeClass}}\"\n [class.it-full-carousel]=\"isFullCarousel\"\n [class.it-big-img]=\"isBigImg\"\n data-bs-carousel-splide #carousel>\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"] }]
594
- }], propDecorators: { title: [{
595
- type: Input
596
- }], type: [{
597
- type: Input
598
- }], trackClass: [{
599
- type: Input
600
- }], fullCarousel: [{
601
- type: Input
602
- }], bigImg: [{
603
- type: Input
604
- }], lined: [{
605
- type: Input
606
- }], items: [{
607
- type: ContentChildren,
608
- args: [CarouselItemComponent]
609
- }], carouselDiv: [{
610
- type: ViewChild,
611
- args: ['carousel']
612
- }] } });
613
-
614
- class CollapseComponent extends AbstractComponent {
615
- constructor(_renderer, _elementRef) {
616
- super(_renderer, _elementRef);
617
- this._renderer = _renderer;
618
- this._elementRef = _elementRef;
619
- /**
620
- * Custom class
621
- */
622
- this.class = '';
623
- /**
624
- * This event fires immediately when the show method is called.
625
- */
626
- this.onShow = new EventEmitter();
627
- /**
628
- * This event is triggered when the tooltip has been made visible to the user (it will wait for the CSS transitions to complete).
629
- */
630
- this.onShown = new EventEmitter();
631
- /**
632
- * This event fires immediately when the hide method is called.
633
- */
634
- this.onHide = new EventEmitter();
635
- /**
636
- * This event is raised when the tooltip has finished being hidden from the user (it will wait for the CSS transitions to complete).
637
- */
638
- this.onHidden = new EventEmitter();
639
- this.element = this._elementRef.nativeElement;
640
- }
641
- get isMulti() {
642
- return isTrueBooleanInput(this.multi);
643
- }
644
- ngAfterViewInit() {
645
- super.ngAfterViewInit();
646
- this._renderer.removeAttribute(this._elementRef.nativeElement, 'class');
647
- this.collapse = Collapse.getOrCreateInstance(this.collapseDiv.nativeElement, {
648
- toggle: false
649
- });
650
- this.element.addEventListener('show.bs.collapse', event => this.onShow.emit(event));
651
- this.element.addEventListener('shown.bs.collapse', event => this.onShown.emit(event));
652
- this.element.addEventListener('hide.bs.collapse', event => this.onHide.emit(event));
653
- this.element.addEventListener('hidden.bs.collapse', event => this.onHidden.emit(event));
654
- }
655
- /**
656
- * Shows a resealable item
657
- * NOTE: Returns to the caller before the collapsable element has actually been shown (onShown event).
658
- */
659
- show() {
660
- this.collapse?.show();
661
- }
662
- /**
663
- * Hides a resealable item
664
- * NOTE: Returns to the caller before the collapsable element has actually been hidden (onHidden Event)
665
- */
666
- hide() {
667
- this.collapse?.hide();
668
- }
669
- /**
670
- * Toggle a collapsible item to show or hide it.
671
- * NOTE: Returns to the caller before the collapsable element has actually been shown or hidden (onShown and onHidden events)
672
- */
673
- toggle() {
674
- this.collapse?.toggle();
675
- }
676
- /**
677
- * Eliminates the possibility of an item being resealable
678
- */
679
- dispose() {
680
- this.collapse?.dispose();
681
- }
682
- }
683
- CollapseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CollapseComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
684
- CollapseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: CollapseComponent, selector: "it-collapse[id]", inputs: { multi: "multi", class: "class" }, outputs: { onShow: "onShow", onShown: "onShown", onHide: "onHide", onHidden: "onHidden" }, 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", styles: [""] });
685
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CollapseComponent, decorators: [{
686
- type: Component,
687
- args: [{ selector: 'it-collapse[id]', exportAs: 'itCollapse', template: "<div [id]=\"id\" class=\"collapse {{class}}\" [class.multi-collapse]=\"isMulti\" #collapse>\n <ng-content></ng-content>\n</div>\n" }]
688
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { multi: [{
689
- type: Input
690
- }], class: [{
691
- type: Input
692
- }], onShow: [{
693
- type: Output
694
- }], onShown: [{
695
- type: Output
696
- }], onHide: [{
697
- type: Output
698
- }], onHidden: [{
699
- type: Output
700
- }], collapseDiv: [{
701
- type: ViewChild,
702
- args: ['collapse']
703
- }] } });
704
-
705
- class LinkComponent {
706
- constructor(_renderer, _elementRef) {
707
- this._renderer = _renderer;
708
- this._elementRef = _elementRef;
709
- /**
710
- * Custom class
711
- */
712
- this.class = '';
713
- }
714
- get isExternalLink() {
715
- return isTrueBooleanInput(this.externalLink);
716
- }
717
- get isDisabled() {
718
- return isTrueBooleanInput(this.disabled);
719
- }
720
- ngAfterViewInit() {
721
- this._renderer.removeAttribute(this._elementRef.nativeElement, 'class');
722
- }
723
- }
724
- LinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LinkComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
725
- LinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: LinkComponent, selector: "it-link", inputs: { href: "href", externalLink: "externalLink", disabled: "disabled", class: "class" }, ngImport: i0, template: "<a *ngIf=\"!isExternalLink; else externalLink\" [class]=\"class\" [routerLink]=\"isDisabled ? null : href\">\n <ng-container *ngTemplateOutlet=\"linkContent\"></ng-container>\n</a>\n<ng-template #externalLink>\n <a [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", styles: [""], 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$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
726
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LinkComponent, decorators: [{
727
- type: Component,
728
- args: [{ selector: 'it-link', template: "<a *ngIf=\"!isExternalLink; else externalLink\" [class]=\"class\" [routerLink]=\"isDisabled ? null : href\">\n <ng-container *ngTemplateOutlet=\"linkContent\"></ng-container>\n</a>\n<ng-template #externalLink>\n <a [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" }]
729
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { href: [{
730
- type: Input
731
- }], externalLink: [{
732
- type: Input
733
- }], disabled: [{
734
- type: Input
735
- }], class: [{
736
- type: Input
737
- }] } });
738
-
739
- class DropdownItemComponent extends LinkComponent {
740
- constructor(_renderer, _elementRef, _changeDetectorRef) {
741
- super(_renderer, _elementRef);
742
- this._renderer = _renderer;
743
- this._elementRef = _elementRef;
744
- this._changeDetectorRef = _changeDetectorRef;
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.0.4", ngImport: i0, type: DropdownItemComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
786
- DropdownItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", 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\" [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 [class]=\"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 [class]=\"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", "class"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
787
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DropdownItemComponent, decorators: [{
788
- type: Component,
789
- args: [{ selector: 'it-dropdown-item', template: "<li>\n <span *ngIf=\"isDivider; else item\" class=\"divider\"></span>\n\n <ng-template #item>\n <it-link [class]=\"linkClass\" [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 [class]=\"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 [class]=\"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
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, 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
- get buttonClass() {
804
- let btnClass = 'btn dropdown-toggle';
805
- if (this.color) {
806
- btnClass += ` btn-${this.color}`;
807
- }
808
- else {
809
- btnClass += ` btn-dropdown`;
810
- }
811
- return btnClass;
812
- }
813
- get isFullWidth() {
814
- return isTrueBooleanInput(this.fullWidth);
815
- }
816
- get isDark() {
817
- return isTrueBooleanInput(this.dark);
818
- }
819
- ngOnChanges(changes) {
820
- if (changes['dark'] && !changes['dark'].firstChange) {
821
- this.setDarkItems();
822
- }
823
- }
824
- ngAfterViewInit() {
825
- super.ngAfterViewInit();
826
- this.setDarkItems();
827
- }
828
- /**
829
- * Set child items dark mode
830
- * @private
831
- */
832
- setDarkItems() {
833
- this.items?.forEach(item => {
834
- item.setDark(this.isDark);
835
- });
836
- }
837
- }
838
- DropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
839
- DropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: DropdownComponent, selector: "it-dropdown[id]", inputs: { color: "color", direction: "direction", fullWidth: "fullWidth", dark: "dark" }, queries: [{ propertyName: "items", predicate: DropdownItemComponent }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"dropdown {{direction}}\">\n <button [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 class=\"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", "class"] }] });
840
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DropdownComponent, decorators: [{
841
- type: Component,
842
- args: [{ selector: 'it-dropdown[id]', template: "<div class=\"dropdown {{direction}}\">\n <button [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 class=\"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"] }]
843
- }], propDecorators: { color: [{
844
- type: Input
845
- }], direction: [{
846
- type: Input
847
- }], fullWidth: [{
848
- type: Input
849
- }], dark: [{
850
- type: Input
851
- }], items: [{
852
- type: ContentChildren,
853
- args: [DropdownItemComponent]
854
- }] } });
855
-
856
- class ListComponent {
857
- }
858
- ListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
859
- ListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ListComponent, selector: "it-list", inputs: { linkList: "linkList" }, ngImport: i0, template: "<div class=\"it-list-wrapper\">\n <ul class=\"it-list\">\n <ng-content></ng-content>\n </ul>\n</div>\n", styles: [""] });
860
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ListComponent, decorators: [{
861
- type: Component,
862
- args: [{ selector: 'it-list', template: "<div class=\"it-list-wrapper\">\n <ul class=\"it-list\">\n <ng-content></ng-content>\n </ul>\n</div>\n" }]
863
- }], propDecorators: { linkList: [{
864
- type: Input
865
- }] } });
866
-
867
- class ListItemComponent extends LinkComponent {
868
- get itemClass() {
869
- let itemClass = 'list-item';
870
- if (isTrueBooleanInput(this.active)) {
871
- itemClass += ` active`;
872
- }
873
- if (isTrueBooleanInput(this.large)) {
874
- itemClass += ` large`;
875
- }
876
- if (this.class) {
877
- itemClass += ` ${this.class}`;
878
- }
879
- return itemClass;
880
- }
881
- }
882
- ListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ListItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
883
- ListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ListItemComponent, selector: "it-list-item", inputs: { active: "active", large: "large", 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"] }] });
884
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ListItemComponent, decorators: [{
885
- type: Component,
886
- args: [{ selector: 'it-list-item', 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"] }]
887
- }], propDecorators: { active: [{
888
- type: Input
889
- }], large: [{
890
- type: Input
891
- }], avatar: [{
892
- type: Input
893
- }], image: [{
894
- type: Input
895
- }] } });
896
-
897
- class ModalComponent extends AbstractComponent {
898
- constructor() {
899
- super(...arguments);
900
- /**
901
- * This event fires immediately when the instance method show is called.
902
- */
903
- this.onShow = new EventEmitter();
904
- /**
905
- * This event fires when the modal has been made visible to the user (it will wait for CSS transitions to complete).
906
- */
907
- this.onShown = new EventEmitter();
908
- /**
909
- * This event is raised immediately when the instance method hide has been called.
910
- */
911
- this.onHide = new EventEmitter();
912
- /**
913
- * This event fires when the modal has finished hiding from the user (it will wait for CSS transitions to complete).
914
- */
915
- this.onHidden = new EventEmitter();
916
- /**
917
- * This event is fired when the modal is displayed, its background is static and a click outside the modal or a press
918
- * of the esc key occurs and data-bs-keyboard is set to false.
919
- */
920
- this.onHidePrevented = new EventEmitter();
921
- }
922
- ngAfterViewInit() {
923
- super.ngAfterViewInit();
924
- this._renderer.removeAttribute(this._elementRef.nativeElement, 'title');
925
- if (this.modalElement) {
926
- const element = this.modalElement.nativeElement;
927
- this.modal = Modal.getOrCreateInstance(element);
928
- element.addEventListener('show.bs.modal', event => this.onShow.emit(event));
929
- element.addEventListener('shown.bs.modal', event => this.onShown.emit(event));
930
- element.addEventListener('hide.bs.modal', event => this.onHide.emit(event));
931
- element.addEventListener('hidden.bs.modal', event => this.onHidden.emit(event));
932
- element.addEventListener('hidePrevented.bs.modal', event => this.onHidePrevented.emit(event));
933
- }
934
- }
935
- /**
936
- * Manually activate/deactivate a modal. Returns to the caller before the modal has actually been shown or hidden
937
- */
938
- toggle() {
939
- this.modal?.toggle();
940
- }
941
- /**
942
- * Manually open a modal. Returns to the caller before the modal has actually been displayed
943
- */
944
- show() {
945
- this.modal?.show();
946
- }
947
- /**
948
- * Manually hide a modal. Returns to the caller before the modal has actually been hidden
949
- */
950
- hide() {
951
- this.modal?.hide();
952
- }
953
- /**
954
- * Manually reposition the modal if the height of the modal changes when it is opened (in case a scroll bar appears).
955
- */
956
- handleUpdate() {
957
- this.modal?.handleUpdate();
958
- }
959
- /**
960
- * Destroys the modal of an element.
961
- */
962
- dispose() {
963
- this.modal?.dispose();
964
- }
965
- }
966
- ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
967
- ModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ModalComponent, selector: "it-modal[id][title]", inputs: { title: "title", size: "size" }, outputs: { onShow: "onShow", onShown: "onShown", onHide: "onHide", onHidden: "onHidden", onHidePrevented: "onHidePrevented" }, viewQueries: [{ propertyName: "modalElement", first: true, predicate: ["modalElement"], descendants: true }], exportAs: ["itModal"], usesInheritance: true, ngImport: i0, template: "<div [id]=\"id\" class=\"modal fade\"\n tabindex=\"-1\"\n role=\"dialog\"\n aria-hidden=\"true\"\n [attr.aria-labelledby]=\"id+'-label'\" #modalElement>\n <div class=\"modal-dialog {{size}}\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h2 class=\"modal-title h5 no_toc\" id=\"{{id}}-label\">{{title}}</h2>\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" [attr.aria-label]=\"'it.core.close-modal'|translate\"></button>\n </div>\n <div class=\"modal-body mb-3\">\n <ng-content></ng-content>\n </div>\n <div class=\"modal-footer modal-footer-shadow\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </div>\n </div>\n</div>\n", styles: [".modal-footer:empty{display:none}\n"], dependencies: [{ kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
968
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ModalComponent, decorators: [{
969
- type: Component,
970
- args: [{ selector: 'it-modal[id][title]', exportAs: 'itModal', template: "<div [id]=\"id\" class=\"modal fade\"\n tabindex=\"-1\"\n role=\"dialog\"\n aria-hidden=\"true\"\n [attr.aria-labelledby]=\"id+'-label'\" #modalElement>\n <div class=\"modal-dialog {{size}}\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h2 class=\"modal-title h5 no_toc\" id=\"{{id}}-label\">{{title}}</h2>\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" [attr.aria-label]=\"'it.core.close-modal'|translate\"></button>\n </div>\n <div class=\"modal-body mb-3\">\n <ng-content></ng-content>\n </div>\n <div class=\"modal-footer modal-footer-shadow\">\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </div>\n </div>\n</div>\n", styles: [".modal-footer:empty{display:none}\n"] }]
971
- }], propDecorators: { title: [{
972
- type: Input
973
- }], size: [{
974
- type: Input
975
- }], onShow: [{
976
- type: Output
977
- }], onShown: [{
978
- type: Output
979
- }], onHide: [{
980
- type: Output
981
- }], onHidden: [{
982
- type: Output
983
- }], onHidePrevented: [{
984
- type: Output
985
- }], modalElement: [{
986
- type: ViewChild,
987
- args: ['modalElement', { static: false }]
988
- }] } });
989
-
990
- var NotificationType;
991
- (function (NotificationType) {
992
- NotificationType["Standard"] = "standard";
993
- NotificationType["Success"] = "success";
994
- NotificationType["Error"] = "error";
995
- NotificationType["Info"] = "info";
996
- NotificationType["Warning"] = "warning";
997
- })(NotificationType || (NotificationType = {}));
998
- var NotificationPosition;
999
- (function (NotificationPosition) {
1000
- NotificationPosition["Top"] = "top-fix mt-3";
1001
- NotificationPosition["Bottom"] = "bottom-fix mb-3";
1002
- NotificationPosition["Left"] = "left-fix ms-3";
1003
- NotificationPosition["Right"] = "right-fix me-3";
1004
- })(NotificationPosition || (NotificationPosition = {}));
1005
-
1006
- class NotificationsService {
1007
- constructor() {
1008
- this.subject = new Subject();
1009
- }
1010
- /**
1011
- * Listen on notification arrived
1012
- * @param filterType filter type of notification
1013
- */
1014
- onNotification(filterType) {
1015
- return this.subject.asObservable().pipe(filter(n => n && (!filterType || (n.type === filterType))));
1016
- }
1017
- /**
1018
- * Show new notification
1019
- * @param notification notification
1020
- */
1021
- addNotification(notification) {
1022
- this.subject.next(notification);
1023
- }
1024
- /**
1025
- * Create new Standard notification
1026
- * @param title notification title
1027
- * @param message notification message
1028
- * @param dismissable notification dismissable
1029
- * @param duration notification duration (millis)
1030
- * @param position notification position
1031
- */
1032
- standard(title, message, dismissable = true, duration, position) {
1033
- this.addNotification({
1034
- type: NotificationType.Standard,
1035
- message,
1036
- title,
1037
- duration,
1038
- dismissable,
1039
- position
1040
- });
1041
- }
1042
- /**
1043
- * Create new Success notification
1044
- * @param title notification title
1045
- * @param message notification message
1046
- * @param dismissable notification dismissable
1047
- * @param duration notification duration (millis)
1048
- * @param position notification position
1049
- */
1050
- success(title, message, dismissable = true, duration, position) {
1051
- this.addNotification({
1052
- type: NotificationType.Success,
1053
- message,
1054
- title,
1055
- duration,
1056
- dismissable,
1057
- position
1058
- });
1059
- }
1060
- /**
1061
- * Create new Error notification
1062
- * @param title notification title
1063
- * @param message notification message
1064
- * @param dismissable notification dismissable
1065
- * @param duration notification duration (millis)
1066
- * @param position notification position
1067
- */
1068
- error(title, message, dismissable = true, duration, position) {
1069
- this.addNotification({
1070
- type: NotificationType.Error,
1071
- message,
1072
- title,
1073
- duration,
1074
- dismissable,
1075
- position
1076
- });
1077
- }
1078
- /**
1079
- * Create new Warning notification
1080
- * @param title notification title
1081
- * @param message notification message
1082
- * @param dismissable notification dismissable
1083
- * @param duration notification duration (millis)
1084
- * @param position notification position
1085
- */
1086
- warning(title, message, dismissable = true, duration, position) {
1087
- this.addNotification({
1088
- type: NotificationType.Warning,
1089
- message,
1090
- title,
1091
- duration,
1092
- dismissable,
1093
- position
1094
- });
1095
- }
1096
- /**
1097
- * Create new Info notification
1098
- * @param title notification title
1099
- * @param message notification message
1100
- * @param dismissable notification dismissable
1101
- * @param duration notification duration (millis)
1102
- * @param position notification position
1103
- */
1104
- info(title, message, dismissable = true, duration, position) {
1105
- this.addNotification({
1106
- type: NotificationType.Info,
1107
- message,
1108
- title,
1109
- duration,
1110
- dismissable,
1111
- position
1112
- });
1113
- }
1114
- }
1115
- NotificationsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NotificationsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1116
- NotificationsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NotificationsService, providedIn: 'root' });
1117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NotificationsService, decorators: [{
1118
- type: Injectable,
1119
- args: [{
1120
- providedIn: 'root'
1121
- }]
1122
- }] });
1123
-
1124
- class NotificationsComponent {
1125
- constructor(_notificationService) {
1126
- this._notificationService = _notificationService;
1127
- /**
1128
- * Default notifications duration
1129
- * @default 8000
1130
- */
1131
- this.duration = 8000;
1132
- this.notifications = [];
1133
- this.subscription = this._notificationService.onNotification().subscribe(notification => {
1134
- if (!notification.duration) {
1135
- notification.duration = this.duration; // Add duration if not is set
1136
- }
1137
- if (!notification.position && this.position) {
1138
- notification.position = this.position; // Add position if not is set
1139
- }
1140
- const newNotification = {
1141
- ...notification,
1142
- id: `${notification.type}-${this.notifications.length}-notification`
1143
- };
1144
- const index = this.notifications.push(newNotification);
1145
- setTimeout(() => {
1146
- // Show the notification
1147
- new Notification(document.getElementById(newNotification.id), {
1148
- timeout: notification.duration
1149
- }).show();
1150
- // Clear notification after the duration
1151
- setTimeout(() => {
1152
- this.notifications = this.notifications.splice(index, 1);
1153
- }, notification.duration);
1154
- }, 200);
1155
- });
1156
- }
1157
- ngOnDestroy() {
1158
- this.subscription.unsubscribe();
1159
- }
1160
- get NotificationType() {
1161
- return NotificationType;
1162
- }
1163
- /**
1164
- * Hide the notification
1165
- * @param id
1166
- */
1167
- hideNotification(id) {
1168
- Notification.getInstance(document.getElementById(id))?.hide();
1169
- }
1170
- }
1171
- NotificationsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NotificationsComponent, deps: [{ token: NotificationsService }], target: i0.ɵɵFactoryTarget.Component });
1172
- NotificationsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: NotificationsComponent, selector: "it-notifications", inputs: { duration: "duration", position: "position" }, ngImport: i0, template: "<div *ngFor=\"let notification of notifications; let i = index\"\n [id]=\"notification.id\"\n class=\"notification {{notification.position}} {{notification.type}}\"\n [class.with-icon]=\"notification.type !== NotificationType.Standard\"\n [class.dismissable]=\"notification.dismissable\"\n role=\"alert\" [attr.aria-labelledby]=\"notification.id+'-title'\">\n\n <h2 [id]=\"notification.id+'-title'\" class=\"h5\">\n <ng-container>{{notification.title}}</ng-container>\n </h2>\n <p *ngIf=\"notification.message\">{{notification.message}}</p>\n\n <button *ngIf=\"notification.dismissable\" 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", "class"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
1173
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NotificationsComponent, decorators: [{
1174
- type: Component,
1175
- args: [{ selector: 'it-notifications', template: "<div *ngFor=\"let notification of notifications; let i = index\"\n [id]=\"notification.id\"\n class=\"notification {{notification.position}} {{notification.type}}\"\n [class.with-icon]=\"notification.type !== NotificationType.Standard\"\n [class.dismissable]=\"notification.dismissable\"\n role=\"alert\" [attr.aria-labelledby]=\"notification.id+'-title'\">\n\n <h2 [id]=\"notification.id+'-title'\" class=\"h5\">\n <ng-container>{{notification.title}}</ng-container>\n </h2>\n <p *ngIf=\"notification.message\">{{notification.message}}</p>\n\n <button *ngIf=\"notification.dismissable\" 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"] }]
1176
- }], ctorParameters: function () { return [{ type: NotificationsService }]; }, propDecorators: { duration: [{
1177
- type: Input
1178
- }], position: [{
1179
- type: Input
1180
- }] } });
1181
-
1182
- class PaginationComponent {
1183
- constructor() {
1184
- /**
1185
- * Fired when page is changed
1186
- */
1187
- this.newPageEvent = new EventEmitter();
1188
- }
1189
- /**
1190
- * Create array to generate pagination of 5 element
1191
- */
1192
- get pages() {
1193
- const length = this.pageNumbers > 5 ? 5 : this.pageNumbers;
1194
- let start = (this.currentPage > 1 && this.pageNumbers > 5) ? this.currentPage - 1 : 1;
1195
- if (this.pageNumbers > 5) {
1196
- if ((this.currentPage + 1) >= this.pageNumbers) {
1197
- start -= 2;
1198
- }
1199
- else if (this.currentPage >= (this.pageNumbers - 2)) {
1200
- start -= (this.pageNumbers - (this.currentPage + 1));
1201
- }
1202
- }
1203
- return Array.from({ length }, (_, i) => i + start);
1204
- }
1205
- /**
1206
- * On click page change
1207
- * @param newPage the new page of table
1208
- */
1209
- pageChange(newPage) {
1210
- this.newPageEvent.emit(newPage - 1); // emit new page
1211
- }
1212
- }
1213
- PaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1214
- PaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: PaginationComponent, selector: "it-pagination[currentPage][pageNumbers]", inputs: { currentPage: "currentPage", pageNumbers: "pageNumbers", alignment: "alignment" }, outputs: { newPageEvent: "newPageEvent" }, ngImport: i0, template: "<nav class=\"pagination-wrapper\"\n [class.justify-content-center]=\"alignment==='center'\"\n [class.justify-content-end]=\"alignment==='end'\">\n <ul class=\"pagination\">\n <li class=\"page-item\" [class.disabled]=\"currentPage < 1\">\n <a class=\"page-link\" (click)=\"pageChange(currentPage)\">\n <it-icon name=\"chevron-left\" color=\"primary\"></it-icon>\n <span class=\"visually-hidden\">{{'it.core.previous-page'|translate}}</span>\n </a>\n </li>\n\n <ng-container *ngIf=\"pageNumbers > 5 && currentPage > 2\">\n <li class=\"page-item\"><a class=\"page-link\" (click)=\"pageChange(1)\">1</a></li>\n <li class=\"page-item\" *ngIf=\"currentPage > 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\" (click)=\"pageChange(page)\">{{page}}</a>\n </ng-template>\n </li>\n\n <ng-container *ngIf=\"pageNumbers > 5 && pageNumbers - currentPage > 3\">\n <li class=\"page-item\">\n <span class=\"page-link\">...</span>\n </li>\n <li class=\"page-item\"><a class=\"page-link\" (click)=\"pageChange(pageNumbers)\">{{pageNumbers}}</a></li>\n </ng-container>\n\n <li class=\"page-item\" [class.disabled]=\"currentPage >= pageNumbers - 1\">\n <a class=\"page-link\" (click)=\"pageChange(currentPage + 2)\">\n <span class=\"visually-hidden\">{{'it.core.next-page'|translate}}</span>\n <it-icon name=\"chevron-right\" color=\"primary\"></it-icon>\n </a>\n </li>\n </ul>\n</nav>\n", styles: [".page-item:not(.disabled)>a.page-link{cursor:pointer}\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", "class"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
1215
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PaginationComponent, decorators: [{
1216
- type: Component,
1217
- args: [{ selector: 'it-pagination[currentPage][pageNumbers]', template: "<nav class=\"pagination-wrapper\"\n [class.justify-content-center]=\"alignment==='center'\"\n [class.justify-content-end]=\"alignment==='end'\">\n <ul class=\"pagination\">\n <li class=\"page-item\" [class.disabled]=\"currentPage < 1\">\n <a class=\"page-link\" (click)=\"pageChange(currentPage)\">\n <it-icon name=\"chevron-left\" color=\"primary\"></it-icon>\n <span class=\"visually-hidden\">{{'it.core.previous-page'|translate}}</span>\n </a>\n </li>\n\n <ng-container *ngIf=\"pageNumbers > 5 && currentPage > 2\">\n <li class=\"page-item\"><a class=\"page-link\" (click)=\"pageChange(1)\">1</a></li>\n <li class=\"page-item\" *ngIf=\"currentPage > 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\" (click)=\"pageChange(page)\">{{page}}</a>\n </ng-template>\n </li>\n\n <ng-container *ngIf=\"pageNumbers > 5 && pageNumbers - currentPage > 3\">\n <li class=\"page-item\">\n <span class=\"page-link\">...</span>\n </li>\n <li class=\"page-item\"><a class=\"page-link\" (click)=\"pageChange(pageNumbers)\">{{pageNumbers}}</a></li>\n </ng-container>\n\n <li class=\"page-item\" [class.disabled]=\"currentPage >= pageNumbers - 1\">\n <a class=\"page-link\" (click)=\"pageChange(currentPage + 2)\">\n <span class=\"visually-hidden\">{{'it.core.next-page'|translate}}</span>\n <it-icon name=\"chevron-right\" color=\"primary\"></it-icon>\n </a>\n </li>\n </ul>\n</nav>\n", styles: [".page-item:not(.disabled)>a.page-link{cursor:pointer}\n"] }]
1218
- }], propDecorators: { currentPage: [{
1219
- type: Input
1220
- }], pageNumbers: [{
1221
- type: Input
1222
- }], alignment: [{
1223
- type: Input
1224
- }], newPageEvent: [{
1225
- type: Output
1226
- }] } });
1227
-
1228
- class PopoverDirective {
1229
- constructor(_elementRef) {
1230
- this._elementRef = _elementRef;
1231
- /**
1232
- * This event fires immediately when the show method is called.
1233
- */
1234
- this.onShow = new EventEmitter();
1235
- /**
1236
- * This event is triggered when the tooltip has been made visible to the user (it will wait for the CSS transitions to complete).
1237
- */
1238
- this.onShown = new EventEmitter();
1239
- /**
1240
- * This event fires immediately when the hide method is called.
1241
- */
1242
- this.onHide = new EventEmitter();
1243
- /**
1244
- * This event is raised when the tooltip has finished being hidden from the user (it will wait for the CSS transitions to complete).
1245
- */
1246
- this.onHidden = new EventEmitter();
1247
- /**
1248
- * This event fires after the show event when the tooltip template has been added to the DOM.
1249
- */
1250
- this.onInserted = new EventEmitter();
1251
- this.element = this._elementRef.nativeElement;
1252
- }
1253
- /**
1254
- * Define the popover content
1255
- * @param content the popover content
1256
- */
1257
- set content(content) {
1258
- this.element.setAttribute('data-bs-content', content);
1259
- }
1260
- /**
1261
- * Define the popover title
1262
- * @param title the popover title
1263
- */
1264
- set title(title) {
1265
- if (title) {
1266
- // this.element.setAttribute("title", title);
1267
- this.element.setAttribute('data-bs-original-title', title);
1268
- }
1269
- }
1270
- /**
1271
- * Define the popover placement
1272
- * @param placement
1273
- */
1274
- set placement(placement) {
1275
- this.element.setAttribute('data-bs-placement', placement);
1276
- }
1277
- /**
1278
- * Appends the popover to a specific element.
1279
- * @param container
1280
- */
1281
- set container(container) {
1282
- if (container) {
1283
- this.element.setAttribute('data-container', container);
1284
- }
1285
- }
1286
- /**
1287
- * Indicates whether the title contains html
1288
- * @param html true if contain html
1289
- */
1290
- set html(html) {
1291
- this.element.setAttribute('data-bs-html', isTrueBooleanInput(html) ? 'true' : 'false');
1292
- }
1293
- /**
1294
- * How popover is triggered
1295
- * - 'hover': To open the Popover on hover of the mouse over the element
1296
- * - 'focus': To ignore popovers on the user's next click of an element other than the toggle element.
1297
- * @param trigger
1298
- */
1299
- set hover(trigger) {
1300
- if (trigger) {
1301
- this.element.setAttribute('data-bs-trigger', trigger);
1302
- }
1303
- }
1304
- ngAfterViewInit() {
1305
- this.element.setAttribute('data-bs-toggle', 'popover');
1306
- this.popover = Popover.getOrCreateInstance(this.element);
1307
- this.element.addEventListener('show.bs.popover', event => this.onShow.emit(event));
1308
- this.element.addEventListener('shown.bs.popover', event => this.onShown.emit(event));
1309
- this.element.addEventListener('hide.bs.popover', event => this.onHide.emit(event));
1310
- this.element.addEventListener('hidden.bs.popover', event => this.onHidden.emit(event));
1311
- this.element.addEventListener('inserted.bs.popover', event => this.onInserted.emit(event));
1312
- }
1313
- /**
1314
- * Shows the popover of an item.
1315
- */
1316
- show() {
1317
- this.popover?.show();
1318
- }
1319
- /**
1320
- * Hide the popover of an element.
1321
- */
1322
- hide() {
1323
- this.popover?.hide();
1324
- }
1325
- /**
1326
- * Activate / Deactivate the popover of an element
1327
- */
1328
- toggle() {
1329
- this.popover?.toggle();
1330
- }
1331
- /**
1332
- * Hides and destroys the popover of an element.
1333
- */
1334
- dispose() {
1335
- this.popover?.dispose();
1336
- }
1337
- /**
1338
- * Gives the popover of an element a chance to be shown.
1339
- */
1340
- enable() {
1341
- this.popover?.enable();
1342
- }
1343
- /**
1344
- * Removes the ability to show the popover of an element.
1345
- */
1346
- disable() {
1347
- this.popover?.disable();
1348
- }
1349
- /**
1350
- * Toggles the possibility that the popover of an element is shown or hidden.
1351
- */
1352
- toggleEnabled() {
1353
- this.popover?.disable();
1354
- }
1355
- /**
1356
- * Updates the position of an element's popover.
1357
- */
1358
- update() {
1359
- this.popover?.disable();
1360
- }
1361
- }
1362
- PopoverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PopoverDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1363
- PopoverDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: PopoverDirective, selector: "[itPopover]", inputs: { content: ["itPopover", "content"], title: ["popoverTitle", "title"], placement: ["popoverPlacement", "placement"], container: ["popoverContainer", "container"], html: ["popoverHtml", "html"], hover: ["popoverTrigger", "hover"] }, outputs: { onShow: "onShow", onShown: "onShown", onHide: "onHide", onHidden: "onHidden", onInserted: "onInserted" }, exportAs: ["itPopover"], ngImport: i0 });
1364
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PopoverDirective, decorators: [{
1365
- type: Directive,
1366
- args: [{
1367
- selector: '[itPopover]',
1368
- exportAs: 'itPopover'
1369
- }]
1370
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { content: [{
1371
- type: Input,
1372
- args: ['itPopover']
1373
- }], title: [{
1374
- type: Input,
1375
- args: ['popoverTitle']
1376
- }], placement: [{
1377
- type: Input,
1378
- args: ['popoverPlacement']
1379
- }], container: [{
1380
- type: Input,
1381
- args: ['popoverContainer']
1382
- }], html: [{
1383
- type: Input,
1384
- args: ['popoverHtml']
1385
- }], hover: [{
1386
- type: Input,
1387
- args: ['popoverTrigger']
1388
- }], onShow: [{
1389
- type: Output
1390
- }], onShown: [{
1391
- type: Output
1392
- }], onHide: [{
1393
- type: Output
1394
- }], onHidden: [{
1395
- type: Output
1396
- }], onInserted: [{
1397
- type: Output
1398
- }] } });
1399
-
1400
- class ProgressButtonComponent {
1401
- get isProgress() {
1402
- return typeof this.progress === 'number' || isTrueBooleanInput(this.progress);
1403
- }
1404
- get progressValue() {
1405
- return typeof this.progress === 'number' ? this.progress : 0;
1406
- }
1407
- get isIndeterminate() {
1408
- return typeof this.progress !== 'number' && isTrueBooleanInput(this.progress);
1409
- }
1410
- }
1411
- ProgressButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ProgressButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1412
- ProgressButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", 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", styles: [""], 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 });
1413
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ProgressButtonComponent, decorators: [{
1414
- type: Component,
1415
- 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" }]
1416
- }], propDecorators: { progress: [{
1417
- type: Input
1418
- }], progressColor: [{
1419
- type: Input
1420
- }] } });
1421
-
1422
- class SpinnerComponent {
1423
- constructor() {
1424
- /**
1425
- * The spinner is active
1426
- */
1427
- this.active = true;
1428
- }
1429
- get isActive() {
1430
- return isTrueBooleanInput(this.active);
1431
- }
1432
- get isSmall() {
1433
- return isTrueBooleanInput(this.small);
1434
- }
1435
- get isDouble() {
1436
- return isTrueBooleanInput(this.double);
1437
- }
1438
- }
1439
- SpinnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1440
- SpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", 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", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
1441
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SpinnerComponent, decorators: [{
1442
- type: Component,
1443
- args: [{ selector: 'it-spinner', 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" }]
1444
- }], propDecorators: { active: [{
1445
- type: Input
1446
- }], small: [{
1447
- type: Input
1448
- }], double: [{
1449
- type: Input
1450
- }] } });
1451
-
1452
- class TabItemComponent extends AbstractComponent {
1453
- constructor() {
1454
- super(...arguments);
1455
- /**
1456
- * Custom class
1457
- */
1458
- this.class = '';
1459
- }
1460
- ngAfterViewInit() {
1461
- super.ngAfterViewInit();
1462
- this._renderer.removeAttribute(this._elementRef.nativeElement, 'class');
1463
- }
1464
- }
1465
- TabItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TabItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1466
- TabItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: TabItemComponent, selector: "it-tab-item[id]", 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", styles: [""] });
1467
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TabItemComponent, decorators: [{
1468
- type: Component,
1469
- args: [{ selector: 'it-tab-item[id]', template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n" }]
1470
- }], propDecorators: { label: [{
1471
- type: Input
1472
- }], icon: [{
1473
- type: Input
1474
- }], active: [{
1475
- type: Input
1476
- }], disabled: [{
1477
- type: Input
1478
- }], class: [{
1479
- type: Input
1480
- }], htmlContent: [{
1481
- type: ViewChild,
1482
- args: [TemplateRef]
1483
- }] } });
1484
-
1485
- class TabContainerComponent {
1486
- constructor(_changeDetectorRef) {
1487
- this._changeDetectorRef = _changeDetectorRef;
1488
- }
1489
- isTrueBooleanInput(booleanInput) {
1490
- return isTrueBooleanInput(booleanInput);
1491
- }
1492
- ngAfterViewInit() {
1493
- this._changeDetectorRef.detectChanges();
1494
- }
1495
- }
1496
- TabContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TabContainerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1497
- TabContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: TabContainerComponent, selector: "it-tab-container", inputs: { auto: "auto", iconText: "iconText", dark: "dark" }, queries: [{ propertyName: "tabs", predicate: TabItemComponent }], 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 [id]=\"tab.id+'-tab-link'\"\n role=\"tab\"\n data-bs-toggle=\"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\"></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 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", styles: [""], 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", "class"] }] });
1498
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TabContainerComponent, decorators: [{
1499
- type: Component,
1500
- args: [{ selector: 'it-tab-container', 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 [id]=\"tab.id+'-tab-link'\"\n role=\"tab\"\n data-bs-toggle=\"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\"></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 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" }]
1501
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { auto: [{
1502
- type: Input
1503
- }], iconText: [{
1504
- type: Input
1505
- }], dark: [{
1506
- type: Input
1507
- }], tabs: [{
1508
- type: ContentChildren,
1509
- args: [TabItemComponent]
1510
- }] } });
1511
-
1512
- class TableComponent {
1513
- constructor() {
1514
- /**
1515
- * Responsive tables allow you to scroll tables horizontally with ease.
1516
- * @default responsive
1517
- */
1518
- this.responsive = 'responsive';
1519
- }
1520
- get isStriped() {
1521
- return isTrueBooleanInput(this.striped);
1522
- }
1523
- get isHover() {
1524
- return isTrueBooleanInput(this.hover);
1525
- }
1526
- get isBordered() {
1527
- return isTrueBooleanInput(this.bordered);
1528
- }
1529
- get isBorderless() {
1530
- return isTrueBooleanInput(this.borderless);
1531
- }
1532
- get isCompact() {
1533
- return isTrueBooleanInput(this.compact);
1534
- }
1535
- get isCaptionTop() {
1536
- return isTrueBooleanInput(this.captionTop);
1537
- }
1538
- }
1539
- TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1540
- TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", 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 : '' }}\"\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"] });
1541
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TableComponent, decorators: [{
1542
- type: Component,
1543
- args: [{ selector: 'it-table', template: "<div [class]=\"responsive ? 'table-' + responsive : undefined\">\n <table class=\"table{{color ? ' table-' + color : '' }}\"\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"] }]
1544
- }], propDecorators: { color: [{
1545
- type: Input
1546
- }], headColor: [{
1547
- type: Input
1548
- }], alignment: [{
1549
- type: Input
1550
- }], striped: [{
1551
- type: Input
1552
- }], hover: [{
1553
- type: Input
1554
- }], bordered: [{
1555
- type: Input
1556
- }], borderless: [{
1557
- type: Input
1558
- }], compact: [{
1559
- type: Input
1560
- }], captionTop: [{
1561
- type: Input
1562
- }], responsive: [{
1563
- type: Input
1564
- }] } });
1565
-
1566
- class TooltipDirective {
1567
- constructor(_elementRef) {
1568
- this._elementRef = _elementRef;
1569
- /**
1570
- * This event fires immediately when the show method is called.
1571
- */
1572
- this.onShow = new EventEmitter();
1573
- /**
1574
- * This event is triggered when the tooltip has been made visible to the user (it will wait for the CSS transitions to complete).
1575
- */
1576
- this.onShown = new EventEmitter();
1577
- /**
1578
- * This event fires immediately when the hide method is called.
1579
- */
1580
- this.onHide = new EventEmitter();
1581
- /**
1582
- * This event is raised when the tooltip has finished being hidden from the user (it will wait for the CSS transitions to complete).
1583
- */
1584
- this.onHidden = new EventEmitter();
1585
- /**
1586
- * This event fires after the show event when the tooltip template has been added to the DOM.
1587
- */
1588
- this.onInserted = new EventEmitter();
1589
- this.element = this._elementRef.nativeElement;
1590
- }
1591
- /**
1592
- * Define the tooltip title
1593
- * @param title the tooltip title
1594
- */
1595
- set title(title) {
1596
- if (title) {
1597
- // this.element.setAttribute("title", title);
1598
- this.element.setAttribute('data-bs-original-title', title);
1599
- }
1600
- }
1601
- /**
1602
- * Define the tooltip placement
1603
- * @param placement
1604
- */
1605
- set placement(placement) {
1606
- this.element.setAttribute('data-bs-placement', placement);
1607
- }
1608
- /**
1609
- * Indicates whether the title contains html
1610
- * @param html true if contain html
1611
- */
1612
- set html(html) {
1613
- this.element.setAttribute('data-bs-html', isTrueBooleanInput(html) ? 'true' : 'false');
1614
- }
1615
- ngAfterViewInit() {
1616
- this.element.setAttribute('data-bs-toggle', 'tooltip');
1617
- this.tooltip = Tooltip.getOrCreateInstance(this.element);
1618
- this.element.addEventListener('show.bs.tooltip', event => this.onShow.emit(event));
1619
- this.element.addEventListener('shown.bs.tooltip', event => this.onShown.emit(event));
1620
- this.element.addEventListener('hide.bs.tooltip', event => this.onHide.emit(event));
1621
- this.element.addEventListener('hidden.bs.tooltip', event => this.onHidden.emit(event));
1622
- this.element.addEventListener('inserted.bs.tooltip', event => this.onInserted.emit(event));
1623
- }
1624
- /**
1625
- * Shows the tooltip of an item.
1626
- */
1627
- show() {
1628
- this.tooltip?.show();
1629
- }
1630
- /**
1631
- * Hide the tooltip of an element.
1632
- */
1633
- hide() {
1634
- this.tooltip?.hide();
1635
- }
1636
- /**
1637
- * Activate / Deactivate the tooltip of an element
1638
- */
1639
- toggle() {
1640
- this.tooltip?.toggle();
1641
- }
1642
- /**
1643
- * Hides and destroys the tooltip of an element.
1644
- */
1645
- dispose() {
1646
- this.tooltip?.dispose();
1647
- }
1648
- /**
1649
- * Gives the tooltip of an element a chance to be shown.
1650
- */
1651
- enable() {
1652
- this.tooltip?.enable();
1653
- }
1654
- /**
1655
- * Removes the ability to show the tooltip of an element.
1656
- */
1657
- disable() {
1658
- this.tooltip?.disable();
1659
- }
1660
- /**
1661
- * Toggles the possibility that the tooltip of an element is shown or hidden.
1662
- */
1663
- toggleEnabled() {
1664
- this.tooltip?.disable();
1665
- }
1666
- /**
1667
- * Updates the position of an element's tooltip.
1668
- */
1669
- update() {
1670
- this.tooltip?.disable();
1671
- }
1672
- }
1673
- TooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TooltipDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1674
- TooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: TooltipDirective, selector: "[itTooltip]", inputs: { title: ["itTooltip", "title"], placement: ["tooltipPlacement", "placement"], html: ["tooltipHtml", "html"] }, outputs: { onShow: "onShow", onShown: "onShown", onHide: "onHide", onHidden: "onHidden", onInserted: "onInserted" }, exportAs: ["itTooltip"], ngImport: i0 });
1675
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TooltipDirective, decorators: [{
1676
- type: Directive,
1677
- args: [{
1678
- selector: '[itTooltip]',
1679
- exportAs: 'itTooltip'
1680
- }]
1681
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { title: [{
1682
- type: Input,
1683
- args: ['itTooltip']
1684
- }], placement: [{
1685
- type: Input,
1686
- args: ['tooltipPlacement']
1687
- }], html: [{
1688
- type: Input,
1689
- args: ['tooltipHtml']
1690
- }], onShow: [{
1691
- type: Output
1692
- }], onShown: [{
1693
- type: Output
1694
- }], onHide: [{
1695
- type: Output
1696
- }], onHidden: [{
1697
- type: Output
1698
- }], onInserted: [{
1699
- type: Output
1700
- }] } });
1701
-
1702
- class CheckboxComponent extends AbstractFormComponent {
1703
- get isIndeterminate() {
1704
- return isTrueBooleanInput(this.indeterminate);
1705
- }
1706
- get isGroup() {
1707
- return isTrueBooleanInput(this.group);
1708
- }
1709
- ngOnInit() {
1710
- super.ngOnInit();
1711
- if (this.control.value || this.checked === undefined) {
1712
- return;
1713
- }
1714
- const value = isTrueBooleanInput(this.checked);
1715
- this.writeValue(value);
1716
- return this.onChange(value);
1717
- }
1718
- }
1719
- CheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1720
- CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: CheckboxComponent, selector: "it-checkbox[id][label]", 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 {{label}}\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\">{{label}}</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", styles: [""], 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" }] });
1721
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CheckboxComponent, decorators: [{
1722
- type: Component,
1723
- args: [{ selector: 'it-checkbox[id][label]', 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 {{label}}\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\">{{label}}</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" }]
1724
- }], propDecorators: { toggle: [{
1725
- type: Input
1726
- }], inline: [{
1727
- type: Input
1728
- }], group: [{
1729
- type: Input
1730
- }], checked: [{
1731
- type: Input
1732
- }], indeterminate: [{
1733
- type: Input
1734
- }] } });
1735
-
1736
- /**
1737
- * General Email Regex (RFC 5322 Official Standard)
1738
- * http://emailregex.com/
1739
- */
1740
- 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])+)\])/;
1741
- /**
1742
- * Phone number Regex
1743
- */
1744
- const PHONE_NUMBER_REGEX = /^\s*(?:\+?(\d{1,3}))?[-. (]*(\d{3})[-. )]*(\d{3})[-. ]*(\d{3})(?: *x(\d+))?\s*$/;
1745
- /**
1746
- * URL Regex
1747
- */
1748
- 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,})/;
1749
- /**
1750
- * The italian tax code Regex (Codice Fiscale)
1751
- */
1752
- const ITALIAN_TAX_CODE_REGEX = /^[a-z]{6}[0-9]{2}[a-z][0-9]{2}[a-z][0-9]{3}[a-z]$/;
1753
- /**
1754
- * The VAT number Regex (Partita iva)
1755
- */
1756
- const VAT_NUMBER_REGEX = /^[0-9]{11}$/;
1757
- /**
1758
- * Italian CAP Regex
1759
- */
1760
- const CAP_REGEX = /^[0-9]{5}$/;
1761
-
1762
- class ItValidators {
1763
- /**
1764
- * Static pattern validator with custom error
1765
- * @param regex
1766
- * @param error
1767
- */
1768
- static customPattern(regex, error) {
1769
- return (control) => {
1770
- if (!control.value) {
1771
- // if control is empty return no error
1772
- return null;
1773
- }
1774
- // test the value of the control against the regexp supplied
1775
- const valid = regex.test(control.value);
1776
- // if true, return no error (no error), else return error passed in the second parameter
1777
- return valid ? null : error;
1778
- };
1779
- }
1780
- /**
1781
- * Set Validator if the condition is satisfied
1782
- * @param validator the validator to apply if the condition is true
1783
- * @param condition the condition
1784
- */
1785
- static conditional(validator, condition) {
1786
- return formControl => {
1787
- if (!formControl.parent) {
1788
- return null;
1789
- }
1790
- if (condition(formControl)) {
1791
- return validator(formControl);
1792
- }
1793
- return null;
1794
- };
1795
- }
1796
- /**
1797
- * Check whether our password and confirm password are a match
1798
- * @param control
1799
- */
1800
- static passwordMatch(control) {
1801
- const confirmControl = control.get('passwordConfirm'); //confirmPassword form control
1802
- if (!confirmControl) {
1803
- return null;
1804
- }
1805
- const password = control.get('password')?.value; // get password from our password form control
1806
- // compare is the password match
1807
- if ((password && !confirmControl.value) || (confirmControl.value && password !== confirmControl.value)) {
1808
- // if they don't match, set an error in our confirmPassword form control
1809
- confirmControl?.setErrors({ noPasswordMatch: true });
1810
- confirmControl?.markAsTouched();
1811
- return control;
1812
- }
1813
- if (password) {
1814
- confirmControl?.markAsTouched();
1815
- }
1816
- return null;
1817
- }
1818
- /**
1819
- * Password validator
1820
- * @param minLength minimum password length - default 10
1821
- * @param hasNumber check whether the entered password has a number - default true
1822
- * @param hasCapitalCase check whether the entered password has upper case letter - default true
1823
- * @param hasSmallCase check whether the entered password has a lower-case letter - default true
1824
- * @param hasSpecialCharacters check whether the entered password has a special character - default true
1825
- */
1826
- static password(minLength = 10, hasNumber = true, hasCapitalCase = true, hasSmallCase = true, hasSpecialCharacters = true) {
1827
- return Validators.compose([
1828
- Validators.required,
1829
- ItValidators.customPattern(/\d/, { hasNumber: hasNumber }),
1830
- ItValidators.customPattern(/[A-Z]/, { hasCapitalCase: hasCapitalCase }),
1831
- ItValidators.customPattern(/[a-z]/, { hasSmallCase: hasSmallCase }),
1832
- ItValidators.customPattern(new RegExp(`[${ItValidators.SpecialCharacterPattern}]`), { hasSpecialCharacters: hasSpecialCharacters }),
1833
- Validators.minLength(minLength)
1834
- ]);
1835
- }
1836
- /**
1837
- * Email validator
1838
- */
1839
- static email() {
1840
- return [Validators.email, ItValidators.customPattern(EMAIL_REGEX, { invalidEmail: true })];
1841
- }
1842
- /**
1843
- * Phone number validator
1844
- */
1845
- static tel() {
1846
- return ItValidators.customPattern(PHONE_NUMBER_REGEX, { invalidTel: true });
1847
- }
1848
- /**
1849
- * URL validator
1850
- */
1851
- static url() {
1852
- return ItValidators.customPattern(URL_REGEX, { invalidUrl: true });
1853
- }
1854
- /**
1855
- * Italian Tax Code validator
1856
- */
1857
- static taxCode() {
1858
- return ItValidators.customPattern(ITALIAN_TAX_CODE_REGEX, { invalidTaxCode: true });
1859
- }
1860
- /**
1861
- * VAT Number validator
1862
- */
1863
- static vatNumber() {
1864
- return ItValidators.customPattern(VAT_NUMBER_REGEX, { invalidVatNumber: true });
1865
- }
1866
- /**
1867
- * Italian Postal Code validator (CAP)
1868
- */
1869
- static cap() {
1870
- return ItValidators.customPattern(CAP_REGEX, { invalidCap: true });
1871
- }
1872
- /**
1873
- * Check if value is a valid RegExp
1874
- */
1875
- static regExp() {
1876
- return (control) => {
1877
- try {
1878
- if (control?.value) {
1879
- new RegExp(control.value);
1880
- }
1881
- }
1882
- catch (e) {
1883
- return { invalidRegex: true };
1884
- }
1885
- return null;
1886
- };
1887
- }
1888
- }
1889
- ItValidators.SpecialCharacterPattern = '!@#$%&*_+=;:|,.';
1890
-
1891
- class InputComponent extends AbstractFormComponent {
1892
- constructor() {
1893
- super(...arguments);
1894
- /**
1895
- * The input type
1896
- * @default text
1897
- */
1898
- this.type = 'text';
1899
- /**
1900
- * The input placeholder
1901
- */
1902
- this.placeholder = '';
1903
- }
1904
- get isActiveLabel() {
1905
- const value = this.control.value;
1906
- if ((!!value && value !== 0) || value === 0 || !!this.placeholder) {
1907
- return true;
1908
- }
1909
- if (this.type === 'number' && (isTrueBooleanInput(this.currency) || isTrueBooleanInput(this.percentage))) {
1910
- return true;
1911
- }
1912
- return this.type === 'date' || this.type === 'time';
1913
- }
1914
- /**
1915
- * Check is readonly field
1916
- */
1917
- get isReadonly() {
1918
- return this.readonly === 'plaintext' || isTrueBooleanInput(this.readonly);
1919
- }
1920
- /**
1921
- * Return the invalid message string from TranslateService
1922
- */
1923
- get invalidMessage() {
1924
- if (this.hasError('min') && this.min) {
1925
- return this._translateService.get('it.errors.min-invalid', {
1926
- min: this.min
1927
- });
1928
- }
1929
- if (this.hasError('max') && this.max) {
1930
- return this._translateService.get('it.errors.max-invalid', {
1931
- max: this.max
1932
- });
1933
- }
1934
- if (this.hasError('minlength')) {
1935
- const error = this.getError('minlength');
1936
- return this._translateService.get('it.errors.min-length-invalid', { min: error.requiredLength });
1937
- }
1938
- if (this.hasError('maxlength')) {
1939
- const error = this.getError('maxlength');
1940
- return this._translateService.get('it.errors.max-length-invalid', { max: error.requiredLength });
1941
- }
1942
- if (this.hasError('email') || this.hasError('invalidEmail')) {
1943
- return this._translateService.get('it.errors.email-invalid');
1944
- }
1945
- if (this.hasError('invalidTel')) {
1946
- return this._translateService.get('it.errors.tel-invalid');
1947
- }
1948
- if (this.hasError('invalidUrl')) {
1949
- return this._translateService.get('it.errors.url-invalid');
1950
- }
1951
- if (this.hasError('invalidTaxCode')) {
1952
- return this._translateService.get('it.errors.tax-code-invalid');
1953
- }
1954
- if (this.hasError('invalidVatNumber')) {
1955
- return this._translateService.get('it.errors.vat-number-invalid');
1956
- }
1957
- if (this.hasError('invalidCap')) {
1958
- return this._translateService.get('it.errors.cap-invalid');
1959
- }
1960
- if (this.hasError('invalidRegex')) {
1961
- return this._translateService.get('it.errors.regex-invalid');
1962
- }
1963
- if (this.hasError('pattern')) {
1964
- const error = this.getError('pattern');
1965
- return this._translateService.get('it.errors.pattern-invalid', { pattern: error.requiredPattern });
1966
- }
1967
- return super.invalidMessage;
1968
- }
1969
- ngOnInit() {
1970
- super.ngOnInit();
1971
- const validators = [];
1972
- switch (this.type) {
1973
- case 'number':
1974
- if (isTrueBooleanInput(this.percentage)) {
1975
- this.min = this.min || 0;
1976
- this.max = this.max || 100;
1977
- }
1978
- // Dynamic min/max validators
1979
- validators.push((control) => this.min ? Validators.min(this.min)(control) : null);
1980
- validators.push((control) => this.max ? Validators.max(this.max)(control) : null);
1981
- break;
1982
- case 'email':
1983
- validators.push(ItValidators.email);
1984
- break;
1985
- case 'tel':
1986
- validators.push(ItValidators.tel);
1987
- break;
1988
- case 'url':
1989
- validators.push(ItValidators.url);
1990
- break;
1991
- }
1992
- this.addValidators(validators);
1993
- }
1994
- /**
1995
- * Increment or decrease the input number value of step
1996
- * @param decrease true to decrease value
1997
- */
1998
- incrementNumber(decrease = false) {
1999
- if (this.type !== 'number') {
2000
- return;
2001
- }
2002
- const step = (this.step === 'any' ? 1 : (this.step ?? 1));
2003
- let value = Number(this.control.value);
2004
- value = (isNaN(value) ? 0 : value) + (decrease ? -step : step);
2005
- value = Math.round(value * 1e12) / 1e12; // prevent js decimal error
2006
- if (this.min !== undefined && value < this.min) {
2007
- value = this.min;
2008
- }
2009
- else if (this.max !== undefined && value > this.max) {
2010
- value = this.max;
2011
- }
2012
- this.control.setValue(value);
2013
- }
2014
- }
2015
- InputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: InputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2016
- InputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: InputComponent, selector: "it-input[id]", inputs: { type: "type", placeholder: "placeholder", description: "description", readonly: "readonly", max: "max", min: "min", step: "step", currency: "currency", percentage: "percentage", adaptive: "adaptive" }, 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 [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 [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 <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}\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.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: "pipe", type: i1.AsyncPipe, name: "async" }] });
2017
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: InputComponent, decorators: [{
2018
- type: Component,
2019
- args: [{ selector: 'it-input[id]', 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 [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 [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 <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}\n"] }]
2020
- }], propDecorators: { type: [{
2021
- type: Input
2022
- }], placeholder: [{
2023
- type: Input
2024
- }], description: [{
2025
- type: Input
2026
- }], readonly: [{
2027
- type: Input
2028
- }], max: [{
2029
- type: Input
2030
- }], min: [{
2031
- type: Input
2032
- }], step: [{
2033
- type: Input
2034
- }], currency: [{
2035
- type: Input
2036
- }], percentage: [{
2037
- type: Input
2038
- }], adaptive: [{
2039
- type: Input
2040
- }] } });
2041
-
2042
- class PasswordInputComponent extends AbstractFormComponent {
2043
- constructor() {
2044
- super(...arguments);
2045
- /**
2046
- * The password minimum length
2047
- * @default 10
2048
- */
2049
- this.minLength = 10;
2050
- /**
2051
- * The password must contain at least one number
2052
- * @default true
2053
- */
2054
- this.useNumber = true;
2055
- /**
2056
- * The password must contain at least one uppercase character
2057
- * @default true
2058
- */
2059
- this.useCapitalCase = true;
2060
- /**
2061
- * The password must contain at least one lowercase character
2062
- * @default true
2063
- */
2064
- this.useSmallCase = true;
2065
- /**
2066
- * The password must contain at least one special character
2067
- * @default true
2068
- */
2069
- this.useSpecialCharacters = true;
2070
- /**
2071
- * The input placeholder
2072
- */
2073
- this.placeholder = '';
2074
- }
2075
- ngOnInit() {
2076
- super.ngOnInit();
2077
- this.addValidators(ItValidators.password(this.minLength, this.useNumber, this.useCapitalCase, this.useSmallCase, this.useSpecialCharacters));
2078
- }
2079
- ngAfterViewInit() {
2080
- super.ngAfterViewInit();
2081
- if (this.inputElement) {
2082
- this.inputPasswordBs = new InputPassword(this.inputElement.nativeElement, {
2083
- ...this.description && { enterPass: this.description },
2084
- showText: this.isStrengthMeter,
2085
- minimumLength: this.minLength
2086
- });
2087
- }
2088
- }
2089
- get isStrengthMeter() {
2090
- return isTrueBooleanInput(this.showStrengthMeter);
2091
- }
2092
- /**
2093
- * Return the invalid message string from TranslateService
2094
- */
2095
- get invalidMessage() {
2096
- if (this.hasError('noPasswordMatch')) {
2097
- return this._translateService.get('it.errors.password-no-match');
2098
- }
2099
- if (this.hasError('minlength')) {
2100
- return this._translateService.get('it.errors.password-min-length', {
2101
- minLength: this.minLength
2102
- });
2103
- }
2104
- if (this.hasError('hasNumber')) {
2105
- return this._translateService.get('it.errors.password-number');
2106
- }
2107
- if (this.hasError('hasCapitalCase')) {
2108
- return this._translateService.get('it.errors.password-capital-case');
2109
- }
2110
- if (this.hasError('hasSmallCase')) {
2111
- return this._translateService.get('it.errors.password-capital-case');
2112
- }
2113
- if (this.hasError('hasSpecialCharacters')) {
2114
- return this._translateService.get('it.errors.password-special-character');
2115
- }
2116
- return super.invalidMessage;
2117
- }
2118
- }
2119
- PasswordInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PasswordInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2120
- PasswordInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: PasswordInputComponent, selector: "it-password-input[id]", inputs: { minLength: "minLength", useNumber: "useNumber", useCapitalCase: "useCapitalCase", useSmallCase: "useSmallCase", useSpecialCharacters: "useSpecialCharacters", placeholder: "placeholder", description: "description", showStrengthMeter: "showStrengthMeter" }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"form-group\">\n\n <label *ngIf=\"label\" [for]=\"id\" [class.active]=\"!!control.value || !!placeholder\">{{label}}</label>\n\n <input type=\"password\"\n [id]=\"id\"\n class=\"form-control input-password\"\n [class.input-password-strength-meter]=\"isStrengthMeter\"\n [class.is-invalid]=\"isInvalid\"\n [class.is-valid]=\"isValid\"\n [formControl]=\"control\"\n [placeholder]=\"placeholder\"\n [attr.aria-describedby]=\"id + '-description'\" #input>\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 <small *ngIf=\"description && !isStrengthMeter\" [id]=\"id + '-description'\" class=\"form-text\">{{description}}</small>\n\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: [".form-group input:focus:not(.focus--mouse){box-shadow:inherit!important;border-color:inherit!important}\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", "class"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
2121
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: PasswordInputComponent, decorators: [{
2122
- type: Component,
2123
- args: [{ selector: 'it-password-input[id]', template: "<div class=\"form-group\">\n\n <label *ngIf=\"label\" [for]=\"id\" [class.active]=\"!!control.value || !!placeholder\">{{label}}</label>\n\n <input type=\"password\"\n [id]=\"id\"\n class=\"form-control input-password\"\n [class.input-password-strength-meter]=\"isStrengthMeter\"\n [class.is-invalid]=\"isInvalid\"\n [class.is-valid]=\"isValid\"\n [formControl]=\"control\"\n [placeholder]=\"placeholder\"\n [attr.aria-describedby]=\"id + '-description'\" #input>\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 <small *ngIf=\"description && !isStrengthMeter\" [id]=\"id + '-description'\" class=\"form-text\">{{description}}</small>\n\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: [".form-group input:focus:not(.focus--mouse){box-shadow:inherit!important;border-color:inherit!important}\n"] }]
2124
- }], propDecorators: { minLength: [{
2125
- type: Input
2126
- }], useNumber: [{
2127
- type: Input
2128
- }], useCapitalCase: [{
2129
- type: Input
2130
- }], useSmallCase: [{
2131
- type: Input
2132
- }], useSpecialCharacters: [{
2133
- type: Input
2134
- }], placeholder: [{
2135
- type: Input
2136
- }], description: [{
2137
- type: Input
2138
- }], showStrengthMeter: [{
2139
- type: Input
2140
- }], inputElement: [{
2141
- type: ViewChild,
2142
- args: ['input']
2143
- }] } });
2144
-
2145
- class RadioButtonComponent extends AbstractFormComponent {
2146
- constructor() {
2147
- super(...arguments);
2148
- /**
2149
- * If show radio inline
2150
- * @default false
2151
- */
2152
- this.inline = false;
2153
- /**
2154
- * If is radio group
2155
- * @default false
2156
- */
2157
- this.group = false;
2158
- }
2159
- get isInline() {
2160
- return isTrueBooleanInput(this.inline);
2161
- }
2162
- get isGroup() {
2163
- return isTrueBooleanInput(this.group);
2164
- }
2165
- get name() {
2166
- return this._ngControl?.name?.toString() || '';
2167
- }
2168
- ngOnInit() {
2169
- super.ngOnInit();
2170
- if (this.control.value || !this.value || isFalseBooleanInput(this.checked)) {
2171
- return;
2172
- }
2173
- this.writeValue(this.value);
2174
- return this.onChange(this.value);
2175
- }
2176
- }
2177
- RadioButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RadioButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2178
- RadioButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: RadioButtonComponent, selector: "it-radio-button[id][label][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\">{{label}}</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><ng-content select=\"[error]\"></ng-content></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><ng-content select=\"[error]\"></ng-content></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" }] });
2179
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: RadioButtonComponent, decorators: [{
2180
- type: Component,
2181
- args: [{ selector: 'it-radio-button[id][label][value]', 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\">{{label}}</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><ng-content select=\"[error]\"></ng-content></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><ng-content select=\"[error]\"></ng-content></div>\n <ng-container *ngIf=\"!customError.hasChildNodes()\">{{invalidMessage | async}}</ng-container>\n </div>\n</ng-container>\n" }]
2182
- }], propDecorators: { value: [{
2183
- type: Input
2184
- }], inline: [{
2185
- type: Input
2186
- }], group: [{
2187
- type: Input
2188
- }], checked: [{
2189
- type: Input
2190
- }] } });
2191
-
2192
- class SelectComponent extends AbstractFormComponent {
2193
- ngOnInit() {
2194
- super.ngOnInit();
2195
- if (this.control.value) {
2196
- return;
2197
- }
2198
- const selectedOption = this.options.find(this.optionIsSelected);
2199
- if (selectedOption) {
2200
- this.writeValue(selectedOption.value);
2201
- return this.onChange(selectedOption.value);
2202
- }
2203
- const selectedGroupOption = this.groups?.flatMap(g => g.options).find(this.optionIsSelected);
2204
- if (selectedGroupOption) {
2205
- this.writeValue(selectedGroupOption.value);
2206
- this.onChange(selectedGroupOption.value);
2207
- }
2208
- }
2209
- /**
2210
- * Check if the option is selected
2211
- * @param option the option
2212
- */
2213
- optionIsSelected(option) {
2214
- if (option.selected === true) {
2215
- return true;
2216
- }
2217
- if (typeof option.selected === 'function') {
2218
- return option.selected(this.control.value);
2219
- }
2220
- return false;
2221
- }
2222
- /**
2223
- * Check if the option is disabled
2224
- * @param option the option
2225
- */
2226
- optionIsDisabled(option) {
2227
- if (option.disabled === true) {
2228
- return true;
2229
- }
2230
- if (typeof option.disabled === 'function') {
2231
- return option.disabled(this.control.value);
2232
- }
2233
- return false;
2234
- }
2235
- }
2236
- SelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2237
- SelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: SelectComponent, selector: "it-select[id][options]", 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 <option *ngFor=\"let option of options\" [disabled]=\"optionIsDisabled(option)\" [value]=\"option.value\">\n {{option.text ?? option.value}}\n </option>\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"] }] });
2238
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SelectComponent, decorators: [{
2239
- type: Component,
2240
- args: [{ selector: 'it-select[id][options]', template: "<div class=\"select-wrapper\">\n <label [for]=\"id\">{{label}}</label>\n <select [id]=\"id\" [formControl]=\"control\" [attr.aria-describedby]=\"id + '-description'\">\n <option *ngFor=\"let option of options\" [disabled]=\"optionIsDisabled(option)\" [value]=\"option.value\">\n {{option.text ?? option.value}}\n </option>\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"] }]
2241
- }], propDecorators: { options: [{
2242
- type: Input
2243
- }], groups: [{
2244
- type: Input
2245
- }], description: [{
2246
- type: Input
2247
- }] } });
2248
-
2249
- class TextareaComponent extends AbstractFormComponent {
2250
- constructor() {
2251
- super(...arguments);
2252
- /**
2253
- * Textarea Rows
2254
- * @default 3
2255
- */
2256
- this.rows = 3;
2257
- /**
2258
- * The textarea placeholder
2259
- */
2260
- this.placeholder = '';
2261
- }
2262
- /**
2263
- * Return the invalid message string from TranslateService
2264
- */
2265
- get invalidMessage() {
2266
- if (this.control.hasError('maxlength')) {
2267
- const error = this.getError('maxlength');
2268
- return this._translateService.get('it.errors.max-length-invalid', { max: error.requiredLength });
2269
- }
2270
- if (this.control.hasError('pattern')) {
2271
- const error = this.getError('pattern');
2272
- return this._translateService.get('it.errors.pattern-invalid', { pattern: error.requiredPattern });
2273
- }
2274
- return super.invalidMessage;
2275
- }
2276
- }
2277
- TextareaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2278
- TextareaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: TextareaComponent, selector: "it-textarea[id]", 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:#d9364f}\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" }] });
2279
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TextareaComponent, decorators: [{
2280
- type: Component,
2281
- args: [{ selector: 'it-textarea[id]', 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:#d9364f}\n"] }]
2282
- }], propDecorators: { rows: [{
2283
- type: Input
2284
- }], placeholder: [{
2285
- type: Input
2286
- }], description: [{
2287
- type: Input
2288
- }] } });
2289
-
2290
- class FileUtils {
2291
- /**
2292
- * Return the file size string
2293
- * @param file the file
2294
- * @param decimals decimal to show
2295
- */
2296
- static getFileSizeString(file, decimals = 2) {
2297
- const bytes = file.size;
2298
- if (!+bytes) {
2299
- return '0 Bytes';
2300
- }
2301
- const k = 1024;
2302
- const dm = decimals < 0 ? 0 : decimals;
2303
- const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
2304
- const i = Math.floor(Math.log(bytes) / Math.log(k));
2305
- return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;
2306
- }
2307
- /**
2308
- * Convert a file to base64 string
2309
- * @param file the base64 string
2310
- */
2311
- static fileToBase64(file) {
2312
- const reader = new FileReader();
2313
- reader.readAsDataURL(file);
2314
- return new Observable(observer => {
2315
- reader.onload = (e) => {
2316
- const target = e.target;
2317
- if (!target || !target.result || target.result instanceof ArrayBuffer) {
2318
- return observer.error('Error on parse');
2319
- }
2320
- observer.next(target.result);
2321
- observer.complete();
2322
- };
2323
- reader.onerror = error => {
2324
- observer.error(error);
2325
- };
2326
- });
2327
- }
2328
- /**
2329
- * Convert base64 to Blob
2330
- * @param base64 the base64 string
2331
- * @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')
2332
- */
2333
- static base64ToBlob(base64, mimeType) {
2334
- const byteString = window.atob(base64);
2335
- const arrayBuffer = new ArrayBuffer(byteString.length);
2336
- const int8Array = new Uint8Array(arrayBuffer);
2337
- for (let i = 0; i < byteString.length; i++) {
2338
- int8Array[i] = byteString.charCodeAt(i);
2339
- }
2340
- return new Blob([int8Array], { type: mimeType });
2341
- }
2342
- /**
2343
- * Convert base64 to File
2344
- * @param base64 the base64 string
2345
- * @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')
2346
- * @param filename the file name
2347
- */
2348
- static base64ToFile(base64, mimeType, filename) {
2349
- const fileBlob = FileUtils.base64ToBlob(base64, mimeType);
2350
- return new File([fileBlob], filename, { type: mimeType });
2351
- }
2352
- }
2353
-
2354
- class UploadDragDropComponent extends AbstractComponent {
2355
- constructor() {
2356
- super(...arguments);
2357
- /**
2358
- * The accepted file type to upload <br>
2359
- * 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
2360
- * @example application/pdf,image/png
2361
- * @default *
2362
- */
2363
- this.accept = '*';
2364
- /**
2365
- * Fired when file start to upload
2366
- */
2367
- this.fileStartUpload = new EventEmitter();
2368
- this.isDragover = false;
2369
- this.isLoading = false;
2370
- this.isSuccess = false;
2371
- }
2372
- ngAfterViewInit() {
2373
- super.ngAfterViewInit();
2374
- if (this.donutElement) {
2375
- this.donut = ProgressDonut.getOrCreateInstance(this.donutElement.nativeElement);
2376
- }
2377
- }
2378
- // Dragover listener
2379
- onDragOver(evt) {
2380
- evt.preventDefault();
2381
- evt.stopPropagation();
2382
- this.isDragover = !this.isLoading;
2383
- }
2384
- // Dragleave listener
2385
- onDragLeave(evt) {
2386
- evt.preventDefault();
2387
- evt.stopPropagation();
2388
- this.isDragover = false;
2389
- }
2390
- // Drop leave listener
2391
- onDrop(evt) {
2392
- evt.preventDefault();
2393
- evt.stopPropagation();
2394
- this.isDragover = false;
2395
- const files = evt.dataTransfer?.files;
2396
- if (this.isLoading || !files?.length) {
2397
- return;
2398
- }
2399
- this.start(files[0]);
2400
- }
2401
- /**
2402
- * On load file from input
2403
- * @param event
2404
- */
2405
- onLoadFile(event) {
2406
- const files = event.target?.files;
2407
- if (!files?.length) {
2408
- return;
2409
- }
2410
- this.start(files[0]);
2411
- }
2412
- /**
2413
- * Start the upload file
2414
- * @param file
2415
- */
2416
- start(file) {
2417
- if (this.accept !== '*' && !this.accept.includes(file.type)) {
2418
- return;
2419
- }
2420
- this.donut?.set(0);
2421
- this.isLoading = true;
2422
- const splitName = file.name.split('.');
2423
- this.filename = splitName[0];
2424
- this.extension = splitName[1]?.toUpperCase();
2425
- this.fileSize = FileUtils.getFileSizeString(file);
2426
- this.fileStartUpload.emit(file);
2427
- }
2428
- /**
2429
- * Percentage of upload
2430
- * @param value the percentage
2431
- */
2432
- progress(value) {
2433
- if (value >= 100) {
2434
- this.success();
2435
- }
2436
- else {
2437
- this.donut?.set(((value < 0) ? 0 : value) / 100);
2438
- }
2439
- }
2440
- /**
2441
- * Upload success
2442
- */
2443
- success() {
2444
- this.isLoading = false;
2445
- this.isSuccess = true;
2446
- }
2447
- /**
2448
- * Reset file uploader
2449
- */
2450
- reset() {
2451
- this.isLoading = false;
2452
- this.isSuccess = false;
2453
- this.filename = this.extension = this.fileSize = undefined;
2454
- this.donut?.set(0);
2455
- }
2456
- }
2457
- UploadDragDropComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UploadDragDropComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2458
- UploadDragDropComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: UploadDragDropComponent, selector: "it-upload-drag-drop[id]", 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", styles: [""], 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", "class"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
2459
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UploadDragDropComponent, decorators: [{
2460
- type: Component,
2461
- args: [{ selector: 'it-upload-drag-drop[id]', exportAs: 'itUploadDragDrop', 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" }]
2462
- }], propDecorators: { accept: [{
2463
- type: Input
2464
- }], fileStartUpload: [{
2465
- type: Output
2466
- }], donutElement: [{
2467
- type: ViewChild,
2468
- args: ['donutElement']
2469
- }], onDragOver: [{
2470
- type: HostListener,
2471
- args: ['dragover', ['$event']]
2472
- }], onDragLeave: [{
2473
- type: HostListener,
2474
- args: ['dragleave', ['$event']]
2475
- }], onDrop: [{
2476
- type: HostListener,
2477
- args: ['drop', ['$event']]
2478
- }] } });
2479
-
2480
- class UploadFileListComponent extends AbstractComponent {
2481
- constructor() {
2482
- super(...arguments);
2483
- /**
2484
- * The accepted file type to upload
2485
- * @default *
2486
- */
2487
- this.accept = "*";
2488
- /**
2489
- * If upload multiple files
2490
- */
2491
- this.multiple = true;
2492
- /**
2493
- * Fired when upload new files
2494
- */
2495
- this.uploadFiles = new EventEmitter();
2496
- /**
2497
- * Fired on delete item button click
2498
- */
2499
- this.deleteItem = new EventEmitter();
2500
- /**
2501
- * Cache to preview image
2502
- */
2503
- this.previewImages = new Map();
2504
- }
2505
- ngOnInit() {
2506
- if (this.isImageList && this.accept === '*') {
2507
- this.accept = 'image/*';
2508
- }
2509
- }
2510
- ngOnChanges(changes) {
2511
- if (changes['fileList'] && this.isImageList) {
2512
- this.fileList.forEach(item => {
2513
- FileUtils.fileToBase64(item.file).pipe(take(1)).subscribe(base64 => {
2514
- this.previewImages.set(item.id, base64);
2515
- });
2516
- });
2517
- }
2518
- }
2519
- get isMultipleInput() {
2520
- return isTrueBooleanInput(this.multiple);
2521
- }
2522
- get isImageList() {
2523
- return isTrueBooleanInput(this.images);
2524
- }
2525
- get isHideLoadButton() {
2526
- return isTrueBooleanInput(this.hideLoadButton);
2527
- }
2528
- /**
2529
- * On load file from input
2530
- * @param event
2531
- */
2532
- onLoadFiles(event) {
2533
- const files = event.target?.files;
2534
- if (!files || !files.length) {
2535
- return;
2536
- }
2537
- this.uploadFiles.emit(files);
2538
- }
2539
- /**
2540
- * Get the file size string
2541
- * @param file
2542
- */
2543
- getFileSize(file) {
2544
- return FileUtils.getFileSizeString(file);
2545
- }
2546
- }
2547
- UploadFileListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UploadFileListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2548
- UploadFileListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: UploadFileListComponent, selector: "it-upload-file-list[id][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 ? '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)\" (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 disabled *ngIf=\"(!item.removable && !item.progress) || (item.progress !== undefined && item.progress >= 100)\">\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", styles: [""], 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: ["onShow", "onShown", "onHide", "onHidden", "onInserted"], exportAs: ["itTooltip"] }, { kind: "component", type: IconComponent, selector: "it-icon[name]", inputs: ["name", "size", "color", "padded", "class"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
2549
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UploadFileListComponent, decorators: [{
2550
- type: Component,
2551
- args: [{ selector: 'it-upload-file-list[id][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 ? '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)\" (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 disabled *ngIf=\"(!item.removable && !item.progress) || (item.progress !== undefined && item.progress >= 100)\">\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" }]
2552
- }], propDecorators: { fileList: [{
2553
- type: Input
2554
- }], accept: [{
2555
- type: Input
2556
- }], multiple: [{
2557
- type: Input
2558
- }], images: [{
2559
- type: Input
2560
- }], hideLoadButton: [{
2561
- type: Input
2562
- }], uploadFiles: [{
2563
- type: Output
2564
- }], deleteItem: [{
2565
- type: Output
2566
- }] } });
2567
-
2568
- class BackButtonComponent {
2569
- constructor(_location) {
2570
- this._location = _location;
2571
- /**
2572
- * Back button style
2573
- * - <b>link</b>: use a link with icon and text
2574
- * - <b>button</b>: use a button with icon and text
2575
- * @default button
2576
- */
2577
- this.buttonStyle = 'button';
2578
- /**
2579
- * Button direction
2580
- * - <b>left</b>: Back direction
2581
- * - <b>up</b>: Upper direction
2582
- * @default left
2583
- */
2584
- this.direction = 'left';
2585
- /**
2586
- * Show/Hide icon
2587
- * @default true
2588
- */
2589
- this.showIcon = true;
2590
- /**
2591
- * Show/Hide text
2592
- * @default true
2593
- */
2594
- this.showText = true;
2595
- }
2596
- get isShowIcon() {
2597
- return isTrueBooleanInput(this.showIcon);
2598
- }
2599
- get isShowText() {
2600
- return isTrueBooleanInput(this.showText);
2601
- }
2602
- /**
2603
- * Go back function
2604
- */
2605
- goBack() {
2606
- if (this.backFn) {
2607
- return this.backFn(this._location);
2608
- }
2609
- this._location.back();
2610
- }
2611
- }
2612
- BackButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BackButtonComponent, deps: [{ token: i1.Location }], target: i0.ɵɵFactoryTarget.Component });
2613
- BackButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", 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'\" class=\"go-back\" data-bs-toggle=\"historyback\" (click)=\"goBack()\" [routerLink]=\"null\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</a>\n\n<button *ngIf=\"buttonStyle === 'button'\"\n itButton=\"primary\"\n class=\"go-back\"\n data-bs-toggle=\"historyback\"\n (click)=\"goBack()\">\n\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", styles: ["a.go-back{cursor:pointer}\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$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: IconComponent, selector: "it-icon[name]", inputs: ["name", "size", "color", "padded", "class"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
2614
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BackButtonComponent, decorators: [{
2615
- type: Component,
2616
- args: [{ selector: 'it-back-button', exportAs: 'itBackButton', template: "<a *ngIf=\"buttonStyle === 'link'\" class=\"go-back\" data-bs-toggle=\"historyback\" (click)=\"goBack()\" [routerLink]=\"null\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</a>\n\n<button *ngIf=\"buttonStyle === 'button'\"\n itButton=\"primary\"\n class=\"go-back\"\n data-bs-toggle=\"historyback\"\n (click)=\"goBack()\">\n\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", styles: ["a.go-back{cursor:pointer}\n"] }]
2617
- }], ctorParameters: function () { return [{ type: i1.Location }]; }, propDecorators: { buttonStyle: [{
2618
- type: Input
2619
- }], direction: [{
2620
- type: Input
2621
- }], showIcon: [{
2622
- type: Input
2623
- }], showText: [{
2624
- type: Input
2625
- }], backFn: [{
2626
- type: Input
2627
- }] } });
2628
-
2629
- class BackToTopComponent extends AbstractComponent {
2630
- constructor() {
2631
- super(...arguments);
2632
- /**
2633
- * The back to top ID
2634
- * @default 'back-to-top-button'
2635
- */
2636
- this.id = 'back-to-top-button';
2637
- }
2638
- get isSmall() {
2639
- return isTrueBooleanInput(this.small);
2640
- }
2641
- get isShadow() {
2642
- return isTrueBooleanInput(this.shadow);
2643
- }
2644
- get isDark() {
2645
- return isTrueBooleanInput(this.dark);
2646
- }
2647
- }
2648
- BackToTopComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BackToTopComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2649
- BackToTopComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: BackToTopComponent, selector: "it-back-to-top", inputs: { id: "id", small: "small", shadow: "shadow", dark: "dark" }, usesInheritance: true, ngImport: i0, template: "<a [id]=\"id\"\n href=\"#\"\n aria-hidden=\"true\"\n data-bs-toggle=\"backtotop\"\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", styles: [""], dependencies: [{ kind: "component", type: IconComponent, selector: "it-icon[name]", inputs: ["name", "size", "color", "padded", "class"] }] });
2650
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BackToTopComponent, decorators: [{
2651
- type: Component,
2652
- args: [{ selector: 'it-back-to-top', template: "<a [id]=\"id\"\n href=\"#\"\n aria-hidden=\"true\"\n data-bs-toggle=\"backtotop\"\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" }]
2653
- }], propDecorators: { id: [{
2654
- type: Input
2655
- }], small: [{
2656
- type: Input
2657
- }], shadow: [{
2658
- type: Input
2659
- }], dark: [{
2660
- type: Input
2661
- }] } });
2662
-
2663
- class BreadcrumbItemComponent extends LinkComponent {
2664
- get isActive() {
2665
- return isTrueBooleanInput(this.active);
2666
- }
2667
- }
2668
- BreadcrumbItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BreadcrumbItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2669
- BreadcrumbItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", 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", styles: [""] });
2670
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BreadcrumbItemComponent, decorators: [{
2671
- type: Component,
2672
- args: [{ selector: 'it-breadcrumb-item', template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n" }]
2673
- }], propDecorators: { active: [{
2674
- type: Input
2675
- }], iconName: [{
2676
- type: Input
2677
- }], htmlContent: [{
2678
- type: ViewChild,
2679
- args: [TemplateRef]
2680
- }] } });
2681
-
2682
- class BreadcrumbComponent {
2683
- constructor(_changeDetectorRef) {
2684
- this._changeDetectorRef = _changeDetectorRef;
2685
- /**
2686
- * The character to use as separator
2687
- * @default /
2688
- */
2689
- this.separator = '/';
2690
- }
2691
- get isDark() {
2692
- return isTrueBooleanInput(this.dark);
2693
- }
2694
- ngAfterViewInit() {
2695
- this._changeDetectorRef.detectChanges();
2696
- }
2697
- /**
2698
- * Check if index is last item
2699
- * @param index
2700
- */
2701
- isLastItem(index) {
2702
- return !!this.items && index >= (this.items.length - 1);
2703
- }
2704
- }
2705
- BreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BreadcrumbComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2706
- BreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", 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 class=\"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", styles: [""], 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", "class"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
2707
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BreadcrumbComponent, decorators: [{
2708
- type: Component,
2709
- args: [{ selector: 'it-breadcrumb', 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 class=\"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" }]
2710
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { separator: [{
2711
- type: Input
2712
- }], dark: [{
2713
- type: Input
2714
- }], items: [{
2715
- type: ContentChildren,
2716
- args: [BreadcrumbItemComponent]
2717
- }] } });
2718
-
2719
- class HeaderComponent extends AbstractComponent {
2720
- /**
2721
- * TODO: complete header
2722
- * @param _renderer
2723
- * @param _elementRef
2724
- */
2725
- constructor(_renderer, _elementRef) {
2726
- super(_renderer, _elementRef);
2727
- this._renderer = _renderer;
2728
- this._elementRef = _elementRef;
2729
- this.showSlim = true;
2730
- this.loginStyle = 'full';
2731
- this.smallHeader = true;
2732
- this.showSearch = true;
2733
- this.loginClick = new EventEmitter();
2734
- this.searchClick = new EventEmitter();
2735
- }
2736
- get isLight() {
2737
- return isTrueBooleanInput(this.light);
2738
- }
2739
- get isShowSlim() {
2740
- return isTrueBooleanInput(this.showSlim);
2741
- }
2742
- get isSmallHeader() {
2743
- return isTrueBooleanInput(this.smallHeader);
2744
- }
2745
- get isShowSearch() {
2746
- return isTrueBooleanInput(this.showSearch);
2747
- }
2748
- }
2749
- HeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HeaderComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
2750
- HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", 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", "class"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
2751
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HeaderComponent, decorators: [{
2752
- type: Component,
2753
- args: [{ selector: 'it-header', 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"] }]
2754
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { light: [{
2755
- type: Input
2756
- }], showSlim: [{
2757
- type: Input
2758
- }], slimTitle: [{
2759
- type: Input
2760
- }], loginStyle: [{
2761
- type: Input
2762
- }], smallHeader: [{
2763
- type: Input
2764
- }], showSearch: [{
2765
- type: Input
2766
- }], loginClick: [{
2767
- type: Output
2768
- }], searchClick: [{
2769
- type: Output
2770
- }] } });
2771
-
2772
- class NotFoundPageComponent {
2773
- }
2774
- NotFoundPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NotFoundPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2775
- NotFoundPageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: NotFoundPageComponent, selector: "it-not-found-page", ngImport: i0, template: "<div class=\"error-template text-center mt-5\">\n <h1>404</h1>\n <h2>{{'it.utils.404.title' | translate}}</h2>\n <p>{{'it.utils.404.description' | translate}}</p>\n\n <div class=\"mt-3\">\n <it-back-button></it-back-button>\n <a class=\"btn btn-primary ms-3\" href=\"/\" title=\"{{'it.utils.404.go-to-homepage' | translate}}\">\n {{'it.utils.404.go-to-homepage' | translate}}\n </a>\n </div>\n\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: BackButtonComponent, selector: "it-back-button", inputs: ["buttonStyle", "direction", "showIcon", "showText", "backFn"], exportAs: ["itBackButton"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
2776
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NotFoundPageComponent, decorators: [{
2777
- type: Component,
2778
- args: [{ selector: 'it-not-found-page', template: "<div class=\"error-template text-center mt-5\">\n <h1>404</h1>\n <h2>{{'it.utils.404.title' | translate}}</h2>\n <p>{{'it.utils.404.description' | translate}}</p>\n\n <div class=\"mt-3\">\n <it-back-button></it-back-button>\n <a class=\"btn btn-primary ms-3\" href=\"/\" title=\"{{'it.utils.404.go-to-homepage' | translate}}\">\n {{'it.utils.404.go-to-homepage' | translate}}\n </a>\n </div>\n\n</div>\n" }]
2779
- }] });
2780
-
2781
- class ChipComponent {
2782
- constructor() {
2783
- this._label = '';
2784
- this._showCloseButton = false;
2785
- this._size = '';
2786
- this._color = undefined;
2787
- this._disabled = false;
2788
- this._icon = undefined;
2789
- this._avatar = undefined;
2790
- this._altAvatar = '';
2791
- /**
2792
- * Evento emesso al click sul bottone di chiusura
2793
- */
2794
- this.close = new EventEmitter();
2795
- this.iconClose = 'close';
2796
- }
2797
- /**
2798
- * Indica la label
2799
- */
2800
- set label(value) { this._label = value; }
2801
- get label() { return this._label; }
2802
- /**
2803
- * Indica se mostrate il pulante di chisura
2804
- */
2805
- set showCloseButton(value) { this._showCloseButton = value; }
2806
- get showCloseButton() { return this._showCloseButton; }
2807
- /**
2808
- * Indica il size
2809
- */
2810
- set size(value) { this._size = value; }
2811
- get size() { return this._size; }
2812
- /**
2813
- * Indica il colore della chip
2814
- */
2815
- set color(value) { this._color = value; }
2816
- get color() { return this._color; }
2817
- /**
2818
- * Indica se la chip è disabilitata
2819
- */
2820
- set disabled(value) { this._disabled = value; }
2821
- get disabled() { return this._disabled; }
2822
- /**
2823
- * Indica il nome dell'icona, se valorizzata viene mostrata
2824
- */
2825
- set icon(value) { this._icon = value; }
2826
- get icon() { return this._icon; }
2827
- /**
2828
- * Indica l'url dell'avatar, se valorizzata viene mostrata
2829
- */
2830
- set avatar(value) { this._avatar = value; }
2831
- get avatar() { return this._avatar; }
2832
- /**
2833
- * Indica il valore da aggiungere al parametro alt, di default ''
2834
- */
2835
- set altAvatar(value) { this._altAvatar = value; }
2836
- get altAvatar() { return this._altAvatar; }
2837
- clickToClose() {
2838
- this.close.emit();
2839
- }
2840
- }
2841
- ChipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2842
- ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ChipComponent, selector: "it-chip", inputs: { label: "label", showCloseButton: "showCloseButton", size: "size", color: "color", disabled: "disabled", icon: "icon", avatar: "avatar", altAvatar: "altAvatar" }, outputs: { close: "close" }, 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>", 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: i2$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2843
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ChipComponent, decorators: [{
2844
- type: Component,
2845
- 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>" }]
2846
- }], propDecorators: { label: [{
2847
- type: Input
2848
- }], showCloseButton: [{
2849
- type: Input
2850
- }], size: [{
2851
- type: Input
2852
- }], color: [{
2853
- type: Input
2854
- }], disabled: [{
2855
- type: Input
2856
- }], icon: [{
2857
- type: Input
2858
- }], avatar: [{
2859
- type: Input
2860
- }], altAvatar: [{
2861
- type: Input
2862
- }], close: [{
2863
- type: Output
2864
- }] } });
2865
-
2866
- class ForwardDirective {
2867
- constructor(document) {
2868
- this.document = document;
2869
- this._itForward = undefined;
2870
- }
2871
- /**
2872
- * Indica, se HTMLElement, l'elemento a cui navigare, o se stringa, il selettore che selezionerà l'elemento a cui navigare.
2873
- */
2874
- set itForward(value) { this._itForward = value; }
2875
- get itForward() { return this._itForward; }
2876
- onClick(event) {
2877
- event.preventDefault();
2878
- if (this.itForward) {
2879
- if (typeof this.itForward === 'string') {
2880
- this.document?.querySelector(this.itForward)?.scrollIntoView({
2881
- behavior: 'smooth',
2882
- block: 'start',
2883
- inline: "nearest"
2884
- });
2885
- }
2886
- else if (this.itForward instanceof HTMLElement) {
2887
- this.itForward.scrollIntoView({
2888
- behavior: 'smooth',
2889
- block: 'start',
2890
- inline: "nearest"
2891
- });
2892
- }
2893
- }
2894
- }
2895
- }
2896
- ForwardDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ForwardDirective, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
2897
- ForwardDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: ForwardDirective, selector: "[itForward]", inputs: { itForward: "itForward" }, host: { listeners: { "click": "onClick($event)" }, classAttribute: "forward" }, ngImport: i0 });
2898
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ForwardDirective, decorators: [{
2899
- type: Directive,
2900
- args: [{
2901
- selector: '[itForward]',
2902
- host: { 'class': 'forward' }
2903
- }]
2904
- }], ctorParameters: function () { return [{ type: Document, decorators: [{
2905
- type: Inject,
2906
- args: [DOCUMENT]
2907
- }] }]; }, propDecorators: { itForward: [{
2908
- type: Input
2909
- }], onClick: [{
2910
- type: HostListener,
2911
- args: ['click', ['$event']]
2912
- }] } });
2913
-
2914
- class DimmerComponent {
2915
- constructor(elementRef) {
2916
- this.elementRef = elementRef;
2917
- this._active = false;
2918
- this._color = '';
2919
- }
2920
- /**
2921
- * Dimmer status
2922
- * @default false
2923
- */
2924
- set active(value) { this._active = value; }
2925
- ;
2926
- get active() { return this._active; }
2927
- /**
2928
- * Colore del dimmer
2929
- * @default ''
2930
- */
2931
- set color(value) { this._color = value; }
2932
- ;
2933
- get color() { return this._color; }
2934
- ngOnInit() {
2935
- this.elementRef?.nativeElement?.parentElement?.classList?.add('dimmable');
2936
- }
2937
- }
2938
- DimmerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DimmerComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
2939
- DimmerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", 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: [
2940
- trigger('fade', [
2941
- transition(':enter', [
2942
- style({ opacity: 0 }),
2943
- animate('150ms', style({ opacity: 0.92 })),
2944
- ]),
2945
- transition(':leave', [
2946
- animate('150ms', style({ opacity: 0 })),
2947
- ]),
2948
- ])
2949
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2950
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DimmerComponent, decorators: [{
2951
- type: Component,
2952
- args: [{ selector: 'it-dimmer', changeDetection: ChangeDetectionStrategy.OnPush, animations: [
2953
- trigger('fade', [
2954
- transition(':enter', [
2955
- style({ opacity: 0 }),
2956
- animate('150ms', style({ opacity: 0.92 })),
2957
- ]),
2958
- transition(':leave', [
2959
- animate('150ms', style({ opacity: 0 })),
2960
- ]),
2961
- ])
2962
- ], template: "<div class=\"dimmer\" *ngIf=\"active\" @fade [ngClass]=\"[color]\">\n <div class=\"dimmer-inner\">\n <ng-content></ng-content>\n </div>\n</div>" }]
2963
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { active: [{
2964
- type: Input
2965
- }], color: [{
2966
- type: Input
2967
- }] } });
2968
-
2969
- class DimmerButtonsComponent {
2970
- constructor() {
2971
- this._hasOneButton = false;
2972
- }
2973
- /**
2974
- * Indica se abbiamo 1 solo bottone
2975
- * @default false
2976
- */
2977
- set hasOneButton(value) { this._hasOneButton = value; }
2978
- ;
2979
- get hasOneButton() { return this._hasOneButton; }
2980
- }
2981
- DimmerButtonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DimmerButtonsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2982
- DimmerButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", 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 });
2983
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DimmerButtonsComponent, decorators: [{
2984
- type: Component,
2985
- 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>" }]
2986
- }], propDecorators: { hasOneButton: [{
2987
- type: Input
2988
- }] } });
2989
-
2990
- class DimmerIconComponent {
2991
- }
2992
- DimmerIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DimmerIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2993
- DimmerIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: DimmerIconComponent, selector: "it-dimmer-icon", ngImport: i0, template: "<div class=\"dimmer-icon\">\n <ng-content></ng-content>\n</div>", changeDetection: i0.ChangeDetectionStrategy.OnPush });
2994
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DimmerIconComponent, decorators: [{
2995
- type: Component,
2996
- args: [{ selector: 'it-dimmer-icon', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"dimmer-icon\">\n <ng-content></ng-content>\n</div>" }]
2997
- }] });
2998
-
2999
- /**
3000
- * Core components
3001
- */
3002
- const core = [
3003
- AccordionComponent,
3004
- AlertComponent,
3005
- BadgeDirective,
3006
- ButtonDirective,
3007
- CalloutComponent,
3008
- CardComponent,
3009
- CarouselComponent,
3010
- CarouselItemComponent,
3011
- ChipComponent,
3012
- CollapseComponent,
3013
- DimmerButtonsComponent,
3014
- DimmerComponent,
3015
- DimmerIconComponent,
3016
- DropdownComponent,
3017
- DropdownItemComponent,
3018
- ForwardDirective,
3019
- LinkComponent,
3020
- ListComponent,
3021
- ListItemComponent,
3022
- ModalComponent,
3023
- NotificationsComponent,
3024
- PaginationComponent,
3025
- PopoverDirective,
3026
- ProgressBarComponent,
3027
- ProgressButtonComponent,
3028
- SpinnerComponent,
3029
- TabContainerComponent,
3030
- TabItemComponent,
3031
- TableComponent,
3032
- TooltipDirective
3033
- ];
3034
- /**
3035
- * Form components
3036
- */
3037
- const form = [
3038
- CheckboxComponent,
3039
- InputComponent,
3040
- PasswordInputComponent,
3041
- RadioButtonComponent,
3042
- SelectComponent,
3043
- TextareaComponent,
3044
- UploadDragDropComponent,
3045
- UploadFileListComponent
3046
- ];
3047
- /**
3048
- * Navigation Components
3049
- */
3050
- const navigation = [
3051
- BackButtonComponent,
3052
- BackToTopComponent,
3053
- BreadcrumbComponent,
3054
- BreadcrumbItemComponent,
3055
- HeaderComponent
3056
- ];
3057
- /**
3058
- * Utils components
3059
- */
3060
- const utils = [
3061
- IconComponent,
3062
- NotFoundPageComponent
3063
- ];
3064
- class ComponentsModule {
3065
- }
3066
- ComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3067
- ComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: ComponentsModule, declarations: [AbstractComponent,
3068
- AbstractFormComponent, AccordionComponent,
3069
- AlertComponent,
3070
- BadgeDirective,
3071
- ButtonDirective,
3072
- CalloutComponent,
3073
- CardComponent,
3074
- CarouselComponent,
3075
- CarouselItemComponent,
3076
- ChipComponent,
3077
- CollapseComponent,
3078
- DimmerButtonsComponent,
3079
- DimmerComponent,
3080
- DimmerIconComponent,
3081
- DropdownComponent,
3082
- DropdownItemComponent,
3083
- ForwardDirective,
3084
- LinkComponent,
3085
- ListComponent,
3086
- ListItemComponent,
3087
- ModalComponent,
3088
- NotificationsComponent,
3089
- PaginationComponent,
3090
- PopoverDirective,
3091
- ProgressBarComponent,
3092
- ProgressButtonComponent,
3093
- SpinnerComponent,
3094
- TabContainerComponent,
3095
- TabItemComponent,
3096
- TableComponent,
3097
- TooltipDirective, CheckboxComponent,
3098
- InputComponent,
3099
- PasswordInputComponent,
3100
- RadioButtonComponent,
3101
- SelectComponent,
3102
- TextareaComponent,
3103
- UploadDragDropComponent,
3104
- UploadFileListComponent, BackButtonComponent,
3105
- BackToTopComponent,
3106
- BreadcrumbComponent,
3107
- BreadcrumbItemComponent,
3108
- HeaderComponent, IconComponent,
3109
- NotFoundPageComponent], imports: [CommonModule,
3110
- TranslateModule,
3111
- ReactiveFormsModule,
3112
- NgIf,
3113
- NgForOf,
3114
- RouterLink], exports: [AccordionComponent,
3115
- AlertComponent,
3116
- BadgeDirective,
3117
- ButtonDirective,
3118
- CalloutComponent,
3119
- CardComponent,
3120
- CarouselComponent,
3121
- CarouselItemComponent,
3122
- ChipComponent,
3123
- CollapseComponent,
3124
- DimmerButtonsComponent,
3125
- DimmerComponent,
3126
- DimmerIconComponent,
3127
- DropdownComponent,
3128
- DropdownItemComponent,
3129
- ForwardDirective,
3130
- LinkComponent,
3131
- ListComponent,
3132
- ListItemComponent,
3133
- ModalComponent,
3134
- NotificationsComponent,
3135
- PaginationComponent,
3136
- PopoverDirective,
3137
- ProgressBarComponent,
3138
- ProgressButtonComponent,
3139
- SpinnerComponent,
3140
- TabContainerComponent,
3141
- TabItemComponent,
3142
- TableComponent,
3143
- TooltipDirective, CheckboxComponent,
3144
- InputComponent,
3145
- PasswordInputComponent,
3146
- RadioButtonComponent,
3147
- SelectComponent,
3148
- TextareaComponent,
3149
- UploadDragDropComponent,
3150
- UploadFileListComponent, BackButtonComponent,
3151
- BackToTopComponent,
3152
- BreadcrumbComponent,
3153
- BreadcrumbItemComponent,
3154
- HeaderComponent, IconComponent,
3155
- NotFoundPageComponent] });
3156
- ComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ComponentsModule, imports: [CommonModule,
3157
- TranslateModule,
3158
- ReactiveFormsModule] });
3159
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ComponentsModule, decorators: [{
3160
- type: NgModule,
3161
- args: [{
3162
- declarations: [
3163
- AbstractComponent,
3164
- AbstractFormComponent,
3165
- ...core,
3166
- ...form,
3167
- ...navigation,
3168
- ...utils
3169
- ],
3170
- imports: [
3171
- CommonModule,
3172
- TranslateModule,
3173
- ReactiveFormsModule,
3174
- NgIf,
3175
- NgForOf,
3176
- RouterLink
3177
- ],
3178
- exports: [
3179
- ...core,
3180
- ...form,
3181
- ...navigation,
3182
- ...utils
3183
- ]
3184
- }]
3185
- }] });
3186
-
3187
- class DesignAngularKitModule {
3188
- }
3189
- DesignAngularKitModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DesignAngularKitModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3190
- DesignAngularKitModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: DesignAngularKitModule, imports: [ComponentsModule,
3191
- HttpClientModule, i2$1.TranslateModule], exports: [ComponentsModule] });
3192
- DesignAngularKitModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DesignAngularKitModule, imports: [ComponentsModule,
3193
- HttpClientModule,
3194
- TranslateModule.forChild({
3195
- loader: {
3196
- provide: TranslateLoader,
3197
- useFactory: (http) => new TranslateHttpLoader(http, '/bootstrap-italia/i18n/'),
3198
- deps: [HttpClient]
3199
- },
3200
- defaultLanguage: 'it'
3201
- }), ComponentsModule] });
3202
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DesignAngularKitModule, decorators: [{
3203
- type: NgModule,
3204
- args: [{
3205
- declarations: [],
3206
- imports: [
3207
- ComponentsModule,
3208
- HttpClientModule,
3209
- TranslateModule.forChild({
3210
- loader: {
3211
- provide: TranslateLoader,
3212
- useFactory: (http) => new TranslateHttpLoader(http, '/bootstrap-italia/i18n/'),
3213
- deps: [HttpClient]
3214
- },
3215
- defaultLanguage: 'it'
3216
- })
3217
- ],
3218
- exports: [ComponentsModule]
3219
- }]
3220
- }] });
3221
-
3222
- /*
3223
- * Public API Surface of design-angular-kit
3224
- */
3225
-
3226
- /**
3227
- * Generated bundle index. Do not edit.
3228
- */
3229
-
3230
- export { AccordionComponent, AlertComponent, BackButtonComponent, BackToTopComponent, BadgeDirective, BreadcrumbComponent, BreadcrumbItemComponent, ButtonDirective, CAP_REGEX, CalloutComponent, CardComponent, CarouselComponent, CarouselItemComponent, CheckboxComponent, ChipComponent, CollapseComponent, ComponentsModule, DesignAngularKitModule, DimmerButtonsComponent, DimmerComponent, DimmerIconComponent, DropdownComponent, DropdownItemComponent, EMAIL_REGEX, FileUtils, ForwardDirective, HeaderComponent, ITALIAN_TAX_CODE_REGEX, IconComponent, InputComponent, ItValidators, LinkComponent, ListComponent, ListItemComponent, ModalComponent, NotFoundPageComponent, NotificationPosition, NotificationType, NotificationsComponent, NotificationsService, PHONE_NUMBER_REGEX, PaginationComponent, PasswordInputComponent, PopoverDirective, ProgressBarComponent, ProgressButtonComponent, RadioButtonComponent, SelectComponent, SpinnerComponent, TabContainerComponent, TabItemComponent, TableComponent, TextareaComponent, TooltipDirective, URL_REGEX, UploadDragDropComponent, UploadFileListComponent, VAT_NUMBER_REGEX };
3231
- //# sourceMappingURL=design-angular-kit.mjs.map