Skip to content

Commit

Permalink
release 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Smooch committed Jun 22, 2016
1 parent 849e3d8 commit 8c6b1cd
Show file tree
Hide file tree
Showing 105 changed files with 7,302 additions and 0 deletions.
45 changes: 45 additions & 0 deletions dist/smooch.js

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions lib/actions/app-actions.js
@@ -0,0 +1,29 @@
'use strict';

exports.__esModule = true;
exports.resetApp = resetApp;
exports.setApp = setApp;
exports.setStripeInfo = setStripeInfo;
var SET_APP = exports.SET_APP = 'SET_APP';
var SET_STRIPE_INFO = exports.SET_STRIPE_INFO = 'SET_STRIPE_INFO';
var RESET_APP = exports.RESET_APP = 'RESET_APP';

function resetApp() {
return {
type: RESET_APP
};
}

function setApp(app) {
return {
type: SET_APP,
app: app
};
}

function setStripeInfo(props) {
return {
type: SET_STRIPE_INFO,
props: props
};
}
193 changes: 193 additions & 0 deletions lib/actions/app-state-actions.js
@@ -0,0 +1,193 @@
'use strict';

exports.__esModule = true;
exports.toggleWidget = toggleWidget;
exports.openWidget = openWidget;
exports.closeWidget = closeWidget;
exports.showSettings = showSettings;
exports.hideSettings = hideSettings;
exports.enableEmailCapture = enableEmailCapture;
exports.disableEmailCapture = disableEmailCapture;
exports.enableImageUpload = enableImageUpload;
exports.disableImageUpload = disableImageUpload;
exports.enableSoundNotification = enableSoundNotification;
exports.disableSoundNotification = disableSoundNotification;
exports.setEmailReadonly = setEmailReadonly;
exports.unsetEmailReadonly = unsetEmailReadonly;
exports.showConnectNotification = showConnectNotification;
exports.hideConnectNotification = hideConnectNotification;
exports.setServerURL = setServerURL;
exports.showErrorNotification = showErrorNotification;
exports.hideErrorNotification = hideErrorNotification;
exports.setEmbedded = setEmbedded;
exports.showChannelPage = showChannelPage;
exports.hideChannelPage = hideChannelPage;
exports.setIntroHeight = setIntroHeight;
var TOGGLE_WIDGET = exports.TOGGLE_WIDGET = 'TOGGLE_WIDGET';
var OPEN_WIDGET = exports.OPEN_WIDGET = 'OPEN_WIDGET';
var CLOSE_WIDGET = exports.CLOSE_WIDGET = 'CLOSE_WIDGET';
var ENABLE_SETTINGS = exports.ENABLE_SETTINGS = 'ENABLE_SETTINGS';
var DISABLE_SETTINGS = exports.DISABLE_SETTINGS = 'DISABLE_SETTINGS';
var ENABLE_EMAIL_CAPTURE = exports.ENABLE_EMAIL_CAPTURE = 'ENABLE_EMAIL_CAPTURE';
var DISABLE_EMAIL_CAPTURE = exports.DISABLE_EMAIL_CAPTURE = 'DISABLE_EMAIL_CAPTURE';
var ENABLE_SOUND_NOTIFICATION = exports.ENABLE_SOUND_NOTIFICATION = 'ENABLE_SOUND_NOTIFICATION';
var DISABLE_SOUND_NOTIFICATION = exports.DISABLE_SOUND_NOTIFICATION = 'DISABLE_SOUND_NOTIFICATION';
var SHOW_SETTINGS = exports.SHOW_SETTINGS = 'SHOW_SETTINGS';
var HIDE_SETTINGS = exports.HIDE_SETTINGS = 'HIDE_SETTINGS';
var SHOW_CONNECT_NOTIFICATION = exports.SHOW_CONNECT_NOTIFICATION = 'SHOW_CONNECT_NOTIFICATION';
var HIDE_CONNECT_NOTIFICATION = exports.HIDE_CONNECT_NOTIFICATION = 'HIDE_CONNECT_NOTIFICATION';
var SHOW_ERROR_NOTIFICATION = exports.SHOW_ERROR_NOTIFICATION = 'SHOW_ERROR_NOTIFICATION';
var HIDE_ERROR_NOTIFICATION = exports.HIDE_ERROR_NOTIFICATION = 'HIDE_ERROR_NOTIFICATION';
var SET_SERVER_URL = exports.SET_SERVER_URL = 'SET_SERVER_URL';
var SET_EMAIL_READONLY = exports.SET_EMAIL_READONLY = 'SET_EMAIL_READONLY';
var UNSET_EMAIL_READONLY = exports.UNSET_EMAIL_READONLY = 'UNSET_EMAIL_READONLY';
var SET_EMBEDDED = exports.SET_EMBEDDED = 'SET_EMBEDDED';
var ENABLE_IMAGE_UPLOAD = exports.ENABLE_IMAGE_UPLOAD = 'ENABLE_IMAGE_UPLOAD';
var DISABLE_IMAGE_UPLOAD = exports.DISABLE_IMAGE_UPLOAD = 'DISABLE_IMAGE_UPLOAD';
var SHOW_CHANNEL_PAGE = exports.SHOW_CHANNEL_PAGE = 'SHOW_CHANNEL_PAGE';
var HIDE_CHANNEL_PAGE = exports.HIDE_CHANNEL_PAGE = 'HIDE_CHANNEL_PAGE';
var SET_INTRO_HEIGHT = exports.SET_INTRO_HEIGHT = 'SET_INTRO_HEIGHT';

