geonetwork-ui 2.6.0-dev.3e7617888 → 2.6.0-dev.492bf4497

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 (196) hide show
  1. package/esm2022/libs/api/metadata-converter/src/lib/common/distribution.mapper.mjs +3 -1
  2. package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +2 -1
  3. package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +5 -2
  4. package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
  5. package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +45 -9
  6. package/esm2022/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.mjs +2 -2
  7. package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +32 -2
  8. package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +25 -6
  9. package/esm2022/libs/feature/editor/src/index.mjs +2 -1
  10. package/esm2022/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.mjs +18 -0
  11. package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +3 -3
  12. package/esm2022/libs/feature/record/src/lib/data-view-share/data-view-share.component.mjs +3 -3
  13. package/esm2022/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.mjs +6 -3
  14. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +33 -7
  15. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +11 -13
  16. package/esm2022/libs/ui/dataviz/src/lib/chart/chart.component.mjs +5 -3
  17. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.component.mjs +11 -6
  18. package/esm2022/libs/ui/elements/src/index.mjs +2 -1
  19. package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +3 -3
  20. package/esm2022/libs/ui/elements/src/lib/download-item/download-item.component.mjs +3 -3
  21. package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +18 -7
  22. package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +3 -3
  23. package/esm2022/libs/ui/elements/src/lib/link-card/link-card.component.mjs +3 -3
  24. package/esm2022/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.mjs +3 -3
  25. package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
  26. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
  27. package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +3 -3
  28. package/esm2022/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.mjs +51 -0
  29. package/esm2022/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.mjs +3 -3
  30. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +1 -1
  31. package/esm2022/libs/ui/inputs/src/index.mjs +2 -1
  32. package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +2 -2
  33. package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +3 -3
  34. package/esm2022/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.mjs +68 -0
  35. package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +3 -3
  36. package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +2 -8
  37. package/esm2022/libs/ui/layout/src/index.mjs +2 -1
  38. package/esm2022/libs/ui/layout/src/lib/block-list/block-list.component.mjs +48 -11
  39. package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +3 -3
  40. package/esm2022/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.mjs +34 -13
  41. package/esm2022/libs/ui/layout/src/lib/max-lines/max-lines.component.mjs +3 -3
  42. package/esm2022/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.mjs +6 -6
  43. package/esm2022/libs/ui/layout/src/lib/truncated-text/truncated-text.component.mjs +107 -0
  44. package/esm2022/libs/ui/layout/src/lib/ui-layout.module.mjs +4 -12
  45. package/esm2022/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.mjs +29 -4
  46. package/esm2022/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.mjs +2 -1
  47. package/esm2022/libs/ui/search/src/lib/results-list/results-list.component.mjs +3 -3
  48. package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +4 -1
  49. package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +4 -1
  50. package/esm2022/translations/de.json +15 -4
  51. package/esm2022/translations/en.json +17 -4
  52. package/esm2022/translations/es.json +15 -4
  53. package/esm2022/translations/fr.json +18 -5
  54. package/esm2022/translations/it.json +15 -4
  55. package/esm2022/translations/nl.json +15 -4
  56. package/esm2022/translations/pt.json +15 -4
  57. package/fesm2022/geonetwork-ui.mjs +655 -155
  58. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  59. package/libs/api/metadata-converter/src/lib/common/distribution.mapper.d.ts.map +1 -1
  60. package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
  61. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
  62. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +4 -1
  63. package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
  64. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +12 -8
  65. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
  66. package/libs/feature/dataviz/src/lib/service/data.service.d.ts +1 -0
  67. package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
  68. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +5 -2
  69. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
  70. package/libs/feature/editor/src/index.d.ts +1 -0
  71. package/libs/feature/editor/src/index.d.ts.map +1 -1
  72. package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts +7 -0
  73. package/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.d.ts.map +1 -0
  74. package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts +2 -1
  75. package/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.d.ts.map +1 -1
  76. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
  77. package/libs/feature/record/src/lib/state/mdview.facade.d.ts +26 -21
  78. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  79. package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts +2 -1
  80. package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts.map +1 -1
  81. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts +6 -1
  82. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts.map +1 -1
  83. package/libs/ui/elements/src/index.d.ts +1 -0
  84. package/libs/ui/elements/src/index.d.ts.map +1 -1
  85. package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts +1 -1
  86. package/libs/ui/elements/src/lib/download-item/download-item.component.d.ts.map +1 -1
  87. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +7 -1
  88. package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts.map +1 -1
  89. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts +1 -1
  90. package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts.map +1 -1
  91. package/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.d.ts +16 -0
  92. package/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.d.ts.map +1 -0
  93. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  94. package/libs/ui/inputs/src/index.d.ts +1 -0
  95. package/libs/ui/inputs/src/index.d.ts.map +1 -1
  96. package/libs/ui/inputs/src/lib/button/button.component.d.ts +1 -1
  97. package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
  98. package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts +17 -0
  99. package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts.map +1 -0
  100. package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
  101. package/libs/ui/layout/src/index.d.ts +1 -0
  102. package/libs/ui/layout/src/index.d.ts.map +1 -1
  103. package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts +9 -2
  104. package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts.map +1 -1
  105. package/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.d.ts +15 -8
  106. package/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.d.ts.map +1 -1
  107. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts +27 -0
  108. package/libs/ui/layout/src/lib/truncated-text/truncated-text.component.d.ts.map +1 -0
  109. package/libs/ui/layout/src/lib/ui-layout.module.d.ts.map +1 -1
  110. package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts +6 -2
  111. package/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.d.ts.map +1 -1
  112. package/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.d.ts.map +1 -1
  113. package/libs/util/shared/src/lib/links/link-classifier.service.d.ts.map +1 -1
  114. package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
  115. package/package.json +2 -2
  116. package/src/libs/api/metadata-converter/src/lib/common/distribution.mapper.ts +1 -0
  117. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +1 -0
  118. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +4 -1
  119. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +9 -2
  120. package/src/libs/common/fixtures/src/lib/elasticsearch/metadata-links.fixtures.ts +10 -0
  121. package/src/libs/common/fixtures/src/lib/link.fixtures.ts +14 -0
  122. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.html +12 -9
  123. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +54 -10
  124. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +37 -0
  125. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.html +1 -0
  126. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +27 -1
  127. package/src/libs/feature/editor/src/index.ts +1 -0
  128. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.css +0 -0
  129. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.html +14 -0
  130. package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.ts +15 -0
  131. package/src/libs/feature/record/src/lib/data-view/data-view.component.html +16 -10
  132. package/src/libs/feature/record/src/lib/data-view-share/data-view-share.component.html +1 -1
  133. package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.html +2 -2
  134. package/src/libs/feature/record/src/lib/external-viewer-button/external-viewer-button.component.ts +1 -0
  135. package/src/libs/feature/record/src/lib/map-view/map-view.component.html +25 -16
  136. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +35 -4
  137. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +18 -15
  138. package/src/libs/ui/dataviz/src/lib/chart/chart.component.ts +2 -1
  139. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.html +6 -3
  140. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.ts +5 -4
  141. package/src/libs/ui/elements/src/index.ts +1 -0
  142. package/src/libs/ui/elements/src/lib/api-card/api-card.component.html +4 -4
  143. package/src/libs/ui/elements/src/lib/download-item/download-item.component.html +8 -5
  144. package/src/libs/ui/elements/src/lib/download-item/download-item.component.ts +2 -2
  145. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.html +38 -7
  146. package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +29 -2
  147. package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +1 -1
  148. package/src/libs/ui/elements/src/lib/link-card/link-card.component.html +5 -2
  149. package/src/libs/ui/elements/src/lib/link-card/link-card.component.ts +3 -7
  150. package/src/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.html +3 -5
  151. package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +12 -9
  152. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.css +1 -1
  153. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +11 -3
  154. package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +2 -3
  155. package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.html +48 -0
  156. package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.ts +52 -0
  157. package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.html +1 -1
  158. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +0 -1
  159. package/src/libs/ui/inputs/src/index.ts +1 -0
  160. package/src/libs/ui/inputs/src/lib/button/button.component.ts +2 -2
  161. package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.html +1 -1
  162. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.css +0 -0
  163. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.html +43 -0
  164. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +77 -0
  165. package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.html +2 -2
  166. package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +0 -3
  167. package/src/libs/ui/layout/src/index.ts +1 -0
  168. package/src/libs/ui/layout/src/lib/block-list/block-list.component.css +22 -0
  169. package/src/libs/ui/layout/src/lib/block-list/block-list.component.html +2 -2
  170. package/src/libs/ui/layout/src/lib/block-list/block-list.component.ts +43 -5
  171. package/src/libs/ui/layout/src/lib/carousel/carousel.component.css +0 -1
  172. package/src/libs/ui/layout/src/lib/carousel/carousel.component.html +1 -1
  173. package/src/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.html +24 -8
  174. package/src/libs/ui/layout/src/lib/expandable-panel/expandable-panel.component.ts +36 -10
  175. package/src/libs/ui/layout/src/lib/max-lines/max-lines.component.html +1 -1
  176. package/src/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.html +17 -5
  177. package/src/libs/ui/layout/src/lib/previous-next-buttons/previous-next-buttons.component.ts +3 -3
  178. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.html +44 -0
  179. package/src/libs/ui/layout/src/lib/truncated-text/truncated-text.component.ts +130 -0
  180. package/src/libs/ui/layout/src/lib/ui-layout.module.ts +1 -5
  181. package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.html +3 -3
  182. package/src/libs/ui/map/src/lib/components/feature-detail/feature-detail.component.ts +27 -3
  183. package/src/libs/ui/map/src/lib/components/spatial-extent/spatial-extent.component.ts +1 -0
  184. package/src/libs/ui/search/src/lib/results-list/results-list.component.html +1 -0
  185. package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +3 -0
  186. package/src/libs/util/shared/src/lib/links/link-utils.ts +3 -0
  187. package/tailwind.base.config.js +3 -0
  188. package/tailwind.base.css +1 -13
  189. package/translations/de.json +15 -4
  190. package/translations/en.json +17 -4
  191. package/translations/es.json +15 -4
  192. package/translations/fr.json +18 -5
  193. package/translations/it.json +15 -4
  194. package/translations/nl.json +15 -4
  195. package/translations/pt.json +15 -4
  196. package/translations/sk.json +15 -4
