geonetwork-ui 2.4.0-dev.503109c9 → 2.4.0-dev.575f30f2

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 (347) hide show
  1. package/esm2022/libs/api/metadata-converter/src/index.mjs +2 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +10 -3
  3. package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.mjs +5 -5
  4. package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.mjs +7 -4
  5. package/esm2022/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.mjs +10 -7
  6. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.mjs +7 -14
  7. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +6 -6
  8. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +28 -18
  9. package/esm2022/libs/api/metadata-converter/src/lib/xml-utils.mjs +18 -2
  10. package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +78 -39
  11. package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +41 -7
  12. package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
  13. package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
  14. package/esm2022/libs/common/domain/src/lib/repository/records-repository.interface.mjs +1 -1
  15. package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +1 -1
  16. package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +1 -1
  17. package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +1 -1
  18. package/esm2022/libs/feature/editor/src/index.mjs +2 -1
  19. package/esm2022/libs/feature/editor/src/lib/components/contact-card/contact-card.component.mjs +4 -16
  20. package/esm2022/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.mjs +4 -2
  21. package/esm2022/libs/feature/editor/src/lib/components/import-record/import-record.component.mjs +93 -0
  22. package/esm2022/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.mjs +71 -0
  23. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.mjs +11 -29
  24. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-date-updated/form-field-date-updated.component.mjs +19 -0
  25. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.mjs +23 -10
  26. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.mjs +3 -3
  27. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.mjs +148 -0
  28. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.mjs +86 -11
  29. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.mjs +4 -8
  30. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +36 -7
  31. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.mjs +35 -59
  32. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.mjs +3 -3
  33. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +12 -5
  34. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/index.mjs +2 -2
  35. package/esm2022/libs/feature/editor/src/lib/components/record-form/record-form.component.mjs +3 -3
  36. package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +34 -6
  37. package/esm2022/libs/feature/editor/src/lib/models/editor-config.model.mjs +1 -1
  38. package/esm2022/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.mjs +2 -2
  39. package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +1 -1
  40. package/esm2022/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.mjs +1 -1
  41. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +1 -1
  42. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +4 -2
  43. package/esm2022/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.mjs +3 -3
  44. package/esm2022/libs/ui/elements/src/index.mjs +2 -2
  45. package/esm2022/libs/ui/elements/src/lib/download-item/download-item.component.mjs +2 -2
  46. package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +1 -1
  47. package/esm2022/libs/ui/elements/src/lib/link-card/link-card.component.mjs +2 -2
  48. package/esm2022/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.mjs +6 -6
  49. package/esm2022/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.mjs +2 -2
  50. package/esm2022/libs/ui/inputs/src/index.mjs +5 -1
  51. package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +7 -4
  52. package/esm2022/libs/ui/inputs/src/lib/badge/badge.component.mjs +5 -3
  53. package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +8 -1
  54. package/esm2022/libs/ui/inputs/src/lib/date-picker/date-picker.component.mjs +11 -4
  55. package/esm2022/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.mjs +9 -3
  56. package/esm2022/libs/ui/inputs/src/lib/file-input/file-input.component.mjs +87 -0
  57. package/esm2022/libs/ui/inputs/src/lib/image-input/image-input.component.mjs +5 -4
  58. package/esm2022/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.mjs +4 -4
  59. package/esm2022/libs/ui/inputs/src/lib/text-area/text-area.component.mjs +4 -3
  60. package/esm2022/libs/ui/inputs/src/lib/url-input/url-input.component.mjs +3 -3
  61. package/esm2022/libs/ui/layout/src/index.mjs +3 -1
  62. package/esm2022/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.mjs +5 -3
  63. package/esm2022/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.mjs +29 -0
  64. package/esm2022/libs/ui/layout/src/lib/sortable-list/sortable-list.component.mjs +43 -0
  65. package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +3 -3
  66. package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +1 -1
  67. package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +1 -1
  68. package/esm2022/libs/util/shared/src/lib/services/theme.service.mjs +2 -1
  69. package/esm2022/libs/util/shared/src/lib/utils/bytes-convert.mjs +4 -1
  70. package/esm2022/translations/de.json +20 -0
  71. package/esm2022/translations/en.json +20 -0
  72. package/esm2022/translations/es.json +20 -0
  73. package/esm2022/translations/fr.json +21 -1
  74. package/esm2022/translations/it.json +20 -0
  75. package/esm2022/translations/nl.json +20 -0
  76. package/esm2022/translations/pt.json +20 -0
  77. package/fesm2022/geonetwork-ui.mjs +3136 -2523
  78. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  79. package/libs/api/metadata-converter/src/index.d.ts +1 -0
  80. package/libs/api/metadata-converter/src/index.d.ts.map +1 -1
  81. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts +3 -3
  82. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  83. package/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.d.ts +2 -2
  84. package/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.d.ts.map +1 -1
  85. package/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.d.ts +1 -1
  86. package/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.d.ts.map +1 -1
  87. package/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.d.ts.map +1 -1
  88. package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts +4 -5
  89. package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
  90. package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts +7 -6
  91. package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
  92. package/libs/api/metadata-converter/src/lib/xml-utils.d.ts +6 -0
  93. package/libs/api/metadata-converter/src/lib/xml-utils.d.ts.map +1 -1
  94. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +12 -7
  95. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
  96. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +21 -2
  97. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
  98. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +6 -6
  99. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
  100. package/libs/common/domain/src/lib/platform.service.interface.d.ts +15 -0
  101. package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
  102. package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts +7 -0
  103. package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
  104. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +2 -2
  105. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
  106. package/libs/feature/dataviz/src/lib/service/data.service.d.ts +6 -6
  107. package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
  108. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +3 -3
  109. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
  110. package/libs/feature/editor/src/index.d.ts +1 -0
  111. package/libs/feature/editor/src/index.d.ts.map +1 -1
  112. package/libs/feature/editor/src/lib/components/contact-card/contact-card.component.d.ts +1 -5
  113. package/libs/feature/editor/src/lib/components/contact-card/contact-card.component.d.ts.map +1 -1
  114. package/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.d.ts +2 -1
  115. package/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.d.ts.map +1 -1
  116. package/libs/feature/editor/src/lib/components/import-record/import-record.component.d.ts +33 -0
  117. package/libs/feature/editor/src/lib/components/import-record/import-record.component.d.ts.map +1 -0
  118. package/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.d.ts +15 -0
  119. package/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.d.ts.map +1 -0
  120. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.d.ts +2 -5
  121. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.d.ts.map +1 -1
  122. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-date-updated/form-field-date-updated.component.d.ts +9 -0
  123. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-date-updated/form-field-date-updated.component.d.ts.map +1 -0
  124. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.d.ts +5 -2
  125. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.d.ts.map +1 -1
  126. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.d.ts +35 -0
  127. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.d.ts.map +1 -0
  128. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.d.ts +20 -2
  129. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.d.ts.map +1 -1
  130. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts +1 -3
  131. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts.map +1 -1
  132. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts +7 -2
  133. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts.map +1 -1
  134. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.d.ts +9 -15
  135. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.d.ts.map +1 -1
  136. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts +5 -3
  137. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -1
  138. package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts +1 -1
  139. package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts.map +1 -1
  140. package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts +3 -2
  141. package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts.map +1 -1
  142. package/libs/feature/editor/src/lib/fields.config.d.ts +9 -1
  143. package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
  144. package/libs/feature/editor/src/lib/models/editor-config.model.d.ts +6 -0
  145. package/libs/feature/editor/src/lib/models/editor-config.model.d.ts.map +1 -1
  146. package/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.d.ts +5 -5
  147. package/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.d.ts.map +1 -1
  148. package/libs/feature/record/src/lib/data-view/data-view.component.d.ts +3 -3
  149. package/libs/feature/record/src/lib/data-view/data-view.component.d.ts.map +1 -1
  150. package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts +2 -2
  151. package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts.map +1 -1
  152. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts +2 -2
  153. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
  154. package/libs/feature/record/src/lib/state/mdview.facade.d.ts +7 -7
  155. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  156. package/libs/ui/elements/src/index.d.ts +1 -1
  157. package/libs/ui/elements/src/index.d.ts.map +1 -1
  158. package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts +2 -2
  159. package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts.map +1 -1
  160. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +7 -7
  161. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts.map +1 -1
  162. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts +2 -2
  163. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts.map +1 -1
  164. package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts +2 -2
  165. package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts.map +1 -1
  166. package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts +1 -1
  167. package/libs/ui/inputs/src/index.d.ts +4 -0
  168. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  169. package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts.map +1 -1
  170. package/libs/ui/inputs/src/lib/badge/badge.component.d.ts.map +1 -1
  171. package/libs/ui/inputs/src/lib/button/button.component.d.ts +1 -1
  172. package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
  173. package/libs/ui/inputs/src/lib/date-picker/date-picker.component.d.ts.map +1 -1
  174. package/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.d.ts.map +1 -1
  175. package/libs/ui/inputs/src/lib/file-input/file-input.component.d.ts +24 -0
  176. package/libs/ui/inputs/src/lib/file-input/file-input.component.d.ts.map +1 -0
  177. package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts +1 -1
  178. package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts.map +1 -1
  179. package/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.d.ts +0 -1
  180. package/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.d.ts.map +1 -1
  181. package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts.map +1 -1
  182. package/libs/ui/layout/src/index.d.ts +2 -0
  183. package/libs/ui/layout/src/index.d.ts.map +1 -1
  184. package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts +2 -2
  185. package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts.map +1 -1
  186. package/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.d.ts +1 -1
  187. package/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.d.ts +20 -0
  188. package/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.d.ts.map +1 -0
  189. package/libs/ui/layout/src/lib/sortable-list/sortable-list.component.d.ts +14 -0
  190. package/libs/ui/layout/src/lib/sortable-list/sortable-list.component.d.ts.map +1 -0
  191. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +1 -1
  192. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
  193. package/libs/util/shared/src/lib/links/link-classifier.service.d.ts +3 -3
  194. package/libs/util/shared/src/lib/links/link-classifier.service.d.ts.map +1 -1
  195. package/libs/util/shared/src/lib/links/link-utils.d.ts +6 -6
  196. package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
  197. package/libs/util/shared/src/lib/services/theme.service.d.ts.map +1 -1
  198. package/libs/util/shared/src/lib/utils/bytes-convert.d.ts +2 -1
  199. package/libs/util/shared/src/lib/utils/bytes-convert.d.ts.map +1 -1
  200. package/package.json +1 -1
  201. package/src/libs/api/metadata-converter/src/index.ts +1 -0
  202. package/src/libs/api/metadata-converter/src/lib/fixtures/generic.records.ts +1 -1
  203. package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.ts +1 -1
  204. package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +1 -1
  205. package/src/libs/api/metadata-converter/src/lib/fixtures/metawal.records.ts +1 -1
  206. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +18 -16
  207. package/src/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.ts +4 -4
  208. package/src/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.ts +12 -4
  209. package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +14 -8
  210. package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +4 -12
  211. package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +13 -15
  212. package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +48 -36
  213. package/src/libs/api/metadata-converter/src/lib/xml-utils.ts +20 -1
  214. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +132 -68
  215. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +47 -3
  216. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +7 -7
  217. package/src/libs/common/domain/src/lib/platform.service.interface.ts +26 -0
  218. package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +10 -0
  219. package/src/libs/common/fixtures/src/lib/link.fixtures.ts +216 -175
  220. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +3 -3
  221. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +3 -3
  222. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +6 -6
  223. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +4 -4
  224. package/src/libs/feature/editor/src/index.ts +1 -0
  225. package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.html +12 -24
  226. package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.ts +1 -13
  227. package/src/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.ts +1 -0
  228. package/src/libs/feature/editor/src/lib/components/import-record/import-record.component.html +43 -0
  229. package/src/libs/feature/editor/src/lib/components/import-record/import-record.component.ts +129 -0
  230. package/src/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.html +35 -0
  231. package/src/libs/feature/editor/src/lib/components/online-resource-card/online-resource-card.component.ts +79 -0
  232. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.css +4 -0
  233. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.html +13 -23
  234. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.ts +7 -44
  235. package/src/libs/feature/editor/src/lib/components/record-form/form-field/{form-field-resource-updated/form-field-resource-updated.component.ts → form-field-date-updated/form-field-date-updated.component.ts} +4 -4
  236. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.html +3 -2
  237. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.ts +35 -3
  238. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.css +8 -0
  239. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.html +34 -0
  240. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.ts +182 -0
  241. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.html +11 -5
  242. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.ts +93 -4
  243. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.html +13 -6
  244. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.ts +0 -9
  245. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.html +7 -2
  246. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.ts +62 -6
  247. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.css +4 -0
  248. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.html +23 -3
  249. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.ts +37 -69
  250. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.css +4 -0
  251. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.html +16 -14
  252. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +27 -20
  253. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +10 -3
  254. package/src/libs/feature/editor/src/lib/components/record-form/form-field/index.ts +1 -1
  255. package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.html +31 -29
  256. package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.ts +2 -1
  257. package/src/libs/feature/editor/src/lib/fields.config.ts +37 -5
  258. package/src/libs/feature/editor/src/lib/models/editor-config.model.ts +12 -0
  259. package/src/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.ts +7 -7
  260. package/src/libs/feature/record/src/lib/data-view/data-view.component.ts +3 -3
  261. package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.ts +2 -2
  262. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +2 -2
  263. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +5 -1
  264. package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.html +1 -0
  265. package/src/libs/ui/elements/src/index.ts +1 -1
  266. package/src/libs/ui/elements/src/lib/download-item/download-item.component.ts +4 -4
  267. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +7 -7
  268. package/src/libs/ui/elements/src/lib/link-card/link-card.component.ts +3 -3
  269. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.html +13 -20
  270. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.ts +1 -1
  271. package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.css +5 -0
  272. package/src/libs/ui/inputs/src/index.ts +4 -0
  273. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.css +25 -18
  274. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html +38 -24
  275. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +4 -1
  276. package/src/libs/ui/inputs/src/lib/badge/badge.component.html +12 -3
  277. package/src/libs/ui/inputs/src/lib/badge/badge.component.ts +2 -1
  278. package/src/libs/ui/inputs/src/lib/button/button.component.ts +15 -1
  279. package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.css +7 -2
  280. package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.html +13 -6
  281. package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.ts +7 -1
  282. package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.css +7 -2
  283. package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.html +27 -23
  284. package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.ts +7 -1
  285. package/src/libs/ui/inputs/src/lib/file-input/file-input.component.css +4 -0
  286. package/src/libs/ui/inputs/src/lib/file-input/file-input.component.html +7 -3
  287. package/src/libs/ui/inputs/src/lib/file-input/file-input.component.ts +2 -1
  288. package/src/libs/ui/inputs/src/lib/image-input/image-input.component.css +4 -0
  289. package/src/libs/ui/inputs/src/lib/image-input/image-input.component.html +30 -22
  290. package/src/libs/ui/inputs/src/lib/image-input/image-input.component.ts +2 -1
  291. package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.css +4 -3
  292. package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.html +0 -1
  293. package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.ts +1 -2
  294. package/src/libs/ui/inputs/src/lib/text-area/text-area.component.html +1 -1
  295. package/src/libs/ui/inputs/src/lib/text-area/text-area.component.ts +1 -1
  296. package/src/libs/ui/inputs/src/lib/url-input/url-input.component.html +1 -1
  297. package/src/libs/ui/layout/src/index.ts +2 -0
  298. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.html +8 -3
  299. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.ts +4 -3
  300. package/src/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.css +0 -0
  301. package/src/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.html +15 -0
  302. package/src/libs/ui/layout/src/lib/modal-dialog/modal-dialog.component.ts +44 -0
  303. package/src/libs/ui/layout/src/lib/sortable-list/sortable-list.component.html +37 -0
  304. package/src/libs/ui/{elements → layout}/src/lib/sortable-list/sortable-list.component.ts +13 -16
  305. package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +4 -2
  306. package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +4 -3
  307. package/src/libs/util/shared/src/lib/links/link-utils.ts +6 -6
  308. package/src/libs/util/shared/src/lib/services/theme.service.ts +1 -0
  309. package/src/libs/util/shared/src/lib/utils/bytes-convert.ts +4 -1
  310. package/tailwind.base.config.js +1 -0
  311. package/tailwind.base.css +35 -4
  312. package/translations/de.json +20 -0
  313. package/translations/en.json +20 -0
  314. package/translations/es.json +20 -0
  315. package/translations/fr.json +21 -1
  316. package/translations/it.json +20 -0
  317. package/translations/nl.json +20 -0
  318. package/translations/pt.json +20 -0
  319. package/translations/sk.json +20 -0
  320. package/esm2022/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.mjs +0 -96
  321. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.mjs +0 -19
  322. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.mjs +0 -17
  323. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.mjs +0 -17
  324. package/esm2022/libs/ui/elements/src/lib/sortable-list/sortable-list.component.mjs +0 -39
  325. package/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.d.ts +0 -27
  326. package/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.d.ts.map +0 -1
  327. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.d.ts +0 -9
  328. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.d.ts.map +0 -1
  329. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.d.ts +0 -8
  330. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.d.ts.map +0 -1
  331. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.d.ts +0 -8
  332. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.d.ts.map +0 -1
  333. package/libs/ui/elements/src/lib/sortable-list/sortable-list.component.d.ts +0 -17
  334. package/libs/ui/elements/src/lib/sortable-list/sortable-list.component.d.ts.map +0 -1
  335. package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.html +0 -9
  336. package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.ts +0 -113
  337. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.html +0 -7
  338. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.ts +0 -16
  339. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.html +0 -13
  340. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.ts +0 -16
  341. package/src/libs/ui/elements/src/lib/sortable-list/sortable-list.component.html +0 -29
  342. /package/src/libs/feature/editor/src/lib/components/{overview-upload/overview-upload.component.css → import-record/import-record.component.css} +0 -0
  343. /package/src/libs/feature/editor/src/lib/components/{record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.css → online-resource-card/online-resource-card.component.css} +0 -0
  344. /package/src/libs/feature/editor/src/lib/components/record-form/form-field/{form-field-temporal-extents/form-field-temporal-extents-date/form-field-temporal-extents-date.component.css → form-field-date-updated/form-field-date-updated.component.css} +0 -0
  345. /package/src/libs/feature/editor/src/lib/components/record-form/form-field/{form-field-resource-updated/form-field-resource-updated.component.html → form-field-date-updated/form-field-date-updated.component.html} +0 -0
  346. /package/src/libs/feature/editor/src/lib/components/record-form/form-field/{form-field-temporal-extents/form-field-temporal-extents-range/form-field-temporal-extents-range.component.css → form-field-online-link-resources/form-field-online-link-resources.component.css} +0 -0
  347. /package/src/libs/ui/{elements → layout}/src/lib/sortable-list/sortable-list.component.css +0 -0
