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
package/dist/lib/dom.js CHANGED
@@ -32,7 +32,55 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
32
  });
33
33
  };
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.createElement = exports.exitFullscreen = exports.fullscreen = exports.siblingsData = exports.siblings = exports.index = exports.findParentByTag = exports.findParentByClass = exports.findParentByData = exports.bindResize = exports.bindMove = exports.is = exports.bindDrag = exports.setDragData = exports.bindLong = exports.allowEvent = exports.bindGesture = exports.bindDown = exports.bindDblClick = exports.bindClick = exports.getWatchInfo = exports.clearWatchProperty = exports.isWatchProperty = exports.watchProperty = exports.clearWatchStyle = exports.isWatchStyle = exports.watchStyle = exports.clearWatch = exports.isWatch = exports.unwatch = exports.watch = exports.getWatchCount = exports.clearWatchSize = exports.isWatchSize = exports.unwatchSize = exports.watchSize = exports.getWatchSizeCount = exports.clearWatchPosition = exports.isWatchPosition = exports.unwatchPosition = exports.watchPosition = exports.getStyleCount = exports.removeStyle = exports.pushStyle = exports.removeFromStyleList = exports.createToStyleList = exports.hasTouchButMouse = exports.setGlobalCursor = exports.inPage = void 0;
35
+ exports.is = void 0;
36
+ exports.inPage = inPage;
37
+ exports.setGlobalCursor = setGlobalCursor;
38
+ exports.hasTouchButMouse = hasTouchButMouse;
39
+ exports.createToStyleList = createToStyleList;
40
+ exports.removeFromStyleList = removeFromStyleList;
41
+ exports.pushStyle = pushStyle;
42
+ exports.removeStyle = removeStyle;
43
+ exports.getStyleCount = getStyleCount;
44
+ exports.watchPosition = watchPosition;
45
+ exports.unwatchPosition = unwatchPosition;
46
+ exports.isWatchPosition = isWatchPosition;
47
+ exports.clearWatchPosition = clearWatchPosition;
48
+ exports.getWatchSizeCount = getWatchSizeCount;
49
+ exports.watchSize = watchSize;
50
+ exports.unwatchSize = unwatchSize;
51
+ exports.isWatchSize = isWatchSize;
52
+ exports.clearWatchSize = clearWatchSize;
53
+ exports.getWatchCount = getWatchCount;
54
+ exports.watch = watch;
55
+ exports.unwatch = unwatch;
56
+ exports.isWatch = isWatch;
57
+ exports.clearWatch = clearWatch;
58
+ exports.watchStyle = watchStyle;
59
+ exports.isWatchStyle = isWatchStyle;
60
+ exports.clearWatchStyle = clearWatchStyle;
61
+ exports.watchProperty = watchProperty;
62
+ exports.isWatchProperty = isWatchProperty;
63
+ exports.clearWatchProperty = clearWatchProperty;
64
+ exports.getWatchInfo = getWatchInfo;
65
+ exports.bindClick = bindClick;
66
+ exports.bindDblClick = bindDblClick;
67
+ exports.bindDown = bindDown;
68
+ exports.bindGesture = bindGesture;
69
+ exports.allowEvent = allowEvent;
70
+ exports.bindLong = bindLong;
71
+ exports.setDragData = setDragData;
72
+ exports.bindDrag = bindDrag;
73
+ exports.bindMove = bindMove;
74
+ exports.bindResize = bindResize;
75
+ exports.findParentByData = findParentByData;
76
+ exports.findParentByClass = findParentByClass;
77
+ exports.findParentByTag = findParentByTag;
78
+ exports.index = index;
79
+ exports.siblings = siblings;
80
+ exports.siblingsData = siblingsData;
81
+ exports.fullscreen = fullscreen;
82
+ exports.exitFullscreen = exitFullscreen;
83
+ exports.createElement = createElement;
36
84
  const clickgo = __importStar(require("../clickgo"));
37
85
  const form = __importStar(require("./form"));
38
86
  const core = __importStar(require("./core"));
