clickgo 3.15.9 → 3.15.11

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 (42) hide show
  1. package/README.md +1 -1
  2. package/dist/app/demo/form/control/label/label.xml +4 -1
  3. package/dist/app/demo/form/control/tip/tip.xml +6 -0
  4. package/dist/clickgo.js +1 -1
  5. package/dist/clickgo.ts +1 -1
  6. package/dist/control/arteditor.cgc +0 -0
  7. package/dist/control/box.cgc +0 -0
  8. package/dist/control/common.cgc +0 -0
  9. package/dist/control/desc.cgc +0 -0
  10. package/dist/control/drawer.cgc +0 -0
  11. package/dist/control/echarts.cgc +0 -0
  12. package/dist/control/form.cgc +0 -0
  13. package/dist/control/iconview.cgc +0 -0
  14. package/dist/control/jodit.cgc +0 -0
  15. package/dist/control/map.cgc +0 -0
  16. package/dist/control/monaco.cgc +0 -0
  17. package/dist/control/nav.cgc +0 -0
  18. package/dist/control/page.cgc +0 -0
  19. package/dist/control/property.cgc +0 -0
  20. package/dist/control/table.cgc +0 -0
  21. package/dist/control/task.cgc +0 -0
  22. package/dist/control/tuieditor.cgc +0 -0
  23. package/dist/control/tuiviewer.cgc +0 -0
  24. package/dist/control/xterm.cgc +0 -0
  25. package/dist/global.css +1 -1
  26. package/dist/index.js +7 -7
  27. package/dist/lib/control.js +4 -4
  28. package/dist/lib/core.js +15 -15
  29. package/dist/lib/dom.js +49 -49
  30. package/dist/lib/form.js +2 -2
  31. package/dist/lib/form.ts +2 -2
  32. package/dist/lib/fs.js +18 -19
  33. package/dist/lib/native.js +14 -15
  34. package/dist/lib/storage.js +6 -7
  35. package/dist/lib/task.js +23 -23
  36. package/dist/lib/theme.js +7 -7
  37. package/dist/lib/tool.js +42 -42
  38. package/dist/lib/zip.js +2 -2
  39. package/dist/theme/byterun.cgt +0 -0
  40. package/dist/theme/familiar.cgt +0 -0
  41. package/dist/theme/light.cgt +0 -0
  42. package/package.json +1 -1
@@ -32,7 +32,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
32
  });
33
33
  };
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.clear = exports.all = exports.list = exports.remove = exports.set = exports.get = void 0;
35
+ exports.get = get;
36
+ exports.set = set;
37
+ exports.remove = remove;
38
+ exports.list = list;
39
+ exports.all = all;
40
+ exports.clear = clear;
36
41
  const task = __importStar(require("./task"));
37
42
  const form = __importStar(require("./form"));
38
43
  const core = __importStar(require("./core"));
@@ -90,7 +95,6 @@ function get(key, taskId) {
90
95
  }
91
96
  return JSON.parse(v);
92
97
  }
