Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

botframework-webchat-core

Package Overview
Dependencies
Maintainers
1
Versions
370
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

botframework-webchat-core - npm Package Compare versions

Comparing version 4.0.0-preview.e129329 to 4.0.0-preview.e4e0443

lib/actions/setDictateInterims.js

3

lib/actions/startSpeechInput.js

@@ -8,2 +8,3 @@ "use strict";

exports.START_SPEECH_INPUT = void 0;
// TODO: [P4] Rename START_SPEECH to DICTATE for simplicity
var START_SPEECH_INPUT = 'INPUT/START_SPEECH';

@@ -17,2 +18,2 @@ exports.START_SPEECH_INPUT = START_SPEECH_INPUT;

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hY3Rpb25zL3N0YXJ0U3BlZWNoSW5wdXQuanMiXSwibmFtZXMiOlsiU1RBUlRfU1BFRUNIX0lOUFVUIiwidHlwZSJdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUFBLElBQU1BLHFCQUFxQixvQkFBM0I7OztBQUVlLG9CQUFZO0FBQ3pCLFNBQU87QUFBRUMsVUFBTUQ7QUFBUixHQUFQO0FBQ0QiLCJzb3VyY2VzQ29udGVudCI6WyJjb25zdCBTVEFSVF9TUEVFQ0hfSU5QVVQgPSAnSU5QVVQvU1RBUlRfU1BFRUNIJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gKCkge1xuICByZXR1cm4geyB0eXBlOiBTVEFSVF9TUEVFQ0hfSU5QVVQgfTtcbn1cblxuZXhwb3J0IHsgU1RBUlRfU1BFRUNIX0lOUFVUIH1cbiJdfQ==
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hY3Rpb25zL3N0YXJ0U3BlZWNoSW5wdXQuanMiXSwibmFtZXMiOlsiU1RBUlRfU1BFRUNIX0lOUFVUIiwidHlwZSJdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUFBO0FBRUEsSUFBTUEscUJBQXFCLG9CQUEzQjs7O0FBRWUsb0JBQVk7QUFDekIsU0FBTztBQUFFQyxVQUFNRDtBQUFSLEdBQVA7QUFDRCIsInNvdXJjZXNDb250ZW50IjpbIi8vIFRPRE86IFtQNF0gUmVuYW1lIFNUQVJUX1NQRUVDSCB0byBESUNUQVRFIGZvciBzaW1wbGljaXR5XG5cbmNvbnN0IFNUQVJUX1NQRUVDSF9JTlBVVCA9ICdJTlBVVC9TVEFSVF9TUEVFQ0gnO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiAoKSB7XG4gIHJldHVybiB7IHR5cGU6IFNUQVJUX1NQRUVDSF9JTlBVVCB9O1xufVxuXG5leHBvcnQgeyBTVEFSVF9TUEVFQ0hfSU5QVVQgfVxuIl19

