├── .cypress-cucumber-preprocessorrc.json ├── .eslintrc.js ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ └── cucumber.yml ├── .gitignore ├── .husky └── pre-commit ├── .lintstagedrc ├── .npmignore ├── .prettierrc ├── .vscode └── settings.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Gruntfile.js ├── ISSUE_TEMPLATE.md ├── LICENSE ├── README.md ├── addons └── README.md ├── cypress.config.js ├── cypress ├── e2e │ ├── common │ │ └── system-designer.js │ └── system-designer │ │ └── system-designer.feature └── support │ └── e2e.js ├── examples ├── README.md ├── create-css-components.json ├── create-html-components.json ├── create-js-components.json ├── dvd-collection.json ├── filtering-list.json ├── nodejs.json ├── todo-mvc.json └── web-components.json ├── extensions ├── README.md └── extensions.json ├── package-lock.json ├── package.json ├── src ├── README.md ├── merges │ ├── README.md │ ├── cordova │ │ ├── app │ │ │ └── index.html │ │ ├── behavior.html │ │ ├── cache.js │ │ ├── component.html │ │ ├── cordova.js │ │ ├── img │ │ │ └── icon.png │ │ ├── index.html │ │ ├── manifest.json │ │ ├── model.html │ │ ├── schema.html │ │ ├── scripts │ │ │ └── mobile.js │ │ ├── styles │ │ │ └── mobile.css │ │ ├── system.html │ │ └── type.html │ ├── electron │ │ ├── app │ │ │ └── index.html │ │ ├── behavior.html │ │ ├── component.html │ │ ├── diagram.html │ │ ├── index.html │ │ ├── model.html │ │ ├── schema.html │ │ ├── system.html │ │ ├── type.html │ │ └── video │ │ │ └── systemdesigner.mp4 │ └── web │ │ ├── app │ │ └── index.html │ │ ├── behavior.html │ │ ├── cache.js │ │ ├── component.html │ │ ├── diagram.html │ │ ├── img │ │ ├── favicon.ico │ │ └── icon.png │ │ ├── index.html │ │ ├── manifest.json │ │ ├── model.html │ │ ├── schema.html │ │ ├── system.html │ │ └── type.html ├── systems │ ├── README.md │ ├── classes │ │ ├── CSS-class.json │ │ ├── Designer-class.json │ │ ├── Diagram-class.json │ │ ├── Dialog-class.json │ │ ├── Editor-class.json │ │ ├── Export-class.json │ │ ├── Extension-class.json │ │ ├── Github-class.json │ │ ├── HTML-class.json │ │ ├── Internationalization-class.json │ │ ├── JS-class.json │ │ ├── JSON-class.json │ │ ├── Language-class.json │ │ ├── Log-class.json │ │ ├── MenuBar-class.json │ │ ├── Message-class.json │ │ ├── Model-class.json │ │ ├── Router-class.json │ │ ├── Spaces-class.json │ │ ├── State-class.json │ │ ├── Store-class.json │ │ ├── System-class.json │ │ ├── SystemFactory-class.json │ │ ├── ToolBar-class.json │ │ ├── Workspace-class.json │ │ └── _Channel-class.json │ ├── core │ │ ├── designer-runtime.json │ │ ├── diagram.json │ │ ├── editor-behavior.json │ │ ├── editor-component.json │ │ ├── editor-model.json │ │ ├── editor-schema.json │ │ ├── editor-system.json │ │ ├── editor-type.json │ │ └── system-designer.json │ ├── platforms │ │ ├── cordova.json │ │ └── electron.json │ └── types │ │ └── types.json └── www │ ├── img │ └── logo.png │ └── styles │ ├── designer.css │ ├── diagram.css │ └── editor.css └── tasks ├── clean.json ├── concat.json ├── connect.json ├── copy.json ├── json_merge.json ├── shell.json ├── uglify.json └── watch.json /.cypress-cucumber-preprocessorrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "stepDefinitions": ["cypress/e2e/**/*.js"] 3 | } 4 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: ['eslint-plugin-cypress'], 3 | env: {'cypress/globals': true}, 4 | } -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: ecarriou 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve System Designer 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for System Designer 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/cucumber.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: cucumber tests 5 | 6 | on: 7 | push: 8 | branches: [ main ] 9 | pull_request: 10 | branches: [ main ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | strategy: 18 | matrix: 19 | node-version: [20.x] 20 | 21 | steps: 22 | - uses: actions/checkout@v2 23 | - name: Use Node.js ${{ matrix.node-version }} 24 | uses: actions/setup-node@v2 25 | with: 26 | node-version: ${{ matrix.node-version }} 27 | - run: npm ci 28 | - run: npm run build 29 | - run: npm test 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | /reports/ 4 | *.log 5 | .DS_Store -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npx lint-staged 5 | -------------------------------------------------------------------------------- /.lintstagedrc: -------------------------------------------------------------------------------- 1 | { 2 | "src/systems/**/*.json": [ 3 | "prettier --single-quote --write", 4 | "git add" 5 | ] 6 | } -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | /.github/ 2 | /.husky/ 3 | /.vscode/ 4 | /addons/ 5 | /cypress/ 6 | /examples/ 7 | /extensions/ 8 | /node_modules/ 9 | /src/ 10 | /tasks/ 11 | /reports/ 12 | .DS_Store 13 | .eslintrc.js 14 | .gitignore 15 | .lintstagedrc 16 | .npmignore 17 | .prettierrc 18 | CODE_OF_CONDUCT.md 19 | CONTRIBUTING.md 20 | cypress.json 21 | Gruntfile.js 22 | ISSUE_TEMPLATE.md 23 | package-lock.json 24 | README.md -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "semi": false 4 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": true, 3 | "cucumberautocomplete.steps": [ 4 | "cypress/e2e/common/*.js" 5 | ] 6 | } -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | This code of conduct outlines our expectations for participants within the System Designer community, as well as steps to reporting unacceptable behavior. We are committed to providing a welcoming and inspiring community for all and expect our code of conduct to be honored. Anyone who violates this code of conduct may be banned from the community. 4 | 5 | Our open source community strives to: 6 | 7 | * **Be friendly and patient**. 8 | 9 | * **Be welcoming**: We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, colour, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability. 10 | 11 | * **Be considerate**: Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we’re a world-wide community, so you might not be communicating in someone else’s primary language. 12 | 13 | * **Be respectful**: Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one. 14 | 15 | * **Be careful in the words that we choose**: we are a community of professionals, and we conduct ourselves professionally. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren’t acceptable. 16 | 17 | * **Try to understand why we disagree**: Disagreements, both social and technical, happen all the time. It is important that we resolve disagreements and differing views constructively. Remember that we’re different. The strength of our community comes from its diversity, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to err and blaming each other doesn’t get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes. 18 | 19 | ## Definitions 20 | 21 | Harassment includes, but is not limited to: 22 | 23 | * Offensive comments related to gender, gender identity and expression, sexual orientation, disability, mental illness, neuro(a)typicality, physical appearance, body size, race, age, regional discrimination, political or religious affiliation 24 | * Unwelcome comments regarding a person’s lifestyle choices and practices, including those related to food, health, parenting, drugs, and employment 25 | * Deliberate misgendering. This includes deadnaming or persistently using a pronoun that does not correctly reflect a person’s gender identity. You must address people by the name they give you when not addressing them by their username or handle 26 | * Physical contact and simulated physical contact (eg, textual descriptions like “hug” or “backrub”) without consent or after a request to stop 27 | * Threats of violence, both physical and psychological 28 | * Incitement of violence towards any individual, including encouraging a person to commit suicide or to engage in self-harm 29 | * Deliberate intimidation 30 | * Stalking or following 31 | * Harassing photography or recording, including logging online activity for harassment purposes 32 | * Sustained disruption of discussion 33 | * Unwelcome sexual attention, including gratuitous or off-topic sexual images or behaviour 34 | * Pattern of inappropriate social contact, such as requesting/assuming inappropriate levels of intimacy with others 35 | * Continued one-on-one communication after requests to cease 36 | * Deliberate “outing” of any aspect of a person’s identity without their consent except as necessary to protect others from intentional abuse 37 | * Publication of non-harassing private communication 38 | 39 | Our open source community prioritizes marginalized people’s safety over privileged people’s comfort. We will not act on complaints regarding: 40 | 41 | * ‘Reverse’ -isms, including ‘reverse racism,’ ‘reverse sexism,’ and ‘cisphobia’ 42 | * Reasonable communication of boundaries, such as “leave me alone,” “go away,” or “I’m not discussing this with you” 43 | * Refusal to explain or debate social justice concepts 44 | * Communicating in a ‘tone’ you don’t find congenial 45 | * Criticizing racist, sexist, cissexist, or otherwise oppressive behavior or assumptions 46 | 47 | ## Diversity Statement 48 | 49 | We encourage everyone to participate and are committed to building a community for all. Although we will fail at times, we seek to treat everyone both as fairly and equally as possible. Whenever a participant has made a mistake, we expect them to take responsibility for it. If someone has been harmed or offended, it is our responsibility to listen carefully and respectfully, and do our best to right the wrong. 50 | 51 | Although this list cannot be exhaustive, we explicitly honor diversity in age, gender, gender identity or expression, culture, ethnicity, language, national origin, political beliefs, profession, race, religion, sexual orientation, socioeconomic status, and technical ability. We will not tolerate discrimination based on any of the protected characteristics above, including participants with disabilities. 52 | 53 | ## Reporting Issues 54 | 55 | If you experience or witness unacceptable behavior—or have any other concerns—please report it by contacting us via [erwan.carriou@mac.com](mailto:erwan.carriou@mac.com). All reports will be handled with discretion. In your report please include: 56 | 57 | * Your contact information. 58 | * Names (real, nicknames, or pseudonyms) of any individuals involved. If there are additional witnesses, please include them as well. Your account of what occurred, and if you believe the incident is ongoing. If there is a publicly available record (e.g. a mailing list archive or a public IRC logger), please include a link. 59 | * Any additional information that may be helpful. 60 | 61 | After filing a report, a representative will contact you personally, review the incident, follow up with any additional questions, and make a decision as to how to respond. If the person who is harassing you is part of the response team, they will recuse themselves from handling your incident. If the complaint originates from a member of the response team, it will be handled by a different member of the response team. We will respect confidentiality requests for the purpose of protecting victims of abuse. 62 | 63 | note: this code of conduct is based on the [template](http://todogroup.org/opencodeofconduct/) established by the [TODO Group](http://todogroup.org) -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | ## For questions 4 | 5 | Read the [documentation](https://designfirst.io/systemdesigner/documentation/docs/what-is-system-designer.html) before to see if your questions has been answered in the documentation. 6 | 7 | ## For suggestions 8 | 9 | Give a concrete example of what you want to see in System Designer. 10 | 11 | ## For issues 12 | 13 | Give the following informations related to your problem: 14 | 15 | - System Designer version number: (ex: *v5.3.0*) 16 | - System Designer platform: (ex: *macOS*) 17 | - Your OS version: (ex: *macOS 10.14.4*) 18 | - If use on a phone, please give the model: (ex: *iPhone XS*) 19 | - Steps to reproduce the issue 20 | 21 | ## For contributing to System Designer codebase 22 | 23 | Follow these steps: 24 | 25 | 1. Read the System Designer [Code of Conduct](CODE_OF_CONDUCT.md) 26 | 2. [Create an issue](https://github.com/design-first/system-designer/issues) where you describe what you plan to do 27 | 3. Once the issue has been accepted, you can work on your branch for that issue 28 | 4. Once you have completed your task, create a pull request for a review. Remember that the build must succeed 29 | 5. Once review is done. The pull request will be merged -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | /* 2 | * System Designer 3 | * 4 | * https://designfirst.io/systemdesigner/ 5 | * 6 | * Copyright 2024 Erwan Carriou 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | module.exports = function (grunt) { 22 | // load tasks 23 | require('load-grunt-tasks')(grunt) 24 | 25 | // load configuration 26 | grunt.initConfig({ 27 | watch: grunt.file.readJSON('tasks/watch.json'), 28 | clean: grunt.file.readJSON('tasks/clean.json'), 29 | copy: grunt.file.readJSON('tasks/copy.json'), 30 | json_merge: grunt.file.readJSON('tasks/json_merge.json'), 31 | connect: grunt.file.readJSON('tasks/connect.json'), 32 | bgShell: grunt.file.readJSON('tasks/shell.json'), 33 | concat: grunt.file.readJSON('tasks/concat.json'), 34 | uglify: grunt.file.readJSON('tasks/uglify.json'), 35 | }) 36 | 37 | // non trivial copy 38 | grunt.config.merge({ 39 | copy: { 40 | 'minify-json': { 41 | expand: true, 42 | cwd: 'dist/systems', 43 | src: ['*.json'], 44 | dest: 'dist/systems', 45 | options: { 46 | process: (content) => JSON.stringify(JSON.parse(content)), 47 | }, 48 | }, 49 | 'web-livereload': { 50 | expand: true, 51 | cwd: 'dist', 52 | src: ['*.html', 'app/index.html'], 53 | dest: 'dist', 54 | options: { 55 | process: (content) => 56 | content 57 | .replace( 58 | '', 59 | '' 60 | ) 61 | .replace( 62 | '', 63 | '\t\n' 64 | ), 65 | }, 66 | }, 67 | }, 68 | }) 69 | 70 | // start the dev mode 71 | grunt.registerTask('dev', [ 72 | 'clean:build', 73 | 'copy:web-folder', 74 | 'copy:libraries', 75 | 'copy:ace', 76 | 'concat:vendor-diagram', 77 | 'concat:vendor-designer', 78 | 'concat:vendor-editor', 79 | 'copy:web-files', 80 | 'json_merge:web-systems', 81 | 'copy:web-livereload', 82 | 'connect:watch', 83 | 'watch:web', 84 | ]) 85 | 86 | // start the dev mode 87 | grunt.registerTask('dev-cordova', [ 88 | 'clean:build', 89 | 'copy:web-folder', 90 | 'copy:libraries', 91 | 'concat:vendor-designer', 92 | 'concat:cordova-vendor-editor', 93 | 'copy:codemirror', 94 | 'copy:cordova-files', 95 | 'json_merge:cordova-systems', 96 | 'copy:minify-json', 97 | 'concat:app', 98 | 'clean:systems', 99 | 'copy:web-livereload', 100 | 'connect:watch', 101 | 'watch:cordova', 102 | ]) 103 | 104 | // build for web 105 | grunt.registerTask('web', [ 106 | 'clean:build', 107 | 'copy:web-folder', 108 | 'copy:libraries', 109 | 'copy:ace', 110 | 'concat:vendor-diagram', 111 | 'concat:vendor-designer', 112 | 'concat:vendor-editor', 113 | 'copy:web-files', 114 | 'json_merge:web-systems', 115 | 'copy:minify-json', 116 | ]) 117 | 118 | // build for electron 119 | grunt.registerTask('electron', [ 120 | 'clean:build', 121 | 'copy:web-folder', 122 | 'copy:libraries', 123 | 'copy:ace', 124 | 'concat:vendor-diagram', 125 | 'concat:vendor-designer', 126 | 'concat:vendor-editor', 127 | 'copy:electron-files', 128 | 'json_merge:electron-systems', 129 | 'copy:minify-json', 130 | 'concat:app', 131 | 'clean:systems', 132 | ]) 133 | 134 | // build for cordova 135 | grunt.registerTask('cordova', [ 136 | 'clean:build', 137 | 'copy:web-folder', 138 | 'copy:libraries', 139 | 'concat:vendor-designer', 140 | 'concat:cordova-vendor-editor', 141 | 'uglify:vendor-editor', 142 | 'copy:codemirror', 143 | 'copy:cordova-files', 144 | 'json_merge:cordova-systems', 145 | 'copy:minify-json', 146 | 'concat:app', 147 | 'clean:systems', 148 | ]) 149 | 150 | // default build 151 | grunt.registerTask('build', ['web']) 152 | 153 | // start the server 154 | grunt.registerTask('start', 'connect:web-server') 155 | 156 | // run tests locally 157 | grunt.registerTask('test', ['connect:dev-server', 'bgShell:cypress-dev']) 158 | 159 | // run tests in CI 160 | grunt.registerTask('ci', ['connect:dev-server', 'bgShell:cypress-ci']) 161 | } 162 | -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | For issues give the following informations related to your issue: 2 | 3 | - System Designer version number: (ex: *v5.3.0*) 4 | - System Designer platform: (ex: *macOS*) 5 | - Your OS version: (ex: *macOS 10.14.4*) 6 | - If use on a phone, please give the model: (ex: *iPhone XS*) 7 | - Steps to reproduce the issue 8 | 9 | note: if possible, send us the system you used. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # System Designer 2 | 3 | [![cucumber tests](https://github.com/design-first/system-designer/actions/workflows/cucumber.yml/badge.svg?branch=master)](https://github.com/design-first/system-designer/actions/workflows/cucumber.yml) 4 | 5 | ![Image Alt](https://designfirst.io/img/systemdesigner.png) 6 | 7 | ## What is System Designer ? 8 | 9 | No matter the frameworks you use and the code you write, the most important is the model that you define to create your system. System Designer helps you to design this model and to generate the classes and components to build your system. 10 | 11 | ## What is a system ? 12 | 13 | With System Designer you create in fact a **system** and not an application. But what is a system ? 14 | 15 | A system: 16 | 17 | - is defined by a model, 18 | - is composed by components and 19 | - reacts to events with actions that we call behaviors. 20 | 21 | ![Image Alt](https://designfirst.io/img/system.png) 22 | 23 | ## What can I do with System Designer ? 24 | 25 | #### Design your system with ease 26 | 27 | If you look at the different JavaScript frameworks on the market, you will notice that they all have their own way to define a model, generally only with code. 28 | 29 | System Designer uses [UML](http://www.uml.org), a standard, to define your model. So you probably already know how to design in System Designer even if you have never run it. 30 | 31 | The definition of the model is stored on a JSON format called [MSON](https://designfirst.io/systemruntime/documentation/docs/en/design-your-model#defining-your-model). With [MSON](https://designfirst.io/systemruntime/documentation/docs/en/design-your-model#defining-your-model) you can define types, classes, one to one / one to many relationships and multi inheritance between classes. 32 | 33 | #### Code the behavior of your system 34 | 35 | Once you have created your model, System Designer generates the skeletons of all your methods. You only have then to add your code to implement them. 36 | 37 | System Designer provides you helpers to manage your components. You can easily navigate through components to create your application. 38 | 39 | #### Create components graphically 40 | 41 | There is no need to code to instantiate a component. Create a component in System Designer is like creating a document in a NoSQL Database. 42 | 43 | In fact, System Designer acts as an ODM (Object-Document Mapper) to manage your components as NoSQL Documents. 44 | 45 | #### Run your system 46 | 47 | You can run your system directly from System Designer and then export it to HTML, JSON, JavaScript, a Node.js module or a [Graphviz](http://graphviz.org) file (\* macOS, Windows, Linux and PWA version only). 48 | 49 | Because you have defined a model for your application, a [Dynamic Type Check](https://en.wikipedia.org/wiki/Type_system#DYNAMIC) is done on every action of your system. All warnings are send and shown in System Designer. 50 | 51 | #### Debug your system 52 | 53 | System Designer can load the model of any system that runs on the browser or on Node.js. You can see the schemas, models, components and methods of the running system and you can edit them. 54 | 55 | All modifications to the model done inside System Designer will be send to the running system. There is no need to reload to see your modifications. 56 | 57 | #### Design on the go 58 | 59 | System Designer can be used on Windows, macOS, Linux, iOS, iPad, Android or any browsers. You can also install it in your project: System Designer requires no backend to work, it is a full web application. 60 | 61 | System Designer has a GitHub module to synchronize your work between all these apps. You can begin your design on your Mac and then continue it on your iPad. 62 | 63 | ## Build 64 | 65 | #### Installation 66 | 67 | Clone the repository: 68 | 69 | ```sh 70 | git clone https://github.com/design-first/system-designer.git 71 | ``` 72 | 73 | Once you have cloned the repository, install the dependencies: 74 | 75 | ```sh 76 | npm i 77 | ``` 78 | 79 | #### Build for web 80 | 81 | Here are the different tasks you can use to build and start System Designer as a Progressive Web App (PWA): 82 | 83 | ```sh 84 | npm run web 85 | ``` 86 | 87 | Then you can start the server: 88 | 89 | ```sh 90 | npm run start 91 | ``` 92 | 93 | Once server started, go to [http://localhost:8080/](http://localhost:8080/). 94 | 95 | #### Build for macOS / Windows / Linux 96 | 97 | To build System Designer for [Electron](http://electron.atom.io): 98 | 99 | ```sh 100 | npm run electron 101 | ``` 102 | 103 | Copy the content of `/dist` directory into your [System Designer for Electron](https://github.com/design-first/system-designer-electron) project. 104 | 105 | Then in your [System Designer for Electron](https://github.com/design-first/system-designer-electron) project: 106 | 107 | ```sh 108 | # build for macOS 109 | npm run macOS 110 | 111 | # build for Windows 112 | npm run windows 113 | 114 | # build for Linux 115 | npm run linux 116 | ``` 117 | 118 | #### Build for iOS / Android 119 | 120 | To build System Designer for [Cordova](http://cordova.apache.org): 121 | 122 | ```sh 123 | npm run cordova 124 | ``` 125 | 126 | Copy the content of `/dist` directory into your [System Designer for Cordova](https://github.com/design-first/system-designer-cordova) project. 127 | 128 | Then in your [System Designer for Cordova](https://github.com/design-first/system-designer-cordova) project: 129 | 130 | ```sh 131 | # build for ios 132 | npx cordova build ios 133 | 134 | # build for android 135 | npx cordova build android 136 | ``` 137 | 138 | ## Development 139 | 140 | ### Web 141 | 142 | To start System Designer in development mode for web: 143 | 144 | ```sh 145 | npm run dev 146 | ``` 147 | 148 | Once server started, go to [http://localhost:9001/](http://localhost:9001/). All the modifications to the source code of System Designer will rebuild the solution and refresh the page. 149 | 150 | ### Mobile devices 151 | 152 | To start System Designer in development mode for mobile devices: 153 | 154 | ```sh 155 | npm run dev-cordova 156 | ``` 157 | 158 | Once server started, go to [http://localhost:9001/](http://localhost:9001/). All the modifications to the source code of System Designer will rebuild the solution and refresh the page. 159 | 160 | ## Documentation 161 | 162 | - [Quick Start](https://designfirst.io/systemdesigner/documentation/docs/quick-start.html) 163 | - [Documentation](https://designfirst.io/systemdesigner/documentation/docs/what-is-system-designer.html) 164 | 165 | ## Community 166 | 167 | - [Code of Conduct](CODE_OF_CONDUCT.md) 168 | - [Contributing Guidelines](CONTRIBUTING.md) 169 | 170 | ## License 171 | 172 | Copyright © 2024 Erwan Carriou 173 | 174 | Licensed under the Apache License, Version 2.0 (the "License"); 175 | you may not use this file except in compliance with the License. 176 | You may obtain a copy of the License at 177 | 178 | http://www.apache.org/licenses/LICENSE-2.0 179 | 180 | Unless required by applicable law or agreed to in writing, software 181 | distributed under the License is distributed on an "AS IS" BASIS, 182 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 183 | See the License for the specific language governing permissions and 184 | limitations under the License. 185 | 186 | **Do not use System Designer if you do not believe in Equality and Diversity.** 187 | 188 | **System Designer is not for people of hate.** 189 | -------------------------------------------------------------------------------- /addons/README.md: -------------------------------------------------------------------------------- 1 | ## System Designer Addons 2 | 3 | You can extend System Designer by composing other systems with its systems. In that case, these systems are called **addons**. 4 | 5 | To extend System Designer, just copy and paste a system into the `/addons` directory and run `npm run build`. -------------------------------------------------------------------------------- /cypress.config.js: -------------------------------------------------------------------------------- 1 | const { defineConfig } = require('cypress') 2 | const createBundler = require('@bahmutov/cypress-esbuild-preprocessor') 3 | const { addCucumberPreprocessorPlugin } = require('@badeball/cypress-cucumber-preprocessor') 4 | const { createEsbuildPlugin }  = require ('@badeball/cypress-cucumber-preprocessor/esbuild') 5 | 6 | module.exports = defineConfig({ 7 | fixturesFolder: 'cypress/fixtures', 8 | screenshotsFolder: 'reports/screenshots', 9 | videosFolder: 'reports/videos', 10 | chromeWebSecurity: false, 11 | e2e: { 12 | setupNodeEvents(on, config) { 13 | addCucumberPreprocessorPlugin(on, config) 14 | on( 15 | "file:preprocessor", 16 | createBundler({ 17 | plugins: [createEsbuildPlugin(config)], 18 | }) 19 | ); 20 | 21 | return config 22 | }, 23 | baseUrl: 'http://localhost:8080', 24 | specPattern: 'cypress/e2e/**/*.feature', 25 | }, 26 | }) 27 | -------------------------------------------------------------------------------- /cypress/e2e/common/system-designer.js: -------------------------------------------------------------------------------- 1 | /* 2 | * System Designer 3 | * 4 | * https://designfirst.io/systemdesigner/ 5 | * 6 | * Copyright 2024 Erwan Carriou 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | import { 22 | Given, 23 | When, 24 | Then, 25 | Then as And, 26 | } from '@badeball/cypress-cucumber-preprocessor' 27 | 28 | Given('Users have opened System Designer', () => { 29 | cy.visit('/').get('#designer-spaces-type').contains('Systems') 30 | }) 31 | 32 | When('Users have closed the information Dialog', () => { 33 | cy.get('#designer-dialog-welcome-modal-ok') 34 | .click() 35 | .get('.modal-backdrop') 36 | .should('not.exist') 37 | }) 38 | 39 | // System 40 | 41 | When('Users click to create a system', () => { 42 | cy.get('#designer-toolbar-item-create').click() 43 | }) 44 | 45 | And('Users enter system name as {string}', (systemname) => { 46 | cy.get('#designer-dialog-system-creation-modal') 47 | .get('#designer-dialog-system-creation-name') 48 | .type(systemname) 49 | }) 50 | 51 | And('Users click on system create button', () => { 52 | cy.get('#designer-dialog-system-creation-modal-ok').click() 53 | }) 54 | 55 | Then('Users is able to see the system {string}', (systemname) => { 56 | cy.get('.panel-title').should('be.visible').contains(systemname) 57 | }) 58 | 59 | // Schema 60 | 61 | When('Users click on schema tab', () => { 62 | cy.get('#designer-menu-item-schemas').click() 63 | }) 64 | 65 | And('Users click to create a schema', () => { 66 | cy.get('#designer-toolbar-item-create').click() 67 | }) 68 | 69 | And('Users enter schema name as {string}', (schemaname) => { 70 | cy.get('#designer-dialog-schema-creation-name').type(schemaname) 71 | }) 72 | 73 | And('Users click on schema create button', () => { 74 | cy.get('#designer-dialog-schema-creation-modal-ok').click() 75 | }) 76 | 77 | Then('Users is able to see the schema {string}', (schemaname) => { 78 | cy.get('.panel-title').contains(schemaname).should('be.visible') 79 | }) 80 | 81 | // Component 82 | 83 | When('Users click on component tab', () => { 84 | cy.get('#designer-menu-item-components').click() 85 | }) 86 | 87 | And('Users click to create a component', () => { 88 | cy.get('#designer-toolbar-item-create').click() 89 | }) 90 | 91 | Then('Users is able to see the component', () => { 92 | cy.get('.panel-title').should('be.visible') 93 | }) 94 | -------------------------------------------------------------------------------- /cypress/e2e/system-designer/system-designer.feature: -------------------------------------------------------------------------------- 1 | Feature: System Designer 2 | 3 | Background: 4 | Given Users have opened System Designer 5 | 6 | Scenario Outline: Users can create a system 7 | When Users have closed the information Dialog 8 | And Users click to create a system 9 | And Users enter system name as "" 10 | And Users click on system create button 11 | Then Users is able to see the system "" 12 | Examples: 13 | | systemname | 14 | | starwars | 15 | 16 | Scenario Outline: Users can create a schema 17 | When Users click on schema tab 18 | And Users click to create a schema 19 | And Users enter schema name as "" 20 | And Users click on schema create button 21 | Then Users is able to see the schema "" 22 | Examples: 23 | | schemaname | 24 | | Jedi | 25 | 26 | Scenario: Users can create a component 27 | When Users click on component tab 28 | And Users click to create a component 29 | Then Users is able to see the component -------------------------------------------------------------------------------- /cypress/support/e2e.js: -------------------------------------------------------------------------------- 1 | /* 2 | * System Designer 3 | * 4 | * https://designfirst.io/systemdesigner/ 5 | * 6 | * Copyright 2024 Erwan Carriou 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | import 'cypress-localstorage-commands' 22 | 23 | beforeEach(() => { 24 | cy.restoreLocalStorage() 25 | }) 26 | 27 | afterEach(() => { 28 | cy.saveLocalStorage() 29 | }) 30 | -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | ## System Designer examples 2 | 3 | You will find here some systems you can import and test in System Designer. -------------------------------------------------------------------------------- /examples/create-css-components.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "create-css-components", 3 | "master": true, 4 | "version": "1.0.1", 5 | "description": "Create CSS components\n\nThis system is taken from the tutorial: https://designfirst.io/systemdesigner/documentation/docs/bundle-your-css.html", 6 | "schemas": { 7 | "15c421db8d144f8": { 8 | "_id": "15c421db8d144f8", 9 | "_name": "CSS", 10 | "_inherit": [ 11 | "_Component" 12 | ], 13 | "source": "property", 14 | "render": "method" 15 | } 16 | }, 17 | "models": { 18 | "10ae813c1515699": { 19 | "_id": "10ae813c1515699", 20 | "_name": "CSS", 21 | "source": { 22 | "type": "css", 23 | "readOnly": false, 24 | "mandatory": false, 25 | "default": "" 26 | }, 27 | "render": {} 28 | } 29 | }, 30 | "behaviors": { 31 | "16146151931c38f": { 32 | "_id": "16146151931c38f", 33 | "component": "100f91634c16625", 34 | "state": "start", 35 | "action": "function start() { \n this.require('custom_style').render();\n}", 36 | "useCoreAPI": false, 37 | "core": false 38 | }, 39 | "170e3198b61ba9d": { 40 | "_id": "170e3198b61ba9d", 41 | "component": "CSS", 42 | "state": "render", 43 | "action": "function render() {\n var div = document.createElement('style');\n \n div.innerHTML = this.source();\n document.head.appendChild(div);\n}", 44 | "useCoreAPI": false, 45 | "core": false 46 | } 47 | }, 48 | "types": {}, 49 | "components": { 50 | "CSS": { 51 | "custom_style": { 52 | "_id": "custom_style", 53 | "source": "body {\n background-color: #F5F5F5;\n}" 54 | } 55 | } 56 | }, 57 | "_id": "100f91634c16625" 58 | } -------------------------------------------------------------------------------- /examples/create-html-components.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "create-html-components", 3 | "master": true, 4 | "version": "1.0.1", 5 | "description": "Create HTML components\n\nThis system is taken from the tutorial: https://designfirst.io/systemdesigner/documentation/docs/bundle-your-html.html", 6 | "schemas": { 7 | "1bab01d624199e0": { 8 | "_id": "1bab01d624199e0", 9 | "_name": "HTML", 10 | "_inherit": [ 11 | "_Component" 12 | ], 13 | "source": "property", 14 | "render": "method" 15 | } 16 | }, 17 | "models": { 18 | "1574d10d061c69e": { 19 | "_id": "1574d10d061c69e", 20 | "_name": "HTML", 21 | "source": { 22 | "type": "html", 23 | "readOnly": false, 24 | "mandatory": false, 25 | "default": "" 26 | }, 27 | "render": { 28 | "params": [ 29 | { 30 | "name": "id", 31 | "type": "string", 32 | "mandatory": false, 33 | "default": "body" 34 | } 35 | ] 36 | } 37 | } 38 | }, 39 | "behaviors": { 40 | "1da271631b1b122": { 41 | "_id": "1da271631b1b122", 42 | "component": "1c1591f45b14c17", 43 | "state": "start", 44 | "action": "function start() { \n this.require('custom_html').render();\n}", 45 | "useCoreAPI": false, 46 | "core": false 47 | }, 48 | "1ba4d1878011fd3": { 49 | "_id": "1ba4d1878011fd3", 50 | "component": "HTML", 51 | "state": "render", 52 | "action": "function render(id) {\n var dom = null;\n \n if (id === 'body') {\n dom = document.body;\n } else {\n dom = document.getElementById(id);\n }\n \n dom.insertAdjacentHTML('beforeend', this.source());\n}", 53 | "useCoreAPI": false, 54 | "core": false 55 | } 56 | }, 57 | "types": {}, 58 | "components": { 59 | "HTML": { 60 | "custom_html": { 61 | "_id": "custom_html", 62 | "source": "
\n \n
" 63 | } 64 | } 65 | }, 66 | "_id": "1c1591f45b14c17" 67 | } -------------------------------------------------------------------------------- /examples/create-js-components.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "create-js-components", 3 | "master": true, 4 | "version": "1.0.1", 5 | "description": "Create JavaScript components\n\nThis system is taken from the tutorial: https://designfirst.io/systemdesigner/documentation/docs/bundle-your-javascript.html", 6 | "schemas": { 7 | "1845f15ebf19bd7": { 8 | "_id": "1845f15ebf19bd7", 9 | "_name": "JavaScript", 10 | "_inherit": [ 11 | "_Component" 12 | ], 13 | "source": "property", 14 | "render": "method" 15 | } 16 | }, 17 | "models": { 18 | "1e8da152c31a87c": { 19 | "_id": "1e8da152c31a87c", 20 | "_name": "JavaScript", 21 | "source": { 22 | "type": "javascript", 23 | "readOnly": false, 24 | "mandatory": false, 25 | "default": "" 26 | }, 27 | "render": {} 28 | } 29 | }, 30 | "behaviors": { 31 | "199651cf5c14981": { 32 | "_id": "199651cf5c14981", 33 | "component": "1c01e1007a1f8e4", 34 | "state": "start", 35 | "action": "function start() { \n this.require('custom_js').render();\n}", 36 | "useCoreAPI": false, 37 | "core": false 38 | }, 39 | "1711716a0413c31": { 40 | "_id": "1711716a0413c31", 41 | "component": "JavaScript", 42 | "state": "render", 43 | "action": "function render() {\n var div = document.createElement('script');\n \n div.innerHTML = this.source();\n document.head.appendChild(div);\n}", 44 | "useCoreAPI": false, 45 | "core": false 46 | } 47 | }, 48 | "types": {}, 49 | "components": { 50 | "JavaScript": { 51 | "custom_js": { 52 | "_id": "custom_js", 53 | "source": "alert('Hello world!');" 54 | } 55 | } 56 | }, 57 | "_id": "1c01e1007a1f8e4" 58 | } -------------------------------------------------------------------------------- /examples/nodejs.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodejs", 3 | "master": true, 4 | "version": "1.0.1", 5 | "description": "Create a server application\n\nThis example shows you how to create a Node.js application in System Designer.\n\nYou can the test the application directly in System Designer (* macOS and windows versions only).", 6 | "schemas": {}, 7 | "models": {}, 8 | "behaviors": { 9 | "17d001e5ae12a44": { 10 | "_id": "17d001e5ae12a44", 11 | "component": "1638e12721115b5", 12 | "state": "start", 13 | "action": "function start() { \n var http = require('http'),\n logger = this.require('logger');\n\n http.createServer(function (req, res) {\n res.writeHead(200);\n res.end('hello world\\n');\n }).listen(1234);\n \n logger.info('server is running at http://127.0.0.1:1234');\n}", 14 | "useCoreAPI": false, 15 | "core": false 16 | } 17 | }, 18 | "types": {}, 19 | "components": {}, 20 | "_id": "1638e12721115b5" 21 | } -------------------------------------------------------------------------------- /examples/web-components.json: -------------------------------------------------------------------------------- 1 | {"name":"web-components","master":true,"version":"1.0.2","description":"Create Web Components\n\n1. The tag <mywidget message=\"hello world !\"/> is added to the body of the page\n2. This tag calls the Component MyWidget\n3. It generates an input and a span tag that are binded: the value in the span change if you change the input value\n\nnote: the purpose of the example is to show how easily you can create Web Component, and we show only one way to do that","schemas":{"14f55163a913fca":{"_id":"14f55163a913fca","_name":"Component","_inherit":["_Component"],"template":"link","render":"method"},"10d741d0fe1d5dd":{"_id":"10d741d0fe1d5dd","_name":"Page","_inherit":["_Component"],"load":"method"},"1a18311b401430e":{"_id":"1a18311b401430e","_name":"Template","_inherit":["_Component"],"source":"property","render":"method"},"1da3516b1615f32":{"_id":"1da3516b1615f32","_name":"MyWidget","_inherit":["Component"],"template":"link","message":"property"}},"models":{"150131153d1ce4b":{"_id":"150131153d1ce4b","_name":"Component","template":{"type":"Template","readOnly":false,"mandatory":false,"default":""},"render":{"params":[{"name":"elt","type":"DOMElement","mandatory":false,"default":null}]}},"112b81bbdb1b85e":{"_id":"112b81bbdb1b85e","_name":"Page","load":{"params":[{"name":"dom","type":"object","mandatory":false,"default":null}]}},"1111f1e8071e204":{"_id":"1111f1e8071e204","_name":"Template","source":{"type":"html","readOnly":false,"mandatory":false,"default":""},"render":{"params":[{"name":"elt","type":"DOMElement","mandatory":false,"default":null}]}},"115b814492191b0":{"_id":"115b814492191b0","_name":"MyWidget","template":{"type":"Template","readOnly":false,"mandatory":false,"default":"mywidget"},"message":{"type":"string","readOnly":false,"mandatory":false,"default":""}}},"behaviors":{"1dab11f5c61411c":{"_id":"1dab11f5c61411c","component":"1261a1e1fa1f9d3","state":"start","action":"function start() { \n // render the html\n this.require('app').render();\n \n // load the app\n this.require('page').load();\n}","useCoreAPI":false,"core":false},"18fba183c51300f":{"_id":"18fba183c51300f","component":"Component","state":"render","action":"function render(elt) { \n var html = '',\n domNode = elt,\n listeners = {},\n domId = '',\n inc = 0,\n self = this,\n activeElementId = '',\n activeElement = null,\n cursorPosition = 0,\n schema = null,\n propertyName = '',\n properties = [];\n \n if (domNode) {\n activeElementId = document.activeElement.id;\n activeElement = document.getElementById(activeElementId);\n if (activeElement) {\n cursorPosition = activeElement.selectionStart;\n }\n domNode.innerHTML = '';\n } \n \n if (this.template()) {\n html = this.template().source();\n } \n \n // render html\n if (html) {\n \n // search for input value with component property\n html = html.replace(\n /value=\"\\{[^\\}]+\\}\"/g,\n function (match){\n var id = self.id() + (inc + 1),\n prop = match.replace('value=\"{','').replace('}\"','').trim();\n \n listeners[id] = prop; \n return ' id=\"' + id +'\" ' + match;\n }\n );\n \n // set value\n schema = this.require('db').collections()._GeneratedSchema.find({'_name': this.constructor.name})[0];\n \n for (propertyName in schema) {\n if (schema[propertyName] === 'property') {\n properties.push(propertyName);\n }\n }\n \n properties.forEach(function (val) {\n var reg = new RegExp('\\{' + val + '\\}', 'g');\n html = html.replace(reg, this[val]());\n }.bind(this));\n \n if (domNode === null) {\n domNode = document.body;\n }\n \n domNode.insertAdjacentHTML('beforeend', html);\n \n // add listeners\n for (domId in listeners) {\n document.getElementById(domId).addEventListener('keyup', function keyup(e) {\n self[listeners[domId]](this.value); \n });\n document.getElementById(domId).addEventListener('input', function input(e) {\n self[listeners[domId]](this.value); \n });\n document.getElementById(domId).addEventListener('blur', function blur(e) {\n self[listeners[domId]](this.value); \n });\n document.getElementById(domId).addEventListener('change', function change(e) {\n self[listeners[domId]](this.value); \n });\n }\n \n // restore focus if any\n activeElement = document.getElementById(activeElementId);\n if (activeElement) {\n activeElement.focus();\n activeElement.value = activeElement.value;\n activeElement.setSelectionRange(cursorPosition, cursorPosition);\n }\n }\n}","useCoreAPI":false,"core":false},"1e11612b8915c5d":{"_id":"1e11612b8915c5d","component":"Page","state":"load","action":"function load(dom) { \n\tvar components = Object.keys(this.require('db').collections()),\n\t tagNames = {},\n\t doms = document.getElementsByTagName('*'),\n\t i = 0,\n\t length = doms.length,\n\t domElt = null,\n\t attributes = [],\n\t j = 0,\n\t nbAtt = 0,\n\t config = {},\n\t Component = null,\n\t component = null;\n\t \n\t // list all the component classes\n components.forEach(function (val) {\n tagNames[val.toUpperCase()] = val;\n });\n\n // check if a HTML tag if a Web Component\n for (i = 0; i < length; i++) {\n domElt = doms[i];\n if (tagNames[domElt.tagName]) {\n attributes = domElt.attributes;\n \n nbAtt = attributes.length;\n for (j = 0; j < nbAtt; j++) {\n if (attributes[j].name === 'id') {\n config._id = attributes[j].value; \n } else {\n config[attributes[j].name] = attributes[j].value; \n }\n }\n \n Component = this.require(tagNames[domElt.tagName]);\n component = new Component(config);\n domElt.setAttribute('id', component.id());\n component.render(domElt);\n }\n }\n}","useCoreAPI":false,"core":false},"158761d3d5141db":{"_id":"158761d3d5141db","component":"Component","state":"init","action":"function init(conf) { \n var properties = [],\n schema = {},\n propertyName = '';\n \n \n schema = this.require('db').collections()._GeneratedSchema.find({'_name': this.constructor.name})[0];\n \n for (propertyName in schema) {\n if (schema[propertyName] === 'property') {\n properties.push(propertyName);\n }\n }\n \n properties.forEach(function (val) {\n this.on(val, function (value) {\n this.render(document.getElementById(this.id()));\n });\n }.bind(this));\n}","useCoreAPI":false,"core":false},"u18de81d8c213864":{"_id":"u18de81d8c213864","component":"Template","state":"render","action":"function render(elt) { \n var html = this.source(),\n domNode = elt;\n \n if (html) {\n if (domNode === null) {\n domNode = document.body;\n }\n \n domNode.insertAdjacentHTML('beforeend', html);\n }\n}","useCoreAPI":false,"core":false}},"types":{"DOMElement":{"_id":"128a215dea1ecda","name":"DOMElement","type":"object"}},"components":{"Component":{},"Page":{"page":{"_id":"page"}},"Template":{"mywidget":{"_id":"mywidget","source":"\n{message}"},"app":{"_id":"app","source":"
\n \n
"}},"MyWidget":{"a068434e-9ae4-4608-9eb4-8e9f275eb0ff":{"message":"dddd","template":"mywidget","_id":"a068434e-9ae4-4608-9eb4-8e9f275eb0ff"},"da082fb2-a96e-4ca7-8b89-a59e4f7d7b3f":{"message":"erzrzHello World!ffff","template":"mywidget","_id":"da082fb2-a96e-4ca7-8b89-a59e4f7d7b3f"}}},"_id":"1261a1e1fa1f9d3"} -------------------------------------------------------------------------------- /extensions/README.md: -------------------------------------------------------------------------------- 1 | ## System Designer Extensions 2 | 3 | You can extend System Designer by adding extensions at runtime. 4 | 5 | You will find in the system `extensions.json` a list of systems that you import in System Designer to add new features (see [this documentation](https://designfirst.io/systemdesigner/documentation/docs/en/manage-extensions.html) for more information on this subject). -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "system-designer", 3 | "version": "5.3.0", 4 | "description": "System Designer, a low-code development platform for creating systems", 5 | "homepage": "https://designfirst.io/systemdesigner/", 6 | "keywords": [ 7 | "low-code", 8 | "uml", 9 | "mda", 10 | "metamodel", 11 | "model", 12 | "design", 13 | "component", 14 | "system", 15 | "IDE", 16 | "OSGi" 17 | ], 18 | "author": { 19 | "name": "erwan carriou", 20 | "email": "erwan.carriou@mac.com" 21 | }, 22 | "license": "Apache-2.0", 23 | "repository": { 24 | "type": "git", 25 | "url": "https://github.com/design-first/system-designer.git" 26 | }, 27 | "bugs": { 28 | "url": "https://github.com/design-first/system-designer/issues" 29 | }, 30 | "main": "dist/index.html", 31 | "scripts": { 32 | "test": "grunt test", 33 | "ci": "grunt ci", 34 | "watch": "grunt watch", 35 | "clean": "grunt clean", 36 | "build": "grunt build", 37 | "web": "grunt web", 38 | "electron": "grunt electron", 39 | "cordova": "grunt cordova", 40 | "start": "grunt start", 41 | "dev": "grunt dev", 42 | "dev-cordova": "grunt dev-cordova", 43 | "cypress": "cypress open", 44 | "prepare": "husky install" 45 | }, 46 | "dependencies": { 47 | "ace-builds": "1.32.3", 48 | "bootstrap": "3.4.1", 49 | "codemirror": "5.65.16", 50 | "github-api": "3.4.0", 51 | "jquery": "3.7.1", 52 | "jsplumb": "2.15.6", 53 | "prismjs": "1.29.0", 54 | "svg-pan-zoom": "3.6.1", 55 | "system-runtime": "5.3.0", 56 | "viz.js": "2.1.2" 57 | }, 58 | "devDependencies": { 59 | "@badeball/cypress-cucumber-preprocessor": "20.0.1", 60 | "@bahmutov/cypress-esbuild-preprocessor": "2.2.0", 61 | "coffeescript": "2.7.0", 62 | "cypress": "13.6.2", 63 | "cypress-localstorage-commands": "2.2.5", 64 | "eslint": "8.56.0", 65 | "eslint-plugin-cypress": "2.15.1", 66 | "grunt": "1.6.1", 67 | "grunt-bg-shell": "2.3.3", 68 | "grunt-cli": "1.4.3", 69 | "grunt-contrib-clean": "2.0.1", 70 | "grunt-contrib-concat": "2.1.0", 71 | "grunt-contrib-connect": "4.0.0", 72 | "grunt-contrib-copy": "1.0.0", 73 | "grunt-contrib-uglify": "5.2.2", 74 | "grunt-contrib-watch": "1.1.0", 75 | "grunt-json-merge": "0.2.2", 76 | "husky": "8.0.3", 77 | "lint-staged": "15.2.0", 78 | "load-grunt-tasks": "5.1.0", 79 | "prettier": "3.2.1" 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/README.md: -------------------------------------------------------------------------------- 1 | ## System Designer sources 2 | 3 | You will find here: 4 | 5 | * `merges`: resources for a platform (*cordova*, *electron* or *web*) that are merged with the common resources 6 | * `systems`: System Designer core systems and 7 | * `www`: common resources (images and styles). -------------------------------------------------------------------------------- /src/merges/README.md: -------------------------------------------------------------------------------- 1 | ## Platform specific resources 2 | 3 | Each platform (**Web**, **Cordova**, **Electron**) can have specific resources for the build. To do so: 4 | 5 | * put the resource you want for a specific platform in the right folder, 6 | * run the build for the target you want, example: `npm run electron`, 7 | * then your resource will be added in the build. -------------------------------------------------------------------------------- /src/merges/cordova/app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Loading... 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 | YOUR SYSTEM IS RUNNING... 17 | 18 | 19 | See the logs for details 20 | 21 |
22 |
23 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /src/merges/cordova/behavior.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | behavior · system 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 36 |
37 |
38 |
39 | 40 | 44 |
45 |
46 | 47 |
48 | 49 |
50 | 51 |
52 |
53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/merges/cordova/cache.js: -------------------------------------------------------------------------------- 1 | // System Designer - Copyright 2024 Erwan Carriou 2 | // Licensed under the Apache License, Version 2.0 (the "License") 3 | 4 | const version = 'v5.3.0' 5 | 6 | const clearCaches = () => { 7 | return caches.keys().then((keys) => { 8 | return Promise.all( 9 | keys 10 | .filter((key) => { 11 | return key.indexOf(version) !== 0 12 | }) 13 | .map((key) => { 14 | return caches.delete(key) 15 | }) 16 | ) 17 | }) 18 | } 19 | 20 | self.addEventListener('install', (e) => { 21 | e.waitUntil( 22 | caches.open(version).then((cache) => { 23 | return cache 24 | .addAll([ 25 | '/', 26 | 'app/index.html', 27 | 'img/icon.png', 28 | 'img/logo.png', 29 | 'lib/bootstrap/dist/css/bootstrap.min.css', 30 | 'lib/bootstrap/dist/css/bootstrap.min.css.map', 31 | 'lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff', 32 | 'lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2', 33 | 'lib/codemirror/addon/hint/show-hint.css', 34 | 'lib/codemirror/theme/eclipse.css', 35 | 'lib/codemirror/codemirror.css', 36 | 'lib/designer/vendor.js', 37 | 'lib/editor/vendor.js', 38 | 'lib/prism/prism.css', 39 | 'lib/system-runtime/system-runtime.min.js', 40 | 'scripts/designer-runtime.js', 41 | 'scripts/diagram.js', 42 | 'scripts/editor-behavior.js', 43 | 'scripts/editor-component.js', 44 | 'scripts/editor-model.js', 45 | 'scripts/editor-schema.js', 46 | 'scripts/editor-system.js', 47 | 'scripts/editor-type.js', 48 | 'scripts/mobile.js', 49 | 'scripts/system-designer.js', 50 | 'styles/designer.css', 51 | 'styles/diagram.css', 52 | 'styles/editor.css', 53 | 'styles/mobile.css', 54 | 'behavior.html', 55 | 'component.html', 56 | 'cordova.js', 57 | 'index.html', 58 | 'model.html', 59 | 'schema.html', 60 | 'system.html', 61 | 'type.html', 62 | ]) 63 | .then(() => self.skipWaiting()) 64 | }) 65 | ) 66 | }) 67 | 68 | self.addEventListener('activate', (event) => { 69 | event.waitUntil( 70 | clearCaches().then(() => { 71 | return self.clients.claim() 72 | }) 73 | ) 74 | }) 75 | 76 | self.addEventListener('fetch', (event) => { 77 | if ( 78 | event.request.cache === 'only-if-cached' && 79 | event.request.mode !== 'same-origin' 80 | ) { 81 | return 82 | } 83 | event.respondWith( 84 | caches.match(event.request, { ignoreSearch: true }).then((response) => { 85 | return response || fetch(event.request) 86 | }) 87 | ) 88 | }) 89 | -------------------------------------------------------------------------------- /src/merges/cordova/component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | component · system 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 36 |
37 |
38 |
39 | 40 | 44 |
45 |
46 | 47 |
48 | 49 |
50 | 51 |
52 |
53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/merges/cordova/cordova.js: -------------------------------------------------------------------------------- 1 | if (typeof window.cordova !== undefined) { 2 | window.cordova = {}; 3 | } -------------------------------------------------------------------------------- /src/merges/cordova/img/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/design-first/system-designer/8b142fc81c4deb8be084b34ed73bf2a954498f74/src/merges/cordova/img/icon.png -------------------------------------------------------------------------------- /src/merges/cordova/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | System Designer 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 35 |
36 |
37 | 38 | 42 |
43 | 44 |
45 | 46 |
47 | 48 |
49 |
50 | 51 |
52 | 56 | 60 | 64 | 68 |
69 |
70 |
71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /src/merges/cordova/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "System Designer", 3 | "short_name": "SystemDesigner", 4 | "description": "System Designer, a low-code development platform for creating systems", 5 | "icons": [ 6 | { 7 | "src": "img/icon.png", 8 | "type": "image/png", 9 | "sizes": "512x512" 10 | } 11 | ], 12 | "start_url": "index.html", 13 | "display": "fullscreen", 14 | "scope": ".", 15 | "dir": "ltr", 16 | "lang": "en-US", 17 | "orientation": "landscape", 18 | "theme_color": "#e7e7e7", 19 | "background_color": "#ffffff", 20 | "prefer_related_applications": true, 21 | "related_applications": [ 22 | ] 23 | } -------------------------------------------------------------------------------- /src/merges/cordova/model.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | model · system 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 35 |
36 |
37 |
38 | 39 | 43 |
44 |
45 | 46 |
47 | 48 |
49 | 50 |
51 |
52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/merges/cordova/schema.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | schema · system 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 36 |
37 |
38 |
39 | 40 | 44 |
45 |
46 | 47 |
48 | 49 |
50 | 51 |
52 |
53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/merges/cordova/scripts/mobile.js: -------------------------------------------------------------------------------- 1 | /* 2 | * System Designer 3 | * 4 | * https://designfirst.io/systemdesigner/ 5 | * 6 | * Copyright 2024 Erwan Carriou 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | document.addEventListener('deviceready', onDeviceReady, false) 22 | 23 | function onDeviceReady() { 24 | StatusBar.hide() 25 | } 26 | 27 | document.addEventListener('menubutton', onMenuButton, false) 28 | function onMenuButton() { 29 | if (document.location.href.indexOf('/app/') !== -1) { 30 | document.location.href = 31 | '../index.html?messages=' + encodeURIComponent(JSON.stringify(mess)) 32 | } else { 33 | document.location.href = 34 | 'index.html?messages=' + encodeURIComponent(JSON.stringify(mess)) 35 | } 36 | } 37 | 38 | document.addEventListener('backbutton', systemDesignerBack, false) 39 | function systemDesignerBack() { 40 | var mess = 41 | typeof messages !== 'undefined' 42 | ? messages 43 | : runtime.require('state').messages(), 44 | ref = 45 | typeof lastPage !== 'undefined' 46 | ? lastPage 47 | : runtime.require('state').lastPage() 48 | 49 | if (document.location.href.indexOf('/app/') !== -1) { 50 | document.location.href = 51 | '../' + ref + '?messages=' + encodeURIComponent(JSON.stringify(mess)) 52 | } else { 53 | document.location.href = 54 | ref + '?messages=' + encodeURIComponent(JSON.stringify(mess)) 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/merges/cordova/styles/mobile.css: -------------------------------------------------------------------------------- 1 | /* 2 | * System Designer 3 | * 4 | * https://designfirst.io/systemdesigner/ 5 | * 6 | * Copyright 2024 Erwan Carriou 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | .designer-system-menu-export { 22 | display: none!important; 23 | } 24 | #designer-dialog-config-client-type-debugging { 25 | display: none!important; 26 | } 27 | #designer-dialog-config-client-form { 28 | display: none!important; 29 | } 30 | #designer-dialog-config-server-form { 31 | display: none!important; 32 | } 33 | body, 34 | .navbar-fixed-top, 35 | .navbar-fixed-bottom, 36 | #designer-menubar-header ~ div { 37 | min-width: 650px!important; 38 | } 39 | html { 40 | background-color: transparent!important; 41 | } 42 | body { 43 | background-color: transparent!important; 44 | } 45 | span.glyphicon.glyphicon-menu-left { 46 | color:#337ab7!important; 47 | } 48 | 49 | .CodeMirror-gutter-wrapper { 50 | -webkit-user-select: none; 51 | -moz-user-select: none; 52 | user-select: none; 53 | } 54 | 55 | #designer-message { 56 | width: 300px!important; 57 | } 58 | 59 | .log-number { 60 | position: absolute; 61 | right: -20px; 62 | } 63 | 64 | /* iPhone 5 / 5S / SE */ 65 | @media only screen 66 | and (max-width: 600px) { 67 | .container { 68 | padding-right: 70px!important; 69 | } 70 | .list-group.designer-library { 71 | max-height:110px!important; 72 | } 73 | #designer-toolbar-item-search { 74 | display: none; 75 | } 76 | #designer-toolbar-item-command { 77 | display: none; 78 | } 79 | #designer-toolbar-item-extension { 80 | display: none; 81 | } 82 | } 83 | 84 | /* iPhone 6 / 7 / 8 */ 85 | @media only screen 86 | and (max-width : 667px) { 87 | .list-group.designer-library { 88 | max-height:90; 89 | } 90 | #designer-dialog-import-file-modal .modal-body { 91 | padding-bottom: 0; 92 | } 93 | #designer-dialog-import-file-modal .modal-footer { 94 | padding-top: 0; 95 | } 96 | #designer-dialog-import-modal-from-file-form, 97 | #designer-dialog-import-file-modal-well { 98 | margin-bottom: 0; 99 | } 100 | #designer-dialog-sync-modal .modal-body { 101 | padding-bottom: 0; 102 | } 103 | #designer-dialog-sync-modal .modal-footer { 104 | padding-top: 0; 105 | } 106 | #designer-toolbar-item-search { 107 | display: none; 108 | } 109 | #designer-toolbar-item-command { 110 | display: none; 111 | } 112 | #designer-toolbar-item-extension { 113 | display: none; 114 | } 115 | } 116 | 117 | /* iPhone 6+ / 7+ / 8+ */ 118 | @media only screen 119 | and (max-width : 736px) { 120 | .list-group.designer-library { 121 | max-height:150px; 122 | } 123 | #designer-toolbar-item-search { 124 | display: none; 125 | } 126 | #designer-toolbar-item-command { 127 | display: none; 128 | } 129 | #designer-toolbar-item-extension { 130 | display: none; 131 | } 132 | } 133 | 134 | /* iPhone X, iPhone XS */ 135 | @media only screen 136 | and (device-width : 375px) 137 | and (device-height : 812px) 138 | and (-webkit-device-pixel-ratio : 3) { 139 | body, 140 | .navbar-fixed-top, 141 | .navbar-fixed-bottom { 142 | width: 812px!important; 143 | } 144 | #designer-toolbar-item-command { 145 | display: none; 146 | } 147 | } 148 | 149 | /* iPhone XR */ 150 | @media only screen 151 | and (device-width : 414px) 152 | and (device-height : 896px) 153 | and (-webkit-device-pixel-ratio : 2) { 154 | body, 155 | .navbar-fixed-top, 156 | .navbar-fixed-bottom { 157 | width: 896px!important; 158 | } 159 | #designer-toolbar-item-command { 160 | display: none; 161 | } 162 | } 163 | 164 | /* iPhone XS Max */ 165 | @media only screen 166 | and (device-width : 414px) 167 | and (device-height : 896px) 168 | and (-webkit-device-pixel-ratio : 3) { 169 | body, 170 | .navbar-fixed-top, 171 | .navbar-fixed-bottom { 172 | width: 896px!important; 173 | } 174 | #designer-toolbar-item-command { 175 | display: none; 176 | } 177 | } 178 | 179 | -------------------------------------------------------------------------------- /src/merges/cordova/system.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | system 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 36 |
37 |
38 |
39 | 40 | 44 |
45 |
46 | 47 |
48 | 49 |
50 | 51 |
52 |
53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/merges/cordova/type.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | type · system 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 36 |
37 |
38 |
39 | 40 | 44 |
45 |
46 | 47 |
48 | 49 |
50 | 51 |
52 |
53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/merges/electron/app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Loading... 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 | 15 | YOUR SYSTEM IS RUNNING... 16 | 17 | 18 | See the logs for details 19 | 20 |
21 |
22 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /src/merges/electron/behavior.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | behavior · system 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 30 |
31 |
32 |
33 | 34 | 38 |
39 |
40 | 41 |
42 | 43 |
44 | 45 |
46 |
47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/merges/electron/component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | component · system 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 30 |
31 |
32 |
33 | 34 | 38 |
39 |
40 | 41 |
42 | 43 |
44 | 45 |
46 |
47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/merges/electron/diagram.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | diagrams · system 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 30 |
31 |
32 |
33 | 34 | 38 |
39 |
40 | 41 |
42 | 43 |
44 | 45 |
46 |
47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/merges/electron/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | System Designer 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 32 |
33 |
34 | 35 | 39 |
40 | 41 |
42 | 43 |
44 | 45 |
46 |
47 | 48 |
49 | 53 | 57 | 61 | 65 |
66 |
67 |
68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/merges/electron/model.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | model · system 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 30 |
31 |
32 |
33 | 34 | 38 |
39 |
40 | 41 |
42 | 43 |
44 | 45 |
46 |
47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/merges/electron/schema.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | schema · system 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 30 |
31 |
32 |
33 | 34 | 38 |
39 |
40 | 41 |
42 | 43 |
44 | 45 |
46 |
47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/merges/electron/system.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | system 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 30 |
31 |
32 |
33 | 34 | 38 |
39 |
40 | 41 |
42 | 43 |
44 | 45 |
46 |
47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/merges/electron/type.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | type · system 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 30 |
31 |
32 |
33 | 34 | 38 |
39 |
40 | 41 |
42 | 43 |
44 | 45 |
46 |
47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/merges/electron/video/systemdesigner.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/design-first/system-designer/8b142fc81c4deb8be084b34ed73bf2a954498f74/src/merges/electron/video/systemdesigner.mp4 -------------------------------------------------------------------------------- /src/merges/web/app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Loading... 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 | YOUR SYSTEM IS RUNNING... 19 | 20 | 21 | See the logs for details 22 | 23 |
24 |
25 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /src/merges/web/behavior.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | behavior · system 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 33 |
34 |
35 |
36 | 37 | 41 |
42 |
43 | 44 |
45 | 46 |
47 | 48 |
49 |
50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/merges/web/cache.js: -------------------------------------------------------------------------------- 1 | // System Designer - Copyright 2024 Erwan Carriou 2 | // Licensed under the Apache License, Version 2.0 (the "License") 3 | 4 | const version = 'v5.3.0' 5 | 6 | const clearCaches = () => { 7 | return caches.keys().then((keys) => { 8 | return Promise.all( 9 | keys 10 | .filter((key) => { 11 | return key.indexOf(version) !== 0 12 | }) 13 | .map((key) => { 14 | return caches.delete(key) 15 | }) 16 | ) 17 | }) 18 | } 19 | 20 | self.addEventListener('install', (e) => { 21 | e.waitUntil( 22 | caches.open(version).then((cache) => { 23 | return cache 24 | .addAll([ 25 | '/', 26 | 'app/index.html', 27 | 'behavior.html', 28 | 'component.html', 29 | 'index.html', 30 | 'model.html', 31 | 'schema.html', 32 | 'system.html', 33 | 'type.html', 34 | 'diagram.html', 35 | 'styles/editor.css', 36 | 'styles/designer.css', 37 | 'styles/diagram.css', 38 | 'systems/designer-runtime.json', 39 | 'systems/system-designer.json', 40 | 'systems/editor-behavior.json', 41 | 'systems/editor-component.json', 42 | 'systems/editor-model.json', 43 | 'systems/editor-schema.json', 44 | 'systems/editor-system.json', 45 | 'systems/editor-type.json', 46 | 'systems/diagram.json', 47 | 'img/favicon.ico', 48 | 'img/logo.png', 49 | 'lib/ace/ace.js', 50 | 'lib/ace/mode-javascript.js', 51 | 'lib/ace/mode-json.js', 52 | 'lib/ace/mode-css.js', 53 | 'lib/ace/mode-html.js', 54 | 'lib/ace/worker-json.js', 55 | 'lib/ace/worker-html.js', 56 | 'lib/ace/worker-javascript.js', 57 | 'lib/ace/worker-css.js', 58 | 'lib/ace/ext-searchbox.js', 59 | 'lib/ace/ext-language_tools.js', 60 | 'lib/bootstrap/dist/css/bootstrap.min.css', 61 | 'lib/bootstrap/dist/css/bootstrap.min.css.map', 62 | 'lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff', 63 | 'lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2', 64 | 'lib/prism/prism.css', 65 | 'lib/system-runtime/system-runtime.min.js', 66 | 'lib/designer/vendor.js', 67 | 'lib/editor/vendor.js', 68 | 'lib/diagram/vendor.js', 69 | 'manifest.json', 70 | 'img/icon.png', 71 | ]) 72 | .then(() => self.skipWaiting()) 73 | }) 74 | ) 75 | }) 76 | 77 | self.addEventListener('activate', (event) => { 78 | event.waitUntil( 79 | clearCaches().then(() => { 80 | return self.clients.claim() 81 | }) 82 | ) 83 | }) 84 | 85 | self.addEventListener('fetch', (event) => { 86 | if ( 87 | event.request.cache === 'only-if-cached' && 88 | event.request.mode !== 'same-origin' 89 | ) { 90 | return 91 | } 92 | event.respondWith( 93 | caches.match(event.request, { ignoreSearch: true }).then((response) => { 94 | return response || fetch(event.request) 95 | }) 96 | ) 97 | }) 98 | -------------------------------------------------------------------------------- /src/merges/web/component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | 11 | component · system 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 34 |
35 |
36 |
37 | 38 | 42 |
43 |
44 | 45 |
46 | 47 |
48 | 49 |
50 |
51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/merges/web/diagram.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | diagrams · system 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 33 |
34 |
35 |
36 | 37 | 41 |
42 |
43 | 44 |
45 | 46 |
47 | 48 |
49 |
50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/merges/web/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/design-first/system-designer/8b142fc81c4deb8be084b34ed73bf2a954498f74/src/merges/web/img/favicon.ico -------------------------------------------------------------------------------- /src/merges/web/img/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/design-first/system-designer/8b142fc81c4deb8be084b34ed73bf2a954498f74/src/merges/web/img/icon.png -------------------------------------------------------------------------------- /src/merges/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | System Designer 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 37 |
38 |
39 | 40 | 44 |
45 | 46 |
47 | 48 |
49 | 50 |
51 |
52 | 53 |
54 | 58 | 62 | 66 | 70 |
71 |
72 |
73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /src/merges/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "System Designer", 3 | "short_name": "SystemDesigner", 4 | "description": "System Designer, a low-code development platform for creating systems", 5 | "icons": [ 6 | { 7 | "src": "img/icon.png", 8 | "type": "image/png", 9 | "sizes": "512x512" 10 | } 11 | ], 12 | "start_url": "index.html", 13 | "display": "fullscreen", 14 | "scope": ".", 15 | "dir": "ltr", 16 | "lang": "en-US", 17 | "orientation": "landscape", 18 | "theme_color": "#e7e7e7", 19 | "background_color": "#ffffff", 20 | "prefer_related_applications": true, 21 | "related_applications": [ 22 | { 23 | "platform": "play", 24 | "url": "https://play.google.com/store/apps/details?id=com.ecarriou.systemdesignerios" 25 | }, 26 | { 27 | "platform": "itunes", 28 | "url": "https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=1132983280&mt=8" 29 | } 30 | ] 31 | } -------------------------------------------------------------------------------- /src/merges/web/model.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | model · system 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 33 |
34 |
35 |
36 | 37 | 41 |
42 |
43 | 44 |
45 | 46 |
47 | 48 |
49 |
50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/merges/web/schema.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | schema · system 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 33 |
34 |
35 |
36 | 37 | 41 |
42 |
43 | 44 |
45 | 46 |
47 | 48 |
49 |
50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/merges/web/system.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | system 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 33 |
34 |
35 |
36 | 37 | 41 |
42 |
43 | 44 |
45 | 46 |
47 | 48 |
49 |
50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/merges/web/type.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | type · system 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 33 |
34 |
35 |
36 | 37 | 41 |
42 |
43 | 44 |
45 | 46 |
47 | 48 |
49 |
50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/systems/README.md: -------------------------------------------------------------------------------- 1 | ## System Designer systems 2 | 3 | System Designer is entirely based on **systems** that you edit with System Designer. You can update all its components, models or behaviors to follow your needs. To do so: 4 | 5 | * open a version of [System Designer](https://designfirst.io/systemdesigner/), 6 | * import the system you want, 7 | * edit the system, 8 | * export it, 9 | * save it in the same place and 10 | * run `npm run build`. 11 | 12 | ### Architecture 13 | 14 | * `classes`: systems of System Designer 15 | * `core`: core system of each pages. Entry point is *system-designer.json* system 16 | * `platforms`: specific system for each platform 17 | * `types`: types used in System Designer 18 | -------------------------------------------------------------------------------- /src/systems/classes/CSS-class.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CSS-class", 3 | "master": false, 4 | "version": "1.0.0", 5 | "description": "CSS class", 6 | "schemas": { 7 | "h1544a15cd115619": { 8 | "_name": "CSS", 9 | "source": "property", 10 | "_id": "h1544a15cd115619" 11 | } 12 | }, 13 | "models": { 14 | "j1933417dac11240": { 15 | "_name": "CSS", 16 | "source": { 17 | "type": "css", 18 | "readOnly": true, 19 | "mandatory": true, 20 | "default": "" 21 | }, 22 | "_id": "j1933417dac11240" 23 | } 24 | }, 25 | "behaviors": {}, 26 | "types": {}, 27 | "components": {}, 28 | "_id": "m1f83911c841edda" 29 | } 30 | -------------------------------------------------------------------------------- /src/systems/classes/Diagram-class.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Diagram-class", 3 | "master": false, 4 | "version": "0.0.1", 5 | "description": "", 6 | "schemas": { 7 | "v123b51abbb18712": { 8 | "_id": "v123b51abbb18712", 9 | "_name": "Diagram", 10 | "_inherit": ["_Component"], 11 | "data": "property", 12 | "ref": "property", 13 | "zoom": "property", 14 | "render": "method" 15 | } 16 | }, 17 | "models": { 18 | "b169321637f19101": { 19 | "_id": "b169321637f19101", 20 | "_name": "Diagram", 21 | "_description": "", 22 | "ref": { 23 | "description": "", 24 | "type": "any", 25 | "readOnly": false, 26 | "mandatory": false, 27 | "default": "" 28 | }, 29 | "zoom": { 30 | "description": "", 31 | "type": "number", 32 | "readOnly": false, 33 | "mandatory": false, 34 | "default": 1 35 | }, 36 | "render": { "description": "", "params": [], "result": "any" }, 37 | "data": { 38 | "description": "", 39 | "type": "string", 40 | "readOnly": false, 41 | "mandatory": false, 42 | "default": "" 43 | } 44 | } 45 | }, 46 | "behaviors": {}, 47 | "types": {}, 48 | "components": { "Diagram": {} }, 49 | "_id": "n15bc813449110aa" 50 | } 51 | -------------------------------------------------------------------------------- /src/systems/classes/Extension-class.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Extension-class", 3 | "master": false, 4 | "version": "1.0.0", 5 | "description": "", 6 | "schemas": { 7 | "x15866118f7110a3": { 8 | "_id": "x15866118f7110a3", 9 | "_name": "Extension", 10 | "_inherit": ["_Component"], 11 | "source": "property", 12 | "isCore": "property", 13 | "installed": "property" 14 | } 15 | }, 16 | "models": { 17 | "h19261129ee12d64": { 18 | "_id": "h19261129ee12d64", 19 | "_name": "Extension", 20 | "source": { 21 | "type": "json", 22 | "readOnly": false, 23 | "mandatory": false, 24 | "default": {} 25 | }, 26 | "installed": { 27 | "type": "boolean", 28 | "readOnly": false, 29 | "mandatory": false, 30 | "default": false 31 | }, 32 | "isCore": { 33 | "type": "boolean", 34 | "readOnly": false, 35 | "mandatory": false, 36 | "default": true 37 | } 38 | } 39 | }, 40 | "behaviors": {}, 41 | "types": {}, 42 | "components": { 43 | "Extension": {} 44 | }, 45 | "_id": "a17fd51fe2d145a6" 46 | } 47 | -------------------------------------------------------------------------------- /src/systems/classes/Internationalization-class.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Internationalization-class", 3 | "master": false, 4 | "version": "1.0.0", 5 | "description": "Intertionalization", 6 | "schemas": { 7 | "a77b5281-cd56-477a-8201-c2ffdfe14317": { 8 | "_id": "a77b5281-cd56-477a-8201-c2ffdfe14317", 9 | "_name": "Strings", 10 | "_inherit": ["_Component"], 11 | "help_systems": "property", 12 | "help_schemas": "property", 13 | "help_models": "property", 14 | "help_types": "property", 15 | "help_behaviors": "property", 16 | "help_components": "property", 17 | "help_logs": "property" 18 | }, 19 | "c452eff3-f0f1-4dd5-ad8d-b5a3ec521352": { 20 | "_id": "c452eff3-f0f1-4dd5-ad8d-b5a3ec521352", 21 | "_name": "Internationalization", 22 | "_inherit": ["_Component"], 23 | "get": "method", 24 | "locale": "property" 25 | } 26 | }, 27 | "models": { 28 | "eabc29ab-77ba-4eee-ad98-68dac6797ee8": { 29 | "_id": "eabc29ab-77ba-4eee-ad98-68dac6797ee8", 30 | "_name": "Strings", 31 | "_description": "", 32 | "help_systems": { 33 | "description": "", 34 | "type": "string", 35 | "readOnly": false, 36 | "mandatory": false, 37 | "default": "" 38 | }, 39 | "help_schemas": { 40 | "description": "", 41 | "type": "string", 42 | "readOnly": false, 43 | "mandatory": false, 44 | "default": "" 45 | }, 46 | "help_models": { 47 | "description": "", 48 | "type": "string", 49 | "readOnly": false, 50 | "mandatory": false, 51 | "default": "" 52 | }, 53 | "help_types": { 54 | "description": "", 55 | "type": "string", 56 | "readOnly": false, 57 | "mandatory": false, 58 | "default": "" 59 | }, 60 | "help_behaviors": { 61 | "description": "", 62 | "type": "string", 63 | "readOnly": false, 64 | "mandatory": false, 65 | "default": "" 66 | }, 67 | "help_components": { 68 | "description": "", 69 | "type": "string", 70 | "readOnly": false, 71 | "mandatory": false, 72 | "default": "" 73 | }, 74 | "help_logs": { 75 | "description": "", 76 | "type": "string", 77 | "readOnly": false, 78 | "mandatory": false, 79 | "default": "" 80 | } 81 | }, 82 | "ba12d3ed-d8cc-4809-9821-9a1351268fc5": { 83 | "_id": "ba12d3ed-d8cc-4809-9821-9a1351268fc5", 84 | "_name": "Internationalization", 85 | "_description": "", 86 | "get": { 87 | "description": "", 88 | "params": [ 89 | { 90 | "description": "", 91 | "name": "key", 92 | "type": "string", 93 | "mandatory": true, 94 | "default": "" 95 | } 96 | ], 97 | "result": "string" 98 | }, 99 | "locale": { 100 | "description": "", 101 | "type": "string", 102 | "readOnly": false, 103 | "mandatory": false, 104 | "default": "en-US" 105 | } 106 | } 107 | }, 108 | "behaviors": { 109 | "f71c2810-ffb7-4f19-a94b-2e08ec78d256": { 110 | "_id": "f71c2810-ffb7-4f19-a94b-2e08ec78d256", 111 | "component": "Internationalization", 112 | "state": "get", 113 | "action": "function get(key) { \n let strings = this.require(this.locale());\n if (!strings) {\n strings = this.require('en-US');\n }\n return strings[key]();\n}", 114 | "useCoreAPI": false, 115 | "core": false 116 | } 117 | }, 118 | "types": {}, 119 | "components": { 120 | "Internationalization": { "i18n": { "_id": "i18n", "locale": "en-US" } }, 121 | "Strings": { 122 | "en-US": { 123 | "_id": "en-US", 124 | "help_systems": "An application is a system. Once you have created one, your next step is to create a schema.", 125 | "help_schemas": "A schema is the definition of your model. Models are generated based on the schema definition.", 126 | "help_models": "A model is an UML representation of your classes. It is generated from a schema.", 127 | "help_types": "A type is used in your model to define an enumeration or a structure.", 128 | "help_behaviors": "A behavior is the action to do when a method or an event is called.", 129 | "help_components": "Components are your classes instances. Their states are saved in a store, a JSON object.", 130 | "help_logs": "You will find here the logs of the running system.

