geonetwork-ui 2.3.0-dev.3d65a13b → 2.3.0-dev.6083baae

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 (243) 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/editor/src/index.mjs +2 -2
  6. package/esm2022/libs/feature/editor/src/lib/+state/editor.facade.mjs +6 -2
  7. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-array/form-field-array.component.mjs +11 -0
  8. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-file/form-field-file.component.mjs +28 -0
  9. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-object/form-field-object.component.mjs +11 -0
  10. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.mjs +45 -0
  11. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-simple/form-field-simple.component.mjs +50 -0
  12. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +11 -0
  13. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extent/form-field-temporal-extent.component.mjs +11 -0
  14. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +93 -0
  15. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.mjs +2 -0
  16. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/index.mjs +10 -0
  17. package/esm2022/libs/feature/editor/src/lib/components/record-form/record-form.component.mjs +39 -0
  18. package/esm2022/libs/feature/editor/src/lib/feature-editor.module.mjs +10 -10
  19. package/esm2022/libs/feature/editor/src/lib/models/fields.model.mjs +1 -1
  20. package/esm2022/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.mjs +3 -3
  21. package/esm2022/libs/feature/notifications/src/index.mjs +4 -0
  22. package/esm2022/libs/feature/notifications/src/lib/feature-notifications.module.mjs +18 -0
  23. package/esm2022/libs/feature/notifications/src/lib/notification.model.mjs +2 -0
  24. package/esm2022/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.mjs +49 -0
  25. package/esm2022/libs/feature/notifications/src/lib/notifications.service.mjs +29 -0
  26. package/esm2022/libs/feature/search/src/lib/results-table/results-table.component.mjs +3 -3
  27. package/esm2022/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.mjs +3 -3
  28. package/esm2022/libs/ui/elements/src/index.mjs +15 -15
  29. package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +5 -5
  30. package/esm2022/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.mjs +45 -0
  31. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
  32. package/esm2022/libs/ui/elements/src/lib/notification/notification.component.mjs +34 -0
  33. package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +3 -3
  34. package/esm2022/libs/ui/elements/src/lib/thumbnail/thumbnail.component.mjs +4 -3
  35. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +6 -5
  36. package/esm2022/libs/ui/inputs/src/index.mjs +1 -2
  37. package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +2 -1
  38. package/esm2022/libs/ui/inputs/src/lib/files-drop/files-drop.directive.mjs +59 -0
  39. package/esm2022/libs/ui/inputs/src/lib/image-input/image-input.component.mjs +183 -0
  40. package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +10 -23
  41. package/esm2022/libs/ui/layout/src/index.mjs +6 -5
  42. package/esm2022/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.mjs +18 -0
  43. package/esm2022/libs/util/shared/src/lib/utils/bytes-convert.mjs +4 -0
  44. package/esm2022/libs/util/shared/src/lib/utils/image-resize.mjs +60 -0
  45. package/esm2022/libs/util/shared/src/lib/utils/index.mjs +8 -6
  46. package/esm2022/translations/de.json +18 -0
  47. package/esm2022/translations/en.json +18 -0
  48. package/esm2022/translations/es.json +18 -0
  49. package/esm2022/translations/fr.json +18 -0
  50. package/esm2022/translations/it.json +18 -0
  51. package/esm2022/translations/nl.json +18 -0
  52. package/esm2022/translations/pt.json +18 -0
  53. package/fesm2022/geonetwork-ui.mjs +2049 -1426
  54. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  55. package/index.d.ts +1 -0
  56. package/index.d.ts.map +1 -1
  57. package/index.ts +1 -0
  58. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  59. package/libs/data-access/gn4/src/openapi/api/records.api.service.d.ts +9 -5
  60. package/libs/data-access/gn4/src/openapi/api/records.api.service.d.ts.map +1 -1
  61. package/libs/data-access/gn4/src/openapi/model/models.d.ts +0 -1
  62. package/libs/data-access/gn4/src/openapi/model/models.d.ts.map +1 -1
  63. package/libs/feature/editor/src/index.d.ts +1 -1
  64. package/libs/feature/editor/src/index.d.ts.map +1 -1
  65. package/libs/feature/editor/src/lib/+state/editor.facade.d.ts +8 -5
  66. package/libs/feature/editor/src/lib/+state/editor.facade.d.ts.map +1 -1
  67. 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
  68. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-array/form-field-array.component.d.ts.map +1 -0
  69. 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
  70. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-file/form-field-file.component.d.ts.map +1 -0
  71. 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
  72. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-object/form-field-object.component.d.ts.map +1 -0
  73. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts +16 -0
  74. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts.map +1 -0
  75. 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
  76. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-simple/form-field-simple.component.d.ts.map +1 -0
  77. 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
  78. 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
  79. 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
  80. 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
  81. package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.component.d.ts +4 -3
  82. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -0
  83. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.d.ts.map +1 -0
  84. package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts.map +1 -0
  85. package/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.d.ts +3 -3
  86. package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts.map +1 -0
  87. package/libs/feature/editor/src/lib/feature-editor.module.d.ts +1 -1
  88. package/libs/feature/editor/src/lib/feature-editor.module.d.ts.map +1 -1
  89. package/libs/feature/editor/src/lib/models/fields.model.d.ts +1 -1
  90. package/libs/feature/notifications/src/index.d.ts +4 -0
  91. package/libs/feature/notifications/src/index.d.ts.map +1 -0
  92. package/libs/feature/notifications/src/lib/feature-notifications.module.d.ts +7 -0
  93. package/libs/feature/notifications/src/lib/feature-notifications.module.d.ts.map +1 -0
  94. package/libs/feature/notifications/src/lib/notification.model.d.ts +7 -0
  95. package/libs/feature/notifications/src/lib/notification.model.d.ts.map +1 -0
  96. package/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.d.ts +12 -0
  97. package/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.d.ts.map +1 -0
  98. package/libs/feature/notifications/src/lib/notifications.service.d.ts +15 -0
  99. package/libs/feature/notifications/src/lib/notifications.service.d.ts.map +1 -0
  100. package/libs/ui/elements/src/index.d.ts +14 -14
  101. package/libs/ui/elements/src/index.d.ts.map +1 -1
  102. package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts +13 -0
  103. package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts.map +1 -0
  104. package/libs/ui/elements/src/lib/notification/notification.component.d.ts +13 -0
  105. package/libs/ui/elements/src/lib/notification/notification.component.d.ts.map +1 -0
  106. package/libs/ui/elements/src/lib/thumbnail/thumbnail.component.d.ts +1 -1
  107. package/libs/ui/elements/src/lib/thumbnail/thumbnail.component.d.ts.map +1 -1
  108. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +20 -20
  109. package/libs/ui/inputs/src/index.d.ts +0 -1
  110. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  111. package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
  112. package/libs/ui/inputs/src/lib/files-drop/files-drop.directive.d.ts +14 -0
  113. package/libs/ui/inputs/src/lib/files-drop/files-drop.directive.d.ts.map +1 -0
  114. package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts +44 -0
  115. package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts.map +1 -0
  116. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +26 -33
  117. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
  118. package/libs/ui/layout/src/index.d.ts +5 -4
  119. package/libs/ui/layout/src/index.d.ts.map +1 -1
  120. package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts +8 -0
  121. package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts.map +1 -0
  122. package/libs/util/shared/src/lib/utils/bytes-convert.d.ts +2 -0
  123. package/libs/util/shared/src/lib/utils/bytes-convert.d.ts.map +1 -0
  124. package/libs/util/shared/src/lib/utils/image-resize.d.ts +3 -0
  125. package/libs/util/shared/src/lib/utils/image-resize.d.ts.map +1 -0
  126. package/libs/util/shared/src/lib/utils/index.d.ts +7 -5
  127. package/libs/util/shared/src/lib/utils/index.d.ts.map +1 -1
  128. package/package.json +1 -1
  129. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +6 -0
  130. package/src/libs/data-access/gn4/src/openapi/api/records.api.service.ts +43 -12
  131. package/src/libs/data-access/gn4/src/openapi/model/models.ts +0 -1
  132. package/src/libs/data-access/gn4/src/spec.yaml +1 -1
  133. package/src/libs/feature/editor/src/index.ts +1 -1
  134. package/src/libs/feature/editor/src/lib/+state/editor.facade.ts +8 -1
  135. package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.html +8 -0
  136. package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.ts +70 -0
  137. 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
  138. 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
  139. 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
  140. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.css +5 -0
  141. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.html +20 -0
  142. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.ts +44 -0
  143. 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
  144. 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
  145. 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
  146. package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.component.html +4 -4
  147. package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.component.ts +31 -5
  148. package/src/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.html +1 -0
  149. package/src/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.ts +23 -4
  150. package/src/libs/feature/editor/src/lib/feature-editor.module.ts +9 -9
  151. package/src/libs/feature/editor/src/lib/models/fields.model.ts +1 -1
  152. package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.html +1 -1
  153. package/src/libs/feature/notifications/src/index.ts +3 -0
  154. package/src/libs/feature/notifications/src/lib/feature-notifications.module.ts +10 -0
  155. package/src/libs/feature/notifications/src/lib/notification.model.ts +6 -0
  156. package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.css +0 -0
  157. package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.html +17 -0
  158. package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.ts +44 -0
  159. package/src/libs/feature/notifications/src/lib/notifications.service.ts +27 -0
  160. package/src/libs/feature/search/src/lib/results-table/results-table.component.html +3 -3
  161. package/src/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.html +5 -5
  162. package/src/libs/ui/elements/src/index.ts +14 -14
  163. package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +1 -1
  164. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.css +0 -5
  165. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.html +0 -21
  166. package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.ts +1 -14
  167. package/src/libs/ui/elements/src/lib/notification/notification.component.css +0 -0
  168. package/src/libs/ui/elements/src/lib/notification/notification.component.html +52 -0
  169. package/src/libs/ui/elements/src/lib/notification/notification.component.ts +31 -0
  170. package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.html +1 -1
  171. package/src/libs/ui/elements/src/lib/thumbnail/thumbnail.component.ts +5 -3
  172. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +1 -1
  173. package/src/libs/ui/inputs/src/index.ts +0 -1
  174. package/src/libs/ui/inputs/src/lib/button/button.component.ts +1 -1
  175. package/src/libs/ui/inputs/src/lib/files-drop/files-drop.directive.ts +45 -0
  176. package/src/libs/ui/inputs/src/lib/image-input/image-input.component.css +0 -0
  177. package/src/libs/ui/inputs/src/lib/image-input/image-input.component.html +146 -0
  178. package/src/libs/ui/inputs/src/lib/image-input/image-input.component.ts +193 -0
  179. package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +3 -19
  180. package/src/libs/ui/layout/src/index.ts +5 -4
  181. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.css +5 -0
  182. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.html +18 -0
  183. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.ts +16 -0
  184. package/src/libs/util/shared/src/lib/utils/bytes-convert.ts +3 -0
  185. package/src/libs/util/shared/src/lib/utils/image-resize.ts +72 -0
  186. package/src/libs/util/shared/src/lib/utils/index.ts +7 -5
  187. package/tailwind.base.css +29 -0
  188. package/translations/de.json +18 -0
  189. package/translations/en.json +18 -0
  190. package/translations/es.json +18 -0
  191. package/translations/fr.json +18 -0
  192. package/translations/it.json +18 -0
  193. package/translations/nl.json +18 -0
  194. package/translations/pt.json +18 -0
  195. package/translations/sk.json +18 -0
  196. package/esm2022/libs/data-access/gn4/src/openapi/model/inlineObject3.api.model.mjs +0 -13
  197. package/esm2022/libs/feature/editor/src/lib/record-form/record-form.component.mjs +0 -30
  198. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-array/form-field-array.component.mjs +0 -11
  199. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-file/form-field-file.component.mjs +0 -27
  200. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-object/form-field-object.component.mjs +0 -11
  201. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.mjs +0 -27
  202. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-simple/form-field-simple.component.mjs +0 -49
  203. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +0 -11
  204. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-temporal-extent/form-field-temporal-extent.component.mjs +0 -11
  205. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field.component.mjs +0 -76
  206. package/esm2022/libs/ui/inputs/src/lib/form-field/form-field.model.mjs +0 -2
  207. package/esm2022/libs/ui/inputs/src/lib/form-field/index.mjs +0 -10
  208. package/libs/data-access/gn4/src/openapi/model/inlineObject3.api.model.d.ts +0 -18
  209. package/libs/data-access/gn4/src/openapi/model/inlineObject3.api.model.d.ts.map +0 -1
  210. package/libs/feature/editor/src/lib/record-form/record-form.component.d.ts.map +0 -1
  211. package/libs/ui/inputs/src/lib/form-field/form-field-array/form-field-array.component.d.ts.map +0 -1
  212. package/libs/ui/inputs/src/lib/form-field/form-field-file/form-field-file.component.d.ts.map +0 -1
  213. package/libs/ui/inputs/src/lib/form-field/form-field-object/form-field-object.component.d.ts.map +0 -1
  214. package/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.d.ts +0 -11
  215. package/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.d.ts.map +0 -1
  216. package/libs/ui/inputs/src/lib/form-field/form-field-simple/form-field-simple.component.d.ts.map +0 -1
  217. package/libs/ui/inputs/src/lib/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts.map +0 -1
  218. package/libs/ui/inputs/src/lib/form-field/form-field-temporal-extent/form-field-temporal-extent.component.d.ts.map +0 -1
  219. package/libs/ui/inputs/src/lib/form-field/form-field.component.d.ts.map +0 -1
  220. package/libs/ui/inputs/src/lib/form-field/form-field.model.d.ts.map +0 -1
  221. package/libs/ui/inputs/src/lib/form-field/index.d.ts.map +0 -1
  222. package/src/libs/data-access/gn4/src/openapi/model/inlineObject3.api.model.ts +0 -18
  223. package/src/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.html +0 -11
  224. package/src/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.ts +0 -15
  225. /package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.model.d.ts +0 -0
  226. /package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/index.d.ts +0 -0
  227. /package/src/libs/feature/editor/src/lib/{record-form/record-form.component.css → components/overview-upload/overview-upload.component.css} +0 -0
  228. /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
  229. /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
  230. /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
  231. /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
  232. /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
  233. /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
  234. /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
  235. /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
  236. /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
  237. /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
  238. /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
  239. /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
  240. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.component.css +0 -0
  241. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.model.ts +0 -0
  242. /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/index.ts +0 -0
  243. /package/src/libs/{ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.css → feature/editor/src/lib/components/record-form/record-form.component.css} +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.3d65a13b",