@@ -0,0 +1,43 @@
1
+ <ng-container [ngSwitch]="sectionDisplayed">
2
+ <ng-container *ngSwitchCase="'mainMenu'">
3
+ <div
4
+ data-test="importMenuMainSection"
5
+ class="mt-2 border border-gray-100 p-2 flex items-center bg-white shadow-2xl rounded-2xl"
6
+ >
7
+ <ul class="flex flex-col gap-2 w-full">
8
+ <li *ngFor="let menuItem of importMenuItems">
9
+ <gn-ui-button
10
+ [attr.data-test]="menuItem.dataTest"
11
+ type="light"
12
+ extraClass="flex flex-row items-center gap-2 w-full justify-start"
13
+ (buttonClick)="menuItem.action()"
14
+ ><mat-icon class="material-symbols-outlined">
15
+ {{ menuItem.icon }} </mat-icon
16
+ ><span>{{ menuItem.label }}</span></gn-ui-button
17
+ >
18
+ </li>
19
+ </ul>
20
+ </div>
21
+ </ng-container>
22
+ <ng-container *ngSwitchCase="'importExternalFile'">
23
+ <div
24
+ data-test="importMenuImportExternalFileSection"
25
+ class="p-6 flex flex-col gap-2 mt-2 border border-gray-100 bg-white shadow-2xl rounded-2xl"
26
+ >
27
+ <div class="flex flex-row items-center gap-2">
28
+ <gn-ui-button
29
+ data-test="importMenuImportExternalFileSectionBackButton"
30
+ type="light"
31
+ (buttonClick)="displayMainMenu()"
32
+ >
33
+ <mat-icon class="material-symbols-outlined">arrow_back</mat-icon>
34
+ </gn-ui-button>
35
+ <span class="font-bold"> {{ externalImportBackLabel }}</span>
36
+ </div>
37
+ <gn-ui-url-input
38
+ (valueChange)="importRecord($event)"
39
+ [disabled]="isRecordImportInProgress"
40
+ ></gn-ui-url-input>
41
+ </div>
42
+ </ng-container>
43
+ </ng-container>
@@ -0,0 +1,129 @@
1
+ import {
2
+ ChangeDetectionStrategy,
3
+ ChangeDetectorRef,
4
+ Component,
5
+ EventEmitter,
6
+ Output,
7
+ } from '@angular/core'
8
+ import { MatIconModule } from '@angular/material/icon'
9
+ import { CommonModule } from '@angular/common'
10
+ import { ButtonComponent, UrlInputComponent } from '../../../../../../../libs/ui/inputs/src'
11
+ import { ThumbnailComponent } from '../../../../../../../libs/ui/elements/src'
12
+ import { TranslateService } from '@ngx-translate/core'
13
+ import { NotificationsService } from '../../../../../../../libs/feature/notifications/src'
14
+ import { RecordsRepositoryInterface } from '../../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
15
+ import { Router } from '@angular/router'
16
+
17
+ interface ImportMenuItems {
18
+ label: string
19
+ icon: string
20
+ action: () => any
21
+ dataTest: string
22
+ }
23
+
24
+ type ImportMenuPage = 'mainMenu' | 'importExternalFile'
25
+
26
+ @Component({
27
+ selector: 'gn-ui-import-record',
28
+ templateUrl: './import-record.component.html',
29
+ styleUrls: ['./import-record.component.css'],
30
+ changeDetection: ChangeDetectionStrategy.OnPush,
31
+ standalone: true,
32
+ imports: [
33
+ CommonModule,
34
+ MatIconModule,
35
+ ButtonComponent,
36
+ ThumbnailComponent,
37
+ UrlInputComponent,
38
+ ],
39
+ })
40
+ export class ImportRecordComponent {
41
+ @Output() closeImportMenu = new EventEmitter<void>()
42
+
43
+ importMenuItems: ImportMenuItems[] = [
44
+ {
45
+ label: this.translateService.instant('dashboard.importRecord.useModel'),
46
+ icon: 'highlight',
47
+ action: () => null,
48
+ dataTest: 'useAModelButton',
49
+ },
50
+ {
51
+ label: this.translateService.instant(
52
+ 'dashboard.importRecord.importExternal'
53
+ ),
54
+ icon: 'cloud_download',
55
+ action: this.displayImportExternal.bind(this),
56
+ dataTest: 'importFromUrlButton',
57
+ },
58
+ ]
59
+
60
+ isRecordImportInProgress = false
61
+
62
+ sectionDisplayed: ImportMenuPage = 'mainMenu'
63
+
64
+ externalImportBackLabel = this.translateService.instant(
65
+ 'dashboard.importRecord.importExternalLabel'
66
+ )
67
+
68
+ constructor(
69
+ private router: Router,
70
+ private translateService: TranslateService,
71
+ private cdr: ChangeDetectorRef,
72
+ private notificationsService: NotificationsService,
73
+ private recordsRepository: RecordsRepositoryInterface
74
+ ) {}
75
+
76
+ displayMainMenu() {
77
+ this.sectionDisplayed = 'mainMenu'
78
+ this.cdr.markForCheck()
79
+ }
80
+
81
+ displayImportExternal() {
82
+ this.sectionDisplayed = 'importExternalFile'
83
+ this.cdr.markForCheck()
84
+ }
85
+
86
+ importRecord(url: string) {
87
+ this.isRecordImportInProgress = true
88
+
89
+ this.recordsRepository.duplicateExternalRecord(url).subscribe({
90
+ next: (recordTempId) => {
91
+ if (recordTempId) {
92
+ this.notificationsService.showNotification(
93
+ {
94
+ type: 'success',
95
+ title: this.translateService.instant(
96
+ 'editor.record.importFromExternalFile.success.title'
97
+ ),
98
+ text: `${this.translateService.instant(
99
+ 'editor.record.importFromExternalFile.success.body'
100
+ )}`,
101
+ },
102
+ 2500
103
+ )
104
+
105
+ this.router
106
+ .navigate(['/edit', recordTempId])
107
+ .catch((err) => console.error(err))
108
+ }
109
+ this.closeImportMenu.next()
110
+ },
111
+ error: (error) => {
112
+ this.notificationsService.showNotification(
113
+ {
114
+ type: 'error',
115
+ title: this.translateService.instant(
116
+ 'editor.record.importFromExternalFile.failure.title'
117
+ ),
118
+ text: `${this.translateService.instant(
119
+ 'editor.record.importFromExternalFile.failure.body'
120
+ )} ${error.message ?? ''}`,
121
+ },
122
+ 2500
123
+ )
124
+ this.isRecordImportInProgress = false
125
+ this.cdr.markForCheck()
126
+ },
127
+ })
128
+ }
129
+ }
@@ -0,0 +1,35 @@
1
+ <div class="gn-ui-card">
2
+ <div
3
+ class="bg-gray-100 w-[56px] h-[56px] rounded-[4px] text-primary grid justify-center items-center shrink-0"
4
+ >
5
+ <mat-icon class="material-symbols-outlined">attach_file</mat-icon>
6
+ </div>
7
+ <div class="flex flex-col w-full items-start overflow-hidden leading-snug">
8
+ <div class="text-[16px] font-bold text-main" data-test="card-title">
9
+ {{ title }}
10
+ </div>
11
+ <div
12
+ class="text-[14px] text-gray-900"
13
+ *ngIf="subtitle"
14
+ data-test="card-subtitle"
15
+ >
16
+ <span>{{ subtitle }}</span>
17
+ <span *ngIf="fileSize">
18
+
19
+ {{
20
+ 'editor.record.form.field.onlineResource.fileSize'
21
+ | translate: { sizeMB: fileSize }
22
+ }}</span
23
+ >
24
+ <span *ngIf="identifierInService"> • {{ identifierInService }}</span>
25
+ </div>
26
+ <button
27
+ class="gn-ui-link text-[14px]"
28
+ translate
29
+ (click)="modifyClick.emit(onlineResource)"
30
+ data-test="card-modify"
31
+ >
32
+ editor.record.form.field.onlineResource.modify
33
+ </button>
34
+ </div>
35
+ </div>
@@ -0,0 +1,79 @@
1
+ import {
2
+ ChangeDetectionStrategy,
3
+ Component,
4
+ EventEmitter,
5
+ Input,
6
+ Output,
7
+ } from '@angular/core'
8
+ import { CommonModule } from '@angular/common'
9
+ import {
10
+ DatasetDownloadDistribution,
11
+ OnlineLinkResource,
12
+ OnlineResource,
13
+ } from '../../../../../../../libs/common/domain/src/lib/model/record'
14
+ import { ThumbnailComponent } from '../../../../../../../libs/ui/elements/src'
15
+ import { MatIconModule } from '@angular/material/icon'
16
+ import { bytesToMegabytes, getFileFormat } from '../../../../../../../libs/util/shared/src'
17
+ import { ButtonComponent } from '../../../../../../../libs/ui/inputs/src'
18
+ import { TranslateModule } from '@ngx-translate/core'
19
+
20
+ @Component({
21
+ selector: 'gn-ui-online-resource-card',
22
+ standalone: true,
23
+ imports: [
24
+ CommonModule,
25
+ ThumbnailComponent,
26
+ MatIconModule,
27
+ ButtonComponent,
28
+ TranslateModule,
29
+ ],
30
+ templateUrl: './online-resource-card.component.html',
31
+ styleUrls: ['./online-resource-card.component.css'],
32
+ changeDetection: ChangeDetectionStrategy.OnPush,
33
+ })
34
+ export class OnlineResourceCardComponent {
35
+ @Input() onlineResource: OnlineResource
36
+ @Output() modifyClick = new EventEmitter<OnlineResource>()
37
+
38
+ get title(): string {
39
+ switch (this.onlineResource.type) {
40
+ case 'link':
41
+ case 'service':
42
+ case 'download':
43
+ return (
44
+ this.onlineResource.name ??
45
+ this.onlineResource.description ??
46
+ '(unknown)'
47
+ )
48
+ case 'endpoint':
49
+ return this.onlineResource.description
50
+ }
51
+ }
52
+
53
+ get subtitle(): string {
54
+ switch (this.onlineResource.type) {
55
+ case 'service':
56
+ return `${this.onlineResource.accessServiceProtocol}`
57
+ case 'endpoint':
58
+ return `${this.onlineResource.protocol}`
59
+ case 'link':
60
+ case 'download':
61
+ return this.getFormat(this.onlineResource)
62
+ }
63
+ }
64
+
65
+ get fileSize(): string {
66
+ if (this.onlineResource.type !== 'download') return ''
67
+ if (!this.onlineResource.sizeBytes) return ''
68
+ return bytesToMegabytes(this.onlineResource.sizeBytes).toLocaleString()
69
+ }
70
+
71
+ get identifierInService(): string {
72
+ if (this.onlineResource.type !== 'service') return ''
73
+ return this.onlineResource.identifierInService ?? ''
74
+ }
75
+
76
+ getFormat(onlineResource: OnlineLinkResource | DatasetDownloadDistribution) {
77
+ return (getFileFormat(onlineResource) || '').toUpperCase()
78
+ }
79
+ }
@@ -1,16 +1,10 @@
1
1
  <div class="flex flex-col gap-3">
