educoreapp2 1.0.76 → 1.0.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/dist/App.css +0 -111
- package/dist/EduApp.js +0 -309
- package/dist/Tools.js +0 -235
- package/dist/Translate.js +0 -33
- package/dist/img/404.png +0 -0
- package/dist/img/lang_en.svg +0 -10
- package/dist/img/lang_pl.svg +0 -4
- package/dist/img/logo.png +0 -0
- package/dist/img/nointernet.png +0 -0
- package/dist/img/update.png +0 -0
- package/dist/index.js +0 -236
- package/dist/lib/API.js +0 -65
- package/dist/lib/APIFaker.js +0 -57
- package/dist/lib/APILocal.js +0 -76
- package/dist/lib/APIServer.js +0 -76
- package/dist/lib/ApiCode.js +0 -11
- package/dist/spxbasecode/EduLog.js +0 -16
- package/dist/spxbasecode/Request.js +0 -43
- package/dist/spxbasecode/Validators.js +0 -66
- package/dist/spxbasecode/WS.js +0 -71
- package/dist/spxbasecode/cmps/8.jpg +0 -0
- package/dist/spxbasecode/cmps/BaseAnimation.js +0 -76
- package/dist/spxbasecode/cmps/BaseAutocomplete.js +0 -81
- package/dist/spxbasecode/cmps/BaseButton.js +0 -41
- package/dist/spxbasecode/cmps/BaseButtonCountry.js +0 -48
- package/dist/spxbasecode/cmps/BaseButtonIcon.js +0 -78
- package/dist/spxbasecode/cmps/BaseButtonImage.js +0 -66
- package/dist/spxbasecode/cmps/BaseCard.js +0 -95
- package/dist/spxbasecode/cmps/BaseCenter.js +0 -33
- package/dist/spxbasecode/cmps/BaseError.js +0 -48
- package/dist/spxbasecode/cmps/BaseForm.js +0 -141
- package/dist/spxbasecode/cmps/BaseForm2.js +0 -78
- package/dist/spxbasecode/cmps/BaseImage.js +0 -45
- package/dist/spxbasecode/cmps/BaseImg.js +0 -62
- package/dist/spxbasecode/cmps/BaseInputString.js +0 -241
- package/dist/spxbasecode/cmps/BaseLabel.js +0 -48
- package/dist/spxbasecode/cmps/BaseLang.js +0 -51
- package/dist/spxbasecode/cmps/BaseList.js +0 -79
- package/dist/spxbasecode/cmps/BaseListFile.js +0 -79
- package/dist/spxbasecode/cmps/BasePage.js +0 -26
- package/dist/spxbasecode/cmps/BaseReadTextButton.js +0 -40
- package/dist/spxbasecode/cmps/BaseSSOLogin.js +0 -31
- package/dist/spxbasecode/cmps/BaseSlimPage.js +0 -82
- package/dist/spxbasecode/cmps/EduPage.js +0 -20
- package/dist/spxbasecode/cmps/LogoEdupanel.js +0 -41
- package/dist/spxbasecode/cmps/Menu.js +0 -169
- package/dist/spxbasecode/cmps/PageWithMenu.js +0 -55
- package/dist/spxbasecode/cmps/ProfileMenu.js +0 -25
- package/dist/spxbasecode/cmps/SpeechToText.js +0 -48
- package/dist/spxbasecode/cmps/TextToCommand.js +0 -98
- package/dist/spxbasecode/img/soundOff.svg +0 -1
- package/dist/spxbasecode/img/soundOn.png +0 -0
| @@ -1,48 +0,0 @@ | |
| 1 | 
            -
            "use strict";
         | 
| 2 | 
            -
             | 
| 3 | 
            -
            Object.defineProperty(exports, "__esModule", {
         | 
| 4 | 
            -
              value: true
         | 
| 5 | 
            -
            });
         | 
| 6 | 
            -
            exports.default = void 0;
         | 
| 7 | 
            -
            var _react = _interopRequireDefault(require("react"));
         | 
| 8 | 
            -
            var _reactSpeechRecognition = _interopRequireWildcard(require("react-speech-recognition"));
         | 
| 9 | 
            -
            var _educoreapp = require("educoreapp2");
         | 
| 10 | 
            -
            function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
         | 
| 11 | 
            -
            function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
         | 
| 12 | 
            -
            function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
         | 
