geonetwork-ui 2.5.0-dev.50bf7a85a → 2.5.0-dev.5ea8dba3f

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 (205) hide show
  1. package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +11 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.mjs +1 -1
  3. package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +20 -17
  4. package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +22 -2
  5. package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
  6. package/esm2022/libs/common/domain/src/lib/repository/records-repository.interface.mjs +1 -1
  7. package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +7 -4
  8. package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +8 -8
  9. package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +7 -4
  10. package/esm2022/libs/feature/editor/src/lib/components/constraint-card/constraint-card.component.mjs +3 -3
  11. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.mjs +2 -1
  12. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.mjs +2 -2
  13. package/esm2022/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.mjs +7 -23
  14. package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +2 -2
  15. package/esm2022/libs/feature/editor/src/lib/models/wizard-field.type.mjs +3 -4
  16. package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +4 -3
  17. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +3 -2
  18. package/esm2022/libs/feature/record/src/lib/state/mdview.actions.mjs +4 -1
  19. package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +7 -2
  20. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +9 -1
  21. package/esm2022/libs/feature/record/src/lib/state/mdview.reducer.mjs +19 -1
  22. package/esm2022/libs/feature/record/src/lib/state/mdview.selectors.mjs +6 -1
  23. package/esm2022/libs/feature/search/src/lib/results-table/results-table-container.component.mjs +1 -1
  24. package/esm2022/libs/ui/elements/src/lib/application-banner/application-banner.component.mjs +3 -3
  25. package/esm2022/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.mjs +3 -3
  26. package/esm2022/libs/ui/inputs/src/index.mjs +1 -2
  27. package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +1 -6
  28. package/esm2022/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.mjs +14 -4
  29. package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +10 -3
  30. package/esm2022/libs/ui/widgets/src/index.mjs +1 -2
  31. package/esm2022/libs/ui/widgets/src/lib/ui-widgets.module.mjs +5 -6
  32. package/esm2022/libs/util/data-fetcher/src/lib/data-fetcher.mjs +5 -4
  33. package/esm2022/libs/util/data-fetcher/src/lib/readers/base-cache.mjs +12 -0
  34. package/esm2022/libs/util/data-fetcher/src/lib/readers/base-file.mjs +3 -3
  35. package/esm2022/libs/util/data-fetcher/src/lib/readers/base.mjs +1 -1
  36. package/esm2022/libs/util/data-fetcher/src/lib/readers/csv.mjs +2 -2
  37. package/esm2022/libs/util/data-fetcher/src/lib/readers/excel.mjs +2 -2
  38. package/esm2022/libs/util/data-fetcher/src/lib/readers/geojson.mjs +2 -2
  39. package/esm2022/libs/util/data-fetcher/src/lib/readers/gml.mjs +5 -3
  40. package/esm2022/libs/util/data-fetcher/src/lib/readers/json.mjs +2 -2
  41. package/esm2022/libs/util/data-fetcher/src/lib/readers/wfs.mjs +19 -11
  42. package/esm2022/libs/util/data-fetcher/src/lib/utils.mjs +9 -7
  43. package/esm2022/translations/de.json +3 -75
  44. package/esm2022/translations/en.json +3 -75
  45. package/esm2022/translations/es.json +3 -75
  46. package/esm2022/translations/fr.json +15 -87
  47. package/esm2022/translations/it.json +20 -91
  48. package/esm2022/translations/nl.json +3 -75
  49. package/esm2022/translations/pt.json +3 -75
  50. package/fesm2022/geonetwork-ui.mjs +315 -833
  51. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  52. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  53. package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts +3 -0
  54. package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts.map +1 -1
  55. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts +1 -0
  56. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
  57. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +2 -1
  58. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
  59. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +6 -0
  60. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
  61. package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts +2 -1
  62. package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
  63. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +2 -1
  64. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
  65. package/libs/feature/dataviz/src/lib/service/data.service.d.ts +2 -2
  66. package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
  67. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +2 -1
  68. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
  69. 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
  70. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts.map +1 -1
  71. package/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.d.ts +1 -3
  72. package/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.d.ts.map +1 -1
  73. package/libs/feature/editor/src/lib/models/wizard-field.type.d.ts +2 -3
  74. package/libs/feature/editor/src/lib/models/wizard-field.type.d.ts.map +1 -1
  75. package/libs/feature/record/src/lib/data-view/data-view.component.d.ts +1 -0
  76. package/libs/feature/record/src/lib/data-view/data-view.component.d.ts.map +1 -1
  77. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
  78. package/libs/feature/record/src/lib/state/mdview.actions.d.ts +16 -1
  79. package/libs/feature/record/src/lib/state/mdview.actions.d.ts.map +1 -1
  80. package/libs/feature/record/src/lib/state/mdview.effects.d.ts +5 -0
  81. package/libs/feature/record/src/lib/state/mdview.effects.d.ts.map +1 -1
  82. package/libs/feature/record/src/lib/state/mdview.facade.d.ts +2 -0
  83. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  84. package/libs/feature/record/src/lib/state/mdview.reducer.d.ts +4 -1
  85. package/libs/feature/record/src/lib/state/mdview.reducer.d.ts.map +1 -1
  86. package/libs/feature/record/src/lib/state/mdview.selectors.d.ts +2 -0
  87. package/libs/feature/record/src/lib/state/mdview.selectors.d.ts.map +1 -1
  88. package/libs/ui/inputs/src/index.d.ts +0 -1
  89. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  90. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +27 -28
  91. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
  92. package/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.d.ts +4 -2
  93. package/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.d.ts.map +1 -1
  94. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +3 -1
  95. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
  96. package/libs/ui/widgets/src/index.d.ts +0 -1
  97. package/libs/ui/widgets/src/index.d.ts.map +1 -1
  98. package/libs/ui/widgets/src/lib/ui-widgets.module.d.ts +8 -9
  99. package/libs/ui/widgets/src/lib/ui-widgets.module.d.ts.map +1 -1
  100. package/libs/util/data-fetcher/src/lib/data-fetcher.d.ts +2 -2
  101. package/libs/util/data-fetcher/src/lib/data-fetcher.d.ts.map +1 -1
  102. package/libs/util/data-fetcher/src/lib/readers/base-cache.d.ts +8 -0
  103. package/libs/util/data-fetcher/src/lib/readers/base-cache.d.ts.map +1 -0
  104. package/libs/util/data-fetcher/src/lib/readers/base-file.d.ts +2 -2
  105. package/libs/util/data-fetcher/src/lib/readers/base-file.d.ts.map +1 -1
  106. package/libs/util/data-fetcher/src/lib/readers/base.d.ts +2 -2
  107. package/libs/util/data-fetcher/src/lib/readers/base.d.ts.map +1 -1
  108. package/libs/util/data-fetcher/src/lib/readers/gml.d.ts +5 -3
  109. package/libs/util/data-fetcher/src/lib/readers/gml.d.ts.map +1 -1
  110. package/libs/util/data-fetcher/src/lib/readers/wfs.d.ts +7 -4
  111. package/libs/util/data-fetcher/src/lib/readers/wfs.d.ts.map +1 -1
  112. package/libs/util/data-fetcher/src/lib/utils.d.ts +2 -2
  113. package/libs/util/data-fetcher/src/lib/utils.d.ts.map +1 -1
  114. package/package.json +1 -1
  115. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +25 -0
  116. package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +4 -0
  117. package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +22 -16
  118. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +41 -2
  119. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +3 -1
  120. package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +4 -1
  121. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +75 -0
  122. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +4 -1
  123. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +22 -9
  124. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +2 -1
  125. package/src/libs/feature/editor/src/lib/components/constraint-card/constraint-card.component.html +1 -1
  126. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.ts +1 -0
  127. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.ts +1 -1
  128. package/src/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.html +0 -13
  129. package/src/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.ts +0 -20
  130. package/src/libs/feature/editor/src/lib/fields.config.ts +1 -1
  131. package/src/libs/feature/editor/src/lib/models/wizard-field.type.ts +0 -1
  132. package/src/libs/feature/record/src/lib/data-view/data-view.component.html +2 -0
  133. package/src/libs/feature/record/src/lib/data-view/data-view.component.ts +3 -0
  134. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +2 -1
  135. package/src/libs/feature/record/src/lib/state/mdview.actions.ts +16 -0
  136. package/src/libs/feature/record/src/lib/state/mdview.effects.ts +21 -2
  137. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +15 -0
  138. package/src/libs/feature/record/src/lib/state/mdview.reducer.ts +30 -1
  139. package/src/libs/feature/record/src/lib/state/mdview.selectors.ts +12 -0
  140. package/src/libs/ui/elements/src/lib/application-banner/application-banner.component.html +2 -2
  141. package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.ts +2 -2
  142. package/src/libs/ui/inputs/src/index.ts +0 -1
  143. package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +0 -3
  144. package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.html +37 -1
  145. package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.ts +8 -2
  146. package/src/libs/ui/search/src/lib/results-table/results-table.component.html +2 -0
  147. package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +6 -0
  148. package/src/libs/ui/widgets/src/index.ts +0 -1
  149. package/src/libs/ui/widgets/src/lib/ui-widgets.module.ts +2 -3
  150. package/src/libs/util/data-fetcher/src/lib/data-fetcher.ts +13 -4
  151. package/src/libs/util/data-fetcher/src/lib/readers/base-cache.ts +14 -0
  152. package/src/libs/util/data-fetcher/src/lib/readers/base-file.ts +2 -1
  153. package/src/libs/util/data-fetcher/src/lib/readers/base.ts +2 -2
  154. package/src/libs/util/data-fetcher/src/lib/readers/csv.ts +1 -1
  155. package/src/libs/util/data-fetcher/src/lib/readers/excel.ts +1 -1
  156. package/src/libs/util/data-fetcher/src/lib/readers/geojson.ts +1 -1
  157. package/src/libs/util/data-fetcher/src/lib/readers/gml.ts +7 -7
  158. package/src/libs/util/data-fetcher/src/lib/readers/json.ts +1 -1
  159. package/src/libs/util/data-fetcher/src/lib/readers/wfs.ts +34 -11
  160. package/src/libs/util/data-fetcher/src/lib/utils.ts +36 -32
  161. package/translations/de.json +3 -75
  162. package/translations/en.json +3 -75
  163. package/translations/es.json +3 -75
  164. package/translations/fr.json +15 -87
  165. package/translations/it.json +20 -91
  166. package/translations/nl.json +3 -75
  167. package/translations/pt.json +3 -75
  168. package/translations/sk.json +3 -75
  169. package/esm2022/libs/ui/inputs/src/lib/chips-input/chips-input.component.mjs +0 -78
  170. package/esm2022/libs/ui/widgets/src/lib/step-bar/step-bar.component.mjs +0 -55
  171. package/libs/ui/inputs/src/lib/chips-input/chips-input.component.d.ts +0 -33
  172. package/libs/ui/inputs/src/lib/chips-input/chips-input.component.d.ts.map +0 -1
  173. package/libs/ui/widgets/src/lib/step-bar/step-bar.component.d.ts +0 -21
  174. package/libs/ui/widgets/src/lib/step-bar/step-bar.component.d.ts.map +0 -1
  175. package/src/libs/data-access/datafeeder/src/index.ts +0 -1
  176. package/src/libs/data-access/datafeeder/src/openapi/api/api.ts +0 -11
  177. package/src/libs/data-access/datafeeder/src/openapi/api/config.api.service.ts +0 -168
  178. package/src/libs/data-access/datafeeder/src/openapi/api/dataPublishing.api.service.ts +0 -270
  179. package/src/libs/data-access/datafeeder/src/openapi/api/fileUpload.api.service.ts +0 -734
  180. package/src/libs/data-access/datafeeder/src/openapi/api.module.ts +0 -46
  181. package/src/libs/data-access/datafeeder/src/openapi/configuration.ts +0 -125
  182. package/src/libs/data-access/datafeeder/src/openapi/encoder.ts +0 -20
  183. package/src/libs/data-access/datafeeder/src/openapi/index.ts +0 -5
  184. package/src/libs/data-access/datafeeder/src/openapi/model/analysisStatusEnum.api.model.ts +0 -24
  185. package/src/libs/data-access/datafeeder/src/openapi/model/boundingBox.api.model.ts +0 -20
  186. package/src/libs/data-access/datafeeder/src/openapi/model/cRS.api.model.ts +0 -25
  187. package/src/libs/data-access/datafeeder/src/openapi/model/datasetMetadata.api.model.ts +0 -45
  188. package/src/libs/data-access/datafeeder/src/openapi/model/datasetPublishRequest.api.model.ts +0 -39
  189. package/src/libs/data-access/datafeeder/src/openapi/model/datasetPublishingStatus.api.model.ts +0 -50
  190. package/src/libs/data-access/datafeeder/src/openapi/model/datasetUploadStatus.api.model.ts +0 -39
  191. package/src/libs/data-access/datafeeder/src/openapi/model/models.ts +0 -13
  192. package/src/libs/data-access/datafeeder/src/openapi/model/property.api.model.ts +0 -17
  193. package/src/libs/data-access/datafeeder/src/openapi/model/publishJobStatus.api.model.ts +0 -33
  194. package/src/libs/data-access/datafeeder/src/openapi/model/publishRequest.api.model.ts +0 -16
  195. package/src/libs/data-access/datafeeder/src/openapi/model/publishStatusEnum.api.model.ts +0 -20
  196. package/src/libs/data-access/datafeeder/src/openapi/model/publishStepEnum.api.model.ts +0 -42
  197. package/src/libs/data-access/datafeeder/src/openapi/model/uploadJobStatus.api.model.ts +0 -33
  198. package/src/libs/data-access/datafeeder/src/openapi/variables.ts +0 -9
  199. package/src/libs/data-access/datafeeder/src/spec.yaml +0 -537
  200. package/src/libs/ui/inputs/src/lib/chips-input/chips-input.component.css +0 -36
  201. package/src/libs/ui/inputs/src/lib/chips-input/chips-input.component.html +0 -23
  202. package/src/libs/ui/inputs/src/lib/chips-input/chips-input.component.ts +0 -81
  203. package/src/libs/ui/widgets/src/lib/step-bar/step-bar.component.css +0 -3
  204. package/src/libs/ui/widgets/src/lib/step-bar/step-bar.component.html +0 -13
  205. package/src/libs/ui/widgets/src/lib/step-bar/step-bar.component.ts +0 -55
