@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.
- package/bundles/hestia-earth-ui-components.umd.js +221 -160
- package/bundles/hestia-earth-ui-components.umd.js.map +1 -1
- package/common/blank-node-value-delta/blank-node-value-delta.component.d.ts +1 -1
- package/common/delta-utils.d.ts +0 -14
- package/common/link-key-value/link-key-value.component.d.ts +2 -0
- package/common/utils.d.ts +0 -4
- package/engine/engine-orchestrator-edit/engine-orchestrator-edit.component.d.ts +19 -0
- package/engine/engine.module.d.ts +10 -0
- package/engine/engine.service.d.ts +2 -0
- package/engine/index.d.ts +2 -0
- package/esm2015/common/blank-node-value-delta/blank-node-value-delta.component.js +4 -3
- package/esm2015/common/delta-utils.js +1 -41
- package/esm2015/common/link-key-value/link-key-value.component.js +6 -2
- package/esm2015/common/utils.js +2 -23
- package/esm2015/cycles/cycles-activity/cycles-activity.component.js +3 -2
- package/esm2015/cycles/cycles-completeness/cycles-completeness.component.js +3 -2
- package/esm2015/cycles/cycles-emissions/cycles-emissions.component.js +3 -2
- package/esm2015/cycles/cycles-emissions-chart/cycles-emissions-chart.component.js +3 -2
- package/esm2015/cycles/cycles-practices/cycles-practices.component.js +3 -2
- package/esm2015/cycles/cycles-result/cycles-result.component.js +3 -2
- package/esm2015/engine/engine-orchestrator-edit/engine-orchestrator-edit.component.js +61 -0
- package/esm2015/engine/engine.module.js +33 -0
- package/esm2015/engine/engine.service.js +11 -6
- package/esm2015/engine/index.js +3 -1
- package/esm2015/files/files-error.model.js +3 -3
- package/esm2015/files/files-form/files-form.component.js +33 -6
- package/esm2015/files/files-form.model.js +1 -8
- package/esm2015/impact-assessments/impact-assessments-products/impact-assessments-products.component.js +3 -3
- package/esm2015/node/node-logs-models/node-logs-models.component.js +4 -3
- package/esm2015/node/node-value-details/node-value-details.component.js +2 -2
- package/esm2015/sites/sites.model.js +2 -2
- package/esm2015/tags-input/index.js +2 -1
- package/esm2015/terms/terms.model.js +2 -2
- package/fesm2015/hestia-earth-ui-components.js +145 -99
- package/fesm2015/hestia-earth-ui-components.js.map +1 -1
- package/files/files-form/files-form.component.d.ts +13 -1
- package/files/files-form.model.d.ts +0 -14
- package/package.json +6 -6
|
@@ -19,13 +19,14 @@ import { ReplaySubject, of, forkJoin, from, zip } from 'rxjs';
|
|
|
19
19
|
import { getColor } from 'random-material-color';
|
|
20
20
|
import { EmissionMethodTier, NodeType, isExpandable, TermTermType, nestedSearchableKeys, SchemaType, SCHEMA_VERSION, sortKeysByType, CycleFunctionalUnit, SiteSiteType, isTypeValid, isTypeNode, typeToSchemaType } from '@hestia-earth/schema';
|
|
21
21
|
import { fileToExt, nodeTypeToParam, DataState, SupportedExtensions } from '@hestia-earth/api';
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
22
|
+
import { propertyValue as propertyValue$1, emptyValue } from '@hestia-earth/utils/dist/term';
|
|
23
|
+
import { keyToLabel, isUndefined, isNumber, toPrecision, toDashCase, isBoolean, ConvertUnits, converters, convertValue, isEmpty, isEqual, unique, diffInDays } from '@hestia-earth/utils';
|
|
24
24
|
import * as pluralize from 'pluralize';
|
|
25
25
|
import { catchError, map, take, mergeMap, debounceTime, distinctUntilChanged, tap, switchMap, reduce, filter, distinct, toArray, mergeAll, groupBy } from 'rxjs/operators';
|
|
26
26
|
import { __rest, __awaiter } from 'tslib';
|
|
27
27
|
import * as csvtojson from 'csvtojson';
|
|
28
28
|
import * as i1$2 from '@angular/common/http';
|
|
29
|
+
import { DeltaDisplayType, delta, customDeltaFuncs } from '@hestia-earth/utils/dist/delta';
|
|
29
30
|
import { json2csvAsync } from 'json-2-csv';
|
|
30
31
|
import * as i6$1 from '@angular/cdk/drag-drop';
|
|
31
32
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
@@ -289,11 +290,6 @@ const safeJSONParse = (value, defaultValue) => {
|
|
|
289
290
|
};
|
|
290
291
|
const safeJSONStringify = (value) => typeof value === 'string' ? value : JSON.stringify(value);
|
|
291
292
|
const arrayValue = (values, isAverage) => (values || []).reduce((prev, curr) => prev + parseFloat(`${curr}`), 0) / (isAverage ? values.length : 1);
|
|
292
|
-
const propertyValue$1 = (value, termId) => typeof value === 'undefined' || value === null ?
|
|
293
|
-
null :
|
|
294
|
-
(Array.isArray(value) ?
|
|
295
|
-
arrayValue(value, (termId ? getArrayTreatment(termId) : null) === 'mean') :
|
|
296
|
-
parseFloat(`${value}`));
|
|
297
293
|
;
|
|
298
294
|
;
|
|
299
295
|
const grouppedKeys = (values) => Object.entries(values).map(([key, value]) => ({ key, value }));
|
|
@@ -358,20 +354,6 @@ const mapsQuery = 'https://www.google.com/maps/search/?api=1&query=';
|
|
|
358
354
|
const mapsUrl = (location) => location ? (location.lat && location.lng ?
|
|
359
355
|
`${mapsQuery}${location.lat},${location.lng}` :
|
|
360
356
|
(location.name ? `${mapsQuery}${encodeURI(location.name)}` : undefined)) : undefined;
|
|
361
|
-
const keyToLabel = (key) => `${key[0].toUpperCase()}${key.replace(/([a-z])([A-Z])/g, '$1 $2')
|
|
362
|
-
.replace(/([_])([a-zA-Z])/g, g => ` ${g[1].toUpperCase()}`)
|
|
363
|
-
.substring(1)}`;
|
|
364
|
-
const toDashCase = (value) => value ?
|
|
365
|
-
value
|
|
366
|
-
// handle dates followed by capital letter
|
|
367
|
-
.replace(/([\d]{4})([A-Z]{1})/g, g => `${g.substring(0, 4)}-${g[4].toLowerCase()}`)
|
|
368
|
-
// handle molecules
|
|
369
|
-
.replace(/([\d]{1}[A-Z]{1})/g, g => g.toLowerCase())
|
|
370
|
-
// handle all capital letters
|
|
371
|
-
.replace(/([A-Z])/g, g => `-${g[0].toLowerCase()}`)
|
|
372
|
-
// handle years
|
|
373
|
-
.replace(/([0-9]{4})/g, g => `-${g}`) :
|
|
374
|
-
null;
|
|
375
357
|
const nodeDefaultLabel = {
|
|
376
358
|
[NodeType.ImpactAssessment]: ({ name, country, endDate, product }) => name ? name.replace(`${product === null || product === void 0 ? void 0 : product.name}, `, '') : [
|
|
377
359
|
product === null || product === void 0 ? void 0 : product.name,
|
|
@@ -383,7 +365,6 @@ const nodeDefaultLabel = {
|
|
|
383
365
|
const defaultLabel = (node) => node ? (node['@type'] in nodeDefaultLabel ? nodeDefaultLabel[node['@type']](node) : node.name) || node['@id'] || node.id : '';
|
|
384
366
|
const itemColor = (index) => getColor({ text: `${index}` });
|
|
385
367
|
const listColor = (_v, index) => itemColor(index);
|
|
386
|
-
const emptyValue = (value) => isEmpty(value) || isNaN(propertyValue$1(value));
|
|
387
368
|
const repeat = (times = 0) => (Array.from(Array(times), Math.random));
|
|
388
369
|
const filenameWithoutExt = (filename = '') => {
|
|
389
370
|
const file = fileToExt(filename, '');
|
|
@@ -651,7 +632,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
651
632
|
}]
|
|
652
633
|
}] });
|
|
653
634
|
|
|
654
|
-
const components$
|
|
635
|
+
const components$8 = [
|
|
655
636
|
SocialTagsComponent,
|
|
656
637
|
ToastComponent,
|
|
657
638
|
BindOnceDirective,
|
|
@@ -690,10 +671,10 @@ HeCommonLightModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ver
|
|
|
690
671
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HeCommonLightModule, decorators: [{
|
|
691
672
|
type: NgModule,
|
|
692
673
|
args: [{
|
|
693
|
-
declarations: components$
|
|
674
|
+
declarations: components$8,
|
|
694
675
|
exports: [
|
|
695
676
|
HeFontawesomeModule,
|
|
696
|
-
...components$
|
|
677
|
+
...components$8
|
|
697
678
|
],
|
|
698
679
|
imports: [
|
|
699
680
|
CommonModule, FormsModule, RouterModule,
|
|
@@ -834,7 +815,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
834
815
|
}], ctorParameters: function () { return [{ type: i1$2.HttpClient }, { type: HeAuthService }, { type: HeCommonService }]; } });
|
|
835
816
|
|
|
836
817
|
const gitUrl$1 = () => `${gitHome}/hestia-aggregation-engine/-/blob/${gitBranch()}`;
|
|
837
|
-
const rawUrl
|
|
818
|
+
const rawUrl = () => `${gitRawBaseUrl}/hestia-aggregation-engine/-/raw/${gitBranch()}`;
|
|
838
819
|
const lookups = Object.freeze({
|
|
839
820
|
cropYield: 'region-crop-cropGroupingFaostatProduction-yield',
|
|
840
821
|
cropGroupingColumn: 'cropGroupingFaostatProduction'
|
|
@@ -858,7 +839,7 @@ class HeAggregationEngineService {
|
|
|
858
839
|
}
|
|
859
840
|
loadModels() {
|
|
860
841
|
this.modelsLoading = true;
|
|
861
|
-
return this.http.get(`${rawUrl
|
|
842
|
+
return this.http.get(`${rawUrl()}/model-links.json`).pipe(catchError(() => of({ links: [] })), map(({ links }) => {
|
|
862
843
|
this._models.next(links.map((_a) => {
|
|
863
844
|
var { path: modelPath, docPath } = _a, link = __rest(_a, ["path", "docPath"]);
|
|
864
845
|
return (Object.assign(Object.assign({}, link), { path: `${gitUrl$1()}/${modelPath}`, docPath: `${gitUrl$1()}/${docPath}` }));
|
|
@@ -914,8 +895,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
914
895
|
}], ctorParameters: function () { return [{ type: i1$2.HttpClient }, { type: HeNodeService }]; } });
|
|
915
896
|
|
|
916
897
|
const HE_ORCHESTRATOR_BASE_URL = new InjectionToken('HE_ORCHESTRATOR_BASE_URL');
|
|
917
|
-
const
|
|
918
|
-
const
|
|
898
|
+
const engineGitUrl = () => `${gitHome}/hestia-engine-models/-/blob/${gitBranch()}`;
|
|
899
|
+
const engineRawUrl = () => `${gitRawBaseUrl}/hestia-engine-models/-/raw/${gitBranch()}`;
|
|
919
900
|
const findModels = (models, termId) => models.filter(({ term }) => term === termId);
|
|
920
901
|
/**
|
|
921
902
|
* Find models from the orchestrator configuration.
|
|
@@ -956,10 +937,10 @@ class HeEngineService {
|
|
|
956
937
|
}
|
|
957
938
|
loadModels() {
|
|
958
939
|
this.modelsLoading = true;
|
|
959
|
-
return this.http.get(`${
|
|
940
|
+
return this.http.get(`${engineRawUrl()}/model-links.json`).pipe(catchError(() => of({ links: [] })), map(({ links }) => {
|
|
960
941
|
this._models.next(links.map((_a) => {
|
|
961
942
|
var { path, docPath } = _a, link = __rest(_a, ["path", "docPath"]);
|
|
962
|
-
return (Object.assign(Object.assign({}, link), { path: `${
|
|
943
|
+
return (Object.assign(Object.assign({}, link), { path: `${engineGitUrl()}/${path}`, docPath: `${engineGitUrl()}/${docPath}`, apiDocsPath: pathToApiDocsPath(link.model, link.term || link.modelKey) }));
|
|
963
944
|
}));
|
|
964
945
|
this.modelsLoading = false;
|
|
965
946
|
this.modelsLoaded = true;
|
|
@@ -978,6 +959,10 @@ class HeEngineService {
|
|
|
978
959
|
model(model) {
|
|
979
960
|
return this.model$(model).pipe(take(1)).toPromise();
|
|
980
961
|
}
|
|
962
|
+
orchestratorConfigUrl(type) {
|
|
963
|
+
const configUrl = gitHome + this._orchestratorBaseUrl.substring(this._orchestratorBaseUrl.indexOf('hestia-earth') + 'hestia-earth'.length);
|
|
964
|
+
return type ? `${configUrl}/${type}.json` : configUrl.substring(0, configUrl.indexOf('/raw'));
|
|
965
|
+
}
|
|
981
966
|
ochestratorConfig(type) {
|
|
982
967
|
return this.http.get(`${this._orchestratorBaseUrl}/${type}.json`, {
|
|
983
968
|
params: { inline: false }
|
|
@@ -1116,45 +1101,6 @@ var DeltaColour;
|
|
|
1116
1101
|
DeltaColour["Warning"] = "warning";
|
|
1117
1102
|
DeltaColour["Danger"] = "danger";
|
|
1118
1103
|
})(DeltaColour || (DeltaColour = {}));
|
|
1119
|
-
var DeltaDisplayType;
|
|
1120
|
-
(function (DeltaDisplayType) {
|
|
1121
|
-
DeltaDisplayType["absolute"] = "absolute";
|
|
1122
|
-
DeltaDisplayType["percent"] = "percent";
|
|
1123
|
-
})(DeltaDisplayType || (DeltaDisplayType = {}));
|
|
1124
|
-
const deltaPerType = {
|
|
1125
|
-
[DeltaDisplayType.absolute]: (value, original) => value - original,
|
|
1126
|
-
[DeltaDisplayType.percent]: (value, original) => ((value - original) / original) * 100
|
|
1127
|
-
};
|
|
1128
|
-
const roundValue = (value) => +`${value}`.substring(0, 10);
|
|
1129
|
-
const delta = (value, originalValue, displayType = DeltaDisplayType.percent, mapping) => {
|
|
1130
|
-
const vvalue = roundValue(propertyValue$1(value));
|
|
1131
|
-
const voriginalValue = roundValue(propertyValue$1(originalValue));
|
|
1132
|
-
const deltaFuncs = Object.assign(Object.assign({}, deltaPerType), mapping);
|
|
1133
|
-
const diff = vvalue === voriginalValue ? 0 : deltaFuncs[displayType](vvalue, voriginalValue);
|
|
1134
|
-
return Number.isFinite(diff) ? (diff === -0 ? 0 : diff) : 0;
|
|
1135
|
-
};
|
|
1136
|
-
var PercentDeltaConditions;
|
|
1137
|
-
(function (PercentDeltaConditions) {
|
|
1138
|
-
PercentDeltaConditions["recalculated0"] = "recalculated should be 0";
|
|
1139
|
-
PercentDeltaConditions["original0"] = "original is 0";
|
|
1140
|
-
})(PercentDeltaConditions || (PercentDeltaConditions = {}));
|
|
1141
|
-
const calculatePercentDeltaConditions = {
|
|
1142
|
-
[PercentDeltaConditions.recalculated0]: (original, recalculated) => original > 0 && recalculated === 0,
|
|
1143
|
-
[PercentDeltaConditions.original0]: (original, recalculated) => original === 0 && recalculated > 0
|
|
1144
|
-
};
|
|
1145
|
-
const calculatePercentDeltaResult = {
|
|
1146
|
-
[PercentDeltaConditions.recalculated0]: (original, recalculated) => (recalculated - original) / (original + 1),
|
|
1147
|
-
// Always considered an error so deliberately exceed SUCCESS_CRITERION_MAX_DELTA_PERCENT
|
|
1148
|
-
[PercentDeltaConditions.original0]: (original, recalculated) => Math.sign(recalculated - original),
|
|
1149
|
-
default: (original, recalculated) => (recalculated - original) / original
|
|
1150
|
-
};
|
|
1151
|
-
const calculatePercentDelta = (recalculated, original) => {
|
|
1152
|
-
const matchingCondition = Object.values(PercentDeltaConditions).find((value) => calculatePercentDeltaConditions[value](original, recalculated)) || 'default';
|
|
1153
|
-
return calculatePercentDeltaResult[matchingCondition](original, recalculated) * 100;
|
|
1154
|
-
};
|
|
1155
|
-
const customDeltaFuncs = {
|
|
1156
|
-
[DeltaDisplayType.percent]: calculatePercentDelta
|
|
1157
|
-
};
|
|
1158
1104
|
const evaluateSuccess = (deltaValue) => Math.abs(deltaValue) < SUCCESS_CRITERION_MAX_DELTA_PERCENT
|
|
1159
1105
|
? DeltaColour.Success
|
|
1160
1106
|
: Math.abs(deltaValue) < WARNING_CRITERION_MAX_DELTA_PERCENT
|
|
@@ -1265,6 +1211,7 @@ const toString = (value) => typeof value in stringMapper ? stringMapper[typeof v
|
|
|
1265
1211
|
class LinkKeyValueComponent {
|
|
1266
1212
|
constructor() {
|
|
1267
1213
|
this.baseUrl = baseUrl();
|
|
1214
|
+
this.toString = toString;
|
|
1268
1215
|
}
|
|
1269
1216
|
get type() {
|
|
1270
1217
|
return this.node['@type'] || this.node.type;
|
|
@@ -1280,12 +1227,15 @@ class LinkKeyValueComponent {
|
|
|
1280
1227
|
[baseUrl(), this.value['@type'].toLowerCase(), this.value['@id']].join('/') :
|
|
1281
1228
|
null;
|
|
1282
1229
|
}
|
|
1230
|
+
get isArray() {
|
|
1231
|
+
return Array.isArray(this.value) && this.value.length > 1;
|
|
1232
|
+
}
|
|
1283
1233
|
get isUndefined() {
|
|
1284
1234
|
return isUndefined(this.value);
|
|
1285
1235
|
}
|
|
1286
1236
|
}
|
|
1287
1237
|
LinkKeyValueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LinkKeyValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1288
|
-
LinkKeyValueComponent.ɵcmp = i0.ɵɵ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, 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
|
|
1238
|
+
LinkKeyValueComponent.ɵcmp = i0.ɵɵ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, 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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "precision": PrecisionPipe } });
|
|
1289
1239
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LinkKeyValueComponent, decorators: [{
|
|
1290
1240
|
type: Component$1,
|
|
1291
1241
|
args: [{
|
|
@@ -3272,7 +3222,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3272
3222
|
}]
|
|
3273
3223
|
}] });
|
|
3274
3224
|
|
|
3275
|
-
const components$
|
|
3225
|
+
const components$7 = [
|
|
3276
3226
|
ClipboardComponent,
|
|
3277
3227
|
PopoverComponent,
|
|
3278
3228
|
PopoverConfirmComponent,
|
|
@@ -3337,12 +3287,12 @@ HeCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
|
|
|
3337
3287
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HeCommonModule, decorators: [{
|
|
3338
3288
|
type: NgModule,
|
|
3339
3289
|
args: [{
|
|
3340
|
-
declarations: components$
|
|
3290
|
+
declarations: components$7,
|
|
3341
3291
|
exports: [
|
|
3342
3292
|
NgbTypeaheadModule, NgbTooltipModule, NgbPopoverModule,
|
|
3343
3293
|
GoogleMapsModule,
|
|
3344
3294
|
HeCommonLightModule,
|
|
3345
|
-
...components$
|
|
3295
|
+
...components$7
|
|
3346
3296
|
],
|
|
3347
3297
|
imports: [
|
|
3348
3298
|
CommonModule, FormsModule, RouterModule,
|
|
@@ -3765,7 +3715,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3765
3715
|
type: Output
|
|
3766
3716
|
}] } });
|
|
3767
3717
|
|
|
3768
|
-
const components$
|
|
3718
|
+
const components$6 = [
|
|
3769
3719
|
BibliographiesSearchConfirmComponent
|
|
3770
3720
|
];
|
|
3771
3721
|
class HeBibliographiesModule {
|
|
@@ -3780,8 +3730,8 @@ HeBibliographiesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
3780
3730
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HeBibliographiesModule, decorators: [{
|
|
3781
3731
|
type: NgModule,
|
|
3782
3732
|
args: [{
|
|
3783
|
-
declarations: components$
|
|
3784
|
-
exports: components$
|
|
3733
|
+
declarations: components$6,
|
|
3734
|
+
exports: components$6,
|
|
3785
3735
|
imports: [
|
|
3786
3736
|
CommonModule, ReactiveFormsModule,
|
|
3787
3737
|
HeCommonModule
|
|
@@ -4621,7 +4571,7 @@ const additionalKeys = [
|
|
|
4621
4571
|
'impactAssessment'
|
|
4622
4572
|
];
|
|
4623
4573
|
const tableKeys = [
|
|
4624
|
-
'inputs', 'value', 'methodModel', 'methodTier', 'statsDefinition'
|
|
4574
|
+
'inputs', 'value', 'dates', 'methodModel', 'methodTier', 'statsDefinition'
|
|
4625
4575
|
];
|
|
4626
4576
|
class NodeValueDetailsComponent {
|
|
4627
4577
|
constructor() {
|
|
@@ -4655,7 +4605,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4655
4605
|
type: Input
|
|
4656
4606
|
}] } });
|
|
4657
4607
|
|
|
4658
|
-
const components$
|
|
4608
|
+
const components$5 = [
|
|
4659
4609
|
NodeIconComponent,
|
|
4660
4610
|
NodeLinkComponent,
|
|
4661
4611
|
NodeCsvExportConfirmComponent,
|
|
@@ -4696,8 +4646,8 @@ HeNodeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
|
4696
4646
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HeNodeModule, decorators: [{
|
|
4697
4647
|
type: NgModule,
|
|
4698
4648
|
args: [{
|
|
4699
|
-
declarations: components$
|
|
4700
|
-
exports: components$
|
|
4649
|
+
declarations: components$5,
|
|
4650
|
+
exports: components$5,
|
|
4701
4651
|
imports: [
|
|
4702
4652
|
CommonModule, RouterModule, FormsModule,
|
|
4703
4653
|
DragDropModule,
|
|
@@ -5285,7 +5235,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
5285
5235
|
type: Input
|
|
5286
5236
|
}] } });
|
|
5287
5237
|
|
|
5288
|
-
const components$
|
|
5238
|
+
const components$4 = [
|
|
5289
5239
|
CyclesActivityComponent,
|
|
5290
5240
|
CyclesActivityLogsComponent,
|
|
5291
5241
|
CyclesCompletenessComponent,
|
|
@@ -5327,12 +5277,88 @@ HeCyclesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
|
|
|
5327
5277
|
HeNodeModule
|
|
5328
5278
|
]] });
|
|
5329
5279
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HeCyclesModule, decorators: [{
|
|
5280
|
+
type: NgModule,
|
|
5281
|
+
args: [{
|
|
5282
|
+
declarations: components$4,
|
|
5283
|
+
exports: components$4,
|
|
5284
|
+
imports: [
|
|
5285
|
+
CommonModule, FormsModule, ReactiveFormsModule,
|
|
5286
|
+
HeCommonModule,
|
|
5287
|
+
HeNodeModule
|
|
5288
|
+
]
|
|
5289
|
+
}]
|
|
5290
|
+
}] });
|
|
5291
|
+
|
|
5292
|
+
const gitUrl = `${gitHome}/hestia-engine-orchestrator/-/blob/${gitBranch()}`;
|
|
5293
|
+
const generalDocsUrl = `${gitUrl}/hestia_earth/orchestrator/config/README.md`;
|
|
5294
|
+
const strategiesDocs = `${gitUrl}/hestia_earth/orchestrator/strategies`;
|
|
5295
|
+
class EngineOrchestratorEditComponent {
|
|
5296
|
+
constructor(hestiaEngineService) {
|
|
5297
|
+
this.hestiaEngineService = hestiaEngineService;
|
|
5298
|
+
this.generalDocsUrl = generalDocsUrl;
|
|
5299
|
+
this.strategiesDocs = strategiesDocs;
|
|
5300
|
+
}
|
|
5301
|
+
ngOnChanges(changes) {
|
|
5302
|
+
if ('nodeType' in changes) {
|
|
5303
|
+
return this.loadDefaultConfig();
|
|
5304
|
+
}
|
|
5305
|
+
}
|
|
5306
|
+
loadDefaultConfig() {
|
|
5307
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5308
|
+
this.config = yield this.hestiaEngineService.ochestratorConfig(this.nodeType);
|
|
5309
|
+
});
|
|
5310
|
+
}
|
|
5311
|
+
isArray(config) {
|
|
5312
|
+
return Array.isArray(config);
|
|
5313
|
+
}
|
|
5314
|
+
modelLink$({ model, value }) {
|
|
5315
|
+
return this.hestiaEngineService.model$({ model, term: value });
|
|
5316
|
+
}
|
|
5317
|
+
modelPathLink$({ model, value }) {
|
|
5318
|
+
return this.hestiaEngineService.model$({
|
|
5319
|
+
path: `${engineGitUrl()}/hestia_earth/models/${model}/${(value || '').replace('.', '/')}.py`
|
|
5320
|
+
});
|
|
5321
|
+
}
|
|
5322
|
+
get configUrl() {
|
|
5323
|
+
return this.hestiaEngineService.orchestratorConfigUrl(this.nodeType);
|
|
5324
|
+
}
|
|
5325
|
+
}
|
|
5326
|
+
EngineOrchestratorEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EngineOrchestratorEditComponent, deps: [{ token: HeEngineService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5327
|
+
EngineOrchestratorEditComponent.ɵcmp = i0.ɵɵ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, 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.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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "keyToLabel": KeyToLabelPipe, "async": i6.AsyncPipe, "keys": KeysPipe, "json": i6.JsonPipe } });
|
|
5328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EngineOrchestratorEditComponent, decorators: [{
|
|
5329
|
+
type: Component$1,
|
|
5330
|
+
args: [{
|
|
5331
|
+
selector: 'he-engine-orchestrator-edit',
|
|
5332
|
+
templateUrl: './engine-orchestrator-edit.component.html',
|
|
5333
|
+
styleUrls: ['./engine-orchestrator-edit.component.scss']
|
|
5334
|
+
}]
|
|
5335
|
+
}], ctorParameters: function () { return [{ type: HeEngineService }]; }, propDecorators: { config: [{
|
|
5336
|
+
type: Input
|
|
5337
|
+
}], nodeType: [{
|
|
5338
|
+
type: Input
|
|
5339
|
+
}] } });
|
|
5340
|
+
|
|
5341
|
+
const components$3 = [
|
|
5342
|
+
EngineOrchestratorEditComponent
|
|
5343
|
+
];
|
|
5344
|
+
class HeEngineModule {
|
|
5345
|
+
}
|
|
5346
|
+
HeEngineModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HeEngineModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5347
|
+
HeEngineModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HeEngineModule, declarations: [EngineOrchestratorEditComponent], imports: [CommonModule,
|
|
5348
|
+
HeCommonModule,
|
|
5349
|
+
HeNodeModule], exports: [EngineOrchestratorEditComponent] });
|
|
5350
|
+
HeEngineModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HeEngineModule, imports: [[
|
|
5351
|
+
CommonModule,
|
|
5352
|
+
HeCommonModule,
|
|
5353
|
+
HeNodeModule
|
|
5354
|
+
]] });
|
|
5355
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HeEngineModule, decorators: [{
|
|
5330
5356
|
type: NgModule,
|
|
5331
5357
|
args: [{
|
|
5332
5358
|
declarations: components$3,
|
|
5333
5359
|
exports: components$3,
|
|
5334
5360
|
imports: [
|
|
5335
|
-
CommonModule,
|
|
5361
|
+
CommonModule,
|
|
5336
5362
|
HeCommonModule,
|
|
5337
5363
|
HeNodeModule
|
|
5338
5364
|
]
|
|
@@ -5617,7 +5643,6 @@ const termSuggestions = (parent, { allOf }) => ({
|
|
|
5617
5643
|
...(['country'].includes(parent) ? [matchCountry] : [])
|
|
5618
5644
|
]
|
|
5619
5645
|
});
|
|
5620
|
-
const formatLinkNodesSuggestions = (nodeMap, type) => (nodeMap[type] || []).map(id => ({ type, id, name: `Link with ${type}: ${id}` }));
|
|
5621
5646
|
const typeToSuggestion = {
|
|
5622
5647
|
[NodeType.Actor]: defaultNodeTypeSuggestion(NodeType.Actor),
|
|
5623
5648
|
[NodeType.Cycle]: defaultNodeTypeSuggestion(NodeType.Cycle),
|
|
@@ -5680,11 +5705,6 @@ const enableSuggestions = (parentSchema, type, fullKey, schema) => {
|
|
|
5680
5705
|
typeToSuggestion[schema.type](fullKey, parentSchema, schema) :
|
|
5681
5706
|
undefined);
|
|
5682
5707
|
};
|
|
5683
|
-
const formatProperty = (prop) => (Object.assign(Object.assign({ '@type': SchemaType.Property }, prop), { term: Object.assign({ '@type': NodeType.Term }, prop.term) }));
|
|
5684
|
-
const formatSuggestion = (_c) => {
|
|
5685
|
-
var { defaultProperties } = _c, node = __rest(_c, ["defaultProperties"]);
|
|
5686
|
-
return (Object.assign(Object.assign({}, node), (defaultProperties ? { defaultProperties: defaultProperties.map(formatProperty) } : {})));
|
|
5687
|
-
};
|
|
5688
5708
|
const nodeAvailableProperties = (node, { fullKey, schema, schemaType }) => availableProperties(schema, schemaType, fullKey ? get$2(node, fullKey, {}) : node, fullKey.length > 0);
|
|
5689
5709
|
const isAddPropertyEnabled = (node, schemaType, schema, fullKey = '') => !!schema &&
|
|
5690
5710
|
!!Object.keys(nodeAvailableProperties(node, { fullKey, schema })).length &&
|
|
@@ -6440,11 +6460,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
6440
6460
|
}] });
|
|
6441
6461
|
|
|
6442
6462
|
const get = require('lodash.get');
|
|
6443
|
-
const MIN_TYPEAHEAD_LENGTH
|
|
6463
|
+
const MIN_TYPEAHEAD_LENGTH = 2;
|
|
6444
6464
|
const populateTermFields = [
|
|
6445
|
-
'termType', 'units'
|
|
6465
|
+
'termType', 'units'
|
|
6466
|
+
];
|
|
6467
|
+
const populateTermDefaultProperties = [
|
|
6446
6468
|
'defaultProperties.term.name', 'defaultProperties.term.units', 'defaultProperties.value'
|
|
6447
6469
|
];
|
|
6470
|
+
const formatProperty = (prop) => (Object.assign(Object.assign({ '@type': SchemaType.Property }, prop), { term: Object.assign({ '@type': NodeType.Term }, prop.term) }));
|
|
6471
|
+
const formatSuggestion = (_a) => {
|
|
6472
|
+
var { defaultProperties } = _a, node = __rest(_a, ["defaultProperties"]);
|
|
6473
|
+
return (Object.assign(Object.assign({}, node), ((defaultProperties === null || defaultProperties === void 0 ? void 0 : defaultProperties.length) ? { defaultProperties: defaultProperties.map(formatProperty) } : {})));
|
|
6474
|
+
};
|
|
6475
|
+
const formatLinkNodesSuggestions = (nodeMap, type) => (nodeMap[type] || []).map(id => ({ type, id, name: `Link with ${type}: ${id}` }));
|
|
6448
6476
|
class FilesFormComponent {
|
|
6449
6477
|
constructor(ref, searchService, usersService) {
|
|
6450
6478
|
this.ref = ref;
|
|
@@ -6452,10 +6480,21 @@ class FilesFormComponent {
|
|
|
6452
6480
|
this.usersService = usersService;
|
|
6453
6481
|
this.errors = [];
|
|
6454
6482
|
this.nodeMap = {};
|
|
6483
|
+
/**
|
|
6484
|
+
* Allow editing nodes (`false` for readonly).
|
|
6485
|
+
*/
|
|
6455
6486
|
this.editable = false;
|
|
6456
6487
|
this.errorMode = false;
|
|
6457
6488
|
this.deepEditable = true;
|
|
6489
|
+
/**
|
|
6490
|
+
* Can edit errors.
|
|
6491
|
+
*/
|
|
6458
6492
|
this.errorsEditable = false;
|
|
6493
|
+
/**
|
|
6494
|
+
* When selecting terms, will show default properties or not.
|
|
6495
|
+
* Should be `false` when using schema validation, as only the `name` would be added.
|
|
6496
|
+
*/
|
|
6497
|
+
this.showSuggestedDefaultProperties = true;
|
|
6459
6498
|
this.nodeChange = new EventEmitter$1();
|
|
6460
6499
|
this.nodeErorrResolved = new EventEmitter$1();
|
|
6461
6500
|
this.nodeErrorAdded = new EventEmitter$1();
|
|
@@ -6468,7 +6507,7 @@ class FilesFormComponent {
|
|
|
6468
6507
|
this.properties = [];
|
|
6469
6508
|
this.formatter = (value) => { var _a; return typeof value === 'object' ? ('bibliography' in value ? (_a = value.bibliography) === null || _a === void 0 ? void 0 : _a.title : value.name) : value; };
|
|
6470
6509
|
this.suggestNewProperty = (fullKey) => (text$) => text$.pipe(distinctUntilChanged(), switchMap(term => of(this.newProperties(findProperty(this.properties, fullKey) || this.nodeProperty, term))));
|
|
6471
|
-
this.suggestExistingNode = (type, term, uniqueKey = '@id') => term.length < MIN_TYPEAHEAD_LENGTH
|
|
6510
|
+
this.suggestExistingNode = (type, term, uniqueKey = '@id') => term.length < MIN_TYPEAHEAD_LENGTH ?
|
|
6472
6511
|
of([]) :
|
|
6473
6512
|
this.searchService.suggest(term, type, [], {
|
|
6474
6513
|
bool: {
|
|
@@ -6480,7 +6519,7 @@ class FilesFormComponent {
|
|
|
6480
6519
|
],
|
|
6481
6520
|
minimum_should_match: 1
|
|
6482
6521
|
}
|
|
6483
|
-
}, 5,
|
|
6522
|
+
}, 5, this.suggestTermFields);
|
|
6484
6523
|
this.suggestNode = (type, suggestDefault) => (term, property) => {
|
|
6485
6524
|
var _a, _b;
|
|
6486
6525
|
return (((_a = property.suggestions) === null || _a === void 0 ? void 0 : _a.isUniqueKey) ? (this.suggestExistingNode(type, term, property.suggestions.isUniqueKey)) : (((_b = property.suggestions) === null || _b === void 0 ? void 0 : _b.isLinkNode) ?
|
|
@@ -6499,12 +6538,12 @@ class FilesFormComponent {
|
|
|
6499
6538
|
[NodeType.ImpactAssessment]: this.suggestNode(NodeType.ImpactAssessment),
|
|
6500
6539
|
[NodeType.Organisation]: this.suggestNode(NodeType.Organisation),
|
|
6501
6540
|
[NodeType.Site]: this.suggestNode(NodeType.Site),
|
|
6502
|
-
[NodeType.Source]: this.suggestNode(NodeType.Source, (term, { key }) => term.length < MIN_TYPEAHEAD_LENGTH
|
|
6541
|
+
[NodeType.Source]: this.suggestNode(NodeType.Source, (term, { key }) => term.length < MIN_TYPEAHEAD_LENGTH ?
|
|
6503
6542
|
of([]) :
|
|
6504
6543
|
this.searchService.suggestSource(term, 5, [`bibliography.${key}`], [`bibliography.${key}`])),
|
|
6505
|
-
[NodeType.Term]: this.suggestNode(NodeType.Term, (term, { suggestions }) => term.length < MIN_TYPEAHEAD_LENGTH
|
|
6544
|
+
[NodeType.Term]: this.suggestNode(NodeType.Term, (term, { suggestions }) => term.length < MIN_TYPEAHEAD_LENGTH ?
|
|
6506
6545
|
of([]) :
|
|
6507
|
-
this.searchService.suggest(term, NodeType.Term, (suggestions === null || suggestions === void 0 ? void 0 : suggestions.queries) || [], null, 5,
|
|
6546
|
+
this.searchService.suggest(term, NodeType.Term, (suggestions === null || suggestions === void 0 ? void 0 : suggestions.queries) || [], null, 5, this.suggestTermFields))
|
|
6508
6547
|
};
|
|
6509
6548
|
this.propertySuggest = (fullKey, suggestType) => (text$) => text$.pipe(debounceTime(suggestType === defaultSuggestionType ? 0 : 300), distinctUntilChanged(), mergeMap(term => {
|
|
6510
6549
|
const property = findProperty(this.properties, fullKey);
|
|
@@ -6557,6 +6596,12 @@ class FilesFormComponent {
|
|
|
6557
6596
|
isRequired({ value, isRequired }) {
|
|
6558
6597
|
return isRequired && isEmpty(value);
|
|
6559
6598
|
}
|
|
6599
|
+
get suggestTermFields() {
|
|
6600
|
+
return [
|
|
6601
|
+
...populateTermFields,
|
|
6602
|
+
...(this.showSuggestedDefaultProperties ? populateTermDefaultProperties : [])
|
|
6603
|
+
];
|
|
6604
|
+
}
|
|
6560
6605
|
// --- Errors
|
|
6561
6606
|
enableAddError(property) {
|
|
6562
6607
|
return this.errorsEditable && !property.hasError && !property.hasWarning;
|
|
@@ -6816,7 +6861,7 @@ class FilesFormComponent {
|
|
|
6816
6861
|
}
|
|
6817
6862
|
}
|
|
6818
6863
|
FilesFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilesFormComponent, deps: [{ token: i0.ElementRef }, { token: HeSearchService }, { token: HeUsersService }], target: i0.ɵɵFactoryTarget.Component });
|
|
6819
|
-
FilesFormComponent.ɵcmp = i0.ɵɵ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, 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.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.NgbHighlight, selector: "ngb-highlight", inputs: ["highlightClass", "result", "term"] }, { type: UnitConverterComponent, selector: "he-unit-converter", inputs: ["term", "value", "fromUnits", "toUnits"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i10.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { type: i6.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1$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.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "placement", "container", "editable", "focusFirst", "showHint", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$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$4.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i1$4.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i1$4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1$4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1$4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }], pipes: { "pluralize": PluralizePipe } });
|
|
6864
|
+
FilesFormComponent.ɵcmp = i0.ɵɵ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, 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.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.NgbHighlight, selector: "ngb-highlight", inputs: ["highlightClass", "result", "term"] }, { type: UnitConverterComponent, selector: "he-unit-converter", inputs: ["term", "value", "fromUnits", "toUnits"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disablePopover", "popoverClass", "openDelay", "closeDelay", "ngbPopover", "popoverTitle"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: BindOnceDirective, selector: "[bindOnce]", inputs: ["bindOnce"] }, { type: i10.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { type: i6.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1$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.NgbTypeahead, selector: "input[ngbTypeahead]", inputs: ["autocomplete", "placement", "container", "editable", "focusFirst", "showHint", "inputFormatter", "ngbTypeahead", "resultFormatter", "resultTemplate"], outputs: ["selectItem"], exportAs: ["ngbTypeahead"] }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$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$4.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i1$4.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i1$4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1$4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1$4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }], pipes: { "pluralize": PluralizePipe } });
|
|
6820
6865
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilesFormComponent, decorators: [{
|
|
6821
6866
|
type: Component$1,
|
|
6822
6867
|
args: [{
|
|
@@ -6840,6 +6885,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
6840
6885
|
type: Input
|
|
6841
6886
|
}], errorsEditable: [{
|
|
6842
6887
|
type: Input
|
|
6888
|
+
}], showSuggestedDefaultProperties: [{
|
|
6889
|
+
type: Input
|
|
6843
6890
|
}], nodeChange: [{
|
|
6844
6891
|
type: Output
|
|
6845
6892
|
}], nodeErorrResolved: [{
|
|
@@ -7190,7 +7237,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
7190
7237
|
}] } });
|
|
7191
7238
|
|
|
7192
7239
|
const orderBy = require('lodash.orderby');
|
|
7193
|
-
const MIN_TYPEAHEAD_LENGTH = 1;
|
|
7194
7240
|
var View;
|
|
7195
7241
|
(function (View) {
|
|
7196
7242
|
View["table"] = "table";
|
|
@@ -7386,5 +7432,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
7386
7432
|
* Generated bundle index. Do not edit.
|
|
7387
7433
|
*/
|
|
7388
7434
|
|
|
7389
|
-
export { ARRAY_DELIMITER, BibliographiesSearchConfirmComponent, BindOnceDirective, BlankNodeStateComponent, BlankNodeStateNoticeComponent, BlankNodeValueDeltaComponent, ClickOutsideDirective, ClipboardComponent, CyclesActivityComponent, CyclesActivityLogsComponent, CyclesCompletenessComponent, CyclesEmissionsChartComponent, CyclesEmissionsComponent, CyclesEmissionsLogsComponent, CyclesFunctionalUnitMeasureComponent, CyclesPracticesComponent, CyclesPracticesLogsComponent, CyclesResultComponent, DefaultPipe, DeltaColour,
|
|
7435
|
+
export { ARRAY_DELIMITER, BibliographiesSearchConfirmComponent, BindOnceDirective, BlankNodeStateComponent, BlankNodeStateNoticeComponent, BlankNodeValueDeltaComponent, ClickOutsideDirective, ClipboardComponent, CyclesActivityComponent, CyclesActivityLogsComponent, CyclesCompletenessComponent, CyclesEmissionsChartComponent, CyclesEmissionsComponent, CyclesEmissionsLogsComponent, CyclesFunctionalUnitMeasureComponent, CyclesPracticesComponent, CyclesPracticesLogsComponent, CyclesResultComponent, DefaultPipe, DeltaColour, DiffsDisplayType, EllipsisPipe, EngineOrchestratorEditComponent, FilesFormComponent, GetPipe, HE_API_BASE_URL, HE_ORCHESTRATOR_BASE_URL, HeAggregationEngineService, HeAuthService, HeBibliographiesModule, HeCommonLightModule, HeCommonModule, HeCommonService, HeCyclesModule, HeEngineModule, HeEngineService, HeFilesModule, HeFontawesomeModule, HeImpactAssessmentsModule, HeMendeleyService, HeNodeCsvService, HeNodeModule, HeNodeService, HeSchemaService, HeSearchModule, HeSearchService, HeSitesModule, HeToastService, HeUsersService, ImpactAssessmentsIndicatorBreakdownChartComponent, ImpactAssessmentsIndicatorsChartComponent, ImpactAssessmentsProductsComponent, ImpactAssessmentsProductsLogsComponent, KeyToLabelPipe, KeysPipe, Level, LinkKeyValueComponent, MAX_RESULTS, MapsDrawingConfirmComponent, MendeleySearchResult, NodeCsvExportConfirmComponent, NodeCsvSelectHeadersComponent, NodeDiffsComponent, NodeIconComponent, NodeLinkComponent, NodeLogsFileComponent, NodeLogsModelsComponent, NodeMissingLookupFactorsComponent, NodeValueDetailsComponent, PluralizePipe, PopoverComponent, PopoverConfirmComponent, PrecisionPipe, SchemaVersionLinkComponent, SitesMapsComponent, SitesMeasurementsComponent, SitesMeasurementsLogsComponent, SkeletonTextComponent, SocialTagsComponent, TagsInputDirective, TimesPipe, ToastComponent, UnitConverterComponent, addPolygonToFeature, allCountriesQuery, arrayValue, availableProperties, baseUrl, bottom, buildSummary, calculateCycleDuration, calculateCycleDurationEnabled, calculateCycleStartDate, calculateCycleStartDateEnabled, clustererImage, code, coordinatesToPoint, countriesQuery, createMarker, cropsQuery, dataPathToKey, defaultFeature, defaultLabel, defaultSuggestionType, definitionToSchemaType, deserializeSearchFilters, ellipsis, engineGitUrl, errorHasError, errorHasWarning, errorText, evaluateSuccess, filenameWithoutExt, fillColor, fillStyle, filterError, filterParams, findConfigModels, findProperty, findPropertyById, formatCustomErrorMessage, formatError, formatPropertyError, gitBranch, gitHome, gitRawBaseUrl, groupChanged, groupNodesByTerm, grouppedKeys, grouppedValueKeys, handleAPIError, hasError, hasWarning, isAddPropertyEnabled, isChrome, isExternal, isMissingOneOfError, isMissingPropertyError, isSchemaIri, isScrolledBelow, itemColor, keyToDataPath, levels, linkTypeEnabled, listColor, locationQuery, lookupUrl, lookups, mapsUrl, markerIcon, markerPie, matchAggregatedQuery, matchBoolPrefixQuery, matchCountry, matchExactQuery, matchGlobalRegion, matchNameNormalized, matchNestedKey, matchPhrasePrefixQuery, matchPhraseQuery, matchQuery, matchRegex, matchRegion, matchTermType, matchType, maxAreaSize, measurementValue, missingNodeErrorMessage, missingNodeErrors, multiMatchQuery, nestedProperty, nestingEnabled, nestingTypeEnabled, nodeAvailableProperties, nodeLink, nodeLogsUrl, nodeUrl, numberGte, parentKey, parentProperty, parseData, parseDataPath, parseLines, parseMessage, parseNewValue, pathToApiDocsPath, pointToCoordinates, polygonBounds, polygonToCoordinates, polygonsFromFeature, primaryProduct, propertyError, propertyId, recursiveProperties, refToSchemaType, refreshPropertyKeys, regionsQuery, repeat, safeJSONParse, safeJSONStringify, schemaRequiredProperties, schemaTypeToDefaultValue, scrollToEl, scrollTop, searchQuery, searchResultsFields, searchableTypes, serializeSearchFilters, siblingProperty, singleProperty, siteTooBig, sortOrder, sortProperties, strokeColor, strokeStyle, suggestMatchQuery, suggestQuery, termChildToParent, termLocation, termLocationName, termProperties, termTypeGroups, termTypeLabel, termTypeLookupUrl, toCsv$1 as toCsv, typeToNewProperty, updateProperties, valueTypeToDefault, waitFor, wildcardQuery, worldRegion };
|
|
7390
7436
|
//# sourceMappingURL=hestia-earth-ui-components.js.map
|