@seniorsistemas/platform-components 5.3.2-develop-a39d6d30 → 5.3.2-feature-ptfbko-691-d0162421

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 (243) hide show
  1. package/esm2022/modules/advanced-filter/advanced-filter.module.mjs +75 -0
  2. package/esm2022/modules/advanced-filter/components/advanced-filter/advanced-filter.component.mjs +128 -0
  3. package/esm2022/modules/advanced-filter/components/form-filter/form-filter.component.mjs +599 -0
  4. package/esm2022/modules/advanced-filter/index.mjs +6 -0
  5. package/esm2022/modules/advanced-filter/locale/fallback.mjs +73 -0
  6. package/esm2022/modules/advanced-filter/models/context.mjs +2 -0
  7. package/esm2022/modules/advanced-filter/models/depends-on.mjs +2 -0
  8. package/esm2022/modules/advanced-filter/models/enum-item.mjs +2 -0
  9. package/esm2022/modules/advanced-filter/models/filter-type.mjs +14 -0
  10. package/esm2022/modules/advanced-filter/models/filter-value.mjs +2 -0
  11. package/esm2022/modules/advanced-filter/models/filter.mjs +41 -0
  12. package/esm2022/modules/advanced-filter/models/form-filter.mjs +28 -0
  13. package/esm2022/modules/advanced-filter/models/index.mjs +11 -0
  14. package/esm2022/modules/advanced-filter/models/scope.mjs +6 -0
  15. package/esm2022/modules/advanced-filter/models/search.mjs +2 -0
  16. package/esm2022/modules/advanced-filter/models/tab-view.mjs +18 -0
  17. package/esm2022/modules/advanced-filter/models/ticked-filter.mjs +2 -0
  18. package/esm2022/modules/advanced-filter/pipes/map-values.pipe.mjs +14 -0
  19. package/esm2022/modules/advanced-filter/pipes/translate.pipe.mjs +19 -0
  20. package/esm2022/modules/advanced-filter/services/advanced-filter.service.mjs +144 -0
  21. package/esm2022/modules/advanced-filter/services/calendar-options.service.mjs +77 -0
  22. package/esm2022/modules/advanced-filter/services/constants.mjs +6 -0
  23. package/esm2022/modules/advanced-filter/shared/constants.mjs +3 -0
  24. package/esm2022/modules/advanced-filter/utils/comparator.mjs +53 -0
  25. package/esm2022/modules/advanced-filter/utils/filter-id/index.mjs +8 -0
  26. package/esm2022/modules/advanced-filter/utils/filter-value/index.mjs +24 -0
  27. package/esm2022/modules/advanced-filter/utils/filterOperators.mjs +9 -0
  28. package/esm2022/modules/advanced-filter/utils/form-field/index.mjs +50 -0
  29. package/esm2022/modules/advanced-filter/utils/index.mjs +57 -0
  30. package/esm2022/modules/advanced-filter/utils/json-path.mjs +12 -0
  31. package/esm2022/modules/cyclic-json-interceptor/cyclic-json-interceptor.module.mjs +14 -0
  32. package/esm2022/modules/cyclic-json-interceptor/cyclic-json-interceptor.service.mjs +27 -0
  33. package/esm2022/modules/cyclic-json-interceptor/index.mjs +2 -0
  34. package/esm2022/modules/feature-toggle/constants/endpoint.constant.mjs +26 -0
  35. package/esm2022/modules/feature-toggle/feature-toggle.module.mjs +15 -0
  36. package/esm2022/modules/feature-toggle/feature-toggle.service.mjs +42 -0
  37. package/esm2022/modules/feature-toggle/index.mjs +4 -0
  38. package/esm2022/modules/feature-toggle/models/feature.mjs +2 -0
  39. package/esm2022/modules/http-interceptor/http-interceptor.module.mjs +16 -0
  40. package/esm2022/modules/http-interceptor/http-interceptor.service.mjs +42 -0
  41. package/esm2022/modules/http-interceptor/index.mjs +4 -0
  42. package/esm2022/modules/http-interceptor/rest-url.service.mjs +15 -0
  43. package/esm2022/modules/http-interceptor/x-services-url.service.mjs +18 -0
  44. package/esm2022/modules/permissions/permissions.config.mjs +17 -0
  45. package/esm2022/modules/permissions/permissions.module.mjs +43 -0
  46. package/esm2022/modules/permissions/permissions.service.mjs +168 -0
  47. package/esm2022/modules/spotlight/component/spotlight.component.mjs +274 -0
  48. package/esm2022/modules/spotlight/index.mjs +3 -0
  49. package/esm2022/modules/spotlight/locale/fallback.mjs +5 -0
  50. package/esm2022/modules/spotlight/models/display-type.enum.mjs +6 -0
  51. package/esm2022/modules/spotlight/models/index.mjs +10 -0
  52. package/esm2022/modules/spotlight/models/spotlight-control-list.interface.mjs +2 -0
  53. package/esm2022/modules/spotlight/models/spotlight-control.interface.mjs +11 -0
  54. package/esm2022/modules/spotlight/models/spotlight-notification.interface.mjs +2 -0
  55. package/esm2022/modules/spotlight/models/spotlight-screen-list.interface.mjs +2 -0
  56. package/esm2022/modules/spotlight/models/spotlight-screen.interface.mjs +2 -0
  57. package/esm2022/modules/spotlight/models/spotlight-status.enum.mjs +8 -0
  58. package/esm2022/modules/spotlight/models/spotlight-user.interface.mjs +2 -0
  59. package/esm2022/modules/spotlight/models/spotlight-users-list.interface.mjs +2 -0
  60. package/esm2022/modules/spotlight/models/spotlight.interface.mjs +2 -0
  61. package/esm2022/modules/spotlight/models/user-action.enum.mjs +7 -0
  62. package/esm2022/modules/spotlight/pipes/translate.pipe.mjs +19 -0
  63. package/esm2022/modules/spotlight/service/spotlight.service.mjs +34 -0
  64. package/esm2022/modules/spotlight/spotlight.module.mjs +53 -0
  65. package/esm2022/modules/translations/translations.module.mjs +182 -0
  66. package/esm2022/public-api.mjs +9 -0
  67. package/esm2022/seniorsistemas-platform-components.mjs +5 -0
  68. package/{fesm2015/seniorsistemas-platform-components.js → fesm2022/seniorsistemas-platform-components.mjs} +731 -655
  69. package/fesm2022/seniorsistemas-platform-components.mjs.map +1 -0
  70. package/index.d.ts +5 -0
  71. package/modules/advanced-filter/advanced-filter.module.d.ts +19 -0
  72. package/modules/advanced-filter/components/advanced-filter/advanced-filter.component.d.ts +3 -2
  73. package/modules/advanced-filter/components/form-filter/form-filter.component.d.ts +8 -8
  74. package/modules/advanced-filter/index.d.ts +1 -0
  75. package/modules/advanced-filter/models/tab-view.d.ts +1 -1
  76. package/modules/advanced-filter/pipes/map-values.pipe.d.ts +3 -0
  77. package/modules/advanced-filter/pipes/translate.pipe.d.ts +3 -2
  78. package/modules/advanced-filter/services/advanced-filter.service.d.ts +5 -2
  79. package/modules/advanced-filter/services/calendar-options.service.d.ts +3 -2
  80. package/modules/advanced-filter/services/constants.d.ts +4 -4
  81. package/modules/advanced-filter/utils/comparator.d.ts +1 -1
  82. package/modules/advanced-filter/utils/form-field/index.d.ts +1 -1
  83. package/modules/advanced-filter/utils/json-path.d.ts +1 -1
  84. package/modules/cyclic-json-interceptor/cyclic-json-interceptor.module.d.ts +4 -0
  85. package/modules/cyclic-json-interceptor/cyclic-json-interceptor.service.d.ts +3 -0
  86. package/modules/feature-toggle/feature-toggle.module.d.ts +5 -0
  87. package/modules/feature-toggle/feature-toggle.service.d.ts +3 -2
  88. package/modules/http-interceptor/http-interceptor.module.d.ts +4 -0
  89. package/modules/http-interceptor/http-interceptor.service.d.ts +3 -3
  90. package/modules/http-interceptor/rest-url.service.d.ts +3 -0
  91. package/modules/http-interceptor/x-services-url.service.d.ts +3 -0
  92. package/modules/permissions/permissions.config.d.ts +7 -1
  93. package/modules/permissions/permissions.module.d.ts +4 -0
  94. package/modules/permissions/permissions.service.d.ts +4 -10
  95. package/modules/spotlight/component/spotlight.component.d.ts +3 -4
  96. package/modules/spotlight/pipes/translate.pipe.d.ts +3 -2
  97. package/modules/spotlight/service/spotlight.service.d.ts +3 -2
  98. package/modules/spotlight/spotlight.module.d.ts +11 -0
  99. package/modules/translations/translations.module.d.ts +10 -4
  100. package/package.json +21 -22
  101. package/bundles/seniorsistemas-platform-components.umd.js +0 -2745
  102. package/bundles/seniorsistemas-platform-components.umd.js.map +0 -1
  103. package/bundles/seniorsistemas-platform-components.umd.min.js +0 -17
  104. package/bundles/seniorsistemas-platform-components.umd.min.js.map +0 -1
  105. package/esm2015/modules/advanced-filter/advanced-filter.module.js +0 -47
  106. package/esm2015/modules/advanced-filter/components/advanced-filter/advanced-filter.component.js +0 -136
  107. package/esm2015/modules/advanced-filter/components/form-filter/form-filter.component.js +0 -578
  108. package/esm2015/modules/advanced-filter/index.js +0 -5
  109. package/esm2015/modules/advanced-filter/locale/fallback.js +0 -73
  110. package/esm2015/modules/advanced-filter/models/context.js +0 -1
  111. package/esm2015/modules/advanced-filter/models/depends-on.js +0 -1
  112. package/esm2015/modules/advanced-filter/models/enum-item.js +0 -1
  113. package/esm2015/modules/advanced-filter/models/filter-type.js +0 -14
  114. package/esm2015/modules/advanced-filter/models/filter-value.js +0 -1
  115. package/esm2015/modules/advanced-filter/models/filter.js +0 -23
  116. package/esm2015/modules/advanced-filter/models/form-filter.js +0 -19
  117. package/esm2015/modules/advanced-filter/models/index.js +0 -5
  118. package/esm2015/modules/advanced-filter/models/scope.js +0 -6
  119. package/esm2015/modules/advanced-filter/models/search.js +0 -1
  120. package/esm2015/modules/advanced-filter/models/tab-view.js +0 -18
  121. package/esm2015/modules/advanced-filter/models/ticked-filter.js +0 -1
  122. package/esm2015/modules/advanced-filter/pipes/map-values.pipe.js +0 -12
  123. package/esm2015/modules/advanced-filter/pipes/translate.pipe.js +0 -22
  124. package/esm2015/modules/advanced-filter/services/advanced-filter.service.js +0 -140
  125. package/esm2015/modules/advanced-filter/services/calendar-options.service.js +0 -81
  126. package/esm2015/modules/advanced-filter/services/constants.js +0 -6
  127. package/esm2015/modules/advanced-filter/shared/constants.js +0 -3
  128. package/esm2015/modules/advanced-filter/utils/comparator.js +0 -55
  129. package/esm2015/modules/advanced-filter/utils/filter-id/index.js +0 -8
  130. package/esm2015/modules/advanced-filter/utils/filter-value/index.js +0 -24
  131. package/esm2015/modules/advanced-filter/utils/filterOperators.js +0 -11
  132. package/esm2015/modules/advanced-filter/utils/form-field/index.js +0 -50
  133. package/esm2015/modules/advanced-filter/utils/index.js +0 -57
  134. package/esm2015/modules/advanced-filter/utils/json-path.js +0 -12
  135. package/esm2015/modules/cyclic-json-interceptor/cyclic-json-interceptor.module.js +0 -14
  136. package/esm2015/modules/cyclic-json-interceptor/cyclic-json-interceptor.service.js +0 -27
  137. package/esm2015/modules/cyclic-json-interceptor/index.js +0 -2
  138. package/esm2015/modules/feature-toggle/constants/endpoint.constant.js +0 -26
  139. package/esm2015/modules/feature-toggle/feature-toggle.module.js +0 -15
  140. package/esm2015/modules/feature-toggle/feature-toggle.service.js +0 -48
  141. package/esm2015/modules/feature-toggle/index.js +0 -3
  142. package/esm2015/modules/feature-toggle/models/feature.js +0 -1
  143. package/esm2015/modules/http-interceptor/http-interceptor.module.js +0 -16
  144. package/esm2015/modules/http-interceptor/http-interceptor.service.js +0 -47
  145. package/esm2015/modules/http-interceptor/index.js +0 -4
  146. package/esm2015/modules/http-interceptor/rest-url.service.js +0 -14
  147. package/esm2015/modules/http-interceptor/x-services-url.service.js +0 -17
  148. package/esm2015/modules/permissions/permissions.config.js +0 -11
  149. package/esm2015/modules/permissions/permissions.module.js +0 -42
  150. package/esm2015/modules/permissions/permissions.service.js +0 -196
  151. package/esm2015/modules/spotlight/component/spotlight.component.js +0 -274
  152. package/esm2015/modules/spotlight/index.js +0 -3
  153. package/esm2015/modules/spotlight/locale/fallback.js +0 -5
  154. package/esm2015/modules/spotlight/models/display-type.enum.js +0 -6
  155. package/esm2015/modules/spotlight/models/index.js +0 -4
  156. package/esm2015/modules/spotlight/models/spotlight-control-list.interface.js +0 -1
  157. package/esm2015/modules/spotlight/models/spotlight-control.interface.js +0 -3
  158. package/esm2015/modules/spotlight/models/spotlight-notification.interface.js +0 -1
  159. package/esm2015/modules/spotlight/models/spotlight-screen-list.interface.js +0 -1
  160. package/esm2015/modules/spotlight/models/spotlight-screen.interface.js +0 -1
  161. package/esm2015/modules/spotlight/models/spotlight-status.enum.js +0 -8
  162. package/esm2015/modules/spotlight/models/spotlight-user.interface.js +0 -1
  163. package/esm2015/modules/spotlight/models/spotlight-users-list.interface.js +0 -1
  164. package/esm2015/modules/spotlight/models/spotlight.interface.js +0 -1
  165. package/esm2015/modules/spotlight/models/user-action.enum.js +0 -7
  166. package/esm2015/modules/spotlight/pipes/translate.pipe.js +0 -22
  167. package/esm2015/modules/spotlight/service/spotlight.service.js +0 -38
  168. package/esm2015/modules/spotlight/spotlight.module.js +0 -37
  169. package/esm2015/modules/translations/translations.module.js +0 -182
  170. package/esm2015/public-api.js +0 -9
  171. package/esm2015/seniorsistemas-platform-components.js +0 -16
  172. package/esm5/modules/advanced-filter/advanced-filter.module.js +0 -54
  173. package/esm5/modules/advanced-filter/components/advanced-filter/advanced-filter.component.js +0 -144
  174. package/esm5/modules/advanced-filter/components/form-filter/form-filter.component.js +0 -626
  175. package/esm5/modules/advanced-filter/index.js +0 -5
  176. package/esm5/modules/advanced-filter/locale/fallback.js +0 -73
  177. package/esm5/modules/advanced-filter/models/context.js +0 -1
  178. package/esm5/modules/advanced-filter/models/depends-on.js +0 -1
  179. package/esm5/modules/advanced-filter/models/enum-item.js +0 -1
  180. package/esm5/modules/advanced-filter/models/filter-type.js +0 -14
  181. package/esm5/modules/advanced-filter/models/filter-value.js +0 -1
  182. package/esm5/modules/advanced-filter/models/filter.js +0 -25
  183. package/esm5/modules/advanced-filter/models/form-filter.js +0 -25
  184. package/esm5/modules/advanced-filter/models/index.js +0 -5
  185. package/esm5/modules/advanced-filter/models/scope.js +0 -6
  186. package/esm5/modules/advanced-filter/models/search.js +0 -1
  187. package/esm5/modules/advanced-filter/models/tab-view.js +0 -29
  188. package/esm5/modules/advanced-filter/models/ticked-filter.js +0 -1
  189. package/esm5/modules/advanced-filter/pipes/map-values.pipe.js +0 -16
  190. package/esm5/modules/advanced-filter/pipes/translate.pipe.js +0 -23
  191. package/esm5/modules/advanced-filter/services/advanced-filter.service.js +0 -151
  192. package/esm5/modules/advanced-filter/services/calendar-options.service.js +0 -82
  193. package/esm5/modules/advanced-filter/services/constants.js +0 -6
  194. package/esm5/modules/advanced-filter/shared/constants.js +0 -3
  195. package/esm5/modules/advanced-filter/utils/comparator.js +0 -55
  196. package/esm5/modules/advanced-filter/utils/filter-id/index.js +0 -8
  197. package/esm5/modules/advanced-filter/utils/filter-value/index.js +0 -25
  198. package/esm5/modules/advanced-filter/utils/filterOperators.js +0 -11
  199. package/esm5/modules/advanced-filter/utils/form-field/index.js +0 -52
  200. package/esm5/modules/advanced-filter/utils/index.js +0 -57
  201. package/esm5/modules/advanced-filter/utils/json-path.js +0 -12
  202. package/esm5/modules/cyclic-json-interceptor/cyclic-json-interceptor.module.js +0 -17
  203. package/esm5/modules/cyclic-json-interceptor/cyclic-json-interceptor.service.js +0 -30
  204. package/esm5/modules/cyclic-json-interceptor/index.js +0 -2
  205. package/esm5/modules/feature-toggle/constants/endpoint.constant.js +0 -27
  206. package/esm5/modules/feature-toggle/feature-toggle.module.js +0 -18
  207. package/esm5/modules/feature-toggle/feature-toggle.service.js +0 -51
  208. package/esm5/modules/feature-toggle/index.js +0 -3
  209. package/esm5/modules/feature-toggle/models/feature.js +0 -1
  210. package/esm5/modules/http-interceptor/http-interceptor.module.js +0 -19
  211. package/esm5/modules/http-interceptor/http-interceptor.service.js +0 -49
  212. package/esm5/modules/http-interceptor/index.js +0 -4
  213. package/esm5/modules/http-interceptor/rest-url.service.js +0 -17
  214. package/esm5/modules/http-interceptor/x-services-url.service.js +0 -20
  215. package/esm5/modules/permissions/permissions.config.js +0 -17
  216. package/esm5/modules/permissions/permissions.module.js +0 -46
  217. package/esm5/modules/permissions/permissions.service.js +0 -212
  218. package/esm5/modules/spotlight/component/spotlight.component.js +0 -300
  219. package/esm5/modules/spotlight/index.js +0 -3
  220. package/esm5/modules/spotlight/locale/fallback.js +0 -5
  221. package/esm5/modules/spotlight/models/display-type.enum.js +0 -6
  222. package/esm5/modules/spotlight/models/index.js +0 -4
  223. package/esm5/modules/spotlight/models/spotlight-control-list.interface.js +0 -1
  224. package/esm5/modules/spotlight/models/spotlight-control.interface.js +0 -7
  225. package/esm5/modules/spotlight/models/spotlight-notification.interface.js +0 -1
  226. package/esm5/modules/spotlight/models/spotlight-screen-list.interface.js +0 -1
  227. package/esm5/modules/spotlight/models/spotlight-screen.interface.js +0 -1
  228. package/esm5/modules/spotlight/models/spotlight-status.enum.js +0 -8
  229. package/esm5/modules/spotlight/models/spotlight-user.interface.js +0 -1
  230. package/esm5/modules/spotlight/models/spotlight-users-list.interface.js +0 -1
  231. package/esm5/modules/spotlight/models/spotlight.interface.js +0 -1
  232. package/esm5/modules/spotlight/models/user-action.enum.js +0 -7
  233. package/esm5/modules/spotlight/pipes/translate.pipe.js +0 -23
  234. package/esm5/modules/spotlight/service/spotlight.service.js +0 -39
  235. package/esm5/modules/spotlight/spotlight.module.js +0 -40
  236. package/esm5/modules/translations/translations.module.js +0 -226
  237. package/esm5/public-api.js +0 -9
  238. package/esm5/seniorsistemas-platform-components.js +0 -16
  239. package/fesm2015/seniorsistemas-platform-components.js.map +0 -1
  240. package/fesm5/seniorsistemas-platform-components.js +0 -2506
  241. package/fesm5/seniorsistemas-platform-components.js.map +0 -1
  242. package/seniorsistemas-platform-components.d.ts +0 -15
  243. package/seniorsistemas-platform-components.metadata.json +0 -1
