geonetwork-ui 2.3.0-dev.c3722986 → 2.3.0-dev.e07c5606

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 (296) hide show
  1. package/esm2022/index.mjs +2 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +6 -2
  3. package/esm2022/libs/api/repository/src/lib/gn4/auth/avatar.service.interface.mjs +1 -1
  4. package/esm2022/libs/api/repository/src/lib/gn4/auth/gravatar.service.mjs +12 -1
  5. package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.mjs +36 -3
  6. package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +19 -7
  7. package/esm2022/libs/common/domain/src/lib/model/record/index.mjs +2 -1
  8. package/esm2022/libs/common/domain/src/lib/model/record/user-feedbacks.model.mjs +2 -0
  9. package/esm2022/libs/common/domain/src/lib/model/user/index.mjs +2 -0
  10. package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
  11. package/esm2022/libs/feature/editor/src/index.mjs +2 -2
  12. package/esm2022/libs/feature/editor/src/lib/+state/editor.facade.mjs +6 -2
  13. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-array/form-field-array.component.mjs +11 -0
  14. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-file/form-field-file.component.mjs +28 -0
  15. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.mjs +64 -0
  16. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-object/form-field-object.component.mjs +11 -0
  17. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.mjs +45 -0
  18. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-simple/form-field-simple.component.mjs +50 -0
  19. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +11 -0
  20. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extent/form-field-temporal-extent.component.mjs +11 -0
  21. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +116 -0
  22. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.mjs +2 -0
  23. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/index.mjs +10 -0
  24. package/esm2022/libs/feature/editor/src/lib/components/record-form/record-form.component.mjs +29 -0
  25. package/esm2022/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.mjs +1 -1
  26. package/esm2022/libs/feature/editor/src/lib/feature-editor.module.mjs +10 -10
  27. package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +9 -1
  28. package/esm2022/libs/feature/editor/src/lib/models/fields.model.mjs +1 -1
  29. package/esm2022/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.mjs +3 -3
  30. package/esm2022/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.mjs +1 -1
  31. package/esm2022/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.mjs +1 -1
  32. package/esm2022/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.mjs +1 -1
  33. package/esm2022/libs/feature/notifications/src/index.mjs +4 -0
  34. package/esm2022/libs/feature/notifications/src/lib/feature-notifications.module.mjs +18 -0
  35. package/esm2022/libs/feature/notifications/src/lib/notification.model.mjs +2 -0
  36. package/esm2022/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.mjs +49 -0
  37. package/esm2022/libs/feature/notifications/src/lib/notifications.service.mjs +29 -0
  38. package/esm2022/libs/feature/record/src/lib/feature-record.module.mjs +4 -4
  39. package/esm2022/libs/feature/record/src/lib/state/mdview.actions.mjs +22 -4
  40. package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +37 -10
  41. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +22 -7
  42. package/esm2022/libs/feature/record/src/lib/state/mdview.reducer.mjs +52 -17
  43. package/esm2022/libs/feature/record/src/lib/state/mdview.selectors.mjs +18 -3
  44. package/esm2022/libs/feature/router/src/lib/default/state/router.effects.mjs +2 -2
  45. package/esm2022/libs/feature/search/src/lib/results-table/results-table.component.mjs +3 -3
  46. package/esm2022/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.mjs +3 -3
  47. package/esm2022/libs/ui/elements/src/index.mjs +15 -15
  48. package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +3 -3
  49. package/esm2022/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.mjs +45 -0
  50. package/esm2022/libs/ui/elements/src/lib/notification/notification.component.mjs +34 -0
  51. package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +3 -3
  52. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +10 -2
  53. package/esm2022/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.mjs +59 -0
  54. package/esm2022/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.mjs +62 -0
  55. package/esm2022/libs/ui/inputs/src/index.mjs +1 -2
  56. package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +17 -8
  57. package/esm2022/libs/ui/inputs/src/lib/text-area/text-area.component.mjs +27 -4
  58. package/esm2022/libs/ui/inputs/src/lib/text-input/text-input.component.mjs +19 -3
  59. package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +7 -25
  60. package/esm2022/libs/ui/layout/src/index.mjs +6 -5
  61. package/esm2022/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.mjs +18 -0
  62. package/esm2022/translations/de.json +33 -0
  63. package/esm2022/translations/en.json +33 -0
  64. package/esm2022/translations/es.json +33 -0
  65. package/esm2022/translations/fr.json +33 -0
  66. package/esm2022/translations/it.json +33 -0
  67. package/esm2022/translations/nl.json +33 -0
  68. package/esm2022/translations/pt.json +33 -0
  69. package/fesm2022/geonetwork-ui.mjs +1835 -1015
  70. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  71. package/index.d.ts +1 -0
  72. package/index.d.ts.map +1 -1
  73. package/index.ts +1 -0
  74. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  75. package/libs/api/repository/src/lib/gn4/auth/avatar.service.interface.d.ts +1 -0
  76. package/libs/api/repository/src/lib/gn4/auth/avatar.service.interface.d.ts.map +1 -1
  77. package/libs/api/repository/src/lib/gn4/auth/gravatar.service.d.ts +1 -0
  78. package/libs/api/repository/src/lib/gn4/auth/gravatar.service.d.ts.map +1 -1
  79. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.d.ts +6 -2
  80. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.d.ts.map +1 -1
  81. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +9 -6
  82. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
  83. package/libs/common/domain/src/lib/model/record/index.d.ts +1 -0
  84. package/libs/common/domain/src/lib/model/record/index.d.ts.map +1 -1
  85. package/libs/common/domain/src/lib/model/record/user-feedbacks.model.d.ts +15 -0
  86. package/libs/common/domain/src/lib/model/record/user-feedbacks.model.d.ts.map +1 -0
  87. package/libs/common/domain/src/lib/model/user/index.d.ts +2 -0
  88. package/libs/common/domain/src/lib/model/user/index.d.ts.map +1 -0
  89. package/libs/common/domain/src/lib/platform.service.interface.d.ts +3 -0
  90. package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
  91. package/libs/feature/editor/src/index.d.ts +1 -1
  92. package/libs/feature/editor/src/index.d.ts.map +1 -1
  93. package/libs/feature/editor/src/lib/+state/editor.facade.d.ts +8 -5
  94. package/libs/feature/editor/src/lib/+state/editor.facade.d.ts.map +1 -1
  95. package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-array/form-field-array.component.d.ts +1 -1
  96. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-array/form-field-array.component.d.ts.map +1 -0
  97. package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-file/form-field-file.component.d.ts +1 -1
  98. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-file/form-field-file.component.d.ts.map +1 -0
  99. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.d.ts +39 -0
  100. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.d.ts.map +1 -0
  101. package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-object/form-field-object.component.d.ts +1 -1
  102. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-object/form-field-object.component.d.ts.map +1 -0
  103. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts +16 -0
  104. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts.map +1 -0
  105. package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-simple/form-field-simple.component.d.ts +2 -2
  106. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-simple/form-field-simple.component.d.ts.map +1 -0
  107. package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts +1 -1
  108. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts.map +1 -0
  109. package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-temporal-extent/form-field-temporal-extent.component.d.ts +1 -1
  110. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extent/form-field-temporal-extent.component.d.ts.map +1 -0
  111. package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.component.d.ts +11 -4
  112. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -0
  113. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.d.ts.map +1 -0
  114. package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts.map +1 -0
  115. package/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.d.ts +3 -3
  116. package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts.map +1 -0
  117. package/libs/feature/editor/src/lib/feature-editor.module.d.ts +1 -1
  118. package/libs/feature/editor/src/lib/feature-editor.module.d.ts.map +1 -1
  119. package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
  120. package/libs/feature/editor/src/lib/models/fields.model.d.ts +1 -1
  121. package/libs/feature/notifications/src/index.d.ts +4 -0
  122. package/libs/feature/notifications/src/index.d.ts.map +1 -0
  123. package/libs/feature/notifications/src/lib/feature-notifications.module.d.ts +7 -0
  124. package/libs/feature/notifications/src/lib/feature-notifications.module.d.ts.map +1 -0
  125. package/libs/feature/notifications/src/lib/notification.model.d.ts +7 -0
  126. package/libs/feature/notifications/src/lib/notification.model.d.ts.map +1 -0
  127. package/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.d.ts +12 -0
  128. package/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.d.ts.map +1 -0
  129. package/libs/feature/notifications/src/lib/notifications.service.d.ts +15 -0
  130. package/libs/feature/notifications/src/lib/notifications.service.d.ts.map +1 -0
  131. package/libs/feature/record/src/lib/feature-record.module.d.ts.map +1 -1
  132. package/libs/feature/record/src/lib/state/mdview.actions.d.ts +40 -6
  133. package/libs/feature/record/src/lib/state/mdview.actions.d.ts.map +1 -1
  134. package/libs/feature/record/src/lib/state/mdview.effects.d.ts +24 -4
  135. package/libs/feature/record/src/lib/state/mdview.effects.d.ts.map +1 -1
  136. package/libs/feature/record/src/lib/state/mdview.facade.d.ts +14 -4
  137. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  138. package/libs/feature/record/src/lib/state/mdview.reducer.d.ts +8 -5
  139. package/libs/feature/record/src/lib/state/mdview.reducer.d.ts.map +1 -1
  140. package/libs/feature/record/src/lib/state/mdview.selectors.d.ts +12 -9
  141. package/libs/feature/record/src/lib/state/mdview.selectors.d.ts.map +1 -1
  142. package/libs/ui/elements/src/index.d.ts +14 -14
  143. package/libs/ui/elements/src/index.d.ts.map +1 -1
  144. package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts +13 -0
  145. package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts.map +1 -0
  146. package/libs/ui/elements/src/lib/notification/notification.component.d.ts +13 -0
  147. package/libs/ui/elements/src/lib/notification/notification.component.d.ts.map +1 -0
  148. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +16 -14
  149. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  150. package/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.d.ts +11 -0
  151. package/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.d.ts.map +1 -0
  152. package/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.d.ts +22 -0
  153. package/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.d.ts.map +1 -0
  154. package/libs/ui/inputs/src/index.d.ts +0 -1
  155. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  156. package/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.d.ts +1 -1
  157. package/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.d.ts.map +1 -1
  158. package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts +7 -1
  159. package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts.map +1 -1
  160. package/libs/ui/inputs/src/lib/text-input/text-input.component.d.ts +4 -1
  161. package/libs/ui/inputs/src/lib/text-input/text-input.component.d.ts.map +1 -1
  162. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +35 -43
  163. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
  164. package/libs/ui/layout/src/index.d.ts +5 -4
  165. package/libs/ui/layout/src/index.d.ts.map +1 -1
  166. package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts +8 -0
  167. package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts.map +1 -0
  168. package/package.json +1 -1
  169. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +7 -1
  170. package/src/libs/api/repository/src/lib/gn4/auth/avatar.service.interface.ts +1 -0
  171. package/src/libs/api/repository/src/lib/gn4/auth/gravatar.service.ts +12 -1
  172. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.ts +51 -1
  173. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +34 -7
  174. package/src/libs/common/domain/src/lib/model/record/index.ts +1 -0
  175. package/src/libs/common/domain/src/lib/model/record/user-feedbacks.model.ts +15 -0
  176. package/src/libs/common/domain/src/lib/platform.service.interface.ts +3 -0
  177. package/src/libs/common/fixtures/src/index.ts +8 -6
  178. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +1 -1
  179. package/src/libs/common/fixtures/src/lib/user-feedbacks.fixtures.ts +83 -0
  180. package/src/libs/feature/editor/src/index.ts +1 -1
  181. package/src/libs/feature/editor/src/lib/+state/editor.facade.ts +8 -1
  182. package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-array/form-field-array.component.ts +1 -0
  183. package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-file/form-field-file.component.ts +4 -1
  184. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.html +8 -0
  185. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.ts +64 -0
  186. package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-object/form-field-object.component.ts +1 -0
  187. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.html +20 -0
  188. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.ts +44 -0
  189. package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-simple/form-field-simple.component.ts +4 -1
  190. package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-spatial-extent/form-field-spatial-extent.component.ts +1 -0
  191. package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-temporal-extent/form-field-temporal-extent.component.ts +1 -0
  192. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +87 -0
  193. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +132 -0
  194. package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.css +0 -0
  195. package/src/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.html +1 -0
  196. package/src/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.ts +4 -4
  197. package/src/libs/feature/editor/src/lib/feature-editor.module.ts +9 -9
  198. package/src/libs/feature/editor/src/lib/fields.config.ts +8 -0
  199. package/src/libs/feature/editor/src/lib/models/fields.model.ts +1 -1
  200. package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.html +1 -1
  201. package/src/libs/feature/notifications/src/index.ts +3 -0
  202. package/src/libs/feature/notifications/src/lib/feature-notifications.module.ts +10 -0
  203. package/src/libs/feature/notifications/src/lib/notification.model.ts +6 -0
  204. package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.css +0 -0
  205. package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.html +17 -0
  206. package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.ts +44 -0
  207. package/src/libs/feature/notifications/src/lib/notifications.service.ts +27 -0
  208. package/src/libs/feature/record/src/lib/feature-record.module.ts +5 -2
  209. package/src/libs/feature/record/src/lib/state/mdview.actions.ts +51 -6
  210. package/src/libs/feature/record/src/lib/state/mdview.effects.ts +82 -7
  211. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +49 -8
  212. package/src/libs/feature/record/src/lib/state/mdview.reducer.ts +81 -24
  213. package/src/libs/feature/record/src/lib/state/mdview.selectors.ts +40 -10
  214. package/src/libs/feature/router/src/lib/default/state/router.effects.ts +2 -2
  215. package/src/libs/feature/search/src/lib/results-table/results-table.component.html +3 -3
  216. package/src/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.html +5 -5
  217. package/src/libs/ui/elements/src/index.ts +14 -14
  218. package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +1 -1
  219. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.css +0 -5
  220. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.html +0 -21
  221. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.ts +1 -14
  222. package/src/libs/ui/elements/src/lib/notification/notification.component.css +0 -0
  223. package/src/libs/ui/elements/src/lib/notification/notification.component.html +52 -0
  224. package/src/libs/ui/elements/src/lib/notification/notification.component.ts +31 -0
  225. package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.html +1 -1
  226. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +5 -0
  227. package/src/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.ts +54 -0
  228. package/src/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.css +0 -0
  229. package/src/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.html +75 -0
  230. package/src/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.ts +63 -0
  231. package/src/libs/ui/inputs/src/index.ts +0 -1
  232. package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.ts +13 -0
  233. package/src/libs/ui/inputs/src/lib/text-area/text-area.component.html +2 -1
  234. package/src/libs/ui/inputs/src/lib/text-area/text-area.component.ts +29 -0
  235. package/src/libs/ui/inputs/src/lib/text-input/text-input.component.html +1 -1
  236. package/src/libs/ui/inputs/src/lib/text-input/text-input.component.ts +16 -1
  237. package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +1 -20
  238. package/src/libs/ui/layout/src/index.ts +5 -4
  239. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.css +0 -0
  240. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.html +18 -0
  241. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.ts +16 -0
  242. package/tailwind.base.css +36 -0
  243. package/translations/de.json +33 -0
  244. package/translations/en.json +33 -0
  245. package/translations/es.json +33 -0
  246. package/translations/fr.json +33 -0
  247. package/translations/it.json +33 -0
  248. package/translations/nl.json +33 -0
  249. package/translations/pt.json +33 -0
  250. package/translations/sk.json +33 -0
  251. package/esm2022/libs/feature/editor/src/lib/record-form/record-form.component.mjs +0 -30
  252. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-array/form-field-array.component.mjs +0 -11
  253. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-file/form-field-file.component.mjs +0 -27
  254. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-object/form-field-object.component.mjs +0 -11
  255. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.mjs +0 -27
  256. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-simple/form-field-simple.component.mjs +0 -49
  257. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +0 -11
  258. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-temporal-extent/form-field-temporal-extent.component.mjs +0 -11
  259. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field.component.mjs +0 -76
  260. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field.model.mjs +0 -2
  261. package/esm2022/libs/ui/inputs/src/lib/form-field/index.mjs +0 -10
  262. package/libs/feature/editor/src/lib/record-form/record-form.component.d.ts.map +0 -1
  263. package/libs/ui/inputs/src/lib/form-field/form-field-array/form-field-array.component.d.ts.map +0 -1
  264. package/libs/ui/inputs/src/lib/form-field/form-field-file/form-field-file.component.d.ts.map +0 -1
  265. package/libs/ui/inputs/src/lib/form-field/form-field-object/form-field-object.component.d.ts.map +0 -1
  266. package/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.d.ts +0 -11
  267. package/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.d.ts.map +0 -1
  268. package/libs/ui/inputs/src/lib/form-field/form-field-simple/form-field-simple.component.d.ts.map +0 -1
  269. package/libs/ui/inputs/src/lib/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts.map +0 -1
  270. package/libs/ui/inputs/src/lib/form-field/form-field-temporal-extent/form-field-temporal-extent.component.d.ts.map +0 -1
  271. package/libs/ui/inputs/src/lib/form-field/form-field.component.d.ts.map +0 -1
  272. package/libs/ui/inputs/src/lib/form-field/form-field.model.d.ts.map +0 -1
  273. package/libs/ui/inputs/src/lib/form-field/index.d.ts.map +0 -1
  274. package/src/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.html +0 -11
  275. package/src/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.ts +0 -15
  276. package/src/libs/ui/inputs/src/lib/form-field/form-field.component.html +0 -68
  277. package/src/libs/ui/inputs/src/lib/form-field/form-field.component.ts +0 -80
  278. /package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.model.d.ts +0 -0
  279. /package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/index.d.ts +0 -0
  280. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-array/form-field-array.component.css +0 -0
  281. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-array/form-field-array.component.html +0 -0
  282. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-file/form-field-file.component.css +0 -0
  283. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-file/form-field-file.component.html +0 -0
  284. /package/src/libs/feature/editor/src/lib/{record-form/record-form.component.css → components/record-form/form-field/form-field-license/form-field-license.component.css} +0 -0
  285. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-object/form-field-object.component.css +0 -0
  286. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-object/form-field-object.component.html +0 -0
  287. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-rich/form-field-rich.component.css +0 -0
  288. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-simple/form-field-simple.component.css +0 -0
  289. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-simple/form-field-simple.component.html +0 -0
  290. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-spatial-extent/form-field-spatial-extent.component.css +0 -0
  291. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-spatial-extent/form-field-spatial-extent.component.html +0 -0
  292. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-temporal-extent/form-field-temporal-extent.component.css +0 -0
  293. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-temporal-extent/form-field-temporal-extent.component.html +0 -0
  294. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.component.css +0 -0
  295. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.model.ts +0 -0
  296. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/index.ts +0 -0
