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.
Files changed (124) hide show
  1. package/apps/kugou/main.js +1 -3
  2. package/coms/basic/BigNumber.js +28 -5
  3. package/coms/basic/BigNumber_test.js +14 -1
  4. package/coms/basic/[]map.js +18 -13
  5. package/coms/basic/assert.js +10 -2
  6. package/coms/basic/extends_.js +13 -0
  7. package/coms/basic/loader.js +47 -28
  8. package/coms/basic/mark.js +155 -0
  9. package/coms/basic/queue.js +11 -14
  10. package/coms/basic/rest_.js +27 -0
  11. package/coms/basic/submit_.js +3 -1
  12. package/{apps → coms}/kugou/api.js +2 -0
  13. package/coms/kugou/buildList.js +7 -1
  14. package/coms/kugou/parseSongsList.js +1 -1
  15. package/coms/kugou/player.js +4 -2
  16. package/coms/kugou/song.html +1 -1
  17. package/coms/kugou/song.js +1 -0
  18. package/coms/kugou/song.less +12 -4
  19. package/coms/zimoli/Promise.js +84 -133
  20. package/coms/zimoli/appendChild.js +4 -14
  21. package/coms/zimoli/cless.js +11 -5
  22. package/coms/zimoli/color.js +0 -1
  23. package/coms/zimoli/compile.js +64 -1
  24. package/coms/{compile → zimoli}/compile_test.js +0 -0
  25. package/coms/zimoli/cross.js +1 -1
  26. package/coms/zimoli/data.js +14 -4
  27. package/coms/zimoli/dispatch.js +1 -1
  28. package/coms/zimoli/input.js +6 -4
  29. package/coms/zimoli/on.js +64 -47
  30. package/coms/zimoli/remove.js +0 -9
  31. package/coms/zimoli/render.js +2 -2
  32. package/coms/zimoli/zimoli.js +2 -2
  33. package/package.json +1 -1
  34. package/public/efront.js +1 -1
  35. package/apps/zimoli/book/main.js +0 -8
  36. package/apps/zimoli/broadcast/main.js +0 -8
  37. package/apps/zimoli/collection/add.html +0 -13
  38. package/apps/zimoli/collection/add.js +0 -14
  39. package/apps/zimoli/collection/add.less +0 -0
  40. package/apps/zimoli/collection/main.html +0 -0
  41. package/apps/zimoli/collection/main.js +0 -13
  42. package/apps/zimoli/collection/main.less +0 -8
  43. package/apps/zimoli/config.js +0 -14
  44. package/apps/zimoli/extra/pending.html +0 -1
  45. package/apps/zimoli/extra/pending.js +0 -8
  46. package/apps/zimoli/extra/pending.less +0 -15
  47. package/apps/zimoli/files/info.js +0 -7
  48. package/apps/zimoli/files/main.js +0 -108
  49. package/apps/zimoli/files/main.less +0 -26
  50. package/apps/zimoli/images/avatar.png +0 -0
  51. package/apps/zimoli/images/background.jpg +0 -0
  52. package/apps/zimoli/index.html +0 -42
  53. package/apps/zimoli/kugou/font/demo.css +0 -539
  54. package/apps/zimoli/kugou/font/demo_index.html +0 -1159
  55. package/apps/zimoli/kugou/font/iconfont.css +0 -189
  56. package/apps/zimoli/kugou/font/iconfont.eot +0 -0
  57. package/apps/zimoli/kugou/font/iconfont.js +0 -1
  58. package/apps/zimoli/kugou/font/iconfont.svg +0 -155
  59. package/apps/zimoli/kugou/font/iconfont.ttf +0 -0
  60. package/apps/zimoli/kugou/font/iconfont.woff +0 -0
  61. package/apps/zimoli/kugou/font/iconfont.woff2 +0 -0
  62. package/apps/zimoli/kugou/listen.html +0 -15
  63. package/apps/zimoli/kugou/listen.js +0 -37
  64. package/apps/zimoli/kugou/listen.less +0 -114
  65. package/apps/zimoli/kugou/mine.html +0 -53
  66. package/apps/zimoli/kugou/mine.js +0 -21
  67. package/apps/zimoli/kugou/mine.less +0 -106
  68. package/apps/zimoli/kugou/search.js +0 -109
  69. package/apps/zimoli/kugou/search.less +0 -50
  70. package/apps/zimoli/kugou/sing.js +0 -42
  71. package/apps/zimoli/kugou/sing.less +0 -93
  72. package/apps/zimoli/kugou/view.html +0 -39
  73. package/apps/zimoli/kugou/view.js +0 -17
  74. package/apps/zimoli/kugou/view.less +0 -84
  75. package/apps/zimoli/login/qq.js +0 -20
  76. package/apps/zimoli/login/qq_callback.html +0 -15
  77. package/apps/zimoli/main.js +0 -87
  78. package/apps/zimoli/main.less +0 -81
  79. package/apps/zimoli/message/chatList.js +0 -57
  80. package/apps/zimoli/message/chatList.less +0 -52
  81. package/apps/zimoli/message/commentList.js +0 -55
  82. package/apps/zimoli/message/commentList.less +0 -55
  83. package/apps/zimoli/message/informList.js +0 -69
  84. package/apps/zimoli/message/informList.less +0 -51
  85. package/apps/zimoli/message/main.js +0 -59
  86. package/apps/zimoli/message/main.less +0 -51
  87. package/apps/zimoli/message/praiseList.js +0 -3
  88. package/apps/zimoli/message/praiseList.less +0 -7
  89. package/apps/zimoli/nearby/main.js +0 -8
  90. package/apps/zimoli/skin/main.js +0 -47
  91. package/apps/zimoli/skin/main.less +0 -31
  92. package/apps/zimoli/user/getPassword.js +0 -82
  93. package/apps/zimoli/user/getPassword.less +0 -14
  94. package/apps/zimoli/user/login.html +0 -12
  95. package/apps/zimoli/user/login.js +0 -50
  96. package/apps/zimoli/user/login.less +0 -139
  97. package/apps/zimoli/user/profile-bg.jpg +0 -0
  98. package/apps/zimoli/user/profile.html +0 -32
  99. package/apps/zimoli/user/profile.js +0 -63
  100. package/apps/zimoli/user/profile.less +0 -50
  101. package/apps/zimoli/user/register.js +0 -20
  102. package/apps/zimoli/user/register.less +0 -3
  103. package/apps/zimoli/user/setting.js +0 -90
  104. package/apps/zimoli/user/setting.less +0 -11
  105. package/apps/zimoli/user/welcome.js +0 -36
  106. package/apps/zimoli/user/welcome.less +0 -136
  107. package/apps/zimoli/watch/main.html +0 -22
  108. package/apps/zimoli/watch/main.js +0 -76
  109. package/apps/zimoli/watch/main.less +0 -54
  110. package/apps/zimoli/yuanfen/main.js +0 -55
  111. package/apps/zimoli/yuanfen/main.json +0 -0
  112. package/coms/compile/breakcode.js +0 -78
  113. package/coms/compile/common.js +0 -683
  114. package/coms/compile/compile.js +0 -64
  115. package/coms/compile/keywords.js +0 -6
  116. package/coms/compile/namelist.js +0 -142
  117. package/coms/compile/namelist_test.js +0 -7
  118. package/coms/compile/required.js +0 -20
  119. package/coms/compile/scanner.js +0 -653
  120. package/coms/compile/scanner2.js +0 -909
  121. package/coms/compile/scanner2_test.js +0 -85
  122. package/coms/compile/scanner_test.js +0 -10
  123. package/coms/compile/washcode.js +0 -313
  124. 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
