cavalion-vcl 1.1.82 → 1.1.83

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
@@ -34,6 +34,7 @@
34
34
  * [.v1](src/prototypes/App:.js) - <= _#client [ui/forms/Portal<>]()_ _(used by cavalion-code and veldoffice-vcl-comps)_
35
35
  * [.v2](src/prototypes/App:.js) - <= _Main<>_
36
36
  * [.glassy](src/prototypes/App:.js) [.openform](src/prototypes/App:.js) [.toast](src/prototypes/App:.js)
37
+ * [make](src/prototypes/:/) / [Build](src/prototypes/make/:.js)
37
38
  * [ui](src/prototypes/:/)
38
39
  * [Form](src/prototypes/ui/:.js) - [forms](src/prototypes/ui/:/)
39
40
  * [Home](src/prototypes/ui/forms/:.js) [.list](src/prototypes/ui/forms/Home:.js) [.tree](src/prototypes/ui/forms/Home:.js)
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ### `2024/10/24` - 1.1.83
2
+
3
+ - 20241024 introduces Control.prototype.getNext/PreviousSibling introduces Ace.prototype.append
4
+ - 20241012 optimizes declarations of util-functions in prototypes/ui/forms/util/Console
5
+ - 20241012 improves App prototypes - improves glassy styles and prototypes - improves toasting - adds show/hide for static toasts refactors more CSS definitions to App#window
6
+ - 20241012 fine tunes styles of CheckGroup and Tree adds getKeys() and getValues() to vcl/ui/Console enhances sorting features of List improves Popup so that it can popup anywhere in the document (not parent bounds perse)
7
+ - 20241012 adds Component.prototype.createEvent() method, used by .dispatch(), overridden by Control fine tunes Component.prototype.vars() for usage with default value and fallback_to_owner restores changes in setTimeout improves use of "#" in property definitions - allows for searching for global components with #0 prefix
8
+ - 20240918 updates rendering details about selection of sizer adds hotkey for toggling visibility "sizer-selected" control refactors namespace of window.H
9
+ - 20240918 adds support for App.openform.prefix
10
+ - 20240918 adds support for ace#1.36.2
11
+ - 20240918 updates icon height
12
+ - 20240918 minor changes
13
+ - 20240918 refactors App styles develops App.v2
14
+ - 20240918 improves querying for components adds support for relative namespaces
15
+ - 20240904 introducing App.v2
16
+ - 20240904 fixes several minor bugs
17
+
1
18
  ### `2024/07/07` - 1.1.82
2
19
 
3
20
  * **cavalion-blocks<>:**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cavalion-vcl",
3
- "version": "1.1.82",
3
+ "version": "1.1.83",
4
4
  "description": "Visual Component Library for vcl-comps",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/Component.js CHANGED
