geonetwork-ui 2.2.0-dev.81737006 → 2.2.0-dev.8a17994e

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 (476) hide show
  1. package/esm2022/libs/api/metadata-converter/src/lib/gn4/atomic-operations.mjs +28 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +96 -59
  3. package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.mjs +8 -4
  4. package/esm2022/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.mjs +1 -1
  5. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.mjs +14 -0
  6. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/converter.mjs +25 -17
  7. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +55 -23
  8. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +52 -32
  9. package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +2 -2
  10. package/esm2022/libs/api/repository/src/lib/gn4/index.mjs +3 -1
  11. package/esm2022/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.mjs +10 -3
  12. package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.mjs +14 -5
  13. package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +33 -8
  14. package/esm2022/libs/api/repository/src/lib/gn4/selection/selection.service.mjs +13 -26
  15. package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
  16. package/esm2022/libs/common/domain/src/lib/model/search/aggregation.model.mjs +1 -1
  17. package/esm2022/libs/common/domain/src/lib/model/search/field.model.mjs +2 -0
  18. package/esm2022/libs/common/domain/src/lib/model/search/filter.model.mjs +1 -1
  19. package/esm2022/libs/common/domain/src/lib/model/search/index.mjs +2 -1
  20. package/esm2022/libs/common/domain/src/lib/model/search/search.model.mjs +1 -1
  21. package/esm2022/libs/common/domain/src/lib/model/thesaurus/thesaurus.model.mjs +1 -1
  22. package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
  23. package/esm2022/libs/feature/catalog/src/lib/my-org/my-org.service.mjs +4 -10
  24. package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +5 -4
  25. package/esm2022/libs/feature/editor/src/index.mjs +6 -1
  26. package/esm2022/libs/feature/editor/src/lib/+state/editor.actions.mjs +8 -0
  27. package/esm2022/libs/feature/editor/src/lib/+state/editor.effects.mjs +26 -0
  28. package/esm2022/libs/feature/editor/src/lib/+state/editor.facade.mjs +30 -0
  29. package/esm2022/libs/feature/editor/src/lib/+state/editor.models.mjs +2 -0
  30. package/esm2022/libs/feature/editor/src/lib/+state/editor.reducer.mjs +42 -0
  31. package/esm2022/libs/feature/editor/src/lib/+state/editor.selectors.mjs +13 -0
  32. package/esm2022/libs/feature/editor/src/lib/expressions.mjs +13 -0
  33. package/esm2022/libs/feature/editor/src/lib/feature-editor.module.mjs +16 -4
  34. package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +34 -0
  35. package/esm2022/libs/feature/editor/src/lib/models/fields.model.mjs +2 -0
  36. package/esm2022/libs/feature/editor/src/lib/record-form/record-form.component.mjs +17 -11
  37. package/esm2022/libs/feature/editor/src/lib/services/editor.service.mjs +22 -44
  38. package/esm2022/libs/feature/map/src/index.mjs +2 -1
  39. package/esm2022/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.mjs +1 -1
  40. package/esm2022/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.mjs +106 -0
  41. package/esm2022/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.mjs +64 -0
  42. package/esm2022/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.mjs +63 -0
  43. package/esm2022/libs/feature/map/src/lib/constant/index.mjs +2 -1
  44. package/esm2022/libs/feature/map/src/lib/constant/projections.mjs +2 -0
  45. package/esm2022/libs/feature/map/src/lib/feature-map.module.mjs +26 -3
  46. package/esm2022/libs/feature/map/src/lib/geocoding/geocoding.component.mjs +93 -0
  47. package/esm2022/libs/feature/map/src/lib/geocoding.service.mjs +40 -0
  48. package/esm2022/libs/feature/map/src/lib/layers-panel/layers-panel.component.mjs +6 -3
  49. package/esm2022/libs/feature/map/src/lib/map-context/map-context.service.mjs +11 -1
  50. package/esm2022/libs/feature/map/src/lib/utils/index.mjs +1 -3
  51. package/esm2022/libs/feature/map/src/lib/utils/map-utils.service.mjs +60 -29
  52. package/esm2022/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.mjs +13 -13
  53. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +29 -20
  54. package/esm2022/libs/feature/record/src/lib/state/mdview.reducer.mjs +2 -2
  55. package/esm2022/libs/feature/router/src/lib/default/index.mjs +2 -1
  56. package/esm2022/libs/feature/router/src/lib/default/router.service.mjs +1 -1
  57. package/esm2022/libs/feature/search/src/index.mjs +4 -1
  58. package/esm2022/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.mjs +7 -4
  59. package/esm2022/libs/feature/search/src/lib/feature-search.module.mjs +2 -6
  60. package/esm2022/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.mjs +1 -1
  61. package/esm2022/libs/feature/search/src/lib/filter-geometry.token.mjs +4 -0
  62. package/esm2022/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.mjs +7 -3
  63. package/esm2022/libs/feature/search/src/lib/record-url.token.mjs +4 -0
  64. package/esm2022/libs/feature/search/src/lib/results-list/results-list.container.component.mjs +3 -3
  65. package/esm2022/libs/feature/search/src/lib/results-table/results-table.component.mjs +128 -0
  66. package/esm2022/libs/feature/search/src/lib/state/effects.mjs +6 -4
  67. package/esm2022/libs/feature/search/src/lib/state/search.facade.mjs +3 -2
  68. package/esm2022/libs/feature/search/src/lib/utils/service/fields.mjs +41 -26
  69. package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +11 -9
  70. package/esm2022/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.mjs +4 -4
  71. package/esm2022/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.mjs +1 -1
  72. package/esm2022/libs/ui/elements/src/index.mjs +4 -1
  73. package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +3 -3
  74. package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +27 -0
  75. package/esm2022/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.mjs +17 -0
  76. package/esm2022/libs/ui/elements/src/lib/max-lines/max-lines.component.mjs +5 -3
  77. package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
  78. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +47 -16
  79. package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +3 -4
  80. package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +9 -6
  81. package/esm2022/libs/ui/elements/src/lib/related-record-card/related-record-card.component.mjs +3 -3
  82. package/esm2022/libs/ui/elements/src/lib/thumbnail/thumbnail.component.mjs +8 -4
  83. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +16 -4
  84. package/esm2022/libs/ui/inputs/src/index.mjs +2 -1
  85. package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +3 -3
  86. package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +9 -9
  87. package/esm2022/libs/ui/inputs/src/lib/checkbox/checkbox.component.mjs +3 -3
  88. package/esm2022/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.mjs +3 -3
  89. package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +3 -3
  90. package/esm2022/libs/ui/inputs/src/lib/editable-label/editable-label.directive.mjs +46 -0
  91. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field.component.mjs +4 -2
  92. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field.model.mjs +1 -1
  93. package/esm2022/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.mjs +3 -3
  94. package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +2 -2
  95. package/esm2022/libs/ui/inputs/src/lib/text-area/text-area.component.mjs +3 -3
  96. package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +12 -7
  97. package/esm2022/libs/ui/layout/src/index.mjs +3 -1
  98. package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +3 -3
  99. package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.mjs +36 -0
  100. package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table.component.mjs +37 -0
  101. package/esm2022/libs/ui/search/src/index.mjs +1 -2
  102. package/esm2022/libs/ui/search/src/lib/record-preview-card/record-preview-card.component.mjs +1 -1
  103. package/esm2022/libs/ui/search/src/lib/record-preview-feed/record-preview-feed.component.mjs +1 -1
  104. package/esm2022/libs/ui/search/src/lib/record-preview-list/record-preview-list.component.mjs +1 -1
  105. package/esm2022/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.mjs +1 -1
  106. package/esm2022/libs/ui/search/src/lib/record-preview-title/record-preview-title.component.mjs +1 -1
  107. package/esm2022/libs/ui/search/src/lib/ui-search.module.mjs +9 -10
  108. package/esm2022/libs/ui/widgets/src/lib/badge/badge.component.mjs +3 -3
  109. package/esm2022/libs/util/i18n/src/index.mjs +1 -2
  110. package/esm2022/libs/util/i18n/src/lib/i18n.constants.mjs +18 -1
  111. package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +29 -13
  112. package/esm2022/libs/util/shared/src/lib/utils/index.mjs +2 -1
  113. package/esm2022/libs/util/shared/src/lib/utils/temporal-extent-union.mjs +32 -0
  114. package/esm2022/translations/de.json +131 -105
  115. package/esm2022/translations/en.json +67 -41
  116. package/esm2022/translations/es.json +45 -19
  117. package/esm2022/translations/fr.json +57 -31
  118. package/esm2022/translations/it.json +58 -32
  119. package/esm2022/translations/nl.json +46 -20
  120. package/esm2022/translations/pt.json +45 -19
  121. package/fesm2022/geonetwork-ui.mjs +2002 -1059
  122. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  123. package/libs/api/metadata-converter/src/lib/gn4/atomic-operations.d.ts +3 -0
  124. package/libs/api/metadata-converter/src/lib/gn4/atomic-operations.d.ts.map +1 -1
  125. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts +0 -1
  126. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  127. package/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.d.ts.map +1 -1
  128. package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts +4 -5
  129. package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts.map +1 -1
  130. package/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.d.ts +3 -0
  131. package/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.d.ts.map +1 -0
  132. package/libs/api/metadata-converter/src/lib/iso19139/converter.d.ts.map +1 -1
  133. package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts +7 -6
  134. package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
  135. package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts +4 -3
  136. package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
  137. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
  138. package/libs/api/repository/src/lib/gn4/index.d.ts +2 -0
  139. package/libs/api/repository/src/lib/gn4/index.d.ts.map +1 -1
  140. package/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.d.ts.map +1 -1
  141. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.d.ts +1 -1
  142. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.d.ts.map +1 -1
  143. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +9 -2
  144. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
  145. package/libs/api/repository/src/lib/gn4/selection/selection.service.d.ts +4 -5
  146. package/libs/api/repository/src/lib/gn4/selection/selection.service.d.ts.map +1 -1
  147. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +31 -17
  148. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
  149. package/libs/common/domain/src/lib/model/search/aggregation.model.d.ts +1 -1
  150. package/libs/common/domain/src/lib/model/search/aggregation.model.d.ts.map +1 -1
  151. package/libs/common/domain/src/lib/model/search/field.model.d.ts +2 -0
  152. package/libs/common/domain/src/lib/model/search/field.model.d.ts.map +1 -0
  153. package/libs/common/domain/src/lib/model/search/filter.model.d.ts +1 -1
  154. package/libs/common/domain/src/lib/model/search/filter.model.d.ts.map +1 -1
  155. package/libs/common/domain/src/lib/model/search/index.d.ts +1 -0
  156. package/libs/common/domain/src/lib/model/search/index.d.ts.map +1 -1
  157. package/libs/common/domain/src/lib/model/search/search.model.d.ts +2 -3
  158. package/libs/common/domain/src/lib/model/search/search.model.d.ts.map +1 -1
  159. package/libs/common/domain/src/lib/model/thesaurus/thesaurus.model.d.ts +1 -0
  160. package/libs/common/domain/src/lib/model/thesaurus/thesaurus.model.d.ts.map +1 -1
  161. package/libs/common/domain/src/lib/platform.service.interface.d.ts +1 -1
  162. package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
  163. package/libs/feature/catalog/src/lib/my-org/my-org.service.d.ts +0 -1
  164. package/libs/feature/catalog/src/lib/my-org/my-org.service.d.ts.map +1 -1
  165. package/libs/feature/dataviz/src/lib/service/data.service.d.ts +15 -2
  166. package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
  167. package/libs/feature/editor/src/index.d.ts +5 -0
  168. package/libs/feature/editor/src/index.d.ts.map +1 -1
  169. package/libs/feature/editor/src/lib/+state/editor.actions.d.ts +23 -0
  170. package/libs/feature/editor/src/lib/+state/editor.actions.d.ts.map +1 -0
  171. package/libs/feature/editor/src/lib/+state/editor.effects.d.ts +15 -0
  172. package/libs/feature/editor/src/lib/+state/editor.effects.d.ts.map +1 -0
  173. package/libs/feature/editor/src/lib/+state/editor.facade.d.ts +19 -0
  174. package/libs/feature/editor/src/lib/+state/editor.facade.d.ts.map +1 -0
  175. package/libs/feature/editor/src/lib/+state/editor.models.d.ts +2 -0
  176. package/libs/feature/editor/src/lib/+state/editor.models.d.ts.map +1 -0
  177. package/libs/feature/editor/src/lib/+state/editor.reducer.d.ts +18 -0
  178. package/libs/feature/editor/src/lib/+state/editor.reducer.d.ts.map +1 -0
  179. package/libs/feature/editor/src/lib/+state/editor.selectors.d.ts +15 -0
  180. package/libs/feature/editor/src/lib/+state/editor.selectors.d.ts.map +1 -0
  181. package/libs/feature/editor/src/lib/expressions.d.ts +4 -0
  182. package/libs/feature/editor/src/lib/expressions.d.ts.map +1 -0
  183. package/libs/feature/editor/src/lib/feature-editor.module.d.ts +3 -1
  184. package/libs/feature/editor/src/lib/feature-editor.module.d.ts.map +1 -1
  185. package/libs/feature/editor/src/lib/fields.config.d.ts +3 -0
  186. package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -0
  187. package/libs/feature/editor/src/lib/models/fields.model.d.ts +15 -0
  188. package/libs/feature/editor/src/lib/models/fields.model.d.ts.map +1 -0
  189. package/libs/feature/editor/src/lib/record-form/record-form.component.d.ts +10 -5
  190. package/libs/feature/editor/src/lib/record-form/record-form.component.d.ts.map +1 -1
  191. package/libs/feature/editor/src/lib/services/editor.service.d.ts +3 -13
  192. package/libs/feature/editor/src/lib/services/editor.service.d.ts.map +1 -1
  193. package/libs/feature/map/src/index.d.ts +1 -0
  194. package/libs/feature/map/src/index.d.ts.map +1 -1
  195. package/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.d.ts +22 -0
  196. package/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.d.ts.map +1 -0
  197. package/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.d.ts +22 -0
  198. package/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.d.ts.map +1 -0
  199. package/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.d.ts +22 -0
  200. package/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.d.ts.map +1 -0
  201. package/libs/feature/map/src/lib/constant/index.d.ts +1 -0
  202. package/libs/feature/map/src/lib/constant/index.d.ts.map +1 -1
  203. package/libs/feature/map/src/lib/constant/projections.d.ts.map +1 -0
  204. package/libs/feature/map/src/lib/feature-map.module.d.ts +16 -12
  205. package/libs/feature/map/src/lib/feature-map.module.d.ts.map +1 -1
  206. package/libs/feature/map/src/lib/geocoding/geocoding.component.d.ts +25 -0
  207. package/libs/feature/map/src/lib/geocoding/geocoding.component.d.ts.map +1 -0
  208. package/libs/feature/map/src/lib/geocoding.service.d.ts +18 -0
  209. package/libs/feature/map/src/lib/geocoding.service.d.ts.map +1 -0
  210. package/libs/feature/map/src/lib/map-context/map-context.service.d.ts +2 -0
  211. package/libs/feature/map/src/lib/map-context/map-context.service.d.ts.map +1 -1
  212. package/libs/feature/map/src/lib/utils/index.d.ts +0 -2
  213. package/libs/feature/map/src/lib/utils/index.d.ts.map +1 -1
  214. package/libs/feature/map/src/lib/utils/map-utils.service.d.ts +13 -11
  215. package/libs/feature/map/src/lib/utils/map-utils.service.d.ts.map +1 -1
  216. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts +1 -3
  217. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
  218. package/libs/feature/router/src/lib/default/index.d.ts +1 -0
  219. package/libs/feature/router/src/lib/default/index.d.ts.map +1 -1
  220. package/libs/feature/router/src/lib/default/router.service.d.ts +1 -1
  221. package/libs/feature/router/src/lib/default/router.service.d.ts.map +1 -1
  222. package/libs/feature/search/src/index.d.ts +3 -0
  223. package/libs/feature/search/src/index.d.ts.map +1 -1
  224. package/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.d.ts +5 -4
  225. package/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.d.ts.map +1 -1
  226. package/libs/feature/search/src/lib/feature-search.module.d.ts +0 -4
  227. package/libs/feature/search/src/lib/feature-search.module.d.ts.map +1 -1
  228. package/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.d.ts +3 -2
  229. package/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.d.ts.map +1 -1
  230. package/libs/feature/search/src/lib/filter-geometry.token.d.ts +4 -0
  231. package/libs/feature/search/src/lib/filter-geometry.token.d.ts.map +1 -0
  232. package/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.d.ts +1 -1
  233. package/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.d.ts.map +1 -1
  234. package/libs/feature/search/src/lib/record-url.token.d.ts +3 -0
  235. package/libs/feature/search/src/lib/record-url.token.d.ts.map +1 -0
  236. package/libs/feature/search/src/lib/results-table/results-table.component.d.ts +33 -0
  237. package/libs/feature/search/src/lib/results-table/results-table.component.d.ts.map +1 -0
  238. package/libs/feature/search/src/lib/state/effects.d.ts.map +1 -1
  239. package/libs/feature/search/src/lib/state/search.facade.d.ts +1 -1
  240. package/libs/feature/search/src/lib/state/search.facade.d.ts.map +1 -1
  241. package/libs/feature/search/src/lib/utils/service/fields.d.ts +21 -8
  242. package/libs/feature/search/src/lib/utils/service/fields.d.ts.map +1 -1
  243. package/libs/feature/search/src/lib/utils/service/fields.service.d.ts.map +1 -1
  244. package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts +1 -1
  245. package/libs/ui/elements/src/index.d.ts +3 -0
  246. package/libs/ui/elements/src/index.d.ts.map +1 -1
  247. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +1 -1
  248. package/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.d.ts +10 -0
  249. package/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.d.ts.map +1 -0
  250. package/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.d.ts +8 -0
  251. package/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.d.ts.map +1 -0
  252. package/libs/ui/elements/src/lib/max-lines/max-lines.component.d.ts.map +1 -1
  253. package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts +16 -5
  254. package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts.map +1 -1
  255. package/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.d.ts.map +1 -1
  256. package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts +3 -1
  257. package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts.map +1 -1
  258. package/libs/ui/elements/src/lib/thumbnail/thumbnail.component.d.ts +3 -2
  259. package/libs/ui/elements/src/lib/thumbnail/thumbnail.component.d.ts.map +1 -1
  260. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +13 -11
  261. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  262. package/libs/ui/inputs/src/index.d.ts +1 -0
  263. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  264. package/libs/ui/inputs/src/lib/button/button.component.d.ts +1 -1
  265. package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
  266. package/libs/ui/inputs/src/lib/editable-label/editable-label.directive.d.ts +13 -0
  267. package/libs/ui/inputs/src/lib/editable-label/editable-label.directive.d.ts.map +1 -0
  268. package/libs/ui/inputs/src/lib/form-field/form-field.component.d.ts.map +1 -1
  269. package/libs/ui/inputs/src/lib/form-field/form-field.model.d.ts +0 -1
  270. package/libs/ui/inputs/src/lib/form-field/form-field.model.d.ts.map +1 -1
  271. package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts +1 -1
  272. package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts.map +1 -1
  273. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +40 -39
  274. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
  275. package/libs/ui/layout/src/index.d.ts +2 -0
  276. package/libs/ui/layout/src/index.d.ts.map +1 -1
  277. package/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.d.ts +14 -0
  278. package/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.d.ts.map +1 -0
  279. package/libs/ui/layout/src/lib/interactive-table/interactive-table.component.d.ts +15 -0
  280. package/libs/ui/layout/src/lib/interactive-table/interactive-table.component.d.ts.map +1 -0
  281. package/libs/ui/search/src/index.d.ts +0 -1
  282. package/libs/ui/search/src/index.d.ts.map +1 -1
  283. package/libs/ui/search/src/lib/ui-search.module.d.ts +15 -15
  284. package/libs/ui/search/src/lib/ui-search.module.d.ts.map +1 -1
  285. package/libs/util/i18n/src/index.d.ts +0 -1
  286. package/libs/util/i18n/src/index.d.ts.map +1 -1
  287. package/libs/util/i18n/src/lib/i18n.constants.d.ts +17 -0
  288. package/libs/util/i18n/src/lib/i18n.constants.d.ts.map +1 -1
  289. package/libs/util/shared/src/lib/links/link-utils.d.ts +19 -7
  290. package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
  291. package/libs/util/shared/src/lib/utils/index.d.ts +1 -0
  292. package/libs/util/shared/src/lib/utils/index.d.ts.map +1 -1
  293. package/libs/util/shared/src/lib/utils/temporal-extent-union.d.ts +5 -0
  294. package/libs/util/shared/src/lib/utils/temporal-extent-union.d.ts.map +1 -0
  295. package/package.json +4 -1
  296. package/src/libs/api/metadata-converter/src/lib/fixtures/generic.records.ts +63 -8
  297. package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.ts +57 -9
  298. package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +229 -24
  299. package/src/libs/api/metadata-converter/src/lib/gn4/atomic-operations.ts +32 -0
  300. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +140 -74
  301. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.ts +7 -3
  302. package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +4 -5
  303. package/src/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.ts +16 -0
  304. package/src/libs/api/metadata-converter/src/lib/iso19139/converter.ts +30 -21
  305. package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +120 -63
  306. package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +177 -97
  307. package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +1 -1
  308. package/src/libs/api/repository/src/lib/gn4/index.ts +2 -0
  309. package/src/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.ts +22 -2
  310. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.ts +15 -4
  311. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +47 -8
  312. package/src/libs/api/repository/src/lib/gn4/selection/selection.service.ts +14 -38
  313. package/src/libs/common/domain/src/lib/index.ts +2 -0
  314. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +37 -21
  315. package/src/libs/common/domain/src/lib/model/search/aggregation.model.ts +1 -1
  316. package/src/libs/common/domain/src/lib/model/search/field.model.ts +1 -0
  317. package/src/libs/common/domain/src/lib/model/search/filter.model.ts +1 -1
  318. package/src/libs/common/domain/src/lib/model/search/index.ts +1 -0
  319. package/src/libs/common/domain/src/lib/model/search/search.model.ts +2 -2
  320. package/src/libs/common/domain/src/lib/model/thesaurus/thesaurus.model.ts +1 -0
  321. package/src/libs/common/domain/src/lib/model/user/index.ts +1 -0
  322. package/src/libs/common/domain/src/lib/platform.service.interface.ts +1 -4
  323. package/src/libs/common/fixtures/src/lib/elasticsearch/full-response.ts +1 -1
  324. package/src/libs/common/fixtures/src/lib/gn4/groups.fixtures.ts +1 -1
  325. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +52 -10
  326. package/src/libs/feature/catalog/src/lib/my-org/my-org.service.ts +4 -16
  327. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +8 -5
  328. package/src/libs/feature/editor/src/index.ts +5 -0
  329. package/src/libs/feature/editor/src/lib/+state/editor.actions.ts +24 -0
  330. package/src/libs/feature/editor/src/lib/+state/editor.effects.ts +49 -0
  331. package/src/libs/feature/editor/src/lib/+state/editor.facade.ts +30 -0
  332. package/src/libs/feature/editor/src/lib/+state/editor.models.ts +1 -0
  333. package/src/libs/feature/editor/src/lib/+state/editor.reducer.ts +68 -0
  334. package/src/libs/feature/editor/src/lib/+state/editor.selectors.ts +39 -0
  335. package/src/libs/feature/editor/src/lib/expressions.ts +16 -0
  336. package/src/libs/feature/editor/src/lib/feature-editor.module.ts +11 -0
  337. package/src/libs/feature/editor/src/lib/fields.config.ts +35 -0
  338. package/src/libs/feature/editor/src/lib/models/fields.model.ts +29 -0
  339. package/src/libs/feature/editor/src/lib/record-form/record-form.component.html +9 -7
  340. package/src/libs/feature/editor/src/lib/record-form/record-form.component.ts +13 -6
  341. package/src/libs/feature/editor/src/lib/services/editor.service.ts +34 -73
  342. package/src/libs/feature/map/src/index.ts +1 -0
  343. package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.css +0 -0
  344. package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.html +21 -0
  345. package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.ts +107 -0
  346. package/src/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.css +0 -0
  347. package/src/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.html +37 -0
  348. package/src/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.ts +64 -0
  349. package/src/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.css +0 -0
  350. package/src/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.html +55 -0
  351. package/src/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.ts +63 -0
  352. package/src/libs/feature/map/src/lib/constant/index.ts +1 -0
  353. package/src/libs/feature/map/src/lib/feature-map.module.ts +14 -0
  354. package/src/libs/feature/map/src/lib/geocoding/geocoding.component.css +0 -0
  355. package/src/libs/feature/map/src/lib/geocoding/geocoding.component.html +39 -0
  356. package/src/libs/feature/map/src/lib/geocoding/geocoding.component.ts +99 -0
  357. package/src/libs/feature/map/src/lib/geocoding.service.ts +59 -0
  358. package/src/libs/feature/map/src/lib/layers-panel/layers-panel.component.html +9 -3
  359. package/src/libs/feature/map/src/lib/map-context/map-context.service.ts +16 -0
  360. package/src/libs/feature/map/src/lib/utils/index.ts +0 -2
  361. package/src/libs/feature/map/src/lib/utils/map-utils.service.ts +85 -50
  362. package/src/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.ts +12 -12
  363. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +18 -3
  364. package/src/libs/feature/record/src/lib/state/mdview.reducer.ts +1 -1
  365. package/src/libs/feature/router/src/lib/default/index.ts +1 -0
  366. package/src/libs/feature/router/src/lib/default/router.service.ts +1 -1
  367. package/src/libs/feature/search/src/index.ts +3 -0
  368. package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html +13 -4
  369. package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts +2 -1
  370. package/src/libs/feature/search/src/lib/feature-search.module.ts +1 -10
  371. package/src/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.ts +4 -4
  372. package/src/libs/feature/search/src/lib/filter-geometry.token.ts +7 -0
  373. package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.ts +9 -3
  374. package/src/libs/feature/search/src/lib/record-url.token.ts +4 -0
  375. package/src/libs/feature/search/src/lib/results-list/results-list.container.component.ts +1 -1
  376. package/src/libs/feature/search/src/lib/results-table/results-table.component.css +0 -0
  377. package/src/libs/feature/search/src/lib/results-table/results-table.component.html +112 -0
  378. package/src/libs/feature/search/src/lib/results-table/results-table.component.ts +164 -0
  379. package/src/libs/feature/search/src/lib/state/effects.ts +5 -4
  380. package/src/libs/feature/search/src/lib/state/search.facade.ts +2 -1
  381. package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +21 -16
  382. package/src/libs/feature/search/src/lib/utils/service/fields.ts +43 -34
  383. package/src/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html +1 -0
  384. package/src/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.ts +1 -1
  385. package/src/libs/ui/elements/src/index.ts +3 -0
  386. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.html +4 -1
  387. package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.css +0 -0
  388. package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +30 -0
  389. package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.ts +15 -0
  390. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.css +5 -0
  391. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.html +39 -0
  392. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.ts +58 -0
  393. package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.css +264 -0
  394. package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.html +1 -0
  395. package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.ts +17 -0
  396. package/src/libs/ui/elements/src/lib/max-lines/max-lines.component.html +5 -1
  397. package/src/libs/ui/elements/src/lib/max-lines/max-lines.component.ts +1 -0
  398. package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +3 -3
  399. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.css +4 -0
  400. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +212 -68
  401. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +51 -10
  402. package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.ts +2 -3
  403. package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.html +5 -5
  404. package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts +12 -4
  405. package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.html +1 -1
  406. package/src/libs/ui/elements/src/lib/thumbnail/thumbnail.component.html +2 -2
  407. package/src/libs/ui/elements/src/lib/thumbnail/thumbnail.component.ts +4 -0
  408. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +7 -0
  409. package/src/libs/ui/inputs/src/index.ts +1 -0
  410. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html +1 -1
  411. package/src/libs/ui/inputs/src/lib/button/button.component.css +0 -5
  412. package/src/libs/ui/inputs/src/lib/button/button.component.html +0 -1
  413. package/src/libs/ui/inputs/src/lib/button/button.component.ts +7 -6
  414. package/src/libs/ui/inputs/src/lib/checkbox/checkbox.component.html +0 -1
  415. package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.html +2 -2
  416. package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.html +3 -1
  417. package/src/libs/ui/inputs/src/lib/editable-label/editable-label.directive.ts +48 -0
  418. package/src/libs/ui/inputs/src/lib/form-field/form-field.component.ts +3 -1
  419. package/src/libs/ui/inputs/src/lib/form-field/form-field.model.ts +0 -1
  420. package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.css +3 -0
  421. package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.html +8 -3
  422. package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.css +1 -0
  423. package/src/libs/ui/inputs/src/lib/text-area/text-area.component.ts +1 -0
  424. package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +5 -2
  425. package/src/libs/ui/layout/src/index.ts +2 -0
  426. package/src/libs/ui/layout/src/lib/carousel/carousel.component.css +1 -1
  427. package/src/libs/ui/layout/src/lib/carousel/carousel.component.html +1 -0
  428. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.css +0 -0
  429. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.html +1 -0
  430. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.ts +33 -0
  431. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.css +15 -0
  432. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.html +54 -0
  433. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.ts +42 -0
  434. package/src/libs/ui/search/src/index.ts +0 -1
  435. package/src/libs/ui/search/src/lib/ui-search.module.ts +2 -3
  436. package/src/libs/ui/widgets/src/lib/badge/badge.component.html +3 -1
  437. package/src/libs/util/i18n/src/index.ts +0 -1
  438. package/src/libs/util/i18n/src/lib/i18n.constants.ts +18 -0
  439. package/src/libs/util/shared/src/lib/links/link-utils.ts +34 -11
  440. package/src/libs/util/shared/src/lib/utils/index.ts +1 -0
  441. package/src/libs/util/shared/src/lib/utils/temporal-extent-union.ts +32 -0
  442. package/tailwind.base.css +44 -15
  443. package/translations/de.json +131 -105
  444. package/translations/en.json +67 -41
  445. package/translations/es.json +45 -19
  446. package/translations/fr.json +57 -31
  447. package/translations/it.json +58 -32
  448. package/translations/nl.json +46 -20
  449. package/translations/pt.json +45 -19
  450. package/translations/sk.json +119 -93
  451. package/esm2022/libs/feature/map/src/lib/utils/map-utils-wms.service.mjs +0 -55
  452. package/esm2022/libs/feature/map/src/lib/utils/projections.mjs +0 -2
  453. package/esm2022/libs/ui/search/src/lib/record-table/record-table.component.mjs +0 -145
  454. package/esm2022/libs/util/i18n/src/lib/testing/test.translate.loader.mjs +0 -24
  455. package/esm2022/libs/util/i18n/src/lib/testing/test.translate.module.mjs +0 -109
  456. package/esm2022/libs/util/i18n/src/lib/testing/translations.model.mjs +0 -6
  457. package/libs/feature/map/src/lib/utils/map-utils-wms.service.d.ts +0 -17
  458. package/libs/feature/map/src/lib/utils/map-utils-wms.service.d.ts.map +0 -1
  459. package/libs/feature/map/src/lib/utils/projections.d.ts.map +0 -1
  460. package/libs/ui/search/src/lib/record-table/record-table.component.d.ts +0 -31
  461. package/libs/ui/search/src/lib/record-table/record-table.component.d.ts.map +0 -1
  462. package/libs/util/i18n/src/lib/testing/test.translate.loader.d.ts +0 -17
  463. package/libs/util/i18n/src/lib/testing/test.translate.loader.d.ts.map +0 -1
  464. package/libs/util/i18n/src/lib/testing/test.translate.module.d.ts +0 -131
  465. package/libs/util/i18n/src/lib/testing/test.translate.module.d.ts.map +0 -1
  466. package/libs/util/i18n/src/lib/testing/translations.model.d.ts +0 -21
  467. package/libs/util/i18n/src/lib/testing/translations.model.d.ts.map +0 -1
  468. package/src/libs/feature/map/src/lib/utils/map-utils-wms.service.ts +0 -58
  469. package/src/libs/ui/search/src/lib/record-table/record-table.component.css +0 -7
  470. package/src/libs/ui/search/src/lib/record-table/record-table.component.html +0 -215
  471. package/src/libs/ui/search/src/lib/record-table/record-table.component.ts +0 -149
  472. package/src/libs/util/i18n/src/lib/testing/test.translate.loader.ts +0 -26
  473. package/src/libs/util/i18n/src/lib/testing/test.translate.module.ts +0 -235
  474. package/src/libs/util/i18n/src/lib/testing/translations.model.ts +0 -28
  475. /package/libs/feature/map/src/lib/{utils → constant}/projections.d.ts +0 -0
  476. /package/src/libs/feature/map/src/lib/{utils → constant}/projections.ts +0 -0