@@ -1,60 +1,72 @@
1
- import { __decorate, __awaiter, __rest, __param } from 'tslib';
2
- import { Pipe, InjectionToken, APP_INITIALIZER, Injector, NgModule, Injectable, EventEmitter, ChangeDetectorRef, Input, Output, HostListener, Component, ViewChild, ViewEncapsulation, ɵɵdefineInjectable, Inject, ɵɵinject } from '@angular/core';
1
+ import * as i0 from '@angular/core';
2
+ import { Pipe, inject, InjectionToken, APP_INITIALIZER, Injector, NgModule, Injectable, ChangeDetectorRef, EventEmitter, Component, Input, Output, HostListener, ViewEncapsulation, ViewChild } from '@angular/core';
3
+ import * as i2 from '@angular/common';
3
4
  import { LOCATION_INITIALIZED, CommonModule, DatePipe } from '@angular/common';
4
5
  import { FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
6
+ import * as i1$3 from 'primeng/button';
5
7
  import { ButtonModule as ButtonModule$1 } from 'primeng/button';
8
+ import * as i1$2 from 'primeng/dialog';
6
9
  import { DialogModule } from 'primeng/dialog';
10
+ import * as i1$1 from 'primeng/tabview';
7
11
  import { TabViewModule } from 'primeng/tabview';
12
+ import * as i5 from 'primeng/toast';
8
13
  import { ToastModule } from 'primeng/toast';
14
+ import * as i2$2 from 'primeng/tooltip';
9
15
  import { TooltipModule } from 'primeng/tooltip';
16
+ import * as i2$1 from 'primeng/api';
10
17
  import { MessageService } from 'primeng/api';
11
- import { TextField, FieldType, CurrencyField, SelectField, NumberField, RadioButtonField, CalendarField, AutocompleteField, ButtonModule, DynamicFormModule, EmptyStateModule, LocaleService } from '@seniorsistemas/angular-components';
18
+ import { LocaleService } from '@seniorsistemas/angular-components/locale';
19
+ import * as i4 from '@seniorsistemas/angular-components/empty-state';
20
+ import { EmptyStateModule } from '@seniorsistemas/angular-components/empty-state';
21
+ import * as i3$1 from '@seniorsistemas/angular-components/button';
22
+ import { ButtonModule } from '@seniorsistemas/angular-components/button';
23
+ import * as i3 from '@seniorsistemas/angular-components/dynamic-form';
24
+ import { TextField, FieldType, CurrencyField, SelectField, NumberField, RadioButtonField, CalendarField, AutocompleteField, DynamicFormModule } from '@seniorsistemas/angular-components/dynamic-form';
25
+ import * as i1 from '@ngx-translate/core';
12
26
  import { TranslateService, TranslateModule } from '@ngx-translate/core';
13
- import { HttpClient, HttpClientModule, HttpParams, HttpHeaders, HttpResponse, HTTP_INTERCEPTORS } from '@angular/common/http';
27
+ import { HttpClient, provideHttpClient, withInterceptorsFromDi, HttpParams, HttpHeaders, HttpResponse, HTTP_INTERCEPTORS } from '@angular/common/http';
14
28
  import { user, service } from '@seniorsistemas/senior-platform-data';
15
29
  import { CookieService } from 'ngx-cookie-service';
16
30
  import { Subject, BehaviorSubject, Observable, from, defer, forkJoin, throwError, of } from 'rxjs';
17
31
  import { map, takeUntil, filter, tap, mergeMap, catchError, shareReplay } from 'rxjs/operators';
18
- import { NavigationEnd, Router } from '@angular/router';
19
- import moment from 'moment';
32
+ import { Router, NavigationEnd } from '@angular/router';
20
33
  import { contains, equals, clone } from 'ramda';
21
- import jsonCycle from 'json-cycle';
22
34
 
23
- let MapValuesPipe = class MapValuesPipe {
35
+ class MapValuesPipe {
24
36
  transform(map, args = null) {
25
37
  return Array.from(map.values());
26
38
  }
27
- };
28
- MapValuesPipe = __decorate([
29
- Pipe({ name: 'mapValues', pure: false })
30
- ], MapValuesPipe);
39
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MapValuesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
40
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MapValuesPipe, name: "mapValues", pure: false });
41
+ }
42
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MapValuesPipe, decorators: [{
43
+ type: Pipe,
44
+ args: [{ name: 'mapValues', pure: false }]
45
+ }] });
31
46
 
32
- let TranslatePipe = class TranslatePipe {
33
- constructor(translationService) {
34
- this.translationService = translationService;
35
- }
47
+ let TranslatePipe$1 = class TranslatePipe {
48
+ translationService = inject(TranslateService);
36
49
  transform(value, args) {
37
50
  return this.translationService.instant(value);
38
51
  }
52
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TranslatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
53
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: TranslatePipe, name: "translate", pure: false });
39
54
  };
40
- TranslatePipe.ctorParameters = () => [
41
- { type: TranslateService }
42
- ];
43
- TranslatePipe = __decorate([
44
- Pipe({
45
- name: 'translate',
46
- pure: false,
47
- })
48
- ], TranslatePipe);
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TranslatePipe$1, decorators: [{
56
+ type: Pipe,
57
+ args: [{
58
+ name: 'translate',
59
+ pure: false,
60
+ }]
61
+ }] });
49
62
 
50
- var TranslationsModule_1;
51
63
  const TranslationsConfig = new InjectionToken('translationConfig');
52
64
  const USER_INFO = 'com.senior.token';
53
65
  const LENGTH_DEFAULT = 2;
