clickgo 3.16.27 → 3.16.28

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 (100) hide show
  1. package/README.md +1 -1
  2. package/dist/app/demo/app.js +4 -16
  3. package/dist/app/demo/config.json +4 -1
  4. package/dist/app/demo/form/control/arteditor/arteditor.js +7 -18
  5. package/dist/app/demo/form/control/button/button.js +2 -13
  6. package/dist/app/demo/form/control/check/check.js +3 -14
  7. package/dist/app/demo/form/control/content/content.js +3 -14
  8. package/dist/app/demo/form/control/daterange/daterange.js +1 -1
  9. package/dist/app/demo/form/control/delete/delete.js +3 -14
  10. package/dist/app/demo/form/control/dialog/dialog.js +2 -0
  11. package/dist/app/demo/form/control/dialog/dialog.xml +26 -12
  12. package/dist/app/demo/form/control/flow/flow.js +2 -13
  13. package/dist/app/demo/form/control/form/form.js +4 -15
  14. package/dist/app/demo/form/control/iconview/iconview.js +12 -29
  15. package/dist/app/demo/form/control/jodit/jodit.js +7 -18
  16. package/dist/app/demo/form/control/link/link.js +2 -13
  17. package/dist/app/demo/form/control/list/list.js +38 -57
  18. package/dist/app/demo/form/control/map/map.js +17 -28
  19. package/dist/app/demo/form/control/menu/menu.js +6 -17
  20. package/dist/app/demo/form/control/mpegts/mpegts.js +1 -1
  21. package/dist/app/demo/form/control/nav/nav.js +6 -17
  22. package/dist/app/demo/form/control/novnc/novnc.js +75 -0
  23. package/dist/app/demo/form/control/novnc/novnc.xml +13 -0
  24. package/dist/app/demo/form/control/panel/panel.js +9 -20
  25. package/dist/app/demo/form/control/panel/test1.js +20 -41
  26. package/dist/app/demo/form/control/pdf/pdf.js +7 -20
  27. package/dist/app/demo/form/control/progress/progress.js +3 -12
  28. package/dist/app/demo/form/control/radio/radio.js +6 -17
  29. package/dist/app/demo/form/control/select/select.js +25 -38
  30. package/dist/app/demo/form/control/switch/switch.js +3 -14
  31. package/dist/app/demo/form/control/tab/tab.js +7 -18
  32. package/dist/app/demo/form/control/table/table.js +8 -23
  33. package/dist/app/demo/form/control/text/text.js +2 -13
  34. package/dist/app/demo/form/control/tuieditor/tuieditor.js +7 -18
  35. package/dist/app/demo/form/control/uploader/uploader.js +20 -31
  36. package/dist/app/demo/form/control/vflow/vflow.js +2 -13
  37. package/dist/app/demo/form/event/form/form.js +11 -22
  38. package/dist/app/demo/form/event/task/task.js +14 -29
  39. package/dist/app/demo/form/main.js +381 -387
  40. package/dist/app/demo/form/main.xml +3 -0
  41. package/dist/app/demo/form/method/acontrol/acontrol.js +2 -13
  42. package/dist/app/demo/form/method/aform/aform.js +41 -60
  43. package/dist/app/demo/form/method/aform/sd.js +3 -14
  44. package/dist/app/demo/form/method/core/core.js +25 -50
  45. package/dist/app/demo/form/method/dom/dom.js +35 -58
  46. package/dist/app/demo/form/method/form/form.js +106 -149
  47. package/dist/app/demo/form/method/fs/fs.js +126 -147
  48. package/dist/app/demo/form/method/native/native.js +44 -72
  49. package/dist/app/demo/form/method/storage/storage.js +9 -27
  50. package/dist/app/demo/form/method/system/system.js +16 -41
  51. package/dist/app/demo/form/method/task/task.js +18 -37
  52. package/dist/app/demo/form/method/theme/theme.js +39 -54
  53. package/dist/app/demo/form/method/tool/tool.js +22 -43
  54. package/dist/app/demo/form/method/zip/zip.js +18 -29
  55. package/dist/app/demo/form/solution/backpanel/backpanel.js +10 -23
  56. package/dist/app/task/app.js +2 -13
  57. package/dist/app/task/form/bar/bar.js +32 -45
  58. package/dist/clickgo.js +1 -1
  59. package/dist/control/arteditor.cgc +0 -0
  60. package/dist/control/box.cgc +0 -0
  61. package/dist/control/captcha.cgc +0 -0
  62. package/dist/control/common.cgc +0 -0
  63. package/dist/control/desc.cgc +0 -0
  64. package/dist/control/drawer.cgc +0 -0
  65. package/dist/control/echarts.cgc +0 -0
  66. package/dist/control/form.cgc +0 -0
  67. package/dist/control/iconview.cgc +0 -0
  68. package/dist/control/jodit.cgc +0 -0
  69. package/dist/control/map.cgc +0 -0
  70. package/dist/control/monaco.cgc +0 -0
  71. package/dist/control/mpegts.cgc +0 -0
  72. package/dist/control/nav.cgc +0 -0
  73. package/dist/control/novnc.cgc +0 -0
  74. package/dist/control/page.cgc +0 -0
  75. package/dist/control/pdf.cgc +0 -0
  76. package/dist/control/property.cgc +0 -0
  77. package/dist/control/qrcode.cgc +0 -0
  78. package/dist/control/table.cgc +0 -0
  79. package/dist/control/task.cgc +0 -0
  80. package/dist/control/tplink.cgc +0 -0
  81. package/dist/control/tuieditor.cgc +0 -0
  82. package/dist/control/tuiviewer.cgc +0 -0
  83. package/dist/control/xterm.cgc +0 -0
  84. package/dist/index.js +59 -71
  85. package/dist/lib/control.js +213 -235
  86. package/dist/lib/core.js +356 -379
  87. package/dist/lib/dom.js +62 -91
  88. package/dist/lib/form.js +834 -906
  89. package/dist/lib/fs.js +834 -892
  90. package/dist/lib/native.js +32 -63
  91. package/dist/lib/storage.js +21 -33
  92. package/dist/lib/task.js +1054 -1098
  93. package/dist/lib/theme.js +102 -121
  94. package/dist/lib/tool.js +65 -98
  95. package/dist/lib/zip.js +27 -42
  96. package/dist/theme/blue.cgt +0 -0
  97. package/dist/theme/byterun.cgt +0 -0
  98. package/dist/theme/dark.cgt +0 -0
  99. package/dist/theme/light.cgt +0 -0
  100. package/package.json +1 -1