2
2
  <div class="flex flex-row flex-wrap gap-2" data-test="rolesToPick">
3
3
  <ng-container *ngFor="let role of rolesToPick">
4
- <gn-ui-button
5
- extraClass="px-2 py-1.5"
6
- (buttonClick)="addRoleToDisplay(role)"
7
- >
8
- <div class="flex flex-row gap-1 items-center">
9
- <span class="text-primary text-[20px] leading-[0] font-bold pb-[5px]"
10
- >&#8330;</span
11
- >
12
- <span class="font-bold" translate>{{ roleToLabel(role) }}</span>
13
- </div>
4
+ <gn-ui-button type="gray" (buttonClick)="addRoleToDisplay(role)">
5
+ <mat-icon class="material-symbols-outlined text-primary">add</mat-icon>
6
+ &nbsp;
7
+ <span translate>{{ roleToLabel(role) }}</span>
14
8
  </gn-ui-button>
15
9
  </ng-container>
16
10
  </div>
@@ -43,23 +37,19 @@
43
37
  [displayWithFn]="displayWithFn"
44
38
  [minCharacterCount]="1"
45
39
  [clearOnSelection]="true"
40
+ [allowSubmit]="false"
46
41
  >
47
42
  </gn-ui-autocomplete>
48
43
 
