herum-shared 0.1.25

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 (236) hide show
  1. package/README.md +63 -0
  2. package/animations/index.d.ts +5 -0
  3. package/assets/feed/exercise/exerciseAchivment.svg +11 -0
  4. package/assets/feed/icons/active/audio.svg +5 -0
  5. package/assets/feed/icons/active/collection.svg +15 -0
  6. package/assets/feed/icons/active/exercise.svg +13 -0
  7. package/assets/feed/icons/active/generic-file.svg +8 -0
  8. package/assets/feed/icons/active/image.svg +11 -0
  9. package/assets/feed/icons/active/link.svg +6 -0
  10. package/assets/feed/icons/active/pdf.svg +14 -0
  11. package/assets/feed/icons/active/presentation.svg +11 -0
  12. package/assets/feed/icons/active/quiz.svg +17 -0
  13. package/assets/feed/icons/active/story.svg +7 -0
  14. package/assets/feed/icons/active/video.svg +11 -0
  15. package/assets/feed/icons/comment.svg +12 -0
  16. package/assets/feed/icons/error/audio.svg +5 -0
  17. package/assets/feed/icons/error/collection.svg +15 -0
  18. package/assets/feed/icons/error/exercise.svg +13 -0
  19. package/assets/feed/icons/error/generic-file.svg +8 -0
  20. package/assets/feed/icons/error/image.svg +11 -0
  21. package/assets/feed/icons/error/pdf.svg +14 -0
  22. package/assets/feed/icons/error/presentation.svg +11 -0
  23. package/assets/feed/icons/error/quiz.svg +17 -0
  24. package/assets/feed/icons/error/story.svg +7 -0
  25. package/assets/feed/icons/error/video.svg +11 -0
  26. package/assets/feed/icons/eye.svg +13 -0
  27. package/assets/feed/icons/garbage-secondary.svg +14 -0
  28. package/assets/feed/icons/garbage.svg +14 -0
  29. package/assets/feed/icons/green-x.svg +165 -0
  30. package/assets/feed/icons/hamburger.svg +2 -0
  31. package/assets/feed/icons/inactive/audio.svg +5 -0
  32. package/assets/feed/icons/inactive/exercise.svg +17 -0
  33. package/assets/feed/icons/inactive/link.svg +6 -0
  34. package/assets/feed/icons/inactive/pdf.svg +19 -0
  35. package/assets/feed/icons/inactive/presentation.svg +13 -0
  36. package/assets/feed/icons/inactive/quiz.svg +25 -0
  37. package/assets/feed/icons/inactive/story.svg +7 -0
  38. package/assets/feed/icons/inactive/video.svg +13 -0
  39. package/assets/feed/icons/status/Group 856.svg +11 -0
  40. package/assets/feed/icons/status/almostDone.svg +11 -0
  41. package/assets/feed/icons/status/done.svg +11 -0
  42. package/assets/feed/icons/status/inProgress.svg +13 -0
  43. package/assets/feed/icons/white-chevron.svg +3 -0
  44. package/assets/feed/icons/wide-mode.png +0 -0
  45. package/assets/feed/icons/wide-mode.svg +7 -0
  46. package/assets/feed/icons/wide-mode2.svg +8 -0
  47. package/assets/files-icons/.image.svg +11 -0
  48. package/assets/files-icons/.mp4.png +0 -0
  49. package/assets/files-icons/.mp4.svg +12 -0
  50. package/assets/files-icons/.pdf.png +0 -0
  51. package/assets/files-icons/.pdf.svg +16 -0
  52. package/assets/files-icons/.pptx.png +0 -0
  53. package/assets/files-icons/.pptx.svg +12 -0
  54. package/assets/files-icons/.video.svg +12 -0
  55. package/assets/files-icons/default-file.png +0 -0
  56. package/assets/files-icons/generic-file.svg +8 -0
  57. package/assets/files-icons/story.png +0 -0
  58. package/assets/files-icons/story.svg +3 -0
  59. package/assets/files-icons/upload-file.svg +4 -0
  60. package/assets/general/calendar.svg +12 -0
  61. package/assets/general/chevron.svg +3 -0
  62. package/assets/general/clock.svg +4 -0
  63. package/assets/general/closed-chevron.png +0 -0
  64. package/assets/general/college-calendar.svg +12 -0
  65. package/assets/general/comment-icon.svg +12 -0
  66. package/assets/general/dialogX.png +0 -0
  67. package/assets/general/errorOwl.png +0 -0
  68. package/assets/general/green-x.svg +4 -0
  69. package/assets/general/grey-chevron.svg +3 -0
  70. package/assets/general/keyboardLink.svg +15 -0
  71. package/assets/general/logo.png +0 -0
  72. package/assets/general/noCollectionsMessage.svg +59 -0
  73. package/assets/general/open-chevron.png +0 -0
  74. package/assets/general/owl-logo.svg +98 -0
  75. package/assets/general/secondary-x.svg +3 -0
  76. package/assets/general/user.svg +15 -0
  77. package/assets/general/white-chevron.svg +3 -0
  78. package/assets/quiz/greenHeaderArrow.svg +12 -0
  79. package/assets/quiz/greyHeaderArrow.svg +12 -0
  80. package/assets/quiz/happyOwl.svg +126 -0
  81. package/assets/quiz/sadOwl.svg +94 -0
  82. package/assets/quiz/skip.svg +5 -0
  83. package/assets/shared/atoms/inputs/herum-inputs.component.scss +56 -0
  84. package/assets/shared/atoms/selects/herum-selects.component.scss +141 -0
  85. package/assets/shared/atoms/uploadingStatuses/error.svg +8 -0
  86. package/assets/shared/atoms/uploadingStatuses/information.svg +6 -0
  87. package/assets/shared/atoms/uploadingStatuses/success.svg +9 -0
  88. package/assets/shared/audio-images/gray-pause.svg +4 -0
  89. package/assets/shared/audio-images/gray-play.svg +3 -0
  90. package/assets/shared/audio-images/next15.svg +7 -0
  91. package/assets/shared/audio-images/pause.svg +4 -0
  92. package/assets/shared/audio-images/play.svg +3 -0
  93. package/assets/shared/audio-images/previous15.svg +7 -0
  94. package/assets/shared/background/cubes.png +0 -0
  95. package/assets/shared/background/cubes.svg +1900 -0
  96. package/assets/shared/icons/V.svg +3 -0
  97. package/assets/shared/icons/X.svg +3 -0
  98. package/assets/shared/icons/active-clipboard.svg +7 -0
  99. package/assets/shared/icons/active-drag.svg +44 -0
  100. package/assets/shared/icons/active-upload.svg +3 -0
  101. package/assets/shared/icons/add.svg +3 -0
  102. package/assets/shared/icons/attachUsers.png +0 -0
  103. package/assets/shared/icons/big-no-result-owl.png +0 -0
  104. package/assets/shared/icons/bigV.svg +3 -0
  105. package/assets/shared/icons/celeb-owl.png +0 -0
  106. package/assets/shared/icons/clock.svg +3 -0
  107. package/assets/shared/icons/drag.svg +44 -0
  108. package/assets/shared/icons/edit.svg +3 -0
  109. package/assets/shared/icons/editCollection.png +0 -0
  110. package/assets/shared/icons/femaleAvatar.svg +80 -0
  111. package/assets/shared/icons/inactive-clipboard.svg +7 -0
  112. package/assets/shared/icons/input/X.png +0 -0
  113. package/assets/shared/icons/input/X.svg +3 -0
  114. package/assets/shared/icons/input/drag.svg +6 -0
  115. package/assets/shared/icons/input/green-search.png +0 -0
  116. package/assets/shared/icons/input/grey-search.png +0 -0
  117. package/assets/shared/icons/input/search.svg +4 -0
  118. package/assets/shared/icons/maleAvatar.svg +55 -0
  119. package/assets/shared/icons/no-result-owl.png +0 -0
  120. package/assets/shared/icons/resources.svg +6 -0
  121. package/assets/shared/icons/secondary-x.svg +3 -0
  122. package/assets/shared/icons/settings.png +0 -0
  123. package/assets/shared/icons/stepper/white-v.svg +3 -0
  124. package/assets/shared/icons/table/edit.svg +3 -0
  125. package/assets/shared/icons/target.png +0 -0
  126. package/assets/shared/icons/upload.png +0 -0
  127. package/assets/shared/icons/upload.svg +7 -0
  128. package/assets/shared/icons/user.svg +8 -0
  129. package/assets/shared/icons/video/Play.PNG +0 -0
  130. package/assets/shared/icons/video/back10.PNG +0 -0
  131. package/assets/shared/icons/video/back10.svg +7 -0
  132. package/assets/shared/icons/video/download.PNG +0 -0
  133. package/assets/shared/icons/video/download.svg +4 -0
  134. package/assets/shared/icons/video/fullScreen.PNG +0 -0
  135. package/assets/shared/icons/video/fullScreen.svg +7 -0
  136. package/assets/shared/icons/video/minimize.png +0 -0
  137. package/assets/shared/icons/video/mute.png +0 -0
  138. package/assets/shared/icons/video/mute.svg +7 -0
  139. package/assets/shared/icons/video/next10.PNG +0 -0
  140. package/assets/shared/icons/video/next10.svg +7 -0
  141. package/assets/shared/icons/video/pause.PNG +0 -0
  142. package/assets/shared/icons/video/pause.svg +5 -0
  143. package/assets/shared/icons/video/pictureInPicture.png +0 -0
  144. package/assets/shared/icons/video/pictureInPicture.svg +5 -0
  145. package/assets/shared/icons/video/pictureInPictureOff.svg +7 -0
  146. package/assets/shared/icons/video/play.svg +4 -0
  147. package/assets/shared/icons/video/primary-play.png +0 -0
  148. package/assets/shared/icons/video/primaryPlay.svg +22 -0
  149. package/assets/shared/icons/video/sound.svg +8 -0
  150. package/assets/shared/icons/video/speaker.PNG +0 -0
  151. package/assets/shared/trackChanges/edit.svg +11 -0
  152. package/assets/shared/trackChanges/message-plus.svg +14 -0
  153. package/assets/shared/trackChanges/show-comments.svg +5 -0
  154. package/assets/shared/trackChanges/text-reference.svg +3 -0
  155. package/assets/shared/trackChanges/trash.svg +9 -0
  156. package/atoms/index.d.ts +836 -0
  157. package/constants/index.d.ts +795 -0
  158. package/decorators/index.d.ts +3 -0
  159. package/dialogs/index.d.ts +41 -0
  160. package/directives/index.d.ts +55 -0
  161. package/environment/index.d.ts +129 -0
  162. package/errors/index.d.ts +26 -0
  163. package/fesm2022/herum-shared-animations.mjs +41 -0
  164. package/fesm2022/herum-shared-animations.mjs.map +1 -0
  165. package/fesm2022/herum-shared-atoms.mjs +2919 -0
  166. package/fesm2022/herum-shared-atoms.mjs.map +1 -0
  167. package/fesm2022/herum-shared-constants.mjs +711 -0
  168. package/fesm2022/herum-shared-constants.mjs.map +1 -0
  169. package/fesm2022/herum-shared-decorators.mjs +12 -0
  170. package/fesm2022/herum-shared-decorators.mjs.map +1 -0
  171. package/fesm2022/herum-shared-dialogs.mjs +113 -0
  172. package/fesm2022/herum-shared-dialogs.mjs.map +1 -0
  173. package/fesm2022/herum-shared-directives.mjs +226 -0
  174. package/fesm2022/herum-shared-directives.mjs.map +1 -0
  175. package/fesm2022/herum-shared-environment.mjs +10 -0
  176. package/fesm2022/herum-shared-environment.mjs.map +1 -0
  177. package/fesm2022/herum-shared-errors.mjs +71 -0
  178. package/fesm2022/herum-shared-errors.mjs.map +1 -0
  179. package/fesm2022/herum-shared-fetched-message.mjs +118 -0
  180. package/fesm2022/herum-shared-fetched-message.mjs.map +1 -0
  181. package/fesm2022/herum-shared-herum-types.mjs +106 -0
  182. package/fesm2022/herum-shared-herum-types.mjs.map +1 -0
  183. package/fesm2022/herum-shared-molecules.mjs +1530 -0
  184. package/fesm2022/herum-shared-molecules.mjs.map +1 -0
  185. package/fesm2022/herum-shared-mongo-molecules.mjs +269 -0
  186. package/fesm2022/herum-shared-mongo-molecules.mjs.map +1 -0
  187. package/fesm2022/herum-shared-mongo-services.mjs +441 -0
  188. package/fesm2022/herum-shared-mongo-services.mjs.map +1 -0
  189. package/fesm2022/herum-shared-mongo.mjs +729 -0
  190. package/fesm2022/herum-shared-mongo.mjs.map +1 -0
  191. package/fesm2022/herum-shared-objectsExample.mjs +190 -0
  192. package/fesm2022/herum-shared-objectsExample.mjs.map +1 -0
  193. package/fesm2022/herum-shared-pipes.mjs +406 -0
  194. package/fesm2022/herum-shared-pipes.mjs.map +1 -0
  195. package/fesm2022/herum-shared-services.mjs +1107 -0
  196. package/fesm2022/herum-shared-services.mjs.map +1 -0
  197. package/fesm2022/herum-shared-static-services.mjs +140 -0
  198. package/fesm2022/herum-shared-static-services.mjs.map +1 -0
  199. package/fesm2022/herum-shared-table.mjs +837 -0
  200. package/fesm2022/herum-shared-table.mjs.map +1 -0
  201. package/fesm2022/herum-shared-testsObjects.mjs +5722 -0
  202. package/fesm2022/herum-shared-testsObjects.mjs.map +1 -0
  203. package/fesm2022/herum-shared-tokens.mjs +13 -0
  204. package/fesm2022/herum-shared-tokens.mjs.map +1 -0
  205. package/fesm2022/herum-shared-utils.mjs +380 -0
  206. package/fesm2022/herum-shared-utils.mjs.map +1 -0
  207. package/fesm2022/herum-shared-validators.mjs +76 -0
  208. package/fesm2022/herum-shared-validators.mjs.map +1 -0
  209. package/fesm2022/herum-shared.mjs +11709 -0
  210. package/fesm2022/herum-shared.mjs.map +1 -0
  211. package/fetched-message/index.d.ts +49 -0
  212. package/herum-types/index.d.ts +198 -0
  213. package/index.d.ts +2946 -0
  214. package/molecules/index.d.ts +458 -0
  215. package/mongo/index.d.ts +175 -0
  216. package/mongo/molecules/index.d.ts +76 -0
  217. package/mongo/services/index.d.ts +98 -0
  218. package/objectsExample/index.d.ts +11 -0
  219. package/package.json +128 -0
  220. package/pipes/index.d.ts +93 -0
  221. package/services/index.d.ts +266 -0
  222. package/static-services/index.d.ts +25 -0
  223. package/styles/_mixin.scss +86 -0
  224. package/styles/collection-wizard-layout.component.scss +70 -0
  225. package/styles/dialogs.scss +49 -0
  226. package/styles/forms.scss +18 -0
  227. package/styles/overView.scss +115 -0
  228. package/styles/variables/_colors.college.scss +65 -0
  229. package/styles/variables/_colors.scss +161 -0
  230. package/styles/variables/_sizes.scss +73 -0
  231. package/styles/wizard-steps-layout.scss +21 -0
  232. package/table/index.d.ts +233 -0
  233. package/testsObjects/index.d.ts +91 -0
  234. package/tokens/index.d.ts +8 -0
  235. package/utils/index.d.ts +92 -0
  236. package/validators/index.d.ts +20 -0
