geonetwork-ui 2.6.0-dev.d216c4dea → 2.6.0-dev.e61ca542f

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 (193) hide show
  1. package/esm2022/libs/api/metadata-converter/src/index.mjs +2 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/common/resource-types.mjs +17 -15
  3. package/esm2022/libs/feature/editor/src/index.mjs +2 -1
  4. package/esm2022/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.mjs +18 -0
  5. package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +3 -3
  6. package/esm2022/libs/feature/record/src/lib/data-view-share/data-view-share.component.mjs +3 -3
  7. package/esm2022/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.mjs +6 -3
  8. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +3 -3
  9. package/esm2022/libs/feature/search/src/index.mjs +2 -2
  10. package/esm2022/libs/feature/search/src/lib/feature-search.module.mjs +12 -5
  11. package/esm2022/libs/feature/search/src/lib/results-hits/results-hits.container.component.mjs +41 -0
  12. package/esm2022/libs/feature/search/src/lib/utils/service/fields.mjs +70 -1
  13. package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +4 -3
  14. package/esm2022/libs/ui/elements/src/index.mjs +2 -1
  15. package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +3 -3
  16. package/esm2022/libs/ui/elements/src/lib/download-item/download-item.component.mjs +3 -3
  17. package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +18 -7
  18. package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +3 -3
  19. package/esm2022/libs/ui/elements/src/lib/kind-badge/kind-badge.component.mjs +51 -0
  20. package/esm2022/libs/ui/elements/src/lib/link-card/link-card.component.mjs +3 -3
  21. package/esm2022/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.mjs +3 -3
  22. package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
  23. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
  24. package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +3 -3
  25. package/esm2022/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.mjs +3 -3
  26. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +10 -4
  27. package/esm2022/libs/ui/inputs/src/index.mjs +2 -1
  28. package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +2 -2
  29. package/esm2022/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.mjs +3 -3
  30. package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +3 -3
  31. package/esm2022/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.mjs +42 -0
  32. package/esm2022/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.mjs +2 -0
  33. package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +3 -3
  34. package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +8 -9
  35. package/esm2022/libs/ui/layout/src/index.mjs +2 -1
  36. package/esm2022/libs/ui/layout/src/lib/block-list/block-list.component.mjs +48 -11
  37. package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +3 -3
  38. package/esm2022/libs/ui/layout/src/lib/max-lines/max-lines.component.mjs +3 -3
  39. package/esm2022/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.mjs +6 -6
  40. package/esm2022/libs/ui/layout/src/lib/truncated-text/truncated-text.component.mjs +56 -0
  41. package/esm2022/libs/ui/layout/src/lib/ui-layout.module.mjs +4 -12
  42. package/esm2022/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.mjs +2 -1
  43. package/esm2022/libs/ui/search/src/index.mjs +2 -1
  44. package/esm2022/libs/ui/search/src/lib/results-hits-number/results-hits-number.component.mjs +3 -3
  45. package/esm2022/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.mjs +53 -0
  46. package/esm2022/libs/ui/search/src/lib/ui-search.module.mjs +11 -3
  47. package/esm2022/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.mjs +3 -3
  48. package/esm2022/translations/de.json +8 -1
  49. package/esm2022/translations/en.json +10 -1
  50. package/esm2022/translations/es.json +8 -1
  51. package/esm2022/translations/fr.json +11 -2
  52. package/esm2022/translations/it.json +8 -1
  53. package/esm2022/translations/nl.json +8 -1
  54. package/esm2022/translations/pt.json +8 -1
  55. package/fesm2022/geonetwork-ui.mjs +527 -145
  56. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  57. package/libs/api/metadata-converter/src/index.d.ts +1 -0
  58. package/libs/api/metadata-converter/src/index.d.ts.map +1 -1
  59. package/libs/api/metadata-converter/src/lib/common/resource-types.d.ts +21 -0
  60. package/libs/api/metadata-converter/src/lib/common/resource-types.d.ts.map +1 -1
  61. package/libs/feature/editor/src/index.d.ts +1 -0
  62. package/libs/feature/editor/src/index.d.ts.map +1 -1
  63. package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts +7 -0
  64. package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts.map +1 -0
  65. package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts +2 -1
  66. package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts.map +1 -1
  67. package/libs/feature/search/src/index.d.ts +1 -1
  68. package/libs/feature/search/src/index.d.ts.map +1 -1
  69. package/libs/feature/search/src/lib/feature-search.module.d.ts +4 -2
  70. package/libs/feature/search/src/lib/feature-search.module.d.ts.map +1 -1
  71. package/libs/feature/search/src/lib/results-hits/results-hits.container.component.d.ts +21 -0
  72. package/libs/feature/search/src/lib/results-hits/results-hits.container.component.d.ts.map +1 -0
  73. package/libs/feature/search/src/lib/utils/service/fields.d.ts +21 -0
  74. package/libs/feature/search/src/lib/utils/service/fields.d.ts.map +1 -1
  75. package/libs/feature/search/src/lib/utils/service/fields.service.d.ts.map +1 -1
  76. package/libs/ui/elements/src/index.d.ts +1 -0
  77. package/libs/ui/elements/src/index.d.ts.map +1 -1
  78. package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts +1 -1
  79. package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts.map +1 -1
  80. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +7 -1
  81. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts.map +1 -1
  82. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts +11 -0
  83. package/libs/ui/elements/src/lib/kind-badge/kind-badge.component.d.ts.map +1 -0
  84. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts +1 -1
  85. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts.map +1 -1
  86. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +2 -1
  87. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  88. package/libs/ui/inputs/src/index.d.ts +1 -0
  89. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  90. package/libs/ui/inputs/src/lib/button/button.component.d.ts +1 -1
  91. package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
  92. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.d.ts +14 -0
  93. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.d.ts.map +1 -0
  94. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.d.ts +6 -0
  95. package/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.d.ts.map +1 -0
  96. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +25 -24
  97. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
  98. package/libs/ui/layout/src/index.d.ts +1 -0
  99. package/libs/ui/layout/src/index.d.ts.map +1 -1
  100. package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts +9 -2
  101. package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts.map +1 -1
  102. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts +18 -0
  103. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts.map +1 -0
  104. package/libs/ui/layout/src/lib/ui-layout.module.d.ts.map +1 -1
  105. package/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.d.ts.map +1 -1
  106. package/libs/ui/search/src/index.d.ts +1 -0
  107. package/libs/ui/search/src/index.d.ts.map +1 -1
  108. package/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.d.ts +17 -0
  109. package/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.d.ts.map +1 -0
  110. package/libs/ui/search/src/lib/ui-search.module.d.ts +21 -19
  111. package/libs/ui/search/src/lib/ui-search.module.d.ts.map +1 -1
  112. package/package.json +1 -1
  113. package/src/libs/api/metadata-converter/src/index.ts +1 -0
  114. package/src/libs/api/metadata-converter/src/lib/common/resource-types.ts +29 -15
  115. package/src/libs/feature/editor/src/index.ts +1 -0
  116. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.css +0 -0
  117. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.html +14 -0
  118. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.ts +15 -0
  119. package/src/libs/feature/record/src/lib/data-view/data-view.component.html +14 -10
  120. package/src/libs/feature/record/src/lib/data-view-share/data-view-share.component.html +1 -1
  121. package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.html +2 -2
  122. package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.ts +1 -0
  123. package/src/libs/feature/record/src/lib/map-view/map-view.component.html +21 -15
  124. package/src/libs/feature/search/src/index.ts +1 -1
  125. package/src/libs/feature/search/src/lib/feature-search.module.ts +9 -2
  126. package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.css +0 -0
  127. package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.html +16 -0
  128. package/src/libs/feature/search/src/lib/results-hits/results-hits.container.component.ts +59 -0
  129. package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +4 -5
  130. package/src/libs/feature/search/src/lib/utils/service/fields.ts +99 -0
  131. package/src/libs/ui/elements/src/index.ts +1 -0
  132. package/src/libs/ui/elements/src/lib/api-card/api-card.component.html +4 -4
  133. package/src/libs/ui/elements/src/lib/download-item/download-item.component.html +8 -5
  134. package/src/libs/ui/elements/src/lib/download-item/download-item.component.ts +2 -2
  135. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.html +38 -7
  136. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +29 -2
  137. package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +1 -1
  138. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.css +6 -0
  139. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.html +9 -0
  140. package/src/libs/ui/elements/src/lib/kind-badge/kind-badge.component.ts +51 -0
  141. package/src/libs/ui/elements/src/lib/link-card/link-card.component.html +5 -2
  142. package/src/libs/ui/elements/src/lib/link-card/link-card.component.ts +3 -7
  143. package/src/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.html +3 -5
  144. package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +9 -9
  145. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.css +1 -1
  146. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +7 -3
  147. package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +2 -3
  148. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.html +1 -1
  149. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +3 -0
  150. package/src/libs/ui/inputs/src/index.ts +1 -0
  151. package/src/libs/ui/inputs/src/lib/button/button.component.ts +2 -2
  152. package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.html +1 -1
  153. package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.html +1 -1
  154. package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.html +23 -0
  155. package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.component.ts +44 -0
  156. package/src/libs/ui/inputs/src/lib/inline-filter/inline-filter.model.ts +5 -0
  157. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +0 -0
  158. package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.html +2 -2
  159. package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +3 -3
  160. package/src/libs/ui/layout/src/index.ts +1 -0
  161. package/src/libs/ui/layout/src/lib/block-list/block-list.component.css +22 -0
  162. package/src/libs/ui/layout/src/lib/block-list/block-list.component.html +2 -2
  163. package/src/libs/ui/layout/src/lib/block-list/block-list.component.ts +43 -5
  164. package/src/libs/ui/layout/src/lib/carousel/carousel.component.css +0 -1
  165. package/src/libs/ui/layout/src/lib/carousel/carousel.component.html +1 -1
  166. package/src/libs/ui/layout/src/lib/max-lines/max-lines.component.html +1 -1
  167. package/src/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.html +17 -5
  168. package/src/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.ts +3 -3
  169. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.html +46 -0
  170. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.ts +62 -0
  171. package/src/libs/ui/layout/src/lib/ui-layout.module.ts +1 -5
  172. package/src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.ts +1 -0
  173. package/src/libs/ui/search/src/index.ts +1 -0
  174. package/src/libs/ui/search/src/lib/results-hits-number/results-hits-number.component.html +1 -1
  175. package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.html +24 -0
  176. package/src/libs/ui/search/src/lib/results-hits-search-kind/results-hits-search-kind.component.ts +53 -0
  177. package/src/libs/ui/search/src/lib/ui-search.module.ts +5 -0
  178. package/src/libs/ui/widgets/src/lib/progress-bar/progress-bar.component.html +2 -1
  179. package/tailwind.base.config.js +3 -0
  180. package/tailwind.base.css +1 -13
  181. package/translations/de.json +8 -1
  182. package/translations/en.json +10 -1
  183. package/translations/es.json +8 -1
  184. package/translations/fr.json +11 -2
  185. package/translations/it.json +8 -1
  186. package/translations/nl.json +8 -1
  187. package/translations/pt.json +8 -1
  188. package/translations/sk.json +8 -1
  189. package/esm2022/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.mjs +0 -18
  190. package/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.d.ts +0 -9
  191. package/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.d.ts.map +0 -1
  192. package/src/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.html +0 -4
  193. package/src/libs/feature/search/src/lib/results-hits-number/results-hits.container.component.ts +0 -10
