efront 4.11.6 → 4.12.0
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/apps/pivot/task/invoke.html +1 -1
- package/apps/pivot/task/invoke.js +1 -0
- package/apps/pivot/task/invoke.less +7 -4
- package/coms/compile/unstruct.js +20 -7
- package/coms/compile/unstruct_test.js +1 -0
- package/coms/compile//347/264/240/351/246/250.js +243 -218
- package/coms/compile//347/264/240/351/246/250_test.js +3 -0
- package/coms/zimoli/field.less +11 -4
- package/coms/zimoli/render.js +10 -6
- package/coms/zimoli/tree.js +11 -0
- package/coms/zimoli/view.js +11 -6
- package/coms//350/214/250/350/217/260//346/270/262/346/237/223.js +1 -1
- package/package.json +1 -1
- package/public/efront.js +1 -1
- package/readme-en.md +7 -0
- package/readme.md +7 -0
|
@@ -2,16 +2,19 @@
|
|
|
2
2
|
position: absolute;
|
|
3
3
|
width: 800px;
|
|
4
4
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
border-bottom: 50px solid transparent;
|
|
8
|
-
}
|
|
5
|
+
|
|
6
|
+
|
|
9
7
|
>[body]>div {
|
|
10
8
|
display: inline-block;
|
|
11
9
|
vertical-align: top;
|
|
12
10
|
overflow: auto;
|
|
13
11
|
font-size: 12px;
|
|
14
12
|
|
|
13
|
+
>jscode,
|
|
14
|
+
>pre {
|
|
15
|
+
height: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
15
18
|
&.top {
|
|
16
19
|
left: 0;
|
|
17
20
|
top: 0;
|
package/coms/compile/unstruct.js
CHANGED
|
@@ -403,7 +403,7 @@ var patchstep = function (r, nextindex, h) {
|
|
|
403
403
|
x = rescan`if (${name}) return [${nextindex}, 0]`;
|
|
404
404
|
}
|
|
405
405
|
else if (o === RD) {
|
|
406
|
-
x = rescan`if (${name}!=
|
|
406
|
+
x = rescan`if (${name}!=null) return [${nextindex}, 0]`;
|
|
407
407
|
}
|
|
408
408
|
else continue;
|
|
409
409
|
changed = true;
|
|
@@ -941,6 +941,13 @@ var _express = function (body, getname, ret) {
|
|
|
941
941
|
q.name = cloneNode(body);
|
|
942
942
|
return [q];
|
|
943
943
|
}
|
|
944
|
+
if (isFunctionOnly(body)) {
|
|
945
|
+
result = [body];
|
|
946
|
+
return result;
|
|
947
|
+
}
|
|
948
|
+
else {
|
|
949
|
+
result = [];
|
|
950
|
+
}
|
|
944
951
|
var result = [];
|
|
945
952
|
var q = [];
|
|
946
953
|
var bx = 0;
|
|
@@ -949,6 +956,7 @@ var _express = function (body, getname, ret) {
|
|
|
949
956
|
var nameindex = 0;
|
|
950
957
|
var maxindex = 0;
|
|
951
958
|
var hasor = false;
|
|
959
|
+
var xorcount = 0;
|
|
952
960
|
var getdeepname = function (deep = 0) {
|
|
953
961
|
return getname(maxindex + deep);
|
|
954
962
|
};
|
|
@@ -1007,12 +1015,20 @@ var _express = function (body, getname, ret) {
|
|
|
1007
1015
|
q.name = cloneNode(name);
|
|
1008
1016
|
if (isor) {
|
|
1009
1017
|
if (o.text === '||') {
|
|
1018
|
+
if (xorcount) {
|
|
1019
|
+
result.push(..._invoke(q, getdeepname));
|
|
1020
|
+
result[result.length - 1].ret_ = true;
|
|
1021
|
+
q = [];
|
|
1022
|
+
q.name = cloneNode(name);
|
|
1023
|
+
}
|
|
1010
1024
|
q.push(RE);
|
|
1011
1025
|
}
|
|
1012
1026
|
else if (o.text === '&&') {
|
|
1013
1027
|
q.push(RZ);
|
|
1028
|
+
xorcount++;
|
|
1014
1029
|
}
|
|
1015
1030
|
else if (o.text === '??') {
|
|
1031
|
+
xorcount++;
|
|
1016
1032
|
q.push(RD);
|
|
1017
1033
|
}
|
|
1018
1034
|
hasor = true;
|
|
@@ -1065,12 +1081,9 @@ var _express = function (body, getname, ret) {
|
|
|
1065
1081
|
}
|
|
1066
1082
|
}
|
|
1067
1083
|
if (needname) q.name = [{ text: getname(nameindex), type: EXPRESS }];
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
result
|
|
1071
|
-
}
|
|
1072
|
-
else {
|
|
1073
|
-
result = _invoke(q, getdeepname);
|
|
1084
|
+
if (q.length) {
|
|
1085
|
+
relink(q);
|
|
1086
|
+
result.push(..._invoke(q, getdeepname));
|
|
1074
1087
|
}
|
|
1075
1088
|
if (hasor) result[result.length - 1].ret_ = true;
|
|
1076
1089
|
return result;
|
|
@@ -158,4 +158,5 @@ unstruct.debug = true; r++;
|
|
|
158
158
|
r++// test("if(a)else {}",'')
|
|
159
159
|
test("if(a){if(b){c}d}else{e}", `if (!a) return [2, 0]; if (!b) return [1, 0]; c; return [1, 0];\r\n d; return [2, 0];\r\n e; return [1, 0]`)
|
|
160
160
|
test("if(a){if(b){c}else{d}}else{e}", `if (!a) return [3, 0]; if (!b) return [1, 0]; c; return [2, 0];\r\n d; return [1, 0];\r\n return [2, 0];\r\n e; return [1, 0]`)
|
|
161
|
+
test("if(a&&b||c){d}", `_ = a; if (!_) return [1, 0]; _ = b;\r\n if (_) return [1, 0]; _ = c;\r\n if (!_) return [1, 0]; d; return [1, 0]`, true);
|
|
161
162
|
test("if(a)switch(b){case c:d;break;} else{h}", `if (!a) return [3, 0]; if (b === c) return [1, 0]; return [2, 0];\r\n d; return [1, 0];\r\n return [2, 0];\r\n h; return [1, 0]`)
|