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 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
- * [Node](src/ui/:.js) [.closeable](src/ui/Node:.js)
61
- * [Sizer](src/ui/:.js) - [Tab](src/ui/:.js) - [Tabs](src/ui/:.js) - [Tree](src/ui/:.js)
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
- * ### 2022/07/04 - 1.1.67
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
- * ### 2022/06/27 - 1.1.66
16
+ ### 2022/06/27 - 1.1.66
8
17
 
9
18
  * 07c6e83 - introducing onError event-property
10
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cavalion-vcl",
3
- "version": "1.1.67",
3
+ "version": "1.1.68",
4
4
  "description": "Visual Component Library for vcl-comps",
5
5
  "main": "index.js",
6
6
  "scripts": {
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
@@ -58,7 +58,8 @@ define(function(require) {
58
58
  position: "absolute",
59
59
  width: "1px",
60
60
  height: "1px",
61
- overflow: "hidden"
61
+ overflow: "hidden",
62
+ 'z-index': 2
62
63
  }
63
64
  },
64
65
  "&.header-invisible .{./ListHeader}": "height:0;"
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
- /*- this assumes horizontal scrolling only */
214
- control.scrollIntoView();
215
- // HACK
216
- this._node.scrollTop = 0;
217
- this.nextTick("position-scrollbar", function() {
218
- if(this._node.scrollLeft < 100) {
219
- this._node.scrollLeft = 0;
220
- } else {
221
- this._node.scrollLeft += 100;
222
- }
223
- }.bind(this));
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
- "input[type=checkbox]": `position:relative;top:${checkbox_top}px;`,
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
- "margin-left": "2px",
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
- var node = this.nodeNeeded();
235
- var pos = jquery(childNode.nodeNeeded()).position();
236
- var top = this.getAbsoluteRect().height / 3;
237
- node.scrollTop -= (top - pos.top);
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) {