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
@@ -1,36 +1,66 @@
1
1
  import { createFeatureSelector, createSelector } from '@ngrx/store'
2
- import { MD_VIEW_FEATURE_STATE_KEY, MdViewState } from './mdview.reducer'
2
+ import {
3
+ METADATA_VIEW_FEATURE_STATE_KEY,
4
+ MetadataViewState,
5
+ } from './mdview.reducer'
3
6
 
4
- export const getMdViewState = createFeatureSelector<MdViewState>(
5
- MD_VIEW_FEATURE_STATE_KEY
7
+ export const getMdViewState = createFeatureSelector<MetadataViewState>(
8
+ METADATA_VIEW_FEATURE_STATE_KEY
6
9
  )
7
10
 
11
+ /*
12
+ Metadata selectors
13
+ */
8
14
  export const getMetadataUuid = createSelector(
9
15
  getMdViewState,
10
- (state: MdViewState) =>
16
+ (state: MetadataViewState) =>
11
17
  state.metadata ? state.metadata.uniqueIdentifier : null
12
18
  )
13
19
  export const getMetadata = createSelector(
14
20
  getMdViewState,
15
- (state: MdViewState) => state.metadata
21
+ (state: MetadataViewState) => state.metadata
16
22
  )
17
23
  export const getMetadataIsIncomplete = createSelector(
18
24
  getMdViewState,
19
- (state: MdViewState) => (state.metadata ? state.loadingFull : null)
25
+ (state: MetadataViewState) => (state.metadata ? state.loadingFull : null)
20
26
  )
21
27
  export const getMetadataIsLoading = createSelector(
22
28
  getMdViewState,
23
- (state: MdViewState) => state.loadingFull
29
+ (state: MetadataViewState) => state.loadingFull
24
30
  )
25
31
  export const getMetadataError = createSelector(
26
32
  getMdViewState,
27
- (state: MdViewState) => state.error
33
+ (state: MetadataViewState) => state.error
28
34
  )
35
+
36
+ /*
37
+ Related selectors
38
+ */
29
39
  export const getRelated = createSelector(
30
40
  getMdViewState,
31
- (state: MdViewState) => state.related
41
+ (state: MetadataViewState) => state.related
32
42
  )
43
+
44
+ /*
45
+ Metadata selectors
46
+ */
33
47
  export const getChartConfig = createSelector(
34
48
  getMdViewState,
35
- (state: MdViewState) => state.chartConfig
49
+ (state: MetadataViewState) => state.chartConfig
50
+ )
51
+
52
+ /*
53
+ UserFeedback selectors
54
+ */
55
+ export const getUserFeedbacks = createSelector(
56
+ getMdViewState,
57
+ (state: MetadataViewState) => state.userFeedbacks
58
+ )
59
+ export const getAllUserFeedbacksLoading = createSelector(
60
+ getMdViewState,
61
+ (state: MetadataViewState) => state.allUserFeedbacksLoading
62
+ )
63
+ export const getAddUserFeedbacksLoading = createSelector(
64
+ getMdViewState,
65
+ (state: MetadataViewState) => state.addUserFeedbackLoading
36
66
  )
@@ -15,7 +15,7 @@ import {
15
15
  } from '../../../../../../../libs/common/domain/src/lib/model/search'
16
16
  import { Actions, createEffect, ofType } from '@ngrx/effects'
17
17
  import { navigation } from '@ngrx/router-store/data-persistence'
18
- import { of, pairwise, startWith, withLatestFrom } from 'rxjs'
18
+ import { of, pairwise, startWith } from 'rxjs'
19
19
  import { map, mergeMap, tap } from 'rxjs/operators'
20
20
  import * as RouterActions from './router.actions'
21
21
  import { RouterFacade } from './router.facade'
@@ -141,7 +141,7 @@ export class RouterEffects {
141
141
  navigateToSearch$ = createEffect(() =>
142
142
  this._actions$.pipe(
143
143
  navigation(this.routerConfig.searchRouteComponent, {
144
- run: () => MdViewActions.close(),
144
+ run: () => MdViewActions.closeMetadata(),
145
145
  })
146
146
  )
147
147
  )
@@ -50,20 +50,20 @@
50
50
  [title]="formats.join(', ')"
51
51
  >
52
52
  <span
53
- class="badge-btn min-w-[45px] text-sm text-white px-2 flex-shrink-0"
53
+ class="badge-btn min-w-[45px] text-sm text-white px-2 shrink-0"
54
54
  [style.background-color]="getBadgeColor(formats[0])"
55
55
  *ngIf="formats[0]"
56
56
  >
57
57
  {{ formats[0] }}
58
58
  </span>
59
59
  <span
60
- class="badge-btn min-w-[45px] text-sm text-white px-2 flex-shrink-0"
60
+ class="badge-btn min-w-[45px] text-sm text-white px-2 shrink-0"
61
61
  [style.background-color]="getBadgeColor(formats[1])"
62
62
  *ngIf="formats[1]"
63
63
  >
64
64
  {{ formats[1] }}
65
65
  </span>
66
- <div class="flex-shrink-0" *ngIf="formats.slice(2).length > 0">
66
+ <div class="shrink-0" *ngIf="formats.slice(2).length > 0">
67
67
  <span>+{{ formats.slice(2).length }}</span>
68
68
  </div>
69
69
  </div>
@@ -4,7 +4,7 @@
4
4
  [title]="organisation.name"
5
5
  >
6
6
  <div
7
- class="flex-shrink-0 bg-gray-100 rounded-lg overflow-hidden w-full border border-gray-300 h-36"
7
+ class="shrink-0 bg-gray-100 rounded-lg overflow-hidden w-full border border-gray-300 h-36"
8
8
  >
9
9
  <gn-ui-thumbnail
10
10
  class="relative h-full w-full"
@@ -13,20 +13,20 @@
13
13
  >
14
14
  </gn-ui-thumbnail>
15
15
  </div>
16
- <div class="px-3 pb-2 capitalize flex flex-col flex-grow overflow-hidden">
16
+ <div class="px-3 pb-2 capitalize flex flex-col grow overflow-hidden">
17
17
  <span
18
- class="flex-shrink-0 mb-3 mt-5 font-title text-21 text-title group-hover:text-primary line-clamp-2 sm:mt-2 transition-colors"
18
+ class="shrink-0 mb-3 mt-5 font-title text-21 text-title group-hover:text-primary line-clamp-2 sm:mt-2 transition-colors"
19
19
  data-cy="organizationName"
20
20
  >
21
21
  {{ organisation.name }}</span
22
22
  >
23
23
  <p
24
- class="abstract mt-4 mb-5 sm:mb-2 sm:mt-0 flex-grow flex-shrink-1 overflow-hidden"
24
+ class="abstract mt-4 mb-5 sm:mb-2 sm:mt-0 grow shrink-1 overflow-hidden"
25
25
  data-cy="organizationDesc"
26
26
  >
27
27
  {{ organisation.description }}
28
28
  </p>
29
- <div class="flex-shrink-0 text-primary opacity-50 flex leading-6">
29
+ <div class="shrink-0 text-primary opacity-50 flex leading-6">
30
30
  <mat-icon class="material-symbols-outlined text-primary opacity-50 mr-1"
31
31
  >folder_open
32
32
  </mat-icon>
@@ -1,24 +1,24 @@
1
- export * from './lib/ui-elements.module'
2
- export * from './lib/metadata-info/metadata-info.component'
3
- export * from './lib/metadata-contact/metadata-contact.component'
4
- export * from './lib/metadata-catalog/metadata-catalog.component'
5
- export * from './lib/metadata-quality/metadata-quality.component'
6
- export * from './lib/metadata-quality-item/metadata-quality-item.component'
7
- export * from './lib/search-results-error/search-results-error.component'
8
- export * from './lib/thumbnail/thumbnail.component'
9
- export * from './lib/content-ghost/content-ghost.component'
10
- export * from './lib/pagination-buttons/pagination-buttons.component'
11
1
  export * from './lib/api-card/api-card.component'
12
2
  export * from './lib/avatar/avatar.component'
13
3
  export * from './lib/content-ghost/content-ghost.component'
14
4
  export * from './lib/download-item/download-item.component'
15
5
  export * from './lib/downloads-list/downloads-list.component'
6
+ export * from './lib/image-overlay-preview/image-overlay-preview.component'
16
7
  export * from './lib/link-card/link-card.component'
8
+ export * from './lib/markdown-editor/markdown-editor.component'
9
+ export * from './lib/markdown-parser/markdown-parser.component'
10
+ export * from './lib/max-lines/max-lines.component'
11
+ export * from './lib/metadata-catalog/metadata-catalog.component'
12
+ export * from './lib/metadata-contact/metadata-contact.component'
13
+ export * from './lib/metadata-info/metadata-info.component'
14
+ export * from './lib/metadata-quality-item/metadata-quality-item.component'
15
+ export * from './lib/metadata-quality/metadata-quality.component'
16
+ export * from './lib/pagination-buttons/pagination-buttons.component'
17
17
  export * from './lib/pagination/pagination.component'
18
+ export * from './lib/record-api-form/record-api-form.component'
18
19
  export * from './lib/related-record-card/related-record-card.component'
19
20
  export * from './lib/search-results-error/search-results-error.component'
21
+ export * from './lib/thumbnail/thumbnail.component'
22
+ export * from './lib/ui-elements.module'
20
23
  export * from './lib/user-preview/user-preview.component'
21
- export * from './lib/max-lines/max-lines.component'
22
- export * from './lib/record-api-form/record-api-form.component'
23
- export * from './lib/markdown-parser/markdown-parser.component'
24
- export * from './lib/image-overlay-preview/image-overlay-preview.component'
24
+ export * from './lib/notification/notification.component'
@@ -6,7 +6,7 @@
6
6
  *ngIf="imageUrl"
7
7
  [showContent]="imageUrl !== undefined"
8
8
  data-cy="record-thumbnail"
9
- class="flex-shrink-0 bg-gray-100 rounded-lg overflow-hidden w-full border border-gray-300 group-hover:shadow-xl group-hover:border-0 h-48 mb-3"
9
+ class="shrink-0 bg-gray-100 rounded-lg overflow-hidden w-full border border-gray-300 group-hover:shadow-xl group-hover:border-0 h-48 mb-3"
10
10
  >
11
11
  <gn-ui-thumbnail
12
12
  class="relative h-full w-full"
@@ -1,5 +0,0 @@
1
- .icon-small {
2
- font-size: 16px;
3
- height: 16px;
4
- width: 16px;
5
- }
@@ -1,25 +1,4 @@
1
1
  <div class="h-full flex flex-col">
2
- <div class="flex-none w-full flex flex-row items-center">
3
- <p class="flex-none font-bold">{{ label }}</p>
4
- <div class="flex-1 flex justify-end items-center">
5
- <gn-ui-button
6
- [extraClass]="getButtonExtraClass()"
7
- (buttonClick)="togglePreview()"
8
- >
9
- <span class="material-symbols-outlined mr-1 icon-small">{{
10
- preview ? 'visibility' : 'visibility_off'
11
- }}</span>
12
- {{ preview ? 'WYSIWYG' : 'Markdown' }}
13
- </gn-ui-button>
14
- <span
15
- class="material-symbols-outlined m-2 icon-small"
16
- [matTooltip]="tooltip"
17
- matTooltipPosition="above"
18
- >
19
- help
20
- </span>
21
- </div>
22
- </div>
23
2
  <p class="flex-none mb-2 font-medium text-sm text-gray-900">
24
3
  {{ helperText }}
25
4
  </p>
@@ -31,26 +31,13 @@ import { MatTooltipModule } from '@angular/material/tooltip'
31
31
  ],
32
32
  })
