@openframe-org/criteria-set-protocol 2.5.0 → 3.0.0-alpha.10
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/schemas/certification.d.ts +86 -44
- package/dist/v1/schemas/certification.js +29 -9
- package/dist/v1/schemas/common.d.ts +66 -51
- package/dist/v1/schemas/common.js +38 -35
- package/dist/v1/schemas/criteria-tree.d.ts +12413 -624
- package/dist/v1/schemas/criteria-tree.js +1 -1
- package/dist/v1/schemas/criterion.d.ts +2083 -116
- package/dist/v1/schemas/criterion.js +1 -1
- package/dist/v1/schemas/data-map.d.ts +3982 -75
- package/dist/v1/schemas/data-map.js +1 -1
- package/dist/v1/schemas/metadata.d.ts +6 -10
- package/dist/v1/schemas/metadata.js +4 -15
- package/dist/v1/schemas/request/matrix-request-body-schema.d.ts +5 -5
- package/dist/v1/schemas/request/matrix-request-body-schema.js +5 -5
- package/dist/v1/schemas/request/tree-and-data-request-body-schema.d.ts +4 -4
- package/dist/v1/schemas/request/tree-and-data-request-body-schema.js +4 -4
- package/dist/v1/schemas/response.d.ts +4 -7
- package/dist/v1/schemas/task-group.d.ts +2050 -90
- package/dist/v1/schemas/task-group.js +2 -2
- package/dist/v1/schemas/task-item.d.ts +4016 -124
- package/dist/v1/schemas/task-item.js +33 -35
- package/dist/v1/schemas/task.d.ts +2025 -72
- package/dist/v1/schemas/task.js +2 -2
- package/dist/v1/schemas/theme.d.ts +2113 -139
- package/dist/v1/schemas/theme.js +2 -2
- package/dist/v1/utils.js +4 -7
- package/package.json +1 -1
package/dist/v1/schemas/theme.js
CHANGED
|
@@ -14,7 +14,7 @@ exports.themeOptionsSchema = zod_1.z
|
|
|
14
14
|
.object({
|
|
15
15
|
hideCodeInReport: zod_1.z
|
|
16
16
|
.boolean()
|
|
17
|
-
.
|
|
17
|
+
.nullable()
|
|
18
18
|
.default(false)
|
|
19
19
|
.describe("Whether to hide the theme code in the generated PDF report"),
|
|
20
20
|
})
|
|
@@ -26,7 +26,7 @@ exports.themeSchema = common_1.abstractElementSchema
|
|
|
26
26
|
.extend({
|
|
27
27
|
type: zod_1.z.literal("theme").describe("Identifies the schema type as a theme"),
|
|
28
28
|
style: exports.themeStyleSchema
|
|
29
|
-
.
|
|
29
|
+
.nullable()
|
|
30
30
|
.describe("Visual styling configuration for the theme"),
|
|
31
31
|
items: zod_1.z.array(criterion_1.criterionSchema).describe("The criteria in this theme"),
|
|
32
32
|
options: exports.themeOptionsSchema.describe("Configuration options for the theme display and behavior"),
|
package/dist/v1/utils.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCertificationsByValue = exports.applyReportTitleTextFormatFormattingPlaceholders = exports.applyCriteriaTreeElementTextFormatFormattingPlaceholders = exports.applyDocumentTreeFolderTextFormattingPlaceholders = exports.applyBreadcrumbTextFormattingPlaceholders = exports.findInTree = exports.toColorHexString = exports.isTaskItem = exports.isTask = exports.isTaskGroup = exports.isCriterion = exports.isTheme = void 0;
|
|
4
|
+
const isNil = (value) => value === null || value === undefined;
|
|
4
5
|
const isTheme = (element) => element.type === "theme";
|
|
5
6
|
exports.isTheme = isTheme;
|
|
6
7
|
const isCriterion = (element) => element.type === "criterion";
|
|
@@ -78,14 +79,10 @@ const getCertificationsByValue = (certificationDefinitions, value) => {
|
|
|
78
79
|
return undefined;
|
|
79
80
|
}
|
|
80
81
|
return certificationDefinitions.filter((definition) => {
|
|
81
|
-
return ((definition.rules.minimum
|
|
82
|
+
return ((isNil(definition.rules.minimum) ||
|
|
82
83
|
value > definition.rules.minimum) &&
|
|
83
|
-
(definition.rules.
|
|
84
|
-
value
|
|
85
|
-
(definition.rules.maximum === undefined ||
|
|
86
|
-
value < definition.rules.maximum) &&
|
|
87
|
-
(definition.rules.exclusiveMaximum === undefined ||
|
|
88
|
-
value <= definition.rules.exclusiveMaximum));
|
|
84
|
+
(isNil(definition.rules.maximum) ||
|
|
85
|
+
value < definition.rules.maximum));
|
|
89
86
|
});
|
|
90
87
|
};
|
|
91
88
|
exports.getCertificationsByValue = getCertificationsByValue;
|
package/package.json
CHANGED