cavalion-vcl 1.1.63 → 1.1.66

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,3 +1,21 @@
1
+ ### 2022/06/27 - 1.1.66
2
+
3
+ * 07c6e83 - introducing onError event-property
4
+
5
+ ### 2022/06/27 - 1.1.65
6
+
7
+ * 52c79ea - fixes bug where applyClasses was called without a _node being allocated/available
8
+ * 90bba04 - foolproofing rendering (vcl/ui/List) while reseting array during usage - needs performance boost with splice
9
+ * 89db212 - tweaking vertical-align
10
+
11
+ ### 2022/06/23 - 1.1.64
12
+
13
+ * ed814eb - updating
14
+ * ca79dd6 - preventDefault when clicked A
15
+ * 0e3c6e0 - rendering pending values as -
16
+ * d1aeeae - fixes executesAction enum item No -> no
17
+ * 2239c5b - cosmetic (5 days ago) <Ralph Kazemier>
18
+
1
19
  ### 2022/05/31 - 1.1.63
2
20
 
3
21
  * 837510b - fixes document.title bug
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cavalion-vcl",
3
- "version": "1.1.63",
3
+ "version": "1.1.66",
4
4
  "description": "Visual Component Library for vcl-comps",
5
5
  "main": "index.js",
6
6
  "scripts": {
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
+ this.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
  }));
package/src/ui/Input.js CHANGED
@@ -305,7 +305,7 @@ define(function(require) {
305
305
  properties: {
306
306
  "executesAction": {
307
307
  /** @overrides ../Element.properties.executesAction */
308
- type: ["No", "onClick", "onEnterPressed"]
308
+ type: ["no", "onClick", "onEnterPressed"]
309
309
  },
310
310
  "detectChangeTimeout": {
311
311
  type: Type.INTEGER
package/src/ui/List.js CHANGED
@@ -404,8 +404,10 @@ define(function(require) {
404
404
  if(column._attribute !== "") {
405
405
  orgValue = (value = this._source.getAttributeValue(column._attribute, row));
406
406
  }
407
-
408
- if(column._wantsNullValues || (value !== null && value !== undefined)) {
407
+
408
+ if(value === Source.Pending) {
409
+ value = "-";
410
+ } else if(column._wantsNullValues || (value !== null && value !== undefined)) {
409
411
  if(column._displayFormat !== "") {
410
412
  value = String.format(column._displayFormat, value);
411
413
  }
@@ -494,12 +496,14 @@ define(function(require) {
494
496
  setCount: function(value) {
495
497
  if(this._count !== value) {
496
498
  this._count = value;
499
+ this.setSelection([]);
497
500
  if(value === 0) {
498
501
  this.resetColumnAutoWidth();
499
502
  }
500
- this.setSelection([]);
501
503
  //this.alignControls();
502
504
  this.render_();
505
+ // this.nextTick(() => this._body.updateRows());
506
+ // value && this._body.updateRows();
503
507
  }
504
508
  },
505
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/Popup.js CHANGED
@@ -33,7 +33,7 @@ define(function(require) {
33
33
  if(!HtmlElement.hasParent(evt.target, popup._node)) {
34
34
  popup.close();
35
35
  evt.bubbleUp = false;
36
- //evt.preventDefault();
36
+ evt.preventDefault(); // for A's
37
37
  }
38
38
  }
39
39
  });
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",