@vality/matez 19.0.0

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 (270) hide show
  1. package/README.md +8 -0
  2. package/_index.scss +9 -0
  3. package/fesm2022/vality-matez.mjs +3809 -0
  4. package/fesm2022/vality-matez.mjs.map +1 -0
  5. package/index.d.ts +1 -0
  6. package/lib/components/actions/actions.component.d.ts +5 -0
  7. package/lib/components/actions/actions.module.d.ts +7 -0
  8. package/lib/components/actions/index.d.ts +2 -0
  9. package/lib/components/confirm-dialog/confirm-dialog.component.d.ts +16 -0
  10. package/lib/components/confirm-dialog/confirm-dialog.module.d.ts +14 -0
  11. package/lib/components/confirm-dialog/index.d.ts +2 -0
  12. package/lib/components/content-loading/content-loading.component.d.ts +8 -0
  13. package/lib/components/content-loading/index.d.ts +1 -0
  14. package/lib/components/date-range-field/date-range-field.component.d.ts +16 -0
  15. package/lib/components/date-range-field/date-range-field.module.d.ts +13 -0
  16. package/lib/components/date-range-field/index.d.ts +5 -0
  17. package/lib/components/date-range-field/types/date-range.d.ts +4 -0
  18. package/lib/components/date-range-field/utils/create-date-range-to-today.d.ts +2 -0
  19. package/lib/components/date-range-field/utils/is-equal-date-range.d.ts +2 -0
  20. package/lib/components/datetime-field/datetime-field.component.d.ts +19 -0
  21. package/lib/components/datetime-field/datetime-field.module.d.ts +11 -0
  22. package/lib/components/datetime-field/index.d.ts +2 -0
  23. package/lib/components/dialog/components/dialog-actions/dialog-actions.component.d.ts +5 -0
  24. package/lib/components/dialog/dialog.component.d.ts +28 -0
  25. package/lib/components/dialog/dialog.module.d.ts +16 -0
  26. package/lib/components/dialog/index.d.ts +8 -0
  27. package/lib/components/dialog/services/dialog.service.d.ts +23 -0
  28. package/lib/components/dialog/tokens.d.ts +8 -0
  29. package/lib/components/dialog/types/dialog-response-status.d.ts +5 -0
  30. package/lib/components/dialog/types/dialog-response.d.ts +6 -0
  31. package/lib/components/dialog/utils/dialog-superclass.d.ts +13 -0
  32. package/lib/components/error-page/error-page-routing.module.d.ts +7 -0
  33. package/lib/components/error-page/error-page.component.d.ts +5 -0
  34. package/lib/components/error-page/error-page.module.d.ts +9 -0
  35. package/lib/components/error-page/index.d.ts +2 -0
  36. package/lib/components/file-upload/file-upload.component.d.ts +14 -0
  37. package/lib/components/file-upload/file-upload.module.d.ts +9 -0
  38. package/lib/components/file-upload/index.d.ts +3 -0
  39. package/lib/components/file-upload/utils/load-file-content.d.ts +3 -0
  40. package/lib/components/filters/components/filters-dialog/filters-dialog.component.d.ts +10 -0
  41. package/lib/components/filters/components/main-filters/main-filters.directive.d.ts +8 -0
  42. package/lib/components/filters/components/more-filters-button/more-filters-button.component.d.ts +7 -0
  43. package/lib/components/filters/components/other-filters/other-filters.directive.d.ts +8 -0
  44. package/lib/components/filters/filters.component.d.ts +29 -0
  45. package/lib/components/filters/filters.module.d.ts +19 -0
  46. package/lib/components/filters/index.d.ts +5 -0
  47. package/lib/components/index.d.ts +18 -0
  48. package/lib/components/input-field/index.d.ts +2 -0
  49. package/lib/components/input-field/input-field.component.d.ts +14 -0
  50. package/lib/components/input-field/input-field.module.d.ts +12 -0
  51. package/lib/components/list-field/index.d.ts +2 -0
  52. package/lib/components/list-field/list-field.component.d.ts +12 -0
  53. package/lib/components/list-field/list-field.module.d.ts +10 -0
  54. package/lib/components/nav/index.d.ts +1 -0
  55. package/lib/components/nav/nav.component.d.ts +16 -0
  56. package/lib/components/number-range-field/index.d.ts +2 -0
  57. package/lib/components/number-range-field/number-range-field.component.d.ts +18 -0
  58. package/lib/components/number-range-field/number-range-field.module.d.ts +9 -0
  59. package/lib/components/progress/index.d.ts +3 -0
  60. package/lib/components/progress/progress.component.d.ts +9 -0
  61. package/lib/components/progress/progress.module.d.ts +9 -0
  62. package/lib/components/progress/utils/get-progress-by-count.d.ts +1 -0
  63. package/lib/components/select-autocomplete/autocomplete-field/autocomplete-field.component.d.ts +23 -0
  64. package/lib/components/select-autocomplete/autocomplete-field/autocomplete-field.module.d.ts +13 -0
  65. package/lib/components/select-autocomplete/autocomplete-field/index.d.ts +2 -0
  66. package/lib/components/select-autocomplete/index.d.ts +3 -0
  67. package/lib/components/select-autocomplete/select-field/index.d.ts +2 -0
  68. package/lib/components/select-autocomplete/select-field/select-field.component.d.ts +26 -0
  69. package/lib/components/select-autocomplete/select-field/select-field.module.d.ts +12 -0
  70. package/lib/components/select-autocomplete/types/index.d.ts +1 -0
  71. package/lib/components/select-autocomplete/types/option.d.ts +6 -0
  72. package/lib/components/select-autocomplete/utils/find-option-by-value.d.ts +2 -0
  73. package/lib/components/select-autocomplete/utils/get-hint-text.d.ts +5 -0
  74. package/lib/components/select-autocomplete/utils/index.d.ts +2 -0
  75. package/lib/components/select-autocomplete/utils/search-options.d.ts +3 -0
  76. package/lib/components/switch-button/index.d.ts +2 -0
  77. package/lib/components/switch-button/switch-button.component.d.ts +24 -0
  78. package/lib/components/switch-button/switch-button.module.d.ts +11 -0
  79. package/lib/components/table/components/base-column.component.d.ts +17 -0
  80. package/lib/components/table/components/customize/customize.component.d.ts +17 -0
  81. package/lib/components/table/components/dnd-column.component.d.ts +7 -0
  82. package/lib/components/table/components/infinity-scroll.directive.d.ts +12 -0
  83. package/lib/components/table/components/no-records.component.d.ts +7 -0
  84. package/lib/components/table/components/select-column.component.d.ts +21 -0
  85. package/lib/components/table/components/table-actions.component.d.ts +5 -0
  86. package/lib/components/table/components/table-info-bar/table-info-bar.component.d.ts +33 -0
  87. package/lib/components/table/components/table-inputs.component.d.ts +5 -0
  88. package/lib/components/table/components/table-progress-bar.component.d.ts +6 -0
  89. package/lib/components/table/consts.d.ts +8 -0
  90. package/lib/components/table/index.d.ts +10 -0
  91. package/lib/components/table/presets/create-menu-column.d.ts +6 -0
  92. package/lib/components/table/presets/index.d.ts +1 -0
  93. package/lib/components/table/table.component.d.ts +81 -0
  94. package/lib/components/table/table.module.d.ts +34 -0
  95. package/lib/components/table/tree-data/index.d.ts +2 -0
  96. package/lib/components/table/tree-data/tree-data-item-to-inline-data-item.d.ts +10 -0
  97. package/lib/components/table/tree-data/tree-data.d.ts +10 -0
  98. package/lib/components/table/types/column.d.ts +34 -0
  99. package/lib/components/table/types/drag-drop.d.ts +10 -0
  100. package/lib/components/table/types/index.d.ts +3 -0
  101. package/lib/components/table/types/update-options.d.ts +3 -0
  102. package/lib/components/table/utils/cached-head-map.d.ts +2 -0
  103. package/lib/components/table/utils/correct-priorities.d.ts +5 -0
  104. package/lib/components/table/utils/create-column.d.ts +6 -0
  105. package/lib/components/table/utils/create-intersection-observer.d.ts +2 -0
  106. package/lib/components/table/utils/create-unique-column-def.d.ts +1 -0
  107. package/lib/components/table/utils/filter-sort.d.ts +14 -0
  108. package/lib/components/table/utils/normalize-string.d.ts +2 -0
  109. package/lib/components/table/utils/table-data-source.d.ts +31 -0
  110. package/lib/components/table/utils/table-to-csv-object.d.ts +3 -0
  111. package/lib/components/table/utils/to-columns-data.d.ts +26 -0
  112. package/lib/components/tag/index.d.ts +2 -0
  113. package/lib/components/tag/tag.component.d.ts +10 -0
  114. package/lib/components/tag/tag.module.d.ts +10 -0
  115. package/lib/components/value/components/menu-value.component.d.ts +15 -0
  116. package/lib/components/value/components/toggle-value.component.d.ts +8 -0
  117. package/lib/components/value/components/value-list.component.d.ts +7 -0
  118. package/lib/components/value/index.d.ts +4 -0
  119. package/lib/components/value/types/base-type.d.ts +21 -0
  120. package/lib/components/value/types/value.d.ts +10 -0
  121. package/lib/components/value/utils/currency-amount-value-to-string.d.ts +8 -0
  122. package/lib/components/value/utils/datetime-value-to-string.d.ts +4 -0
  123. package/lib/components/value/utils/unknown-to-string.d.ts +1 -0
  124. package/lib/components/value/utils/value-to-string.d.ts +2 -0
  125. package/lib/components/value/value.component.d.ts +27 -0
  126. package/lib/directives/highlight.directive.d.ts +15 -0
  127. package/lib/directives/index.d.ts +2 -0
  128. package/lib/directives/tooltip.directive.d.ts +1 -0
  129. package/lib/index.d.ts +6 -0
  130. package/lib/pipes/amount-currency.pipe.d.ts +10 -0
  131. package/lib/pipes/enum-key-values.pipe.d.ts +10 -0
  132. package/lib/pipes/enum-key.pipe.d.ts +8 -0
  133. package/lib/pipes/enum-keys.pipe.d.ts +7 -0
  134. package/lib/pipes/humanized-duration.pipe.d.ts +13 -0
  135. package/lib/pipes/index.d.ts +8 -0
  136. package/lib/pipes/inline-json.pipe.d.ts +7 -0
  137. package/lib/pipes/pipes.module.d.ts +14 -0
  138. package/lib/pipes/select.pipe.d.ts +12 -0
  139. package/lib/services/config/config.service.d.ts +12 -0
  140. package/lib/services/config/index.d.ts +1 -0
  141. package/lib/services/fetch-superclass/fetch-superclass.d.ts +39 -0
  142. package/lib/services/fetch-superclass/index.d.ts +1 -0
  143. package/lib/services/index.d.ts +5 -0
  144. package/lib/services/log/index.d.ts +2 -0
  145. package/lib/services/log/log-error.d.ts +12 -0
  146. package/lib/services/log/log.module.d.ts +7 -0
  147. package/lib/services/log/notify-log.service.d.ts +17 -0
  148. package/lib/services/log/types/operation.d.ts +1 -0
  149. package/lib/services/query-params/index.d.ts +4 -0
  150. package/lib/services/query-params/query-params.module.d.ts +6 -0
  151. package/lib/services/query-params/query-params.service.d.ts +37 -0
  152. package/lib/services/query-params/types/serializer.d.ts +6 -0
  153. package/lib/services/query-params/utils/date-query-params-serializers.d.ts +2 -0
  154. package/lib/services/query-params/utils/deserialize-query-param.d.ts +2 -0
  155. package/lib/services/query-params/utils/index.d.ts +2 -0
  156. package/lib/services/query-params/utils/query-params-serializers.d.ts +3 -0
  157. package/lib/services/query-params/utils/serialize-query-param.d.ts +2 -0
  158. package/lib/services/url.service.d.ts +12 -0
  159. package/lib/styles/index.d.ts +1 -0
  160. package/lib/styles/types/color.d.ts +4 -0
  161. package/lib/types/progressable.d.ts +3 -0
  162. package/lib/utils/async/async-transform.d.ts +20 -0
  163. package/lib/utils/async/get-possibly-async-observable.d.ts +3 -0
  164. package/lib/utils/async/index.d.ts +3 -0
  165. package/lib/utils/async/is-async.d.ts +4 -0
  166. package/lib/utils/clean/clean.d.ts +2 -0
  167. package/lib/utils/clean/index.d.ts +1 -0
  168. package/lib/utils/compare/compare-different-types.d.ts +4 -0
  169. package/lib/utils/compare/index.d.ts +1 -0
  170. package/lib/utils/component/component-changes.d.ts +8 -0
  171. package/lib/utils/component/index.d.ts +1 -0
  172. package/lib/utils/create-storage-value.d.ts +11 -0
  173. package/lib/utils/csv/create-csv.d.ts +1 -0
  174. package/lib/utils/csv/index.d.ts +3 -0
  175. package/lib/utils/csv/parse-csv.d.ts +2 -0
  176. package/lib/utils/csv/utils/remove-line-breaks.d.ts +1 -0
  177. package/lib/utils/csv/utils/unify-csv-items.d.ts +1 -0
  178. package/lib/utils/currency/format-currency.d.ts +1 -0
  179. package/lib/utils/currency/get-currency-exponent.d.ts +1 -0
  180. package/lib/utils/currency/index.d.ts +4 -0
  181. package/lib/utils/currency/to-major.d.ts +2 -0
  182. package/lib/utils/currency/to-minor.d.ts +2 -0
  183. package/lib/utils/date/get-no-time-zone-iso-string.d.ts +2 -0
  184. package/lib/utils/date/index.d.ts +1 -0
  185. package/lib/utils/decorators/debounce-time.d.ts +1 -0
  186. package/lib/utils/decorators/index.d.ts +1 -0
  187. package/lib/utils/empty/index.d.ts +3 -0
  188. package/lib/utils/empty/is-empty-primitive.d.ts +1 -0
  189. package/lib/utils/empty/is-empty.d.ts +1 -0
  190. package/lib/utils/empty/types/nil.d.ts +1 -0
  191. package/lib/utils/enum/get-enum-keys.d.ts +11 -0
  192. package/lib/utils/enum/index.d.ts +2 -0
  193. package/lib/utils/enum/types/enum.d.ts +2 -0
  194. package/lib/utils/enum/types/union-enum.d.ts +2 -0
  195. package/lib/utils/file/download-file.d.ts +8 -0
  196. package/lib/utils/file/index.d.ts +1 -0
  197. package/lib/utils/form/create-controls.d.ts +4 -0
  198. package/lib/utils/form/form-wrappers/abstract-control-superclass.d.ts +17 -0
  199. package/lib/utils/form/form-wrappers/form-component-superclass.directive.d.ts +14 -0
  200. package/lib/utils/form/form-wrappers/form-control-superclass.directive.d.ts +8 -0
  201. package/lib/utils/form/form-wrappers/form-group-superclass.directive.d.ts +11 -0
  202. package/lib/utils/form/form-wrappers/index.d.ts +5 -0
  203. package/lib/utils/form/form-wrappers/utils/create-control-providers.d.ts +2 -0
  204. package/lib/utils/form/form-wrappers/utils/get-errors-tree.d.ts +6 -0
  205. package/lib/utils/form/form-wrappers/utils/provide-validators.d.ts +2 -0
  206. package/lib/utils/form/form-wrappers/utils/provide-value-accessor.d.ts +2 -0
  207. package/lib/utils/form/get-valid-value-changes.d.ts +3 -0
  208. package/lib/utils/form/get-value-changes.d.ts +3 -0
  209. package/lib/utils/form/get-value.d.ts +2 -0
  210. package/lib/utils/form/has-controls.d.ts +2 -0
  211. package/lib/utils/form/index.d.ts +8 -0
  212. package/lib/utils/form/set-disabled.d.ts +2 -0
  213. package/lib/utils/form/types/form-group-by-value.d.ts +4 -0
  214. package/lib/utils/import/get-import-value.d.ts +2 -0
  215. package/lib/utils/import/index.d.ts +1 -0
  216. package/lib/utils/index.d.ts +19 -0
  217. package/lib/utils/json/index.d.ts +1 -0
  218. package/lib/utils/json/inline-json.d.ts +1 -0
  219. package/lib/utils/object/count-changed.d.ts +3 -0
  220. package/lib/utils/object/count-props.d.ts +1 -0
  221. package/lib/utils/object/index.d.ts +3 -0
  222. package/lib/utils/object/select.d.ts +3 -0
  223. package/lib/utils/operators/async-start-with.d.ts +2 -0
  224. package/lib/utils/operators/debounce-time-with-first.d.ts +2 -0
  225. package/lib/utils/operators/fork-join-to-result.d.ts +20 -0
  226. package/lib/utils/operators/get-observable.d.ts +3 -0
  227. package/lib/utils/operators/handle-error.d.ts +3 -0
  228. package/lib/utils/operators/in-progress-from.d.ts +2 -0
  229. package/lib/utils/operators/index.d.ts +8 -0
  230. package/lib/utils/operators/pass-error.d.ts +2 -0
  231. package/lib/utils/operators/progress-to.d.ts +2 -0
  232. package/lib/utils/operators/switch-combine-with.d.ts +6 -0
  233. package/lib/utils/string/index.d.ts +1 -0
  234. package/lib/utils/string/split-by-separators.d.ts +1 -0
  235. package/lib/utils/transform-attribute/array-attribute.d.ts +3 -0
  236. package/lib/utils/transform-attribute/index.d.ts +1 -0
  237. package/package.json +44 -0
  238. package/src/lib/components/actions/actions.component.scss +20 -0
  239. package/src/lib/components/content-loading/content-loading.component.scss +26 -0
  240. package/src/lib/components/date-range-field/date-range-field.component.scss +19 -0
  241. package/src/lib/components/datetime-field/datetime-field.component.scss +11 -0
  242. package/src/lib/components/dialog/_dialog-theme.scss +9 -0
  243. package/src/lib/components/dialog/dialog.component.scss +71 -0
  244. package/src/lib/components/error-page/error-page.component.scss +19 -0
  245. package/src/lib/components/file-upload/file-upload.component.scss +12 -0
  246. package/src/lib/components/filters/components/filters-dialog/filters-dialog.component.scss +19 -0
  247. package/src/lib/components/filters/components/more-filters-button/more-filters-button.component.scss +0 -0
  248. package/src/lib/components/filters/filters.component.scss +23 -0
  249. package/src/lib/components/input-field/_input-field-theme.scss +7 -0
  250. package/src/lib/components/input-field/input-field.component.scss +21 -0
  251. package/src/lib/components/nav/_nav-theme.scss +33 -0
  252. package/src/lib/components/nav/nav.component.scss +32 -0
  253. package/src/lib/components/number-range-field/number-range-field.component.scss +5 -0
  254. package/src/lib/components/select-autocomplete/autocomplete-field/autocomplete-field.component.scss +5 -0
  255. package/src/lib/components/select-autocomplete/select-field/select-field.component.scss +26 -0
  256. package/src/lib/components/table/_table-theme.scss +11 -0
  257. package/src/lib/components/table/components/table-info-bar/table-info-bar.component.scss +45 -0
  258. package/src/lib/components/table/table.component.scss +84 -0
  259. package/src/lib/components/tag/_tag-theme.scss +30 -0
  260. package/src/lib/components/tag/tag.component.scss +40 -0
  261. package/src/lib/components/value/_value-theme.scss +10 -0
  262. package/src/lib/components/value/value.component.scss +42 -0
  263. package/src/lib/styles/_all-component-themes.scss +23 -0
  264. package/src/lib/styles/_app.scss +10 -0
  265. package/src/lib/styles/_core.scss +8 -0
  266. package/src/lib/styles/_mat-component-variants.scss +65 -0
  267. package/src/lib/styles/_select-theme.scss +6 -0
  268. package/src/lib/styles/_typography-hierarchy.scss +37 -0
  269. package/src/lib/styles/_v-tokens.scss +11 -0
  270. package/src/lib/styles/utils/create-palette.scss +84 -0