function toggleWidget() {
return {
type: TOGGLE_WIDGET
};
}

function openWidget() {
return {
type: OPEN_WIDGET
};
}

function closeWidget() {
return {
type: CLOSE_WIDGET
};
}

function showSettings() {
return {
type: SHOW_SETTINGS
};
}

function hideSettings() {
return {
type: HIDE_SETTINGS
};
}

function enableEmailCapture() {
return {
type: ENABLE_EMAIL_CAPTURE
};
}

function disableEmailCapture() {
return {
type: DISABLE_EMAIL_CAPTURE
};
}

function enableImageUpload() {
return {
type: ENABLE_IMAGE_UPLOAD
};
}

function disableImageUpload() {
return {
type: DISABLE_IMAGE_UPLOAD
};
}

function enableSoundNotification() {
return {
type: ENABLE_SOUND_NOTIFICATION
};
}

function disableSoundNotification() {
return {
type: DISABLE_SOUND_NOTIFICATION
};
}

function setEmailReadonly() {
return {
type: SET_EMAIL_READONLY
};
}

function unsetEmailReadonly() {
return {
type: UNSET_EMAIL_READONLY
};
}

function showConnectNotification(timestamp) {
return {
type: SHOW_CONNECT_NOTIFICATION,
timestamp: timestamp
};
}

function hideConnectNotification() {
return {
type: HIDE_CONNECT_NOTIFICATION
};
}

function setServerURL(url) {
return {
type: SET_SERVER_URL,
url: url
};
}

function showErrorNotification(message) {
return function (dispatch) {
setTimeout(function () {
dispatch(hideErrorNotification());
}, 10000);

dispatch({
type: SHOW_ERROR_NOTIFICATION,
message: message
});
};
}

function hideErrorNotification() {
return {
type: HIDE_ERROR_NOTIFICATION
};
}

function setEmbedded(value) {
return {
type: SET_EMBEDDED,
value: value
};
}

function showChannelPage(channelType) {
return {
type: SHOW_CHANNEL_PAGE,
channelType: channelType
};
}

function hideChannelPage() {
return {
type: HIDE_CHANNEL_PAGE
};
}

function setIntroHeight(value) {
return {
type: SET_INTRO_HEIGHT,
value: value
};
}
20 changes: 20 additions & 0 deletions lib/actions/auth-actions.js
@@ -0,0 +1,20 @@
'use strict';

exports.__esModule = true;
exports.setAuth = setAuth;
exports.resetAuth = resetAuth;
var SET_AUTH = exports.SET_AUTH = 'SET_AUTH';
var RESET_AUTH = exports.RESET_AUTH = 'RESET_AUTH';

function setAuth(props) {
return {
type: SET_AUTH,
props: props
};
}

function resetAuth() {
return {
type: RESET_AUTH
};
}
12 changes: 12 additions & 0 deletions lib/actions/browser-actions.js
@@ -0,0 +1,12 @@
'use strict';

exports.__esModule = true;
exports.hasFocus = hasFocus;
var SET_HAS_FOCUS = exports.SET_HAS_FOCUS = 'SET_HAS_FOCUS';

