Comments (6)
Hello,
Did you check first the documentation for creating schemas, models and types ?
If you want a description of the properties you can have a look in the MSON core definition files of System Runtime. For example, here is the description of a type schema:
{
"_id": {
"type": "string",
"mandatory": true
},
"name": {
"type": "string",
"mandatory": true
},
"type": {
"type": "string",
"mandatory": true
},
"schema": {
"type": "object",
"mandatory": false
},
"value": {
"type": ["any"],
"mandatory": false
},
"core": {
"type": "boolean",
"mandatory": false
},
"description": {
"type": "string",
"mandatory": false
}
}
For information there are also many checks done on save to help you to write valid schemas.
About your questions, there is not only one way to do what you want but here some tips.
If you have for example this definition for this new type:
{
"_id": "d82472ce-3034-4bd2-ad55-ad25eb04c09c",
"name": "eyeColor",
"description": "eye colors",
"type": "string",
"value": ["blue", "green", "maroon", "other"]
}
and this model:
{
"_id": "bdce6d04-d68f-4c2a-b36a-565ff06d3cb9",
"_name": "Person",
"_description": "",
"eyeColor": {
"description": "",
"type": "eyeColor",
"readOnly": false,
"mandatory": false,
"default": "maroon"
}
}
To get the list of values to fill a dropdown where you can select an eye color:
// in a behavior you can require the Datastore to get the type definition
const db = this.require('db')
const eyeColorDefinition = db.collections()._Type.find({name: 'eyeColor'})[0]
const values = eyeColorDefinition.value
When a value is selected in the dropdown you can update the component:
this.require('id_of_the_component').eyeColor('blue')
Also remember that you can export your system and use it in any JS Framework. For example you can define your UI with React, import your system and then use create/edit/delete components.
Is that answer to your questions ?
from system-designer.
from system-designer.
You are welcome.
Do not hesitate, if something is not clear I will update the documentation.
from system-designer.
For information I have just updated documentation for creating schemas, models and types.
from system-designer.
Where can I find the PWA version?
from system-designer.
You have just to click on Try it online
button on https://designfirst.io/systemdesigner/ .
Direct links:
- For desktop browsers: https://designfirst.io/designer/
- For mobile browsers: https://designfirst.io/design/
from system-designer.
Related Issues (20)
- Configuration Settings HOT 5
- Update base code for System Runtime v4
- Add Dagre lib instead of Viz HOT 1
- The package doesn't want to install via the App Store, tells me there is not space ! HOT 5
- Cannot uninstall HOT 2
- Components: Showing values from unrelated collections HOT 3
- Add Support For PHP / Other Languages In Behavior HOT 5
- Enterprise github HOT 2
- how can I import external js modules HOT 8
- Can I list all existing models in js behavior HOT 1
- Full dev env for HTML/JavaScript HOT 6
- Are there plans to add support for private properties, methods, static properties, and methods in the future? HOT 1
- Fix links in Readme.md HOT 1
- Add schema import for GraphQL SDL HOT 2
- Renaming a method results in loss of code HOT 4
- async functions - where do I use 'esversion: 8'? HOT 3
- Add use case model HOT 1
- Sub-Systems ? HOT 3
- As a user, I should be able to select an entity color when creating Schemas and Types so that diagrams can be more easily followed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from system-designer.