@@ -63,7 +111,6 @@ ${classUnfold()}, ${classUnfold('input')}, ${classUnfold('textarea')} {font-fami
63
111
  function inPage(el) {
64
112
  return document.body.contains(el);
65
113
  }
66
- exports.inPage = inPage;
67
114
  let globalCursorStyle;
68
115
  function setGlobalCursor(type) {
69
116
  if (!globalCursorStyle) {
@@ -76,7 +123,6 @@ function setGlobalCursor(type) {
76
123
  globalCursorStyle.innerHTML = '';
77
124
  }
78
125
  }
79
- exports.setGlobalCursor = setGlobalCursor;
80
126
  let lastTouchTime = 0;
81
127
  document.addEventListener('touchstart', function () {
82
128
  lastTouchTime = Date.now();
@@ -97,16 +143,13 @@ function hasTouchButMouse(e) {
97
143
  }
98
144
  return false;
99
145
  }
100
- exports.hasTouchButMouse = hasTouchButMouse;
101
146
  function createToStyleList(taskId) {
102
147
  styleList.insertAdjacentHTML('beforeend', `<div id="cg-style-task${taskId}"><div class="cg-style-control"></div><div class="cg-style-theme"></div><style class="cg-style-global"></style><div class="cg-style-form"></div></div>`);
103
148
  }
104
- exports.createToStyleList = createToStyleList;
105
149
  function removeFromStyleList(taskId) {
106
150
  var _a;
107
151
  (_a = document.getElementById('cg-style-task' + taskId.toString())) === null || _a === void 0 ? void 0 : _a.remove();
108
152
  }
109
- exports.removeFromStyleList = removeFromStyleList;
110
153
  function pushStyle(taskId, style, type = 'global', formId = 0, panelId) {
111
154
  const el = document.querySelector(`#cg-style-task${taskId} > .cg-style-${type}`);
112
155
  if (!el) {
@@ -122,7 +165,6 @@ function pushStyle(taskId, style, type = 'global', formId = 0, panelId) {
122
165
  el.insertAdjacentHTML('beforeend', `<style class="cg-style-form${formId}" data-panel="${panelId ? panelId.toString() : ''}">${style}</style>`);
123
166
  }
124
167
  }
125
- exports.pushStyle = pushStyle;
126
168
  function removeStyle(taskId, type = 'global', formId = 0, panelId) {
127
169
  const styleTask = document.getElementById('cg-style-task' + taskId.toString());
128
170
  if (!styleTask) {
@@ -157,11 +199,9 @@ function removeStyle(taskId, type = 'global', formId = 0, panelId) {
157
199
  }
158
200
  }
159
201
  }
160
- exports.removeStyle = removeStyle;
161
202
  function getStyleCount(taskId, type) {
162
203
  return document.querySelectorAll(`#cg-style-task${taskId} > .cg-style-${type} > style`).length;
163
204
  }
164
- exports.getStyleCount = getStyleCount;
165
205
  const watchPositionObjects = {};
166
206
  let watchPositionIndex = 0;
167
207
  function watchPosition(el, cb, immediate = false) {
@@ -206,7 +246,6 @@ function watchPosition(el, cb, immediate = false) {
206
246
  ++watchPositionIndex;
207
247
  return true;
208
248
  }
209
- exports.watchPosition = watchPosition;
210
249
  function unwatchPosition(el) {
211
250
  const index = el.dataset.cgPoindex;
212
251
  if (index === undefined) {
@@ -230,11 +269,9 @@ function unwatchPosition(el) {
230
269
  }
231
270
  delete watchPositionObjects[formId];
232
271
  }
233
- exports.unwatchPosition = unwatchPosition;
234
272
  function isWatchPosition(el) {
235
273
  return el.dataset.cgPoindex ? true : false;
236
274
  }
237
- exports.isWatchPosition = isWatchPosition;
238
275
  function clearWatchPosition(formId, panelId) {
239
276
  if (!watchPositionObjects[formId]) {
240
277
  return;
@@ -256,7 +293,6 @@ function clearWatchPosition(formId, panelId) {
256
293
  }
257
294
  delete watchPositionObjects[formId];
258
295
  }
259
- exports.clearWatchPosition = clearWatchPosition;
260
296
  const watchSizeList = {};
261
297
  function getWatchSizeCount(taskId) {
262
298
  if (!taskId) {
@@ -271,7 +307,6 @@ function getWatchSizeCount(taskId) {
271
307
  }
272
308
  return count;
273
309
  }
274
- exports.getWatchSizeCount = getWatchSizeCount;
275
310
  let watchSizeIndex = 0;
276
311
  const resizeObserver = new ResizeObserver(function (entries) {
277
312
  for (const entrie of entries) {
@@ -324,7 +359,6 @@ function watchSize(el, cb, immediate = false, taskId) {
324
359
  ++watchSizeIndex;
325
360
  return true;
326
361
  }
327
- exports.watchSize = watchSize;
328
362
  function unwatchSize(el, taskId) {
329
363
  const index = el.dataset.cgRoindex;
330
364
  if (index === undefined) {
@@ -338,11 +372,9 @@ function unwatchSize(el, taskId) {
338
372
  el.removeAttribute('data-cg-roindex');
339
373
  delete watchSizeList[index];
340
374
  }
341
- exports.unwatchSize = unwatchSize;
342
375
  function isWatchSize(el) {
343
376
  return el.dataset.cgRoindex ? true : false;
344
377
  }
345
- exports.isWatchSize = isWatchSize;
346
378
  function clearWatchSize(taskId) {
347
379
  for (const index in watchSizeList) {
348
380
  const item = watchSizeList[index];
@@ -354,7 +386,6 @@ function clearWatchSize(taskId) {
354
386
  delete watchSizeList[index];
355
387
  }
356
388
  }
357
- exports.clearWatchSize = clearWatchSize;
358
389
  const watchList = {};
359
390
  function getWatchCount(taskId) {
360
391
  if (!taskId) {
@@ -369,7 +400,6 @@ function getWatchCount(taskId) {
369
400
  }
370
401
  return count;
371
402
  }
372
- exports.getWatchCount = getWatchCount;
373
403
  let watchIndex = 0;
374
404
  function watch(el, cb, mode = 'default', immediate = false, taskId) {
375
405
  if (isWatch(el)) {
@@ -461,7 +491,6 @@ function watch(el, cb, mode = 'default', immediate = false, taskId) {
461
491
  ++watchIndex;
462
492
  return true;
463
493
  }
464
- exports.watch = watch;
465
494
  function unwatch(el, taskId) {
466
495
  const index = el.dataset.cgMoindex;
467
496
  if (index === undefined) {
@@ -475,11 +504,9 @@ function unwatch(el, taskId) {
475
504
  watchList[index].mo.disconnect();
476
505
  delete watchList[index];
477
506
  }
478
- exports.unwatch = unwatch;
479
507
  function isWatch(el) {
480
508
  return el.dataset.cgMoindex ? true : false;
481
509
  }
482
- exports.isWatch = isWatch;
483
510
  function clearWatch(taskId) {
484
511
  for (const index in watchList) {
485
512
  const item = watchList[index];
@@ -491,7 +518,6 @@ function clearWatch(taskId) {
491
518
  delete watchList[index];
492
519
  }
493
520
  }
494
- exports.clearWatch = clearWatch;
495
521
  const watchCgTimerHandler = function () {
496
522
  for (const index in watchSizeList) {
497
523
  const item = watchSizeList[index];
@@ -567,11 +593,9 @@ function watchStyle(el, name, cb, immediate = false) {
567
593
  el.dataset.cgStyleindex = watchStyleIndex.toString();
568
594
  ++watchStyleIndex;
569
595
  }
570
- exports.watchStyle = watchStyle;
571
596
  function isWatchStyle(el) {
572
597
  return el.dataset.cgStyleindex ? true : false;
573
598
  }
574
- exports.isWatchStyle = isWatchStyle;
575
599
  function clearWatchStyle(formId, panelId) {
576
600
  if (!watchStyleList[formId]) {
577
601
  return;
@@ -593,7 +617,6 @@ function clearWatchStyle(formId, panelId) {
593
617
  }
594
618
  delete watchStyleList[formId];
595
619
  }
596
- exports.clearWatchStyle = clearWatchStyle;
597
620
  const watchPropertyObjects = {};
598
621
  let watchPropertyIndex = 0;
599
622
  function watchProperty(el, name, cb, immediate = false) {
@@ -649,11 +672,9 @@ function watchProperty(el, name, cb, immediate = false) {
649
672
  el.dataset.cgPropertyindex = watchPropertyIndex.toString();
650
673
  ++watchPropertyIndex;
651
674
  }
652
- exports.watchProperty = watchProperty;
653
675
  function isWatchProperty(el) {
654
676
  return el.dataset.cgPropertyindex ? true : false;
655
677
  }
656
- exports.isWatchProperty = isWatchProperty;
657
678
  function clearWatchProperty(formId, panelId) {
658
679
  if (!watchPropertyObjects[formId]) {
659
680
  return;
@@ -675,7 +696,6 @@ function clearWatchProperty(formId, panelId) {
675
696
  }
676
697
  delete watchPropertyObjects[formId];
677
698
  }
678
- exports.clearWatchProperty = clearWatchProperty;
679
699
  function getWatchInfo() {
680
700
  var _a, _b;
681
701
  const rtn = {
@@ -767,7 +787,6 @@ function getWatchInfo() {
767
787
  }
768
788
  return rtn;
769
789
  }
770
- exports.getWatchInfo = getWatchInfo;
771
790
  let watchTimer = 0;
772
791
  const watchTimerHandler = function () {
773
792
  if (form.getFocus) {
@@ -912,7 +931,6 @@ function bindClick(e, handler) {
912
931
  }
913
932
  });
914
933
  }
915
- exports.bindClick = bindClick;
916
934
  const lastDblClickData = {
917
935
  'time': 0,
918
936
  'x': 0,
@@ -937,7 +955,6 @@ function bindDblClick(e, handler) {
937
955
  lastDblClickData.y = y;
938
956
  });
939
957
  }
940
- exports.bindDblClick = bindDblClick;
941
958
  function bindDown(oe, opt) {
942
959
  var _a;
943
960
  if (hasTouchButMouse(oe)) {
@@ -1047,7 +1064,6 @@ function bindDown(oe, opt) {
1047
1064
  }
1048
1065
  (_a = opt.down) === null || _a === void 0 ? void 0 : _a.call(opt, oe);
1049
1066
  }
1050
- exports.bindDown = bindDown;
1051
1067
  const gestureWheel = {
1052
1068
  'last': 0,
1053
1069
  'offset': 0,
@@ -1339,7 +1355,6 @@ function bindGesture(oe, before, handler) {
1339
1355
  });
1340
1356
  }
1341
1357
  }
1342
- exports.bindGesture = bindGesture;
1343
1358
  let lastLongTime = 0;
1344
1359
  function allowEvent(e) {
1345
1360
  const now = Date.now();
@@ -1355,7 +1370,6 @@ function allowEvent(e) {
1355
1370
  }
1356
1371
  return true;
1357
1372
  }
1358
- exports.allowEvent = allowEvent;
1359
1373
  function bindLong(e, long) {
1360
1374
  if (hasTouchButMouse(e)) {
1361
1375
  return;
@@ -1396,12 +1410,10 @@ function bindLong(e, long) {
1396
1410
  }
1397
1411
  });
1398
1412
  }
1399
- exports.bindLong = bindLong;
1400
1413
  let bindDragData = undefined;
1401
1414
  function setDragData(data) {
1402
1415
  bindDragData = data;
1403
1416
  }
1404
- exports.setDragData = setDragData;
1405
1417
  function bindDrag(e, opt) {
1406
1418
  bindDragData = opt.data;
1407
1419
  let otop = 0;
@@ -1495,7 +1507,6 @@ function bindDrag(e, opt) {
1495
1507
  }
1496
1508
  });
1497
1509
  }
1498
- exports.bindDrag = bindDrag;
1499
1510
  exports.is = clickgo.vue.reactive({
1500
1511
  'move': false,
1501
1512
  'shift': false,
@@ -1819,7 +1830,6 @@ function bindMove(e, opt) {
1819
1830
  'bottom': bottom
1820
1831
  };
1821
1832
  }
1822
- exports.bindMove = bindMove;
1823
1833
  function bindResize(e, opt) {
1824
1834
  var _a, _b;
1825
1835
  if (hasTouchButMouse(e)) {
@@ -1910,7 +1920,6 @@ function bindResize(e, opt) {
1910
1920
  'end': opt.end
1911
1921
  });
1912
1922
  }
1913
- exports.bindResize = bindResize;
1914
1923
  function findParentByData(el, name, value) {
1915
1924
  let parent = el.parentNode;
1916
1925
  while (parent) {
@@ -1934,7 +1943,6 @@ function findParentByData(el, name, value) {
1934
1943
  }
1935
1944
  return null;
1936
1945
  }
1937
- exports.findParentByData = findParentByData;
1938
1946
  function findParentByClass(el, name) {
1939
1947
  let parent = el.parentNode;
1940
1948
  while (parent) {
@@ -1951,7 +1959,6 @@ function findParentByClass(el, name) {
1951
1959
  }
1952
1960
  return null;
1953
1961
  }
1954
- exports.findParentByClass = findParentByClass;
1955
1962
  function findParentByTag(el, name) {
1956
1963
  let parent = el.parentNode;
1957
1964
  while (parent) {
@@ -1969,7 +1976,6 @@ function findParentByTag(el, name) {
1969
1976
  }
1970
1977
  return null;
1971
1978
  }
1972
- exports.findParentByTag = findParentByTag;
1973
1979
  function index(el) {
1974
1980
  let index = 0;
1975
1981
  let p = el.previousElementSibling;
@@ -1982,7 +1988,6 @@ function index(el) {
1982
1988
  }
1983
1989
  return index;
1984
1990
  }
1985
- exports.index = index;
1986
1991
  function siblings(el) {
1987
1992
  if (!el.parentNode) {
1988
1993
  return [];
@@ -1997,7 +2002,6 @@ function siblings(el) {
1997
2002
  }
1998
2003
  return list;
1999
2004
  }
2000
- exports.siblings = siblings;
2001
2005
  function siblingsData(el, name) {
2002
2006
  const list = siblings(el);
2003
2007
  const olist = [];
@@ -2009,7 +2013,6 @@ function siblingsData(el, name) {
2009
2013
  }
2010
2014
  return olist;
2011
2015
  }
2012
- exports.siblingsData = siblingsData;
2013
2016
  function fullscreen() {
2014
2017
  return __awaiter(this, void 0, void 0, function* () {
2015
2018
  const he = document.getElementsByTagName('html')[0];
@@ -2026,7 +2029,6 @@ function fullscreen() {
2026
2029
  }
2027
2030
  });
2028
2031
  }
2029
- exports.fullscreen = fullscreen;
2030
2032
  function exitFullscreen() {
2031
2033
  return __awaiter(this, void 0, void 0, function* () {
2032
2034
  const d = document;
@@ -2043,11 +2045,9 @@ function exitFullscreen() {
2043
2045
  }
2044
2046
  });
2045
2047
  }
2046
- exports.exitFullscreen = exitFullscreen;
2047
2048
  function createElement(tagName) {
2048
2049
  return document.createElement(tagName);
2049
2050
  }
2050
- exports.createElement = createElement;
2051
2051
  document.addEventListener('visibilitychange', function () {
2052
2052
  if (document.hidden) {
2053
2053
  cancelAnimationFrame(watchTimer);
package/dist/lib/form.js CHANGED
@@ -1670,13 +1670,13 @@ function refreshPopPosition(el, pop, direction, size = {}) {
1670
1670
  let lastShowPopTime = 0;
1671
1671
  function showPop(el, pop, direction, opt = {}) {
1672
1672
  var _a;
1673
- if (!(el instanceof HTMLElement)) {
1673
+ if (!(el instanceof Element)) {
1674
1674
  if (!el.$el) {
1675
1675
  return;
1676
1676
  }
1677
1677
  el = el.$el;
1678
1678
  }
1679
- if (pop && !(pop instanceof HTMLElement)) {
1679
+ if (pop && !(pop instanceof Element)) {
1680
1680
  if (!pop.$el) {
1681
1681
  return;
1682
1682
  }
package/dist/lib/form.ts CHANGED
@@ -2213,13 +2213,13 @@ export function showPop(el: HTMLElement | types.IVue, pop: HTMLElement | types.I
2213
2213
  /** --- 展示托管方式 --- */
2214
2214
  'way'?: 'normal' | 'click' | 'hover';
2215
2215
  } = {}): void {
2216
- if (!(el instanceof HTMLElement)) {
2216
+ if (!(el instanceof Element)) {
2217
2217
  if (!el.$el) {
2218
2218
  return;
2219
2219
  }
2220
2220
  el = el.$el;
2221
2221
  }
2222
- if (pop && !(pop instanceof HTMLElement)) {
2222
+ if (pop && !(pop instanceof Element)) {
2223
2223
  if (!pop.$el) {
2224
2224
  return;
2225
2225
  }
package/dist/lib/fs.js CHANGED
@@ -32,7 +32,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
32
  });
33
33
  };
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.copyFile = exports.copyFolder = exports.readDir = exports.rename = exports.chmod = exports.rmdirDeep = exports.rmdir = exports.mkdir = exports.isFile = exports.isDir = exports.stats = exports.unlink = exports.symlink = exports.readLink = exports.putContent = exports.getContent = exports.unmount = exports.mount = void 0;
35
+ exports.mount = mount;
36
+ exports.unmount = unmount;
37
+ exports.getContent = getContent;
38
+ exports.putContent = putContent;
39
+ exports.readLink = readLink;
40
+ exports.symlink = symlink;
41
+ exports.unlink = unlink;
42
+ exports.stats = stats;
43
+ exports.isDir = isDir;
44
+ exports.isFile = isFile;
45
+ exports.mkdir = mkdir;
46
+ exports.rmdir = rmdir;
47
+ exports.rmdirDeep = rmdirDeep;
48
+ exports.chmod = chmod;
49
+ exports.rename = rename;
50
+ exports.readDir = readDir;
51
+ exports.copyFolder = copyFolder;
52
+ exports.copyFile = copyFile;
36
53
  const tool = __importStar(require("./tool"));
37
54
  const task = __importStar(require("./task"));
38
55
  const form = __importStar(require("./form"));
@@ -102,7 +119,6 @@ function mount(name, handler, taskId) {
102
119
  mounts[name] = handler;
103
120
  return true;
104
121
  }
105
- exports.mount = mount;
106
122
  function unmount(name) {
107
123
  return __awaiter(this, void 0, void 0, function* () {
108
124
  var _a, _b;
@@ -117,7 +133,6 @@ function unmount(name) {
117
133
  return true;
118
134
  });
119
135
  }
120
- exports.unmount = unmount;
121
136
  function getContent(path, options, taskId) {
122
137
  return __awaiter(this, void 0, void 0, function* () {
123
138
  var _a, _b, _c;
@@ -243,7 +258,6 @@ function getContent(path, options, taskId) {
243
258
  }
244
259
  });
245
260
  }
246
- exports.getContent = getContent;
247
261
  function putContent(path_1, data_1) {
248
262
  return __awaiter(this, arguments, void 0, function* (path, data, options = {}, taskId) {
249
263
  var _a, _b;
@@ -285,7 +299,6 @@ function putContent(path_1, data_1) {
285
299
  }
286
300
  });
287
301
  }
288
- exports.putContent = putContent;
289
302
  function readLink(path, encoding, taskId) {
290
303
  return __awaiter(this, void 0, void 0, function* () {
291
304
  var _a, _b;
@@ -323,7 +336,6 @@ function readLink(path, encoding, taskId) {
323
336
  }
324
337
  });
325
338
  }
326
- exports.readLink = readLink;
327
339
  function symlink(filePath, linkPath, type, taskId) {
328
340
  return __awaiter(this, void 0, void 0, function* () {
329
341
  var _a, _b;
@@ -368,7 +380,6 @@ function symlink(filePath, linkPath, type, taskId) {
368
380
  }
369
381
  });
370
382
  }
371
- exports.symlink = symlink;
372
383
  function unlink(path, taskId) {
373
384
  return __awaiter(this, void 0, void 0, function* () {
374
385
  var _a, _b;
@@ -406,7 +417,6 @@ function unlink(path, taskId) {
406
417
  }
407
418
  });
408
419
  }
409
- exports.unlink = unlink;
410
420
  function getClickGoStats(path) {
411
421
  return __awaiter(this, void 0, void 0, function* () {
412
422
  if (path.endsWith('/')) {
@@ -698,7 +708,6 @@ function stats(path, taskId) {
698
708
  }
699
709
  });
700
710
  }
701
- exports.stats = stats;
702
711
  function isDir(path, taskId) {
703
712
  return __awaiter(this, void 0, void 0, function* () {
704
713
  const pstats = yield stats(path, taskId);
@@ -708,7 +717,6 @@ function isDir(path, taskId) {
708
717
  return pstats;
709
718
  });
710
719
  }
711
- exports.isDir = isDir;
712
720
  function isFile(path, taskId) {
713
721
  return __awaiter(this, void 0, void 0, function* () {
714
722
  const pstats = yield stats(path, taskId);
@@ -718,7 +726,6 @@ function isFile(path, taskId) {
718
726
  return pstats;
719
727
  });
720
728
  }
721
- exports.isFile = isFile;
722
729
  function mkdir(path_1) {
723
730
  return __awaiter(this, arguments, void 0, function* (path, mode = 0o755, taskId) {
724
731
  var _a, _b;
@@ -759,7 +766,6 @@ function mkdir(path_1) {
759
766
  }
760
767
  });
761
768
  }
762
- exports.mkdir = mkdir;
763
769
  function rmdir(path, taskId) {
764
770
  return __awaiter(this, void 0, void 0, function* () {
765
771
  var _a, _b;
@@ -797,7 +803,6 @@ function rmdir(path, taskId) {
797
803
  }
798
804
  });
799
805
  }
800
- exports.rmdir = rmdir;
801
806
  function rmdirDeep(path, taskId) {
802
807
  return __awaiter(this, void 0, void 0, function* () {
803
808
  path = tool.urlResolve('/', path);
@@ -826,7 +831,6 @@ function rmdirDeep(path, taskId) {
826
831
  return rmdir(path, taskId);
827
832
  });
828
833
  }
829
- exports.rmdirDeep = rmdirDeep;
830
834
  function chmod(path, mod, taskId) {
831
835
  return __awaiter(this, void 0, void 0, function* () {
832
836
  var _a, _b;
@@ -864,7 +868,6 @@ function chmod(path, mod, taskId) {
864
868
  }
865
869
  });
866
870
  }
867
- exports.chmod = chmod;
868
871
  function rename(oldPath, newPath, taskId) {
869
872
  return __awaiter(this, void 0, void 0, function* () {
870
873
  var _a, _b;
@@ -915,7 +918,6 @@ function rename(oldPath, newPath, taskId) {
915
918
  }
916
919
  });
917
920
  }
918
- exports.rename = rename;
919
921
  function readDir(path, encoding, taskId) {
920
922
  return __awaiter(this, void 0, void 0, function* () {
921
923
  var _a, _b;
@@ -1140,7 +1142,6 @@ function readDir(path, encoding, taskId) {
1140
1142
  }
1141
1143
  });
1142
1144
  }
1143
- exports.readDir = readDir;
1144
1145
  function copyFolder(from_1, to_1) {
1145
1146
  return __awaiter(this, arguments, void 0, function* (from, to, ignore = [], taskId) {
1146
1147
  let num = 0;
@@ -1178,7 +1179,6 @@ function copyFolder(from_1, to_1) {
1178
1179
  return num;
1179
1180
  });
1180
1181
  }
1181
- exports.copyFolder = copyFolder;
1182
1182
  function copyFile(src, dest, taskId) {
1183
1183
  return __awaiter(this, void 0, void 0, function* () {
1184
1184
  var _a, _b;
@@ -1229,4 +1229,3 @@ function copyFile(src, dest, taskId) {
1229
1229
  }
1230
1230
  });
1231
1231
  }
1232
- exports.copyFile = copyFile;
@@ -32,13 +32,25 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
32
  });
33
33
  };
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.isMax = exports.ping = exports.maximizable = exports.size = exports.restore = exports.min = exports.max = exports.invoke = exports.getListenerList = exports.clear = exports.off = exports.once = exports.on = exports.getToken = void 0;
35
+ exports.getToken = getToken;
36
+ exports.on = on;
37
+ exports.once = once;
38
+ exports.off = off;
39
+ exports.clear = clear;
40
+ exports.getListenerList = getListenerList;
41
+ exports.invoke = invoke;
42
+ exports.max = max;
43
+ exports.min = min;
44
+ exports.restore = restore;
45
+ exports.size = size;
46
+ exports.maximizable = maximizable;
47
+ exports.ping = ping;
48
+ exports.isMax = isMax;
36
49
  const clickgo = __importStar(require("../clickgo"));
37
50
  const token = (Math.random() * 100000000000000 * (100 + Math.round(Math.random() * (999 - 100)))).toString(32);
38
51
  function getToken() {
39
52
  return token;
40
53
  }
41
- exports.getToken = getToken;
42
54
  const methods = {};
43
55
  window.clickgoNativeWeb = {
44
56
  invoke: function (name, ...param) {
@@ -70,11 +82,9 @@ function on(name, handler, once = false, formId, taskId) {
70
82
  'handler': handler
71
83
  };
72
84
  }
73
- exports.on = on;
74
85
  function once(name, handler, formId, taskId) {
75
86
  on(name, handler, true, formId, taskId);
76
87
  }
77
- exports.once = once;
78
88
  function off(name, formId, taskId) {
79
89
  if (!taskId) {
80
90
  return;
@@ -88,7 +98,6 @@ function off(name, formId, taskId) {
88
98
  }
89
99
  delete methods[taskId][key];
90
100
  }
91
- exports.off = off;
92
101
  function clear(formId, taskId) {
93
102
  if (!taskId) {
94
103
  return;
@@ -107,7 +116,6 @@ function clear(formId, taskId) {
107
116
  delete methods[taskId][key];
108
117
  }
109
118
  }
110
- exports.clear = clear;
111
119
  function getListenerList(taskId) {
112
120
  const rtn = {};
113
121
  for (const tid in methods) {
@@ -134,7 +142,6 @@ function getListenerList(taskId) {
134
142
  }
135
143
  return rtn;
136
144
  }
137
- exports.getListenerList = getListenerList;
138
145
  function invoke(name, ...param) {
139
146
  return __awaiter(this, void 0, void 0, function* () {
140
147
  if (!clickgo.isNative()) {
@@ -143,47 +150,39 @@ function invoke(name, ...param) {
143
150
  return window.clickgoNative.invoke(name, ...param);
144
151
  });
145
152
  }
146
- exports.invoke = invoke;
147
153
  invoke('cg-init', token);
148
154
  function max() {
149
155
  return __awaiter(this, void 0, void 0, function* () {
150
156
  yield invoke('cg-set-state', token, 'max');
151
157
  });
152
158
  }
153
- exports.max = max;
154
159
  function min() {
155
160
  return __awaiter(this, void 0, void 0, function* () {
156
161
  yield invoke('cg-set-state', token, 'min');
157
162
  });
158
163
  }
159
- exports.min = min;
160
164
  function restore() {
161
165
  return __awaiter(this, void 0, void 0, function* () {
162
166
  yield invoke('cg-set-state', token, 'restore');
163
167
  });
164
168
  }
165
- exports.restore = restore;
166
169
  function size(width, height) {
167
170
  return __awaiter(this, void 0, void 0, function* () {
168
171
  yield invoke('cg-set-size', token, width, height);
169
172
  });
170
173
  }
171
- exports.size = size;
172
174
  function maximizable(val) {
173
175
  return __awaiter(this, void 0, void 0, function* () {
174
176
  yield invoke('cg-maximizable', token, val);
175
177
  });
176
178
  }
177
- exports.maximizable = maximizable;
178
179
  function ping(val) {
179
180
  return __awaiter(this, void 0, void 0, function* () {
180
181
  return invoke('cg-ping', val);
181
182
  });
182
183
  }
183
- exports.ping = ping;
184
184
  function isMax() {
185
185
  return __awaiter(this, void 0, void 0, function* () {
186
186
  return invoke('cg-is-max');
187
187
  });
188
188
  }
189
- exports.isMax = isMax;