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

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 (320) 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-resource-updated/form-field-resource-updated.component.mjs +15 -0
  18. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.mjs +45 -0
  19. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-simple/form-field-simple.component.mjs +50 -0
  20. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +11 -0
  21. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extent/form-field-temporal-extent.component.mjs +11 -0
  22. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +121 -0
  23. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.mjs +2 -0
  24. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/index.mjs +10 -0
  25. package/esm2022/libs/feature/editor/src/lib/components/record-form/record-form.component.mjs +29 -0
  26. package/esm2022/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.mjs +1 -1
  27. package/esm2022/libs/feature/editor/src/lib/feature-editor.module.mjs +10 -10
  28. package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +16 -1
  29. package/esm2022/libs/feature/editor/src/lib/models/fields.model.mjs +1 -1
  30. package/esm2022/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.mjs +3 -3
  31. package/esm2022/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.mjs +1 -1
  32. package/esm2022/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.mjs +1 -1
  33. package/esm2022/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.mjs +1 -1
  34. package/esm2022/libs/feature/notifications/src/index.mjs +4 -0
  35. package/esm2022/libs/feature/notifications/src/lib/feature-notifications.module.mjs +18 -0
  36. package/esm2022/libs/feature/notifications/src/lib/notification.model.mjs +2 -0
  37. package/esm2022/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.mjs +49 -0
  38. package/esm2022/libs/feature/notifications/src/lib/notifications.service.mjs +29 -0
  39. package/esm2022/libs/feature/record/src/lib/feature-record.module.mjs +4 -4
  40. package/esm2022/libs/feature/record/src/lib/state/mdview.actions.mjs +22 -4
  41. package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +37 -10
  42. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +22 -7
  43. package/esm2022/libs/feature/record/src/lib/state/mdview.reducer.mjs +52 -17
  44. package/esm2022/libs/feature/record/src/lib/state/mdview.selectors.mjs +18 -3
  45. package/esm2022/libs/feature/router/src/lib/default/state/router.effects.mjs +2 -2
  46. package/esm2022/libs/feature/search/src/lib/results-table/results-table.component.mjs +3 -3
  47. package/esm2022/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.mjs +3 -3
  48. package/esm2022/libs/ui/elements/src/index.mjs +15 -15
  49. package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +3 -3
  50. package/esm2022/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.mjs +45 -0
  51. package/esm2022/libs/ui/elements/src/lib/notification/notification.component.mjs +34 -0
  52. package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +34 -7
  53. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +10 -2
  54. package/esm2022/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.mjs +59 -0
  55. package/esm2022/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.mjs +62 -0
  56. package/esm2022/libs/ui/inputs/src/index.mjs +15 -16
  57. package/esm2022/libs/ui/inputs/src/lib/date-picker/date-picker.component.mjs +22 -0
  58. package/esm2022/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.mjs +7 -5
  59. package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +17 -8
  60. package/esm2022/libs/ui/inputs/src/lib/text-area/text-area.component.mjs +27 -4
  61. package/esm2022/libs/ui/inputs/src/lib/text-input/text-input.component.mjs +19 -3
  62. package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +11 -28
  63. package/esm2022/libs/ui/layout/src/index.mjs +6 -5
  64. package/esm2022/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.mjs +18 -0
  65. package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +22 -1
  66. package/esm2022/translations/de.json +34 -0
  67. package/esm2022/translations/en.json +34 -0
  68. package/esm2022/translations/es.json +34 -0
  69. package/esm2022/translations/fr.json +34 -0
  70. package/esm2022/translations/it.json +34 -0
  71. package/esm2022/translations/nl.json +34 -0
  72. package/esm2022/translations/pt.json +34 -0
  73. package/fesm2022/geonetwork-ui.mjs +2615 -1704
  74. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  75. package/index.d.ts +1 -0
  76. package/index.d.ts.map +1 -1
  77. package/index.ts +1 -0
  78. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  79. package/libs/api/repository/src/lib/gn4/auth/avatar.service.interface.d.ts +1 -0
  80. package/libs/api/repository/src/lib/gn4/auth/avatar.service.interface.d.ts.map +1 -1
  81. package/libs/api/repository/src/lib/gn4/auth/gravatar.service.d.ts +1 -0
  82. package/libs/api/repository/src/lib/gn4/auth/gravatar.service.d.ts.map +1 -1
  83. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.d.ts +6 -2
  84. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.d.ts.map +1 -1
  85. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +9 -6
  86. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
  87. package/libs/common/domain/src/lib/model/record/index.d.ts +1 -0
  88. package/libs/common/domain/src/lib/model/record/index.d.ts.map +1 -1
  89. package/libs/common/domain/src/lib/model/record/user-feedbacks.model.d.ts +15 -0
  90. package/libs/common/domain/src/lib/model/record/user-feedbacks.model.d.ts.map +1 -0
  91. package/libs/common/domain/src/lib/model/user/index.d.ts +2 -0
  92. package/libs/common/domain/src/lib/model/user/index.d.ts.map +1 -0
  93. package/libs/common/domain/src/lib/platform.service.interface.d.ts +3 -0
  94. package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
  95. package/libs/feature/editor/src/index.d.ts +1 -1
  96. package/libs/feature/editor/src/index.d.ts.map +1 -1
  97. package/libs/feature/editor/src/lib/+state/editor.facade.d.ts +8 -5
  98. package/libs/feature/editor/src/lib/+state/editor.facade.d.ts.map +1 -1
  99. 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
  100. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-array/form-field-array.component.d.ts.map +1 -0
  101. 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
  102. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-file/form-field-file.component.d.ts.map +1 -0
  103. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.d.ts +39 -0
  104. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.d.ts.map +1 -0
  105. 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
  106. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-object/form-field-object.component.d.ts.map +1 -0
  107. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.d.ts +8 -0
  108. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.d.ts.map +1 -0
  109. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts +16 -0
  110. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts.map +1 -0
  111. 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
  112. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-simple/form-field-simple.component.d.ts.map +1 -0
  113. 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
  114. 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
  115. 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
  116. 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
  117. package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.component.d.ts +12 -4
  118. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -0
  119. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.d.ts.map +1 -0
  120. package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts.map +1 -0
  121. package/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.d.ts +3 -3
  122. package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts.map +1 -0
  123. package/libs/feature/editor/src/lib/feature-editor.module.d.ts +1 -1
  124. package/libs/feature/editor/src/lib/feature-editor.module.d.ts.map +1 -1
  125. package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
  126. package/libs/feature/editor/src/lib/models/fields.model.d.ts +1 -1
  127. package/libs/feature/notifications/src/index.d.ts +4 -0
  128. package/libs/feature/notifications/src/index.d.ts.map +1 -0
  129. package/libs/feature/notifications/src/lib/feature-notifications.module.d.ts +7 -0
  130. package/libs/feature/notifications/src/lib/feature-notifications.module.d.ts.map +1 -0
  131. package/libs/feature/notifications/src/lib/notification.model.d.ts +7 -0
  132. package/libs/feature/notifications/src/lib/notification.model.d.ts.map +1 -0
  133. package/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.d.ts +12 -0
  134. package/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.d.ts.map +1 -0
  135. package/libs/feature/notifications/src/lib/notifications.service.d.ts +15 -0
  136. package/libs/feature/notifications/src/lib/notifications.service.d.ts.map +1 -0
  137. package/libs/feature/record/src/lib/feature-record.module.d.ts.map +1 -1
  138. package/libs/feature/record/src/lib/state/mdview.actions.d.ts +40 -6
  139. package/libs/feature/record/src/lib/state/mdview.actions.d.ts.map +1 -1
  140. package/libs/feature/record/src/lib/state/mdview.effects.d.ts +24 -4
  141. package/libs/feature/record/src/lib/state/mdview.effects.d.ts.map +1 -1
  142. package/libs/feature/record/src/lib/state/mdview.facade.d.ts +14 -4
  143. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  144. package/libs/feature/record/src/lib/state/mdview.reducer.d.ts +8 -5
  145. package/libs/feature/record/src/lib/state/mdview.reducer.d.ts.map +1 -1
  146. package/libs/feature/record/src/lib/state/mdview.selectors.d.ts +12 -9
  147. package/libs/feature/record/src/lib/state/mdview.selectors.d.ts.map +1 -1
  148. package/libs/ui/elements/src/index.d.ts +14 -14
  149. package/libs/ui/elements/src/index.d.ts.map +1 -1
  150. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +1 -1
  151. package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts +13 -0
  152. package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts.map +1 -0
  153. package/libs/ui/elements/src/lib/notification/notification.component.d.ts +13 -0
  154. package/libs/ui/elements/src/lib/notification/notification.component.d.ts.map +1 -0
  155. package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts +4 -2
  156. package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts.map +1 -1
  157. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +16 -14
  158. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  159. package/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.d.ts +11 -0
  160. package/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.d.ts.map +1 -0
  161. package/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.d.ts +22 -0
  162. package/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.d.ts.map +1 -0
  163. package/libs/ui/inputs/src/index.d.ts +14 -15
  164. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  165. package/libs/ui/inputs/src/lib/date-picker/date-picker.component.d.ts +9 -0
  166. package/libs/ui/inputs/src/lib/date-picker/date-picker.component.d.ts.map +1 -0
  167. package/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.d.ts +1 -1
  168. package/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.d.ts.map +1 -1
  169. package/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.d.ts +1 -1
  170. package/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.d.ts.map +1 -1
  171. package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts +7 -1
  172. package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts.map +1 -1
  173. package/libs/ui/inputs/src/lib/text-input/text-input.component.d.ts +4 -1
  174. package/libs/ui/inputs/src/lib/text-input/text-input.component.d.ts.map +1 -1
  175. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +35 -43
  176. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
  177. package/libs/ui/layout/src/index.d.ts +5 -4
  178. package/libs/ui/layout/src/index.d.ts.map +1 -1
  179. package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts +8 -0
  180. package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts.map +1 -0
  181. package/libs/util/shared/src/lib/links/link-utils.d.ts +18 -0
  182. package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
  183. package/package.json +1 -1
  184. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +7 -1
  185. package/src/libs/api/repository/src/lib/gn4/auth/avatar.service.interface.ts +1 -0
  186. package/src/libs/api/repository/src/lib/gn4/auth/gravatar.service.ts +12 -1
  187. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.ts +51 -1
  188. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +34 -7
  189. package/src/libs/common/domain/src/lib/model/record/index.ts +1 -0
  190. package/src/libs/common/domain/src/lib/model/record/user-feedbacks.model.ts +15 -0
  191. package/src/libs/common/domain/src/lib/platform.service.interface.ts +3 -0
  192. package/src/libs/common/fixtures/src/index.ts +8 -6
  193. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +3 -3
  194. package/src/libs/common/fixtures/src/lib/user-feedbacks.fixtures.ts +83 -0
  195. package/src/libs/feature/editor/src/index.ts +1 -1
  196. package/src/libs/feature/editor/src/lib/+state/editor.facade.ts +8 -1
  197. 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
  198. 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
  199. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.html +8 -0
  200. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.ts +64 -0
  201. 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
  202. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.html +4 -0
  203. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.ts +15 -0
  204. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.html +20 -0
  205. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.ts +44 -0
  206. 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
  207. 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
  208. 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
  209. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.css +0 -0
  210. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +92 -0
  211. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +137 -0
  212. package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.css +0 -0
  213. package/src/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.html +1 -0
  214. package/src/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.ts +4 -4
  215. package/src/libs/feature/editor/src/lib/feature-editor.module.ts +9 -9
  216. package/src/libs/feature/editor/src/lib/fields.config.ts +15 -0
  217. package/src/libs/feature/editor/src/lib/models/fields.model.ts +1 -1
  218. package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.html +1 -1
  219. package/src/libs/feature/notifications/src/index.ts +3 -0
  220. package/src/libs/feature/notifications/src/lib/feature-notifications.module.ts +10 -0
  221. package/src/libs/feature/notifications/src/lib/notification.model.ts +6 -0
  222. package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.css +0 -0
  223. package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.html +17 -0
  224. package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.ts +44 -0
  225. package/src/libs/feature/notifications/src/lib/notifications.service.ts +27 -0
  226. package/src/libs/feature/record/src/lib/feature-record.module.ts +5 -2
  227. package/src/libs/feature/record/src/lib/state/mdview.actions.ts +51 -6
  228. package/src/libs/feature/record/src/lib/state/mdview.effects.ts +82 -7
  229. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +49 -8
  230. package/src/libs/feature/record/src/lib/state/mdview.reducer.ts +81 -24
  231. package/src/libs/feature/record/src/lib/state/mdview.selectors.ts +40 -10
  232. package/src/libs/feature/router/src/lib/default/state/router.effects.ts +2 -2
  233. package/src/libs/feature/search/src/lib/results-table/results-table.component.html +3 -3
  234. package/src/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.html +5 -5
  235. package/src/libs/ui/elements/src/index.ts +14 -14
  236. package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +1 -1
  237. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.css +0 -5
  238. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.html +0 -21
  239. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.ts +1 -14
  240. package/src/libs/ui/elements/src/lib/notification/notification.component.css +0 -0
  241. package/src/libs/ui/elements/src/lib/notification/notification.component.html +52 -0
  242. package/src/libs/ui/elements/src/lib/notification/notification.component.ts +31 -0
  243. package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.html +2 -2
  244. package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts +40 -4
  245. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +5 -0
  246. package/src/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.ts +54 -0
  247. package/src/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.css +0 -0
  248. package/src/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.html +75 -0
  249. package/src/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.ts +63 -0
  250. package/src/libs/ui/inputs/src/index.ts +14 -15
  251. package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.css +3 -0
  252. package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.html +11 -0
  253. package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.ts +16 -0
  254. package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.ts +8 -1
  255. package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.ts +13 -0
  256. package/src/libs/ui/inputs/src/lib/text-area/text-area.component.html +2 -1
  257. package/src/libs/ui/inputs/src/lib/text-area/text-area.component.ts +29 -0
  258. package/src/libs/ui/inputs/src/lib/text-input/text-input.component.html +1 -1
  259. package/src/libs/ui/inputs/src/lib/text-input/text-input.component.ts +16 -1
  260. package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +2 -21
  261. package/src/libs/ui/layout/src/index.ts +5 -4
  262. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.css +0 -0
  263. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.html +18 -0
  264. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.ts +16 -0
  265. package/src/libs/util/shared/src/lib/links/link-utils.ts +21 -0
  266. package/tailwind.base.css +36 -0
  267. package/translations/de.json +34 -0
  268. package/translations/en.json +34 -0
  269. package/translations/es.json +34 -0
  270. package/translations/fr.json +34 -0
  271. package/translations/it.json +34 -0
  272. package/translations/nl.json +34 -0
  273. package/translations/pt.json +34 -0
  274. package/translations/sk.json +34 -0
  275. package/esm2022/libs/feature/editor/src/lib/record-form/record-form.component.mjs +0 -30
  276. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-array/form-field-array.component.mjs +0 -11
  277. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-file/form-field-file.component.mjs +0 -27
  278. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-object/form-field-object.component.mjs +0 -11
  279. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.mjs +0 -27
  280. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-simple/form-field-simple.component.mjs +0 -49
  281. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +0 -11
  282. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-temporal-extent/form-field-temporal-extent.component.mjs +0 -11
  283. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field.component.mjs +0 -76
  284. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field.model.mjs +0 -2
  285. package/esm2022/libs/ui/inputs/src/lib/form-field/index.mjs +0 -10
  286. package/libs/feature/editor/src/lib/record-form/record-form.component.d.ts.map +0 -1
  287. package/libs/ui/inputs/src/lib/form-field/form-field-array/form-field-array.component.d.ts.map +0 -1
  288. package/libs/ui/inputs/src/lib/form-field/form-field-file/form-field-file.component.d.ts.map +0 -1
  289. package/libs/ui/inputs/src/lib/form-field/form-field-object/form-field-object.component.d.ts.map +0 -1
  290. package/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.d.ts +0 -11
  291. package/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.d.ts.map +0 -1
  292. package/libs/ui/inputs/src/lib/form-field/form-field-simple/form-field-simple.component.d.ts.map +0 -1
  293. package/libs/ui/inputs/src/lib/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts.map +0 -1
  294. package/libs/ui/inputs/src/lib/form-field/form-field-temporal-extent/form-field-temporal-extent.component.d.ts.map +0 -1
  295. package/libs/ui/inputs/src/lib/form-field/form-field.component.d.ts.map +0 -1
  296. package/libs/ui/inputs/src/lib/form-field/form-field.model.d.ts.map +0 -1
  297. package/libs/ui/inputs/src/lib/form-field/index.d.ts.map +0 -1
  298. package/src/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.html +0 -11
  299. package/src/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.ts +0 -15
  300. package/src/libs/ui/inputs/src/lib/form-field/form-field.component.html +0 -68
  301. package/src/libs/ui/inputs/src/lib/form-field/form-field.component.ts +0 -80
  302. /package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.model.d.ts +0 -0
  303. /package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/index.d.ts +0 -0
  304. /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
  305. /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
  306. /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
  307. /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
  308. /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
  309. /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
  310. /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
  311. /package/src/libs/{ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.css → feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.css} +0 -0
  312. /package/src/libs/{ui/inputs/src/lib/form-field/form-field-simple/form-field-simple.component.css → feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.css} +0 -0
  313. /package/src/libs/{ui/inputs/src/lib/form-field/form-field-spatial-extent/form-field-spatial-extent.component.css → feature/editor/src/lib/components/record-form/form-field/form-field-simple/form-field-simple.component.css} +0 -0
  314. /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
  315. /package/src/libs/{ui/inputs/src/lib/form-field/form-field-temporal-extent/form-field-temporal-extent.component.css → feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.css} +0 -0
  316. /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
  317. /package/src/libs/{ui/inputs/src/lib/form-field/form-field.component.css → feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extent/form-field-temporal-extent.component.css} +0 -0
  318. /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
  319. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.model.ts +0 -0
  320. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/index.ts +0 -0
