@hestia-earth/ui-components 0.0.23 → 0.0.26

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 (38) hide show
  1. package/bundles/hestia-earth-ui-components.umd.js +221 -160
  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/link-key-value/link-key-value.component.d.ts +2 -0
  6. package/common/utils.d.ts +0 -4
  7. package/engine/engine-orchestrator-edit/engine-orchestrator-edit.component.d.ts +19 -0
  8. package/engine/engine.module.d.ts +10 -0
  9. package/engine/engine.service.d.ts +2 -0
  10. package/engine/index.d.ts +2 -0
  11. package/esm2015/common/blank-node-value-delta/blank-node-value-delta.component.js +4 -3
  12. package/esm2015/common/delta-utils.js +1 -41
  13. package/esm2015/common/link-key-value/link-key-value.component.js +6 -2
  14. package/esm2015/common/utils.js +2 -23
  15. package/esm2015/cycles/cycles-activity/cycles-activity.component.js +3 -2
  16. package/esm2015/cycles/cycles-completeness/cycles-completeness.component.js +3 -2
  17. package/esm2015/cycles/cycles-emissions/cycles-emissions.component.js +3 -2
  18. package/esm2015/cycles/cycles-emissions-chart/cycles-emissions-chart.component.js +3 -2
  19. package/esm2015/cycles/cycles-practices/cycles-practices.component.js +3 -2
  20. package/esm2015/cycles/cycles-result/cycles-result.component.js +3 -2
  21. package/esm2015/engine/engine-orchestrator-edit/engine-orchestrator-edit.component.js +61 -0
  22. package/esm2015/engine/engine.module.js +33 -0
  23. package/esm2015/engine/engine.service.js +11 -6
  24. package/esm2015/engine/index.js +3 -1
  25. package/esm2015/files/files-error.model.js +3 -3
  26. package/esm2015/files/files-form/files-form.component.js +33 -6
  27. package/esm2015/files/files-form.model.js +1 -8
  28. package/esm2015/impact-assessments/impact-assessments-products/impact-assessments-products.component.js +3 -3
  29. package/esm2015/node/node-logs-models/node-logs-models.component.js +4 -3
  30. package/esm2015/node/node-value-details/node-value-details.component.js +2 -2
  31. package/esm2015/sites/sites.model.js +2 -2
  32. package/esm2015/tags-input/index.js +2 -1
  33. package/esm2015/terms/terms.model.js +2 -2
  34. package/fesm2015/hestia-earth-ui-components.js +145 -99
  35. package/fesm2015/hestia-earth-ui-components.js.map +1 -1
  36. package/files/files-form/files-form.component.d.ts +13 -1
  37. package/files/files-form.model.d.ts +0 -14
  38. 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,8 +1349,8 @@
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(); };
1352
+ var engineGitUrl = function () { return gitHome + "/hestia-engine-models/-/blob/" + gitBranch(); };
1353
+ var engineRawUrl = function () { return gitRawBaseUrl + "/hestia-engine-models/-/raw/" + gitBranch(); };
1374
1354
  var findModels = function (models, termId) { return models.filter(function (_b) {
1375
1355
  var term = _b.term;
1376
1356
  return term === termId;
@@ -1398,8 +1378,8 @@
1398
1378
  'docs',
1399
1379
  [
1400
1380
  '#hestia-calculation-models',
1401
- toDashCase(model),
1402
- toDashCase(term)
1381
+ utils.toDashCase(model),
1382
+ utils.toDashCase(term)
1403
1383
  ].filter(Boolean).join('-')
1404
1384
  ].join('/'); };
1405
1385
  var HeEngineService = /** @class */ (function () {
@@ -1426,11 +1406,11 @@
1426
1406
  HeEngineService.prototype.loadModels = function () {
1427
1407
  var _this = this;
1428
1408
  this.modelsLoading = true;
1429
- 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) {
1430
1410
  var links = _b.links;
1431
1411
  _this._models.next(links.map(function (_a) {
1432
1412
  var path = _a.path, docPath = _a.docPath, link = __rest(_a, ["path", "docPath"]);
1433
- 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) }));
1434
1414
  }));
1435
1415
  _this.modelsLoading = false;
1436
1416
  _this.modelsLoaded = true;
@@ -1456,6 +1436,10 @@
1456
1436
  HeEngineService.prototype.model = function (model) {
1457
1437
  return this.model$(model).pipe(operators.take(1)).toPromise();
1458
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
+ };
1459
1443
  HeEngineService.prototype.ochestratorConfig = function (type) {
1460
1444
  return this.http.get(this._orchestratorBaseUrl + "/" + type + ".json", {
1461
1445
  params: { inline: false }
@@ -1624,7 +1608,6 @@
1624
1608
  type: i0.Input
1625
1609
  }] } });
1626
1610
 
1627
- var _a$4, _b$1, _c$1, _d$3;
1628
1611
  var SUCCESS_CRITERION_MAX_DELTA_PERCENT = 5;
1629
1612
  var WARNING_CRITERION_MAX_DELTA_PERCENT = 20;
1630
1613
  exports.DeltaColour = void 0;
@@ -1633,46 +1616,6 @@
1633
1616
  DeltaColour["Warning"] = "warning";
1634
1617
  DeltaColour["Danger"] = "danger";
1635
1618
  })(exports.DeltaColour || (exports.DeltaColour = {}));
