geonetwork-ui 2.4.0-dev.656babc7 → 2.4.0-dev.71a43b38

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 (260) hide show
  1. package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +14 -5
  2. package/esm2022/libs/api/repository/src/lib/gn4/organizations/organizations-from-groups.service.mjs +2 -1
  3. package/esm2022/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.mjs +3 -1
  4. package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.mjs +2 -2
  5. package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +9 -5
  6. package/esm2022/libs/common/domain/src/lib/model/record/organization.model.mjs +1 -1
  7. package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
  8. package/esm2022/libs/common/domain/src/lib/repository/records-repository.interface.mjs +1 -1
  9. package/esm2022/libs/data-access/gn4/src/openapi/model/user.api.model.mjs +1 -1
  10. package/esm2022/libs/feature/catalog/src/index.mjs +2 -1
  11. package/esm2022/libs/feature/catalog/src/lib/feature-catalog.module.mjs +1 -1
  12. package/esm2022/libs/feature/catalog/src/lib/organisations/organisations.component.mjs +6 -6
  13. package/esm2022/libs/feature/catalog/src/lib/organization-url.token.mjs +4 -0
  14. package/esm2022/libs/feature/catalog/src/lib/records/records.service.mjs +4 -6
  15. package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +4 -4
  16. package/esm2022/libs/feature/dataviz/src/lib/feature-dataviz.module.mjs +7 -4
  17. package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +1 -1
  18. package/esm2022/libs/feature/editor/src/lib/+state/editor.actions.mjs +2 -1
  19. package/esm2022/libs/feature/editor/src/lib/+state/editor.effects.mjs +6 -4
  20. package/esm2022/libs/feature/editor/src/lib/+state/editor.facade.mjs +2 -1
  21. package/esm2022/libs/feature/editor/src/lib/+state/editor.selectors.mjs +2 -2
  22. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.mjs +16 -44
  23. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.mjs +64 -50
  24. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +12 -35
  25. package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +5 -5
  26. package/esm2022/libs/feature/editor/src/lib/services/editor.service.mjs +12 -6
  27. package/esm2022/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.mjs +42 -23
  28. package/esm2022/libs/feature/record/src/lib/data-view-share/data-view-share.component.mjs +13 -5
  29. package/esm2022/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.mjs +49 -15
  30. package/esm2022/libs/feature/record/src/lib/feature-record.module.mjs +7 -4
  31. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +3 -3
  32. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +8 -12
  33. package/esm2022/libs/feature/router/src/lib/default/constants.mjs +2 -1
  34. package/esm2022/libs/feature/router/src/lib/default/router.config.mjs +1 -1
  35. package/esm2022/libs/feature/router/src/lib/default/router.service.mjs +9 -2
  36. package/esm2022/libs/feature/router/src/lib/default/state/router.facade.mjs +8 -1
  37. package/esm2022/libs/feature/search/src/index.mjs +2 -2
  38. package/esm2022/libs/feature/search/src/lib/feature-search.module.mjs +7 -4
  39. package/esm2022/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.mjs +3 -3
  40. package/esm2022/libs/feature/search/src/lib/results-table/results-table-container.component.mjs +49 -0
  41. package/esm2022/libs/feature/search/src/lib/state/search.facade.mjs +3 -2
  42. package/esm2022/libs/feature/search/src/lib/state/selectors.mjs +4 -1
  43. package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +7 -3
  44. package/esm2022/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.mjs +5 -5
  45. package/esm2022/libs/ui/catalog/src/lib/ui-catalog.module.mjs +5 -2
  46. package/esm2022/libs/ui/dataviz/src/lib/figure/figure.component.mjs +5 -8
  47. package/esm2022/libs/ui/elements/src/index.mjs +1 -2
  48. package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +3 -3
  49. package/esm2022/libs/ui/elements/src/lib/error/error.component.mjs +5 -3
  50. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +4 -4
  51. package/esm2022/libs/ui/elements/src/lib/related-record-card/related-record-card.component.mjs +24 -5
  52. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +7 -9
  53. package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +59 -26
  54. package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +2 -7
  55. package/esm2022/libs/ui/layout/src/index.mjs +2 -1
  56. package/esm2022/libs/ui/layout/src/lib/max-lines/max-lines.component.mjs +71 -0
  57. package/esm2022/libs/ui/layout/src/lib/ui-layout.module.mjs +1 -1
  58. package/esm2022/libs/ui/search/src/index.mjs +2 -1
  59. package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +120 -0
  60. package/esm2022/libs/ui/widgets/src/lib/popup-alert/popup-alert.component.mjs +5 -3
  61. package/esm2022/libs/ui/widgets/src/lib/ui-widgets.module.mjs +1 -6
  62. package/esm2022/translations/de.json +66 -34
  63. package/esm2022/translations/en.json +37 -5
  64. package/esm2022/translations/es.json +37 -5
  65. package/esm2022/translations/fr.json +38 -6
  66. package/esm2022/translations/it.json +37 -5
  67. package/esm2022/translations/nl.json +37 -5
  68. package/esm2022/translations/pt.json +37 -5
  69. package/fesm2022/geonetwork-ui.mjs +1070 -697
  70. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  71. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +1 -0
  72. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
  73. package/libs/api/repository/src/lib/gn4/organizations/organizations-from-groups.service.d.ts.map +1 -1
  74. package/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.d.ts.map +1 -1
  75. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +2 -1
  76. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
  77. package/libs/common/domain/src/lib/model/record/organization.model.d.ts +1 -0
  78. package/libs/common/domain/src/lib/model/record/organization.model.d.ts.map +1 -1
  79. package/libs/common/domain/src/lib/platform.service.interface.d.ts +2 -1
  80. package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
  81. package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts +3 -1
  82. package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
  83. package/libs/data-access/gn4/src/openapi/model/user.api.model.d.ts +1 -1
  84. package/libs/feature/catalog/src/index.d.ts +1 -0
  85. package/libs/feature/catalog/src/index.d.ts.map +1 -1
  86. package/libs/feature/catalog/src/lib/feature-catalog.module.d.ts.map +1 -1
  87. package/libs/feature/catalog/src/lib/organisations/organisations.component.d.ts.map +1 -1
  88. package/libs/feature/catalog/src/lib/organization-url.token.d.ts +3 -0
  89. package/libs/feature/catalog/src/lib/organization-url.token.d.ts.map +1 -0
  90. package/libs/feature/catalog/src/lib/records/records.service.d.ts.map +1 -1
  91. package/libs/feature/dataviz/src/lib/feature-dataviz.module.d.ts +2 -1
  92. package/libs/feature/dataviz/src/lib/feature-dataviz.module.d.ts.map +1 -1
  93. package/libs/feature/editor/src/lib/+state/editor.actions.d.ts +1 -0
  94. package/libs/feature/editor/src/lib/+state/editor.actions.d.ts.map +1 -1
  95. package/libs/feature/editor/src/lib/+state/editor.effects.d.ts +1 -1
  96. package/libs/feature/editor/src/lib/+state/editor.effects.d.ts.map +1 -1
  97. package/libs/feature/editor/src/lib/+state/editor.facade.d.ts +1 -0
  98. package/libs/feature/editor/src/lib/+state/editor.facade.d.ts.map +1 -1
  99. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.d.ts +14 -24
  100. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.d.ts.map +1 -1
  101. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.d.ts +6 -6
  102. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.d.ts.map +1 -1
  103. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts +5 -10
  104. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -1
  105. package/libs/feature/editor/src/lib/services/editor.service.d.ts +1 -1
  106. package/libs/feature/editor/src/lib/services/editor.service.d.ts.map +1 -1
  107. package/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.d.ts +4 -1
  108. package/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.d.ts.map +1 -1
  109. package/libs/feature/record/src/lib/data-view-share/data-view-share.component.d.ts +4 -1
  110. package/libs/feature/record/src/lib/data-view-share/data-view-share.component.d.ts.map +1 -1
  111. package/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.d.ts +4 -1
  112. package/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.d.ts.map +1 -1
  113. package/libs/feature/record/src/lib/feature-record.module.d.ts +2 -1
  114. package/libs/feature/record/src/lib/feature-record.module.d.ts.map +1 -1
  115. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  116. package/libs/feature/router/src/lib/default/constants.d.ts +1 -0
  117. package/libs/feature/router/src/lib/default/constants.d.ts.map +1 -1
  118. package/libs/feature/router/src/lib/default/router.config.d.ts +1 -0
  119. package/libs/feature/router/src/lib/default/router.config.d.ts.map +1 -1
  120. package/libs/feature/router/src/lib/default/router.service.d.ts +1 -0
  121. package/libs/feature/router/src/lib/default/router.service.d.ts.map +1 -1
  122. package/libs/feature/router/src/lib/default/state/router.facade.d.ts +1 -0
  123. package/libs/feature/router/src/lib/default/state/router.facade.d.ts.map +1 -1
  124. package/libs/feature/search/src/index.d.ts +1 -1
  125. package/libs/feature/search/src/index.d.ts.map +1 -1
  126. package/libs/feature/search/src/lib/feature-search.module.d.ts +2 -1
  127. package/libs/feature/search/src/lib/feature-search.module.d.ts.map +1 -1
  128. package/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.d.ts.map +1 -1
  129. package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts +25 -0
  130. package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts.map +1 -0
  131. package/libs/feature/search/src/lib/state/search.facade.d.ts +1 -0
  132. package/libs/feature/search/src/lib/state/search.facade.d.ts.map +1 -1
  133. package/libs/feature/search/src/lib/state/selectors.d.ts +1 -0
  134. package/libs/feature/search/src/lib/state/selectors.d.ts.map +1 -1
  135. package/libs/feature/search/src/lib/utils/service/fields.service.d.ts.map +1 -1
  136. package/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.d.ts +2 -2
  137. package/libs/ui/catalog/src/lib/ui-catalog.module.d.ts +2 -1
  138. package/libs/ui/catalog/src/lib/ui-catalog.module.d.ts.map +1 -1
  139. package/libs/ui/dataviz/src/lib/figure/figure.component.d.ts +1 -2
  140. package/libs/ui/dataviz/src/lib/figure/figure.component.d.ts.map +1 -1
  141. package/libs/ui/elements/src/index.d.ts +0 -1
  142. package/libs/ui/elements/src/index.d.ts.map +1 -1
  143. package/libs/ui/elements/src/lib/error/error.component.d.ts +3 -1
  144. package/libs/ui/elements/src/lib/error/error.component.d.ts.map +1 -1
  145. package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts +5 -1
  146. package/libs/ui/elements/src/lib/related-record-card/related-record-card.component.d.ts.map +1 -1
  147. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +19 -19
  148. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  149. package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts +7 -4
  150. package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts.map +1 -1
  151. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +35 -36
  152. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
  153. package/libs/ui/layout/src/index.d.ts +1 -0
  154. package/libs/ui/layout/src/index.d.ts.map +1 -1
  155. package/libs/ui/{elements → layout}/src/lib/max-lines/max-lines.component.d.ts +2 -2
  156. package/libs/ui/layout/src/lib/max-lines/max-lines.component.d.ts.map +1 -0
  157. package/libs/ui/layout/src/lib/ui-layout.module.d.ts.map +1 -1
  158. package/libs/ui/search/src/index.d.ts +1 -0
  159. package/libs/ui/search/src/index.d.ts.map +1 -1
  160. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +30 -0
  161. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -0
  162. package/libs/ui/widgets/src/lib/popup-alert/popup-alert.component.d.ts +1 -1
  163. package/libs/ui/widgets/src/lib/popup-alert/popup-alert.component.d.ts.map +1 -1
  164. package/libs/ui/widgets/src/lib/ui-widgets.module.d.ts +10 -11
  165. package/libs/ui/widgets/src/lib/ui-widgets.module.d.ts.map +1 -1
  166. package/package.json +1 -1
  167. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +21 -8
  168. package/src/libs/api/repository/src/lib/gn4/organizations/organizations-from-groups.service.ts +1 -0
  169. package/src/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.ts +3 -1
  170. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.ts +1 -1
  171. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +26 -15
  172. package/src/libs/common/domain/src/lib/model/record/organization.model.ts +1 -0
  173. package/src/libs/common/domain/src/lib/platform.service.interface.ts +5 -1
  174. package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +4 -1
  175. package/src/libs/common/fixtures/src/lib/organisations.fixture.ts +28 -0
  176. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +8 -0
  177. package/src/libs/data-access/datafeeder/src/openapi/model/datasetMetadata.api.model.ts +4 -0
  178. package/src/libs/data-access/datafeeder/src/openapi/model/datasetUploadStatus.api.model.ts +2 -0
  179. package/src/libs/data-access/gn4/src/openapi/model/user.api.model.ts +1 -1
  180. package/src/libs/feature/catalog/src/index.ts +1 -0
  181. package/src/libs/feature/catalog/src/lib/feature-catalog.module.ts +0 -1
  182. package/src/libs/feature/catalog/src/lib/organisations/organisations.component.html +1 -1
  183. package/src/libs/feature/catalog/src/lib/organisations/organisations.component.ts +2 -2
  184. package/src/libs/feature/catalog/src/lib/organization-url.token.ts +6 -0
  185. package/src/libs/feature/catalog/src/lib/records/records.service.ts +6 -8
  186. package/src/libs/feature/dataviz/src/lib/feature-dataviz.module.ts +2 -1
  187. package/src/libs/feature/editor/src/lib/+state/editor.actions.ts +2 -0
  188. package/src/libs/feature/editor/src/lib/+state/editor.effects.ts +35 -29
  189. package/src/libs/feature/editor/src/lib/+state/editor.facade.ts +1 -0
  190. package/src/libs/feature/editor/src/lib/+state/editor.selectors.ts +1 -1
  191. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.html +2 -3
  192. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.ts +23 -63
  193. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.ts +95 -86
  194. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +2 -22
  195. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +11 -44
  196. package/src/libs/feature/editor/src/lib/fields.config.ts +4 -4
  197. package/src/libs/feature/editor/src/lib/services/editor.service.ts +20 -6
  198. package/src/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.ts +36 -19
  199. package/src/libs/feature/record/src/lib/data-view-share/data-view-share.component.html +6 -2
  200. package/src/libs/feature/record/src/lib/data-view-share/data-view-share.component.ts +11 -0
  201. package/src/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.ts +59 -12
  202. package/src/libs/feature/record/src/lib/feature-record.module.ts +3 -2
  203. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +42 -31
  204. package/src/libs/feature/router/src/lib/default/constants.ts +1 -0
  205. package/src/libs/feature/router/src/lib/default/router.config.ts +1 -0
  206. package/src/libs/feature/router/src/lib/default/router.service.ts +13 -1
  207. package/src/libs/feature/router/src/lib/default/state/router.facade.ts +9 -1
  208. package/src/libs/feature/search/src/index.ts +1 -1
  209. package/src/libs/feature/search/src/lib/feature-search.module.ts +2 -1
  210. package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.ts +2 -2
  211. package/src/libs/feature/search/src/lib/results-table/results-table-container.component.html +9 -0
  212. package/src/libs/feature/search/src/lib/results-table/results-table-container.component.ts +49 -0
  213. package/src/libs/feature/search/src/lib/state/search.facade.ts +5 -0
  214. package/src/libs/feature/search/src/lib/state/selectors.ts +7 -0
  215. package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +16 -2
  216. package/src/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.html +8 -6
  217. package/src/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.ts +2 -2
  218. package/src/libs/ui/catalog/src/lib/ui-catalog.module.ts +2 -0
  219. package/src/libs/ui/dataviz/src/lib/figure/figure.component.html +11 -3
  220. package/src/libs/ui/dataviz/src/lib/figure/figure.component.ts +3 -7
  221. package/src/libs/ui/elements/src/index.ts +0 -1
  222. package/src/libs/ui/elements/src/lib/api-card/api-card.component.html +29 -29
  223. package/src/libs/ui/elements/src/lib/error/error.component.html +30 -6
  224. package/src/libs/ui/elements/src/lib/error/error.component.ts +2 -0
  225. package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.html +1 -1
  226. package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.ts +22 -1
  227. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +2 -4
  228. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.css +0 -1
  229. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html +23 -19
  230. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +79 -27
  231. package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.css +31 -0
  232. package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.html +15 -0
  233. package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.ts +38 -0
  234. package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +0 -3
  235. package/src/libs/ui/layout/src/index.ts +1 -0
  236. package/src/libs/ui/{elements → layout}/src/lib/max-lines/max-lines.component.html +1 -0
  237. package/src/libs/ui/{elements → layout}/src/lib/max-lines/max-lines.component.ts +9 -5
  238. package/src/libs/ui/layout/src/lib/ui-layout.module.ts +0 -1
  239. package/src/libs/ui/search/src/index.ts +1 -0
  240. package/src/libs/ui/search/src/lib/results-table/results-table.component.css +0 -0
  241. package/src/libs/{feature → ui}/search/src/lib/results-table/results-table.component.html +8 -8
  242. package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +138 -0
  243. package/src/libs/ui/widgets/src/lib/popup-alert/popup-alert.component.ts +4 -0
  244. package/src/libs/ui/widgets/src/lib/ui-widgets.module.ts +0 -3
  245. package/translations/de.json +66 -34
  246. package/translations/en.json +37 -5
  247. package/translations/es.json +37 -5
  248. package/translations/fr.json +38 -6
  249. package/translations/it.json +37 -5
  250. package/translations/nl.json +37 -5
  251. package/translations/pt.json +37 -5
  252. package/translations/sk.json +38 -6
  253. package/esm2022/libs/feature/search/src/lib/results-table/results-table.component.mjs +0 -136
  254. package/esm2022/libs/ui/elements/src/lib/max-lines/max-lines.component.mjs +0 -69
  255. package/libs/feature/search/src/lib/results-table/results-table.component.d.ts +0 -36
  256. package/libs/feature/search/src/lib/results-table/results-table.component.d.ts.map +0 -1
  257. package/libs/ui/elements/src/lib/max-lines/max-lines.component.d.ts.map +0 -1
  258. package/src/libs/feature/search/src/lib/results-table/results-table.component.ts +0 -171
  259. /package/src/libs/feature/search/src/lib/results-table/{results-table.component.css → results-table-container.component.css} +0 -0
  260. /package/src/libs/ui/{elements → layout}/src/lib/max-lines/max-lines.component.css +0 -0
