@yuuvis/client-framework 1.0.3 → 2.0.0-beta.2

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 (389) hide show
  1. package/actions/lib/actions/delete-action/delete/delete.component.d.ts +3 -3
  2. package/actions/lib/actions/delete-action/delete-action.d.ts +1 -1
  3. package/actions/lib/actions.service.d.ts +7 -3
  4. package/actions/lib/components/contextmenu/contextmenu.component.d.ts +3 -1
  5. package/autocomplete/README.md +3 -0
  6. package/autocomplete/index.d.ts +3 -0
  7. package/autocomplete/lib/autocomplete.component.d.ts +72 -0
  8. package/autocomplete/lib/autocomplete.interface.d.ts +4 -0
  9. package/autocomplete/lib/autocomplete.module.d.ts +7 -0
  10. package/common/index.d.ts +4 -4
  11. package/common/lib/common.module.d.ts +19 -0
  12. package/common/lib/common.utils.d.ts +2 -0
  13. package/common/lib/components/confirm/confirm.component.d.ts +7 -0
  14. package/common/lib/components/confirm/confirm.interface.d.ts +7 -0
  15. package/common/lib/components/confirm/confirm.service.d.ts +9 -0
  16. package/common/lib/components/dialog/dialog.component.d.ts +6 -0
  17. package/common/lib/components/dialog/dialog.options.d.ts +7 -0
  18. package/common/lib/components/index.d.ts +5 -0
  19. package/common/lib/directives/autofocus-child.directive.d.ts +13 -0
  20. package/common/lib/directives/autofocus-delayed.directive.d.ts +18 -0
  21. package/common/lib/directives/drag-scroll.directive.d.ts +20 -0
  22. package/common/lib/directives/index.d.ts +8 -4
  23. package/common/lib/directives/noop-value-accessor.directive.d.ts +2 -2
  24. package/common/lib/mat-form-field.abstract.d.ts +41 -0
  25. package/common/lib/services/index.d.ts +1 -1
  26. package/common/lib/services/layout-settings/layout-settings.service.d.ts +18 -0
  27. package/datepicker/README.md +3 -0
  28. package/datepicker/index.d.ts +5 -0
  29. package/datepicker/lib/calendar/calendar.component.d.ts +72 -0
  30. package/datepicker/lib/date-input/date-input-element/date-input-element.component.d.ts +43 -0
  31. package/datepicker/lib/date-input/date-input-hour-element/date-input-hour-element.component.d.ts +11 -0
  32. package/datepicker/lib/date-input/date-input.component.d.ts +61 -0
  33. package/datepicker/lib/datepicker-calendar/datepicker-calendar-trigger.component.d.ts +7 -0
  34. package/datepicker/lib/datepicker-calendar/datepicker-calendar.component.d.ts +12 -0
  35. package/datepicker/lib/datepicker.component.d.ts +80 -0
  36. package/datepicker/lib/datepicker.interface.d.ts +34 -0
  37. package/datepicker/lib/datepicker.module.d.ts +9 -0
  38. package/datepicker/lib/datepicker.service.d.ts +46 -0
  39. package/datepicker/lib/datepicker.utils.d.ts +23 -0
  40. package/datepicker/lib/time-input/time-input.component.d.ts +36 -0
  41. package/datepicker/lib/time-input/time-input.interface.d.ts +6 -0
  42. package/fesm2022/yuuvis-client-framework-actions.mjs +147 -105
  43. package/fesm2022/yuuvis-client-framework-actions.mjs.map +1 -1
  44. package/fesm2022/yuuvis-client-framework-app-bar.mjs +7 -8
  45. package/fesm2022/yuuvis-client-framework-app-bar.mjs.map +1 -1
  46. package/fesm2022/yuuvis-client-framework-autocomplete.mjs +210 -0
  47. package/fesm2022/yuuvis-client-framework-autocomplete.mjs.map +1 -0
  48. package/fesm2022/yuuvis-client-framework-clipboard.mjs +9 -9
  49. package/fesm2022/yuuvis-client-framework-clipboard.mjs.map +1 -1
  50. package/fesm2022/yuuvis-client-framework-common.mjs +853 -780
  51. package/fesm2022/yuuvis-client-framework-common.mjs.map +1 -1
  52. package/fesm2022/yuuvis-client-framework-datepicker.mjs +1688 -0
  53. package/fesm2022/yuuvis-client-framework-datepicker.mjs.map +1 -0
  54. package/fesm2022/yuuvis-client-framework-forms.mjs +945 -1157
  55. package/fesm2022/yuuvis-client-framework-forms.mjs.map +1 -1
  56. package/fesm2022/yuuvis-client-framework-icons.mjs +85 -12
  57. package/fesm2022/yuuvis-client-framework-icons.mjs.map +1 -1
  58. package/fesm2022/yuuvis-client-framework-list.mjs +81 -45
  59. package/fesm2022/yuuvis-client-framework-list.mjs.map +1 -1
  60. package/fesm2022/yuuvis-client-framework-master-details.mjs +112 -0
  61. package/fesm2022/yuuvis-client-framework-master-details.mjs.map +1 -0
  62. package/fesm2022/yuuvis-client-framework-metadata-form-defaults.mjs +60 -0
  63. package/fesm2022/yuuvis-client-framework-metadata-form-defaults.mjs.map +1 -0
  64. package/fesm2022/yuuvis-client-framework-metadata-form.mjs +125 -100
  65. package/fesm2022/yuuvis-client-framework-metadata-form.mjs.map +1 -1
  66. package/fesm2022/yuuvis-client-framework-object-details.mjs +49 -59
  67. package/fesm2022/yuuvis-client-framework-object-details.mjs.map +1 -1
  68. package/fesm2022/yuuvis-client-framework-object-flavor.mjs +188 -77
  69. package/fesm2022/yuuvis-client-framework-object-flavor.mjs.map +1 -1
  70. package/fesm2022/yuuvis-client-framework-object-form.mjs +99 -184
  71. package/fesm2022/yuuvis-client-framework-object-form.mjs.map +1 -1
  72. package/fesm2022/yuuvis-client-framework-object-preview.mjs +11 -11
  73. package/fesm2022/yuuvis-client-framework-object-preview.mjs.map +1 -1
  74. package/fesm2022/yuuvis-client-framework-object-summary.mjs +46 -42
  75. package/fesm2022/yuuvis-client-framework-object-summary.mjs.map +1 -1
  76. package/fesm2022/yuuvis-client-framework-overflow-menu.mjs +126 -0
  77. package/fesm2022/yuuvis-client-framework-overflow-menu.mjs.map +1 -0
  78. package/fesm2022/yuuvis-client-framework-pagination.mjs +7 -9
  79. package/fesm2022/yuuvis-client-framework-pagination.mjs.map +1 -1
  80. package/fesm2022/yuuvis-client-framework-panel.mjs +8 -7
  81. package/fesm2022/yuuvis-client-framework-panel.mjs.map +1 -1
  82. package/fesm2022/yuuvis-client-framework-popout.mjs +212 -0
  83. package/fesm2022/yuuvis-client-framework-popout.mjs.map +1 -0
  84. package/fesm2022/yuuvis-client-framework-renderer.mjs +99 -72
  85. package/fesm2022/yuuvis-client-framework-renderer.mjs.map +1 -1
  86. package/fesm2022/yuuvis-client-framework-sequence-list.mjs +29 -112
  87. package/fesm2022/yuuvis-client-framework-sequence-list.mjs.map +1 -1
  88. package/fesm2022/yuuvis-client-framework-simple-search.mjs +40 -21
  89. package/fesm2022/yuuvis-client-framework-simple-search.mjs.map +1 -1
  90. package/fesm2022/yuuvis-client-framework-split-view.mjs +188 -0
  91. package/fesm2022/yuuvis-client-framework-split-view.mjs.map +1 -0
  92. package/fesm2022/yuuvis-client-framework-tile-list.mjs +100 -93
  93. package/fesm2022/yuuvis-client-framework-tile-list.mjs.map +1 -1
  94. package/fesm2022/yuuvis-client-framework-tree.mjs +15 -15
  95. package/fesm2022/yuuvis-client-framework-tree.mjs.map +1 -1
  96. package/fesm2022/yuuvis-client-framework-upload-progress.mjs +16 -21
  97. package/fesm2022/yuuvis-client-framework-upload-progress.mjs.map +1 -1
  98. package/fesm2022/yuuvis-client-framework.mjs +4 -4
  99. package/fesm2022/yuuvis-client-framework.mjs.map +1 -1
  100. package/forms/index.d.ts +7 -1
  101. package/forms/lib/elements/catalog/catalog.component.d.ts +17 -56
  102. package/forms/lib/elements/data-grid/edit-table-data/edit-data.component.d.ts +5 -4
  103. package/forms/lib/elements/datetime/datetime.component.d.ts +19 -10
  104. package/forms/lib/elements/datetime-range/datetime-range.component.d.ts +12 -27
  105. package/forms/lib/elements/index.d.ts +0 -1
  106. package/forms/lib/elements/number/number.component.d.ts +21 -30
  107. package/forms/lib/elements/number-range/number-range.component.d.ts +12 -7
  108. package/forms/lib/elements/organization/organization.component.d.ts +23 -51
  109. package/forms/lib/elements/range-select-date/range-select-date.component.d.ts +12 -7
  110. package/forms/lib/elements/range-select-filesize/range-select-filesize.component.d.ts +12 -7
  111. package/forms/lib/elements/string/string.component.d.ts +15 -20
  112. package/forms/lib/forms.module.d.ts +8 -11
  113. package/icons/index.d.ts +1 -0
  114. package/icons/lib/icon.component.d.ts +20 -0
  115. package/lib/assets/i18n/de.json +7 -23
  116. package/lib/assets/i18n/en.json +10 -26
  117. package/list/index.d.ts +1 -0
  118. package/list/lib/list-item.directive.d.ts +5 -4
  119. package/list/lib/list.component.d.ts +6 -3
  120. package/list/lib/list.module.d.ts +8 -0
  121. package/master-details/README.md +3 -0
  122. package/master-details/index.d.ts +2 -0
  123. package/master-details/lib/master-details.component.d.ts +58 -0
  124. package/master-details/lib/master-details.interface.d.ts +7 -0
  125. package/master-details/lib/master-details.module.d.ts +7 -0
  126. package/metadata-form/index.d.ts +4 -1
  127. package/metadata-form/lib/metadata-form-field/metadata-form-field.component.d.ts +4 -17
  128. package/metadata-form/lib/metadata-form-field/metadata-form-field.interface.d.ts +11 -0
  129. package/metadata-form/lib/object-metadata-element-error.directive.d.ts +13 -0
  130. package/metadata-form/lib/object-metadata-element-label.directive.d.ts +10 -0
  131. package/metadata-form/lib/object-metadata-element-template.directive.d.ts +3 -3
  132. package/metadata-form-defaults/README.md +3 -0
  133. package/metadata-form-defaults/index.d.ts +2 -0
  134. package/metadata-form-defaults/lib/metadata-form-defaults.module.d.ts +7 -0
  135. package/object-details/lib/object-audit/object-audit.component.d.ts +3 -9
  136. package/object-details/lib/object-details.component.d.ts +0 -2
  137. package/object-details/lib/object-metadata/object-metadata.component.d.ts +4 -3
  138. package/object-details/lib/retention-badge/retention-badge.component.d.ts +0 -3
  139. package/object-flavor/index.d.ts +1 -0
  140. package/object-flavor/lib/abstract-apply-create-flavor/abstract-apply-create-flavor.component.d.ts +1 -2
  141. package/object-flavor/lib/abstract-apply-object-flavor/abstract-apply-object-flavor.component.d.ts +3 -2
  142. package/object-flavor/lib/default-apply-flavor/default-apply-flavor.component.d.ts +19 -0
  143. package/object-flavor/lib/flavor-chip/flavor-chip.component.d.ts +1 -1
  144. package/object-flavor/lib/object-flavor/object-flavor.component.d.ts +3 -6
  145. package/object-flavor/lib/object-flavor-picker/object-flavor-picker.component.d.ts +0 -1
  146. package/object-form/index.d.ts +1 -1
  147. package/object-form/lib/object-form-element/object-form-element.component.d.ts +2 -2
  148. package/object-form/lib/object-form-group/object-form-group.component.d.ts +1 -3
  149. package/object-form/lib/object-form.component.d.ts +2 -2
  150. package/object-form/lib/object-form.interface.d.ts +0 -44
  151. package/object-form/lib/object-form.module.d.ts +7 -0
  152. package/object-form/lib/object-form.service.d.ts +1 -2
  153. package/object-form/lib/object-form.utils.d.ts +1 -1
  154. package/object-summary/lib/object-summary/object-summary.component.d.ts +13 -15
  155. package/overflow-menu/README.md +3 -0
  156. package/overflow-menu/index.d.ts +3 -0
  157. package/overflow-menu/lib/overflow-menu.component.d.ts +31 -0
  158. package/overflow-menu/lib/overflow-menu.interface.d.ts +9 -0
  159. package/overflow-menu/lib/overflow-menu.module.d.ts +7 -0
  160. package/package.json +40 -66
  161. package/popout/README.md +3 -0
  162. package/popout/index.d.ts +3 -0
  163. package/popout/lib/popout.component.d.ts +58 -0
  164. package/popout/lib/popout.interface.d.ts +17 -0
  165. package/popout/lib/popout.module.d.ts +7 -0
  166. package/renderer/lib/property-renderer/abstract.renderer.d.ts +4 -4
  167. package/renderer/lib/property-renderer/icon.renderer.component.d.ts +2 -0
  168. package/renderer/lib/renderer.directive.d.ts +4 -3
  169. package/sequence-list/index.d.ts +0 -1
  170. package/sequence-list/lib/sequence-list.component.d.ts +0 -4
  171. package/simple-search/index.d.ts +0 -1
  172. package/simple-search/lib/simple-search/simple-search.component.d.ts +6 -10
  173. package/split-view/README.md +3 -0
  174. package/split-view/index.d.ts +4 -0
  175. package/split-view/lib/split-area.directive.d.ts +16 -0
  176. package/split-view/lib/split-view.component.d.ts +76 -0
  177. package/split-view/lib/split-view.interface.d.ts +10 -0
  178. package/split-view/lib/split-view.module.d.ts +8 -0
  179. package/styles/client-framework.scss +21 -67
  180. package/tile-list/lib/tile/tile.component.d.ts +1 -2
  181. package/tile-list/lib/tile-config/property-select/property-select.component.d.ts +0 -1
  182. package/tile-list/lib/tile-config/tile-config-trigger/tile-config-trigger.component.d.ts +1 -2
  183. package/tile-list/lib/tile-config/tile-config.component.d.ts +0 -3
  184. package/tile-list/lib/tile-list/tile-list.component.d.ts +5 -5
  185. package/upload-progress/lib/upload-progress/upload-progress-overlay/upload-progress-overlay.component.d.ts +0 -5
  186. package/upload-progress/lib/upload-progress/upload-progress.component.d.ts +0 -4
  187. package/common/lib/components/focus-indicator/focus-indicator.component.d.ts +0 -7
  188. package/common/lib/components/token-input/token-input.component.d.ts +0 -55
  189. package/common/lib/components/token-input/token-input.interface.d.ts +0 -8
  190. package/common/lib/services/error-messages/error-messages.service.d.ts +0 -7
  191. package/esm2022/actions/index.mjs +0 -7
  192. package/esm2022/actions/lib/actions/copy-action/copy-action.mjs +0 -31
  193. package/esm2022/actions/lib/actions/cut-action/cut-action.mjs +0 -30
  194. package/esm2022/actions/lib/actions/delete-action/delete/delete.component.mjs +0 -67
  195. package/esm2022/actions/lib/actions/delete-action/delete-action.mjs +0 -38
  196. package/esm2022/actions/lib/actions/download-action/download-action.mjs +0 -33
  197. package/esm2022/actions/lib/actions.icon.mjs +0 -8
  198. package/esm2022/actions/lib/actions.interface.mjs +0 -19
  199. package/esm2022/actions/lib/actions.module.mjs +0 -16
  200. package/esm2022/actions/lib/actions.service.mjs +0 -89
  201. package/esm2022/actions/lib/components/contextmenu/contextmenu.component.mjs +0 -27
  202. package/esm2022/actions/yuuvis-client-framework-actions.mjs +0 -5
  203. package/esm2022/app-bar/index.mjs +0 -2
  204. package/esm2022/app-bar/lib/app-bar.component.mjs +0 -89
  205. package/esm2022/app-bar/yuuvis-client-framework-app-bar.mjs +0 -5
  206. package/esm2022/clipboard/index.mjs +0 -2
  207. package/esm2022/clipboard/lib/clipboard.component.mjs +0 -48
  208. package/esm2022/clipboard/yuuvis-client-framework-clipboard.mjs +0 -5
  209. package/esm2022/common/index.mjs +0 -7
  210. package/esm2022/common/lib/components/focus-indicator/focus-indicator.component.mjs +0 -41
  211. package/esm2022/common/lib/components/token-input/token-input.component.mjs +0 -324
  212. package/esm2022/common/lib/components/token-input/token-input.interface.mjs +0 -2
  213. package/esm2022/common/lib/directives/busy-overlay.directive.mjs +0 -88
  214. package/esm2022/common/lib/directives/click-double.directive.mjs +0 -61
  215. package/esm2022/common/lib/directives/container-size.directive.mjs +0 -56
  216. package/esm2022/common/lib/directives/drag-select.directive.mjs +0 -114
  217. package/esm2022/common/lib/directives/file-drop-zone/file-drop-zone.directive.mjs +0 -153
  218. package/esm2022/common/lib/directives/file-drop-zone/file-drop-zone.interface.mjs +0 -2
  219. package/esm2022/common/lib/directives/focus-within.directive.mjs +0 -81
  220. package/esm2022/common/lib/directives/index.mjs +0 -9
  221. package/esm2022/common/lib/directives/light-dismiss.directive.mjs +0 -44
  222. package/esm2022/common/lib/directives/longpress.directive.mjs +0 -36
  223. package/esm2022/common/lib/directives/noop-value-accessor.directive.mjs +0 -42
  224. package/esm2022/common/lib/services/error-messages/error-messages.service.mjs +0 -68
  225. package/esm2022/common/lib/services/index.mjs +0 -2
  226. package/esm2022/common/yuuvis-client-framework-common.mjs +0 -5
  227. package/esm2022/forms/index.mjs +0 -24
  228. package/esm2022/forms/lib/elements/catalog/catalog.component.mjs +0 -118
  229. package/esm2022/forms/lib/elements/data-grid/data-grid/data-grid.component.mjs +0 -172
  230. package/esm2022/forms/lib/elements/data-grid/edit-table-data/edit-data.component.mjs +0 -95
  231. package/esm2022/forms/lib/elements/data-grid/model/data-grid.interface.mjs +0 -9
  232. package/esm2022/forms/lib/elements/datetime/datetime.component.mjs +0 -82
  233. package/esm2022/forms/lib/elements/datetime-range/datetime-range.component.mjs +0 -166
  234. package/esm2022/forms/lib/elements/index.mjs +0 -11
  235. package/esm2022/forms/lib/elements/number/number.component.mjs +0 -195
  236. package/esm2022/forms/lib/elements/number-range/number-range.component.mjs +0 -176
  237. package/esm2022/forms/lib/elements/organization/organization.component.mjs +0 -286
  238. package/esm2022/forms/lib/elements/range-select-date/date-range-picker/date-range-picker.component.mjs +0 -38
  239. package/esm2022/forms/lib/elements/range-select-date/range-select-date.component.mjs +0 -181
  240. package/esm2022/forms/lib/elements/range-select-date/range-select-date.interface.mjs +0 -2
  241. package/esm2022/forms/lib/elements/range-select-filesize/range-select-filesize.component.mjs +0 -98
  242. package/esm2022/forms/lib/elements/range-select-filesize/range-select-filesize.interface.mjs +0 -2
  243. package/esm2022/forms/lib/elements/string/string.component.mjs +0 -261
  244. package/esm2022/forms/lib/form-input/form-input.component.mjs +0 -88
  245. package/esm2022/forms/lib/forms.module.mjs +0 -58
  246. package/esm2022/forms/yuuvis-client-framework-forms.mjs +0 -5
  247. package/esm2022/icons/index.mjs +0 -4
  248. package/esm2022/icons/lib/icon.service.mjs +0 -59
  249. package/esm2022/icons/lib/icons.mjs +0 -32
  250. package/esm2022/icons/lib/object-type-icon/object-type-icon.component.mjs +0 -29
  251. package/esm2022/icons/yuuvis-client-framework-icons.mjs +0 -5
  252. package/esm2022/index.mjs +0 -2
  253. package/esm2022/lib/yuuvis-client-framework.module.mjs +0 -15
  254. package/esm2022/list/index.mjs +0 -3
  255. package/esm2022/list/lib/list-item.directive.mjs +0 -72
  256. package/esm2022/list/lib/list.component.mjs +0 -135
  257. package/esm2022/list/yuuvis-client-framework-list.mjs +0 -5
  258. package/esm2022/metadata-form/index.mjs +0 -4
  259. package/esm2022/metadata-form/lib/metadata-default-templates/metadata-default-templates.component.mjs +0 -32
  260. package/esm2022/metadata-form/lib/metadata-form-element-registry.service.mjs +0 -99
  261. package/esm2022/metadata-form/lib/metadata-form-field/metadata-form-field.component.mjs +0 -83
  262. package/esm2022/metadata-form/lib/object-metadata-element-template.directive.mjs +0 -52
  263. package/esm2022/metadata-form/yuuvis-client-framework-metadata-form.mjs +0 -5
  264. package/esm2022/object-details/index.mjs +0 -8
  265. package/esm2022/object-details/lib/object-audit/object-audit.component.mjs +0 -195
  266. package/esm2022/object-details/lib/object-details-shell/object-details-shell.component.mjs +0 -127
  267. package/esm2022/object-details/lib/object-details.component.mjs +0 -61
  268. package/esm2022/object-details/lib/object-metadata/form-section-group.pipe.mjs +0 -17
  269. package/esm2022/object-details/lib/object-metadata/object-metadata.component.mjs +0 -202
  270. package/esm2022/object-details/lib/object-metadata/object-metadata.interface.mjs +0 -2
  271. package/esm2022/object-details/lib/retention-badge/retention-badge.component.mjs +0 -27
  272. package/esm2022/object-details/yuuvis-client-framework-object-details.mjs +0 -5
  273. package/esm2022/object-flavor/index.mjs +0 -6
  274. package/esm2022/object-flavor/lib/abstract-apply-create-flavor/abstract-apply-create-flavor.component.mjs +0 -25
  275. package/esm2022/object-flavor/lib/abstract-apply-object-flavor/abstract-apply-object-flavor.component.mjs +0 -21
  276. package/esm2022/object-flavor/lib/flavor-chip/flavor-chip.component.mjs +0 -35
  277. package/esm2022/object-flavor/lib/object-flavor/object-flavor.component.mjs +0 -93
  278. package/esm2022/object-flavor/lib/object-flavor-picker/object-flavor-picker.component.mjs +0 -43
  279. package/esm2022/object-flavor/yuuvis-client-framework-object-flavor.mjs +0 -5
  280. package/esm2022/object-form/index.mjs +0 -5
  281. package/esm2022/object-form/lib/form-scripting.api.interface.mjs +0 -2
  282. package/esm2022/object-form/lib/form-scripting.service.mjs +0 -160
  283. package/esm2022/object-form/lib/object-form-element/object-form-element.component.mjs +0 -87
  284. package/esm2022/object-form/lib/object-form-extension.interface.mjs +0 -36
  285. package/esm2022/object-form/lib/object-form-group/object-form-group.component.mjs +0 -85
  286. package/esm2022/object-form/lib/object-form-script/form-scripting-element-extension/form-scripting-element-extension.component.mjs +0 -23
  287. package/esm2022/object-form/lib/object-form-script/object-form-script.service.mjs +0 -115
  288. package/esm2022/object-form/lib/object-form-script/object-form-scripting-scope.mjs +0 -251
  289. package/esm2022/object-form/lib/object-form-translate.service.mjs +0 -73
  290. package/esm2022/object-form/lib/object-form.component.mjs +0 -628
  291. package/esm2022/object-form/lib/object-form.interface.mjs +0 -9
  292. package/esm2022/object-form/lib/object-form.model.mjs +0 -20
  293. package/esm2022/object-form/lib/object-form.service.mjs +0 -130
  294. package/esm2022/object-form/lib/object-form.utils.mjs +0 -55
  295. package/esm2022/object-form/lib/object-form.validation.mjs +0 -48
  296. package/esm2022/object-form/yuuvis-client-framework-object-form.mjs +0 -5
  297. package/esm2022/object-preview/index.mjs +0 -3
  298. package/esm2022/object-preview/lib/components/index.mjs +0 -3
  299. package/esm2022/object-preview/lib/components/object-email-preview/object-email-preview.component.mjs +0 -45
  300. package/esm2022/object-preview/lib/components/object-preview/object-preview.component.mjs +0 -78
  301. package/esm2022/object-preview/lib/services/object-preview.service.mjs +0 -119
  302. package/esm2022/object-preview/yuuvis-client-framework-object-preview.mjs +0 -5
  303. package/esm2022/object-summary/index.mjs +0 -5
  304. package/esm2022/object-summary/lib/multi-object-summary/multi-object-summary.component.mjs +0 -33
  305. package/esm2022/object-summary/lib/object-summary/object-summary.component.mjs +0 -275
  306. package/esm2022/object-summary/lib/object-summary-data/object-summary-data.component.mjs +0 -80
  307. package/esm2022/object-summary/lib/object-summary.module.mjs +0 -15
  308. package/esm2022/object-summary/yuuvis-client-framework-object-summary.mjs +0 -5
  309. package/esm2022/pagination/index.mjs +0 -3
  310. package/esm2022/pagination/lib/pagination.component.mjs +0 -46
  311. package/esm2022/pagination/lib/pagination.interface.mjs +0 -2
  312. package/esm2022/pagination/yuuvis-client-framework-pagination.mjs +0 -5
  313. package/esm2022/panel/index.mjs +0 -2
  314. package/esm2022/panel/lib/panel.component.mjs +0 -20
  315. package/esm2022/panel/yuuvis-client-framework-panel.mjs +0 -5
  316. package/esm2022/renderer/index.mjs +0 -11
  317. package/esm2022/renderer/lib/property-renderer/abstract.renderer.mjs +0 -29
  318. package/esm2022/renderer/lib/property-renderer/datetime.renderer.mjs +0 -13
  319. package/esm2022/renderer/lib/property-renderer/decimal.renderer.component.mjs +0 -12
  320. package/esm2022/renderer/lib/property-renderer/filesize.renderer.component.mjs +0 -28
  321. package/esm2022/renderer/lib/property-renderer/icon.renderer.component.mjs +0 -23
  322. package/esm2022/renderer/lib/property-renderer/integer.renderer.component.mjs +0 -12
  323. package/esm2022/renderer/lib/property-renderer/organization.renderer.mjs +0 -19
  324. package/esm2022/renderer/lib/property-renderer/string.renderer.component.mjs +0 -12
  325. package/esm2022/renderer/lib/property-renderer/unknown.renderer.mjs +0 -12
  326. package/esm2022/renderer/lib/renderer.directive.mjs +0 -51
  327. package/esm2022/renderer/lib/services/renderer/renderer.interface.mjs +0 -2
  328. package/esm2022/renderer/lib/services/renderer/renderer.service.mjs +0 -84
  329. package/esm2022/renderer/yuuvis-client-framework-renderer.mjs +0 -5
  330. package/esm2022/sequence-list/index.mjs +0 -4
  331. package/esm2022/sequence-list/lib/due-date-picker/due-date-picker.component.mjs +0 -99
  332. package/esm2022/sequence-list/lib/sequence-list.component.mjs +0 -141
  333. package/esm2022/sequence-list/lib/sequence-list.interface.mjs +0 -2
  334. package/esm2022/sequence-list/yuuvis-client-framework-sequence-list.mjs +0 -5
  335. package/esm2022/simple-search/index.mjs +0 -3
  336. package/esm2022/simple-search/lib/simple-search/simple-search.component.mjs +0 -111
  337. package/esm2022/simple-search/lib/simple-search/simple-search.interface.mjs +0 -2
  338. package/esm2022/simple-search/yuuvis-client-framework-simple-search.mjs +0 -5
  339. package/esm2022/tile-list/index.mjs +0 -11
  340. package/esm2022/tile-list/lib/tile/tile.component.mjs +0 -53
  341. package/esm2022/tile-list/lib/tile-config/action-select/action-select.component.mjs +0 -25
  342. package/esm2022/tile-list/lib/tile-config/icon-select/icon-select.component.mjs +0 -33
  343. package/esm2022/tile-list/lib/tile-config/property-select/property-select.component.mjs +0 -91
  344. package/esm2022/tile-list/lib/tile-config/tile-config-tile/tile-config-tile.component.mjs +0 -66
  345. package/esm2022/tile-list/lib/tile-config/tile-config-trigger/tile-config-trigger.component.mjs +0 -46
  346. package/esm2022/tile-list/lib/tile-config/tile-config.component.mjs +0 -156
  347. package/esm2022/tile-list/lib/tile-extension/directive/tile-extension.directive.mjs +0 -37
  348. package/esm2022/tile-list/lib/tile-extension/extensions/email.extension.mjs +0 -42
  349. package/esm2022/tile-list/lib/tile-extension/tile-extension.service.mjs +0 -35
  350. package/esm2022/tile-list/lib/tile-list/tile-list.component.mjs +0 -510
  351. package/esm2022/tile-list/lib/tile-list/tile-list.interface.mjs +0 -2
  352. package/esm2022/tile-list/yuuvis-client-framework-tile-list.mjs +0 -5
  353. package/esm2022/token-search/index.mjs +0 -3
  354. package/esm2022/token-search/token-search.component.mjs +0 -78
  355. package/esm2022/token-search/token-search.interface.mjs +0 -2
  356. package/esm2022/token-search/yuuvis-client-framework-token-search.mjs +0 -5
  357. package/esm2022/tree/index.mjs +0 -3
  358. package/esm2022/tree/lib/tree-node/tree-node.component.mjs +0 -65
  359. package/esm2022/tree/lib/tree.component.mjs +0 -148
  360. package/esm2022/tree/lib/tree.interface.mjs +0 -2
  361. package/esm2022/tree/lib/tree.service.mjs +0 -95
  362. package/esm2022/tree/yuuvis-client-framework-tree.mjs +0 -5
  363. package/esm2022/upload-progress/index.mjs +0 -2
  364. package/esm2022/upload-progress/lib/upload-progress/upload-progress-overlay/upload-progress-overlay.component.mjs +0 -49
  365. package/esm2022/upload-progress/lib/upload-progress/upload-progress.component.mjs +0 -37
  366. package/esm2022/upload-progress/yuuvis-client-framework-upload-progress.mjs +0 -5
  367. package/esm2022/user-avatar/index.mjs +0 -3
  368. package/esm2022/user-avatar/lib/user-avatar.component.mjs +0 -69
  369. package/esm2022/user-avatar/lib/user-avatar.module.mjs +0 -24
  370. package/esm2022/user-avatar/yuuvis-client-framework-user-avatar.mjs +0 -5
  371. package/esm2022/yuuvis-client-framework.mjs +0 -5
  372. package/fesm2022/yuuvis-client-framework-token-search.mjs +0 -85
  373. package/fesm2022/yuuvis-client-framework-token-search.mjs.map +0 -1
  374. package/fesm2022/yuuvis-client-framework-user-avatar.mjs +0 -96
  375. package/fesm2022/yuuvis-client-framework-user-avatar.mjs.map +0 -1
  376. package/forms/lib/form-input/form-input.component.d.ts +0 -48
  377. package/object-form/lib/object-form-translate.service.d.ts +0 -15
  378. package/object-form/lib/object-form.model.d.ts +0 -18
  379. package/sequence-list/lib/due-date-picker/due-date-picker.component.d.ts +0 -28
  380. package/simple-search/lib/simple-search/simple-search.interface.d.ts +0 -4
  381. package/token-search/README.md +0 -3
  382. package/token-search/index.d.ts +0 -2
  383. package/token-search/token-search.component.d.ts +0 -22
  384. package/token-search/token-search.interface.d.ts +0 -4
  385. package/user-avatar/README.md +0 -3
  386. package/user-avatar/index.d.ts +0 -2
  387. package/user-avatar/lib/user-avatar.component.d.ts +0 -44
  388. package/user-avatar/lib/user-avatar.module.d.ts +0 -8
  389. /package/{metadata-form → metadata-form-defaults}/lib/metadata-default-templates/metadata-default-templates.component.d.ts +0 -0
