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

digirati-annotation-redux

Package Overview
Dependencies
Maintainers
3
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

digirati-annotation-redux - npm Package Compare versions

Comparing version 1.0.0-rc.14b41279 to 1.0.0-rc.1c33a17c

es/lib/annotation/__tests__/annotation-test.js

4

es/actions/drafts.js

@@ -355,6 +355,4 @@ import _extends from 'babel-runtime/helpers/extends';

dispatch(addAnnotation(getState().drafts.list[id]));
if (dry === false) {
dispatch({ type: DRAFT_PUBLISHED, payload: { id: id, scope: scope } });
}
dispatch({ type: DRAFT_PUBLISHED, payload: { id: id, scope: scope, dry: dry } });
};
}

@@ -0,4 +1,12 @@

import _extends from 'babel-runtime/helpers/extends';
import { applyMiddleware, combineReducers, compose, createStore } from 'redux';
import { intlReducer } from 'react-intl-redux';
import { addLocaleData } from 'react-intl';
import middleware from './middleware';
import translations from './locale';
import enLocaleData from 'react-intl/locale-data/en';
import cyLocaleData from 'react-intl/locale-data/cy';
addLocaleData([].concat(enLocaleData, cyLocaleData));
var composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;

@@ -11,4 +19,12 @@

var extraMiddleware = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var locale = arguments[2];
return createStore(combineReducers(reducers), composeEnhancers(applyMiddleware.apply(undefined, [].concat(middleware, extraMiddleware))));
return createStore(combineReducers(_extends({}, reducers, {
intl: intlReducer
})), {
intl: {
locale: locale,
messages: translations[locale]
}
}, composeEnhancers(applyMiddleware.apply(undefined, [].concat(middleware, extraMiddleware))));
}

@@ -105,3 +105,3 @@ import _regeneratorRuntime from 'babel-runtime/regenerator';

body: JSON.stringify(body),
credentials: 'same-origin',
credentials: 'include',
redirect: 'follow'