@@ -5,3 +5,25 @@
5
5
  :host {
6
6
  position: relative;
7
7
  }
8
+
9
+ @media screen and (min-width: 769px) {
10
+ .size-L {
11
+ grid-template-columns: repeat(1, minmax(0, 1fr));
12
+ grid-auto-rows: minmax(0, min-content);
13
+ }
14
+
15
+ .size-M {
16
+ grid-template-columns: repeat(2, minmax(0, 1fr));
17
+ grid-auto-rows: minmax(0, min-content);
18
+ }
19
+
20
+ .size-S {
21
+ grid-template-columns: repeat(3, minmax(0, 1fr));
22
+ grid-auto-rows: minmax(0, min-content);
23
+ }
24
+
25
+ .size-XS {
26
+ grid-template-columns: repeat(2, minmax(0, 1fr));
27
+ grid-auto-rows: minmax(0, min-content);
28
+ }
29
+ }
@@ -1,7 +1,7 @@
1
1
  <div
2
- class="block-list-container flex flex-col"
2
+ class="grid gap-4 w-full md:grid-cols-2"
3
3
  #blockContainer
4
- [ngClass]="containerClass"
4
+ [ngClass]="[containerClass, 'size-' + subComponentSize]"
5
5
  [ngStyle]="{ minHeight: minHeight + 'px' }"