3
+ "version": "2.3.0-dev.6083baae",
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
@@ -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,5 @@
1
+ .icon-small {
2
+ font-size: 16px;
3
+ height: 16px;
4
+ width: 16px;
5
+ }
@@ -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 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 {}
@@ -39,12 +39,12 @@
39
39
  [invalid]="isFieldInvalid"
40
40
  ></gn-ui-form-field-file>
41
41
  </ng-container>
42
- <ng-container *ngIf="isRichField">
42
+ <ng-container *ngIf="isAbstract">
43
43
  <gn-ui-form-field-rich
44
- class="grow"
44
+ class="h-[8rem]"
45
45
  [control]="formControl"
46
- [readonly]="isFieldLocked"
47
- [invalid]="isFieldInvalid"
46
+ [label]="config.labelKey | translate"
47
+ [hint]="config.hintKey | translate"
48
48
  ></gn-ui-form-field-rich>
49
49
  </ng-container>
50
50
  <ng-container *ngIf="isArrayField">
@@ -4,17 +4,42 @@ import {
4
4
  Input,
5
5
  Output,
6
6
  } from '@angular/core'
7
- import { FormFieldConfig } from './form-field.model'
8
- import { FormControl } from '@angular/forms'
7
+ import { FormControl, ReactiveFormsModule } from '@angular/forms'
8
+ import { MatIconModule } from '@angular/material/icon'
9
+ import { TranslateModule } from '@ngx-translate/core'
9
10
  import { Observable } from 'rxjs'
