geonetwork-ui 2.3.0-dev.6e2b8bea → 2.3.0-dev.89188551

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 (405) hide show
  1. package/esm2022/index.mjs +2 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +6 -2
  3. package/esm2022/libs/api/repository/src/lib/gn4/auth/avatar.service.interface.mjs +1 -1
  4. package/esm2022/libs/api/repository/src/lib/gn4/auth/gravatar.service.mjs +12 -1
  5. package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.mjs +36 -3
  6. package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +19 -7
  7. package/esm2022/libs/common/domain/src/lib/model/record/index.mjs +2 -1
  8. package/esm2022/libs/common/domain/src/lib/model/record/user-feedbacks.model.mjs +2 -0
  9. package/esm2022/libs/common/domain/src/lib/model/user/index.mjs +2 -0
  10. package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
  11. package/esm2022/libs/data-access/gn4/src/openapi/api/records.api.service.mjs +35 -7
  12. package/esm2022/libs/data-access/gn4/src/openapi/model/models.mjs +1 -2
  13. package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +36 -3
  14. package/esm2022/libs/feature/editor/src/index.mjs +2 -2
  15. package/esm2022/libs/feature/editor/src/lib/+state/editor.facade.mjs +6 -2
  16. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-array/form-field-array.component.mjs +11 -0
  17. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-file/form-field-file.component.mjs +28 -0
  18. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.mjs +64 -0
  19. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-object/form-field-object.component.mjs +11 -0
  20. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.mjs +15 -0
  21. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.mjs +45 -0
  22. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-simple/form-field-simple.component.mjs +50 -0
  23. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +11 -0
  24. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extent/form-field-temporal-extent.component.mjs +11 -0
  25. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +121 -0
  26. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.mjs +2 -0
  27. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/index.mjs +10 -0
  28. package/esm2022/libs/feature/editor/src/lib/components/record-form/record-form.component.mjs +29 -0
  29. package/esm2022/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.mjs +1 -1
  30. package/esm2022/libs/feature/editor/src/lib/feature-editor.module.mjs +10 -10
  31. package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +16 -1
  32. package/esm2022/libs/feature/editor/src/lib/models/fields.model.mjs +1 -1
  33. package/esm2022/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.mjs +3 -3
  34. package/esm2022/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.mjs +1 -1
  35. package/esm2022/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.mjs +1 -1
  36. package/esm2022/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.mjs +1 -1
  37. package/esm2022/libs/feature/notifications/src/index.mjs +4 -0
  38. package/esm2022/libs/feature/notifications/src/lib/feature-notifications.module.mjs +18 -0
  39. package/esm2022/libs/feature/notifications/src/lib/notification.model.mjs +2 -0
  40. package/esm2022/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.mjs +49 -0
  41. package/esm2022/libs/feature/notifications/src/lib/notifications.service.mjs +29 -0
  42. package/esm2022/libs/feature/record/src/lib/feature-record.module.mjs +4 -4
  43. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +3 -2
  44. package/esm2022/libs/feature/record/src/lib/state/mdview.actions.mjs +22 -4
  45. package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +37 -10
  46. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +22 -7
  47. package/esm2022/libs/feature/record/src/lib/state/mdview.reducer.mjs +52 -17
  48. package/esm2022/libs/feature/record/src/lib/state/mdview.selectors.mjs +18 -3
  49. package/esm2022/libs/feature/router/src/lib/default/state/router.effects.mjs +2 -2
  50. package/esm2022/libs/feature/search/src/lib/results-table/results-table.component.mjs +3 -3
  51. package/esm2022/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.mjs +3 -3
  52. package/esm2022/libs/ui/elements/src/index.mjs +15 -15
  53. package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +2 -2
  54. package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +5 -5
  55. package/esm2022/libs/ui/elements/src/lib/link-card/link-card.component.mjs +16 -3
  56. package/esm2022/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.mjs +45 -0
  57. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
  58. package/esm2022/libs/ui/elements/src/lib/notification/notification.component.mjs +34 -0
  59. package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +37 -8
  60. package/esm2022/libs/ui/elements/src/lib/thumbnail/thumbnail.component.mjs +4 -3
  61. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +14 -10
  62. package/esm2022/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.mjs +59 -0
  63. package/esm2022/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.mjs +62 -0
  64. package/esm2022/libs/ui/inputs/src/index.mjs +16 -16
  65. package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +2 -1
  66. package/esm2022/libs/ui/inputs/src/lib/date-picker/date-picker.component.mjs +22 -0
  67. package/esm2022/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.mjs +7 -5
  68. package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +17 -8
  69. package/esm2022/libs/ui/inputs/src/lib/files-drop/files-drop.directive.mjs +59 -0
  70. package/esm2022/libs/ui/inputs/src/lib/image-input/image-input.component.mjs +183 -0
  71. package/esm2022/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.mjs +29 -0
  72. package/esm2022/libs/ui/inputs/src/lib/text-area/text-area.component.mjs +27 -4
  73. package/esm2022/libs/ui/inputs/src/lib/text-input/text-input.component.mjs +19 -3
  74. package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +18 -29
  75. package/esm2022/libs/ui/layout/src/index.mjs +7 -5
  76. package/esm2022/libs/ui/layout/src/lib/block-list/block-list.component.mjs +76 -0
  77. package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +42 -18
  78. package/esm2022/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.mjs +18 -0
  79. package/esm2022/libs/ui/layout/src/lib/ui-layout.module.mjs +3 -8
  80. package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +2 -2
  81. package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +22 -1
  82. package/esm2022/libs/util/shared/src/lib/utils/bytes-convert.mjs +4 -0
  83. package/esm2022/libs/util/shared/src/lib/utils/image-resize.mjs +60 -0
  84. package/esm2022/libs/util/shared/src/lib/utils/index.mjs +8 -6
  85. package/esm2022/translations/de.json +39 -0
  86. package/esm2022/translations/en.json +39 -0
  87. package/esm2022/translations/es.json +39 -0
  88. package/esm2022/translations/fr.json +39 -0
  89. package/esm2022/translations/it.json +39 -0
  90. package/esm2022/translations/nl.json +39 -0
  91. package/esm2022/translations/pt.json +39 -0
  92. package/fesm2022/geonetwork-ui.mjs +3173 -1759
  93. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  94. package/index.d.ts +1 -0
  95. package/index.d.ts.map +1 -1
  96. package/index.ts +1 -0
  97. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  98. package/libs/api/repository/src/lib/gn4/auth/avatar.service.interface.d.ts +1 -0
  99. package/libs/api/repository/src/lib/gn4/auth/avatar.service.interface.d.ts.map +1 -1
  100. package/libs/api/repository/src/lib/gn4/auth/gravatar.service.d.ts +1 -0
  101. package/libs/api/repository/src/lib/gn4/auth/gravatar.service.d.ts.map +1 -1
  102. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.d.ts +6 -2
  103. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.d.ts.map +1 -1
  104. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +9 -6
  105. package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
  106. package/libs/common/domain/src/lib/model/record/index.d.ts +1 -0
  107. package/libs/common/domain/src/lib/model/record/index.d.ts.map +1 -1
  108. package/libs/common/domain/src/lib/model/record/user-feedbacks.model.d.ts +15 -0
  109. package/libs/common/domain/src/lib/model/record/user-feedbacks.model.d.ts.map +1 -0
  110. package/libs/common/domain/src/lib/model/user/index.d.ts +2 -0
  111. package/libs/common/domain/src/lib/model/user/index.d.ts.map +1 -0
  112. package/libs/common/domain/src/lib/platform.service.interface.d.ts +3 -0
  113. package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
  114. package/libs/data-access/gn4/src/openapi/api/records.api.service.d.ts +9 -5
  115. package/libs/data-access/gn4/src/openapi/api/records.api.service.d.ts.map +1 -1
  116. package/libs/data-access/gn4/src/openapi/model/models.d.ts +0 -1
  117. package/libs/data-access/gn4/src/openapi/model/models.d.ts.map +1 -1
  118. package/libs/feature/dataviz/src/lib/service/data.service.d.ts +3 -1
  119. package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
  120. package/libs/feature/editor/src/index.d.ts +1 -1
  121. package/libs/feature/editor/src/index.d.ts.map +1 -1
  122. package/libs/feature/editor/src/lib/+state/editor.facade.d.ts +8 -5
  123. package/libs/feature/editor/src/lib/+state/editor.facade.d.ts.map +1 -1
  124. package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-array/form-field-array.component.d.ts +1 -1
  125. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-array/form-field-array.component.d.ts.map +1 -0
  126. package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-file/form-field-file.component.d.ts +1 -1
  127. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-file/form-field-file.component.d.ts.map +1 -0
  128. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.d.ts +39 -0
  129. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.d.ts.map +1 -0
  130. package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-object/form-field-object.component.d.ts +1 -1
  131. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-object/form-field-object.component.d.ts.map +1 -0
  132. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.d.ts +8 -0
  133. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.d.ts.map +1 -0
  134. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts +16 -0
  135. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts.map +1 -0
  136. package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-simple/form-field-simple.component.d.ts +2 -2
  137. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-simple/form-field-simple.component.d.ts.map +1 -0
  138. package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts +1 -1
  139. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts.map +1 -0
  140. package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-temporal-extent/form-field-temporal-extent.component.d.ts +1 -1
  141. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extent/form-field-temporal-extent.component.d.ts.map +1 -0
  142. package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.component.d.ts +12 -4
  143. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -0
  144. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.d.ts.map +1 -0
  145. package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts.map +1 -0
  146. package/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.d.ts +3 -3
  147. package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts.map +1 -0
  148. package/libs/feature/editor/src/lib/feature-editor.module.d.ts +1 -1
  149. package/libs/feature/editor/src/lib/feature-editor.module.d.ts.map +1 -1
  150. package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
  151. package/libs/feature/editor/src/lib/models/fields.model.d.ts +1 -1
  152. package/libs/feature/notifications/src/index.d.ts +4 -0
  153. package/libs/feature/notifications/src/index.d.ts.map +1 -0
  154. package/libs/feature/notifications/src/lib/feature-notifications.module.d.ts +7 -0
  155. package/libs/feature/notifications/src/lib/feature-notifications.module.d.ts.map +1 -0
  156. package/libs/feature/notifications/src/lib/notification.model.d.ts +7 -0
  157. package/libs/feature/notifications/src/lib/notification.model.d.ts.map +1 -0
  158. package/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.d.ts +12 -0
  159. package/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.d.ts.map +1 -0
  160. package/libs/feature/notifications/src/lib/notifications.service.d.ts +15 -0
  161. package/libs/feature/notifications/src/lib/notifications.service.d.ts.map +1 -0
  162. package/libs/feature/record/src/lib/feature-record.module.d.ts.map +1 -1
  163. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
  164. package/libs/feature/record/src/lib/state/mdview.actions.d.ts +40 -6
  165. package/libs/feature/record/src/lib/state/mdview.actions.d.ts.map +1 -1
  166. package/libs/feature/record/src/lib/state/mdview.effects.d.ts +24 -4
  167. package/libs/feature/record/src/lib/state/mdview.effects.d.ts.map +1 -1
  168. package/libs/feature/record/src/lib/state/mdview.facade.d.ts +14 -4
  169. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  170. package/libs/feature/record/src/lib/state/mdview.reducer.d.ts +8 -5
  171. package/libs/feature/record/src/lib/state/mdview.reducer.d.ts.map +1 -1
  172. package/libs/feature/record/src/lib/state/mdview.selectors.d.ts +12 -9
  173. package/libs/feature/record/src/lib/state/mdview.selectors.d.ts.map +1 -1
  174. package/libs/ui/elements/src/index.d.ts +14 -14
  175. package/libs/ui/elements/src/index.d.ts.map +1 -1
  176. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +1 -1
  177. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts +3 -1
  178. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts.map +1 -1
  179. package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts +13 -0
  180. package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts.map +1 -0
  181. package/libs/ui/elements/src/lib/notification/notification.component.d.ts +13 -0
  182. package/libs/ui/elements/src/lib/notification/notification.component.d.ts.map +1 -0
  183. package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts +4 -2
  184. package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts.map +1 -1
  185. package/libs/ui/elements/src/lib/thumbnail/thumbnail.component.d.ts +1 -1
  186. package/libs/ui/elements/src/lib/thumbnail/thumbnail.component.d.ts.map +1 -1
  187. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +29 -28
  188. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  189. package/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.d.ts +11 -0
  190. package/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.d.ts.map +1 -0
  191. package/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.d.ts +22 -0
  192. package/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.d.ts.map +1 -0
  193. package/libs/ui/inputs/src/index.d.ts +15 -15
  194. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  195. package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
  196. package/libs/ui/inputs/src/lib/date-picker/date-picker.component.d.ts +9 -0
  197. package/libs/ui/inputs/src/lib/date-picker/date-picker.component.d.ts.map +1 -0
  198. package/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.d.ts +1 -1
  199. package/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.d.ts.map +1 -1
  200. package/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.d.ts +1 -1
  201. package/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.d.ts.map +1 -1
  202. package/libs/ui/inputs/src/lib/files-drop/files-drop.directive.d.ts +14 -0
  203. package/libs/ui/inputs/src/lib/files-drop/files-drop.directive.d.ts.map +1 -0
  204. package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts +44 -0
  205. package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts.map +1 -0
  206. package/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.d.ts +12 -0
  207. package/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.d.ts.map +1 -0
  208. package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts +7 -1
  209. package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts.map +1 -1
  210. package/libs/ui/inputs/src/lib/text-input/text-input.component.d.ts +4 -1
  211. package/libs/ui/inputs/src/lib/text-input/text-input.component.d.ts.map +1 -1
  212. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +35 -42
  213. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
  214. package/libs/ui/layout/src/index.d.ts +6 -4
  215. package/libs/ui/layout/src/index.d.ts.map +1 -1
  216. package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts +25 -0
  217. package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts.map +1 -0
  218. package/libs/ui/layout/src/lib/carousel/carousel.component.d.ts +13 -6
  219. package/libs/ui/layout/src/lib/carousel/carousel.component.d.ts.map +1 -1
  220. package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts +8 -0
  221. package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts.map +1 -0
  222. package/libs/ui/layout/src/lib/ui-layout.module.d.ts +4 -5
  223. package/libs/ui/layout/src/lib/ui-layout.module.d.ts.map +1 -1
  224. package/libs/util/shared/src/lib/links/link-utils.d.ts +18 -0
  225. package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
  226. package/libs/util/shared/src/lib/utils/bytes-convert.d.ts +2 -0
  227. package/libs/util/shared/src/lib/utils/bytes-convert.d.ts.map +1 -0
  228. package/libs/util/shared/src/lib/utils/image-resize.d.ts +3 -0
  229. package/libs/util/shared/src/lib/utils/image-resize.d.ts.map +1 -0
  230. package/libs/util/shared/src/lib/utils/index.d.ts +7 -5
  231. package/libs/util/shared/src/lib/utils/index.d.ts.map +1 -1
  232. package/package.json +1 -1
  233. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +7 -1
  234. package/src/libs/api/repository/src/lib/gn4/auth/avatar.service.interface.ts +1 -0
  235. package/src/libs/api/repository/src/lib/gn4/auth/gravatar.service.ts +12 -1
  236. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.ts +51 -1
  237. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +34 -7
  238. package/src/libs/common/domain/src/lib/model/record/index.ts +1 -0
  239. package/src/libs/common/domain/src/lib/model/record/user-feedbacks.model.ts +15 -0
  240. package/src/libs/common/domain/src/lib/platform.service.interface.ts +3 -0
  241. package/src/libs/common/fixtures/src/index.ts +8 -6
  242. package/src/libs/common/fixtures/src/lib/link.fixtures.ts +8 -0
  243. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +3 -3
  244. package/src/libs/common/fixtures/src/lib/user-feedbacks.fixtures.ts +83 -0
  245. package/src/libs/data-access/gn4/src/openapi/api/records.api.service.ts +43 -12
  246. package/src/libs/data-access/gn4/src/openapi/model/models.ts +0 -1
  247. package/src/libs/data-access/gn4/src/spec.yaml +1 -1
  248. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +52 -2
  249. package/src/libs/feature/editor/src/index.ts +1 -1
  250. package/src/libs/feature/editor/src/lib/+state/editor.facade.ts +8 -1
  251. package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.html +8 -0
  252. package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.ts +70 -0
  253. package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-array/form-field-array.component.ts +1 -0
  254. package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-file/form-field-file.component.ts +4 -1
  255. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.html +8 -0
  256. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.ts +64 -0
  257. package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-object/form-field-object.component.ts +1 -0
  258. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.html +4 -0
  259. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.ts +15 -0
  260. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.html +20 -0
  261. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.ts +44 -0
  262. package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-simple/form-field-simple.component.ts +4 -1
  263. package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-spatial-extent/form-field-spatial-extent.component.ts +1 -0
  264. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extent/form-field-temporal-extent.component.css +0 -0
  265. package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-temporal-extent/form-field-temporal-extent.component.ts +1 -0
  266. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.css +0 -0
  267. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +92 -0
  268. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +137 -0
  269. package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.css +0 -0
  270. package/src/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.html +1 -0
  271. package/src/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.ts +4 -4
  272. package/src/libs/feature/editor/src/lib/feature-editor.module.ts +9 -9
  273. package/src/libs/feature/editor/src/lib/fields.config.ts +15 -0
  274. package/src/libs/feature/editor/src/lib/models/fields.model.ts +1 -1
  275. package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.html +1 -1
  276. package/src/libs/feature/notifications/src/index.ts +3 -0
  277. package/src/libs/feature/notifications/src/lib/feature-notifications.module.ts +10 -0
  278. package/src/libs/feature/notifications/src/lib/notification.model.ts +6 -0
  279. package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.css +0 -0
  280. package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.html +17 -0
  281. package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.ts +44 -0
  282. package/src/libs/feature/notifications/src/lib/notifications.service.ts +27 -0
  283. package/src/libs/feature/record/src/lib/feature-record.module.ts +5 -2
  284. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +2 -1
  285. package/src/libs/feature/record/src/lib/state/mdview.actions.ts +51 -6
  286. package/src/libs/feature/record/src/lib/state/mdview.effects.ts +82 -7
  287. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +48 -8
  288. package/src/libs/feature/record/src/lib/state/mdview.reducer.ts +81 -24
  289. package/src/libs/feature/record/src/lib/state/mdview.selectors.ts +40 -10
  290. package/src/libs/feature/router/src/lib/default/state/router.effects.ts +2 -2
  291. package/src/libs/feature/search/src/lib/results-table/results-table.component.html +3 -3
  292. package/src/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.html +5 -5
  293. package/src/libs/ui/elements/src/index.ts +14 -14
  294. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +1 -1
  295. package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +1 -1
  296. package/src/libs/ui/elements/src/lib/link-card/link-card.component.html +38 -20
  297. package/src/libs/ui/elements/src/lib/link-card/link-card.component.ts +12 -0
  298. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.css +0 -5
  299. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.html +0 -21
  300. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.ts +1 -14
  301. package/src/libs/ui/elements/src/lib/notification/notification.component.css +0 -0
  302. package/src/libs/ui/elements/src/lib/notification/notification.component.html +52 -0
  303. package/src/libs/ui/elements/src/lib/notification/notification.component.ts +31 -0
  304. package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.html +2 -2
  305. package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts +43 -5
  306. package/src/libs/ui/elements/src/lib/thumbnail/thumbnail.component.ts +5 -3
  307. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +6 -3
  308. package/src/libs/ui/elements/src/lib/user-feedback-item/time-since.pipe.ts +54 -0
  309. package/src/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.css +0 -0
  310. package/src/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.html +75 -0
  311. package/src/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.ts +63 -0
  312. package/src/libs/ui/inputs/src/index.ts +15 -15
  313. package/src/libs/ui/inputs/src/lib/button/button.component.ts +1 -1
  314. package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.css +3 -0
  315. package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.html +11 -0
  316. package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.ts +16 -0
  317. package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.ts +8 -1
  318. package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.ts +13 -0
  319. package/src/libs/ui/inputs/src/lib/files-drop/files-drop.directive.ts +45 -0
  320. package/src/libs/ui/inputs/src/lib/image-input/image-input.component.css +0 -0
  321. package/src/libs/ui/inputs/src/lib/image-input/image-input.component.html +146 -0
  322. package/src/libs/ui/inputs/src/lib/image-input/image-input.component.ts +193 -0
  323. package/src/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.css +6 -0
  324. package/src/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.html +26 -0
  325. package/src/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.ts +32 -0
  326. package/src/libs/ui/inputs/src/lib/text-area/text-area.component.html +2 -1
  327. package/src/libs/ui/inputs/src/lib/text-area/text-area.component.ts +29 -0
  328. package/src/libs/ui/inputs/src/lib/text-input/text-input.component.html +1 -1
  329. package/src/libs/ui/inputs/src/lib/text-input/text-input.component.ts +16 -1
  330. package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +5 -21
  331. package/src/libs/ui/layout/src/index.ts +6 -4
  332. package/src/libs/ui/layout/src/lib/block-list/block-list.component.css +23 -0
  333. package/src/libs/ui/layout/src/lib/block-list/block-list.component.html +20 -0
  334. package/src/libs/ui/layout/src/lib/block-list/block-list.component.ts +84 -0
  335. package/src/libs/ui/layout/src/lib/carousel/carousel.component.css +7 -4
  336. package/src/libs/ui/layout/src/lib/carousel/carousel.component.html +4 -4
  337. package/src/libs/ui/layout/src/lib/carousel/carousel.component.ts +45 -15
  338. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.css +0 -0
  339. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.html +18 -0
  340. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.ts +16 -0
  341. package/src/libs/ui/layout/src/lib/ui-layout.module.ts +0 -2
  342. package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +1 -1
  343. package/src/libs/util/shared/src/lib/links/link-utils.ts +21 -0
  344. package/src/libs/util/shared/src/lib/utils/bytes-convert.ts +3 -0
  345. package/src/libs/util/shared/src/lib/utils/image-resize.ts +72 -0
  346. package/src/libs/util/shared/src/lib/utils/index.ts +7 -5
  347. package/tailwind.base.css +36 -0
  348. package/translations/de.json +39 -0
  349. package/translations/en.json +39 -0
  350. package/translations/es.json +39 -0
  351. package/translations/fr.json +39 -0
  352. package/translations/it.json +39 -0
  353. package/translations/nl.json +39 -0
  354. package/translations/pt.json +39 -0
  355. package/translations/sk.json +39 -0
  356. package/esm2022/libs/data-access/gn4/src/openapi/model/inlineObject3.api.model.mjs +0 -13
  357. package/esm2022/libs/feature/editor/src/lib/record-form/record-form.component.mjs +0 -30
  358. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-array/form-field-array.component.mjs +0 -11
  359. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-file/form-field-file.component.mjs +0 -27
  360. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-object/form-field-object.component.mjs +0 -11
  361. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.mjs +0 -27
  362. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-simple/form-field-simple.component.mjs +0 -49
  363. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +0 -11
  364. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-temporal-extent/form-field-temporal-extent.component.mjs +0 -11
  365. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field.component.mjs +0 -76
  366. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field.model.mjs +0 -2
  367. package/esm2022/libs/ui/inputs/src/lib/form-field/index.mjs +0 -10
  368. package/libs/data-access/gn4/src/openapi/model/inlineObject3.api.model.d.ts +0 -18
  369. package/libs/data-access/gn4/src/openapi/model/inlineObject3.api.model.d.ts.map +0 -1
  370. package/libs/feature/editor/src/lib/record-form/record-form.component.d.ts.map +0 -1
  371. package/libs/ui/inputs/src/lib/form-field/form-field-array/form-field-array.component.d.ts.map +0 -1
  372. package/libs/ui/inputs/src/lib/form-field/form-field-file/form-field-file.component.d.ts.map +0 -1
  373. package/libs/ui/inputs/src/lib/form-field/form-field-object/form-field-object.component.d.ts.map +0 -1
  374. package/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.d.ts +0 -11
  375. package/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.d.ts.map +0 -1
  376. package/libs/ui/inputs/src/lib/form-field/form-field-simple/form-field-simple.component.d.ts.map +0 -1
  377. package/libs/ui/inputs/src/lib/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts.map +0 -1
  378. package/libs/ui/inputs/src/lib/form-field/form-field-temporal-extent/form-field-temporal-extent.component.d.ts.map +0 -1
  379. package/libs/ui/inputs/src/lib/form-field/form-field.component.d.ts.map +0 -1
  380. package/libs/ui/inputs/src/lib/form-field/form-field.model.d.ts.map +0 -1
  381. package/libs/ui/inputs/src/lib/form-field/index.d.ts.map +0 -1
  382. package/src/libs/data-access/gn4/src/openapi/model/inlineObject3.api.model.ts +0 -18
  383. package/src/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.html +0 -11
  384. package/src/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.ts +0 -15
  385. package/src/libs/ui/inputs/src/lib/form-field/form-field.component.html +0 -68
  386. package/src/libs/ui/inputs/src/lib/form-field/form-field.component.ts +0 -80
  387. /package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.model.d.ts +0 -0
  388. /package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/index.d.ts +0 -0
  389. /package/src/libs/feature/editor/src/lib/{record-form/record-form.component.css → components/overview-upload/overview-upload.component.css} +0 -0
  390. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-array/form-field-array.component.css +0 -0
  391. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-array/form-field-array.component.html +0 -0
  392. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-file/form-field-file.component.css +0 -0
  393. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-file/form-field-file.component.html +0 -0
  394. /package/src/libs/{ui/inputs/src/lib/form-field/form-field-object/form-field-object.component.css → feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.css} +0 -0
  395. /package/src/libs/{ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.css → feature/editor/src/lib/components/record-form/form-field/form-field-object/form-field-object.component.css} +0 -0
  396. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-object/form-field-object.component.html +0 -0
  397. /package/src/libs/{ui/inputs/src/lib/form-field/form-field-simple/form-field-simple.component.css → feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.css} +0 -0
  398. /package/src/libs/{ui/inputs/src/lib/form-field/form-field-spatial-extent/form-field-spatial-extent.component.css → feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.css} +0 -0
  399. /package/src/libs/{ui/inputs/src/lib/form-field/form-field-temporal-extent/form-field-temporal-extent.component.css → feature/editor/src/lib/components/record-form/form-field/form-field-simple/form-field-simple.component.css} +0 -0
  400. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-simple/form-field-simple.component.html +0 -0
  401. /package/src/libs/{ui/inputs/src/lib/form-field/form-field.component.css → feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.css} +0 -0
  402. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-spatial-extent/form-field-spatial-extent.component.html +0 -0
  403. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-temporal-extent/form-field-temporal-extent.component.html +0 -0
  404. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.model.ts +0 -0
  405. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/index.ts +0 -0
