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,20 +1,20 @@
1
+ import { CommonModule } from '@angular/common'
2
+ import { HttpClientModule, HttpClientXsrfModule } from '@angular/common/http'
1
3
  import { NgModule } from '@angular/core'
2
4
  import { MatNativeDateModule } from '@angular/material/core'
3
5
  import { MatDatepickerModule } from '@angular/material/datepicker'
4
6
  import { MatFormFieldModule } from '@angular/material/form-field'
5
- import { WizardComponent } from './components/wizard/wizard.component'
6
- import { WizardFieldComponent } from './components/wizard-field/wizard-field.component'
7
7
  import { UiInputsModule } from '../../../../../libs/ui/inputs/src'
8
8
  import { UiWidgetsModule } from '../../../../../libs/ui/widgets/src'
9
- import { TranslateModule } from '@ngx-translate/core'
10
- import { WizardSummarizeComponent } from './components/wizard-summarize/wizard-summarize.component'
11
- import { CommonModule } from '@angular/common'
12
- import { HttpClientModule, HttpClientXsrfModule } from '@angular/common/http'
13
- import { StoreModule } from '@ngrx/store'
14
9
  import { EffectsModule } from '@ngrx/effects'
15
- import * as fromEditor from './+state/editor.reducer'
10
+ import { StoreModule } from '@ngrx/store'
11
+ import { TranslateModule } from '@ngx-translate/core'
16
12
  import { EditorEffects } from './+state/editor.effects'
17
13
  import { EditorFacade } from './+state/editor.facade'
14
+ import * as fromEditor from './+state/editor.reducer'
15
+ import { WizardFieldComponent } from './components/wizard-field/wizard-field.component'
16
+ import { WizardSummarizeComponent } from './components/wizard-summarize/wizard-summarize.component'
17
+ import { WizardComponent } from './components/wizard/wizard.component'
18
18
 