package/README.md CHANGED
@@ -35,7 +35,7 @@ First, load the module loader, then load your app with it.
35
35
  **index.html**
36
36
 
37
37
  ```html
38
- <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.8/dist/loader.min.js?path=index&npm={'clickgo':'3.16.27'}"></script>
38
+ <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.8/dist/loader.min.js?path=index&npm={'clickgo':'3.16.28'}"></script>
39
39
  ```
40
40
 
41
41
  **index.js**
@@ -32,15 +32,6 @@ var __importStar = (this && this.__importStar) || (function () {
32
32
  return result;
33
33
  };
34
34
  })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
45
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
46
37
  };
@@ -48,13 +39,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
48
39
  const clickgo = __importStar(require("clickgo"));
49
40
  const main_1 = __importDefault(require("./form/main"));
50
41
  class default_1 extends clickgo.core.AbstractApp {
51
- main(data) {
52
- return __awaiter(this, void 0, void 0, function* () {
53
- var _a;
54
- this.run(yield clickgo.form.create(main_1.default, {
55
- 'param': (_a = data.param) !== null && _a !== void 0 ? _a : 'none',
56
- }));
57
- });
42
+ async main(data) {
43
+ this.run(await clickgo.form.create(main_1.default, {
44
+ 'param': data.param ?? 'none',
45
+ }));
58
46
  }
59
47
  }
60
48
  exports.default = default_1;
@@ -28,7 +28,8 @@
28
28
  "/clickgo/control/jodit",
29
29
  "/clickgo/control/qrcode",
30
30
  "/clickgo/control/mpegts",
31
- "/clickgo/control/tplink"
31
+ "/clickgo/control/tplink",
32
+ "/clickgo/control/novnc"
32
33
  ],
33
34
  "style": "/package/global",
34
35
 
@@ -121,6 +122,8 @@
121
122
  "/form/control/mpegts/mpegts.xml",
122
123
  "/form/control/nav/nav.js",
