efront 3.26.8 → 3.26.15

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 (67) hide show
  1. package/LICENSE +2 -0
  2. package/apps/index.jsp +2 -2
  3. package/apps/pivot/dht/list.js +53 -0
  4. package/apps/pivot/index.html +3 -1
  5. package/apps/pivot/main.js +1 -0
  6. package/apps/pivot/main.less +3 -0
  7. package/apps/pivot/wow/root.js +138 -104
  8. package/apps/pivot/wow/root.less +1 -62
  9. package/coms/basic/Task.js +51 -0
  10. package/coms/basic/cross_.js +8 -0
  11. package/coms/basic/keys.js +3 -4
  12. package/coms/basic/loader.js +42 -17
  13. package/coms/basic/submit_.js +6 -3
  14. package/coms/explorer/Explorer.js +85 -0
  15. package/coms/explorer/context.js +205 -0
  16. package/coms/explorer/deepcp.js +48 -0
  17. package/{apps/pivot/wow → coms/explorer}/edit.html +1 -1
  18. package/{apps/pivot/wow → coms/explorer}/edit.js +17 -9
  19. package/coms/explorer/fileitem.html +8 -0
  20. package/coms/explorer/fileitem.js +34 -0
  21. package/coms/explorer/fileitem.less +65 -0
  22. package/coms/explorer/filetip.js +10 -0
  23. package/coms/explorer/filetip.less +5 -0
  24. package/coms/explorer/main.html +8 -0
  25. package/coms/explorer/main.js +215 -0
  26. package/coms/explorer/main.less +78 -0
  27. package/coms/frame/route.js +1 -1
  28. package/coms/shapes/file.html +9 -0
  29. package/coms/shapes/folder.html +7 -0
  30. package/coms/zimoli/Cleanup.js +9 -8
  31. package/coms/zimoli/arriswise.js +5 -4
  32. package/coms/zimoli/attr.js +2 -0
  33. package/coms/zimoli/bindGlobalkey.js +37 -0
  34. package/coms/zimoli/confirm.js +8 -8
  35. package/coms/zimoli/confirm.less +6 -80
  36. package/coms/zimoli/container.js +19 -6
  37. package/coms/zimoli/contextmenu.js +35 -15
  38. package/coms/zimoli/drag.js +7 -3
  39. package/coms/zimoli/field.html +1 -1
  40. package/coms/zimoli/field.js +8 -2
  41. package/coms/zimoli/field.less +0 -1
  42. package/coms/zimoli/getChanges.js +1 -0
  43. package/coms/zimoli/list.js +44 -33
  44. package/coms/zimoli/menu.js +1 -24
  45. package/coms/zimoli/menuItem.html +4 -1
  46. package/coms/zimoli/menuList.js +54 -104
  47. package/coms/zimoli/menuList.less +1 -0
  48. package/coms/zimoli/moveupon.js +2 -2
  49. package/coms/zimoli/overpos.js +7 -0
  50. package/coms/zimoli/popup.js +22 -27
  51. package/coms/zimoli/prompt.js +43 -5
  52. package/coms/zimoli/prompt.less +23 -0
  53. package/coms/zimoli/render.js +153 -109
  54. package/coms/zimoli/resize.js +17 -7
  55. package/coms/zimoli/rootElements.js +15 -1
  56. package/coms/zimoli/view.js +33 -0
  57. package/coms/zimoli/view.less +8 -8
  58. package/coms/zimoli/yousure.js +53 -0
  59. package/coms/zimoli/yousure.less +4 -0
  60. package/coms/zimoli/zimoli.js +10 -6
  61. package/package.json +1 -1
  62. package/public/efront.js +1 -1
  63. package/apps/pivot/wow/root.html +0 -10
  64. package/coms/zimoli/explorer.html +0 -5
  65. package/coms/zimoli/explorer.js +0 -8
  66. package/coms/zimoli/explorer.less +0 -18
  67. package/coms/zimoli/explorer_test.js +0 -4
@@ -14,6 +14,7 @@ body>& {
14
14
  -moz-user-select: none;
15
15
  -webkit-user-select: none;
16
16
  border: 1px solid #0006;
17
+ min-width: 160px;
17
18
  }
18
19
 
