@hestia-earth/ui-components 0.0.5 → 0.0.6
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/bundles/hestia-earth-ui-components.umd.js +500 -455
- package/bundles/hestia-earth-ui-components.umd.js.map +1 -1
- package/common/blank-node-state/blank-node-state.component.d.ts +1 -1
- package/engine/aggregation-engine.service.d.ts +5 -5
- package/engine/public-api.d.ts +2 -2
- package/esm2015/engine/aggregation-engine.service.js +1 -1
- package/esm2015/engine/public-api.js +3 -3
- package/esm2015/files/public-api.js +3 -1
- package/fesm2015/hestia-earth-ui-components.js +622 -622
- package/fesm2015/hestia-earth-ui-components.js.map +1 -1
- package/files/public-api.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/router'), require('@ng-bootstrap/ng-bootstrap'), require('@angular/google-maps'), require('@fortawesome/angular-fontawesome'), require('@fortawesome/free-regular-svg-icons'), require('@fortawesome/free-solid-svg-icons'), require('@hestia-earth/utils'), require('random-material-color'), require('@hestia-earth/schema'), require('@hestia-earth/api'), require('rxjs'), require('rxjs/operators'), require('csvtojson'), require('@angular/common/http'), require('@angular/platform-browser'), require('pluralize'), require('@hestia-earth/bulma-tagsinput'), require('json-2-csv'), require('@angular/cdk/drag-drop'), require('@hestia-earth/schema-convert'), require('@hestia-earth/json-schema/schema-utils'), require('jsondiffpatch'), require('chart.js'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@hestia-earth/ui-components', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/router', '@ng-bootstrap/ng-bootstrap', '@angular/google-maps', '@fortawesome/angular-fontawesome', '@fortawesome/free-regular-svg-icons', '@fortawesome/free-solid-svg-icons', '@hestia-earth/utils', 'random-material-color', '@hestia-earth/schema', '@hestia-earth/api', 'rxjs', 'rxjs/operators', 'csvtojson', '@angular/common/http', '@angular/platform-browser', 'pluralize', '@hestia-earth/bulma-tagsinput', 'json-2-csv', '@angular/cdk/drag-drop', '@hestia-earth/schema-convert', '@hestia-earth/json-schema/schema-utils', 'jsondiffpatch', 'chart.js', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["hestia-earth"] = global["hestia-earth"] || {}, global["hestia-earth"]["ui-components"] = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.router, global.i10, global.ng.googleMaps, global.i1, global.freeRegularSvgIcons, global.freeSolidSvgIcons, global.utils, global.randomMaterialColor, global.schema, global.api, global.rxjs, global.rxjs.operators, global.csvtojson, global.ng.common.http, global.ng.platformBrowser, global.pluralize, global.BulmaTagsInput, global.json2Csv, global.ng.cdk.dragDrop, global.schemaConvert, global.schemaUtils, global.jsondiffpatch, global.chart_js, global.
|
|
5
|
-
})(this, (function (exports, i0, i3, i1$4, i4, i10, i1$2, i1, freeRegularSvgIcons, freeSolidSvgIcons, utils, randomMaterialColor, schema, api, rxjs, operators, csvtojson, i1$1, i1$3, pluralize, BulmaTagsInput, json2Csv, i6, schemaConvert, schemaUtils, jsondiffpatch, chart_js,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/router'), require('@ng-bootstrap/ng-bootstrap'), require('@angular/google-maps'), require('@fortawesome/angular-fontawesome'), require('@fortawesome/free-regular-svg-icons'), require('@fortawesome/free-solid-svg-icons'), require('@hestia-earth/utils'), require('random-material-color'), require('@hestia-earth/schema'), require('@hestia-earth/api'), require('rxjs'), require('rxjs/operators'), require('csvtojson'), require('@angular/common/http'), require('@angular/platform-browser'), require('pluralize'), require('@hestia-earth/bulma-tagsinput'), require('json-2-csv'), require('@angular/cdk/drag-drop'), require('@hestia-earth/schema-convert'), require('@hestia-earth/json-schema/schema-utils'), require('jsondiffpatch'), require('chart.js'), require('moment'), require('moment/locale/en-gb'), require('uuid'), require('@google/markerclustererplus'), require('chartjs-plugin-datalabels')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@hestia-earth/ui-components', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/router', '@ng-bootstrap/ng-bootstrap', '@angular/google-maps', '@fortawesome/angular-fontawesome', '@fortawesome/free-regular-svg-icons', '@fortawesome/free-solid-svg-icons', '@hestia-earth/utils', 'random-material-color', '@hestia-earth/schema', '@hestia-earth/api', 'rxjs', 'rxjs/operators', 'csvtojson', '@angular/common/http', '@angular/platform-browser', 'pluralize', '@hestia-earth/bulma-tagsinput', 'json-2-csv', '@angular/cdk/drag-drop', '@hestia-earth/schema-convert', '@hestia-earth/json-schema/schema-utils', 'jsondiffpatch', 'chart.js', 'moment', 'moment/locale/en-gb', 'uuid', '@google/markerclustererplus', 'chartjs-plugin-datalabels'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["hestia-earth"] = global["hestia-earth"] || {}, global["hestia-earth"]["ui-components"] = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.router, global.i10, global.ng.googleMaps, global.i1, global.freeRegularSvgIcons, global.freeSolidSvgIcons, global.utils, global.randomMaterialColor, global.schema, global.api, global.rxjs, global.rxjs.operators, global.csvtojson, global.ng.common.http, global.ng.platformBrowser, global.pluralize, global.BulmaTagsInput, global.json2Csv, global.ng.cdk.dragDrop, global.schemaConvert, global.schemaUtils, global.jsondiffpatch, global.chart_js, global.moment, null, global.uuid, global.MarkerClusterer, global.ChartDataLabels));
|
|
5
|
+
})(this, (function (exports, i0, i3, i1$4, i4, i10, i1$2, i1, freeRegularSvgIcons, freeSolidSvgIcons, utils, randomMaterialColor, schema, api, rxjs, operators, csvtojson, i1$1, i1$3, pluralize, BulmaTagsInput, json2Csv, i6, schemaConvert, schemaUtils, jsondiffpatch, chart_js, moment, enGb, uuid, MarkerClusterer, ChartDataLabels) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
var pluralize__namespace = /*#__PURE__*/_interopNamespace(pluralize);
|
|
38
38
|
var BulmaTagsInput__default = /*#__PURE__*/_interopDefaultLegacy(BulmaTagsInput);
|
|
39
39
|
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
40
|
-
var MarkerClusterer__default = /*#__PURE__*/_interopDefaultLegacy(MarkerClusterer);
|
|
41
40
|
var moment__namespace = /*#__PURE__*/_interopNamespace(moment);
|
|
41
|
+
var MarkerClusterer__default = /*#__PURE__*/_interopDefaultLegacy(MarkerClusterer);
|
|
42
42
|
var ChartDataLabels__default = /*#__PURE__*/_interopDefaultLegacy(ChartDataLabels);
|
|
43
43
|
|
|
44
44
|
var HeAuthService = /** @class */ (function () {
|
|
@@ -4782,459 +4782,27 @@
|
|
|
4782
4782
|
}]
|
|
4783
4783
|
}] });
|
|
4784
4784
|
|
|
4785
|
-
var
|
|
4786
|
-
|
|
4787
|
-
|
|
4785
|
+
var _f;
|
|
4786
|
+
var mapErrorMessage = 'does not contain latitude and longitude';
|
|
4787
|
+
var parseDataPath = function (dataPath) {
|
|
4788
|
+
var _f = __read(dataPath.split('.')), _ = _f[0], paths = _f.slice(1);
|
|
4789
|
+
return paths.map(function (path) { return ({ path: path, label: keyToLabel(path.replace(/\[\d+\]/g, '')) }); });
|
|
4788
4790
|
};
|
|
4789
|
-
var
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4791
|
+
var contactUsEmail = 'community@hestia.earth';
|
|
4792
|
+
var externalLink = function (href, text) { return "<a href=\"" + href + "\" target=\"_blank\">" + text + "</a>"; };
|
|
4793
|
+
var glossaryLink = function (text) { return externalLink(baseUrl() + "/glossary", text); };
|
|
4794
|
+
var glossaryTypeLink = function (type) { return externalLink(baseUrl() + "/glossary?termType=" + type, termTypeLabel(type)); };
|
|
4795
|
+
var termLink = function (_f) {
|
|
4796
|
+
var id = _f.id, name = _f.name;
|
|
4797
|
+
return externalLink(baseUrl() + "/term/" + id, name);
|
|
4795
4798
|
};
|
|
4796
|
-
var
|
|
4797
|
-
var
|
|
4798
|
-
|
|
4799
|
-
region ? createMarker(termLocation(region), termLocationName(region).name, undefined, 20) : undefined,
|
|
4800
|
-
country ? createMarker(termLocation(country), termLocationName(country).name, undefined, 40) : undefined
|
|
4801
|
-
].filter(Boolean);
|
|
4802
|
-
return (markers.length ? markers[0] : undefined);
|
|
4799
|
+
var nodeLink = function (_f) {
|
|
4800
|
+
var type = _f["@type"], id = _f["@id"], name = _f.name;
|
|
4801
|
+
return type && id ? "<a href=\"/" + type.toLowerCase() + "/" + id + "\" target=\"_blank\">" + (name || id) + "</a>" : null;
|
|
4803
4802
|
};
|
|
4804
|
-
var
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
return (boundary ? polygonsFromFeature(boundary) : undefined);
|
|
4808
|
-
};
|
|
4809
|
-
var regions = function (sites) { return utils.unique(sites.map(function (_a) {
|
|
4810
|
-
var country = _a.country, region = _a.region;
|
|
4811
|
-
return region ? region['@id'] : (country ? country['@id'] : null);
|
|
4812
|
-
}).filter(Boolean)); };
|
|
4813
|
-
var defaultCenter = { lat: 0, lng: 0 };
|
|
4814
|
-
var SitesMapsComponent = /** @class */ (function () {
|
|
4815
|
-
function SitesMapsComponent(nodeService) {
|
|
4816
|
-
this.nodeService = nodeService;
|
|
4817
|
-
this.loaded = false;
|
|
4818
|
-
this.loadPolygons = true;
|
|
4819
|
-
this.sites = [];
|
|
4820
|
-
this.nodes = [];
|
|
4821
|
-
this.center = defaultCenter;
|
|
4822
|
-
this.zoom = 2;
|
|
4823
|
-
this.showNotice = true;
|
|
4824
|
-
this.googleLoaded = false;
|
|
4825
|
-
this.showNoLocation = false;
|
|
4826
|
-
}
|
|
4827
|
-
SitesMapsComponent.prototype.ngOnInit = function () {
|
|
4828
|
-
var _this = this;
|
|
4829
|
-
waitFor('google', function () {
|
|
4830
|
-
_this.googleLoaded = true;
|
|
4831
|
-
setTimeout(function () { return !_this.loaded && _this.loadData(); });
|
|
4832
|
-
});
|
|
4833
|
-
};
|
|
4834
|
-
SitesMapsComponent.prototype.ngAfterViewInit = function () {
|
|
4835
|
-
return this.googleLoaded && this.loadData();
|
|
4836
|
-
};
|
|
4837
|
-
SitesMapsComponent.prototype.loadData = function () {
|
|
4838
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4839
|
-
var sites, markers, polygons, termPolygons;
|
|
4840
|
-
var _this = this;
|
|
4841
|
-
return __generator(this, function (_a) {
|
|
4842
|
-
switch (_a.label) {
|
|
4843
|
-
case 0:
|
|
4844
|
-
// loaded data as geojson
|
|
4845
|
-
this.map.googleMap.data.setStyle(function () { return (Object.assign(Object.assign({}, strokeStyle), { strokeOpacity: 0.1 })); });
|
|
4846
|
-
return [4 /*yield*/, this.getSites()];
|
|
4847
|
-
case 1:
|
|
4848
|
-
sites = _a.sent();
|
|
4849
|
-
markers = this.addSiteMarkers(sites);
|
|
4850
|
-
polygons = sites.flatMap(sitePolygon).filter(Boolean);
|
|
4851
|
-
polygons.map(function (polygon) { return polygon === null || polygon === void 0 ? void 0 : polygon.setMap(_this.map.googleMap); });
|
|
4852
|
-
this.loaded = true;
|
|
4853
|
-
return [4 /*yield*/, Promise.all(regions(sites).map(function (v) { return _this.addTermsPolygons(v); }))];
|
|
4854
|
-
case 2:
|
|
4855
|
-
termPolygons = (_a.sent()).flat();
|
|
4856
|
-
this.showNoLocation = markers.length === 0 && polygons.length === 0 && termPolygons.length === 0;
|
|
4857
|
-
return [2 /*return*/, markers.length ?
|
|
4858
|
-
this.centerMarker(markers[0]) :
|
|
4859
|
-
this.centerPolygons(polygons.length ? polygons : termPolygons)];
|
|
4860
|
-
}
|
|
4861
|
-
});
|
|
4862
|
-
});
|
|
4863
|
-
};
|
|
4864
|
-
SitesMapsComponent.prototype.addMarkers = function (markers, cluster) {
|
|
4865
|
-
var _this = this;
|
|
4866
|
-
if (cluster === void 0) { cluster = false; }
|
|
4867
|
-
return cluster ?
|
|
4868
|
-
new MarkerClusterer__default["default"](this.map.googleMap, markers, { imagePath: clustererImage }) :
|
|
4869
|
-
markers.map(function (marker) { return marker.setMap(_this.map.googleMap); });
|
|
4870
|
-
};
|
|
4871
|
-
SitesMapsComponent.prototype.addTermsPolygons = function (id) {
|
|
4872
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4873
|
-
var _a;
|
|
4874
|
-
return __generator(this, function (_b) {
|
|
4875
|
-
switch (_b.label) {
|
|
4876
|
-
case 0:
|
|
4877
|
-
if (!this.loadPolygons) return [3 /*break*/, 2];
|
|
4878
|
-
return [4 /*yield*/, this.termPolygons(id)];
|
|
4879
|
-
case 1:
|
|
4880
|
-
_a = _b.sent();
|
|
4881
|
-
return [3 /*break*/, 3];
|
|
4882
|
-
case 2:
|
|
4883
|
-
_a = [];
|
|
4884
|
-
_b.label = 3;
|
|
4885
|
-
case 3: return [2 /*return*/, _a];
|
|
4886
|
-
}
|
|
4887
|
-
});
|
|
4888
|
-
});
|
|
4889
|
-
};
|
|
4890
|
-
SitesMapsComponent.prototype.centerMarker = function (marker) {
|
|
4891
|
-
var center = marker.getPosition();
|
|
4892
|
-
this.center = center ? { lat: center.lat(), lng: center.lng() } : defaultCenter;
|
|
4893
|
-
};
|
|
4894
|
-
SitesMapsComponent.prototype.centerPolygons = function (polygons) {
|
|
4895
|
-
try {
|
|
4896
|
-
return polygons.length ? this.map.googleMap.fitBounds(polygonBounds(polygons)) : null;
|
|
4897
|
-
}
|
|
4898
|
-
catch (err) {
|
|
4899
|
-
if (polygons.length) {
|
|
4900
|
-
this.map.googleMap.fitBounds(polygonBounds(polygons[0]));
|
|
4901
|
-
this.zoom = 3;
|
|
4902
|
-
}
|
|
4903
|
-
}
|
|
4904
|
-
};
|
|
4905
|
-
SitesMapsComponent.prototype.addSiteMarkers = function (sites) {
|
|
4906
|
-
var siteMarkers = sites.map(siteMarker).filter(Boolean);
|
|
4907
|
-
var markers = siteMarkers.length ? siteMarkers : sites.map(siteDefaultLocation).filter(Boolean);
|
|
4908
|
-
this.addMarkers(markers, !!siteMarkers.length);
|
|
4909
|
-
return markers;
|
|
4910
|
-
};
|
|
4911
|
-
SitesMapsComponent.prototype.loadSite = function (node) {
|
|
4912
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4913
|
-
var _a;
|
|
4914
|
-
return __generator(this, function (_b) {
|
|
4915
|
-
switch (_b.label) {
|
|
4916
|
-
case 0:
|
|
4917
|
-
if (!('schemaVersion' in node)) return [3 /*break*/, 1];
|
|
4918
|
-
_a = node;
|
|
4919
|
-
return [3 /*break*/, 3];
|
|
4920
|
-
case 1: return [4 /*yield*/, this.nodeService.get(node)];
|
|
4921
|
-
case 2:
|
|
4922
|
-
_a = _b.sent();
|
|
4923
|
-
_b.label = 3;
|
|
4924
|
-
case 3:
|
|
4925
|
-
// means the site was already downloaded
|
|
4926
|
-
return [2 /*return*/, _a];
|
|
4927
|
-
}
|
|
4928
|
-
});
|
|
4929
|
-
});
|
|
4930
|
-
};
|
|
4931
|
-
SitesMapsComponent.prototype.siteData = function (node) {
|
|
4932
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4933
|
-
var _a, _b, _c, _d;
|
|
4934
|
-
return __generator(this, function (_e) {
|
|
4935
|
-
switch (_e.label) {
|
|
4936
|
-
case 0:
|
|
4937
|
-
if (![
|
|
4938
|
-
schema.NodeType.Site,
|
|
4939
|
-
schema.NodeType.Organisation
|
|
4940
|
-
].includes(node.type)) return [3 /*break*/, 1];
|
|
4941
|
-
_a = node;
|
|
4942
|
-
return [3 /*break*/, 7];
|
|
4943
|
-
case 1:
|
|
4944
|
-
if (!isSite(node)) return [3 /*break*/, 2];
|
|
4945
|
-
_b = this.loadSite(node);
|
|
4946
|
-
return [3 /*break*/, 6];
|
|
4947
|
-
case 2:
|
|
4948
|
-
if (!('site' in node && isSite(node.site))) return [3 /*break*/, 3];
|
|
4949
|
-
_c = this.loadSite(node.site);
|
|
4950
|
-
return [3 /*break*/, 5];
|
|
4951
|
-
case 3:
|
|
4952
|
-
_d = this.siteData;
|
|
4953
|
-
return [4 /*yield*/, this.loadSite(node)];
|
|
4954
|
-
case 4:
|
|
4955
|
-
_c = _d.apply(this, [_e.sent()]);
|
|
4956
|
-
_e.label = 5;
|
|
4957
|
-
case 5:
|
|
4958
|
-
_b = (_c);
|
|
4959
|
-
_e.label = 6;
|
|
4960
|
-
case 6:
|
|
4961
|
-
_a = (_b);
|
|
4962
|
-
_e.label = 7;
|
|
4963
|
-
case 7: return [2 /*return*/, _a];
|
|
4964
|
-
}
|
|
4965
|
-
});
|
|
4966
|
-
});
|
|
4967
|
-
};
|
|
4968
|
-
SitesMapsComponent.prototype.getSites = function () {
|
|
4969
|
-
var _this = this;
|
|
4970
|
-
var nodes = this.sites && this.sites.length ? this.sites : this.nodes;
|
|
4971
|
-
return Promise.all(nodes.map(function (node) { return _this.siteData(node); }));
|
|
4972
|
-
};
|
|
4973
|
-
SitesMapsComponent.prototype.termPolygons = function (id) {
|
|
4974
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4975
|
-
var data, polygons, _err_1;
|
|
4976
|
-
var _this = this;
|
|
4977
|
-
return __generator(this, function (_a) {
|
|
4978
|
-
switch (_a.label) {
|
|
4979
|
-
case 0:
|
|
4980
|
-
_a.trys.push([0, 2, , 3]);
|
|
4981
|
-
return [4 /*yield*/, this.nodeService.downloadRaw(baseUrl() + "/gadm/" + id + ".geojson")];
|
|
4982
|
-
case 1:
|
|
4983
|
-
data = _a.sent();
|
|
4984
|
-
polygons = polygonsFromFeature(data);
|
|
4985
|
-
polygons.map(function (polygon) { return polygon.setMap(_this.map.googleMap); });
|
|
4986
|
-
return [2 /*return*/, polygons];
|
|
4987
|
-
case 2:
|
|
4988
|
-
_err_1 = _a.sent();
|
|
4989
|
-
// ignore error if the file does not exist
|
|
4990
|
-
return [2 /*return*/, []];
|
|
4991
|
-
case 3: return [2 /*return*/];
|
|
4992
|
-
}
|
|
4993
|
-
});
|
|
4994
|
-
});
|
|
4995
|
-
};
|
|
4996
|
-
return SitesMapsComponent;
|
|
4997
|
-
}());
|
|
4998
|
-
SitesMapsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SitesMapsComponent, deps: [{ token: HeNodeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
4999
|
-
SitesMapsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SitesMapsComponent, selector: "he-sites-maps", inputs: { loadPolygons: "loadPolygons", sites: "sites", nodes: "nodes", center: "center", zoom: "zoom", showNotice: "showNotice" }, viewQueries: [{ propertyName: "map", first: true, predicate: i1$2.GoogleMap, descendants: true }], ngImport: i0__namespace, template: "<google-map *ngIf=\"googleLoaded\"\n height=\"100%\"\n width=\"100%\"\n [zoom]=\"zoom\"\n [center]=\"center\"\n></google-map>\n\n<p *ngIf=\"showNotice\" class=\"mt-2 is-italic is-size-7\">The information provided might not be complete</p>\n\n<div class=\"no-location has-text-center has-text-light\" *ngIf=\"showNoLocation\">\n <span>No precise location data</span>\n</div>\n", styles: [":host{display:block;height:100%;position:relative;width:100%}.no-location{background-color:#0000004d;left:0;height:100%;position:absolute;top:0;width:100%;z-index:9}.no-location>span{display:inline-block;margin-top:12%}\n"], components: [{ type: i1__namespace$2.GoogleMap, selector: "google-map", inputs: ["height", "width", "center", "zoom", "options", "mapTypeId"], outputs: ["authFailure", "boundsChanged", "centerChanged", "mapClick", "mapDblclick", "mapDrag", "mapDragend", "mapDragstart", "headingChanged", "idle", "maptypeidChanged", "mapMousemove", "mapMouseout", "mapMouseover", "projectionChanged", "mapRightclick", "tilesloaded", "tiltChanged", "zoomChanged"], exportAs: ["googleMap"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
5000
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SitesMapsComponent, decorators: [{
|
|
5001
|
-
type: i0.Component,
|
|
5002
|
-
args: [{
|
|
5003
|
-
selector: 'he-sites-maps',
|
|
5004
|
-
templateUrl: './sites-maps.component.html',
|
|
5005
|
-
styleUrls: ['./sites-maps.component.scss']
|
|
5006
|
-
}]
|
|
5007
|
-
}], ctorParameters: function () { return [{ type: HeNodeService }]; }, propDecorators: { map: [{
|
|
5008
|
-
type: i0.ViewChild,
|
|
5009
|
-
args: [i1$2.GoogleMap]
|
|
5010
|
-
}], loadPolygons: [{
|
|
5011
|
-
type: i0.Input
|
|
5012
|
-
}], sites: [{
|
|
5013
|
-
type: i0.Input
|
|
5014
|
-
}], nodes: [{
|
|
5015
|
-
type: i0.Input
|
|
5016
|
-
}], center: [{
|
|
5017
|
-
type: i0.Input
|
|
5018
|
-
}], zoom: [{
|
|
5019
|
-
type: i0.Input
|
|
5020
|
-
}], showNotice: [{
|
|
5021
|
-
type: i0.Input
|
|
5022
|
-
}] } });
|
|
5023
|
-
|
|
5024
|
-
var maxAreaSize = 5000;
|
|
5025
|
-
var siteTooBig = function (_a) {
|
|
5026
|
-
var area = _a.area;
|
|
5027
|
-
return area && area / 100 > maxAreaSize;
|
|
5028
|
-
};
|
|
5029
|
-
var hasMultipleValues = function (values) { return (values || []).length > 1; };
|
|
5030
|
-
var weighedAverage = function (_a) {
|
|
5031
|
-
var value = _a.value, depthLower = _a.depthLower, depthUpper = _a.depthUpper;
|
|
5032
|
-
return value.reduce(function (prev, curr, index) { return prev + (curr * (depthLower[index] - depthUpper[index])); }, 0) /
|
|
5033
|
-
value.reduce(function (prev, _curr, index) { return prev + (depthLower[index] - depthUpper[index]); }, 0);
|
|
5034
|
-
};
|
|
5035
|
-
var measurementValue = function (_a) {
|
|
5036
|
-
var value = _a.value, depthLower = _a.depthLower, depthUpper = _a.depthUpper;
|
|
5037
|
-
return hasMultipleValues(value) && hasMultipleValues(depthLower) && hasMultipleValues(depthUpper) ?
|
|
5038
|
-
weighedAverage({ value: value, depthLower: depthLower, depthUpper: depthUpper }) :
|
|
5039
|
-
propertyValue$1(value);
|
|
5040
|
-
};
|
|
5041
|
-
|
|
5042
|
-
var SitesMeasurementsLogsComponent = /** @class */ (function () {
|
|
5043
|
-
function SitesMeasurementsLogsComponent(searchService, nodeService) {
|
|
5044
|
-
this.searchService = searchService;
|
|
5045
|
-
this.nodeService = nodeService;
|
|
5046
|
-
this.originalValues = [];
|
|
5047
|
-
this.recalculatedValues = [];
|
|
5048
|
-
this.loading = true;
|
|
5049
|
-
this.NodeType = schema.NodeType;
|
|
5050
|
-
this.models = [];
|
|
5051
|
-
this.measurements = [];
|
|
5052
|
-
}
|
|
5053
|
-
SitesMeasurementsLogsComponent.prototype.ngOnInit = function () {
|
|
5054
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
5055
|
-
var _a, measurements;
|
|
5056
|
-
return __generator(this, function (_b) {
|
|
5057
|
-
switch (_b.label) {
|
|
5058
|
-
case 0:
|
|
5059
|
-
this.logsUrl = this.nodeService.nodeLogsUrl(this.node);
|
|
5060
|
-
_a = this;
|
|
5061
|
-
return [4 /*yield*/, this.nodeService.getModelsLog(this.node)];
|
|
5062
|
-
case 1:
|
|
5063
|
-
_a.logs = _b.sent();
|
|
5064
|
-
return [4 /*yield*/, this.searchService.search({
|
|
5065
|
-
fields: ['@type', '@id', 'name'],
|
|
5066
|
-
limit: 1000,
|
|
5067
|
-
query: {
|
|
5068
|
-
bool: {
|
|
5069
|
-
must: [
|
|
5070
|
-
matchType(schema.NodeType.Term),
|
|
5071
|
-
matchTermType(schema.TermTermType.measurement)
|
|
5072
|
-
]
|
|
5073
|
-
}
|
|
5074
|
-
}
|
|
5075
|
-
})];
|
|
5076
|
-
case 2:
|
|
5077
|
-
measurements = (_b.sent()).results;
|
|
5078
|
-
this.measurements = measurements;
|
|
5079
|
-
this.loading = false;
|
|
5080
|
-
return [2 /*return*/];
|
|
5081
|
-
}
|
|
5082
|
-
});
|
|
5083
|
-
});
|
|
5084
|
-
};
|
|
5085
|
-
Object.defineProperty(SitesMeasurementsLogsComponent.prototype, "node", {
|
|
5086
|
-
get: function () {
|
|
5087
|
-
return Object.assign(Object.assign({}, this.site), { dataState: api.DataState.recalculated });
|
|
5088
|
-
},
|
|
5089
|
-
enumerable: false,
|
|
5090
|
-
configurable: true
|
|
5091
|
-
});
|
|
5092
|
-
return SitesMeasurementsLogsComponent;
|
|
5093
|
-
}());
|
|
5094
|
-
SitesMeasurementsLogsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SitesMeasurementsLogsComponent, deps: [{ token: HeSearchService }, { token: HeNodeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
5095
|
-
SitesMeasurementsLogsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SitesMeasurementsLogsComponent, selector: "he-sites-measurements-logs", inputs: { site: "site", originalValues: "originalValues", recalculatedValues: "recalculatedValues" }, ngImport: i0__namespace, template: "<he-node-logs-models *ngIf=\"!loading; else loader\"\n [logsUrl]=\"logsUrl\"\n [nodeType]=\"NodeType.Site\"\n [originalValues]=\"originalValues\"\n [recalculatedValues]=\"recalculatedValues\"\n [terms]=\"measurements\"\n [logs]=\"logs\"\n filteredType=\"Measurement\"\n></he-node-logs-models>\n\n<ng-template #loader>\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n</ng-template>\n", styles: [""], components: [{ type: NodeLogsModelsComponent, selector: "he-node-logs-models", inputs: ["nodeType", "nodeKey", "logsUrl", "originalValues", "recalculatedValues", "terms", "logs", "filteredType"] }, { type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
5096
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SitesMeasurementsLogsComponent, decorators: [{
|
|
5097
|
-
type: i0.Component,
|
|
5098
|
-
args: [{
|
|
5099
|
-
selector: 'he-sites-measurements-logs',
|
|
5100
|
-
templateUrl: './sites-measurements-logs.component.html',
|
|
5101
|
-
styleUrls: ['./sites-measurements-logs.component.scss']
|
|
5102
|
-
}]
|
|
5103
|
-
}], ctorParameters: function () { return [{ type: HeSearchService }, { type: HeNodeService }]; }, propDecorators: { site: [{
|
|
5104
|
-
type: i0.Input
|
|
5105
|
-
}], originalValues: [{
|
|
5106
|
-
type: i0.Input
|
|
5107
|
-
}], recalculatedValues: [{
|
|
5108
|
-
type: i0.Input
|
|
5109
|
-
}] } });
|
|
5110
|
-
|
|
5111
|
-
var orderBy$1 = require('lodash.orderby');
|
|
5112
|
-
var View$1;
|
|
5113
|
-
(function (View) {
|
|
5114
|
-
View["table"] = "table";
|
|
5115
|
-
View["logs"] = "logs";
|
|
5116
|
-
})(View$1 || (View$1 = {}));
|
|
5117
|
-
var SitesMeasurementsComponent = /** @class */ (function () {
|
|
5118
|
-
function SitesMeasurementsComponent() {
|
|
5119
|
-
this.originalValues = [];
|
|
5120
|
-
this.sites = [];
|
|
5121
|
-
this.showDownload = false;
|
|
5122
|
-
this.View = View$1;
|
|
5123
|
-
this.selectedView = View$1.table;
|
|
5124
|
-
this.maxAreaSize = maxAreaSize;
|
|
5125
|
-
this.siteTooBig = siteTooBig;
|
|
5126
|
-
this.defaultLabel = defaultLabel;
|
|
5127
|
-
this.measurementValue = measurementValue;
|
|
5128
|
-
this.measurements = [];
|
|
5129
|
-
}
|
|
5130
|
-
SitesMeasurementsComponent.prototype.ngOnChanges = function (changes) {
|
|
5131
|
-
if ('sites' in changes) {
|
|
5132
|
-
return this.update();
|
|
5133
|
-
}
|
|
5134
|
-
if ('dataState' in changes) {
|
|
5135
|
-
this.selectedView = View$1.table;
|
|
5136
|
-
}
|
|
5137
|
-
};
|
|
5138
|
-
SitesMeasurementsComponent.prototype.trackById = function (_index, item) {
|
|
5139
|
-
return item['@id'];
|
|
5140
|
-
};
|
|
5141
|
-
Object.defineProperty(SitesMeasurementsComponent.prototype, "isOriginal", {
|
|
5142
|
-
get: function () {
|
|
5143
|
-
return this.dataState === api.DataState.original;
|
|
5144
|
-
},
|
|
5145
|
-
enumerable: false,
|
|
5146
|
-
configurable: true
|
|
5147
|
-
});
|
|
5148
|
-
SitesMeasurementsComponent.prototype.update = function () {
|
|
5149
|
-
var measurementsPerSite = groupNodesByTerm(this.sites, 'measurements', this.originalValues);
|
|
5150
|
-
this.measurements = orderBy$1(grouppedKeys(measurementsPerSite), ['key'], ['asc']);
|
|
5151
|
-
};
|
|
5152
|
-
SitesMeasurementsComponent.prototype.togglePopover = function (popover, context) {
|
|
5153
|
-
return popover.isOpen() ? popover.close() : popover.open(context);
|
|
5154
|
-
};
|
|
5155
|
-
Object.defineProperty(SitesMeasurementsComponent.prototype, "showAreaTooBig", {
|
|
5156
|
-
get: function () {
|
|
5157
|
-
return this.dataState === api.DataState.recalculated && (this.sites || []).some(siteTooBig);
|
|
5158
|
-
},
|
|
5159
|
-
enumerable: false,
|
|
5160
|
-
configurable: true
|
|
5161
|
-
});
|
|
5162
|
-
return SitesMeasurementsComponent;
|
|
5163
|
-
}());
|
|
5164
|
-
SitesMeasurementsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SitesMeasurementsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
5165
|
-
SitesMeasurementsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SitesMeasurementsComponent, selector: "he-sites-measurements", inputs: { originalValues: "originalValues", sites: "sites", dataState: "dataState" }, usesOnChanges: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"measurements.length; else emptyTable\">\n <div class=\"columns is-variable is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <div class=\"column is-narrow\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.table\" (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>Table view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal && sites.length === 1\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.logs\" (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>Recalculations logs</span>\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"px-3 pb-3\" [class.is-hidden]=\"selectedView !== View.table\">\n <div class=\"has-text-right mb-2\">\n <button class=\"button is-dark is-outlined is-small\" (click)=\"showDownload = true\">\n <fa-icon icon=\"download\"></fa-icon>\n <span class=\"pl-2\">Download (CSV)</span>\n </button>\n </div>\n\n <div class=\"table-container data-table-container mb-1\">\n <table class=\"table is-narrow data-table has-children-{{measurements.length}}\">\n <thead>\n <tr>\n <th class=\"width-auto\"></th>\n <th *ngFor=\"let measurement of measurements\"\n [attr.title]=\"measurement.value.term.name\"\n >\n <he-node-link [node]=\"measurement.value.term\">\n <span>{{measurement.value.term.name | ellipsis:30}}</span>\n </he-node-link>\n </th>\n </tr>\n <tr>\n <th class=\"width-auto\"></th>\n <th *ngFor=\"let measurement of measurements\"\n [attr.title]=\"measurement.value.term.units\"\n >{{measurement.value.term.units}}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let site of sites; trackBy: trackById; let i = index\">\n <td class=\"width-auto\" [attr.title]=\"defaultLabel(site)\">\n <he-node-link [node]=\"site\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{defaultLabel(site)}}</span>\n </he-node-link>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let measurement of measurements\">\n <span *ngIf=\"measurement.value.values[site['@id']]\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\" [autoClose]=\"'outside'\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"left\" container=\"body\"\n (click)=\"togglePopover(p, { data: measurement.value.values[site['@id']], site: site, key: 'measurements' })\"\n >\n <span pointer>{{measurementValue(measurement.value.values[site['@id']]) | precision:3 | default:'-'}}</span>\n <he-blank-node-state class=\"ml-1\"\n [node]=\"measurement.value.values[site['@id']].nodes[0]\"\n key=\"value\"\n ></he-blank-node-state>\n </span>\n <span *ngIf=\"!measurement.value.values[site['@id']]\">\n <span>-</span>\n <sup class=\"pl-1\" *ngIf=\"siteTooBig(site)\">(1)</sup>\n </span>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n\n <p class=\"is-size-7 is-italic\" *ngIf=\"showAreaTooBig\">\n (1) This region is >{{maxAreaSize}}km2 and is too large to reliably gap fill Measurements.\n </p>\n </div>\n\n <he-sites-measurements-logs *ngIf=\"selectedView === View.logs && !isOriginal\"\n [site]=\"sites[0]\"\n [originalValues]=\"originalValues[0].measurements\"\n [recalculatedValues]=\"sites[0].measurements\"\n ></he-sites-measurements-logs>\n</ng-container>\n\n<he-node-csv-export-confirm *ngIf=\"showDownload\"\n [nodes]=\"sites\" filename=\"site-measurements.csv\" [isUpload]=\"false\"\n [headerKeys]=\"['site.id', 'site.@id', 'site.measurements.']\"\n (closed)=\"showDownload = false\"\n></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"panel-block\">\n <span>No data</span>\n </div>\n</ng-template>\n\n<ng-template #emptyValue>\n <span>-</span>\n</ng-template>\n\n<ng-template #details let-node=\"site\" let-data=\"data\" let-key=\"key\">\n <p><b>{{node.name}}</b></p>\n <he-node-value-details\n [data]=\"data\" [nodeType]=\"node['@type']\" [dataKey]=\"key\"\n ></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}\n"], components: [{ type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink"] }, { type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["nodeType", "dataKey", "key", "node", "state"] }, { type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showDeleted"] }, { type: SitesMeasurementsLogsComponent, selector: "he-sites-measurements-logs", inputs: ["site", "originalValues", "recalculatedValues"] }, { type: NodeCsvExportConfirmComponent, selector: "he-node-csv-export-confirm", inputs: ["nodes", "filename", "headerKeys", "extension", "isUpload"], outputs: ["closed"] }, { type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: ["data", "nodeType", "dataKey"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }], pipes: { "ellipsis": EllipsisPipe, "default": DefaultPipe, "precision": PrecisionPipe } });
|
|
5166
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SitesMeasurementsComponent, decorators: [{
|
|
5167
|
-
type: i0.Component,
|
|
5168
|
-
args: [{
|
|
5169
|
-
selector: 'he-sites-measurements',
|
|
5170
|
-
templateUrl: './sites-measurements.component.html',
|
|
5171
|
-
styleUrls: ['./sites-measurements.component.scss']
|
|
5172
|
-
}]
|
|
5173
|
-
}], propDecorators: { originalValues: [{
|
|
5174
|
-
type: i0.Input
|
|
5175
|
-
}], sites: [{
|
|
5176
|
-
type: i0.Input
|
|
5177
|
-
}], dataState: [{
|
|
5178
|
-
type: i0.Input
|
|
5179
|
-
}] } });
|
|
5180
|
-
|
|
5181
|
-
var components$2 = [
|
|
5182
|
-
SitesMapsComponent,
|
|
5183
|
-
SitesMeasurementsComponent,
|
|
5184
|
-
SitesMeasurementsLogsComponent
|
|
5185
|
-
];
|
|
5186
|
-
var HeSitesModule = /** @class */ (function () {
|
|
5187
|
-
function HeSitesModule() {
|
|
5188
|
-
}
|
|
5189
|
-
return HeSitesModule;
|
|
5190
|
-
}());
|
|
5191
|
-
HeSitesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeSitesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
5192
|
-
HeSitesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeSitesModule, declarations: [SitesMapsComponent,
|
|
5193
|
-
SitesMeasurementsComponent,
|
|
5194
|
-
SitesMeasurementsLogsComponent], imports: [i3.CommonModule, i1$4.ReactiveFormsModule,
|
|
5195
|
-
HeCommonModule,
|
|
5196
|
-
HeNodeModule], exports: [SitesMapsComponent,
|
|
5197
|
-
SitesMeasurementsComponent,
|
|
5198
|
-
SitesMeasurementsLogsComponent] });
|
|
5199
|
-
HeSitesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeSitesModule, imports: [[
|
|
5200
|
-
i3.CommonModule, i1$4.ReactiveFormsModule,
|
|
5201
|
-
HeCommonModule,
|
|
5202
|
-
HeNodeModule
|
|
5203
|
-
]] });
|
|
5204
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeSitesModule, decorators: [{
|
|
5205
|
-
type: i0.NgModule,
|
|
5206
|
-
args: [{
|
|
5207
|
-
declarations: components$2,
|
|
5208
|
-
exports: components$2,
|
|
5209
|
-
imports: [
|
|
5210
|
-
i3.CommonModule, i1$4.ReactiveFormsModule,
|
|
5211
|
-
HeCommonModule,
|
|
5212
|
-
HeNodeModule
|
|
5213
|
-
]
|
|
5214
|
-
}]
|
|
5215
|
-
}] });
|
|
5216
|
-
|
|
5217
|
-
var _f;
|
|
5218
|
-
var mapErrorMessage = 'does not contain latitude and longitude';
|
|
5219
|
-
var parseDataPath = function (dataPath) {
|
|
5220
|
-
var _f = __read(dataPath.split('.')), _ = _f[0], paths = _f.slice(1);
|
|
5221
|
-
return paths.map(function (path) { return ({ path: path, label: keyToLabel(path.replace(/\[\d+\]/g, '')) }); });
|
|
5222
|
-
};
|
|
5223
|
-
var contactUsEmail = 'community@hestia.earth';
|
|
5224
|
-
var externalLink = function (href, text) { return "<a href=\"" + href + "\" target=\"_blank\">" + text + "</a>"; };
|
|
5225
|
-
var glossaryLink = function (text) { return externalLink(baseUrl() + "/glossary", text); };
|
|
5226
|
-
var glossaryTypeLink = function (type) { return externalLink(baseUrl() + "/glossary?termType=" + type, termTypeLabel(type)); };
|
|
5227
|
-
var termLink = function (_f) {
|
|
5228
|
-
var id = _f.id, name = _f.name;
|
|
5229
|
-
return externalLink(baseUrl() + "/term/" + id, name);
|
|
5230
|
-
};
|
|
5231
|
-
var nodeLink = function (_f) {
|
|
5232
|
-
var type = _f["@type"], id = _f["@id"], name = _f.name;
|
|
5233
|
-
return type && id ? "<a href=\"/" + type.toLowerCase() + "/" + id + "\" target=\"_blank\">" + (name || id) + "</a>" : null;
|
|
5234
|
-
};
|
|
5235
|
-
var schemaLink = function (type, title) {
|
|
5236
|
-
if (title === void 0) { title = type; }
|
|
5237
|
-
return "<a href=\"" + baseUrl() + "/schema/" + type + "\" target=\"_blank\">" + title + "</a>";
|
|
4803
|
+
var schemaLink = function (type, title) {
|
|
4804
|
+
if (title === void 0) { title = type; }
|
|
4805
|
+
return "<a href=\"" + baseUrl() + "/schema/" + type + "\" target=\"_blank\">" + title + "</a>";
|
|
5238
4806
|
};
|
|
5239
4807
|
var code = function (text) { return "<code>" + text + "</code>"; };
|
|
5240
4808
|
var dateFormatMessage = "should follow the ISO 8601 date format, e.g. " + code(2000) + ", or " + code('2000-12') + ", or " + code('2000-12-30');
|
|
@@ -6013,6 +5581,438 @@
|
|
|
6013
5581
|
return moment__namespace(endDate.value).locale('en-gb').subtract(cycleDuration.value, 'days').format('YYYY-MM-DD');
|
|
6014
5582
|
};
|
|
6015
5583
|
|
|
5584
|
+
var isSite = function (_a) {
|
|
5585
|
+
var type = _a["@type"], id = _a["@id"];
|
|
5586
|
+
return type === schema.NodeType.Site && !!id;
|
|
5587
|
+
};
|
|
5588
|
+
var siteLocation = function (_a) {
|
|
5589
|
+
var latitude = _a.latitude, longitude = _a.longitude;
|
|
5590
|
+
return latitude && longitude ? ({
|
|
5591
|
+
lat: latitude,
|
|
5592
|
+
lng: longitude
|
|
5593
|
+
}) : undefined;
|
|
5594
|
+
};
|
|
5595
|
+
var siteDefaultLocation = function (_a) {
|
|
5596
|
+
var region = _a.region, country = _a.country;
|
|
5597
|
+
var markers = [
|
|
5598
|
+
region ? createMarker(termLocation(region), termLocationName(region).name, undefined, 20) : undefined,
|
|
5599
|
+
country ? createMarker(termLocation(country), termLocationName(country).name, undefined, 40) : undefined
|
|
5600
|
+
].filter(Boolean);
|
|
5601
|
+
return (markers.length ? markers[0] : undefined);
|
|
5602
|
+
};
|
|
5603
|
+
var siteMarker = function (site) { return createMarker(site ? siteLocation(site) : undefined, site.name); };
|
|
5604
|
+
var sitePolygon = function (_a) {
|
|
5605
|
+
var boundary = _a.boundary;
|
|
5606
|
+
return (boundary ? polygonsFromFeature(boundary) : undefined);
|
|
5607
|
+
};
|
|
5608
|
+
var regions = function (sites) { return utils.unique(sites.map(function (_a) {
|
|
5609
|
+
var country = _a.country, region = _a.region;
|
|
5610
|
+
return region ? region['@id'] : (country ? country['@id'] : null);
|
|
5611
|
+
}).filter(Boolean)); };
|
|
5612
|
+
var defaultCenter = { lat: 0, lng: 0 };
|
|
5613
|
+
var SitesMapsComponent = /** @class */ (function () {
|
|
5614
|
+
function SitesMapsComponent(nodeService) {
|
|
5615
|
+
this.nodeService = nodeService;
|
|
5616
|
+
this.loaded = false;
|
|
5617
|
+
this.loadPolygons = true;
|
|
5618
|
+
this.sites = [];
|
|
5619
|
+
this.nodes = [];
|
|
5620
|
+
this.center = defaultCenter;
|
|
5621
|
+
this.zoom = 2;
|
|
5622
|
+
this.showNotice = true;
|
|
5623
|
+
this.googleLoaded = false;
|
|
5624
|
+
this.showNoLocation = false;
|
|
5625
|
+
}
|
|
5626
|
+
SitesMapsComponent.prototype.ngOnInit = function () {
|
|
5627
|
+
var _this = this;
|
|
5628
|
+
waitFor('google', function () {
|
|
5629
|
+
_this.googleLoaded = true;
|
|
5630
|
+
setTimeout(function () { return !_this.loaded && _this.loadData(); });
|
|
5631
|
+
});
|
|
5632
|
+
};
|
|
5633
|
+
SitesMapsComponent.prototype.ngAfterViewInit = function () {
|
|
5634
|
+
return this.googleLoaded && this.loadData();
|
|
5635
|
+
};
|
|
5636
|
+
SitesMapsComponent.prototype.loadData = function () {
|
|
5637
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5638
|
+
var sites, markers, polygons, termPolygons;
|
|
5639
|
+
var _this = this;
|
|
5640
|
+
return __generator(this, function (_a) {
|
|
5641
|
+
switch (_a.label) {
|
|
5642
|
+
case 0:
|
|
5643
|
+
// loaded data as geojson
|
|
5644
|
+
this.map.googleMap.data.setStyle(function () { return (Object.assign(Object.assign({}, strokeStyle), { strokeOpacity: 0.1 })); });
|
|
5645
|
+
return [4 /*yield*/, this.getSites()];
|
|
5646
|
+
case 1:
|
|
5647
|
+
sites = _a.sent();
|
|
5648
|
+
markers = this.addSiteMarkers(sites);
|
|
5649
|
+
polygons = sites.flatMap(sitePolygon).filter(Boolean);
|
|
5650
|
+
polygons.map(function (polygon) { return polygon === null || polygon === void 0 ? void 0 : polygon.setMap(_this.map.googleMap); });
|
|
5651
|
+
this.loaded = true;
|
|
5652
|
+
return [4 /*yield*/, Promise.all(regions(sites).map(function (v) { return _this.addTermsPolygons(v); }))];
|
|
5653
|
+
case 2:
|
|
5654
|
+
termPolygons = (_a.sent()).flat();
|
|
5655
|
+
this.showNoLocation = markers.length === 0 && polygons.length === 0 && termPolygons.length === 0;
|
|
5656
|
+
return [2 /*return*/, markers.length ?
|
|
5657
|
+
this.centerMarker(markers[0]) :
|
|
5658
|
+
this.centerPolygons(polygons.length ? polygons : termPolygons)];
|
|
5659
|
+
}
|
|
5660
|
+
});
|
|
5661
|
+
});
|
|
5662
|
+
};
|
|
5663
|
+
SitesMapsComponent.prototype.addMarkers = function (markers, cluster) {
|
|
5664
|
+
var _this = this;
|
|
5665
|
+
if (cluster === void 0) { cluster = false; }
|
|
5666
|
+
return cluster ?
|
|
5667
|
+
new MarkerClusterer__default["default"](this.map.googleMap, markers, { imagePath: clustererImage }) :
|
|
5668
|
+
markers.map(function (marker) { return marker.setMap(_this.map.googleMap); });
|
|
5669
|
+
};
|
|
5670
|
+
SitesMapsComponent.prototype.addTermsPolygons = function (id) {
|
|
5671
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5672
|
+
var _a;
|
|
5673
|
+
return __generator(this, function (_b) {
|
|
5674
|
+
switch (_b.label) {
|
|
5675
|
+
case 0:
|
|
5676
|
+
if (!this.loadPolygons) return [3 /*break*/, 2];
|
|
5677
|
+
return [4 /*yield*/, this.termPolygons(id)];
|
|
5678
|
+
case 1:
|
|
5679
|
+
_a = _b.sent();
|
|
5680
|
+
return [3 /*break*/, 3];
|
|
5681
|
+
case 2:
|
|
5682
|
+
_a = [];
|
|
5683
|
+
_b.label = 3;
|
|
5684
|
+
case 3: return [2 /*return*/, _a];
|
|
5685
|
+
}
|
|
5686
|
+
});
|
|
5687
|
+
});
|
|
5688
|
+
};
|
|
5689
|
+
SitesMapsComponent.prototype.centerMarker = function (marker) {
|
|
5690
|
+
var center = marker.getPosition();
|
|
5691
|
+
this.center = center ? { lat: center.lat(), lng: center.lng() } : defaultCenter;
|
|
5692
|
+
};
|
|
5693
|
+
SitesMapsComponent.prototype.centerPolygons = function (polygons) {
|
|
5694
|
+
try {
|
|
5695
|
+
return polygons.length ? this.map.googleMap.fitBounds(polygonBounds(polygons)) : null;
|
|
5696
|
+
}
|
|
5697
|
+
catch (err) {
|
|
5698
|
+
if (polygons.length) {
|
|
5699
|
+
this.map.googleMap.fitBounds(polygonBounds(polygons[0]));
|
|
5700
|
+
this.zoom = 3;
|
|
5701
|
+
}
|
|
5702
|
+
}
|
|
5703
|
+
};
|
|
5704
|
+
SitesMapsComponent.prototype.addSiteMarkers = function (sites) {
|
|
5705
|
+
var siteMarkers = sites.map(siteMarker).filter(Boolean);
|
|
5706
|
+
var markers = siteMarkers.length ? siteMarkers : sites.map(siteDefaultLocation).filter(Boolean);
|
|
5707
|
+
this.addMarkers(markers, !!siteMarkers.length);
|
|
5708
|
+
return markers;
|
|
5709
|
+
};
|
|
5710
|
+
SitesMapsComponent.prototype.loadSite = function (node) {
|
|
5711
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5712
|
+
var _a;
|
|
5713
|
+
return __generator(this, function (_b) {
|
|
5714
|
+
switch (_b.label) {
|
|
5715
|
+
case 0:
|
|
5716
|
+
if (!('schemaVersion' in node)) return [3 /*break*/, 1];
|
|
5717
|
+
_a = node;
|
|
5718
|
+
return [3 /*break*/, 3];
|
|
5719
|
+
case 1: return [4 /*yield*/, this.nodeService.get(node)];
|
|
5720
|
+
case 2:
|
|
5721
|
+
_a = _b.sent();
|
|
5722
|
+
_b.label = 3;
|
|
5723
|
+
case 3:
|
|
5724
|
+
// means the site was already downloaded
|
|
5725
|
+
return [2 /*return*/, _a];
|
|
5726
|
+
}
|
|
5727
|
+
});
|
|
5728
|
+
});
|
|
5729
|
+
};
|
|
5730
|
+
SitesMapsComponent.prototype.siteData = function (node) {
|
|
5731
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5732
|
+
var _a, _b, _c, _d;
|
|
5733
|
+
return __generator(this, function (_e) {
|
|
5734
|
+
switch (_e.label) {
|
|
5735
|
+
case 0:
|
|
5736
|
+
if (![
|
|
5737
|
+
schema.NodeType.Site,
|
|
5738
|
+
schema.NodeType.Organisation
|
|
5739
|
+
].includes(node.type)) return [3 /*break*/, 1];
|
|
5740
|
+
_a = node;
|
|
5741
|
+
return [3 /*break*/, 7];
|
|
5742
|
+
case 1:
|
|
5743
|
+
if (!isSite(node)) return [3 /*break*/, 2];
|
|
5744
|
+
_b = this.loadSite(node);
|
|
5745
|
+
return [3 /*break*/, 6];
|
|
5746
|
+
case 2:
|
|
5747
|
+
if (!('site' in node && isSite(node.site))) return [3 /*break*/, 3];
|
|
5748
|
+
_c = this.loadSite(node.site);
|
|
5749
|
+
return [3 /*break*/, 5];
|
|
5750
|
+
case 3:
|
|
5751
|
+
_d = this.siteData;
|
|
5752
|
+
return [4 /*yield*/, this.loadSite(node)];
|
|
5753
|
+
case 4:
|
|
5754
|
+
_c = _d.apply(this, [_e.sent()]);
|
|
5755
|
+
_e.label = 5;
|
|
5756
|
+
case 5:
|
|
5757
|
+
_b = (_c);
|
|
5758
|
+
_e.label = 6;
|
|
5759
|
+
case 6:
|
|
5760
|
+
_a = (_b);
|
|
5761
|
+
_e.label = 7;
|
|
5762
|
+
case 7: return [2 /*return*/, _a];
|
|
5763
|
+
}
|
|
5764
|
+
});
|
|
5765
|
+
});
|
|
5766
|
+
};
|
|
5767
|
+
SitesMapsComponent.prototype.getSites = function () {
|
|
5768
|
+
var _this = this;
|
|
5769
|
+
var nodes = this.sites && this.sites.length ? this.sites : this.nodes;
|
|
5770
|
+
return Promise.all(nodes.map(function (node) { return _this.siteData(node); }));
|
|
5771
|
+
};
|
|
5772
|
+
SitesMapsComponent.prototype.termPolygons = function (id) {
|
|
5773
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5774
|
+
var data, polygons, _err_1;
|
|
5775
|
+
var _this = this;
|
|
5776
|
+
return __generator(this, function (_a) {
|
|
5777
|
+
switch (_a.label) {
|
|
5778
|
+
case 0:
|
|
5779
|
+
_a.trys.push([0, 2, , 3]);
|
|
5780
|
+
return [4 /*yield*/, this.nodeService.downloadRaw(baseUrl() + "/gadm/" + id + ".geojson")];
|
|
5781
|
+
case 1:
|
|
5782
|
+
data = _a.sent();
|
|
5783
|
+
polygons = polygonsFromFeature(data);
|
|
5784
|
+
polygons.map(function (polygon) { return polygon.setMap(_this.map.googleMap); });
|
|
5785
|
+
return [2 /*return*/, polygons];
|
|
5786
|
+
case 2:
|
|
5787
|
+
_err_1 = _a.sent();
|
|
5788
|
+
// ignore error if the file does not exist
|
|
5789
|
+
return [2 /*return*/, []];
|
|
5790
|
+
case 3: return [2 /*return*/];
|
|
5791
|
+
}
|
|
5792
|
+
});
|
|
5793
|
+
});
|
|
5794
|
+
};
|
|
5795
|
+
return SitesMapsComponent;
|
|
5796
|
+
}());
|
|
5797
|
+
SitesMapsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SitesMapsComponent, deps: [{ token: HeNodeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
5798
|
+
SitesMapsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SitesMapsComponent, selector: "he-sites-maps", inputs: { loadPolygons: "loadPolygons", sites: "sites", nodes: "nodes", center: "center", zoom: "zoom", showNotice: "showNotice" }, viewQueries: [{ propertyName: "map", first: true, predicate: i1$2.GoogleMap, descendants: true }], ngImport: i0__namespace, template: "<google-map *ngIf=\"googleLoaded\"\n height=\"100%\"\n width=\"100%\"\n [zoom]=\"zoom\"\n [center]=\"center\"\n></google-map>\n\n<p *ngIf=\"showNotice\" class=\"mt-2 is-italic is-size-7\">The information provided might not be complete</p>\n\n<div class=\"no-location has-text-center has-text-light\" *ngIf=\"showNoLocation\">\n <span>No precise location data</span>\n</div>\n", styles: [":host{display:block;height:100%;position:relative;width:100%}.no-location{background-color:#0000004d;left:0;height:100%;position:absolute;top:0;width:100%;z-index:9}.no-location>span{display:inline-block;margin-top:12%}\n"], components: [{ type: i1__namespace$2.GoogleMap, selector: "google-map", inputs: ["height", "width", "center", "zoom", "options", "mapTypeId"], outputs: ["authFailure", "boundsChanged", "centerChanged", "mapClick", "mapDblclick", "mapDrag", "mapDragend", "mapDragstart", "headingChanged", "idle", "maptypeidChanged", "mapMousemove", "mapMouseout", "mapMouseover", "projectionChanged", "mapRightclick", "tilesloaded", "tiltChanged", "zoomChanged"], exportAs: ["googleMap"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
5799
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SitesMapsComponent, decorators: [{
|
|
5800
|
+
type: i0.Component,
|
|
5801
|
+
args: [{
|
|
5802
|
+
selector: 'he-sites-maps',
|
|
5803
|
+
templateUrl: './sites-maps.component.html',
|
|
5804
|
+
styleUrls: ['./sites-maps.component.scss']
|
|
5805
|
+
}]
|
|
5806
|
+
}], ctorParameters: function () { return [{ type: HeNodeService }]; }, propDecorators: { map: [{
|
|
5807
|
+
type: i0.ViewChild,
|
|
5808
|
+
args: [i1$2.GoogleMap]
|
|
5809
|
+
}], loadPolygons: [{
|
|
5810
|
+
type: i0.Input
|
|
5811
|
+
}], sites: [{
|
|
5812
|
+
type: i0.Input
|
|
5813
|
+
}], nodes: [{
|
|
5814
|
+
type: i0.Input
|
|
5815
|
+
}], center: [{
|
|
5816
|
+
type: i0.Input
|
|
5817
|
+
}], zoom: [{
|
|
5818
|
+
type: i0.Input
|
|
5819
|
+
}], showNotice: [{
|
|
5820
|
+
type: i0.Input
|
|
5821
|
+
}] } });
|
|
5822
|
+
|
|
5823
|
+
var maxAreaSize = 5000;
|
|
5824
|
+
var siteTooBig = function (_a) {
|
|
5825
|
+
var area = _a.area;
|
|
5826
|
+
return area && area / 100 > maxAreaSize;
|
|
5827
|
+
};
|
|
5828
|
+
var hasMultipleValues = function (values) { return (values || []).length > 1; };
|
|
5829
|
+
var weighedAverage = function (_a) {
|
|
5830
|
+
var value = _a.value, depthLower = _a.depthLower, depthUpper = _a.depthUpper;
|
|
5831
|
+
return value.reduce(function (prev, curr, index) { return prev + (curr * (depthLower[index] - depthUpper[index])); }, 0) /
|
|
5832
|
+
value.reduce(function (prev, _curr, index) { return prev + (depthLower[index] - depthUpper[index]); }, 0);
|
|
5833
|
+
};
|
|
5834
|
+
var measurementValue = function (_a) {
|
|
5835
|
+
var value = _a.value, depthLower = _a.depthLower, depthUpper = _a.depthUpper;
|
|
5836
|
+
return hasMultipleValues(value) && hasMultipleValues(depthLower) && hasMultipleValues(depthUpper) ?
|
|
5837
|
+
weighedAverage({ value: value, depthLower: depthLower, depthUpper: depthUpper }) :
|
|
5838
|
+
propertyValue$1(value);
|
|
5839
|
+
};
|
|
5840
|
+
|
|
5841
|
+
var SitesMeasurementsLogsComponent = /** @class */ (function () {
|
|
5842
|
+
function SitesMeasurementsLogsComponent(searchService, nodeService) {
|
|
5843
|
+
this.searchService = searchService;
|
|
5844
|
+
this.nodeService = nodeService;
|
|
5845
|
+
this.originalValues = [];
|
|
5846
|
+
this.recalculatedValues = [];
|
|
5847
|
+
this.loading = true;
|
|
5848
|
+
this.NodeType = schema.NodeType;
|
|
5849
|
+
this.models = [];
|
|
5850
|
+
this.measurements = [];
|
|
5851
|
+
}
|
|
5852
|
+
SitesMeasurementsLogsComponent.prototype.ngOnInit = function () {
|
|
5853
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5854
|
+
var _a, measurements;
|
|
5855
|
+
return __generator(this, function (_b) {
|
|
5856
|
+
switch (_b.label) {
|
|
5857
|
+
case 0:
|
|
5858
|
+
this.logsUrl = this.nodeService.nodeLogsUrl(this.node);
|
|
5859
|
+
_a = this;
|
|
5860
|
+
return [4 /*yield*/, this.nodeService.getModelsLog(this.node)];
|
|
5861
|
+
case 1:
|
|
5862
|
+
_a.logs = _b.sent();
|
|
5863
|
+
return [4 /*yield*/, this.searchService.search({
|
|
5864
|
+
fields: ['@type', '@id', 'name'],
|
|
5865
|
+
limit: 1000,
|
|
5866
|
+
query: {
|
|
5867
|
+
bool: {
|
|
5868
|
+
must: [
|
|
5869
|
+
matchType(schema.NodeType.Term),
|
|
5870
|
+
matchTermType(schema.TermTermType.measurement)
|
|
5871
|
+
]
|
|
5872
|
+
}
|
|
5873
|
+
}
|
|
5874
|
+
})];
|
|
5875
|
+
case 2:
|
|
5876
|
+
measurements = (_b.sent()).results;
|
|
5877
|
+
this.measurements = measurements;
|
|
5878
|
+
this.loading = false;
|
|
5879
|
+
return [2 /*return*/];
|
|
5880
|
+
}
|
|
5881
|
+
});
|
|
5882
|
+
});
|
|
5883
|
+
};
|
|
5884
|
+
Object.defineProperty(SitesMeasurementsLogsComponent.prototype, "node", {
|
|
5885
|
+
get: function () {
|
|
5886
|
+
return Object.assign(Object.assign({}, this.site), { dataState: api.DataState.recalculated });
|
|
5887
|
+
},
|
|
5888
|
+
enumerable: false,
|
|
5889
|
+
configurable: true
|
|
5890
|
+
});
|
|
5891
|
+
return SitesMeasurementsLogsComponent;
|
|
5892
|
+
}());
|
|
5893
|
+
SitesMeasurementsLogsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SitesMeasurementsLogsComponent, deps: [{ token: HeSearchService }, { token: HeNodeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
5894
|
+
SitesMeasurementsLogsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SitesMeasurementsLogsComponent, selector: "he-sites-measurements-logs", inputs: { site: "site", originalValues: "originalValues", recalculatedValues: "recalculatedValues" }, ngImport: i0__namespace, template: "<he-node-logs-models *ngIf=\"!loading; else loader\"\n [logsUrl]=\"logsUrl\"\n [nodeType]=\"NodeType.Site\"\n [originalValues]=\"originalValues\"\n [recalculatedValues]=\"recalculatedValues\"\n [terms]=\"measurements\"\n [logs]=\"logs\"\n filteredType=\"Measurement\"\n></he-node-logs-models>\n\n<ng-template #loader>\n <div class=\"has-text-center py-3\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"lg\"></fa-icon>\n </div>\n</ng-template>\n", styles: [""], components: [{ type: NodeLogsModelsComponent, selector: "he-node-logs-models", inputs: ["nodeType", "nodeKey", "logsUrl", "originalValues", "recalculatedValues", "terms", "logs", "filteredType"] }, { type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
5895
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SitesMeasurementsLogsComponent, decorators: [{
|
|
5896
|
+
type: i0.Component,
|
|
5897
|
+
args: [{
|
|
5898
|
+
selector: 'he-sites-measurements-logs',
|
|
5899
|
+
templateUrl: './sites-measurements-logs.component.html',
|
|
5900
|
+
styleUrls: ['./sites-measurements-logs.component.scss']
|
|
5901
|
+
}]
|
|
5902
|
+
}], ctorParameters: function () { return [{ type: HeSearchService }, { type: HeNodeService }]; }, propDecorators: { site: [{
|
|
5903
|
+
type: i0.Input
|
|
5904
|
+
}], originalValues: [{
|
|
5905
|
+
type: i0.Input
|
|
5906
|
+
}], recalculatedValues: [{
|
|
5907
|
+
type: i0.Input
|
|
5908
|
+
}] } });
|
|
5909
|
+
|
|
5910
|
+
var orderBy$1 = require('lodash.orderby');
|
|
5911
|
+
var View$1;
|
|
5912
|
+
(function (View) {
|
|
5913
|
+
View["table"] = "table";
|
|
5914
|
+
View["logs"] = "logs";
|
|
5915
|
+
})(View$1 || (View$1 = {}));
|
|
5916
|
+
var SitesMeasurementsComponent = /** @class */ (function () {
|
|
5917
|
+
function SitesMeasurementsComponent() {
|
|
5918
|
+
this.originalValues = [];
|
|
5919
|
+
this.sites = [];
|
|
5920
|
+
this.showDownload = false;
|
|
5921
|
+
this.View = View$1;
|
|
5922
|
+
this.selectedView = View$1.table;
|
|
5923
|
+
this.maxAreaSize = maxAreaSize;
|
|
5924
|
+
this.siteTooBig = siteTooBig;
|
|
5925
|
+
this.defaultLabel = defaultLabel;
|
|
5926
|
+
this.measurementValue = measurementValue;
|
|
5927
|
+
this.measurements = [];
|
|
5928
|
+
}
|
|
5929
|
+
SitesMeasurementsComponent.prototype.ngOnChanges = function (changes) {
|
|
5930
|
+
if ('sites' in changes) {
|
|
5931
|
+
return this.update();
|
|
5932
|
+
}
|
|
5933
|
+
if ('dataState' in changes) {
|
|
5934
|
+
this.selectedView = View$1.table;
|
|
5935
|
+
}
|
|
5936
|
+
};
|
|
5937
|
+
SitesMeasurementsComponent.prototype.trackById = function (_index, item) {
|
|
5938
|
+
return item['@id'];
|
|
5939
|
+
};
|
|
5940
|
+
Object.defineProperty(SitesMeasurementsComponent.prototype, "isOriginal", {
|
|
5941
|
+
get: function () {
|
|
5942
|
+
return this.dataState === api.DataState.original;
|
|
5943
|
+
},
|
|
5944
|
+
enumerable: false,
|
|
5945
|
+
configurable: true
|
|
5946
|
+
});
|
|
5947
|
+
SitesMeasurementsComponent.prototype.update = function () {
|
|
5948
|
+
var measurementsPerSite = groupNodesByTerm(this.sites, 'measurements', this.originalValues);
|
|
5949
|
+
this.measurements = orderBy$1(grouppedKeys(measurementsPerSite), ['key'], ['asc']);
|
|
5950
|
+
};
|
|
5951
|
+
SitesMeasurementsComponent.prototype.togglePopover = function (popover, context) {
|
|
5952
|
+
return popover.isOpen() ? popover.close() : popover.open(context);
|
|
5953
|
+
};
|
|
5954
|
+
Object.defineProperty(SitesMeasurementsComponent.prototype, "showAreaTooBig", {
|
|
5955
|
+
get: function () {
|
|
5956
|
+
return this.dataState === api.DataState.recalculated && (this.sites || []).some(siteTooBig);
|
|
5957
|
+
},
|
|
5958
|
+
enumerable: false,
|
|
5959
|
+
configurable: true
|
|
5960
|
+
});
|
|
5961
|
+
return SitesMeasurementsComponent;
|
|
5962
|
+
}());
|
|
5963
|
+
SitesMeasurementsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SitesMeasurementsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
5964
|
+
SitesMeasurementsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SitesMeasurementsComponent, selector: "he-sites-measurements", inputs: { originalValues: "originalValues", sites: "sites", dataState: "dataState" }, usesOnChanges: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"measurements.length; else emptyTable\">\n <div class=\"columns is-variable is-2 m-0\">\n <div class=\"column is-hidden-mobile\"></div>\n <div class=\"column is-narrow\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.table\" (click)=\"selectedView = View.table\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"list\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>Table view</span>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"!isOriginal && sites.length === 1\">\n <button class=\"button is-small\" [class.is-active]=\"selectedView === View.logs\" (click)=\"selectedView = View.logs\">\n <span class=\"icon is-small\">\n <fa-icon icon=\"calculator\" aria-hidden=\"true\"></fa-icon>\n </span>\n <span>Recalculations logs</span>\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"px-3 pb-3\" [class.is-hidden]=\"selectedView !== View.table\">\n <div class=\"has-text-right mb-2\">\n <button class=\"button is-dark is-outlined is-small\" (click)=\"showDownload = true\">\n <fa-icon icon=\"download\"></fa-icon>\n <span class=\"pl-2\">Download (CSV)</span>\n </button>\n </div>\n\n <div class=\"table-container data-table-container mb-1\">\n <table class=\"table is-narrow data-table has-children-{{measurements.length}}\">\n <thead>\n <tr>\n <th class=\"width-auto\"></th>\n <th *ngFor=\"let measurement of measurements\"\n [attr.title]=\"measurement.value.term.name\"\n >\n <he-node-link [node]=\"measurement.value.term\">\n <span>{{measurement.value.term.name | ellipsis:30}}</span>\n </he-node-link>\n </th>\n </tr>\n <tr>\n <th class=\"width-auto\"></th>\n <th *ngFor=\"let measurement of measurements\"\n [attr.title]=\"measurement.value.term.units\"\n >{{measurement.value.term.units}}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let site of sites; trackBy: trackById; let i = index\">\n <td class=\"width-auto\" [attr.title]=\"defaultLabel(site)\">\n <he-node-link [node]=\"site\">\n <span class=\"is-nowrap has-text-ellipsis\">{{i + 1}}. {{defaultLabel(site)}}</span>\n </he-node-link>\n </td>\n <td class=\"is-nowrap\" *ngFor=\"let measurement of measurements\">\n <span *ngIf=\"measurement.value.values[site['@id']]\"\n class=\"trigger-popover\"\n [ngbPopover]=\"details\" [autoClose]=\"'outside'\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"left\" container=\"body\"\n (click)=\"togglePopover(p, { data: measurement.value.values[site['@id']], site: site, key: 'measurements' })\"\n >\n <span pointer>{{measurementValue(measurement.value.values[site['@id']]) | precision:3 | default:'-'}}</span>\n <he-blank-node-state class=\"ml-1\"\n [node]=\"measurement.value.values[site['@id']].nodes[0]\"\n key=\"value\"\n ></he-blank-node-state>\n </span>\n <span *ngIf=\"!measurement.value.values[site['@id']]\">\n <span>-</span>\n <sup class=\"pl-1\" *ngIf=\"siteTooBig(site)\">(1)</sup>\n </span>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <he-blank-node-state-notice [dataState]=\"dataState\"></he-blank-node-state-notice>\n\n <p class=\"is-size-7 is-italic\" *ngIf=\"showAreaTooBig\">\n (1) This region is >{{maxAreaSize}}km2 and is too large to reliably gap fill Measurements.\n </p>\n </div>\n\n <he-sites-measurements-logs *ngIf=\"selectedView === View.logs && !isOriginal\"\n [site]=\"sites[0]\"\n [originalValues]=\"originalValues[0].measurements\"\n [recalculatedValues]=\"sites[0].measurements\"\n ></he-sites-measurements-logs>\n</ng-container>\n\n<he-node-csv-export-confirm *ngIf=\"showDownload\"\n [nodes]=\"sites\" filename=\"site-measurements.csv\" [isUpload]=\"false\"\n [headerKeys]=\"['site.id', 'site.@id', 'site.measurements.']\"\n (closed)=\"showDownload = false\"\n></he-node-csv-export-confirm>\n\n<ng-template #emptyTable>\n <div class=\"panel-block\">\n <span>No data</span>\n </div>\n</ng-template>\n\n<ng-template #emptyValue>\n <span>-</span>\n</ng-template>\n\n<ng-template #details let-node=\"site\" let-data=\"data\" let-key=\"key\">\n <p><b>{{node.name}}</b></p>\n <he-node-value-details\n [data]=\"data\" [nodeType]=\"node['@type']\" [dataKey]=\"key\"\n ></he-node-value-details>\n</ng-template>\n", styles: ["fa-icon{display:inline-block;width:10px}\n"], components: [{ type: i1__namespace.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink"] }, { type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["nodeType", "dataKey", "key", "node", "state"] }, { type: BlankNodeStateNoticeComponent, selector: "he-blank-node-state-notice", inputs: ["dataState", "showDeleted"] }, { type: SitesMeasurementsLogsComponent, selector: "he-sites-measurements-logs", inputs: ["site", "originalValues", "recalculatedValues"] }, { type: NodeCsvExportConfirmComponent, selector: "he-node-csv-export-confirm", inputs: ["nodes", "filename", "headerKeys", "extension", "isUpload"], outputs: ["closed"] }, { type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: ["data", "nodeType", "dataKey"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }], pipes: { "ellipsis": EllipsisPipe, "default": DefaultPipe, "precision": PrecisionPipe } });
|
|
5965
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SitesMeasurementsComponent, decorators: [{
|
|
5966
|
+
type: i0.Component,
|
|
5967
|
+
args: [{
|
|
5968
|
+
selector: 'he-sites-measurements',
|
|
5969
|
+
templateUrl: './sites-measurements.component.html',
|
|
5970
|
+
styleUrls: ['./sites-measurements.component.scss']
|
|
5971
|
+
}]
|
|
5972
|
+
}], propDecorators: { originalValues: [{
|
|
5973
|
+
type: i0.Input
|
|
5974
|
+
}], sites: [{
|
|
5975
|
+
type: i0.Input
|
|
5976
|
+
}], dataState: [{
|
|
5977
|
+
type: i0.Input
|
|
5978
|
+
}] } });
|
|
5979
|
+
|
|
5980
|
+
var components$2 = [
|
|
5981
|
+
SitesMapsComponent,
|
|
5982
|
+
SitesMeasurementsComponent,
|
|
5983
|
+
SitesMeasurementsLogsComponent
|
|
5984
|
+
];
|
|
5985
|
+
var HeSitesModule = /** @class */ (function () {
|
|
5986
|
+
function HeSitesModule() {
|
|
5987
|
+
}
|
|
5988
|
+
return HeSitesModule;
|
|
5989
|
+
}());
|
|
5990
|
+
HeSitesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeSitesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
5991
|
+
HeSitesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeSitesModule, declarations: [SitesMapsComponent,
|
|
5992
|
+
SitesMeasurementsComponent,
|
|
5993
|
+
SitesMeasurementsLogsComponent], imports: [i3.CommonModule, i1$4.ReactiveFormsModule,
|
|
5994
|
+
HeCommonModule,
|
|
5995
|
+
HeNodeModule], exports: [SitesMapsComponent,
|
|
5996
|
+
SitesMeasurementsComponent,
|
|
5997
|
+
SitesMeasurementsLogsComponent] });
|
|
5998
|
+
HeSitesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeSitesModule, imports: [[
|
|
5999
|
+
i3.CommonModule, i1$4.ReactiveFormsModule,
|
|
6000
|
+
HeCommonModule,
|
|
6001
|
+
HeNodeModule
|
|
6002
|
+
]] });
|
|
6003
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeSitesModule, decorators: [{
|
|
6004
|
+
type: i0.NgModule,
|
|
6005
|
+
args: [{
|
|
6006
|
+
declarations: components$2,
|
|
6007
|
+
exports: components$2,
|
|
6008
|
+
imports: [
|
|
6009
|
+
i3.CommonModule, i1$4.ReactiveFormsModule,
|
|
6010
|
+
HeCommonModule,
|
|
6011
|
+
HeNodeModule
|
|
6012
|
+
]
|
|
6013
|
+
}]
|
|
6014
|
+
}] });
|
|
6015
|
+
|
|
6016
6016
|
var user = {};
|
|
6017
6017
|
var HeUsersService = /** @class */ (function () {
|
|
6018
6018
|
function HeUsersService() {
|
|
@@ -7309,6 +7309,7 @@
|
|
|
7309
7309
|
* Generated bundle index. Do not edit.
|
|
7310
7310
|
*/
|
|
7311
7311
|
|
|
7312
|
+
exports.ARRAY_DELIMITER = ARRAY_DELIMITER;
|
|
7312
7313
|
exports.BibliographiesSearchConfirmComponent = BibliographiesSearchConfirmComponent;
|
|
7313
7314
|
exports.BindOnceDirective = BindOnceDirective;
|
|
7314
7315
|
exports.BlankNodeDiffsComponent = BlankNodeDiffsComponent;
|
|
@@ -7391,43 +7392,68 @@
|
|
|
7391
7392
|
exports.availableProperties = availableProperties;
|
|
7392
7393
|
exports.baseUrl = baseUrl;
|
|
7393
7394
|
exports.bottom = bottom;
|
|
7395
|
+
exports.calculateCycleDuration = calculateCycleDuration;
|
|
7396
|
+
exports.calculateCycleDurationEnabled = calculateCycleDurationEnabled;
|
|
7397
|
+
exports.calculateCycleStartDate = calculateCycleStartDate;
|
|
7398
|
+
exports.calculateCycleStartDateEnabled = calculateCycleStartDateEnabled;
|
|
7394
7399
|
exports.clustererImage = clustererImage;
|
|
7400
|
+
exports.code = code;
|
|
7395
7401
|
exports.coordinatesToPoint = coordinatesToPoint;
|
|
7396
7402
|
exports.countriesQuery = countriesQuery;
|
|
7397
7403
|
exports.createMarker = createMarker;
|
|
7398
7404
|
exports.cropsQuery = cropsQuery;
|
|
7405
|
+
exports.dataPathToKey = dataPathToKey;
|
|
7399
7406
|
exports.dataValue = dataValue;
|
|
7400
7407
|
exports.defaultFeature = defaultFeature;
|
|
7401
7408
|
exports.defaultLabel = defaultLabel;
|
|
7409
|
+
exports.defaultSuggestionType = defaultSuggestionType;
|
|
7402
7410
|
exports.definitionToSchemaType = definitionToSchemaType;
|
|
7403
7411
|
exports.delta = delta;
|
|
7404
7412
|
exports.deserializeSearchFilters = deserializeSearchFilters;
|
|
7405
7413
|
exports.ellipsis = ellipsis;
|
|
7406
7414
|
exports.emptyValue = emptyValue;
|
|
7415
|
+
exports.errorHasError = errorHasError;
|
|
7416
|
+
exports.errorHasWarning = errorHasWarning;
|
|
7407
7417
|
exports.errorText = errorText;
|
|
7408
7418
|
exports.filenameWithoutExt = filenameWithoutExt;
|
|
7409
7419
|
exports.fillColor = fillColor;
|
|
7410
7420
|
exports.fillStyle = fillStyle;
|
|
7421
|
+
exports.filterError = filterError;
|
|
7411
7422
|
exports.filterParams = filterParams;
|
|
7423
|
+
exports.findConfigModels = findConfigModels;
|
|
7424
|
+
exports.findProperty = findProperty;
|
|
7412
7425
|
exports.findPropertyById = findPropertyById;
|
|
7426
|
+
exports.formatCustomErrorMessage = formatCustomErrorMessage;
|
|
7427
|
+
exports.formatError = formatError;
|
|
7428
|
+
exports.formatLinkNodesSuggestions = formatLinkNodesSuggestions;
|
|
7429
|
+
exports.formatPropertyError = formatPropertyError;
|
|
7430
|
+
exports.formatSuggestion = formatSuggestion;
|
|
7413
7431
|
exports.gitBranch = gitBranch;
|
|
7414
7432
|
exports.gitHome = gitHome;
|
|
7415
7433
|
exports.gitRawBaseUrl = gitRawBaseUrl;
|
|
7434
|
+
exports.groupChanged = groupChanged;
|
|
7416
7435
|
exports.groupNodesByTerm = groupNodesByTerm;
|
|
7417
7436
|
exports.grouppedKeys = grouppedKeys;
|
|
7418
7437
|
exports.grouppedValueKeys = grouppedValueKeys;
|
|
7419
7438
|
exports.handleAPIError = handleAPIError;
|
|
7439
|
+
exports.hasError = hasError;
|
|
7440
|
+
exports.hasWarning = hasWarning;
|
|
7441
|
+
exports.isAddPropertyEnabled = isAddPropertyEnabled;
|
|
7420
7442
|
exports.isChrome = isChrome;
|
|
7421
7443
|
exports.isExternal = isExternal;
|
|
7444
|
+
exports.isMissingOneOfError = isMissingOneOfError;
|
|
7445
|
+
exports.isMissingPropertyError = isMissingPropertyError;
|
|
7422
7446
|
exports.isSchemaIri = isSchemaIri;
|
|
7423
7447
|
exports.isScrolledBelow = isScrolledBelow;
|
|
7424
7448
|
exports.itemColor = itemColor;
|
|
7449
|
+
exports.keyToDataPath = keyToDataPath;
|
|
7425
7450
|
exports.keyToLabel = keyToLabel;
|
|
7426
7451
|
exports.levels = levels;
|
|
7427
7452
|
exports.linkTypeEnabled = linkTypeEnabled;
|
|
7428
7453
|
exports.listColor = listColor;
|
|
7429
7454
|
exports.locationQuery = locationQuery;
|
|
7430
7455
|
exports.lookupUrl = lookupUrl;
|
|
7456
|
+
exports.lookups = lookups;
|
|
7431
7457
|
exports.mapsUrl = mapsUrl;
|
|
7432
7458
|
exports.markerIcon = markerIcon;
|
|
7433
7459
|
exports.markerPie = markerPie;
|
|
@@ -7447,22 +7473,36 @@
|
|
|
7447
7473
|
exports.matchType = matchType;
|
|
7448
7474
|
exports.maxAreaSize = maxAreaSize;
|
|
7449
7475
|
exports.measurementValue = measurementValue;
|
|
7476
|
+
exports.missingNodeErrorMessage = missingNodeErrorMessage;
|
|
7477
|
+
exports.missingNodeErrors = missingNodeErrors;
|
|
7450
7478
|
exports.multiMatchQuery = multiMatchQuery;
|
|
7479
|
+
exports.nestedProperty = nestedProperty;
|
|
7451
7480
|
exports.nestingEnabled = nestingEnabled;
|
|
7452
7481
|
exports.nestingTypeEnabled = nestingTypeEnabled;
|
|
7482
|
+
exports.nodeAvailableProperties = nodeAvailableProperties;
|
|
7483
|
+
exports.nodeLink = nodeLink;
|
|
7453
7484
|
exports.nodeLogsUrl = nodeLogsUrl;
|
|
7454
7485
|
exports.nodeUrl = nodeUrl;
|
|
7455
7486
|
exports.numberGte = numberGte;
|
|
7487
|
+
exports.parentKey = parentKey;
|
|
7488
|
+
exports.parentProperty = parentProperty;
|
|
7456
7489
|
exports.parseData = parseData;
|
|
7490
|
+
exports.parseDataPath = parseDataPath;
|
|
7457
7491
|
exports.parseLines = parseLines;
|
|
7458
7492
|
exports.parseMessage = parseMessage;
|
|
7493
|
+
exports.parseNewValue = parseNewValue;
|
|
7494
|
+
exports.pathToApiDocsPath = pathToApiDocsPath;
|
|
7459
7495
|
exports.pointToCoordinates = pointToCoordinates;
|
|
7460
7496
|
exports.polygonBounds = polygonBounds;
|
|
7461
7497
|
exports.polygonToCoordinates = polygonToCoordinates;
|
|
7462
7498
|
exports.polygonsFromFeature = polygonsFromFeature;
|
|
7463
7499
|
exports.primaryProduct = primaryProduct;
|
|
7500
|
+
exports.propertyError = propertyError;
|
|
7501
|
+
exports.propertyId = propertyId;
|
|
7464
7502
|
exports.propertyValue = propertyValue$1;
|
|
7503
|
+
exports.recursiveProperties = recursiveProperties;
|
|
7465
7504
|
exports.refToSchemaType = refToSchemaType;
|
|
7505
|
+
exports.refreshPropertyKeys = refreshPropertyKeys;
|
|
7466
7506
|
exports.regionsQuery = regionsQuery;
|
|
7467
7507
|
exports.repeat = repeat;
|
|
7468
7508
|
exports.roundValue = roundValue;
|
|
@@ -7476,8 +7516,11 @@
|
|
|
7476
7516
|
exports.searchResultsFields = searchResultsFields;
|
|
7477
7517
|
exports.searchableTypes = searchableTypes;
|
|
7478
7518
|
exports.serializeSearchFilters = serializeSearchFilters;
|
|
7519
|
+
exports.siblingProperty = siblingProperty;
|
|
7520
|
+
exports.singleProperty = singleProperty;
|
|
7479
7521
|
exports.siteTooBig = siteTooBig;
|
|
7480
7522
|
exports.sortOrder = sortOrder;
|
|
7523
|
+
exports.sortProperties = sortProperties;
|
|
7481
7524
|
exports.strokeColor = strokeColor;
|
|
7482
7525
|
exports.strokeStyle = strokeStyle;
|
|
7483
7526
|
exports.suggestMatchQuery = suggestMatchQuery;
|
|
@@ -7491,6 +7534,8 @@
|
|
|
7491
7534
|
exports.termTypeLookupUrl = termTypeLookupUrl;
|
|
7492
7535
|
exports.toCsv = toCsv$1;
|
|
7493
7536
|
exports.toDashCase = toDashCase;
|
|
7537
|
+
exports.typeToNewProperty = typeToNewProperty;
|
|
7538
|
+
exports.updateProperties = updateProperties;
|
|
7494
7539
|
exports.valueTypeToDefault = valueTypeToDefault;
|
|
7495
7540
|
exports.waitFor = waitFor;
|
|
7496
7541
|
exports.wildcardQuery = wildcardQuery;
|