diff --git a/Projects/Foundations/UI/Function-Libraries/ChartingSpaceFunctions.js b/Projects/Foundations/UI/Function-Libraries/ChartingSpaceFunctions.js index bbd74b0a3..c6c5808c9 100644 --- a/Projects/Foundations/UI/Function-Libraries/ChartingSpaceFunctions.js +++ b/Projects/Foundations/UI/Function-Libraries/ChartingSpaceFunctions.js @@ -340,6 +340,8 @@ function newFoundationsFunctionLibraryChartingSpaceFunctions() { let projectDefinition = PROJECTS_SCHEMA[k] let project = projectDefinition.name + if (projectDefinition.products === undefined) { continue } + for (let j = 0; j < rootNodes.length; j++) { let rootNode = rootNodes[j] if (rootNode.type === project + ' Project') { diff --git a/Projects/Foundations/UI/Function-Libraries/DataStorageFunctions.js b/Projects/Foundations/UI/Function-Libraries/DataStorageFunctions.js index b2e6a086f..7bf27bfe0 100644 --- a/Projects/Foundations/UI/Function-Libraries/DataStorageFunctions.js +++ b/Projects/Foundations/UI/Function-Libraries/DataStorageFunctions.js @@ -233,6 +233,9 @@ function newFoundationsFunctionLibraryDataStorageFunctions() { let projectDefinition = PROJECTS_SCHEMA[k] let project = projectDefinition.name + if (projectDefinition.products === undefined) { continue } + if (projectDefinition.products.includes(newNodeType.replace('Project ', '')) === false) { continue } + for (let j = 0; j < rootNodes.length; j++) { let rootNode = rootNodes[j] if (rootNode.type === project + ' Project') { diff --git a/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js b/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js index 60c293b6a..30c48db0e 100644 --- a/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js +++ b/Projects/Foundations/UI/Function-Libraries/ReferenceAttachDetach.js @@ -20,6 +20,7 @@ function newFoundationsFunctionLibraryReferenceAttachDetach() { // Store the path to the reference parent to make restoring it possible if the reference parent is updated and given a new id function storeAttachNodePath(node, attachToNode) { + if (node === undefined) { return } if (node.payload === undefined) { return } let attachNodePath = UI.projects.foundations.utilities.hierarchy.getNodeNameTypePath(attachToNode) // Remove unused node id, and project tag from stored path @@ -33,11 +34,12 @@ function newFoundationsFunctionLibraryReferenceAttachDetach() { // Clear the path to reference parent when the reference is cleared function cleanAttachNodePath(node) { - if (node.payload !== undefined) { - node.payload.referenceParentCombinedNodePath = undefined - if (node.savedPayload !== undefined) { - node.savedPayload.referenceParentCombinedNodePath = undefined - } + if (node === undefined) { return } + if (node.payload === undefined) { return } + + node.payload.referenceParentCombinedNodePath = undefined + if (node.savedPayload !== undefined) { + node.savedPayload.referenceParentCombinedNodePath = undefined } } diff --git a/Projects/Foundations/UI/Function-Libraries/UiObjectsFromNodes.js b/Projects/Foundations/UI/Function-Libraries/UiObjectsFromNodes.js index 0bb771897..58a534bbd 100644 --- a/Projects/Foundations/UI/Function-Libraries/UiObjectsFromNodes.js +++ b/Projects/Foundations/UI/Function-Libraries/UiObjectsFromNodes.js @@ -601,7 +601,7 @@ function newFoundationsFunctionLibraryUiObjectsFromNodes() { let schemaDocument = getSchemaDocument(object, project) if (schemaDocument === undefined) { - console.log('Cannot addUIOBject of ' + type + ' because that type it is not defined at the APP_SCHEMA.') + console.log('Cannot addUIOBject of type "' + type + '" and project "' + project + '" because that type it is not defined at the APP_SCHEMA.') return } @@ -629,7 +629,7 @@ function newFoundationsFunctionLibraryUiObjectsFromNodes() { parentSchemaDocument = getSchemaDocument(parentNode, parentNode.project) if (parentSchemaDocument === undefined) { - console.log('Cannot addUIOBject from parent of ' + type + ' because that type it is not defined at the APP_SCHEMA.') + console.log('Cannot addUIOBject from parent of type "' + type + '" and project "' + parentNode.project + '" because that type it is not defined at the APP_SCHEMA.') return } checkChainToSelfTypeCollection() diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index ae089280b..a8544b17a 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -839,6 +839,11 @@ "plugins": [ "Tutorials", "API Maps" + ], + "products": [ + "Data Products", + "Trading Products", + "Learning Products" ] }, {