33
33
  export class MarkdownEditorComponent {
34
- @Input() label: string
35
- @Input() tooltip?: string
34
+ @Input() preview = false
36
35
  @Input() helperText?: string
37
36
  @Input() placeholder: string
38
37
  @Input() textContent: string
39
38
  @Output() textContentChanged: EventEmitter<string> =
40
39
  new EventEmitter<string>()
41
40
 
42
- preview = false
43
-
44
- getButtonExtraClass() {
45
- return `${
46
- this.preview ? 'text-gray-200 bg-gray-900' : 'text-gray-900 bg-gray-200'
47
- } rounded-[1.25rem] p-[0.375rem] text-xs font-medium w-24`
48
- }
49
-
50
- togglePreview() {
51
- this.preview = !this.preview
52
- }
53
-
54
41
  textContentChangedHandler(textContent: string) {
55
42
  this.textContent = textContent
56
43
  this.textContentChanged.emit(this.textContent)
@@ -0,0 +1,52 @@
1
+ <div
2
+ class="p-[16px] flex flex-row gap-[16px] items-start border border-gray-200 shadow-md rounded bg-background"
3
+ >
4
+ <div
5
+ role="alert"
6
+ class="rounded-full text-white p-[6px] w-[32px] h-[32px] flex shrink-0"
7
+ [ngClass]="{
8
+ 'bg-red-500': type === 'error',
9
+ 'bg-yellow-500': type === 'warning',
10
+ 'bg-green-500': type === 'success',
11
+ 'bg-blue-500': type === 'info'
12
+ }"
13
+ [ngSwitch]="type"
14
+ >
15
+ <mat-icon class="material-symbols-outlined !w-[18px] !h-[18px] text-[20px]">
16
+ <ng-container *ngSwitchCase="'success'">check_circle</ng-container>
17
+ <ng-container *ngSwitchCase="'info'">info</ng-container>
18
+ <ng-container *ngSwitchCase="'warning'">warning</ng-container>
19
+ <ng-container *ngSwitchCase="'error'">error</ng-container>
20
+ </mat-icon>
21
+ </div>
22
+ <div
23
+ class="flex flex-col items-start gap-[4px] pt-[3px] grow shrink overflow-hidden"
24
+ >
25
+ <div class="font-bold text-[16px] text-gray-900">
26
+ {{ title }}
27
+ </div>
28
+ <div class="text-[14px] text-gray-800">
29
+ {{ text }}
30
+ </div>
31
+ <a
32
+ href
33
+ *ngIf="closeMessage"
34
+ class="text-[14px] gn-ui-link"
35
+ (click)="handleClose($event)"
36
+ >
37
+ {{ closeMessage }}
38
+ </a>
39
+ </div>
40
+ <gn-ui-button
41
+ type="light"
42
+ class="shrink-0"
43
+ (buttonClick)="handleClose()"
44
+ [style.--gn-ui-button-padding]="0"
45
+ [style.--gn-ui-button-width]="'21px'"
46
+ [style.--gn-ui-button-height]="'21px'"
47
+ >
48
+ <mat-icon class="material-symbols-outlined text-[22px] !w-[21px] !h-[21px]"
49
+ >close</mat-icon
50
+ >
51
+ </gn-ui-button>
52
+ </div>
@@ -0,0 +1,31 @@
1
+ import {
2
+ ChangeDetectionStrategy,
3
+ Component,
4
+ EventEmitter,
5
+ Input,
6
+ Output,
7
+ } from '@angular/core'
8
+ import { CommonModule } from '@angular/common'
9
+ import { MatIconModule } from '@angular/material/icon'
10
+ import { ButtonComponent } from '../../../../../../libs/ui/inputs/src'
11
+
12
+ @Component({
13
+ selector: 'gn-ui-notification',
14
+ standalone: true,
15
+ imports: [CommonModule, MatIconModule, ButtonComponent],
16
+ templateUrl: './notification.component.html',
17
+ styleUrls: ['./notification.component.css'],
18
+ changeDetection: ChangeDetectionStrategy.OnPush,
19
+ })
20
+ export class NotificationComponent {
21
+ @Input() type: 'info' | 'warning' | 'error' | 'success' = 'info'
22
+ @Input() title: string
23
+ @Input() text: string
24
+ @Input() closeMessage?: string
25
+ @Output() notificationClose = new EventEmitter<void>()
26
+
27
+ handleClose(event?: Event) {
28
+ event?.preventDefault()
29
+ this.notificationClose.emit()
30
+ }
31
+ }
@@ -13,7 +13,7 @@
13
13
  </p>
14
14
  </button>
15
15
  </div>
16
- <div class="flex flex-row flex-wrap justify-between flex-grow gap-5">
16
+ <div class="flex flex-row flex-wrap justify-between grow gap-5">
17
17
  <div class="flex flex-col gap-3">
18
18
  <p class="text-[14px]" translate>record.metadata.api.form.limit</p>
19
19
  <div class="flex flex-row items-center gap-2">
@@ -55,7 +55,7 @@
55
55
  extraBtnClass="secondary min-w-full !w-40 !text-black"
56
56
  [showTitle]="false"
57
57
  class="text-black"
58
- [choices]="formatsList"
58
+ [choices]="outputFormats"
59
59
  (selectValue)="setFormat($event)"
60
60
  [selected]="format$ | async"
61
61
  ></gn-ui-dropdown-selector>
@@ -1,5 +1,7 @@
1
1
  import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
2
+ import { OgcApiEndpoint } from '@camptocamp/ogc-client'
2
3
  import { DatasetServiceDistribution } from '../../../../../../libs/common/domain/src/lib/model/record'
4
+ import { mimeTypeToFormat } from '../../../../../../libs/util/shared/src'
3
5
  import { BehaviorSubject, combineLatest, map } from 'rxjs'
4
6
 
5
7
  const DEFAULT_PARAMS = {
@@ -16,16 +18,15 @@ const DEFAULT_PARAMS = {
16
18
  export class RecordApiFormComponent {
17
19
  @Input() set apiLink(value: DatasetServiceDistribution) {
18
20
  this.apiBaseUrl = value ? value.url.href : undefined
21
+ this.outputFormats = [{ value: 'json', label: 'JSON' }]
22
+ this.parseOutputFormats()
19
23
  this.resetUrl()
20
24
  }
21
25
  offset$ = new BehaviorSubject('')
22
26
  limit$ = new BehaviorSubject('')
23
27
  format$ = new BehaviorSubject('')
24
28
  apiBaseUrl: string
25
- formatsList = [
26
- { label: 'JSON', value: 'json' },
27
- { label: 'CSV', value: 'csv' },
28
- ]
29
+ outputFormats = [{ value: 'json', label: 'JSON' }]
29
30
  apiQueryUrl$ = combineLatest([this.offset$, this.limit$, this.format$]).pipe(
30
31
  map(([offset, limit, format]) => {
31
32
  let outputUrl
@@ -70,4 +71,39 @@ export class RecordApiFormComponent {
70
71
  this.limit$.next(DEFAULT_PARAMS.LIMIT)
71
72
  this.format$.next(DEFAULT_PARAMS.FORMAT)
72
73
  }
74
+
75
+ parseOutputFormats() {
76
+ const apiUrl =
77
+ this.apiBaseUrl.slice(-1) === '?'
78
+ ? this.apiBaseUrl.slice(0, -1)
79
+ : this.apiBaseUrl
80
+
81
+ this.getOutputFormats(apiUrl).then((outputFormats) => {
82
+ const formatsList = outputFormats.itemFormats.map((format) => {
83
+ const normalizedFormat = mimeTypeToFormat(format)
84
+ if (normalizedFormat) {
85
+ return {
86
+ label: normalizedFormat?.toUpperCase(),
87
+ value: normalizedFormat,
88
+ }
89
+ }
90
+ return null
91
+ })
92
+ this.outputFormats = this.outputFormats.concat(
93
+ formatsList.filter(Boolean)
94
+ )
95
+ this.outputFormats = this.outputFormats
96
+ .filter(
97
+ (format, index, self) =>
98
+ index === self.findIndex((t) => t.value === format.value)
99
+ )
100
+ .sort((a, b) => a.label.localeCompare(b.label))
101
+ })
102
+ }
103
+
104
+ async getOutputFormats(url) {
105
+ const endpoint = await new OgcApiEndpoint(url)
106
+ const firstCollection = (await endpoint.featureCollections)[0]
107
+ return endpoint.getCollectionInfo(firstCollection)
108
+ }
73
109
  }
@@ -31,6 +31,8 @@ import { MaxLinesComponent } from './max-lines/max-lines.component'
31
31
  import { RecordApiFormComponent } from './record-api-form/record-api-form.component'
32
32
  import { MarkdownParserComponent } from './markdown-parser/markdown-parser.component'
33
33
  import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-overlay-preview.component'
34
+ import { UserFeedbackItemComponent } from './user-feedback-item/user-feedback-item.component'
35
+ import { TimeSincePipe } from './user-feedback-item/time-since.pipe'
34
36
 
35
37
  @NgModule({
36
38
  imports: [
@@ -47,6 +49,7 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over
47
49
  NgOptimizedImage,
48
50
  MarkdownParserComponent,
49
51
  ThumbnailComponent,
52
+ TimeSincePipe,
50
53
  ],
51
54
  declarations: [
52
55
  MetadataInfoComponent,
@@ -68,6 +71,7 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over
68
71
  PaginationButtonsComponent,
69
72
  MaxLinesComponent,
70
73
  RecordApiFormComponent,
74
+ UserFeedbackItemComponent,
71
75
  ImageOverlayPreviewComponent,
72
76
  ],
73
77
  exports: [
@@ -91,6 +95,7 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over
91
95
  MaxLinesComponent,
92
96
  RecordApiFormComponent,
93
97
  MarkdownParserComponent,
98
+ UserFeedbackItemComponent,
94
99
  ImageOverlayPreviewComponent,
95
100
  ],
96
101
  })
@@ -0,0 +1,54 @@
1
+ import { Pipe, PipeTransform } from '@angular/core'
2
+ import { TranslateService } from '@ngx-translate/core'
3
+ import { formatDistance } from 'date-fns'
4
+ import { de, enUS, es, fr, it, nl, pt, sk } from 'date-fns/locale'
5
+
6
+ @Pipe({
7
+ name: 'timeSince',
8
+ standalone: true,
9
+ })
10
+ export class TimeSincePipe implements PipeTransform {
11
+ constructor(private translate: TranslateService) {}
12
+
13
+ transform(value: Date): string {
14
+ if (isNaN(value.getTime())) {
15
+ throw new Error('Invalid Date')
16
+ }
17
+
18
+ const maintenant = new Date()
19
+ let locale: Locale
20
+
21
+ switch (this.translate.currentLang) {
22
+ case 'fr':
23
+ locale = fr
24
+ break
25
+ case 'de':
26
+ locale = de
27
+ break
28
+ case 'es':
29
+ locale = es
30
+ break
31
+ case 'it':
32
+ locale = it
33
+ break
34
+ case 'nl':
35
+ locale = nl
36
+ break
37
+ case 'pt':
38
+ locale = pt
39
+ break
40
+ case 'sk':
41
+ locale = sk
42
+ break
43
+ case 'en':
44
+ default:
45
+ locale = enUS
46
+ break
47
+ }
48
+
49
+ return formatDistance(value, maintenant, {
50
+ addSuffix: true,
51
+ locale: locale,
52
+ })
53
+ }
54
+ }
@@ -0,0 +1,75 @@
1
+ <div
2
+ *ngIf="userFeedbackParent.published"
3
+ class="flex flex-col bg-white rounded w-full"
4
+ [ngClass]="[isAnAnswer ? 'ps-4 ' : 'p-4']"
5
+ >
6
+ <div class="flex flex-row">
7
+ <div class="avatar">
8
+ <img
9
+ class="rounded-full"
10
+ [src]="userFeedbackParent.avatarUrl"
11
+ alt="avatar"
12
+ />
13
+ </div>
14
+ <div class="p-4 flex flex-col">
15
+ <span>{{ userFeedbackParent.authorName }}</span>
16
+ <span> {{ userFeedbackParent.date | timeSince }}</span>
17
+ </div>
18
+ </div>
19
+ <div data-cy="commentText" class="mt-4 whitespace-pre-line">
20
+ {{ userFeedbackParent.comment }}
21
+ </div>
22
+ <div
23
+ class="w-full"
24
+ *ngFor="let userFeedBacksAnswer of userFeedBacksAnswers; let last = last"
25
+ >
26
+ <hr class="-mx-4 my-6" />
27
+ <gn-ui-user-feedback-item
28
+ [userFeedbackParent]="userFeedBacksAnswer"
29
+ [isLastComment]="last"
30
+ ></gn-ui-user-feedback-item>
31
+ </div>
32
+
33
+ <div *ngIf="isActiveUserEditor" class="mt-2 flex flex-col">
34
+ <hr class="-mx-4 my-4" />
35
+ <div
36
+ id="new-comment-buttons"
37
+ class="flex flex-row gap-2 items-center justify-end"
38
+ >
39
+ <gn-ui-text-area
40
+ [disabled]="isAddUserFeedbackLoading"
41
+ [(value)]="newAnswer"
42
+ (valueChange)="onNewAnswerValueChange()"
43
+ (keyup.control.enter)="publishNewAnswer()"
44
+ [placeholder]="
45
+ 'record.metadata.userFeedbacks.newAnswer.placeholder' | translate
46
+ "
47
+ class="grow"
48
+ extraClass="bg-transparent border-0 placeholder-primary-darker text-primary-darker h-9"
49
+ ></gn-ui-text-area>
50
+ <div *ngIf="!isAnswerEmpty" class="flex flex-row justify-end">
51
+ <gn-ui-button
52
+ [disabled]="isAddUserFeedbackLoading"
53
+ [type]="'outline'"
54
+ (buttonClick)="publishNewAnswer()"
55
+ [title]="
56
+ 'record.metadata.userFeedbacks.newAnswer.buttonTitle' | translate
57
+ "
58
+ extraClass="!p-[0.5em] text-primary-darker border-primary-darker h-9"
59
+ >
60
+ <mat-icon
61
+ class="material-symbols-outlined"
62
+ *ngIf="!isAddUserFeedbackLoading"
63
+ >
64
+ send
65
+ </mat-icon>
66
+ <ng-container *ngIf="isAddUserFeedbackLoading">
67
+ <div class="flex justify-center w-full">
68
+ <gn-ui-spinning-loader></gn-ui-spinning-loader>
69
+ </div>
70
+ </ng-container>
71
+ </gn-ui-button>
72
+ </div>
73
+ </div>
74
+ </div>
75
+ </div>
@@ -0,0 +1,63 @@
1
+ import {
2
+ ChangeDetectionStrategy,
3
+ Component,
4
+ EventEmitter,
5
+ Input,
6
+ OnInit,
7
+ Output,
8
+ } from '@angular/core'
9
+ import {
10
+ UserFeedback,
11
+ UserFeedbackViewModel,
12
+ } from '../../../../../../libs/common/domain/src/lib/model/record'
13
+ import { UserModel } from '../../../../../../libs/common/domain/src/lib/model/user'
14
+
15
+ @Component({
16
+ selector: 'gn-ui-user-feedback-item',
17
+ templateUrl: './user-feedback-item.component.html',
18
+ styleUrls: ['./user-feedback-item.component.css'],
19
+ changeDetection: ChangeDetectionStrategy.OnPush,
20
+ })
21
+ export class UserFeedbackItemComponent implements OnInit {
22
+ @Input() userFeedbackParent: UserFeedbackViewModel
23
+ @Input() userFeedBacksAnswers: UserFeedbackViewModel[]
24
+ @Input() isActiveUserEditor: boolean
25
+ @Input() activeUser: UserModel
26
+ @Input() isLastComment: boolean
27
+ @Input() isAddUserFeedbackLoading: boolean
28
+
29
+ @Output() newUserFeedbackAnswer = new EventEmitter<UserFeedback>()
30
+
31
+ isAnAnswer = false
32
+ newAnswer = ''
33
+ isAnswerEmpty = true
34
+
35
+ ngOnInit(): void {
36
+ this.isAnAnswer = !!this.userFeedbackParent.parentUuid
37
+ }
38
+
39
+ onNewAnswerValueChange() {
40
+ this.isAnswerEmpty = this.newAnswer.length === 0
41
+ }
42
+
43
+ publishNewAnswer() {
44
+ if (this.newAnswer.trim() === '') return
45
+
46
+ const newAnswer: UserFeedback = {
47
+ ...this.userFeedbackParent,
48
+ uuid: undefined,
49
+ published: true,
50
+ comment: this.newAnswer,
51
+ parentUuid: this.userFeedbackParent.uuid,
52
+ authorUserId: this.activeUser?.id,
53
+ authorEmail: this.activeUser?.email,
54
+ date: new Date(),
55
+ authorName: `${this.activeUser?.name} ${this.activeUser?.surname}`,
56
+ }
57
+
58
+ this.newUserFeedbackAnswer.emit(newAnswer)
59
+
60
+ this.newAnswer = ''
61
+ this.onNewAnswerValueChange()
62
+ }
63
+ }