@@ -0,0 +1,64 @@
1
+ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
2
+ import { FormControl } from '@angular/forms'
3
+ import { marker } from '@biesbjerg/ngx-translate-extract-marker'
4
+ import { DropdownSelectorComponent } from '../../../../../../../../../libs/ui/inputs/src'
5
+
6
+ @Component({
7
+ selector: 'gn-ui-form-field-license',
8
+ templateUrl: './form-field-license.component.html',
9
+ styleUrls: ['./form-field-license.component.css'],
10
+ changeDetection: ChangeDetectionStrategy.OnPush,
11
+ standalone: true,
12
+ imports: [DropdownSelectorComponent],
13
+ })
14
+ export class FormFieldLicenseComponent {
15
+ @Input() control!: FormControl
16
+ @Input() label: string
17
+
18
+ get selected() {
19
+ return this.control.value[0]?.text
20
+ }
21
+
22
+ onSelectValue(value: unknown) {
23
+ this.control.setValue([{ text: value }])
24
+ }
25
+
26
+ choices = [
27
+ {
28
+ value: 'cc-by',
29
+ label: marker('editor.record.form.license.cc-by'),
30
+ },
31
+ {
32
+ value: 'cc-by-sa',
33
+ label: marker('editor.record.form.license.cc-by-sa'),
34
+ },
35
+ {
36
+ value: 'cc-zero',
37
+ label: marker('editor.record.form.license.cc-zero'),
38
+ },
39
+ {
40
+ value: 'etalab',
41
+ label: marker('editor.record.form.license.etalab'),
42
+ },
43
+ {
44
+ value: 'etalab-v2',
45
+ label: marker('editor.record.form.license.etalab-v2'),
46
+ },
47
+ {
48
+ value: 'odbl',
49
+ label: marker('editor.record.form.license.odbl'),
50
+ },
51
+ {
52
+ value: 'odc-by',
53
+ label: marker('editor.record.form.license.odc-by'),
54
+ },
55
+ {
56
+ value: 'pddl',
57
+ label: marker('editor.record.form.license.pddl'),
58
+ },
59
+ {
60
+ value: 'unknown',
61
+ label: marker('editor.record.form.license.unknown'),
62
+ },
63
+ ]
64
+ }
@@ -5,5 +5,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'
5
5
  templateUrl: './form-field-object.component.html',