@@ -108,0 +108,0 @@ }).then(function (response) {

@@ -33,3 +33,3 @@ import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';

export default function draftReducer() {
var _list, _list2, _list3, _list4, _list5, _currentDrafts, _currentDrafts2, _list6, _list7, _list8, _isConfirmed, _currentDrafts3, _isConfirmed2, _currentDrafts4;
var _list, _list2, _list3, _list4, _list5, _currentDrafts, _currentDrafts2, _list6, _list7, _list8, _isConfirmed, _isConfirmed2, _currentDrafts3;

@@ -113,4 +113,3 @@ var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState;

case DRAFT_PUBLISHED:
return update(state, {
currentDrafts: (_currentDrafts3 = {}, _currentDrafts3[action.payload.scope] = { $set: null }, _currentDrafts3),
var updater = {
isConfirmed: (_isConfirmed2 = {}, _isConfirmed2[action.payload.scope] = { $set: false }, _isConfirmed2),

@@ -125,4 +124,11 @@ list: {

}
});
};
if (action.payload.dry !== true) {
var _updater$currentDraft;
updater.currentDrafts = (_updater$currentDraft = {}, _updater$currentDraft[action.payload.scope] = { $set: null }, _updater$currentDraft);
}
return update(state, updater);
case DRAFT_DISCARD:

@@ -143,3 +149,3 @@ var listUpdate = {

return update(state, {
currentDrafts: (_currentDrafts4 = {}, _currentDrafts4[action.payload.scope] = { $set: null }, _currentDrafts4),
currentDrafts: (_currentDrafts3 = {}, _currentDrafts3[action.payload.scope] = { $set: null }, _currentDrafts3),
list: listUpdate

@@ -146,0 +152,0 @@ });

@@ -408,6 +408,4 @@ 'use strict';

dispatch((0, _annotations.addAnnotation)(getState().drafts.list[id]));
if (dry === false) {
dispatch({ type: DRAFT_PUBLISHED, payload: { id: id, scope: scope } });
}
dispatch({ type: DRAFT_PUBLISHED, payload: { id: id, scope: scope, dry: dry } });
};
}
'use strict';
exports.__esModule = true;
var _extends2 = require('babel-runtime/helpers/extends');
var _extends3 = _interopRequireDefault(_extends2);
exports.default = createCustomStore;

@@ -8,2 +13,6 @@

var _reactIntlRedux = require('react-intl-redux');
var _reactIntl = require('react-intl');
var _middleware = require('./middleware');

@@ -13,4 +22,18 @@

var _locale = require('./locale');
var _locale2 = _interopRequireDefault(_locale);
var _en = require('react-intl/locale-data/en');
var _en2 = _interopRequireDefault(_en);
var _cy = require('react-intl/locale-data/cy');
var _cy2 = _interopRequireDefault(_cy);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
(0, _reactIntl.addLocaleData)([].concat(_en2.default, _cy2.default));
var composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || _redux.compose;

@@ -23,5 +46,13 @@

var extraMiddleware = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var locale = arguments[2];
return (0, _redux.createStore)((0, _redux.combineReducers)(reducers), composeEnhancers(_redux.applyMiddleware.apply(undefined, [].concat(_middleware2.default, extraMiddleware))));
return (0, _redux.createStore)((0, _redux.combineReducers)((0, _extends3.default)({}, reducers, {
intl: _reactIntlRedux.intlReducer
})), {
intl: {
locale: locale,
messages: _locale2.default[locale]
}
}, composeEnhancers(_redux.applyMiddleware.apply(undefined, [].concat(_middleware2.default, extraMiddleware))));
}
module.exports = exports['default'];

@@ -240,3 +240,3 @@ 'use strict';

body: JSON.stringify(body),
credentials: 'same-origin',
credentials: 'include',
redirect: 'follow'

@@ -243,0 +243,0 @@ }).then(function (response) {

@@ -47,3 +47,3 @@ 'use strict';

function draftReducer() {
var _list, _list2, _list3, _list4, _list5, _currentDrafts, _currentDrafts2, _list6, _list7, _list8, _isConfirmed, _currentDrafts3, _isConfirmed2, _currentDrafts4;
var _list, _list2, _list3, _list4, _list5, _currentDrafts, _currentDrafts2, _list6, _list7, _list8, _isConfirmed, _isConfirmed2, _currentDrafts3;

@@ -127,4 +127,3 @@ var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState;

case _drafts.DRAFT_PUBLISHED:
return (0, _immutabilityHelper2.default)(state, {
currentDrafts: (_currentDrafts3 = {}, _currentDrafts3[action.payload.scope] = { $set: null }, _currentDrafts3),
var updater = {
isConfirmed: (_isConfirmed2 = {}, _isConfirmed2[action.payload.scope] = { $set: false }, _isConfirmed2),

@@ -139,4 +138,11 @@ list: {

}
});
};
if (action.payload.dry !== true) {
var _updater$currentDraft;
updater.currentDrafts = (_updater$currentDraft = {}, _updater$currentDraft[action.payload.scope] = { $set: null }, _updater$currentDraft);
}
return (0, _immutabilityHelper2.default)(state, updater);
case _drafts.DRAFT_DISCARD:

@@ -157,3 +163,3 @@ var listUpdate = {

return (0, _immutabilityHelper2.default)(state, {
currentDrafts: (_currentDrafts4 = {}, _currentDrafts4[action.payload.scope] = { $set: null }, _currentDrafts4),
currentDrafts: (_currentDrafts3 = {}, _currentDrafts3[action.payload.scope] = { $set: null }, _currentDrafts3),
list: listUpdate

@@ -160,0 +166,0 @@ });

{
"name": "digirati-annotation-redux",
"version": "1.0.0-rc.14b41279",
"version": "1.0.0-rc.1c33a17c",
"description": "Describe annotation-redux here",

@@ -14,3 +14,3 @@ "main": "es/index.js",

"watch": "./bin/watch",
"build": "nwb build-web-module",
"build": "nwb build-web-module --copy-files",
"clean": "nwb clean-module",

@@ -25,2 +25,3 @@ "test": "NODE_ENV=test jest --config=./node_modules/digirati-test-environment/jest.config.json",

"immutability-helper": "^2.1.2",
"react-intl": "^2.4.0",
"react-redux": "^5.0.3",

@@ -39,3 +40,3 @@ "redux": "^3.6.0",

"babel-plugin-transform-regenerator": "^6.24.1",
"digirati-test-environment": "^1.0.0-rc.14b41279",
"digirati-test-environment": "^1.0.0-rc.1c33a17c",
"jest": "^20.0.0",

@@ -42,0 +43,0 @@ "nwb": "0.15.x"

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