cavalion-vcl 1.1.78 → 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 +45 -0
- package/SNIPPETS.md +3 -0
- package/package.json +1 -1
- package/package_monitor.log +10 -0
- package/src/Component.js +8 -6
- package/src/Component.query.js +16 -13
- package/src/Control.js +64 -7
- package/src/entities/Query.js +12 -1
- package/src/prototypes/.md +35 -0
- package/src/prototypes/App.v1.js +4 -3
- 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 +7 -5
- package/src/ui/Ace.js +101 -19
- package/src/ui/Console.js +48 -15
- package/src/ui/LargeIcon.js +28 -39
- package/src/ui/List.js +53 -21
- package/src/ui/ListColumn.js +18 -10
- package/src/ui/Node.closeable.js +8 -9
- package/src/ui/Select.js +11 -1
- package/src/ui/Tabs.js +14 -9
- 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,5 +1,50 @@
|
|
|
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
|
+
|
|
1
35
|
### `2023/09/16` - 1.1.78
|
|
2
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
|
+
|
|
3
48
|
### `2023/09/06` - 1.1.77
|
|
4
49
|
|
|
5
50
|
* **Panel**: Adjusts zoom-logic TODO
|
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
|
|
@@ -554,13 +552,17 @@ this.print("@overrides", value);
|
|
|
554
552
|
return (this._vars && this._vars.hasOwnProperty(key)) || false;
|
|
555
553
|
},
|
|
556
554
|
getVar: function (namePath, fallback_to_owner, defaultValue) {
|
|
557
|
-
if (
|
|
555
|
+
if (this._vars !== null && arguments.length === 3) {
|
|
558
556
|
this._vars = this._vars || {};
|
|
559
557
|
}
|
|
560
558
|
|
|
561
559
|
var r = this._vars !== null ? js.get(namePath, this._vars, defaultValue) : undefined;
|
|
562
|
-
if (r === undefined
|
|
563
|
-
|
|
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
|
+
}
|
|
564
566
|
}
|
|
565
567
|
return r;
|
|
566
568
|
},
|
|
@@ -1537,7 +1539,7 @@ this.print("@overrides", value);
|
|
|
1537
1539
|
}
|
|
1538
1540
|
});
|
|
1539
1541
|
|
|
1540
|
-
// alias `#vcl-20200819-1`
|
|
1542
|
+
// alias `#vcl-20200819-1` - is it really being used? maybe move it to Code/VCL-prototypes/v1
|
|
1541
1543
|
Component.prototype.udown = Component.prototype.ud;
|
|
1542
1544
|
|
|
1543
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) {
|
|
@@ -1143,6 +1167,8 @@ define(function(require) {
|
|
|
1143
1167
|
this._post_update = this._post_update || [];
|
|
1144
1168
|
if(f !== undefined) {
|
|
1145
1169
|
this._post_update.push(f);
|
|
1170
|
+
} else {
|
|
1171
|
+
debugger;
|
|
1146
1172
|
}
|
|
1147
1173
|
},
|
|
1148
1174
|
updateChildren: function(recursive, directly) {
|
|
@@ -1338,14 +1364,14 @@ this._updateCalls = this._updateCalls || 0; this._updateCalls++;
|
|
|
1338
1364
|
}
|
|
1339
1365
|
|
|
1340
1366
|
if(this._post_update !== undefined) {
|
|
1341
|
-
while(this._post_update.length > 0) {
|
|
1367
|
+
while(this._post_update && this._post_update.length > 0) {
|
|
1342
1368
|
try {
|
|
1343
1369
|
this._post_update.shift()();
|
|
1344
1370
|
} catch(e) {
|
|
1345
1371
|
console.warn("Fix this, I said...", {catched: e});
|
|
1346
1372
|
}
|
|
1347
1373
|
}
|
|
1348
|
-
if(this._post_update.length === 0) {
|
|
1374
|
+
if(this._post_update && this._post_update.length === 0) {
|
|
1349
1375
|
delete this._post_update;
|
|
1350
1376
|
}
|
|
1351
1377
|
}
|
|
@@ -1853,7 +1879,6 @@ this._updateCalls = this._updateCalls || 0; this._updateCalls++;
|
|
|
1853
1879
|
},
|
|
1854
1880
|
statics: {
|
|
1855
1881
|
updateCallCount: 0,
|
|
1856
|
-
|
|
1857
1882
|
focused: null,
|
|
1858
1883
|
|
|
1859
1884
|
tree: (root) => root.getControls().reduce((r, c) => {
|
|
@@ -1861,7 +1886,6 @@ this._updateCalls = this._updateCalls || 0; this._updateCalls++;
|
|
|
1861
1886
|
return r;
|
|
1862
1887
|
}, Object.create(root, { hashCode: { value: () => ";-)" } })),
|
|
1863
1888
|
|
|
1864
|
-
|
|
1865
1889
|
findByNode: function(node) {
|
|
1866
1890
|
while(node !== null && node[EventDispatcher.elementKey] === undefined) {
|
|
1867
1891
|
node = node.parentNode || null; // IE
|
|
@@ -1922,7 +1946,40 @@ this._updateCalls = this._updateCalls || 0; this._updateCalls++;
|
|
|
1922
1946
|
proto["@className"] = className;
|
|
1923
1947
|
}
|
|
1924
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
|
+
|
|
1925
1980
|
}
|
|
1981
|
+
|
|
1982
|
+
|
|
1926
1983
|
},
|
|
1927
1984
|
properties: {
|
|
1928
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.v1.js
CHANGED
|
@@ -53,8 +53,8 @@ var FormContainer = require("vcl/ui/FormContainer");
|
|
|
53
53
|
[("#window"), {
|
|
54
54
|
css: {
|
|
55
55
|
'#close-x': {
|
|
56
|
-
'': "position:absolute;top:0;right:0;color:silver;padding:4px 8px;font-size:14pt;z-index:999999999999;",
|
|
57
|
-
'&:hover': "color:black;cursor:pointer;"
|
|
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
58
|
},
|
|
59
59
|
'font-family': "Lucida Grande, Arial, sans-serif",
|
|
60
60
|
'font-size': "9pt",
|
|
@@ -63,7 +63,8 @@ var FormContainer = require("vcl/ui/FormContainer");
|
|
|
63
63
|
'font-family': "Lucida Grande, Arial, sans-serif",
|
|
64
64
|
'vertical-align': "top",
|
|
65
65
|
'&.disabled': "color:gray;",
|
|
66
|
-
'&:active': "
|
|
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%);"
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
}, [
|
|
@@ -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;",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[["ui/Form"], {
|
|
4
4
|
css: {
|
|
5
5
|
// TODO refactor to be 'singleton' (iykwim)
|
|
6
|
-
'#menubar': {
|
|
6
|
+
'#menubar#menubar#menubar': {
|
|
7
7
|
'&.loading': "background: url(/shared/vcl/images/loading.gif) no-repeat 50% 50%;",
|
|
8
8
|
'&.nested-in-tabs': {
|
|
9
9
|
'': "padding: 2px; border: none;",
|
|
@@ -101,9 +101,9 @@
|
|
|
101
101
|
["vcl/ui/Panel", ("left_content"), { align: "top", autoSize: "height" }, [
|
|
102
102
|
["vcl/ui/Element", ("description"), {
|
|
103
103
|
content: [
|
|
104
|
-
"A view form consists of a panel aligned to the left ",
|
|
105
|
-
"and one aligned client. The client panel usually shows a menubar ",
|
|
106
|
-
"aligned to the top."
|
|
104
|
+
// "A view form consists of a panel aligned to the left ",
|
|
105
|
+
// "and one aligned client. The client panel usually shows a menubar ",
|
|
106
|
+
// "aligned to the top."
|
|
107
107
|
].join("")
|
|
108
108
|
}]
|
|
109
109
|
]]
|
|
@@ -17,6 +17,8 @@ var deselect = () => {
|
|
|
17
17
|
document.selection && document.selection.empty();
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
+
var cl = console.log;
|
|
21
|
+
|
|
20
22
|
[["ui/Form"], {
|
|
21
23
|
activeControl: "console",
|
|
22
24
|
align: "bottom",
|
|
@@ -38,7 +40,7 @@ var deselect = () => {
|
|
|
38
40
|
|
|
39
41
|
sizer.on("setControl", function (value) {
|
|
40
42
|
if(value) {
|
|
41
|
-
// app.toast({ content: js.sf("%n", value), classes: "glassy fade"});
|
|
43
|
+
// app.toast({ content: js.sf("SETCONTROL: %n", value), classes: "glassy fade"});
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
var consoles = this.app().qsa("vcl/ui/Console").filter(c => c.isVisible());
|
|
@@ -71,9 +73,9 @@ var deselect = () => {
|
|
|
71
73
|
if (value._owner) {
|
|
72
74
|
content.push(String.format("%n", value._owner));
|
|
73
75
|
}
|
|
76
|
+
app.toast({ title: js.sf("%n", value), content: js.sf("<ul style='padding:0;padding-left:8px;'><li>%s</li></ul>", content.join("</li><li>")), classes: "glassy fade"});
|
|
74
77
|
}
|
|
75
78
|
scope.sizer_selection.setContent(String.format("%H", content.join(" - ")));
|
|
76
|
-
app.toast({ title: js.sf("%n", value), content: js.sf("<ul style='padding:0;padding-left:8px;'><li>%s</li></ul>", content.join("</li><li>")), classes: "glassy fade"});
|
|
77
79
|
}, true);
|
|
78
80
|
|
|
79
81
|
var down;
|
|
@@ -105,10 +107,11 @@ var deselect = () => {
|
|
|
105
107
|
}
|
|
106
108
|
|
|
107
109
|
if(sizer._control !== null && name === "keyup" && evt.keyCode === 46 /*Delete*/) {
|
|
108
|
-
const
|
|
110
|
+
const uri = js.sf("%s%s%s", sizer._control.getUri(), sizer._control.isSelected() ? ":selected" : "", sizer._control.isRootComponent() ? ":root" : "");
|
|
111
|
+
const names = js.sf("%s#%n", uri, sizer._control).split("#");
|
|
109
112
|
let n;
|
|
110
113
|
if(confirm(js.sf("Choose OK in order to confirm the destruction of the following component:\n\n%s\n\n%d component%s will be destroyed.",
|
|
111
|
-
names.map((n, i) => js.sf("- %s%s", i ? "#" : "", n)).join("\n"),
|
|
114
|
+
names.map((n, i) => js.sf("- %s%s", i > 1 ? "#" : "", n)).join("\n"),
|
|
112
115
|
(n = sizer._control.qsa("*").length + 1), n === 1 ? "" : "s"
|
|
113
116
|
))) {
|
|
114
117
|
sizer._control.destroy();
|
|
@@ -228,7 +231,6 @@ var deselect = () => {
|
|
|
228
231
|
this.up().print("document", window.location);
|
|
229
232
|
},
|
|
230
233
|
onEvaluate(expr) {
|
|
231
|
-
|
|
232
234
|
const cl = console.log;
|
|
233
235
|
// const cc = require("clipboard-copy");
|
|
234
236
|
const pr = () => this.print.apply(this, arguments);
|