@hestia-earth/ui-components 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1252,9 +1252,9 @@
1252
1252
  params: filterParams({ dataState: dataState })
1253
1253
  }).toPromise().catch(handleAPIError);
1254
1254
  };
1255
- HeNodeService.prototype.getModelsLog = function (_a) {
1255
+ HeNodeService.prototype.getErrorLog = function (_a) {
1256
1256
  var dataState = _a.dataState, node = __rest(_a, ["dataState"]);
1257
- return this.http.get(this.nodeUrl(node) + "/log/models", {
1257
+ return this.http.get(this.nodeUrl(node) + "/log/error", {
1258
1258
  headers: this.authService.headers,
1259
1259
  params: filterParams({ dataState: dataState })
1260
1260
  }).toPromise().catch(handleAPIError);
@@ -1939,6 +1939,13 @@
1939
1939
  this.baseUrl = baseUrl();
1940
1940
  this.toString = toString;
1941
1941
  }
1942
+ Object.defineProperty(LinkKeyValueComponent.prototype, "isInlineBlock", {
1943
+ get: function () {
1944
+ return this.isArray;
1945
+ },
1946
+ enumerable: false,
1947
+ configurable: true
1948
+ });
1942
1949
  Object.defineProperty(LinkKeyValueComponent.prototype, "type", {
1943
1950
  get: function () {
1944
1951
  return this.node['@type'] || this.node.type;
@@ -1984,7 +1991,7 @@
1984
1991
  return LinkKeyValueComponent;
1985
1992
  }());
1986
1993
  LinkKeyValueComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LinkKeyValueComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1987
- 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\n <ng-container *ngIf=\"isArray; else singleValue\">\n <div class=\"array-container pl-2\">\n <p *ngFor=\"let v of value\" [innerHtml]=\"toString(v) | precision:3\"></p>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #singleValue>\n <div class=\"is-inline-block pr-1\" [innerHtml]=\"valueString | precision:3\"></div>\n\n <he-blank-node-state\n [node]=\"node\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"\n ></he-blank-node-state>\n</ng-template>\n", styles: [":host{display:block}.array-container{max-height:100px;overflow-y:auto}\n"], components: [{ type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["nodeType", "dataKey", "key", "node", "state"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "precision": PrecisionPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1994
+ 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" }, host: { properties: { "class.is-inline-block": "this.isInlineBlock" } }, 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\n <ng-container *ngIf=\"isArray; else singleValue\">\n <div class=\"array-container pl-2\">\n <p *ngFor=\"let v of value\" [innerHtml]=\"toString(v) | precision:3\"></p>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #singleValue>\n <div class=\"is-inline-block pr-1\" [innerHtml]=\"valueString | precision:3\"></div>\n\n <he-blank-node-state\n [node]=\"node\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"\n ></he-blank-node-state>\n</ng-template>\n", styles: [":host{display:block}.array-container{max-height:100px;overflow-y:auto}\n"], components: [{ type: BlankNodeStateComponent, selector: "he-blank-node-state", inputs: ["nodeType", "dataKey", "key", "node", "state"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "precision": PrecisionPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1988
1995
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LinkKeyValueComponent, decorators: [{
1989
1996
  type: i0.Component,
1990
1997
  args: [{
@@ -2001,6 +2008,9 @@
2001
2008
  type: i0.Input
2002
2009
  }], key: [{
2003
2010
  type: i0.Input
2011
+ }], isInlineBlock: [{
2012
+ type: i0.HostBinding,
2013
+ args: ['class.is-inline-block']
2004
2014
  }] } });
2005
2015
 
2006
2016
  var locationQuery = function (bounds, searchField) {
@@ -5370,6 +5380,9 @@
5370
5380
  type: i0.Input
5371
5381
  }] } });
5372
5382
 
