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
package/README.md CHANGED
@@ -28,7 +28,7 @@ Load the module loader first, and then load it using the module loader.
28
28
  **index.html**
29
29
 
30
30
  ```html
31
- <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.0/dist/loader.min.js?path=index&npm={'clickgo':'3.6.7'}"></script>
31
+ <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.0/dist/loader.min.js?path=index&npm={'clickgo':'3.8.0'}"></script>
32
32
  ```
33
33
 
34
34
  **index.js**
@@ -106,6 +106,10 @@ This library is published under [Apache-2.0](./LICENSE) license.
106
106
 
107
107
  [More Horizontal SVG Vector](https://www.svgrepo.com/svg/447028/more-horizontal)
108
108
 
109
+ #### Arteditor
110
+
111
+ [Plus SVG Vector](https://www.svgrepo.com/svg/447037/plus)
112
+
109
113
  ### **LICENSE:** MIT License **AUTHOR:** developmentseed
110
114
 
111
115
  #### Map
@@ -126,4 +130,11 @@ This library is published under [Apache-2.0](./LICENSE) license.
126
130
  #### Iconview
127
131
 
128
132
  [Folder SVG Vector](https://www.svgrepo.com/svg/474852/folder)
129
- [File SVG Vector](https://www.svgrepo.com/svg/474842/file)
133
+ [File SVG Vector](https://www.svgrepo.com/svg/474842/file)
134
+
135
+ ### **LICENSE:** MIT License **AUTHOR:** instructure-ui
136
+
137
+ #### Arteditor
138
+
139
+ [Bold SVG Vector](https://www.svgrepo.com/svg/501109/bold)
140
+ [Italic SVG Vector](https://www.svgrepo.com/svg/501238/italic)
@@ -18,7 +18,9 @@
18
18
  "/clickgo/control/iconview",
19
19
  "/clickgo/control/xterm",
20
20
  "/clickgo/control/echarts",
21
- "/clickgo/control/map"
21
+ "/clickgo/control/map",
22
+ "/clickgo/control/tuieditor",
23
+ "/clickgo/control/arteditor"
22
24
  ],
23
25
  "style": "/package/global",
24
26
 
@@ -26,6 +28,10 @@
26
28
  "/form/control/alayout/alayout.js",
27
29
  "/form/control/alayout/alayout.css",
28
30
  "/form/control/alayout/alayout.xml",
31
+ "/form/control/arteditor/arteditor.js",
32
+ "/form/control/arteditor/arteditor.xml",
33
+ "/form/control/arteditor/img.js",
34
+ "/form/control/arteditor/img.xml",
29
35
  "/form/control/block/block.css",
30
36
  "/form/control/block/block.xml",
31
37
  "/form/control/box/box.js",
@@ -99,6 +105,8 @@
99
105
  "/form/control/table/table.xml",
100
106
  "/form/control/text/text.js",
101
107
  "/form/control/text/text.xml",
108
+ "/form/control/tuieditor/tuieditor.js",
109
+ "/form/control/tuieditor/tuieditor.xml",
102
110
  "/form/control/vflow/vflow.css",
103
111
  "/form/control/vflow/vflow.js",
104
112
  "/form/control/vflow/vflow.xml",
@@ -131,6 +139,8 @@
131
139
  "/form/method/fs/text.xml",
132
140
  "/form/method/native/native.js",
133
141
  "/form/method/native/native.xml",
142
+ "/form/method/storage/storage.js",
143
+ "/form/method/storage/storage.xml",
134
144
  "/form/method/system/system.js",
135
145
  "/form/method/system/system.xml",
136
146
  "/form/method/task/locale1.json",
@@ -0,0 +1,65 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
35
+ return (mod && mod.__esModule) ? mod : { "default": mod };
36
+ };
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ const clickgo = __importStar(require("clickgo"));
39
+ const img_1 = __importDefault(require("./img"));
40
+ class default_1 extends clickgo.form.AbstractForm {
41
+ constructor() {
42
+ super(...arguments);
43
+ this.readonly = false;
44
+ this.disabled = false;
45
+ this.size = ['12px'];
46
+ this.family = false;
47
+ this.value = [
48
+ {
49
+ 'type': 'p',
50
+ 'value': 'This is a paragraph. You can say whatever you want to say, I won\'t stop you. Just like a bird can fly in the sky as long as it likes.'
51
+ }
52
+ ];
53
+ }
54
+ imgselect(cb) {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ const frm = yield clickgo.form.create(img_1.default);
57
+ const path = yield frm.showDialog();
58
+ if (!path) {
59
+ return;
60
+ }
61
+ cb(path);
62
+ });
63
+ }
64
+ }
65
+ exports.default = default_1;
@@ -0,0 +1,12 @@
1
+ <form title="Arteditor" width="500" height="450" padding="10">
2
+ <layout gutter="10" direction="v" style="flex: 1; width: 0;">
3
+ <label>Line: {{value.length}}</label>
4
+ <arteditor v-model="value" :readonly="readonly" :disabled="disabled" pre="https://cdn.jsdelivr.net/npm/clickgo@3.8.0/dist/app/demo/" style="flex: 1; height: 0;" @imgselect="imgselect" :style="{'font-size': size[0], 'font-family': family ? 'Consolas, \'Courier New\', monospace' : undefined}"></arteditor>
5
+ <layout gutter="10">
6
+ <button @click="disabled = !disabled" style="flex: 1; width: 0;">{{disabled ? '' : '!'}}disabled</button>
7
+ <button @click="readonly = !readonly" style="flex: 1; width: 0;">{{readonly ? '' : '!'}}readonly</button>
8
+ <button @click="family = !family" style="flex: 1; width: 0;">{{family ? '' : '!'}}Family CCM</button>
9
+ <select v-model="size" :data="['12px', '13px', '14px', '15px', '16px']" style="flex: 1; width: 0;"></select>
10
+ </layout>
11
+ </layout>
12
+ </form>
@@ -0,0 +1,51 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ const clickgo = __importStar(require("clickgo"));
27
+ class default_1 extends clickgo.form.AbstractForm {
28
+ constructor() {
29
+ super(...arguments);
30
+ this.select = [];
31
+ this.list = [
32
+ {
33
+ 'icon': 'https://cdn.jsdelivr.net/npm/clickgo@3.7.0/dist/app/demo/res/sql.svg'
34
+ },
35
+ {
36
+ 'icon': 'https://cdn.jsdelivr.net/npm/clickgo@3.7.0/dist/app/demo/res/txt.svg'
37
+ },
38
+ {
39
+ 'icon': 'https://cdn.jsdelivr.net/npm/clickgo@3.7.0/dist/app/demo/res/zip.svg'
40
+ },
41
+ {
42
+ 'icon': 'https://cdn.jsdelivr.net/npm/clickgo@3.7.0/dist/app/demo/res/img.jpg'
43
+ }
44
+ ];
45
+ }
46
+ selectClick() {
47
+ this.dialogResult = this.list[this.select[0]].icon.slice(-11);
48
+ this.close();
49
+ }
50
+ }
51
+ exports.default = default_1;
@@ -0,0 +1,6 @@
1
+ <form title="Select image" width="400" height="400" padding="10" min="false" max="false">
2
+ <layout gutter="10" direction="v" style="flex: 1; width: 0;">
3
+ <iconview :data="list" v-model="select" name="false" multi="false" selection="false" must size="64" style="flex: 1;"></iconview>
4
+ <button @click="selectClick">Select</button>
5
+ </layout>
6
+ </form>
@@ -75,6 +75,10 @@ class default_1 extends clickgo.form.AbstractForm {
75
75
  'name': 'pack.zip',
76
76
  'time': 1676600099,
77
77
  'icon': '/package/res/zip.svg'
78
+ },
79
+ {
80
+ 'id': 7,
81
+ 'icon': 'https://cdn.jsdelivr.net/npm/clickgo@3.7.0/dist/app/demo/res/img.jpg'
78
82
  }
79
83
  ];
80
84
  this.select = [];
@@ -84,6 +88,7 @@ class default_1 extends clickgo.form.AbstractForm {
84
88
  this.ctrl = true;
85
89
  this.selection = true;
86
90
  this.gesture = false;
91
+ this.name = true;
87
92
  this.selectionArea = {};
88
93
  this.scroll = 'auto';
89
94
  this.size = [100];
@@ -1,7 +1,7 @@
1
- <form title="Iconview" width="400" height="500" padding="10">
1
+ <form title="Iconview" width="500" height="500" padding="10">
2
2
  <layout gutter="10" direction="v" style="flex: 1; width: 0;">
3
3
  <label>select: {{select}}</label>
4
- <iconview :data="list" v-model="select" :disabled="disabled" :must="must" :multi="multi" :ctrl="ctrl" :selection="selection" :gesture="gesture ? ['top', 'bottom'] : []" @gesture="onGesture" :scroll="scroll" :size="size[0] ? size[0] : undefined" style="flex: 1;" @drop="drop" @select="onSelect" @open="onOpen">
4
+ <iconview :data="list" v-model="select" :disabled="disabled" :must="must" :multi="multi" :ctrl="ctrl" :selection="selection" :gesture="gesture ? ['top', 'bottom'] : []" @gesture="onGesture" :scroll="scroll" :size="size[0] ? size[0] : undefined" :name="name" style="flex: 1;" @drop="drop" @select="onSelect" @open="onOpen">
5
5
  <template v-slot:pop>
6
6
  <menulist>
7
7
  <menulist-item alt="S">Some options</menulist-item>
@@ -16,24 +16,25 @@
16
16
  </iconview>
17
17
  <label>Area: {{selectionArea}}</label>
18
18
  <layout gutter="10">
19
- <button @click="add" style="padding: 10px; flex: 1;">Add</button>
20
- <button @click="remove" style="padding: 10px; flex: 1;">Remove</button>
21
- <button @click="scrollChange" style="padding: 10px; flex: 1;">Scroll {{scroll}}</button>
19
+ <button @click="add" style="flex: 1;">Add</button>
20
+ <button @click="remove" style="flex: 1;">Remove</button>
21
+ <button @click="scrollChange" style="flex: 1;">Scroll {{scroll}}</button>
22
22
  </layout>
23
23
  <layout class="ctr" gutter="10">
24
24
  <select v-model="size" :data="[32, 64, 100, 128, 256]" style="flex: 1;"></select>
25
- <button @click="select=[1]" style="padding: 10px; flex: 1;">Select 2th</button>
26
- <button v-if="multi" @click="select=[1,2]" style="padding: 10px; flex: 1;">Select two</button>
25
+ <button @click="select=[1]" style="flex: 1;">Select 2th</button>
26
+ <button v-if="multi" @click="select=[1,2]" style="flex: 1;">Select two</button>
27
27
  </layout>
28
28
  <layout class="ctr" gutter="10">
29
- <button @click="disabled = !disabled" style="padding: 10px; flex: 1;">{{disabled ? '' : '!'}}disabled</button>
30
- <button @click="multi = !multi" style="padding: 10px; flex: 1;">{{multi ? '' : '!'}}multi</button>
31
- <button @click="ctrl = !ctrl" style="padding: 10px; flex: 1;">{{ctrl ? '' : '!'}}ctrl</button>
29
+ <button @click="disabled = !disabled" style="flex: 1;">{{disabled ? '' : '!'}}disabled</button>
30
+ <button @click="multi = !multi" style="flex: 1;">{{multi ? '' : '!'}}multi</button>
31
+ <button @click="ctrl = !ctrl" style="flex: 1;">{{ctrl ? '' : '!'}}ctrl</button>
32
32
  </layout>
33
33
  <layout class="ctr" gutter="10">
34
- <button @click="must = !must" style="padding: 10px; flex: 1;">{{must ? '' : '!'}}must</button>
35
- <button @click="selection = !selection" style="padding: 10px; flex: 1;">{{selection ? '' : '!'}}selection</button>
36
- <button @click="gesture = !gesture" style="padding: 10px; flex: 1;">{{gesture ? '' : '!'}}gesture</button>
34
+ <button @click="must = !must" style="flex: 1;">{{must ? '' : '!'}}must</button>
35
+ <button @click="selection = !selection" style="flex: 1;">{{selection ? '' : '!'}}selection</button>
36
+ <button @click="gesture = !gesture" style="flex: 1;">{{gesture ? '' : '!'}}gesture</button>
37
+ <button @click="name = !name" style="flex: 1;">{{name ? '' : '!'}}name</button>
37
38
  </layout>
38
39
  </layout>
39
40
  </form>
@@ -49,6 +49,8 @@ class default_1 extends clickgo.form.AbstractForm {
49
49
  this.multi = false;
50
50
  this.disabled = false;
51
51
  this.readonly = false;
52
+ this.adaption = false;
53
+ this.scroll = true;
52
54
  this.password = false;
53
55
  this.wrap = true;
54
56
  this.menu = false;
@@ -1,8 +1,8 @@
1
- <form width="350" height="350" title="Textbox">
1
+ <form width="350" height="550" title="Textbox">
2
2
  <layout direction="v" gutter="10" style="padding: 10px; flex: 1; width: 0;">
3
3
  <label>Text Length: {{value.length}}, Selection Start: {{selectionStart}}, Selection End: {{selectionEnd}}, Focus: {{isFocus}}</label>
4
4
  <label>Scroll Left: {{scrollLeft}}, Scroll Top: {{scrollTop}}, Scroll Height: {{scrollHeight}}, Scroll Width: {{scrollWidth}}, Client Height: {{clientHeight}}, Client Width: {{clientWidth}}</label>
5
- <text v-model="value" placeholder="placeholder" :multi="multi" :gesture="gesture ? ['top', 'bottom'] : []" @gesture="onGesture" :disabled="disabled" :readonly="readonly" :password="password" :wrap="wrap" v-model:scroll-left="scrollLeft" v-model:scroll-top="scrollTop" v-model:selection-start="selectionStart" v-model:selection-end="selectionEnd" @clientheight="clientHeight = $event" @clientwidth="clientWidth = $event" @scrollheight="scrollHeight = $event" @scrollwidth="scrollWidth = $event" @focus="isFocus = true" @blur="isFocus = false" :style="{'flex': multi ? '1' : undefined, 'line-height': lineHeight, 'font-size': fontSize + 'px', 'background': background, 'color': background ? '#FFF' : undefined, 'height': multi ? undefined : '30px', 'border-width': textBorder}" :class="[phcolor && ('ph-' + phcolor)]">
5
+ <text v-model="value" placeholder="placeholder" :multi="multi" :gesture="gesture ? ['top', 'bottom'] : []" @gesture="onGesture" :disabled="disabled" :readonly="readonly" :adaption="adaption" :scroll="scroll" :password="password" :wrap="wrap" v-model:scroll-left="scrollLeft" v-model:scroll-top="scrollTop" v-model:selection-start="selectionStart" v-model:selection-end="selectionEnd" @clientheight="clientHeight = $event" @clientwidth="clientWidth = $event" @scrollheight="scrollHeight = $event" @scrollwidth="scrollWidth = $event" @focus="isFocus = true" @blur="isFocus = false" :style="{'flex': multi && (!adaption || scroll || !wrap) ? '1' : undefined, 'line-height': lineHeight, 'font-size': fontSize + 'px', 'background': background, 'color': background ? '#FFF' : undefined, 'height': multi && (!adaption || scroll || !wrap) ? '0' : undefined, 'border-width': textBorder}" :class="[phcolor && ('ph-' + phcolor)]">
6
6
  <menulist v-if="menu">
7
7
  <menulist-item>Custom</menulist-item>
8
8
  </menulist>
@@ -12,7 +12,7 @@
12
12
  <button @click="multi = !multi" style="flex: 1;">{{multi ? '' : '!'}}multi</button>
13
13
  <button @click="disabled = !disabled" style="flex: 1;">{{disabled ? '' : '!'}}disabled</button>
14
14
  <button @click="readonly = !readonly" style="flex: 1;">{{readonly ? '' : '!'}}readonly</button>
15
- <button @click="longClick" style="flex: 1;">{{long ? '' : '!'}}long</button>
15
+ <button @click="scroll = !scroll" style="flex: 1;">{{scroll ? '' : '!'}}scroll</button>
16
16
  </layout>
17
17
  <layout gutter="10">
18
18
  <button @click="password = !password" style="flex: 1;">{{password ? '' : '!'}}password</button>
@@ -20,10 +20,14 @@
20
20
  <button @click="menu = !menu" style="flex: 1;">{{menu ? '' : '!'}}menu</button>
21
21
  <button @click="gesture = !gesture" style="flex: 1;">{{gesture ? '' : '!'}}gesture</button>
22
22
  </layout>
23
+ <layout gutter="10">
24
+ <button @click="append = !append" style="flex: 1;">{{append ? '' : '!'}}append</button>
25
+ <button @click="adaption = !adaption" style="flex: 1;">{{adaption ? '' : '!'}}adaption</button>
26
+ <button @click="longClick" style="flex: 1;">{{long ? '' : '!'}}long</button>
27
+ </layout>
23
28
  <layout gutter="10">
24
29
  <button @click="lineHeight = lineHeight === 1 ? 1.5 : 1" style="flex: 1;">Set line {{lineHeight === 1 ? 1.5 : 1}}</button>
25
30
  <button @click="fontSize = fontSize === 12 ? 16 : 12" style="flex: 1;">Set size {{fontSize === 12 ? 16 : 12}}</button>
26
- <button @click="append = !append" style="flex: 1;">{{append ? '' : '!'}}append</button>
27
31
  </layout>
28
32
  <layout gutter="10">
29
33
  <button @click="border = 'solid'" style="flex: 2;">Set border solid</button>
@@ -0,0 +1,39 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ const clickgo = __importStar(require("clickgo"));
27
+ class default_1 extends clickgo.form.AbstractForm {
28
+ constructor() {
29
+ super(...arguments);
30
+ this.theme = ['light'];
31
+ this.themes = ['light', 'dark'];
32
+ this.disabled = false;
33
+ this.size = ['12px'];
34
+ this.family = false;
35
+ this.visual = false;
36
+ this.text = 'a**b**c';
37
+ }
38
+ }
39
+ exports.default = default_1;
@@ -0,0 +1,13 @@
1
+ <form title="Tuieditor" width="500" height="450" padding="10">
2
+ <layout gutter="10" direction="v" style="flex: 1; width: 0;">
3
+ <label>Length: {{text.length}}</label>
4
+ <tuieditor v-model="text" :disabled="disabled" :theme="theme[0]" :visual="visual" style="flex: 1; height: 0;" :style="{'font-size': size[0], 'font-family': family ? 'Consolas, \'Courier New\', monospace' : undefined}"></tuieditor>
5
+ <layout gutter="10">
6
+ <button @click="disabled = !disabled" style="flex: 1; width: 0;">{{disabled ? '' : '!'}}disabled</button>
7
+ <button @click="family = !family" style="flex: 1; width: 0;">{{family ? '' : '!'}}Family CCM</button>
8
+ <select v-model="size" :data="['12px', '13px', '14px', '15px', '16px']" style="flex: 1; width: 0;"></select>
9
+ <select v-model="theme" :data="themes" style="flex: 1; width: 0;"></select>
10
+ <button @click="visual = !visual" style="flex: 1; width: 0;">{{visual ? '' : '!'}}visual</button>
11
+ </layout>
12
+ </layout>
13
+ </form>
@@ -159,5 +159,12 @@ class default_1 extends clickgo.form.AbstractForm {
159
159
  this.flist[formId].title = value;
160
160
  this.pushConsole('formShowInSystemTaskChange', `taskId: ${taskId}, formId: ${formId}, value: ${value}`);
161
161
  }
162
+ onFormHashChange(taskId, formId, value) {
163
+ if (!this.flist[formId]) {
164
+ return;
165
+ }
166
+ this.pushConsole('formHashChange', `taskId: ${taskId}, formId: ${formId}, value: ${value}`);
167
+ return;
168
+ }
162
169
  }
163
170
  exports.default = default_1;
@@ -1,16 +1,16 @@
1
- <form width="450" height="550" title="About form" padding="10" direction="v">
2
- <label>The form list:</label>
3
- <layout align-h="center" align-v="center" style="margin-top: 10px; flex: 1; height: 0;">
4
- <layout gutter="10" direction="v">
5
- <layout align-v="center" v-for="(form, fid) of flist" gutter="5" @click="changeFocus(fid)" class="item" :class="{'flash': form.flash, 'focus': form.focus}">
6
- <img v-if="form.icon" :src="form.icon" style="width: 16px; height: 16px;" /><label>{{form.title}}{{form.max ? ' (max)' : ''}}{{form.min ? ' (min)' : ''}}</label>
7
- </layout>
8
- </layout>
9
- </layout>
10
- <layout gutter="10" style="margin-top: 10px; height: 80px;">
11
- <list :data="['formCreated', 'formRemoved', 'formTitleChanged', 'formIconChanged', 'formStateMinChanged', 'formStateMaxChanged', 'formShowChanged', 'formFocused', 'formBlurred', 'formFlash', 'formShowInSystemTaskChange']" style="width: 150px;"></list>
12
- <vflow v-slot="data" :data="list" direction="v" style="color: #FFF; background: hsl(0, 0%, 20%); line-height: 1.5; flex: 1; width: 0; padding: 10px;" same>
13
- <label>[{{data.row.time}}] {{data.row.name}}, {{data.row.text}}.</label>
14
- </vflow>
15
- </layout>
1
+ <form width="550" height="550" title="About form" padding="10" direction="v">
2
+ <label>The form list:</label>
3
+ <layout align-h="center" align-v="center" style="margin-top: 10px; flex: 1; height: 0;">
4
+ <layout gutter="10" direction="v">
5
+ <layout align-v="center" v-for="(form, fid) of flist" gutter="5" @click="changeFocus(fid)" class="item" :class="{'flash': form.flash, 'focus': form.focus}">
6
+ <img v-if="form.icon" :src="form.icon" style="width: 16px; height: 16px;" /><label>{{form.title}}{{form.max ? ' (max)' : ''}}{{form.min ? ' (min)' : ''}}</label>
7
+ </layout>
8
+ </layout>
9
+ </layout>
10
+ <layout gutter="10" style="margin-top: 10px; height: 120px;">
11
+ <list :data="['formCreated', 'formRemoved', 'formTitleChanged', 'formIconChanged', 'formStateMinChanged', 'formStateMaxChanged', 'formShowChanged', 'formFocused', 'formBlurred', 'formFlash', 'formShowInSystemTaskChange', 'formHashChange']" style="width: 150px;"></list>
12
+ <vflow v-slot="data" :data="list" direction="v" style="color: #FFF; background: hsl(0, 0%, 20%); line-height: 1.5; flex: 1; width: 0; padding: 10px;" same>
13
+ <label>[{{data.row.time}}] {{data.row.name}}, {{data.row.text}}.</label>
14
+ </vflow>
15
+ </layout>
16
16
  </form>
@@ -70,6 +70,8 @@ const text_1 = __importDefault(require("./control/text/text"));
70
70
  const vflow_1 = __importDefault(require("./control/vflow/vflow"));
71
71
  const xterm_1 = __importDefault(require("./control/xterm/xterm"));
72
72
  const echarts_1 = __importDefault(require("./control/echarts/echarts"));
73
+ const tuieditor_1 = __importDefault(require("./control/tuieditor/tuieditor"));
74
+ const arteditor_1 = __importDefault(require("./control/arteditor/arteditor"));
73
75
  const form_2 = __importDefault(require("./event/form/form"));
74
76
  const other_1 = __importDefault(require("./event/other/other"));
75
77
  const screen_1 = __importDefault(require("./event/screen/screen"));
@@ -80,6 +82,7 @@ const dom_1 = __importDefault(require("./method/dom/dom"));
80
82
  const form_3 = __importDefault(require("./method/form/form"));
81
83
  const fs_1 = __importDefault(require("./method/fs/fs"));
82
84
  const native_1 = __importDefault(require("./method/native/native"));
85
+ const storage_1 = __importDefault(require("./method/storage/storage"));
83
86
  const system_1 = __importDefault(require("./method/system/system"));
84
87
  const task_2 = __importDefault(require("./method/task/task"));
85
88
  const theme_1 = __importDefault(require("./method/theme/theme"));
@@ -249,6 +252,14 @@ class default_1 extends clickgo.form.AbstractForm {
249
252
  frm = yield clickgo.form.create(text_1.default);
250
253
  break;
251
254
  }
255
+ case 'ctuieditor': {
256
+ frm = yield clickgo.form.create(tuieditor_1.default);
257
+ break;
258
+ }
259
+ case 'carteditor': {
260
+ frm = yield clickgo.form.create(arteditor_1.default);
261
+ break;
262
+ }
252
263
  case 'eform': {
253
264
  frm = yield clickgo.form.create(form_2.default);
254
265
  break;
@@ -289,6 +300,10 @@ class default_1 extends clickgo.form.AbstractForm {
289
300
  frm = yield clickgo.form.create(native_1.default);
290
301
  break;
291
302
  }
303
+ case 'mstorage': {
304
+ frm = yield clickgo.form.create(storage_1.default);
305
+ break;
306
+ }
292
307
  case 'msystem': {
293
308
  frm = yield clickgo.form.create(system_1.default);
294
309
  break;
@@ -36,10 +36,12 @@
36
36
  <button @click="openForm('cdesc')">Desc</button>
37
37
  <button @click="openForm('chtml')">Html</button>
38
38
  <button @click="openForm('ciconview')">Iconview</button>
39
+ <button @click="openForm('carteditor')">Arteditor</button>
39
40
  <button @click="openForm('cmonaco')">Monaco</button>
40
41
  <button @click="openForm('cxterm')">Xterm</button>
41
42
  <button @click="openForm('cecharts')">Echarts</button>
42
43
  <button @click="openForm('cmap')">Map</button>
44
+ <button @click="openForm('ctuieditor')">Tuieditor</button>
43
45
  </layout>
44
46
  </flow>
45
47
  <flow v-else-if="ntab === 'method'" class="inner" direction="v">
@@ -49,6 +51,7 @@
49
51
  <button @click="openForm('mform')">Library form</button>
50
52
  <button @click="openForm('mfs')">Library fs</button>
51
53
  <button @click="openForm('mnative')">Library native</button>
54
+ <button @click="openForm('mstorage')">Library storage</button>
52
55
  <button @click="openForm('mtask')">Library task</button>
53
56
  <button @click="openForm('mtheme')">Library theme</button>
54
57
  <button @click="openForm('mtool')">Library tool</button>
@@ -44,6 +44,7 @@ class default_1 extends clickgo.form.AbstractForm {
44
44
  this.sendValue = 'sendValue';
45
45
  this.test = 'A';
46
46
  this.dr = '';
47
+ this.hash = 'testhash';
47
48
  }
48
49
  ssend() {
49
50
  this.send(parseInt(this.fid), {
@@ -25,6 +25,16 @@
25
25
  <text v-model="sendValue" style="flex: 1; width: 0;"></text>
26
26
  <button @click="ssend">send({{fid}}, { 'key': '{{sendValue}}' })</button>
27
27
  </layout>
28
+ <layout gutter="10">
29
+ <label>Now Form Hash:</label>
30
+ <label>{{formHash}}</label>
31
+ </layout>
32
+ <button @click="formHashBack">formHashBack()</button>
33
+ <layout gutter="10" align-v="center">
34
+ <label>Form Hash:</label>
35
+ <text v-model="hash" style="flex: 1; width: 0;"></text>
36
+ </layout>
37
+ <button @click="formHash = hash">formHash = '{{hash}}'</button>
28
38
  <button @click="hhide">hide() and show()</button>
29
39
  <layout gutter="10" align-v="center">
30
40
  <button @click="sshowDialog" style="flex: 1;">showDialog()</button>
@@ -65,6 +65,11 @@ class default_1 extends clickgo.form.AbstractForm {
65
65
  yield clickgo.form.dialog('Hash is: ' + clickgo.core.getHash());
66
66
  });
67
67
  }
68
+ getHost() {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ yield clickgo.form.dialog('Host is: ' + clickgo.core.getHost());
71
+ });
72
+ }
68
73
  locatione() {
69
74
  return __awaiter(this, void 0, void 0, function* () {
70
75
  if (clickgo.core.location(this.location)) {
@@ -1,4 +1,4 @@
1
- <form width="350" height="430" title="Library task" padding="10">
1
+ <form width="350" height="450" title="Library task" padding="10">
2
2
  <layout direction="v" gutter="10" style="flex: 1;">
3
3
  <label>config:</label>
4
4
  <text v-model="config" readonly multi style="flex: 1;"></text>
@@ -9,6 +9,7 @@
9
9
  <button @click="hashe">hash('{{hash}}')</button>
10
10
  </layout>
11
11
  <button @click="getHash">getHash()</button>
12
+ <button @click="getHost">getHost()</button>
12
13
  <layout gutter="10">
13
14
  <text v-model="location" style="flex: 1;" />
14
15
  <button @click="locatione">location('...{{location.slice(-5)}}')</button>
@@ -41,6 +41,7 @@ class default_1 extends clickgo.form.AbstractForm {
41
41
  this.type = ['primary'];
42
42
  this.progress = ['noraml'];
43
43
  this.dr = '';
44
+ this.hash = 'hash' + clickgo.tool.rand(0, 100).toString();
44
45
  }
45
46
  min() {
46
47
  clickgo.form.min(this.formId);
@@ -63,6 +64,21 @@ class default_1 extends clickgo.form.AbstractForm {
63
64
  get() {
64
65
  clickgo.form.dialog(JSON.stringify(clickgo.form.get(parseInt(this.fid)))).catch((e) => { throw e; });
65
66
  }
67
+ getHash() {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ yield clickgo.form.dialog(JSON.stringify(clickgo.form.getHash(parseInt(this.fid))));
70
+ });
71
+ }
72
+ hashBack() {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ yield clickgo.form.dialog(JSON.stringify(clickgo.form.hashBack(parseInt(this.fid))));
75
+ });
76
+ }
77
+ tohash() {
78
+ return __awaiter(this, void 0, void 0, function* () {
79
+ yield clickgo.form.dialog(JSON.stringify(clickgo.form.hash(this.hash, parseInt(this.fid))));
80
+ });
81
+ }
66
82
  getActivePanel() {
67
83
  return __awaiter(this, void 0, void 0, function* () {
68
84
  yield clickgo.form.dialog(JSON.stringify(clickgo.form.getActivePanel(parseInt(this.fid))));