@@ -1,9 +1,14 @@
1
1
  import {
2
2
  ChangeDetectionStrategy,
3
3
  Component,
4
+ ContentChild,
4
5
  ElementRef,
5
6
  Input,
7
+ TemplateRef,
6
8
  ViewChild,
9
+ OnDestroy,
10
+ ChangeDetectorRef,
11
+ AfterViewInit,
7
12
  } from '@angular/core'
8
13
  import { NgIcon, provideIcons } from '@ng-icons/core'
9
14
  import { CommonModule } from '@angular/common'
@@ -18,20 +23,41 @@ import { matAdd, matRemove } from '@ng-icons/material-icons/baseline'
18
23
  imports: [CommonModule, NgIcon],
19
24
  viewProviders: [provideIcons({ matAdd, matRemove })],
20
25
  })
21
- export class ExpandablePanelComponent {
22
- @Input() title: string
23
- @Input() collapsed = true
24
- @ViewChild('contentDiv') contentDiv: ElementRef
25
- maxHeight = this.setMaxHeight()
26
+ export class ExpandablePanelComponent implements AfterViewInit, OnDestroy {
27
+ @Input() title?: string
28
+ @Input() iconColor? = ''
29
+ @ContentChild('titleTemplate') titleTemplate?: TemplateRef<HTMLElement>
30
+ @ViewChild('contentDiv') contentDiv?: ElementRef
31
+
32
+ private _collapsed = true
33
+ private contentObserver?: ResizeObserver
34
+
35
+ constructor(private readonly changeDetector: ChangeDetectorRef) {}
36
+
37
+ ngAfterViewInit() {
38
+ if (this.contentDiv) {
39
+ this.contentObserver = new ResizeObserver(() => {
40
+ this.changeDetector.detectChanges()
41
+ })
42
+ this.contentObserver.observe(this.contentDiv.nativeElement)
43
+ }
44
+ }
45
+
46
+ @Input() set collapsed(value: boolean) {
47
+ this._collapsed = value
48
+ }
49
+
50
+ get collapsed(): boolean {
51
+ return this._collapsed
52
+ }
26
53
 
27
54
  toggle(): void {
28
55
  this.collapsed = !this.collapsed
29
- this.maxHeight = this.setMaxHeight()
30
56
  }
31
57
 
32
- setMaxHeight() {
33
- return `${
34
- this.collapsed ? '0' : this.contentDiv.nativeElement.scrollHeight
35
- }px`
58
+ ngOnDestroy() {
59
+ if (this.contentObserver) {
60
+ this.contentObserver.disconnect()
61
+ }
36
62
  }
37
63
  }
@@ -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,44 @@
1
+ <div
2
+ class="flex items-center justify-between w-full gap-2"
3
+ cdkOverlayOrigin
4
+ [class]="extraClass"
5
+ #trigger="cdkOverlayOrigin"
6
+ >
7
+ <span #textElement class="truncate">
8
+ {{ text }}
9
+ </span>
10
+ <gn-ui-button
11
+ *ngIf="isTextTruncated"
12
+ type="outline"
13
+ extraClass="w-10 h-8 border rounded-lg"
14
+ (buttonClick)="toggleOverlay()"
15
+ >
16
+ <ng-icon name="iconoirExpand" size="24"> </ng-icon>
17
+ </gn-ui-button>
18
+
19
+ <ng-template
20
+ cdkConnectedOverlay
21
+ [cdkConnectedOverlayOrigin]="trigger"
22
+ [cdkConnectedOverlayOpen]="isOpen"
23
+ [cdkConnectedOverlayPositions]="[overlayPosition]"
24
+ cdkConnectedOverlayPush
25
+ [cdkConnectedOverlayWidth]="'auto'"
26
+ [cdkConnectedOverlayFlexibleDimensions]="true"
27
+ [cdkConnectedOverlayGrowAfterOpen]="true"
28
+ (detach)="close()"
29
+ >
30
+ <div class="bg-white shadow-lg border border-gray-300 flex">
31
+ <div class="sm:w-64 xs:w-32">
32
+ <p class="m-2">{{ text }}</p>
33
+ </div>
34
+ <gn-ui-button
35
+ class="m-2 flex-shrink-0"
36
+ type="light"
37
+ (buttonClick)="close()"
38
+ extraClass="w-10 h-8 px-1 bg-white"
39
+ >
40
+ <ng-icon name="iconoirReduce" size="24"> </ng-icon>
41
+ </gn-ui-button>
42
+ </div>
43
+ </ng-template>
44
+ </div>
@@ -0,0 +1,130 @@
1
+ import {
2
+ AfterViewInit,
3
+ ChangeDetectorRef,
4
+ Component,
5
+ ElementRef,
6
+ Input,
7
+ OnDestroy,
8
+ ViewChild,
9
+ NgZone,
10
+ } from '@angular/core'
11
+ import { CommonModule } from '@angular/common'
12
+ import { provideIcons, NgIconComponent } from '@ng-icons/core'
13
+ import { iconoirExpand, iconoirReduce } from '@ng-icons/iconoir'
14
+ import { TranslateModule } from '@ngx-translate/core'
15
+ import { MatButtonModule } from '@angular/material/button'
16
+ import {
17
+ OverlayModule,
18
+ ViewportRuler,
19
+ ConnectedPosition,
20
+ } from '@angular/cdk/overlay'
21
+ import { ButtonComponent } from '../../../../../../libs/ui/inputs/src'
22
+ import { Subscription } from 'rxjs'
23
+
24
+ @Component({
25
+ selector: 'gn-ui-truncated-text',
26
+ standalone: true,
27
+ imports: [
28
+ CommonModule,
29
+ TranslateModule,
30
+ MatButtonModule,
31
+ OverlayModule,
32
+ ButtonComponent,
33
+ NgIconComponent,
34
+ ],
35
+ providers: [provideIcons({ iconoirExpand, iconoirReduce })],
36
+ templateUrl: './truncated-text.component.html',
37
+ styles: [],
38
+ })
39
+ export class TruncatedTextComponent implements AfterViewInit, OnDestroy {
40
+ @Input() text = ''
41
+ @Input() extraClass = ''
42
+
43
+ @ViewChild('textElement') textElement: ElementRef<HTMLElement>
44
+ isTextTruncated = false
45
+ isOpen = false
46
+ overlayPosition: ConnectedPosition = {
47
+ originX: 'end',
48
+ originY: 'top',
49
+ overlayX: 'end',
50
+ overlayY: 'top',
51
+ }
52
+ private readonly resizeObserver: ResizeObserver
53
+ private readonly mutationObserver: MutationObserver
54
+ private readonly viewportSubscription: Subscription
55
+
56
+ constructor(
57
+ private readonly cd: ChangeDetectorRef,
58
+ private readonly ngZone: NgZone,
59
+ private readonly viewportRuler: ViewportRuler
60
+ ) {
61
+ this.resizeObserver = new ResizeObserver(() => {
62
+ this.ngZone.run(() => this.checkTextTruncation())
63
+ })
64
+
65
+ this.mutationObserver = new MutationObserver(() => {
66
+ this.ngZone.run(() => {
67
+ this.checkTextTruncation()
68
+ this.close()
69
+ })
70
+ })
71
+
72
+ this.viewportSubscription = this.viewportRuler.change().subscribe(() => {
73
+ if (this.isOpen) {
74
+ this.updateOverlayPosition()
75
+ }
76
+ })
77
+ }
78
+
79
+ ngAfterViewInit() {
80
+ const element = this.textElement.nativeElement
81
+ this.resizeObserver?.observe(element)
82
+ this.mutationObserver?.observe(element.parentElement, {
83
+ attributes: true,
84
+ childList: true,
85
+ subtree: true,
86
+ })
87
+ this.checkTextTruncation()
88
+ }
89
+
90
+ ngOnDestroy() {
91
+ this.resizeObserver?.disconnect()
92
+ this.mutationObserver?.disconnect()
93
+ this.viewportSubscription?.unsubscribe()
94
+ this.close()
95
+ }
96
+
97
+ toggleOverlay() {
98
+ this.isOpen = !this.isOpen
99
+ if (this.isOpen) {
100
+ this.updateOverlayPosition()
101
+ }
102
+ }
103
+
104
+ private updateOverlayPosition() {
105
+ const element = this.textElement.nativeElement
106
+ const rect = element.getBoundingClientRect()
107
+ const viewportWidth = this.viewportRuler.getViewportSize().width
108
+ const isMobile = viewportWidth < 640
109
+ const overlayWidth = isMobile ? 190 : 320
110
+ const isNearLeftEdge = rect.left < overlayWidth
111
+
112
+ this.overlayPosition = {
113
+ originX: isNearLeftEdge ? 'start' : 'end',
114
+ originY: 'top',
115
+ overlayX: isNearLeftEdge ? 'start' : 'end',
116
+ overlayY: 'top',
117
+ }
118
+ }
119
+
120
+ close() {
121
+ this.isOpen = false
122
+ }
123
+
124
+ private checkTextTruncation() {
125
+ const element = this.textElement.nativeElement
126
+
127
+ this.isTextTruncated = element.scrollWidth > element.clientWidth
128
+ this.cd.detectChanges()
129
+ }
130
+ }
@@ -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
  })
