@openframe-org/criteria-set-protocol 1.0.12 → 1.0.13
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/dist/v1/types/criteria.d.ts +14 -26
- package/package.json +1 -1
|
@@ -10,56 +10,43 @@ export type PdfDocumentationItem = {
|
|
|
10
10
|
type: 'pdf';
|
|
11
11
|
label: string;
|
|
12
12
|
url: string;
|
|
13
|
+
text: string;
|
|
13
14
|
};
|
|
14
15
|
export type InlineDocumentationItem = {
|
|
15
16
|
type: 'text';
|
|
16
|
-
label
|
|
17
|
+
label: string;
|
|
17
18
|
text: string;
|
|
18
19
|
};
|
|
19
20
|
export type LinkDocumentationItem = {
|
|
20
21
|
type: 'link';
|
|
21
22
|
label: string;
|
|
22
23
|
url: string;
|
|
24
|
+
text: string;
|
|
23
25
|
};
|
|
24
26
|
export type DocumentationItem = PdfDocumentationItem | InlineDocumentationItem | LinkDocumentationItem;
|
|
25
27
|
export type CriteriaTree = Criterion[];
|
|
26
|
-
|
|
27
|
-
type:
|
|
28
|
-
id
|
|
29
|
-
quality: string;
|
|
28
|
+
type BaseElement<Type extends CriteriaTreeElementType> = {
|
|
29
|
+
type: Type;
|
|
30
|
+
id: string;
|
|
30
31
|
title: string;
|
|
31
32
|
label?: string;
|
|
32
33
|
tags?: string[];
|
|
33
|
-
items: (Task | TaskGroup)[];
|
|
34
34
|
documentation?: DocumentationItem[];
|
|
35
35
|
};
|
|
36
|
-
export type
|
|
37
|
-
|
|
38
|
-
id?: string;
|
|
39
|
-
title: string;
|
|
40
|
-
label?: string;
|
|
41
|
-
tags?: string[];
|
|
36
|
+
export type Criterion = BaseElement<'criterion'> & {
|
|
37
|
+
quality: string;
|
|
42
38
|
items: (Task | TaskGroup)[];
|
|
43
|
-
documentation?: DocumentationItem[];
|
|
44
39
|
};
|
|
45
|
-
export type
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
label?: string;
|
|
40
|
+
export type TaskGroup = BaseElement<'task-group'> & {
|
|
41
|
+
items: (Task | TaskGroup)[];
|
|
42
|
+
};
|
|
43
|
+
export type Task = BaseElement<'task'> & {
|
|
50
44
|
description?: string;
|
|
51
|
-
tags?: string[];
|
|
52
45
|
items: TaskItem[];
|
|
53
|
-
documentation?: DocumentationItem[];
|
|
54
46
|
};
|
|
55
|
-
export type TaskItem = {
|
|
56
|
-
type: 'task-item';
|
|
57
|
-
id: string;
|
|
47
|
+
export type TaskItem = Omit<BaseElement<'task-item'>, 'title'> & {
|
|
58
48
|
description?: string;
|
|
59
|
-
label?: string;
|
|
60
|
-
tags?: string[];
|
|
61
49
|
definition: SelectSingleType | SelectMultipleType | NumberType | BooleanType;
|
|
62
|
-
documentation?: DocumentationItem[];
|
|
63
50
|
providedData?: Record<string, TaskItemValue>;
|
|
64
51
|
calculatedData?: Record<string, any>;
|
|
65
52
|
};
|
|
@@ -89,3 +76,4 @@ export type PointOption = {
|
|
|
89
76
|
export type TaskItemValue = string | number | boolean | null | Array<string | number | boolean | null>;
|
|
90
77
|
export type CriteriaTreeElement = Criterion | TaskGroup | Task | TaskItem;
|
|
91
78
|
export type CriteriaTreeElementType = 'criterion' | 'task-group' | 'task' | 'task-item';
|
|
79
|
+
export {};
|
package/package.json
CHANGED