@@ -3,19 +3,18 @@ import * as i1 from "./color-scale/color-scale.component";
3
3
  import * as i2 from "./progress-bar/progress-bar.component";
4
4
  import * as i3 from "./step-bar/step-bar.component";
5
5
  import * as i4 from "./loading-mask/loading-mask.component";
6
- import * as i5 from "./popup-alert/popup-alert.component";
7
- import * as i6 from "./spinning-loader/spinning-loader.component";
8
- import * as i7 from "@angular/common";
9
- import * as i8 from "@ngx-translate/core";
10
- import * as i9 from "ngx-dropzone";
11
- import * as i10 from "@angular/forms";
12
- import * as i11 from "ngx-chips";
13
- import * as i12 from "../../../../util/shared/src/lib/util-shared.module";
14
- import * as i13 from "@angular/material/progress-spinner";
15
- import * as i14 from "@angular/material/icon";
6
+ import * as i5 from "./spinning-loader/spinning-loader.component";
7
+ import * as i6 from "@angular/common";
8
+ import * as i7 from "@ngx-translate/core";
9
+ import * as i8 from "ngx-dropzone";
10
+ import * as i9 from "@angular/forms";
11
+ import * as i10 from "ngx-chips";
12
+ import * as i11 from "../../../../util/shared/src/lib/util-shared.module";
13
+ import * as i12 from "@angular/material/progress-spinner";
14
+ import * as i13 from "@angular/material/icon";
16
15
  export declare class UiWidgetsModule {
17
16
  static ɵfac: i0.ɵɵFactoryDeclaration<UiWidgetsModule, never>;
18
- static ɵmod: i0.ɵɵNgModuleDeclaration<UiWidgetsModule, [typeof i1.ColorScaleComponent, typeof i2.ProgressBarComponent, typeof i3.StepBarComponent, typeof i4.LoadingMaskComponent, typeof i5.PopupAlertComponent, typeof i6.SpinningLoaderComponent], [typeof i7.CommonModule, typeof i8.TranslateModule, typeof i9.NgxDropzoneModule, typeof i10.FormsModule, typeof i10.ReactiveFormsModule, typeof i11.TagInputModule, typeof i12.UtilSharedModule, typeof i13.MatProgressSpinnerModule, typeof i14.MatIconModule], [typeof i2.ProgressBarComponent, typeof i3.StepBarComponent, typeof i4.LoadingMaskComponent, typeof i5.PopupAlertComponent, typeof i6.SpinningLoaderComponent]>;
17
+ static ɵmod: i0.ɵɵNgModuleDeclaration<UiWidgetsModule, [typeof i1.ColorScaleComponent, typeof i2.ProgressBarComponent, typeof i3.StepBarComponent, typeof i4.LoadingMaskComponent, typeof i5.SpinningLoaderComponent], [typeof i6.CommonModule, typeof i7.TranslateModule, typeof i8.NgxDropzoneModule, typeof i9.FormsModule, typeof i9.ReactiveFormsModule, typeof i10.TagInputModule, typeof i11.UtilSharedModule, typeof i12.MatProgressSpinnerModule, typeof i13.MatIconModule], [typeof i2.ProgressBarComponent, typeof i3.StepBarComponent, typeof i4.LoadingMaskComponent, typeof i5.SpinningLoaderComponent]>;
19
18
  static ɵinj: i0.ɵɵInjectorDeclaration<UiWidgetsModule>;
20
19
  }