| 13 | 
            -
            const SpeechToText = props => {
         | 
| 14 | 
            -
              const {
         | 
| 15 | 
            -
                transcript,
         | 
| 16 | 
            -
                resetTranscript
         | 
| 17 | 
            -
              } = (0, _reactSpeechRecognition.useSpeechRecognition)();
         | 
| 18 | 
            -
              const handleListen = () => {
         | 
| 19 | 
            -
                resetTranscript();
         | 
| 20 | 
            -
                if (_reactSpeechRecognition.default.browserSupportsSpeechRecognition) {
         | 
| 21 | 
            -
                  _reactSpeechRecognition.default.startListening({
         | 
| 22 | 
            -
                    continuous: true
         | 
| 23 | 
            -
                  }).then(() => {
         | 
| 24 | 
            -
                    if (!_reactSpeechRecognition.default.isMicrophoneAvailable) {
         | 
| 25 | 
            -
                      //Tools.alert("No isMicrophoneAvailable");
         | 
| 26 | 
            -
                    }
         | 
| 27 | 
            -
                  });
         | 
| 28 | 
            -
                } else {
         | 
| 29 | 
            -
                  _educoreapp.Tools.alert("No speech recognation");
         | 
| 30 | 
            -
                }
         | 
| 31 | 
            -
              };
         | 
| 32 | 
            -
              const stopListening = () => {
         | 
| 33 | 
            -
                _reactSpeechRecognition.default.stopListening();
         | 
| 34 | 
            -
              };
         | 
| 35 | 
            -
              const reset = () => {
         | 
| 36 | 
            -
                resetTranscript();
         | 
| 37 | 
            -
              };
         | 
| 38 | 
            -
              const getTranscript = () => {
         | 
| 39 | 
            -
                return transcript;
         | 
| 40 | 
            -
              };
         | 
| 41 | 
            -
              props.parent.speech = {};
         | 
| 42 | 
            -
              props.parent.speech.getTranscript = getTranscript;
         | 
| 43 | 
            -
              props.parent.speech.reset = reset;
         | 
| 44 | 
            -
              props.parent.speech.stopListening = stopListening;
         | 
| 45 | 
            -
              props.parent.speech.handleListen = handleListen;
         | 
| 46 | 
            -
              return /*#__PURE__*/_react.default.createElement("div", null);
         | 
| 47 | 
            -
            };
         | 
| 48 | 
            -
            var _default = exports.default = SpeechToText;
         | 
| @@ -1,98 +0,0 @@ | |
| 1 | 
            -
            "use strict";
         | 
| 2 | 
            -
             | 
| 3 | 
            -
            Object.defineProperty(exports, "__esModule", {
         | 
| 4 | 
            -
              value: true
         | 
| 5 | 
            -
            });
         | 
| 6 | 
            -
            exports.default = void 0;
         | 
| 7 | 
            -
            var _react = _interopRequireWildcard(require("react"));
         | 
| 8 | 
            -
            var _SpeechToText = _interopRequireDefault(require("./SpeechToText"));
         | 
| 9 | 
            -
            var _educoreapp = require("educoreapp2");
         | 
| 10 | 
            -
            function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
         | 
| 11 | 
            -
            function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
         | 
| 12 | 
            -
            function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
         | 