@@ -10,12 +10,10 @@ define(function (require) {
10
10
  var mixInR = require("js/mixInRecursive");
11
11
  var query = require("./Component.query");
12
12
 
13
- var ILLEGAL_COMPONENT_NAME_CHARS = "/";
14
- var ILLEGAL_COMPONENT_URI_CHARS = "/";
15
-
16
- var all = [], nextTick = 1;
13
+ const all = [];
14
+ let nextTick = 1;
17
15
 
18
- var overrides_set = function(value) {
16
+ const overrides_set = function(value) {
19
17
  const wrap = (method) => {
20
18
  const f = function() {
21
19
  Method.setInherited(method, Method.getInherited(f));
@@ -100,10 +98,11 @@ define(function (require) {
100
98
  /**
101
99
  * @overrides Object.prototype.toString
102
100
  */
103
- if (this.hasOwnProperty("_name")) {
104
- return String.format("%n#%s#%d", this.constructor, this._name, this.hashCode());
101
+ // var pre = js.n(!this._isRoot ? this._uri : js.get("@factory._uri", this) || this.constructor);
102
+ if (this._name) {
103
+ return js.sf("%n#%s#%d", this.constructor, this._name, this.hashCode());
105
104
  }
106
- return String.format("%n#%d", this.constructor, this.hashCode());
105
+ return js.sf("%n#%d", this.constructor, this.hashCode());
107
106
  },
108
107
  destroy: function () {
109
108
  all.splice(all.indexOf(this), 1);
@@ -136,19 +135,23 @@ define(function (require) {
136
135
  }
137
136
  }
138
137
  },
138
+ createEvent: function(name) {
139
+ if(typeof name === "string") {
140
+ return { type: name };
141
+ }
142
+ return {};
143
+ },
139
144
  dispatch: function (name, evt) {
140
145
  if (evt === undefined) {
141
- if(typeof name === "string") {
142
- evt = {
143
- type: name
144
- };
145
- }
146
+ evt = this.createEvent(name);
146
147
  }
147
148
 
148
149
  if (this._loading === false || name === "destroy") {
149
150
  var f = this["on" + name];
151
+
150
152
  var args = js.copy_args(arguments);
151
153
  args.shift();
154
+ if(args.length === 0) args.push(evt);
152
155
 
153
156
  var enabled = (name === "destroy") || this.isEventEnabled(name, evt, f, args);
154
157
  if (typeof f === "function" && enabled === true) {
@@ -261,8 +264,8 @@ define(function (require) {
261
264
  },
262
265
  setTimeout: function(name, f, ms, args) {
263
266
  /**
264
- * @param name Used to identify the timeout. Successive calls will cancel a previous timeout with the same name.
265
- * @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.
267
+ * @param name {String} [optional] Used to identify the timeout. Successive calls will cancel a previous timeout with the same name.
268
+ * @param f {String/Function} [optional] 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.
266
269
  * @param ms {Number} Number of milliseconds
267
270
  * @param args {Array} Array of arguments to be passed to the function.
268
271
  * @returns The return value of js.setTimeout
@@ -273,6 +276,13 @@ define(function (require) {
273
276
  this._timeouts = {};
274
277
  }
275
278
 
279
+ // if(typeof name === "function") {
280
+ // args = ms;
281
+ // ms = f;
282
+ // f = name;
283
+ // name = "default"
284
+ // }
285
+
276
286
  if(typeof name === "object" && typeof name.f === "function") {
277
287
  return this.setTimeout(name.name, name.f, name.ms, name.args);
278
288
  }
@@ -551,14 +561,17 @@ define(function (require) {
551
561
  if (this._vars !== null && arguments.length === 3) {
552
562
  this._vars = this._vars || {};
553
563
  }
554
-
555
- var r = this._vars !== null ? js.get(namePath, this._vars, defaultValue) : undefined;
564
+
565
+ var r = this._vars !== null ? js.get(namePath, this._vars) : undefined;
556
566
  if (r === undefined) {
557
567
  if(fallback_to_owner === true && this._owner !== null) {
558
568
  r = this._owner.getVar(namePath, true, defaultValue);
559
569
  } else if(arguments.length === 3) {
560
570
  if((r = defaultValue) !== undefined) {
561
- this.setVar(namePath, defaultValue);
571
+ if(typeof defaultValue === "function") {
572
+ r = defaultValue([this].concat(js.copy_args(arguments)));
573
+ }
574
+ this.setVar(namePath, r);
562
575
  }
563
576
  }
564
577
  }
@@ -576,8 +589,10 @@ define(function (require) {
576
589
  name = name.split(".");
577
590
  var prop = name.pop();
578
591
  r = [this.getVar(name.join("."))];
579
- r.push(r[0][prop]);
580
- delete r[0][prop];
592
+ if(r[0]) {
593
+ r.push(r[0][prop]);
594
+ delete r[0][prop];
595
+ }
581
596
  r = r.pop();
582
597
  } else if (this._vars !== null) {
583
598
  r = this._vars[name];
@@ -1531,7 +1546,6 @@ define(function (require) {
1531
1546
  },
1532
1547
 
1533
1548
  "isRoot": { type: Type.BOOLEAN, set: function(value) {
1534
- console.warn("yep! actually used :-)")
1535
1549
  this.setIsRoot(value);
1536
1550
  } }
1537
1551
  }