@elementar-rt/components 0.6.55

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 (259) hide show
  1. package/README.md +49 -0
  2. package/action-required/index.d.ts +13 -0
  3. package/alert/index.d.ts +51 -0
  4. package/announcement/index.d.ts +45 -0
  5. package/avatar/index.d.ts +67 -0
  6. package/block-loader/index.d.ts +21 -0
  7. package/block-state/index.d.ts +33 -0
  8. package/brand-colors/index.d.ts +27 -0
  9. package/breadcrumbs/index.d.ts +104 -0
  10. package/card-overlay/index.d.ts +20 -0
  11. package/carousel/index.d.ts +75 -0
  12. package/code-highlighter/index.d.ts +18 -0
  13. package/color-picker/index.d.ts +92 -0
  14. package/color-scheme/index.d.ts +44 -0
  15. package/command-bar/index.d.ts +28 -0
  16. package/comment-editor/index.d.ts +194 -0
  17. package/comparison-slider/index.d.ts +51 -0
  18. package/confirm/index.d.ts +35 -0
  19. package/content-fade/index.d.ts +17 -0
  20. package/cookie-popup/index.d.ts +41 -0
  21. package/core/index.d.ts +252 -0
  22. package/country-select/index.d.ts +76 -0
  23. package/crop/index.d.ts +59 -0
  24. package/currency-select/index.d.ts +78 -0
  25. package/dashboard/index.d.ts +48 -0
  26. package/data-view/index.d.ts +127 -0
  27. package/date-format-select/index.d.ts +56 -0
  28. package/divider/index.d.ts +13 -0
  29. package/drawer/index.d.ts +35 -0
  30. package/emoji-picker/index.d.ts +49 -0
  31. package/expand/index.d.ts +26 -0
  32. package/fesm2022/elementar-rt-components-action-required.mjs +30 -0
  33. package/fesm2022/elementar-rt-components-action-required.mjs.map +1 -0
  34. package/fesm2022/elementar-rt-components-alert.mjs +139 -0
  35. package/fesm2022/elementar-rt-components-alert.mjs.map +1 -0
  36. package/fesm2022/elementar-rt-components-announcement.mjs +73 -0
  37. package/fesm2022/elementar-rt-components-announcement.mjs.map +1 -0
  38. package/fesm2022/elementar-rt-components-avatar.mjs +234 -0
  39. package/fesm2022/elementar-rt-components-avatar.mjs.map +1 -0
  40. package/fesm2022/elementar-rt-components-block-loader.mjs +54 -0
  41. package/fesm2022/elementar-rt-components-block-loader.mjs.map +1 -0
  42. package/fesm2022/elementar-rt-components-block-state.mjs +75 -0
  43. package/fesm2022/elementar-rt-components-block-state.mjs.map +1 -0
  44. package/fesm2022/elementar-rt-components-brand-colors.mjs +78 -0
  45. package/fesm2022/elementar-rt-components-brand-colors.mjs.map +1 -0
  46. package/fesm2022/elementar-rt-components-breadcrumbs.mjs +213 -0
  47. package/fesm2022/elementar-rt-components-breadcrumbs.mjs.map +1 -0
  48. package/fesm2022/elementar-rt-components-card-overlay.mjs +55 -0
  49. package/fesm2022/elementar-rt-components-card-overlay.mjs.map +1 -0
  50. package/fesm2022/elementar-rt-components-carousel.mjs +605 -0
  51. package/fesm2022/elementar-rt-components-carousel.mjs.map +1 -0
  52. package/fesm2022/elementar-rt-components-code-highlighter.mjs +57 -0
  53. package/fesm2022/elementar-rt-components-code-highlighter.mjs.map +1 -0
  54. package/fesm2022/elementar-rt-components-color-picker.mjs +708 -0
  55. package/fesm2022/elementar-rt-components-color-picker.mjs.map +1 -0
  56. package/fesm2022/elementar-rt-components-color-scheme.mjs +106 -0
  57. package/fesm2022/elementar-rt-components-color-scheme.mjs.map +1 -0
  58. package/fesm2022/elementar-rt-components-command-bar.mjs +59 -0
  59. package/fesm2022/elementar-rt-components-command-bar.mjs.map +1 -0
  60. package/fesm2022/elementar-rt-components-comment-editor.mjs +1039 -0
  61. package/fesm2022/elementar-rt-components-comment-editor.mjs.map +1 -0
  62. package/fesm2022/elementar-rt-components-comparison-slider.mjs +193 -0
  63. package/fesm2022/elementar-rt-components-comparison-slider.mjs.map +1 -0
  64. package/fesm2022/elementar-rt-components-confirm.mjs +86 -0
  65. package/fesm2022/elementar-rt-components-confirm.mjs.map +1 -0
  66. package/fesm2022/elementar-rt-components-content-fade.mjs +35 -0
  67. package/fesm2022/elementar-rt-components-content-fade.mjs.map +1 -0
  68. package/fesm2022/elementar-rt-components-cookie-popup.mjs +109 -0
  69. package/fesm2022/elementar-rt-components-cookie-popup.mjs.map +1 -0
  70. package/fesm2022/elementar-rt-components-core.mjs +837 -0
  71. package/fesm2022/elementar-rt-components-core.mjs.map +1 -0
  72. package/fesm2022/elementar-rt-components-country-select.mjs +477 -0
  73. package/fesm2022/elementar-rt-components-country-select.mjs.map +1 -0
  74. package/fesm2022/elementar-rt-components-crop.mjs +183 -0
  75. package/fesm2022/elementar-rt-components-crop.mjs.map +1 -0
  76. package/fesm2022/elementar-rt-components-currency-select.mjs +384 -0
  77. package/fesm2022/elementar-rt-components-currency-select.mjs.map +1 -0
  78. package/fesm2022/elementar-rt-components-dashboard.mjs +96 -0
  79. package/fesm2022/elementar-rt-components-dashboard.mjs.map +1 -0
  80. package/fesm2022/elementar-rt-components-data-view.mjs +302 -0
  81. package/fesm2022/elementar-rt-components-data-view.mjs.map +1 -0
  82. package/fesm2022/elementar-rt-components-date-format-select.mjs +136 -0
  83. package/fesm2022/elementar-rt-components-date-format-select.mjs.map +1 -0
  84. package/fesm2022/elementar-rt-components-divider.mjs +31 -0
  85. package/fesm2022/elementar-rt-components-divider.mjs.map +1 -0
  86. package/fesm2022/elementar-rt-components-drawer.mjs +131 -0
  87. package/fesm2022/elementar-rt-components-drawer.mjs.map +1 -0
  88. package/fesm2022/elementar-rt-components-emoji-picker.mjs +249 -0
  89. package/fesm2022/elementar-rt-components-emoji-picker.mjs.map +1 -0
  90. package/fesm2022/elementar-rt-components-expand.mjs +60 -0
  91. package/fesm2022/elementar-rt-components-expand.mjs.map +1 -0
  92. package/fesm2022/elementar-rt-components-filter-builder.mjs +333 -0
  93. package/fesm2022/elementar-rt-components-filter-builder.mjs.map +1 -0
  94. package/fesm2022/elementar-rt-components-form-renderer-autocomplete-many-field.component-AqEghjO_.mjs +123 -0
  95. package/fesm2022/elementar-rt-components-form-renderer-autocomplete-many-field.component-AqEghjO_.mjs.map +1 -0
  96. package/fesm2022/elementar-rt-components-form-renderer-checkbox-field.component-CUKmZGFq.mjs +22 -0
  97. package/fesm2022/elementar-rt-components-form-renderer-checkbox-field.component-CUKmZGFq.mjs.map +1 -0
  98. package/fesm2022/elementar-rt-components-form-renderer-datepicker-field.component-DihIRWMt.mjs +40 -0
  99. package/fesm2022/elementar-rt-components-form-renderer-datepicker-field.component-DihIRWMt.mjs.map +1 -0
  100. package/fesm2022/elementar-rt-components-form-renderer-divider-content.component-CjlGcU3B.mjs +17 -0
  101. package/fesm2022/elementar-rt-components-form-renderer-divider-content.component-CjlGcU3B.mjs.map +1 -0
  102. package/fesm2022/elementar-rt-components-form-renderer-image-content.component-0pL2Fk0H.mjs +17 -0
  103. package/fesm2022/elementar-rt-components-form-renderer-image-content.component-0pL2Fk0H.mjs.map +1 -0
  104. package/fesm2022/elementar-rt-components-form-renderer-input-field.component-X2sKvj6J.mjs +33 -0
  105. package/fesm2022/elementar-rt-components-form-renderer-input-field.component-X2sKvj6J.mjs.map +1 -0
  106. package/fesm2022/elementar-rt-components-form-renderer-radio-group-field.component-DWXZAA3F.mjs +38 -0
  107. package/fesm2022/elementar-rt-components-form-renderer-radio-group-field.component-DWXZAA3F.mjs.map +1 -0
  108. package/fesm2022/elementar-rt-components-form-renderer-select-field.component-Cx9DZoD6.mjs +39 -0
  109. package/fesm2022/elementar-rt-components-form-renderer-select-field.component-Cx9DZoD6.mjs.map +1 -0
  110. package/fesm2022/elementar-rt-components-form-renderer-text-content.component-BmFyUG06.mjs +24 -0
  111. package/fesm2022/elementar-rt-components-form-renderer-text-content.component-BmFyUG06.mjs.map +1 -0
  112. package/fesm2022/elementar-rt-components-form-renderer-textarea-field.component-D9KmE049.mjs +37 -0
  113. package/fesm2022/elementar-rt-components-form-renderer-textarea-field.component-D9KmE049.mjs.map +1 -0
  114. package/fesm2022/elementar-rt-components-form-renderer-timezone-field.component-BroP_Q4P.mjs +35 -0
  115. package/fesm2022/elementar-rt-components-form-renderer-timezone-field.component-BroP_Q4P.mjs.map +1 -0
  116. package/fesm2022/elementar-rt-components-form-renderer-toggle-field.component-nGbtVi1_.mjs +22 -0
  117. package/fesm2022/elementar-rt-components-form-renderer-toggle-field.component-nGbtVi1_.mjs.map +1 -0
  118. package/fesm2022/elementar-rt-components-form-renderer.mjs +321 -0
  119. package/fesm2022/elementar-rt-components-form-renderer.mjs.map +1 -0
  120. package/fesm2022/elementar-rt-components-gauge.mjs +50 -0
  121. package/fesm2022/elementar-rt-components-gauge.mjs.map +1 -0
  122. package/fesm2022/elementar-rt-components-icon.mjs +62 -0
  123. package/fesm2022/elementar-rt-components-icon.mjs.map +1 -0
  124. package/fesm2022/elementar-rt-components-image-resizer.mjs +159 -0
  125. package/fesm2022/elementar-rt-components-image-resizer.mjs.map +1 -0
  126. package/fesm2022/elementar-rt-components-image-viewer.mjs +349 -0
  127. package/fesm2022/elementar-rt-components-image-viewer.mjs.map +1 -0
  128. package/fesm2022/elementar-rt-components-incidents.mjs +259 -0
  129. package/fesm2022/elementar-rt-components-incidents.mjs.map +1 -0
  130. package/fesm2022/elementar-rt-components-inline-text-edit.mjs +181 -0
  131. package/fesm2022/elementar-rt-components-inline-text-edit.mjs.map +1 -0
  132. package/fesm2022/elementar-rt-components-input-mask.mjs +180 -0
  133. package/fesm2022/elementar-rt-components-input-mask.mjs.map +1 -0
  134. package/fesm2022/elementar-rt-components-input-validator.mjs +24 -0
  135. package/fesm2022/elementar-rt-components-input-validator.mjs.map +1 -0
  136. package/fesm2022/elementar-rt-components-kanban-board.mjs +156 -0
  137. package/fesm2022/elementar-rt-components-kanban-board.mjs.map +1 -0
  138. package/fesm2022/elementar-rt-components-layout.mjs +188 -0
  139. package/fesm2022/elementar-rt-components-layout.mjs.map +1 -0
  140. package/fesm2022/elementar-rt-components-logo.mjs +43 -0
  141. package/fesm2022/elementar-rt-components-logo.mjs.map +1 -0
  142. package/fesm2022/elementar-rt-components-marquee.mjs +79 -0
  143. package/fesm2022/elementar-rt-components-marquee.mjs.map +1 -0
  144. package/fesm2022/elementar-rt-components-micro-chart.mjs +950 -0
  145. package/fesm2022/elementar-rt-components-micro-chart.mjs.map +1 -0
  146. package/fesm2022/elementar-rt-components-navigation.mjs +379 -0
  147. package/fesm2022/elementar-rt-components-navigation.mjs.map +1 -0
  148. package/fesm2022/elementar-rt-components-notifications.mjs +190 -0
  149. package/fesm2022/elementar-rt-components-notifications.mjs.map +1 -0
  150. package/fesm2022/elementar-rt-components-number-input.mjs +288 -0
  151. package/fesm2022/elementar-rt-components-number-input.mjs.map +1 -0
  152. package/fesm2022/elementar-rt-components-overlay-scrollbar.mjs +455 -0
  153. package/fesm2022/elementar-rt-components-overlay-scrollbar.mjs.map +1 -0
  154. package/fesm2022/elementar-rt-components-overlay.mjs +112 -0
  155. package/fesm2022/elementar-rt-components-overlay.mjs.map +1 -0
  156. package/fesm2022/elementar-rt-components-page-loading-bar.mjs +79 -0
  157. package/fesm2022/elementar-rt-components-page-loading-bar.mjs.map +1 -0
  158. package/fesm2022/elementar-rt-components-panel.mjs +105 -0
  159. package/fesm2022/elementar-rt-components-panel.mjs.map +1 -0
  160. package/fesm2022/elementar-rt-components-password-strength.mjs +474 -0
  161. package/fesm2022/elementar-rt-components-password-strength.mjs.map +1 -0
  162. package/fesm2022/elementar-rt-components-phone-input.mjs +637 -0
  163. package/fesm2022/elementar-rt-components-phone-input.mjs.map +1 -0
  164. package/fesm2022/elementar-rt-components-pin-input.mjs +197 -0
  165. package/fesm2022/elementar-rt-components-pin-input.mjs.map +1 -0
  166. package/fesm2022/elementar-rt-components-popover.mjs +262 -0
  167. package/fesm2022/elementar-rt-components-popover.mjs.map +1 -0
  168. package/fesm2022/elementar-rt-components-radio-card.mjs +102 -0
  169. package/fesm2022/elementar-rt-components-radio-card.mjs.map +1 -0
  170. package/fesm2022/elementar-rt-components-rail-nav.mjs +84 -0
  171. package/fesm2022/elementar-rt-components-rail-nav.mjs.map +1 -0
  172. package/fesm2022/elementar-rt-components-resizable-container.mjs +69 -0
  173. package/fesm2022/elementar-rt-components-resizable-container.mjs.map +1 -0
  174. package/fesm2022/elementar-rt-components-screen-loader.mjs +27 -0
  175. package/fesm2022/elementar-rt-components-screen-loader.mjs.map +1 -0
  176. package/fesm2022/elementar-rt-components-scroll-spy.mjs +165 -0
  177. package/fesm2022/elementar-rt-components-scroll-spy.mjs.map +1 -0
  178. package/fesm2022/elementar-rt-components-segmented.mjs +153 -0
  179. package/fesm2022/elementar-rt-components-segmented.mjs.map +1 -0
  180. package/fesm2022/elementar-rt-components-side-panel.mjs +110 -0
  181. package/fesm2022/elementar-rt-components-side-panel.mjs.map +1 -0
  182. package/fesm2022/elementar-rt-components-sidebar.mjs +423 -0
  183. package/fesm2022/elementar-rt-components-sidebar.mjs.map +1 -0
  184. package/fesm2022/elementar-rt-components-signature-pad.mjs +452 -0
  185. package/fesm2022/elementar-rt-components-signature-pad.mjs.map +1 -0
  186. package/fesm2022/elementar-rt-components-skeleton.mjs +56 -0
  187. package/fesm2022/elementar-rt-components-skeleton.mjs.map +1 -0
  188. package/fesm2022/elementar-rt-components-splash-screen.mjs +91 -0
  189. package/fesm2022/elementar-rt-components-splash-screen.mjs.map +1 -0
  190. package/fesm2022/elementar-rt-components-stepper.mjs +194 -0
  191. package/fesm2022/elementar-rt-components-stepper.mjs.map +1 -0
  192. package/fesm2022/elementar-rt-components-suggestions.mjs +76 -0
  193. package/fesm2022/elementar-rt-components-suggestions.mjs.map +1 -0
  194. package/fesm2022/elementar-rt-components-tab-panel.mjs +270 -0
  195. package/fesm2022/elementar-rt-components-tab-panel.mjs.map +1 -0
  196. package/fesm2022/elementar-rt-components-text-editor.mjs +1025 -0
  197. package/fesm2022/elementar-rt-components-text-editor.mjs.map +1 -0
  198. package/fesm2022/elementar-rt-components-thumbnail-maker.mjs +214 -0
  199. package/fesm2022/elementar-rt-components-thumbnail-maker.mjs.map +1 -0
  200. package/fesm2022/elementar-rt-components-timeline.mjs +122 -0
  201. package/fesm2022/elementar-rt-components-timeline.mjs.map +1 -0
  202. package/fesm2022/elementar-rt-components-timezone-select.mjs +351 -0
  203. package/fesm2022/elementar-rt-components-timezone-select.mjs.map +1 -0
  204. package/fesm2022/elementar-rt-components-upload.mjs +340 -0
  205. package/fesm2022/elementar-rt-components-upload.mjs.map +1 -0
  206. package/fesm2022/elementar-rt-components.mjs +6 -0
  207. package/fesm2022/elementar-rt-components.mjs.map +1 -0
  208. package/filter-builder/index.d.ts +107 -0
  209. package/form-renderer/index.d.ts +121 -0
  210. package/gauge/index.d.ts +21 -0
  211. package/icon/index.d.ts +17 -0
  212. package/image-resizer/index.d.ts +35 -0
  213. package/image-viewer/index.d.ts +63 -0
  214. package/incidents/index.d.ts +119 -0
  215. package/index.d.ts +2 -0
  216. package/inline-text-edit/index.d.ts +39 -0
  217. package/input-mask/index.d.ts +36 -0
  218. package/input-validator/index.d.ts +5 -0
  219. package/kanban-board/index.d.ts +68 -0
  220. package/layout/index.d.ts +75 -0
  221. package/logo/index.d.ts +21 -0
  222. package/marquee/index.d.ts +26 -0
  223. package/micro-chart/index.d.ts +193 -0
  224. package/navigation/index.d.ts +119 -0
  225. package/notifications/index.d.ts +84 -0
  226. package/number-input/index.d.ts +93 -0
  227. package/overlay/index.d.ts +12 -0
  228. package/overlay-scrollbar/index.d.ts +66 -0
  229. package/package.json +356 -0
  230. package/page-loading-bar/index.d.ts +20 -0
  231. package/panel/index.d.ts +43 -0
  232. package/password-strength/index.d.ts +109 -0
  233. package/phone-input/index.d.ts +94 -0
  234. package/pin-input/index.d.ts +48 -0
  235. package/popover/index.d.ts +75 -0
  236. package/radio-card/index.d.ts +37 -0
  237. package/rail-nav/index.d.ts +36 -0
  238. package/resizable-container/index.d.ts +21 -0
  239. package/screen-loader/index.d.ts +9 -0
  240. package/scroll-spy/index.d.ts +48 -0
  241. package/segmented/index.d.ts +54 -0
  242. package/side-panel/index.d.ts +42 -0
  243. package/sidebar/index.d.ts +143 -0
  244. package/signature-pad/index.d.ts +49 -0
  245. package/skeleton/index.d.ts +24 -0
  246. package/splash-screen/index.d.ts +31 -0
  247. package/stepper/index.d.ts +65 -0
  248. package/styles/_common.scss +776 -0
  249. package/styles/themes/cyan-orange.scss +41 -0
  250. package/styles/themes/default.scss +5 -0
  251. package/styles/themes/magenta-violet.scss +41 -0
  252. package/styles/themes/rose-red.scss +41 -0
  253. package/suggestions/index.d.ts +32 -0
  254. package/tab-panel/index.d.ts +96 -0
  255. package/text-editor/index.d.ts +191 -0
  256. package/thumbnail-maker/index.d.ts +35 -0
  257. package/timeline/index.d.ts +57 -0
  258. package/timezone-select/index.d.ts +72 -0
  259. package/upload/index.d.ts +134 -0
