cavalion-vcl 1.1.67 → 1.1.68
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/.md +19 -3
- package/CHANGELOG.md +11 -2
- package/package.json +1 -1
- package/src/Control.js +34 -0
- package/src/ui/List.js +2 -1
- package/src/ui/Tab.js +8 -1
- package/src/ui/Tabs.js +15 -11
- package/src/ui/Tree.js +11 -6
package/.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
* [CHANGELOG.md]() - [README.md]() - [package.json]()
|
|
2
|
-
* [Workspace<vcl>](/Library/vcl-comps/devtools/Workspace$/vcl.js)
|
|
2
|
+
* [Workspace<vcl>](/Library/vcl-comps/devtools/Workspace$/vcl.js) - [.js]()
|
|
3
|
+
|
|
4
|
+
# `0728` Control.prototype.makeVisible
|
|
5
|
+
|
|
6
|
+
Been working on coding in Markdown documents, basically in order to be able print results in the workspace console. Therefore the method `p()` has been introduced. It cancels the behaviour of opening a document while linking a link. Instead it evaluates the code and print its result in the workspace console.
|
|
7
|
+
|
|
8
|
+
So, now we can do something like:
|
|
9
|
+
|
|
10
|
+
* ```[`123`](`${p(:)}`)``` ==> [`123`](`${p(:)}`) - check the console after clicking 123
|
|
11
|
+
|
|
12
|
+
However, the console doesn't show yet automatically. Therefore the method `Control.prototype.makeVisible` is introduced. It will call the method `Control.prototype.show` and travel up in the parent-hierarchy and call more in case necessary.
|
|
13
|
+
|
|
14
|
+
* makeVisible() already exists in vcl/ui/Tab.prototype.
|
|
3
15
|
|
|
4
16
|
# `0519` vcl/Factory `#CVLN-20220519-1`
|
|
5
17
|
|
|
@@ -57,8 +69,12 @@
|
|
|
57
69
|
* [Popup](src/ui/:.js) - [Ace](src/ui/:.js) - [Console](src/ui/:.js)
|
|
58
70
|
* [Form](src/ui/:.js) - [FormContainer](src/ui/:.js)
|
|
59
71
|
* [List](src/ui/:.js) | [ListColumn](src/ui/:.js) - [ListBody](src/ui/:.js) - [ListFooter](src/ui/:.js) - [ListHeader](src/ui/:.js) - [ListRow](src/ui/:.js)
|
|
60
|
-
* [
|
|
61
|
-
* [
|
|
72
|
+
* [Sizer](src/ui/:.js)
|
|
73
|
+
* [Tabs](src/ui/:.js)
|
|
74
|
+
* [Tab](src/ui/:.js)
|
|
75
|
+
* [Tree](src/ui/:.js)
|
|
76
|
+
* [Node](src/ui/:.js)
|
|
77
|
+
* [.closeable](src/ui/Node:.js)
|
|
62
78
|
|
|
63
79
|
|
|
64
80
|
# resources
|
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
### 2022/07/28 - 1.1.68
|
|
2
|
+
|
|
3
|
+
* 768156d - fixes an issue where the vertical scrollbar was not accesible on macOS
|
|
4
|
+
* cd60d4b - introduces new methods for vcl/Control:
|
|
5
|
+
* reflectStates,
|
|
6
|
+
* makeVisible and
|
|
7
|
+
* selectVisible
|
|
8
|
+
* cd60d4b - changing some css/rendering details for Tree and Node
|
|
9
|
+
|
|
10
|
+
### 2022/07/04 - 1.1.67
|
|
2
11
|
|
|
3
12
|
* 7dc04fb - adds Component.prototype.getTimeout
|
|
4
13
|
* 52bebc9 - introducing Query.prototype.error
|
|
5
14
|
* 18cd481 - destroying element upon remove (seems decent)
|
|
6
15
|
|
|
7
|
-
|
|
16
|
+
### 2022/06/27 - 1.1.66
|
|
8
17
|
|
|
9
18
|
* 07c6e83 - introducing onError event-property
|
|
10
19
|
|
package/package.json
CHANGED
package/src/Control.js
CHANGED
|
@@ -958,6 +958,25 @@ define(function(require) {
|
|
|
958
958
|
}
|
|
959
959
|
}
|
|
960
960
|
},
|
|
961
|
+
reflectStates: function(states) {
|
|
962
|
+
if(typeof states === "string") {
|
|
963
|
+
states = states.split(",").map(state => ControlState[state]);
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
states.forEach(state => {
|
|
967
|
+
switch(state) {
|
|
968
|
+
case ControlState.showing:
|
|
969
|
+
this.makeVisible();
|
|
970
|
+
break;
|
|
971
|
+
|
|
972
|
+
case ControlState.selected:
|
|
973
|
+
this.setSelected(true);
|
|
974
|
+
break;
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
})
|
|
978
|
+
|
|
979
|
+
},
|
|
961
980
|
|
|
962
981
|
// scrollIntoView: function() {
|
|
963
982
|
// this.nodeNeeded();
|
|
@@ -1084,6 +1103,21 @@ define(function(require) {
|
|
|
1084
1103
|
hide: function() {
|
|
1085
1104
|
this.setVisible(false);
|
|
1086
1105
|
},
|
|
1106
|
+
makeVisible: function(control) {
|
|
1107
|
+
var parent = this._parent;
|
|
1108
|
+
if(this._parent && !this._parent.isVisible()) {
|
|
1109
|
+
this._parent.makeVisible();
|
|
1110
|
+
this._parent.update(() => this.makeVisible());
|
|
1111
|
+
return;
|
|
1112
|
+
}
|
|
1113
|
+
if(!this.isVisible()) {
|
|
1114
|
+
this.show();
|
|
1115
|
+
}
|
|
1116
|
+
},
|
|
1117
|
+
selectVisible: function() {
|
|
1118
|
+
this.setSelected(true);
|
|
1119
|
+
this.makeVisible();
|
|
1120
|
+
},
|
|
1087
1121
|
|
|
1088
1122
|
allowsUpdateChildren: function() {
|
|
1089
1123
|
return this.isShowing();
|
package/src/ui/List.js
CHANGED
package/src/ui/Tab.js
CHANGED
|
@@ -168,7 +168,14 @@ define(function(require) {
|
|
|
168
168
|
this.setState("invalidated", true);
|
|
169
169
|
}
|
|
170
170
|
},
|
|
171
|
-
|
|
171
|
+
|
|
172
|
+
makeVisible: function(control) {
|
|
173
|
+
this.inherited(arguments);
|
|
174
|
+
if(!control && this._parent) {
|
|
175
|
+
this._parent.makeVisible(this);
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
|
|
172
179
|
getControl: function() {
|
|
173
180
|
return this._control;
|
|
174
181
|
},
|
package/src/ui/Tabs.js
CHANGED
|
@@ -210,17 +210,21 @@ define(function(require) {
|
|
|
210
210
|
// }
|
|
211
211
|
// },
|
|
212
212
|
makeVisible: function(control) {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
213
|
+
if(control) {
|
|
214
|
+
/*- this assumes horizontal scrolling only */
|
|
215
|
+
control.scrollIntoView();
|
|
216
|
+
// HACK
|
|
217
|
+
this.nodeNeeded().scrollTop = 0;
|
|
218
|
+
this.nextTick("position-scrollbar", function() {
|
|
219
|
+
if(this._node.scrollLeft < 100) {
|
|
220
|
+
this._node.scrollLeft = 0;
|
|
221
|
+
} else {
|
|
222
|
+
this._node.scrollLeft += 100;
|
|
223
|
+
}
|
|
224
|
+
}.bind(this));
|
|
225
|
+
} else {
|
|
226
|
+
return this.inherited(arguments);
|
|
227
|
+
}
|
|
224
228
|
},
|
|
225
229
|
initializeNodes: function(control) {
|
|
226
230
|
/** @overrides ../Control.prototype.initializeNodes */
|
package/src/ui/Tree.js
CHANGED
|
@@ -74,13 +74,14 @@ define(function (require) {
|
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
">.text": {
|
|
77
|
-
|
|
77
|
+
'input[type=checkbox]': `position:relative;top:${checkbox_top}px;`,
|
|
78
78
|
cursor: "pointer",
|
|
79
79
|
position: "relative",
|
|
80
80
|
// width: "100%",
|
|
81
81
|
display: 'inline-block',
|
|
82
|
-
|
|
82
|
+
'margin-left': "2px",
|
|
83
83
|
padding: "3px 4px 3px 4px",
|
|
84
|
+
// 'vertical-align': "top"
|
|
84
85
|
},
|
|
85
86
|
"&.selected": {
|
|
86
87
|
">.selection": {
|
|
@@ -231,10 +232,14 @@ define(function (require) {
|
|
|
231
232
|
this.dispatch("nodesneeded", null);
|
|
232
233
|
},
|
|
233
234
|
makeVisible: function(childNode) {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
235
|
+
if(childNode) {
|
|
236
|
+
var node = this.nodeNeeded();
|
|
237
|
+
var pos = jquery(childNode.nodeNeeded()).position();
|
|
238
|
+
var top = this.getAbsoluteRect().height / 3;
|
|
239
|
+
node.scrollTop -= (top - pos.top);
|
|
240
|
+
} else {
|
|
241
|
+
return this.inherited(arguments);
|
|
242
|
+
}
|
|
238
243
|
},
|
|
239
244
|
|
|
240
245
|
do_keyup: function(evt) {
|