54
- let TranslationsModule = TranslationsModule_1 = class TranslationsModule {
66
+ class TranslationsModule {
55
67
  static forRoot(translationsConfigs) {
56
68
  return {
57
- ngModule: TranslationsModule_1,
69
+ ngModule: TranslationsModule,
58
70
  providers: [
59
71
  {
60
72
  provide: APP_INITIALIZER,
@@ -72,7 +84,7 @@ let TranslationsModule = TranslationsModule_1 = class TranslationsModule {
72
84
  }
73
85
  static forChild(translationsConfigs) {
74
86
  return {
75
- ngModule: TranslationsModule_1,
87
+ ngModule: TranslationsModule,
76
88
  providers: [
77
89
  {
78
90
  provide: TranslationsConfig,
@@ -82,32 +94,33 @@ let TranslationsModule = TranslationsModule_1 = class TranslationsModule {
82
94
  ]
83
95
  };
84
96
  }
85
- };
86
- TranslationsModule = TranslationsModule_1 = __decorate([
87
- NgModule({
88
- imports: [HttpClientModule, TranslateModule.forChild()],
89
- providers: [CookieService]
90
- })
91
- ], TranslationsModule);
97
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TranslationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
98
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: TranslationsModule, imports: [i1.TranslateModule] });
99
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TranslationsModule, providers: [CookieService, provideHttpClient(withInterceptorsFromDi())], imports: [TranslateModule.forChild()] });
100
+ }
101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TranslationsModule, decorators: [{
102
+ type: NgModule,
103
+ args: [{ imports: [TranslateModule.forChild()], providers: [CookieService, provideHttpClient(withInterceptorsFromDi())] }]
104
+ }] });
92
105
  function factory(translate, injector, http, cookieService) {
93
106
  return () => new Promise((resolve) => {
94
107
  const locationInitialized = injector.get(LOCATION_INITIALIZED, Promise.resolve(null));
95
- locationInitialized.then(() => __awaiter(this, void 0, void 0, function* () {
108
+ locationInitialized.then(async () => {
96
109
  let locale = 'pt-BR';
97
110
  try {
98
111
  const configs = getFlatArray(injector.get(TranslationsConfig, Promise.resolve(null)));
99
112
  try {
100
113
  let userData = JSON.parse(cookieService.get(USER_INFO));
101
114
  if (userDataIsNull(userData)) {
102
- userData = yield user.getUserData();
115
+ userData = await user.getUserData();
103
116
  }
104
117
  locale = getLocale(userData);
105
118
  }
106
119
  catch (ex) {
107
120
  console.warn('Unable to obtain user locale');
108
121
  }
109
- const fallback = configs.reduce((result, configs) => (Object.assign(Object.assign({}, result), configs.fallback)), {});
110
- const defaultsLanguages = configs.reduce((result, configs) => (Object.assign(Object.assign({}, result), configs.defaultsLanguages)), {});
122
+ const fallback = configs.reduce((result, configs) => ({ ...result, ...configs.fallback }), {});
123
+ const defaultsLanguages = configs.reduce((result, configs) => ({ ...result, ...configs.defaultsLanguages }), {});
111
124
  translate.setTranslation(locale, fallback);
112
125
  translate.setDefaultLang(locale);
113
126
  let configTranslate = {};
@@ -115,8 +128,8 @@ function factory(translate, injector, http, cookieService) {
115
128
  configTranslate = getConfigTranslate(defaultsLanguages, locale);
116
129
  }
117
130
  const translationsPromises = configs.map((config) => getTranslationsRequest(config, locale));
118
- yield Promise.all(translationsPromises).then((results) => {
119
- const usedFallback = translate['overriden'];
131
+ await Promise.all(translationsPromises).then((results) => {
132
+ const usedFallback = translate?.overriden;
120
133
  results.forEach((file, index) => {
121
134
  setTranslations(file['content'], usedFallback, locale, index, configTranslate.fallbackByLocale);
122
135
  });
@@ -133,7 +146,7 @@ function factory(translate, injector, http, cookieService) {
133
146
  resolve();
134
147
  });
135
148
  }
136
- }));
149
+ });
137
150
  });
138
151
  function setTranslations(content, usedFallback, locale, index, fallbackByLocale) {
139
152
  if (usedFallback) {
@@ -148,15 +161,15 @@ function factory(translate, injector, http, cookieService) {
148
161
  }
149
162
  }
150
163
  function getTranslationsRequest({ domain, service }, language) {
151
- return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
164
+ return new Promise(async (resolve) => {
152
165
  try {
153
166
  if (!domain && !service) {
154
167
  throw new Error(`domain and service not found`);
155
168
  }
156
169
  const params = new HttpParams().set('domainName', domain).set('serviceName', service).set('format', 'FLAT_JSON');
157
- const headers = new HttpHeaders().set('Authorization', yield user.getAuthHeader());
170
+ const headers = new HttpHeaders().set('Authorization', await user.getAuthHeader());
158
171
  const url = 'platform/translation_hub/queries/getTranslationBundle';
159
- const bundleFiles = yield http
172
+ const bundleFiles = await http
160
173
  .get(url, { headers, params })
161
174
  .toPromise()
162
175
  .then((res) => res.bundleFiles);
@@ -169,7 +182,7 @@ function factory(translate, injector, http, cookieService) {
169
182
  if (!languageBundle) {
170
183
  return resolve({});
171
184
  }
172
- yield http
185
+ await http
173
186
  .get(languageBundle.url)
174
187
  .toPromise()
175
188
  .then((result) => {
@@ -184,7 +197,7 @@ function factory(translate, injector, http, cookieService) {
184
197
  console.warn(`Error getting translation bundle for ${domain}/${service}. Using local fallback.`, err);
185
198
  resolve({});
186
199
  }
187
- }));
200
+ });
188
201
  }
189
202
  function getFlatArray(array) {
190
203
  return array.reduce((result, item) => {
@@ -221,7 +234,7 @@ function factory(translate, injector, http, cookieService) {
221
234
  }
222
235
  }
223
236
 
224
- const fallback = {
237
+ const fallback$1 = {
225
238
  'platform.filter_service.cancel': 'Cancelar',
226
239
  'platform.filter_service.try': 'Tentar Novamente',
227
240
  'platform.filter_service.actions': 'Ações',
@@ -303,16 +316,18 @@ const GET_FILTERS_BY_TICKET = `${URL_PREFIX}/queries/getFiltersByTicket`;
303
316
  const searchDisplayName = '$$__displayValue__';
304
317
  const searchKeyName = '$$__keyValue__';
305
318
 
306
- let AdvancedFilterService = class AdvancedFilterService {
307
- constructor(http) {
308
- this.http = http;
309
- this.filtersObservable = new Subject();
310
- this.contextsObservable = new BehaviorSubject([]);
311
- this.ticketFilterObservable = new Subject();
312
- this.destroy$ = new Subject();
313
- this.contextsObserver = this.contextsObservable.asObservable();
314
- this.filtersObserver = this.filtersObservable.asObservable();
315
- this.ticketFilterObserver = this.ticketFilterObservable.asObservable();
319
+ class AdvancedFilterService {
320
+ http = inject(HttpClient);
321
+ filtersObservable = new Subject();
322
+ contextsObservable = new BehaviorSubject([]);
323
+ ticketFilterObservable = new Subject();
324
+ destroy$ = new Subject();
325
+ ticketFilter;
326
+ visible;
327
+ contextsObserver = this.contextsObservable.asObservable();
328
+ filtersObserver = this.filtersObservable.asObservable();
329
+ ticketFilterObserver = this.ticketFilterObservable.asObservable();
330
+ constructor() {
316
331
  this.contextsObservable.subscribe(contexts => contexts.length && this.getAndApplyFilters(contexts));
317
332
  }
318
333
  saveTickedFilters(filters) {
@@ -320,13 +335,16 @@ let AdvancedFilterService = class AdvancedFilterService {
320
335
  this.http
321
336
  .post(SAVE_TICKED_FILTER_URL, requestBody)
322
337
  .pipe(map(response => response.ticket))
323
- .subscribe(ticketFilter => {
324
- this.ticketFilter = ticketFilter;
325
- this.ticketFilterObservable.next({ ticketFilter });
326
- window.parent.postMessage({ message: 'advanced-filter:success', payload: ticketFilter }, '*');
327
- }, err => {
328
- this.ticketFilterObservable.next({ error: true, message: err });
329
- window.parent.postMessage({ message: 'advanced-filter:error', payload: err }, '*');
338
+ .subscribe({
339
+ next: ticketFilter => {
340
+ this.ticketFilter = ticketFilter;
341
+ this.ticketFilterObservable.next({ ticketFilter });
342
+ window.parent.postMessage({ message: 'advanced-filter:success', payload: ticketFilter }, '*');
343
+ },
344
+ error: err => {
345
+ this.ticketFilterObservable.next({ error: true, message: err });
346
+ window.parent.postMessage({ message: 'advanced-filter:error', payload: err }, '*');
347
+ }
330
348
  });
331
349
  }
332
350
  addContexts(...contexts) {
@@ -427,15 +445,32 @@ let AdvancedFilterService = class AdvancedFilterService {
427
445
  value = [''];
428
446
  }
429
447
  }
430
- };
431
- AdvancedFilterService.ctorParameters = () => [
432
- { type: HttpClient }
433
- ];
434
- AdvancedFilterService = __decorate([
435
- Injectable()
436
- ], AdvancedFilterService);
448
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AdvancedFilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
449
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AdvancedFilterService });
450
+ }
451
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AdvancedFilterService, decorators: [{
452
+ type: Injectable
453
+ }], ctorParameters: () => [] });
437
454
 
438
455
  class Filter {
456
+ type;
457
+ required;
458
+ label;
459
+ domain;
460
+ scope;
461
+ name;
462
+ contexts;
463
+ services;
464
+ value;
465
+ enumItems;
466
+ defaultValue;
467
+ search;
468
+ tabIndex;
469
+ minValue;
470
+ maxValue;
471
+ dependsOn;
472
+ mask;
473
+ regExp;
439
474
  constructor(type, required, label, domain, scope, name, contexts, services, value, enumItems, defaultValue, search, tabIndex, minValue, maxValue, dependsOn, mask, regExp) {
440
475
  this.type = type;
441
476
  this.required = required;
@@ -479,10 +514,20 @@ var Scope;
479
514
  })(Scope || (Scope = {}));
480
515
 
481
516
  class FormFilter {
482
- constructor(_a) {
483
- var { value } = _a, config = __rest(_a, ["value"]);
484
- this._valueObserver = new Subject();
485
- this.valueChanges = this._valueObserver.asObservable();
517
+ _value;
518
+ _valueObserver = new Subject();
519
+ valueChanges = this._valueObserver.asObservable();
520
+ name;
521
+ domain;
522
+ contexts;
523
+ services;
524
+ childs;
525
+ dependsOn;
526
+ filterControl;
527
+ type;
528
+ isMultiple;
529
+ defaultValue;
530
+ constructor({ value, ...config }) {
486
531
  this._value = value;
487
532
  Object.assign(this, config);
488
533
  }
@@ -496,17 +541,17 @@ class FormFilter {
496
541
  }
497
542
 
498
543
  class TabView {
544
+ fields = [];
545
+ form;
546
+ name;
499
547
  constructor(config) {
500
- this.fields = [];
501
548
  this.form = new FormGroup({});
502
549
  Object.assign(this, config);
503
550
  }
504
551
  }
505
552
  class ContextTab extends TabView {
506
- constructor() {
507
- super(...arguments);
508
- this.activeFilters = 0;
509
- }
553
+ activeFilters = 0;
554
+ domain;
510
555
  get label() {
511
556
  return `${this.name} (${this.activeFilters})`;
512
557
  }
@@ -520,48 +565,48 @@ function getTabId(domain, contextId) {
520
565
  return `${domain}${FILTER_ID_SEPARATOR}${contextId}`;
521
566
  }
522
567
 
568
+ const moment$1 = require('moment');
523
569
  /**
524
570
  *@description Necessary because of https://github.com/rollup/rollup/issues/670
525
571
  *
526
572
  * */
527
- const { DATETIME, TIME, DATE } = FilterType;
528
- const parsers = {
529
- [DATE]: (value) => dateParser(value, 'YYYY-MM-DD'),
530
- [TIME]: (value) => dateParser(value, 'HH:mm:ss'),
531
- [DATETIME]: (value) => dateParser(value)
573
+ const { DATETIME: DATETIME$1, TIME: TIME$1, DATE: DATE$1 } = FilterType;
574
+ const parsers$1 = {
575
+ [DATE$1]: (value) => dateParser$1(value, 'YYYY-MM-DD'),
576
+ [TIME$1]: (value) => dateParser$1(value, 'HH:mm:ss'),
577
+ [DATETIME$1]: (value) => dateParser$1(value)
532
578
  };
533
579
  function parseFilterValue(value, type) {
534
- const parser = parsers[type];
580
+ const parser = parsers$1[type];
535
581
  if (value !== undefined && value !== null && value !== '') {
536
582
  return parser ? parser(value) : value;
537
583
  }
538
584
  return value;
539
585
  }
540
- function dateParser(value, format) {
541
- const date = moment(value);
586
+ function dateParser$1(value, format) {
587
+ const date = moment$1(value);
542
588
  return format ? date.format(format) : date.format();
543
589
  }
544
590
 
545
- function jsonPath(object, path) {
546
- path = path.replace('$.', '');
547
- const allPaths = path.split('.');
548
- const currentPath = allPaths[0];
549
- const value = object[currentPath];
550
- allPaths.shift();
551
- if (allPaths.length) {
552
- return jsonPath(value, allPaths.join('.'));
591
+ function jsonPath(obj, path) {
592
+ if (!obj || !path)
593
+ return undefined;
594
+ const parts = path.replace(/^\$\./, '').split('.');
595
+ const current = parts[0];
596
+ const value = obj[current];
597
+ if (parts.length > 1) {
598
+ return jsonPath(value, parts.slice(1).join('.'));
553
599
  }
554
600
  return value;
555
601
  }
556
602
 
557
- const ɵ0 = (attr, value) => `containing(${attr}, '${value}')`, ɵ1 = (attr, value) => `${attr} eq ${value}`, ɵ2 = (attr, value) => `${attr} ne ${value}`, ɵ3 = (attr, value) => `${attr} gt ${value}`, ɵ4 = (attr, value) => `${attr} lt ${value}`, ɵ5 = (attr, value) => `${attr} ge ${value}`;
558
603
  const filterOperators = {
559
- 'contains': ɵ0,
560
- '=': ɵ1,
561
- '!=': ɵ2,
562
- '>': ɵ3,
563
- '<': ɵ4,
564
- '>=': ɵ5
604
+ 'contains': (attr, value) => `containing(${attr}, '${value}')`,
605
+ '=': (attr, value) => `${attr} eq ${value}`,
606
+ '!=': (attr, value) => `${attr} ne ${value}`,
607
+ '>': (attr, value) => `${attr} gt ${value}`,
608
+ '<': (attr, value) => `${attr} lt ${value}`,
609
+ '>=': (attr, value) => `${attr} ge ${value}`
565
610
  };
566
611
 
567
612
  function toUserFormat(value, type) {
@@ -615,18 +660,19 @@ function getSearchType(search) {
615
660
  return search.basicSearch ? search.basicSearch : search.entitySearch;
616
661
  }
617
662
 
663
+ const moment = require('moment');
618
664
  /**
619
665
  *@description Necessary because of https://github.com/rollup/rollup/issues/670
620
666
  *
621
667
  * */
622
- const { DATE: DATE$1, DATETIME: DATETIME$1, TIME: TIME$1 } = FilterType;
623
- const parsers$1 = {
624
- [DATE$1]: (v) => dateParser$1(v),
625
- [DATETIME$1]: (v) => dateParser$1(v),
626
- [TIME$1]: (v) => dateParser$1(v, 'HH:mm:ss')
668
+ const { DATE, DATETIME, TIME } = FilterType;
669
+ const parsers = {
670
+ [DATE]: (v) => dateParser(v),
671
+ [DATETIME]: (v) => dateParser(v),
672
+ [TIME]: (v) => dateParser(v, 'HH:mm:ss')
627
673
  };
628
674
  function parseFormValue(value, type, search) {
629
- const parser = parsers$1[type];
675
+ const parser = parsers[type];
630
676
  const parsedValue = JSON.parse(value);
631
677
  const isNotMultiple = search && getSearchType(search).output.maxSelectedItems === 1;
632
678
  let formValue;
@@ -657,7 +703,7 @@ function createValidators(minValue, maxValue, regExp) {
657
703
  maxValue !== undefined && validators.push(max(maxValue));
658
704
  return validators;
659
705
  }
660
- function dateParser$1(value, format) {
706
+ function dateParser(value, format) {
661
707
  return value !== null && value !== '' ? moment(value, format).toDate() : '';
662
708
  }
663
709
 
@@ -672,35 +718,34 @@ const supportedTypes = [
672
718
  FilterType.DATE,
673
719
  FilterType.DOUBLE
674
720
  ];
675
- const ɵ0$1 = (value, otherValue) => {
676
- return value > otherValue;
677
- }, ɵ1$1 = (value, otherValue) => {
678
- return value < otherValue;
679
- }, ɵ2$1 = (value, otherValue) => {
680
- return value >= otherValue;
681
- }, ɵ3$1 = (value, otherValue) => {
682
- return value <= otherValue;
683
- }, ɵ4$1 = (value, otherValue) => {
684
- return contains(value, otherValue);
685
- }, ɵ5$1 = (value, otherValue) => {
686
- if (typeof otherValue === 'number') {
687
- return equals(Number(value), otherValue);
688
- }
689
- return equals(value, otherValue);
690
- }, ɵ6 = (value, otherValue) => {
691
- if (typeof otherValue === 'number') {
692
- return !equals(Number(value), otherValue);
693
- }
694
- return !equals(value, otherValue);
695
- };
696
721
  const operation = {
697
- '>': ɵ0$1,
698
- '<': ɵ1$1,
699
- '>=': ɵ2$1,
700
- '<=': ɵ3$1,
701
- 'contains': ɵ4$1,
702
- '=': ɵ5$1,
703
- '!=': ɵ6
722
+ '>': (value, otherValue) => {
723
+ return value > otherValue;
724
+ },
725
+ '<': (value, otherValue) => {
726
+ return value < otherValue;
727
+ },
728
+ '>=': (value, otherValue) => {
729
+ return value >= otherValue;
730
+ },
731
+ '<=': (value, otherValue) => {
732
+ return value <= otherValue;
733
+ },
734
+ 'contains': (value, otherValue) => {
735
+ return contains(value, otherValue);
736
+ },
737
+ '=': (value, otherValue) => {
738
+ if (typeof otherValue === 'number') {
739
+ return equals(Number(value), otherValue);
740
+ }
741
+ return equals(value, otherValue);
742
+ },
743
+ '!=': (value, otherValue) => {
744
+ if (typeof otherValue === 'number') {
745
+ return !equals(Number(value), otherValue);
746
+ }
747
+ return !equals(value, otherValue);
748
+ }
704
749
  };
705
750
  function compare(operator, value, otherValue) {
706
751
  const comparator = operation[operator];
@@ -713,115 +758,113 @@ function isSupportedType(type) {
713
758
  return contains(type, supportedTypes);
714
759
  }
715
760
 
716
- const TRANSLATE_PREFIX = 'platform.filter_service';
717
- let CalendarOptionsService = class CalendarOptionsService {
718
- constructor(translate) {
719
- this.translate = translate;
720
- }
761
+ const TRANSLATE_PREFIX$2 = 'platform.filter_service';
762
+ class CalendarOptionsService {
763
+ translate = inject(TranslateService);
721
764
  getOptions() {
722
765
  return {
723
- clear: this.translate.instant(`${TRANSLATE_PREFIX}.clear`),
724
- dateFormat: this.translate.instant(`${TRANSLATE_PREFIX}.date_format`),
766
+ clear: this.translate.instant(`${TRANSLATE_PREFIX$2}.clear`),
767
+ dateFormat: this.translate.instant(`${TRANSLATE_PREFIX$2}.date_format`),
725
768
  dayNames: [
726
- this.translate.instant(`${TRANSLATE_PREFIX}.name_sunday`),
727
- this.translate.instant(`${TRANSLATE_PREFIX}.name_monday`),
728
- this.translate.instant(`${TRANSLATE_PREFIX}.name_tuesday`),
729
- this.translate.instant(`${TRANSLATE_PREFIX}.name_wednesday`),
730
- this.translate.instant(`${TRANSLATE_PREFIX}.name_thursday`),
731
- this.translate.instant(`${TRANSLATE_PREFIX}.name_friday`),
732
- this.translate.instant(`${TRANSLATE_PREFIX}.name_saturday`)
769
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.name_sunday`),
770
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.name_monday`),
771
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.name_tuesday`),
772
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.name_wednesday`),
773
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.name_thursday`),
774
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.name_friday`),
775
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.name_saturday`)
733
776
  ],
734
777
  dayNamesMin: [
735
- this.translate.instant(`${TRANSLATE_PREFIX}.min_sunday`),
736
- this.translate.instant(`${TRANSLATE_PREFIX}.min_monday`),
737
- this.translate.instant(`${TRANSLATE_PREFIX}.min_tuesday`),
738
- this.translate.instant(`${TRANSLATE_PREFIX}.min_wednesday`),
739
- this.translate.instant(`${TRANSLATE_PREFIX}.min_thursday`),
740
- this.translate.instant(`${TRANSLATE_PREFIX}.min_friday`),
741
- this.translate.instant(`${TRANSLATE_PREFIX}.min_saturday`)
778
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.min_sunday`),
779
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.min_monday`),
780
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.min_tuesday`),
781
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.min_wednesday`),
782
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.min_thursday`),
783
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.min_friday`),
784
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.min_saturday`)
742
785
  ],
743
786
  dayNamesShort: [
744
- this.translate.instant(`${TRANSLATE_PREFIX}.short_sunday`),
745
- this.translate.instant(`${TRANSLATE_PREFIX}.short_monday`),
746
- this.translate.instant(`${TRANSLATE_PREFIX}.short_tuesday`),
747
- this.translate.instant(`${TRANSLATE_PREFIX}.short_wednesday`),
748
- this.translate.instant(`${TRANSLATE_PREFIX}.short_thursday`),
749
- this.translate.instant(`${TRANSLATE_PREFIX}.short_friday`),
750
- this.translate.instant(`${TRANSLATE_PREFIX}.short_saturday`)
787
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.short_sunday`),
788
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.short_monday`),
789
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.short_tuesday`),
790
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.short_wednesday`),
791
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.short_thursday`),
792
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.short_friday`),
793
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.short_saturday`)
751
794
  ],
752
795
  firstDayOfWeek: 0,
753
- hourFormat: this.translate.instant(`${TRANSLATE_PREFIX}.hour_format`),
796
+ hourFormat: this.translate.instant(`${TRANSLATE_PREFIX$2}.hour_format`),
754
797
  monthNames: [
755
- this.translate.instant(`${TRANSLATE_PREFIX}.name_january`),
756
- this.translate.instant(`${TRANSLATE_PREFIX}.name_february`),
757
- this.translate.instant(`${TRANSLATE_PREFIX}.name_march`),
758
- this.translate.instant(`${TRANSLATE_PREFIX}.name_april`),
759
- this.translate.instant(`${TRANSLATE_PREFIX}.name_may`),
760
- this.translate.instant(`${TRANSLATE_PREFIX}.name_june`),
761
- this.translate.instant(`${TRANSLATE_PREFIX}.name_july`),
762
- this.translate.instant(`${TRANSLATE_PREFIX}.name_august`),
763
- this.translate.instant(`${TRANSLATE_PREFIX}.name_september`),
764
- this.translate.instant(`${TRANSLATE_PREFIX}.name_october`),
765
- this.translate.instant(`${TRANSLATE_PREFIX}.name_november`),
766
- this.translate.instant(`${TRANSLATE_PREFIX}.name_december`),
798
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.name_january`),
799
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.name_february`),
800
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.name_march`),
801
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.name_april`),
802
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.name_may`),
803
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.name_june`),
804
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.name_july`),
805
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.name_august`),
806
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.name_september`),
807
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.name_october`),
808
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.name_november`),
809
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.name_december`),
767
810
  ],
768
811
  monthNamesShort: [
769
- this.translate.instant(`${TRANSLATE_PREFIX}.short_january`),
770
- this.translate.instant(`${TRANSLATE_PREFIX}.short_february`),
771
- this.translate.instant(`${TRANSLATE_PREFIX}.short_march`),
772
- this.translate.instant(`${TRANSLATE_PREFIX}.short_april`),
773
- this.translate.instant(`${TRANSLATE_PREFIX}.short_may`),
774
- this.translate.instant(`${TRANSLATE_PREFIX}.short_june`),
775
- this.translate.instant(`${TRANSLATE_PREFIX}.short_july`),
776
- this.translate.instant(`${TRANSLATE_PREFIX}.short_august`),
777
- this.translate.instant(`${TRANSLATE_PREFIX}.short_september`),
778
- this.translate.instant(`${TRANSLATE_PREFIX}.short_october`),
779
- this.translate.instant(`${TRANSLATE_PREFIX}.short_november`),
780
- this.translate.instant(`${TRANSLATE_PREFIX}.short_december`),
812
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.short_january`),
813
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.short_february`),
814
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.short_march`),
815
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.short_april`),
816
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.short_may`),
817
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.short_june`),
818
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.short_july`),
819
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.short_august`),
820
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.short_september`),
821
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.short_october`),
822
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.short_november`),
823
+ this.translate.instant(`${TRANSLATE_PREFIX$2}.short_december`),
781
824
  ],
782
- today: this.translate.instant(`${TRANSLATE_PREFIX}.today`)
825
+ today: this.translate.instant(`${TRANSLATE_PREFIX$2}.today`)
783
826
  };
784
827
  }
785
- };
786
- CalendarOptionsService.ctorParameters = () => [
787
- { type: TranslateService }
788
- ];
789
- CalendarOptionsService = __decorate([
790
- Injectable()
791
- ], CalendarOptionsService);
828
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalendarOptionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
829
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalendarOptionsService });
830
+ }
831
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalendarOptionsService, decorators: [{
832
+ type: Injectable
833
+ }] });
792
834
 
793
835
  const TRANSLATE_PREFIX$1 = 'platform.filter_service';
794
836
  const TOAST_LIFE = 5000;
