cavalion-vcl 1.1.71 → 1.1.73
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 +28 -34
- package/CHANGELOG.md +8 -1
- package/package.json +1 -1
- package/src/Component.js +12 -7
- package/src/Factory.js +2 -11
- package/src/ui/List.js +1 -1
- package/src/ui/ListHeader.js +4 -6
- package/src/ui/Popup.js +35 -29
- package/src/ui/Tree.js +3 -2
package/.md
CHANGED
|
@@ -1,38 +1,29 @@
|
|
|
1
1
|
* [CHANGELOG.md]() - [README.md]() - [package.json]()
|
|
2
|
-
* [.workspace](`(devtools/Workspace<${ws.getSpecializer()}>)`) - [.js]()
|
|
3
|
-
|
|
4
|
-
# cavalion-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* [src](
|
|
11
|
-
|
|
12
|
-
* [
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* [
|
|
17
|
-
*
|
|
18
|
-
* [
|
|
19
|
-
* [
|
|
20
|
-
* [
|
|
21
|
-
|
|
22
|
-
* [
|
|
23
|
-
* [
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
* [
|
|
27
|
-
* [Popup](src/ui/:.js) - [Ace](src/ui/:.js) - [Console](src/ui/:.js)
|
|
28
|
-
* [Form](src/ui/:.js) - [FormContainer](src/ui/:.js)
|
|
29
|
-
* [List](src/ui/:.js) | [ListColumn](src/ui/:.js) - [ListBody](src/ui/:.js) - [ListFooter](src/ui/:.js) - [ListHeader](src/ui/:.js) - [ListRow](src/ui/:.js)
|
|
30
|
-
* [Sizer](src/ui/:.js)
|
|
31
|
-
* [Tabs](src/ui/:.js)
|
|
32
|
-
* [Tab](src/ui/:.js)
|
|
33
|
-
* [Tree](src/ui/:.js)
|
|
34
|
-
* [Node](src/ui/:.js)
|
|
35
|
-
* [.closeable](src/ui/Node:.js)
|
|
2
|
+
* [.workspace](`(devtools/Workspace<${ws.getSpecializer()}>)`) - [.js]() - [src](:/)
|
|
3
|
+
|
|
4
|
+
# cavalion-vcl / classes
|
|
5
|
+
|
|
6
|
+
* [Factory](src/:.js) [.parse](src/Factory:.js) - [Reader](src/:.js) - [Writer](src/:.js)
|
|
7
|
+
* [CssRules](src/:.js) - [Listeners](src/:.js)
|
|
8
|
+
* **[Component](src/:.js)** [.query](src/Component:.js)
|
|
9
|
+
* **[Application](src/:.js)** - **[Action](src/:.js)**
|
|
10
|
+
* [data](src/:/) / [Array](src/data/:.js)
|
|
11
|
+
* [entities](src/:/) / [Query](src/entities/:.js) - [Instance](src/entities/:.js)
|
|
12
|
+
* **[Control](src/:.js)** < [ui](src/:/) / [Sizer](src/ui/:.js)
|
|
13
|
+
* [Element](src/ui/:.js) < [LargeIcon](src/ui/:.js) << _smdl - alert_
|
|
14
|
+
* [Input](src/ui/:.js) < [Checkbox](src/ui/:.js) - [Combobox](src/ui/:.js) - [DatePicker](src/ui/:.js)
|
|
15
|
+
* [Button](src/ui/:.js) < [PopupButton](src/ui/:.js)
|
|
16
|
+
* [Select](src/ui/:.js)
|
|
17
|
+
* [Container](src/ui/:.js)
|
|
18
|
+
* [Group](src/ui/:.js)
|
|
19
|
+
* [CheckGroup](src/ui/:.js)
|
|
20
|
+
* [Bar](src/ui/:.js)
|
|
21
|
+
* [Tabs](src/ui/:.js) - [Tab](src/ui/:.js)
|
|
22
|
+
* [Panel](src/ui/:.js)
|
|
23
|
+
* [Popup](src/ui/:.js) - [Ace](src/ui/:.js) - [Console](src/ui/:.js)
|
|
24
|
+
* ( [Form](src/ui/:.js) - [FormContainer](src/ui/:.js) ) _where does onActive/Deactive go?_
|
|
25
|
+
* [List](src/ui/:.js) | [ListColumn](src/ui/:.js) - [ListBody](src/ui/:.js) - [ListFooter](src/ui/:.js) - [ListHeader](src/ui/:.js) - [ListRow](src/ui/:.js)
|
|
26
|
+
* [Tree](src/ui/:.js) - [Node](src/ui/:.js) [.closeable](src/ui/Node:.js)
|
|
36
27
|
|
|
37
28
|
# prototypes `2022/04/17`
|
|
38
29
|
|
|
@@ -61,4 +52,7 @@
|
|
|
61
52
|
* [Query](src/prototypes/ui/entities/:.js) - [.scaffold](src/prototypes/ui/entities/Query:.js) - [scaffold.future](src/prototypes/ui/entities/Query:.js)
|
|
62
53
|
* [QueryFilters](src/prototypes/ui/entities/:.js)
|
|
63
54
|
|
|
55
|
+
# cavalion-entities // va-objects
|
|
56
|
+
|
|
57
|
+
* Interpret, modify, kvp via a model
|
|
64
58
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
### 2023/03/26 - 1.1.73
|
|
2
|
+
|
|
3
|
+
* Fixes issues with Component.getImplicitBasesByUri
|
|
4
|
+
|
|
5
|
+
### 2022/12/11 - 1.1.72
|
|
6
|
+
|
|
7
|
+
* ListHeader: Fixes the rendering bug which appeared in Chrome 107+
|
|
8
|
+
|
|
1
9
|
### 2022/11/15 - 1.1.71
|
|
2
10
|
|
|
3
11
|
* Updates the docs
|
|
@@ -5,7 +13,6 @@
|
|
|
5
13
|
* Query: fixes some bug in error handling
|
|
6
14
|
* List: improves rendering while loading
|
|
7
15
|
|
|
8
|
-
|
|
9
16
|
### 2022/10/30 - 1.1.70
|
|
10
17
|
|
|
11
18
|
`#VA-20221028-1`, `-2` & `-3`
|
package/package.json
CHANGED
package/src/Component.js
CHANGED
|
@@ -1232,7 +1232,11 @@ define(function (require) {
|
|
|
1232
1232
|
if (base !== null) {
|
|
1233
1233
|
var keys = Component.getKeysByUri(uri);
|
|
1234
1234
|
var classes = keys.classes;
|
|
1235
|
-
var spec_classes = keys.specializer_classes;
|
|
1235
|
+
var spec_classes = [].concat(keys.specializer_classes);
|
|
1236
|
+
|
|
1237
|
+
// Always inherit the implicit base first
|
|
1238
|
+
r.push(base);
|
|
1239
|
+
|
|
1236
1240
|
if (classes.length > 1) {
|
|
1237
1241
|
// [A] Each class expands
|
|
1238
1242
|
classes.forEach(function (cls) {
|
|
@@ -1240,10 +1244,11 @@ define(function (require) {
|
|
|
1240
1244
|
r.push(Component.getUriByKeys(keys));
|
|
1241
1245
|
});
|
|
1242
1246
|
} else if (classes.length === 1) {
|
|
1243
|
-
if (spec_classes.length > 1) {
|
|
1247
|
+
if (spec_classes.length/* > 1*/) {
|
|
1244
1248
|
// [B] Each specializer_class expands
|
|
1245
1249
|
spec_classes.forEach(function (cls) {
|
|
1246
|
-
keys.specializer_classes = [
|
|
1250
|
+
keys.specializer_classes = [];
|
|
1251
|
+
keys.specializer = cls;
|
|
1247
1252
|
r.push(Component.getUriByKeys(keys));
|
|
1248
1253
|
});
|
|
1249
1254
|
} else if (spec_classes.length === 1) {
|
|
@@ -1261,10 +1266,12 @@ define(function (require) {
|
|
|
1261
1266
|
} else {
|
|
1262
1267
|
// [J] equals [G], continue on prototypes/ prefix
|
|
1263
1268
|
}
|
|
1264
|
-
} else if (spec_classes.length > 1) {
|
|
1269
|
+
} else if (spec_classes.length/* > 1*/) {
|
|
1265
1270
|
// [E] Each specializer_class expands
|
|
1266
1271
|
spec_classes.forEach(function (cls) {
|
|
1267
|
-
keys.specializer_classes = [cls];
|
|
1272
|
+
// keys.specializer_classes = [cls];
|
|
1273
|
+
keys.specializer_classes = [];
|
|
1274
|
+
keys.specializer = cls;
|
|
1268
1275
|
r.push(Component.getUriByKeys(keys));
|
|
1269
1276
|
});
|
|
1270
1277
|
} else if (spec_classes.length === 1) {
|
|
@@ -1279,8 +1286,6 @@ define(function (require) {
|
|
|
1279
1286
|
// empty specifier due to: ComponentClass<>
|
|
1280
1287
|
}
|
|
1281
1288
|
|
|
1282
|
-
// Always inherit the implicit base
|
|
1283
|
-
r.push(base);
|
|
1284
1289
|
|
|
1285
1290
|
} else if (uri.indexOf(Factory.PREFIX_PROTOTYPES) !== 0) {
|
|
1286
1291
|
r.push(String.format("%s%s", Factory.PREFIX_PROTOTYPES, uri));
|
package/src/Factory.js
CHANGED
|
@@ -527,8 +527,7 @@ define(function(require) {
|
|
|
527
527
|
var sourceUri = Factory.makeTextUri(name);
|
|
528
528
|
|
|
529
529
|
function instantiate(source, local) {
|
|
530
|
-
var
|
|
531
|
-
var factory = new Factory(parentRequire, name + p, sourceUri + p);
|
|
530
|
+
var factory = new Factory(parentRequire, name, sourceUri);
|
|
532
531
|
// console.log("instantiate", name + p);
|
|
533
532
|
factory.load(source, function() {
|
|
534
533
|
load(factory, source);
|
|
@@ -536,7 +535,6 @@ define(function(require) {
|
|
|
536
535
|
}
|
|
537
536
|
|
|
538
537
|
function fallback() {
|
|
539
|
-
// console.log("fallback");
|
|
540
538
|
parentRequire([sourceUri], instantiate, function(err) {
|
|
541
539
|
// Source not found, assume it...
|
|
542
540
|
var source = Component.getImplicitSourceByUri(name);
|
|
@@ -545,18 +543,11 @@ define(function(require) {
|
|
|
545
543
|
}
|
|
546
544
|
//console.log("304", name, "-->", source);
|
|
547
545
|
Factory.implicit_sources[sourceUri] = source;
|
|
546
|
+
// console.log(name, "implicit source generated", source);
|
|
548
547
|
instantiate(source);
|
|
549
548
|
});
|
|
550
549
|
}
|
|
551
550
|
|
|
552
|
-
if(name.endsWith(".skip-fetch")) {
|
|
553
|
-
console.log("skip-fetch", name);
|
|
554
|
-
name = name.split(".");
|
|
555
|
-
name.pop();
|
|
556
|
-
name = name.join(".");
|
|
557
|
-
return fallback()
|
|
558
|
-
}
|
|
559
|
-
|
|
560
551
|
// console.log("fetch", name);
|
|
561
552
|
this.fetch(name)
|
|
562
553
|
.then(source => source ? instantiate(source, true) : fallback())
|
package/src/ui/List.js
CHANGED
|
@@ -191,7 +191,7 @@ define(function(require) {
|
|
|
191
191
|
s.left = String.format("%dpx", bw);
|
|
192
192
|
s.top = String.format("%dpx", bh + rect.top);
|
|
193
193
|
|
|
194
|
-
thisObj._body.setBounds(rect.left, rect.top, undefined, undefined, bw, bh);
|
|
194
|
+
thisObj._body.setBounds(rect.left, rect.top - 3, undefined, undefined, bw, bh);
|
|
195
195
|
}];
|
|
196
196
|
|
|
197
197
|
args.callee = arguments.callee;
|
package/src/ui/ListHeader.js
CHANGED
|
@@ -16,12 +16,10 @@ define(function(require) {
|
|
|
16
16
|
overflow: "hidden",
|
|
17
17
|
transition: "width 50ms",
|
|
18
18
|
">div": {
|
|
19
|
-
// background: "-webkit-linear-gradient(top, rgba(240,240,240,1) 0%,rgba(227,227,227,1) 100%)", // Chrome10+,Safari5.1+
|
|
20
|
-
// "background-image": "-webkit-gradient(linear, 0% 0%, 0% 100%, from(rgb(245, 245, 245)), to(rgb(229, 229, 229)))",
|
|
21
|
-
|
|
22
19
|
"background-image": "-webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(245, 245, 245, 0.9)), to(rgba(229, 229, 229, 0.9)))",
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
'line-height': "8px",
|
|
21
|
+
'padding-top': "3px",
|
|
22
|
+
'padding-bottom': "3px",
|
|
25
23
|
/**
|
|
26
24
|
background: [
|
|
27
25
|
"rgb(240,240,240)", // Old browsers
|
|
@@ -38,7 +36,7 @@ define(function(require) {
|
|
|
38
36
|
"overflow": "hidden",
|
|
39
37
|
"white-space": "nowrap",
|
|
40
38
|
cursor: "default",
|
|
41
|
-
display: "inline-
|
|
39
|
+
display: "inline-block"
|
|
42
40
|
}
|
|
43
41
|
},
|
|
44
42
|
|
package/src/ui/Popup.js
CHANGED
|
@@ -15,25 +15,20 @@ define(function(require) {
|
|
|
15
15
|
|
|
16
16
|
this._hook = new DocumentHook(undefined, true);
|
|
17
17
|
js.mixIn(this._hook, {
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
keydown: function(evt) {
|
|
18
|
+
keydown: (evt) => {
|
|
23
19
|
if(evt.keyCode === 27) {
|
|
24
20
|
popup.close();
|
|
25
21
|
evt.preventDefault();
|
|
26
22
|
}
|
|
27
23
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
*/
|
|
32
|
-
click: function(evt) {
|
|
33
|
-
if(!HtmlElement.hasParent(evt.target, popup._node)) {
|
|
24
|
+
click: (evt) => {
|
|
25
|
+
var hasParent = HtmlElement.hasParent(evt.target, popup._node);
|
|
26
|
+
if(popup._autoClose || !hasParent) {
|
|
34
27
|
popup.close();
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
if(!hasParent) {
|
|
29
|
+
evt.bubbleUp = false;
|
|
30
|
+
evt.preventDefault(); // for A's
|
|
31
|
+
}
|
|
37
32
|
}
|
|
38
33
|
}
|
|
39
34
|
});
|
|
@@ -45,6 +40,7 @@ define(function(require) {
|
|
|
45
40
|
},
|
|
46
41
|
|
|
47
42
|
_visible: false,
|
|
43
|
+
_autoClose: true,
|
|
48
44
|
_autoSize: "both",
|
|
49
45
|
_hook: null,
|
|
50
46
|
|
|
@@ -58,25 +54,29 @@ define(function(require) {
|
|
|
58
54
|
* @param relativeTo
|
|
59
55
|
* @param onClose
|
|
60
56
|
*/
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
57
|
+
const align = () => {
|
|
58
|
+
|
|
59
|
+
var p = relativeTo.clientToDocument(0, 0);
|
|
60
|
+
var cs = relativeTo.getComputedStyle();
|
|
61
|
+
var cs_ = this.getComputedStyle();
|
|
62
|
+
|
|
63
|
+
if(this._parent) {
|
|
64
|
+
p = this._parent.documentToClient(p);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if(position.origin === "bottom-left") {
|
|
68
|
+
this.setLeft(p.x + (position.dx || 0));
|
|
69
|
+
this.setTop(p.y + parseInt(cs.height, 10) + (position.dy || 0));
|
|
70
|
+
} else if(position.origin === "bottom-right") {
|
|
71
|
+
this.setLeft(p.x + parseInt(cs.width, 10) + (position.dx || 0) - parseInt(cs_.width, 10));
|
|
72
|
+
this.setTop(p.y + parseInt(cs.height, 10) + (position.dy || 0));
|
|
73
|
+
}
|
|
74
|
+
};
|
|
69
75
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
this.setTop(p.y + parseInt(cs.height, 10) + (position.dy || 0));
|
|
73
|
-
} else if(position.origin === "bottom-right") {
|
|
74
|
-
this.setLeft(p.x + parseInt(cs.width, 10) + (position.dx || 0) - parseInt(cs_.width, 10));
|
|
75
|
-
this.setTop(p.y + parseInt(cs.height, 10) + (position.dy || 0));
|
|
76
|
-
}
|
|
76
|
+
var n = 2;
|
|
77
|
+
if(!this._hook.isActive()) {
|
|
77
78
|
|
|
78
79
|
this.setVisible(true);
|
|
79
|
-
|
|
80
80
|
this._hook.activate();
|
|
81
81
|
|
|
82
82
|
this._hook.release = function() {
|
|
@@ -86,8 +86,11 @@ define(function(require) {
|
|
|
86
86
|
onClose();
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
+
this.update(align);
|
|
89
90
|
this.onpopup();
|
|
90
91
|
}
|
|
92
|
+
|
|
93
|
+
align();
|
|
91
94
|
},
|
|
92
95
|
close: function() {
|
|
93
96
|
if(this._hook.isActive()) {
|
|
@@ -134,6 +137,9 @@ define(function(require) {
|
|
|
134
137
|
}
|
|
135
138
|
},
|
|
136
139
|
properties: {
|
|
140
|
+
"autoClose": {
|
|
141
|
+
type: Class.Type.BOOLEAN
|
|
142
|
+
},
|
|
137
143
|
"onPopup": {
|
|
138
144
|
type: Class.Type.EVENT
|
|
139
145
|
},
|
package/src/ui/Tree.js
CHANGED
|
@@ -28,13 +28,14 @@ define(function (require) {
|
|
|
28
28
|
},
|
|
29
29
|
".{./Node}": {
|
|
30
30
|
display: "block",
|
|
31
|
+
cursor: "pointer",
|
|
31
32
|
"list-style-type": "none",
|
|
32
33
|
"white-space": "nowrap",
|
|
33
34
|
">.close": {
|
|
34
35
|
position: "absolute",
|
|
35
36
|
right: "4px",
|
|
36
37
|
"padding-top": "2px",
|
|
37
|
-
cursor: "pointer",
|
|
38
|
+
// cursor: "pointer",
|
|
38
39
|
display: "none"
|
|
39
40
|
},
|
|
40
41
|
">ol": {
|
|
@@ -75,8 +76,8 @@ define(function (require) {
|
|
|
75
76
|
},
|
|
76
77
|
">.text": {
|
|
77
78
|
'input[type=checkbox]': `position:relative;top:${checkbox_top}px;`,
|
|
78
|
-
cursor: "pointer",
|
|
79
79
|
position: "relative",
|
|
80
|
+
// cursor: "pointer",//"default",
|
|
80
81
|
// width: "100%",
|
|
81
82
|
display: 'inline-block',
|
|
82
83
|
'margin-left': "2px",
|