@@ -1,235 +0,0 @@
1
- import { ModuleWithProviders, NgModule } from '@angular/core'
2
- import {
3
- FakeMissingTranslationHandler,
4
- TranslateDefaultParser,
5
- TranslateFakeCompiler,
6
- TranslateModule,
7
- TranslateService,
8
- TranslateCompiler,
9
- } from '@ngx-translate/core'
10
- import { TestTranslateLoader } from './test.translate.loader'
11
- import { LanguageTranslations, Translations } from './translations.model'
12
-
13
- // IMPORTANT:
14
- // This was copy-pasted from https://github.com/mwootendev/ngx-translate-plugins/blob/7c6c73c7d16c9519a7bafff939d29fd8ea5e574a/projects/testing/src/lib/testing.module.ts
15
- // because the original package was expecting rxjs 7+ as a peer dep and that was conflicting with many other dependencies
16
- // FIXME: when rxjs 7 can be used in the project, remove this and do `npm install ngx-translate-testing --save-dev`
17
-
18
- /**
19
- * The TranslateTestingModule provides the {TranslateModule} as well as a
20
- * {TranslateService} configured to return translations specific for the
21
- * test environment.
22
- *
23
- * @export
24
- */
25
- @NgModule({
26
- imports: [TranslateModule],
27
- exports: [TranslateModule],
28
- })
29
- export class TranslateTestingModule
30
- implements ModuleWithProviders<TranslateTestingModule>
31
- {
32
- private _translations: Translations = {}
33
-
34
- private _defaultLanguage: string
35
-
36
- private _compiler: TranslateCompiler
37
-
38
- /**
39
- * Creates a new instance of the {TranslateTestingModule} with translations for the specified language.
40
- *
41
- * @example
42
- *
43
- * const ENGLISH_TRANSLATIONS = { greeting: 'Hello' };
44
- * const translateModule = TranslateTestingModule.withTranslations('en', ENGLISH_TRANSLATIONS);
45
- *
46
- * @example
47
- *
48
- * TranslateTestingModule.withTranslations('en', require('../../assets/i18n/en.json'));
49
- *
50
- * @static
51
- * @param {string} language the language for the translations.
52
- * @param {Translations} translations the translations to be used in the tests.
53
- * @returns the new instance that can be used to chain additional configuration.
54
- * @memberof TranslateTestingModule
55
- */
56
- public static withTranslations(
57
- language: string,
58
- translations: LanguageTranslations
59
- ): TranslateTestingModule
60
-
61
- /**
62
- * Creates a new instance of the {TranslateTestingModule} with the provided translations.
63
- *
64
- * @example
65
- *
66
- * const TRANSLATIONS = { en: { greeting: 'Hello' }, es: { greeting: 'Hola' } };
67
- * const translateModule = TranslateTestingModule.withTranslations(TRANSLATIONS);
68
- *
69
- * @example
70
- *
71
- * TranslateTestingModule.withTranslations(require('./test.i18n.json'));
72
- *
73
- * @static
74
- * @param {Translations} the language translations the translations to be used in the tests.
75
- * @returns the new instance that can be used to chain additional configuration.
76
- * @memberof TranslateTestingModule
77
- */
78
- public static withTranslations(
79
- translations: Translations
80
- ): TranslateTestingModule
81
-
82
- public static withTranslations(
83
- languageOrTranslations: string | Translations,
84
- translations?: LanguageTranslations
85
- ): TranslateTestingModule {
86
- const translateTestingModule = new TranslateTestingModule()
87
-
88
- if (typeof languageOrTranslations === 'string') {
89
- return translateTestingModule.withTranslations(
90
- <string>languageOrTranslations,
91
- translations
92
- )
93
- }
94
-
95
- return translateTestingModule.withTranslations(languageOrTranslations)
96
- }
97
-
98
- public get ngModule() {
99
- return TranslateTestingModule
100
- }
101
-
102
- public get providers() {
103
- const translateService = new TranslateService(
104
- null,
105
- new TestTranslateLoader(this._translations),
106
- this._compiler || new TranslateFakeCompiler(),
107
- new TranslateDefaultParser(),
108
- new FakeMissingTranslationHandler(),
109
- true,
110
- true,
111
- false,
112
- this._defaultLanguage
113
- )
114
-
115
- return [
116
- {
117
- provide: TranslateService,
118
- useValue: translateService,
119
- },
120
- ]
121
- }
122
-
123
- /**
124
- * Updates the {TranslateTestingModule} instance with additional translations. The
125
- * translations will be shallowly merged with any existing translations.
126
- *
127
- * @example
128
- *
129
- * const ENGLISH_TRANSLATIONS = { en: { greeting: 'Hello' } };
130
- * const SPANISH_TRANSLATIONS = { en: { greeting: 'Hola' } };
131
- * const translateModule = TranslateTestingModule.withTranslations(ENGLISH_TRANSLATIONS)
132
- * .withTranslations(SPANISH_TRANSLATIONS);
133
- *
134
- * @param {Translations} translations the additional translations to add to the testing service.
135
- * @returns the instance that can be used to chain additional configuration.
136
- * @memberof TranslateTestingModule
137
- */
138
- public withTranslations(translations: Translations): TranslateTestingModule
139
-
140
- /**
141
- * Updates the {TranslateTestingModule} instance with additional translations for a
142
- * specified language. The translations will be shallowly merged with any existing translations.
143
- *
144
- * @example
145
- *
146
- * const ENGLISH_TRANSLATIONS = { greeting: 'Hello' };
147
- * const SPANISH_TRANSLATIONS = { greeting: 'Hola' };
148
- * const translateModule = TranslateTestingModule.withTranslations('en', ENGLISH_TRANSLATIONS)
149
- * .withTranslations('es', SPANISH_TRANSLATIONS);
150
- *
151
- * @example
152
- *
153
- * TranslateTestingModule.withTranslations('en', require('../../assets/i18n/en.json'))
154
- * .withTranslations('es', require('../../assets/i18n/es.json'));
155
- *
156
- * @param {string} language the language for which the new translations are being added.
157
- * @param {LanguageTranslations} translations the translations for the specified language.
158
- * @returns the instance that can be used to chain additional configuration.
159
- * @memberof TranslateTestingModule
160
- */
161
- public withTranslations(
162
- language: string,
163
- translations: LanguageTranslations
164
- ): TranslateTestingModule
165
-
166
- public withTranslations(
167
- languageOrTranslations: string | Translations,
168
- translations?: LanguageTranslations
169
- ): TranslateTestingModule {
170
- if (typeof languageOrTranslations === 'string' && translations) {
171
- this.addTranslations(languageOrTranslations, translations)
172
- this._defaultLanguage = languageOrTranslations
173
- } else if (languageOrTranslations) {
174
- Object.keys(languageOrTranslations).forEach((language) =>
175
- this.addTranslations(language, languageOrTranslations[language])
176
- )
177
- }
178
- return this
179
- }
180
-
181
- /**
182
- * Updates the {TranslationTestingModule} to provide a {TranslateService} that will
183
- * use the provided {TranslateCompiler} to translate the test translations.
184
- *
185
- * @example
186
- *
187
- * TranslateTestingModule.withTranslations('en', {people: '{gender, select, male{He is} female{She is} other{They are}} {how})'})
188
- * .withCompiler(new TranslateMessageFormatCompiler());
189
- *
190
- * @param compiler the compiler to use to compile the test translations.
191
- * @returns the instance that can be used to chain additional configuration.
192
- * @memberof TranslateTestingModule
193
- */
194
- public withCompiler(compiler: TranslateCompiler): TranslateTestingModule {
195
- this._compiler = compiler
196
- return this
197
- }
198
-
199
- /**
200
- * Updates the {TranslateTestingModule} to use the provided language as the default language.
201
- * By default, the default language will be set to the first language provided.
202
- *
203
- * @example
204
- *
205
- * TranslateTestingModule.withTranslations('es', SPANISH_TRANSLATIONS)
206
- * .withTranslations('en', ENGLISH_TRANSLATIONS)
207
- * .withDefaultLanguage('en');
208
- *
209
- * @param language the new default language for translations.
210
- * @returns the instance that can be used to chain additional configuration.
211
- * @memberof TranslateTestingModule
212
- */
213
- public withDefaultLanguage(language: string): TranslateTestingModule {
214
- this._defaultLanguage = language || this._defaultLanguage
215
- return this
216
- }
217
-
218
- private addTranslations(
219
- language: string,
220
- translations: LanguageTranslations
221
- ) {
222
- if (!this._defaultLanguage) {
223
- this._defaultLanguage = language
224
- }
225
-
226
- if (this._translations[language]) {
227
- this._translations[language] = {
228
- ...this._translations[language],
229
- ...translations,
230
- }
231
- } else {
232
- this._translations[language] = translations
233
- }
234
- }
235
- }
@@ -1,28 +0,0 @@
1
- // IMPORTANT:
2
- // This was copy-pasted from https://github.com/mwootendev/ngx-translate-plugins/blob/7c6c73c7d16c9519a7bafff939d29fd8ea5e574a/projects/testing/src/lib/translations.model.ts
3
- // because the original package was expecting rxjs 7+ as a peer dep and that was conflicting with many other dependencies
4
- // FIXME: when rxjs 7 can be used in the project, remove this and do `npm install ngx-translate-testing --save-dev`
5
-
6
- export declare type LanguageTranslation =
7
- | string
8
- | string[]
9
- | { [translationKey: string]: LanguageTranslation }
10
-
11
- /**
12
- * LanguageTranslations represents a mapping between a translation key and the translation for that key
13
- * or to nested translation keys.
14
- *
15
- * @export
16
- */
17
- export interface LanguageTranslations {
18
- [translationKey: string]: LanguageTranslation
19
- }
20
-
21
- /**
22
- * Translations represents a mapping between a language and the translations for that language.
23
- *
24
- * @export
25
- */
26
- export interface Translations {
27
- [language: string]: LanguageTranslations
28
- }