| 13 | 
            -
            class TextToCommand extends _react.Component {
         | 
| 14 | 
            -
              constructor(props) {
         | 
| 15 | 
            -
                super();
         | 
| 16 | 
            -
                this.props = props;
         | 
| 17 | 
            -
                this.speech = null;
         | 
| 18 | 
            -
                this.props.parent.textToCommand = this;
         | 
| 19 | 
            -
                this.interval = 5000;
         | 
| 20 | 
            -
                this.props.parent.TTCInit();
         | 
| 21 | 
            -
              }
         | 
| 22 | 
            -
              listen(parent, pageName) {
         | 
| 23 | 
            -
                this.speech.handleListen();
         | 
| 24 | 
            -
                this.parent = parent;
         | 
| 25 | 
            -
                this.pageName = pageName;
         | 
| 26 | 
            -
                let this2 = this;
         | 
| 27 | 
            -
                setInterval(function () {
         | 
| 28 | 
            -
                  let cmd = this2.speech.getTranscript();
         | 
| 29 | 
            -
                  this2.command(cmd);
         | 
| 30 | 
            -
                }, this.interval);
         | 
| 31 | 
            -
              }
         | 
| 32 | 
            -
              command(text) {
         | 
| 33 | 
            -
                this.speech.reset();
         | 
| 34 | 
            -
                let pageName = this.pageName;
         | 
| 35 | 
            -
                /*this.MAP = {
         | 
| 36 | 
            -
                    "home": {
         | 
| 37 | 
            -
                        "naciśnij przycisk": {
         | 
| 38 | 
            -
                            "fun": "clickButton",
         | 
| 39 | 
            -
                            "commands": {
         | 
| 40 | 
            -
                                "nowa gra": "new_game",
         | 
| 41 | 
            -
                                "o nas": "about_us",
         | 
| 42 | 
            -
                                "pomoc": "help"
         | 
| 43 | 
            -
                            },
         | 
| 44 | 
            -
                        }
         | 
| 45 | 
            -
                    },"new_game": {
         | 
| 46 | 
            -
                        "zaznacz pole": {
         | 
| 47 | 
            -
                            "fun": "selectField",
         | 
| 48 | 
            -
                            "commands": {
         | 
| 49 | 
            -
                                "numer 1": "1",
         | 
| 50 | 
            -
                                "numer 2": "2",
         | 
| 51 | 
            -
                                "numer 3": "3",
         | 
| 52 | 
            -
                                "numer 4": "4",
         | 
| 53 | 
            -
                                "numer 5": "5",
         | 
| 54 | 
            -
                                "numer 6": "6",
         | 
| 55 | 
            -
                                "numer 7": "7",
         | 
| 56 | 
            -
                                "numer 8": "8",
         | 
| 57 | 
            -
                                "numer 9": "9",
         | 
| 58 | 
            -
                            },
         | 
| 59 | 
            -
                        }
         | 
| 60 | 
            -
                    },
         | 
| 61 | 
            -
                };*/
         | 
| 62 | 
            -
                let map = this.MAP[window.App.lang][pageName];
         | 
| 63 | 
            -
                if (!_educoreapp.Tools.isset(map)) {
         | 
| 64 | 
            -
                  map = this.MAP[window.App.lang].default;
         | 
| 65 | 
            -
                }
         | 
| 66 | 
            -
                for (let k in map) {
         | 
| 67 | 
            -
                  let i = text.indexOf(k);
         | 
| 68 | 
            -
                  if (i === -1) {
         | 
| 69 | 
            -
                    continue;
         | 
| 70 | 
            -
                  }
         | 
| 71 | 
            -
                  let coms = map[k].commands;
         | 
| 72 | 
            -
                  if (!_educoreapp.Tools.isset(coms)) {
         | 
| 73 | 
            -
                    let fun = map[k].fun;
         | 
| 74 | 
            -
                    let pp = map[k].param;
         | 
| 75 | 
            -
                    this.parent[fun](pp);
         | 
| 76 | 
            -
                    this.speech.reset();
         | 
| 77 | 
            -
                    return;
         | 
| 78 | 
            -
                  }
         | 
| 79 | 
            -
                  for (let l in coms) {
         | 
| 80 | 
            -
                    let j = text.indexOf(l);
         | 
| 81 | 
            -
                    if (j === -1) {
         | 
| 82 | 
            -
                      continue;
         | 
| 83 | 
            -
                    }
         | 
| 84 | 
            -
                    let fun = map[k].fun;
         | 
| 85 | 
            -
                    let pp = coms[l];
         | 
| 86 | 
            -
                    //console.log("ffff",fun,pp,this.parent);
         | 
| 87 | 
            -
                    this.parent[fun](pp);
         | 
| 88 | 
            -
                    this.speech.reset();
         | 
| 89 | 
            -
                  }
         | 
| 90 | 
            -
                }
         | 
| 91 | 
            -
              }
         | 
| 92 | 
            -
              render() {
         | 
| 93 | 
            -
                return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_SpeechToText.default, {
         | 
| 94 | 
            -
                  parent: this
         | 
| 95 | 
            -
                }));
         | 
| 96 | 
            -
              }
         | 
| 97 | 
            -
            }
         | 
| 98 | 
            -
            var _default = exports.default = TextToCommand;
         | 
| @@ -1 +0,0 @@ | |
| 1 | 
            -
            <?xml version="1.0" encoding="utf-8"?><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 122.88 120.97" style="enable-background:new 0 0 122.88 120.97" xml:space="preserve"><style type="text/css">.st0{fill-rule:evenodd;clip-rule:evenodd;}</style><g><path class="st0" d="M7.02,28.81h28.65c0.6,0,1.09,0.49,1.09,1.09v44.09L17.76,93H7c-3.85,0-7-3.15-7-7V35.83 C0,31.97,3.16,28.81,7.02,28.81L7.02,28.81z M111.29,6.02l11.59,11.59l-93.17,93.17L18.12,99.19L111.29,6.02L111.29,6.02z M42.33,27.67c16.7-9.16,33.4-18.32,50.09-27.48c1.6-0.88,3.32,1.49,3.32,3.32v11.5L41.66,69.1V28.34 C41.66,27.97,42.01,27.85,42.33,27.67L42.33,27.67z M95.74,51.66v65.6c0,1.92-1.82,4.45-3.5,3.5L50.29,97.11L95.74,51.66 L95.74,51.66z"/></g></svg>
         | 
| Binary file |