geonetwork-ui 2.4.2 → 2.5.0-dev.6d78023ff

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 (110) hide show
  1. package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +17 -5
  2. package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +2 -2
  3. package/esm2022/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.mjs +18 -16
  4. package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +12 -17
  5. package/esm2022/libs/feature/editor/src/lib/components/wizard-summarize/wizard-summarize.component.mjs +11 -11
  6. package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +3 -3
  7. package/esm2022/libs/feature/record/src/lib/feature-record.module.mjs +6 -7
  8. package/esm2022/libs/ui/dataviz/src/index.mjs +3 -3
  9. package/esm2022/libs/ui/dataviz/src/lib/data-table/custom.mat.paginator.intl.mjs +51 -0
  10. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.component.mjs +133 -0
  11. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.data.source.mjs +24 -0
  12. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.mjs +82 -0
  13. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +18 -10
  14. package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +14 -12
  15. package/esm2022/libs/util/data-fetcher/src/index.mjs +3 -1
  16. package/esm2022/libs/util/data-fetcher/src/lib/model.mjs +7 -3
  17. package/esm2022/libs/util/data-fetcher/src/lib/readers/wfs.mjs +20 -2
  18. package/esm2022/libs/util/data-fetcher/src/lib/utils.mjs +3 -3
  19. package/esm2022/libs/util/shared/src/lib/services/date.service.mjs +41 -0
  20. package/esm2022/libs/util/shared/src/lib/services/index.mjs +2 -1
  21. package/esm2022/libs/util/shared/src/lib/utils/temporal-extent-union.mjs +4 -4
  22. package/esm2022/translations/de.json +7 -0
  23. package/esm2022/translations/en.json +7 -0
  24. package/esm2022/translations/es.json +7 -0
  25. package/esm2022/translations/fr.json +7 -0
  26. package/esm2022/translations/it.json +7 -0
  27. package/esm2022/translations/nl.json +7 -0
  28. package/esm2022/translations/pt.json +7 -0
  29. package/fesm2022/geonetwork-ui.mjs +665 -368
  30. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  31. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts +2 -1
  32. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
  33. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
  34. package/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.d.ts +7 -9
  35. package/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.d.ts.map +1 -1
  36. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +3 -6
  37. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
  38. package/libs/feature/editor/src/lib/components/wizard-summarize/wizard-summarize.component.d.ts +3 -3
  39. package/libs/feature/editor/src/lib/components/wizard-summarize/wizard-summarize.component.d.ts.map +1 -1
  40. package/libs/feature/record/src/lib/feature-record.module.d.ts +2 -2
  41. package/libs/feature/record/src/lib/feature-record.module.d.ts.map +1 -1
  42. package/libs/ui/dataviz/src/index.d.ts +2 -2
  43. package/libs/ui/dataviz/src/index.d.ts.map +1 -1
  44. package/libs/ui/dataviz/src/lib/data-table/custom.mat.paginator.intl.d.ts +14 -0
  45. package/libs/ui/dataviz/src/lib/data-table/custom.mat.paginator.intl.d.ts.map +1 -0
  46. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts +45 -0
  47. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts.map +1 -0
  48. package/libs/ui/dataviz/src/lib/data-table/data-table.data.source.d.ts +12 -0
  49. package/libs/ui/dataviz/src/lib/data-table/data-table.data.source.d.ts.map +1 -0
  50. package/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.d.ts +10 -0
  51. package/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.d.ts.map +1 -0
  52. package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts +5 -0
  53. package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts.map +1 -1
  54. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +3 -2
  55. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
  56. package/libs/util/data-fetcher/src/index.d.ts +3 -1
  57. package/libs/util/data-fetcher/src/index.d.ts.map +1 -1
  58. package/libs/util/data-fetcher/src/lib/model.d.ts +1 -1
  59. package/libs/util/data-fetcher/src/lib/model.d.ts.map +1 -1
  60. package/libs/util/data-fetcher/src/lib/readers/wfs.d.ts.map +1 -1
  61. package/libs/util/shared/src/lib/services/date.service.d.ts +13 -0
  62. package/libs/util/shared/src/lib/services/date.service.d.ts.map +1 -0
  63. package/libs/util/shared/src/lib/services/index.d.ts +1 -0
  64. package/libs/util/shared/src/lib/services/index.d.ts.map +1 -1
  65. package/libs/util/shared/src/lib/utils/temporal-extent-union.d.ts +2 -1
  66. package/libs/util/shared/src/lib/utils/temporal-extent-union.d.ts.map +1 -1
  67. package/package.json +1 -1
  68. package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +19 -5
  69. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +1 -5
  70. package/src/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.html +3 -3
  71. package/src/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.ts +17 -15
  72. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.html +4 -3
  73. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +9 -18
  74. package/src/libs/feature/editor/src/lib/components/wizard-summarize/wizard-summarize.component.ts +3 -4
  75. package/src/libs/feature/record/src/lib/data-view/data-view.component.html +1 -1
  76. package/src/libs/feature/record/src/lib/feature-record.module.ts +6 -4
  77. package/src/libs/ui/dataviz/src/index.ts +2 -2
  78. package/src/libs/ui/dataviz/src/lib/data-table/custom.mat.paginator.intl.ts +52 -0
  79. package/src/libs/ui/dataviz/src/lib/{table/table.component.css → data-table/data-table.component.css} +4 -0
  80. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.html +67 -0
  81. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.ts +173 -0
  82. package/src/libs/ui/dataviz/src/lib/data-table/data-table.data.source.ts +33 -0
  83. package/src/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.ts +84 -0
  84. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +3 -3
  85. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +12 -2
  86. package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +4 -2
  87. package/src/libs/util/data-fetcher/src/index.ts +3 -0
  88. package/src/libs/util/data-fetcher/src/lib/model.ts +6 -2
  89. package/src/libs/util/data-fetcher/src/lib/readers/wfs.ts +23 -1
  90. package/src/libs/util/data-fetcher/src/lib/utils.ts +2 -2
  91. package/src/libs/util/shared/src/lib/services/date.service.ts +45 -0
  92. package/src/libs/util/shared/src/lib/services/index.ts +1 -0
  93. package/src/libs/util/shared/src/lib/utils/temporal-extent-union.ts +6 -3
  94. package/translations/de.json +7 -0
  95. package/translations/en.json +7 -0
  96. package/translations/es.json +7 -0
  97. package/translations/fr.json +7 -0
  98. package/translations/it.json +7 -0
  99. package/translations/nl.json +7 -0
  100. package/translations/pt.json +7 -0
  101. package/translations/sk.json +7 -0
  102. package/esm2022/libs/ui/dataviz/src/lib/table/table.component.mjs +0 -61
  103. package/esm2022/libs/ui/dataviz/src/lib/table/table.fixtures.mjs +0 -40
  104. package/libs/ui/dataviz/src/lib/table/table.component.d.ts +0 -29
  105. package/libs/ui/dataviz/src/lib/table/table.component.d.ts.map +0 -1
  106. package/libs/ui/dataviz/src/lib/table/table.fixtures.d.ts +0 -11
  107. package/libs/ui/dataviz/src/lib/table/table.fixtures.d.ts.map +0 -1
  108. package/src/libs/ui/dataviz/src/lib/table/table.component.html +0 -40
  109. package/src/libs/ui/dataviz/src/lib/table/table.component.ts +0 -80
  110. package/src/libs/ui/dataviz/src/lib/table/table.fixtures.ts +0 -40