6
6
  >
7
7
  <ng-content></ng-content>
@@ -5,7 +5,9 @@ import {
5
5
  Component,
6
6
  ContentChildren,
7
7
  ElementRef,
8
+ EventEmitter,
8
9
  Input,
10
+ Output,
9
11
  QueryList,
10
12
  ViewChild,
11
13
  } from '@angular/core'
@@ -13,6 +15,7 @@ import { CommonModule } from '@angular/common'
13
15
  import { Paginable } from '../paginable.interface'
14
16
  import { PaginationDotsComponent } from '../pagination-dots/pagination-dots.component'
15
17
 
18
+ type ComponentSize = 'L' | 'M' | 'S' | 'XS'
16
19
  @Component({
17
20
  selector: 'gn-ui-block-list',
18
21
  templateUrl: './block-list.component.html',
@@ -22,15 +25,16 @@ import { PaginationDotsComponent } from '../pagination-dots/pagination-dots.comp
22
25
  imports: [CommonModule, PaginationDotsComponent],
23
26
  })
24
27
  export class BlockListComponent implements AfterViewInit, Paginable {
25
- @Input() pageSize = 5
28
+ pageSize = 4
26
29
  @Input() containerClass = ''
27
30
  @Input() paginationContainerClass = 'w-full bottom-0 top-auto'
28
31
  @ContentChildren('block', { read: ElementRef }) blocks: QueryList<
29
32
  ElementRef<HTMLElement>
30
33
  >
31
34
  @ViewChild('blockContainer') blockContainer: ElementRef<HTMLElement>
32
-
33
35
  protected minHeight = 0
36
+ @Output() listChanges = new EventEmitter<BlockListComponent>()
37
+ subComponentSize: ComponentSize = 'M'
34
38
 
35
39
  protected currentPage_ = 0
36
40
  protected get pages() {
@@ -47,18 +51,26 @@ export class BlockListComponent implements AfterViewInit, Paginable {
47
51
  return this.blocks ? Math.ceil(this.blocks.length / this.pageSize) : 1
48
52
  }
49
53
  get currentPage() {
50
- return this.currentPage_ + 1 // this is 1-based
54
+ return this.currentPage_ + 1
51
55
  }
52
56
 
53
57
  constructor(private changeDetector: ChangeDetectorRef) {}
54
58
 
55
59
  ngAfterViewInit() {
56
- this.blocks.changes.subscribe(this.refreshBlocksVisibility)
60
+ this.blocks.changes.subscribe(() => {
61
+ this.updateSizes()
62
+ this.refreshBlocksVisibility()
63
+ this.goToPage(1)
64
+ this.changeDetector.detectChanges()
65
+ this.listChanges.emit(this)
66
+ })
67
+ this.updateSizes()
57
68
  this.refreshBlocksVisibility()
58
69
 
59
70
  // we store the first height as the min-height of the list container
60
71
  this.minHeight = this.blockContainer.nativeElement.clientHeight
61
72
  this.changeDetector.detectChanges()
73
+ this.listChanges.emit(this)
62
74
  }
63
75
 
64
76
  protected refreshBlocksVisibility = () => {
@@ -71,7 +83,33 @@ export class BlockListComponent implements AfterViewInit, Paginable {
71
83
  })
72
84
  }
73
85
 
74
- // pageIndex is 1-based
86
+ protected updateSizes() {
87
+ this.subComponentSize = this.computeSubComponentSize()
88
+ this.pageSize = this.computePageSize()
89
+ }
90
+
91
+ protected computeSubComponentSize(): ComponentSize {
92
+ if (!this.blocks) return 'M'
93
+ const subComponentsCount = this.blocks.length
94
+ if (subComponentsCount <= 3) return 'L'
95
+ if (subComponentsCount <= 12) return 'M'
96
+ if (subComponentsCount <= 18) return 'S'
97
+ return 'XS'
98
+ }
99
+
100
+ protected computePageSize(): number {
101
+ switch (this.subComponentSize) {
102
+ case 'L':
103
+ return 3
104
+ case 'S':
105
+ return 6
106
+ case 'XS':
107
+ return 8
108
+ default:
109
+ return 4
110
+ }
111
+ }
112
+
75
113
  public goToPage(pageIndex: number) {
76
114
  this.currentPage_ = Math.max(
77
115
  Math.min(pageIndex - 1, this.pagesCount - 1),
@@ -1,4 +1,3 @@
1
1
  :host {
2
2
  position: relative;
3
- display: block;
4
3
  }
@@ -1,4 +1,4 @@
1
- <div #carouselOverflowContainer class="w-full">
1
+ <div #carouselOverflowContainer class="w-full block">
2
2
  <div class="carousel-container flex" [ngClass]="containerClass">
3
3
  <ng-content></ng-content>
4
4
  </div>
@@ -13,7 +13,7 @@
13
13
  <div
14
14
  *ngIf="showToggleButton"
15
15
  (click)="toggleDisplay()"
16
- class="text-secondary cursor-pointer pt-2.5"
16
+ class="text-primary cursor-pointer pt-2.5"
17
17
  data-cy="readMoreButton"
18
18
  >
19
19
  {{ (isExpanded ? 'ui.readLess' : 'ui.readMore') | translate }}
@@ -1,18 +1,30 @@
1
- <div class="flex flex-row gap-x-4 items-center">
1
+ <div class="flex flex-row gap-x-1 items-center">
2
2
  <gn-ui-button
3
3
  data-test="previousButton"
4
- type="outline"
4
+ type="light"
5
+ [extraClass]="
6
+ 'w-10 h-8 px-2 py-1 rounded-lg ' +
7
+ (!listComponent.isFirstPage
8
+ ? 'border border-gray-300'
9
+ : 'border border-gray-100')
10
+ "
5
11
  [disabled]="listComponent.isFirstPage"
6
12
  (buttonClick)="listComponent.goToPrevPage()"
7
13
  >
8
- <ng-icon name="matArrowBack"></ng-icon>
14
+ <ng-icon name="matArrowBackIos"></ng-icon>
9
15
  </gn-ui-button>
10
16
  <gn-ui-button
11
17
  data-test="nextButton"
12
- type="outline"
18
+ type="light"
19
+ [extraClass]="
20
+ 'w-10 h-8 px-2 py-1 rounded-lg ' +
21
+ (!listComponent.isLastPage
22
+ ? 'border border-gray-300'
23
+ : 'border border-gray-100')
24
+ "
13
25
  [disabled]="listComponent.isLastPage"
14
26
  (buttonClick)="listComponent.goToNextPage()"
15
27
  >
16
- <ng-icon name="matArrowForward"></ng-icon>
28
+ <ng-icon name="matArrowForwardIos"></ng-icon>
17
29
  </gn-ui-button>
18
30
  </div>
@@ -5,8 +5,8 @@ import {
5
5
  provideNgIconsConfig,
6
6
  } from '@ng-icons/core'
7
7
  import {
8
- matArrowBack,
9
- matArrowForward,
8
+ matArrowBackIos,
9
+ matArrowForwardIos,
10
10
  } from '@ng-icons/material-icons/baseline'
11
11
  import { Paginable } from '../paginable.interface'
12
12
  import { ButtonComponent } from '../../../../../../libs/ui/inputs/src'
@@ -18,7 +18,7 @@ import { ButtonComponent } from '../../../../../../libs/ui/inputs/src'
18
18
  standalone: true,
19
19
  imports: [ButtonComponent, NgIconComponent],
20
20
  providers: [
21
- provideIcons({ matArrowForward, matArrowBack }),
21
+ provideIcons({ matArrowBackIos, matArrowForwardIos }),
22
22
  provideNgIconsConfig({
23
23
  size: '0.875em',
24
24
  }),
@@ -0,0 +1,46 @@
1
+ <div
2
+ class="flex items-center justify-between w-full gap-2"
3
+ cdkOverlayOrigin
4
+ #trigger="cdkOverlayOrigin"
5
+ >
6
+ <span #textElement class="truncate">
7
+ {{ text }}
8
+ </span>
9
+ <gn-ui-button
10
+ *ngIf="isTextTruncated"
11
+ type="outline"
12
+ extraClass="w-10 h-8 border rounded-lg"
13
+ (buttonClick)="toggleOverlay()"
14
+ >
15
+ <ng-icon name="iconoirExpand" size="24"> </ng-icon>
16
+ </gn-ui-button>
17
+
18
+ <ng-template
19
+ cdkConnectedOverlay
20
+ [cdkConnectedOverlayOrigin]="trigger"
21
+ [cdkConnectedOverlayOpen]="isOpen"
22
+ [cdkConnectedOverlayPositions]="[
23
+ {
24
+ originX: 'end',
25
+ originY: 'top',
26
+ overlayX: 'end',
27
+ overlayY: 'top',
28
+ },
29
+ ]"
30
+ (detach)="isOpen = false"
31
+ >
32
+ <div class="bg-white shadow-lg border border-gray-300 flex">
33
+ <div class="w-64">
34
+ <p class="m-2">{{ text }}</p>
35
+ </div>
36
+ <gn-ui-button
37
+ class="m-2 flex-shrink-0"
38
+ type="light"
39
+ (buttonClick)="close()"
40
+ extraClass="w-10 h-8 px-1 bg-white"
41
+ >
42
+ <ng-icon name="iconoirReduce" size="24"> </ng-icon>
43
+ </gn-ui-button>
44
+ </div>
45
+ </ng-template>
46
+ </div>
@@ -0,0 +1,62 @@
1
+ import {
2
+ AfterViewInit,
3
+ ChangeDetectorRef,
4
+ Component,
5
+ ElementRef,
6
+ Input,
7
+ ViewChild,
8
+ } from '@angular/core'
9
+ import { CommonModule } from '@angular/common'
10
+ import { provideIcons } from '@ng-icons/core'
11
+ import { iconoirExpand, iconoirReduce } from '@ng-icons/iconoir'
12
+ import { TranslateModule } from '@ngx-translate/core'
13
+ import { MatButtonModule } from '@angular/material/button'
14
+ import { OverlayModule } from '@angular/cdk/overlay'
15
+ import { ButtonComponent } from '../../../../../../libs/ui/inputs/src'
16
+ import { NgIconComponent } from '@ng-icons/core'
17
+
18
+ @Component({
19
+ selector: 'gn-ui-truncated-text',
20
+ standalone: true,
21
+ imports: [
22
+ CommonModule,
23
+ TranslateModule,
24
+ MatButtonModule,
25
+ OverlayModule,
26
+ ButtonComponent,
27
+ NgIconComponent,
28
+ ],
29
+ providers: [provideIcons({ iconoirExpand, iconoirReduce })],
30
+ templateUrl: './truncated-text.component.html',
31
+ styles: [],
32
+ })
33
+ export class TruncatedTextComponent implements AfterViewInit {
34
+ @Input() text = ''
35
+ @ViewChild('textElement') textElement: ElementRef<HTMLElement>
36
+ isTextTruncated = false
37
+ isOpen = false
38
+
39
+ constructor(private cd: ChangeDetectorRef) {}
40
+
41
+ ngAfterViewInit() {
42
+ this.checkTextTruncation()
43
+ }
44
+
45
+ ngOnChange() {
46
+ this.checkTextTruncation()
47
+ }
48
+
49
+ toggleOverlay() {
50
+ this.isOpen = !this.isOpen
51
+ }
52
+
53
+ close() {
54
+ this.isOpen = false
55
+ }
56
+
57
+ private checkTextTruncation() {
58
+ const element = this.textElement.nativeElement
59
+ this.isTextTruncated = element.scrollWidth > element.clientWidth
60
+ this.cd.detectChanges()
61
+ }
62
+ }
@@ -7,11 +7,7 @@ import { NgIconComponent, provideNgIconsConfig } from '@ng-icons/core'
7
7
 
8
8
  @NgModule({
9
9
  imports: [CommonModule, TranslateModule.forChild(), NgIconComponent],
10
- providers: [
11
- provideNgIconsConfig({
12
- size: '0.9em',
13
- }),
14
- ],
10
+ providers: [],
15
11
  declarations: [StickyHeaderComponent, AnchorLinkDirective],
16
12
  exports: [StickyHeaderComponent, AnchorLinkDirective],
17
13
  })
@@ -57,6 +57,7 @@ export class SpatialExtentComponent {
57
57
  style: {
58
58
  'stroke-color': 'black',
59
59
  'stroke-width': 2,
60
+ 'fill-color': 'rgba(153, 153, 153, 0.3)',
60
61
  },
61
62
  }
62
63
  const view = await createViewFromLayer(layer)
@@ -16,5 +16,6 @@ export * from './lib/record-preview-text/record-preview-text.component'
16
16
  export * from './lib/record-preview-title/record-preview-title.component'
17
17
  export * from './lib/record-metric/record-metric.component'
18
18
  export * from './lib/results-list-item/results-list-item.component'
19
+ export * from './lib/results-hits-search-kind/results-hits-search-kind.component'
19
20
  export * from './lib/results-hits-number/results-hits-number.component'
20
21
  export * from './lib/results-table/results-table.component'
@@ -1,5 +1,5 @@
1
1
  <div *ngIf="!loading" class="w-full">
2
- <span translate [translateParams]="{ hits: hits }"
2
+ <span data-cy="resultsHitsFound" translate [translateParams]="{ hits: hits }"
3
3
  >results.records.hits.found</span
4
4
  >
5
5
  <p
@@ -0,0 +1,24 @@
1
+ <gn-ui-inline-filter
2
+ [choices]="availableChoices"
3
+ [selected]="selected"
4
+ (selectValues)="onSelectedValues($event)"
5
+ >
6
+ <ng-template let-choice>
7
+ <gn-ui-kind-badge
8
+ [kind]="choice.value"
9
+ [contentTemplate]="customTemplate"
10
+ class="gn-ui-btn-outline rounded-md py-2 px-2 border-gray-400 cursor-pointer focus-within:text-primary-darkest focus-within:bg-gray-50 transition-colors bg-transparent hover:text-primary-darker focus:text-primary-darker active:text-primary-black"
11
+ [ngClass]="{
12
+ '!bg-primary-lightest hover:bg-primary-lightest':
13
+ isSelectedChoice(choice.value) || isAllChoice(choice.value),
14
+ }"
15
+ >
16
+ <ng-template #customTemplate>
17
+ {{ 'search.filters.recordKind.' + choice.value | translate
18
+ }}<span class="ml-1" *ngIf="isSelectedChoice(choice.value)"
19
+ >({{ choice.count }})</span
20
+ >
21
+ </ng-template>
22
+ </gn-ui-kind-badge>
23
+ </ng-template>
24
+ </gn-ui-inline-filter>
@@ -0,0 +1,53 @@
1
+ import {
2
+ Component,
3
+ EventEmitter,
4
+ Input,
5
+ OnChanges,
6
+ SimpleChanges,
7
+ Output,
8
+ } from '@angular/core'
9
+ import { Choice } from '../../../../../../libs/ui/inputs/src'
10
+
11
+ @Component({
12
+ selector: 'gn-ui-results-hits-search-kind',
13
+ templateUrl: './results-hits-search-kind.component.html',
14
+ })
15
+ export class ResultsHitsSearchKindComponent implements OnChanges {
16
+ @Input() selected: string[] = []
17
+ @Input() choices: Choice[] = []
18
+ @Output() selectionChanged = new EventEmitter<string[]>()
19
+
20
+ availableChoices: Choice[] = []
21
+
22
+ ngOnChanges(changes: SimpleChanges) {
23
+ if (changes.choices && changes.choices.currentValue) {
24
+ this.availableChoices = this.buildFilterChoices(this.choices)
25
+ }
26
+ }
27
+
28
+ buildFilterChoices(availableValues: Choice[]) {
29
+ return [
30
+ ...[
31
+ {
32
+ label: 'all',
33
+ value: 'all',
34
+ },
35
+ ],
36
+ ...availableValues,
37
+ ]
38
+ }
39
+
40
+ onSelectedValues(values: string[]) {
41
+ const selectedValues = values.includes('all') ? [] : values
42
+
43
+ this.selectionChanged.emit(selectedValues)
44
+ }
45
+
46
+ isSelectedChoice(choiceValue: string) {
47
+ return this.selected.includes(choiceValue)
48
+ }
49
+
50
+ isAllChoice(choiceValue: string) {
51
+ return this.selected.length === 0 && choiceValue === 'all'
52
+ }
53
+ }
@@ -11,6 +11,7 @@ import { RecordPreviewRowComponent } from './record-preview-row/record-preview-r
11
11
  import { RecordPreviewTextComponent } from './record-preview-text/record-preview-text.component'
12
12
  import { RecordPreviewTitleComponent } from './record-preview-title/record-preview-title.component'
13
13
  import { ResultsHitsNumberComponent } from './results-hits-number/results-hits-number.component'
14
+ import { ResultsHitsSearchKindComponent } from './results-hits-search-kind/results-hits-search-kind.component'
14
15
  import {
15
16
  DEFAULT_RESULTS_LAYOUT_CONFIG,
16
17
  RESULTS_LAYOUT_CONFIG,
@@ -24,6 +25,7 @@ import { UiWidgetsModule } from '../../../../../libs/ui/widgets/src'
24
25
  import {
25
26
  MetadataQualityComponent,
26
27
  UiElementsModule,
28
+ KindBadgeComponent,
27
29
  } from '../../../../../libs/ui/elements/src'
28
30
  import { RecordPreviewFeedComponent } from './record-preview-feed/record-preview-feed.component'
29
31
  import { CommonModule } from '@angular/common'
@@ -48,6 +50,7 @@ import { matFace } from '@ng-icons/material-icons/baseline'
48
50
  RecordMetricComponent,
49
51
  ResultsListComponent,
50
52
  ResultsHitsNumberComponent,
53
+ ResultsHitsSearchKindComponent,
51
54
  ResultsListItemComponent,
52
55
  RecordPreviewFeedComponent,
53
56
  RecordPreviewRowComponent,
@@ -74,6 +77,7 @@ import { matFace } from '@ng-icons/material-icons/baseline'
74
77
  matFace,
75
78
  matHomeWorkOutline,
76
79
  }),
80
+ KindBadgeComponent,
77
81
  MetadataQualityComponent,
78
82
  ],
