Merge pull request #1055 from Luis-Fernando-Molina/next-version

Contribution: App Schemas Added
This commit is contained in:
Luis Fernando Molina authored and GitHub committed 2021-06-01 20:53:07 -04:00
commit 018718e340
9 files changed
+276 -1

No files matched your search

@@ -0,0 +1,60 @@
{
"type": "Civic Contributions",
"menuItems": [
{
"action": "Configure",
"actionFunction": "uiObject.configEditor.activate",
"label": "Configure",
"iconPathOn": "configuration",
"iconPathOff": "configuration"
},
{
"action": "Add UI Object",
"actionFunction": "payload.executeAction",
"label": "Add Civic Contributions",
"relatedUiObject": "Civic Contributions"
},
{
"action": "Add UI Object",
"actionFunction": "payload.executeAction",
"label": "Add Contributed Vote",
"relatedUiObject": "Contributed Vote"
},
{
"action": "Delete UI Object",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"editors": {
"config": true
},
"initialValues": {
"config": "{\n \"description\": \"\"\n}"
},
"addLeftIcons": true,
"level": 2,
"attachingRules": {
"compatibleTypes": "->User Contributions->Civic Contributions->"
},
"propertyNameAtParent": "civicContributions",
"childrenNodesProperties": [
{
"name": "civicContributions",
"type": "array",
"childType": "Civic Contributions",
"autoAdd": false
},
{
"name": "contributedVotes",
"type": "array",
"childType": "Contributed Vote",
"autoAdd": false
}
],
"icon": "bitcoin"
}
@@ -14,6 +14,12 @@
"label": "Add Community Contributions",
"relatedUiObject": "Community Contributions"
},
{
"action": "Add UI Object",
"actionFunction": "payload.executeAction",
"label": "Add Contributed Asset",
"relatedUiObject": "Contributed Asset"
},
{
"action": "Delete UI Object",
"askConfirmation": true,
@@ -42,6 +48,12 @@
"type": "array",
"childType": "Community Contributions",
"autoAdd": false
},
{
"name": "contributedAssets",
"type": "array",
"childType": "Contributed Asset",
"autoAdd": false
}
],
"icon": "bitcoin"
@@ -0,0 +1,40 @@
{
"type": "Contributed Time",
"menuItems": [
{
"action": "Configure",
"actionFunction": "uiObject.configEditor.activate",
"label": "Configure",
"iconPathOn": "configuration",
"iconPathOff": "configuration"
},
{
"action": "Delete UI Object",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"title": [
"Use Reference Parent"
],
"editors": {
"config": true
},
"initialValues": {
"config": "{\n \"description\": \"\"\n}"
},
"addLeftIcons": true,
"level": 2,
"attachingRules": {
"compatibleTypes": "->Governance Contributions->"
},
"referencingRules": {
"compatibleTypes": "->Project Rank->"
},
"propertyNameAtParent": "contributedTimes",
"icon": "dogecoin"
}
@@ -0,0 +1,41 @@
{
"type": "Contributed Vote",
"menuItems": [
{
"action": "Configure",
"actionFunction": "uiObject.configEditor.activate",
"label": "Configure",
"iconPathOn": "configuration",
"iconPathOff": "configuration"
},
{
"action": "Delete UI Object",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"title": [
"Reference Parent Find Node Type->User Contributions",
"Use Reference Parent"
],
"editors": {
"config": true
},
"initialValues": {
"config": "{\n \"description\": \"\"\n}"
},
"addLeftIcons": true,
"level": 2,
"attachingRules": {
"compatibleTypes": "->Civic Contributions->"
},
"referencingRules": {
"compatibleTypes": "->Contributed Time->Governance Contributions->"
},
"propertyNameAtParent": "contributedVotes",
"icon": "ethereum"
}
@@ -0,0 +1,60 @@
{
"type": "Governance Contributions",
"menuItems": [
{
"action": "Configure",
"actionFunction": "uiObject.configEditor.activate",
"label": "Configure",
"iconPathOn": "configuration",
"iconPathOff": "configuration"
},
{
"action": "Add UI Object",
"actionFunction": "payload.executeAction",
"label": "Add Governance Contributions",
"relatedUiObject": "Governance Contributions"
},
{
"action": "Add UI Object",
"actionFunction": "payload.executeAction",
"label": "Add Contributed Time",
"relatedUiObject": "Contributed Time"
},
{
"action": "Delete UI Object",
"askConfirmation": true,
"confirmationLabel": "Confirm to Delete",
"label": "Delete",
"iconPathOn": "delete-entity",
"iconPathOff": "delete-entity",
"actionFunction": "payload.executeAction"
}
],
"editors": {
"config": true
},
"initialValues": {
"config": "{\n \"description\": \"\"\n}"
},
"addLeftIcons": true,
"level": 2,
"attachingRules": {
"compatibleTypes": "->User Contributions->Governance Contributions->"
},
"propertyNameAtParent": "governanceContributions",
"childrenNodesProperties": [
{
"name": "governanceContributions",
"type": "array",
"childType": "Governance Contributions",
"autoAdd": false
},
{
"name": "contributedTimes",
"type": "array",
"childType": "Contributed Time",
"autoAdd": false
}
],
"icon": "bitcoin"
}
@@ -14,6 +14,12 @@
"label": "Add Marketing Contributions",
"relatedUiObject": "Marketing Contributions"
},
{
"action": "Add UI Object",
"actionFunction": "payload.executeAction",
"label": "Add Contributed Asset",
"relatedUiObject": "Contributed Asset"
},
{
"action": "Delete UI Object",
"askConfirmation": true,
@@ -42,6 +48,12 @@
"type": "array",
"childType": "Marketing Contributions",
"autoAdd": false
},
{
"name": "contributedAssets",
"type": "array",
"childType": "Contributed Asset",
"autoAdd": false
}
],
"icon": "bitcoin"
@@ -32,6 +32,12 @@
"label": "Add Governance Contributions",
"relatedUiObject": "Governance Contributions"
},
{
"action": "Add UI Object",
"actionFunction": "payload.executeAction",
"label": "Add Civic Contributions",
"relatedUiObject": "Civic Contributions"
},
{
"action": "Delete UI Object",
"askConfirmation": true,
@@ -76,6 +82,12 @@
"type": "array",
"childType": "Governance Contributions",
"autoAdd": false
},
{
"name": "civicContributions",
"type": "array",
"childType": "Civic Contributions",
"autoAdd": false
}
],
"icon": "bitcoin"
@@ -172,6 +172,36 @@ function newUiObjectTitle() {
thisObject.payload.title = thisObject.payload.title + separator + childNode.name
thisObject.payload.node.name = thisObject.payload.node.name + separator + childNode.name
}
if (titleReference.indexOf('Find Node Type->') === 0) {
let nodeType = titleReference.substring(titleReference.indexOf('->') + 2, titleReference.length)
let nodeToUse = UI.projects.superalgos.utilities.meshes.findNodeInNodeMesh(
thisObject.payload.node,
nodeType,
undefined,
true,
true,
true,
false
)
if (nodeToUse === undefined) { break }
thisObject.payload.title = thisObject.payload.title + separator + nodeToUse.name
thisObject.payload.node.name = thisObject.payload.node.name + separator + nodeToUse.name
}
if (titleReference.indexOf('Reference Parent Find Node Type->') === 0) {
let nodeType = titleReference.substring(titleReference.indexOf('->') + 2, titleReference.length)
let nodeToUse = UI.projects.superalgos.utilities.meshes.findNodeInNodeMesh(
thisObject.payload.referenceParent,
nodeType,
undefined,
true,
true,
true,
false
)
if (nodeToUse === undefined) { break }
thisObject.payload.title = thisObject.payload.title + separator + nodeToUse.name
thisObject.payload.node.name = thisObject.payload.node.name + separator + nodeToUse.name
}
}
}
separator = ' '
+9 -1
View File
@@ -5,7 +5,15 @@ function newSuperalgosUtilitiesMeshes() {
return thisObject
function findNodeInNodeMesh(node, nodeType, nodeName, connectedViaPayload, findInChildren, findInParents, findInReferenceParents) {
function findNodeInNodeMesh(
node,
nodeType,
nodeName,
connectedViaPayload,
findInChildren,
findInParents,
findInReferenceParents
) {
/*
This function scans a node mesh for a certain node type and
returns the first instance found. Please specify either nodeType