21
20
  //# sourceMappingURL=ui-widgets.module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ui-widgets.module.d.ts","sourceRoot":"","sources":["../../../../../src/libs/ui/widgets/src/lib/ui-widgets.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAgBA,qBA4Ba,eAAe;yCAAf,eAAe;0CAAf,eAAe;0CAAf,eAAe;CAAG"}
1
+ {"version":3,"file":"ui-widgets.module.d.ts","sourceRoot":"","sources":["../../../../../src/libs/ui/widgets/src/lib/ui-widgets.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAeA,qBA0Ba,eAAe;yCAAf,eAAe;0CAAf,eAAe;0CAAf,eAAe;CAAG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geonetwork-ui",
3
- "version": "2.4.0-dev.656babc7",
3
+ "version": "2.4.0-dev.71a43b38",
4
4
  "engines": {
5
5
  "node": ">=14.17.0"
6
6
  },
@@ -265,14 +265,13 @@ export class Gn4Repository implements RecordsRepositoryInterface {
265
265
  undefined,
266
266
  recordXml
267
267
  )
268
- .pipe(map(() => recordXml))
269
- ),
270
- tap(() => {
271
- // if saving was successful, the associated draft can be discarded
272
- window.localStorage.removeItem(
273
- this.getLocalStorageKeyForRecord(record.uniqueIdentifier)
274
- )
275
- })
268
+ .pipe(
269
+ map((response) => {
270
+ const metadataId = Object.keys(response.metadataInfos)[0]
271
+ return response.metadataInfos[metadataId][0].uuid
272
+ })
273
+ )
274
+ )
276
275
  )
