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

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 (246) hide show
  1. package/esm2022/index.mjs +2 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +5 -1
  3. package/esm2022/libs/data-access/gn4/src/openapi/api/records.api.service.mjs +35 -7
  4. package/esm2022/libs/data-access/gn4/src/openapi/model/models.mjs +1 -2
  5. package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +2 -2
  6. package/esm2022/libs/feature/editor/src/index.mjs +2 -2
  7. package/esm2022/libs/feature/editor/src/lib/+state/editor.facade.mjs +6 -2
  8. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-array/form-field-array.component.mjs +11 -0
  9. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-file/form-field-file.component.mjs +28 -0
  10. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-object/form-field-object.component.mjs +11 -0
  11. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.mjs +45 -0
  12. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-simple/form-field-simple.component.mjs +50 -0
  13. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +11 -0
  14. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extent/form-field-temporal-extent.component.mjs +11 -0
  15. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +107 -0
  16. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.mjs +2 -0
  17. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/index.mjs +10 -0
  18. package/esm2022/libs/feature/editor/src/lib/components/record-form/record-form.component.mjs +29 -0
  19. package/esm2022/libs/feature/editor/src/lib/feature-editor.module.mjs +10 -10
  20. package/esm2022/libs/feature/editor/src/lib/models/fields.model.mjs +1 -1
  21. package/esm2022/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.mjs +3 -3
  22. package/esm2022/libs/feature/notifications/src/index.mjs +4 -0
  23. package/esm2022/libs/feature/notifications/src/lib/feature-notifications.module.mjs +18 -0
  24. package/esm2022/libs/feature/notifications/src/lib/notification.model.mjs +2 -0
  25. package/esm2022/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.mjs +49 -0
  26. package/esm2022/libs/feature/notifications/src/lib/notifications.service.mjs +29 -0
  27. package/esm2022/libs/feature/search/src/lib/results-table/results-table.component.mjs +3 -3
  28. package/esm2022/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.mjs +3 -3
  29. package/esm2022/libs/ui/elements/src/index.mjs +15 -15
  30. package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +5 -5
  31. package/esm2022/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.mjs +45 -0
  32. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
  33. package/esm2022/libs/ui/elements/src/lib/notification/notification.component.mjs +34 -0
  34. package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +3 -3
  35. package/esm2022/libs/ui/elements/src/lib/thumbnail/thumbnail.component.mjs +4 -3
  36. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +6 -5
  37. package/esm2022/libs/ui/inputs/src/index.mjs +1 -2
  38. package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +2 -1
  39. package/esm2022/libs/ui/inputs/src/lib/files-drop/files-drop.directive.mjs +59 -0
  40. package/esm2022/libs/ui/inputs/src/lib/image-input/image-input.component.mjs +183 -0
  41. package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +10 -23
  42. package/esm2022/libs/ui/layout/src/index.mjs +6 -5
  43. package/esm2022/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.mjs +18 -0
  44. package/esm2022/libs/util/shared/src/lib/utils/bytes-convert.mjs +4 -0
  45. package/esm2022/libs/util/shared/src/lib/utils/image-resize.mjs +60 -0
  46. package/esm2022/libs/util/shared/src/lib/utils/index.mjs +8 -6
  47. package/esm2022/translations/de.json +18 -0
  48. package/esm2022/translations/en.json +18 -0
  49. package/esm2022/translations/es.json +18 -0
  50. package/esm2022/translations/fr.json +18 -0
  51. package/esm2022/translations/it.json +18 -0
  52. package/esm2022/translations/nl.json +18 -0
  53. package/esm2022/translations/pt.json +18 -0
  54. package/fesm2022/geonetwork-ui.mjs +1766 -1142
  55. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  56. package/index.d.ts +1 -0
  57. package/index.d.ts.map +1 -1
  58. package/index.ts +1 -0
  59. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  60. package/libs/data-access/gn4/src/openapi/api/records.api.service.d.ts +9 -5
  61. package/libs/data-access/gn4/src/openapi/api/records.api.service.d.ts.map +1 -1
  62. package/libs/data-access/gn4/src/openapi/model/models.d.ts +0 -1
  63. package/libs/data-access/gn4/src/openapi/model/models.d.ts.map +1 -1
  64. package/libs/feature/editor/src/index.d.ts +1 -1
  65. package/libs/feature/editor/src/index.d.ts.map +1 -1
  66. package/libs/feature/editor/src/lib/+state/editor.facade.d.ts +8 -5
  67. package/libs/feature/editor/src/lib/+state/editor.facade.d.ts.map +1 -1
  68. 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
  69. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-array/form-field-array.component.d.ts.map +1 -0
  70. 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
  71. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-file/form-field-file.component.d.ts.map +1 -0
  72. 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
  73. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-object/form-field-object.component.d.ts.map +1 -0
  74. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts +16 -0
  75. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts.map +1 -0
  76. 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
  77. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-simple/form-field-simple.component.d.ts.map +1 -0
  78. 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
  79. 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
  80. 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
  81. 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
  82. package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.component.d.ts +8 -3
  83. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -0
  84. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.d.ts.map +1 -0
  85. package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts.map +1 -0
  86. package/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.d.ts +3 -3
  87. package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts.map +1 -0
  88. package/libs/feature/editor/src/lib/feature-editor.module.d.ts +1 -1
  89. package/libs/feature/editor/src/lib/feature-editor.module.d.ts.map +1 -1
  90. package/libs/feature/editor/src/lib/models/fields.model.d.ts +1 -1
  91. package/libs/feature/notifications/src/index.d.ts +4 -0
  92. package/libs/feature/notifications/src/index.d.ts.map +1 -0
  93. package/libs/feature/notifications/src/lib/feature-notifications.module.d.ts +7 -0
  94. package/libs/feature/notifications/src/lib/feature-notifications.module.d.ts.map +1 -0
  95. package/libs/feature/notifications/src/lib/notification.model.d.ts +7 -0
  96. package/libs/feature/notifications/src/lib/notification.model.d.ts.map +1 -0
  97. package/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.d.ts +12 -0
  98. package/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.d.ts.map +1 -0
  99. package/libs/feature/notifications/src/lib/notifications.service.d.ts +15 -0
  100. package/libs/feature/notifications/src/lib/notifications.service.d.ts.map +1 -0
  101. package/libs/ui/elements/src/index.d.ts +14 -14
  102. package/libs/ui/elements/src/index.d.ts.map +1 -1
  103. package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts +13 -0
  104. package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts.map +1 -0
  105. package/libs/ui/elements/src/lib/notification/notification.component.d.ts +13 -0
  106. package/libs/ui/elements/src/lib/notification/notification.component.d.ts.map +1 -0
  107. package/libs/ui/elements/src/lib/thumbnail/thumbnail.component.d.ts +1 -1
  108. package/libs/ui/elements/src/lib/thumbnail/thumbnail.component.d.ts.map +1 -1
  109. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +20 -20
  110. package/libs/ui/inputs/src/index.d.ts +0 -1
  111. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  112. package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
  113. package/libs/ui/inputs/src/lib/files-drop/files-drop.directive.d.ts +14 -0
  114. package/libs/ui/inputs/src/lib/files-drop/files-drop.directive.d.ts.map +1 -0
  115. package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts +44 -0
  116. package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts.map +1 -0
  117. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +26 -33
  118. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
  119. package/libs/ui/layout/src/index.d.ts +5 -4
  120. package/libs/ui/layout/src/index.d.ts.map +1 -1
  121. package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts +8 -0
  122. package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts.map +1 -0
  123. package/libs/util/shared/src/lib/utils/bytes-convert.d.ts +2 -0
  124. package/libs/util/shared/src/lib/utils/bytes-convert.d.ts.map +1 -0
  125. package/libs/util/shared/src/lib/utils/image-resize.d.ts +3 -0
  126. package/libs/util/shared/src/lib/utils/image-resize.d.ts.map +1 -0
  127. package/libs/util/shared/src/lib/utils/index.d.ts +7 -5
  128. package/libs/util/shared/src/lib/utils/index.d.ts.map +1 -1
  129. package/package.json +1 -1
  130. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +6 -0
  131. package/src/libs/data-access/gn4/src/openapi/api/records.api.service.ts +43 -12
  132. package/src/libs/data-access/gn4/src/openapi/model/models.ts +0 -1
  133. package/src/libs/data-access/gn4/src/spec.yaml +1 -1
  134. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +1 -1
  135. package/src/libs/feature/editor/src/index.ts +1 -1
  136. package/src/libs/feature/editor/src/lib/+state/editor.facade.ts +8 -1
  137. package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.html +8 -0
  138. package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.ts +70 -0
  139. 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
  140. 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
  141. 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
  142. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.html +20 -0
  143. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.ts +44 -0
  144. 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
  145. 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
  146. 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
  147. package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.component.html +28 -4
  148. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +121 -0
  149. package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.css +0 -0
  150. package/src/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.html +1 -0
  151. package/src/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.ts +4 -4
  152. package/src/libs/feature/editor/src/lib/feature-editor.module.ts +9 -9
  153. package/src/libs/feature/editor/src/lib/models/fields.model.ts +1 -1
  154. package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.html +1 -1
  155. package/src/libs/feature/notifications/src/index.ts +3 -0
  156. package/src/libs/feature/notifications/src/lib/feature-notifications.module.ts +10 -0
  157. package/src/libs/feature/notifications/src/lib/notification.model.ts +6 -0
  158. package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.css +0 -0
  159. package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.html +17 -0
  160. package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.ts +44 -0
  161. package/src/libs/feature/notifications/src/lib/notifications.service.ts +27 -0
  162. package/src/libs/feature/search/src/lib/results-table/results-table.component.html +3 -3
  163. package/src/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.html +5 -5
  164. package/src/libs/ui/elements/src/index.ts +14 -14
  165. package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +1 -1
  166. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.css +0 -5
  167. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.html +0 -21
  168. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.ts +1 -14
  169. package/src/libs/ui/elements/src/lib/notification/notification.component.css +0 -0
  170. package/src/libs/ui/elements/src/lib/notification/notification.component.html +52 -0
  171. package/src/libs/ui/elements/src/lib/notification/notification.component.ts +31 -0
  172. package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.html +1 -1
  173. package/src/libs/ui/elements/src/lib/thumbnail/thumbnail.component.ts +5 -3
  174. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +1 -1
  175. package/src/libs/ui/inputs/src/index.ts +0 -1
  176. package/src/libs/ui/inputs/src/lib/button/button.component.ts +1 -1
  177. package/src/libs/ui/inputs/src/lib/files-drop/files-drop.directive.ts +45 -0
  178. package/src/libs/ui/inputs/src/lib/image-input/image-input.component.css +0 -0
  179. package/src/libs/ui/inputs/src/lib/image-input/image-input.component.html +146 -0
  180. package/src/libs/ui/inputs/src/lib/image-input/image-input.component.ts +193 -0
  181. package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +3 -19
  182. package/src/libs/ui/layout/src/index.ts +5 -4
  183. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.css +0 -0
  184. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.html +18 -0
  185. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.ts +16 -0
  186. package/src/libs/util/shared/src/lib/utils/bytes-convert.ts +3 -0
  187. package/src/libs/util/shared/src/lib/utils/image-resize.ts +72 -0
  188. package/src/libs/util/shared/src/lib/utils/index.ts +7 -5
  189. package/tailwind.base.css +36 -0
  190. package/translations/de.json +18 -0
  191. package/translations/en.json +18 -0
  192. package/translations/es.json +18 -0
  193. package/translations/fr.json +18 -0
  194. package/translations/it.json +18 -0
  195. package/translations/nl.json +18 -0
  196. package/translations/pt.json +18 -0
  197. package/translations/sk.json +18 -0
  198. package/esm2022/libs/data-access/gn4/src/openapi/model/inlineObject3.api.model.mjs +0 -13
  199. package/esm2022/libs/feature/editor/src/lib/record-form/record-form.component.mjs +0 -30
  200. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-array/form-field-array.component.mjs +0 -11
  201. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-file/form-field-file.component.mjs +0 -27
  202. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-object/form-field-object.component.mjs +0 -11
  203. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.mjs +0 -27
  204. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-simple/form-field-simple.component.mjs +0 -49
  205. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +0 -11
  206. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-temporal-extent/form-field-temporal-extent.component.mjs +0 -11
  207. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field.component.mjs +0 -76
  208. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field.model.mjs +0 -2
  209. package/esm2022/libs/ui/inputs/src/lib/form-field/index.mjs +0 -10
  210. package/libs/data-access/gn4/src/openapi/model/inlineObject3.api.model.d.ts +0 -18
  211. package/libs/data-access/gn4/src/openapi/model/inlineObject3.api.model.d.ts.map +0 -1
  212. package/libs/feature/editor/src/lib/record-form/record-form.component.d.ts.map +0 -1
  213. package/libs/ui/inputs/src/lib/form-field/form-field-array/form-field-array.component.d.ts.map +0 -1
  214. package/libs/ui/inputs/src/lib/form-field/form-field-file/form-field-file.component.d.ts.map +0 -1
  215. package/libs/ui/inputs/src/lib/form-field/form-field-object/form-field-object.component.d.ts.map +0 -1
  216. package/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.d.ts +0 -11
  217. package/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.d.ts.map +0 -1
  218. package/libs/ui/inputs/src/lib/form-field/form-field-simple/form-field-simple.component.d.ts.map +0 -1
  219. package/libs/ui/inputs/src/lib/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts.map +0 -1
  220. package/libs/ui/inputs/src/lib/form-field/form-field-temporal-extent/form-field-temporal-extent.component.d.ts.map +0 -1
  221. package/libs/ui/inputs/src/lib/form-field/form-field.component.d.ts.map +0 -1
  222. package/libs/ui/inputs/src/lib/form-field/form-field.model.d.ts.map +0 -1
  223. package/libs/ui/inputs/src/lib/form-field/index.d.ts.map +0 -1
  224. package/src/libs/data-access/gn4/src/openapi/model/inlineObject3.api.model.ts +0 -18
  225. package/src/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.html +0 -11
  226. package/src/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.ts +0 -15
  227. package/src/libs/ui/inputs/src/lib/form-field/form-field.component.ts +0 -80
  228. /package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.model.d.ts +0 -0
  229. /package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/index.d.ts +0 -0
  230. /package/src/libs/feature/editor/src/lib/{record-form/record-form.component.css → components/overview-upload/overview-upload.component.css} +0 -0
  231. /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
  232. /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
  233. /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
  234. /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
  235. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-object/form-field-object.component.css +0 -0
  236. /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
  237. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-rich/form-field-rich.component.css +0 -0
  238. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-simple/form-field-simple.component.css +0 -0
  239. /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
  240. /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.css +0 -0
  241. /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
  242. /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.css +0 -0
  243. /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
  244. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.component.css +0 -0
  245. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.model.ts +0 -0
  246. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/index.ts +0 -0