6
6
  styleUrls: ['./form-field-object.component.css'],
7
7
  changeDetection: ChangeDetectionStrategy.OnPush,
8
+ standalone: true,
8
9
  })
9
10
  export class FormFieldObjectComponent {}
@@ -0,0 +1,20 @@
1
+ <gn-ui-form-field-wrapper [label]="label" [hint]="hint">
2
+ <gn-ui-button
3
+ form-field-interaction
4
+ [extraClass]="getButtonExtraClass()"
5
+ (buttonClick)="togglePreview()"
6
+ >
7
+ <span class="material-symbols-outlined mr-1 gn-ui-icon-small">{{
8
+ preview ? 'visibility' : 'visibility_off'
9
+ }}</span>
10
+ {{ preview ? 'WYSIWYG' : 'Markdown' }}
11
+ </gn-ui-button>
12
+ <gn-ui-markdown-editor
13
+ class="h-full"
14
+ [preview]="preview"
15
+ [helperText]="helperText"
16
+ [placeholder]="placeholder"
17
+ [textContent]="control.value"
18
+ (textContentChanged)="handleTextContentChanged($event)"
19
+ ></gn-ui-markdown-editor>
20
+ </gn-ui-form-field-wrapper>
@@ -0,0 +1,44 @@
1
+ import { CommonModule } from '@angular/common'
2
+ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
3
+ import { FormControl, ReactiveFormsModule } from '@angular/forms'
4
+ import { MarkdownEditorComponent } from '../../../../../../../../../libs/ui/elements/src'
5
+ import { ButtonComponent } from '../../../../../../../../../libs/ui/inputs/src'
6
+ import { FormFieldWrapperComponent } from '../../../../../../../../../libs/ui/layout/src'
7
+
8
+ @Component({
9
+ selector: 'gn-ui-form-field-rich',
10
+ templateUrl: './form-field-rich.component.html',
11
+ styleUrls: ['./form-field-rich.component.css'],
12
+ changeDetection: ChangeDetectionStrategy.OnPush,
13
+ standalone: true,
14
+ imports: [
15
+ CommonModule,
16
+ ReactiveFormsModule,
17
+ MarkdownEditorComponent,
18
+ FormFieldWrapperComponent,
19
+ ButtonComponent,
20
+ ],
21
+ })
22
+ export class FormFieldRichComponent {
23
+ @Input() control!: FormControl
24
+ @Input() label: string
25
+ @Input() hint: string
26
+ @Input() helperText: string
27
+ @Input() placeholder = 'Votre texte ici' //TODO: translate
28
+
29
+ preview = false
30
+
31
+ getButtonExtraClass() {
32
+ return `${
33
+ this.preview ? 'text-gray-200 bg-gray-900' : 'text-gray-900 bg-gray-200'
34
+ } rounded-[1.25rem] p-[0.375rem] text-xs font-medium w-24`
35
+ }
36
+
37
+ togglePreview() {
38
+ this.preview = !this.preview
39
+ }
40
+
41
+ handleTextContentChanged(textContent: string) {
42
+ this.control.setValue(textContent)
43
+ }
44
+ }
@@ -1,11 +1,14 @@
1
+ import { CommonModule } from '@angular/common'
1
2
  import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