@@ -0,0 +1,11 @@
1
+ <div
2
+ class="flex items-center justify-between pl-3 rounded-lg border border-gray-300 bg-white"
3
+ >
4
+ <input
5
+ [matDatepicker]="picker"
6
+ [value]="date"
7
+ (dateChange)="dateChange.emit($event.value)"
8
+ />
9
+ <mat-datepicker-toggle matIconSuffix [for]="picker"></mat-datepicker-toggle>
10
+ </div>
11
+ <mat-datepicker #picker></mat-datepicker>
@@ -0,0 +1,16 @@
1
+ import { Component, EventEmitter, Input, Output } from '@angular/core'
2
+ import { MatNativeDateModule } from '@angular/material/core'
3
+ import { MatDatepickerModule } from '@angular/material/datepicker'
4
+ import { MatIconModule } from '@angular/material/icon'
5
+
6
+ @Component({
7
+ selector: 'gn-ui-date-picker',
8
+ templateUrl: './date-picker.component.html',
9
+ styleUrls: ['./date-picker.component.css'],
10
+ standalone: true,
11
+ imports: [MatIconModule, MatNativeDateModule, MatDatepickerModule],
12
+ })
13
+ export class DatePickerComponent {
14
+ @Input() date: Date
15
+ @Output() dateChange = new EventEmitter<Date>()
16
+ }
@@ -1,10 +1,17 @@
1
1
  import { Component } from '@angular/core'