@@ -1,14 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, inject, signal, input, effect, untracked, Component, ViewEncapsulation, TemplateRef, Directive, Input } from '@angular/core';
3
- import { Situation, SystemService, TranslateService, Utils } from '@yuuvis/client-core';
4
- import { NgClass, NgTemplateOutlet, CommonModule } from '@angular/common';
2
+ import { Injectable, inject, ElementRef, DestroyRef, input, Directive, TemplateRef, Input, signal, effect, untracked, computed, ViewEncapsulation, Component } from '@angular/core';
3
+ import { Situation, ObjectFormTranslateService, SystemService } from '@yuuvis/client-core';
4
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
+ import { NgClass, NgTemplateOutlet } from '@angular/common';
6
+ import { MatFormFieldModule } from '@angular/material/form-field';
5
7
  import * as i1 from '@yuuvis/client-framework/common';
6
- import { ErrorMessagesService, injectNgControl, NoopValueAccessorDirective } from '@yuuvis/client-framework/common';
7
- import { FormInputComponent, StringComponent, DataGridComponent, OrganizationComponent, NumberComponent, NumberRangeComponent, DatetimeComponent, DatetimeRangeComponent, CatalogComponent } from '@yuuvis/client-framework/forms';
8
- import * as i1$1 from '@angular/forms';
9
- import { ReactiveFormsModule } from '@angular/forms';
10
- import * as i2 from '@yuuvis/components/checkbox';
11
- import { YvcCheckboxModule } from '@yuuvis/components/checkbox';
8
+ import { injectNgControl, NoopValueAccessorDirective } from '@yuuvis/client-framework/common';
12
9
 
