@files-stack/client-redux
Advanced tools
Comparing version 0.0.13 to 0.0.14
@@ -25,2 +25,3 @@ import * as actionTypes from './types'; | ||
deleted?: boolean; | ||
addIgnore?: string; | ||
}) | ({ | ||
@@ -64,3 +65,3 @@ type: actionTypes.MUTATE_FILES; | ||
export declare const selectFileAction: (fileStat: IFileStat) => Action; | ||
export declare const openFileAction: (resource: string, selectedName: string, oldValue?: string, deleted?: boolean) => Action; | ||
export declare const openFileAction: (resource: string, selectedName: string, oldValue?: string, deleted?: boolean, addIgnore?: string) => Action; | ||
export declare const resetMutateAction: () => Action; | ||
@@ -67,0 +68,0 @@ export declare const completeMutateAction: () => Action; |
@@ -253,2 +253,3 @@ module.exports = | ||
deleted: action.deleted, | ||
addIgnore: action.addIgnore, | ||
}); | ||
@@ -262,4 +263,14 @@ case actionTypes.ADD_EDIT: | ||
if (index === -1) { | ||
let newValue; | ||
if (!state.deleted && action.content && !state.addIgnore) { | ||
newValue = action.content.value; | ||
} | ||
if (state.deleted && action.content || !action.content) { | ||
newValue = ''; | ||
} | ||
if (!state.deleted && action.content && state.addIgnore) { | ||
newValue = action.content.value.concat(`\n\n${state.addIgnore}`); | ||
} | ||
opening.push(Object.assign({}, action.content, { | ||
newValue: !state.deleted && action.content ? action.content.value : '', | ||
newValue, | ||
oldValue: state.oldValue, | ||
@@ -281,2 +292,3 @@ name: state.selectedName, | ||
oldValue: '', | ||
addIgnore: '', | ||
}); | ||
@@ -368,4 +380,4 @@ case actionTypes.REMOVE_EDIT: | ||
}); | ||
exports.openFileAction = (resource, selectedName, oldValue, deleted) => ({ | ||
type: actionTypes.OPEN_FILE, resource, selectedName, oldValue, deleted, | ||
exports.openFileAction = (resource, selectedName, oldValue, deleted, addIgnore) => ({ | ||
type: actionTypes.OPEN_FILE, resource, selectedName, oldValue, deleted, addIgnore, | ||
}); | ||
@@ -372,0 +384,0 @@ exports.resetMutateAction = () => ({ |
@@ -27,2 +27,3 @@ export { Store } from './Store'; | ||
deleted?: boolean; | ||
addIgnore?: string; | ||
} | { | ||
@@ -83,2 +84,3 @@ type: "@@files-stack/MUTATE_FILES"; | ||
deleted?: boolean; | ||
addIgnore?: string; | ||
} | { | ||
@@ -139,2 +141,3 @@ type: "@@files-stack/MUTATE_FILES"; | ||
deleted?: boolean; | ||
addIgnore?: string; | ||
} | { | ||
@@ -195,2 +198,3 @@ type: "@@files-stack/MUTATE_FILES"; | ||
deleted?: boolean; | ||
addIgnore?: string; | ||
} | { | ||
@@ -251,2 +255,3 @@ type: "@@files-stack/MUTATE_FILES"; | ||
deleted?: boolean; | ||
addIgnore?: string; | ||
} | { | ||
@@ -307,2 +312,3 @@ type: "@@files-stack/MUTATE_FILES"; | ||
deleted?: boolean; | ||
addIgnore?: string; | ||
} | { | ||
@@ -309,0 +315,0 @@ type: "@@files-stack/MUTATE_FILES"; |
{ | ||
"name": "@files-stack/client-redux", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"description": "Files Redux consists of reducers and actions", | ||
@@ -53,4 +53,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@files-stack/client-core": "^0.0.13", | ||
"@files-stack/core": "^0.0.13" | ||
"@files-stack/client-core": "^0.0.14", | ||
"@files-stack/core": "^0.0.14" | ||
}, | ||
@@ -57,0 +57,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62676
905
+ Added@files-stack/client-core@0.0.14(transitive)
+ Added@files-stack/core@0.0.14(transitive)
- Removed@files-stack/client-core@0.0.13(transitive)
- Removed@files-stack/core@0.0.13(transitive)
Updated@files-stack/core@^0.0.14