add rtc blocks

This commit is contained in:
Mario Pesch 2021-05-21 11:28:35 +02:00
parent bc5cbb6b33
commit b6c90772ed
13 changed files with 1298 additions and 926 deletions

150
package-lock.json generated
View File

@ -26,11 +26,12 @@
"mnemonic-id": "^3.2.7", "mnemonic-id": "^3.2.7",
"moment": "^2.28.0", "moment": "^2.28.0",
"prismjs": "^1.23.0", "prismjs": "^1.23.0",
"react": "^16.13.1", "react": "^17.0.2",
"react-cookie-consent": "^5.2.0", "react-cookie-consent": "^5.2.0",
"react-dom": "^16.13.1", "react-dom": "^17.0.2",
"react-markdown": "^5.0.2", "react-markdown": "^5.0.2",
"react-redux": "^7.2.0", "react-mde": "^11.5.0",
"react-redux": "^7.2.4",
"react-router-dom": "^5.2.0", "react-router-dom": "^5.2.0",
"react-scripts": "^4.0.3", "react-scripts": "^4.0.3",
"reactour": "^1.18.0", "reactour": "^1.18.0",
@ -3951,6 +3952,15 @@
"@types/node": "*" "@types/node": "*"
} }
}, },
"node_modules/@types/hoist-non-react-statics": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz",
"integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==",
"dependencies": {
"@types/react": "*",
"hoist-non-react-statics": "^3.3.0"
}
},
"node_modules/@types/html-minifier-terser": { "node_modules/@types/html-minifier-terser": {
"version": "5.1.1", "version": "5.1.1",
"resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz", "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz",
@ -4048,6 +4058,17 @@
"@types/react": "*" "@types/react": "*"
} }
}, },
"node_modules/@types/react-redux": {
"version": "7.1.16",
"resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.16.tgz",
"integrity": "sha512-f/FKzIrZwZk7YEO9E1yoxIuDNRiDducxkFlkw/GNMGEnK9n4K8wJzlJBghpSuOVDgEUHoDkDF7Gi9lHNQR4siw==",
"dependencies": {
"@types/hoist-non-react-statics": "^3.3.0",
"@types/react": "*",
"hoist-non-react-statics": "^3.3.0",
"redux": "^4.0.0"
}
},
"node_modules/@types/react-transition-group": { "node_modules/@types/react-transition-group": {
"version": "4.4.0", "version": "4.4.0",
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.0.tgz", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.0.tgz",
@ -19140,13 +19161,12 @@
} }
}, },
"node_modules/react": { "node_modules/react": {
"version": "16.13.1", "version": "17.0.2",
"resolved": "https://registry.npmjs.org/react/-/react-16.13.1.tgz", "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
"integrity": "sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==", "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
"dependencies": { "dependencies": {
"loose-envify": "^1.1.0", "loose-envify": "^1.1.0",
"object-assign": "^4.1.1", "object-assign": "^4.1.1"
"prop-types": "^15.6.2"
}, },
"engines": { "engines": {
"node": ">=0.10.0" "node": ">=0.10.0"
@ -19309,14 +19329,16 @@
} }
}, },
"node_modules/react-dom": { "node_modules/react-dom": {
"version": "16.13.1", "version": "17.0.2",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz",
"integrity": "sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==", "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==",
"dependencies": { "dependencies": {
"loose-envify": "^1.1.0", "loose-envify": "^1.1.0",
"object-assign": "^4.1.1", "object-assign": "^4.1.1",
"prop-types": "^15.6.2", "scheduler": "^0.20.2"
"scheduler": "^0.19.1" },
"peerDependencies": {
"react": "17.0.2"
} }
}, },
"node_modules/react-error-overlay": { "node_modules/react-error-overlay": {
@ -19359,16 +19381,37 @@
"xtend": "^4.0.1" "xtend": "^4.0.1"
} }
}, },
"node_modules/react-mde": {
"version": "11.5.0",
"resolved": "https://registry.npmjs.org/react-mde/-/react-mde-11.5.0.tgz",
"integrity": "sha512-CH/VK6d+tpVjJ8rTXfh1dDt6GWedTgCU0668p8toqhAc3vy0Lu872O2RKYDSpkUrlbHI08fjUPTl++nExp6gag==",
"peerDependencies": {
"react": "^17.0.0",
"react-dom": "^17.0.0"
}
},
"node_modules/react-redux": { "node_modules/react-redux": {
"version": "7.2.0", "version": "7.2.4",
"resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.0.tgz", "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.4.tgz",
"integrity": "sha512-EvCAZYGfOLqwV7gh849xy9/pt55rJXPwmYvI4lilPM5rUT/1NxuuN59ipdBksRVSvz0KInbPnp4IfoXJXCqiDA==", "integrity": "sha512-hOQ5eOSkEJEXdpIKbnRyl04LhaWabkDPV+Ix97wqQX3T3d2NQ8DUblNXXtNMavc7DpswyQM6xfaN4HQDKNY2JA==",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.5.5", "@babel/runtime": "^7.12.1",
"hoist-non-react-statics": "^3.3.0", "@types/react-redux": "^7.1.16",
"hoist-non-react-statics": "^3.3.2",
"loose-envify": "^1.4.0", "loose-envify": "^1.4.0",
"prop-types": "^15.7.2", "prop-types": "^15.7.2",
"react-is": "^16.9.0" "react-is": "^16.13.1"
},
"peerDependencies": {
"react": "^16.8.3 || ^17"
},
"peerDependenciesMeta": {
"react-dom": {
"optional": true
},
"react-native": {
"optional": true
}
} }
}, },
"node_modules/react-refresh": { "node_modules/react-refresh": {
@ -20694,9 +20737,9 @@
} }
}, },
"node_modules/scheduler": { "node_modules/scheduler": {
"version": "0.19.1", "version": "0.20.2",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",
"integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==",
"dependencies": { "dependencies": {
"loose-envify": "^1.1.0", "loose-envify": "^1.1.0",
"object-assign": "^4.1.1" "object-assign": "^4.1.1"
@ -28075,6 +28118,15 @@
"@types/node": "*" "@types/node": "*"
} }
}, },
"@types/hoist-non-react-statics": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz",
"integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==",
"requires": {
"@types/react": "*",
"hoist-non-react-statics": "^3.3.0"
}
},
"@types/html-minifier-terser": { "@types/html-minifier-terser": {
"version": "5.1.1", "version": "5.1.1",
"resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz", "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz",
@ -28172,6 +28224,17 @@
"@types/react": "*" "@types/react": "*"
} }
}, },
"@types/react-redux": {
"version": "7.1.16",
"resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.16.tgz",
"integrity": "sha512-f/FKzIrZwZk7YEO9E1yoxIuDNRiDducxkFlkw/GNMGEnK9n4K8wJzlJBghpSuOVDgEUHoDkDF7Gi9lHNQR4siw==",
"requires": {
"@types/hoist-non-react-statics": "^3.3.0",
"@types/react": "*",
"hoist-non-react-statics": "^3.3.0",
"redux": "^4.0.0"
}
},
"@types/react-transition-group": { "@types/react-transition-group": {
"version": "4.4.0", "version": "4.4.0",
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.0.tgz", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.0.tgz",
@ -40150,13 +40213,12 @@
} }
}, },
"react": { "react": {
"version": "16.13.1", "version": "17.0.2",
"resolved": "https://registry.npmjs.org/react/-/react-16.13.1.tgz", "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
"integrity": "sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==", "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
"requires": { "requires": {
"loose-envify": "^1.1.0", "loose-envify": "^1.1.0",
"object-assign": "^4.1.1", "object-assign": "^4.1.1"
"prop-types": "^15.6.2"
} }
}, },
"react-app-polyfill": { "react-app-polyfill": {
@ -40285,14 +40347,13 @@
} }
}, },
"react-dom": { "react-dom": {
"version": "16.13.1", "version": "17.0.2",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz",
"integrity": "sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==", "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==",
"requires": { "requires": {
"loose-envify": "^1.1.0", "loose-envify": "^1.1.0",
"object-assign": "^4.1.1", "object-assign": "^4.1.1",
"prop-types": "^15.6.2", "scheduler": "^0.20.2"
"scheduler": "^0.19.1"
} }
}, },
"react-error-overlay": { "react-error-overlay": {
@ -40335,16 +40396,23 @@
"xtend": "^4.0.1" "xtend": "^4.0.1"
} }
}, },
"react-mde": {
"version": "11.5.0",
"resolved": "https://registry.npmjs.org/react-mde/-/react-mde-11.5.0.tgz",
"integrity": "sha512-CH/VK6d+tpVjJ8rTXfh1dDt6GWedTgCU0668p8toqhAc3vy0Lu872O2RKYDSpkUrlbHI08fjUPTl++nExp6gag==",
"requires": {}
},
"react-redux": { "react-redux": {
"version": "7.2.0", "version": "7.2.4",
"resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.0.tgz", "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.4.tgz",
"integrity": "sha512-EvCAZYGfOLqwV7gh849xy9/pt55rJXPwmYvI4lilPM5rUT/1NxuuN59ipdBksRVSvz0KInbPnp4IfoXJXCqiDA==", "integrity": "sha512-hOQ5eOSkEJEXdpIKbnRyl04LhaWabkDPV+Ix97wqQX3T3d2NQ8DUblNXXtNMavc7DpswyQM6xfaN4HQDKNY2JA==",
"requires": { "requires": {
"@babel/runtime": "^7.5.5", "@babel/runtime": "^7.12.1",
"hoist-non-react-statics": "^3.3.0", "@types/react-redux": "^7.1.16",
"hoist-non-react-statics": "^3.3.2",
"loose-envify": "^1.4.0", "loose-envify": "^1.4.0",
"prop-types": "^15.7.2", "prop-types": "^15.7.2",
"react-is": "^16.9.0" "react-is": "^16.13.1"
} }
}, },
"react-refresh": { "react-refresh": {
@ -41384,9 +41452,9 @@
} }
}, },
"scheduler": { "scheduler": {
"version": "0.19.1", "version": "0.20.2",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",
"integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==",
"requires": { "requires": {
"loose-envify": "^1.1.0", "loose-envify": "^1.1.0",
"object-assign": "^4.1.1" "object-assign": "^4.1.1"

View File

@ -21,11 +21,12 @@
"mnemonic-id": "^3.2.7", "mnemonic-id": "^3.2.7",
"moment": "^2.28.0", "moment": "^2.28.0",
"prismjs": "^1.23.0", "prismjs": "^1.23.0",
"react": "^16.13.1", "react": "^17.0.2",
"react-cookie-consent": "^5.2.0", "react-cookie-consent": "^5.2.0",
"react-dom": "^16.13.1", "react-dom": "^17.0.2",
"react-markdown": "^5.0.2", "react-markdown": "^5.0.2",
"react-redux": "^7.2.0", "react-mde": "^11.5.0",
"react-redux": "^7.2.4",
"react-router-dom": "^5.2.0", "react-router-dom": "^5.2.0",
"react-scripts": "^4.0.3", "react-scripts": "^4.0.3",
"reactour": "^1.18.0", "reactour": "^1.18.0",

View File

@ -1,24 +1,25 @@
import './loops'; import "./loops";
import './sensebox'; import "./sensebox";
import './logic'; import "./logic";
import './sensebox-sensors'; import "./sensebox-sensors";
import './sensebox-telegram'; import "./sensebox-telegram";
import './sensebox-osem'; import "./sensebox-osem";
import './sensebox-web'; import "./sensebox-web";
import './sensebox-display'; import "./sensebox-display";
import './sensebox-lora'; import "./sensebox-lora";
import './sensebox-led'; import "./sensebox-led";
import './sensebox-sd'; import "./sensebox-rtc";
import './mqtt'; import "./sensebox-sd";
import './text'; import "./mqtt";
import './io'; import "./text";
import './audio'; import "./io";
import './math'; import "./audio";
import './map'; import "./math";
import './procedures'; import "./map";
import './time'; import "./procedures";
import './variables'; import "./time";
import './lists'; import "./variables";
import './webserver'; import "./lists";
import "./webserver";
import '../helpers/types' import "../helpers/types";

View File

@ -0,0 +1,79 @@
import * as Blockly from "blockly";
import { getColour } from "../helpers/colour";
import { selectedBoard } from "../helpers/board";
import * as Types from "../helpers/types";
Blockly.Blocks["sensebox_rtc_init"] = {
init: function () {
this.setHelpUrl(Blockly.Msg.sensebox_rtc_helpurl);
this.setColour(getColour().time);
this.appendDummyInput().appendField(Blockly.Msg.sensebox_rtc_init);
this.setPreviousStatement(true);
this.setNextStatement(true);
this.setTooltip(Blockly.Msg.sensebox_rtc_init_tooltip);
},
};
Blockly.Blocks["sensebox_rtc_set"] = {
init: function () {
this.setHelpUrl(Blockly.Msg.sensebox_rtc_helpurl);
this.setColour(getColour().time);
this.appendDummyInput().appendField(Blockly.Msg.sensebox_rtc_set);
this.appendValueInput("second").appendField(
Blockly.Msg.sensebox_rtc_second
);
this.appendValueInput("minutes").appendField(
Blockly.Msg.sensebox_rtc_minutes
);
this.appendValueInput("hour").appendField(Blockly.Msg.sensebox_rtc_hour);
this.appendValueInput("day").appendField(Blockly.Msg.sensebox_rtc_day);
this.appendValueInput("month").appendField(Blockly.Msg.sensebox_rtc_month);
this.appendValueInput("year").appendField(Blockly.Msg.sensebox_rtc_year);
this.setPreviousStatement(true);
this.setNextStatement(true);
this.setTooltip(Blockly.Msg.sensebox_rtc_set_tooltip);
},
};
Blockly.Blocks["sensebox_rtc_set_ntp"] = {
init: function () {
this.setHelpUrl(Blockly.Msg.sensebox_rtc_helpurl);
this.setColour(getColour().time);
this.appendValueInput("time").appendField(Blockly.Msg.sensebox_rtc_set_ntp);
this.setPreviousStatement(true);
this.setNextStatement(true);
this.setTooltip(Blockly.Msg.sensebox_rtc_set_ntp_tooltip);
},
};
Blockly.Blocks["sensebox_rtc_get"] = {
init: function () {
this.setHelpUrl(Blockly.Msg.sensebox_rtc_helpurl);
this.setColour(getColour().time);
this.appendDummyInput()
.appendField(Blockly.Msg.sensebox_rtc_get)
.appendField(
new Blockly.FieldDropdown([
["hour", "hour"],
["min", "minutes"],
["sec", "seconds"],
["day", "day"],
["month", "month"],
["year", "year"],
]),
"dropdown"
);
this.setOutput(true, Types.LARGE_NUMBER.typeId);
this.setTooltip(Blockly.Msg.sensebox_rtc_get_tooltip);
},
};
Blockly.Blocks["sensebox_rtc_get_timestamp"] = {
init: function () {
this.setHelpUrl(Blockly.Msg.sensebox_rtc_helpurl);
this.setColour(getColour().time);
this.appendDummyInput().appendField(Blockly.Msg.sensebox_rtc_get_timestamp);
this.setOutput(true);
this.setTooltip(Blockly.Msg.sensebox_rtc_get_timestamp_tooltip);
},
};

View File

@ -24,13 +24,13 @@
// More on generating code: // More on generating code:
// https://developers.google.com/blockly/guides/create-custom-blocks/generating-code // https://developers.google.com/blockly/guides/create-custom-blocks/generating-code
import * as Blockly from 'blockly/core'; import * as Blockly from "blockly/core";
/** /**
* Arduino code generator. * Arduino code generator.
* @type !Blockly.Generator * @type !Blockly.Generator
*/ */
Blockly['Arduino'] = new Blockly.Generator('Arduino'); Blockly["Arduino"] = new Blockly.Generator("Arduino");
/** /**
* List of illegal variable names. * List of illegal variable names.
@ -39,49 +39,46 @@ Blockly['Arduino'] = new Blockly.Generator('Arduino');
* accidentally clobbering a built-in object or function. * accidentally clobbering a built-in object or function.
* @private * @private
*/ */
Blockly['Arduino'].addReservedWords( Blockly["Arduino"].addReservedWords(
// http://arduino.cc/en/Reference/HomePage // http://arduino.cc/en/Reference/HomePage
'setup,loop,if,else,for,switch,case,while,' + "setup,loop,if,else,for,switch,case,while," +
'do,break,continue,return,goto,define,include,' + "do,break,continue,return,goto,define,include," +
'HIGH,LOW,INPUT,OUTPUT,INPUT_PULLUP,true,false,' + "HIGH,LOW,INPUT,OUTPUT,INPUT_PULLUP,true,false," +
'interger, constants,floating,point,void,boolean,char,' + "interger, constants,floating,point,void,boolean,char," +
'unsigned,byte,int,word,long,float,double,string,String,array,' + "unsigned,byte,int,word,long,float,double,string,String,array," +
'static, volatile,const,sizeof,pinMode,digitalWrite,digitalRead,' + "static, volatile,const,sizeof,pinMode,digitalWrite,digitalRead," +
'analogReference,analogRead,analogWrite,tone,noTone,shiftOut,shitIn,' + "analogReference,analogRead,analogWrite,tone,noTone,shiftOut,shitIn," +
'pulseIn,millis,micros,delay,delayMicroseconds,min,max,abs,constrain,' + "pulseIn,millis,micros,delay,delayMicroseconds,min,max,abs,constrain," +
'map,pow,sqrt,sin,cos,tan,randomSeed,random,lowByte,highByte,bitRead,' + "map,pow,sqrt,sin,cos,tan,randomSeed,random,lowByte,highByte,bitRead," +
'bitWrite,bitSet,bitClear,ultraSonicDistance,parseDouble,setNeoPixelColor,' + "bitWrite,bitSet,bitClear,ultraSonicDistance,parseDouble,setNeoPixelColor," +
'bit,attachInterrupt,detachInterrupt,interrupts,noInterrupts', "bit,attachInterrupt,detachInterrupt,interrupts,noInterrupts",
'short', "short",
'isBtnPressed' "isBtnPressed"
); );
/** /**
* Order of operation ENUMs. * Order of operation ENUMs.
* *
*/ */
Blockly['Arduino'].ORDER_ATOMIC = 0; // 0 "" ... Blockly["Arduino"].ORDER_ATOMIC = 0; // 0 "" ...
Blockly['Arduino'].ORDER_UNARY_POSTFIX = 1; // expr++ expr-- () [] . Blockly["Arduino"].ORDER_UNARY_POSTFIX = 1; // expr++ expr-- () [] .
Blockly['Arduino'].ORDER_UNARY_PREFIX = 2; // -expr !expr ~expr ++expr --expr Blockly["Arduino"].ORDER_UNARY_PREFIX = 2; // -expr !expr ~expr ++expr --expr
Blockly['Arduino'].ORDER_MULTIPLICATIVE = 3; // * / % ~/ Blockly["Arduino"].ORDER_MULTIPLICATIVE = 3; // * / % ~/
Blockly['Arduino'].ORDER_ADDITIVE = 4; // + - Blockly["Arduino"].ORDER_ADDITIVE = 4; // + -
Blockly['Arduino'].ORDER_LOGICAL_NOT = 4.4; // ! Blockly["Arduino"].ORDER_LOGICAL_NOT = 4.4; // !
Blockly['Arduino'].ORDER_SHIFT = 5; // << >> Blockly["Arduino"].ORDER_SHIFT = 5; // << >>
Blockly['Arduino'].ORDER_MODULUS = 5.3; // % Blockly["Arduino"].ORDER_MODULUS = 5.3; // %
Blockly['Arduino'].ORDER_RELATIONAL = 6; // is is! >= > <= < Blockly["Arduino"].ORDER_RELATIONAL = 6; // is is! >= > <= <
Blockly['Arduino'].ORDER_EQUALITY = 7; // === !== === !== Blockly["Arduino"].ORDER_EQUALITY = 7; // === !== === !==
Blockly['Arduino'].ORDER_BITWISE_AND = 8; // & Blockly["Arduino"].ORDER_BITWISE_AND = 8; // &
Blockly['Arduino'].ORDER_BITWISE_XOR = 9; // ^ Blockly["Arduino"].ORDER_BITWISE_XOR = 9; // ^
Blockly['Arduino'].ORDER_BITWISE_OR = 10; // | Blockly["Arduino"].ORDER_BITWISE_OR = 10; // |
Blockly['Arduino'].ORDER_LOGICAL_AND = 11; // && Blockly["Arduino"].ORDER_LOGICAL_AND = 11; // &&
Blockly['Arduino'].ORDER_LOGICAL_OR = 12; // || Blockly["Arduino"].ORDER_LOGICAL_OR = 12; // ||
Blockly['Arduino'].ORDER_CONDITIONAL = 13; // expr ? expr : expr Blockly["Arduino"].ORDER_CONDITIONAL = 13; // expr ? expr : expr
Blockly['Arduino'].ORDER_ASSIGNMENT = 14; // = *= /= ~/= %= += -= <<= >>= &= ^= |= Blockly["Arduino"].ORDER_ASSIGNMENT = 14; // = *= /= ~/= %= += -= <<= >>= &= ^= |=
Blockly['Arduino'].ORDER_COMMA = 18; // , Blockly["Arduino"].ORDER_COMMA = 18; // ,
Blockly['Arduino'].ORDER_NONE = 99; // (...) Blockly["Arduino"].ORDER_NONE = 99; // (...)
/** /**
* *
@ -90,49 +87,46 @@ Blockly['Arduino'].ORDER_NONE = 99; // (...)
* Blockly Types * Blockly Types
*/ */
/** /**
* Initialise the database of variable names. * Initialise the database of variable names.
* @param {!Blockly.Workspace} workspace Workspace to generate code from. * @param {!Blockly.Workspace} workspace Workspace to generate code from.
*/ */
Blockly['Arduino'].init = function (workspace) { Blockly["Arduino"].init = function (workspace) {
// Create a dictionary of definitions to be printed before the code. // Create a dictionary of definitions to be printed before the code.
Blockly['Arduino'].libraries_ = Object.create(null); Blockly["Arduino"].libraries_ = Object.create(null);
Blockly['Arduino'].definitions_ = Object.create(null); Blockly["Arduino"].definitions_ = Object.create(null);
// creates a list of code to be setup before the setup block // creates a list of code to be setup before the setup block
Blockly['Arduino'].setupCode_ = Object.create(null); Blockly["Arduino"].setupCode_ = Object.create(null);
// creates a list of code to be setup before the setup block // creates a list of code to be setup before the setup block
Blockly['Arduino'].loraSetupCode_ = Object.create(null); Blockly["Arduino"].loraSetupCode_ = Object.create(null);
// creates a list of code for the loop to be runned once // creates a list of code for the loop to be runned once
Blockly['Arduino'].loopCodeOnce_ = Object.create(null) Blockly["Arduino"].loopCodeOnce_ = Object.create(null);
// creates a list of code for the loop to be runned once // creates a list of code for the loop to be runned once
Blockly['Arduino'].codeFunctions_ = Object.create(null) Blockly["Arduino"].codeFunctions_ = Object.create(null);
// creates a list of code variables // creates a list of code variables
Blockly['Arduino'].variables_ = Object.create(null) Blockly["Arduino"].variables_ = Object.create(null);
// Create a dictionary mapping desired function names in definitions_ // Create a dictionary mapping desired function names in definitions_
// to actual function names (to avoid collisions with user functions). // to actual function names (to avoid collisions with user functions).
Blockly['Arduino'].functionNames_ = Object.create(null); Blockly["Arduino"].functionNames_ = Object.create(null);
Blockly['Arduino'].variablesInitCode_ = ''; Blockly["Arduino"].variablesInitCode_ = "";
if (!Blockly['Arduino'].variableDB_) { if (!Blockly["Arduino"].variableDB_) {
Blockly['Arduino'].variableDB_ = new Blockly.Names( Blockly["Arduino"].variableDB_ = new Blockly.Names(
Blockly['Arduino'].RESERVED_WORDS_ Blockly["Arduino"].RESERVED_WORDS_
); );
} else { } else {
Blockly['Arduino'].variableDB_.reset(); Blockly["Arduino"].variableDB_.reset();
} }
Blockly['Arduino'].variableDB_.setVariableMap(workspace.getVariableMap()); Blockly["Arduino"].variableDB_.setVariableMap(workspace.getVariableMap());
// We don't have developer variables for now // We don't have developer variables for now
// // Add developer variables (not created or named by the user). // // Add developer variables (not created or named by the user).
@ -142,53 +136,53 @@ Blockly['Arduino'].init = function (workspace) {
// Blockly.Names.DEVELOPER_VARIABLE_TYPE)); // Blockly.Names.DEVELOPER_VARIABLE_TYPE));
// } // }
const doubleVariables = workspace.getVariablesOfType('Number'); const doubleVariables = workspace.getVariablesOfType("Number");
let i = 0; let i = 0;
let variableCode = ''; let variableCode = "";
for (i = 0; i < doubleVariables.length; i += 1) { for (i = 0; i < doubleVariables.length; i += 1) {
variableCode += variableCode +=
'double ' + "double " +
Blockly['Arduino'].variableDB_.getName( Blockly["Arduino"].variableDB_.getName(
doubleVariables[i].getId(), doubleVariables[i].getId(),
Blockly.Variables.NAME_TYPE Blockly.Variables.NAME_TYPE
) + ) +
' = 0; \n\n'; " = 0; \n\n";
} }
const stringVariables = workspace.getVariablesOfType('String'); const stringVariables = workspace.getVariablesOfType("String");
for (i = 0; i < stringVariables.length; i += 1) { for (i = 0; i < stringVariables.length; i += 1) {
variableCode += variableCode +=
'String ' + "String " +
Blockly['Arduino'].variableDB_.getName( Blockly["Arduino"].variableDB_.getName(
stringVariables[i].getId(), stringVariables[i].getId(),
Blockly.Variables.NAME_TYPE Blockly.Variables.NAME_TYPE
) + ) +
' = ""; \n\n'; ' = ""; \n\n';
} }
const booleanVariables = workspace.getVariablesOfType('Boolean'); const booleanVariables = workspace.getVariablesOfType("Boolean");
for (i = 0; i < booleanVariables.length; i += 1) { for (i = 0; i < booleanVariables.length; i += 1) {
variableCode += variableCode +=
'boolean ' + "boolean " +
Blockly['Arduino'].variableDB_.getDistinctName( Blockly["Arduino"].variableDB_.getDistinctName(
booleanVariables[i].getId(), booleanVariables[i].getId(),
Blockly.Variables.NAME_TYPE Blockly.Variables.NAME_TYPE
) + ) +
' = false; \n\n'; " = false; \n\n";
} }
const colourVariables = workspace.getVariablesOfType('Colour'); const colourVariables = workspace.getVariablesOfType("Colour");
for (i = 0; i < colourVariables.length; i += 1) { for (i = 0; i < colourVariables.length; i += 1) {
variableCode += variableCode +=
'RGB ' + "RGB " +
Blockly['Arduino'].variableDB_.getName( Blockly["Arduino"].variableDB_.getName(
colourVariables[i].getId(), colourVariables[i].getId(),
Blockly.Variables.NAME_TYPE Blockly.Variables.NAME_TYPE
) + ) +
' = {0, 0, 0}; \n\n'; " = {0, 0, 0}; \n\n";
} }
Blockly['Arduino'].variablesInitCode_ = variableCode; Blockly["Arduino"].variablesInitCode_ = variableCode;
}; };
/** /**
@ -196,86 +190,82 @@ Blockly['Arduino'].init = function (workspace) {
* @param {string} code Generated code. * @param {string} code Generated code.
* @return {string} Completed code. * @return {string} Completed code.
*/ */
Blockly['Arduino'].finish = function (code) { Blockly["Arduino"].finish = function (code) {
let libraryCode = ''; let libraryCode = "";
let variablesCode = ''; let variablesCode = "";
let codeFunctions = ''; let codeFunctions = "";
let functionsCode = ''; let functionsCode = "";
let definitionsCode = ''; let definitionsCode = "";
let loopCodeOnce = ''; let loopCodeOnce = "";
let setupCode = ''; let setupCode = "";
let preSetupCode = ''; let preSetupCode = "";
let loraSetupCode = ''; let loraSetupCode = "";
let devVariables = '\n'; let devVariables = "\n";
for (const key in Blockly['Arduino'].libraries_) { for (const key in Blockly["Arduino"].libraries_) {
libraryCode += Blockly['Arduino'].libraries_[key] + '\n'; libraryCode += Blockly["Arduino"].libraries_[key] + "\n";
} }
for (const key in Blockly['Arduino'].variables_) { for (const key in Blockly["Arduino"].variables_) {
variablesCode += Blockly['Arduino'].variables_[key] + '\n'; variablesCode += Blockly["Arduino"].variables_[key] + "\n";
} }
for (const key in Blockly['Arduino'].definitions_) { for (const key in Blockly["Arduino"].definitions_) {
definitionsCode += Blockly['Arduino'].definitions_[key] + '\n'; definitionsCode += Blockly["Arduino"].definitions_[key] + "\n";
} }
for (const key in Blockly['Arduino'].loopCodeOnce_) { for (const key in Blockly["Arduino"].loopCodeOnce_) {
loopCodeOnce += Blockly['Arduino'].loopCodeOnce_[key] + '\n'; loopCodeOnce += Blockly["Arduino"].loopCodeOnce_[key] + "\n";
} }
for (const key in Blockly['Arduino'].codeFunctions_) { for (const key in Blockly["Arduino"].codeFunctions_) {
codeFunctions += Blockly['Arduino'].codeFunctions_[key] + '\n'; codeFunctions += Blockly["Arduino"].codeFunctions_[key] + "\n";
} }
for (const key in Blockly['Arduino'].functionNames_) { for (const key in Blockly["Arduino"].functionNames_) {
functionsCode += Blockly['Arduino'].functionNames_[key] + '\n'; functionsCode += Blockly["Arduino"].functionNames_[key] + "\n";
} }
for (const key in Blockly["Arduino"].setupCode_) {
preSetupCode += Blockly["Arduino"].setupCode_[key] + "\n" || "";
for (const key in Blockly['Arduino'].setupCode_) {
preSetupCode += Blockly['Arduino'].setupCode_[key] || '';
} }
for (const key in Blockly['Arduino'].loraSetupCode_) { for (const key in Blockly["Arduino"].loraSetupCode_) {
loraSetupCode += Blockly['Arduino'].loraSetupCode_[key] || ''; loraSetupCode += Blockly["Arduino"].loraSetupCode_[key] + "\n" || "";
} }
setupCode =
"\nvoid setup() { \n" + preSetupCode + "\n" + loraSetupCode + "\n}\n";
setupCode = '\nvoid setup() { \n' + preSetupCode + '\n' + loraSetupCode + '\n}\n'; let loopCode = "\nvoid loop() { \n" + loopCodeOnce + code + "\n}\n";
let loopCode = '\nvoid loop() { \n' + loopCodeOnce + code + '\n}\n';
// Convert the definitions dictionary into a list. // Convert the definitions dictionary into a list.
code = code =
devVariables + devVariables +
'\n' + "\n" +
libraryCode + libraryCode +
'\n' + "\n" +
variablesCode + variablesCode +
'\n' + "\n" +
definitionsCode + definitionsCode +
'\n' + "\n" +
codeFunctions + codeFunctions +
'\n' + "\n" +
Blockly['Arduino'].variablesInitCode_ + Blockly["Arduino"].variablesInitCode_ +
'\n' + "\n" +
functionsCode + functionsCode +
'\n' + "\n" +
setupCode + setupCode +
'\n' + "\n" +
loopCode loopCode;
;
// Clean up temporary data. // Clean up temporary data.
delete Blockly['Arduino'].definitions_; delete Blockly["Arduino"].definitions_;
delete Blockly['Arduino'].functionNames_; delete Blockly["Arduino"].functionNames_;
delete Blockly['Arduino'].loopCodeOnce_; delete Blockly["Arduino"].loopCodeOnce_;
delete Blockly['Arduino'].variablesInitCode_; delete Blockly["Arduino"].variablesInitCode_;
delete Blockly['Arduino'].libraries_; delete Blockly["Arduino"].libraries_;
Blockly['Arduino'].variableDB_.reset(); Blockly["Arduino"].variableDB_.reset();
return code; return code;
}; };
@ -286,8 +276,8 @@ Blockly['Arduino'].finish = function (code) {
* @param {string} line Line of generated code. * @param {string} line Line of generated code.
* @return {string} Legal line of code. * @return {string} Legal line of code.
*/ */
Blockly['Arduino'].scrubNakedValue = function (line) { Blockly["Arduino"].scrubNakedValue = function (line) {
return line + ';\n'; return line + ";\n";
}; };
/** /**
@ -297,12 +287,12 @@ Blockly['Arduino'].scrubNakedValue = function (line) {
* @return {string} Arduino string. * @return {string} Arduino string.
* @private * @private
*/ */
Blockly['Arduino'].quote_ = function (string) { Blockly["Arduino"].quote_ = function (string) {
// Can't use goog.string.quote since Google's style guide recommends // Can't use goog.string.quote since Google's style guide recommends
// JS string literals use single quotes. // JS string literals use single quotes.
string = string string = string
.replace(/\\/g, '\\\\') .replace(/\\/g, "\\\\")
.replace(/\n/g, '\\\n') .replace(/\n/g, "\\\n")
.replace(/'/g, "\\'"); .replace(/'/g, "\\'");
return '"' + string + '"'; return '"' + string + '"';
}; };
@ -317,26 +307,25 @@ Blockly['Arduino'].quote_ = function (string) {
* @return {string} Arduino code with comments and subsequent blocks added. * @return {string} Arduino code with comments and subsequent blocks added.
* @private * @private
*/ */
Blockly['Arduino'].scrub_ = function (block, code) { Blockly["Arduino"].scrub_ = function (block, code) {
let commentCode = ''; let commentCode = "";
// Only collect comments for blocks that aren't inline. // Only collect comments for blocks that aren't inline.
if (!block.outputConnection || !block.outputConnection.targetConnection) { if (!block.outputConnection || !block.outputConnection.targetConnection) {
// Collect comment for this block. // Collect comment for this block.
let comment = block.getCommentText(); let comment = block.getCommentText();
//@ts-ignore //@ts-ignore
comment = comment ? Blockly.utils.string.wrap( comment = comment
comment, ? Blockly.utils.string.wrap(comment, Blockly["Arduino"].COMMENT_WRAP - 3)
Blockly['Arduino'].COMMENT_WRAP - 3 : null;
) : null;
if (comment) { if (comment) {
if (block.getProcedureDef) { if (block.getProcedureDef) {
// Use a comment block for function comments. // Use a comment block for function comments.
commentCode += commentCode +=
'/**\n' + "/**\n" +
Blockly['Arduino'].prefixLines(comment + '\n', ' * ') + Blockly["Arduino"].prefixLines(comment + "\n", " * ") +
' */\n'; " */\n";
} else { } else {
commentCode += Blockly['Arduino'].prefixLines(comment + '\n', '// '); commentCode += Blockly["Arduino"].prefixLines(comment + "\n", "// ");
} }
} }
// Collect comments for all value arguments. // Collect comments for all value arguments.
@ -345,15 +334,15 @@ Blockly['Arduino'].scrub_ = function (block, code) {
if (block.inputList[i].type === Blockly.INPUT_VALUE) { if (block.inputList[i].type === Blockly.INPUT_VALUE) {
const childBlock = block.inputList[i].connection.targetBlock(); const childBlock = block.inputList[i].connection.targetBlock();
if (childBlock) { if (childBlock) {
const comment = Blockly['Arduino'].allNestedComments(childBlock); const comment = Blockly["Arduino"].allNestedComments(childBlock);
if (comment) { if (comment) {
commentCode += Blockly['Arduino'].prefixLines(comment, '// '); commentCode += Blockly["Arduino"].prefixLines(comment, "// ");
} }
} }
} }
} }
} }
const nextBlock = block.nextConnection && block.nextConnection.targetBlock(); const nextBlock = block.nextConnection && block.nextConnection.targetBlock();
const nextCode = Blockly['Arduino'].blockToCode(nextBlock); const nextCode = Blockly["Arduino"].blockToCode(nextBlock);
return commentCode + code + nextCode; return commentCode + code + nextCode;
}; };

View File

@ -1,24 +1,23 @@
import './generator'; import "./generator";
import './loops'; import "./loops";
import './sensebox-sensors'; import "./sensebox-sensors";
import './sensebox-telegram'; import "./sensebox-telegram";
import './sensebox-osem'; import "./sensebox-osem";
import './sensebox-web'; import "./sensebox-web";
import './sensebox-display'; import "./sensebox-display";
import './sensebox-lora'; import "./sensebox-lora";
import './sensebox-led'; import "./sensebox-led";
import './sensebox-sd'; import "./sensebox-rtc";
import './mqtt'; import "./sensebox-sd";
import './logic'; import "./mqtt";
import './text'; import "./logic";
import './math'; import "./text";
import './map'; import "./math";
import './io'; import "./map";
import './audio'; import "./io";
import './procedures'; import "./audio";
import './time'; import "./procedures";
import './variables'; import "./time";
import './lists'; import "./variables";
import './webserver'; import "./lists";
import "./webserver";

View File

@ -0,0 +1,94 @@
import Blockly from "blockly";
Blockly.Arduino.sensebox_rtc_init = function () {
Blockly.Arduino.libraries_["RV8523"] = `#include <RV8523.h>`;
var code = ``;
return code;
};
Blockly.Arduino.sensebox_rtc_set = function () {
var second =
Blockly.Arduino.valueToCode(this, "second", Blockly.Arduino.ORDER_ATOMIC) ||
"0";
var minutes =
Blockly.Arduino.valueToCode(this, "second", Blockly.Arduino.ORDER_ATOMIC) ||
"0";
var hour =
Blockly.Arduino.valueToCode(this, "second", Blockly.Arduino.ORDER_ATOMIC) ||
"0";
var day =
Blockly.Arduino.valueToCode(this, "second", Blockly.Arduino.ORDER_ATOMIC) ||
"0";
var month =
Blockly.Arduino.valueToCode(this, "second", Blockly.Arduino.ORDER_ATOMIC) ||
"0";
var year =
Blockly.Arduino.valueToCode(this, "second", Blockly.Arduino.ORDER_ATOMIC) ||
"0";
Blockly.Arduino.libraries_["RV8523"] = `#include <RV8523.h>`;
Blockly.Arduino.setupCode_["rtc.start"] = `rtc.start();`;
Blockly.Arduino.setupCode_[
"rtc.batterySwitchOver"
] = `rtc.batterySwitchOver(1);`;
Blockly.Arduino.setupCode_[
"rtc.set"
] = `rtc.set(${second}, ${minutes}, ${hour}, ${day}, ${month}, ${year});`;
var code = ``;
return code;
};
Blockly.Arduino.sensebox_rtc_ntp = function () {
Blockly.Arduino.libraries_["RV8523"] = `#include <RV8523.h>`;
Blockly.Arduino.setupCode_["rtc.start"] = `rtc.start();`;
Blockly.Arduino.setupCode_[
"rtc.batterySwitchOver"
] = `rtc.batterySwitchOver(1);`;
Blockly.Arduino.setupCode_[
"rtc.set"
] = `rtc.set(SECOND, MINUTE, HOUR, DAY, MONTH, YEAR);`;
var code = ``;
return code;
};
Blockly.Arduino.sensebox_rtc_get = function () {
var dropdown = this.getFieldValue("dropdown");
Blockly.Arduino.libraries_["RV8523"] = `#include <RV8523.h>`;
Blockly.Arduino.setupCode_["rtc.start"] = `rtc.start();`;
Blockly.Arduino.setupCode_[
"rtc.batterySwitchOver"
] = `rtc.batterySwitchOver(1);`;
Blockly.Arduino.variables_[
"rtc_variables"
] = `uint8_t sec, min, hour, day, month;\nuint16_t year;`;
Blockly.Arduino.loopCodeOnce_[
"rtc_get"
] = `rtc.get(&sec, &min, &hour, &day, &month, &year);`;
var code = `${dropdown}`;
return code;
};
Blockly.Arduino.sensebox_rtc_get_timestamp = function () {
Blockly.Arduino.libraries_["RV8523"] = `#include <RV8523.h>`;
Blockly.Arduino.setupCode_["rtc.start"] = `rtc.start();`;
Blockly.Arduino.setupCode_[
"rtc.batterySwitchOver"
] = `rtc.batterySwitchOver(1);`;
Blockly.Arduino.variables_[
"rtc_variables"
] = `uint8_t sec, min, hour, day, month;\nuint16_t year;`;
Blockly.Arduino.variables_["rtc_timestamp"] = `String timestamp`;
Blockly.Arduino.loopCodeOnce_[
"rtc_get"
] = `rtc.get(&sec, &min, &hour, &day, &month, &year);`;
Blockly.Arduino.loopCodeOnce_[
""
] = `sprintf(timestamp, "20%02d-%02d-%02dT%02d:%02d:%02dZ", year, month, day, hour, min, sec);`;
var code = `timestamp`;
return code;
};

View File

@ -1,26 +1,26 @@
import { AUDIO } from "./de/audio";
import { AUDIO } from './de/audio'; import { FAQ } from "./de/faq";
import { FAQ } from './de/faq'; import { IO } from "./de/io";
import { IO } from './de/io'; import { LOGIC } from "./de/logic";
import { LOGIC } from './de/logic'; import { LOOPS } from "./de/loops";
import { LOOPS } from './de/loops'; import { MATH } from "./de/math";
import { MATH } from './de/math'; import { MQTT } from "./de/mqtt";
import { MQTT } from './de/mqtt'; import { DISPLAY } from "./de/sensebox-display";
import { DISPLAY } from './de/sensebox-display'; import { LED } from "./de/sensebox-led";
import { LED } from './de/sensebox-led'; import { LORA } from "./de/sensebox-lora";
import { LORA } from './de/sensebox-lora'; import { OSEM } from "./de/sensebox-osem";
import { OSEM } from './de/sensebox-osem'; import { RTC } from "./de/sensebox-rtc";
import { SD } from './de/sensebox-sd'; import { SD } from "./de/sensebox-sd";
import { SENSORS } from './de/sensebox-sensors'; import { SENSORS } from "./de/sensebox-sensors";
import { TELEGRAM } from './de/sensebox-telegram'; import { TELEGRAM } from "./de/sensebox-telegram";
import { WEB } from './de/sensebox-web'; import { WEB } from "./de/sensebox-web";
import { TEXT } from './de/text'; import { TEXT } from "./de/text";
import { TIME } from './de/time'; import { TIME } from "./de/time";
import { TOURS } from './de/tours'; import { TOURS } from "./de/tours";
import { TRANSLATIONS } from './de/translations'; import { TRANSLATIONS } from "./de/translations";
import { UI } from './de/ui'; import { UI } from "./de/ui";
import { VARIABLES } from './de/variables'; import { VARIABLES } from "./de/variables";
import { WEBSERVER } from './de/webserver'; import { WEBSERVER } from "./de/webserver";
export const De = { export const De = {
...AUDIO, ...AUDIO,
@ -34,6 +34,7 @@ export const De = {
...LED, ...LED,
...LORA, ...LORA,
...OSEM, ...OSEM,
...RTC,
...SD, ...SD,
...SENSORS, ...SENSORS,
...TELEGRAM, ...TELEGRAM,
@ -44,5 +45,5 @@ export const De = {
...TRANSLATIONS, ...TRANSLATIONS,
...UI, ...UI,
...VARIABLES, ...VARIABLES,
...WEBSERVER ...WEBSERVER,
} };

View File

@ -0,0 +1,6 @@
export const RTC = {
sensebox_rtc_init: "Initialisiere RTC",
sensebox_rtc_set: "Set Time",
sensebox_rtc_get_timestamp: "Get Timestamp",
sensebox_rtc_get: "Get: ",
};

View File

@ -1,25 +1,26 @@
import { AUDIO } from './en/audio'; import { AUDIO } from "./en/audio";
import { FAQ } from './en/faq'; import { FAQ } from "./en/faq";
import { IO } from './en/io'; import { IO } from "./en/io";
import { LOGIC } from './en/logic'; import { LOGIC } from "./en/logic";
import { LOOPS } from './en/loops'; import { LOOPS } from "./en/loops";
import { MATH } from './en/math'; import { MATH } from "./en/math";
import { MQTT } from './en/mqtt'; import { MQTT } from "./en/mqtt";
import { DISPLAY } from './en/sensebox-display'; import { DISPLAY } from "./en/sensebox-display";
import { LED } from './en/sensebox-led'; import { LED } from "./en/sensebox-led";
import { LORA } from './en/sensebox-lora'; import { LORA } from "./en/sensebox-lora";
import { OSEM } from './en/sensebox-osem'; import { OSEM } from "./en/sensebox-osem";
import { SD } from './en/sensebox-sd'; import { RTC } from "./en/sensebox-rtc";
import { SENSORS } from './en/sensebox-sensors'; import { SD } from "./en/sensebox-sd";
import { TELEGRAM } from './en/sensebox-telegram'; import { SENSORS } from "./en/sensebox-sensors";
import { WEB } from './en/sensebox-web'; import { TELEGRAM } from "./en/sensebox-telegram";
import { TEXT } from './en/text'; import { WEB } from "./en/sensebox-web";
import { TIME } from './en/time'; import { TEXT } from "./en/text";
import { TOURS } from './en/tours'; import { TIME } from "./en/time";
import { TRANSLATIONS } from './en/translations'; import { TOURS } from "./en/tours";
import { UI } from './en/ui'; import { TRANSLATIONS } from "./en/translations";
import { VARIABLES } from './en/variables'; import { UI } from "./en/ui";
import { WEBSERVER } from './en/webserver'; import { VARIABLES } from "./en/variables";
import { WEBSERVER } from "./en/webserver";
export const En = { export const En = {
...AUDIO, ...AUDIO,
@ -33,6 +34,7 @@ export const En = {
...LED, ...LED,
...LORA, ...LORA,
...OSEM, ...OSEM,
...RTC,
...SD, ...SD,
...SENSORS, ...SENSORS,
...TELEGRAM, ...TELEGRAM,
@ -43,5 +45,5 @@ export const En = {
...TRANSLATIONS, ...TRANSLATIONS,
...UI, ...UI,
...VARIABLES, ...VARIABLES,
...WEBSERVER ...WEBSERVER,
} };

View File

@ -0,0 +1,13 @@
export const RTC = {
sensebox_rtc_init: "Initialisiere RTC",
sensebox_rtc_set: "Set Time manually",
sensebox_rtc_set_ntp: "Set time via NTP-Server",
sensebox_rtc_get_timestamp: "Get Timestamp",
sensebox_rtc_get: "Get: ",
sensebox_rtc_second: "seconds",
sensebox_rtc_minutes: "minutes",
sensebox_rtc_hour: "hour",
sensebox_rtc_day: "day",
sensebox_rtc_month: "month",
sensebox_rtc_year: "year",
};

View File

@ -1,30 +1,42 @@
import React from 'react'; import React from "react";
import { Block, Value, Field, Shadow, Category } from '../'; import { Block, Value, Field, Shadow, Category } from "../";
import { getColour } from '../helpers/colour' import { getColour } from "../helpers/colour";
import '@blockly/block-plus-minus'; import "@blockly/block-plus-minus";
import { TypedVariableModal } from '@blockly/plugin-typed-variable-modal'; import { TypedVariableModal } from "@blockly/plugin-typed-variable-modal";
import * as Blockly from 'blockly/core'; import * as Blockly from "blockly/core";
class Toolbox extends React.Component { class Toolbox extends React.Component {
componentDidUpdate() { componentDidUpdate() {
this.props.workspace.registerToolboxCategoryCallback('CREATE_TYPED_VARIABLE', this.createFlyout); this.props.workspace.registerToolboxCategoryCallback(
"CREATE_TYPED_VARIABLE",
this.createFlyout
);
const typedVarModal = new TypedVariableModal(this.props.workspace, 'callbackName', [['SHORT_NUMBER', 'char'], ['NUMBER', 'int'], ['DECIMAL', 'float'], ['TEXT', 'String'], ['ARRAY', 'Array'], ['CHARACTER', 'char'], ['BOOLEAN', 'boolean'], ['NULL', 'void'], ['UNDEF', 'undefined']]); const typedVarModal = new TypedVariableModal(
this.props.workspace,
"callbackName",
[
["SHORT_NUMBER", "char"],
["NUMBER", "int"],
["DECIMAL", "float"],
["TEXT", "String"],
["ARRAY", "Array"],
["CHARACTER", "char"],
["BOOLEAN", "boolean"],
["NULL", "void"],
["UNDEF", "undefined"],
]
);
typedVarModal.init(); typedVarModal.init();
} }
createFlyout(workspace) { createFlyout(workspace) {
let xmlList = []; let xmlList = [];
// Add your button and give it a callback name. // Add your button and give it a callback name.
const button = document.createElement('button'); const button = document.createElement("button");
button.setAttribute('text', 'Create Typed Variable'); button.setAttribute("text", "Create Typed Variable");
button.setAttribute('callbackKey', 'callbackName'); button.setAttribute("callbackKey", "callbackName");
xmlList.push(button); xmlList.push(button);
@ -33,12 +45,20 @@ class Toolbox extends React.Component {
const blockList = Blockly.VariablesDynamic.flyoutCategoryBlocks(workspace); const blockList = Blockly.VariablesDynamic.flyoutCategoryBlocks(workspace);
xmlList = xmlList.concat(blockList); xmlList = xmlList.concat(blockList);
return xmlList; return xmlList;
}; }
render() { render() {
return ( return (
<xml xmlns="https://developers.google.com/blockly/xml" id="blockly" style={{ display: 'none' }} ref={this.props.toolbox}> <xml
<Category name={Blockly.Msg.toolbox_sensors} colour={getColour().sensebox}> xmlns="https://developers.google.com/blockly/xml"
id="blockly"
style={{ display: "none" }}
ref={this.props.toolbox}
>
<Category
name={Blockly.Msg.toolbox_sensors}
colour={getColour().sensebox}
>
<Block type="sensebox_sensor_temp_hum" /> <Block type="sensebox_sensor_temp_hum" />
<Block type="sensebox_sensor_uv_light" /> <Block type="sensebox_sensor_uv_light" />
<Block type="sensebox_sensor_bmx055_accelerometer" /> <Block type="sensebox_sensor_bmx055_accelerometer" />
@ -160,16 +180,13 @@ class Toolbox extends React.Component {
</Block> </Block>
<Block type="sensebox_display_plotDisplay"> <Block type="sensebox_display_plotDisplay">
<Value name="Title"> <Value name="Title">
<Block type="text"> <Block type="text"></Block>
</Block>
</Value> </Value>
<Value name="YLabel"> <Value name="YLabel">
<Block type="text"> <Block type="text"></Block>
</Block>
</Value> </Value>
<Value name="XLabel"> <Value name="XLabel">
<Block type="text"> <Block type="text"></Block>
</Block>
</Value> </Value>
<Value name="XRange1"> <Value name="XRange1">
<Block type="math_number"> <Block type="math_number">
@ -261,16 +278,32 @@ class Toolbox extends React.Component {
</Block> </Block>
<Block type="sensebox_send_to_osem" /> <Block type="sensebox_send_to_osem" />
</Category> </Category>
<Category id="catSenseBoxOutput_LoRa" name=" LoRa" colour={getColour().sensebox}> <Category
<Category id="catSenseBoxOutput_LoRa_activation" name=" Aktivierung" colour={getColour().sensebox}> id="catSenseBoxOutput_LoRa"
name=" LoRa"
colour={getColour().sensebox}
>
<Category
id="catSenseBoxOutput_LoRa_activation"
name=" Aktivierung"
colour={getColour().sensebox}
>
<Block type="sensebox_lora_initialize_otaa" /> <Block type="sensebox_lora_initialize_otaa" />
<Block type="sensebox_lora_initialize_abp" /> <Block type="sensebox_lora_initialize_abp" />
</Category> </Category>
<Category id="catSenseBoxOutput_LoRa_loramessage" name=" Lora Message" colour={getColour().sensebox}> <Category
id="catSenseBoxOutput_LoRa_loramessage"
name=" Lora Message"
colour={getColour().sensebox}
>
<Block type="sensebox_lora_message_send" /> <Block type="sensebox_lora_message_send" />
<Block type="sensebox_send_lora_sensor_value" /> <Block type="sensebox_send_lora_sensor_value" />
</Category> </Category>
<Category id="catSenseBoxOutput_Map" name=" TTN Mapper" colour={getColour().sensebox}> <Category
id="catSenseBoxOutput_Map"
name=" TTN Mapper"
colour={getColour().sensebox}
>
<Block type="sensebox_lora_ttn_mapper"> <Block type="sensebox_lora_ttn_mapper">
<Value name="Latitude"> <Value name="Latitude">
<Block type="sensebox_gps"> <Block type="sensebox_gps">
@ -299,7 +332,11 @@ class Toolbox extends React.Component {
</Value> </Value>
</Block> </Block>
</Category> </Category>
<Category id="catSenseBoxOutput_LoRa_cayenne" name=" Cayenne LPP" colour={getColour().sensebox}> <Category
id="catSenseBoxOutput_LoRa_cayenne"
name=" Cayenne LPP"
colour={getColour().sensebox}
>
<Block type="sensebox_lora_cayenne_send" /> <Block type="sensebox_lora_cayenne_send" />
<Block type="sensebox_lora_cayenne_temperature" /> <Block type="sensebox_lora_cayenne_temperature" />
<Block type="sensebox_lora_cayenne_humidity" /> <Block type="sensebox_lora_cayenne_humidity" />
@ -310,7 +347,11 @@ class Toolbox extends React.Component {
<Block type="sensebox_lora_cayenne_gps" /> <Block type="sensebox_lora_cayenne_gps" />
</Category> </Category>
</Category> </Category>
<Category id="webserver" name="Webserver" colour={getColour().webserver}> <Category
id="webserver"
name="Webserver"
colour={getColour().webserver}
>
<Block type="sensebox_initialize_http_server"></Block> <Block type="sensebox_initialize_http_server"></Block>
<Block type="sensebox_http_on_client_connect"></Block> <Block type="sensebox_http_on_client_connect"></Block>
<Block type="sensebox_ip_address"></Block> <Block type="sensebox_ip_address"></Block>
@ -338,7 +379,11 @@ class Toolbox extends React.Component {
<Block type="logic_boolean" /> <Block type="logic_boolean" />
<Block type="switch_case" /> <Block type="switch_case" />
</Category> </Category>
<Category id="loops" name={Blockly.Msg.toolbox_loops} colour={getColour().loops}> <Category
id="loops"
name={Blockly.Msg.toolbox_loops}
colour={getColour().loops}
>
<Block type="controls_repeat_ext"> <Block type="controls_repeat_ext">
<Value name="TIMES"> <Value name="TIMES">
<Block type="math_number"> <Block type="math_number">
@ -377,7 +422,11 @@ class Toolbox extends React.Component {
<Block type="text_length" /> <Block type="text_length" />
<Block type="text_isEmpty" /> <Block type="text_isEmpty" />
</Category> </Category>
<Category id="time" name={Blockly.Msg.toolbox_time} colour={getColour().time}> <Category
id="time"
name={Blockly.Msg.toolbox_time}
colour={getColour().time}
>
<Block type="time_delay"> <Block type="time_delay">
<Value name="DELAY_TIME_MILI"> <Value name="DELAY_TIME_MILI">
<Block type="math_number"> <Block type="math_number">
@ -396,8 +445,48 @@ class Toolbox extends React.Component {
<Block type="time_micros"></Block> <Block type="time_micros"></Block>
<Block type="infinite_loop"></Block> <Block type="infinite_loop"></Block>
<Block type="sensebox_interval_timer"></Block> <Block type="sensebox_interval_timer"></Block>
<Block type="sensebox_rtc_init"></Block>
<Block type="sensebox_rtc_set">
<Value name="second">
<Block type="math_number">
<Field name="NUM">00</Field>
</Block>
</Value>
<Value name="minutes">
<Block type="math_number">
<Field name="NUM">00</Field>
</Block>
</Value>
<Value name="hour">
<Block type="math_number">
<Field name="NUM">00</Field>
</Block>
</Value>
<Value name="day">
<Block type="math_number">
<Field name="NUM">01</Field>
</Block>
</Value>
<Value name="month">
<Block type="math_number">
<Field name="NUM">01</Field>
</Block>
</Value>
<Value name="year">
<Block type="math_number">
<Field name="NUM">1970</Field>
</Block>
</Value>
</Block>
<Block type="sensebox_rtc_set_ntp"></Block>
<Block type="sensebox_rtc_get"></Block>
<Block type="sensebox_rtc_get_timestamp"></Block>
</Category> </Category>
<Category id="math" name={Blockly.Msg.toolbox_math} colour={getColour().math}> <Category
id="math"
name={Blockly.Msg.toolbox_math}
colour={getColour().math}
>
<Block type="math_number"></Block> <Block type="math_number"></Block>
<Block type="math_arithmetic"></Block> <Block type="math_arithmetic"></Block>
<Block type="math_single"></Block> <Block type="math_single"></Block>
@ -450,13 +539,21 @@ class Toolbox extends React.Component {
</Block> </Block>
<Block type="io_notone"></Block> <Block type="io_notone"></Block>
</Category> </Category>
<Category name={Blockly.Msg.toolbox_variables} colour={getColour().variables} custom="CREATE_TYPED_VARIABLE"></Category> <Category
name={Blockly.Msg.toolbox_variables}
colour={getColour().variables}
custom="CREATE_TYPED_VARIABLE"
></Category>
<Category name="Arrays" colour={getColour().arrays}> <Category name="Arrays" colour={getColour().arrays}>
<Block type="lists_create_empty" /> <Block type="lists_create_empty" />
<Block type="array_getIndex" /> <Block type="array_getIndex" />
<Block type="lists_length" /> <Block type="lists_length" />
</Category> </Category>
<Category name={Blockly.Msg.toolbox_functions} colour={getColour().procedures} custom="PROCEDURE"></Category> <Category
name={Blockly.Msg.toolbox_functions}
colour={getColour().procedures}
custom="PROCEDURE"
></Category>
<sep></sep> <sep></sep>
<Category name={Blockly.Msg.toolbox_io} colour={getColour().io}> <Category name={Blockly.Msg.toolbox_io} colour={getColour().io}>
<Block type="io_digitalwrite"></Block> <Block type="io_digitalwrite"></Block>
@ -489,7 +586,7 @@ class Toolbox extends React.Component {
*/} */}
</xml> </xml>
); );
}; }
} }
export default Toolbox; export default Toolbox;

View File

@ -1082,7 +1082,7 @@
"core-js-pure" "^3.0.0" "core-js-pure" "^3.0.0"
"regenerator-runtime" "^0.13.4" "regenerator-runtime" "^0.13.4"
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@7.12.1": "@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@7.12.1":
"integrity" "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==" "integrity" "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA=="
"resolved" "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz" "resolved" "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz"
"version" "7.12.1" "version" "7.12.1"
@ -1929,6 +1929,14 @@
dependencies: dependencies:
"@types/node" "*" "@types/node" "*"
"@types/hoist-non-react-statics@^3.3.0":
"integrity" "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA=="
"resolved" "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz"
"version" "3.3.1"
dependencies:
"@types/react" "*"
"hoist-non-react-statics" "^3.3.0"
"@types/html-minifier-terser@^5.0.0": "@types/html-minifier-terser@^5.0.0":
"integrity" "sha512-giAlZwstKbmvMk1OO7WXSj4OZ0keXAcl2TQq4LWHiiPH2ByaH7WeUzng+Qej8UPxxv+8lRTuouo0iaNDBuzIBA==" "integrity" "sha512-giAlZwstKbmvMk1OO7WXSj4OZ0keXAcl2TQq4LWHiiPH2ByaH7WeUzng+Qej8UPxxv+8lRTuouo0iaNDBuzIBA=="
"resolved" "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz" "resolved" "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz"
@ -2020,6 +2028,16 @@
dependencies: dependencies:
"@types/react" "*" "@types/react" "*"
"@types/react-redux@^7.1.16":
"integrity" "sha512-f/FKzIrZwZk7YEO9E1yoxIuDNRiDducxkFlkw/GNMGEnK9n4K8wJzlJBghpSuOVDgEUHoDkDF7Gi9lHNQR4siw=="
"resolved" "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.16.tgz"
"version" "7.1.16"
dependencies:
"@types/hoist-non-react-statics" "^3.3.0"
"@types/react" "*"
"hoist-non-react-statics" "^3.3.0"
"redux" "^4.0.0"
"@types/react-transition-group@^4.2.0": "@types/react-transition-group@^4.2.0":
"integrity" "sha512-/QfLHGpu+2fQOqQaXh8MG9q03bFENooTb/it4jr5kKaZlDQfWvjqWZg48AwzPVMBHlRuTRAY7hRHCEOXz5kV6w==" "integrity" "sha512-/QfLHGpu+2fQOqQaXh8MG9q03bFENooTb/it4jr5kKaZlDQfWvjqWZg48AwzPVMBHlRuTRAY7hRHCEOXz5kV6w=="
"resolved" "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.0.tgz" "resolved" "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.0.tgz"
@ -10027,15 +10045,14 @@
"strip-ansi" "6.0.0" "strip-ansi" "6.0.0"
"text-table" "0.2.0" "text-table" "0.2.0"
"react-dom@^16.13.1": "react-dom@^17.0.0", "react-dom@^17.0.2":
"integrity" "sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==" "integrity" "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA=="
"resolved" "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz" "resolved" "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz"
"version" "16.13.1" "version" "17.0.2"
dependencies: dependencies:
"loose-envify" "^1.1.0" "loose-envify" "^1.1.0"
"object-assign" "^4.1.1" "object-assign" "^4.1.1"
"prop-types" "^15.6.2" "scheduler" "^0.20.2"
"scheduler" "^0.19.1"
"react-error-overlay@^6.0.9": "react-error-overlay@^6.0.9":
"integrity" "sha512-nQTTcUu+ATDbrSD1BZHr5kgSD4oF8OFjxun8uAaL8RwPBacGBNPf/yAuVVdx17N8XNzRDMrZ9XcKZHCjPW+9ew==" "integrity" "sha512-nQTTcUu+ATDbrSD1BZHr5kgSD4oF8OFjxun8uAaL8RwPBacGBNPf/yAuVVdx17N8XNzRDMrZ9XcKZHCjPW+9ew=="
@ -10054,7 +10071,7 @@
"use-callback-ref" "^1.2.1" "use-callback-ref" "^1.2.1"
"use-sidecar" "^1.0.1" "use-sidecar" "^1.0.1"
"react-is@^16.12.0", "react-is@^16.6.0", "react-is@^16.7.0", "react-is@^16.8.0", "react-is@^16.8.1", "react-is@^16.8.4", "react-is@^16.8.6", "react-is@^16.9.0": "react-is@^16.12.0", "react-is@^16.13.1", "react-is@^16.6.0", "react-is@^16.7.0", "react-is@^16.8.0", "react-is@^16.8.1", "react-is@^16.8.4", "react-is@^16.8.6":
"integrity" "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" "integrity" "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
"resolved" "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz" "resolved" "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz"
"version" "16.13.1" "version" "16.13.1"
@ -10080,16 +10097,22 @@
"unist-util-visit" "^2.0.0" "unist-util-visit" "^2.0.0"
"xtend" "^4.0.1" "xtend" "^4.0.1"
"react-redux@^7.2.0": "react-mde@^11.5.0":
"integrity" "sha512-EvCAZYGfOLqwV7gh849xy9/pt55rJXPwmYvI4lilPM5rUT/1NxuuN59ipdBksRVSvz0KInbPnp4IfoXJXCqiDA==" "integrity" "sha512-CH/VK6d+tpVjJ8rTXfh1dDt6GWedTgCU0668p8toqhAc3vy0Lu872O2RKYDSpkUrlbHI08fjUPTl++nExp6gag=="
"resolved" "https://registry.npmjs.org/react-redux/-/react-redux-7.2.0.tgz" "resolved" "https://registry.npmjs.org/react-mde/-/react-mde-11.5.0.tgz"
"version" "7.2.0" "version" "11.5.0"
"react-redux@^7.2.4":
"integrity" "sha512-hOQ5eOSkEJEXdpIKbnRyl04LhaWabkDPV+Ix97wqQX3T3d2NQ8DUblNXXtNMavc7DpswyQM6xfaN4HQDKNY2JA=="
"resolved" "https://registry.npmjs.org/react-redux/-/react-redux-7.2.4.tgz"
"version" "7.2.4"
dependencies: dependencies:
"@babel/runtime" "^7.5.5" "@babel/runtime" "^7.12.1"
"hoist-non-react-statics" "^3.3.0" "@types/react-redux" "^7.1.16"
"hoist-non-react-statics" "^3.3.2"
"loose-envify" "^1.4.0" "loose-envify" "^1.4.0"
"prop-types" "^15.7.2" "prop-types" "^15.7.2"
"react-is" "^16.9.0" "react-is" "^16.13.1"
"react-refresh@^0.8.3", "react-refresh@>=0.8.3 <0.10.0": "react-refresh@^0.8.3", "react-refresh@>=0.8.3 <0.10.0":
"integrity" "sha512-X8jZHc7nCMjaCqoU+V2I0cOhNW+QMBwSUkeXnTi8IPe6zaRWfn60ZzvFDZqWPfmSJfjub7dDW1SP0jaHWLu/hg==" "integrity" "sha512-X8jZHc7nCMjaCqoU+V2I0cOhNW+QMBwSUkeXnTi8IPe6zaRWfn60ZzvFDZqWPfmSJfjub7dDW1SP0jaHWLu/hg=="
@ -10201,14 +10224,13 @@
"loose-envify" "^1.4.0" "loose-envify" "^1.4.0"
"prop-types" "^15.6.2" "prop-types" "^15.6.2"
"react@^16.13.1", "react@>= 16": "react@^16.8.3 || ^17", "react@^17.0.0", "react@^17.0.2", "react@>= 16", "react@17.0.2":
"integrity" "sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==" "integrity" "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA=="
"resolved" "https://registry.npmjs.org/react/-/react-16.13.1.tgz" "resolved" "https://registry.npmjs.org/react/-/react-17.0.2.tgz"
"version" "16.13.1" "version" "17.0.2"
dependencies: dependencies:
"loose-envify" "^1.1.0" "loose-envify" "^1.1.0"
"object-assign" "^4.1.1" "object-assign" "^4.1.1"
"prop-types" "^15.6.2"
"reactour@^1.18.0": "reactour@^1.18.0":
"integrity" "sha512-de0Pa5NkDU6I8IyGl+7+rWdDcx3AskmJYK/yIKU11D9EPIN79qzn852gjJgvH/jXZqeEfa+rmMWg72vA0UkmgA==" "integrity" "sha512-de0Pa5NkDU6I8IyGl+7+rWdDcx3AskmJYK/yIKU11D9EPIN79qzn852gjJgvH/jXZqeEfa+rmMWg72vA0UkmgA=="
@ -10423,7 +10445,7 @@
"resolved" "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.3.0.tgz" "resolved" "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.3.0.tgz"
"version" "2.3.0" "version" "2.3.0"
"redux@^4.0.5": "redux@^4.0.0", "redux@^4.0.5":
"integrity" "sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w==" "integrity" "sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w=="
"resolved" "https://registry.npmjs.org/redux/-/redux-4.0.5.tgz" "resolved" "https://registry.npmjs.org/redux/-/redux-4.0.5.tgz"
"version" "4.0.5" "version" "4.0.5"
@ -10876,10 +10898,10 @@
dependencies: dependencies:
"xmlchars" "^2.2.0" "xmlchars" "^2.2.0"
"scheduler@^0.19.1": "scheduler@^0.20.2":
"integrity" "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==" "integrity" "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ=="
"resolved" "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz" "resolved" "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz"
"version" "0.19.1" "version" "0.20.2"
dependencies: dependencies:
"loose-envify" "^1.1.0" "loose-envify" "^1.1.0"
"object-assign" "^4.1.1" "object-assign" "^4.1.1"