2
- import { MatDatepickerInputEvent } from '@angular/material/datepicker'
2
+ import { MatNativeDateModule } from '@angular/material/core'
3
+ import {
4
+ MatDatepickerInputEvent,
5
+ MatDatepickerModule,
6
+ } from '@angular/material/datepicker'
7
+ import { MatIconModule } from '@angular/material/icon'
3
8
 
4
9
  @Component({
5
10
  selector: 'gn-ui-date-range-picker',
6
11
  templateUrl: './date-range-picker.component.html',
7
12
  styleUrls: ['./date-range-picker.component.css'],
13
+ standalone: true,
14
+ imports: [MatIconModule, MatNativeDateModule, MatDatepickerModule],
8
15
  })
9
16
  export class DateRangePickerComponent {
10
17
  startDate: Date
@@ -2,6 +2,7 @@ import {
2
2
  CdkConnectedOverlay,
3
3
  CdkOverlayOrigin,
4
4
  ConnectedPosition,
5
+ OverlayModule,
5
6
  } from '@angular/cdk/overlay'
6
7
  import {
7
8
  ChangeDetectionStrategy,
@@ -17,6 +18,10 @@ import {
17
18
  } from '@angular/core'
18
19
  import { firstValueFrom } from 'rxjs'
19
20
  import { DropdownChoice } from './dropdown-selector.model'
21
+ import { CommonModule } from '@angular/common'
22
+ import { TranslateModule } from '@ngx-translate/core'
23
+ import { MatIconModule } from '@angular/material/icon'
24
+ import { ButtonComponent } from '../button/button.component'
20
25
 
21
26
  const DEFAULT_ROW_NUMBERS = 6
22
27
 
@@ -25,6 +30,14 @@ const DEFAULT_ROW_NUMBERS = 6
25
30
  templateUrl: './dropdown-selector.component.html',
26
31
  styleUrls: ['./dropdown-selector.component.css'],
27
32
  changeDetection: ChangeDetectionStrategy.OnPush,
33
+ standalone: true,
34
+ imports: [
35
+ CommonModule,
36
+ ButtonComponent,
37
+ OverlayModule,
38
+ MatIconModule,
39
+ TranslateModule,
40
+ ],
28
41
  })