49
44
  <ng-container *ngIf="contactsForRessourceByRole.get(role) as contacts">
50
- <ng-container *ngIf="contacts.length > 1">
51
- <gn-ui-sortable-list
52
- [elements]="contactsAsDynElemByRole.get(role)"
53
- (elementsChange)="handleContactsChanged($event)"
54
- ></gn-ui-sortable-list>
55
- </ng-container>
56
- <ng-container *ngIf="contacts.length === 1">
57
- <ng-container *ngFor="let contact of contacts">
58
- <gn-ui-contact-card
59
- [contact]="contact"
60
- (contactRemoved)="removeContact(index)"
61
- ></gn-ui-contact-card> </ng-container
62
- ></ng-container>
45
+ <gn-ui-sortable-list
46
+ [items]="contacts"
47
+ (itemsOrderChange)="handleContactsChanged($event)"
48
+ [elementTemplate]="contactTemplate"
49
+ ></gn-ui-sortable-list>
50
+ <ng-template #contactTemplate let-contact>
51
+ <gn-ui-contact-card [contact]="contact"></gn-ui-contact-card>
52
+ </ng-template>
63
53
  </ng-container>
64
54
 
65
55
  <hr class="border-t-[#D6D3D1] mt-4 mb-6" *ngIf="!isLast" />