795
- let FormFilterComponent = class FormFilterComponent {
796
- constructor(filterService, translate, messageService, calendarOptionsService, changeDetectorRef) {
797
- this.filterService = filterService;
798
- this.translate = translate;
799
- this.messageService = messageService;
800
- this.calendarOptionsService = calendarOptionsService;
801
- this.changeDetectorRef = changeDetectorRef;
802
- this.destroy$ = new Subject();
803
- this.contexts = [];
804
- this.formFilters = [];
805
- this.oldFormFilters = [];
806
- this.actualFormFilters = [];
807
- this.general = new TabView({ name: 'Geral' });
808
- this.totalFiltersActive = 0;
809
- this.isMobile = false;
810
- this.tabViewOrientation = 'left';
811
- this.error = false;
812
- this.errorMessages = {
813
- min: this.translate.instant(`${TRANSLATE_PREFIX$1}.error_min_value`),
814
- max: this.translate.instant(`${TRANSLATE_PREFIX$1}.error_max_value`),
815
- pattern: this.translate.instant(`${TRANSLATE_PREFIX$1}.invalid_pattern`)
816
- };
817
- this.showMessages = true;
818
- this.isModal = false;
819
- this.contextId = '';
820
- this.totalFiltersActiveOutput = new EventEmitter();
821
- this.errorOutput = new EventEmitter();
822
- this.showDialogOutput = new EventEmitter();
823
- this.closeModalOutput = new EventEmitter();
824
- }
837
+ class FormFilterComponent {
838
+ filterService = inject(AdvancedFilterService);
839
+ translate = inject(TranslateService);
840
+ messageService = inject(MessageService);
841
+ calendarOptionsService = inject(CalendarOptionsService);
842
+ changeDetectorRef = inject(ChangeDetectorRef);
843
+ destroy$ = new Subject();
844
+ errorState;
845
+ tabs;
846
+ contexts = [];
847
+ formFilters = [];
848
+ oldFormFilters = [];
849
+ actualFormFilters = [];
850
+ general = new TabView({ name: 'Geral' });
851
+ totalFiltersActive = 0;
852
+ isMobile = false;
853
+ tabViewOrientation = 'left';
854
+ error = false;
855
+ activeIndex = 0;
856
+ errorMessages = {
857
+ min: this.translate.instant(`${TRANSLATE_PREFIX$1}.error_min_value`),
858
+ max: this.translate.instant(`${TRANSLATE_PREFIX$1}.error_max_value`),
859
+ pattern: this.translate.instant(`${TRANSLATE_PREFIX$1}.invalid_pattern`)
860
+ };
861
+ showMessages = true;
862
+ isModal = false;
863
+ contextId = '';
864
+ totalFiltersActiveOutput = new EventEmitter();
865
+ errorOutput = new EventEmitter();
866
+ showDialogOutput = new EventEmitter();
867
+ closeModalOutput = new EventEmitter();
825
868
  onResizeWindow(event) {
826
869
  const { innerWidth } = event.target;
827
870
  this.isMobile = innerWidth <= 640;
@@ -844,15 +887,13 @@ let FormFilterComponent = class FormFilterComponent {
844
887
  this.destroy$.next(true);
845
888
  }
846
889
  hasChanges() {
847
- const keys = Object.keys(this.formFilters);
848
- const oldKeys = Object.keys(this.oldFormFilters);
849
- if (!oldKeys.length) {
890
+ if (!this.oldFormFilters || !this.oldFormFilters.length) {
850
891
  return true;
851
892
  }
852
- const filtered = keys.filter(key => {
853
- const currentValue = this.formFilters[key].value;
854
- const oldValue = this.oldFormFilters[key] && this.oldFormFilters[key].value;
855
- return !equals(currentValue, oldValue);
893
+ const filtered = this.formFilters.filter((currentFilter, index) => {
894
+ const oldFilter = this.oldFormFilters[index];
895
+ const oldValue = oldFilter ? oldFilter.value : undefined;
896
+ return !equals(currentFilter.value, oldValue);
856
897
  });
857
898
  return filtered.length > 0;
858
899
  }
@@ -967,18 +1008,18 @@ let FormFilterComponent = class FormFilterComponent {
967
1008
  return totalFiltersActive;
968
1009
  }
969
1010
  parseToUserFilters(filters) {
970
- const ids = Object.keys(filters);
971
- return ids.reduce((all, filterId) => {
972
- const { type, services, name, value, domain, contexts } = filters[filterId];
1011
+ return filters.reduce((all, filter) => {
1012
+ const { type, services, name, value, domain, contexts } = filter;
973
1013
  const filterValue = toUserFormat(value, type);
974
1014
  const values = services.map(service => ({ name, service, value: filterValue, domain, contexts }));
975
1015
  return [...all, ...values];
976
1016
  }, []);
977
1017
  }
978
1018
  getFiltersValues(filters) {
979
- const ids = Object.keys(filters);
1019
+ const filtersAsObject = filters;
1020
+ const ids = Object.keys(filtersAsObject);
980
1021
  return ids.reduce((all, filterId) => {
981
- const { type, services, name, value, domain } = filters[filterId];
1022
+ const { type, services, name, value, domain } = filtersAsObject[filterId];
982
1023
  const filterValue = toFilterFormat(value, type);
983
1024
  const values = services.map(service => ({ name, service, value: filterValue, domain }));
984
1025
  return [...all, ...values];
@@ -1014,13 +1055,21 @@ let FormFilterComponent = class FormFilterComponent {
1014
1055
  }
1015
1056
  }
1016
1057
  setDependencies(filters) {
1017
- const names = Object.keys(filters);
1018
- const dependencies = from(names).pipe(map(key => filters[key]), filter(({ dependsOn }) => dependsOn && dependsOn.length > 0), tap(({ dependsOn, domain, filterControl }) => {
1058
+ const filtersMap = {};
1059
+ filters.forEach(f => {
1060
+ const id = getFilterId(f.domain, f.name);
1061
+ filtersMap[id] = f;
1062
+ });
1063
+ const names = Object.keys(filtersMap);
1064
+ const dependencies = from(names).pipe(map(key => filtersMap[key]), filter(({ dependsOn }) => dependsOn && dependsOn.length > 0), tap(({ dependsOn, domain, filterControl }) => {
1019
1065
  const invalidFilters = dependsOn
1020
1066
  .filter(dep => dep.required)
1021
1067
  .filter(dep => {
1022
1068
  const id = getFilterId(domain, dep.filterName);
1023
- const formFilter = filters[id];
1069
+ const formFilter = filtersMap[id];
1070
+ if (!formFilter) {
1071
+ return true;
1072
+ }
1024
1073
  const { value, type } = formFilter;
1025
1074
  const { comparator } = dep;
1026
1075
  if (comparator && isValidOperator(comparator.operator) && isSupportedType(type)) {
@@ -1034,7 +1083,7 @@ let FormFilterComponent = class FormFilterComponent {
1034
1083
  }
1035
1084
  }), map(({ domain, dependsOn, filterControl }) => ({ domain, dependsOn, filterControl })));
1036
1085
  dependencies.subscribe(({ dependsOn, domain, filterControl }) => from(dependsOn)
1037
- .pipe(filter(dep => dep.required), map(({ filterName }) => getFilterId(domain, filterName)), map(filterId => filters[filterId]), mergeMap(formFilter => from(formFilter.valueChanges)), map(val => {
1086
+ .pipe(filter(dep => dep.required), map(({ filterName }) => getFilterId(domain, filterName)), map(filterId => filtersMap[filterId]), mergeMap(formFilter => from(formFilter.valueChanges || [])), map(val => {
1038
1087
  const comparation = dependsOn.every(dep => {
1039
1088
  const filterId = getFilterId(domain, dep.filterName);
1040
1089
  if (this.formFilters[filterId]) {
@@ -1046,6 +1095,7 @@ let FormFilterComponent = class FormFilterComponent {
1046
1095
  }
1047
1096
  return true;
1048
1097
  }
1098
+ return true;
1049
1099
  });
1050
1100
  return !this.IsEmpty(val) && comparation ? 'enable' : 'disable';
1051
1101
  }))
@@ -1063,7 +1113,7 @@ let FormFilterComponent = class FormFilterComponent {
1063
1113
  control.setValue(val, { emitEvent: false });
1064
1114
  }
1065
1115
  }));
1066
- const newFilter = Object.assign(Object.assign({}, filter), { name: controlName });
1116
+ const newFilter = { ...filter, ...{ name: controlName } };
1067
1117
  const newField = this.createField(newFilter);
1068
1118
  this.general.form.addControl(controlName, fieldControl);
1069
1119
  this.general.fields.push(newField);
@@ -1182,15 +1232,25 @@ let FormFilterComponent = class FormFilterComponent {
1182
1232
  const translatedEnumItems = enumItems && enumItems.map((item) => ({ label: this.translate.instant(item.label), value: item.value }));
1183
1233
  const field = { name, label: this.translate.instant(label), placeholder: '' };
1184
1234
  const creators = {
1185
- [FilterType.STRING]: () => new TextField(Object.assign(Object.assign({}, field), { mask: mask ? () => mask : null, type: FieldType.String })),
1186
- [FilterType.MONEY]: () => new CurrencyField(Object.assign(Object.assign({}, field), { type: FieldType.Money })),
1187
- [FilterType.BOOLEAN]: () => this.createRadioButton(Object.assign({}, field)),
1188
- [FilterType.DATE]: () => this.createCalendar(Object.assign(Object.assign({}, field), { type: FieldType.Date })),
1189
- [FilterType.DATETIME]: () => this.createCalendar(Object.assign(Object.assign({}, field), { type: FieldType.DateTime })),
1190
- [FilterType.TIME]: () => this.createCalendar(Object.assign(Object.assign({}, field), { type: FieldType.Time })),
1191
- [FilterType.ENUMERATION]: () => new SelectField(Object.assign(Object.assign({}, field), { placeholder: this.translate.instant('platform.filter_service.select'), options: [...translatedEnumItems], type: FieldType.Enum })),
1192
- [FilterType.INTEGER]: () => new NumberField(Object.assign(Object.assign({}, field), { numberLocaleOptions: this.optionsInteger(), mask: mask ? () => mask : null, type: FieldType.Integer })),
1193
- [FilterType.DOUBLE]: () => new CurrencyField(Object.assign(Object.assign({}, field), { type: FieldType.Double })),
1235
+ [FilterType.STRING]: () => new TextField({ ...field, mask: mask ? () => mask : null, type: FieldType.String }),
1236
+ [FilterType.MONEY]: () => new CurrencyField({ ...field, type: FieldType.Money }),
1237
+ [FilterType.BOOLEAN]: () => this.createRadioButton({ ...field }),
1238
+ [FilterType.DATE]: () => this.createCalendar({ ...field, type: FieldType.Date }),
1239
+ [FilterType.DATETIME]: () => this.createCalendar({ ...field, type: FieldType.DateTime }),
1240
+ [FilterType.TIME]: () => this.createCalendar({ ...field, type: FieldType.Time }),
1241
+ [FilterType.ENUMERATION]: () => new SelectField({
1242
+ ...field,
1243
+ placeholder: this.translate.instant('platform.filter_service.select'),
1244
+ options: [...translatedEnumItems],
1245
+ type: FieldType.Enum
1246
+ }),
1247
+ [FilterType.INTEGER]: () => new NumberField({
1248
+ ...field,
1249
+ numberLocaleOptions: this.optionsInteger(),
1250
+ mask: mask ? () => mask : null,
1251
+ type: FieldType.Integer
1252
+ }),
1253
+ [FilterType.DOUBLE]: () => new CurrencyField({ ...field, type: FieldType.Double }),
1194
1254
  [FilterType.SEARCH]: () => this.createAutocompleteField(field, filter)
1195
1255
  };
1196
1256
  return creators[type]();
@@ -1200,7 +1260,7 @@ let FormFilterComponent = class FormFilterComponent {
1200
1260
  { label: this.translate.instant(`${TRANSLATE_PREFIX$1}.yes`), value: true },
1201
1261
  { label: this.translate.instant(`${TRANSLATE_PREFIX$1}.no`), value: false }
1202
1262
  ];
1203
- return new RadioButtonField(Object.assign(Object.assign({}, field), { type: FieldType.Radio, options }));
1263
+ return new RadioButtonField({ ...field, type: FieldType.Radio, options });
1204
1264
  }
1205
1265
  createCalendar(config) {
1206
1266
  const calendar = new CalendarField(config);
@@ -1243,7 +1303,17 @@ let FormFilterComponent = class FormFilterComponent {
1243
1303
  suggestionsError(messageError);
1244
1304
  });
1245
1305
  };
1246
- return new AutocompleteField(Object.assign(Object.assign({}, field), { onSearch, appendTo: 'body', suggestionsObservable, displayField: searchDisplayName, dataKey: searchKeyName, multiple: maxSelectedItems > 1, size: { lg: 12, md: 12, xl: 12 }, emptyMessage: this.translate.instant(`${TRANSLATE_PREFIX$1}.search_empty_message`) }));
1306
+ return new AutocompleteField({
1307
+ ...field,
1308
+ onSearch,
1309
+ appendTo: 'body',
1310
+ suggestionsObservable,
1311
+ displayField: searchDisplayName,
1312
+ dataKey: searchKeyName,
1313
+ multiple: maxSelectedItems > 1,
1314
+ size: { lg: 12, md: 12, xl: 12 },
1315
+ emptyMessage: this.translate.instant(`${TRANSLATE_PREFIX$1}.search_empty_message`)
1316
+ });
1247
1317
  }
1248
1318
  getEntitySearchUrl(search, value, dependsOn) {
1249
1319
  const { attributes, domainName, entityName, serviceName } = search;
@@ -1260,9 +1330,13 @@ let FormFilterComponent = class FormFilterComponent {
1260
1330
  }
1261
1331
  addSuggestionFields(suggestions, displayFields, keyFields, separator, filterId) {
1262
1332
  const addValue = (acc, value, token) => (acc ? `${acc}${token}${value}` : value);
1263
- const result = suggestions.map(suggestion => (Object.assign(Object.assign({}, suggestion), { [searchDisplayName]: displayFields.reduce((value, display) => {
1333
+ const result = suggestions.map(suggestion => ({
1334
+ ...suggestion,
1335
+ [searchDisplayName]: displayFields.reduce((value, display) => {
1264
1336
  return addValue(value, this.translate.instant(suggestion[display]), separator);
1265
- }, ''), [searchKeyName]: keyFields.reduce((value, key) => addValue(value, suggestion[key], ', '), '') })));
1337
+ }, ''),
1338
+ [searchKeyName]: keyFields.reduce((value, key) => addValue(value, suggestion[key], ', '), '')
1339
+ }));
1266
1340
  this.formFilters[filterId].invalidValue = result.length === 0;
1267
1341
  return result.filter(item => {
1268
1342
  const { value } = this.formFilters[filterId];
@@ -1294,8 +1368,8 @@ let FormFilterComponent = class FormFilterComponent {
1294
1368
  }
1295
1369
  }
1296
1370
  this.IsEmpty(params[filterName]) && delete params[filterName];
1297
- return params;
1298
1371
  }
1372
+ return params;
1299
1373
  }, {});
1300
1374
  }
1301
1375
  /*
@@ -1310,70 +1384,54 @@ let FormFilterComponent = class FormFilterComponent {
1310
1384
  optionsInteger() {
1311
1385
  return { currencySymbol: '', decimalSeparator: '', thousandsSeparator: '' };
1312
1386
  }
1313
- };
1314
- FormFilterComponent.ctorParameters = () => [
1315
- { type: AdvancedFilterService },
1316
- { type: TranslateService },
1317
- { type: MessageService },
1318
- { type: CalendarOptionsService },
1319
- { type: ChangeDetectorRef }
1320
- ];
1321
- __decorate([
1322
- Input()
1323
- ], FormFilterComponent.prototype, "showMessages", void 0);
1324
- __decorate([
1325
- Input()
1326
- ], FormFilterComponent.prototype, "isModal", void 0);
1327
- __decorate([
1328
- Input()
1329
- ], FormFilterComponent.prototype, "contextId", void 0);
1330
- __decorate([
1331
- Output()
1332
- ], FormFilterComponent.prototype, "totalFiltersActiveOutput", void 0);
1333
- __decorate([
1334
- Output()
1335
- ], FormFilterComponent.prototype, "errorOutput", void 0);
1336
- __decorate([
1337
- Output()
1338
- ], FormFilterComponent.prototype, "showDialogOutput", void 0);
1339
- __decorate([
1340
- Output()
1341
- ], FormFilterComponent.prototype, "closeModalOutput", void 0);
1342
- __decorate([
1343
- HostListener('window:resize', ['$event'])
1344
- ], FormFilterComponent.prototype, "onResizeWindow", null);
1345
- FormFilterComponent = __decorate([
1346
- Component({
1347
- selector: 's-app-form-filter',
1348
- template: "<s-empty-state\n *ngIf=\"error\"\n iconClass=\"fa fa-exclamation-triangle\"\n title=\"{{ errorState?.status }} - {{ errorState?.statusText }}\"\n (primaryAction)=\"errorStateAction()\"\n [primaryActionLabel]=\"translate.instant('platform.filter_service.try')\"\n [description]=\"translate.instant('platform.filter_service.error_state')\"\n></s-empty-state>\n\n<div *ngIf=\"!error\">\n <p-tabView *ngIf=\"tabs && tabs.size > 1\" [orientation]=\"tabViewOrientation\" selected=\"false\">\n <p-tabPanel *ngIf=\"general.fields.length\" [selected]=\"false\" [header]=\"general.name\">\n <s-dynamic-form [errorMessages]=\"errorMessages\" [fields]=\"general.fields\" [form]=\"general.form\"></s-dynamic-form>\n </p-tabPanel>\n\n <p-tabPanel *ngFor=\"let tab of (tabs | mapValues); let i = index\" [selected]=\"i === 0\" [header]=\"tab.label\">\n <s-dynamic-form [errorMessages]=\"errorMessages\" [fields]=\"tab.fields\" [form]=\"tab.form\"></s-dynamic-form>\n </p-tabPanel>\n </p-tabView>\n\n <div *ngIf=\"tabs && tabs.size === 1\">\n <s-dynamic-form\n *ngFor=\"let tab of (tabs | mapValues)\"\n [errorMessages]=\"errorMessages\"\n [fields]=\"tab.fields\"\n [form]=\"tab.form\"\n ></s-dynamic-form>\n </div>\n</div>\n",
1349
- styles: [".filter-dialog{width:800px;top:100px}.filter-dialog>.ui-dialog-content{height:300px;padding:10px!important}@media (min-width:641px) and (max-width:1024px){.filter-dialog{width:75%}.filter-dialog>.ui-dialog-content{height:300px}}@media only screen and (min-device-width:481px) and (max-device-width:1024px) and (orientation:portrait){.filter-dialog{width:75%}.filter-dialog>.ui-dialog-content{height:90%}}@media (min-width:320px) and (max-width:640px){.filter-dialog{width:95%;left:0;top:0;opacity:1;margin:auto;height:93%}.filter-dialog>.ui-dialog-content{height:85%}}@media (min-width:320px) and (max-width:640px) and (max-width:360px){.filter-dialog button{padding:0!important}.filter-dialog>.ui-dialog-content{height:81%}}"]
1350
- })
1351
- ], FormFilterComponent);
1387
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1388
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormFilterComponent, selector: "s-app-form-filter", inputs: { showMessages: "showMessages", isModal: "isModal", contextId: "contextId" }, outputs: { totalFiltersActiveOutput: "totalFiltersActiveOutput", errorOutput: "errorOutput", showDialogOutput: "showDialogOutput", closeModalOutput: "closeModalOutput" }, host: { listeners: { "window:resize": "onResizeWindow($event)" } }, ngImport: i0, template: "<s-empty-state\n *ngIf=\"error\"\n iconClass=\"fa fa-exclamation-triangle\"\n title=\"{{ errorState?.status }} - {{ errorState?.statusText }}\"\n (primaryAction)=\"errorStateAction()\"\n [primaryActionLabel]=\"translate.instant('platform.filter_service.try')\"\n [description]=\"translate.instant('platform.filter_service.error_state')\"\n></s-empty-state>\n\n<div *ngIf=\"!error\">\n <p-tabView *ngIf=\"tabs && tabs.size > 1\"\n [(activeIndex)]=\"activeIndex\">\n\n <p-tabPanel header=\"{{ general.name }}\" *ngIf=\"general.fields.length\">\n <s-dynamic-form\n [errorMessages]=\"errorMessages\"\n [fields]=\"general.fields\"\n [form]=\"general.form\">\n </s-dynamic-form>\n </p-tabPanel>\n\n <p-tabPanel *ngFor=\"let tab of (tabs | mapValues)\"\n header=\"{{ tab.label }}\">\n <s-dynamic-form\n [errorMessages]=\"errorMessages\"\n [fields]=\"tab.fields\"\n [form]=\"tab.form\">\n </s-dynamic-form>\n </p-tabPanel>\n </p-tabView>\n\n <div *ngIf=\"tabs && tabs.size === 1\">\n <s-dynamic-form\n *ngFor=\"let tab of (tabs | mapValues)\"\n [errorMessages]=\"errorMessages\"\n [fields]=\"tab.fields\"\n [form]=\"tab.form\">\n </s-dynamic-form>\n </div>\n</div>\n", styles: [".filter-dialog{width:800px;top:100px}.filter-dialog>.ui-dialog-content{height:300px;padding:10px!important}@media (min-width: 641px) and (max-width: 1024px){.filter-dialog{width:75%}.filter-dialog>.ui-dialog-content{height:300px}}@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation: portrait){.filter-dialog{width:75%}.filter-dialog>.ui-dialog-content{height:90%}}@media (min-width: 320px) and (max-width: 640px){.filter-dialog{width:95%;left:0;top:0;opacity:1;margin:auto;height:93%}.filter-dialog>.ui-dialog-content{height:85%}}@media (min-width: 320px) and (max-width: 640px) and (max-width: 360px){.filter-dialog button{padding:0!important}.filter-dialog>.ui-dialog-content{height:81%}}\n"], dependencies: [{ kind: "component", type: i1$1.TabView, selector: "p-tabView, p-tabview", inputs: ["style", "styleClass", "controlClose", "scrollable", "activeIndex", "selectOnFocus", "nextButtonAriaLabel", "prevButtonAriaLabel", "autoHideButtons", "tabindex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { kind: "component", type: i1$1.TabPanel, selector: "p-tabPanel, p-tabpanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.DynamicFormComponent, selector: "s-dynamic-form", inputs: ["id", "configs", "fields", "form", "errorMessages"] }, { kind: "component", type: i4.EmptyStateComponent, selector: "s-empty-state", inputs: ["id", "title", "iconClass", "description", "showPrimaryAction", "showSecondaryAction", "primaryActionLabel", "secondaryActionLabel", "primaryModel"], outputs: ["primaryAction", "secondaryAction"] }, { kind: "pipe", type: MapValuesPipe, name: "mapValues" }] });
1389
+ }
1390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormFilterComponent, decorators: [{
1391
+ type: Component,
1392
+ args: [{ selector: 's-app-form-filter', template: "<s-empty-state\n *ngIf=\"error\"\n iconClass=\"fa fa-exclamation-triangle\"\n title=\"{{ errorState?.status }} - {{ errorState?.statusText }}\"\n (primaryAction)=\"errorStateAction()\"\n [primaryActionLabel]=\"translate.instant('platform.filter_service.try')\"\n [description]=\"translate.instant('platform.filter_service.error_state')\"\n></s-empty-state>\n\n<div *ngIf=\"!error\">\n <p-tabView *ngIf=\"tabs && tabs.size > 1\"\n [(activeIndex)]=\"activeIndex\">\n\n <p-tabPanel header=\"{{ general.name }}\" *ngIf=\"general.fields.length\">\n <s-dynamic-form\n [errorMessages]=\"errorMessages\"\n [fields]=\"general.fields\"\n [form]=\"general.form\">\n </s-dynamic-form>\n </p-tabPanel>\n\n <p-tabPanel *ngFor=\"let tab of (tabs | mapValues)\"\n header=\"{{ tab.label }}\">\n <s-dynamic-form\n [errorMessages]=\"errorMessages\"\n [fields]=\"tab.fields\"\n [form]=\"tab.form\">\n </s-dynamic-form>\n </p-tabPanel>\n </p-tabView>\n\n <div *ngIf=\"tabs && tabs.size === 1\">\n <s-dynamic-form\n *ngFor=\"let tab of (tabs | mapValues)\"\n [errorMessages]=\"errorMessages\"\n [fields]=\"tab.fields\"\n [form]=\"tab.form\">\n </s-dynamic-form>\n </div>\n</div>\n", styles: [".filter-dialog{width:800px;top:100px}.filter-dialog>.ui-dialog-content{height:300px;padding:10px!important}@media (min-width: 641px) and (max-width: 1024px){.filter-dialog{width:75%}.filter-dialog>.ui-dialog-content{height:300px}}@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation: portrait){.filter-dialog{width:75%}.filter-dialog>.ui-dialog-content{height:90%}}@media (min-width: 320px) and (max-width: 640px){.filter-dialog{width:95%;left:0;top:0;opacity:1;margin:auto;height:93%}.filter-dialog>.ui-dialog-content{height:85%}}@media (min-width: 320px) and (max-width: 640px) and (max-width: 360px){.filter-dialog button{padding:0!important}.filter-dialog>.ui-dialog-content{height:81%}}\n"] }]
1393
+ }], propDecorators: { showMessages: [{
1394
+ type: Input
1395
+ }], isModal: [{
1396
+ type: Input
1397
+ }], contextId: [{
1398
+ type: Input
1399
+ }], totalFiltersActiveOutput: [{
1400
+ type: Output
1401
+ }], errorOutput: [{
1402
+ type: Output
1403
+ }], showDialogOutput: [{
1404
+ type: Output
1405
+ }], closeModalOutput: [{
1406
+ type: Output
1407
+ }], onResizeWindow: [{
1408
+ type: HostListener,
1409
+ args: ['window:resize', ['$event']]
1410
+ }] } });
1352
1411
 
1353
- const TRANSLATE_PREFIX$2 = 'platform.filter_service';
1354
- let AdvancedFilterComponent = class AdvancedFilterComponent {
1355
- constructor(translate, router) {
1356
- this.translate = translate;
1357
- this.router = router;
1358
- this.labelButton = 'Filters';
1359
- this.onlyContent = false;
1360
- this.hideButtons = false;
1361
- this.canOpenFilter = true;
1362
- this.showActiveFiltersCountBadge = true;
1363
- this.filterAndSave = false;
1364
- this.contextId = '';
1365
- this.subscriptions = [];
1366
- this.isMobile = false;
1367
- this.tabViewOrientation = 'left';
1368
- this.totalFiltersActive = 0;
1369
- this.showDialog = false;
1370
- this.error = false;
1371
- this.currentTicket = '';
1372
- this.mobileButtonActions = [
1373
- { id: 'save', label: this.translate.instant('save'), command: () => this.modalComponent.saveFilters() },
1374
- { id: 'clear', label: this.translate.instant('clear'), command: () => this.modalComponent.clearFilters() }
1375
- ];
1376
- }
1412
+ const TRANSLATE_PREFIX = 'platform.filter_service';
1413
+ class AdvancedFilterComponent {
1414
+ translate = inject(TranslateService);
1415
+ router = inject(Router);
1416
+ labelButton = 'Filters';
1417
+ onlyContent = false;
1418
+ hideButtons = false;
1419
+ canOpenFilter = true;
1420
+ showActiveFiltersCountBadge = true;
1421
+ filterAndSave = false;
1422
+ contextId = '';
1423
+ subscriptions = [];
1424
+ isMobile = false;
1425
+ tabViewOrientation = 'left';
1426
+ totalFiltersActive = 0;
1427
+ showDialog = false;
1428
+ error = false;
1429
+ currentTicket = '';
1430
+ modalComponent;
1431
+ mobileButtonActions = [
1432
+ { id: 'save', label: this.translate.instant('save'), command: () => this.modalComponent.saveFilters() },
1433
+ { id: 'clear', label: this.translate.instant('clear'), command: () => this.modalComponent.clearFilters() }
1434
+ ];
1377
1435
  ngOnInit() {
1378
1436
  this.isMobile = innerWidth <= 640;
1379
1437
  this.tabViewOrientation = this.isMobile ? 'top' : 'left';
@@ -1394,8 +1452,8 @@ let AdvancedFilterComponent = class AdvancedFilterComponent {
1394
1452
  }
1395
1453
  get appliedFiltersTooltip() {
1396
1454
  return this.totalFiltersActive > 1
1397
- ? this.translate.instant(`${TRANSLATE_PREFIX$2}.applied_filters_message`, { totalActiveFilters: this.totalFiltersActive })
1398
- : this.translate.instant(`${TRANSLATE_PREFIX$2}.applied_filter_message`, { totalActiveFilters: this.totalFiltersActive });
1455
+ ? this.translate.instant(`${TRANSLATE_PREFIX}.applied_filters_message`, { totalActiveFilters: this.totalFiltersActive })
1456
+ : this.translate.instant(`${TRANSLATE_PREFIX}.applied_filter_message`, { totalActiveFilters: this.totalFiltersActive });
1399
1457
  }
1400
1458
  onError(event) {
1401
1459
  this.error = event;
@@ -1439,55 +1497,50 @@ let AdvancedFilterComponent = class AdvancedFilterComponent {
1439
1497
  updateTotalFiltersActive(event) {
1440
1498
  this.totalFiltersActive = event;
1441
1499
  }
1442
- };
1443
- AdvancedFilterComponent.ctorParameters = () => [
1444
- { type: TranslateService },
1445
- { type: Router }
1446
- ];
1447
- __decorate([
1448
- Input()
1449
- ], AdvancedFilterComponent.prototype, "labelButton", void 0);
1450
- __decorate([
1451
- Input()
1452
- ], AdvancedFilterComponent.prototype, "onlyContent", void 0);
1453
- __decorate([
1454
- Input()
1455
- ], AdvancedFilterComponent.prototype, "hideButtons", void 0);
1456
- __decorate([
1457
- Input()
1458
- ], AdvancedFilterComponent.prototype, "canOpenFilter", void 0);
1459
- __decorate([
1460
- Input()
1461
- ], AdvancedFilterComponent.prototype, "showActiveFiltersCountBadge", void 0);
1462
- __decorate([
1463
- Input()
1464
- ], AdvancedFilterComponent.prototype, "filterAndSave", void 0);
1465
- __decorate([
1466
- Input()
1467
- ], AdvancedFilterComponent.prototype, "contextId", void 0);
1468
- __decorate([
1469
- ViewChild(FormFilterComponent)
1470
- ], AdvancedFilterComponent.prototype, "modalComponent", void 0);
1471
- __decorate([
1472
- HostListener('window:resize', ['$event'])
1473
- ], AdvancedFilterComponent.prototype, "onResizeWindow", null);
1474
- AdvancedFilterComponent = __decorate([
1475
- Component({
1476
- selector: 's-advanced-filter',
1477
- template: "<s-button\n *ngIf=\"!onlyContent\"\n [id]=\"'filterButton'\"\n [disabled]=\"!canOpenFilter\"\n (click)=\"canOpenFilter ? toggleDialog() : ''\"\n iconClass=\"fa fa-filter\"\n priority=\"default\"\n [label]=\"labelButton\"\n [auxiliary]=\"true\"\n [tooltip]=\"appliedFiltersTooltip\"\n>\n <span\n *ngIf=\"totalFiltersActive && showActiveFiltersCountBadge\"\n class=\"sds-badge-number sds-color-primary custom-badge\"\n >{{ totalFiltersActive }}</span\n >\n</s-button>\n\n<section *ngIf=\"onlyContent\">\n <div class=\"only-content-wrapper\">\n <div class=\"header\">\n <h3>{{ 'platform.filter_service.filters' | translate }}</h3>\n <span (click)=\"close()\" class=\"close_btn pi pi-times\"></span>\n </div>\n <div class=\"app-form-filter\">\n <s-app-form-filter\n [showMessages]=\"false\"\n (totalFiltersActiveOutput)=\"updateTotalFiltersActive($event)\"\n (closeModalOutput)=\"close()\"\n [isModal]=\"false\"\n [contextId]=\"contextId\"\n ></s-app-form-filter>\n </div>\n <div class=\"filter-footer\" *ngIf=\"!error\">\n <s-button\n priority=\"link\"\n [label]=\"translate.instant('platform.filter_service.cancel')\"\n (click)=\"close()\"\n ></s-button>\n <s-button\n *ngIf=\"isMobile\"\n priority=\"default\"\n [label]=\"translate.instant('platform.filter_service.actions')\"\n [auxiliary]=\"true\"\n [model]=\"mobileButtonActions\"\n ></s-button>\n <ng-container *ngIf=\"!isMobile\">\n <s-button\n priority=\"secondary\"\n [label]=\"translate.instant('platform.filter_service.clear')\"\n (click)=\"clearFilters()\"\n ></s-button>\n <s-button\n priority=\"secondary\"\n [label]=\"translate.instant('platform.filter_service.save')\"\n (click)=\"saveFilters()\"\n ></s-button>\n </ng-container>\n <s-button\n type=\"submit\"\n priority=\"primary\"\n [label]=\"translate.instant('platform.filter_service.filter')\"\n (click)=\"onApplyFilters()\"\n ></s-button>\n </div>\n </div>\n</section>\n\n<p-dialog\n *ngIf=\"!onlyContent\"\n appendTo=\"body\"\n styleClass=\"filter-dialog\"\n [draggable]=\"false\"\n [modal]=\"true\"\n [responsive]=\"true\"\n [(visible)]=\"showDialog\"\n blockScroll=\"true\"\n [closable]=\"false\"\n>\n <p-header>\n <div style=\"display: flex\">\n {{ 'platform.filter_service.filters' | translate }}\n <span (click)=\"toggleDialog(); close()\" class=\"close_btn pi pi-times\"></span>\n </div>\n </p-header>\n\n <s-app-form-filter\n [showMessages]=\"true\"\n (errorOutput)=\"onError($event)\"\n (totalFiltersActiveOutput)=\"updateTotalFiltersActive($event)\"\n [isModal]=\"true\"\n [contextId]=\"contextId\"\n ></s-app-form-filter>\n <p-footer *ngIf=\"!error && !hideButtons\">\n <s-button\n type=\"submit\"\n priority=\"primary\"\n [label]=\"translate.instant('platform.filter_service.filter')\"\n (click)=\"applyFilters()\"\n ></s-button>\n <ng-container *ngIf=\"!isMobile\">\n <s-button\n priority=\"secondary\"\n [label]=\"translate.instant('platform.filter_service.save')\"\n (click)=\"saveFilters()\"\n ></s-button>\n <s-button\n priority=\"secondary\"\n [label]=\"translate.instant('platform.filter_service.clear')\"\n (click)=\"clearFilters()\"\n ></s-button>\n </ng-container>\n <s-button\n *ngIf=\"isMobile\"\n priority=\"default\"\n [label]=\"translate.instant('platform.filter_service.actions')\"\n [auxiliary]=\"true\"\n [model]=\"mobileButtonActions\"\n ></s-button>\n <s-button\n priority=\"link\"\n [label]=\"translate.instant('platform.filter_service.cancel')\"\n (click)=\"toggleDialog(); close()\"\n ></s-button>\n </p-footer>\n</p-dialog>\n\n<p-toast key=\"filterServiceToastKey\" [baseZIndex]=\"5000\"></p-toast>\n",
1478
- encapsulation: ViewEncapsulation.None,
1479
- styles: [".custom-badge{position:absolute!important;right:-4px;top:-10px;height:20px;vertical-align:middle;display:table;min-width:22px}.filter-button{position:relative;border:1px solid #000;border-radius:1.5rem;background:0 0;padding:.5rem 1rem;cursor:pointer}.filter-dialog .ui-dialog-title{display:block!important;padding-right:0!important}.filter-footer{text-align:end;border-top:1px solid #e5eaea;padding:13px}.filter-dialog>.ui-dialog-content{height:300px;padding:10px!important}.app-form-filter{height:335px;max-height:335px;overflow:auto}.only-content-wrapper{background-color:#fff}.close_btn{-ms-flex-line-pack:center;align-content:center;-ms-grid-column-align:right;justify-self:right;margin-left:auto}.close_btn:hover{cursor:pointer}.header{text-transform:uppercase;display:-ms-flexbox;display:flex;width:100%;border-bottom:1px solid #e5eaea;padding:15px;margin-left:0}@media (min-width:641px) and (max-width:1024px){.filter-dialog{width:75%}.filter-dialog>.ui-dialog-content{height:300px}}@media only screen and (min-device-width:481px) and (max-device-width:1024px) and (orientation:portrait){.filter-dialog{width:75%}.filter-dialog>.ui-dialog-content{height:90%}}@media (min-width:320px) and (max-width:640px){.filter-dialog{width:95%;left:0;top:0;opacity:1;margin:auto;height:93%}.filter-dialog>.ui-dialog-content{height:85%}}@media (min-width:320px) and (max-width:640px) and (max-width:360px){.filter-dialog button{padding:0!important}.filter-dialog>.ui-dialog-content{height:81%}}"]
1480
- })
1481
- ], AdvancedFilterComponent);
1500
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AdvancedFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1501
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AdvancedFilterComponent, selector: "s-advanced-filter", inputs: { labelButton: "labelButton", onlyContent: "onlyContent", hideButtons: "hideButtons", canOpenFilter: "canOpenFilter", showActiveFiltersCountBadge: "showActiveFiltersCountBadge", filterAndSave: "filterAndSave", contextId: "contextId" }, host: { listeners: { "window:resize": "onResizeWindow($event)" } }, viewQueries: [{ propertyName: "modalComponent", first: true, predicate: FormFilterComponent, descendants: true }], ngImport: i0, template: "<s-button\n *ngIf=\"!onlyContent\"\n [id]=\"'filterButton'\"\n [disabled]=\"!canOpenFilter\"\n (clicked)=\"canOpenFilter ? toggleDialog() : ''\"\n iconClass=\"fa fa-filter\"\n priority=\"default\"\n [label]=\"labelButton\"\n [auxiliary]=\"true\"\n [tooltip]=\"appliedFiltersTooltip\"\n>\n <span\n *ngIf=\"totalFiltersActive && showActiveFiltersCountBadge\"\n class=\"sds-badge-number sds-color-primary custom-badge\"\n >{{ totalFiltersActive }}</span\n >\n</s-button>\n\n<section *ngIf=\"onlyContent\">\n <div class=\"only-content-wrapper\">\n <div class=\"header\">\n <h3>{{ 'platform.filter_service.filters' | translate }}</h3>\n <span (click)=\"close()\" class=\"close_btn pi pi-times\"></span>\n </div>\n <div class=\"app-form-filter\">\n <s-app-form-filter\n [showMessages]=\"false\"\n (totalFiltersActiveOutput)=\"updateTotalFiltersActive($event)\"\n (closeModalOutput)=\"close()\"\n [isModal]=\"false\"\n [contextId]=\"contextId\"\n ></s-app-form-filter>\n </div>\n <div class=\"filter-footer\" *ngIf=\"!error\">\n <s-button\n priority=\"link\"\n [label]=\"translate.instant('platform.filter_service.cancel')\"\n (clicked)=\"close()\"\n ></s-button>\n <s-button\n *ngIf=\"isMobile\"\n priority=\"default\"\n [label]=\"translate.instant('platform.filter_service.actions')\"\n [auxiliary]=\"true\"\n [menuOptions]=\"mobileButtonActions\"\n ></s-button>\n <ng-container *ngIf=\"!isMobile\">\n <s-button\n priority=\"secondary\"\n [label]=\"translate.instant('platform.filter_service.clear')\"\n (clicked)=\"clearFilters()\"\n ></s-button>\n <s-button\n priority=\"secondary\"\n [label]=\"translate.instant('platform.filter_service.save')\"\n (clicked)=\"saveFilters()\"\n ></s-button>\n </ng-container>\n <s-button\n type=\"submit\"\n priority=\"primary\"\n [label]=\"translate.instant('platform.filter_service.filter')\"\n (clicked)=\"onApplyFilters()\"\n ></s-button>\n </div>\n </div>\n</section>\n\n<p-dialog\n *ngIf=\"!onlyContent\"\n appendTo=\"body\"\n styleClass=\"filter-dialog\"\n [draggable]=\"false\"\n [modal]=\"true\"\n [(visible)]=\"showDialog\"\n [blockScroll]=\"true\"\n [closable]=\"false\"\n>\n <ng-template pTemplate=\"header\">\n <div class=\"w-full flex items-center justify-between\">\n <span>{{ 'platform.filter_service.filters' | translate }}</span>\n <span\n (click)=\"toggleDialog(); close()\"\n class=\"close_btn pi pi-times cursor-pointer\">\n </span>\n </div>\n </ng-template>\n\n <s-app-form-filter\n [showMessages]=\"true\"\n (errorOutput)=\"onError($event)\"\n (totalFiltersActiveOutput)=\"updateTotalFiltersActive($event)\"\n [isModal]=\"true\"\n [contextId]=\"contextId\"\n ></s-app-form-filter>\n\n <ng-template pTemplate=\"footer\">\n <ng-container *ngIf=\"!error && !hideButtons\">\n <s-button\n type=\"submit\"\n priority=\"primary\"\n [label]=\"translate.instant('platform.filter_service.filter')\"\n (clicked)=\"applyFilters()\"\n ></s-button>\n <ng-container *ngIf=\"!isMobile\">\n <s-button\n priority=\"secondary\"\n [label]=\"translate.instant('platform.filter_service.save')\"\n (clicked)=\"saveFilters()\"\n ></s-button>\n <s-button\n priority=\"secondary\"\n [label]=\"translate.instant('platform.filter_service.clear')\"\n (clicked)=\"clearFilters()\"\n ></s-button>\n </ng-container>\n <s-button\n *ngIf=\"isMobile\"\n priority=\"default\"\n [label]=\"translate.instant('platform.filter_service.actions')\"\n [auxiliary]=\"true\"\n [menuOptions]=\"mobileButtonActions\"\n ></s-button>\n <s-button\n priority=\"link\"\n [label]=\"translate.instant('platform.filter_service.cancel')\"\n (clicked)=\"toggleDialog(); close()\"\n ></s-button>\n </ng-container>\n </ng-template>\n</p-dialog>\n\n\n<p-toast key=\"filterServiceToastKey\" [baseZIndex]=\"5000\"></p-toast>\n", styles: [".custom-badge{position:absolute!important;right:-4px;top:-10px;height:20px;vertical-align:middle;display:table;min-width:22px}.filter-button{position:relative;border:solid 1px black;border-radius:1.5rem;background:transparent;padding:.5rem 1rem;cursor:pointer}.filter-dialog .ui-dialog-title{display:block!important;padding-right:0!important}.filter-footer{text-align:end;border-top:1px solid #e5eaea;padding:13px}.filter-dialog>.ui-dialog-content{height:300px;padding:10px!important}.app-form-filter{height:335px;max-height:335px;overflow:auto}.only-content-wrapper{background-color:#fff}.close_btn{align-content:center;justify-self:right;margin-left:auto}.close_btn:hover{cursor:pointer}.header{text-transform:uppercase;display:flex;width:100%;border-bottom:1px solid #e5eaea;padding:15px;margin-left:0}@media (min-width: 641px) and (max-width: 1024px){.filter-dialog{width:75%}.filter-dialog>.ui-dialog-content{height:300px}}@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation: portrait){.filter-dialog{width:75%}.filter-dialog>.ui-dialog-content{height:90%}}@media (min-width: 320px) and (max-width: 640px){.filter-dialog{width:95%;left:0;top:0;opacity:1;margin:auto;height:93%}.filter-dialog>.ui-dialog-content{height:85%}}@media (min-width: 320px) and (max-width: 640px) and (max-width: 360px){.filter-dialog button{padding:0!important}.filter-dialog>.ui-dialog-content{height:81%}}\n"], dependencies: [{ kind: "component", type: i1$2.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i3$1.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "component", type: FormFilterComponent, selector: "s-app-form-filter", inputs: ["showMessages", "isModal", "contextId"], outputs: ["totalFiltersActiveOutput", "errorOutput", "showDialogOutput", "closeModalOutput"] }, { kind: "pipe", type: TranslatePipe$1, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
1502
+ }
1503
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AdvancedFilterComponent, decorators: [{
1504
+ type: Component,
1505
+ args: [{ selector: 's-advanced-filter', encapsulation: ViewEncapsulation.None, template: "<s-button\n *ngIf=\"!onlyContent\"\n [id]=\"'filterButton'\"\n [disabled]=\"!canOpenFilter\"\n (clicked)=\"canOpenFilter ? toggleDialog() : ''\"\n iconClass=\"fa fa-filter\"\n priority=\"default\"\n [label]=\"labelButton\"\n [auxiliary]=\"true\"\n [tooltip]=\"appliedFiltersTooltip\"\n>\n <span\n *ngIf=\"totalFiltersActive && showActiveFiltersCountBadge\"\n class=\"sds-badge-number sds-color-primary custom-badge\"\n >{{ totalFiltersActive }}</span\n >\n</s-button>\n\n<section *ngIf=\"onlyContent\">\n <div class=\"only-content-wrapper\">\n <div class=\"header\">\n <h3>{{ 'platform.filter_service.filters' | translate }}</h3>\n <span (click)=\"close()\" class=\"close_btn pi pi-times\"></span>\n </div>\n <div class=\"app-form-filter\">\n <s-app-form-filter\n [showMessages]=\"false\"\n (totalFiltersActiveOutput)=\"updateTotalFiltersActive($event)\"\n (closeModalOutput)=\"close()\"\n [isModal]=\"false\"\n [contextId]=\"contextId\"\n ></s-app-form-filter>\n </div>\n <div class=\"filter-footer\" *ngIf=\"!error\">\n <s-button\n priority=\"link\"\n [label]=\"translate.instant('platform.filter_service.cancel')\"\n (clicked)=\"close()\"\n ></s-button>\n <s-button\n *ngIf=\"isMobile\"\n priority=\"default\"\n [label]=\"translate.instant('platform.filter_service.actions')\"\n [auxiliary]=\"true\"\n [menuOptions]=\"mobileButtonActions\"\n ></s-button>\n <ng-container *ngIf=\"!isMobile\">\n <s-button\n priority=\"secondary\"\n [label]=\"translate.instant('platform.filter_service.clear')\"\n (clicked)=\"clearFilters()\"\n ></s-button>\n <s-button\n priority=\"secondary\"\n [label]=\"translate.instant('platform.filter_service.save')\"\n (clicked)=\"saveFilters()\"\n ></s-button>\n </ng-container>\n <s-button\n type=\"submit\"\n priority=\"primary\"\n [label]=\"translate.instant('platform.filter_service.filter')\"\n (clicked)=\"onApplyFilters()\"\n ></s-button>\n </div>\n </div>\n</section>\n\n<p-dialog\n *ngIf=\"!onlyContent\"\n appendTo=\"body\"\n styleClass=\"filter-dialog\"\n [draggable]=\"false\"\n [modal]=\"true\"\n [(visible)]=\"showDialog\"\n [blockScroll]=\"true\"\n [closable]=\"false\"\n>\n <ng-template pTemplate=\"header\">\n <div class=\"w-full flex items-center justify-between\">\n <span>{{ 'platform.filter_service.filters' | translate }}</span>\n <span\n (click)=\"toggleDialog(); close()\"\n class=\"close_btn pi pi-times cursor-pointer\">\n </span>\n </div>\n </ng-template>\n\n <s-app-form-filter\n [showMessages]=\"true\"\n (errorOutput)=\"onError($event)\"\n (totalFiltersActiveOutput)=\"updateTotalFiltersActive($event)\"\n [isModal]=\"true\"\n [contextId]=\"contextId\"\n ></s-app-form-filter>\n\n <ng-template pTemplate=\"footer\">\n <ng-container *ngIf=\"!error && !hideButtons\">\n <s-button\n type=\"submit\"\n priority=\"primary\"\n [label]=\"translate.instant('platform.filter_service.filter')\"\n (clicked)=\"applyFilters()\"\n ></s-button>\n <ng-container *ngIf=\"!isMobile\">\n <s-button\n priority=\"secondary\"\n [label]=\"translate.instant('platform.filter_service.save')\"\n (clicked)=\"saveFilters()\"\n ></s-button>\n <s-button\n priority=\"secondary\"\n [label]=\"translate.instant('platform.filter_service.clear')\"\n (clicked)=\"clearFilters()\"\n ></s-button>\n </ng-container>\n <s-button\n *ngIf=\"isMobile\"\n priority=\"default\"\n [label]=\"translate.instant('platform.filter_service.actions')\"\n [auxiliary]=\"true\"\n [menuOptions]=\"mobileButtonActions\"\n ></s-button>\n <s-button\n priority=\"link\"\n [label]=\"translate.instant('platform.filter_service.cancel')\"\n (clicked)=\"toggleDialog(); close()\"\n ></s-button>\n </ng-container>\n </ng-template>\n</p-dialog>\n\n\n<p-toast key=\"filterServiceToastKey\" [baseZIndex]=\"5000\"></p-toast>\n", styles: [".custom-badge{position:absolute!important;right:-4px;top:-10px;height:20px;vertical-align:middle;display:table;min-width:22px}.filter-button{position:relative;border:solid 1px black;border-radius:1.5rem;background:transparent;padding:.5rem 1rem;cursor:pointer}.filter-dialog .ui-dialog-title{display:block!important;padding-right:0!important}.filter-footer{text-align:end;border-top:1px solid #e5eaea;padding:13px}.filter-dialog>.ui-dialog-content{height:300px;padding:10px!important}.app-form-filter{height:335px;max-height:335px;overflow:auto}.only-content-wrapper{background-color:#fff}.close_btn{align-content:center;justify-self:right;margin-left:auto}.close_btn:hover{cursor:pointer}.header{text-transform:uppercase;display:flex;width:100%;border-bottom:1px solid #e5eaea;padding:15px;margin-left:0}@media (min-width: 641px) and (max-width: 1024px){.filter-dialog{width:75%}.filter-dialog>.ui-dialog-content{height:300px}}@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation: portrait){.filter-dialog{width:75%}.filter-dialog>.ui-dialog-content{height:90%}}@media (min-width: 320px) and (max-width: 640px){.filter-dialog{width:95%;left:0;top:0;opacity:1;margin:auto;height:93%}.filter-dialog>.ui-dialog-content{height:85%}}@media (min-width: 320px) and (max-width: 640px) and (max-width: 360px){.filter-dialog button{padding:0!important}.filter-dialog>.ui-dialog-content{height:81%}}\n"] }]
1506
+ }], propDecorators: { labelButton: [{
1507
+ type: Input
1508
+ }], onlyContent: [{
1509
+ type: Input
1510
+ }], hideButtons: [{
1511
+ type: Input
1512
+ }], canOpenFilter: [{
1513
+ type: Input
1514
+ }], showActiveFiltersCountBadge: [{
1515
+ type: Input
1516
+ }], filterAndSave: [{
1517
+ type: Input
1518
+ }], contextId: [{
1519
+ type: Input
1520
+ }], modalComponent: [{
1521
+ type: ViewChild,
1522
+ args: [FormFilterComponent]
1523
+ }], onResizeWindow: [{
1524
+ type: HostListener,
1525
+ args: ['window:resize', ['$event']]
1526
+ }] } });
1482
1527
 
1483
1528
  class AppRoutingModule {
1484
1529
  }
1485
- let AdvancedFilterModule = class AdvancedFilterModule {
1486
- };
1487
- AdvancedFilterModule = __decorate([
1488
- NgModule({
1489
- imports: [
1490
- DialogModule,
1530
+ class AdvancedFilterModule {
1531
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AdvancedFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1532
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: AdvancedFilterModule, declarations: [AdvancedFilterComponent, FormFilterComponent, MapValuesPipe, TranslatePipe$1], imports: [DialogModule,
1533
+ ButtonModule,
1534
+ ButtonModule$1,
1535
+ TabViewModule,
1536
+ CommonModule,
1537
+ FormsModule,
1538
+ ReactiveFormsModule,
1539
+ DynamicFormModule,
1540
+ ToastModule,
1541
+ EmptyStateModule,
1542
+ TooltipModule, TranslationsModule], exports: [AdvancedFilterComponent, FormFilterComponent] });
1543
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AdvancedFilterModule, providers: [AdvancedFilterService, LocaleService, MessageService, TranslateService, CalendarOptionsService], imports: [DialogModule,
1491
1544
  ButtonModule,
1492
1545
  ButtonModule$1,
1493
1546
  TabViewModule,
@@ -1498,69 +1551,92 @@ AdvancedFilterModule = __decorate([
1498
1551
  ToastModule,
1499
1552
  EmptyStateModule,
1500
1553
  TooltipModule,
1501
- TranslationsModule.forChild([{ domain: 'platform', service: 'filter_service', fallback }]),
1502
- ],
1503
- providers: [AdvancedFilterService, LocaleService, MessageService, TranslateService, CalendarOptionsService],
1504
- declarations: [AdvancedFilterComponent, FormFilterComponent, MapValuesPipe, TranslatePipe],
1505
- exports: [AdvancedFilterComponent, FormFilterComponent]
1506
- })
1507
- ], AdvancedFilterModule);
1554
+ TranslationsModule.forChild([{ domain: 'platform', service: 'filter_service', fallback: fallback$1 }])] });
1555
+ }
1556
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AdvancedFilterModule, decorators: [{
1557
+ type: NgModule,
1558
+ args: [{
1559
+ imports: [
1560
+ DialogModule,
1561
+ ButtonModule,
1562
+ ButtonModule$1,
1563
+ TabViewModule,
1564
+ CommonModule,
1565
+ FormsModule,
1566
+ ReactiveFormsModule,
1567
+ DynamicFormModule,
1568
+ ToastModule,
1569
+ EmptyStateModule,
1570
+ TooltipModule,
1571
+ TranslationsModule.forChild([{ domain: 'platform', service: 'filter_service', fallback: fallback$1 }]),
1572
+ ],
1573
+ providers: [AdvancedFilterService, LocaleService, MessageService, TranslateService, CalendarOptionsService],
1574
+ declarations: [AdvancedFilterComponent, FormFilterComponent, MapValuesPipe, TranslatePipe$1],
1575
+ exports: [AdvancedFilterComponent, FormFilterComponent]
1576
+ }]
1577
+ }] });
1508
1578
 
1509
- let CyclicJsonInterceptor = class CyclicJsonInterceptor {
1579
+ const jc = require('json-cycle');
1580
+ class CyclicJsonInterceptor {
1510
1581
  intercept(req, next) {
1511
1582
  if (req.body instanceof Blob === false && req.body instanceof FormData === false) {
1512
- req = req.clone({ body: jsonCycle.decycle(req.body) });
1583
+ req = req.clone({ body: jc.decycle(req.body) });
1513
1584
  }
1514
1585
  return next.handle(req).pipe(map((event) => {
1515
1586
  if (event instanceof HttpResponse) {
1516
- event = event.clone({ body: jsonCycle.retrocycle(event.body) });
1587
+ event = event.clone({ body: jc.retrocycle(event.body) });
1517
1588
  }
1518
1589
  return event;
1519
1590
  }));
1520
1591
  }
1521
- };
1522
- CyclicJsonInterceptor.ɵprov = ɵɵdefineInjectable({ factory: function CyclicJsonInterceptor_Factory() { return new CyclicJsonInterceptor(); }, token: CyclicJsonInterceptor, providedIn: "root" });
1523
- CyclicJsonInterceptor = __decorate([
1524
- Injectable({
1525
- providedIn: 'root',
1526
- })
1527
- ], CyclicJsonInterceptor);
1592
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CyclicJsonInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1593
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CyclicJsonInterceptor, providedIn: 'root' });
1594
+ }
1595
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CyclicJsonInterceptor, decorators: [{
1596
+ type: Injectable,
1597
+ args: [{
1598
+ providedIn: 'root',
1599
+ }]
1600
+ }] });
1528
1601
 
1529
- let CyclicJsonInterceptorModule = class CyclicJsonInterceptorModule {
1530
- };
1531
- CyclicJsonInterceptorModule = __decorate([
1532
- NgModule({
1533
- imports: [HttpClientModule],
1534
- providers: [{ provide: HTTP_INTERCEPTORS, useClass: CyclicJsonInterceptor, multi: true }]
1535
- })
1536
- ], CyclicJsonInterceptorModule);
1602
+ class CyclicJsonInterceptorModule {
1603
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CyclicJsonInterceptorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1604
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: CyclicJsonInterceptorModule });
1605
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CyclicJsonInterceptorModule, providers: [{ provide: HTTP_INTERCEPTORS, useClass: CyclicJsonInterceptor, multi: true }, provideHttpClient(withInterceptorsFromDi())] });
1606
+ }
1607
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CyclicJsonInterceptorModule, decorators: [{
1608
+ type: NgModule,
1609
+ args: [{ imports: [], providers: [{ provide: HTTP_INTERCEPTORS, useClass: CyclicJsonInterceptor, multi: true }, provideHttpClient(withInterceptorsFromDi())] }]
1610
+ }] });
1537
1611
 
1538
- let RestUrl = class RestUrl {
1612
+ class RestUrl {
1539
1613
  get() {
1540
1614
  return defer(() => from(service.getRestUrl()));
1541
1615
  }
1542
- };
1543
- RestUrl = __decorate([
1544
- Injectable()
1545
- ], RestUrl);
1616
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RestUrl, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1617
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RestUrl });
1618
+ }
1619
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RestUrl, decorators: [{
1620
+ type: Injectable
1621
+ }] });
1546
1622
 
1547
- let XServicesUrl = class XServicesUrl {
1623
+ class XServicesUrl {
1548
1624
  get() {
1549
1625
  return defer(() => {
1550
1626
  const url = service.getXServicesUrl();
1551
1627
  return from(url);
1552
1628
  });
1553
1629
  }
1554
- };
1555
- XServicesUrl = __decorate([
1556
- Injectable()
1557
- ], XServicesUrl);
1630
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: XServicesUrl, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1631
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: XServicesUrl });
1632
+ }
1633
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: XServicesUrl, decorators: [{
1634
+ type: Injectable
1635
+ }] });
1558
1636
 
1559
- let HttpInterceptor = class HttpInterceptor {
1560
- constructor(restUrl, xServicesUrl) {
1561
- this.restUrl = restUrl;
1562
- this.xServicesUrl = xServicesUrl;
1563
- }
1637
+ class HttpInterceptor {
1638
+ restUrl = inject(RestUrl);
1639
+ xServicesUrl = inject(XServicesUrl);
1564
1640
  intercept(originalReq, next) {
1565
1641
  if (!originalReq.url.includes(`://`)) {
1566
1642
  const getAuthHeader = defer(() => from(user.getAuthHeader()));
@@ -1586,78 +1662,82 @@ let HttpInterceptor = class HttpInterceptor {
1586
1662
  });
1587
1663
  return next.handle(request);
1588
1664
  }
1589
- };
1590
- HttpInterceptor.ctorParameters = () => [
1591
- { type: RestUrl },
1592
- { type: XServicesUrl }
1593
- ];
1594
- HttpInterceptor = __decorate([
1595
- Injectable()
1596
- ], HttpInterceptor);
1665
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HttpInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1666
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HttpInterceptor });
1667
+ }
1668
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HttpInterceptor, decorators: [{
1669
+ type: Injectable
1670
+ }] });
1597
1671
 
1598
- let HttpInterceptorModule = class HttpInterceptorModule {
1599
- };
1600
- HttpInterceptorModule = __decorate([
1601
- NgModule({
1602
- imports: [HttpClientModule],
1603
- providers: [RestUrl, XServicesUrl, { provide: HTTP_INTERCEPTORS, useClass: HttpInterceptor, multi: true }]
1604
- })
1605
- ], HttpInterceptorModule);
1672
+ class HttpInterceptorModule {
1673
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HttpInterceptorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1674
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: HttpInterceptorModule });
1675
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HttpInterceptorModule, providers: [RestUrl, XServicesUrl, { provide: HTTP_INTERCEPTORS, useClass: HttpInterceptor, multi: true }, provideHttpClient(withInterceptorsFromDi())] });
1676
+ }
1677
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: HttpInterceptorModule, decorators: [{
1678
+ type: NgModule,
1679
+ args: [{ imports: [], providers: [RestUrl, XServicesUrl, { provide: HTTP_INTERCEPTORS, useClass: HttpInterceptor, multi: true }, provideHttpClient(withInterceptorsFromDi())] }]
1680
+ }] });
1606
1681
 
1607
1682
  const RESOURCES = new InjectionToken('RESOURCES');
1608
1683
  const ENVIRONMENT = new InjectionToken('ENVIRONMENT');
1609
1684
  class Resource {
1610
- constructor() {
1611
- this.redirectToError = false;
1612
- }
1685
+ name;
1686
+ actions;
1687
+ uri;
1688
+ redirectToError = false;
1689
+ actionsToCheck;
1690
+ entity;
1613
1691
  }
1614
1692
  class Environment {
1693
+ domain;
1694
+ service;
1695
+ ignorePermissions;
1615
1696
  }
1616
1697
 
1617
1698
  let promise;
1618
- let PermissionsService = class PermissionsService {
1619
- constructor(resources, environment, http, router, messageService, translate) {
1620
- this.resources = resources;
1621
- this.environment = environment;
1622
- this.http = http;
1623
- this.router = router;
1624
- this.messageService = messageService;
1625
- this.translate = translate;
1626
- this.checkedPermissions = [];
1627
- this.actionUrl = 'platform/authorization/queries';
1628
- }
1699
+ class PermissionsService {
1700
+ resources = inject(RESOURCES);
1701
+ environment = inject(ENVIRONMENT);
1702
+ http = inject(HttpClient);
1703
+ router = inject(Router);
1704
+ messageService = inject(MessageService);
1705
+ translate = inject(TranslateService);
1706
+ checkedPermissions = {};
1707
+ actionUrl = 'platform/authorization/queries';
1629
1708
  // v2
1630
1709
  checkAccess(resources) {
1631
1710
  const permissions = [];
1632
1711
  resources.forEach(rec => {
1633
1712
  rec.actions.forEach(action => {
1634
1713
  if (!rec.uri) {
1635
- const resource = this.getUriByResourceName(rec.name, rec.entity);
1636
- rec.uri = resource;
1714
+ rec.uri = this.getUriByResourceName(rec.name, rec.entity);
1637
1715
  }
1638
1716
  permissions.push({ action, resource: rec.uri });
1639
1717
  });
1640
1718
  });
1641
- return this.http.post(`${this.actionUrl}/checkAccess`, { includeFilters: true, permissions }).pipe(map(({ permissions: checkedPermissions }) => {
1642
- this.checkedPermissions = [...this.checkedPermissions, ...checkedPermissions];
1719
+ return this.http.post(`${this.actionUrl}/checkAccess`, { includeFilters: true, permissions }).pipe(map((response) => {
1720
+ const checkedPermissions = response.permissions || response;
1721
+ this.checkedPermissions = { ...this.checkedPermissions, ...checkedPermissions };
1643
1722
  const values = {};
1644
1723
  if (this.shouldRedirectToForbiddenPage(resources, checkedPermissions)) {
1645
1724
  this.router.navigate(['error', 403]);
1646
- return throwError('forbidden');
1725
+ return throwError(() => new Error('forbidden'));
1647
1726
  }
1648
- checkedPermissions.forEach(permission => {
1727
+ checkedPermissions.forEach((permission) => {
1649
1728
  const resource = resources.find(res => res.uri === permission.resource);
1729
+ if (!resource) {
1730
+ return;
1731
+ }
1650
1732
  const { name } = resource;
1651
1733
  values[name] = values[name] || {};
1652
1734
  values[name][permission.action] = permission.authorized;
1653
1735
  values[name][permission.action.toLowerCase()] = permission.authorized;
1654
- if (permission.resourceFilters && permission.resourceFilters.length) {
1655
- if (!values[name]['resourceFilters']) {
1656
- values[name]['resourceFilters'] = [];
1657
- }
1658
- permission.resourceFilters.forEach((resourceFilter) => {
1659
- values[name]['resourceFilters'].push(resourceFilter);
1660
- });
1736
+ if (permission.resourceFilters?.length) {
1737
+ values[name]['resourceFilters'] = [
1738
+ ...(values[name]['resourceFilters'] || []),
1739
+ ...permission.resourceFilters
1740
+ ];
1661
1741
  }
1662
1742
  });
1663
1743
  return values;
@@ -1671,11 +1751,12 @@ let PermissionsService = class PermissionsService {
1671
1751
  return from(promise).pipe(map((permissions) => {
1672
1752
  this.checkedPermissions = permissions;
1673
1753
  if (resource) {
1674
- const resourceKey = Object.keys(permissions).find(key => key.toLowerCase() === resource.toLowerCase());
1754
+ const resourceKey = Object.keys(permissions)
1755
+ .find(key => key.toLowerCase() === resource.toLowerCase());
1675
1756
  return permissions[resourceKey];
1676
1757
  }
1677
1758
  return permissions;
1678
- }), catchError((err) => {
1759
+ }), catchError(() => {
1679
1760
  promise = undefined;
1680
1761
  this.messageService.add({
1681
1762
  severity: 'error',
@@ -1686,42 +1767,35 @@ let PermissionsService = class PermissionsService {
1686
1767
  }));
1687
1768
  }
1688
1769
  isAuthorized(resourceName, action, isEntity) {
1689
- if (!this.checkedPermissions.length) {
1690
- throwError('\'Permissions\' are not defined. You should call \'get\' or \'checkAccess\' method first.');
1770
+ if (!this.checkedPermissions || Object.keys(this.checkedPermissions).length === 0) {
1771
+ throwError(() => new Error('\'Permissions\' are not defined. You should call \'get\' or \'checkAccess\' method first.'));
1691
1772
  }
1692
- const resourceUri = this.getUriByResourceName(resourceName, isEntity);
1693
- const permissionsOfResource = this.checkedPermissions.filter(perm => perm.resource === resourceUri);
1694
- const permissionOfAction = permissionsOfResource.find(permRec => permRec.action.toLowerCase() === action.toLowerCase());
1695
- return permissionOfAction && permissionOfAction.authorized;
1773
+ const resourceKey = Object.keys(this.checkedPermissions)
1774
+ .find(key => key.toLowerCase() === resourceName.toLowerCase());
1775
+ if (!resourceKey) {
1776
+ return false;
1777
+ }
1778
+ const actions = this.checkedPermissions[resourceKey];
1779
+ return actions?.[action] ?? actions?.[action.toLowerCase()] ?? false;
1696
1780
  }
1697
1781
  getUriByResourceName(resourceName, isEntity) {
1698
1782
  const { domain, service } = this.environment;
1699
1783
  if (!domain || !service) {
1700
- throwError('You must inform domain and service name');
1784
+ throwError(() => new Error('You must inform domain and service name'));
1701
1785
  }
1702
1786
  const uriBase = `res://senior.com.br/${domain}/${service}`;
1703
- if (isEntity) {
1704
- return `${uriBase}/entities/${resourceName}`;
1705
- }
1706
- else {
1707
- return `${uriBase}/${resourceName}`;
1708
- }
1787
+ return isEntity ? `${uriBase}/entities/${resourceName}` : `${uriBase}/${resourceName}`;
1709
1788
  }
1710
- /**
1711
- * Valida com base nas propriedade redirectToError e actionsToCheck
1712
- * se a ação de um recurso deve enviar para a página de erro caso não tenha autorização
1713
- */
1714
1789
  shouldRedirectToForbiddenPage(resources = [], permissions) {
1715
1790
  const permissionsDenied = permissions.filter(perm => !perm.authorized);
1716
- if (permissionsDenied && permissionsDenied.length) {
1717
- const resourcesToCheck = resources.filter(resource => resource.redirectToError);
1718
- if (resourcesToCheck && resourcesToCheck.length) {
1791
+ if (permissionsDenied.length) {
1792
+ const resourcesToCheck = resources.filter(r => r.redirectToError);
1793
+ if (resourcesToCheck.length) {
1719
1794
  return resourcesToCheck.every(resource => {
1720
- const actionsToCheck = resource.actionsToCheck && resource.actionsToCheck.length ? resource.actionsToCheck : resource.actions;
1721
- return actionsToCheck.every(action => permissionsDenied.some(permissionDenied => permissionDenied.resource === resource.uri && permissionDenied.action === action));
1795
+ const actionsToCheck = resource.actionsToCheck?.length ? resource.actionsToCheck : resource.actions;
1796
+ return actionsToCheck.every(action => permissionsDenied.some(p => p.resource === resource.uri && p.action === action));
1722
1797
  });
1723
1798
  }
1724
- return false;
1725
1799
  }
1726
1800
  return false;
1727
1801
  }
@@ -1733,10 +1807,7 @@ let PermissionsService = class PermissionsService {
1733
1807
  if (!item) {
1734
1808
  return result;
1735
1809
  }
1736
- if (Array.isArray(item)) {
1737
- return [...result, ...item];
1738
- }
1739
- return [...result, item];
1810
+ return Array.isArray(item) ? [...result, ...item] : [...result, item];
1740
1811
  }, []);
1741
1812
  }
1742
1813
  getPermissionObject(defaultValue) {
@@ -1749,56 +1820,44 @@ let PermissionsService = class PermissionsService {
1749
1820
  return resources;
1750
1821
  }, {});
1751
1822
  }
1752
- getPermissions() {
1753
- return __awaiter(this, void 0, void 0, function* () {
1754
- if (this.getFlatEnvironment()) {
1755
- return this.getPermissionObject(true);
1756
- }
1757
- const resources = this.getFlatResources();
1758
- const perm = resources
1759
- .map(resource => resource.actions.map((action) => ({ action: action, resource: resource.uri })))
1760
- .reduce((acc, val) => [...acc, ...val]);
1761
- const permissions = yield this.http
1762
- .post(`${this.actionUrl}/checkAccess`, {
1763
- includeFilters: false,
1764
- permissions: perm
1765
- })
1766
- .toPromise()
1767
- .then(response => response.permissions);
1768
- const values = {};
1769
- permissions.forEach((permission) => {
1770
- const resource = resources.find((res) => res.uri === permission.resource);
1771
- const { name } = resource;
1772
- values[name] = values[name] ? values[name] : {};
1773
- values[name][permission.action] = permission.authorized;
1774
- values[name][permission.action.toLowerCase()] = permission.authorized;
1775
- });
1776
- return values;
1823
+ async getPermissions() {
1824
+ if (this.getFlatEnvironment()) {
1825
+ return this.getPermissionObject(true);
1826
+ }
1827
+ const resources = this.getFlatResources();
1828
+ const perm = resources
1829
+ .map(resource => resource.actions.map((action) => ({ action, resource: resource.uri })))
1830
+ .reduce((acc, val) => [...acc, ...val]);
1831
+ const response = await this.http
1832
+ .post(`${this.actionUrl}/checkAccess`, { includeFilters: false, permissions: perm })
1833
+ .toPromise();
1834
+ const permissions = response.permissions ?? response;
1835
+ const values = {};
1836
+ permissions.forEach((permission) => {
1837
+ const resource = resources.find((res) => res.uri === permission.resource);
1838
+ if (!resource)
1839
+ return;
1840
+ const { name } = resource;
1841
+ values[name] = values[name] || {};
1842
+ values[name][permission.action] = permission.authorized;
1843
+ values[name][permission.action.toLowerCase()] = permission.authorized;
1777
1844
  });
1845
+ return values;
1778
1846
  }
1779
- };
1780
- PermissionsService.ctorParameters = () => [
1781
- { type: undefined, decorators: [{ type: Inject, args: [RESOURCES,] }] },
1782
- { type: Environment, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
1783
- { type: HttpClient },
1784
- { type: Router },
1785
- { type: MessageService },
1786
- { type: TranslateService }
1787
- ];
1788
- PermissionsService.ɵprov = ɵɵdefineInjectable({ factory: function PermissionsService_Factory() { return new PermissionsService(ɵɵinject(RESOURCES), ɵɵinject(ENVIRONMENT), ɵɵinject(HttpClient), ɵɵinject(Router), ɵɵinject(MessageService), ɵɵinject(TranslateService)); }, token: PermissionsService, providedIn: "root" });
1789
- PermissionsService = __decorate([
1790
- Injectable({
1791
- providedIn: 'root'
1792
- }),
1793
- __param(0, Inject(RESOURCES)),
1794
- __param(1, Inject(ENVIRONMENT))
1795
- ], PermissionsService);
1847
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PermissionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1848
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PermissionsService, providedIn: 'root' });
1849
+ }
1850
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PermissionsService, decorators: [{
1851
+ type: Injectable,
1852
+ args: [{
1853
+ providedIn: 'root'
1854
+ }]
1855
+ }] });
1796
1856
 
1797
- var PermissionsModule_1;
1798
- let PermissionsModule = PermissionsModule_1 = class PermissionsModule {
1857
+ class PermissionsModule {
1799
1858
  static forRoot(resources, environment) {
1800
1859
  return {
1801
- ngModule: PermissionsModule_1,
1860
+ ngModule: PermissionsModule,
1802
1861
  providers: [
1803
1862
  PermissionsService,
1804
1863
  {
@@ -1816,7 +1875,7 @@ let PermissionsModule = PermissionsModule_1 = class PermissionsModule {
1816
1875
  }
1817
1876
  static forChild(resources) {
1818
1877
  return {
1819
- ngModule: PermissionsModule_1,
1878
+ ngModule: PermissionsModule,
1820
1879
  providers: [
1821
1880
  {
1822
1881
  provide: RESOURCES,
@@ -1826,10 +1885,13 @@ let PermissionsModule = PermissionsModule_1 = class PermissionsModule {
1826
1885
  ]
1827
1886
  };
1828
1887
  }
1829
- };
1830
- PermissionsModule = PermissionsModule_1 = __decorate([
1831
- NgModule()
1832
- ], PermissionsModule);
1888
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PermissionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1889
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: PermissionsModule });
1890
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PermissionsModule });
1891
+ }
1892
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PermissionsModule, decorators: [{
1893
+ type: NgModule
1894
+ }] });
1833
1895
 
1834
1896
  function ResourceFactory({ domain, service, resource }) {
1835
1897
  return `res://senior.com.br/${domain}/${service}/${resource}`;
@@ -1857,11 +1919,9 @@ const endpointFactory = endpointFactoryFunction;
1857
1919
  // ADD HERE YOUR NEW ENDPOINT
1858
1920
  const PLATFORM_FEATURE_TOGGLE = endpointFactoryFunction('platform', 'feature_toggle');
1859
1921
 
1860
- let FeatureToggleService = class FeatureToggleService {
1861
- constructor(http) {
1862
- this.http = http;
1863
- this.cache = {};
1864
- }
1922
+ class FeatureToggleService {
1923
+ http = inject(HttpClient);
1924
+ cache = {};
1865
1925
  isEnabled({ domain, service, name }, tenant) {
1866
1926
  let tenantObs;
1867
1927
  if (tenant) {
@@ -1886,23 +1946,23 @@ let FeatureToggleService = class FeatureToggleService {
1886
1946
  return features.findIndex(f => f.name === name) !== -1;
1887
1947
  }));
1888
1948
  }
1889
- };
1890
- FeatureToggleService.ctorParameters = () => [
1891
- { type: HttpClient }
1892
- ];
1893
- FeatureToggleService.ɵprov = ɵɵdefineInjectable({ factory: function FeatureToggleService_Factory() { return new FeatureToggleService(ɵɵinject(HttpClient)); }, token: FeatureToggleService, providedIn: "root" });
1894
- FeatureToggleService = __decorate([
1895
- Injectable({ providedIn: 'root' })
1896
- ], FeatureToggleService);
1949
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FeatureToggleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1950
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FeatureToggleService, providedIn: 'root' });
1951
+ }
1952
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FeatureToggleService, decorators: [{
1953
+ type: Injectable,
1954
+ args: [{ providedIn: 'root' }]
1955
+ }] });
1897
1956
 
1898
- let FeatureToggleModule = class FeatureToggleModule {
1899
- };
1900
- FeatureToggleModule = __decorate([
1901
- NgModule({
1902
- imports: [HttpClientModule, HttpInterceptorModule],
1903
- providers: [FeatureToggleService]
1904
- })
1905
- ], FeatureToggleModule);
1957
+ class FeatureToggleModule {
1958
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FeatureToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1959
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: FeatureToggleModule, imports: [HttpInterceptorModule] });
1960
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FeatureToggleModule, providers: [FeatureToggleService, provideHttpClient(withInterceptorsFromDi())], imports: [HttpInterceptorModule] });
1961
+ }
1962
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FeatureToggleModule, decorators: [{
1963
+ type: NgModule,
1964
+ args: [{ imports: [HttpInterceptorModule], providers: [FeatureToggleService, provideHttpClient(withInterceptorsFromDi())] }]
1965
+ }] });
1906
1966
 
1907
1967
  var UserAction;
1908
1968
  (function (UserAction) {
@@ -1911,11 +1971,9 @@ var UserAction;
1911
1971
  UserAction["REFUSED"] = "REFUSED";
1912
1972
  })(UserAction || (UserAction = {}));
1913
1973
 
1914
- let SpotlightService = class SpotlightService {
1915
- constructor(http) {
1916
- this.http = http;
1917
- this.API_URL = 'platform/spotlight/';
1918
- }
1974
+ class SpotlightService {
1975
+ http = inject(HttpClient);
1976
+ API_URL = 'platform/spotlight/';
1919
1977
  getUser() {
1920
1978
  return this.http.post('platform/user/queries/getUser', {}).toPromise();
1921
1979
  }
@@ -1937,13 +1995,12 @@ let SpotlightService = class SpotlightService {
1937
1995
  notificateSpotlight(content) {
1938
1996
  return this.http.post(this.API_URL + 'actions/notificateSpotlight', content);
1939
1997
  }
1940
- };
1941
- SpotlightService.ctorParameters = () => [
1942
- { type: HttpClient }
1943
- ];
1944
- SpotlightService = __decorate([
1945
- Injectable()
1946
- ], SpotlightService);
1998
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpotlightService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1999
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpotlightService });
2000
+ }
2001
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpotlightService, decorators: [{
2002
+ type: Injectable
2003
+ }] });
1947
2004
 