5383
+ var skipState = [
5384
+ schema.NodeType.Term
5385
+ ];
5373
5386
  var NodeLinkComponent = /** @class */ (function () {
5374
5387
  function NodeLinkComponent() {
5375
5388
  this.showExternalLink = false;
@@ -5388,7 +5401,7 @@
5388
5401
  this.node['@type'].toLowerCase(),
5389
5402
  this.id
5390
5403
  ].filter(Boolean).join('/');
5391
- return url + "?dataState=" + api.DataState.recalculated;
5404
+ return "" + url + (skipState.includes(this.node['@type']) ? '' : "?dataState=" + api.DataState.recalculated);
5392
5405
  },
5393
5406
  enumerable: false,
5394
5407
  configurable: true
@@ -5508,12 +5521,12 @@
5508
5521
  var blankNodeTypesLowerCase = blankNodeTypes.map(function (v) { return v.toLowerCase(); });
5509
5522
  var missingLookupPrefix = 'Missing lookup';
5510
5523
  var parseFilename = function (filepath) {
5511
- var _c = __read(filepath.split('.'), 1), filename = _c[0];
5524
+ var _b = __read(filepath.split('.'), 1), filename = _b[0];
5512
5525
  var ext = termTypes.includes(filename) ? api.SupportedExtensions.xlsx : api.SupportedExtensions.csv;
5513
5526
  return api.fileToExt(filename, ext);
5514
5527
  };
5515
- var parseLookup = function (_c) {
5516
- var column = _c.column, termid = _c.termid, _d = missingLookupPrefix, missingLookup = _c[_d];
5528
+ var parseLookup = function (_b) {
5529
+ var column = _b.column, termid = _b.termid, _c = missingLookupPrefix, missingLookup = _b[_c];
5517
5530
  return ({
5518
5531
  filename: parseFilename(missingLookup), termId: termid,
5519
5532
  column: column
@@ -5524,10 +5537,10 @@
5524
5537
  try {
5525
5538
  var data = JSON.parse(message);
5526
5539
  return data.message.split(',').reduce(function (prev, parts) {
5527
- var _c;
5528
- var _d = __read(parts.split('='), 2), key = _d[0], value = _d[1];
5540
+ var _b;
5541
+ var _c = __read(parts.split('='), 2), key = _c[0], value = _c[1];
5529
5542
  var val = csvValue(value);
5530
- return Object.assign(Object.assign({}, prev), (key && val ? (_c = {}, _c[key.trim()] = val, _c) : {}));
5543
+ return Object.assign(Object.assign({}, prev), (key && val ? (_b = {}, _b[key.trim()] = val, _b) : {}));
5531
5544
  }, { logger: data.logger });
5532
5545
  }
5533
5546
  catch (err) {
@@ -5535,29 +5548,31 @@
5535
5548
  return {};
5536
5549
  }
5537
5550
  };
5538
- var omitLogKeys = function (log) { return Object.fromEntries(Object.entries(log).filter(function (_c) {
5539
- var _d = __read(_c, 1), key = _d[0];
5551
+ var omitLogKeys = function (log) { return Object.fromEntries(Object.entries(log).filter(function (_b) {
5552
+ var _c = __read(_b, 1), key = _c[0];
5540
5553
  return !schemaTypesLowerCase.includes(key);
5541
5554
  })); };
5542
5555
  var includeBlankNodes = function (logs, log) { return Object
5543
5556
  .keys(log)
5544
5557
  .filter(function (key) { return blankNodeTypesLowerCase.includes(key); })
5545
5558
  .reduce(function (prev, key) {
5546
- var _c;
5547
- return (Object.assign(Object.assign({}, prev), (_c = {}, _c[key] = utils.unique(__spreadArray(__spreadArray([], __read(((typeof prev[key] === 'string' ? [prev[key]] : prev[key]) || []))), [
5559
+ var _b;
5560
+ return (Object.assign(Object.assign({}, prev), (_b = {}, _b[key] = utils.unique(__spreadArray(__spreadArray([], __read(((typeof prev[key] === 'string' ? [prev[key]] : prev[key]) || []))), [
5548
5561
  log[key]
5549
- ])), _c)));
5562
+ ])), _b)));
5550
5563
  }, logs); };
5551
5564
  var groupLog = function (group, _a) {
5552
5565
  var logger = _a.logger, term = _a.term, model = _a.model, key = _a.key, should_run = _a.should_run, run_required = _a.run_required, property = _a.property, log = __rest(_a, ["logger", "term", "model", "key", "should_run", "run_required", "property"]);
5553
5566
  var isOrchestrator = logger.includes('orchestrator');
5554
5567
  var isKey = !isOrchestrator && !!key;
5568
+ var isProperty = !isOrchestrator && !!property;
5555
5569
  var parentLogKey = ["[\"" + term + "\"]", !isOrchestrator && key || property].filter(Boolean).join('.');
5556
5570
  var logModelKey = [parentLogKey, model].filter(Boolean).join('.');
5557
5571
  set$1(group, parentLogKey + ".models", utils.unique(__spreadArray(__spreadArray([], __read(get$3(group, parentLogKey + ".models", []))), [
5558
5572
  model
5559
5573
  ])));
5560
5574
  set$1(group, parentLogKey + ".isKey", isKey);
5575
+ set$1(group, parentLogKey + ".isProperty", isProperty);
5561
5576
  var data = get$3(group, logModelKey, {});
5562
5577
  data = includeBlankNodes(data, log);
5563
5578
  if (typeof should_run !== 'undefined') {
@@ -5591,8 +5606,8 @@
5591
5606
  group[id] = data;
5592
5607
  if (key === 'transformation') {
5593
5608
  // add value to the same term/model on parent group
5594
- Object.entries(group[id]).map(function (_c) {
5595
- var _d = __read(_c, 2), term = _d[0], models = _d[1];
5609
+ Object.entries(group[id]).map(function (_b) {
5610
+ var _c = __read(_b, 2), term = _c[0], models = _c[1];
5596
5611
  return Object.keys(models).map(function (model) {
5597
5612
  var _a;
5598
5613
  if ((_a = group === null || group === void 0 ? void 0 : group[term]) === null || _a === void 0 ? void 0 : _a[model]) {
@@ -5608,7 +5623,7 @@
5608
5623
  var subValueKeys = [
5609
5624
  'transformation'
5610
5625
  ];
5611
- var groupLogsByModel = function (data) { return data.split('\n')
5626
+ var groupLogsByModel = function (data) { return data.trim().split('\n')
5612
5627
  .map(parseMessage)
5613
5628
  .filter(function (v) { return !!(v === null || v === void 0 ? void 0 : v.term) && (v === null || v === void 0 ? void 0 : v.term) !== 'None' && !!(v === null || v === void 0 ? void 0 : v.model); })
5614
5629
  .reduce(function (group, log) {
@@ -5619,14 +5634,14 @@
5619
5634
  groupLogSubValue(group, log, subValue) :
5620
5635
  groupLog(groupLogSubValue(group, log, subValue), log)
5621
5636
  : groupLog(group, log);
5622
- }); };
5637
+ }, {}); };
5623
5638
  var computeTerms = function (originalValues, recalculatedValues, terms, filterTermTypes) { return rxjs.from((terms === null || terms === void 0 ? void 0 : terms.length) ?
5624
5639
  terms :
5625
- __spreadArray(__spreadArray([], __read((originalValues || []).map(function (_c) {
5626
- var term = _c.term;
5640
+ __spreadArray(__spreadArray([], __read((originalValues || []).map(function (_b) {
5641
+ var term = _b.term;
5627
5642
  return term;
5628
- }))), __read((recalculatedValues || []).map(function (_c) {
5629
- var term = _c.term;
5643
+ }))), __read((recalculatedValues || []).map(function (_b) {
5644
+ var term = _b.term;
5630
5645
  return term;
5631
5646
  }))).filter(function (node) { return !(filterTermTypes === null || filterTermTypes === void 0 ? void 0 : filterTermTypes.length) || filterTermTypes.includes(node.termType); })).pipe(operators.distinct(function (v) { return v['@id']; }), operators.toArray(), operators.map(function (v) { return orderBy$5(v, ['name'], ['asc']); })).toPromise(); };
5632
5647
  exports.LogStatus = void 0;
@@ -5666,8 +5681,8 @@
5666
5681
  : exports.LogStatus.dataProvided); };
5667
5682
  var reduceValues = function (values, termId) {
5668
5683
  var propertyValues = values
5669
- .map(function (_c) {
5670
- var value = _c.value;
5684
+ .map(function (_b) {
5685
+ var value = _b.value;
5671
5686
  return term.propertyValue(value, termId);
5672
5687
  })
5673
5688
  // propertyValue may return null if the value is null or undefined, therefore remove them from total
@@ -5696,8 +5711,8 @@
5696
5711
  input: function (values, _k, id) {
5697
5712
  var _a;
5698
5713
  return !!id && (values === null || values === void 0 ? void 0 : values.length)
5699
- ? term.propertyValue((_a = values.find(function (_c) {
5700
- var inputs = _c.inputs;
5714
+ ? term.propertyValue((_a = values.find(function (_b) {
5715
+ var inputs = _b.inputs;
5701
5716
  return (inputs || []).some(function (input) { return input['@id'] === id; });
5702
5717
  })) === null || _a === void 0 ? void 0 : _a.value, id)
5703
5718
  : '';
@@ -5715,33 +5730,48 @@
5715
5730
  var logSubValue = function (logs, key, prop) { return logs[key][prop] ? (Array.isArray(logs[key][prop]) ?
5716
5731
  logs[key][prop].map(function (id) { return ({ key: prop, id: id }); }) :
5717
5732
  { key: prop, id: logs[key][prop] }) : undefined; };
5718
- var logProperties = function (nodes, models) { return nodes.flatMap(function (node) { return (node.properties || []).map(function (_c) {
5719
- var term = _c.term;
5733
+ var logProperties = function (nodes, models) { return nodes.flatMap(function (node) { return (node.properties || []).map(function (_b) {
5734
+ var term = _b.term;
5720
5735
  return term['@id'];
5721
- }); }).map(function (id) { return ({ key: 'property', id: id, configModels: findModels(models, id).map(function (_c) {
5722
- var model = _c.model;
5736
+ }); }).map(function (id) { return ({ key: 'property', id: id, configModels: findModels(models, id).map(function (_b) {
5737
+ var model = _b.model;
5723
5738
  return model;
5724
5739
  }) }); }); };
5725
- var logSubValues = function (allLogs, logs, original, recalculated, models, _c) {
5726
- var nodeType = _c.nodeType, type = _c.type, termId = _c.termId;
5727
- return utils.unique(__spreadArray(__spreadArray(__spreadArray([], __read(Object.keys(logs).flatMap(function (key) { return [
5740
+ var logSubValues = function (allLogs, logs, original, recalculated, models, _b) {
5741
+ var nodeType = _b.nodeType, type = _b.type, termId = _b.termId;
5742
+ return utils.unique(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(Object.keys(logs)
5743
+ .filter(function (id) { return logs[id].isProperty; })
5744
+ .map(function (id) { return ({
5745
+ id: id,
5746
+ key: 'property',
5747
+ configModels: (logs[id].models || []).filter(function (v) { return hasLog(logs[id][v]); })
5748
+ }); }))), __read(Object.keys(logs).flatMap(function (key) { return [
5728
5749
  logSubValue(logs, key, 'input'),
5729
5750
  logSubValue(logs, key, 'property')
5730
5751
  ]
5731
5752
  .flat()
5732
5753
  .filter(Boolean)
5733
- .map(function (v) { return (Object.assign(Object.assign({}, v), { configModels: [key] })); }); }))), __read(logProperties(original, models))), __read(logProperties(recalculated, models))))
5734
- .map(function (v) {
5735
- var originalValue = blankNodeValue(original, v.key, v.id);
5736
- var recalculatedValue = blankNodeValue(recalculated, v.key, v.id);
5737
- return Object.assign(Object.assign({}, v), { configModels: v.configModels.map(configModelWithDocs(models, { nodeType: nodeType, type: type, termId: termId }, v)), originalValue: originalValue, recalculatedValue: recalculatedValue, isRecalculated: !utils.isUndefined(recalculatedValue) && recalculatedValue !== originalValue, isRequired: true });
5754
+ .map(function (v) { return (Object.assign(Object.assign({}, v), { configModels: v.configModels || [key] })); }); }))), __read(logProperties(original, models))), __read(logProperties(recalculated, models))))
5755
+ .map(function (_b) {
5756
+ var key = _b.key, id = _b.id, configModels = _b.configModels;
5757
+ var originalValue = blankNodeValue(original, key, id);
5758
+ var recalculatedValue = blankNodeValue(recalculated, key, id);
5759
+ return {
5760
+ key: key,
5761
+ id: id,
5762
+ configModels: configModels.map(configModelWithDocs(models, { nodeType: nodeType, type: type, termId: termId }, { key: key, id: id })),
5763
+ originalValue: originalValue,
5764
+ recalculatedValue: recalculatedValue,
5765
+ isRecalculated: !utils.isUndefined(recalculatedValue) && recalculatedValue !== originalValue,
5766
+ isRequired: true
5767
+ };
5738
5768
  })
5739
5769
  .filter(function (v) { return v.configModels.length > 0; })
5740
- .map(dataWithConfigModelLogs(allLogs));
5770
+ .map(function (v) { return v.key === 'property' ? dataWithConfigModelLogs(logs)(v) : dataWithConfigModelLogs(allLogs)(v); });
5741
5771
  };
5742
5772
  // const hasKey = (blankNodes: blankNode[], key: string) => (blankNodes || []).some(n => key in n);
5743
- var logKeys = function (logs, original, recalculated, models, _c) {
5744
- var nodeType = _c.nodeType, type = _c.type, termId = _c.termId;
5773
+ var logKeys = function (logs, original, recalculated, models, _b) {
5774
+ var nodeType = _b.nodeType, type = _b.type, termId = _b.termId;
5745
5775
  return Object.keys(logs)
5746
5776
  .filter(function (key) { return logs[key].isKey; })
5747
5777
  .map(function (key) { return ({
@@ -5782,8 +5812,8 @@
5782
5812
  }).filter(Boolean);
5783
5813
  return indexes.length ? indexes[0] : '';
5784
5814
  };
5785
- var configModelWithDocs = function (models, _c, subValue) {
5786
- var nodeType = _c.nodeType, type = _c.type, termId = _c.termId;
5815
+ var configModelWithDocs = function (models, _b, subValue) {
5816
+ var nodeType = _b.nodeType, type = _b.type, termId = _b.termId;
5787
5817
  return function (methodId) {
5788
5818
  var node = {
5789
5819
  '@type': nodeType,
@@ -5820,8 +5850,8 @@
5820
5850
  order: modelConfigOrder(config.models, termId, modelKey, model.methodId)
5821
5851
  }); });
5822
5852
  return modelsWithOrder
5823
- .reduce(function (prev, _c) {
5824
- var model = _c.model, order = _c.order;
5853
+ .reduce(function (prev, _b) {
5854
+ var model = _b.model, order = _b.order;
5825
5855
  var isArray = order.includes('.');
5826
5856
  var arrayIndex = isArray ? order.split('.')[0] : prev.length;
5827
5857
  prev[arrayIndex] = isArray ? __spreadArray(__spreadArray([], __read((prev[arrayIndex] || []))), [model]) : model;
@@ -5850,8 +5880,8 @@
5850
5880
  var recalculated = recalculatedValues.filter(function (v) { return termId === v.term['@id']; });
5851
5881
  var hasData = !!original.length || !!recalculated.length || Object.keys(termLogs).length > 0;
5852
5882
  var configModelsData = { nodeType: nodeType, type: type, termId: termId };
5853
- var configModels = groupParallelModels(config, termId, nodeKey, utils.unique(__spreadArray(__spreadArray([], __read((termLogs.models || []).filter(function (key) { return isModelLog(termLogs[key]); }))), __read(findConfigModels(config, termId, nodeKey, models).map(function (_c) {
5854
- var model = _c.model;
5883
+ var configModels = groupParallelModels(config, termId, nodeKey, utils.unique(__spreadArray(__spreadArray([], __read((termLogs.models || []).filter(function (key) { return isModelLog(termLogs[key]); }))), __read(findConfigModels(config, termId, nodeKey, models).map(function (_b) {
5884
+ var model = _b.model;
5855
5885
  return model;
5856
5886
  })))).map(configModelWithDocs(models, configModelsData)));
5857
5887
  var keys = logKeys(termLogs, original, recalculated, models, configModelsData);
@@ -5889,9 +5919,7 @@
5889
5919
  0
5890
5920
  ], __read(blankNodeLogs.flatMap(function (v) { return __spreadArray(__spreadArray([
5891
5921
  v.configModels.length
5892
- ], __read(v.subValues.map(function (s) { var _a, _b; return (_b = (_a = s.configModels) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0; }))), [
5893
- v.keys.length ? 1 : 0
5894
- ]); })))); };
5922
+ ], __read((v.subValues.map(function (s) { var _a; return ((_a = s.configModels) === null || _a === void 0 ? void 0 : _a.length) || 0; })))), __read((v.keys.map(function (s) { var _a; return ((_a = s.configModels) === null || _a === void 0 ? void 0 : _a.length) || 0; })))); })))); };
5895
5923
 
5896
5924
  var _b, _c$1;
5897
5925
  var nodeTypesLowerCase = Object.values(schema.NodeType).map(function (v) { return v.toLowerCase(); });
@@ -6132,6 +6160,10 @@
6132
6160
  this.additionalKeys = additionalKeys;
6133
6161
  this.tableKeys = tableKeys;
6134
6162
  }
6163
+ NodeValueDetailsComponent.prototype.ngOnInit = function () {
6164
+ var _this = this;
6165
+ this.tableKeys = tableKeys.filter(function (key) { var _a; return (((_a = _this.data) === null || _a === void 0 ? void 0 : _a.nodes) || []).some(function (node) { return key in node; }); });
6166
+ };
6135
6167
  Object.defineProperty(NodeValueDetailsComponent.prototype, "type", {
6136
6168
  get: function () {
6137
6169
  var _a;
@@ -6140,14 +6172,18 @@
6140
6172
  enumerable: false,
6141
6173
  configurable: true
6142
6174
  });
6143
- NodeValueDetailsComponent.prototype.ngOnInit = function () {
6144
- var _this = this;
6145
- this.tableKeys = tableKeys.filter(function (key) { var _a; return (((_a = _this.data) === null || _a === void 0 ? void 0 : _a.nodes) || []).some(function (node) { return key in node; }); });
6146
- };
6175
+ Object.defineProperty(NodeValueDetailsComponent.prototype, "showInline", {
6176
+ get: function () {
6177
+ var _a, _b;
6178
+ return ((_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a.nodes) === null || _b === void 0 ? void 0 : _b.length) === 1;
6179
+ },
6180
+ enumerable: false,
6181
+ configurable: true
6182
+ });
6147
6183
  return NodeValueDetailsComponent;
6148
6184
  }());
6149
6185
  NodeValueDetailsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NodeValueDetailsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
6150
- NodeValueDetailsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: { data: "data", nodeType: "nodeType", dataKey: "dataKey" }, ngImport: i0__namespace, template: "<ng-container *bindOnce=\"data\">\n <ng-container *ngIf=\"data?.nodes?.length === 1; else showTable\">\n <ng-container *ngFor=\"let key of keys\">\n <he-link-key-value [node]=\"data!.nodes[0]\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"></he-link-key-value>\n </ng-container>\n <ng-container *ngFor=\"let key of additionalKeys\">\n <he-link-key-value [node]=\"data!.nodes[0]\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"></he-link-key-value>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #showTable>\n <he-link-key-value [node]=\"data!.nodes[0]\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" key=\"term\"></he-link-key-value>\n\n <div class=\"table-container mt-2\">\n <table class=\"table is-narrow\">\n <thead>\n <th *ngFor=\"let key of tableKeys\">\n <a [href]=\"baseUrl + '/schema/' + type + '#' + key\" target=\"_blank\"><b>{{key}}</b></a>\n </th>\n </thead>\n <tbody>\n <tr *ngFor=\"let node of data!.nodes\">\n <td *ngFor=\"let key of tableKeys\">\n <he-link-key-value [node]=\"node\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"></he-link-key-value>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</ng-template>\n", styles: ["table{background-color:transparent;color:#fff}table::ng-deep he-link-key-value>a:first-child,table::ng-deep he-link-key-value>a:first-child+span{display:none}\n"], components: [{ type: LinkKeyValueComponent, selector: "he-link-key-value", inputs: ["node", "nodeType", "dataKey", "key"] }], directives: [{ type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
6186
+ NodeValueDetailsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NodeValueDetailsComponent, selector: "he-node-value-details", inputs: { data: "data", nodeType: "nodeType", dataKey: "dataKey" }, ngImport: i0__namespace, template: "<ng-container *bindOnce=\"data\">\n <ng-container *ngIf=\"showInline; else asTable\">\n <ng-container *ngFor=\"let key of keys\">\n <he-link-key-value [node]=\"data!.nodes[0]\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"></he-link-key-value>\n </ng-container>\n <ng-container *ngFor=\"let key of additionalKeys\">\n <he-link-key-value [node]=\"data!.nodes[0]\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"></he-link-key-value>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #asTable>\n <he-link-key-value [node]=\"data!.nodes[0]\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" key=\"term\"></he-link-key-value>\n\n <div class=\"table-container mt-2\">\n <table class=\"table is-narrow\">\n <thead>\n <th *ngFor=\"let key of tableKeys\">\n <a [href]=\"baseUrl + '/schema/' + type + '#' + key\" target=\"_blank\"><b>{{key}}</b></a>\n </th>\n </thead>\n <tbody>\n <tr *ngFor=\"let node of data!.nodes\">\n <td *ngFor=\"let key of tableKeys\">\n <he-link-key-value [node]=\"node\" [nodeType]=\"nodeType\" [dataKey]=\"dataKey\" [key]=\"key\"></he-link-key-value>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</ng-template>\n", styles: ["table{background-color:transparent;color:#fff}table::ng-deep he-link-key-value>a:first-child,table::ng-deep he-link-key-value>a:first-child+span{display:none}\n"], components: [{ type: LinkKeyValueComponent, selector: "he-link-key-value", inputs: ["node", "nodeType", "dataKey", "key"] }], directives: [{ type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
6151
6187
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NodeValueDetailsComponent, decorators: [{
6152
6188
  type: i0.Component,
6153
6189
  args: [{
@@ -7275,7 +7311,10 @@
7275
7311
  var contactUsEmail = 'community@hestia.earth';
7276
7312
  var externalLink = function (href, text) { return "<a href=\"" + href + "\" target=\"_blank\">" + text + "</a>"; };
7277
7313
  var glossaryLink = function (text) { return externalLink(baseUrl() + "/glossary", text); };
7278
- var glossaryTypeLink = function (type) { return externalLink(baseUrl() + "/glossary?termType=" + type, termTypeLabel(type)); };
7314
+ var glossaryTypeLink = function (type, text) {
7315
+ if (text === void 0) { text = termTypeLabel(type); }
7316
+ return externalLink(baseUrl() + "/glossary?termType=" + type, text);
7317
+ };
7279
7318
  var termLink = function (_g) {
7280
7319
  var id = _g.id, name = _g.name;
7281
7320
  return externalLink(baseUrl() + "/term/" + id, name);
@@ -7476,6 +7515,7 @@
7476
7515
  var params = _g.params;
7477
7516
  return (errorCount === 1 ? code(params === null || params === void 0 ? void 0 : params.term.name) + " exists" : 'Some Emissions exist') + " in both the Cycle and the Transformation but " + (errorCount === 1 ? 'it is' : 'they are') + " not linked using " + code('cycle.emissions.X.transformation.term') + ". This may be an error.";
7478
7517
  },
7518
+ _g['should add an animal production system'] = function () { return "For animal production cycles, we recommend specifying the animal production " + glossaryTypeLink(schema.TermTermType.system) + " as a Practice.\n You can find a list of systems in the " + glossaryTypeLink(schema.TermTermType.system, 'Glossary') + "."; },
7479
7519
  _g);
7480
7520
  var formatCustomErrorMessage = function (message, error, errorCount) {
7481
7521
  if (errorCount === void 0) { errorCount = 1; }