clickgo 3.6.6 → 3.7.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.
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.6'}"></script>
31
+ <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.0/dist/loader.min.js?path=index&npm={'clickgo':'3.7.0'}"></script>
32
32
  ```
33
33
 
34
34
  **index.js**
@@ -131,6 +131,8 @@
131
131
  "/form/method/fs/text.xml",
132
132
  "/form/method/native/native.js",
133
133
  "/form/method/native/native.xml",
134
+ "/form/method/storage/storage.js",
135
+ "/form/method/storage/storage.xml",
134
136
  "/form/method/system/system.js",
135
137
  "/form/method/system/system.xml",
136
138
  "/form/method/task/locale1.json",
@@ -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>
@@ -80,6 +80,7 @@ const dom_1 = __importDefault(require("./method/dom/dom"));
80
80
  const form_3 = __importDefault(require("./method/form/form"));
81
81
  const fs_1 = __importDefault(require("./method/fs/fs"));
82
82
  const native_1 = __importDefault(require("./method/native/native"));
83
+ const storage_1 = __importDefault(require("./method/storage/storage"));
83
84
  const system_1 = __importDefault(require("./method/system/system"));
84
85
  const task_2 = __importDefault(require("./method/task/task"));
85
86
  const theme_1 = __importDefault(require("./method/theme/theme"));
@@ -289,6 +290,10 @@ class default_1 extends clickgo.form.AbstractForm {
289
290
  frm = yield clickgo.form.create(native_1.default);
290
291
  break;
291
292
  }
293
+ case 'mstorage': {
294
+ frm = yield clickgo.form.create(storage_1.default);
295
+ break;
296
+ }
292
297
  case 'msystem': {
293
298
  frm = yield clickgo.form.create(system_1.default);
294
299
  break;
@@ -49,6 +49,7 @@
49
49
  <button @click="openForm('mform')">Library form</button>
50
50
  <button @click="openForm('mfs')">Library fs</button>
51
51
  <button @click="openForm('mnative')">Library native</button>
52
+ <button @click="openForm('mstorage')">Library storage</button>
52
53
  <button @click="openForm('mtask')">Library task</button>
53
54
  <button @click="openForm('mtheme')">Library theme</button>
54
55
  <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>
@@ -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))));
@@ -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>
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.6';
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.7.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.6';
16
+ const version = '3.7.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
package/dist/global.css CHANGED
@@ -1 +1 @@
1
- #cg-wrap{position:fixed;left:0;top:0;--g-padding:7px;--g-margin:2px;--g-radius:0;--cg:hsl(20, 100%, 65%);--success:hsl(150, 100%, 40%);--success-hover:hsl(150, 100%, 45%);--success-active:hsl(150, 100%, 30%);--success-focus:hsl(150, 100%, 35%);--success-disabled:hsl(150, 0%, 40%);--info:hsl(210, 100%, 50%);--info-hover:hsl(210, 100%, 60%);--info-active:hsl(210, 100%, 40%);--info-focus:hsl(210, 100%, 45%);--info-disabled:hsl(210, 0%, 50%);--warning:hsl(20, 100%, 70%);--warning-hover:hsl(20, 100%, 80%);--warning-active:hsl(20, 100%, 60%);--warning-focus:hsl(20, 100%, 65%);--warning-disabled:hsl(20, 0%, 70%);--danger:hsl(350, 100%, 50%);--danger-hover:hsl(350, 100%, 70%);--danger-active:hsl(350, 100%, 40%);--danger-focus:hsl(350, 100%, 45%);--danger-disabled:hsl(350, 0%, 50%);--system-color:hsl(0, 0%, 95%);--system-background:hsla(0, 0%, 0%, .35);--system-control-background:hsla(0, 0%, 100%, .03);--system-background-hover:hsla(0, 0%, 100%, .06);--system-background-active:hsla(0, 0%, 100%, .1);--system-border-color:hsla(0, 0%, 100%, .03);--system-border-color-hover:hsla(0, 0%, 100%, .06);--system-placeholder-color: hsla(0, 0%, 100%, .2);--face:hsl(0, 0%, 95%);--g-color:hsl(0, 0%, 20%);--g-color-hover:hsl(0, 0%, 30%);--g-color-active:hsl(0, 0%, 10%);--g-color-focus:hsl(0, 0%, 15%);--g-color-disabled:hsl(0, 0%, 60%);--g-background:hsl(0, 0%, 95%);--g-background-hover:hsl(0, 0%, 100%);--g-background-active:hsl(0, 0%, 85%);--g-background-kp:hsl(0, 0%, 80%);--g-background-opacity:hsl(0, 0%, 50%, .2);--g-background-focus:hsl(0, 0%, 97.5%);--g-background-disabled:hsl(0, 0%, 75%);--g-border-color:hsl(0, 0%, 40%);--g-border-color-hover:hsl(0, 0%, 50%);--g-border-color-active:hsl(0, 0%, 30%);--g-border-color-focus:hsl(0, 0%, 35%);--g-border-color-disabled:hsl(0, 0%, 60%);--g-focusbox-border-color:var(--g-plain-border-color);--g-plain-color:var(--g-color);--g-plain-color-hover:var(--g-color-hover);--g-plain-color-active:var(--g-color-active);--g-plain-color-focus:var(--g-color-focus);--g-plain-color-disabled:var(--g-color-disabled);--g-plain-background:hsl(0, 0%, 100%);--g-plain-background-hover:hsl(0, 0%, 98%);--g-plain-background-active:hsl(0, 0%, 95%);--g-plain-background-focus:var(--g-plain-background);--g-plain-background-disabled:hsl(0, 0%, 95%);--g-plain-border-color:hsl(0, 0%, 70%);--g-plain-border-color-hover:hsl(0, 0%, 80%);--g-plain-border-color-active:hsl(0, 0%, 60%);--g-plain-border-color-focus:hsl(0, 0%, 65%);--g-plain-border-color-disabled:hsl(0, 0%, 60%)}#cg-form-list{z-index:20020000}#cg-pop-list{z-index:20020001}#cg-simpletask{z-index:20020002}#cg-rectangle{z-index:20020003;box-sizing:border-box;position:absolute;border-radius:3px;box-shadow:0 0 10px rgba(0,0,0,.25);background:rgba(255,255,255,.05);pointer-events:none;opacity:0}#cg-circular{z-index:20020003;box-sizing:border-box;position:absolute;border:solid 3px var(--cg);border-radius:50%;filter:drop-shadow(0 0 3px var(--cg));pointer-events:none;opacity:0}#cg-gesture{z-index:20020003;box-sizing:border-box;position:absolute;border-radius:50%;pointer-events:none;opacity:0;background:var(--system-background);box-shadow:0 5px 20px rgba(0,0,0,.25);transform:scale(0);width:20px;height:20px}#cg-gesture.done{background:rgba(255,255,255,.3);border:solid 3px rgba(0,0,0,.3)}#cg-gesture.ani{transition:all .1s ease-out;transition-property:left,top,transform}#cg-drag{z-index:20020003;box-sizing:border-box;position:absolute;border-radius:3px;pointer-events:none;background:var(--system-background);box-shadow:0 5px 20px rgba(0,0,0,.25);opacity:0;display:flex;justify-content:center;align-items:center}#cg-launcher{z-index:20020004;box-sizing:border-box;position:fixed;background:var(--system-background);-webkit-backdrop-filter:blur(50px) saturate(1.5);backdrop-filter:blur(50px) saturate(1.5);width:100%;height:100%;left:0;top:0;color:var(--system-color);display:none;flex-direction:column;transition:all .1s linear;transform:scale(1.2);opacity:0}#cg-launcher:not(.cg-show){pointer-events:none}#cg-launcher.cg-show{transform:scale(1);opacity:1}.cg-launcher-search{text-align:center;padding:50px}.cg-launcher-sinput{-webkit-appearance:none;appearance:none;padding:15px;border:solid 1px rgba(0,0,0,0);background:var(--system-control-background);width:60%;border-radius:5px;color:var(--system-color);transition:all .1s ease-out}.cg-launcher-sinput::placeholder{color:var(--system-placeholder-color)}.cg-launcher-sinput::selection{background-color:var(--system-background-hover)}.cg-launcher-sinput:focus{outline:none;border-color:var(--system-border-color-hover)}.cg-launcher-foldername{-webkit-appearance:none;appearance:none;height:50px;font-size:28px !important;border:none;background:rgba(0,0,0,0);width:50%;color:var(--system-color);text-align:center}.cg-launcher-foldername::selection{background-color:var(--system-background-hover)}.cg-launcher-foldername:focus{outline:none}.cg-launcher-item{width:190px;display:inline-flex;vertical-align:middle;margin-bottom:50px}.cg-launcher-inner{flex:1;width:0}.cg-launcher-icon{background-position:center;background-size:80px;height:80px;background-repeat:no-repeat}.cg-launcher-icon:active{filter:brightness(0.6)}.cg-launcher-name{font-size:13px;font-weight:bold;text-shadow:0 0 3px rgba(0,0,0,.6);text-align:center;margin-top:20px}.cg-launcher-icon,.cg-launcher-name{transition:all .1s linear;transition-property:opacity}.cg-launcher-space{width:50px}.cg-launcher-folder{display:flex;justify-content:center;height:80px}.cg-launcher-folder>div{height:80px;width:80px;background:rgba(255,255,255,.3);border-radius:20px;padding:10px 4px 4px 10px;transition:all .1s linear;transition-property:left,top,width,height,opacity;overflow-y:auto}.cg-launcher-folder>div::-webkit-scrollbar{display:none}.cg-launcher-folder>div .cg-launcher-item,.cg-launcher-folder>div .cg-launcher-space{transition:all .1s linear}.cg-launcher-folder>div.cg-show{padding:50px 0 0 50px}.cg-launcher-folder>div:not(.cg-show):active{filter:brightness(0.6)}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-item{width:22px;margin-bottom:6px}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-icon{background-size:16px;height:16px;pointer-events:none}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-name{display:none}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-space{width:6px}.cg-launcher-list{flex:1;height:0;overflow-y:auto;padding:0 0 0 50px}.cg-launcher-list::-webkit-scrollbar{display:none}.cg-launcher-list.cg-folder-open>.cg-launcher-item>.cg-launcher-inner>.cg-launcher-icon,.cg-launcher-list.cg-folder-open>.cg-launcher-item>.cg-launcher-inner>.cg-launcher-name{opacity:0}.cg-launcher-list.cg-folder-open>.cg-launcher-item>.cg-launcher-inner>.cg-launcher-folder>div:not(.cg-show){opacity:0}[data-cg-pop]{position:absolute;box-shadow:0px 5px 20px rgba(0,0,0,.25);transition:.1s ease-out;transition-property:transform,opacity;transform:translateY(-10px);opacity:0}[data-cg-pop]:not([data-cg-open]){pointer-events:none}[data-cg-pop][data-cg-open]{transform:translateY(0px);opacity:1}#cg-notify{z-index:20020005}.cg-notify-wrap{background:var(--system-background);position:fixed;padding:15px;border-radius:5px;right:0;top:0;width:280px;font-size:14px;display:flex;transition:.1s ease-out;transition-property:transform,opacity;overflow:hidden;color:var(--system-color);box-shadow:0 5px 20px rgba(0,0,0,.25);-webkit-backdrop-filter:blur(50px) saturate(1.5);backdrop-filter:blur(50px) saturate(1.5)}.cg-notify-icon{margin-right:10px;width:16px;height:16px;border-radius:50%}.cg-notify-icon.cg-primary{background:var(--success)}.cg-notify-icon.cg-info{background:var(--info)}.cg-notify-icon.cg-warning{background:var(--warning)}.cg-notify-icon.cg-danger{background:var(--danger)}.cg-notify-icon.cg-progress{background:var(--cg)}.cg-notify-title{font-size:16px;font-weight:bold;padding-bottom:10px}.cg-notify-content{line-height:1.5;word-break:break-word}.cg-notify-progress{position:absolute;bottom:0;left:0;border-radius:1px;background:var(--cg);transition:width 1s ease-out;width:0%;height:2px}#cg-simpletask{left:0;bottom:-46px;width:100%;height:46px;top:initial;background:var(--system-background);-webkit-backdrop-filter:blur(50px) saturate(1.5);backdrop-filter:blur(50px) saturate(1.5);padding:5px 0 5px 5px;display:flex;color:var(--system-color);transition:bottom .1s ease-out;overflow-x:auto;position:fixed}#cg-simpletask::-webkit-scrollbar{display:none}.cg-simpletask-item{background:rgba(0,0,0,.05);border-radius:3px;padding:10px;display:flex;align-items:center;margin-right:5px}.cg-simpletask-item:hover{background:rgba(0,0,0,.1)}.cg-simpletask-item:active{background:rgba(0,0,0,.2)}.cg-simpletask-icon{margin-right:5px;background-size:cover;width:16px;height:16px}#cg-confirm{z-index:20020006;position:fixed;left:0;top:0;width:100%;height:100%;background:var(--system-background);-webkit-backdrop-filter:blur(50px) saturate(1.5);backdrop-filter:blur(50px) saturate(1.5);justify-content:center;align-items:center}#cg-confirm .cg-confirm-box{background:var(--system-background);width:60%;box-shadow:0 5px 20px rgba(0,0,0,.25);font-size:14px;border-radius:3px;overflow:hidden;color:var(--system-color)}#cg-confirm .cg-confirm-box #cg-confirm-content{padding:25px;line-height:1.5}#cg-confirm .cg-confirm-box .cg-confirm-controls{border-top:solid .5px var(--system-border-color);display:flex}#cg-confirm .cg-confirm-box .cg-confirm-controls>div{padding:20px;flex:1;text-align:center}#cg-confirm .cg-confirm-box .cg-confirm-controls>div:last-child{border-left:solid .5px var(--system-border-color)}#cg-confirm .cg-confirm-box .cg-confirm-controls>div:hover{background:var(--system-background-hover)}#cg-confirm .cg-confirm-box .cg-confirm-controls>div:active{background:var(--system-background-active)}
1
+ #cg-wrap{position:fixed;left:0;top:0;--g-padding:7px;--g-margin:2px;--g-radius:0;--cg:hsl(20, 100%, 65%);--success:hsl(150, 100%, 40%);--success-hover:hsl(150, 100%, 45%);--success-active:hsl(150, 100%, 30%);--success-focus:hsl(150, 100%, 35%);--success-disabled:hsl(150, 0%, 40%);--info:hsl(210, 100%, 50%);--info-hover:hsl(210, 100%, 60%);--info-active:hsl(210, 100%, 40%);--info-focus:hsl(210, 100%, 45%);--info-disabled:hsl(210, 0%, 50%);--warning:hsl(20, 100%, 70%);--warning-hover:hsl(20, 100%, 80%);--warning-active:hsl(20, 100%, 60%);--warning-focus:hsl(20, 100%, 65%);--warning-disabled:hsl(20, 0%, 70%);--danger:hsl(350, 100%, 50%);--danger-hover:hsl(350, 100%, 70%);--danger-active:hsl(350, 100%, 40%);--danger-focus:hsl(350, 100%, 45%);--danger-disabled:hsl(350, 0%, 50%);--system-color:hsl(0, 0%, 95%);--system-background:hsla(0, 0%, 0%, .35);--system-control-background:hsla(0, 0%, 100%, .03);--system-background-hover:hsla(0, 0%, 100%, .06);--system-background-active:hsla(0, 0%, 100%, .1);--system-border-color:hsla(0, 0%, 100%, .03);--system-border-color-hover:hsla(0, 0%, 100%, .06);--system-placeholder-color: hsla(0, 0%, 100%, .2);--face:hsl(0, 0%, 95%);--g-color:hsl(0, 0%, 20%);--g-color-hover:hsl(0, 0%, 30%);--g-color-active:hsl(0, 0%, 10%);--g-color-focus:hsl(0, 0%, 15%);--g-color-disabled:hsl(0, 0%, 60%);--g-background:hsl(0, 0%, 95%);--g-background-hover:hsl(0, 0%, 100%);--g-background-active:hsl(0, 0%, 85%);--g-background-kp:hsl(0, 0%, 80%);--g-background-opacity:hsl(0, 0%, 50%, .2);--g-background-focus:hsl(0, 0%, 97.5%);--g-background-disabled:hsl(0, 0%, 75%);--g-border-color:hsl(0, 0%, 40%);--g-border-color-hover:hsl(0, 0%, 50%);--g-border-color-active:hsl(0, 0%, 30%);--g-border-color-focus:hsl(0, 0%, 35%);--g-border-color-disabled:hsl(0, 0%, 60%);--g-focusbox-border-color:var(--g-plain-border-color);--g-plain-color:var(--g-color);--g-plain-color-hover:var(--g-color-hover);--g-plain-color-active:var(--g-color-active);--g-plain-color-focus:var(--g-color-focus);--g-plain-color-disabled:var(--g-color-disabled);--g-plain-background:hsl(0, 0%, 100%);--g-plain-background-hover:hsl(0, 0%, 98%);--g-plain-background-active:hsl(0, 0%, 95%);--g-plain-background-focus:var(--g-plain-background);--g-plain-background-disabled:hsl(0, 0%, 95%);--g-plain-border-color:hsl(0, 0%, 70%);--g-plain-border-color-hover:hsl(0, 0%, 80%);--g-plain-border-color-active:hsl(0, 0%, 60%);--g-plain-border-color-focus:hsl(0, 0%, 65%);--g-plain-border-color-disabled:hsl(0, 0%, 60%)}#cg-form-list{z-index:20020000}#cg-pop-list{z-index:20020001}#cg-simpletask{z-index:20020002}#cg-rectangle{z-index:20020003;box-sizing:border-box;position:absolute;border-radius:3px;box-shadow:0 0 10px rgba(0,0,0,.25);background:rgba(255,255,255,.05);pointer-events:none;opacity:0}#cg-circular{z-index:20020003;box-sizing:border-box;position:absolute;border:solid 3px var(--cg);border-radius:50%;filter:drop-shadow(0 0 3px var(--cg));pointer-events:none;opacity:0}#cg-gesture{z-index:20020003;box-sizing:border-box;position:absolute;border-radius:50%;pointer-events:none;opacity:0;background:var(--system-background);box-shadow:0 5px 20px rgba(0,0,0,.25);transform:scale(0);width:20px;height:20px}#cg-gesture.done{background:rgba(255,255,255,.3);border:solid 3px rgba(0,0,0,.3)}#cg-gesture.ani{transition:all .1s ease-out;transition-property:left,top,transform}#cg-drag{z-index:20020003;box-sizing:border-box;position:absolute;border-radius:3px;pointer-events:none;background:var(--system-background);box-shadow:0 5px 20px rgba(0,0,0,.25);opacity:0;display:flex;justify-content:center;align-items:center}#cg-launcher{z-index:20020004;box-sizing:border-box;position:fixed;background:var(--system-background);-webkit-backdrop-filter:blur(50px) saturate(1.5);backdrop-filter:blur(50px) saturate(1.5);width:100%;height:100%;left:0;top:0;color:var(--system-color);display:none;flex-direction:column;transition:all .1s linear;transform:scale(1.2);opacity:0}#cg-launcher:not(.cg-show){pointer-events:none}#cg-launcher.cg-show{transform:scale(1);opacity:1}.cg-launcher-search{text-align:center;padding:50px}.cg-launcher-sinput{-webkit-appearance:none;appearance:none;padding:15px;border:solid 1px rgba(0,0,0,0);background:var(--system-control-background);width:60%;border-radius:5px;color:var(--system-color);transition:all .1s ease-out}.cg-launcher-sinput::placeholder{color:var(--system-placeholder-color)}.cg-launcher-sinput::selection{background-color:var(--system-background-hover)}.cg-launcher-sinput:focus{outline:none;border-color:var(--system-border-color-hover)}.cg-launcher-foldername{-webkit-appearance:none;appearance:none;height:50px;font-size:28px !important;border:none;background:rgba(0,0,0,0);width:50%;color:var(--system-color);text-align:center}.cg-launcher-foldername::selection{background-color:var(--system-background-hover)}.cg-launcher-foldername:focus{outline:none}.cg-launcher-item{width:190px;display:inline-flex;vertical-align:middle;margin-bottom:50px}.cg-launcher-inner{flex:1;width:0}.cg-launcher-icon{background-position:center;background-size:80px;height:80px;background-repeat:no-repeat}.cg-launcher-icon:active{filter:brightness(0.6)}.cg-launcher-name{font-size:13px;font-weight:bold;text-shadow:0 0 3px rgba(0,0,0,.6);text-align:center;margin-top:20px}.cg-launcher-icon,.cg-launcher-name{transition:all .1s linear;transition-property:opacity}.cg-launcher-space{width:50px}.cg-launcher-folder{display:flex;justify-content:center;height:80px}.cg-launcher-folder>div{height:80px;width:80px;background:rgba(255,255,255,.3);border-radius:20px;padding:10px 4px 4px 10px;transition:all .1s linear;transition-property:left,top,width,height,opacity;overflow-y:auto}.cg-launcher-folder>div::-webkit-scrollbar{display:none}.cg-launcher-folder>div .cg-launcher-item,.cg-launcher-folder>div .cg-launcher-space{transition:all .1s linear}.cg-launcher-folder>div.cg-show{padding:50px 0 0 50px}.cg-launcher-folder>div:not(.cg-show):active{filter:brightness(0.6)}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-item{width:22px;margin-bottom:6px}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-icon{background-size:16px;height:16px;pointer-events:none}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-name{display:none}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-space{width:6px}.cg-launcher-list{flex:1;height:0;overflow-y:auto;padding:0 0 0 50px}.cg-launcher-list::-webkit-scrollbar{display:none}.cg-launcher-list.cg-folder-open>.cg-launcher-item>.cg-launcher-inner>.cg-launcher-icon,.cg-launcher-list.cg-folder-open>.cg-launcher-item>.cg-launcher-inner>.cg-launcher-name{opacity:0}.cg-launcher-list.cg-folder-open>.cg-launcher-item>.cg-launcher-inner>.cg-launcher-folder>div:not(.cg-show){opacity:0}[data-cg-pop]{position:absolute;box-shadow:0px 5px 20px rgba(0,0,0,.25);transition:.1s ease-out;transition-property:transform,opacity;transform:translateY(-10px);opacity:0}[data-cg-pop]:not([data-cg-open]){pointer-events:none}[data-cg-pop][data-cg-open]{transform:translateY(0px);opacity:1}#cg-notify{z-index:20020005}.cg-notify-wrap{background:var(--system-background);position:fixed;padding:15px;border-radius:5px;right:0;top:0;width:280px;font-size:14px;display:flex;transition:.1s ease-out;transition-property:transform,opacity;overflow:hidden;color:var(--system-color);box-shadow:0 5px 20px rgba(0,0,0,.25);-webkit-backdrop-filter:blur(50px) saturate(1.5);backdrop-filter:blur(50px) saturate(1.5)}.cg-notify-icon{margin-right:10px;width:16px;height:16px;border-radius:50%}.cg-notify-icon.cg-primary{background:var(--success)}.cg-notify-icon.cg-info{background:var(--info)}.cg-notify-icon.cg-warning{background:var(--warning)}.cg-notify-icon.cg-danger{background:var(--danger)}.cg-notify-icon.cg-progress{background:var(--cg)}.cg-notify-title{font-size:16px;font-weight:bold;padding-bottom:10px}.cg-notify-content{line-height:1.5;word-break:break-word}.cg-notify-progress{position:absolute;bottom:0;left:0;border-radius:1px;background:var(--cg);transition:width 1s ease-out;width:0%;height:2px}#cg-simpletask{left:0;bottom:-46px;width:100%;height:46px;top:initial;background:var(--system-background);-webkit-backdrop-filter:blur(50px) saturate(1.5);backdrop-filter:blur(50px) saturate(1.5);padding:5px 0 5px 5px;display:flex;color:var(--system-color);transition:bottom .1s ease-out;overflow-x:auto;position:fixed}#cg-simpletask::-webkit-scrollbar{display:none}.cg-simpletask-item{background:rgba(0,0,0,.05);border-radius:3px;padding:10px;display:flex;align-items:center;margin-right:5px}.cg-simpletask-item:hover{background:rgba(0,0,0,.1)}.cg-simpletask-item:active{background:rgba(0,0,0,.2)}.cg-simpletask-icon{margin-right:5px;background-size:cover;width:16px;height:16px}#cg-confirm{z-index:20020006;position:fixed;left:0;top:0;width:100%;height:100%;background:var(--system-background);-webkit-backdrop-filter:blur(150px) saturate(1.5);backdrop-filter:blur(150px) saturate(1.5);justify-content:center;align-items:center}#cg-confirm .cg-confirm-box{background:var(--system-background);width:60%;box-shadow:0 5px 20px rgba(0,0,0,.25);font-size:14px;border-radius:3px;overflow:hidden;color:var(--system-color)}#cg-confirm .cg-confirm-box #cg-confirm-content{padding:25px;line-height:1.5}#cg-confirm .cg-confirm-box .cg-confirm-controls{border-top:solid .5px var(--system-border-color);display:flex}#cg-confirm .cg-confirm-box .cg-confirm-controls>div{padding:20px;flex:1;text-align:center}#cg-confirm .cg-confirm-box .cg-confirm-controls>div:last-child{border-left:solid .5px var(--system-border-color)}#cg-confirm .cg-confirm-box .cg-confirm-controls>div:hover{background:var(--system-background-hover)}#cg-confirm .cg-confirm-box .cg-confirm-controls>div:active{background:var(--system-background-active)}
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.launcher = exports.AbstractBoot = exports.hasFrame = exports.isImmersion = exports.getPlatform = exports.isNative = exports.getVersion = exports.vue = exports.zip = exports.tool = exports.theme = exports.task = exports.native = exports.fs = exports.form = exports.dom = exports.core = exports.control = exports.clickgo = void 0;
12
+ exports.launcher = exports.AbstractBoot = exports.hasFrame = exports.isImmersion = exports.getPlatform = exports.isNative = exports.getVersion = exports.vue = exports.zip = exports.tool = exports.theme = exports.task = exports.storage = exports.native = exports.fs = exports.form = exports.dom = exports.core = exports.control = exports.clickgo = void 0;
13
13
  function getVersion() {
14
14
  return exports.clickgo.getVersion();
15
15
  }
@@ -73,6 +73,9 @@ class AbstractBoot {
73
73
  onFormShowInSystemTaskChange() {
74
74
  return;
75
75
  }
76
+ onFormHashChange() {
77
+ return;
78
+ }
76
79
  onTaskStarted() {
77
80
  return;
78
81
  }
package/dist/index.ts CHANGED
@@ -9,6 +9,7 @@ export let dom: typeof import('./lib/dom');
9
9
  export let form: typeof import('./lib/form');
10
10
  export let fs: typeof import('./lib/fs');
11
11
  export let native: typeof import('./lib/native');
12
+ export let storage: typeof import('./lib/storage');
12
13
  export let task: typeof import('./lib/task');
13
14
  export let theme: typeof import('./lib/theme');
14
15
  export let tool: typeof import('./lib/tool');
@@ -127,6 +128,12 @@ export abstract class AbstractBoot {
127
128
  return;
128
129
  }
129
130
 
131
+ /** --- 窗体的 formHash 改变事件 --- */
132
+ public onFormHashChange(taskId: number, formId: number, value: string): void | Promise<void>;
133
+ public onFormHashChange(): void {
134
+ return;
135
+ }
136
+
130
137
  /** --- 任务开始事件 --- */
131
138
  public onTaskStarted(taskId: number): void | Promise<void>;
132
139
  public onTaskStarted(): void | Promise<void> {
package/dist/lib/core.js CHANGED
@@ -118,6 +118,9 @@ class AbstractApp {
118
118
  onFormShowInSystemTaskChange() {
119
119
  return;
120
120
  }
121
+ onFormHashChange() {
122
+ return;
123
+ }
121
124
  onTaskStarted() {
122
125
  return;
123
126
  }
@@ -342,7 +345,7 @@ const globalEvents = {
342
345
  }
343
346
  };
344
347
  function trigger(name, taskId = 0, formId = 0, param1 = '', param2 = '', param3 = true) {
345
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20;
348
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25;
346
349
  const eventName = 'on' + name[0].toUpperCase() + name.slice(1);
347
350
  switch (name) {
348
351
  case 'error': {
@@ -451,15 +454,27 @@ function trigger(name, taskId = 0, formId = 0, param1 = '', param2 = '', param3
451
454
  }
452
455
  break;
453
456
  }
457
+ case 'formHashChange': {
458
+ (_11 = (_10 = globalEvents)[name]) === null || _11 === void 0 ? void 0 : _11.call(_10, taskId, formId, param1);
459
+ exports.boot === null || exports.boot === void 0 ? void 0 : exports.boot[eventName](taskId, formId, param1);
460
+ for (const tid in task.list) {
461
+ const t = task.list[tid];
462
+ (_12 = t.class) === null || _12 === void 0 ? void 0 : _12[eventName](taskId, formId, param1);
463
+ for (const fid in t.forms) {
464
+ (_14 = (_13 = t.forms[fid].vroot)[eventName]) === null || _14 === void 0 ? void 0 : _14.call(_13, taskId, formId, param1);
465
+ }
466
+ }
467
+ break;
468
+ }
454
469
  case 'taskStarted':
455
470
  case 'taskEnded': {
456
- (_11 = (_10 = globalEvents)[name]) === null || _11 === void 0 ? void 0 : _11.call(_10, taskId, formId);
471
+ (_16 = (_15 = globalEvents)[name]) === null || _16 === void 0 ? void 0 : _16.call(_15, taskId, formId);
457
472
  exports.boot === null || exports.boot === void 0 ? void 0 : exports.boot[eventName](taskId, formId);
458
473
  for (const tid in task.list) {
459
474
  const t = task.list[tid];
460
- (_12 = t.class) === null || _12 === void 0 ? void 0 : _12[eventName](taskId);
475
+ (_17 = t.class) === null || _17 === void 0 ? void 0 : _17[eventName](taskId);
461
476
  for (const fid in t.forms) {
462
- (_14 = (_13 = t.forms[fid].vroot)[eventName]) === null || _14 === void 0 ? void 0 : _14.call(_13, taskId);
477
+ (_19 = (_18 = t.forms[fid].vroot)[eventName]) === null || _19 === void 0 ? void 0 : _19.call(_18, taskId);
463
478
  }
464
479
  }
465
480
  break;
@@ -474,9 +489,9 @@ function trigger(name, taskId = 0, formId = 0, param1 = '', param2 = '', param3
474
489
  exports.boot === null || exports.boot === void 0 ? void 0 : exports.boot[eventName](taskId, formId);
475
490
  for (const tid in task.list) {
476
491
  const t = task.list[tid];
477
- (_15 = t.class) === null || _15 === void 0 ? void 0 : _15[eventName](taskId, formId);
492
+ (_20 = t.class) === null || _20 === void 0 ? void 0 : _20[eventName](taskId, formId);
478
493
  for (const fid in t.forms) {
479
- (_17 = (_16 = t.forms[fid].vroot)[eventName]) === null || _17 === void 0 ? void 0 : _17.call(_16, taskId, formId);
494
+ (_22 = (_21 = t.forms[fid].vroot)[eventName]) === null || _22 === void 0 ? void 0 : _22.call(_21, taskId, formId);
480
495
  }
481
496
  }
482
497
  break;
@@ -488,9 +503,9 @@ function trigger(name, taskId = 0, formId = 0, param1 = '', param2 = '', param3
488
503
  exports.boot === null || exports.boot === void 0 ? void 0 : exports.boot[eventName](taskId);
489
504
  for (const tid in task.list) {
490
505
  const t = task.list[tid];
491
- (_18 = t.class) === null || _18 === void 0 ? void 0 : _18[eventName](taskId);
506
+ (_23 = t.class) === null || _23 === void 0 ? void 0 : _23[eventName](taskId);
492
507
  for (const fid in t.forms) {
493
- (_20 = (_19 = t.forms[fid].vroot)[eventName]) === null || _20 === void 0 ? void 0 : _20.call(_19, taskId);
508
+ (_25 = (_24 = t.forms[fid].vroot)[eventName]) === null || _25 === void 0 ? void 0 : _25.call(_24, taskId);
494
509
  }
495
510
  }
496
511
  break;
package/dist/lib/core.ts CHANGED
@@ -163,6 +163,12 @@ export abstract class AbstractApp {
163
163
  return;
164
164
  }
165
165
 
166
+ /** --- 窗体的 formHash 改变事件 --- */
167
+ public onFormHashChange(taskId: number, formId: number, value: string): void | Promise<void>;
168
+ public onFormHashChange(): void {
169
+ return;
170
+ }
171
+
166
172
  /** --- 任务开始事件 --- */
167
173
  public onTaskStarted(taskId: number): void | Promise<void>;
168
174
  public onTaskStarted(): void | Promise<void> {
@@ -533,6 +539,18 @@ export function trigger(name: types.TGlobalEvent, taskId: number | string | bool
533
539
  }
534
540
  break;
535
541
  }
542
+ case 'formHashChange': {
543
+ (globalEvents as any)[name]?.(taskId, formId, param1);
544
+ (boot as any)?.[eventName](taskId, formId, param1);
545
+ for (const tid in task.list) {
546
+ const t = task.list[tid];
547
+ (t.class as any)?.[eventName](taskId, formId, param1);
548
+ for (const fid in t.forms) {
549
+ t.forms[fid].vroot[eventName]?.(taskId, formId, param1);
550
+ }
551
+ }
552
+ break;
553
+ }
536
554
  case 'taskStarted':
537
555
  case 'taskEnded': {
538
556
  (globalEvents as any)[name]?.(taskId, formId);