geonetwork-ui 2.4.0-dev.81e72b2e → 2.4.0-dev.825a487d

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 (279) hide show
  1. package/esm2022/libs/api/metadata-converter/src/lib/gn4/atomic-operations.mjs +2 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.mjs +1 -1
  3. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.mjs +5 -5
  4. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +30 -2
  5. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/utils/geometry.mjs +31 -0
  6. package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +23 -1
  7. package/esm2022/libs/api/metadata-converter/src/lib/xml-utils.mjs +10 -3
  8. package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +31 -3
  9. package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +9 -5
  10. package/esm2022/libs/common/domain/src/lib/model/record/contact.model.mjs +28 -1
  11. package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
  12. package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
  13. package/esm2022/libs/common/domain/src/lib/repository/records-repository.interface.mjs +1 -1
  14. package/esm2022/libs/data-access/gn4/src/openapi/api/records.api.service.mjs +2 -6
  15. package/esm2022/libs/feature/catalog/src/lib/records/records.service.mjs +4 -6
  16. package/esm2022/libs/feature/editor/src/lib/+state/editor.actions.mjs +2 -1
  17. package/esm2022/libs/feature/editor/src/lib/+state/editor.effects.mjs +3 -3
  18. package/esm2022/libs/feature/editor/src/lib/+state/editor.facade.mjs +7 -2
  19. package/esm2022/libs/feature/editor/src/lib/+state/editor.models.mjs +1 -1
  20. package/esm2022/libs/feature/editor/src/lib/+state/editor.reducer.mjs +7 -3
  21. package/esm2022/libs/feature/editor/src/lib/+state/editor.selectors.mjs +16 -6
  22. package/esm2022/libs/feature/editor/src/lib/components/contact-card/contact-card.component.mjs +29 -0
  23. package/esm2022/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.mjs +131 -0
  24. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.mjs +170 -0
  25. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.mjs +6 -4
  26. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.mjs +21 -0
  27. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.mjs +7 -6
  28. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +24 -9
  29. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/index.mjs +1 -2
  30. package/esm2022/libs/feature/editor/src/lib/components/record-form/record-form.component.mjs +11 -7
  31. package/esm2022/libs/feature/editor/src/lib/expressions.mjs +1 -1
  32. package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +159 -60
  33. package/esm2022/libs/feature/editor/src/lib/models/editor-config.model.mjs +2 -0
  34. package/esm2022/libs/feature/editor/src/lib/models/index.mjs +2 -1
  35. package/esm2022/libs/feature/editor/src/lib/services/editor.service.mjs +4 -3
  36. package/esm2022/libs/feature/map/src/lib/utils/map-utils.service.mjs +10 -5
  37. package/esm2022/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.mjs +42 -23
  38. package/esm2022/libs/feature/record/src/lib/data-view-share/data-view-share.component.mjs +13 -5
  39. package/esm2022/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.mjs +49 -15
  40. package/esm2022/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.mjs +3 -3
  41. package/esm2022/libs/feature/search/src/lib/results-table/results-table-container.component.mjs +46 -7
  42. package/esm2022/libs/feature/search/src/lib/state/search.facade.mjs +6 -2
  43. package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +7 -3
  44. package/esm2022/libs/ui/elements/src/index.mjs +2 -1
  45. package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +3 -3
  46. package/esm2022/libs/ui/elements/src/lib/confirmation-dialog/confirmation-dialog.component.mjs +27 -0
  47. package/esm2022/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.mjs +4 -3
  48. package/esm2022/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.mjs +2 -2
  49. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +6 -5
  50. package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +5 -11
  51. package/esm2022/libs/ui/elements/src/lib/metadata-quality-item/metadata-quality-item.component.mjs +3 -3
  52. package/esm2022/libs/ui/elements/src/lib/sortable-list/sortable-list.component.mjs +7 -3
  53. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +11 -5
  54. package/esm2022/libs/ui/elements/src/lib/user-preview/user-preview.component.mjs +3 -3
  55. package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +19 -5
  56. package/esm2022/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.mjs +3 -3
  57. package/esm2022/libs/ui/layout/src/lib/interactive-table/interactive-table.component.mjs +3 -3
  58. package/esm2022/libs/ui/layout/src/lib/max-lines/max-lines.component.mjs +3 -3
  59. package/esm2022/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.mjs +67 -0
  60. package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +28 -8
  61. package/esm2022/libs/ui/widgets/src/index.mjs +2 -1
  62. package/esm2022/libs/ui/widgets/src/lib/popover/popover.component.mjs +68 -0
  63. package/esm2022/translations/de.json +103 -41
  64. package/esm2022/translations/en.json +76 -17
  65. package/esm2022/translations/es.json +75 -13
  66. package/esm2022/translations/fr.json +84 -25
  67. package/esm2022/translations/it.json +76 -14
  68. package/esm2022/translations/nl.json +75 -13
  69. package/esm2022/translations/pt.json +75 -13
  70. package/fesm2022/geonetwork-ui.mjs +1861 -514
  71. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  72. package/libs/api/metadata-converter/src/lib/gn4/atomic-operations.d.ts.map +1 -1
  73. package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts +1 -0
  74. package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts.map +1 -1
  75. package/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.d.ts.map +1 -1
  76. package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts +8 -1
  77. package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
  78. package/libs/api/metadata-converter/src/lib/iso19139/utils/geometry.d.ts +5 -0
  79. package/libs/api/metadata-converter/src/lib/iso19139/utils/geometry.d.ts.map +1 -0
  80. package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts +3 -1
  81. package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
  82. package/libs/api/metadata-converter/src/lib/xml-utils.d.ts +1 -0
  83. package/libs/api/metadata-converter/src/lib/xml-utils.d.ts.map +1 -1
  84. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +7 -1
  85. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
  86. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +2 -1
  87. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
  88. package/libs/common/domain/src/lib/model/record/contact.model.d.ts +1 -0
  89. package/libs/common/domain/src/lib/model/record/contact.model.d.ts.map +1 -1
  90. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +2 -1
  91. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
  92. package/libs/common/domain/src/lib/platform.service.interface.d.ts +2 -1
  93. package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
  94. package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts +17 -0
  95. package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
  96. package/libs/data-access/gn4/src/openapi/api/records.api.service.d.ts.map +1 -1
  97. package/libs/feature/catalog/src/lib/records/records.service.d.ts.map +1 -1
  98. package/libs/feature/editor/src/lib/+state/editor.actions.d.ts +5 -0
  99. package/libs/feature/editor/src/lib/+state/editor.actions.d.ts.map +1 -1
  100. package/libs/feature/editor/src/lib/+state/editor.facade.d.ts +4 -4
  101. package/libs/feature/editor/src/lib/+state/editor.facade.d.ts.map +1 -1
  102. package/libs/feature/editor/src/lib/+state/editor.models.d.ts +8 -0
  103. package/libs/feature/editor/src/lib/+state/editor.models.d.ts.map +1 -1
  104. package/libs/feature/editor/src/lib/+state/editor.reducer.d.ts +4 -3
  105. package/libs/feature/editor/src/lib/+state/editor.reducer.d.ts.map +1 -1
  106. package/libs/feature/editor/src/lib/+state/editor.selectors.d.ts +4 -8
  107. package/libs/feature/editor/src/lib/+state/editor.selectors.d.ts.map +1 -1
  108. package/libs/feature/editor/src/lib/components/contact-card/contact-card.component.d.ts +12 -0
  109. package/libs/feature/editor/src/lib/components/contact-card/contact-card.component.d.ts.map +1 -0
  110. package/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.d.ts +27 -0
  111. package/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.d.ts.map +1 -0
  112. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.d.ts +47 -0
  113. 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 -0
  114. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.d.ts.map +1 -1
  115. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.d.ts +11 -0
  116. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.d.ts.map +1 -0
  117. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.d.ts +3 -1
  118. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.d.ts.map +1 -1
  119. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts +7 -2
  120. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -1
  121. package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts +0 -1
  122. package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts.map +1 -1
  123. package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts +5 -7
  124. package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts.map +1 -1
  125. package/libs/feature/editor/src/lib/expressions.d.ts +1 -1
  126. package/libs/feature/editor/src/lib/expressions.d.ts.map +1 -1
  127. package/libs/feature/editor/src/lib/fields.config.d.ts +40 -2
  128. package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
  129. package/libs/feature/editor/src/lib/models/editor-config.model.d.ts +36 -0
  130. package/libs/feature/editor/src/lib/models/editor-config.model.d.ts.map +1 -0
  131. package/libs/feature/editor/src/lib/models/index.d.ts +1 -0
  132. package/libs/feature/editor/src/lib/models/index.d.ts.map +1 -1
  133. package/libs/feature/editor/src/lib/services/editor.service.d.ts +2 -2
  134. package/libs/feature/editor/src/lib/services/editor.service.d.ts.map +1 -1
  135. package/libs/feature/map/src/lib/utils/map-utils.service.d.ts.map +1 -1
  136. package/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.d.ts +4 -1
  137. package/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.d.ts.map +1 -1
  138. package/libs/feature/record/src/lib/data-view-share/data-view-share.component.d.ts +4 -1
  139. package/libs/feature/record/src/lib/data-view-share/data-view-share.component.d.ts.map +1 -1
  140. package/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.d.ts +4 -1
  141. package/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.d.ts.map +1 -1
  142. package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts +14 -4
  143. package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts.map +1 -1
  144. package/libs/feature/search/src/lib/state/search.facade.d.ts +1 -0
  145. package/libs/feature/search/src/lib/state/search.facade.d.ts.map +1 -1
  146. package/libs/feature/search/src/lib/utils/service/fields.service.d.ts.map +1 -1
  147. package/libs/ui/elements/src/index.d.ts +1 -0
  148. package/libs/ui/elements/src/index.d.ts.map +1 -1
  149. package/libs/ui/elements/src/lib/confirmation-dialog/confirmation-dialog.component.d.ts +18 -0
  150. package/libs/ui/elements/src/lib/confirmation-dialog/confirmation-dialog.component.d.ts.map +1 -0
  151. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +1 -1
  152. package/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.d.ts +0 -3
  153. package/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.d.ts.map +1 -1
  154. package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts +1 -1
  155. package/libs/ui/elements/src/lib/sortable-list/sortable-list.component.d.ts +4 -4
  156. package/libs/ui/elements/src/lib/sortable-list/sortable-list.component.d.ts.map +1 -1
  157. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +7 -5
  158. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  159. package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts +9 -1
  160. package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts.map +1 -1
  161. package/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.d.ts +20 -0
  162. package/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.d.ts.map +1 -0
  163. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +9 -3
  164. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
  165. package/libs/ui/widgets/src/index.d.ts +1 -0
  166. package/libs/ui/widgets/src/index.d.ts.map +1 -1
  167. package/libs/ui/widgets/src/lib/popover/popover.component.d.ts +19 -0
  168. package/libs/ui/widgets/src/lib/popover/popover.component.d.ts.map +1 -0
  169. package/package.json +1 -1
  170. package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.ts +5 -1
  171. package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +37 -12
  172. package/src/libs/api/metadata-converter/src/lib/fixtures/metawal.records.ts +5 -1
  173. package/src/libs/api/metadata-converter/src/lib/gn4/atomic-operations.ts +1 -0
  174. package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +1 -0
  175. package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +4 -2
  176. package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +72 -2
  177. package/src/libs/api/metadata-converter/src/lib/iso19139/utils/geometry.ts +39 -0
  178. package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +70 -1
  179. package/src/libs/api/metadata-converter/src/lib/xml-utils.ts +13 -5
  180. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +42 -2
  181. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +26 -15
  182. package/src/libs/common/domain/src/lib/model/record/contact.model.ts +28 -0
  183. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +2 -1
  184. package/src/libs/common/domain/src/lib/platform.service.interface.ts +5 -1
  185. package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +22 -0
  186. package/src/libs/common/fixtures/src/index.ts +2 -0
  187. package/src/libs/common/fixtures/src/lib/editor/editor.fixtures.ts +156 -0
  188. package/src/libs/common/fixtures/src/lib/editor/index.ts +1 -0
  189. package/src/libs/data-access/gn4/src/openapi/api/records.api.service.ts +1 -5
  190. package/src/libs/data-access/gn4/src/spec.yaml +0 -8
  191. package/src/libs/feature/catalog/src/lib/records/records.service.ts +6 -8
  192. package/src/libs/feature/editor/src/lib/+state/editor.actions.ts +5 -0
  193. package/src/libs/feature/editor/src/lib/+state/editor.effects.ts +2 -2
  194. package/src/libs/feature/editor/src/lib/+state/editor.facade.ts +9 -1
  195. package/src/libs/feature/editor/src/lib/+state/editor.models.ts +11 -0
  196. package/src/libs/feature/editor/src/lib/+state/editor.reducer.ts +11 -5
  197. package/src/libs/feature/editor/src/lib/+state/editor.selectors.ts +22 -8
  198. package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.css +0 -0
  199. package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.html +25 -0
  200. package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.ts +30 -0
  201. package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.html +2 -1
  202. package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.ts +110 -19
  203. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.css +0 -0
  204. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.html +76 -0
  205. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.ts +271 -0
  206. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.html +1 -1
  207. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.ts +8 -6
  208. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.css +0 -0
  209. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.html +5 -0
  210. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.ts +22 -0
  211. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.ts +8 -7
  212. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +20 -9
  213. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +20 -2
  214. package/src/libs/feature/editor/src/lib/components/record-form/form-field/index.ts +0 -1
  215. package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.html +51 -11
  216. package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.ts +15 -8
  217. package/src/libs/feature/editor/src/lib/expressions.ts +1 -1
  218. package/src/libs/feature/editor/src/lib/fields.config.ts +193 -61
  219. package/src/libs/feature/editor/src/lib/models/editor-config.model.ts +53 -0
  220. package/src/libs/feature/editor/src/lib/models/index.ts +1 -0
  221. package/src/libs/feature/editor/src/lib/services/editor.service.ts +8 -4
  222. package/src/libs/feature/map/src/lib/utils/map-utils.service.ts +8 -4
  223. package/src/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.ts +36 -19
  224. package/src/libs/feature/record/src/lib/data-view-share/data-view-share.component.html +6 -2
  225. package/src/libs/feature/record/src/lib/data-view-share/data-view-share.component.ts +11 -0
  226. package/src/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.ts +59 -12
  227. package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.html +1 -1
  228. package/src/libs/feature/search/src/lib/results-table/results-table-container.component.html +3 -1
  229. package/src/libs/feature/search/src/lib/results-table/results-table-container.component.ts +57 -3
  230. package/src/libs/feature/search/src/lib/state/search.facade.ts +6 -0
  231. package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +16 -2
  232. package/src/libs/ui/elements/src/index.ts +1 -0
  233. package/src/libs/ui/elements/src/lib/api-card/api-card.component.html +29 -29
  234. package/src/libs/ui/elements/src/lib/confirmation-dialog/confirmation-dialog.component.css +0 -0
  235. package/src/libs/ui/elements/src/lib/confirmation-dialog/confirmation-dialog.component.html +12 -0
  236. package/src/libs/ui/elements/src/lib/confirmation-dialog/confirmation-dialog.component.ts +37 -0
  237. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.html +4 -1
  238. package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.css +2 -1
  239. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +12 -8
  240. package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +14 -20
  241. package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.ts +0 -10
  242. package/src/libs/ui/elements/src/lib/metadata-quality-item/metadata-quality-item.component.html +1 -1
  243. package/src/libs/ui/elements/src/lib/sortable-list/sortable-list.component.html +3 -1
  244. package/src/libs/ui/elements/src/lib/sortable-list/sortable-list.component.ts +8 -4
  245. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +4 -2
  246. package/src/libs/ui/elements/src/lib/user-preview/user-preview.component.html +1 -1
  247. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +15 -3
  248. package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.css +31 -0
  249. package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.html +15 -0
  250. package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.ts +38 -0
  251. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.html +1 -1
  252. package/src/libs/ui/layout/src/lib/interactive-table/interactive-table.component.html +1 -0
  253. package/src/libs/ui/layout/src/lib/max-lines/max-lines.component.html +1 -0
  254. package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.css +0 -0
  255. package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.html +26 -0
  256. package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.ts +74 -0
  257. package/src/libs/ui/search/src/lib/results-table/results-table.component.html +15 -1
  258. package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +26 -12
  259. package/src/libs/ui/widgets/src/index.ts +1 -0
  260. package/src/libs/ui/widgets/src/lib/popover/popover.component.css +0 -0
  261. package/src/libs/ui/widgets/src/lib/popover/popover.component.html +3 -0
  262. package/src/libs/ui/widgets/src/lib/popover/popover.component.ts +85 -0
  263. package/tailwind.base.css +2 -1
  264. package/translations/de.json +103 -41
  265. package/translations/en.json +76 -17
  266. package/translations/es.json +75 -13
  267. package/translations/fr.json +84 -25
  268. package/translations/it.json +76 -14
  269. package/translations/nl.json +75 -13
  270. package/translations/pt.json +75 -13
  271. package/translations/sk.json +76 -14
  272. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.mjs +0 -2
  273. package/esm2022/libs/feature/editor/src/lib/models/fields.model.mjs +0 -2
  274. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.d.ts +0 -26
  275. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.d.ts.map +0 -1
  276. package/libs/feature/editor/src/lib/models/fields.model.d.ts +0 -15
  277. package/libs/feature/editor/src/lib/models/fields.model.d.ts.map +0 -1
  278. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.ts +0 -43
  279. package/src/libs/feature/editor/src/lib/models/fields.model.ts +0 -29
