geonetwork-ui 2.4.2 → 2.4.3

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 (140) hide show
  1. package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +31 -16
  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/wizard-summarize/wizard-summarize.component.mjs +11 -11
  7. package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +3 -3
  8. package/esm2022/libs/feature/record/src/lib/feature-record.module.mjs +6 -7
  9. package/esm2022/libs/feature/search/src/lib/utils/service/fields.mjs +46 -1
  10. package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +3 -2
  11. package/esm2022/libs/ui/dataviz/src/index.mjs +3 -3
  12. package/esm2022/libs/ui/dataviz/src/lib/data-table/custom.mat.paginator.intl.mjs +51 -0
  13. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.component.mjs +133 -0
  14. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.data.source.mjs +24 -0
  15. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.mjs +82 -0
  16. package/esm2022/libs/ui/elements/src/index.mjs +2 -1
  17. package/esm2022/libs/ui/elements/src/lib/application-banner/application-banner.component.mjs +78 -0
  18. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +18 -10
  19. package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +2 -1
  20. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +10 -4
  21. package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +7 -2
  22. package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +14 -12
  23. package/esm2022/libs/util/data-fetcher/src/index.mjs +3 -1
  24. package/esm2022/libs/util/data-fetcher/src/lib/model.mjs +7 -3
  25. package/esm2022/libs/util/data-fetcher/src/lib/readers/wfs.mjs +20 -2
  26. package/esm2022/libs/util/data-fetcher/src/lib/utils.mjs +3 -3
  27. package/esm2022/libs/util/shared/src/lib/services/date.service.mjs +41 -0
  28. package/esm2022/libs/util/shared/src/lib/services/index.mjs +2 -1
  29. package/esm2022/libs/util/shared/src/lib/utils/temporal-extent-union.mjs +4 -4
  30. package/esm2022/translations/de.json +7 -0
  31. package/esm2022/translations/en.json +7 -0
  32. package/esm2022/translations/es.json +7 -0
  33. package/esm2022/translations/fr.json +7 -0
  34. package/esm2022/translations/it.json +7 -0
  35. package/esm2022/translations/nl.json +7 -0
  36. package/esm2022/translations/pt.json +7 -0
  37. package/fesm2022/geonetwork-ui.mjs +828 -390
  38. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  39. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts +2 -1
  40. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
  41. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
  42. package/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.d.ts +7 -9
  43. package/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.d.ts.map +1 -1
  44. package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
  45. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +3 -6
  46. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
  47. package/libs/feature/editor/src/lib/components/wizard-summarize/wizard-summarize.component.d.ts +3 -3
  48. package/libs/feature/editor/src/lib/components/wizard-summarize/wizard-summarize.component.d.ts.map +1 -1
  49. package/libs/feature/record/src/lib/feature-record.module.d.ts +2 -2
  50. package/libs/feature/record/src/lib/feature-record.module.d.ts.map +1 -1
  51. package/libs/feature/search/src/lib/utils/service/fields.d.ts +10 -0
  52. package/libs/feature/search/src/lib/utils/service/fields.d.ts.map +1 -1
  53. package/libs/feature/search/src/lib/utils/service/fields.service.d.ts.map +1 -1
  54. package/libs/ui/dataviz/src/index.d.ts +2 -2
  55. package/libs/ui/dataviz/src/index.d.ts.map +1 -1
  56. package/libs/ui/dataviz/src/lib/data-table/custom.mat.paginator.intl.d.ts +14 -0
  57. package/libs/ui/dataviz/src/lib/data-table/custom.mat.paginator.intl.d.ts.map +1 -0
  58. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts +45 -0
  59. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts.map +1 -0
  60. package/libs/ui/dataviz/src/lib/data-table/data-table.data.source.d.ts +12 -0
  61. package/libs/ui/dataviz/src/lib/data-table/data-table.data.source.d.ts.map +1 -0
  62. package/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.d.ts +10 -0
  63. package/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.d.ts.map +1 -0
  64. package/libs/ui/elements/src/index.d.ts +1 -0
  65. package/libs/ui/elements/src/index.d.ts.map +1 -1
  66. package/libs/ui/elements/src/lib/application-banner/application-banner.component.d.ts +16 -0
  67. package/libs/ui/elements/src/lib/application-banner/application-banner.component.d.ts.map +1 -0
  68. package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts +5 -0
  69. package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts.map +1 -1
  70. package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts.map +1 -1
  71. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +2 -1
  72. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  73. package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts.map +1 -1
  74. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +3 -2
  75. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
  76. package/libs/util/data-fetcher/src/index.d.ts +3 -1
  77. package/libs/util/data-fetcher/src/index.d.ts.map +1 -1
  78. package/libs/util/data-fetcher/src/lib/model.d.ts +1 -1
  79. package/libs/util/data-fetcher/src/lib/model.d.ts.map +1 -1
  80. package/libs/util/data-fetcher/src/lib/readers/wfs.d.ts.map +1 -1
  81. package/libs/util/shared/src/lib/services/date.service.d.ts +13 -0
  82. package/libs/util/shared/src/lib/services/date.service.d.ts.map +1 -0
  83. package/libs/util/shared/src/lib/services/index.d.ts +1 -0
  84. package/libs/util/shared/src/lib/services/index.d.ts.map +1 -1
  85. package/libs/util/shared/src/lib/utils/temporal-extent-union.d.ts +2 -1
  86. package/libs/util/shared/src/lib/utils/temporal-extent-union.d.ts.map +1 -1
  87. package/package.json +1 -1
  88. package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +33 -16
  89. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +1 -5
  90. package/src/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.html +3 -3
  91. package/src/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.ts +17 -15
  92. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +21 -11
  93. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.html +4 -3
  94. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +9 -18
  95. package/src/libs/feature/editor/src/lib/components/wizard-summarize/wizard-summarize.component.ts +3 -4
  96. package/src/libs/feature/record/src/lib/data-view/data-view.component.html +1 -1
  97. package/src/libs/feature/record/src/lib/feature-record.module.ts +6 -4
  98. package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +2 -0
  99. package/src/libs/feature/search/src/lib/utils/service/fields.ts +55 -0
  100. package/src/libs/ui/dataviz/src/index.ts +2 -2
  101. package/src/libs/ui/dataviz/src/lib/data-table/custom.mat.paginator.intl.ts +52 -0
  102. package/src/libs/ui/dataviz/src/lib/{table/table.component.css → data-table/data-table.component.css} +4 -0
  103. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.html +67 -0
  104. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.ts +173 -0
  105. package/src/libs/ui/dataviz/src/lib/data-table/data-table.data.source.ts +33 -0
  106. package/src/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.ts +84 -0
  107. package/src/libs/ui/elements/src/index.ts +1 -0
  108. package/src/libs/ui/elements/src/lib/application-banner/application-banner.component.css +0 -0
  109. package/src/libs/ui/elements/src/lib/application-banner/application-banner.component.html +25 -0
  110. package/src/libs/ui/elements/src/lib/application-banner/application-banner.component.ts +70 -0
  111. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +3 -3
  112. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +12 -2
  113. package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts +2 -0
  114. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +3 -0
  115. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +6 -0
  116. package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +4 -2
  117. package/src/libs/util/data-fetcher/src/index.ts +3 -0
  118. package/src/libs/util/data-fetcher/src/lib/model.ts +6 -2
  119. package/src/libs/util/data-fetcher/src/lib/readers/wfs.ts +23 -1
  120. package/src/libs/util/data-fetcher/src/lib/utils.ts +2 -2
  121. package/src/libs/util/shared/src/lib/services/date.service.ts +45 -0
  122. package/src/libs/util/shared/src/lib/services/index.ts +1 -0
  123. package/src/libs/util/shared/src/lib/utils/temporal-extent-union.ts +6 -3
  124. package/translations/de.json +7 -0
  125. package/translations/en.json +7 -0
  126. package/translations/es.json +7 -0
  127. package/translations/fr.json +7 -0
  128. package/translations/it.json +7 -0
  129. package/translations/nl.json +7 -0
  130. package/translations/pt.json +7 -0
  131. package/translations/sk.json +7 -0
  132. package/esm2022/libs/ui/dataviz/src/lib/table/table.component.mjs +0 -61
  133. package/esm2022/libs/ui/dataviz/src/lib/table/table.fixtures.mjs +0 -40
  134. package/libs/ui/dataviz/src/lib/table/table.component.d.ts +0 -29
  135. package/libs/ui/dataviz/src/lib/table/table.component.d.ts.map +0 -1
  136. package/libs/ui/dataviz/src/lib/table/table.fixtures.d.ts +0 -11
  137. package/libs/ui/dataviz/src/lib/table/table.fixtures.d.ts.map +0 -1
  138. package/src/libs/ui/dataviz/src/lib/table/table.component.html +0 -40
  139. package/src/libs/ui/dataviz/src/lib/table/table.component.ts +0 -80
  140. package/src/libs/ui/dataviz/src/lib/table/table.fixtures.ts +0 -40
