cavalion-vcl 1.1.77 → 1.1.80
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 +97 -7
- package/CHANGELOG.md +48 -1
- package/SNIPPETS.md +3 -0
- package/package.json +1 -1
- package/package_monitor.log +10 -0
- package/src/Component.js +14 -8
- package/src/Component.query.js +16 -13
- package/src/Control.js +66 -8
- package/src/entities/Query.js +12 -1
- package/src/prototypes/.md +35 -0
- package/src/prototypes/App.js +6 -18
- package/src/prototypes/App.v1.js +19 -2
- package/src/prototypes/ui/entities/.md +25 -0
- package/src/prototypes/ui/forms/Home.tree.js +2 -2
- package/src/prototypes/ui/forms/Portal.js +1 -1
- package/src/prototypes/ui/forms/View.js +4 -4
- package/src/prototypes/ui/forms/util/Console.js +93 -62
- package/src/ui/Ace.js +101 -19
- package/src/ui/Console.evaluate.js +8 -30
- package/src/ui/Console.js +48 -15
- package/src/ui/LargeIcon.js +28 -39
- package/src/ui/List.js +73 -30
- package/src/ui/ListColumn.js +21 -12
- package/src/ui/Node.closeable.js +8 -9
- package/src/ui/Node.js +8 -0
- package/src/ui/Select.js +11 -1
- package/src/ui/Tabs.js +14 -9
- package/src/ui/Tree.js +1 -1
- package/index.md +0 -2
package/.md
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
* [CHANGELOG.md]() - [README.md]() -[SNIPPETS.md]()
|
|
1
|
+
* [CHANGELOG.md]() - [README.md]() -[SNIPPETS.md]() - [ISSUES.md]()
|
|
2
2
|
* [.js]() - [src](:/) - [package.json]()
|
|
3
3
|
|
|
4
|
-
> * [sampleapp](#workspace-open::)
|
|
5
|
-
* [index.md]()
|
|
6
|
-
|
|
7
|
-
* `textRenders` vs `rendering` - properties
|
|
8
|
-
|
|
9
4
|
# cavalion-vcl / classes
|
|
10
5
|
|
|
11
6
|
* [Factory](src/:.js) [.parse](src/Factory:.js) - [Reader](src/:.js) - [Writer](src/:.js)
|
|
@@ -30,7 +25,7 @@
|
|
|
30
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)
|
|
31
26
|
* [Tree](src/ui/:.js) - [Node](src/ui/:.js) [.closeable](src/ui/Node:.js)
|
|
32
27
|
|
|
33
|
-
# prototypes `2022/04/17`
|
|
28
|
+
# [prototypes](src/:/) `2022/04/17`
|
|
34
29
|
|
|
35
30
|
> * [App](src/prototypes/:.js) - <= _#window is instantiated here (weirdly not in .desktop)_
|
|
36
31
|
* [.console](src/prototypes/App:.js) << _hotkeys_ _probably deprecated_
|
|
@@ -57,6 +52,101 @@
|
|
|
57
52
|
* [Query](src/prototypes/ui/entities/:.js) - [.scaffold](src/prototypes/ui/entities/Query:.js) - [scaffold.future](src/prototypes/ui/entities/Query:.js)
|
|
58
53
|
* [QueryFilters](src/prototypes/ui/entities/:.js)
|
|
59
54
|
|
|
55
|
+
# `2024/03/24` In the wild: veldapps-gds-devtools@2.0.16
|
|
56
|
+
|
|
57
|
+
* Features dynamic content property :-p
|
|
58
|
+
|
|
59
|
+