@@ -1,6 +1,6 @@
1
1
  <div *ngIf="feature" class="root">
2
- <div class="property" *ngFor="let propName of properties">
3
- <div>{{ propName }}</div>
4
- <div class="font-bold">{{ feature.properties[propName] }}</div>
2
+ <div class="property" *ngFor="let prop of properties | keyvalue">
3
+ <div>{{ prop.key }}</div>
4
+ <div class="font-bold">{{ prop.value }}</div>
5
5
  </div>
6
6
  </div>
@@ -1,6 +1,7 @@
1
1
  import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
2
2
  import { CommonModule } from '@angular/common'
3
3
  import type { Feature } from 'geojson'
4
+ import { DatasetFeatureCatalog } from '../../../../../../../libs/common/domain/src/lib/model/record'
4
5
 
5
6
  const geometryKeys = ['geometry', 'the_geom']
6
7
 
@@ -14,11 +15,34 @@ const geometryKeys = ['geometry', 'the_geom']
14
15
  })
15
16
  export class FeatureDetailComponent {
16
17
  @Input() feature: Feature
18
+ _featureAttributes = []
19
+ @Input() set featureCatalog(value: DatasetFeatureCatalog) {
20
+ if (value) this._featureAttributes = value.featureTypes[0].attributes
21
+ }
17
22
 
18
23
  get properties() {
19
24
  if (!this.feature) return []
20
- return Object.keys(this.feature.properties).filter(
21
- (prop) => !geometryKeys.includes(prop)
22
- )
25
+ return this.setProperties()
26
+ }
27
+
28
+ setProperties() {
29
+ const properties = Object.keys(this.feature.properties)
30
+ .filter((p) => !geometryKeys.includes(p))
31
+ .reduce((acc, p) => {
32
+ let key = p
33
+ if (this._featureAttributes.length) {
34
+ const matchingAttribute = this._featureAttributes.find(
35
+ (attr) => attr.name === p
36
+ )
37
+
38
+ if (matchingAttribute && matchingAttribute.code) {
39
+ key = matchingAttribute.code
40
+ }
41
+ }
42
+ acc[key] = this.feature.properties[p]
43
+ return acc
44
+ }, {})
45
+
46
+ return properties
23
47
  }
24
48
  }