@@ -0,0 +1,2919 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, Pipe, EventEmitter, Output, Input, forwardRef, Inject, ViewChild, Directive, HostListener, Optional, Self, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import * as i1$2 from '@angular/forms';
6
+ import { NG_VALUE_ACCESSOR, FormControl, FormControlName, Validators, ControlContainer, ReactiveFormsModule, FormsModule } from '@angular/forms';
7
+ import { HERUM_SHARED_CONFIG_TOKEN } from 'herum-shared/environment';
8
+ import * as i2 from '@angular/cdk/bidi';
9
+ import * as i4 from 'herum-shared/pipes';
10
+ import { PipesModule } from 'herum-shared/pipes';
11
+ import * as i3 from '@angular/material/datepicker';
12
+ import { DateRange, MatDatepickerModule } from '@angular/material/datepicker';
13
+ import { calendarActiveColorCssVariable, calendarHoverColorCssVariable, calendarLibrarySelector, calendarLibraryBodyCellSelector, svgsStrings, defaultPlaceholder as defaultPlaceholder$1, keyboardAsciiCodes, types, formStatuses, regexExpressions, timerActiveColorCssVariable, timerHoverColorCssVariable, timerItemSizeColorCssVariable, resourcesFilesSuffixes, anySubFileTypeWildCard, maleAvatarPath, femaleAvatarPath } from 'herum-shared/constants';
14
+ import * as i1$1 from '@angular/material/core';
15
+ import { MatNativeDateModule, MAT_DATE_LOCALE } from '@angular/material/core';
16
+ import { Subject } from 'rxjs';
17
+ import { takeUntil, debounceTime, tap } from 'rxjs/operators';
18
+ import { openClose } from 'herum-shared/animations';
19
+ import { getDropdownAnimationStates } from 'herum-shared/utils';
20
+ import { v4 } from 'uuid';
21
+ import * as i3$1 from '@angular/material/tooltip';
22
+ import { MatTooltipModule } from '@angular/material/tooltip';
23
+ import { ResourceState, QuizHeaderState, TimeUnit, Gender } from 'herum-shared/herum-types';
24
+ import { MatMenuModule } from '@angular/material/menu';
25
+ import { ClipboardModule } from '@angular/cdk/clipboard';
26
+ import { MatAutocompleteModule } from '@angular/material/autocomplete';
27
+ import { MatChipsModule } from '@angular/material/chips';
28
+ import { MatFormFieldModule } from '@angular/material/form-field';
29
+ import { MatInputModule } from '@angular/material/input';
30
+ import { MatSelectModule } from '@angular/material/select';
31
+ import { MatIconModule } from '@angular/material/icon';
32
+ import { MatCheckboxModule } from '@angular/material/checkbox';
33
+ import { MatSliderModule } from '@angular/material/slider';
34
+ import { DragDropModule } from '@angular/cdk/drag-drop';
35
+
36
+ class CollegeLoaderComponent {
37
+ bars = new Array(8).fill(8);
38
+ constructor() { }
39
+ ngOnInit() { }
40
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: CollegeLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
41
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: CollegeLoaderComponent, isStandalone: false, selector: "college-loader", ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"bar\" *ngFor=\"let bar of bars\"></div>\r\n</div>", styles: [".arc-container{--uib-size: 70px;display:flex;align-items:center;justify-content:center;width:var(--uib-size)}.container{--uib-size: 70px;--uib-color: #cdcdcd;--uib-speed: 1s;--uib-stroke: 3.5px;display:flex;align-items:center;justify-content:space-between;width:var(--uib-size);height:calc(var(--uib-size) * .4)}.bar{width:var(--uib-stroke);height:100%;background-color:var(--uib-color);transition:background-color .3s ease;border-radius:18px}.bar:nth-child(1){animation:grow var(--uib-speed) ease-in-out calc(var(--uib-speed) * -1.05) infinite}.bar:nth-child(2){animation:grow var(--uib-speed) ease-in-out calc(var(--uib-speed) * -.9) infinite}.bar:nth-child(3){animation:grow var(--uib-speed) ease-in-out calc(var(--uib-speed) * -.75) infinite}.bar:nth-child(4){animation:grow var(--uib-speed) ease-in-out calc(var(--uib-speed) * -.6) infinite}.bar:nth-child(5){animation:grow var(--uib-speed) ease-in-out calc(var(--uib-speed) * -.45) infinite}.bar:nth-child(6){animation:grow var(--uib-speed) ease-in-out calc(var(--uib-speed) * -.3) infinite}.bar:nth-child(7){animation:grow var(--uib-speed) ease-in-out calc(var(--uib-speed) * -.15) infinite}.bar:nth-child(8){animation:grow var(--uib-speed) ease-in-out infinite}@keyframes grow{0%,to{transform:scaleY(.3)}50%{transform:scaleY(1)}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
42
+ }
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: CollegeLoaderComponent, decorators: [{
44
+ type: Component,
45
+ args: [{ standalone: false, selector: 'college-loader', template: "<div class=\"container\">\r\n <div class=\"bar\" *ngFor=\"let bar of bars\"></div>\r\n</div>", styles: [".arc-container{--uib-size: 70px;display:flex;align-items:center;justify-content:center;width:var(--uib-size)}.container{--uib-size: 70px;--uib-color: #cdcdcd;--uib-speed: 1s;--uib-stroke: 3.5px;display:flex;align-items:center;justify-content:space-between;width:var(--uib-size);height:calc(var(--uib-size) * .4)}.bar{width:var(--uib-stroke);height:100%;background-color:var(--uib-color);transition:background-color .3s ease;border-radius:18px}.bar:nth-child(1){animation:grow var(--uib-speed) ease-in-out calc(var(--uib-speed) * -1.05) infinite}.bar:nth-child(2){animation:grow var(--uib-speed) ease-in-out calc(var(--uib-speed) * -.9) infinite}.bar:nth-child(3){animation:grow var(--uib-speed) ease-in-out calc(var(--uib-speed) * -.75) infinite}.bar:nth-child(4){animation:grow var(--uib-speed) ease-in-out calc(var(--uib-speed) * -.6) infinite}.bar:nth-child(5){animation:grow var(--uib-speed) ease-in-out calc(var(--uib-speed) * -.45) infinite}.bar:nth-child(6){animation:grow var(--uib-speed) ease-in-out calc(var(--uib-speed) * -.3) infinite}.bar:nth-child(7){animation:grow var(--uib-speed) ease-in-out calc(var(--uib-speed) * -.15) infinite}.bar:nth-child(8){animation:grow var(--uib-speed) ease-in-out infinite}@keyframes grow{0%,to{transform:scaleY(.3)}50%{transform:scaleY(1)}}\n"] }]
46
+ }], ctorParameters: () => [] });
47
+
48
+ class SliceBreadcrumbsPipe {
49
+ transform(items, ...args) {
50
+ if (!items)
51
+ return [];
52
+ items = [...items];
53
+ if (items?.length > 4)
54
+ items = items.slice(items?.length - 4, items?.length);
55
+ return items;
56
+ }
57
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: SliceBreadcrumbsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
58
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.17", ngImport: i0, type: SliceBreadcrumbsPipe, isStandalone: false, name: "sliceBreadcrumbs" });
59
+ }
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: SliceBreadcrumbsPipe, decorators: [{
61
+ type: Pipe,
62
+ args: [{
63
+ standalone: false,
64
+ name: 'sliceBreadcrumbs'
65
+ }]
66
+ }] });
67
+
68
+ const itemInput = 'item';
69
+ class HerumBreadcrumbsComponent {
70
+ items;
71
+ itemToSet;
72
+ itemEmitter = new EventEmitter();
73
+ ngOnChanges(changes) {
74
+ if (changes[itemInput]?.currentValue && changes[itemInput].firstChange)
75
+ this.handleItemInput(this.itemToSet);
76
+ }
77
+ _onClick(itemIndex, isLastItem) {
78
+ if (isLastItem || this.items.length === 1)
79
+ return;
80
+ const numberOfItemForRemoval = this.items.length - itemIndex - 1;
81
+ const startIndexForRemoval = itemIndex + 1;
82
+ this.items.splice(startIndexForRemoval, numberOfItemForRemoval);
83
+ this.itemEmitter.emit(this.items);
84
+ }
85
+ handleItemInput(itemInput) {
86
+ this.items.some(item => item.id === itemInput.id) ? this.updateCurrentItem(itemInput) : this.addItem(itemInput);
87
+ }
88
+ updateCurrentItem(updatedItem) {
89
+ const updatedItemIndex = this.items.findIndex(item => item.id === updatedItem.id);
90
+ if (updatedItemIndex !== (this.items.length - 1))
91
+ this._onClick(updatedItemIndex, false);
92
+ }
93
+ addItem(item) {
94
+ this.items.push(item);
95
+ }
96
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumBreadcrumbsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
97
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumBreadcrumbsComponent, isStandalone: false, selector: "herum-breadcrumbs", inputs: { items: "items", itemToSet: "itemToSet" }, outputs: { itemEmitter: "itemEmitter" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"d-flex\">\r\n <li *ngFor=\"let item of (items | sliceBreadcrumbs), let index = index, let last = last\">\r\n <span class=\"item clickable-text\" [ngClass]=\"{'last-item':last}\"\r\n (click)=\"_onClick(index,last)\">{{item.name}}</span>\r\n\r\n <img class=\"chevron\" *ngIf=\"!last\" src=\"../../assets/general/grey-chevron.svg\">\r\n </li>\r\n</div>", styles: [".last-item{color:var(--text-color);cursor:default}.chevron{margin-inline:4px;transform:rotate(90deg)}.clickable-text{font-size:12px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: SliceBreadcrumbsPipe, name: "sliceBreadcrumbs" }] });
98
+ }
99
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumBreadcrumbsComponent, decorators: [{
100
+ type: Component,
101
+ args: [{ standalone: false, selector: 'herum-breadcrumbs', template: "<div class=\"d-flex\">\r\n <li *ngFor=\"let item of (items | sliceBreadcrumbs), let index = index, let last = last\">\r\n <span class=\"item clickable-text\" [ngClass]=\"{'last-item':last}\"\r\n (click)=\"_onClick(index,last)\">{{item.name}}</span>\r\n\r\n <img class=\"chevron\" *ngIf=\"!last\" src=\"../../assets/general/grey-chevron.svg\">\r\n </li>\r\n</div>", styles: [".last-item{color:var(--text-color);cursor:default}.chevron{margin-inline:4px;transform:rotate(90deg)}.clickable-text{font-size:12px}\n"] }]
102
+ }], propDecorators: { items: [{
103
+ type: Input
104
+ }], itemToSet: [{
105
+ type: Input
106
+ }], itemEmitter: [{
107
+ type: Output
108
+ }] } });
109
+
110
+ class HerumButtonComponent {
111
+ type = 'primary';
112
+ color = 'regular';
113
+ size = 'medium';
114
+ roundedCorners = 'default';
115
+ disabled = false;
116
+ isLoading = false;
117
+ name;
118
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
119
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumButtonComponent, isStandalone: false, selector: "herum-button", inputs: { type: "type", color: "color", size: "size", roundedCorners: "roundedCorners", disabled: "disabled", isLoading: "isLoading", name: "name" }, ngImport: i0, template: "<button userAction class=\"herum-button shadow\" [name]=\"name\"\r\n [ngClass]=\"[type, color ?? '', size, roundedCorners + '-rounded-corners', isLoading ? 'skeleton' : '']\"\r\n [disabled]=\"disabled\">\r\n <ng-content></ng-content>\r\n</button>", styles: ["button{padding:var(--button-padding-size);width:100%;display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;font-weight:500;font-size:var(--standard-font-size);box-shadow:0 0 var(--box-shadow-blur) #00000029!important}button:active{transform:scale(.96)}button:focus-visible{outline:none;transform:scale(.96)}.default-rounded-corners{border-radius:var(--border-radius)}.up-rounded-corners{border-radius:8px 8px 0 0}.down-rounded-corners{border-radius:0 0 8px 8px}shadow{box-shadow:0 0 var(--box-shadow-blur) #00000029!important}.fit{width:fit-content;height:fit-content;padding:4px 8px}.small{min-width:var(--minimum-small-button-width-size);height:var(--small-button-height-size)}.medium{min-width:var(--minimum-medium-button-width-size);height:var(--medium-button-height-size)}.big{min-width:var(--minimum-medium-button-width-size);height:var(--big-button-height-size)}.medium-square{min-width:var(--minimum-medium-quare-button-width-size);height:var(--medium-button-height-size)}.primary{background:var(--primary-color);color:var(--light-text-color)}.primary:hover{background:var(--lighter-primary-color)}.primary:active{background:var(--darker-primary-color)}.white{background:#fff;color:var(--icons-color)}.primary[disabled]{background:var(--disabled-background-color);color:var(--disabled-text-color)}.secondary{background:var(--light-background-color);border:var(--secondary-color) 2px solid;color:var(--secondary-color)}.secondary:hover{background:var(--light-background-color);border:var(--lighter-secondary-color) 2px solid;color:var(--lighter-secondary-color)}.secondary:active{border:var(--darker-secondary-color) 2px solid;color:var(--darker-secondary-color)}.secondary[disabled]{background:var(--disabled-background-color);border:var(--disabled-background-color);color:var(--disabled-text-color)}.ghost{background:transparent;outline:transparent;color:var(--secondary-color);box-shadow:none!important}.ghost:hover{color:var(--lighter-secondary-color)}.ghost:active{background:var(--darker-light-background-color);outline:transparent;color:var(--secondary-color);box-shadow:0 0 var(--box-shadow-blur) #00000029!important}.ghost[disabled]{color:var(--disabled-text-color);background-color:transparent}[disabled]{cursor:not-allowed;color:var(--disabled-text-color)}.error{background:var(--error-color)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
120
+ }
121
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumButtonComponent, decorators: [{
122
+ type: Component,
123
+ args: [{ standalone: false, selector: 'herum-button', template: "<button userAction class=\"herum-button shadow\" [name]=\"name\"\r\n [ngClass]=\"[type, color ?? '', size, roundedCorners + '-rounded-corners', isLoading ? 'skeleton' : '']\"\r\n [disabled]=\"disabled\">\r\n <ng-content></ng-content>\r\n</button>", styles: ["button{padding:var(--button-padding-size);width:100%;display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;font-weight:500;font-size:var(--standard-font-size);box-shadow:0 0 var(--box-shadow-blur) #00000029!important}button:active{transform:scale(.96)}button:focus-visible{outline:none;transform:scale(.96)}.default-rounded-corners{border-radius:var(--border-radius)}.up-rounded-corners{border-radius:8px 8px 0 0}.down-rounded-corners{border-radius:0 0 8px 8px}shadow{box-shadow:0 0 var(--box-shadow-blur) #00000029!important}.fit{width:fit-content;height:fit-content;padding:4px 8px}.small{min-width:var(--minimum-small-button-width-size);height:var(--small-button-height-size)}.medium{min-width:var(--minimum-medium-button-width-size);height:var(--medium-button-height-size)}.big{min-width:var(--minimum-medium-button-width-size);height:var(--big-button-height-size)}.medium-square{min-width:var(--minimum-medium-quare-button-width-size);height:var(--medium-button-height-size)}.primary{background:var(--primary-color);color:var(--light-text-color)}.primary:hover{background:var(--lighter-primary-color)}.primary:active{background:var(--darker-primary-color)}.white{background:#fff;color:var(--icons-color)}.primary[disabled]{background:var(--disabled-background-color);color:var(--disabled-text-color)}.secondary{background:var(--light-background-color);border:var(--secondary-color) 2px solid;color:var(--secondary-color)}.secondary:hover{background:var(--light-background-color);border:var(--lighter-secondary-color) 2px solid;color:var(--lighter-secondary-color)}.secondary:active{border:var(--darker-secondary-color) 2px solid;color:var(--darker-secondary-color)}.secondary[disabled]{background:var(--disabled-background-color);border:var(--disabled-background-color);color:var(--disabled-text-color)}.ghost{background:transparent;outline:transparent;color:var(--secondary-color);box-shadow:none!important}.ghost:hover{color:var(--lighter-secondary-color)}.ghost:active{background:var(--darker-light-background-color);outline:transparent;color:var(--secondary-color);box-shadow:0 0 var(--box-shadow-blur) #00000029!important}.ghost[disabled]{color:var(--disabled-text-color);background-color:transparent}[disabled]{cursor:not-allowed;color:var(--disabled-text-color)}.error{background:var(--error-color)}\n"] }]
124
+ }], propDecorators: { type: [{
125
+ type: Input
126
+ }], color: [{
127
+ type: Input
128
+ }], size: [{
129
+ type: Input
130
+ }], roundedCorners: [{
131
+ type: Input
132
+ }], disabled: [{
133
+ type: Input
134
+ }], isLoading: [{
135
+ type: Input
136
+ }], name: [{
137
+ type: Input
138
+ }] } });
139
+
140
+ const CUSTOM_CHECKBOX_VALUE_ACCESSOR = {
141
+ provide: NG_VALUE_ACCESSOR,
142
+ useExisting: forwardRef(() => HerumCheckboxComponent),
143
+ multi: true,
144
+ };
145
+ class HerumCheckboxComponent {
146
+ environmentConfig;
147
+ type;
148
+ isChecked = false;
149
+ isBlocked = false;
150
+ checkedEmitter = new EventEmitter();
151
+ indeterminate;
152
+ checked;
153
+ error;
154
+ checkboxClasses = '';
155
+ params;
156
+ constructor(environmentConfig) {
157
+ this.environmentConfig = environmentConfig;
158
+ }
159
+ ngOnInit() {
160
+ this.indeterminate = this.environmentConfig.checkboxTypes.indeterminate;
161
+ this.checked = this.environmentConfig.checkboxTypes.checked;
162
+ this.error = this.environmentConfig.checkboxTypes.error;
163
+ }
164
+ _onClick() {
165
+ if (this.isBlocked)
166
+ return;
167
+ if (this.type === this.environmentConfig.checkboxTypes.indeterminate || this.type === this.environmentConfig.checkboxTypes.checked) {
168
+ this.type = undefined;
169
+ this.isChecked = false;
170
+ }
171
+ else if (this.type === this.environmentConfig.checkboxTypes.unchecked)
172
+ this.isChecked = false;
173
+ else
174
+ this.isChecked = !this.isChecked;
175
+ if (this.params) {
176
+ this.params.value = this.isChecked;
177
+ this.params.context.componentParent.selectedRowByChildComponent(this.params);
178
+ }
179
+ this.checkedEmitter.emit(this.isChecked); // it has to be refactor - working with object
180
+ this.onChange(this.isChecked); // it has to be refactor - working with object
181
+ }
182
+ getCheckboxClasses() {
183
+ let classes = ``;
184
+ if (this.type)
185
+ classes += `${this.type} `;
186
+ if (this.type !== this.environmentConfig.checkboxTypes.disabled)
187
+ classes += 'full-opacity ';
188
+ if (this.isChecked && !this.type)
189
+ classes += `checked `;
190
+ return classes.trim();
191
+ }
192
+ onChange = () => { };
193
+ onTouched = () => { };
194
+ writeValue(value) {
195
+ if (value === null || value === undefined)
196
+ return;
197
+ if (typeof value === 'boolean') {
198
+ this.isChecked = value;
199
+ return;
200
+ }
201
+ this.type = value.type;
202
+ this.isChecked = value.isChecked;
203
+ }
204
+ registerOnChange(fn) {
205
+ this.onChange = fn;
206
+ }
207
+ registerOnTouched(fn) {
208
+ this.onTouched = fn;
209
+ }
210
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumCheckboxComponent, deps: [{ token: HERUM_SHARED_CONFIG_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
211
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumCheckboxComponent, isStandalone: false, selector: "herum-checkbox", inputs: { type: "type", isChecked: "isChecked", isBlocked: "isBlocked" }, outputs: { checkedEmitter: "checkedEmitter" }, providers: [CUSTOM_CHECKBOX_VALUE_ACCESSOR], ngImport: i0, template: "<label class=\"custom-checkbox-container\" [ngClass]=\"isBlocked ? 'not-clickable' : 'cursor-pointer'\"\r\n (click)=\"_onClick()\">\r\n <span class=\"unchecked\" [ngClass]=\"getCheckboxClasses()\">\r\n <img *ngIf=\"(isChecked && !type) || type===checked\" class=\"custom-checkmark-image\"\r\n src=\"assets/shared/icons/V.svg\" alt=\"Custom Checkmark\">\r\n\r\n <img class=\"custom-checkmark-image d-block\" *ngIf=\"type===error\" src=\"assets/shared/icons/X.svg\"\r\n alt=\"Custom Checkmark\">\r\n\r\n <div *ngIf=\"type===indeterminate\" class=\"indeterminate-shape\"></div>\r\n </span>\r\n</label>", styles: [".custom-checkbox-container{display:flex;justify-content:center;margin:0}.unchecked{position:relative;opacity:.5;top:0;left:0;height:var(--herum-checkbox-size);width:var(--herum-checkbox-size);border-radius:2px;border:1px solid var(--secondary-color)}.custom-checkmark-image{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:9px}.custom-checkmark-image,.indeterminate-shape{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.indeterminate-shape{background:var(--primary-color);height:60%;width:60%;border-radius:1px}.indeterminate{border:1px solid var(--icons-color)}.checked{background:var(--primary-color)}.disabled{background:var(--disabled-background-color);border-color:var(--disabled-border-color)}.error,.checked{border:none!important}.error{background-color:var(--error-color)}.full-opacity{opacity:1}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
212
+ }
213
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumCheckboxComponent, decorators: [{
214
+ type: Component,
215
+ args: [{ standalone: false, selector: 'herum-checkbox', providers: [CUSTOM_CHECKBOX_VALUE_ACCESSOR], template: "<label class=\"custom-checkbox-container\" [ngClass]=\"isBlocked ? 'not-clickable' : 'cursor-pointer'\"\r\n (click)=\"_onClick()\">\r\n <span class=\"unchecked\" [ngClass]=\"getCheckboxClasses()\">\r\n <img *ngIf=\"(isChecked && !type) || type===checked\" class=\"custom-checkmark-image\"\r\n src=\"assets/shared/icons/V.svg\" alt=\"Custom Checkmark\">\r\n\r\n <img class=\"custom-checkmark-image d-block\" *ngIf=\"type===error\" src=\"assets/shared/icons/X.svg\"\r\n alt=\"Custom Checkmark\">\r\n\r\n <div *ngIf=\"type===indeterminate\" class=\"indeterminate-shape\"></div>\r\n </span>\r\n</label>", styles: [".custom-checkbox-container{display:flex;justify-content:center;margin:0}.unchecked{position:relative;opacity:.5;top:0;left:0;height:var(--herum-checkbox-size);width:var(--herum-checkbox-size);border-radius:2px;border:1px solid var(--secondary-color)}.custom-checkmark-image{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:9px}.custom-checkmark-image,.indeterminate-shape{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.indeterminate-shape{background:var(--primary-color);height:60%;width:60%;border-radius:1px}.indeterminate{border:1px solid var(--icons-color)}.checked{background:var(--primary-color)}.disabled{background:var(--disabled-background-color);border-color:var(--disabled-border-color)}.error,.checked{border:none!important}.error{background-color:var(--error-color)}.full-opacity{opacity:1}\n"] }]
216
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
217
+ type: Inject,
218
+ args: [HERUM_SHARED_CONFIG_TOKEN]
219
+ }] }], propDecorators: { type: [{
220
+ type: Input
221
+ }], isChecked: [{
222
+ type: Input
223
+ }], isBlocked: [{
224
+ type: Input
225
+ }], checkedEmitter: [{
226
+ type: Output
227
+ }] } });
228
+
229
+ const splitKey = 'וגם';
230
+ class HerumChipComponent {
231
+ title = '';
232
+ isDeleteButtonNeeded = true;
233
+ isActive = false;
234
+ isMenuMode = false;
235
+ type = 'regular';
236
+ remove = new EventEmitter();
237
+ chipsActivation = new EventEmitter();
238
+ _onRemove() {
239
+ this.remove.emit(true);
240
+ }
241
+ _onChipsSelect() {
242
+ if (this.isMenuMode)
243
+ this.isActive = !this.isActive;
244
+ this.chipsActivation.emit(this.isActive);
245
+ }
246
+ get splittedTitle() {
247
+ if (!this.isTitleToBeSplitted)
248
+ return null;
249
+ const titleParts = this.title.split(' ');
250
+ const splitKeyIndices = [];
251
+ titleParts.forEach((part, index) => {
252
+ if (part === splitKey)
253
+ splitKeyIndices.push(index);
254
+ });
255
+ let html = '';
256
+ let lastIndex = 0;
257
+ splitKeyIndices.forEach((index) => {
258
+ html += `<span>${titleParts.slice(lastIndex, index).join(' ')}</span>`;
259
+ html += ` <b>${titleParts[index]}</b> `;
260
+ lastIndex = index + 1;
261
+ });
262
+ html += `<span>${titleParts.slice(lastIndex).join(' ')}</span>`;
263
+ return html;
264
+ }
265
+ get isTitleToBeSplitted() {
266
+ return this.title?.includes(splitKey);
267
+ }
268
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
269
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumChipComponent, isStandalone: false, selector: "herum-chip", inputs: { title: "title", isDeleteButtonNeeded: "isDeleteButtonNeeded", isActive: "isActive", isMenuMode: "isMenuMode", type: "type" }, outputs: { remove: "remove", chipsActivation: "chipsActivation" }, ngImport: i0, template: "<div class=\"herum-chip-container\" [class]=\"type\" [ngClass]=\"{'active':isActive, 'menu-chip':isMenuMode}\" (click)=\"_onChipsSelect()\"\r\n dir=\"rtl\">\r\n\r\n <ng-container *ngIf=\"isTitleToBeSplitted; else defaultTitle\">\r\n <span [innerHTML]=\"splittedTitle | safeHtml\"></span>\r\n </ng-container>\r\n\r\n <ng-template #defaultTitle>{{title}}</ng-template>\r\n\r\n <img *ngIf=\"isDeleteButtonNeeded\" src=\"../../assets/general/secondary-x.svg\" (click)=\"_onRemove()\">\r\n</div>", styles: [".herum-chip-container{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;align-content:center;width:fit-content;gap:5px;padding:0 5px;background-color:transparent;color:var(--secondary-color);border:1px solid var(--secondary-color);border-radius:32px;box-shadow:0 0 6px #61606029}.herum-chip-container:hover{background-color:var(--hover-background)}.active{background-color:var(--secondary-color);color:#fff}.active:hover{background-color:var(--darker-secondary-color);color:#fff}.positive,.negative{color:var(--icons-color);border:1px solid var(--icons-color)}.menu-chip{cursor:pointer;font-size:12px;height:24px;text-align:center;justify-content:center;display:flex;padding:0 7px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "pipe", type: i4.SafeHtmlPipe, name: "safeHtml" }] });
270
+ }
271
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumChipComponent, decorators: [{
272
+ type: Component,
273
+ args: [{ standalone: false, selector: 'herum-chip', template: "<div class=\"herum-chip-container\" [class]=\"type\" [ngClass]=\"{'active':isActive, 'menu-chip':isMenuMode}\" (click)=\"_onChipsSelect()\"\r\n dir=\"rtl\">\r\n\r\n <ng-container *ngIf=\"isTitleToBeSplitted; else defaultTitle\">\r\n <span [innerHTML]=\"splittedTitle | safeHtml\"></span>\r\n </ng-container>\r\n\r\n <ng-template #defaultTitle>{{title}}</ng-template>\r\n\r\n <img *ngIf=\"isDeleteButtonNeeded\" src=\"../../assets/general/secondary-x.svg\" (click)=\"_onRemove()\">\r\n</div>", styles: [".herum-chip-container{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;align-content:center;width:fit-content;gap:5px;padding:0 5px;background-color:transparent;color:var(--secondary-color);border:1px solid var(--secondary-color);border-radius:32px;box-shadow:0 0 6px #61606029}.herum-chip-container:hover{background-color:var(--hover-background)}.active{background-color:var(--secondary-color);color:#fff}.active:hover{background-color:var(--darker-secondary-color);color:#fff}.positive,.negative{color:var(--icons-color);border:1px solid var(--icons-color)}.menu-chip{cursor:pointer;font-size:12px;height:24px;text-align:center;justify-content:center;display:flex;padding:0 7px}\n"] }]
274
+ }], propDecorators: { title: [{
275
+ type: Input
276
+ }], isDeleteButtonNeeded: [{
277
+ type: Input
278
+ }], isActive: [{
279
+ type: Input
280
+ }], isMenuMode: [{
281
+ type: Input
282
+ }], type: [{
283
+ type: Input
284
+ }], remove: [{
285
+ type: Output
286
+ }], chipsActivation: [{
287
+ type: Output
288
+ }] } });
289
+
290
+ const defaultFirstGradient = 'var(--icons-color)';
291
+ class HerumCircularProgressBarComponent {
292
+ percentage = 65;
293
+ fill = false;
294
+ size = 'default-size';
295
+ firstGradient = defaultFirstGradient;
296
+ fillColor = 'white';
297
+ showPercentage = false;
298
+ displayedContent;
299
+ displayedContentColorMatchesGradientColor = false;
300
+ ngOnChanges(changes) {
301
+ if (changes['percentage'])
302
+ this.displayedContent = this.displayedContent || this.percentage;
303
+ if (changes['firstGradient'])
304
+ this.firstGradient = this.firstGradient || defaultFirstGradient;
305
+ }
306
+ getGradientStyle() {
307
+ return this.fill ?
308
+ `radial-gradient(closest-side, transparent 79%, transparent 80% 100%), conic-gradient(${this.firstGradient} ${this.percentage}%, #1609291F 80%)` :
309
+ `radial-gradient(closest-side, ${this.fillColor} 79%, transparent 80% 100%), conic-gradient(${this.firstGradient} ${this.percentage}%, #1609291F 0)`;
310
+ }
311
+ get percentageText() {
312
+ return this.percentage >= 0 ? this.percentage : '-';
313
+ }
314
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumCircularProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
315
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumCircularProgressBarComponent, isStandalone: false, selector: "herum-circular-progress-bar", inputs: { percentage: "percentage", fill: "fill", size: "size", firstGradient: "firstGradient", fillColor: "fillColor", showPercentage: "showPercentage", displayedContent: "displayedContent", displayedContentColorMatchesGradientColor: "displayedContentColorMatchesGradientColor" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"progress-bar\" [ngClass]=\"size\" [style.background-image]=\"getGradientStyle()\">\r\n <span *ngIf=\"showPercentage\" class=\"percentage-text\"\r\n [style.color]=\"displayedContentColorMatchesGradientColor ? firstGradient : null\">{{ displayedContent }}</span>\r\n <progress value=\"38\" min=\"0\" max=\"100\" style=\"visibility:hidden;height:0;width:0;\"></progress>\r\n</div>", styles: [".progress-bar{border-radius:50%;position:relative;--default-size: 17px;--big-size: 60px}.progress-bar.default-size{width:var(--default-size);height:var(--default-size)}.progress-bar.big-size{width:var(--big-size);height:var(--big-size)}.progress-bar .percentage-text{background:var(--fliped-primary-color);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;direction:ltr!important;-webkit-text-fill-color:initial!important;position:absolute;font-size:22px;top:50%;left:50%;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
316
+ }
317
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumCircularProgressBarComponent, decorators: [{
318
+ type: Component,
319
+ args: [{ standalone: false, selector: 'herum-circular-progress-bar', template: "<div class=\"progress-bar\" [ngClass]=\"size\" [style.background-image]=\"getGradientStyle()\">\r\n <span *ngIf=\"showPercentage\" class=\"percentage-text\"\r\n [style.color]=\"displayedContentColorMatchesGradientColor ? firstGradient : null\">{{ displayedContent }}</span>\r\n <progress value=\"38\" min=\"0\" max=\"100\" style=\"visibility:hidden;height:0;width:0;\"></progress>\r\n</div>", styles: [".progress-bar{border-radius:50%;position:relative;--default-size: 17px;--big-size: 60px}.progress-bar.default-size{width:var(--default-size);height:var(--default-size)}.progress-bar.big-size{width:var(--big-size);height:var(--big-size)}.progress-bar .percentage-text{background:var(--fliped-primary-color);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;direction:ltr!important;-webkit-text-fill-color:initial!important;position:absolute;font-size:22px;top:50%;left:50%;transform:translate(-50%,-50%)}\n"] }]
320
+ }], propDecorators: { percentage: [{
321
+ type: Input
322
+ }], fill: [{
323
+ type: Input
324
+ }], size: [{
325
+ type: Input
326
+ }], firstGradient: [{
327
+ type: Input
328
+ }], fillColor: [{
329
+ type: Input
330
+ }], showPercentage: [{
331
+ type: Input
332
+ }], displayedContent: [{
333
+ type: Input
334
+ }], displayedContentColorMatchesGradientColor: [{
335
+ type: Input
336
+ }] } });
337
+
338
+ class HerumDatePickerComponent {
339
+ elementRef;
340
+ dateAdapter;
341
+ changeDetectorRef;
342
+ activeColor = 'green';
343
+ hoverColor = 'yellow';
344
+ minDate;
345
+ rangeMode = false;
346
+ selectedDate = new Date();
347
+ dateChange = new EventEmitter();
348
+ calendar;
349
+ hostElement;
350
+ startDate;
351
+ endDate;
352
+ matCalendarContainerHeight;
353
+ constructor(elementRef, dateAdapter, changeDetectorRef) {
354
+ this.elementRef = elementRef;
355
+ this.dateAdapter = dateAdapter;
356
+ this.changeDetectorRef = changeDetectorRef;
357
+ this.hostElement = this.elementRef.nativeElement;
358
+ }
359
+ ngOnChanges(changes) {
360
+ if (this.hostElement)
361
+ this.setStyleProperties(changes);
362
+ if (changes['selectedDate']?.currentValue)
363
+ this.handleSelectedDateChange();
364
+ }
365
+ setStyleProperties(changes) {
366
+ if (changes['activeColor']?.currentValue)
367
+ this.hostElement.style.setProperty(calendarActiveColorCssVariable, this.activeColor);
368
+ if (changes['hoverColor']?.currentValue)
369
+ this.hostElement.style.setProperty(calendarHoverColorCssVariable, this.hoverColor);
370
+ }
371
+ handleSelectedDateChange() {
372
+ if (this.calendar && this.selectedDate instanceof Date)
373
+ this.calendar.activeDate = this.selectedDate;
374
+ if (this.selectedDate instanceof DateRange) {
375
+ this.setRangeDates(this.selectedDate.start);
376
+ this.setRangeDates(this.selectedDate.end);
377
+ if (this.calendar)
378
+ this.calendar.activeDate = this.startDate;
379
+ }
380
+ }
381
+ ngAfterViewInit() {
382
+ this.setMatCalendarContainerHeight();
383
+ this.changeDetectorRef.detectChanges();
384
+ }
385
+ setMatCalendarContainerHeight() {
386
+ const calendarHeight = this.hostElement.querySelector(calendarLibrarySelector)?.clientHeight;
387
+ const cellHeight = this.hostElement.querySelector(calendarLibraryBodyCellSelector)?.clientHeight;
388
+ // if (calendarHeight && cellHeight)
389
+ // this.matCalendarContainerHeight = calendarHeight + cellHeight;
390
+ }
391
+ _onSelectedDateChange(date) {
392
+ if (!this.rangeMode) {
393
+ this.handleSingleDateMode(date);
394
+ return;
395
+ }
396
+ this.handleRangeMode(date);
397
+ }
398
+ handleSingleDateMode(date) {
399
+ this.selectedDate = date;
400
+ this.dateChange.emit(date);
401
+ }
402
+ handleRangeMode(date) {
403
+ this.setRangeDates(date);
404
+ this.selectedDate = new DateRange(this.startDate, this.endDate);
405
+ if (this.startDate && this.endDate)
406
+ this.dateChange.emit(this.selectedDate);
407
+ }
408
+ setRangeDates(date) {
409
+ if (!date)
410
+ return;
411
+ if (!this.startDate) {
412
+ this.startDate = date;
413
+ return;
414
+ }
415
+ ;
416
+ if (!this.endDate && this.dateAdapter.compareDate(date, this.startDate) >= 0) {
417
+ this.endDate = date;
418
+ return;
419
+ }
420
+ ;
421
+ this.startDate = date;
422
+ this.endDate = null;
423
+ }
424
+ _minDateFilter = (date) => {
425
+ if (!this.minDate)
426
+ return true;
427
+ return date >= this.minDate;
428
+ };
429
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumDatePickerComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.DateAdapter }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
430
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumDatePickerComponent, isStandalone: false, selector: "herum-date-picker", inputs: { activeColor: "activeColor", hoverColor: "hoverColor", minDate: "minDate", rangeMode: "rangeMode", selectedDate: "selectedDate" }, outputs: { dateChange: "dateChange" }, viewQueries: [{ propertyName: "calendar", first: true, predicate: ["calendar"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div [ngStyle]=\"{ 'height.px': matCalendarContainerHeight }\">\r\n <mat-calendar #calendar [dateFilter]=\"_minDateFilter\" [selected]=\"selectedDate\"\r\n (selectedChange)=\"_onSelectedDateChange($event)\">\r\n </mat-calendar>\r\n</div>", styles: [":host{--active-calendar-color: var(--primary-color);--hover-calendar-color: var(--hovered-item-background-color)}::ng-deep .mat-calendar-body-selected{background:var(--active-calendar-color)!important;color:var(--light-text-color)!important}::ng-deep .mat-button{padding-inline:0!important}::ng-deep .mat-calendar-body-label{font-size:var(--standard-font-size)}::ng-deep .mat-calendar-content{padding-block-end:0px!important}::ng-deep .mat-calendar-body-today.mat-calendar-body-selected{box-shadow:inset 0 0 #fff!important}::ng-deep .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical),::ng-deep .mat-calendar-body-in-range:before{background-color:var(--hover-calendar-color)!important}::ng-deep .mat-calendar-header{padding:0!important}::ng-deep .mat-calendar-controls{display:flex;margin:0!important;margin-block-end:20px!important}::ng-deep .mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,::ng-deep .mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:1!important}::ng-deep .mat-button-wrapper{position:relative!important;z-index:1!important}::ng-deep .mat-button-focus-overlay,::ng-deep .mat-button-focus-overlay:active{background:transparent!important;background-color:var(--hover-calendar-color)!important}::ng-deep .mat-calendar-body-cell-content,::ng-deep .mat-calendar-table-header th,::ng-deep .mat-calendar-body-label,::ng-deep .mat-button-wrapper{color:var(--title-color)}::ng-deep .mat-calendar-body-cell-content{border-style:none!important;line-height:0!important;border-radius:var(--border-radius)!important}::ng-deep .mat-calendar-table-header-divider:after{background:var(--table-border-color)}::ng-deep .mat-calendar-body-disabled>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){color:var(--disabled-text-color)}::ng-deep .mat-calendar-body-range-start:before,::ng-deep .mat-calendar-body-range-end:after{left:0%!important;background:var(--active-calendar-color)!important}::ng-deep .mat-calendar-body-range-start:before{border-top-right-radius:var(--border-radius)!important;border-bottom-right-radius:var(--border-radius)!important}::ng-deep .mat-calendar-body-range-end:after{border-top-left-radius:var(--border-radius)!important;border-bottom-left-radius:var(--border-radius)!important}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3.MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }] });
431
+ }
432
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumDatePickerComponent, decorators: [{
433
+ type: Component,
434
+ args: [{ standalone: false, selector: 'herum-date-picker', template: "<div [ngStyle]=\"{ 'height.px': matCalendarContainerHeight }\">\r\n <mat-calendar #calendar [dateFilter]=\"_minDateFilter\" [selected]=\"selectedDate\"\r\n (selectedChange)=\"_onSelectedDateChange($event)\">\r\n </mat-calendar>\r\n</div>", styles: [":host{--active-calendar-color: var(--primary-color);--hover-calendar-color: var(--hovered-item-background-color)}::ng-deep .mat-calendar-body-selected{background:var(--active-calendar-color)!important;color:var(--light-text-color)!important}::ng-deep .mat-button{padding-inline:0!important}::ng-deep .mat-calendar-body-label{font-size:var(--standard-font-size)}::ng-deep .mat-calendar-content{padding-block-end:0px!important}::ng-deep .mat-calendar-body-today.mat-calendar-body-selected{box-shadow:inset 0 0 #fff!important}::ng-deep .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical),::ng-deep .mat-calendar-body-in-range:before{background-color:var(--hover-calendar-color)!important}::ng-deep .mat-calendar-header{padding:0!important}::ng-deep .mat-calendar-controls{display:flex;margin:0!important;margin-block-end:20px!important}::ng-deep .mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,::ng-deep .mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:1!important}::ng-deep .mat-button-wrapper{position:relative!important;z-index:1!important}::ng-deep .mat-button-focus-overlay,::ng-deep .mat-button-focus-overlay:active{background:transparent!important;background-color:var(--hover-calendar-color)!important}::ng-deep .mat-calendar-body-cell-content,::ng-deep .mat-calendar-table-header th,::ng-deep .mat-calendar-body-label,::ng-deep .mat-button-wrapper{color:var(--title-color)}::ng-deep .mat-calendar-body-cell-content{border-style:none!important;line-height:0!important;border-radius:var(--border-radius)!important}::ng-deep .mat-calendar-table-header-divider:after{background:var(--table-border-color)}::ng-deep .mat-calendar-body-disabled>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){color:var(--disabled-text-color)}::ng-deep .mat-calendar-body-range-start:before,::ng-deep .mat-calendar-body-range-end:after{left:0%!important;background:var(--active-calendar-color)!important}::ng-deep .mat-calendar-body-range-start:before{border-top-right-radius:var(--border-radius)!important;border-bottom-right-radius:var(--border-radius)!important}::ng-deep .mat-calendar-body-range-end:after{border-top-left-radius:var(--border-radius)!important;border-bottom-left-radius:var(--border-radius)!important}\n"] }]
435
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$1.DateAdapter }, { type: i0.ChangeDetectorRef }], propDecorators: { activeColor: [{
436
+ type: Input
437
+ }], hoverColor: [{
438
+ type: Input
439
+ }], minDate: [{
440
+ type: Input
441
+ }], rangeMode: [{
442
+ type: Input
443
+ }], selectedDate: [{
444
+ type: Input
445
+ }], dateChange: [{
446
+ type: Output
447
+ }], calendar: [{
448
+ type: ViewChild,
449
+ args: ['calendar']
450
+ }] } });
451
+
452
+ class HerumDownloadFileComponent {
453
+ fileId;
454
+ filePath = '';
455
+ linkText = 'להורדת הקובץ';
456
+ downloadFile = new EventEmitter();
457
+ downloadFileElement;
458
+ ngAfterViewInit() {
459
+ if (this.downloadFileElement && this.filePath)
460
+ this.downloadFileElement.nativeElement.setAttribute('href', this.filePath);
461
+ }
462
+ _onDownloadFile(fileId) {
463
+ if (this.filePath)
464
+ return;
465
+ this.downloadFile.emit(fileId);
466
+ }
467
+ get downloadFileSvgString() {
468
+ return svgsStrings.downloadFile;
469
+ }
470
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumDownloadFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
471
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumDownloadFileComponent, isStandalone: false, selector: "herum-download-file", inputs: { fileId: "fileId", filePath: "filePath", linkText: "linkText" }, outputs: { downloadFile: "downloadFile" }, viewQueries: [{ propertyName: "downloadFileElement", first: true, predicate: ["downloadFile"], descendants: true }], ngImport: i0, template: "<a #downloadFile class=\"download-file\" (click)=\"_onDownloadFile(fileId)\">\r\n <span class=\"download-file-icon\" [innerHTML]=\"downloadFileSvgString | safeHtml\"></span>\r\n <span class=\"clickable-text\">{{ linkText }}</span>\r\n</a>", styles: [".download-file{display:flex;gap:8px;flex-wrap:wrap;align-content:center;text-decoration:none}.download-file .download-file-icon{width:16px;height:100%;stroke:var(--icons-color)}\n"], dependencies: [{ kind: "pipe", type: i4.SafeHtmlPipe, name: "safeHtml" }] });
472
+ }
473
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumDownloadFileComponent, decorators: [{
474
+ type: Component,
475
+ args: [{ standalone: false, selector: 'herum-download-file', template: "<a #downloadFile class=\"download-file\" (click)=\"_onDownloadFile(fileId)\">\r\n <span class=\"download-file-icon\" [innerHTML]=\"downloadFileSvgString | safeHtml\"></span>\r\n <span class=\"clickable-text\">{{ linkText }}</span>\r\n</a>", styles: [".download-file{display:flex;gap:8px;flex-wrap:wrap;align-content:center;text-decoration:none}.download-file .download-file-icon{width:16px;height:100%;stroke:var(--icons-color)}\n"] }]
476
+ }], propDecorators: { fileId: [{
477
+ type: Input
478
+ }], filePath: [{
479
+ type: Input
480
+ }], linkText: [{
481
+ type: Input
482
+ }], downloadFile: [{
483
+ type: Output
484
+ }], downloadFileElement: [{
485
+ type: ViewChild,
486
+ args: ['downloadFile']
487
+ }] } });
488
+
489
+ class HerumEllipsisLoaderComponent {
490
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumEllipsisLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
491
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumEllipsisLoaderComponent, isStandalone: false, selector: "herum-ellipsis-loader", ngImport: i0, template: "<div class=\"herum-ellipsis\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n</div>", styles: [".herum-ellipsis,.herum-ellipsis div{box-sizing:border-box}.herum-ellipsis{display:inline-block;position:relative;width:40px;height:40px;margin:auto}.herum-ellipsis div{position:absolute;top:18px;width:9.33333px;height:9.33333px;border-radius:50%;background:#fff;animation-timing-function:cubic-bezier(0,1,1,0)}.herum-ellipsis div:nth-child(1){left:8px;animation:herum-ellipsis1 .6s infinite}.herum-ellipsis div:nth-child(2){left:4px;animation:herum-ellipsis2 .6s infinite}.herum-ellipsis div:nth-child(3){left:16px;animation:herum-ellipsis2 .6s infinite}.herum-ellipsis div:nth-child(4){left:28px;animation:herum-ellipsis3 .6s infinite}@keyframes herum-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes herum-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes herum-ellipsis2{0%{transform:translate(0)}to{transform:translate(12px)}}\n"] });
492
+ }
493
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumEllipsisLoaderComponent, decorators: [{
494
+ type: Component,
495
+ args: [{ standalone: false, selector: 'herum-ellipsis-loader', template: "<div class=\"herum-ellipsis\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n</div>", styles: [".herum-ellipsis,.herum-ellipsis div{box-sizing:border-box}.herum-ellipsis{display:inline-block;position:relative;width:40px;height:40px;margin:auto}.herum-ellipsis div{position:absolute;top:18px;width:9.33333px;height:9.33333px;border-radius:50%;background:#fff;animation-timing-function:cubic-bezier(0,1,1,0)}.herum-ellipsis div:nth-child(1){left:8px;animation:herum-ellipsis1 .6s infinite}.herum-ellipsis div:nth-child(2){left:4px;animation:herum-ellipsis2 .6s infinite}.herum-ellipsis div:nth-child(3){left:16px;animation:herum-ellipsis2 .6s infinite}.herum-ellipsis div:nth-child(4){left:28px;animation:herum-ellipsis3 .6s infinite}@keyframes herum-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes herum-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes herum-ellipsis2{0%{transform:translate(0)}to{transform:translate(12px)}}\n"] }]
496
+ }] });
497
+
498
+ class HerumFormControl extends FormControl {
499
+ errorMessages = {};
500
+ currentErrorMessage = '';
501
+ destroySubject$ = new Subject();
502
+ /**
503
+ @comment The component that creates this class should have destroySubject$ so you can listen to its ngOnDestroy life cycle hook so you can unsubscribe statusChangesSubscription
504
+ */
505
+ constructor(formState, validatorOrOpts, asyncValidator, errorMessages, componentReference) {
506
+ super(formState, validatorOrOpts, asyncValidator);
507
+ if (errorMessages)
508
+ this.errorMessages = errorMessages;
509
+ this.statusChanges.pipe(takeUntil(this.destroySubject$)).subscribe(() => this.setCurrentErrorMessage());
510
+ componentReference.destroySubject$.pipe(takeUntil(this.destroySubject$)).subscribe(() => {
511
+ this.destroySubject$.next(null);
512
+ this.destroySubject$.complete();
513
+ });
514
+ }
515
+ setCurrentErrorMessage() {
516
+ this.currentErrorMessage = this.errors ? this.errorMessages[Object.keys(this.errors)[0]] : null;
517
+ }
518
+ }
519
+
520
+ class HerumIconLabelComponent {
521
+ iconPath = '';
522
+ isLoading = false;
523
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumIconLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
524
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumIconLabelComponent, isStandalone: false, selector: "herum-icon-label", inputs: { iconPath: "iconPath", isLoading: "isLoading" }, ngImport: i0, template: "<div class=\"label-container\">\r\n <img [src]=\"iconPath\">\r\n <p class=\"m-0\" [ngClass]=\"{'content-skeleton': isLoading, 'skeleton': isLoading}\">\r\n <ng-content *ngIf=\"!isLoading\"></ng-content>\r\n </p>\r\n</div>", styles: [".label-container{align-items:center;display:flex;gap:10px;flex-direction:row}.content-skeleton{width:50px;height:18px;border-radius:var(--border-radius)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
525
+ }
526
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumIconLabelComponent, decorators: [{
527
+ type: Component,
528
+ args: [{ standalone: false, selector: 'herum-icon-label', template: "<div class=\"label-container\">\r\n <img [src]=\"iconPath\">\r\n <p class=\"m-0\" [ngClass]=\"{'content-skeleton': isLoading, 'skeleton': isLoading}\">\r\n <ng-content *ngIf=\"!isLoading\"></ng-content>\r\n </p>\r\n</div>", styles: [".label-container{align-items:center;display:flex;gap:10px;flex-direction:row}.content-skeleton{width:50px;height:18px;border-radius:var(--border-radius)}\n"] }]
529
+ }], propDecorators: { iconPath: [{
530
+ type: Input
531
+ }], isLoading: [{
532
+ type: Input
533
+ }] } });
534
+
535
+ class HerumIndeterminateComponent {
536
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumIndeterminateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
537
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumIndeterminateComponent, isStandalone: false, selector: "app-herum-indeterminate", ngImport: i0, template: "<div class=\"checkbox-wrapper-48\">\r\n <label><input type=\"checkbox\" name=\"cb\"></label>\r\n</div>", styles: [".checkbox-wrapper-48 label{font-size:1.35em}.checkbox-wrapper-48 input{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:1em;height:1em;font:inherit;border:.1em solid var(--secondary-color);margin-bottom:-.125em}.checkbox-wrapper-48 input[type=checkbox]{border-radius:.25em}.checkbox-wrapper-48 input:checked{border-color:transparent;background:var(--primary-color) border-box;box-shadow:0 0 0 .1em inset #fff}\n"] });
538
+ }
539
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumIndeterminateComponent, decorators: [{
540
+ type: Component,
541
+ args: [{ standalone: false, selector: 'app-herum-indeterminate', template: "<div class=\"checkbox-wrapper-48\">\r\n <label><input type=\"checkbox\" name=\"cb\"></label>\r\n</div>", styles: [".checkbox-wrapper-48 label{font-size:1.35em}.checkbox-wrapper-48 input{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:1em;height:1em;font:inherit;border:.1em solid var(--secondary-color);margin-bottom:-.125em}.checkbox-wrapper-48 input[type=checkbox]{border-radius:.25em}.checkbox-wrapper-48 input:checked{border-color:transparent;background:var(--primary-color) border-box;box-shadow:0 0 0 .1em inset #fff}\n"] }]
542
+ }] });
543
+
544
+ class ConditionalFormControlNameDirective {
545
+ el;
546
+ renderer;
547
+ ngControl;
548
+ set formControlName(value) {
549
+ this.controlName = value;
550
+ this.updateFormControlName();
551
+ }
552
+ controlName;
553
+ constructor(el, renderer, ngControl) {
554
+ this.el = el;
555
+ this.renderer = renderer;
556
+ this.ngControl = ngControl;
557
+ }
558
+ ngOnInit() {
559
+ this.updateFormControlName();
560
+ }
561
+ updateFormControlName() {
562
+ if (this.controlName && this.ngControl) {
563
+ this.renderer.setAttribute(this.el.nativeElement, 'formControlName', this.controlName);
564
+ }
565
+ else {
566
+ this.renderer.removeAttribute(this.el.nativeElement, 'formControlName');
567
+ }
568
+ }
569
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ConditionalFormControlNameDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1$2.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
570
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.17", type: ConditionalFormControlNameDirective, isStandalone: false, selector: "[appConditionalFormControlName]", inputs: { formControlName: ["appConditionalFormControlName", "formControlName"] }, ngImport: i0 });
571
+ }
572
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ConditionalFormControlNameDirective, decorators: [{
573
+ type: Directive,
574
+ args: [{
575
+ standalone: false,
576
+ selector: '[appConditionalFormControlName]'
577
+ }]
578
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1$2.NgControl }], propDecorators: { formControlName: [{
579
+ type: Input,
580
+ args: ['appConditionalFormControlName']
581
+ }] } });
582
+
583
+ const emptyNumberInputValue = '0';
584
+ const numericTextType = 'numeric-text';
585
+ class HerumInputFieldComponent {
586
+ ngControl;
587
+ cdr;
588
+ type = 'text';
589
+ placeholder = defaultPlaceholder$1;
590
+ disabled = false;
591
+ isBlocked = false;
592
+ isValid = true;
593
+ errorMsg = '';
594
+ showErrorMsgGap = true;
595
+ inputValue = '';
596
+ isLoading = false;
597
+ id = '';
598
+ debounceTime = 0;
599
+ minValue;
600
+ maxValue;
601
+ isBlurred = false;
602
+ touched = false;
603
+ ltrMode = false;
604
+ preventMacroKeysPressEvent = [keyboardAsciiCodes.space, keyboardAsciiCodes.right, keyboardAsciiCodes.left];
605
+ inputValueEmitter = new EventEmitter();
606
+ inputElement;
607
+ onKeyPress(event) {
608
+ const alt = event.target.alt;
609
+ if ((alt === types.number || alt === numericTextType) && !(event.keyCode >= 48 && event.keyCode <= 57))
610
+ event.preventDefault();
611
+ }
612
+ onPaste(event) {
613
+ const alt = event.target.alt;
614
+ if (alt === types.number || alt === numericTextType) {
615
+ let pastedText = '';
616
+ if (event.clipboardData && event.clipboardData.getData)
617
+ pastedText = event.clipboardData.getData('text/plain');
618
+ else if (window['clipboardData'] && window['clipboardData']['getData'])
619
+ pastedText = window['clipboardData']['getData']('Text');
620
+ const numbersOnly = /^[0-9]*$/.test(pastedText);
621
+ if (!numbersOnly)
622
+ event.preventDefault();
623
+ }
624
+ }
625
+ formControlName = '';
626
+ isPasswordVisible = false;
627
+ inputSubject$ = new Subject();
628
+ destroySubject$ = new Subject();
629
+ constructor(ngControl, cdr) {
630
+ this.ngControl = ngControl;
631
+ this.cdr = cdr;
632
+ if (this.ngControl)
633
+ this.ngControl.valueAccessor = this;
634
+ }
635
+ ngOnInit() {
636
+ this.initInputSubject$();
637
+ this.setInputsByFormControl();
638
+ }
639
+ initInputSubject$() {
640
+ this.inputSubject$.pipe(takeUntil(this.destroySubject$), debounceTime(this.debounceTime), tap(value => {
641
+ this.inputValue = value;
642
+ const valueToEmit = this.type === types.number ? Number(value) : this.inputValue;
643
+ this.onChange(valueToEmit);
644
+ this.inputValueEmitter.emit(valueToEmit);
645
+ })).subscribe();
646
+ }
647
+ setInputsByFormControl() {
648
+ if (!this.ngControl)
649
+ return;
650
+ if (this.ngControl instanceof FormControlName)
651
+ this.formControlName = this.ngControl.name?.toString() || '';
652
+ this.ngControl.control.statusChanges.pipe(takeUntil(this.destroySubject$)).subscribe(status => {
653
+ if (this.ngControl.control instanceof HerumFormControl)
654
+ this.errorMsg = this.ngControl.control.currentErrorMessage;
655
+ const controlStatus = this.ngControl.control.status;
656
+ this.isValid = controlStatus === formStatuses.valid;
657
+ this.isLoading = controlStatus === formStatuses.pending;
658
+ });
659
+ }
660
+ clearInput() {
661
+ const isTypeNumber = this.type === types.number;
662
+ this.inputValue = isTypeNumber ? this.minValue !== undefined ? this.minValue.toString() : emptyNumberInputValue : '';
663
+ const valueToEmit = isTypeNumber ? Number(this.inputValue) : this.inputValue;
664
+ this.inputValueEmitter.emit(valueToEmit);
665
+ this.onChange(valueToEmit);
666
+ }
667
+ _onInput(freeText) {
668
+ this.touched = true;
669
+ let value = freeText;
670
+ if (this.type == types.number) {
671
+ if (!freeText) {
672
+ this.cdr.detectChanges();
673
+ this.inputValue = value = emptyNumberInputValue;
674
+ }
675
+ if (!freeText.match(regexExpressions.digitsOnly))
676
+ value = value.replace(/[^0-9]/g, '');
677
+ this.errorMsg = this.getRangeErrorMessage(freeText);
678
+ this.isValid = !this.errorMsg;
679
+ if (this.ngControl)
680
+ this.setNgControlRangeValidator();
681
+ if (!this.isValid)
682
+ return;
683
+ }
684
+ this.inputSubject$.next(value);
685
+ }
686
+ setNgControlRangeValidator() {
687
+ const inputNumberRangeValidatorName = 'inputNumberRangeValidator';
688
+ if (!this.isValid) {
689
+ this.ngControl.control.setErrors({ [inputNumberRangeValidatorName]: this.isValid });
690
+ return;
691
+ }
692
+ if (this.ngControl.control.errors)
693
+ delete this.ngControl.control.errors[inputNumberRangeValidatorName];
694
+ }
695
+ getRangeErrorMessage(freeText) {
696
+ const parsedValue = parseFloat(freeText);
697
+ const hasMinValue = Number.isFinite(this.minValue);
698
+ const hasMaxValue = Number.isFinite(this.maxValue);
699
+ const insertValue = 'נא להזין ערך';
700
+ if (hasMinValue && hasMaxValue && (parsedValue < this.minValue || parsedValue > this.maxValue))
701
+ return (this.minValue === this.maxValue) ? `הערך שניתן להזין הוא${this.maxValue}` : `${insertValue} מ ${this.minValue} עד ${this.maxValue}`;
702
+ else if (hasMinValue && !hasMaxValue && parsedValue <= this.minValue - 1)
703
+ return `${insertValue} גדול מ${this.minValue - 1}`;
704
+ else if (!hasMinValue && hasMaxValue && parsedValue >= this.maxValue + 1)
705
+ return `${insertValue} קטן מ${this.maxValue + 1}`;
706
+ else
707
+ return '';
708
+ }
709
+ onChange = () => { };
710
+ onTouched = () => { };
711
+ writeValue(value) {
712
+ if (this.inputValue !== value)
713
+ this.inputValue = value;
714
+ }
715
+ registerOnChange(fn) {
716
+ this.onChange = fn;
717
+ }
718
+ registerOnTouched(fn) {
719
+ this.onTouched = fn;
720
+ }
721
+ _setBlurred() {
722
+ this.isBlurred = true;
723
+ }
724
+ _onTogglePasswordVisibility(event) {
725
+ event?.preventDefault();
726
+ event?.stopPropagation();
727
+ this.isPasswordVisible = !this.isPasswordVisible;
728
+ }
729
+ get searchImageSvg() {
730
+ return svgsStrings.search;
731
+ }
732
+ get whiteSearchImageSvg() {
733
+ return svgsStrings.search;
734
+ }
735
+ get xImageSvg() {
736
+ return svgsStrings.X;
737
+ }
738
+ get inputHtmlType() {
739
+ if (this.type === 'password')
740
+ return this.isPasswordVisible ? 'text' : 'password';
741
+ if (this.type === 'number')
742
+ return 'number';
743
+ return 'text';
744
+ }
745
+ get passwordEyeSource() {
746
+ return `/assets/loginPage/icons/eye-${this.isPasswordVisible ? 'open' : 'closed'}.svg`;
747
+ }
748
+ get isRequired() {
749
+ const control = this.ngControl?.control;
750
+ if (!control)
751
+ return false;
752
+ const anyControl = control;
753
+ if (typeof anyControl.hasValidator === 'function') {
754
+ return anyControl.hasValidator(Validators.required);
755
+ }
756
+ if (!control.validator)
757
+ return false;
758
+ const result = control.validator({});
759
+ return !!result['required'];
760
+ }
761
+ get shouldShowClearIcon() {
762
+ return !!this.inputValue && !this.disabled && !this.isBlocked && this.type !== 'password';
763
+ }
764
+ get shouldShowPasswordToggle() {
765
+ return this.type === 'password' && !this.disabled && !this.isBlocked;
766
+ }
767
+ get shouldShowErrorMsg() {
768
+ return (!this.isValid && this.touched && this.isBlurred && this.showErrorMsgGap && !!this.errorMsg);
769
+ }
770
+ ngOnDestroy() {
771
+ if (this.ngControl) {
772
+ this.destroySubject$.next(null);
773
+ this.destroySubject$.complete();
774
+ }
775
+ }
776
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumInputFieldComponent, deps: [{ token: i1$2.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
777
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumInputFieldComponent, isStandalone: false, selector: "herum-input-field", inputs: { type: "type", placeholder: "placeholder", disabled: "disabled", isBlocked: "isBlocked", isValid: "isValid", errorMsg: "errorMsg", showErrorMsgGap: "showErrorMsgGap", inputValue: "inputValue", isLoading: "isLoading", id: "id", debounceTime: "debounceTime", minValue: "minValue", maxValue: "maxValue", isBlurred: "isBlurred", touched: "touched", ltrMode: "ltrMode", preventMacroKeysPressEvent: "preventMacroKeysPressEvent" }, outputs: { inputValueEmitter: "inputValueEmitter" }, host: { listeners: { "keypress": "onKeyPress($event)", "paste": "onPaste($event)" }, properties: { "class.required-control": "isRequired" } }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }], ngImport: i0, template: "<div class=\"input-container\" [class]=\"type\">\r\n <input [type]=\"inputHtmlType\" dir=\"rtl\" class=\"w-100 input-field\"\r\n [ngClass]=\"{'error-input':!isValid && !isLoading && touched && isBlurred , 'transparent-text': isLoading, 'ltr':ltrMode}\"\r\n [ngStyle]=\"{'resize': type == 'textBox' ? 'vertical' : 'none'}\" [placeholder]=\"placeholder\"\r\n [disabled]=\"disabled || isBlocked || isLoading\" [(ngModel)]=\"inputValue\" [alt]=\"type\"\r\n [id]=\"id ? id :formControlName\" [attr.prevent-macro-keys-press-event]=\"preventMacroKeysPressEvent\"\r\n (ngModelChange)=\"_onInput($event)\" (blur)=\"_setBlurred()\" />\r\n\r\n <ng-container *ngIf=\"!isLoading\">\r\n <ng-container *ngIf=\"type=='search' || type=='search-blur'\">\r\n <span class=\"icon\" [innerHTML]=\"searchImageSvg | safeHtml\" *ngIf=\"!inputValue && !disabled\">\r\n </span>\r\n\r\n <span class=\"icon\" *ngIf=\"disabled\">\r\n <img src=\"assets/shared/icons/input/grey-search.png\" />\r\n </span>\r\n </ng-container>\r\n\r\n <span class=\"icon clickable small-icon\" *ngIf=\"shouldShowClearIcon\" (click)=\"clearInput()\">\r\n <span class=\"small-icon\" [innerHTML]=\"xImageSvg | safeHtml\"></span>\r\n </span>\r\n\r\n <span class=\"icon clickable eye-icon\" *ngIf=\"shouldShowPasswordToggle\"\r\n (mousedown)=\"$event.preventDefault()\" (click)=\"_onTogglePasswordVisibility($event)\">\r\n <img [src]=\"passwordEyeSource\">\r\n </span>\r\n </ng-container>\r\n\r\n <div *ngIf=\"isLoading\" class=\"skeleton skeleton-text input-skeleton\"></div>\r\n</div>\r\n\r\n<label class=\"error-msg right\" *ngIf=\"shouldShowErrorMsg\">\r\n {{errorMsg}}\r\n</label>", styles: [":host{--icon-size: 16px}.input-container .icon{position:absolute;left:12px;cursor:pointer}.icon{stroke:var(--icons-color);height:var(--icon-size);width:var(--icon-size)}.small-icon{fill:var(--icons-color);height:9px}.icon img{width:var(--icon-size);height:var(--icon-size);display:block}.eye-icon{display:inline-flex;align-items:center;justify-content:center}.input-field:disabled{opacity:.6;cursor:not-allowed}.input-skeleton{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:90%}.search-blur input{border:1px solid rgba(255,255,255,.6)!important;background-color:#ffffff39!important;color:#fff!important}.search-blur input::placeholder{color:#fff!important}.search-blur .icon,.search-blur .small-icon{stroke:#fff!important}\n", ".input-container{position:relative;display:flex;align-items:center}.input-container .input-field{padding:8px 12px 8px 30px;color:#000;height:var(--atom-input-height)}.input-field{border:1px solid var(--inactive-border-color);padding:var(--button-padding-size);border-radius:var(--border-radius);font-size:var(--standard-font-size);box-shadow:0 0 var(--box-shadow-blur) #00000029!important}.input-field:hover{border-color:var(--icons-color-light-2)}.input-field:focus{outline:none;border-color:var(--icons-color-light-1);box-shadow:0 0 5px var(--icons-color-light-1)}.input-field::placeholder{color:var(--disabled-text-color)}span{justify-content:center;display:flex}img{height:16px}.right{justify-content:right}.error-input,.error-input:focus{border-color:var(--error-color)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$2.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: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "pipe", type: i4.SafeHtmlPipe, name: "safeHtml" }] });
778
+ }
779
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumInputFieldComponent, decorators: [{
780
+ type: Component,
781
+ args: [{ standalone: false, selector: 'herum-input-field', host: { '[class.required-control]': 'isRequired' }, template: "<div class=\"input-container\" [class]=\"type\">\r\n <input [type]=\"inputHtmlType\" dir=\"rtl\" class=\"w-100 input-field\"\r\n [ngClass]=\"{'error-input':!isValid && !isLoading && touched && isBlurred , 'transparent-text': isLoading, 'ltr':ltrMode}\"\r\n [ngStyle]=\"{'resize': type == 'textBox' ? 'vertical' : 'none'}\" [placeholder]=\"placeholder\"\r\n [disabled]=\"disabled || isBlocked || isLoading\" [(ngModel)]=\"inputValue\" [alt]=\"type\"\r\n [id]=\"id ? id :formControlName\" [attr.prevent-macro-keys-press-event]=\"preventMacroKeysPressEvent\"\r\n (ngModelChange)=\"_onInput($event)\" (blur)=\"_setBlurred()\" />\r\n\r\n <ng-container *ngIf=\"!isLoading\">\r\n <ng-container *ngIf=\"type=='search' || type=='search-blur'\">\r\n <span class=\"icon\" [innerHTML]=\"searchImageSvg | safeHtml\" *ngIf=\"!inputValue && !disabled\">\r\n </span>\r\n\r\n <span class=\"icon\" *ngIf=\"disabled\">\r\n <img src=\"assets/shared/icons/input/grey-search.png\" />\r\n </span>\r\n </ng-container>\r\n\r\n <span class=\"icon clickable small-icon\" *ngIf=\"shouldShowClearIcon\" (click)=\"clearInput()\">\r\n <span class=\"small-icon\" [innerHTML]=\"xImageSvg | safeHtml\"></span>\r\n </span>\r\n\r\n <span class=\"icon clickable eye-icon\" *ngIf=\"shouldShowPasswordToggle\"\r\n (mousedown)=\"$event.preventDefault()\" (click)=\"_onTogglePasswordVisibility($event)\">\r\n <img [src]=\"passwordEyeSource\">\r\n </span>\r\n </ng-container>\r\n\r\n <div *ngIf=\"isLoading\" class=\"skeleton skeleton-text input-skeleton\"></div>\r\n</div>\r\n\r\n<label class=\"error-msg right\" *ngIf=\"shouldShowErrorMsg\">\r\n {{errorMsg}}\r\n</label>", styles: [":host{--icon-size: 16px}.input-container .icon{position:absolute;left:12px;cursor:pointer}.icon{stroke:var(--icons-color);height:var(--icon-size);width:var(--icon-size)}.small-icon{fill:var(--icons-color);height:9px}.icon img{width:var(--icon-size);height:var(--icon-size);display:block}.eye-icon{display:inline-flex;align-items:center;justify-content:center}.input-field:disabled{opacity:.6;cursor:not-allowed}.input-skeleton{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:90%}.search-blur input{border:1px solid rgba(255,255,255,.6)!important;background-color:#ffffff39!important;color:#fff!important}.search-blur input::placeholder{color:#fff!important}.search-blur .icon,.search-blur .small-icon{stroke:#fff!important}\n", ".input-container{position:relative;display:flex;align-items:center}.input-container .input-field{padding:8px 12px 8px 30px;color:#000;height:var(--atom-input-height)}.input-field{border:1px solid var(--inactive-border-color);padding:var(--button-padding-size);border-radius:var(--border-radius);font-size:var(--standard-font-size);box-shadow:0 0 var(--box-shadow-blur) #00000029!important}.input-field:hover{border-color:var(--icons-color-light-2)}.input-field:focus{outline:none;border-color:var(--icons-color-light-1);box-shadow:0 0 5px var(--icons-color-light-1)}.input-field::placeholder{color:var(--disabled-text-color)}span{justify-content:center;display:flex}img{height:16px}.right{justify-content:right}.error-input,.error-input:focus{border-color:var(--error-color)}\n"] }]
782
+ }], ctorParameters: () => [{ type: i1$2.NgControl, decorators: [{
783
+ type: Optional
784
+ }, {
785
+ type: Self
786
+ }] }, { type: i0.ChangeDetectorRef }], propDecorators: { type: [{
787
+ type: Input
788
+ }], placeholder: [{
789
+ type: Input
790
+ }], disabled: [{
791
+ type: Input
792
+ }], isBlocked: [{
793
+ type: Input
794
+ }], isValid: [{
795
+ type: Input
796
+ }], errorMsg: [{
797
+ type: Input
798
+ }], showErrorMsgGap: [{
799
+ type: Input
800
+ }], inputValue: [{
801
+ type: Input
802
+ }], isLoading: [{
803
+ type: Input
804
+ }], id: [{
805
+ type: Input
806
+ }], debounceTime: [{
807
+ type: Input
808
+ }], minValue: [{
809
+ type: Input
810
+ }], maxValue: [{
811
+ type: Input
812
+ }], isBlurred: [{
813
+ type: Input
814
+ }], touched: [{
815
+ type: Input
816
+ }], ltrMode: [{
817
+ type: Input
818
+ }], preventMacroKeysPressEvent: [{
819
+ type: Input
820
+ }], inputValueEmitter: [{
821
+ type: Output
822
+ }], inputElement: [{
823
+ type: ViewChild,
824
+ args: ['inputElement']
825
+ }], onKeyPress: [{
826
+ type: HostListener,
827
+ args: ['keypress', ['$event']]
828
+ }], onPaste: [{
829
+ type: HostListener,
830
+ args: ['paste', ['$event']]
831
+ }] } });
832
+
833
+ class HerumLogoComponent {
834
+ logoTextSize = 'defaultSize';
835
+ logoTextColor = 'primaryColor';
836
+ logoText = 'בית הספר הדיגיטלי לחירום';
837
+ get logoTextWidth() {
838
+ return this.logoTextSize === 'defaultSize' ? 'default-text-size-width' : 'big-text-size-width';
839
+ }
840
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumLogoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
841
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumLogoComponent, isStandalone: false, selector: "herum-logo", inputs: { logoTextSize: "logoTextSize", logoTextColor: "logoTextColor", logoText: "logoText" }, ngImport: i0, template: "<div class=\"logo-container\">\r\n <img src=\"/lib/assets/general/owl-logo.svg\" id=\"logo\">\r\n <span class=\"logo-text\" [ngClass]=\"[logoTextSize, logoTextColor, logoTextWidth]\">{{logoText}}</span>\r\n</div>", styles: [".logo-container{display:flex;align-items:center;gap:8px}.logo-text{font-size:14px;color:var(--icons-color);font-weight:700}#logo{width:3vh}.default-text-size-width{width:9vw}.big-text-size-width{width:100%}.primaryColor{color:var(--icons-color)}.secondaryColor{color:var(--text-color)}.bigSize{font-size:24px}.defaultSize{font-size:.8vw}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
842
+ }
843
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumLogoComponent, decorators: [{
844
+ type: Component,
845
+ args: [{ standalone: false, selector: 'herum-logo', template: "<div class=\"logo-container\">\r\n <img src=\"/lib/assets/general/owl-logo.svg\" id=\"logo\">\r\n <span class=\"logo-text\" [ngClass]=\"[logoTextSize, logoTextColor, logoTextWidth]\">{{logoText}}</span>\r\n</div>", styles: [".logo-container{display:flex;align-items:center;gap:8px}.logo-text{font-size:14px;color:var(--icons-color);font-weight:700}#logo{width:3vh}.default-text-size-width{width:9vw}.big-text-size-width{width:100%}.primaryColor{color:var(--icons-color)}.secondaryColor{color:var(--text-color)}.bigSize{font-size:24px}.defaultSize{font-size:.8vw}\n"] }]
846
+ }], propDecorators: { logoTextSize: [{
847
+ type: Input
848
+ }], logoTextColor: [{
849
+ type: Input
850
+ }], logoText: [{
851
+ type: Input
852
+ }] } });
853
+
854
+ class HerumOptionsListComponent {
855
+ options;
856
+ selectedOptions;
857
+ isContentInsideExpendablePanel = false;
858
+ isInternalMode = true;
859
+ selectedOptionsEmitter = new EventEmitter();
860
+ _onSelect(option) {
861
+ this.selectedOptionsEmitter.emit(option);
862
+ }
863
+ isOptionSelected(option) {
864
+ if (!option)
865
+ return false;
866
+ return this.selectedOptions.some(selectedOption => selectedOption.id === option.id);
867
+ }
868
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumOptionsListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
869
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumOptionsListComponent, isStandalone: false, selector: "herum-options-list", inputs: { options: "options", selectedOptions: "selectedOptions", isContentInsideExpendablePanel: "isContentInsideExpendablePanel", isInternalMode: "isInternalMode" }, outputs: { selectedOptionsEmitter: "selectedOptionsEmitter" }, ngImport: i0, template: "<a class=\"option\" *ngFor=\"let option of options\" (click)=\"_onSelect(option)\"\r\n [ngClass]=\"{\r\n 'selected': isOptionSelected(option),\r\n 'expendable-panel-content': isContentInsideExpendablePanel,\r\n 'internal': isInternalMode}\">\r\n {{ option?.name }}\r\n</a>", styles: [".option{color:#000;padding:12px;text-decoration:none;display:block;font-size:var(--standard-font-size)}.option:hover{background-color:var(--hover-background);cursor:pointer}.selected{color:var(--icons-color)!important;font-weight:bolder}\n", ".drop-button{display:flex;background-color:var(--light-background-color);color:var(--disabled-text-color);border:none;cursor:pointer;border-radius:var(--border-radius);box-shadow:0 0 var(--box-shadow-blur) #00000029!important;text-align:right;font-size:var(--standard-font-size);align-items:center;justify-content:space-between}.responsive,.responsive-dropdown{width:100%}.default,.big,.default-dropdown,.big-dropdown{min-width:300px}.responsive,.default,.big{padding:16px}.responsive,.default{height:var(--atom-input-height)}.big{height:42px}.fit,.fit-dropdown{min-width:180px}.min,.min-dropdown{min-width:95px}.fit,.min{padding:8px}.drop-button:hover,.drop-button:focus{outline:1px solid var(--icons-color-light-2)}.dropdown{position:relative;display:inline-block}button{position:relative}::ng-deep .dropdown-content{position:absolute;background-color:#fff;box-shadow:0 1px 4px #0000002b;z-index:10;min-width:120px}.open-drop-button-downwards,.open-drop-button-upwards{box-shadow:0 0 var(--box-shadow-blur) #00000029!important}.open-drop-button-downwards{border-radius:var(--border-radius) var(--border-radius) 0 0}.open-drop-button-upwards{border-radius:0 0 var(--border-radius) var(--border-radius)}.dropdown-downwards{border-top:1px solid var(--chips-divider-color);border-radius:0 0 var(--border-radius) var(--border-radius)}.dropdown-upwards{border-bottom:1px solid var(--chips-divider-color);border-radius:var(--border-radius) var(--border-radius) 0 0;top:0}.dropdown-content a{color:#000;padding:6px 16px;text-decoration:none;display:block;font-size:var(--standard-font-size)}.dropdown a:hover{background-color:var(--hover-background);cursor:pointer}.shevron-icon{cursor:pointer;color:var(--icons-color)!important;transition:transform .3s ease}.selected{color:var(--icons-color)!important;font-weight:bolder}.input-filter{height:36px;display:block}.scrollable-settings{max-height:164px;overflow-y:auto}.fixed{position:fixed}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
870
+ }
871
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumOptionsListComponent, decorators: [{
872
+ type: Component,
873
+ args: [{ standalone: false, selector: 'herum-options-list', template: "<a class=\"option\" *ngFor=\"let option of options\" (click)=\"_onSelect(option)\"\r\n [ngClass]=\"{\r\n 'selected': isOptionSelected(option),\r\n 'expendable-panel-content': isContentInsideExpendablePanel,\r\n 'internal': isInternalMode}\">\r\n {{ option?.name }}\r\n</a>", styles: [".option{color:#000;padding:12px;text-decoration:none;display:block;font-size:var(--standard-font-size)}.option:hover{background-color:var(--hover-background);cursor:pointer}.selected{color:var(--icons-color)!important;font-weight:bolder}\n", ".drop-button{display:flex;background-color:var(--light-background-color);color:var(--disabled-text-color);border:none;cursor:pointer;border-radius:var(--border-radius);box-shadow:0 0 var(--box-shadow-blur) #00000029!important;text-align:right;font-size:var(--standard-font-size);align-items:center;justify-content:space-between}.responsive,.responsive-dropdown{width:100%}.default,.big,.default-dropdown,.big-dropdown{min-width:300px}.responsive,.default,.big{padding:16px}.responsive,.default{height:var(--atom-input-height)}.big{height:42px}.fit,.fit-dropdown{min-width:180px}.min,.min-dropdown{min-width:95px}.fit,.min{padding:8px}.drop-button:hover,.drop-button:focus{outline:1px solid var(--icons-color-light-2)}.dropdown{position:relative;display:inline-block}button{position:relative}::ng-deep .dropdown-content{position:absolute;background-color:#fff;box-shadow:0 1px 4px #0000002b;z-index:10;min-width:120px}.open-drop-button-downwards,.open-drop-button-upwards{box-shadow:0 0 var(--box-shadow-blur) #00000029!important}.open-drop-button-downwards{border-radius:var(--border-radius) var(--border-radius) 0 0}.open-drop-button-upwards{border-radius:0 0 var(--border-radius) var(--border-radius)}.dropdown-downwards{border-top:1px solid var(--chips-divider-color);border-radius:0 0 var(--border-radius) var(--border-radius)}.dropdown-upwards{border-bottom:1px solid var(--chips-divider-color);border-radius:var(--border-radius) var(--border-radius) 0 0;top:0}.dropdown-content a{color:#000;padding:6px 16px;text-decoration:none;display:block;font-size:var(--standard-font-size)}.dropdown a:hover{background-color:var(--hover-background);cursor:pointer}.shevron-icon{cursor:pointer;color:var(--icons-color)!important;transition:transform .3s ease}.selected{color:var(--icons-color)!important;font-weight:bolder}.input-filter{height:36px;display:block}.scrollable-settings{max-height:164px;overflow-y:auto}.fixed{position:fixed}\n"] }]
874
+ }], propDecorators: { options: [{
875
+ type: Input
876
+ }], selectedOptions: [{
877
+ type: Input
878
+ }], isContentInsideExpendablePanel: [{
879
+ type: Input
880
+ }], isInternalMode: [{
881
+ type: Input
882
+ }], selectedOptionsEmitter: [{
883
+ type: Output
884
+ }] } });
885
+
886
+ class HerumRecursiveHierarchyOptionsListComponent {
887
+ options;
888
+ selectedOptions;
889
+ recursiveTitledOption;
890
+ selectedOptionsEmitter = new EventEmitter();
891
+ selectedRecursiveOptionsEmitter = new EventEmitter();
892
+ _onSelect(option) {
893
+ this.selectedOptionsEmitter.emit(option.data);
894
+ this.selectedRecursiveOptionsEmitter.emit(option);
895
+ }
896
+ _isOptionSelected(option) {
897
+ return this.selectedOptions.some(selectedOption => selectedOption.id === option.id);
898
+ }
899
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumRecursiveHierarchyOptionsListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
900
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumRecursiveHierarchyOptionsListComponent, isStandalone: false, selector: "herum-recursive-hierarchy-options-list", inputs: { options: "options", selectedOptions: "selectedOptions", recursiveTitledOption: "recursiveTitledOption" }, outputs: { selectedOptionsEmitter: "selectedOptionsEmitter", selectedRecursiveOptionsEmitter: "selectedRecursiveOptionsEmitter" }, ngImport: i0, template: "<ng-container *ngTemplateOutlet=\"recursiveTitledOptionTemplate; context:{ $implicit: recursiveTitledOption }\">\r\n</ng-container>\r\n\r\n<ng-template #recursiveTitledOptionTemplate let-recursiveTitledOption>\r\n <ng-container>\r\n <div class=\"option-container internal\">\r\n <img src=\"../../assets/general/chevron.svg\" class=\"internal\"\r\n *ngIf=\"recursiveTitledOption.childrens.length > 0\"\r\n [class]=\"recursiveTitledOption.isExpended ? 'open' : 'closed'\"\r\n (click)=\"recursiveTitledOption.isExpended=!recursiveTitledOption.isExpended\">\r\n <a class=\"option internal w-100\" (click)=\"_onSelect(recursiveTitledOption)\"\r\n [ngClass]=\"{'selected': _isOptionSelected(recursiveTitledOption)}\">\r\n {{recursiveTitledOption.data.name}}\r\n </a>\r\n </div>\r\n\r\n <ng-container *ngIf=\"recursiveTitledOption.isExpended\">\r\n <div class=\"childrens\">\r\n <ng-container *ngFor=\"let children of recursiveTitledOption.childrens\">\r\n <ng-container *ngTemplateOutlet=\"recursiveTitledOptionTemplate; context:{ $implicit: children }\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>", styles: [".option-container{display:flex;align-items:center;padding-right:8px}.closed{cursor:pointer;transform:rotate(90deg)}.open{cursor:pointer;transform:rotate(0)}.option{color:#000;padding:12px;text-decoration:none;display:block;font-size:var(--standard-font-size)}.option:hover{background-color:var(--hover-background);cursor:pointer}.selected{color:var(--icons-color)!important;font-weight:bolder}.childrens{padding-right:16px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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"] }] });
901
+ }
902
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumRecursiveHierarchyOptionsListComponent, decorators: [{
903
+ type: Component,
904
+ args: [{ standalone: false, selector: 'herum-recursive-hierarchy-options-list', template: "<ng-container *ngTemplateOutlet=\"recursiveTitledOptionTemplate; context:{ $implicit: recursiveTitledOption }\">\r\n</ng-container>\r\n\r\n<ng-template #recursiveTitledOptionTemplate let-recursiveTitledOption>\r\n <ng-container>\r\n <div class=\"option-container internal\">\r\n <img src=\"../../assets/general/chevron.svg\" class=\"internal\"\r\n *ngIf=\"recursiveTitledOption.childrens.length > 0\"\r\n [class]=\"recursiveTitledOption.isExpended ? 'open' : 'closed'\"\r\n (click)=\"recursiveTitledOption.isExpended=!recursiveTitledOption.isExpended\">\r\n <a class=\"option internal w-100\" (click)=\"_onSelect(recursiveTitledOption)\"\r\n [ngClass]=\"{'selected': _isOptionSelected(recursiveTitledOption)}\">\r\n {{recursiveTitledOption.data.name}}\r\n </a>\r\n </div>\r\n\r\n <ng-container *ngIf=\"recursiveTitledOption.isExpended\">\r\n <div class=\"childrens\">\r\n <ng-container *ngFor=\"let children of recursiveTitledOption.childrens\">\r\n <ng-container *ngTemplateOutlet=\"recursiveTitledOptionTemplate; context:{ $implicit: children }\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>", styles: [".option-container{display:flex;align-items:center;padding-right:8px}.closed{cursor:pointer;transform:rotate(90deg)}.open{cursor:pointer;transform:rotate(0)}.option{color:#000;padding:12px;text-decoration:none;display:block;font-size:var(--standard-font-size)}.option:hover{background-color:var(--hover-background);cursor:pointer}.selected{color:var(--icons-color)!important;font-weight:bolder}.childrens{padding-right:16px}\n"] }]
905
+ }], propDecorators: { options: [{
906
+ type: Input
907
+ }], selectedOptions: [{
908
+ type: Input
909
+ }], recursiveTitledOption: [{
910
+ type: Input
911
+ }], selectedOptionsEmitter: [{
912
+ type: Output
913
+ }], selectedRecursiveOptionsEmitter: [{
914
+ type: Output
915
+ }] } });
916
+
917
+ const CUSTOM_MULTI_SELECT_CONTROL_VALUE_ACCESSOR = {
918
+ provide: NG_VALUE_ACCESSOR,
919
+ useExisting: forwardRef(() => HerumMultiSelectComponent),
920
+ multi: true,
921
+ };
922
+ const selectedOptionsInput = 'selectedOptionsInput';
923
+ const optionsInput$1 = 'options';
924
+ const titledOptionsList = 'titledOptionsList';
925
+ class HerumMultiSelectComponent {
926
+ onClick(event) {
927
+ this.closeDropdown(event);
928
+ }
929
+ placeholder = 'בחר/י...';
930
+ options;
931
+ titledOptionsList;
932
+ recursiveTitledOption;
933
+ selectedOptionsInput;
934
+ maxChips = 2;
935
+ disabled = false;
936
+ size = 'default';
937
+ isDropDownInPositionFixed = false;
938
+ dropDownDirection = 'downwards';
939
+ isMultiHeads = false;
940
+ selectedOptions = new EventEmitter();
941
+ selectedRecursiveOptions = new EventEmitter();
942
+ filterInput;
943
+ dropContainer;
944
+ filteredOptions;
945
+ filteredTitledOptionsList;
946
+ selectedOptionsValue = [];
947
+ isDropdownOpen = false;
948
+ isShowAll = false;
949
+ currentDropdownId = '';
950
+ destroySubject$ = new Subject();
951
+ componentId = '';
952
+ ngOnChanges(changes) {
953
+ if (changes[selectedOptionsInput] && changes[selectedOptionsInput].currentValue?.length && !this.selectedOptionsValue.length)
954
+ this.selectedOptionsValue = changes[selectedOptionsInput].currentValue;
955
+ if (changes[optionsInput$1] && changes[optionsInput$1].currentValue?.length && !this.filteredOptions)
956
+ this.filteredOptions = changes[optionsInput$1].currentValue;
957
+ if (changes[titledOptionsList] && changes[titledOptionsList].currentValue?.length)
958
+ this.filteredTitledOptionsList = changes[titledOptionsList].currentValue;
959
+ }
960
+ ngAfterViewInit() {
961
+ this.componentId = v4();
962
+ this.dropContainer.nativeElement.id += `component-id-${this.componentId}`;
963
+ }
964
+ _onStopPropagation(event) {
965
+ event.stopPropagation();
966
+ }
967
+ _onFilterDropDown(text) {
968
+ if (!text) {
969
+ this.setFilteredOptionsTypes();
970
+ return;
971
+ }
972
+ this.getFilteredOptions(text);
973
+ }
974
+ setFilteredOptionsTypes() {
975
+ if (this.options)
976
+ this.filteredOptions = this.options;
977
+ else if (this.filteredTitledOptionsList) {
978
+ this.filteredTitledOptionsList = this.titledOptionsList.map(titledOptions => ({
979
+ title: titledOptions.title,
980
+ options: titledOptions.options
981
+ }));
982
+ }
983
+ }
984
+ getFilteredOptions(text) {
985
+ if (this.titledOptionsList) {
986
+ this.filteredTitledOptionsList = this.titledOptionsList.map(titledOptions => ({
987
+ title: titledOptions.title,
988
+ options: this.getFilteredList(titledOptions.options, text)
989
+ }));
990
+ }
991
+ else
992
+ this.filteredOptions = this.options.filter(filteredOption => filteredOption.name.includes(text));
993
+ }
994
+ getFilteredList(options, text) {
995
+ return options.filter(option => option?.name.includes(text));
996
+ }
997
+ _select(option) {
998
+ this.resetFiltering();
999
+ if (this.selectedOptionsValue.find((selectedOption) => selectedOption.id === option.id))
1000
+ this.removeSelectedOption(option);
1001
+ else
1002
+ this.selectedOptionsValue.push(option);
1003
+ this.onChange(this.selectedOptionsValue);
1004
+ this.selectedOptions.emit(this.selectedOptionsValue);
1005
+ }
1006
+ _selectRecursive(selectedRecursiveOptions) {
1007
+ this.selectedRecursiveOptions.emit(selectedRecursiveOptions);
1008
+ }
1009
+ removeSelectedOption(option) {
1010
+ const index = this.selectedOptionsValue.findIndex(((selectedOption) => selectedOption.id === option.id));
1011
+ if (index >= 0)
1012
+ this.selectedOptionsValue.splice(index, 1);
1013
+ this.onChange(this.selectedOptionsValue);
1014
+ this.selectedOptions.emit(this.selectedOptionsValue);
1015
+ }
1016
+ getLimitedList() {
1017
+ if (this.selectedOptionsValue?.length < this.maxChips)
1018
+ return this.selectedOptionsValue;
1019
+ return this.selectedOptionsValue.slice(0, this.maxChips);
1020
+ }
1021
+ _getHiddenOptions() {
1022
+ return this.selectedOptionsValue.map(selectedOptionValue => selectedOptionValue.name).slice(this.maxChips).join(',');
1023
+ }
1024
+ showAll() {
1025
+ this.isShowAll = !this.isShowAll;
1026
+ }
1027
+ isOptionSelected(option) {
1028
+ return this.selectedOptionsValue.find((selectedOption) => selectedOption.id === option.id);
1029
+ }
1030
+ toggleDropdown() {
1031
+ this.isDropdownOpen = !this.isDropdownOpen;
1032
+ }
1033
+ closeDropdown(event) {
1034
+ if (!this.isDropdownOpen)
1035
+ return;
1036
+ const isClickedOutsideComponent = event.composedPath().some(path => path.id?.includes(this.componentId));
1037
+ if (!event.target.matches('.internal') || !isClickedOutsideComponent) {
1038
+ this.isDropdownOpen = false;
1039
+ if (this.filterInput)
1040
+ this.resetFiltering();
1041
+ }
1042
+ }
1043
+ resetFiltering() {
1044
+ this.filterInput?.clearInput();
1045
+ this.filteredOptions = this.options;
1046
+ }
1047
+ get dropdownClasses() {
1048
+ let classes = `dropdown-content dropdown-${this.dropDownDirection} ${this.size}-dropdown`;
1049
+ if (this.isDropDownInPositionFixed)
1050
+ classes += ' fixed';
1051
+ classes += (this.filteredOptions?.length || this.filteredTitledOptionsList?.length) ? ' scrollable-settings' :
1052
+ (Array.isArray(this.recursiveTitledOption) && this.recursiveTitledOption?.length) ? ' big-scroll-view' : ' overflow-hidden';
1053
+ return classes;
1054
+ }
1055
+ hasNoResults() {
1056
+ if (this.titledOptionsList)
1057
+ return this.filteredTitledOptionsList?.every(filteredTitledOptions => filteredTitledOptions.options.length === 0);
1058
+ return !this.filteredOptions?.length && !this.recursiveTitledOption;
1059
+ }
1060
+ get optionsLength() {
1061
+ if (this.titledOptionsList) {
1062
+ let optionsList = this.titledOptionsList?.map(titledOptions => titledOptions.options);
1063
+ return optionsList.reduce((total, currentArray) => { return total + currentArray.length; }, 0);
1064
+ }
1065
+ return this.options?.length;
1066
+ }
1067
+ get _getDropdownStates() {
1068
+ return getDropdownAnimationStates(this.isDropdownOpen, this.dropDownDirection);
1069
+ }
1070
+ onChange = () => { };
1071
+ onTouched = () => { };
1072
+ writeValue(selectedOptionsValue) {
1073
+ this.selectedOptionsValue = selectedOptionsValue || [];
1074
+ }
1075
+ registerOnChange(fn) {
1076
+ this.onChange = fn;
1077
+ }
1078
+ registerOnTouched(fn) {
1079
+ this.onTouched = fn;
1080
+ }
1081
+ showErrors() { }
1082
+ ngOnDestroy() {
1083
+ this.destroySubject$.next(null);
1084
+ this.destroySubject$.complete();
1085
+ }
1086
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumMultiSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1087
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumMultiSelectComponent, isStandalone: false, selector: "herum-multi-select", inputs: { placeholder: "placeholder", options: "options", titledOptionsList: "titledOptionsList", recursiveTitledOption: "recursiveTitledOption", selectedOptionsInput: "selectedOptionsInput", maxChips: "maxChips", disabled: "disabled", size: "size", isDropDownInPositionFixed: "isDropDownInPositionFixed", dropDownDirection: "dropDownDirection", isMultiHeads: "isMultiHeads" }, outputs: { selectedOptions: "selectedOptions", selectedRecursiveOptions: "selectedRecursiveOptions" }, host: { listeners: { "window:click": "onClick($event)" } }, providers: [CUSTOM_MULTI_SELECT_CONTROL_VALUE_ACCESSOR], viewQueries: [{ propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true }, { propertyName: "dropContainer", first: true, predicate: ["dropContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #dropContainer class=\"dropdown\" dir=\"rtl\" [ngClass]=\"{'w-100': size === 'responsive'}\">\r\n <button class=\"drop-button internal\" [class]=\"size\"\r\n [ngClass]=\"(isDropdownOpen ? 'open-drop-button-' + dropDownDirection : '')\" (click)=\"toggleDropdown()\">\r\n <span class=\"button-placeholder internal\" *ngIf=\"!selectedOptionsValue?.length\">{{placeholder}}</span>\r\n\r\n <div class=\"herum-chips-container\">\r\n <herum-chip *ngFor=\"let option of getLimitedList()\" [title]=\"option.name\"\r\n (remove)=\"removeSelectedOption(option)\"></herum-chip>\r\n\r\n <ng-container *ngIf=\"selectedOptionsValue && selectedOptionsValue.length > maxChips\">\r\n <herum-chip class=\"last-chip\" [matTooltip]=\"_getHiddenOptions()\"\r\n [title]=\"(selectedOptionsValue.length - maxChips) + '+'\" [isDeleteButtonNeeded]=\"false\">\r\n </herum-chip>\r\n </ng-container>\r\n </div>\r\n\r\n <span class=\"shevron-icon internal\" [ngClass]=\"{'rotate-chevron': isDropdownOpen}\">\r\n <svg class=\"internal\" xmlns=\"http://www.w3.org/2000/svg\" width=\"11.299\" height=\"6.649\" viewBox=\"0 0 11.299 6.649\">\r\n <path id=\"Vector_43-2\" data-name=\"Vector 43-2\" d=\"M1006.235,549.5,1002,553.735l-4.236-4.235\"\r\n transform=\"translate(-996.35 -548.086)\" fill=\"none\" stroke=\"var(--icons-color)\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" />\r\n </svg>\r\n </span>\r\n </button>\r\n\r\n <div id=\"myDropdown\" class=\"internal\" [ngClass]=\"dropdownClasses\" [@openClose]=\"_getDropdownStates\">\r\n <herum-input-field #filterInput *ngIf=\"optionsLength>2\" class=\"input-filter\" [type]=\"'search'\"\r\n [placeholder]=\"'\u05D7\u05E4\u05E9/\u05D9 \u05E2\u05E8\u05DA \u05DE\u05D1\u05D5\u05E7\u05E9...'\" (click)=\"_onStopPropagation($event)\"\r\n (inputValueEmitter)=\"_onFilterDropDown($event)\"></herum-input-field>\r\n\r\n <ng-container *ngIf=\"options\">\r\n <herum-options-list [options]=\"filteredOptions\" [selectedOptions]=\"selectedOptionsValue\"\r\n (selectedOptionsEmitter)=\"_select($event)\">\r\n </herum-options-list>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"titledOptionsList\">\r\n <ng-container *ngFor=\"let filteredTitledOptions of filteredTitledOptionsList\">\r\n <herum-expendable-panel [title]=\"filteredTitledOptions.title\" [isBoldTitle]=\"true\">\r\n <herum-options-list [options]=\"filteredTitledOptions.options\"\r\n [isContentInsideExpendablePanel]=\"true\" [selectedOptions]=\"selectedOptionsValue\"\r\n (selectedOptionsEmitter)=\"_select($event)\"></herum-options-list>\r\n </herum-expendable-panel>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"recursiveTitledOption\">\r\n <ng-container *ngIf=\"isMultiHeads\">\r\n <herum-recursive-hierarchy-options-list *ngFor=\"let treeHead of recursiveTitledOption\"\r\n [recursiveTitledOption]=\"treeHead\" [selectedOptions]=\"selectedOptionsValue\"\r\n (selectedOptionsEmitter)=\"_select($event)\"\r\n (selectedRecursiveOptionsEmitter)=\"_selectRecursive($event)\">\r\n </herum-recursive-hierarchy-options-list>\r\n </ng-container>\r\n\r\n <herum-recursive-hierarchy-options-list *ngIf=\"!isMultiHeads\"\r\n [recursiveTitledOption]=\"recursiveTitledOption\" [selectedOptions]=\"selectedOptionsValue\"\r\n (selectedOptionsEmitter)=\"_select($event)\">\r\n </herum-recursive-hierarchy-options-list>\r\n </ng-container>\r\n\r\n <a class=\"text-center\" *ngIf=\"hasNoResults()\">\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D5 \u05EA\u05D5\u05E6\u05D0\u05D5\u05EA</a>\r\n </div>\r\n</div>", styles: [".drop-button{gap:8px}.button-placeholder{color:var(--disabled-text-color)}.last-chip{margin-inline-end:20px}.herum-chips-container{display:flex;gap:8px}.big-scroll-view{overflow-y:auto;max-height:600px}\n", ".drop-button{display:flex;background-color:var(--light-background-color);color:var(--disabled-text-color);border:none;cursor:pointer;border-radius:var(--border-radius);box-shadow:0 0 var(--box-shadow-blur) #00000029!important;text-align:right;font-size:var(--standard-font-size);align-items:center;justify-content:space-between}.responsive,.responsive-dropdown{width:100%}.default,.big,.default-dropdown,.big-dropdown{min-width:300px}.responsive,.default,.big{padding:16px}.responsive,.default{height:var(--atom-input-height)}.big{height:42px}.fit,.fit-dropdown{min-width:180px}.min,.min-dropdown{min-width:95px}.fit,.min{padding:8px}.drop-button:hover,.drop-button:focus{outline:1px solid var(--icons-color-light-2)}.dropdown{position:relative;display:inline-block}button{position:relative}::ng-deep .dropdown-content{position:absolute;background-color:#fff;box-shadow:0 1px 4px #0000002b;z-index:10;min-width:120px}.open-drop-button-downwards,.open-drop-button-upwards{box-shadow:0 0 var(--box-shadow-blur) #00000029!important}.open-drop-button-downwards{border-radius:var(--border-radius) var(--border-radius) 0 0}.open-drop-button-upwards{border-radius:0 0 var(--border-radius) var(--border-radius)}.dropdown-downwards{border-top:1px solid var(--chips-divider-color);border-radius:0 0 var(--border-radius) var(--border-radius)}.dropdown-upwards{border-bottom:1px solid var(--chips-divider-color);border-radius:var(--border-radius) var(--border-radius) 0 0;top:0}.dropdown-content a{color:#000;padding:6px 16px;text-decoration:none;display:block;font-size:var(--standard-font-size)}.dropdown a:hover{background-color:var(--hover-background);cursor:pointer}.shevron-icon{cursor:pointer;color:var(--icons-color)!important;transition:transform .3s ease}.selected{color:var(--icons-color)!important;font-weight:bolder}.input-filter{height:36px;display:block}.scrollable-settings{max-height:164px;overflow-y:auto}.fixed{position:fixed}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: HerumChipComponent, selector: "herum-chip", inputs: ["title", "isDeleteButtonNeeded", "isActive", "isMenuMode", "type"], outputs: ["remove", "chipsActivation"] }, { kind: "component", type: HerumInputFieldComponent, selector: "herum-input-field", inputs: ["type", "placeholder", "disabled", "isBlocked", "isValid", "errorMsg", "showErrorMsgGap", "inputValue", "isLoading", "id", "debounceTime", "minValue", "maxValue", "isBlurred", "touched", "ltrMode", "preventMacroKeysPressEvent"], outputs: ["inputValueEmitter"] }, { kind: "component", type: HerumOptionsListComponent, selector: "herum-options-list", inputs: ["options", "selectedOptions", "isContentInsideExpendablePanel", "isInternalMode"], outputs: ["selectedOptionsEmitter"] }, { kind: "component", type: HerumRecursiveHierarchyOptionsListComponent, selector: "herum-recursive-hierarchy-options-list", inputs: ["options", "selectedOptions", "recursiveTitledOption"], outputs: ["selectedOptionsEmitter", "selectedRecursiveOptionsEmitter"] }], animations: [openClose] });
1088
+ }
1089
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumMultiSelectComponent, decorators: [{
1090
+ type: Component,
1091
+ args: [{ standalone: false, selector: 'herum-multi-select', providers: [CUSTOM_MULTI_SELECT_CONTROL_VALUE_ACCESSOR], animations: [openClose], template: "<div #dropContainer class=\"dropdown\" dir=\"rtl\" [ngClass]=\"{'w-100': size === 'responsive'}\">\r\n <button class=\"drop-button internal\" [class]=\"size\"\r\n [ngClass]=\"(isDropdownOpen ? 'open-drop-button-' + dropDownDirection : '')\" (click)=\"toggleDropdown()\">\r\n <span class=\"button-placeholder internal\" *ngIf=\"!selectedOptionsValue?.length\">{{placeholder}}</span>\r\n\r\n <div class=\"herum-chips-container\">\r\n <herum-chip *ngFor=\"let option of getLimitedList()\" [title]=\"option.name\"\r\n (remove)=\"removeSelectedOption(option)\"></herum-chip>\r\n\r\n <ng-container *ngIf=\"selectedOptionsValue && selectedOptionsValue.length > maxChips\">\r\n <herum-chip class=\"last-chip\" [matTooltip]=\"_getHiddenOptions()\"\r\n [title]=\"(selectedOptionsValue.length - maxChips) + '+'\" [isDeleteButtonNeeded]=\"false\">\r\n </herum-chip>\r\n </ng-container>\r\n </div>\r\n\r\n <span class=\"shevron-icon internal\" [ngClass]=\"{'rotate-chevron': isDropdownOpen}\">\r\n <svg class=\"internal\" xmlns=\"http://www.w3.org/2000/svg\" width=\"11.299\" height=\"6.649\" viewBox=\"0 0 11.299 6.649\">\r\n <path id=\"Vector_43-2\" data-name=\"Vector 43-2\" d=\"M1006.235,549.5,1002,553.735l-4.236-4.235\"\r\n transform=\"translate(-996.35 -548.086)\" fill=\"none\" stroke=\"var(--icons-color)\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" />\r\n </svg>\r\n </span>\r\n </button>\r\n\r\n <div id=\"myDropdown\" class=\"internal\" [ngClass]=\"dropdownClasses\" [@openClose]=\"_getDropdownStates\">\r\n <herum-input-field #filterInput *ngIf=\"optionsLength>2\" class=\"input-filter\" [type]=\"'search'\"\r\n [placeholder]=\"'\u05D7\u05E4\u05E9/\u05D9 \u05E2\u05E8\u05DA \u05DE\u05D1\u05D5\u05E7\u05E9...'\" (click)=\"_onStopPropagation($event)\"\r\n (inputValueEmitter)=\"_onFilterDropDown($event)\"></herum-input-field>\r\n\r\n <ng-container *ngIf=\"options\">\r\n <herum-options-list [options]=\"filteredOptions\" [selectedOptions]=\"selectedOptionsValue\"\r\n (selectedOptionsEmitter)=\"_select($event)\">\r\n </herum-options-list>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"titledOptionsList\">\r\n <ng-container *ngFor=\"let filteredTitledOptions of filteredTitledOptionsList\">\r\n <herum-expendable-panel [title]=\"filteredTitledOptions.title\" [isBoldTitle]=\"true\">\r\n <herum-options-list [options]=\"filteredTitledOptions.options\"\r\n [isContentInsideExpendablePanel]=\"true\" [selectedOptions]=\"selectedOptionsValue\"\r\n (selectedOptionsEmitter)=\"_select($event)\"></herum-options-list>\r\n </herum-expendable-panel>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"recursiveTitledOption\">\r\n <ng-container *ngIf=\"isMultiHeads\">\r\n <herum-recursive-hierarchy-options-list *ngFor=\"let treeHead of recursiveTitledOption\"\r\n [recursiveTitledOption]=\"treeHead\" [selectedOptions]=\"selectedOptionsValue\"\r\n (selectedOptionsEmitter)=\"_select($event)\"\r\n (selectedRecursiveOptionsEmitter)=\"_selectRecursive($event)\">\r\n </herum-recursive-hierarchy-options-list>\r\n </ng-container>\r\n\r\n <herum-recursive-hierarchy-options-list *ngIf=\"!isMultiHeads\"\r\n [recursiveTitledOption]=\"recursiveTitledOption\" [selectedOptions]=\"selectedOptionsValue\"\r\n (selectedOptionsEmitter)=\"_select($event)\">\r\n </herum-recursive-hierarchy-options-list>\r\n </ng-container>\r\n\r\n <a class=\"text-center\" *ngIf=\"hasNoResults()\">\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D5 \u05EA\u05D5\u05E6\u05D0\u05D5\u05EA</a>\r\n </div>\r\n</div>", styles: [".drop-button{gap:8px}.button-placeholder{color:var(--disabled-text-color)}.last-chip{margin-inline-end:20px}.herum-chips-container{display:flex;gap:8px}.big-scroll-view{overflow-y:auto;max-height:600px}\n", ".drop-button{display:flex;background-color:var(--light-background-color);color:var(--disabled-text-color);border:none;cursor:pointer;border-radius:var(--border-radius);box-shadow:0 0 var(--box-shadow-blur) #00000029!important;text-align:right;font-size:var(--standard-font-size);align-items:center;justify-content:space-between}.responsive,.responsive-dropdown{width:100%}.default,.big,.default-dropdown,.big-dropdown{min-width:300px}.responsive,.default,.big{padding:16px}.responsive,.default{height:var(--atom-input-height)}.big{height:42px}.fit,.fit-dropdown{min-width:180px}.min,.min-dropdown{min-width:95px}.fit,.min{padding:8px}.drop-button:hover,.drop-button:focus{outline:1px solid var(--icons-color-light-2)}.dropdown{position:relative;display:inline-block}button{position:relative}::ng-deep .dropdown-content{position:absolute;background-color:#fff;box-shadow:0 1px 4px #0000002b;z-index:10;min-width:120px}.open-drop-button-downwards,.open-drop-button-upwards{box-shadow:0 0 var(--box-shadow-blur) #00000029!important}.open-drop-button-downwards{border-radius:var(--border-radius) var(--border-radius) 0 0}.open-drop-button-upwards{border-radius:0 0 var(--border-radius) var(--border-radius)}.dropdown-downwards{border-top:1px solid var(--chips-divider-color);border-radius:0 0 var(--border-radius) var(--border-radius)}.dropdown-upwards{border-bottom:1px solid var(--chips-divider-color);border-radius:var(--border-radius) var(--border-radius) 0 0;top:0}.dropdown-content a{color:#000;padding:6px 16px;text-decoration:none;display:block;font-size:var(--standard-font-size)}.dropdown a:hover{background-color:var(--hover-background);cursor:pointer}.shevron-icon{cursor:pointer;color:var(--icons-color)!important;transition:transform .3s ease}.selected{color:var(--icons-color)!important;font-weight:bolder}.input-filter{height:36px;display:block}.scrollable-settings{max-height:164px;overflow-y:auto}.fixed{position:fixed}\n"] }]
1092
+ }], propDecorators: { onClick: [{
1093
+ type: HostListener,
1094
+ args: ['window:click', ['$event']]
1095
+ }], placeholder: [{
1096
+ type: Input
1097
+ }], options: [{
1098
+ type: Input
1099
+ }], titledOptionsList: [{
1100
+ type: Input
1101
+ }], recursiveTitledOption: [{
1102
+ type: Input
1103
+ }], selectedOptionsInput: [{
1104
+ type: Input
1105
+ }], maxChips: [{
1106
+ type: Input
1107
+ }], disabled: [{
1108
+ type: Input
1109
+ }], size: [{
1110
+ type: Input
1111
+ }], isDropDownInPositionFixed: [{
1112
+ type: Input
1113
+ }], dropDownDirection: [{
1114
+ type: Input
1115
+ }], isMultiHeads: [{
1116
+ type: Input
1117
+ }], selectedOptions: [{
1118
+ type: Output
1119
+ }], selectedRecursiveOptions: [{
1120
+ type: Output
1121
+ }], filterInput: [{
1122
+ type: ViewChild,
1123
+ args: ['filterInput']
1124
+ }], dropContainer: [{
1125
+ type: ViewChild,
1126
+ args: ['dropContainer']
1127
+ }] } });
1128
+
1129
+ class HerumNarrowCollectionMenuItemComponent {
1130
+ index;
1131
+ item;
1132
+ itemState;
1133
+ itemEmitter = new EventEmitter();
1134
+ isAvailable;
1135
+ isActive;
1136
+ ngOnChanges(changes) {
1137
+ if (changes['itemState'])
1138
+ this.setItemState();
1139
+ }
1140
+ _onSelectItem() {
1141
+ this.itemEmitter.emit(this.item);
1142
+ }
1143
+ setItemState() {
1144
+ switch (this.itemState) {
1145
+ case ResourceState.default:
1146
+ break;
1147
+ case ResourceState.isActive:
1148
+ this.isActive = true;
1149
+ break;
1150
+ case ResourceState.isAvailable:
1151
+ this.isAvailable = true;
1152
+ break;
1153
+ default:
1154
+ break;
1155
+ }
1156
+ }
1157
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumNarrowCollectionMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1158
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumNarrowCollectionMenuItemComponent, isStandalone: false, selector: "herum-narrow-collection-menu-item", inputs: { index: "index", item: "item", itemState: "itemState" }, outputs: { itemEmitter: "itemEmitter" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"item\" (click)=\"_onSelectItem()\" [ngClass]=\"{'not-seen': isAvailable,'active-item': isActive}\">\r\n {{index}}\r\n</div>", styles: [".item{padding:8px;justify-content:center;align-items:center;display:flex;font-weight:700;width:100%;height:34px;cursor:pointer}.item:hover{background-color:var(--item-hover-color)}.not-seen{opacity:.5}.active-item{background:var(--icons-color-as-bg);color:var(--icons-color)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1159
+ }
1160
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumNarrowCollectionMenuItemComponent, decorators: [{
1161
+ type: Component,
1162
+ args: [{ standalone: false, selector: 'herum-narrow-collection-menu-item', template: "<div class=\"item\" (click)=\"_onSelectItem()\" [ngClass]=\"{'not-seen': isAvailable,'active-item': isActive}\">\r\n {{index}}\r\n</div>", styles: [".item{padding:8px;justify-content:center;align-items:center;display:flex;font-weight:700;width:100%;height:34px;cursor:pointer}.item:hover{background-color:var(--item-hover-color)}.not-seen{opacity:.5}.active-item{background:var(--icons-color-as-bg);color:var(--icons-color)}\n"] }]
1163
+ }], propDecorators: { index: [{
1164
+ type: Input
1165
+ }], item: [{
1166
+ type: Input
1167
+ }], itemState: [{
1168
+ type: Input
1169
+ }], itemEmitter: [{
1170
+ type: Output
1171
+ }] } });
1172
+
1173
+ class HerumNoResultMessageComponent {
1174
+ mainTitle = 'לא נמצאו תוצאות לחיפוש שלך';
1175
+ secondaryTitle = 'ניתן לנסות לחפש משהו אחר שיניב אולי תוצאות';
1176
+ alignItems = 'center';
1177
+ iconSize = 'small';
1178
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumNoResultMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1179
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumNoResultMessageComponent, isStandalone: false, selector: "herum-no-result-message", inputs: { mainTitle: "mainTitle", secondaryTitle: "secondaryTitle", alignItems: "alignItems", iconSize: "iconSize" }, ngImport: i0, template: "<div class=\"no-result-container\" [ngClass]=\"alignItems\">\r\n <img [ngClass]=\"iconSize\" src=\"assets/shared/icons/no-result-owl.png\">\r\n\r\n <div class=\"titles-container\" [ngClass]=\"alignItems\">\r\n <h1 class=\"section-big-title\">{{ mainTitle }}</h1>\r\n <h2 class=\"section-title\"> {{ secondaryTitle }}</h2>\r\n </div>\r\n</div>", styles: [".titles-container,.no-result-container{display:flex;flex-direction:column}.no-result-container{margin-block-start:16px;gap:16px}.center{align-items:center}.right{align-items:flex-start}.big{padding-right:88px;height:100%}.small{height:200px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1180
+ }
1181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumNoResultMessageComponent, decorators: [{
1182
+ type: Component,
1183
+ args: [{ standalone: false, selector: 'herum-no-result-message', template: "<div class=\"no-result-container\" [ngClass]=\"alignItems\">\r\n <img [ngClass]=\"iconSize\" src=\"assets/shared/icons/no-result-owl.png\">\r\n\r\n <div class=\"titles-container\" [ngClass]=\"alignItems\">\r\n <h1 class=\"section-big-title\">{{ mainTitle }}</h1>\r\n <h2 class=\"section-title\"> {{ secondaryTitle }}</h2>\r\n </div>\r\n</div>", styles: [".titles-container,.no-result-container{display:flex;flex-direction:column}.no-result-container{margin-block-start:16px;gap:16px}.center{align-items:center}.right{align-items:flex-start}.big{padding-right:88px;height:100%}.small{height:200px}\n"] }]
1184
+ }], propDecorators: { mainTitle: [{
1185
+ type: Input
1186
+ }], secondaryTitle: [{
1187
+ type: Input
1188
+ }], alignItems: [{
1189
+ type: Input
1190
+ }], iconSize: [{
1191
+ type: Input
1192
+ }] } });
1193
+
1194
+ class HerumPaginatorComponent {
1195
+ changeDetectorRef;
1196
+ numberOfSlots = 7;
1197
+ elementsToSlice;
1198
+ numberOfElementsInPage;
1199
+ currentPage = 1;
1200
+ totalPages;
1201
+ showArrows = true;
1202
+ slicerMode = false;
1203
+ slicedElements = new EventEmitter();
1204
+ currentPageChange = new EventEmitter();
1205
+ paginatorRenderChange = new EventEmitter();
1206
+ element;
1207
+ visiblePages = [];
1208
+ startEllipsisPosition = 4;
1209
+ endEllipsisPosition = -3;
1210
+ constructor(changeDetectorRef) {
1211
+ this.changeDetectorRef = changeDetectorRef;
1212
+ }
1213
+ ngOnChanges(changes) {
1214
+ if (changes['elementsToSlice']?.currentValue && !this.totalPages && this.numberOfElementsInPage)
1215
+ this.totalPages = Math.ceil((this.elementsToSlice.length / this.numberOfElementsInPage));
1216
+ if (changes['totalPages']?.currentValue || changes['elementsToSlice']?.currentValue || changes['numberOfElementsInPage']?.currentValue)
1217
+ this.updateVisiblePages();
1218
+ if (changes['totalPages']?.currentValue) {
1219
+ this.changeDetectorRef.detectChanges();
1220
+ window.requestAnimationFrame(_ => {
1221
+ if (this.totalPages > 1)
1222
+ this.paginatorRenderChange.emit();
1223
+ });
1224
+ }
1225
+ }
1226
+ ngOnInit() {
1227
+ this.updateVisiblePages();
1228
+ this.numberOfSlotsValidation();
1229
+ this.showArrowsValidation();
1230
+ }
1231
+ showArrowsValidation() {
1232
+ const isOneMiddleSlot = this.numberOfSlots < 6;
1233
+ if (isOneMiddleSlot && !this.showArrows)
1234
+ this.showArrows = true;
1235
+ }
1236
+ numberOfSlotsValidation() {
1237
+ if (this.numberOfSlots < 5)
1238
+ this.numberOfSlots = 5;
1239
+ }
1240
+ _onChangePage(page) {
1241
+ if (!this.isValidPageNumber(page))
1242
+ return;
1243
+ this.currentPage = page;
1244
+ this.currentPageChange.emit(this.currentPage);
1245
+ this.updateVisiblePages();
1246
+ }
1247
+ updateVisiblePages() {
1248
+ this.visiblePages = [];
1249
+ if (this.shouldShowAllPages()) {
1250
+ this.displayAllPages();
1251
+ return;
1252
+ }
1253
+ this.addFirstPage();
1254
+ this.addStartEllipsis();
1255
+ this.addMiddlePagesSlots();
1256
+ this.addEndEllipsis();
1257
+ this.addLastPage();
1258
+ this.emitElementsPerCurrentPage();
1259
+ }
1260
+ shouldShowAllPages() {
1261
+ return this.totalPages <= this.numberOfSlots;
1262
+ }
1263
+ displayAllPages() {
1264
+ this.visiblePages = Array.from({ length: this.totalPages }, (_, index) => index + 1);
1265
+ this.emitElementsPerCurrentPage();
1266
+ }
1267
+ addFirstPage() {
1268
+ this.visiblePages.push(1);
1269
+ }
1270
+ addStartEllipsis() {
1271
+ if (this.currentPage >= this.startEllipsisPosition)
1272
+ this.visiblePages.push('...');
1273
+ }
1274
+ addMiddlePagesSlots() {
1275
+ const { start, end } = this.calculateMiddlePageSlots();
1276
+ const middlePages = Array.from({ length: end - start + 1 }, (_, index) => start + index);
1277
+ middlePages.forEach(page => this.visiblePages.push(page));
1278
+ }
1279
+ calculateMiddlePageSlots() {
1280
+ const middleStartPageNumber = Math.max(2, this.currentPage - 1);
1281
+ const middleEndPageNumber = Math.min(this.totalPages - 1, this.currentPage + 1);
1282
+ const availableMiddleSlots = this.calculateAvailableMiddleSlots();
1283
+ const currentMiddleItemsCount = middleEndPageNumber - middleStartPageNumber + 1;
1284
+ if (currentMiddleItemsCount < availableMiddleSlots)
1285
+ return this.expandMiddleRange(middleStartPageNumber, middleEndPageNumber, availableMiddleSlots, currentMiddleItemsCount);
1286
+ if (currentMiddleItemsCount > availableMiddleSlots)
1287
+ return this.shrinkMiddleRange(middleStartPageNumber, middleEndPageNumber, availableMiddleSlots, currentMiddleItemsCount);
1288
+ return { start: middleStartPageNumber, end: middleEndPageNumber };
1289
+ }
1290
+ calculateAvailableMiddleSlots() {
1291
+ const startEllipsisCount = this.currentPage >= this.startEllipsisPosition ? 1 : 0;
1292
+ const endEllipsisCount = this.currentPage <= this.totalPages + this.endEllipsisPosition ? 1 : 0;
1293
+ const firstPageCount = 1;
1294
+ const lastPageCount = 1;
1295
+ return this.numberOfSlots - firstPageCount - lastPageCount - startEllipsisCount - endEllipsisCount;
1296
+ }
1297
+ expandMiddleRange(start, end, availableSlots, currentMiddleItemsCount) {
1298
+ const slotsToAdd = availableSlots - currentMiddleItemsCount;
1299
+ const isExpandFromStart = start === 2;
1300
+ const isExpandFromEnd = end === this.totalPages - 1;
1301
+ if (isExpandFromStart)
1302
+ return { start, end: Math.min(this.totalPages - 1, end + slotsToAdd) };
1303
+ if (isExpandFromEnd)
1304
+ return { start: Math.max(2, start - slotsToAdd), end };
1305
+ const startExpand = Math.floor(slotsToAdd / 2);
1306
+ const endExpand = slotsToAdd - startExpand;
1307
+ return {
1308
+ start: Math.max(2, start - startExpand),
1309
+ end: Math.min(this.totalPages - 1, end + endExpand)
1310
+ };
1311
+ }
1312
+ shrinkMiddleRange(start, end, availableSlots, currentMiddleItemsCount) {
1313
+ if (availableSlots === 1)
1314
+ return { start: this.currentPage, end: this.currentPage };
1315
+ const slotsToRemove = currentMiddleItemsCount - availableSlots;
1316
+ const distanceToStart = this.currentPage - start;
1317
+ const distanceToEnd = end - this.currentPage;
1318
+ if (distanceToStart > distanceToEnd)
1319
+ return { start: start + slotsToRemove, end };
1320
+ return { start, end: end - slotsToRemove };
1321
+ }
1322
+ addEndEllipsis() {
1323
+ if (this.currentPage < this.totalPages - 2)
1324
+ this.visiblePages.push('...');
1325
+ }
1326
+ addLastPage() {
1327
+ this.visiblePages.push(this.totalPages);
1328
+ }
1329
+ emitElementsPerCurrentPage() {
1330
+ if (!this.slicerMode || !this.elementsToSlice)
1331
+ return;
1332
+ const startIndex = this.numberOfElementsInPage * (this.currentPage - 1);
1333
+ const endIndex = this.numberOfElementsInPage * this.currentPage;
1334
+ const slicedItems = this.elementsToSlice.slice(startIndex, endIndex);
1335
+ this.slicedElements.emit(slicedItems);
1336
+ }
1337
+ isValidPageNumber(page) {
1338
+ return (typeof page === types.number) && page >= 1 && page <= this.totalPages;
1339
+ }
1340
+ _isNumber(value) {
1341
+ return typeof value === types.number;
1342
+ }
1343
+ get chevronIcon() {
1344
+ return svgsStrings.chevron;
1345
+ }
1346
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumPaginatorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1347
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumPaginatorComponent, isStandalone: false, selector: "herum-paginator", inputs: { numberOfSlots: "numberOfSlots", elementsToSlice: "elementsToSlice", numberOfElementsInPage: "numberOfElementsInPage", currentPage: "currentPage", totalPages: "totalPages", showArrows: "showArrows", slicerMode: "slicerMode" }, outputs: { slicedElements: "slicedElements", currentPageChange: "currentPageChange", paginatorRenderChange: "paginatorRenderChange" }, viewQueries: [{ propertyName: "element", first: true, predicate: ["element"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #element *ngIf=\"totalPages > 1\" class=\"paginator-container\">\r\n <span *ngIf=\"showArrows\" [ngClass]=\"{'cursor-not-allowed': currentPage === 1}\" class=\"item chevron right-chevron\"\r\n [innerHTML]=\"chevronIcon | safeHtml\" (click)=\"_onChangePage(currentPage -1)\">\r\n </span>\r\n\r\n <ng-container *ngFor=\"let item of visiblePages\">\r\n <span class=\"item\" *ngIf=\"_isNumber(item); else ellipsis\" (click)=\"_onChangePage(item)\"\r\n [ngClass]=\"{'herum-card': currentPage === item}\">\r\n {{ item }}\r\n </span>\r\n\r\n <ng-template #ellipsis>\r\n <span class=\"ellipsis\">{{ item }}</span>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <span *ngIf=\"showArrows\" [ngClass]=\"{'cursor-not-allowed': currentPage === totalPages}\"\r\n class=\"item chevron left-chevron\" [innerHTML]=\"chevronIcon | safeHtml\"\r\n (click)=\"_onChangePage(currentPage + 1)\">\r\n </span>\r\n</div>", styles: [".paginator-container{display:flex;gap:4px;direction:rtl;justify-content:flex-end;align-items:center;width:100%}.paginator-container .ellipsis,.paginator-container .item{display:flex;align-items:center;justify-content:center;width:28px;height:28px;font-weight:700}.paginator-container .item{cursor:pointer}.paginator-container .chevron{width:16px;height:16px;stroke:var(--icons-color)}.paginator-container .right-chevron{transform:rotate(-90deg)}.paginator-container .left-chevron{transform:rotate(90deg)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.SafeHtmlPipe, name: "safeHtml" }] });
1348
+ }
1349
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumPaginatorComponent, decorators: [{
1350
+ type: Component,
1351
+ args: [{ standalone: false, selector: 'herum-paginator', template: "<div #element *ngIf=\"totalPages > 1\" class=\"paginator-container\">\r\n <span *ngIf=\"showArrows\" [ngClass]=\"{'cursor-not-allowed': currentPage === 1}\" class=\"item chevron right-chevron\"\r\n [innerHTML]=\"chevronIcon | safeHtml\" (click)=\"_onChangePage(currentPage -1)\">\r\n </span>\r\n\r\n <ng-container *ngFor=\"let item of visiblePages\">\r\n <span class=\"item\" *ngIf=\"_isNumber(item); else ellipsis\" (click)=\"_onChangePage(item)\"\r\n [ngClass]=\"{'herum-card': currentPage === item}\">\r\n {{ item }}\r\n </span>\r\n\r\n <ng-template #ellipsis>\r\n <span class=\"ellipsis\">{{ item }}</span>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <span *ngIf=\"showArrows\" [ngClass]=\"{'cursor-not-allowed': currentPage === totalPages}\"\r\n class=\"item chevron left-chevron\" [innerHTML]=\"chevronIcon | safeHtml\"\r\n (click)=\"_onChangePage(currentPage + 1)\">\r\n </span>\r\n</div>", styles: [".paginator-container{display:flex;gap:4px;direction:rtl;justify-content:flex-end;align-items:center;width:100%}.paginator-container .ellipsis,.paginator-container .item{display:flex;align-items:center;justify-content:center;width:28px;height:28px;font-weight:700}.paginator-container .item{cursor:pointer}.paginator-container .chevron{width:16px;height:16px;stroke:var(--icons-color)}.paginator-container .right-chevron{transform:rotate(-90deg)}.paginator-container .left-chevron{transform:rotate(90deg)}\n"] }]
1352
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { numberOfSlots: [{
1353
+ type: Input
1354
+ }], elementsToSlice: [{
1355
+ type: Input
1356
+ }], numberOfElementsInPage: [{
1357
+ type: Input
1358
+ }], currentPage: [{
1359
+ type: Input
1360
+ }], totalPages: [{
1361
+ type: Input
1362
+ }], showArrows: [{
1363
+ type: Input
1364
+ }], slicerMode: [{
1365
+ type: Input
1366
+ }], slicedElements: [{
1367
+ type: Output
1368
+ }], currentPageChange: [{
1369
+ type: Output
1370
+ }], paginatorRenderChange: [{
1371
+ type: Output
1372
+ }], element: [{
1373
+ type: ViewChild,
1374
+ args: ['element']
1375
+ }] } });
1376
+
1377
+ class HerumPanelLinksComponent {
1378
+ selectedLink;
1379
+ links;
1380
+ linkEmitter = new EventEmitter();
1381
+ _onClick(link) {
1382
+ this.selectedLink = link;
1383
+ this.linkEmitter.emit(link);
1384
+ }
1385
+ _isActiveLink(linkId) {
1386
+ return this.selectedLink?.id === linkId;
1387
+ }
1388
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumPanelLinksComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1389
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumPanelLinksComponent, isStandalone: false, selector: "herum-panel-links", inputs: { selectedLink: "selectedLink", links: "links" }, outputs: { linkEmitter: "linkEmitter" }, ngImport: i0, template: "<div class=\"links-container\">\r\n <a *ngFor=\"let link of links\" class=\"link-item\" [ngClass]=\"{'active-link':_isActiveLink(link.id)}\"\r\n (click)=\"_onClick(link)\">\r\n\r\n <span class=\"link-text\">\r\n {{link.name}}\r\n </span>\r\n </a>\r\n</div>", styles: [".links-container{display:flex;gap:2%;flex-wrap:wrap}.link-item{position:relative;text-decoration:none;font-weight:700}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
1390
+ }
1391
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumPanelLinksComponent, decorators: [{
1392
+ type: Component,
1393
+ args: [{ standalone: false, selector: 'herum-panel-links', template: "<div class=\"links-container\">\r\n <a *ngFor=\"let link of links\" class=\"link-item\" [ngClass]=\"{'active-link':_isActiveLink(link.id)}\"\r\n (click)=\"_onClick(link)\">\r\n\r\n <span class=\"link-text\">\r\n {{link.name}}\r\n </span>\r\n </a>\r\n</div>", styles: [".links-container{display:flex;gap:2%;flex-wrap:wrap}.link-item{position:relative;text-decoration:none;font-weight:700}\n"] }]
1394
+ }], propDecorators: { selectedLink: [{
1395
+ type: Input
1396
+ }], links: [{
1397
+ type: Input
1398
+ }], linkEmitter: [{
1399
+ type: Output
1400
+ }] } });
1401
+
1402
+ const upPosition = 'up';
1403
+ const leftPosition = 'left';
1404
+ class HerumProgressBarComponent {
1405
+ percentage = 65;
1406
+ invalidPercentage = 0;
1407
+ showPercentage = true;
1408
+ percentagePosition = 'up';
1409
+ type = 'gradient';
1410
+ size = 'regular';
1411
+ color = "#26C593";
1412
+ borderRadius = "both";
1413
+ total = "100";
1414
+ showBorder = true;
1415
+ thickness = 'thick';
1416
+ getPercentageFormat() {
1417
+ return this.percentagePosition === upPosition || this.percentagePosition === leftPosition ?
1418
+ (!this.invalidPercentage ? 0 + this.percentage + '%' : `${!this.isInfinity ? Math.floor(this.invalidPercentage + this.percentage) + '%' : '∞'}`) :
1419
+ `${this.percentage}/${this.total}`;
1420
+ }
1421
+ get invalidPercentageCalculation() {
1422
+ let sum = Math.floor(this.percentage + this.invalidPercentage);
1423
+ return !sum ? 0 : sum <= 100 ? this.invalidPercentage : 100 - this.percentage;
1424
+ }
1425
+ get isInfinity() {
1426
+ return this.percentage + this.invalidPercentage > 3000;
1427
+ }
1428
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1429
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumProgressBarComponent, isStandalone: false, selector: "herum-progress-bar", inputs: { percentage: "percentage", invalidPercentage: "invalidPercentage", showPercentage: "showPercentage", percentagePosition: "percentagePosition", type: "type", size: "size", color: "color", borderRadius: "borderRadius", total: "total", showBorder: "showBorder", thickness: "thickness" }, ngImport: i0, template: "<div class=\"container p-0\" [ngClass]=\"percentagePosition + '-container'\" [ngClass]=\"borderRadius + '-radius'\">\r\n <div class=\"progress-bar\" [ngClass]=\"{ 'colored-empty-bar': type == 'solid', 'tight': size=='tight', 'thin': thickness == 'thin', 'thick': thickness == 'thick' }\" \r\n [ngStyle]=\"{ 'border': showBorder ? '1px solid var(--chips-divider-color)' : 'unset' }\">\r\n <div class=\"progress-bar-fill\" [ngClass]=\"type\" [ngStyle]=\"{'width':percentage + '%', 'background':color}\" ></div>\r\n <div class=\"invalid-progress-bar-fill\" [ngStyle]=\"{'width':invalidPercentageCalculation + '%'}\" ></div>\r\n </div>\r\n\r\n <div *ngIf=\"showPercentage\" class=\"percentage\" [ngClass]=\"percentagePosition + ' ' + size\" [class.big-font]=\"isInfinity\" [ngStyle]=\"{'width':invalidPercentageCalculation + percentage + '%'}\">\r\n {{ getPercentageFormat() }}\r\n </div>\r\n</div>", styles: [".container{position:relative}.progress-bar{width:100%;border-radius:10px;border:1px solid var(--chips-divider-color);display:flex;flex-direction:row;justify-content:flex-start}.thin{height:8px}.thick{height:12px}.both-radius .progress-bar{border-radius:10px}.right-radius .progress-bar{border-radius:0 10px 10px 0}.left-radius .progress-bar{border-radius:10px 0 0 10px}.none-radius .progress-bar{border-radius:unset}.progress-bar-fill{height:100%}.invalid-progress-bar-fill{height:100%;background:var(--error-color)!important}.colored-empty-bar{background:#ecf2fb;border:none;height:10px}.tight{height:8px!important;font-size:10px}.left{text-align:left}.bold{font-weight:700}.gradient{background:var(--primary-color)}.solid{background:var(--icons-color)}.up{position:absolute;top:-17px}.up.tight{position:absolute;top:-13px}.left-container{display:flex;align-items:center;gap:8px}.percentage{text-align:left}.big-font{font-size:29px;top:-28px!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
1430
+ }
1431
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumProgressBarComponent, decorators: [{
1432
+ type: Component,
1433
+ args: [{ standalone: false, selector: 'herum-progress-bar', template: "<div class=\"container p-0\" [ngClass]=\"percentagePosition + '-container'\" [ngClass]=\"borderRadius + '-radius'\">\r\n <div class=\"progress-bar\" [ngClass]=\"{ 'colored-empty-bar': type == 'solid', 'tight': size=='tight', 'thin': thickness == 'thin', 'thick': thickness == 'thick' }\" \r\n [ngStyle]=\"{ 'border': showBorder ? '1px solid var(--chips-divider-color)' : 'unset' }\">\r\n <div class=\"progress-bar-fill\" [ngClass]=\"type\" [ngStyle]=\"{'width':percentage + '%', 'background':color}\" ></div>\r\n <div class=\"invalid-progress-bar-fill\" [ngStyle]=\"{'width':invalidPercentageCalculation + '%'}\" ></div>\r\n </div>\r\n\r\n <div *ngIf=\"showPercentage\" class=\"percentage\" [ngClass]=\"percentagePosition + ' ' + size\" [class.big-font]=\"isInfinity\" [ngStyle]=\"{'width':invalidPercentageCalculation + percentage + '%'}\">\r\n {{ getPercentageFormat() }}\r\n </div>\r\n</div>", styles: [".container{position:relative}.progress-bar{width:100%;border-radius:10px;border:1px solid var(--chips-divider-color);display:flex;flex-direction:row;justify-content:flex-start}.thin{height:8px}.thick{height:12px}.both-radius .progress-bar{border-radius:10px}.right-radius .progress-bar{border-radius:0 10px 10px 0}.left-radius .progress-bar{border-radius:10px 0 0 10px}.none-radius .progress-bar{border-radius:unset}.progress-bar-fill{height:100%}.invalid-progress-bar-fill{height:100%;background:var(--error-color)!important}.colored-empty-bar{background:#ecf2fb;border:none;height:10px}.tight{height:8px!important;font-size:10px}.left{text-align:left}.bold{font-weight:700}.gradient{background:var(--primary-color)}.solid{background:var(--icons-color)}.up{position:absolute;top:-17px}.up.tight{position:absolute;top:-13px}.left-container{display:flex;align-items:center;gap:8px}.percentage{text-align:left}.big-font{font-size:29px;top:-28px!important}\n"] }]
1434
+ }], propDecorators: { percentage: [{
1435
+ type: Input
1436
+ }], invalidPercentage: [{
1437
+ type: Input
1438
+ }], showPercentage: [{
1439
+ type: Input
1440
+ }], percentagePosition: [{
1441
+ type: Input
1442
+ }], type: [{
1443
+ type: Input
1444
+ }], size: [{
1445
+ type: Input
1446
+ }], color: [{
1447
+ type: Input
1448
+ }], borderRadius: [{
1449
+ type: Input
1450
+ }], total: [{
1451
+ type: Input
1452
+ }], showBorder: [{
1453
+ type: Input
1454
+ }], thickness: [{
1455
+ type: Input
1456
+ }] } });
1457
+
1458
+ class HerumQuizHeaderItemComponent {
1459
+ index;
1460
+ item;
1461
+ itemState;
1462
+ itemEmitter = new EventEmitter();
1463
+ _onSelectItem(index) {
1464
+ this.itemEmitter.emit(index);
1465
+ }
1466
+ getItemClass(itemState) {
1467
+ switch (itemState) {
1468
+ case QuizHeaderState.current:
1469
+ return 'current';
1470
+ case QuizHeaderState.correct:
1471
+ return 'correct';
1472
+ case QuizHeaderState.wrong:
1473
+ return 'wrong';
1474
+ case QuizHeaderState.answered:
1475
+ return 'answered';
1476
+ case QuizHeaderState.unanswered:
1477
+ return 'unanswered';
1478
+ case QuizHeaderState.skipped:
1479
+ return 'skipped';
1480
+ default:
1481
+ return 'current';
1482
+ }
1483
+ }
1484
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumQuizHeaderItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1485
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumQuizHeaderItemComponent, isStandalone: false, selector: "herum-quiz-header-item", inputs: { index: "index", item: "item", itemState: "itemState" }, outputs: { itemEmitter: "itemEmitter" }, ngImport: i0, template: "<div class=\"item\" (click)=\"_onSelectItem(index)\">\r\n <div class=\"item-number\" [ngClass]=\"getItemClass(itemState)\">{{index +1}}\r\n </div>\r\n</div>", styles: [".item{position:relative;width:44px;min-width:44px;max-width:44px}.item-number{position:relative;padding:0 16px;border-bottom:2px solid;justify-content:center;display:flex;font-size:12px;cursor:pointer;font-size:16px;font-style:normal;font-weight:500;-webkit-user-select:none;user-select:none}.current{color:var(--text-color);border-color:var(--text-color)}.correct{border-color:var(--icons-color)!important;color:var(--icons-color)}.wrong{border-color:var(--error-color)!important;color:var(--error-color)}.answered{border-color:#4150d8!important;color:#4150d8}.skipped{border-color:#00000085;color:#00000085}.unanswered{border-color:transparent;color:var(--disabled-text-color)}.skipped:after{content:url(/assets/quiz/skip.svg);position:absolute;top:-14px;right:14px}.current:active,.current:hover{border-color:#c1cce3}.correct:active{border-color:#0d3b06}.correct:hover{border-color:#49ae74}.wrong:active{border-color:#cc1759}.wrong:hover{border-color:#ff4f8f}.answered:active{border-color:#b16dbe}.answered:hover{border-color:#cd86db}.unanswered:active,.skipped:active{border-color:#c1cce3}.unanswered:active,.skipped:hover{border-color:#e6eefd}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1486
+ }
1487
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumQuizHeaderItemComponent, decorators: [{
1488
+ type: Component,
1489
+ args: [{ standalone: false, selector: 'herum-quiz-header-item', template: "<div class=\"item\" (click)=\"_onSelectItem(index)\">\r\n <div class=\"item-number\" [ngClass]=\"getItemClass(itemState)\">{{index +1}}\r\n </div>\r\n</div>", styles: [".item{position:relative;width:44px;min-width:44px;max-width:44px}.item-number{position:relative;padding:0 16px;border-bottom:2px solid;justify-content:center;display:flex;font-size:12px;cursor:pointer;font-size:16px;font-style:normal;font-weight:500;-webkit-user-select:none;user-select:none}.current{color:var(--text-color);border-color:var(--text-color)}.correct{border-color:var(--icons-color)!important;color:var(--icons-color)}.wrong{border-color:var(--error-color)!important;color:var(--error-color)}.answered{border-color:#4150d8!important;color:#4150d8}.skipped{border-color:#00000085;color:#00000085}.unanswered{border-color:transparent;color:var(--disabled-text-color)}.skipped:after{content:url(/assets/quiz/skip.svg);position:absolute;top:-14px;right:14px}.current:active,.current:hover{border-color:#c1cce3}.correct:active{border-color:#0d3b06}.correct:hover{border-color:#49ae74}.wrong:active{border-color:#cc1759}.wrong:hover{border-color:#ff4f8f}.answered:active{border-color:#b16dbe}.answered:hover{border-color:#cd86db}.unanswered:active,.skipped:active{border-color:#c1cce3}.unanswered:active,.skipped:hover{border-color:#e6eefd}\n"] }]
1490
+ }], propDecorators: { index: [{
1491
+ type: Input
1492
+ }], item: [{
1493
+ type: Input
1494
+ }], itemState: [{
1495
+ type: Input
1496
+ }], itemEmitter: [{
1497
+ type: Output
1498
+ }] } });
1499
+
1500
+ const dummySkeletonArray = [1, 2, 3, 4];
1501
+ const CUSTOM_SELECT_CONTROL_VALUE_ACCESSOR = {
1502
+ provide: NG_VALUE_ACCESSOR,
1503
+ useExisting: forwardRef(() => HerumSelectComponent),
1504
+ multi: true,
1505
+ };
1506
+ const optionsInput = 'options';
1507
+ class HerumSelectComponent {
1508
+ options = [];
1509
+ displayBy = 'name';
1510
+ placeholder = 'בחר/י...';
1511
+ selectedOption;
1512
+ disabled = false;
1513
+ isDropDownInPositionFixed = false;
1514
+ iconPath = '';
1515
+ isAutoComplete = false;
1516
+ title = '';
1517
+ size = 'default';
1518
+ displayLoadingMode = false;
1519
+ isLoadingInput = false;
1520
+ dropDownDirection = 'downwards';
1521
+ filterPlaceholder = "חפש/י...";
1522
+ debounceTime = 0;
1523
+ selectedOptionEmitter = new EventEmitter();
1524
+ filterTextEmitter = new EventEmitter();
1525
+ filterInput;
1526
+ dropContainer;
1527
+ dropdown;
1528
+ onClick(event) {
1529
+ this.closeDropdown(event);
1530
+ }
1531
+ narrowSelect = false;
1532
+ onResize(event) {
1533
+ this.narrowSelect = window.innerWidth < 1300 && !!this.iconPath;
1534
+ }
1535
+ filteredOptions = [];
1536
+ isDropdownOpen = false;
1537
+ destroySubject$ = new Subject();
1538
+ componentId = '';
1539
+ get errorOccurred() {
1540
+ this.placeholder = 'התרחשה שגיאה בקבלת פרטי המשתמש';
1541
+ return false;
1542
+ }
1543
+ ngOnChanges(changes) {
1544
+ this.narrowSelect = window.innerWidth < 1300 && !!this.iconPath;
1545
+ if (this.isAutoComplete && !this.isLoadingInput || changes[optionsInput]?.currentValue?.length && !this.filteredOptions?.length)
1546
+ this.filteredOptions = changes[optionsInput]?.currentValue;
1547
+ }
1548
+ ngAfterViewInit() {
1549
+ this.componentId = v4();
1550
+ this.dropContainer.nativeElement.id += `component-id-${this.componentId}`;
1551
+ }
1552
+ _onSelectOption(selectedOption) {
1553
+ this.resetFiltering();
1554
+ this.selectedOption = selectedOption;
1555
+ this.onChange(selectedOption);
1556
+ this.selectedOptionEmitter.emit(selectedOption);
1557
+ }
1558
+ _onStopPropagation(event) {
1559
+ event.stopPropagation();
1560
+ }
1561
+ _onFilterDropDown(text) {
1562
+ this.filteredOptions = this.options;
1563
+ if (!text && !this.isAutoComplete)
1564
+ return;
1565
+ if (!this.isAutoComplete)
1566
+ this.filteredOptions = this.options.filter(filteredOption => filteredOption[this.displayBy].includes(text));
1567
+ this.filterTextEmitter.emit(text);
1568
+ }
1569
+ toggleDropdown() {
1570
+ this.isDropdownOpen = !this.isDropdownOpen;
1571
+ }
1572
+ closeDropdown(event) {
1573
+ if (!this.isDropdownOpen)
1574
+ return;
1575
+ const isClickedOutsideComponent = !event.composedPath().some(path => path.id?.includes(this.componentId));
1576
+ if (!event.target.matches('.internal') || isClickedOutsideComponent) {
1577
+ this.isDropdownOpen = false;
1578
+ this.resetFiltering();
1579
+ }
1580
+ }
1581
+ isSelectedOption(option) {
1582
+ if (!this.selectedOption)
1583
+ return false;
1584
+ return this.selectedOption.id === option.id;
1585
+ }
1586
+ resetFiltering() {
1587
+ this.filterInput?.clearInput();
1588
+ this.filteredOptions = this.options;
1589
+ }
1590
+ _isLoading() {
1591
+ return (this.displayLoadingMode && !this.title?.length) || this.isLoadingInput;
1592
+ }
1593
+ onChange = () => { };
1594
+ onTouched = () => { };
1595
+ writeValue(selectedOption) {
1596
+ this.selectedOption = selectedOption;
1597
+ }
1598
+ registerOnChange(fn) {
1599
+ this.onChange = fn;
1600
+ }
1601
+ registerOnTouched(fn) {
1602
+ this.onTouched = fn;
1603
+ }
1604
+ ngOnDestroy() {
1605
+ this.destroySubject$.next(null);
1606
+ this.destroySubject$.complete();
1607
+ }
1608
+ get dropdownClasses() {
1609
+ let classes = `dropdown-content dropdown-${this.dropDownDirection} ${this.size}-dropdown`;
1610
+ if (this.isDropDownInPositionFixed)
1611
+ classes += ' fixed';
1612
+ if (this.filteredOptions?.length)
1613
+ classes += ' scrollable-settings';
1614
+ return classes;
1615
+ }
1616
+ get _getDropdownStates() {
1617
+ return getDropdownAnimationStates(this.isDropdownOpen, this.dropDownDirection);
1618
+ }
1619
+ get skeletonArray() {
1620
+ return dummySkeletonArray;
1621
+ }
1622
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1623
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumSelectComponent, isStandalone: false, selector: "herum-select", inputs: { options: "options", displayBy: "displayBy", placeholder: "placeholder", selectedOption: "selectedOption", disabled: "disabled", isDropDownInPositionFixed: "isDropDownInPositionFixed", iconPath: "iconPath", isAutoComplete: "isAutoComplete", title: "title", size: "size", displayLoadingMode: "displayLoadingMode", isLoadingInput: "isLoadingInput", dropDownDirection: "dropDownDirection", filterPlaceholder: "filterPlaceholder", debounceTime: "debounceTime" }, outputs: { selectedOptionEmitter: "selectedOptionEmitter", filterTextEmitter: "filterTextEmitter" }, host: { listeners: { "window:click": "onClick($event)", "window:resize": "onResize($event)" } }, providers: [CUSTOM_SELECT_CONTROL_VALUE_ACCESSOR], viewQueries: [{ propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true }, { propertyName: "dropContainer", first: true, predicate: ["dropContainer"], descendants: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #dropContainer class=\"dropdown\" dir=\"rtl\"\r\n [ngClass]=\"{'w-100': size === 'responsive', 'fill-container':size === 'fill-container' }\"\r\n (click)=\"toggleDropdown()\">\r\n <button class=\"drop-button internal\" [class]=\"narrowSelect ? 'narrow' : size\"\r\n [ngClass]=\"(isDropdownOpen ? 'open-drop-button-' + dropDownDirection : '')\"\r\n [ngStyle]=\" {'padding': iconPath ? '4px 12px 4px 4px' : null }\">\r\n <div class=\"selected-option-container internal\" [ngClass]=\"{'skeleton-container':_isLoading()}\" *ngIf=\"iconPath\">\r\n <span class=\"title internal\">\r\n <img *ngIf=\"iconPath\" [src]=\"iconPath\" alt=\"icon\" class=\"icon\">\r\n\r\n <span *ngIf=\"!narrowSelect\" [ngClass]=\"{'skeleton':_isLoading(), 'skeleton-text':_isLoading()}\">\r\n {{errorOccurred ? '\u05D4\u05EA\u05E8\u05D7\u05E9\u05D4 \u05E9\u05D2\u05D9\u05D0\u05D4' :title}}\r\n </span>\r\n </span>\r\n\r\n <br *ngIf=\"!_isLoading()\">\r\n\r\n <span class=\"selected-option internal\"\r\n [ngClass]=\"{'skeleton':_isLoading(),'skeleton-text':_isLoading(), 'skeleton-selected-option':_isLoading()}\">\r\n {{selectedOption ? selectedOption[displayBy] : title}}\r\n </span>\r\n </div>\r\n\r\n <ng-container *ngIf=\"iconPath == ''\">\r\n {{selectedOption ? selectedOption[displayBy] : placeholder }}\r\n </ng-container>\r\n\r\n <span class=\"shevron-icon internal\" [ngClass]=\"{'rotate-chevron': isDropdownOpen}\">\r\n <svg class=\"internal\" xmlns=\"http://www.w3.org/2000/svg\" width=\"11.299\" height=\"6.649\"\r\n viewBox=\"0 0 11.299 6.649\">\r\n <path id=\"Vector_43-2\" data-name=\"Vector 43-2\" d=\"M1006.235,549.5,1002,553.735l-4.236-4.235\"\r\n transform=\"translate(-996.35 -548.086)\" fill=\"none\" stroke=\"var(--icons-color)\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" />\r\n </svg>\r\n </span>\r\n </button>\r\n\r\n <div #dropdown id=\"myDropdown\" [ngClass]=\"dropdownClasses\" [@openClose]=\"_getDropdownStates\">\r\n <herum-input-field #filterInput *ngIf=\"options?.length>2 || isAutoComplete\" class=\"input-filter\"\r\n [type]=\"'search'\" [placeholder]=\"filterPlaceholder\" [debounceTime]=\"debounceTime\"\r\n (click)=\"_onStopPropagation($event)\" (inputValueEmitter)=\"_onFilterDropDown($event)\"></herum-input-field>\r\n <ng-container *ngFor=\"let option of isLoadingInput ? skeletonArray : filteredOptions; let index = index\">\r\n <a (click)=\"_onSelectOption(option)\" id=\"select-{{index}}\"\r\n [ngClass]=\"{'selected': isSelectedOption(option), 'skeleton skeleton-text m-3':isLoadingInput}\">\r\n {{option[displayBy]}}</a>\r\n </ng-container>\r\n\r\n <a class=\"text-center\" *ngIf=\"!filteredOptions?.length && !isLoadingInput\">\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D5 \u05EA\u05D5\u05E6\u05D0\u05D5\u05EA</a>\r\n </div>\r\n</div>", styles: [".selected-option{color:var(--secondary-color);font-weight:lighter}.title{width:80%;font-weight:700}.skeleton-selected-option{width:80%}.skeleton-text{width:90%}.skeleton-container{gap:10px;display:flex;flex-direction:column;width:100%}.skeleton-container .title.internal{display:flex}.title.internal span{margin-top:5px;margin-right:5px}.narrow{max-width:unset!important;height:42px}.fill-container{display:flex;width:100%;height:100%}.fill-container .dropdown,.fill-container .dropdown button{width:100%;height:100%}:host:has(.fill-container){width:100%;display:flex}:host:has(.fill-container) #myDropdown{width:100%;position:absolute}:host:has(.fill-container) .drop-button{border-radius:0}\n", ".drop-button{display:flex;background-color:var(--light-background-color);color:var(--disabled-text-color);border:none;cursor:pointer;border-radius:var(--border-radius);box-shadow:0 0 var(--box-shadow-blur) #00000029!important;text-align:right;font-size:var(--standard-font-size);align-items:center;justify-content:space-between}.responsive,.responsive-dropdown{width:100%}.default,.big,.default-dropdown,.big-dropdown{min-width:300px}.responsive,.default,.big{padding:16px}.responsive,.default{height:var(--atom-input-height)}.big{height:42px}.fit,.fit-dropdown{min-width:180px}.min,.min-dropdown{min-width:95px}.fit,.min{padding:8px}.drop-button:hover,.drop-button:focus{outline:1px solid var(--icons-color-light-2)}.dropdown{position:relative;display:inline-block}button{position:relative}::ng-deep .dropdown-content{position:absolute;background-color:#fff;box-shadow:0 1px 4px #0000002b;z-index:10;min-width:120px}.open-drop-button-downwards,.open-drop-button-upwards{box-shadow:0 0 var(--box-shadow-blur) #00000029!important}.open-drop-button-downwards{border-radius:var(--border-radius) var(--border-radius) 0 0}.open-drop-button-upwards{border-radius:0 0 var(--border-radius) var(--border-radius)}.dropdown-downwards{border-top:1px solid var(--chips-divider-color);border-radius:0 0 var(--border-radius) var(--border-radius)}.dropdown-upwards{border-bottom:1px solid var(--chips-divider-color);border-radius:var(--border-radius) var(--border-radius) 0 0;top:0}.dropdown-content a{color:#000;padding:6px 16px;text-decoration:none;display:block;font-size:var(--standard-font-size)}.dropdown a:hover{background-color:var(--hover-background);cursor:pointer}.shevron-icon{cursor:pointer;color:var(--icons-color)!important;transition:transform .3s ease}.selected{color:var(--icons-color)!important;font-weight:bolder}.input-filter{height:36px;display:block}.scrollable-settings{max-height:164px;overflow-y:auto}.fixed{position:fixed}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "component", type: HerumInputFieldComponent, selector: "herum-input-field", inputs: ["type", "placeholder", "disabled", "isBlocked", "isValid", "errorMsg", "showErrorMsgGap", "inputValue", "isLoading", "id", "debounceTime", "minValue", "maxValue", "isBlurred", "touched", "ltrMode", "preventMacroKeysPressEvent"], outputs: ["inputValueEmitter"] }], animations: [openClose] });
1624
+ }
1625
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumSelectComponent, decorators: [{
1626
+ type: Component,
1627
+ args: [{ standalone: false, selector: 'herum-select', providers: [CUSTOM_SELECT_CONTROL_VALUE_ACCESSOR], animations: [openClose], template: "<div #dropContainer class=\"dropdown\" dir=\"rtl\"\r\n [ngClass]=\"{'w-100': size === 'responsive', 'fill-container':size === 'fill-container' }\"\r\n (click)=\"toggleDropdown()\">\r\n <button class=\"drop-button internal\" [class]=\"narrowSelect ? 'narrow' : size\"\r\n [ngClass]=\"(isDropdownOpen ? 'open-drop-button-' + dropDownDirection : '')\"\r\n [ngStyle]=\" {'padding': iconPath ? '4px 12px 4px 4px' : null }\">\r\n <div class=\"selected-option-container internal\" [ngClass]=\"{'skeleton-container':_isLoading()}\" *ngIf=\"iconPath\">\r\n <span class=\"title internal\">\r\n <img *ngIf=\"iconPath\" [src]=\"iconPath\" alt=\"icon\" class=\"icon\">\r\n\r\n <span *ngIf=\"!narrowSelect\" [ngClass]=\"{'skeleton':_isLoading(), 'skeleton-text':_isLoading()}\">\r\n {{errorOccurred ? '\u05D4\u05EA\u05E8\u05D7\u05E9\u05D4 \u05E9\u05D2\u05D9\u05D0\u05D4' :title}}\r\n </span>\r\n </span>\r\n\r\n <br *ngIf=\"!_isLoading()\">\r\n\r\n <span class=\"selected-option internal\"\r\n [ngClass]=\"{'skeleton':_isLoading(),'skeleton-text':_isLoading(), 'skeleton-selected-option':_isLoading()}\">\r\n {{selectedOption ? selectedOption[displayBy] : title}}\r\n </span>\r\n </div>\r\n\r\n <ng-container *ngIf=\"iconPath == ''\">\r\n {{selectedOption ? selectedOption[displayBy] : placeholder }}\r\n </ng-container>\r\n\r\n <span class=\"shevron-icon internal\" [ngClass]=\"{'rotate-chevron': isDropdownOpen}\">\r\n <svg class=\"internal\" xmlns=\"http://www.w3.org/2000/svg\" width=\"11.299\" height=\"6.649\"\r\n viewBox=\"0 0 11.299 6.649\">\r\n <path id=\"Vector_43-2\" data-name=\"Vector 43-2\" d=\"M1006.235,549.5,1002,553.735l-4.236-4.235\"\r\n transform=\"translate(-996.35 -548.086)\" fill=\"none\" stroke=\"var(--icons-color)\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" />\r\n </svg>\r\n </span>\r\n </button>\r\n\r\n <div #dropdown id=\"myDropdown\" [ngClass]=\"dropdownClasses\" [@openClose]=\"_getDropdownStates\">\r\n <herum-input-field #filterInput *ngIf=\"options?.length>2 || isAutoComplete\" class=\"input-filter\"\r\n [type]=\"'search'\" [placeholder]=\"filterPlaceholder\" [debounceTime]=\"debounceTime\"\r\n (click)=\"_onStopPropagation($event)\" (inputValueEmitter)=\"_onFilterDropDown($event)\"></herum-input-field>\r\n <ng-container *ngFor=\"let option of isLoadingInput ? skeletonArray : filteredOptions; let index = index\">\r\n <a (click)=\"_onSelectOption(option)\" id=\"select-{{index}}\"\r\n [ngClass]=\"{'selected': isSelectedOption(option), 'skeleton skeleton-text m-3':isLoadingInput}\">\r\n {{option[displayBy]}}</a>\r\n </ng-container>\r\n\r\n <a class=\"text-center\" *ngIf=\"!filteredOptions?.length && !isLoadingInput\">\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D5 \u05EA\u05D5\u05E6\u05D0\u05D5\u05EA</a>\r\n </div>\r\n</div>", styles: [".selected-option{color:var(--secondary-color);font-weight:lighter}.title{width:80%;font-weight:700}.skeleton-selected-option{width:80%}.skeleton-text{width:90%}.skeleton-container{gap:10px;display:flex;flex-direction:column;width:100%}.skeleton-container .title.internal{display:flex}.title.internal span{margin-top:5px;margin-right:5px}.narrow{max-width:unset!important;height:42px}.fill-container{display:flex;width:100%;height:100%}.fill-container .dropdown,.fill-container .dropdown button{width:100%;height:100%}:host:has(.fill-container){width:100%;display:flex}:host:has(.fill-container) #myDropdown{width:100%;position:absolute}:host:has(.fill-container) .drop-button{border-radius:0}\n", ".drop-button{display:flex;background-color:var(--light-background-color);color:var(--disabled-text-color);border:none;cursor:pointer;border-radius:var(--border-radius);box-shadow:0 0 var(--box-shadow-blur) #00000029!important;text-align:right;font-size:var(--standard-font-size);align-items:center;justify-content:space-between}.responsive,.responsive-dropdown{width:100%}.default,.big,.default-dropdown,.big-dropdown{min-width:300px}.responsive,.default,.big{padding:16px}.responsive,.default{height:var(--atom-input-height)}.big{height:42px}.fit,.fit-dropdown{min-width:180px}.min,.min-dropdown{min-width:95px}.fit,.min{padding:8px}.drop-button:hover,.drop-button:focus{outline:1px solid var(--icons-color-light-2)}.dropdown{position:relative;display:inline-block}button{position:relative}::ng-deep .dropdown-content{position:absolute;background-color:#fff;box-shadow:0 1px 4px #0000002b;z-index:10;min-width:120px}.open-drop-button-downwards,.open-drop-button-upwards{box-shadow:0 0 var(--box-shadow-blur) #00000029!important}.open-drop-button-downwards{border-radius:var(--border-radius) var(--border-radius) 0 0}.open-drop-button-upwards{border-radius:0 0 var(--border-radius) var(--border-radius)}.dropdown-downwards{border-top:1px solid var(--chips-divider-color);border-radius:0 0 var(--border-radius) var(--border-radius)}.dropdown-upwards{border-bottom:1px solid var(--chips-divider-color);border-radius:var(--border-radius) var(--border-radius) 0 0;top:0}.dropdown-content a{color:#000;padding:6px 16px;text-decoration:none;display:block;font-size:var(--standard-font-size)}.dropdown a:hover{background-color:var(--hover-background);cursor:pointer}.shevron-icon{cursor:pointer;color:var(--icons-color)!important;transition:transform .3s ease}.selected{color:var(--icons-color)!important;font-weight:bolder}.input-filter{height:36px;display:block}.scrollable-settings{max-height:164px;overflow-y:auto}.fixed{position:fixed}\n"] }]
1628
+ }], propDecorators: { options: [{
1629
+ type: Input
1630
+ }], displayBy: [{
1631
+ type: Input
1632
+ }], placeholder: [{
1633
+ type: Input
1634
+ }], selectedOption: [{
1635
+ type: Input
1636
+ }], disabled: [{
1637
+ type: Input
1638
+ }], isDropDownInPositionFixed: [{
1639
+ type: Input
1640
+ }], iconPath: [{
1641
+ type: Input
1642
+ }], isAutoComplete: [{
1643
+ type: Input
1644
+ }], title: [{
1645
+ type: Input
1646
+ }], size: [{
1647
+ type: Input
1648
+ }], displayLoadingMode: [{
1649
+ type: Input
1650
+ }], isLoadingInput: [{
1651
+ type: Input
1652
+ }], dropDownDirection: [{
1653
+ type: Input
1654
+ }], filterPlaceholder: [{
1655
+ type: Input
1656
+ }], debounceTime: [{
1657
+ type: Input
1658
+ }], selectedOptionEmitter: [{
1659
+ type: Output
1660
+ }], filterTextEmitter: [{
1661
+ type: Output
1662
+ }], filterInput: [{
1663
+ type: ViewChild,
1664
+ args: ['filterInput']
1665
+ }], dropContainer: [{
1666
+ type: ViewChild,
1667
+ args: ['dropContainer']
1668
+ }], dropdown: [{
1669
+ type: ViewChild,
1670
+ args: ['dropdown']
1671
+ }], onClick: [{
1672
+ type: HostListener,
1673
+ args: ['window:click', ['$event']]
1674
+ }], onResize: [{
1675
+ type: HostListener,
1676
+ args: ['window:resize', ['$event']]
1677
+ }] } });
1678
+
1679
+ const smallSize = 'small';
1680
+ class HerumSliderComponent {
1681
+ size = 'default';
1682
+ maxSliderValue;
1683
+ currentSliderValue;
1684
+ initSlider;
1685
+ l;
1686
+ isDraggingEmitter = new EventEmitter();
1687
+ updatedSliderValue = new EventEmitter();
1688
+ slider;
1689
+ progress;
1690
+ isDragging = false;
1691
+ ngOnChanges(changes) {
1692
+ if (changes['currentSliderValue']) {
1693
+ if (changes['currentSliderValue'].currentValue === 0)
1694
+ this.progress = 0;
1695
+ else
1696
+ this.progress = (100 / this.maxSliderValue) * changes['currentSliderValue'].currentValue;
1697
+ }
1698
+ }
1699
+ _onUpdateProgressMouseClicked(event) {
1700
+ this.updateSliderOnMouseEvent(event);
1701
+ }
1702
+ _onUpdateProgressMouseDown(event) {
1703
+ event.preventDefault();
1704
+ this.isDragging = true;
1705
+ document.body.classList.add('grabbing');
1706
+ this.isDraggingEmitter.emit(true);
1707
+ const mouseMoveListener = (event) => { this.updateSliderOnMouseEvent(event); };
1708
+ const mouseUpListener = () => {
1709
+ this.isDragging = false;
1710
+ document.body.classList.remove('grabbing');
1711
+ this.isDraggingEmitter.emit(false);
1712
+ document.removeEventListener('mousemove', mouseMoveListener);
1713
+ document.removeEventListener('mouseup', mouseUpListener);
1714
+ };
1715
+ document.addEventListener('mouseup', mouseUpListener);
1716
+ document.addEventListener('mousemove', mouseMoveListener);
1717
+ }
1718
+ calculateSliderProgress() {
1719
+ return this.progress === 100 ? this.progress - 1.5 : this.progress;
1720
+ }
1721
+ isSmallSizeSlider() {
1722
+ return this.size === smallSize;
1723
+ }
1724
+ updateSliderOnMouseEvent(event) {
1725
+ const containerWidth = this.slider.nativeElement.clientWidth;
1726
+ const offsetX = event.pageX - this.slider.nativeElement.getBoundingClientRect().left;
1727
+ this.updatedSliderValue.emit((offsetX / containerWidth) * this.maxSliderValue);
1728
+ }
1729
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1730
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumSliderComponent, isStandalone: false, selector: "herum-slider", inputs: { size: "size", maxSliderValue: "maxSliderValue", currentSliderValue: "currentSliderValue", initSlider: "initSlider" }, outputs: { isDraggingEmitter: "isDraggingEmitter", updatedSliderValue: "updatedSliderValue" }, viewQueries: [{ propertyName: "slider", first: true, predicate: ["slider"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"slider-container\" (click)=\"_onUpdateProgressMouseClicked($event)\">\r\n <div #slider class=\"slider-wrapper\" [ngClass]=\"{'small-slider-wrapper':isSmallSizeSlider()}\"\r\n [ngStyle]=\"{'cursor': isDragging ? 'grabbing' : 'grab'}\" (mousedown)=\"_onUpdateProgressMouseDown($event)\">\r\n <div class=\"slider-track\" [style.width.%]=\"calculateSliderProgress()\"></div>\r\n\r\n <div class=\"slider-thumb\" [style.left.%]=\"calculateSliderProgress()\"\r\n [ngClass]=\"{'small-slider-thumb': isSmallSizeSlider()}\">\r\n </div>\r\n </div>\r\n</div>", styles: [":host{width:100%}.slider-container{padding-block:8px;cursor:pointer}.slider-wrapper{position:relative;width:100%;height:2px;background-color:#00000042;max-width:calc(100% - 6px);padding:0}.slider-track{left:0;height:100%;width:100%;transition:width .2s linear}.slider-track,.slider-thumb{position:absolute;top:0;background-color:var(--light-background-color)}.slider-thumb{border-radius:50%;cursor:grab;top:-6px;width:14px;height:14px;transition:left .2s linear}.small-slider-thumb{width:10px;height:10px;top:-4px}.small-slider-wrapper{height:2px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
1731
+ }
1732
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumSliderComponent, decorators: [{
1733
+ type: Component,
1734
+ args: [{ standalone: false, selector: 'herum-slider', template: "<div class=\"slider-container\" (click)=\"_onUpdateProgressMouseClicked($event)\">\r\n <div #slider class=\"slider-wrapper\" [ngClass]=\"{'small-slider-wrapper':isSmallSizeSlider()}\"\r\n [ngStyle]=\"{'cursor': isDragging ? 'grabbing' : 'grab'}\" (mousedown)=\"_onUpdateProgressMouseDown($event)\">\r\n <div class=\"slider-track\" [style.width.%]=\"calculateSliderProgress()\"></div>\r\n\r\n <div class=\"slider-thumb\" [style.left.%]=\"calculateSliderProgress()\"\r\n [ngClass]=\"{'small-slider-thumb': isSmallSizeSlider()}\">\r\n </div>\r\n </div>\r\n</div>", styles: [":host{width:100%}.slider-container{padding-block:8px;cursor:pointer}.slider-wrapper{position:relative;width:100%;height:2px;background-color:#00000042;max-width:calc(100% - 6px);padding:0}.slider-track{left:0;height:100%;width:100%;transition:width .2s linear}.slider-track,.slider-thumb{position:absolute;top:0;background-color:var(--light-background-color)}.slider-thumb{border-radius:50%;cursor:grab;top:-6px;width:14px;height:14px;transition:left .2s linear}.small-slider-thumb{width:10px;height:10px;top:-4px}.small-slider-wrapper{height:2px}\n"] }]
1735
+ }], propDecorators: { size: [{
1736
+ type: Input
1737
+ }], maxSliderValue: [{
1738
+ type: Input
1739
+ }], currentSliderValue: [{
1740
+ type: Input
1741
+ }], initSlider: [{
1742
+ type: Input
1743
+ }], isDraggingEmitter: [{
1744
+ type: Output
1745
+ }], updatedSliderValue: [{
1746
+ type: Output
1747
+ }], slider: [{
1748
+ type: ViewChild,
1749
+ args: ['slider']
1750
+ }] } });
1751
+
1752
+ class HerumSpinnerComponent {
1753
+ size = 'default-size';
1754
+ borderColor = 'default-border-color';
1755
+ borderWidth = 'default-border-width';
1756
+ borderTopColor = 'default-border-top-color';
1757
+ shape = 'circle';
1758
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1759
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumSpinnerComponent, isStandalone: false, selector: "herum-spinner", inputs: { size: "size", borderColor: "borderColor", borderWidth: "borderWidth", borderTopColor: "borderTopColor", shape: "shape" }, ngImport: i0, template: "<div class=\"spinner\" [ngClass]=\"[size,borderColor, borderTopColor,borderWidth,shape]\"></div>", styles: [".spinner{animation:spin 1s linear infinite;border-style:solid}.default-size{width:16px;height:16px}.default-border-width{border-width:2px}.default-border-color{border-color:var(--disabled-border-color)}.default-border-top-color{border-top-color:var(--icons-color)}.circle{border-radius:50%}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1760
+ }
1761
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumSpinnerComponent, decorators: [{
1762
+ type: Component,
1763
+ args: [{ standalone: false, selector: 'herum-spinner', template: "<div class=\"spinner\" [ngClass]=\"[size,borderColor, borderTopColor,borderWidth,shape]\"></div>", styles: [".spinner{animation:spin 1s linear infinite;border-style:solid}.default-size{width:16px;height:16px}.default-border-width{border-width:2px}.default-border-color{border-color:var(--disabled-border-color)}.default-border-top-color{border-top-color:var(--icons-color)}.circle{border-radius:50%}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
1764
+ }], propDecorators: { size: [{
1765
+ type: Input
1766
+ }], borderColor: [{
1767
+ type: Input
1768
+ }], borderWidth: [{
1769
+ type: Input
1770
+ }], borderTopColor: [{
1771
+ type: Input
1772
+ }], shape: [{
1773
+ type: Input
1774
+ }] } });
1775
+
1776
+ const CUSTOM_SWITCH_CONTROL_VALUE_ACCESSOR = {
1777
+ provide: NG_VALUE_ACCESSOR,
1778
+ useExisting: forwardRef(() => HerumSwitchComponent),
1779
+ multi: true,
1780
+ };
1781
+ class HerumSwitchComponent {
1782
+ isChecked = false;
1783
+ disabled = false;
1784
+ checked = new EventEmitter();
1785
+ _onCheck() {
1786
+ this.isChecked = !this.isChecked;
1787
+ this.checked.emit(this.isChecked);
1788
+ this.onChange(this.isChecked);
1789
+ }
1790
+ onChange = () => { };
1791
+ onTouched = () => { };
1792
+ writeValue(isChecked) {
1793
+ this.isChecked = isChecked;
1794
+ }
1795
+ registerOnChange(fn) {
1796
+ this.onChange = fn;
1797
+ }
1798
+ registerOnTouched(fn) {
1799
+ this.onTouched = fn;
1800
+ }
1801
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumSwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1802
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumSwitchComponent, isStandalone: false, selector: "herum-switch", inputs: { isChecked: "isChecked", disabled: "disabled" }, outputs: { checked: "checked" }, providers: [CUSTOM_SWITCH_CONTROL_VALUE_ACCESSOR], ngImport: i0, template: "<label class=\"switch\" [class.disabled]=\"disabled\">\r\n <input [checked]=\"isChecked\" type=\"checkbox\" (click)=\"_onCheck()\" [disabled]=\"disabled\">\r\n <span class=\"slider round\"></span>\r\n</label>", styles: [":host{--switch-circle-size: 14px;--switch-circle-padding: 2px;--switch-transition-time: .4s;--switch-width: 40px}.switch{position:relative;display:inline-block;width:var(--switch-width);height:calc(var(--switch-width) / 2);background-color:transparent;margin-bottom:0}.switch input{opacity:0;width:0;height:0}.switch.disabled *{cursor:not-allowed}.slider{box-shadow:0 0 var(--box-shadow-blur) #00000029!important;position:absolute;cursor:pointer;inset:0;transition:background-color var(--switch-transition-time);border:1px solid var(--chips-divider-color);background-color:#fff}.slider.round{border-radius:34px}.slider.round:before{border-radius:50%}.slider:before{position:absolute;content:\"\";height:var(--switch-circle-size);width:var(--switch-circle-size);right:var(--switch-circle-padding);bottom:var(--switch-circle-padding);background-color:var(--chips-divider-color);transition:background-color var(--switch-transition-time),transform var(--switch-transition-time)}input:checked+.slider:before{background:var(--primary-color);transform:translate(calc(-1 * var(--switch-width) / 2))}\n"] });
1803
+ }
1804
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumSwitchComponent, decorators: [{
1805
+ type: Component,
1806
+ args: [{ standalone: false, selector: 'herum-switch', providers: [CUSTOM_SWITCH_CONTROL_VALUE_ACCESSOR], template: "<label class=\"switch\" [class.disabled]=\"disabled\">\r\n <input [checked]=\"isChecked\" type=\"checkbox\" (click)=\"_onCheck()\" [disabled]=\"disabled\">\r\n <span class=\"slider round\"></span>\r\n</label>", styles: [":host{--switch-circle-size: 14px;--switch-circle-padding: 2px;--switch-transition-time: .4s;--switch-width: 40px}.switch{position:relative;display:inline-block;width:var(--switch-width);height:calc(var(--switch-width) / 2);background-color:transparent;margin-bottom:0}.switch input{opacity:0;width:0;height:0}.switch.disabled *{cursor:not-allowed}.slider{box-shadow:0 0 var(--box-shadow-blur) #00000029!important;position:absolute;cursor:pointer;inset:0;transition:background-color var(--switch-transition-time);border:1px solid var(--chips-divider-color);background-color:#fff}.slider.round{border-radius:34px}.slider.round:before{border-radius:50%}.slider:before{position:absolute;content:\"\";height:var(--switch-circle-size);width:var(--switch-circle-size);right:var(--switch-circle-padding);bottom:var(--switch-circle-padding);background-color:var(--chips-divider-color);transition:background-color var(--switch-transition-time),transform var(--switch-transition-time)}input:checked+.slider:before{background:var(--primary-color);transform:translate(calc(-1 * var(--switch-width) / 2))}\n"] }]
1807
+ }], propDecorators: { isChecked: [{
1808
+ type: Input
1809
+ }], disabled: [{
1810
+ type: Input
1811
+ }], checked: [{
1812
+ type: Output
1813
+ }] } });
1814
+
1815
+ const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR = {
1816
+ provide: NG_VALUE_ACCESSOR,
1817
+ useExisting: forwardRef(() => HerumTextAreaComponent),
1818
+ multi: true,
1819
+ };
1820
+ class HerumTextAreaComponent {
1821
+ placeholder = defaultPlaceholder$1;
1822
+ disabled = false;
1823
+ formControlName = '';
1824
+ isValid = true;
1825
+ isLoading = false;
1826
+ errorMsg = '';
1827
+ showErrorMsgGap = true;
1828
+ id = '';
1829
+ preventMacroKeysPressEvent = [keyboardAsciiCodes.space, keyboardAsciiCodes.right, keyboardAsciiCodes.left];
1830
+ heightMode = 'regular';
1831
+ fontSize;
1832
+ inputValue = '';
1833
+ maxLength;
1834
+ inputValueEmitter = new EventEmitter();
1835
+ onKeyPress(event) {
1836
+ if (event.target.alt == 'number' && !(event.keyCode >= 48 && event.keyCode <= 57)) {
1837
+ event.preventDefault();
1838
+ }
1839
+ }
1840
+ textarea;
1841
+ touched = false;
1842
+ isBlurred = false;
1843
+ ngAfterViewInit() {
1844
+ if (this.fontSize)
1845
+ this.textarea.nativeElement.style.fontSize = `${this.fontSize}px`;
1846
+ }
1847
+ _onClearTextArea() {
1848
+ this.inputValue = '';
1849
+ this.onChange(this.inputValue);
1850
+ }
1851
+ _onInput(event) {
1852
+ this.onChange(this.inputValue);
1853
+ this.inputValueEmitter.emit(this.inputValue);
1854
+ this.touched = true;
1855
+ }
1856
+ onChange = () => { };
1857
+ onTouched = () => { };
1858
+ writeValue(value) {
1859
+ this.inputValue = value;
1860
+ }
1861
+ registerOnChange(fn) {
1862
+ this.onChange = fn;
1863
+ }
1864
+ registerOnTouched(fn) {
1865
+ this.onTouched = fn;
1866
+ }
1867
+ showErrors() { }
1868
+ setBlurred() {
1869
+ this.isBlurred = true;
1870
+ }
1871
+ get xSvg() {
1872
+ return svgsStrings.X;
1873
+ }
1874
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumTextAreaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1875
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumTextAreaComponent, isStandalone: false, selector: "herum-text-area", inputs: { placeholder: "placeholder", disabled: "disabled", formControlName: "formControlName", isValid: "isValid", isLoading: "isLoading", errorMsg: "errorMsg", showErrorMsgGap: "showErrorMsgGap", id: "id", preventMacroKeysPressEvent: "preventMacroKeysPressEvent", heightMode: "heightMode", fontSize: "fontSize", inputValue: "inputValue", maxLength: "maxLength" }, outputs: { inputValueEmitter: "inputValueEmitter" }, host: { listeners: { "keypress": "onKeyPress($event)" } }, providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR], viewQueries: [{ propertyName: "textarea", first: true, predicate: ["textarea"], descendants: true }], ngImport: i0, template: "<div class=\"input-container custom-resizer\" [ngClass]=\"heightMode\">\r\n <textarea #textarea class=\"input-field no-resizer min-height-input w-100\"\r\n [ngClass]=\"{'error-input':!isValid && touched && isBlurred}\" [placeholder]=\"placeholder\" [disabled]=\"disabled\" [maxlength]=\"maxLength\"\r\n [(ngModel)]=\"inputValue\" [id]=\"id ? id : formControlName\"\r\n [attr.prevent-macro-keys-press-event]=\"preventMacroKeysPressEvent\" (ngModelChange)=\"_onInput($event)\"\r\n (blur)=\"setBlurred()\">\r\n </textarea>\r\n\r\n <span class=\"icon clickable\" *ngIf=\"inputValue && !disabled && !isLoading\" (click)=\"_onClearTextArea()\">\r\n <span class=\"small-icon\" [innerHTML]=\"xSvg | safeHtml\"></span>\r\n </span>\r\n\r\n <herum-spinner class=\"small-icon\" *ngIf=\"isLoading\"></herum-spinner>\r\n</div>\r\n\r\n<ng-container *ngIf=\"!isValid && touched && isBlurred\">\r\n <label class=\"error-msg right\" *ngIf=\"showErrorMsgGap\">\r\n {{ errorMsg }}\r\n </label>\r\n</ng-container>", styles: [":host{--atom-input-height: 60px}.max{height:100%}.max textarea{height:100%!important}textarea{color:var(--text-color)}.min-height-input{min-height:var(--atom-input-height)}.small-icon{position:absolute;cursor:pointer;height:9px;top:16px;left:16px;fill:var(--icons-color)}.custom-resizer{position:relative}.custom-resizer:before{content:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"9.914\" height=\"9.414\" viewBox=\"0 0 9.914 9.414\">%0D%0A <g id=\"Group_955\" data-name=\"Group 955\" transform=\"translate(-1485.894 -372.793)\">%0D%0A <line id=\"Line_326\" data-name=\"Line 326\" x2=\"5\" y2=\"5\" transform=\"translate(1486.602 376.5)\" fill=\"none\" stroke=\"%237897a8\" stroke-linecap=\"round\" stroke-width=\"1\"/>%0D%0A <line id=\"Line_327\" data-name=\"Line 327\" x2=\"8\" y2=\"8\" transform=\"translate(1487.102 373.5)\" fill=\"none\" stroke=\"%237897a8\" stroke-linecap=\"round\" stroke-width=\"1\"/>%0D%0A </g>%0D%0A</svg>%0D%0A');position:absolute;left:0;bottom:-4px;color:green;pointer-events:none}.no-resizer::-webkit-resizer{display:none}.no-resizer::-moz-resizer{display:none}.no-resizer::-ms-resizer{display:none}\n", ".input-container{position:relative;display:flex;align-items:center}.input-container .input-field{padding:8px 12px 8px 30px;color:#000;height:var(--atom-input-height)}.input-field{border:1px solid var(--inactive-border-color);padding:var(--button-padding-size);border-radius:var(--border-radius);font-size:var(--standard-font-size);box-shadow:0 0 var(--box-shadow-blur) #00000029!important}.input-field:hover{border-color:var(--icons-color-light-2)}.input-field:focus{outline:none;border-color:var(--icons-color-light-1);box-shadow:0 0 5px var(--icons-color-light-1)}.input-field::placeholder{color:var(--disabled-text-color)}span{justify-content:center;display:flex}img{height:16px}.right{justify-content:right}.error-input,.error-input:focus{border-color:var(--error-color)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.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: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: HerumSpinnerComponent, selector: "herum-spinner", inputs: ["size", "borderColor", "borderWidth", "borderTopColor", "shape"] }, { kind: "pipe", type: i4.SafeHtmlPipe, name: "safeHtml" }] });
1876
+ }
1877
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumTextAreaComponent, decorators: [{
1878
+ type: Component,
1879
+ args: [{ standalone: false, selector: 'herum-text-area', providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR], template: "<div class=\"input-container custom-resizer\" [ngClass]=\"heightMode\">\r\n <textarea #textarea class=\"input-field no-resizer min-height-input w-100\"\r\n [ngClass]=\"{'error-input':!isValid && touched && isBlurred}\" [placeholder]=\"placeholder\" [disabled]=\"disabled\" [maxlength]=\"maxLength\"\r\n [(ngModel)]=\"inputValue\" [id]=\"id ? id : formControlName\"\r\n [attr.prevent-macro-keys-press-event]=\"preventMacroKeysPressEvent\" (ngModelChange)=\"_onInput($event)\"\r\n (blur)=\"setBlurred()\">\r\n </textarea>\r\n\r\n <span class=\"icon clickable\" *ngIf=\"inputValue && !disabled && !isLoading\" (click)=\"_onClearTextArea()\">\r\n <span class=\"small-icon\" [innerHTML]=\"xSvg | safeHtml\"></span>\r\n </span>\r\n\r\n <herum-spinner class=\"small-icon\" *ngIf=\"isLoading\"></herum-spinner>\r\n</div>\r\n\r\n<ng-container *ngIf=\"!isValid && touched && isBlurred\">\r\n <label class=\"error-msg right\" *ngIf=\"showErrorMsgGap\">\r\n {{ errorMsg }}\r\n </label>\r\n</ng-container>", styles: [":host{--atom-input-height: 60px}.max{height:100%}.max textarea{height:100%!important}textarea{color:var(--text-color)}.min-height-input{min-height:var(--atom-input-height)}.small-icon{position:absolute;cursor:pointer;height:9px;top:16px;left:16px;fill:var(--icons-color)}.custom-resizer{position:relative}.custom-resizer:before{content:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"9.914\" height=\"9.414\" viewBox=\"0 0 9.914 9.414\">%0D%0A <g id=\"Group_955\" data-name=\"Group 955\" transform=\"translate(-1485.894 -372.793)\">%0D%0A <line id=\"Line_326\" data-name=\"Line 326\" x2=\"5\" y2=\"5\" transform=\"translate(1486.602 376.5)\" fill=\"none\" stroke=\"%237897a8\" stroke-linecap=\"round\" stroke-width=\"1\"/>%0D%0A <line id=\"Line_327\" data-name=\"Line 327\" x2=\"8\" y2=\"8\" transform=\"translate(1487.102 373.5)\" fill=\"none\" stroke=\"%237897a8\" stroke-linecap=\"round\" stroke-width=\"1\"/>%0D%0A </g>%0D%0A</svg>%0D%0A');position:absolute;left:0;bottom:-4px;color:green;pointer-events:none}.no-resizer::-webkit-resizer{display:none}.no-resizer::-moz-resizer{display:none}.no-resizer::-ms-resizer{display:none}\n", ".input-container{position:relative;display:flex;align-items:center}.input-container .input-field{padding:8px 12px 8px 30px;color:#000;height:var(--atom-input-height)}.input-field{border:1px solid var(--inactive-border-color);padding:var(--button-padding-size);border-radius:var(--border-radius);font-size:var(--standard-font-size);box-shadow:0 0 var(--box-shadow-blur) #00000029!important}.input-field:hover{border-color:var(--icons-color-light-2)}.input-field:focus{outline:none;border-color:var(--icons-color-light-1);box-shadow:0 0 5px var(--icons-color-light-1)}.input-field::placeholder{color:var(--disabled-text-color)}span{justify-content:center;display:flex}img{height:16px}.right{justify-content:right}.error-input,.error-input:focus{border-color:var(--error-color)}\n"] }]
1880
+ }], propDecorators: { placeholder: [{
1881
+ type: Input
1882
+ }], disabled: [{
1883
+ type: Input
1884
+ }], formControlName: [{
1885
+ type: Input
1886
+ }], isValid: [{
1887
+ type: Input
1888
+ }], isLoading: [{
1889
+ type: Input
1890
+ }], errorMsg: [{
1891
+ type: Input
1892
+ }], showErrorMsgGap: [{
1893
+ type: Input
1894
+ }], id: [{
1895
+ type: Input
1896
+ }], preventMacroKeysPressEvent: [{
1897
+ type: Input
1898
+ }], heightMode: [{
1899
+ type: Input
1900
+ }], fontSize: [{
1901
+ type: Input
1902
+ }], inputValue: [{
1903
+ type: Input
1904
+ }], maxLength: [{
1905
+ type: Input
1906
+ }], inputValueEmitter: [{
1907
+ type: Output
1908
+ }], onKeyPress: [{
1909
+ type: HostListener,
1910
+ args: ['keypress', ['$event']]
1911
+ }], textarea: [{
1912
+ type: ViewChild,
1913
+ args: ['textarea']
1914
+ }] } });
1915
+
1916
+ class HerumTimePickerComponent {
1917
+ elementRef;
1918
+ changeDetectorRef;
1919
+ activeColor = 'green';
1920
+ hoverColor = 'yellow';
1921
+ itemSize = '46px';
1922
+ selectedTime = '00:00:00';
1923
+ showSeconds = true;
1924
+ timeChange = new EventEmitter();
1925
+ hoursColumn;
1926
+ minutesColumn;
1927
+ secondsColumn;
1928
+ hours = Array.from({ length: 24 }, (_, index) => String(index).padStart(2, '0'));
1929
+ minutes = Array.from({ length: 60 }, (_, index) => String(index).padStart(2, '0'));
1930
+ seconds = Array.from({ length: 60 }, (_, index) => String(index).padStart(2, '0'));
1931
+ selectedHour = 0;
1932
+ selectedMinute = 0;
1933
+ selectedSecond = 0;
1934
+ hostElement;
1935
+ columnHeight = '100%';
1936
+ constructor(elementRef, changeDetectorRef) {
1937
+ this.elementRef = elementRef;
1938
+ this.changeDetectorRef = changeDetectorRef;
1939
+ this.hostElement = this.elementRef.nativeElement;
1940
+ }
1941
+ ngOnChanges(changes) {
1942
+ if (this.hostElement) {
1943
+ if (changes['activeColor']?.currentValue)
1944
+ this.hostElement.style.setProperty(timerActiveColorCssVariable, this.activeColor);
1945
+ if (changes['hoverColor']?.currentValue)
1946
+ this.hostElement.style.setProperty(timerHoverColorCssVariable, this.hoverColor);
1947
+ if (changes['itemSize']?.currentValue) {
1948
+ this.hostElement.style.setProperty(timerItemSizeColorCssVariable, this.itemSize);
1949
+ this.calculateColumnHeight();
1950
+ }
1951
+ }
1952
+ if (changes['selectedTime']?.currentValue) {
1953
+ this.setTime(this.selectedTime);
1954
+ this.handleScrollToSelectedTime(this.selectedTime);
1955
+ }
1956
+ }
1957
+ ngAfterViewInit() {
1958
+ this.handleScrollToSelectedTime(this.selectedTime);
1959
+ this.calculateColumnHeight();
1960
+ }
1961
+ _onSelectHour(index) {
1962
+ this.selectedHour = index;
1963
+ this.emitSelectedTime();
1964
+ }
1965
+ _onSelectMinute(index) {
1966
+ this.selectedMinute = index;
1967
+ this.emitSelectedTime();
1968
+ }
1969
+ _onSelectSecond(index) {
1970
+ this.selectedSecond = index;
1971
+ this.emitSelectedTime();
1972
+ }
1973
+ emitSelectedTime() {
1974
+ const formattedTime = this.formatTime(this.selectedHour, this.selectedMinute, this.selectedSecond);
1975
+ this.selectedTime = formattedTime;
1976
+ this.timeChange.emit(formattedTime);
1977
+ }
1978
+ setTime(selectedTime) {
1979
+ [this.selectedHour, this.selectedMinute, this.selectedSecond] = selectedTime.split(':').map(Number);
1980
+ }
1981
+ formatTime(hours, minutes, seconds) {
1982
+ const hoursAndMinutes = `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`;
1983
+ return !this.showSeconds ? hoursAndMinutes : hoursAndMinutes + `:${seconds?.toString().padStart(2, '0')}`;
1984
+ }
1985
+ scrollToSelectedTime(type, index) {
1986
+ let column;
1987
+ switch (type) {
1988
+ case TimeUnit.hours:
1989
+ column = this.hoursColumn;
1990
+ this.selectedHour = index;
1991
+ break;
1992
+ case TimeUnit.minutes:
1993
+ column = this.minutesColumn;
1994
+ this.selectedMinute = index;
1995
+ break;
1996
+ case TimeUnit.seconds:
1997
+ column = this.secondsColumn;
1998
+ this.selectedSecond = index;
1999
+ break;
2000
+ }
2001
+ if (column) {
2002
+ const columnHeight = column.nativeElement.getBoundingClientRect().height;
2003
+ const itemHeight = column.nativeElement.children[index].getBoundingClientRect().height;
2004
+ const itemDistanceFromColumnTop = Math.floor(itemHeight * index) - columnHeight * 0.5 + itemHeight * 0.5;
2005
+ column.nativeElement.scrollTo({ top: itemDistanceFromColumnTop, behavior: 'smooth' });
2006
+ }
2007
+ }
2008
+ handleScrollToSelectedTime(selectedTime) {
2009
+ const [hours, minutes, seconds] = selectedTime.split(':').map(Number);
2010
+ this.scrollToSelectedTime(TimeUnit.minutes, minutes);
2011
+ this.scrollToSelectedTime(TimeUnit.hours, hours);
2012
+ if (this.showSeconds)
2013
+ this.scrollToSelectedTime(TimeUnit.seconds, seconds);
2014
+ }
2015
+ calculateColumnHeight() {
2016
+ const randomColumnElement = this.hoursColumn?.nativeElement;
2017
+ if (!randomColumnElement)
2018
+ return;
2019
+ const randomColumnHeight = randomColumnElement.getBoundingClientRect().height;
2020
+ const items = randomColumnElement.children;
2021
+ const randomItemHeight = items[0].getBoundingClientRect().height;
2022
+ const calculatedHeight = Math.floor(randomColumnHeight / randomItemHeight) * randomItemHeight;
2023
+ this.columnHeight = `${calculatedHeight}px`;
2024
+ this.changeDetectorRef.detectChanges();
2025
+ }
2026
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumTimePickerComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2027
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumTimePickerComponent, isStandalone: false, selector: "herum-time-picker", inputs: { activeColor: "activeColor", hoverColor: "hoverColor", itemSize: "itemSize", selectedTime: "selectedTime", showSeconds: "showSeconds" }, outputs: { timeChange: "timeChange" }, viewQueries: [{ propertyName: "hoursColumn", first: true, predicate: ["hoursColumn"], descendants: true }, { propertyName: "minutesColumn", first: true, predicate: ["minutesColumn"], descendants: true }, { propertyName: "secondsColumn", first: true, predicate: ["secondsColumn"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"time-picker\">\r\n <div *ngIf=\"showSeconds\" class=\"container\">\r\n <div class=\"units-title\">\u05E9\u05E0\u05D9\u05D5\u05EA</div>\r\n\r\n <div #secondsColumn class=\"column\" [ngStyle]=\"{ height: columnHeight }\">\r\n <div class=\"item\" *ngFor=\"let second of seconds; let index = index\" [class.active]=\"selectedSecond === index\"\r\n (click)=\"_onSelectSecond(index)\">\r\n {{ second }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"container\" [ngClass]=\"showSeconds ? 'container-border' : '' \">\r\n <span class=\"units-title\">\u05D3\u05E7\u05D5\u05EA</span>\r\n\r\n <div #minutesColumn class=\"column\" [ngStyle]=\"{ height: columnHeight }\">\r\n <div class=\"item\" *ngFor=\"let minute of minutes; let index = index\" [class.active]=\"selectedMinute === index\"\r\n (click)=\"_onSelectMinute(index)\">\r\n {{ minute }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"container container-border\">\r\n <span class=\"units-title\">\u05E9\u05E2\u05D5\u05EA</span>\r\n\r\n <div #hoursColumn class=\"column\" [ngStyle]=\"{ height: columnHeight }\">\r\n <div class=\"item\" *ngFor=\"let hour of hours; let index = index\" [class.active]=\"selectedHour === index\"\r\n (click)=\"_onSelectHour(index)\">\r\n {{ hour }}\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{--active-timer-color: var(--primary-color);--hover-timer-color: var(--hovered-item-background-color);--item-size: 39px}.time-picker{display:flex;justify-content:space-between;position:relative;height:100%;background-color:var(--light-background-color)}.column{position:relative;text-align:center;overflow-y:auto;flex-grow:1}.container-border{position:absolute;top:0;right:0;border-right:1px solid var(--table-border-color);height:100%}.column::-webkit-scrollbar{display:none}.container{position:relative;display:flex;align-items:center;flex-direction:column;height:100%}.units-title{display:flex;align-items:center;height:40px;text-align:center;font-weight:700}.item{display:flex;align-content:space-between;justify-content:center;align-items:center;cursor:pointer;font-size:var(--standard-font-size);color:var(--disabled-text-color);height:var(--item-size);width:var(--item-size)}.item.active,.item:hover{border-radius:var(--border-radius);cursor:pointer}.item.active{font-size:calc(var(--standard-font-size) * 1.2);background:var(--active-timer-color);color:var(--light-text-color)}.item:hover{background-color:var(--hover-timer-color)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
2028
+ }
2029
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumTimePickerComponent, decorators: [{
2030
+ type: Component,
2031
+ args: [{ standalone: false, selector: 'herum-time-picker', template: "<div class=\"time-picker\">\r\n <div *ngIf=\"showSeconds\" class=\"container\">\r\n <div class=\"units-title\">\u05E9\u05E0\u05D9\u05D5\u05EA</div>\r\n\r\n <div #secondsColumn class=\"column\" [ngStyle]=\"{ height: columnHeight }\">\r\n <div class=\"item\" *ngFor=\"let second of seconds; let index = index\" [class.active]=\"selectedSecond === index\"\r\n (click)=\"_onSelectSecond(index)\">\r\n {{ second }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"container\" [ngClass]=\"showSeconds ? 'container-border' : '' \">\r\n <span class=\"units-title\">\u05D3\u05E7\u05D5\u05EA</span>\r\n\r\n <div #minutesColumn class=\"column\" [ngStyle]=\"{ height: columnHeight }\">\r\n <div class=\"item\" *ngFor=\"let minute of minutes; let index = index\" [class.active]=\"selectedMinute === index\"\r\n (click)=\"_onSelectMinute(index)\">\r\n {{ minute }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"container container-border\">\r\n <span class=\"units-title\">\u05E9\u05E2\u05D5\u05EA</span>\r\n\r\n <div #hoursColumn class=\"column\" [ngStyle]=\"{ height: columnHeight }\">\r\n <div class=\"item\" *ngFor=\"let hour of hours; let index = index\" [class.active]=\"selectedHour === index\"\r\n (click)=\"_onSelectHour(index)\">\r\n {{ hour }}\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{--active-timer-color: var(--primary-color);--hover-timer-color: var(--hovered-item-background-color);--item-size: 39px}.time-picker{display:flex;justify-content:space-between;position:relative;height:100%;background-color:var(--light-background-color)}.column{position:relative;text-align:center;overflow-y:auto;flex-grow:1}.container-border{position:absolute;top:0;right:0;border-right:1px solid var(--table-border-color);height:100%}.column::-webkit-scrollbar{display:none}.container{position:relative;display:flex;align-items:center;flex-direction:column;height:100%}.units-title{display:flex;align-items:center;height:40px;text-align:center;font-weight:700}.item{display:flex;align-content:space-between;justify-content:center;align-items:center;cursor:pointer;font-size:var(--standard-font-size);color:var(--disabled-text-color);height:var(--item-size);width:var(--item-size)}.item.active,.item:hover{border-radius:var(--border-radius);cursor:pointer}.item.active{font-size:calc(var(--standard-font-size) * 1.2);background:var(--active-timer-color);color:var(--light-text-color)}.item:hover{background-color:var(--hover-timer-color)}\n"] }]
2032
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], propDecorators: { activeColor: [{
2033
+ type: Input
2034
+ }], hoverColor: [{
2035
+ type: Input
2036
+ }], itemSize: [{
2037
+ type: Input
2038
+ }], selectedTime: [{
2039
+ type: Input
2040
+ }], showSeconds: [{
2041
+ type: Input
2042
+ }], timeChange: [{
2043
+ type: Output
2044
+ }], hoursColumn: [{
2045
+ type: ViewChild,
2046
+ args: ['hoursColumn']
2047
+ }], minutesColumn: [{
2048
+ type: ViewChild,
2049
+ args: ['minutesColumn']
2050
+ }], secondsColumn: [{
2051
+ type: ViewChild,
2052
+ args: ['secondsColumn']
2053
+ }] } });
2054
+
2055
+ const CUSTOM_TOGGLE_BUTTON_CONTROL_VALUE_ACCESSOR = {
2056
+ provide: NG_VALUE_ACCESSOR,
2057
+ useExisting: forwardRef(() => HerumToggleButtonComponent),
2058
+ multi: true,
2059
+ };
2060
+ class HerumToggleButtonComponent {
2061
+ options = [];
2062
+ selectedOption = 'none';
2063
+ disabled = false;
2064
+ onSelectedOption = new EventEmitter();
2065
+ selectedOptionIndex;
2066
+ ngOnChanges(changes) {
2067
+ if (changes['selectedOption'])
2068
+ this.selectedOptionIndex = this.options.findIndex(option => option == this.selectedOption);
2069
+ }
2070
+ toggleOption(selectedOptionIndex) {
2071
+ this.selectedOption = this.options[selectedOptionIndex];
2072
+ this.selectedOptionIndex = selectedOptionIndex;
2073
+ this.onSelectedOption.emit(this.selectedOption);
2074
+ this.onChange(this.selectedOption);
2075
+ }
2076
+ isOptionSelected(selectedOptionIndex) {
2077
+ return this.selectedOptionIndex === selectedOptionIndex;
2078
+ }
2079
+ isBorderNeeded(elementIndex) {
2080
+ return elementIndex != this.options.length - 1 && !this.isOptionSelected(elementIndex + 1) && !this.isOptionSelected(elementIndex);
2081
+ }
2082
+ onChange = () => { };
2083
+ onTouched = () => { };
2084
+ writeValue(selectedOption) {
2085
+ if (typeof selectedOption === types.string) {
2086
+ this.selectedOption = selectedOption;
2087
+ this.selectedOptionIndex = this.options.findIndex(option => option == this.selectedOption);
2088
+ }
2089
+ }
2090
+ registerOnChange(fn) {
2091
+ this.onChange = fn;
2092
+ }
2093
+ registerOnTouched(fn) {
2094
+ this.onTouched = fn;
2095
+ }
2096
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumToggleButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2097
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumToggleButtonComponent, isStandalone: false, selector: "herum-toggle-button", inputs: { options: "options", selectedOption: "selectedOption", disabled: "disabled" }, outputs: { onSelectedOption: "onSelectedOption" }, providers: [CUSTOM_TOGGLE_BUTTON_CONTROL_VALUE_ACCESSOR], usesOnChanges: true, ngImport: i0, template: "<div class=\"toggle-container\">\r\n <div *ngFor=\"let option of options; let i = index\">\r\n <button [value]=\"i\" (click)=\"toggleOption(i)\" class=\"small\" type=\"button\"\r\n [class.primary]=\"isOptionSelected(i)\" [disabled]=\"disabled\">\r\n {{option}}\r\n </button>\r\n </div>\r\n</div>", styles: [".toggle-container{display:flex;background-color:var(--panels-fill-color);width:fit-content;padding:4px;border-radius:var(--border-radius);transition:background-color 4.3s ease-in-out;box-shadow:0 0 var(--box-shadow-blur) #00000029!important}button{padding:10px;cursor:pointer;color:var(--text-color);border:none;border-radius:var(--border-radius);background-color:transparent;transition:background-color 4.3s ease-in-out}button.primary{background-color:var(--primary-color);color:#fff}.small{box-shadow:none!important}.border-right{border-right:1px solid var(--chips-divider-color)}.hidden-input{display:none}\n", "button{padding:var(--button-padding-size);width:100%;display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;font-weight:500;font-size:var(--standard-font-size);box-shadow:0 0 var(--box-shadow-blur) #00000029!important}button:active{transform:scale(.96)}button:focus-visible{outline:none;transform:scale(.96)}.default-rounded-corners{border-radius:var(--border-radius)}.up-rounded-corners{border-radius:8px 8px 0 0}.down-rounded-corners{border-radius:0 0 8px 8px}shadow{box-shadow:0 0 var(--box-shadow-blur) #00000029!important}.fit{width:fit-content;height:fit-content;padding:4px 8px}.small{min-width:var(--minimum-small-button-width-size);height:var(--small-button-height-size)}.medium{min-width:var(--minimum-medium-button-width-size);height:var(--medium-button-height-size)}.big{min-width:var(--minimum-medium-button-width-size);height:var(--big-button-height-size)}.medium-square{min-width:var(--minimum-medium-quare-button-width-size);height:var(--medium-button-height-size)}.primary{background:var(--primary-color);color:var(--light-text-color)}.primary:hover{background:var(--lighter-primary-color)}.primary:active{background:var(--darker-primary-color)}.white{background:#fff;color:var(--icons-color)}.primary[disabled]{background:var(--disabled-background-color);color:var(--disabled-text-color)}.secondary{background:var(--light-background-color);border:var(--secondary-color) 2px solid;color:var(--secondary-color)}.secondary:hover{background:var(--light-background-color);border:var(--lighter-secondary-color) 2px solid;color:var(--lighter-secondary-color)}.secondary:active{border:var(--darker-secondary-color) 2px solid;color:var(--darker-secondary-color)}.secondary[disabled]{background:var(--disabled-background-color);border:var(--disabled-background-color);color:var(--disabled-text-color)}.ghost{background:transparent;outline:transparent;color:var(--secondary-color);box-shadow:none!important}.ghost:hover{color:var(--lighter-secondary-color)}.ghost:active{background:var(--darker-light-background-color);outline:transparent;color:var(--secondary-color);box-shadow:0 0 var(--box-shadow-blur) #00000029!important}.ghost[disabled]{color:var(--disabled-text-color);background-color:transparent}[disabled]{cursor:not-allowed;color:var(--disabled-text-color)}.error{background:var(--error-color)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
2098
+ }
2099
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumToggleButtonComponent, decorators: [{
2100
+ type: Component,
2101
+ args: [{ standalone: false, selector: 'herum-toggle-button', providers: [CUSTOM_TOGGLE_BUTTON_CONTROL_VALUE_ACCESSOR], template: "<div class=\"toggle-container\">\r\n <div *ngFor=\"let option of options; let i = index\">\r\n <button [value]=\"i\" (click)=\"toggleOption(i)\" class=\"small\" type=\"button\"\r\n [class.primary]=\"isOptionSelected(i)\" [disabled]=\"disabled\">\r\n {{option}}\r\n </button>\r\n </div>\r\n</div>", styles: [".toggle-container{display:flex;background-color:var(--panels-fill-color);width:fit-content;padding:4px;border-radius:var(--border-radius);transition:background-color 4.3s ease-in-out;box-shadow:0 0 var(--box-shadow-blur) #00000029!important}button{padding:10px;cursor:pointer;color:var(--text-color);border:none;border-radius:var(--border-radius);background-color:transparent;transition:background-color 4.3s ease-in-out}button.primary{background-color:var(--primary-color);color:#fff}.small{box-shadow:none!important}.border-right{border-right:1px solid var(--chips-divider-color)}.hidden-input{display:none}\n", "button{padding:var(--button-padding-size);width:100%;display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;font-weight:500;font-size:var(--standard-font-size);box-shadow:0 0 var(--box-shadow-blur) #00000029!important}button:active{transform:scale(.96)}button:focus-visible{outline:none;transform:scale(.96)}.default-rounded-corners{border-radius:var(--border-radius)}.up-rounded-corners{border-radius:8px 8px 0 0}.down-rounded-corners{border-radius:0 0 8px 8px}shadow{box-shadow:0 0 var(--box-shadow-blur) #00000029!important}.fit{width:fit-content;height:fit-content;padding:4px 8px}.small{min-width:var(--minimum-small-button-width-size);height:var(--small-button-height-size)}.medium{min-width:var(--minimum-medium-button-width-size);height:var(--medium-button-height-size)}.big{min-width:var(--minimum-medium-button-width-size);height:var(--big-button-height-size)}.medium-square{min-width:var(--minimum-medium-quare-button-width-size);height:var(--medium-button-height-size)}.primary{background:var(--primary-color);color:var(--light-text-color)}.primary:hover{background:var(--lighter-primary-color)}.primary:active{background:var(--darker-primary-color)}.white{background:#fff;color:var(--icons-color)}.primary[disabled]{background:var(--disabled-background-color);color:var(--disabled-text-color)}.secondary{background:var(--light-background-color);border:var(--secondary-color) 2px solid;color:var(--secondary-color)}.secondary:hover{background:var(--light-background-color);border:var(--lighter-secondary-color) 2px solid;color:var(--lighter-secondary-color)}.secondary:active{border:var(--darker-secondary-color) 2px solid;color:var(--darker-secondary-color)}.secondary[disabled]{background:var(--disabled-background-color);border:var(--disabled-background-color);color:var(--disabled-text-color)}.ghost{background:transparent;outline:transparent;color:var(--secondary-color);box-shadow:none!important}.ghost:hover{color:var(--lighter-secondary-color)}.ghost:active{background:var(--darker-light-background-color);outline:transparent;color:var(--secondary-color);box-shadow:0 0 var(--box-shadow-blur) #00000029!important}.ghost[disabled]{color:var(--disabled-text-color);background-color:transparent}[disabled]{cursor:not-allowed;color:var(--disabled-text-color)}.error{background:var(--error-color)}\n"] }]
2102
+ }], propDecorators: { options: [{
2103
+ type: Input
2104
+ }], selectedOption: [{
2105
+ type: Input
2106
+ }], disabled: [{
2107
+ type: Input
2108
+ }], onSelectedOption: [{
2109
+ type: Output
2110
+ }] } });
2111
+
2112
+ const storyFile = 'story.html';
2113
+ const defaultPlaceholder = 'העלה/י קבצי לומדה...';
2114
+ const invalidUploadKey = 'invalid Upload';
2115
+ const requiredErrorKey = 'required';
2116
+ const CUSTOM_UPLOAD_FILE_CONTROL_VALUE_ACCESSOR = {
2117
+ provide: NG_VALUE_ACCESSOR,
2118
+ useExisting: forwardRef(() => HerumUploadFileComponent),
2119
+ multi: true,
2120
+ };
2121
+ class HerumUploadFileComponent {
2122
+ parentForm;
2123
+ size = 'default';
2124
+ placeholder = defaultPlaceholder;
2125
+ isDirectoryMode = false;
2126
+ allowedFileTypes = [];
2127
+ selectedFile;
2128
+ formControlName;
2129
+ isEditMode;
2130
+ uploadFile = new EventEmitter();
2131
+ fileInput;
2132
+ files;
2133
+ uploadName;
2134
+ filesSuffixes = resourcesFilesSuffixes;
2135
+ fileSuffix;
2136
+ isValidirectory = true;
2137
+ hasTouched = false;
2138
+ uploadFileSvg = svgsStrings.greyUploadFile;
2139
+ constructor(parentForm) {
2140
+ this.parentForm = parentForm;
2141
+ }
2142
+ ngOnChanges(changes) {
2143
+ if (changes.selectedFile && this.selectedFile)
2144
+ this.setExistingFile();
2145
+ }
2146
+ ngAfterViewInit() {
2147
+ this.fileInput.nativeElement.setAttribute('title', '');
2148
+ }
2149
+ _onPreventDefault(event) {
2150
+ event.preventDefault();
2151
+ }
2152
+ _onDrop(event) {
2153
+ this._onPreventDefault(event);
2154
+ event.stopPropagation();
2155
+ const fileList = Array.from(event.dataTransfer.files);
2156
+ this.uploadName = event.dataTransfer?.files[0]?.name;
2157
+ this._onUploadFile(fileList);
2158
+ }
2159
+ _onUploadFile(files) {
2160
+ if (!files.length)
2161
+ return;
2162
+ this.files = [];
2163
+ if (!this.isDirectoryMode) {
2164
+ this.fileSuffix = '.' + files[0]?.name.split('.').pop();
2165
+ if (!this.isFileTypeAllowed()) {
2166
+ this.formControl?.setErrors({ [invalidUploadKey]: true });
2167
+ return;
2168
+ }
2169
+ this.uploadName = files[0]?.name.split('.')[0];
2170
+ }
2171
+ else {
2172
+ this.directoryValidation(Array.from(files));
2173
+ if (!this.isValidirectory) {
2174
+ this.formControl?.setErrors({ [invalidUploadKey]: true });
2175
+ return;
2176
+ }
2177
+ else
2178
+ this.uploadName = files[0]?.webkitRelativePath?.split('/')[0] || '';
2179
+ }
2180
+ this.getIconPath();
2181
+ this.files = files;
2182
+ this.uploadFile.emit(this.files);
2183
+ this.onChange(this.files);
2184
+ this.formControl?.setErrors(null);
2185
+ }
2186
+ setExistingFile() {
2187
+ if (!this.files)
2188
+ this.files = [];
2189
+ this.files.push({
2190
+ name: this.selectedFile.name,
2191
+ lastModified: new Date(this.selectedFile.uploadTime).getTime(),
2192
+ type: this.selectedFile.type,
2193
+ });
2194
+ this.uploadName = this.selectedFile.name;
2195
+ }
2196
+ isFileTypeAllowed() {
2197
+ return (this.fileSuffix && this.allowedFileTypes?.length && !this.allowedFileTypes.some(value => value === undefined)) ? this.allowedFileTypes.includes(this.fileSuffix) : true;
2198
+ }
2199
+ directoryValidation(files) {
2200
+ this.isValidirectory = files.some((file) => { return file.name === storyFile; });
2201
+ }
2202
+ getIconPath() {
2203
+ if (this.isDirectoryMode) {
2204
+ this.uploadFileSvg = svgsStrings.story;
2205
+ return;
2206
+ }
2207
+ let hasFileSuffixFound = false;
2208
+ Object.values(resourcesFilesSuffixes).forEach(fileSuffix => {
2209
+ if (fileSuffix === this.fileSuffix) {
2210
+ this.uploadFileSvg = svgsStrings[fileSuffix];
2211
+ hasFileSuffixFound = true;
2212
+ }
2213
+ });
2214
+ if (!hasFileSuffixFound)
2215
+ this.uploadFileSvg = svgsStrings.greyUploadFile;
2216
+ }
2217
+ _onRemoveFiles(event) {
2218
+ event.stopPropagation();
2219
+ this.fileInput.nativeElement.value = '';
2220
+ this.files = null;
2221
+ this.uploadFile.emit([]);
2222
+ this.onChange([]);
2223
+ this.uploadFileSvg = svgsStrings.greyUploadFile;
2224
+ if (this.isDirectoryMode) {
2225
+ this.fileSuffix = '';
2226
+ this.uploadName = '';
2227
+ }
2228
+ else
2229
+ this.isValidirectory = true;
2230
+ }
2231
+ _onCancelUploadFile() {
2232
+ this.hasTouched = true;
2233
+ this.onTouched();
2234
+ if (!this.files && !this.files?.length && this.formControl)
2235
+ this.formControl.hasError(requiredErrorKey);
2236
+ }
2237
+ getAcceptValue(allowedFileTypes) {
2238
+ if (!allowedFileTypes && !allowedFileTypes?.length)
2239
+ return anySubFileTypeWildCard;
2240
+ return allowedFileTypes.join(', ');
2241
+ }
2242
+ _isTruncatedTitleElement(element) {
2243
+ return element.innerText.includes('...');
2244
+ }
2245
+ onChange = () => { };
2246
+ onTouched = () => { };
2247
+ writeValue(value) {
2248
+ if (value) {
2249
+ !value.length ? this.resetData() : this._onUploadFile(value);
2250
+ if (value.length > 1)
2251
+ this.isDirectoryMode = true;
2252
+ }
2253
+ }
2254
+ resetData() {
2255
+ this.files = undefined;
2256
+ this.fileSuffix = undefined;
2257
+ this.hasTouched = false;
2258
+ this.uploadFileSvg = svgsStrings.greyUploadFile;
2259
+ if (this.fileInput)
2260
+ this.fileInput.nativeElement.value = '';
2261
+ }
2262
+ registerOnChange(fn) {
2263
+ this.onChange = fn;
2264
+ }
2265
+ registerOnTouched(fn) {
2266
+ this.onTouched = fn;
2267
+ }
2268
+ get directoryName() {
2269
+ return this.isEditMode ? this.uploadName : `${this.uploadName}- נבחרו ${this.files?.length} קבצים`;
2270
+ }
2271
+ get formControl() {
2272
+ return this.parentForm?.control.get(this.formControlName);
2273
+ }
2274
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumUploadFileComponent, deps: [{ token: ControlContainer, optional: true }], target: i0.ɵɵFactoryTarget.Component });
2275
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumUploadFileComponent, isStandalone: false, selector: "herum-upload-file", inputs: { size: "size", placeholder: "placeholder", isDirectoryMode: "isDirectoryMode", allowedFileTypes: "allowedFileTypes", selectedFile: "selectedFile", formControlName: "formControlName", isEditMode: "isEditMode" }, outputs: { uploadFile: "uploadFile" }, providers: [CUSTOM_UPLOAD_FILE_CONTROL_VALUE_ACCESSOR], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<button svgOnHover class=\"upload-file-button upload-file-border\" [class]=\"size\" (click)=\"fileInput.click()\"\r\n (drop)=\"_onDrop($event)\" (dragover)=\"_onPreventDefault($event)\">\r\n <ng-container *ngIf=\"!hasTouched && !files\">\r\n <div class=\"placeholder-container\">\r\n <span class=\"upload-file-icon\" [innerHTML]=\"uploadFileSvg | safeHtml\"></span>\r\n <span dir=\"rtl\" class=\"button-placeholder\">{{placeholder}}</span>\r\n </div>\r\n </ng-container>\r\n\r\n <span class=\"error\" *ngIf=\"hasTouched && !files\">\r\n \u05D7\u05D5\u05D1\u05D4 \u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05E7\u05D5\u05D1\u05E5\r\n </span>\r\n\r\n <div svgOnHover *ngIf=\"files?.length>=0\" class=\"file-container\">\r\n <span *ngIf=\"files?.length>0\" class=\"upload-file-icon\" [innerHTML]=\"uploadFileSvg | safeHtml\"></span>\r\n\r\n <ng-container *ngIf=\"!isDirectoryMode\">\r\n <span #fileName class=\"file-name\" *ngIf=\"files?.length\"\r\n [matTooltip]=\"_isTruncatedTitleElement(fileName) ? uploadName : ''\">\r\n {{uploadName | ellipsis:fileName}}\r\n </span>\r\n\r\n <img class=\"delete-button\" *ngIf=\"files?.length\" src=\"../../assets/general/secondary-x.svg\"\r\n (click)=\"_onRemoveFiles($event)\">\r\n\r\n <span class=\"error\" *ngIf=\"!isFileTypeAllowed()\">\u05E1\u05D5\u05D2 \u05D4\u05E7\u05D5\u05D1\u05E5 \u05D0\u05D9\u05E0\u05D5 \u05DE\u05D5\u05E8\u05E9\u05D4/\u05EA\u05E7\u05D9\u05DF</span>\r\n </ng-container>\r\n\r\n <ng-container class=\"cursor-pointer\" *ngIf=\"isDirectoryMode\">\r\n <span class=\"directory-name-upload\" #directoryNameUpload *ngIf=\"files?.length\"\r\n [matTooltip]=\"_isTruncatedTitleElement(directoryNameUpload) ? directoryName : ''\">\r\n {{directoryName | ellipsis:directoryNameUpload}}\r\n </span>\r\n\r\n <img *ngIf=\"files?.length\" class=\"delete-button\" src=\"../../assets/general/secondary-x.svg\"\r\n (click)=\"_onRemoveFiles($event)\">\r\n\r\n <span class=\"error\" *ngIf=\"!isValidirectory\">\u05D4\u05EA\u05D9\u05D9\u05E7\u05D9\u05D4 \u05D0\u05D9\u05E0\u05D4 \u05E1\u05D8\u05D5\u05E8\u05D9</span>\r\n </ng-container>\r\n </div>\r\n</button>\r\n\r\n<input #fileInput class=\"d-none\" type=\"file\" [accept]=\"getAcceptValue(allowedFileTypes)\"\r\n [attr.webkitDirectory]=\"isDirectoryMode ? '' : null\" (change)=\"_onUploadFile($event.target.files)\"\r\n (cancel)=\"_onCancelUploadFile()\">", styles: [":host{padding:0}.upload-file-button{height:var(--atom-input-height);cursor:pointer;position:relative;color:var(--title-color);background:var(--light-background-color);font-size:var(--standard-font-size)}.upload-file-icon{cursor:pointer;stroke:var(--active-color);fill:var(--active-color)}.default{width:195px}.responsive{width:100%}.upload-file-button:hover{background:var(--item-hover-color);border-color:var(--secondary-color)}.upload-file-button:active{transform:scale(.96)}.file-container{display:flex;align-items:center;gap:6px;width:100%}.delete-button{position:absolute;left:8px;z-index:2}.file-name,.directory-name-upload{text-align:right;width:calc(100% - 40px)}.file-name{padding-left:12px}.button-placeholder{color:var(--disabled-text-color);cursor:pointer;width:100%;text-align:right}.error-input,.error-input:focus{border-color:var(--error-color)}.error{color:var(--error-color);width:100%;text-align:right}.placeholder-container{display:flex;gap:8px;width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i4.SafeHtmlPipe, name: "safeHtml" }, { kind: "pipe", type: i4.EllipsisPipe, name: "ellipsis" }] });
2276
+ }
2277
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumUploadFileComponent, decorators: [{
2278
+ type: Component,
2279
+ args: [{ standalone: false, selector: 'herum-upload-file', providers: [CUSTOM_UPLOAD_FILE_CONTROL_VALUE_ACCESSOR], template: "<button svgOnHover class=\"upload-file-button upload-file-border\" [class]=\"size\" (click)=\"fileInput.click()\"\r\n (drop)=\"_onDrop($event)\" (dragover)=\"_onPreventDefault($event)\">\r\n <ng-container *ngIf=\"!hasTouched && !files\">\r\n <div class=\"placeholder-container\">\r\n <span class=\"upload-file-icon\" [innerHTML]=\"uploadFileSvg | safeHtml\"></span>\r\n <span dir=\"rtl\" class=\"button-placeholder\">{{placeholder}}</span>\r\n </div>\r\n </ng-container>\r\n\r\n <span class=\"error\" *ngIf=\"hasTouched && !files\">\r\n \u05D7\u05D5\u05D1\u05D4 \u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05E7\u05D5\u05D1\u05E5\r\n </span>\r\n\r\n <div svgOnHover *ngIf=\"files?.length>=0\" class=\"file-container\">\r\n <span *ngIf=\"files?.length>0\" class=\"upload-file-icon\" [innerHTML]=\"uploadFileSvg | safeHtml\"></span>\r\n\r\n <ng-container *ngIf=\"!isDirectoryMode\">\r\n <span #fileName class=\"file-name\" *ngIf=\"files?.length\"\r\n [matTooltip]=\"_isTruncatedTitleElement(fileName) ? uploadName : ''\">\r\n {{uploadName | ellipsis:fileName}}\r\n </span>\r\n\r\n <img class=\"delete-button\" *ngIf=\"files?.length\" src=\"../../assets/general/secondary-x.svg\"\r\n (click)=\"_onRemoveFiles($event)\">\r\n\r\n <span class=\"error\" *ngIf=\"!isFileTypeAllowed()\">\u05E1\u05D5\u05D2 \u05D4\u05E7\u05D5\u05D1\u05E5 \u05D0\u05D9\u05E0\u05D5 \u05DE\u05D5\u05E8\u05E9\u05D4/\u05EA\u05E7\u05D9\u05DF</span>\r\n </ng-container>\r\n\r\n <ng-container class=\"cursor-pointer\" *ngIf=\"isDirectoryMode\">\r\n <span class=\"directory-name-upload\" #directoryNameUpload *ngIf=\"files?.length\"\r\n [matTooltip]=\"_isTruncatedTitleElement(directoryNameUpload) ? directoryName : ''\">\r\n {{directoryName | ellipsis:directoryNameUpload}}\r\n </span>\r\n\r\n <img *ngIf=\"files?.length\" class=\"delete-button\" src=\"../../assets/general/secondary-x.svg\"\r\n (click)=\"_onRemoveFiles($event)\">\r\n\r\n <span class=\"error\" *ngIf=\"!isValidirectory\">\u05D4\u05EA\u05D9\u05D9\u05E7\u05D9\u05D4 \u05D0\u05D9\u05E0\u05D4 \u05E1\u05D8\u05D5\u05E8\u05D9</span>\r\n </ng-container>\r\n </div>\r\n</button>\r\n\r\n<input #fileInput class=\"d-none\" type=\"file\" [accept]=\"getAcceptValue(allowedFileTypes)\"\r\n [attr.webkitDirectory]=\"isDirectoryMode ? '' : null\" (change)=\"_onUploadFile($event.target.files)\"\r\n (cancel)=\"_onCancelUploadFile()\">", styles: [":host{padding:0}.upload-file-button{height:var(--atom-input-height);cursor:pointer;position:relative;color:var(--title-color);background:var(--light-background-color);font-size:var(--standard-font-size)}.upload-file-icon{cursor:pointer;stroke:var(--active-color);fill:var(--active-color)}.default{width:195px}.responsive{width:100%}.upload-file-button:hover{background:var(--item-hover-color);border-color:var(--secondary-color)}.upload-file-button:active{transform:scale(.96)}.file-container{display:flex;align-items:center;gap:6px;width:100%}.delete-button{position:absolute;left:8px;z-index:2}.file-name,.directory-name-upload{text-align:right;width:calc(100% - 40px)}.file-name{padding-left:12px}.button-placeholder{color:var(--disabled-text-color);cursor:pointer;width:100%;text-align:right}.error-input,.error-input:focus{border-color:var(--error-color)}.error{color:var(--error-color);width:100%;text-align:right}.placeholder-container{display:flex;gap:8px;width:100%}\n"] }]
2280
+ }], ctorParameters: () => [{ type: i1$2.ControlContainer, decorators: [{
2281
+ type: Optional
2282
+ }, {
2283
+ type: Inject,
2284
+ args: [ControlContainer]
2285
+ }] }], propDecorators: { size: [{
2286
+ type: Input
2287
+ }], placeholder: [{
2288
+ type: Input
2289
+ }], isDirectoryMode: [{
2290
+ type: Input
2291
+ }], allowedFileTypes: [{
2292
+ type: Input
2293
+ }], selectedFile: [{
2294
+ type: Input
2295
+ }], formControlName: [{
2296
+ type: Input
2297
+ }], isEditMode: [{
2298
+ type: Input
2299
+ }], uploadFile: [{
2300
+ type: Output
2301
+ }], fileInput: [{
2302
+ type: ViewChild,
2303
+ args: ['fileInput']
2304
+ }] } });
2305
+
2306
+ class HerumVideoSelectComponent {
2307
+ currentVideoSpeed;
2308
+ options = [];
2309
+ selectedOptionEmitter = new EventEmitter();
2310
+ selectedOption = 1;
2311
+ selectedOptionIndexValue = -1;
2312
+ isDropupOpen = false;
2313
+ ngOnChanges(changes) {
2314
+ if (changes['currentVideoSpeed'])
2315
+ this.selectedOption = changes['currentVideoSpeed'].currentValue;
2316
+ }
2317
+ ngOnInit() {
2318
+ window.addEventListener('click', (event) => this.closeDropup(event));
2319
+ }
2320
+ onChange = () => { };
2321
+ onTouched = () => { };
2322
+ writeValue(value) {
2323
+ this.selectedOption = value;
2324
+ }
2325
+ registerOnChange(fn) {
2326
+ this.onChange = fn;
2327
+ }
2328
+ registerOnTouched(fn) {
2329
+ this.onTouched = fn;
2330
+ }
2331
+ _onToggleDropup() {
2332
+ this.isDropupOpen = true;
2333
+ }
2334
+ closeDropup(event) {
2335
+ if (!event.target.matches('.internal'))
2336
+ this.isDropupOpen = false;
2337
+ }
2338
+ selectOption(optionIndex) {
2339
+ this.selectedOptionIndexValue = optionIndex;
2340
+ this.selectedOptionEmitter.emit(Number(this.options[optionIndex]));
2341
+ this.selectedOption = this.options[optionIndex];
2342
+ }
2343
+ isSelectedOption(optionIndex) {
2344
+ return this.selectedOptionIndexValue == optionIndex;
2345
+ }
2346
+ show() {
2347
+ return this.isDropupOpen;
2348
+ }
2349
+ ngOnDestroy() {
2350
+ window.removeEventListener('click', (event) => this.closeDropup(event));
2351
+ }
2352
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumVideoSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2353
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumVideoSelectComponent, isStandalone: false, selector: "herum-video-select", inputs: { currentVideoSpeed: "currentVideoSpeed", options: "options" }, outputs: { selectedOptionEmitter: "selectedOptionEmitter" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"dropup internal\" dir=\"rtl\" (click)=\"_onToggleDropup()\">\r\n <button class=\"drop-button internal selected\"\r\n [ngClass]=\"{'open-drop-button': show(), 'displayed-selected-option':selectedOption }\">\r\n {{selectedOption ? selectedOption +'X' : '1X'}}\r\n </button>\r\n\r\n <div id=\"myDropup\" [ngClass]=\"{'dropup-content': true, 'show': show()}\">\r\n <a *ngFor=\"let option of options; let i=index\" (click)=\"selectOption(i)\"\r\n [ngClass]=\"{'selected': isSelectedOption(i)}\">\r\n {{option}}X\r\n </a>\r\n </div>\r\n</div>", styles: [".drop-button{background-color:transparent;color:var(--disabled-text-color);border:none;cursor:pointer;text-align:center;font-size:var(--standard-font-size);width:40px;padding-block:4px}.dropup{position:relative;display:inline-block}.dropup-content{display:none;background-color:var(--tooltip-background-color);position:absolute;right:-3px;min-width:100%;overflow:auto;border-radius:var(--border-radius) var(--border-radius) 0 0;box-shadow:0 1px 4px #0000002b;z-index:1;top:6%;transform:translateY(-100%)}.dropup-content a{color:var(--light-text-color);padding:8px 7px;text-decoration:none;display:block;font-size:var(--standard-font-size);text-align:center}.dropup-content a:hover{cursor:pointer}.show{display:block}.selected{color:var(--icons-color)!important;font-weight:bolder}.displayed-selected-option{color:var(--text-color)}.selected-option{color:var(--primary-color)}.title{width:80%;font-weight:700}#myDropup{z-index:10}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }] });
2354
+ }
2355
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumVideoSelectComponent, decorators: [{
2356
+ type: Component,
2357
+ args: [{ standalone: false, selector: 'herum-video-select', template: "<div class=\"dropup internal\" dir=\"rtl\" (click)=\"_onToggleDropup()\">\r\n <button class=\"drop-button internal selected\"\r\n [ngClass]=\"{'open-drop-button': show(), 'displayed-selected-option':selectedOption }\">\r\n {{selectedOption ? selectedOption +'X' : '1X'}}\r\n </button>\r\n\r\n <div id=\"myDropup\" [ngClass]=\"{'dropup-content': true, 'show': show()}\">\r\n <a *ngFor=\"let option of options; let i=index\" (click)=\"selectOption(i)\"\r\n [ngClass]=\"{'selected': isSelectedOption(i)}\">\r\n {{option}}X\r\n </a>\r\n </div>\r\n</div>", styles: [".drop-button{background-color:transparent;color:var(--disabled-text-color);border:none;cursor:pointer;text-align:center;font-size:var(--standard-font-size);width:40px;padding-block:4px}.dropup{position:relative;display:inline-block}.dropup-content{display:none;background-color:var(--tooltip-background-color);position:absolute;right:-3px;min-width:100%;overflow:auto;border-radius:var(--border-radius) var(--border-radius) 0 0;box-shadow:0 1px 4px #0000002b;z-index:1;top:6%;transform:translateY(-100%)}.dropup-content a{color:var(--light-text-color);padding:8px 7px;text-decoration:none;display:block;font-size:var(--standard-font-size);text-align:center}.dropup-content a:hover{cursor:pointer}.show{display:block}.selected{color:var(--icons-color)!important;font-weight:bolder}.displayed-selected-option{color:var(--text-color)}.selected-option{color:var(--primary-color)}.title{width:80%;font-weight:700}#myDropup{z-index:10}\n"] }]
2358
+ }], propDecorators: { currentVideoSpeed: [{
2359
+ type: Input
2360
+ }], options: [{
2361
+ type: Input
2362
+ }], selectedOptionEmitter: [{
2363
+ type: Output
2364
+ }] } });
2365
+
2366
+ const CUSTOM_RADIO_BUTTON_CONTROL_VALUE_ACCESSOR = {
2367
+ provide: NG_VALUE_ACCESSOR,
2368
+ useExisting: forwardRef(() => HerumRadioButtonComponent),
2369
+ multi: true,
2370
+ };
2371
+ class HerumRadioButtonComponent {
2372
+ environmentConfig;
2373
+ options = [];
2374
+ isValid = false;
2375
+ errorMsg = '';
2376
+ isVertical = false;
2377
+ selectOptionEmitter = new EventEmitter();
2378
+ isBlocked = false;
2379
+ type;
2380
+ selectedOption;
2381
+ additionalOptionsText = [];
2382
+ showAdditionalOptionsText = false;
2383
+ secondarySelectedOption;
2384
+ selectedOptionId;
2385
+ isSelectedOptionFocused = false;
2386
+ isOptionFocused = false;
2387
+ focusedIdOption;
2388
+ constructor(environmentConfig) {
2389
+ this.environmentConfig = environmentConfig;
2390
+ }
2391
+ ngOnChanges(changes) {
2392
+ if (changes['selectedOption']?.currentValue)
2393
+ this.selectedOptionId = changes['selectedOption'].currentValue;
2394
+ if (changes['type']?.currentValue)
2395
+ changes['type'].currentValue === this.environmentConfig?.radioButtonTypes?.disabled ? this.isBlocked = true : null;
2396
+ }
2397
+ _onSelect(option) {
2398
+ if (this.isBlocked)
2399
+ return;
2400
+ this.selectedOptionId = option.id;
2401
+ this.onChange(option);
2402
+ this.selectOptionEmitter.emit(option.id);
2403
+ }
2404
+ getRadioButtonClasses(id) {
2405
+ let classes = this.isBlocked ? 'not-clickable ' : '';
2406
+ if (this.type === this.environmentConfig?.radioButtonTypes?.disabled && !this.selectedOption)
2407
+ return classes += this.setAllButtonsToDisabled(classes, id);
2408
+ if (id === this.selectedOptionId)
2409
+ classes += this.setSelectedButton(classes);
2410
+ if ((this.isOptionFocused && id !== this.selectedOption && this.selectedOption) || (!this.selectedOption && this.focusedIdOption === id && this.isOptionFocused))
2411
+ classes += `default-focused-radio `;
2412
+ return classes.trim();
2413
+ }
2414
+ setAllButtonsToDisabled(classes, id) {
2415
+ classes += `${this.type}-border `;
2416
+ return this.focusedIdOption === id ? classes += `${this.type}-focused-radio` : classes;
2417
+ }
2418
+ setSelectedButton(classes) {
2419
+ classes += this.type ? `${this.type}-border ` : 'checked-border ';
2420
+ if (this.isSelectedOptionFocused)
2421
+ classes += this.type ? `${this.type}-focused-radio ` : 'default-focused-radio ';
2422
+ return classes;
2423
+ }
2424
+ getRadioButtonInnerCircleClasses(id) {
2425
+ let classes = ``;
2426
+ if (this.type === this.environmentConfig?.radioButtonTypes?.disabled && !this.selectedOption)
2427
+ return `${this.type}-background ${this.type}-inner-circle`;
2428
+ if (id === this.selectedOptionId)
2429
+ classes += this.type ? `${this.type}-background ` : 'checked-background ';
2430
+ classes += this.type === this.environmentConfig?.radioButtonTypes?.disabled || this.type === this.environmentConfig?.radioButtonTypes?.completed ? `${this.type}-inner-circle ` : 'default-inner-circle ';
2431
+ return classes.trim();
2432
+ }
2433
+ _isRadioButtonFocused(id, value) {
2434
+ this.focusedIdOption = id;
2435
+ if (id === this.selectedOption)
2436
+ this.isSelectedOptionFocused = value;
2437
+ else
2438
+ this.isOptionFocused = value;
2439
+ }
2440
+ onChange = () => { };
2441
+ onTouched = () => { };
2442
+ writeValue(value) {
2443
+ if (value === null || value == undefined)
2444
+ return;
2445
+ if (typeof value === 'string' || typeof value === 'number') {
2446
+ this.selectedOptionId = value;
2447
+ return;
2448
+ }
2449
+ this.selectedOptionId = value.id;
2450
+ this.type = value.type;
2451
+ this.isBlocked = value.isBlocked || this.isBlocked;
2452
+ }
2453
+ registerOnChange(fn) {
2454
+ this.onChange = fn;
2455
+ }
2456
+ registerOnTouched(fn) {
2457
+ this.onTouched = fn;
2458
+ }
2459
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumRadioButtonComponent, deps: [{ token: HERUM_SHARED_CONFIG_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
2460
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumRadioButtonComponent, isStandalone: false, selector: "herum-radio-button", inputs: { options: "options", isValid: "isValid", errorMsg: "errorMsg", isVertical: "isVertical", isBlocked: "isBlocked", type: "type", selectedOption: "selectedOption", additionalOptionsText: "additionalOptionsText", showAdditionalOptionsText: "showAdditionalOptionsText", secondarySelectedOption: "secondarySelectedOption" }, outputs: { selectOptionEmitter: "selectOptionEmitter" }, providers: [CUSTOM_RADIO_BUTTON_CONTROL_VALUE_ACCESSOR], usesOnChanges: true, ngImport: i0, template: "<div class=\"options-container\" [ngClass]=\"{'direction-column':isVertical}\">\r\n <label class=\"label\" *ngFor=\"let option of options ;let i = index\">\r\n <div class=\"option\" [attr.includes-additional-option-text]=\" additionalOptionsText[i] ? 'true' : 'false'\"\r\n [attr.type]=\"selectedOptionId===option.id ? type+'-selected': secondarySelectedOption?.id===option.id ? 'checked' : ''\">\r\n <div class=\"radio-container\" [ngClass]=\"getRadioButtonClasses(option.id)\" [tabindex]=\"'radio-' + i\"\r\n id=\"radio-{{option.id}}\" (click)=\"_onSelect(option)\" (blur)=\"_isRadioButtonFocused(option.id,false)\">\r\n <div class=\"inner-circle\" [ngClass]=\"getRadioButtonInnerCircleClasses(option.id)\">\r\n </div>\r\n </div>\r\n\r\n <span class=\"option-name\" [attr.type]=\"type\" [ngClass]=\"{'cursor-pointer':type===undefined}\"\r\n (click)=\"_onSelect(option)\">\r\n {{option?.name }}\r\n </span>\r\n </div>\r\n\r\n <span *ngIf=\"additionalOptionsText[i] && showAdditionalOptionsText\" class=\"additional-option-text\">\r\n {{ additionalOptionsText[i] }}\r\n </span>\r\n </label>\r\n</div>", styles: [":host{width:100%}label{display:inline-flex;align-items:center;gap:8px;margin:0}label .option{display:flex;align-items:center;gap:8px}.options-container{display:flex;flex-direction:row;gap:8px}.radio-container{position:relative;--size: 14px;height:var(--size);width:var(--size);border:calc(var(--size) / 10) solid var(--secondary-color);border-radius:50%;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:inherit;transition:.3s;cursor:pointer}.radio-container:focus{outline:none}.error-focused-radio{border-color:var(--error-color);box-shadow:0 0 5px var(--error-color)}.disabled-focused-radio{border-color:var(--disabled-border-color);box-shadow:0 0 5px var(--disabled-border-color)}.default-focused-radio{border-color:var(--icons-color-light-1);box-shadow:0 0 5px var(--icons-color-light-1)}.inner-circle{position:absolute;border-radius:50%}.default-inner-circle{width:50%;height:50%;top:50%;transform:translate(-50%,-50%)}.disabled-inner-circle,.completed-inner-circle{width:100%;height:100%;top:0%}.checked-background{background-color:var(--icons-color)}.error-background{background-color:var(--error-color)}.completed-background{background-color:#00f;background-image:url(/assets/shared/icons/bigV.svg);background-repeat:no-repeat;background-position:center}.default-background{background-color:var(--error-color)}.disabled-background{background:var(--disabled-background-color);opacity:.5}.checked-border{border:calc(var(--size) / 10) solid var(--icons-color)}.error-border{border:calc(var(--size) / 10) solid var(--error-color)}.disabled-border{border:calc(var(--size) / 10) solid var(--disabled-border-color)}.completed-border{border:blue}input[type=radio]{--size: 16px;position:relative;height:var(--size);width:var(--size);border:calc(var(--size) / 10) solid var(--secondary-color);border-radius:50%;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;font-size:inherit;transition:.3s}.direction-column{flex-direction:column}@media print{input[type=radio]{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto;background:none}}.additional-option-text{flex:1}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2461
+ }
2462
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumRadioButtonComponent, decorators: [{
2463
+ type: Component,
2464
+ args: [{ standalone: false, selector: 'herum-radio-button', providers: [CUSTOM_RADIO_BUTTON_CONTROL_VALUE_ACCESSOR], template: "<div class=\"options-container\" [ngClass]=\"{'direction-column':isVertical}\">\r\n <label class=\"label\" *ngFor=\"let option of options ;let i = index\">\r\n <div class=\"option\" [attr.includes-additional-option-text]=\" additionalOptionsText[i] ? 'true' : 'false'\"\r\n [attr.type]=\"selectedOptionId===option.id ? type+'-selected': secondarySelectedOption?.id===option.id ? 'checked' : ''\">\r\n <div class=\"radio-container\" [ngClass]=\"getRadioButtonClasses(option.id)\" [tabindex]=\"'radio-' + i\"\r\n id=\"radio-{{option.id}}\" (click)=\"_onSelect(option)\" (blur)=\"_isRadioButtonFocused(option.id,false)\">\r\n <div class=\"inner-circle\" [ngClass]=\"getRadioButtonInnerCircleClasses(option.id)\">\r\n </div>\r\n </div>\r\n\r\n <span class=\"option-name\" [attr.type]=\"type\" [ngClass]=\"{'cursor-pointer':type===undefined}\"\r\n (click)=\"_onSelect(option)\">\r\n {{option?.name }}\r\n </span>\r\n </div>\r\n\r\n <span *ngIf=\"additionalOptionsText[i] && showAdditionalOptionsText\" class=\"additional-option-text\">\r\n {{ additionalOptionsText[i] }}\r\n </span>\r\n </label>\r\n</div>", styles: [":host{width:100%}label{display:inline-flex;align-items:center;gap:8px;margin:0}label .option{display:flex;align-items:center;gap:8px}.options-container{display:flex;flex-direction:row;gap:8px}.radio-container{position:relative;--size: 14px;height:var(--size);width:var(--size);border:calc(var(--size) / 10) solid var(--secondary-color);border-radius:50%;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:inherit;transition:.3s;cursor:pointer}.radio-container:focus{outline:none}.error-focused-radio{border-color:var(--error-color);box-shadow:0 0 5px var(--error-color)}.disabled-focused-radio{border-color:var(--disabled-border-color);box-shadow:0 0 5px var(--disabled-border-color)}.default-focused-radio{border-color:var(--icons-color-light-1);box-shadow:0 0 5px var(--icons-color-light-1)}.inner-circle{position:absolute;border-radius:50%}.default-inner-circle{width:50%;height:50%;top:50%;transform:translate(-50%,-50%)}.disabled-inner-circle,.completed-inner-circle{width:100%;height:100%;top:0%}.checked-background{background-color:var(--icons-color)}.error-background{background-color:var(--error-color)}.completed-background{background-color:#00f;background-image:url(/assets/shared/icons/bigV.svg);background-repeat:no-repeat;background-position:center}.default-background{background-color:var(--error-color)}.disabled-background{background:var(--disabled-background-color);opacity:.5}.checked-border{border:calc(var(--size) / 10) solid var(--icons-color)}.error-border{border:calc(var(--size) / 10) solid var(--error-color)}.disabled-border{border:calc(var(--size) / 10) solid var(--disabled-border-color)}.completed-border{border:blue}input[type=radio]{--size: 16px;position:relative;height:var(--size);width:var(--size);border:calc(var(--size) / 10) solid var(--secondary-color);border-radius:50%;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;font-size:inherit;transition:.3s}.direction-column{flex-direction:column}@media print{input[type=radio]{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto;background:none}}.additional-option-text{flex:1}\n"] }]
2465
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2466
+ type: Inject,
2467
+ args: [HERUM_SHARED_CONFIG_TOKEN]
2468
+ }] }], propDecorators: { options: [{
2469
+ type: Input
2470
+ }], isValid: [{
2471
+ type: Input
2472
+ }], errorMsg: [{
2473
+ type: Input
2474
+ }], isVertical: [{
2475
+ type: Input
2476
+ }], selectOptionEmitter: [{
2477
+ type: Output
2478
+ }], isBlocked: [{
2479
+ type: Input
2480
+ }], type: [{
2481
+ type: Input
2482
+ }], selectedOption: [{
2483
+ type: Input
2484
+ }], additionalOptionsText: [{
2485
+ type: Input
2486
+ }], showAdditionalOptionsText: [{
2487
+ type: Input
2488
+ }], secondarySelectedOption: [{
2489
+ type: Input
2490
+ }] } });
2491
+
2492
+ class RoundedVerticalMenuComponent {
2493
+ menuItems = [];
2494
+ currentItem;
2495
+ currentUser;
2496
+ itemSelected = new EventEmitter();
2497
+ ngOnInit() {
2498
+ if (!this.currentItem)
2499
+ this.currentItem = this.menuItems[0];
2500
+ }
2501
+ ngOnChanges(changes) {
2502
+ if (changes.menuItems || changes.currentUser) {
2503
+ this.updateDisabledMenuItems();
2504
+ this.currentItem = this.menuItems.find(menuItem => menuItem.id === this.currentItem?.id);
2505
+ }
2506
+ if (this.currentItem.disabled) {
2507
+ this.currentItem = this.menuItems.find(menuItem => !menuItem.disabled);
2508
+ this._onSelectItem(this.currentItem);
2509
+ }
2510
+ }
2511
+ _onSelectItem(item) {
2512
+ if (item.disabled)
2513
+ return;
2514
+ this.itemSelected.next(item);
2515
+ }
2516
+ updateDisabledMenuItems() {
2517
+ this.menuItems = this.menuItems.map(menuItem => {
2518
+ if (!!menuItem.accessValidator) {
2519
+ const result = menuItem.accessValidator(this.currentUser);
2520
+ if (result)
2521
+ return { ...menuItem, disabledTooltip: result.error, disabled: true };
2522
+ return { ...menuItem, disabledTooltip: null, disabled: false };
2523
+ }
2524
+ return menuItem;
2525
+ });
2526
+ }
2527
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: RoundedVerticalMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2528
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: RoundedVerticalMenuComponent, isStandalone: false, selector: "rounded-vertical-menu", inputs: { menuItems: "menuItems", currentItem: "currentItem", currentUser: "currentUser" }, outputs: { itemSelected: "itemSelected" }, usesOnChanges: true, ngImport: i0, template: "<ul class=\"nav-list\">\r\n <li *ngFor=\"let item of menuItems\" [class.active]=\"item === currentItem\" (click)=\"_onSelectItem(item)\"\r\n [class.disabled]=\"item.disabled\" appHerumToolTip [matTooltip]=\"item.disabledTooltip\">\r\n <img src=\"assets/hadracha/creation-icons/{{item.disabled ? 'disabled' : item === currentItem ? 'active' : 'regular'}}/{{ item.iconName }}.svg\"\r\n alt=\"{{ item.label }} icon\">\r\n <a>{{ item.label }}</a>\r\n </li>\r\n</ul>", styles: [":host{--body-bg: var(--light-background-color);--nav-bg: var(--icons-color);--nav-width: 15%}.nav-list{list-style:none;margin:0;padding:0;display:grid;gap:1rem}.nav-list li{padding-block:1rem;padding-inline:2rem;display:flex;gap:8px}.nav-list li a{color:#fff;text-decoration:none;display:block;font-size:14px;cursor:pointer}.nav-list li.active{view-transition-name:nav;background:var(--body-bg);border-radius:0 100vw 100vw 0;position:relative}.nav-list li.active a{color:var(--title-color)}.nav-list li.active:before,.nav-list li.active:after{--r: 1rem;content:\"\";position:absolute;width:var(--r);height:var(--r);left:0;background:var(--nav-bg)}.nav-list li.active:before{border-radius:0 0 0 var(--r);top:calc(-1 * var(--r));box-shadow:-5px 5px 0 5px var(--body-bg)}.nav-list li.active:after{border-radius:var(--r) 0 0 0;bottom:calc(-1 * var(--r));box-shadow:-5px -5px 0 5px var(--body-bg)}.nav-list li.active ::view-transition-group(nav){animation-duration:1s}.nav-list li.disabled{cursor:not-allowed}.nav-list li.disabled a{color:var(--disabled-text-color);cursor:not-allowed}.nav-list li:nth-child(1) a{view-transition-name:test}.nav-list li:nth-child(2) a{view-transition-name:test-2}.nav-list li:nth-child(3) a{view-transition-name:test-3}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
2529
+ }
2530
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: RoundedVerticalMenuComponent, decorators: [{
2531
+ type: Component,
2532
+ args: [{ standalone: false, selector: 'rounded-vertical-menu', template: "<ul class=\"nav-list\">\r\n <li *ngFor=\"let item of menuItems\" [class.active]=\"item === currentItem\" (click)=\"_onSelectItem(item)\"\r\n [class.disabled]=\"item.disabled\" appHerumToolTip [matTooltip]=\"item.disabledTooltip\">\r\n <img src=\"assets/hadracha/creation-icons/{{item.disabled ? 'disabled' : item === currentItem ? 'active' : 'regular'}}/{{ item.iconName }}.svg\"\r\n alt=\"{{ item.label }} icon\">\r\n <a>{{ item.label }}</a>\r\n </li>\r\n</ul>", styles: [":host{--body-bg: var(--light-background-color);--nav-bg: var(--icons-color);--nav-width: 15%}.nav-list{list-style:none;margin:0;padding:0;display:grid;gap:1rem}.nav-list li{padding-block:1rem;padding-inline:2rem;display:flex;gap:8px}.nav-list li a{color:#fff;text-decoration:none;display:block;font-size:14px;cursor:pointer}.nav-list li.active{view-transition-name:nav;background:var(--body-bg);border-radius:0 100vw 100vw 0;position:relative}.nav-list li.active a{color:var(--title-color)}.nav-list li.active:before,.nav-list li.active:after{--r: 1rem;content:\"\";position:absolute;width:var(--r);height:var(--r);left:0;background:var(--nav-bg)}.nav-list li.active:before{border-radius:0 0 0 var(--r);top:calc(-1 * var(--r));box-shadow:-5px 5px 0 5px var(--body-bg)}.nav-list li.active:after{border-radius:var(--r) 0 0 0;bottom:calc(-1 * var(--r));box-shadow:-5px -5px 0 5px var(--body-bg)}.nav-list li.active ::view-transition-group(nav){animation-duration:1s}.nav-list li.disabled{cursor:not-allowed}.nav-list li.disabled a{color:var(--disabled-text-color);cursor:not-allowed}.nav-list li:nth-child(1) a{view-transition-name:test}.nav-list li:nth-child(2) a{view-transition-name:test-2}.nav-list li:nth-child(3) a{view-transition-name:test-3}\n"] }]
2533
+ }], propDecorators: { menuItems: [{
2534
+ type: Input
2535
+ }], currentItem: [{
2536
+ type: Input
2537
+ }], currentUser: [{
2538
+ type: Input
2539
+ }], itemSelected: [{
2540
+ type: Output
2541
+ }] } });
2542
+
2543
+ class TrackTextChangesNotesComponent {
2544
+ textChanges;
2545
+ enableDeleteNote = true;
2546
+ deleteNoteChange = new EventEmitter();
2547
+ hoverNote = new EventEmitter();
2548
+ noteTypesToDisplay;
2549
+ ngOnChanges(changes) {
2550
+ if (changes['textChanges']?.currentValue)
2551
+ this.setNoteTypesToDisplay();
2552
+ }
2553
+ setNoteTypesToDisplay() {
2554
+ this.noteTypesToDisplay = this.textChanges.map(textChange => {
2555
+ switch (textChange.type) {
2556
+ case 'addition':
2557
+ return 'טקסט שנוסף';
2558
+ case 'deletion':
2559
+ return 'טקסט שנמחק';
2560
+ case 'comment':
2561
+ return 'טקסט מסומן';
2562
+ case 'generalNote':
2563
+ return 'הערה כללית';
2564
+ }
2565
+ });
2566
+ }
2567
+ _onDeleteTextChange(textChangeToDelete) {
2568
+ const index = this.textChanges.findIndex(textChange => textChange === textChangeToDelete);
2569
+ if (index !== -1)
2570
+ this.textChanges.splice(index, 1);
2571
+ this.deleteNoteChange.emit(this.textChanges);
2572
+ this.setNoteTypesToDisplay();
2573
+ }
2574
+ _onHoverNote(hoveredTextChange) {
2575
+ this.hoverNote.emit(hoveredTextChange);
2576
+ }
2577
+ _trackNote(index, textChange) {
2578
+ return textChange.id || index;
2579
+ }
2580
+ get deleteSvgString() {
2581
+ return svgsStrings.X;
2582
+ }
2583
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: TrackTextChangesNotesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2584
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: TrackTextChangesNotesComponent, isStandalone: false, selector: "track-text-changes-notes", inputs: { textChanges: "textChanges", enableDeleteNote: "enableDeleteNote" }, outputs: { deleteNoteChange: "deleteNoteChange", hoverNote: "hoverNote" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"notes-title\">\u05D4\u05E2\u05E8\u05D5\u05EA</div>\r\n\r\n<div *ngIf=\"textChanges?.length; else noNotes\" class=\"notes\">\r\n <div class=\"note\" *ngFor=\"let textChange of textChanges; let index=index; trackBy:_trackNote\">\r\n <button *ngIf=\"enableDeleteNote\" class=\"delete-button\" (click)=\"_onDeleteTextChange(textChange)\">\r\n <span class=\"delete-icon\" [innerHTML]=\"deleteSvgString | safeHtml\"> </span>\r\n </button>\r\n\r\n <div class=\"note-card\" (mouseenter)=\"_onHoverNote(textChange)\" (mouseleave)=\"_onHoverNote(undefined)\">\r\n <ng-container *ngIf=\"textChange.type!=='generalNote'; else generalNote\">\r\n <p class=\"note-header\" [ngClass]=\"[textChange.type]\">\r\n <span [class]=\"textChange.type+'-note'\">{{ textChange.note }}</span>\r\n <span>{{ noteTypesToDisplay[index] }}</span>\r\n </p>\r\n\r\n <p class=\"comment-text\">\r\n {{ textChange.commentText ? textChange.commentText : '\u05DC\u05DC\u05D0 \u05D4\u05E2\u05E8\u05D4' }}\r\n </p>\r\n </ng-container>\r\n\r\n <ng-template #generalNote>\r\n <p class=\"general-note comment-text\">\r\n {{ textChange.note }}\r\n </p>\r\n </ng-template>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #noNotes>\r\n <div>\u05D0\u05D9\u05DF \u05D4\u05E2\u05E8\u05D5\u05EA</div>\r\n</ng-template>", styles: [":host{display:flex;flex-direction:column}.notes-title{font-size:14px;margin-block-end:8px}.notes{display:flex;flex-direction:column;gap:12px;padding-left:8px}.notes .note{display:flex;gap:8px;align-items:flex-start;flex:1}.notes .note .delete-button{padding:0;background:transparent;border:none}.notes .note .delete-icon{fill:var(--text-color)}.notes .note .note-card{background-color:var(--page-background-color);flex:1;border-radius:var(--border-radius)}.notes .note .note-card p{margin-block-end:0;font-size:14px}.notes .note .note-card .note-header,.notes .note .note-card .note,.notes .note .note-card .comment-text{padding:var(--standard-padding)}.notes .note .note-card .note-header{border-radius:var(--border-radius) var(--border-radius) 0 0;display:flex;justify-content:space-between}.notes .note .note-card .note-header .addition-note{color:var(--secondary-color)}.notes .note .note-card .note-header .deletion-note{color:var(--error-color)}.notes .note .note-card .note-header .comment-note{color:var(--positive-color)}.notes .note .note-card .comment-text{border-radius:0 0 var(--border-radius) var(--border-radius)}.notes .note .note-card .general-note{border-radius:var(--border-radius)}.notes .note .addition{color:var(--secondary-color);background-color:color-mix(in srgb,var(--secondary-color) 20%,transparent)}.notes .note .deletion{color:var(--error-color);background-color:var(--light-error-color)}.notes .note .comment{color:var(--positive-color);background-color:var(--light-positive-color)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.SafeHtmlPipe, name: "safeHtml" }] });
2585
+ }
2586
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: TrackTextChangesNotesComponent, decorators: [{
2587
+ type: Component,
2588
+ args: [{ standalone: false, selector: 'track-text-changes-notes', template: "<div class=\"notes-title\">\u05D4\u05E2\u05E8\u05D5\u05EA</div>\r\n\r\n<div *ngIf=\"textChanges?.length; else noNotes\" class=\"notes\">\r\n <div class=\"note\" *ngFor=\"let textChange of textChanges; let index=index; trackBy:_trackNote\">\r\n <button *ngIf=\"enableDeleteNote\" class=\"delete-button\" (click)=\"_onDeleteTextChange(textChange)\">\r\n <span class=\"delete-icon\" [innerHTML]=\"deleteSvgString | safeHtml\"> </span>\r\n </button>\r\n\r\n <div class=\"note-card\" (mouseenter)=\"_onHoverNote(textChange)\" (mouseleave)=\"_onHoverNote(undefined)\">\r\n <ng-container *ngIf=\"textChange.type!=='generalNote'; else generalNote\">\r\n <p class=\"note-header\" [ngClass]=\"[textChange.type]\">\r\n <span [class]=\"textChange.type+'-note'\">{{ textChange.note }}</span>\r\n <span>{{ noteTypesToDisplay[index] }}</span>\r\n </p>\r\n\r\n <p class=\"comment-text\">\r\n {{ textChange.commentText ? textChange.commentText : '\u05DC\u05DC\u05D0 \u05D4\u05E2\u05E8\u05D4' }}\r\n </p>\r\n </ng-container>\r\n\r\n <ng-template #generalNote>\r\n <p class=\"general-note comment-text\">\r\n {{ textChange.note }}\r\n </p>\r\n </ng-template>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #noNotes>\r\n <div>\u05D0\u05D9\u05DF \u05D4\u05E2\u05E8\u05D5\u05EA</div>\r\n</ng-template>", styles: [":host{display:flex;flex-direction:column}.notes-title{font-size:14px;margin-block-end:8px}.notes{display:flex;flex-direction:column;gap:12px;padding-left:8px}.notes .note{display:flex;gap:8px;align-items:flex-start;flex:1}.notes .note .delete-button{padding:0;background:transparent;border:none}.notes .note .delete-icon{fill:var(--text-color)}.notes .note .note-card{background-color:var(--page-background-color);flex:1;border-radius:var(--border-radius)}.notes .note .note-card p{margin-block-end:0;font-size:14px}.notes .note .note-card .note-header,.notes .note .note-card .note,.notes .note .note-card .comment-text{padding:var(--standard-padding)}.notes .note .note-card .note-header{border-radius:var(--border-radius) var(--border-radius) 0 0;display:flex;justify-content:space-between}.notes .note .note-card .note-header .addition-note{color:var(--secondary-color)}.notes .note .note-card .note-header .deletion-note{color:var(--error-color)}.notes .note .note-card .note-header .comment-note{color:var(--positive-color)}.notes .note .note-card .comment-text{border-radius:0 0 var(--border-radius) var(--border-radius)}.notes .note .note-card .general-note{border-radius:var(--border-radius)}.notes .note .addition{color:var(--secondary-color);background-color:color-mix(in srgb,var(--secondary-color) 20%,transparent)}.notes .note .deletion{color:var(--error-color);background-color:var(--light-error-color)}.notes .note .comment{color:var(--positive-color);background-color:var(--light-positive-color)}\n"] }]
2589
+ }], propDecorators: { textChanges: [{
2590
+ type: Input
2591
+ }], enableDeleteNote: [{
2592
+ type: Input
2593
+ }], deleteNoteChange: [{
2594
+ type: Output
2595
+ }], hoverNote: [{
2596
+ type: Output
2597
+ }] } });
2598
+
2599
+ class UserProfileImageComponent {
2600
+ imageSize = 'image-default-size';
2601
+ mode = 'horizontal';
2602
+ user;
2603
+ isLoadingUser;
2604
+ isUserClickAble = false;
2605
+ userClicked = new EventEmitter();
2606
+ imagePath = '';
2607
+ isLoadingImage = true;
2608
+ ngOnChanges(changes) {
2609
+ if (changes['user']?.currentValue && !this.isLoadingUser)
2610
+ this.imagePath = this.userProfileImage;
2611
+ }
2612
+ _onUserClicked() {
2613
+ if (!this.isUserClickAble)
2614
+ return;
2615
+ this.userClicked.emit(this.user);
2616
+ }
2617
+ _useFallbackProfileImage(event) {
2618
+ event.preventDefault();
2619
+ this.imagePath = this.fallbackProfileImage;
2620
+ }
2621
+ _loadComplete() {
2622
+ this.isLoadingImage = false;
2623
+ }
2624
+ get userProfileImage() {
2625
+ if (this.user.pictureUrl)
2626
+ return this.user.pictureUrl;
2627
+ if (!('gender' in this.user))
2628
+ return maleAvatarPath;
2629
+ return (this.user.gender == Gender.Male ? maleAvatarPath : femaleAvatarPath);
2630
+ }
2631
+ get fallbackProfileImage() {
2632
+ if (!this.user)
2633
+ return maleAvatarPath;
2634
+ if (!('gender' in this.user))
2635
+ return maleAvatarPath;
2636
+ return this.user.gender == Gender.Male ? maleAvatarPath : femaleAvatarPath;
2637
+ }
2638
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: UserProfileImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2639
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: UserProfileImageComponent, isStandalone: false, selector: "user-profile-image", inputs: { imageSize: "imageSize", mode: "mode", user: "user", isLoadingUser: "isLoadingUser", isUserClickAble: "isUserClickAble" }, outputs: { userClicked: "userClicked" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"profile-image-container\" [ngClass]=\"[mode]\">\r\n <div class=\"profile-image\"\r\n [ngClass]=\"[imageSize, isLoadingImage || isLoadingUser ? 'skeleton' : '',isUserClickAble ? 'cursor-pointer':'']\"\r\n [style.background-image]=\"'url(' + imagePath + ')'\" (click)=\"_onUserClicked()\"></div>\r\n\r\n <img *ngIf=\"!isLoadingUser\" [src]=\"imagePath\" class=\"profile-image-for-fallback\" [ngClass]=\"[imageSize ]\"\r\n (error)=\"_useFallbackProfileImage($event)\" (load)=\"_loadComplete()\">\r\n <ng-content></ng-content>\r\n</div>", styles: [":host{display:block;position:relative}.profile-image-container{height:100%;width:100%}.profile-image-container .profile-image{height:148px;width:148px;box-shadow:0 3px 6px #00000029!important;border-radius:50%;background-size:cover;position:relative;background-position:center center;align-items:flex-end;display:flex}.profile-image-container .horizontal{flex-direction:row;padding-bottom:8px}.profile-image-container .profile-image-for-fallback{display:none;width:0px;height:0px}.profile-image-container .image-small-size{height:40px;width:40px}.profile-image-container .image-default-size{height:112px;width:112px}.profile-image-container .responsive{height:100%;width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2640
+ }
2641
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: UserProfileImageComponent, decorators: [{
2642
+ type: Component,
2643
+ args: [{ standalone: false, selector: 'user-profile-image', template: "<div class=\"profile-image-container\" [ngClass]=\"[mode]\">\r\n <div class=\"profile-image\"\r\n [ngClass]=\"[imageSize, isLoadingImage || isLoadingUser ? 'skeleton' : '',isUserClickAble ? 'cursor-pointer':'']\"\r\n [style.background-image]=\"'url(' + imagePath + ')'\" (click)=\"_onUserClicked()\"></div>\r\n\r\n <img *ngIf=\"!isLoadingUser\" [src]=\"imagePath\" class=\"profile-image-for-fallback\" [ngClass]=\"[imageSize ]\"\r\n (error)=\"_useFallbackProfileImage($event)\" (load)=\"_loadComplete()\">\r\n <ng-content></ng-content>\r\n</div>", styles: [":host{display:block;position:relative}.profile-image-container{height:100%;width:100%}.profile-image-container .profile-image{height:148px;width:148px;box-shadow:0 3px 6px #00000029!important;border-radius:50%;background-size:cover;position:relative;background-position:center center;align-items:flex-end;display:flex}.profile-image-container .horizontal{flex-direction:row;padding-bottom:8px}.profile-image-container .profile-image-for-fallback{display:none;width:0px;height:0px}.profile-image-container .image-small-size{height:40px;width:40px}.profile-image-container .image-default-size{height:112px;width:112px}.profile-image-container .responsive{height:100%;width:100%}\n"] }]
2644
+ }], propDecorators: { imageSize: [{
2645
+ type: Input
2646
+ }], mode: [{
2647
+ type: Input
2648
+ }], user: [{
2649
+ type: Input
2650
+ }], isLoadingUser: [{
2651
+ type: Input
2652
+ }], isUserClickAble: [{
2653
+ type: Input
2654
+ }], userClicked: [{
2655
+ type: Output
2656
+ }] } });
2657
+
2658
+ class UsersProfilePreviewComponent {
2659
+ users = [];
2660
+ title = '';
2661
+ searchFields = ['militaryId', 'firstName'];
2662
+ placeholder = 'חפש לפי שם / מ.א';
2663
+ filteredUsers = [];
2664
+ ngOnChanges(changes) {
2665
+ if (changes['users']?.currentValue)
2666
+ this.filteredUsers = this.users;
2667
+ }
2668
+ _filterUsers(freeText) {
2669
+ this.filteredUsers = this.users.filter(user => this.searchFields.some((field) => user[field]?.includes(freeText)));
2670
+ }
2671
+ fallbackProfileImage(user) {
2672
+ return user.gender == Gender.Male ? maleAvatarPath : femaleAvatarPath;
2673
+ }
2674
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: UsersProfilePreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2675
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: UsersProfilePreviewComponent, isStandalone: false, selector: "users-profile-preview", inputs: { users: "users", title: "title", searchFields: "searchFields", placeholder: "placeholder" }, usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"users?.length\" class=\"users-profile-preview\">\r\n <herum-input-field type=\"search\" [placeholder]=\"placeholder\"\r\n (inputValueEmitter)=\"_filterUsers($event)\"></herum-input-field>\r\n\r\n <div class=\"users-container\">\r\n <div class=\"user\" *ngFor=\"let user of filteredUsers\">\r\n <div class=\"details\">\r\n <div class=\"profile-image-container\">\r\n <user-profile-image [user]=\"user\" imageSize=\"image-small-size\"></user-profile-image>\r\n\r\n <h2 class=\"user-name section-title m-0\">\r\n {{ user.firstName }} {{ user.lastName }}\r\n </h2>\r\n </div>\r\n\r\n <div class=\"d-flex\">\r\n <p class=\"user-id section-title\">{{user.militaryId}}</p>\r\n\r\n <!-- uncomment when its connected -->\r\n <!-- <img src=\"assets/college/learningArea/menu-button.svg\"> -->\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{height:100%}.users-profile-preview{display:flex;flex-direction:column;gap:12px;height:100%}.users-profile-preview .users-container{display:flex;flex-direction:column;gap:8px;height:90%;overflow-y:auto;padding-block-end:1px}.users-profile-preview .users-container .user{border:1px solid var(--border-separator-color);padding:4px 8px;max-width:100%;border-radius:var(--border-radius);margin-left:1px}.users-profile-preview .users-container .details{display:flex;justify-content:space-between;align-items:center;height:100%}.users-profile-preview .users-container .details .profile-image-container{display:flex;gap:8px;align-items:center}.users-profile-preview .users-container .details .user-id{margin-left:4px;margin-block-end: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: "component", type: HerumInputFieldComponent, selector: "herum-input-field", inputs: ["type", "placeholder", "disabled", "isBlocked", "isValid", "errorMsg", "showErrorMsgGap", "inputValue", "isLoading", "id", "debounceTime", "minValue", "maxValue", "isBlurred", "touched", "ltrMode", "preventMacroKeysPressEvent"], outputs: ["inputValueEmitter"] }, { kind: "component", type: UserProfileImageComponent, selector: "user-profile-image", inputs: ["imageSize", "mode", "user", "isLoadingUser", "isUserClickAble"], outputs: ["userClicked"] }] });
2676
+ }
2677
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: UsersProfilePreviewComponent, decorators: [{
2678
+ type: Component,
2679
+ args: [{ standalone: false, selector: 'users-profile-preview', template: "<div *ngIf=\"users?.length\" class=\"users-profile-preview\">\r\n <herum-input-field type=\"search\" [placeholder]=\"placeholder\"\r\n (inputValueEmitter)=\"_filterUsers($event)\"></herum-input-field>\r\n\r\n <div class=\"users-container\">\r\n <div class=\"user\" *ngFor=\"let user of filteredUsers\">\r\n <div class=\"details\">\r\n <div class=\"profile-image-container\">\r\n <user-profile-image [user]=\"user\" imageSize=\"image-small-size\"></user-profile-image>\r\n\r\n <h2 class=\"user-name section-title m-0\">\r\n {{ user.firstName }} {{ user.lastName }}\r\n </h2>\r\n </div>\r\n\r\n <div class=\"d-flex\">\r\n <p class=\"user-id section-title\">{{user.militaryId}}</p>\r\n\r\n <!-- uncomment when its connected -->\r\n <!-- <img src=\"assets/college/learningArea/menu-button.svg\"> -->\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{height:100%}.users-profile-preview{display:flex;flex-direction:column;gap:12px;height:100%}.users-profile-preview .users-container{display:flex;flex-direction:column;gap:8px;height:90%;overflow-y:auto;padding-block-end:1px}.users-profile-preview .users-container .user{border:1px solid var(--border-separator-color);padding:4px 8px;max-width:100%;border-radius:var(--border-radius);margin-left:1px}.users-profile-preview .users-container .details{display:flex;justify-content:space-between;align-items:center;height:100%}.users-profile-preview .users-container .details .profile-image-container{display:flex;gap:8px;align-items:center}.users-profile-preview .users-container .details .user-id{margin-left:4px;margin-block-end:0}\n"] }]
2680
+ }], propDecorators: { users: [{
2681
+ type: Input
2682
+ }], title: [{
2683
+ type: Input
2684
+ }], searchFields: [{
2685
+ type: Input
2686
+ }], placeholder: [{
2687
+ type: Input
2688
+ }] } });
2689
+
2690
+ class AtomsModule {
2691
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: AtomsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2692
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.17", ngImport: i0, type: AtomsModule, declarations: [CollegeLoaderComponent,
2693
+ UsersProfilePreviewComponent,
2694
+ HerumBreadcrumbsComponent,
2695
+ SliceBreadcrumbsPipe,
2696
+ HerumButtonComponent,
2697
+ HerumCheckboxComponent,
2698
+ HerumChipComponent,
2699
+ HerumCircularProgressBarComponent,
2700
+ HerumDatePickerComponent,
2701
+ HerumDownloadFileComponent,
2702
+ HerumEllipsisLoaderComponent,
2703
+ HerumIconLabelComponent,
2704
+ HerumIndeterminateComponent,
2705
+ ConditionalFormControlNameDirective,
2706
+ HerumInputFieldComponent,
2707
+ HerumLogoComponent,
2708
+ HerumMultiSelectComponent,
2709
+ HerumNarrowCollectionMenuItemComponent,
2710
+ HerumNoResultMessageComponent,
2711
+ HerumOptionsListComponent,
2712
+ HerumPaginatorComponent,
2713
+ HerumPanelLinksComponent,
2714
+ HerumProgressBarComponent,
2715
+ HerumQuizHeaderItemComponent,
2716
+ HerumRecursiveHierarchyOptionsListComponent,
2717
+ HerumSelectComponent,
2718
+ HerumSliderComponent,
2719
+ HerumSpinnerComponent,
2720
+ HerumSwitchComponent,
2721
+ HerumTextAreaComponent,
2722
+ HerumTimePickerComponent,
2723
+ HerumToggleButtonComponent,
2724
+ HerumUploadFileComponent,
2725
+ HerumVideoSelectComponent,
2726
+ HerumRadioButtonComponent,
2727
+ RoundedVerticalMenuComponent,
2728
+ TrackTextChangesNotesComponent,
2729
+ UserProfileImageComponent], imports: [CommonModule,
2730
+ ReactiveFormsModule,
2731
+ FormsModule,
2732
+ MatMenuModule,
2733
+ ClipboardModule,
2734
+ MatAutocompleteModule,
2735
+ MatChipsModule,
2736
+ MatFormFieldModule,
2737
+ MatTooltipModule,
2738
+ MatInputModule,
2739
+ MatSelectModule,
2740
+ MatIconModule,
2741
+ MatCheckboxModule,
2742
+ MatSliderModule,
2743
+ DragDropModule,
2744
+ MatDatepickerModule,
2745
+ MatNativeDateModule,
2746
+ PipesModule], exports: [CollegeLoaderComponent,
2747
+ UsersProfilePreviewComponent,
2748
+ HerumBreadcrumbsComponent,
2749
+ SliceBreadcrumbsPipe,
2750
+ HerumButtonComponent,
2751
+ HerumCheckboxComponent,
2752
+ HerumChipComponent,
2753
+ HerumCircularProgressBarComponent,
2754
+ HerumDatePickerComponent,
2755
+ HerumDownloadFileComponent,
2756
+ HerumEllipsisLoaderComponent,
2757
+ HerumIconLabelComponent,
2758
+ HerumIndeterminateComponent,
2759
+ ConditionalFormControlNameDirective,
2760
+ HerumInputFieldComponent,
2761
+ HerumLogoComponent,
2762
+ HerumMultiSelectComponent,
2763
+ HerumNarrowCollectionMenuItemComponent,
2764
+ HerumNoResultMessageComponent,
2765
+ HerumOptionsListComponent,
2766
+ HerumPaginatorComponent,
2767
+ HerumPanelLinksComponent,
2768
+ HerumProgressBarComponent,
2769
+ HerumQuizHeaderItemComponent,
2770
+ HerumRecursiveHierarchyOptionsListComponent,
2771
+ HerumSelectComponent,
2772
+ HerumSliderComponent,
2773
+ HerumSpinnerComponent,
2774
+ HerumSwitchComponent,
2775
+ HerumTextAreaComponent,
2776
+ HerumTimePickerComponent,
2777
+ HerumToggleButtonComponent,
2778
+ HerumUploadFileComponent,
2779
+ HerumVideoSelectComponent,
2780
+ HerumRadioButtonComponent,
2781
+ RoundedVerticalMenuComponent,
2782
+ TrackTextChangesNotesComponent,
2783
+ UserProfileImageComponent] });
2784
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: AtomsModule, providers: [
2785
+ { provide: MAT_DATE_LOCALE, useValue: 'he-IL' },
2786
+ ], imports: [CommonModule,
2787
+ ReactiveFormsModule,
2788
+ FormsModule,
2789
+ MatMenuModule,
2790
+ ClipboardModule,
2791
+ MatAutocompleteModule,
2792
+ MatChipsModule,
2793
+ MatFormFieldModule,
2794
+ MatTooltipModule,
2795
+ MatInputModule,
2796
+ MatSelectModule,
2797
+ MatIconModule,
2798
+ MatCheckboxModule,
2799
+ MatSliderModule,
2800
+ DragDropModule,
2801
+ MatDatepickerModule,
2802
+ MatNativeDateModule,
2803
+ PipesModule] });
2804
+ }
2805
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: AtomsModule, decorators: [{
2806
+ type: NgModule,
2807
+ args: [{
2808
+ declarations: [
2809
+ CollegeLoaderComponent,
2810
+ UsersProfilePreviewComponent,
2811
+ HerumBreadcrumbsComponent,
2812
+ SliceBreadcrumbsPipe,
2813
+ HerumButtonComponent,
2814
+ HerumCheckboxComponent,
2815
+ HerumChipComponent,
2816
+ HerumCircularProgressBarComponent,
2817
+ HerumDatePickerComponent,
2818
+ HerumDownloadFileComponent,
2819
+ HerumEllipsisLoaderComponent,
2820
+ HerumIconLabelComponent,
2821
+ HerumIndeterminateComponent,
2822
+ ConditionalFormControlNameDirective,
2823
+ HerumInputFieldComponent,
2824
+ HerumLogoComponent,
2825
+ HerumMultiSelectComponent,
2826
+ HerumNarrowCollectionMenuItemComponent,
2827
+ HerumNoResultMessageComponent,
2828
+ HerumOptionsListComponent,
2829
+ HerumPaginatorComponent,
2830
+ HerumPanelLinksComponent,
2831
+ HerumProgressBarComponent,
2832
+ HerumQuizHeaderItemComponent,
2833
+ HerumRecursiveHierarchyOptionsListComponent,
2834
+ HerumSelectComponent,
2835
+ HerumSliderComponent,
2836
+ HerumSpinnerComponent,
2837
+ HerumSwitchComponent,
2838
+ HerumTextAreaComponent,
2839
+ HerumTimePickerComponent,
2840
+ HerumToggleButtonComponent,
2841
+ HerumUploadFileComponent,
2842
+ HerumVideoSelectComponent,
2843
+ HerumRadioButtonComponent,
2844
+ RoundedVerticalMenuComponent,
2845
+ TrackTextChangesNotesComponent,
2846
+ UserProfileImageComponent
2847
+ ],
2848
+ exports: [
2849
+ CollegeLoaderComponent,
2850
+ UsersProfilePreviewComponent,
2851
+ HerumBreadcrumbsComponent,
2852
+ SliceBreadcrumbsPipe,
2853
+ HerumButtonComponent,
2854
+ HerumCheckboxComponent,
2855
+ HerumChipComponent,
2856
+ HerumCircularProgressBarComponent,
2857
+ HerumDatePickerComponent,
2858
+ HerumDownloadFileComponent,
2859
+ HerumEllipsisLoaderComponent,
2860
+ HerumIconLabelComponent,
2861
+ HerumIndeterminateComponent,
2862
+ ConditionalFormControlNameDirective,
2863
+ HerumInputFieldComponent,
2864
+ HerumLogoComponent,
2865
+ HerumMultiSelectComponent,
2866
+ HerumNarrowCollectionMenuItemComponent,
2867
+ HerumNoResultMessageComponent,
2868
+ HerumOptionsListComponent,
2869
+ HerumPaginatorComponent,
2870
+ HerumPanelLinksComponent,
2871
+ HerumProgressBarComponent,
2872
+ HerumQuizHeaderItemComponent,
2873
+ HerumRecursiveHierarchyOptionsListComponent,
2874
+ HerumSelectComponent,
2875
+ HerumSliderComponent,
2876
+ HerumSpinnerComponent,
2877
+ HerumSwitchComponent,
2878
+ HerumTextAreaComponent,
2879
+ HerumTimePickerComponent,
2880
+ HerumToggleButtonComponent,
2881
+ HerumUploadFileComponent,
2882
+ HerumVideoSelectComponent,
2883
+ HerumRadioButtonComponent,
2884
+ RoundedVerticalMenuComponent,
2885
+ TrackTextChangesNotesComponent,
2886
+ UserProfileImageComponent
2887
+ ],
2888
+ imports: [
2889
+ CommonModule,
2890
+ ReactiveFormsModule,
2891
+ FormsModule,
2892
+ MatMenuModule,
2893
+ ClipboardModule,
2894
+ MatAutocompleteModule,
2895
+ MatChipsModule,
2896
+ MatFormFieldModule,
2897
+ MatTooltipModule,
2898
+ MatInputModule,
2899
+ MatSelectModule,
2900
+ MatIconModule,
2901
+ MatCheckboxModule,
2902
+ MatSliderModule,
2903
+ DragDropModule,
2904
+ MatDatepickerModule,
2905
+ MatNativeDateModule,
2906
+ PipesModule
2907
+ ],
2908
+ providers: [
2909
+ { provide: MAT_DATE_LOCALE, useValue: 'he-IL' },
2910
+ ]
2911
+ }]
2912
+ }] });
2913
+
2914
+ /**
2915
+ * Generated bundle index. Do not edit.
2916
+ */
2917
+
2918
+ export { AtomsModule, CollegeLoaderComponent, ConditionalFormControlNameDirective, HerumBreadcrumbsComponent, HerumButtonComponent, HerumCheckboxComponent, HerumChipComponent, HerumCircularProgressBarComponent, HerumDatePickerComponent, HerumDownloadFileComponent, HerumEllipsisLoaderComponent, HerumFormControl, HerumIconLabelComponent, HerumIndeterminateComponent, HerumInputFieldComponent, HerumLogoComponent, HerumMultiSelectComponent, HerumNarrowCollectionMenuItemComponent, HerumNoResultMessageComponent, HerumOptionsListComponent, HerumPaginatorComponent, HerumPanelLinksComponent, HerumProgressBarComponent, HerumQuizHeaderItemComponent, HerumRadioButtonComponent, HerumRecursiveHierarchyOptionsListComponent, HerumSelectComponent, HerumSliderComponent, HerumSpinnerComponent, HerumSwitchComponent, HerumTextAreaComponent, HerumTimePickerComponent, HerumToggleButtonComponent, HerumUploadFileComponent, HerumVideoSelectComponent, RoundedVerticalMenuComponent, SliceBreadcrumbsPipe, TrackTextChangesNotesComponent, UserProfileImageComponent, UsersProfilePreviewComponent };
2919
+ //# sourceMappingURL=herum-shared-atoms.mjs.map