clickgo 3.16.26 → 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 (102) 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 +40 -52
  18. package/dist/app/demo/form/control/list/list.xml +20 -10
  19. package/dist/app/demo/form/control/map/map.js +17 -28
  20. package/dist/app/demo/form/control/menu/menu.js +6 -17
  21. package/dist/app/demo/form/control/mpegts/mpegts.js +1 -1
  22. package/dist/app/demo/form/control/nav/nav.js +6 -17
  23. package/dist/app/demo/form/control/novnc/novnc.js +75 -0
  24. package/dist/app/demo/form/control/novnc/novnc.xml +13 -0
  25. package/dist/app/demo/form/control/panel/panel.js +9 -20
  26. package/dist/app/demo/form/control/panel/test1.js +20 -41
  27. package/dist/app/demo/form/control/pdf/pdf.js +7 -20
  28. package/dist/app/demo/form/control/progress/progress.js +3 -12
  29. package/dist/app/demo/form/control/radio/radio.js +6 -17
  30. package/dist/app/demo/form/control/select/select.js +28 -41
  31. package/dist/app/demo/form/control/switch/switch.js +3 -14
  32. package/dist/app/demo/form/control/tab/tab.js +7 -18
  33. package/dist/app/demo/form/control/table/table.js +8 -23
  34. package/dist/app/demo/form/control/text/text.js +2 -13
  35. package/dist/app/demo/form/control/tuieditor/tuieditor.js +7 -18
  36. package/dist/app/demo/form/control/uploader/uploader.js +20 -31
  37. package/dist/app/demo/form/control/vflow/vflow.js +2 -13
  38. package/dist/app/demo/form/event/form/form.js +11 -22
  39. package/dist/app/demo/form/event/task/task.js +14 -29
  40. package/dist/app/demo/form/main.js +381 -387
  41. package/dist/app/demo/form/main.xml +3 -0
  42. package/dist/app/demo/form/method/acontrol/acontrol.js +2 -13
  43. package/dist/app/demo/form/method/aform/aform.js +41 -60
  44. package/dist/app/demo/form/method/aform/sd.js +3 -14
  45. package/dist/app/demo/form/method/core/core.js +25 -50
  46. package/dist/app/demo/form/method/dom/dom.js +35 -58
  47. package/dist/app/demo/form/method/form/form.js +106 -149
  48. package/dist/app/demo/form/method/fs/fs.js +126 -147
  49. package/dist/app/demo/form/method/native/native.js +44 -72
  50. package/dist/app/demo/form/method/storage/storage.js +9 -27
  51. package/dist/app/demo/form/method/system/system.js +16 -41
  52. package/dist/app/demo/form/method/task/task.js +18 -37
  53. package/dist/app/demo/form/method/theme/theme.js +39 -54
  54. package/dist/app/demo/form/method/tool/tool.js +22 -43
  55. package/dist/app/demo/form/method/tool/tool.xml +1 -1
  56. package/dist/app/demo/form/method/zip/zip.js +18 -29
  57. package/dist/app/demo/form/solution/backpanel/backpanel.js +10 -23
  58. package/dist/app/task/app.js +2 -13
  59. package/dist/app/task/form/bar/bar.js +32 -45
  60. package/dist/clickgo.js +1 -1
  61. package/dist/control/arteditor.cgc +0 -0
  62. package/dist/control/box.cgc +0 -0
  63. package/dist/control/captcha.cgc +0 -0
  64. package/dist/control/common.cgc +0 -0
  65. package/dist/control/desc.cgc +0 -0
  66. package/dist/control/drawer.cgc +0 -0
  67. package/dist/control/echarts.cgc +0 -0
  68. package/dist/control/form.cgc +0 -0
  69. package/dist/control/iconview.cgc +0 -0
  70. package/dist/control/jodit.cgc +0 -0
  71. package/dist/control/map.cgc +0 -0
  72. package/dist/control/monaco.cgc +0 -0
  73. package/dist/control/mpegts.cgc +0 -0
  74. package/dist/control/nav.cgc +0 -0
  75. package/dist/control/novnc.cgc +0 -0
  76. package/dist/control/page.cgc +0 -0
  77. package/dist/control/pdf.cgc +0 -0
  78. package/dist/control/property.cgc +0 -0
  79. package/dist/control/qrcode.cgc +0 -0
  80. package/dist/control/table.cgc +0 -0
  81. package/dist/control/task.cgc +0 -0
  82. package/dist/control/tplink.cgc +0 -0
  83. package/dist/control/tuieditor.cgc +0 -0
  84. package/dist/control/tuiviewer.cgc +0 -0
  85. package/dist/control/xterm.cgc +0 -0
  86. package/dist/index.js +59 -71
  87. package/dist/lib/control.js +213 -235
  88. package/dist/lib/core.js +356 -379
  89. package/dist/lib/dom.js +62 -91
  90. package/dist/lib/form.js +834 -906
  91. package/dist/lib/fs.js +834 -892
  92. package/dist/lib/native.js +32 -63
  93. package/dist/lib/storage.js +21 -33
  94. package/dist/lib/task.js +1054 -1098
  95. package/dist/lib/theme.js +102 -121
  96. package/dist/lib/tool.js +65 -98
  97. package/dist/lib/zip.js +27 -42
  98. package/dist/theme/blue.cgt +0 -0
  99. package/dist/theme/byterun.cgt +0 -0
  100. package/dist/theme/dark.cgt +0 -0
  101. package/dist/theme/light.cgt +0 -0
  102. 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
  exports.getToken = getToken;