19
19
  @NgModule({
20
20
  declarations: [
@@ -42,5 +42,5 @@ import { EditorFacade } from './+state/editor.facade'
42
42
  providers: [EditorFacade],
43
43
  })
44
44
  export class FeatureEditorModule {}
45
- export * from './services/wizard.service'
46
45
  export * from './models/index'
46
+ export * from './services/wizard.service'
@@ -1,4 +1,4 @@
1
- import { FormFieldConfig } from '../../../../../../libs/ui/inputs/src'
1
+ import { FormFieldConfig } from '../components/record-form/form-field'
2
2
 
3
3
  // Expressions should be enclosed in `${}` to be recognized as such
4
4
  // eg. ${dateNow()}
@@ -1,6 +1,6 @@
1
1
  <div class="flex flex-col gap-2 my-2">
2
2
  <div class="flex items-center gap-4">
3
- <div class="flex-grow rounded-md border-2 border-gray-200">
3
+ <div class="grow rounded-md border-2 border-gray-200">
4
4
  <gn-ui-drag-and-drop-file-input
5
5
  (fileChange)="handleFileChange($event)"
6
6
  [accept]="acceptedMimeType.join(',')"
@@ -0,0 +1,3 @@
1
+ export * from './lib/feature-notifications.module'
2
+ export * from './lib/notifications.service'
3
+ export * from './lib/notifications-container/notifications-container.component'
@@ -0,0 +1,10 @@
1
+ import { NotificationsService } from './notifications.service'
2
+ import { NgModule } from '@angular/core'
3
+
4
+ @NgModule({
5
+ declarations: [],
6
+ exports: [],
7
+ imports: [],
8
+ providers: [NotificationsService],
9
+ })
10
+ export class FeatureNotificationsModule {}
@@ -0,0 +1,6 @@
1
+ export interface NotificationContent {
2
+ type: 'info' | 'warning' | 'error' | 'success'
3
+ title: string
4
+ text: string
5
+ closeMessage?: string
6
+ }
@@ -0,0 +1,17 @@
1
+ <div class="flex flex-col gap-6 p-6 items-start pointer-events-none">
2
+ <gn-ui-notification
3
+ *ngFor="
4
+ let notification of notificationsService.notifications$ | async;
5
+ trackBy: trackById
6
+ "
7
+ class="max-w-full pointer-events-auto"
8
+ [text]="notification.text"
9
+ [type]="notification.type"
10
+ [title]="notification.title"
11
+ [closeMessage]="notification.closeMessage"
12
+ (notificationClose)="
13
+ notificationsService.removeNotificationById(notification.id)
14
+ "
15
+ [@enterExit]
16
+ ></gn-ui-notification>
17
+ </div>
@@ -0,0 +1,44 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core'
2
+ import { CommonModule } from '@angular/common'
3
+ import { NotificationsService } from '../notifications.service'
4
+ import { NotificationComponent } from '../../../../../../libs/ui/elements/src'
5
+ import {
6
+ animate,
7
+ keyframes,
8
+ style,
9
+ transition,
10
+ trigger,
11
+ } from '@angular/animations'
12
+
13
+ @Component({
14
+ selector: 'gn-ui-notifications-container',
15
+ standalone: true,
16
+ imports: [CommonModule, NotificationComponent],
17
+ templateUrl: './notifications-container.component.html',
18
+ styleUrls: ['./notifications-container.component.css'],
19
+ changeDetection: ChangeDetectionStrategy.OnPush,
20
+ animations: [
21
+ trigger('enterExit', [
22
+ transition(':enter', [
23
+ animate(
24
+ '150ms',
25
+ keyframes([
26
+ style({ transform: 'scale(1)', opacity: 0 }),
27
+ style({ transform: 'scale(1.03)', opacity: 0.5 }),
28
+ style({ transform: 'scale(1)', opacity: 1 }),
29
+ ])
30
+ ),
31
+ ]),
32
+ transition(':leave', [
33
+ animate('200ms', style({ transform: 'translateX(50px)', opacity: 0 })),
34
+ ]),
35
+ ]),
36
+ ],
37
+ })
38
+ export class NotificationsContainerComponent {
39
+ constructor(protected notificationsService: NotificationsService) {}
40
+
41
+ trackById(index: number, notification: { id: number }) {
42
+ return notification.id
43
+ }
44
+ }
@@ -0,0 +1,27 @@
1
+ import { Injectable } from '@angular/core'
2
+ import { NotificationContent } from './notification.model'
3
+ import { BehaviorSubject } from 'rxjs'
4
+
5
+ type NotificationWithIdentity = NotificationContent & { id: number }
6
+
7
+ @Injectable({
8
+ providedIn: 'root',
9
+ })
10
+ export class NotificationsService {
11
+ notifications$ = new BehaviorSubject<NotificationWithIdentity[]>([])
12
+
13
+ showNotification(content: NotificationContent, timeoutMs?: number) {
14
+ const id = Math.floor(Math.random() * 1000000)
15
+ this.notifications$.next([...this.notifications$.value, { ...content, id }])
16
+ if (typeof timeoutMs === 'undefined') return
17
+ setTimeout(() => {
18
+ this.removeNotificationById(id)
19
+ }, timeoutMs)
20
+ }
21
+
22
+ removeNotificationById(id: number) {
23
+ this.notifications$.next(
24
+ this.notifications$.value.filter((n) => n.id !== id)
25
+ )
26
+ }
27
+ }
@@ -50,20 +50,20 @@
50
50
  [title]="formats.join(', ')"
51
51
  >
52
52
  <span
53
- class="badge-btn min-w-[45px] text-sm text-white px-2 flex-shrink-0"
53
+ class="badge-btn min-w-[45px] text-sm text-white px-2 shrink-0"
54
54
  [style.background-color]="getBadgeColor(formats[0])"
55
55
  *ngIf="formats[0]"
56
56
  >
57
57
  {{ formats[0] }}
58
58
  </span>
59
59
  <span
60
- class="badge-btn min-w-[45px] text-sm text-white px-2 flex-shrink-0"
60
+ class="badge-btn min-w-[45px] text-sm text-white px-2 shrink-0"
61
61
  [style.background-color]="getBadgeColor(formats[1])"
62
62
  *ngIf="formats[1]"
63
63
  >
64
64
  {{ formats[1] }}
65
65
  </span>
66
- <div class="flex-shrink-0" *ngIf="formats.slice(2).length > 0">
66
+ <div class="shrink-0" *ngIf="formats.slice(2).length > 0">
67
67
  <span>+{{ formats.slice(2).length }}</span>
68
68
  </div>
69
69
  </div>
@@ -4,7 +4,7 @@
4
4
  [title]="organisation.name"
5
5
  >
6
6
  <div
7
- class="flex-shrink-0 bg-gray-100 rounded-lg overflow-hidden w-full border border-gray-300 h-36"
7
+ class="shrink-0 bg-gray-100 rounded-lg overflow-hidden w-full border border-gray-300 h-36"
8
8
  >
9
9
  <gn-ui-thumbnail
10
10
  class="relative h-full w-full"
@@ -13,20 +13,20 @@
13
13
  >
14
14
  </gn-ui-thumbnail>
15
15
  </div>
16
- <div class="px-3 pb-2 capitalize flex flex-col flex-grow overflow-hidden">
16
+ <div class="px-3 pb-2 capitalize flex flex-col grow overflow-hidden">
17
17
  <span
18
- class="flex-shrink-0 mb-3 mt-5 font-title text-21 text-title group-hover:text-primary line-clamp-2 sm:mt-2 transition-colors"
18
+ class="shrink-0 mb-3 mt-5 font-title text-21 text-title group-hover:text-primary line-clamp-2 sm:mt-2 transition-colors"
19
19
  data-cy="organizationName"
20
20
  >
21
21
  {{ organisation.name }}</span
22
22
  >
23
23
  <p
24
- class="abstract mt-4 mb-5 sm:mb-2 sm:mt-0 flex-grow flex-shrink-1 overflow-hidden"
24
+ class="abstract mt-4 mb-5 sm:mb-2 sm:mt-0 grow shrink-1 overflow-hidden"
25
25
  data-cy="organizationDesc"
26
26
  >
27
27
  {{ organisation.description }}
28
28
  </p>
29
- <div class="flex-shrink-0 text-primary opacity-50 flex leading-6">
29
+ <div class="shrink-0 text-primary opacity-50 flex leading-6">
30
30
  <mat-icon class="material-symbols-outlined text-primary opacity-50 mr-1"
31
31
  >folder_open
32
32
  </mat-icon>
@@ -1,24 +1,24 @@
1
- export * from './lib/ui-elements.module'
2
- export * from './lib/metadata-info/metadata-info.component'
3
- export * from './lib/metadata-contact/metadata-contact.component'
4
- export * from './lib/metadata-catalog/metadata-catalog.component'
5
- export * from './lib/metadata-quality/metadata-quality.component'
6
- export * from './lib/metadata-quality-item/metadata-quality-item.component'
7
- export * from './lib/search-results-error/search-results-error.component'
8
- export * from './lib/thumbnail/thumbnail.component'
9
- export * from './lib/content-ghost/content-ghost.component'
10
- export * from './lib/pagination-buttons/pagination-buttons.component'
11
1
  export * from './lib/api-card/api-card.component'
12
2
  export * from './lib/avatar/avatar.component'
13
3
  export * from './lib/content-ghost/content-ghost.component'
14
4
  export * from './lib/download-item/download-item.component'
15
5
  export * from './lib/downloads-list/downloads-list.component'
6
+ export * from './lib/image-overlay-preview/image-overlay-preview.component'
16
7
  export * from './lib/link-card/link-card.component'
8
+ export * from './lib/markdown-editor/markdown-editor.component'
9
+ export * from './lib/markdown-parser/markdown-parser.component'
10
+ export * from './lib/max-lines/max-lines.component'
11
+ export * from './lib/metadata-catalog/metadata-catalog.component'
12
+ export * from './lib/metadata-contact/metadata-contact.component'
13
+ export * from './lib/metadata-info/metadata-info.component'
14
+ export * from './lib/metadata-quality-item/metadata-quality-item.component'
15
+ export * from './lib/metadata-quality/metadata-quality.component'
16
+ export * from './lib/pagination-buttons/pagination-buttons.component'
17
17
  export * from './lib/pagination/pagination.component'
18
+ export * from './lib/record-api-form/record-api-form.component'
18
19
  export * from './lib/related-record-card/related-record-card.component'
19
20
  export * from './lib/search-results-error/search-results-error.component'
21
+ export * from './lib/thumbnail/thumbnail.component'
22
+ export * from './lib/ui-elements.module'
20
23
  export * from './lib/user-preview/user-preview.component'
21
- export * from './lib/max-lines/max-lines.component'
22
- export * from './lib/record-api-form/record-api-form.component'
23
- export * from './lib/markdown-parser/markdown-parser.component'
24
- export * from './lib/image-overlay-preview/image-overlay-preview.component'
24
+ export * from './lib/notification/notification.component'
@@ -6,7 +6,7 @@
6
6
  *ngIf="imageUrl"
7
7
  [showContent]="imageUrl !== undefined"
8
8
  data-cy="record-thumbnail"
9
- class="flex-shrink-0 bg-gray-100 rounded-lg overflow-hidden w-full border border-gray-300 group-hover:shadow-xl group-hover:border-0 h-48 mb-3"
9
+ class="shrink-0 bg-gray-100 rounded-lg overflow-hidden w-full border border-gray-300 group-hover:shadow-xl group-hover:border-0 h-48 mb-3"
10
10
  >
11
11
  <gn-ui-thumbnail
12
12
  class="relative h-full w-full"
@@ -1,5 +0,0 @@
1
- .icon-small {
2
- font-size: 16px;
3
- height: 16px;
4
- width: 16px;
5
- }
@@ -1,25 +1,4 @@
1
1
  <div class="h-full flex flex-col">
2
- <div class="flex-none w-full flex flex-row items-center">
3
- <p class="flex-none font-bold">{{ label }}</p>
4
- <div class="flex-1 flex justify-end items-center">
5
- <gn-ui-button
6
- [extraClass]="getButtonExtraClass()"
7
- (buttonClick)="togglePreview()"
8
- >
9
- <span class="material-symbols-outlined mr-1 icon-small">{{
10
- preview ? 'visibility' : 'visibility_off'
11
- }}</span>
12
- {{ preview ? 'WYSIWYG' : 'Markdown' }}
13
- </gn-ui-button>
14
- <span
15
- class="material-symbols-outlined m-2 icon-small"
16
- [matTooltip]="tooltip"
17
- matTooltipPosition="above"
18
- >
19
- help
20
- </span>
21
- </div>
22
- </div>
23
2
  <p class="flex-none mb-2 font-medium text-sm text-gray-900">
24
3
  {{ helperText }}
25
4
  </p>
@@ -31,26 +31,13 @@ import { MatTooltipModule } from '@angular/material/tooltip'
31
31
  ],