@@ -0,0 +1,123 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, input, viewChild, Component } from '@angular/core';
3
+ import * as i1 from '@angular/forms';
4
+ import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
5
+ import { MatAutocomplete, MatAutocompleteTrigger, MatOption } from '@angular/material/autocomplete';
6
+ import { MatChipGrid, MatChipInput, MatChipRemove, MatChipRow } from '@angular/material/chips';
7
+ import { ENTER, COMMA } from '@angular/cdk/keycodes';
8
+ import { MatError, MatFormField, MatHint, MatLabel } from '@angular/material/form-field';
9
+ import { MatIcon } from '@angular/material/icon';
10
+ import { startWith, tap, debounceTime, distinctUntilChanged, switchMap, of } from 'rxjs';
11
+ import { MatProgressSpinner } from '@angular/material/progress-spinner';
12
+ import { AsyncPipe } from '@angular/common';
13
+ import { HttpClient, HttpParams } from '@angular/common/http';
14
+
15
+ class AutocompleteManyFieldComponent {
16
+ httpClient = inject(HttpClient);
17
+ control = input.required(...(ngDevMode ? [{ debugName: "control" }] : []));
18
+ config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
19
+ separatorKeysCodes = [ENTER, COMMA];
20
+ chipsCtrl = new FormControl('');
21
+ input = viewChild.required('input');
22
+ value = [];
23
+ filteredOptions$;
24
+ isLoading = false;
25
+ ngOnInit() {
26
+ this.filteredOptions$ = this.chipsCtrl.valueChanges.pipe(startWith(''), tap(() => this.isLoading = true), debounceTime(300), distinctUntilChanged(), switchMap((query) => {
27
+ if (!query || !query.trim()) {
28
+ return of([]);
29
+ }
30
+ const params = new HttpParams().set('query', query || '');
31
+ return this.httpClient.get(this.config().payload?.['autocompleteUrl'], {
32
+ params
33
+ });
34
+ }), tap(() => this.isLoading = false));
35
+ }
36
+ getErrorMessage() {
37
+ const errors = this.control().errors;
38
+ if (!errors) {
39
+ return '';
40
+ }
41
+ const errorKey = Object.keys(errors)[0];
42
+ const validator = this.config().validators?.find((v) => v.type === errorKey);
43
+ return validator?.message || 'Некорректное значение';
44
+ }
45
+ get options() {
46
+ return this.config()?.payload?.['options'] || [];
47
+ }
48
+ get bindValue() {
49
+ return this.config().bindValue || 'id';
50
+ }
51
+ get bindName() {
52
+ return this.config().bindName || 'name';
53
+ }
54
+ add(event) {
55
+ const name = (event.value || '').trim();
56
+ const hasValue = this.value.find(v => v[this.bindName].toLowerCase() === name.toLowerCase());
57
+ if (name && !hasValue) {
58
+ this.value.push({
59
+ [this.bindValue]: null,
60
+ [this.bindName]: name,
61
+ });
62
+ }
63
+ event.chipInput.clear();
64
+ this.chipsCtrl.setValue(null);
65
+ this.isLoading = false;
66
+ this.calculateControlValue();
67
+ }
68
+ remove(chip) {
69
+ const index = this.value.indexOf(chip);
70
+ if (index >= 0) {
71
+ this.value.splice(index, 1);
72
+ this.calculateControlValue();
73
+ }
74
+ }
75
+ onSelected(event) {
76
+ const hasValue = this.value.find(v => v[this.bindName].toLowerCase() === event.option.value[this.bindName].toLowerCase());
77
+ if (!hasValue) {
78
+ this.value.push(event.option.value);
79
+ }
80
+ this.input().nativeElement.value = '';
81
+ this.chipsCtrl.setValue(null);
82
+ this.calculateControlValue();
83
+ this.isLoading = false;
84
+ }
85
+ calculateControlValue() {
86
+ const value = this.value.map(v => {
87
+ const itemValue = v[this.bindValue];
88
+ if (itemValue) {
89
+ return {
90
+ [this.bindValue]: itemValue,
91
+ };
92
+ }
93
+ return v;
94
+ });
95
+ this.control().setValue(value);
96
+ }
97
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AutocompleteManyFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
98
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: AutocompleteManyFieldComponent, isStandalone: true, selector: "emr-autocomplete-many-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (control() && config()) {\r\n <mat-form-field>\r\n <mat-label>{{ config().label }}</mat-label>\r\n <mat-chip-grid #chipGrid>\r\n @for (option of value; track option) {\r\n <mat-chip-row (removed)=\"remove(option)\">\r\n {{ option[bindName] }}\r\n <button matChipRemove>\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip-row>\r\n }\r\n </mat-chip-grid>\r\n <input [placeholder]=\"config().placeholder\"\r\n #input\r\n maxlength=\"30\"\r\n [formControl]=\"chipsCtrl\"\r\n [matChipInputFor]=\"chipGrid\"\r\n [matAutocomplete]=\"autocomplete\"\r\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\r\n (matChipInputTokenEnd)=\"add($event)\">\r\n @if (isLoading) {\r\n <div class=\"loader\">\r\n <mat-progress-spinner\r\n mode=\"indeterminate\"\r\n [diameter]=\"20\"/>\r\n </div>\r\n }\r\n <mat-autocomplete #autocomplete=\"matAutocomplete\" (optionSelected)=\"onSelected($event)\">\r\n @for (option of filteredOptions$ | async; track option) {\r\n <mat-option [value]=\"option\">{{ option[bindName] }}</mat-option>\r\n }\r\n\r\n @if (!(filteredOptions$ | async)?.length && !isLoading && chipsCtrl.value) {\r\n <mat-option disabled>\r\n No search results found.\r\n </mat-option>\r\n }\r\n </mat-autocomplete>\r\n <mat-hint>{{ config().hint }}</mat-hint>\r\n @if (control().invalid && control().touched) {\r\n <mat-error>{{ getErrorMessage() }}</mat-error>\r\n }\r\n </mat-form-field>\r\n}\r\n", styles: [":host{display:block}:host mat-form-field{width:100%}:host .loader{position:absolute;right:0;top:50%;transform:translateY(-50%)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "component", type: 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: "directive", type: MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
99
+ }
100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AutocompleteManyFieldComponent, decorators: [{
101
+ type: Component,
102
+ args: [{ selector: 'emr-autocomplete-many-field', imports: [
103
+ FormsModule,
104
+ MatAutocomplete,
105
+ MatAutocompleteTrigger,
106
+ MatChipGrid,
107
+ MatChipInput,
108
+ MatChipRemove,
109
+ MatChipRow,
110
+ MatError,
111
+ MatFormField,
112
+ MatHint,
113
+ MatIcon,
114
+ MatLabel,
115
+ MatOption,
116
+ ReactiveFormsModule,
117
+ MatProgressSpinner,
118
+ AsyncPipe
119
+ ], template: "@if (control() && config()) {\r\n <mat-form-field>\r\n <mat-label>{{ config().label }}</mat-label>\r\n <mat-chip-grid #chipGrid>\r\n @for (option of value; track option) {\r\n <mat-chip-row (removed)=\"remove(option)\">\r\n {{ option[bindName] }}\r\n <button matChipRemove>\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip-row>\r\n }\r\n </mat-chip-grid>\r\n <input [placeholder]=\"config().placeholder\"\r\n #input\r\n maxlength=\"30\"\r\n [formControl]=\"chipsCtrl\"\r\n [matChipInputFor]=\"chipGrid\"\r\n [matAutocomplete]=\"autocomplete\"\r\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\r\n (matChipInputTokenEnd)=\"add($event)\">\r\n @if (isLoading) {\r\n <div class=\"loader\">\r\n <mat-progress-spinner\r\n mode=\"indeterminate\"\r\n [diameter]=\"20\"/>\r\n </div>\r\n }\r\n <mat-autocomplete #autocomplete=\"matAutocomplete\" (optionSelected)=\"onSelected($event)\">\r\n @for (option of filteredOptions$ | async; track option) {\r\n <mat-option [value]=\"option\">{{ option[bindName] }}</mat-option>\r\n }\r\n\r\n @if (!(filteredOptions$ | async)?.length && !isLoading && chipsCtrl.value) {\r\n <mat-option disabled>\r\n No search results found.\r\n </mat-option>\r\n }\r\n </mat-autocomplete>\r\n <mat-hint>{{ config().hint }}</mat-hint>\r\n @if (control().invalid && control().touched) {\r\n <mat-error>{{ getErrorMessage() }}</mat-error>\r\n }\r\n </mat-form-field>\r\n}\r\n", styles: [":host{display:block}:host mat-form-field{width:100%}:host .loader{position:absolute;right:0;top:50%;transform:translateY(-50%)}\n"] }]
120
+ }], propDecorators: { control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], input: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }] } });
121
+
122
+ export { AutocompleteManyFieldComponent };
123
+ //# sourceMappingURL=elementar-rt-components-form-renderer-autocomplete-many-field.component-AqEghjO_.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elementar-rt-components-form-renderer-autocomplete-many-field.component-AqEghjO_.mjs","sources":["../../../projects/components/form-renderer/src/fields/autocomplete-many-field/autocomplete-many-field.component.ts","../../../projects/components/form-renderer/src/fields/autocomplete-many-field/autocomplete-many-field.component.html"],"sourcesContent":["import { Component, ElementRef, inject, input, OnInit, viewChild } from '@angular/core';\r\nimport { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport {\r\n MatAutocomplete,\r\n MatAutocompleteSelectedEvent,\r\n MatAutocompleteTrigger,\r\n MatOption\r\n} from '@angular/material/autocomplete';\r\nimport { MatChipGrid, MatChipInput, MatChipInputEvent, MatChipRemove, MatChipRow } from '@angular/material/chips';\r\nimport { ComponentConfig } from '../../models/form-config.model';\r\nimport { COMMA, ENTER } from '@angular/cdk/keycodes';\r\nimport { MatError, MatFormField, MatHint, MatLabel } from '@angular/material/form-field';\r\nimport { MatIcon } from '@angular/material/icon';\r\nimport { catchError, debounceTime, distinctUntilChanged, Observable, of, startWith, switchMap, tap } from 'rxjs';\r\nimport { MatProgressSpinner } from '@angular/material/progress-spinner';\r\nimport { AsyncPipe } from '@angular/common';\r\nimport { HttpClient, HttpParams } from '@angular/common/http';\r\n\r\n@Component({\r\n selector: 'emr-autocomplete-many-field',\r\n imports: [\r\n FormsModule,\r\n MatAutocomplete,\r\n MatAutocompleteTrigger,\r\n MatChipGrid,\r\n MatChipInput,\r\n MatChipRemove,\r\n MatChipRow,\r\n MatError,\r\n MatFormField,\r\n MatHint,\r\n MatIcon,\r\n MatLabel,\r\n MatOption,\r\n ReactiveFormsModule,\r\n MatProgressSpinner,\r\n AsyncPipe\r\n ],\r\n templateUrl: './autocomplete-many-field.component.html',\r\n styleUrl: './autocomplete-many-field.component.scss'\r\n})\r\nexport class AutocompleteManyFieldComponent implements OnInit {\r\n private httpClient = inject(HttpClient);\r\n\r\n control = input.required<FormControl>();\r\n config = input.required<ComponentConfig>();\r\n\r\n readonly separatorKeysCodes: number[] = [ENTER, COMMA];\r\n readonly chipsCtrl = new FormControl('');\r\n readonly input = viewChild.required<ElementRef<HTMLInputElement>>('input');\r\n readonly value: any[] = [];\r\n\r\n filteredOptions$!: Observable<any[]>;\r\n isLoading = false;\r\n\r\n ngOnInit() {\r\n this.filteredOptions$ = this.chipsCtrl.valueChanges.pipe(\r\n startWith(''),\r\n tap(() => this.isLoading = true),\r\n debounceTime(300),\r\n distinctUntilChanged(),\r\n switchMap((query: any) => {\r\n if (!query || !query.trim()) {\r\n return of([]);\r\n }\r\n const params = new HttpParams().set('query', query || '');\r\n return this.httpClient.get<any[]>(this.config().payload?.['autocompleteUrl'], {\r\n params\r\n });\r\n }),\r\n tap(() => this.isLoading = false)\r\n );\r\n }\r\n\r\n getErrorMessage(): string {\r\n const errors = this.control().errors;\r\n\r\n if (!errors) {\r\n return '';\r\n }\r\n\r\n const errorKey = Object.keys(errors)[0];\r\n const validator = this.config().validators?.find((v: any) => v.type === errorKey);\r\n return validator?.message || 'Некорректное значение';\r\n }\r\n\r\n get options() {\r\n return this.config()?.payload?.['options'] || [];\r\n }\r\n\r\n get bindValue() {\r\n return this.config().bindValue || 'id';\r\n }\r\n\r\n get bindName() {\r\n return this.config().bindName || 'name';\r\n }\r\n\r\n add(event: MatChipInputEvent): void {\r\n const name = (event.value || '').trim();\r\n const hasValue = this.value.find(\r\n v => v[this.bindName].toLowerCase() === name.toLowerCase()\r\n );\r\n\r\n if (name && !hasValue) {\r\n this.value.push({\r\n [this.bindValue]: null,\r\n [this.bindName]: name,\r\n });\r\n }\r\n\r\n event.chipInput!.clear();\r\n this.chipsCtrl.setValue(null);\r\n this.isLoading = false;\r\n this.calculateControlValue();\r\n }\r\n\r\n remove(chip: any): void {\r\n const index = this.value.indexOf(chip);\r\n\r\n if (index >= 0) {\r\n this.value.splice(index, 1);\r\n this.calculateControlValue();\r\n }\r\n }\r\n\r\n onSelected(event: MatAutocompleteSelectedEvent): void {\r\n const hasValue = this.value.find(\r\n v => v[this.bindName].toLowerCase() === event.option.value[this.bindName].toLowerCase()\r\n );\r\n\r\n if (!hasValue) {\r\n this.value.push(event.option.value);\r\n }\r\n\r\n this.input().nativeElement.value = '';\r\n this.chipsCtrl.setValue(null);\r\n this.calculateControlValue();\r\n this.isLoading = false;\r\n }\r\n\r\n private calculateControlValue() {\r\n const value = this.value.map(v => {\r\n const itemValue = v[this.bindValue];\r\n\r\n if (itemValue) {\r\n return {\r\n [this.bindValue]: itemValue,\r\n };\r\n }\r\n\r\n return v;\r\n });\r\n this.control().setValue(value);\r\n }\r\n}\r\n","@if (control() && config()) {\r\n <mat-form-field>\r\n <mat-label>{{ config().label }}</mat-label>\r\n <mat-chip-grid #chipGrid>\r\n @for (option of value; track option) {\r\n <mat-chip-row (removed)=\"remove(option)\">\r\n {{ option[bindName] }}\r\n <button matChipRemove>\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip-row>\r\n }\r\n </mat-chip-grid>\r\n <input [placeholder]=\"config().placeholder\"\r\n #input\r\n maxlength=\"30\"\r\n [formControl]=\"chipsCtrl\"\r\n [matChipInputFor]=\"chipGrid\"\r\n [matAutocomplete]=\"autocomplete\"\r\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\r\n (matChipInputTokenEnd)=\"add($event)\">\r\n @if (isLoading) {\r\n <div class=\"loader\">\r\n <mat-progress-spinner\r\n mode=\"indeterminate\"\r\n [diameter]=\"20\"/>\r\n </div>\r\n }\r\n <mat-autocomplete #autocomplete=\"matAutocomplete\" (optionSelected)=\"onSelected($event)\">\r\n @for (option of filteredOptions$ | async; track option) {\r\n <mat-option [value]=\"option\">{{ option[bindName] }}</mat-option>\r\n }\r\n\r\n @if (!(filteredOptions$ | async)?.length && !isLoading && chipsCtrl.value) {\r\n <mat-option disabled>\r\n No search results found.\r\n </mat-option>\r\n }\r\n </mat-autocomplete>\r\n <mat-hint>{{ config().hint }}</mat-hint>\r\n @if (control().invalid && control().touched) {\r\n <mat-error>{{ getErrorMessage() }}</mat-error>\r\n }\r\n </mat-form-field>\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAyCa,8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W;wBACX,eAAe;wBACf,sBAAsB;wBACtB,WAAW;wBACX,YAAY;wBACZ,aAAa;wBACb,UAAU;wBACV,QAAQ;wBACR,YAAY;wBACZ,OAAO;wBACP,OAAO;wBACP,QAAQ;wBACR,SAAS;wBACT,mBAAmB;wBACnB,kBAAkB;wBAClB;AACD,qBAAA,EAAA,QAAA,EAAA,moDAAA,EAAA,MAAA,EAAA,CAAA,mIAAA,CAAA,EAAA;2PAYiE,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
@@ -0,0 +1,22 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import * as i1 from '@angular/forms';
4
+ import { ReactiveFormsModule } from '@angular/forms';
5
+ import { MatCheckbox } from '@angular/material/checkbox';
6
+
7
+ class CheckboxFieldComponent {
8
+ control = input.required(...(ngDevMode ? [{ debugName: "control" }] : []));
9
+ config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
10
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: CheckboxFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: CheckboxFieldComponent, isStandalone: true, selector: "emr-checkbox-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if(control() && config()) {\r\n <mat-checkbox [formControl]=\"control()\">\r\n {{ config().label }}\r\n </mat-checkbox>\r\n}\r\n", styles: [":host{display:block;margin-bottom:calc(var(--spacing, .25rem) * 3)}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: 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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
12
+ }
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: CheckboxFieldComponent, decorators: [{
14
+ type: Component,
15
+ args: [{ selector: 'emr-checkbox-field', imports: [
16
+ MatCheckbox,
17
+ ReactiveFormsModule
18
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if(control() && config()) {\r\n <mat-checkbox [formControl]=\"control()\">\r\n {{ config().label }}\r\n </mat-checkbox>\r\n}\r\n", styles: [":host{display:block;margin-bottom:calc(var(--spacing, .25rem) * 3)}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"] }]
19
+ }], propDecorators: { control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }] } });
20
+
21
+ export { CheckboxFieldComponent };
22
+ //# sourceMappingURL=elementar-rt-components-form-renderer-checkbox-field.component-CUKmZGFq.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elementar-rt-components-form-renderer-checkbox-field.component-CUKmZGFq.mjs","sources":["../../../projects/components/form-renderer/src/fields/checkbox-field/checkbox-field.component.ts","../../../projects/components/form-renderer/src/fields/checkbox-field/checkbox-field.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { ComponentConfig } from '../../models/form-config.model';\r\nimport { MatCheckbox } from '@angular/material/checkbox';\r\n\r\n@Component({\r\n selector: 'emr-checkbox-field',\r\n imports: [\r\n MatCheckbox,\r\n ReactiveFormsModule\r\n ],\r\n templateUrl: './checkbox-field.component.html',\r\n styleUrl: './checkbox-field.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class CheckboxFieldComponent {\r\n control = input.required<FormControl>();\r\n config = input.required<ComponentConfig>();\r\n}\r\n","@if(control() && config()) {\r\n <mat-checkbox [formControl]=\"control()\">\r\n {{ config().label }}\r\n </mat-checkbox>\r\n}\r\n"],"names":[],"mappings":";;;;;;MAea,sBAAsB,CAAA;AACjC,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,kDAAe;AACvC,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,iDAAmB;wGAF/B,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAtB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECfnC,wIAKA,EAAA,MAAA,EAAA,CAAA,2IAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDGI,WAAW,sYACX,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAMV,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAVlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,EAAA,OAAA,EACrB;wBACP,WAAW;wBACX;qBACD,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,wIAAA,EAAA,MAAA,EAAA,CAAA,2IAAA,CAAA,EAAA;;;;;"}
@@ -0,0 +1,40 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import * as i1 from '@angular/forms';
4
+ import { ReactiveFormsModule } from '@angular/forms';
5
+ import { MatInput, MatSuffix, MatError, MatLabel, MatFormField } from '@angular/material/input';
6
+ import { MatDatepickerToggle, MatDatepicker, MatDatepickerInput } from '@angular/material/datepicker';
7
+ import { MatHint } from '@angular/material/form-field';
8
+
9
+ class DatepickerFieldComponent {
10
+ control = input.required(...(ngDevMode ? [{ debugName: "control" }] : []));
11
+ config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
12
+ getErrorMessage() {
13
+ const errors = this.control().errors;
14
+ if (!errors)
15
+ return '';
16
+ const errorKey = Object.keys(errors)[0];
17
+ const validator = this.config().validators?.find((v) => v.type === errorKey);
18
+ return validator?.message || 'Invalid value';
19
+ }
20
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: DatepickerFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
21
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: DatepickerFieldComponent, isStandalone: true, selector: "emr-datepicker-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["emrDatepickerField"], ngImport: i0, template: "@if(control() && config()) {\r\n <mat-form-field>\r\n <mat-label>{{ config().label }}</mat-label>\r\n <input matInput [matDatepicker]=\"picker\" [formControl]=\"control()\" readonly>\r\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker></mat-datepicker>\r\n <mat-hint>{{ config().hint }}</mat-hint>\r\n @if (control().invalid && control().touched) {\r\n <mat-error>{{ getErrorMessage() }}</mat-error>\r\n }\r\n </mat-form-field>\r\n}\r\n", styles: [":host{display:block}:host mat-form-field{width:100%}\n"], dependencies: [{ kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: 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: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
22
+ }
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: DatepickerFieldComponent, decorators: [{
24
+ type: Component,
25
+ args: [{ selector: 'emr-datepicker-field', exportAs: 'emrDatepickerField', imports: [
26
+ MatHint,
27
+ MatInput,
28
+ MatSuffix,
29
+ MatDatepickerToggle,
30
+ MatDatepicker,
31
+ MatError,
32
+ MatLabel,
33
+ MatFormField,
34
+ ReactiveFormsModule,
35
+ MatDatepickerInput
36
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if(control() && config()) {\r\n <mat-form-field>\r\n <mat-label>{{ config().label }}</mat-label>\r\n <input matInput [matDatepicker]=\"picker\" [formControl]=\"control()\" readonly>\r\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker></mat-datepicker>\r\n <mat-hint>{{ config().hint }}</mat-hint>\r\n @if (control().invalid && control().touched) {\r\n <mat-error>{{ getErrorMessage() }}</mat-error>\r\n }\r\n </mat-form-field>\r\n}\r\n", styles: [":host{display:block}:host mat-form-field{width:100%}\n"] }]
37
+ }], propDecorators: { control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }] } });
38
+
39
+ export { DatepickerFieldComponent };
40
+ //# sourceMappingURL=elementar-rt-components-form-renderer-datepicker-field.component-DihIRWMt.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elementar-rt-components-form-renderer-datepicker-field.component-DihIRWMt.mjs","sources":["../../../projects/components/form-renderer/src/fields/datepicker-field/datepicker-field.component.ts","../../../projects/components/form-renderer/src/fields/datepicker-field/datepicker-field.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { ComponentConfig } from '../../models/form-config.model';\r\nimport { MatError, MatFormField, MatInput, MatLabel, MatSuffix } from '@angular/material/input';\r\nimport { MatDatepicker, MatDatepickerInput, MatDatepickerToggle } from '@angular/material/datepicker';\r\nimport { MatHint } from '@angular/material/form-field';\r\n\r\n@Component({\r\n selector: 'emr-datepicker-field',\r\n exportAs: 'emrDatepickerField',\r\n imports: [\r\n MatHint,\r\n MatInput,\r\n MatSuffix,\r\n MatDatepickerToggle,\r\n MatDatepicker,\r\n MatError,\r\n MatLabel,\r\n MatFormField,\r\n ReactiveFormsModule,\r\n MatDatepickerInput\r\n ],\r\n templateUrl: './datepicker-field.component.html',\r\n styleUrl: './datepicker-field.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class DatepickerFieldComponent {\r\n control = input.required<FormControl>();\r\n config = input.required<ComponentConfig>();\r\n\r\n getErrorMessage(): string {\r\n const errors = this.control().errors;\r\n if (!errors) return '';\r\n const errorKey = Object.keys(errors)[0];\r\n const validator = this.config().validators?.find((v: any) => v.type === errorKey);\r\n return validator?.message || 'Invalid value';\r\n }\r\n}\r\n","@if(control() && config()) {\r\n <mat-form-field>\r\n <mat-label>{{ config().label }}</mat-label>\r\n <input matInput [matDatepicker]=\"picker\" [formControl]=\"control()\" readonly>\r\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker></mat-datepicker>\r\n <mat-hint>{{ config().hint }}</mat-hint>\r\n @if (control().invalid && control().touched) {\r\n <mat-error>{{ getErrorMessage() }}</mat-error>\r\n }\r\n </mat-form-field>\r\n}\r\n"],"names":[],"mappings":";;;;;;;;MA0Ba,wBAAwB,CAAA;AACnC,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,kDAAe;AACvC,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,iDAAmB;IAE1C,eAAe,GAAA;QACb,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM;AACpC,QAAA,IAAI,CAAC,MAAM;AAAE,YAAA,OAAO,EAAE;QACtB,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACvC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAM,KAAK,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC;AACjF,QAAA,OAAO,SAAS,EAAE,OAAO,IAAI,eAAe;IAC9C;wGAVW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAA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AAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACZ,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,8MAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACnB,kBAAkB,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,eAAA,EAAA,KAAA,EAAA,KAAA,EAAA,qBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAMT,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAnBpC,SAAS;+BACE,sBAAsB,EAAA,QAAA,EACtB,oBAAoB,EAAA,OAAA,EACrB;wBACP,OAAO;wBACP,QAAQ;wBACR,SAAS;wBACT,mBAAmB;wBACnB,aAAa;wBACb,QAAQ;wBACR,QAAQ;wBACR,YAAY;wBACZ,mBAAmB;wBACnB;qBACD,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6gBAAA,EAAA,MAAA,EAAA,CAAA,wDAAA,CAAA,EAAA;;;;;"}
@@ -0,0 +1,17 @@
1
+ import * as i0 from '@angular/core';
2
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { MatDivider } from '@angular/material/divider';
4
+
5
+ class DividerContentComponent {
6
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: DividerContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.10", type: DividerContentComponent, isStandalone: true, selector: "emr-divider-content", exportAs: ["emrDividerContent"], ngImport: i0, template: "<mat-divider/>\r\n", styles: [":host hr{width:100%;border:none;border-top:1px solid #e0e0e0;margin:1rem 0}\n"], dependencies: [{ kind: "component", type: MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8
+ }
9
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: DividerContentComponent, decorators: [{
10
+ type: Component,
11
+ args: [{ selector: 'emr-divider-content', exportAs: 'emrDividerContent', imports: [
12
+ MatDivider
13
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-divider/>\r\n", styles: [":host hr{width:100%;border:none;border-top:1px solid #e0e0e0;margin:1rem 0}\n"] }]
14
+ }] });
15
+
16
+ export { DividerContentComponent };
17
+ //# sourceMappingURL=elementar-rt-components-form-renderer-divider-content.component-CjlGcU3B.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elementar-rt-components-form-renderer-divider-content.component-CjlGcU3B.mjs","sources":["../../../projects/components/form-renderer/src/content/divider-content/divider-content.component.ts","../../../projects/components/form-renderer/src/content/divider-content/divider-content.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\r\nimport { MatDivider } from '@angular/material/divider';\r\n\r\n@Component({\r\n selector: 'emr-divider-content',\r\n exportAs: 'emrDividerContent',\r\n imports: [\r\n MatDivider\r\n ],\r\n templateUrl: './divider-content.component.html',\r\n styleUrl: './divider-content.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class DividerContentComponent {\r\n\r\n}\r\n","<mat-divider/>\r\n"],"names":[],"mappings":";;;;MAaa,uBAAuB,CAAA;wGAAvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,QAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECbpC,oBACA,EAAA,MAAA,EAAA,CAAA,+EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDMI,UAAU,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAMD,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAVnC,SAAS;+BACE,qBAAqB,EAAA,QAAA,EACrB,mBAAmB,EAAA,OAAA,EACpB;wBACP;qBACD,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,+EAAA,CAAA,EAAA;;;;;"}
@@ -0,0 +1,17 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+
4
+ class ImageContentComponent {
5
+ config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
6
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ImageContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: ImageContentComponent, isStandalone: true, selector: "emr-image-content", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "emr-image-content" }, exportAs: ["emrImageContent"], ngImport: i0, template: "@if (config().content; as opts) {\r\n <img [src]=\"opts['src']\"\r\n [alt]=\"opts['alt'] || ''\"\r\n [width]=\"opts['width'] || null\"\r\n [height]=\"opts['height'] || null\">\r\n}\r\n", styles: [":host{display:flex;align-items:center;justify-content:center}:host img{max-width:100%;height:auto;border-radius:4px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8
+ }
9
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ImageContentComponent, decorators: [{
10
+ type: Component,
11
+ args: [{ selector: 'emr-image-content', exportAs: 'emrImageContent', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, host: {
12
+ 'class': 'emr-image-content',
13
+ }, template: "@if (config().content; as opts) {\r\n <img [src]=\"opts['src']\"\r\n [alt]=\"opts['alt'] || ''\"\r\n [width]=\"opts['width'] || null\"\r\n [height]=\"opts['height'] || null\">\r\n}\r\n", styles: [":host{display:flex;align-items:center;justify-content:center}:host img{max-width:100%;height:auto;border-radius:4px}\n"] }]
14
+ }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }] } });
15
+
16
+ export { ImageContentComponent };
17
+ //# sourceMappingURL=elementar-rt-components-form-renderer-image-content.component-0pL2Fk0H.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elementar-rt-components-form-renderer-image-content.component-0pL2Fk0H.mjs","sources":["../../../projects/components/form-renderer/src/content/image-content/image-content.component.ts","../../../projects/components/form-renderer/src/content/image-content/image-content.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\r\nimport { ComponentConfig } from '../../models/form-config.model';\r\n\r\n@Component({\r\n selector: 'emr-image-content',\r\n exportAs: 'emrImageContent',\r\n imports: [],\r\n templateUrl: './image-content.component.html',\r\n styleUrl: './image-content.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n 'class': 'emr-image-content',\r\n }\r\n})\r\nexport class ImageContentComponent {\r\n config = input.required<ComponentConfig>();\r\n}\r\n","@if (config().content; as opts) {\r\n <img [src]=\"opts['src']\"\r\n [alt]=\"opts['alt'] || ''\"\r\n [width]=\"opts['width'] || null\"\r\n [height]=\"opts['height'] || null\">\r\n}\r\n"],"names":[],"mappings":";;;MAca,qBAAqB,CAAA;AAChC,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,iDAAmB;wGAD/B,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAArB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,qBAAqB,iSCdlC,6MAMA,EAAA,MAAA,EAAA,CAAA,wHAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FDQa,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAXjC,SAAS;+BACE,mBAAmB,EAAA,QAAA,EACnB,iBAAiB,EAAA,OAAA,EAClB,EAAE,mBAGM,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,OAAO,EAAE,mBAAmB;AAC7B,qBAAA,EAAA,QAAA,EAAA,6MAAA,EAAA,MAAA,EAAA,CAAA,wHAAA,CAAA,EAAA;;;;;"}
@@ -0,0 +1,33 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { MatFormFieldModule } from '@angular/material/form-field';
4
+ import * as i2 from '@angular/material/input';
5
+ import { MatInputModule } from '@angular/material/input';
6
+ import * as i1 from '@angular/forms';
7
+ import { ReactiveFormsModule } from '@angular/forms';
8
+
9
+ class InputFieldComponent {
10
+ control = input.required(...(ngDevMode ? [{ debugName: "control" }] : []));
11
+ config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
12
+ getErrorMessage() {
13
+ const errors = this.control().errors;
14
+ if (!errors)
15
+ return '';
16
+ const errorKey = Object.keys(errors)[0];
17
+ const validator = this.config().validators?.find((v) => v.type === errorKey);
18
+ return validator?.message || 'Некорректное значение';
19
+ }
20
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: InputFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
21
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: InputFieldComponent, isStandalone: true, selector: "emr-input-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if(control() && config()) {\r\n <mat-form-field>\r\n <mat-label>{{ config().label }}</mat-label>\r\n <input matInput\r\n [type]=\"config().inputType || 'text'\"\r\n [formControl]=\"control()\"\r\n [placeholder]=\"config().placeholder || ''\"\r\n [readonly]=\"config().readonly\">\r\n @if (config().hint) {\r\n <mat-hint>{{ config().hint }}</mat-hint>\r\n }\r\n @if (control().invalid && control().touched) {\r\n <mat-error>{{ getErrorMessage() }}</mat-error>\r\n }\r\n </mat-form-field>\r\n}\r\n", styles: [":host{display:block}:host mat-form-field{width:100%}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.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.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatFormFieldModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
22
+ }
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: InputFieldComponent, decorators: [{
24
+ type: Component,
25
+ args: [{ selector: 'emr-input-field', imports: [
26
+ ReactiveFormsModule,
27
+ MatInputModule,
28
+ MatFormFieldModule
29
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if(control() && config()) {\r\n <mat-form-field>\r\n <mat-label>{{ config().label }}</mat-label>\r\n <input matInput\r\n [type]=\"config().inputType || 'text'\"\r\n [formControl]=\"control()\"\r\n [placeholder]=\"config().placeholder || ''\"\r\n [readonly]=\"config().readonly\">\r\n @if (config().hint) {\r\n <mat-hint>{{ config().hint }}</mat-hint>\r\n }\r\n @if (control().invalid && control().touched) {\r\n <mat-error>{{ getErrorMessage() }}</mat-error>\r\n }\r\n </mat-form-field>\r\n}\r\n", styles: [":host{display:block}:host mat-form-field{width:100%}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"] }]
30
+ }], propDecorators: { control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }] } });
31
+
32
+ export { InputFieldComponent };
33
+ //# sourceMappingURL=elementar-rt-components-form-renderer-input-field.component-X2sKvj6J.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elementar-rt-components-form-renderer-input-field.component-X2sKvj6J.mjs","sources":["../../../projects/components/form-renderer/src/fields/input-field/input-field.component.ts","../../../projects/components/form-renderer/src/fields/input-field/input-field.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { ComponentConfig } from '../../models/form-config.model';\r\n\r\n@Component({\r\n selector: 'emr-input-field',\r\n imports: [\r\n ReactiveFormsModule,\r\n MatInputModule,\r\n MatFormFieldModule\r\n ],\r\n templateUrl: './input-field.component.html',\r\n styleUrl: './input-field.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class InputFieldComponent {\r\n control = input.required<FormControl>();\r\n config = input.required<ComponentConfig>();\r\n\r\n getErrorMessage(): string {\r\n const errors = this.control().errors;\r\n if (!errors) return '';\r\n const errorKey = Object.keys(errors)[0];\r\n const validator = this.config().validators?.find((v: any) => v.type === errorKey);\r\n return validator?.message || 'Некорректное значение';\r\n }\r\n}\r\n","@if(control() && config()) {\r\n <mat-form-field>\r\n <mat-label>{{ config().label }}</mat-label>\r\n <input matInput\r\n [type]=\"config().inputType || 'text'\"\r\n [formControl]=\"control()\"\r\n [placeholder]=\"config().placeholder || ''\"\r\n [readonly]=\"config().readonly\">\r\n @if (config().hint) {\r\n <mat-hint>{{ config().hint }}</mat-hint>\r\n }\r\n @if (control().invalid && control().touched) {\r\n <mat-error>{{ getErrorMessage() }}</mat-error>\r\n }\r\n </mat-form-field>\r\n}\r\n"],"names":[],"mappings":";;;;;;;;MAiBa,mBAAmB,CAAA;AAC9B,IA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AA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACnB,cAAc,k0BACd,kBAAkB,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAMT,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAX/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,OAAA,EAClB;wBACP,mBAAmB;wBACnB,cAAc;wBACd;qBACD,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,wjBAAA,EAAA,MAAA,EAAA,CAAA,4HAAA,CAAA,EAAA;;;;;"}
@@ -0,0 +1,38 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import * as i1 from '@angular/forms';
4
+ import { ReactiveFormsModule } from '@angular/forms';
5
+ import { MatRadioButton, MatRadioGroup } from '@angular/material/radio';
6
+ import { MatError, MatHint } from '@angular/material/form-field';
7
+
8
+ class RadioGroupFieldComponent {
9
+ control = input.required(...(ngDevMode ? [{ debugName: "control" }] : []));
10
+ config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
11
+ getErrorMessage() {
12
+ const errors = this.control().errors;
13
+ if (!errors) {
14
+ return '';
15
+ }
16
+ const errorKey = Object.keys(errors)[0];
17
+ const validator = this.config().validators?.find((v) => v.type === errorKey);
18
+ return validator?.message || 'Invalid value';
19
+ }
20
+ get options() {
21
+ return this.config().payload?.['options'] || [];
22
+ }
23
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: RadioGroupFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
24
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: RadioGroupFieldComponent, isStandalone: true, selector: "emr-radio-group-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["emrRadioGroupField"], ngImport: i0, template: "@if (control() && config()) {\r\n <div class=\"radio-group-container\">\r\n @if (config().label) {\r\n <div class=\"radio-group-label\">{{ config().label }}</div>\r\n }\r\n <mat-radio-group\r\n [formControl]=\"control()\"\r\n [class.inline]=\"config().inline\">\r\n @for (option of options; track option.value) {\r\n <mat-radio-button [value]=\"option.value\">{{ option.label }}</mat-radio-button>\r\n }\r\n </mat-radio-group>\r\n @if (config().hint && (control().valid || control().invalid && !control().touched)) {\r\n <mat-hint>{{ config().hint }}</mat-hint>\r\n }\r\n @if (control().invalid && control().touched) {\r\n <mat-error>{{ getErrorMessage() }}</mat-error>\r\n }\r\n </div>\r\n}\r\n", styles: [":host{display:block;margin-bottom:calc(var(--spacing, .25rem) * 6)}:host .radio-group-label{display:block;color:var(--mat-form-field-outlined-label-text-color);font-size:calc(var(--mat-form-field-outlined-label-text-size) * .75)}:host mat-radio-group{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 1)}:host mat-radio-group.inline{flex-direction:row;flex-wrap:wrap;align-items:center;gap:calc(var(--spacing, .25rem) * 4)}:host mat-hint{display:block;font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size))}:host mat-error{display:block;font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));letter-spacing:var(--mat-form-field-subscript-text-tracking, var(--mat-sys-body-small-tracking));font-weight:var(--mat-form-field-subscript-text-weight, var(--mat-sys-body-small-weight))}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "directive", type: MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
25
+ }
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: RadioGroupFieldComponent, decorators: [{
27
+ type: Component,
28
+ args: [{ selector: 'emr-radio-group-field', exportAs: 'emrRadioGroupField', imports: [
29
+ MatRadioButton,
30
+ MatRadioGroup,
31
+ ReactiveFormsModule,
32
+ MatError,
33
+ MatHint,
34
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (control() && config()) {\r\n <div class=\"radio-group-container\">\r\n @if (config().label) {\r\n <div class=\"radio-group-label\">{{ config().label }}</div>\r\n }\r\n <mat-radio-group\r\n [formControl]=\"control()\"\r\n [class.inline]=\"config().inline\">\r\n @for (option of options; track option.value) {\r\n <mat-radio-button [value]=\"option.value\">{{ option.label }}</mat-radio-button>\r\n }\r\n </mat-radio-group>\r\n @if (config().hint && (control().valid || control().invalid && !control().touched)) {\r\n <mat-hint>{{ config().hint }}</mat-hint>\r\n }\r\n @if (control().invalid && control().touched) {\r\n <mat-error>{{ getErrorMessage() }}</mat-error>\r\n }\r\n </div>\r\n}\r\n", styles: [":host{display:block;margin-bottom:calc(var(--spacing, .25rem) * 6)}:host .radio-group-label{display:block;color:var(--mat-form-field-outlined-label-text-color);font-size:calc(var(--mat-form-field-outlined-label-text-size) * .75)}:host mat-radio-group{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 1)}:host mat-radio-group.inline{flex-direction:row;flex-wrap:wrap;align-items:center;gap:calc(var(--spacing, .25rem) * 4)}:host mat-hint{display:block;font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size))}:host mat-error{display:block;font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));letter-spacing:var(--mat-form-field-subscript-text-tracking, var(--mat-sys-body-small-tracking));font-weight:var(--mat-form-field-subscript-text-weight, var(--mat-sys-body-small-weight))}\n/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */\n"] }]
35
+ }], propDecorators: { control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }] } });
36
+
37
+ export { RadioGroupFieldComponent };
38
+ //# sourceMappingURL=elementar-rt-components-form-renderer-radio-group-field.component-DWXZAA3F.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elementar-rt-components-form-renderer-radio-group-field.component-DWXZAA3F.mjs","sources":["../../../projects/components/form-renderer/src/fields/radio-group-field/radio-group-field.component.ts","../../../projects/components/form-renderer/src/fields/radio-group-field/radio-group-field.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { ComponentConfig } from '../../models/form-config.model';\r\nimport { MatRadioButton, MatRadioGroup } from '@angular/material/radio';\r\nimport { MatError, MatHint } from '@angular/material/form-field';\r\n\r\n@Component({\r\n selector: 'emr-radio-group-field',\r\n exportAs: 'emrRadioGroupField',\r\n imports: [\r\n MatRadioButton,\r\n MatRadioGroup,\r\n ReactiveFormsModule,\r\n MatError,\r\n MatHint,\r\n ],\r\n templateUrl: './radio-group-field.component.html',\r\n styleUrl: './radio-group-field.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class RadioGroupFieldComponent {\r\n control = input.required<FormControl>();\r\n config = input.required<ComponentConfig>();\r\n\r\n getErrorMessage(): string {\r\n const errors = this.control().errors;\r\n if (!errors) {\r\n return '';\r\n }\r\n const errorKey = Object.keys(errors)[0];\r\n const validator = this.config().validators?.find((v: any) => v.type === errorKey);\r\n return validator?.message || 'Invalid value';\r\n }\r\n\r\n get options() {\r\n return this.config().payload?.['options'] || [];\r\n }\r\n}\r\n","@if (control() && config()) {\r\n <div class=\"radio-group-container\">\r\n @if (config().label) {\r\n <div class=\"radio-group-label\">{{ config().label }}</div>\r\n }\r\n <mat-radio-group\r\n [formControl]=\"control()\"\r\n [class.inline]=\"config().inline\">\r\n @for (option of options; track option.value) {\r\n <mat-radio-button [value]=\"option.value\">{{ option.label }}</mat-radio-button>\r\n }\r\n </mat-radio-group>\r\n @if (config().hint && (control().valid || control().invalid && !control().touched)) {\r\n <mat-hint>{{ config().hint }}</mat-hint>\r\n }\r\n @if (control().invalid && control().touched) {\r\n <mat-error>{{ getErrorMessage() }}</mat-error>\r\n }\r\n </div>\r\n}\r\n"],"names":[],"mappings":";;;;;;;MAoBa,wBAAwB,CAAA;AACnC,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,kDAAe;AACvC,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,iDAAmB;IAE1C,eAAe,GAAA;QACb,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM;QACpC,IAAI,CAAC,MAAM,EAAE;AACX,YAAA,OAAO,EAAE;QACX;QACA,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACvC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAM,KAAK,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC;AACjF,QAAA,OAAO,SAAS,EAAE,OAAO,IAAI,eAAe;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ectionStrategy, Component } from '@angular/core';
3
+ import * as i1 from '@angular/forms';
4
+ import { ReactiveFormsModule } from '@angular/forms';
5
+ import { MatError, MatHint, MatLabel, MatFormField } from '@angular/material/form-field';
6
+ import { MatOption, MatSelect } from '@angular/material/select';
7
+
8
+ class SelectFieldComponent {
9
+ control = input.required(...(ngDevMode ? [{ debugName: "control" }] : []));
10
+ config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
11
+ getErrorMessage() {
12
+ const errors = this.control().errors;
13
+ if (!errors)
14
+ return '';
15
+ const errorKey = Object.keys(errors)[0];
16
+ const validator = this.config().validators?.find((v) => v.type === errorKey);
17
+ return validator?.message || 'Invalid value';
18
+ }
19
+ get options() {
20
+ return this.config()?.payload?.['options'] || [];
21
+ }
22
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: SelectFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
23
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: SelectFieldComponent, isStandalone: true, selector: "emr-select-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["emrSelectField"], ngImport: i0, template: "@if (control() && config()) {\r\n <mat-form-field>\r\n <mat-label>{{ config().label }}</mat-label>\r\n <mat-select [formControl]=\"control()\">\r\n @for (option of options; track option.value) {\r\n <mat-option [value]=\"option.value\">{{ option.label }}</mat-option>\r\n }\r\n </mat-select>\r\n <mat-hint>{{ config().hint }}</mat-hint>\r\n @if (control().invalid && control().touched) {\r\n <mat-error>{{ getErrorMessage() }}</mat-error>\r\n }\r\n </mat-form-field>\r\n}\r\n", styles: [":host{display:block}mat-form-field{width:100%}\n"], dependencies: [{ kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
24
+ }
25
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: SelectFieldComponent, decorators: [{
26
+ type: Component,
27
+ args: [{ selector: 'emr-select-field', exportAs: 'emrSelectField', imports: [
28
+ MatError,
29
+ MatHint,
30
+ MatOption,
31
+ MatSelect,
32
+ MatLabel,
33
+ MatFormField,
34
+ ReactiveFormsModule
35
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (control() && config()) {\r\n <mat-form-field>\r\n <mat-label>{{ config().label }}</mat-label>\r\n <mat-select [formControl]=\"control()\">\r\n @for (option of options; track option.value) {\r\n <mat-option [value]=\"option.value\">{{ option.label }}</mat-option>\r\n }\r\n </mat-select>\r\n <mat-hint>{{ config().hint }}</mat-hint>\r\n @if (control().invalid && control().touched) {\r\n <mat-error>{{ getErrorMessage() }}</mat-error>\r\n }\r\n </mat-form-field>\r\n}\r\n", styles: [":host{display:block}mat-form-field{width:100%}\n"] }]
36
+ }], propDecorators: { control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }] } });
37
+
38
+ export { SelectFieldComponent };
39
+ //# sourceMappingURL=elementar-rt-components-form-renderer-select-field.component-Cx9DZoD6.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elementar-rt-components-form-renderer-select-field.component-Cx9DZoD6.mjs","sources":["../../../projects/components/form-renderer/src/fields/select-field/select-field.component.ts","../../../projects/components/form-renderer/src/fields/select-field/select-field.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { ComponentConfig } from '../../models/form-config.model';\r\nimport { MatError, MatFormField, MatHint, MatLabel } from '@angular/material/form-field';\r\nimport { MatOption, MatSelect } from '@angular/material/select';\r\n\r\n@Component({\r\n selector: 'emr-select-field',\r\n exportAs: 'emrSelectField',\r\n imports: [\r\n MatError,\r\n MatHint,\r\n MatOption,\r\n MatSelect,\r\n MatLabel,\r\n MatFormField,\r\n ReactiveFormsModule\r\n ],\r\n templateUrl: './select-field.component.html',\r\n styleUrl: './select-field.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class SelectFieldComponent {\r\n control = input.required<FormControl>();\r\n config = input.required<ComponentConfig>();\r\n\r\n getErrorMessage(): string {\r\n const errors = this.control().errors;\r\n if (!errors) return '';\r\n const errorKey = Object.keys(errors)[0];\r\n const validator = this.config().validators?.find((v: any) => v.type === errorKey);\r\n return validator?.message || 'Invalid value';\r\n }\r\n\r\n get options() {\r\n return this.config()?.payload?.['options'] || [];\r\n }\r\n}\r\n","@if (control() && config()) {\r\n <mat-form-field>\r\n <mat-label>{{ config().label }}</mat-label>\r\n <mat-select [formControl]=\"control()\">\r\n @for (option of options; track option.value) {\r\n <mat-option [value]=\"option.value\">{{ option.label }}</mat-option>\r\n }\r\n </mat-select>\r\n <mat-hint>{{ config().hint }}</mat-hint>\r\n @if (control().invalid && control().touched) {\r\n <mat-error>{{ getErrorMessage() }}</mat-error>\r\n }\r\n </mat-form-field>\r\n}\r\n"],"names":[],"mappings":";;;;;;;MAsBa,oBAAoB,CAAA;AAC/B,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,kDAAe;AACvC,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,iDAAmB;IAE1C,eAAe,GAAA;QACb,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM;AACpC,QAAA,IAAI,CAAC,MAAM;AAAE,YAAA,OAAO,EAAE;QACtB,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACvC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAM,KAAK,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC;AACjF,QAAA,OAAO,SAAS,EAAE,OAAO,IAAI,eAAe;IAC9C;AAEA,IAAA,IAAI,OAAO,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,MAAM,EAAE,EAAE,OAAO,GAAG,SAAS,CAAC,IAAI,EAAE;IAClD;wGAdW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAA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,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACT,QAAQ,EAAA,QAAA,EAAA,WAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACR,YAAY,2LACZ,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAMV,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAhBhC,SAAS;+BACE,kBAAkB,EAAA,QAAA,EAClB,gBAAgB,EAAA,OAAA,EACjB;wBACP,QAAQ;wBACR,OAAO;wBACP,SAAS;wBACT,SAAS;wBACT,QAAQ;wBACR,YAAY;wBACZ;qBACD,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,ugBAAA,EAAA,MAAA,EAAA,CAAA,kDAAA,CAAA,EAAA;;;;;"}
@@ -0,0 +1,24 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, Component } from '@angular/core';
3
+ import * as i1 from '@angular/platform-browser';
4
+
5
+ class TextContentComponent {
6
+ sanitizer;
7
+ config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
8
+ sanitizedHtml = '';
9
+ constructor(sanitizer) {
10
+ this.sanitizer = sanitizer;
11
+ }
12
+ ngOnInit() {
13
+ this.sanitizedHtml = this.sanitizer.bypassSecurityTrustHtml(this.config().content?.['htmlContent'] || '');
14
+ }
15
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: TextContentComponent, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
16
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.10", type: TextContentComponent, isStandalone: true, selector: "emr-text-content", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div [innerHTML]=\"sanitizedHtml\"></div>\r\n", styles: [""] });
17
+ }
18
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: TextContentComponent, decorators: [{
19
+ type: Component,
20
+ args: [{ selector: 'emr-text-content', imports: [], template: "<div [innerHTML]=\"sanitizedHtml\"></div>\r\n" }]
21
+ }], ctorParameters: () => [{ type: i1.DomSanitizer }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }] } });
22
+
23
+ export { TextContentComponent };
24
+ //# sourceMappingURL=elementar-rt-components-form-renderer-text-content.component-BmFyUG06.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elementar-rt-components-form-renderer-text-content.component-BmFyUG06.mjs","sources":["../../../projects/components/form-renderer/src/content/text-content/text-content.component.ts","../../../projects/components/form-renderer/src/content/text-content/text-content.component.html"],"sourcesContent":["import { Component, input } from '@angular/core';\r\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\r\nimport { ComponentConfig } from '../../models/form-config.model';\r\n\r\n@Component({\r\n selector: 'emr-text-content',\r\n imports: [],\r\n templateUrl: './text-content.component.html',\r\n styleUrl: './text-content.component.scss'\r\n})\r\nexport class TextContentComponent {\r\n config = input.required<ComponentConfig>();\r\n sanitizedHtml: SafeHtml = '';\r\n\r\n constructor(private sanitizer: DomSanitizer) {}\r\n\r\n ngOnInit() {\r\n this.sanitizedHtml = this.sanitizer.bypassSecurityTrustHtml(\r\n this.config().content?.['htmlContent'] || ''\r\n );\r\n }\r\n}\r\n","<div [innerHTML]=\"sanitizedHtml\"></div>\r\n"],"names":[],"mappings":";;;;MAUa,oBAAoB,CAAA;AAIX,IAAA,SAAA;AAHpB,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,iDAAmB;IAC1C,aAAa,GAAa,EAAE;AAE5B,IAAA,WAAA,CAAoB,SAAuB,EAAA;QAAvB,IAAA,CAAA,SAAS,GAAT,SAAS;IAAiB;IAE9C,QAAQ,GAAA;QACN,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,uBAAuB,CACzD,IAAI,CAAC,MAAM,EAAE,CAAC,OAAO,GAAG,aAAa,CAAC,IAAI,EAAE,CAC7C;IACH;wGAVW,oBAAoB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,oBAAoB,kNCVjC,+CACA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FDSa,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,WACnB,EAAE,EAAA,QAAA,EAAA,+CAAA,EAAA;;;;;"}
@@ -0,0 +1,37 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import * as i1 from '@angular/forms';
4
+ import { ReactiveFormsModule } from '@angular/forms';
5
+ import { MatError, MatHint, MatLabel, MatFormField } from '@angular/material/form-field';
6
+ import { MatInput } from '@angular/material/input';
7
+ import { CdkTextareaAutosize } from '@angular/cdk/text-field';
8
+
9
+ class TextareaFieldComponent {
10
+ control = input.required(...(ngDevMode ? [{ debugName: "control" }] : []));
11
+ config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
12
+ getErrorMessage() {
13
+ const errors = this.control().errors;
14
+ if (!errors)
15
+ return '';
16
+ const errorKey = Object.keys(errors)[0];
17
+ const validator = this.config().validators?.find((v) => v.type === errorKey);
18
+ return validator?.message || 'Invalid value';
19
+ }
20
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: TextareaFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
21
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: TextareaFieldComponent, isStandalone: true, selector: "emr-textarea-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["emrTextareaField"], ngImport: i0, template: "@if(control() && config()) {\r\n <mat-form-field>\r\n <mat-label>{{ config().label }}</mat-label>\r\n <textarea matInput\r\n [formControl]=\"control()\"\r\n [placeholder]=\"config().placeholder || ''\"\r\n [readonly]=\"config().readonly\"\r\n cdkTextareaAutosize></textarea>\r\n <mat-hint>{{ config().hint }}</mat-hint>\r\n @if (control().invalid && control().touched) {\r\n <mat-error>{{ getErrorMessage() }}</mat-error>\r\n }\r\n </mat-form-field>\r\n}\r\n", styles: [":host{display:block}mat-form-field{width:100%}\n"], dependencies: [{ kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: 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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
22
+ }
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: TextareaFieldComponent, decorators: [{
24
+ type: Component,
25
+ args: [{ selector: 'emr-textarea-field', exportAs: 'emrTextareaField', imports: [
26
+ MatError,
27
+ MatHint,
28
+ MatLabel,
29
+ MatFormField,
30
+ MatInput,
31
+ ReactiveFormsModule,
32
+ CdkTextareaAutosize
33
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if(control() && config()) {\r\n <mat-form-field>\r\n <mat-label>{{ config().label }}</mat-label>\r\n <textarea matInput\r\n [formControl]=\"control()\"\r\n [placeholder]=\"config().placeholder || ''\"\r\n [readonly]=\"config().readonly\"\r\n cdkTextareaAutosize></textarea>\r\n <mat-hint>{{ config().hint }}</mat-hint>\r\n @if (control().invalid && control().touched) {\r\n <mat-error>{{ getErrorMessage() }}</mat-error>\r\n }\r\n </mat-form-field>\r\n}\r\n", styles: [":host{display:block}mat-form-field{width:100%}\n"] }]
34
+ }], propDecorators: { control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }] } });
35
+
36
+ export { TextareaFieldComponent };
37
+ //# sourceMappingURL=elementar-rt-components-form-renderer-textarea-field.component-D9KmE049.mjs.map