29
42
  export class DropdownSelectorComponent implements OnInit {
30
43
  @Input() title: string
@@ -0,0 +1,45 @@
1
+ import { Directive, HostListener, Output, EventEmitter } from '@angular/core'
2
+
3
+ @Directive({
4
+ selector: '[gnUiFilesDrop]',
5
+ standalone: true,
6
+ })
7
+ export class FilesDropDirective {
8
+ @Output() dragFilesOver: EventEmitter<boolean> = new EventEmitter()
9
+ @Output() dropFiles: EventEmitter<File[]> = new EventEmitter()
10
+
11
+ dragEnterCounter = 0
12
+
13
+ @HostListener('dragenter', ['$event'])
14
+ _onDragEnter(event: DragEvent) {
15
+ event.preventDefault()
16
+ this.dragEnterCounter++
17
+ this.dragFilesOver.emit(true)
18
+ }
19
+
20
+ @HostListener('dragover', ['$event'])
21
+ _onDragOver(event: DragEvent) {
22
+ event.preventDefault()
23
+ }
24
+
25
+ @HostListener('dragleave', ['$event'])
26
+ _onDragLeave(event: DragEvent) {
27
+ event.preventDefault()
28
+ this.dragEnterCounter = Math.max(0, this.dragEnterCounter - 1)
29
+ if (this.dragEnterCounter === 0) {
30
+ this.dragFilesOver.emit(false)
31
+ }
32
+ }
33
+
34
+ @HostListener('drop', ['$event'])
35
+ _onDrop(event: DragEvent) {
36
+ event.preventDefault()
37
+ this.dragEnterCounter = 0
38
+ this.dragFilesOver.emit(false)
39
+
40
+ const files = Array.from(event.dataTransfer.files)
41
+ if (files.length > 0) {
42
+ this.dropFiles.emit(files)
43
+ }
44
+ }
45
+ }
@@ -0,0 +1,146 @@
1
+ <ng-container *ngIf="previewUrl; then withImage; else withoutImage">
2
+ </ng-container>
3
+
4
+ <ng-template #withImage>
5
+ <div class="w-full h-full flex flex-col gap-2">
6
+ <div class="flex-1 group relative">
7
+ <img
8
+ class="w-full h-full object-cover border-2 border-gray-300 rounded-lg"
9
+ [alt]="altText"
10
+ loading="lazy"
11
+ [src]="previewUrl"
12
+ />
13
+ <gn-ui-button
14
+ [extraClass]="
15
+ 'bg-gray-200 absolute right-2 bottom-2 invisible group-hover:visible'
16
+ "
17
+ (buttonClick)="handleDelete()"
18
+ >
19
+ <mat-icon class="material-symbols-outlined">delete</mat-icon>
20
+ </gn-ui-button>
21
+ </div>
22
+ <input
23
+ *ngIf="showAltTextInput"
24
+ type="text"
25
+ class="py-3 px-2 border-2 border-gray-300 rounded-lg text-sm font-medium"
26
+ [placeholder]="'input.image.altTextPlaceholder' | translate"
27
+ [value]="altText"
28
+ (change)="handleAltTextChange($event)"
29
+ />
30
+ <div class="flex flex-row gap-2">
31
+ <gn-ui-button
32
+ [extraClass]="'bg-gray-200 font-bold'"
33
+ (buttonClick)="handleDelete()"
34
+ >
35
+ <mat-icon class="material-symbols-outlined me-1">delete</mat-icon>
36
+ {{ 'input.image.delete' | translate }}
37
+ </gn-ui-button>
38
+ <gn-ui-button
39
+ *ngIf="!showAltTextInput"
40
+ [extraClass]="'bg-gray-200 font-bold'"
41
+ (buttonClick)="toggleAltTextInput()"
42
+ >
43
+ <mat-icon class="material-symbols-outlined me-1">add</mat-icon>
44
+ {{ 'input.image.displayAltTextInput' | translate }}
45
+ </gn-ui-button>
46
+ </div>
47
+ </div>
48
+ </ng-template>
49
+
50
+ <ng-template #withoutImage>
51
+ <div class="w-full h-full flex flex-col gap-2">
52
+ <label
53
+ gnUiFilesDrop
54
+ class="block flex-1 border-2 border-dashed border-gray-300 rounded-lg p-6 flex flex-col items-center justify-center gap-4"
55
+ (dragFilesOver)="handleDragFilesOver($event)"
56
+ (dropFiles)="handleDropFiles($event)"
57
+ >
58
+ <div class="w-14 h-14 rounded-md bg-gray-200 grid">
59
+ <mat-icon
60
+ *ngIf="!dragFilesOver && !uploadProgress && !uploadError"
61
+ class="material-symbols-outlined place-self-center text-blue-500"
62
+ >image</mat-icon
63
+ >
64
+ <mat-icon
65
+ *ngIf="dragFilesOver && !uploadProgress && !uploadError"
66
+ class="material-symbols-outlined place-self-center text-blue-500"
67
+ >add_box</mat-icon
68
+ >
69
+ <div *ngIf="uploadProgress">
70
+ <mat-progress-spinner
71
+ class="place-self-center"
72
+ [diameter]="56"
73
+ [mode]="'determinate'"
74
+ [value]="uploadProgress"
75
+ ></mat-progress-spinner>
76
+ <span
77
+ class="text-sm font-medium relative inline-block width-[30px] bottom-[40px] left-[15px]"
78
+ >
79
+ {{ uploadProgress }}%
80
+ </span>
81
+ </div>
82
+ <mat-icon
83
+ *ngIf="uploadError"
84
+ class="material-symbols-outlined place-self-center text-rose-500"
85
+ >broken_image</mat-icon
86
+ >
87
+ </div>
88
+ <div class="flex flex-col items-center gap-1">
89
+ <p class="font-medium">{{ getPrimaryText() | translate }}</p>
90
+ <p
91
+ class="text-sm"
92
+ [class]="
93
+ uploadProgress || uploadError
94
+ ? 'font-bold text-blue-500 cursor-pointer'
95
+ : 'font-medium text-gray-500'
96
+ "
97
+ (click)="handleSecondaryTextClick()"
98
+ >
99
+ {{ getSecondaryText() | translate }}
100
+ </p>
101
+ </div>
102
+ <input
103
+ type="file"
104
+ class="hidden"
105
+ (change)="handleFileInput($event)"
106
+ [disabled]="showUrlInput || uploadProgress || uploadError"
107
+ />
108
+ </label>
109
+ <div *ngIf="!showUrlInput" class="flex-none">
110
+ <gn-ui-button
111
+ [extraClass]="'bg-gray-200 font-bold'"
112
+ (buttonClick)="displayUrlInput()"
113
+ >
114
+ <mat-icon class="material-symbols-outlined me-1">link</mat-icon>
115
+ {{ 'input.image.displayUrlInput' | translate }}
116
+ </gn-ui-button>
117
+ </div>
118
+ <div *ngIf="showUrlInput" class="flex-none flex flex-col gap-2">
119
+ <div class="h-2"></div>
120
+ <div class="flex gap-2 items-center">
121
+ <div class="flex-1 flex rounded-lg">
122
+ <span
123
+ class="material-symbols-outlined px-4 inline-flex items-center min-w-fit rounded-s-lg border-2 border-e-0 border-gray-300"
124
+ >link</span
125
+ >
126
+ <input
127
+ type="text"
128
+ class="py-3 ps-1 block w-full border-2 border-s-0 border-e-0 border-gray-300 text-sm font-medium"
129
+ placeholder="https://exemple.com/image.jpg"
130
+ (change)="handleUrlChange($event)"
131
+ />
132
+ <gn-ui-button
133
+ class="px-1 inline-flex items-center min-w-fit rounded-e-lg border-2 border-s-0 border-gray-300 text-white"
134
+ [extraClass]="
135
+ urlInputValue && !downloadError ? 'bg-blue-500' : 'bg-gray-500'
136
+ "
137
+ [disabled]="!urlInputValue || downloadError"
138
+ (buttonClick)="downloadUrl()"
139
+ >
140
+ <mat-icon class="material-symbols-outlined">arrow_upward</mat-icon>
141
+ </gn-ui-button>
142
+ </div>
143
+ </div>
144
+ </div>
145
+ </div>
146
+ </ng-template>
@@ -0,0 +1,193 @@
1
+ import { CommonModule } from '@angular/common'
2
+ import { HttpClient } from '@angular/common/http'
3
+ import {
4
+ ChangeDetectionStrategy,
5
+ ChangeDetectorRef,
6
+ Component,
7
+ EventEmitter,
8
+ Input,
9
+ Output,
10
+ } from '@angular/core'
11
+ import { MatIconModule } from '@angular/material/icon'
12
+ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'
13
+ import { downgradeImage, megabytesToBytes } from '../../../../../../libs/util/shared/src'
14
+ import { firstValueFrom } from 'rxjs'
15
+ import { ButtonComponent } from '../button/button.component'
16
+ import { FilesDropDirective } from '../files-drop/files-drop.directive'
17
+ import { TranslateModule } from '@ngx-translate/core'
18
+ import { marker } from '@biesbjerg/ngx-translate-extract-marker'
19
+
20
+ @Component({
21
+ selector: 'gn-ui-image-input',
22
+ templateUrl: './image-input.component.html',
23
+ styleUrls: ['./image-input.component.css'],
24
+ changeDetection: ChangeDetectionStrategy.OnPush,
25
+ standalone: true,
26
+ imports: [
27
+ CommonModule,
28
+ ButtonComponent,
29
+ MatIconModule,
30
+ FilesDropDirective,
31
+ MatProgressSpinnerModule,
32
+ TranslateModule,
33
+ ],
34
+ })
35
+ export class ImageInputComponent {
36
+ @Input() maxSizeMB: number
37
+ @Input() previewUrl?: string
38
+ @Input() altText?: string
39
+ @Input() uploadProgress?: number
40
+ @Input() uploadError?: boolean
41
+ @Output() fileChange: EventEmitter<File> = new EventEmitter()
42
+ @Output() urlChange: EventEmitter<string> = new EventEmitter()
43
+ @Output() uploadCancel: EventEmitter<void> = new EventEmitter()
44
+ @Output() delete: EventEmitter<void> = new EventEmitter()
45
+ @Output() altTextChange: EventEmitter<string> = new EventEmitter()
46
+
47
+ dragFilesOver = false
48
+ showUrlInput = false
49
+ downloadError = false
50
+ showAltTextInput = false
51
+
52
+ urlInputValue?: string
53
+ lastUploadType?: 'file' | 'url'
54
+ lastUploadContent?: string | File
55
+
56
+ constructor(private http: HttpClient, private cd: ChangeDetectorRef) {}
57
+
58
+ getPrimaryText() {
59
+ if (this.uploadError) {
60
+ return marker('input.image.uploadErrorLabel')
61
+ }
62
+ if (this.uploadProgress) {
63
+ return marker('input.image.uploadProgressLabel')
64
+ }
65
+ return marker('input.image.selectFileLabel')
66
+ }
67
+
68
+ getSecondaryText() {
69
+ if (this.uploadError) {
70
+ return marker('input.image.uploadErrorRetry')
71
+ }
72
+ if (this.uploadProgress) {
73
+ return marker('input.image.uploadProgressCancel')
74
+ }
75
+ return marker('input.image.dropFileLabel')
76
+ }
77
+
78
+ handleDragFilesOver(dragFilesOver: boolean) {
79
+ if (!this.showUrlInput) {
80
+ this.dragFilesOver = dragFilesOver
81
+ this.cd.markForCheck()
82
+ }
83
+ }
84
+
85
+ handleDropFiles(files: File[]) {
86
+ if (!this.showUrlInput) {
87
+ const validFiles = this.filterTypeImage(files)
88
+ if (validFiles.length > 0) {
89
+ this.resizeAndEmit(validFiles[0])
90
+ }
91
+ }
92
+ }
93
+
94
+ handleFileInput(event: Event) {
95
+ const inputFiles = Array.from((event.target as HTMLInputElement).files)
96
+ const validFiles = this.filterTypeImage(inputFiles)
97
+ if (validFiles.length > 0) {
98
+ this.resizeAndEmit(validFiles[0])
99
+ }
100
+ }
101
+
102
+ displayUrlInput() {
103
+ this.uploadCancel.emit()
104
+ this.showUrlInput = true
105
+ }
106
+
107
+ handleUrlChange(event: Event) {
108
+ this.downloadError = false
109
+ this.urlInputValue = (event.target as HTMLInputElement).value
110
+ }
111
+
112
+ async downloadUrl() {
113
+ const name = this.urlInputValue.split('/').pop()
114
+
115
+ try {
116
+ const response = await firstValueFrom(
117
+ this.http.head(this.urlInputValue, { observe: 'response' })
118
+ )
119
+ if (
120
+ response.headers.get('content-type')?.startsWith('image/') &&
121
+ parseInt(response.headers.get('content-length')) <
122
+ megabytesToBytes(this.maxSizeMB)
123
+ ) {
124
+ this.http.get(this.urlInputValue, { responseType: 'blob' }).subscribe({
125
+ next: (blob) => {
126
+ this.cd.markForCheck()
127
+ const file = new File([blob], name)
128
+ this.fileChange.emit(file)
129
+ },
130
+ error: () => {
131
+ this.downloadError = true
132
+ this.cd.markForCheck()
133
+ this.urlChange.emit(this.urlInputValue)
134
+ },
135
+ })
136
+ }
137
+ } catch {
138
+ this.downloadError = true
139
+ this.cd.markForCheck()
140
+ return
141
+ }
142
+ }
143
+
144
+ handleSecondaryTextClick() {
145
+ if (this.uploadError) {
146
+ this.handleRetry()
147
+ } else if (this.uploadProgress) {
148
+ this.handleCancel()
149
+ }
150
+ }
151
+
152
+ handleCancel() {
153
+ this.uploadCancel.emit()
154
+ }
155
+
156
+ handleRetry() {
157
+ switch (this.lastUploadType) {
158
+ case 'file':
159
+ this.fileChange.emit(this.lastUploadContent as File)
160
+ break
161
+ case 'url':
162
+ this.urlChange.emit(this.lastUploadContent as string)
163
+ break
164
+ }
165
+ }
166
+
167
+ handleDelete() {
168
+ this.delete.emit()
169
+ }
170
+
171
+ toggleAltTextInput() {
172
+ this.showAltTextInput = !this.showAltTextInput
173
+ }
174
+
175
+ handleAltTextChange(event: Event) {
176
+ const input = event.target as HTMLInputElement
177
+ this.altTextChange.emit(input.value)
178
+ }
179
+
180
+ private filterTypeImage(files: File[]) {
181
+ return files.filter((file) => {
182
+ return file.type.startsWith('image/')
183
+ })
184
+ }
185
+
186
+ private resizeAndEmit(imageToResize: File) {
187
+ const maxSizeBytes = megabytesToBytes(this.maxSizeMB)
188
+ downgradeImage(imageToResize, maxSizeBytes).then((resizedImage) => {
189
+ const fileToEmit = new File([resizedImage], imageToResize.name)
190
+ this.fileChange.emit(fileToEmit)
191
+ })
192
+ }
193
+ }
@@ -0,0 +1,6 @@
1
+ :host {
2
+ --gn-ui-button-rounded: 100%;
3
+ --gn-ui-button-width: 8px;
4
+ --gn-ui-button-height: 8px;
5
+ --gn-ui-button-padding: 12px;
6
+ }
@@ -0,0 +1,26 @@
1
+ <div class="flex flex-row gap-x-4 items-center">
2
+ <gn-ui-button
3
+ data-test="previousButton"
4
+ [type]="isFirst ? 'default' : 'outline'"
5
+ [disabled]="isFirst"
6
+ (buttonClick)="previousButtonClicked()"
7
+ >
8
+ <mat-icon
9
+ class="material-symbols-outlined text-[14px] text-center pt-[5px]"
10
+ >
11
+ arrow_back
12
+ </mat-icon>
13
+ </gn-ui-button>
14
+ <gn-ui-button
15
+ data-test="nextButton"
16
+ [type]="isLast ? 'default' : 'outline'"
17
+ [disabled]="isLast"
18
+ (buttonClick)="nextButtonClicked()"
19
+ >
20
+ <mat-icon
21
+ class="material-symbols-outlined text-[14px] text-center pt-[5px]"
22
+ >
23
+ arrow_forward
24
+ </mat-icon>
25
+ </gn-ui-button>
26
+ </div>
@@ -0,0 +1,32 @@
1
+ import {
2
+ ChangeDetectionStrategy,
3
+ Component,
4
+ EventEmitter,
5
+ Input,
6
+ Output,
7
+ } from '@angular/core'
8
+ import { ButtonComponent } from '../button/button.component'
9
+ import { MatIconModule } from '@angular/material/icon'
10
+
11
+ @Component({
12
+ selector: 'gn-ui-previous-next-buttons',
13
+ templateUrl: './previous-next-buttons.component.html',
14
+ styleUrls: ['./previous-next-buttons.component.css'],
15
+ changeDetection: ChangeDetectionStrategy.OnPush,
16
+ standalone: true,
17
+ imports: [ButtonComponent, MatIconModule],
18
+ })
19
+ export class PreviousNextButtonsComponent {
20
+ @Input() isFirst: boolean
21
+ @Input() isLast: boolean
22
+
23
+ @Output() directionButtonClicked: EventEmitter<string> = new EventEmitter()
24
+
25
+ previousButtonClicked() {
26
+ this.directionButtonClicked.next('previous')
27
+ }
28
+
29
+ nextButtonClicked() {
30
+ this.directionButtonClicked.next('next')
31
+ }
32
+ }
@@ -2,11 +2,12 @@
2
2
  <textarea
3
3
  #input
4
4
  name="textArea"
5
+ [disabled]="disabled"
5
6
  [placeholder]="placeholder"
6
7
  [value]="value"
7
8
  (change)="handleChange($event)"
8
9
  (input)="handleChange($event)"
9
- class="w-full pt-2 pl-2 resize-none border border-gray-800 rounded italic leading-tight focus:outline-none focus:bg-background focus:border-primary"
10
+ [class]="classList"
10
11
  [attr.required]="required || null"
11
12
  ></textarea>
12
13
  </div>
@@ -15,7 +15,12 @@ import { distinctUntilChanged } from 'rxjs/operators'
15
15
  standalone: true,
16
16
  })