277
276
  }
278
277
 
@@ -303,4 +302,18 @@ export class Gn4Repository implements RecordsRepositoryInterface {
303
302
  ) !== null
304
303
  )
305
304
  }
305
+
306
+ // generated by copilot
307
+ getAllDrafts(): Observable<CatalogRecord[]> {
308
+ const items = { ...window.localStorage }
309
+ const drafts = Object.keys(items)
310
+ .filter((key) => key.startsWith('geonetwork-ui-draft-'))
311
+ .map((key) => window.localStorage.getItem(key))
312
+ .filter((draft) => draft !== null)
313
+ return from(
314
+ Promise.all(
315
+ drafts.map((draft) => findConverterForDocument(draft).readRecord(draft))
316
+ )
317
+ )
318
+ }
306
319
  }
@@ -76,6 +76,7 @@ export class OrganizationsFromGroupsService
76
76
  return {
77
77
  name: group.label[lang3],
78
78
  ...(group.description && { description: group.description }),
79
+ ...(group.email && { email: group.email }),
79
80
  ...(group.logo && {
80
81
  logoUrl: getAsUrl(`${IMAGE_URL}${group.logo}`),
81
82
  }),
@@ -230,10 +230,12 @@ export class OrganizationsFromMetadataService
230
230
  if (!group) return fullOrg
231
231
  return {
232
232
  ...fullOrg,
233
+ email: emails[0],
233
234
  ...(group.description && { description: group.description }),
234
235
  ...(group.logo && { logoUrl: getAsUrl(`${IMAGE_URL}${group.logo}`) }),
235
236
  ...(group.website && { website: getAsUrl(group.website) }),
236
- }
237
+ ...(group.email && { email: group.email }),
238
+ } as Organization
237
239
  })
