easy-file-system 1.5.6 → 1.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/example.js +2476 -1320
- package/lib/button/name.js +35 -1
- package/lib/constants.js +13 -4
- package/lib/div/item/entry/directoryName.js +19 -10
- package/lib/div/item/entry/fileName.js +17 -9
- package/lib/div/item/entry.js +8 -1
- package/lib/eventTypes.js +7 -2
- package/lib/example/view/button/editSelected.js +157 -0
- package/lib/example/view/explorer/first.js +158 -0
- package/lib/example/view/explorer/second.js +160 -0
- package/lib/example/view/rubbishBin.js +111 -0
- package/lib/example/view.js +71 -45
- package/lib/explorer.js +3 -78
- package/lib/index.js +7 -3
- package/lib/input/name.js +300 -0
- package/lib/item/entry/drag/directoryName.js +8 -6
- package/lib/item/entry/drag/fileName.js +10 -8
- package/lib/item/entry/drag.js +57 -15
- package/lib/keyCodes.js +22 -0
- package/lib/list/entries.js +16 -2
- package/lib/mixins/event.js +99 -0
- package/lib/styles.js +1 -5
- package/package.json +1 -1
- package/src/button/name.js +34 -0
- package/src/constants.js +1 -0
- package/src/div/item/entry/directoryName.js +23 -16
- package/src/div/item/entry/fileName.js +20 -14
- package/src/div/item/entry.js +7 -0
- package/src/eventTypes.js +3 -1
- package/src/example/view/button/editSelected.js +23 -0
- package/src/example/view/explorer/first.js +18 -0
- package/src/example/view/explorer/second.js +18 -0
- package/src/example/view/rubbishBin.js +9 -0
- package/src/example/view.js +53 -41
- package/src/explorer.js +2 -83
- package/src/index.js +1 -0
- package/src/input/name.js +90 -0
- package/src/item/entry/drag/directoryName.js +5 -4
- package/src/item/entry/drag/fileName.js +10 -6
- package/src/item/entry/drag.js +77 -23
- package/src/keyCodes.js +4 -0
- package/src/list/entries.js +16 -0
- package/src/mixins/event.js +140 -0
- package/src/styles.js +0 -1
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return SecondExplorer;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _index = require("../../../index");
|
|
12
|
+
function _assertThisInitialized(self) {
|
|
13
|
+
if (self === void 0) {
|
|
14
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
15
|
+
}
|
|
16
|
+
return self;
|
|
17
|
+
}
|
|
18
|
+
function _classCallCheck(instance, Constructor) {
|
|
19
|
+
if (!(instance instanceof Constructor)) {
|
|
20
|
+
throw new TypeError("Cannot call a class as a function");
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function _defineProperties(target, props) {
|
|
24
|
+
for(var i = 0; i < props.length; i++){
|
|
25
|
+
var descriptor = props[i];
|
|
26
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
27
|
+
descriptor.configurable = true;
|
|
28
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
29
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
33
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
34
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
35
|
+
return Constructor;
|
|
36
|
+
}
|
|
37
|
+
function _defineProperty(obj, key, value) {
|
|
38
|
+
if (key in obj) {
|
|
39
|
+
Object.defineProperty(obj, key, {
|
|
40
|
+
value: value,
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true,
|
|
43
|
+
writable: true
|
|
44
|
+
});
|
|
45
|
+
} else {
|
|
46
|
+
obj[key] = value;
|
|
47
|
+
}
|
|
48
|
+
return obj;
|
|
49
|
+
}
|
|
50
|
+
function _get(target, property, receiver) {
|
|
51
|
+
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
52
|
+
_get = Reflect.get;
|
|
53
|
+
} else {
|
|
54
|
+
_get = function _get(target, property, receiver) {
|
|
55
|
+
var base = _superPropBase(target, property);
|
|
56
|
+
if (!base) return;
|
|
57
|
+
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
58
|
+
if (desc.get) {
|
|
59
|
+
return desc.get.call(receiver);
|
|
60
|
+
}
|
|
61
|
+
return desc.value;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
return _get(target, property, receiver || target);
|
|
65
|
+
}
|
|
66
|
+
function _getPrototypeOf(o) {
|
|
67
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
68
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
69
|
+
};
|
|
70
|
+
return _getPrototypeOf(o);
|
|
71
|
+
}
|
|
72
|
+
function _inherits(subClass, superClass) {
|
|
73
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
74
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
75
|
+
}
|
|
76
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
77
|
+
constructor: {
|
|
78
|
+
value: subClass,
|
|
79
|
+
writable: true,
|
|
80
|
+
configurable: true
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
84
|
+
}
|
|
85
|
+
function _possibleConstructorReturn(self, call) {
|
|
86
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
87
|
+
return call;
|
|
88
|
+
}
|
|
89
|
+
return _assertThisInitialized(self);
|
|
90
|
+
}
|
|
91
|
+
function _setPrototypeOf(o, p) {
|
|
92
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
93
|
+
o.__proto__ = p;
|
|
94
|
+
return o;
|
|
95
|
+
};
|
|
96
|
+
return _setPrototypeOf(o, p);
|
|
97
|
+
}
|
|
98
|
+
function _superPropBase(object, property) {
|
|
99
|
+
while(!Object.prototype.hasOwnProperty.call(object, property)){
|
|
100
|
+
object = _getPrototypeOf(object);
|
|
101
|
+
if (object === null) break;
|
|
102
|
+
}
|
|
103
|
+
return object;
|
|
104
|
+
}
|
|
105
|
+
var _typeof = function(obj) {
|
|
106
|
+
"@swc/helpers - typeof";
|
|
107
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
108
|
+
};
|
|
109
|
+
function _isNativeReflectConstruct() {
|
|
110
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
111
|
+
if (Reflect.construct.sham) return false;
|
|
112
|
+
if (typeof Proxy === "function") return true;
|
|
113
|
+
try {
|
|
114
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
115
|
+
return true;
|
|
116
|
+
} catch (e) {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function _createSuper(Derived) {
|
|
121
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
122
|
+
return function _createSuperInternal() {
|
|
123
|
+
var Super = _getPrototypeOf(Derived), result;
|
|
124
|
+
if (hasNativeReflectConstruct) {
|
|
125
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
126
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
127
|
+
} else {
|
|
128
|
+
result = Super.apply(this, arguments);
|
|
129
|
+
}
|
|
130
|
+
return _possibleConstructorReturn(this, result);
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
var SecondExplorer = /*#__PURE__*/ function(Explorer) {
|
|
134
|
+
_inherits(SecondExplorer, Explorer);
|
|
135
|
+
var _super = _createSuper(SecondExplorer);
|
|
136
|
+
function SecondExplorer() {
|
|
137
|
+
_classCallCheck(this, SecondExplorer);
|
|
138
|
+
return _super.apply(this, arguments);
|
|
139
|
+
}
|
|
140
|
+
_createClass(SecondExplorer, [
|
|
141
|
+
{
|
|
142
|
+
key: "initialise",
|
|
143
|
+
value: function initialise() {
|
|
144
|
+
_get(_getPrototypeOf(SecondExplorer.prototype), "initialise", this).call(this);
|
|
145
|
+
this.addFilePath("directory2/file4.txt");
|
|
146
|
+
this.addFilePath("directory2/directory3/file5.txt");
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
]);
|
|
150
|
+
return SecondExplorer;
|
|
151
|
+
}(_index.Explorer);
|
|
152
|
+
_defineProperty(SecondExplorer, "defaultProperties", {
|
|
153
|
+
className: "first",
|
|
154
|
+
reference: "second-explorer",
|
|
155
|
+
ignoredReferences: [
|
|
156
|
+
"first-explorer"
|
|
157
|
+
]
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9leGFtcGxlL3ZpZXcvZXhwbG9yZXIvc2Vjb25kLmpzIiwiPDxqc3gtY29uZmlnLXByYWdtYS5qcz4+Il0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5pbXBvcnQgeyBFeHBsb3JlciB9IGZyb20gXCIuLi8uLi8uLi9pbmRleFwiOyAgLy8vXG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFNlY29uZEV4cGxvcmVyIGV4dGVuZHMgRXhwbG9yZXIge1xuICBpbml0aWFsaXNlKCkge1xuICAgIHN1cGVyLmluaXRpYWxpc2UoKTtcblxuICAgIHRoaXMuYWRkRmlsZVBhdGgoXCJkaXJlY3RvcnkyL2ZpbGU0LnR4dFwiKTtcbiAgICB0aGlzLmFkZEZpbGVQYXRoKFwiZGlyZWN0b3J5Mi9kaXJlY3RvcnkzL2ZpbGU1LnR4dFwiKTtcbiAgfVxuXG4gIHN0YXRpYyBkZWZhdWx0UHJvcGVydGllcyA9IHtcbiAgICBjbGFzc05hbWU6IFwiZmlyc3RcIixcbiAgICByZWZlcmVuY2U6IFwic2Vjb25kLWV4cGxvcmVyX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|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _class;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _index = require("../../index");
|
|
12
|
+
function _assertThisInitialized(self) {
|
|
13
|
+
if (self === void 0) {
|
|
14
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
15
|
+
}
|
|
16
|
+
return self;
|
|
17
|
+
}
|
|
18
|
+
function _classCallCheck(instance, Constructor) {
|
|
19
|
+
if (!(instance instanceof Constructor)) {
|
|
20
|
+
throw new TypeError("Cannot call a class as a function");
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function _defineProperty(obj, key, value) {
|
|
24
|
+
if (key in obj) {
|
|
25
|
+
Object.defineProperty(obj, key, {
|
|
26
|
+
value: value,
|
|
27
|
+
enumerable: true,
|
|
28
|
+
configurable: true,
|
|
29
|
+
writable: true
|
|
30
|
+
});
|
|
31
|
+
} else {
|
|
32
|
+
obj[key] = value;
|
|
33
|
+
}
|
|
34
|
+
return obj;
|
|
35
|
+
}
|
|
36
|
+
function _getPrototypeOf(o) {
|
|
37
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
38
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
39
|
+
};
|
|
40
|
+
return _getPrototypeOf(o);
|
|
41
|
+
}
|
|
42
|
+
function _inherits(subClass, superClass) {
|
|
43
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
44
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
45
|
+
}
|
|
46
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
47
|
+
constructor: {
|
|
48
|
+
value: subClass,
|
|
49
|
+
writable: true,
|
|
50
|
+
configurable: true
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
54
|
+
}
|
|
55
|
+
function _possibleConstructorReturn(self, call) {
|
|
56
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
57
|
+
return call;
|
|
58
|
+
}
|
|
59
|
+
return _assertThisInitialized(self);
|
|
60
|
+
}
|
|
61
|
+
function _setPrototypeOf(o, p) {
|
|
62
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
63
|
+
o.__proto__ = p;
|
|
64
|
+
return o;
|
|
65
|
+
};
|
|
66
|
+
return _setPrototypeOf(o, p);
|
|
67
|
+
}
|
|
68
|
+
var _typeof = function(obj) {
|
|
69
|
+
"@swc/helpers - typeof";
|
|
70
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
71
|
+
};
|
|
72
|
+
function _isNativeReflectConstruct() {
|
|
73
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
74
|
+
if (Reflect.construct.sham) return false;
|
|
75
|
+
if (typeof Proxy === "function") return true;
|
|
76
|
+
try {
|
|
77
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
78
|
+
return true;
|
|
79
|
+
} catch (e) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function _createSuper(Derived) {
|
|
84
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
85
|
+
return function _createSuperInternal() {
|
|
86
|
+
var Super = _getPrototypeOf(Derived), result;
|
|
87
|
+
if (hasNativeReflectConstruct) {
|
|
88
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
89
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
90
|
+
} else {
|
|
91
|
+
result = Super.apply(this, arguments);
|
|
92
|
+
}
|
|
93
|
+
return _possibleConstructorReturn(this, result);
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
var _class = /*#__PURE__*/ function(RubbishBin) {
|
|
97
|
+
_inherits(_class, RubbishBin);
|
|
98
|
+
var _super = _createSuper(_class);
|
|
99
|
+
function _class() {
|
|
100
|
+
_classCallCheck(this, _class);
|
|
101
|
+
return _super.apply(this, arguments);
|
|
102
|
+
}
|
|
103
|
+
return _class;
|
|
104
|
+
}(_index.RubbishBin);
|
|
105
|
+
_defineProperty(_class, "defaultProperties", {
|
|
106
|
+
ignoredReferences: [
|
|
107
|
+
"second-explorer"
|
|
108
|
+
]
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9leGFtcGxlL3ZpZXcvcnViYmlzaEJpbi5qcyIsIjw8anN4LWNvbmZpZy1wcmFnbWEuanM+PiJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuaW1wb3J0IHsgUnViYmlzaEJpbiB9IGZyb20gXCIuLi8uLi9pbmRleFwiOyAvLy9cblxuZXhwb3J0IGRlZmF1bHQgY2xhc3MgZXh0ZW5kcyBSdWJiaXNoQmluIHtcbiAgc3RhdGljIGRlZmF1bHRQcm9wZXJ0aWVzID0ge1xuICAgIGlnbm9yZWRSZWZlcmVuY2VzOiBbIFwic2Vjb25kLWV4cGxvcmVyXCIgXVxuICB9O1xufVxuIiwiUmVhY3QuY3JlYXRlRWxlbWVudCJdLCJuYW1lcyI6WyJSdWJiaXNoQmluIiwiZGVmYXVsdFByb3BlcnRpZXMiLCJpZ25vcmVkUmVmZXJlbmNlcyJdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7cUJBRTJCOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBRVosSUFBQSx1QkFBQTs7Ozs7Ozs7RUFBY0EsaUJBQVU7QUFDckMsd0JBQU9DLHFCQUFvQjtJQUN6QkMsbUJBQW1CO1FBQUU7S0FBbUI7QUFDMUMifQ==
|
package/lib/example/view.js
CHANGED
|
@@ -9,7 +9,11 @@ Object.defineProperty(exports, "default", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
var _easy = require("easy");
|
|
12
|
-
var
|
|
12
|
+
var _necessary = require("necessary");
|
|
13
|
+
var _rubbishBin = /*#__PURE__*/ _interopRequireDefault(require("./view/rubbishBin"));
|
|
14
|
+
var _first = /*#__PURE__*/ _interopRequireDefault(require("./view/explorer/first"));
|
|
15
|
+
var _second = /*#__PURE__*/ _interopRequireDefault(require("./view/explorer/second"));
|
|
16
|
+
var _editSelected = /*#__PURE__*/ _interopRequireDefault(require("./view/button/editSelected"));
|
|
13
17
|
function _assertThisInitialized(self) {
|
|
14
18
|
if (self === void 0) {
|
|
15
19
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -95,6 +99,11 @@ function _inherits(subClass, superClass) {
|
|
|
95
99
|
});
|
|
96
100
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
97
101
|
}
|
|
102
|
+
function _interopRequireDefault(obj) {
|
|
103
|
+
return obj && obj.__esModule ? obj : {
|
|
104
|
+
default: obj
|
|
105
|
+
};
|
|
106
|
+
}
|
|
98
107
|
function _isNativeFunction(fn) {
|
|
99
108
|
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
100
109
|
}
|
|
@@ -165,50 +174,78 @@ function _createSuper(Derived) {
|
|
|
165
174
|
return _possibleConstructorReturn(this, result);
|
|
166
175
|
};
|
|
167
176
|
}
|
|
177
|
+
var first = _necessary.arrayUtilities.first, second = _necessary.arrayUtilities.second;
|
|
168
178
|
var View = /*#__PURE__*/ function(Element) {
|
|
169
179
|
_inherits(View, Element);
|
|
170
180
|
var _super = _createSuper(View);
|
|
171
181
|
function View() {
|
|
172
182
|
_classCallCheck(this, View);
|
|
173
|
-
|
|
183
|
+
var _this;
|
|
184
|
+
_this = _super.apply(this, arguments);
|
|
185
|
+
_defineProperty(_assertThisInitialized(_this), "clickHandler", function(event, element) {
|
|
186
|
+
var firstExplorer = _this.getFirstExplorer(), secondExplorer = _this.getSecondExplorer();
|
|
187
|
+
firstExplorer.editSelectedPath();
|
|
188
|
+
secondExplorer.editSelectedPath();
|
|
189
|
+
});
|
|
190
|
+
_defineProperty(_assertThisInitialized(_this), "openHandler", function(filePath) {
|
|
191
|
+
console.log("open", filePath);
|
|
192
|
+
});
|
|
193
|
+
_defineProperty(_assertThisInitialized(_this), "moveHandler", function(pathMaps, done) {
|
|
194
|
+
console.log("move", JSON.stringify(pathMaps, null, " "));
|
|
195
|
+
done();
|
|
196
|
+
});
|
|
197
|
+
_defineProperty(_assertThisInitialized(_this), "removeHandler", function(pathMaps, done) {
|
|
198
|
+
console.log("remove", JSON.stringify(pathMaps, null, " "));
|
|
199
|
+
done();
|
|
200
|
+
});
|
|
201
|
+
_defineProperty(_assertThisInitialized(_this), "pathChangeHandler", function(path, callback) {
|
|
202
|
+
var success = true;
|
|
203
|
+
callback(success);
|
|
204
|
+
});
|
|
205
|
+
return _this;
|
|
174
206
|
}
|
|
175
207
|
_createClass(View, [
|
|
208
|
+
{
|
|
209
|
+
key: "getExplorers",
|
|
210
|
+
value: function getExplorers() {
|
|
211
|
+
var explorerDivChildElements = this.getChildElements("div.explorer"), explorers = explorerDivChildElements; ///
|
|
212
|
+
return explorers;
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
key: "getFirstExplorer",
|
|
217
|
+
value: function getFirstExplorer() {
|
|
218
|
+
var explorers = this.getExplorers(), firstExplorer = first(explorers);
|
|
219
|
+
return firstExplorer;
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
key: "getSecondExplorer",
|
|
224
|
+
value: function getSecondExplorer() {
|
|
225
|
+
var explorers = this.getExplorers(), secondExplorer = second(explorers);
|
|
226
|
+
return secondExplorer;
|
|
227
|
+
}
|
|
228
|
+
},
|
|
176
229
|
{
|
|
177
230
|
key: "childElements",
|
|
178
231
|
value: function childElements() {
|
|
179
|
-
var explorer1 = /*#__PURE__*/ React.createElement(_index.Explorer, {
|
|
180
|
-
onMove: moveHandler,
|
|
181
|
-
onOpen: openHandler,
|
|
182
|
-
reference: "explorer-1"
|
|
183
|
-
}), explorer2 = /*#__PURE__*/ React.createElement(_index.Explorer, {
|
|
184
|
-
onMove: moveHandler,
|
|
185
|
-
onOpen: openHandler,
|
|
186
|
-
reference: "explorer-2",
|
|
187
|
-
ignoredReferences: [
|
|
188
|
-
"explorer-1"
|
|
189
|
-
]
|
|
190
|
-
});
|
|
191
|
-
explorer1.addFilePath("directory1/file1.txt");
|
|
192
|
-
explorer1.addFilePath("directory1/file2.txt");
|
|
193
|
-
explorer1.addFilePath("directory1/file3.txt");
|
|
194
|
-
explorer2.addFilePath("directory2/file4.txt");
|
|
195
|
-
explorer2.addFilePath("directory2/directory3/file5.txt");
|
|
196
|
-
explorer2.removeFilePath("directory2/directory3/file4.txt", true);
|
|
197
|
-
explorer1.onSelect(function(path, selected) {
|
|
198
|
-
explorer2.deselectAllPaths();
|
|
199
|
-
});
|
|
200
|
-
explorer2.onSelect(function(path, selected) {
|
|
201
|
-
explorer1.deselectAllPaths();
|
|
202
|
-
});
|
|
203
232
|
return [
|
|
204
|
-
/*#__PURE__*/ React.createElement(
|
|
205
|
-
onRemove: removeHandler
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
233
|
+
/*#__PURE__*/ React.createElement(_rubbishBin.default, {
|
|
234
|
+
onRemove: this.removeHandler
|
|
235
|
+
}),
|
|
236
|
+
/*#__PURE__*/ React.createElement(_first.default, {
|
|
237
|
+
onMove: this.moveHandler,
|
|
238
|
+
onOpen: this.openHandler,
|
|
239
|
+
onPathChange: this.pathChangeHandler
|
|
209
240
|
}),
|
|
210
|
-
|
|
211
|
-
|
|
241
|
+
/*#__PURE__*/ React.createElement(_second.default, {
|
|
242
|
+
onMove: this.moveHandler,
|
|
243
|
+
onOpen: this.openHandler,
|
|
244
|
+
onPathChange: this.pathChangeHandler
|
|
245
|
+
}),
|
|
246
|
+
/*#__PURE__*/ React.createElement(_editSelected.default, {
|
|
247
|
+
onClick: this.clickHandler
|
|
248
|
+
})
|
|
212
249
|
];
|
|
213
250
|
}
|
|
214
251
|
}
|
|
@@ -219,16 +256,5 @@ _defineProperty(View, "tagName", "div");
|
|
|
219
256
|
_defineProperty(View, "defaultProperties", {
|
|
220
257
|
className: "view"
|
|
221
258
|
});
|
|
222
|
-
function openHandler(filePath) {
|
|
223
|
-
console.log("open", filePath);
|
|
224
|
-
}
|
|
225
|
-
function moveHandler(pathMaps, done) {
|
|
226
|
-
console.log("move", JSON.stringify(pathMaps, null, " "));
|
|
227
|
-
done();
|
|
228
|
-
}
|
|
229
|
-
function removeHandler(pathMaps, done) {
|
|
230
|
-
console.log("remove", JSON.stringify(pathMaps, null, " "));
|
|
231
|
-
done();
|
|
232
|
-
}
|
|
233
259
|
|
|
234
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
260
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9leGFtcGxlL3ZpZXcuanMiLCI8PGpzeC1jb25maWctcHJhZ21hLmpzPj4iXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5cbmltcG9ydCB7IEVsZW1lbnQgfSBmcm9tIFwiZWFzeVwiO1xuaW1wb3J0IHsgYXJyYXlVdGlsaXRpZXMgfSBmcm9tIFwibmVjZXNzYXJ5XCI7XG5cbmltcG9ydCBSdWJiaXNoQmluIGZyb20gXCIuL3ZpZXcvcnViYmlzaEJpblwiO1xuaW1wb3J0IEZpcnN0RXhwbG9yZXIgZnJvbSBcIi4vdmlldy9leHBsb3Jlci9maXJzdFwiO1xuaW1wb3J0IFNlY29uZEV4cGxvcmVyIGZyb20gXCIuL3ZpZXcvZXhwbG9yZXIvc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