2
- import { FormControl } from '@angular/forms'
3
+ import { FormControl, ReactiveFormsModule } from '@angular/forms'
3
4
 
4
5
  @Component({
5
6
  selector: 'gn-ui-form-field-simple',
6
7
  templateUrl: './form-field-simple.component.html',
7
8
  styleUrls: ['./form-field-simple.component.css'],
8
9
  changeDetection: ChangeDetectionStrategy.OnPush,
10
+ standalone: true,
11
+ imports: [CommonModule, ReactiveFormsModule],
9
12
  })
10
13
  export class FormFieldSimpleComponent {
11
14
  @Input() type: 'date' | 'url' | 'text' | 'number' | 'list' | 'toggle'
@@ -5,5 +5,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'
5
5
  templateUrl: './form-field-spatial-extent.component.html',
6
6
  styleUrls: ['./form-field-spatial-extent.component.css'],
7
7
  changeDetection: ChangeDetectionStrategy.OnPush,
8
+ standalone: true,
8
9
  })
9
10
  export class FormFieldSpatialExtentComponent {}
@@ -5,5 +5,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'
5
5
  templateUrl: './form-field-temporal-extent.component.html',
6
6
  styleUrls: ['./form-field-temporal-extent.component.css'],
7
7
  changeDetection: ChangeDetectionStrategy.OnPush,