Example of code to send a log:

this
.require('logger')
.info('hello world');
" 131 | } 132 | } 133 | }, 134 | "_id": "ca2b16d9-9354-45b8-b44e-4ea273b838ad" 135 | } 136 | -------------------------------------------------------------------------------- /src/systems/classes/JS-class.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "JS-class", 3 | "master": false, 4 | "version": "1.0.0", 5 | "description": "", 6 | "schemas": { 7 | "w10edc1dd24108d1": { 8 | "_name": "JS", 9 | "source": "property", 10 | "_id": "w10edc1dd24108d1", 11 | "_inherit": ["_Component"] 12 | } 13 | }, 14 | "models": { 15 | "o180bb1fb96134b7": { 16 | "_name": "JS", 17 | "source": { 18 | "type": "javascript", 19 | "readOnly": true, 20 | "mandatory": true, 21 | "default": "" 22 | }, 23 | "_id": "o180bb1fb96134b7" 24 | } 25 | }, 26 | "behaviors": {}, 27 | "types": {}, 28 | "components": { 29 | "JS": { 30 | "app-github.js": { 31 | "_id": "app-github.js", 32 | "source": "/* \n * {{name}}\n * \n * @description {{description}}\n * \n * @module {{name}}\n * @version {{version}}\n * @requires system-runtime\n * \n */\n\n// install System Runtime\nconst runtime = require('system-runtime');\n\n// set the level of log\nruntime.require('logger').level('{{logLevel}}');\n\n// install and start the system\nruntime.install({{system}});" 33 | }, 34 | "app.js": { 35 | "_id": "app.js", 36 | "source": "/* \n * {{name}}\n * \n * @description {{description}}\n * \n * @module {{name}}\n * @version {{version}}\n * @requires system-runtime\n * \n */\n\n// install System Runtime\nconst runtime = require('system-runtime');\n\n// uncomment this line to debug your system\n// runtime.install('node_modules/system-runtime/extensions/mode-admin-server.json');\n\n// set the level of log\nruntime.require('logger').level('{{logLevel}}');\n\n// install and start the system\nruntime.install({{system}});" 37 | }, 38 | "javascript-export.js": { 39 | "_id": "javascript-export.js", 40 | "source": "/* \n * {{name}}\n * \n * @description {{description}}\n * \n * @system {{name}}\n * @version {{version}}\n * @requires system-runtime\n * \n */\n\n// uncomment this line if this system runs on node.js\n// const runtime = require('system-runtime');\n\n// uncomment this line to debug your system on node.js\n// runtime.install('node_modules/system-runtime/extensions/mode-admin-server.json');\n\nruntime.require('logger').level('{{logLevel}}');\n\n" 41 | } 42 | } 43 | }, 44 | "_id": "k177271eabf1db74" 45 | } 46 | -------------------------------------------------------------------------------- /src/systems/classes/Language-class.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Language-class", 3 | "master": false, 4 | "version": "1.0.0", 5 | "description": "", 6 | "schemas": { 7 | "g1f6ce17a5713f1d": { 8 | "_id": "g1f6ce17a5713f1d", 9 | "_name": "Language", 10 | "_inherit": ["_Component"], 11 | "target": "property", 12 | "createBehaviorBody": "method", 13 | "createBehavior": "method", 14 | "createDestroyBehavior": "method", 15 | "createStartBehavior": "method", 16 | "createMergeComment": "method", 17 | "createBehaviorHeader": "method", 18 | "createBehaviorParameters": "method", 19 | "createBehaviorParametersEvent": "method", 20 | "createBehaviorParametersEventArray": "method" 21 | } 22 | }, 23 | "models": { 24 | "i1bab91d926104d3": { 25 | "_id": "i1bab91d926104d3", 26 | "_name": "Language", 27 | "target": { 28 | "type": "language", 29 | "readOnly": false, 30 | "mandatory": false, 31 | "default": "javascript" 32 | }, 33 | "createBehaviorBody": { 34 | "params": [ 35 | { 36 | "name": "returnedType", 37 | "type": "string", 38 | "mandatory": false, 39 | "default": "string" 40 | } 41 | ], 42 | "result": "string" 43 | }, 44 | "createBehavior": { 45 | "params": [ 46 | { 47 | "name": "name", 48 | "type": "string", 49 | "mandatory": false, 50 | "default": "" 51 | }, 52 | { 53 | "name": "params", 54 | "type": "string", 55 | "mandatory": false, 56 | "default": "" 57 | }, 58 | { 59 | "name": "body", 60 | "type": "string", 61 | "mandatory": false, 62 | "default": "" 63 | } 64 | ], 65 | "result": "string" 66 | }, 67 | "createDestroyBehavior": { "result": "string" }, 68 | "createStartBehavior": { "result": "string" }, 69 | "createMergeComment": { 70 | "params": [ 71 | { 72 | "name": "systemName", 73 | "type": "string", 74 | "mandatory": false, 75 | "default": "" 76 | } 77 | ], 78 | "result": "string" 79 | }, 80 | "createBehaviorHeader": { 81 | "params": [ 82 | { 83 | "name": "name", 84 | "type": "string", 85 | "mandatory": false, 86 | "default": "" 87 | }, 88 | { 89 | "name": "params", 90 | "type": "string", 91 | "mandatory": false, 92 | "default": "" 93 | } 94 | ], 95 | "result": "string" 96 | }, 97 | "createBehaviorParameters": { 98 | "params": [ 99 | { 100 | "name": "model", 101 | "type": "object", 102 | "mandatory": false, 103 | "default": {} 104 | } 105 | ], 106 | "result": "string" 107 | }, 108 | "createBehaviorParametersEvent": { "result": "string" }, 109 | "createBehaviorParametersEventArray": { "result": "string" } 110 | } 111 | }, 112 | "behaviors": { 113 | "e1e35e1690f16945": { 114 | "_id": "e1e35e1690f16945", 115 | "component": "Language", 116 | "state": "createBehaviorBody", 117 | "action": "function createBehaviorBody(returnedType) { \n\tvar body = ' \\n';\n\t\n\tswitch(this.target()) {\n\t case 'javascript':\n switch (returnedType) {\n case 'css':\n case 'html':\n case 'javascript': \n case 'string':\n body = \" let result = '';\\n return result;\\n\";\n break;\n case 'array':\n body = \" let result = [];\\n return result;\\n\";\n break;\n case 'number':\n body = \" let result = 0;\\n return result;\\n\";\n break;\n case 'boolean':\n body = \" let result = false;\\n return result;\\n\";\n break;\n case 'object':\n case 'json':\n body = \" let result = {};\\n return result;\\n\";\n break;\n case 'date':\n body = \" let result = '';\\n return result;\\n\";\n break;\n case 'any':\n body = \" let result = '';\\n return result;\\n\";\n break;\n default:\n body = \" let result = {};\\n return result;\\n\";\n break;\n }\n\t break;\n\t default:\n\t break;\n\t}\n\t\n\treturn body;\n}", 118 | "useCoreAPI": false, 119 | "core": false 120 | }, 121 | "v19a5a1998c1efa2": { 122 | "_id": "v19a5a1998c1efa2", 123 | "component": "Language", 124 | "state": "createBehavior", 125 | "action": "function createBehavior(name, params, body) { \n\tvar behavior = '',\n\t funcName = '';\n\n\tswitch(this.target()) {\n\t case 'javascript':\n\t if (body === '') {\n\t body = ' \\n';\n\t }\n\t \n\t if (name.indexOf('.') !== -1) {\n\t funcName = name.split('.')[name.split('.').length - 1];\n\t } else {\n\t funcName = name;\n\t }\n\t \n\t behavior = \"function \" + funcName + \"(\" + params + \") { \\n\" + body + \"}\";\n\t break;\n default:\n break;\n\t}\n\t\n\treturn behavior;\n}", 126 | "useCoreAPI": false, 127 | "core": false 128 | }, 129 | "v1825c1731e17082": { 130 | "_id": "v1825c1731e17082", 131 | "component": "Language", 132 | "state": "createDestroyBehavior", 133 | "action": "function createDestroyBehavior() { \n\tvar behavior = '';\n\t\n\tswitch(this.target()) {\n\t case 'javascript':\n\t behavior = \"function destroy() { \\n\\n // destroy the component\\n $component.destroy(this.id());\\n}\";\n\t break;\n default:\n break;\n\t}\n\t\n\treturn behavior;\n}", 134 | "useCoreAPI": false, 135 | "core": false 136 | }, 137 | "z138a2168e11cfc5": { 138 | "_id": "z138a2168e11cfc5", 139 | "component": "Language", 140 | "state": "createStartBehavior", 141 | "action": "function createStartBehavior() { \n\tvar behavior = '';\n\t\n\tswitch(this.target()) {\n\t case 'javascript':\n\t behavior = \"function start() { \\n \\n}\";\n\t break;\n default:\n break;\n\t}\n\t\n\treturn behavior;\n}", 142 | "useCoreAPI": false, 143 | "core": false 144 | }, 145 | "a17ad5184f61b5cd": { 146 | "_id": "a17ad5184f61b5cd", 147 | "component": "Language", 148 | "state": "createMergeComment", 149 | "action": "function createMergeComment(systemName) { \n\tvar comment = '';\n\t\n\tswitch(this.target()) {\n\t case 'javascript':\n\t comment = '\\n // from system ' + systemName + '\\n';\n\t break;\n default:\n break;\n\t}\n\t\n\treturn comment;\n}", 150 | "useCoreAPI": false, 151 | "core": false 152 | }, 153 | "s1bb671c9261461a": { 154 | "_id": "s1bb671c9261461a", 155 | "component": "Language", 156 | "state": "createBehaviorHeader", 157 | "action": "function createBehaviorHeader(name, params) { \n\tvar header = '';\n\t\n\tswitch(this.target()) {\n\t case 'javascript':\n\t header = 'function ' + name + '(' + params + ') ';\n\t break;\n default:\n break;\n\t}\n\t\n\treturn header;\n}", 158 | "useCoreAPI": false, 159 | "core": false 160 | }, 161 | "x1833b1fece19d5b": { 162 | "_id": "x1833b1fece19d5b", 163 | "component": "Language", 164 | "state": "createBehaviorParameters", 165 | "action": "function createBehaviorParameters(model) { \n\tvar params = '',\n\t i = 0,\n\t length = 0;\n\t\n\tswitch(this.target()) {\n\t case 'javascript':\n\t if (model && model.length) {\n length = model.length;\n for (i = 0; i < length; i++) {\n if (i === 0) {\n params = model[i].name;\n } else {\n params = params + ', ' + model[i].name;\n }\n }\n }\n\t break;\n default:\n break;\n\t}\n\t\n\treturn params;\n}", 166 | "useCoreAPI": false, 167 | "core": false 168 | }, 169 | "l171be17d531662a": { 170 | "_id": "l171be17d531662a", 171 | "component": "Language", 172 | "state": "createBehaviorParametersEvent", 173 | "action": "function createBehaviorParametersEvent() { \n\tvar parameters = '';\n\t\n\tswitch(this.target()) {\n\t case 'javascript':\n\t parameters = 'value';\n\t break;\n default:\n break;\n\t}\n\t\n\treturn parameters;\n}", 174 | "useCoreAPI": false, 175 | "core": false 176 | }, 177 | "y16ae91b06c1a586": { 178 | "_id": "y16ae91b06c1a586", 179 | "component": "Language", 180 | "state": "createBehaviorParametersEventArray", 181 | "action": "function createBehaviorParametersEventArray() { \n\tvar parameters = '';\n\t\n\tswitch(this.target()) {\n\t case 'javascript':\n\t parameters = 'value, type';\n\t break;\n default:\n break;\n\t}\n\t\n\treturn parameters;\n}", 182 | "useCoreAPI": false, 183 | "core": false 184 | } 185 | }, 186 | "types": { 187 | "language": { 188 | "_id": "z19c6b10ed914764", 189 | "name": "language", 190 | "type": "any", 191 | "value": ["javascript"] 192 | } 193 | }, 194 | "components": { 195 | "Language": { "language": { "_id": "language", "target": "javascript" } } 196 | }, 197 | "_id": "c1e49117cdf1ef81" 198 | } 199 | -------------------------------------------------------------------------------- /src/systems/classes/Log-class.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Log-class", 3 | "master": false, 4 | "version": "1.0.0", 5 | "description": "", 6 | "schemas": { 7 | "v1f156196ff13c17": { 8 | "_name": "Log", 9 | "type": "property", 10 | "log": "property", 11 | "_id": "v1f156196ff13c17", 12 | "_inherit": ["_Component"] 13 | } 14 | }, 15 | "models": { 16 | "l100ba180b514a8b": { 17 | "_name": "Log", 18 | "type": { 19 | "type": "string", 20 | "readOnly": true, 21 | "mandatory": true, 22 | "default": "debug" 23 | }, 24 | "log": { 25 | "type": "string", 26 | "readOnly": true, 27 | "mandatory": true, 28 | "default": "" 29 | }, 30 | "_id": "l100ba180b514a8b" 31 | } 32 | }, 33 | "behaviors": {}, 34 | "types": {}, 35 | "components": {}, 36 | "_id": "p1ec321145518bb5" 37 | } 38 | -------------------------------------------------------------------------------- /src/systems/classes/Message-class.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Message-class", 3 | "master": false, 4 | "version": "1.0.0", 5 | "description": "", 6 | "schemas": { 7 | "t198c41630f1d37e": { 8 | "_name": "Message", 9 | "success": "method", 10 | "info": "method", 11 | "warning": "method", 12 | "danger": "method", 13 | "clean": "method", 14 | "_id": "t198c41630f1d37e", 15 | "_inherit": ["_Component"] 16 | } 17 | }, 18 | "models": { 19 | "i17fe71fd15150c9": { 20 | "_name": "Message", 21 | "success": { "params": [{ "name": "message", "type": "string" }] }, 22 | "info": { "params": [{ "name": "message", "type": "string" }] }, 23 | "warning": { "params": [{ "name": "message", "type": "string" }] }, 24 | "danger": { "params": [{ "name": "message", "type": "string" }] }, 25 | "clean": {}, 26 | "_id": "i17fe71fd15150c9" 27 | } 28 | }, 29 | "behaviors": { 30 | "f1c1eb158101aab8": { 31 | "_id": "f1c1eb158101aab8", 32 | "component": "Message", 33 | "state": "clean", 34 | "action": "function clean() {\n document.querySelector('#designer-message').innerHTML = '';\n}" 35 | }, 36 | "f1bf2a100901b407": { 37 | "_id": "f1bf2a100901b407", 38 | "component": "Message", 39 | "state": "danger", 40 | "action": "function danger(message) {\n var id = requestAnimationFrame(function () {\n var html = this.require('message-alert-danger.html').source(),\n id = this.require('factory').generateId(),\n domId = 'designer-message-danger-' + id;\n \n this.clean(); \n \n message = message.replace('[object Object]', 'message can not be displayed because it is not a string.');\n \n document.querySelector('#designer-message').insertAdjacentHTML('afterbegin', \n html.replace(/{{message}}/gi, message)\n .replace(/{id}/gi, id)\n );\n $('#' + domId).fadeIn(500);\n \n setTimeout(function () {\n $('#' + domId).fadeOut(1000, function() {\n $(this).remove();\n });\n }, 4000);\n }.bind(this));\n \n setTimeout(function () {\n cancelAnimationFrame(id);\n }, 50);\n}" 41 | }, 42 | "i1b72d17c6c154ab": { 43 | "_id": "i1b72d17c6c154ab", 44 | "component": "Message", 45 | "state": "info", 46 | "action": "function info(message) {\n var id = requestAnimationFrame(function () {\n var html = this.require('message-alert-info.html').source(),\n id = this.require('factory').generateId(),\n domId = 'designer-message-info-' + id;\n \n this.clean();\n \n message = message.replace('[object Object]', 'message can not be displayed because it is not a string.');\n \n document.querySelector('#designer-message').insertAdjacentHTML('afterbegin', \n html.replace(/{{message}}/gi, message)\n .replace(/{id}/gi, id)\n );\n $('#' + domId).fadeIn(500);\n \n setTimeout(function () {\n $('#' + domId).fadeOut(1000, function() {\n $(this).remove();\n });\n }, 4000);\n }.bind(this));\n \n setTimeout(function () {\n cancelAnimationFrame(id);\n }, 50);\n}" 47 | }, 48 | "s1a2461e9b9155cc": { 49 | "_id": "s1a2461e9b9155cc", 50 | "component": "Message", 51 | "state": "success", 52 | "action": "function success(message) {\n var id = requestAnimationFrame(function () {\n var html = this.require('message-alert-success.html').source(),\n id = this.require('factory').generateId(),\n domId = 'designer-message-success-' + id;\n \n this.clean();\n \n message = message.replace('[object Object]', 'message can not be displayed because it is not a string.');\n \n document.querySelector('#designer-message').insertAdjacentHTML('afterbegin', \n html.replace(/{{message}}/gi, message)\n .replace(/{id}/gi, id)\n );\n $('#' + domId).fadeIn(500);\n \n setTimeout(function () {\n $('#' + domId).fadeOut(1000, function() {\n $(this).remove();\n });\n }, 4000);\n }.bind(this));\n \n setTimeout(function () {\n cancelAnimationFrame(id);\n }, 50);\n}" 53 | }, 54 | "k1dd3c148c011f25": { 55 | "_id": "k1dd3c148c011f25", 56 | "component": "Message", 57 | "state": "warning", 58 | "action": "function warning(message) {\n var id = requestAnimationFrame(function () {\n var html = this.require('message-alert-warning.html').source(),\n id = this.require('factory').generateId(),\n domId = 'designer-message-warning-' + id;\n \n this.clean();\n \n message = message.replace('[object Object]', 'message can not be displayed because it is not a string.');\n \n document.querySelector('#designer-message').insertAdjacentHTML('afterbegin', \n html.replace(/{{message}}/gi, message)\n .replace(/{id}/gi, id)\n );\n $('#' + domId).fadeIn(500);\n \n setTimeout(function () {\n $('#' + domId).fadeOut(1000, function() {\n $(this).remove();\n });\n }, 4000);\n }.bind(this));\n \n setTimeout(function () {\n cancelAnimationFrame(id);\n }, 50);\n}" 59 | } 60 | }, 61 | "types": {}, 62 | "components": { "Message": { "message": { "_id": "message" } } }, 63 | "_id": "t10a1a11a5c1c157" 64 | } 65 | -------------------------------------------------------------------------------- /src/systems/classes/Router-class.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Router-class", 3 | "master": false, 4 | "version": "1.0.0", 5 | "description": "Router class", 6 | "schemas": { 7 | "z1e592183e81ce64": { 8 | "_id": "z1e592183e81ce64", 9 | "_name": "Router", 10 | "_inherit": ["_Component"], 11 | "start": "method", 12 | "update": "method" 13 | } 14 | }, 15 | "models": { 16 | "c1b00612faf188cf": { 17 | "_id": "c1b00612faf188cf", 18 | "_name": "Router", 19 | "start": {}, 20 | "update": {} 21 | } 22 | }, 23 | "behaviors": {}, 24 | "types": {}, 25 | "components": { 26 | "Router": { 27 | "router": { 28 | "_id": "router" 29 | } 30 | } 31 | }, 32 | "_id": "z1ee6414dcf16cd4" 33 | } 34 | -------------------------------------------------------------------------------- /src/systems/classes/Spaces-class.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Spaces-class", 3 | "master": false, 4 | "version": "1.0.0", 5 | "description": "", 6 | "schemas": { 7 | "p14e93127f6159df": { 8 | "_name": "SpaceItem", 9 | "name": "property", 10 | "uuid": "property", 11 | "click": "event", 12 | "_id": "p14e93127f6159df", 13 | "_inherit": ["_Component"] 14 | }, 15 | "v194541e0431ce95": { 16 | "_name": "Spaces", 17 | "items": "collection", 18 | "systems": "collection", 19 | "components": "collection", 20 | "render": "method", 21 | "clear": "method", 22 | "_id": "v194541e0431ce95", 23 | "_inherit": ["_Component"] 24 | } 25 | }, 26 | "models": { 27 | "p1d9251b9e619c48": { 28 | "_name": "SpaceItem", 29 | "name": { 30 | "type": "string", 31 | "readOnly": false, 32 | "mandatory": false, 33 | "default": "" 34 | }, 35 | "uuid": { 36 | "type": "string", 37 | "readOnly": false, 38 | "mandatory": false, 39 | "default": "" 40 | }, 41 | "click": {}, 42 | "_id": "p1d9251b9e619c48" 43 | }, 44 | "i15f6718c9d19b10": { 45 | "_name": "Spaces", 46 | "items": { 47 | "type": ["SpaceItem"], 48 | "readOnly": false, 49 | "mandatory": false, 50 | "default": [] 51 | }, 52 | "systems": { 53 | "type": ["SpaceItem"], 54 | "readOnly": false, 55 | "mandatory": false, 56 | "default": [] 57 | }, 58 | "components": { 59 | "type": ["SpaceItem"], 60 | "readOnly": false, 61 | "mandatory": false, 62 | "default": [] 63 | }, 64 | "clear": {}, 65 | "render": {}, 66 | "_id": "i15f6718c9d19b10" 67 | } 68 | }, 69 | "behaviors": {}, 70 | "types": {}, 71 | "components": { 72 | "Spaces": { 73 | "spaces": { 74 | "_id": "spaces", 75 | "components": [], 76 | "items": [], 77 | "systems": [] 78 | } 79 | } 80 | }, 81 | "_id": "p140631fa6f136f2" 82 | } 83 | -------------------------------------------------------------------------------- /src/systems/classes/State-class.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "State-class", 3 | "master": false, 4 | "version": "1.0.0", 5 | "description": "", 6 | "schemas": { 7 | "y1efb3178341398a": { 8 | "_name": "State", 9 | "_inherit": ["_Component"], 10 | "type": "property", 11 | "component": "property", 12 | "lastPage": "property", 13 | "messages": "property", 14 | "menu": "property", 15 | "previousMenu": "property", 16 | "space": "property", 17 | "navigation": "property", 18 | "logs": "collection", 19 | "_id": "y1efb3178341398a" 20 | } 21 | }, 22 | "models": { 23 | "j18ad71fd8c1c175": { 24 | "_name": "State", 25 | "type": { 26 | "type": "editorType", 27 | "readOnly": false, 28 | "mandatory": false, 29 | "default": "designer" 30 | }, 31 | "component": { 32 | "type": "string", 33 | "readOnly": false, 34 | "mandatory": false, 35 | "default": "" 36 | }, 37 | "_id": "j18ad71fd8c1c175", 38 | "lastPage": { 39 | "type": "string", 40 | "readOnly": false, 41 | "mandatory": false, 42 | "default": "index.html" 43 | }, 44 | "messages": { 45 | "type": "array", 46 | "readOnly": false, 47 | "mandatory": false, 48 | "default": [] 49 | }, 50 | "menu": { 51 | "type": "string", 52 | "readOnly": false, 53 | "mandatory": false, 54 | "default": "" 55 | }, 56 | "previousMenu": { 57 | "type": "string", 58 | "readOnly": false, 59 | "mandatory": false, 60 | "default": "" 61 | }, 62 | "space": { 63 | "type": "string", 64 | "readOnly": false, 65 | "mandatory": false, 66 | "default": "" 67 | }, 68 | "logs": { 69 | "type": ["Log"], 70 | "readOnly": false, 71 | "mandatory": false, 72 | "default": [] 73 | }, 74 | "navigation": { 75 | "type": "navigation", 76 | "readOnly": false, 77 | "mandatory": false, 78 | "default": { 79 | "menu": [], 80 | "spaces": [] 81 | } 82 | } 83 | } 84 | }, 85 | "behaviors": {}, 86 | "types": { 87 | "navigation": { 88 | "_id": "n1bb7e1a8a713f75", 89 | "name": "navigation", 90 | "type": "object", 91 | "schema": { 92 | "menu": { 93 | "type": "array", 94 | "mandatory": false, 95 | "default": [] 96 | }, 97 | "spaces": { 98 | "type": "array", 99 | "mandatory": false, 100 | "default": [] 101 | } 102 | } 103 | } 104 | }, 105 | "components": { 106 | "State": { 107 | "state": { 108 | "_id": "state", 109 | "component": "", 110 | "lastPage": "index.html", 111 | "logs": [], 112 | "menu": "", 113 | "messages": [], 114 | "navigation": { 115 | "menu": [], 116 | "spaces": [] 117 | }, 118 | "previousMenu": "", 119 | "space": "", 120 | "type": "designer" 121 | } 122 | } 123 | }, 124 | "_id": "z1c0ca1d5b31d495" 125 | } 126 | -------------------------------------------------------------------------------- /src/systems/classes/Store-class.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Store-class", 3 | "master": false, 4 | "version": "1.0.0", 5 | "description": "", 6 | "schemas": { 7 | "b1d38a143001d960": { 8 | "_name": "Store", 9 | "uuid": "property", 10 | "collection": "property", 11 | "data": "property", 12 | "extra": "property", 13 | "_id": "b1d38a143001d960", 14 | "_inherit": ["_Component"] 15 | } 16 | }, 17 | "models": { 18 | "u1692f1399a13209": { 19 | "_name": "Store", 20 | "uuid": { 21 | "type": "string", 22 | "readOnly": false, 23 | "mandatory": false, 24 | "default": "" 25 | }, 26 | "collection": { 27 | "type": "string", 28 | "readOnly": false, 29 | "mandatory": false, 30 | "default": "" 31 | }, 32 | "data": { 33 | "type": "object", 34 | "readOnly": false, 35 | "mandatory": false, 36 | "default": {} 37 | }, 38 | "extra": { 39 | "type": "object", 40 | "readOnly": false, 41 | "mandatory": false, 42 | "default": {} 43 | }, 44 | "_id": "u1692f1399a13209" 45 | } 46 | }, 47 | "behaviors": {}, 48 | "types": {}, 49 | "components": { 50 | "Store": { 51 | "store": { 52 | "_id": "store", 53 | "collection": "", 54 | "data": {}, 55 | "extra": {}, 56 | "uuid": "" 57 | } 58 | } 59 | }, 60 | "_id": "l155be1e16311413" 61 | } 62 | -------------------------------------------------------------------------------- /src/systems/classes/System-class.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "System-class", 3 | "master": false, 4 | "version": "1.0.0", 5 | "description": "", 6 | "schemas": { 7 | "u1aff21b1e617f34": { 8 | "_name": "System", 9 | "name": "property", 10 | "master": "property", 11 | "version": "property", 12 | "description": "property", 13 | "schemas": "property", 14 | "models": "property", 15 | "behaviors": "property", 16 | "types": "property", 17 | "components": "property", 18 | "_id": "u1aff21b1e617f34", 19 | "_inherit": ["_Component"] 20 | } 21 | }, 22 | "models": { 23 | "t1fcf714b4c15616": { 24 | "_name": "System", 25 | "name": { 26 | "type": "string", 27 | "readOnly": false, 28 | "mandatory": false, 29 | "default": "system" 30 | }, 31 | "master": { 32 | "type": "boolean", 33 | "readOnly": false, 34 | "mandatory": false, 35 | "default": false 36 | }, 37 | "version": { 38 | "type": "string", 39 | "readOnly": false, 40 | "mandatory": false, 41 | "default": "0.0.1" 42 | }, 43 | "description": { 44 | "type": "string", 45 | "readOnly": false, 46 | "mandatory": false, 47 | "default": "" 48 | }, 49 | "schemas": { 50 | "type": "json", 51 | "readOnly": false, 52 | "mandatory": false, 53 | "default": {} 54 | }, 55 | "models": { 56 | "type": "json", 57 | "readOnly": false, 58 | "mandatory": false, 59 | "default": {} 60 | }, 61 | "behaviors": { 62 | "type": "json", 63 | "readOnly": false, 64 | "mandatory": false, 65 | "default": {} 66 | }, 67 | "types": { 68 | "type": "json", 69 | "readOnly": false, 70 | "mandatory": false, 71 | "default": {} 72 | }, 73 | "components": { 74 | "type": "json", 75 | "readOnly": false, 76 | "mandatory": false, 77 | "default": {} 78 | }, 79 | "_id": "t1fcf714b4c15616" 80 | } 81 | }, 82 | "behaviors": {}, 83 | "types": {}, 84 | "components": {}, 85 | "_id": "g16c2518e271066b" 86 | } 87 | -------------------------------------------------------------------------------- /src/systems/classes/ToolBar-class.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ToolBar-class", 3 | "master": false, 4 | "version": "1.0.0", 5 | "description": "", 6 | "schemas": { 7 | "f1257f17deb16097": { 8 | "_name": "ToolBar", 9 | "items": "collection", 10 | "render": "method", 11 | "_id": "f1257f17deb16097", 12 | "_inherit": ["_Component"] 13 | }, 14 | "t19b6b11ff31158d": { 15 | "_id": "t19b6b11ff31158d", 16 | "_name": "ToolBarItem", 17 | "_inherit": ["_Component"], 18 | "html": "link", 19 | "position": "property", 20 | "type": "property", 21 | "platform": "property", 22 | "render": "method", 23 | "click": "event" 24 | } 25 | }, 26 | "models": { 27 | "l129a713e681c903": { 28 | "_name": "ToolBar", 29 | "items": { 30 | "type": ["ToolBarItem"], 31 | "readOnly": false, 32 | "mandatory": false, 33 | "default": [] 34 | }, 35 | "render": {}, 36 | "_id": "l129a713e681c903" 37 | }, 38 | "u1f4c7177bb1a459": { 39 | "_name": "ToolBarItem", 40 | "html": { 41 | "type": "HTML", 42 | "readOnly": false, 43 | "mandatory": false, 44 | "default": "" 45 | }, 46 | "position": { 47 | "type": "number", 48 | "readOnly": false, 49 | "mandatory": false, 50 | "default": 0 51 | }, 52 | "type": { 53 | "type": "editorType", 54 | "readOnly": false, 55 | "mandatory": false, 56 | "default": "designer" 57 | }, 58 | "render": {}, 59 | "click": {}, 60 | "_id": "u1f4c7177bb1a459", 61 | "platform": { 62 | "type": "platform", 63 | "readOnly": false, 64 | "mandatory": false, 65 | "default": "all" 66 | } 67 | } 68 | }, 69 | "behaviors": { 70 | "n12d44154da1020f": { 71 | "_id": "n12d44154da1020f", 72 | "component": "ToolBar", 73 | "state": "render", 74 | "action": "function render() { \n var domItems = document.getElementById('designer-toolbar-items'),\n i = 0,\n length = 0,\n item = null,\n toolBarItems = [],\n platformToolBarItems = [],\n platform = '',\n self = this;\n \n // empty\n $('#designer-toolbar-items').empty();\n this.items([]);\n\n // get items\n toolBarItems = this.require('db').collections().ToolBarItem.find({\n 'type': this.require('state').type(),\n 'platform': 'all'\n });\n \n // get platform specific items\n switch (true) {\n case this.require('designer').isElectron() === true:\n platform = 'electron';\n break;\n case this.require('designer').isCordova() === true:\n platform = 'cordova';\n break;\n default:\n platform = 'web';\n break;\n }\n \n platformToolBarItems = this.require('db').collections().ToolBarItem.find({\n 'type': this.require('state').type(),\n 'platform': platform\n });\n \n toolBarItems = toolBarItems.concat(platformToolBarItems);\n\n // sort items\n toolBarItems.sort(function (itemA, itemB) {\n if (itemA.position > itemB.position) {\n return 1;\n }\n if (itemA.position < itemB.position) {\n return -1;\n }\n return 0;\n });\n\n toolBarItems.forEach(function (toolBarItem) {\n var id = toolBarItem._id;\n self.items().push(self.require(id));\n });\n\n // render items\n this.items().forEach(function (item) {\n domItems.insertAdjacentHTML('beforeend', '
  • ' + item.html().source() + '');\n });\n\n // add events\n length = domItems.children.length;\n for (i = 0; i < length; i++) {\n item = domItems.children[i];\n item.addEventListener('click', function () {\n this.click();\n }.bind(self.items(i)));\n }\n}", 75 | "useCoreAPI": false, 76 | "core": false 77 | } 78 | }, 79 | "types": { 80 | "platform": { 81 | "_id": "r10214160211309c", 82 | "name": "platform", 83 | "type": "string", 84 | "value": ["all", "web", "electron", "cordova"] 85 | } 86 | }, 87 | "components": { 88 | "ToolBar": { 89 | "toolbar": { 90 | "_id": "toolbar", 91 | "items": [] 92 | } 93 | } 94 | }, 95 | "_id": "o1a37519ca718bc4" 96 | } 97 | -------------------------------------------------------------------------------- /src/systems/classes/Workspace-class.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Workspace-class", 3 | "master": false, 4 | "version": "1.0.0", 5 | "description": "", 6 | "schemas": { 7 | "f1092816b571e03c": { 8 | "_name": "Workspace", 9 | "create": "method", 10 | "load": "method", 11 | "clear": "method", 12 | "render": "method", 13 | "_id": "f1092816b571e03c", 14 | "_inherit": ["_Component"] 15 | }, 16 | "f1a0b01c1fb15a8e": { 17 | "_id": "f1a0b01c1fb15a8e", 18 | "_name": "MessageHelp", 19 | "_inherit": ["_Component"], 20 | "render": "method", 21 | "remove": "method" 22 | } 23 | }, 24 | "models": { 25 | "v1435e1809e10be7": { 26 | "_name": "Workspace", 27 | "create": {}, 28 | "load": {}, 29 | "clear": {}, 30 | "_id": "v1435e1809e10be7", 31 | "render": {} 32 | }, 33 | "k1127212a8e18f9c": { 34 | "_id": "k1127212a8e18f9c", 35 | "_name": "MessageHelp", 36 | "render": {}, 37 | "remove": {} 38 | } 39 | }, 40 | "behaviors": { 41 | "d1c07e16ad411943": { 42 | "_id": "d1c07e16ad411943", 43 | "component": "MessageHelp", 44 | "state": "render", 45 | "action": "function render() {\n var template = '';\n var message = '';\n var dom = null;\n var menu = this.require('state').menu();\n var system = this.require('factory').system();\n var hasSchema = false;\n \n function hasSystem() {\n var result = true;\n \n if (typeof system == 'undefined') {\n result = false;\n }\n if (typeof system !== 'undefined' && system.name() === 'default') {\n result = false;\n }\n \n return result;\n }\n\n if (hasSystem()) {\n hasSchema = Object.keys(system.schemas()).length !== 0;\n }\n\n template = this.require('message-help.html');\n\n switch (true) {\n case menu === 'systems':\n message = \"To create a system, click on the '+' button or click here.\";\n break;\n case menu === 'schemas' && hasSystem():\n message = \"To create a schema, click on the '+' button or click here.\";\n break;\n case menu === 'schemas' && !hasSystem():\n message = \"To create a system, click here.\";\n break;\n case menu === 'models' && !hasSystem():\n message = \"To create a system, click here.\";\n break; \n case menu === 'models' && hasSystem() && !hasSchema:\n message = \"To create a model, you need to create first a schema. Click here to create a schema.\";\n break;\n case menu === 'types' && hasSystem():\n message = \"To create a type, click on the '+' button or click here.\";\n break;\n case menu === 'types' && !hasSystem():\n message = \"To create a system, click here.\";\n break;\n case menu === 'behaviors' && hasSystem():\n message = \"To create a behavior, click on the '+' button or click here.\";\n break; \n case menu === 'behaviors' && !hasSystem():\n message = \"To create a system, click here.\";\n break; \n case menu === 'components' && hasSystem() && hasSchema:\n message = \"To create a component, click on the '+' button or click here.\";\n break;\n case menu === 'components' && hasSystem() && !hasSchema:\n message = \"To create a component, you need to create first a schema. Click here to create a schema.\";\n break;\n case menu === 'components' && !hasSystem():\n message = \"To create a system, click here.\";\n break;\n case menu === 'logs' && !hasSystem():\n message = \"To create a system, click here.\";\n break;\n case menu === 'class' && !hasSystem():\n message = \"To view a diagram, create first a system or drag and drop a Graphviz file here.\";\n break;\n case menu === 'component' && !hasSystem():\n message = \"To view a diagram, create first a system or drag and drop a Graphviz file here.\";\n break;\n case menu === 'graph' && !hasSystem():\n message = \"To view a diagram, create first a system or drag and drop a Graphviz file here.\";\n break;\n default:\n break;\n }\n\n if (menu === 'class' || menu === 'component' || menu === 'graph') {\n document.querySelector('#designer-diagram').insertAdjacentHTML(\n 'afterbegin',\n template.source().replace(/{{message}}/gi, message));\n } else {\n document.querySelector('#designer-workspace').insertAdjacentHTML(\n 'afterbegin',\n template.source().replace(/{{message}}/gi, message));\n }\n\n // events\n dom = document.getElementById('panel-message-help');\n if (dom && menu !== 'class' && menu !== 'component' && menu !== 'graph') {\n dom.addEventListener('click', function click(event) {\n var menu = this.require('state').menu();\n var system = this.require('factory').system();\n var hasSchema = false;\n var Dialog = null;\n \n function hasSystem() {\n var result = true;\n \n if (typeof system == 'undefined') {\n result = false;\n }\n if (typeof system !== 'undefined' && system.name() === 'default') {\n result = false;\n }\n \n return result;\n }\n \n if (hasSystem()) {\n hasSchema = Object.keys(system.schemas()).length !== 0;\n }\n \n if (!hasSystem()) {\n Dialog = this.require('DialogSystemCreation');\n dialog = new Dialog({\n 'title': 'Create a new system',\n });\n dialog.show();\n } else {\n switch (true) {\n case menu === 'models' && !hasSchema:\n case menu === 'components' && !hasSchema:\n Dialog = this.require('DialogSchemaCreation');\n dialog = new Dialog({\n 'title': 'Create a new schema',\n });\n dialog.show();\n break;\n default:\n this.require('workspace').create();\n break;\n }\n }\n }.bind(this));\n }\n}", 46 | "useCoreAPI": false, 47 | "core": false 48 | }, 49 | "j14bb21eb8a1b68a": { 50 | "_id": "j14bb21eb8a1b68a", 51 | "component": "MessageHelp", 52 | "state": "remove", 53 | "action": "function remove() { \n if ($('#panel-message-help')) {\n\t $('#panel-message-help').remove();\n }\n}", 54 | "useCoreAPI": false, 55 | "core": false 56 | } 57 | }, 58 | "types": {}, 59 | "components": { 60 | "Workspace": { "workspace": { "_id": "workspace" } }, 61 | "MessageHelp": { "message-help": { "_id": "message-help" } } 62 | }, 63 | "_id": "s110211fc3410ad5" 64 | } 65 | -------------------------------------------------------------------------------- /src/systems/classes/_Channel-class.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "_Channel-class", 3 | "master": false, 4 | "version": "1.0.0", 5 | "description": "", 6 | "schemas": { 7 | "104ad1f48518376": { 8 | "_id": "104ad1f48518376", 9 | "_name": "_Channel", 10 | "_inherit": ["_Component"], 11 | "$editorUpdateSystem": "event", 12 | "$editorUpdateSchema": "event", 13 | "$editorUpdateSchemaId": "event", 14 | "$editorUpdateSchemaName": "event", 15 | "$editorUpdateModel": "event", 16 | "$editorUpdateModelId": "event", 17 | "$editorUpdateType": "event", 18 | "$editorDeleteType": "event", 19 | "$editorUpdateBehavior": "event", 20 | "$editorDeleteBehavior": "event", 21 | "$editorUpdateComponent": "event", 22 | "$editorUpdateComponentId": "event", 23 | "$editorDeleteComponent": "event", 24 | "$appLogDebug": "event", 25 | "$appLogInfo": "event", 26 | "$appLogWarn": "event", 27 | "$appLogError": "event", 28 | "$appLoadSystem": "event", 29 | "$designerSync": "event", 30 | "$designerCreateBehavior": "event", 31 | "$designerCreateComponent": "event", 32 | "$designerCreateType": "event", 33 | "$designerCreateSchema": "event", 34 | "$designerCreateModel": "event", 35 | "$designerDeleteSchema": "event", 36 | "$designerDeleteModel": "event", 37 | "$designerDeleteType": "event", 38 | "$designerDeleteBehavior": "event", 39 | "$designerDeleteComponent": "event", 40 | "$designerUpdateComponent": "event", 41 | "$designerUpdateModel": "event", 42 | "$designerUpdateBehavior": "event", 43 | "send": "event" 44 | } 45 | }, 46 | "models": { 47 | "135c71078810af2": { 48 | "_id": "135c71078810af2", 49 | "_name": "_Channel", 50 | "$editorUpdateSchemaName": { 51 | "params": [ 52 | { 53 | "name": "name", 54 | "type": "string" 55 | }, 56 | { 57 | "name": "id", 58 | "type": "string" 59 | } 60 | ] 61 | }, 62 | "$designerSync": {}, 63 | "$appLoadSystem": { 64 | "params": [ 65 | { 66 | "name": "system", 67 | "type": "object" 68 | } 69 | ] 70 | }, 71 | "$designerCreateBehavior": { 72 | "params": [ 73 | { 74 | "name": "behavior", 75 | "type": "object" 76 | } 77 | ] 78 | }, 79 | "$editorUpdateBehavior": { 80 | "params": [ 81 | { 82 | "name": "id", 83 | "type": "string" 84 | }, 85 | { 86 | "name": "behavior", 87 | "type": "object" 88 | } 89 | ] 90 | }, 91 | "$designerUpdateBehavior": { 92 | "params": [ 93 | { 94 | "name": "id", 95 | "type": "string" 96 | }, 97 | { 98 | "name": "behavior", 99 | "type": "object" 100 | } 101 | ] 102 | }, 103 | "$editorDeleteBehavior": { 104 | "params": [ 105 | { 106 | "name": "id", 107 | "type": "string" 108 | } 109 | ] 110 | }, 111 | "$designerDeleteBehavior": { 112 | "params": [ 113 | { 114 | "name": "id", 115 | "type": "string" 116 | } 117 | ] 118 | }, 119 | "$designerCreateComponent": { 120 | "params": [ 121 | { 122 | "name": "collection", 123 | "type": "string" 124 | }, 125 | { 126 | "name": "component", 127 | "type": "object" 128 | } 129 | ] 130 | }, 131 | "$editorUpdateComponent": { 132 | "params": [ 133 | { 134 | "name": "id", 135 | "type": "string" 136 | }, 137 | { 138 | "name": "collection", 139 | "type": "string" 140 | }, 141 | { 142 | "name": "component", 143 | "type": "object" 144 | } 145 | ] 146 | }, 147 | "$editorUpdateComponentId": { 148 | "params": [ 149 | { 150 | "name": "oldId", 151 | "type": "string" 152 | }, 153 | { 154 | "name": "newId", 155 | "type": "string" 156 | }, 157 | { 158 | "name": "collection", 159 | "type": "string" 160 | } 161 | ] 162 | }, 163 | "$designerUpdateComponent": { 164 | "params": [ 165 | { 166 | "name": "id", 167 | "type": "string" 168 | }, 169 | { 170 | "name": "collection", 171 | "type": "string" 172 | }, 173 | { 174 | "name": "component", 175 | "type": "object" 176 | } 177 | ] 178 | }, 179 | "$editorDeleteComponent": { 180 | "params": [ 181 | { 182 | "name": "id", 183 | "type": "string" 184 | }, 185 | { 186 | "name": "collection", 187 | "type": "string" 188 | } 189 | ] 190 | }, 191 | "$designerDeleteComponent": { 192 | "params": [ 193 | { 194 | "name": "id", 195 | "type": "string" 196 | }, 197 | { 198 | "name": "collection", 199 | "type": "string" 200 | } 201 | ] 202 | }, 203 | "$designerCreateType": { 204 | "params": [ 205 | { 206 | "name": "id", 207 | "type": "string" 208 | }, 209 | { 210 | "name": "type", 211 | "type": "object" 212 | } 213 | ] 214 | }, 215 | "$editorUpdateType": { 216 | "params": [ 217 | { 218 | "name": "id", 219 | "type": "string" 220 | }, 221 | { 222 | "name": "type", 223 | "type": "object" 224 | } 225 | ] 226 | }, 227 | "$editorDeleteType": { 228 | "params": [ 229 | { 230 | "name": "id", 231 | "type": "string" 232 | } 233 | ] 234 | }, 235 | "$designerCreateSchema": { 236 | "params": [ 237 | { 238 | "name": "id", 239 | "type": "string" 240 | }, 241 | { 242 | "name": "schema", 243 | "type": "object" 244 | } 245 | ] 246 | }, 247 | "$editorUpdateSchema": { 248 | "params": [ 249 | { 250 | "name": "id", 251 | "type": "string" 252 | }, 253 | { 254 | "name": "schema", 255 | "type": "object" 256 | } 257 | ] 258 | }, 259 | "$editorUpdateSchemaId": { 260 | "params": [ 261 | { 262 | "name": "oldId", 263 | "type": "string" 264 | }, 265 | { 266 | "name": "newId", 267 | "type": "string" 268 | } 269 | ] 270 | }, 271 | "$designerDeleteSchema": { 272 | "params": [ 273 | { 274 | "name": "id", 275 | "type": "string" 276 | } 277 | ] 278 | }, 279 | "$designerCreateModel": { 280 | "params": [ 281 | { 282 | "name": "id", 283 | "type": "string" 284 | }, 285 | { 286 | "name": "model", 287 | "type": "object" 288 | } 289 | ] 290 | }, 291 | "$editorUpdateModel": { 292 | "params": [ 293 | { 294 | "name": "id", 295 | "type": "string" 296 | }, 297 | { 298 | "name": "model", 299 | "type": "object" 300 | } 301 | ] 302 | }, 303 | "$designerUpdateModel": { 304 | "params": [ 305 | { 306 | "name": "id", 307 | "type": "string" 308 | }, 309 | { 310 | "name": "model", 311 | "type": "object" 312 | } 313 | ] 314 | }, 315 | "$editorUpdateModelId": { 316 | "params": [ 317 | { 318 | "name": "oldId", 319 | "type": "string" 320 | }, 321 | { 322 | "name": "newId", 323 | "type": "string" 324 | } 325 | ] 326 | }, 327 | "$designerDeleteModel": { 328 | "params": [ 329 | { 330 | "name": "id", 331 | "type": "string" 332 | } 333 | ] 334 | }, 335 | "$designerDeleteType": { 336 | "params": [ 337 | { 338 | "name": "id", 339 | "type": "string" 340 | } 341 | ] 342 | }, 343 | "$editorUpdateSystem": { 344 | "params": [ 345 | { 346 | "name": "id", 347 | "type": "string" 348 | }, 349 | { 350 | "name": "system", 351 | "type": "object" 352 | } 353 | ] 354 | }, 355 | "$appLogDebug": { 356 | "params": [ 357 | { 358 | "name": "message", 359 | "type": "string" 360 | } 361 | ] 362 | }, 363 | "$appLogInfo": { 364 | "params": [ 365 | { 366 | "name": "message", 367 | "type": "string" 368 | } 369 | ] 370 | }, 371 | "$appLogWarn": { 372 | "params": [ 373 | { 374 | "name": "message", 375 | "type": "string" 376 | } 377 | ] 378 | }, 379 | "$appLogError": { 380 | "params": [ 381 | { 382 | "name": "message", 383 | "type": "string" 384 | } 385 | ] 386 | }, 387 | "send": { 388 | "params": [ 389 | { 390 | "name": "message", 391 | "type": "message" 392 | } 393 | ] 394 | } 395 | } 396 | }, 397 | "behaviors": {}, 398 | "types": {}, 399 | "components": { 400 | "_Channel": { 401 | "channel": { 402 | "_id": "channel" 403 | } 404 | } 405 | }, 406 | "_id": "f1233c15d691b3da" 407 | } 408 | -------------------------------------------------------------------------------- /src/systems/platforms/cordova.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cordova", 3 | "master": false, 4 | "version": "1.0.0", 5 | "description": "Cordova specificities", 6 | "schemas": { 7 | "p181111d5c01f97b": { 8 | "_name": "HTML", 9 | "render": "method", 10 | "source": "property", 11 | "_id": "p181111d5c01f97b" 12 | } 13 | }, 14 | "models": { 15 | "w1417e1d6d613a0d": { 16 | "_name": "HTML", 17 | "source": { 18 | "type": "html", 19 | "readOnly": true, 20 | "mandatory": true, 21 | "default": "" 22 | }, 23 | "render": { 24 | "params": [ 25 | { "name": "id", "type": "any", "mandatory": false, "default": null } 26 | ] 27 | }, 28 | "_id": "w1417e1d6d613a0d" 29 | } 30 | }, 31 | "behaviors": {}, 32 | "types": {}, 33 | "components": { 34 | "HTML": { 35 | "copyright.html": { 36 | "_id": "copyright.html", 37 | "source": "Version {{version}}
    Copyright © 2024 - Erwan Carriou

    System\nDesigner is distributed under Apache License 2.0 and is powered by System Runtime.

    For comments or questions\nyou can go to the support page or send me an email.
    If you find a bug, please\nreport it on this page." 38 | }, 39 | "dialog-modal-welcome.html": { 40 | "_id": "dialog-modal-welcome.html", 41 | "source": "
    \n
    \n
    \n
    \n

    {{title}}

    \n
    \n
    \n
    \n System Designer will help you to create systems. To begin have a look on our Quick Start.
    \n
    \n Tips: use System Designer in landscape mode to have more space to design your system.
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    " 42 | }, 43 | "menu-header-behavior.html": { 44 | "_id": "menu-header-behavior.html", 45 | "source": "
    " 46 | }, 47 | "menu-header-component.html": { 48 | "_id": "menu-header-component.html", 49 | "source": "
    " 50 | }, 51 | "menu-header-model.html": { 52 | "_id": "menu-header-model.html", 53 | "source": "
    " 54 | }, 55 | "menu-header-schema.html": { 56 | "_id": "menu-header-schema.html", 57 | "source": "
    " 58 | }, 59 | "menu-header-system.html": { 60 | "_id": "menu-header-system.html", 61 | "source": "
    " 62 | }, 63 | "menu-header-type.html": { 64 | "_id": "menu-header-type.html", 65 | "source": "
    " 66 | } 67 | } 68 | }, 69 | "_id": "e89c617b6b15d28" 70 | } 71 | -------------------------------------------------------------------------------- /src/systems/platforms/electron.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron", 3 | "master": false, 4 | "version": "1.0.0", 5 | "description": "Electron specificities", 6 | "schemas": { 7 | "p181111d5c01f97b": { 8 | "_name": "HTML", 9 | "source": "property", 10 | "render": "method", 11 | "_id": "p181111d5c01f97b" 12 | } 13 | }, 14 | "models": { 15 | "w1417e1d6d613a0d": { 16 | "_name": "HTML", 17 | "source": { 18 | "type": "html", 19 | "readOnly": true, 20 | "mandatory": true, 21 | "default": "" 22 | }, 23 | "render": { 24 | "params": [ 25 | { 26 | "name": "id", 27 | "type": "any", 28 | "mandatory": false, 29 | "default": null 30 | } 31 | ] 32 | }, 33 | "_id": "w1417e1d6d613a0d" 34 | } 35 | }, 36 | "behaviors": {}, 37 | "types": {}, 38 | "components": { 39 | "HTML": { 40 | "copyright.html": { 41 | "_id": "copyright.html", 42 | "source": "Version {{version}}
    Copyright © 2024 - Erwan Carriou

    System\nDesigner is distributed under Apache License 2.0 and is powered by System Runtime.

    For comments or questions\nyou can go to the support page or send me an email.
    If you find a bug, please\nreport it on this page." 43 | }, 44 | "dialog-modal-welcome.html": { 45 | "_id": "dialog-modal-welcome.html", 46 | "source": "
    \n
    \n
    \n
    \n

    {{title}}

    \n
    \n
    \n
    \n System Designer will help you to create systems. To begin have a look on our\n Quick Start page or at this short video:\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n" 47 | } 48 | } 49 | }, 50 | "_id": "e89c617b6b15d28" 51 | } 52 | -------------------------------------------------------------------------------- /src/systems/types/types.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "types", 3 | "master": false, 4 | "version": "1.0.0", 5 | "description": "", 6 | "schemas": {}, 7 | "models": {}, 8 | "behaviors": {}, 9 | "types": { 10 | "dialogtype": { 11 | "_id": "i1947115bed161d4", 12 | "name": "dialogtype", 13 | "type": "string", 14 | "value": [ 15 | "sync", 16 | "system", 17 | "type", 18 | "schema", 19 | "model", 20 | "behavior", 21 | "component" 22 | ] 23 | }, 24 | "editorType": { 25 | "_id": "o1d8851841b1c785", 26 | "name": "editorType", 27 | "type": "string", 28 | "value": [ 29 | "designer", 30 | "system", 31 | "type", 32 | "schema", 33 | "model", 34 | "behavior", 35 | "component", 36 | "diagram" 37 | ] 38 | } 39 | }, 40 | "components": {}, 41 | "_id": "w1489d1717f18a87" 42 | } 43 | -------------------------------------------------------------------------------- /src/www/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/design-first/system-designer/8b142fc81c4deb8be084b34ed73bf2a954498f74/src/www/img/logo.png -------------------------------------------------------------------------------- /src/www/styles/editor.css: -------------------------------------------------------------------------------- 1 | /* 2 | * System Designer 3 | * 4 | * https://designfirst.io/systemdesigner/ 5 | * 6 | * Copyright 2024 Erwan Carriou 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | body { 22 | padding-top: 70px; 23 | padding-bottom: 30px; 24 | } 25 | 26 | body, 27 | .navbar-fixed-top, 28 | .navbar-fixed-bottom { 29 | min-width: 500px; 30 | } 31 | 32 | img, a { 33 | user-select: none; 34 | -webkit-user-drag: none; 35 | } 36 | 37 | .lead { 38 | font-size: 16px; 39 | } 40 | 41 | .page-header { 42 | margin-bottom: 30px; 43 | } 44 | 45 | .page-header .lead { 46 | margin-bottom: 10px; 47 | } 48 | 49 | .container { 50 | width: 100%; 51 | max-width: none !important; 52 | } 53 | 54 | .col-xs-4 { 55 | padding-top: 15px; 56 | padding-bottom: 15px; 57 | background-color: #eee; 58 | background-color: rgba(86, 61, 124, 0.15); 59 | border: 1px solid #ddd; 60 | border: 1px solid rgba(86, 61, 124, 0.2); 61 | } 62 | 63 | .container .navbar-header, 64 | .container .navbar-collapse { 65 | margin-right: 0; 66 | margin-left: 0; 67 | } 68 | 69 | .navbar-header { 70 | float: left; 71 | } 72 | 73 | .navbar-collapse { 74 | display: block !important; 75 | height: auto !important; 76 | padding-bottom: 0; 77 | overflow: visible !important; 78 | visibility: visible !important; 79 | } 80 | 81 | .navbar-toggle { 82 | display: none; 83 | } 84 | 85 | .navbar-collapse { 86 | border-top: 0; 87 | } 88 | 89 | .navbar-brand { 90 | margin-left: -15px; 91 | } 92 | 93 | .navbar-nav { 94 | float: left; 95 | margin: 0; 96 | } 97 | 98 | .navbar-nav > li { 99 | float: left; 100 | } 101 | 102 | .navbar-nav > li > a { 103 | padding: 15px; 104 | } 105 | 106 | .navbar-nav.navbar-right { 107 | float: right; 108 | } 109 | 110 | .navbar .navbar-nav .open .dropdown-menu { 111 | position: absolute; 112 | float: left; 113 | background-color: #fff; 114 | border: 1px solid #ccc; 115 | border: 1px solid rgba(0, 0, 0, 0.15); 116 | border-width: 0 1px 1px; 117 | border-radius: 0 0 4px 4px; 118 | -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); 119 | box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); 120 | } 121 | 122 | .navbar-default .navbar-nav .open .dropdown-menu > li > a { 123 | color: #333; 124 | } 125 | 126 | .navbar .navbar-nav .open .dropdown-menu > li > a:hover, 127 | .navbar .navbar-nav .open .dropdown-menu > li > a:focus, 128 | .navbar .navbar-nav .open .dropdown-menu > .active > a, 129 | .navbar .navbar-nav .open .dropdown-menu > .active > a:hover, 130 | .navbar .navbar-nav .open .dropdown-menu > .active > a:focus { 131 | color: #fff !important; 132 | background-color: #428bca !important; 133 | } 134 | 135 | .navbar .navbar-nav .open .dropdown-menu > .disabled > a, 136 | .navbar .navbar-nav .open .dropdown-menu > .disabled > a:hover, 137 | .navbar .navbar-nav .open .dropdown-menu > .disabled > a:focus { 138 | color: #999 !important; 139 | background-color: transparent !important; 140 | } 141 | 142 | .navbar-form { 143 | float: left; 144 | width: auto; 145 | padding-top: 0; 146 | padding-bottom: 0; 147 | margin-right: 0; 148 | margin-left: 0; 149 | border: 0; 150 | -webkit-box-shadow: none; 151 | box-shadow: none; 152 | } 153 | 154 | .navbar-form .form-group { 155 | display: inline-block; 156 | margin-bottom: 0; 157 | vertical-align: middle; 158 | } 159 | 160 | .navbar-form .form-control { 161 | display: inline-block; 162 | width: auto; 163 | vertical-align: middle; 164 | } 165 | 166 | .navbar-form .form-control-static { 167 | display: inline-block; 168 | } 169 | 170 | .navbar-form .input-group { 171 | display: inline-table; 172 | vertical-align: middle; 173 | } 174 | 175 | .navbar-form .input-group .input-group-addon, 176 | .navbar-form .input-group .input-group-btn, 177 | .navbar-form .input-group .form-control { 178 | width: auto; 179 | } 180 | 181 | .navbar-form .input-group > .form-control { 182 | width: 100%; 183 | } 184 | 185 | .navbar-form .control-label { 186 | margin-bottom: 0; 187 | vertical-align: middle; 188 | } 189 | 190 | .navbar-form .radio, 191 | .navbar-form .checkbox { 192 | display: inline-block; 193 | margin-top: 0; 194 | margin-bottom: 0; 195 | vertical-align: middle; 196 | } 197 | 198 | .navbar-form .radio label, 199 | .navbar-form .checkbox label { 200 | padding-left: 0; 201 | } 202 | 203 | .navbar-form .radio input[type="radio"], 204 | .navbar-form .checkbox input[type="checkbox"] { 205 | position: relative; 206 | margin-left: 0; 207 | } 208 | 209 | .navbar-form .has-feedback .form-control-feedback { 210 | top: 0; 211 | } 212 | 213 | .form-inline .form-group { 214 | display: inline-block; 215 | margin-bottom: 0; 216 | vertical-align: middle; 217 | } 218 | 219 | .form-inline .form-control { 220 | display: inline-block; 221 | width: auto; 222 | vertical-align: middle; 223 | } 224 | 225 | .form-inline .form-control-static { 226 | display: inline-block; 227 | } 228 | 229 | .form-inline .input-group { 230 | display: inline-table; 231 | vertical-align: middle; 232 | } 233 | 234 | .form-inline .input-group .input-group-addon, 235 | .form-inline .input-group .input-group-btn, 236 | .form-inline .input-group .form-control { 237 | width: auto; 238 | } 239 | 240 | .form-inline .input-group > .form-control { 241 | width: 100%; 242 | } 243 | 244 | .form-inline .control-label { 245 | margin-bottom: 0; 246 | vertical-align: middle; 247 | } 248 | 249 | .form-inline .radio, 250 | .form-inline .checkbox { 251 | display: inline-block; 252 | margin-top: 0; 253 | margin-bottom: 0; 254 | vertical-align: middle; 255 | } 256 | 257 | .form-inline .radio label, 258 | .form-inline .checkbox label { 259 | padding-left: 0; 260 | } 261 | 262 | .form-inline .radio input[type="radio"], 263 | .form-inline .checkbox input[type="checkbox"] { 264 | position: relative; 265 | margin-left: 0; 266 | } 267 | 268 | .form-inline .has-feedback .form-control-feedback { 269 | top: 0; 270 | } 271 | 272 | .sidebar { 273 | position: fixed; 274 | width: 50px; 275 | top: 40px; 276 | bottom: 0; 277 | left: 0; 278 | z-index: 1000; 279 | display: block; 280 | padding: 20px; 281 | padding-top: 11px; 282 | overflow-x: hidden; 283 | overflow-y: auto; 284 | background-color: #f8f8f8; 285 | border-right: 1px solid #eee; 286 | } 287 | 288 | .nav-sidebar { 289 | margin-right: -21px; 290 | margin-bottom: 20px; 291 | margin-left: -20px; 292 | } 293 | 294 | .nav-sidebar > li { 295 | padding-top: 0px; 296 | padding-bottom: 0px; 297 | } 298 | 299 | .nav-sidebar > li > button { 300 | border: 0px; 301 | background-color: #f8f8f8; 302 | } 303 | 304 | #designer-editor { 305 | position: absolute; 306 | top: 4px; 307 | right: 0; 308 | bottom: 0; 309 | left: 50px; 310 | margin-top: 47px; 311 | margin-left: 0px; 312 | } 313 | 314 | .ace_gutter { 315 | background-color: white !important; 316 | } 317 | 318 | .ace_scroller.ace_scroll-left { 319 | box-shadow: none !important; 320 | } 321 | 322 | .designer-message-success { 323 | display: none; 324 | } 325 | 326 | .designer-message-info { 327 | display: none; 328 | } 329 | 330 | .designer-message-warning { 331 | display: none; 332 | } 333 | 334 | .designer-message-danger { 335 | display: none; 336 | } 337 | 338 | #designer-message { 339 | z-index: 1000; 340 | padding-right: 20px; 341 | position: fixed; 342 | right: 0px; 343 | bottom: 0; 344 | width: 400px; 345 | } 346 | 347 | #designer-menubar-items li:hover { 348 | background-color: #e7e7e7; 349 | } 350 | 351 | .tooltip-inner { 352 | background-color: #e7e7e7; 353 | color: black; 354 | } 355 | 356 | .tooltip.in { 357 | opacity: 1; 358 | } 359 | 360 | .tooltip.bottom .tooltip-arrow { 361 | border-bottom-color: #e7e7e7 !important; 362 | } 363 | 364 | .tooltip.right .tooltip-arrow { 365 | border-right-color: #e7e7e7 !important; 366 | border-bottom-color: white !important; 367 | } 368 | 369 | .btn:focus { 370 | outline: none !important; 371 | } 372 | 373 | .modal-dialog .modal-content .modal-footer { 374 | border: 0px; 375 | } 376 | 377 | .CodeMirror { 378 | height: inherit !important; 379 | } 380 | 381 | .CodeMirror-gutter { 382 | background-color: white !important; 383 | } 384 | 385 | .CodeMirror-gutters { 386 | border-right: 2px #fff !important; 387 | } 388 | 389 | .CodeMirror-linenumber { 390 | color: #555 !important; 391 | } 392 | 393 | .CodeMirror-lines { 394 | padding-top: 0px !important; 395 | padding-bottom: 0px !important; 396 | } 397 | 398 | .ace_search { 399 | padding-right: 6px !important; 400 | padding: 3px !important; 401 | } 402 | 403 | .icon-reverse { 404 | transform: scaleX(-1) !important; 405 | -moz-transform: scaleX(-1) !important; 406 | -webkit-transform: scaleX(-1) !important; 407 | -ms-transform: scaleX(-1) !important; 408 | } 409 | 410 | .icon-rotate-left { 411 | transform: rotate(90deg) !important; 412 | -webkit-transform: rotate(90deg) !important; 413 | -moz-transform: rotate(90deg) !important; 414 | -ms-transform: rotate(90deg) !important; 415 | } 416 | 417 | #designer-dialog-command-modal .modal-body { 418 | padding-bottom: 0px; 419 | } 420 | 421 | #designer-dialog-command-result-area { 422 | margin-bottom: 0px; 423 | } 424 | 425 | .designer-command-result { 426 | max-height: 300px; 427 | overflow: auto; 428 | } 429 | 430 | .list-group.designer-command-result { 431 | cursor: pointer; 432 | margin-bottom: 0px; 433 | } 434 | 435 | .result-command { 436 | max-height: 400px; 437 | overflow: auto; 438 | } 439 | 440 | .list-group-item { 441 | border-left-width: 0px; 442 | border-right-width: 0px; 443 | color: color !important; 444 | border: 0px; 445 | } 446 | 447 | .ace_editor.ace_autocomplete { 448 | width: 400px !important; 449 | } 450 | -------------------------------------------------------------------------------- /tasks/clean.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | "dist" 4 | ], 5 | "systems": [ 6 | "dist/systems" 7 | ] 8 | } -------------------------------------------------------------------------------- /tasks/concat.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "files": { 4 | "dist/scripts/designer-runtime.js": [ 5 | "dist/systems/designer-runtime.json" 6 | ], 7 | "dist/scripts/editor-behavior.js": ["dist/systems/editor-behavior.json"], 8 | "dist/scripts/editor-component.js": [ 9 | "dist/systems/editor-component.json" 10 | ], 11 | "dist/scripts/system-designer.js": ["dist/systems/system-designer.json"], 12 | "dist/scripts/editor-model.js": ["dist/systems/editor-model.json"], 13 | "dist/scripts/editor-schema.js": ["dist/systems/editor-schema.json"], 14 | "dist/scripts/editor-system.js": ["dist/systems/editor-system.json"], 15 | "dist/scripts/editor-type.js": ["dist/systems/editor-type.json"], 16 | "dist/scripts/diagram.js": ["dist/systems/diagram.json"] 17 | }, 18 | "options": { 19 | "banner": "// System Designer - Copyright 2024 Erwan Carriou\n// Licensed under the Apache License, Version 2.0 (the \"License\")\nruntime.install(", 20 | "footer": ");" 21 | } 22 | }, 23 | "vendor-designer": { 24 | "files": { 25 | "dist/lib/designer/vendor.js": [ 26 | "node_modules/jquery/dist/jquery.min.js", 27 | "node_modules/bootstrap/dist/js/bootstrap.min.js", 28 | "node_modules/github-api/dist/GitHub.bundle.min.js", 29 | "node_modules/prismjs/prism.js", 30 | "node_modules/jsplumb/dist/js/jsplumb.min.js", 31 | "node_modules/system-runtime/dist/system-runtime.min.js" 32 | ] 33 | } 34 | }, 35 | "vendor-editor": { 36 | "files": { 37 | "dist/lib/editor/vendor.js": [ 38 | "node_modules/jquery/dist/jquery.min.js", 39 | "node_modules/bootstrap/dist/js/bootstrap.min.js", 40 | "node_modules/system-runtime/dist/system-runtime.min.js" 41 | ] 42 | } 43 | }, 44 | "vendor-diagram": { 45 | "files": { 46 | "dist/lib/diagram/vendor.js": [ 47 | "node_modules/svg-pan-zoom/dist/svg-pan-zoom.min.js", 48 | "node_modules/viz.js/viz.js", 49 | "node_modules/viz.js/lite.render.js", 50 | "node_modules/jquery/dist/jquery.min.js", 51 | "node_modules/bootstrap/dist/js/bootstrap.min.js", 52 | "node_modules/system-runtime/dist/system-runtime.min.js" 53 | ] 54 | } 55 | }, 56 | "cordova-vendor-editor": { 57 | "files": { 58 | "dist/lib/editor/vendor.js": [ 59 | "node_modules/jquery/dist/jquery.min.js", 60 | "node_modules/bootstrap/dist/js/bootstrap.min.js", 61 | "node_modules/codemirror/lib/codemirror.js", 62 | "node_modules/codemirror/addon/selection/active-line.js", 63 | "node_modules/codemirror/addon/hint/show-hint.js", 64 | "node_modules/codemirror/mode/javascript/javascript.js", 65 | "node_modules/codemirror/mode/textile/textile.js", 66 | "node_modules/codemirror/mode/css/css.js", 67 | "node_modules/codemirror/mode/htmlmixed/htmlmixed.js", 68 | "node_modules/codemirror/mode/xml/xml.js", 69 | "node_modules/codemirror/addon/edit/closebrackets.js", 70 | "node_modules/system-runtime/dist/system-runtime.min.js" 71 | ] 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /tasks/connect.json: -------------------------------------------------------------------------------- 1 | { 2 | "watch": { 3 | "options": { 4 | "livereload": true, 5 | "port": 9001, 6 | "base": "dist/" 7 | } 8 | }, 9 | "dev-server": { 10 | "options": { 11 | "keepalive": false, 12 | "port": 8080, 13 | "base": "dist/" 14 | } 15 | }, 16 | "web-server": { 17 | "options": { 18 | "keepalive": true, 19 | "port": 8080, 20 | "base": "dist/" 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /tasks/copy.json: -------------------------------------------------------------------------------- 1 | { 2 | "web-folder": { 3 | "expand": true, 4 | "cwd": "src/www", 5 | "src": [ 6 | "**" 7 | ], 8 | "dest": "dist" 9 | }, 10 | "libraries": { 11 | "files": [ 12 | { 13 | "src": "node_modules/system-runtime/dist/system-runtime.min.js", 14 | "dest": "dist/lib/system-runtime/system-runtime.min.js" 15 | }, 16 | { 17 | "expand": true, 18 | "cwd": "node_modules/bootstrap/dist/css", 19 | "src": [ 20 | "*" 21 | ], 22 | "dest": "dist/lib/bootstrap/dist/css" 23 | }, 24 | { 25 | "expand": true, 26 | "cwd": "node_modules/bootstrap/dist/fonts", 27 | "src": [ 28 | "*" 29 | ], 30 | "dest": "dist/lib/bootstrap/dist/fonts" 31 | }, 32 | { 33 | "src": "node_modules/prismjs/themes/prism.css", 34 | "dest": "dist/lib/prism/prism.css" 35 | } 36 | ] 37 | }, 38 | "ace": { 39 | "files": [ 40 | { 41 | "src": "node_modules/ace-builds/src-min-noconflict/ace.js", 42 | "dest": "dist/lib/ace/ace.js" 43 | }, 44 | { 45 | "src": "node_modules/ace-builds/src-min-noconflict/ext-language_tools.js", 46 | "dest": "dist/lib/ace/ext-language_tools.js" 47 | }, 48 | { 49 | "src": "node_modules/ace-builds/src-min-noconflict/ext-searchbox.js", 50 | "dest": "dist/lib/ace/ext-searchbox.js" 51 | }, 52 | { 53 | "src": "node_modules/ace-builds/src-min-noconflict/mode-css.js", 54 | "dest": "dist/lib/ace/mode-css.js" 55 | }, 56 | { 57 | "src": "node_modules/ace-builds/src-min-noconflict/mode-html.js", 58 | "dest": "dist/lib/ace/mode-html.js" 59 | }, 60 | { 61 | "src": "node_modules/ace-builds/src-min-noconflict/mode-javascript.js", 62 | "dest": "dist/lib/ace/mode-javascript.js" 63 | }, 64 | { 65 | "src": "node_modules/ace-builds/src-min-noconflict/mode-json.js", 66 | "dest": "dist/lib/ace/mode-json.js" 67 | }, 68 | { 69 | "src": "node_modules/ace-builds/src-min-noconflict/mode-text.js", 70 | "dest": "dist/lib/ace/mode-text.js" 71 | }, 72 | { 73 | "src": "node_modules/ace-builds/src-min-noconflict/worker-css.js", 74 | "dest": "dist/lib/ace/worker-css.js" 75 | }, 76 | { 77 | "src": "node_modules/ace-builds/src-min-noconflict/worker-html.js", 78 | "dest": "dist/lib/ace/worker-html.js" 79 | }, 80 | { 81 | "src": "node_modules/ace-builds/src-min-noconflict/worker-javascript.js", 82 | "dest": "dist/lib/ace/worker-javascript.js" 83 | }, 84 | { 85 | "src": "node_modules/ace-builds/src-min-noconflict/worker-json.js", 86 | "dest": "dist/lib/ace/worker-json.js" 87 | } 88 | ] 89 | }, 90 | "codemirror": { 91 | "files": [ 92 | { 93 | "src": "node_modules/codemirror/lib/codemirror.css", 94 | "dest": "dist/lib/codemirror/codemirror.css" 95 | }, 96 | { 97 | "src": "node_modules/codemirror/addon/hint/show-hint.css", 98 | "dest": "dist/lib/codemirror/addon/hint/show-hint.css" 99 | }, 100 | { 101 | "src": "node_modules/codemirror/theme/eclipse.css", 102 | "dest": "dist/lib/codemirror/theme/eclipse.css" 103 | } 104 | ] 105 | }, 106 | "web-files": { 107 | "expand": true, 108 | "cwd": "src/merges/web", 109 | "src": [ 110 | "**" 111 | ], 112 | "dest": "dist" 113 | }, 114 | "cordova-files": { 115 | "expand": true, 116 | "cwd": "src/merges/cordova", 117 | "src": [ 118 | "**" 119 | ], 120 | "dest": "dist" 121 | }, 122 | "electron-files": { 123 | "expand": true, 124 | "cwd": "src/merges/electron", 125 | "src": [ 126 | "**" 127 | ], 128 | "dest": "dist" 129 | } 130 | } -------------------------------------------------------------------------------- /tasks/json_merge.json: -------------------------------------------------------------------------------- 1 | { 2 | "web-systems": { 3 | "files": { 4 | "dist/systems/designer-runtime.json": [ 5 | "node_modules/system-runtime/extensions/storage.json", 6 | "node_modules/system-runtime/extensions/mode-admin.json", 7 | "src/systems/core/designer-runtime.json" 8 | ], 9 | "dist/systems/system-designer.json": [ 10 | "src/systems/types/*.json", 11 | "src/systems/classes/*.json", 12 | "node_modules/system-runtime/extensions/storage.json", 13 | "addons/*.json", 14 | "extensions/*.json", 15 | "src/systems/core/system-designer.json" 16 | ], 17 | "dist/systems/editor-system.json": [ 18 | "src/systems/types/*.json", 19 | "src/systems/classes/*.json", 20 | "node_modules/system-runtime/extensions/storage.json", 21 | "addons/*.json", 22 | "extensions/*.json", 23 | "src/systems/core/editor-system.json" 24 | ], 25 | "dist/systems/editor-schema.json": [ 26 | "src/systems/types/*.json", 27 | "src/systems/classes/*.json", 28 | "node_modules/system-runtime/extensions/storage.json", 29 | "addons/*.json", 30 | "extensions/*.json", 31 | "src/systems/core/editor-schema.json" 32 | ], 33 | "dist/systems/editor-model.json": [ 34 | "src/systems/types/*.json", 35 | "src/systems/classes/*.json", 36 | "node_modules/system-runtime/extensions/storage.json", 37 | "addons/*.json", 38 | "extensions/*.json", 39 | "src/systems/core/editor-model.json" 40 | ], 41 | "dist/systems/editor-type.json": [ 42 | "src/systems/types/*.json", 43 | "src/systems/classes/*.json", 44 | "node_modules/system-runtime/extensions/storage.json", 45 | "addons/*.json", 46 | "extensions/*.json", 47 | "src/systems/core/editor-type.json" 48 | ], 49 | "dist/systems/editor-behavior.json": [ 50 | "src/systems/types/*.json", 51 | "src/systems/classes/*.json", 52 | "node_modules/system-runtime/extensions/storage.json", 53 | "addons/*.json", 54 | "extensions/*.json", 55 | "src/systems/core/editor-behavior.json" 56 | ], 57 | "dist/systems/editor-component.json": [ 58 | "src/systems/types/*.json", 59 | "src/systems/classes/*.json", 60 | "node_modules/system-runtime/extensions/storage.json", 61 | "addons/*.json", 62 | "extensions/*.json", 63 | "src/systems/core/editor-component.json" 64 | ], 65 | "dist/systems/diagram.json": [ 66 | "src/systems/types/*.json", 67 | "src/systems/classes/*.json", 68 | "node_modules/system-runtime/extensions/storage.json", 69 | "addons/*.json", 70 | "extensions/*.json", 71 | "src/systems/core/diagram.json" 72 | ] 73 | } 74 | }, 75 | "cordova-systems": { 76 | "files": { 77 | "dist/systems/designer-runtime.json": [ 78 | "node_modules/system-runtime/extensions/storage.json", 79 | "node_modules/system-runtime/extensions/mode-admin.json", 80 | "src/systems/core/designer-runtime.json" 81 | ], 82 | "dist/systems/system-designer.json": [ 83 | "src/systems/types/*.json", 84 | "src/systems/classes/*.json", 85 | "src/systems/platforms/cordova.json", 86 | "node_modules/system-runtime/extensions/storage.json", 87 | "addons/*.json", 88 | "extensions/*.json", 89 | "src/systems/core/system-designer.json" 90 | ], 91 | "dist/systems/editor-system.json": [ 92 | "src/systems/types/*.json", 93 | "src/systems/classes/*.json", 94 | "src/systems/platforms/cordova.json", 95 | "node_modules/system-runtime/extensions/storage.json", 96 | "addons/*.json", 97 | "extensions/*.json", 98 | "src/systems/core/editor-system.json" 99 | ], 100 | "dist/systems/editor-schema.json": [ 101 | "src/systems/types/*.json", 102 | "src/systems/classes/*.json", 103 | "src/systems/platforms/cordova.json", 104 | "node_modules/system-runtime/extensions/storage.json", 105 | "addons/*.json", 106 | "extensions/*.json", 107 | "src/systems/core/editor-schema.json" 108 | ], 109 | "dist/systems/editor-model.json": [ 110 | "src/systems/types/*.json", 111 | "src/systems/classes/*.json", 112 | "src/systems/platforms/cordova.json", 113 | "node_modules/system-runtime/extensions/storage.json", 114 | "addons/*.json", 115 | "extensions/*.json", 116 | "src/systems/core/editor-model.json" 117 | ], 118 | "dist/systems/editor-type.json": [ 119 | "src/systems/types/*.json", 120 | "src/systems/classes/*.json", 121 | "src/systems/platforms/cordova.json", 122 | "node_modules/system-runtime/extensions/storage.json", 123 | "addons/*.json", 124 | "extensions/*.json", 125 | "src/systems/core/editor-type.json" 126 | ], 127 | "dist/systems/editor-behavior.json": [ 128 | "src/systems/types/*.json", 129 | "src/systems/classes/*.json", 130 | "src/systems/platforms/cordova.json", 131 | "node_modules/system-runtime/extensions/storage.json", 132 | "addons/*.json", 133 | "extensions/*.json", 134 | "src/systems/core/editor-behavior.json" 135 | ], 136 | "dist/systems/editor-component.json": [ 137 | "src/systems/types/*.json", 138 | "src/systems/classes/*.json", 139 | "src/systems/platforms/cordova.json", 140 | "node_modules/system-runtime/extensions/storage.json", 141 | "addons/*.json", 142 | "extensions/*.json", 143 | "src/systems/core/editor-component.json" 144 | ] 145 | } 146 | }, 147 | "electron-systems": { 148 | "files": { 149 | "dist/systems/designer-runtime.json": [ 150 | "node_modules/system-runtime/extensions/storage.json", 151 | "node_modules/system-runtime/extensions/mode-admin.json", 152 | "src/systems/core/designer-runtime.json" 153 | ], 154 | "dist/systems/system-designer.json": [ 155 | "src/systems/types/*.json", 156 | "src/systems/classes/*.json", 157 | "src/systems/platforms/electron.json", 158 | "node_modules/system-runtime/extensions/storage.json", 159 | "addons/*.json", 160 | "extensions/*.json", 161 | "src/systems/core/system-designer.json" 162 | ], 163 | "dist/systems/editor-system.json": [ 164 | "src/systems/types/*.json", 165 | "src/systems/classes/*.json", 166 | "src/systems/platforms/electron.json", 167 | "node_modules/system-runtime/extensions/storage.json", 168 | "addons/*.json", 169 | "extensions/*.json", 170 | "src/systems/core/editor-system.json" 171 | ], 172 | "dist/systems/editor-schema.json": [ 173 | "src/systems/types/*.json", 174 | "src/systems/classes/*.json", 175 | "src/systems/platforms/electron.json", 176 | "node_modules/system-runtime/extensions/storage.json", 177 | "addons/*.json", 178 | "extensions/*.json", 179 | "src/systems/core/editor-schema.json" 180 | ], 181 | "dist/systems/editor-model.json": [ 182 | "src/systems/types/*.json", 183 | "src/systems/classes/*.json", 184 | "src/systems/platforms/electron.json", 185 | "node_modules/system-runtime/extensions/storage.json", 186 | "addons/*.json", 187 | "extensions/*.json", 188 | "src/systems/core/editor-model.json" 189 | ], 190 | "dist/systems/editor-type.json": [ 191 | "src/systems/types/*.json", 192 | "src/systems/classes/*.json", 193 | "src/systems/platforms/electron.json", 194 | "node_modules/system-runtime/extensions/storage.json", 195 | "addons/*.json", 196 | "extensions/*.json", 197 | "src/systems/core/editor-type.json" 198 | ], 199 | "dist/systems/editor-behavior.json": [ 200 | "src/systems/types/*.json", 201 | "src/systems/classes/*.json", 202 | "src/systems/platforms/electron.json", 203 | "node_modules/system-runtime/extensions/storage.json", 204 | "addons/*.json", 205 | "extensions/*.json", 206 | "src/systems/core/editor-behavior.json" 207 | ], 208 | "dist/systems/editor-component.json": [ 209 | "src/systems/types/*.json", 210 | "src/systems/classes/*.json", 211 | "src/systems/platforms/electron.json", 212 | "node_modules/system-runtime/extensions/storage.json", 213 | "addons/*.json", 214 | "extensions/*.json", 215 | "src/systems/core/editor-component.json" 216 | ], 217 | "dist/systems/diagram.json": [ 218 | "src/systems/types/*.json", 219 | "src/systems/classes/*.json", 220 | "node_modules/system-runtime/extensions/storage.json", 221 | "addons/*.json", 222 | "extensions/*.json", 223 | "src/systems/core/diagram.json" 224 | ] 225 | } 226 | } 227 | } -------------------------------------------------------------------------------- /tasks/shell.json: -------------------------------------------------------------------------------- 1 | { 2 | "cypress-ci": { 3 | "cmd": "npx cypress run --record", 4 | "fail": true 5 | }, 6 | "cypress-dev": { 7 | "cmd": "npx cypress run --config video=false", 8 | "fail": true 9 | } 10 | } -------------------------------------------------------------------------------- /tasks/uglify.json: -------------------------------------------------------------------------------- 1 | { 2 | "vendor-editor": { 3 | "files": { 4 | "dist/lib/editor/vendor.js": "dist/lib/editor/vendor.js" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /tasks/watch.json: -------------------------------------------------------------------------------- 1 | { 2 | "web": { 3 | "files": [ 4 | "src/systems/*/*.json", 5 | "src/merges/web/*.html", 6 | "src/merges/web/app/index.html", 7 | "src/www/styles/*.css", 8 | "addons/*.json", 9 | "extensions/*.json" 10 | ], 11 | "tasks": [ 12 | "copy:web-folder", 13 | "copy:web-files", 14 | "json_merge:web-systems", 15 | "copy:web-livereload" 16 | ], 17 | "options": { 18 | "spawn": false, 19 | "livereload": true 20 | } 21 | }, 22 | "cordova": { 23 | "files": [ 24 | "src/systems/*/*.json", 25 | "src/merges/cordova/cordova.js", 26 | "src/merges/cordova/*.html", 27 | "src/merges/cordova/app/index.html", 28 | "src/merges/cordova/scripts/mobile.js", 29 | "src/merges/cordova/styles/mobile.css", 30 | "src/www/styles/*.css", 31 | "addons/*.json", 32 | "extensions/*.json" 33 | ], 34 | "tasks": [ 35 | "copy:web-folder", 36 | "copy:cordova-files", 37 | "json_merge:cordova-systems", 38 | "concat:app", 39 | "copy:web-livereload" 40 | ], 41 | "options": { 42 | "spawn": false, 43 | "livereload": true 44 | } 45 | } 46 | } --------------------------------------------------------------------------------