238
240
  }
239
241
 
@@ -45,7 +45,7 @@ export class Gn4PlatformMapper {
45
45
  const {
46
46
  enabled,
47
47
  emailAddresses,
48
- organisation,
48
+ organization,
49
49
  kind,
50
50
  lastLoginDate,
51
51
  accountNonExpired,
@@ -5,7 +5,6 @@ import {
5
5
  MeApiService,
6
6
  RegistriesApiService,
7
7
  SiteApiService,
8
- ThesaurusInfoApiModel,
9
8
  ToolsApiService,
10
9
  UserfeedbackApiService,
11
10
  UsersApiService,
@@ -25,6 +24,7 @@ import {
25
24
  KeywordApiResponse,
26
25
  ThesaurusApiResponse,
27
26
  } from '../../../../../../../libs/api/metadata-converter/src'
27
+ import { KeywordType } from '../../../../../../../libs/common/domain/src/lib/model/thesaurus'
28
28
 
29
29
  const minApiVersion = '4.2.2'
30
30
 
@@ -146,25 +146,36 @@ export class Gn4PlatformService implements PlatformServiceInterface {
146
146
  )
147
147
  .pipe(
148
148
  map((thesaurus) => {
149
- // FIXME: find a better way to exclude place keywords
150
- // thesaurus[0].filter((thes) => thes.dname !== 'place')
151
149
  return thesaurus[0] as ThesaurusApiResponse[]
152
150
  }),
153
151
  shareReplay(1)
154
152
  )
155
153
 
156
- searchKeywords(query: string): Observable<Keyword[]> {
157
- const keywords$: Observable<KeywordApiResponse[]> =
158
- this.registriesApiService.searchKeywords(
159
- query,
160
- this.langService.iso3,
161
- 10,
162
- 0,
163
- null,
164
- null,
165
- null,
166
- `*${query}*`
167
- ) as Observable<KeywordApiResponse[]>
154
+ searchKeywords(
155
+ query: string,
156
+ keywordTypes: KeywordType[]
157
+ ): Observable<Keyword[]> {
158
+ const keywords$: Observable<KeywordApiResponse[]> = this.allThesaurus$.pipe(
159
+ switchMap((thesaurus) => {
160
+ const selectedThesauri = []
161
+ keywordTypes.map((keywordType) => {
162
+ selectedThesauri.push(
163
+ ...thesaurus.filter((thes) => thes.dname === keywordType)
164
+ )
165
+ })
166
+
167
+ return this.registriesApiService.searchKeywords(
168
+ query,
169
+ this.langService.iso3,
170
+ 10,
171
+ 0,
172
+ null,
173
+ selectedThesauri.map((thes) => thes.key),
174
+ null,
175
+ `*${query}*`
176
+ ) as Observable<KeywordApiResponse[]>
177
+ })
178
+ )
168
179
 
169
180
  return combineLatest([keywords$, this.allThesaurus$]).pipe(
170
181
  map(([keywords, thesaurus]) => {
@@ -1,5 +1,6 @@
1
1
  export interface Organization {
2
2
  name: string
3
+ email?: string
3
4
  description?: string
4
5
  website?: URL
5
6
  logoUrl?: URL
@@ -2,6 +2,7 @@ import type { Observable } from 'rxjs'
2
2
  import type { UserModel } from './model/user/user.model'
3
3
  import type { Organization } from './model/record/organization.model'
4
4
  import { Keyword, UserFeedback } from './model/record'
5
+ import { KeywordType } from './model/thesaurus'
5
6
 
6
7
  export abstract class PlatformServiceInterface {
7
8
  abstract getType(): string
@@ -15,7 +16,10 @@ export abstract class PlatformServiceInterface {
15
16
  ): Observable<UserModel[]>
16
17
  abstract getOrganizations(): Observable<Organization[]>
17
18
  abstract translateKey(key: string): Observable<string>
18
- abstract searchKeywords(query: string): Observable<Keyword[]>
19
+ abstract searchKeywords(
20
+ query: string,
21
+ keywordTypes: KeywordType[]
22
+ ): Observable<Keyword[]>
19
23
  abstract getKeywordsByUri(uri: string): Observable<Keyword[]>
20
24
  abstract getUserFeedbacks(recordUuid: string): Observable<UserFeedback[]>
21
25
  abstract postUserFeedbacks(recordUuid: UserFeedback): Observable<void>
@@ -33,7 +33,7 @@ export abstract class RecordsRepositoryInterface {
33
33
  /**
34
34
  * @param record
35
35
  * @param referenceRecordSource
36
- * @returns Observable<string> Returns the source of the record as it was serialized when saved
36
+ * @returns Observable<string> Returns the unique identifier of the record as it was when saved
37
37
  */
38
38
  abstract saveRecord(
39
39
  record: CatalogRecord,
@@ -52,4 +52,7 @@ export abstract class RecordsRepositoryInterface {
52
52
 
53
53
  abstract clearRecordDraft(uniqueIdentifier: string): void
54
54
  abstract recordHasDraft(uniqueIdentifier: string): boolean
55
+
56
+ /** will return all pending drafts, both published and not published */
57
+ abstract getAllDrafts(): Observable<CatalogRecord[]>
55
58
  }
@@ -5,84 +5,112 @@ export const ORGANISATIONS_FIXTURE: Organization[] = deepFreeze([
5
5
  {
6
6
  name: 'I Data Org',
7
7
  description: 'one org for testing',
8
+ email: 'test@gmail.com',
9
+ website: new URL('https://my-geonetwork.org/'),
8
10
  logoUrl: new URL('https://my-geonetwork.org/logo1.png'),
9
11
  recordCount: 12,
10
12
  },
11
13
  {
12
14
  name: 'H Data Org',
13
15
  description: 'another org for testing',
16
+ email: 'test@gmail.com',
17
+ website: new URL('https://my-geonetwork.org/'),
14
18
  logoUrl: new URL('https://my-geonetwork.org/logo2.png'),
15
19
  recordCount: 15,
16
20
  },
17
21
  {
18
22
  name: 'J Data Org',
19
23
  description: 'another org for testing',
24
+ email: 'test@gmail.com',
25
+ website: new URL('https://my-geonetwork.org/'),
20
26
  logoUrl: new URL('https://my-geonetwork.org/logo3.png'),
21
27
  recordCount: 6,
22
28
  },
23
29
  {
24
30
  name: 'G Data Org',
25
31
  description: 'another org for testing',
32
+ email: 'test@gmail.com',
33
+ website: new URL('https://my-geonetwork.org/'),
26
34
  logoUrl: new URL('https://my-geonetwork.org/logo4.png'),
27
35
  recordCount: 8,
28
36
  },
29
37
  {
30
38
  name: 'B Data Org',
31
39
  description: 'another org for testing',
40
+ email: 'test@gmail.com',
41
+ website: new URL('https://my-geonetwork.org/'),
32
42
  logoUrl: new URL('https://my-geonetwork.org/logo5.png'),
33
43
  recordCount: 2,
34
44
  },
35
45
  {
36
46
  name: 'D Data Org',
37
47
  description: 'another org for testing',
48
+ email: 'test@gmail.com',
49
+ website: new URL('https://my-geonetwork.org/'),
38
50
  logoUrl: new URL('https://my-geonetwork.org/logo6.png'),
39
51
  recordCount: 17,
40
52
  },
41
53
  {
42
54
  name: 'F Data Org',
43
55
  description: 'another org for testing',
56
+ email: 'test@gmail.com',
57
+ website: new URL('https://my-geonetwork.org/'),
44
58
  logoUrl: new URL('https://my-geonetwork.org/logo7.png'),
45
59
  recordCount: 14,
46
60
  },
47
61
  {
48
62
  name: 'A Data Org',
49
63
  description: 'another org for testing',
64
+ email: 'test@gmail.com',
65
+ website: new URL('https://my-geonetwork.org/'),
50
66
  logoUrl: new URL('https://my-geonetwork.org/logo8.png'),
51
67
  recordCount: 3,
52
68
  },
53
69
  {
54
70
  name: 'C Data Org',
55
71
  description: 'another org for testing',
72
+ email: 'test@gmail.com',
73
+ website: new URL('https://my-geonetwork.org/'),
56
74
  logoUrl: new URL('https://my-geonetwork.org/logo9.png'),
57
75
  recordCount: 9,
58
76
  },
59
77
  {
60
78
  name: 'E Data Org',
61
79
  description: 'another org for testing',
80
+ email: 'test@gmail.com',
81
+ website: new URL('https://my-geonetwork.org/'),
62
82
  logoUrl: new URL('https://my-geonetwork.org/logo10.png'),
63
83
  recordCount: 1,
64
84
  },
65
85
  {
66
86
  name: 'é Data Org',
67
87
  description: 'another org for testing',
88
+ email: 'test@gmail.com',
89
+ website: new URL('https://my-geonetwork.org/'),
68
90
  logoUrl: new URL('https://my-geonetwork.org/logo10.png'),
69
91
  recordCount: 2,
70
92
  },
71
93
  {
72
94
  name: 'wizard-org',
73
95
  description: 'another org for testing',
96
+ email: 'test@gmail.com',
97
+ website: new URL('https://my-geonetwork.org/'),
74
98
  logoUrl: new URL('https://my-geonetwork.org/logo11.png'),
75
99
  recordCount: 2,
76
100
  },
77
101
  {
78
102
  name: "Université de l'Ingénierie",
79
103
  description: 'another org for testing',
104
+ email: 'test@gmail.com',
105
+ website: new URL('https://my-geonetwork.org/'),
80
106
  logoUrl: new URL('https://my-geonetwork.org/logo12.png'),
81
107
  recordCount: 2,
82
108
  },
83
109
  {
84
110
  name: 'ARS / Agence régionale de santé',
85
111
  description: 'another org for testing',
112
+ email: 'test@gmail.com',
113
+ website: new URL('https://my-geonetwork.org/'),
86
114
  logoUrl: new URL('https://my-geonetwork.org/logo12.png'),
87
115
  recordCount: 2,
88
116
  },
@@ -233,6 +233,14 @@ Malgré l'attention portée à la création de ces données, il est rappelé que
233
233
  description: 'Téléchargement du fichier',
234
234
  mimeType: 'x-gis/x-shapefile',
235
235
  },
236
+ {
237
+ type: 'service',
238
+ url: new URL('https://my-org.net/ogc'),
239
+ accessServiceProtocol: 'ogcFeatures',
240
+ name: 'ogcFeaturesSecondRecord',
241
+ description: 'This OGC service is the second part of the download',
242
+ identifierInService: 'my:featuretype',
243
+ },
236
244
  ],
237
245
  lineage: `Document d’urbanisme numérisé conformément aux prescriptions nationales du CNIG par le Service d'Information Géographique de l'Agglomération de la Région de Compiègne.
238
246
  Ce lot de données produit en 2019, a été numérisé à partir du PCI Vecteur de 2019 et contrôlé par le Service d'Information Géographique de l'Agglomération de la Région de Compiègne.`,
@@ -38,4 +38,8 @@ export interface DatasetMetadataApiModel {
38
38
  * textual description of dataset lineage
39
39
  */
40
40
  creationProcessDescription?: string
41
+ /**
42
+ * Optional, additional options for the dataset
43
+ */
44
+ options: any
41
45
  }
@@ -34,4 +34,6 @@ export interface DatasetUploadStatusApiModel {
34
34
  * detected charset
35
35
  */
36
36
  encoding?: string
37
+ format?: 'CSV' | 'SHAPEFILE'
38
+ options?: any
37
39
  }
@@ -21,7 +21,7 @@ export interface UserApiModel {
21
21
  emailAddresses?: Set<string>
22
22
  addresses?: Set<AddressApiModel>
23
23
  primaryAddress?: AddressApiModel
24
- organisation?: string
24
+ organization?: string
25
25
  kind?: string
26
26
  lastLoginDate?: string
27
27
  authorities?: Array<GrantedAuthorityApiModel>
@@ -1,4 +1,5 @@
1
1
  export * from './lib/feature-catalog.module'
2
+ export * from './lib/organization-url.token'
2
3
  export * from './lib/sources/sources.service'
3
4
  export * from './lib/sources/sources.model'
4
5
  export * from './lib/records/records.service'
@@ -4,7 +4,6 @@ import { UiCatalogModule } from '../../../../../libs/ui/catalog/src'
4
4
  import {
5
5
  GroupsApiService,
6
6
  SearchApiService,
7
- SiteApiService,
8
7
  } from '../../../../../libs/data-access/gn4/src'
9
8
  import { CommonModule } from '@angular/common'
10
9
  import { SourceLabelComponent } from './source-label/source-label.component'
@@ -19,7 +19,7 @@
19
19
  [showContent]="!!organisation.name"
20
20
  >
21
21
  <gn-ui-organisation-preview
22
- [organisation]="organisation"
22
+ [organization]="organisation"
23
23
  [organisationUrl]="getOrganisationUrl(organisation)"
24
24
  (clickedOrganisation)="orgSelect.emit($event)"
25
25
  ></gn-ui-organisation-preview>
@@ -10,10 +10,10 @@ import {
10
10
  import { Organization } from '../../../../../../libs/common/domain/src/lib/model/record'
11
11
  import { BehaviorSubject, combineLatest, Observable } from 'rxjs'
12
12
  import { map, startWith, tap } from 'rxjs/operators'
13
- import { ORGANIZATION_URL_TOKEN } from '../feature-catalog.module'
14
13
  import { OrganizationsServiceInterface } from '../../../../../../libs/common/domain/src/lib/organizations.service.interface'
15
14
  import { SortByField } from '../../../../../../libs/common/domain/src/lib/model/search'
16
15
  import { createFuzzyFilter } from '../../../../../../libs/util/shared/src'
16
+ import { ORGANIZATION_PAGE_URL_TOKEN } from '../organization-url.token'
17
17
 
18
18
  @Component({
19
19
  selector: 'gn-ui-organisations',
@@ -28,7 +28,7 @@ export class OrganisationsComponent {
28
28
  constructor(
29
29
  private organisationsService: OrganizationsServiceInterface,
30
30
  @Optional()
31
- @Inject(ORGANIZATION_URL_TOKEN)
31
+ @Inject(ORGANIZATION_PAGE_URL_TOKEN)
32
32
  private urlTemplate: string
33
33
  ) {}
34
34
 
@@ -0,0 +1,6 @@
1
+ import { InjectionToken } from '@angular/core'
2
+
3
+ // expects the replacement key ${name}
4
+ export const ORGANIZATION_PAGE_URL_TOKEN = new InjectionToken<string>(
5
+ 'organization-page-url-token'
6
+ )
@@ -1,18 +1,16 @@
1
1
  import { Injectable } from '@angular/core'
2
- import { Observable, of } from 'rxjs'
3
- import { catchError, shareReplay } from 'rxjs/operators'
2
+ import { Observable, of, switchMap } from 'rxjs'
3
+ import { shareReplay } from 'rxjs/operators'
4
4
  import { RecordsRepositoryInterface } from '../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
5
5
 
6
6
  @Injectable({
7
7
  providedIn: 'root',
8
8
  })
9
9
  export class RecordsService {
10
- recordsCount$: Observable<number> = this.recordsRepository
11
- .getMatchesCount({})
12
- .pipe(
13
- shareReplay(1),
14
- catchError(() => of(0))
15
- )
10
+ recordsCount$: Observable<number> = of(true).pipe(
11
+ switchMap(() => this.recordsRepository.getMatchesCount({})),
12
+ shareReplay(1)
13
+ )
16
14
 
17
15
  constructor(private recordsRepository: RecordsRepositoryInterface) {}
18
16
  }
@@ -12,7 +12,7 @@ import {
12
12
  import { TableViewComponent } from './table-view/table-view.component'
13
13
  import { ChartViewComponent } from './chart-view/chart-view.component'
14
14
  import { TranslateModule } from '@ngx-translate/core'
15
- import { UiWidgetsModule } from '../../../../../libs/ui/widgets/src'
15
+ import { PopupAlertComponent, UiWidgetsModule } from '../../../../../libs/ui/widgets/src'
16
16
  import { UiInputsModule } from '../../../../../libs/ui/inputs/src'
17
17
 
18
18
  @NgModule({
@@ -26,6 +26,7 @@ import { UiInputsModule } from '../../../../../libs/ui/inputs/src'
26
26
  TranslateModule,
27
27
  ChartComponent,
28
28
  UiInputsModule,
29
+ PopupAlertComponent,
29
30
  ],
30
31
  declarations: [
31
32
  GeoTableViewComponent,
@@ -26,3 +26,5 @@ export const saveRecordFailure = createAction(
26
26
  '[Editor] Save record failure',
27
27
  props<{ error: SaveRecordError }>()
28
28
  )
29
+
30
+ export const draftSaveSuccess = createAction('[Editor] Draft save success')
@@ -5,7 +5,11 @@ import { catchError, map, switchMap } from 'rxjs/operators'
5
5
  import * as EditorActions from './editor.actions'
6
6
  import { EditorService } from '../services/editor.service'
7
7
  import { Store } from '@ngrx/store'
8
- import { selectRecord, selectRecordFieldsConfig } from './editor.selectors'
8
+ import {
9
+ selectRecord,
10
+ selectRecordAlreadySavedOnce,
11
+ selectRecordFieldsConfig,
12
+ } from './editor.selectors'
9
13
  import { RecordsRepositoryInterface } from '../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
10
14
 
11
15
  @Injectable()
@@ -20,28 +24,31 @@ export class EditorEffects {
20
24
  ofType(EditorActions.saveRecord),
21
25
  withLatestFrom(
22
26
  this.store.select(selectRecord),
23
- this.store.select(selectRecordFieldsConfig)
27
+ this.store.select(selectRecordFieldsConfig),
28
+ this.store.select(selectRecordAlreadySavedOnce)
24
29
  ),
25
- switchMap(([, record, fieldsConfig]) =>
26
- this.editorService.saveRecord(record, fieldsConfig).pipe(
27
- switchMap(([record, recordSource]) =>
28
- of(
29
- EditorActions.saveRecordSuccess(),
30
- EditorActions.openRecord({
31
- record,
32
- alreadySavedOnce: true,
33
- recordSource,
34
- })
35
- )
36
- ),
37
- catchError((error) =>
38
- of(
39
- EditorActions.saveRecordFailure({
40
- error: error.message,
41
- })
30
+ switchMap(([, record, fieldsConfig, alreadySavedOnce]) =>
31
+ this.editorService
32
+ .saveRecord(record, fieldsConfig, !alreadySavedOnce)
33
+ .pipe(
34
+ switchMap(([record, recordSource]) =>
35
+ of(
36
+ EditorActions.saveRecordSuccess(),
37
+ EditorActions.openRecord({
38
+ record,
39
+ alreadySavedOnce: true,
40
+ recordSource,
41
+ })
42
+ )
43
+ ),
44
+ catchError((error) =>
45
+ of(
46
+ EditorActions.saveRecordFailure({
47
+ error: error.message,
48
+ })
49
+ )
42
50
  )
43
51
  )
44
- )
45
52
  )
46
53
  )
47
54
  )
@@ -53,15 +60,14 @@ export class EditorEffects {
53
60
  )
54
61
  )
55
62
 
56
- saveRecordDraft$ = createEffect(
57
- () =>
58
- this.actions$.pipe(
59
- ofType(EditorActions.updateRecordField),
60
- debounceTime(1000),
61
- withLatestFrom(this.store.select(selectRecord)),
62
- switchMap(([, record]) => this.editorService.saveRecordAsDraft(record))
63
- ),
64
- { dispatch: false }
63
+ saveRecordDraft$ = createEffect(() =>
64
+ this.actions$.pipe(
65
+ ofType(EditorActions.updateRecordField),
66
+ debounceTime(1000),
67
+ withLatestFrom(this.store.select(selectRecord)),
68
+ switchMap(([, record]) => this.editorService.saveRecordAsDraft(record)),
69
+ map(() => EditorActions.draftSaveSuccess())
70
+ )
65
71
  )
66
72
 
67
73
  checkHasChangesOnOpen$ = createEffect(() =>
@@ -26,6 +26,7 @@ export class EditorFacade {
26
26
  select(EditorSelectors.selectRecordChangedSinceSave)
27
27
  )
28
28
  recordFields$ = this.store.pipe(select(EditorSelectors.selectRecordFields))
29
+ draftSaveSuccess$ = this.actions$.pipe(ofType(EditorActions.draftSaveSuccess))
29
30
 
30
31
  openRecord(
31
32
  record: CatalogRecord,
@@ -44,6 +44,6 @@ export const selectRecordFields = createSelector(
44
44
  (state: EditorState) =>
45
45
  state.fieldsConfig.map((fieldConfig) => ({
46
46
  config: fieldConfig,
47
- value: state.record?.[fieldConfig.model] || null,
47
+ value: state.record?.[fieldConfig.model] ?? null,
48
48
  }))
49
49
  )
@@ -4,10 +4,9 @@
4
4
  [displayWithFn]="displayWithFn"
5
5
  [action]="autoCompleteAction"
6
6
  (itemSelected)="handleItemSelection($event)"
7
- (inputSubmitted)="handleInputSubmission($event)"
8
- (inputCleared)="handleInputCleared()"
9
- [value]="searchInputValue$ | async"
10
7
  [clearOnSelection]="true"
8
+ [minCharacterCount]="0"
9
+ [allowSubmit]="false"
11
10
  ></gn-ui-autocomplete>
12
11
  <div class="flex gap-2 flex-wrap">
13
12
  <gn-ui-badge