@@ -1,9 +1,10 @@
1
- export * from './lib/ui-layout.module';
2
1
  export * from './lib/anchor-link/anchor-link.directive';
3
2
  export * from './lib/carousel/carousel.component';
4
- export * from './lib/expandable-panel/expandable-panel.component';
5
- export * from './lib/sticky-header/sticky-header.component';
6
3
  export * from './lib/expandable-panel-button/expandable-panel-button.component';
7
- export * from './lib/interactive-table/interactive-table.component';
4
+ export * from './lib/expandable-panel/expandable-panel.component';
5
+ export * from './lib/form-field-wrapper/form-field-wrapper.component';
8
6
  export * from './lib/interactive-table/interactive-table-column/interactive-table-column.component';
7
+ export * from './lib/interactive-table/interactive-table.component';
8
+ export * from './lib/sticky-header/sticky-header.component';
9
+ export * from './lib/ui-layout.module';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/libs/ui/layout/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,yCAAyC,CAAA;AACvD,cAAc,mCAAmC,CAAA;AACjD,cAAc,mDAAmD,CAAA;AACjE,cAAc,6CAA6C,CAAA;AAC3D,cAAc,iEAAiE,CAAA;AAC/E,cAAc,qDAAqD,CAAA;AACnE,cAAc,qFAAqF,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/libs/ui/layout/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAA;AACvD,cAAc,mCAAmC,CAAA;AACjD,cAAc,iEAAiE,CAAA;AAC/E,cAAc,mDAAmD,CAAA;AACjE,cAAc,uDAAuD,CAAA;AACrE,cAAc,qFAAqF,CAAA;AACnG,cAAc,qDAAqD,CAAA;AACnE,cAAc,6CAA6C,CAAA;AAC3D,cAAc,wBAAwB,CAAA"}
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class FormFieldWrapperComponent {
3
+ label: string;
4
+ hint: string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldWrapperComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldWrapperComponent, "gn-ui-form-field-wrapper", never, { "label": { "alias": "label"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; }, {}, never, ["[form-field-interaction]", "*"], true, never>;
7
+ }
8
+ //# sourceMappingURL=form-field-wrapper.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-field-wrapper.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.ts"],"names":[],"mappings":";AAIA,qBAQa,yBAAyB;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;yCAFV,yBAAyB;2CAAzB,yBAAyB;CAGrC"}
@@ -0,0 +1,2 @@
1
+ export declare function megabytesToBytes(megabytes: any): number;
2
+ //# sourceMappingURL=bytes-convert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bytes-convert.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/utils/bytes-convert.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,SAAS,KAAA,UAEzC"}
@@ -0,0 +1,3 @@
1
+ export declare function downsizeImage(blob: Blob, maxWidth: number, maxHeight: number): Promise<Blob>;
2
+ export declare function downgradeImage(blob: Blob, maxSizeBytes: number): Promise<Blob>;
3
+ //# sourceMappingURL=image-resize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-resize.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/utils/image-resize.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAC3B,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CA6Bf;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAiCf"}
@@ -1,10 +1,12 @@
1
+ export * from './bytes-convert';
2
+ export * from './event';
3
+ export * from './fuzzy-filter';
4
+ export * from './geojson';
5
+ export * from './image-resize';
1
6
  export * from './parse';
2
- export * from './strip-html';
3
7
  export * from './remove-whitespace';
4
- export * from './geojson';
5
8
  export * from './sort-by';
6
- export * from './url';
7
- export * from './event';
8
- export * from './fuzzy-filter';
9
+ export * from './strip-html';
9
10
  export * from './temporal-extent-union';
11
+ export * from './url';
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,qBAAqB,CAAA;AACnC,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,yBAAyB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,qBAAqB,CAAA;AACnC,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,OAAO,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geonetwork-ui",
3
- "version": "2.3.0-dev.6e2b8bea",
3
+ "version": "2.3.0-dev.c22cb78a",
4
4
  "engines": {
5
5
  "node": ">=14.17.0"
6
6
  },
@@ -124,6 +124,12 @@ export class Gn4FieldMapper {
124
124
  getFirstValue(selectField<string>(source, 'creationDateForResource'))
125
125
  ),
126
126
  }),