11
+ import { FormFieldArrayComponent } from './form-field-array/form-field-array.component'
12
+ import { FormFieldFileComponent } from './form-field-file/form-field-file.component'
13
+ import { FormFieldObjectComponent } from './form-field-object/form-field-object.component'
14
+ import { FormFieldRichComponent } from './form-field-rich/form-field-rich.component'
15
+ import { FormFieldSimpleComponent } from './form-field-simple/form-field-simple.component'
16
+ import { FormFieldSpatialExtentComponent } from './form-field-spatial-extent/form-field-spatial-extent.component'
17
+ import { FormFieldTemporalExtentComponent } from './form-field-temporal-extent/form-field-temporal-extent.component'
18
+ import { FormFieldConfig } from './form-field.model'
19
+ import { CommonModule } from '@angular/common'
10
20
 
11
21
  @Component({
12
22
  selector: 'gn-ui-form-field',
13
23
  templateUrl: './form-field.component.html',
14
24
  styleUrls: ['./form-field.component.css'],
15
25
  changeDetection: ChangeDetectionStrategy.OnPush,
26
+ standalone: true,
27
+ imports: [
28
+ FormFieldSimpleComponent,
29
+ FormFieldRichComponent,
30
+ FormFieldObjectComponent,
31
+ FormFieldSpatialExtentComponent,
32
+ FormFieldTemporalExtentComponent,
33
+ FormFieldFileComponent,
34
+ FormFieldArrayComponent,
35
+ CommonModule,
36
+ ReactiveFormsModule,
37
+ TranslateModule,
38
+ MatIconModule,
39
+ ],
16
40
  })
