7 Commits

Author SHA1 Message Date
Eric Tuvesson
94dd3dbf0e chore: bump version (#62) 2024-08-08 21:27:12 +02:00
Eric Tuvesson
c593a134b3 chore: rename project name (#60) 2024-08-08 21:23:23 +02:00
Eric Tuvesson
dc638ea8fc feat: Upgrade Electron (#61) 2024-08-08 21:12:39 +02:00
Eric Tuvesson
759c8a0030 fix(runtime): Column node, hide children on calculation (#59)
This removes the initial visible layout shift
2024-07-24 15:59:10 +02:00
Eric Tuvesson
aea80c6586 feat(runtime): Add capture attribute on Open File Picker node (#57)
- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#capture
- https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/capture
2024-07-19 15:03:03 +02:00
Eric Tuvesson
46e2efa576 feat(runtime): Add "Switched" signal output on the Switch node (#58) 2024-07-19 15:02:49 +02:00
Eric Tuvesson
c508e15546 chore: clean up user nodes (#53) 2024-07-15 15:21:01 +02:00
15 changed files with 249 additions and 335 deletions

View File

@@ -1,4 +1,4 @@
name: Build noodl-editor name: Build fluxscape-editor
on: on:
# Allows you to run this workflow manually from the Actions tab # Allows you to run this workflow manually from the Actions tab
@@ -72,6 +72,6 @@ jobs:
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: noodl-editor-${{ matrix.platform }}-${{ github.head_ref }}-${{ github.sha }} name: fluxscape-editor-${{ matrix.platform }}-${{ github.head_ref }}-${{ github.sha }}
path: publish path: publish
retention-days: "12" retention-days: '12'

View File

@@ -1,4 +1,4 @@
name: Test noodl-editor name: Test fluxscape-editor
on: on:
# Allows you to run this workflow manually from the Actions tab # Allows you to run this workflow manually from the Actions tab

301
package-lock.json generated
View File

@@ -25220,9 +25220,9 @@
} }
}, },
"node_modules/electron": { "node_modules/electron": {
"version": "31.1.0", "version": "31.3.1",
"resolved": "https://registry.npmjs.org/electron/-/electron-31.1.0.tgz", "resolved": "https://registry.npmjs.org/electron/-/electron-31.3.1.tgz",
"integrity": "sha512-TBOwqLxSxnx6+pH6GMri7R3JPH2AkuGJHfWZS0p1HsmN+Qr1T9b0IRJnnehSd/3NZAmAre4ft9Ljec7zjyKFJA==", "integrity": "sha512-9fiuWlRhBfygtcT+auRd/WdBK/f8LZZcrpx0RjpXhH2DPTP/PfnkC4JB1PW55qCbGbh4wAgkYbf4ExIag8oGCA==",
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
"@electron/get": "^2.0.0", "@electron/get": "^2.0.0",
@@ -27211,6 +27211,10 @@
"react": "^15.0.2 || ^16.0.0 || ^17.0.0" "react": "^15.0.2 || ^16.0.0 || ^17.0.0"
} }
}, },
"node_modules/fluxscape-editor": {
"resolved": "packages/noodl-editor",
"link": true
},
"node_modules/focus-lock": { "node_modules/focus-lock": {
"version": "0.8.1", "version": "0.8.1",
"dev": true, "dev": true,
@@ -35451,10 +35455,6 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/noodl-editor": {
"resolved": "packages/noodl-editor",
"link": true
},
"node_modules/nopt": { "node_modules/nopt": {
"version": "1.0.10", "version": "1.0.10",
"license": "MIT", "license": "MIT",
@@ -48980,7 +48980,8 @@
"dev": true "dev": true
}, },
"packages/noodl-editor": { "packages/noodl-editor": {
"version": "1.0.0", "name": "fluxscape-editor",
"version": "1.1.0",
"dependencies": { "dependencies": {
"@electron/remote": "^2.1.2", "@electron/remote": "^2.1.2",
"@jaames/iro": "^5.5.2", "@jaames/iro": "^5.5.2",
@@ -49038,7 +49039,7 @@
"babel-loader": "^8.2.4", "babel-loader": "^8.2.4",
"concurrently": "^7.4.0", "concurrently": "^7.4.0",
"css-loader": "^6.7.1", "css-loader": "^6.7.1",
"electron": "^31.1.0", "electron": "31.3.1",
"electron-builder": "^24.9.1", "electron-builder": "^24.9.1",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"html-loader": "^3.1.0", "html-loader": "^3.1.0",
@@ -74070,9 +74071,9 @@
} }
}, },
"electron": { "electron": {
"version": "31.1.0", "version": "31.3.1",
"resolved": "https://registry.npmjs.org/electron/-/electron-31.1.0.tgz", "resolved": "https://registry.npmjs.org/electron/-/electron-31.3.1.tgz",
"integrity": "sha512-TBOwqLxSxnx6+pH6GMri7R3JPH2AkuGJHfWZS0p1HsmN+Qr1T9b0IRJnnehSd/3NZAmAre4ft9Ljec7zjyKFJA==", "integrity": "sha512-9fiuWlRhBfygtcT+auRd/WdBK/f8LZZcrpx0RjpXhH2DPTP/PfnkC4JB1PW55qCbGbh4wAgkYbf4ExIag8oGCA==",
"requires": { "requires": {
"@electron/get": "^2.0.0", "@electron/get": "^2.0.0",
"@types/node": "^20.9.0", "@types/node": "^20.9.0",
@@ -75431,6 +75432,144 @@
"fbjs": "^3.0.1" "fbjs": "^3.0.1"
} }
}, },
"fluxscape-editor": {
"version": "file:packages/noodl-editor",
"requires": {
"@babel/core": "^7.19.1",
"@babel/preset-react": "^7.18.6",
"@electron/remote": "^2.1.2",
"@jaames/iro": "^5.5.2",
"@microsoft/fetch-event-source": "^2.0.1",
"@noodl/git": "file:../noodl-git",
"@noodl/noodl-parse-dashboard": "file:../noodl-parse-dashboard",
"@noodl/platform": "file:../noodl-platform",
"@noodl/platform-electron": "file:../noodl-platform-electron",
"@svgr/webpack": "^6.4.0",
"@types/checksum": "^0.1.33",
"@types/jasmine": "^4.3.0",
"@types/jquery": "^3.5.14",
"@types/react": "^17.0.50",
"@types/react-dom": "^18.0.0",
"@types/remarkable": "^2.0.3",
"@types/rimraf": "^3.0.2",
"@types/split2": "^3.2.1",
"@types/string.prototype.matchall": "^4.0.1",
"@types/underscore": "^1.11.4",
"@types/webpack-env": "^1.18.0",
"about-window": "^1.15.2",
"algoliasearch": "^4.14.2",
"archiver": "^5.3.0",
"async": "^3.2.4",
"babel-loader": "^8.2.4",
"classnames": "^2.3.2",
"concurrently": "^7.4.0",
"css-loader": "^6.7.1",
"diff3": "0.0.4",
"dmg-license": "^1.0.11",
"electron": "31.3.1",
"electron-builder": "^24.9.1",
"electron-store": "^8.1.0",
"electron-updater": "^6.1.7",
"express": "^4.17.3",
"file-loader": "^6.2.0",
"highlight.js": "^11.5.1",
"html-loader": "^3.1.0",
"isbinaryfile": "^5.0.0",
"md5": "^2.3.0",
"md5-file": "^5.0.0",
"mixpanel-browser": "^2.45.0",
"mkdirp": "0.5.1",
"mkdirp-sync": "0.0.2",
"monaco-editor": "^0.34.0",
"monaco-editor-webpack-plugin": "^7.0.1",
"ncp": "^2.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.0",
"react-hot-toast": "^2.4.0",
"react-instantsearch-hooks-web": "^6.38.0",
"react-json-view": "^1.21.3",
"react-rnd": "^10.3.7",
"remarkable": "^2.0.1",
"rimraf": "^3.0.2",
"s3": "git+https://github.com/noodlapp/node-s3-client.git",
"sass": "^1.55.0",
"sass-loader": "^12.6.0",
"string.prototype.matchall": "^4.0.7",
"stringify": "^5.2.0",
"style-loader": "^3.3.1",
"ts-loader": "^9.4.1",
"ts-node": "^10.7.0",
"typescript": "^4.8.3",
"underscore": "^1.13.6",
"url-loader": "^4.1.1",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.11.1",
"webpack-merge": "^5.8.0",
"websocket-stream": "^5.5.2",
"ws": "^8.9.0"
},
"dependencies": {
"@webpack-cli/configtest": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz",
"integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==",
"dev": true,
"requires": {}
},
"@webpack-cli/info": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz",
"integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==",
"dev": true,
"requires": {
"envinfo": "^7.7.3"
}
},
"@webpack-cli/serve": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz",
"integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==",
"dev": true,
"requires": {}
},
"commander": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
"integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
"dev": true
},
"rechoir": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz",
"integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==",
"dev": true,
"requires": {
"resolve": "^1.9.0"
}
},
"webpack-cli": {
"version": "4.10.0",
"resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz",
"integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==",
"dev": true,
"requires": {
"@discoveryjs/json-ext": "^0.5.0",
"@webpack-cli/configtest": "^1.2.0",
"@webpack-cli/info": "^1.5.0",
"@webpack-cli/serve": "^1.7.0",
"colorette": "^2.0.14",
"commander": "^7.0.0",
"cross-spawn": "^7.0.3",
"fastest-levenshtein": "^1.0.12",
"import-local": "^3.0.2",
"interpret": "^2.2.0",
"rechoir": "^0.7.0",
"webpack-merge": "^5.7.3"
}
}
}
},
"focus-lock": { "focus-lock": {
"version": "0.8.1", "version": "0.8.1",
"dev": true, "dev": true,
@@ -81006,144 +81145,6 @@
"version": "2.0.10", "version": "2.0.10",
"dev": true "dev": true
}, },
"noodl-editor": {
"version": "file:packages/noodl-editor",
"requires": {
"@babel/core": "^7.19.1",
"@babel/preset-react": "^7.18.6",
"@electron/remote": "^2.1.2",
"@jaames/iro": "^5.5.2",
"@microsoft/fetch-event-source": "^2.0.1",
"@noodl/git": "file:../noodl-git",
"@noodl/noodl-parse-dashboard": "file:../noodl-parse-dashboard",
"@noodl/platform": "file:../noodl-platform",
"@noodl/platform-electron": "file:../noodl-platform-electron",
"@svgr/webpack": "^6.4.0",
"@types/checksum": "^0.1.33",
"@types/jasmine": "^4.3.0",
"@types/jquery": "^3.5.14",
"@types/react": "^17.0.50",
"@types/react-dom": "^18.0.0",
"@types/remarkable": "^2.0.3",
"@types/rimraf": "^3.0.2",
"@types/split2": "^3.2.1",
"@types/string.prototype.matchall": "^4.0.1",
"@types/underscore": "^1.11.4",
"@types/webpack-env": "^1.18.0",
"about-window": "^1.15.2",
"algoliasearch": "^4.14.2",
"archiver": "^5.3.0",
"async": "^3.2.4",
"babel-loader": "^8.2.4",
"classnames": "^2.3.2",
"concurrently": "^7.4.0",
"css-loader": "^6.7.1",
"diff3": "0.0.4",
"dmg-license": "^1.0.11",
"electron": "^31.1.0",
"electron-builder": "^24.9.1",
"electron-store": "^8.1.0",
"electron-updater": "^6.1.7",
"express": "^4.17.3",
"file-loader": "^6.2.0",
"highlight.js": "^11.5.1",
"html-loader": "^3.1.0",
"isbinaryfile": "^5.0.0",
"md5": "^2.3.0",
"md5-file": "^5.0.0",
"mixpanel-browser": "^2.45.0",
"mkdirp": "0.5.1",
"mkdirp-sync": "0.0.2",
"monaco-editor": "^0.34.0",
"monaco-editor-webpack-plugin": "^7.0.1",
"ncp": "^2.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.0",
"react-hot-toast": "^2.4.0",
"react-instantsearch-hooks-web": "^6.38.0",
"react-json-view": "^1.21.3",
"react-rnd": "^10.3.7",
"remarkable": "^2.0.1",
"rimraf": "^3.0.2",
"s3": "git+https://github.com/noodlapp/node-s3-client.git",
"sass": "^1.55.0",
"sass-loader": "^12.6.0",
"string.prototype.matchall": "^4.0.7",
"stringify": "^5.2.0",
"style-loader": "^3.3.1",
"ts-loader": "^9.4.1",
"ts-node": "^10.7.0",
"typescript": "^4.8.3",
"underscore": "^1.13.6",
"url-loader": "^4.1.1",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.11.1",
"webpack-merge": "^5.8.0",
"websocket-stream": "^5.5.2",
"ws": "^8.9.0"
},
"dependencies": {
"@webpack-cli/configtest": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz",
"integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==",
"dev": true,
"requires": {}
},
"@webpack-cli/info": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz",
"integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==",
"dev": true,
"requires": {
"envinfo": "^7.7.3"
}
},
"@webpack-cli/serve": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz",
"integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==",
"dev": true,
"requires": {}
},
"commander": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
"integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
"dev": true
},
"rechoir": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz",
"integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==",
"dev": true,
"requires": {
"resolve": "^1.9.0"
}
},
"webpack-cli": {
"version": "4.10.0",
"resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz",
"integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==",
"dev": true,
"requires": {
"@discoveryjs/json-ext": "^0.5.0",
"@webpack-cli/configtest": "^1.2.0",
"@webpack-cli/info": "^1.5.0",
"@webpack-cli/serve": "^1.7.0",
"colorette": "^2.0.14",
"commander": "^7.0.0",
"cross-spawn": "^7.0.3",
"fastest-levenshtein": "^1.0.12",
"import-local": "^3.0.2",
"interpret": "^2.2.0",
"rechoir": "^0.7.0",
"webpack-merge": "^5.7.3"
}
}
}
},
"nopt": { "nopt": {
"version": "1.0.10", "version": "1.0.10",
"requires": { "requires": {

View File

@@ -12,7 +12,7 @@
"graph": "npx nx graph", "graph": "npx nx graph",
"ci:prepare:editor": "ts-node ./scripts/ci-editor-prepare.ts", "ci:prepare:editor": "ts-node ./scripts/ci-editor-prepare.ts",
"ci:build:viewer": "lerna exec --scope @noodl/noodl-viewer-react -- npm run build", "ci:build:viewer": "lerna exec --scope @noodl/noodl-viewer-react -- npm run build",
"ci:build:editor": "lerna exec --scope noodl-editor -- npm run ci:build", "ci:build:editor": "lerna exec --scope fluxscape-editor -- npm run ci:build",
"build:editor": "ts-node ./scripts/build-editor.ts", "build:editor": "ts-node ./scripts/build-editor.ts",
"build:editor:_viewer": "ts-node ./scripts/noodl-editor/build-viewer.ts", "build:editor:_viewer": "ts-node ./scripts/noodl-editor/build-viewer.ts",
"build:editor:_editor": "ts-node ./scripts/noodl-editor/build-editor.ts", "build:editor:_editor": "ts-node ./scripts/noodl-editor/build-editor.ts",
@@ -20,7 +20,7 @@
"build:cloud-runtime": "lerna run build --scope @noodl/cloud-runtime --stream && lerna run build:pack --scope @noodl/cloud-runtime --stream", "build:cloud-runtime": "lerna run build --scope @noodl/cloud-runtime --stream && lerna run build:pack --scope @noodl/cloud-runtime --stream",
"start:storybook": "lerna exec --scope @noodl/noodl-core-ui -- npm run start", "start:storybook": "lerna exec --scope @noodl/noodl-core-ui -- npm run start",
"start:viewer": "lerna run start --scope @noodl/noodl-viewer-react --stream", "start:viewer": "lerna run start --scope @noodl/noodl-viewer-react --stream",
"start:editor": "lerna run start --scope noodl-editor --stream", "start:editor": "lerna run start --scope fluxscape-editor --stream",
"dev": "ts-node ./scripts/start.ts", "dev": "ts-node ./scripts/start.ts",
"start": "ts-node ./scripts/start.ts -- --build-viewer", "start": "ts-node ./scripts/start.ts -- --build-viewer",
"test:editor": "ts-node ./scripts/test-editor.ts", "test:editor": "ts-node ./scripts/test-editor.ts",

View File

@@ -1,10 +1,10 @@
{ {
"name": "noodl-editor", "name": "fluxscape-editor",
"productName": "Fluxscape", "productName": "Fluxscape",
"description": "Node-Based App Builder for Scalability & Rapid Development, a fork of Noodl", "description": "Node-Based App Builder for Scalability & Rapid Development, a fork of Noodl",
"author": "Fluxscape <contact@fluxscape.io>", "author": "Fluxscape <contact@fluxscape.io>",
"homepage": "https://fluxscape.io", "homepage": "https://fluxscape.io",
"version": "1.0.0", "version": "1.1.0",
"main": "src/main/main.js", "main": "src/main/main.js",
"scripts": { "scripts": {
"build": "npx ts-node -P ./tsconfig.build.json ./scripts/build.ts", "build": "npx ts-node -P ./tsconfig.build.json ./scripts/build.ts",
@@ -114,7 +114,7 @@
"babel-loader": "^8.2.4", "babel-loader": "^8.2.4",
"concurrently": "^7.4.0", "concurrently": "^7.4.0",
"css-loader": "^6.7.1", "css-loader": "^6.7.1",
"electron": "^31.1.0", "electron": "31.3.1",
"electron-builder": "^24.9.1", "electron-builder": "^24.9.1",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"html-loader": "^3.1.0", "html-loader": "^3.1.0",

View File

@@ -1,14 +1,15 @@
//this just assumes the base url is '/' always //this just assumes the base url is '/' always
function getAbsoluteUrl(_url) { function getAbsoluteUrl(_url) {
//convert to string in case the _url is a Cloud File (which is an object with a custom toString()) //convert to string in case the _url is a Cloud File (which is an object with a custom toString())
const url = String(_url); const url = String(_url);
//only add a the base url if this is a local URL (e.g. not a https url or base64 string) //only add a the base url if this is a local URL (e.g. not a https url or base64 string)
if (!url || url[0] === '/' || url.includes('://') || url.startsWith('data:')) { if (!url || url[0] === "/" || url.includes("://") || url.startsWith('data:')) {
return url; return url;
} }
return (Noodl.Env['BaseUrl'] || '/') + url; return (Noodl.baseUrl || '/') + url;
} }
/** /**

View File

@@ -132,6 +132,7 @@ export function Columns(props: ColumnsProps) {
className={['columns-container', props.className].join(' ')} className={['columns-container', props.className].join(' ')}
ref={containerRef} ref={containerRef}
style={{ style={{
visibility: containerWidth === null ? "hidden" : "visible",
marginTop: parseFloat(props.marginY) * -1, marginTop: parseFloat(props.marginY) * -1,
marginLeft: parseFloat(props.marginX) * -1, marginLeft: parseFloat(props.marginX) * -1,
display: 'flex', display: 'flex',

View File

@@ -43,6 +43,10 @@ const OpenFilePicker = {
input.accept = this._internal.acceptedFileTypes; input.accept = this._internal.acceptedFileTypes;
if (this._internal.capture) {
input.capture = this._internal.capture;
}
input.onchange = onChange; input.onchange = onChange;
input.click(); input.click();
} }
@@ -54,6 +58,14 @@ const OpenFilePicker = {
set(value) { set(value) {
this._internal.acceptedFileTypes = value; this._internal.acceptedFileTypes = value;
} }
},
capture: {
group: 'General',
type: 'string',
displayName: 'Capture',
set(value) {
this._internal.capture = value;
}
} }
}, },
outputs: { outputs: {

View File

@@ -4,7 +4,7 @@ const Switch = {
name: 'Switch', name: 'Switch',
docs: 'https://docs.noodl.net/nodes/logic/switch', docs: 'https://docs.noodl.net/nodes/logic/switch',
category: 'Logic', category: 'Logic',
initialize: function () { initialize() {
this._internal.state = false; this._internal.state = false;
this._internal.initialized = false; this._internal.initialized = false;
}, },
@@ -15,7 +15,7 @@ const Switch = {
on: { on: {
displayName: 'On', displayName: 'On',
group: 'Change State', group: 'Change State',
valueChangedToTrue: function () { valueChangedToTrue() {
if (this._internal.state === true) { if (this._internal.state === true) {
return; return;
} }
@@ -27,7 +27,7 @@ const Switch = {
off: { off: {
displayName: 'Off', displayName: 'Off',
group: 'Change State', group: 'Change State',
valueChangedToTrue: function () { valueChangedToTrue() {
if (this._internal.state === false) { if (this._internal.state === false) {
return; return;
} }
@@ -39,7 +39,7 @@ const Switch = {
flip: { flip: {
displayName: 'Flip', displayName: 'Flip',
group: 'Change State', group: 'Change State',
valueChangedToTrue: function () { valueChangedToTrue() {
this._internal.state = !this._internal.state; this._internal.state = !this._internal.state;
this.flagOutputDirty('state'); this.flagOutputDirty('state');
this.emitSignals(); this.emitSignals();
@@ -50,7 +50,7 @@ const Switch = {
displayName: 'State', displayName: 'State',
group: 'General', group: 'General',
default: false, default: false,
set: function (value) { set(value) {
this._internal.state = !!value; this._internal.state = !!value;
this.flagOutputDirty('state'); this.flagOutputDirty('state');
this.emitSignals(); this.emitSignals();
@@ -61,10 +61,15 @@ const Switch = {
state: { state: {
type: 'boolean', type: 'boolean',
displayName: 'Current State', displayName: 'Current State',
getter: function () { getter() {
return this._internal.state; return this._internal.state;
} }
}, },
switched: {
displayName: 'Switched',
type: 'signal',
group: 'Signals'
},
switchedToOn: { switchedToOn: {
displayName: 'Switched To On', displayName: 'Switched To On',
type: 'signal', type: 'signal',
@@ -77,12 +82,13 @@ const Switch = {
} }
}, },
prototypeExtensions: { prototypeExtensions: {
emitSignals: function () { emitSignals() {
if (this._internal.state === true) { if (this._internal.state === true) {
this.sendSignalOnOutput('switchedToOn'); this.sendSignalOnOutput('switchedToOn');
} else { } else {
this.sendSignalOnOutput('switchedToOff'); this.sendSignalOnOutput('switchedToOff');
} }
this.sendSignalOnOutput('switched');
} }
} }
}; };

View File

@@ -1,18 +1,13 @@
'use strict'; 'use strict';
const { Node, EdgeTriggeredInput } = require('@noodl/runtime');
const UserService = require('./userservice'); const UserService = require('./userservice');
var LoginNodeDefinition = { const LoginNodeDefinition = {
name: 'net.noodl.user.LogIn', name: 'net.noodl.user.LogIn',
docs: 'https://docs.noodl.net/nodes/data/user/log-in', docs: 'https://docs.noodl.net/nodes/data/user/log-in',
displayNodeName: 'Log In', displayNodeName: 'Log In',
category: 'Cloud Services', category: 'Cloud Services',
color: 'data', color: 'data',
initialize: function () {
var internal = this._internal;
},
getInspectInfo() {},
outputs: { outputs: {
success: { success: {
type: 'signal', type: 'signal',
@@ -28,7 +23,7 @@ var LoginNodeDefinition = {
type: 'string', type: 'string',
displayName: 'Error', displayName: 'Error',
group: 'Error', group: 'Error',
getter: function () { getter() {
return this._internal.error; return this._internal.error;
} }
} }
@@ -37,7 +32,7 @@ var LoginNodeDefinition = {
login: { login: {
displayName: 'Do', displayName: 'Do',
group: 'Actions', group: 'Actions',
valueChangedToTrue: function () { valueChangedToTrue() {
this.scheduleLogIn(); this.scheduleLogIn();
} }
}, },
@@ -45,7 +40,7 @@ var LoginNodeDefinition = {
displayName: 'Username', displayName: 'Username',
type: 'string', type: 'string',
group: 'General', group: 'General',
set: function (value) { set(value) {
this._internal.username = value; this._internal.username = value;
} }
}, },
@@ -53,13 +48,13 @@ var LoginNodeDefinition = {
displayName: 'Password', displayName: 'Password',
type: 'string', type: 'string',
group: 'General', group: 'General',
set: function (value) { set(value) {
this._internal.password = value; this._internal.password = value;
} }
} }
}, },
methods: { methods: {
setError: function (err) { setError(err) {
this._internal.error = err; this._internal.error = err;
this.flagOutputDirty('error'); this.flagOutputDirty('error');
this.sendSignalOnOutput('failure'); this.sendSignalOnOutput('failure');
@@ -76,9 +71,7 @@ var LoginNodeDefinition = {
this.context.editorConnection.clearWarning(this.nodeScope.componentOwner.name, this.id, 'user-login-warning'); this.context.editorConnection.clearWarning(this.nodeScope.componentOwner.name, this.id, 'user-login-warning');
} }
}, },
scheduleLogIn: function () { scheduleLogIn() {
const internal = this._internal;
if (this.logInScheduled === true) return; if (this.logInScheduled === true) return;
this.logInScheduled = true; this.logInScheduled = true;
@@ -100,89 +93,7 @@ var LoginNodeDefinition = {
} }
}; };
/*function updatePorts(nodeId, parameters, editorConnection, dbCollections) {
var ports = [];
ports.push({
name: 'collectionName',
displayName: "Class",
group: "General",
type: { name: 'enum', enums: (dbCollections !== undefined) ? dbCollections.map((c) => { return { value: c.name, label: c.name } }) : [], allowEditOnly: true },
plug: 'input'
})
if (parameters.collectionName && dbCollections) {
// Fetch ports from collection keys
var c = dbCollections.find((c) => c.name === parameters.collectionName);
if (c && c.schema && c.schema.properties) {
var props = c.schema.properties;
for (var key in props) {
var p = props[key];
if (ports.find((_p) => _p.name === key)) continue;
if(p.type === 'Relation') {
}
else { // Other schema type ports
const _typeMap = {
"String":"string",
"Boolean":"boolean",
"Number":"number",
"Date":"date"
}
ports.push({
type: {
name: _typeMap[p.type]?_typeMap[p.type]:'*',
},
plug: 'output',
group: 'Properties',
name: 'prop-' + key,
displayName: key,
})
ports.push({
type: 'signal',
plug: 'output',
group: 'Changed Events',
displayName: key+ ' Changed',
name: 'changed-' + key,
})
}
}
}
}
editorConnection.sendDynamicPorts(nodeId, ports);
}*/
module.exports = { module.exports = {
node: LoginNodeDefinition, node: LoginNodeDefinition,
setup: function (context, graphModel) { setup(_context, _graphModel) {}
/* if (!context.editorConnection || !context.editorConnection.isRunningLocally()) {
return;
}
function _managePortsForNode(node) {
updatePorts(node.id, node.parameters, context.editorConnection, graphModel.getMetaData('dbCollections'));
node.on("parameterUpdated", function (event) {
updatePorts(node.id, node.parameters, context.editorConnection, graphModel.getMetaData('dbCollections'));
});
graphModel.on('metadataChanged.dbCollections', function (data) {
updatePorts(node.id, node.parameters, context.editorConnection, data);
})
}
graphModel.on("editorImportComplete", ()=> {
graphModel.on("nodeAdded.DbModel2", function (node) {
_managePortsForNode(node)
})
for(const node of graphModel.getNodesWithType('DbModel2')) {
_managePortsForNode(node)
}
})*/
}
}; };

View File

@@ -1,18 +1,13 @@
'use strict'; 'use strict';
const { Node, EdgeTriggeredInput } = require('@noodl/runtime');
const UserService = require('./userservice'); const UserService = require('./userservice');
var LogOutNodeDefinition = { const LogOutNodeDefinition = {
name: 'net.noodl.user.LogOut', name: 'net.noodl.user.LogOut',
docs: 'https://docs.noodl.net/nodes/data/user/log-out', docs: 'https://docs.noodl.net/nodes/data/user/log-out',
displayNodeName: 'Log Out', displayNodeName: 'Log Out',
category: 'Cloud Services', category: 'Cloud Services',
color: 'data', color: 'data',
initialize: function () {
var internal = this._internal;
},
getInspectInfo() {},
outputs: { outputs: {
success: { success: {
type: 'signal', type: 'signal',
@@ -28,7 +23,7 @@ var LogOutNodeDefinition = {
type: 'string', type: 'string',
displayName: 'Error', displayName: 'Error',
group: 'Error', group: 'Error',
getter: function () { getter() {
return this._internal.error; return this._internal.error;
} }
} }
@@ -37,13 +32,13 @@ var LogOutNodeDefinition = {
login: { login: {
displayName: 'Do', displayName: 'Do',
group: 'Actions', group: 'Actions',
valueChangedToTrue: function () { valueChangedToTrue() {
this.scheduleLogOut(); this.scheduleLogOut();
} }
} }
}, },
methods: { methods: {
setError: function (err) { setError(err) {
this._internal.error = err; this._internal.error = err;
this.flagOutputDirty('error'); this.flagOutputDirty('error');
this.sendSignalOnOutput('failure'); this.sendSignalOnOutput('failure');
@@ -60,9 +55,7 @@ var LogOutNodeDefinition = {
this.context.editorConnection.clearWarning(this.nodeScope.componentOwner.name, this.id, 'user-login-warning'); this.context.editorConnection.clearWarning(this.nodeScope.componentOwner.name, this.id, 'user-login-warning');
} }
}, },
scheduleLogOut: function () { scheduleLogOut() {
const internal = this._internal;
if (this.logOutScheduled === true) return; if (this.logOutScheduled === true) return;
this.logOutScheduled = true; this.logOutScheduled = true;
@@ -84,5 +77,5 @@ var LogOutNodeDefinition = {
module.exports = { module.exports = {
node: LogOutNodeDefinition, node: LogOutNodeDefinition,
setup: function (context, graphModel) {} setup(_context, _graphModel) {}
}; };

View File

@@ -1,20 +1,17 @@
'use strict'; 'use strict';
const { Node, EdgeTriggeredInput } = require('@noodl/runtime');
const UserService = require('./userservice'); const UserService = require('./userservice');
var SignUpNodeDefinition = { const SignUpNodeDefinition = {
name: 'net.noodl.user.SignUp', name: 'net.noodl.user.SignUp',
docs: 'https://docs.noodl.net/nodes/data/user/sign-up', docs: 'https://docs.noodl.net/nodes/data/user/sign-up',
displayNodeName: 'Sign Up', displayNodeName: 'Sign Up',
category: 'Cloud Services', category: 'Cloud Services',
color: 'data', color: 'data',
initialize: function () { initialize() {
var internal = this._internal; const internal = this._internal;
internal.userProperties = {}; internal.userProperties = {};
}, },
getInspectInfo() {},
outputs: { outputs: {
success: { success: {
type: 'signal', type: 'signal',
@@ -30,7 +27,7 @@ var SignUpNodeDefinition = {
type: 'string', type: 'string',
displayName: 'Error', displayName: 'Error',
group: 'Error', group: 'Error',
getter: function () { getter() {
return this._internal.error; return this._internal.error;
} }
} }
@@ -39,7 +36,7 @@ var SignUpNodeDefinition = {
signup: { signup: {
displayName: 'Do', displayName: 'Do',
group: 'Actions', group: 'Actions',
valueChangedToTrue: function () { valueChangedToTrue() {
this.scheduleSignUp(); this.scheduleSignUp();
} }
}, },
@@ -47,7 +44,7 @@ var SignUpNodeDefinition = {
displayName: 'Username', displayName: 'Username',
type: 'string', type: 'string',
group: 'General', group: 'General',
set: function (value) { set(value) {
this._internal.username = value; this._internal.username = value;
} }
}, },
@@ -55,7 +52,7 @@ var SignUpNodeDefinition = {
displayName: 'Password', displayName: 'Password',
type: 'string', type: 'string',
group: 'General', group: 'General',
set: function (value) { set(value) {
this._internal.password = value; this._internal.password = value;
} }
}, },
@@ -63,13 +60,13 @@ var SignUpNodeDefinition = {
displayName: 'Email', displayName: 'Email',
type: 'string', type: 'string',
group: 'General', group: 'General',
set: function (value) { set(value) {
this._internal.email = value; this._internal.email = value;
} }
} }
}, },
methods: { methods: {
setError: function (err) { setError(err) {
this._internal.error = err; this._internal.error = err;
this.flagOutputDirty('error'); this.flagOutputDirty('error');
this.sendSignalOnOutput('failure'); this.sendSignalOnOutput('failure');
@@ -86,7 +83,7 @@ var SignUpNodeDefinition = {
this.context.editorConnection.clearWarning(this.nodeScope.componentOwner.name, this.id, 'user-login-warning'); this.context.editorConnection.clearWarning(this.nodeScope.componentOwner.name, this.id, 'user-login-warning');
} }
}, },
scheduleSignUp: function () { scheduleSignUp() {
const internal = this._internal; const internal = this._internal;
if (this.signUpScheduled === true) return; if (this.signUpScheduled === true) return;
@@ -109,23 +106,24 @@ var SignUpNodeDefinition = {
}); });
}); });
}, },
setUserProperty: function (name, value) { setUserProperty(name, value) {
this._internal.userProperties[name] = value; this._internal.userProperties[name] = value;
}, },
registerInputIfNeeded: function (name) { registerInputIfNeeded(name) {
if (this.hasInput(name)) { if (this.hasInput(name)) {
return; return;
} }
if (name.startsWith('prop-')) if (name.startsWith('prop-')) {
return this.registerInput(name, { return this.registerInput(name, {
set: this.setUserProperty.bind(this, name.substring('prop-'.length)) set: this.setUserProperty.bind(this, name.substring('prop-'.length))
}); });
}
} }
} }
}; };
function updatePorts(nodeId, parameters, editorConnection, systemCollections) { function updatePorts(nodeId, _parameters, editorConnection, systemCollections) {
var ports = []; var ports = [];
if (systemCollections) { if (systemCollections) {
@@ -169,7 +167,7 @@ function updatePorts(nodeId, parameters, editorConnection, systemCollections) {
module.exports = { module.exports = {
node: SignUpNodeDefinition, node: SignUpNodeDefinition,
setup: function (context, graphModel) { setup(context, graphModel) {
if (!context.editorConnection || !context.editorConnection.isRunningLocally()) { if (!context.editorConnection || !context.editorConnection.isRunningLocally()) {
return; return;
} }
@@ -177,7 +175,7 @@ module.exports = {
function _managePortsForNode(node) { function _managePortsForNode(node) {
updatePorts(node.id, node.parameters, context.editorConnection, graphModel.getMetaData('systemCollections')); updatePorts(node.id, node.parameters, context.editorConnection, graphModel.getMetaData('systemCollections'));
node.on('parameterUpdated', function (event) { node.on('parameterUpdated', function (_event) {
updatePorts(node.id, node.parameters, context.editorConnection, graphModel.getMetaData('systemCollections')); updatePorts(node.id, node.parameters, context.editorConnection, graphModel.getMetaData('systemCollections'));
}); });

View File

@@ -73,17 +73,17 @@ import { getCurrentPlatform } from '../helper';
// It basically means that some package is not relative to this path. // It basically means that some package is not relative to this path.
console.log("--- Run 'npm install' ..."); console.log("--- Run 'npm install' ...");
if (platform === "darwin") { if (platform === 'darwin') {
execSync(`npm install electron-notarize`, { execSync(`npm install electron-notarize`, {
stdio: 'inherit', stdio: 'inherit',
env: process.env env: process.env
}) });
} }
execSync(`npm install --arch=${arch} --scope noodl-editor`, { execSync(`npm install --arch=${arch} --scope fluxscape-editor`, {
stdio: 'inherit', stdio: 'inherit',
env: process.env env: process.env
}) });
console.log("--- 'npm install' done!"); console.log("--- 'npm install' done!");
// NOTE: npm install --arch= does this too // NOTE: npm install --arch= does this too
@@ -99,13 +99,13 @@ import { getCurrentPlatform } from '../helper';
// Build: Replace "dugite" // Build: Replace "dugite"
// Build: Replace "desktop-trampoline" // Build: Replace "desktop-trampoline"
console.log("--- Run 'npm run build' ..."); console.log("--- Run 'npm run build' ...");
execSync('npx lerna exec --scope noodl-editor -- npm run build', { execSync('npx lerna exec --scope fluxscape-editor -- npm run build', {
stdio: 'inherit', stdio: 'inherit',
env: { env: {
...process.env, ...process.env,
TARGET_PLATFORM, TARGET_PLATFORM,
DISABLE_SIGNING, DISABLE_SIGNING,
CSC_NAME, CSC_NAME
} }
}); });
console.log("--- 'npm run build' done!"); console.log("--- 'npm run build' done!");

View File

@@ -74,7 +74,7 @@ const cloudRuntimeProcess = attachStdio(
} }
); );
const editorProcess = attachStdio(exec('npx lerna exec --scope noodl-editor -- npm run start', processOptions), { const editorProcess = attachStdio(exec('npx lerna exec --scope fluxscape-editor -- npm run start', processOptions), {
prefix: 'Editor', prefix: 'Editor',
color: ConsoleColor.FgCyan color: ConsoleColor.FgCyan
}); });

View File

@@ -1,36 +1,27 @@
import path from "path"; import { execSync } from 'child_process';
import { execSync } from "child_process"; import path from 'path';
const CWD = path.join(__dirname, ".."); const CWD = path.join(__dirname, '..');
const LOCAL_GIT_DIRECTORY = path.join( const LOCAL_GIT_DIRECTORY = path.join(__dirname, '..', 'node_modules', 'dugite', 'git');
__dirname,
"..",
"node_modules",
"dugite",
"git"
);
const LOCAL_GIT_TRAMPOLINE_DIRECTORY = path.join( const LOCAL_GIT_TRAMPOLINE_DIRECTORY = path.join(
__dirname, __dirname,
"..", '..',
"node_modules", 'node_modules',
"desktop-trampoline/build/Release/desktop-trampoline" 'desktop-trampoline/build/Release/desktop-trampoline'
); );
console.log("---"); console.log('---');
console.log(`> CWD: `, CWD); console.log(`> CWD: `, CWD);
console.log(`> LOCAL_GIT_DIRECTORY: `, LOCAL_GIT_DIRECTORY); console.log(`> LOCAL_GIT_DIRECTORY: `, LOCAL_GIT_DIRECTORY);
console.log( console.log(`> LOCAL_GIT_TRAMPOLINE_DIRECTORY: `, LOCAL_GIT_TRAMPOLINE_DIRECTORY);
`> LOCAL_GIT_TRAMPOLINE_DIRECTORY: `, console.log('---');
LOCAL_GIT_TRAMPOLINE_DIRECTORY
);
console.log("---");
execSync("npx lerna exec --scope noodl-editor -- npm run test", { execSync('npx lerna exec --scope fluxscape-editor -- npm run test', {
cwd: CWD, cwd: CWD,
stdio: "inherit", stdio: 'inherit',
env: { env: {
...process.env, ...process.env,
LOCAL_GIT_DIRECTORY, LOCAL_GIT_DIRECTORY,
LOCAL_GIT_TRAMPOLINE_DIRECTORY, LOCAL_GIT_TRAMPOLINE_DIRECTORY
}, }
}); });