32
32
  })
33
33
  export class MarkdownEditorComponent {
34
- @Input() label: string
35
- @Input() tooltip?: string
34
+ @Input() preview = false
36
35
  @Input() helperText?: string
37
36
  @Input() placeholder: string
38
37
  @Input() textContent: string
39
38
  @Output() textContentChanged: EventEmitter<string> =
40
39
  new EventEmitter<string>()
41
40
 
42
- preview = false
43
-
44
- getButtonExtraClass() {
45
- return `${
46
- this.preview ? 'text-gray-200 bg-gray-900' : 'text-gray-900 bg-gray-200'
47
- } rounded-[1.25rem] p-[0.375rem] text-xs font-medium w-24`
48
- }
49
-
50
- togglePreview() {
51
- this.preview = !this.preview
52
- }
53
-
54
41
  textContentChangedHandler(textContent: string) {
55
42
  this.textContent = textContent
56
43
  this.textContentChanged.emit(this.textContent)
@@ -0,0 +1,52 @@
1
+ <div
2
+ class="p-[16px] flex flex-row gap-[16px] items-start border border-gray-200 shadow-md rounded bg-background"
3
+ >
4
+ <div
5
+ role="alert"
6
+ class="rounded-full text-white p-[6px] w-[32px] h-[32px] flex shrink-0"
7
+ [ngClass]="{
8
+ 'bg-red-500': type === 'error',
9
+ 'bg-yellow-500': type === 'warning',
10
+ 'bg-green-500': type === 'success',
11
+ 'bg-blue-500': type === 'info'
12
+ }"
13
+ [ngSwitch]="type"
14
+ >
15
+ <mat-icon class="material-symbols-outlined !w-[18px] !h-[18px] text-[20px]">
16
+ <ng-container *ngSwitchCase="'success'">check_circle</ng-container>
17
+ <ng-container *ngSwitchCase="'info'">info</ng-container>
18
+ <ng-container *ngSwitchCase="'warning'">warning</ng-container>
19
+ <ng-container *ngSwitchCase="'error'">error</ng-container>
20
+ </mat-icon>
21
+ </div>
22
+ <div
23
+ class="flex flex-col items-start gap-[4px] pt-[3px] grow shrink overflow-hidden"
24
+ >
25
+ <div class="font-bold text-[16px] text-gray-900">
26
+ {{ title }}
27
+ </div>
28
+ <div class="text-[14px] text-gray-800">
29
+ {{ text }}
30
+ </div>
31
+ <a
32
+ href
33
+ *ngIf="closeMessage"
34
+ class="text-[14px] gn-ui-link"
35
+ (click)="handleClose($event)"
36
+ >
37
+ {{ closeMessage }}
38
+ </a>
39
+ </div>
40
+ <gn-ui-button
41
+ type="light"
42
+ class="shrink-0"
43
+ (buttonClick)="handleClose()"
44
+ [style.--gn-ui-button-padding]="0"
45
+ [style.--gn-ui-button-width]="'21px'"
46
+ [style.--gn-ui-button-height]="'21px'"
47
+ >
48
+ <mat-icon class="material-symbols-outlined text-[22px] !w-[21px] !h-[21px]"
49
+ >close</mat-icon
50
+ >
51
+ </gn-ui-button>
52
+ </div>
@@ -0,0 +1,31 @@
1
+ import {
2
+ ChangeDetectionStrategy,
3
+ Component,
4
+ EventEmitter,
5
+ Input,
6
+ Output,
7
+ } from '@angular/core'
8
+ import { CommonModule } from '@angular/common'
9
+ import { MatIconModule } from '@angular/material/icon'
10
+ import { ButtonComponent } from '../../../../../../libs/ui/inputs/src'
11
+
12
+ @Component({
13
+ selector: 'gn-ui-notification',
14
+ standalone: true,
15
+ imports: [CommonModule, MatIconModule, ButtonComponent],
16
+ templateUrl: './notification.component.html',
17
+ styleUrls: ['./notification.component.css'],
18
+ changeDetection: ChangeDetectionStrategy.OnPush,
19
+ })
20
+ export class NotificationComponent {
21
+ @Input() type: 'info' | 'warning' | 'error' | 'success' = 'info'
22
+ @Input() title: string
23
+ @Input() text: string
24
+ @Input() closeMessage?: string
25
+ @Output() notificationClose = new EventEmitter<void>()
26
+
27
+ handleClose(event?: Event) {
28
+ event?.preventDefault()
29
+ this.notificationClose.emit()
30
+ }
31
+ }
@@ -13,7 +13,7 @@
13
13
  </p>
14
14
  </button>
15
15
  </div>
16
- <div class="flex flex-row flex-wrap justify-between flex-grow gap-5">
16
+ <div class="flex flex-row flex-wrap justify-between grow gap-5">
17
17
  <div class="flex flex-col gap-3">
18
18
  <p class="text-[14px]" translate>record.metadata.api.form.limit</p>
19
19
  <div class="flex flex-row items-center gap-2">
@@ -1,3 +1,4 @@
1
+ import { CommonModule } from '@angular/common'
1
2
  import {
2
3
  ChangeDetectionStrategy,
3
4
  Component,
@@ -18,20 +19,21 @@ export const THUMBNAIL_PLACEHOLDER = new InjectionToken<string>(
18
19
  'thumbnail-placeholder'
19
20
  )
20
21
 
22
+ type FitOptions = 'cover' | 'contain' | 'scale-down'
21
23
  type ThumbnailImageObject = {
22
24
  url: string
23
- fit?: 'cover' | 'contain' | 'scale-down'
25
+ fit?: FitOptions
24
26
  }
25
27
 
26
28
  const DEFAULT_PLACEHOLDER =
27
29
  'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5gkNDCUFYjA1nwAAA1pJREFUeNrtnW2TmjAURh8CLlTdrmun///3tZ22+zLuYlehH7jsMGogwRiiec4MM44K6D3x3hAwAIQQQgghhJDYSM5cPwNQAMgBpACUg22GTg2gArAD8A9AKY+9CsgALAF8YRsGALwDeAWw9yGgALCKoKWP+WU8iwxjUsudLBj83sZciIiPSwhoWz7pJ5dUZFQXlEXOZ/DNeTBt3JnhBpc9aacGsOn0BuoIUk3b+5trGnEC4B7Ak4sUlInRU+wB/JbgVxG18KrTBc01EmYmcTFJQUVPy/9zTh/4BthLDOqeenB2DdBtZBN58LsSNpcUoEtTJWM/GIvMhQDde9j6h2OhXAjo6/2Q/lgkLgSQC0IBFEABZEKyiaQv5AAv7fSlS+lPVxRwOXTnEtoTPAs04yfRHGMoz8F/HOiaJfKeggLc78dmOHsVS33y9SUXsDuLlsg6FOAw/fhYhwI0pJ7WoQASpoC9p3UoQEPpaR0K0LCB3fB1e6KfAhxRweAKgQ5PsQxJ+CzCJYC/A7+EWt4TzVCE77GgEsBPHA/G7QBswcE4b+noVRZ2QxkCCqAAQgEUQCiAAggFUAChAAogFEABhAJcfT9FAdOxQuB/ML9lAfdo/qWYy2MK8EiO5mrrliUCvdIudAEzWWzQzWuxwjRnAK9WwAzAWhZTCe3l7cryNQrQBL/txZhKGGrlwc36ogIPfvdzfhuQsDDM80EVZXUFwe+mEJ2EOwBfLfYTTFFWVxL8Qwl3nedSye1jjhEyCjAPflfCWiScU1iDKMrqyoJ/KOFxRDf1sCg/xCxgTPC7EnIHn6GYsiirKw2+ayYryorBn7YoKwb/qCgntywg1OBPdqSsGPyTRXnp07gvPgD8AAl6KIICCAVQAAlLwOg5MSNi9NyqJgKqAHpQoZNZxs5KgG7SDN7AZzgWOxcCtprn5/wVfLb+uWXsrASUPXlvHbmETGKQjBVgMitVJTuaaQS2t/GoEMeE3onEor2jlK4RvwN4G1u9T4n6zp6PMTWAXzCYdCq12OCOhdeYZzT3mIErAW1Fr+HmNOAt82KSesYIAJoRzR2aIVumo+Ms8WwT/HOOZlM0Y+Zzxv2zp/gCTzfzPOyGtdfgp7LEcDvbvSxbWXg/HUIIIYQQQogx/wHLoX7NoCMFPwAAAABJRU5ErkJggg=='
28
30
 
29
- type FitOptions = 'cover' | 'contain' | 'scale-down'
30
-
31
31
  @Component({
32
32
  selector: 'gn-ui-thumbnail',
33
33
  templateUrl: './thumbnail.component.html',
34
34
  changeDetection: ChangeDetectionStrategy.OnPush,
35
+ standalone: true,
36
+ imports: [CommonModule],
35
37
  })
36
38
  export class ThumbnailComponent implements OnInit, OnChanges {
37
39
  @Input() thumbnailUrl: string | string[]
@@ -46,6 +46,7 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over
46
46
  FormsModule,
47
47
  NgOptimizedImage,
48
48
  MarkdownParserComponent,
49
+ ThumbnailComponent,
49
50
  ],
50
51
  declarations: [
51
52
  MetadataInfoComponent,
@@ -61,7 +62,6 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over
61
62
  MetadataQualityItemComponent,
62
63
  SearchResultsErrorComponent,
63
64
  PaginationComponent,
64
- ThumbnailComponent,
65
65
  AvatarComponent,
66
66
  UserPreviewComponent,
67
67
  GnUiLinkifyDirective,
@@ -11,7 +11,6 @@ export * from './lib/button/button.component'
11
11
  export * from './lib/viewport-intersector/viewport-intersector.component'
12
12
  export * from './lib/check-toggle/check-toggle.component'
13
13
  export * from './lib/ui-inputs.module'
14
- export * from './lib/form-field'
15
14
  export * from './lib/copy-text-button/copy-text-button.component'
16
15
  export * from './lib/drag-and-drop-file-input/drag-and-drop-file-input.component'
17
16
  export * from './lib/navigation-button/navigation-button.component'
@@ -15,7 +15,7 @@ import { propagateToDocumentOnly } from '../../../../../../libs/util/shared/src'
15
15
  standalone: true,
16
16
  })
17
17
  export class ButtonComponent {
18
- private btnClass: string
18
+ private btnClass = 'gn-ui-btn-default'
19
19
 
20
20
  @Input() set type(
21
21
  value: 'primary' | 'secondary' | 'default' | 'outline' | 'light'
@@ -0,0 +1,45 @@
1
+ import { Directive, HostListener, Output, EventEmitter } from '@angular/core'
2
+
3
+ @Directive({
4
+ selector: '[gnUiFilesDrop]',
5
+ standalone: true,
6
+ })
7
+ export class FilesDropDirective {
8
+ @Output() dragFilesOver: EventEmitter<boolean> = new EventEmitter()
9
+ @Output() dropFiles: EventEmitter<File[]> = new EventEmitter()
10
+
11
+ dragEnterCounter = 0
12
+
13
+ @HostListener('dragenter', ['$event'])
14
+ _onDragEnter(event: DragEvent) {
15
+ event.preventDefault()
16
+ this.dragEnterCounter++
17
+ this.dragFilesOver.emit(true)
18
+ }
19
+
20
+ @HostListener('dragover', ['$event'])
21
+ _onDragOver(event: DragEvent) {
22
+ event.preventDefault()
23
+ }
24
+
25
+ @HostListener('dragleave', ['$event'])
26
+ _onDragLeave(event: DragEvent) {
27
+ event.preventDefault()
28
+ this.dragEnterCounter = Math.max(0, this.dragEnterCounter - 1)
29
+ if (this.dragEnterCounter === 0) {
30
+ this.dragFilesOver.emit(false)
31
+ }
32
+ }
33
+
34
+ @HostListener('drop', ['$event'])
35
+ _onDrop(event: DragEvent) {
36
+ event.preventDefault()
37
+ this.dragEnterCounter = 0
38
+ this.dragFilesOver.emit(false)
39
+
40
+ const files = Array.from(event.dataTransfer.files)
41
+ if (files.length > 0) {
42
+ this.dropFiles.emit(files)
43
+ }
44
+ }
45
+ }