@openframe-org/criteria-set-protocol 1.0.50 → 1.0.52
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/index.d.ts
CHANGED
package/dist/v1/index.js
CHANGED
|
@@ -7,6 +7,11 @@ export type QualityStyle = {
|
|
|
7
7
|
primaryColor: Color;
|
|
8
8
|
secondaryColor: Color;
|
|
9
9
|
};
|
|
10
|
+
export type SchemaDefinition = Record<string, any>;
|
|
11
|
+
export type SchemaDefinitions = {
|
|
12
|
+
parameters?: SchemaDefinition;
|
|
13
|
+
result?: SchemaDefinition;
|
|
14
|
+
};
|
|
10
15
|
export type Metadata = {
|
|
11
16
|
id: string;
|
|
12
17
|
version: string;
|
|
@@ -16,8 +21,7 @@ export type Metadata = {
|
|
|
16
21
|
documentation?: string;
|
|
17
22
|
locales?: string[];
|
|
18
23
|
defaultLocale?: string;
|
|
19
|
-
|
|
20
|
-
result?: Record<string, any>;
|
|
24
|
+
schemas?: SchemaDefinitions;
|
|
21
25
|
};
|
|
22
26
|
export type PdfDocumentationItem = {
|
|
23
27
|
type: 'pdf';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toColorHexString = void 0;
|
|
4
|
+
const toColorHexString = (color) => {
|
|
5
|
+
if (typeof color === 'string') {
|
|
6
|
+
return color;
|
|
7
|
+
}
|
|
8
|
+
return `#${color.red.toString(16)}${color.green.toString(16)}${color.blue.toString(16)}`;
|
|
9
|
+
};
|
|
10
|
+
exports.toColorHexString = toColorHexString;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CriteriaTreeElement, Quality, Criterion, Task, TaskGroup, TaskItem } from '../types';
|
|
2
|
+
export declare const isQuality: (element: CriteriaTreeElement) => element is Quality;
|
|
3
|
+
export declare const isCriterion: (element: CriteriaTreeElement) => element is Criterion;
|
|
4
|
+
export declare const isTaskGroup: (element: CriteriaTreeElement) => element is TaskGroup;
|
|
5
|
+
export declare const isTask: (element: CriteriaTreeElement) => element is Task;
|
|
6
|
+
export declare const isTaskItem: (element: CriteriaTreeElement) => element is TaskItem;
|
|
7
|
+
export * from './color';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.isTaskItem = exports.isTask = exports.isTaskGroup = exports.isCriterion = exports.isQuality = void 0;
|
|
18
|
+
const isQuality = (element) => element.type === 'quality';
|
|
19
|
+
exports.isQuality = isQuality;
|
|
20
|
+
const isCriterion = (element) => element.type === 'criterion';
|
|
21
|
+
exports.isCriterion = isCriterion;
|
|
22
|
+
const isTaskGroup = (element) => element.type === 'task-group';
|
|
23
|
+
exports.isTaskGroup = isTaskGroup;
|
|
24
|
+
const isTask = (element) => element.type === 'task';
|
|
25
|
+
exports.isTask = isTask;
|
|
26
|
+
const isTaskItem = (element) => element.type === 'task-item';
|
|
27
|
+
exports.isTaskItem = isTaskItem;
|
|
28
|
+
__exportStar(require("./color"), exports);
|
package/package.json
CHANGED