1948
2005
  var EnumDisplayType;
1949
2006
  (function (EnumDisplayType) {
@@ -1952,6 +2009,14 @@ var EnumDisplayType;
1952
2009
  })(EnumDisplayType || (EnumDisplayType = {}));
1953
2010
 
1954
2011
  class SpotlightControl {
2012
+ id;
2013
+ spotlightId;
2014
+ status;
2015
+ firstUser;
2016
+ createdBy;
2017
+ createdDate;
2018
+ lastModifiedBy;
2019
+ lastModifiedDate;
1955
2020
  }
1956
2021
 
1957
2022
  var EnumSpotlightStatus;
@@ -1962,29 +2027,49 @@ var EnumSpotlightStatus;
1962
2027
  EnumSpotlightStatus["REFUSED"] = "REFUSED";
1963
2028
  })(EnumSpotlightStatus || (EnumSpotlightStatus = {}));
1964
2029
 
1965
- let SpotlightComponent = class SpotlightComponent {
1966
- constructor(spotlightService, cookieService, datePipe) {
1967
- this.spotlightService = spotlightService;
1968
- this.cookieService = cookieService;
1969
- this.datePipe = datePipe;
1970
- this.canAppear = false;
1971
- this.visible = false;
1972
- this.fade = false;
1973
- this.visibleChange = new EventEmitter();
1974
- }
1975
- ngOnInit() {
1976
- return __awaiter(this, void 0, void 0, function* () {
1977
- yield this.setValues();
1978
- this.fetchSpotlight();
1979
- });
2030
+ class TranslatePipe {
2031
+ translationService = inject(TranslateService);
2032
+ transform(value) {
2033
+ return this.translationService.instant(value);
1980
2034
  }
1981
- setValues() {
1982
- return __awaiter(this, void 0, void 0, function* () {
1983
- const userData = JSON.parse(this.cookieService.get('com.senior.token'));
1984
- this.currentUser = userData.username;
1985
- this.spotlightUsersList = yield this.spotlightService.listSpotlightUsers();
1986
- this.spotlightControlsList = yield this.spotlightService.listSpotlightControl();
1987
- });
2035
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TranslatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2036
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: TranslatePipe, name: "translate", pure: false });
2037
+ }
2038
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TranslatePipe, decorators: [{
2039
+ type: Pipe,
2040
+ args: [{
2041
+ name: 'translate',
2042
+ pure: false,
2043
+ }]
2044
+ }] });
2045
+
2046
+ class SpotlightComponent {
2047
+ spotlightService = inject(SpotlightService);
2048
+ cookieService = inject(CookieService);
2049
+ datePipe = inject(DatePipe);
2050
+ header;
2051
+ imgUrl;
2052
+ primaryButtonLabel;
2053
+ primaryButtonTooltip;
2054
+ canAppear = false;
2055
+ currentUser;
2056
+ spotlightUsersList;
2057
+ spotlightControlsList;
2058
+ spotlightScreen;
2059
+ canEmitEvent;
2060
+ visible = false;
2061
+ menuId;
2062
+ fade = false;
2063
+ visibleChange = new EventEmitter();
2064
+ async ngOnInit() {
2065
+ await this.setValues();
2066
+ this.fetchSpotlight();
2067
+ }
2068
+ async setValues() {
2069
+ const userData = JSON.parse(this.cookieService.get('com.senior.token'));
2070
+ this.currentUser = userData.username;
2071
+ this.spotlightUsersList = await this.spotlightService.listSpotlightUsers();
2072
+ this.spotlightControlsList = await this.spotlightService.listSpotlightControl();
1988
2073
  }
1989
2074
  setValuesInSpotlight(values) {
1990
2075
  this.header = values.spotlightTitle;
@@ -2098,7 +2183,10 @@ let SpotlightComponent = class SpotlightComponent {
2098
2183
  userOperation: this.currentUser
2099
2184
  };
2100
2185
  if (user) {
2101
- spotlightUser = Object.assign({ id: user.id }, spotlightUser);
2186
+ spotlightUser = {
2187
+ id: user.id,
2188
+ ...spotlightUser
2189
+ };
2102
2190
  }
2103
2191
  this.spotlightService.saveSpotlightUser(spotlightUser).subscribe();
2104
2192
  }
@@ -2202,82 +2290,70 @@ let SpotlightComponent = class SpotlightComponent {
2202
2290
  close() {
2203
2291
  this.visibleChange.emit(false);
2204
2292
  }
2205
- };
2206
- SpotlightComponent.ctorParameters = () => [
2207
- { type: SpotlightService },
2208
- { type: CookieService },
2209
- { type: DatePipe }
2210
- ];
2211
- __decorate([
2212
- Input()
2213
- ], SpotlightComponent.prototype, "visible", void 0);
2214
- __decorate([
2215
- Input()
2216
- ], SpotlightComponent.prototype, "menuId", void 0);
2217
- __decorate([
2218
- Input()
2219
- ], SpotlightComponent.prototype, "fade", void 0);
2220
- __decorate([
2221
- Output()
2222
- ], SpotlightComponent.prototype, "visibleChange", void 0);
2223
- SpotlightComponent = __decorate([
2224
- Component({
2225
- selector: 's-spotlight',
2226
- template: "<div class=\"s-spotlight-overlay\" id=\"ol\" *ngIf=\"canAppear && visible\">\n <div class=\"s-spotlight\" id=\"sl\" [ngClass]=\"{'s-effect-fadein': fade}\">\n <div class=\"s-spotlight-header\">\n <span class=\"s-spotlight-title\">{{header.toUpperCase()}}</span>\n <a role=\"button\" class=\"s-spotlight-close\" (click)=\"close()\"><span class=\"fa fa-times\" aria-hidden=\"true\"></span></a>\n </div>\n <div class=\"s-img\">\n <img src=\"{{imgUrl}}\">\n </div>\n <div class=\"s-spotlight-footer\">\n <div class=\"s-spotlight-footer-left\">\n <button\n pButton\n type=\"submit\"\n id=\"decline-button\"\n label=\"{{'platform.spotlight.no_interest' | translate}}\"\n (click)=\"onTertiary()\"\n class=\"ui-button-link\">\n </button>\n </div>\n <div class=\"s-spotlight-footer-right\">\n <button\n pButton\n type=\"submit\"\n id=\"remember-button\"\n label=\"{{'platform.spotlight.remember_late' | translate}}\"\n (click)=\"onSecondary()\"\n class=\"ui-button-raised ui-button-secondary\">\n </button>\n <button\n pButton\n label=\"{{primaryButtonLabel}}\"\n type=\"submit\"\n id=\"submit-button\"\n (click)=\"onPrimary()\"\n [pTooltip]=\"primaryButtonTooltip\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n class=\"ui-button-raised\">\n </button>\n </div>\n </div>\n</div>\n</div>",
2227
- styles: [".s-spotlight-overlay{display:-ms-flexbox;display:flex;position:fixed;z-index:10;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgba(0,0,0,.4)}.s-spotlight{border-radius:3px;background:#fff;margin:auto;overflow:hidden;animation:.15s forwards move}.s-spotlight-footer,.s-spotlight-header{display:-ms-flexbox;display:flex;padding:15px}.s-spotlight-header{-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.s-spotlight-footer,.s-spotlight-footer-left,.s-spotlight-footer-right{display:-ms-flexbox;display:flex}.s-spotlight-footer-right{-ms-flex:2;flex:2;-ms-flex-pack:end;justify-content:flex-end}.s-spotlight-footer-left{-ms-flex:1;flex:1;-ms-flex-pack:start;justify-content:flex-start}.s-spotlight-title{font-family:\"Open Sans\",sans-serif;font-size:16px;font-weight:400;color:#333}.s-spotlight-close{display:block;margin-left:15px;color:#000}.s-img{width:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.s-img img{width:100%}.s-effect-fadein{animation:.15s forwards fade}@keyframes fade{0%{opacity:0}100%{opacity:1}}@media (max-width:595px){.s-spotlight-footer,.s-spotlight-footer-left,.s-spotlight-footer-right{-ms-flex-align:center;align-items:center;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.s-spotlight-footer button{margin:0 0 15px!important;width:100%!important}}@media (min-width:576px){.s-spotlight{width:100%}}@media (min-width:768px){.s-spotlight{width:720px}.s-spotlight-footer,.s-spotlight-footer-left,.s-spotlight-footer-right{-ms-flex-direction:row;flex-direction:row}}@media (min-width:992px){.s-spotlight{width:960px}}@media (min-width:1200px){.s-spotlight{width:50%}}"]
2228
- })
2229
- ], SpotlightComponent);
2293
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpotlightComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2294
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SpotlightComponent, selector: "s-spotlight", inputs: { visible: "visible", menuId: "menuId", fade: "fade" }, outputs: { visibleChange: "visibleChange" }, ngImport: i0, template: "<div class=\"s-spotlight-overlay\" id=\"ol\" *ngIf=\"canAppear && visible\">\n <div class=\"s-spotlight\" id=\"sl\" [ngClass]=\"{'s-effect-fadein': fade}\">\n <div class=\"s-spotlight-header\">\n <span class=\"s-spotlight-title\">{{header.toUpperCase()}}</span>\n <a role=\"button\" class=\"s-spotlight-close\" (click)=\"close()\"><span class=\"fa fa-times\" aria-hidden=\"true\"></span></a>\n </div>\n <div class=\"s-img\">\n <img src=\"{{imgUrl}}\">\n </div>\n <div class=\"s-spotlight-footer\">\n <div class=\"s-spotlight-footer-left\">\n <button\n pButton\n type=\"submit\"\n id=\"decline-button\"\n label=\"{{'platform.spotlight.no_interest' | translate}}\"\n (click)=\"onTertiary()\"\n class=\"ui-button-link\">\n </button>\n </div>\n <div class=\"s-spotlight-footer-right\">\n <button\n pButton\n type=\"submit\"\n id=\"remember-button\"\n label=\"{{'platform.spotlight.remember_late' | translate}}\"\n (click)=\"onSecondary()\"\n class=\"ui-button-raised ui-button-secondary\">\n </button>\n <button\n pButton\n label=\"{{primaryButtonLabel}}\"\n type=\"submit\"\n id=\"submit-button\"\n (click)=\"onPrimary()\"\n [pTooltip]=\"primaryButtonTooltip\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n class=\"ui-button-raised\">\n </button>\n </div>\n </div>\n</div>\n</div>", styles: [".s-spotlight-overlay{display:flex;position:fixed;z-index:10;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#000;background-color:#0006}.s-spotlight{border-radius:3px;background:#fff;margin:auto;overflow:hidden;animation:move .15s forwards}.s-spotlight-header,.s-spotlight-footer{display:flex;padding:15px}.s-spotlight-header{align-items:center;justify-content:space-between}.s-spotlight-footer,.s-spotlight-footer-right,.s-spotlight-footer-left{display:flex}.s-spotlight-footer-right{flex:2;justify-content:flex-end}.s-spotlight-footer-left{flex:1;justify-content:flex-start}.s-spotlight-title{font-family:Open Sans,sans-serif;font-size:16px;font-weight:400;color:#333}.s-spotlight-close{display:block;margin-left:15px;color:#000}.s-img{width:100%;display:flex;align-items:center;justify-content:center}.s-img img{width:100%}.s-effect-fadein{animation:fade .15s forwards}@keyframes fade{0%{opacity:0}to{opacity:1}}@media (max-width: 595px){.s-spotlight-footer,.s-spotlight-footer-right,.s-spotlight-footer-left{align-items:center;flex-direction:column-reverse}.s-spotlight-footer button{margin:0 0 15px!important;width:100%!important}}@media (min-width: 576px){.s-spotlight{width:100%}}@media (min-width: 768px){.s-spotlight{width:720px}.s-spotlight-footer,.s-spotlight-footer-right,.s-spotlight-footer-left{flex-direction:row}}@media (min-width: 992px){.s-spotlight{width:960px}}@media (min-width: 1200px){.s-spotlight{width:50%}}\n"], dependencies: [{ kind: "directive", type: i1$3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "directive", type: i2$2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
2295
+ }
2296
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpotlightComponent, decorators: [{
2297
+ type: Component,
2298
+ args: [{ selector: 's-spotlight', template: "<div class=\"s-spotlight-overlay\" id=\"ol\" *ngIf=\"canAppear && visible\">\n <div class=\"s-spotlight\" id=\"sl\" [ngClass]=\"{'s-effect-fadein': fade}\">\n <div class=\"s-spotlight-header\">\n <span class=\"s-spotlight-title\">{{header.toUpperCase()}}</span>\n <a role=\"button\" class=\"s-spotlight-close\" (click)=\"close()\"><span class=\"fa fa-times\" aria-hidden=\"true\"></span></a>\n </div>\n <div class=\"s-img\">\n <img src=\"{{imgUrl}}\">\n </div>\n <div class=\"s-spotlight-footer\">\n <div class=\"s-spotlight-footer-left\">\n <button\n pButton\n type=\"submit\"\n id=\"decline-button\"\n label=\"{{'platform.spotlight.no_interest' | translate}}\"\n (click)=\"onTertiary()\"\n class=\"ui-button-link\">\n </button>\n </div>\n <div class=\"s-spotlight-footer-right\">\n <button\n pButton\n type=\"submit\"\n id=\"remember-button\"\n label=\"{{'platform.spotlight.remember_late' | translate}}\"\n (click)=\"onSecondary()\"\n class=\"ui-button-raised ui-button-secondary\">\n </button>\n <button\n pButton\n label=\"{{primaryButtonLabel}}\"\n type=\"submit\"\n id=\"submit-button\"\n (click)=\"onPrimary()\"\n [pTooltip]=\"primaryButtonTooltip\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n class=\"ui-button-raised\">\n </button>\n </div>\n </div>\n</div>\n</div>", styles: [".s-spotlight-overlay{display:flex;position:fixed;z-index:10;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#000;background-color:#0006}.s-spotlight{border-radius:3px;background:#fff;margin:auto;overflow:hidden;animation:move .15s forwards}.s-spotlight-header,.s-spotlight-footer{display:flex;padding:15px}.s-spotlight-header{align-items:center;justify-content:space-between}.s-spotlight-footer,.s-spotlight-footer-right,.s-spotlight-footer-left{display:flex}.s-spotlight-footer-right{flex:2;justify-content:flex-end}.s-spotlight-footer-left{flex:1;justify-content:flex-start}.s-spotlight-title{font-family:Open Sans,sans-serif;font-size:16px;font-weight:400;color:#333}.s-spotlight-close{display:block;margin-left:15px;color:#000}.s-img{width:100%;display:flex;align-items:center;justify-content:center}.s-img img{width:100%}.s-effect-fadein{animation:fade .15s forwards}@keyframes fade{0%{opacity:0}to{opacity:1}}@media (max-width: 595px){.s-spotlight-footer,.s-spotlight-footer-right,.s-spotlight-footer-left{align-items:center;flex-direction:column-reverse}.s-spotlight-footer button{margin:0 0 15px!important;width:100%!important}}@media (min-width: 576px){.s-spotlight{width:100%}}@media (min-width: 768px){.s-spotlight{width:720px}.s-spotlight-footer,.s-spotlight-footer-right,.s-spotlight-footer-left{flex-direction:row}}@media (min-width: 992px){.s-spotlight{width:960px}}@media (min-width: 1200px){.s-spotlight{width:50%}}\n"] }]
2299
+ }], propDecorators: { visible: [{
2300
+ type: Input
2301
+ }], menuId: [{
2302
+ type: Input
2303
+ }], fade: [{
2304
+ type: Input
2305
+ }], visibleChange: [{
2306
+ type: Output
2307
+ }] } });
2230
2308
 