@@ -1,4 +1,4 @@
1
- import { Component, EventEmitter, Output } from '@angular/core'
1
+ import { Component, EventEmitter, OnDestroy, Output } from '@angular/core'
2
2
  import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
3
3
  import { SearchFacade } from '../state/search.facade'
4
4
  import { SelectionService } from '../../../../../../libs/api/repository/src'
@@ -6,6 +6,9 @@ import { SearchService } from '../utils/service/search.service'
6
6
  import { RecordsRepositoryInterface } from '../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
7
7
  import { ResultsTableComponent } from '../../../../../../libs/ui/search/src'
8
8
  import { CommonModule } from '@angular/common'
9
+ import { Subscription } from 'rxjs'
10
+ import { NotificationsService } from '../../../../../../libs/feature/notifications/src'
11
+ import { TranslateService } from '@ngx-translate/core'
9
12
 
10
13
  @Component({
11
14
  selector: 'gn-ui-results-table-container',
@@ -14,8 +17,11 @@ import { CommonModule } from '@angular/common'
14
17
  standalone: true,
15
18
  imports: [CommonModule, ResultsTableComponent],
16
19
  })
17
- export class ResultsTableContainerComponent {
20
+ export class ResultsTableContainerComponent implements OnDestroy {
18
21
  @Output() recordClick = new EventEmitter<CatalogRecord>()
22
+ @Output() duplicateRecord = new EventEmitter<CatalogRecord>()
23
+
24
+ subscription = new Subscription()
19
25
 
20
26
  records$ = this.searchFacade.results$
21
27
  selectedRecords$ = this.selectionService.selectedRecordsIdentifiers$
@@ -28,13 +34,57 @@ export class ResultsTableContainerComponent {
28
34
  private searchFacade: SearchFacade,
29
35
  private searchService: SearchService,
30
36
  private selectionService: SelectionService,
31
- private recordsRepository: RecordsRepositoryInterface
37
+ private recordsRepository: RecordsRepositoryInterface,
38
+ private notificationsService: NotificationsService,
39
+ private translateService: TranslateService
32
40
  ) {}
33
41
 
34
42
  handleRecordClick(item: unknown) {
35
43
  this.recordClick.emit(item as CatalogRecord)
36
44
  }
37
45
 
46
+ handleDuplicateRecord(item: unknown) {
47
+ this.duplicateRecord.emit(item as CatalogRecord)
48
+ }
49
+
50
+ async handleDeleteRecord(item: unknown) {
51
+ const uniqueIdentifier = (item as CatalogRecord).uniqueIdentifier
52
+ this.subscription.add(
53
+ this.recordsRepository.deleteRecord(uniqueIdentifier).subscribe({
54
+ next: () => {
55
+ this.recordsRepository.clearRecordDraft(uniqueIdentifier)
56
+ this.searchFacade.requestNewResults()
57
+ this.notificationsService.showNotification(
58
+ {
59
+ type: 'success',
60
+ title: this.translateService.instant(
61
+ 'editor.record.deleteSuccess.title'
62
+ ),
63
+ text: `${this.translateService.instant(
64
+ 'editor.record.deleteSuccess.body'
65
+ )}`,
66
+ },
67
+ 2500
68
+ )
69
+ },
70
+ error: (error) => {
71
+ this.notificationsService.showNotification({
72
+ type: 'error',
73
+ title: this.translateService.instant(
74
+ 'editor.record.deleteError.title'
75
+ ),
76
+ text: `${this.translateService.instant(
77
+ 'editor.record.deleteError.body'
78
+ )} ${error}`,
79
+ closeMessage: this.translateService.instant(
80
+ 'editor.record.deleteError.closeMessage'
81
+ ),
82
+ })
83
+ },
84
+ })
85
+ )
86
+ }
87
+
38
88
  handleSortByChange(col: string, order: 'asc' | 'desc') {
39
89
  this.searchService.setSortBy([order, col])
40
90
  }
@@ -46,4 +96,8 @@ export class ResultsTableContainerComponent {
46
96
  this.selectionService.selectRecords(records)
47
97
  }
48
98
  }
99
+
100
+ ngOnDestroy() {
101
+ this.subscription.unsubscribe()
102
+ }
49
103
  }
