clickgo 3.6.7 → 3.8.0

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 (67) hide show
  1. package/README.md +13 -2
  2. package/dist/app/demo/config.json +11 -1
  3. package/dist/app/demo/form/control/arteditor/arteditor.js +65 -0
  4. package/dist/app/demo/form/control/arteditor/arteditor.xml +12 -0
  5. package/dist/app/demo/form/control/arteditor/img.js +51 -0
  6. package/dist/app/demo/form/control/arteditor/img.xml +6 -0
  7. package/dist/app/demo/form/control/iconview/iconview.js +5 -0
  8. package/dist/app/demo/form/control/iconview/iconview.xml +14 -13
  9. package/dist/app/demo/form/control/text/text.js +2 -0
  10. package/dist/app/demo/form/control/text/text.xml +8 -4
  11. package/dist/app/demo/form/control/tuieditor/tuieditor.js +39 -0
  12. package/dist/app/demo/form/control/tuieditor/tuieditor.xml +13 -0
  13. package/dist/app/demo/form/event/form/form.js +7 -0
  14. package/dist/app/demo/form/event/form/form.xml +15 -15
  15. package/dist/app/demo/form/main.js +15 -0
  16. package/dist/app/demo/form/main.xml +3 -0
  17. package/dist/app/demo/form/method/aform/aform.js +1 -0
  18. package/dist/app/demo/form/method/aform/aform.xml +10 -0
  19. package/dist/app/demo/form/method/core/core.js +5 -0
  20. package/dist/app/demo/form/method/core/core.xml +2 -1
  21. package/dist/app/demo/form/method/form/form.js +16 -0
  22. package/dist/app/demo/form/method/form/form.xml +38 -27
  23. package/dist/app/demo/form/method/storage/storage.js +85 -0
  24. package/dist/app/demo/form/method/storage/storage.xml +18 -0
  25. package/dist/app/demo/res/marker.svg +0 -1
  26. package/dist/clickgo.js +3 -2
  27. package/dist/clickgo.ts +2 -1
  28. package/dist/control/arteditor.cgc +0 -0
  29. package/dist/control/box.cgc +0 -0
  30. package/dist/control/common.cgc +0 -0
  31. package/dist/control/desc.cgc +0 -0
  32. package/dist/control/echarts.cgc +0 -0
  33. package/dist/control/form.cgc +0 -0
  34. package/dist/control/html.cgc +0 -0
  35. package/dist/control/iconview.cgc +0 -0
  36. package/dist/control/map.cgc +0 -0
  37. package/dist/control/monaco.cgc +0 -0
  38. package/dist/control/nav.cgc +0 -0
  39. package/dist/control/page.cgc +0 -0
  40. package/dist/control/property.cgc +0 -0
  41. package/dist/control/table.cgc +0 -0
  42. package/dist/control/task.cgc +0 -0
  43. package/dist/control/tuieditor.cgc +0 -0
  44. package/dist/control/xterm.cgc +0 -0
  45. package/dist/ext/toastui-editor-all.min.js +24 -0
  46. package/dist/global.css +1 -1
  47. package/dist/index.js +4 -1
  48. package/dist/index.ts +7 -0
  49. package/dist/lib/control.js +5 -14
  50. package/dist/lib/control.ts +7 -10
  51. package/dist/lib/core.js +71 -16
  52. package/dist/lib/core.ts +66 -7
  53. package/dist/lib/dom.js +20 -2
  54. package/dist/lib/dom.ts +34 -11
  55. package/dist/lib/form.js +111 -40
  56. package/dist/lib/form.ts +139 -38
  57. package/dist/lib/fs.js +2 -2
  58. package/dist/lib/fs.ts +2 -2
  59. package/dist/lib/storage.js +207 -0
  60. package/dist/lib/storage.ts +218 -0
  61. package/dist/lib/task.js +38 -3
  62. package/dist/lib/task.ts +42 -7
  63. package/dist/theme/byterun.cgt +0 -0
  64. package/dist/theme/familiar.cgt +0 -0
  65. package/dist/theme/light.cgt +0 -0
  66. package/package.json +1 -1
  67. package/types/index.d.ts +3 -2