127
+ revisionDateForResource: (output, source) => ({
128
+ ...output,
129
+ datasetUpdated: toDate(
130
+ getFirstValue(selectField<string>(source, 'revisionDateForResource'))
131
+ ),
132
+ }),
127
133
  createDate: (output, source) => ({
128
134
  ...output,
129
135
  recordCreated: toDate(selectField<string>(source, 'createDate')),
@@ -30,7 +30,6 @@ import {
30
30
  import { ExtentDtoApiModel } from '../model/models'
31
31
  import { FeatureResponseApiModel } from '../model/models'
32
32
  import { IProcessingReportApiModel } from '../model/models'
33
- import { InlineObject3ApiModel } from '../model/models'
34
33
  import { MetadataBatchApproveParameterApiModel } from '../model/models'
35
34
  import { MetadataBatchSubmitParameterApiModel } from '../model/models'
36
35
  import { MetadataCategoryApiModel } from '../model/models'
@@ -75,6 +74,20 @@ export class RecordsApiService {
75
74
  this.encoder = this.configuration.encoder || new CustomHttpParameterCodec()
76
75
  }
77
76
 
77
+ /**
78
+ * @param consumes string[] mime-types
79
+ * @return true: consumes contains 'multipart/form-data', false: otherwise
80
+ */
81
+ private canConsumeForm(consumes: string[]): boolean {
82
+ const form = 'multipart/form-data'
83
+ for (const consume of consumes) {
84
+ if (form === consume) {
85
+ return true
86
+ }
87
+ }
88
+ return false
89
+ }
90
+
78
91
  private addToHttpParams(
79
92
  httpParams: HttpParams,
80
93
  value: any,
@@ -8290,44 +8303,44 @@ export class RecordsApiService {
8290
8303
  /**
8291
8304
  * Create a new resource for a given metadata
8292
8305
  * @param metadataUuid The metadata UUID
8306
+ * @param file The file to upload
8293
8307
  * @param visibility The sharing policy
8294
8308
  * @param approved Use approved version or not
8295
- * @param inlineObject3ApiModel
8296
8309
  * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
8297
8310
  * @param reportProgress flag to report request and response progress.
8298
8311
  */
8299
8312
  public putResource(
8300
8313
  metadataUuid: string,
8314
+ file: Blob,
8301
8315
  visibility?: 'public' | 'private',
8302
8316
  approved?: boolean,
8303
- inlineObject3ApiModel?: InlineObject3ApiModel,
8304
8317
  observe?: 'body',
8305
8318
  reportProgress?: boolean,
8306
8319
  options?: { httpHeaderAccept?: 'application/json' }
8307
8320
  ): Observable<MetadataResourceApiModel>
8308
8321
  public putResource(
8309
8322
  metadataUuid: string,
8323
+ file: Blob,
8310
8324
  visibility?: 'public' | 'private',
8311
8325
  approved?: boolean,
8312
- inlineObject3ApiModel?: InlineObject3ApiModel,
8313
8326
  observe?: 'response',
8314
8327
  reportProgress?: boolean,
8315
8328
  options?: { httpHeaderAccept?: 'application/json' }
8316
8329
  ): Observable<HttpResponse<MetadataResourceApiModel>>
8317
8330
  public putResource(
8318
8331
  metadataUuid: string,
8332
+ file: Blob,
8319
8333
  visibility?: 'public' | 'private',
8320
8334
  approved?: boolean,
8321
- inlineObject3ApiModel?: InlineObject3ApiModel,
8322
8335
  observe?: 'events',
8323
8336
  reportProgress?: boolean,
8324
8337
  options?: { httpHeaderAccept?: 'application/json' }
8325
8338
  ): Observable<HttpEvent<MetadataResourceApiModel>>
8326
8339
  public putResource(
8327
8340
  metadataUuid: string,
8341
+ file: Blob,
8328
8342
  visibility?: 'public' | 'private',
8329
8343
  approved?: boolean,
8330
- inlineObject3ApiModel?: InlineObject3ApiModel,
8331
8344
  observe: any = 'body',
8332
8345
  reportProgress: boolean = false,
8333
8346
  options?: { httpHeaderAccept?: 'application/json' }
@@ -8337,6 +8350,11 @@ export class RecordsApiService {
8337
8350
  'Required parameter metadataUuid was null or undefined when calling putResource.'
8338
8351
  )
8339
8352
  }
8353
+ if (file === null || file === undefined) {
8354
+ throw new Error(
8355
+ 'Required parameter file was null or undefined when calling putResource.'
8356
+ )
8357
+ }
8340
8358
 
8341
8359
  let queryParameters = new HttpParams({ encoder: this.encoder })
8342
8360
  if (visibility !== undefined && visibility !== null) {
@@ -8369,11 +8387,24 @@ export class RecordsApiService {
8369
8387
  }
8370
8388
 
8371
8389
  // to determine the Content-Type header
8372
- const consumes: string[] = ['application/json']
8373
- const httpContentTypeSelected: string | undefined =
8374
- this.configuration.selectHeaderContentType(consumes)
8375
- if (httpContentTypeSelected !== undefined) {
8376
- headers = headers.set('Content-Type', httpContentTypeSelected)
8390
+ const consumes: string[] = ['multipart/form-data']
8391
+
8392
+ const canConsumeForm = this.canConsumeForm(consumes)
8393
+
8394
+ let formParams: { append(param: string, value: any): any }
8395
+ let useForm = false
8396
+ let convertFormParamsToString = false
8397
+ // use FormData to transmit files using content-type "multipart/form-data"
8398
+ // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
8399
+ useForm = canConsumeForm
8400
+ if (useForm) {
8401
+ formParams = new FormData()
8402
+ } else {
8403
+ formParams = new HttpParams({ encoder: this.encoder })
8404
+ }
8405
+
8406
+ if (file !== undefined) {
8407
+ formParams = (formParams.append('file', <any>file) as any) || formParams
8377
8408
  }
8378
8409
 
8379
8410
  let responseType_: 'text' | 'json' = 'json'
@@ -8388,7 +8419,7 @@ export class RecordsApiService {
8388
8419
  `${this.configuration.basePath}/records/${encodeURIComponent(
8389
8420
  String(metadataUuid)
8390
8421
  )}/attachments`,
8391
- inlineObject3ApiModel,
8422
+ convertFormParamsToString ? formParams.toString() : formParams,
8392
8423
  {
8393
8424
  params: queryParameters,
8394
8425
  responseType: <any>responseType_,
@@ -33,7 +33,6 @@ export * from './iProcessingReport.api.model'
33
33
  export * from './iSODate.api.model'
34
34
  export * from './infoReport.api.model'
35
35
  export * from './inlineObject1.api.model'
36
- export * from './inlineObject3.api.model'
37
36
  export * from './inlineObject4.api.model'
38
37
  export * from './isoLanguage.api.model'
39
38
  export * from './jSONObject.api.model'
@@ -7390,7 +7390,7 @@ paths:
7390
7390
  example: true
7391
7391
  requestBody:
7392
7392
  content:
7393
- application/json:
7393
+ multipart/form-data:
7394
7394
  schema:
7395
7395
  required:
7396
7396
  - file
@@ -94,7 +94,7 @@ export class DataService {
94
94
  ),
95
95
  geojson: endpoint.supportsJson(featureType.name)
96
96
  ? endpoint.getFeatureUrl(featureType.name, {
97
- outputFormat: 'application/json',
97
+ asJson: true,
98
98
  outputCrs: 'EPSG:4326',
99
99
  })
100
100
  : null,
@@ -5,7 +5,7 @@ export * from './lib/+state/editor.reducer'
5
5
  export * from './lib/+state/editor.actions'
6
6
  export * from './lib/feature-editor.module'
7
7
  export * from './lib/services/editor.service'
8
- export * from './lib/record-form/record-form.component'
8
+ export * from './lib/components/record-form/record-form.component'
9
9
  export * from './lib/components/wizard/wizard.component'
10
10
  export * from './lib/components/wizard-field/wizard-field.component'
11
11
  export * from './lib/components/wizard-summarize/wizard-summarize.component'
@@ -3,14 +3,21 @@ import { select, Store } from '@ngrx/store'
3
3
  import * as EditorActions from './editor.actions'
4
4
  import * as EditorSelectors from './editor.selectors'
5
5
  import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
6
+ import { filter, Observable } from 'rxjs'
7
+ import { Actions, ofType } from '@ngrx/effects'
6
8
 
7
9
  @Injectable()
8
10
  export class EditorFacade {
9
11
  private readonly store = inject(Store)
12
+ private actions$ = inject(Actions)
10
13
 
11
14
  record$ = this.store.pipe(select(EditorSelectors.selectRecord))
12
15
  saving$ = this.store.pipe(select(EditorSelectors.selectRecordSaving))
13
- saveError$ = this.store.pipe(select(EditorSelectors.selectRecordSaveError))
16
+ saveError$ = this.store.pipe(
17
+ select(EditorSelectors.selectRecordSaveError),
18
+ filter((error) => !!error)
19
+ )
20
+ saveSuccess$ = this.actions$.pipe(ofType(EditorActions.saveRecordSuccess))
14
21
  changedSinceSave$ = this.store.pipe(
15
22
  select(EditorSelectors.selectRecordChangedSinceSave)
16
23
  )
@@ -0,0 +1,8 @@
1
+ <gn-ui-image-input
2
+ [maxSizeMB]="5"
3
+ [previewUrl]="resourceUrl"
4
+ [altText]="resourceFileName"
5
+ (fileChange)="handleFileChange($event)"
6
+ (urlChange)="handleUrlChange($event)"
7
+ (delete)="handleDelete()"
8
+ ></gn-ui-image-input>
@@ -0,0 +1,70 @@
1
+ import {
2
+ ChangeDetectionStrategy,
3
+ ChangeDetectorRef,
4
+ Component,
5
+ Input,
6
+ OnInit,
7
+ } from '@angular/core'
8
+ import { CommonModule } from '@angular/common'
9
+ import { RecordsApiService } from '../../../../../../../libs/data-access/gn4/src'
10
+ import { UiInputsModule } from '../../../../../../../libs/ui/inputs/src'
11
+
12
+ @Component({
13
+ selector: 'gn-ui-overview-upload',
14
+ standalone: true,
15
+ imports: [CommonModule, UiInputsModule],
16
+ templateUrl: './overview-upload.component.html',
17
+ styleUrls: ['./overview-upload.component.css'],
18
+ changeDetection: ChangeDetectionStrategy.OnPush,
19
+ })
20
+ export class OverviewUploadComponent implements OnInit {
21
+ @Input() metadataUuid: string
22
+
23
+ resourceFileName: string
24
+ resourceUrl: string
25
+
26
+ constructor(
27
+ private recordsApiService: RecordsApiService,
28
+ private cd: ChangeDetectorRef
29
+ ) {}
30
+
31
+ ngOnInit(): void {
32
+ this.recordsApiService
33
+ .getAllResources(this.metadataUuid)
34
+ .subscribe((resources) => {
35
+ this.resourceFileName = resources[0]?.filename
36
+ this.resourceUrl = resources[0]?.url
37
+ this.cd.markForCheck()
38
+ })
39
+ }
40
+
41
+ handleFileChange(file: File) {
42
+ this.recordsApiService
43
+ .putResource(this.metadataUuid, file, 'public')
44
+ .subscribe((resource) => {
45
+ this.resourceFileName = resource.filename
46
+ this.resourceUrl = resource.url
47
+ this.cd.markForCheck()
48
+ })
49
+ }
50
+
51
+ handleUrlChange(url: string) {
52
+ this.recordsApiService
53
+ .putResourceFromURL(this.metadataUuid, url, 'public')
54
+ .subscribe((resource) => {
55
+ this.resourceFileName = resource.filename
56
+ this.resourceUrl = resource.url
57
+ this.cd.markForCheck()
58
+ })
59
+ }
60
+
61
+ handleDelete() {
62
+ this.recordsApiService
63
+ .delResource(this.metadataUuid, this.resourceFileName)
64
+ .subscribe(() => {
65
+ this.resourceFileName = null
66
+ this.resourceUrl = null
67
+ this.cd.markForCheck()
68
+ })
69
+ }
70
+ }
@@ -5,5 +5,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'
5
5
  templateUrl: './form-field-array.component.html',
6
6
  styleUrls: ['./form-field-array.component.css'],
7
7
  changeDetection: ChangeDetectionStrategy.OnPush,
8
+ standalone: true,
8
9
  })
9
10
  export class FormFieldArrayComponent {}
@@ -1,11 +1,14 @@
1
+ import { CommonModule } from '@angular/common'
1
2
  import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
2
- import { FormControl } from '@angular/forms'
3
+ import { FormControl, ReactiveFormsModule } from '@angular/forms'
3
4
 
4
5
  @Component({
5
6
  selector: 'gn-ui-form-field-file',
6
7
  templateUrl: './form-field-file.component.html',
7
8
  styleUrls: ['./form-field-file.component.css'],
8
9
  changeDetection: ChangeDetectionStrategy.OnPush,
10
+ standalone: true,
11
+ imports: [CommonModule, ReactiveFormsModule],
9
12
  })
10
13
  export class FormFieldFileComponent {
11
14
  @Input() control!: FormControl
@@ -5,5 +5,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'
5
5
  templateUrl: './form-field-object.component.html',
6
6
  styleUrls: ['./form-field-object.component.css'],
7
7
  changeDetection: ChangeDetectionStrategy.OnPush,
8
+ standalone: true,
8
9
  })
9
10
  export class FormFieldObjectComponent {}
@@ -0,0 +1,20 @@
1
+ <gn-ui-form-field-wrapper [label]="label" [hint]="hint">
2
+ <gn-ui-button
3
+ form-field-interaction
4
+ [extraClass]="getButtonExtraClass()"
5
+ (buttonClick)="togglePreview()"
6
+ >
7
+ <span class="material-symbols-outlined mr-1 gn-ui-icon-small">{{
8
+ preview ? 'visibility' : 'visibility_off'
9
+ }}</span>
10
+ {{ preview ? 'WYSIWYG' : 'Markdown' }}
11
+ </gn-ui-button>
12
+ <gn-ui-markdown-editor
13
+ class="h-full"
14
+ [preview]="preview"
15
+ [helperText]="helperText"
16
+ [placeholder]="placeholder"
17
+ [textContent]="control.value"
18
+ (textContentChanged)="handleTextContentChanged($event)"
19
+ ></gn-ui-markdown-editor>
20
+ </gn-ui-form-field-wrapper>
@@ -0,0 +1,44 @@
1
+ import { CommonModule } from '@angular/common'
2
+ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
3
+ import { FormControl, ReactiveFormsModule } from '@angular/forms'
4
+ import { MarkdownEditorComponent } from '../../../../../../../../../libs/ui/elements/src'
5
+ import { ButtonComponent } from '../../../../../../../../../libs/ui/inputs/src'
6
+ import { FormFieldWrapperComponent } from '../../../../../../../../../libs/ui/layout/src'
7
+
8
+ @Component({
9
+ selector: 'gn-ui-form-field-rich',
10
+ templateUrl: './form-field-rich.component.html',
11
+ styleUrls: ['./form-field-rich.component.css'],
12
+ changeDetection: ChangeDetectionStrategy.OnPush,
13
+ standalone: true,
14
+ imports: [
15
+ CommonModule,
16
+ ReactiveFormsModule,
17
+ MarkdownEditorComponent,
18
+ FormFieldWrapperComponent,
19
+ ButtonComponent,
20
+ ],
21
+ })
22
+ export class FormFieldRichComponent {
23
+ @Input() control!: FormControl
24
+ @Input() label: string
25
+ @Input() hint: string
26
+ @Input() helperText: string
27
+ @Input() placeholder = 'Votre texte ici' //TODO: translate
28
+
29
+ preview = false
30
+
31
+ getButtonExtraClass() {
32
+ return `${
33
+ this.preview ? 'text-gray-200 bg-gray-900' : 'text-gray-900 bg-gray-200'
34
+ } rounded-[1.25rem] p-[0.375rem] text-xs font-medium w-24`
35
+ }
36
+
37
+ togglePreview() {
38
+ this.preview = !this.preview
39
+ }
40
+
41
+ handleTextContentChanged(textContent: string) {
42
+ this.control.setValue(textContent)
43
+ }
44
+ }
@@ -1,11 +1,14 @@
1
+ import { CommonModule } from '@angular/common'
1
2
  import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
2
- import { FormControl } from '@angular/forms'
3
+ import { FormControl, ReactiveFormsModule } from '@angular/forms'
3
4
 
4
5
  @Component({
5
6
  selector: 'gn-ui-form-field-simple',
6
7
  templateUrl: './form-field-simple.component.html',
7
8
  styleUrls: ['./form-field-simple.component.css'],
8
9
  changeDetection: ChangeDetectionStrategy.OnPush,
10
+ standalone: true,
11
+ imports: [CommonModule, ReactiveFormsModule],
9
12
  })
10
13
  export class FormFieldSimpleComponent {
11
14
  @Input() type: 'date' | 'url' | 'text' | 'number' | 'list' | 'toggle'
@@ -5,5 +5,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'
5
5
  templateUrl: './form-field-spatial-extent.component.html',
6
6
  styleUrls: ['./form-field-spatial-extent.component.css'],
7
7
  changeDetection: ChangeDetectionStrategy.OnPush,
8
+ standalone: true,
8
9
  })
9
10
  export class FormFieldSpatialExtentComponent {}
@@ -5,5 +5,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'
5
5
  templateUrl: './form-field-temporal-extent.component.html',
6
6
  styleUrls: ['./form-field-temporal-extent.component.css'],
7
7
  changeDetection: ChangeDetectionStrategy.OnPush,
8
+ standalone: true,
8
9
  })
9
10
  export class FormFieldTemporalExtentComponent {}
@@ -24,6 +24,30 @@
24
24
  >cancel</mat-icon
25
25
  >
26
26
  </div>
27
+ <ng-container *ngIf="isTitle">
28
+ <div class="flex justify-between items-center gap-3">
29
+ <h2
30
+ #titleInput
31
+ class="grow text-3xl font-normal"
32
+ [gnUiEditableLabel]="true"
33
+ (editableLabelChanged)="formControl.setValue($event)"
34
+ >
35
+ {{ formControl.value }}
36
+ </h2>
37
+ <span
38
+ class="material-symbols-outlined gn-ui-icon-small m-2 cursor-pointer"
39
+ (click)="focusTitleInput()"
40
+ >edit</span
41
+ >
42
+ <span
43
+ class="material-symbols-outlined gn-ui-icon-small m-2"
44
+ [matTooltip]="config.hintKey | translate"
45
+ matTooltipPosition="above"
46
+ >
47
+ help
48
+ </span>
49
+ </div>
50
+ </ng-container>
27
51
  <ng-container *ngIf="isSimpleField">
28
52
  <gn-ui-form-field-simple
29
53
  [type]="simpleType"
@@ -39,12 +63,12 @@
39
63
  [invalid]="isFieldInvalid"
40
64
  ></gn-ui-form-field-file>
41
65
  </ng-container>
42
- <ng-container *ngIf="isRichField">
66
+ <ng-container *ngIf="isAbstract">
43
67
  <gn-ui-form-field-rich
44
- class="grow"
68
+ class="h-[8rem]"
45
69
  [control]="formControl"
46
- [readonly]="isFieldLocked"
47
- [invalid]="isFieldInvalid"
70
+ [label]="config.labelKey | translate"
71
+ [hint]="config.hintKey | translate"
48
72
  ></gn-ui-form-field-rich>
49
73
  </ng-container>
50
74
  <ng-container *ngIf="isArrayField">