@@ -58,2 +58,14 @@ "use strict";

});
Object.defineProperty(exports, "setDictateInterims", {
enumerable: true,
get: function get() {
return _setDictateInterims.default;
}
});
Object.defineProperty(exports, "setDictateState", {
enumerable: true,
get: function get() {
return _setDictateState.default;
}
});
Object.defineProperty(exports, "setLanguage", {

@@ -125,2 +137,6 @@ enumerable: true,

var _setDictateInterims = _interopRequireDefault(require("./actions/setDictateInterims"));
var _setDictateState = _interopRequireDefault(require("./actions/setDictateState"));
var _setLanguage = _interopRequireDefault(require("./actions/setLanguage"));

@@ -144,6 +160,9 @@

var DictateState = _interopRequireWildcard(require("./constants/DictateState"));
var Constants = {
ActivityClientState: ActivityClientState
ActivityClientState: ActivityClientState,
DictateState: DictateState
};
exports.Constants = Constants;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJDb25zdGFudHMiLCJBY3Rpdml0eUNsaWVudFN0YXRlIl0sIm1hc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3RhdGUgfTtcblxuZXhwb3J0IHtcbiAgY29ubmVjdCxcbiAgQ29uc3RhbnRzLFxuICBjcmVhdGVTdG9yZSxcbiAgZGlzY29ubmVjdCxcbiAgbWFya0FjdGl2aXR5LFxuICBwb3N0QWN0aXZpdHksXG4gIHNlbmRGaWxlcyxcbiAgc2VuZE1lc3NhZ2UsXG4gIHNlbmRQb3N0QmFjayxcbiAgc2V0RGljdGF0ZUludGVyaW1zLFxuICBzZXREaWN0YXRlU3RhdGUsXG4gIHNldExhbmd1YWdlLFxuICBzZXRTZW5kQm94LFxuICBzZXRTZW5kVHlwaW5nLFxuICBzdGFydFNwZWFraW5nQWN0aXZpdHksXG4gIHN0YXJ0U3BlZWNoSW5wdXQsXG4gIHN0b3BTcGVha2luZ0FjdGl2aXR5LFxuICBzdG9wU3BlZWNoSW5wdXQsXG4gIHN1Ym1pdFNlbmRCb3hcbn1cbiJdfQ==
"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

@@ -12,2 +14,8 @@

var DictateState = _interopRequireWildcard(require("../constants/DictateState"));
var _setDictateInterims = require("../actions/setDictateInterims");
var _setDictateState = require("../actions/setDictateState");
var _setSendBox = require("../actions/setSendBox");

@@ -20,4 +28,5 @@

var DEFAULT_STATE = {
sendBox: '',
speechState: false
dictateInterims: [],
dictateState: DictateState.IDLE,
sendBox: ''
};

@@ -33,2 +42,14 @@

switch (type) {
case _setDictateInterims.SET_DICTATE_INTERIMS:
state = (0, _simpleUpdateIn.default)(state, ['dictateInterims'], function () {
return payload.dictateInterims;
});
break;
case _setDictateState.SET_DICTATE_STATE:
state = (0, _simpleUpdateIn.default)(state, ['dictateState'], function () {
return payload.dictateState;
});
break;
case _setSendBox.SET_SEND_BOX:

@@ -41,11 +62,17 @@ state = (0, _simpleUpdateIn.default)(state, ['sendBox'], function () {

case _startSpeechInput.START_SPEECH_INPUT:
state = (0, _simpleUpdateIn.default)(state, ['speechState'], function () {
return true;
});
if (state.dictateState === DictateState.IDLE || state.dictateState === DictateState.STOPPING) {
state = (0, _simpleUpdateIn.default)(state, ['dictateState'], function () {
return DictateState.STARTING;
});
}
break;
case _stopSpeechInput.STOP_SPEECH_INPUT:
state = (0, _simpleUpdateIn.default)(state, ['speechState'], function () {
return false;
});
if (state.dictateState === DictateState.STARTING || state.dictateState === DictateState.DICTATING) {
state = (0, _simpleUpdateIn.default)(state, ['dictateState'], function () {
return DictateState.STOPPING;
});
}
break;

@@ -59,2 +86,2 @@

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9yZWR1Y2Vycy9pbnB1dC5qcyJdLCJuYW1lcyI6WyJERUZBVUxUX1NUQVRFIiwic2VuZEJveCIsInNwZWVjaFN0YXRlIiwic3RhdGUiLCJwYXlsb2FkIiwidHlwZSIsIlNFVF9TRU5EX0JPWCIsInRleHQiLCJTVEFSVF9TUEVFQ0hfSU5QVVQiLCJTVE9QX1NQRUVDSF9JTlBVVCJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUE7O0FBRUE7O0FBQ0E7O0FBQ0E7O0FBRUEsSUFBTUEsZ0JBQWdCO0FBQ3BCQyxXQUFTLEVBRFc7QUFFcEJDLGVBQWE7QUFGTyxDQUF0Qjs7QUFLZSxvQkFBb0Q7QUFBQSxNQUExQ0MsS0FBMEMsdUVBQWxDSCxhQUFrQzs7QUFBQTtBQUFBLE1BQWpCSSxPQUFpQixRQUFqQkEsT0FBaUI7QUFBQSxNQUFSQyxJQUFRLFFBQVJBLElBQVE7O0FBQ2pFLFVBQVFBLElBQVI7QUFDRSxTQUFLQyx3QkFBTDtBQUNFSCxjQUFRLDZCQUFTQSxLQUFULEVBQWdCLENBQUMsU0FBRCxDQUFoQixFQUE2QjtBQUFBLGVBQU1DLFFBQVFHLElBQWQ7QUFBQSxPQUE3QixDQUFSO0FBQ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gICAgYnJlYWs7XG5cbiAgICBkZWZhdWx0OiBicmVhaztcbiAgfVxuXG4gIHJldHVybiBzdGF0ZTtcbn1cbiJdfQ==
{
"name": "botframework-webchat-core",
"version": "4.0.0-preview.e129329",
"version": "4.0.0-preview.e4e0443",
"description": "Core of botframework-webchat",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -0,1 +1,3 @@

// TODO: [P4] Rename START_SPEECH to DICTATE for simplicity
const START_SPEECH_INPUT = 'INPUT/START_SPEECH';

@@ -2,0 +4,0 @@

@@ -9,2 +9,4 @@ import connect from './actions/connect';

import sendPostBack from './actions/sendPostBack';
import setDictateInterims from './actions/setDictateInterims';
import setDictateState from './actions/setDictateState';
import setLanguage from './actions/setLanguage';

@@ -20,4 +22,5 @@ import setSendBox from './actions/setSendBox';

import * as ActivityClientState from './constants/ActivityClientState';
import * as DictateState from './constants/DictateState';
const Constants = { ActivityClientState };
const Constants = { ActivityClientState, DictateState };

@@ -34,2 +37,4 @@ export {

sendPostBack,
setDictateInterims,
setDictateState,
setLanguage,

@@ -36,0 +41,0 @@ setSendBox,

import updateIn from 'simple-update-in';
import * as DictateState from '../constants/DictateState';
import { SET_DICTATE_INTERIMS } from '../actions/setDictateInterims';
import { SET_DICTATE_STATE } from '../actions/setDictateState';
import { SET_SEND_BOX } from '../actions/setSendBox';
import { START_SPEECH_INPUT } from '../actions/startSpeechInput';
import { STOP_SPEECH_INPUT } from '../actions/stopSpeechInput';
import { IDLE } from '../constants/DictateState';
const DEFAULT_STATE = {
sendBox: '',
speechState: false
dictateInterims: [],
dictateState: IDLE,
sendBox: ''
};

@@ -14,2 +19,10 @@

switch (type) {
case SET_DICTATE_INTERIMS:
state = updateIn(state, ['dictateInterims'], () => payload.dictateInterims);
break;
case SET_DICTATE_STATE:
state = updateIn(state, ['dictateState'], () => payload.dictateState);
break;
case SET_SEND_BOX:

@@ -20,7 +33,13 @@ state = updateIn(state, ['sendBox'], () => payload.text);

case START_SPEECH_INPUT:
state = updateIn(state, ['speechState'], () => true);
if (state.dictateState === DictateState.IDLE || state.dictateState === DictateState.STOPPING) {
state = updateIn(state, ['dictateState'], () => DictateState.STARTING);
}
break;
case STOP_SPEECH_INPUT:
state = updateIn(state, ['speechState'], () => false);
if (state.dictateState === DictateState.STARTING || state.dictateState === DictateState.DICTATING) {
state = updateIn(state, ['dictateState'], () => DictateState.STOPPING);
}
break;

@@ -27,0 +46,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc