@hestia-earth/ui-components 0.32.10 → 0.32.11

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/common/utils.d.ts CHANGED
@@ -45,7 +45,7 @@ export declare const changelogUrl: (repository: Repository) => string;
45
45
  export declare const contactUsEmail = "community@hestia.earth";
46
46
  export declare const externalLink: (href: string, text: string) => string;
47
47
  export declare const glossaryLink: (text: string) => string;
48
- export declare const nodeLink: ({ "@type": type, "@id": id, name }: {
48
+ export declare const externalNodeLink: ({ "@type": type, "@id": id, name }: {
49
49
  "@type": string;
50
50
  "@id": string;
51
51
  name?: string;
@@ -189,7 +189,7 @@ const changelogUrl = (repository) => `${gitHome}/${repository}/-/blob/master/CHA
189
189
  const contactUsEmail = 'community@hestia.earth';
190
190
  const externalLink = (href, text) => `<a href="${href}" target="_blank">${text}</a>`;
191
191
  const glossaryLink = (text) => externalLink(glossaryBaseUrl(), text);
192
- const nodeLink$1 = ({ '@type': type, '@id': id, name }) => type && id ? `<a href="/${type.toLowerCase()}/${id}" target="_blank">${name || id}</a>` : null;
192
+ const externalNodeLink = ({ '@type': type, '@id': id, name }) => (type && id ? `<a href="/${type.toLowerCase()}/${id}" target="_blank">${name || id}</a>` : null);
193
193
  const schemaLink = (type, title = type) => `<a href="${schemaBaseUrl()}/${type}" target="_blank">${title}</a>`;
194
194
  const code = (text) => `<code>${text}</code>`;
195
195
  const contactUsLink = (text = 'contact us') => `<a href="mailto:${contactUsEmail}">${text}</a>`;
@@ -8910,12 +8910,12 @@ const customErrorMessage = {
8910
8910
  : 'This GeoJSON appears to be invalid.'}
8911
8911
  You can validate your GeoJSON using an online tool like <a href="https://geojson.io/">geojson.io</a>.
8912
8912
  If you think this is a mistake, please report the error ${reportIssueLink(Repository.schema, Template.bug)}.`,
8913
- 'should add the term stockingDensityPermanentPastureAverage': ({ params }) => `You did not specify ${nodeLink$1({ '@type': NodeType.Term, '@id': params.expected })}.
8913
+ 'should add the term stockingDensityPermanentPastureAverage': ({ params }) => `You did not specify ${externalNodeLink({ '@type': NodeType.Term, '@id': params.expected })}.
8914
8914
  Adding this Practice is essential for Cycles with relative functional unit which happen entirely or partially on permanent pasture.
8915
8915
  Without this information HESTIA cannot calculate animal related emissions.`,
8916
8916
  'should specify the herd composition': () => `We recommend adding information on the herd composition using the Animal node.
8917
8917
  Without this, we cannot re-model many animal related Inputs, Products, and Emissions.`,
8918
- 'should specify the pregnancy rate': ({ params }) => `For female mammals in their reproductive age, we recommend adding ${nodeLink$1({
8918
+ 'should specify the pregnancy rate': ({ params }) => `For female mammals in their reproductive age, we recommend adding ${externalNodeLink({
8919
8919
  '@type': NodeType.Term,
8920
8920
  '@id': params.expected
8921
8921
  })} as a ${schemaLink('Animal#properties', 'Property')}.
@@ -8956,15 +8956,15 @@ const customErrorMessage = {
8956
8956
  If it is more than 7305 days, consider using the term ${code('Other natural vegetation')} instead.`,
8957
8957
  'must not add the feed input to the Cycle as well': ({ params: { term } = {} }) => `You have added the animal feed Input ${code(term['@id'])} to the Cycle inputs as well, which might lead to double counting.
8958
8958
  If you do not know the amount of ${code(term['@id'])} given to each Animal, please add the Input to the Cycle only.`,
8959
- 'must specify water type for ponds': () => `For Sites with ${schemaLink('Site#siteType', 'siteType')} = ${code('pond')}, you must specify the ${nodeLink$1({
8959
+ 'must specify water type for ponds': () => `For Sites with ${schemaLink('Site#siteType', 'siteType')} = ${code('pond')}, you must specify the ${externalNodeLink({
8960
8960
  '@type': NodeType.Term,
8961
8961
  '@id': 'waterSalinity',
8962
8962
  name: 'Water salinity'
8963
- })} or the water type (${nodeLink$1({
8963
+ })} or the water type (${externalNodeLink({
8964
8964
  '@type': NodeType.Term,
8965
8965
  '@id': 'salineWater',
8966
8966
  name: 'Saline water'
8967
- })} / ${nodeLink$1({ '@type': NodeType.Term, '@id': 'freshWater', name: 'Fresh water' })} / ${nodeLink$1({
8967
+ })} / ${externalNodeLink({ '@type': NodeType.Term, '@id': 'freshWater', name: 'Fresh water' })} / ${externalNodeLink({
8968
8968
  '@type': NodeType.Term,
8969
8969
  '@id': 'brackishWater',
8970
8970
  name: 'Brackish water'
@@ -9001,7 +9001,7 @@ const customErrorMessage = {
9001
9001
  'at least one landCover practice must match an equivalent product': ({ params }) => `You have specified ${params?.current.map(code).join(', ')} as ${code(TermTermType.landCover)} practice, but none of the recorded products match. Please add the practices for ${params?.expected
9002
9002
  .map(code)
9003
9003
  .join(', ')}, or remove all ${code(TermTermType.landCover)} practices.`,
9004
- 'saplings cannot be used as an input here': () => `To input ${code('Saplings')} into a plantation crop Cycle, you must use ${nodeLink$1({
9004
+ 'saplings cannot be used as an input here': () => `To input ${code('Saplings')} into a plantation crop Cycle, you must use ${externalNodeLink({
9005
9005
  '@type': NodeType.Term,
9006
9006
  '@id': 'saplingsDepreciatedAmountPerCycle',
9007
9007
  name: 'Saplings, depreciated amount per Cycle'
@@ -10386,7 +10386,7 @@ const findNodeTerm = (node, { dataPath }) => nodeTerm(node, dataPathToKey(dataPa
10386
10386
  nodeTerm(node, dataPathToKey(dataPath, true)) ||
10387
10387
  nodeTerm(node, `${dataPathToKey(dataPath, true)}.term`);
10388
10388
  const uniqueTerms = (errors) => unique(errors
10389
- .map(({ term }) => (term ? nodeLink$1(term) || code(term.name || term['@id'] || term.id) : null))
10389
+ .map(({ term }) => (term ? externalNodeLink(term) || code(term.name || term['@id'] || term.id) : null))
10390
10390
  .filter(Boolean));
10391
10391
  const summaryShowErrors = (summaryData, { path, level, message }) => summaryData.find(summary => summary.path === path && summary.level === level && summary.message === message)
10392
10392
  ?.showErrors || true;
@@ -12940,5 +12940,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
12940
12940
  * Generated bundle index. Do not edit.
12941
12941
  */
12942
12942
 
12943
- export { ARRAY_DELIMITER, ApplyPurePipe, BarChartComponent, BibliographiesSearchConfirmComponent, BlankNodeStateComponent, BlankNodeStateNoticeComponent, BlankNodeValueDeltaComponent, CapitalizePipe, ChartComponent, ChartConfigurationDirective, ClickOutsideDirective, ClipboardComponent, CollapsibleBoxComponent, ColorPalette, CompoundDirective, CompoundPipe, CycleNodesKeyGroup, CyclesCompletenessComponent, CyclesEmissionsChartComponent, CyclesFunctionalUnitMeasureComponent, CyclesNodesComponent, CyclesNodesTimelineComponent, CyclesResultComponent, DataTableComponent, DefaultPipe, DeltaColour, DrawerContainerComponent, DurationPipe, EllipsisPipe, EngineModelsLinkComponent, EngineModelsLookupInfoComponent, EngineModelsStageComponent, EngineModelsStageDeepComponent, EngineModelsStageDeepService, EngineModelsVersionLinkComponent, EngineOrchestratorEditComponent, EngineRequirementsFormComponent, FileSizePipe, FilesErrorSummaryComponent, FilesFormComponent, FilesFormEditableComponent, FilesUploadErrorsComponent, FilterComponent, FilterHasOptionsPipe, GetPipe, GlossaryMigrationFormat, HESvgIconComponent, HE_API_BASE_URL, HE_CALCULATIONS_BASE_URL, HE_MAP_LOADED, HeAuthService, HeCommonService, HeEngineService, HeGlossaryService, HeMendeleyService, HeNodeCsvService, HeNodeService, HeNodeStoreService, HeSchemaService, HeSearchService, HeSvgIconsModule, HeToastService, ImpactAssessmentsGraphComponent, ImpactAssessmentsIndicatorBreakdownChartComponent, ImpactAssessmentsIndicatorsChartComponent, ImpactAssessmentsProductsComponent, IsArrayPipe, IsObjectPipe, IssueConfirmComponent, KeyToLabelPipe, Level, LineChartComponent, LinkKeyValueComponent, LogStatus, MAX_RESULTS, MapsDrawingComponent, MapsDrawingConfirmComponent, MendeleySearchResult, MobileShellComponent, NavigationMenuComponent, NoExtPipe, NodeAggregatedComponent, NodeAggregatedInfoComponent, NodeAggregatedQualityScoreComponent, NodeCsvExportConfirmComponent, NodeCsvPreviewComponent, NodeCsvSelectHeadersComponent, NodeElementDirective, NodeIconComponent, NodeJsonldComponent, NodeJsonldSchemaComponent, NodeKeyState, NodeLinkComponent, NodeLogsFileComponent, NodeLogsModelsComponent, NodeLogsTimeComponent, NodeMissingLookupFactorsComponent, NodeRecommendationsComponent, NodeSelectComponent, NodeValueDetailsComponent, OPTION_GROUP_TOKEN, PluralizePipe, PopoverComponent, PopoverConfirmComponent, PrecisionPipe, RelatedNodeResult, RemoveMarkdownPipe, Repository, ResizedDirective, ResizedEvent, ResponsiveService, SELECT_OPTION_TOKEN, SELECT_TOKEN, SchemaInfoComponent, SchemaVersionLinkComponent, SearchExtendComponent, SelectComponent, SelectOptionComponent, SelectOptionGroupComponent, ShelfDialogComponent, ShellComponent, SitesManagementChartComponent, SitesMapsComponent, SitesNodesComponent, SkeletonTextComponent, SocialTagsComponent, SortByPipe, SortSelectComponent, TagsInputDirective, Template, TermsPropertyContentComponent, TermsSubClassOfContentComponent, TermsUnitsDescriptionComponent, ThousandSuffixesPipe, TimesPipe, ToastComponent, ToggleOptionDirective, UncapitalizePipe, addPolygonToFeature, afterBarDrawPlugin, allCountriesQuery, arrayValue, availableProperties, baseApiUrl, baseUrl, bottom, buildSummary, bytesSize, calculateCycleDuration, calculateCycleDurationEnabled, calculateCycleStartDate, calculateCycleStartDateEnabled, capitalize, changelogUrl, clustererImage, code, compoundToHtml, computeKeys, computeTerms, contactUsEmail, contactUsLink, coordinatesToPoint, copyObject, countriesQuery, createMarker, cropsQuery, d3ellipse, d3wrap, dataPathLabel, dataPathToKey, defaultBarDrawSettings, defaultFeature, defaultLabel, defaultLollipopSettings, defaultSuggestionType, defaultSvgIconSize, definitionToSchemaType, distinctUntilChangedDeep, ellipsis, engineGitBaseUrl, engineGitUrl, errorHasError, errorHasWarning, errorText, evaluateSuccess, externalLink, fillColor, fillStyle, filterBlankNode$1 as filterBlankNode, filterError, filterParams, findConfigModels, findMatchingModel, findModels, findNodeModel, findOrchestratorModel, findProperty, findPropertyById, flatFilterData, flatFilterNode, formatCustomErrorMessage, formatDate, formatError, formatPropertyError, formatter, getColor, getDatesBetween, gitBranch, gitHome, gitlabRawUrl, glossaryBaseUrl, glossaryLink, groupChanged, groupLogsByModel, groupLogsByTerm, groupNodesByTerm, groupdLogsByKey, grouppedKeys, grouppedValueKeys, handleAPIError, hasError, hasLeafWithValue, hasValidationError, hasWarning, ignoreKeys$1 as ignoreKeys, initialFilterState, isAddPropertyEnabled, isChrome, isDateBetween, isEqual, isExternal, isMethodModelAllowed, isMigrationError, isMissingOneOfError, isMissingPropertyError, isNonNodeModelKey, isSchemaIri, isScrolledBelow, isState, isTermTypeAllowed, isValidKey, keyToDataPath, levels, listColor, listColorContinuous, loadMapApi, localStorageSignal, locationQuery, logToCsv$1 as logToCsv, logValueArray, logsKey, lollipopChartPlugin, lookupUrl, mapFilterData, mapsUrl, markerIcon, markerPie, matchAggregatedQuery, matchAggregatedValidatedQuery, matchBoolPrefixQuery, matchCountry, matchExactQuery, matchGlobalRegion, matchId, matchNameNormalized, matchNestedKey, matchPhrasePrefixQuery, matchPhraseQuery, matchPrimaryProductQuery, matchQuery, matchRegex, matchRegion, matchTermType, matchType, maxAreaSize, measurementValue, mergeDataWithHeaders, methodTierOrder, migrationErrorMessage, migrationsUrl, missingNodeErrors, modelCount, modelKeyParams, modelParams, models, multiMatchQuery, nestedProperty, nestingEnabled, nestingTypeEnabled, nodeAvailableProperties, nodeColours$1 as nodeColours, nodeId, nodeLink$1 as nodeLink, nodeLogsUrl, nodeType, nodeTypeDataState, nodeUrl, nodeVersion, numberGte, parentKey, parentProperty, parseData, parseDataPath, parseLines, parseMessage$1 as parseMessage, parseNewValue, pathToApiDocsPath, pluralize, pointToCoordinates, polygonBounds, polygonToCoordinates, polygonToMap, polygonsFromFeature, populateWithTrackIdsFilterData, primaryProduct, productsQuery, propertyError, propertyId, recursiveProperties, refToSchemaType, refreshPropertyKeys, regionsQuery, repeat, reportIssueLink, reportIssueUrl, safeJSONParse, safeJSONStringify, schemaBaseUrl, schemaDataBaseUrl, schemaLink, schemaRequiredProperties, schemaTypeToDefaultValue, scrollToEl, scrollTop, searchFilterData, searchableTypes, siblingProperty, singleProperty, siteTooBig, sortProperties, sortedDates, strokeColor, strokeStyle, suggestMatchQuery, suggestQuery, takeAfterViewInit, termLocation, termLocationName, termProperties, termTypeLabel, toThousands, typeToNewProperty, typeaheadFocus, uncapitalize, uniqueDatesBetween, updateProperties, valueTypeToDefault, waitFor, wildcardQuery };
12943
+ export { ARRAY_DELIMITER, ApplyPurePipe, BarChartComponent, BibliographiesSearchConfirmComponent, BlankNodeStateComponent, BlankNodeStateNoticeComponent, BlankNodeValueDeltaComponent, CapitalizePipe, ChartComponent, ChartConfigurationDirective, ClickOutsideDirective, ClipboardComponent, CollapsibleBoxComponent, ColorPalette, CompoundDirective, CompoundPipe, CycleNodesKeyGroup, CyclesCompletenessComponent, CyclesEmissionsChartComponent, CyclesFunctionalUnitMeasureComponent, CyclesNodesComponent, CyclesNodesTimelineComponent, CyclesResultComponent, DataTableComponent, DefaultPipe, DeltaColour, DrawerContainerComponent, DurationPipe, EllipsisPipe, EngineModelsLinkComponent, EngineModelsLookupInfoComponent, EngineModelsStageComponent, EngineModelsStageDeepComponent, EngineModelsStageDeepService, EngineModelsVersionLinkComponent, EngineOrchestratorEditComponent, EngineRequirementsFormComponent, FileSizePipe, FilesErrorSummaryComponent, FilesFormComponent, FilesFormEditableComponent, FilesUploadErrorsComponent, FilterComponent, FilterHasOptionsPipe, GetPipe, GlossaryMigrationFormat, HESvgIconComponent, HE_API_BASE_URL, HE_CALCULATIONS_BASE_URL, HE_MAP_LOADED, HeAuthService, HeCommonService, HeEngineService, HeGlossaryService, HeMendeleyService, HeNodeCsvService, HeNodeService, HeNodeStoreService, HeSchemaService, HeSearchService, HeSvgIconsModule, HeToastService, ImpactAssessmentsGraphComponent, ImpactAssessmentsIndicatorBreakdownChartComponent, ImpactAssessmentsIndicatorsChartComponent, ImpactAssessmentsProductsComponent, IsArrayPipe, IsObjectPipe, IssueConfirmComponent, KeyToLabelPipe, Level, LineChartComponent, LinkKeyValueComponent, LogStatus, MAX_RESULTS, MapsDrawingComponent, MapsDrawingConfirmComponent, MendeleySearchResult, MobileShellComponent, NavigationMenuComponent, NoExtPipe, NodeAggregatedComponent, NodeAggregatedInfoComponent, NodeAggregatedQualityScoreComponent, NodeCsvExportConfirmComponent, NodeCsvPreviewComponent, NodeCsvSelectHeadersComponent, NodeElementDirective, NodeIconComponent, NodeJsonldComponent, NodeJsonldSchemaComponent, NodeKeyState, NodeLinkComponent, NodeLogsFileComponent, NodeLogsModelsComponent, NodeLogsTimeComponent, NodeMissingLookupFactorsComponent, NodeQualityScore, NodeRecommendationsComponent, NodeSelectComponent, NodeValueDetailsComponent, OPTION_GROUP_TOKEN, PluralizePipe, PopoverComponent, PopoverConfirmComponent, PrecisionPipe, RelatedNodeResult, RemoveMarkdownPipe, Repository, ResizedDirective, ResizedEvent, ResponsiveService, SELECT_OPTION_TOKEN, SELECT_TOKEN, SchemaInfoComponent, SchemaVersionLinkComponent, SearchExtendComponent, SelectComponent, SelectOptionComponent, SelectOptionGroupComponent, ShelfDialogComponent, ShellComponent, SitesManagementChartComponent, SitesMapsComponent, SitesNodesComponent, SkeletonTextComponent, SocialTagsComponent, SortByPipe, SortSelectComponent, TagsInputDirective, Template, TermsPropertyContentComponent, TermsSubClassOfContentComponent, TermsUnitsDescriptionComponent, ThousandSuffixesPipe, TimesPipe, ToastComponent, ToggleOptionDirective, UncapitalizePipe, addPolygonToFeature, afterBarDrawPlugin, allCountriesQuery, arrayValue, availableProperties, baseApiUrl, baseUrl, bottom, buildSummary, bytesSize, calculateCycleDuration, calculateCycleDurationEnabled, calculateCycleStartDate, calculateCycleStartDateEnabled, capitalize, changelogUrl, clustererImage, code, compoundToHtml, computeKeys, computeTerms, contactUsEmail, contactUsLink, coordinatesToPoint, copyObject, countriesQuery, createMarker, cropsQuery, d3ellipse, d3wrap, dataPathLabel, dataPathToKey, defaultBarDrawSettings, defaultFeature, defaultLabel, defaultLollipopSettings, defaultSuggestionType, defaultSvgIconSize, definitionToSchemaType, distinctUntilChangedDeep, ellipsis, engineGitBaseUrl, engineGitUrl, errorHasError, errorHasWarning, errorText, evaluateSuccess, externalLink, externalNodeLink, fillColor, fillStyle, filterBlankNode$1 as filterBlankNode, filterError, filterParams, findConfigModels, findMatchingModel, findModels, findNodeModel, findOrchestratorModel, findProperty, findPropertyById, flatFilterData, flatFilterNode, formatCustomErrorMessage, formatDate, formatError, formatPropertyError, formatter, getColor, getDatesBetween, gitBranch, gitHome, gitlabRawUrl, glossaryBaseUrl, glossaryLink, groupChanged, groupLogsByModel, groupLogsByTerm, groupNodesByTerm, groupdLogsByKey, grouppedKeys, grouppedValueKeys, handleAPIError, hasError, hasLeafWithValue, hasValidationError, hasWarning, ignoreKeys$1 as ignoreKeys, initialFilterState, isAddPropertyEnabled, isChrome, isDateBetween, isEqual, isExternal, isMethodModelAllowed, isMigrationError, isMissingOneOfError, isMissingPropertyError, isNonNodeModelKey, isSchemaIri, isScrolledBelow, isState, isTermTypeAllowed, isValidKey, keyToDataPath, levels, listColor, listColorContinuous, loadMapApi, localStorageSignal, locationQuery, logToCsv$1 as logToCsv, logValueArray, logsKey, lollipopChartPlugin, lookupUrl, mapFilterData, mapsUrl, markerIcon, markerPie, matchAggregatedQuery, matchAggregatedValidatedQuery, matchBoolPrefixQuery, matchCountry, matchExactQuery, matchGlobalRegion, matchId, matchNameNormalized, matchNestedKey, matchPhrasePrefixQuery, matchPhraseQuery, matchPrimaryProductQuery, matchQuery, matchRegex, matchRegion, matchTermType, matchType, maxAreaSize, measurementValue, mergeDataWithHeaders, methodTierOrder, migrationErrorMessage, migrationsUrl, missingNodeErrors, modelCount, modelKeyParams, modelParams, models, multiMatchQuery, nestedProperty, nestingEnabled, nestingTypeEnabled, nodeAvailableProperties, nodeColours$1 as nodeColours, nodeDataState, nodeId, nodeLink, nodeLinkEnabled, nodeLinkTypeEnabled, nodeLogsUrl, nodeQualityScoreColor, nodeQualityScoreLevel, nodeQualityScoreMaxDefault, nodeQualityScoreOrder, nodeToAggregationFilename, nodeType, nodeTypeDataState, nodeUrl, nodeVersion, numberGte, parentKey, parentProperty, parseData, parseDataPath, parseLines, parseMessage$1 as parseMessage, parseNewValue, pathToApiDocsPath, pluralize, pointToCoordinates, polygonBounds, polygonToCoordinates, polygonToMap, polygonsFromFeature, populateWithTrackIdsFilterData, primaryProduct, productsQuery, propertyError, propertyId, recursiveProperties, refToSchemaType, refreshPropertyKeys, regionsQuery, repeat, reportIssueLink, reportIssueUrl, safeJSONParse, safeJSONStringify, schemaBaseUrl, schemaDataBaseUrl, schemaLink, schemaRequiredProperties, schemaTypeToDefaultValue, scrollToEl, scrollTop, searchFilterData, searchableTypes, siblingProperty, singleProperty, siteTooBig, sortProperties, sortedDates, strokeColor, strokeStyle, suggestMatchQuery, suggestQuery, takeAfterViewInit, termLocation, termLocationName, termProperties, termTypeLabel, toThousands, typeToNewProperty, typeaheadFocus, uncapitalize, uniqueDatesBetween, updateProperties, valueTypeToDefault, waitFor, wildcardQuery };
12944
12944
  //# sourceMappingURL=hestia-earth-ui-components.mjs.map