function hasFocus(value) {
return {
type: SET_HAS_FOCUS,
hasFocus: value
};
}
11 changes: 11 additions & 0 deletions lib/actions/common-actions.js
@@ -0,0 +1,11 @@
'use strict';

exports.__esModule = true;
exports.reset = reset;
var RESET = exports.RESET = 'RESET';

function reset() {
return {
type: RESET
};
}
75 changes: 75 additions & 0 deletions lib/actions/conversation-actions.js
@@ -0,0 +1,75 @@
'use strict';

exports.__esModule = true;
exports.INCREMENT_UNREAD_COUNT = exports.RESET_UNREAD_COUNT = exports.SET_CONVERSATION = exports.RESET_CONVERSATION = exports.REMOVE_MESSAGE = exports.REPLACE_MESSAGE = exports.ADD_MESSAGE = undefined;

var _assign = require('babel-runtime/core-js/object/assign');

var _assign2 = _interopRequireDefault(_assign);

exports.resetConversation = resetConversation;
exports.setConversation = setConversation;
exports.addMessage = addMessage;
exports.replaceMessage = replaceMessage;
exports.removeMessage = removeMessage;
exports.incrementUnreadCount = incrementUnreadCount;
exports.resetUnreadCount = resetUnreadCount;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var ADD_MESSAGE = exports.ADD_MESSAGE = 'ADD_MESSAGE';
var REPLACE_MESSAGE = exports.REPLACE_MESSAGE = 'REPLACE_MESSAGE';
var REMOVE_MESSAGE = exports.REMOVE_MESSAGE = 'REMOVE_MESSAGE';
var RESET_CONVERSATION = exports.RESET_CONVERSATION = 'RESET_CONVERSATION';
var SET_CONVERSATION = exports.SET_CONVERSATION = 'SET_CONVERSATION';
var RESET_UNREAD_COUNT = exports.RESET_UNREAD_COUNT = 'RESET_UNREAD_COUNT';
var INCREMENT_UNREAD_COUNT = exports.INCREMENT_UNREAD_COUNT = 'INCREMENT_UNREAD_COUNT';

function resetConversation() {
return {
type: RESET_CONVERSATION
};
}

function setConversation(props) {
return {
type: SET_CONVERSATION,
conversation: props
};
}

function addMessage(props) {
return {
type: ADD_MESSAGE,
message: (0, _assign2.default)({
actions: []
}, props)
};
}

function replaceMessage(queryProps, message) {
return {
type: REPLACE_MESSAGE,
queryProps: queryProps,
message: message
};
}

function removeMessage(queryProps) {
return {
type: REMOVE_MESSAGE,
queryProps: queryProps
};
}

function incrementUnreadCount() {
return {
type: INCREMENT_UNREAD_COUNT
};
}

function resetUnreadCount() {
return {
type: RESET_UNREAD_COUNT
};
}
29 changes: 29 additions & 0 deletions lib/actions/faye-actions.js
@@ -0,0 +1,29 @@
'use strict';

exports.__esModule = true;
exports.setFayeConversationSubscription = setFayeConversationSubscription;
exports.setFayeUserSubscription = setFayeUserSubscription;
exports.unsetFayeSubscriptions = unsetFayeSubscriptions;
var SET_FAYE_CONVERSATION_SUBSCRIPTION = exports.SET_FAYE_CONVERSATION_SUBSCRIPTION = 'SET_FAYE_CONVERSATION_SUBSCRIPTION';
var SET_FAYE_USER_SUBSCRIPTION = exports.SET_FAYE_USER_SUBSCRIPTION = 'SET_FAYE_USER_SUBSCRIPTION';
var UNSET_FAYE_SUBSCRIPTIONS = exports.UNSET_FAYE_SUBSCRIPTIONS = 'UNSET_FAYE_SUBSCRIPTIONS';

function setFayeConversationSubscription(subscription) {
return {
type: SET_FAYE_CONVERSATION_SUBSCRIPTION,
subscription: subscription
};
}

function setFayeUserSubscription(subscription) {
return {
type: SET_FAYE_USER_SUBSCRIPTION,
subscription: subscription
};
}

function unsetFayeSubscriptions() {
return {
type: UNSET_FAYE_SUBSCRIPTIONS
};
}

0 comments on commit 8c6b1cd

Please sign in to comment.