2231
- const fallback$1 = {
2309
+ const fallback = {
2232
2310
  'platform.spotlight.no_interest': 'Não tenho interesse',
2233
2311
  'platform.spotlight.remember_late': 'Lembrar mais tarde'
2234
2312
  };
2235
2313
 
2236
- let TranslatePipe$1 = class TranslatePipe {
2237
- constructor(translationService) {
2238
- this.translationService = translationService;
2239
- }
2240
- transform(value) {
2241
- return this.translationService.instant(value);
2242
- }
2243
- };
2244
- TranslatePipe$1.ctorParameters = () => [
2245
- { type: TranslateService }
2246
- ];
2247
- TranslatePipe$1 = __decorate([
2248
- Pipe({
2249
- name: 'translate',
2250
- pure: false,
2251
- })
2252
- ], TranslatePipe$1);
2253
-
2254
- let SpotlightModule = class SpotlightModule {
2255
- };
2256
- SpotlightModule = __decorate([
2257
- NgModule({
2258
- imports: [
2259
- ButtonModule$1,
2314
+ class SpotlightModule {
2315
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpotlightModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2316
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SpotlightModule, declarations: [SpotlightComponent,
2317
+ TranslatePipe], imports: [ButtonModule$1,
2260
2318
  TooltipModule,
2261
2319
  CommonModule,
2262
- HttpInterceptorModule,
2263
- TranslationsModule.forChild([{ domain: 'platform', service: 'spotlight', fallback: fallback$1 }]),
2264
- ],
2265
- providers: [
2320
+ HttpInterceptorModule, TranslationsModule], exports: [SpotlightComponent] });
2321
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpotlightModule, providers: [
2266
2322
  SpotlightService,
2267
2323
  DatePipe,
2268
2324
  CookieService
2269
- ],
2270
- declarations: [
2271
- SpotlightComponent,
2272
- TranslatePipe$1
2273
- ],
2274
- exports: [SpotlightComponent]
2275
- })
2276
- ], SpotlightModule);
2325
+ ], imports: [ButtonModule$1,
2326
+ TooltipModule,
2327
+ CommonModule,
2328
+ HttpInterceptorModule,
2329
+ TranslationsModule.forChild([{ domain: 'platform', service: 'spotlight', fallback }])] });
2330
+ }
2331
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpotlightModule, decorators: [{
2332
+ type: NgModule,
2333
+ args: [{
2334
+ imports: [
2335
+ ButtonModule$1,
2336
+ TooltipModule,
2337
+ CommonModule,
2338
+ HttpInterceptorModule,
2339
+ TranslationsModule.forChild([{ domain: 'platform', service: 'spotlight', fallback }]),
2340
+ ],
2341
+ providers: [
2342
+ SpotlightService,
2343
+ DatePipe,
2344
+ CookieService
2345
+ ],
2346
+ declarations: [
2347
+ SpotlightComponent,
2348
+ TranslatePipe
2349
+ ],
2350
+ exports: [SpotlightComponent]
2351
+ }]
2352
+ }] });
2277
2353
 