19
20
  &[draggable] {
@@ -34,19 +35,18 @@ body>& {
34
35
  box-sizing: border-box;
35
36
  background-clip: padding-box;
36
37
 
37
- &:not(:nth-child(1)) {
38
- border-top: 42px solid transparent;
39
- }
38
+ border-top: 6px solid #fff;
39
+ border-bottom: 6px solid #fff;
40
40
 
41
41
  &:not(:nth-last-child(1)) {
42
42
  padding-bottom: 42px;
43
- border-bottom: 6px solid #fff;
44
43
  }
45
44
  }
46
45
 
47
46
 
48
47
  &>.head,
49
48
  >[head] {
49
+ top: 0;
50
50
  z-index: 2;
51
51
  background: #fffc;
52
52
  position: relative;
@@ -104,16 +104,15 @@ body>& {
104
104
  >[foot] {
105
105
  z-index: 1;
106
106
  text-align: right;
107
- line-height: 1;
108
- height: 42px;
109
- padding: 6px 16px;
107
+ white-space: pre-wrap;
108
+ padding: 6px 16px 0 16px;
110
109
  border-top: 1px solid rgba(0, 0, 0, .16);
111
110
  backdrop-filter: blur(20px);
112
111
  background: #fffc;
113
112
  position: sticky;
113
+ width: 100%;
114
114
  bottom: 0;
115
115
  margin-top: -42px;
116
-
117
116
  }
118
117
 
119
118
  .button {
@@ -126,6 +125,7 @@ body>& {
126
125
  min-width: 60px;
127
126
  padding: 0 20px;
128
127
  margin-left: 10px;
128
+ margin-bottom: 6px;
129
129
  }
130
130
 
131
131
  a.button {
@@ -0,0 +1,53 @@
1
+
2
+ /**
3
+ * 确定就继续,取消就中断
4
+ */
5
+ function yousure(title = "您确定要这么做吗?", content = "当前操作需要您再次确认") {
6
+ var options = [button("确定(Y)"), button("取消(N)", "white")];
7
+ options[0].tabindex = -1;
8
+ options[1].tabindex = -1;
9
+ var changeFocus = function (event) {
10
+ if (event) event.preventDefault();
11
+ if (page.focused) removeClass(page.focused, 'focused');
12
+ page.focused = page.focused === options[0] ? options[1] : options[0];
13
+ addClass(page.focused, 'focused');
14
+ };
15
+ var page = confirm(title, content, options, function (b) {
16
+ if (options[0] === b) {
17
+ if (isFunction(page.onload)) page.onload();
18
+ }
19
+ else {
20
+ if (isFunction(page.onerror)) page.onerror();
21
+ }
22
+ });
23
+ on("keydown.left.only")(page, function () {
24
+ if (page.focused !== options[0]) changeFocus();
25
+ });
26
+ on("keydown.right.only")(page, function () {
27
+ if (page.focused !== options[1]) changeFocus();
28
+ });
29
+ on("keydown.tab.only")(page, changeFocus);
30
+ var clickbtn = function () {
31
+ if (page.focused) page.focused.click();
32
+ };
33
+ on("keydown.space")(page, clickbtn);
34
+ on("keydown.enter")(page, clickbtn);
35
+ var setFocus = function () {
36
+ if (page.focused !== this) changeFocus();
37
+ };
38
+ on("pointerdown")(options[0], setFocus)
39
+ on("pointerdown")(options[1], setFocus);
40
+ page.tabindex = 0;
41
+ var focuspage = function () {
42
+ setTimeout(function () {
43
+ page.focus();
44
+ });
45
+ };
46
+ onappend(page, function () {
47
+ focuspage();
48
+ on("pointerdown")(page.$mask, focuspage);
49
+ });
50
+ changeFocus();
51
+ awaitable(page);
52
+ return page;
53
+ }
@@ -0,0 +1,4 @@
1
+ .button.focused {
2
+ outline: 1.2px solid #28c;
3
+ outline-offset: 2px;
4
+ }
@@ -189,7 +189,9 @@ var page_generators = {};
189
189
  */
190
190
  var loading_tree = {};
191
191
  var getpgpath = function (pagepath) {
192
- return /^[@#!]/.test(pagepath) ? pagepath.slice(1) : pagepath;
192
+ pagepath = /^[@#!]/.test(pagepath) ? pagepath.slice(1) : pagepath;
193
+ if (pagepath === 'main') pagepath = efrontPath || "/main";
194
+ return pagepath;
193
195
  };
194
196
  function createState(pgpath) {
195
197
  var pgpath = getpgpath(pgpath);
@@ -347,20 +349,20 @@ function prepare(pgpath, ok) {
347
349
  }
348
350
  var res = page_generators[pgpath];
349
351
  var emiters = loading_tree[pgpath];
352
+ delete loading_tree[pgpath];
350
353
  if (emiters) {
351
354
  var noRoles = !res.roles;
355
+ if (noRoles && res.roles) {
356
+ prepare(user.loginPath, () => emit());
357
+ return;
358
+ }
352
359
  while (emiters.length) {
353
360
  var ok = emiters.shift();
354
361
  if (isFunction(ok)) {
355
362
  ok(res);
356
363
  }
357
- if (noRoles && res.roles) {
358
- prepare(user.loginPath, () => emit());
359
- return;
360
- }
361
364
  }
362
365
  }
363
- delete loading_tree[pgpath];
364
366
  };
365
367
  return init(pgpath, function (pg) {
366
368
  if (!pg) return;
@@ -430,6 +432,7 @@ function create(pagepath, args, from, needroles) {
430
432
 
431
433
  var zimoliid = 0;
432
434
  function zimoli(pagepath, args, history_name, oldpagepath) {
435
+
433
436
  if (isNode(history_name))
434
437
  var zid = history_name.zimoliid = (history_name.zimoliid | 0) + 1;
435
438
  else var zid = ++zimoliid;
@@ -601,6 +604,7 @@ function addGlobal(element, name = null, isDestroy) {
601
604
  global[name] = element;
602
605
  } else if (isNode(name)) {
603
606
  if (name.nodeType !== 1) {
607
+ remove(name.with);
604
608
  appendChild.after(name, element);
605
609
  name.with = [element];
606
610
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "3.26.8",
3
+ "version": "3.26.15",
4
4
  "description": "简化前端开发,优化web性能",
5
5
  "main": "public/efront.js",
6
6
  "directories": {