@@ -1,7 +1,6 @@
1
1
  import { CommonModule } from '@angular/common'
2
2
  import {
3
3
  ChangeDetectionStrategy,
4
- ChangeDetectorRef,
5
4
  Component,
6
5
  EventEmitter,
7
6
  Input,
@@ -18,10 +17,7 @@ import {
18
17
  import { UserModel } from '../../../../../../../../../libs/common/domain/src/lib/model/user'
19
18
  import { OrganizationsServiceInterface } from '../../../../../../../../../libs/common/domain/src/lib/organizations.service.interface'
20
19
  import { PlatformServiceInterface } from '../../../../../../../../../libs/common/domain/src/lib/platform.service.interface'
21
- import {
22
- DynamicElement,
23
- SortableListComponent,
24
- } from '../../../../../../../../../libs/ui/elements/src'
20
+ import { SortableListComponent } from '../../../../../../../../../libs/ui/layout/src'
25
21
  import {
26
22
  AutocompleteComponent,
27
23
  DropdownSelectorComponent,
@@ -34,11 +30,11 @@ import {
34
30
  debounceTime,
35
31
  distinctUntilChanged,
36
32
  firstValueFrom,
37
- Observable,
38
33
  switchMap,
39
34
  } from 'rxjs'
40
35
  import { map } from 'rxjs/operators'
41
36
  import { ContactCardComponent } from '../../../contact-card/contact-card.component'
37
+ import { MatIconModule } from '@angular/material/icon'
42
38
 
43
39
  @Component({
44
40
  selector: 'gn-ui-form-field-contacts-for-resource',
@@ -55,6 +51,7 @@ import { ContactCardComponent } from '../../../contact-card/contact-card.compone
55
51
  TranslateModule,
56
52
  ContactCardComponent,
57
53
  SortableListComponent,
54
+ MatIconModule,
58
55
  ],
59
56
  })
60
57
  export class FormFieldContactsForResourceComponent
@@ -65,8 +62,6 @@ export class FormFieldContactsForResourceComponent
65
62
 
66
63
  contactsForRessourceByRole: Map<Role, Individual[]> = new Map()
67
64
 
68
- contactsAsDynElemByRole: Map<Role, DynamicElement[]> = new Map()
69
-
70
65
  rolesToPick: Role[] = [
71
66
  'resource_provider',
72
67
  'custodian',
@@ -133,35 +128,6 @@ export class FormFieldContactsForResourceComponent
133
128
 
134
129
  return acc
135
130
  }, new Map<Role, Individual[]>())
136
-
137
- this.contactsAsDynElemByRole = this.value.reduce((acc, contact) => {
138
- const completeOrganization = this.allOrganizations.get(
139
- contact.organization.name
140
- )
141
-
142
- const updatedContact = {
143
- ...contact,
144
- organization:
145
- completeOrganization ??
146
- ({ name: contact.organization.name } as Organization),
147
- }
148
-
149
- const contactAsDynElem = {
150
- component: ContactCardComponent,
151
- inputs: {
152
- contact: updatedContact,
153
- removable: false,
154
- },
155
- } as DynamicElement
156
-
157
- if (!acc.has(contact.role)) {
158
- acc.set(contact.role, [])
159
- }
160
-
161
- acc.get(contact.role).push(contactAsDynElem)
162
-
163
- return acc
164
- }, new Map<Role, DynamicElement[]>())
165
131
  }
