efront 3.23.0 → 3.24.5
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/kugou/main.js +1 -3
- package/coms/basic/BigNumber.js +28 -5
- package/coms/basic/BigNumber_test.js +14 -1
- package/coms/basic/[]map.js +18 -13
- package/coms/basic/assert.js +10 -2
- package/coms/basic/extends_.js +13 -0
- package/coms/basic/loader.js +47 -28
- package/coms/basic/mark.js +155 -0
- package/coms/basic/queue.js +11 -14
- package/coms/basic/rest_.js +27 -0
- package/coms/basic/submit_.js +3 -1
- package/{apps → coms}/kugou/api.js +2 -0
- package/coms/kugou/buildList.js +7 -1
- package/coms/kugou/parseSongsList.js +1 -1
- package/coms/kugou/player.js +4 -2
- package/coms/kugou/song.html +1 -1
- package/coms/kugou/song.js +1 -0
- package/coms/kugou/song.less +12 -4
- package/coms/zimoli/Promise.js +84 -133
- package/coms/zimoli/appendChild.js +4 -14
- package/coms/zimoli/cless.js +11 -5
- package/coms/zimoli/color.js +0 -1
- package/coms/zimoli/compile.js +64 -1
- package/coms/{compile → zimoli}/compile_test.js +0 -0
- package/coms/zimoli/cross.js +1 -1
- package/coms/zimoli/data.js +14 -4
- package/coms/zimoli/dispatch.js +1 -1
- package/coms/zimoli/input.js +6 -4
- package/coms/zimoli/on.js +64 -47
- package/coms/zimoli/remove.js +0 -9
- package/coms/zimoli/render.js +2 -2
- package/coms/zimoli/zimoli.js +2 -2
- package/package.json +1 -1
- package/public/efront.js +1 -1
- package/apps/zimoli/book/main.js +0 -8
- package/apps/zimoli/broadcast/main.js +0 -8
- package/apps/zimoli/collection/add.html +0 -13
- package/apps/zimoli/collection/add.js +0 -14
- package/apps/zimoli/collection/add.less +0 -0
- package/apps/zimoli/collection/main.html +0 -0
- package/apps/zimoli/collection/main.js +0 -13
- package/apps/zimoli/collection/main.less +0 -8
- package/apps/zimoli/config.js +0 -14
- package/apps/zimoli/extra/pending.html +0 -1
- package/apps/zimoli/extra/pending.js +0 -8
- package/apps/zimoli/extra/pending.less +0 -15
- package/apps/zimoli/files/info.js +0 -7
- package/apps/zimoli/files/main.js +0 -108
- package/apps/zimoli/files/main.less +0 -26
- package/apps/zimoli/images/avatar.png +0 -0
- package/apps/zimoli/images/background.jpg +0 -0
- package/apps/zimoli/index.html +0 -42
- package/apps/zimoli/kugou/font/demo.css +0 -539
- package/apps/zimoli/kugou/font/demo_index.html +0 -1159
- package/apps/zimoli/kugou/font/iconfont.css +0 -189
- package/apps/zimoli/kugou/font/iconfont.eot +0 -0
- package/apps/zimoli/kugou/font/iconfont.js +0 -1
- package/apps/zimoli/kugou/font/iconfont.svg +0 -155
- package/apps/zimoli/kugou/font/iconfont.ttf +0 -0
- package/apps/zimoli/kugou/font/iconfont.woff +0 -0
- package/apps/zimoli/kugou/font/iconfont.woff2 +0 -0
- package/apps/zimoli/kugou/listen.html +0 -15
- package/apps/zimoli/kugou/listen.js +0 -37
- package/apps/zimoli/kugou/listen.less +0 -114
- package/apps/zimoli/kugou/mine.html +0 -53
- package/apps/zimoli/kugou/mine.js +0 -21
- package/apps/zimoli/kugou/mine.less +0 -106
- package/apps/zimoli/kugou/search.js +0 -109
- package/apps/zimoli/kugou/search.less +0 -50
- package/apps/zimoli/kugou/sing.js +0 -42
- package/apps/zimoli/kugou/sing.less +0 -93
- package/apps/zimoli/kugou/view.html +0 -39
- package/apps/zimoli/kugou/view.js +0 -17
- package/apps/zimoli/kugou/view.less +0 -84
- package/apps/zimoli/login/qq.js +0 -20
- package/apps/zimoli/login/qq_callback.html +0 -15
- package/apps/zimoli/main.js +0 -87
- package/apps/zimoli/main.less +0 -81
- package/apps/zimoli/message/chatList.js +0 -57
- package/apps/zimoli/message/chatList.less +0 -52
- package/apps/zimoli/message/commentList.js +0 -55
- package/apps/zimoli/message/commentList.less +0 -55
- package/apps/zimoli/message/informList.js +0 -69
- package/apps/zimoli/message/informList.less +0 -51
- package/apps/zimoli/message/main.js +0 -59
- package/apps/zimoli/message/main.less +0 -51
- package/apps/zimoli/message/praiseList.js +0 -3
- package/apps/zimoli/message/praiseList.less +0 -7
- package/apps/zimoli/nearby/main.js +0 -8
- package/apps/zimoli/skin/main.js +0 -47
- package/apps/zimoli/skin/main.less +0 -31
- package/apps/zimoli/user/getPassword.js +0 -82
- package/apps/zimoli/user/getPassword.less +0 -14
- package/apps/zimoli/user/login.html +0 -12
- package/apps/zimoli/user/login.js +0 -50
- package/apps/zimoli/user/login.less +0 -139
- package/apps/zimoli/user/profile-bg.jpg +0 -0
- package/apps/zimoli/user/profile.html +0 -32
- package/apps/zimoli/user/profile.js +0 -63
- package/apps/zimoli/user/profile.less +0 -50
- package/apps/zimoli/user/register.js +0 -20
- package/apps/zimoli/user/register.less +0 -3
- package/apps/zimoli/user/setting.js +0 -90
- package/apps/zimoli/user/setting.less +0 -11
- package/apps/zimoli/user/welcome.js +0 -36
- package/apps/zimoli/user/welcome.less +0 -136
- package/apps/zimoli/watch/main.html +0 -22
- package/apps/zimoli/watch/main.js +0 -76
- package/apps/zimoli/watch/main.less +0 -54
- package/apps/zimoli/yuanfen/main.js +0 -55
- package/apps/zimoli/yuanfen/main.json +0 -0
- package/coms/compile/breakcode.js +0 -78
- package/coms/compile/common.js +0 -683
- package/coms/compile/compile.js +0 -64
- package/coms/compile/keywords.js +0 -6
- package/coms/compile/namelist.js +0 -142
- package/coms/compile/namelist_test.js +0 -7
- package/coms/compile/required.js +0 -20
- package/coms/compile/scanner.js +0 -653
- package/coms/compile/scanner2.js +0 -909
- package/coms/compile/scanner2_test.js +0 -85
- package/coms/compile/scanner_test.js +0 -10
- package/coms/compile/washcode.js +0 -313
- package/coms/zimoli/mark.js +0 -70
package/coms/zimoli/on.js
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
// "use strict";
|
|
2
2
|
if (document.efronton) return document.efronton;
|
|
3
3
|
var is_addEventListener_enabled = "addEventListener" in window;
|
|
4
|
+
if ('attachEvent' in document) {
|
|
5
|
+
is_addEventListener_enabled = false;
|
|
6
|
+
}
|
|
7
|
+
if (!is_addEventListener_enabled) var __call = function (target, context, handler, firstmost) {
|
|
8
|
+
// use strict 无效的情况
|
|
9
|
+
if (isEmpty(target)) {
|
|
10
|
+
this(context, context, handler, firstmost);
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
this(target, context, handler, firstmost);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
|
|
4
17
|
var handlersMap = {};
|
|
5
18
|
var changes_key = 'changes';
|
|
6
19
|
var eventtypereg = /(?:\.once|\.prevent|\.stop|\.capture|\.self|\.passive|\.[a-z0-9]+)+\.?$/i;
|
|
@@ -70,7 +83,6 @@ var keyCodeMap = {
|
|
|
70
83
|
numdot: 110,
|
|
71
84
|
divide: 111,
|
|
72
85
|
div: 111,
|
|
73
|
-
"/": 111,
|
|
74
86
|
f1: 112,
|
|
75
87
|
f2: 113,
|
|
76
88
|
f3: 114,
|
|
@@ -104,7 +116,7 @@ var keyCodeMap = {
|
|
|
104
116
|
">": 110,
|
|
105
117
|
slash: 191,
|
|
106
118
|
"/": 191,
|
|
107
|
-
"
|
|
119
|
+
"?": 191,
|
|
108
120
|
backquote: 192,
|
|
109
121
|
"`": 192,
|
|
110
122
|
"~": 192,
|
|
@@ -308,50 +320,55 @@ var on = document.efronton = function (k) {
|
|
|
308
320
|
return remove.bind(target, k, hk, listener);
|
|
309
321
|
};
|
|
310
322
|
|
|
311
|
-
else
|
|
312
|
-
var
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
323
|
+
else {
|
|
324
|
+
var _addhandler = function (target, context, handler, firstmost = false) {
|
|
325
|
+
if (eventtypes.capture) {
|
|
326
|
+
console.warn("当前运行环境不支持事件capture");
|
|
327
|
+
firstmost = true;
|
|
328
|
+
}
|
|
329
|
+
target = checkroot(target, k);
|
|
330
|
+
if (target[handler_path] instanceof Array) {
|
|
331
|
+
} else {
|
|
332
|
+
var h = function (e) {
|
|
333
|
+
if (!e) e = window.event || {};
|
|
334
|
+
if (!e.target && e.srcElement) {
|
|
335
|
+
e.target = e.srcElement;
|
|
336
|
+
}
|
|
337
|
+
if (e.stopedPropagation) return;
|
|
338
|
+
if (!e.stopPropagation) {
|
|
339
|
+
e.stopPropagation = function () {
|
|
340
|
+
this.stopedPropagation = true;
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
if (!e.preventDefault) {
|
|
344
|
+
e.preventDefault = function () {
|
|
345
|
+
e.returnValue = false;
|
|
346
|
+
e.defaultPrevented = true;
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
if (e.button) {
|
|
350
|
+
if (e.buttons === undefined) e.buttons = e.button;
|
|
351
|
+
if (e.which === undefined) e.which = e.button + 1;
|
|
352
|
+
}
|
|
353
|
+
if (e.keyCode) {
|
|
354
|
+
if (e.which === undefined) e.which = e.keyCode;
|
|
355
|
+
}
|
|
356
|
+
broadcast.call(target, k, handler_path, e);
|
|
357
|
+
return e.returnValue;
|
|
358
|
+
};
|
|
359
|
+
target[handler_path] = target["on" + k] && target["on" + k] !== handler ? [[{}, target["on" + k]]] : [];
|
|
360
|
+
target[handler_path].h = h;
|
|
361
|
+
target["on" + k] = h;
|
|
362
|
+
|
|
363
|
+
}
|
|
364
|
+
var listener = [eventtypes, handler, context];
|
|
365
|
+
append.call(target, k, handler_path, listener, firstmost);
|
|
366
|
+
return remove.bind(target, k, handler_path, listener);
|
|
367
|
+
}, addhandler = function (context, handler, firstmost) {
|
|
368
|
+
return _addhandler(context, context, handler, firstmost);
|
|
369
|
+
};
|
|
370
|
+
addhandler.call = __call.bind(_addhandler);
|
|
371
|
+
}
|
|
355
372
|
handlersMap[on_event_path] = addhandler;
|
|
356
373
|
return addhandler;
|
|
357
374
|
};
|
package/coms/zimoli/remove.js
CHANGED
|
@@ -43,19 +43,10 @@ function _onremove(node, event) {
|
|
|
43
43
|
if (!node || node.isMounted === false) return;
|
|
44
44
|
var children = node.childNodes;
|
|
45
45
|
if (node.isMounted) {
|
|
46
|
-
var onremove = node.onremove;
|
|
47
46
|
if (!event) {
|
|
48
47
|
event = createEvent("remove");
|
|
49
48
|
}
|
|
50
49
|
dispatch(node, event);
|
|
51
|
-
if (isArray(onremove)) {
|
|
52
|
-
onremove.map(function (remove_hindler) {
|
|
53
|
-
remove_hindler.call(this, event);
|
|
54
|
-
}, node);
|
|
55
|
-
}
|
|
56
|
-
if (isFunction(onremove)) {
|
|
57
|
-
onremove.call(node, event);
|
|
58
|
-
}
|
|
59
50
|
node.isMounted = false;
|
|
60
51
|
}
|
|
61
52
|
if (children) for (var cx = 0, dx = children.length; cx < dx; cx++) {
|
package/coms/zimoli/render.js
CHANGED
|
@@ -173,7 +173,7 @@ var createRepeat = function (search, id = 0) {
|
|
|
173
173
|
var $parentScopes = element.$parentScopes || [];
|
|
174
174
|
var $struct = element.$struct;
|
|
175
175
|
if (element.$scope) {
|
|
176
|
-
$struct =
|
|
176
|
+
$struct = extend({}, $struct, { context: $struct.context + `with(this.$parentScopes[${$parentScopes.length}])` }), $parentScopes = $parentScopes.concat(element.$scope);
|
|
177
177
|
}
|
|
178
178
|
var clonedElements1 = Object.create(null);
|
|
179
179
|
var cloned = keys.map(function (key, cx) {
|
|
@@ -631,7 +631,7 @@ function getFromScopes(key, scope, parentScopes) {
|
|
|
631
631
|
|
|
632
632
|
function renderElement(element, scope = element.$scope, parentScopes = element.$parentScopes, once) {
|
|
633
633
|
if (!isNode(element) && element.length) {
|
|
634
|
-
return Array.prototype.
|
|
634
|
+
return Array.prototype.concat.apply([], element).map(function (element) {
|
|
635
635
|
return renderElement(element, scope, parentScopes, once);
|
|
636
636
|
});
|
|
637
637
|
}
|
package/coms/zimoli/zimoli.js
CHANGED
|
@@ -301,7 +301,7 @@ function prepare(pgpath, ok) {
|
|
|
301
301
|
if (isString(menu)) {
|
|
302
302
|
res = state.go(menu, item);
|
|
303
303
|
} else if (menu && menu.path) {
|
|
304
|
-
menu =
|
|
304
|
+
menu = extend({}, menu, { path: state.path(menu.path) });
|
|
305
305
|
res = go(menu, undefined, undefined, pgpath);
|
|
306
306
|
} else {
|
|
307
307
|
res = action(menu, item, params);
|
|
@@ -476,7 +476,7 @@ var pushstate = function (path_name, history_name, oldpagepath) {
|
|
|
476
476
|
history[history_name] = [path_name];
|
|
477
477
|
} else {
|
|
478
478
|
var _history = history[history_name];
|
|
479
|
-
if (
|
|
479
|
+
if ([].indexOf.call(_history, oldpagepath, 0) < 0) {
|
|
480
480
|
_history.splice(root_path === _history[0], _history.length);
|
|
481
481
|
isDestroy = true;
|
|
482
482
|
}
|