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 0.8.13 to 0.8.16

8

es/actions/drafts.js

@@ -25,2 +25,3 @@ import _extends from 'babel-runtime/helpers/extends';

export var DRAFT_DISCARD = 'DRAFT_DISCARD';
export var DRAFT_IMPORT = 'DRAFT_IMPORT';

@@ -32,2 +33,3 @@ export function createDraft(scope, emptyInput, template) {

var immutableSelector = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
var path = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : [];

@@ -39,3 +41,3 @@ return function (dispatch, getState) {

type: DRAFT_CREATE,
payload: { id: id, input: input, template: template, selectors: selectors ? selectors : input, motivation: motivation }
payload: { id: id, input: input, template: template, selectors: selectors ? selectors : input, motivation: motivation, fingerprint: { scope: scope, path: path, created: new Date().toISOString() } }
});

@@ -54,2 +56,6 @@ dispatch(selectDraft(scope, id));

export function importDraft(id, draft) {
return { type: DRAFT_IMPORT, payload: draft };
}
export function confirmDraft(scope) {

@@ -56,0 +62,0 @@ return { type: DRAFT_CONFIRM, payload: { scope: scope } };

@@ -5,3 +5,3 @@ import _extends from 'babel-runtime/helpers/extends';

import { connect } from 'react-redux';
import { addSelectorToDraftFromViewer, asyncPublishDraft, confirmDraft, createDraft, deselectDraft, discardCurrentDraft, discardDraft, editCurrentDraftFieldSelector, previewDraft, publishDraft, removeSelectorFromCurrentDraft, removeSelectorFromDraft, selectDraft, unpreviewDraft, updateDraft } from './actions/drafts';
import { addSelectorToDraftFromViewer, asyncPublishDraft, confirmDraft, createDraft, deselectDraft, discardCurrentDraft, discardDraft, editCurrentDraftFieldSelector, previewDraft, publishDraft, removeSelectorFromCurrentDraft, removeSelectorFromDraft, selectDraft, unpreviewDraft, updateDraft, importDraft } from './actions/drafts';
import { addAnnotation } from './actions/annotations';

@@ -42,2 +42,3 @@ import { cancelSelector, chooseSecondarySelector, chooseSelector, commitToCurrentDraft, commitToCurrentDraftField, editCurrentDraftSecondarySelector, editCurrentDraftSelector, setAvailableSelectors, updateSelector } from './actions/selectors';

var currentSelector = state.selector && state.selector.currentSelector ? state.selector.currentSelector : null;
var treeRoute = props.tree && state.resource.currentPaths ? state.resource.currentPaths[props.tree] : null;

@@ -62,4 +63,6 @@ // @todo move to query.

state: state,
treeRoute: treeRoute,
currentSelector: currentSelector,
currentDraft: currentDraft,
currentDrafts: state.drafts.currentDrafts,
currentResource: currentResource,

@@ -100,2 +103,4 @@ isSelecting: isSelecting(state),

}), {
selectScopedDraft: selectDraft,
importDraft: importDraft,
commitToCurrentDraft: commitToCurrentDraft,

@@ -102,0 +107,0 @@ commitToCurrentDraftField: commitToCurrentDraftField,

10

es/reducers/draftReducer.js
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import { DRAFT_CONFIRM, DRAFT_CREATE, DRAFT_DESELECT, DRAFT_DISCARD, DRAFT_PREVIEW, DRAFT_PUBLISHED, DRAFT_PUBLISHING, DRAFT_REMOVE_SELECTOR, DRAFT_SELECT, DRAFT_UNPREVIEW, DRAFT_UPDATE_FIELD_SELECTOR, DRAFT_UPDATE_INPUT, DRAFT_UPDATE_SELECTOR } from '../actions/drafts';
import { DRAFT_CONFIRM, DRAFT_CREATE, DRAFT_DESELECT, DRAFT_DISCARD, DRAFT_PREVIEW, DRAFT_PUBLISHED, DRAFT_PUBLISHING, DRAFT_REMOVE_SELECTOR, DRAFT_SELECT, DRAFT_UNPREVIEW, DRAFT_UPDATE_FIELD_SELECTOR, DRAFT_UPDATE_INPUT, DRAFT_UPDATE_SELECTOR, DRAFT_IMPORT } from '../actions/drafts';
import update from 'immutability-helper';

@@ -20,3 +20,8 @@

isPreviewing: draft.isPreviewing || false,
selector: draft.selector || null
selector: draft.selector || null,
fingerprint: draft.fingerprint ? draft.fingerprint : {
scope: draft.template,
path: [],
unstable: true
}
};