17
17
  export class TextAreaComponent implements AfterViewInit {
18
+ private readonly baseClasses: string
19
+ private readonly disabledClasses: string
20
+
18
21
  @Input() value = ''
22
+ @Input() disabled = false
23
+ @Input() extraClass = ''
19
24
  @Input() placeholder: string
20
25
  @Input() required = false
21
26
 
@@ -24,6 +29,30 @@ export class TextAreaComponent implements AfterViewInit {
24
29
 
25
30
  @ViewChild('input') input
26
31
 
32
+ constructor() {
33
+ this.baseClasses = [
34
+ 'w-full',
35
+ 'pt-2',
36
+ 'pl-2',
37
+ 'resize-none',
38
+ 'border',
39
+ 'border-gray-800',
40
+ 'rounded italic',
41
+ 'leading-tight',
42
+ 'focus:outline-none',
43
+ 'focus:bg-background',
44
+ 'focus:border-primary',
45
+ ].join(' ')
46
+
47
+ this.disabledClasses = ['cursor-not-allowed'].join(' ')
48
+ }
49
+
50
+ get classList() {
51
+ return `${this.baseClasses} ${this.extraClass} ${
52
+ this.disabled ? this.disabledClasses : ''
53
+ }`
54
+ }
55
+
27
56
  ngAfterViewInit() {
28
57
  this.checkRequired(this.input.nativeElement.value)
29
58
  }
@@ -1,6 +1,6 @@
1
1
  <input
2
2
  #input
3
- class="appearance-none border border-gray-300 rounded w-full p-2 text-gray-700 leading-tight focus:outline-none focus:border-primary"
3
+ [class]="classList"
4
4
  type="text"
5
5
  [value]="value"
6
6
  (change)="handleChange($event)"
@@ -14,14 +14,29 @@ import { Subject } from 'rxjs'
14
14
  styleUrls: ['./text-input.component.css'],
15
15
  })
16
16
  export class TextInputComponent implements AfterViewInit {
17
+ private readonly baseClass = [
18
+ 'appearance-none',
19
+ 'border border-gray-300',
20
+ 'rounded w-full',
21
+ 'p-2',
22
+ 'text-gray-700',
23
+ 'leading-tight',
24
+ 'focus:outline-none',
25
+ 'focus:border-primary',
26
+ ].join(' ')
27
+
17
28
  @Input() value = ''
29
+ @Input() extraClass = ''
18
30
  @Input() hint: string
19
31
  @Input() required = false
20
32
  rawChange = new Subject<string>()
21
33
  @Output() valueChange = this.rawChange.pipe(distinctUntilChanged())
22
-
23
34
  @ViewChild('input') input
24
35
 
36
+ get classList() {
37
+ return `${this.baseClass} ${this.extraClass}`
38
+ }
39
+
25
40
  ngAfterViewInit() {
26
41
  this.checkRequired(this.input.nativeElement.value)
27
42
  }