Socket
Socket
Sign inDemoInstall

@files-stack/client-redux

Package Overview
Dependencies
Maintainers
1
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@files-stack/client-redux - npm Package Compare versions

Comparing version 0.0.27-15 to 0.0.28-0

11

lib/actions/edit-actions.d.ts

@@ -14,3 +14,2 @@ import * as actionTypes from './types';

type: actionTypes.CHANGE_EDIT;
newValue: string;
changed: boolean;

@@ -36,4 +35,10 @@ }) | ({

}) | ({
type: actionTypes.CHANGE_EDITOR_SUBSCRIBES;
editorSubscribes: string[];
}) | ({
type: actionTypes.UPDATE_EDITOR_CONTENT;
content: IContent;
}) | ({
type: actionTypes.UPDATE_EDITOR_SOURCE_CONTENT;
resource: string;
});

@@ -43,3 +48,3 @@ export declare const openFileAction: (content: IContent) => EditAction;

export declare const removeEditAction: (content: IContent) => EditAction;
export declare const changeEditAction: (newValue: string, changed: boolean) => EditAction;
export declare const changeEditAction: (changed: boolean) => EditAction;
export declare const activateEditorAction: (editorId: number) => EditAction;

@@ -51,2 +56,4 @@ export declare const updateEditorsHeightAction: (editorWrappers: any[]) => EditAction;

export declare const keepOpenAction: (content: IContent) => EditAction;
export declare const changeEditorSubscribesAction: (editorSubscribes: string[]) => EditAction;
export declare const updateEditorContentAction: (content: IContent) => EditAction;
export declare const updateEditorSourceContentAction: (resource: string) => EditAction;

4

lib/actions/files-actions.d.ts

@@ -50,5 +50,2 @@ import * as actionTypes from './types';

options: IFinderOptions;
}) | ({
type: actionTypes.CHANGE_EDITOR_SUBSCRIBES;
editorSubscribes: string[];
});

@@ -70,3 +67,2 @@ export declare const setRootpathAction: (rootpath: string) => FilesAction;

export declare const setRootExpandAction: (expand: boolean) => FilesAction;
export declare const changeEditorSubscribesAction: (editorSubscribes: string[]) => FilesAction;
export declare const setFinderOptionsAction: (options: IFinderOptions) => FilesAction;

@@ -59,1 +59,3 @@ export declare type SET_ROOTPATH = '@@files-stack/SET_ROOTPATH';

export declare const CHANGE_EDITOR_SUBSCRIBES: CHANGE_EDITOR_SUBSCRIBES;
export declare type UPDATE_EDITOR_SOURCE_CONTENT = '@@files-stack/UPDATE_EDITOR_SOURCE_CONTENT';
export declare const UPDATE_EDITOR_SOURCE_CONTENT: UPDATE_EDITOR_SOURCE_CONTENT;

@@ -103,2 +103,3 @@ module.exports =

exports.CHANGE_EDITOR_SUBSCRIBES = '@@files-stack/CHANGE_EDITOR_SUBSCRIBES';
exports.UPDATE_EDITOR_SOURCE_CONTENT = '@@files-stack/UPDATE_EDITOR_SOURCE_CONTENT';

@@ -285,10 +286,2 @@

}
function editorSubscribes(state = [], action) {
if (action.type === actionTypes.CHANGE_EDITOR_SUBSCRIBES) {
return [...action.editorSubscribes];
}
else {
return state;
}
}
const initialFinderOptions = {

@@ -317,3 +310,2 @@ lineNumber: -1,

'@files/treeData': treeData,
'@files/editorSubscribes': editorSubscribes,
'@files/finderOptions': finderOptions,

@@ -343,3 +335,2 @@ };

deleted: false,
allSave: false,
};

@@ -515,3 +506,3 @@ function edit(state = initialEditState, action) {

if (itemIndex !== -1) {
openingFiles[itemIndex] = Object.assign({}, openingFiles[itemIndex], { newValue: action.newValue, changed: action.changed });
openingFiles[itemIndex] = Object.assign({}, openingFiles[itemIndex], { changed: action.changed });
if (item.editorId === activeEditorFile.editorId) {

@@ -522,3 +513,4 @@ openingFiles[itemIndex]['preOpen'] = false;

});
return Object.assign({}, state, { openingFiles: [...openingFiles] });
editingFiles[index] = Object.assign({}, activeEditorFile, { changed: action.changed });
return Object.assign({}, state, { openingFiles: [...openingFiles], editingFiles: [...editingFiles] });
}