@@ -0,0 +1,3809 @@
1
+ import * as i1$1 from '@angular/common';
2
+ import { CommonModule, AsyncPipe, formatCurrency as formatCurrency$1, getCurrencySymbol, formatDate, NgClass } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { ChangeDetectionStrategy, Component, NgModule, Input, EventEmitter, booleanAttribute, Output, HostBinding, InjectionToken, Optional, Inject, Injectable, inject, Directive, input, numberAttribute, ChangeDetectorRef, DestroyRef, forwardRef, LOCALE_ID, model, runInInjectionContext, Injector, output, viewChild, computed, signal, ElementRef, ViewChild, ContentChild, TemplateRef, ViewEncapsulation, DEFAULT_CURRENCY_CODE, Pipe } from '@angular/core';
5
+ import * as i1$4 from '@angular/material/button';
6
+ import { MatButtonModule, MatIconButton, MatButton } from '@angular/material/button';
7
+ import * as i1$2 from '@angular/material/dialog';
8
+ import { MatDialogModule, MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
9
+ import * as i2 from '@angular/material/divider';
10
+ import { MatDividerModule, MatDivider } from '@angular/material/divider';
11
+ import * as i2$1 from '@angular/material/icon';
12
+ import { MatIconModule, MatIcon } from '@angular/material/icon';
13
+ import * as i1 from '@angular/material/progress-bar';
14
+ import { MatProgressBarModule, MatProgressBar } from '@angular/material/progress-bar';
15
+ import * as i10 from '@angular/cdk/drag-drop';
16
+ import { CdkDrag, CdkDropList } from '@angular/cdk/drag-drop';
17
+ import * as i1$3 from '@angular/forms';
18
+ import { NG_VALIDATORS, NG_VALUE_ACCESSOR, FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
19
+ import * as i6 from '@angular/material/badge';
20
+ import { MatBadgeModule } from '@angular/material/badge';
21
+ import * as i4 from '@angular/material/card';
22
+ import { MatCardModule } from '@angular/material/card';
23
+ import * as i9 from '@angular/material/sort';
24
+ import { MatSort, MatSortModule } from '@angular/material/sort';
25
+ import * as i2$4 from '@angular/material/table';
26
+ import { MatTableDataSource, MatTable, MatColumnDef, MatCellDef, MatHeaderCellDef, MatFooterCellDef, MatTableModule, MatRow } from '@angular/material/table';
27
+ import * as i2$5 from '@angular/material/tooltip';
28
+ import { MatTooltip, MatTooltipModule } from '@angular/material/tooltip';
29
+ import { random, get, difference, isEqual as isEqual$1, capitalize, lowerFirst, isArray } from 'lodash-es';
30
+ import * as i2$2 from '@angular/material/input';
31
+ import { MatInputModule } from '@angular/material/input';
32
+ import startCase from 'lodash-es/startCase';
33
+ import { isPrimitive } from 'utility-types';
34
+ import { isObservable, defer, merge, combineLatest, mergeMap, EMPTY, catchError, of, scan, takeLast, from, switchMap, ReplaySubject, debounce, interval, concat, timer, take, fromEvent, filter as filter$1, map as map$1, startWith as startWith$1, distinctUntilChanged as distinctUntilChanged$1, shareReplay as shareReplay$1, BehaviorSubject, Observable, debounceTime as debounceTime$1, Subject, tap, first as first$1, forkJoin, lastValueFrom, timeout, skipWhile, race, skip, mergeScan, takeUntil, throttleTime } from 'rxjs';
35
+ import { finalize, map, delay, startWith, distinctUntilChanged, shareReplay, catchError as catchError$1, filter, first, debounceTime, share } from 'rxjs/operators';
36
+ import { isPromise } from 'rxjs/internal/util/isPromise';
37
+ import { takeUntilDestroyed, toSignal, toObservable, outputFromObservable } from '@angular/core/rxjs-interop';
38
+ import { WrappedControlSuperclass, FormComponentSuperclass as FormComponentSuperclass$1 } from '@s-libs/ng-core';
39
+ import omitBy from 'lodash-es/omitBy';
40
+ import isNil from 'lodash-es/isNil';
41
+ import * as currencies from '@dinero.js/currencies';
42
+ import round from 'lodash-es/round';
43
+ import isEqual from 'lodash-es/isEqual';
44
+ import lodashIsEmpty from 'lodash-es/isEmpty';
45
+ import isObject$1 from 'lodash-es/isObject';
46
+ import * as papaparse from 'papaparse';
47
+ import papaparse__default from 'papaparse';
48
+ import * as i3 from '@angular/material/form-field';
49
+ import { MatFormFieldModule } from '@angular/material/form-field';
50
+ import * as i2$3 from '@angular/material/chips';
51
+ import { MatChipsModule } from '@angular/material/chips';
52
+ import * as i1$6 from '@angular/router';
53
+ import { RouterModule, RouterLink } from '@angular/router';
54
+ export { MtxTooltip as Tooltip } from '@ng-matero/extensions/tooltip';
55
+ import { MatMenu, MatMenuItem, MatMenuTrigger } from '@angular/material/menu';
56
+ import * as i1$5 from '@angular/material/slide-toggle';
57
+ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
58
+ import { SelectionModel } from '@angular/cdk/collections';
59
+ import * as i3$1 from '@angular/material/checkbox';
60
+ import { MatCheckboxModule } from '@angular/material/checkbox';
61
+ import * as i2$6 from '@angular/cdk/layout';
62
+ import { Breakpoints, LayoutModule } from '@angular/cdk/layout';
63
+ import * as i2$7 from '@angular/material/datepicker';
64
+ import { MatDatepickerModule } from '@angular/material/datepicker';
65
+ import * as i6$1 from '@angular/material/core';
66
+ import { MAT_DATE_LOCALE, DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
67
+ import { DateFnsAdapter, MAT_DATE_FNS_FORMATS } from '@angular/material-date-fns-adapter';
68
+ import { enGB } from 'date-fns/locale';
69
+ import { isEqual as isEqual$2, endOfDay, subDays, startOfDay, format, isValid, formatDistanceToNow } from 'date-fns';
70
+ import * as i3$2 from '@ng-matero/extensions/select';
71
+ import { MtxSelectModule } from '@ng-matero/extensions/select';
72
+ import * as i5 from '@angular/material/autocomplete';
73
+ import { MatAutocompleteModule } from '@angular/material/autocomplete';
74
+ import * as i1$7 from '@angular/common/http';
75
+ import * as i1$8 from '@angular/material/snack-bar';
76
+ import { MatSnackBarModule } from '@angular/material/snack-bar';
77
+ import negate from 'lodash-es/negate';
78
+
79
+ class ActionsComponent {
80
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
81
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: ActionsComponent, isStandalone: false, selector: "v-actions", ngImport: i0, template: "<div class=\"v-actions\">\n <ng-content></ng-content>\n</div>\n", styles: ["::ng-deep .v-actions{box-sizing:border-box;display:flex;flex-wrap:wrap;gap:16px}::ng-deep .v-actions>*:first-child:not(:last-child){margin-right:auto}::ng-deep .v-actions>*:first-child:last-child{margin-left:auto}@media screen and (max-width: 600px){::ng-deep .v-actions>*{margin-left:auto!important;margin-right:auto!important}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
82
+ }
83
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ActionsComponent, decorators: [{
84
+ type: Component,
85
+ args: [{ selector: 'v-actions', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"v-actions\">\n <ng-content></ng-content>\n</div>\n", styles: ["::ng-deep .v-actions{box-sizing:border-box;display:flex;flex-wrap:wrap;gap:16px}::ng-deep .v-actions>*:first-child:not(:last-child){margin-right:auto}::ng-deep .v-actions>*:first-child:last-child{margin-left:auto}@media screen and (max-width: 600px){::ng-deep .v-actions>*{margin-left:auto!important;margin-right:auto!important}}\n"] }]
86
+ }] });
87
+
88
+ class ActionsModule {
89
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ActionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
90
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: ActionsModule, declarations: [ActionsComponent], exports: [ActionsComponent] }); }
91
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ActionsModule }); }
92
+ }
93
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ActionsModule, decorators: [{
94
+ type: NgModule,
95
+ args: [{
96
+ imports: [],
97
+ declarations: [ActionsComponent],
98
+ exports: [ActionsComponent],
99
+ }]
100
+ }] });
101
+
102
+ class ProgressComponent {
103
+ get mode() {
104
+ return typeof this.progress === 'number' && this.progress <= 1 && this.progress > 0
105
+ ? 'determinate'
106
+ : !!this.progress || this.progress === ''
107
+ ? 'indeterminate'
108
+ : undefined;
109
+ }
110
+ get value() {
111
+ return this.mode === 'determinate'
112
+ ? Math.max(Math.min((1 - this.progress) * 100, 100), 0)
113
+ : undefined;
114
+ }
115
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
116
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: ProgressComponent, isStandalone: false, selector: "v-progress", inputs: { progress: "progress" }, ngImport: i0, template: "@if (!!mode) {\n <mat-progress-bar [mode]=\"mode\" [value]=\"value\"></mat-progress-bar>\n}\n", dependencies: [{ kind: "component", type: i1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }] }); }
117
+ }
118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ProgressComponent, decorators: [{
119
+ type: Component,
120
+ args: [{ selector: 'v-progress', standalone: false, template: "@if (!!mode) {\n <mat-progress-bar [mode]=\"mode\" [value]=\"value\"></mat-progress-bar>\n}\n" }]
121
+ }], propDecorators: { progress: [{
122
+ type: Input
123
+ }] } });
124
+
125
+ class ProgressModule {
126
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ProgressModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
127
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: ProgressModule, declarations: [ProgressComponent], imports: [CommonModule, MatProgressBarModule], exports: [ProgressComponent] }); }
128
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ProgressModule, imports: [CommonModule, MatProgressBarModule] }); }
129
+ }
130
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ProgressModule, decorators: [{
131
+ type: NgModule,
132
+ args: [{
133
+ declarations: [ProgressComponent],
134
+ imports: [CommonModule, MatProgressBarModule],
135
+ exports: [ProgressComponent],
136
+ }]
137
+ }] });
138
+
139
+ class DialogActionsComponent {
140
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DialogActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
141
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: DialogActionsComponent, isStandalone: false, selector: "v-dialog-actions", ngImport: i0, template: "<v-actions><ng-content></ng-content></v-actions>\n", dependencies: [{ kind: "component", type: ActionsComponent, selector: "v-actions" }] }); }
142
+ }
143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DialogActionsComponent, decorators: [{
144
+ type: Component,
145
+ args: [{ selector: 'v-dialog-actions', standalone: false, template: "<v-actions><ng-content></ng-content></v-actions>\n" }]
146
+ }] });
147
+
148
+ var DialogResponseStatus;
149
+ (function (DialogResponseStatus) {
150
+ DialogResponseStatus["Success"] = "success";
151
+ DialogResponseStatus["Error"] = "error";
152
+ DialogResponseStatus["Cancelled"] = "canceled";
153
+ })(DialogResponseStatus || (DialogResponseStatus = {}));
154
+
155
+ class DialogComponent {
156
+ constructor() {
157
+ this.hostClass = true;
158
+ this.disabled = false;
159
+ this.hasDivider = true;
160
+ this.noContent = false;
161
+ this.noActions = false;
162
+ this.noCloseButton = false;
163
+ this.fullSize = false;
164
+ // eslint-disable-next-line @angular-eslint/no-output-native
165
+ this.cancel = new EventEmitter();
166
+ this.cancelData = {
167
+ status: DialogResponseStatus.Cancelled,
168
+ };
169
+ }
170
+ cancelDialog() {
171
+ this.cancel.emit();
172
+ }
173
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
174
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: DialogComponent, isStandalone: false, selector: "v-dialog", inputs: { title: "title", disabled: ["disabled", "disabled", booleanAttribute], progress: "progress", hasDivider: ["hasDivider", "hasDivider", booleanAttribute], noContent: ["noContent", "noContent", booleanAttribute], noActions: ["noActions", "noActions", booleanAttribute], noCloseButton: ["noCloseButton", "noCloseButton", booleanAttribute], fullSize: ["fullSize", "fullSize", booleanAttribute] }, outputs: { cancel: "cancel" }, host: { properties: { "class.v-dialog": "this.hostClass" } }, ngImport: i0, template: "<div [ngClass]=\"{ 'full-size': fullSize }\" class=\"dialog\">\n <div class=\"dialog-title\">\n <div>\n <h2 class=\"title\">{{ title }}</h2>\n </div>\n @if (!noCloseButton) {\n <mat-icon\n [matDialogClose]=\"cancelData\"\n class=\"dialog-title-close\"\n inline\n (click)=\"cancelDialog()\"\n >clear</mat-icon\n >\n }\n </div>\n\n @if (!noContent) {\n @if (hasDivider) {\n <mat-divider></mat-divider>\n }\n <div class=\"dialog-content\">\n <ng-content></ng-content>\n </div>\n }\n @if (!noActions) {\n @if (hasDivider) {\n <mat-divider></mat-divider>\n }\n <div class=\"dialog-actions\">\n <ng-content select=\"v-dialog-actions\"></ng-content>\n </div>\n }\n\n <v-progress [progress]=\"progress\"></v-progress>\n</div>\n", styles: [":host{display:flex;flex-direction:column;flex-grow:1;height:100%}.dialog{flex-direction:column;box-sizing:border-box;display:flex;flex:1 1 100%;max-height:calc(90vh - 48px)!important}@media screen and (max-width: 959px){.dialog{max-height:calc(100vh - 48px)!important}}.dialog.full-size{min-height:calc(90vh - 48px)!important}@media screen and (max-width: 959px){.dialog.full-size{min-height:calc(100vh - 48px)!important}}.dialog-title{flex-direction:row;box-sizing:border-box;display:flex;place-content:center space-between;align-items:center;padding:24px}.dialog-title h1,.dialog-title h2,.dialog-title h3,.dialog-title h4,.dialog-title h5,.dialog-title h6{margin:0}.dialog-title-close.dialog-title-close{cursor:pointer;font-size:24px}.dialog-title-close.dialog-title-close:hover{opacity:.5}.dialog-content{flex:1 1 100%;box-sizing:border-box;padding:24px;overflow:auto;display:grid}.dialog-actions{padding:24px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i1$2.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: ProgressComponent, selector: "v-progress", inputs: ["progress"] }] }); }
175
+ }
176
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DialogComponent, decorators: [{
177
+ type: Component,
178
+ args: [{ selector: 'v-dialog', standalone: false, template: "<div [ngClass]=\"{ 'full-size': fullSize }\" class=\"dialog\">\n <div class=\"dialog-title\">\n <div>\n <h2 class=\"title\">{{ title }}</h2>\n </div>\n @if (!noCloseButton) {\n <mat-icon\n [matDialogClose]=\"cancelData\"\n class=\"dialog-title-close\"\n inline\n (click)=\"cancelDialog()\"\n >clear</mat-icon\n >\n }\n </div>\n\n @if (!noContent) {\n @if (hasDivider) {\n <mat-divider></mat-divider>\n }\n <div class=\"dialog-content\">\n <ng-content></ng-content>\n </div>\n }\n @if (!noActions) {\n @if (hasDivider) {\n <mat-divider></mat-divider>\n }\n <div class=\"dialog-actions\">\n <ng-content select=\"v-dialog-actions\"></ng-content>\n </div>\n }\n\n <v-progress [progress]=\"progress\"></v-progress>\n</div>\n", styles: [":host{display:flex;flex-direction:column;flex-grow:1;height:100%}.dialog{flex-direction:column;box-sizing:border-box;display:flex;flex:1 1 100%;max-height:calc(90vh - 48px)!important}@media screen and (max-width: 959px){.dialog{max-height:calc(100vh - 48px)!important}}.dialog.full-size{min-height:calc(90vh - 48px)!important}@media screen and (max-width: 959px){.dialog.full-size{min-height:calc(100vh - 48px)!important}}.dialog-title{flex-direction:row;box-sizing:border-box;display:flex;place-content:center space-between;align-items:center;padding:24px}.dialog-title h1,.dialog-title h2,.dialog-title h3,.dialog-title h4,.dialog-title h5,.dialog-title h6{margin:0}.dialog-title-close.dialog-title-close{cursor:pointer;font-size:24px}.dialog-title-close.dialog-title-close:hover{opacity:.5}.dialog-content{flex:1 1 100%;box-sizing:border-box;padding:24px;overflow:auto;display:grid}.dialog-actions{padding:24px}\n"] }]
179
+ }], propDecorators: { hostClass: [{
180
+ type: HostBinding,
181
+ args: ['class.v-dialog']
182
+ }], title: [{
183
+ type: Input
184
+ }], disabled: [{
185
+ type: Input,
186
+ args: [{ transform: booleanAttribute }]
187
+ }], progress: [{
188
+ type: Input
189
+ }], hasDivider: [{
190
+ type: Input,
191
+ args: [{ transform: booleanAttribute }]
192
+ }], noContent: [{
193
+ type: Input,
194
+ args: [{ transform: booleanAttribute }]
195
+ }], noActions: [{
196
+ type: Input,
197
+ args: [{ transform: booleanAttribute }]
198
+ }], noCloseButton: [{
199
+ type: Input,
200
+ args: [{ transform: booleanAttribute }]
201
+ }], fullSize: [{
202
+ type: Input,
203
+ args: [{ transform: booleanAttribute }]
204
+ }], cancel: [{
205
+ type: Output
206
+ }] } });
207
+
208
+ const DIALOG_CONFIG = new InjectionToken('dialogConfig');
209
+ const BASE_CONFIG = {
210
+ maxHeight: '100vh',
211
+ disableClose: true,
212
+ autoFocus: false,
213
+ minWidth: '0',
214
+ maxWidth: 'calc(100vw - 16px)',
215
+ width: '552px',
216
+ };
217
+ const DEFAULT_DIALOG_CONFIG = {
218
+ small: {
219
+ ...BASE_CONFIG,
220
+ width: '360px',
221
+ },
222
+ medium: BASE_CONFIG,
223
+ large: {
224
+ ...BASE_CONFIG,
225
+ width: '1000px',
226
+ },
227
+ };
228
+ const DEFAULT_DIALOG_CONFIG_FULL_HEIGHT = 'calc(90vh - 48px)';
229
+
230
+ class DialogService {
231
+ constructor(dialog, dialogConfig) {
232
+ this.dialog = dialog;
233
+ this.dialogConfig = dialogConfig;
234
+ if (!dialogConfig) {
235
+ this.dialogConfig = DEFAULT_DIALOG_CONFIG;
236
+ }
237
+ }
238
+ open(dialogComponent,
239
+ /**
240
+ * Workaround when both conditions for the 'data' argument must be true:
241
+ * - typing did not require passing when it is optional (for example: {param: number} | void)
242
+ * - typing required to pass when it is required (for example: {param: number})
243
+ */
244
+ ...[data, configOrConfigName]) {
245
+ let config;
246
+ if (!configOrConfigName) {
247
+ config = {};
248
+ }
249
+ else if (typeof configOrConfigName === 'string') {
250
+ config = this.dialogConfig[configOrConfigName];
251
+ }
252
+ else {
253
+ config = configOrConfigName;
254
+ }
255
+ return this.dialog.open(dialogComponent, {
256
+ data,
257
+ ...dialogComponent.defaultDialogConfig,
258
+ ...config,
259
+ });
260
+ }
261
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DialogService, deps: [{ token: i1$2.MatDialog }, { token: DIALOG_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
262
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DialogService, providedIn: 'root' }); }
263
+ }
264
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DialogService, decorators: [{
265
+ type: Injectable,
266
+ args: [{
267
+ providedIn: 'root',
268
+ }]
269
+ }], ctorParameters: () => [{ type: i1$2.MatDialog }, { type: undefined, decorators: [{
270
+ type: Optional
271
+ }, {
272
+ type: Inject,
273
+ args: [DIALOG_CONFIG]
274
+ }] }] });
275
+
276
+ class DialogModule {
277
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
278
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: DialogModule, declarations: [DialogComponent, DialogActionsComponent], imports: [CommonModule,
279
+ MatDividerModule,
280
+ MatButtonModule,
281
+ ActionsModule,
282
+ MatIconModule,
283
+ MatProgressBarModule,
284
+ MatDialogModule,
285
+ ProgressModule], exports: [DialogComponent, DialogActionsComponent] }); }
286
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DialogModule, providers: [DialogService], imports: [CommonModule,
287
+ MatDividerModule,
288
+ MatButtonModule,
289
+ ActionsModule,
290
+ MatIconModule,
291
+ MatProgressBarModule,
292
+ MatDialogModule,
293
+ ProgressModule] }); }
294
+ }
295
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DialogModule, decorators: [{
296
+ type: NgModule,
297
+ args: [{
298
+ imports: [
299
+ CommonModule,
300
+ MatDividerModule,
301
+ MatButtonModule,
302
+ ActionsModule,
303
+ MatIconModule,
304
+ MatProgressBarModule,
305
+ MatDialogModule,
306
+ ProgressModule,
307
+ ],
308
+ providers: [DialogService],
309
+ declarations: [DialogComponent, DialogActionsComponent],
310
+ exports: [DialogComponent, DialogActionsComponent],
311
+ }]
312
+ }] });
313
+
314
+ class DialogSuperclass {
315
+ constructor() {
316
+ this.dialogData = inject(MAT_DIALOG_DATA);
317
+ this.dialogRef = inject(MatDialogRef);
318
+ }
319
+ static { this.defaultDialogConfig = DEFAULT_DIALOG_CONFIG.medium; }
320
+ closeWithCancellation(data) {
321
+ this.dialogRef.close({
322
+ status: DialogResponseStatus.Cancelled,
323
+ data,
324
+ });
325
+ }
326
+ closeWithSuccess(data) {
327
+ this.dialogRef.close({
328
+ status: DialogResponseStatus.Success,
329
+ data,
330
+ });
331
+ }
332
+ closeWithError(data) {
333
+ this.dialogRef.close({
334
+ status: DialogResponseStatus.Error,
335
+ data,
336
+ });
337
+ }
338
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DialogSuperclass, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
339
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: DialogSuperclass, isStandalone: true, ngImport: i0 }); }
340
+ }
341
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DialogSuperclass, decorators: [{
342
+ type: Directive
343
+ }] });
344
+
345
+ class ContentLoadingComponent {
346
+ constructor() {
347
+ this.width = input(random(35, 80) + '%');
348
+ this.textSize = input(0, { transform: numberAttribute });
349
+ this.hiddenText = input();
350
+ }
351
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ContentLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
352
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.2", type: ContentLoadingComponent, isStandalone: true, selector: "v-content-loading", inputs: { width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, textSize: { classPropertyName: "textSize", publicName: "textSize", isSignal: true, isRequired: false, transformFunction: null }, hiddenText: { classPropertyName: "hiddenText", publicName: "hiddenText", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span\n [ngClass]=\"{ 'content-loading__text': !!hiddenText() }\"\n [style.width]=\"hiddenText() || textSize() ? undefined : width()\"\n class=\"content-loading\"\n >{{ hiddenText() || '&nbsp;'.repeat(textSize() || 1) }}</span\n>\n", styles: ["@keyframes content-loading-animation{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.content-loading{color:transparent;display:inline-block;line-height:100%;background-color:#00000014;animation:content-loading-animation 1.5s ease-in-out infinite}.content-loading__text{color:inherit;background-color:transparent}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
353
+ }
354
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ContentLoadingComponent, decorators: [{
355
+ type: Component,
356
+ args: [{ selector: 'v-content-loading', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule], template: "<span\n [ngClass]=\"{ 'content-loading__text': !!hiddenText() }\"\n [style.width]=\"hiddenText() || textSize() ? undefined : width()\"\n class=\"content-loading\"\n >{{ hiddenText() || '&nbsp;'.repeat(textSize() || 1) }}</span\n>\n", styles: ["@keyframes content-loading-animation{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.content-loading{color:transparent;display:inline-block;line-height:100%;background-color:#00000014;animation:content-loading-animation 1.5s ease-in-out infinite}.content-loading__text{color:inherit;background-color:transparent}\n"] }]
357
+ }] });
358
+
359
+ function renderList(list, renderItem, isMore) {
360
+ return list.length ? (isMore ? '…' : list.map(renderItem).join(', ')) : '';
361
+ }
362
+ function isObject(v) {
363
+ return (typeof v === 'object' &&
364
+ !Array.isArray(v) &&
365
+ !(v instanceof Map) &&
366
+ !(v instanceof Set) &&
367
+ v !== null);
368
+ }
369
+ function inlineJson(value, maxReadableLever = 1, readableKeys = false, level = 0) {
370
+ const isRoot = (level = 0);
371
+ if (isPrimitive(value)) {
372
+ return String(value);
373
+ }
374
+ if (Array.isArray(value) || value instanceof Map || value instanceof Set) {
375
+ const content = renderList(Array.from(value), (v) => inlineJson(v, maxReadableLever, readableKeys, level + 1), level > maxReadableLever);
376
+ if (value instanceof Set) {
377
+ return `Set(${content})`;
378
+ }
379
+ if (value instanceof Map) {
380
+ return `Map(${content})`;
381
+ }
382
+ return isRoot && content ? content : `[${content}]`;
383
+ }
384
+ const entries = Array.from(Object.entries(value));
385
+ if (!entries.length) {
386
+ return '{}';
387
+ }
388
+ const content = renderList(entries, ([k, v]) => (readableKeys ? startCase(k) : k) +
389
+ (isObject(v) && Object.keys(v).length <= 1 ? '/' : ': ') +
390
+ inlineJson(v, maxReadableLever, readableKeys, level + 1), level > maxReadableLever);
391
+ if (isRoot || entries.length === 1) {
392
+ return content;
393
+ }
394
+ return `{${content}}`;
395
+ }
396
+
397
+ const SEPARATORS = ',;';
398
+ function splitBySeparators(ids, separators = SEPARATORS) {
399
+ if (!ids) {
400
+ return [];
401
+ }
402
+ return ids
403
+ .split(new RegExp(`[${separators}\\s]`))
404
+ .map((id) => id.trim())
405
+ .filter(Boolean);
406
+ }
407
+
408
+ function progressTo(subject$) {
409
+ const getSub = () => (isObservable(subject$) ? subject$ : subject$());
410
+ return (src$) => defer(() => {
411
+ getSub().next(getSub().getValue() + 1);
412
+ return src$.pipe(finalize(() => getSub().next(getSub().getValue() - 1)));
413
+ });
414
+ }
415
+
416
+ function getObservable(obsOrFn) {
417
+ return typeof obsOrFn === 'function' ? defer(obsOrFn) : obsOrFn;
418
+ }
419
+
420
+ function inProgressFrom(progress, main, init = true) {
421
+ const progresses = (Array.isArray(progress) ? progress : [progress]).map((p) => getObservable(p));
422
+ return merge(combineLatest(progresses), main ? getObservable(main).pipe(mergeMap(() => EMPTY)) : EMPTY).pipe(map((ps) => ps.some((p) => !!p)),
423
+ // make async to bypass angular detect changes
424
+ delay(0), startWith(init), distinctUntilChanged(), shareReplay({ refCount: true, bufferSize: 1 }));
425
+ }
426
+
427
+ function passError(handler, value) {
428
+ return (source) => source.pipe(catchError((err) => {
429
+ handler(err);
430
+ if (arguments.length >= 2) {
431
+ return of(value);
432
+ }
433
+ return EMPTY;
434
+ }));
435
+ }
436
+
437
+ function getProgressByCount(count, completedCount = Number.MIN_VALUE) {
438
+ return 1 - completedCount / count;
439
+ }
440
+
441
+ function forkJoinToResult(sources, progress$, dataItems = [], concurrency = 4) {
442
+ let completed = 0;
443
+ if (progress$) {
444
+ progress$.next(getProgressByCount(sources.length));
445
+ }
446
+ return merge(...sources.map((source, index) => source.pipe(map((result) => ({
447
+ result,
448
+ hasError: false,
449
+ index,
450
+ data: dataItems[index],
451
+ })), catchError((error) => {
452
+ return of({
453
+ error,
454
+ hasError: true,
455
+ index,
456
+ data: dataItems[index],
457
+ });
458
+ }), finalize(() => {
459
+ completed += 1;
460
+ if (progress$) {
461
+ progress$.next(getProgressByCount(sources.length, completed));
462
+ }
463
+ }))), concurrency).pipe(scan((acc, value) => {
464
+ acc.push(value);
465
+ return acc;
466
+ }, []), takeLast(1), map((r) => r.sort((a, b) => a.index - b.index)));
467
+ }
468
+ function isResultsHasError(res) {
469
+ return res.some((r) => r.hasError);
470
+ }
471
+ function splitResultsErrors(res) {
472
+ return res.reduce((acc, r) => {
473
+ acc[r.hasError ? 1 : 0].push(r);
474
+ return acc;
475
+ }, [[], []]);
476
+ }
477
+
478
+ function isAsync(value) {
479
+ return isObservable(value) || isPromise(value);
480
+ }
481
+
482
+ function getPossiblyAsyncObservable(possiblyAsync) {
483
+ return isAsync(possiblyAsync) ? from(possiblyAsync) : of(possiblyAsync);
484
+ }
485
+
486
+ class AsyncTransform {
487
+ constructor() {
488
+ this.params$ = defer(() => this.args$).pipe(switchMap((args) => combineLatest([
489
+ getPossiblyAsyncObservable(args[0]),
490
+ of(args.slice(1)),
491
+ ])), map(([value, params]) => [value, ...params]));
492
+ this.cdr = inject(ChangeDetectorRef);
493
+ this.args$ = new ReplaySubject(1);
494
+ this.asyncPipe = new AsyncPipe(this.cdr);
495
+ }
496
+ ngOnDestroy() {
497
+ this.asyncPipe.ngOnDestroy();
498
+ }
499
+ asyncTransform(args) {
500
+ this.args$.next(args);
501
+ return this.asyncPipe.transform(this.result$);
502
+ }
503
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AsyncTransform, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
504
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AsyncTransform }); }
505
+ }
506
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AsyncTransform, decorators: [{
507
+ type: Injectable
508
+ }], ctorParameters: () => [] });
509
+
510
+ function switchCombineWith(project) {
511
+ return (src$) => src$.pipe(switchMap((value, index) => {
512
+ const res = project(value, index);
513
+ return combineLatest([
514
+ of(value),
515
+ ...(Array.isArray(res) ? res : [res]).map((r) => getPossiblyAsyncObservable(r)),
516
+ ]);
517
+ }));
518
+ }
519
+
520
+ function debounceTimeWithFirst(duration) {
521
+ return (source) => {
522
+ let isFirst = true;
523
+ return source.pipe(debounce(() => {
524
+ if (isFirst) {
525
+ isFirst = false;
526
+ return interval(0);
527
+ }
528
+ return interval(duration);
529
+ }));
530
+ };
531
+ }
532
+
533
+ function handleError(handler, result = EMPTY) {
534
+ return (source) => source.pipe(catchError$1((err, _caught) => {
535
+ handler(err);
536
+ return getPossiblyAsyncObservable(result);
537
+ }));
538
+ }
539
+
540
+ function asyncStartWith(value, timerMs = 0) {
541
+ return (src$) => concat(...(value ? [of(value)] : []), timer(timerMs).pipe(switchMap(() => src$)));
542
+ }
543
+
544
+ function hasControls(control) {
545
+ return 'controls' in control;
546
+ }
547
+
548
+ function getValue$1(control) {
549
+ if (!hasControls(control)) {
550
+ return control.value;
551
+ }
552
+ if (Array.isArray(control.controls)) {
553
+ const result = [];
554
+ for (const v of control.controls) {
555
+ result.push(getValue$1(v));
556
+ }
557
+ return result;
558
+ }
559
+ const result = {};
560
+ for (const [k, v] of Object.entries(control.controls)) {
561
+ result[k] = getValue$1(v);
562
+ }
563
+ return result;
564
+ }
565
+
566
+ function getValueChanges(form) {
567
+ return form.valueChanges.pipe(startWith(form.value), map(() => getValue$1(form)));
568
+ }
569
+
570
+ /**
571
+ * FormGroup/FormArray don't return internal control errors,
572
+ * so you need to get internal errors manually
573
+ */
574
+ function getErrorsTree(control) {
575
+ if (control.valid) {
576
+ return null;
577
+ }
578
+ const errors = Object.assign({}, control.errors);
579
+ if (hasControls(control)) {
580
+ if (Array.isArray(control.controls)) {
581
+ errors['formArrayErrors'] = control.controls
582
+ .map((c) => getErrorsTree(c))
583
+ .filter(Boolean);
584
+ }
585
+ else {
586
+ errors['formGroupErrors'] = Object.fromEntries(Array.from(Object.entries(control.controls))
587
+ .map(([k, c]) => [k, getErrorsTree(c)])
588
+ .filter(([, v]) => !!v));
589
+ }
590
+ }
591
+ return errors;
592
+ }
593
+
594
+ class AbstractControlSuperclass extends WrappedControlSuperclass {
595
+ constructor() {
596
+ super(...arguments);
597
+ this._cdr = inject(ChangeDetectorRef);
598
+ this._destroyRef = inject(DestroyRef);
599
+ this.onValidatorChange = () => undefined;
600
+ }
601
+ ngOnInit() {
602
+ super.ngOnInit();
603
+ concat(timer(0), timer(100))
604
+ .pipe(filter(() => this.control.invalid), take(1), takeUntilDestroyed(this._destroyRef))
605
+ .subscribe(() => {
606
+ this.onValidatorChange();
607
+ this._cdr.markForCheck();
608
+ });
609
+ }
610
+ validate(_control) {
611
+ return getErrorsTree(this.control); //|| getErrorsTree(_control);
612
+ }
613
+ registerOnValidatorChange(fn) {
614
+ this.onValidatorChange = fn;
615
+ }
616
+ setUpInnerToOuterErrors$() {
617
+ return EMPTY;
618
+ }
619
+ setUpOuterToInnerErrors$() {
620
+ return EMPTY;
621
+ }
622
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AbstractControlSuperclass, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
623
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: AbstractControlSuperclass, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
624
+ }
625
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AbstractControlSuperclass, decorators: [{
626
+ type: Directive
627
+ }] });
628
+
629
+ class FormGroupSuperclass extends AbstractControlSuperclass {
630
+ setDisabledState(_isDisabled) {
631
+ return;
632
+ }
633
+ ngOnInit() {
634
+ this.emptyValue = getValue$1(this.control);
635
+ super.ngOnInit();
636
+ }
637
+ outerToInnerValue(outer) {
638
+ if (hasControls(this.control)) {
639
+ if (!outer) {
640
+ return this.emptyValue;
641
+ }
642
+ if (Object.keys(outer).length < Object.keys(this.control.controls).length) {
643
+ return Object.assign({}, this.emptyValue, outer);
644
+ }
645
+ }
646
+ return outer;
647
+ }
648
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FormGroupSuperclass, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
649
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: FormGroupSuperclass, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
650
+ }
651
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FormGroupSuperclass, decorators: [{
652
+ type: Directive
653
+ }] });
654
+
655
+ const provideValidators = (component) => ({
656
+ provide: NG_VALIDATORS,
657
+ useExisting: forwardRef(component),
658
+ multi: true,
659
+ });
660
+
661
+ const provideValueAccessor = (component) => ({
662
+ provide: NG_VALUE_ACCESSOR,
663
+ useExisting: forwardRef(component),
664
+ multi: true,
665
+ });
666
+
667
+ const createControlProviders = (component) => [
668
+ provideValueAccessor(component),
669
+ provideValidators(component),
670
+ ];
671
+
672
+ class FormControlSuperclass extends AbstractControlSuperclass {
673
+ constructor() {
674
+ super(...arguments);
675
+ this.control = new FormControl();
676
+ }
677
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FormControlSuperclass, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
678
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: FormControlSuperclass, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
679
+ }
680
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FormControlSuperclass, decorators: [{
681
+ type: Directive
682
+ }] });
683
+
684
+ class FormComponentSuperclass extends FormComponentSuperclass$1 {
685
+ constructor() {
686
+ super(...arguments);
687
+ this._cdr = inject(ChangeDetectorRef);
688
+ this._destroyRef = inject(DestroyRef);
689
+ this.onValidatorChange = () => undefined;
690
+ }
691
+ validate(_control) {
692
+ return null;
693
+ }
694
+ ngOnInit() {
695
+ concat(timer(0), timer(100))
696
+ .pipe(takeUntilDestroyed(this._destroyRef))
697
+ .subscribe(() => {
698
+ this.onValidatorChange();
699
+ this._cdr.markForCheck();
700
+ });
701
+ }
702
+ registerOnValidatorChange(fn) {
703
+ this.onValidatorChange = fn;
704
+ }
705
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FormComponentSuperclass, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
706
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: FormComponentSuperclass, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
707
+ }
708
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FormComponentSuperclass, decorators: [{
709
+ type: Directive
710
+ }] });
711
+
712
+ function isEmptyPrimitive(value) {
713
+ return isNil(value) || value === '';
714
+ }
715
+
716
+ function getValidValueChanges(control, predicate = isEmptyPrimitive) {
717
+ return getValueChanges(control).pipe(filter(() => control.valid), map((value) => omitBy(value, predicate)));
718
+ }
719
+
720
+ function setDisabled(control, disabled = true, options = {}) {
721
+ if (!control || control.disabled === disabled) {
722
+ return;
723
+ }
724
+ if (disabled) {
725
+ control.disable(options);
726
+ }
727
+ else {
728
+ control.enable(options);
729
+ }
730
+ }
731
+
732
+ function createControls(values) {
733
+ return Object.fromEntries(Object.entries(values).map(([k, v]) => [k, new FormControl(v, { nonNullable: true })]));
734
+ }
735
+
736
+ function getTimeZoneOffset(date) {
737
+ return date.getTimezoneOffset() * 60_000;
738
+ }
739
+ function getNoTimeZoneIsoString(date) {
740
+ return date ? new Date(date.valueOf() - getTimeZoneOffset(date)).toISOString() : '';
741
+ }
742
+ function createDateFromNoTimeZoneString(dateStr) {
743
+ const date = new Date(dateStr);
744
+ return new Date(date.valueOf() + getTimeZoneOffset(date));
745
+ }
746
+
747
+ const getCurrencyExponent = (currencyCode) => currencies[currencyCode]?.exponent;
748
+
749
+ const toMajorByExponent = (amount, exponent) => round(amount / 10 ** exponent, exponent);
750
+ const toMajor = (amount, currencyCode) => toMajorByExponent(amount, getCurrencyExponent(currencyCode));
751
+
752
+ const toMinorByExponent = (amount, exponent) => Math.round(amount * 10 ** exponent);
753
+ const toMinor = (amount, currencyCode) => toMinorByExponent(amount, getCurrencyExponent(currencyCode));
754
+
755
+ function formatCurrency(amount, currencyCode = 'USD', format = 'long', locale = 'en-GB', exponent, isMajor = false) {
756
+ if (typeof exponent !== 'number') {
757
+ exponent = getCurrencyExponent(currencyCode) || 0;
758
+ }
759
+ return formatCurrency$1(isMajor ? amount : toMajorByExponent(amount, exponent), locale, getCurrencySymbol(currencyCode, 'narrow', locale), currencyCode, format === 'short' ? `1.0-${exponent}` : `1.${exponent}-${exponent}`);
760
+ }
761
+
762
+ function select(obj, selectFn, defaultValue, restParams = []) {
763
+ if (typeof selectFn === 'string') {
764
+ return get(obj, selectFn, defaultValue);
765
+ }
766
+ return selectFn(obj, ...restParams);
767
+ }
768
+ // export function selectAsObservable<TObject extends object, TResult, TParams extends Array<unknown> = []>(
769
+ // obj: TObject,
770
+ // selectFn: SelectFn<TObject, TResult, TParams>,
771
+ // defaultValue?: TResult,
772
+ // restParams: TParams[] = [],
773
+ // ): TResult | Observable<TResult> {
774
+ // const res = select(obj, selectFn, defaultValue, restParams);
775
+ // return isObservable(res) ? res : of(res);
776
+ // }
777
+
778
+ function countProps(...objects) {
779
+ return objects.reduce((acc, obj) => acc + (obj ? Object.keys(obj).length : 0), 0);
780
+ }
781
+
782
+ function isEmpty(value) {
783
+ return isObject$1(value)
784
+ ? value.constructor === Object ||
785
+ Array.isArray(value) ||
786
+ value instanceof Set ||
787
+ value instanceof Map
788
+ ? lodashIsEmpty(value)
789
+ : false
790
+ : isEmptyPrimitive(value);
791
+ }
792
+
793
+ function countChanged(a, b,
794
+ // is equal boolean or count number
795
+ predicates = {}) {
796
+ const aKeys = Object.keys(a);
797
+ const bKeys = Object.keys(b);
798
+ const diffKeys = difference(aKeys, bKeys);
799
+ const sameKeys = difference(aKeys, diffKeys);
800
+ return sameKeys
801
+ .map((k) => {
802
+ if (k in predicates) {
803
+ const res = predicates[k]?.(a[k], b[k]);
804
+ return typeof res === 'boolean' ? +!res : Number(res);
805
+ }
806
+ return (isEmpty(a[k]) && isEmpty(b[k])) || isEqual(a[k], b[k]) ? 0 : 1;
807
+ })
808
+ .reduce((sum, v) => sum + v, diffKeys.length);
809
+ }
810
+
811
+ function getEnumEntries(srcEnum) {
812
+ if (!srcEnum) {
813
+ return [];
814
+ }
815
+ const entries = Object.entries(srcEnum);
816
+ if (!entries.length) {
817
+ return [];
818
+ }
819
+ const isValueNumberEnum = entries.some(([, v]) => typeof v === 'number');
820
+ if (isValueNumberEnum) {
821
+ return entries.filter(([, v]) => typeof v === 'number');
822
+ }
823
+ return entries;
824
+ }
825
+ function getEnumKeyValues(srcEnum) {
826
+ return getEnumEntries(srcEnum).map(([key, value]) => ({ key, value }));
827
+ }
828
+ function getEnumKeys(srcEnum) {
829
+ return getEnumEntries(srcEnum).map(([k]) => k);
830
+ }
831
+ function getEnumValues(srcEnum) {
832
+ return getEnumEntries(srcEnum).map(([, v]) => v);
833
+ }
834
+ function getEnumKey(srcEnum, value) {
835
+ return getEnumKeyValues(srcEnum).find((e) => String(e.value) === String(value))?.key;
836
+ }
837
+ function enumHasValue(srcEnum, value) {
838
+ return getEnumValues(srcEnum).includes(value);
839
+ }
840
+
841
+ function clean(obj, allowRootRemoval = false, isNotDeep = false, filterPredicate = (v) => !isEmpty(v)) {
842
+ if (allowRootRemoval && !filterPredicate(obj)) {
843
+ return null;
844
+ }
845
+ const cleanChild = (v) => isNotDeep ? v : clean(v, true, isNotDeep, filterPredicate);
846
+ if (Array.isArray(obj)) {
847
+ return obj
848
+ .map((v) => cleanChild(v))
849
+ .filter((v, idx) => filterPredicate(v, idx));
850
+ }
851
+ if (obj?.constructor === Object) {
852
+ return Object.fromEntries(Object.entries(obj)
853
+ .map(([k, v]) => [k, cleanChild(v)])
854
+ .filter(([k, v]) => filterPredicate(v, k)));
855
+ }
856
+ return obj;
857
+ }
858
+ function cleanPrimitiveProps(obj, allowRootRemoval = false, isNotDeep = false) {
859
+ return clean(obj, allowRootRemoval, isNotDeep, (v) => !isEmptyPrimitive(v));
860
+ }
861
+
862
+ function isNumber(v) {
863
+ return !!v && (typeof v === 'number' || /^-?\d+.*$/.test(String(v).trim()));
864
+ }
865
+ function toNumber(v) {
866
+ return typeof v === 'string'
867
+ ? parseFloat(v.replace(',', '.').replace(/[^0-9.-]+/g, ''))
868
+ : Number(v);
869
+ }
870
+ /**
871
+ * Use with sorting (arr.sort(fn))
872
+ */
873
+ function compareDifferentTypes(a, b) {
874
+ const aIsNum = isNumber(a);
875
+ const bIsNum = isNumber(b);
876
+ if (aIsNum || bIsNum) {
877
+ if (aIsNum && bIsNum) {
878
+ return toNumber(a) - toNumber(b);
879
+ }
880
+ else if (aIsNum) {
881
+ return -1;
882
+ }
883
+ else {
884
+ return 1;
885
+ }
886
+ }
887
+ return String(a).localeCompare(String(b));
888
+ }
889
+
890
+ function getImportValue(imp, prop = 'default') {
891
+ return from(imp).pipe(map((module) => {
892
+ if (!prop) {
893
+ return module;
894
+ }
895
+ return get(module, prop, null);
896
+ }));
897
+ }
898
+
899
+ const FILE_TYPES = {
900
+ csv: {
901
+ type: 'text/csv',
902
+ format: 'csv',
903
+ },
904
+ };
905
+ function downloadFile(data, type, filename = 'data') {
906
+ const blob = new Blob([data], { type: FILE_TYPES[type].type });
907
+ const url = window.URL.createObjectURL(blob);
908
+ const a = document.createElement('a');
909
+ a.href = url;
910
+ a.download = `${filename}.${FILE_TYPES[type].format}`;
911
+ document.body.appendChild(a);
912
+ a.click();
913
+ document.body.removeChild(a);
914
+ window.URL.revokeObjectURL(url);
915
+ }
916
+
917
+ function createCsv(data) {
918
+ return papaparse.unparse(data);
919
+ }
920
+
921
+ function removeLineBreaks(str) {
922
+ return str.replace(/^[\r\n\s]+|[\r\n\s]+$/g, '');
923
+ }
924
+
925
+ function parseCsv(content, config) {
926
+ return papaparse__default.parse(removeLineBreaks(content), config);
927
+ }
928
+
929
+ function unifyCsvItems(csv, defaultProps) {
930
+ if (!Array.isArray(csv)) {
931
+ return [];
932
+ }
933
+ if (Array.isArray(csv?.[0])) {
934
+ return csv.map((d) => Object.fromEntries(d.map((prop, idx) => [defaultProps[idx], prop])));
935
+ }
936
+ return csv;
937
+ }
938
+
939
+ function arrayAttribute(value) {
940
+ if (!Array.isArray(value)) {
941
+ return [];
942
+ }
943
+ return value;
944
+ }
945
+
946
+ function DebounceTime(ms = 500) {
947
+ return function (target, propertyKey, descriptor) {
948
+ let timer = null;
949
+ const method = descriptor.value;
950
+ descriptor.value = function () {
951
+ if (timer !== null) {
952
+ window.clearTimeout(timer);
953
+ }
954
+ timer = window.setTimeout(() => {
955
+ // eslint-disable-next-line prefer-rest-params
956
+ method.apply(this, arguments);
957
+ timer = null;
958
+ }, ms);
959
+ };
960
+ };
961
+ }
962
+
963
+ function createStorageValue(key, { serialize = (v) => (v === null ? null : String(v)), deserialize, injector, }) {
964
+ const value$ = fromEvent(document, 'storage').pipe(filter$1((v) => v.key === key), map$1((v) => v.newValue), startWith$1(localStorage.getItem(key)), map$1((v) => deserialize(v)), distinctUntilChanged$1(), shareReplay$1({ refCount: true, bufferSize: 1 }));
965
+ return {
966
+ get() {
967
+ return deserialize(localStorage.getItem(key));
968
+ },
969
+ set(value) {
970
+ const serialized = serialize(value);
971
+ if (serialized === null) {
972
+ return localStorage.removeItem(key);
973
+ }
974
+ return localStorage.setItem(key, serialized);
975
+ },
976
+ value$,
977
+ value: toSignal(value$, { injector }),
978
+ };
979
+ }
980
+
981
+ class InputFieldComponent extends FormControlSuperclass {
982
+ constructor() {
983
+ super(...arguments);
984
+ this.placeholder = '';
985
+ this.type = 'string';
986
+ this.appearance = 'fill';
987
+ this.cleanButton = input(false, { transform: booleanAttribute });
988
+ this.icon = input();
989
+ }
990
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: InputFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
991
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: InputFieldComponent, isStandalone: false, selector: "v-input-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: false, isRequired: false, transformFunction: null }, cleanButton: { classPropertyName: "cleanButton", publicName: "cleanButton", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, providers: createControlProviders(() => InputFieldComponent), usesInheritance: true, ngImport: i0, template: "<mat-form-field\n [appearance]=\"appearance\"\n [ngClass]=\"{\n 'v-input-field__small': size === 'small',\n 'v-input-field__outline': appearance === 'outline',\n }\"\n class=\"v-input-field\"\n>\n @if (icon()) {\n <div class=\"prefix\" matPrefix>\n <mat-icon>{{ icon() }}</mat-icon>\n </div>\n }\n <mat-label>{{ label }}</mat-label>\n <input\n [formControl]=\"control\"\n [placeholder]=\"placeholder\"\n [type]=\"type\"\n autocomplete=\"false\"\n matInput\n />\n <div class=\"postfix\" matSuffix>\n @if (cleanButton()) {\n <button\n [disabled]=\"!control.value\"\n [style.visibility]=\"control.value ? '' : 'hidden'\"\n mat-icon-button\n (click)=\"control.reset()\"\n >\n <mat-icon>clear</mat-icon>\n </button>\n }\n </div>\n</mat-form-field>\n", styles: [".v-input-field .postfix{white-space:nowrap}.v-input-field__small ::ng-deep .mat-icon{transform:scale(.75)!important}.v-input-field__outline .postfix{padding-right:4px}.v-input-field__outline .prefix{padding-left:4px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i1$4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }] }); }
992
+ }
993
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: InputFieldComponent, decorators: [{
994
+ type: Component,
995
+ args: [{ selector: 'v-input-field', providers: createControlProviders(() => InputFieldComponent), standalone: false, template: "<mat-form-field\n [appearance]=\"appearance\"\n [ngClass]=\"{\n 'v-input-field__small': size === 'small',\n 'v-input-field__outline': appearance === 'outline',\n }\"\n class=\"v-input-field\"\n>\n @if (icon()) {\n <div class=\"prefix\" matPrefix>\n <mat-icon>{{ icon() }}</mat-icon>\n </div>\n }\n <mat-label>{{ label }}</mat-label>\n <input\n [formControl]=\"control\"\n [placeholder]=\"placeholder\"\n [type]=\"type\"\n autocomplete=\"false\"\n matInput\n />\n <div class=\"postfix\" matSuffix>\n @if (cleanButton()) {\n <button\n [disabled]=\"!control.value\"\n [style.visibility]=\"control.value ? '' : 'hidden'\"\n mat-icon-button\n (click)=\"control.reset()\"\n >\n <mat-icon>clear</mat-icon>\n </button>\n }\n </div>\n</mat-form-field>\n", styles: [".v-input-field .postfix{white-space:nowrap}.v-input-field__small ::ng-deep .mat-icon{transform:scale(.75)!important}.v-input-field__outline .postfix{padding-right:4px}.v-input-field__outline .prefix{padding-left:4px}\n"] }]
996
+ }], propDecorators: { label: [{
997
+ type: Input
998
+ }], placeholder: [{
999
+ type: Input
1000
+ }], type: [{
1001
+ type: Input
1002
+ }], appearance: [{
1003
+ type: Input
1004
+ }], size: [{
1005
+ type: Input
1006
+ }] } });
1007
+
1008
+ class InputFieldModule {
1009
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: InputFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1010
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: InputFieldModule, declarations: [InputFieldComponent], imports: [CommonModule, MatInputModule, ReactiveFormsModule, MatIcon, MatIconButton], exports: [InputFieldComponent] }); }
1011
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: InputFieldModule, imports: [CommonModule, MatInputModule, ReactiveFormsModule, MatIcon, MatIconButton] }); }
1012
+ }
1013
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: InputFieldModule, decorators: [{
1014
+ type: NgModule,
1015
+ args: [{
1016
+ declarations: [InputFieldComponent],
1017
+ exports: [InputFieldComponent],
1018
+ imports: [CommonModule, MatInputModule, ReactiveFormsModule, MatIcon, MatIconButton],
1019
+ }]
1020
+ }] });
1021
+
1022
+ class TagComponent {
1023
+ constructor() {
1024
+ this.hostClass = true;
1025
+ this.icon = input();
1026
+ this.progress = input(false, { transform: booleanAttribute });
1027
+ }
1028
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1029
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: TagComponent, isStandalone: false, selector: "v-tag", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: false, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, progress: { classPropertyName: "progress", publicName: "progress", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.v-tag": "this.hostClass" } }, ngImport: i0, template: "<mat-chip-row\n [disabled]=\"progress()\"\n [ngClass]=\"{ loading: progress(), action: !!icon() }\"\n class=\"tag {{ 'color-' + color }}\"\n disableRipple\n>\n @if (icon()) {\n <button matChipRemove>\n <mat-icon>{{ progress() ? 'autorenew' : icon() }}</mat-icon>\n </button>\n }\n <ng-content></ng-content>\n</mat-chip-row>\n", styles: [":host ::ng-deep{pointer-events:none}:host .action ::ng-deep{pointer-events:auto;cursor:pointer}:host .action ::ng-deep button{pointer-events:none}:host ::ng-deep *:before{border:none!important}@keyframes content-loading-animation{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.tag{transition:all .3s ease-in-out}.loading{animation:content-loading-animation 1.5s ease-in-out infinite}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$3.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i2$3.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1030
+ }
1031
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TagComponent, decorators: [{
1032
+ type: Component,
1033
+ args: [{ selector: 'v-tag', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<mat-chip-row\n [disabled]=\"progress()\"\n [ngClass]=\"{ loading: progress(), action: !!icon() }\"\n class=\"tag {{ 'color-' + color }}\"\n disableRipple\n>\n @if (icon()) {\n <button matChipRemove>\n <mat-icon>{{ progress() ? 'autorenew' : icon() }}</mat-icon>\n </button>\n }\n <ng-content></ng-content>\n</mat-chip-row>\n", styles: [":host ::ng-deep{pointer-events:none}:host .action ::ng-deep{pointer-events:auto;cursor:pointer}:host .action ::ng-deep button{pointer-events:none}:host ::ng-deep *:before{border:none!important}@keyframes content-loading-animation{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.tag{transition:all .3s ease-in-out}.loading{animation:content-loading-animation 1.5s ease-in-out infinite}\n"] }]
1034
+ }], propDecorators: { hostClass: [{
1035
+ type: HostBinding,
1036
+ args: ['class.v-tag']
1037
+ }], color: [{
1038
+ type: Input
1039
+ }] } });
1040
+
1041
+ class TagModule {
1042
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TagModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1043
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: TagModule, declarations: [TagComponent], imports: [CommonModule, MatChipsModule, MatIconModule], exports: [TagComponent] }); }
1044
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TagModule, imports: [CommonModule, MatChipsModule, MatIconModule] }); }
1045
+ }
1046
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TagModule, decorators: [{
1047
+ type: NgModule,
1048
+ args: [{
1049
+ declarations: [TagComponent],
1050
+ imports: [CommonModule, MatChipsModule, MatIconModule],
1051
+ exports: [TagComponent],
1052
+ }]
1053
+ }] });
1054
+
1055
+ const SPACES = /[\s\u00A0]/g;
1056
+ function normalizeString(str) {
1057
+ return (str || '').replace(SPACES, ' ');
1058
+ }
1059
+
1060
+ class HighlightDirective {
1061
+ constructor(el, renderer, dr, injector) {
1062
+ this.el = el;
1063
+ this.renderer = renderer;
1064
+ this.dr = dr;
1065
+ this.injector = injector;
1066
+ this.vHighlightText = input('', { transform: (v) => String(v || '') });
1067
+ this.vHighlightSearch = input('', { transform: (v) => String(v || '') });
1068
+ }
1069
+ ngOnInit() {
1070
+ combineLatest([
1071
+ toObservable(this.vHighlightText, { injector: this.injector }).pipe(distinctUntilChanged(), map((text) => this.escapeHtml(text))),
1072
+ toObservable(this.vHighlightSearch, { injector: this.injector }).pipe(distinctUntilChanged(), map((text) => this.escapeHtml(text))),
1073
+ ])
1074
+ .pipe(map(([text, search]) => {
1075
+ if (!search) {
1076
+ return text;
1077
+ }
1078
+ const re = new RegExp(`(${search.replace(SPACES, '\\s')})`, 'gi');
1079
+ return text.replace(re, `<mark>$1</mark>`);
1080
+ }), distinctUntilChanged(), takeUntilDestroyed(this.dr))
1081
+ .subscribe((text) => {
1082
+ this.renderer.setProperty(this.el.nativeElement, 'innerHTML', text);
1083
+ });
1084
+ }
1085
+ escapeHtml(html) {
1086
+ return html
1087
+ .replace(/&/g, '&amp;')
1088
+ .replace(/</g, '&lt;')
1089
+ .replace(/>/g, '&gt;')
1090
+ .replace(/"/g, '&quot;')
1091
+ .replace(/'/g, '&#39;');
1092
+ }
1093
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: HighlightDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.DestroyRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive }); }
1094
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.2", type: HighlightDirective, isStandalone: true, selector: "[vHighlight]", inputs: { vHighlightText: { classPropertyName: "vHighlightText", publicName: "vHighlightText", isSignal: true, isRequired: false, transformFunction: null }, vHighlightSearch: { classPropertyName: "vHighlightSearch", publicName: "vHighlightSearch", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
1095
+ }
1096
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: HighlightDirective, decorators: [{
1097
+ type: Directive,
1098
+ args: [{
1099
+ standalone: true,
1100
+ selector: '[vHighlight]',
1101
+ }]
1102
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.DestroyRef }, { type: i0.Injector }] });
1103
+
1104
+ class MenuValueComponent {
1105
+ constructor() {
1106
+ this.value = input.required();
1107
+ }
1108
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MenuValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1109
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: MenuValueComponent, isStandalone: true, selector: "v-menu-value", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: ` @if (value(); as v) {
1110
+ <button [matMenuTriggerFor]="menu" class="button" mat-icon-button>
1111
+ <mat-icon>more_vert</mat-icon>
1112
+ </button>
1113
+ <mat-menu #menu="matMenu">
1114
+ @for (item of v.params.items; track item; let index = $index) {
1115
+ <button [disabled]="!!item?.disabled" mat-menu-item (click)="item?.click?.($event)">
1116
+ {{ item.label }}
1117
+ </button>
1118
+ }
1119
+ </mat-menu>
1120
+ }`, isInline: true, styles: [""], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }] }); }
1121
+ }
1122
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MenuValueComponent, decorators: [{
1123
+ type: Component,
1124
+ args: [{ selector: 'v-menu-value', imports: [MatIcon, MatIconButton, MatMenu, MatMenuItem, MatMenuTrigger], template: ` @if (value(); as v) {
1125
+ <button [matMenuTriggerFor]="menu" class="button" mat-icon-button>
1126
+ <mat-icon>more_vert</mat-icon>
1127
+ </button>
1128
+ <mat-menu #menu="matMenu">
1129
+ @for (item of v.params.items; track item; let index = $index) {
1130
+ <button [disabled]="!!item?.disabled" mat-menu-item (click)="item?.click?.($event)">
1131
+ {{ item.label }}
1132
+ </button>
1133
+ }
1134
+ </mat-menu>
1135
+ }` }]
1136
+ }] });
1137
+
1138
+ class ToggleValueComponent {
1139
+ constructor() {
1140
+ this.value = input.required();
1141
+ }
1142
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ToggleValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1143
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: ToggleValueComponent, isStandalone: true, selector: "v-toggle-value", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: ` @if (value(); as v) {
1144
+ <mat-slide-toggle
1145
+ [checked]="value().value"
1146
+ (change)="$event.source.checked = !!value().value"
1147
+ >
1148
+ </mat-slide-toggle>
1149
+ }`, isInline: true, dependencies: [{ kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i1$5.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }] }); }
1150
+ }
1151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ToggleValueComponent, decorators: [{
1152
+ type: Component,
1153
+ args: [{
1154
+ selector: 'v-toggle-value',
1155
+ imports: [MatSlideToggleModule],
1156
+ template: ` @if (value(); as v) {
1157
+ <mat-slide-toggle
1158
+ [checked]="value().value"
1159
+ (change)="$event.source.checked = !!value().value"
1160
+ >
1161
+ </mat-slide-toggle>
1162
+ }`,
1163
+ }]
1164
+ }] });
1165
+
1166
+ function currencyAmountValueToString(value) {
1167
+ if (typeof value?.value !== 'number') {
1168
+ return '';
1169
+ }
1170
+ const locale = inject(LOCALE_ID);
1171
+ return formatCurrency(value.value, value.params.code, 'long', locale, value.params.exponent, !!value.params.major);
1172
+ }
1173
+
1174
+ function datetimeValueToString(value) {
1175
+ if (!value?.value) {
1176
+ return '';
1177
+ }
1178
+ const locale = inject(LOCALE_ID);
1179
+ return formatDate(value.value, 'dd.MM.yyyy HH:mm:ss', locale, '+0000');
1180
+ }
1181
+
1182
+ function unknownToString(value) {
1183
+ if (isNil(value)) {
1184
+ return '';
1185
+ }
1186
+ return String(value);
1187
+ }
1188
+
1189
+ function valueToString(value) {
1190
+ switch (value?.type) {
1191
+ case 'currency':
1192
+ return currencyAmountValueToString(value);
1193
+ case 'datetime':
1194
+ return datetimeValueToString(value);
1195
+ }
1196
+ return unknownToString(value?.value)?.trim?.();
1197
+ }
1198
+
1199
+ class ValueComponent {
1200
+ constructor(injector, router) {
1201
+ this.injector = injector;
1202
+ this.router = router;
1203
+ this.value = input();
1204
+ this.lazyValue = input();
1205
+ this.lazyVisible = model(false);
1206
+ this.progress = input(false, { transform: booleanAttribute });
1207
+ this.inline = false;
1208
+ this.emptySymbol = '―';
1209
+ this.value$ = combineLatest([toObservable(this.value), toObservable(this.lazyValue)]).pipe(switchMap(([value, lazyValue]) => (isObservable(lazyValue) ? lazyValue : of(value))), shareReplay({ refCount: true, bufferSize: 1 }));
1210
+ this.valueText$ = this.value$.pipe(map((value) => runInInjectionContext(this.injector, () => valueToString(value))), shareReplay({ refCount: true, bufferSize: 1 }));
1211
+ this.inProgress$ = combineLatest([
1212
+ toObservable(this.progress),
1213
+ this.value$.pipe(map((v) => v?.inProgress ?? false)),
1214
+ ]).pipe(map(([compProgress, valueProgress]) => compProgress || valueProgress), shareReplay({ refCount: true, bufferSize: 1 }));
1215
+ }
1216
+ makeLazyVisible() {
1217
+ this.lazyVisible.set(true);
1218
+ }
1219
+ click(event) {
1220
+ this.value$.pipe(first(), filter(Boolean)).subscribe((value) => {
1221
+ runInInjectionContext(this.injector, () => {
1222
+ if (value?.click) {
1223
+ value.click(event);
1224
+ }
1225
+ else if (typeof value?.link === 'function') {
1226
+ const linkArgs = value.link(event);
1227
+ if (typeof linkArgs === 'string') {
1228
+ this.router.navigateByUrl(linkArgs);
1229
+ return;
1230
+ }
1231
+ this.router.navigate(...linkArgs);
1232
+ }
1233
+ });
1234
+ });
1235
+ }
1236
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ValueComponent, deps: [{ token: i0.Injector }, { token: i1$6.Router }], target: i0.ɵɵFactoryTarget.Component }); }
1237
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: ValueComponent, isStandalone: true, selector: "v-value", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, lazyValue: { classPropertyName: "lazyValue", publicName: "lazyValue", isSignal: true, isRequired: false, transformFunction: null }, lazyVisible: { classPropertyName: "lazyVisible", publicName: "lazyVisible", isSignal: true, isRequired: false, transformFunction: null }, progress: { classPropertyName: "progress", publicName: "progress", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, emptySymbol: { classPropertyName: "emptySymbol", publicName: "emptySymbol", isSignal: false, isRequired: false, transformFunction: (v) => (v === false ? '' : typeof v === 'string' ? v : '―') }, highlight: { classPropertyName: "highlight", publicName: "highlight", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { lazyVisible: "lazyVisibleChange" }, host: { properties: { "class.inline": "inline" } }, ngImport: i0, template: "@if (!value() && lazyValue() && !lazyVisible()) {\n <button class=\"button\" mat-icon-button (click)=\"lazyVisible.set(true)\">\n <mat-icon>sync</mat-icon>\n </button>\n} @else {\n @if (value$ | async; as v) {\n <div\n [ngClass]=\"{ wrapper__action: v.click || v.link }\"\n class=\"wrapper\"\n (click)=\"click($event)\"\n >\n @if (v.template) {\n <ng-container *ngTemplateOutlet=\"v.template; context: {}\"></ng-container>\n } @else {\n @if (v.color) {\n <v-tag [color]=\"v.color\">\n <ng-container *ngTemplateOutlet=\"tooltipTemplate\"></ng-container>\n </v-tag>\n } @else {\n <ng-container *ngTemplateOutlet=\"tooltipTemplate\"></ng-container>\n }\n\n <ng-template #tooltipTemplate>\n @if (v.tooltip) {\n <span [matTooltip]=\"v.tooltip\" class=\"tooltip\">\n <ng-container *ngTemplateOutlet=\"valueTemplate\"></ng-container>\n </span>\n } @else {\n <span [title]=\"v.value\">\n <ng-container *ngTemplateOutlet=\"valueTemplate\"></ng-container>\n </span>\n }\n </ng-template>\n\n <ng-template #valueTemplate>\n @switch (v.type) {\n @case ('menu') {\n <v-menu-value [value]=\"v\"></v-menu-value>\n }\n @case ('toggle') {\n <v-toggle-value [value]=\"v\"></v-toggle-value>\n }\n @default {\n @let valueText = valueText$ | async;\n @if (inProgress$ | async) {\n <v-content-loading [hiddenText]=\"valueText\"></v-content-loading>\n } @else if (valueText) {\n <span\n [ngClass]=\"{ value__click: v.click, value__link: v.link }\"\n [vHighlightSearch]=\"highlight\"\n [vHighlightText]=\"valueText\"\n vHighlight\n ></span>\n } @else if (emptySymbol) {\n <span style=\"color: #ccc\">{{ emptySymbol }}</span>\n }\n }\n }\n </ng-template>\n }\n\n @if (v.description) {\n <div\n [title]=\"v.description\"\n [vHighlightSearch]=\"highlight\"\n [vHighlightText]=\"v.description\"\n class=\"description mat-label-medium mat-secondary-text\"\n vHighlight\n ></div>\n }\n </div>\n } @else {\n <v-content-loading></v-content-loading>\n }\n}\n", styles: [":host{cursor:default;text-align:left}::ng-deep .inline,::ng-deep .inline *{white-space:nowrap}.tooltip{text-decoration:underline;text-decoration-style:dotted}.wrapper__action{cursor:pointer}.value__click:hover{text-decoration:underline;text-decoration-style:dashed}.value__link:hover{text-decoration:underline}.description{overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: TagComponent, selector: "v-tag", inputs: ["color", "icon", "progress"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MenuValueComponent, selector: "v-menu-value", inputs: ["value"] }, { kind: "component", type: ContentLoadingComponent, selector: "v-content-loading", inputs: ["width", "textSize", "hiddenText"] }, { kind: "directive", type: HighlightDirective, selector: "[vHighlight]", inputs: ["vHighlightText", "vHighlightSearch"] }, { kind: "component", type: ToggleValueComponent, selector: "v-toggle-value", inputs: ["value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1238
+ }
1239
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ValueComponent, decorators: [{
1240
+ type: Component,
1241
+ args: [{ selector: 'v-value', imports: [
1242
+ CommonModule,
1243
+ MatIcon,
1244
+ MatIconButton,
1245
+ TagModule,
1246
+ MatTooltip,
1247
+ MenuValueComponent,
1248
+ ContentLoadingComponent,
1249
+ HighlightDirective,
1250
+ ToggleValueComponent,
1251
+ ], host: {
1252
+ '[class.inline]': 'inline',
1253
+ }, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!value() && lazyValue() && !lazyVisible()) {\n <button class=\"button\" mat-icon-button (click)=\"lazyVisible.set(true)\">\n <mat-icon>sync</mat-icon>\n </button>\n} @else {\n @if (value$ | async; as v) {\n <div\n [ngClass]=\"{ wrapper__action: v.click || v.link }\"\n class=\"wrapper\"\n (click)=\"click($event)\"\n >\n @if (v.template) {\n <ng-container *ngTemplateOutlet=\"v.template; context: {}\"></ng-container>\n } @else {\n @if (v.color) {\n <v-tag [color]=\"v.color\">\n <ng-container *ngTemplateOutlet=\"tooltipTemplate\"></ng-container>\n </v-tag>\n } @else {\n <ng-container *ngTemplateOutlet=\"tooltipTemplate\"></ng-container>\n }\n\n <ng-template #tooltipTemplate>\n @if (v.tooltip) {\n <span [matTooltip]=\"v.tooltip\" class=\"tooltip\">\n <ng-container *ngTemplateOutlet=\"valueTemplate\"></ng-container>\n </span>\n } @else {\n <span [title]=\"v.value\">\n <ng-container *ngTemplateOutlet=\"valueTemplate\"></ng-container>\n </span>\n }\n </ng-template>\n\n <ng-template #valueTemplate>\n @switch (v.type) {\n @case ('menu') {\n <v-menu-value [value]=\"v\"></v-menu-value>\n }\n @case ('toggle') {\n <v-toggle-value [value]=\"v\"></v-toggle-value>\n }\n @default {\n @let valueText = valueText$ | async;\n @if (inProgress$ | async) {\n <v-content-loading [hiddenText]=\"valueText\"></v-content-loading>\n } @else if (valueText) {\n <span\n [ngClass]=\"{ value__click: v.click, value__link: v.link }\"\n [vHighlightSearch]=\"highlight\"\n [vHighlightText]=\"valueText\"\n vHighlight\n ></span>\n } @else if (emptySymbol) {\n <span style=\"color: #ccc\">{{ emptySymbol }}</span>\n }\n }\n }\n </ng-template>\n }\n\n @if (v.description) {\n <div\n [title]=\"v.description\"\n [vHighlightSearch]=\"highlight\"\n [vHighlightText]=\"v.description\"\n class=\"description mat-label-medium mat-secondary-text\"\n vHighlight\n ></div>\n }\n </div>\n } @else {\n <v-content-loading></v-content-loading>\n }\n}\n", styles: [":host{cursor:default;text-align:left}::ng-deep .inline,::ng-deep .inline *{white-space:nowrap}.tooltip{text-decoration:underline;text-decoration-style:dotted}.wrapper__action{cursor:pointer}.value__click:hover{text-decoration:underline;text-decoration-style:dashed}.value__link:hover{text-decoration:underline}.description{overflow:hidden;text-overflow:ellipsis}\n"] }]
1254
+ }], ctorParameters: () => [{ type: i0.Injector }, { type: i1$6.Router }], propDecorators: { inline: [{
1255
+ type: Input,
1256
+ args: [{ transform: booleanAttribute }]
1257
+ }], emptySymbol: [{
1258
+ type: Input,
1259
+ args: [{
1260
+ transform: (v) => (v === false ? '' : typeof v === 'string' ? v : '―'),
1261
+ }]
1262
+ }], highlight: [{
1263
+ type: Input
1264
+ }] } });
1265
+
1266
+ class ValueListComponent {
1267
+ constructor() {
1268
+ this.list = input();
1269
+ }
1270
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ValueListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1271
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: ValueListComponent, isStandalone: true, selector: "v-value-list", inputs: { list: { classPropertyName: "list", publicName: "list", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
1272
+ @if (list(); as items) {
1273
+ @if (items.length > 1) {
1274
+ <div class="list">
1275
+ @for (item of items; track item) {
1276
+ <v-value [value]="item" inline></v-value>
1277
+ }
1278
+ </div>
1279
+ } @else {
1280
+ <v-value [value]="items[0]" inline></v-value>
1281
+ }
1282
+ } @else {
1283
+ <v-value [progress]="true" inline></v-value>
1284
+ }
1285
+ `, isInline: true, styles: [".list{display:flex;flex-direction:column}.list>*{overflow:hidden;text-overflow:ellipsis;min-height:20px}\n"], dependencies: [{ kind: "component", type: ValueComponent, selector: "v-value", inputs: ["value", "lazyValue", "lazyVisible", "progress", "inline", "emptySymbol", "highlight"], outputs: ["lazyVisibleChange"] }] }); }
1286
+ }
1287
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ValueListComponent, decorators: [{
1288
+ type: Component,
1289
+ args: [{ selector: 'v-value-list', imports: [ValueComponent], template: `
1290
+ @if (list(); as items) {
1291
+ @if (items.length > 1) {
1292
+ <div class="list">
1293
+ @for (item of items; track item) {
1294
+ <v-value [value]="item" inline></v-value>
1295
+ }
1296
+ </div>
1297
+ } @else {
1298
+ <v-value [value]="items[0]" inline></v-value>
1299
+ }
1300
+ } @else {
1301
+ <v-value [progress]="true" inline></v-value>
1302
+ }
1303
+ `, styles: [".list{display:flex;flex-direction:column}.list>*{overflow:hidden;text-overflow:ellipsis;min-height:20px}\n"] }]
1304
+ }] });
1305
+
1306
+ class TableInputsComponent {
1307
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TableInputsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1308
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: TableInputsComponent, isStandalone: false, selector: "v-table-inputs", ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [":host{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1309
+ }
1310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TableInputsComponent, decorators: [{
1311
+ type: Component,
1312
+ args: [{ selector: 'v-table-inputs', template: `<ng-content></ng-content>`, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, styles: [":host{display:block}\n"] }]
1313
+ }] });
1314
+
1315
+ function createUniqueColumnDef(name) {
1316
+ return `___$$${typeof name === 'object' || isNil(name) ? 'column' : String(name)}_${Math.random().toString()}`;
1317
+ }
1318
+
1319
+ const DEFAULT_SORT = { active: '', direction: '' };
1320
+ const DEBOUNCE_TIME_MS = 500;
1321
+ const DEFAULT_LOADED_LAZY_ROWS_COUNT = 3;
1322
+ const COLUMN_DEFS = {
1323
+ select: createUniqueColumnDef('select'),
1324
+ drag: createUniqueColumnDef('drag'),
1325
+ };
1326
+
1327
+ function normalizePossiblyFn(fn) {
1328
+ return typeof fn === 'function' ? fn : () => fn;
1329
+ }
1330
+ function normalizeCell(field, cell, hasChild = false) {
1331
+ const cellFn = normalizePossiblyFn(cell);
1332
+ return (...args) => getPossiblyAsyncObservable(cellFn(...args)).pipe(map((value) => {
1333
+ const defaultValue = hasChild ? { value: '' } : { value: get(args[0], field) };
1334
+ if (isNil(value)) {
1335
+ return defaultValue;
1336
+ }
1337
+ return typeof value === 'object' ? { ...defaultValue, ...value } : { value };
1338
+ }));
1339
+ }
1340
+ class NormColumn {
1341
+ constructor({ field, header, cell, child, hidden, sort, lazyCell, ...params }, commonParams = {}) {
1342
+ this.field = field ?? (typeof header === 'string' ? header : String(Math.random()));
1343
+ const defaultHeaderValue = startCase((field || '').split('.').at(-1));
1344
+ this.header = getPossiblyAsyncObservable(header).pipe(map((value) => typeof value === 'object'
1345
+ ? { value: defaultHeaderValue, ...value }
1346
+ : { value: value ?? defaultHeaderValue }));
1347
+ if (cell || !lazyCell) {
1348
+ this.cell = normalizeCell(this.field, cell, !!child);
1349
+ }
1350
+ if (lazyCell) {
1351
+ this.lazyCell = normalizeCell(this.field, lazyCell, !!child);
1352
+ }
1353
+ if (child) {
1354
+ this.child = normalizeCell(this.field, child);
1355
+ }
1356
+ this.params = {
1357
+ ...commonParams,
1358
+ ...params,
1359
+ style: Object.assign({}, commonParams?.style, params?.style),
1360
+ };
1361
+ this.hidden = isNil(hidden) ? of(false) : getPossiblyAsyncObservable(hidden);
1362
+ this.sort = isNil(sort) ? of(null) : getPossiblyAsyncObservable(sort);
1363
+ }
1364
+ }
1365
+
1366
+ function columnsDataToFilterSearchData(src$) {
1367
+ const injector = inject(Injector);
1368
+ return src$.pipe(map((data) => new Map(Array.from(data.entries()).map(([item, value]) => [
1369
+ item,
1370
+ {
1371
+ byColumns: value.map((el) => [
1372
+ runInInjectionContext(injector, () => normalizeString(valueToString(el?.value))),
1373
+ normalizeString(String(el?.value?.description ?? '')),
1374
+ ]),
1375
+ byRow: JSON.stringify(item),
1376
+ },
1377
+ ]))));
1378
+ }
1379
+ function getWeight(searchValue, search, lowerCaseSearch, unimportance = 0) {
1380
+ if (searchValue === search) {
1381
+ return 1000000 - unimportance;
1382
+ }
1383
+ else if (searchValue.includes(search)) {
1384
+ return 10000 - unimportance;
1385
+ }
1386
+ else if (searchValue.toLowerCase().includes(lowerCaseSearch)) {
1387
+ return 100 - unimportance;
1388
+ }
1389
+ return 0;
1390
+ }
1391
+ function filterData(data, search) {
1392
+ const lowerCaseSearch = search.toLowerCase();
1393
+ return Array.from(data.entries())
1394
+ .map(([value, searchValuesCols]) => ({
1395
+ value,
1396
+ priority: searchValuesCols.byColumns.reduce((priority, searchValues) => searchValues.reduce((colPriority, searchValue, idx) => colPriority + getWeight(searchValue, search, lowerCaseSearch, idx), priority), 0) + getWeight(searchValuesCols.byRow, search, lowerCaseSearch, 1),
1397
+ }))
1398
+ .filter((v) => v.priority)
1399
+ .sort((a, b) => b.priority - a.priority)
1400
+ .map((v) => v.value);
1401
+ }
1402
+ function sortData(source, data, columns, sort) {
1403
+ if (!sort?.active || !sort?.direction) {
1404
+ return source;
1405
+ }
1406
+ const colIdx = columns.findIndex((c) => c.field === sort.active);
1407
+ const sortedData = source
1408
+ .slice()
1409
+ .sort((a, b) => compareDifferentTypes((data.get(a)?.byColumns ?? [])[colIdx]?.[0], (data.get(b)?.byColumns ?? [])[colIdx]?.[0]));
1410
+ return sort.direction === 'desc' ? sortedData.reverse() : sortedData;
1411
+ }
1412
+
1413
+ function treeDataItemToInlineDataItem(item) {
1414
+ const children = item.children ?? [];
1415
+ return [
1416
+ children.length ? { value: item.value, child: children[0] } : { value: item.value },
1417
+ ...children.slice(1).map((child) => ({ child })),
1418
+ ];
1419
+ }
1420
+
1421
+ function cachedHeadMap(fn) {
1422
+ return (src$) => {
1423
+ return src$.pipe(scan((acc, v) => {
1424
+ return {
1425
+ prev: v ?? [],
1426
+ res: (v ?? []).map((el, idx) => acc.prev[idx] === el ? acc.res[idx] : fn(el, idx)),
1427
+ };
1428
+ }, { prev: [], res: [] }), map(({ res }) => res));
1429
+ };
1430
+ }
1431
+
1432
+ class TableDataSource extends MatTableDataSource {
1433
+ get paginator() {
1434
+ return this.__paginator;
1435
+ }
1436
+ constructor() {
1437
+ super();
1438
+ this.isTreeData$ = new BehaviorSubject(false);
1439
+ this.sourceData$ = new BehaviorSubject([]);
1440
+ this.data$ = this.isTreeData$.pipe(switchMap((isTreeData) => isTreeData
1441
+ ? this.sourceData$.pipe(cachedHeadMap(treeDataItemToInlineDataItem), map((v) => v.flat()))
1442
+ : this.sourceData$), shareReplay({ refCount: true, bufferSize: 1 }));
1443
+ this.__paginator = new OnePageTableDataSourcePaginator();
1444
+ this.data$.pipe(takeUntilDestroyed(inject(DestroyRef))).subscribe((data) => {
1445
+ this.data = data;
1446
+ });
1447
+ }
1448
+ setData(data) {
1449
+ this.sourceData$.next(data);
1450
+ if (this.isTreeData$.value) {
1451
+ this.isTreeData$.next(false);
1452
+ }
1453
+ }
1454
+ setTreeData(data) {
1455
+ this.sourceData$.next(data);
1456
+ if (!this.isTreeData$.value) {
1457
+ this.isTreeData$.next(true);
1458
+ }
1459
+ }
1460
+ }
1461
+ class OnePageTableDataSourcePaginator {
1462
+ get length() {
1463
+ return this.pageSize;
1464
+ }
1465
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
1466
+ set length(_length) { }
1467
+ get displayedPages() {
1468
+ return this.pageSize / this.partSize;
1469
+ }
1470
+ constructor(partSize) {
1471
+ this.pageIndex = 0;
1472
+ this.pageSize = 0;
1473
+ this.page = new EventEmitter();
1474
+ this.initialized = new BehaviorSubject(undefined);
1475
+ this.setSize(partSize);
1476
+ }
1477
+ setSize(partSize = 25) {
1478
+ if (partSize !== this.partSize) {
1479
+ this.pageSize = this.partSize = partSize;
1480
+ this.reload();
1481
+ }
1482
+ }
1483
+ reload() {
1484
+ this.pageSize = this.partSize;
1485
+ this.update();
1486
+ }
1487
+ more() {
1488
+ this.pageSize += this.partSize;
1489
+ this.update();
1490
+ }
1491
+ update() {
1492
+ this.page.next({
1493
+ pageIndex: this.pageIndex,
1494
+ pageSize: this.pageSize,
1495
+ length: this.length,
1496
+ });
1497
+ }
1498
+ }
1499
+
1500
+ function tableToCsvObject(cols, displayedData) {
1501
+ const data = Array.from(displayedData.values()).map((columnData) => columnData.map((v) => v.value));
1502
+ const res = [
1503
+ cols
1504
+ .map((v) => {
1505
+ const res = valueToString(v);
1506
+ return [res, `${res} (description)`];
1507
+ })
1508
+ .flat(),
1509
+ ...data.map((r) => r.map((c) => [valueToString(c), unknownToString(c?.description)]).flat()),
1510
+ ];
1511
+ // Removing empty description columns (every second column)
1512
+ let emptyCols = [];
1513
+ for (let i = 1; i < res[0].length; i += 2 // description - every second column
1514
+ ) {
1515
+ let isEmpty = true;
1516
+ for (let j = 1; // ignore header row
1517
+ j < res.length; ++j) {
1518
+ if (res[j][i]) {
1519
+ isEmpty = false;
1520
+ break;
1521
+ }
1522
+ }
1523
+ if (isEmpty) {
1524
+ emptyCols.push(i);
1525
+ }
1526
+ }
1527
+ emptyCols = emptyCols.reverse();
1528
+ for (const i of emptyCols) {
1529
+ for (let j = 0; j < res.length; ++j) {
1530
+ res[j].splice(i, 1);
1531
+ }
1532
+ }
1533
+ return res;
1534
+ }
1535
+
1536
+ function getValue(cellFn, ...[value, idx]) {
1537
+ return cellFn ? cellFn(value, idx).pipe(toScannedValue) : of(null);
1538
+ }
1539
+ function toScannedValue(src$) {
1540
+ return src$.pipe(shareReplay({
1541
+ bufferSize: 1,
1542
+ refCount: true,
1543
+ }));
1544
+ }
1545
+ function toObservableColumnsData(src$) {
1546
+ return src$.pipe(scan((acc, { isTree, data, cols }) => {
1547
+ const isColsNotChanged = acc.cols === cols;
1548
+ return {
1549
+ res: new Map(isTree
1550
+ ? data.map((d, idx) => [
1551
+ d,
1552
+ isColsNotChanged &&
1553
+ d === acc.data[idx] &&
1554
+ // This is not the last value, because we need to calculate isNextChild
1555
+ idx !== acc.data.length - 1
1556
+ ? acc.res.get(d)
1557
+ : new Map(cols.map((c) => [
1558
+ c,
1559
+ {
1560
+ value: d.child && c.child
1561
+ ? getValue(c.child, d.child, idx)
1562
+ : d.value
1563
+ ? getValue(c.cell, d.value, idx)
1564
+ : of({ value: '' }),
1565
+ // TODO add support of lazyValue
1566
+ isChild: !d.value,
1567
+ isNextChild: !data[idx + 1]?.value,
1568
+ },
1569
+ ])),
1570
+ ])
1571
+ : data.map((d, idx) => [
1572
+ d,
1573
+ isColsNotChanged && d === acc.data[idx]
1574
+ ? acc.res.get(d)
1575
+ : new Map(cols.map((c) => [
1576
+ c,
1577
+ {
1578
+ value: getValue(c.cell, d, idx),
1579
+ lazyValue: c.lazyCell
1580
+ ? c.lazyCell(d, idx).pipe(toScannedValue)
1581
+ : undefined,
1582
+ },
1583
+ ])),
1584
+ ])),
1585
+ data,
1586
+ cols,
1587
+ };
1588
+ }, { data: [], cols: [], res: new Map() }), map(({ res }) => res));
1589
+ }
1590
+ function toColumnsData(src$) {
1591
+ return src$.pipe(switchMap((columnsData) => {
1592
+ if (!columnsData.size) {
1593
+ return of(new Map());
1594
+ }
1595
+ return combineLatest(Array.from(columnsData.values()).map((v) => combineLatest(Array.from(v.values()).map((cell) => timer(0).pipe(switchMap(() => cell.value), distinctUntilChanged(isEqual$1)))).pipe(debounceTime(0)))).pipe(debounceTime(0), map((res) => new Map(Array.from(columnsData.entries()).map(([k, v], idx) => [
1596
+ k,
1597
+ Array.from(v.values()).map((cell, colIdx) => ({
1598
+ ...cell,
1599
+ value: res[idx][colIdx],
1600
+ })),
1601
+ ]))));
1602
+ }));
1603
+ }
1604
+
1605
+ class NoRecordsComponent {
1606
+ constructor() {
1607
+ this.noRecords = input(false, { transform: booleanAttribute });
1608
+ this.progress = input(false, { transform: booleanAttribute });
1609
+ }
1610
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NoRecordsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1611
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: NoRecordsComponent, isStandalone: true, selector: "v-no-records", inputs: { noRecords: { classPropertyName: "noRecords", publicName: "noRecords", isSignal: true, isRequired: false, transformFunction: null }, progress: { classPropertyName: "progress", publicName: "progress", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
1612
+ @if (noRecords()) {
1613
+ <div class="no-records mat-body-large">
1614
+ {{ progress() ? 'Loading...' : 'No records' }}
1615
+ </div>
1616
+ }
1617
+ `, isInline: true, styles: [".no-records{position:absolute;z-index:999;top:calc(50% + 28px);left:50%;transform:translate(-50%) translateY(-50%)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1618
+ }
1619
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NoRecordsComponent, decorators: [{
1620
+ type: Component,
1621
+ args: [{ selector: 'v-no-records', template: `
1622
+ @if (noRecords()) {
1623
+ <div class="no-records mat-body-large">
1624
+ {{ progress() ? 'Loading...' : 'No records' }}
1625
+ </div>
1626
+ }
1627
+ `, changeDetection: ChangeDetectionStrategy.OnPush, imports: [], styles: [".no-records{position:absolute;z-index:999;top:calc(50% + 28px);left:50%;transform:translate(-50%) translateY(-50%)}\n"] }]
1628
+ }] });
1629
+
1630
+ function createIntersectionObserver(el) {
1631
+ return new Observable((subscriber) => {
1632
+ const observer = new IntersectionObserver((entries) => {
1633
+ for (const entry of entries) {
1634
+ if (entry.isIntersecting) {
1635
+ subscriber.next(entry);
1636
+ }
1637
+ }
1638
+ });
1639
+ observer.observe(el);
1640
+ return {
1641
+ unsubscribe() {
1642
+ observer.disconnect();
1643
+ },
1644
+ };
1645
+ });
1646
+ }
1647
+
1648
+ class InfinityScrollDirective {
1649
+ constructor(elementRef, dr) {
1650
+ this.elementRef = elementRef;
1651
+ this.dr = dr;
1652
+ this.vInfinityScroll = input(false, { transform: booleanAttribute });
1653
+ this.vInfinityScrollMore = output();
1654
+ }
1655
+ ngOnInit() {
1656
+ createIntersectionObserver(this.elementRef.nativeElement)
1657
+ .pipe(filter(() => this.vInfinityScroll()), takeUntilDestroyed(this.dr))
1658
+ .subscribe(() => {
1659
+ this.vInfinityScrollMore.emit();
1660
+ });
1661
+ }
1662
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: InfinityScrollDirective, deps: [{ token: i0.ElementRef }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1663
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.2", type: InfinityScrollDirective, isStandalone: true, selector: "[vInfinityScroll]", inputs: { vInfinityScroll: { classPropertyName: "vInfinityScroll", publicName: "vInfinityScroll", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { vInfinityScrollMore: "vInfinityScrollMore" }, ngImport: i0 }); }
1664
+ }
1665
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: InfinityScrollDirective, decorators: [{
1666
+ type: Directive,
1667
+ args: [{
1668
+ selector: '[vInfinityScroll]',
1669
+ standalone: true,
1670
+ }]
1671
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.DestroyRef }] });
1672
+
1673
+ class BaseColumnComponent {
1674
+ constructor() {
1675
+ this.name = input.required();
1676
+ this.table = inject(MatTable);
1677
+ this.columnDef = viewChild(MatColumnDef);
1678
+ this.cellDef = viewChild(MatCellDef);
1679
+ this.headerCellDef = viewChild(MatHeaderCellDef);
1680
+ this.footerCellDef = viewChild(MatFooterCellDef);
1681
+ }
1682
+ ngOnInit() {
1683
+ const columnDef = this.columnDef();
1684
+ if (columnDef) {
1685
+ columnDef.name = this.name();
1686
+ columnDef.cell = this.cellDef();
1687
+ columnDef.headerCell = this.headerCellDef();
1688
+ columnDef.footerCell = this.footerCellDef();
1689
+ this.removeColumnDef();
1690
+ this.table.addColumnDef(columnDef);
1691
+ this.addedColumnDef = columnDef;
1692
+ }
1693
+ }
1694
+ ngOnDestroy() {
1695
+ this.removeColumnDef();
1696
+ }
1697
+ removeColumnDef() {
1698
+ if (this.table && this.addedColumnDef) {
1699
+ this.table.removeColumnDef(this.addedColumnDef);
1700
+ }
1701
+ }
1702
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: BaseColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1703
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.2", type: BaseColumnComponent, isStandalone: true, inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "columnDef", first: true, predicate: MatColumnDef, descendants: true, isSignal: true }, { propertyName: "cellDef", first: true, predicate: MatCellDef, descendants: true, isSignal: true }, { propertyName: "headerCellDef", first: true, predicate: MatHeaderCellDef, descendants: true, isSignal: true }, { propertyName: "footerCellDef", first: true, predicate: MatFooterCellDef, descendants: true, isSignal: true }], ngImport: i0 }); }
1704
+ }
1705
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: BaseColumnComponent, decorators: [{
1706
+ type: Directive
1707
+ }] });
1708
+
1709
+ class SelectColumnComponent extends BaseColumnComponent {
1710
+ constructor(dr) {
1711
+ super();
1712
+ this.dr = dr;
1713
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1714
+ this.selected = model([]);
1715
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1716
+ this.data = input([], { transform: arrayAttribute });
1717
+ this.progress = input(false);
1718
+ this.selection = new SelectionModel(true, []);
1719
+ this.isAllSelected$ = combineLatest([
1720
+ this.selection.changed.pipe(startWith(null)),
1721
+ toObservable(this.data),
1722
+ ]).pipe(map(() => this.getIsAllSelected()), shareReplay({ refCount: true, bufferSize: 1 }));
1723
+ }
1724
+ ngOnInit() {
1725
+ super.ngOnInit();
1726
+ this.selection.changed.pipe(takeUntilDestroyed(this.dr)).subscribe(() => {
1727
+ this.selected.set(this.selection.selected);
1728
+ });
1729
+ }
1730
+ ngOnChanges(changes) {
1731
+ if (changes.data || changes.selected) {
1732
+ this.updateSelection();
1733
+ }
1734
+ }
1735
+ toggleAllRows() {
1736
+ if (this.getIsAllSelected()) {
1737
+ this.selection.clear(true);
1738
+ return;
1739
+ }
1740
+ this.selection.select(...this.data());
1741
+ }
1742
+ getIsAllSelected() {
1743
+ const numSelected = this.selection.selected.length;
1744
+ const numRows = this.data().length;
1745
+ return numSelected === numRows;
1746
+ }
1747
+ updateSelection() {
1748
+ const newSelected = (this.selected() || []).filter((d) => !!this.data()?.includes?.(d));
1749
+ this.selection.deselect(...this.selection.selected.filter((s) => !newSelected.includes(s)));
1750
+ this.selection.select(...newSelected);
1751
+ }
1752
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SelectColumnComponent, deps: [{ token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Component }); }
1753
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.2", type: SelectColumnComponent, isStandalone: true, selector: "v-select-column", inputs: { selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, progress: { classPropertyName: "progress", publicName: "progress", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
1754
+ <ng-container [matColumnDef]="name()" [sticky]="true">
1755
+ @let columnClasses = 'column';
1756
+ <th *matHeaderCellDef [class]="columnClasses" mat-header-cell>
1757
+ <mat-checkbox
1758
+ [checked]="selection.hasValue() && (isAllSelected$ | async)"
1759
+ [disabled]="!!progress() || !data()?.length"
1760
+ [indeterminate]="selection.hasValue() && !(isAllSelected$ | async)"
1761
+ (change)="$event ? toggleAllRows() : null"
1762
+ >
1763
+ </mat-checkbox>
1764
+ </th>
1765
+ <td *matCellDef="let row" [class]="columnClasses" mat-cell>
1766
+ <mat-checkbox
1767
+ [checked]="selection.isSelected(row)"
1768
+ [disabled]="!!progress()"
1769
+ (change)="$event ? selection.toggle(row) : null"
1770
+ (click)="$event.stopPropagation()"
1771
+ >
1772
+ </mat-checkbox>
1773
+ </td>
1774
+ <td *matFooterCellDef [class]="columnClasses" mat-footer-cell>
1775
+ <mat-checkbox disabled></mat-checkbox>
1776
+ </td>
1777
+ </ng-container>
1778
+ `, isInline: true, styles: [".column{padding-left:4px;padding-right:4px;width:48px;border-right:1px solid;text-overflow:clip}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatTableModule }, { kind: "directive", type: i2$4.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2$4.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2$4.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2$4.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i2$4.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2$4.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i2$4.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1779
+ }
1780
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SelectColumnComponent, decorators: [{
1781
+ type: Component,
1782
+ args: [{ selector: 'v-select-column', template: `
1783
+ <ng-container [matColumnDef]="name()" [sticky]="true">
1784
+ @let columnClasses = 'column';
1785
+ <th *matHeaderCellDef [class]="columnClasses" mat-header-cell>
1786
+ <mat-checkbox
1787
+ [checked]="selection.hasValue() && (isAllSelected$ | async)"
1788
+ [disabled]="!!progress() || !data()?.length"
1789
+ [indeterminate]="selection.hasValue() && !(isAllSelected$ | async)"
1790
+ (change)="$event ? toggleAllRows() : null"
1791
+ >
1792
+ </mat-checkbox>
1793
+ </th>
1794
+ <td *matCellDef="let row" [class]="columnClasses" mat-cell>
1795
+ <mat-checkbox
1796
+ [checked]="selection.isSelected(row)"
1797
+ [disabled]="!!progress()"
1798
+ (change)="$event ? selection.toggle(row) : null"
1799
+ (click)="$event.stopPropagation()"
1800
+ >
1801
+ </mat-checkbox>
1802
+ </td>
1803
+ <td *matFooterCellDef [class]="columnClasses" mat-footer-cell>
1804
+ <mat-checkbox disabled></mat-checkbox>
1805
+ </td>
1806
+ </ng-container>
1807
+ `, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, MatTableModule, MatCheckboxModule], styles: [".column{padding-left:4px;padding-right:4px;width:48px;border-right:1px solid;text-overflow:clip}\n"] }]
1808
+ }], ctorParameters: () => [{ type: i0.DestroyRef }] });
1809
+
1810
+ class DndColumnComponent extends BaseColumnComponent {
1811
+ constructor() {
1812
+ super(...arguments);
1813
+ this.dragged = output();
1814
+ }
1815
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DndColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1816
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: DndColumnComponent, isStandalone: true, selector: "v-dnd-column", outputs: { dragged: "dragged" }, usesInheritance: true, ngImport: i0, template: `
1817
+ <ng-container [matColumnDef]="name()" [sticky]="true">
1818
+ @let columnClasses = 'column';
1819
+ <th *matHeaderCellDef [class]="columnClasses" mat-header-cell></th>
1820
+ <td *matCellDef="let row" [class]="columnClasses" mat-cell>
1821
+ <div class="position">
1822
+ <mat-icon class="dragCursor" (mousedown)="dragged.emit()">reorder</mat-icon>
1823
+ <!-- <span>{{ index + 1 }}</span>-->
1824
+ </div>
1825
+ </td>
1826
+ <td *matFooterCellDef [class]="columnClasses" mat-footer-cell>
1827
+ <div class="position">
1828
+ <mat-icon class="dragCursor">reorder</mat-icon>
1829
+ </div>
1830
+ </td>
1831
+ </ng-container>
1832
+ `, isInline: true, styles: [".column .position{display:flex;align-items:center;gap:8px}.column .position .dragCursor{cursor:move}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatTableModule }, { kind: "directive", type: i2$4.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2$4.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2$4.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2$4.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i2$4.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2$4.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i2$4.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1833
+ }
1834
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DndColumnComponent, decorators: [{
1835
+ type: Component,
1836
+ args: [{ selector: 'v-dnd-column', template: `
1837
+ <ng-container [matColumnDef]="name()" [sticky]="true">
1838
+ @let columnClasses = 'column';
1839
+ <th *matHeaderCellDef [class]="columnClasses" mat-header-cell></th>
1840
+ <td *matCellDef="let row" [class]="columnClasses" mat-cell>
1841
+ <div class="position">
1842
+ <mat-icon class="dragCursor" (mousedown)="dragged.emit()">reorder</mat-icon>
1843
+ <!-- <span>{{ index + 1 }}</span>-->
1844
+ </div>
1845
+ </td>
1846
+ <td *matFooterCellDef [class]="columnClasses" mat-footer-cell>
1847
+ <div class="position">
1848
+ <mat-icon class="dragCursor">reorder</mat-icon>
1849
+ </div>
1850
+ </td>
1851
+ </ng-container>
1852
+ `, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, MatTableModule, MatIconModule], styles: [".column .position{display:flex;align-items:center;gap:8px}.column .position .dragCursor{cursor:move}\n"] }]
1853
+ }] });
1854
+
1855
+ class TableInfoBarComponent {
1856
+ constructor(dr) {
1857
+ this.dr = dr;
1858
+ this.progress = input(false, { transform: booleanAttribute });
1859
+ this.hasMore = input(false, { transform: booleanAttribute });
1860
+ this.hasLoad = input(false, { transform: booleanAttribute });
1861
+ this.isPreload = input(false, { transform: booleanAttribute });
1862
+ this.noDownload = input(false, { transform: booleanAttribute });
1863
+ this.noToolbar = input(false, { transform: booleanAttribute });
1864
+ this.dataProgress = input(false, { transform: booleanAttribute });
1865
+ this.columns = input([]);
1866
+ this.size = input(0, { transform: numberAttribute });
1867
+ this.preloadSize = input(0, { transform: numberAttribute });
1868
+ this.count = input(undefined);
1869
+ this.filteredCount = input(0);
1870
+ this.selectedCount = input(0);
1871
+ this.filter = input('');
1872
+ this.standaloneFilter = input(false, { transform: booleanAttribute });
1873
+ this.hasInputs = input(false, { transform: booleanAttribute });
1874
+ this.filterChange = output();
1875
+ this.filterControl = new FormControl('', { nonNullable: true });
1876
+ this.downloadCsv = output();
1877
+ // eslint-disable-next-line @angular-eslint/no-output-native
1878
+ this.load = output();
1879
+ this.preload = output();
1880
+ this.countText = computed(() => this.count()
1881
+ ? (this.filter() && this.filteredCount() !== this.count()
1882
+ ? this.filteredCount() + '/'
1883
+ : '') +
1884
+ (this.hasMore() ? '>' : '') +
1885
+ this.count()
1886
+ : this.progress() || this.count() !== 0
1887
+ ? '...'
1888
+ : '0');
1889
+ }
1890
+ ngOnInit() {
1891
+ this.filterControl.valueChanges.pipe(takeUntilDestroyed(this.dr)).subscribe((v) => {
1892
+ this.filterChange.emit(v);
1893
+ });
1894
+ }
1895
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TableInfoBarComponent, deps: [{ token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Component }); }
1896
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: TableInfoBarComponent, isStandalone: false, selector: "v-table-info-bar", inputs: { progress: { classPropertyName: "progress", publicName: "progress", isSignal: true, isRequired: false, transformFunction: null }, hasMore: { classPropertyName: "hasMore", publicName: "hasMore", isSignal: true, isRequired: false, transformFunction: null }, hasLoad: { classPropertyName: "hasLoad", publicName: "hasLoad", isSignal: true, isRequired: false, transformFunction: null }, isPreload: { classPropertyName: "isPreload", publicName: "isPreload", isSignal: true, isRequired: false, transformFunction: null }, noDownload: { classPropertyName: "noDownload", publicName: "noDownload", isSignal: true, isRequired: false, transformFunction: null }, noToolbar: { classPropertyName: "noToolbar", publicName: "noToolbar", isSignal: true, isRequired: false, transformFunction: null }, dataProgress: { classPropertyName: "dataProgress", publicName: "dataProgress", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, preloadSize: { classPropertyName: "preloadSize", publicName: "preloadSize", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, filteredCount: { classPropertyName: "filteredCount", publicName: "filteredCount", isSignal: true, isRequired: false, transformFunction: null }, selectedCount: { classPropertyName: "selectedCount", publicName: "selectedCount", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, standaloneFilter: { classPropertyName: "standaloneFilter", publicName: "standaloneFilter", isSignal: true, isRequired: false, transformFunction: null }, hasInputs: { classPropertyName: "hasInputs", publicName: "hasInputs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChange: "filterChange", downloadCsv: "downloadCsv", load: "load", preload: "preload" }, ngImport: i0, template: "<div class=\"wrapper\">\n @if (standaloneFilter()) {\n <div class=\"header-wrapper\">\n @if (hasInputs()) {\n <ng-content select=\"v-table-inputs\"></ng-content>\n }\n <v-input-field\n [formControl]=\"filterControl\"\n class=\"filter__standalone filter\"\n cleanButton\n label=\"Search\"\n ></v-input-field>\n </div>\n }\n <v-actions>\n <v-actions>\n @if (!noToolbar()) {\n @if (!standaloneFilter()) {\n <div>\n <v-input-field\n [formControl]=\"filterControl\"\n appearance=\"outline\"\n class=\"filter filter__extended\"\n cleanButton\n icon=\"manage_search\"\n label=\"Search\"\n size=\"small\"\n ></v-input-field>\n </div>\n }\n <div class=\"details\">\n @if (hasLoad() || hasMore()) {\n <button\n [disabled]=\"progress() || !hasMore()\"\n mat-icon-button\n matTooltip=\"Preload {{ preloadSize() }}{{\n isPreload() && hasMore() ? ' more' : ''\n }} elements\"\n (click)=\"preload.emit()\"\n >\n <mat-icon>\n {{\n hasMore()\n ? isPreload()\n ? 'downloading'\n : 'download'\n : 'download_done'\n }}\n </mat-icon>\n </button>\n }\n @if (!noDownload()) {\n <button\n [disabled]=\"progress() || !count()\"\n mat-icon-button\n matTooltip=\"Download CSV\"\n (click)=\"downloadCsv.emit()\"\n >\n <mat-icon>file_save</mat-icon>\n </button>\n }\n <!-- <button mat-icon-button matTooltip=\"Customize table\" (click)=\"tune()\">\n <mat-icon>tune</mat-icon>\n </button> -->\n </div>\n }\n <div\n [matBadge]=\"selectedCount() || ''\"\n [matBadgeDisabled]=\"progress() || dataProgress()\"\n [matTooltip]=\"\n dataProgress()\n ? 'Preparing data for sorting, filtering and downloading...'\n : progress()\n ? 'Loading...'\n : 'Reload ' + size() + ' elements'\n \"\n class=\"count\"\n (click)=\"hasLoad() ? load.emit() : undefined\"\n >\n <v-tag\n [icon]=\"hasLoad() ? 'refresh' : undefined\"\n [progress]=\"progress() || dataProgress()\"\n >\n {{ countText() }}\n </v-tag>\n </div>\n </v-actions>\n <v-actions>\n <ng-content></ng-content>\n </v-actions>\n </v-actions>\n</div>\n", styles: [".wrapper{display:flex;flex-direction:column;gap:8px}.inputs{display:none}.inputs:not(:empty){display:block}.header-wrapper{display:flex;gap:16px}::ng-deep .header-wrapper>*{flex:1}.details{display:flex;align-items:center}.details ::ng-deep button{margin:-6px 0}.count{align-self:anchor-center}.filter__extended{max-width:200px}.filter ::ng-deep .mat-mdc-form-field-subscript-wrapper{height:0}\n"], dependencies: [{ kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2$5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i1$4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: InputFieldComponent, selector: "v-input-field", inputs: ["label", "placeholder", "type", "appearance", "size", "cleanButton", "icon"] }, { kind: "component", type: ActionsComponent, selector: "v-actions" }, { kind: "directive", type: i6.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: TagComponent, selector: "v-tag", inputs: ["color", "icon", "progress"] }] }); }
1897
+ }
1898
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TableInfoBarComponent, decorators: [{
1899
+ type: Component,
1900
+ args: [{ selector: 'v-table-info-bar', standalone: false, template: "<div class=\"wrapper\">\n @if (standaloneFilter()) {\n <div class=\"header-wrapper\">\n @if (hasInputs()) {\n <ng-content select=\"v-table-inputs\"></ng-content>\n }\n <v-input-field\n [formControl]=\"filterControl\"\n class=\"filter__standalone filter\"\n cleanButton\n label=\"Search\"\n ></v-input-field>\n </div>\n }\n <v-actions>\n <v-actions>\n @if (!noToolbar()) {\n @if (!standaloneFilter()) {\n <div>\n <v-input-field\n [formControl]=\"filterControl\"\n appearance=\"outline\"\n class=\"filter filter__extended\"\n cleanButton\n icon=\"manage_search\"\n label=\"Search\"\n size=\"small\"\n ></v-input-field>\n </div>\n }\n <div class=\"details\">\n @if (hasLoad() || hasMore()) {\n <button\n [disabled]=\"progress() || !hasMore()\"\n mat-icon-button\n matTooltip=\"Preload {{ preloadSize() }}{{\n isPreload() && hasMore() ? ' more' : ''\n }} elements\"\n (click)=\"preload.emit()\"\n >\n <mat-icon>\n {{\n hasMore()\n ? isPreload()\n ? 'downloading'\n : 'download'\n : 'download_done'\n }}\n </mat-icon>\n </button>\n }\n @if (!noDownload()) {\n <button\n [disabled]=\"progress() || !count()\"\n mat-icon-button\n matTooltip=\"Download CSV\"\n (click)=\"downloadCsv.emit()\"\n >\n <mat-icon>file_save</mat-icon>\n </button>\n }\n <!-- <button mat-icon-button matTooltip=\"Customize table\" (click)=\"tune()\">\n <mat-icon>tune</mat-icon>\n </button> -->\n </div>\n }\n <div\n [matBadge]=\"selectedCount() || ''\"\n [matBadgeDisabled]=\"progress() || dataProgress()\"\n [matTooltip]=\"\n dataProgress()\n ? 'Preparing data for sorting, filtering and downloading...'\n : progress()\n ? 'Loading...'\n : 'Reload ' + size() + ' elements'\n \"\n class=\"count\"\n (click)=\"hasLoad() ? load.emit() : undefined\"\n >\n <v-tag\n [icon]=\"hasLoad() ? 'refresh' : undefined\"\n [progress]=\"progress() || dataProgress()\"\n >\n {{ countText() }}\n </v-tag>\n </div>\n </v-actions>\n <v-actions>\n <ng-content></ng-content>\n </v-actions>\n </v-actions>\n</div>\n", styles: [".wrapper{display:flex;flex-direction:column;gap:8px}.inputs{display:none}.inputs:not(:empty){display:block}.header-wrapper{display:flex;gap:16px}::ng-deep .header-wrapper>*{flex:1}.details{display:flex;align-items:center}.details ::ng-deep button{margin:-6px 0}.count{align-self:anchor-center}.filter__extended{max-width:200px}.filter ::ng-deep .mat-mdc-form-field-subscript-wrapper{height:0}\n"] }]
1901
+ }], ctorParameters: () => [{ type: i0.DestroyRef }] });
1902
+
1903
+ class TableComponent {
1904
+ constructor(dr, injector, cdr) {
1905
+ this.dr = dr;
1906
+ this.injector = injector;
1907
+ this.cdr = cdr;
1908
+ this.data = input([], { transform: arrayAttribute });
1909
+ this.treeData = input();
1910
+ this.columns = input([], {
1911
+ transform: arrayAttribute,
1912
+ });
1913
+ this.progress = input(false, { transform: Boolean });
1914
+ this.hasMore = input(false, { transform: booleanAttribute });
1915
+ this.size = input(25, { transform: numberAttribute });
1916
+ this.maxSize = input(1000, { transform: numberAttribute });
1917
+ this.noDownload = input(false, { transform: booleanAttribute });
1918
+ this.noToolbar = input(false, { transform: booleanAttribute });
1919
+ // Filter
1920
+ this.filter = model('');
1921
+ this.filter$ = toObservable(this.filter).pipe(map((v) => (v || '').trim()), distinctUntilChanged(), debounceTime$1(DEBOUNCE_TIME_MS), shareReplay({ refCount: true, bufferSize: 1 }));
1922
+ this.standaloneFilter = input(false, { transform: booleanAttribute });
1923
+ this.externalFilter = input(false, { transform: booleanAttribute });
1924
+ this.filteredSortData$ = new BehaviorSubject(null);
1925
+ this.displayedData$ = combineLatest([
1926
+ defer(() => this.dataSource.data$),
1927
+ this.filteredSortData$.pipe(distinctUntilChanged()),
1928
+ defer(() => this.columnsDataProgress$),
1929
+ ]).pipe(map(([data, filteredSortData, columnsDataProgress]) => (filteredSortData && !columnsDataProgress ? filteredSortData : data) || []), shareReplay({ refCount: true, bufferSize: 1 }));
1930
+ this.displayedCount$ = this.displayedData$.pipe(map((data) => data.length), distinctUntilChanged(), shareReplay({ refCount: true, bufferSize: 1 }));
1931
+ // Select
1932
+ this.rowSelectable = input(false, { transform: booleanAttribute });
1933
+ this.rowSelected = model([]);
1934
+ // Sort
1935
+ this.sort = model(DEFAULT_SORT);
1936
+ // Drag & drop
1937
+ this.rowDragDrop = input(false, {
1938
+ transform: (v) => {
1939
+ if (Array.isArray(v)) {
1940
+ return v;
1941
+ }
1942
+ return booleanAttribute(v);
1943
+ },
1944
+ });
1945
+ this.rowDropped = output();
1946
+ this.dragDisabled = true;
1947
+ this.update$ = new Subject();
1948
+ this.update = outputFromObservable(this.update$);
1949
+ this.more = output();
1950
+ this.loadedLazyItems = new WeakMap();
1951
+ this.dataSource = new TableDataSource();
1952
+ this.normColumns = computed(() => this.columns().map((c) => new NormColumn(c)));
1953
+ this.displayedNormColumns$ = toObservable(this.normColumns).pipe(switchMap((cols) => combineLatest(cols.map((c) => c.hidden)).pipe(map((c) => cols.filter((_, idx) => !c[idx])))), shareReplay({ refCount: true, bufferSize: 1 }));
1954
+ this.columnsData$$ = combineLatest({
1955
+ isTree: this.dataSource.isTreeData$,
1956
+ data: this.dataSource.data$,
1957
+ cols: toObservable(this.normColumns),
1958
+ }).pipe(toObservableColumnsData, shareReplay({ refCount: true, bufferSize: 1 }));
1959
+ this.columnsDataProgress$ = new BehaviorSubject(false);
1960
+ this.columnsData$ = this.columnsData$$.pipe(tap(() => {
1961
+ this.columnsDataProgress$.next(true);
1962
+ }), toColumnsData, tap(() => {
1963
+ this.columnsDataProgress$.next(false);
1964
+ }), shareReplay({ refCount: true, bufferSize: 1 }));
1965
+ this.isPreload = signal(false);
1966
+ this.loadSize = computed(() => (this.isPreload() ? this.maxSize() : this.size()));
1967
+ this.hasAutoShowMore$ = combineLatest([
1968
+ toObservable(this.hasMore),
1969
+ this.dataSource.data$.pipe(map((d) => d?.length)),
1970
+ this.displayedCount$,
1971
+ this.dataSource.paginator.page.pipe(startWith(null), map(() => this.dataSource.paginator.pageSize)),
1972
+ ]).pipe(map(([hasMore, dataCount, displayedDataCount, size]) => (hasMore && displayedDataCount !== 0 && displayedDataCount >= dataCount) ||
1973
+ displayedDataCount > size), distinctUntilChanged(), shareReplay({ refCount: true, bufferSize: 1 }));
1974
+ this.displayedColumns$ = combineLatest([
1975
+ this.displayedNormColumns$,
1976
+ toObservable(this.rowSelectable),
1977
+ toObservable(this.sort),
1978
+ toObservable(this.rowDragDrop),
1979
+ ]).pipe(map(([normColumns, rowSelectable, sort, rowDragDrop]) => [
1980
+ ...((Array.isArray(rowDragDrop)
1981
+ ? sort?.direction && rowDragDrop.includes(sort?.active)
1982
+ : rowDragDrop)
1983
+ ? [this.columnDefs.drag]
1984
+ : []),
1985
+ ...(rowSelectable ? [this.columnDefs.select] : []),
1986
+ ...normColumns.map((c) => c.field),
1987
+ ]), shareReplay({ refCount: true, bufferSize: 1 }));
1988
+ this.columnDefs = COLUMN_DEFS;
1989
+ }
1990
+ ngOnInit() {
1991
+ const sort$ = toObservable(this.sort, { injector: this.injector }).pipe(distinctUntilChanged(), share());
1992
+ toObservable(this.data, { injector: this.injector })
1993
+ .pipe(filter(Boolean), takeUntilDestroyed(this.dr))
1994
+ .subscribe((data) => {
1995
+ this.dataSource.setData(data);
1996
+ });
1997
+ toObservable(this.treeData, { injector: this.injector })
1998
+ .pipe(filter(Boolean), takeUntilDestroyed(this.dr))
1999
+ .subscribe((data) => {
2000
+ this.dataSource.setTreeData(data);
2001
+ });
2002
+ combineLatest([
2003
+ this.filter$,
2004
+ sort$,
2005
+ this.dataSource.data$,
2006
+ runInInjectionContext(this.injector, () => this.columnsData$.pipe(columnsDataToFilterSearchData)),
2007
+ this.dataSource.isTreeData$,
2008
+ toObservable(this.normColumns, { injector: this.injector }),
2009
+ toObservable(this.externalFilter, { injector: this.injector }),
2010
+ ])
2011
+ .pipe(map(([search, sort, source, data, isTreeData, columns, isExternalFilter]) => {
2012
+ if (isTreeData) {
2013
+ return source;
2014
+ }
2015
+ const filteredData = !isExternalFilter && search ? filterData(data, search) : source;
2016
+ return sortData(filteredData, data, columns, sort);
2017
+ }), takeUntilDestroyed(this.dr))
2018
+ .subscribe((filtered) => {
2019
+ this.updateSortFilter(filtered);
2020
+ this.updateLoadedLazyItems(filtered);
2021
+ this.cdr.markForCheck();
2022
+ });
2023
+ merge(this.filter$.pipe(filter(Boolean)), toObservable(this.hasMore, { injector: this.injector }).pipe(filter(Boolean)))
2024
+ .pipe(takeUntilDestroyed(this.dr))
2025
+ .subscribe(() => {
2026
+ this.sort.set(DEFAULT_SORT);
2027
+ });
2028
+ merge(this.filter$, sort$)
2029
+ .pipe(takeUntilDestroyed(this.dr))
2030
+ .subscribe(() => {
2031
+ this.reset();
2032
+ });
2033
+ // TODO: 2, 3 column is torn away from the previous one, fixed by calling update
2034
+ this.dataSource.data$
2035
+ .pipe(filter((v) => !!v?.length), first$1(), delay(100), takeUntilDestroyed(this.dr))
2036
+ .subscribe(() => {
2037
+ this.table.updateStickyColumnStyles();
2038
+ });
2039
+ }
2040
+ load() {
2041
+ if (this.isPreload()) {
2042
+ this.isPreload.set(false);
2043
+ }
2044
+ this.reload();
2045
+ }
2046
+ preload() {
2047
+ if (!this.isPreload()) {
2048
+ this.isPreload.set(true);
2049
+ this.reload();
2050
+ }
2051
+ else if (this.hasMore()) {
2052
+ this.more.emit({ size: this.loadSize() });
2053
+ }
2054
+ }
2055
+ showMore() {
2056
+ this.dataSource.paginator.more();
2057
+ if (this.hasMore() && this.dataSource.paginator.pageSize > this.dataSource.data.length) {
2058
+ this.more.emit({ size: this.loadSize() });
2059
+ }
2060
+ this.refreshTable();
2061
+ }
2062
+ downloadCsv() {
2063
+ this.generateCsvData()
2064
+ .pipe(takeUntilDestroyed(this.dr))
2065
+ .subscribe((csvData) => {
2066
+ downloadFile(csvData, 'csv');
2067
+ });
2068
+ }
2069
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2070
+ drop(event) {
2071
+ this.dragDisabled = true;
2072
+ this.filteredSortData$.pipe(filter(Boolean), first$1()).subscribe((data) => {
2073
+ const item = event.item.data;
2074
+ const { previousIndex, currentIndex } = event;
2075
+ const previousData = data;
2076
+ const currentData = previousData.slice();
2077
+ let currentDataIndex = 0;
2078
+ if (previousIndex > currentIndex) {
2079
+ currentData.splice(previousIndex, 1);
2080
+ currentData.splice(currentIndex, 0, event.item.data);
2081
+ currentDataIndex = currentIndex;
2082
+ }
2083
+ else {
2084
+ currentData.splice(currentIndex, 0, event.item.data);
2085
+ currentData.splice(previousIndex, 1);
2086
+ currentDataIndex = currentIndex - 1;
2087
+ }
2088
+ this.rowDropped.emit({
2089
+ previousIndex,
2090
+ currentIndex,
2091
+ item,
2092
+ previousData,
2093
+ currentData,
2094
+ currentDataIndex,
2095
+ sort: this?.sortComponent,
2096
+ });
2097
+ });
2098
+ }
2099
+ generateCsvData() {
2100
+ return combineLatest([
2101
+ this.displayedNormColumns$.pipe(switchMap((cols) => forkJoin(cols.map((c) => c.header.pipe(take(1)))))),
2102
+ this.columnsData$.pipe(take(1)),
2103
+ ]).pipe(map(([cols, data]) => createCsv(runInInjectionContext(this.injector, () => tableToCsvObject(cols, data)))));
2104
+ }
2105
+ reload() {
2106
+ this.update$.next({ size: this.loadSize() });
2107
+ this.reset();
2108
+ }
2109
+ updateSortFilter(filtered) {
2110
+ this.filteredSortData$.next(filtered);
2111
+ this.dataSource.sortData = () => filtered;
2112
+ this.dataSource.sort = this.sortComponent;
2113
+ }
2114
+ reset() {
2115
+ this.scrollViewport?.nativeElement?.scrollTo?.({ top: 0 });
2116
+ this.dataSource.paginator.reload();
2117
+ this.refreshTable();
2118
+ }
2119
+ // TODO: Refresh table when pagination is updated
2120
+ refreshTable() {
2121
+ // eslint-disable-next-line no-self-assign
2122
+ this.dataSource.data = this.dataSource.data;
2123
+ }
2124
+ updateLoadedLazyItems(items) {
2125
+ const lazyLoadedItems = items.slice(0, DEFAULT_LOADED_LAZY_ROWS_COUNT);
2126
+ for (const item of lazyLoadedItems) {
2127
+ this.loadedLazyItems.set(item, true);
2128
+ }
2129
+ }
2130
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TableComponent, deps: [{ token: i0.DestroyRef }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
2131
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: TableComponent, isStandalone: false, selector: "v-table", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, treeData: { classPropertyName: "treeData", publicName: "treeData", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, progress: { classPropertyName: "progress", publicName: "progress", isSignal: true, isRequired: false, transformFunction: null }, hasMore: { classPropertyName: "hasMore", publicName: "hasMore", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, maxSize: { classPropertyName: "maxSize", publicName: "maxSize", isSignal: true, isRequired: false, transformFunction: null }, noDownload: { classPropertyName: "noDownload", publicName: "noDownload", isSignal: true, isRequired: false, transformFunction: null }, noToolbar: { classPropertyName: "noToolbar", publicName: "noToolbar", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, standaloneFilter: { classPropertyName: "standaloneFilter", publicName: "standaloneFilter", isSignal: true, isRequired: false, transformFunction: null }, externalFilter: { classPropertyName: "externalFilter", publicName: "externalFilter", isSignal: true, isRequired: false, transformFunction: null }, rowSelectable: { classPropertyName: "rowSelectable", publicName: "rowSelectable", isSignal: true, isRequired: false, transformFunction: null }, rowSelected: { classPropertyName: "rowSelected", publicName: "rowSelected", isSignal: true, isRequired: false, transformFunction: null }, sort: { classPropertyName: "sort", publicName: "sort", isSignal: true, isRequired: false, transformFunction: null }, rowDragDrop: { classPropertyName: "rowDragDrop", publicName: "rowDragDrop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filter: "filterChange", rowSelected: "rowSelectedChange", sort: "sortChange", rowDropped: "rowDropped", update: "update", more: "more" }, queries: [{ propertyName: "tableInputsContent", first: true, predicate: TableInputsComponent, descendants: true, read: ElementRef }], viewQueries: [{ propertyName: "sortComponent", first: true, predicate: MatSort, descendants: true }, { propertyName: "scrollViewport", first: true, predicate: ["scrollViewport"], descendants: true, read: ElementRef }, { propertyName: "table", first: true, predicate: ["matTable"], descendants: true }, { propertyName: "tableRow", first: true, predicate: MatRow, descendants: true }], ngImport: i0, template: "@let columnsData = columnsData$$ | async;\n\n<div class=\"wrapper\">\n <v-table-info-bar\n [(filter)]=\"filter\"\n [columns]=\"normColumns()\"\n [count]=\"(dataSource.data$ | async)?.length\"\n [dataProgress]=\"!!(columnsDataProgress$ | async) && !hasMore()\"\n [filteredCount]=\"displayedCount$ | async\"\n [hasInputs]=\"!!tableInputsContent?.nativeElement\"\n [hasLoad]=\"update$.observed\"\n [hasMore]=\"hasMore()\"\n [isPreload]=\"isPreload()\"\n [noDownload]=\"noDownload()\"\n [noToolbar]=\"noToolbar()\"\n [preloadSize]=\"maxSize()\"\n [progress]=\"progress()\"\n [selectedCount]=\"rowSelected()?.length\"\n [size]=\"size()\"\n [standaloneFilter]=\"standaloneFilter()\"\n (downloadCsv)=\"downloadCsv()\"\n (load)=\"load()\"\n (preload)=\"preload()\"\n >\n <ng-content select=\"v-table-actions\"></ng-content>\n <v-table-inputs><ng-content select=\"v-table-inputs\"></ng-content></v-table-inputs>\n </v-table-info-bar>\n <mat-card #scrollViewport class=\"card\">\n <v-no-records\n [noRecords]=\"!(displayedCount$ | async)\"\n [progress]=\"progress()\"\n ></v-no-records>\n <table\n #matTable\n [cdkDropListDisabled]=\"dragDisabled\"\n [dataSource]=\"dataSource\"\n [matSortActive]=\"(columnsDataProgress$ | async) || progress() ? '' : sort().active\"\n [matSortDirection]=\"sort().direction\"\n cdkDropList\n cdkDropListData=\"dataSource\"\n mat-table\n matSort\n (cdkDropListDropped)=\"drop($event)\"\n (matSortChange)=\"sort.set($event)\"\n >\n @let displayedColumns = (displayedColumns$ | async) || [];\n\n @if (displayedColumns.includes(columnDefs.drag)) {\n <v-dnd-column\n [name]=\"columnDefs.drag\"\n (dragged)=\"dragDisabled = false\"\n ></v-dnd-column>\n }\n @if (displayedColumns.includes(columnDefs.select)) {\n <v-select-column\n [(selected)]=\"rowSelected\"\n [data]=\"displayedData$ | async\"\n [name]=\"columnDefs.select\"\n [progress]=\"progress()\"\n ></v-select-column>\n }\n @for (col of displayedNormColumns$ | async; track col; let colIndex = $index) {\n @let stickyStart = col.params.sticky === 'start';\n @let stickyEnd = col.params.sticky === 'end';\n @let columnClasses =\n {\n column: true,\n 'column__sticky-start': stickyStart,\n 'column__sticky-end': stickyEnd,\n };\n <ng-container\n [matColumnDef]=\"col.field\"\n [sticky]=\"stickyStart\"\n [stickyEnd]=\"stickyEnd\"\n >\n <th\n *matHeaderCellDef\n [disabled]=\"(col.sort | async) === false || hasMore() || progress()\"\n [mat-sort-header]=\"col.field\"\n [ngClass]=\"columnClasses\"\n mat-header-cell\n >\n <v-value [value]=\"col?.header | async\" emptySymbol=\"\" inline></v-value>\n </th>\n\n <ng-template let-element let-rowIndex=\"index\" matCellDef>\n @let cell = columnsData?.get?.(element)?.get(col);\n <td\n [ngClass]=\"columnClasses\"\n [ngStyle]=\"col?.params?.style\"\n [style.border-bottom]=\"cell?.isNextChild && !col.child ? 'none' : ''\"\n mat-cell\n >\n <v-value\n [emptySymbol]=\"!(cell?.isChild && !col?.child)\"\n [highlight]=\"filter$ | async\"\n [lazyValue]=\"cell?.lazyValue\"\n [lazyVisible]=\"loadedLazyItems.has(element)\"\n [value]=\"cell?.value | async\"\n inline\n (lazyVisibleChange)=\"loadedLazyItems.set(element, true)\"\n ></v-value>\n </td>\n </ng-template>\n <td *matFooterCellDef [ngClass]=\"columnClasses\" mat-footer-cell>\n <v-content-loading></v-content-loading>\n </td>\n </ng-container>\n }\n\n <tr *matHeaderRowDef=\"displayedColumns$ | async; sticky: true\" mat-header-row></tr>\n <tr\n *matRowDef=\"let row; columns: displayedColumns$ | async\"\n [cdkDragData]=\"row\"\n cdkDrag\n mat-row\n ></tr>\n <tr\n *matFooterRowDef=\"displayedColumns$ | async\"\n [ngClass]=\"{ row__hidden: !(hasAutoShowMore$ | async) || !tableRow }\"\n [vInfinityScroll]=\"!progress()\"\n mat-footer-row\n (vInfinityScrollMore)=\"showMore()\"\n ></tr>\n </table>\n </mat-card>\n</div>\n", styles: [":host{min-height:0}.wrapper{display:grid;grid-template-columns:1fr;grid-template-rows:max-content;gap:24px;height:100%}.wrapper .card{width:100%;height:100%;min-height:300px;overflow:auto;transform:translateZ(0)}.wrapper .card ::ng-deep .mdc-data-table__row:last-child .mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, rgba(0, 0, 0, .12))!important;border-bottom-width:var(--mat-table-row-item-outline-width, 1px)!important;border-bottom-style:solid!important}table ::ng-deep .cdk-drag-placeholder,::ng-deep .cdk-drag-preview ::ng-deep .cdk-drag-placeholder{background:#eee}table .column,::ng-deep .cdk-drag-preview .column{max-width:max(20px,30vw)}table .column__sticky-start,table .column__sticky-end,::ng-deep .cdk-drag-preview .column__sticky-start,::ng-deep .cdk-drag-preview .column__sticky-end{width:0}table .column__sticky-start,::ng-deep .cdk-drag-preview .column__sticky-start{border-right:1px solid}table .column__sticky-end,::ng-deep .cdk-drag-preview .column__sticky-end{border-left:1px solid}table .row__hidden,::ng-deep .cdk-drag-preview .row__hidden{display:none}::ng-deep .cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;background:#fff!important;display:flex!important;align-items:center}::ng-deep .cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}::ng-deep .cdk-drop-list-dragging ::ng-deep .mat-mdc-row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}::ng-deep .cdk-drag-preview ::ng-deep td{border:none!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2$4.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i2$4.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2$4.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i2$4.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2$4.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2$4.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i2$4.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i2$4.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i2$4.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2$4.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i2$4.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i2$4.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i2$4.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i2$4.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: ValueComponent, selector: "v-value", inputs: ["value", "lazyValue", "lazyVisible", "progress", "inline", "emptySymbol", "highlight"], outputs: ["lazyVisibleChange"] }, { kind: "component", type: NoRecordsComponent, selector: "v-no-records", inputs: ["noRecords", "progress"] }, { kind: "component", type: ContentLoadingComponent, selector: "v-content-loading", inputs: ["width", "textSize", "hiddenText"] }, { kind: "directive", type: InfinityScrollDirective, selector: "[vInfinityScroll]", inputs: ["vInfinityScroll"], outputs: ["vInfinityScrollMore"] }, { kind: "component", type: SelectColumnComponent, selector: "v-select-column", inputs: ["selected", "data", "progress"], outputs: ["selectedChange"] }, { kind: "directive", type: i9.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i9.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: i10.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i10.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "component", type: DndColumnComponent, selector: "v-dnd-column", outputs: ["dragged"] }, { kind: "component", type: TableInfoBarComponent, selector: "v-table-info-bar", inputs: ["progress", "hasMore", "hasLoad", "isPreload", "noDownload", "noToolbar", "dataProgress", "columns", "size", "preloadSize", "count", "filteredCount", "selectedCount", "filter", "standaloneFilter", "hasInputs"], outputs: ["filterChange", "downloadCsv", "load", "preload"] }, { kind: "component", type: TableInputsComponent, selector: "v-table-inputs" }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2132
+ }
2133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TableComponent, decorators: [{
2134
+ type: Component,
2135
+ args: [{ selector: 'v-table', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "@let columnsData = columnsData$$ | async;\n\n<div class=\"wrapper\">\n <v-table-info-bar\n [(filter)]=\"filter\"\n [columns]=\"normColumns()\"\n [count]=\"(dataSource.data$ | async)?.length\"\n [dataProgress]=\"!!(columnsDataProgress$ | async) && !hasMore()\"\n [filteredCount]=\"displayedCount$ | async\"\n [hasInputs]=\"!!tableInputsContent?.nativeElement\"\n [hasLoad]=\"update$.observed\"\n [hasMore]=\"hasMore()\"\n [isPreload]=\"isPreload()\"\n [noDownload]=\"noDownload()\"\n [noToolbar]=\"noToolbar()\"\n [preloadSize]=\"maxSize()\"\n [progress]=\"progress()\"\n [selectedCount]=\"rowSelected()?.length\"\n [size]=\"size()\"\n [standaloneFilter]=\"standaloneFilter()\"\n (downloadCsv)=\"downloadCsv()\"\n (load)=\"load()\"\n (preload)=\"preload()\"\n >\n <ng-content select=\"v-table-actions\"></ng-content>\n <v-table-inputs><ng-content select=\"v-table-inputs\"></ng-content></v-table-inputs>\n </v-table-info-bar>\n <mat-card #scrollViewport class=\"card\">\n <v-no-records\n [noRecords]=\"!(displayedCount$ | async)\"\n [progress]=\"progress()\"\n ></v-no-records>\n <table\n #matTable\n [cdkDropListDisabled]=\"dragDisabled\"\n [dataSource]=\"dataSource\"\n [matSortActive]=\"(columnsDataProgress$ | async) || progress() ? '' : sort().active\"\n [matSortDirection]=\"sort().direction\"\n cdkDropList\n cdkDropListData=\"dataSource\"\n mat-table\n matSort\n (cdkDropListDropped)=\"drop($event)\"\n (matSortChange)=\"sort.set($event)\"\n >\n @let displayedColumns = (displayedColumns$ | async) || [];\n\n @if (displayedColumns.includes(columnDefs.drag)) {\n <v-dnd-column\n [name]=\"columnDefs.drag\"\n (dragged)=\"dragDisabled = false\"\n ></v-dnd-column>\n }\n @if (displayedColumns.includes(columnDefs.select)) {\n <v-select-column\n [(selected)]=\"rowSelected\"\n [data]=\"displayedData$ | async\"\n [name]=\"columnDefs.select\"\n [progress]=\"progress()\"\n ></v-select-column>\n }\n @for (col of displayedNormColumns$ | async; track col; let colIndex = $index) {\n @let stickyStart = col.params.sticky === 'start';\n @let stickyEnd = col.params.sticky === 'end';\n @let columnClasses =\n {\n column: true,\n 'column__sticky-start': stickyStart,\n 'column__sticky-end': stickyEnd,\n };\n <ng-container\n [matColumnDef]=\"col.field\"\n [sticky]=\"stickyStart\"\n [stickyEnd]=\"stickyEnd\"\n >\n <th\n *matHeaderCellDef\n [disabled]=\"(col.sort | async) === false || hasMore() || progress()\"\n [mat-sort-header]=\"col.field\"\n [ngClass]=\"columnClasses\"\n mat-header-cell\n >\n <v-value [value]=\"col?.header | async\" emptySymbol=\"\" inline></v-value>\n </th>\n\n <ng-template let-element let-rowIndex=\"index\" matCellDef>\n @let cell = columnsData?.get?.(element)?.get(col);\n <td\n [ngClass]=\"columnClasses\"\n [ngStyle]=\"col?.params?.style\"\n [style.border-bottom]=\"cell?.isNextChild && !col.child ? 'none' : ''\"\n mat-cell\n >\n <v-value\n [emptySymbol]=\"!(cell?.isChild && !col?.child)\"\n [highlight]=\"filter$ | async\"\n [lazyValue]=\"cell?.lazyValue\"\n [lazyVisible]=\"loadedLazyItems.has(element)\"\n [value]=\"cell?.value | async\"\n inline\n (lazyVisibleChange)=\"loadedLazyItems.set(element, true)\"\n ></v-value>\n </td>\n </ng-template>\n <td *matFooterCellDef [ngClass]=\"columnClasses\" mat-footer-cell>\n <v-content-loading></v-content-loading>\n </td>\n </ng-container>\n }\n\n <tr *matHeaderRowDef=\"displayedColumns$ | async; sticky: true\" mat-header-row></tr>\n <tr\n *matRowDef=\"let row; columns: displayedColumns$ | async\"\n [cdkDragData]=\"row\"\n cdkDrag\n mat-row\n ></tr>\n <tr\n *matFooterRowDef=\"displayedColumns$ | async\"\n [ngClass]=\"{ row__hidden: !(hasAutoShowMore$ | async) || !tableRow }\"\n [vInfinityScroll]=\"!progress()\"\n mat-footer-row\n (vInfinityScrollMore)=\"showMore()\"\n ></tr>\n </table>\n </mat-card>\n</div>\n", styles: [":host{min-height:0}.wrapper{display:grid;grid-template-columns:1fr;grid-template-rows:max-content;gap:24px;height:100%}.wrapper .card{width:100%;height:100%;min-height:300px;overflow:auto;transform:translateZ(0)}.wrapper .card ::ng-deep .mdc-data-table__row:last-child .mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, rgba(0, 0, 0, .12))!important;border-bottom-width:var(--mat-table-row-item-outline-width, 1px)!important;border-bottom-style:solid!important}table ::ng-deep .cdk-drag-placeholder,::ng-deep .cdk-drag-preview ::ng-deep .cdk-drag-placeholder{background:#eee}table .column,::ng-deep .cdk-drag-preview .column{max-width:max(20px,30vw)}table .column__sticky-start,table .column__sticky-end,::ng-deep .cdk-drag-preview .column__sticky-start,::ng-deep .cdk-drag-preview .column__sticky-end{width:0}table .column__sticky-start,::ng-deep .cdk-drag-preview .column__sticky-start{border-right:1px solid}table .column__sticky-end,::ng-deep .cdk-drag-preview .column__sticky-end{border-left:1px solid}table .row__hidden,::ng-deep .cdk-drag-preview .row__hidden{display:none}::ng-deep .cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;background:#fff!important;display:flex!important;align-items:center}::ng-deep .cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}::ng-deep .cdk-drop-list-dragging ::ng-deep .mat-mdc-row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}::ng-deep .cdk-drag-preview ::ng-deep td{border:none!important}\n"] }]
2136
+ }], ctorParameters: () => [{ type: i0.DestroyRef }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }], propDecorators: { sortComponent: [{
2137
+ type: ViewChild,
2138
+ args: [MatSort]
2139
+ }], scrollViewport: [{
2140
+ type: ViewChild,
2141
+ args: ['scrollViewport', { read: ElementRef }]
2142
+ }], table: [{
2143
+ type: ViewChild,
2144
+ args: ['matTable', { static: false }]
2145
+ }], tableInputsContent: [{
2146
+ type: ContentChild,
2147
+ args: [TableInputsComponent, { read: ElementRef }]
2148
+ }], tableRow: [{
2149
+ type: ViewChild,
2150
+ args: [MatRow, { static: false }]
2151
+ }] } });
2152
+
2153
+ class CustomizeComponent extends DialogSuperclass {
2154
+ constructor() {
2155
+ super(...arguments);
2156
+ this.columns = [
2157
+ { field: 'priority', header: 'Number' },
2158
+ { field: 'name' },
2159
+ { field: 'hidden' },
2160
+ ];
2161
+ this.data = this.dialogData.columns.map((c, idx) => ({
2162
+ priority: idx + 1,
2163
+ name: c.field,
2164
+ hidden: false,
2165
+ }));
2166
+ }
2167
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: CustomizeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2168
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: CustomizeComponent, isStandalone: false, selector: "v-customize", usesInheritance: true, ngImport: i0, template: "<v-dialog title=\"Customize table\">\n <v-table [columns]=\"columns\" [data]=\"data\" [rowDragDrop]=\"['priority']\" noToolbar></v-table>\n <v-dialog-actions>\n <button mat-button>Save</button>\n </v-dialog-actions>\n</v-dialog>\n", dependencies: [{ kind: "component", type: i1$4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: DialogComponent, selector: "v-dialog", inputs: ["title", "disabled", "progress", "hasDivider", "noContent", "noActions", "noCloseButton", "fullSize"], outputs: ["cancel"] }, { kind: "component", type: DialogActionsComponent, selector: "v-dialog-actions" }, { kind: "component", type: TableComponent, selector: "v-table", inputs: ["data", "treeData", "columns", "progress", "hasMore", "size", "maxSize", "noDownload", "noToolbar", "filter", "standaloneFilter", "externalFilter", "rowSelectable", "rowSelected", "sort", "rowDragDrop"], outputs: ["filterChange", "rowSelectedChange", "sortChange", "rowDropped", "update", "more"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2169
+ }
2170
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: CustomizeComponent, decorators: [{
2171
+ type: Component,
2172
+ args: [{ selector: 'v-customize', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<v-dialog title=\"Customize table\">\n <v-table [columns]=\"columns\" [data]=\"data\" [rowDragDrop]=\"['priority']\" noToolbar></v-table>\n <v-dialog-actions>\n <button mat-button>Save</button>\n </v-dialog-actions>\n</v-dialog>\n" }]
2173
+ }] });
2174
+
2175
+ class TableActionsComponent {
2176
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TableActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2177
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: TableActionsComponent, isStandalone: false, selector: "v-table-actions", ngImport: i0, template: `
2178
+ <v-actions>
2179
+ <ng-content></ng-content>
2180
+ </v-actions>
2181
+ `, isInline: true, dependencies: [{ kind: "component", type: ActionsComponent, selector: "v-actions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2182
+ }
2183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TableActionsComponent, decorators: [{
2184
+ type: Component,
2185
+ args: [{
2186
+ selector: 'v-table-actions',
2187
+ template: `
2188
+ <v-actions>
2189
+ <ng-content></ng-content>
2190
+ </v-actions>
2191
+ `,
2192
+ changeDetection: ChangeDetectionStrategy.OnPush,
2193
+ standalone: false,
2194
+ }]
2195
+ }] });
2196
+
2197
+ class TableProgressBarComponent {
2198
+ constructor() {
2199
+ this.progress = input(false, { transform: booleanAttribute });
2200
+ }
2201
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TableProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2202
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: TableProgressBarComponent, isStandalone: true, selector: "v-table-progress-bar", inputs: { progress: { classPropertyName: "progress", publicName: "progress", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
2203
+ @if (progress()) {
2204
+ <mat-progress-bar class="progress-bar" mode="indeterminate"></mat-progress-bar>
2205
+ }
2206
+ `, isInline: true, styles: [".progress-bar{position:absolute;z-index:999}\n"], dependencies: [{ kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }] }); }
2207
+ }
2208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TableProgressBarComponent, decorators: [{
2209
+ type: Component,
2210
+ args: [{ selector: 'v-table-progress-bar', imports: [MatProgressBar], template: `
2211
+ @if (progress()) {
2212
+ <mat-progress-bar class="progress-bar" mode="indeterminate"></mat-progress-bar>
2213
+ }
2214
+ `, styles: [".progress-bar{position:absolute;z-index:999}\n"] }]
2215
+ }] });
2216
+
2217
+ class TableModule {
2218
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2219
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: TableModule, declarations: [CustomizeComponent,
2220
+ TableComponent,
2221
+ TableInfoBarComponent,
2222
+ TableInputsComponent,
2223
+ TableActionsComponent], imports: [CommonModule,
2224
+ MatTableModule,
2225
+ MatCardModule,
2226
+ ValueComponent,
2227
+ TableProgressBarComponent,
2228
+ NoRecordsComponent,
2229
+ ContentLoadingComponent,
2230
+ MatIcon,
2231
+ MatTooltip,
2232
+ MatIconButton,
2233
+ InfinityScrollDirective,
2234
+ ValueListComponent,
2235
+ SelectColumnComponent,
2236
+ ProgressModule,
2237
+ MatSortModule,
2238
+ MatButton,
2239
+ CdkDrag,
2240
+ CdkDropList,
2241
+ DialogModule,
2242
+ MatButtonModule,
2243
+ InputFieldModule,
2244
+ ActionsModule,
2245
+ MatBadgeModule,
2246
+ ReactiveFormsModule,
2247
+ TagModule,
2248
+ DndColumnComponent], exports: [TableComponent, TableInputsComponent, TableActionsComponent] }); }
2249
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TableModule, imports: [CommonModule,
2250
+ MatTableModule,
2251
+ MatCardModule,
2252
+ ValueComponent,
2253
+ TableProgressBarComponent,
2254
+ ContentLoadingComponent,
2255
+ MatIcon,
2256
+ MatIconButton,
2257
+ ValueListComponent,
2258
+ SelectColumnComponent,
2259
+ ProgressModule,
2260
+ MatSortModule,
2261
+ MatButton,
2262
+ DialogModule,
2263
+ MatButtonModule,
2264
+ InputFieldModule,
2265
+ ActionsModule,
2266
+ MatBadgeModule,
2267
+ ReactiveFormsModule,
2268
+ TagModule,
2269
+ DndColumnComponent] }); }
2270
+ }
2271
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TableModule, decorators: [{
2272
+ type: NgModule,
2273
+ args: [{
2274
+ imports: [
2275
+ CommonModule,
2276
+ MatTableModule,
2277
+ MatCardModule,
2278
+ ValueComponent,
2279
+ TableProgressBarComponent,
2280
+ NoRecordsComponent,
2281
+ ContentLoadingComponent,
2282
+ MatIcon,
2283
+ MatTooltip,
2284
+ MatIconButton,
2285
+ InfinityScrollDirective,
2286
+ ValueListComponent,
2287
+ SelectColumnComponent,
2288
+ ProgressModule,
2289
+ MatSortModule,
2290
+ MatButton,
2291
+ CdkDrag,
2292
+ CdkDropList,
2293
+ DialogModule,
2294
+ MatButtonModule,
2295
+ InputFieldModule,
2296
+ ActionsModule,
2297
+ MatBadgeModule,
2298
+ ReactiveFormsModule,
2299
+ TagModule,
2300
+ DndColumnComponent,
2301
+ ],
2302
+ declarations: [
2303
+ CustomizeComponent,
2304
+ TableComponent,
2305
+ TableInfoBarComponent,
2306
+ TableInputsComponent,
2307
+ TableActionsComponent,
2308
+ ],
2309
+ exports: [TableComponent, TableInputsComponent, TableActionsComponent],
2310
+ }]
2311
+ }] });
2312
+
2313
+ function correctPriorities(priorities, opts = {
2314
+ step: 1000,
2315
+ maxStep: 1000,
2316
+ start: 0,
2317
+ }) {
2318
+ if (!priorities.length) {
2319
+ return [];
2320
+ }
2321
+ const res = [opts.start];
2322
+ for (let i = 1; i < priorities.length; ++i) {
2323
+ const last = res.at(-1) ?? opts.start;
2324
+ if (priorities[i] === priorities[i - 1]) {
2325
+ res.push(last);
2326
+ }
2327
+ else if (priorities[i] <= last || priorities[i] > last + opts.maxStep) {
2328
+ res.push(last + opts.step);
2329
+ }
2330
+ else {
2331
+ res.push(priorities[i]);
2332
+ }
2333
+ }
2334
+ return res;
2335
+ }
2336
+
2337
+ function createColumn(createCell, columnObject = {}) {
2338
+ return (getCellParams, { isLazyCell, ...column } = {}) => {
2339
+ const injector = inject(Injector);
2340
+ const field = column?.field ?? createUniqueColumnDef(column?.header);
2341
+ const cellKey = isLazyCell ? 'lazyCell' : 'cell';
2342
+ return {
2343
+ field,
2344
+ ...columnObject,
2345
+ ...column,
2346
+ [cellKey]: (...cellArgs) => {
2347
+ const cellValue$ = getPossiblyAsyncObservable(getCellParams(...cellArgs)).pipe(switchMap((cellParams) => getPossiblyAsyncObservable(runInInjectionContext(injector, () => createCell(cellParams, ...cellArgs)))));
2348
+ if (column[cellKey]) {
2349
+ const columnCellValue$ = normalizeCell(field, column[cellKey], !!column?.child)(...cellArgs);
2350
+ return combineLatest([cellValue$, columnCellValue$]).pipe(map(([a, b]) => Object.assign({}, a, b, { value: b?.value || a?.value })));
2351
+ }
2352
+ return cellValue$;
2353
+ },
2354
+ };
2355
+ };
2356
+ }
2357
+
2358
+ const createMenuColumn = createColumn((params) => {
2359
+ return {
2360
+ type: 'menu',
2361
+ params,
2362
+ };
2363
+ }, {
2364
+ field: 'menu',
2365
+ header: '',
2366
+ sticky: 'end',
2367
+ style: {
2368
+ padding: 0,
2369
+ width: '0',
2370
+ },
2371
+ });
2372
+
2373
+ class ConfirmDialogComponent extends DialogSuperclass {
2374
+ constructor() {
2375
+ super(...arguments);
2376
+ this.control = new FormControl('', { nonNullable: true });
2377
+ }
2378
+ confirm() {
2379
+ this.closeWithSuccess(this.dialogData && this.dialogData?.hasReason
2380
+ ? { reason: this.control.value }
2381
+ : undefined);
2382
+ }
2383
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ConfirmDialogComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2384
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: ConfirmDialogComponent, isStandalone: false, selector: "v-action-dialog", usesInheritance: true, ngImport: i0, template: "<v-dialog\n [noContent]=\"!(dialogData && (dialogData.hasReason || dialogData.description))\"\n [title]=\"dialogData?.['title'] ?? 'Confirm this action?'\"\n noCloseButton\n>\n @if (dialogData && dialogData.description) {\n <div class=\"mat-body-large\">\n {{ dialogData.description }}\n </div>\n }\n @if (dialogData && dialogData.hasReason) {\n <mat-form-field style=\"width: 100%\">\n <mat-label>Reason</mat-label>\n <input [formControl]=\"control\" matInput />\n </mat-form-field>\n }\n <v-dialog-actions>\n <button mat-button (click)=\"closeWithCancellation()\">Cancel</button>\n <button mat-flat-button (click)=\"confirm()\">\n {{ dialogData?.['confirmLabel'] || 'Confirm' }}\n </button>\n </v-dialog-actions>\n</v-dialog>\n", dependencies: [{ kind: "component", type: i1$4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: DialogComponent, selector: "v-dialog", inputs: ["title", "disabled", "progress", "hasDivider", "noContent", "noActions", "noCloseButton", "fullSize"], outputs: ["cancel"] }, { kind: "component", type: DialogActionsComponent, selector: "v-dialog-actions" }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2385
+ }
2386
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ConfirmDialogComponent, decorators: [{
2387
+ type: Component,
2388
+ args: [{ selector: 'v-action-dialog', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<v-dialog\n [noContent]=\"!(dialogData && (dialogData.hasReason || dialogData.description))\"\n [title]=\"dialogData?.['title'] ?? 'Confirm this action?'\"\n noCloseButton\n>\n @if (dialogData && dialogData.description) {\n <div class=\"mat-body-large\">\n {{ dialogData.description }}\n </div>\n }\n @if (dialogData && dialogData.hasReason) {\n <mat-form-field style=\"width: 100%\">\n <mat-label>Reason</mat-label>\n <input [formControl]=\"control\" matInput />\n </mat-form-field>\n }\n <v-dialog-actions>\n <button mat-button (click)=\"closeWithCancellation()\">Cancel</button>\n <button mat-flat-button (click)=\"confirm()\">\n {{ dialogData?.['confirmLabel'] || 'Confirm' }}\n </button>\n </v-dialog-actions>\n</v-dialog>\n" }]
2389
+ }] });
2390
+
2391
+ class ConfirmDialogModule {
2392
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ConfirmDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2393
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: ConfirmDialogModule, declarations: [ConfirmDialogComponent], imports: [MatDialogModule,
2394
+ MatButtonModule,
2395
+ DialogModule,
2396
+ MatFormFieldModule,
2397
+ CommonModule,
2398
+ MatInputModule,
2399
+ ReactiveFormsModule], exports: [ConfirmDialogComponent] }); }
2400
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ConfirmDialogModule, imports: [MatDialogModule,
2401
+ MatButtonModule,
2402
+ DialogModule,
2403
+ MatFormFieldModule,
2404
+ CommonModule,
2405
+ MatInputModule,
2406
+ ReactiveFormsModule] }); }
2407
+ }
2408
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ConfirmDialogModule, decorators: [{
2409
+ type: NgModule,
2410
+ args: [{
2411
+ imports: [
2412
+ MatDialogModule,
2413
+ MatButtonModule,
2414
+ DialogModule,
2415
+ MatFormFieldModule,
2416
+ CommonModule,
2417
+ MatInputModule,
2418
+ ReactiveFormsModule,
2419
+ ],
2420
+ declarations: [ConfirmDialogComponent],
2421
+ exports: [ConfirmDialogComponent],
2422
+ }]
2423
+ }] });
2424
+
2425
+ class FiltersDialogComponent extends DialogSuperclass {
2426
+ get isShowMainFilters() {
2427
+ return (!this.dialogData.filters.otherFiltersDirective?.templateRef ||
2428
+ this.dialogData.filters.merge);
2429
+ }
2430
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FiltersDialogComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2431
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: FiltersDialogComponent, isStandalone: false, selector: "v-filters-dialog", usesInheritance: true, ngImport: i0, template: "<v-dialog noActions title=\"Filters\">\n <div\n [ngClass]=\"[\n 'v-filters-dialog-cols-' +\n (isShowMainFilters ? (dialogData.filters.repeat$ | async) : 1),\n 'filters',\n ]\"\n >\n @if (isShowMainFilters) {\n <ng-container *ngTemplateOutlet=\"dialogData.filters.mainFiltersTemplate\"></ng-container>\n }\n @if (dialogData.filters.otherFiltersTemplate) {\n <div class=\"other-filters\">\n <ng-container\n *ngTemplateOutlet=\"dialogData.filters.otherFiltersTemplate\"\n ></ng-container>\n </div>\n }\n </div>\n</v-dialog>\n", styles: [".filters{display:grid;grid-template-columns:1fr}.filters .other-filters{display:block!important}::ng-deep .v-filters-dialog-cols-1>*:nth-child(-n+1){display:none}::ng-deep .v-filters-dialog-cols-2>*:nth-child(-n+2){display:none}::ng-deep .v-filters-dialog-cols-3>*:nth-child(-n+3){display:none}::ng-deep .v-filters-dialog-cols-4>*:nth-child(-n+4){display:none}::ng-deep .v-filters-dialog-cols-5>*:nth-child(-n+5){display:none}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DialogComponent, selector: "v-dialog", inputs: ["title", "disabled", "progress", "hasDivider", "noContent", "noActions", "noCloseButton", "fullSize"], outputs: ["cancel"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] }); }
2432
+ }
2433
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FiltersDialogComponent, decorators: [{
2434
+ type: Component,
2435
+ args: [{ selector: 'v-filters-dialog', standalone: false, template: "<v-dialog noActions title=\"Filters\">\n <div\n [ngClass]=\"[\n 'v-filters-dialog-cols-' +\n (isShowMainFilters ? (dialogData.filters.repeat$ | async) : 1),\n 'filters',\n ]\"\n >\n @if (isShowMainFilters) {\n <ng-container *ngTemplateOutlet=\"dialogData.filters.mainFiltersTemplate\"></ng-container>\n }\n @if (dialogData.filters.otherFiltersTemplate) {\n <div class=\"other-filters\">\n <ng-container\n *ngTemplateOutlet=\"dialogData.filters.otherFiltersTemplate\"\n ></ng-container>\n </div>\n }\n </div>\n</v-dialog>\n", styles: [".filters{display:grid;grid-template-columns:1fr}.filters .other-filters{display:block!important}::ng-deep .v-filters-dialog-cols-1>*:nth-child(-n+1){display:none}::ng-deep .v-filters-dialog-cols-2>*:nth-child(-n+2){display:none}::ng-deep .v-filters-dialog-cols-3>*:nth-child(-n+3){display:none}::ng-deep .v-filters-dialog-cols-4>*:nth-child(-n+4){display:none}::ng-deep .v-filters-dialog-cols-5>*:nth-child(-n+5){display:none}\n"] }]
2436
+ }] });
2437
+
2438
+ class MainFiltersDirective {
2439
+ constructor(templateRef) {
2440
+ this.templateRef = templateRef;
2441
+ }
2442
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MainFiltersDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
2443
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: MainFiltersDirective, isStandalone: false, selector: "[vMainFilters]", ngImport: i0 }); }
2444
+ }
2445
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MainFiltersDirective, decorators: [{
2446
+ type: Directive,
2447
+ args: [{
2448
+ selector: '[vMainFilters]',
2449
+ standalone: false,
2450
+ }]
2451
+ }], ctorParameters: () => [{ type: i0.TemplateRef }] });
2452
+
2453
+ class OtherFiltersDirective {
2454
+ constructor(templateRef) {
2455
+ this.templateRef = templateRef;
2456
+ }
2457
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: OtherFiltersDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
2458
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: OtherFiltersDirective, isStandalone: false, selector: "[vOtherFilters]", ngImport: i0 }); }
2459
+ }
2460
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: OtherFiltersDirective, decorators: [{
2461
+ type: Directive,
2462
+ args: [{
2463
+ selector: '[vOtherFilters]',
2464
+ standalone: false,
2465
+ }]
2466
+ }], ctorParameters: () => [{ type: i0.TemplateRef }] });
2467
+
2468
+ class FiltersComponent {
2469
+ set content(content) {
2470
+ this.filtersCount$.next(content?.nativeElement?.children?.length ?? 0);
2471
+ }
2472
+ get mainFiltersTemplate() {
2473
+ return this.mainFiltersDirective?.templateRef ?? this.filtersTemplate;
2474
+ }
2475
+ get otherFiltersTemplate() {
2476
+ return this.otherFiltersDirective?.templateRef;
2477
+ }
2478
+ constructor(dialog, breakpointObserver) {
2479
+ this.dialog = dialog;
2480
+ this.breakpointObserver = breakpointObserver;
2481
+ this.active = 0;
2482
+ this.merge = false;
2483
+ // TODO: to change from outside you need to change the logic and set $rows in two SCSS
2484
+ this.rows = signal(1);
2485
+ this.clear = new EventEmitter();
2486
+ this.repeat$ = this.breakpointObserver.observe(Object.values(Breakpoints)).pipe(map((b) => {
2487
+ if (b.breakpoints[Breakpoints.XLarge]) {
2488
+ return 5;
2489
+ }
2490
+ if (b.breakpoints[Breakpoints.Large]) {
2491
+ return 4;
2492
+ }
2493
+ if (b.breakpoints[Breakpoints.Medium]) {
2494
+ return 3;
2495
+ }
2496
+ if (b.breakpoints[Breakpoints.Small]) {
2497
+ return 2;
2498
+ }
2499
+ return 1;
2500
+ }));
2501
+ this.displayedFiltersCount$ = combineLatest([this.repeat$, toObservable(this.rows)]).pipe(map(([repeat, rows]) => repeat * rows));
2502
+ this.filtersCount$ = new BehaviorSubject(0);
2503
+ }
2504
+ open() {
2505
+ this.dialog.open(FiltersDialogComponent, { filters: this });
2506
+ }
2507
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FiltersComponent, deps: [{ token: DialogService }, { token: i2$6.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Component }); }
2508
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.2", type: FiltersComponent, isStandalone: false, selector: "v-filters", inputs: { active: "active", merge: ["merge", "merge", booleanAttribute] }, outputs: { clear: "clear" }, queries: [{ propertyName: "filtersTemplate", first: true, predicate: TemplateRef, descendants: true, static: true }, { propertyName: "otherFiltersDirective", first: true, predicate: OtherFiltersDirective, descendants: true, static: true }, { propertyName: "mainFiltersDirective", first: true, predicate: MainFiltersDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true }], ngImport: i0, template: "<mat-card>\n <mat-card-content #content [ngClass]=\"['v-filters-cols-' + (repeat$ | async), 'filters']\">\n <ng-container *ngTemplateOutlet=\"mainFiltersTemplate\"></ng-container>\n </mat-card-content>\n</mat-card>\n", styles: [".filters{display:grid;grid-column-gap:8px;margin-bottom:-22px;padding:22px!important}::ng-deep .filters>*{min-width:0}::ng-deep .v-filters-cols-1{grid-template-columns:repeat(1,1fr)}::ng-deep .v-filters-cols-1>*:nth-child(n+2){display:none}::ng-deep .v-filters-cols-2{grid-template-columns:repeat(2,1fr)}::ng-deep .v-filters-cols-2>*:nth-child(n+3){display:none}::ng-deep .v-filters-cols-3{grid-template-columns:repeat(3,1fr)}::ng-deep .v-filters-cols-3>*:nth-child(n+4){display:none}::ng-deep .v-filters-cols-4{grid-template-columns:repeat(4,1fr)}::ng-deep .v-filters-cols-4>*:nth-child(n+5){display:none}::ng-deep .v-filters-cols-5{grid-template-columns:repeat(5,1fr)}::ng-deep .v-filters-cols-5>*:nth-child(n+6){display:none}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] }); }
2509
+ }
2510
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FiltersComponent, decorators: [{
2511
+ type: Component,
2512
+ args: [{ selector: 'v-filters', standalone: false, template: "<mat-card>\n <mat-card-content #content [ngClass]=\"['v-filters-cols-' + (repeat$ | async), 'filters']\">\n <ng-container *ngTemplateOutlet=\"mainFiltersTemplate\"></ng-container>\n </mat-card-content>\n</mat-card>\n", styles: [".filters{display:grid;grid-column-gap:8px;margin-bottom:-22px;padding:22px!important}::ng-deep .filters>*{min-width:0}::ng-deep .v-filters-cols-1{grid-template-columns:repeat(1,1fr)}::ng-deep .v-filters-cols-1>*:nth-child(n+2){display:none}::ng-deep .v-filters-cols-2{grid-template-columns:repeat(2,1fr)}::ng-deep .v-filters-cols-2>*:nth-child(n+3){display:none}::ng-deep .v-filters-cols-3{grid-template-columns:repeat(3,1fr)}::ng-deep .v-filters-cols-3>*:nth-child(n+4){display:none}::ng-deep .v-filters-cols-4{grid-template-columns:repeat(4,1fr)}::ng-deep .v-filters-cols-4>*:nth-child(n+5){display:none}::ng-deep .v-filters-cols-5{grid-template-columns:repeat(5,1fr)}::ng-deep .v-filters-cols-5>*:nth-child(n+6){display:none}\n"] }]
2513
+ }], ctorParameters: () => [{ type: DialogService }, { type: i2$6.BreakpointObserver }], propDecorators: { active: [{
2514
+ type: Input
2515
+ }], merge: [{
2516
+ type: Input,
2517
+ args: [{ transform: booleanAttribute }]
2518
+ }], clear: [{
2519
+ type: Output
2520
+ }], filtersTemplate: [{
2521
+ type: ContentChild,
2522
+ args: [TemplateRef, { static: true }]
2523
+ }], otherFiltersDirective: [{
2524
+ type: ContentChild,
2525
+ args: [OtherFiltersDirective, { static: true }]
2526
+ }], mainFiltersDirective: [{
2527
+ type: ContentChild,
2528
+ args: [MainFiltersDirective, { static: true }]
2529
+ }], content: [{
2530
+ type: ViewChild,
2531
+ args: ['content']
2532
+ }] } });
2533
+
2534
+ class MoreFiltersButtonComponent {
2535
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MoreFiltersButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2536
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: MoreFiltersButtonComponent, isStandalone: false, selector: "v-more-filters-button", inputs: { filters: "filters" }, ngImport: i0, template: "<v-actions>\n @if (filters.active && filters.clear.observed) {\n <button mat-icon-button (click)=\"filters.clear.emit()\">\n <mat-icon [matBadge]=\"filters.active || undefined\" matBadgeColor=\"accent\"\n >restart_alt</mat-icon\n >\n </button>\n }\n @if (\n filters.otherFiltersDirective ||\n ((filters.filtersCount$ | async) ?? 0) - ((filters.displayedFiltersCount$ | async) ?? 0) > 0\n ) {\n <button mat-icon-button (click)=\"filters.open()\">\n <mat-icon>filter_alt</mat-icon>\n </button>\n }\n</v-actions>\n", styles: [""], dependencies: [{ kind: "component", type: i1$4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: ActionsComponent, selector: "v-actions" }, { kind: "directive", type: i6.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] }); }
2537
+ }
2538
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MoreFiltersButtonComponent, decorators: [{
2539
+ type: Component,
2540
+ args: [{ selector: 'v-more-filters-button', standalone: false, template: "<v-actions>\n @if (filters.active && filters.clear.observed) {\n <button mat-icon-button (click)=\"filters.clear.emit()\">\n <mat-icon [matBadge]=\"filters.active || undefined\" matBadgeColor=\"accent\"\n >restart_alt</mat-icon\n >\n </button>\n }\n @if (\n filters.otherFiltersDirective ||\n ((filters.filtersCount$ | async) ?? 0) - ((filters.displayedFiltersCount$ | async) ?? 0) > 0\n ) {\n <button mat-icon-button (click)=\"filters.open()\">\n <mat-icon>filter_alt</mat-icon>\n </button>\n }\n</v-actions>\n" }]
2541
+ }], propDecorators: { filters: [{
2542
+ type: Input
2543
+ }] } });
2544
+
2545
+ class FiltersModule {
2546
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FiltersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2547
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: FiltersModule, declarations: [FiltersComponent,
2548
+ MoreFiltersButtonComponent,
2549
+ FiltersDialogComponent,
2550
+ OtherFiltersDirective,
2551
+ MainFiltersDirective], imports: [CommonModule,
2552
+ MatCardModule,
2553
+ MatButtonModule,
2554
+ MatIconModule,
2555
+ DialogModule,
2556
+ LayoutModule,
2557
+ ActionsModule,
2558
+ MatBadgeModule], exports: [FiltersComponent,
2559
+ MoreFiltersButtonComponent,
2560
+ OtherFiltersDirective,
2561
+ MainFiltersDirective] }); }
2562
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FiltersModule, imports: [CommonModule,
2563
+ MatCardModule,
2564
+ MatButtonModule,
2565
+ MatIconModule,
2566
+ DialogModule,
2567
+ LayoutModule,
2568
+ ActionsModule,
2569
+ MatBadgeModule] }); }
2570
+ }
2571
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FiltersModule, decorators: [{
2572
+ type: NgModule,
2573
+ args: [{
2574
+ declarations: [
2575
+ FiltersComponent,
2576
+ MoreFiltersButtonComponent,
2577
+ FiltersDialogComponent,
2578
+ OtherFiltersDirective,
2579
+ MainFiltersDirective,
2580
+ ],
2581
+ exports: [
2582
+ FiltersComponent,
2583
+ MoreFiltersButtonComponent,
2584
+ OtherFiltersDirective,
2585
+ MainFiltersDirective,
2586
+ ],
2587
+ imports: [
2588
+ CommonModule,
2589
+ MatCardModule,
2590
+ MatButtonModule,
2591
+ MatIconModule,
2592
+ DialogModule,
2593
+ LayoutModule,
2594
+ ActionsModule,
2595
+ MatBadgeModule,
2596
+ ],
2597
+ }]
2598
+ }] });
2599
+
2600
+ class DateRangeFieldComponent extends FormGroupSuperclass {
2601
+ constructor(fb) {
2602
+ super();
2603
+ this.fb = fb;
2604
+ this.required = false;
2605
+ this.control = this.fb.group({
2606
+ start: undefined,
2607
+ end: undefined,
2608
+ });
2609
+ }
2610
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DateRangeFieldComponent, deps: [{ token: i1$3.NonNullableFormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
2611
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: DateRangeFieldComponent, isStandalone: false, selector: "v-date-range-field", inputs: { required: ["required", "required", booleanAttribute] }, providers: [
2612
+ ...createControlProviders(() => DateRangeFieldComponent),
2613
+ { provide: MAT_DATE_LOCALE, useValue: enGB },
2614
+ { provide: DateAdapter, useClass: DateFnsAdapter, deps: [MAT_DATE_LOCALE] },
2615
+ { provide: MAT_DATE_FORMATS, useValue: MAT_DATE_FNS_FORMATS },
2616
+ ], usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>Date range</mat-label>\n <mat-date-range-input\n [formGroup]=\"control\"\n [rangePicker]=\"picker\"\n [required]=\"required || false\"\n >\n <input formControlName=\"start\" matStartDate placeholder=\"Start date\" />\n <input formControlName=\"end\" matEndDate placeholder=\"End date\" />\n </mat-date-range-input>\n <mat-datepicker-toggle [for]=\"picker\" matIconSuffix></mat-datepicker-toggle>\n <mat-date-range-picker #picker>\n <mat-date-range-picker-actions>\n <v-actions class=\"actions\">\n @if (!required) {\n <button\n [disabled]=\"!control.value?.start && !control.value?.end\"\n mat-button\n (click)=\"control.reset(); picker.close()\"\n >\n Reset\n </button>\n }\n <button mat-flat-button matDateRangePickerApply>Apply</button>\n </v-actions>\n </mat-date-range-picker-actions>\n </mat-date-range-picker>\n</mat-form-field>\n", styles: [":host{overflow:hidden}mat-form-field{width:100%}::ng-deep .mat-mdc-form-field-infix{width:auto!important}input{text-overflow:ellipsis}.actions{width:100%}\n"], dependencies: [{ kind: "component", type: i2$7.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i2$7.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i2$7.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i2$7.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i2$7.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "component", type: i2$7.MatDatepickerActions, selector: "mat-datepicker-actions, mat-date-range-picker-actions" }, { kind: "directive", type: i2$7.MatDatepickerApply, selector: "[matDatepickerApply], [matDateRangePickerApply]" }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i1$4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: ActionsComponent, selector: "v-actions" }] }); }
2617
+ }
2618
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DateRangeFieldComponent, decorators: [{
2619
+ type: Component,
2620
+ args: [{ selector: 'v-date-range-field', providers: [
2621
+ ...createControlProviders(() => DateRangeFieldComponent),
2622
+ { provide: MAT_DATE_LOCALE, useValue: enGB },
2623
+ { provide: DateAdapter, useClass: DateFnsAdapter, deps: [MAT_DATE_LOCALE] },
2624
+ { provide: MAT_DATE_FORMATS, useValue: MAT_DATE_FNS_FORMATS },
2625
+ ], standalone: false, template: "<mat-form-field>\n <mat-label>Date range</mat-label>\n <mat-date-range-input\n [formGroup]=\"control\"\n [rangePicker]=\"picker\"\n [required]=\"required || false\"\n >\n <input formControlName=\"start\" matStartDate placeholder=\"Start date\" />\n <input formControlName=\"end\" matEndDate placeholder=\"End date\" />\n </mat-date-range-input>\n <mat-datepicker-toggle [for]=\"picker\" matIconSuffix></mat-datepicker-toggle>\n <mat-date-range-picker #picker>\n <mat-date-range-picker-actions>\n <v-actions class=\"actions\">\n @if (!required) {\n <button\n [disabled]=\"!control.value?.start && !control.value?.end\"\n mat-button\n (click)=\"control.reset(); picker.close()\"\n >\n Reset\n </button>\n }\n <button mat-flat-button matDateRangePickerApply>Apply</button>\n </v-actions>\n </mat-date-range-picker-actions>\n </mat-date-range-picker>\n</mat-form-field>\n", styles: [":host{overflow:hidden}mat-form-field{width:100%}::ng-deep .mat-mdc-form-field-infix{width:auto!important}input{text-overflow:ellipsis}.actions{width:100%}\n"] }]
2626
+ }], ctorParameters: () => [{ type: i1$3.NonNullableFormBuilder }], propDecorators: { required: [{
2627
+ type: Input,
2628
+ args: [{ transform: booleanAttribute }]
2629
+ }] } });
2630
+
2631
+ class DateRangeFieldModule {
2632
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DateRangeFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2633
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: DateRangeFieldModule, declarations: [DateRangeFieldComponent], imports: [CommonModule,
2634
+ MatDatepickerModule,
2635
+ MatInputModule,
2636
+ ReactiveFormsModule,
2637
+ MatButtonModule,
2638
+ ActionsModule], exports: [DateRangeFieldComponent] }); }
2639
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DateRangeFieldModule, imports: [CommonModule,
2640
+ MatDatepickerModule,
2641
+ MatInputModule,
2642
+ ReactiveFormsModule,
2643
+ MatButtonModule,
2644
+ ActionsModule] }); }
2645
+ }
2646
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DateRangeFieldModule, decorators: [{
2647
+ type: NgModule,
2648
+ args: [{
2649
+ declarations: [DateRangeFieldComponent],
2650
+ imports: [
2651
+ CommonModule,
2652
+ MatDatepickerModule,
2653
+ MatInputModule,
2654
+ ReactiveFormsModule,
2655
+ MatButtonModule,
2656
+ ActionsModule,
2657
+ ],
2658
+ exports: [DateRangeFieldComponent],
2659
+ }]
2660
+ }] });
2661
+
2662
+ function isEqualDateRange(a, b) {
2663
+ if (!a || !b) {
2664
+ return a === b;
2665
+ }
2666
+ return isEqual$2(a.start, b.start) && isEqual$2(a.end, b.end);
2667
+ }
2668
+
2669
+ function createDateRangeToToday(minDays = 1) {
2670
+ return {
2671
+ /**
2672
+ * If we take the beginning of the previous day to the end of the current one,
2673
+ * then it is guaranteed that there will be an interval of one day,
2674
+ * as a maximum of two days
2675
+ */
2676
+ start: subDays(startOfDay(new Date()), minDays),
2677
+ end: endOfDay(new Date()),
2678
+ };
2679
+ }
2680
+
2681
+ class NumberRangeFieldComponent extends FormGroupSuperclass {
2682
+ constructor(fb) {
2683
+ super();
2684
+ this.fb = fb;
2685
+ this.control = this.fb.group({
2686
+ start: undefined,
2687
+ end: undefined,
2688
+ });
2689
+ }
2690
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NumberRangeFieldComponent, deps: [{ token: i1$3.NonNullableFormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
2691
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: NumberRangeFieldComponent, isStandalone: false, selector: "v-number-range-field", inputs: { label: "label" }, providers: createControlProviders(() => NumberRangeFieldComponent), usesInheritance: true, ngImport: i0, template: "<div [formGroup]=\"control\" class=\"wrapper\">\n <mat-form-field>\n <mat-label>{{ label }} from</mat-label>\n <input formControlName=\"start\" matInput type=\"number\" />\n </mat-form-field>\n <mat-form-field>\n <mat-label>{{ label }} to</mat-label>\n <input formControlName=\"end\" matInput type=\"number\" />\n </mat-form-field>\n</div>\n", styles: [".wrapper{display:grid;grid-template-columns:1fr 1fr;grid-gap:8px}\n"], dependencies: [{ kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }] }); }
2692
+ }
2693
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NumberRangeFieldComponent, decorators: [{
2694
+ type: Component,
2695
+ args: [{ selector: 'v-number-range-field', providers: createControlProviders(() => NumberRangeFieldComponent), standalone: false, template: "<div [formGroup]=\"control\" class=\"wrapper\">\n <mat-form-field>\n <mat-label>{{ label }} from</mat-label>\n <input formControlName=\"start\" matInput type=\"number\" />\n </mat-form-field>\n <mat-form-field>\n <mat-label>{{ label }} to</mat-label>\n <input formControlName=\"end\" matInput type=\"number\" />\n </mat-form-field>\n</div>\n", styles: [".wrapper{display:grid;grid-template-columns:1fr 1fr;grid-gap:8px}\n"] }]
2696
+ }], ctorParameters: () => [{ type: i1$3.NonNullableFormBuilder }], propDecorators: { label: [{
2697
+ type: Input
2698
+ }] } });
2699
+
2700
+ class NumberRangeFieldModule {
2701
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NumberRangeFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2702
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: NumberRangeFieldModule, declarations: [NumberRangeFieldComponent], imports: [ReactiveFormsModule, MatInputModule], exports: [NumberRangeFieldComponent] }); }
2703
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NumberRangeFieldModule, imports: [ReactiveFormsModule, MatInputModule] }); }
2704
+ }
2705
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NumberRangeFieldModule, decorators: [{
2706
+ type: NgModule,
2707
+ args: [{
2708
+ declarations: [NumberRangeFieldComponent],
2709
+ imports: [ReactiveFormsModule, MatInputModule],
2710
+ exports: [NumberRangeFieldComponent],
2711
+ }]
2712
+ }] });
2713
+
2714
+ class ListFieldComponent extends FormControlSuperclass {
2715
+ constructor() {
2716
+ super(...arguments);
2717
+ this.items$ = getValueChanges(this.control).pipe(map((v) => this.getValue(v)), shareReplay({ refCount: true, bufferSize: 1 }));
2718
+ }
2719
+ innerToOuterValue(inner) {
2720
+ return this.getValue(inner);
2721
+ }
2722
+ outerToInnerValue(outer) {
2723
+ return (outer || []).join(', ');
2724
+ }
2725
+ getValue(inner = this.control.value) {
2726
+ return splitBySeparators(inner || '');
2727
+ }
2728
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ListFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2729
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: ListFieldComponent, isStandalone: false, selector: "v-list-field", inputs: { label: "label", focusedHint: "focusedHint" }, providers: createControlProviders(() => ListFieldComponent), usesInheritance: true, ngImport: i0, template: "<mat-form-field style=\"width: 100%\">\n <mat-label>{{ label }}</mat-label>\n <input #input=\"matInput\" [formControl]=\"control\" autocomplete=\"false\" matInput type=\"string\" />\n <mat-hint class=\"mat-secondary-text\">{{\n (items$ | async)?.length\n ? (items$ | async)?.length === 1\n ? '1 item'\n : (items$ | async)?.length + ' items'\n : input.focused\n ? focusedHint || 'item_1, item_2'\n : ''\n }}</mat-hint>\n</mat-form-field>\n", dependencies: [{ kind: "directive", type: i2$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] }); }
2730
+ }
2731
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ListFieldComponent, decorators: [{
2732
+ type: Component,
2733
+ args: [{ selector: 'v-list-field', providers: createControlProviders(() => ListFieldComponent), standalone: false, template: "<mat-form-field style=\"width: 100%\">\n <mat-label>{{ label }}</mat-label>\n <input #input=\"matInput\" [formControl]=\"control\" autocomplete=\"false\" matInput type=\"string\" />\n <mat-hint class=\"mat-secondary-text\">{{\n (items$ | async)?.length\n ? (items$ | async)?.length === 1\n ? '1 item'\n : (items$ | async)?.length + ' items'\n : input.focused\n ? focusedHint || 'item_1, item_2'\n : ''\n }}</mat-hint>\n</mat-form-field>\n" }]
2734
+ }], propDecorators: { label: [{
2735
+ type: Input
2736
+ }], focusedHint: [{
2737
+ type: Input
2738
+ }] } });
2739
+
2740
+ class ListFieldModule {
2741
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ListFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2742
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: ListFieldModule, declarations: [ListFieldComponent], imports: [CommonModule, MatInputModule, ReactiveFormsModule], exports: [ListFieldComponent] }); }
2743
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ListFieldModule, imports: [CommonModule, MatInputModule, ReactiveFormsModule] }); }
2744
+ }
2745
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ListFieldModule, decorators: [{
2746
+ type: NgModule,
2747
+ args: [{
2748
+ declarations: [ListFieldComponent],
2749
+ exports: [ListFieldComponent],
2750
+ imports: [CommonModule, MatInputModule, ReactiveFormsModule],
2751
+ }]
2752
+ }] });
2753
+
2754
+ class ErrorPageComponent {
2755
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ErrorPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2756
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: ErrorPageComponent, isStandalone: false, selector: "ng-component", ngImport: i0, template: "<div class=\"error\">\n <div class=\"mat-display-small title\">\n <mat-icon>error</mat-icon>\n <div>Page not found</div>\n </div>\n <h2 class=\"mat-headline-small mat-secondary-text\">\n This page doesn't exist<br />or no permission to access this page\n </h2>\n</div>\n", styles: [".error{margin:0 auto;padding:96px 24px;text-align:center}.error .title{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:16px}.error .title mat-icon{font-size:40px;width:auto;height:auto}\n"], dependencies: [{ kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
2757
+ }
2758
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ErrorPageComponent, decorators: [{
2759
+ type: Component,
2760
+ args: [{ standalone: false, template: "<div class=\"error\">\n <div class=\"mat-display-small title\">\n <mat-icon>error</mat-icon>\n <div>Page not found</div>\n </div>\n <h2 class=\"mat-headline-small mat-secondary-text\">\n This page doesn't exist<br />or no permission to access this page\n </h2>\n</div>\n", styles: [".error{margin:0 auto;padding:96px 24px;text-align:center}.error .title{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:16px}.error .title mat-icon{font-size:40px;width:auto;height:auto}\n"] }]
2761
+ }] });
2762
+
2763
+ const ROUTES = [{ path: '', component: ErrorPageComponent }];
2764
+ class ErrorPageRoutingModule {
2765
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ErrorPageRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2766
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: ErrorPageRoutingModule, imports: [i1$6.RouterModule], exports: [RouterModule] }); }
2767
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ErrorPageRoutingModule, imports: [RouterModule.forChild(ROUTES), RouterModule] }); }
2768
+ }
2769
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ErrorPageRoutingModule, decorators: [{
2770
+ type: NgModule,
2771
+ args: [{
2772
+ imports: [RouterModule.forChild(ROUTES)],
2773
+ exports: [RouterModule],
2774
+ }]
2775
+ }] });
2776
+
2777
+ class ErrorPageModule {
2778
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ErrorPageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2779
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: ErrorPageModule, declarations: [ErrorPageComponent], imports: [ErrorPageRoutingModule, MatIconModule] }); }
2780
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ErrorPageModule, imports: [ErrorPageRoutingModule, MatIconModule] }); }
2781
+ }
2782
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ErrorPageModule, decorators: [{
2783
+ type: NgModule,
2784
+ args: [{
2785
+ imports: [ErrorPageRoutingModule, MatIconModule],
2786
+ declarations: [ErrorPageComponent],
2787
+ }]
2788
+ }] });
2789
+
2790
+ function isSearchOption(option, termLowerCase) {
2791
+ return (!!String(option.value)?.toLowerCase().includes?.(termLowerCase) ||
2792
+ !!option.label?.toLowerCase()?.includes(termLowerCase) ||
2793
+ !!option.description?.toLowerCase().includes?.(termLowerCase));
2794
+ }
2795
+ function searchOptions(options, term) {
2796
+ const termLowerCase = term.toLowerCase();
2797
+ return options?.filter?.((option) => isSearchOption(option, termLowerCase));
2798
+ }
2799
+
2800
+ function findOptionByValue(options, value) {
2801
+ return options?.find?.((o) => o.value === value);
2802
+ }
2803
+
2804
+ function getHintText(options, selected, hint, opts = {}) {
2805
+ if (!isNil(hint)) {
2806
+ return hint;
2807
+ }
2808
+ if (opts.multiple && options?.length > 1) {
2809
+ return (selected?.length || 0) + '/' + options.length;
2810
+ }
2811
+ if (!selected?.length) {
2812
+ return '';
2813
+ }
2814
+ const option = findOptionByValue(options, selected[0]);
2815
+ return opts.showLabel ? option?.label : option?.description;
2816
+ }
2817
+
2818
+ class SelectFieldComponent extends FormControlSuperclass {
2819
+ constructor() {
2820
+ super(...arguments);
2821
+ this.options = [];
2822
+ this.searchChange = new EventEmitter();
2823
+ this.appearance = 'fill';
2824
+ this.progress = false;
2825
+ this.externalSearch = false;
2826
+ this.multiple = false;
2827
+ this.required = false;
2828
+ this.searchStr = '';
2829
+ this.search = (term, item) => {
2830
+ return this.externalSearch || isSearchOption(item, term.toLowerCase());
2831
+ };
2832
+ }
2833
+ get hintText() {
2834
+ return getHintText(this.options, this.multiple ? this.control.value : [this.control.value], this.hint, {
2835
+ multiple: this.multiple,
2836
+ });
2837
+ }
2838
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SelectFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2839
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.2", type: SelectFieldComponent, isStandalone: false, selector: "v-select-field", inputs: { options: "options", appearance: "appearance", label: "label", hint: "hint", error: "error", progress: "progress", externalSearch: ["externalSearch", "externalSearch", booleanAttribute], multiple: ["multiple", "multiple", booleanAttribute], required: ["required", "required", booleanAttribute], size: "size" }, outputs: { searchChange: "searchChange" }, providers: createControlProviders(() => SelectFieldComponent), usesInheritance: true, ngImport: i0, template: "<mat-form-field [appearance]=\"appearance\" [ngClass]=\"{ 'v-input-field__small': size === 'small' }\">\n <mat-label>{{ label }}</mat-label>\n\n <mtx-select\n [closeOnSelect]=\"!multiple\"\n [formControl]=\"control\"\n [items]=\"options\"\n [loading]=\"progress\"\n [markFirst]=\"true\"\n [multiple]=\"multiple\"\n [notFoundText]=\"externalSearch && !searchStr ? 'Enter your search term' : 'No items found'\"\n [required]=\"required\"\n [searchable]=\"true\"\n [searchFn]=\"search\"\n [selectableGroup]=\"true\"\n [selectableGroupAsModel]=\"false\"\n bindLabel=\"label\"\n bindValue=\"value\"\n groupBy=\"type\"\n (clear)=\"searchChange.emit(''); searchStr = ''\"\n (search)=\"searchChange.emit($event.term); searchStr = $event.term\"\n >\n <ng-template let-index=\"index\" let-item=\"item\" let-item$=\"item$\" ng-optgroup-tmp>\n <mat-checkbox\n *ngIf=\"multiple; else text\"\n [ngModel]=\"item$.selected\"\n class=\"checkbox-option\"\n id=\"item-{{ index }}\"\n >\n {{ item.type | uppercase }}\n </mat-checkbox>\n <ng-template #text>\n {{ item.type | uppercase }}\n </ng-template>\n </ng-template>\n <ng-template let-index=\"index\" let-item=\"item\" let-item$=\"item$\" ng-option-tmp>\n <mat-checkbox\n *ngIf=\"multiple; else text\"\n [ngModel]=\"item$.selected\"\n class=\"checkbox-option\"\n id=\"item-{{ index }}\"\n >\n <ng-container *ngTemplateOutlet=\"text\"></ng-container>\n </mat-checkbox>\n <ng-template #text>\n <div class=\"label\">{{ item.label }}</div>\n <div\n *ngIf=\"item.description\"\n class=\"description mat-label-medium mat-secondary-text\"\n >\n {{ item.description }}\n </div>\n </ng-template>\n </ng-template>\n </mtx-select>\n\n <mat-hint>{{ hintText }}</mat-hint>\n <mat-error>{{ error }}</mat-error>\n</mat-form-field>\n", styles: ["::ng-deep .mat-mdc-form-field{width:100%}::ng-deep .mat-mdc-form-field>*{max-height:56px}::ng-deep .mat-mdc-form-field .ng-value-container{flex-wrap:nowrap!important;overflow-x:hidden}::ng-deep .ng-dropdown-panel.ng-select-bottom{margin-top:-4px}.checkbox-option{margin:-12px 0 -12px -8px}.label,.description{overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i3$2.MtxSelect, selector: "mtx-select", inputs: ["addTag", "addTagText", "appearance", "appendTo", "bindLabel", "bindValue", "closeOnSelect", "clearAllText", "clearable", "clearOnBackspace", "compareWith", "dropdownPosition", "groupBy", "groupValue", "bufferAmount", "selectableGroup", "selectableGroupAsModel", "hideSelected", "loading", "loadingText", "labelForId", "markFirst", "maxSelectedItems", "multiple", "notFoundText", "searchable", "readonly", "searchFn", "searchWhileComposing", "selectOnTab", "trackByFn", "inputAttrs", "tabIndex", "openOnEnter", "minTermLength", "editableSearchTerm", "keyDownFn", "virtualScroll", "typeToSearchText", "typeahead", "isOpen", "fixedPlaceholder", "deselectOnClick", "clearSearchOnAdd", "items", "value", "id", "placeholder", "disabled", "required", "errorStateMatcher", "aria-label", "aria-labelledby"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"], exportAs: ["mtxSelect"] }, { kind: "directive", type: i3$2.MtxSelectOptgroupTemplate, selector: "[ng-optgroup-tmp]" }, { kind: "directive", type: i3$2.MtxSelectOptionTemplate, selector: "[ng-option-tmp]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: i1$1.UpperCasePipe, name: "uppercase" }] }); }
2840
+ }
2841
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SelectFieldComponent, decorators: [{
2842
+ type: Component,
2843
+ args: [{ selector: 'v-select-field', providers: createControlProviders(() => SelectFieldComponent), standalone: false, template: "<mat-form-field [appearance]=\"appearance\" [ngClass]=\"{ 'v-input-field__small': size === 'small' }\">\n <mat-label>{{ label }}</mat-label>\n\n <mtx-select\n [closeOnSelect]=\"!multiple\"\n [formControl]=\"control\"\n [items]=\"options\"\n [loading]=\"progress\"\n [markFirst]=\"true\"\n [multiple]=\"multiple\"\n [notFoundText]=\"externalSearch && !searchStr ? 'Enter your search term' : 'No items found'\"\n [required]=\"required\"\n [searchable]=\"true\"\n [searchFn]=\"search\"\n [selectableGroup]=\"true\"\n [selectableGroupAsModel]=\"false\"\n bindLabel=\"label\"\n bindValue=\"value\"\n groupBy=\"type\"\n (clear)=\"searchChange.emit(''); searchStr = ''\"\n (search)=\"searchChange.emit($event.term); searchStr = $event.term\"\n >\n <ng-template let-index=\"index\" let-item=\"item\" let-item$=\"item$\" ng-optgroup-tmp>\n <mat-checkbox\n *ngIf=\"multiple; else text\"\n [ngModel]=\"item$.selected\"\n class=\"checkbox-option\"\n id=\"item-{{ index }}\"\n >\n {{ item.type | uppercase }}\n </mat-checkbox>\n <ng-template #text>\n {{ item.type | uppercase }}\n </ng-template>\n </ng-template>\n <ng-template let-index=\"index\" let-item=\"item\" let-item$=\"item$\" ng-option-tmp>\n <mat-checkbox\n *ngIf=\"multiple; else text\"\n [ngModel]=\"item$.selected\"\n class=\"checkbox-option\"\n id=\"item-{{ index }}\"\n >\n <ng-container *ngTemplateOutlet=\"text\"></ng-container>\n </mat-checkbox>\n <ng-template #text>\n <div class=\"label\">{{ item.label }}</div>\n <div\n *ngIf=\"item.description\"\n class=\"description mat-label-medium mat-secondary-text\"\n >\n {{ item.description }}\n </div>\n </ng-template>\n </ng-template>\n </mtx-select>\n\n <mat-hint>{{ hintText }}</mat-hint>\n <mat-error>{{ error }}</mat-error>\n</mat-form-field>\n", styles: ["::ng-deep .mat-mdc-form-field{width:100%}::ng-deep .mat-mdc-form-field>*{max-height:56px}::ng-deep .mat-mdc-form-field .ng-value-container{flex-wrap:nowrap!important;overflow-x:hidden}::ng-deep .ng-dropdown-panel.ng-select-bottom{margin-top:-4px}.checkbox-option{margin:-12px 0 -12px -8px}.label,.description{overflow:hidden;text-overflow:ellipsis}\n"] }]
2844
+ }], propDecorators: { options: [{
2845
+ type: Input
2846
+ }], searchChange: [{
2847
+ type: Output
2848
+ }], appearance: [{
2849
+ type: Input
2850
+ }], label: [{
2851
+ type: Input
2852
+ }], hint: [{
2853
+ type: Input
2854
+ }], error: [{
2855
+ type: Input
2856
+ }], progress: [{
2857
+ type: Input
2858
+ }], externalSearch: [{
2859
+ type: Input,
2860
+ args: [{ transform: booleanAttribute }]
2861
+ }], multiple: [{
2862
+ type: Input,
2863
+ args: [{ transform: booleanAttribute }]
2864
+ }], required: [{
2865
+ type: Input,
2866
+ args: [{ transform: booleanAttribute }]
2867
+ }], size: [{
2868
+ type: Input
2869
+ }] } });
2870
+
2871
+ class SelectFieldModule {
2872
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SelectFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2873
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: SelectFieldModule, declarations: [SelectFieldComponent], imports: [CommonModule,
2874
+ MatInputModule,
2875
+ MtxSelectModule,
2876
+ FormsModule,
2877
+ ReactiveFormsModule,
2878
+ MatCheckboxModule], exports: [SelectFieldComponent] }); }
2879
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SelectFieldModule, imports: [CommonModule,
2880
+ MatInputModule,
2881
+ MtxSelectModule,
2882
+ FormsModule,
2883
+ ReactiveFormsModule,
2884
+ MatCheckboxModule] }); }
2885
+ }
2886
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SelectFieldModule, decorators: [{
2887
+ type: NgModule,
2888
+ args: [{
2889
+ declarations: [SelectFieldComponent],
2890
+ exports: [SelectFieldComponent],
2891
+ imports: [
2892
+ CommonModule,
2893
+ MatInputModule,
2894
+ MtxSelectModule,
2895
+ FormsModule,
2896
+ ReactiveFormsModule,
2897
+ MatCheckboxModule,
2898
+ ],
2899
+ }]
2900
+ }] });
2901
+
2902
+ class AutocompleteFieldComponent extends FormControlSuperclass {
2903
+ constructor() {
2904
+ super(...arguments);
2905
+ this.options = [];
2906
+ this.type = 'text';
2907
+ this.mono = false;
2908
+ this.required = false;
2909
+ this.options$ = new BehaviorSubject([]);
2910
+ this.selected$ = merge(this.control.valueChanges, this.options$).pipe(map(() => (this.options || []).find((o) => o.value === this.control.value)), shareReplay({ refCount: true, bufferSize: 1 }));
2911
+ this.filteredOptions$ = merge(this.control.valueChanges, this.options$).pipe(map(() => String(this.control.value ?? '').toLowerCase()), map((filter) => searchOptions(this.options, filter)), shareReplay({ refCount: true, bufferSize: 1 }));
2912
+ }
2913
+ get hintText() {
2914
+ return getHintText(this.options, [this.control.value], this.hint, { showLabel: true });
2915
+ }
2916
+ ngOnChanges(changes) {
2917
+ super.ngOnChanges(changes);
2918
+ if (changes.options) {
2919
+ this.options$.next(this.options || []);
2920
+ }
2921
+ }
2922
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AutocompleteFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2923
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: AutocompleteFieldComponent, isStandalone: false, selector: "v-autocomplete-field", inputs: { options: "options", label: "label", hint: "hint", error: "error", type: "type", mono: ["mono", "mono", booleanAttribute], required: ["required", "required", booleanAttribute] }, providers: createControlProviders(() => AutocompleteFieldComponent), usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<mat-form-field style=\"width: 100%\">\n <mat-label>{{ label }}</mat-label>\n\n <input\n #trigger=\"matAutocompleteTrigger\"\n [formControl]=\"control\"\n [matAutocomplete]=\"auto\"\n [ngClass]=\"{ 'mat-mono': mono }\"\n [required]=\"required\"\n [type]=\"options?.length ? 'text' : type\"\n matInput\n />\n\n <mat-autocomplete #auto=\"matAutocomplete\" autoActiveFirstOption>\n @for (option of filteredOptions$ | async; track option) {\n <mat-option [value]=\"option.value\">\n <div [ngClass]=\"{ 'mat-mono': mono }\" class=\"label\">{{ option.label }}</div>\n @if (option.description) {\n <div\n [ngClass]=\"{ 'mat-mono': mono }\"\n class=\"description mat-label-medium mat-secondary-text\"\n >\n {{ option.description }}\n </div>\n }\n </mat-option>\n }\n </mat-autocomplete>\n\n <div matSuffix style=\"display: flex; gap: 4px\">\n @if (control.value) {\n <button mat-icon-button (click)=\"control.reset(); $event.stopPropagation()\">\n <mat-icon>clear</mat-icon>\n </button>\n }\n @if (options?.length) {\n <button\n mat-icon-button\n (click)=\"\n auto.isOpen ? trigger.closePanel() : trigger.openPanel();\n $event.stopPropagation()\n \"\n >\n <mat-icon>{{ auto.isOpen ? 'expand_less' : 'expand_more' }}</mat-icon>\n </button>\n }\n </div>\n <mat-hint>{{ hintText }}</mat-hint>\n <mat-error>{{\n error ??\n ((selected$ | async) ? (selected$ | async)?.label + (hint ? ' | ' + hint : '') : hint)\n }}</mat-error>\n</mat-form-field>\n", styles: [".label,.description{overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i6$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i1$4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] }); }
2924
+ }
2925
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AutocompleteFieldComponent, decorators: [{
2926
+ type: Component,
2927
+ args: [{ selector: 'v-autocomplete-field', providers: createControlProviders(() => AutocompleteFieldComponent), standalone: false, template: "<mat-form-field style=\"width: 100%\">\n <mat-label>{{ label }}</mat-label>\n\n <input\n #trigger=\"matAutocompleteTrigger\"\n [formControl]=\"control\"\n [matAutocomplete]=\"auto\"\n [ngClass]=\"{ 'mat-mono': mono }\"\n [required]=\"required\"\n [type]=\"options?.length ? 'text' : type\"\n matInput\n />\n\n <mat-autocomplete #auto=\"matAutocomplete\" autoActiveFirstOption>\n @for (option of filteredOptions$ | async; track option) {\n <mat-option [value]=\"option.value\">\n <div [ngClass]=\"{ 'mat-mono': mono }\" class=\"label\">{{ option.label }}</div>\n @if (option.description) {\n <div\n [ngClass]=\"{ 'mat-mono': mono }\"\n class=\"description mat-label-medium mat-secondary-text\"\n >\n {{ option.description }}\n </div>\n }\n </mat-option>\n }\n </mat-autocomplete>\n\n <div matSuffix style=\"display: flex; gap: 4px\">\n @if (control.value) {\n <button mat-icon-button (click)=\"control.reset(); $event.stopPropagation()\">\n <mat-icon>clear</mat-icon>\n </button>\n }\n @if (options?.length) {\n <button\n mat-icon-button\n (click)=\"\n auto.isOpen ? trigger.closePanel() : trigger.openPanel();\n $event.stopPropagation()\n \"\n >\n <mat-icon>{{ auto.isOpen ? 'expand_less' : 'expand_more' }}</mat-icon>\n </button>\n }\n </div>\n <mat-hint>{{ hintText }}</mat-hint>\n <mat-error>{{\n error ??\n ((selected$ | async) ? (selected$ | async)?.label + (hint ? ' | ' + hint : '') : hint)\n }}</mat-error>\n</mat-form-field>\n", styles: [".label,.description{overflow:hidden;text-overflow:ellipsis}\n"] }]
2928
+ }], propDecorators: { options: [{
2929
+ type: Input
2930
+ }], label: [{
2931
+ type: Input
2932
+ }], hint: [{
2933
+ type: Input
2934
+ }], error: [{
2935
+ type: Input
2936
+ }], type: [{
2937
+ type: Input
2938
+ }], mono: [{
2939
+ type: Input,
2940
+ args: [{ transform: booleanAttribute }]
2941
+ }], required: [{
2942
+ type: Input,
2943
+ args: [{ transform: booleanAttribute }]
2944
+ }] } });
2945
+
2946
+ class AutocompleteFieldModule {
2947
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AutocompleteFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2948
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: AutocompleteFieldModule, declarations: [AutocompleteFieldComponent], imports: [CommonModule,
2949
+ MatInputModule,
2950
+ FormsModule,
2951
+ ReactiveFormsModule,
2952
+ MatAutocompleteModule,
2953
+ MatButtonModule,
2954
+ MatIconModule], exports: [AutocompleteFieldComponent] }); }
2955
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AutocompleteFieldModule, imports: [CommonModule,
2956
+ MatInputModule,
2957
+ FormsModule,
2958
+ ReactiveFormsModule,
2959
+ MatAutocompleteModule,
2960
+ MatButtonModule,
2961
+ MatIconModule] }); }
2962
+ }
2963
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AutocompleteFieldModule, decorators: [{
2964
+ type: NgModule,
2965
+ args: [{
2966
+ declarations: [AutocompleteFieldComponent],
2967
+ exports: [AutocompleteFieldComponent],
2968
+ imports: [
2969
+ CommonModule,
2970
+ MatInputModule,
2971
+ FormsModule,
2972
+ ReactiveFormsModule,
2973
+ MatAutocompleteModule,
2974
+ MatButtonModule,
2975
+ MatIconModule,
2976
+ ],
2977
+ }]
2978
+ }] });
2979
+
2980
+ class ConfigServiceSuperclass {
2981
+ constructor(http) {
2982
+ this.http = http;
2983
+ }
2984
+ async init({ configUrl }) {
2985
+ this.config = await lastValueFrom(this.http.get(configUrl));
2986
+ }
2987
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ConfigServiceSuperclass, deps: [{ token: i1$7.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
2988
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ConfigServiceSuperclass }); }
2989
+ }
2990
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: ConfigServiceSuperclass, decorators: [{
2991
+ type: Injectable
2992
+ }], ctorParameters: () => [{ type: i1$7.HttpClient }] });
2993
+
2994
+ const DEFAULT_ERROR_NAME = 'Unknown error';
2995
+ class LogError {
2996
+ get name() {
2997
+ return String(this.source?.['name'] || DEFAULT_ERROR_NAME);
2998
+ }
2999
+ get message() {
3000
+ return String(this.source?.['message'] || this.name);
3001
+ }
3002
+ get cause() {
3003
+ return this.source?.['cause'];
3004
+ }
3005
+ get details() {
3006
+ return Object.fromEntries(Object.entries(this.source).filter(([k, v]) => k !== 'name' && k !== 'message' && v));
3007
+ }
3008
+ constructor(error) {
3009
+ this.source = (isObject$1(error)
3010
+ ? error
3011
+ : new Error(error ? String(error) : DEFAULT_ERROR_NAME));
3012
+ }
3013
+ getLogMessage(message) {
3014
+ return [
3015
+ message && `Caught error: ${message}`,
3016
+ this.name && `Name: ${this.name}`,
3017
+ this.message && `Message: ${this.message}`,
3018
+ Object.keys(this.details).length && JSON.stringify(this.details, null, 2),
3019
+ ]
3020
+ .filter(Boolean)
3021
+ .join('\n');
3022
+ }
3023
+ }
3024
+
3025
+ const DEFAULT_DURATION_MS = 3_000;
3026
+ const DEFAULT_ERROR_DURATION_MS = 10_000;
3027
+ const DEFAULT_TIMEOUT_MS = 10_000;
3028
+ class NotifyLogService {
3029
+ constructor(snackBar) {
3030
+ this.snackBar = snackBar;
3031
+ this.success = (message = 'Completed successfully') => {
3032
+ this.notify(message);
3033
+ };
3034
+ this.error = (errors, message) => {
3035
+ const logErrors = (Array.isArray(errors) ? errors : [errors]).map((e) => new LogError(e));
3036
+ message = message || (logErrors.length === 1 ? logErrors[0].message : DEFAULT_ERROR_NAME);
3037
+ this.subscribeWithTimeout(message, (msg) => {
3038
+ console.warn([`Caught error: ${msg}.`, ...logErrors.map((e) => e.getLogMessage())].join('\n'));
3039
+ });
3040
+ this.notify(message, DEFAULT_ERROR_DURATION_MS);
3041
+ };
3042
+ }
3043
+ createErrorOperation(operation, objectName) {
3044
+ return (err) => this.errorOperation(err, operation, objectName);
3045
+ }
3046
+ successOperation(operation, objectName) {
3047
+ let message;
3048
+ switch (operation) {
3049
+ case 'create':
3050
+ message = `${capitalize(objectName)} created successfully`;
3051
+ break;
3052
+ case 'receive':
3053
+ message = `${capitalize(objectName)} received successfully`;
3054
+ break;
3055
+ case 'update':
3056
+ message = `${capitalize(objectName)} updated successfully`;
3057
+ break;
3058
+ case 'delete':
3059
+ message = `${capitalize(objectName)} deleted successfully`;
3060
+ break;
3061
+ }
3062
+ this.success(message);
3063
+ }
3064
+ errorOperation(errors, operation, objectName) {
3065
+ let message;
3066
+ switch (operation) {
3067
+ case 'create':
3068
+ message = `Error creating ${objectName}`;
3069
+ break;
3070
+ case 'receive':
3071
+ message = `Error retrieving ${objectName}`;
3072
+ break;
3073
+ case 'update':
3074
+ message = `Error updating ${objectName}`;
3075
+ break;
3076
+ case 'delete':
3077
+ message = `Error deleting ${objectName}`;
3078
+ break;
3079
+ }
3080
+ this.error(errors, message);
3081
+ }
3082
+ notify(message, duration = DEFAULT_DURATION_MS) {
3083
+ this.subscribeWithTimeout(message, {
3084
+ next: (msg) => {
3085
+ this.snackBar.open(msg, 'OK', {
3086
+ duration,
3087
+ });
3088
+ },
3089
+ error: () => {
3090
+ // TODO: Default message
3091
+ },
3092
+ });
3093
+ }
3094
+ subscribeWithTimeout(possiblyAsync, subscribe) {
3095
+ getPossiblyAsyncObservable(possiblyAsync)
3096
+ .pipe(first$1(), timeout(DEFAULT_TIMEOUT_MS))
3097
+ .subscribe(subscribe);
3098
+ }
3099
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NotifyLogService, deps: [{ token: i1$8.MatSnackBar }], target: i0.ɵɵFactoryTarget.Injectable }); }
3100
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NotifyLogService, providedIn: 'root' }); }
3101
+ }
3102
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NotifyLogService, decorators: [{
3103
+ type: Injectable,
3104
+ args: [{ providedIn: 'root' }]
3105
+ }], ctorParameters: () => [{ type: i1$8.MatSnackBar }] });
3106
+
3107
+ class LogModule {
3108
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3109
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: LogModule, imports: [MatSnackBarModule] }); }
3110
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LogModule, providers: [NotifyLogService], imports: [MatSnackBarModule] }); }
3111
+ }
3112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LogModule, decorators: [{
3113
+ type: NgModule,
3114
+ args: [{
3115
+ imports: [MatSnackBarModule],
3116
+ providers: [NotifyLogService],
3117
+ }]
3118
+ }] });
3119
+
3120
+ const DEFAULT_SIZE = 25;
3121
+ class FetchSuperclass {
3122
+ constructor() {
3123
+ this.result$ = defer(() => this.state$).pipe(map$1(({ result }) => result));
3124
+ this.hasMore$ = defer(() => this.state$).pipe(map$1(({ continuationToken }) => !!continuationToken));
3125
+ this.isLoading$ = inProgressFrom(() => this.progress$, () => this.state$);
3126
+ this.fetch$ = new BehaviorSubject({ type: 'init' });
3127
+ this.progress$ = new BehaviorSubject(0);
3128
+ this.state$ = defer(() => {
3129
+ const resAction$ = this.fetch$.pipe(skipWhile((action) => action.type !== 'load'));
3130
+ return race(concat(resAction$.pipe(take(1), delay(1000)), resAction$), resAction$.pipe(skip(1)));
3131
+ }).pipe(tap((action) => {
3132
+ if (action.type === 'load') {
3133
+ this.skipPrevious$.next(true);
3134
+ }
3135
+ }), mergeScan((acc, action) => {
3136
+ const params = (action.type === 'load' ? action.params : acc.params);
3137
+ const size = action.size ?? acc.size;
3138
+ const continuationToken = action.type === 'more' ? acc.continuationToken : undefined;
3139
+ return this.fetch(params, { size, continuationToken }).pipe(...(action.type === 'load'
3140
+ ? [
3141
+ startWith({
3142
+ params,
3143
+ result: [],
3144
+ size,
3145
+ continuationToken: undefined,
3146
+ }),
3147
+ ]
3148
+ : []), map$1(({ result, continuationToken }) => ({
3149
+ params,
3150
+ result: action.type === 'load' || action.type === 'reload'
3151
+ ? result
3152
+ : [...(acc.result ?? []), ...result],
3153
+ size,
3154
+ continuationToken,
3155
+ })), progressTo(this.progress$), takeUntil(this.skipPrevious$));
3156
+ }, {
3157
+ size: DEFAULT_SIZE,
3158
+ result: [],
3159
+ }, 1), shareReplay({ bufferSize: 1, refCount: true }));
3160
+ this.skipPrevious$ = new Subject();
3161
+ }
3162
+ load(params, options = {}) {
3163
+ this.fetch$.next({ type: 'load', params, size: options.size });
3164
+ }
3165
+ reload(options = {}) {
3166
+ this.fetch$.next({ type: 'reload', size: options.size });
3167
+ }
3168
+ more() {
3169
+ this.fetch$.next({ type: 'more' });
3170
+ }
3171
+ }
3172
+ class SingleFetchSuperclass extends FetchSuperclass {
3173
+ constructor() {
3174
+ super(...arguments);
3175
+ this.more = () => undefined;
3176
+ }
3177
+ }
3178
+
3179
+ const DATE_QUERY_PARAMS_SERIALIZERS = [
3180
+ {
3181
+ id: 'date',
3182
+ serialize: (date) => date?.toISOString(),
3183
+ deserialize: (value) => new Date(value),
3184
+ recognize: (value) => value instanceof Date,
3185
+ },
3186
+ {
3187
+ id: 'dateRange',
3188
+ serialize: ({ start, end }) => `${start?.toISOString()}|${end?.toISOString()}`,
3189
+ deserialize: (value) => {
3190
+ const [start, end] = value.split('|').map((p) => (p ? new Date(p) : null));
3191
+ return { start, end };
3192
+ },
3193
+ recognize: (value) => {
3194
+ if (typeof value !== 'object') {
3195
+ return false;
3196
+ }
3197
+ const { start, end, ...other } = value;
3198
+ if (Object.keys(other).length) {
3199
+ return false;
3200
+ }
3201
+ return start instanceof Date || end instanceof Date;
3202
+ },
3203
+ },
3204
+ ];
3205
+
3206
+ const QUERY_PARAMS_SERIALIZERS = new InjectionToken('query params serializers');
3207
+
3208
+ function deserializeQueryParam(value, serializers = []) {
3209
+ const serializer = serializers
3210
+ .sort((a, b) => b.id.length - a.id.length)
3211
+ .find((s) => value.startsWith(s.id));
3212
+ return (serializer
3213
+ ? serializer.deserialize(value.slice(serializer.id.length))
3214
+ : JSON.parse(value || ''));
3215
+ }
3216
+
3217
+ function serializeQueryParam(value, serializers = []) {
3218
+ const serializer = serializers
3219
+ .sort((a, b) => b.id.length - a.id.length)
3220
+ .find((s) => s.recognize(value));
3221
+ return serializer ? serializer.id + serializer.serialize(value) : JSON.stringify(value);
3222
+ }
3223
+
3224
+ const NS_PARAM_PREFIX = '__';
3225
+ class QueryParamsService {
3226
+ get params() {
3227
+ return this.deserialize(this.getSourceParams().main);
3228
+ }
3229
+ constructor(router, route, serializers) {
3230
+ this.router = router;
3231
+ this.route = route;
3232
+ this.serializers = serializers;
3233
+ this.params$ = defer(() => this.sourceParams$).pipe(map(({ main }) => main), distinctUntilChanged(isEqual), map((params) => this.deserialize(params)), shareReplay({ refCount: true, bufferSize: 1 }));
3234
+ this.sourceParams$ = concat(this.router.events.pipe(startWith(null), skipWhile(() => !this.router.navigated), map(() => this.route.snapshot.queryParams), take(1)), this.route.queryParams).pipe(distinctUntilChanged(isEqual), map((p) => this.getSourceParams(p)), shareReplay({ refCount: true, bufferSize: 1 }));
3235
+ if (!this.serializers) {
3236
+ this.serializers = [];
3237
+ }
3238
+ }
3239
+ async set(params, options = {}) {
3240
+ return await this.setParams(params, undefined, options);
3241
+ }
3242
+ async patch(params, options = {}) {
3243
+ return await this.setParams(params, undefined, { ...options, isPatch: true });
3244
+ }
3245
+ createNamespace(ns) {
3246
+ const getNamespaceSourceParams = (sourceParams = this.getSourceParams()) => sourceParams.namespaces[NS_PARAM_PREFIX + ns];
3247
+ const getNamespaceParams = () => this.deserializeNamespace(getNamespaceSourceParams());
3248
+ return {
3249
+ params$: this.sourceParams$.pipe(map((sourceParams) => getNamespaceSourceParams(sourceParams)), distinctUntilChanged(isEqual), map((params) => this.deserializeNamespace(params)), shareReplay({ refCount: true, bufferSize: 1 })),
3250
+ get params() {
3251
+ return getNamespaceParams();
3252
+ },
3253
+ set: async (params, options = {}) => {
3254
+ return await this.setParams(params, ns, options);
3255
+ },
3256
+ patch: async (params, options = {}) => {
3257
+ return await this.setParams(params, ns, { ...options, isPatch: true });
3258
+ },
3259
+ destroy: async () => {
3260
+ await this.setParams({}, ns);
3261
+ },
3262
+ };
3263
+ }
3264
+ async setParams(params, ns, options = {}) {
3265
+ const sourceParams = this.getSourceParams();
3266
+ let queryParams;
3267
+ if (ns) {
3268
+ const nsKey = NS_PARAM_PREFIX + ns;
3269
+ const serializedNamespace = this.serializeNamespace(Object.assign({}, options.isPatch && this.deserializeNamespace(sourceParams.namespaces[nsKey]), params));
3270
+ const otherNamespaces = sourceParams.namespaces;
3271
+ delete otherNamespaces[nsKey];
3272
+ queryParams = Object.assign({}, sourceParams.main, otherNamespaces, !!serializedNamespace && { [nsKey]: serializedNamespace });
3273
+ }
3274
+ else {
3275
+ queryParams = Object.assign({}, options.isPatch && sourceParams.main, this.serialize(params), sourceParams.namespaces);
3276
+ }
3277
+ return await this.router.navigate([], { queryParams });
3278
+ }
3279
+ getSourceParams(source = this.route.snapshot.queryParams) {
3280
+ return Object.entries(source).reduce((acc, [k, v]) => {
3281
+ if (k.startsWith(NS_PARAM_PREFIX)) {
3282
+ acc.namespaces[k] = v;
3283
+ }
3284
+ else {
3285
+ acc.main[k] = v;
3286
+ }
3287
+ return acc;
3288
+ }, { main: {}, namespaces: {} });
3289
+ }
3290
+ serialize(params, options = {}) {
3291
+ const filter = options.filter ?? negate(isEmpty);
3292
+ return Object.entries(params).reduce((acc, [k, v]) => {
3293
+ if (filter(v, k)) {
3294
+ acc[k] = serializeQueryParam(v, this.serializers);
3295
+ }
3296
+ return acc;
3297
+ }, {});
3298
+ }
3299
+ deserialize(params) {
3300
+ if (!params) {
3301
+ return {};
3302
+ }
3303
+ return Object.entries(params).reduce((acc, [k, v]) => {
3304
+ try {
3305
+ acc[k] = deserializeQueryParam(v, this.serializers);
3306
+ }
3307
+ catch (err) {
3308
+ console.error(err);
3309
+ }
3310
+ return acc;
3311
+ }, {});
3312
+ }
3313
+ serializeNamespace(params) {
3314
+ return params && Object.keys(params).length ? JSON.stringify(params) : '';
3315
+ }
3316
+ deserializeNamespace(strParams) {
3317
+ return strParams ? JSON.parse(strParams) : {};
3318
+ }
3319
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: QueryParamsService, deps: [{ token: i1$6.Router }, { token: i1$6.ActivatedRoute }, { token: QUERY_PARAMS_SERIALIZERS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
3320
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: QueryParamsService, providedIn: 'root' }); }
3321
+ }
3322
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: QueryParamsService, decorators: [{
3323
+ type: Injectable,
3324
+ args: [{ providedIn: 'root' }]
3325
+ }], ctorParameters: () => [{ type: i1$6.Router }, { type: i1$6.ActivatedRoute }, { type: undefined, decorators: [{
3326
+ type: Optional
3327
+ }, {
3328
+ type: Inject,
3329
+ args: [QUERY_PARAMS_SERIALIZERS]
3330
+ }] }] });
3331
+
3332
+ class QueryParamsModule {
3333
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: QueryParamsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3334
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: QueryParamsModule }); }
3335
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: QueryParamsModule, providers: [
3336
+ { provide: QUERY_PARAMS_SERIALIZERS, useValue: DATE_QUERY_PARAMS_SERIALIZERS },
3337
+ QueryParamsService,
3338
+ ] }); }
3339
+ }
3340
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: QueryParamsModule, decorators: [{
3341
+ type: NgModule,
3342
+ args: [{
3343
+ providers: [
3344
+ { provide: QUERY_PARAMS_SERIALIZERS, useValue: DATE_QUERY_PARAMS_SERIALIZERS },
3345
+ QueryParamsService,
3346
+ ],
3347
+ }]
3348
+ }] });
3349
+
3350
+ class UrlService {
3351
+ get url() {
3352
+ return this.router.url && this.router.url !== '/'
3353
+ ? this.router.url.split('?', 1)[0].split('#', 1)[0]
3354
+ : window.location.pathname;
3355
+ }
3356
+ get path() {
3357
+ return this.url?.split('/')?.slice(1) ?? [];
3358
+ }
3359
+ constructor(router) {
3360
+ this.router = router;
3361
+ this.url$ = this.router.events.pipe(startWith(null), map(() => this.url), filter((url) => this.router.navigated || (!!url && url !== '/')), distinctUntilChanged(), shareReplay({ refCount: true, bufferSize: 1 }));
3362
+ this.path$ = this.url$.pipe(map(() => this.path), shareReplay({ refCount: true, bufferSize: 1 }));
3363
+ }
3364
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: UrlService, deps: [{ token: i1$6.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
3365
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: UrlService, providedIn: 'root' }); }
3366
+ }
3367
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: UrlService, decorators: [{
3368
+ type: Injectable,
3369
+ args: [{
3370
+ providedIn: 'root',
3371
+ }]
3372
+ }], ctorParameters: () => [{ type: i1$6.Router }] });
3373
+
3374
+ function hasExtension(fileName, extensions) {
3375
+ return (!extensions?.length ||
3376
+ new RegExp('(' + extensions.join('|').replace(/\./g, '\\.') + ')$').test(fileName));
3377
+ }
3378
+ class FileUploadComponent {
3379
+ constructor(log) {
3380
+ this.log = log;
3381
+ this.extensions = [];
3382
+ this.upload = new EventEmitter();
3383
+ }
3384
+ loadFile(event) {
3385
+ const file = event.target?.files?.[0] ?? null;
3386
+ if (!file) {
3387
+ this.log.error(new Error('File upload error'));
3388
+ return;
3389
+ }
3390
+ if (!hasExtension(file.name, this.extensions)) {
3391
+ this.log.error(new Error(`Supported file types: ${this.extensions.join(', ')}`));
3392
+ return;
3393
+ }
3394
+ this.file = file;
3395
+ this.upload.emit(this.file);
3396
+ }
3397
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FileUploadComponent, deps: [{ token: NotifyLogService }], target: i0.ɵɵFactoryTarget.Component }); }
3398
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: FileUploadComponent, isStandalone: false, selector: "v-file-upload", inputs: { label: "label", extensions: "extensions" }, outputs: { upload: "upload" }, ngImport: i0, template: "<div class=\"wrapper\">\n <button mat-button type=\"button\" (click)=\"fileInput.click()\">\n {{ label ?? 'Choose File' }}\n </button>\n\n <div class=\"mat-body-medium mat-secondary-text mat-no-margin\">\n {{ file?.name }}\n </div>\n</div>\n\n<input #fileInput hidden type=\"file\" (change)=\"loadFile($event)\" />\n", styles: [".wrapper{display:grid;grid-template-columns:min-content auto;align-items:center;grid-gap:16px}.wrapper>*{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"], dependencies: [{ kind: "component", type: i1$4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }] }); }
3399
+ }
3400
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FileUploadComponent, decorators: [{
3401
+ type: Component,
3402
+ args: [{ selector: 'v-file-upload', standalone: false, template: "<div class=\"wrapper\">\n <button mat-button type=\"button\" (click)=\"fileInput.click()\">\n {{ label ?? 'Choose File' }}\n </button>\n\n <div class=\"mat-body-medium mat-secondary-text mat-no-margin\">\n {{ file?.name }}\n </div>\n</div>\n\n<input #fileInput hidden type=\"file\" (change)=\"loadFile($event)\" />\n", styles: [".wrapper{display:grid;grid-template-columns:min-content auto;align-items:center;grid-gap:16px}.wrapper>*{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n"] }]
3403
+ }], ctorParameters: () => [{ type: NotifyLogService }], propDecorators: { label: [{
3404
+ type: Input
3405
+ }], extensions: [{
3406
+ type: Input
3407
+ }], upload: [{
3408
+ type: Output
3409
+ }] } });
3410
+
3411
+ class FileUploadModule {
3412
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FileUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3413
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: FileUploadModule, declarations: [FileUploadComponent], imports: [CommonModule, MatButtonModule], exports: [FileUploadComponent] }); }
3414
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FileUploadModule, imports: [CommonModule, MatButtonModule] }); }
3415
+ }
3416
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FileUploadModule, decorators: [{
3417
+ type: NgModule,
3418
+ args: [{
3419
+ declarations: [FileUploadComponent],
3420
+ exports: [FileUploadComponent],
3421
+ imports: [CommonModule, MatButtonModule],
3422
+ }]
3423
+ }] });
3424
+
3425
+ function loadFileContent(file, encoding = 'utf-8') {
3426
+ return new Observable((subscriber) => {
3427
+ if (!file) {
3428
+ return undefined;
3429
+ }
3430
+ const read = new FileReader();
3431
+ read.readAsText(file, encoding);
3432
+ read.onloadend = function () {
3433
+ if (read.error) {
3434
+ return subscriber.error(read.error);
3435
+ }
3436
+ else {
3437
+ subscriber.next(read.result || '');
3438
+ }
3439
+ subscriber.complete();
3440
+ };
3441
+ });
3442
+ }
3443
+
3444
+ class DatetimeFieldComponent extends FormComponentSuperclass$1 {
3445
+ constructor() {
3446
+ super(...arguments);
3447
+ this.required = false;
3448
+ }
3449
+ get time() {
3450
+ return this.datetime ? format(this.datetime, 'HH:mm') : '';
3451
+ }
3452
+ handleIncomingValue(value) {
3453
+ this.datetime = value ? createDateFromNoTimeZoneString(value) : null;
3454
+ }
3455
+ timeChanged(event) {
3456
+ const [hours, minutes] = event.target.value.split(':');
3457
+ if (!this.datetime) {
3458
+ this.datetime = new Date();
3459
+ }
3460
+ this.datetime.setHours(Number(hours));
3461
+ this.datetime.setMinutes(Number(minutes));
3462
+ this.datetime.setSeconds(0);
3463
+ this.datetime.setMilliseconds(0);
3464
+ this.emitValue();
3465
+ }
3466
+ dateChanged(date) {
3467
+ const v = date.target.value || new Date();
3468
+ if (this.datetime) {
3469
+ this.datetime.setDate(v.getDate());
3470
+ this.datetime.setMonth(v.getMonth());
3471
+ this.datetime.setFullYear(v.getFullYear());
3472
+ }
3473
+ else {
3474
+ this.datetime = v;
3475
+ }
3476
+ this.emitValue();
3477
+ }
3478
+ validate() {
3479
+ return !this.datetime || isValid(this.datetime) ? null : { invalidDatetime: true };
3480
+ }
3481
+ emitValue() {
3482
+ return this.emitOutgoingValue(getNoTimeZoneIsoString(this.datetime));
3483
+ }
3484
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DatetimeFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3485
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: DatetimeFieldComponent, isStandalone: false, selector: "v-datetime-field", inputs: { label: "label", required: ["required", "required", booleanAttribute], hint: "hint" }, providers: [
3486
+ ...createControlProviders(() => DatetimeFieldComponent),
3487
+ { provide: MAT_DATE_LOCALE, useValue: enGB },
3488
+ { provide: DateAdapter, useClass: DateFnsAdapter, deps: [MAT_DATE_LOCALE] },
3489
+ { provide: MAT_DATE_FORMATS, useValue: MAT_DATE_FNS_FORMATS },
3490
+ ], usesInheritance: true, ngImport: i0, template: "<div class=\"wrapper\">\n <mat-form-field class=\"date\">\n <mat-label>\n {{ label }}\n </mat-label>\n <mat-hint>{{ hint }}</mat-hint>\n <input\n [matDatepicker]=\"picker\"\n [required]=\"required\"\n [value]=\"datetime\"\n matInput\n (dateInput)=\"dateChanged($event)\"\n />\n <mat-datepicker-toggle [for]=\"picker\" matSuffix></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n @if (datetime) {\n <mat-form-field class=\"time\">\n <input [value]=\"time\" matInput type=\"time\" (input)=\"timeChanged($event)\" />\n </mat-form-field>\n }\n</div>\n", styles: [".wrapper{display:flex;gap:8px}.wrapper .date{flex:1}.wrapper .time{width:100px}\n"], dependencies: [{ kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i2$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i2$7.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i2$7.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i2$7.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }] }); }
3491
+ }
3492
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DatetimeFieldComponent, decorators: [{
3493
+ type: Component,
3494
+ args: [{ selector: 'v-datetime-field', providers: [
3495
+ ...createControlProviders(() => DatetimeFieldComponent),
3496
+ { provide: MAT_DATE_LOCALE, useValue: enGB },
3497
+ { provide: DateAdapter, useClass: DateFnsAdapter, deps: [MAT_DATE_LOCALE] },
3498
+ { provide: MAT_DATE_FORMATS, useValue: MAT_DATE_FNS_FORMATS },
3499
+ ], standalone: false, template: "<div class=\"wrapper\">\n <mat-form-field class=\"date\">\n <mat-label>\n {{ label }}\n </mat-label>\n <mat-hint>{{ hint }}</mat-hint>\n <input\n [matDatepicker]=\"picker\"\n [required]=\"required\"\n [value]=\"datetime\"\n matInput\n (dateInput)=\"dateChanged($event)\"\n />\n <mat-datepicker-toggle [for]=\"picker\" matSuffix></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n @if (datetime) {\n <mat-form-field class=\"time\">\n <input [value]=\"time\" matInput type=\"time\" (input)=\"timeChanged($event)\" />\n </mat-form-field>\n }\n</div>\n", styles: [".wrapper{display:flex;gap:8px}.wrapper .date{flex:1}.wrapper .time{width:100px}\n"] }]
3500
+ }], propDecorators: { label: [{
3501
+ type: Input
3502
+ }], required: [{
3503
+ type: Input,
3504
+ args: [{ transform: booleanAttribute }]
3505
+ }], hint: [{
3506
+ type: Input
3507
+ }] } });
3508
+
3509
+ class DatetimeFieldModule {
3510
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DatetimeFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3511
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: DatetimeFieldModule, declarations: [DatetimeFieldComponent], imports: [CommonModule, MatFormFieldModule, MatInputModule, MatDatepickerModule], exports: [DatetimeFieldComponent] }); }
3512
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DatetimeFieldModule, imports: [CommonModule, MatFormFieldModule, MatInputModule, MatDatepickerModule] }); }
3513
+ }
3514
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: DatetimeFieldModule, decorators: [{
3515
+ type: NgModule,
3516
+ args: [{
3517
+ declarations: [DatetimeFieldComponent],
3518
+ exports: [DatetimeFieldComponent],
3519
+ imports: [CommonModule, MatFormFieldModule, MatInputModule, MatDatepickerModule],
3520
+ }]
3521
+ }] });
3522
+
3523
+ class SwitchButtonComponent extends FormControlSuperclass {
3524
+ constructor() {
3525
+ super(...arguments);
3526
+ this.states = [];
3527
+ this.hasChangeValue = false;
3528
+ }
3529
+ get index() {
3530
+ return this.getIndex(this.control.value);
3531
+ }
3532
+ get nextIndex() {
3533
+ const nextIdx = this.index + 1;
3534
+ return nextIdx === this.states.length ? 0 : nextIdx;
3535
+ }
3536
+ get value() {
3537
+ return this.getValue(this.getIndex(this.control.value));
3538
+ }
3539
+ get state() {
3540
+ return this.states[this.index];
3541
+ }
3542
+ get nextState() {
3543
+ return this.states[this.nextIndex];
3544
+ }
3545
+ get tooltip() {
3546
+ const nextState = this.states[this.nextIndex];
3547
+ return nextState.label ? `Switch to ${lowerFirst(nextState.label)}` : '';
3548
+ }
3549
+ change() {
3550
+ this.control.setValue(this.getValue(this.nextIndex));
3551
+ }
3552
+ ngOnChanges(changes) {
3553
+ super.ngOnChanges(changes);
3554
+ if (changes.states && this.states.length) {
3555
+ if (!isNil(this.states?.[0]?.value)) {
3556
+ this.hasChangeValue = true;
3557
+ }
3558
+ if (isNil(this.control.value)) {
3559
+ this.control.setValue(this.value);
3560
+ }
3561
+ }
3562
+ }
3563
+ getIndex(value) {
3564
+ return ((this.hasChangeValue
3565
+ ? this.states.findIndex((s) => s.value === value)
3566
+ : value) ?? 0);
3567
+ }
3568
+ getValue(index) {
3569
+ return this.hasChangeValue ? this.states[index]?.value : index;
3570
+ }
3571
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SwitchButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3572
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: SwitchButtonComponent, isStandalone: false, selector: "v-switch-button", inputs: { states: "states" }, providers: createControlProviders(() => SwitchButtonComponent), usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<button [matTooltip]=\"tooltip\" class=\"button\" mat-icon-button (click)=\"change()\">\n <mat-icon class=\"icon\">{{ state?.icon }}</mat-icon>\n</button>\n", dependencies: [{ kind: "component", type: i1$4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2$5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
3573
+ }
3574
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SwitchButtonComponent, decorators: [{
3575
+ type: Component,
3576
+ args: [{ selector: 'v-switch-button', providers: createControlProviders(() => SwitchButtonComponent), standalone: false, template: "<button [matTooltip]=\"tooltip\" class=\"button\" mat-icon-button (click)=\"change()\">\n <mat-icon class=\"icon\">{{ state?.icon }}</mat-icon>\n</button>\n" }]
3577
+ }], propDecorators: { states: [{
3578
+ type: Input
3579
+ }] } });
3580
+
3581
+ class SwitchButtonModule {
3582
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SwitchButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3583
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: SwitchButtonModule, declarations: [SwitchButtonComponent], imports: [CommonModule, MatButtonModule, MatIconModule, MatTooltipModule], exports: [SwitchButtonComponent] }); }
3584
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SwitchButtonModule, imports: [CommonModule, MatButtonModule, MatIconModule, MatTooltipModule] }); }
3585
+ }
3586
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SwitchButtonModule, decorators: [{
3587
+ type: NgModule,
3588
+ args: [{
3589
+ declarations: [SwitchButtonComponent],
3590
+ imports: [CommonModule, MatButtonModule, MatIconModule, MatTooltipModule],
3591
+ exports: [SwitchButtonComponent],
3592
+ }]
3593
+ }] });
3594
+
3595
+ class NavComponent {
3596
+ constructor(urlService) {
3597
+ this.urlService = urlService;
3598
+ this.type = input();
3599
+ this.links = input([], {
3600
+ transform: (v) => (isArray(v[0]) ? v : [v]),
3601
+ });
3602
+ this.exact = input(false, { transform: booleanAttribute });
3603
+ this.activeLink$ = combineLatest([
3604
+ this.urlService.url$,
3605
+ toObservable(this.links),
3606
+ toObservable(this.exact),
3607
+ ]).pipe(map(([url, links, exact]) => links.flat().reduce((res, link) => {
3608
+ const index = url.indexOf(link.url);
3609
+ if (index !== -1 && (exact ? index === 0 : index < res.index)) {
3610
+ return { index, link };
3611
+ }
3612
+ return res;
3613
+ }, { index: Infinity, link: null })?.link), shareReplay({ refCount: true, bufferSize: 1 }));
3614
+ }
3615
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NavComponent, deps: [{ token: UrlService }], target: i0.ɵɵFactoryTarget.Component }); }
3616
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: NavComponent, isStandalone: true, selector: "v-nav", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, links: { classPropertyName: "links", publicName: "links", isSignal: true, isRequired: false, transformFunction: null }, exact: { classPropertyName: "exact", publicName: "exact", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [ngClass]=\"{ 'v-nav__secondary': type() === 'secondary' }\" class=\"v-nav\">\n @for (linksGroup of links(); track linksGroup; let index = $index) {\n @if (index !== 0) {\n <mat-divider></mat-divider>\n }\n @for (link of linksGroup; track link) {\n <div\n [ngClass]=\"{ item__active: (activeLink$ | async) === link }\"\n [routerLink]=\"link.url\"\n [title]=\"link.label\"\n class=\"mat-body-large item mat-no-margin\"\n >\n {{ link.label }}\n </div>\n }\n }\n</div>\n", styles: [".v-nav{display:flex;flex-direction:column}.v-nav .item{cursor:pointer;padding:12px 24px 12px 12px}.v-nav .item__active{font-weight:500}.v-nav .item:after{display:block;content:attr(title);font-weight:500;height:0;color:transparent;overflow:hidden;visibility:hidden}.v-nav__secondary .item{border-left:solid 4px}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }], encapsulation: i0.ViewEncapsulation.None }); }
3617
+ }
3618
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NavComponent, decorators: [{
3619
+ type: Component,
3620
+ args: [{ selector: 'v-nav', imports: [RouterLink, NgClass, AsyncPipe, MatDivider], encapsulation: ViewEncapsulation.None, template: "<div [ngClass]=\"{ 'v-nav__secondary': type() === 'secondary' }\" class=\"v-nav\">\n @for (linksGroup of links(); track linksGroup; let index = $index) {\n @if (index !== 0) {\n <mat-divider></mat-divider>\n }\n @for (link of linksGroup; track link) {\n <div\n [ngClass]=\"{ item__active: (activeLink$ | async) === link }\"\n [routerLink]=\"link.url\"\n [title]=\"link.label\"\n class=\"mat-body-large item mat-no-margin\"\n >\n {{ link.label }}\n </div>\n }\n }\n</div>\n", styles: [".v-nav{display:flex;flex-direction:column}.v-nav .item{cursor:pointer;padding:12px 24px 12px 12px}.v-nav .item__active{font-weight:500}.v-nav .item:after{display:block;content:attr(title);font-weight:500;height:0;color:transparent;overflow:hidden;visibility:hidden}.v-nav__secondary .item{border-left:solid 4px}\n"] }]
3621
+ }], ctorParameters: () => [{ type: UrlService }] });
3622
+
3623
+ class AmountCurrencyPipe {
3624
+ constructor(_locale, _defaultCurrencyCode = 'USD') {
3625
+ this._locale = _locale;
3626
+ this._defaultCurrencyCode = _defaultCurrencyCode;
3627
+ }
3628
+ transform(amount, currencyCode = this._defaultCurrencyCode, format = 'long', exponent, isMajor = false) {
3629
+ if (typeof amount === 'number') {
3630
+ return formatCurrency(amount, currencyCode, format, this._locale, exponent, isMajor);
3631
+ }
3632
+ return amount;
3633
+ }
3634
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AmountCurrencyPipe, deps: [{ token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Pipe }); }
3635
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: AmountCurrencyPipe, isStandalone: true, name: "amountCurrency" }); }
3636
+ }
3637
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AmountCurrencyPipe, decorators: [{
3638
+ type: Pipe,
3639
+ args: [{
3640
+ standalone: true,
3641
+ name: 'amountCurrency',
3642
+ }]
3643
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
3644
+ type: Inject,
3645
+ args: [LOCALE_ID]
3646
+ }] }, { type: undefined, decorators: [{
3647
+ type: Inject,
3648
+ args: [DEFAULT_CURRENCY_CODE]
3649
+ }] }] });
3650
+
3651
+ class EnumKeyValuesPipe {
3652
+ transform(value) {
3653
+ return getEnumKeyValues(value);
3654
+ }
3655
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: EnumKeyValuesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
3656
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: EnumKeyValuesPipe, isStandalone: true, name: "enumKeyValues" }); }
3657
+ }
3658
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: EnumKeyValuesPipe, decorators: [{
3659
+ type: Pipe,
3660
+ args: [{
3661
+ standalone: true,
3662
+ name: 'enumKeyValues',
3663
+ }]
3664
+ }] });
3665
+
3666
+ class EnumKeyPipe {
3667
+ transform(value, enumObj) {
3668
+ return !isNil(value) && enumObj ? getEnumKey(enumObj, value) : '';
3669
+ }
3670
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: EnumKeyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
3671
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: EnumKeyPipe, isStandalone: true, name: "enumKey" }); }
3672
+ }
3673
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: EnumKeyPipe, decorators: [{
3674
+ type: Pipe,
3675
+ args: [{
3676
+ standalone: true,
3677
+ name: 'enumKey',
3678
+ }]
3679
+ }] });
3680
+
3681
+ class EnumKeysPipe {
3682
+ transform(value) {
3683
+ return getEnumKeys(value);
3684
+ }
3685
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: EnumKeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
3686
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: EnumKeysPipe, isStandalone: true, name: "enumKeys" }); }
3687
+ }
3688
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: EnumKeysPipe, decorators: [{
3689
+ type: Pipe,
3690
+ args: [{
3691
+ standalone: true,
3692
+ name: 'enumKeys',
3693
+ }]
3694
+ }] });
3695
+
3696
+ const DEFAULT_TIMER = 7500;
3697
+ class HumanizedDurationPipe extends AsyncTransform {
3698
+ constructor() {
3699
+ super(...arguments);
3700
+ this.result$ = combineLatest([this.params$, timer(0, DEFAULT_TIMER)]).pipe(throttleTime(DEFAULT_TIMER), map(([[value, config]]) => formatDistanceToNow(new Date(value), { includeSeconds: true }) +
3701
+ (config.hasAgoEnding ? ' ago' : '')), distinctUntilChanged());
3702
+ }
3703
+ transform(...params) {
3704
+ return super.asyncTransform(params);
3705
+ }
3706
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: HumanizedDurationPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
3707
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: HumanizedDurationPipe, isStandalone: true, name: "humanizedDuration", pure: false }); }
3708
+ }
3709
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: HumanizedDurationPipe, decorators: [{
3710
+ type: Pipe,
3711
+ args: [{
3712
+ standalone: true,
3713
+ name: 'humanizedDuration',
3714
+ pure: false,
3715
+ }]
3716
+ }] });
3717
+
3718
+ class InlineJsonPipe {
3719
+ transform(value, maxReadableLever = 1) {
3720
+ return inlineJson(value, maxReadableLever === false ? Infinity : maxReadableLever);
3721
+ }
3722
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: InlineJsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
3723
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: InlineJsonPipe, isStandalone: false, name: "inlineJson" }); }
3724
+ }
3725
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: InlineJsonPipe, decorators: [{
3726
+ type: Pipe,
3727
+ args: [{
3728
+ name: 'inlineJson',
3729
+ standalone: false,
3730
+ }]
3731
+ }] });
3732
+
3733
+ class VSelectPipe {
3734
+ constructor(ref) {
3735
+ this.ref = ref;
3736
+ }
3737
+ transform(obj, selectFn, defaultValue, rest = []) {
3738
+ const res = obj && selectFn ? select(obj, selectFn, defaultValue, rest) : null;
3739
+ if (isObservable(res) && !this.asyncPipe) {
3740
+ this.asyncPipe = new AsyncPipe(this.ref);
3741
+ }
3742
+ if (this.asyncPipe) {
3743
+ return this.asyncPipe.transform(res);
3744
+ }
3745
+ return res;
3746
+ }
3747
+ ngOnDestroy() {
3748
+ this.asyncPipe?.ngOnDestroy?.();
3749
+ }
3750
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: VSelectPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe }); }
3751
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: VSelectPipe, isStandalone: true, name: "vSelect", pure: false }); }
3752
+ }
3753
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: VSelectPipe, decorators: [{
3754
+ type: Pipe,
3755
+ args: [{
3756
+ standalone: true,
3757
+ name: 'vSelect',
3758
+ pure: false,
3759
+ }]
3760
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
3761
+
3762
+ class PipesModule {
3763
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: PipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3764
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: PipesModule, declarations: [InlineJsonPipe], imports: [CommonModule,
3765
+ EnumKeyPipe,
3766
+ EnumKeysPipe,
3767
+ EnumKeyValuesPipe,
3768
+ AmountCurrencyPipe,
3769
+ VSelectPipe,
3770
+ HumanizedDurationPipe], exports: [InlineJsonPipe,
3771
+ EnumKeyPipe,
3772
+ EnumKeysPipe,
3773
+ EnumKeyValuesPipe,
3774
+ AmountCurrencyPipe,
3775
+ VSelectPipe,
3776
+ HumanizedDurationPipe] }); }
3777
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: PipesModule, imports: [CommonModule] }); }
3778
+ }
3779
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: PipesModule, decorators: [{
3780
+ type: NgModule,
3781
+ args: [{
3782
+ declarations: [InlineJsonPipe],
3783
+ exports: [
3784
+ InlineJsonPipe,
3785
+ EnumKeyPipe,
3786
+ EnumKeysPipe,
3787
+ EnumKeyValuesPipe,
3788
+ AmountCurrencyPipe,
3789
+ VSelectPipe,
3790
+ HumanizedDurationPipe,
3791
+ ],
3792
+ imports: [
3793
+ CommonModule,
3794
+ EnumKeyPipe,
3795
+ EnumKeysPipe,
3796
+ EnumKeyValuesPipe,
3797
+ AmountCurrencyPipe,
3798
+ VSelectPipe,
3799
+ HumanizedDurationPipe,
3800
+ ],
3801
+ }]
3802
+ }] });
3803
+
3804
+ /**
3805
+ * Generated bundle index. Do not edit.
3806
+ */
3807
+
3808
+ export { ActionsComponent, ActionsModule, AmountCurrencyPipe, AsyncTransform, AutocompleteFieldComponent, AutocompleteFieldModule, BASE_CONFIG, ConfigServiceSuperclass, ConfirmDialogComponent, ConfirmDialogModule, ContentLoadingComponent, DATE_QUERY_PARAMS_SERIALIZERS, DEFAULT_DIALOG_CONFIG, DEFAULT_DIALOG_CONFIG_FULL_HEIGHT, DIALOG_CONFIG, DateRangeFieldComponent, DateRangeFieldModule, DatetimeFieldComponent, DatetimeFieldModule, DebounceTime, DialogActionsComponent, DialogComponent, DialogModule, DialogResponseStatus, DialogService, DialogSuperclass, EnumKeyPipe, EnumKeyValuesPipe, EnumKeysPipe, ErrorPageComponent, ErrorPageModule, FetchSuperclass, FileUploadComponent, FileUploadModule, FiltersComponent, FiltersModule, FormComponentSuperclass, FormControlSuperclass, FormGroupSuperclass, HighlightDirective, HumanizedDurationPipe, InlineJsonPipe, InputFieldComponent, InputFieldModule, ListFieldComponent, ListFieldModule, LogModule, MainFiltersDirective, MoreFiltersButtonComponent, NavComponent, NormColumn, NotifyLogService, NumberRangeFieldComponent, NumberRangeFieldModule, OtherFiltersDirective, PipesModule, QUERY_PARAMS_SERIALIZERS, QueryParamsModule, QueryParamsService, SelectFieldComponent, SelectFieldModule, SingleFetchSuperclass, SwitchButtonComponent, SwitchButtonModule, TableActionsComponent, TableComponent, TableInputsComponent, TableModule, TagComponent, TagModule, UrlService, VSelectPipe, ValueComponent, ValueListComponent, arrayAttribute, asyncStartWith, cachedHeadMap, clean, cleanPrimitiveProps, compareDifferentTypes, correctPriorities, countChanged, countProps, createColumn, createControlProviders, createControls, createCsv, createDateFromNoTimeZoneString, createDateRangeToToday, createMenuColumn, createStorageValue, debounceTimeWithFirst, downloadFile, enumHasValue, forkJoinToResult, formatCurrency, getCurrencyExponent, getEnumEntries, getEnumKey, getEnumKeyValues, getEnumKeys, getEnumValues, getErrorsTree, getImportValue, getNoTimeZoneIsoString, getPossiblyAsyncObservable, getValidValueChanges, getValue$1 as getValue, getValueChanges, handleError, hasControls, inProgressFrom, inlineJson, isAsync, isEmpty, isEmptyPrimitive, isEqualDateRange, isResultsHasError, loadFileContent, normalizeCell, normalizePossiblyFn, parseCsv, passError, progressTo, select, setDisabled, splitBySeparators, splitResultsErrors, switchCombineWith, toMajor, toMajorByExponent, toMinor, toMinorByExponent, treeDataItemToInlineDataItem, unifyCsvItems };
3809
+ //# sourceMappingURL=vality-matez.mjs.map