1636
- exports.DeltaDisplayType = void 0;
1637
- (function (DeltaDisplayType) {
1638
- DeltaDisplayType["absolute"] = "absolute";
1639
- DeltaDisplayType["percent"] = "percent";
1640
- })(exports.DeltaDisplayType || (exports.DeltaDisplayType = {}));
1641
- var deltaPerType = (_a$4 = {},
1642
- _a$4[exports.DeltaDisplayType.absolute] = function (value, original) { return value - original; },
1643
- _a$4[exports.DeltaDisplayType.percent] = function (value, original) { return ((value - original) / original) * 100; },
1644
- _a$4);
1645
- var roundValue = function (value) { return +("" + value).substring(0, 10); };
1646
- var delta = function (value, originalValue, displayType, mapping) {
1647
- if (displayType === void 0) { displayType = exports.DeltaDisplayType.percent; }
1648
- var vvalue = roundValue(propertyValue$1(value));
1649
- var voriginalValue = roundValue(propertyValue$1(originalValue));
1650
- var deltaFuncs = Object.assign(Object.assign({}, deltaPerType), mapping);
1651
- var diff = vvalue === voriginalValue ? 0 : deltaFuncs[displayType](vvalue, voriginalValue);
1652
- return Number.isFinite(diff) ? (diff === -0 ? 0 : diff) : 0;
1653
- };
1654
- var PercentDeltaConditions;
1655
- (function (PercentDeltaConditions) {
1656
- PercentDeltaConditions["recalculated0"] = "recalculated should be 0";
1657
- PercentDeltaConditions["original0"] = "original is 0";
1658
- })(PercentDeltaConditions || (PercentDeltaConditions = {}));
1659
- var calculatePercentDeltaConditions = (_b$1 = {},
1660
- _b$1[PercentDeltaConditions.recalculated0] = function (original, recalculated) { return original > 0 && recalculated === 0; },
1661
- _b$1[PercentDeltaConditions.original0] = function (original, recalculated) { return original === 0 && recalculated > 0; },
1662
- _b$1);
1663
- var calculatePercentDeltaResult = (_c$1 = {},
1664
- _c$1[PercentDeltaConditions.recalculated0] = function (original, recalculated) { return (recalculated - original) / (original + 1); },
1665
- // Always considered an error so deliberately exceed SUCCESS_CRITERION_MAX_DELTA_PERCENT
1666
- _c$1[PercentDeltaConditions.original0] = function (original, recalculated) { return Math.sign(recalculated - original); },
1667
- _c$1.default = function (original, recalculated) { return (recalculated - original) / original; },
1668
- _c$1);
1669
- var calculatePercentDelta = function (recalculated, original) {
1670
- var matchingCondition = Object.values(PercentDeltaConditions).find(function (value) { return calculatePercentDeltaConditions[value](original, recalculated); }) || 'default';
1671
- return calculatePercentDeltaResult[matchingCondition](original, recalculated) * 100;
1672
- };
1673
- var customDeltaFuncs = (_d$3 = {},
1674
- _d$3[exports.DeltaDisplayType.percent] = calculatePercentDelta,
1675
- _d$3);
1676
1619
  var evaluateSuccess = function (deltaValue) { return Math.abs(deltaValue) < SUCCESS_CRITERION_MAX_DELTA_PERCENT
1677
1620
  ? exports.DeltaColour.Success
1678
1621
  : Math.abs(deltaValue) < WARNING_CRITERION_MAX_DELTA_PERCENT
@@ -1681,26 +1624,26 @@
1681
1624
 
1682
1625
  var BlankNodeValueDeltaComponent = /** @class */ (function () {
1683
1626
  function BlankNodeValueDeltaComponent() {
1684
- this.displayType = exports.DeltaDisplayType.percent;
1685
- this.DeltaDisplayType = exports.DeltaDisplayType;
1627
+ this.displayType = delta.DeltaDisplayType.percent;
1628
+ this.DeltaDisplayType = delta.DeltaDisplayType;
1686
1629
  }
1687
1630
  Object.defineProperty(BlankNodeValueDeltaComponent.prototype, "hide", {
1688
1631
  get: function () {
1689
- return emptyValue(this.value) || emptyValue(this.originalValue);
1632
+ return term.emptyValue(this.value) || term.emptyValue(this.originalValue);
1690
1633
  },
1691
1634
  enumerable: false,
1692
1635
  configurable: true
1693
1636
  });
1694
1637
  Object.defineProperty(BlankNodeValueDeltaComponent.prototype, "delta", {
1695
1638
  get: function () {
1696
- return delta(this.value, this.originalValue, this.displayType, customDeltaFuncs);
1639
+ return delta.delta(this.value, this.originalValue, this.displayType, delta.customDeltaFuncs);
1697
1640
  },
1698
1641
  enumerable: false,
1699
1642
  configurable: true
1700
1643
  });
1701
1644
  Object.defineProperty(BlankNodeValueDeltaComponent.prototype, "color", {
1702
1645
  get: function () {
1703
- return this.displayType === exports.DeltaDisplayType.percent ? evaluateSuccess(this.delta) : '';
1646
+ return this.displayType === delta.DeltaDisplayType.percent ? evaluateSuccess(this.delta) : '';
1704
1647
  },
1705
1648
  enumerable: false,
1706
1649
  configurable: true
@@ -1806,6 +1749,7 @@
1806
1749
  var LinkKeyValueComponent = /** @class */ (function () {
1807
1750
  function LinkKeyValueComponent() {
1808
1751
  this.baseUrl = baseUrl();
1752
+ this.toString = toString;
1809
1753
  }
1810
1754
  Object.defineProperty(LinkKeyValueComponent.prototype, "type", {
1811
1755
  get: function () {
@@ -1837,6 +1781,13 @@
1837
1781
  enumerable: false,
1838
1782
  configurable: true
1839
1783
  });
1784
+ Object.defineProperty(LinkKeyValueComponent.prototype, "isArray", {
1785
+ get: function () {
1786
+ return Array.isArray(this.value) && this.value.length > 1;
1787
+ },
1788
+ enumerable: false,
1789
+ configurable: true
1790
+ });
1840
1791
  Object.defineProperty(LinkKeyValueComponent.prototype, "isUndefined", {
1841
1792
  get: function () {
1842
1793
  return utils.isUndefined(this.value);
@@ -1847,7 +1798,7 @@
1847
1798
  return LinkKeyValueComponent;
1848
1799
  }());
1849
1800
  LinkKeyValueComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LinkKeyValueComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1850
- LinkKeyValueComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: LinkKeyValueComponent, selector: "he-link-key-value", inputs: { node: "node", nodeType: "nodeType", dataKey: "dataKey", key: "key" }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"!isUndefined\">\n <ng-container *bindOnce=\"node\">\n <a [href]=\"baseUrl + '/schema/' + type + '#' + key\" target=\"_blank\"><b>{{key}}</b></a>\n <span class=\"pr-2\">:</span>\n <a [href]=\"valueLink\" *ngIf=\"valueLink; else showString\">{{valueString}}</a>\n <he-blank-node-state class=\"ml-1\"\n [node]=\"node\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"\n ></he-blank-node-state>\n </ng-container>\n</ng-container>\n\n<ng-template #showString>\n {{valueString | precision:3}}\n</ng-template>\n", styles: [":host{display:block}\n"], components: [{ type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["nodeType", "dataKey", "key", "node", "state"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }], pipes: { "precision": PrecisionPipe } });
1801
+ LinkKeyValueComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: LinkKeyValueComponent, selector: "he-link-key-value", inputs: { node: "node", nodeType: "nodeType", dataKey: "dataKey", key: "key" }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"!isUndefined\">\n <ng-container *bindOnce=\"node\">\n <a [href]=\"baseUrl + '/schema/' + type + '#' + key\" target=\"_blank\"><b>{{key}}</b></a>\n <span class=\"pr-2\">:</span>\n <a class=\"pr-1\" [href]=\"valueLink\" *ngIf=\"valueLink; else showString\">{{valueString}}</a>\n <he-blank-node-state\n [node]=\"node\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"\n ></he-blank-node-state>\n </ng-container>\n</ng-container>\n\n<ng-template #showString>\n <ng-container *ngIf=\"isArray\">\n <p *ngFor=\"let v of value\">{{toString(v) | precision:3}}</p>\n </ng-container>\n <ng-container *ngIf=\"!isArray\">\n <span class=\"pr-1\">{{valueString | precision:3}}</span>\n </ng-container>\n</ng-template>\n", styles: [":host{display:block}\n"], components: [{ type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["nodeType", "dataKey", "key", "node", "state"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "precision": PrecisionPipe } });
1851
1802
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LinkKeyValueComponent, decorators: [{
1852
1803
  type: i0.Component,
1853
1804
  args: [{
@@ -3959,7 +3910,7 @@
3959
3910
  }]
3960
3911
  }] });
3961
3912
 
3962
- var components$6 = [
3913
+ var components$7 = [
3963
3914
  ClipboardComponent,
3964
3915
  PopoverComponent,
3965
3916
  PopoverConfirmComponent,
@@ -4027,12 +3978,12 @@
4027
3978
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeCommonModule, decorators: [{
4028
3979
  type: i0.NgModule,
4029
3980
  args: [{
4030
- declarations: components$6,
3981
+ declarations: components$7,
4031
3982
  exports: __spreadArray([
4032
3983
  i10.NgbTypeaheadModule, i10.NgbTooltipModule, i10.NgbPopoverModule,
4033
3984
  i1$4.GoogleMapsModule,
4034
3985
  HeCommonLightModule
4035
- ], __read(components$6)),
3986
+ ], __read(components$7)),
4036
3987
  imports: [
4037
3988
  i6.CommonModule, i1$2.FormsModule, i5.RouterModule,
4038
3989
  i10.NgbTypeaheadModule, i10.NgbTooltipModule, i10.NgbPopoverModule,
@@ -4537,7 +4488,7 @@
4537
4488
  type: i0.Output
4538
4489
  }] } });
4539
4490
 
4540
- var components$5 = [
4491
+ var components$6 = [
4541
4492
  BibliographiesSearchConfirmComponent
4542
4493
  ];
4543
4494
  var HeBibliographiesModule = /** @class */ (function () {
@@ -4555,8 +4506,8 @@
4555
4506
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeBibliographiesModule, decorators: [{
4556
4507
  type: i0.NgModule,
4557
4508
  args: [{
4558
- declarations: components$5,
4559
- exports: components$5,
4509
+ declarations: components$6,
4510
+ exports: components$6,
4560
4511
  imports: [
4561
4512
  i6.CommonModule, i1$2.ReactiveFormsModule,
4562
4513
  HeCommonModule
@@ -5282,7 +5233,7 @@
5282
5233
  var propertyValues = values
5283
5234
  .map(function (_d) {
5284
5235
  var value = _d.value;
5285
- return propertyValue$1(value, termId);
5236
+ return term.propertyValue(value, termId);
5286
5237
  })
5287
5238
  // propertyValue may return null if the value is null or undefined, therefore remove them from total
5288
5239
  .filter(function (v) { return v !== null; });
@@ -5496,7 +5447,7 @@
5496
5447
  return ((_a = this.methodsById[methodId]) === null || _a === void 0 ? void 0 : _a.name) ||
5497
5448
  ((_b = logs[methodId]) === null || _b === void 0 ? void 0 : _b.key) ||
5498
5449
  ((_c = logs[methodId]) === null || _c === void 0 ? void 0 : _c.model) ||
5499
- (methodId ? keyToLabel(methodId) : '');
5450
+ (methodId ? utils.keyToLabel(methodId) : '');
5500
5451
  };
5501
5452
  NodeLogsModelsComponent.prototype.hasLog = function (_d, methodId, withOrchestrator) {
5502
5453
  var logs = _d.logs;
@@ -5612,7 +5563,7 @@
5612
5563
  'impactAssessment'
5613
5564
  ];
5614
5565
  var tableKeys = [
5615
- 'inputs', 'value', 'methodModel', 'methodTier', 'statsDefinition'
5566
+ 'inputs', 'value', 'dates', 'methodModel', 'methodTier', 'statsDefinition'
5616
5567
  ];
5617
5568
  var NodeValueDetailsComponent = /** @class */ (function () {
5618
5569
  function NodeValueDetailsComponent() {
@@ -5652,7 +5603,7 @@
5652
5603
  type: i0.Input
5653
5604
  }] } });
5654
5605
 
5655
- var components$4 = [
5606
+ var components$5 = [
5656
5607
  NodeIconComponent,
5657
5608
  NodeLinkComponent,
5658
5609
  NodeCsvExportConfirmComponent,
@@ -5696,8 +5647,8 @@
5696
5647
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeNodeModule, decorators: [{
5697
5648
  type: i0.NgModule,
5698
5649
  args: [{
5699
- declarations: components$4,
5700
- exports: components$4,
5650
+ declarations: components$5,
5651
+ exports: components$5,
5701
5652
  imports: [
5702
5653
  i6.CommonModule, i5.RouterModule, i1$2.FormsModule,
5703
5654
  i6$1.DragDropModule,
@@ -5792,7 +5743,7 @@
5792
5743
  this.selected = [];
5793
5744
  this.enableCompare = true;
5794
5745
  this.baseUrl = baseUrl();
5795
- this.propertyValue = propertyValue$1;
5746
+ this.propertyValue = term.propertyValue;
5796
5747
  this.defaultLabel = defaultLabel;
5797
5748
  this.showDownload = false;
5798
5749
  this.View = View$4;
@@ -5862,7 +5813,7 @@
5862
5813
  this.selected = [];
5863
5814
  this.baseUrl = baseUrl();
5864
5815
  this.defaultLabel = defaultLabel;
5865
- this.keyToLabel = keyToLabel;
5816
+ this.keyToLabel = utils.keyToLabel;
5866
5817
  }
5867
5818
  CyclesCompletenessComponent.prototype.trackById = function (_index, item) {
5868
5819
  return item['@id'];
@@ -5903,7 +5854,7 @@
5903
5854
  var cycleDataset = function (values, termId, cycle, index) {
5904
5855
  var label = cycleName(cycle, index);
5905
5856
  var color = itemColor(index);
5906
- var data = [propertyValue$1(cycleValue(cycle, values), termId)];
5857
+ var data = [term.propertyValue(cycleValue(cycle, values), termId)];
5907
5858
  return {
5908
5859
  label: label,
5909
5860
  axis: 'y',
@@ -5939,7 +5890,7 @@
5939
5890
  var values = _d.values;
5940
5891
  return Object.values(values).some(function (_d) {
5941
5892
  var _e = __read(_d.nodes, 1), value = _e[0].value;
5942
- return propertyValue$1(value) >= 0;
5893
+ return term.propertyValue(value) >= 0;
5943
5894
  });
5944
5895
  })
5945
5896
  .map(function (_d) {
@@ -6088,7 +6039,7 @@
6088
6039
  this.cycles = [];
6089
6040
  this.selected = [];
6090
6041
  this.baseUrl = baseUrl();
6091
- this.propertyValue = propertyValue$1;
6042
+ this.propertyValue = term.propertyValue;
6092
6043
  this.defaultLabel = defaultLabel;
6093
6044
  this.showDownload = false;
6094
6045
  this.View = View$3;
@@ -6208,7 +6159,7 @@
6208
6159
  this.cycles = [];
6209
6160
  this.selected = [];
6210
6161
  this.baseUrl = baseUrl();
6211
- this.propertyValue = propertyValue$1;
6162
+ this.propertyValue = term.propertyValue;
6212
6163
  this.defaultLabel = defaultLabel;
6213
6164
  this.showDownload = false;
6214
6165
  this.View = View$2;
@@ -6312,7 +6263,7 @@
6312
6263
  barPercentage: 0.5,
6313
6264
  data: cycles.map(function (_b) {
6314
6265
  var id = _b["@id"];
6315
- return values[id] ? propertyValue$1(values[id].value, termId) : 0;
6266
+ return values[id] ? term.propertyValue(values[id].value, termId) : 0;
6316
6267
  })
6317
6268
  };
6318
6269
  });
@@ -6379,7 +6330,7 @@
6379
6330
  type: i0.Input
6380
6331
  }] } });
6381
6332
 
6382
- var components$3 = [
6333
+ var components$4 = [
6383
6334
  CyclesActivityComponent,
6384
6335
  CyclesActivityLogsComponent,
6385
6336
  CyclesCompletenessComponent,
@@ -6424,12 +6375,108 @@
6424
6375
  HeNodeModule
6425
6376
  ]] });
6426
6377
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeCyclesModule, decorators: [{
6378
+ type: i0.NgModule,
6379
+ args: [{
6380
+ declarations: components$4,
6381
+ exports: components$4,
6382
+ imports: [
6383
+ i6.CommonModule, i1$2.FormsModule, i1$2.ReactiveFormsModule,
6384
+ HeCommonModule,
6385
+ HeNodeModule
6386
+ ]
6387
+ }]
6388
+ }] });
6389
+
6390
+ var gitUrl = gitHome + "/hestia-engine-orchestrator/-/blob/" + gitBranch();
6391
+ var generalDocsUrl = gitUrl + "/hestia_earth/orchestrator/config/README.md";
6392
+ var strategiesDocs = gitUrl + "/hestia_earth/orchestrator/strategies";
6393
+ var EngineOrchestratorEditComponent = /** @class */ (function () {
6394
+ function EngineOrchestratorEditComponent(hestiaEngineService) {
6395
+ this.hestiaEngineService = hestiaEngineService;
6396
+ this.generalDocsUrl = generalDocsUrl;
6397
+ this.strategiesDocs = strategiesDocs;
6398
+ }
6399
+ EngineOrchestratorEditComponent.prototype.ngOnChanges = function (changes) {
6400
+ if ('nodeType' in changes) {
6401
+ return this.loadDefaultConfig();
6402
+ }
6403
+ };
6404
+ EngineOrchestratorEditComponent.prototype.loadDefaultConfig = function () {
6405
+ return __awaiter(this, void 0, void 0, function () {
6406
+ var _a;
6407
+ return __generator(this, function (_b) {
6408
+ switch (_b.label) {
6409
+ case 0:
6410
+ _a = this;
6411
+ return [4 /*yield*/, this.hestiaEngineService.ochestratorConfig(this.nodeType)];
6412
+ case 1:
6413
+ _a.config = _b.sent();
6414
+ return [2 /*return*/];
6415
+ }
6416
+ });
6417
+ });
6418
+ };
6419
+ EngineOrchestratorEditComponent.prototype.isArray = function (config) {
6420
+ return Array.isArray(config);
6421
+ };
6422
+ EngineOrchestratorEditComponent.prototype.modelLink$ = function (_a) {
6423
+ var model = _a.model, value = _a.value;
6424
+ return this.hestiaEngineService.model$({ model: model, term: value });
6425
+ };
6426
+ EngineOrchestratorEditComponent.prototype.modelPathLink$ = function (_a) {
6427
+ var model = _a.model, value = _a.value;
6428
+ return this.hestiaEngineService.model$({
6429
+ path: engineGitUrl() + "/hestia_earth/models/" + model + "/" + (value || '').replace('.', '/') + ".py"
6430
+ });
6431
+ };
6432
+ Object.defineProperty(EngineOrchestratorEditComponent.prototype, "configUrl", {
6433
+ get: function () {
6434
+ return this.hestiaEngineService.orchestratorConfigUrl(this.nodeType);
6435
+ },
6436
+ enumerable: false,
6437
+ configurable: true
6438
+ });
6439
+ return EngineOrchestratorEditComponent;
6440
+ }());
6441
+ 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 });
6442
+ 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 <p *ngFor=\"let arg of args | keys\">\n <span class=\"has-text-underline\">{{arg.key}}</span>: <code>{{arg.value | json}}</code>\n </p>\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 } });
6443
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EngineOrchestratorEditComponent, decorators: [{
6444
+ type: i0.Component,
6445
+ args: [{
6446
+ selector: 'he-engine-orchestrator-edit',
6447
+ templateUrl: './engine-orchestrator-edit.component.html',
6448
+ styleUrls: ['./engine-orchestrator-edit.component.scss']
6449
+ }]
6450
+ }], ctorParameters: function () { return [{ type: HeEngineService }]; }, propDecorators: { config: [{
6451
+ type: i0.Input
6452
+ }], nodeType: [{
6453
+ type: i0.Input
6454
+ }] } });
6455
+
6456
+ var components$3 = [
6457
+ EngineOrchestratorEditComponent
6458
+ ];
6459
+ var HeEngineModule = /** @class */ (function () {
6460
+ function HeEngineModule() {
6461
+ }
6462
+ return HeEngineModule;
6463
+ }());
6464
+ HeEngineModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeEngineModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
6465
+ HeEngineModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeEngineModule, declarations: [EngineOrchestratorEditComponent], imports: [i6.CommonModule,
6466
+ HeCommonModule,
6467
+ HeNodeModule], exports: [EngineOrchestratorEditComponent] });
6468
+ HeEngineModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeEngineModule, imports: [[
6469
+ i6.CommonModule,
6470
+ HeCommonModule,
6471
+ HeNodeModule
6472
+ ]] });
6473
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeEngineModule, decorators: [{
6427
6474
  type: i0.NgModule,
6428
6475
  args: [{
6429
6476
  declarations: components$3,
6430
6477
  exports: components$3,
6431
6478
  imports: [
6432
- i6.CommonModule, i1$2.FormsModule, i1$2.ReactiveFormsModule,
6479
+ i6.CommonModule,
6433
6480
  HeCommonModule,
6434
6481
  HeNodeModule
6435
6482
  ]
@@ -6441,7 +6488,7 @@
6441
6488
  var parseDataPath = function (dataPath) {
6442
6489
  if (dataPath === void 0) { dataPath = ''; }
6443
6490
  var _f = __read(dataPath.split('.')), _ = _f[0], paths = _f.slice(1);
6444
- return paths.map(function (path) { return ({ path: path, label: keyToLabel(path.replace(/\[\d+\]/g, '')) }); });
6491
+ return paths.map(function (path) { return ({ path: path, label: utils.keyToLabel(path.replace(/\[\d+\]/g, '')) }); });
6445
6492
  };
6446
6493
  var contactUsEmail = 'community@hestia.earth';
6447
6494
  var externalLink = function (href, text) { return "<a href=\"" + href + "\" target=\"_blank\">" + text + "</a>"; };
@@ -6763,7 +6810,6 @@
6763
6810
  queries: __spreadArray(__spreadArray([], __read(compileSuggestionQueries(nonExpandableArrayDataPath(parent), allOf))), __read((['country'].includes(parent) ? [matchCountry] : [])))
6764
6811
  });
6765
6812
  };
6766
- var formatLinkNodesSuggestions = function (nodeMap, type) { return (nodeMap[type] || []).map(function (id) { return ({ type: type, id: id, name: "Link with " + type + ": " + id }); }); };
6767
6813
  var typeToSuggestion = (_d = {},
6768
6814
  _d[schema.NodeType.Actor] = defaultNodeTypeSuggestion(schema.NodeType.Actor),
6769
6815
  _d[schema.NodeType.Cycle] = defaultNodeTypeSuggestion(schema.NodeType.Cycle),
@@ -6826,11 +6872,6 @@
6826
6872
  typeToSuggestion[schema.type](fullKey, parentSchema, schema) :
6827
6873
  undefined);
6828
6874
  };
6829
- var formatProperty = function (prop) { return (Object.assign(Object.assign({ '@type': schema.SchemaType.Property }, prop), { term: Object.assign({ '@type': schema.NodeType.Term }, prop.term) })); };
6830
- var formatSuggestion = function (_c) {
6831
- var defaultProperties = _c.defaultProperties, node = __rest(_c, ["defaultProperties"]);
6832
- return (Object.assign(Object.assign({}, node), (defaultProperties ? { defaultProperties: defaultProperties.map(formatProperty) } : {})));
6833
- };
6834
6875
  var nodeAvailableProperties = function (node, _d) {
6835
6876
  var fullKey = _d.fullKey, schema = _d.schema, schemaType = _d.schemaType;
6836
6877
  return availableProperties(schema, schemaType, fullKey ? get$2(node, fullKey, {}) : node, fullKey.length > 0);
@@ -7580,7 +7621,7 @@
7580
7621
  var value = _a.value, depthLower = _a.depthLower, depthUpper = _a.depthUpper;
7581
7622
  return hasMultipleValues(value) && hasMultipleValues(depthLower) && hasMultipleValues(depthUpper) ?
7582
7623
  weighedAverage({ value: value, depthLower: depthLower, depthUpper: depthUpper }) :
7583
- propertyValue$1(value, termId);
7624
+ term.propertyValue(value, termId);
7584
7625
  };
7585
7626
 
7586
7627
  var SitesMeasurementsLogsComponent = /** @class */ (function () {
@@ -7787,11 +7828,19 @@
7787
7828
  }] });