2278
2354
  /**
2279
2355
  * Generated bundle index. Do not edit.
2280
2356
  */
2281
2357
 
2282
- export { AdvancedFilterComponent, AdvancedFilterModule, AdvancedFilterService, AppRoutingModule, CyclicJsonInterceptorModule, FeatureToggleModule, FeatureToggleService, Filter, FilterType, FormFilter, HttpInterceptorModule, LENGTH_DEFAULT, PermissionsModule, PermissionsService, RestUrl, Scope, SpotlightComponent, SpotlightModule, TranslationsConfig, TranslationsModule, USER_INFO, XServicesUrl, factory, promise, fallback as ɵa, CalendarOptionsService as ɵb, FormFilterComponent as ɵc, MapValuesPipe as ɵd, TranslatePipe as ɵe, CyclicJsonInterceptor as ɵf, HttpInterceptor as ɵg, RESOURCES as ɵh, ENVIRONMENT as ɵi, Environment as ɵk, fallback$1 as ɵl, SpotlightService as ɵm, TranslatePipe$1 as ɵn };
2283
- //# sourceMappingURL=seniorsistemas-platform-components.js.map
2358
+ export { AdvancedFilterComponent, AdvancedFilterModule, AdvancedFilterService, AppRoutingModule, CyclicJsonInterceptorModule, FeatureToggleModule, FeatureToggleService, Filter, FilterType, FormFilter, FormFilterComponent, HttpInterceptorModule, LENGTH_DEFAULT, PermissionsModule, PermissionsService, RestUrl, Scope, SpotlightComponent, SpotlightModule, TranslationsConfig, TranslationsModule, USER_INFO, XServicesUrl, factory, promise };
2359
+ //# sourceMappingURL=seniorsistemas-platform-components.mjs.map