@hestia-earth/ui-components 0.0.22 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/bundles/hestia-earth-ui-components.umd.js +259 -168
  2. package/bundles/hestia-earth-ui-components.umd.js.map +1 -1
  3. package/common/blank-node-value-delta/blank-node-value-delta.component.d.ts +1 -1
  4. package/common/delta-utils.d.ts +0 -14
  5. package/common/utils.d.ts +0 -4
  6. package/engine/engine-orchestrator-edit/engine-orchestrator-edit.component.d.ts +19 -0
  7. package/engine/engine.module.d.ts +10 -0
  8. package/engine/engine.service.d.ts +12 -1
  9. package/engine/index.d.ts +2 -0
  10. package/esm2015/common/blank-node-value-delta/blank-node-value-delta.component.js +4 -3
  11. package/esm2015/common/delta-utils.js +1 -41
  12. package/esm2015/common/utils.js +2 -23
  13. package/esm2015/cycles/cycles-activity/cycles-activity.component.js +3 -2
  14. package/esm2015/cycles/cycles-completeness/cycles-completeness.component.js +4 -3
  15. package/esm2015/cycles/cycles-emissions/cycles-emissions.component.js +3 -2
  16. package/esm2015/cycles/cycles-emissions-chart/cycles-emissions-chart.component.js +3 -2
  17. package/esm2015/cycles/cycles-practices/cycles-practices.component.js +3 -2
  18. package/esm2015/cycles/cycles-result/cycles-result.component.js +3 -2
  19. package/esm2015/engine/engine-orchestrator-edit/engine-orchestrator-edit.component.js +61 -0
  20. package/esm2015/engine/engine.module.js +33 -0
  21. package/esm2015/engine/engine.service.js +26 -7
  22. package/esm2015/engine/index.js +3 -1
  23. package/esm2015/files/files-error.model.js +8 -5
  24. package/esm2015/files/files-form/files-form.component.js +33 -6
  25. package/esm2015/files/files-form.model.js +1 -8
  26. package/esm2015/impact-assessments/impact-assessments-products/impact-assessments-products.component.js +3 -3
  27. package/esm2015/impact-assessments/impact-assessments-products-logs/impact-assessments-products-logs.component.js +6 -2
  28. package/esm2015/node/node-logs-models/node-logs-models.component.js +14 -5
  29. package/esm2015/sites/sites.model.js +2 -2
  30. package/esm2015/tags-input/index.js +2 -1
  31. package/esm2015/terms/terms.model.js +2 -2
  32. package/fesm2015/hestia-earth-ui-components.js +174 -104
  33. package/fesm2015/hestia-earth-ui-components.js.map +1 -1
  34. package/files/files-form/files-form.component.d.ts +13 -1
  35. package/files/files-form.model.d.ts +0 -14
  36. package/impact-assessments/impact-assessments-products-logs/impact-assessments-products-logs.component.d.ts +3 -2
  37. package/package.json +6 -6
@@ -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('@angular/platform-browser'), require('rxjs'), require('random-material-color'), require('@hestia-earth/schema'), require('@hestia-earth/api'), require('@hestia-earth/utils'), require('@hestia-earth/glossary'), require('pluralize'), require('rxjs/operators'), require('csvtojson'), require('@angular/common/http'), 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', '@angular/platform-browser', 'rxjs', 'random-material-color', '@hestia-earth/schema', '@hestia-earth/api', '@hestia-earth/utils', '@hestia-earth/glossary', 'pluralize', 'rxjs/operators', 'csvtojson', '@angular/common/http', '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.ng.platformBrowser, global.rxjs, global.randomMaterialColor, global.schema, global.api, global.utils, global.glossary, global.pluralize, global.rxjs.operators, global.csvtojson, global.ng.common.http, global.json2Csv, global.ng.cdk.dragDrop, global.schemaConvert, global.schemaUtils, global.jsondiffpatch, global.chart_js, global.moment, null, global.uuid$1, global.MarkerClusterer, global.ChartDataLabels));
5
- })(this, (function (exports, i0, i6, i1$2, i5, i10, i1$4, i1, freeRegularSvgIcons, freeSolidSvgIcons, i1$1, rxjs, randomMaterialColor, schema, api, utils, glossary, pluralize, operators, csvtojson, i1$3, json2Csv, i6$1, schemaConvert, schemaUtils, jsondiffpatch, chart_js, moment, enGb, uuid$1, MarkerClusterer, ChartDataLabels) { 'use strict';
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('@angular/platform-browser'), require('rxjs'), require('random-material-color'), require('@hestia-earth/schema'), require('@hestia-earth/api'), require('@hestia-earth/utils/dist/term'), require('@hestia-earth/utils'), require('pluralize'), require('rxjs/operators'), require('csvtojson'), require('@angular/common/http'), require('@hestia-earth/utils/dist/delta'), 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', '@angular/platform-browser', 'rxjs', 'random-material-color', '@hestia-earth/schema', '@hestia-earth/api', '@hestia-earth/utils/dist/term', '@hestia-earth/utils', 'pluralize', 'rxjs/operators', 'csvtojson', '@angular/common/http', '@hestia-earth/utils/dist/delta', '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.ng.platformBrowser, global.rxjs, global.randomMaterialColor, global.schema, global.api, global.term, global.utils, global.pluralize, global.rxjs.operators, global.csvtojson, global.ng.common.http, global.delta, global.json2Csv, global.ng.cdk.dragDrop, global.schemaConvert, global.schemaUtils, global.jsondiffpatch, global.chart_js, global.moment, null, global.uuid$1, global.MarkerClusterer, global.ChartDataLabels));
5
+ })(this, (function (exports, i0, i6, i1$2, i5, i10, i1$4, i1, freeRegularSvgIcons, freeSolidSvgIcons, i1$1, rxjs, randomMaterialColor, schema, api, term, utils, pluralize, operators, csvtojson, i1$3, delta, json2Csv, i6$1, schemaConvert, schemaUtils, jsondiffpatch, chart_js, moment, enGb, uuid$1, MarkerClusterer, ChartDataLabels) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -571,7 +571,7 @@
571
571
  }]
572
572
  }] });
573
573
 
574
- var _c$3;
574
+ var _c$2;
575
575
  var get$5 = require('lodash.get');
576
576
  var gitHome = 'https://gitlab.com/hestia-earth';
577
577
  var gitRawBaseUrl = 'https://glcdn.githack.com/hestia-earth';
@@ -636,11 +636,6 @@
636
636
  };
637
637
  var safeJSONStringify = function (value) { return typeof value === 'string' ? value : JSON.stringify(value); };
638
638
  var arrayValue = function (values, isAverage) { return (values || []).reduce(function (prev, curr) { return prev + parseFloat("" + curr); }, 0) / (isAverage ? values.length : 1); };
639
- var propertyValue$1 = function (value, termId) { return typeof value === 'undefined' || value === null ?
640
- null :
641
- (Array.isArray(value) ?
642
- arrayValue(value, (termId ? glossary.getArrayTreatment(termId) : null) === 'mean') :
643
- parseFloat("" + value)); };
644
639
  ;
645
640
  ;
646
641
  var grouppedKeys = function (values) { return Object.entries(values).map(function (_c) {
@@ -696,7 +691,7 @@
696
691
  var originalValue = get$5(originalValues, "[" + index + "]." + key, []).filter(function (val) { return val.term['@id'] === termId; });
697
692
  if (originalValue.length > 0) {
698
693
  var value = originalValue.reduce(function (array, curr) { return concatBlankNodeValue(array, curr.value); }, []);
699
- group.originalValues[nodeId] = { value: propertyValue$1(value, termId) };
694
+ group.originalValues[nodeId] = { value: term.propertyValue(value, termId) };
700
695
  }
701
696
  });
702
697
  });
@@ -711,22 +706,8 @@
711
706
  var mapsUrl = function (location) { return location ? (location.lat && location.lng ?
712
707
  "" + mapsQuery + location.lat + "," + location.lng :
713
708
  (location.name ? "" + mapsQuery + encodeURI(location.name) : undefined)) : undefined; };
714
- var keyToLabel = function (key) { return "" + key[0].toUpperCase() + key.replace(/([a-z])([A-Z])/g, '$1 $2')
715
- .replace(/([_])([a-zA-Z])/g, function (g) { return " " + g[1].toUpperCase(); })
716
- .substring(1); };
717
- var toDashCase = function (value) { return value ?
718
- value
719
- // handle dates followed by capital letter
720
- .replace(/([\d]{4})([A-Z]{1})/g, function (g) { return g.substring(0, 4) + "-" + g[4].toLowerCase(); })
721
- // handle molecules
722
- .replace(/([\d]{1}[A-Z]{1})/g, function (g) { return g.toLowerCase(); })
723
- // handle all capital letters
724
- .replace(/([A-Z])/g, function (g) { return "-" + g[0].toLowerCase(); })
725
- // handle years
726
- .replace(/([0-9]{4})/g, function (g) { return "-" + g; }) :
727
- null; };
728
- var nodeDefaultLabel = (_c$3 = {},
729
- _c$3[schema.NodeType.ImpactAssessment] = function (_c) {
709
+ var nodeDefaultLabel = (_c$2 = {},
710
+ _c$2[schema.NodeType.ImpactAssessment] = function (_c) {
730
711
  var name = _c.name, country = _c.country, endDate = _c.endDate, product = _c.product;
731
712
  return name ? name.replace((product === null || product === void 0 ? void 0 : product.name) + ", ", '') : [
732
713
  product === null || product === void 0 ? void 0 : product.name,
@@ -734,15 +715,14 @@
734
715
  endDate
735
716
  ].filter(Boolean).join(', ');
736
717
  },
737
- _c$3[schema.NodeType.Site] = function (_c) {
718
+ _c$2[schema.NodeType.Site] = function (_c) {
738
719
  var name = _c.name, description = _c.description;
739
720
  return name || description;
740
721
  },
741
- _c$3);
722
+ _c$2);
742
723
  var defaultLabel = function (node) { return node ? (node['@type'] in nodeDefaultLabel ? nodeDefaultLabel[node['@type']](node) : node.name) || node['@id'] || node.id : ''; };
743
724
  var itemColor = function (index) { return randomMaterialColor.getColor({ text: "" + index }); };
744
725
  var listColor = function (_v, index) { return itemColor(index); };
745
- var emptyValue = function (value) { return utils.isEmpty(value) || isNaN(propertyValue$1(value)); };
746
726
  var repeat = function (times) {
747
727
  if (times === void 0) { times = 0; }
748
728
  return (Array.from(Array(times), Math.random));
@@ -771,7 +751,7 @@
771
751
  }]
772
752
  }] });
773
753
 