@@ -2,51 +2,62 @@
2
2
  <flow direction="v" style="flex: 1; padding: 10px;">
3
3
  <layout gutter="10" direction="v" style="flex: 1;">
4
4
  <label>This form id: {{formId}}</label>
5
- <button @click="min" style="height: 30px;">min({{formId}})</button>
6
- <button @click="max" style="height: 30px;">max({{formId}})</button>
7
- <button @click="close" style="height: 30px;">close({{formId}})</button>
5
+ <button @click="min">min({{formId}})</button>
6
+ <button @click="max">max({{formId}})</button>
7
+ <button @click="close">close({{formId}})</button>
8
8
  <label @mousedown="bindResize" @touchstart="bindResize" style="padding: 20px; background: rgba(0, 0, 0, .1); cursor: se-resize;">bindResize(e, 'rb')</label>
9
9
  <label @mousedown="bindDrag" @touchstart="bindDrag" style="padding: 20px; background: rgba(0, 0, 0, .1); cursor: move;">bindDrag(e)</label>
10
10
  <layout gutter="10" align-v="center">
11
11
  <label>Form ID:</label>
12
- <text v-model="fid" style="flex: 1; width: 0; height: 30px;"></text>
12
+ <text v-model="fid" style="flex: 1; width: 0;"></text>
13
13
  </layout>
14
- <button @click="getTaskId" style="height: 30px;">getTaskId({{fid}})</button>
15
- <button @click="get" style="height: 30px;">get({{fid}})</button>
16
- <button @click="getActivePanel" style="height: 30px;">getActivePanel({{fid}})</button>
14
+ <button @click="getTaskId">getTaskId({{fid}})</button>
15
+ <button @click="get">get({{fid}})</button>
16
+ <layout gutter="10">
17
+ <label>Now Form Hash:</label>
18
+ <label>{{formHash}}</label>
19
+ </layout>
20
+ <button @click="getHash">getHash({{fid}})</button>
21
+ <button @click="hashBack">hashBack({{fid}})</button>
22
+ <layout gutter="10" align-v="center">
23
+ <label>Form Hash:</label>
24
+ <text v-model="hash" style="flex: 1; width: 0;"></text>
25
+ </layout>
26
+ <button @click="tohash">hash('{{hash}}', {{fid}})</button>
27
+ <button @click="getActivePanel">getActivePanel({{fid}})</button>
17
28
  <layout gutter="10" align-v="center">
18
29
  <label>Task ID:</label>
19
- <text v-model="tid" style="flex: 1; width: 0; height: 30px;"></text>
20
- <button @click="getList" style="padding: 0 10px;">getList({{tid}})</button>
30
+ <text v-model="tid" style="flex: 1; width: 0;"></text>
31
+ <button @click="getList">getList({{tid}})</button>
21
32
  </layout>
22
- <button @click="getFocus" style="height: 30px;">getFocus()</button>
23
- <button @click="changeFocus" style="height: 30px;">changeFocus({{fid}})</button>
24
- <button @click="getMaxZIndexID" style="height: 30px;">getMaxZIndexID()</button>
25
- <button @click="getRectByBorder" style="height: 30px;">getRectByBorder('rb')</button>
26
- <button @click="showCircular" style="height: 30px;">showCircular(x, y)</button>
27
- <button @click="showRectangle" style="height: 30px;">showRectangle(x, y, 'rb')</button>
28
- <button @click="showDrag" ref="showDrag" style="height: 30px;">showDrag()</button>
33
+ <button @click="getFocus">getFocus()</button>
34
+ <button @click="changeFocus">changeFocus({{fid}})</button>
35
+ <button @click="getMaxZIndexID">getMaxZIndexID()</button>
36
+ <button @click="getRectByBorder">getRectByBorder('rb')</button>
37
+ <button @click="showCircular">showCircular(x, y)</button>
38
+ <button @click="showRectangle">showRectangle(x, y, 'rb')</button>
39
+ <button @click="showDrag" ref="showDrag">showDrag()</button>
29
40
  <layout gutter="10">
