@hestia-earth/ui-components 0.42.14 → 0.42.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/hestia-earth-ui-components-file-errors.mjs +1324 -0
- package/fesm2022/hestia-earth-ui-components-file-errors.mjs.map +1 -0
- package/fesm2022/hestia-earth-ui-components.mjs +46 -721
- package/fesm2022/hestia-earth-ui-components.mjs.map +1 -1
- package/file-errors/README.md +112 -0
- package/package.json +5 -1
- package/types/hestia-earth-ui-components-file-errors.d.ts +178 -0
- package/types/hestia-earth-ui-components.d.ts +17 -33
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# `@hestia-earth/ui-components/file-errors`
|
|
2
|
+
|
|
3
|
+
Framework-agnostic formatting of HESTIA file validation errors. No Angular, no Bulma, no
|
|
4
|
+
`window` dependency — import it from any TypeScript package (browser, Node, SSR).
|
|
5
|
+
|
|
6
|
+
The error catalog is the single source of truth shared with the Angular UI; only the
|
|
7
|
+
presentation differs (a pluggable renderer).
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { formatErrors } from '@hestia-earth/ui-components/file-errors';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Basic usage — structured plain text
|
|
16
|
+
|
|
17
|
+
`formatErrors` takes the raw validation errors and returns one structured object per
|
|
18
|
+
visible error (errors that resolve to an empty message are dropped).
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import { formatErrors } from '@hestia-earth/ui-components/file-errors';
|
|
22
|
+
|
|
23
|
+
const errors = [
|
|
24
|
+
{
|
|
25
|
+
dataPath: '.functionalUnit',
|
|
26
|
+
keyword: 'enum',
|
|
27
|
+
message: 'should be equal to one of the allowed values',
|
|
28
|
+
params: { allowedValues: ['1 ha', 'relative'] }
|
|
29
|
+
}
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
formatErrors(errors);
|
|
33
|
+
// [
|
|
34
|
+
// {
|
|
35
|
+
// level: 'error',
|
|
36
|
+
// message: 'Only the following values are permitted: `1 ha`, `relative`.',
|
|
37
|
+
// location: '`functionalUnit`',
|
|
38
|
+
// dataPath: '.functionalUnit',
|
|
39
|
+
// keyword: 'enum'
|
|
40
|
+
// }
|
|
41
|
+
// ]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Each item is an `IFormattedError`:
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
interface IFormattedError {
|
|
48
|
+
level: 'error' | 'warning';
|
|
49
|
+
message: string; // plain text; code spans as `backticks`, links as [text](url), lists as bullets
|
|
50
|
+
location?: string; // human-readable path, e.g. "Cycle › Practice"
|
|
51
|
+
dataPath?: string;
|
|
52
|
+
keyword?: string;
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Rendering as HTML (or anything else)
|
|
57
|
+
|
|
58
|
+
Pass a renderer. `htmlRenderer` produces the same Bulma-classed markup the platform UI uses;
|
|
59
|
+
`textRenderer` (the default) produces plain text / lightweight markdown. You can also supply
|
|
60
|
+
your own `IErrorRenderer`.
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import { formatErrors, htmlRenderer } from '@hestia-earth/ui-components/file-errors';
|
|
64
|
+
|
|
65
|
+
formatErrors(errors, { renderer: htmlRenderer });
|
|
66
|
+
// message: '<p class="is-normal">Only the following values are permitted: <code>1 ha</code>, <code>relative</code>.</p>'
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Custom link URLs
|
|
70
|
+
|
|
71
|
+
Links default to `https://www.hestia.earth`. Override the base (or each URL) via `urls`:
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
import { formatErrors, urlConfig } from '@hestia-earth/ui-components/file-errors';
|
|
75
|
+
|
|
76
|
+
formatErrors(errors, { urls: urlConfig('https://www.hestia.earth') });
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Lower-level: build a reusable formatter
|
|
80
|
+
|
|
81
|
+
`formatErrors` builds a formatter on every call. To reuse one (e.g. format errors one at a
|
|
82
|
+
time, or reach the individual functions), use `createErrorFormatter`:
|
|
83
|
+
|
|
84
|
+
```ts
|
|
85
|
+
import { createErrorFormatter, textRenderer, defaultUrlConfig } from '@hestia-earth/ui-components/file-errors';
|
|
86
|
+
|
|
87
|
+
const { formatError, formatErrors, formatCustomErrorMessage, parseDataPath, dataPathLabel } =
|
|
88
|
+
createErrorFormatter({ renderer: textRenderer, urls: defaultUrlConfig });
|
|
89
|
+
|
|
90
|
+
formatError(errors[0]); // single IValidationError -> { level, message, ...error }
|
|
91
|
+
formatCustomErrorMessage(errors[0].message, errors[0]); // just the message string
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Helpers
|
|
95
|
+
|
|
96
|
+
Pure, renderer-independent predicates are exported too:
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
import {
|
|
100
|
+
errorHasError,
|
|
101
|
+
errorHasWarning,
|
|
102
|
+
isMigrationError,
|
|
103
|
+
isMissingPropertyError,
|
|
104
|
+
isMissingOneOfError,
|
|
105
|
+
filterError,
|
|
106
|
+
missingNodeErrors,
|
|
107
|
+
guidePageId
|
|
108
|
+
} from '@hestia-earth/ui-components/file-errors';
|
|
109
|
+
|
|
110
|
+
const blocking = errors.filter(errorHasError);
|
|
111
|
+
const warnings = errors.filter(errorHasWarning);
|
|
112
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hestia-earth/ui-components",
|
|
3
|
-
"version": "0.42.
|
|
3
|
+
"version": "0.42.16",
|
|
4
4
|
"description": "HESTIA reusable components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -71,6 +71,10 @@
|
|
|
71
71
|
".": {
|
|
72
72
|
"types": "./types/hestia-earth-ui-components.d.ts",
|
|
73
73
|
"default": "./fesm2022/hestia-earth-ui-components.mjs"
|
|
74
|
+
},
|
|
75
|
+
"./file-errors": {
|
|
76
|
+
"types": "./types/hestia-earth-ui-components-file-errors.d.ts",
|
|
77
|
+
"default": "./fesm2022/hestia-earth-ui-components-file-errors.mjs"
|
|
74
78
|
}
|
|
75
79
|
},
|
|
76
80
|
"sideEffects": false
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { NodeType, SchemaType } from '@hestia-earth/schema';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A renderer abstracts every presentation primitive used to build an error message.
|
|
5
|
+
*
|
|
6
|
+
* The error catalog is a single source of truth; swapping the renderer changes only how
|
|
7
|
+
* the messages are presented:
|
|
8
|
+
* - `htmlRenderer` reproduces the exact Bulma-classed HTML consumed by the Angular app.
|
|
9
|
+
* - `textRenderer` produces framework-agnostic plain text (with lightweight markdown for
|
|
10
|
+
* code spans, links and lists) suitable for any non-Angular consumer.
|
|
11
|
+
*/
|
|
12
|
+
interface IErrorRenderer {
|
|
13
|
+
code: (text: string | number | boolean) => string;
|
|
14
|
+
link: (href: string, text: string, newTab?: boolean) => string;
|
|
15
|
+
list: (values: Array<string | string[]>, style?: 'disc' | 'decimal') => string;
|
|
16
|
+
paragraph: (text: string) => string;
|
|
17
|
+
bold: (text: string) => string;
|
|
18
|
+
subscript: (text: string) => string;
|
|
19
|
+
underline: (text: string) => string;
|
|
20
|
+
/** Inline line break, e.g. `<br/>` or `\n`. */
|
|
21
|
+
lineBreak: string;
|
|
22
|
+
/** Separator used when joining inline code spans (`joinValues`). */
|
|
23
|
+
inlineSeparator: string;
|
|
24
|
+
/** Wraps the leading sentence of a default (non-catalog) message. */
|
|
25
|
+
capitalizeFirst: (text: string) => string;
|
|
26
|
+
/** Wraps the whole formatted message; receives a non-empty string. */
|
|
27
|
+
wrapMessage: (text: string) => string;
|
|
28
|
+
}
|
|
29
|
+
declare const htmlRenderer: IErrorRenderer;
|
|
30
|
+
declare const textRenderer: IErrorRenderer;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Provides the base URLs used to build links inside error messages.
|
|
34
|
+
*
|
|
35
|
+
* Functions (rather than plain strings) keep the lookups lazy: the Angular app reads them
|
|
36
|
+
* from `window.location` at call time, while a non-Angular consumer can pass static values.
|
|
37
|
+
*/
|
|
38
|
+
interface IUrlConfig {
|
|
39
|
+
baseUrl: () => string;
|
|
40
|
+
glossaryBaseUrl: () => string;
|
|
41
|
+
schemaBaseUrl: () => string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Static, browser-free default configuration pointing at the public HESTIA platform.
|
|
45
|
+
*/
|
|
46
|
+
declare const defaultUrlConfig: IUrlConfig;
|
|
47
|
+
/**
|
|
48
|
+
* Builds a configuration from a single base URL.
|
|
49
|
+
*/
|
|
50
|
+
declare const urlConfig: (baseUrl?: string) => IUrlConfig;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Framework-agnostic validation types.
|
|
54
|
+
*
|
|
55
|
+
* These mirror the canonical definitions in `../schema/schema-validation.model` but are
|
|
56
|
+
* duplicated here so this entry point stays self-contained (no import from the Angular
|
|
57
|
+
* primary entry point). They are kept structurally compatible on purpose.
|
|
58
|
+
*/
|
|
59
|
+
type validationErrorLevel = 'error' | 'warning';
|
|
60
|
+
type validationErrorParam = 'missingProperty' | 'type' | 'term' | 'termType' | 'termIds' | 'model' | 'product' | 'range' | 'node' | 'allowedValues' | 'allowedValue' | 'additionalProperty' | 'expected' | 'default' | 'current' | 'percentage' | 'keys' | 'threshold' | 'outliers' | 'country' | 'min' | 'max' | 'defaultSource' | 'source' | 'group' | 'message' | 'distance' | 'siteType' | 'products' | 'units' | 'duplicatedIndexes' | 'invalidCoordinates' | 'ids' | 'limit' | 'delta';
|
|
61
|
+
type validationErrorKeyword = 'required' | 'type' | 'if' | 'then' | 'not';
|
|
62
|
+
interface ICustomValidationRules {
|
|
63
|
+
const?: any;
|
|
64
|
+
required?: string[];
|
|
65
|
+
enum?: string[];
|
|
66
|
+
contains?: ICustomValidationRules;
|
|
67
|
+
properties?: {
|
|
68
|
+
[property: string]: ICustomValidationRules;
|
|
69
|
+
};
|
|
70
|
+
not?: ICustomValidationRules;
|
|
71
|
+
items?: ICustomValidationRules;
|
|
72
|
+
allOf?: ICustomValidationRules[];
|
|
73
|
+
anyOf?: ICustomValidationRules[];
|
|
74
|
+
oneOf?: ICustomValidationRules[];
|
|
75
|
+
}
|
|
76
|
+
interface IValidationError {
|
|
77
|
+
index?: number;
|
|
78
|
+
nodeIndex?: number;
|
|
79
|
+
level?: validationErrorLevel;
|
|
80
|
+
dataPath?: string;
|
|
81
|
+
schemaPath?: string;
|
|
82
|
+
keyword?: validationErrorKeyword;
|
|
83
|
+
message: string;
|
|
84
|
+
params?: {
|
|
85
|
+
[key in validationErrorParam]?: any;
|
|
86
|
+
};
|
|
87
|
+
schema?: ICustomValidationRules;
|
|
88
|
+
}
|
|
89
|
+
interface IValidationErrorWithIndex {
|
|
90
|
+
error: IValidationError[];
|
|
91
|
+
index: number;
|
|
92
|
+
changed?: boolean;
|
|
93
|
+
}
|
|
94
|
+
interface IDataPath {
|
|
95
|
+
path: string;
|
|
96
|
+
/**
|
|
97
|
+
* Human readable version of the path.
|
|
98
|
+
*/
|
|
99
|
+
label: string;
|
|
100
|
+
nodeType?: NodeType;
|
|
101
|
+
schemaType?: SchemaType;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Structured, framework-agnostic representation of a formatted validation error.
|
|
105
|
+
*/
|
|
106
|
+
interface IFormattedError {
|
|
107
|
+
level: validationErrorLevel;
|
|
108
|
+
/**
|
|
109
|
+
* The rendered message. Plain text (or lightweight markdown) by default, HTML when
|
|
110
|
+
* formatted with the html renderer.
|
|
111
|
+
*/
|
|
112
|
+
message: string;
|
|
113
|
+
/**
|
|
114
|
+
* Human readable location of the error within the document (derived from the dataPath).
|
|
115
|
+
*/
|
|
116
|
+
location?: string;
|
|
117
|
+
dataPath?: string;
|
|
118
|
+
keyword?: validationErrorKeyword;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
declare enum Repository {
|
|
122
|
+
glossary = "hestia-glossary",
|
|
123
|
+
models = "hestia-engine-models",
|
|
124
|
+
aggregation = "hestia-aggregation-engine",
|
|
125
|
+
community = "hestia-community-edition",
|
|
126
|
+
schema = "hestia-schema",
|
|
127
|
+
frontend = "hestia-front-end"
|
|
128
|
+
}
|
|
129
|
+
declare enum Template {
|
|
130
|
+
bug = "bug",
|
|
131
|
+
feature = "feature"
|
|
132
|
+
}
|
|
133
|
+
interface IIssueParams {
|
|
134
|
+
title?: string;
|
|
135
|
+
description?: string;
|
|
136
|
+
}
|
|
137
|
+
declare const reportIssueUrl: (repository: Repository, template?: Template, issueParams?: IIssueParams) => string;
|
|
138
|
+
|
|
139
|
+
declare const guidePageId: (nodeType: SchemaType, errorMessage: string) => string;
|
|
140
|
+
declare const isMigrationError: ({ params }: IValidationError) => boolean;
|
|
141
|
+
interface ICreateErrorFormatterOptions {
|
|
142
|
+
renderer: IErrorRenderer;
|
|
143
|
+
urls: IUrlConfig;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Builds the error formatting functions for a given presentation (`renderer`) and link
|
|
147
|
+
* configuration (`urls`). The error catalog below is the single source of truth; the
|
|
148
|
+
* renderer alone decides whether the output is HTML, plain text, etc.
|
|
149
|
+
*/
|
|
150
|
+
declare const createErrorFormatter: ({ renderer: r, urls }: ICreateErrorFormatterOptions) => {
|
|
151
|
+
parseDataPath: (dataPath?: string) => IDataPath[];
|
|
152
|
+
dataPathLabel: (dataPath?: string) => string;
|
|
153
|
+
migrationErrorMessage: ({ params }: IValidationError) => string;
|
|
154
|
+
formatCustomErrorMessage: (message?: string, error?: IValidationError, allErrors?: IValidationError[]) => string;
|
|
155
|
+
formatError: (error?: IValidationError, allErrors?: IValidationError[]) => IValidationError;
|
|
156
|
+
formatErrors: (errors?: IValidationError[]) => IFormattedError[];
|
|
157
|
+
locationLabel: (dataPath?: string) => string;
|
|
158
|
+
};
|
|
159
|
+
declare const errorHasError: (error?: IValidationError) => boolean;
|
|
160
|
+
declare const errorHasWarning: (error?: IValidationError) => boolean;
|
|
161
|
+
declare const isMissingPropertyError: ({ params }: IValidationError) => boolean;
|
|
162
|
+
declare const isMissingOneOfError: ({ keyword, schemaPath }: IValidationError) => boolean;
|
|
163
|
+
declare const filterError: (error: IValidationError) => boolean;
|
|
164
|
+
declare const missingNodeErrors: (errors: IValidationError[]) => IValidationError[];
|
|
165
|
+
|
|
166
|
+
interface IFormatErrorsOptions {
|
|
167
|
+
/** Presentation renderer. Defaults to `textRenderer` (plain text / lightweight markdown). */
|
|
168
|
+
renderer?: IErrorRenderer;
|
|
169
|
+
/** Base URLs used to build links. Defaults to the public HESTIA platform. */
|
|
170
|
+
urls?: IUrlConfig;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Formats a list of validation errors into structured, framework-agnostic objects.
|
|
174
|
+
*/
|
|
175
|
+
declare const formatErrors: (errors?: IValidationError[], options?: IFormatErrorsOptions) => IFormattedError[];
|
|
176
|
+
|
|
177
|
+
export { Repository, Template, createErrorFormatter, defaultUrlConfig, errorHasError, errorHasWarning, filterError, formatErrors, guidePageId, htmlRenderer, isMigrationError, isMissingOneOfError, isMissingPropertyError, missingNodeErrors, reportIssueUrl, textRenderer, urlConfig };
|
|
178
|
+
export type { ICreateErrorFormatterOptions, ICustomValidationRules, IDataPath, IErrorRenderer, IFormatErrorsOptions, IFormattedError, IUrlConfig, IValidationError, IValidationErrorWithIndex, validationErrorKeyword, validationErrorLevel, validationErrorParam };
|
|
@@ -22,6 +22,9 @@ import { DeltaDisplayType } from '@hestia-earth/utils/delta';
|
|
|
22
22
|
import { AnimationEvent } from '@angular/animations';
|
|
23
23
|
import { IsActiveMatchOptions } from '@angular/router';
|
|
24
24
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
25
|
+
import * as _hestia_earth_ui_components_file_errors from '@hestia-earth/ui-components/file-errors';
|
|
26
|
+
import { IValidationErrorWithIndex } from '@hestia-earth/ui-components/file-errors';
|
|
27
|
+
export { IValidationErrorWithIndex, errorHasError, errorHasWarning, filterError, guidePageId, isMigrationError, isMissingOneOfError, isMissingPropertyError, missingNodeErrors } from '@hestia-earth/ui-components/file-errors';
|
|
25
28
|
import { definition, definitions, IDefinition, IDefinitionObject } from '@hestia-earth/json-schema';
|
|
26
29
|
import { ErrorKeys, IJSONConversionParams, IConvertCSVOptions } from '@hestia-earth/schema-convert';
|
|
27
30
|
import * as _angular_platform_browser from '@angular/platform-browser';
|
|
@@ -2654,7 +2657,10 @@ declare class CyclesNodesComponent {
|
|
|
2654
2657
|
private readonly groupedNodes;
|
|
2655
2658
|
private readonly groupNodeKey;
|
|
2656
2659
|
protected readonly jlogParentIndex: _angular_core.Signal<number>;
|
|
2657
|
-
protected readonly groupNodeValues: _angular_core.Signal<
|
|
2660
|
+
protected readonly groupNodeValues: _angular_core.Signal<{
|
|
2661
|
+
value: string;
|
|
2662
|
+
term: _hestia_earth_schema.Term;
|
|
2663
|
+
}[]>;
|
|
2658
2664
|
protected readonly isGroupNode: _angular_core.Signal<boolean>;
|
|
2659
2665
|
protected readonly isEmission: _angular_core.Signal<boolean>;
|
|
2660
2666
|
protected readonly data: _angular_core.Signal<groupedEmissions$1 | {
|
|
@@ -2972,6 +2978,12 @@ declare class EngineRequirementsFormComponent {
|
|
|
2972
2978
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EngineRequirementsFormComponent, "he-engine-requirements-form", never, {}, {}, never, never, true, never>;
|
|
2973
2979
|
}
|
|
2974
2980
|
|
|
2981
|
+
declare const parseDataPath: (dataPath?: string) => _hestia_earth_ui_components_file_errors.IDataPath[];
|
|
2982
|
+
declare const dataPathLabel: (dataPath?: string) => string;
|
|
2983
|
+
declare const migrationErrorMessage: ({ params }: _hestia_earth_ui_components_file_errors.IValidationError) => string;
|
|
2984
|
+
declare const formatCustomErrorMessage: (message?: string, error?: _hestia_earth_ui_components_file_errors.IValidationError, allErrors?: _hestia_earth_ui_components_file_errors.IValidationError[]) => string;
|
|
2985
|
+
declare const formatError: (error?: _hestia_earth_ui_components_file_errors.IValidationError, allErrors?: _hestia_earth_ui_components_file_errors.IValidationError[]) => _hestia_earth_ui_components_file_errors.IValidationError;
|
|
2986
|
+
|
|
2975
2987
|
type validationErrorLevel = 'error' | 'warning';
|
|
2976
2988
|
type validationErrorParam = 'missingProperty' | 'type' | 'term' | 'termType' | 'termIds' | 'model' | 'product' | 'range' | 'node' | 'allowedValues' | 'allowedValue' | 'additionalProperty' | 'expected' | 'default' | 'current' | 'percentage' | 'keys' | 'threshold' | 'outliers' | 'country' | 'min' | 'max' | 'defaultSource' | 'source' | 'group' | 'message' | 'distance' | 'siteType' | 'products' | 'units' | 'duplicatedIndexes' | 'invalidCoordinates' | 'ids' | 'limit' | 'delta';
|
|
2977
2989
|
type validationErrorKeyword = 'required' | 'type' | 'if' | 'then' | 'not';
|
|
@@ -3004,34 +3016,6 @@ interface IValidationError {
|
|
|
3004
3016
|
}
|
|
3005
3017
|
declare const hasValidationError: (errors?: IValidationError[][], level?: "error" | "warning") => boolean;
|
|
3006
3018
|
|
|
3007
|
-
declare const guidePageId: (nodeType: SchemaType, errorMessage: string) => string;
|
|
3008
|
-
interface IValidationErrorWithIndex {
|
|
3009
|
-
error: IValidationError[];
|
|
3010
|
-
index: number;
|
|
3011
|
-
changed?: boolean;
|
|
3012
|
-
}
|
|
3013
|
-
interface IDataPath {
|
|
3014
|
-
path: string;
|
|
3015
|
-
/**
|
|
3016
|
-
* Human readable version of the path.
|
|
3017
|
-
*/
|
|
3018
|
-
label: string;
|
|
3019
|
-
nodeType?: NodeType;
|
|
3020
|
-
schemaType?: SchemaType;
|
|
3021
|
-
}
|
|
3022
|
-
declare const parseDataPath: (dataPath?: string) => IDataPath[];
|
|
3023
|
-
declare const dataPathLabel: (dataPath?: string) => string;
|
|
3024
|
-
declare const isMigrationError: ({ params }: IValidationError) => boolean;
|
|
3025
|
-
declare const migrationErrorMessage: ({ params }: IValidationError) => string;
|
|
3026
|
-
declare const formatCustomErrorMessage: (message?: string, error?: IValidationError, allErrors?: IValidationError[]) => string;
|
|
3027
|
-
declare const formatError: (error?: IValidationError, allErrors?: IValidationError[]) => IValidationError;
|
|
3028
|
-
declare const errorHasError: (error?: IValidationError) => boolean;
|
|
3029
|
-
declare const errorHasWarning: (error?: IValidationError) => boolean;
|
|
3030
|
-
declare const isMissingPropertyError: ({ params }: IValidationError) => boolean;
|
|
3031
|
-
declare const isMissingOneOfError: ({ keyword, schemaPath }: IValidationError) => boolean;
|
|
3032
|
-
declare const filterError: (error: IValidationError) => boolean;
|
|
3033
|
-
declare const missingNodeErrors: (errors: IValidationError[]) => IValidationError[];
|
|
3034
|
-
|
|
3035
3019
|
declare const ARRAY_DELIMITER = ";";
|
|
3036
3020
|
type suggestionType = NodeType | 'select' | 'default';
|
|
3037
3021
|
declare const defaultSuggestionType: suggestionType;
|
|
@@ -3174,7 +3158,7 @@ declare class FilesFormComponent {
|
|
|
3174
3158
|
fullKey: string;
|
|
3175
3159
|
key: string;
|
|
3176
3160
|
value: {};
|
|
3177
|
-
error: IValidationError;
|
|
3161
|
+
error: _hestia_earth_ui_components_file_errors.IValidationError;
|
|
3178
3162
|
errorGuidePageId: string;
|
|
3179
3163
|
hasError: boolean;
|
|
3180
3164
|
hasWarning: boolean;
|
|
@@ -3248,7 +3232,7 @@ declare class FilesFormEditableComponent {
|
|
|
3248
3232
|
fullKey: string;
|
|
3249
3233
|
key: string;
|
|
3250
3234
|
value: {};
|
|
3251
|
-
error: IValidationError;
|
|
3235
|
+
error: _hestia_earth_ui_components_file_errors.IValidationError;
|
|
3252
3236
|
errorGuidePageId: string;
|
|
3253
3237
|
hasError: boolean;
|
|
3254
3238
|
hasWarning: boolean;
|
|
@@ -5768,5 +5752,5 @@ declare class TermsUnitsDescriptionComponent {
|
|
|
5768
5752
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TermsUnitsDescriptionComponent, "he-terms-units-description", never, { "term": { "alias": "term"; "required": true; "isSignal": true; }; "iconTemplate": { "alias": "iconTemplate"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
5769
5753
|
}
|
|
5770
5754
|
|
|
5771
|
-
export { ARRAY_DELIMITER, ApplyPurePipe, BarChartComponent, BibliographiesSearchConfirmComponent, BlankNodeStateComponent, BlankNodeStateNoticeComponent, BlankNodeValueDeltaComponent, CapitalizePipe, ChartComponent, ChartConfigurationDirective, ChartExportButtonComponent, ChartTooltipComponent, ClickOutsideDirective, ClipboardComponent, CollapsibleBoxComponent, CollapsibleBoxStyle, ColorPalette, CompoundDirective, CompoundPipe, ContributionChartComponent, ControlValueAccessor, CycleNodesKeyGroup, CyclesCompletenessComponent, CyclesEmissionsCategoryService, CyclesEmissionsChartComponent, CyclesFunctionalUnitMeasureComponent, CyclesMetadataComponent, CyclesNodesComponent, CyclesNodesTimelineComponent, CyclesResultComponent, DataTableComponent, DefaultPipe, DeltaColour, DistributionChartComponent, DrawerContainerComponent, DurationPipe, EllipsisPipe, EngineModelsLinkComponent, EngineModelsLookupInfoComponent, EngineModelsStageComponent, EngineModelsStageDeepComponent, EngineModelsStageDeepService, EngineModelsVersionInfoComponent, EngineModelsVersionLinkComponent, EngineOrchestratorEditComponent, EngineRequirementsFormComponent, FileSizePipe, FileUploadErrorKeys, FilesErrorSummaryComponent, FilesFormComponent, FilesFormEditableComponent, FilesUploadErrorsComponent, FilterAccordionComponent, GUIDE_ENABLED, GetPipe, GlossaryMigrationFormat, GuideOverlayComponent, HESvgIconComponent, HE_API_BASE_URL, HE_CALCULATIONS_BASE_URL, HE_MAP_LOADED, HeAuthService, HeCommonService, HeEngineService, HeGlossaryService, HeMendeleyService, HeNodeCsvService, HeNodeService, HeNodeStoreService, HeSchemaService, HeSearchService, HeToastService, HorizontalBarChartComponent, HorizontalButtonsGroupComponent, ImpactAssessmentsGraphComponent, ImpactAssessmentsIndicatorBreakdownChartComponent, ImpactAssessmentsIndicatorsChartComponent, ImpactAssessmentsProductsComponent, IsArrayPipe, IsObjectPipe, IssueConfirmComponent, KeyToLabelPipe, Level, LineChartComponent, LinkKeyValueComponent, LogStatus, LongPressDirective, MAX_RESULTS, MapsDrawingComponent, MapsDrawingConfirmComponent, MaxPipe, MeanPipe, MedianPipe, MendeleySearchResult, MinPipe, MobileShellComponent, NavigationMenuComponent, NoExtPipe, NodeAggregatedComponent, NodeAggregatedInfoComponent, NodeAggregatedQualityScoreComponent, NodeCsvExportConfirmComponent, NodeCsvPreviewComponent, NodeCsvSelectHeadersComponent, NodeIconComponent, NodeJLogModelsComponent, NodeJsonldComponent, NodeJsonldSchemaComponent, NodeKeyState, NodeLinkComponent, NodeLogsFileComponent, NodeLogsModelsComponent, NodeLogsTimeComponent, NodeMissingLookupFactorsComponent, NodeQualityScore, NodeRecommendationsComponent, NodeSelectComponent, NodeValueDetailsComponent, PipelineStagesProgressComponent, PluralizePipe, PopoverComponent, PopoverConfirmComponent, PrecisionPipe, RelatedNodeResult, RemoveMarkdownPipe, RepeatPipe, Repository, ResizedDirective, ResizedEvent, ResponsiveService, SchemaInfoComponent, SchemaVersionLinkComponent, SearchExtendComponent, ShelfDialogComponent, ShellComponent, SiteNodesKeyGroup, SitesManagementChartComponent, SitesMapsComponent, SitesNodesComponent, SkeletonTextComponent, SocialTagsComponent, SortByPipe, SortSelectComponent, SumPipe, TagsInputDirective, Template, TermsPropertyContentComponent, TermsSubClassOfContentComponent, TermsUnitsDescriptionComponent, ThousandSuffixesPipe, ThousandsPipe, TimesPipe, ToastComponent, UncapitalizePipe, addPolygonToFeature, afterBarDrawPlugin, allCountriesQuery, allGroups, allOptions, availableProperties, axisHoverPlugin, backgroundHoverPlugin, baseApiUrl, baseUrl, bottom, buildSummary, bytesSize, calculateCycleDuration, calculateCycleDurationEnabled, calculateCycleStartDate, calculateCycleStartDateEnabled, capitalize, changelogUrl, clustererImage, code, colorToRgba, compoundToHtml, computeKeys, computeTerms, contactUsEmail, contactUsLink, convertToSvg, coordinatesToPoint, copyObject, countGroupVisibleNodes, countriesQuery, createMarker, cropsQuery, d3ellipse, d3wrap, dataPathLabel, dataPathToKey, dataVersionHeader, dataVersionHeaderKey, defaultFeature, defaultLabel, defaultSuggestionType, defaultSvgIconSize, defaultTicksFont, definitionToSchemaType, distinctUntilChangedDeep, downloadFile, downloadPng, downloadSvg, ellipsis, engineGitBaseUrl, engineGitUrl,
|
|
5772
|
-
export type { AfterBarDrawSettings, AxisHoverSettings, BarChartDataItem, ButtonGroupItem, ChartExportMetadata, ContributionChartDataItem, ContributionTooltipData, FilterData, FilterElement, FilterFn, FilterGroup, FilterOption, FilterState, HistogramChartDataItem, IBlankNodeLog, IBlankNodeLogSubValue, ICalculationsModel, ICalculationsModelsParams, ICalculationsRequirementsParams, IChartExportFormat, ICloseMessage, IConfigModel, ICustomValidationRules, ICycleJSONLDExtended, IEmissionCategory, IErrorProperty, IFeature, IFeatureCollection, IFileUploadError, IGeometryCollection, IGlossaryMigration, IGlossaryMigrations, IGroupedKeys, IGroupedNode, IGroupedNodes, IGroupedNodesValue, IGroupedNodesValues, IIdentityScalar, IIdentitySegment, IImpactAssessmentJSONLDExtended, IIssueParams, IJLogBlankNode, IJLogModelColumn, IJLogModelRun, IJLogTermGroup, IJSONData, IJSONNode, ILine, ILog, IMarker, IMessage, IMobileShellMenuButton, INavigationMenuLink, INewProperty, INodeContributions, INodeErrorLog, INodeHeaders, INodeLogs, INodeMissingLookupLog, INodeProperty, INodeRequestParams, INodeTermLog, INodeTermLogs, INonBlankNodeLog, IPolygonMap, IRelatedNode, ISearchParams, ISearchResultExtended, ISearchResults, IShellMenuButton, ISiteJSONLDExtended, IStoredNode, ISummary, ISummaryError, IToast, IValidationError,
|
|
5755
|
+
export { ARRAY_DELIMITER, ApplyPurePipe, BarChartComponent, BibliographiesSearchConfirmComponent, BlankNodeStateComponent, BlankNodeStateNoticeComponent, BlankNodeValueDeltaComponent, CapitalizePipe, ChartComponent, ChartConfigurationDirective, ChartExportButtonComponent, ChartTooltipComponent, ClickOutsideDirective, ClipboardComponent, CollapsibleBoxComponent, CollapsibleBoxStyle, ColorPalette, CompoundDirective, CompoundPipe, ContributionChartComponent, ControlValueAccessor, CycleNodesKeyGroup, CyclesCompletenessComponent, CyclesEmissionsCategoryService, CyclesEmissionsChartComponent, CyclesFunctionalUnitMeasureComponent, CyclesMetadataComponent, CyclesNodesComponent, CyclesNodesTimelineComponent, CyclesResultComponent, DataTableComponent, DefaultPipe, DeltaColour, DistributionChartComponent, DrawerContainerComponent, DurationPipe, EllipsisPipe, EngineModelsLinkComponent, EngineModelsLookupInfoComponent, EngineModelsStageComponent, EngineModelsStageDeepComponent, EngineModelsStageDeepService, EngineModelsVersionInfoComponent, EngineModelsVersionLinkComponent, EngineOrchestratorEditComponent, EngineRequirementsFormComponent, FileSizePipe, FileUploadErrorKeys, FilesErrorSummaryComponent, FilesFormComponent, FilesFormEditableComponent, FilesUploadErrorsComponent, FilterAccordionComponent, GUIDE_ENABLED, GetPipe, GlossaryMigrationFormat, GuideOverlayComponent, HESvgIconComponent, HE_API_BASE_URL, HE_CALCULATIONS_BASE_URL, HE_MAP_LOADED, HeAuthService, HeCommonService, HeEngineService, HeGlossaryService, HeMendeleyService, HeNodeCsvService, HeNodeService, HeNodeStoreService, HeSchemaService, HeSearchService, HeToastService, HorizontalBarChartComponent, HorizontalButtonsGroupComponent, ImpactAssessmentsGraphComponent, ImpactAssessmentsIndicatorBreakdownChartComponent, ImpactAssessmentsIndicatorsChartComponent, ImpactAssessmentsProductsComponent, IsArrayPipe, IsObjectPipe, IssueConfirmComponent, KeyToLabelPipe, Level, LineChartComponent, LinkKeyValueComponent, LogStatus, LongPressDirective, MAX_RESULTS, MapsDrawingComponent, MapsDrawingConfirmComponent, MaxPipe, MeanPipe, MedianPipe, MendeleySearchResult, MinPipe, MobileShellComponent, NavigationMenuComponent, NoExtPipe, NodeAggregatedComponent, NodeAggregatedInfoComponent, NodeAggregatedQualityScoreComponent, NodeCsvExportConfirmComponent, NodeCsvPreviewComponent, NodeCsvSelectHeadersComponent, NodeIconComponent, NodeJLogModelsComponent, NodeJsonldComponent, NodeJsonldSchemaComponent, NodeKeyState, NodeLinkComponent, NodeLogsFileComponent, NodeLogsModelsComponent, NodeLogsTimeComponent, NodeMissingLookupFactorsComponent, NodeQualityScore, NodeRecommendationsComponent, NodeSelectComponent, NodeValueDetailsComponent, PipelineStagesProgressComponent, PluralizePipe, PopoverComponent, PopoverConfirmComponent, PrecisionPipe, RelatedNodeResult, RemoveMarkdownPipe, RepeatPipe, Repository, ResizedDirective, ResizedEvent, ResponsiveService, SchemaInfoComponent, SchemaVersionLinkComponent, SearchExtendComponent, ShelfDialogComponent, ShellComponent, SiteNodesKeyGroup, SitesManagementChartComponent, SitesMapsComponent, SitesNodesComponent, SkeletonTextComponent, SocialTagsComponent, SortByPipe, SortSelectComponent, SumPipe, TagsInputDirective, Template, TermsPropertyContentComponent, TermsSubClassOfContentComponent, TermsUnitsDescriptionComponent, ThousandSuffixesPipe, ThousandsPipe, TimesPipe, ToastComponent, UncapitalizePipe, addPolygonToFeature, afterBarDrawPlugin, allCountriesQuery, allGroups, allOptions, availableProperties, axisHoverPlugin, backgroundHoverPlugin, baseApiUrl, baseUrl, bottom, buildSummary, bytesSize, calculateCycleDuration, calculateCycleDurationEnabled, calculateCycleStartDate, calculateCycleStartDateEnabled, capitalize, changelogUrl, clustererImage, code, colorToRgba, compoundToHtml, computeKeys, computeTerms, contactUsEmail, contactUsLink, convertToSvg, coordinatesToPoint, copyObject, countGroupVisibleNodes, countriesQuery, createMarker, cropsQuery, d3ellipse, d3wrap, dataPathLabel, dataPathToKey, dataVersionHeader, dataVersionHeaderKey, defaultFeature, defaultLabel, defaultSuggestionType, defaultSvgIconSize, defaultTicksFont, definitionToSchemaType, distinctUntilChangedDeep, downloadFile, downloadPng, downloadSvg, ellipsis, engineGitBaseUrl, engineGitUrl, errorText, evaluateSuccess, exportAsSVG, exportFormats, externalLink, externalNodeLink, fillColor, fillStyle, filterBlankNode, filterParams, findConfigModels, findMatchingModel, findModels, findNodeModel, findOrchestratorModel, findProperty, findPropertyById, flatFilterData, flatFilterNode, formatCustomErrorMessage, formatDate, formatError, formatPropertyError, formatter, getColor, getDatesBetween, gitBranch, gitHome, gitlabRawUrl, glossaryBaseUrl, glossaryLink, groupChanged, groupJLogByField, groupJLogByTerm, groupLogsByTerm, groupNodesByTerm, groupdLogsByKey, grouppedKeys, grouppedValueKeys, groupsLogsByFields, guideModelUrl, guideNamespace, handleAPIError, handleGuideEvent, hasError, hasValidationError, hasWarning, hexToRgba, iconSizes, icons, ignoreKeys, increaseScaleLimits, initialFilterState, injectResizeEvent$, inputGroupsTermTypes, isAddPropertyEnabled, isChrome, isDateBetween, isEqual, isExternal, isKeyClosedVisible, isKeyHidden, isMaxStage, isMethodModelAllowed, isNonNodeModelKey, isSchemaIri, isScrolledBelow, isState, isTermTypeAllowed, isValidKey, jLogModelCount, keyToDataPath, levels, listColor, listColorContinuous, listColorWithAlpha, loadMapApi, loadSvgSprite, locationQuery, logToCsv, logValueArray, logsKey, lollipopChartPlugin, lookupUrl, mapFilterData, mapsUrl, markerIcon, markerPie, matchAggregatedQuery, matchAggregatedValidatedQuery, matchBoolPrefixQuery, matchCountry, matchExactQuery, matchGlobalRegion, matchId, matchNameNormalized, matchNestedKey, matchPhrasePrefixQuery, matchPhraseQuery, matchPrimaryProductQuery, matchQuery, matchRegex, matchRegion, matchTermType, matchType, maxAreaSize, measurementValue, mergeDataWithHeaders, methodTierOrder, migrationErrorMessage, migrationsUrl, modelCount, modelKeyParams, modelParams, models, multiMatchQuery, nestedProperty, nestingEnabled, nestingTypeEnabled, noValue, nodeAvailableProperties, nodeById, nodeColours, nodeDataState, nodeDataStates, nodeId, nodeIds, nodeLink, nodeLinkEnabled, nodeLinkTypeEnabled, nodeLogsUrl, nodeQualityScoreColor, nodeQualityScoreLevel, nodeQualityScoreMaxDefault, nodeQualityScoreOrder, nodeSecondaryColours, nodeToAggregationFilename, nodeType, nodeTypeDataState, nodeTypeIcon, nodeTypeIconSchema, nodeUrl, nodeUrlParams, nodeVersion, nodesByState, nodesByType, numberGte, optionsFromGroup, parentKey, parentProperty, parseColor, parseData, parseDataPath, parseLines, parseMessage, parseNewValue, pluralize, pointToCoordinates, polygonBounds, polygonToCoordinates, polygonToMap, polygonsFromFeature, populateWithTrackIdsFilterData, postGuideEvent, primaryProduct, productsQuery, propertyError, propertyId, recursiveProperties, refToSchemaType, refreshPropertyKeys, regionsQuery, registerChart, repeat, reportIssueLink, reportIssueUrl, safeJSONParse, safeJSONStringify, schemaBaseUrl, schemaDataBaseUrl, schemaLink, schemaRequiredProperties, schemaTypeToDefaultValue, scrollToEl, scrollTop, searchFilterData, searchableTypes, siblingProperty, simplifyContributions, singleProperty, siteTooBig, siteTypeToColor, siteTypeToIcon, sortProperties, sortedDates, strokeColor, strokeStyle, subValueKeys, suggestMatchQuery, suggestQuery, takeAfterViewInit, termLocation, termLocationName, termProperties, termTypeLabel, toSnakeCase, toThousands, typeToNewProperty, typeaheadFocus, uncapitalize, uniqueDatesBetween, updateProperties, valueLink, valueToString, valueTypeToDefault, valueValue, waitFor, wildcardQuery };
|
|
5756
|
+
export type { AfterBarDrawSettings, AxisHoverSettings, BarChartDataItem, ButtonGroupItem, ChartExportMetadata, ContributionChartDataItem, ContributionTooltipData, FilterData, FilterElement, FilterFn, FilterGroup, FilterOption, FilterState, HistogramChartDataItem, IBlankNodeLog, IBlankNodeLogSubValue, ICalculationsModel, ICalculationsModelsParams, ICalculationsRequirementsParams, IChartExportFormat, ICloseMessage, IConfigModel, ICustomValidationRules, ICycleJSONLDExtended, IEmissionCategory, IErrorProperty, IFeature, IFeatureCollection, IFileUploadError, IGeometryCollection, IGlossaryMigration, IGlossaryMigrations, IGroupedKeys, IGroupedNode, IGroupedNodes, IGroupedNodesValue, IGroupedNodesValues, IIdentityScalar, IIdentitySegment, IImpactAssessmentJSONLDExtended, IIssueParams, IJLogBlankNode, IJLogModelColumn, IJLogModelRun, IJLogTermGroup, IJSONData, IJSONNode, ILine, ILog, IMarker, IMessage, IMobileShellMenuButton, INavigationMenuLink, INewProperty, INodeContributions, INodeErrorLog, INodeHeaders, INodeLogs, INodeMissingLookupLog, INodeProperty, INodeRequestParams, INodeTermLog, INodeTermLogs, INonBlankNodeLog, IPolygonMap, IRelatedNode, ISearchParams, ISearchResultExtended, ISearchResults, IShellMenuButton, ISiteJSONLDExtended, IStoredNode, ISummary, ISummaryError, IToast, IValidationError, LollipopPluginSettings, RgbColor, SelectValue, SortOption, SortSelectEvent, SortSelectOrder, blankNodesTypeValue, chartExportFn, chartTooltipContentFn, contributions, feature, horizontalTooltipData, modelKey, nodeContributionsSimplified, nodes, nonBlankNodesTypeValue, searchResult, searchableType, sortOrders, suggestionType, svgIconNames, svgIconSizes, validationErrorKeyword, validationErrorLevel, validationErrorParam };
|