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
@@ -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 {
@@ -97,25 +88,23 @@ class default_1 extends clickgo.form.AbstractForm {
97
88
  this.keyReal = this.key;
98
89
  this.factoryReal = this.factory[0];
99
90
  }
100
- markerAddGaoqiao(wgs) {
101
- return __awaiter(this, void 0, void 0, function* () {
102
- if (this.markers.length < 3) {
103
- yield clickgo.form.dialog('Please create at least 3 markers first.');
104
- return;
105
- }
106
- const lat = wgs ? 31.354737 : 31.352569;
107
- const lng = wgs ? 121.558717 : 121.56302;
108
- this.markers.push({
109
- 'lat': lat,
110
- 'lng': lng,
111
- 'title': 'Gaoqiao',
112
- 'drag': true
113
- });
114
- this.overlays.push({
115
- 'lat': lat,
116
- 'lng': lng,
117
- 'html': '<div class="label">Gaoqiao' + this.markers.length.toString() + '</div>'
118
- });
91
+ async markerAddGaoqiao(wgs) {
92
+ if (this.markers.length < 3) {
93
+ await clickgo.form.dialog('Please create at least 3 markers first.');
94
+ return;
95
+ }
96
+ const lat = wgs ? 31.354737 : 31.352569;
97
+ const lng = wgs ? 121.558717 : 121.56302;
98
+ this.markers.push({
99
+ 'lat': lat,
100
+ 'lng': lng,
101
+ 'title': 'Gaoqiao',
102
+ 'drag': true
103
+ });
104
+ this.overlays.push({
105
+ 'lat': lat,
106
+ 'lng': lng,
107
+ 'html': '<div class="label">Gaoqiao' + this.markers.length.toString() + '</div>'
119
108
  });
120
109
  }
121
110
  markerAdd() {
@@ -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 {
@@ -54,14 +45,12 @@ class default_1 extends clickgo.form.AbstractForm {
54
45
  onCheck(event) {
55
46
  event.preventDefault();
56
47
  }
57
- onRadio(event, o, n) {
58
- return __awaiter(this, void 0, void 0, function* () {
59
- if (o !== 'radio2') {
60
- return;
61
- }
62
- event.preventDefault();
63
- yield clickgo.form.dialog('When the value is set to "radio2," this option cannot be selected. Now is: ' + n);
64
- });
48
+ async onRadio(event, o, n) {
49
+ if (o !== 'radio2') {
50
+ return;
51
+ }
52
+ event.preventDefault();
53
+ await clickgo.form.dialog('When the value is set to "radio2," this option cannot be selected. Now is: ' + n);
65
54
  }
66
55
  }
67
56
  exports.default = default_1;
@@ -60,7 +60,7 @@ class default_1 extends clickgo.form.AbstractForm {
60
60
  }
61
61
  changed(e) {
62
62
  const found = this.list.find(item => item.value === e.detail.value[0]);
63
- if (found && found.fval) {
63
+ if (found?.fval) {
64
64
  this.fsrc = found.fval;
65
65
  return;
66
66
  }
@@ -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 {
@@ -54,18 +45,16 @@ class default_1 extends clickgo.form.AbstractForm {
54
45
  this.slogo = false;
55
46
  this.hash = false;
56
47
  }
57
- onSelect(e) {
58
- return __awaiter(this, void 0, void 0, function* () {
59
- e.preventDefault();
60
- yield clickgo.form.dialog('Not nav, selected: ' + e.detail.selected + ', name: ' + e.detail.name);
61
- });
48
+ async onSelect(e) {
49
+ e.preventDefault();
50
+ await clickgo.form.dialog('Not nav, selected: ' + e.detail.selected + ', name: ' + e.detail.name);
62
51
  }
63
52
  onMounted() {
64
- this.watch('name', () => __awaiter(this, void 0, void 0, function* () {
53
+ this.watch('name', async () => {
65
54
  this.loading = true;
66
- yield clickgo.tool.sleep(300);
55
+ await clickgo.tool.sleep(300);
67
56
  this.loading = false;
68
- }));
57
+ });
69
58
  }
70
59
  }
71
60
  exports.default = default_1;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ const clickgo = __importStar(require("clickgo"));
37
+ class default_1 extends clickgo.form.AbstractForm {
38
+ constructor() {
39
+ super(...arguments);
40
+ this.url = '';
41
+ this.pwd = '';
42
+ this.config = {
43
+ 'url': '',
44
+ 'pwd': '',
45
+ };
46
+ this.list = [];
47
+ }
48
+ toConnect() {
49
+ this.config.url = this.url;
50
+ this.config.pwd = this.pwd;
51
+ }
52
+ date() {
53
+ const d = new Date();
54
+ return `[${d.getHours().toString().padStart(2, '0')}:${d.getMinutes().toString().padStart(2, '0')}:${d.getSeconds().toString().padStart(2, '0')}] `;
55
+ }
56
+ connect() {
57
+ this.list.unshift(this.date() + 'connect');
58
+ }
59
+ disconnect() {
60
+ this.list.unshift(this.date() + 'disconnect');
61
+ }
62
+ password() {
63
+ this.list.unshift(this.date() + 'password');
64
+ }
65
+ fail() {
66
+ this.list.unshift(this.date() + 'fail');
67
+ }
68
+ desktopresize(e) {
69
+ this.list.unshift(this.date() + 'desktopresize: ' + e.width + 'x' + e.height);
70
+ }
71
+ clipboard(text) {
72
+ this.list.unshift(this.date() + 'clipboard: ' + text);
73
+ }
74
+ }
75
+ exports.default = default_1;
@@ -0,0 +1,13 @@
1
+ <form width="450" height="600" title="Novnc" padding="10">
2
+ <layout direction="v" gutter="10" style="flex: 1;">
3
+ <novnc v-model="config" @connect="connect" @disconnect="disconnect" @password="password" @fail="fail" @desktopresize="desktopresize" @clipboard="clipboard" style="flex: 1; height: 0;"></novnc>
4
+ <layout gutter="10">
5
+ <text v-model="url" placeholder="ws:// | wss://" style="flex: 1;" />
6
+ <text v-model="pwd" placeholder="Password" style="flex: 1;" />
7
+ <button @click="toConnect">connect</button>
8
+ </layout>
9
+ <flow direction="v" style="background: oklch(0 0 0); color: oklch(1 0 0); height: 70px;">
10
+ <label v-for="item of list">{{ item }}</label>
11
+ </flow>
12
+ </layout>
13
+ </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
  var __importDefault = (this && this.__importDefault) || function (mod) {
45
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
46
37
  };
@@ -56,14 +47,12 @@ class default_1 extends clickgo.form.AbstractForm {
56
47
  this.plain = false;
57
48
  this.map = null;
58
49
  }
59
- go() {
60
- return __awaiter(this, void 0, void 0, function* () {
61
- this.loading = true;
62
- yield this.refs.panel.go(test1_1.default, {
63
- 'type': 'show'
64
- });
65
- this.loading = false;
50
+ async go() {
51
+ this.loading = true;
52
+ await this.refs.panel.go(test1_1.default, {
53
+ 'type': 'show'
66
54
  });
55
+ this.loading = false;
67
56
  }
68
57
  ssend() {
69
58
  this.refs.panel.send({
@@ -77,7 +66,7 @@ class default_1 extends clickgo.form.AbstractForm {
77
66
  };
78
67
  }
79
68
  onMounted() {
80
- this.watch('selected', () => __awaiter(this, void 0, void 0, function* () {
69
+ this.watch('selected', async () => {
81
70
  switch (this.selected[0]) {
82
71
  case 'none': {
83
72
  if (this.map) {
@@ -91,7 +80,7 @@ class default_1 extends clickgo.form.AbstractForm {
91
80
  }
92
81
  else {
93
82
  this.loading = true;
94
- yield this.refs.panel.go(test1_1.default);
83
+ await this.refs.panel.go(test1_1.default);
95
84
  this.loading = false;
96
85
  }
97
86
  break;
@@ -102,13 +91,13 @@ class default_1 extends clickgo.form.AbstractForm {
102
91
  }
103
92
  else {
104
93
  this.loading = true;
105
- yield this.refs.panel.go('./test2');
94
+ await this.refs.panel.go('./test2');
106
95
  this.loading = false;
107
96
  }
108
97
  break;
109
98
  }
110
99
  }
111
- }), {
100
+ }, {
112
101
  'deep': true,
113
102
  'immediate': true
114
103
  });
@@ -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.AbstractPanel {
@@ -50,23 +41,17 @@ class default_1 extends clickgo.form.AbstractPanel {
50
41
  this.data = {};
51
42
  this.rootMountData = 'none';
52
43
  }
53
- onShow(e) {
54
- return __awaiter(this, void 0, void 0, function* () {
55
- yield clickgo.tool.sleep(1000);
56
- ++this.scount;
57
- this.data = e;
58
- });
44
+ async onShow(e) {
45
+ await clickgo.tool.sleep(1000);
46
+ ++this.scount;
47
+ this.data = e;
59
48
  }
60
- onHide() {
61
- return __awaiter(this, void 0, void 0, function* () {
62
- yield clickgo.tool.sleep(1000);
63
- });
49
+ async onHide() {
50
+ await clickgo.tool.sleep(1000);
64
51
  }
65
- onReceive(data) {
66
- return __awaiter(this, void 0, void 0, function* () {
67
- this.data = data;
68
- yield clickgo.form.dialog('test1 got data.');
69
- });
52
+ async onReceive(data) {
53
+ this.data = data;
54
+ await clickgo.form.dialog('test1 got data.');
70
55
  }
71
56
  onQsChange() {
72
57
  clickgo.form.notify({
@@ -74,26 +59,20 @@ class default_1 extends clickgo.form.AbstractPanel {
74
59
  'content': 'onQsChange: ' + Object.keys(this.qs).length.toString()
75
60
  });
76
61
  }
77
- onQsChangeShow(e) {
78
- return __awaiter(this, void 0, void 0, function* () {
79
- yield clickgo.tool.sleep(500);
80
- clickgo.form.notify({
81
- 'title': 'Test1 Panel',
82
- 'content': 'onQsChangeShow'
83
- });
84
- console.log('onQsChangeShow', e);
62
+ async onQsChangeShow(e) {
63
+ await clickgo.tool.sleep(500);
64
+ clickgo.form.notify({
65
+ 'title': 'Test1 Panel',
66
+ 'content': 'onQsChangeShow'
85
67
  });
68
+ console.log('onQsChangeShow', e);
86
69
  }
87
- click() {
88
- return __awaiter(this, void 0, void 0, function* () {
89
- yield clickgo.form.dialog('Hello panel!');
90
- });
70
+ async click() {
71
+ await clickgo.form.dialog('Hello panel!');
91
72
  }
92
- clearQss() {
93
- return __awaiter(this, void 0, void 0, function* () {
94
- this.clearQs();
95
- yield clickgo.form.dialog('cleard.');
96
- });
73
+ async clearQss() {
74
+ this.clearQs();
75
+ await clickgo.form.dialog('cleard.');
97
76
  }
98
77
  jump() {
99
78
  this.rootForm.formHash = 'test1?a=1&b=3';
@@ -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,10 +46,8 @@ class default_1 extends clickgo.form.AbstractForm {
55
46
  onLoaded(pdf) {
56
47
  this.access.pdf = pdf;
57
48
  }
58
- onView(e) {
59
- return __awaiter(this, void 0, void 0, function* () {
60
- yield clickgo.form.dialog(JSON.stringify(e.detail));
61
- });
49
+ async onView(e) {
50
+ await clickgo.form.dialog(JSON.stringify(e.detail));
62
51
  }
63
52
  load() {
64
53
  this.src = '/package/form/control/pdf/test.pdf';
@@ -66,13 +55,11 @@ class default_1 extends clickgo.form.AbstractForm {
66
55
  select() {
67
56
  this.refs.file.select();
68
57
  }
69
- change(files) {
70
- return __awaiter(this, void 0, void 0, function* () {
71
- if (!files) {
72
- return;
73
- }
74
- yield this.refs.pdf.load(files[0]);
75
- });
58
+ async change(files) {
59
+ if (!files) {
60
+ return;
61
+ }
62
+ await this.refs.pdf.load(files[0]);
76
63
  }
77
64
  }
78
65
  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 {
@@ -52,11 +43,11 @@ class default_1 extends clickgo.form.AbstractForm {
52
43
  this.v4 = ['default'];
53
44
  }
54
45
  onMounted() {
55
- clickgo.tool.sleep(500).then(() => __awaiter(this, void 0, void 0, function* () {
46
+ clickgo.tool.sleep(500).then(async () => {
56
47
  this.v2 = 40;
57
- yield clickgo.tool.sleep(500);
48
+ await clickgo.tool.sleep(500);
58
49
  this.v2 = 70;
59
- })).catch(() => {
50
+ }).catch(() => {
60
51
  });
61
52
  }
62
53
  }
@@ -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 {
@@ -49,14 +40,12 @@ class default_1 extends clickgo.form.AbstractForm {
49
40
  this.value = 'radio1';
50
41
  this.disabled = false;
51
42
  }
52
- onChange(e) {
53
- return __awaiter(this, void 0, void 0, function* () {
54
- if (e.detail.selected !== 'radio2') {
55
- return;
56
- }
57
- e.preventDefault();
58
- yield clickgo.form.dialog('selected: ' + e.detail.selected + ', value: ' + e.detail.value);
59
- });
43
+ async onChange(e) {
44
+ if (e.detail.selected !== 'radio2') {
45
+ return;
46
+ }
47
+ e.preventDefault();
48
+ await clickgo.form.dialog('selected: ' + e.detail.selected + ', value: ' + e.detail.value);
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 {
@@ -160,21 +151,19 @@ class default_1 extends clickgo.form.AbstractForm {
160
151
  }
161
152
  return rtn;
162
153
  }
163
- onLoad(value, resolve) {
164
- return __awaiter(this, void 0, void 0, function* () {
165
- if (value !== 'haha4') {
166
- yield clickgo.tool.sleep(100);
167
- if (value === 'haha2') {
168
- resolve(['60']);
169
- }
170
- else {
171
- resolve();
172
- }
173
- return;
154
+ async onLoad(value, resolve) {
155
+ if (value !== 'haha4') {
156
+ await clickgo.tool.sleep(100);
157
+ if (value === 'haha2') {
158
+ resolve(['60']);
174
159
  }
175
- yield clickgo.tool.sleep(300);
176
- resolve(['he', 'ha']);
177
- });
160
+ else {
161
+ resolve();
162
+ }
163
+ return;
164
+ }
165
+ await clickgo.tool.sleep(300);
166
+ resolve(['he', 'ha']);
178
167
  }
179
168
  onLoaded() {
180
169
  clickgo.form.notify({
@@ -183,21 +172,19 @@ class default_1 extends clickgo.form.AbstractForm {
183
172
  'content': 'Done'
184
173
  });
185
174
  }
186
- onRemote(e) {
187
- return __awaiter(this, void 0, void 0, function* () {
188
- yield clickgo.tool.sleep(300);
189
- if (!e.detail.value || e.detail.value === '8') {
190
- yield e.detail.callback();
191
- return;
192
- }
193
- yield e.detail.callback(['test', e.detail.value, 'remote', {
194
- 'label': 'label',
195
- 'value': 'ok'
196
- }, {
197
- 'label': 'label2',
198
- 'value': 2
199
- }]);
200
- });
175
+ async onRemote(e) {
176
+ await clickgo.tool.sleep(300);
177
+ if (!e.detail.value || e.detail.value === '8') {
178
+ await e.detail.callback();
179
+ return;
180
+ }
181
+ await e.detail.callback(['test', e.detail.value, 'remote', {
182
+ 'label': 'label',
183
+ 'value': 'ok'
184
+ }, {
185
+ 'label': 'label2',
186
+ 'value': 2
187
+ }]);
201
188
  }
202
189
  onGAdd(e) {
203
190
  clickgo.form.notify({
@@ -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 {
@@ -54,11 +45,9 @@ class default_1 extends clickgo.form.AbstractForm {
54
45
  this.disabled = false;
55
46
  this.size = ['m'];
56
47
  }
57
- onChange(e) {
58
- return __awaiter(this, void 0, void 0, function* () {
59
- e.preventDefault();
60
- yield clickgo.form.dialog('v: ' + (e.detail.value ? 'true' : 'false'));
61
- });
48
+ async onChange(e) {
49
+ e.preventDefault();
50
+ await clickgo.form.dialog('v: ' + (e.detail.value ? 'true' : 'false'));
62
51
  }
63
52
  }
64
53
  exports.default = default_1;