|
|
60
|
+
|
|
61
|
+
# `2024/02/18` Component::disable vs Control::hide
|
|
62
|
+
|
|
63
|
+
> _using :: for member functions_
|
|
64
|
+
|
|
65
|
+
Something is out of balance:
|
|
66
|
+
|
|
67
|
+
* Control::show - calls setVisible(true)
|
|
68
|
+
* Control::hide - calls setVisible(false)
|
|
69
|
+
* Component::disable - is event stub?
|
|
70
|
+
|
|
71
|
+
One should be able to call disable() and enable() like hide() and show(). So, then the same goes for all ControlState?
|
|
72
|
+
|
|
73
|
+
* collapse() and expand()
|
|
74
|
+
* hide() and show()
|
|
75
|
+
* disable() and enable()
|
|
76
|
+
* ... _TODO_
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
* [flexboxfroggy](https://flexboxfroggy.com/)
|
|
81
|
+
|
|
82
|
+
# `2023/12/28` List.prototype.sortBy
|
|
83
|
+
|
|
84
|
+
* Sorts by js.nameOf when typeof value === "object"
|
|
85
|
+
|
|
86
|
+
# `2023/11/17` List.autoColumns
|
|
87
|
+
|
|
88
|
+
* false, true, or _config_
|
|
89
|
+
* onAutoColumns(evt{columns}) {} // manipulate just before creating
|
|
90
|
+
|
|
91
|
+
# `2023/10/31` vcl/Control reflectState-methods
|
|
92
|
+
|
|
93
|
+
The following methods are called by vcl/Control::update in order to update certain attributes or visual style of the control so that it reflects the state in question.
|
|
94
|
+
|
|
95
|
+
* enabled: enable/disable
|
|
96
|
+
* selected: select/un/deselect
|
|
97
|
+
* hovered: hover/unhover
|
|
98
|
+
* focused: blur/focus - Ace/setFocus
|
|
99
|
+
* visible: showNode/hideNode - ListColumn/showNode
|
|
100
|
+
* showing
|
|
101
|
+
* expanded: expand/collapse - Node
|
|
102
|
+
|
|
103
|
+
Now, the latter is different for the reason that the methods show() and hide() actually manipulate the state-property, not reflect it. Something is "out of symmetry" here. Looking at their names, it eems that the other methods also have this sense to it, ie. manipulating a property. But they don't.
|
|
104
|
+
|
|
105
|
+
The following has no effect on the enabled property:
|
|
106
|
+
|
|
107
|
+
> control.enabled() // instead control.setEnabled(true), must be used
|
|
108
|
+
control.disable()
|
|
109
|
+
|
|
110
|
+
It might be time to refactor and renames these methods, with a Node suffix, as well.
|
|
111
|
+
|
|
112
|
+
Not sure what will "fall down/over" when doing that.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
>
|
|
116
|
+
* [sampleapp](#workspace-open::) - [index.md]()?
|
|
117
|
+
* "refork/reset": like in the rapportage-module, open nested form based on settings set in parent and then instantiate/fabric a container, but then come back to the settings and change them and "refork"
|
|
118
|
+
* vcl/Action: add/remove classes, like enable/disabled
|
|
119
|
+
* √ vcl/Component.query: support for regexp in something like:
|
|
120
|
+
* √ `.qsa("*[name=/^Filter/]")`
|
|
121
|
+
* make Sizer transparent while timeout set to update
|
|
122
|
+
* margin in Console can also [$/#_]-notation/handles to previous values
|
|
123
|
+
* blocks.less is loaded twice in veldoffice-xxx-vcl projects
|
|
124
|
+
* vcl/ui/Tabs: animatePages/Controls?
|
|
125
|
+
* guess we need a host then? Or simply animating translate3d(x) (left/right) upon show?
|
|
126
|
+
* √ vcl/ui/ListColumn: autowidth not escaped
|
|
127
|
+

|
|
128
|
+
* vcl/ui/List - performance, Excel (on the web) is faster
|
|
129
|
+
* vcl/ui/List - auto columns
|
|
130
|
+
* dim content while scrolling, fade in/out
|
|
131
|
+
* how to easily override in ListOf<>
|
|
132
|
+
* √ toggle capitalization of auto columns content
|
|
133
|
+
* toggle .-handling
|
|
134
|
+
* vcl/ui/Panel `zoom`-property
|
|
135
|
+
* bounds seem to be bigger
|
|
136
|
+
* Nested specializers become more and more urgent `Hover<ListOf<veldoffice:Onderzoek>>`
|
|
137
|
+
* Cmd+enter with many Hover<> becomes a mess - HOWTO keep track of focus?
|
|
138
|
+
* ui/Console: Alt+DblClick - orange animation
|
|
139
|
+
* interactive console, eg. `ls()` -=> result in folder-nodes?
|
|
140
|
+
* `textRenders` vs `rendering` - properties
|
|
141
|
+
* check whether `fire()` is consistently used, so that multiple event handlers can be implemented as an array (addEventListener("click", ...))
|
|
142
|
+
* `zoom`-property => [CVLN-20230921-1 - zoom property](/Dropbox-cavalion/Issues/:/)
|
|
143
|
+
|
|
144
|
+
# `2023/09/29` Bug in vcl/Control
|
|
145
|
+
|
|
146
|
+
Always interesting to find a bug in a low-level module/class/unit. Although, this has been bothering me for a while already, I kinda forgot about it. The warnings in the console didn't seem to trigger any reaction anymore. Because it will happen quite often.
|
|
147
|
+
|
|
148
|
+

|
|
149
|
+
|
|
60
150
|
# `2023/07/06` Factory.unreq
|
|
61
151
|
|
|
62
152
|
* [.js]()
|
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,51 @@
|
|
|
1
|
-
### `
|
|
1
|
+
### `2024/03/28` - 1.1.80
|
|
2
|
+
|
|
3
|
+
* **Component**: Enhances querying attributes: now supports use of regexp, eg: app.qs("*[attr=/value/]")
|
|
4
|
+
* **Control**:
|
|
5
|
+
* Itroduces dynamic content property
|
|
6
|
+
* Introduces Control.updateAll()
|
|
7
|
+
* Adds support for options parameter for scrollIntoView()
|
|
8
|
+
* **Query**: Adds support for one-parameter-object to setAll()
|
|
9
|
+
* **Ace**: Adds support for marking and patching diffs
|
|
10
|
+
* **Console**:
|
|
11
|
+
* Improves CSS styles
|
|
12
|
+
* Adds support for (shift+)ctrl+alt+Enter, printing and logging selection
|
|
13
|
+
* Aadds support for filtering history
|
|
14
|
+
* **Select**: Introduces getSelectedOption and getSelectedValue, and getOption
|
|
15
|
+
* **Tabs**: Improves makeVisible
|
|
16
|
+
* **ListColumn**:
|
|
17
|
+
* Updates display property according to setVisible()
|
|
18
|
+
* Improves getAttributeClassName() and autoWidth-feature
|
|
19
|
+
* **List**:
|
|
20
|
+
* Adds workaroundColumnAlignment
|
|
21
|
+
* Adds onColumnInit callback for autoColumns
|
|
22
|
+
* Adds onColumnsChanged event
|
|
23
|
+
|
|
24
|
+
### Prototypes
|
|
25
|
+
|
|
26
|
+
* **App.v1**: Hacking CSS - makes Hovers closing X hardly visible, appears when hovered
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### `2023/10/06` - 1.1.79
|
|
30
|
+
|
|
31
|
+
* **List**: Introduces options for behaviour of auto creating columns updates sorting updates auto-widthing updates the docs
|
|
32
|
+
* **Component**: Fixes an bug in prototype.getVar when dealing with default values
|
|
33
|
+
* **Component.query**: Fixes throwing exceptions when quering components for specific vars adds override to ComponentQueryResult-class
|
|
34
|
+
|
|
35
|
+
### `2023/09/16` - 1.1.78
|
|
36
|
+
|
|
37
|
+
* cleans up code for readability
|
|
38
|
+
* improves (and fixes?) sort algorithm/procedure - support for custom column sorting, based on value of attribute (not onGetValue)
|
|
39
|
+
* cleans up code for readability
|
|
40
|
+
* comments
|
|
41
|
+
* see previous comment
|
|
42
|
+
* :root => isRootComponent enchances toasting Sizer selection
|
|
43
|
+
* fixes reloadChildNodes-situation changes behavior of ui/Console, ignores <a>nchors, activates console on dblclick
|
|
44
|
+
* adds css styles to App.v1 simplifies code
|
|
45
|
+
* adds css styles to App.v1 simplifies code
|
|
46
|
+
* adjusts Component:setTimeout to automatically name unnamed timeout fixes Control:selectVisible which was pretty buggy - noticeably when trying to make workspace console or navigator visible fixes Node:childNodesNeeded so that callback is made correctly (fixes Cmd+F10 #resource-focus as well)
|
|
47
|
+
|
|
48
|
+
### `2023/09/06` - 1.1.77
|
|
2
49
|
|
|
3
50
|
* **Panel**: Adjusts zoom-logic TODO
|
|
4
51
|
* **Tab**: Implements onRender property
|
package/SNIPPETS.md
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
2023-11-03 22:06:49 /Users/ralph/Workspaces/cavalion.org/cavalion-vcl src/Component.js 58.31KB (59712)
|
|
2
|
+
2023-11-03 22:07:16 /Users/ralph/Workspaces/cavalion.org/cavalion-vcl src/Component.js 58.36KB (59761)
|
|
3
|
+
2023-11-03 22:07:22 /Users/ralph/Workspaces/cavalion.org/cavalion-vcl src/Component.js 58.38KB (59779)
|
|
4
|
+
2023-11-03 22:08:59 /Users/ralph/Workspaces/cavalion.org/cavalion-vcl .md 7.67KB (7851)
|
|
5
|
+
2023-11-03 22:10:37 /Users/ralph/Workspaces/cavalion.org/cavalion-vcl .md 7.67KB (7851)
|
|
6
|
+
2023-11-03 22:14:14 cavalion.org/cavalion-vcl .md 7.67KB (7851)
|
|
7
|
+
2023-11-03 22:16:03 cavalion.org/cavalion-vcl .md 7.67KB (7851)
|
|
8
|
+
2023-11-08 11:43:33 cavalion.org/cavalion-vcl src/Component.js 58.35KB (59746)
|
|
9
|
+
2023-11-17 22:41:20 cavalion.org/cavalion-vcl .md 7.84KB (8028)
|
|
10
|
+
2023-11-17 22:41:22 cavalion.org/cavalion-vcl .md 7.84KB (8027)
|
package/src/Component.js
CHANGED
|
@@ -23,7 +23,6 @@ define(function (require) {
|
|
|
23
23
|
};
|
|
24
24
|
return f;
|
|
25
25
|
};
|
|
26
|
-
this.print("@overrides", value);
|
|
27
26
|
for(var k in value) {
|
|
28
27
|
var method = wrap(value[k]);
|
|
29
28
|
|
|
@@ -40,7 +39,6 @@ this.print("@overrides", value);
|
|
|
40
39
|
}
|
|
41
40
|
};
|
|
42
41
|
|
|
43
|
-
|
|
44
42
|
Component = Component(require, {
|
|
45
43
|
prototype: {
|
|
46
44
|
// properties
|
|
@@ -285,6 +283,7 @@ this.print("@overrides", value);
|
|
|
285
283
|
args = ms;
|
|
286
284
|
ms = f;
|
|
287
285
|
f = name;
|
|
286
|
+
name = "timeout_" + (nextTick++);
|
|
288
287
|
}
|
|
289
288
|
|
|
290
289
|
// console.debug("setTimeout", name, [this, arguments]);
|
|
@@ -478,7 +477,7 @@ this.print("@overrides", value);
|
|
|
478
477
|
this._designerHook = value;
|
|
479
478
|
},
|
|
480
479
|
isRootComponent: function () {
|
|
481
|
-
return this._isRoot;
|
|
480
|
+
return this._isRoot || (this._uri || "").endsWith(":root"); // TODO
|
|
482
481
|
},
|
|
483
482
|
inheritsFrom: function (root) {
|
|
484
483
|
if (!root.isRootComponent()) {
|
|
@@ -553,13 +552,17 @@ this.print("@overrides", value);
|
|
|
553
552
|
return (this._vars && this._vars.hasOwnProperty(key)) || false;
|
|
554
553
|
},
|
|
555
554
|
getVar: function (namePath, fallback_to_owner, defaultValue) {
|
|
556
|
-
if (
|
|
555
|
+
if (this._vars !== null && arguments.length === 3) {
|
|
557
556
|
this._vars = this._vars || {};
|
|
558
557
|
}
|
|
559
558
|
|
|
560
559
|
var r = this._vars !== null ? js.get(namePath, this._vars, defaultValue) : undefined;
|
|
561
|
-
if (r === undefined
|
|
562
|
-
|
|
560
|
+
if (r === undefined) {
|
|
561
|
+
if(fallback_to_owner === true && this._owner !== null) {
|
|
562
|
+
r = this._owner.getVar(namePath, true, defaultValue);
|
|
563
|
+
} else if(arguments.length === 3) {
|
|
564
|
+
r = defaultValue;
|
|
565
|
+
}
|
|
563
566
|
}
|
|
564
567
|
return r;
|
|
565
568
|
},
|
|
@@ -811,10 +814,13 @@ this.print("@overrides", value);
|
|
|
811
814
|
return this.setProperties.apply(this, [js.str2obj(value)]);
|
|
812
815
|
}
|
|
813
816
|
return this.setProperties.apply(this, arguments);
|
|
814
|
-
},
|
|
817
|
+
}, // TODO might be moved to JsObject (set/get)
|
|
815
818
|
get: function(key) {
|
|
816
819
|
return this.defineProperties()[key].get(this);
|
|
817
820
|
},
|
|
821
|
+
// has: function(key) {
|
|
822
|
+
// return this.defineProperties().hasOwnProperty(key);
|
|
823
|
+
// },
|
|
818
824
|
properties: function() {
|
|
819
825
|
return this.defineProperties();
|
|
820
826
|
},
|
|
@@ -1533,7 +1539,7 @@ this.print("@overrides", value);
|
|
|
1533
1539
|
}
|
|
1534
1540
|
});
|
|
1535
1541
|
|
|
1536
|
-
// alias `#vcl-20200819-1`
|
|
1542
|
+
// alias `#vcl-20200819-1` - is it really being used? maybe move it to Code/VCL-prototypes/v1
|
|
1537
1543
|
Component.prototype.udown = Component.prototype.ud;
|
|
1538
1544
|
|
|
1539
1545
|
Property.registerReferencedClass(Component);
|
package/src/Component.query.js
CHANGED
|
@@ -653,7 +653,7 @@ define(function() {
|
|
|
653
653
|
Result.prototype = [];
|
|
654
654
|
|
|
655
655
|
/*- Prototype methods of Component, Control, Action to mixin */
|
|
656
|
-
"on,un,once,dispatch,emit,fire,listen,unlisten,connect,disconnect,get,set,execute,toggle,show,hide,render,selectNext,selectPrevious,selectNth,selectFirst,selectLast,toggleClass,print".split(",").forEach(function(name) {
|
|
656
|
+
"on,un,once,dispatch,emit,fire,listen,unlisten,override,connect,disconnect,get,set,execute,toggle,show,hide,render,selectNext,selectPrevious,selectNth,selectFirst,selectLast,toggleClass,print".split(",").forEach(function(name) {
|
|
657
657
|
Result.prototype[name] = function() {
|
|
658
658
|
for(var i = 0; i < this.length; ++i) {
|
|
659
659
|
if(typeof this[i][name] === "function") {
|
|
@@ -790,13 +790,14 @@ define(function() {
|
|
|
790
790
|
return component instanceof require("vcl" + "/Application");//.app();
|
|
791
791
|
} else if(pseudo.name === "instanceOf") {
|
|
792
792
|
return component instanceof require(pseudo.value.replace(/\\\//g, "/"));
|
|
793
|
-
} else if(pseudo.name === "withVars") {
|
|
793
|
+
} else if(pseudo.name === "withVars" || pseudo.name === "vars") {
|
|
794
794
|
var vars = component._vars || {};
|
|
795
|
-
try {
|
|
796
|
-
return eval("with(vars) { " + pseudo.value + "}");
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
795
|
+
// try {
|
|
796
|
+
// return eval("with(vars) { " + pseudo.value + "}");
|
|
797
|
+
return vars.hasOwnProperty(pseudo.value);
|
|
798
|
+
// } catch(e) {
|
|
799
|
+
// return false;
|
|
800
|
+
// }
|
|
800
801
|
}
|
|
801
802
|
|
|
802
803
|
var value;
|
|
@@ -831,20 +832,22 @@ define(function() {
|
|
|
831
832
|
}
|
|
832
833
|
function match_properties(rule, component) {
|
|
833
834
|
return rule.attrs.every(function(attr) {
|
|
835
|
+
|
|
834
836
|
if(attr.name === "uri") {
|
|
835
837
|
return match_uri({uri: attr.value.replace(/\\\//g, "/")}, component);
|
|
836
838
|
}
|
|
839
|
+
|
|
837
840
|
var prop = component.defineProperties()[attr.name];
|
|
838
841
|
var value = prop && prop.get(component);
|
|
839
842
|
if(value instanceof require("vcl/" + "Component")) {
|
|
840
843
|
value = value.getName();
|
|
841
844
|
}
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
845
|
+
|
|
846
|
+
if(attr.operator === "=") {
|
|
847
|
+
if(attr.value.startsWith("\\/") && attr.value.endsWith("\\/")) {
|
|
848
|
+
return new RegExp(attr.value.substring(2, attr.value.length - 4)).test("" + value)
|
|
849
|
+
}
|
|
850
|
+
return ("" + value) === attr.value;
|
|
848
851
|
}
|
|
849
852
|
});
|
|
850
853
|
}
|
package/src/Control.js
CHANGED
|
@@ -556,7 +556,27 @@ define(function(require) {
|
|
|
556
556
|
return new Dragger(this);
|
|
557
557
|
},
|
|
558
558
|
getInnerHtml: function() {
|
|
559
|
-
|
|
559
|
+
|
|
560
|
+
const parse = (str) => {
|
|
561
|
+
const v = (function() { return this.vars.apply(this, arguments); }).bind(this);
|
|
562
|
+
const qs = this.qs.bind(this);
|
|
563
|
+
const qsa = this.qsa.bind(this);
|
|
564
|
+
const up = this.up.bind(this);
|
|
565
|
+
const ud = this.ud.bind(this);
|
|
566
|
+
const udr = this.udr.bind(this);
|
|
567
|
+
|
|
568
|
+
// Replace the backticked expressions with their evaluations
|
|
569
|
+
return str.replace(/`([^`]+)`/g, (match, expression) => {
|
|
570
|
+
try {
|
|
571
|
+
return eval(js.sf("`%s`", expression));
|
|
572
|
+
} catch (error) {
|
|
573
|
+
console.error('Error evaluating expression:', expression);
|
|
574
|
+
return match; // Return the original match as a fallback
|
|
575
|
+
}
|
|
576
|
+
});
|
|
577
|
+
};
|
|
578
|
+
|
|
579
|
+
return parse(this._content || (this._action ? this._action.getContent(this) : ""));
|
|
560
580
|
},
|
|
561
581
|
render: function() {
|
|
562
582
|
if(this.isVisible()) {
|
|
@@ -574,9 +594,13 @@ define(function(require) {
|
|
|
574
594
|
// As far as know the same applies...
|
|
575
595
|
this.layoutChanged();
|
|
576
596
|
},
|
|
577
|
-
scrollIntoView: function() {
|
|
597
|
+
scrollIntoView: function(options) {
|
|
578
598
|
/** Makes sure that the calling node is visible by scrolling it into view when necessary. */
|
|
579
|
-
|
|
599
|
+
if(arguments.length === 0) {
|
|
600
|
+
return this.nodeNeeded().scrollIntoView();
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
return this.nodeNeeded().scrollIntoView(options);
|
|
580
604
|
},
|
|
581
605
|
|
|
582
606
|
documentToClient: function(x, y) {
|
|
@@ -1114,13 +1138,14 @@ define(function(require) {
|
|
|
1114
1138
|
this._parent.update(() => this.makeVisible());
|
|
1115
1139
|
return;
|
|
1116
1140
|
}
|
|
1141
|
+
|
|
1117
1142
|
if(!this.isVisible()) {
|
|
1118
1143
|
this.show();
|
|
1119
1144
|
}
|
|
1120
1145
|
},
|
|
1121
1146
|
selectVisible: function() {
|
|
1122
|
-
this.setSelected(true);
|
|
1123
1147
|
this.makeVisible();
|
|
1148
|
+
this.update(() => this.setSelected(true));
|
|
1124
1149
|
},
|
|
1125
1150
|
|
|
1126
1151
|
allowsUpdateChildren: function() {
|
|
@@ -1142,6 +1167,8 @@ define(function(require) {
|
|
|
1142
1167
|
this._post_update = this._post_update || [];
|
|
1143
1168
|
if(f !== undefined) {
|
|
1144
1169
|
this._post_update.push(f);
|
|
1170
|
+
} else {
|
|
1171
|
+
debugger;
|
|
1145
1172
|
}
|
|
1146
1173
|
},
|
|
1147
1174
|
updateChildren: function(recursive, directly) {
|
|
@@ -1337,14 +1364,14 @@ this._updateCalls = this._updateCalls || 0; this._updateCalls++;
|
|
|
1337
1364
|
}
|
|
1338
1365
|
|
|
1339
1366
|
if(this._post_update !== undefined) {
|
|
1340
|
-
while(this._post_update.length > 0) {
|
|
1367
|
+
while(this._post_update && this._post_update.length > 0) {
|
|
1341
1368
|
try {
|
|
1342
1369
|
this._post_update.shift()();
|
|
1343
1370
|
} catch(e) {
|
|
1344
1371
|
console.warn("Fix this, I said...", {catched: e});
|
|
1345
1372
|
}
|
|
1346
1373
|
}
|
|
1347
|
-
if(this._post_update.length === 0) {
|
|
1374
|
+
if(this._post_update && this._post_update.length === 0) {
|
|
1348
1375
|
delete this._post_update;
|
|
1349
1376
|
}
|
|
1350
1377
|
}
|
|
@@ -1852,7 +1879,6 @@ this._updateCalls = this._updateCalls || 0; this._updateCalls++;
|
|
|
1852
1879
|
},
|
|
1853
1880
|
statics: {
|
|
1854
1881
|
updateCallCount: 0,
|
|
1855
|
-
|
|
1856
1882
|
focused: null,
|
|
1857
1883
|
|
|
1858
1884
|
tree: (root) => root.getControls().reduce((r, c) => {
|
|
@@ -1860,7 +1886,6 @@ this._updateCalls = this._updateCalls || 0; this._updateCalls++;
|
|
|
1860
1886
|
return r;
|
|
1861
1887
|
}, Object.create(root, { hashCode: { value: () => ";-)" } })),
|
|
1862
1888
|
|
|
1863
|
-
|
|
1864
1889
|
findByNode: function(node) {
|
|
1865
1890
|
while(node !== null && node[EventDispatcher.elementKey] === undefined) {
|
|
1866
1891
|
node = node.parentNode || null; // IE
|
|
@@ -1921,7 +1946,40 @@ this._updateCalls = this._updateCalls || 0; this._updateCalls++;
|
|
|
1921
1946
|
proto["@className"] = className;
|
|
1922
1947
|
}
|
|
1923
1948
|
return className;
|
|
1949
|
+
},
|
|
1950
|
+
|
|
1951
|
+
updateAll(all, cb, track) {
|
|
1952
|
+
|
|
1953
|
+
all = all.filter(c => c.isVisible());
|
|
1954
|
+
|
|
1955
|
+
// track = track || (window.track = []);
|
|
1956
|
+
|
|
1957
|
+
return new Promise((resolve, reject) => {
|
|
1958
|
+
const total = all.length;
|
|
1959
|
+
const done = () => resolve(cb ? cb() : total);
|
|
1960
|
+
|
|
1961
|
+
if (total === 0) done();
|
|
1962
|
+
|
|
1963
|
+
let completed = 0;
|
|
1964
|
+
all.forEach((obj) => {
|
|
1965
|
+
|
|
1966
|
+
// track && track.push(obj);
|
|
1967
|
+
|
|
1968
|
+
obj.update(() => {
|
|
1969
|
+
|
|
1970
|
+
// if(track) track.splice(track.indexOf(obj), 1);
|
|
1971
|
+
|
|
1972
|
+
completed++;
|
|
1973
|
+
if (completed === total) {
|
|
1974
|
+
done();
|
|
1975
|
+
}
|
|
1976
|
+
});
|
|
1977
|
+
});
|
|
1978
|
+
});
|
|
1979
|
+
|
|
1924
1980
|
}
|
|
1981
|
+
|
|
1982
|
+
|
|
1925
1983
|
},
|
|
1926
1984
|
properties: {
|
|
1927
1985
|
|
package/src/entities/Query.js
CHANGED
|
@@ -220,7 +220,7 @@ define(function(require) {
|
|
|
220
220
|
if(this._orderBy !== "") {
|
|
221
221
|
criteria.orderBy = this._orderBy.split(",");
|
|
222
222
|
}
|
|
223
|
-
|
|
223
|
+
|
|
224
224
|
if(this.hasOwnProperty("_onGetRequestCriteria")) {
|
|
225
225
|
criteria = this.fire("onGetRequestCriteria", [criteria, page]);
|
|
226
226
|
}
|
|
@@ -453,6 +453,17 @@ define(function(require) {
|
|
|
453
453
|
return res;
|
|
454
454
|
}.bind(this));
|
|
455
455
|
} else {
|
|
456
|
+
if(entity && typeof entity === "object") {
|
|
457
|
+
refresh = entity.refresh || refresh;
|
|
458
|
+
count = entity.count || count;
|
|
459
|
+
orderBy = entity.orderBy || orderBy;
|
|
460
|
+
having = entity.having || having;
|
|
461
|
+
groupBy = entity.groupBy || groupBy;
|
|
462
|
+
where = entity.where || where;
|
|
463
|
+
attributes = entity.attributes || attributes;
|
|
464
|
+
entity = entity.entity || entity;
|
|
465
|
+
}
|
|
466
|
+
|
|
456
467
|
this._attributes = attributes;
|
|
457
468
|
this._entity = entity;
|
|
458
469
|
if(where) {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
* [actions](:/) - [make](:/) - [ui](:/)
|
|
2
|
+
|
|
3
|
+
# [prototypes](./)
|
|
4
|
+
|
|
5
|
+
> # [Component]((./:)) - [cavalion-blocks]((./:))
|
|
6
|
+
|
|
7
|
+
> # [App]((./:))
|
|
8
|
+
|
|
9
|
+
> * [vcl/Application]()
|
|
10
|
+
* [.console]((./App:)) [.desktop]((./App:)) [.framework7]((./App:))
|
|
11
|
+
* [.glassy]((./App:)) [.openform]((./App:)) [.scaffold]((./App:))
|
|
12
|
+
* [.toast]((./App:)) [.v1]((./App:))
|
|
13
|
+
|
|
14
|
+
> # [ui](:/) / [controls](ui/:/) | [entities](ui/:/) | [forms](ui/:/) / [util](ui/forms/:/)
|
|
15
|
+
|
|
16
|
+
>
|
|
17
|
+
* [ui/Form]((./:)) / [util/Console]((./ui/forms/:))
|
|
18
|
+
* [Portal]((./ui/forms/:)) [View]((./ui/forms/:)) [Home]((./ui/forms/:)) [.list]((./ui/forms/Home:)) [.tree]((./ui/forms/Home:))
|
|
19
|
+
* [Debug]((./ui/forms/:)) - see if there any usable code in there
|
|
20
|
+
* [Editor]((./ui/forms/:)) - can be deleted
|
|
21
|
+
* [ui/controls](:/) - deprecated it seems
|
|
22
|
+
* [SizeHandle.js](:/ui/controls/:)
|
|
23
|
+
* [Toolbar.js](:/ui/controls/:)
|
|
24
|
+
* [ui/entities](:/)
|
|
25
|
+
* [AttributeInput.js](ui/entities/:) [.scaffold.js](ui/entities/AttributeInput:)
|
|
26
|
+
* [.@checkbox.js](ui/entities/AttributeInput:) [.@input.js](ui/entities/AttributeInput:) [.@textarea.js](ui/entities/AttributeInput:)
|
|
27
|
+
* [.boolean.js](ui/entities/AttributeInput:) [.date.js](ui/entities/AttributeInput:) [.double.js](ui/entities/AttributeInput:)
|
|
28
|
+
* [.int.js](ui/entities/AttributeInput:) [.long.js](ui/entities/AttributeInput:) [.ref.js](ui/entities/AttributeInput:) - [.set.js](ui/entities/AttributeInput:)
|
|
29
|
+
* [.string.js](ui/entities/AttributeInput:) [.text.js](ui/entities/AttributeInput:) - [.timestamp.js](ui/entities/AttributeInput:)
|
|
30
|
+
* [Edit.js](ui/entities/:) [.scaffold.js](ui/entities/Edit:) [.modal.js](ui/entities/Edit:)
|
|
31
|
+
* [Home.js](ui/entities/)
|
|
32
|
+
* [Instance.js](ui/entities/:)
|
|
33
|
+
* [ModelNavigator.js](ui/entities/:)
|
|
34
|
+
* [Query.js](ui/entities/:) [.scaffold.js](ui/entities/Query:) [.scaffold.future.js](ui/entities/Query:)
|
|
35
|
+
* [QueryFilters.js](ui/entities/:)
|
package/src/prototypes/App.js
CHANGED
|
@@ -1,22 +1,10 @@
|
|
|
1
|
-
"
|
|
1
|
+
"";
|
|
2
2
|
|
|
3
|
-
[
|
|
4
|
-
|
|
5
|
-
onLoad() {
|
|
6
|
-
this._components[0].setParentNode(document.body);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
}, [
|
|
10
|
-
[("vcl/ui/Panel"), "window", {
|
|
3
|
+
["vcl/Application", { }, [
|
|
4
|
+
["vcl/ui/Panel", ("window"), {
|
|
11
5
|
align: "client", classes: "animated",
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"font-size": "9pt"
|
|
16
|
-
},
|
|
17
|
-
// "font-family": "SF Pro Text, SF UI Text, system-ui, Helvetica Neue, Helvetica, Lucida Grande, Arial, sans-serif",
|
|
18
|
-
"font-family": "Lucida Grande, Arial, sans-serif",
|
|
19
|
-
"font-size": "9pt"
|
|
20
|
-
}
|
|
6
|
+
onLoad() {
|
|
7
|
+
this.setParentNode(document.body);
|
|
8
|
+
}
|
|
21
9
|
}]
|
|
22
10
|
]];
|
package/src/prototypes/App.v1.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"util/HtmlElement, util/Fullscreen, vcl/ui/Element, vcl/ui/FormContainer";
|
|
1
|
+
"use util/HtmlElement, util/Fullscreen, vcl/ui/Element, vcl/ui/FormContainer, vcl/ui/Node, vcl/ui/Button";
|
|
2
2
|
|
|
3
3
|
var Fullscreen = require("util/Fullscreen");
|
|
4
4
|
var HtmlElement = require("util/HtmlElement");
|
|
@@ -50,7 +50,24 @@ var FormContainer = require("vcl/ui/FormContainer");
|
|
|
50
50
|
state && state.restore && state.restore(state);
|
|
51
51
|
}
|
|
52
52
|
}, [
|
|
53
|
-
[("#window"), {
|
|
53
|
+
[("#window"), {
|
|
54
|
+
css: {
|
|
55
|
+
'#close-x': {
|
|
56
|
+
'': "transition: opacity 1s; opacity: 0.1; position:absolute;top:0;right:0;color:silver;padding:4px 8px;font-size:14pt;z-index:999999999999;",
|
|
57
|
+
'&:hover': "color:black;cursor:pointer;opacity: 1;"
|
|
58
|
+
},
|
|
59
|
+
'font-family': "Lucida Grande, Arial, sans-serif",
|
|
60
|
+
'font-size': "9pt",
|
|
61
|
+
'.{./Button}': {
|
|
62
|
+
'font-size': "9pt",
|
|
63
|
+
'font-family': "Lucida Grande, Arial, sans-serif",
|
|
64
|
+
'vertical-align': "top",
|
|
65
|
+
'&.disabled': "color:gray;",
|
|
66
|
+
'&:not(:active)': "margin-bottom:4px;",
|
|
67
|
+
'&:active:active:active': "margin-bottom:0;margin-top:2px;border:2px solid rgb(57,121,217); padding-left:8px; padding-right:6px; background:-webkit-linear-gradient(top, rgb(255, 255, 255) 10%, rgb(227, 227, 227) 100%);"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}, [
|
|
54
71
|
["vcl/ui/FormContainer", "client", {
|
|
55
72
|
formUri: "./ui/forms/Portal<>"
|
|
56
73
|
}],
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
* [AttributeInput.js]()
|
|
2
|
+
* [.@checkbox.js](AttributeInput:)
|
|
3
|
+
* [.@input.js](AttributeInput:)
|
|
4
|
+
* [.@textarea.js](AttributeInput:)
|
|
5
|
+
* [.boolean.js](AttributeInput:)
|
|
6
|
+
* [.date.js](AttributeInput:)
|
|
7
|
+
* [.double.js](AttributeInput:)
|
|
8
|
+
* [.int.js](AttributeInput:)
|
|
9
|
+
* [.long.js](AttributeInput:)
|
|
10
|
+
* [.ref.js](AttributeInput:)
|
|
11
|
+
* [.scaffold.js](AttributeInput:)
|
|
12
|
+
* [.set.js](AttributeInput:)
|
|
13
|
+
* [.string.js](AttributeInput:)
|
|
14
|
+
* [.text.js](AttributeInput:)
|
|
15
|
+
* [.timestamp.js](AttributeInput:)
|
|
16
|
+
* [Edit.js]()
|
|
17
|
+
* [.modal.js](Edit:)
|
|
18
|
+
* [.scaffold.js](Edit:)
|
|
19
|
+
* [Home.js]()
|
|
20
|
+
* [Instance.js]()
|
|
21
|
+
* [ModelNavigator.js]()
|
|
22
|
+
* [Query.js]()
|
|
23
|
+
* [.scaffold.future.js](Query:)
|
|
24
|
+
* [.scaffold.js](Query:)
|
|
25
|
+
* [QueryFilters.js]()
|
|
@@ -12,7 +12,7 @@ var Handlers = {
|
|
|
12
12
|
|
|
13
13
|
if(component instanceof FormContainer) {
|
|
14
14
|
if(name === "formloadstart") {
|
|
15
|
-
root_scope.description.setContent("<img src='/shared/vcl/images/loading.gif'>");
|
|
15
|
+
// root_scope.description.setContent("<img src='/shared/vcl/images/loading.gif'>");
|
|
16
16
|
} else if((form = component.getForm()) !== null) {
|
|
17
17
|
form_scope = form.getScope();
|
|
18
18
|
if(name === "formload" && !form_scope.left) {
|
|
@@ -100,7 +100,7 @@ var Handlers = {
|
|
|
100
100
|
|
|
101
101
|
if(component instanceof FormContainer) {
|
|
102
102
|
if(name === "formloadstart") {
|
|
103
|
-
root_scope.description.setContent("<img src='/shared/vcl/images/loading.gif'>");
|
|
103
|
+
// root_scope.description.setContent("<img src='/shared/vcl/images/loading.gif'>");
|
|
104
104
|
} else if((form = component.getForm()) !== null) {
|
|
105
105
|
form_scope = form.getScope();
|
|
106
106
|
if(name === "formload" && !form_scope.left) {
|
|
@@ -84,7 +84,7 @@ var Component = require("vcl/Component");
|
|
|
84
84
|
},
|
|
85
85
|
"&.line": {
|
|
86
86
|
"padding-bottom": "8px",
|
|
87
|
-
"border-bottom": "1px solid gray"
|
|
87
|
+
// "border-bottom": "1px solid gray"
|
|
88
88
|
},
|
|
89
89
|
// "#title_outer": "color:green;",
|
|
90
90
|
"#title": "display: inline-block; font-size: 17pt; margin-right: 16px;",
|