efront 3.13.1 → 3.14.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/api.yml +7 -0
- package/apps/pivot/log/boot.html +2 -0
- package/apps/pivot/log/boot.js +44 -0
- package/apps/pivot/log/boot.less +11 -0
- package/apps/pivot/log/count.html +5 -1
- package/apps/pivot/log/count.js +11 -4
- package/apps/pivot/log/count.less +10 -2
- package/apps/pivot/main.js +9 -10
- package/apps/pivot/menu.yml +7 -3
- package/apps/pivot/proxy/edit.js +1 -0
- package/apps/pivot/proxy/list.js +12 -0
- package/apps/pivot/user/edit.js +1 -0
- package/apps/pivot/user/list.js +4 -0
- package/apps/pivot/user/tag/edit.js +1 -0
- package/apps/pivot/user/tag/list.js +3 -0
- package/coms/basic/cross_.js +8 -1
- package/coms/basic/encodePack.js +2 -9
- package/coms/basic/parseURL_test.js +2 -0
- package/coms/basic/renderExpress.js +1 -1
- package/coms/compile/common.js +165 -6
- package/coms/compile/scanner.js +7 -4
- package/coms/compile/scanner2.js +2 -117
- package/coms/compile/washcode.js +313 -0
- package/coms/frame/route.js +3 -0
- package/coms/pivot/plist.js +1 -1
- package/coms/typescript-helpers/__classPrivateFieldIn.js +11 -0
- package/coms/zimoli/cross.js +2 -3
- package/coms/zimoli/data.js +22 -4
- package/coms/zimoli/field.html +15 -10
- package/coms/zimoli/model.js +22 -1
- package/coms/zimoli/prompt.js +3 -1
- package/coms/zimoli/render.js +11 -8
- package/coms/zimoli/renderDefaults.js +1 -0
- package/coms/zimoli/search.js +5 -4
- package/coms/zimoli/select.js +7 -3
- package/coms/zimoli/selectList.js +7 -7
- package/coms/zimoli/selectListEdit.js +1 -1
- package/coms/zimoli/success.js +4 -0
- package/coms/zimoli/success.less +13 -0
- package/coms/zimoli/view.less +4 -0
- package/package.json +1 -1
- package/public/efront.js +1 -1
- package/apps/pivot/home/short.html +0 -1
- package/apps/pivot/home/short.js +0 -5
- package/apps/pivot/home/short.less +0 -1
package/coms/zimoli/render.js
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
var hasOwnProperty = {}.hasOwnProperty;
|
|
2
2
|
var renderElements = Object.create(null);
|
|
3
3
|
var presets = Object.create(null);
|
|
4
|
+
presets.template = function (t) {
|
|
5
|
+
var node = document.createElement("div");
|
|
6
|
+
var comment = document.createComment('template');
|
|
7
|
+
node.innerHTML = t.innerHTML;
|
|
8
|
+
comment.with = [].slice.call(node.childNodes, 0);
|
|
9
|
+
renderElement(comment.with, t.$scope, t.$parentScopes);
|
|
10
|
+
remove(node.childNodes);
|
|
11
|
+
return comment;
|
|
12
|
+
};
|
|
4
13
|
window.renderElements = renderElements;
|
|
5
14
|
var renderidOffset = 10;
|
|
6
15
|
var renderidClosed = 0;
|
|
@@ -70,7 +79,6 @@ var initialComment = function (renders, type, expression) {
|
|
|
70
79
|
onremove(comment, removeRenderElement);
|
|
71
80
|
appendChild.after(this, comment);
|
|
72
81
|
if (!/if/i.test(type)) remove(this);
|
|
73
|
-
this.with = comment;
|
|
74
82
|
rebuild(comment);
|
|
75
83
|
return comment;
|
|
76
84
|
};
|
|
@@ -214,17 +222,12 @@ var createIf = function (search, id = 0) {
|
|
|
214
222
|
var element = elements[cx];
|
|
215
223
|
if (cx === shouldMount) {
|
|
216
224
|
appendChild.before(this, element);
|
|
217
|
-
element.with = this;
|
|
218
225
|
if (element.renderid < 0) {
|
|
219
226
|
element.renderid = id;
|
|
220
|
-
|
|
221
|
-
delete element.with;
|
|
222
|
-
element = render(element);
|
|
223
|
-
element.with = w;
|
|
227
|
+
elements[cx] = render(element);
|
|
224
228
|
}
|
|
225
229
|
}
|
|
226
230
|
else {
|
|
227
|
-
delete element.with;
|
|
228
231
|
remove(element);
|
|
229
232
|
}
|
|
230
233
|
}
|
|
@@ -672,7 +675,7 @@ function renderElement(element, scope = element.$scope, parentScopes = element.$
|
|
|
672
675
|
}
|
|
673
676
|
}
|
|
674
677
|
}
|
|
675
|
-
if (element.children.length) renderElement(element.children, scope, parentScopes);
|
|
678
|
+
if (element.children && element.children.length) renderElement(element.children, scope, parentScopes);
|
|
676
679
|
if (!isFirstRender) return element;
|
|
677
680
|
for (var k in binds) {
|
|
678
681
|
if (directives.hasOwnProperty(k)) {
|
package/coms/zimoli/search.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
function search(seartext, options) {
|
|
1
|
+
function search(seartext, options, path = "name") {
|
|
2
2
|
if (options instanceof Array) {
|
|
3
3
|
var hasFullmatch = false;
|
|
4
4
|
var a = options.map(o => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
var name = seek(o, path);
|
|
6
|
+
if (name === seartext) hasFullmatch = true;
|
|
7
|
+
var [power, m] = mark.power(name, seartext);
|
|
8
|
+
return { power, [path]: m, value: o.value, item: o };
|
|
8
9
|
}).filter(a => a.power > 0);
|
|
9
10
|
a.sort(function (a, b) {
|
|
10
11
|
return b.power - a.power;
|
package/coms/zimoli/select.js
CHANGED
|
@@ -24,6 +24,10 @@ var _remove = function () {
|
|
|
24
24
|
var preventDefault = function (event) {
|
|
25
25
|
event.preventDefault();
|
|
26
26
|
};
|
|
27
|
+
var preventDefault1 = function (event) {
|
|
28
|
+
if (saved_list) return;
|
|
29
|
+
event.preventDefault();
|
|
30
|
+
}
|
|
27
31
|
var lastTimeClick = 0;
|
|
28
32
|
var removeByBlur = function () {
|
|
29
33
|
if (!getTargetIn(this, document.activeElement)) _remove();
|
|
@@ -71,8 +75,8 @@ function select(target, list, removeOnSelect, direction) {
|
|
|
71
75
|
target.innerHTML = `<option selected value="${this.value}">${this.name || this.value}</option>`
|
|
72
76
|
}
|
|
73
77
|
target.value = this.value;
|
|
74
|
-
dispatch(target, "change");
|
|
75
78
|
}
|
|
79
|
+
dispatch(target, "change");
|
|
76
80
|
}
|
|
77
81
|
};
|
|
78
82
|
var onlistclick = function (event) {
|
|
@@ -96,8 +100,8 @@ function select(target, list, removeOnSelect, direction) {
|
|
|
96
100
|
}
|
|
97
101
|
on("keydown.up")(target, preventDefault);
|
|
98
102
|
on("keydown.down")(target, preventDefault);
|
|
99
|
-
on("keydown.enter")(target,
|
|
100
|
-
on("keydown.space")(target,
|
|
103
|
+
on("keydown.enter")(target, preventDefault1);
|
|
104
|
+
on("keydown.space")(target, preventDefault1);
|
|
101
105
|
var pop = function () {
|
|
102
106
|
if (saved_list !== list) mousedown.call(this);
|
|
103
107
|
};
|
|
@@ -60,7 +60,7 @@ function main() {
|
|
|
60
60
|
function createItem(option) {
|
|
61
61
|
var key = option.key || option.value;
|
|
62
62
|
if (key in itemMap) return itemMap[key];
|
|
63
|
-
var item = itemMap[
|
|
63
|
+
var item = itemMap[key] = document.createElement('div');
|
|
64
64
|
item.setAttribute("item", '');
|
|
65
65
|
item.innerHTML = option.innerHTML || option.name;
|
|
66
66
|
item.name = option.name || option.innerHTML;
|
|
@@ -78,12 +78,12 @@ function main() {
|
|
|
78
78
|
iconed = icon;
|
|
79
79
|
if (multiple) {
|
|
80
80
|
item.setAttribute("selected", "");
|
|
81
|
-
page.value.push(
|
|
81
|
+
page.value.push(key);
|
|
82
82
|
}
|
|
83
83
|
else {
|
|
84
84
|
item.setAttribute("selected", "");
|
|
85
85
|
page.activeNode = item;
|
|
86
|
-
page.value =
|
|
86
|
+
page.value = key
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
if (option.disabled) {
|
|
@@ -142,10 +142,9 @@ function main() {
|
|
|
142
142
|
if (a in itemMap) return false;
|
|
143
143
|
cast(page.target, "add-option", a);
|
|
144
144
|
children.push({ name: a, key: a });
|
|
145
|
-
page.
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}), adder);
|
|
145
|
+
remove(page.children);
|
|
146
|
+
page.go(children.length - 1);
|
|
147
|
+
appendChild(page, adder);
|
|
149
148
|
break;
|
|
150
149
|
case this.children[1]:
|
|
151
150
|
var options = [].slice.call(children, 0, children.length);
|
|
@@ -216,6 +215,7 @@ function main() {
|
|
|
216
215
|
moveFocus(0);
|
|
217
216
|
})
|
|
218
217
|
var enter = function (e) {
|
|
218
|
+
if (e.defaultPrevented) return;
|
|
219
219
|
e.preventDefault();
|
|
220
220
|
var e = page.getIndexedElement(focus);
|
|
221
221
|
if (e) e.click();
|
package/coms/zimoli/view.less
CHANGED