@@ -242,8 +242,11 @@ export class DataService {
242
242
  }))
243
243
  }
244
244
 
245
- readAsGeoJson(link: DatasetOnlineResource): Observable<FeatureCollection> {
246
- return this.getDataset(link).pipe(
245
+ readAsGeoJson(
246
+ link: DatasetOnlineResource,
247
+ cacheActive: boolean
248
+ ): Observable<FeatureCollection> {
249
+ return this.getDataset(link, cacheActive).pipe(
247
250
  switchMap((dataset) => dataset.selectAll().read()),
248
251
  map((features) => ({
249
252
  type: 'FeatureCollection',
@@ -252,13 +255,21 @@ export class DataService {
252
255
  )
253
256
  }
254
257
 
255
- getDataset(link: DatasetOnlineResource): Observable<BaseReader> {
258
+ getDataset(
259
+ link: DatasetOnlineResource,
260
+ cacheActive: boolean
261
+ ): Observable<BaseReader> {
256
262
  if (link.type === 'service' && link.accessServiceProtocol === 'wfs') {
257
263
  const wfsUrlEndpoint = this.proxy.getProxiedUrl(link.url.toString())
258
264
  return from(
259
- openDataset(wfsUrlEndpoint, 'wfs', {
260
- wfsFeatureType: link.name,
261
- })
265
+ openDataset(
266
+ wfsUrlEndpoint,
267
+ 'wfs',
268
+ {
269
+ wfsFeatureType: link.name,
270
+ },
271
+ cacheActive
272
+ )
262
273
  )
263
274
  } else if (link.type === 'download') {
264
275
  const linkProxifiedUrl = this.proxy.getProxiedUrl(link.url.toString())
@@ -267,7 +278,9 @@ export class DataService {
267
278
  SupportedTypes.indexOf(format as any) > -1
268
279
  ? (format as SupportedType)
269
280
  : undefined
270
- return from(openDataset(linkProxifiedUrl, supportedType)).pipe()
281
+ return from(
282
+ openDataset(linkProxifiedUrl, supportedType, undefined, cacheActive)
283
+ ).pipe()
271
284
  } else if (
272
285
  link.type === 'service' &&
273
286
  link.accessServiceProtocol === 'esriRest'
@@ -276,7 +289,7 @@ export class DataService {
276
289
  link.url.toString(),
277
290
  'geojson'
278
291
  )
279
- return from(openDataset(url, 'geojson')).pipe()
292
+ return from(openDataset(url, 'geojson', undefined, cacheActive)).pipe()
280
293
  } else if (
281
294
  link.type === 'service' &&
282
295
  link.accessServiceProtocol === 'ogcFeatures'
@@ -284,7 +297,7 @@ export class DataService {
284
297
  return from(this.getDownloadUrlsFromOgcApi(link.url.href)).pipe(
285
298
  switchMap((collectionInfo) => {
286
299
  const geojsonUrl = collectionInfo.jsonDownloadLink
287
- return openDataset(geojsonUrl, 'geojson')
300
+ return openDataset(geojsonUrl, 'geojson', undefined, cacheActive)
288
301
  }),
289
302
  tap((url) => {
290
303
  if (url === null) {
@@ -33,6 +33,7 @@ import { CommonModule } from '@angular/common'
33
33
  standalone: true,
34
34
  })
35
35
  export class TableViewComponent {
36
+ @Input() cacheActive = true
36
37
  @Input() set link(value: DatasetOnlineResource) {
37
38
  this.currentLink$.next(value)
38
39
  }
@@ -66,7 +67,7 @@ export class TableViewComponent {
66
67
  ) {}
67
68
 
68
69
  getDatasetReader(link: DatasetOnlineResource): Observable<BaseReader> {
69
- return this.dataService.getDataset(link)
70
+ return this.dataService.getDataset(link, this.cacheActive)
70
71
  }
71
72
 
72
73
  onTableSelect(event) {
@@ -2,7 +2,7 @@
2
2
  <gn-ui-form-field-rich
3
3
  class="mt-[-8px]"
4
4
  [label]="label"
5
- [hint]="hint | translate"
5
+ [placeholder]="hint | translate"
6
6
  [value]="constraint_.text ?? ''"
7
7
  (valueChange)="handleConstraintTextChange($event)"
8
8
  ></gn-ui-form-field-rich>
@@ -79,6 +79,7 @@ export class FormFieldContactsForResourceComponent
79
79
  'owner',
80
80
  'point_of_contact',
81
81
  'author',
82
+ 'publisher',
82
83
  ]
83
84
 
84
85
  roleSectionsToDisplay: Role[] = []
@@ -28,7 +28,7 @@ import { FormFieldWrapperComponent } from '../../../../../../../../../libs/ui/la
28
28
  export class FormFieldRichComponent {
29
29
  @Input() label: string
30
30
  @Input() hint: string
31
- @Input() placeholder = 'Votre texte ici' //TODO: translate
31
+ @Input() placeholder = ''
32
32
  @Input() value: string
33
33
 
34
34
  @Output() valueChange: EventEmitter<string> = new EventEmitter()
@@ -16,19 +16,6 @@
16
16
  placeholder=""
17
17
  ></gn-ui-text-input>
18
18
  </div>
19
- <div
20
- class="flex-1 w-11/12"
21
- *ngIf="wizardFieldType.CHIPS === wizardFieldConfig.type"
22
- >
23
- <gn-ui-chips-input
24
- #chips
25
- [selectedItems]="wizardFieldData"
26
- placeholder=""
27
- [id]="wizardFieldConfig.id"
28
- [url]="wizardFieldConfig.options.url"
29
- [loadOnce]="wizardFieldConfig.options.loadOnce"
30
- ></gn-ui-chips-input>
31
- </div>
32
19
  <div
33
20
  class="h-32 w-11/12"
34
21
  *ngIf="wizardFieldType.TEXT_AREA === wizardFieldConfig.type"
@@ -23,7 +23,6 @@ import { WizardFieldModel } from '../../models/wizard-field.model'
23
23
  import { WizardFieldType } from '../../models/wizard-field.type'
24
24
  import { WizardService } from '../../services/wizard.service'
25
25
  import {
26
- ChipsInputComponent,
27
26
  DropdownSelectorComponent,
28
27
  TextAreaComponent,
29
28
  TextInputComponent,
@@ -74,7 +73,6 @@ export class WizardFieldComponent implements AfterViewInit, OnDestroy {
74
73
  @Input() wizardFieldConfig: WizardFieldModel
75
74
 
76
75
  @ViewChild('searchText') searchText: TextInputComponent
77
- @ViewChild('chips') chips: ChipsInputComponent
78
76
  @ViewChild('textArea') textArea: TextAreaComponent
79
77
  @ViewChild('dropdown') dropdown: DropdownSelectorComponent
80
78
 
@@ -96,9 +94,6 @@ export class WizardFieldComponent implements AfterViewInit, OnDestroy {
96
94
  case WizardFieldType.TEXT: {
97
95
  return data || ''
98
96
  }
99
- case WizardFieldType.CHIPS: {
100
- return data ? JSON.parse(data) : []
101
- }
102
97
  case WizardFieldType.TEXT_AREA: {
103
98
  return data || ''
104
99
  }
@@ -131,10 +126,6 @@ export class WizardFieldComponent implements AfterViewInit, OnDestroy {
131
126
  this.initializeTextInputListener()
132
127
  break
133
128
  }
134
- case WizardFieldType.CHIPS: {
135
- this.initializeChipsListener()
136
- break
137
- }
138
129
  case WizardFieldType.TEXT_AREA: {
139
130
  this.initializeTextAreaListener()
140
131
  return
@@ -161,17 +152,6 @@ export class WizardFieldComponent implements AfterViewInit, OnDestroy {
161
152
  )
162
153
  }
163
154
 
164
- private initializeChipsListener() {
165
- this.subs.add(
166
- this.chips.itemsChange.subscribe((items) => {
167
- this.wizardService.onWizardWizardFieldDataChanged(
168
- this.wizardFieldConfig.id,
169
- JSON.stringify(items)
170
- )
171
- })
172
- )
173
- }
174
-
175
155
  private initializeTextAreaListener() {
176
156
  this.subs.add(
177
157
  this.textArea.valueChange.subscribe((value) => {
@@ -275,8 +275,8 @@ export const DEFAULT_CONFIGURATION: EditorConfig = {
275
275
  labelKey: marker('editor.record.form.page.description'),
276
276
  sections: [
277
277
  TITLE_SECTION,
278
- ABOUT_SECTION,
279
278
  CLASSIFICATION_SECTION,
279
+ ABOUT_SECTION,
280
280
  GEOGRAPHICAL_COVERAGE_SECTION,
281
281
  ],
282
282
  },
@@ -1,7 +1,6 @@
1
1
  export enum WizardFieldType {
2
2
  TEXT,
3
3
  TEXT_AREA,
4
- CHIPS,
5
4
  DATA_PICKER,
6
5
  DROPDOWN,
7
6
  }
@@ -11,11 +11,13 @@
11
11
  <div class="relative h-[460px]">
12
12
  <gn-ui-table-view
13
13
  *ngIf="mode === 'table'"
14
+ [cacheActive]="cacheActive$ | async"
14
15
  [link]="selectedLink$ | async"
15
16
  ></gn-ui-table-view>
16
17
  <gn-ui-chart-view
17
18
  *ngIf="mode === 'chart'"
18
19
  (chartConfig$)="setChartConfig($event)"
20
+ [cacheActive]="cacheActive$ | async"
19
21
  [link]="selectedLink$ | async"
20
22
  ></gn-ui-chart-view>
21
23
  </div>
@@ -36,6 +36,9 @@ export class DataViewComponent {
36
36
  @Input() mode: 'table' | 'chart'
37
37
  @Input() displaySource = true
38
38
  @Output() chartConfig$ = new BehaviorSubject<DatavizConfigurationModel>(null)
39
+ cacheActive$ = this.mdViewFacade.isHighUpdateFrequency$.pipe(
40
+ map((highF) => !highF)
41
+ )
39
42
  compatibleDataLinks$ = combineLatest([
40
43
  this.mdViewFacade.dataLinks$,
41
44
  this.mdViewFacade.geoDataLinks$,
@@ -239,7 +239,8 @@ export class MapViewComponent implements AfterViewInit {
239
239
  link.accessServiceProtocol === 'ogcFeatures')) ||
240
240
  link.type === 'download'
241
241
  ) {
242
- return this.dataService.readAsGeoJson(link).pipe(
242
+ const cacheActive = true // TODO implement whether should be true or false
243
+ return this.dataService.readAsGeoJson(link, cacheActive).pipe(
243
244
  map((data) => ({
244
245
  type: 'geojson',
245
246
  data,
@@ -2,6 +2,7 @@ import { DatavizConfigurationModel } from '../../../../../../libs/common/domain/
2
2
  import { createAction, props } from '@ngrx/store'
3
3
  import {
4
4
  CatalogRecord,
5
+ DatasetFeatureCatalog,
5
6
  UserFeedback,
6
7
  } from '../../../../../../libs/common/domain/src/lib/model/record'
7
8
 
@@ -28,6 +29,21 @@ export const loadFullMetadataFailure = createAction(
28
29
  props<{ otherError?: string; notFound?: boolean }>()
29
30
  )
30
31
 
32
+ export const loadFeatureCatalog = createAction(
33
+ "[Metadata view] Load metadata's feature catalog",
34
+ props<{ metadata: CatalogRecord }>()
35
+ )
36
+
37
+ export const loadFeatureCatalogSuccess = createAction(
38
+ '[Metadata view] Load metadata feature catalog success',
39
+ props<{ datasetCatalog: DatasetFeatureCatalog | null }>()
40
+ )
41
+
42
+ export const loadFeatureCatalogFailure = createAction(
43
+ '[Metadata view] Load metadata feature catalog failure',
44
+ props<{ error?: string }>()
45
+ )
46
+
31
47
  export const closeMetadata = createAction('[Metadata view] close')
32
48
 
33
49
  /*
@@ -1,11 +1,10 @@
1
1
  import { Injectable } from '@angular/core'
2
2
  import { Actions, createEffect, ofType } from '@ngrx/effects'
3
3
  import { exhaustMap, mergeMap, of } from 'rxjs'
4
- import { catchError, map, switchMap } from 'rxjs/operators'
4
+ import { catchError, filter, map, switchMap, take } from 'rxjs/operators'
5
5
  import * as MdViewActions from './mdview.actions'
6
6
  import { RecordsRepositoryInterface } from '../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
7
7
  import { PlatformServiceInterface } from '../../../../../../libs/common/domain/src/lib/platform.service.interface'
8
-
9
8
  @Injectable()
10
9
  export class MdViewEffects {
11
10
  constructor(
@@ -33,6 +32,26 @@ export class MdViewEffects {
33
32
  )
34
33
  )
35
34
 
35
+ loadFeatureCatalog$ = createEffect(() =>
36
+ this.actions$.pipe(
37
+ ofType(MdViewActions.loadFullMetadataSuccess),
38
+ filter(({ full }) => full !== undefined),
39
+ switchMap(({ full }) => this.recordsRepository.getFeatureCatalog(full)),
40
+ map((featureCatalog) =>
41
+ MdViewActions.loadFeatureCatalogSuccess({
42
+ datasetCatalog: featureCatalog,
43
+ })
44
+ ),
45
+ catchError((error) =>
46
+ of(
47
+ MdViewActions.loadFeatureCatalogFailure({
48
+ error: error.message,
49
+ })
50
+ )
51
+ )
52
+ )
53
+ )
54
+
36
55
  /*
37
56
  Related effects
38
57
  */
@@ -52,11 +52,26 @@ export class MdViewFacade {
52
52
  filter((md) => !!md)
53
53
  )
54
54
 
55
+ featureCatalog$ = this.store.pipe(select(MdViewSelectors.getFeatureCatalog))
56
+
55
57
  isIncomplete$ = this.store.pipe(
56
58
  select(MdViewSelectors.getMetadataIsIncomplete),
57
59
  filter((incomplete) => incomplete !== null)
58
60
  )
59
61
 
62
+ isHighUpdateFrequency$ = this.metadata$.pipe(
63
+ map((record) => {
64
+ if (record.updateFrequency instanceof Object) {
65
+ return (
66
+ record.updateFrequency.per === 'day' &&
67
+ record.updateFrequency.updatedTimes > 1
68
+ )
69
+ }
70
+
71
+ return record.updateFrequency === 'continual'
72
+ })
73
+ )
74
+
60
75
  error$ = this.store.pipe(select(MdViewSelectors.getMetadataError))
61
76
 
62
77
  related$ = this.store.pipe(select(MdViewSelectors.getRelated))
@@ -3,6 +3,7 @@ import * as MetadataViewActions from './mdview.actions'
3
3
  import { DatavizConfigurationModel } from '../../../../../../libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model'
4
4
  import {
5
5
  CatalogRecord,
6
+ DatasetFeatureCatalog,
6
7
  UserFeedback,
7
8
  } from '../../../../../../libs/common/domain/src/lib/model/record'
8
9
 
@@ -17,6 +18,9 @@ export interface MetadataViewState {
17
18
  allUserFeedbacksLoading: boolean
18
19
  addUserFeedbackLoading: boolean
19
20
  chartConfig?: DatavizConfigurationModel
21
+ featureCatalog?: DatasetFeatureCatalog
22
+ featureCatalogLoading: boolean
23
+ featureCatalogError: string | null
20
24
  }
21
25
 
22
26
  export const initialMetadataViewState: MetadataViewState = {
@@ -24,6 +28,8 @@ export const initialMetadataViewState: MetadataViewState = {
24
28
  loadingFull: false,
25
29
  allUserFeedbacksLoading: false,
26
30
  addUserFeedbackLoading: false,
31
+ featureCatalogLoading: false,
32
+ featureCatalogError: null,
27
33
  }
28
34
 
29
35
  const metadataViewReducer = createReducer(
@@ -105,7 +111,30 @@ const metadataViewReducer = createReducer(
105
111
  addUserFeedbackLoading: false,
106
112
  allUserFeedbacksLoading: false,
107
113
  })
108
- )
114
+ ),
115
+
116
+ /**
117
+ * FeatureCatalog reducers
118
+ */
119
+
120
+ on(MetadataViewActions.loadFeatureCatalog, (state) => ({
121
+ ...state,
122
+ featureCatalogError: null,
123
+ featureCatalogLoading: true,
124
+ })),
125
+ on(
126
+ MetadataViewActions.loadFeatureCatalogSuccess,
127
+ (state, { datasetCatalog }) => ({
128
+ ...state,
129
+ featureCatalog: datasetCatalog,
130
+ featureCatalogLoading: false,
131
+ })
132
+ ),
133
+ on(MetadataViewActions.loadFeatureCatalogFailure, (state, { error }) => ({
134
+ ...state,
135
+ featureCatalogError: error,
136
+ featureCatalogLoading: false,
137
+ }))
109
138
  )
110
139
 
111
140
  export function reducer(
@@ -64,3 +64,15 @@ export const getAddUserFeedbacksLoading = createSelector(
64
64
  getMdViewState,
65
65
  (state: MetadataViewState) => state.addUserFeedbackLoading
66
66
  )
67
+
68
+ /*
69
+ Feature Catalog Selectors
70
+ */
71
+ export const getFeatureCatalog = createSelector(
72
+ getMdViewState,
73
+ (state: MetadataViewState) => state.featureCatalog
74
+ )
75
+ export const getFeatureCatalogIsLoading = createSelector(
76
+ getMdViewState,
77
+ (state: MetadataViewState) => state.featureCatalogLoading
78
+ )
@@ -1,12 +1,12 @@
1
1
  <div
2
2
  *ngIf="message && bannerOpen"
3
- class="absolute top-0 text-wrap bg-white mt-4 max-h-24"
3
+ class="absolute left-0 right-0 text-wrap bg-white mt-4 max-h-24"
4
4
  >
5
5
  <div
6
6
  class="flex flex-row py-2.5 px-5 gap-5 justify-start border max-h-20"
7
7
  [ngClass]="classList"
8
8
  >
9
- <div [ngClass]="{ 'pt-5': message.length > 200 }">
9
+ <div [ngClass]="message.length > 200 ? 'pt-5' : 'pt-1'">
10
10
  <ng-icon [name]="icon"></ng-icon>
11
11
  </div>
12
12
  <div class="flex flex-col justify-start gap-2.5">
@@ -1,4 +1,4 @@
1
- import { Component, Input, ChangeDetectionStrategy } from '@angular/core'
1
+ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
2
2
  import { marked } from 'marked'
3
3
 
4
4
  @Component({
@@ -13,6 +13,6 @@ export class MarkdownParserComponent {
13
13
  @Input() whitoutStyles?: boolean
14
14
 
15
15
  get parsedMarkdown() {
16
- return marked.parse(this.textContent)
16
+ return marked.parse(this.textContent ?? '')
17
17
  }
18
18
  }
@@ -3,7 +3,6 @@ export * from './lib/badge/badge.component'
3
3
  export * from './lib/button/button.component'
4
4
  export * from './lib/check-toggle/check-toggle.component'
5
5
  export * from './lib/checkbox/checkbox.component'
6
- export * from './lib/chips-input/chips-input.component'
7
6
  export * from './lib/copy-text-button/copy-text-button.component'
8
7
  export * from './lib/date-picker/date-picker.component'
9
8
  export * from './lib/date-range-dropdown/date-range-dropdown.component'
@@ -28,7 +28,6 @@ import { BadgeComponent } from './badge/badge.component'
28
28
  import { ButtonComponent } from './button/button.component'
29
29
  import { CheckToggleComponent } from './check-toggle/check-toggle.component'
30
30
  import { CheckboxComponent } from './checkbox/checkbox.component'
31
- import { ChipsInputComponent } from './chips-input/chips-input.component'
32
31
  import { DateRangePickerComponent } from './date-range-picker/date-range-picker.component'
33
32
  import { DragAndDropFileInputComponent } from './drag-and-drop-file-input/drag-and-drop-file-input.component'
34
33
  import { DropdownMultiselectComponent } from './dropdown-multiselect/dropdown-multiselect.component'
@@ -40,7 +39,6 @@ import { ViewportIntersectorComponent } from './viewport-intersector/viewport-in
40
39
  @NgModule({
41
40
  declarations: [
42
41
  DragAndDropFileInputComponent,
43
- ChipsInputComponent,
44
42
  DropdownMultiselectComponent,
45
43
  ViewportIntersectorComponent,
46
44
  CheckboxComponent,
@@ -86,7 +84,6 @@ import { ViewportIntersectorComponent } from './viewport-intersector/viewport-in
86
84
  ButtonComponent,
87
85
  DragAndDropFileInputComponent,
88
86
  TextAreaComponent,
89
- ChipsInputComponent,
90
87
  DropdownMultiselectComponent,
91
88
  ViewportIntersectorComponent,
92
89
  CheckToggleComponent,
@@ -6,6 +6,7 @@
6
6
  >
7
7
  <ul class="flex flex-col gap-2 w-full">
8
8
  <gn-ui-button
9
+ *ngIf="!isDraftPage"
9
10
  type="light"
10
11
  extraClass="flex flex-row items-center gap-2 w-full justify-start"
11
12
  (buttonClick)="duplicate.emit()"
@@ -23,7 +24,10 @@
23
24
  (buttonClick)="displayDeleteMenu()"
24
25
  [disabled]="!canDelete"
25
26
  data-test="record-menu-delete-button"
26
- ><span translate>record.action.delete</span></gn-ui-button
27
+ ><span *ngIf="!isDraftPage" translate>record.action.delete</span>
28
+ <span *ngIf="isDraftPage" translate
29
+ >record.action.rollback</span
30
+ ></gn-ui-button
27
31
  >
28
32
  </ul>
29
33
  </div>
@@ -60,4 +64,36 @@
60
64
  </div>
61
65
  </div>
62
66
  </ng-container>
67
+ <ng-container *ngSwitchCase="'rollbackMenu'">
68
+ <div
69
+ data-test="rollbackMenuSection"
70
+ class="w-80 p-6 flex flex-col gap-3 mt-2 border border-gray-100 bg-white shadow-2xl rounded-2xl"
71
+ >
72
+ <span class="text-lg font-bold text-center">{{
73
+ 'editor.record.undo.confirmation.title' | translate
74
+ }}</span>
75
+ <span class="text-center">{{
76
+ 'editor.record.undo.confirmation.message' | translate
77
+ }}</span>
78
+ <div class="flex flex-row gap-8 justify-center">
79
+ <gn-ui-button
80
+ (buttonClick)="rollback.emit()"
81
+ cdkFocusInitial
82
+ type="primary"
83
+ data-cy="confirm-button"
84
+ [style.--gn-ui-button-width]="'120px'"
85
+ >{{
86
+ 'editor.record.undo.confirmation.confirmText' | translate
87
+ }}</gn-ui-button
88
+ >
89
+ <gn-ui-button
90
+ [style.--gn-ui-button-width]="'120px'"
91
+ (buttonClick)="closeActionMenu.emit()"
92
+ >{{
93
+ 'editor.record.undo.confirmation.cancelText' | translate
94
+ }}</gn-ui-button
95
+ >
96
+ </div>
97
+ </div>
98
+ </ng-container>
63
99
  </ng-container>
@@ -13,7 +13,7 @@ import { ConfirmationDialogComponent } from '../../../../../../../libs/ui/elemen
13
13
  import { ButtonComponent } from '../../../../../../../libs/ui/inputs/src'
14
14
  import { TranslateModule } from '@ngx-translate/core'
15
15
 
16
- type ActionMenuPage = 'mainMenu' | 'deleteMenu'
16
+ type ActionMenuPage = 'mainMenu' | 'deleteMenu' | 'rollbackMenu'
17
17
 
18
18
  @Component({
19
19
  selector: 'gn-ui-action-menu',
@@ -32,9 +32,11 @@ type ActionMenuPage = 'mainMenu' | 'deleteMenu'
32
32
  export class ActionMenuComponent {
33
33
  @Input() canDuplicate: boolean
34
34
  @Input() canDelete: boolean
35
+ @Input() isDraftPage: boolean
35
36
  @Output() duplicate = new EventEmitter<void>()
36
37
  @Output() delete = new EventEmitter<void>()
37
38
  @Output() closeActionMenu = new EventEmitter<void>()
39
+ @Output() rollback = new EventEmitter<void>()
38
40
 
39
41
  @ViewChild(MatMenuTrigger) trigger: MatMenuTrigger
40
42
 
@@ -55,7 +57,11 @@ export class ActionMenuComponent {
55
57
  }
56
58
 
57
59
  displayDeleteMenu() {
58
- this.sectionDisplayed = 'deleteMenu'
60
+ if (this.isDraftPage) {
61
+ this.sectionDisplayed = 'rollbackMenu'
62
+ } else {
63
+ this.sectionDisplayed = 'deleteMenu'
64
+ }
59
65
  this.cdr.markForCheck()
60
66
  }
61
67
  }
@@ -162,9 +162,11 @@
162
162
  <gn-ui-action-menu
163
163
  [canDuplicate]="canDuplicate(item) && !isDuplicating"
164
164
  [canDelete]="canDelete(item)"
165
+ [isDraftPage]="isDraftPage"
165
166
  (duplicate)="handleDuplicate(item)"
166
167
  (delete)="handleDelete(item)"
167
168
  (closeActionMenu)="closeActionMenu()"
169
+ (rollback)="handleRollback(item)"
168
170
  >
169
171
  </gn-ui-action-menu>
170
172
  </ng-template>
@@ -74,6 +74,7 @@ export class ResultsTableComponent {
74
74
  @Output() recordClick = new EventEmitter<CatalogRecord>()
75
75
  @Output() duplicateRecord = new EventEmitter<CatalogRecord>()
76
76
  @Output() deleteRecord = new EventEmitter<CatalogRecord>()
77
+ @Output() rollbackDraft = new EventEmitter<CatalogRecord>()
77
78
  @Output() recordsSelectedChange = new EventEmitter<
78
79
  [CatalogRecord[], boolean]
79
80
  >()
@@ -186,6 +187,11 @@ export class ResultsTableComponent {
186
187
  this.closeActionMenu()
187
188
  }
188
189
 
190
+ handleRollback(item: unknown) {
191
+ this.rollbackDraft.emit(item as CatalogRecord)
192
+ this.closeActionMenu()
193
+ }
194
+
189
195
  setSortBy(col: string, order: 'asc' | 'desc') {
190
196
  this.sortByChange.emit([col, order])
191
197
  }
@@ -5,4 +5,3 @@ export * from './lib/loading-mask/loading-mask.component'
5
5
  export * from './lib/color-scale/color-scale.component'
6
6
  export * from './lib/popup-alert/popup-alert.component'
7
7
  export * from './lib/spinning-loader/spinning-loader.component'
8
- export * from './lib/step-bar/step-bar.component'
@@ -3,14 +3,13 @@ import { UtilSharedModule } from '../../../../../libs/util/shared/src'
3
3
  import { TranslateModule } from '@ngx-translate/core'
4
4
  import { NgxDropzoneModule } from 'ngx-dropzone'
5
5
  import { ColorScaleComponent } from './color-scale/color-scale.component'
6
- import { StepBarComponent } from './step-bar/step-bar.component'
7
6
  import { TagInputModule } from 'ngx-chips'
8
7
  import { FormsModule, ReactiveFormsModule } from '@angular/forms'
9
8
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'
10
9
  import { CommonModule } from '@angular/common'
11
10
 
12
11
  @NgModule({
13
- declarations: [ColorScaleComponent, StepBarComponent],
12
+ declarations: [ColorScaleComponent],
14
13
  imports: [
15
14
  CommonModule,
16
15
  TranslateModule.forChild(),
@@ -21,6 +20,6 @@ import { CommonModule } from '@angular/common'
21
20
  UtilSharedModule,
22
21
  MatProgressSpinnerModule,
23
22
  ],
24
- exports: [StepBarComponent],
23
+ exports: [],
25
24
  })
26
25
  export class UiWidgetsModule {}