geonetwork-ui 2.4.2 → 2.4.4-dev.9094d472a

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 (188) 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/chart-view/chart-view.component.mjs +7 -4
  4. package/esm2022/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.mjs +18 -16
  5. package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +24 -14
  6. package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +16 -18
  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 +4 -3
  9. package/esm2022/libs/feature/record/src/lib/feature-record.module.mjs +6 -7
  10. package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +3 -2
  11. package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +8 -1
  12. package/esm2022/libs/feature/search/src/lib/utils/service/fields.mjs +46 -1
  13. package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +3 -2
  14. package/esm2022/libs/ui/dataviz/src/index.mjs +3 -3
  15. package/esm2022/libs/ui/dataviz/src/lib/data-table/custom.mat.paginator.intl.mjs +51 -0
  16. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.component.mjs +133 -0
  17. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.data.source.mjs +24 -0
  18. package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.mjs +82 -0
  19. package/esm2022/libs/ui/elements/src/index.mjs +2 -1
  20. package/esm2022/libs/ui/elements/src/lib/application-banner/application-banner.component.mjs +78 -0
  21. package/esm2022/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.mjs +3 -3
  22. package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +18 -10
  23. package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +2 -1
  24. package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +10 -4
  25. package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +7 -2
  26. package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +14 -12
  27. package/esm2022/libs/util/data-fetcher/src/index.mjs +3 -1
  28. package/esm2022/libs/util/data-fetcher/src/lib/data-fetcher.mjs +5 -4
  29. package/esm2022/libs/util/data-fetcher/src/lib/model.mjs +7 -3
  30. package/esm2022/libs/util/data-fetcher/src/lib/readers/base-cache.mjs +12 -0
  31. package/esm2022/libs/util/data-fetcher/src/lib/readers/base-file.mjs +3 -3
  32. package/esm2022/libs/util/data-fetcher/src/lib/readers/base.mjs +1 -1
  33. package/esm2022/libs/util/data-fetcher/src/lib/readers/csv.mjs +2 -2
  34. package/esm2022/libs/util/data-fetcher/src/lib/readers/excel.mjs +2 -2
  35. package/esm2022/libs/util/data-fetcher/src/lib/readers/geojson.mjs +2 -2
  36. package/esm2022/libs/util/data-fetcher/src/lib/readers/gml.mjs +5 -3
  37. package/esm2022/libs/util/data-fetcher/src/lib/readers/json.mjs +2 -2
  38. package/esm2022/libs/util/data-fetcher/src/lib/readers/wfs.mjs +35 -9
  39. package/esm2022/libs/util/data-fetcher/src/lib/utils.mjs +14 -10
  40. package/esm2022/libs/util/shared/src/lib/services/date.service.mjs +41 -0
  41. package/esm2022/libs/util/shared/src/lib/services/index.mjs +2 -1
  42. package/esm2022/libs/util/shared/src/lib/utils/temporal-extent-union.mjs +4 -4
  43. package/esm2022/translations/de.json +6 -0
  44. package/esm2022/translations/en.json +6 -0
  45. package/esm2022/translations/es.json +6 -0
  46. package/esm2022/translations/fr.json +6 -0
  47. package/esm2022/translations/it.json +7 -0
  48. package/esm2022/translations/nl.json +6 -0
  49. package/esm2022/translations/pt.json +6 -0
  50. package/fesm2022/geonetwork-ui.mjs +957 -485
  51. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  52. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts +2 -1
  53. package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
  54. package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
  55. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +2 -1
  56. package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
  57. package/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.d.ts +7 -9
  58. package/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.d.ts.map +1 -1
  59. package/libs/feature/dataviz/src/lib/service/data.service.d.ts +2 -2
  60. package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
  61. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +5 -7
  62. package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
  63. package/libs/feature/editor/src/lib/components/wizard-summarize/wizard-summarize.component.d.ts +3 -3
  64. package/libs/feature/editor/src/lib/components/wizard-summarize/wizard-summarize.component.d.ts.map +1 -1
  65. package/libs/feature/record/src/lib/data-view/data-view.component.d.ts +1 -0
  66. package/libs/feature/record/src/lib/data-view/data-view.component.d.ts.map +1 -1
  67. package/libs/feature/record/src/lib/feature-record.module.d.ts +2 -2
  68. package/libs/feature/record/src/lib/feature-record.module.d.ts.map +1 -1
  69. package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
  70. package/libs/feature/record/src/lib/state/mdview.facade.d.ts +1 -0
  71. package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
  72. package/libs/feature/search/src/lib/utils/service/fields.d.ts +10 -0
  73. package/libs/feature/search/src/lib/utils/service/fields.d.ts.map +1 -1
  74. package/libs/feature/search/src/lib/utils/service/fields.service.d.ts.map +1 -1
  75. package/libs/ui/dataviz/src/index.d.ts +2 -2
  76. package/libs/ui/dataviz/src/index.d.ts.map +1 -1
  77. package/libs/ui/dataviz/src/lib/data-table/custom.mat.paginator.intl.d.ts +14 -0
  78. package/libs/ui/dataviz/src/lib/data-table/custom.mat.paginator.intl.d.ts.map +1 -0
  79. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts +45 -0
  80. package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts.map +1 -0
  81. package/libs/ui/dataviz/src/lib/data-table/data-table.data.source.d.ts +12 -0
  82. package/libs/ui/dataviz/src/lib/data-table/data-table.data.source.d.ts.map +1 -0
  83. package/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.d.ts +10 -0
  84. package/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.d.ts.map +1 -0
  85. package/libs/ui/elements/src/index.d.ts +1 -0
  86. package/libs/ui/elements/src/index.d.ts.map +1 -1
  87. package/libs/ui/elements/src/lib/application-banner/application-banner.component.d.ts +16 -0
  88. package/libs/ui/elements/src/lib/application-banner/application-banner.component.d.ts.map +1 -0
  89. package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts +5 -0
  90. package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts.map +1 -1
  91. package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts.map +1 -1
  92. package/libs/ui/elements/src/lib/ui-elements.module.d.ts +2 -1
  93. package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
  94. package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts.map +1 -1
  95. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +3 -2
  96. package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
  97. package/libs/util/data-fetcher/src/index.d.ts +3 -1
  98. package/libs/util/data-fetcher/src/index.d.ts.map +1 -1
  99. package/libs/util/data-fetcher/src/lib/data-fetcher.d.ts +2 -2
  100. package/libs/util/data-fetcher/src/lib/data-fetcher.d.ts.map +1 -1
  101. package/libs/util/data-fetcher/src/lib/model.d.ts +1 -1
  102. package/libs/util/data-fetcher/src/lib/model.d.ts.map +1 -1
  103. package/libs/util/data-fetcher/src/lib/readers/base-cache.d.ts +8 -0
  104. package/libs/util/data-fetcher/src/lib/readers/base-cache.d.ts.map +1 -0
  105. package/libs/util/data-fetcher/src/lib/readers/base-file.d.ts +2 -2
  106. package/libs/util/data-fetcher/src/lib/readers/base-file.d.ts.map +1 -1
  107. package/libs/util/data-fetcher/src/lib/readers/base.d.ts +2 -2
  108. package/libs/util/data-fetcher/src/lib/readers/base.d.ts.map +1 -1
  109. package/libs/util/data-fetcher/src/lib/readers/gml.d.ts +5 -3
  110. package/libs/util/data-fetcher/src/lib/readers/gml.d.ts.map +1 -1
  111. package/libs/util/data-fetcher/src/lib/readers/wfs.d.ts +7 -4
  112. package/libs/util/data-fetcher/src/lib/readers/wfs.d.ts.map +1 -1
  113. package/libs/util/data-fetcher/src/lib/utils.d.ts +2 -2
  114. package/libs/util/data-fetcher/src/lib/utils.d.ts.map +1 -1
  115. package/libs/util/shared/src/lib/services/date.service.d.ts +13 -0
  116. package/libs/util/shared/src/lib/services/date.service.d.ts.map +1 -0
  117. package/libs/util/shared/src/lib/services/index.d.ts +1 -0
  118. package/libs/util/shared/src/lib/services/index.d.ts.map +1 -1
  119. package/libs/util/shared/src/lib/utils/temporal-extent-union.d.ts +2 -1
  120. package/libs/util/shared/src/lib/utils/temporal-extent-union.d.ts.map +1 -1
  121. package/package.json +1 -1
  122. package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +33 -16
  123. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +1 -5
  124. package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +4 -1
  125. package/src/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.html +3 -3
  126. package/src/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.ts +17 -15
  127. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +43 -20
  128. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.html +4 -3
  129. package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +10 -18
  130. package/src/libs/feature/editor/src/lib/components/wizard-summarize/wizard-summarize.component.ts +3 -4
  131. package/src/libs/feature/record/src/lib/data-view/data-view.component.html +3 -1
  132. package/src/libs/feature/record/src/lib/data-view/data-view.component.ts +3 -0
  133. package/src/libs/feature/record/src/lib/feature-record.module.ts +6 -4
  134. package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +2 -1
  135. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +13 -0
  136. package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +2 -0
  137. package/src/libs/feature/search/src/lib/utils/service/fields.ts +55 -0
  138. package/src/libs/ui/dataviz/src/index.ts +2 -2
  139. package/src/libs/ui/dataviz/src/lib/data-table/custom.mat.paginator.intl.ts +52 -0
  140. package/src/libs/ui/dataviz/src/lib/{table/table.component.css → data-table/data-table.component.css} +4 -0
  141. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.html +67 -0
  142. package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.ts +173 -0
  143. package/src/libs/ui/dataviz/src/lib/data-table/data-table.data.source.ts +33 -0
  144. package/src/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.ts +84 -0
  145. package/src/libs/ui/elements/src/index.ts +1 -0
  146. package/src/libs/ui/elements/src/lib/application-banner/application-banner.component.css +0 -0
  147. package/src/libs/ui/elements/src/lib/application-banner/application-banner.component.html +25 -0
  148. package/src/libs/ui/elements/src/lib/application-banner/application-banner.component.ts +70 -0
  149. package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.ts +2 -2
  150. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +3 -3
  151. package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +12 -2
  152. package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts +2 -0
  153. package/src/libs/ui/elements/src/lib/ui-elements.module.ts +3 -0
  154. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +6 -0
  155. package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +4 -2
  156. package/src/libs/util/data-fetcher/src/index.ts +3 -0
  157. package/src/libs/util/data-fetcher/src/lib/data-fetcher.ts +13 -4
  158. package/src/libs/util/data-fetcher/src/lib/model.ts +6 -2
  159. package/src/libs/util/data-fetcher/src/lib/readers/base-cache.ts +14 -0
  160. package/src/libs/util/data-fetcher/src/lib/readers/base-file.ts +2 -1
  161. package/src/libs/util/data-fetcher/src/lib/readers/base.ts +2 -2
  162. package/src/libs/util/data-fetcher/src/lib/readers/csv.ts +1 -1
  163. package/src/libs/util/data-fetcher/src/lib/readers/excel.ts +1 -1
  164. package/src/libs/util/data-fetcher/src/lib/readers/geojson.ts +1 -1
  165. package/src/libs/util/data-fetcher/src/lib/readers/gml.ts +7 -7
  166. package/src/libs/util/data-fetcher/src/lib/readers/json.ts +1 -1
  167. package/src/libs/util/data-fetcher/src/lib/readers/wfs.ts +53 -8
  168. package/src/libs/util/data-fetcher/src/lib/utils.ts +38 -32
  169. package/src/libs/util/shared/src/lib/services/date.service.ts +45 -0
  170. package/src/libs/util/shared/src/lib/services/index.ts +1 -0
  171. package/src/libs/util/shared/src/lib/utils/temporal-extent-union.ts +6 -3
  172. package/translations/de.json +6 -0
  173. package/translations/en.json +6 -0
  174. package/translations/es.json +6 -0
  175. package/translations/fr.json +6 -0
  176. package/translations/it.json +7 -0
  177. package/translations/nl.json +6 -0
  178. package/translations/pt.json +6 -0
  179. package/translations/sk.json +6 -0
  180. package/esm2022/libs/ui/dataviz/src/lib/table/table.component.mjs +0 -61
  181. package/esm2022/libs/ui/dataviz/src/lib/table/table.fixtures.mjs +0 -40
  182. package/libs/ui/dataviz/src/lib/table/table.component.d.ts +0 -29
  183. package/libs/ui/dataviz/src/lib/table/table.component.d.ts.map +0 -1
  184. package/libs/ui/dataviz/src/lib/table/table.fixtures.d.ts +0 -11
  185. package/libs/ui/dataviz/src/lib/table/table.fixtures.d.ts.map +0 -1
  186. package/src/libs/ui/dataviz/src/lib/table/table.component.html +0 -40
  187. package/src/libs/ui/dataviz/src/lib/table/table.component.ts +0 -80
  188. package/src/libs/ui/dataviz/src/lib/table/table.fixtures.ts +0 -40