13
10
  /**
14
11
  * Registration service for form elements rendered within an object form.
@@ -96,88 +93,91 @@ class MetadataFormElementRegistry {
96
93
  _removeDefaultElementTemplate(propertyType) {
97
94
  delete this._defaults[propertyType];
98
95
  }
99
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MetadataFormElementRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
100
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MetadataFormElementRegistry, providedIn: 'root' }); }
96
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MetadataFormElementRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
97
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MetadataFormElementRegistry, providedIn: 'root' }); }
101
98
  }
102
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MetadataFormElementRegistry, decorators: [{
99
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MetadataFormElementRegistry, decorators: [{
103
100
  type: Injectable,
104
101
  args: [{
105
102
  providedIn: 'root'
106
103
  }]
107
104
  }] });
108
105
 
109
- class MetadataFormFieldComponent {
106
+ class ObjectMetadataElementLabelDirective {
110
107
  constructor() {
111
- this.#registry = inject(MetadataFormElementRegistry);
112
- this.#system = inject(SystemService);
113
- this.translate = inject(TranslateService);
114
- this.#errorMassge = inject(ErrorMessagesService);
115
- this._subs = [];
116
- this.ngControl = injectNgControl();
117
- this.elementTemplate = signal(undefined);
118
- this.errors = null;
119
- this.label = '';
120
- this.readonly = false;
121
- this.required = false;
122
- this.formField = input.required({ alias: 'field' });
123
- this.#fieldEffect = effect(() => {
124
- const field = this.formField();
125
- untracked(() => {
126
- this.elementTemplate.set(this.#registry.getElementTemplate(field._internalType, this.situation()));
127
- this.label = this.#system.getLocalizedLabel(field.name) || field.name;
128
- // TODO: set readonly state based on ...????... schema?
129
- this.readonly = false;
130
- this.required = this.situation() !== Situation.SEARCH ? field.required : false;
131
- this.ngControl.statusChanges;
132
- this.fetchTags();
108
+ this.#elRef = inject(ElementRef);
109
+ this.#dRef = inject(DestroyRef);
110
+ this.yuvObjectMetadataElementLabel = input();
111
+ }
112
+ #elRef;
113
+ #dRef;
114
+ ngOnInit() {
115
+ const ctrl = this.yuvObjectMetadataElementLabel();
116
+ if (ctrl) {
117
+ ctrl.statusChanges.pipe(takeUntilDestroyed(this.#dRef)).subscribe((s) => {
118
+ this.#elRef.nativeElement.classList.toggle('yuv-label-invalid', s === 'INVALID');
133
119
  });
134
- });
135
- /**
136
- * Form situation, if not set default will be 'EDIT'
137
- */
138
- this.situation = input(Situation.EDIT);
120
+ ctrl.valueChanges.pipe(takeUntilDestroyed(this.#dRef)).subscribe(() => {
121
+ this.#elRef.nativeElement.classList.toggle('yuv-label-dirty', ctrl.dirty);
122
+ });
123
+ }
139
124
  }