@@ -595,4 +587,2 @@ else {

return initialEditState;
case actionTypes.SAVE_ALL_EDITORS:
return Object.assign({}, state, { allSave: action.allSave });
default:

@@ -602,4 +592,31 @@ return state;

}
function allSave(state = false, action) {
if (action.type === actionTypes.SAVE_ALL_EDITORS) {
return action.allSave;
}
else {
return state;
}
}
function editorSubscribes(state = [], action) {
if (action.type === actionTypes.CHANGE_EDITOR_SUBSCRIBES) {
return [...action.editorSubscribes];
}
else {
return state;
}
}
function updatedEditorContentResource(state = '', action) {
if (action.type === actionTypes.UPDATE_EDITOR_SOURCE_CONTENT) {
return action.resource;
}
else {
return state;
}
}
exports.editReducers = {
'@files/edit': edit,
'@files/allSave': allSave,
'@files/editorSubscribes': editorSubscribes,
'@files/updatedEditorContentResource': updatedEditorContentResource,
};

@@ -691,5 +708,2 @@

});
exports.changeEditorSubscribesAction = (editorSubscribes) => ({
type: actionTypes.CHANGE_EDITOR_SUBSCRIBES, editorSubscribes,
});
exports.setFinderOptionsAction = (options) => ({

@@ -717,4 +731,4 @@ type: actionTypes.SET_FINDER_OPTIONS, options,

});
exports.changeEditAction = (newValue, changed) => ({
type: actionTypes.CHANGE_EDIT, newValue, changed,
exports.changeEditAction = (changed) => ({
type: actionTypes.CHANGE_EDIT, changed,
});

@@ -739,5 +753,11 @@ exports.activateEditorAction = (editorId) => ({

});
exports.changeEditorSubscribesAction = (editorSubscribes) => ({
type: actionTypes.CHANGE_EDITOR_SUBSCRIBES, editorSubscribes,
});
exports.updateEditorContentAction = (content) => ({
type: actionTypes.UPDATE_EDITOR_CONTENT, content,
});
exports.updateEditorSourceContentAction = (resource) => ({
type: actionTypes.UPDATE_EDITOR_SOURCE_CONTENT, resource,
});

@@ -744,0 +764,0 @@

@@ -5,2 +5,5 @@ import { IEdit } from '@files-stack/client-core';

'@files/edit': (state: IEdit, action: Action) => IEdit;
'@files/allSave': (state: boolean, action: Action) => boolean;
'@files/editorSubscribes': (state: any[], action: Action) => string[];
'@files/updatedEditorContentResource': (state: string, action: Action) => string;
};

@@ -14,4 +14,3 @@ import { IFilesMutate, IFileStat, INodeFileStat, IFinderOptions } from '@files-stack/client-core';

'@files/treeData': (state: any, action: Action) => any;
'@files/editorSubscribes': (state: any[], action: Action) => string[];
'@files/finderOptions': (state: IFinderOptions, action: Action) => IFinderOptions;
};

@@ -15,3 +15,2 @@ export { Store } from './Store';

type: "@@files-stack/CHANGE_EDIT";
newValue: string;
changed: boolean;

