cavalion-vcl 1.1.64 → 1.1.67

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,7 +1,7 @@
1
1
  * [CHANGELOG.md]() - [README.md]() - [package.json]()
2
2
  * [Workspace<vcl>](/Library/vcl-comps/devtools/Workspace$/vcl.js)
3
3
 
4
- # `0519` vcl/Factory
4
+ # `0519` vcl/Factory `#CVLN-20220519-1`
5
5
 
6
6
  * how is the implicit base determined in `["", {}, []]`
7
7
 
package/CHANGELOG.md CHANGED
@@ -1,6 +1,26 @@
1
+ * ### 2022/07/04 - 1.1.67
2
+
3
+ * 7dc04fb - adds Component.prototype.getTimeout
4
+ * 52bebc9 - introducing Query.prototype.error
5
+ * 18cd481 - destroying element upon remove (seems decent)
6
+
7
+ * ### 2022/06/27 - 1.1.66
8
+
9
+ * 07c6e83 - introducing onError event-property
10
+
11
+ ### 2022/06/27 - 1.1.65
12
+
13
+ * 52c79ea - fixes bug where applyClasses was called without a _node being allocated/available
14
+ * 90bba04 - foolproofing rendering (vcl/ui/List) while reseting array during usage - needs performance boost with splice
15
+ * 89db212 - tweaking vertical-align
16
+
1
17
  ### 2022/06/23 - 1.1.64
2
18
 
3
- *
19
+ * ed814eb - updating
20
+ * ca79dd6 - preventDefault when clicked A
21
+ * 0e3c6e0 - rendering pending values as -
22
+ * d1aeeae - fixes executesAction enum item No -> no
23
+ * 2239c5b - cosmetic
4
24
 
5
25
  ### 2022/05/31 - 1.1.63
6
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cavalion-vcl",
3
- "version": "1.1.64",
3
+ "version": "1.1.67",
4
4
  "description": "Visual Component Library for vcl-comps",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/Component.js CHANGED
@@ -235,7 +235,7 @@ define(function (require) {
235
235
  }
236
236
  return this.setTimeout(name, f, 0, args);
237
237
  },
238
- setTimeout: function (name, f, ms, args) {
238
+ setTimeout: function(name, f, ms, args) {
239
239
  /**
240
240
  * @param name Used to identify the timeout. Successive calls will cancel a previous timeout with the same name.
241
241
  * @param f {String/Function} Identifies the function which should be called when at least ms has passed. Optional, when omitted it defaults to the same value as name. A string value to identify a member function or simply a reference to a function.
@@ -301,6 +301,13 @@ define(function (require) {
301
301
 
302
302
  return (this._timeouts[name] = js.setTimeout(g, ms, this._timeouts[name]));
303
303
  },
304
+ getTimeout: function(name) {
305
+ /**
306
+ * @param name Used to identify the timeout.
307
+ * @returns The timeout function set, if any, otherwise undefined
308
+ */
309
+ return this._timeouts[name];
310
+ },
304
311
  hasTimeout: function(name) {
305
312
  return this._timeouts.hasOwnProperty(name);
306
313
  },
package/src/Control.js CHANGED
@@ -718,15 +718,12 @@ define(function(require) {
718
718
  var classes = this.determineClasses();
719
719
  delete this._computedStyle;
720
720
  classes = String.trim(classes.join(" "));
721
- //if(classes !== this._node.className) {
721
+ if(this._node) {
722
722
  this._node.className = classes;
723
723
  if(this.inDocument()) {
724
724
  this.layoutChanged();
725
725
  }
726
- // } else {
727
- // console.trace("Control.applyClasses-blocked",
728
- // this.hashCode(), this);
729
- // }
726
+ }
730
727
  },
731
728
  toggleClass: function(classes) {
732
729
  if(this._classes_rt === null) {
@@ -47,6 +47,18 @@ define(function(require) {
47
47
  this._monitors = [];
48
48
  this._pageReqs = [];
49
49
  },
50
+ error: function(e) {
51
+ if(this._onError) {
52
+ this._onError(e);
53
+ } else {
54
+ if(e && e.responseJSON && e.responseJSON.message) {
55
+ console.error(e.responseJSON.message, e);
56
+ throw e;
57
+ }
58
+ console.error(e);
59
+ throw e;
60
+ }
61
+ },
50
62
  loaded: function() {
51
63
  /** @overrides ../vcl/Compopnent.prototype.loaded */
52
64
  return this.inherited(arguments);
@@ -284,12 +296,7 @@ define(function(require) {
284
296
  }
285
297
  return res;
286
298
  }).catch(function(e) {
287
- if(e && e.responseJSON && e.responseJSON.message) {
288
- console.error(e.responseJSON.message, e)
289
- throw e;
290
- }
291
- console.error(e);
292
- throw e;
299
+ me.error(e);
293
300
  })
294
301
  );
295
302
 
@@ -602,6 +609,12 @@ define(function(require) {
602
609
  /* This method provides an interface to dynamically determine the request criteria, based upon for example user input. This method must return a criteria object. The function receives the criteria as they are currently indicated by its properties. Return null to prevent the request from going out.
603
610
  */
604
611
  }
612
+ },
613
+ "onError": {
614
+ type: Type.EVENT,
615
+ f: function(e) {
616
+ /* This method provides an interface to handle errors, if not set an error will be thrown and logged to the console */
617
+ }
605
618
  }
606
619
  }
607
620
  }));
@@ -34,7 +34,7 @@
34
34
  elem.setTimeout("disappear", () => {
35
35
  var h = elem.on("transitionend", () => {
36
36
  elem.un(h);
37
- elem.setParent(null);
37
+ elem.destroy();
38
38
  });
39
39
  elem.replaceClass("appear", "disappear");
40
40
  }, timeout_ !== undefined ? timeout_ : timeout);
package/src/ui/List.js CHANGED
@@ -496,12 +496,14 @@ define(function(require) {
496
496
  setCount: function(value) {
497
497
  if(this._count !== value) {
498
498
  this._count = value;
499
+ this.setSelection([]);
499
500
  if(value === 0) {
500
501
  this.resetColumnAutoWidth();
501
502
  }
502
- this.setSelection([]);
503
503
  //this.alignControls();
504
504
  this.render_();
505
+ // this.nextTick(() => this._body.updateRows());
506
+ // value && this._body.updateRows();
505
507
  }
506
508
  },
507
509
 
@@ -124,7 +124,7 @@ if(firstRow !== 0 && delta === 0) return;
124
124
  },
125
125
  updateRows: function(range) {
126
126
  if(this.hasOwnProperty("_controls")) {
127
- for(var i = 0; i < this._controls.length; ++i) {
127
+ for(var i = 0; i < Math.min(this._controls.length, this._parent.getCount()); ++i) {
128
128
  var c = this._controls[i];
129
129
  if(c._node !== null) {
130
130
  // Update row when the range is unknown or it's rowIndex is within the range
package/src/ui/Tree.js CHANGED
@@ -64,7 +64,7 @@ define(function (require) {
64
64
  // height: "20px",
65
65
  width: "12px",
66
66
  // "padding-top": "3px",
67
- "vertical-align": "text-top",
67
+ // "vertical-align": "text-top",
68
68
  "&::before": {
69
69
  content: "' '",
70
70
  display: "inline-block",