@@ -0,0 +1,83 @@
1
+ import { UserFeedback } from '../../../../../libs/common/domain/src/lib/model/record'
2
+ import { deepFreeze } from './utils'
3
+
4
+ export const SOME_USER_FEEDBACKS: UserFeedback[] = deepFreeze([
5
+ {
6
+ uuid: '4ad03fb7-1728-424c-bdaa-aedd531b07a8',
7
+ comment: 'A nice comment.',
8
+ metadataUUID: 'my-dataset-001',
9
+ authorUserId: '46798',
10
+ authorName: 'Arnaud De Maison',
11
+ authorEmail: 'a.demaison@geo2france.fr',
12
+ published: true,
13
+ parentUuid: undefined,
14
+ date: new Date('2023-01-01T08:00:00Z'),
15
+ },
16
+ {
17
+ uuid: '52cbd0f1-9cb9-4409-8e85-bc608f049af4',
18
+ comment: 'A very nice comment that is a reply.',
19
+ metadataUUID: 'my-dataset-001',
20
+ authorUserId: '46798',
21
+ authorName: 'Arnaud De Maison',
22
+ authorEmail: 'a.demaison@geo2france.fr',
23
+ published: true,
24
+ parentUuid: '4ad03fb7-1728-424c-bdaa-aedd531b07a8',
25
+ date: new Date('2023-01-01T09:00:00Z'),
26
+ },
27
+ {
28
+ uuid: 'b48f62ec-b5e6-4d27-a396-2c2b44f6dcb5',
29
+ comment: 'Another nice comment.',
30
+ metadataUUID: 'my-dataset-001',
31
+ authorUserId: '46798',
32
+ authorName: 'Arnaud De Maison',
33
+ authorEmail: 'a.demaison@geo2france.fr',
34
+ published: true,
35
+ parentUuid: undefined,
36
+ date: new Date('2023-01-01T10:00:00Z'),
37
+ },
38
+ {
39
+ uuid: '1f12a3be-fc8a-4e83-968f-9b88ffbcab02',
40
+ comment: 'Another very nice reply.',
41
+ metadataUUID: 'my-dataset-001',
42
+ authorUserId: '46798',
43
+ authorName: 'Arnaud De Maison',
44
+ authorEmail: 'a.demaison@geo2france.fr',
45
+ published: true,
46
+ parentUuid: '4ad03fb7-1728-424c-bdaa-aedd531b07a8',
47
+ date: new Date('2023-01-01T11:00:00Z'),
48
+ },
49
+ {
50
+ uuid: 'f8dd778d-e93c-4b3c-ba9b-9574be070f46',
51
+ comment: 'Another nice comment.',
52
+ metadataUUID: 'my-dataset-001',
53
+ authorUserId: '46798',
54
+ authorName: 'Arnaud De Maison',
55
+ authorEmail: 'a.demaison@geo2france.fr',
56
+ published: true,
57
+ parentUuid: undefined,
58
+ date: new Date('2023-01-01T10:00:00Z'),
59
+ },
60
+ {
61
+ uuid: 'df3b8872-61d1-4ae9-8822-bb070b94d7d1',
62
+ comment: 'Another nice comment.',
63
+ metadataUUID: 'my-dataset-001',
64
+ authorUserId: '46798',
65
+ authorName: 'Arnaud De Maison',
66
+ authorEmail: 'a.demaison@geo2france.fr',
67
+ published: true,
68
+ parentUuid: undefined,
69
+ date: new Date('2023-01-01T11:00:00Z'),
70
+ },
71
+ ])
72
+
73
+ export const A_USER_FEEDBACK: UserFeedback = deepFreeze({
74
+ uuid: '4ad03fb7-1728-424c-bdaa-aedd531b07a8',
75
+ comment: 'A nice comment.',
76
+ metadataUUID: 'my-dataset-001',
77
+ authorUserId: '46798',
78
+ authorName: 'Arnaud De Maison',
79
+ authorEmail: 'a.demaison@geo2france.fr',
80
+ published: true,
81
+ parentUuid: undefined,
82
+ date: new Date('2023-01-01T08:00:00Z'),
83
+ })
@@ -5,7 +5,7 @@ export * from './lib/+state/editor.reducer'
5
5
  export * from './lib/+state/editor.actions'
