geonetwork-ui 2.4.2 → 2.5.0-dev.17cec7bce

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 (143) hide show
  1. package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +50 -32
  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/service/data.service.mjs +17 -7
  5. package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +12 -17
  6. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.mjs +2 -1
  7. package/esm2022/libs/feature/editor/src/lib/components/wizard-summarize/wizard-summarize.component.mjs +11 -11
  8. package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +3 -3
  9. package/esm2022/libs/feature/record/src/lib/feature-record.module.mjs +6 -7
  10. package/esm2022/libs/feature/search/src/lib/utils/service/fields.mjs +46 -1
  11. package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +3 -2
  12. package/esm2022/libs/ui/dataviz/src/index.mjs +3 -3
  13. package/esm2022/libs/ui/dataviz/src/lib/data-table/custom.mat.paginator.intl.mjs +51 -0
  14. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.component.mjs +133 -0
  15. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.data.source.mjs +24 -0
  16. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.mjs +82 -0
  17. package/esm2022/libs/ui/elements/src/index.mjs +2 -1
  18. package/esm2022/libs/ui/elements/src/lib/application-banner/application-banner.component.mjs +78 -0
  19. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +18 -10
  20. package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +2 -1
  21. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +10 -4
  22. package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +7 -2
  23. package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +14 -12
  24. package/esm2022/libs/util/data-fetcher/src/index.mjs +3 -1
  25. package/esm2022/libs/util/data-fetcher/src/lib/model.mjs +7 -3
  26. package/esm2022/libs/util/data-fetcher/src/lib/readers/wfs.mjs +20 -2
  27. package/esm2022/libs/util/data-fetcher/src/lib/utils.mjs +3 -3
  28. package/esm2022/libs/util/shared/src/lib/services/date.service.mjs +41 -0
  29. package/esm2022/libs/util/shared/src/lib/services/index.mjs +2 -1
  30. package/esm2022/libs/util/shared/src/lib/utils/temporal-extent-union.mjs +4 -4
  31. package/esm2022/translations/de.json +7 -0
  32. package/esm2022/translations/en.json +7 -0
  33. package/esm2022/translations/es.json +7 -0
  34. package/esm2022/translations/fr.json +9 -2
  35. package/esm2022/translations/it.json +7 -0
  36. package/esm2022/translations/nl.json +7 -0
  37. package/esm2022/translations/pt.json +7 -0
  38. package/fesm2022/geonetwork-ui.mjs +850 -408
  39. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  40. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts +3 -1
  41. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
  42. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
  43. package/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.d.ts +7 -9
  44. package/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.d.ts.map +1 -1
  45. package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
  46. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +3 -6
  47. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
  48. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.d.ts.map +1 -1
  49. package/libs/feature/editor/src/lib/components/wizard-summarize/wizard-summarize.component.d.ts +3 -3
  50. package/libs/feature/editor/src/lib/components/wizard-summarize/wizard-summarize.component.d.ts.map +1 -1
  51. package/libs/feature/record/src/lib/feature-record.module.d.ts +2 -2
  52. package/libs/feature/record/src/lib/feature-record.module.d.ts.map +1 -1
  53. package/libs/feature/search/src/lib/utils/service/fields.d.ts +10 -0
  54. package/libs/feature/search/src/lib/utils/service/fields.d.ts.map +1 -1
  55. package/libs/feature/search/src/lib/utils/service/fields.service.d.ts.map +1 -1
  56. package/libs/ui/dataviz/src/index.d.ts +2 -2
  57. package/libs/ui/dataviz/src/index.d.ts.map +1 -1
  58. package/libs/ui/dataviz/src/lib/data-table/custom.mat.paginator.intl.d.ts +14 -0
  59. package/libs/ui/dataviz/src/lib/data-table/custom.mat.paginator.intl.d.ts.map +1 -0
  60. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts +45 -0
  61. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts.map +1 -0
  62. package/libs/ui/dataviz/src/lib/data-table/data-table.data.source.d.ts +12 -0
  63. package/libs/ui/dataviz/src/lib/data-table/data-table.data.source.d.ts.map +1 -0
  64. package/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.d.ts +10 -0
  65. package/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.d.ts.map +1 -0
  66. package/libs/ui/elements/src/index.d.ts +1 -0
  67. package/libs/ui/elements/src/index.d.ts.map +1 -1
  68. package/libs/ui/elements/src/lib/application-banner/application-banner.component.d.ts +16 -0
  69. package/libs/ui/elements/src/lib/application-banner/application-banner.component.d.ts.map +1 -0
  70. package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts +5 -0
  71. package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts.map +1 -1
  72. package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts.map +1 -1
  73. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +2 -1
  74. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  75. package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts.map +1 -1
  76. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +3 -2
  77. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
  78. package/libs/util/data-fetcher/src/index.d.ts +3 -1
  79. package/libs/util/data-fetcher/src/index.d.ts.map +1 -1
  80. package/libs/util/data-fetcher/src/lib/model.d.ts +1 -1
  81. package/libs/util/data-fetcher/src/lib/model.d.ts.map +1 -1
  82. package/libs/util/data-fetcher/src/lib/readers/wfs.d.ts.map +1 -1
  83. package/libs/util/shared/src/lib/services/date.service.d.ts +13 -0
  84. package/libs/util/shared/src/lib/services/date.service.d.ts.map +1 -0
  85. package/libs/util/shared/src/lib/services/index.d.ts +1 -0
  86. package/libs/util/shared/src/lib/services/index.d.ts.map +1 -1
  87. package/libs/util/shared/src/lib/utils/temporal-extent-union.d.ts +2 -1
  88. package/libs/util/shared/src/lib/utils/temporal-extent-union.d.ts.map +1 -1
  89. package/package.json +1 -1
  90. package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +55 -32
  91. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +1 -5
  92. package/src/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.html +3 -3
  93. package/src/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.ts +17 -15
  94. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +21 -11
  95. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.html +4 -3
  96. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +9 -18
  97. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.ts +1 -0
  98. package/src/libs/feature/editor/src/lib/components/wizard-summarize/wizard-summarize.component.ts +3 -4
  99. package/src/libs/feature/record/src/lib/data-view/data-view.component.html +1 -1
  100. package/src/libs/feature/record/src/lib/feature-record.module.ts +6 -4
  101. package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +2 -0
  102. package/src/libs/feature/search/src/lib/utils/service/fields.ts +55 -0
  103. package/src/libs/ui/dataviz/src/index.ts +2 -2
  104. package/src/libs/ui/dataviz/src/lib/data-table/custom.mat.paginator.intl.ts +52 -0
  105. package/src/libs/ui/dataviz/src/lib/{table/table.component.css → data-table/data-table.component.css} +4 -0
  106. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.html +67 -0
  107. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.ts +173 -0
  108. package/src/libs/ui/dataviz/src/lib/data-table/data-table.data.source.ts +33 -0
  109. package/src/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.ts +84 -0
  110. package/src/libs/ui/elements/src/index.ts +1 -0
  111. package/src/libs/ui/elements/src/lib/application-banner/application-banner.component.css +0 -0
  112. package/src/libs/ui/elements/src/lib/application-banner/application-banner.component.html +25 -0
  113. package/src/libs/ui/elements/src/lib/application-banner/application-banner.component.ts +70 -0
  114. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +3 -3
  115. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +12 -2
  116. package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts +2 -0
  117. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +3 -0
  118. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +6 -0
  119. package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +4 -2
  120. package/src/libs/util/data-fetcher/src/index.ts +3 -0
  121. package/src/libs/util/data-fetcher/src/lib/model.ts +6 -2
  122. package/src/libs/util/data-fetcher/src/lib/readers/wfs.ts +23 -1
  123. package/src/libs/util/data-fetcher/src/lib/utils.ts +2 -2
  124. package/src/libs/util/shared/src/lib/services/date.service.ts +45 -0
  125. package/src/libs/util/shared/src/lib/services/index.ts +1 -0
  126. package/src/libs/util/shared/src/lib/utils/temporal-extent-union.ts +6 -3
  127. package/translations/de.json +7 -0
  128. package/translations/en.json +7 -0
  129. package/translations/es.json +7 -0
  130. package/translations/fr.json +9 -2
  131. package/translations/it.json +7 -0
  132. package/translations/nl.json +7 -0
  133. package/translations/pt.json +7 -0
  134. package/translations/sk.json +7 -0
  135. package/esm2022/libs/ui/dataviz/src/lib/table/table.component.mjs +0 -61
  136. package/esm2022/libs/ui/dataviz/src/lib/table/table.fixtures.mjs +0 -40
  137. package/libs/ui/dataviz/src/lib/table/table.component.d.ts +0 -29
  138. package/libs/ui/dataviz/src/lib/table/table.component.d.ts.map +0 -1
  139. package/libs/ui/dataviz/src/lib/table/table.fixtures.d.ts +0 -11
  140. package/libs/ui/dataviz/src/lib/table/table.fixtures.d.ts.map +0 -1
  141. package/src/libs/ui/dataviz/src/lib/table/table.component.html +0 -40
  142. package/src/libs/ui/dataviz/src/lib/table/table.component.ts +0 -80
  143. package/src/libs/ui/dataviz/src/lib/table/table.fixtures.ts +0 -40
@@ -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
- ]