79
83
  exports: [
@@ -86,6 +90,7 @@ import { matFace } from '@ng-icons/material-icons/baseline'
86
90
  FacetsModule,
87
91
  RecordPreviewComponent,
88
92
  ResultsHitsNumberComponent,
93
+ ResultsHitsSearchKindComponent,
89
94
  RecordPreviewFeedComponent,
90
95
  RecordPreviewRowComponent,
91
96
  ],
@@ -3,8 +3,9 @@
3
3
  <ng-container *ngSwitchCase="'light'">
4
4
  <div class="flex items-center relative">
5
5
  <div
6
- class="flex-shrink-0 {{ color.text }} text-xs font-medium mr-2
6
+ class="flex-shrink-0 {{ color.text }} font-medium mr-2
7
7
  text-opacity-100 !text-slate-800"
8
+ data-cy="progressPercentage"
8
9
  >
9
10
  {{ progress }}%
10
11
  </div>
@@ -1,6 +1,9 @@
1
1
  module.exports = {
2
2
  theme: {
3
3
  extend: {
4
+ screens: {
5
+ xs: '320px',
6
+ },
4
7
  colors: {
5
8
  'primary-white': 'var(--color-primary-white)',
6
9
  'primary-lightest': 'var(--color-primary-lightest)',
package/tailwind.base.css CHANGED
@@ -134,20 +134,8 @@
134
134
  border-white focus:ring-4 focus:ring-gray-300;
135
135
  }
136
136
 
137
- .gn-ui-card-xs {
138
- @apply min-h-[68px] md:w-[487px];
139
- }
140
-
141
137
  .gn-ui-card-s {
142
- @apply min-h-[135px] md:w-80;
143
- }
144
-
145
- .gn-ui-card-m {
146
- @apply min-h-[68px] md:w-[487px];
147
- }
148
-
149
- .gn-ui-card-l {
150
- @apply min-h-[68px] md:w-[992px];
138
+ @apply min-h-[64px] w-full xs:min-w-[260px] xs:max-w-[280px] sm:min-w-[300px] sm:max-w-[500px] md:min-w-[230px];
151
139
  }
152
140
 
153
141
  .gn-ui-card-title {
@@ -51,7 +51,7 @@
51
51
  "datafeeder.month.september": "September",
52
52
  "datafeeder.wizardSummarize.createdAt": "Erstellt am",
53
53
  "datafeeder.wizardSummarize.scale": "Maßstab",
54
- "datahub.header.datasets": "Datensätze",
54
+ "datahub.header.datasets": "Katalog",
55
55
  "datahub.header.lastRecords": "Die neuesten",
56
56
  "datahub.header.myfavorites": "Meine Favoriten",
57
57
  "datahub.header.news": "Startseite",
@@ -204,6 +204,9 @@
204
204
  "editor.record.form.license.odc-by": "",
205
205
  "editor.record.form.license.pddl": "",
206
206
  "editor.record.form.license.unknown": "",
207
+ "editor.record.form.multilingual.enable": "",
208
+ "editor.record.form.multilingual.open": "",
209
+ "editor.record.form.multilingual.title": "",
207
210
  "editor.record.form.page.accessAndContact": "",
208
211
  "editor.record.form.page.description": "",
209
212
  "editor.record.form.page.resources": "",
@@ -515,6 +518,10 @@
515
518
  "search.filters.producerOrg": "",
516
519
  "search.filters.publicationYear": "Veröffentlichungsjahr",
517
520
  "search.filters.publisherOrg": "",
521
+ "search.filters.recordKind.all": "Alle",
522
+ "search.filters.recordKind.dataset": "Datensätze",
523
+ "search.filters.recordKind.reuse": "Wiederverwendungen",
524
+ "search.filters.recordKind.service": "Dienste",
518
525
  "search.filters.representationType": "Repräsentationstyp",
519
526
  "search.filters.resourceType": "Ressourcentyp",
520
527
  "search.filters.standard": "Standard",
@@ -51,7 +51,7 @@
51
51
  "datafeeder.month.september": "September",
52
52
  "datafeeder.wizardSummarize.createdAt": "Created at",
53
53
  "datafeeder.wizardSummarize.scale": "Scale",
54
- "datahub.header.datasets": "Datasets",
54
+ "datahub.header.datasets": "Catalog",
55
55
  "datahub.header.lastRecords": "The latest",
56
56
  "datahub.header.myfavorites": "My favorites",
57
57
  "datahub.header.news": "Home",
@@ -204,6 +204,9 @@
204
204
  "editor.record.form.license.odc-by": "Open Data Commons ODC-By",
205
205
  "editor.record.form.license.pddl": "Open Data Commons PDDL",
206
206
  "editor.record.form.license.unknown": "Unknown or absent",
207
+ "editor.record.form.multilingual.enable": "Multilingual Mode",
208
+ "editor.record.form.multilingual.open": "Open the multilingual panel",
209
+ "editor.record.form.multilingual.title": "Translations",
207
210
  "editor.record.form.page.accessAndContact": "Information for use",
208
211
  "editor.record.form.page.description": "Dataset description",
209
212
  "editor.record.form.page.resources": "Resources",
@@ -515,6 +518,10 @@
515
518
  "search.filters.producerOrg": "Producer",
516
519
  "search.filters.publicationYear": "Publication year",
517
520
  "search.filters.publisherOrg": "Publisher",
521
+ "search.filters.recordKind.all": "All",
522
+ "search.filters.recordKind.dataset": "Datasets",
523
+ "search.filters.recordKind.reuse": "Reuses",
524
+ "search.filters.recordKind.service": "Services",
518
525
  "search.filters.representationType": "Representation type",
519
526
  "search.filters.resourceType": "Resource type",
520
527
  "search.filters.standard": "Standard",
@@ -562,6 +569,8 @@
562
569
  "tooltip.url.open": "Open URL",
563
570
  "ui.readLess": "Read less",
564
571
  "ui.readMore": "Read more",
572
+ "ui.hideFullText": "Hide complete text",
573
+ "ui.showAllText": "Show all text",
565
574
  "wfs.feature.limit": "Too many features to display the WFS layer!",
566
575
  "wfs.featuretype.notfound": "No matching feature type was found in the service",
567
576
  "wfs.geojsongml.notsupported": "This service does not support the GeoJSON or GML format",
@@ -51,7 +51,7 @@
51
51
  "datafeeder.month.september": "",
52
52
  "datafeeder.wizardSummarize.createdAt": "",
53
53
  "datafeeder.wizardSummarize.scale": "",
54
- "datahub.header.datasets": "",
54
+ "datahub.header.datasets": "Catálogo",
55
55
  "datahub.header.lastRecords": "",
56
56
  "datahub.header.myfavorites": "",
57
57
  "datahub.header.news": "",
@@ -204,6 +204,9 @@
204
204
  "editor.record.form.license.odc-by": "",
205
205
  "editor.record.form.license.pddl": "",
206
206
  "editor.record.form.license.unknown": "",
207
+ "editor.record.form.multilingual.enable": "",
208
+ "editor.record.form.multilingual.open": "",
209
+ "editor.record.form.multilingual.title": "",
207
210
  "editor.record.form.page.accessAndContact": "",
208
211
  "editor.record.form.page.description": "",
209
212
  "editor.record.form.page.resources": "",
@@ -515,6 +518,10 @@
515
518
  "search.filters.producerOrg": "",
516
519
  "search.filters.publicationYear": "",
517
520
  "search.filters.publisherOrg": "",
521
+ "search.filters.recordKind.all": "Todos",
522
+ "search.filters.recordKind.dataset": "",
523
+ "search.filters.recordKind.reuse": "",
524
+ "search.filters.recordKind.service": "",
518
525
  "search.filters.representationType": "",
519
526
  "search.filters.resourceType": "",
520
527
  "search.filters.standard": "",