@@ -24,6 +24,6 @@ export function parseGeojson(text: string): {
24
24
 
25
25
  export class GeojsonReader extends BaseFileReader {
26
26
  getData() {
27
- return fetchDataAsText(this.url).then(parseGeojson)
27
+ return fetchDataAsText(this.url, this.cacheActive).then(parseGeojson)
28
28
  }
29
29
  }
@@ -37,17 +37,17 @@ export function parseGml(
37
37
  }
38
38
 
39
39
  export class GmlReader extends BaseFileReader {
40
- namespace: string
41
- version: WfsVersion
42
-
43
- constructor(url, namespace, version) {
40
+ constructor(
41
+ protected url: string,
42
+ protected namespace: string,
43
+ protected version: WfsVersion,
44
+ protected cacheActive = true
45
+ ) {
44
46
  super(url)
45
- this.namespace = namespace
46
- this.version = version
47
47
  }
48
48
 
49
49
  protected getData() {
50
- return fetchDataAsText(this.url).then((text) =>
50
+ return fetchDataAsText(this.url, this.cacheActive).then((text) =>
51
51
  parseGml(text, this.namespace, this.version)
52
52
  )
53
53
  }
@@ -23,6 +23,6 @@ export function parseJson(text: string): {
23
23
 
24
24
  export class JsonReader extends BaseFileReader {
25
25
  getData() {
26
- return fetchDataAsText(this.url).then(parseJson)
26
+ return fetchDataAsText(this.url, this.cacheActive).then(parseJson)
27
27
  }
28
28
  }
@@ -1,24 +1,46 @@
1
1
  import { WfsEndpoint, WfsVersion } from '@camptocamp/ogc-client'
2
2
  import { DataItem, DatasetInfo, PropertyInfo } from '../model'
3
3
  import { fetchDataAsText } from '../utils'
4
- import { BaseReader } from './base'
5
4
  import { GmlReader, parseGml } from './gml'
6
5
  import { GeojsonReader, parseGeojson } from './geojson'
6
+ import { BaseCacheReader } from './base-cache'
7
+ import { getJsonDataItemsProxy, jsonToGeojsonFeature } from '../utils'
8
+ import { generateSqlQuery } from '../sql-utils'
7
9
 
8
- export class WfsReader extends BaseReader {
10
+ export class WfsReader extends BaseCacheReader {
9
11
  endpoint: WfsEndpoint
10
12
  featureTypeName: string
11
13
  version: WfsVersion
12
14
 
13
- constructor(url: string, wfsEndpoint: WfsEndpoint, featureTypeName: string) {
14
- super(url)
15
+ constructor(
16
+ url: string,
17
+ wfsEndpoint: WfsEndpoint,
18
+ featureTypeName: string,
19
+ cacheActive?: boolean
20
+ ) {
21
+ super(url, cacheActive)
15
22
  this.endpoint = wfsEndpoint
16
23
  this.featureTypeName = featureTypeName
17
24
  this.version = this.endpoint.getVersion()
18
25
  }
19
26
 
20
27
  get properties(): Promise<PropertyInfo[]> {
21
- return this.getData().then((result) => result.properties)
28
+ return this.endpoint
29
+ .getFeatureTypeFull(this.featureTypeName)
30
+ .then((featureType) =>
31
+ Object.keys(featureType.properties).map((prop) => {
32
+ const originalType = featureType.properties[prop]
33
+ const type =
34
+ originalType === 'float' || originalType === 'integer'
35
+ ? 'number'
36
+ : (originalType as PropertyInfo['type']) // FIXME: ogc-client typing is incorrect, should be a string union
37
+ return {
38
+ name: prop,
39
+ label: prop,
40
+ type,
41
+ }
42
+ })
43
+ )
22
44
  }
23
45
 
24
46
  get info(): Promise<DatasetInfo> {
@@ -74,13 +96,18 @@ export class WfsReader extends BaseReader {
74
96
  }
75
97
  }
76
98
 
77
- protected getData() {
99
+ public async getData(aggregation?, groupedBy?) {
100
+ if (aggregation || groupedBy) {
101
+ return { items: await this.getQueryData() }
102
+ }
78
103
  const asJson = this.endpoint.supportsJson(this.featureTypeName)
104
+ const attributes = this.selected ?? undefined
79
105
  let url = this.endpoint.getFeatureUrl(this.featureTypeName, {
80
106
  ...(this.startIndex !== null && { startIndex: this.startIndex }),
81
107
  ...(this.count !== null && { maxFeatures: this.count }),
82
108
  asJson,
83
109
  outputCrs: 'EPSG:4326',
110
+ attributes,
84
111
  // sortBy: this.sort // TODO: no sort in ogc-client?
85
112
  })
86
113
 
@@ -95,18 +122,36 @@ export class WfsReader extends BaseReader {
95
122
  url = `${url}${finalUrl.search ? '&' : ''}SORTBY=${sorts}`
96
123
  }
97
124
 
98
- return fetchDataAsText(url).then((text) =>
125
+ return fetchDataAsText(url, this.cacheActive).then((text) =>
99
126
  asJson
100
127
  ? parseGeojson(text)
101
128
  : parseGml(text, this.featureTypeName, this.version)
102
129
  )
103
130
  }
104
131
 
132
+ public async getQueryData() {
133
+ const items = (await this.getData()).items
134
+ const jsonItems = getJsonDataItemsProxy(items)
135
+ const query = generateSqlQuery(
136
+ this.selected,
137
+ this.filter,
138
+ this.sort,
139
+ this.startIndex,
140
+ this.count,
141
+ this.groupedBy,
142
+ this.aggregations
143
+ )
144
+ const result = await import('alasql').then((module) =>
145
+ module.default(query, [jsonItems])
146
+ )
147
+ return result.map(jsonToGeojsonFeature)
148
+ }
149
+
105
150
  load() {
106
151
  // Nothing to load for Wfs
107
152
  }
108
153
 
109
154
  async read(): Promise<DataItem[]> {
110
- return (await this.getData()).items
155
+ return (await this.getData(this.aggregations, this.groupedBy)).items
111
156
  }
112
157
  }
@@ -51,39 +51,45 @@ export function fetchHeaders(url: string): Promise<DatasetHeaders> {
51
51
  })
52
52
  }
53
53
 
54
- export function fetchDataAsText(url: string): Promise<string> {
55
- return useCache(
56
- () =>
57
- sharedFetch(url)
58
- .catch((error) => {
59
- throw FetchError.corsOrNetwork(error.message)
60
- })
61
- .then(async (response) => {
62
- if (!response.ok) {
63
- throw FetchError.http(response.status)
64
- }
65
- return response.text()
66
- }),
67
- url,
68
- 'asText'
69
- )
54
+ export function fetchDataAsText(
55
+ url: string,
56
+ cacheActive: boolean
57
+ ): Promise<string> {
58
+ const fetchFactory = () =>
59
+ sharedFetch(url)
60
+ .catch((error) => {
61
+ throw FetchError.corsOrNetwork(error.message)
62
+ })
63
+ .then(async (response) => {
64
+ if (!response.ok) {
65
+ const clonedResponse = response.clone()
66
+ throw FetchError.http(response.status, await clonedResponse.text())
67
+ }
68
+ const clonedResponse = response.clone()
69
+ return clonedResponse.text()
70
+ })
71
+
72
+ return cacheActive ? useCache(fetchFactory, url, 'asText') : fetchFactory()
70
73
  }
71
- export function fetchDataAsArrayBuffer(url: string): Promise<ArrayBuffer> {
72
- return useCache(
73
- () =>
74
- sharedFetch(url)
75
- .catch((error) => {
76
- throw FetchError.corsOrNetwork(error.message)
77
- })
78
- .then(async (response) => {
79
- if (!response.ok) {
80
- throw FetchError.http(response.status)
81
- }
82
- // convert to a numeric array so that we can store the response in cache
83
- return Array.from(new Uint8Array(await response.arrayBuffer()))
84
- }),
85
- url,
86
- 'asArrayBuffer'
74
+ export function fetchDataAsArrayBuffer(
75
+ url: string,
76
+ cacheActive: boolean
77
+ ): Promise<ArrayBuffer> {
78
+ const fetchFactory = () =>
79
+ sharedFetch(url)
80
+ .catch((error) => {
81
+ throw FetchError.corsOrNetwork(error.message)
82
+ })
83
+ .then(async (response) => {
84
+ if (!response.ok) {
85
+ throw FetchError.http(response.status, await response.text())
86
+ }
87
+ // convert to a numeric array so that we can store the response in cache
88
+ return Array.from(new Uint8Array(await response.arrayBuffer()))
89
+ })
90
+
91
+ return (
92
+ cacheActive ? useCache(fetchFactory, url, 'asArrayBuffer') : fetchFactory()
87
93
  ).then((array) => {
88
94
  return new Uint8Array(array).buffer
89
95
  })
@@ -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",
@@ -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",
@@ -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": "",
@@ -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",
@@ -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": "",
@@ -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": "",
@@ -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",
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFibGUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy91aS9kYXRhdml6L3NyYy9saWIvdGFibGUvdGFibGUuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy91aS9kYXRhdml6L3NyYy9saWIvdGFibGUvdGFibGUuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLHdCQUF3QixDQUFBO0FBQ3hELE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQTtBQUN6QyxPQUFPLEVBRUwsdUJBQXVCLEVBQ3ZCLFNBQVMsRUFDVCxVQUFVLEVBQ1YsWUFBWSxFQUNaLEtBQUssRUFDTCxNQUFNLEVBQ04sU0FBUyxHQUNWLE1BQU0sZUFBZSxDQUFBO0FBQ3RCLE9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BbZGF0YVNvdXJjZV09XCJkYXRhU291cmNlXCIgY2xhc3M9XCJtYXQtZWxldmF0aW9uLXo4XCIgbWF0U29ydD5cbiAgICAgIDxuZy1jb250YWluZXIgKm5nRm9yPVwibGV0IHByb3Agb2YgcHJvcGVydGllc1wiIFttYXRDb2x1bW5EZWZdPVwicHJvcFwiPlxuICAgICAgICA8dGhcbiAgICAgICAgICBtYXQtaGVhZGVyLWNlbGxcbiAgICAgICAgICAqbWF0SGVhZGVyQ2VsbERlZlxuICAgICAgICAgIG1hdC1zb3J0LWhlYWRlclxuICAgICAgICAgIGNsYXNzPVwidGV4dC1zbSB0ZXh0LWJsYWNrIGJnLXdoaXRlXCJcbiAgICAgICAgPlxuICAgICAgICAgIHt7IHByb3AgfX1cbiAgICAgICAgPC90aD5cbiAgICAgICAgPHRkXG4gICAgICAgICAgbWF0LWNlbGxcbiAgICAgICAgICAqbWF0Q2VsbERlZj1cImxldCBlbGVtZW50XCJcbiAgICAgICAgICBjbGFzcz1cIndoaXRlc3BhY2Utbm93cmFwIHByLTEgdHJ1bmNhdGVcIlxuICAgICAgICA+XG4gICAgICAgICAge3sgZWxlbWVudFtwcm9wXSB9fVxuICAgICAgICA8L3RkPlxuICAgICAgPC9uZy1jb250YWluZXI+XG5cbiAgICAgIDx0ciBtYXQtaGVhZGVyLXJvdyAqbWF0SGVhZGVyUm93RGVmPVwicHJvcGVydGllczsgc3RpY2t5OiB0cnVlXCI+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
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFibGUuZml4dHVyZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3VpL2RhdGF2aXovc3JjL2xpYi90YWJsZS90YWJsZS5maXh0dXJlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQUMsTUFBTSxnQkFBZ0IsR0FBRyxHQUFHLEVBQUUsQ0FBQztJQUNwQztRQUNFLElBQUksRUFBRSxRQ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DU1LFxuICB9LFxuXVxuXG5leHBvcnQgY29uc3Qgc29tZUhhYlRhYmxlSXRlbUZpeHR1cmUgPSAoKSA9PiBbXG4gIHtcbiAgICBuYW1lOiAnRnJhbmNlJyxcbiAgICBpZDogJzEnLFxuICAgIHBvcDogNTA1MDAwMDAsXG4gIH0sXG4gIHtcbiAgICBuYW1lOiAnSXRhbHknLFxuICAgIGlkOiAnMicsXG4gICAgcG9wOiAxNTU4Nzg3ODk2NTUsXG4gIH0sXG4gIHtcbiAgICBuYW1lOiAnVUsnLFxuICAgIGlkOiAnMycsXG4gICAgcG9wOiAzMTUyMjQ1NixcbiAgfSxcbiAge1xuICAgIG5hbWU6ICdVUycsXG4gICAgaWQ6ICc0JyxcbiAgICBwb3A6IDMyMTU0NDg4ODgsXG4gIH0sXG5dXG4iXX0=
@@ -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"}