@@ -37,57 +36,132 @@ } | {

} | {
type: "@@files-stack/CHANGE_EDITOR_SUBSCRIBES";
editorSubscribes: string[];
} | {
type: "@@files-stack/UPDATE_EDITOR_CONTENT";
content: IContent;
} | {
type: "@@files-stack/UPDATE_EDITOR_SOURCE_CONTENT";
resource: string;
}) => IEdit;
'@files/selectedFile': (state: IFileStat, action: {
type: "@@files-stack/SET_ROOTPATH";
rootpath: string;
'@files/allSave': (state: boolean, action: {
type: "@@files-stack/OPEN_FILE";
content: IContent;
} | {
type: "@@files-stack/REFRESH_DIRECTORY";
type: "@@files-stack/REMOVE_EDIT";
content: IContent;
} | {
type: "@@files-stack/SELECT_FILE";
fileStat: IFileStat;
type: "@@files-stack/SELECT_EDIT";
content: IContent;
} | {
type: "@@files-stack/DRAG_OVER_FILE";
fileStat: IFileStat;
path: number[];
type: "@@files-stack/CHANGE_EDIT";
changed: boolean;
} | {
type: "@@files-stack/MUTATE_FILES";
mutation: string;
payload: any;
type: "@@files-stack/ACTIVATE_EDITOR";
editorId: number;
} | {
type: "@@files-stack/MUTATE_FILES_COMPLETE";
type: "@@files-stack/UPDATE_EDITORS_HEIGHT";
editorWrappers: any[];
} | {
type: "@@files-stack/MUTATE_FILES_RESET";
type: "@@files-stack/OPEN_MARKDOWN";
content: IContent;
previewEditorId: number;
} | {
type: "@@files-stack/NEW_FILE";
payload: any;
type: "@@files-stack/SAVE_ALL_EDITORS";
allSave: boolean;
} | {
type: "@@files-stack/NEW_FOLDER";
payload: any;
type: "@@files-stack/CLOSE_ALL_EDITORS";
} | {
type: "@@files-stack/TOGGLE_EDITORS_EXPAND";
expand: boolean;
type: "@@files-stack/KEEP_OPEN_EDITOR";
content: IContent;
} | {
type: "@@files-stack/ADD_SUBSCRIBE";
subscribe: any;
type: "@@files-stack/CHANGE_EDITOR_SUBSCRIBES";
editorSubscribes: string[];
} | {
type: "@@files-stack/SET_CREATING_FILE";
payload: any;
type: "@@files-stack/UPDATE_EDITOR_CONTENT";
content: IContent;
} | {
type: "@@files-stack/DESELECT_FILE";
type: "@@files-stack/UPDATE_EDITOR_SOURCE_CONTENT";
resource: string;
}) => boolean;
'@files/editorSubscribes': (state: any[], action: {
type: "@@files-stack/OPEN_FILE";
content: IContent;
} | {
type: "@@files-stack/SET_TREE_DATA";
treeData: any[];
type: "@@files-stack/REMOVE_EDIT";
content: IContent;
} | {
type: "@@files-stack/SET_ROOT_EXPAND";
expand: boolean;
type: "@@files-stack/SELECT_EDIT";
content: IContent;
} | {
type: "@@files-stack/SET_FINDER_OPTIONS";
options: IFinderOptions;
type: "@@files-stack/CHANGE_EDIT";
changed: boolean;
} | {
type: "@@files-stack/ACTIVATE_EDITOR";
editorId: number;
} | {
type: "@@files-stack/UPDATE_EDITORS_HEIGHT";
editorWrappers: any[];
} | {
type: "@@files-stack/OPEN_MARKDOWN";
content: IContent;
previewEditorId: number;
} | {
type: "@@files-stack/SAVE_ALL_EDITORS";
allSave: boolean;
} | {
type: "@@files-stack/CLOSE_ALL_EDITORS";
} | {
type: "@@files-stack/KEEP_OPEN_EDITOR";
content: IContent;
} | {
type: "@@files-stack/CHANGE_EDITOR_SUBSCRIBES";
editorSubscribes: string[];
}) => IFileStat;
'@files/rootpath': (state: string, action: {
} | {
type: "@@files-stack/UPDATE_EDITOR_CONTENT";
content: IContent;
} | {
type: "@@files-stack/UPDATE_EDITOR_SOURCE_CONTENT";
resource: string;
}) => string[];
'@files/updatedEditorContentResource': (state: string, action: {
type: "@@files-stack/OPEN_FILE";
content: IContent;
} | {
type: "@@files-stack/REMOVE_EDIT";
content: IContent;
} | {
type: "@@files-stack/SELECT_EDIT";
content: IContent;
} | {
type: "@@files-stack/CHANGE_EDIT";
changed: boolean;
} | {
type: "@@files-stack/ACTIVATE_EDITOR";
editorId: number;
} | {
type: "@@files-stack/UPDATE_EDITORS_HEIGHT";
editorWrappers: any[];
} | {
type: "@@files-stack/OPEN_MARKDOWN";
content: IContent;
previewEditorId: number;
} | {
type: "@@files-stack/SAVE_ALL_EDITORS";
allSave: boolean;
} | {
type: "@@files-stack/CLOSE_ALL_EDITORS";
} | {
type: "@@files-stack/KEEP_OPEN_EDITOR";
content: IContent;
} | {
type: "@@files-stack/CHANGE_EDITOR_SUBSCRIBES";
editorSubscribes: string[];
} | {
type: "@@files-stack/UPDATE_EDITOR_CONTENT";
content: IContent;
} | {
type: "@@files-stack/UPDATE_EDITOR_SOURCE_CONTENT";
resource: string;
}) => string;
'@files/selectedFile': (state: IFileStat, action: {
type: "@@files-stack/SET_ROOTPATH";

@@ -139,7 +213,4 @@ rootpath: string;

options: IFinderOptions;
} | {
type: "@@files-stack/CHANGE_EDITOR_SUBSCRIBES";
editorSubscribes: string[];
}) => string;
'@files/refresh': (state: number, action: {
}) => IFileStat;
'@files/rootpath': (state: string, action: {
type: "@@files-stack/SET_ROOTPATH";

@@ -191,7 +262,4 @@ rootpath: string;

options: IFinderOptions;
} | {
type: "@@files-stack/CHANGE_EDITOR_SUBSCRIBES";
editorSubscribes: string[];
}) => number;
'@files/mutate': (state: IFilesMutate, action: {
}) => string;
'@files/refresh': (state: number, action: {
type: "@@files-stack/SET_ROOTPATH";

@@ -243,7 +311,4 @@ rootpath: string;

options: IFinderOptions;
} | {
type: "@@files-stack/CHANGE_EDITOR_SUBSCRIBES";
editorSubscribes: string[];
}) => IFilesMutate;
'@files/dragOveredFile': (state: INodeFileStat, action: {
}) => number;
'@files/mutate': (state: IFilesMutate, action: {
type: "@@files-stack/SET_ROOTPATH";

@@ -295,7 +360,4 @@ rootpath: string;

options: IFinderOptions;
} | {
type: "@@files-stack/CHANGE_EDITOR_SUBSCRIBES";
editorSubscribes: string[];
}) => INodeFileStat;
'@files/editorsExpand': (state: boolean, action: {
}) => IFilesMutate;
'@files/dragOveredFile': (state: INodeFileStat, action: {
type: "@@files-stack/SET_ROOTPATH";

@@ -347,7 +409,4 @@ rootpath: string;

options: IFinderOptions;
} | {
type: "@@files-stack/CHANGE_EDITOR_SUBSCRIBES";
editorSubscribes: string[];
}) => boolean;
'@files/rootExpand': (state: boolean, action: {
}) => INodeFileStat;
'@files/editorsExpand': (state: boolean, action: {
type: "@@files-stack/SET_ROOTPATH";

@@ -399,7 +458,4 @@ rootpath: string;

options: IFinderOptions;
} | {
type: "@@files-stack/CHANGE_EDITOR_SUBSCRIBES";
editorSubscribes: string[];
}) => boolean;
'@files/subscriber': (state: any, action: {
'@files/rootExpand': (state: boolean, action: {
type: "@@files-stack/SET_ROOTPATH";

@@ -451,7 +507,4 @@ rootpath: string;

options: IFinderOptions;
} | {
type: "@@files-stack/CHANGE_EDITOR_SUBSCRIBES";
editorSubscribes: string[];
}) => any;
'@files/creatingFile': (state: any, action: {
}) => boolean;
'@files/subscriber': (state: any, action: {
type: "@@files-stack/SET_ROOTPATH";

@@ -503,7 +556,4 @@ rootpath: string;

options: IFinderOptions;
} | {
type: "@@files-stack/CHANGE_EDITOR_SUBSCRIBES";
editorSubscribes: string[];
}) => any;
'@files/treeData': (state: any, action: {
'@files/creatingFile': (state: any, action: {
type: "@@files-stack/SET_ROOTPATH";

@@ -555,7 +605,4 @@ rootpath: string;

options: IFinderOptions;
} | {
type: "@@files-stack/CHANGE_EDITOR_SUBSCRIBES";
editorSubscribes: string[];
}) => any;
'@files/editorSubscribes': (state: any[], action: {
'@files/treeData': (state: any, action: {
type: "@@files-stack/SET_ROOTPATH";

@@ -607,6 +654,3 @@ rootpath: string;

options: IFinderOptions;
} | {
type: "@@files-stack/CHANGE_EDITOR_SUBSCRIBES";
editorSubscribes: string[];
}) => string[];
}) => any;
'@files/finderOptions': (state: IFinderOptions, action: {

@@ -659,6 +703,3 @@ type: "@@files-stack/SET_ROOTPATH";

options: IFinderOptions;
} | {
type: "@@files-stack/CHANGE_EDITOR_SUBSCRIBES";
editorSubscribes: string[];
}) => IFinderOptions;
};
{
"name": "@files-stack/client-redux",
"version": "0.0.27-15",
"version": "0.0.28-0",
"description": "Files Redux consists of reducers and actions",

@@ -56,4 +56,4 @@ "main": "lib/index.js",

"dependencies": {
"@files-stack/client-core": "^0.0.27-15",
"@files-stack/core": "^0.0.27-15"
"@files-stack/client-core": "^0.0.28-0",
"@files-stack/core": "^0.0.28-0"
},

@@ -60,0 +60,0 @@ "peerDependencies": {

Sorry, the diff of this file is not supported yet

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