8
+ standalone: true,
8
9
  })
9
10
  export class FormFieldTemporalExtentComponent {}
@@ -0,0 +1,87 @@
1
+ <div class="flex flex-col h-full">
2
+ <ng-container *ngIf="withoutWrapper; else withGenericWrapper">
3
+ <ng-container *ngTemplateOutlet="fieldContent"></ng-container>
4
+ </ng-container>
5
+ <ng-template #withGenericWrapper>
6
+ <gn-ui-form-field-wrapper
7
+ [label]="config.labelKey | translate"
8
+ [hint]="config.hintKey | translate"
9
+ >
10
+ <ng-container *ngTemplateOutlet="fieldContent"></ng-container>
11
+ </gn-ui-form-field-wrapper>
12
+ </ng-template>
13
+ </div>
14
+
15
+ <ng-template #fieldContent>
16
+ <ng-container *ngIf="isTitle">
17
+ <div class="flex justify-between items-center gap-3">
18
+ <h2
19
+ #titleInput
20
+ class="grow text-3xl font-normal"
21
+ [gnUiEditableLabel]="true"
22
+ (editableLabelChanged)="formControl.setValue($event)"
23
+ >
24
+ {{ formControl.value }}
25
+ </h2>
26
+ <span
27
+ class="material-symbols-outlined gn-ui-icon-small m-2 cursor-pointer"
28
+ (click)="focusTitleInput()"
29
+ >edit</span
30
+ >
31
+ <span
32
+ class="material-symbols-outlined gn-ui-icon-small m-2"
33
+ [matTooltip]="config.hintKey | translate"
34
+ matTooltipPosition="above"
35
+ >
36
+ help
37
+ </span>
38
+ </div>
39
+ </ng-container>
40
+ <ng-container *ngIf="isAbstract">
41
+ <gn-ui-form-field-rich
42
+ class="h-[8rem]"
43
+ [control]="formControl"
44
+ [label]="config.labelKey | translate"
45
+ [hint]="config.hintKey | translate"
46
+ ></gn-ui-form-field-rich>
47
+ </ng-container>
48
+ <ng-container *ngIf="isLicenses">
49
+ <gn-ui-form-field-license
50
+ [control]="formControl"
51
+ [label]="config.labelKey | translate"
52
+ ></gn-ui-form-field-license>
53
+ </ng-container>
54
+ <ng-container *ngIf="isSimpleField">
55
+ <gn-ui-form-field-simple
56
+ [type]="simpleType"
57
+ [control]="formControl"
58
+ [readonly]="isFieldLocked"
59
+ [invalid]="isFieldInvalid"
60
+ ></gn-ui-form-field-simple>
61
+ </ng-container>
62
+ <ng-container *ngIf="isFileField">
63
+ <gn-ui-form-field-file
64
+ [control]="formControl"
65
+ [readonly]="isFieldLocked"
66
+ [invalid]="isFieldInvalid"
67
+ ></gn-ui-form-field-file>
68
+ </ng-container>
69
+ <ng-container *ngIf="isArrayField">
70
+ <gn-ui-form-field-array></gn-ui-form-field-array>
71
+ </ng-container>
72
+ <ng-container *ngIf="isObjectField">
73
+ <gn-ui-form-field-object></gn-ui-form-field-object>
74
+ </ng-container>
75
+ <ng-container *ngIf="isSpatialExtentField">
76
+ <gn-ui-form-field-spatial-extent></gn-ui-form-field-spatial-extent>
77
+ </ng-container>
78
+ <ng-container *ngIf="isTemporalExtentField">
79
+ <gn-ui-form-field-temporal-extent></gn-ui-form-field-temporal-extent>
80
+ </ng-container>
81
+ <div
82
+ *ngIf="isFieldInvalid && config.invalidHintKey"
83
+ class="mt-2 text-pink-500 text-sm field-invalid-hint"
84
+ >
85
+ {{ config.invalidHintKey | translate }}
86
+ </div>
87
+ </ng-template>
@@ -0,0 +1,132 @@
1
+ import { CommonModule } from '@angular/common'
2
+ import {
3
+ ChangeDetectionStrategy,
4
+ Component,
5
+ ElementRef,
6
+ Input,
7
+ Output,
8
+ ViewChild,
9
+ } from '@angular/core'
10
+ import { FormControl, ReactiveFormsModule } from '@angular/forms'
11
+ import { MatIconModule } from '@angular/material/icon'
12
+ import { MatTooltipModule } from '@angular/material/tooltip'
13
+ import { EditableLabelDirective } from '../../../../../../../../libs/ui/inputs/src'
14
+ import { FormFieldWrapperComponent } from '../../../../../../../../libs/ui/layout/src'
15
+ import { TranslateModule } from '@ngx-translate/core'
16
+ import { Observable } from 'rxjs'
17
+ import { FormFieldArrayComponent } from './form-field-array/form-field-array.component'
18
+ import { FormFieldFileComponent } from './form-field-file/form-field-file.component'
19
+ import { FormFieldLicenseComponent } from './form-field-license/form-field-license.component'
20
+ import { FormFieldObjectComponent } from './form-field-object/form-field-object.component'
21
+ import { FormFieldRichComponent } from './form-field-rich/form-field-rich.component'
22
+ import { FormFieldSimpleComponent } from './form-field-simple/form-field-simple.component'
23
+ import { FormFieldSpatialExtentComponent } from './form-field-spatial-extent/form-field-spatial-extent.component'
24
+ import { FormFieldTemporalExtentComponent } from './form-field-temporal-extent/form-field-temporal-extent.component'
25
+ import { FormFieldConfig } from './form-field.model'
26
+
27
+ @Component({
28
+ selector: 'gn-ui-form-field',
29
+ templateUrl: './form-field.component.html',
30
+ styleUrls: ['./form-field.component.css'],
31
+ changeDetection: ChangeDetectionStrategy.OnPush,
32
+ standalone: true,
33
+ imports: [
34
+ CommonModule,
35
+ ReactiveFormsModule,
36
+ EditableLabelDirective,
37
+ MatIconModule,
38
+ MatTooltipModule,
39
+ FormFieldWrapperComponent,
40
+ FormFieldSimpleComponent,
41
+ FormFieldRichComponent,
42
+ FormFieldObjectComponent,
43
+ FormFieldSpatialExtentComponent,
44
+ FormFieldTemporalExtentComponent,
45
+ FormFieldFileComponent,
46
+ FormFieldArrayComponent,
47
+ FormFieldLicenseComponent,
48
+ TranslateModule,
49
+ ],
50
+ })
51
+ export class FormFieldComponent {
52
+ @Input() model: string
53
+ @Input() config: FormFieldConfig
54
+ @Input() set value(v: unknown) {
55
+ this.formControl.setValue(v, {
56
+ emitEvent: false,
57
+ })
58
+ }
59
+ @Output() valueChange: Observable<unknown>
60
+
61
+ @ViewChild('titleInput') titleInput: ElementRef
62
+
63
+ formControl = new FormControl()
64
+
65
+ constructor() {
66
+ this.valueChange = this.formControl.valueChanges
67
+ }
68
+
69
+ focusTitleInput() {
70
+ this.titleInput.nativeElement.children[0].focus()
71
+ }
72
+
73
+ get simpleType() {
74
+ return this.config.type as
75
+ | 'date'
76
+ | 'url'
77
+ | 'text'
78
+ | 'number'
79
+ | 'list'
80
+ | 'toggle'
81
+ }
82
+
83
+ get isSimpleField() {
84
+ return (
85
+ this.config.type === 'text' ||
86
+ this.config.type === 'number' ||
87
+ this.config.type === 'date' ||
88
+ this.config.type === 'list' ||
89
+ this.config.type === 'url' ||
90
+ this.config.type === 'toggle'
91
+ )
92
+ }
93
+ get isFileField() {
94
+ return this.config.type === 'file'
95
+ }
96
+ get isSpatialExtentField() {
97
+ return this.config.type === 'spatial_extent'
98
+ }
99
+ get isTemporalExtentField() {
100
+ return this.config.type === 'temporal_extent'
101
+ }
102
+ get isArrayField() {
103
+ return this.config.type === 'array'
104
+ }
105
+ get isObjectField() {
106
+ return this.config.type === 'object'
107
+ }
108
+
109
+ get isFieldOk() {
110
+ return !this.config.locked && !this.config.invalid
111
+ }
112
+ get isFieldLocked() {
113
+ return this.config.locked
114
+ }
115
+ get isFieldInvalid() {
116
+ return !this.config.locked && this.config.invalid
117
+ }
118
+
119
+ get isTitle() {
120
+ return this.model === 'title'
121
+ }
122
+ get isAbstract() {
123
+ return this.model === 'abstract'
124
+ }
125
+ get isLicenses() {
126
+ return this.model === 'licenses'
127
+ }
128
+
129
+ get withoutWrapper() {
130
+ return this.model === 'title' || this.model === 'abstract'
131
+ }
132
+ }
@@ -2,6 +2,7 @@
2
2
  <ng-container *ngFor="let field of fields$ | async; trackBy: fieldTracker">