166
132
 
167
133
  manageRoleSectionsToDisplay(contactsForResource: Individual[]) {
@@ -181,14 +147,11 @@ export class FormFieldContactsForResourceComponent
181
147
  this.valueChange.emit(newContactsforRessource)
182
148
  }
183
149
 
184
- handleContactsChanged(event: DynamicElement[]) {
185
- const newContactsOrdered = event.map(
186
- (contactAsDynElem) => contactAsDynElem.inputs['contact']
187
- ) as Individual[]
188
-
189
- const role = newContactsOrdered[0].role
150
+ handleContactsChanged(items: unknown[]) {
151
+ const contacts = items as Individual[]
152
+ const role = contacts[0].role
190
153
 
191
- this.contactsForRessourceByRole.set(role, newContactsOrdered)
154
+ this.contactsForRessourceByRole.set(role, contacts)
192
155
 
193
156
  const newControlValue = Array.from(
194
157
  this.contactsForRessourceByRole.values()
@@ -8,14 +8,14 @@ import {
8
8
  import { DatePickerComponent } from '../../../../../../../../../libs/ui/inputs/src'
9
9
 
10
10
  @Component({
11
- selector: 'gn-ui-form-field-resource-updated',
12
- templateUrl: './form-field-resource-updated.component.html',
13
- styleUrls: ['./form-field-resource-updated.component.css'],
11
+ selector: 'gn-ui-form-field-date-updated',
12
+ templateUrl: './form-field-date-updated.component.html',
13
+ styleUrls: ['./form-field-date-updated.component.css'],
14
14
  changeDetection: ChangeDetectionStrategy.OnPush,
15
15
  standalone: true,
16
16
  imports: [DatePickerComponent],
17
17
  })
18
- export class FormFieldResourceUpdatedComponent {
18
+ export class FormFieldDateUpdatedComponent {
19
19
  @Input() value: Date
20
20
  @Output() valueChange: EventEmitter<Date> = new EventEmitter()
21
21
  }
@@ -1,9 +1,10 @@
1
1
  <div class="flex flex-col gap-3">
2
2
  <gn-ui-generic-keywords
3
- [keywords]="value"
3
+ [keywords]="filteredKeywords"
4
4
  [keywordTypes]="keywordTypes"
5
- [placeholder]="placeholder | translate"
5
+ [placeholder]="'editor.form.keywords.placeholder' | translate"
6
6
  (changedKeywords)="handleKeywordsChange($event)"
7
+ [allowSubmit]="false"
7
8
  >
8
9
  </gn-ui-generic-keywords>
9
10
  </div>
@@ -16,6 +16,10 @@ import { Keyword } from '../../../../../../../../../libs/common/domain/src/lib/m
16
16
  import { GenericKeywordsComponent } from '../../../generic-keywords/generic-keywords.component'
17
17
  import { TranslateModule } from '@ngx-translate/core'
18
18
  import { KeywordType } from '../../../../../../../../../libs/common/domain/src/lib/model/thesaurus'
19
+ import { EditorFacade } from '../../../../+state/editor.facade'
20
+ import { firstValueFrom, map } from 'rxjs'
21
+ import { SPATIAL_SCOPES } from '../../../../fields.config'
22
+ import { all } from 'ol/loadingstrategy'
19
23
 
20
24
  @Component({
21
25
  selector: 'gn-ui-form-field-keywords',
@@ -38,9 +42,37 @@ export class FormFieldKeywordsComponent {
38
42
  @Output() valueChange: EventEmitter<Keyword[]> = new EventEmitter()
39
43
 
40
44
  keywordTypes = ['temporal', 'theme', 'other'] as KeywordType[]
41
- placeholder = 'editor.form.keywords.placeholder'
42
45
 
43
- handleKeywordsChange(keywords: Keyword[]) {
44
- this.valueChange.emit(keywords)
46
+ get filteredKeywords(): Keyword[] {
47
+ return (
48
+ this.value?.filter(
49
+ (keyword) =>
50
+ keyword.type !== 'place' && // filter out place keywords
51
+ !SPATIAL_SCOPES.some(
52
+ (spatialScope) => spatialScope.label === keyword.label
53
+ ) // filter out keywords matching spatialScope keys
54
+ ) || []
55
+ )
56
+ }
57
+
58
+ constructor(private editorFacade: EditorFacade) {}
59
+
60
+ async handleKeywordsChange(keywords: Keyword[]) {
61
+ const filteredKeywords = await firstValueFrom(
62
+ this.editorFacade.record$.pipe(
63
+ map((record) =>
64
+ record.keywords.filter(
65
+ (k) =>
66
+ k.type === 'place' || // get back place keyword
67
+ SPATIAL_SCOPES.some(
68
+ (spatialScope) => spatialScope.label === k.label // get back spatialScope keywords
69
+ )
70
+ )
71
+ )
72
+ )
73
+ )
74
+
75
+ const allKeywords = [...filteredKeywords, ...keywords]
76
+ this.valueChange.emit(allKeywords)
45
77
  }
46
78
  }
@@ -0,0 +1,8 @@
1
+ :host {
2
+ display: grid; /* this is required to be able to size the dropdown */
3
+ }
4
+
5
+ gn-ui-dropdown-selector {
6
+ /* FIXME: this includes the grid gap from the editor form, but there should be no dependency */
7
+ max-width: calc(50% - 16px);
8
+ }
@@ -0,0 +1,34 @@
1
+ <gn-ui-file-input
2
+ [maxSizeMB]="MAX_UPLOAD_SIZE_MB"
3
+ (fileChange)="handleFileChange($event)"
4
+ (uploadCancel)="handleUploadCancel()"
5
+ [uploadProgress]="uploadProgress"
6
+ (urlChange)="handleUrlChange($event)"
7
+ ></gn-ui-file-input>
8
+ <div class="h-[8px]"></div>
9
+ <gn-ui-sortable-list
10
+ [items]="linkResources"
11
+ (itemsOrderChange)="handleResourcesChange($event)"
12
+ [elementTemplate]="template"
13
+ >
14
+ </gn-ui-sortable-list>
15
+ <ng-template #template let-onlineResource let-index="index">
16
+ <gn-ui-online-resource-card
17
+ [onlineResource]="onlineResource"
18
+ (modifyClick)="handleResourceModify(onlineResource, index)"
19
+ ></gn-ui-online-resource-card>
20
+ </ng-template>
21
+
22
+ <ng-template #dialogTemplate let-onlineResource>
23
+ <h3 class="text-[16px] font-bold text-main mb-[12px]" translate>
24
+ editor.record.form.field.onlineResource.edit.title
25
+ </h3>
26
+ <gn-ui-text-input
27
+ extraClass="mb-[16px]"
28
+ [(value)]="onlineResource.name"
29
+ ></gn-ui-text-input>
30
+ <h3 class="text-[16px] font-bold text-main mb-[12px]" translate>
31
+ editor.record.form.field.onlineResource.edit.description
32
+ </h3>
33
+ <gn-ui-text-area [(value)]="onlineResource.description"></gn-ui-text-area>
34
+ </ng-template>