123
124
  "/form/control/nav/nav.xml",
125
+ "/form/control/novnc/novnc.js",
126
+ "/form/control/novnc/novnc.xml",
124
127
  "/form/control/page/page.js",
125
128
  "/form/control/page/page.xml",
126
129
  "/form/control/palette/palette.js",
@@ -32,15 +32,6 @@ var __importStar = (this && this.__importStar) || (function () {
32
32
  return result;
33
33
  };
34
34
  })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
45
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
46
37
  };
@@ -61,15 +52,13 @@ class default_1 extends clickgo.form.AbstractForm {
61
52
  }
62
53
  ];
63
54
  }
64
- imgselect(cb) {
65
- return __awaiter(this, void 0, void 0, function* () {
66
- const frm = yield clickgo.form.create(img_1.default);
67
- const path = yield frm.showDialog();
68
- if (!path) {
69
- return;
70
- }
71
- cb(path);
72
- });
55
+ async imgselect(cb) {
56
+ const frm = await clickgo.form.create(img_1.default);
57
+ const path = await frm.showDialog();
58
+ if (!path) {
59
+ return;
60
+ }
61
+ cb(path);
73
62
  }
74
63
  }
75
64
  exports.default = default_1;
@@ -32,15 +32,6 @@ var __importStar = (this && this.__importStar) || (function () {
32
32
  return result;
33
33
  };
34
34
  })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
35
  Object.defineProperty(exports, "__esModule", { value: true });
45
36
  const clickgo = __importStar(require("clickgo"));
46
37
  class default_1 extends clickgo.form.AbstractForm {
@@ -53,10 +44,8 @@ class default_1 extends clickgo.form.AbstractForm {
53
44
  this.plain = ['not'];
54
45
  this.sizeh = false;
55
46
  }
56
- dialog(text) {
57
- return __awaiter(this, void 0, void 0, function* () {
58
- yield clickgo.form.dialog(text);
59
- });
47
+ async dialog(text) {
48
+ await clickgo.form.dialog(text);
60
49
  }
61
50
  }
62
51
  exports.default = default_1;
@@ -32,15 +32,6 @@ var __importStar = (this && this.__importStar) || (function () {
32
32
  return result;
33
33
  };
34
34
  })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
35
  Object.defineProperty(exports, "__esModule", { value: true });
45
36
  const clickgo = __importStar(require("clickgo"));
46
37
  class default_1 extends clickgo.form.AbstractForm {
@@ -55,11 +46,9 @@ class default_1 extends clickgo.form.AbstractForm {
55
46
  this.indeterminate4 = false;
56
47
  this.disabled = false;
57
48
  }
58
- onChange(e) {
59
- return __awaiter(this, void 0, void 0, function* () {
60
- e.preventDefault();
61
- yield clickgo.form.dialog('v: ' + (e.detail.value ? 'true' : 'false') + ', i: ' + (e.detail.indeterminate ? 'true' : 'false'));
62
- });
49
+ async onChange(e) {
50
+ e.preventDefault();
51
+ await clickgo.form.dialog('v: ' + (e.detail.value ? 'true' : 'false') + ', i: ' + (e.detail.indeterminate ? 'true' : 'false'));
63
52
  }
64
53
  }
65
54
  exports.default = default_1;
@@ -32,15 +32,6 @@ var __importStar = (this && this.__importStar) || (function () {
32
32
  return result;
33
33
  };
34
34
  })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
35
  Object.defineProperty(exports, "__esModule", { value: true });
45
36
  const clickgo = __importStar(require("clickgo"));
46
37
  class default_1 extends clickgo.form.AbstractForm {
@@ -48,11 +39,9 @@ class default_1 extends clickgo.form.AbstractForm {
48
39
  super(...arguments);
49
40
  this.fill = false;
50
41
  }
51
- check() {
52
- return __awaiter(this, void 0, void 0, function* () {
53
- const res = this.refs.content.check();
54
- yield clickgo.form.dialog(res ? 'true' : 'false');
55
- });
42
+ async check() {
43
+ const res = this.refs.content.check();
44
+ await clickgo.form.dialog(res ? 'true' : 'false');
56
45
  }
57
46
  }
58
47
  exports.default = default_1;
@@ -48,7 +48,7 @@ class default_1 extends clickgo.form.AbstractForm {
48
48
  }
49
49
  settime() {
50
50
  this.ts[0] = clickgo.tool.rand(1504304812000, 1704304812000);
51
- this.ts[1] = this.ts[0] + 60000 * 60 * 24 * 30;
51
+ this.ts[1] = this.ts[0] + 60_000 * 60 * 24 * 30;
52
52
  }
53
53
  }