- ">": 191,
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 var addhandler = function (context, handler, firstmost = false) {
312
- var target = this || context;
313
- if (eventtypes.capture) {
314
- console.warn("当前运行环境不支持事件capture");
315
- firstmost = true;
316
- }
317
- target = checkroot(target, k);
318
- if (target[handler_path] instanceof Array) {
319
- } else {
320
- var h = function (e) {
321
- if (!e) e = window.event || {};
322
- if (!e.target && e.srcElement) {
323
- e.target = e.srcElement;
324
- }
325
- if (e.stopedPropagation) return;
326
- if (!e.stopPropagation) {
327
- e.stopPropagation = function () {
328
- this.stopedPropagation = true;
329
- };
330
- }
331
- if (!e.preventDefault) {
332
- e.preventDefault = function () {
333
- e.returnValue = false;
334
- e.defaultPrevented = true;
335
- };
336
- }
337
- if (e.button) {
338
- if (e.buttons === undefined) e.buttons = e.button;
339
- if (e.which === undefined) e.which = e.button + 1;
340
- }
341
- if (e.keyCode) {
342
- if (e.which === undefined) e.which = e.keyCode;
343
- }
344
- broadcast.call(target, k, handler_path, e);
345
- return e.returnValue;
346
- };
347
- target[handler_path] = target["on" + k] && target["on" + k] !== handler ? [[{}, target["on" + k]]] : [];
348
- target[handler_path].h = h;
349
- target["on" + k] = h;
350
- }
351
- var listener = [eventtypes, handler, context];
352
- append.call(target, k, handler_path, listener, firstmost);
353
- return remove.bind(target, k, handler_path, listener);
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
  };
@@ -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++) {
@@ -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 = Object.assign({}, $struct, { context: $struct.context + `with(this.$parentScopes[${$parentScopes.length}])` }), $parentScopes = $parentScopes.concat(element.$scope);
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.slice.call(element, 0, element.length).map(function (element) {
634
+ return Array.prototype.concat.apply([], element).map(function (element) {
635
635
  return renderElement(element, scope, parentScopes, once);
636
636
  });
637
637
  }
@@ -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 = Object.assign({}, menu, { path: state.path(menu.path) });
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 (_history.indexOf(oldpagepath) < 0) {
479
+ if ([].indexOf.call(_history, oldpagepath, 0) < 0) {
480
480
  _history.splice(root_path === _history[0], _history.length);
481
481
  isDestroy = true;
482
482
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "3.23.0",
3
+ "version": "3.24.5",
4
4
  "description": "一个开发工具,开放源代码,自带组件库和编译环境,可以用来开发web组件,web应用或nodejs模块,或做为已有代码的加密工具,也可以做为静态页面服务器或跨域中转服务器使用",
5
5
  "main": "public/efront.js",
6
6
  "directories": {