@@ -1,40 +0,0 @@
1
- <div class="border border-gray-300 rounded-lg overflow-hidden bg-white h-full">
2
- <cdk-virtual-scroll-viewport
3
- tvsItemSize="48"
4
- headerHeight="56"
5
- style="height: calc(100% - 37px)"
6
- >
7
- <table mat-table [dataSource]="dataSource" class="mat-elevation-z8" matSort>
8
- <ng-container *ngFor="let prop of properties" [matColumnDef]="prop">
9
- <th
10
- mat-header-cell
11
- *matHeaderCellDef
12
- mat-sort-header
13
- class="text-sm text-black bg-white"
14
- >
15
- {{ prop }}
16
- </th>
17
- <td
18
- mat-cell
19
- *matCellDef="let element"
20
- class="whitespace-nowrap pr-1 truncate"
21
- >
22
- {{ element[prop] }}
23
- </td>
24
- </ng-container>
25
-
26
- <tr mat-header-row *matHeaderRowDef="properties; sticky: true"></tr>
27
- <tr
28
- [id]="getRowEltId(row.id)"
29
- mat-row
30
- *matRowDef="let row; columns: properties"
31
- (click)="selected.emit(row)"
32
- [class.active]="row.id === activeId"
33
- ></tr>
34
- </table>
35
- </cdk-virtual-scroll-viewport>
36
- <div class="text-gray-900 border-t border-gray-300 px-4 py-2 text-sm">
37
- <span class="count font-extrabold text-primary">{{ count }}</span
38
- >&nbsp;<span translate>table.object.count</span>.
39
- </div>
40
- </div>
@@ -1,80 +0,0 @@
1
- import { ScrollingModule } from '@angular/cdk/scrolling'
2
- import { NgForOf } from '@angular/common'
3
- import {
4
- AfterViewInit,
5
- ChangeDetectionStrategy,
6
- Component,
7
- ElementRef,
8
- EventEmitter,
9
- Input,
10
- Output,
11
- ViewChild,
12
- } from '@angular/core'
13
- import { MatSort, MatSortModule } from '@angular/material/sort'
14
- import { MatTableModule } from '@angular/material/table'
15
- import {
16
- TableVirtualScrollDataSource,
17
- TableVirtualScrollModule,
18
- } from 'ng-table-virtual-scroll'
19
- import { TranslateModule } from '@ngx-translate/core'
20
-
21
- const rowIdPrefix = 'table-item-'
22
-
23
- export type TableItemId = string | number
24
- type TableItemType = string | number | Date
25
-
26
- export interface TableItemModel {
27
- id: TableItemId
28
- [key: string]: TableItemType
29
- }
30
-
31
- @Component({
32
- standalone: true,
33
- imports: [
34
- MatTableModule,
35
- MatSortModule,
36
- TableVirtualScrollModule,
37
- ScrollingModule,
38
- NgForOf,
39
- TranslateModule,
40
- ],
41
- selector: 'gn-ui-table',
42
- templateUrl: './table.component.html',
43
- styleUrls: ['./table.component.css'],
44
- changeDetection: ChangeDetectionStrategy.OnPush,
45
- })
46
- export class TableComponent implements AfterViewInit {
47
- @Input() set data(value: TableItemModel[]) {
48
- this.dataSource = new TableVirtualScrollDataSource(value)
49
- this.dataSource.sort = this.sort
50
- this.properties =
51
- Array.isArray(value) && value.length ? Object.keys(value[0]) : []
52
- this.count = value.length
53
- }
54
- @Input() activeId: TableItemId
55
- @Output() selected = new EventEmitter<any>()
56
-
57
- @ViewChild(MatSort, { static: true }) sort: MatSort
58
- properties: string[]
59
- dataSource: TableVirtualScrollDataSource<any>
60
- headerHeight: number
61
- count: number
62
-
63
- constructor(private eltRef: ElementRef) {}
64
-
65
- ngAfterViewInit() {
66
- this.headerHeight =
67
- this.eltRef.nativeElement.querySelector('thead').offsetHeight
68
- }
69
-
70
- scrollToItem(itemId: TableItemId): void {
71
- const row = this.eltRef.nativeElement.querySelector(
72
- `#${this.getRowEltId(itemId)}`
73
- )
74
- this.eltRef.nativeElement.scrollTop = row.offsetTop - this.headerHeight
75
- }
76
-
77
- public getRowEltId(id: TableItemId): string {
78
- return rowIdPrefix + id
79
- }
80
- }
@@ -1,40 +0,0 @@
1
- export const tableItemFixture = () => [
2
- {
3
- name: 'name 1',
4
- id: 'id 1',
5
- age: 15,
6
- },
7
- {
8
- name: 'name 2',
9
- id: 'id 2',
10
- age: 10,
11
- },
12
- {
13
- name: 'name 3',
14
- id: 'id 3',
15
- age: 55,
16
- },
17
- ]
18
-
19
- export const someHabTableItemFixture = () => [
20
- {
21
- name: 'France',
22
- id: '1',
23
- pop: 50500000,
24
- },
25
- {
26
- name: 'Italy',
27
- id: '2',
28
- pop: 155878789655,
29
- },
30
- {
31
- name: 'UK',
32
- id: '3',
33
- pop: 31522456,
34
- },
35
- {
36
- name: 'US',
37
- id: '4',
38
- pop: 3215448888,
39
- },
40
- ]