3
3
  <gn-ui-form-field
4
4
  *ngIf="field.config.formFieldConfig && !field.config.hidden"
5
+ [model]="field.config.model"
5
6
  [config]="field.config.formFieldConfig"
6
7
  [value]="field.value"
7
8
  (valueChange)="handleFieldValueChange(field, $event)"
@@ -1,8 +1,8 @@
1
1
  import { CommonModule } from '@angular/common'
2
2
  import { ChangeDetectionStrategy, Component } from '@angular/core'
3
- import { UiInputsModule } from '../../../../../../libs/ui/inputs/src'
4
- import { EditorFacade } from '../+state/editor.facade'
5
- import { EditorFieldState, EditorFieldValue } from '../models/fields.model'
3
+ import { EditorFacade } from '../../+state/editor.facade'
4
+ import { EditorFieldState, EditorFieldValue } from '../../models/fields.model'
5
+ import { FormFieldComponent } from './form-field'
6
6
 
7
7
  @Component({
8
8
  selector: 'gn-ui-record-form',
@@ -10,7 +10,7 @@ import { EditorFieldState, EditorFieldValue } from '../models/fields.model'
10
10
  styleUrls: ['./record-form.component.css'],
11
11
  changeDetection: ChangeDetectionStrategy.OnPush,
12
12
  standalone: true,
13
- imports: [CommonModule, UiInputsModule],
13
+ imports: [CommonModule, FormFieldComponent],
14
14
  })