7788
7829
 
7789
7830
  var get = require('lodash.get');
7790
- var MIN_TYPEAHEAD_LENGTH$1 = 2;
7831
+ var MIN_TYPEAHEAD_LENGTH = 2;
7791
7832
  var populateTermFields = [
7792
- 'termType', 'units',
7833
+ 'termType', 'units'
7834
+ ];
7835
+ var populateTermDefaultProperties = [
7793
7836
  'defaultProperties.term.name', 'defaultProperties.term.units', 'defaultProperties.value'
7794
7837
  ];
7838
+ var formatProperty = function (prop) { return (Object.assign(Object.assign({ '@type': schema.SchemaType.Property }, prop), { term: Object.assign({ '@type': schema.NodeType.Term }, prop.term) })); };
7839
+ var formatSuggestion = function (_a) {
7840
+ var defaultProperties = _a.defaultProperties, node = __rest(_a, ["defaultProperties"]);
7841
+ return (Object.assign(Object.assign({}, node), ((defaultProperties === null || defaultProperties === void 0 ? void 0 : defaultProperties.length) ? { defaultProperties: defaultProperties.map(formatProperty) } : {})));
7842
+ };
7843
+ var formatLinkNodesSuggestions = function (nodeMap, type) { return (nodeMap[type] || []).map(function (id) { return ({ type: type, id: id, name: "Link with " + type + ": " + id }); }); };
7795
7844
  var FilesFormComponent = /** @class */ (function () {
7796
7845
  function FilesFormComponent(ref, searchService, usersService) {
7797
7846
  var _c;
@@ -7801,10 +7850,21 @@
7801
7850
  this.usersService = usersService;
7802
7851
  this.errors = [];
7803
7852
  this.nodeMap = {};
7853
+ /**
7854
+ * Allow editing nodes (`false` for readonly).
7855
+ */
7804
7856
  this.editable = false;
7805
7857
  this.errorMode = false;
7806
7858
  this.deepEditable = true;
7859
+ /**
7860
+ * Can edit errors.
7861
+ */
7807
7862
  this.errorsEditable = false;
7863
+ /**
7864
+ * When selecting terms, will show default properties or not.
7865
+ * Should be `false` when using schema validation, as only the `name` would be added.
7866
+ */
7867
+ this.showSuggestedDefaultProperties = true;
7808
7868
  this.nodeChange = new i0.EventEmitter();
7809
7869
  this.nodeErorrResolved = new i0.EventEmitter();
7810
7870
  this.nodeErrorAdded = new i0.EventEmitter();
@@ -7819,7 +7879,7 @@
7819
7879
  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)); })); }; };
