@hestia-earth/ui-components 0.43.13 → 0.43.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/hestia-earth-ui-components-file-errors.mjs +39 -6
- package/fesm2022/hestia-earth-ui-components-file-errors.mjs.map +1 -1
- package/fesm2022/hestia-earth-ui-components.mjs +92 -24
- package/fesm2022/hestia-earth-ui-components.mjs.map +1 -1
- package/package.json +1 -1
- package/types/hestia-earth-ui-components.d.ts +35 -27
|
@@ -20,6 +20,7 @@ import defaultModelId from '@hestia-earth/glossary/resources/defaultModelId.json
|
|
|
20
20
|
import modelGroups from '@hestia-earth/glossary/resources/modelGroups.json';
|
|
21
21
|
import inHestiaDefaultSystemBoundary from '@hestia-earth/glossary/resources/inHestiaDefaultSystemBoundary.json';
|
|
22
22
|
import plantationIds from '@hestia-earth/glossary/resources/isPlantation.json';
|
|
23
|
+
import backgroundEmissionTermsByModel from '@hestia-earth/glossary/resources/backgroundEmissionTermsByModel.json';
|
|
23
24
|
import isEqual$1 from 'lodash.isequal';
|
|
24
25
|
import { DataState, filenameWithoutExt, nodeTypeToParam, allowedDataStates, SupportedExtensions, fileToExt, fileExt, maxFileSizeMb } from '@hestia-earth/api';
|
|
25
26
|
import { models as models$1, loadConfig, getFormulas, renderFormula, getMaxStage } from '@hestia-earth/engine-models';
|
|
@@ -229,10 +230,6 @@ const schemaLink = (type, title = type) => `<a href="${schemaBaseUrl()}/${type}"
|
|
|
229
230
|
const code = (text) => `<code>${text}</code>`;
|
|
230
231
|
const contactUsLink = (text = 'contact us') => `<a href="mailto:${contactUsEmail}">${text}</a>`;
|
|
231
232
|
const reportIssueLink = (repository, template, text = 'here') => externalLink(reportIssueUrl(repository, template), text);
|
|
232
|
-
/**
|
|
233
|
-
* Url to fetch raw content from Gitlab, bypassing CORS issues.
|
|
234
|
-
*/
|
|
235
|
-
const gitlabRawUrl = ({ repository, path, apiUrl, branch }) => `${apiUrl || baseApiUrl()}/gitlab/raw?repository=${repository}&branch=${branch || gitBranch()}&path=${encodeURIComponent(path)}`;
|
|
236
233
|
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
|
|
237
234
|
const bytesSize = (bytes) => {
|
|
238
235
|
const i = isNaN(bytes) || bytes === 0 ? 0 : Math.floor(Math.log(bytes) / Math.log(1024));
|
|
@@ -921,6 +918,23 @@ const plantations = new Set(plantationIds);
|
|
|
921
918
|
* than one planted and harvested within a Cycle.
|
|
922
919
|
*/
|
|
923
920
|
const isPlantation = (id) => plantations.has(id);
|
|
921
|
+
// the resource is keyed by model then indicator; inverted once, as the glossary getter does
|
|
922
|
+
const backgroundEmissionModels = Object.entries(backgroundEmissionTermsByModel).reduce((prev, [model, indicators]) => {
|
|
923
|
+
Object.values(indicators)
|
|
924
|
+
.flat()
|
|
925
|
+
.forEach(id => {
|
|
926
|
+
prev[id] = [...(prev[id] ?? []), model];
|
|
927
|
+
});
|
|
928
|
+
return prev;
|
|
929
|
+
}, {});
|
|
930
|
+
/**
|
|
931
|
+
* The models whose background emissions lookups carry a value for the Term.
|
|
932
|
+
*
|
|
933
|
+
* Not which model produced it - several datasets carry the same Term, so only `methodModel` on the
|
|
934
|
+
* blank node says which one ran. Models deriving their values from those datasets are absent here:
|
|
935
|
+
* `model-links.json` links those per Term.
|
|
936
|
+
*/
|
|
937
|
+
const getBackgroundEmissionModels = (id) => backgroundEmissionModels[id] ?? [];
|
|
924
938
|
|
|
925
939
|
const maxAreaSize = 5000;
|
|
926
940
|
const siteTooBig = ({ area }) => area && area / 100 > maxAreaSize;
|
|
@@ -1657,6 +1671,16 @@ const allModels = () => models$1.links.map(mapModelLink);
|
|
|
1657
1671
|
// not reach any of the model lookups below — mapping the links is otherwise eager at import time.
|
|
1658
1672
|
const models = /*#__PURE__*/ allModels();
|
|
1659
1673
|
const findModels = (termId) => models.filter(({ term }) => term === termId);
|
|
1674
|
+
/**
|
|
1675
|
+
* Every model that could have produced a value for the Term.
|
|
1676
|
+
*
|
|
1677
|
+
* A background dataset carries its Terms in the glossary lookups, which `model-links.json` stopped
|
|
1678
|
+
* enumerating per Term, so those models come from the glossary; every other model - including the
|
|
1679
|
+
* ones deriving their values from those datasets - keeps its per-Term link.
|
|
1680
|
+
*/
|
|
1681
|
+
const findTermModels = (termId) => [
|
|
1682
|
+
...new Set([...findModels(termId).map(({ model }) => model), ...getBackgroundEmissionModels(termId)])
|
|
1683
|
+
];
|
|
1660
1684
|
const findOrchestratorModel = (config, model) => Object.keys(model).length > 0
|
|
1661
1685
|
? (config?.models || []).flat().find(m => Object.entries(model).every(([key, value]) => value === m[key]))
|
|
1662
1686
|
: null;
|
|
@@ -1670,10 +1694,31 @@ const modelKeyParams = (node, key) => filterParams({
|
|
|
1670
1694
|
model: (node?.['@type'] || node?.type || '').toLowerCase(),
|
|
1671
1695
|
modelKey: key
|
|
1672
1696
|
});
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1697
|
+
// a background model documents all of its terms in one file, and `model-links.json` carries a row for it
|
|
1698
|
+
// keyed by the node type it runs on: `cycle.py` produces the Cycle emissions, `impact_assessment.py` the
|
|
1699
|
+
// ImpactAssessment resourceUse indicators.
|
|
1700
|
+
const backgroundModelKeys = {
|
|
1701
|
+
[SchemaType.Emission]: toSnakeCase(NodeType.Cycle),
|
|
1702
|
+
[SchemaType.Indicator]: toSnakeCase(NodeType.ImpactAssessment)
|
|
1703
|
+
};
|
|
1704
|
+
const backgroundModelParams = (node) => filterParams({
|
|
1705
|
+
model: 'methodModel' in node ? node?.methodModel?.['@id'] : undefined,
|
|
1706
|
+
modelKey: backgroundModelKeys[node?.['@type'] || node?.type]
|
|
1707
|
+
});
|
|
1708
|
+
const isBackgroundNode = (node) => 'methodTier' in node && node?.methodTier === EmissionMethodTier.background;
|
|
1709
|
+
/**
|
|
1710
|
+
* Find the model of a background blank node without a per-term row in `model-links.json`.
|
|
1711
|
+
*
|
|
1712
|
+
* Those rows only refresh on an `@hestia-earth/engine-models` release, so a term added to the glossary
|
|
1713
|
+
* background lookups since the last one has none - the node-type row points at the same file, and the
|
|
1714
|
+
* bare model row covers a model that only documents one of the two node types.
|
|
1715
|
+
*/
|
|
1716
|
+
const findBackgroundModel = (node) => isBackgroundNode(node)
|
|
1717
|
+
? findMatchingModel(backgroundModelParams(node)) || findMatchingModel(modelParams(node, false))
|
|
1718
|
+
: undefined;
|
|
1719
|
+
const findNodeModel = (node, key) => findMatchingModel(modelParams(node)) ||
|
|
1720
|
+
findBackgroundModel(node) ||
|
|
1721
|
+
(key ? findMatchingModel(modelKeyParams(node, key)) : undefined);
|
|
1677
1722
|
/**
|
|
1678
1723
|
* Find models from the orchestrator configuration.
|
|
1679
1724
|
*
|
|
@@ -11721,9 +11766,9 @@ class NodeValueDetailsComponent {
|
|
|
11721
11766
|
[SchemaType.Emission].includes(this.type()),
|
|
11722
11767
|
isState(this.node(), 'term', NodeKeyState.aggregated)
|
|
11723
11768
|
].every(Boolean)
|
|
11724
|
-
?
|
|
11725
|
-
name:
|
|
11726
|
-
link: valueLink({ '@type': NodeType.Term, '@id':
|
|
11769
|
+
? findTermModels(this.term()?.['@id']).map(model => ({
|
|
11770
|
+
name: model,
|
|
11771
|
+
link: valueLink({ '@type': NodeType.Term, '@id': model })
|
|
11727
11772
|
}))
|
|
11728
11773
|
: [], ...(ngDevMode ? [{ debugName: "models" }] : []));
|
|
11729
11774
|
combineLatest([this.type$, this.schemaKeys$])
|
|
@@ -11839,6 +11884,20 @@ const isMissingValue = (values, binding) => isSubstitutable(binding) && isMissin
|
|
|
11839
11884
|
* identical to the symbolic one.
|
|
11840
11885
|
*/
|
|
11841
11886
|
const hasAnySubstitution = (values, bindings) => bindings.some(binding => isSubstitutable(binding) && !isMissing(values[binding.key]));
|
|
11887
|
+
const CONTRIBUTORS = {
|
|
11888
|
+
cycle: { row: 'Cycle', group: 'Cycles', heading: 'Cycles combined' },
|
|
11889
|
+
subAggregation: { row: 'Sub-aggregation', group: 'sub-aggregations', heading: 'Sub-aggregations combined' },
|
|
11890
|
+
country: { row: 'Country aggregation', group: 'country aggregations', heading: 'Country aggregations combined' }
|
|
11891
|
+
};
|
|
11892
|
+
/**
|
|
11893
|
+
* What one contributor of an aggregation is, which is what the `$i$` of every rule stands for: a
|
|
11894
|
+
* World aggregation combines country aggregations, a country aggregation the sub-aggregations of its
|
|
11895
|
+
* sub-systems, and a sub-aggregation the Cycles uploaded for the country. The documentation has to
|
|
11896
|
+
* write both, so naming the stage is what tells a reader which of the two a rule is about.
|
|
11897
|
+
*
|
|
11898
|
+
* A World aggregation is never itself a sub-aggregation, so that stage is read first.
|
|
11899
|
+
*/
|
|
11900
|
+
const contributorNames = ({ worldAggregation, subAggregation }) => worldAggregation ? CONTRIBUTORS.country : subAggregation ? CONTRIBUTORS.cycle : CONTRIBUTORS.subAggregation;
|
|
11842
11901
|
// a symbol reading one column of a contributors table: `key` names the table, `column` the field
|
|
11843
11902
|
const isTableBinding = (binding) => !!binding.key && !!binding.column && !binding.match;
|
|
11844
11903
|
// the packed `log_as_table` string: rows split on `;`, columns on `_`, each column a `key:value`
|
|
@@ -11852,6 +11911,10 @@ const parseRows = (packed) => typeof packed !== 'string'
|
|
|
11852
11911
|
return at === -1 ? columns : { ...columns, [pair.slice(0, at)]: pair.slice(at + 1) };
|
|
11853
11912
|
}, {}));
|
|
11854
11913
|
const ID_COLUMN$1 = 'id';
|
|
11914
|
+
// A column no contributor recorded is dropped rather than shown as a column of blanks, which is
|
|
11915
|
+
// how the values of the Cycles behind a sub-aggregation are left out. Kept as documented where
|
|
11916
|
+
// there is no row to judge them by: the contributors were counted rather than listed.
|
|
11917
|
+
const recordedColumns = (columns, rows) => rows.length ? columns.filter(({ column }) => rows.some(row => !isMissing(row[column]))) : columns;
|
|
11855
11918
|
// how many leading segments every id shares, e.g. the product and country of a sub-aggregation
|
|
11856
11919
|
const commonPrefix = (ids) => {
|
|
11857
11920
|
const [first = [], ...rest] = ids;
|
|
@@ -11894,10 +11957,10 @@ const contributorsTable = (values, formulas) => {
|
|
|
11894
11957
|
.find(name => !isMissing(values[name]) || tableCount(values, name));
|
|
11895
11958
|
if (!key)
|
|
11896
11959
|
return undefined;
|
|
11897
|
-
const columns = bindings
|
|
11898
|
-
.filter(binding => binding.key === key)
|
|
11899
|
-
.map(({ symbol, description, column }) => ({ symbol, description, column: column }));
|
|
11900
11960
|
const parsed = parseRows(values[key]);
|
|
11961
|
+
const columns = recordedColumns(bindings
|
|
11962
|
+
.filter(binding => binding.key === key)
|
|
11963
|
+
.map(({ symbol, description, column }) => ({ symbol, description, column: column })), parsed);
|
|
11901
11964
|
const labels = distinguishingLabels(parsed.map(row => row[ID_COLUMN$1]));
|
|
11902
11965
|
const rows = parsed.map((row, index) => ({
|
|
11903
11966
|
id: row[ID_COLUMN$1],
|
|
@@ -11917,9 +11980,9 @@ const PRODUCT_PAGES = {
|
|
|
11917
11980
|
};
|
|
11918
11981
|
/**
|
|
11919
11982
|
* The rules are shown in the order they answer a reader's questions: how this value was calculated,
|
|
11920
|
-
* which
|
|
11983
|
+
* which Cycles went into it, then how each of those was weighted. Grouping them by what they
|
|
11921
11984
|
* compute rather than by the page they are documented on is what puts the two calculations either
|
|
11922
|
-
* side of the
|
|
11985
|
+
* side of the contributors they combine.
|
|
11923
11986
|
*/
|
|
11924
11987
|
const GROUPS = [
|
|
11925
11988
|
{ id: 'value', heading: 'How the value is calculated', pageOrder: pages => pages },
|
|
@@ -12011,10 +12074,10 @@ class NodeAggregatedFormulasComponent {
|
|
|
12011
12074
|
.filter(formula => formulaGroup(formula) === id && this.applies(formula))
|
|
12012
12075
|
})).filter(section => section.formulas.length > 0), ...(ngDevMode ? [{ debugName: "sections" }] : []));
|
|
12013
12076
|
/**
|
|
12014
|
-
*
|
|
12015
|
-
*
|
|
12016
|
-
*
|
|
12017
|
-
*
|
|
12077
|
+
* What this value was combined from, as the aggregation recorded it: one row per contributor,
|
|
12078
|
+
* under the symbols the formulas above read them with. Absent where the contributors were too
|
|
12079
|
+
* many to record, which is every aggregation built straight from source Cycles - their number
|
|
12080
|
+
* is shown instead.
|
|
12018
12081
|
*/
|
|
12019
12082
|
this.contributors = computed(() => {
|
|
12020
12083
|
const table = contributorsTable(this.values(), this.sections().flatMap(section => section.formulas));
|
|
@@ -12025,6 +12088,9 @@ class NodeAggregatedFormulasComponent {
|
|
|
12025
12088
|
rows: table.rows.map(row => ({ ...row, node: { '@type': NodeType.Cycle, '@id': row.id } }))
|
|
12026
12089
|
});
|
|
12027
12090
|
}, ...(ngDevMode ? [{ debugName: "contributors" }] : []));
|
|
12091
|
+
// what the `$i$` of every rule stands for here, which the panel names so a reader does not have to
|
|
12092
|
+
// pick between the two the documentation writes
|
|
12093
|
+
this.contributor = computed(() => contributorNames({ worldAggregation: this.worldAggregation(), subAggregation: this.subAggregation() }), ...(ngDevMode ? [{ debugName: "contributor" }] : []));
|
|
12028
12094
|
this.renderedSections = computed(() => {
|
|
12029
12095
|
const values = this.values();
|
|
12030
12096
|
const showValues = this.substituted() && this.hasSubstitutions();
|
|
@@ -12086,7 +12152,7 @@ class NodeAggregatedFormulasComponent {
|
|
|
12086
12152
|
return this.ranForAggregation(formula) && this.appliesToNodeKey(formula);
|
|
12087
12153
|
}
|
|
12088
12154
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NodeAggregatedFormulasComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12089
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: NodeAggregatedFormulasComponent, isStandalone: true, selector: "he-node-aggregated-formulas", inputs: { termType: { classPropertyName: "termType", publicName: "termType", isSignal: true, isRequired: false, transformFunction: null }, termId: { classPropertyName: "termId", publicName: "termId", isSignal: true, isRequired: false, transformFunction: null }, nodeKey: { classPropertyName: "nodeKey", publicName: "nodeKey", isSignal: true, isRequired: false, transformFunction: null }, values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: false, transformFunction: null }, worldAggregation: { classPropertyName: "worldAggregation", publicName: "worldAggregation", isSignal: true, isRequired: false, transformFunction: null }, subAggregation: { classPropertyName: "subAggregation", publicName: "subAggregation", isSignal: true, isRequired: false, transformFunction: null }, substituted: { classPropertyName: "substituted", publicName: "substituted", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { substituted: "substitutedChange" }, ngImport: i0, template: "@if (renderedSections().length) {\n <div class=\"aggregated-formulas\">\n <p class=\"is-size-7 is-mb-2 | formula-intro\">\n Aggregated values are calculated from the underlying
|
|
12155
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: NodeAggregatedFormulasComponent, isStandalone: true, selector: "he-node-aggregated-formulas", inputs: { termType: { classPropertyName: "termType", publicName: "termType", isSignal: true, isRequired: false, transformFunction: null }, termId: { classPropertyName: "termId", publicName: "termId", isSignal: true, isRequired: false, transformFunction: null }, nodeKey: { classPropertyName: "nodeKey", publicName: "nodeKey", isSignal: true, isRequired: false, transformFunction: null }, values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: false, transformFunction: null }, worldAggregation: { classPropertyName: "worldAggregation", publicName: "worldAggregation", isSignal: true, isRequired: false, transformFunction: null }, subAggregation: { classPropertyName: "subAggregation", publicName: "subAggregation", isSignal: true, isRequired: false, transformFunction: null }, substituted: { classPropertyName: "substituted", publicName: "substituted", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { substituted: "substitutedChange" }, ngImport: i0, template: "@if (renderedSections().length) {\n <div class=\"aggregated-formulas\">\n <p class=\"is-size-7 is-mb-2 | formula-intro\">\n Aggregated values are calculated from the underlying {{ contributor().group }}, not measured. These are the rules\n that produced this one, in the order they are applied.\n </p>\n\n <div class=\"is-pt-2 is-pr-1 is-overflow-y-auto | aggregated-formulas-rules\">\n @for (section of renderedSections(); track section.id; let first = $first) {\n <he-formula-block\n [formulas]=\"section.formulas\"\n [heading]=\"section.heading\"\n [collapsible]=\"true\"\n [showToggle]=\"first\"\n [hasSubstitutions]=\"hasSubstitutions()\"\n [(substituted)]=\"substituted\"\n emptyTitle=\"No recorded values to substitute\" />\n\n <!-- the contributors sit between the two calculations: what went in, above how a weight is derived -->\n @if (section.id === 'value' && contributors(); as table) {\n <he-collapsible-block [heading]=\"contributor().heading\">\n @if (table.rows.length) {\n <table class=\"table is-narrow is-size-7 w-100 | contributors-table\">\n <thead>\n <tr>\n <th>{{ contributor().row }}</th>\n @for (column of table.columns; track column.symbol) {\n <th class=\"has-text-right\">\n <span [heKatex]=\"column.symbol\" [heKatexInline]=\"true\"></span>\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of table.rows; track row.id) {\n <tr>\n <td [attr.title]=\"row.id\">\n <he-node-link [node]=\"row.node\" linkClass=\"has-text-white\">\n <span class=\"break-word\">{{ row.label }}</span>\n </he-node-link>\n </td>\n @for (value of row.values; track $index) {\n <td class=\"has-text-right is-nowrap\">{{ value | precision: 4 | default: '-' }}</td>\n }\n </tr>\n }\n </tbody>\n </table>\n } @else {\n <p class=\"is-size-7\">\n Combined from {{ table.count }} {{ contributor().group }}, too many for the aggregation to record one by\n one.\n </p>\n }\n </he-collapsible-block>\n }\n }\n </div>\n </div>\n}\n", styles: [".formula-intro{opacity:.85}.contributors-table{background-color:transparent;color:inherit}.contributors-table th,.contributors-table td{border-color:#fff3;color:inherit;padding:.15rem .5rem .15rem 0;vertical-align:top}.contributors-table th{opacity:.7}.contributors-table ::ng-deep .katex{font-size:1em}.aggregated-formulas-rules{max-height:50vh}\n"], dependencies: [{ kind: "directive", type: KatexDirective, selector: "[heKatex]", inputs: ["heKatex", "heKatexInline"] }, { kind: "component", type: NodeLinkComponent, selector: "he-node-link", inputs: ["node", "dataState", "showExternalLink", "linkClass"] }, { kind: "component", type: FormulaBlockComponent, selector: "he-formula-block", inputs: ["formulas", "hasSubstitutions", "emptyTitle", "heading", "note", "showToggle", "collapsible", "open", "substituted"], outputs: ["openChange", "substitutedChange"] }, { kind: "component", type: CollapsibleBlockComponent, selector: "he-collapsible-block", inputs: ["heading", "collapsible", "open"], outputs: ["openChange"] }, { kind: "pipe", type: DefaultPipe, name: "default" }, { kind: "pipe", type: PrecisionPipe, name: "precision" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12090
12156
|
}
|
|
12091
12157
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NodeAggregatedFormulasComponent, decorators: [{
|
|
12092
12158
|
type: Component$1,
|
|
@@ -12097,14 +12163,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
12097
12163
|
NodeLinkComponent,
|
|
12098
12164
|
FormulaBlockComponent,
|
|
12099
12165
|
CollapsibleBlockComponent
|
|
12100
|
-
], template: "@if (renderedSections().length) {\n <div class=\"aggregated-formulas\">\n <p class=\"is-size-7 is-mb-2 | formula-intro\">\n Aggregated values are calculated from the underlying
|
|
12166
|
+
], template: "@if (renderedSections().length) {\n <div class=\"aggregated-formulas\">\n <p class=\"is-size-7 is-mb-2 | formula-intro\">\n Aggregated values are calculated from the underlying {{ contributor().group }}, not measured. These are the rules\n that produced this one, in the order they are applied.\n </p>\n\n <div class=\"is-pt-2 is-pr-1 is-overflow-y-auto | aggregated-formulas-rules\">\n @for (section of renderedSections(); track section.id; let first = $first) {\n <he-formula-block\n [formulas]=\"section.formulas\"\n [heading]=\"section.heading\"\n [collapsible]=\"true\"\n [showToggle]=\"first\"\n [hasSubstitutions]=\"hasSubstitutions()\"\n [(substituted)]=\"substituted\"\n emptyTitle=\"No recorded values to substitute\" />\n\n <!-- the contributors sit between the two calculations: what went in, above how a weight is derived -->\n @if (section.id === 'value' && contributors(); as table) {\n <he-collapsible-block [heading]=\"contributor().heading\">\n @if (table.rows.length) {\n <table class=\"table is-narrow is-size-7 w-100 | contributors-table\">\n <thead>\n <tr>\n <th>{{ contributor().row }}</th>\n @for (column of table.columns; track column.symbol) {\n <th class=\"has-text-right\">\n <span [heKatex]=\"column.symbol\" [heKatexInline]=\"true\"></span>\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of table.rows; track row.id) {\n <tr>\n <td [attr.title]=\"row.id\">\n <he-node-link [node]=\"row.node\" linkClass=\"has-text-white\">\n <span class=\"break-word\">{{ row.label }}</span>\n </he-node-link>\n </td>\n @for (value of row.values; track $index) {\n <td class=\"has-text-right is-nowrap\">{{ value | precision: 4 | default: '-' }}</td>\n }\n </tr>\n }\n </tbody>\n </table>\n } @else {\n <p class=\"is-size-7\">\n Combined from {{ table.count }} {{ contributor().group }}, too many for the aggregation to record one by\n one.\n </p>\n }\n </he-collapsible-block>\n }\n }\n </div>\n </div>\n}\n", styles: [".formula-intro{opacity:.85}.contributors-table{background-color:transparent;color:inherit}.contributors-table th,.contributors-table td{border-color:#fff3;color:inherit;padding:.15rem .5rem .15rem 0;vertical-align:top}.contributors-table th{opacity:.7}.contributors-table ::ng-deep .katex{font-size:1em}.aggregated-formulas-rules{max-height:50vh}\n"] }]
|
|
12101
12167
|
}], propDecorators: { termType: [{ type: i0.Input, args: [{ isSignal: true, alias: "termType", required: false }] }], termId: [{ type: i0.Input, args: [{ isSignal: true, alias: "termId", required: false }] }], nodeKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeKey", required: false }] }], values: [{ type: i0.Input, args: [{ isSignal: true, alias: "values", required: false }] }], worldAggregation: [{ type: i0.Input, args: [{ isSignal: true, alias: "worldAggregation", required: false }] }], subAggregation: [{ type: i0.Input, args: [{ isSignal: true, alias: "subAggregation", required: false }] }], substituted: [{ type: i0.Input, args: [{ isSignal: true, alias: "substituted", required: false }] }, { type: i0.Output, args: ["substitutedChange"] }] } });
|
|
12102
12168
|
|
|
12103
12169
|
// the `.jlog` entries the aggregation records are tagged with its own model name
|
|
12104
12170
|
const JLOG_MODEL = 'aggregation';
|
|
12105
12171
|
const LOGS_KEY = 'logs';
|
|
12106
12172
|
// the table of contributors an aggregated value is recorded with, one row per Cycle it was
|
|
12107
|
-
// combined from: `id:<cycle id>_value:<value>_weight:<weight
|
|
12173
|
+
// combined from: `id:<cycle id>_value:<value>_weight:<weight>;...`. The value column is only
|
|
12174
|
+
// there where the contributors are sub-aggregations - the Cycles behind one record their
|
|
12175
|
+
// weight alone, as there can be tens of thousands of them.
|
|
12108
12176
|
const WEIGHTS_KEY = 'weights';
|
|
12109
12177
|
const ID_COLUMN = 'id:';
|
|
12110
12178
|
/**
|
|
@@ -17819,5 +17887,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
17819
17887
|
* Generated bundle index. Do not edit.
|
|
17820
17888
|
*/
|
|
17821
17889
|
|
|
17822
|
-
export { ARRAY_DELIMITER, ApplyPurePipe, BarChartComponent, BibliographiesSearchConfirmComponent, BlankNodeStateComponent, BlankNodeStateNoticeComponent, BlankNodeValueDeltaComponent, CapitalizePipe, ChartComponent, ChartConfigurationDirective, ChartExportButtonComponent, ChartTooltipComponent, ClickOutsideDirective, ClipboardComponent, CollapsibleBlockComponent, CollapsibleBoxComponent, CollapsibleBoxStyle, ColorPalette, CompoundDirective, CompoundPipe, ContributionChartComponent, ControlValueAccessor, CycleNodesKeyGroup, CyclesCompletenessComponent, CyclesEmissionsCategoryService, CyclesEmissionsChartComponent, CyclesFunctionalUnitMeasureComponent, CyclesMetadataComponent, CyclesNodesComponent, CyclesNodesTimelineComponent, CyclesResultComponent, DataTableComponent, DefaultPipe, DeltaColour, DistributionChartComponent, DrawerContainerComponent, DurationPipe, EllipsisPipe, EngineModelsLinkComponent, EngineModelsLookupInfoComponent, EngineModelsStageComponent, EngineModelsStageDeepComponent, EngineModelsStageDeepService, EngineModelsVersionInfoComponent, EngineModelsVersionLinkComponent, EngineOrchestratorEditComponent, EngineRequirementsFormComponent, FileSizePipe, FileUploadErrorKeys, FilesDragDropDirective, FilesDropZoneComponent, FilesErrorSummaryComponent, FilesFormComponent, FilesFormEditableComponent, FilesUploadErrorsComponent, FilterAccordionComponent, FormulaBlockComponent, GUIDE_ENABLED, GetPipe, GlossaryMigrationFormat, GuideOverlayComponent, HE_API_BASE_URL, HE_CALCULATIONS_BASE_URL, HE_MAP_LOADED, HeAuthService, HeCommonService, HeEngineService, HeGlossaryService, HeMendeleyService, HeNodeCsvService, HeNodeService, HeNodeStoreService, HeSchemaService, HeSearchService, HeToastService, HorizontalBarChartComponent, HorizontalButtonsGroupComponent, ImpactAssessmentsGraphComponent, ImpactAssessmentsIndicatorBreakdownChartComponent, ImpactAssessmentsIndicatorsChartComponent, ImpactAssessmentsProductsComponent, IsArrayPipe, IsObjectPipe, IssueConfirmComponent, KeyToLabelPipe, Level, LineChartComponent, LinkKeyValueComponent, LogStatus, LongPressDirective, MAX_RESULTS, MapsDrawingComponent, MapsDrawingConfirmComponent, MaxPipe, MeanPipe, MedianPipe, MendeleySearchResult, MinPipe, MobileShellComponent, NavigationMenuComponent, NoExtPipe, NodeAggregatedComponent, NodeAggregatedFormulasComponent, NodeAggregatedInfoComponent, NodeAggregatedQualityScoreComponent, NodeAggregationLogsComponent, NodeCsvExportConfirmComponent, NodeCsvPreviewComponent, NodeCsvSelectHeadersComponent, NodeIconComponent, NodeJLogModelsComponent, NodeJsonldComponent, NodeJsonldSchemaComponent, NodeKeyState, NodeLinkComponent, NodeLogsFileComponent, NodeLogsModelsComponent, NodeLogsTimeComponent, NodeMissingLookupFactorsComponent, NodeQualityScore, NodeRecommendationsComponent, NodeSelectComponent, NodeValueDetailsComponent, PipelineStagesProgressComponent, PluralizePipe, PopoverComponent, PopoverConfirmComponent, PrecisionPipe, RelatedNodeResult, RemoveMarkdownPipe, RepeatPipe, Repository, ResizedDirective, ResizedEvent, ResponsiveService, SchemaInfoComponent, SchemaVersionLinkComponent, SearchExtendComponent, ShelfDialogComponent, ShellComponent, SiteNodesKeyGroup, SitesManagementChartComponent, SitesMapsComponent, SitesNodesComponent, SkeletonTextComponent, SocialTagsComponent, SortByPipe, SortSelectComponent, SumPipe, TagsInputDirective, Template, TermsPropertyContentComponent, TermsSubClassOfContentComponent, TermsUnitsDescriptionComponent, ThousandSuffixesPipe, ThousandsPipe, TimesPipe, ToastComponent, UncapitalizePipe, addPolygonToFeature, afterBarDrawPlugin, allCountriesQuery, allGroups, allOptions, availableProperties, axisHoverPlugin, backgroundHoverPlugin, baseApiUrl, baseUrl, bottom, buildSummary, bytesSize, calculateCycleDuration, calculateCycleDurationEnabled, calculateCycleStartDate, calculateCycleStartDateEnabled, capitalize, changelogUrl, clustererImage, code, colorToRgba, compoundToHtml, computeKeys, computeTerms, contactUsEmail, contactUsLink, convertToSvg, coordinatesToPoint, copyObject, countGroupVisibleNodes, countriesQuery, createMarker, cropsQuery, d3ellipse, d3wrap, dataPathLabel, dataPathToKey, dataVersionHeader, dataVersionHeaderKey, defaultFeature, defaultLabel, defaultSuggestionType, defaultTicksFont, definitionToSchemaType, distinctUntilChangedDeep, downloadFile, downloadPng, downloadSvg, ellipsis, engineGitBaseUrl, engineGitUrl, errorText, evaluateSuccess, exportAsSVG, exportFormats, externalLink, externalNodeLink, fillColor, fillStyle, filterBlankNode$1 as filterBlankNode, filterParams, findConfigModels, findMatchingModel, findModels, findNodeModel, findOrchestratorModel, findProperty, findPropertyById, flatFilterData, flatFilterNode, formatCustomErrorMessage, formatDate, formatError, formatPropertyError, formatter, getColor, getDatesBetween, gitBranch, gitHome,
|
|
17890
|
+
export { ARRAY_DELIMITER, ApplyPurePipe, BarChartComponent, BibliographiesSearchConfirmComponent, BlankNodeStateComponent, BlankNodeStateNoticeComponent, BlankNodeValueDeltaComponent, CapitalizePipe, ChartComponent, ChartConfigurationDirective, ChartExportButtonComponent, ChartTooltipComponent, ClickOutsideDirective, ClipboardComponent, CollapsibleBlockComponent, CollapsibleBoxComponent, CollapsibleBoxStyle, ColorPalette, CompoundDirective, CompoundPipe, ContributionChartComponent, ControlValueAccessor, CycleNodesKeyGroup, CyclesCompletenessComponent, CyclesEmissionsCategoryService, CyclesEmissionsChartComponent, CyclesFunctionalUnitMeasureComponent, CyclesMetadataComponent, CyclesNodesComponent, CyclesNodesTimelineComponent, CyclesResultComponent, DataTableComponent, DefaultPipe, DeltaColour, DistributionChartComponent, DrawerContainerComponent, DurationPipe, EllipsisPipe, EngineModelsLinkComponent, EngineModelsLookupInfoComponent, EngineModelsStageComponent, EngineModelsStageDeepComponent, EngineModelsStageDeepService, EngineModelsVersionInfoComponent, EngineModelsVersionLinkComponent, EngineOrchestratorEditComponent, EngineRequirementsFormComponent, FileSizePipe, FileUploadErrorKeys, FilesDragDropDirective, FilesDropZoneComponent, FilesErrorSummaryComponent, FilesFormComponent, FilesFormEditableComponent, FilesUploadErrorsComponent, FilterAccordionComponent, FormulaBlockComponent, GUIDE_ENABLED, GetPipe, GlossaryMigrationFormat, GuideOverlayComponent, HE_API_BASE_URL, HE_CALCULATIONS_BASE_URL, HE_MAP_LOADED, HeAuthService, HeCommonService, HeEngineService, HeGlossaryService, HeMendeleyService, HeNodeCsvService, HeNodeService, HeNodeStoreService, HeSchemaService, HeSearchService, HeToastService, HorizontalBarChartComponent, HorizontalButtonsGroupComponent, ImpactAssessmentsGraphComponent, ImpactAssessmentsIndicatorBreakdownChartComponent, ImpactAssessmentsIndicatorsChartComponent, ImpactAssessmentsProductsComponent, IsArrayPipe, IsObjectPipe, IssueConfirmComponent, KeyToLabelPipe, Level, LineChartComponent, LinkKeyValueComponent, LogStatus, LongPressDirective, MAX_RESULTS, MapsDrawingComponent, MapsDrawingConfirmComponent, MaxPipe, MeanPipe, MedianPipe, MendeleySearchResult, MinPipe, MobileShellComponent, NavigationMenuComponent, NoExtPipe, NodeAggregatedComponent, NodeAggregatedFormulasComponent, NodeAggregatedInfoComponent, NodeAggregatedQualityScoreComponent, NodeAggregationLogsComponent, NodeCsvExportConfirmComponent, NodeCsvPreviewComponent, NodeCsvSelectHeadersComponent, NodeIconComponent, NodeJLogModelsComponent, NodeJsonldComponent, NodeJsonldSchemaComponent, NodeKeyState, NodeLinkComponent, NodeLogsFileComponent, NodeLogsModelsComponent, NodeLogsTimeComponent, NodeMissingLookupFactorsComponent, NodeQualityScore, NodeRecommendationsComponent, NodeSelectComponent, NodeValueDetailsComponent, PipelineStagesProgressComponent, PluralizePipe, PopoverComponent, PopoverConfirmComponent, PrecisionPipe, RelatedNodeResult, RemoveMarkdownPipe, RepeatPipe, Repository, ResizedDirective, ResizedEvent, ResponsiveService, SchemaInfoComponent, SchemaVersionLinkComponent, SearchExtendComponent, ShelfDialogComponent, ShellComponent, SiteNodesKeyGroup, SitesManagementChartComponent, SitesMapsComponent, SitesNodesComponent, SkeletonTextComponent, SocialTagsComponent, SortByPipe, SortSelectComponent, SumPipe, TagsInputDirective, Template, TermsPropertyContentComponent, TermsSubClassOfContentComponent, TermsUnitsDescriptionComponent, ThousandSuffixesPipe, ThousandsPipe, TimesPipe, ToastComponent, UncapitalizePipe, addPolygonToFeature, afterBarDrawPlugin, allCountriesQuery, allGroups, allOptions, availableProperties, axisHoverPlugin, backgroundHoverPlugin, backgroundModelParams, baseApiUrl, baseUrl, bottom, buildSummary, bytesSize, calculateCycleDuration, calculateCycleDurationEnabled, calculateCycleStartDate, calculateCycleStartDateEnabled, capitalize, changelogUrl, clustererImage, code, colorToRgba, compoundToHtml, computeKeys, computeTerms, contactUsEmail, contactUsLink, convertToSvg, coordinatesToPoint, copyObject, countGroupVisibleNodes, countriesQuery, createMarker, cropsQuery, d3ellipse, d3wrap, dataPathLabel, dataPathToKey, dataVersionHeader, dataVersionHeaderKey, defaultFeature, defaultLabel, defaultSuggestionType, defaultTicksFont, definitionToSchemaType, distinctUntilChangedDeep, downloadFile, downloadPng, downloadSvg, ellipsis, engineGitBaseUrl, engineGitUrl, errorText, evaluateSuccess, exportAsSVG, exportFormats, externalLink, externalNodeLink, fillColor, fillStyle, filterBlankNode$1 as filterBlankNode, filterParams, findBackgroundModel, findConfigModels, findMatchingModel, findModels, findNodeModel, findOrchestratorModel, findProperty, findPropertyById, findTermModels, flatFilterData, flatFilterNode, formatCustomErrorMessage, formatDate, formatError, formatPropertyError, formatter, getColor, getDatesBetween, gitBranch, gitHome, glossaryBaseUrl, glossaryLink, groupBlankNodesByTermIdentity, groupChanged, groupDataByCategory, groupJLogByField, groupJLogByTerm, groupLogsByTerm, groupNodesByTerm, groupdLogsByKey, grouppedKeys, grouppedValueKeys, groupsLogsByFields, guideModelUrl, guideNamespace, handleAPIError, handleGuideEvent, hasError, hasValidationError, hasWarning, hexToRgba, ignoreKeys$2 as ignoreKeys, increaseScaleLimits, initialFilterState, injectResizeEvent$, inputGroupsTermTypes, isAddPropertyEnabled, isChrome, isDateBetween, isEqual, isExternal, isKeyClosedVisible, isKeyHidden, isMaxStage, isMethodModelAllowed, isNonNodeModelKey, isSchemaIri, isScrolledBelow, isState, isTermTypeAllowed, isValidKey, jLogModelCount, keyToDataPath, levels, listColor, listColorContinuous, listColorWithAlpha, loadMapApi, locationQuery, logToCsv$2 as logToCsv, logValueArray, logsKey, lollipopChartPlugin, lookupUrl, mapFilterData, mapsUrl, markerIcon, markerPie, matchAggregatedQuery, matchAggregatedValidatedQuery, matchBoolPrefixQuery, matchCountry, matchExactQuery, matchGlobalRegion, matchId, matchNameNormalized, matchNestedKey, matchPhrasePrefixQuery, matchPhraseQuery, matchPrimaryProductQuery, matchQuery, matchRegex, matchRegion, matchTermType, matchType, maxAreaSize, measurementValue, mergeDataWithHeaders, methodTierOrder, migrationErrorMessage, migrationsUrl, modelCount, modelKeyParams, modelParams, models, multiMatchQuery, nestedProperty, nestingEnabled, nestingTypeEnabled, noValue, nodeAvailableProperties, nodeById, nodeColours$1 as nodeColours, nodeDataState, nodeDataStates, nodeDataVersion, nodeId, nodeIdWithoutDataVersion, nodeIds, nodeLink, nodeLinkEnabled, nodeLinkTypeEnabled, nodeLogsUrl, nodeQualityScoreColor, nodeQualityScoreLevel, nodeQualityScoreMaxDefault, nodeQualityScoreOrder, nodeRequestId, nodeSecondaryColours, nodeToAggregationFilename, nodeType, nodeTypeDataState, nodeTypeIcon, nodeTypeIconSchema, nodeUrl, nodeUrlParams, nodeVersion, nodeVersionKey, nodesByState, nodesByType, numberGte, optionsFromGroup, parentKey, parentProperty, parseColor, parseData, parseDataPath, parseLines, parseMessage, parseNewValue, pluralize, pointToCoordinates, polygonBounds, polygonToCoordinates, polygonToMap, polygonsFromFeature, populateWithTrackIdsFilterData, postGuideEvent, primaryProduct, productsQuery, propertyError, propertyId, recursiveProperties, refToSchemaType, refreshPropertyKeys, regionsQuery, registerChart, repeat, reportIssueLink, reportIssueUrl, safeJSONParse, safeJSONStringify, schemaBaseUrl, schemaDataBaseUrl, schemaLink, schemaRequiredProperties, schemaTypeToDefaultValue, scrollToEl, scrollTop, searchFilterData, searchableTypes, siblingProperty, simplifyContributions, singleProperty, siteTooBig, siteTypeToColor, siteTypeToIcon, sortProperties, sortedDates, strokeColor, strokeStyle, subValueKeys, suggestMatchQuery, suggestQuery, sumValues, takeAfterViewInit, termLocation, termLocationName, termProperties, termTypeLabel, toSnakeCase, toTextParts, toThousands, typeToNewProperty, typeaheadFocus, uncapitalize, uniqueDatesBetween, updateProperties, valueLink, valueToString, valueTypeToDefault, valueValue, waitFor, wildcardQuery };
|
|
17823
17891
|
//# sourceMappingURL=hestia-earth-ui-components.mjs.map
|