30
41
  <select v-model="type" :data="['primary', 'info', 'warning', 'danger']"></select>
31
42
  <select v-model="progress" :data="['normal', 'progress + icon']" style="flex: 1; width: 0;"></select>
32
43
  <button @click="notify" style="padding: 0 10px;">notify({ ... })</button>
33
44
  </layout>
34
- <button @click="showPop" style="height: 30px;">showPop(e.currentTarget, this.refs.pop)</button>
45
+ <button @click="showPop">showPop(e.currentTarget, this.refs.pop)</button>
35
46
  <teleport to="system">
36
47
  <block ref="pop" style="border: solid 1px #000; background: #FFF; width: 200px; height: 100px; display: flex; justify-content: center; align-items: center;">refs.pop</block>
37
48
  </teleport>
38
- <button @click="create" style="height: 30px;">create('test', undefined, { 'path': this.filename })</button>
49
+ <button @click="create">create('test', undefined, { 'path': this.filename })</button>
39
50
  <label>Dialog result: {{dr}}.</label>
40
- <button @click="dialog" style="height: 30px;">dialog('Hello world!')</button>
51
+ <button @click="dialog">dialog('Hello world!')</button>
41
52
  <button @click="dialogLong">dialog('long...')</button>
42
- <button @click="dialogTitle" style="height: 30px;">dialog({'title':'Title','content':'Hello world!'})</button>
43
- <button @click="dialogButtons" style="height: 30px;">dialog({'content':'Hello world!','buttons':['A','B','C']})</button>
44
- <button @click="dialogCannot" style="height: 30px;">Dialog can not be close</button>
45
- <button @click="dialogData" style="height: 30px;">Dialog data</button>
46
- <button @click="confirm(false)" style="height: 30px;">confirm('confirm')</button>
47
- <button @click="confirm(true)" style="height: 30px;">confirm({'content':'confirm','cancel':true})</button>
48
- <button @click="flash" style="height: 30px;">flash({{formId}})</button>
49
- <button @click="showLauncher" style="height: 30px;">showLauncher()</button>
53
+ <button @click="dialogTitle">dialog({'title':'Title','content':'Hello world!'})</button>
54
+ <button @click="dialogButtons">dialog({'content':'Hello world!','buttons':['A','B','C']})</button>
55
+ <button @click="dialogCannot">Dialog can not be close</button>
56
+ <button @click="dialogData">Dialog data</button>
57
+ <button @click="confirm(false)">confirm('confirm')</button>
58
+ <button @click="confirm(true)">confirm({'content':'confirm','cancel':true})</button>
59
+ <button @click="flash">flash({{formId}})</button>
60
+ <button @click="showLauncher">showLauncher()</button>
50
61
  </layout>
51
62
  </flow>
52
63
  </form>