7820
7880
  this.suggestExistingNode = function (type, term, uniqueKey) {
7821
7881
  if (uniqueKey === void 0) { uniqueKey = '@id'; }
7822
- return term.length < MIN_TYPEAHEAD_LENGTH$1 ?
7882
+ return term.length < MIN_TYPEAHEAD_LENGTH ?
7823
7883
  rxjs.of([]) :
7824
7884
  _this.searchService.suggest(term, type, [], {
7825
7885
  bool: {
@@ -7831,7 +7891,7 @@
7831
7891
  ],
7832
7892
  minimum_should_match: 1
7833
7893
  }
7834
- }, 5, populateTermFields);
7894
+ }, 5, _this.suggestTermFields);
7835
7895
  };
7836
7896
  this.suggestNode = function (type, suggestDefault) { return function (term, property) {
7837
7897
  var _a, _b;
@@ -7854,15 +7914,15 @@
7854
7914
  _c[schema.NodeType.Site] = this.suggestNode(schema.NodeType.Site),
7855
7915
  _c[schema.NodeType.Source] = this.suggestNode(schema.NodeType.Source, function (term, _c) {
7856
7916
  var key = _c.key;
7857
- return term.length < MIN_TYPEAHEAD_LENGTH$1 ?
7917
+ return term.length < MIN_TYPEAHEAD_LENGTH ?
7858
7918
  rxjs.of([]) :
7859
7919
  _this.searchService.suggestSource(term, 5, ["bibliography." + key], ["bibliography." + key]);
7860
7920
  }),
7861
7921
  _c[schema.NodeType.Term] = this.suggestNode(schema.NodeType.Term, function (term, _c) {
7862
7922
  var suggestions = _c.suggestions;
7863
- return term.length < MIN_TYPEAHEAD_LENGTH$1 ?
7923
+ return term.length < MIN_TYPEAHEAD_LENGTH ?
7864
7924
  rxjs.of([]) :
7865
- _this.searchService.suggest(term, schema.NodeType.Term, (suggestions === null || suggestions === void 0 ? void 0 : suggestions.queries) || [], null, 5, populateTermFields);
7925
+ _this.searchService.suggest(term, schema.NodeType.Term, (suggestions === null || suggestions === void 0 ? void 0 : suggestions.queries) || [], null, 5, _this.suggestTermFields);
7866
7926
  }),
7867
7927
  _c);
7868
7928
  this.propertySuggest = function (fullKey, suggestType) { return function (text$) { return text$.pipe(operators.debounceTime(suggestType === defaultSuggestionType ? 0 : 300), operators.distinctUntilChanged(), operators.mergeMap(function (term) {
@@ -7918,6 +7978,13 @@
7918
7978
  var value = _c.value, isRequired = _c.isRequired;
7919
7979
  return isRequired && utils.isEmpty(value);
7920
7980
  };
7981
+ Object.defineProperty(FilesFormComponent.prototype, "suggestTermFields", {
7982
+ get: function () {
7983
+ return __spreadArray(__spreadArray([], __read(populateTermFields)), __read((this.showSuggestedDefaultProperties ? populateTermDefaultProperties : [])));
7984
+ },
7985
+ enumerable: false,
7986
+ configurable: true
7987
+ });
7921
7988
  // --- Errors
7922
7989
  FilesFormComponent.prototype.enableAddError = function (property) {
7923
7990
  return this.errorsEditable && !property.hasError && !property.hasWarning;
@@ -8200,7 +8267,7 @@
8200
8267
  return FilesFormComponent;
8201
8268
  }());
8202
8269
  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 });
8203
- 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 } });
8270
+ 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 } });
8204
8271
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FilesFormComponent, decorators: [{
8205
8272
  type: i0.Component,
8206
8273
  args: [{
@@ -8224,6 +8291,8 @@
8224
8291
  type: i0.Input
8225
8292
  }], errorsEditable: [{
8226
8293
  type: i0.Input
8294
+ }], showSuggestedDefaultProperties: [{
8295
+ type: i0.Input
8227
8296
  }], nodeChange: [{
8228
8297
  type: i0.Output
8229
8298
  }], nodeErorrResolved: [{
@@ -8650,7 +8719,6 @@
8650
8719
  }] } });