6
6
  export * from './lib/feature-editor.module'
7
7
  export * from './lib/services/editor.service'
8
- export * from './lib/record-form/record-form.component'
8
+ export * from './lib/components/record-form/record-form.component'
9
9
  export * from './lib/components/wizard/wizard.component'
10
10
  export * from './lib/components/wizard-field/wizard-field.component'
11
11
  export * from './lib/components/wizard-summarize/wizard-summarize.component'
@@ -3,14 +3,21 @@ import { select, Store } from '@ngrx/store'
3
3
  import * as EditorActions from './editor.actions'
4
4
  import * as EditorSelectors from './editor.selectors'
5
5
  import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
6
+ import { filter, Observable } from 'rxjs'
7
+ import { Actions, ofType } from '@ngrx/effects'
6
8
 
7
9
  @Injectable()
8
10
  export class EditorFacade {
9
11
  private readonly store = inject(Store)
12
+ private actions$ = inject(Actions)
10
13
 
11
14
  record$ = this.store.pipe(select(EditorSelectors.selectRecord))
12
15
  saving$ = this.store.pipe(select(EditorSelectors.selectRecordSaving))
13
- saveError$ = this.store.pipe(select(EditorSelectors.selectRecordSaveError))
16
+ saveError$ = this.store.pipe(
17
+ select(EditorSelectors.selectRecordSaveError),
18
+ filter((error) => !!error)
19
+ )
20
+ saveSuccess$ = this.actions$.pipe(ofType(EditorActions.saveRecordSuccess))
14
21
  changedSinceSave$ = this.store.pipe(
15
22
  select(EditorSelectors.selectRecordChangedSinceSave)
16
23
  )
@@ -5,5 +5,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'
5
5
  templateUrl: './form-field-array.component.html',
6
6
  styleUrls: ['./form-field-array.component.css'],
7
7
  changeDetection: ChangeDetectionStrategy.OnPush,
8
+ standalone: true,
8
9
  })
