easy-file-system 2.1.257 → 2.1.260
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 +370 -777
- package/lib/button/toggle.js +11 -24
- package/lib/div/item/entry/drag/directoryName.js +11 -25
- package/lib/div/item/entry/drag/fileName.js +11 -24
- package/lib/div/item/entry/drag.js +11 -25
- package/lib/div/item/entry/marker.js +11 -24
- package/lib/div/item/entry.js +11 -24
- package/lib/example/view/explorer/first.js +11 -24
- package/lib/example/view/explorer/second.js +11 -24
- package/lib/example/view/rubbishBin.js +11 -24
- package/lib/example/view.js +19 -41
- package/lib/explorer.js +13 -28
- package/lib/item/entry/drag/directoryName.js +12 -27
- package/lib/item/entry/drag/fileName.js +11 -24
- package/lib/item/entry/drag.js +24 -35
- package/lib/item/entry/marker/directoryName.js +11 -24
- package/lib/item/entry/marker/fileName.js +11 -24
- package/lib/item/entry/marker.js +11 -24
- package/lib/item/entry.js +11 -24
- package/lib/list/entries.js +11 -24
- package/lib/rubbishBin.js +13 -28
- package/lib/span/name.js +37 -28
- package/lib/svg/directoryName.js +11 -24
- package/lib/svg/fileName.js +11 -24
- package/lib/svg/marker.js +11 -24
- package/lib/svg/rubbishBin/closed.js +11 -24
- package/lib/svg/rubbishBin/open.js +11 -24
- package/lib/svg/toggle/down.js +11 -24
- package/lib/svg/toggle/up.js +11 -24
- package/lib/svg.js +11 -24
- package/package.json +2 -2
- package/src/item/entry/drag.js +11 -4
- package/src/span/name.js +25 -4
package/src/span/name.js
CHANGED
|
@@ -63,6 +63,8 @@ class NameSpan extends Element {
|
|
|
63
63
|
|
|
64
64
|
this.addAttribute(CONTENT_EDITABLE, TRUE);
|
|
65
65
|
|
|
66
|
+
this.onKeyDown(this.keyDownHandler);
|
|
67
|
+
|
|
66
68
|
const html = this.html(),
|
|
67
69
|
range = document.createRange(),
|
|
68
70
|
selection = window.getSelection(),
|
|
@@ -79,8 +81,6 @@ class NameSpan extends Element {
|
|
|
79
81
|
selection.removeAllRanges();
|
|
80
82
|
|
|
81
83
|
selection.addRange(range);
|
|
82
|
-
|
|
83
|
-
this.onKeyDown(this.keyDownHandler);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
reset() {
|
|
@@ -89,14 +89,35 @@ class NameSpan extends Element {
|
|
|
89
89
|
this.removeAttribute(CONTENT_EDITABLE, TRUE);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
isEditable() {
|
|
93
|
+
const contentEditableAttribute = this.hasAttribute(CONTENT_EDITABLE),
|
|
94
|
+
editable = contentEditableAttribute; ///
|
|
95
|
+
|
|
96
|
+
return editable;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
didMount() {
|
|
100
|
+
///
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
willUnmount() {
|
|
104
|
+
const editable = this.isEditable();
|
|
105
|
+
|
|
106
|
+
if (editable) {
|
|
107
|
+
const created = this.isCreated();
|
|
108
|
+
|
|
109
|
+
this.cancel(created);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
92
113
|
parentContext() {
|
|
93
114
|
const editNameSpan = this.edit.bind(this), ///
|
|
94
115
|
resetNameSpan = this.reset.bind(this), ///
|
|
95
116
|
getNameSpanName = this.getName.bind(this), ///
|
|
96
117
|
setNameSpanName = this.setName.bind(this), ///
|
|
97
118
|
onCustomNameSpanCancel = this.onCustomCancel.bind(this), ///
|
|
98
|
-
offCustomNameSpanCancel = this.offCustomCancel.bind(this), ///
|
|
99
119
|
onCustomNameSpanChange = this.onCustomChange.bind(this), ///
|
|
120
|
+
offCustomNameSpanCancel = this.offCustomCancel.bind(this), ///
|
|
100
121
|
offCustomNameSpanChange = this.offCustomChange.bind(this); ///
|
|
101
122
|
|
|
102
123
|
return ({
|
|
@@ -105,8 +126,8 @@ class NameSpan extends Element {
|
|
|
105
126
|
getNameSpanName,
|
|
106
127
|
setNameSpanName,
|
|
107
128
|
onCustomNameSpanCancel,
|
|
108
|
-
offCustomNameSpanCancel,
|
|
109
129
|
onCustomNameSpanChange,
|
|
130
|
+
offCustomNameSpanCancel,
|
|
110
131
|
offCustomNameSpanChange
|
|
111
132
|
});
|
|
112
133
|
}
|