@@ -33,2 +38,3 @@ }

case DRAFT_CREATE:
case DRAFT_IMPORT:
return update(state, {

@@ -35,0 +41,0 @@ list: (_list = {}, _list[action.payload.id] = {

'use strict';
exports.__esModule = true;
exports.DRAFT_DISCARD = exports.DRAFT_CONFIRM = exports.DRAFT_UNPREVIEW = exports.DRAFT_PREVIEW = exports.DRAFT_PUBLISHED = exports.DRAFT_PUBLISHING = exports.DRAFT_DESELECT = exports.DRAFT_SELECT = exports.DRAFT_UPDATE_INPUT = exports.DRAFT_REMOVE_FIELD_SELECTOR = exports.DRAFT_UPDATE_FIELD_SELECTOR = exports.DRAFT_REMOVE_SELECTOR = exports.DRAFT_UPDATE_SELECTOR = exports.DRAFT_CREATE = undefined;
exports.DRAFT_IMPORT = exports.DRAFT_DISCARD = exports.DRAFT_CONFIRM = exports.DRAFT_UNPREVIEW = exports.DRAFT_PREVIEW = exports.DRAFT_PUBLISHED = exports.DRAFT_PUBLISHING = exports.DRAFT_DESELECT = exports.DRAFT_SELECT = exports.DRAFT_UPDATE_INPUT = exports.DRAFT_REMOVE_FIELD_SELECTOR = exports.DRAFT_UPDATE_FIELD_SELECTOR = exports.DRAFT_REMOVE_SELECTOR = exports.DRAFT_UPDATE_SELECTOR = exports.DRAFT_CREATE = undefined;

@@ -11,2 +11,3 @@ var _extends2 = require('babel-runtime/helpers/extends');

exports.createDraft = createDraft;
exports.importDraft = importDraft;
exports.confirmDraft = confirmDraft;

@@ -66,2 +67,3 @@ exports.deselectDraft = deselectDraft;

var DRAFT_DISCARD = exports.DRAFT_DISCARD = 'DRAFT_DISCARD';
var DRAFT_IMPORT = exports.DRAFT_IMPORT = 'DRAFT_IMPORT';

@@ -73,2 +75,3 @@ function createDraft(scope, emptyInput, template) {

var immutableSelector = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
var path = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : [];

@@ -80,3 +83,3 @@ return function (dispatch, getState) {

type: DRAFT_CREATE,
payload: { id: id, input: input, template: template, selectors: selectors ? selectors : input, motivation: motivation }
payload: { id: id, input: input, template: template, selectors: selectors ? selectors : input, motivation: motivation, fingerprint: { scope: scope, path: path, created: new Date().toISOString() } }
});

@@ -95,2 +98,6 @@ dispatch(selectDraft(scope, id));

function importDraft(id, draft) {
return { type: DRAFT_IMPORT, payload: draft };
}
function confirmDraft(scope) {

@@ -97,0 +104,0 @@ return { type: DRAFT_CONFIRM, payload: { scope: scope } };

@@ -65,2 +65,3 @@ 'use strict';

var currentSelector = state.selector && state.selector.currentSelector ? state.selector.currentSelector : null;
var treeRoute = props.tree && state.resource.currentPaths ? state.resource.currentPaths[props.tree] : null;

@@ -85,4 +86,6 @@ // @todo move to query.

state: state,
treeRoute: treeRoute,
currentSelector: currentSelector,
currentDraft: currentDraft,
currentDrafts: state.drafts.currentDrafts,
currentResource: currentResource,

@@ -123,2 +126,4 @@ isSelecting: (0, _selectorQuery.isSelecting)(state),

}), {
selectScopedDraft: _drafts.selectDraft,
importDraft: _drafts.importDraft,
commitToCurrentDraft: _selectors.commitToCurrentDraft,

@@ -125,0 +130,0 @@ commitToCurrentDraftField: _selectors.commitToCurrentDraftField,

@@ -34,3 +34,8 @@ 'use strict';

isPreviewing: draft.isPreviewing || false,
selector: draft.selector || null
selector: draft.selector || null,
fingerprint: draft.fingerprint ? draft.fingerprint : {
scope: draft.template,
path: [],
unstable: true
}
};

@@ -47,2 +52,3 @@ }

case _drafts.DRAFT_CREATE:
case _drafts.DRAFT_IMPORT:
return (0, _immutabilityHelper2.default)(state, {

@@ -49,0 +55,0 @@ list: (_list = {}, _list[action.payload.id] = {

{
"name": "digirati-annotation-redux",
"version": "0.8.13",
"version": "0.8.16",
"description": "Describe annotation-redux here",

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

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