@files-stack/client-core
Advanced tools
Comparing version 0.0.27-4 to 0.0.27-5
@@ -1,3 +0,3 @@ | ||
export declare const addEditorHistory: (editorWrappers: any, editorId: any, resource: any) => any[]; | ||
export declare const removeEditorHistory: (editorWrappers: any, editorId: any, resource: any) => any[]; | ||
export declare const addEditorHistory: (editorWrappers: any, editorId: any, resource: any, name: any) => any[]; | ||
export declare const removeEditorHistory: (editorWrappers: any, editorId: any, resource: any, name: any) => any[]; | ||
export declare const getLastEditorHistory: (editorWrappers: any, editorId: any) => any; |
@@ -121,16 +121,16 @@ module.exports = | ||
const ramda_1 = __webpack_require__(5); | ||
exports.addEditorHistory = (editorWrappers, editorId, resource) => { | ||
exports.addEditorHistory = (editorWrappers, editorId, resource, name) => { | ||
const index = ramda_1.findIndex(ramda_1.propEq('editorId', editorId))(editorWrappers); | ||
if (index !== -1) { | ||
const editorHistory = editorWrappers[index].history || []; | ||
const history = ramda_1.filter(item => item !== resource, editorHistory); | ||
editorWrappers[index].history = [...history, resource]; | ||
const history = ramda_1.filter(item => item.resource !== resource || (item.resource === resource && item.name !== name), editorHistory); | ||
editorWrappers[index].history = [...history, { resource, name }]; | ||
} | ||
return [...editorWrappers]; | ||
}; | ||
exports.removeEditorHistory = (editorWrappers, editorId, resource) => { | ||
exports.removeEditorHistory = (editorWrappers, editorId, resource, name) => { | ||
const index = ramda_1.findIndex(ramda_1.propEq('editorId', editorId))(editorWrappers); | ||
if (index !== -1) { | ||
const editorHistory = editorWrappers[index].history || []; | ||
const history = ramda_1.filter(item => item !== resource, editorHistory); | ||
const history = ramda_1.filter(item => item.resource !== resource || (item.resource === resource && item.name !== name), editorHistory); | ||
editorWrappers[index].history = history; | ||
@@ -137,0 +137,0 @@ } |
@@ -32,3 +32,2 @@ import { ICoreBaseStat, ICoreFileStat } from '@files-stack/core'; | ||
allSave?: boolean; | ||
subscribe?: any; | ||
} | ||
@@ -35,0 +34,0 @@ export interface IFileExpand { |
{ | ||
"name": "@files-stack/client-core", | ||
"version": "0.0.27-4", | ||
"version": "0.0.27-5", | ||
"description": "xterm server services for Node", | ||
@@ -51,3 +51,3 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@files-stack/utils": "^0.0.27-4", | ||
"@files-stack/utils": "^0.0.27-5", | ||
"cross-env": "^5.1.3", | ||
@@ -59,3 +59,3 @@ "jest": "^22.1.0", | ||
"dependencies": { | ||
"@files-stack/core": "^0.0.27-4" | ||
"@files-stack/core": "^0.0.27-5" | ||
}, | ||
@@ -62,0 +62,0 @@ "typings": "lib/index.d.ts", |
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
28807
347
Updated@files-stack/core@^0.0.27-5