17
41
  export class FormFieldComponent {
42
+ @Input() model: string
18
43
  @Input() config: FormFieldConfig
19
44
  @Input() set value(v: unknown) {
20
45
  this.formControl.setValue(v, {
@@ -49,9 +74,6 @@ export class FormFieldComponent {
49
74
  this.config.type === 'toggle'
50
75
  )
51
76
  }
52
- get isRichField() {
53
- return this.config.type === 'rich'
54
- }
55
77
  get isFileField() {
56
78
  return this.config.type === 'file'
57
79
  }
@@ -77,4 +99,8 @@ export class FormFieldComponent {
77
99
  get isFieldInvalid() {
78
100
  return !this.config.locked && this.config.invalid
79
101
  }
102
+
103
+ get isAbstract() {
104
+ return this.model === 'abstract'
105
+ }
80
106
  }
@@ -2,6 +2,7 @@
2
2
  <ng-container *ngFor="let field of fields$ | async; trackBy: fieldTracker">
3
3
  <gn-ui-form-field
4
4
  *ngIf="field.config.formFieldConfig && !field.config.hidden"
5
+ [model]="field.config.model"
5
6
  [config]="field.config.formFieldConfig"
6
7
  [value]="field.value"
7
8
  (valueChange)="handleFieldValueChange(field, $event)"
@@ -1,8 +1,17 @@
1
1
  import { CommonModule } from '@angular/common'
2
2
  import { ChangeDetectionStrategy, Component } from '@angular/core'
3
- import { UiInputsModule } from '../../../../../../libs/ui/inputs/src'
4
- import { EditorFacade } from '../+state/editor.facade'
5
- import { EditorFieldState, EditorFieldValue } from '../models/fields.model'
3
+ import { EditorFacade } from '../../+state/editor.facade'
4
+ import { EditorFieldState, EditorFieldValue } from '../../models/fields.model'
5
+ import {
6
+ FormFieldArrayComponent,
7
+ FormFieldComponent,
8
+ FormFieldFileComponent,
9
+ FormFieldObjectComponent,
10
+ FormFieldRichComponent,
11
+ FormFieldSimpleComponent,
12
+ FormFieldSpatialExtentComponent,
13
+ FormFieldTemporalExtentComponent,
14
+ } from './form-field'
6
15
 
7
16
  @Component({
8
17
  selector: 'gn-ui-record-form',
@@ -10,7 +19,17 @@ import { EditorFieldState, EditorFieldValue } from '../models/fields.model'
10
19
  styleUrls: ['./record-form.component.css'],
11
20
  changeDetection: ChangeDetectionStrategy.OnPush,
12
21
  standalone: true,
13
- imports: [CommonModule, UiInputsModule],
22
+ imports: [
23
+ CommonModule,
24
+ FormFieldComponent,
25
+ FormFieldArrayComponent,
26
+ FormFieldFileComponent,
27
+ FormFieldObjectComponent,
28
+ FormFieldRichComponent,
29
+ FormFieldSimpleComponent,
30
+ FormFieldSpatialExtentComponent,
31
+ FormFieldTemporalExtentComponent,
32
+ ],
14
33
  })
15
34
  export class RecordFormComponent {
16
35
  fields$ = this.facade.recordFields$