54
54
  exports.default = default_1;
@@ -32,15 +32,6 @@ var __importStar = (this && this.__importStar) || (function () {
32
32
  return result;
33
33
  };
34
34
  })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
35
  Object.defineProperty(exports, "__esModule", { value: true });
45
36
  const clickgo = __importStar(require("clickgo"));
46
37
  class default_1 extends clickgo.form.AbstractForm {
@@ -48,11 +39,9 @@ class default_1 extends clickgo.form.AbstractForm {
48
39
  super(...arguments);
49
40
  this.list = [0, 1, 2];
50
41
  }
51
- check() {
52
- return __awaiter(this, void 0, void 0, function* () {
53
- const res = this.refs.content.check();
54
- yield clickgo.form.dialog(res ? 'true' : 'false');
55
- });
42
+ async check() {
43
+ const res = this.refs.content.check();
44
+ await clickgo.form.dialog(res ? 'true' : 'false');
56
45
  }
57
46
  }
58
47
  exports.default = default_1;
@@ -41,7 +41,9 @@ class default_1 extends clickgo.form.AbstractForm {
41
41
  this.buttons = ['OK'];
42
42
  this.btn = 'none';
43
43
  this.width = false;
44
+ this.fwidth = false;
44
45
  this.padding = true;
46
+ this.fill = false;
45
47
  }
46
48
  }
47
49
  exports.default = default_1;
@@ -1,15 +1,5 @@
1
- <form title="Dialog" width="450" height="550" min-width="400" min-height="400" padding="10">
1
+ <form title="Dialog" width="550" height="700" min-width="400" min-height="400" padding="10">
2
2
  <layout direction="v" gutter="10" style="flex: 1; width: 0;">
3
- <layout align-h="center" align-v="center" style="flex: 1;">
4
- <form title="Title" :min="false" :max="false" :resize="false" width="auto" height="auto" direction="v">
5
- <dialog @select="btn = $event" :buttons="buttons" :direction="message === 'lines' ? 'v' : 'h'" :width="width ? 300 : undefined" :height="width ? 300 : undefined" :padding="padding">
6
- <template v-if="message === 'message'">Message</template>
7
- <template v-else-if="message === 'buttons'"><button style="flex: 1;">Button1</button><button style="margin-left: 10px; flex: 1;">Button2</button></template>
8
- <template v-else-if="message === 'lines'"><block v-for="i of 5">Line {{i}}.</block></template>
9
- <template v-else>longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong</template>
10
- </dialog>
11
- </form>
12
- </layout>
13
3
  <layout gutter="10">
14
4
  <button style="flex: 1;" @click="buttons = ['A', 'B', 'C']">['A', 'B', 'C']</button>
15
5
  <button style="flex: 1;" @click="buttons = ['Cancel', 'OK']">['Cancel', 'OK']</button>
@@ -23,10 +13,34 @@
23
13
  <layout gutter="10">
24
14
  <button style="flex: 1;" @click="padding = !padding">padding</button>
25
15
  <button style="flex: 1;" @click="message = 'lines'">Multiple lines</button>
26
- <button @click="width = !width">{{width ? '' : '!'}}w/h300</button>
16
+ <button style="flex: 1;" @click="message = 'many'">Too many lines</button>
17
+ </layout>
18
+ <layout gutter="10">
19
+ <button style="flex: 1;" @click="fill = !fill">{{fill ? '' : '!'}}fill</button>
20
+ <button style="flex: 1;" @click="width = !width" :disabled="fill">Dialog {{width ? '' : '!'}}w/h300</button>
21
+
22
+ <button style="flex: 1;" @click="fwidth = !fwidth" :disabled="fill">Form {{fwidth ? '' : '!'}}w/h400</button>
27
23
  </layout>
28
24
  <layout gutter="10" align-v="center">
29
25
  <label style="flex: 1;">You click: {{btn}}.</label>