@@ -0,0 +1,85 @@
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 (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ Object.defineProperty(exports, "__esModule", { value: true });
35
+ const clickgo = __importStar(require("clickgo"));
36
+ class default_1 extends clickgo.form.AbstractForm {
37
+ constructor() {
38
+ super(...arguments);
39
+ this.key = 'test';
40
+ this.val = 'val';
41
+ this.list = [];
42
+ this.ppath = '';
43
+ }
44
+ get() {
45
+ var _a;
46
+ return __awaiter(this, void 0, void 0, function* () {
47
+ yield clickgo.form.dialog((_a = clickgo.storage.get(this.key)) !== null && _a !== void 0 ? _a : 'null');
48
+ });
49
+ }
50
+ set() {
51
+ return __awaiter(this, void 0, void 0, function* () {
52
+ clickgo.storage.set(this.key, this.val);
53
+ yield clickgo.form.dialog('done');
54
+ });
55
+ }
56
+ remove() {
57
+ return __awaiter(this, void 0, void 0, function* () {
58
+ yield clickgo.form.dialog(clickgo.storage.remove(this.key) ? 'true' : 'false');
59
+ });
60
+ }
61
+ getlist() {
62
+ this.list.length = 0;
63
+ const obj = clickgo.storage.list();
64
+ for (const key in obj) {
65
+ this.list.push(key + ': ' + obj[key].toString() + ' Bytes');
66
+ }
67
+ }
68
+ all() {
69
+ this.list.length = 0;
70
+ this.ppath = '';
71
+ const obj = clickgo.storage.all();
72
+ for (const key in obj) {
73
+ if (!this.ppath) {
74
+ this.ppath = key;
75
+ }
76
+ this.list.push(key + ': ' + obj[key].toString() + ' Bytes');
77
+ }
78
+ }
79
+ clear() {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ yield clickgo.form.dialog('Removed ' + (yield clickgo.storage.clear(this.ppath)).toString() + ' items.');
82
+ });
83
+ }
84
+ }
85
+ exports.default = default_1;
@@ -0,0 +1,18 @@
1
+ <form width="300" height="450" title="Library storage" padding="10">
2
+ <layout gutter="10" direction="v" style="flex: 1;">
3
+ <layout gutter="10">
4
+ <text style="flex: 1;" v-model="key"></text>
5
+ <button @click="get">get('{{key}}')</button>
6
+ </layout>
7
+ <layout gutter="10">
8
+ <text style="flex: 1;" v-model="val"></text>
9
+ <button @click="set">set('{{key}}')</button>
10
+ </layout>
11
+ <button @click="remove">remove('{{key}}')</button>
12
+ <button @click="getlist">list()</button>
13
+ <button @click="all">all()</button>
14
+ <list :data="list" style="flex: 1;" />
15
+ <text v-model="ppath"></text>
16
+ <button @click="clear">clear('{{ppath}}')</button>
17
+ </layout>
18
+ </form>
@@ -1,4 +1,3 @@
1
-
2
1
  <?xml version="1.0" encoding="utf-8"?>
3
2
  <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
4
3
  <path d="M12.5 7.04148C12.3374 7.0142 12.1704 7 12 7C10.3431 7 9 8.34315 9 10C9 11.6569 10.3431 13 12 13C13.6569 13 15 11.6569 15 10C15 9.82964 14.9858 9.6626 14.9585 9.5" stroke-width="1.5" stroke-linecap="round"/>
package/dist/clickgo.js CHANGED
@@ -23,8 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.zip = exports.tool = exports.theme = exports.task = exports.native = exports.fs = exports.form = exports.dom = exports.core = exports.control = exports.vue = exports.hasFrame = exports.isImmersion = exports.getPlatform = exports.isNative = exports.getVersion = void 0;
27
- const version = '3.6.7';
26
+ exports.zip = exports.tool = exports.theme = exports.task = exports.storage = exports.native = exports.fs = exports.form = exports.dom = exports.core = exports.control = exports.vue = exports.hasFrame = exports.isImmersion = exports.getPlatform = exports.isNative = exports.getVersion = void 0;
27
+ const version = '3.8.0';
28
28
  function getVersion() {
29
29
  return version;
30
30
  }
@@ -64,6 +64,7 @@ exports.dom = __importStar(require("./lib/dom"));
64
64
  exports.form = __importStar(require("./lib/form"));
65
65
  exports.fs = __importStar(require("./lib/fs"));
66
66
  exports.native = __importStar(require("./lib/native"));
67
+ exports.storage = __importStar(require("./lib/storage"));
67
68
  exports.task = __importStar(require("./lib/task"));
68
69
  exports.theme = __importStar(require("./lib/theme"));
69
70
  exports.tool = __importStar(require("./lib/tool"));
package/dist/clickgo.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- const version = '3.6.7';
16
+ const version = '3.8.0';
17
17
  export function getVersion(): string {
18
18
  return version;
19
19
  }
@@ -61,6 +61,7 @@ export * as dom from './lib/dom';
61
61
  export * as form from './lib/form';
62
62
  export * as fs from './lib/fs';
63
63
  export * as native from './lib/native';
64
+ export * as storage from './lib/storage';
64
65
  export * as task from './lib/task';
65
66
  export * as theme from './lib/theme';
66
67
  export * as tool from './lib/tool';
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file