@@ -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)
@@ -12,6 +12,7 @@
12
12
  (mdSelect)="mdSelect.emit($event)"
13
13
  [favoriteTemplate]="favoriteTemplate"
14
14
  [linkHref]="recordUrlGetter(record)"
15
+ [attr.data-cy]="record.uniqueIdentifier"
15
16
  ></gn-ui-results-list-item>
16
17
  </div>
17
18
  </div>
@@ -31,7 +31,10 @@ export class LinkClassifierService {
31
31
  return [LinkUsage.API, LinkUsage.DOWNLOAD, LinkUsage.GEODATA]
32
32
  case 'wms':
33
33
  case 'wmts':
34
+ case 'tms':
34
35
  return [LinkUsage.API, LinkUsage.MAP_API]
36
+ case 'maplibre-style':
37
+ return [LinkUsage.GEODATA]
35
38
  case 'ogcFeatures':
36
39
  return [LinkUsage.API, LinkUsage.DOWNLOAD, LinkUsage.GEODATA]
37
40
  case 'GPFDL':
@@ -247,6 +247,9 @@ export function getLinkLabel(
247
247
  case 'wmts':
248
248
  format = 'WMTS'
249
249
  break
250
+ case 'tms':
251
+ format = 'TMS'
252
+ break
250
253
  case 'esriRest':
251
254
  format = 'REST'
252
255
  break
@@ -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 {
@@ -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": "",
@@ -281,6 +284,10 @@
281
284
  "facets.block.title.tag.default": "Stichwort",
282
285
  "facets.block.title.th_regions_tree.default": "Regionen",
283
286
  "favorite.not.authenticated.tooltip": "<div><a href=' {link} '>Anmelden</a>, um auf diese Funktion zuzugreifen</div>",
287
+ "feature.catalog.attribute.code": "",
288
+ "feature.catalog.attribute.description": "",
289
+ "feature.catalog.attribute.name": "",
290
+ "feature.catalog.attribute.type": "",
284
291
  "input.file.dropFileLabel": "",
285
292
  "input.file.orInputUrl": "",
286
293
  "input.file.selectFileLabel": "",
@@ -358,6 +365,9 @@
358
365
  "record.action.view": "Anzeigen",
359
366
  "record.card.metadata.contact": "",
360
367
  "record.externalViewer.open": "In externem Kartenviewer öffnen",
368
+ "record.metadata.feature.catalog": "",
369
+ "record.feature.catalog.number.total.attribute": "",
370
+ "record.feature.catalog.number.total.object": "",
361
371
  "record.feature.limit": "Die Vorschau wurde aufgrund zu vieler Elemente deaktiviert",
362
372
  "record.kind.data": "",
363
373
  "record.kind.dataset": "",
@@ -467,10 +477,6 @@
467
477
  "results.layout.selectOne": "Layout auswählen",
468
478
  "results.records.hits.displayedOn": "{displayed, plural, =0{Kein Datensatz.} one{1 Datensatz} other{{displayed} Datensätze }} {hits, plural, other{angezeigt von {hits} insgesamt.}}",
469
479
  "results.records.hits.empty.help.html": "Vorschläge: <ul class='list-disc list-inside'><li>Versuchen Sie es mit anderen Worten</li><li>Beschränken Sie die Suchwörter</li></ul>",
470
- "search.filters.recordKind.all": "Alle",
471
- "search.filters.recordKind.dataset": "Datensätze",
472
- "search.filters.recordKind.reuse": "Wiederverwendungen",
473
- "search.filters.recordKind.service": "Dienste",
474
480
  "results.records.hits.found": "{hits, plural, =0{Keine Dokumente entsprechen der angegebenen Suche.} one{1 Datensatz gefunden.} other{{hits} Datensätze gefunden.}}",
475
481
  "results.records.hits.selected": "{ amount } ausgewählt",
476
482
  "results.showMore": "Mehr Ergebnisse anzeigen...",
@@ -489,6 +495,7 @@
489
495
  "search.error.recordNotFound": "Der Datensatz mit der Kennung \"{ id }\" konnte nicht gefunden werden.",
490
496
  "search.field.any.placeholder": "Suche im katalog ...",
491
497
  "search.field.sortBy": "Sortieren nach:",
498
+ "search.filter.into.feature.catalog": "",
492
499
  "search.filters.availableServices.download": "",
493
500
  "search.filters.availableServices.view": "",
494
501
  "search.filters.changeDate": "Letzte Aktualisierung",
@@ -519,6 +526,10 @@
519
526
  "search.filters.producerOrg": "",
520
527
  "search.filters.publicationYear": "Veröffentlichungsjahr",
521
528
  "search.filters.publisherOrg": "",
529
+ "search.filters.recordKind.all": "Alle",
530
+ "search.filters.recordKind.dataset": "Datensätze",
531
+ "search.filters.recordKind.reuse": "Wiederverwendungen",
532
+ "search.filters.recordKind.service": "Dienste",
522
533
  "search.filters.representationType": "Repräsentationstyp",
523
534
  "search.filters.resourceType": "Ressourcentyp",
524
535
  "search.filters.standard": "Standard",
@@ -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",
@@ -281,6 +284,10 @@
281
284
  "facets.block.title.tag.default": "Tag",
282
285
  "facets.block.title.th_regions_tree.default": "Regions",
283
286
  "favorite.not.authenticated.tooltip": "<div><a href=' {link} '>Login</a> to access this feature</div>",
287
+ "feature.catalog.attribute.code": "Code",
288
+ "feature.catalog.attribute.description": "Description",
289
+ "feature.catalog.attribute.name": "Name",
290
+ "feature.catalog.attribute.type": "Type",
284
291
  "input.file.dropFileLabel": "or drop it here",
285
292
  "input.file.orInputUrl": "or create a link to an external resource",
286
293
  "input.file.selectFileLabel": "Select a file ({sizeMB} MB max.)",
@@ -358,6 +365,9 @@
358
365
  "record.action.view": "View",
359
366
  "record.card.metadata.contact": "Metadata Contact",
360
367
  "record.externalViewer.open": "Open in the external map viewer",
368
+ "record.metadata.feature.catalog": "Feature catalog",
369
+ "record.feature.catalog.number.total.attribute": "Total amount of objects",
370
+ "record.feature.catalog.number.total.object": "Total amount of attributes",
361
371
  "record.feature.limit": "Preview disabled due to too many elements",
362
372
  "record.kind.data": "Data",
363
373
  "record.kind.dataset": "Dataset",
@@ -467,10 +477,6 @@
467
477
  "results.layout.selectOne": "Results layout",
468
478
  "results.records.hits.displayedOn": "{displayed, plural, =0{No dataset.} one{1 } other{{displayed} }} {hits, plural, other{displayed on {hits} total.}}",
469
479
  "results.records.hits.empty.help.html": "Suggestions: <ul class='list-disc list-inside'><li>Try other words</li><li>Specify fewer words</li></ul>",
470
- "search.filters.recordKind.all": "All",
471
- "search.filters.recordKind.dataset": "Datasets",
472
- "search.filters.recordKind.reuse": "Reuses",
473
- "search.filters.recordKind.service": "Services",
474
480
  "results.records.hits.found": "{hits, plural, =0{No datasets match the specified search.} one{1 dataset found.} other{{hits} datasets found.}}",
475
481
  "results.records.hits.selected": "{ amount } selected",
476
482
  "results.showMore": "Show more results...",
@@ -489,6 +495,7 @@
489
495
  "search.error.recordNotFound": "The dataset with identifier \"{ id }\" could not be found.",
490
496
  "search.field.any.placeholder": "Search in the catalog ...",
491
497
  "search.field.sortBy": "Sort by:",
498
+ "search.filter.into.feature.catalog": "Search a term",
492
499
  "search.filters.availableServices.download": "",
493
500
  "search.filters.availableServices.view": "",
494
501
  "search.filters.changeDate": "Updated",
@@ -519,6 +526,10 @@
519
526
  "search.filters.producerOrg": "Producer",
520
527
  "search.filters.publicationYear": "Publication year",
521
528
  "search.filters.publisherOrg": "Publisher",
529
+ "search.filters.recordKind.all": "All",
530
+ "search.filters.recordKind.dataset": "Datasets",
531
+ "search.filters.recordKind.reuse": "Reuses",
532
+ "search.filters.recordKind.service": "Services",
522
533
  "search.filters.representationType": "Representation type",
523
534
  "search.filters.resourceType": "Resource type",
524
535
  "search.filters.standard": "Standard",
@@ -566,6 +577,8 @@
566
577
  "tooltip.url.open": "Open URL",
567
578
  "ui.readLess": "Read less",
568
579
  "ui.readMore": "Read more",
580
+ "ui.hideFullText": "Hide complete text",
581
+ "ui.showAllText": "Show all text",
569
582
  "wfs.feature.limit": "Too many features to display the WFS layer!",
570
583
  "wfs.featuretype.notfound": "No matching feature type was found in the service",
571
584
  "wfs.geojsongml.notsupported": "This service does not support the GeoJSON or GML format",
@@ -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": "",
@@ -281,6 +284,10 @@
281
284
  "facets.block.title.tag.default": "",
282
285
  "facets.block.title.th_regions_tree.default": "",
283
286
  "favorite.not.authenticated.tooltip": "",
287
+ "feature.catalog.attribute.code": "",
288
+ "feature.catalog.attribute.description": "",
289
+ "feature.catalog.attribute.name": "",
290
+ "feature.catalog.attribute.type": "",
284
291
  "input.file.dropFileLabel": "",
285
292
  "input.file.orInputUrl": "",
286
293
  "input.file.selectFileLabel": "",
@@ -358,6 +365,9 @@
358
365
  "record.action.view": "",
359
366
  "record.card.metadata.contact": "",
360
367
  "record.externalViewer.open": "",
368
+ "record.feature.catalog": "",
369
+ "record.feature.catalog.number.total.attribute": "",
370
+ "record.feature.catalog.number.total.object": "",
361
371
  "record.feature.limit": "",
362
372
  "record.kind.data": "",
363
373
  "record.kind.dataset": "",
@@ -467,10 +477,6 @@
467
477
  "results.layout.selectOne": "",
468
478
  "results.records.hits.displayedOn": "",
469
479
  "results.records.hits.empty.help.html": "",
470
- "search.filters.recordKind.all": "Todos",
471
- "search.filters.recordKind.dataset": "",
472
- "search.filters.recordKind.reuse": "",
473
- "search.filters.recordKind.service": "",
474
480
  "results.records.hits.found": "",
475
481
  "results.records.hits.selected": "",
476
482
  "results.showMore": "",
@@ -489,6 +495,7 @@
489
495
  "search.error.recordNotFound": "",
490
496
  "search.field.any.placeholder": "",
491
497
  "search.field.sortBy": "",
498
+ "search.filter.into.feature.catalog": "",
492
499
  "search.filters.availableServices.download": "",
493
500
  "search.filters.availableServices.view": "",
494
501
  "search.filters.changeDate": "Última actualización",
@@ -519,6 +526,10 @@
519
526
  "search.filters.producerOrg": "",
520
527
  "search.filters.publicationYear": "",
521
528
  "search.filters.publisherOrg": "",
529
+ "search.filters.recordKind.all": "Todos",
530
+ "search.filters.recordKind.dataset": "",
531
+ "search.filters.recordKind.reuse": "",
532
+ "search.filters.recordKind.service": "",
522
533
  "search.filters.representationType": "",
523
534
  "search.filters.resourceType": "",
524
535
  "search.filters.standard": "",