774
- var _a$5, _b$2, _c$2;
754
+ var _a$4, _b$1, _c$1;
775
755
  var termProperties = function (term) { return Object.keys(term).filter(function (key) { return !schema.isExpandable(term[key]) && ![
776
756
  'pinned', 'expanded', 'extended', 'selected', 'loading',
777
757
  '_score', '@type', '@id', '@context', 'createdAt',
@@ -797,20 +777,20 @@
797
777
  lng: longitude
798
778
  });
799
779
  };
800
- var termTypeToLabel = (_a$5 = {},
801
- _a$5[schema.TermTermType.methodEmissionResourceUse] = 'Method (Emissions)',
802
- _a$5[schema.TermTermType.methodMeasurement] = 'Method (Measurement)',
803
- _a$5[schema.TermTermType.pesticideAI] = 'Pesticide Active Ingredient',
804
- _a$5[schema.TermTermType.standardsLabels] = 'Standards & Labels',
805
- _a$5[schema.TermTermType.usdaSoilType] = 'USDA Soil Type',
806
- _a$5);
780
+ var termTypeToLabel = (_a$4 = {},
781
+ _a$4[schema.TermTermType.methodEmissionResourceUse] = 'Method (Emissions)',
782
+ _a$4[schema.TermTermType.methodMeasurement] = 'Method (Measurement)',
783
+ _a$4[schema.TermTermType.pesticideAI] = 'Pesticide Active Ingredient',
784
+ _a$4[schema.TermTermType.standardsLabels] = 'Standards & Labels',
785
+ _a$4[schema.TermTermType.usdaSoilType] = 'USDA Soil Type',
786
+ _a$4);
807
787
  var termTypeLabel = function (type) {
808
788
  if (type === void 0) { type = 'N/A'; }
809
- return type in termTypeToLabel ? termTypeToLabel[type] : keyToLabel(type);
789
+ return type in termTypeToLabel ? termTypeToLabel[type] : utils.keyToLabel(type);
810
790
  };
811
791
  var termTypesToChildren = function (termTypes) { return termTypes.map(function (termType) { return ({ label: termTypeLabel(termType), termType: termType }); }); };
812
- var groups = Object.freeze((_b$2 = {},
813
- _b$2[schema.TermTermType.emission] = {
792
+ var groups = Object.freeze((_b$1 = {},
793
+ _b$1[schema.TermTermType.emission] = {
814
794
  label: 'Emissions & Resource Use',
815
795
  termType: 'Emissions & Resource Use',
816
796
  children: termTypesToChildren([
@@ -822,12 +802,12 @@
822
802
  schema.TermTermType.methodEmissionResourceUse
823
803
  ])
824
804
  },
825
- _b$2[schema.TermTermType.region] = {
805
+ _b$1[schema.TermTermType.region] = {
826
806
  label: termTypeLabel(schema.TermTermType.region),
827
807
  termType: schema.TermTermType.region,
828
808
  children: []
829
809
  },
830
- _b$2.infrastructure = {
810
+ _b$1.infrastructure = {
831
811
  label: 'Infrastructure & Equipment',
832
812
  termType: 'Infrastructure & Equipment',
833
813
  children: termTypesToChildren([
@@ -838,7 +818,7 @@
838
818
  schema.TermTermType.machinery
839
819
  ])
840
820
  },
841
- _b$2.input = {
821
+ _b$1.input = {
842
822
  label: 'Inputs',
843
823
  termType: 'Inputs',
844
824
  children: termTypesToChildren([
@@ -856,7 +836,7 @@
856
836
  schema.TermTermType.water
857
837
  ])
858
838
  },
859
- _b$2[schema.TermTermType.measurement] = {
839
+ _b$1[schema.TermTermType.measurement] = {
860
840
  label: 'Measurements',
861
841
  termType: 'Measurements',
862
842
  children: termTypesToChildren([
@@ -867,7 +847,7 @@
867
847
  schema.TermTermType.methodMeasurement
868
848
  ])
869
849
  },
870
- _b$2.practice = {
850
+ _b$1.practice = {
871
851
  label: 'Practices',
872
852
  termType: 'Production Practices',
873
853
  children: termTypesToChildren([
@@ -885,7 +865,7 @@
885
865
  schema.TermTermType.waterRegime,
886
866
  ])
887
867
  },
888
- _b$2.product = {
868
+ _b$1.product = {
889
869
  label: 'Products',
890
870
  termType: 'Products',
891
871
  children: termTypesToChildren([
@@ -898,12 +878,12 @@
898
878
  schema.TermTermType.processedFood
899
879
  ])
900
880
  },
901
- _b$2[schema.TermTermType.property] = {
881
+ _b$1[schema.TermTermType.property] = {
902
882
  label: termTypeLabel(schema.TermTermType.property),
903
883
  termType: schema.TermTermType.property,
904
884
  children: []
905
885
  },
906
- _b$2));
886
+ _b$1));
907
887
  var termTypeGroups = [
908
888
  groups.property,
909
889
  groups.region,
@@ -914,10 +894,10 @@
914
894
  groups.measurement,
915
895
  groups.infrastructure
916
896
  ];
917
- var termToParent = (_c$2 = {},
918
- _c$2[schema.TermTermType.property] = 'Properties',
919
- _c$2[schema.TermTermType.region] = 'Geographies',
920
- _c$2);
897
+ var termToParent = (_c$1 = {},
898
+ _c$1[schema.TermTermType.property] = 'Properties',
899
+ _c$1[schema.TermTermType.region] = 'Geographies',
900
+ _c$1);
921
901
  var termChildToParent = function (termType) { return termTypeGroups.find(function (_a) {
922
902
  var children = _a.children;
923
903
  return (children || []).some(function (child) { return child.termType === termType; });
@@ -1053,7 +1033,7 @@
1053
1033
  }]
1054
1034
  }] });
1055
1035
 
1056
- var components$7 = [
1036
+ var components$8 = [
1057
1037
  SocialTagsComponent,
1058
1038
  ToastComponent,
1059
1039
  BindOnceDirective,
@@ -1095,10 +1075,10 @@
1095
1075
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeCommonLightModule, decorators: [{
1096
1076
  type: i0.NgModule,
1097
1077
  args: [{
1098
- declarations: components$7,
1078
+ declarations: components$8,
1099
1079
  exports: __spreadArray([
1100
1080
  HeFontawesomeModule
1101
- ], __read(components$7)),
1081
+ ], __read(components$8)),
1102
1082
  imports: [
1103
1083
  i6.CommonModule, i1$2.FormsModule, i5.RouterModule,
1104
1084
  HeFontawesomeModule
@@ -1260,7 +1240,7 @@
1260
1240
  }], ctorParameters: function () { return [{ type: i1__namespace$2.HttpClient }, { type: HeAuthService }, { type: HeCommonService }]; } });
1261
1241
 
1262
1242
  var gitUrl$1 = function () { return gitHome + "/hestia-aggregation-engine/-/blob/" + gitBranch(); };
1263
- var rawUrl$1 = function () { return gitRawBaseUrl + "/hestia-aggregation-engine/-/raw/" + gitBranch(); };
1243
+ var rawUrl = function () { return gitRawBaseUrl + "/hestia-aggregation-engine/-/raw/" + gitBranch(); };
1264
1244
  var lookups = Object.freeze({
1265
1245
  cropYield: 'region-crop-cropGroupingFaostatProduction-yield',
1266
1246
  cropGroupingColumn: 'cropGroupingFaostatProduction'
@@ -1292,7 +1272,7 @@
1292
1272
  HeAggregationEngineService.prototype.loadModels = function () {
1293
1273
  var _this = this;
1294
1274
  this.modelsLoading = true;
1295
- return this.http.get(rawUrl$1() + "/model-links.json").pipe(operators.catchError(function () { return rxjs.of({ links: [] }); }), operators.map(function (_b) {
1275
+ return this.http.get(rawUrl() + "/model-links.json").pipe(operators.catchError(function () { return rxjs.of({ links: [] }); }), operators.map(function (_b) {
1296
1276
  var links = _b.links;
1297
1277
  _this._models.next(links.map(function (_a) {
1298
1278
  var modelPath = _a.path, docPath = _a.docPath, link = __rest(_a, ["path", "docPath"]);
@@ -1369,22 +1349,37 @@
1369
1349
  }], ctorParameters: function () { return [{ type: i1__namespace$2.HttpClient }, { type: HeNodeService }]; } });
1370
1350
 
1371
1351
  var HE_ORCHESTRATOR_BASE_URL = new i0.InjectionToken('HE_ORCHESTRATOR_BASE_URL');
1372
- var gitUrl = function () { return gitHome + "/hestia-engine-models/-/blob/" + gitBranch(); };
1373
- var rawUrl = function () { return gitRawBaseUrl + "/hestia-engine-models/-/raw/" + gitBranch(); };
1374
- var findConfigModels = function (_b, modelId, modelKey) {
1375
- var models = _b.models;
1376
- return models.flat().filter(function (_b) {
1352
+ var engineGitUrl = function () { return gitHome + "/hestia-engine-models/-/blob/" + gitBranch(); };
1353
+ var engineRawUrl = function () { return gitRawBaseUrl + "/hestia-engine-models/-/raw/" + gitBranch(); };
1354
+ var findModels = function (models, termId) { return models.filter(function (_b) {
1355
+ var term = _b.term;
1356
+ return term === termId;
1357
+ }); };
1358
+ /**
1359
+ * Find models from the orchestrator configuration.
1360
+ *
1361
+ * @param config The orchestrator configuration content.
1362
+ * @param termId The `@id` of the Term.
1363
+ * @param model The `@id` of the model.
1364
+ * @param models Optional - list of models from `model-links.json` to default when orchestrator does not contain config.
1365
+ * @returns List of models from orchestrator or models if set.
1366
+ */
1367
+ var findConfigModels = function (config, termId, model, models) {
1368
+ if (models === void 0) { models = []; }
1369
+ var configModels = config.models.flat()
1370
+ .filter(function (_b) {
1377
1371
  var value = _b.value, key = _b.key;
1378
- return modelId.startsWith(value) && (!modelKey || key === modelKey);
1372
+ return termId === value && (!model || key === model);
1379
1373
  });
1374
+ return configModels.length ? configModels : findModels(models, termId);
1380
1375
  };
1381
1376
  var pathToApiDocsPath = function (model, term) { return [
1382
1377
  baseUrl(),
1383
1378
  'docs',
1384
1379
  [
1385
1380
  '#hestia-calculation-models',
1386
- toDashCase(model),
1387
- toDashCase(term)
1381
+ utils.toDashCase(model),
1382
+ utils.toDashCase(term)
1388
1383
  ].filter(Boolean).join('-')
1389
1384
  ].join('/'); };
1390
1385
  var HeEngineService = /** @class */ (function () {
@@ -1411,11 +1406,11 @@
1411
1406
  HeEngineService.prototype.loadModels = function () {
1412
1407
  var _this = this;
1413
1408
  this.modelsLoading = true;
1414
- return this.http.get(rawUrl() + "/model-links.json").pipe(operators.catchError(function () { return rxjs.of({ links: [] }); }), operators.map(function (_b) {
1409
+ return this.http.get(engineRawUrl() + "/model-links.json").pipe(operators.catchError(function () { return rxjs.of({ links: [] }); }), operators.map(function (_b) {
1415
1410
  var links = _b.links;
1416
1411
  _this._models.next(links.map(function (_a) {
1417
1412
  var path = _a.path, docPath = _a.docPath, link = __rest(_a, ["path", "docPath"]);
1418
- return (Object.assign(Object.assign({}, link), { path: gitUrl() + "/" + path, docPath: gitUrl() + "/" + docPath, apiDocsPath: pathToApiDocsPath(link.model, link.term || link.modelKey) }));
1413
+ return (Object.assign(Object.assign({}, link), { path: engineGitUrl() + "/" + path, docPath: engineGitUrl() + "/" + docPath, apiDocsPath: pathToApiDocsPath(link.model, link.term || link.modelKey) }));
1419
1414
  }));
1420
1415
  _this.modelsLoading = false;
1421
1416
  _this.modelsLoaded = true;
@@ -1441,6 +1436,10 @@
1441
1436
  HeEngineService.prototype.model = function (model) {
1442
1437
  return this.model$(model).pipe(operators.take(1)).toPromise();
1443
1438
  };
1439
+ HeEngineService.prototype.orchestratorConfigUrl = function (type) {
1440
+ var configUrl = gitHome + this._orchestratorBaseUrl.substring(this._orchestratorBaseUrl.indexOf('hestia-earth') + 'hestia-earth'.length);
1441
+ return type ? configUrl + "/" + type + ".json" : configUrl.substring(0, configUrl.indexOf('/raw'));
1442
+ };
1444
1443
  HeEngineService.prototype.ochestratorConfig = function (type) {
1445
1444
  return this.http.get(this._orchestratorBaseUrl + "/" + type + ".json", {
1446
1445
  params: { inline: false }
@@ -1609,7 +1608,6 @@
1609
1608
  type: i0.Input
1610
1609
  }] } });
1611
1610
 
1612
- var _a$4, _b$1, _c$1, _d$3;
1613
1611
  var SUCCESS_CRITERION_MAX_DELTA_PERCENT = 5;
1614
1612
  var WARNING_CRITERION_MAX_DELTA_PERCENT = 20;
1615
1613
  exports.DeltaColour = void 0;
@@ -1618,46 +1616,6 @@
1618
1616
  DeltaColour["Warning"] = "warning";
1619
1617
  DeltaColour["Danger"] = "danger";
1620
1618
  })(exports.DeltaColour || (exports.DeltaColour = {}));
1621
- exports.DeltaDisplayType = void 0;
1622
- (function (DeltaDisplayType) {
1623
- DeltaDisplayType["absolute"] = "absolute";
1624
- DeltaDisplayType["percent"] = "percent";
1625
- })(exports.DeltaDisplayType || (exports.DeltaDisplayType = {}));
1626
- var deltaPerType = (_a$4 = {},
1627
- _a$4[exports.DeltaDisplayType.absolute] = function (value, original) { return value - original; },
1628
- _a$4[exports.DeltaDisplayType.percent] = function (value, original) { return ((value - original) / original) * 100; },
1629
- _a$4);
1630
- var roundValue = function (value) { return +("" + value).substring(0, 10); };
1631
- var delta = function (value, originalValue, displayType, mapping) {
1632
- if (displayType === void 0) { displayType = exports.DeltaDisplayType.percent; }
1633
- var vvalue = roundValue(propertyValue$1(value));
1634
- var voriginalValue = roundValue(propertyValue$1(originalValue));
1635
- var deltaFuncs = Object.assign(Object.assign({}, deltaPerType), mapping);
1636
- var diff = vvalue === voriginalValue ? 0 : deltaFuncs[displayType](vvalue, voriginalValue);
1637
- return Number.isFinite(diff) ? (diff === -0 ? 0 : diff) : 0;
1638
- };
1639
- var PercentDeltaConditions;
1640
- (function (PercentDeltaConditions) {
1641
- PercentDeltaConditions["recalculated0"] = "recalculated should be 0";
1642
- PercentDeltaConditions["original0"] = "original is 0";
1643
- })(PercentDeltaConditions || (PercentDeltaConditions = {}));
1644
- var calculatePercentDeltaConditions = (_b$1 = {},
1645
- _b$1[PercentDeltaConditions.recalculated0] = function (original, recalculated) { return original > 0 && recalculated === 0; },
1646
- _b$1[PercentDeltaConditions.original0] = function (original, recalculated) { return original === 0 && recalculated > 0; },
1647
- _b$1);
1648
- var calculatePercentDeltaResult = (_c$1 = {},
1649
- _c$1[PercentDeltaConditions.recalculated0] = function (original, recalculated) { return (recalculated - original) / (original + 1); },
1650
- // Always considered an error so deliberately exceed SUCCESS_CRITERION_MAX_DELTA_PERCENT
1651
- _c$1[PercentDeltaConditions.original0] = function (original, recalculated) { return Math.sign(recalculated - original); },
1652
- _c$1.default = function (original, recalculated) { return (recalculated - original) / original; },
1653
- _c$1);
1654
- var calculatePercentDelta = function (recalculated, original) {
1655
- var matchingCondition = Object.values(PercentDeltaConditions).find(function (value) { return calculatePercentDeltaConditions[value](original, recalculated); }) || 'default';
1656
- return calculatePercentDeltaResult[matchingCondition](original, recalculated) * 100;
1657
- };
1658
- var customDeltaFuncs = (_d$3 = {},
1659
- _d$3[exports.DeltaDisplayType.percent] = calculatePercentDelta,
1660
- _d$3);
1661
1619
  var evaluateSuccess = function (deltaValue) { return Math.abs(deltaValue) < SUCCESS_CRITERION_MAX_DELTA_PERCENT
1662
1620
  ? exports.DeltaColour.Success
1663
1621
  : Math.abs(deltaValue) < WARNING_CRITERION_MAX_DELTA_PERCENT
@@ -1666,26 +1624,26 @@
1666
1624
 
1667
1625
  var BlankNodeValueDeltaComponent = /** @class */ (function () {
1668
1626
  function BlankNodeValueDeltaComponent() {
1669
- this.displayType = exports.DeltaDisplayType.percent;
1670
- this.DeltaDisplayType = exports.DeltaDisplayType;
1627
+ this.displayType = delta.DeltaDisplayType.percent;
1628
+ this.DeltaDisplayType = delta.DeltaDisplayType;
1671
1629
  }
1672
1630
  Object.defineProperty(BlankNodeValueDeltaComponent.prototype, "hide", {
1673
1631
  get: function () {
1674
- return emptyValue(this.value) || emptyValue(this.originalValue);
1632
+ return term.emptyValue(this.value) || term.emptyValue(this.originalValue);
1675
1633
  },
1676
1634
  enumerable: false,
1677
1635
  configurable: true
1678
1636
  });
1679
1637
  Object.defineProperty(BlankNodeValueDeltaComponent.prototype, "delta", {
1680
1638
  get: function () {
1681
- return delta(this.value, this.originalValue, this.displayType, customDeltaFuncs);
1639
+ return delta.delta(this.value, this.originalValue, this.displayType, delta.customDeltaFuncs);
1682
1640
  },
1683
1641
  enumerable: false,
1684
1642
  configurable: true
1685
1643
  });
1686
1644
  Object.defineProperty(BlankNodeValueDeltaComponent.prototype, "color", {
1687
1645
  get: function () {
1688
- return this.displayType === exports.DeltaDisplayType.percent ? evaluateSuccess(this.delta) : '';
1646
+ return this.displayType === delta.DeltaDisplayType.percent ? evaluateSuccess(this.delta) : '';
1689
1647
  },
1690
1648
  enumerable: false,
1691
1649
  configurable: true
@@ -3944,7 +3902,7 @@
3944
3902
  }]
3945
3903
  }] });
3946
3904
 
3947
- var components$6 = [
3905
+ var components$7 = [
3948
3906
  ClipboardComponent,
3949
3907
  PopoverComponent,
3950
3908
  PopoverConfirmComponent,
@@ -4012,12 +3970,12 @@
4012
3970
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeCommonModule, decorators: [{
4013
3971
  type: i0.NgModule,
4014
3972
  args: [{
4015
- declarations: components$6,
3973
+ declarations: components$7,
4016
3974
  exports: __spreadArray([
4017
3975
  i10.NgbTypeaheadModule, i10.NgbTooltipModule, i10.NgbPopoverModule,
4018
3976
  i1$4.GoogleMapsModule,
4019
3977
  HeCommonLightModule
4020
- ], __read(components$6)),
3978
+ ], __read(components$7)),
4021
3979
  imports: [
4022
3980
  i6.CommonModule, i1$2.FormsModule, i5.RouterModule,
4023
3981
  i10.NgbTypeaheadModule, i10.NgbTooltipModule, i10.NgbPopoverModule,
@@ -4522,7 +4480,7 @@
4522
4480
  type: i0.Output
4523
4481
  }] } });
4524
4482
 
4525
- var components$5 = [
4483
+ var components$6 = [
4526
4484
  BibliographiesSearchConfirmComponent
4527
4485
  ];
4528
4486
  var HeBibliographiesModule = /** @class */ (function () {
@@ -4540,8 +4498,8 @@
4540
4498
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeBibliographiesModule, decorators: [{
4541
4499
  type: i0.NgModule,
4542
4500
  args: [{
4543
- declarations: components$5,
4544
- exports: components$5,
4501
+ declarations: components$6,
4502
+ exports: components$6,
4545
4503
  imports: [
4546
4504
  i6.CommonModule, i1$2.ReactiveFormsModule,
4547
4505
  HeCommonModule
@@ -5263,7 +5221,16 @@
5263
5221
  var _d$1, _e;
5264
5222
  var get$3 = require('lodash.get');
5265
5223
  var orderBy$5 = require('lodash.orderby');
5266
- var reduceValues = function (values, termId) { return values.length ? values.reduce(function (p, v) { return p + propertyValue$1(v.value, termId); }, 0) : undefined; };
5224
+ var reduceValues = function (values, termId) {
5225
+ var propertyValues = values
5226
+ .map(function (_d) {
5227
+ var value = _d.value;
5228
+ return term.propertyValue(value, termId);
5229
+ })
5230
+ // propertyValue may return null if the value is null or undefined, therefore remove them from total
5231
+ .filter(function (v) { return v !== null; });
5232
+ return propertyValues.length ? propertyValues.reduce(function (p, v) { return p + v; }, 0) : undefined;
5233
+ };
5267
5234
  var logSubValue = function (logs, key, prop) { return logs[key][prop] ? (Array.isArray(logs[key][prop]) ?
5268
5235
  logs[key][prop].map(function (value) { return ({ key: prop, value: value }); }) :
5269
5236
  { key: prop, value: logs[key][prop] }) : undefined; };
@@ -5325,7 +5292,7 @@
5325
5292
  }
5326
5293
  NodeLogsModelsComponent.prototype.ngOnInit = function () {
5327
5294
  return __awaiter(this, void 0, void 0, function () {
5328
- var _d, models, _e, originalValues, recalculatedValues, type, _f;
5295
+ var _d, models, _e, allModels, originalValues, recalculatedValues, type, _f;
5329
5296
  var _this = this;
5330
5297
  return __generator(this, function (_g) {
5331
5298
  switch (_g.label) {
@@ -5356,6 +5323,9 @@
5356
5323
  }, {})).toPromise()];
5357
5324
  case 3:
5358
5325
  _e.methodsById = _g.sent();
5326
+ return [4 /*yield*/, this.hestiaEngineService.models()];
5327
+ case 4:
5328
+ allModels = _g.sent();
5359
5329
  originalValues = (this.originalValues || []).filter(function (value) { return !value.deleted; });
5360
5330
  recalculatedValues = (this.recalculatedValues || []).filter(function (value) { return !value.deleted; });
5361
5331
  type = originalValues.length ?
@@ -5365,14 +5335,14 @@
5365
5335
  undefined;
5366
5336
  _f = this;
5367
5337
  return [4 /*yield*/, this.fetchAllTerms()];
5368
- case 4:
5338
+ case 5:
5369
5339
  _f.allTerms = _g.sent();
5370
5340
  this.allBlankNodes = this.allTerms.flatMap(function (term) {
5371
5341
  var termLogs = get$3(_this.logs, term['@id'], {});
5372
5342
  var original = originalValues.filter(function (v) { return term['@id'] === v.term['@id']; });
5373
5343
  var recalculated = recalculatedValues.filter(function (v) { return term['@id'] === v.term['@id']; });
5374
5344
  var hasData = !!original.length || !!recalculated.length || Object.keys(termLogs).length > 0;
5375
- var configModels = utils.unique(__spreadArray(__spreadArray([], __read(findConfigModels(_this.config, term['@id'], _this.nodeKey).map(function (_d) {
5345
+ var configModels = utils.unique(__spreadArray(__spreadArray([], __read(findConfigModels(_this.config, term['@id'], _this.nodeKey, allModels).map(function (_d) {
5376
5346
  var model = _d.model;
5377
5347
  return model;
5378
5348
  }))), __read(Object.keys(termLogs).filter(function (key) { return !isBackgroundNoInput(termLogs, key); })))).filter(function (key) { return !(key in termLogs) || (!termLogs[key].isKey && !termLogs[key].input && !termLogs[key].property); });
@@ -5469,7 +5439,7 @@
5469
5439
  return ((_a = this.methodsById[methodId]) === null || _a === void 0 ? void 0 : _a.name) ||
5470
5440
  ((_b = logs[methodId]) === null || _b === void 0 ? void 0 : _b.key) ||
5471
5441
  ((_c = logs[methodId]) === null || _c === void 0 ? void 0 : _c.model) ||
5472
- (methodId ? keyToLabel(methodId) : '');
5442
+ (methodId ? utils.keyToLabel(methodId) : '');
5473
5443
  };
5474
5444
  NodeLogsModelsComponent.prototype.hasLog = function (_d, methodId, withOrchestrator) {
5475
5445
  var logs = _d.logs;
@@ -5625,7 +5595,7 @@
5625
5595
  type: i0.Input
5626
5596
  }] } });
5627
5597
 
5628
- var components$4 = [
5598
+ var components$5 = [
5629
5599
  NodeIconComponent,
5630
5600
  NodeLinkComponent,
5631
5601
  NodeCsvExportConfirmComponent,
@@ -5669,8 +5639,8 @@
5669
5639
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeNodeModule, decorators: [{
5670
5640
  type: i0.NgModule,
5671
5641
  args: [{
5672
- declarations: components$4,
5673
- exports: components$4,
5642
+ declarations: components$5,
5643
+ exports: components$5,
5674
5644
  imports: [
5675
5645
  i6.CommonModule, i5.RouterModule, i1$2.FormsModule,
5676
5646
  i6$1.DragDropModule,
@@ -5765,7 +5735,7 @@
5765
5735
  this.selected = [];
5766
5736
  this.enableCompare = true;
5767
5737
  this.baseUrl = baseUrl();
5768
- this.propertyValue = propertyValue$1;
5738
+ this.propertyValue = term.propertyValue;
5769
5739
  this.defaultLabel = defaultLabel;
5770
5740
  this.showDownload = false;
5771
5741
  this.View = View$4;
@@ -5827,7 +5797,7 @@
5827
5797
  }] } });
5828
5798
 
5829
5799
  var ignoreKeys = [
5830
- '@type', 'added', 'updated', 'addedVersion', 'updatedVersion'
5800
+ '@type', 'type', 'added', 'updated', 'addedVersion', 'updatedVersion'
5831
5801
  ];
5832
5802
  var CyclesCompletenessComponent = /** @class */ (function () {
5833
5803
  function CyclesCompletenessComponent() {
@@ -5835,7 +5805,7 @@
5835
5805
  this.selected = [];
5836
5806
  this.baseUrl = baseUrl();
5837
5807
  this.defaultLabel = defaultLabel;
5838
- this.keyToLabel = keyToLabel;
5808
+ this.keyToLabel = utils.keyToLabel;
5839
5809
  }
5840
5810
  CyclesCompletenessComponent.prototype.trackById = function (_index, item) {
5841
5811
  return item['@id'];
@@ -5876,7 +5846,7 @@
5876
5846
  var cycleDataset = function (values, termId, cycle, index) {
5877
5847
  var label = cycleName(cycle, index);
5878
5848
  var color = itemColor(index);
5879
- var data = [propertyValue$1(cycleValue(cycle, values), termId)];
5849
+ var data = [term.propertyValue(cycleValue(cycle, values), termId)];
5880
5850
  return {
5881
5851
  label: label,
5882
5852
  axis: 'y',
@@ -5912,7 +5882,7 @@
5912
5882
  var values = _d.values;
5913
5883
  return Object.values(values).some(function (_d) {
5914
5884
  var _e = __read(_d.nodes, 1), value = _e[0].value;
5915
- return propertyValue$1(value) >= 0;
5885
+ return term.propertyValue(value) >= 0;
5916
5886
  });
5917
5887
  })
5918
5888
  .map(function (_d) {
@@ -6061,7 +6031,7 @@
6061
6031
  this.cycles = [];
6062
6032
  this.selected = [];
6063
6033
  this.baseUrl = baseUrl();
6064
- this.propertyValue = propertyValue$1;
6034
+ this.propertyValue = term.propertyValue;
6065
6035
  this.defaultLabel = defaultLabel;
6066
6036
  this.showDownload = false;
6067
6037
  this.View = View$3;
@@ -6181,7 +6151,7 @@
6181
6151
  this.cycles = [];
6182
6152
  this.selected = [];
6183
6153
  this.baseUrl = baseUrl();
6184
- this.propertyValue = propertyValue$1;
6154
+ this.propertyValue = term.propertyValue;
6185
6155
  this.defaultLabel = defaultLabel;
6186
6156
  this.showDownload = false;
6187
6157
  this.View = View$2;
@@ -6285,7 +6255,7 @@
6285
6255
  barPercentage: 0.5,
6286
6256
  data: cycles.map(function (_b) {
6287
6257
  var id = _b["@id"];
6288
- return values[id] ? propertyValue$1(values[id].value, termId) : 0;
6258
+ return values[id] ? term.propertyValue(values[id].value, termId) : 0;
6289
6259
  })
6290
6260
  };
6291
6261
  });
@@ -6352,7 +6322,7 @@
6352
6322
  type: i0.Input
6353
6323
  }] } });
6354
6324
 
6355
- var components$3 = [
6325
+ var components$4 = [
6356
6326
  CyclesActivityComponent,
6357
6327
  CyclesActivityLogsComponent,
6358
6328
  CyclesCompletenessComponent,
@@ -6397,12 +6367,108 @@
6397
6367
  HeNodeModule
6398
6368
  ]] });
6399
6369
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeCyclesModule, decorators: [{
6370
+ type: i0.NgModule,
6371
+ args: [{
6372
+ declarations: components$4,
6373
+ exports: components$4,
6374
+ imports: [
6375
+ i6.CommonModule, i1$2.FormsModule, i1$2.ReactiveFormsModule,
6376
+ HeCommonModule,
6377
+ HeNodeModule
6378
+ ]
6379
+ }]
6380
+ }] });
6381
+
6382
+ var gitUrl = gitHome + "/hestia-engine-orchestrator/-/blob/" + gitBranch();
6383
+ var generalDocsUrl = gitUrl + "/hestia_earth/orchestrator/config/README.md";
6384
+ var strategiesDocs = gitUrl + "/hestia_earth/orchestrator/strategies";
6385
+ var EngineOrchestratorEditComponent = /** @class */ (function () {
6386
+ function EngineOrchestratorEditComponent(hestiaEngineService) {
6387
+ this.hestiaEngineService = hestiaEngineService;
6388
+ this.generalDocsUrl = generalDocsUrl;
6389
+ this.strategiesDocs = strategiesDocs;
6390
+ }
6391
+ EngineOrchestratorEditComponent.prototype.ngOnChanges = function (changes) {
6392
+ if ('nodeType' in changes) {
6393
+ return this.loadDefaultConfig();
6394
+ }
6395
+ };
6396
+ EngineOrchestratorEditComponent.prototype.loadDefaultConfig = function () {
6397
+ return __awaiter(this, void 0, void 0, function () {
6398
+ var _a;
6399
+ return __generator(this, function (_b) {
6400
+ switch (_b.label) {
6401
+ case 0:
6402
+ _a = this;
6403
+ return [4 /*yield*/, this.hestiaEngineService.ochestratorConfig(this.nodeType)];
6404
+ case 1:
6405
+ _a.config = _b.sent();
6406
+ return [2 /*return*/];
6407
+ }
6408
+ });
6409
+ });
6410
+ };
6411
+ EngineOrchestratorEditComponent.prototype.isArray = function (config) {
6412
+ return Array.isArray(config);
6413
+ };
6414
+ EngineOrchestratorEditComponent.prototype.modelLink$ = function (_a) {
6415
+ var model = _a.model, value = _a.value;
6416
+ return this.hestiaEngineService.model$({ model: model, term: value });
6417
+ };
6418
+ EngineOrchestratorEditComponent.prototype.modelPathLink$ = function (_a) {
6419
+ var model = _a.model, value = _a.value;
6420
+ return this.hestiaEngineService.model$({
6421
+ path: engineGitUrl() + "/hestia_earth/models/" + model + "/" + (value || '').replace('.', '/') + ".py"
6422
+ });
6423
+ };
6424
+ Object.defineProperty(EngineOrchestratorEditComponent.prototype, "configUrl", {
6425
+ get: function () {
6426
+ return this.hestiaEngineService.orchestratorConfigUrl(this.nodeType);
6427
+ },
6428
+ enumerable: false,
6429
+ configurable: true
6430
+ });
6431
+ return EngineOrchestratorEditComponent;
6432
+ }());
6433
+ EngineOrchestratorEditComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EngineOrchestratorEditComponent, deps: [{ token: HeEngineService }], target: i0__namespace.ɵɵFactoryTarget.Component });
6434
+ EngineOrchestratorEditComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: EngineOrchestratorEditComponent, selector: "he-engine-orchestrator-edit", inputs: { config: "config", nodeType: "nodeType" }, usesOnChanges: true, ngImport: i0__namespace, template: "<p>\n <i>The configuration below is a preview of the <a [href]=\"configUrl\" target=\"_blank\">JSON configuration file</a> used for the orchestration of the Hestia's calculations.</i>\n</p>\n<p>\n <i>Note: not all models might be represented accurately.</i>\n</p>\n\n<div class=\"pl-3 model-parallel my-3\">\n <p class=\"is-size-7\"><i>Models running in parallel</i></p>\n</div>\n\n<div *ngIf=\"config\">\n <div class=\"pl-3\" *bindOnce=\"config\">\n <ng-container *ngTemplateOutlet=\"models;context:{$implicit:config.models}\"></ng-container>\n </div>\n</div>\n\n<ng-template #models let-data>\n <div *ngFor=\"let v of data\">\n <ng-container *ngTemplateOutlet=\"model;context:{$implicit:v}\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #model let-data>\n <ng-container *ngIf=\"isArray(data)\">\n <div class=\"pl-3 model-parallel\">\n <ng-container *ngTemplateOutlet=\"models;context:{$implicit:data}\"></ng-container>\n </div>\n\n <hr>\n </ng-container>\n <ng-container *ngIf=\"!isArray(data)\">\n <div class=\"card mb-2 model-serie is-size-6\">\n <div class=\"card-content p-3\">\n <span class=\"is-capitalized\">{{data.key | keyToLabel}}</span>:\n <ng-template #defaultView>\n <span>{{data.value}}</span>\n\n <p>\n <span class=\"pr-1\">Model:</span>\n <span>{{data.model | keyToLabel}}</span>\n </p>\n </ng-template>\n\n <ng-template #modelFromPathLink>\n <ng-container *ngIf=\"modelPathLink$(data) | async as link; else defaultView\">\n <ng-container *ngTemplateOutlet=\"modelPathLink;context:{model:data.model, link:link}\"></ng-container>\n </ng-container>\n </ng-template>\n\n <ng-container *ngIf=\"modelLink$(data) | async as link; else modelFromPathLink\">\n <ng-container *ngTemplateOutlet=\"modelLink;context:{model:data.model, link:link}\"></ng-container>\n </ng-container>\n\n <div *ngIf=\"data.runStrategy\">\n <span class=\"pr-1\">Run strategy:</span>\n <ng-container *ngTemplateOutlet=\"strategiesLink;context:{strategy:data.runStrategy,type:'run'}\"></ng-container>\n\n <div class=\"pl-3 is-size-7\" *ngIf=\"data.runArgs\">\n <p><b>Run arguments:</b></p>\n <ng-container *ngTemplateOutlet=\"strategiesArgs;context:{$implicit:data.runArgs}\"></ng-container>\n </div>\n </div>\n <div *ngIf=\"data.mergeStrategy\">\n <span class=\"pr-1\">Merge strategy:</span>\n <ng-container *ngTemplateOutlet=\"strategiesLink;context:{strategy:data.mergeStrategy,type:'merge'}\"></ng-container>\n\n <div class=\"pl-3 is-size-7\" *ngIf=\"data.mergeArgs\">\n <p><b>Merge arguments:</b></p>\n <ng-container *ngTemplateOutlet=\"strategiesArgs;context:{$implicit:data.mergeArgs}\"></ng-container>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #modelLink let-model=\"model\" let-link=\"link\">\n <he-node-link *ngIf=\"link.term\" [node]=\"{'@type':'Term','@id':link.term}\" [showExternalLink]=\"true\">\n <span>{{link.term | keyToLabel}}</span>\n </he-node-link>\n\n <span *ngIf=\"link.modelKey\">{{link.modelKey}}</span>\n\n <p>\n <span class=\"pr-1\">Model:</span>\n <span class=\"pr-2\">{{model | keyToLabel}}</span>\n\n <a class=\"is-size-7\" [href]=\"link.docPath\" target=\"_blank\">\n <span class=\"pr-1\">(View Docs)</span>\n <fa-icon icon=\"external-link-alt\"></fa-icon>\n </a>\n </p>\n</ng-template>\n\n<ng-template #modelPathLink let-model=\"model\" let-link=\"link\">\n <span *ngIf=\"link.modelKey\">{{link.modelKey}}</span>\n\n <p>\n <span class=\"pr-1\">Model:</span>\n <span class=\"pr-2\">{{model | keyToLabel}}</span>\n\n <a class=\"is-size-7\" [href]=\"link.docPath\" target=\"_blank\">\n <span class=\"pr-1\">(View Docs)</span>\n <fa-icon icon=\"external-link-alt\"></fa-icon>\n </a>\n </p>\n</ng-template>\n\n<ng-template #strategiesLink let-strategy=\"strategy\" let-type=\"type\">\n <span class=\"pr-2\"><code>{{strategy}}</code></span>\n\n <a class=\"is-size-7\" [href]=\"strategiesDocs + '/' + type + '/' + (type === 'merge' ? 'merge_' : '') + strategy + '.md'\" target=\"_blank\">\n <span class=\"pr-1\">(View Docs)</span>\n <fa-icon icon=\"external-link-alt\"></fa-icon>\n </a>\n</ng-template>\n\n<ng-template #strategiesArgs let-args>\n <div class=\"pl-2\">\n <span *ngFor=\"let arg of args | keys\">\n <span class=\"has-text-underline\">{{arg.key}}</span>: <code>{{arg.value | json}}</code>\n </span>\n </div>\n</ng-template>\n", styles: [":host{display:block}.model-parallel{border-left:3px solid #7a7a7a}\n"], components: [{ type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "showExternalLink"] }, { 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: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "keyToLabel": KeyToLabelPipe, "async": i6__namespace.AsyncPipe, "keys": KeysPipe, "json": i6__namespace.JsonPipe } });
6435
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EngineOrchestratorEditComponent, decorators: [{
6436
+ type: i0.Component,
6437
+ args: [{
6438
+ selector: 'he-engine-orchestrator-edit',
6439
+ templateUrl: './engine-orchestrator-edit.component.html',
6440
+ styleUrls: ['./engine-orchestrator-edit.component.scss']
6441
+ }]
6442
+ }], ctorParameters: function () { return [{ type: HeEngineService }]; }, propDecorators: { config: [{
6443
+ type: i0.Input
6444
+ }], nodeType: [{
6445
+ type: i0.Input
6446
+ }] } });
6447
+
6448
+ var components$3 = [
6449
+ EngineOrchestratorEditComponent
6450
+ ];
6451
+ var HeEngineModule = /** @class */ (function () {
6452
+ function HeEngineModule() {
6453
+ }
6454
+ return HeEngineModule;
6455
+ }());
6456
+ HeEngineModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeEngineModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
6457
+ HeEngineModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeEngineModule, declarations: [EngineOrchestratorEditComponent], imports: [i6.CommonModule,
6458
+ HeCommonModule,
6459
+ HeNodeModule], exports: [EngineOrchestratorEditComponent] });
6460
+ HeEngineModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeEngineModule, imports: [[
6461
+ i6.CommonModule,
6462
+ HeCommonModule,
6463
+ HeNodeModule
6464
+ ]] });
6465
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeEngineModule, decorators: [{
6400
6466
  type: i0.NgModule,
6401
6467
  args: [{
6402
6468
  declarations: components$3,
6403
6469
  exports: components$3,
6404
6470
  imports: [
6405
- i6.CommonModule, i1$2.FormsModule, i1$2.ReactiveFormsModule,
6471
+ i6.CommonModule,
6406
6472
  HeCommonModule,
6407
6473
  HeNodeModule
6408
6474
  ]
@@ -6414,7 +6480,7 @@
6414
6480
  var parseDataPath = function (dataPath) {
6415
6481
  if (dataPath === void 0) { dataPath = ''; }
6416
6482
  var _f = __read(dataPath.split('.')), _ = _f[0], paths = _f.slice(1);
6417
- return paths.map(function (path) { return ({ path: path, label: keyToLabel(path.replace(/\[\d+\]/g, '')) }); });
6483
+ return paths.map(function (path) { return ({ path: path, label: utils.keyToLabel(path.replace(/\[\d+\]/g, '')) }); });
6418
6484
  };
6419
6485
  var contactUsEmail = 'community@hestia.earth';
6420
6486
  var externalLink = function (href, text) { return "<a href=\"" + href + "\" target=\"_blank\">" + text + "</a>"; };
@@ -6501,7 +6567,7 @@
6501
6567
  "The " + paths[0].path + " are invalid";
6502
6568
  },
6503
6569
  _f['may be between 0 and 100'] = function () { return 'percentages should be between 0 and 100, not 0 and 1. This may be an error.'; },
6504
- _f['may not all be set to false'] = function () { return "You may have forgotten to fill in the data completeness assessment.\n For information on how to fill it in, please see the " + schemaLink('Cycle#dataCompleteness', 'schema') + "."; },
6570
+ _f['may not all be set to false'] = function () { return "Every value in the data completeness assessment is " + code('false') + ". You may have forgotten to fill it in.\n For information on how to fill it in, please see the " + schemaLink('Cycle#dataCompleteness', 'schema') + "."; },
6505
6571
  _f['may not be empty'] = function () { return 'if this value signifies no data, Hestia only accepts "-" or empty for no data'; },
6506
6572
  _f['may not be 0'] = function (_f, errorCount) {
6507
6573
  var dataPath = _f.dataPath;
@@ -6581,6 +6647,10 @@
6581
6647
  var params = _f.params;
6582
6648
  return "If the amount produced is zero, the revenue of " + (errorCount === 1 ? code(params === null || params === void 0 ? void 0 : params.term.name) : 'that product') + " must also be zero.";
6583
6649
  },
6650
+ _f['should add a source'] = function (_f) {
6651
+ var params = _f.params;
6652
+ return "We recommend adding a Source to all data items.\n This can be done by adding the " + code(params === null || params === void 0 ? void 0 : params.current) + " field.\n Sources can also be specified for each data item (i.e., each Input, Emission, Product, Practice, Measurement, or Infrastructure).";
6653
+ },
6584
6654
  _f);
6585
6655
  var formatCustomErrorMessage = function (message, error, errorCount) {
6586
6656
  if (errorCount === void 0) { errorCount = 1; }
@@ -6732,7 +6802,6 @@
6732
6802
  queries: __spreadArray(__spreadArray([], __read(compileSuggestionQueries(nonExpandableArrayDataPath(parent), allOf))), __read((['country'].includes(parent) ? [matchCountry] : [])))
6733
6803
  });
6734
6804
  };
6735
- var formatLinkNodesSuggestions = function (nodeMap, type) { return (nodeMap[type] || []).map(function (id) { return ({ type: type, id: id, name: "Link with " + type + ": " + id }); }); };
6736
6805
  var typeToSuggestion = (_d = {},
6737
6806
  _d[schema.NodeType.Actor] = defaultNodeTypeSuggestion(schema.NodeType.Actor),
6738
6807
  _d[schema.NodeType.Cycle] = defaultNodeTypeSuggestion(schema.NodeType.Cycle),
@@ -6795,11 +6864,6 @@
6795
6864
  typeToSuggestion[schema.type](fullKey, parentSchema, schema) :
6796
6865
  undefined);
6797
6866
  };
6798
- var formatProperty = function (prop) { return (Object.assign(Object.assign({ '@type': schema.SchemaType.Property }, prop), { term: Object.assign({ '@type': schema.NodeType.Term }, prop.term) })); };
6799
- var formatSuggestion = function (_c) {
6800
- var defaultProperties = _c.defaultProperties, node = __rest(_c, ["defaultProperties"]);
6801
- return (Object.assign(Object.assign({}, node), (defaultProperties ? { defaultProperties: defaultProperties.map(formatProperty) } : {})));
6802
- };
6803
6867
  var nodeAvailableProperties = function (node, _d) {
6804
6868
  var fullKey = _d.fullKey, schema = _d.schema, schemaType = _d.schemaType;
6805
6869
  return availableProperties(schema, schemaType, fullKey ? get$2(node, fullKey, {}) : node, fullKey.length > 0);
@@ -7549,7 +7613,7 @@
7549
7613
  var value = _a.value, depthLower = _a.depthLower, depthUpper = _a.depthUpper;
7550
7614
  return hasMultipleValues(value) && hasMultipleValues(depthLower) && hasMultipleValues(depthUpper) ?
7551
7615
  weighedAverage({ value: value, depthLower: depthLower, depthUpper: depthUpper }) :
7552
- propertyValue$1(value, termId);
7616
+ term.propertyValue(value, termId);
7553
7617
  };
7554
7618
 
7555
7619
  var SitesMeasurementsLogsComponent = /** @class */ (function () {
@@ -7756,11 +7820,19 @@
7756
7820
  }] });
7757
7821
 
7758
7822
  var get = require('lodash.get');
7759
- var MIN_TYPEAHEAD_LENGTH$1 = 2;
7823
+ var MIN_TYPEAHEAD_LENGTH = 2;
7760
7824
  var populateTermFields = [
7761
- 'termType', 'units',
7825
+ 'termType', 'units'
7826
+ ];
7827
+ var populateTermDefaultProperties = [
7762
7828
  'defaultProperties.term.name', 'defaultProperties.term.units', 'defaultProperties.value'
7763
7829
  ];
7830
+ var formatProperty = function (prop) { return (Object.assign(Object.assign({ '@type': schema.SchemaType.Property }, prop), { term: Object.assign({ '@type': schema.NodeType.Term }, prop.term) })); };
7831
+ var formatSuggestion = function (_a) {
7832
+ var defaultProperties = _a.defaultProperties, node = __rest(_a, ["defaultProperties"]);
7833
+ return (Object.assign(Object.assign({}, node), ((defaultProperties === null || defaultProperties === void 0 ? void 0 : defaultProperties.length) ? { defaultProperties: defaultProperties.map(formatProperty) } : {})));
7834
+ };
7835
+ var formatLinkNodesSuggestions = function (nodeMap, type) { return (nodeMap[type] || []).map(function (id) { return ({ type: type, id: id, name: "Link with " + type + ": " + id }); }); };
7764
7836
  var FilesFormComponent = /** @class */ (function () {
7765
7837
  function FilesFormComponent(ref, searchService, usersService) {
7766
7838
  var _c;
@@ -7770,10 +7842,21 @@
7770
7842
  this.usersService = usersService;
7771
7843
  this.errors = [];
7772
7844
  this.nodeMap = {};
7845
+ /**
7846
+ * Allow editing nodes (`false` for readonly).
7847
+ */
7773
7848
  this.editable = false;
7774
7849
  this.errorMode = false;
7775
7850
  this.deepEditable = true;
7851
+ /**
7852
+ * Can edit errors.
7853
+ */
7776
7854
  this.errorsEditable = false;
7855
+ /**
7856
+ * When selecting terms, will show default properties or not.
7857
+ * Should be `false` when using schema validation, as only the `name` would be added.
7858
+ */
7859
+ this.showSuggestedDefaultProperties = true;
7777
7860
  this.nodeChange = new i0.EventEmitter();
7778
7861
  this.nodeErorrResolved = new i0.EventEmitter();
7779
7862
  this.nodeErrorAdded = new i0.EventEmitter();
@@ -7788,7 +7871,7 @@
7788
7871
  this.suggestNewProperty = function (fullKey) { return function (text$) { return text$.pipe(operators.distinctUntilChanged(), operators.switchMap(function (term) { return rxjs.of(_this.newProperties(findProperty(_this.properties, fullKey) || _this.nodeProperty, term)); })); }; };
7789
7872
  this.suggestExistingNode = function (type, term, uniqueKey) {
7790
7873
  if (uniqueKey === void 0) { uniqueKey = '@id'; }
7791
- return term.length < MIN_TYPEAHEAD_LENGTH$1 ?
7874
+ return term.length < MIN_TYPEAHEAD_LENGTH ?
7792
7875
  rxjs.of([]) :
7793
7876
  _this.searchService.suggest(term, type, [], {
7794
7877
  bool: {
@@ -7800,7 +7883,7 @@
7800
7883
  ],
7801
7884
  minimum_should_match: 1
7802
7885
  }
7803
- }, 5, populateTermFields);
7886
+ }, 5, _this.suggestTermFields);
7804
7887
  };
7805
7888
  this.suggestNode = function (type, suggestDefault) { return function (term, property) {
7806
7889
  var _a, _b;
@@ -7823,15 +7906,15 @@
7823
7906
  _c[schema.NodeType.Site] = this.suggestNode(schema.NodeType.Site),
7824
7907
  _c[schema.NodeType.Source] = this.suggestNode(schema.NodeType.Source, function (term, _c) {
7825
7908
  var key = _c.key;
7826
- return term.length < MIN_TYPEAHEAD_LENGTH$1 ?
7909
+ return term.length < MIN_TYPEAHEAD_LENGTH ?
7827
7910
  rxjs.of([]) :
7828
7911
  _this.searchService.suggestSource(term, 5, ["bibliography." + key], ["bibliography." + key]);
7829
7912
  }),
7830
7913
  _c[schema.NodeType.Term] = this.suggestNode(schema.NodeType.Term, function (term, _c) {
7831
7914
  var suggestions = _c.suggestions;
7832
- return term.length < MIN_TYPEAHEAD_LENGTH$1 ?
7915
+ return term.length < MIN_TYPEAHEAD_LENGTH ?
7833
7916
  rxjs.of([]) :
7834
- _this.searchService.suggest(term, schema.NodeType.Term, (suggestions === null || suggestions === void 0 ? void 0 : suggestions.queries) || [], null, 5, populateTermFields);
7917
+ _this.searchService.suggest(term, schema.NodeType.Term, (suggestions === null || suggestions === void 0 ? void 0 : suggestions.queries) || [], null, 5, _this.suggestTermFields);
7835
7918
  }),
7836
7919
  _c);
7837
7920
  this.propertySuggest = function (fullKey, suggestType) { return function (text$) { return text$.pipe(operators.debounceTime(suggestType === defaultSuggestionType ? 0 : 300), operators.distinctUntilChanged(), operators.mergeMap(function (term) {
@@ -7887,6 +7970,13 @@
7887
7970
  var value = _c.value, isRequired = _c.isRequired;
7888
7971
  return isRequired && utils.isEmpty(value);
7889
7972
  };
7973
+ Object.defineProperty(FilesFormComponent.prototype, "suggestTermFields", {
7974
+ get: function () {
7975
+ return __spreadArray(__spreadArray([], __read(populateTermFields)), __read((this.showSuggestedDefaultProperties ? populateTermDefaultProperties : [])));
7976
+ },
7977
+ enumerable: false,
7978
+ configurable: true
7979
+ });
7890
7980
  // --- Errors
7891
7981
  FilesFormComponent.prototype.enableAddError = function (property) {
7892
7982
  return this.errorsEditable && !property.hasError && !property.hasWarning;
@@ -8169,7 +8259,7 @@
8169
8259
  return FilesFormComponent;
8170
8260
  }());
8171
8261
  FilesFormComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FilesFormComponent, deps: [{ token: i0__namespace.ElementRef }, { token: HeSearchService }, { token: HeUsersService }], target: i0__namespace.ɵɵFactoryTarget.Component });
8172
- FilesFormComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilesFormComponent, selector: "he-files-form", inputs: { schemas: "schemas", errors: "errors", node: "node", nodeMap: "nodeMap", editable: "editable", errorMode: "errorMode", deepEditable: "deepEditable", errorsEditable: "errorsEditable" }, outputs: { nodeChange: "nodeChange", nodeErorrResolved: "nodeErorrResolved", nodeErrorAdded: "nodeErrorAdded" }, ngImport: i0__namespace, template: "<div class=\"card\">\n <div class=\"card-toggle p-4\" (click)=\"isOpen = !isOpen\" pointer>\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!isOpen\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"isOpen\"></fa-icon>\n <span *ngIf=\"nodeProperty\" class=\"is-px-2\"\n [class.has-text-danger]=\"nodeProperty.hasError\"\n [class.has-text-warning]=\"nodeProperty.hasWarning\"\n >\n <he-node-icon [type]=\"nodeProperty.schemaType\"></he-node-icon>\n </span>\n </div>\n\n <ng-container *ngIf=\"editable && isOpen && nodeProperty\">\n <ng-container *ngTemplateOutlet=\"showNewProperty; context: {$implicit: nodeProperty}\"></ng-container>\n </ng-container>\n\n <div class=\"card-content\">\n <ng-container *ngIf=\"isOpen\">\n <div class=\"pb-3 mb-2\" *ngIf=\"errorsEditable\">\n <ng-container *ngTemplateOutlet=\"nodeErrorForm; context: {$implicit: nodeProperty}\"></ng-container>\n </div>\n\n <div class=\"mb-4\" *ngIf=\"nodeProperty?.error\">\n <ng-container *ngTemplateOutlet=\"propertyError; context: {property: nodeProperty, edit: true}\"></ng-container>\n </div>\n </ng-container>\n\n <div class=\"columns is-multiline\">\n <ng-container *ngFor=\"let property of properties; trackBy: trackByProperty\">\n <ng-container *ngTemplateOutlet=\"showProperty; context: {$implicit: property}\"></ng-container>\n </ng-container>\n </div>\n\n <ng-container *ngIf=\"isOpen\">\n <ng-container *ngTemplateOutlet=\"propertyMap; context: {$implicit: nodeProperty}\"></ng-container>\n </ng-container>\n </div>\n</div>\n\n<he-maps-drawing-confirm *ngIf=\"!!mapDrawingProperty\"\n [value]=\"mapDrawingProperty.value\" [modes]=\"mapDrawingModes(mapDrawingProperty)\"\n (closed)=\"onMapDrawingClosed($event)\"\n></he-maps-drawing-confirm>\n\n<he-bibliographies-search-confirm *ngIf=\"!!bibliographiesSearchProperty\"\n [search]=\"bibliographiesSearchProperty.value\"\n [searchBy]=\"bibliographiesSearchKey(bibliographiesSearchProperty)\"\n [searchSources]=\"bibliographiesSearchSources\"\n (closed)=\"onBibliographiesSearchClosed($event)\"\n></he-bibliographies-search-confirm>\n\n<ng-template #labelDescription let-property>\n <span\n class=\"trigger-popover\"\n [ngbPopover]=\"property.schema?.description\" [autoClose]=\"'outside'\"\n triggers=\"hover\" placement=\"right\" container=\"body\"\n >\n <span>{{property.key}}</span>\n </span>\n</ng-template>\n\n<ng-template #labelDefault let-property>\n <span>{{property.key}}</span>\n</ng-template>\n\n<ng-template #showProperty let-property>\n <ng-container *ngIf=\"(isOpen || property.closedVisible) && !property.isHidden\">\n <div class=\"column is-6\"\n [id]=\"property.fullKey + '_' + property.id\"\n [class.is-12]=\"property.properties.length || !property.key\"\n [ngSwitch]=\"!!property.properties.length\"\n >\n <div class=\"columns is-multiline is-variable is-1\" *ngSwitchCase=\"false\">\n <div class=\"column is-3 py-1\" *ngIf=\"property.key\">\n <label class=\"label has-text-right-tablet has-text-ellipsis\"\n *bindOnce=\"property\"\n [for]=\"property.id\"\n >\n <ng-container\n *ngTemplateOutlet=\"property.schema?.description && editable && property.editable ? labelDescription : labelDefault; context: {$implicit: property}\">\n </ng-container>\n </label>\n </div>\n\n <div class=\"column is-9 py-1\" [class.is-12]=\"!property.key\">\n <div class=\"field\">\n <ng-container *ngTemplateOutlet=\"inputForm; context: {$implicit: property}\"></ng-container>\n\n <ng-container *ngIf=\"(editable || errorsEditable) && (property.hasError || property.hasWarning)\">\n <ng-container *ngTemplateOutlet=\"propertyError; context: {property: property, edit: false}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n\n <div class=\"panel\" *ngSwitchCase=\"true\"\n [class.is-link]=\"errorMode && property.changed\"\n [class.is-danger]=\"!property.changed && property.hasError\"\n [class.is-warning]=\"!property.changed && property.hasWarning\"\n [class.is-default]=\"!property.changed && !property.hasError && !property.hasWarning\"\n >\n <div class=\"open-group panel-heading py-0\"\n (click)=\"property.isOpen = !property.isOpen\" pointer\n [class.is-open]=\"property.isOpen\"\n [class.has-text-white]=\"(errorMode && property.changed) || property.hasError || property.hasWarning\"\n >\n <div class=\"columns is-mobile is-vcentered\">\n <span class=\"column is-narrow py-1 my-0\">\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!property.isOpen\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"property.isOpen\"></fa-icon>\n </span>\n <span class=\"column py-1 my-0\">\n <span class=\"is-size-6\">{{property.key}}</span>\n </span>\n <span *ngIf=\"property.schemaType\" class=\"column is-narrow py-1 my-0\">\n <span class=\"tags mb-0 has-addons\">\n <span class=\"tag mb-0 is-light\">Type</span>\n <span class=\"tag mb-0 is-white\">\n <he-schema-version-link linkClass=\"is-small\" [node]=\"{'@type': property.schemaType}\">\n <span>{{property.schemaType}}</span>\n </he-schema-version-link>\n </span>\n </span>\n </span>\n <he-popover-confirm class=\"column is-narrow py-1 my-0 px-0\"\n *ngIf=\"editable && !errorsEditable\"\n ngbTooltip=\"Remove group\" placement=\"top\"\n [message]=\"'<p>This will remove the group completely.</p>' + (property.isRequired ? '<p><u>Warning: this field is required.</u></p>' : '') + '<p>Do you confirm?</p>'\"\n popoverClass=\"px-3\"\n (confirmed)=\"propertyChanged(null, property)\"\n >\n <fa-icon icon=\"times\" size=\"sm\"></fa-icon>\n </he-popover-confirm>\n </div>\n </div>\n <div class=\"panel-block is-block p-0\" *ngIf=\"property.isOpen\">\n <ng-container [ngSwitch]=\"property.isArray\">\n <div class=\"px-3 pt-4\" *ngIf=\"property.error\">\n <ng-container *ngTemplateOutlet=\"propertyError; context: {property: property, edit: true}\"></ng-container>\n </div>\n\n <div class=\"mt-3\" *ngSwitchCase=\"false\">\n <p class=\"help py-1 px-2\" *ngIf=\"editable && !property.editable\">\n To change the {{property.key}}, please delete it first, then add the field again\n </p>\n <ng-container *ngIf=\"editable && property.editable\">\n <ng-container [ngSwitch]=\"property.schema?.title\">\n <p class=\"help py-1 px-2\" *ngSwitchCase=\"'Bibliography'\">\n Search by Title or Document DOI to auto-populate the fields using the Mendeley catalogue\n </p>\n </ng-container>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"showNewProperty; context: {$implicit: property}\"></ng-container>\n\n <div class=\"px-3 mt-1\" *ngIf=\"errorsEditable\">\n <ng-container *ngTemplateOutlet=\"nodeErrorForm; context: {$implicit: property}\"></ng-container>\n </div>\n\n <div class=\"property-group py-2 px-3 mt-2\">\n <div class=\"columns is-multiline mb-0\">\n <ng-container *ngFor=\"let prop2 of property.properties; trackBy: trackByProperty\">\n <ng-container *ngTemplateOutlet=\"showProperty; context: {$implicit: prop2}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n\n <div class=\"py-2 px-3 mt-2\" *ngSwitchCase=\"true\">\n <div class=\"mt-1\" *ngIf=\"errorsEditable\">\n <ng-container *ngTemplateOutlet=\"nodeErrorForm; context: {$implicit: property}\"></ng-container>\n </div>\n\n <ng-container *ngFor=\"let prop2 of property.properties; trackBy: trackByProperty\">\n <div class=\"card p-0 my-4\" *ngIf=\"prop2.key\"\n [id]=\"prop2.fullKey + '_' + prop2.id\"\n >\n <div class=\"property-array-number\">\n <div class=\"tags has-addons\">\n <span class=\"tag is-dark\">{{prop2.key}}</span>\n <ng-container *ngIf=\"editable && !errorsEditable && property.editable\">\n <span class=\"tag is-info\" pointer\n (click)=\"duplicateArrayGroup(property, prop2)\"\n [ngbTooltip]=\"'Duplicate ' + pluralize(property.key, 1)\" placement=\"top\"\n >\n <fa-icon icon=\"clone\" size=\"sm\"></fa-icon>\n </span>\n <span class=\"tag is-light\" pointer\n *ngIf=\"prop2.key !== '0'\"\n (click)=\"moveArrayGroupUp(property, prop2)\"\n ngbTooltip=\"Move Up\" placement=\"top\"\n >\n <fa-icon icon=\"long-arrow-alt-up\" size=\"sm\"></fa-icon>\n </span>\n <span class=\"tag is-light\" pointer\n *ngIf=\"prop2.key !== property.properties.length - 1\"\n (click)=\"moveArrayGroupDown(property, prop2)\"\n ngbTooltip=\"Move Down\" placement=\"top\"\n >\n <fa-icon icon=\"long-arrow-alt-down\" size=\"sm\"></fa-icon>\n </span>\n <he-popover-confirm class=\"tag is-delete\"\n [ngbTooltip]=\"'Remove ' + pluralize(property.key, 1)\" placement=\"top\"\n message=\"This will remove the group completely. Do you confirm?\" position=\"right\"\n (confirmed)=\"removeArrayGroup(property, prop2)\"\n ></he-popover-confirm>\n </ng-container>\n </div>\n </div>\n\n <ng-container *ngTemplateOutlet=\"showNewProperty; context: {$implicit: prop2}\"></ng-container>\n\n <div class=\"px-4 mt-2\" *ngIf=\"errorsEditable\">\n <ng-container *ngTemplateOutlet=\"nodeErrorForm; context: {$implicit: prop2}\"></ng-container>\n </div>\n\n <div class=\"px-4 mt-2\" *ngIf=\"prop2.error\">\n <ng-container *ngTemplateOutlet=\"propertyError; context: {property: prop2, edit: true}\"></ng-container>\n </div>\n\n <div class=\"property-group card-content p-3\">\n <div class=\"columns is-multiline my-0\">\n <ng-container *ngFor=\"let prop3 of prop2.properties; trackBy: trackByProperty\">\n <ng-container *ngTemplateOutlet=\"showProperty; context: {$implicit: prop3}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n\n <button class=\"button is-dark is-outlined is-small\" type=\"button\"\n *ngIf=\"editable && !errorsEditable\"\n (click)=\"addArrayGroup(property)\"\n >\n <fa-icon icon=\"plus-circle\"></fa-icon>\n <span class=\"pl-2\">Add</span>\n <span class=\"pl-1\">{{property.key | pluralize:1}}</span>\n </button>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #inputForm let-property>\n <ng-container *ngIf=\"property.key\">\n <ng-container [ngSwitch]=\"property.suggestions?.type\">\n <ng-container *ngSwitchCase=\"'select'\">\n <ng-container *ngTemplateOutlet=\"inputSelect; context: {$implicit: property}\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container *ngTemplateOutlet=\"inputInput; context: {$implicit: property}\"></ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #inputInput let-property>\n <div class=\"field mb-0\" [class.has-addons]=\"hasAddons(property)\">\n <div class=\"control is-expanded\"\n [class.has-icons-right]=\"property.loading\"\n >\n <input class=\"input is-small search-input\"\n [class.is-dark]=\"property.key === 'type'\"\n [class.is-link]=\"errorMode && property.changed\"\n [class.is-danger]=\"(!property.changed && property.hasError) || isRequired(property)\"\n [class.is-warning]=\"!property.changed && property.hasWarning\"\n\n [(ngModel)]=\"property.value\" #propertyModel=\"ngModel\"\n [type]=\"property.schema?.type === 'number' ? 'number' : 'string'\"\n [id]=\"property.id\"\n name=\"randomname\"\n [readonly]=\"!editable || !property.editable || property.schema?.internal\"\n [placeholder]=\"property.placeholder\"\n [appTagsInput]=\"{enabled: editable && property.editable && property.schema?.type === 'array', items: property.schema?.items, delimiter: ';', allowDuplicates: true, placeholder: property.placeholder}\"\n (change)=\"propertyChanged($event.target.value, property)\"\n\n [pattern]=\"property.schema?.pattern\"\n [required]=\"property.fullKey.endsWith('id') && property.fullKey !== 'id'\"\n [min]=\"property.schema?.minimum\"\n [max]=\"property.schema?.maximum\"\n\n [ngbTypeahead]=\"propertySuggest(property.fullKey, property.suggestions?.type)\"\n [resultTemplate]=\"suggestion\"\n [inputFormatter]=\"formatter\"\n [focusFirst]=\"true\"\n (focus)=\"editable && property.editable && typeaheadFocus($event)\"\n (selectItem)=\"suggestionSelected($event.item, property)\"\n >\n\n <span class=\"icon is-small is-right has-text-grey-dark\" [class.is-hidden]=\"!property.loading\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"sm\"></fa-icon>\n </span>\n </div>\n <ng-container *ngTemplateOutlet=\"inputAddons; context: {$implicit: property}\"></ng-container>\n </div>\n <p class=\"help is-danger-light\"\n *ngIf=\"!property.hasError && propertyModel.invalid\"\n >\n <span *bindOnce=\"propertyModel.errors\" [innerHTML]=\"formatPropertyError(propertyModel.errors, property)\"></span>\n </p>\n</ng-template>\n\n<ng-template #inputSelect let-property>\n <div class=\"field mb-0\" [class.has-addons]=\"hasAddons(property)\">\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth\"\n [class.is-link]=\"errorMode && property.changed\"\n [class.is-danger]=\"(!property.changed && property.hasError) || isRequired(property)\"\n [class.is-warning]=\"!property.changed && property.hasWarning\"\n >\n <select\n [(ngModel)]=\"property.value\" #propertyModel=\"ngModel\"\n [id]=\"property.id\"\n name=\"randomname\"\n [disabled]=\"!editable || !property.editable || property.schema?.internal\"\n (change)=\"propertyChanged($event.target.value, property)\"\n >\n <option value=\"\">Select</option>\n <ng-container *bindOnce=\"property.suggestions\">\n <option *ngFor=\"let value of property.suggestions.values; trackBy: trackByIndex\" [value]=\"value\">{{value}}</option>\n </ng-container>\n </select>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"inputAddons; context: {$implicit: property}\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #removeFieldAddon let-property>\n <div class=\"control\" *ngIf=\"!errorsEditable && !property.isRequired\">\n <a class=\"button is-small\" title=\"Remove field\"\n [class.is-outlined]=\"!property.changed && (property.hasError || property.hasWarning)\"\n [class.is-danger]=\"!property.changed && property.hasError\"\n [class.is-warning]=\"!property.changed && property.hasWarning\"\n (click)=\"$event.stopPropagation(); propertyChanged(null, property)\"\n >\n <fa-icon icon=\"times\"></fa-icon>\n </a>\n </div>\n</ng-template>\n\n<ng-template #inputAddons let-property>\n <he-popover-confirm class=\"control\"\n *ngIf=\"enableAddError(property)\"\n position=\"left\"\n [content]=\"popupErrorForm\"\n (confirmed)=\"addError(property, $event)\"\n >\n <span class=\"button is-small\">\n <fa-icon icon=\"comments\"></fa-icon>\n </span>\n </he-popover-confirm>\n\n <ng-container *ngIf=\"editable && property.editable\">\n <ng-container [ngSwitch]=\"property.schemaType\">\n <ng-container *ngSwitchCase=\"SchemaType.Actor\">\n <ng-container *ngTemplateOutlet=\"actorAddons; context: {$implicit: property}\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"SchemaType.Cycle\">\n <ng-container *ngTemplateOutlet=\"cycleAddons; context: {$implicit: property}\"></ng-container>\n </ng-container>\n </ng-container>\n <ng-container *bindOnce=\"property\">\n <div class=\"control\" *ngIf=\"mapDrawingModes(property).length\">\n <button class=\"button is-small\" title=\"Pick on Map\"\n (click)=\"mapDrawingProperty = property\"\n >\n <fa-icon icon=\"map-marked-alt\"></fa-icon>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"bibliographiesSearchKey(property)\">\n <button class=\"button is-small\" title=\"Advanced Search\"\n (click)=\"bibliographiesSearchProperty = property\"\n >\n <fa-icon icon=\"search\"></fa-icon>\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"removeFieldAddon; context: {$implicit: property}\"></ng-container>\n </ng-container>\n <div class=\"control\" *ngIf=\"addPropertyEnabled(property)\">\n <a class=\"button is-small is-danger\" title=\"Add field\"\n (click)=\"$event.stopPropagation(); addMissingProperty(property)\"\n >\n <fa-icon icon=\"plus-circle\"></fa-icon>\n <span class=\"pl-2\">Add</span>\n </a>\n </div>\n <div class=\"control\" *ngIf=\"isRequired(property)\">\n <label class=\"button is-small is-danger\" [for]=\"property.id\"\n ngbTooltip=\"This field is required\" placement=\"top\"\n >\n <fa-icon icon=\"exclamation-triangle\"></fa-icon>\n </label>\n </div>\n <ng-container *ngIf=\"property.externalUrl?.url\">\n <div class=\"control\">\n <a class=\"button is-small\"\n [href]=\"property.externalUrl.url + (property.externalUrl.urlParamValue ? property.value : '')\"\n target=\"_blank\"\n [title]=\"property.externalUrl.title\"\n [ngClass]=\"{'is-dark is-outlined': property.key === 'type'}\"\n [attr.disabled]=\"property.externalUrl.urlParamValue && !property.value ? true : null\"\n >\n <fa-icon [icon]=\"property.externalUrl.icon || 'external-link-alt'\"></fa-icon>\n </a>\n </div>\n </ng-container>\n <ng-container *ngIf=\"unitConverterEnabled(property)\">\n <div class=\"control\">\n <button class=\"button is-small\" title=\"Open calculator\"\n [ngbPopover]=\"convertUnits\" autoClose=\"outside\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"bottom\" container=\"body\"\n (click)=\"openUnitConverter(p, property)\"\n >\n <fa-icon icon=\"calculator\"></fa-icon>\n </button>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #actorAddons let-property>\n <div class=\"control\" *ngIf=\"property.key === '@id'\">\n <button class=\"button is-small\" title=\"Add myself as Actor\"\n (click)=\"setUserActorId(property)\"\n >\n <fa-icon [icon]=\"['far', 'id-badge']\"></fa-icon>\n </button>\n </div>\n</ng-template>\n\n<ng-template #cycleAddons let-property>\n <div class=\"control\" *ngIf=\"property.key === 'cycleDuration'\">\n <button class=\"button is-small\" title=\"Calculate value from startDate and endDate\"\n (click)=\"calculateCycleDuration(property)\"\n [disabled]=\"!calculateCycleDurationEnabled(property)\"\n >\n <fa-icon icon=\"calculator\"></fa-icon>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"property.key === 'startDate'\">\n <button class=\"button is-small\" title=\"Calculate value from endDate and cycleDuration\"\n (click)=\"calculateCycleStartDate(property)\"\n [disabled]=\"!calculateCycleStartDateEnabled(property)\"\n >\n <fa-icon icon=\"calculator\"></fa-icon>\n </button>\n </div>\n</ng-template>\n\n<ng-template #showNewProperty let-property>\n <header class=\"card-header\" *ngIf=\"editable && property.editable && (property.addPropertyEnabled || deepEditable); else padder\">\n <form class=\"py-3 px-4 is-flex-grow-1\" (submit)=\"addProperty(property)\" novalidate>\n <div class=\"field is-horizontal\">\n <div class=\"field-label is-small\">\n <label class=\"label\" [for]=\"property.id + '_new'\">\n <span>Add new field</span>\n </label>\n </div>\n <div class=\"field-body\">\n <div class=\"field has-addons\">\n <div class=\"control is-expanded\">\n <input class=\"input is-small\"\n [(ngModel)]=\"property.newProperty\"\n [id]=\"property.id + '_new'\"\n name=\"randomname\"\n placeholder=\"Search and select field from results\"\n\n [ngbTypeahead]=\"suggestNewProperty(property.fullKey)\"\n [resultTemplate]=\"suggestion\"\n [inputFormatter]=\"formatter\"\n [focusFirst]=\"false\"\n [editable]=\"false\"\n (focus)=\"typeaheadFocus($event)\"\n >\n </div>\n <div class=\"control\">\n <button class=\"button is-small\" type=\"submit\"\n [disabled]=\"!property.newProperty || !property.newProperty.name\"\n >\n <fa-icon icon=\"plus\"></fa-icon>\n <span class=\"pl-2\">Add</span>\n </button>\n </div>\n </div>\n </div>\n </div>\n </form>\n </header>\n</ng-template>\n\n<ng-template #propertyError let-property=\"property\" let-edit=\"edit\">\n <p class=\"help\"\n [class.is-danger]=\"property.hasError\"\n [class.is-warning]=\"property.hasWarning\"\n *ngIf=\"property.error\"\n >\n <span class=\"is-pre-wrap\" *bindOnce=\"property.error\" [innerHTML]=\"property.error.message\"></span>\n <a class=\"pl-2\"\n *ngIf=\"edit && errorsEditable && property.error.index >= 0\"\n (click)=\"editError(property)\"\n >\n <fa-icon class=\"pr-2\" icon=\"edit\"></fa-icon>\n <span>Edit</span>\n </a>\n <a class=\"pl-2\"\n *ngIf=\"(property.hasWarning || errorsEditable) && property.error.index >= 0\"\n (click)=\"resolveError(property)\"\n >\n <fa-icon class=\"pr-2\" icon=\"check\"></fa-icon>\n <span>Resolved</span>\n </a>\n </p>\n</ng-template>\n\n<ng-template #propertyMap let-property>\n <div class=\"panel is-default\" *ngIf=\"showMap\">\n <div class=\"open-group panel-heading py-0\"\n (click)=\"mapVisible = !mapVisible\" pointer\n [class.is-open]=\"mapVisible\"\n >\n <div class=\"columns is-mobile is-vcentered mb-0\">\n <span class=\"column is-narrow py-1 my-0\">\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!mapVisible\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"mapVisible\"></fa-icon>\n </span>\n <span class=\"column py-1 my-0\">\n <span class=\"is-size-6\">View on Map</span>\n </span>\n </div>\n </div>\n <div class=\"panel-block is-block p-0\" [class.is-hidden]=\"!mapVisible\">\n <he-sites-maps [sites]=\"[node]\" [showNotice]=\"false\"></he-sites-maps>\n </div>\n </div>\n</ng-template>\n\n<ng-template #nodeErrorForm let-property>\n <ng-container *ngIf=\"property.newError && property.editable\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <div class=\"select is-small\">\n <select [(ngModel)]=\"property.newError.level\">\n <option [value]=\"undefined\">Select Level</option>\n <option value=\"error\">Error</option>\n <option value=\"warning\">Warning</option>\n </select>\n </div>\n </div>\n <div class=\"control is-expanded\">\n <textarea class=\"textarea is-small\"\n [(ngModel)]=\"property.newError.message\"\n placeholder=\"Enter your message here\"\n rows=\"1\"\n ></textarea>\n </div>\n <div class=\"control\">\n <button class=\"button is-small\"\n [disabled]=\"!property.newError.level || !property.newError.message\"\n (click)=\"addError(property, property.newError)\"\n >\n <fa-icon icon=\"plus-circle\"></fa-icon>\n <span class=\"pl-2\">Add</span>\n </button>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #popupErrorForm let-data=\"data\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <div class=\"select\">\n <select [(ngModel)]=\"data.level\">\n <option [value]=\"undefined\">Select Level</option>\n <option value=\"error\">Error</option>\n <option value=\"warning\">Warning</option>\n </select>\n </div>\n </div>\n <div class=\"control\">\n <input class=\"input\"\n [(ngModel)]=\"data.message\"\n placeholder=\"Enter your message here\"\n >\n </div>\n </div>\n</ng-template>\n\n<ng-template #suggestion let-r=\"result\" let-t=\"term\">\n <ngb-highlight\n [title]=\"r.bibliography?.title || r.bibliography?.documentDOI || r.bibliography?.scopus || r.name\"\n [result]=\"r.bibliography?.title || r.bibliography?.documentDOI || r.bibliography?.scopus || r.name\"\n [term]=\"t\"\n ></ngb-highlight>\n</ng-template>\n\n<ng-template #padder>\n <div class=\"pt-1\"></div>\n</ng-template>\n\n<ng-template #convertUnits let-value=\"value\" let-term=\"term\" let-units=\"units\">\n <he-unit-converter [value]=\"value\" [term]=\"term\" [toUnits]=\"units\"></he-unit-converter>\n</ng-template>\n", styles: [".panel.is-default .panel-heading{background-color:#ededed;color:#363636}.card-toggle{left:0;position:absolute;top:0}@media screen and (max-width: 768px){.card-toggle{position:relative}}.card-toggle>fa-icon{display:inline-block;width:10px}.card{overflow:visible}.card .card{box-shadow:2px 2px #36363652,0 0 0 1px #36363652}.card .card>.card-header{box-shadow:0 2px 1px #36363652}.property-array-number{left:-4px;position:absolute;top:-12px}.property-array-number .tag.is-delete{border:1px solid rgba(54,54,54,.32)}.control>.button{height:100%}.is-danger-light{color:#f5758f}he-sites-maps{height:200px}\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: NodeIconComponent, selector: "he-node-icon", inputs: ["type", "size"] }, { type: MapsDrawingConfirmComponent, selector: "he-maps-drawing-confirm", inputs: ["value", "modes", "center", "zoom"], outputs: ["closed"] }, { type: BibliographiesSearchConfirmComponent, selector: "he-bibliographies-search-confirm", inputs: ["search", "searchSources", "searchBibliographies", "searchBy"], outputs: ["closed"] }, { type: SchemaVersionLinkComponent, selector: "he-schema-version-link", inputs: ["node", "showExternalLink", "linkClass", "text"] }, { type: PopoverConfirmComponent, selector: "he-popover-confirm", inputs: ["message", "content", "position", "popoverClass"], outputs: ["confirmed"] }, { type: SitesMapsComponent, selector: "he-sites-maps", inputs: ["loadPolygons", "sites", "selected", "nodes", "center", "zoom", "showNotice"] }, { type: i10__namespace.NgbHighlight, selector: "ngb-highlight", inputs: ["highlightClass", "result", "term"] }, { type: UnitConverterComponent, selector: "he-unit-converter", inputs: ["term", "value", "fromUnits", "toUnits"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6__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"] }, { type: i6__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i6__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i10__namespace.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { type: i6__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1__namespace$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i10__namespace.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "placement", "container", "editable", "focusFirst", "showHint", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { type: i1__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: TagsInputDirective, selector: "[appTagsInput]", inputs: ["appTagsInput"] }, { type: i1__namespace$4.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { type: i1__namespace$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i1__namespace$4.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i1__namespace$4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1__namespace$4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1__namespace$4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1__namespace$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace$4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }], pipes: { "pluralize": PluralizePipe } });
8262
+ FilesFormComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilesFormComponent, selector: "he-files-form", inputs: { schemas: "schemas", errors: "errors", node: "node", nodeMap: "nodeMap", editable: "editable", errorMode: "errorMode", deepEditable: "deepEditable", errorsEditable: "errorsEditable", showSuggestedDefaultProperties: "showSuggestedDefaultProperties" }, outputs: { nodeChange: "nodeChange", nodeErorrResolved: "nodeErorrResolved", nodeErrorAdded: "nodeErrorAdded" }, ngImport: i0__namespace, template: "<div class=\"card\">\n <div class=\"card-toggle p-4\" (click)=\"isOpen = !isOpen\" pointer>\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!isOpen\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"isOpen\"></fa-icon>\n <span *ngIf=\"nodeProperty\" class=\"is-px-2\"\n [class.has-text-danger]=\"nodeProperty.hasError\"\n [class.has-text-warning]=\"nodeProperty.hasWarning\"\n >\n <he-node-icon [type]=\"nodeProperty.schemaType\"></he-node-icon>\n </span>\n </div>\n\n <ng-container *ngIf=\"editable && isOpen && nodeProperty\">\n <ng-container *ngTemplateOutlet=\"showNewProperty; context: {$implicit: nodeProperty}\"></ng-container>\n </ng-container>\n\n <div class=\"card-content\">\n <ng-container *ngIf=\"isOpen\">\n <div class=\"pb-3 mb-2\" *ngIf=\"errorsEditable\">\n <ng-container *ngTemplateOutlet=\"nodeErrorForm; context: {$implicit: nodeProperty}\"></ng-container>\n </div>\n\n <div class=\"mb-4\" *ngIf=\"nodeProperty?.error\">\n <ng-container *ngTemplateOutlet=\"propertyError; context: {property: nodeProperty, edit: true}\"></ng-container>\n </div>\n </ng-container>\n\n <div class=\"columns is-multiline\">\n <ng-container *ngFor=\"let property of properties; trackBy: trackByProperty\">\n <ng-container *ngTemplateOutlet=\"showProperty; context: {$implicit: property}\"></ng-container>\n </ng-container>\n </div>\n\n <ng-container *ngIf=\"isOpen\">\n <ng-container *ngTemplateOutlet=\"propertyMap; context: {$implicit: nodeProperty}\"></ng-container>\n </ng-container>\n </div>\n</div>\n\n<he-maps-drawing-confirm *ngIf=\"!!mapDrawingProperty\"\n [value]=\"mapDrawingProperty.value\" [modes]=\"mapDrawingModes(mapDrawingProperty)\"\n (closed)=\"onMapDrawingClosed($event)\"\n></he-maps-drawing-confirm>\n\n<he-bibliographies-search-confirm *ngIf=\"!!bibliographiesSearchProperty\"\n [search]=\"bibliographiesSearchProperty.value\"\n [searchBy]=\"bibliographiesSearchKey(bibliographiesSearchProperty)\"\n [searchSources]=\"bibliographiesSearchSources\"\n (closed)=\"onBibliographiesSearchClosed($event)\"\n></he-bibliographies-search-confirm>\n\n<ng-template #labelDescription let-property>\n <span\n class=\"trigger-popover\"\n [ngbPopover]=\"property.schema?.description\" [autoClose]=\"'outside'\"\n triggers=\"hover\" placement=\"right\" container=\"body\"\n >\n <span>{{property.key}}</span>\n </span>\n</ng-template>\n\n<ng-template #labelDefault let-property>\n <span>{{property.key}}</span>\n</ng-template>\n\n<ng-template #showProperty let-property>\n <ng-container *ngIf=\"(isOpen || property.closedVisible) && !property.isHidden\">\n <div class=\"column is-6\"\n [id]=\"property.fullKey + '_' + property.id\"\n [class.is-12]=\"property.properties.length || !property.key\"\n [ngSwitch]=\"!!property.properties.length\"\n >\n <div class=\"columns is-multiline is-variable is-1\" *ngSwitchCase=\"false\">\n <div class=\"column is-3 py-1\" *ngIf=\"property.key\">\n <label class=\"label has-text-right-tablet has-text-ellipsis\"\n *bindOnce=\"property\"\n [for]=\"property.id\"\n >\n <ng-container\n *ngTemplateOutlet=\"property.schema?.description && editable && property.editable ? labelDescription : labelDefault; context: {$implicit: property}\">\n </ng-container>\n </label>\n </div>\n\n <div class=\"column is-9 py-1\" [class.is-12]=\"!property.key\">\n <div class=\"field\">\n <ng-container *ngTemplateOutlet=\"inputForm; context: {$implicit: property}\"></ng-container>\n\n <ng-container *ngIf=\"(editable || errorsEditable) && (property.hasError || property.hasWarning)\">\n <ng-container *ngTemplateOutlet=\"propertyError; context: {property: property, edit: false}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n\n <div class=\"panel\" *ngSwitchCase=\"true\"\n [class.is-link]=\"errorMode && property.changed\"\n [class.is-danger]=\"!property.changed && property.hasError\"\n [class.is-warning]=\"!property.changed && property.hasWarning\"\n [class.is-default]=\"!property.changed && !property.hasError && !property.hasWarning\"\n >\n <div class=\"open-group panel-heading py-0\"\n (click)=\"property.isOpen = !property.isOpen\" pointer\n [class.is-open]=\"property.isOpen\"\n [class.has-text-white]=\"(errorMode && property.changed) || property.hasError || property.hasWarning\"\n >\n <div class=\"columns is-mobile is-vcentered\">\n <span class=\"column is-narrow py-1 my-0\">\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!property.isOpen\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"property.isOpen\"></fa-icon>\n </span>\n <span class=\"column py-1 my-0\">\n <span class=\"is-size-6\">{{property.key}}</span>\n </span>\n <span *ngIf=\"property.schemaType\" class=\"column is-narrow py-1 my-0\">\n <span class=\"tags mb-0 has-addons\">\n <span class=\"tag mb-0 is-light\">Type</span>\n <span class=\"tag mb-0 is-white\">\n <he-schema-version-link linkClass=\"is-small\" [node]=\"{'@type': property.schemaType}\">\n <span>{{property.schemaType}}</span>\n </he-schema-version-link>\n </span>\n </span>\n </span>\n <he-popover-confirm class=\"column is-narrow py-1 my-0 px-0\"\n *ngIf=\"editable && !errorsEditable\"\n ngbTooltip=\"Remove group\" placement=\"top\"\n [message]=\"'<p>This will remove the group completely.</p>' + (property.isRequired ? '<p><u>Warning: this field is required.</u></p>' : '') + '<p>Do you confirm?</p>'\"\n popoverClass=\"px-3\"\n (confirmed)=\"propertyChanged(null, property)\"\n >\n <fa-icon icon=\"times\" size=\"sm\"></fa-icon>\n </he-popover-confirm>\n </div>\n </div>\n <div class=\"panel-block is-block p-0\" *ngIf=\"property.isOpen\">\n <ng-container [ngSwitch]=\"property.isArray\">\n <div class=\"px-3 pt-4\" *ngIf=\"property.error\">\n <ng-container *ngTemplateOutlet=\"propertyError; context: {property: property, edit: true}\"></ng-container>\n </div>\n\n <div class=\"mt-3\" *ngSwitchCase=\"false\">\n <p class=\"help py-1 px-2\" *ngIf=\"editable && !property.editable\">\n To change the {{property.key}}, please delete it first, then add the field again\n </p>\n <ng-container *ngIf=\"editable && property.editable\">\n <ng-container [ngSwitch]=\"property.schema?.title\">\n <p class=\"help py-1 px-2\" *ngSwitchCase=\"'Bibliography'\">\n Search by Title or Document DOI to auto-populate the fields using the Mendeley catalogue\n </p>\n </ng-container>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"showNewProperty; context: {$implicit: property}\"></ng-container>\n\n <div class=\"px-3 mt-1\" *ngIf=\"errorsEditable\">\n <ng-container *ngTemplateOutlet=\"nodeErrorForm; context: {$implicit: property}\"></ng-container>\n </div>\n\n <div class=\"property-group py-2 px-3 mt-2\">\n <div class=\"columns is-multiline mb-0\">\n <ng-container *ngFor=\"let prop2 of property.properties; trackBy: trackByProperty\">\n <ng-container *ngTemplateOutlet=\"showProperty; context: {$implicit: prop2}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n\n <div class=\"py-2 px-3 mt-2\" *ngSwitchCase=\"true\">\n <div class=\"mt-1\" *ngIf=\"errorsEditable\">\n <ng-container *ngTemplateOutlet=\"nodeErrorForm; context: {$implicit: property}\"></ng-container>\n </div>\n\n <ng-container *ngFor=\"let prop2 of property.properties; trackBy: trackByProperty\">\n <div class=\"card p-0 my-4\" *ngIf=\"prop2.key\"\n [id]=\"prop2.fullKey + '_' + prop2.id\"\n >\n <div class=\"property-array-number\">\n <div class=\"tags has-addons\">\n <span class=\"tag is-dark\">{{prop2.key}}</span>\n <ng-container *ngIf=\"editable && !errorsEditable && property.editable\">\n <span class=\"tag is-info\" pointer\n (click)=\"duplicateArrayGroup(property, prop2)\"\n [ngbTooltip]=\"'Duplicate ' + pluralize(property.key, 1)\" placement=\"top\"\n >\n <fa-icon icon=\"clone\" size=\"sm\"></fa-icon>\n </span>\n <span class=\"tag is-light\" pointer\n *ngIf=\"prop2.key !== '0'\"\n (click)=\"moveArrayGroupUp(property, prop2)\"\n ngbTooltip=\"Move Up\" placement=\"top\"\n >\n <fa-icon icon=\"long-arrow-alt-up\" size=\"sm\"></fa-icon>\n </span>\n <span class=\"tag is-light\" pointer\n *ngIf=\"prop2.key !== property.properties.length - 1\"\n (click)=\"moveArrayGroupDown(property, prop2)\"\n ngbTooltip=\"Move Down\" placement=\"top\"\n >\n <fa-icon icon=\"long-arrow-alt-down\" size=\"sm\"></fa-icon>\n </span>\n <he-popover-confirm class=\"tag is-delete\"\n [ngbTooltip]=\"'Remove ' + pluralize(property.key, 1)\" placement=\"top\"\n message=\"This will remove the group completely. Do you confirm?\" position=\"right\"\n (confirmed)=\"removeArrayGroup(property, prop2)\"\n ></he-popover-confirm>\n </ng-container>\n </div>\n </div>\n\n <ng-container *ngTemplateOutlet=\"showNewProperty; context: {$implicit: prop2}\"></ng-container>\n\n <div class=\"px-4 mt-2\" *ngIf=\"errorsEditable\">\n <ng-container *ngTemplateOutlet=\"nodeErrorForm; context: {$implicit: prop2}\"></ng-container>\n </div>\n\n <div class=\"px-4 mt-2\" *ngIf=\"prop2.error\">\n <ng-container *ngTemplateOutlet=\"propertyError; context: {property: prop2, edit: true}\"></ng-container>\n </div>\n\n <div class=\"property-group card-content p-3\">\n <div class=\"columns is-multiline my-0\">\n <ng-container *ngFor=\"let prop3 of prop2.properties; trackBy: trackByProperty\">\n <ng-container *ngTemplateOutlet=\"showProperty; context: {$implicit: prop3}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n\n <button class=\"button is-dark is-outlined is-small\" type=\"button\"\n *ngIf=\"editable && !errorsEditable\"\n (click)=\"addArrayGroup(property)\"\n >\n <fa-icon icon=\"plus-circle\"></fa-icon>\n <span class=\"pl-2\">Add</span>\n <span class=\"pl-1\">{{property.key | pluralize:1}}</span>\n </button>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #inputForm let-property>\n <ng-container *ngIf=\"property.key\">\n <ng-container [ngSwitch]=\"property.suggestions?.type\">\n <ng-container *ngSwitchCase=\"'select'\">\n <ng-container *ngTemplateOutlet=\"inputSelect; context: {$implicit: property}\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container *ngTemplateOutlet=\"inputInput; context: {$implicit: property}\"></ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #inputInput let-property>\n <div class=\"field mb-0\" [class.has-addons]=\"hasAddons(property)\">\n <div class=\"control is-expanded\"\n [class.has-icons-right]=\"property.loading\"\n >\n <input class=\"input is-small search-input\"\n [class.is-dark]=\"property.key === 'type'\"\n [class.is-link]=\"errorMode && property.changed\"\n [class.is-danger]=\"(!property.changed && property.hasError) || isRequired(property)\"\n [class.is-warning]=\"!property.changed && property.hasWarning\"\n\n [(ngModel)]=\"property.value\" #propertyModel=\"ngModel\"\n [type]=\"property.schema?.type === 'number' ? 'number' : 'string'\"\n [id]=\"property.id\"\n name=\"randomname\"\n [readonly]=\"!editable || !property.editable || property.schema?.internal\"\n [placeholder]=\"property.placeholder\"\n [appTagsInput]=\"{enabled: editable && property.editable && property.schema?.type === 'array', items: property.schema?.items, delimiter: ';', allowDuplicates: true, placeholder: property.placeholder}\"\n (change)=\"propertyChanged($event.target.value, property)\"\n\n [pattern]=\"property.schema?.pattern\"\n [required]=\"property.fullKey.endsWith('id') && property.fullKey !== 'id'\"\n [min]=\"property.schema?.minimum\"\n [max]=\"property.schema?.maximum\"\n\n [ngbTypeahead]=\"propertySuggest(property.fullKey, property.suggestions?.type)\"\n [resultTemplate]=\"suggestion\"\n [inputFormatter]=\"formatter\"\n [focusFirst]=\"true\"\n (focus)=\"editable && property.editable && typeaheadFocus($event)\"\n (selectItem)=\"suggestionSelected($event.item, property)\"\n >\n\n <span class=\"icon is-small is-right has-text-grey-dark\" [class.is-hidden]=\"!property.loading\">\n <fa-icon icon=\"spinner\" [pulse]=\"true\" size=\"sm\"></fa-icon>\n </span>\n </div>\n <ng-container *ngTemplateOutlet=\"inputAddons; context: {$implicit: property}\"></ng-container>\n </div>\n <p class=\"help is-danger-light\"\n *ngIf=\"!property.hasError && propertyModel.invalid\"\n >\n <span *bindOnce=\"propertyModel.errors\" [innerHTML]=\"formatPropertyError(propertyModel.errors, property)\"></span>\n </p>\n</ng-template>\n\n<ng-template #inputSelect let-property>\n <div class=\"field mb-0\" [class.has-addons]=\"hasAddons(property)\">\n <div class=\"control is-expanded\">\n <div class=\"select is-small is-fullwidth\"\n [class.is-link]=\"errorMode && property.changed\"\n [class.is-danger]=\"(!property.changed && property.hasError) || isRequired(property)\"\n [class.is-warning]=\"!property.changed && property.hasWarning\"\n >\n <select\n [(ngModel)]=\"property.value\" #propertyModel=\"ngModel\"\n [id]=\"property.id\"\n name=\"randomname\"\n [disabled]=\"!editable || !property.editable || property.schema?.internal\"\n (change)=\"propertyChanged($event.target.value, property)\"\n >\n <option value=\"\">Select</option>\n <ng-container *bindOnce=\"property.suggestions\">\n <option *ngFor=\"let value of property.suggestions.values; trackBy: trackByIndex\" [value]=\"value\">{{value}}</option>\n </ng-container>\n </select>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"inputAddons; context: {$implicit: property}\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #removeFieldAddon let-property>\n <div class=\"control\" *ngIf=\"!errorsEditable && !property.isRequired\">\n <a class=\"button is-small\" title=\"Remove field\"\n [class.is-outlined]=\"!property.changed && (property.hasError || property.hasWarning)\"\n [class.is-danger]=\"!property.changed && property.hasError\"\n [class.is-warning]=\"!property.changed && property.hasWarning\"\n (click)=\"$event.stopPropagation(); propertyChanged(null, property)\"\n >\n <fa-icon icon=\"times\"></fa-icon>\n </a>\n </div>\n</ng-template>\n\n<ng-template #inputAddons let-property>\n <he-popover-confirm class=\"control\"\n *ngIf=\"enableAddError(property)\"\n position=\"left\"\n [content]=\"popupErrorForm\"\n (confirmed)=\"addError(property, $event)\"\n >\n <span class=\"button is-small\">\n <fa-icon icon=\"comments\"></fa-icon>\n </span>\n </he-popover-confirm>\n\n <ng-container *ngIf=\"editable && property.editable\">\n <ng-container [ngSwitch]=\"property.schemaType\">\n <ng-container *ngSwitchCase=\"SchemaType.Actor\">\n <ng-container *ngTemplateOutlet=\"actorAddons; context: {$implicit: property}\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"SchemaType.Cycle\">\n <ng-container *ngTemplateOutlet=\"cycleAddons; context: {$implicit: property}\"></ng-container>\n </ng-container>\n </ng-container>\n <ng-container *bindOnce=\"property\">\n <div class=\"control\" *ngIf=\"mapDrawingModes(property).length\">\n <button class=\"button is-small\" title=\"Pick on Map\"\n (click)=\"mapDrawingProperty = property\"\n >\n <fa-icon icon=\"map-marked-alt\"></fa-icon>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"bibliographiesSearchKey(property)\">\n <button class=\"button is-small\" title=\"Advanced Search\"\n (click)=\"bibliographiesSearchProperty = property\"\n >\n <fa-icon icon=\"search\"></fa-icon>\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"removeFieldAddon; context: {$implicit: property}\"></ng-container>\n </ng-container>\n <div class=\"control\" *ngIf=\"addPropertyEnabled(property)\">\n <a class=\"button is-small is-danger\" title=\"Add field\"\n (click)=\"$event.stopPropagation(); addMissingProperty(property)\"\n >\n <fa-icon icon=\"plus-circle\"></fa-icon>\n <span class=\"pl-2\">Add</span>\n </a>\n </div>\n <div class=\"control\" *ngIf=\"isRequired(property)\">\n <label class=\"button is-small is-danger\" [for]=\"property.id\"\n ngbTooltip=\"This field is required\" placement=\"top\"\n >\n <fa-icon icon=\"exclamation-triangle\"></fa-icon>\n </label>\n </div>\n <ng-container *ngIf=\"property.externalUrl?.url\">\n <div class=\"control\">\n <a class=\"button is-small\"\n [href]=\"property.externalUrl.url + (property.externalUrl.urlParamValue ? property.value : '')\"\n target=\"_blank\"\n [title]=\"property.externalUrl.title\"\n [ngClass]=\"{'is-dark is-outlined': property.key === 'type'}\"\n [attr.disabled]=\"property.externalUrl.urlParamValue && !property.value ? true : null\"\n >\n <fa-icon [icon]=\"property.externalUrl.icon || 'external-link-alt'\"></fa-icon>\n </a>\n </div>\n </ng-container>\n <ng-container *ngIf=\"unitConverterEnabled(property)\">\n <div class=\"control\">\n <button class=\"button is-small\" title=\"Open calculator\"\n [ngbPopover]=\"convertUnits\" autoClose=\"outside\"\n triggers=\"manual\" #p=\"ngbPopover\" placement=\"bottom\" container=\"body\"\n (click)=\"openUnitConverter(p, property)\"\n >\n <fa-icon icon=\"calculator\"></fa-icon>\n </button>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #actorAddons let-property>\n <div class=\"control\" *ngIf=\"property.key === '@id'\">\n <button class=\"button is-small\" title=\"Add myself as Actor\"\n (click)=\"setUserActorId(property)\"\n >\n <fa-icon [icon]=\"['far', 'id-badge']\"></fa-icon>\n </button>\n </div>\n</ng-template>\n\n<ng-template #cycleAddons let-property>\n <div class=\"control\" *ngIf=\"property.key === 'cycleDuration'\">\n <button class=\"button is-small\" title=\"Calculate value from startDate and endDate\"\n (click)=\"calculateCycleDuration(property)\"\n [disabled]=\"!calculateCycleDurationEnabled(property)\"\n >\n <fa-icon icon=\"calculator\"></fa-icon>\n </button>\n </div>\n <div class=\"control\" *ngIf=\"property.key === 'startDate'\">\n <button class=\"button is-small\" title=\"Calculate value from endDate and cycleDuration\"\n (click)=\"calculateCycleStartDate(property)\"\n [disabled]=\"!calculateCycleStartDateEnabled(property)\"\n >\n <fa-icon icon=\"calculator\"></fa-icon>\n </button>\n </div>\n</ng-template>\n\n<ng-template #showNewProperty let-property>\n <header class=\"card-header\" *ngIf=\"editable && property.editable && (property.addPropertyEnabled || deepEditable); else padder\">\n <form class=\"py-3 px-4 is-flex-grow-1\" (submit)=\"addProperty(property)\" novalidate>\n <div class=\"field is-horizontal\">\n <div class=\"field-label is-small\">\n <label class=\"label\" [for]=\"property.id + '_new'\">\n <span>Add new field</span>\n </label>\n </div>\n <div class=\"field-body\">\n <div class=\"field has-addons\">\n <div class=\"control is-expanded\">\n <input class=\"input is-small\"\n [(ngModel)]=\"property.newProperty\"\n [id]=\"property.id + '_new'\"\n name=\"randomname\"\n placeholder=\"Search and select field from results\"\n\n [ngbTypeahead]=\"suggestNewProperty(property.fullKey)\"\n [resultTemplate]=\"suggestion\"\n [inputFormatter]=\"formatter\"\n [focusFirst]=\"false\"\n [editable]=\"false\"\n (focus)=\"typeaheadFocus($event)\"\n >\n </div>\n <div class=\"control\">\n <button class=\"button is-small\" type=\"submit\"\n [disabled]=\"!property.newProperty || !property.newProperty.name\"\n >\n <fa-icon icon=\"plus\"></fa-icon>\n <span class=\"pl-2\">Add</span>\n </button>\n </div>\n </div>\n </div>\n </div>\n </form>\n </header>\n</ng-template>\n\n<ng-template #propertyError let-property=\"property\" let-edit=\"edit\">\n <p class=\"help\"\n [class.is-danger]=\"property.hasError\"\n [class.is-warning]=\"property.hasWarning\"\n *ngIf=\"property.error\"\n >\n <span class=\"is-pre-wrap\" *bindOnce=\"property.error\" [innerHTML]=\"property.error.message\"></span>\n <a class=\"pl-2\"\n *ngIf=\"edit && errorsEditable && property.error.index >= 0\"\n (click)=\"editError(property)\"\n >\n <fa-icon class=\"pr-2\" icon=\"edit\"></fa-icon>\n <span>Edit</span>\n </a>\n <a class=\"pl-2\"\n *ngIf=\"(property.hasWarning || errorsEditable) && property.error.index >= 0\"\n (click)=\"resolveError(property)\"\n >\n <fa-icon class=\"pr-2\" icon=\"check\"></fa-icon>\n <span>Resolved</span>\n </a>\n </p>\n</ng-template>\n\n<ng-template #propertyMap let-property>\n <div class=\"panel is-default\" *ngIf=\"showMap\">\n <div class=\"open-group panel-heading py-0\"\n (click)=\"mapVisible = !mapVisible\" pointer\n [class.is-open]=\"mapVisible\"\n >\n <div class=\"columns is-mobile is-vcentered mb-0\">\n <span class=\"column is-narrow py-1 my-0\">\n <fa-icon icon=\"angle-down\" [class.is-hidden]=\"!mapVisible\"></fa-icon>\n <fa-icon icon=\"angle-right\" [class.is-hidden]=\"mapVisible\"></fa-icon>\n </span>\n <span class=\"column py-1 my-0\">\n <span class=\"is-size-6\">View on Map</span>\n </span>\n </div>\n </div>\n <div class=\"panel-block is-block p-0\" [class.is-hidden]=\"!mapVisible\">\n <he-sites-maps [sites]=\"[node]\" [showNotice]=\"false\"></he-sites-maps>\n </div>\n </div>\n</ng-template>\n\n<ng-template #nodeErrorForm let-property>\n <ng-container *ngIf=\"property.newError && property.editable\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <div class=\"select is-small\">\n <select [(ngModel)]=\"property.newError.level\">\n <option [value]=\"undefined\">Select Level</option>\n <option value=\"error\">Error</option>\n <option value=\"warning\">Warning</option>\n </select>\n </div>\n </div>\n <div class=\"control is-expanded\">\n <textarea class=\"textarea is-small\"\n [(ngModel)]=\"property.newError.message\"\n placeholder=\"Enter your message here\"\n rows=\"1\"\n ></textarea>\n </div>\n <div class=\"control\">\n <button class=\"button is-small\"\n [disabled]=\"!property.newError.level || !property.newError.message\"\n (click)=\"addError(property, property.newError)\"\n >\n <fa-icon icon=\"plus-circle\"></fa-icon>\n <span class=\"pl-2\">Add</span>\n </button>\n </div>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #popupErrorForm let-data=\"data\">\n <div class=\"field has-addons\">\n <div class=\"control\">\n <div class=\"select\">\n <select [(ngModel)]=\"data.level\">\n <option [value]=\"undefined\">Select Level</option>\n <option value=\"error\">Error</option>\n <option value=\"warning\">Warning</option>\n </select>\n </div>\n </div>\n <div class=\"control\">\n <input class=\"input\"\n [(ngModel)]=\"data.message\"\n placeholder=\"Enter your message here\"\n >\n </div>\n </div>\n</ng-template>\n\n<ng-template #suggestion let-r=\"result\" let-t=\"term\">\n <ngb-highlight\n [title]=\"r.bibliography?.title || r.bibliography?.documentDOI || r.bibliography?.scopus || r.name\"\n [result]=\"r.bibliography?.title || r.bibliography?.documentDOI || r.bibliography?.scopus || r.name\"\n [term]=\"t\"\n ></ngb-highlight>\n</ng-template>\n\n<ng-template #padder>\n <div class=\"pt-1\"></div>\n</ng-template>\n\n<ng-template #convertUnits let-value=\"value\" let-term=\"term\" let-units=\"units\">\n <he-unit-converter [value]=\"value\" [term]=\"term\" [toUnits]=\"units\"></he-unit-converter>\n</ng-template>\n", styles: [".panel.is-default .panel-heading{background-color:#ededed;color:#363636}.card-toggle{left:0;position:absolute;top:0}@media screen and (max-width: 768px){.card-toggle{position:relative}}.card-toggle>fa-icon{display:inline-block;width:10px}.card{overflow:visible}.card .card{box-shadow:2px 2px #36363652,0 0 0 1px #36363652}.card .card>.card-header{box-shadow:0 2px 1px #36363652}.property-array-number{left:-4px;position:absolute;top:-12px}.property-array-number .tag.is-delete{border:1px solid rgba(54,54,54,.32)}.control>.button{height:100%}.is-danger-light{color:#f5758f}he-sites-maps{height:200px}\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: NodeIconComponent, selector: "he-node-icon", inputs: ["type", "size"] }, { type: MapsDrawingConfirmComponent, selector: "he-maps-drawing-confirm", inputs: ["value", "modes", "center", "zoom"], outputs: ["closed"] }, { type: BibliographiesSearchConfirmComponent, selector: "he-bibliographies-search-confirm", inputs: ["search", "searchSources", "searchBibliographies", "searchBy"], outputs: ["closed"] }, { type: SchemaVersionLinkComponent, selector: "he-schema-version-link", inputs: ["node", "showExternalLink", "linkClass", "text"] }, { type: PopoverConfirmComponent, selector: "he-popover-confirm", inputs: ["message", "content", "position", "popoverClass"], outputs: ["confirmed"] }, { type: SitesMapsComponent, selector: "he-sites-maps", inputs: ["loadPolygons", "sites", "selected", "nodes", "center", "zoom", "showNotice"] }, { type: i10__namespace.NgbHighlight, selector: "ngb-highlight", inputs: ["highlightClass", "result", "term"] }, { type: UnitConverterComponent, selector: "he-unit-converter", inputs: ["term", "value", "fromUnits", "toUnits"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6__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"] }, { type: i6__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i6__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i10__namespace.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { type: i6__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1__namespace$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i10__namespace.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "placement", "container", "editable", "focusFirst", "showHint", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { type: i1__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: TagsInputDirective, selector: "[appTagsInput]", inputs: ["appTagsInput"] }, { type: i1__namespace$4.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { type: i1__namespace$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i1__namespace$4.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i1__namespace$4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1__namespace$4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1__namespace$4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1__namespace$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace$4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }], pipes: { "pluralize": PluralizePipe } });
8173
8263
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FilesFormComponent, decorators: [{
8174
8264
  type: i0.Component,
8175
8265
  args: [{
@@ -8193,6 +8283,8 @@
8193
8283
  type: i0.Input
8194
8284
  }], errorsEditable: [{
8195
8285
  type: i0.Input
8286
+ }], showSuggestedDefaultProperties: [{
8287
+ type: i0.Input
8196
8288
  }], nodeChange: [{
8197
8289
  type: i0.Output
8198
8290
  }], nodeErorrResolved: [{
@@ -8588,10 +8680,17 @@
8588
8680
  enumerable: false,
8589
8681
  configurable: true
8590
8682
  });
8683
+ Object.defineProperty(ImpactAssessmentsProductsLogsComponent.prototype, "filteredType", {
8684
+ get: function () {
8685
+ return this.filterTermTypes.map(termTypeLabel).join(' & ');
8686
+ },
8687
+ enumerable: false,
8688
+ configurable: true
8689
+ });
8591
8690
  return ImpactAssessmentsProductsLogsComponent;
8592
8691
  }());
8593
8692
  ImpactAssessmentsProductsLogsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ImpactAssessmentsProductsLogsComponent, deps: [{ token: HeSearchService }, { token: HeNodeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
8594
- ImpactAssessmentsProductsLogsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ImpactAssessmentsProductsLogsComponent, selector: "he-impact-assessments-products-logs", inputs: { impactAssessment: "impactAssessment", key: "key", filterTermTypes: "filterTermTypes", originalValues: "originalValues", recalculatedValues: "recalculatedValues" }, ngImport: i0__namespace, template: "<he-node-logs-models *ngIf=\"!loading; else loader\"\n [logsUrl]=\"logsUrl\"\n [nodeType]=\"NodeType.ImpactAssessment\"\n [nodeKey]=\"key\"\n [originalValues]=\"originalValues\"\n [recalculatedValues]=\"recalculatedValues\"\n [terms]=\"emissions\"\n [logs]=\"logs\"\n filteredType=\"Emission\"\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: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
8693
+ ImpactAssessmentsProductsLogsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ImpactAssessmentsProductsLogsComponent, selector: "he-impact-assessments-products-logs", inputs: { impactAssessment: "impactAssessment", key: "key", filterTermTypes: "filterTermTypes", originalValues: "originalValues", recalculatedValues: "recalculatedValues" }, ngImport: i0__namespace, template: "<he-node-logs-models *ngIf=\"!loading; else loader\"\n [logsUrl]=\"logsUrl\"\n [nodeType]=\"NodeType.ImpactAssessment\"\n [nodeKey]=\"key\"\n [originalValues]=\"originalValues\"\n [recalculatedValues]=\"recalculatedValues\"\n [terms]=\"emissions\"\n [logs]=\"logs\"\n [filteredType]=\"filteredType\"\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: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
8595
8694
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ImpactAssessmentsProductsLogsComponent, decorators: [{
8596
8695
  type: i0.Component,
8597
8696
  args: [{
@@ -8612,7 +8711,6 @@
8612
8711
  }] } });
8613
8712
 
8614
8713
  var orderBy = require('lodash.orderby');
8615
- var MIN_TYPEAHEAD_LENGTH = 1;
8616
8714
  var View;
8617
8715
  (function (View) {
8618
8716
  View["table"] = "table";
@@ -8629,7 +8727,7 @@
8629
8727
  this.key = 'impacts';
8630
8728
  this.enableFilterMethodModel = false;
8631
8729
  this.loading = false;
8632
- this.propertyValue = propertyValue$1;
8730
+ this.propertyValue = term.propertyValue;
8633
8731
  this.baseUrl = baseUrl();
8634
8732
  this.showDownload = false;
8635
8733
  this.View = View;
@@ -8894,6 +8992,7 @@
8894
8992
  exports.CyclesResultComponent = CyclesResultComponent;
8895
8993
  exports.DefaultPipe = DefaultPipe;
8896
8994
  exports.EllipsisPipe = EllipsisPipe;
8995
+ exports.EngineOrchestratorEditComponent = EngineOrchestratorEditComponent;
8897
8996
  exports.FilesFormComponent = FilesFormComponent;
8898
8997
  exports.GetPipe = GetPipe;
8899
8998
  exports.HE_API_BASE_URL = HE_API_BASE_URL;
@@ -8905,6 +9004,7 @@
8905
9004
  exports.HeCommonModule = HeCommonModule;
8906
9005
  exports.HeCommonService = HeCommonService;
8907
9006
  exports.HeCyclesModule = HeCyclesModule;
9007
+ exports.HeEngineModule = HeEngineModule;
8908
9008
  exports.HeEngineService = HeEngineService;
8909
9009
  exports.HeFilesModule = HeFilesModule;
8910
9010
  exports.HeFontawesomeModule = HeFontawesomeModule;
@@ -8963,23 +9063,20 @@
8963
9063
  exports.calculateCycleDurationEnabled = calculateCycleDurationEnabled;
8964
9064
  exports.calculateCycleStartDate = calculateCycleStartDate;
8965
9065
  exports.calculateCycleStartDateEnabled = calculateCycleStartDateEnabled;
8966
- exports.calculatePercentDelta = calculatePercentDelta;
8967
9066
  exports.clustererImage = clustererImage;
8968
9067
  exports.code = code;
8969
9068
  exports.coordinatesToPoint = coordinatesToPoint;
8970
9069
  exports.countriesQuery = countriesQuery;
8971
9070
  exports.createMarker = createMarker;
8972
9071
  exports.cropsQuery = cropsQuery;
8973
- exports.customDeltaFuncs = customDeltaFuncs;
8974
9072
  exports.dataPathToKey = dataPathToKey;
8975
9073
  exports.defaultFeature = defaultFeature;
8976
9074
  exports.defaultLabel = defaultLabel;
8977
9075
  exports.defaultSuggestionType = defaultSuggestionType;
8978
9076
  exports.definitionToSchemaType = definitionToSchemaType;
8979
- exports.delta = delta;
8980
9077
  exports.deserializeSearchFilters = deserializeSearchFilters;
8981
9078
  exports.ellipsis = ellipsis;
8982
- exports.emptyValue = emptyValue;
9079
+ exports.engineGitUrl = engineGitUrl;
8983
9080
  exports.errorHasError = errorHasError;
8984
9081
  exports.errorHasWarning = errorHasWarning;
8985
9082
  exports.errorText = errorText;
@@ -8994,9 +9091,7 @@
8994
9091
  exports.findPropertyById = findPropertyById;
8995
9092
  exports.formatCustomErrorMessage = formatCustomErrorMessage;
8996
9093
  exports.formatError = formatError;
8997
- exports.formatLinkNodesSuggestions = formatLinkNodesSuggestions;
8998
9094
  exports.formatPropertyError = formatPropertyError;
8999
- exports.formatSuggestion = formatSuggestion;
9000
9095
  exports.gitBranch = gitBranch;
9001
9096
  exports.gitHome = gitHome;
9002
9097
  exports.gitRawBaseUrl = gitRawBaseUrl;
@@ -9016,7 +9111,6 @@
9016
9111
  exports.isScrolledBelow = isScrolledBelow;
9017
9112
  exports.itemColor = itemColor;
9018
9113
  exports.keyToDataPath = keyToDataPath;
9019
- exports.keyToLabel = keyToLabel;
9020
9114
  exports.levels = levels;
9021
9115
  exports.linkTypeEnabled = linkTypeEnabled;
9022
9116
  exports.listColor = listColor;
@@ -9068,13 +9162,11 @@
9068
9162
  exports.primaryProduct = primaryProduct;
9069
9163
  exports.propertyError = propertyError;
9070
9164
  exports.propertyId = propertyId;
9071
- exports.propertyValue = propertyValue$1;
9072
9165
  exports.recursiveProperties = recursiveProperties;
9073
9166
  exports.refToSchemaType = refToSchemaType;
9074
9167
  exports.refreshPropertyKeys = refreshPropertyKeys;
9075
9168
  exports.regionsQuery = regionsQuery;
9076
9169
  exports.repeat = repeat;
9077
- exports.roundValue = roundValue;
9078
9170
  exports.safeJSONParse = safeJSONParse;
9079
9171
  exports.safeJSONStringify = safeJSONStringify;
9080
9172
  exports.schemaRequiredProperties = schemaRequiredProperties;
@@ -9102,7 +9194,6 @@
9102
9194
  exports.termTypeLabel = termTypeLabel;
9103
9195
  exports.termTypeLookupUrl = termTypeLookupUrl;
9104
9196
  exports.toCsv = toCsv$1;
9105
- exports.toDashCase = toDashCase;
9106
9197
  exports.typeToNewProperty = typeToNewProperty;
9107
9198
  exports.updateProperties = updateProperties;
9108
9199
  exports.valueTypeToDefault = valueTypeToDefault;