140
- #registry;
141
- #system;
142
- #errorMassge;
143
- #fieldEffect;
144
- fetchTags() {
145
- this.tag = undefined;
146
- if (this.situation() === Situation.CREATE &&
147
- (Utils.hasProperty(this.formField(), 'defaultvaluefunction') || Utils.hasProperty(this.formField(), 'defaultvalue'))) {
148
- this.tag =
149
- this.formField().defaultvaluefunction === 'EXTRACTION'
150
- ? {
151
- label: 'ex',
152
- title: this.translate.instant('yuv.object-form-element.tag.ex')
125
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ObjectMetadataElementLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
126
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.1", type: ObjectMetadataElementLabelDirective, isStandalone: true, selector: "[yuvObjectMetadataElementLabel]", inputs: { yuvObjectMetadataElementLabel: { classPropertyName: "yuvObjectMetadataElementLabel", publicName: "yuvObjectMetadataElementLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.dirty": "yuvObjectMetadataElementLabel().dirty", "class.error": "yuvObjectMetadataElementLabel().error" } }, ngImport: i0 }); }
127
+ }
128
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ObjectMetadataElementLabelDirective, decorators: [{
129
+ type: Directive,
130
+ args: [{
131
+ selector: '[yuvObjectMetadataElementLabel]',
132
+ standalone: true,
133
+ host: {
134
+ '[class.dirty]': 'yuvObjectMetadataElementLabel().dirty',
135
+ '[class.error]': 'yuvObjectMetadataElementLabel().error'
153
136
  }
154
- : {
155
- label: 'df',
156
- title: this.translate.instant('yuv.object-form-element.tag.df')
157
- };
158
- }
137
+ }]
138
+ }] });
139
+
140
+ /**
141
+ * Directive to apply an object-form related error to a mat-label element.
142
+ */
143
+ class ObjectMetadataElementErrorDirective {
144
+ constructor() {
145
+ this.#elRef = inject(ElementRef);
146
+ this.#dRef = inject(DestroyRef);
147
+ this.#fts = inject(ObjectFormTranslateService);
148
+ this.yuvObjectMetadataElementError = input();
159
149
  }
160
- ngOnInit() {
161
- if (this.ngControl.statusChanges)
162
- this._subs.push(this.ngControl.statusChanges.subscribe(() => {
163
- this.errors = this.ngControl.control.errors
164
- ? Object.keys(this.ngControl.control.errors).map((key) => {
165
- return this.ngControl.control.errors ? this.#errorMassge.getErrorLabel(key, this.ngControl.control.errors[key].params) : null;
166
- })
167
- : null;
168
- }));
150
+ #elRef;
151
+ #dRef;
152
+ #fts;
153
+ #getErrors() {
154
+ const ctrl = this.yuvObjectMetadataElementError();
155
+ return ctrl && ctrl.errors
156
+ ? Object.keys(ctrl.errors).map((key) => {
157
+ return key === 'eoformScript' ? ctrl._eoFormElement.error.msg : this.#fts.getErrorLabel(key, ctrl.errors[key].params);
158
+ })
159
+ : [];
169
160
  }
170
- ngOnDestroy() {
171
- this._subs.forEach((s) => s.unsubscribe());
161
+ ngOnInit() {
162
+ const ctrl = this.yuvObjectMetadataElementError();
163
+ if (ctrl) {
164
+ ctrl.statusChanges.pipe(takeUntilDestroyed(this.#dRef)).subscribe((s) => {
165
+ if (s === 'INVALID') {
166
+ const err = this.#getErrors();
167
+ this.#elRef.nativeElement.innerText = err.length > 0 ? err[0] : '';
168
+ }
169
+ });
170
+ }
172
171
  }
173
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MetadataFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
174
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MetadataFormFieldComponent, isStandalone: true, selector: "yuv-metadata-form-field", inputs: { formField: { classPropertyName: "formField", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, situation: { classPropertyName: "situation", publicName: "situation", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "yuv-metadata-form-field" }, hostDirectives: [{ directive: i1.NoopValueAccessorDirective }], ngImport: i0, template: "@let field = formField();\n\n@if (field) {\n @let et = elementTemplate();\n\n <div class=\"form-field t-{{ field._internalType }}\" #formField [attr.data-name]=\"field.name\" [ngClass]=\"{ disabled: !!readonly }\">\n @if (et) {\n @if (field._internalType === 'table') {\n <ng-container *ngTemplateOutlet=\"et; context: { $implicit: { situation: situation(), ngControl: ngControl.control, field } }\"></ng-container>\n } @else {\n <yuv-form-input\n [ngClass]=\"{ checkbox: field._internalType === 'boolean' }\"\n [tag]=\"tag\"\n [label]=\"label\"\n [required]=\"required\"\n [invalid]=\"!!errors\"\n [disabled]=\"readonly\"\n >\n <ng-container *ngTemplateOutlet=\"et; context: { $implicit: { situation: situation(), ngControl: ngControl.control, field } }\"></ng-container>\n </yuv-form-input>\n }\n } @else {\n <em>\n <strong>{{ field._internalType }}</strong>\n </em>\n }\n\n <!-- the fields description -->\n @if (field.description) {\n <div class=\"description\">\n {{ field.description }}\n </div>\n }\n\n <!-- error/validation messages -->\n @if (errors) {\n <div class=\"err-msg\">\n <div>{{ errors[errors['length'] - 1] }}</div>\n </div>\n }\n </div>\n}\n", styles: [".yuv-metadata-form-field{display:inline-block}.yuv-metadata-form-field .form-field{margin-block-end:1px;border-radius:.25em}.yuv-metadata-form-field .form-field .description{border:0;font-size:var(--font-hint);color:var(--text-color-caption);font-style:italic;padding:calc(var(--app-pane-padding) / 8) calc(var(--app-pane-padding) / 8) 0 calc(var(--app-pane-padding) / 8)}.yuv-metadata-form-field .form-field .err-msg{font-size:var(--font-hint);color:var(--color-error);padding:calc(var(--app-pane-padding) / 4) 0;border:0}.yuv-metadata-form-field .form-field .table{flex-flow:column;align-items:flex-start;border:1px solid var(--panel-divider-color)}.yuv-metadata-form-field .form-field .table .label{padding-bottom:calc(var(--app-pane-padding) / 4)}.yuv-metadata-form-field .form-field .table.invalid{border:1px solid var(--color-error)}.yuv-metadata-form-field .form-field.inlineError .err-msg{display:none}.yuv-metadata-form-field.ng-dirty:not(.ng-invalid)>.form-field:not(.focused) .fe-wrapper>label{background-color:var(--color-dirty-background);color:var(--color-dirty-font)!important}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: FormInputComponent, selector: "yuv-form-input", inputs: ["label", "tag", "description", "invalid", "disabled", "required"] }], encapsulation: i0.ViewEncapsulation.None }); }
172
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ObjectMetadataElementErrorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
173
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.1", type: ObjectMetadataElementErrorDirective, isStandalone: true, selector: "[yuvObjectMetadataElementError]", inputs: { yuvObjectMetadataElementError: { classPropertyName: "yuvObjectMetadataElementError", publicName: "yuvObjectMetadataElementError", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
175
174
  }
176
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MetadataFormFieldComponent, decorators: [{
177
- type: Component,
178
- args: [{ selector: 'yuv-metadata-form-field', standalone: true, imports: [NgClass, NgTemplateOutlet, FormInputComponent], hostDirectives: [NoopValueAccessorDirective], encapsulation: ViewEncapsulation.None, host: {
179
- class: 'yuv-metadata-form-field'
180
- }, template: "@let field = formField();\n\n@if (field) {\n @let et = elementTemplate();\n\n <div class=\"form-field t-{{ field._internalType }}\" #formField [attr.data-name]=\"field.name\" [ngClass]=\"{ disabled: !!readonly }\">\n @if (et) {\n @if (field._internalType === 'table') {\n <ng-container *ngTemplateOutlet=\"et; context: { $implicit: { situation: situation(), ngControl: ngControl.control, field } }\"></ng-container>\n } @else {\n <yuv-form-input\n [ngClass]=\"{ checkbox: field._internalType === 'boolean' }\"\n [tag]=\"tag\"\n [label]=\"label\"\n [required]=\"required\"\n [invalid]=\"!!errors\"\n [disabled]=\"readonly\"\n >\n <ng-container *ngTemplateOutlet=\"et; context: { $implicit: { situation: situation(), ngControl: ngControl.control, field } }\"></ng-container>\n </yuv-form-input>\n }\n } @else {\n <em>\n <strong>{{ field._internalType }}</strong>\n </em>\n }\n\n <!-- the fields description -->\n @if (field.description) {\n <div class=\"description\">\n {{ field.description }}\n </div>\n }\n\n <!-- error/validation messages -->\n @if (errors) {\n <div class=\"err-msg\">\n <div>{{ errors[errors['length'] - 1] }}</div>\n </div>\n }\n </div>\n}\n", styles: [".yuv-metadata-form-field{display:inline-block}.yuv-metadata-form-field .form-field{margin-block-end:1px;border-radius:.25em}.yuv-metadata-form-field .form-field .description{border:0;font-size:var(--font-hint);color:var(--text-color-caption);font-style:italic;padding:calc(var(--app-pane-padding) / 8) calc(var(--app-pane-padding) / 8) 0 calc(var(--app-pane-padding) / 8)}.yuv-metadata-form-field .form-field .err-msg{font-size:var(--font-hint);color:var(--color-error);padding:calc(var(--app-pane-padding) / 4) 0;border:0}.yuv-metadata-form-field .form-field .table{flex-flow:column;align-items:flex-start;border:1px solid var(--panel-divider-color)}.yuv-metadata-form-field .form-field .table .label{padding-bottom:calc(var(--app-pane-padding) / 4)}.yuv-metadata-form-field .form-field .table.invalid{border:1px solid var(--color-error)}.yuv-metadata-form-field .form-field.inlineError .err-msg{display:none}.yuv-metadata-form-field.ng-dirty:not(.ng-invalid)>.form-field:not(.focused) .fe-wrapper>label{background-color:var(--color-dirty-background);color:var(--color-dirty-font)!important}\n"] }]
175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ObjectMetadataElementErrorDirective, decorators: [{
176
+ type: Directive,
177
+ args: [{
178
+ selector: '[yuvObjectMetadataElementError]',
179
+ standalone: true
180
+ }]
181
181
  }] });
182
182
 
183
183
  /**
@@ -193,7 +193,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
193
193
  * <ng-template yuvMetadataElementTemplate propertyType="boolean:switch" let-ctx>...</ng-template>
194
194
  *
195
195
  */
196
- class MetadataElementTemplateDirective {
196
+ class ObjectMetadataElementTemplateDirective {
197
197
  constructor() {
198
198
  this.registry = inject(MetadataFormElementRegistry);
199
199
  this.template = inject((TemplateRef));
@@ -211,10 +211,10 @@ class MetadataElementTemplateDirective {
211
211
  else
212
212
  this.registry.removeElementTemplate(this.propertyType, this.situation);
213
213
  }
214
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MetadataElementTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
215
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MetadataElementTemplateDirective, isStandalone: true, selector: "[yuvMetadataElementTemplate]", inputs: { yuvMetadataElementTemplate: "yuvMetadataElementTemplate", propertyType: "propertyType", situation: "situation" }, ngImport: i0 }); }
214
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ObjectMetadataElementTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
215
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.1", type: ObjectMetadataElementTemplateDirective, isStandalone: true, selector: "[yuvMetadataElementTemplate]", inputs: { yuvMetadataElementTemplate: "yuvMetadataElementTemplate", propertyType: "propertyType", situation: "situation" }, ngImport: i0 }); }
216
216
  }
217
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MetadataElementTemplateDirective, decorators: [{
217
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ObjectMetadataElementTemplateDirective, decorators: [{
218
218
  type: Directive,
219
219
  args: [{
220
220
  selector: '[yuvMetadataElementTemplate]',
@@ -228,32 +228,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
228
228
  type: Input
229
229
  }] } });
230
230
 
231
- class MetadataDefaultTemplatesComponent {
232
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MetadataDefaultTemplatesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
233
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MetadataDefaultTemplatesComponent, isStandalone: true, selector: "yuv-metadata-default-templates", ngImport: i0, template: "<!-- form element templates -->\n<!-- STRING -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string\" let-ctx>\n <yuv-string\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [rows]=\"ctx.field.rows\"\n [classifications]=\"ctx.field.classifications\"\n [regex]=\"ctx.field.regex\"\n [readonly]=\"ctx.field.readonly\"\n [minLength]=\"ctx.field.minLength\"\n [maxLength]=\"ctx.field.maxLength\"\n >\n </yuv-string>\n</ng-template>\n\n<!-- ORGANIZATION -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization\" let-ctx>\n <yuv-organization\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n (userSelect)=\"ctx.field.dataMeta = $event\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization>\n</ng-template>\n\n<!-- INTEGER -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"integer\" let-ctx>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [pattern]=\"ctx.field.pattern\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n ></yuv-number-range>\n }\n</ng-template>\n\n<!-- DECIMAL -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"decimal\" let-ctx>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [grouping]=\"ctx.field.grouping\"\n [pattern]=\"ctx.field.pattern\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n >\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [pattern]=\"ctx.field.pattern\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-number-range>\n }\n</ng-template>\n\n<!-- BOOLEAN -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean\" let-ctx>\n <yvc-checkbox\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n [readonly]=\"ctx.field.readonly\"\n [tristate]=\"ctx.field.tristate === false ? false : true\"\n ></yvc-checkbox>\n</ng-template>\n\n<!-- BOOLEAN SWITCH -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean:switch\" let-ctx>\n <yvc-checkbox\n [formControl]=\"ctx.ngControl\"\n switch=\"true\"\n [attr.data-name]=\"ctx.field.name\"\n [readonly]=\"ctx.field.readonly\"\n [tristate]=\"ctx.field.tristate === false ? false : true\"\n ></yvc-checkbox>\n</ng-template>\n\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"datetime\" let-ctx>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-datetime\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime>\n } @else {\n <yuv-datetime-range\n [situation]=\"ctx.situation\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime-range>\n }\n</ng-template>\n\n<!-- TABLE -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"table\" let-ctx>\n <yuv-data-grid\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ngControl\"\n [formElement]=\"ctx.field\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-data-grid>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: StringComponent, selector: "yuv-string", inputs: ["multiselect", "rows", "readonly", "autofocus", "classifications", "situation", "regex", "minLength", "maxLength"] }, { kind: "component", type: DataGridComponent, selector: "yuv-data-grid", inputs: ["situation", "formElement", "formControl", "classifications", "readonly", "size"] }, { kind: "component", type: OrganizationComponent, selector: "yuv-organization", inputs: ["placeholder", "situation", "multiselect", "classifications", "readonly", "autofocus", "appendTo", "excludeMe", "withMetadata"], outputs: ["userSelect"] }, { kind: "component", type: NumberComponent, selector: "yuv-number", inputs: ["scale", "precision", "grouping", "groupPattern", "readonly", "minValue", "maxValue", "classifications"] }, { kind: "component", type: NumberRangeComponent, selector: "yuv-number-range", inputs: ["scale", "precision", "grouping", "pattern", "readonly", "classifications", "minValue", "maxValue"] }, { kind: "component", type: DatetimeComponent, selector: "yuv-datetime", inputs: ["onlyFutureDates", "readonly", "withTime"] }, { kind: "component", type: DatetimeRangeComponent, selector: "yuv-datetime-range", inputs: ["withTime", "readonly", "operator", "situation"] }, { kind: "directive", type: MetadataElementTemplateDirective, selector: "[yuvMetadataElementTemplate]", inputs: ["yuvMetadataElementTemplate", "propertyType", "situation"] }, { kind: "ngmodule", type: YvcCheckboxModule }, { kind: "component", type: i2.CheckboxComponent, selector: "yvc-checkbox", inputs: ["tristate", "readonly"] }] }); }
231
+ class MetadataFormFieldComponent {
232
+ constructor() {
233
+ this.#registry = inject(MetadataFormElementRegistry);
234
+ this.#system = inject(SystemService);
235
+ this.#ngControl = injectNgControl();
236
+ this.elementTemplate = signal(undefined);
237
+ this.readonly = false;
238
+ this.formField = input.required({ alias: 'field' });
239
+ this.#fieldEffect = effect(() => {
240
+ const field = this.formField();
241
+ untracked(() => {
242
+ if (!field._internalType)
243
+ field._internalType = this.#system.getInternalFormElementType(field.propertyType);
244
+ this.elementTemplate.set(this.#registry.getElementTemplate(field._internalType, this.situation()));
245
+ // TODO: set readonly state based on ...????... schema?
246
+ this.readonly = false;
247
+ });
248
+ });
249
+ this.context = computed(() => {
250
+ const field = this.formField();
251
+ field.required = this.situation() !== Situation.SEARCH ? field.required : false;
252
+ return {
253
+ label: field.label || field.name,
254
+ description: field.description,
255
+ situation: this.situation() || Situation.EDIT,
256
+ field,
257
+ ctrl: this.#ngControl?.control || undefined
258
+ };
259
+ });
260
+ /**
261
+ * Form situation, if not set default will be 'EDIT'
262
+ */
263
+ this.situation = input(Situation.EDIT);
264
+ }
265
+ #registry;
266
+ #system;
267
+ #ngControl;
268
+ #fieldEffect;
269
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MetadataFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
270
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: MetadataFormFieldComponent, isStandalone: true, selector: "yuv-metadata-form-field", inputs: { formField: { classPropertyName: "formField", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, situation: { classPropertyName: "situation", publicName: "situation", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "yuv-metadata-form-field" }, hostDirectives: [{ directive: i1.NoopValueAccessorDirective }], ngImport: i0, template: "@let field = formField();\n@let et = elementTemplate();\n\n@if (field) {\n <div class=\"form-field t-{{ field._internalType }}\" #formField [attr.data-name]=\"field.name\" [ngClass]=\"{ disabled: !!readonly }\">\n @if (et) {\n <ng-container *ngTemplateOutlet=\"et; context: { $implicit: context() }\"></ng-container>\n } @else {\n <em>\n <strong>{{ field._internalType }}</strong>\n </em>\n }\n </div>\n}\n", styles: [".yuv-metadata-form-field .form-field{margin-block-end:1px;border-radius:.25em;display:flex;align-items:center}.yuv-metadata-form-field .form-field mat-form-field{flex:1}.yuv-metadata-form-field .form-field .yuv-label-invalid{color:var(--ymt-on-danger-container)}.yuv-metadata-form-field .form-field .yuv-label-dirty{--marker-bg-color: limegreen}.yuv-metadata-form-field .form-field .yuv-label-dirty:after{content:\"\";display:inline-block;background-color:var(--marker-bg-color);border-radius:50%;width:.5em;height:.5em;margin-inline-start:.5em;margin-inline-end:.25em}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatFormFieldModule }], encapsulation: i0.ViewEncapsulation.None }); }
234
271
  }
235
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MetadataDefaultTemplatesComponent, decorators: [{
272
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MetadataFormFieldComponent, decorators: [{
236
273
  type: Component,
237
- args: [{ selector: 'yuv-metadata-default-templates', standalone: true, imports: [
238
- CommonModule,
239
- ReactiveFormsModule,
240
- FormInputComponent,
241
- CatalogComponent,
242
- StringComponent,
243
- DataGridComponent,
244
- OrganizationComponent,
245
- NumberComponent,
246
- NumberRangeComponent,
247
- DatetimeComponent,
248
- DatetimeRangeComponent,
249
- MetadataElementTemplateDirective,
250
- YvcCheckboxModule
251
- ], template: "<!-- form element templates -->\n<!-- STRING -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string\" let-ctx>\n <yuv-string\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [rows]=\"ctx.field.rows\"\n [classifications]=\"ctx.field.classifications\"\n [regex]=\"ctx.field.regex\"\n [readonly]=\"ctx.field.readonly\"\n [minLength]=\"ctx.field.minLength\"\n [maxLength]=\"ctx.field.maxLength\"\n >\n </yuv-string>\n</ng-template>\n\n<!-- ORGANIZATION -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization\" let-ctx>\n <yuv-organization\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n (userSelect)=\"ctx.field.dataMeta = $event\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization>\n</ng-template>\n\n<!-- INTEGER -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"integer\" let-ctx>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [pattern]=\"ctx.field.pattern\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n ></yuv-number-range>\n }\n</ng-template>\n\n<!-- DECIMAL -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"decimal\" let-ctx>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [grouping]=\"ctx.field.grouping\"\n [pattern]=\"ctx.field.pattern\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n >\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [pattern]=\"ctx.field.pattern\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-number-range>\n }\n</ng-template>\n\n<!-- BOOLEAN -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean\" let-ctx>\n <yvc-checkbox\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n [readonly]=\"ctx.field.readonly\"\n [tristate]=\"ctx.field.tristate === false ? false : true\"\n ></yvc-checkbox>\n</ng-template>\n\n<!-- BOOLEAN SWITCH -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean:switch\" let-ctx>\n <yvc-checkbox\n [formControl]=\"ctx.ngControl\"\n switch=\"true\"\n [attr.data-name]=\"ctx.field.name\"\n [readonly]=\"ctx.field.readonly\"\n [tristate]=\"ctx.field.tristate === false ? false : true\"\n ></yvc-checkbox>\n</ng-template>\n\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"datetime\" let-ctx>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-datetime\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime>\n } @else {\n <yuv-datetime-range\n [situation]=\"ctx.situation\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime-range>\n }\n</ng-template>\n\n<!-- TABLE -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"table\" let-ctx>\n <yuv-data-grid\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ngControl\"\n [formElement]=\"ctx.field\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-data-grid>\n</ng-template>\n" }]
274
+ args: [{ selector: 'yuv-metadata-form-field', standalone: true, imports: [NgClass, NgTemplateOutlet, MatFormFieldModule], hostDirectives: [NoopValueAccessorDirective], encapsulation: ViewEncapsulation.None, host: {
275
+ class: 'yuv-metadata-form-field'
276
+ }, template: "@let field = formField();\n@let et = elementTemplate();\n\n@if (field) {\n <div class=\"form-field t-{{ field._internalType }}\" #formField [attr.data-name]=\"field.name\" [ngClass]=\"{ disabled: !!readonly }\">\n @if (et) {\n <ng-container *ngTemplateOutlet=\"et; context: { $implicit: context() }\"></ng-container>\n } @else {\n <em>\n <strong>{{ field._internalType }}</strong>\n </em>\n }\n </div>\n}\n", styles: [".yuv-metadata-form-field .form-field{margin-block-end:1px;border-radius:.25em;display:flex;align-items:center}.yuv-metadata-form-field .form-field mat-form-field{flex:1}.yuv-metadata-form-field .form-field .yuv-label-invalid{color:var(--ymt-on-danger-container)}.yuv-metadata-form-field .form-field .yuv-label-dirty{--marker-bg-color: limegreen}.yuv-metadata-form-field .form-field .yuv-label-dirty:after{content:\"\";display:inline-block;background-color:var(--marker-bg-color);border-radius:50%;width:.5em;height:.5em;margin-inline-start:.5em;margin-inline-end:.25em}\n"] }]
252
277
  }] });
253
278
 
254
279
  /**
255
280
  * Generated bundle index. Do not edit.
256
281
  */
257
282
 
258
- export { MetadataDefaultTemplatesComponent, MetadataFormElementRegistry, MetadataFormFieldComponent };
283
+ export { MetadataFormElementRegistry, MetadataFormFieldComponent, ObjectMetadataElementErrorDirective, ObjectMetadataElementLabelDirective, ObjectMetadataElementTemplateDirective };
259
284
  //# sourceMappingURL=yuuvis-client-framework-metadata-form.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"yuuvis-client-framework-metadata-form.mjs","sources":["../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/metadata-form-element-registry.service.ts","../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/metadata-form-field/metadata-form-field.component.ts","../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/metadata-form-field/metadata-form-field.component.html","../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/object-metadata-element-template.directive.ts","../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/metadata-default-templates/metadata-default-templates.component.ts","../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/metadata-default-templates/metadata-default-templates.component.html","../../../../../libs/yuuvis/client-framework/metadata-form/src/yuuvis-client-framework-metadata-form.ts"],"sourcesContent":["import { Injectable, TemplateRef } from '@angular/core';\nimport { Situation } from '@yuuvis/client-core';\n\n/**\n * Registration service for form elements rendered within an object form.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class MetadataFormElementRegistry {\n private _defaults: { [propertyType: string]: TemplateRef<any> } = {};\n\n private _edit: { [propertyType: string]: TemplateRef<any> } = {};\n private _search: { [propertyType: string]: TemplateRef<any> } = {};\n private _create: { [propertyType: string]: TemplateRef<any> } = {};\n\n /**\n * Get a template to render a certain form element\n * @param propertyType The internal type to get the template for\n * @param situation Form situation\n * @returns TemplateRef or undefined\n */\n getElementTemplate(propertyType: string, situation: string = Situation.EDIT): TemplateRef<any> | undefined {\n let cmps = { ...this._defaults, ...this._edit };\n if (situation === Situation.SEARCH) cmps = { ...this._defaults, ...this._edit, ...this._search };\n else if (situation === Situation.CREATE) cmps = { ...this._defaults, ...this._edit, ...this._create };\n\n return cmps[propertyType];\n }\n\n /**\n * Register an object form element for a certain internal type. You might add a new component\n * or overwrite an existung one.\n * @param propertyType The internal type to provide the component for\n * @param component The component\n * @param situation Form situation to provide thew form element for (defaults to EDIT)\n */\n addElementTemplate(propertyType: string, templateRef: TemplateRef<any>, situation: Situation = Situation.EDIT): void {\n if (propertyType && templateRef) {\n switch (situation) {\n case Situation.SEARCH: {\n this._search[propertyType] = templateRef;\n break;\n }\n case Situation.CREATE: {\n this._create[propertyType] = templateRef;\n break;\n }\n default: {\n this._edit[propertyType] = templateRef;\n }\n }\n }\n }\n\n /**\n * Remove a registered form element.\n * @param propertyType The internal type to remove the component for\n * @param situation Form situation to provide thew form element for (defaults to EDIT)\n */\n removeElementTemplate(propertyType: string, situation: Situation = Situation.EDIT) {\n switch (situation) {\n case Situation.SEARCH: {\n delete this._search[propertyType];\n break;\n }\n case Situation.CREATE: {\n delete this._create[propertyType];\n break;\n }\n default: {\n delete this._edit[propertyType];\n }\n }\n }\n\n /**\n * Register default form element component. Usually this will be done by the object\n * form component itself.\n * @param propertyType The internal type to provide the component for\n * @param component The default component\n */\n _addDefaultElementTemplate(propertyType: string, templateRef: TemplateRef<any>): void {\n if (propertyType && templateRef) {\n this._defaults[propertyType] = templateRef;\n }\n }\n\n /**\n * Remove a registered default form element.\n * @param propertyType The internal type to remove the component for\n */\n _removeDefaultElementTemplate(propertyType: string) {\n delete this._defaults[propertyType];\n }\n}\n","import { NgClass, NgTemplateOutlet } from '@angular/common';\nimport { Component, effect, inject, input, OnDestroy, OnInit, signal, TemplateRef, untracked, ViewEncapsulation } from '@angular/core';\nimport { ValidationErrors } from '@angular/forms';\nimport { ObjectTypeField, Situation, SystemService, TranslateService, Utils } from '@yuuvis/client-core';\nimport { injectNgControl, NoopValueAccessorDirective } from '@yuuvis/client-framework/common';\nimport { FormInputComponent } from '@yuuvis/client-framework/forms';\nimport { Subscription } from 'rxjs';\nimport { MetadataFormElementRegistry } from '../metadata-form-element-registry.service';\nimport { ErrorMessagesService } from '@yuuvis/client-framework/common';\n\n@Component({\n selector: 'yuv-metadata-form-field',\n standalone: true,\n imports: [NgClass, NgTemplateOutlet, FormInputComponent],\n templateUrl: './metadata-form-field.component.html',\n styleUrl: './metadata-form-field.component.scss',\n hostDirectives: [NoopValueAccessorDirective],\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'yuv-metadata-form-field'\n }\n})\nexport class MetadataFormFieldComponent implements OnInit, OnDestroy {\n readonly #registry = inject(MetadataFormElementRegistry);\n readonly #system = inject(SystemService);\n private readonly translate = inject(TranslateService);\n readonly #errorMassge = inject(ErrorMessagesService);\n\n private _subs: Subscription[] = [];\n ngControl = injectNgControl();\n elementTemplate = signal<TemplateRef<any> | undefined>(undefined);\n errors: ValidationErrors | null = null;\n label = '';\n readonly = false;\n required = false;\n tag:\n | {\n label: string;\n title: string;\n }\n | undefined;\n private _field!: ObjectTypeField;\n\n formField = input.required<ObjectTypeField>({ alias: 'field' });\n\n #fieldEffect = effect(() => {\n const field = this.formField();\n\n untracked(() => {\n this.elementTemplate.set(this.#registry.getElementTemplate(field._internalType, this.situation()));\n this.label = this.#system.getLocalizedLabel(field.name) || field.name;\n\n // TODO: set readonly state based on ...????... schema?\n this.readonly = false;\n this.required = this.situation() !== Situation.SEARCH ? field.required : false;\n this.ngControl.statusChanges;\n this.fetchTags();\n });\n });\n\n /**\n * Form situation, if not set default will be 'EDIT'\n */\n situation = input<string | undefined>(Situation.EDIT);\n\n fetchTags() {\n this.tag = undefined;\n if (\n this.situation() === Situation.CREATE &&\n (Utils.hasProperty(this.formField(), 'defaultvaluefunction') || Utils.hasProperty(this.formField(), 'defaultvalue'))\n ) {\n this.tag =\n (this.formField() as any).defaultvaluefunction === 'EXTRACTION'\n ? {\n label: 'ex',\n title: this.translate.instant('yuv.object-form-element.tag.ex')\n }\n : {\n label: 'df',\n title: this.translate.instant('yuv.object-form-element.tag.df')\n };\n }\n }\n\n ngOnInit(): void {\n if (this.ngControl.statusChanges)\n this._subs.push(\n this.ngControl.statusChanges.subscribe(() => {\n this.errors = this.ngControl.control.errors\n ? Object.keys(this.ngControl.control.errors).map((key) => {\n return this.ngControl.control.errors ? this.#errorMassge.getErrorLabel(key, this.ngControl.control.errors[key].params) : null;\n })\n : null;\n })\n );\n }\n\n ngOnDestroy(): void {\n this._subs.forEach((s) => s.unsubscribe());\n }\n}\n","@let field = formField();\n\n@if (field) {\n @let et = elementTemplate();\n\n <div class=\"form-field t-{{ field._internalType }}\" #formField [attr.data-name]=\"field.name\" [ngClass]=\"{ disabled: !!readonly }\">\n @if (et) {\n @if (field._internalType === 'table') {\n <ng-container *ngTemplateOutlet=\"et; context: { $implicit: { situation: situation(), ngControl: ngControl.control, field } }\"></ng-container>\n } @else {\n <yuv-form-input\n [ngClass]=\"{ checkbox: field._internalType === 'boolean' }\"\n [tag]=\"tag\"\n [label]=\"label\"\n [required]=\"required\"\n [invalid]=\"!!errors\"\n [disabled]=\"readonly\"\n >\n <ng-container *ngTemplateOutlet=\"et; context: { $implicit: { situation: situation(), ngControl: ngControl.control, field } }\"></ng-container>\n </yuv-form-input>\n }\n } @else {\n <em>\n <strong>{{ field._internalType }}</strong>\n </em>\n }\n\n <!-- the fields description -->\n @if (field.description) {\n <div class=\"description\">\n {{ field.description }}\n </div>\n }\n\n <!-- error/validation messages -->\n @if (errors) {\n <div class=\"err-msg\">\n <div>{{ errors[errors['length'] - 1] }}</div>\n </div>\n }\n </div>\n}\n","import { Directive, Input, OnDestroy, OnInit, TemplateRef, inject } from '@angular/core';\nimport { Situation } from '@yuuvis/client-core';\nimport { MetadataFormElementRegistry } from './metadata-form-element-registry.service';\n\n/**\n * Directive to be applied to a `ng-template`. It will register the template as a\n * form element used by object-form component.\n *\n * Context is provided with the following fields:\n * - situation: form situation 'EDIT', 'CREATE', 'SEARCH'\n * - field: ObjectTypeField\n * - ngControl: Reactive FormControl\n *\n * @example\n * <ng-template yuvMetadataElementTemplate propertyType=\"boolean:switch\" let-ctx>...</ng-template>\n *\n */\n@Directive({\n selector: '[yuvMetadataElementTemplate]',\n standalone: true,\n})\nexport class MetadataElementTemplateDirective implements OnInit, OnDestroy {\n private registry = inject(MetadataFormElementRegistry);\n private template = inject(TemplateRef<any>);\n\n @Input() yuvMetadataElementTemplate?: string;\n @Input() propertyType!: string;\n @Input() situation: Situation = Situation.EDIT;\n\n ngOnInit(): void {\n if (this.yuvMetadataElementTemplate === 'default') this.registry._addDefaultElementTemplate(this.propertyType, this.template);\n else this.registry.addElementTemplate(this.propertyType, this.template, this.situation);\n }\n\n ngOnDestroy(): void {\n if (this.yuvMetadataElementTemplate === 'default') this.registry._removeDefaultElementTemplate(this.propertyType);\n else this.registry.removeElementTemplate(this.propertyType, this.situation);\n }\n}\n","import { Component } from '@angular/core';\nimport {\n CatalogComponent,\n DataGridComponent,\n DatetimeComponent,\n DatetimeRangeComponent,\n FormInputComponent,\n NumberComponent,\n NumberRangeComponent,\n OrganizationComponent,\n StringComponent\n} from '@yuuvis/client-framework/forms';\nimport { MetadataElementTemplateDirective } from '../object-metadata-element-template.directive';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { YvcCheckboxModule } from '@yuuvis/components/checkbox';\n\n@Component({\n selector: 'yuv-metadata-default-templates',\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormInputComponent,\n CatalogComponent,\n StringComponent,\n DataGridComponent,\n OrganizationComponent,\n NumberComponent,\n NumberRangeComponent,\n DatetimeComponent,\n DatetimeRangeComponent,\n MetadataElementTemplateDirective,\n YvcCheckboxModule\n ],\n templateUrl: './metadata-default-templates.component.html',\n styleUrl: './metadata-default-templates.component.scss'\n})\nexport class MetadataDefaultTemplatesComponent {}\n","<!-- form element templates -->\n<!-- STRING -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string\" let-ctx>\n <yuv-string\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [rows]=\"ctx.field.rows\"\n [classifications]=\"ctx.field.classifications\"\n [regex]=\"ctx.field.regex\"\n [readonly]=\"ctx.field.readonly\"\n [minLength]=\"ctx.field.minLength\"\n [maxLength]=\"ctx.field.maxLength\"\n >\n </yuv-string>\n</ng-template>\n\n<!-- ORGANIZATION -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization\" let-ctx>\n <yuv-organization\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n (userSelect)=\"ctx.field.dataMeta = $event\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization>\n</ng-template>\n\n<!-- INTEGER -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"integer\" let-ctx>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [pattern]=\"ctx.field.pattern\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n ></yuv-number-range>\n }\n</ng-template>\n\n<!-- DECIMAL -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"decimal\" let-ctx>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [grouping]=\"ctx.field.grouping\"\n [pattern]=\"ctx.field.pattern\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n >\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [pattern]=\"ctx.field.pattern\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-number-range>\n }\n</ng-template>\n\n<!-- BOOLEAN -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean\" let-ctx>\n <yvc-checkbox\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n [readonly]=\"ctx.field.readonly\"\n [tristate]=\"ctx.field.tristate === false ? false : true\"\n ></yvc-checkbox>\n</ng-template>\n\n<!-- BOOLEAN SWITCH -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean:switch\" let-ctx>\n <yvc-checkbox\n [formControl]=\"ctx.ngControl\"\n switch=\"true\"\n [attr.data-name]=\"ctx.field.name\"\n [readonly]=\"ctx.field.readonly\"\n [tristate]=\"ctx.field.tristate === false ? false : true\"\n ></yvc-checkbox>\n</ng-template>\n\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"datetime\" let-ctx>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-datetime\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime>\n } @else {\n <yuv-datetime-range\n [situation]=\"ctx.situation\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ngControl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime-range>\n }\n</ng-template>\n\n<!-- TABLE -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"table\" let-ctx>\n <yuv-data-grid\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ngControl\"\n [formElement]=\"ctx.field\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-data-grid>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AAGA;;AAEG;MAIU,2BAA2B,CAAA;AAHxC,IAAA,WAAA,GAAA;QAIU,IAAS,CAAA,SAAA,GAAiD,EAAE,CAAC;QAE7D,IAAK,CAAA,KAAA,GAAiD,EAAE,CAAC;QACzD,IAAO,CAAA,OAAA,GAAiD,EAAE,CAAC;QAC3D,IAAO,CAAA,OAAA,GAAiD,EAAE,CAAC;AAiFpE,KAAA;AA/EC;;;;;AAKG;AACH,IAAA,kBAAkB,CAAC,YAAoB,EAAE,SAA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A,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,iBAAiB,8GACjB,sBAAsB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACtB,gCAAgC,EAAA,QAAA,EAAA,8BAAA,EAAA,MAAA,EAAA,CAAA,4BAAA,EAAA,cAAA,EAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAChC,iBAAiB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAKR,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBArB7C,SAAS;+BACE,gCAAgC,EAAA,UAAA,EAC9B,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,kBAAkB;wBAClB,gBAAgB;wBAChB,eAAe;wBACf,iBAAiB;wBACjB,qBAAqB;wBACrB,eAAe;wBACf,oBAAoB;wBACpB,iBAAiB;wBACjB,sBAAsB;wBACtB,gCAAgC;wBAChC,iBAAiB;AAClB,qBAAA,EAAA,QAAA,EAAA,02JAAA,EAAA,CAAA;;;AElCH;;AAEG;;;;"}
1
+ {"version":3,"file":"yuuvis-client-framework-metadata-form.mjs","sources":["../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/metadata-form-element-registry.service.ts","../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/object-metadata-element-label.directive.ts","../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/object-metadata-element-error.directive.ts","../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/object-metadata-element-template.directive.ts","../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/metadata-form-field/metadata-form-field.component.ts","../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/metadata-form-field/metadata-form-field.component.html","../../../../../libs/yuuvis/client-framework/metadata-form/src/yuuvis-client-framework-metadata-form.ts"],"sourcesContent":["import { Injectable, TemplateRef } from '@angular/core';\nimport { Situation } from '@yuuvis/client-core';\n\n/**\n * Registration service for form elements rendered within an object form.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class MetadataFormElementRegistry {\n private _defaults: { [propertyType: string]: TemplateRef<any> } = {};\n\n private _edit: { [propertyType: string]: TemplateRef<any> } = {};\n private _search: { [propertyType: string]: TemplateRef<any> } = {};\n private _create: { [propertyType: string]: TemplateRef<any> } = {};\n\n /**\n * Get a template to render a certain form element\n * @param propertyType The internal type to get the template for\n * @param situation Form situation\n * @returns TemplateRef or undefined\n */\n getElementTemplate(propertyType: string, situation: string = Situation.EDIT): TemplateRef<any> | undefined {\n let cmps = { ...this._defaults, ...this._edit };\n if (situation === Situation.SEARCH) cmps = { ...this._defaults, ...this._edit, ...this._search };\n else if (situation === Situation.CREATE) cmps = { ...this._defaults, ...this._edit, ...this._create };\n\n return cmps[propertyType];\n }\n\n /**\n * Register an object form element for a certain internal type. You might add a new component\n * or overwrite an existung one.\n * @param propertyType The internal type to provide the component for\n * @param component The component\n * @param situation Form situation to provide thew form element for (defaults to EDIT)\n */\n addElementTemplate(propertyType: string, templateRef: TemplateRef<any>, situation: Situation = Situation.EDIT): void {\n if (propertyType && templateRef) {\n switch (situation) {\n case Situation.SEARCH: {\n this._search[propertyType] = templateRef;\n break;\n }\n case Situation.CREATE: {\n this._create[propertyType] = templateRef;\n break;\n }\n default: {\n this._edit[propertyType] = templateRef;\n }\n }\n }\n }\n\n /**\n * Remove a registered form element.\n * @param propertyType The internal type to remove the component for\n * @param situation Form situation to provide thew form element for (defaults to EDIT)\n */\n removeElementTemplate(propertyType: string, situation: Situation = Situation.EDIT) {\n switch (situation) {\n case Situation.SEARCH: {\n delete this._search[propertyType];\n break;\n }\n case Situation.CREATE: {\n delete this._create[propertyType];\n break;\n }\n default: {\n delete this._edit[propertyType];\n }\n }\n }\n\n /**\n * Register default form element component. Usually this will be done by the object\n * form component itself.\n * @param propertyType The internal type to provide the component for\n * @param component The default component\n */\n _addDefaultElementTemplate(propertyType: string, templateRef: TemplateRef<any>): void {\n if (propertyType && templateRef) {\n this._defaults[propertyType] = templateRef;\n }\n }\n\n /**\n * Remove a registered default form element.\n * @param propertyType The internal type to remove the component for\n */\n _removeDefaultElementTemplate(propertyType: string) {\n delete this._defaults[propertyType];\n }\n}\n","import { DestroyRef, Directive, ElementRef, inject, input, OnInit } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { AbstractControl, FormControlStatus } from '@angular/forms';\n\n@Directive({\n selector: '[yuvObjectMetadataElementLabel]',\n standalone: true,\n host: {\n '[class.dirty]': 'yuvObjectMetadataElementLabel().dirty',\n '[class.error]': 'yuvObjectMetadataElementLabel().error'\n }\n})\nexport class ObjectMetadataElementLabelDirective implements OnInit {\n #elRef = inject(ElementRef);\n #dRef = inject(DestroyRef);\n\n yuvObjectMetadataElementLabel = input<AbstractControl<any, any>>();\n\n ngOnInit() {\n const ctrl = this.yuvObjectMetadataElementLabel();\n if (ctrl) {\n ctrl.statusChanges.pipe(takeUntilDestroyed(this.#dRef)).subscribe((s: FormControlStatus) => {\n this.#elRef.nativeElement.classList.toggle('yuv-label-invalid', s === 'INVALID');\n });\n ctrl.valueChanges.pipe(takeUntilDestroyed(this.#dRef)).subscribe(() => {\n this.#elRef.nativeElement.classList.toggle('yuv-label-dirty', ctrl.dirty);\n });\n }\n }\n}\n","import { DestroyRef, Directive, ElementRef, inject, input, OnInit } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormControlStatus } from '@angular/forms';\nimport { ObjectFormControl, ObjectFormTranslateService } from '@yuuvis/client-core';\n\n/**\n * Directive to apply an object-form related error to a mat-label element.\n */\n@Directive({\n selector: '[yuvObjectMetadataElementError]',\n standalone: true\n})\nexport class ObjectMetadataElementErrorDirective implements OnInit {\n #elRef = inject(ElementRef);\n #dRef = inject(DestroyRef);\n #fts = inject(ObjectFormTranslateService);\n\n yuvObjectMetadataElementError = input<ObjectFormControl>();\n\n #getErrors(): string[] {\n const ctrl = this.yuvObjectMetadataElementError();\n\n \n\n\n return ctrl && ctrl.errors\n ? Object.keys(ctrl.errors).map((key) => {\n return key === 'eoformScript' ? ctrl._eoFormElement.error.msg : this.#fts.getErrorLabel(key, ctrl.errors![key].params);\n })\n : [];\n }\n\n ngOnInit() {\n const ctrl = this.yuvObjectMetadataElementError();\n if (ctrl) {\n ctrl.statusChanges.pipe(takeUntilDestroyed(this.#dRef)).subscribe((s: FormControlStatus) => {\n if (s === 'INVALID') {\n const err = this.#getErrors();\n this.#elRef.nativeElement.innerText = err.length > 0 ? err[0] : '';\n }\n });\n }\n }\n}\n","import { Directive, Input, OnDestroy, OnInit, TemplateRef, inject } from '@angular/core';\nimport { Situation } from '@yuuvis/client-core';\nimport { MetadataFormElementRegistry } from './metadata-form-element-registry.service';\n\n/**\n * Directive to be applied to a `ng-template`. It will register the template as a\n * form element used by object-form component.\n *\n * Context is provided with the following fields:\n * - situation: form situation 'EDIT', 'CREATE', 'SEARCH'\n * - field: ObjectTypeField\n * - ngControl: Reactive FormControl\n *\n * @example\n * <ng-template yuvMetadataElementTemplate propertyType=\"boolean:switch\" let-ctx>...</ng-template>\n *\n */\n@Directive({\n selector: '[yuvMetadataElementTemplate]',\n standalone: true,\n})\nexport class ObjectMetadataElementTemplateDirective implements OnInit, OnDestroy {\n private registry = inject(MetadataFormElementRegistry);\n private template = inject(TemplateRef<any>);\n\n @Input() yuvMetadataElementTemplate?: string;\n @Input() propertyType!: string;\n @Input() situation: Situation = Situation.EDIT;\n\n ngOnInit(): void {\n if (this.yuvMetadataElementTemplate === 'default') this.registry._addDefaultElementTemplate(this.propertyType, this.template);\n else this.registry.addElementTemplate(this.propertyType, this.template, this.situation);\n }\n\n ngOnDestroy(): void {\n if (this.yuvMetadataElementTemplate === 'default') this.registry._removeDefaultElementTemplate(this.propertyType);\n else this.registry.removeElementTemplate(this.propertyType, this.situation);\n }\n}\n","import { NgClass, NgTemplateOutlet } from '@angular/common';\nimport { Component, computed, effect, inject, input, signal, TemplateRef, untracked, ViewEncapsulation } from '@angular/core';\n\nimport { MatFormFieldModule } from '@angular/material/form-field';\n\nimport { ObjectTypeField, Situation, SystemService } from '@yuuvis/client-core';\nimport { injectNgControl, NoopValueAccessorDirective } from '@yuuvis/client-framework/common';\nimport { MetadataFormElementRegistry } from '../metadata-form-element-registry.service';\nimport { MetadataFormFieldContext } from './metadata-form-field.interface';\n@Component({\n selector: 'yuv-metadata-form-field',\n standalone: true,\n imports: [NgClass, NgTemplateOutlet, MatFormFieldModule],\n templateUrl: './metadata-form-field.component.html',\n styleUrl: './metadata-form-field.component.scss',\n hostDirectives: [NoopValueAccessorDirective],\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'yuv-metadata-form-field'\n }\n})\nexport class MetadataFormFieldComponent {\n #registry = inject(MetadataFormElementRegistry);\n #system = inject(SystemService);\n\n #ngControl = injectNgControl();\n elementTemplate = signal<TemplateRef<any> | undefined>(undefined);\n readonly = false;\n\n formField = input.required<ObjectTypeField>({ alias: 'field' });\n #fieldEffect = effect(() => {\n const field = this.formField();\n\n untracked(() => {\n if (!field._internalType) field._internalType = this.#system.getInternalFormElementType(field.propertyType);\n this.elementTemplate.set(this.#registry.getElementTemplate(field._internalType, this.situation()));\n // TODO: set readonly state based on ...????... schema?\n this.readonly = false;\n });\n });\n context = computed<MetadataFormFieldContext>(() => {\n const field = this.formField();\n field.required = this.situation() !== Situation.SEARCH ? field.required : false;\n return {\n label: field.label || field.name,\n description: field.description,\n situation: this.situation() || Situation.EDIT,\n field,\n ctrl: this.#ngControl?.control || undefined\n };\n });\n\n /**\n * Form situation, if not set default will be 'EDIT'\n */\n situation = input<string | undefined>(Situation.EDIT);\n}\n","@let field = formField();\n@let et = elementTemplate();\n\n@if (field) {\n <div class=\"form-field t-{{ field._internalType }}\" #formField [attr.data-name]=\"field.name\" [ngClass]=\"{ disabled: !!readonly }\">\n @if (et) {\n <ng-container *ngTemplateOutlet=\"et; context: { $implicit: context() }\"></ng-container>\n } @else {\n <em>\n <strong>{{ field._internalType }}</strong>\n </em>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAGA;;AAEG;MAIU,2BAA2B,CAAA;AAHxC,IAAA,WAAA,GAAA;QAIU,IAAS,CAAA,SAAA,GAAiD,EAAE;QAE5D,IAAK,CAAA,KAAA,GAAiD,EAAE;QACxD,IAAO,CAAA,OAAA,GAAiD,EAAE;QAC1D,IAAO,CAAA,OAAA,GAAiD,EAAE;AAiFnE;AA/EC;;;;;AAKG;AACH,IAAA,kBAAkB,CAAC,YAAoB,EAAE,SAAoB,GAAA,SAAS,CAAC,IAAI,EAAA;AACzE,QAAA,IAAI,IAAI,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE;AAC/C,QAAA,IAAI,SAAS,KAAK,SAAS,CAAC,MAAM;AAAE,YAAA,IAAI,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE;AAC3F,aAAA,IAAI,SAAS,KAAK,SAAS,CAAC,MAAM;AAAE,YAAA,IAAI,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE;AAErG,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC;;AAG3B;;;;;;AAMG;IACH,kBAAkB,CAAC,YAAoB,EAAE,WAA6B,EAAE,SAAuB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