30
26
  </layout>
27
+ <layout align-h="center" align-v="center" style="flex: 1;">
28
+ <form title="Title" :min="false" :max="false" :resize="false" :width="fwidth ? 400 : 'auto'" :height="fwidth ? 400 : 'auto'" direction="v">
29
+ <dialog @select="btn = $event" :buttons="buttons" :direction="message === 'lines' || message === 'many' ? 'v' : 'h'" :width="fill ? undefined : (width ? 300 : undefined)" :height="fill ? 'fill' : (width ? 300 : undefined)" :padding="padding">
30
+
31
+ <template v-if="message === 'message'">Message</template>
32
+ <template v-else-if="message === 'buttons'"><button style="flex: 1;">Button1</button><button style="margin-left: 10px; flex: 1;">Button2</button></template>
33
+ <template v-else-if="message === 'lines'"><block v-for="i of 5">Line {{i}}.</block></template>
34
+ <template v-else-if="message === 'many'">
35
+ <flow direction="v">
36
+ <block v-for="i of 100">
37
+ Line {{i}}.
38
+ </block>
39
+ </flow>
40
+ </template>
41
+ <template v-else>longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong</template>
42
+ </dialog>
43
+ </form>
44
+ </layout>
31
45
  </layout>
32
46
  </form>
@@ -32,15 +32,6 @@ var __importStar = (this && this.__importStar) || (function () {
32
32
  return result;
33
33
  };
34
34
  })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
35
  Object.defineProperty(exports, "__esModule", { value: true });
45
36
  const clickgo = __importStar(require("clickgo"));
46
37
  class default_1 extends clickgo.form.AbstractForm {
@@ -88,10 +79,8 @@ class default_1 extends clickgo.form.AbstractForm {
88
79
  this.sub = false;
89
80
  this.area = {};
90
81
  }
91
- onGesture(dir) {
92
- return __awaiter(this, void 0, void 0, function* () {
93
- yield clickgo.form.dialog('onGesture: ' + dir);
94
- });
82
+ async onGesture(dir) {
83
+ await clickgo.form.dialog('onGesture: ' + dir);
95
84
  }
96
85
  }
97
86
  exports.default = default_1;
@@ -32,15 +32,6 @@ var __importStar = (this && this.__importStar) || (function () {
32
32
  return result;
33
33
  };
34
34
  })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
35
  Object.defineProperty(exports, "__esModule", { value: true });
45
36
  const clickgo = __importStar(require("clickgo"));