9
10
  export class FormFieldArrayComponent {}
@@ -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-file',
6
7
  templateUrl: './form-field-file.component.html',
7
8
  styleUrls: ['./form-field-file.component.css'],
8
9
  changeDetection: ChangeDetectionStrategy.OnPush,
10
+ standalone: true,
11
+ imports: [CommonModule, ReactiveFormsModule],
9
12
  })
10
13
  export class FormFieldFileComponent {
11
14
  @Input() control!: FormControl
@@ -0,0 +1,8 @@
1
+ <gn-ui-dropdown-selector
2
+ [title]="label"
3
+ [showTitle]="false"
4
+ [choices]="choices"
5
+ [selected]="selected"
6
+ (selectValue)="onSelectValue($event)"
7
+ >
8
+ </gn-ui-dropdown-selector>
@@ -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,4 @@
1
+ <gn-ui-date-picker
2
+ [date]="control.value"
3
+ (dateChange)="control.setValue($event)"
4
+ ></gn-ui-date-picker>
@@ -0,0 +1,15 @@
1
+ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
2
+ import { FormControl } from '@angular/forms'
3
+ import { DatePickerComponent } from '../../../../../../../../../libs/ui/inputs/src'
4
+
5
+ @Component({
6
+ selector: 'gn-ui-form-field-resource-updated',
7
+ templateUrl: './form-field-resource-updated.component.html',
8
+ styleUrls: ['./form-field-resource-updated.component.css'],
9
+ changeDetection: ChangeDetectionStrategy.OnPush,
10
+ standalone: true,
11
+ imports: [DatePickerComponent],
12
+ })
13
+ export class FormFieldResourceUpdatedComponent {
14
+ @Input() control!: FormControl
15
+ }
@@ -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,92 @@
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="isResourceUpdated">
55
+ <gn-ui-form-field-resource-updated
56
+ [control]="formControl"
57
+ ></gn-ui-form-field-resource-updated>
58
+ </ng-container>
59
+ <ng-container *ngIf="isSimpleField">
60
+ <gn-ui-form-field-simple
61
+ [type]="simpleType"
62
+ [control]="formControl"
63
+ [readonly]="isFieldLocked"
64
+ [invalid]="isFieldInvalid"
65
+ ></gn-ui-form-field-simple>
66
+ </ng-container>
67
+ <ng-container *ngIf="isFileField">
68
+ <gn-ui-form-field-file
69
+ [control]="formControl"
70
+ [readonly]="isFieldLocked"
71
+ [invalid]="isFieldInvalid"
72
+ ></gn-ui-form-field-file>
73
+ </ng-container>
74
+ <ng-container *ngIf="isArrayField">
75
+ <gn-ui-form-field-array></gn-ui-form-field-array>
76
+ </ng-container>
77
+ <ng-container *ngIf="isObjectField">
78
+ <gn-ui-form-field-object></gn-ui-form-field-object>
79
+ </ng-container>
80
+ <ng-container *ngIf="isSpatialExtentField">
81
+ <gn-ui-form-field-spatial-extent></gn-ui-form-field-spatial-extent>
82
+ </ng-container>
83
+ <ng-container *ngIf="isTemporalExtentField">
84
+ <gn-ui-form-field-temporal-extent></gn-ui-form-field-temporal-extent>
85
+ </ng-container>
86
+ <div
87
+ *ngIf="isFieldInvalid && config.invalidHintKey"
88
+ class="mt-2 text-pink-500 text-sm field-invalid-hint"
89
+ >
90
+ {{ config.invalidHintKey | translate }}
91
+ </div>
92
+ </ng-template>
@@ -0,0 +1,137 @@
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 { FormFieldResourceUpdatedComponent } from './form-field-resource-updated/form-field-resource-updated.component'
22
+ import { FormFieldRichComponent } from './form-field-rich/form-field-rich.component'
23
+ import { FormFieldSimpleComponent } from './form-field-simple/form-field-simple.component'
24
+ import { FormFieldSpatialExtentComponent } from './form-field-spatial-extent/form-field-spatial-extent.component'
25
+ import { FormFieldTemporalExtentComponent } from './form-field-temporal-extent/form-field-temporal-extent.component'
26
+ import { FormFieldConfig } from './form-field.model'
27
+
28
+ @Component({
29
+ selector: 'gn-ui-form-field',
30
+ templateUrl: './form-field.component.html',
31
+ styleUrls: ['./form-field.component.css'],
32
+ changeDetection: ChangeDetectionStrategy.OnPush,
33
+ standalone: true,
34
+ imports: [
35
+ CommonModule,
36
+ ReactiveFormsModule,
37
+ EditableLabelDirective,
38
+ MatIconModule,
39
+ MatTooltipModule,
40
+ FormFieldWrapperComponent,
41
+ FormFieldLicenseComponent,
42
+ FormFieldResourceUpdatedComponent,
43
+ FormFieldSimpleComponent,
44
+ FormFieldRichComponent,
45
+ FormFieldObjectComponent,
46
+ FormFieldSpatialExtentComponent,
47
+ FormFieldTemporalExtentComponent,
48
+ FormFieldFileComponent,
49
+ FormFieldArrayComponent,
50
+ TranslateModule,
51
+ ],
52
+ })
53
+ export class FormFieldComponent {
54
+ @Input() model: string
55
+ @Input() config: FormFieldConfig
56
+ @Input() set value(v: unknown) {
57
+ this.formControl.setValue(v, {
58
+ emitEvent: false,
59
+ })
60
+ }
61
+ @Output() valueChange: Observable<unknown>
62
+
63
+ @ViewChild('titleInput') titleInput: ElementRef
64
+
65
+ formControl = new FormControl()
66
+
67
+ constructor() {
68
+ this.valueChange = this.formControl.valueChanges
69
+ }
70
+
71
+ focusTitleInput() {
72
+ this.titleInput.nativeElement.children[0].focus()
73
+ }
74
+
75
+ get simpleType() {
76
+ return this.config.type as
77
+ | 'date'
78
+ | 'url'
79
+ | 'text'
80
+ | 'number'
81
+ | 'list'
82
+ | 'toggle'
83
+ }
84
+
85
+ get isSimpleField() {
86
+ return (
87
+ this.config.type === 'text' ||
88
+ this.config.type === 'number' ||
89
+ this.config.type === 'date' ||
90
+ this.config.type === 'list' ||
91
+ this.config.type === 'url' ||
92
+ this.config.type === 'toggle'
93
+ )
94
+ }
95
+ get isFileField() {
96
+ return this.config.type === 'file'
97
+ }
98
+ get isSpatialExtentField() {
99
+ return this.config.type === 'spatial_extent'
100
+ }
101
+ get isTemporalExtentField() {
102
+ return this.config.type === 'temporal_extent'
103
+ }
104
+ get isArrayField() {
105
+ return this.config.type === 'array'
106
+ }
107
+ get isObjectField() {
108
+ return this.config.type === 'object'
109
+ }
110
+
111
+ get isFieldOk() {
112
+ return !this.config.locked && !this.config.invalid
113
+ }
114
+ get isFieldLocked() {
115
+ return this.config.locked
116
+ }
117
+ get isFieldInvalid() {
118
+ return !this.config.locked && this.config.invalid
119
+ }
120
+
121
+ get isTitle() {
122
+ return this.model === 'title'
123
+ }
124
+ get isAbstract() {
125
+ return this.model === 'abstract'
126
+ }
127
+ get isLicenses() {
128
+ return this.model === 'licenses'
129
+ }
130
+ get isResourceUpdated() {
131
+ return this.model === 'resourceUpdated'
132
+ }
133
+
134
+ get withoutWrapper() {
135
+ return this.model === 'title' || this.model === 'abstract'
136
+ }
137
+ }
@@ -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'