@openframe-org/criteria-set-protocol 2.6.3 → 2.6.4
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/utils.d.ts +1 -1
- package/dist/v1/utils.js +3 -3
- package/package.json +1 -1
package/dist/v1/utils.d.ts
CHANGED
|
@@ -59,5 +59,5 @@ export declare const getCertificationsByValue: (certificationDefinitions: Certif
|
|
|
59
59
|
* - If it is a different type, throw an error
|
|
60
60
|
* In all cases, the data should contain 'text' and 'readOnly' properties
|
|
61
61
|
*/
|
|
62
|
-
export declare const
|
|
62
|
+
export declare const validateData: (dataOrTreeElement: CriteriaTreeElement | TaskItemData | ElementData | TreeResult) => void;
|
|
63
63
|
export {};
|
package/dist/v1/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.validateData = exports.getCertificationsByValue = exports.isNil = 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
4
|
const isTheme = (element) => element.type === "theme";
|
|
5
5
|
exports.isTheme = isTheme;
|
|
6
6
|
const isCriterion = (element) => element.type === "criterion";
|
|
@@ -100,7 +100,7 @@ exports.getCertificationsByValue = getCertificationsByValue;
|
|
|
100
100
|
* - If it is a different type, throw an error
|
|
101
101
|
* In all cases, the data should contain 'text' and 'readOnly' properties
|
|
102
102
|
*/
|
|
103
|
-
const
|
|
103
|
+
const validateData = (dataOrTreeElement) => {
|
|
104
104
|
if (("type" in dataOrTreeElement) && dataOrTreeElement.type === "task-item" && !("readOnly" in dataOrTreeElement)) {
|
|
105
105
|
throw new Error("Data is missing 'readOnly' property");
|
|
106
106
|
}
|
|
@@ -140,4 +140,4 @@ const validateElementData = (dataOrTreeElement) => {
|
|
|
140
140
|
throw new Error(`Data has an invalid 'type' property: ${data.type}`);
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
|
-
exports.
|
|
143
|
+
exports.validateData = validateData;
|
package/package.json
CHANGED