46
37
  exports.on = on;
@@ -158,54 +149,36 @@ function getListenerList(taskId) {
158
149
  }
159
150
  return rtn;
160
151
  }
161
- function invoke(name, ...param) {
162
- return __awaiter(this, void 0, void 0, function* () {
163
- if (!clickgo.isNative()) {
164
- return;
165
- }
166
- return window.clickgoNative.invoke(name, ...param);
167
- });
152
+ async function invoke(name, ...param) {
153
+ if (!clickgo.isNative()) {
154
+ return;
155
+ }
156
+ return window.clickgoNative.invoke(name, ...param);
168
157
  }
169
158
  invoke('cg-init', token);
170
- function quit() {
171
- return __awaiter(this, void 0, void 0, function* () {
172
- yield invoke('cg-quit', token);
173
- });
174
- }
175
- function size(width, height) {
176
- return __awaiter(this, void 0, void 0, function* () {
177
- yield invoke('cg-set-size', token, width, height);
178
- });
179
- }
180
- function max() {
181
- return __awaiter(this, void 0, void 0, function* () {
182
- yield invoke('cg-set-state', token, 'max');
183
- });
184
- }
185
- function min() {
186
- return __awaiter(this, void 0, void 0, function* () {
187
- yield invoke('cg-set-state', token, 'min');
188
- });
189
- }
190
- function restore() {
191
- return __awaiter(this, void 0, void 0, function* () {
192
- yield invoke('cg-set-state', token, 'restore');
193
- });
194
- }
195
- function activate() {
196
- return __awaiter(this, void 0, void 0, function* () {
197
- yield invoke('cg-activate', token);
198
- });
199
- }
200
- function close() {
201
- return __awaiter(this, void 0, void 0, function* () {
202
- yield invoke('cg-close', token);
203
- });
204
- }
205
- function maximizable(val) {
206
- return __awaiter(this, void 0, void 0, function* () {
207
- yield invoke('cg-maximizable', token, val);
208
- });
159
+ async function quit() {
160
+ await invoke('cg-quit', token);
161
+ }
162
+ async function size(width, height) {
163
+ await invoke('cg-set-size', token, width, height);
164
+ }
165
+ async function max() {
166
+ await invoke('cg-set-state', token, 'max');
167
+ }
168
+ async function min() {
169
+ await invoke('cg-set-state', token, 'min');
170
+ }
171
+ async function restore() {
172
+ await invoke('cg-set-state', token, 'restore');
173
+ }
174
+ async function activate() {
175
+ await invoke('cg-activate', token);
176
+ }
177
+ async function close() {
178
+ await invoke('cg-close', token);
179
+ }
180
+ async function maximizable(val) {
181
+ await invoke('cg-maximizable', token, val);
209
182
  }
210
183
  function open(options = {}) {
211
184
  return invoke('cg-form-open', token, options);
@@ -216,13 +189,9 @@ function save(options = {}) {
216
189
  function dialog(options = {}) {
217
190
  return invoke('cg-form-dialog', token, options);
218
191
  }
219
- function ping(val) {
220
- return __awaiter(this, void 0, void 0, function* () {
221
- return invoke('cg-ping', val);
222
- });
192
+ async function ping(val) {
193
+ return invoke('cg-ping', val);
223
194
  }
224
- function isMax() {
225
- return __awaiter(this, void 0, void 0, function* () {
226
- return invoke('cg-is-max');
227
- });
195
+ async function isMax() {
196
+ return invoke('cg-is-max');
228
197
  }
@@ -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
  exports.get = get;
46
37
  exports.set = set;
@@ -106,7 +97,7 @@ function get(key, taskId) {
106
97
  try {
107
98
  return JSON.parse(v);
108
99
  }
109
- catch (_a) {
100
+ catch {
110
101
  return null;
111
102
  }
112
103
  }
@@ -188,7 +179,7 @@ function all() {
188
179
  const rtn = {};
189
180
  for (let i = 0; i < localStorage.length; i++) {
190
181
  const key = localStorage.key(i);
191
- if (!(key === null || key === void 0 ? void 0 : key.startsWith('clickgo-size-'))) {
182
+ if (!key?.startsWith('clickgo-size-')) {
192
183
  continue;
193
184
  }
194
185
  const sizes = localStorage.getItem(key);
@@ -201,27 +192,24 @@ function all() {
201
192
  }
202
193
  return rtn;
203
194
  }
204
- function clear(path) {
205
- return __awaiter(this, void 0, void 0, function* () {
206
- var _a, _b;
207
- if (!path) {
208
- return 0;
209
- }
210
- const loc = (_b = (_a = localeData[core.config.locale]) === null || _a === void 0 ? void 0 : _a['sure-clear']) !== null && _b !== void 0 ? _b : localeData['en']['sure-clear'];
211
- if (!(yield form.superConfirm(loc.replace('?', tool.escapeHTML(path))))) {
212
- return 0;
213
- }
214
- let count = 0;
215
- localStorage.removeItem('clickgo-size-' + path);
216
- const pre = 'clickgo-item-' + path + '-';
217
- for (let i = 0; i < localStorage.length; i++) {
218
- const key = localStorage.key(i);
219
- if (!(key === null || key === void 0 ? void 0 : key.startsWith(pre))) {
220
- continue;
221
- }
222
- localStorage.removeItem(key);
223
- ++count;
195
+ async function clear(path) {
196
+ if (!path) {
197
+ return 0;
198
+ }
199
+ const loc = localeData[core.config.locale]?.['sure-clear'] ?? localeData['en']['sure-clear'];
200
+ if (!await form.superConfirm(loc.replace('?', tool.escapeHTML(path)))) {
201
+ return 0;
202
+ }
203
+ let count = 0;
204
+ localStorage.removeItem('clickgo-size-' + path);
205
+ const pre = 'clickgo-item-' + path + '-';
206
+ for (let i = 0; i < localStorage.length; i++) {
207
+ const key = localStorage.key(i);
208
+ if (!key?.startsWith(pre)) {
209
+ continue;
224
210
  }
225
- return count;
226
- });
211
+ localStorage.removeItem(key);
212
+ ++count;
213
+ }
214
+ return count;
227
215
  }