geonetwork-ui 2.4.3 → 2.4.4
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.
- package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +7 -4
- package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +8 -8
- package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +7 -4
- package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +4 -3
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +3 -2
- package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +8 -1
- package/esm2022/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.mjs +3 -3
- package/esm2022/libs/util/data-fetcher/src/lib/data-fetcher.mjs +5 -4
- package/esm2022/libs/util/data-fetcher/src/lib/readers/base-cache.mjs +12 -0
- package/esm2022/libs/util/data-fetcher/src/lib/readers/base-file.mjs +3 -3
- package/esm2022/libs/util/data-fetcher/src/lib/readers/base.mjs +1 -1
- package/esm2022/libs/util/data-fetcher/src/lib/readers/csv.mjs +2 -2
- package/esm2022/libs/util/data-fetcher/src/lib/readers/excel.mjs +2 -2
- package/esm2022/libs/util/data-fetcher/src/lib/readers/geojson.mjs +2 -2
- package/esm2022/libs/util/data-fetcher/src/lib/readers/gml.mjs +5 -3
- package/esm2022/libs/util/data-fetcher/src/lib/readers/json.mjs +2 -2
- package/esm2022/libs/util/data-fetcher/src/lib/readers/wfs.mjs +19 -11
- package/esm2022/libs/util/data-fetcher/src/lib/utils.mjs +13 -9
- package/esm2022/translations/de.json +0 -1
- package/esm2022/translations/en.json +0 -1
- package/esm2022/translations/es.json +0 -1
- package/esm2022/translations/fr.json +0 -1
- package/esm2022/translations/nl.json +0 -1
- package/esm2022/translations/pt.json +0 -1
- package/fesm2022/geonetwork-ui.mjs +145 -111
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +2 -1
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts +2 -2
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +2 -1
- package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/data-view/data-view.component.d.ts +1 -0
- package/libs/feature/record/src/lib/data-view/data-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts +1 -0
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/data-fetcher.d.ts +2 -2
- package/libs/util/data-fetcher/src/lib/data-fetcher.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/readers/base-cache.d.ts +8 -0
- package/libs/util/data-fetcher/src/lib/readers/base-cache.d.ts.map +1 -0
- package/libs/util/data-fetcher/src/lib/readers/base-file.d.ts +2 -2
- package/libs/util/data-fetcher/src/lib/readers/base-file.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/readers/base.d.ts +2 -2
- package/libs/util/data-fetcher/src/lib/readers/base.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/readers/gml.d.ts +5 -3
- package/libs/util/data-fetcher/src/lib/readers/gml.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/readers/wfs.d.ts +7 -4
- package/libs/util/data-fetcher/src/lib/readers/wfs.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/utils.d.ts +2 -2
- package/libs/util/data-fetcher/src/lib/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +4 -1
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +22 -9
- package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +2 -1
- package/src/libs/feature/record/src/lib/data-view/data-view.component.html +2 -0
- package/src/libs/feature/record/src/lib/data-view/data-view.component.ts +3 -0
- package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +2 -1
- package/src/libs/feature/record/src/lib/state/mdview.facade.ts +13 -0
- package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.ts +2 -2
- package/src/libs/util/data-fetcher/src/lib/data-fetcher.ts +13 -4
- package/src/libs/util/data-fetcher/src/lib/readers/base-cache.ts +14 -0
- package/src/libs/util/data-fetcher/src/lib/readers/base-file.ts +2 -1
- package/src/libs/util/data-fetcher/src/lib/readers/base.ts +2 -2
- package/src/libs/util/data-fetcher/src/lib/readers/csv.ts +1 -1
- package/src/libs/util/data-fetcher/src/lib/readers/excel.ts +1 -1
- package/src/libs/util/data-fetcher/src/lib/readers/geojson.ts +1 -1
- package/src/libs/util/data-fetcher/src/lib/readers/gml.ts +7 -7
- package/src/libs/util/data-fetcher/src/lib/readers/json.ts +1 -1
- package/src/libs/util/data-fetcher/src/lib/readers/wfs.ts +34 -11
- package/src/libs/util/data-fetcher/src/lib/utils.ts +38 -32
- package/translations/de.json +0 -1
- package/translations/en.json +0 -1
- package/translations/es.json +0 -1
- package/translations/fr.json +0 -1
- package/translations/nl.json +0 -1
- package/translations/pt.json +0 -1
- package/translations/sk.json +0 -1
|
@@ -19203,7 +19203,6 @@ var de = {
|
|
|
19203
19203
|
"tooltip.url.open": "URL öffnen",
|
|
19204
19204
|
"ui.readLess": "Weniger lesen",
|
|
19205
19205
|
"ui.readMore": "Weiterlesen",
|
|
19206
|
-
"wfs.aggregations.notsupported": "",
|
|
19207
19206
|
"wfs.feature.limit": "Zu viele Features, um den WFS-Layer anzuzeigen!",
|
|
19208
19207
|
"wfs.featuretype.notfound": "Kein passender Feature-Typ wurde im Dienst gefunden",
|
|
19209
19208
|
"wfs.geojsongml.notsupported": "Dieser Dienst unterstützt das GeoJSON- oder GML-Format nicht",
|
|
@@ -19820,7 +19819,6 @@ var en = {
|
|
|
19820
19819
|
"tooltip.url.open": "Open URL",
|
|
19821
19820
|
"ui.readLess": "Read less",
|
|
19822
19821
|
"ui.readMore": "Read more",
|
|
19823
|
-
"wfs.aggregations.notsupported": "Aggregations are currently not supported for WFS services",
|
|
19824
19822
|
"wfs.feature.limit": "Too many features to display the WFS layer!",
|
|
19825
19823
|
"wfs.featuretype.notfound": "No matching feature type was found in the service",
|
|
19826
19824
|
"wfs.geojsongml.notsupported": "This service does not support the GeoJSON or GML format",
|
|
@@ -20437,7 +20435,6 @@ var es = {
|
|
|
20437
20435
|
"tooltip.url.open": "",
|
|
20438
20436
|
"ui.readLess": "",
|
|
20439
20437
|
"ui.readMore": "",
|
|
20440
|
-
"wfs.aggregations.notsupported": "",
|
|
20441
20438
|
"wfs.feature.limit": "",
|
|
20442
20439
|
"wfs.featuretype.notfound": "",
|
|
20443
20440
|
"wfs.geojsongml.notsupported": "",
|
|
@@ -21054,7 +21051,6 @@ var fr = {
|
|
|
21054
21051
|
"tooltip.url.open": "Ouvrir l'URL",
|
|
21055
21052
|
"ui.readLess": "Réduire",
|
|
21056
21053
|
"ui.readMore": "Lire la suite",
|
|
21057
|
-
"wfs.aggregations.notsupported": "Agrégations non supportées pour les services WFS",
|
|
21058
21054
|
"wfs.feature.limit": "Trop d'objets pour afficher la couche WFS !",
|
|
21059
21055
|
"wfs.featuretype.notfound": "La classe d'objets n'a pas été trouvée dans le service",
|
|
21060
21056
|
"wfs.geojsongml.notsupported": "Le service ne supporte pas le format GeoJSON ou GML",
|
|
@@ -22288,7 +22284,6 @@ var nl = {
|
|
|
22288
22284
|
"tooltip.url.open": "",
|
|
22289
22285
|
"ui.readLess": "",
|
|
22290
22286
|
"ui.readMore": "",
|
|
22291
|
-
"wfs.aggregations.notsupported": "",
|
|
22292
22287
|
"wfs.feature.limit": "",
|
|
22293
22288
|
"wfs.featuretype.notfound": "",
|
|
22294
22289
|
"wfs.geojsongml.notsupported": "",
|
|
@@ -22905,7 +22900,6 @@ var pt = {
|
|
|
22905
22900
|
"tooltip.url.open": "",
|
|
22906
22901
|
"ui.readLess": "",
|
|
22907
22902
|
"ui.readMore": "",
|
|
22908
|
-
"wfs.aggregations.notsupported": "",
|
|
22909
22903
|
"wfs.feature.limit": "",
|
|
22910
22904
|
"wfs.featuretype.notfound": "",
|
|
22911
22905
|
"wfs.geojsongml.notsupported": "",
|
|
@@ -28855,7 +28849,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
28855
28849
|
|
|
28856
28850
|
class MarkdownParserComponent {
|
|
28857
28851
|
get parsedMarkdown() {
|
|
28858
|
-
return marked.parse(this.textContent);
|
|
28852
|
+
return marked.parse(this.textContent ?? '');
|
|
28859
28853
|
}
|
|
28860
28854
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MarkdownParserComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
28861
28855
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MarkdownParserComponent, isStandalone: true, selector: "gn-ui-markdown-parser", inputs: { textContent: "textContent", whitoutStyles: "whitoutStyles" }, ngImport: i0, template: "<div\n [class]=\"whitoutStyles ? '' : 'markdown-body'\"\n [innerHTML]=\"parsedMarkdown\"\n></div>\n", styles: [":host ::ng-deep .markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;margin:0;line-height:1.5;word-wrap:break-word;height:100%}:host ::ng-deep .markdown-body strong{@apply font-bold;color:var(--color-secondary-darker)}:host ::ng-deep .markdown-body h1,:host ::ng-deep .markdown-body h2,:host ::ng-deep .markdown-body h3,:host ::ng-deep .markdown-body h4,:host ::ng-deep .markdown-body h5,:host ::ng-deep .markdown-body h6{margin-top:24px;margin-bottom:16px;line-height:1.25;@apply text-title font-title font-bold;}:host ::ng-deep .markdown-body :first-child{margin-top:0}:host ::ng-deep .markdown-body h1{margin:.67em 0;padding-bottom:.3em;font-size:2em;color:var(--color-primary)}:host ::ng-deep .markdown-body h2{padding-bottom:.3em;font-size:1.5em;color:var(--color-secondary)}:host ::ng-deep .markdown-body h3{font-size:1.25em;color:var(--color-secondary)}:host ::ng-deep .markdown-body h4{font-size:1em;color:var(--color-secondary)}:host ::ng-deep .markdown-body h5{font-size:.875em;color:var(--color-secondary)}:host ::ng-deep .markdown-body h6{font-size:.85em;color:var(--color-secondary-lighter)}:host ::ng-deep .markdown-body p{margin-top:0;margin-bottom:10px}:host ::ng-deep .markdown-body p>a{margin-top:0;margin-bottom:10px;color:var(--color-primary)!important;text-decoration:none}:host ::ng-deep .markdown-body p>a:hover{color:var(--color-primary-darker)!important;@apply underline;}:host ::ng-deep .markdown-body blockquote{margin:0;padding:0 1em;color:var(--color-secondary-lighter);border-left:.25em solid var(--color-primary-lighter)}:host ::ng-deep .markdown-body pre{margin-top:0;margin-bottom:0;font-size:12px;background-color:var(--color-gray-100);word-wrap:normal}:host ::ng-deep .markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;color:var(--color-secondary);border-radius:6px}:host ::ng-deep .markdown-body code{padding:.2em .4em;margin:0;font-size:85%;white-space:break-spaces;border-radius:6px}:host ::ng-deep .markdown-body pre code{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;border:0}:host ::ng-deep .markdown-body hr{box-sizing:content-box;overflow:hidden;background:transparent;border-bottom:1px solid var(--color-secondary);height:.15em;padding:0;margin:24px 0;background-color:var(--color-secondary);border:0}:host ::ng-deep .markdown-body hr:before{display:table;content:\"\"}:host ::ng-deep .markdown-body hr:after{display:table;clear:both;content:\"\"}:host ::ng-deep .markdown-body ul,:host ::ng-deep .markdown-body ol{margin-top:0;margin-bottom:0;padding-left:2em;list-style:revert}:host ::ng-deep .markdown-body ol ol,:host ::ng-deep .markdown-body ul ol{list-style-type:lower-roman}:host ::ng-deep .markdown-body ul ul ol,:host ::ng-deep .markdown-body ul ol ol,:host ::ng-deep .markdown-body ol ul ol,:host ::ng-deep .markdown-body ol ol ol{list-style-type:lower-alpha}:host ::ng-deep .markdown-body ol[type=\"a s\"]{list-style-type:lower-alpha}:host ::ng-deep .markdown-body ol[type=\"A s\"]{list-style-type:upper-alpha}:host ::ng-deep .markdown-body ol[type=\"i s\"]{list-style-type:lower-roman}:host ::ng-deep .markdown-body ol[type=\"I s\"]{list-style-type:upper-roman}:host ::ng-deep .markdown-body ol[type=\"1\"]{list-style:unset;list-style-type:decimal}:host ::ng-deep .markdown-body div>ol:not([type]){list-style:unset;list-style-type:decimal}:host ::ng-deep .markdown-body table{border-spacing:0;border-collapse:collapse;display:block;width:max-content;max-width:100%;overflow:auto;padding-bottom:15px}:host ::ng-deep .markdown-body td,:host ::ng-deep .markdown-body th{padding:0}:host ::ng-deep .markdown-body th{color:var(--color-secondary)}:host ::ng-deep .markdown-body table th,:host ::ng-deep .markdown-body table td{padding:6px 13px;border:1px solid var(--color-gray-500)}:host ::ng-deep .markdown-body table td>:last-child{margin-bottom:0}:host ::ng-deep .markdown-body table tr{background-color:#fff;border-top:1px solid var(--color-secondary-lighter)}:host ::ng-deep .markdown-body table tr:nth-child(2n){background-color:var(--color-gray-100)}:host ::ng-deep .markdown-body table img{background-color:transparent}:host ::ng-deep .markdown-body img{border-style:none;max-width:100%;box-sizing:content-box;background-color:transparent}:host ::ng-deep .markdown-body img[align=right]{padding-left:20px}:host ::ng-deep .markdown-body img[align=left]{padding-right:20px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
@@ -35435,20 +35429,23 @@ function fetchHeaders(url) {
|
|
|
35435
35429
|
return parseHeaders(response.headers);
|
|
35436
35430
|
});
|
|
35437
35431
|
}
|
|
35438
|
-
function fetchDataAsText(url) {
|
|
35439
|
-
|
|
35432
|
+
function fetchDataAsText(url, cacheActive) {
|
|
35433
|
+
const fetchFactory = () => sharedFetch(url)
|
|
35440
35434
|
.catch((error) => {
|
|
35441
35435
|
throw FetchError.corsOrNetwork(error.message);
|
|
35442
35436
|
})
|
|
35443
35437
|
.then(async (response) => {
|
|
35444
35438
|
if (!response.ok) {
|
|
35445
|
-
|
|
35439
|
+
const clonedResponse = response.clone();
|
|
35440
|
+
throw FetchError.http(response.status, await clonedResponse.text());
|
|
35446
35441
|
}
|
|
35447
|
-
|
|
35448
|
-
|
|
35442
|
+
const clonedResponse = response.clone();
|
|
35443
|
+
return clonedResponse.text();
|
|
35444
|
+
});
|
|
35445
|
+
return cacheActive ? useCache(fetchFactory, url, 'asText') : fetchFactory();
|
|
35449
35446
|
}
|
|
35450
|
-
function fetchDataAsArrayBuffer(url) {
|
|
35451
|
-
|
|
35447
|
+
function fetchDataAsArrayBuffer(url, cacheActive) {
|
|
35448
|
+
const fetchFactory = () => sharedFetch(url)
|
|
35452
35449
|
.catch((error) => {
|
|
35453
35450
|
throw FetchError.corsOrNetwork(error.message);
|
|
35454
35451
|
})
|
|
@@ -35458,7 +35455,8 @@ function fetchDataAsArrayBuffer(url) {
|
|
|
35458
35455
|
}
|
|
35459
35456
|
// convert to a numeric array so that we can store the response in cache
|
|
35460
35457
|
return Array.from(new Uint8Array(await response.arrayBuffer()));
|
|
35461
|
-
})
|
|
35458
|
+
});
|
|
35459
|
+
return (cacheActive ? useCache(fetchFactory, url, 'asArrayBuffer') : fetchFactory()).then((array) => {
|
|
35462
35460
|
return new Uint8Array(array).buffer;
|
|
35463
35461
|
});
|
|
35464
35462
|
}
|
|
@@ -35604,68 +35602,6 @@ function getJsonDataItemsProxy(items) {
|
|
|
35604
35602
|
});
|
|
35605
35603
|
}
|
|
35606
35604
|
|
|
35607
|
-
class BaseReader {
|
|
35608
|
-
constructor(url) {
|
|
35609
|
-
this.url = url;
|
|
35610
|
-
this.selected = null;
|
|
35611
|
-
this.groupedBy = null;
|
|
35612
|
-
this.aggregations = null;
|
|
35613
|
-
this.filter = null;
|
|
35614
|
-
this.sort = null;
|
|
35615
|
-
this.startIndex = null;
|
|
35616
|
-
this.count = null;
|
|
35617
|
-
}
|
|
35618
|
-
load() {
|
|
35619
|
-
throw new Error('not implemented');
|
|
35620
|
-
}
|
|
35621
|
-
get properties() {
|
|
35622
|
-
throw new Error('not implemented');
|
|
35623
|
-
}
|
|
35624
|
-
get info() {
|
|
35625
|
-
throw new Error('not implemented');
|
|
35626
|
-
}
|
|
35627
|
-
read() {
|
|
35628
|
-
throw new Error('not implemented');
|
|
35629
|
-
}
|
|
35630
|
-
selectAll() {
|
|
35631
|
-
this.groupedBy = null;
|
|
35632
|
-
this.aggregations = null;
|
|
35633
|
-
this.selected = null;
|
|
35634
|
-
this.filter = null;
|
|
35635
|
-
this.startIndex = null;
|
|
35636
|
-
this.count = null;
|
|
35637
|
-
return this;
|
|
35638
|
-
}
|
|
35639
|
-
select(...selectedFields) {
|
|
35640
|
-
this.selected = selectedFields;
|
|
35641
|
-
this.aggregations = null; // clear aggregations & groups when selecting fields
|
|
35642
|
-
this.groupedBy = null;
|
|
35643
|
-
return this;
|
|
35644
|
-
}
|
|
35645
|
-
groupBy(...groupBy) {
|
|
35646
|
-
this.groupedBy = groupBy;
|
|
35647
|
-
this.selected = null; // clear normal field selection when aggregating
|
|
35648
|
-
return this;
|
|
35649
|
-
}
|
|
35650
|
-
aggregate(...aggregations) {
|
|
35651
|
-
this.aggregations = aggregations;
|
|
35652
|
-
return this;
|
|
35653
|
-
}
|
|
35654
|
-
where(filter) {
|
|
35655
|
-
this.filter = filter;
|
|
35656
|
-
return this;
|
|
35657
|
-
}
|
|
35658
|
-
orderBy(...fieldSorts) {
|
|
35659
|
-
this.sort = fieldSorts;
|
|
35660
|
-
return this;
|
|
35661
|
-
}
|
|
35662
|
-
limit(startIndex, count) {
|
|
35663
|
-
this.startIndex = startIndex;
|
|
35664
|
-
this.count = count;
|
|
35665
|
-
return this;
|
|
35666
|
-
}
|
|
35667
|
-
}
|
|
35668
|
-
|
|
35669
35605
|
function filterToSql(filter) {
|
|
35670
35606
|
const operator = filter[0];
|
|
35671
35607
|
const args = filter.slice(1);
|
|
@@ -35759,7 +35695,80 @@ function generateSqlQuery(selected = null, filter = null, sort = null, startInde
|
|
|
35759
35695
|
return sqlSelect + sqlFrom + sqlGroupBy + sqlOrderBy + sqlWhere + sqlLimit;
|
|
35760
35696
|
}
|
|
35761
35697
|
|
|
35762
|
-
class
|
|
35698
|
+
class BaseReader {
|
|
35699
|
+
constructor(url) {
|
|
35700
|
+
this.url = url;
|
|
35701
|
+
this.selected = null;
|
|
35702
|
+
this.groupedBy = null;
|
|
35703
|
+
this.aggregations = null;
|
|
35704
|
+
this.filter = null;
|
|
35705
|
+
this.sort = null;
|
|
35706
|
+
this.startIndex = null;
|
|
35707
|
+
this.count = null;
|
|
35708
|
+
}
|
|
35709
|
+
load() {
|
|
35710
|
+
throw new Error('not implemented');
|
|
35711
|
+
}
|
|
35712
|
+
get properties() {
|
|
35713
|
+
throw new Error('not implemented');
|
|
35714
|
+
}
|
|
35715
|
+
get info() {
|
|
35716
|
+
throw new Error('not implemented');
|
|
35717
|
+
}
|
|
35718
|
+
read() {
|
|
35719
|
+
throw new Error('not implemented');
|
|
35720
|
+
}
|
|
35721
|
+
selectAll() {
|
|
35722
|
+
this.groupedBy = null;
|
|
35723
|
+
this.aggregations = null;
|
|
35724
|
+
this.selected = null;
|
|
35725
|
+
this.filter = null;
|
|
35726
|
+
this.startIndex = null;
|
|
35727
|
+
this.count = null;
|
|
35728
|
+
return this;
|
|
35729
|
+
}
|
|
35730
|
+
select(...selectedFields) {
|
|
35731
|
+
this.selected = selectedFields;
|
|
35732
|
+
this.aggregations = null; // clear aggregations & groups when selecting fields
|
|
35733
|
+
this.groupedBy = null;
|
|
35734
|
+
return this;
|
|
35735
|
+
}
|
|
35736
|
+
groupBy(...groupBy) {
|
|
35737
|
+
this.groupedBy = groupBy;
|
|
35738
|
+
this.selected = null; // clear normal field selection when aggregating
|
|
35739
|
+
return this;
|
|
35740
|
+
}
|
|
35741
|
+
aggregate(...aggregations) {
|
|
35742
|
+
this.aggregations = aggregations;
|
|
35743
|
+
return this;
|
|
35744
|
+
}
|
|
35745
|
+
where(filter) {
|
|
35746
|
+
this.filter = filter;
|
|
35747
|
+
return this;
|
|
35748
|
+
}
|
|
35749
|
+
orderBy(...fieldSorts) {
|
|
35750
|
+
this.sort = fieldSorts;
|
|
35751
|
+
return this;
|
|
35752
|
+
}
|
|
35753
|
+
limit(startIndex, count) {
|
|
35754
|
+
this.startIndex = startIndex;
|
|
35755
|
+
this.count = count;
|
|
35756
|
+
return this;
|
|
35757
|
+
}
|
|
35758
|
+
}
|
|
35759
|
+
|
|
35760
|
+
class BaseCacheReader extends BaseReader {
|
|
35761
|
+
constructor(url, cacheActive = true) {
|
|
35762
|
+
super(url);
|
|
35763
|
+
this.url = url;
|
|
35764
|
+
this.cacheActive = cacheActive;
|
|
35765
|
+
}
|
|
35766
|
+
setCacheActive(value) {
|
|
35767
|
+
this.cacheActive = value;
|
|
35768
|
+
}
|
|
35769
|
+
}
|
|
35770
|
+
|
|
35771
|
+
class BaseFileReader extends BaseCacheReader {
|
|
35763
35772
|
getData() {
|
|
35764
35773
|
throw new Error('not implemented');
|
|
35765
35774
|
}
|
|
@@ -35823,7 +35832,7 @@ function parseCsv(text) {
|
|
|
35823
35832
|
}
|
|
35824
35833
|
class CsvReader extends BaseFileReader {
|
|
35825
35834
|
getData() {
|
|
35826
|
-
return fetchDataAsText(this.url).then(parseCsv);
|
|
35835
|
+
return fetchDataAsText(this.url, this.cacheActive).then(parseCsv);
|
|
35827
35836
|
}
|
|
35828
35837
|
}
|
|
35829
35838
|
|
|
@@ -35840,7 +35849,7 @@ function parseJson(text) {
|
|
|
35840
35849
|
}
|
|
35841
35850
|
class JsonReader extends BaseFileReader {
|
|
35842
35851
|
getData() {
|
|
35843
|
-
return fetchDataAsText(this.url).then(parseJson);
|
|
35852
|
+
return fetchDataAsText(this.url, this.cacheActive).then(parseJson);
|
|
35844
35853
|
}
|
|
35845
35854
|
}
|
|
35846
35855
|
|
|
@@ -35859,7 +35868,7 @@ function parseGeojson(text) {
|
|
|
35859
35868
|
}
|
|
35860
35869
|
class GeojsonReader extends BaseFileReader {
|
|
35861
35870
|
getData() {
|
|
35862
|
-
return fetchDataAsText(this.url).then(parseGeojson);
|
|
35871
|
+
return fetchDataAsText(this.url, this.cacheActive).then(parseGeojson);
|
|
35863
35872
|
}
|
|
35864
35873
|
}
|
|
35865
35874
|
|
|
@@ -35881,7 +35890,7 @@ function parseExcel(buffer) {
|
|
|
35881
35890
|
}
|
|
35882
35891
|
class ExcelReader extends BaseFileReader {
|
|
35883
35892
|
getData() {
|
|
35884
|
-
return fetchDataAsArrayBuffer(this.url).then(parseExcel);
|
|
35893
|
+
return fetchDataAsArrayBuffer(this.url, this.cacheActive).then(parseExcel);
|
|
35885
35894
|
}
|
|
35886
35895
|
}
|
|
35887
35896
|
|
|
@@ -35908,19 +35917,21 @@ function parseGml(text, namespace, version) {
|
|
|
35908
35917
|
throw Error("Couldn't retrieve namespace url");
|
|
35909
35918
|
}
|
|
35910
35919
|
class GmlReader extends BaseFileReader {
|
|
35911
|
-
constructor(url, namespace, version) {
|
|
35920
|
+
constructor(url, namespace, version, cacheActive = true) {
|
|
35912
35921
|
super(url);
|
|
35922
|
+
this.url = url;
|
|
35913
35923
|
this.namespace = namespace;
|
|
35914
35924
|
this.version = version;
|
|
35925
|
+
this.cacheActive = cacheActive;
|
|
35915
35926
|
}
|
|
35916
35927
|
getData() {
|
|
35917
|
-
return fetchDataAsText(this.url).then((text) => parseGml(text, this.namespace, this.version));
|
|
35928
|
+
return fetchDataAsText(this.url, this.cacheActive).then((text) => parseGml(text, this.namespace, this.version));
|
|
35918
35929
|
}
|
|
35919
35930
|
}
|
|
35920
35931
|
|
|
35921
|
-
class WfsReader extends
|
|
35922
|
-
constructor(url, wfsEndpoint, featureTypeName) {
|
|
35923
|
-
super(url);
|
|
35932
|
+
class WfsReader extends BaseCacheReader {
|
|
35933
|
+
constructor(url, wfsEndpoint, featureTypeName, cacheActive) {
|
|
35934
|
+
super(url, cacheActive);
|
|
35924
35935
|
this.endpoint = wfsEndpoint;
|
|
35925
35936
|
this.featureTypeName = featureTypeName;
|
|
35926
35937
|
this.version = this.endpoint.getVersion();
|
|
@@ -35975,9 +35986,9 @@ class WfsReader extends BaseReader {
|
|
|
35975
35986
|
throw new Error('wfs.geojsongml.notsupported');
|
|
35976
35987
|
}
|
|
35977
35988
|
}
|
|
35978
|
-
getData() {
|
|
35979
|
-
if (
|
|
35980
|
-
|
|
35989
|
+
async getData(aggregation, groupedBy) {
|
|
35990
|
+
if (aggregation || groupedBy) {
|
|
35991
|
+
return { items: await this.getQueryData() };
|
|
35981
35992
|
}
|
|
35982
35993
|
const asJson = this.endpoint.supportsJson(this.featureTypeName);
|
|
35983
35994
|
const attributes = this.selected ?? undefined;
|
|
@@ -35997,19 +36008,26 @@ class WfsReader extends BaseReader {
|
|
|
35997
36008
|
// Direct update on string url to prevent encoding of +A and +D
|
|
35998
36009
|
url = `${url}${finalUrl.search ? '&' : ''}SORTBY=${sorts}`;
|
|
35999
36010
|
}
|
|
36000
|
-
return fetchDataAsText(url).then((text) => asJson
|
|
36011
|
+
return fetchDataAsText(url, this.cacheActive).then((text) => asJson
|
|
36001
36012
|
? parseGeojson(text)
|
|
36002
36013
|
: parseGml(text, this.featureTypeName, this.version));
|
|
36003
36014
|
}
|
|
36015
|
+
async getQueryData() {
|
|
36016
|
+
const items = (await this.getData()).items;
|
|
36017
|
+
const jsonItems = getJsonDataItemsProxy(items);
|
|
36018
|
+
const query = generateSqlQuery(this.selected, this.filter, this.sort, this.startIndex, this.count, this.groupedBy, this.aggregations);
|
|
36019
|
+
const result = await import('alasql').then((module) => module.default(query, [jsonItems]));
|
|
36020
|
+
return result.map(jsonToGeojsonFeature);
|
|
36021
|
+
}
|
|
36004
36022
|
load() {
|
|
36005
36023
|
// Nothing to load for Wfs
|
|
36006
36024
|
}
|
|
36007
36025
|
async read() {
|
|
36008
|
-
return (await this.getData()).items;
|
|
36026
|
+
return (await this.getData(this.aggregations, this.groupedBy)).items;
|
|
36009
36027
|
}
|
|
36010
36028
|
}
|
|
36011
36029
|
|
|
36012
|
-
async function openDataset(url, typeHint, options) {
|
|
36030
|
+
async function openDataset(url, typeHint, options, cacheActive) {
|
|
36013
36031
|
const fileType = await inferDatasetType(url, typeHint);
|
|
36014
36032
|
let reader;
|
|
36015
36033
|
try {
|
|
@@ -36033,6 +36051,7 @@ async function openDataset(url, typeHint, options) {
|
|
|
36033
36051
|
reader = await WfsReader.createReader(url, options.wfsFeatureType);
|
|
36034
36052
|
break;
|
|
36035
36053
|
}
|
|
36054
|
+
reader.setCacheActive(cacheActive);
|
|
36036
36055
|
reader.load();
|
|
36037
36056
|
return reader;
|
|
36038
36057
|
}
|
|
@@ -36049,8 +36068,8 @@ async function openDataset(url, typeHint, options) {
|
|
|
36049
36068
|
* 2. otherwise, look for a Content-Type header in the response with a supported mime type
|
|
36050
36069
|
* 3. if no valid mime type was found, look for an explicit file extension in the url (.csv, .geojson etc.)
|
|
36051
36070
|
*/
|
|
36052
|
-
async function readDataset(url, typeHint, options) {
|
|
36053
|
-
const reader = await openDataset(url, typeHint, options);
|
|
36071
|
+
async function readDataset(url, typeHint, options, cacheActive = true) {
|
|
36072
|
+
const reader = await openDataset(url, typeHint, options, cacheActive);
|
|
36054
36073
|
try {
|
|
36055
36074
|
return await reader.read();
|
|
36056
36075
|
}
|
|
@@ -36211,18 +36230,18 @@ class DataService {
|
|
|
36211
36230
|
mimeType: getMimeTypeForFormat(getFileFormatFromServiceOutput(format)),
|
|
36212
36231
|
}));
|
|
36213
36232
|
}
|
|
36214
|
-
readAsGeoJson(link) {
|
|
36215
|
-
return this.getDataset(link).pipe(switchMap$1((dataset) => dataset.selectAll().read()), map$1((features) => ({
|
|
36233
|
+
readAsGeoJson(link, cacheActive) {
|
|
36234
|
+
return this.getDataset(link, cacheActive).pipe(switchMap$1((dataset) => dataset.selectAll().read()), map$1((features) => ({
|
|
36216
36235
|
type: 'FeatureCollection',
|
|
36217
36236
|
features,
|
|
36218
36237
|
})));
|
|
36219
36238
|
}
|
|
36220
|
-
getDataset(link) {
|
|
36239
|
+
getDataset(link, cacheActive) {
|
|
36221
36240
|
if (link.type === 'service' && link.accessServiceProtocol === 'wfs') {
|
|
36222
36241
|
const wfsUrlEndpoint = this.proxy.getProxiedUrl(link.url.toString());
|
|
36223
36242
|
return from(openDataset(wfsUrlEndpoint, 'wfs', {
|
|
36224
36243
|
wfsFeatureType: link.name,
|
|
36225
|
-
}));
|
|
36244
|
+
}, cacheActive));
|
|
36226
36245
|
}
|
|
36227
36246
|
else if (link.type === 'download') {
|
|
36228
36247
|
const linkProxifiedUrl = this.proxy.getProxiedUrl(link.url.toString());
|
|
@@ -36230,18 +36249,18 @@ class DataService {
|
|
|
36230
36249
|
const supportedType = SupportedTypes.indexOf(format) > -1
|
|
36231
36250
|
? format
|
|
36232
36251
|
: undefined;
|
|
36233
|
-
return from(openDataset(linkProxifiedUrl, supportedType)).pipe();
|
|
36252
|
+
return from(openDataset(linkProxifiedUrl, supportedType, undefined, cacheActive)).pipe();
|
|
36234
36253
|
}
|
|
36235
36254
|
else if (link.type === 'service' &&
|
|
36236
36255
|
link.accessServiceProtocol === 'esriRest') {
|
|
36237
36256
|
const url = this.getDownloadUrlFromEsriRest(link.url.toString(), 'geojson');
|
|
36238
|
-
return from(openDataset(url, 'geojson')).pipe();
|
|
36257
|
+
return from(openDataset(url, 'geojson', undefined, cacheActive)).pipe();
|
|
36239
36258
|
}
|
|
36240
36259
|
else if (link.type === 'service' &&
|
|
36241
36260
|
link.accessServiceProtocol === 'ogcFeatures') {
|
|
36242
36261
|
return from(this.getDownloadUrlsFromOgcApi(link.url.href)).pipe(switchMap$1((collectionInfo) => {
|
|
36243
36262
|
const geojsonUrl = collectionInfo.jsonDownloadLink;
|
|
36244
|
-
return openDataset(geojsonUrl, 'geojson');
|
|
36263
|
+
return openDataset(geojsonUrl, 'geojson', undefined, cacheActive);
|
|
36245
36264
|
}), tap$1((url) => {
|
|
36246
36265
|
if (url === null) {
|
|
36247
36266
|
throw new Error('wfs.geojsongml.notsupported');
|
|
@@ -36806,6 +36825,7 @@ class ChartViewComponent {
|
|
|
36806
36825
|
this.dataService = dataService;
|
|
36807
36826
|
this.changeDetector = changeDetector;
|
|
36808
36827
|
this.translateService = translateService;
|
|
36828
|
+
this.cacheActive = true;
|
|
36809
36829
|
this.currentLink$ = new BehaviorSubject(null);
|
|
36810
36830
|
this.aggregation$ = new BehaviorSubject('sum');
|
|
36811
36831
|
this.xProperty$ = new BehaviorSubject(undefined);
|
|
@@ -36835,7 +36855,7 @@ class ChartViewComponent {
|
|
|
36835
36855
|
this.dataset$ = this.currentLink$.pipe(filter((link) => !!link), switchMap$1((link) => {
|
|
36836
36856
|
this.error = null;
|
|
36837
36857
|
this.loading = true;
|
|
36838
|
-
return this.dataService.getDataset(link).pipe(catchError((error) => {
|
|
36858
|
+
return this.dataService.getDataset(link, this.cacheActive).pipe(catchError((error) => {
|
|
36839
36859
|
this.handleError(error);
|
|
36840
36860
|
return EMPTY;
|
|
36841
36861
|
}));
|
|
@@ -36904,7 +36924,7 @@ class ChartViewComponent {
|
|
|
36904
36924
|
this.changeDetector.detectChanges();
|
|
36905
36925
|
}
|
|
36906
36926
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChartViewComponent, deps: [{ token: DataService }, { token: i0.ChangeDetectorRef }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
36907
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChartViewComponent, isStandalone: true, selector: "gn-ui-chart-view", inputs: { link: "link", aggregation: "aggregation", xProperty: "xProperty", yProperty: "yProperty", chartType: "chartType" }, outputs: { chartConfig$: "chartConfig$" }, ngImport: i0, template: "<div class=\"w-full h-full flex flex-col\">\n <div\n class=\"flex flex-col space-y-2 sm:flex-row sm:space-y-0 sm:space-x-2 justify-between text-[13px]\"\n >\n <gn-ui-dropdown-selector\n class=\"basis-1/4\"\n [choices]=\"typeChoices\"\n [extraBtnClass]=\"'secondary min-w-full'\"\n (selectValue)=\"chartType$.next($event)\"\n [selected]=\"chartType$.value\"\n [title]=\"'chart.dropdown.type' | translate\"\n ></gn-ui-dropdown-selector>\n <gn-ui-dropdown-selector\n class=\"basis-1/4\"\n [choices]=\"xChoices$ | async\"\n [extraBtnClass]=\"'secondary min-w-full'\"\n (selectValue)=\"xProperty$.next($event)\"\n [selected]=\"xProperty$.value\"\n [title]=\"'chart.dropdown.xProperty' | translate\"\n ></gn-ui-dropdown-selector>\n <gn-ui-dropdown-selector\n class=\"basis-1/4\"\n *ngIf=\"!isCountAggregation\"\n [choices]=\"yChoices$ | async\"\n (selectValue)=\"yProperty$.next($event)\"\n [selected]=\"yProperty$.value\"\n [title]=\"'chart.dropdown.yProperty' | translate\"\n class=\"select-y-prop\"\n ></gn-ui-dropdown-selector>\n <gn-ui-dropdown-selector\n class=\"basis-1/4\"\n [choices]=\"aggregationChoices\"\n class=\"aggregation-choices\"\n (selectValue)=\"aggregation$.next($event)\"\n [selected]=\"aggregation$.value\"\n [title]=\"'chart.dropdown.aggregation' | translate\"\n ></gn-ui-dropdown-selector>\n </div>\n <div\n class=\"relative h-full mt-2 bg-white border border-gray-300 rounded-lg overflow-hidden\"\n >\n <gn-ui-chart\n [data]=\"chartData$ | async\"\n [type]=\"chartType$.value\"\n [labelProperty]=\"labelProperty\"\n [valueProperty]=\"valueProperty\"\n ></gn-ui-chart>\n <gn-ui-loading-mask\n *ngIf=\"loading\"\n class=\"absolute inset-0\"\n [message]=\"'chart.loading.data' | translate\"\n ></gn-ui-loading-mask>\n <gn-ui-popup-alert\n *ngIf=\"error\"\n type=\"warning\"\n icon=\"matErrorOutlineOutline\"\n class=\"absolute m-2 inset-0\"\n >\n <span>{{ error }}</span>\n </gn-ui-popup-alert>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "component", type: DropdownSelectorComponent, selector: "gn-ui-dropdown-selector", inputs: ["title", "showTitle", "ariaName", "choices", "selected", "maxRows", "extraBtnClass", "minWidth", "disabled"], outputs: ["selectValue"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "component", type: ChartComponent, selector: "gn-ui-chart", inputs: ["data", "labelProperty", "valueProperty", "secondaryValueProperty", "type"] }, { kind: "component", type: LoadingMaskComponent, selector: "gn-ui-loading-mask", inputs: ["message"] }, { kind: "component", type: PopupAlertComponent, selector: "gn-ui-popup-alert", inputs: ["icon", "type", "position"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
36927
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ChartViewComponent, isStandalone: true, selector: "gn-ui-chart-view", inputs: { cacheActive: "cacheActive", link: "link", aggregation: "aggregation", xProperty: "xProperty", yProperty: "yProperty", chartType: "chartType" }, outputs: { chartConfig$: "chartConfig$" }, ngImport: i0, template: "<div class=\"w-full h-full flex flex-col\">\n <div\n class=\"flex flex-col space-y-2 sm:flex-row sm:space-y-0 sm:space-x-2 justify-between text-[13px]\"\n >\n <gn-ui-dropdown-selector\n class=\"basis-1/4\"\n [choices]=\"typeChoices\"\n [extraBtnClass]=\"'secondary min-w-full'\"\n (selectValue)=\"chartType$.next($event)\"\n [selected]=\"chartType$.value\"\n [title]=\"'chart.dropdown.type' | translate\"\n ></gn-ui-dropdown-selector>\n <gn-ui-dropdown-selector\n class=\"basis-1/4\"\n [choices]=\"xChoices$ | async\"\n [extraBtnClass]=\"'secondary min-w-full'\"\n (selectValue)=\"xProperty$.next($event)\"\n [selected]=\"xProperty$.value\"\n [title]=\"'chart.dropdown.xProperty' | translate\"\n ></gn-ui-dropdown-selector>\n <gn-ui-dropdown-selector\n class=\"basis-1/4\"\n *ngIf=\"!isCountAggregation\"\n [choices]=\"yChoices$ | async\"\n (selectValue)=\"yProperty$.next($event)\"\n [selected]=\"yProperty$.value\"\n [title]=\"'chart.dropdown.yProperty' | translate\"\n class=\"select-y-prop\"\n ></gn-ui-dropdown-selector>\n <gn-ui-dropdown-selector\n class=\"basis-1/4\"\n [choices]=\"aggregationChoices\"\n class=\"aggregation-choices\"\n (selectValue)=\"aggregation$.next($event)\"\n [selected]=\"aggregation$.value\"\n [title]=\"'chart.dropdown.aggregation' | translate\"\n ></gn-ui-dropdown-selector>\n </div>\n <div\n class=\"relative h-full mt-2 bg-white border border-gray-300 rounded-lg overflow-hidden\"\n >\n <gn-ui-chart\n [data]=\"chartData$ | async\"\n [type]=\"chartType$.value\"\n [labelProperty]=\"labelProperty\"\n [valueProperty]=\"valueProperty\"\n ></gn-ui-chart>\n <gn-ui-loading-mask\n *ngIf=\"loading\"\n class=\"absolute inset-0\"\n [message]=\"'chart.loading.data' | translate\"\n ></gn-ui-loading-mask>\n <gn-ui-popup-alert\n *ngIf=\"error\"\n type=\"warning\"\n icon=\"matErrorOutlineOutline\"\n class=\"absolute m-2 inset-0\"\n >\n <span>{{ error }}</span>\n </gn-ui-popup-alert>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "component", type: DropdownSelectorComponent, selector: "gn-ui-dropdown-selector", inputs: ["title", "showTitle", "ariaName", "choices", "selected", "maxRows", "extraBtnClass", "minWidth", "disabled"], outputs: ["selectValue"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "component", type: ChartComponent, selector: "gn-ui-chart", inputs: ["data", "labelProperty", "valueProperty", "secondaryValueProperty", "type"] }, { kind: "component", type: LoadingMaskComponent, selector: "gn-ui-loading-mask", inputs: ["message"] }, { kind: "component", type: PopupAlertComponent, selector: "gn-ui-popup-alert", inputs: ["icon", "type", "position"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
36908
36928
|
}
|
|
36909
36929
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ChartViewComponent, decorators: [{
|
|
36910
36930
|
type: Component,
|
|
@@ -36916,7 +36936,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
36916
36936
|
LoadingMaskComponent,
|
|
36917
36937
|
PopupAlertComponent,
|
|
36918
36938
|
], standalone: true, template: "<div class=\"w-full h-full flex flex-col\">\n <div\n class=\"flex flex-col space-y-2 sm:flex-row sm:space-y-0 sm:space-x-2 justify-between text-[13px]\"\n >\n <gn-ui-dropdown-selector\n class=\"basis-1/4\"\n [choices]=\"typeChoices\"\n [extraBtnClass]=\"'secondary min-w-full'\"\n (selectValue)=\"chartType$.next($event)\"\n [selected]=\"chartType$.value\"\n [title]=\"'chart.dropdown.type' | translate\"\n ></gn-ui-dropdown-selector>\n <gn-ui-dropdown-selector\n class=\"basis-1/4\"\n [choices]=\"xChoices$ | async\"\n [extraBtnClass]=\"'secondary min-w-full'\"\n (selectValue)=\"xProperty$.next($event)\"\n [selected]=\"xProperty$.value\"\n [title]=\"'chart.dropdown.xProperty' | translate\"\n ></gn-ui-dropdown-selector>\n <gn-ui-dropdown-selector\n class=\"basis-1/4\"\n *ngIf=\"!isCountAggregation\"\n [choices]=\"yChoices$ | async\"\n (selectValue)=\"yProperty$.next($event)\"\n [selected]=\"yProperty$.value\"\n [title]=\"'chart.dropdown.yProperty' | translate\"\n class=\"select-y-prop\"\n ></gn-ui-dropdown-selector>\n <gn-ui-dropdown-selector\n class=\"basis-1/4\"\n [choices]=\"aggregationChoices\"\n class=\"aggregation-choices\"\n (selectValue)=\"aggregation$.next($event)\"\n [selected]=\"aggregation$.value\"\n [title]=\"'chart.dropdown.aggregation' | translate\"\n ></gn-ui-dropdown-selector>\n </div>\n <div\n class=\"relative h-full mt-2 bg-white border border-gray-300 rounded-lg overflow-hidden\"\n >\n <gn-ui-chart\n [data]=\"chartData$ | async\"\n [type]=\"chartType$.value\"\n [labelProperty]=\"labelProperty\"\n [valueProperty]=\"valueProperty\"\n ></gn-ui-chart>\n <gn-ui-loading-mask\n *ngIf=\"loading\"\n class=\"absolute inset-0\"\n [message]=\"'chart.loading.data' | translate\"\n ></gn-ui-loading-mask>\n <gn-ui-popup-alert\n *ngIf=\"error\"\n type=\"warning\"\n icon=\"matErrorOutlineOutline\"\n class=\"absolute m-2 inset-0\"\n >\n <span>{{ error }}</span>\n </gn-ui-popup-alert>\n </div>\n</div>\n" }]
|
|
36919
|
-
}], ctorParameters: () => [{ type: DataService }, { type: i0.ChangeDetectorRef }, { type: i1$1.TranslateService }], propDecorators: {
|
|
36939
|
+
}], ctorParameters: () => [{ type: DataService }, { type: i0.ChangeDetectorRef }, { type: i1$1.TranslateService }], propDecorators: { cacheActive: [{
|
|
36940
|
+
type: Input
|
|
36941
|
+
}], link: [{
|
|
36920
36942
|
type: Input
|
|
36921
36943
|
}], aggregation: [{
|
|
36922
36944
|
type: Input
|
|
@@ -37089,6 +37111,7 @@ class TableViewComponent {
|
|
|
37089
37111
|
constructor(dataService, translateService) {
|
|
37090
37112
|
this.dataService = dataService;
|
|
37091
37113
|
this.translateService = translateService;
|
|
37114
|
+
this.cacheActive = true;
|
|
37092
37115
|
this.currentLink$ = new BehaviorSubject(null);
|
|
37093
37116
|
this.loading = false;
|
|
37094
37117
|
this.error = null;
|
|
@@ -37106,7 +37129,7 @@ class TableViewComponent {
|
|
|
37106
37129
|
}), startWith(undefined), shareReplay(1));
|
|
37107
37130
|
}
|
|
37108
37131
|
getDatasetReader(link) {
|
|
37109
|
-
return this.dataService.getDataset(link);
|
|
37132
|
+
return this.dataService.getDataset(link, this.cacheActive);
|
|
37110
37133
|
}
|
|
37111
37134
|
onTableSelect(event) {
|
|
37112
37135
|
console.log(event);
|
|
@@ -37129,7 +37152,7 @@ class TableViewComponent {
|
|
|
37129
37152
|
this.loading = false;
|
|
37130
37153
|
}
|
|
37131
37154
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TableViewComponent, deps: [{ token: DataService }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
37132
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TableViewComponent, isStandalone: true, selector: "gn-ui-table-view", inputs: { link: "link" }, ngImport: i0, template: "<div class=\"w-full h-full flex flex-col\">\n <div class=\"relative h-full\">\n <gn-ui-data-table\n *ngIf=\"tableData$ | async as dataset\"\n class=\"overflow-auto grow\"\n [dataset]=\"dataset\"\n (selected)=\"onTableSelect($event)\"\n ></gn-ui-data-table>\n <gn-ui-loading-mask\n *ngIf=\"loading\"\n class=\"absolute inset-0\"\n [message]=\"'table.loading.data' | translate\"\n ></gn-ui-loading-mask>\n <gn-ui-popup-alert\n *ngIf=\"error\"\n type=\"warning\"\n icon=\"matErrorOutlineOutline\"\n class=\"absolute m-2 inset-0\"\n >\n <span translate>{{ error }}</span>\n </gn-ui-popup-alert>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "component", type: DataTableComponent, selector: "gn-ui-data-table", inputs: ["dataset", "activeId"], outputs: ["selected"] }, { kind: "component", type: LoadingMaskComponent, selector: "gn-ui-loading-mask", inputs: ["message"] }, { kind: "component", type: PopupAlertComponent, selector: "gn-ui-popup-alert", inputs: ["icon", "type", "position"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
37155
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TableViewComponent, isStandalone: true, selector: "gn-ui-table-view", inputs: { cacheActive: "cacheActive", link: "link" }, ngImport: i0, template: "<div class=\"w-full h-full flex flex-col\">\n <div class=\"relative h-full\">\n <gn-ui-data-table\n *ngIf=\"tableData$ | async as dataset\"\n class=\"overflow-auto grow\"\n [dataset]=\"dataset\"\n (selected)=\"onTableSelect($event)\"\n ></gn-ui-data-table>\n <gn-ui-loading-mask\n *ngIf=\"loading\"\n class=\"absolute inset-0\"\n [message]=\"'table.loading.data' | translate\"\n ></gn-ui-loading-mask>\n <gn-ui-popup-alert\n *ngIf=\"error\"\n type=\"warning\"\n icon=\"matErrorOutlineOutline\"\n class=\"absolute m-2 inset-0\"\n >\n <span translate>{{ error }}</span>\n </gn-ui-popup-alert>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "component", type: DataTableComponent, selector: "gn-ui-data-table", inputs: ["dataset", "activeId"], outputs: ["selected"] }, { kind: "component", type: LoadingMaskComponent, selector: "gn-ui-loading-mask", inputs: ["message"] }, { kind: "component", type: PopupAlertComponent, selector: "gn-ui-popup-alert", inputs: ["icon", "type", "position"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
37133
37156
|
}
|
|
37134
37157
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TableViewComponent, decorators: [{
|
|
37135
37158
|
type: Component,
|
|
@@ -37140,7 +37163,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
37140
37163
|
PopupAlertComponent,
|
|
37141
37164
|
TranslateModule,
|
|
37142
37165
|
], standalone: true, template: "<div class=\"w-full h-full flex flex-col\">\n <div class=\"relative h-full\">\n <gn-ui-data-table\n *ngIf=\"tableData$ | async as dataset\"\n class=\"overflow-auto grow\"\n [dataset]=\"dataset\"\n (selected)=\"onTableSelect($event)\"\n ></gn-ui-data-table>\n <gn-ui-loading-mask\n *ngIf=\"loading\"\n class=\"absolute inset-0\"\n [message]=\"'table.loading.data' | translate\"\n ></gn-ui-loading-mask>\n <gn-ui-popup-alert\n *ngIf=\"error\"\n type=\"warning\"\n icon=\"matErrorOutlineOutline\"\n class=\"absolute m-2 inset-0\"\n >\n <span translate>{{ error }}</span>\n </gn-ui-popup-alert>\n </div>\n</div>\n" }]
|
|
37143
|
-
}], ctorParameters: () => [{ type: DataService }, { type: i1$1.TranslateService }], propDecorators: {
|
|
37166
|
+
}], ctorParameters: () => [{ type: DataService }, { type: i1$1.TranslateService }], propDecorators: { cacheActive: [{
|
|
37167
|
+
type: Input
|
|
37168
|
+
}], link: [{
|
|
37144
37169
|
type: Input
|
|
37145
37170
|
}] } });
|
|
37146
37171
|
|
|
@@ -37160,6 +37185,13 @@ class MdViewFacade {
|
|
|
37160
37185
|
this.isMetadataLoading$ = this.store.pipe(select(getMetadataIsLoading));
|
|
37161
37186
|
this.metadata$ = this.store.pipe(select(getMetadata), filter((md) => !!md));
|
|
37162
37187
|
this.isIncomplete$ = this.store.pipe(select(getMetadataIsIncomplete), filter((incomplete) => incomplete !== null));
|
|
37188
|
+
this.isHighUpdateFrequency$ = this.metadata$.pipe(map$1((record) => {
|
|
37189
|
+
if (record.updateFrequency instanceof Object) {
|
|
37190
|
+
return (record.updateFrequency.per === 'day' &&
|
|
37191
|
+
record.updateFrequency.updatedTimes > 1);
|
|
37192
|
+
}
|
|
37193
|
+
return record.updateFrequency === 'continual';
|
|
37194
|
+
}));
|
|
37163
37195
|
this.error$ = this.store.pipe(select(getMetadataError));
|
|
37164
37196
|
this.related$ = this.store.pipe(select(getRelated));
|
|
37165
37197
|
this.chartConfig$ = this.store.pipe(select(getChartConfig));
|
|
@@ -37844,6 +37876,7 @@ class DataViewComponent {
|
|
|
37844
37876
|
this.mdViewFacade = mdViewFacade;
|
|
37845
37877
|
this.displaySource = true;
|
|
37846
37878
|
this.chartConfig$ = new BehaviorSubject(null);
|
|
37879
|
+
this.cacheActive$ = this.mdViewFacade.isHighUpdateFrequency$.pipe(map$1((highF) => !highF));
|
|
37847
37880
|
this.compatibleDataLinks$ = combineLatest([
|
|
37848
37881
|
this.mdViewFacade.dataLinks$,
|
|
37849
37882
|
this.mdViewFacade.geoDataLinks$,
|
|
@@ -37871,7 +37904,7 @@ class DataViewComponent {
|
|
|
37871
37904
|
this.selectedLink$.next(link);
|
|
37872
37905
|
}
|
|
37873
37906
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DataViewComponent, deps: [{ token: MdViewFacade }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
37874
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DataViewComponent, isStandalone: true, selector: "gn-ui-data-view", inputs: { mode: "mode", displaySource: "displaySource" }, outputs: { chartConfig$: "chartConfig$" }, ngImport: i0, template: "<div class=\"w-full h-full flex flex-col p-1\">\n <gn-ui-dropdown-selector\n *ngIf=\"dropdownChoices$ | async as choices\"\n [ngClass]=\"{ hidden: !displaySource }\"\n [title]=\"'table.select.data' | translate\"\n class=\"truncate p-1 -mx-1 self-end mb-1\"\n extraBtnClass=\"!text-primary font-sans font-medium\"\n [choices]=\"choices\"\n (selectValue)=\"selectLink($event)\"\n ></gn-ui-dropdown-selector>\n <div class=\"relative h-[460px]\">\n <gn-ui-table-view\n *ngIf=\"mode === 'table'\"\n [link]=\"selectedLink$ | async\"\n ></gn-ui-table-view>\n <gn-ui-chart-view\n *ngIf=\"mode === 'chart'\"\n (chartConfig$)=\"setChartConfig($event)\"\n [link]=\"selectedLink$ | async\"\n ></gn-ui-chart-view>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "component", type: DropdownSelectorComponent, selector: "gn-ui-dropdown-selector", inputs: ["title", "showTitle", "ariaName", "choices", "selected", "maxRows", "extraBtnClass", "minWidth", "disabled"], outputs: ["selectValue"] }, { kind: "component", type: TableViewComponent, selector: "gn-ui-table-view", inputs: ["link"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "component", type: ChartViewComponent, selector: "gn-ui-chart-view", inputs: ["link", "aggregation", "xProperty", "yProperty", "chartType"], outputs: ["chartConfig$"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
37907
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DataViewComponent, isStandalone: true, selector: "gn-ui-data-view", inputs: { mode: "mode", displaySource: "displaySource" }, outputs: { chartConfig$: "chartConfig$" }, ngImport: i0, template: "<div class=\"w-full h-full flex flex-col p-1\">\n <gn-ui-dropdown-selector\n *ngIf=\"dropdownChoices$ | async as choices\"\n [ngClass]=\"{ hidden: !displaySource }\"\n [title]=\"'table.select.data' | translate\"\n class=\"truncate p-1 -mx-1 self-end mb-1\"\n extraBtnClass=\"!text-primary font-sans font-medium\"\n [choices]=\"choices\"\n (selectValue)=\"selectLink($event)\"\n ></gn-ui-dropdown-selector>\n <div class=\"relative h-[460px]\">\n <gn-ui-table-view\n *ngIf=\"mode === 'table'\"\n [cacheActive]=\"cacheActive$ | async\"\n [link]=\"selectedLink$ | async\"\n ></gn-ui-table-view>\n <gn-ui-chart-view\n *ngIf=\"mode === 'chart'\"\n (chartConfig$)=\"setChartConfig($event)\"\n [cacheActive]=\"cacheActive$ | async\"\n [link]=\"selectedLink$ | async\"\n ></gn-ui-chart-view>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "component", type: DropdownSelectorComponent, selector: "gn-ui-dropdown-selector", inputs: ["title", "showTitle", "ariaName", "choices", "selected", "maxRows", "extraBtnClass", "minWidth", "disabled"], outputs: ["selectValue"] }, { kind: "component", type: TableViewComponent, selector: "gn-ui-table-view", inputs: ["cacheActive", "link"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "component", type: ChartViewComponent, selector: "gn-ui-chart-view", inputs: ["cacheActive", "link", "aggregation", "xProperty", "yProperty", "chartType"], outputs: ["chartConfig$"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
37875
37908
|
}
|
|
37876
37909
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DataViewComponent, decorators: [{
|
|
37877
37910
|
type: Component,
|
|
@@ -37881,7 +37914,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
37881
37914
|
TableViewComponent,
|
|
37882
37915
|
TranslateModule,
|
|
37883
37916
|
ChartViewComponent,
|
|
37884
|
-
], template: "<div class=\"w-full h-full flex flex-col p-1\">\n <gn-ui-dropdown-selector\n *ngIf=\"dropdownChoices$ | async as choices\"\n [ngClass]=\"{ hidden: !displaySource }\"\n [title]=\"'table.select.data' | translate\"\n class=\"truncate p-1 -mx-1 self-end mb-1\"\n extraBtnClass=\"!text-primary font-sans font-medium\"\n [choices]=\"choices\"\n (selectValue)=\"selectLink($event)\"\n ></gn-ui-dropdown-selector>\n <div class=\"relative h-[460px]\">\n <gn-ui-table-view\n *ngIf=\"mode === 'table'\"\n [link]=\"selectedLink$ | async\"\n ></gn-ui-table-view>\n <gn-ui-chart-view\n *ngIf=\"mode === 'chart'\"\n (chartConfig$)=\"setChartConfig($event)\"\n [link]=\"selectedLink$ | async\"\n ></gn-ui-chart-view>\n </div>\n</div>\n" }]
|
|
37917
|
+
], template: "<div class=\"w-full h-full flex flex-col p-1\">\n <gn-ui-dropdown-selector\n *ngIf=\"dropdownChoices$ | async as choices\"\n [ngClass]=\"{ hidden: !displaySource }\"\n [title]=\"'table.select.data' | translate\"\n class=\"truncate p-1 -mx-1 self-end mb-1\"\n extraBtnClass=\"!text-primary font-sans font-medium\"\n [choices]=\"choices\"\n (selectValue)=\"selectLink($event)\"\n ></gn-ui-dropdown-selector>\n <div class=\"relative h-[460px]\">\n <gn-ui-table-view\n *ngIf=\"mode === 'table'\"\n [cacheActive]=\"cacheActive$ | async\"\n [link]=\"selectedLink$ | async\"\n ></gn-ui-table-view>\n <gn-ui-chart-view\n *ngIf=\"mode === 'chart'\"\n (chartConfig$)=\"setChartConfig($event)\"\n [cacheActive]=\"cacheActive$ | async\"\n [link]=\"selectedLink$ | async\"\n ></gn-ui-chart-view>\n </div>\n</div>\n" }]
|
|
37885
37918
|
}], ctorParameters: () => [{ type: MdViewFacade }], propDecorators: { mode: [{
|
|
37886
37919
|
type: Input
|
|
37887
37920
|
}], displaySource: [{
|
|
@@ -38174,7 +38207,8 @@ class MapViewComponent {
|
|
|
38174
38207
|
link.accessServiceProtocol === 'esriRest' ||
|
|
38175
38208
|
link.accessServiceProtocol === 'ogcFeatures')) ||
|
|
38176
38209
|
link.type === 'download') {
|
|
38177
|
-
|
|
38210
|
+
const cacheActive = true; // TODO implement whether should be true or false
|
|
38211
|
+
return this.dataService.readAsGeoJson(link, cacheActive).pipe(map$1((data) => ({
|
|
38178
38212
|
type: 'geojson',
|
|
38179
38213
|
data,
|
|
38180
38214
|
})));
|