93
- exports.get = get;
94
98
  function set(key, val, taskId) {
95
99
  if (!taskId) {
96
100
  return false;
@@ -122,7 +126,6 @@ function set(key, val, taskId) {
122
126
  localStorage.setItem('clickgo-item-' + t.path + '-' + key, v);
123
127
  return true;
124
128
  }
125
- exports.set = set;
126
129
  function remove(key, taskId) {
127
130
  if (!taskId) {
128
131
  return false;
@@ -149,7 +152,6 @@ function remove(key, taskId) {
149
152
  localStorage.removeItem('clickgo-item-' + t.path + '-' + key);
150
153
  return true;
151
154
  }
152
- exports.remove = remove;
153
155
  function list(taskId) {
154
156
  if (!taskId) {
155
157
  return {};
@@ -164,7 +166,6 @@ function list(taskId) {
164
166
  }
165
167
  return JSON.parse(sizes);
166
168
  }
167
- exports.list = list;
168
169
  function all() {
169
170
  const rtn = {};
170
171
  for (let i = 0; i < localStorage.length; i++) {
@@ -182,7 +183,6 @@ function all() {
182
183
  }
183
184
  return rtn;
184
185
  }
185
- exports.all = all;
186
186
  function clear(path) {
187
187
  return __awaiter(this, void 0, void 0, function* () {
188
188
  var _a, _b;
@@ -207,4 +207,3 @@ function clear(path) {
207
207
  return count;
208
208
  });
209
209
  }
210
- exports.clear = clear;
package/dist/lib/task.js CHANGED
@@ -32,7 +32,29 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
32
  });
33
33
  };
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.refreshSystemPosition = exports.clearSystem = exports.setSystem = exports.systemTaskInfo = exports.sleep = exports.removeTimer = exports.createTimer = exports.clearLocaleLang = exports.setLocaleLang = exports.setLocale = exports.clearLocale = exports.loadLocale = exports.loadLocaleData = exports.end = exports.checkPermission = exports.run = exports.getList = exports.getPermissions = exports.get = exports.offFrame = exports.onFrame = exports.getFocus = exports.setFocus = exports.lastId = exports.list = void 0;
35
+ exports.systemTaskInfo = exports.lastId = exports.list = void 0;
36
+ exports.setFocus = setFocus;
37
+ exports.getFocus = getFocus;
38
+ exports.onFrame = onFrame;
39
+ exports.offFrame = offFrame;
40
+ exports.get = get;
41
+ exports.getPermissions = getPermissions;
42
+ exports.getList = getList;
43
+ exports.run = run;
44
+ exports.checkPermission = checkPermission;
45
+ exports.end = end;
46
+ exports.loadLocaleData = loadLocaleData;
47
+ exports.loadLocale = loadLocale;
48
+ exports.clearLocale = clearLocale;
49
+ exports.setLocale = setLocale;
50
+ exports.setLocaleLang = setLocaleLang;
51
+ exports.clearLocaleLang = clearLocaleLang;
52
+ exports.createTimer = createTimer;
53
+ exports.removeTimer = removeTimer;
54
+ exports.sleep = sleep;
55
+ exports.setSystem = setSystem;
56
+ exports.clearSystem = clearSystem;
57
+ exports.refreshSystemPosition = refreshSystemPosition;
36
58
  const clickgo = __importStar(require("../clickgo"));
37
59
  const core = __importStar(require("./core"));
38
60
  const dom = __importStar(require("./dom"));
@@ -48,11 +70,9 @@ let focusId = null;
48
70
  function setFocus(id) {
49
71
  focusId = id !== null && id !== void 0 ? id : null;
50
72
  }
51
- exports.setFocus = setFocus;
52
73
  function getFocus() {
53
74
  return focusId;
54
75
  }
55
- exports.getFocus = getFocus;
56
76
  const localeData = {
57
77
  'en': {
58
78
  'loading': 'Loading...',
@@ -159,7 +179,6 @@ function onFrame(fun, opt = {}) {
159
179
  task.timers['1x' + ft.toString()] = formId !== null && formId !== void 0 ? formId : 0;
160
180
  return ft;
161
181
  }
162
- exports.onFrame = onFrame;
163
182
  function offFrame(ft, opt = {}) {
164
183
  const taskId = opt.taskId;
165
184
  if (!taskId) {
@@ -176,7 +195,6 @@ function offFrame(ft, opt = {}) {
176
195
  delete exports.list[taskId].timers['1x' + ft.toString()];
177
196
  delete frameMaps[ft];
178
197
  }
179
- exports.offFrame = offFrame;
180
198
  function get(tid) {
181
199
  if (exports.list[tid] === undefined) {
182
200
  return null;
@@ -191,14 +209,12 @@ function get(tid) {
191
209
  'current': exports.list[tid].current
192
210
  };
193
211
  }
194
- exports.get = get;
195
212
  function getPermissions(tid) {
196
213
  if (exports.list[tid] === undefined) {
197
214
  return [];
198
215
  }
199
216
  return tool.clone(exports.list[tid].runtime.permissions);
200
217
  }
201
- exports.getPermissions = getPermissions;
202
218
  function getList() {
203
219
  const rtn = {};
204
220
  for (const tid in exports.list) {
@@ -215,7 +231,6 @@ function getList() {
215
231
  }
216
232
  return rtn;
217
233
  }
218
- exports.getList = getList;
219
234
  function run(url_1) {
220
235
  return __awaiter(this, arguments, void 0, function* (url, opt = {}, ntid) {
221
236
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
@@ -1243,7 +1258,6 @@ function run(url_1) {
1243
1258
  return taskId;
1244
1259
  });
1245
1260
  }
1246
- exports.run = run;
1247
1261
  const locale = {
1248
1262
  'sc': {
1249
1263
  'unknown': '未知权限',
@@ -1460,7 +1474,6 @@ function checkPermission(vals_1) {
1460
1474
  return rtn;
1461
1475
  });
1462
1476
  }
1463
- exports.checkPermission = checkPermission;
1464
1477
  function end(taskId) {
1465
1478
  var _a;
1466
1479
  if (typeof taskId === 'string') {
@@ -1527,7 +1540,6 @@ function end(taskId) {
1527
1540
  clearSystem(taskId);
1528
1541
  return true;
1529
1542
  }
1530
- exports.end = end;
1531
1543
  function loadLocaleData(lang, data, pre = '', taskId) {
1532
1544
  if (!taskId) {
1533
1545
  return;
@@ -1545,7 +1557,6 @@ function loadLocaleData(lang, data, pre = '', taskId) {
1545
1557
  }
1546
1558
  }
1547
1559
  }
1548
- exports.loadLocaleData = loadLocaleData;
1549
1560
  function loadLocale(lang, path, taskId) {
1550
1561
  return __awaiter(this, void 0, void 0, function* () {
1551
1562
  if (!taskId) {
@@ -1571,7 +1582,6 @@ function loadLocale(lang, path, taskId) {
1571
1582
  }
1572
1583
  });
1573
1584
  }
1574
- exports.loadLocale = loadLocale;
1575
1585
  function clearLocale(taskId) {
1576
1586
  if (!taskId) {
1577
1587
  return;
@@ -1582,12 +1592,10 @@ function clearLocale(taskId) {
1582
1592
  }
1583
1593
  task.locale.data = {};
1584
1594
  }
1585
- exports.clearLocale = clearLocale;
1586
1595
  function setLocale(lang, path, taskId) {
1587
1596
  clearLocale(taskId);
1588
1597
  return loadLocale(lang, path, taskId);
1589
1598
  }
1590
- exports.setLocale = setLocale;
1591
1599
  function setLocaleLang(lang, taskId) {
1592
1600
  if (!taskId) {
1593
1601
  return;
@@ -1598,7 +1606,6 @@ function setLocaleLang(lang, taskId) {
1598
1606
  }
1599
1607
  task.locale.lang = lang;
1600
1608
  }
1601
- exports.setLocaleLang = setLocaleLang;
1602
1609
  function clearLocaleLang(taskId) {
1603
1610
  if (!taskId) {
1604
1611
  return;
@@ -1609,7 +1616,6 @@ function clearLocaleLang(taskId) {
1609
1616
  }
1610
1617
  task.locale.lang = '';
1611
1618
  }
1612
- exports.clearLocaleLang = clearLocaleLang;
1613
1619
  function createTimer(fun, delay, opt = {}) {
1614
1620
  var _a;
1615
1621
  const taskId = opt.taskId;
@@ -1667,7 +1673,6 @@ function createTimer(fun, delay, opt = {}) {
1667
1673
  task.timers[timer] = formId !== null && formId !== void 0 ? formId : 0;
1668
1674
  return timer;
1669
1675
  }
1670
- exports.createTimer = createTimer;
1671
1676
  function removeTimer(timer, taskId) {
1672
1677
  if (!taskId) {
1673
1678
  return;
@@ -1682,14 +1687,12 @@ function removeTimer(timer, taskId) {
1682
1687
  clearTimeout(timer);
1683
1688
  delete exports.list[taskId].timers[timer];
1684
1689
  }
1685
- exports.removeTimer = removeTimer;
1686
1690
  function sleep(fun, delay, taskId) {
1687
1691
  return createTimer(fun, delay, {
1688
1692
  'taskId': taskId,
1689
1693
  'count': 1
1690
1694
  });
1691
1695
  }
1692
- exports.sleep = sleep;
1693
1696
  exports.systemTaskInfo = clickgo.vue.reactive({
1694
1697
  'taskId': 0,
1695
1698
  'formId': 0,
@@ -1765,7 +1768,6 @@ function setSystem(formId, taskId) {
1765
1768
  refreshSystemPosition();
1766
1769
  return true;
1767
1770
  }
1768
- exports.setSystem = setSystem;
1769
1771
  function clearSystem(taskId) {
1770
1772
  if (!taskId) {
1771
1773
  return false;
@@ -1796,7 +1798,6 @@ function clearSystem(taskId) {
1796
1798
  }
1797
1799
  return true;
1798
1800
  }
1799
- exports.clearSystem = clearSystem;
1800
1801
  function refreshSystemPosition() {
1801
1802
  if (exports.systemTaskInfo.taskId > 0) {
1802
1803
  const form = exports.list[exports.systemTaskInfo.taskId].forms[exports.systemTaskInfo.formId];
@@ -1848,4 +1849,3 @@ function refreshSystemPosition() {
1848
1849
  core.trigger('screenResize');
1849
1850
  }
1850
1851
  }
1851
- exports.refreshSystemPosition = refreshSystemPosition;
package/dist/lib/theme.js CHANGED
@@ -32,7 +32,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
32
  });
33
33
  };
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.clearGlobal = exports.setGlobal = exports.clear = exports.remove = exports.load = exports.read = exports.global = void 0;
35
+ exports.global = void 0;
36
+ exports.read = read;
37
+ exports.load = load;
38
+ exports.remove = remove;
39
+ exports.clear = clear;
40
+ exports.setGlobal = setGlobal;
41
+ exports.clearGlobal = clearGlobal;
36
42
  const zip = __importStar(require("./zip"));
37
43
  const tool = __importStar(require("./tool"));
38
44
  const task = __importStar(require("./task"));
@@ -79,7 +85,6 @@ function read(blob) {
79
85
  };
80
86
  });
81
87
  }
82
- exports.read = read;
83
88
  function load(theme, taskId) {
84
89
  return __awaiter(this, void 0, void 0, function* () {
85
90
  if (!taskId) {
@@ -117,7 +122,6 @@ function load(theme, taskId) {
117
122
  return true;
118
123
  });
119
124
  }
120
- exports.load = load;
121
125
  function remove(name, taskId) {
122
126
  return __awaiter(this, void 0, void 0, function* () {
123
127
  if (!taskId) {
@@ -139,7 +143,6 @@ function remove(name, taskId) {
139
143
  }
140
144
  });
141
145
  }
142
- exports.remove = remove;
143
146
  function clear(taskId) {
144
147
  return __awaiter(this, void 0, void 0, function* () {
145
148
  if (!taskId) {
@@ -159,7 +162,6 @@ function clear(taskId) {
159
162
  }
160
163
  });
161
164
  }
162
- exports.clear = clear;
163
165
  function setGlobal(theme) {
164
166
  return __awaiter(this, void 0, void 0, function* () {
165
167
  exports.global = theme;
@@ -168,7 +170,6 @@ function setGlobal(theme) {
168
170
  }
169
171
  });
170
172
  }
171
- exports.setGlobal = setGlobal;
172
173
  function clearGlobal() {
173
174
  if (!exports.global) {
174
175
  return;
@@ -182,4 +183,3 @@ function clearGlobal() {
182
183
  dom.removeStyle(t.id, 'theme');
183
184
  }
184
185
  }
185
- exports.clearGlobal = clearGlobal;
package/dist/lib/tool.js CHANGED
@@ -9,7 +9,48 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.queryParse = exports.queryStringify = exports.formatTime = exports.formatSecond = exports.compar = exports.execCommand = exports.blob2DataUrl = exports.blob2Text = exports.urlAtom = exports.urlResolve = exports.parseUrl = exports.postResponseJson = exports.getResponseJson = exports.post = exports.get = exports.fetch = exports.request = exports.rgb2hsl = exports.escapeHTML = exports.getArray = exports.getNumber = exports.getBoolean = exports.random = exports.RANDOM_LUNS = exports.RANDOM_V = exports.RANDOM_LUN = exports.RANDOM_LU = exports.RANDOM_LN = exports.RANDOM_UN = exports.RANDOM_L = exports.RANDOM_U = exports.RANDOM_N = exports.rand = exports.getMimeByPath = exports.stylePrepend = exports.teleportGlue = exports.eventsAttrWrap = exports.layoutClassPrepend = exports.layoutInsertAttr = exports.layoutAddTagClassAndReTagName = exports.styleUrl2DataUrl = exports.match = exports.purify = exports.sleepFrame = exports.nextFrame = exports.sleep = exports.clone = exports.sizeFormat = exports.blob2ArrayBuffer = exports.getClassPrototype = void 0;
12
+ exports.RANDOM_LUNS = exports.RANDOM_V = exports.RANDOM_LUN = exports.RANDOM_LU = exports.RANDOM_LN = exports.RANDOM_UN = exports.RANDOM_L = exports.RANDOM_U = exports.RANDOM_N = void 0;
13
+ exports.getClassPrototype = getClassPrototype;
14
+ exports.blob2ArrayBuffer = blob2ArrayBuffer;
15
+ exports.sizeFormat = sizeFormat;
16
+ exports.clone = clone;
17
+ exports.sleep = sleep;
18
+ exports.nextFrame = nextFrame;
19
+ exports.sleepFrame = sleepFrame;
20
+ exports.purify = purify;
21
+ exports.match = match;
22
+ exports.styleUrl2DataUrl = styleUrl2DataUrl;
23
+ exports.layoutAddTagClassAndReTagName = layoutAddTagClassAndReTagName;
24
+ exports.layoutInsertAttr = layoutInsertAttr;
25
+ exports.layoutClassPrepend = layoutClassPrepend;
26
+ exports.eventsAttrWrap = eventsAttrWrap;
27
+ exports.teleportGlue = teleportGlue;
28
+ exports.stylePrepend = stylePrepend;
29
+ exports.getMimeByPath = getMimeByPath;
30
+ exports.rand = rand;
31
+ exports.random = random;
32
+ exports.getBoolean = getBoolean;
33
+ exports.getNumber = getNumber;
34
+ exports.getArray = getArray;
35
+ exports.escapeHTML = escapeHTML;
36
+ exports.rgb2hsl = rgb2hsl;
37
+ exports.request = request;
38
+ exports.fetch = fetch;
39
+ exports.get = get;
40
+ exports.post = post;
41
+ exports.getResponseJson = getResponseJson;
42
+ exports.postResponseJson = postResponseJson;
43
+ exports.parseUrl = parseUrl;
44
+ exports.urlResolve = urlResolve;
45
+ exports.urlAtom = urlAtom;
46
+ exports.blob2Text = blob2Text;
47
+ exports.blob2DataUrl = blob2DataUrl;
48
+ exports.execCommand = execCommand;
49
+ exports.compar = compar;
50
+ exports.formatSecond = formatSecond;
51
+ exports.formatTime = formatTime;
52
+ exports.queryStringify = queryStringify;
53
+ exports.queryParse = queryParse;
13
54
  function getClassPrototype(obj, over = [], level = 0) {
14
55
  var _a;
15
56
  if (level === 0) {
@@ -55,7 +96,6 @@ function getClassPrototype(obj, over = [], level = 0) {
55
96
  Object.assign(rtn.access, rtn2.access);
56
97
  return rtn;
57
98
  }
58
- exports.getClassPrototype = getClassPrototype;
59
99
  function blob2ArrayBuffer(blob) {
60
100
  return new Promise(function (resove) {
61
101
  const fr = new FileReader();
@@ -65,7 +105,6 @@ function blob2ArrayBuffer(blob) {
65
105
  fr.readAsArrayBuffer(blob);
66
106
  });
67
107
  }
68
- exports.blob2ArrayBuffer = blob2ArrayBuffer;
69
108
  function sizeFormat(size, spliter = ' ') {
70
109
  const units = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB'];
71
110
  let i = 0;
@@ -74,7 +113,6 @@ function sizeFormat(size, spliter = ' ') {
74
113
  }
75
114
  return (Math.round(size * 100) / 100).toString() + spliter + units[i];
76
115
  }
77
- exports.sizeFormat = sizeFormat;
78
116
  function clone(obj) {
79
117
  let newObj = {};
80
118
  if (obj instanceof Array) {
@@ -126,7 +164,6 @@ function clone(obj) {
126
164
  }
127
165
  return newObj;
128
166
  }
129
- exports.clone = clone;
130
167
  function sleep(ms = 0) {
131
168
  return new Promise(function (resolve) {
132
169
  if (ms > 1000 * 3) {
@@ -138,7 +175,6 @@ function sleep(ms = 0) {
138
175
  }, ms);
139
176
  });
140
177
  }
141
- exports.sleep = sleep;
142
178
  function nextFrame() {
143
179
  return new Promise(function (resolve) {
144
180
  requestAnimationFrame(() => {
@@ -146,7 +182,6 @@ function nextFrame() {
146
182
  });
147
183
  });
148
184
  }
149
- exports.nextFrame = nextFrame;
150
185
  function sleepFrame(count) {
151
186
  return __awaiter(this, void 0, void 0, function* () {
152
187
  if (count > 10) {
@@ -157,7 +192,6 @@ function sleepFrame(count) {
157
192
  }
158
193
  });
159
194
  }
160
- exports.sleepFrame = sleepFrame;
161
195
  function purify(text) {
162
196
  text = '>' + text + '<';
163
197
  const scripts = [];
@@ -173,7 +207,6 @@ function purify(text) {
173
207
  });
174
208
  return text.slice(1, -1);
175
209
  }
176
- exports.purify = purify;
177
210
  function match(str, regs) {
178
211
  for (const reg of regs) {
179
212
  if (reg.test(str)) {
@@ -182,7 +215,6 @@ function match(str, regs) {
182
215
  }
183
216
  return false;
184
217
  }
185
- exports.match = match;
186
218
  function styleUrl2DataUrl(path, style, files) {
187
219
  return __awaiter(this, void 0, void 0, function* () {
188
220
  const reg = /url\(["']{0,1}(.+?)["']{0,1}\)/ig;
@@ -202,7 +234,6 @@ function styleUrl2DataUrl(path, style, files) {
202
234
  return style;
203
235
  });
204
236
  }
205
- exports.styleUrl2DataUrl = styleUrl2DataUrl;
206
237
  function layoutAddTagClassAndReTagName(layout, retagname) {
207
238
  const list = [];
208
239
  layout = layout.replace(/(\S+)=(".+?"|'.+?')/g, function (t, t1) {
@@ -244,7 +275,6 @@ function layoutAddTagClassAndReTagName(layout, retagname) {
244
275
  return list[++i];
245
276
  });
246
277
  }
247
- exports.layoutAddTagClassAndReTagName = layoutAddTagClassAndReTagName;
248
278
  function layoutInsertAttr(layout, insert, opt = {}) {
249
279
  return layout.replace(/<([\w-]+)[\s\S]*?>/g, function (t, t1) {
250
280
  if (opt.ignore) {
@@ -271,7 +301,6 @@ function layoutInsertAttr(layout, insert, opt = {}) {
271
301
  });
272
302
  });
273
303
  }
274
- exports.layoutInsertAttr = layoutInsertAttr;
275
304
  function layoutClassPrependObject(object) {
276
305
  object = object.slice(1, -1).trim();
277
306
  return '{' + object.replace(/([ a-zA-Z0-9'"`[\]\-_]+)(\s*:)/g, function (t, t1, t2) {
@@ -325,7 +354,6 @@ function layoutClassPrepend(layout, preps) {
325
354
  });
326
355
  }).replace(/ id=(["'])/gi, ' id=$1' + preps[0]);
327
356
  }
328
- exports.layoutClassPrepend = layoutClassPrepend;
329
357
  function eventsAttrWrap(layout) {
330
358
  const events = ['click', 'dblclick', 'mousedown', 'mouseenter', 'mouseleave', 'mouseup', 'touchstart', 'touchmove', 'touchend', 'keydown', 'keypress', 'keyup', 'contextmenu'];
331
359
  const reg = new RegExp(`@(${events.join('|')})="(.+?)"`, 'g');
@@ -336,7 +364,6 @@ function eventsAttrWrap(layout) {
336
364
  return `@${t1}=";if(allowEvent($event)){${t2}}"`;
337
365
  });
338
366
  }
339
- exports.eventsAttrWrap = eventsAttrWrap;
340
367
  function teleportGlue(layout, formId) {
341
368
  if (typeof formId !== 'string') {
342
369
  formId = formId.toString();
@@ -349,7 +376,6 @@ function teleportGlue(layout, formId) {
349
376
  return '<teleport' + v1 + 'to="#cg-pop-list > [data-form-id=\'' + fid + '\']"' + v3 + ' data-cg-pop data-cg-pop-none';
350
377
  });
351
378
  }
352
- exports.teleportGlue = teleportGlue;
353
379
  function stylePrepend(style, prep = '') {
354
380
  if (prep === '') {
355
381
  prep = 'cg-scope' + Math.round(Math.random() * 1000000000000000).toString() + '_';
@@ -402,7 +428,6 @@ function stylePrepend(style, prep = '') {
402
428
  'style': style
403
429
  };
404
430
  }
405
- exports.stylePrepend = stylePrepend;
406
431
  function getMimeByPath(path) {
407
432
  var _a;
408
433
  const lio = path.lastIndexOf('.');
@@ -423,14 +448,12 @@ function getMimeByPath(path) {
423
448
  'ext': ext
424
449
  };
425
450
  }
426
- exports.getMimeByPath = getMimeByPath;
427
451
  function rand(min, max) {
428
452
  if (min > max) {
429
453
  [min, max] = [max, min];
430
454
  }
431
455
  return min + Math.round(Math.random() * (max - min));
432
456
  }
433
- exports.rand = rand;
434
457
  exports.RANDOM_N = '0123456789';
435
458
  exports.RANDOM_U = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
436
459
  exports.RANDOM_L = 'abcdefghijklmnopqrstuvwxyz';
@@ -457,7 +480,6 @@ function random(length = 8, source = exports.RANDOM_LN, block = '') {
457
480
  }
458
481
  return temp;
459
482
  }
460
- exports.random = random;
461
483
  function getBoolean(param) {
462
484
  const t = typeof param;
463
485
  if (t === 'boolean') {
@@ -468,14 +490,12 @@ function getBoolean(param) {
468
490
  }
469
491
  return param ? true : false;
470
492
  }
471
- exports.getBoolean = getBoolean;
472
493
  function getNumber(param) {
473
494
  if (typeof param === 'number') {
474
495
  return param;
475
496
  }
476
497
  return parseFloat(param);
477
498
  }
478
- exports.getNumber = getNumber;
479
499
  function getArray(param) {
480
500
  if (typeof param !== 'string') {
481
501
  return param;
@@ -496,11 +516,9 @@ function getArray(param) {
496
516
  }
497
517
  return rtn;
498
518
  }
499
- exports.getArray = getArray;
500
519
  function escapeHTML(html) {
501
520
  return html.replace(/</g, '&lt;').replace(/>/g, '&gt;');
502
521
  }
503
- exports.escapeHTML = escapeHTML;
504
522
  function rgb2hsl(rgb) {
505
523
  if (rgb.includes('(')) {
506
524
  const match = /[0-9., ]+/.exec(rgb);
@@ -534,7 +552,6 @@ function rgb2hsl(rgb) {
534
552
  }
535
553
  return [h, s, l];
536
554
  }
537
- exports.rgb2hsl = rgb2hsl;
538
555
  function request(url, opt) {
539
556
  return new Promise(function (resove) {
540
557
  var _a;
@@ -640,58 +657,46 @@ function request(url, opt) {
640
657
  xhr.send(opt.body);
641
658
  });
642
659
  }
643
- exports.request = request;
644
660
  function fetch(url, init) {
645
661
  return loader.fetch(url, init);
646
662
  }
647
- exports.fetch = fetch;
648
663
  function get(url, opt) {
649
664
  return loader.get(url, opt);
650
665
  }
651
- exports.get = get;
652
666
  function post(url, data, opt) {
653
667
  return loader.post(url, data, opt);
654
668
  }
655
- exports.post = post;
656
669
  function getResponseJson(url, opt) {
657
670
  return __awaiter(this, void 0, void 0, function* () {
658
671
  return loader.getResponseJson(url, opt);
659
672
  });
660
673
  }
661
- exports.getResponseJson = getResponseJson;
662
674
  function postResponseJson(url, data, opt) {
663
675
  return __awaiter(this, void 0, void 0, function* () {
664
676
  return loader.postResponseJson(url, data, opt);
665
677
  });
666
678
  }
667
- exports.postResponseJson = postResponseJson;
668
679
  function parseUrl(url) {
669
680
  return loader.parseUrl(url);
670
681
  }
671
- exports.parseUrl = parseUrl;
672
682
  function urlResolve(from, to) {
673
683
  return loader.urlResolve(from, to);
674
684
  }
675
- exports.urlResolve = urlResolve;
676
685
  function urlAtom(url) {
677
686
  return loader.urlAtom(url);
678
687
  }
679
- exports.urlAtom = urlAtom;
680
688
  function blob2Text(blob) {
681
689
  return loader.blob2Text(blob);
682
690
  }
683
- exports.blob2Text = blob2Text;
684
691
  function blob2DataUrl(blob) {
685
692
  return loader.blob2DataUrl(blob);
686
693
  }
687
- exports.blob2DataUrl = blob2DataUrl;
688
694
  function execCommand(ac) {
689
695
  if (!['copy', 'cut'].includes(ac)) {
690
696
  return;
691
697
  }
692
698
  document.execCommand(ac);
693
699
  }
694
- exports.execCommand = execCommand;
695
700
  function compar(before, after) {
696
701
  const rtn = {
697
702
  'remove': {},
@@ -719,7 +724,6 @@ function compar(before, after) {
719
724
  }
720
725
  return rtn;
721
726
  }
722
- exports.compar = compar;
723
727
  function formatSecond(second) {
724
728
  const h = Math.floor(second / 3600);
725
729
  second = second - h * 3600;
@@ -727,7 +731,6 @@ function formatSecond(second) {
727
731
  const s = Math.floor(second - m * 60);
728
732
  return (h ? h.toString().padStart(2, '0') + ':' : '') + m.toString().padStart(2, '0') + ':' + s.toString().padStart(2, '0');
729
733
  }
730
- exports.formatSecond = formatSecond;
731
734
  function formatTime(ts, tz) {
732
735
  const rtn = {
733
736
  'date': '',
@@ -744,7 +747,6 @@ function formatTime(ts, tz) {
744
747
  rtn.zone = 'UTC' + (ntz >= 0 ? '+' : '') + ntz.toString();
745
748
  return rtn;
746
749
  }
747
- exports.formatTime = formatTime;
748
750
  function queryStringify(query) {
749
751
  return Object.entries(query).map(([k, v]) => {
750
752
  if (Array.isArray(v)) {
@@ -753,7 +755,6 @@ function queryStringify(query) {
753
755
  return `${encodeURIComponent(k)}=${encodeURIComponent(`${v}`)}`;
754
756
  }).join('&');
755
757
  }
756
- exports.queryStringify = queryStringify;
757
758
  function queryParse(query) {
758
759
  const ret = {};
759
760
  const arrayKeys = {};
@@ -777,4 +778,3 @@ function queryParse(query) {
777
778
  }
778
779
  return ret;
779
780
  }
780
- exports.queryParse = queryParse;
package/dist/lib/zip.js CHANGED
@@ -35,7 +35,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
35
35
  return (mod && mod.__esModule) ? mod : { "default": mod };
36
36
  };
37
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
- exports.get = exports.Zip = void 0;
38
+ exports.Zip = void 0;
39
+ exports.get = get;
39
40
  const jszip_1 = __importDefault(require("jszip"));
40
41
  const tool = __importStar(require("./tool"));
41
42
  class Zip {
@@ -384,4 +385,3 @@ function get(data) {
384
385
  }
385
386
  });
386
387
  }
387
- exports.get = get;
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clickgo",
3
- "version": "3.15.9",
3
+ "version": "3.15.11",
4
4
  "description": "Background interface, software interface, mobile phone APP interface operation library.",
5
5
  "keywords": [
6
6
  "deskrt",