15
15
  export class RecordFormComponent {
16
16
  fields$ = this.facade.recordFields$
@@ -1,20 +1,20 @@
1
+ import { CommonModule } from '@angular/common'
2
+ import { HttpClientModule, HttpClientXsrfModule } from '@angular/common/http'
1
3
  import { NgModule } from '@angular/core'
2
4
  import { MatNativeDateModule } from '@angular/material/core'
3
5
  import { MatDatepickerModule } from '@angular/material/datepicker'
4
6
  import { MatFormFieldModule } from '@angular/material/form-field'
5
- import { WizardComponent } from './components/wizard/wizard.component'
6
- import { WizardFieldComponent } from './components/wizard-field/wizard-field.component'
7
7
  import { UiInputsModule } from '../../../../../libs/ui/inputs/src'
8
8
  import { UiWidgetsModule } from '../../../../../libs/ui/widgets/src'
9
- import { TranslateModule } from '@ngx-translate/core'
10
- import { WizardSummarizeComponent } from './components/wizard-summarize/wizard-summarize.component'
11
- import { CommonModule } from '@angular/common'
12
- import { HttpClientModule, HttpClientXsrfModule } from '@angular/common/http'
13
- import { StoreModule } from '@ngrx/store'
14
9
  import { EffectsModule } from '@ngrx/effects'
15
- import * as fromEditor from './+state/editor.reducer'
10
+ import { StoreModule } from '@ngrx/store'
11
+ import { TranslateModule } from '@ngx-translate/core'
16
12
  import { EditorEffects } from './+state/editor.effects'
17
13
  import { EditorFacade } from './+state/editor.facade'
14
+ import * as fromEditor from './+state/editor.reducer'
15
+ import { WizardFieldComponent } from './components/wizard-field/wizard-field.component'
16
+ import { WizardSummarizeComponent } from './components/wizard-summarize/wizard-summarize.component'
17
+ import { WizardComponent } from './components/wizard/wizard.component'
18
18
 
19
19
  @NgModule({
20
20
  declarations: [
@@ -42,5 +42,5 @@ import { EditorFacade } from './+state/editor.facade'
42
42
  providers: [EditorFacade],
43
43
  })
44
44
  export class FeatureEditorModule {}
45
- export * from './services/wizard.service'
46
45
  export * from './models/index'
46
+ export * from './services/wizard.service'
@@ -1,3 +1,4 @@
1
+ import { marker } from '@biesbjerg/ngx-translate-extract-marker'
1
2
  import { EditorFieldsConfig } from './models/fields.model'
2
3
 
3
4
  export const DEFAULT_FIELDS: EditorFieldsConfig = [
@@ -32,4 +33,11 @@ export const DEFAULT_FIELDS: EditorFieldsConfig = [
32
33
  },
33
34
  onSaveProcess: '${dateNow()}',
34
35
  },
36
+ {
37
+ model: 'licenses',
38
+ formFieldConfig: {
39
+ labelKey: marker('editor.record.form.license'),
40
+ type: 'list',
41
+ },
42
+ },
35
43
  ]
@@ -1,4 +1,4 @@
1
- import { FormFieldConfig } from '../../../../../../libs/ui/inputs/src'
1
+ import { FormFieldConfig } from '../components/record-form/form-field'
2
2
 
3
3
  // Expressions should be enclosed in `${}` to be recognized as such
4
4
  // eg. ${dateNow()}
@@ -1,6 +1,6 @@
1
1
  <div class="flex flex-col gap-2 my-2">
2
2
  <div class="flex items-center gap-4">
3
- <div class="flex-grow rounded-md border-2 border-gray-200">
3
+ <div class="grow rounded-md border-2 border-gray-200">
4
4
  <gn-ui-drag-and-drop-file-input
5
5
  (fileChange)="handleFileChange($event)"
6
6
  [accept]="acceptedMimeType.join(',')"
@@ -0,0 +1,3 @@
1
+ export * from './lib/feature-notifications.module'
2
+ export * from './lib/notifications.service'
3
+ export * from './lib/notifications-container/notifications-container.component'
@@ -0,0 +1,10 @@
1
+ import { NotificationsService } from './notifications.service'
2
+ import { NgModule } from '@angular/core'
3
+
4
+ @NgModule({
5
+ declarations: [],
6
+ exports: [],
7
+ imports: [],
8
+ providers: [NotificationsService],
9
+ })
10
+ export class FeatureNotificationsModule {}
@@ -0,0 +1,6 @@
1
+ export interface NotificationContent {
2
+ type: 'info' | 'warning' | 'error' | 'success'
3
+ title: string
4
+ text: string
5
+ closeMessage?: string
6
+ }
@@ -0,0 +1,17 @@
1
+ <div class="flex flex-col gap-6 p-6 items-start pointer-events-none">
2
+ <gn-ui-notification
3
+ *ngFor="
4
+ let notification of notificationsService.notifications$ | async;
5
+ trackBy: trackById
6
+ "
7
+ class="max-w-full pointer-events-auto"
8
+ [text]="notification.text"
9
+ [type]="notification.type"
10
+ [title]="notification.title"
11
+ [closeMessage]="notification.closeMessage"
12
+ (notificationClose)="
13
+ notificationsService.removeNotificationById(notification.id)
14
+ "
15
+ [@enterExit]
16
+ ></gn-ui-notification>
17
+ </div>
@@ -0,0 +1,44 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core'
2
+ import { CommonModule } from '@angular/common'
3
+ import { NotificationsService } from '../notifications.service'
4
+ import { NotificationComponent } from '../../../../../../libs/ui/elements/src'
5
+ import {
6
+ animate,
7
+ keyframes,
8
+ style,
9
+ transition,
10
+ trigger,
11
+ } from '@angular/animations'
12
+
13
+ @Component({
14
+ selector: 'gn-ui-notifications-container',
15
+ standalone: true,
16
+ imports: [CommonModule, NotificationComponent],
17
+ templateUrl: './notifications-container.component.html',
18
+ styleUrls: ['./notifications-container.component.css'],
19
+ changeDetection: ChangeDetectionStrategy.OnPush,
20
+ animations: [
21
+ trigger('enterExit', [
22
+ transition(':enter', [
23
+ animate(
24
+ '150ms',
25
+ keyframes([
26
+ style({ transform: 'scale(1)', opacity: 0 }),
27
+ style({ transform: 'scale(1.03)', opacity: 0.5 }),
28
+ style({ transform: 'scale(1)', opacity: 1 }),
29
+ ])
30
+ ),
31
+ ]),
32
+ transition(':leave', [
33
+ animate('200ms', style({ transform: 'translateX(50px)', opacity: 0 })),
34
+ ]),
35
+ ]),
36
+ ],
37
+ })
38
+ export class NotificationsContainerComponent {
39
+ constructor(protected notificationsService: NotificationsService) {}
40
+
41
+ trackById(index: number, notification: { id: number }) {
42
+ return notification.id
43
+ }
44
+ }
@@ -0,0 +1,27 @@
1
+ import { Injectable } from '@angular/core'
2
+ import { NotificationContent } from './notification.model'
3
+ import { BehaviorSubject } from 'rxjs'
4
+
5
+ type NotificationWithIdentity = NotificationContent & { id: number }
6
+
7
+ @Injectable({
8
+ providedIn: 'root',
9
+ })
10
+ export class NotificationsService {
11
+ notifications$ = new BehaviorSubject<NotificationWithIdentity[]>([])
12
+
13
+ showNotification(content: NotificationContent, timeoutMs?: number) {
14
+ const id = Math.floor(Math.random() * 1000000)
15
+ this.notifications$.next([...this.notifications$.value, { ...content, id }])
16
+ if (typeof timeoutMs === 'undefined') return
17
+ setTimeout(() => {
18
+ this.removeNotificationById(id)
19
+ }, timeoutMs)
20
+ }
21
+
22
+ removeNotificationById(id: number) {
23
+ this.notifications$.next(
24
+ this.notifications$.value.filter((n) => n.id !== id)
25
+ )
26
+ }
27
+ }
@@ -11,7 +11,10 @@ import { MdViewFacade } from './state'
11
11
  import { MdViewEffects } from './state/mdview.effects'
12
12
  import { MapViewComponent } from './map-view/map-view.component'
13
13
  import { DataViewComponent } from './data-view/data-view.component'
14
- import { MD_VIEW_FEATURE_STATE_KEY, reducer } from './state/mdview.reducer'
14
+ import {
15
+ METADATA_VIEW_FEATURE_STATE_KEY,
16
+ reducer,
17
+ } from './state/mdview.reducer'
15
18
  import { MatTabsModule } from '@angular/material/tabs'
16
19
  import { MatIconModule } from '@angular/material/icon'
17
20
  import { UiWidgetsModule } from '../../../../../libs/ui/widgets/src'
@@ -35,7 +38,7 @@ import { DataViewShareComponent } from './data-view-share/data-view-share.compon
35
38
  ],
36
39
  imports: [
37
40
  CommonModule,
38
- StoreModule.forFeature(MD_VIEW_FEATURE_STATE_KEY, reducer),
41
+ StoreModule.forFeature(METADATA_VIEW_FEATURE_STATE_KEY, reducer),
39
42
  EffectsModule.forFeature([MdViewEffects]),
40
43
  UiLayoutModule,
41
44
  FeatureMapModule,