@openframe-org/criteria-set-protocol 1.3.3 → 1.3.5
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 +1 -3
- package/dist/v1/utils.d.ts +7 -2
- package/dist/v1/utils.js +3 -1
- package/package.json +1 -1
|
@@ -55,9 +55,7 @@ type BaseElement<Type extends CriteriaTreeElementType> = {
|
|
|
55
55
|
data?: Record<string, any>;
|
|
56
56
|
sortOrder?: number;
|
|
57
57
|
};
|
|
58
|
-
export type Quality =
|
|
59
|
-
code: string;
|
|
60
|
-
title?: string;
|
|
58
|
+
export type Quality = BaseElement<'quality'> & {
|
|
61
59
|
style?: QualityStyle;
|
|
62
60
|
items: Criterion[];
|
|
63
61
|
};
|
package/dist/v1/utils.d.ts
CHANGED
|
@@ -5,5 +5,10 @@ export declare const isTaskGroup: (element: CriteriaTreeElement) => element is T
|
|
|
5
5
|
export declare const isTask: (element: CriteriaTreeElement) => element is Task;
|
|
6
6
|
export declare const isTaskItem: (element: CriteriaTreeElement) => element is TaskItem;
|
|
7
7
|
export declare const toColorHexString: (color: Color) => string;
|
|
8
|
-
export declare const shouldHideCode: (element: Quality | Criterion | TaskGroup | Task
|
|
9
|
-
|
|
8
|
+
export declare const shouldHideCode: (element: Quality | Criterion | TaskGroup | Task | {
|
|
9
|
+
code: string;
|
|
10
|
+
} | string) => boolean;
|
|
11
|
+
export declare const getQualifiedName: (element: Quality | Criterion | TaskGroup | Task | {
|
|
12
|
+
code: string;
|
|
13
|
+
title: string;
|
|
14
|
+
}) => string;
|
package/dist/v1/utils.js
CHANGED
|
@@ -18,7 +18,9 @@ const toColorHexString = (color) => {
|
|
|
18
18
|
return `#${color.red.toString(16)}${color.green.toString(16)}${color.blue.toString(16)}`;
|
|
19
19
|
};
|
|
20
20
|
exports.toColorHexString = toColorHexString;
|
|
21
|
-
const shouldHideCode = (element) =>
|
|
21
|
+
const shouldHideCode = (element) => {
|
|
22
|
+
return (typeof element === 'string' ? element : element.code).startsWith('_');
|
|
23
|
+
};
|
|
22
24
|
exports.shouldHideCode = shouldHideCode;
|
|
23
25
|
const getQualifiedName = (element) => {
|
|
24
26
|
const code = element.code.startsWith('_') ? element.code.substring(1) : element.code;
|
package/package.json
CHANGED