@@ -60,7 +60,7 @@ export function fetchDataAsText(url: string): Promise<string> {
60
60
  })
61
61
  .then(async (response) => {
62
62
  if (!response.ok) {
63
- throw FetchError.http(response.status)
63
+ throw FetchError.http(response.status, await response.text())
64
64
  }
65
65
  return response.text()
66
66
  }),
@@ -77,7 +77,7 @@ export function fetchDataAsArrayBuffer(url: string): Promise<ArrayBuffer> {
77
77
  })
78
78
  .then(async (response) => {
79
79
  if (!response.ok) {
80
- throw FetchError.http(response.status)
80
+ throw FetchError.http(response.status, await response.text())
81
81
  }
82
82
  // convert to a numeric array so that we can store the response in cache
83
83
  return Array.from(new Uint8Array(await response.arrayBuffer()))
@@ -0,0 +1,45 @@
1
+ import { Injectable } from '@angular/core'
2
+ import { TranslateService } from '@ngx-translate/core'
3
+
4
+ @Injectable({
5
+ providedIn: 'root',
6
+ })
7
+ export class DateService {
8
+ constructor(private translateService: TranslateService) {}
9
+
10
+ private getDateObject(date: Date | string): Date {
11
+ if (typeof date === 'string') {
12
+ const dateObj = new Date(date)
13
+ if (isNaN(dateObj.getTime())) {
14
+ throw new Error('Invalid date string')
15
+ }
16
+ return dateObj
17
+ }
18
+ return date
19
+ }
20
+
21
+ private getLocaleAndDate(date: Date | string): {
22
+ locale: string
23
+ dateObj: Date
24
+ } {
25
+ const locale = this.translateService.currentLang || 'en-US'
26
+ const dateObj = this.getDateObject(date)
27
+ return { locale, dateObj }
28
+ }
29
+
30
+ formatDate(
31
+ date: Date | string,
32
+ options?: Intl.DateTimeFormatOptions
33
+ ): string {
34
+ const { locale, dateObj } = this.getLocaleAndDate(date)
35
+ return dateObj.toLocaleDateString(locale, options)
36
+ }
37
+
38
+ formatDateTime(
39
+ date: Date | string,
40
+ options?: Intl.DateTimeFormatOptions
41
+ ): string {
42
+ const { locale, dateObj } = this.getLocaleAndDate(date)
43
+ return dateObj.toLocaleString(locale, options)
44
+ }
45
+ }
@@ -1,3 +1,4 @@
1
1
  export * from './theme.service'
2
2
  export * from './log.service'
3
3
  export * from './proxy.service'
4
+ export * from './date.service'
@@ -1,8 +1,11 @@
1
+ import { DateService } from '../services'
2
+
1
3
  export function getTemporalRangeUnion(
2
4
  ranges: {
3
5
  start?: Date
4
6
  end?: Date
5
- }[]
7
+ }[],
8
+ dateService: DateService
6
9
  ) {
7
10
  let earliestStartDate = Infinity
8
11
  let latestEndDate = -Infinity
@@ -24,11 +27,11 @@ export function getTemporalRangeUnion(
24
27
  return {
25
28
  start:
26
29
  earliestStartDate !== -Infinity
27
- ? new Date(earliestStartDate).toLocaleDateString()
30
+ ? dateService.formatDate(new Date(earliestStartDate))
28
31
  : undefined,
29
32
  end:
30
33
  latestEndDate !== Infinity
31
- ? new Date(latestEndDate).toLocaleDateString()
34
+ ? dateService.formatDate(new Date(latestEndDate))
32
35
  : undefined,
33
36
  }
34
37
  } else {
@@ -589,6 +589,12 @@
589
589
  "share.tab.webComponent": "Integrieren",
590
590
  "table.loading.data": "Daten werden geladen...",
591
591
  "table.object.count": "Objekte in diesem Datensatz",
592
+ "table.paginator.firstPage": "Erste Seite",
593
+ "table.paginator.itemsPerPage": "Elemente pro Seite",
594
+ "table.paginator.lastPage": "Letzte Seite",
595
+ "table.paginator.nextPage": "Nächste Seite",
596
+ "table.paginator.previousPage": "Vorherige Seite",
597
+ "table.paginator.rangeLabel": "{startIndex} - {endIndex} von {length}",
592
598
  "table.select.data": "Datenquelle",
593
599
  "tooltip.html.copy": "HTML kopieren",
594
600
  "tooltip.id.copy": "Eindeutige Kennung kopieren",
@@ -596,6 +602,7 @@
596
602
  "tooltip.url.open": "URL öffnen",
597
603
  "ui.readLess": "Weniger lesen",
598
604
  "ui.readMore": "Weiterlesen",
605
+ "wfs.aggregations.notsupported": "",
599
606
  "wfs.feature.limit": "Zu viele Features, um den WFS-Layer anzuzeigen!",
600
607
  "wfs.featuretype.notfound": "Kein passender Feature-Typ wurde im Dienst gefunden",
601
608
  "wfs.geojsongml.notsupported": "Dieser Dienst unterstützt das GeoJSON- oder GML-Format nicht",
@@ -589,6 +589,12 @@
589
589
  "share.tab.webComponent": "Integrate",
590
590
  "table.loading.data": "Loading data...",
591
591
  "table.object.count": "Objects in this dataset",
592
+ "table.paginator.firstPage": "First page",
593
+ "table.paginator.itemsPerPage": "Items per page",
594
+ "table.paginator.lastPage": "Last page",
595
+ "table.paginator.nextPage": "Next page",
596
+ "table.paginator.previousPage": "Previous page",
597
+ "table.paginator.rangeLabel": "{startIndex} - {endIndex} of {length}",
592
598
  "table.select.data": "Data source",
593
599
  "tooltip.html.copy": "Copy HTML",
594
600
  "tooltip.id.copy": "Copy unique identifier",
@@ -596,6 +602,7 @@
596
602
  "tooltip.url.open": "Open URL",
597
603
  "ui.readLess": "Read less",
598
604
  "ui.readMore": "Read more",
605
+ "wfs.aggregations.notsupported": "Aggregations are currently not supported for WFS services",
599
606
  "wfs.feature.limit": "Too many features to display the WFS layer!",
600
607
  "wfs.featuretype.notfound": "No matching feature type was found in the service",
601
608
  "wfs.geojsongml.notsupported": "This service does not support the GeoJSON or GML format",
@@ -589,6 +589,12 @@
589
589
  "share.tab.webComponent": "",
590
590
  "table.loading.data": "",
591
591
  "table.object.count": "",
592
+ "table.paginator.firstPage": "Primera página",
593
+ "table.paginator.itemsPerPage": "Elementos por página",
594
+ "table.paginator.lastPage": "Última página",
595
+ "table.paginator.nextPage": "Página siguiente",
596
+ "table.paginator.previousPage": "Página anterior",
597
+ "table.paginator.rangeLabel": "{startIndex} - {endIndex} de {length}",
592
598
  "table.select.data": "",
593
599
  "tooltip.html.copy": "",
594
600
  "tooltip.id.copy": "",
@@ -596,6 +602,7 @@
596
602
  "tooltip.url.open": "",
597
603
  "ui.readLess": "",
598
604
  "ui.readMore": "",
605
+ "wfs.aggregations.notsupported": "",
599
606
  "wfs.feature.limit": "",
600
607
  "wfs.featuretype.notfound": "",
601
608
  "wfs.geojsongml.notsupported": "",
@@ -589,6 +589,12 @@
589
589
  "share.tab.webComponent": "Intégrer",
590
590
  "table.loading.data": "Chargement des données...",
591
591
  "table.object.count": "enregistrements dans ces données",
592
+ "table.paginator.firstPage": "Première page",
593
+ "table.paginator.itemsPerPage": "Éléments par page",
594
+ "table.paginator.lastPage": "Dernière page",
595
+ "table.paginator.nextPage": "Page suivante",
596
+ "table.paginator.previousPage": "Page précédente",
597
+ "table.paginator.rangeLabel": "{startIndex} - {endIndex} sur {length}",
592
598
  "table.select.data": "Source de données",
593
599
  "tooltip.html.copy": "Copier le HTML",
594
600
  "tooltip.id.copy": "Copier l'identifiant unique",
@@ -596,6 +602,7 @@
596
602
  "tooltip.url.open": "Ouvrir l'URL",
597
603
  "ui.readLess": "Réduire",
598
604
  "ui.readMore": "Lire la suite",
605
+ "wfs.aggregations.notsupported": "Agrégations non supportées pour les services WFS",
599
606
  "wfs.feature.limit": "Trop d'objets pour afficher la couche WFS !",
600
607
  "wfs.featuretype.notfound": "La classe d'objets n'a pas été trouvée dans le service",
601
608
  "wfs.geojsongml.notsupported": "Le service ne supporte pas le format GeoJSON ou GML",
@@ -589,6 +589,12 @@
589
589
  "share.tab.webComponent": "Incorporare",
590
590
  "table.loading.data": "Caricamento dei dati...",
591
591
  "table.object.count": "record in questi dati",
592
+ "table.paginator.firstPage": "Prima pagina",
593
+ "table.paginator.itemsPerPage": "Elementi per pagina",
594
+ "table.paginator.lastPage": "Ultima pagina",
595
+ "table.paginator.nextPage": "Pagina successiva",
596
+ "table.paginator.previousPage": "Pagina precedente",
597
+ "table.paginator.rangeLabel": "{startIndex} - {endIndex} di {total}",
592
598
  "table.select.data": "Sorgente dati",
593
599
  "tooltip.html.copy": "Copiare il HTML",
594
600
  "tooltip.id.copy": "Copiare l'identificatore unico",
@@ -596,6 +602,7 @@
596
602
  "tooltip.url.open": "Aprire l'URL",
597
603
  "ui.readLess": "Ridurre",
598
604
  "ui.readMore": "Leggere di più",
605
+ "wfs.aggregations.notsupported": "",
599
606
  "wfs.feature.limit": "Troppi oggetti per visualizzare il WFS layer!",
600
607
  "wfs.featuretype.notfound": "La classe di oggetto non è stata trovata nel servizio",
601
608
  "wfs.geojsongml.notsupported": "Il servizio non supporta il formato GeoJSON o GML",
@@ -589,6 +589,12 @@
589
589
  "share.tab.webComponent": "",
590
590
  "table.loading.data": "",
591
591
  "table.object.count": "",
592
+ "table.paginator.firstPage": "",
593
+ "table.paginator.itemsPerPage": "",
594
+ "table.paginator.lastPage": "",
595
+ "table.paginator.nextPage": "",
596
+ "table.paginator.previousPage": "",
597
+ "table.paginator.rangeLabel": "",
592
598
  "table.select.data": "",
593
599
  "tooltip.html.copy": "",
594
600
  "tooltip.id.copy": "",
@@ -596,6 +602,7 @@
596
602
  "tooltip.url.open": "",
597
603
  "ui.readLess": "",
598
604
  "ui.readMore": "",
605
+ "wfs.aggregations.notsupported": "",
599
606
  "wfs.feature.limit": "",
600
607
  "wfs.featuretype.notfound": "",
601
608
  "wfs.geojsongml.notsupported": "",
@@ -589,6 +589,12 @@
589
589
  "share.tab.webComponent": "",
590
590
  "table.loading.data": "",
591
591
  "table.object.count": "",
592
+ "table.paginator.firstPage": "",
593
+ "table.paginator.itemsPerPage": "",
594
+ "table.paginator.lastPage": "",
595
+ "table.paginator.nextPage": "",
596
+ "table.paginator.previousPage": "",
597
+ "table.paginator.rangeLabel": "",
592
598
  "table.select.data": "",
593
599
  "tooltip.html.copy": "",
594
600
  "tooltip.id.copy": "",
@@ -596,6 +602,7 @@
596
602
  "tooltip.url.open": "",
597
603
  "ui.readLess": "",
598
604
  "ui.readMore": "",
605
+ "wfs.aggregations.notsupported": "",
599
606
  "wfs.feature.limit": "",
600
607
  "wfs.featuretype.notfound": "",
601
608
  "wfs.geojsongml.notsupported": "",
@@ -589,6 +589,12 @@
589
589
  "share.tab.webComponent": "Integrovať",
590
590
  "table.loading.data": "Načítanie údajov...",
591
591
  "table.object.count": "objekty v tomto súbore údajov",
592
+ "table.paginator.firstPage": "",
593
+ "table.paginator.itemsPerPage": "",
594
+ "table.paginator.lastPage": "",
595
+ "table.paginator.nextPage": "",
596
+ "table.paginator.previousPage": "",
597
+ "table.paginator.rangeLabel": "",
592
598
  "table.select.data": "Zdroj údajov",
593
599
  "tooltip.html.copy": "Kopírovať HTML",
594
600
  "tooltip.id.copy": "Kopírovať jedinečný identifikátor",
@@ -596,6 +602,7 @@
596
602
  "tooltip.url.open": "Otvoriť URL",
597
603
  "ui.readLess": "Čítať menej",
598
604
  "ui.readMore": "Čítať viac",
605
+ "wfs.aggregations.notsupported": "",
599
606
  "wfs.feature.limit": "",
600
607
  "wfs.featuretype.notfound": "V službe nebol nájdený žiadny zodpovedajúci typ funkcie",
601
608
  "wfs.geojsongml.notsupported": "Táto služba nepodporuje formát GeoJSON alebo GML",
@@ -1,61 +0,0 @@
1
- import { ScrollingModule } from '@angular/cdk/scrolling';
2
- import { NgForOf } from '@angular/common';
3
- import { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Input, Output, ViewChild, } from '@angular/core';
4
- import { MatSort, MatSortModule } from '@angular/material/sort';
5
- import { MatTableModule } from '@angular/material/table';
6
- import { TableVirtualScrollDataSource, TableVirtualScrollModule, } from 'ng-table-virtual-scroll';
7
- import { TranslateModule } from '@ngx-translate/core';
8
- import * as i0 from "@angular/core";
9
- import * as i1 from "@angular/material/table";
10
- import * as i2 from "@angular/material/sort";
11
- import * as i3 from "ng-table-virtual-scroll";
12
- import * as i4 from "@angular/cdk/scrolling";
13
- import * as i5 from "@ngx-translate/core";
14
- const rowIdPrefix = 'table-item-';
15
- export class TableComponent {
16
- set data(value) {
17
- this.dataSource = new TableVirtualScrollDataSource(value);
18
- this.dataSource.sort = this.sort;
19
- this.properties =
20
- Array.isArray(value) && value.length ? Object.keys(value[0]) : [];
21
- this.count = value.length;
22
- }
23
- constructor(eltRef) {
24
- this.eltRef = eltRef;
25
- this.selected = new EventEmitter();
26
- }
27
- ngAfterViewInit() {
28
- this.headerHeight =
29
- this.eltRef.nativeElement.querySelector('thead').offsetHeight;
30
- }
31
- scrollToItem(itemId) {
32
- const row = this.eltRef.nativeElement.querySelector(`#${this.getRowEltId(itemId)}`);
33
- this.eltRef.nativeElement.scrollTop = row.offsetTop - this.headerHeight;
34
- }
35
- getRowEltId(id) {
36
- return rowIdPrefix + id;
37
- }
38
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TableComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
39
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TableComponent, isStandalone: true, selector: "gn-ui-table", inputs: { data: "data", activeId: "activeId" }, outputs: { selected: "selected" }, viewQueries: [{ propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }], ngImport: i0, template: "<div class=\"border border-gray-300 rounded-lg overflow-hidden bg-white h-full\">\n <cdk-virtual-scroll-viewport\n tvsItemSize=\"48\"\n headerHeight=\"56\"\n style=\"height: calc(100% - 37px)\"\n >\n <table mat-table [dataSource]=\"dataSource\" class=\"mat-elevation-z8\" matSort>\n <ng-container *ngFor=\"let prop of properties\" [matColumnDef]=\"prop\">\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header\n class=\"text-sm text-black bg-white\"\n >\n {{ prop }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n class=\"whitespace-nowrap pr-1 truncate\"\n >\n {{ element[prop] }}\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"properties; sticky: true\"></tr>\n <tr\n [id]=\"getRowEltId(row.id)\"\n mat-row\n *matRowDef=\"let row; columns: properties\"\n (click)=\"selected.emit(row)\"\n [class.active]=\"row.id === activeId\"\n ></tr>\n </table>\n </cdk-virtual-scroll-viewport>\n <div class=\"text-gray-900 border-t border-gray-300 px-4 py-2 text-sm\">\n <span class=\"count font-extrabold text-primary\">{{ count }}</span\n >&nbsp;<span translate>table.object.count</span>.\n </div>\n</div>\n", styles: ["table{width:100%;background:#fff}th.mat-mdc-header-cell,td.mat-mdc-cell,td.mat-mdc-footer-cell{padding-right:20px}tr.mat-mdc-row,tr.mat-mdc-footer-row{height:36px}tr:hover{background:#f5f5f5}tr.mat-mdc-header-row{height:48px}[mat-header-cell]{color:#0000008a;font-size:12px;font-weight:500}tr{cursor:pointer}.active .mat-mdc-cell{color:var(--color-primary)}\n"], dependencies: [{ kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i2.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i2.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: TableVirtualScrollModule }, { kind: "directive", type: i3.TableItemSizeDirective, selector: "cdk-virtual-scroll-viewport[tvsItemSize]", inputs: ["tvsItemSize", "headerEnabled", "headerHeight", "footerEnabled", "footerHeight", "bufferMultiplier"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "component", type: i4.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "directive", type: i5.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
40
- }
41
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TableComponent, decorators: [{
42
- type: Component,
43
- args: [{ standalone: true, imports: [
44
- MatTableModule,
45
- MatSortModule,
46
- TableVirtualScrollModule,
47
- ScrollingModule,
48
- NgForOf,
49
- TranslateModule,
50
- ], selector: 'gn-ui-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"border border-gray-300 rounded-lg overflow-hidden bg-white h-full\">\n <cdk-virtual-scroll-viewport\n tvsItemSize=\"48\"\n headerHeight=\"56\"\n style=\"height: calc(100% - 37px)\"\n >\n <table mat-table [dataSource]=\"dataSource\" class=\"mat-elevation-z8\" matSort>\n <ng-container *ngFor=\"let prop of properties\" [matColumnDef]=\"prop\">\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header\n class=\"text-sm text-black bg-white\"\n >\n {{ prop }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n class=\"whitespace-nowrap pr-1 truncate\"\n >\n {{ element[prop] }}\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"properties; sticky: true\"></tr>\n <tr\n [id]=\"getRowEltId(row.id)\"\n mat-row\n *matRowDef=\"let row; columns: properties\"\n (click)=\"selected.emit(row)\"\n [class.active]=\"row.id === activeId\"\n ></tr>\n </table>\n </cdk-virtual-scroll-viewport>\n <div class=\"text-gray-900 border-t border-gray-300 px-4 py-2 text-sm\">\n <span class=\"count font-extrabold text-primary\">{{ count }}</span\n >&nbsp;<span translate>table.object.count</span>.\n </div>\n</div>\n", styles: ["table{width:100%;background:#fff}th.mat-mdc-header-cell,td.mat-mdc-cell,td.mat-mdc-footer-cell{padding-right:20px}tr.mat-mdc-row,tr.mat-mdc-footer-row{height:36px}tr:hover{background:#f5f5f5}tr.mat-mdc-header-row{height:48px}[mat-header-cell]{color:#0000008a;font-size:12px;font-weight:500}tr{cursor:pointer}.active .mat-mdc-cell{color:var(--color-primary)}\n"] }]
51
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { data: [{
52
- type: Input
53
- }], activeId: [{
54
- type: Input
55
- }], selected: [{
56
- type: Output
57
- }], sort: [{
58
- type: ViewChild,
59
- args: [MatSort, { static: true }]
60
- }] } });
61
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFibGUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy91aS9kYXRhdml6L3NyYy9saWIvdGFibGUvdGFibGUuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy91aS9kYXRhdml6L3NyYy9saWIvdGFibGUvdGFibGUu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VwicHJvcGVydGllczsgc3RpY2t5OiB0cnVlXCI+PC90cj5cbiAgICAgIDx0clxuICAgICAgICBbaWRdPVwiZ2V0Um93RWx0SWQocm93LmlkKVwiXG4gICAgICAgIG1hdC1yb3dcbiAgICAgICAgKm1hdFJvd0RlZj1cImxldCByb3c7IGNvbHVtbnM6IHByb3BlcnRpZXNcIlxuICAgICAgICAoY2xpY2spPVwic2VsZWN0ZWQuZW1pdChyb3cpXCJcbiAgICAgICAgW2NsYXNzLmFjdGl2ZV09XCJyb3cuaWQgPT09IGFjdGl2ZUlkXCJcbiAgICAgID48L3RyPlxuICAgIDwvdGFibGU+XG4gIDwvY2RrLXZpcnR1YWwtc2Nyb2xsLXZpZXdwb3J0PlxuICA8ZGl2IGNsYXNzPVwidGV4dC1ncmF5LTkwMCBib3JkZXItdCBib3JkZXItZ3JheS0zMDAgcHgtNCBweS0yIHRleHQtc21cIj5cbiAgICA8c3BhbiBjbGFzcz1cImNvdW50IGZvbnQtZXh0cmFib2xkIHRleHQtcHJpbWFyeVwiPnt7IGNvdW50IH19PC9zcGFuXG4gICAgPiZuYnNwOzxzcGFuIHRyYW5zbGF0ZT50YWJsZS5vYmplY3QuY291bnQ8L3NwYW4+LlxuICA8L2Rpdj5cbjwvZGl2PlxuIl19
@@ -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
- export const someHabTableItemFixture = () => [
19
- {
20
- name: 'France',
21
- id: '1',
22
- pop: 50500000,
23
- },
24
- {
25
- name: 'Italy',
26
- id: '2',
27
- pop: 155878789655,
28
- },
29
- {
30
- name: 'UK',
31
- id: '3',
32
- pop: 31522456,
33
- },
34
- {
35
- name: 'US',
36
- id: '4',
37
- pop: 3215448888,
38
- },
39
- ];
40
-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0NBQ0YsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjb25zdCB0YWJsZUl0ZW1GaXh0dXJlID0gKCkgPT4gW1xuICB7XG4gICAgbmFtZTogJ25hbWUgMScsXG4gICAgaWQ6ICdpZCAxJyxcbiAgICBhZ2U6IDE1LFxuICB9LFxuICB7XG4gICAgbmFtZTogJ25hbWUgMicsXG4gICAgaWQ6ICdpZCAyJyxcbiAgICBhZ2U6IDEwLFxuICB9LFxuICB7XG4gICAgbmFtZTogJ25hbWUgMycsXG4gICAgaWQ6ICdpZCAzJyxcbiAgICBhZ2U6IDU1LFxuICB9LFxuXVxuXG5leHBvcnQgY29uc3Qgc29tZUhhYlRhYmxlSXRlbUZpeHR1cmUgPSAoKSA9PiBbXG4gIHtcbiAgICBuYW1lOiAnRnJhbmNlJyxcbiAgICBpZDogJzEnLFxuICAgIHBvcDogNTA1MDAwMDAsXG4gIH0sXG4gIHtcbiAgICBuYW1lOiAnSXRhbHknLFxuICAgIGlkOiAnMicsXG4gICAgcG9wOiAxNTU4Nzg3ODk2NTUsXG4gIH0sXG4gIHtcbiAgICBuYW1lOiAnVUsnLFxuICAgIGlkOiAnMycsXG4gICAgcG9wOiAzMTUyMjQ1NixcbiAgfSxcbiAge1xuICAgIG5hbWU6ICdVUycsXG4gICAgaWQ6ICc0JyxcbiAgICBwb3A6IDMyMTU0NDg4ODgsXG4gIH0sXG5dXG4iXX0=
@@ -1,29 +0,0 @@
1
- import { AfterViewInit, ElementRef, EventEmitter } from '@angular/core';
2
- import { MatSort } from '@angular/material/sort';
3
- import { TableVirtualScrollDataSource } from 'ng-table-virtual-scroll';
4
- import * as i0 from "@angular/core";
5
- export type TableItemId = string | number;
6
- type TableItemType = string | number | Date;
7
- export interface TableItemModel {
8
- id: TableItemId;
9
- [key: string]: TableItemType;
10
- }
11
- export declare class TableComponent implements AfterViewInit {
12
- private eltRef;
13
- set data(value: TableItemModel[]);
14
- activeId: TableItemId;
15
- selected: EventEmitter<any>;
16
- sort: MatSort;
17
- properties: string[];
18
- dataSource: TableVirtualScrollDataSource<any>;
19
- headerHeight: number;
20
- count: number;
21
- constructor(eltRef: ElementRef);
22
- ngAfterViewInit(): void;
23
- scrollToItem(itemId: TableItemId): void;
24
- getRowEltId(id: TableItemId): string;
25
- static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
26
- static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "gn-ui-table", never, { "data": { "alias": "data"; "required": false; }; "activeId": { "alias": "activeId"; "required": false; }; }, { "selected": "selected"; }, never, never, true, never>;
27
- }
28
- export {};
29
- //# sourceMappingURL=table.component.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"table.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/dataviz/src/lib/table/table.component.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,aAAa,EAGb,UAAU,EACV,YAAY,EAIb,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,OAAO,EAAiB,MAAM,wBAAwB,CAAA;AAE/D,OAAO,EACL,4BAA4B,EAE7B,MAAM,yBAAyB,CAAA;;AAKhC,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,CAAA;AACzC,KAAK,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;AAE3C,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,WAAW,CAAA;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAA;CAC7B;AAED,qBAea,cAAe,YAAW,aAAa;IAiBtC,OAAO,CAAC,MAAM;IAhB1B,IAAa,IAAI,CAAC,KAAK,EAAE,cAAc,EAAE,EAMxC;IACQ,QAAQ,EAAE,WAAW,CAAA;IACpB,QAAQ,oBAA0B;IAEN,IAAI,EAAE,OAAO,CAAA;IACnD,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,UAAU,EAAE,4BAA4B,CAAC,GAAG,CAAC,CAAA;IAC7C,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;gBAEO,MAAM,EAAE,UAAU;IAEtC,eAAe;IAKf,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAOhC,WAAW,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM;yCA/BhC,cAAc;2CAAd,cAAc;CAkC1B"}
@@ -1,11 +0,0 @@
1
- export declare const tableItemFixture: () => {
2
- name: string;
3
- id: string;
4
- age: number;
5
- }[];
6
- export declare const someHabTableItemFixture: () => {
7
- name: string;
8
- id: string;
9
- pop: number;
10
- }[];
11
- //# sourceMappingURL=table.fixtures.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"table.fixtures.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/dataviz/src/lib/table/table.fixtures.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;GAgB5B,CAAA;AAED,eAAO,MAAM,uBAAuB;;;;GAqBnC,CAAA"}
@@ -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
- ]