46
37
  class default_1 extends clickgo.form.AbstractForm {
@@ -61,12 +52,10 @@ class default_1 extends clickgo.form.AbstractForm {
61
52
  this.border = 'normal';
62
53
  this.banClose = false;
63
54
  }
64
- showLoading() {
65
- return __awaiter(this, void 0, void 0, function* () {
66
- this.loading = true;
67
- yield clickgo.tool.sleep(1000);
68
- this.loading = false;
69
- });
55
+ async showLoading() {
56
+ this.loading = true;
57
+ await clickgo.tool.sleep(1000);
58
+ this.loading = false;
70
59
  }
71
60
  onClose(e) {
72
61
  if (this.banClose) {
@@ -32,15 +32,6 @@ var __importStar = (this && this.__importStar) || (function () {
32
32
  return result;
33
33
  };
34
34
  })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
35
  Object.defineProperty(exports, "__esModule", { value: true });
45
36
  const clickgo = __importStar(require("clickgo"));
46
37
  class default_1 extends clickgo.form.AbstractForm {
@@ -145,27 +136,21 @@ class default_1 extends clickgo.form.AbstractForm {
145
136
  });
146
137
  }
147
138
  }
148
- remove() {
149
- return __awaiter(this, void 0, void 0, function* () {
150
- if (this.list.length === 3) {
151
- yield clickgo.form.dialog('It cannot be removed at this time.');
152
- return;
153
- }
154
- this.list.splice(-1, 1);
155
- });
139
+ async remove() {
140
+ if (this.list.length === 3) {
141
+ await clickgo.form.dialog('It cannot be removed at this time.');
142
+ return;
143
+ }
144
+ this.list.splice(-1, 1);
156
145
  }
157
- drop(e) {
158
- return __awaiter(this, void 0, void 0, function* () {
159
- yield clickgo.form.dialog(JSON.stringify(e.detail));
160
- });
146
+ async drop(e) {
147
+ await clickgo.form.dialog(JSON.stringify(e.detail));
161
148
  }
162
149
  onSelect(e) {
163
150
  this.selectionArea = e.detail.area;
164
151
  }
165
- onOpen(e) {
166
- return __awaiter(this, void 0, void 0, function* () {
167
- yield clickgo.form.dialog('onOpen: ' + e.detail.value.toString());
168
- });
152
+ async onOpen(e) {
153
+ await clickgo.form.dialog('onOpen: ' + e.detail.value.toString());
169
154
  }
170
155
  scrollChange() {
171
156
  switch (this.scroll) {
@@ -182,10 +167,8 @@ class default_1 extends clickgo.form.AbstractForm {
182
167
  }
183
168
  }
184
169
  }
185
- onGesture(dir) {
186
- return __awaiter(this, void 0, void 0, function* () {
187
- yield clickgo.form.dialog('onGesture: ' + dir);
188
- });
170
+ async onGesture(dir) {
171
+ await clickgo.form.dialog('onGesture: ' + dir);
189
172
  }
190
173
  }
191
174
  exports.default = default_1;
@@ -32,15 +32,6 @@ var __importStar = (this && this.__importStar) || (function () {
32
32
  return result;
33
33
  };
34
34
  })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
45
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
46
37
  };
@@ -61,15 +52,13 @@ class default_1 extends clickgo.form.AbstractForm {
61
52
  this.html = '<p align="center">123</p>';
62
53
  this.htmlc = '';
63
54
  }
64
- imgselect(cb) {
65
- return __awaiter(this, void 0, void 0, function* () {
66
- const frm = yield clickgo.form.create(img_1.default);
67
- const path = yield frm.showDialog();
68
- if (!path) {
69
- return;
70
- }
71
- cb('https://cdn.jsdelivr.net/npm/clickgo@3.7.0/dist/app/demo/' + path);
72
- });
55
+ async imgselect(cb) {
56
+ const frm = await clickgo.form.create(img_1.default);
57
+ const path = await frm.showDialog();
58
+ if (!path) {
59
+ return;
60
+ }
61
+ cb('https://cdn.jsdelivr.net/npm/clickgo@3.7.0/dist/app/demo/' + path);
73
62
  }
74
63
  }
75
64
  exports.default = default_1;
@@ -32,22 +32,11 @@ var __importStar = (this && this.__importStar) || (function () {
32
32
  return result;
33
33
  };
34
34
  })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
35
  Object.defineProperty(exports, "__esModule", { value: true });
45
36
  const clickgo = __importStar(require("clickgo"));
46
37
  class default_1 extends clickgo.form.AbstractForm {
47
- alert() {
48
- return __awaiter(this, void 0, void 0, function* () {
49
- yield clickgo.form.dialog('Alert');
50
- });
38
+ async alert() {
39
+ await clickgo.form.dialog('Alert');
51
40
  }
52
41
  }
53
42
  exports.default = default_1;
@@ -32,15 +32,6 @@ var __importStar = (this && this.__importStar) || (function () {
32
32
  return result;
33
33
  };
34
34
  })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
35
  Object.defineProperty(exports, "__esModule", { value: true });
45
36
  const clickgo = __importStar(require("clickgo"));
46
37
  class default_1 extends clickgo.form.AbstractForm {
@@ -179,19 +170,17 @@ class default_1 extends clickgo.form.AbstractForm {
179
170
  return rtn;
180
171
  }
181
172
  get adData() {
182
- var _a;
183
173
  const data = [];
184
174
  for (let i = 0; i < this.slist.length; ++i) {
185
175
  const item = this.slist[i];
186
176
  data.push({
187
- 'type': (_a = item.type) !== null && _a !== void 0 ? _a : 'split',
177
+ 'type': item.type ?? 'split',
188
178
  'menu': i === 20 ? true : false
189
179
  });
190
180
  }
191
181
  return data;
192
182
  }
193
183
  get listData() {
194
- var _a;
195
184
  const data = ['Item1', {
196
185
  'label': 'Tip',
197
186
  'color': 'tip',
@@ -223,7 +212,7 @@ class default_1 extends clickgo.form.AbstractForm {
223
212
  for (let k = 0; k < this.slist.length; ++k) {
224
213
  if (this.slist[k].name) {
225
214
  data.push({
226
- 'label': `index: ${k}, value: ${(_a = this.slist[k].name) !== null && _a !== void 0 ? _a : ''}${(k === 20 ? ' long test long test long test long test long test' : '')}`,
215
+ 'label': `index: ${k}, value: ${this.slist[k].name ?? ''}${(k === 20 ? ' long test long test long test long test long test' : '')}`,
227
216
  'value': this.slist[k].name,
228
217
  'disabled': this.slist[k].disabled
229
218
  });
@@ -278,27 +267,23 @@ class default_1 extends clickgo.form.AbstractForm {
278
267
  selectButtonList() {
279
268
  this.select2 = ['Sub3'];
280
269
  }
281
- onSelectLoad(value, resolve) {
282
- return __awaiter(this, void 0, void 0, function* () {
283
- if (value !== 'Sub6') {
284
- yield clickgo.tool.sleep(100);
285
- if (value === 'Sub8') {
286
- resolve(['Sub9', 'Sub10']);
287
- }
288
- else {
289
- resolve();
290
- }
291
- return;
270
+ async onSelectLoad(value, resolve) {
271
+ if (value !== 'Sub6') {
272
+ await clickgo.tool.sleep(100);
273
+ if (value === 'Sub8') {
274
+ resolve(['Sub9', 'Sub10']);
292
275
  }
293
- yield clickgo.tool.sleep(300);
294
- this.sub6children = ['Sub7', 'Sub8'];
295
- });
276
+ else {
277
+ resolve();
278
+ }
279
+ return;
280
+ }
281
+ await clickgo.tool.sleep(300);
282
+ this.sub6children = ['Sub7', 'Sub8'];
296
283
  }
297
- onList6Load(value, resolve) {
298
- return __awaiter(this, void 0, void 0, function* () {
299
- yield clickgo.tool.sleep(300);
300
- resolve();
301
- });
284
+ async onList6Load(value, resolve) {
285
+ await clickgo.tool.sleep(300);
286
+ resolve();
302
287
  }
303
288
  onSelect(area) {
304
289
  this.selectionArea = area;
@@ -318,10 +303,8 @@ class default_1 extends clickgo.form.AbstractForm {
318
303
  }
319
304
  }
320
305
  }
321
- onGesture(dir) {
322
- return __awaiter(this, void 0, void 0, function* () {
323
- yield clickgo.form.dialog('onGesture: ' + dir);
324
- });
306
+ async onGesture(dir) {
307
+ await clickgo.form.dialog('onGesture: ' + dir);
325
308
  }
326
309
  onGAdd(e) {
327
310
  clickgo.form.notify({
@@ -366,27 +349,25 @@ class default_1 extends clickgo.form.AbstractForm {
366
349
  this.listMap5 = { 'label': 'name', 'value': 'id', 'children': 'sub', 'disabled': 'disabled1' };
367
350
  }
368
351
  }
369
- onlist5Load(value, resolve) {
370
- return __awaiter(this, void 0, void 0, function* () {
371
- if (value === '4') {
372
- yield clickgo.tool.sleep(100);
373
- resolve([
374
- {
375
- 'name': 'hi5',
376
- 'name2': 'xhi5',
377
- 'id': '5'
378
- },
379
- {
380
- 'name': 'hi6',
381
- 'name2': 'xhi6',
382
- 'id': '6'
383
- }
384
- ]);
385
- return;
386
- }
387
- yield clickgo.tool.sleep(300);
388
- resolve();
389
- });
352
+ async onlist5Load(value, resolve) {
353
+ if (value === '4') {
354
+ await clickgo.tool.sleep(100);
355
+ resolve([
356
+ {
357
+ 'name': 'hi5',
358
+ 'name2': 'xhi5',
359
+ 'id': '5'
360
+ },
361
+ {
362
+ 'name': 'hi6',
363
+ 'name2': 'xhi6',
364
+ 'id': '6'
365
+ }
366
+ ]);
367
+ return;
368
+ }
369
+ await clickgo.tool.sleep(300);
370
+ resolve();
390
371
  }
391
372
  onMounted() {
392
373
  }