8651
8720
 
8652
8721
  var orderBy = require('lodash.orderby');
8653
- var MIN_TYPEAHEAD_LENGTH = 1;
8654
8722
  var View;
8655
8723
  (function (View) {
8656
8724
  View["table"] = "table";
@@ -8667,7 +8735,7 @@
8667
8735
  this.key = 'impacts';
8668
8736
  this.enableFilterMethodModel = false;
8669
8737
  this.loading = false;
8670
- this.propertyValue = propertyValue$1;
8738
+ this.propertyValue = term.propertyValue;
8671
8739
  this.baseUrl = baseUrl();
8672
8740
  this.showDownload = false;
8673
8741
  this.View = View;
@@ -8932,6 +9000,7 @@
8932
9000
  exports.CyclesResultComponent = CyclesResultComponent;
8933
9001
  exports.DefaultPipe = DefaultPipe;
8934
9002
  exports.EllipsisPipe = EllipsisPipe;
9003
+ exports.EngineOrchestratorEditComponent = EngineOrchestratorEditComponent;
8935
9004
  exports.FilesFormComponent = FilesFormComponent;
8936
9005
  exports.GetPipe = GetPipe;
8937
9006
  exports.HE_API_BASE_URL = HE_API_BASE_URL;
@@ -8943,6 +9012,7 @@
8943
9012
  exports.HeCommonModule = HeCommonModule;
8944
9013
  exports.HeCommonService = HeCommonService;
8945
9014
  exports.HeCyclesModule = HeCyclesModule;
9015
+ exports.HeEngineModule = HeEngineModule;
8946
9016
  exports.HeEngineService = HeEngineService;
8947
9017
  exports.HeFilesModule = HeFilesModule;
8948
9018
  exports.HeFontawesomeModule = HeFontawesomeModule;
@@ -9001,23 +9071,20 @@
9001
9071
  exports.calculateCycleDurationEnabled = calculateCycleDurationEnabled;
9002
9072
  exports.calculateCycleStartDate = calculateCycleStartDate;
9003
9073
  exports.calculateCycleStartDateEnabled = calculateCycleStartDateEnabled;
9004
- exports.calculatePercentDelta = calculatePercentDelta;
9005
9074
  exports.clustererImage = clustererImage;
9006
9075
  exports.code = code;
9007
9076
  exports.coordinatesToPoint = coordinatesToPoint;
9008
9077
  exports.countriesQuery = countriesQuery;
9009
9078
  exports.createMarker = createMarker;
9010
9079
  exports.cropsQuery = cropsQuery;
9011
- exports.customDeltaFuncs = customDeltaFuncs;
9012
9080
  exports.dataPathToKey = dataPathToKey;
9013
9081
  exports.defaultFeature = defaultFeature;
9014
9082
  exports.defaultLabel = defaultLabel;
9015
9083
  exports.defaultSuggestionType = defaultSuggestionType;
9016
9084
  exports.definitionToSchemaType = definitionToSchemaType;
9017
- exports.delta = delta;
9018
9085
  exports.deserializeSearchFilters = deserializeSearchFilters;
9019
9086
  exports.ellipsis = ellipsis;
9020
- exports.emptyValue = emptyValue;
9087
+ exports.engineGitUrl = engineGitUrl;
9021
9088
  exports.errorHasError = errorHasError;
9022
9089
  exports.errorHasWarning = errorHasWarning;
9023
9090
  exports.errorText = errorText;
@@ -9032,9 +9099,7 @@
9032
9099
  exports.findPropertyById = findPropertyById;
9033
9100
  exports.formatCustomErrorMessage = formatCustomErrorMessage;
9034
9101
  exports.formatError = formatError;
9035
- exports.formatLinkNodesSuggestions = formatLinkNodesSuggestions;
9036
9102
  exports.formatPropertyError = formatPropertyError;
9037
- exports.formatSuggestion = formatSuggestion;
9038
9103
  exports.gitBranch = gitBranch;
9039
9104
  exports.gitHome = gitHome;
9040
9105
  exports.gitRawBaseUrl = gitRawBaseUrl;
@@ -9054,7 +9119,6 @@
9054
9119
  exports.isScrolledBelow = isScrolledBelow;
9055
9120
  exports.itemColor = itemColor;
9056
9121
  exports.keyToDataPath = keyToDataPath;
9057
- exports.keyToLabel = keyToLabel;
9058
9122
  exports.levels = levels;
9059
9123
  exports.linkTypeEnabled = linkTypeEnabled;
9060
9124
  exports.listColor = listColor;
@@ -9106,13 +9170,11 @@
9106
9170
  exports.primaryProduct = primaryProduct;
9107
9171
  exports.propertyError = propertyError;
9108
9172
  exports.propertyId = propertyId;
9109
- exports.propertyValue = propertyValue$1;
9110
9173
  exports.recursiveProperties = recursiveProperties;
9111
9174
  exports.refToSchemaType = refToSchemaType;
9112
9175
  exports.refreshPropertyKeys = refreshPropertyKeys;
9113
9176
  exports.regionsQuery = regionsQuery;
9114
9177
  exports.repeat = repeat;
9115
- exports.roundValue = roundValue;
9116
9178
  exports.safeJSONParse = safeJSONParse;
9117
9179
  exports.safeJSONStringify = safeJSONStringify;
9118
9180
  exports.schemaRequiredProperties = schemaRequiredProperties;
@@ -9140,7 +9202,6 @@
9140
9202
  exports.termTypeLabel = termTypeLabel;
9141
9203
  exports.termTypeLookupUrl = termTypeLookupUrl;
9142
9204
  exports.toCsv = toCsv$1;
9143
- exports.toDashCase = toDashCase;
9144
9205
  exports.typeToNewProperty = typeToNewProperty;
9145
9206
  exports.updateProperties = updateProperties;
9146
9207
  exports.valueTypeToDefault = valueTypeToDefault;