@@ -8,6 +8,7 @@ import {
8
8
  Paginate,
9
9
  RequestMoreOnAggregation,
10
10
  RequestMoreResults,
11
+ RequestNewResults,
11
12
  SetConfigAggregations,
12
13
  SetConfigFilters,
13
14
  SetConfigRequestFields,
@@ -151,6 +152,11 @@ export class SearchFacade {
151
152
  return this
152
153
  }
153
154
 
155
+ requestNewResults(): SearchFacade {
156
+ this.store.dispatch(new RequestNewResults(this.searchId))
157
+ return this
158
+ }
159
+
154
160
  requestMoreOnAggregation(key: string, increment: number): SearchFacade {
155
161
  this.store.dispatch(
156
162
  new RequestMoreOnAggregation(key, increment, this.searchId)
@@ -25,19 +25,21 @@ marker('search.filters.keyword')
25
25
  marker('search.filters.isSpatial')
26
26
  marker('search.filters.license')
27
27
  marker('search.filters.publicationYear')
28
- marker('search.filters.publisher')
28
+ marker('search.filters.organization')
29
29
  marker('search.filters.representationType')
30
30
  marker('search.filters.resourceType')
31
31
  marker('search.filters.standard')
32
32
  marker('search.filters.topic')
33
33
  marker('search.filters.contact')
34
+ marker('search.filters.producerOrg')
35
+ marker('search.filters.publisherOrg')
34
36
 
35
37
  @Injectable({
36
38
  providedIn: 'root',
37
39
  })
38
40
  export class FieldsService {
39
41
  protected fields = {
40
- publisher: new OrganizationSearchField(this.injector),
42
+ organization: new OrganizationSearchField(this.injector),
41
43
  format: new SimpleSearchField('format', this.injector, 'asc'),
42
44
  resourceType: new TranslatedSearchField(
43
45
  'resourceType',
@@ -70,6 +72,18 @@ export class FieldsService {
70
72
  q: new FullTextSearchField(),
71
73
  license: new LicenseSearchField(this.injector),
72
74
  owner: new OwnerSearchField(this.injector),
75
+ producerOrg: new MultilingualSearchField(
76
+ 'originatorOrgForResourceObject',
77
+ this.injector,
78
+ 'asc',
79
+ 'key'
80
+ ),
81
+ publisherOrg: new MultilingualSearchField(
82
+ 'distributorOrgForResourceObject',
83
+ this.injector,
84
+ 'asc',
85
+ 'key'
86
+ ),
73
87
  } as Record<string, AbstractSearchField>
74
88
 
75
89
  get supportedFields() {
@@ -1,5 +1,6 @@
1
1
  export * from './lib/api-card/api-card.component'
2
2
  export * from './lib/avatar/avatar.component'
3
+ export * from './lib/confirmation-dialog/confirmation-dialog.component'
3
4
  export * from './lib/content-ghost/content-ghost.component'
4
5
  export * from './lib/download-item/download-item.component'
5
6
  export * from './lib/downloads-list/downloads-list.component'
@@ -1,7 +1,5 @@
1
1
  <div
2
- class="group flex flex-col justify-between h-40 pt-5 pb-6 px-7 rounded filter overflow-hidden"
3
- [ngClass]="{ 'cursor-pointer': displayApiFormButton }"
4
- (click)="openRecordApiFormPanel()"
2
+ class="group flex flex-col justify-between h-40 pt-5 pb-6 px-7 rounded filter overflow-hidden cursor-default"
5
3
  >
6
4
  <div
7
5
  class="font-title font-medium text-21 text-black text-ellipsis overflow-hidden break-words pb-5 h-[4.5rem]"
@@ -17,35 +15,37 @@
17
15
  }"
18
16
  >{{ link.accessServiceProtocol }}</span
19
17
  >
20
- <gn-ui-copy-text-button
21
- *ngIf="!displayApiFormButton"
22
- [text]="link.url.toString()"
23
- [tooltipText]="'tooltip.url.copy' | translate"
24
- [displayText]="false"
25
- ></gn-ui-copy-text-button>
26
- <button
27
- *ngIf="displayApiFormButton"
28
- type="button"
29
- [ngClass]="{
30
- 'py-2 px-4 rounded-r-md bg-gray-400 hover:bg-gray-600 focus:bg-gray-800 text-white':
31
- displayText
32
- }"
33
- mat-raised-button
34
- [matTooltip]="
35
- !currentlyActive
36
- ? ('record.metadata.api.form.openForm' | translate)
37
- : ('record.metadata.api.form.closeForm' | translate)
38
- "
39
- matTooltipPosition="above"
40
- >
41
- <mat-icon
42
- class="material-symbols-outlined pointer-events-none align-middle card-icon"
18
+ <div class="flex flex-row gap-2 items-center">
19
+ <gn-ui-copy-text-button
20
+ [text]="link.url"
21
+ [tooltipText]="'tooltip.url.copy' | translate"
22
+ [displayText]="false"
23
+ ></gn-ui-copy-text-button>
24
+ <button
25
+ *ngIf="displayApiFormButton"
26
+ type="button"
43
27
  [ngClass]="{
44
- 'text-secondary opacity-100': currentlyActive
28
+ 'py-2 px-4 rounded-r-md bg-gray-400 hover:bg-gray-600 focus:bg-gray-800 text-white':
29
+ displayText
45
30
  }"
46
- >more_horiz</mat-icon
31
+ mat-raised-button
32
+ [matTooltip]="
33
+ !currentlyActive
34
+ ? ('record.metadata.api.form.openForm' | translate)
35
+ : ('record.metadata.api.form.closeForm' | translate)
36
+ "
37
+ matTooltipPosition="above"
38
+ (click)="openRecordApiFormPanel()"
47
39
  >
48
- </button>
40
+ <mat-icon
41
+ class="material-symbols-outlined pointer-events-none align-middle card-icon"
42
+ [ngClass]="{
43
+ 'text-secondary opacity-100': currentlyActive
44
+ }"
45
+ >more_horiz</mat-icon
46
+ >
47
+ </button>
48
+ </div>
49
49
  </div>
50
50
  </div>
51
51
  </div>
@@ -0,0 +1,12 @@
1
+ <h1 mat-dialog-title>{{ data.title }}</h1>
2
+ <div mat-dialog-content>{{ data.message }}</div>
3
+ <div mat-dialog-actions>
4
+ <gn-ui-button (buttonClick)="onCancel()">{{ data.cancelText }}</gn-ui-button>
5
+ <gn-ui-button
6
+ (buttonClick)="onConfirm()"
7
+ cdkFocusInitial
8
+ class="ml-2"
9
+ data-cy="confirm-button"
10
+ >{{ data.confirmText }}</gn-ui-button
11
+ >
12
+ </div>
@@ -0,0 +1,37 @@
1
+ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'
2
+ import {
3
+ MAT_DIALOG_DATA,
4
+ MatDialogModule,
5
+ MatDialogRef,
6
+ } from '@angular/material/dialog'
7
+ import { ButtonComponent } from '../../../../../../libs/ui/inputs/src'
8
+
9
+ export interface ConfirmationDialogData {
10
+ title: string
11
+ message: string
12
+ confirmText: string
13
+ cancelText: string
14
+ }
15
+
16
+ @Component({
17
+ selector: 'gn-ui-confirmation-dialog',
18
+ templateUrl: './confirmation-dialog.component.html',
19
+ styleUrls: ['./confirmation-dialog.component.css'],
20
+ changeDetection: ChangeDetectionStrategy.OnPush,
21
+ standalone: true,
22
+ imports: [MatDialogModule, ButtonComponent],
23
+ })
24
+ export class ConfirmationDialogComponent {
25
+ constructor(
26
+ public dialogRef: MatDialogRef<ConfirmationDialogComponent>,
27
+ @Inject(MAT_DIALOG_DATA) public data: ConfirmationDialogData
28
+ ) {}
29
+
30
+ onConfirm() {
31
+ this.dialogRef.close(true)
32
+ }
33
+
34
+ onCancel() {
35
+ this.dialogRef.close(false)
36
+ }
37
+ }
@@ -1,5 +1,8 @@
1
1
  <div class="h-full flex flex-col">
2
- <p class="flex-none mb-2 font-medium text-sm text-gray-900">
2
+ <p
3
+ *ngIf="helperText"
4
+ class="flex-none mb-2 font-medium text-sm text-gray-900"
5
+ >
3
6
  {{ helperText }}
4
7
  </p>
5
8
  <div class="flex-1" [hidden]="preview">
@@ -2,9 +2,10 @@
2
2
  :host ::ng-deep .markdown-body {
3
3
  -ms-text-size-adjust: 100%;
4
4
  -webkit-text-size-adjust: 100%;
5
- margin: 0px 0px 1.5rem 0px;
5
+ margin: 0;
6
6
  line-height: 1.5;
7
7
  word-wrap: break-word;
8
+ height: 100%;
8
9
  }
9
10
 
10
11
  /** Emphasis **/
@@ -1,7 +1,7 @@
1
1
  <div class="mb-6 md-description sm:mb-4 sm:pr-16">
2
2
  <gn-ui-content-ghost ghostClass="h-32" [showContent]="fieldReady('abstract')">
3
3
  <gn-ui-max-lines [maxLines]="6" *ngIf="metadata.abstract">
4
- <div>
4
+ <div class="mb-6">
5
5
  <gn-ui-markdown-parser
6
6
  [textContent]="metadata.abstract"
7
7
  ></gn-ui-markdown-parser>
@@ -47,19 +47,23 @@
47
47
  </ng-template>
48
48
  </ng-container>
49
49
  <ng-container *ngIf="legalConstraints.length">
50
- <gn-ui-markdown-parser
51
- *ngFor="let constraint of legalConstraints"
52
- [textContent]="constraint"
53
- >
54
- </gn-ui-markdown-parser>
50
+ <div class="mb-6">
51
+ <gn-ui-markdown-parser
52
+ *ngFor="let constraint of legalConstraints"
53
+ [textContent]="constraint"
54
+ >
55
+ </gn-ui-markdown-parser>
56
+ </div>
55
57
  </ng-container>
56
58
  <ng-container *ngIf="otherConstraints.length">
57
59
  <div gnUiLinkify *ngFor="let constraint of otherConstraints">
58
60
  <h5 translate class="font-medium text-black text-sm mb-[2px] mt-[16px]">
59
61
  record.metadata.otherConstraints
60
62
  </h5>
61
- <gn-ui-markdown-parser [textContent]="constraint">
62
- </gn-ui-markdown-parser>
63
+ <div class="mb-6">
64
+ <gn-ui-markdown-parser [textContent]="constraint">
65
+ </gn-ui-markdown-parser>
66
+ </div>
63
67
  </div>
64
68
  </ng-container>
65
69
 
@@ -1,22 +1,16 @@
1
- <div
2
- *ngIf="metadataQualityDisplay"
3
- class="mb-6 metadata-quality"
4
- (mouseenter)="showMenu()"
5
- (mouseleave)="hideMenu()"
6
- >
7
- <div class="min-w-[200px]" [class]="smaller ? 'leading-[8px]' : ''">
8
- <gn-ui-progress-bar
9
- (focus)="showMenu()"
10
- (blur)="hideMenu()"
11
- tabindex="0"
12
- [value]="qualityScore"
13
- type="primary"
14
- ></gn-ui-progress-bar>
15
- </div>
16
- <div
17
- class="absolute z-10 bg-white border border-black border-opacity-35 rounded-lg shadow-lg p-5 whitespace-nowrap"
18
- [class]="isMenuShown ? 'block' : 'hidden'"
19
- >
1
+ <div *ngIf="metadataQualityDisplay" class="mb-6 metadata-quality">
2
+ <gn-ui-popover [content]="popoverItems" theme="light-border">
3
+ <div class="min-w-[200px]" [class]="smaller ? 'leading-[8px]' : ''">
4
+ <gn-ui-progress-bar
5
+ tabindex="0"
6
+ [value]="qualityScore"
7
+ type="primary"
8
+ ></gn-ui-progress-bar>
9
+ </div>
10
+ </gn-ui-popover>
11
+ </div>
12
+ <ng-template #popoverItems>
13
+ <div class="p-2 py-4">
20
14
  <div class="mb-4 font-bold" translate>record.metadata.quality.details</div>
21
15
  <gn-ui-metadata-quality-item
22
16
  *ngFor="let e of items"
@@ -24,4 +18,4 @@
24
18
  [value]="e.value"
25
19
  ></gn-ui-metadata-quality-item>
26
20
  </div>
27
- </div>
21
+ </ng-template>
@@ -21,8 +21,6 @@ export class MetadataQualityComponent implements OnChanges {
21
21
 
22
22
  items: MetadataQualityItem[] = []
23
23
 
24
- isMenuShown = false
25
-
26
24
  get qualityScore() {
27
25
  const qualityScore = this.metadata?.extras?.qualityScore
28
26
  return typeof qualityScore === 'number'
@@ -36,14 +34,6 @@ export class MetadataQualityComponent implements OnChanges {
36
34
  )
37
35
  }
38
36
 
39
- showMenu() {
40
- this.isMenuShown = true
41
- }
42
-
43
- hideMenu() {
44
- this.isMenuShown = false
45
- }
46
-
47
37
  private add(name: string, value: boolean) {
48
38
  if (this.metadataQualityDisplay?.[name] !== false) {
49
39
  this.items.push({ name, value })
@@ -1,4 +1,4 @@
1
1
  <div class="ml-4 flex flex-row">
2
- <mat-icon class="material-symbols-outlined">{{ icon }}</mat-icon>
2
+ <mat-icon class="material-symbols-outlined min-w-fit">{{ icon }}</mat-icon>
3
3
  <p class="ml-2 text">{{ labelKey | translate }}</p>
4
4
  </div>
@@ -12,7 +12,9 @@
12
12
  class="sortable-list flex flex-col gap-3 p-2"
13
13
  (cdkDropListDropped)="drop($event)"
14
14
  >
15
- <ng-container *ngFor="let element of elements; index as index">
15
+ <ng-container
16
+ *ngFor="let element of elements; index as index; trackBy: trackByFn"
17
+ >
16
18
  <div class="sortable-box bg-white flex items-center" cdkDrag>
17
19
  <span
18
20
  cdkDragHandle
@@ -17,9 +17,9 @@ import {
17
17
  import { MatIconModule } from '@angular/material/icon'
18
18
  import { ButtonComponent } from '../../../../../../libs/ui/inputs/src'
19
19
 
20
- type DynamicElement = {
21
- component: Type<any>
22
- inputs: Record<string, any>
20
+ export type DynamicElement = {
21
+ component: Type<unknown>
22
+ inputs: Record<string, unknown>
23
23
  }
24
24
 
25
25
  @Component({
@@ -40,7 +40,7 @@ type DynamicElement = {
40
40
  })
41
41
  export class SortableListComponent {
42
42
  @Input() elements: Array<DynamicElement>
43
- @Input() addOptions: Array<{ buttonLabel: string; eventName: string }>
43
+ @Input() addOptions: Array<{ buttonLabel: string; eventName: string }> = []
44
44
  @Output() elementsChange = new EventEmitter<Array<DynamicElement>>()
45
45
  @Output() add = new EventEmitter<string>()
46
46
 
@@ -53,4 +53,8 @@ export class SortableListComponent {
53
53
  this.elements = this.elements.filter((_, i) => i !== index)
54
54
  this.elementsChange.emit(this.elements)
55
55
  }
56
+
57
+ trackByFn(index: number) {
58
+ return index
59
+ }
56
60
  }
@@ -9,8 +9,8 @@ import { ContentGhostComponent } from './content-ghost/content-ghost.component'
9
9
  import { DownloadItemComponent } from './download-item/download-item.component'
10
10
  import { DownloadsListComponent } from './downloads-list/downloads-list.component'
11
11
  import { ApiCardComponent } from './api-card/api-card.component'
12
- import { UiWidgetsModule } from '../../../../../libs/ui/widgets/src'
13
- import { UiLayoutModule } from '../../../../../libs/ui/layout/src'
12
+ import { PopoverComponent, UiWidgetsModule } from '../../../../../libs/ui/widgets/src'
13
+ import { MaxLinesComponent, UiLayoutModule } from '../../../../../libs/ui/layout/src'
14
14
  import { TranslateModule } from '@ngx-translate/core'
15
15
  import { RelatedRecordCardComponent } from './related-record-card/related-record-card.component'
16
16
  import { MetadataContactComponent } from './metadata-contact/metadata-contact.component'
@@ -45,10 +45,12 @@ import { TimeSincePipe } from './user-feedback-item/time-since.pipe'
45
45
  UiInputsModule,
46
46
  FormsModule,
47
47
  NgOptimizedImage,
48
+ PopoverComponent,
48
49
  MarkdownParserComponent,
49
50
  ThumbnailComponent,
50
51
  TimeSincePipe,
51
52
  BadgeComponent,
53
+ MaxLinesComponent,
52
54
  ],
53
55
  declarations: [
54
56
  MetadataInfoComponent,
@@ -1,6 +1,6 @@
1
1
  <figure class="text-center">
2
2
  <div
3
- class="w-12 h-12 border border-primary rounded-full capitalize"
3
+ class="w-10 h-10 border border-primary rounded-full capitalize"
4
4
  [matTooltip]="userFullName"
5
5
  >
6
6
  <gn-ui-avatar
@@ -61,6 +61,7 @@ export class AutocompleteComponent
61
61
  @Input() action: (value: string) => Observable<AutocompleteItem[]>
62
62
  @Input() value?: AutocompleteItem
63
63
  @Input() clearOnSelection = false
64
+ @Input() preventCompleteOnSelection = false
64
65
  @Input() autoFocus = false
65
66
  @Input() minCharacterCount? = 3
66
67
  @Input() allowSubmit = true
@@ -206,13 +207,24 @@ export class AutocompleteComponent
206
207
  this.inputSubmitted.emit(this.inputRef.nativeElement.value)
207
208
  }
208
209
 
210
+ /**
211
+ * This function is triggered when an item is selected in the list of displayed items.
212
+ * If preventCompleteOnSelection is true then the input will be left as entered by the user.
213
+ * If preventCompleteOnSelection is false (by default) then the input will be completed with the item selected by the user.
214
+ * If clearOnSelection is true then the input will be cleared upon selection.
215
+ * @param event
216
+ */
209
217
  handleSelection(event: MatAutocompleteSelectedEvent) {
210
218
  this.cancelEnter = true
211
219
  this.itemSelected.emit(event.option.value)
212
- if (this.clearOnSelection) {
213
- this.lastInputValue$.pipe(first()).subscribe((any) => {
214
- this.inputRef.nativeElement.value = any
220
+ if (this.preventCompleteOnSelection) {
221
+ this.lastInputValue$.pipe(first()).subscribe((lastInputValue) => {
222
+ this.inputRef.nativeElement.value = lastInputValue
215
223
  })
224
+ return
225
+ }
226
+ if (this.clearOnSelection) {
227
+ this.inputRef.nativeElement.value = ''
216
228
  }
217
229
  }
218
230
  }
@@ -0,0 +1,31 @@
1
+ :host {
2
+ --mat-standard-button-toggle-height: 32px;
3
+ }
4
+
5
+ .mat-button-toggle-group-appearance-standard {
6
+ background-color: var(--color-gray-200);
7
+ padding: 4px;
8
+ display: flex;
9
+ gap: 4px;
10
+ border-radius: 8px;
11
+ }
12
+
13
+ .mat-button-toggle-appearance-standard {
14
+ color: var(--color-main);
15
+ background-color: var(--color-gray-200);
16
+ border-radius: 4px;
17
+ border-left: none;
18
+ }
19
+
20
+ .mat-button-toggle-appearance-standard.mat-button-toggle-checked {
21
+ background-color: var(--color-main);
22
+ color: var(--color-primary-white);
23
+ }
24
+
25
+ button.mat-button-toggle-button.mat-focus-indicator.mat-button-toggle-label-content {
26
+ line-height: 32px;
27
+ }
28
+
29
+ .mat-button-toggle-label-content {
30
+ line-height: 32px;
31
+ }
@@ -0,0 +1,15 @@
1
+ <mat-button-toggle-group
2
+ #group="matButtonToggleGroup"
3
+ multiple="false"
4
+ class="flex w-full"
5
+ >
6
+ <mat-button-toggle
7
+ *ngFor="let option of options"
8
+ [aria-label]="option.label"
9
+ [value]="option.value"
10
+ [checked]="option.checked"
11
+ (change)="onChange(option)"
12
+ [class]="extraClasses"
13
+ >{{ option.label }}</mat-button-toggle
14
+ >
15
+ </mat-button-toggle-group>
@@ -0,0 +1,38 @@
1
+ import { CommonModule } from '@angular/common'
2
+ import {
3
+ ChangeDetectionStrategy,
4
+ Component,
5
+ EventEmitter,
6
+ Input,
7
+ Output,
8
+ } from '@angular/core'
9
+ import { MatButtonToggleModule } from '@angular/material/button-toggle'
10
+
11
+ export type SwitchToggleOption = {
12
+ label: string
13
+ value: string
14
+ checked: boolean
15
+ }
16
+
17
+ @Component({
18
+ selector: 'gn-ui-switch-toggle',
19
+ templateUrl: './switch-toggle.component.html',
20
+ styleUrls: ['./switch-toggle.component.css'],
21
+ changeDetection: ChangeDetectionStrategy.OnPush,
22
+ standalone: true,
23
+ imports: [MatButtonToggleModule, CommonModule],
24
+ })
25
+ export class SwitchToggleComponent {
26
+ @Input() options: SwitchToggleOption[]
27
+ @Input() ariaLabel? = ''
28
+ @Input() extraClasses? = ''
29
+ @Output() selectedValue = new EventEmitter<SwitchToggleOption>()
30
+
31
+ onChange(selectedOption: SwitchToggleOption) {
32
+ this.options.find(
33
+ (option) => option.value === selectedOption.value
34
+ ).checked = true
35
+
36
+ this.selectedValue.emit(selectedOption)
37
+ }
38
+ }
@@ -12,7 +12,7 @@
12
12
  </span>
13
13
  </div>
14
14
  </div>
15
- <div class="flex-1">
15
+ <div class="flex-1 overflow-y-auto">
16
16
  <ng-content></ng-content>
17
17
  </div>
18
18
  </div>
@@ -30,6 +30,7 @@
30
30
  class="contents text-gray-900 cursor-pointer group"
31
31
  *ngFor="let item of items"
32
32
  (click)="handleRowClick(item)"
33
+ data-cy="table-row"
33
34
  >
34
35
  <div
35
36
  class="relative h-0"
@@ -14,6 +14,7 @@
14
14
  *ngIf="showToggleButton"
15
15
  (click)="toggleDisplay()"
16
16
  class="text-secondary cursor-pointer pt-2.5"
17
+ data-cy="readMoreButton"
17
18
  >
18
19
  {{ (isExpanded ? 'ui.readLess' : 'ui.readMore') | translate }}
19
20
  </div>