diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/main.js b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/main.js
index 55f8cf3..ef9efcb 100755
--- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/main.js
+++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/main.js
@@ -3485,7 +3485,7 @@ https://github.com/Tencent/APIJSON/issues
}
configs.push(config)
- config2 = StringUtil.trim(this.newRandomConfig(null, '', req, true))
+ var config2 = StringUtil.trim(this.newRandomConfig(null, '', req, true))
if (StringUtil.isNotEmpty(config2, true)) {
configs.push(config2)
}
diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/ui/apijson/EditTextEvent.js b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/ui/apijson/EditTextEvent.js
index eaf41b6..a08ecf9 100644
--- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/ui/apijson/EditTextEvent.js
+++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/ui/apijson/EditTextEvent.js
@@ -1,313 +1,346 @@
-class EditTextEvent extends KeyboardEvent {
- constructor(type, eventInitDict) {
- super(type, eventInitDict);
- if (eventInitDict != null) {
- this.init(eventInitDict.target, eventInitDict.when, eventInitDict.text, eventInitDict.selectStart
- , eventInitDict.selectEnd, eventInitDict.s, eventInitDict.start, eventInitDict.count, eventInitDict.after
- )
- }
- }
+/*Copyright ©2021 TommyLemon(https://github.com/TommyLemon/UIGO)
- init(target, when, text, selectStart, selectEnd, s, start, count, after) {
- this.target = target;
- this.targetId = target == null ? '' : target.id;
- this.when = when;
- this.text = text;
- this.selectStart = selectStart;
- this.selectEnd = selectEnd;
- this.s = s;
- this.start = start;
- this.count = count;
- this.after = after;
- }
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use StringUtil file except in compliance with the License.
+ You may obtain a copy of the License at
- static WHEN_BEFORE = -1;
- static WHEN_ON = 0;
- static WHEN_AFTER = 1;
-
- getWhenName(when) {
- switch (when) {
- case EditTextEvent.WHEN_BEFORE:
- return "BEFORE";
- case EditTextEvent.WHEN_AFTER:
- return "AFTER";
- default:
- return "ON";
- }
- }
-
- text = '';
- getText() {
- if (this.text == null) {
- this.text = StringUtil.get(this.getS()); // target 文本在变,不稳定 StringUtil.getString(target == null ? getS() : target.getText());
- }
- return this.text;
- }
-
- selectStart = 0;
- getSelectStart() {
- return this.selectStart;
- }
-
- selectEnd = 0;
- getSelectEnd() {
- return this.selectEnd;
- }
-
- getTarget() {
- var app = recorder;
- if (this.target == null) {
- this.target = app.findView(this.targetIdName);
- }
- if (this.target == null || this.target.isHidden) {
- this.target = app.findView(this.targetId);
- }
- if (this.target == null) {
- this.target = app.findViewByFocus(app.view, Text);
- }
- return this.target;
- }
- targetId = '';
- getTargetId() {
- if (this.targetId <= 0) {
- this.target = this.getTarget();
- this.targetId = this.target == null ? this.targetId : this.target.id;
- }
- return this.targetId;
- }
-
- x = null;
- y = null;
- getX() {
- return this.x;
- }
- setX(x) {
- this.x = x;
- }
- getY() {
- return this.y;
- }
- setY(y) {
- this.y = y;
- }
-
- when = 0;
- getWhen() {
- return when;
- }
- getS() {
- return this.text;
- }
-
-
- start = 0;
- getStart() {
- return this.start;
- }
-
- count = 0;
- getCount() {
- return this.count;
- }
-
- after = 0;
- getAfter() {
- return this.after;
- }
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.*/
+/**Android EditTextEvent extends KeyEvent
+ * @author Lemon
+ */
+if (typeof window == 'undefined') {
+ try {
+ eval(`
+ var StringUtil = require("./StringUtil");
+ `)
+ } catch (e) {
+ console.log(e)
+ }
}
-// const EditTextEvent = {
-// WHEN_BEFORE: -1,
-// WHEN_ON: 0,
-// WHEN_AFTER: 1,
-// target: null,
-// getWhenName: function (when) {
-// switch (when) {
-// case this.WHEN_BEFORE:
-// return "BEFORE";
-// case this.WHEN_AFTER:
-// return "AFTER";
-// default:
-// return "ON";
-// }
-// },
+//var EditTextEvent = {
+// constructor(type, eventInitDict) {
+// super(type, eventInitDict);
+// if (eventInitDict != null) {
+// this.init(eventInitDict.target, eventInitDict.when, eventInitDict.text, eventInitDict.selectStart
+// , eventInitDict.selectEnd, eventInitDict.s, eventInitDict.start, eventInitDict.count, eventInitDict.after
+// )
+// }
+// }
+//
+// init(target, when, text, selectStart, selectEnd, s, start, count, after) {
+// this.target = target;
+// this.targetId = target == null ? '' : target.id;
+// this.when = when;
+// this.text = text;
+// this.selectStart = selectStart;
+// this.selectEnd = selectEnd;
+// this.s = s;
+// this.start = start;
+// this.count = count;
+// this.after = after;
+// }
//
-// text: "",
-// getText: function () {
-// if (this.text == null) {
-// this.text =StringUtil.get(this.getS()); // target 文本在变,不稳定 StringUtil.get(target == null ? getS() : target.getText()),
-// }
-// return this.text;
-// },
+// static WHEN_BEFORE = -1;
+// static WHEN_ON = 0;
+// static WHEN_AFTER = 1;
//
-// selectStart: null,
-// getSelectStart() {
-// return this.selectStart;
-// },
+// getWhenName(when) {
+// switch (when) {
+// case EditTextEvent.WHEN_BEFORE:
+// return "BEFORE";
+// case EditTextEvent.WHEN_AFTER:
+// return "AFTER";
+// default:
+// return "ON";
+// }
+// }
//
-// selectEnd: null,
-// getSelectEnd() {
-// return this.selectEnd;
-// },
+// text = '';
+// getText() {
+// if (this.text == null) {
+// this.text = StringUtil.get(this.getS()); // target 文本在变,不稳定 StringUtil.getString(target == null ? getS() : target.getText());
+// }
+// return this.text;
+// }
//
-// getTarget: function () {
-// var app = UIAutoApp.getInstance(); // FIXME
-// var isWeb = StringUtil.isNotEmpty(this.targetWebId, true);
-// if (this.target == null && isWeb) {
-// this.target = app.findView(this.targetWebId);
-// }
-// if (this.target == null || (isWeb == false && this.target.isAttachedToWindow() == false)) {
-// this.target = app.findView(this.targetId);
-// }
-// if (this.target == null) { // FIXME
-// this.target = app.findViewByFocus(app.getCurrentDecorView(), EditText.class);
-// }
-// return this.target;
-// },
-// targetId: null,
-// getTargetId: function () {
-// if (this.targetId <= 0) {
-// this.target = this.getTarget();
-// this.targetId = this.target == null ? this.targetId : this.target.id;
-// }
-// return this.targetId;
-// },
+// selectStart = 0;
+// getSelectStart() {
+// return this.selectStart;
+// }
//
-// targetWebId: null,
-// getTargetWebId: function () {
-// return this.targetWebId;
-// },
-// setTargetWebId(targetWebId) {
-// this.targetWebId = targetWebId;
-// },
+// selectEnd = 0;
+// getSelectEnd() {
+// return this.selectEnd;
+// }
//
-// x: null,
-// y: null,
-// getX() {
-// return this.x;
-// },
-// setX: function (x) {
-// this.x = x;
-// },
-// getY: function () {
-// return this.y;
-// },
-// setY: function (y) {
-// this.y = y;
-// },
+// getTarget() {
+// var app = recorder;
+// if (this.target == null) {
+// this.target = app.findView(this.targetIdName);
+// }
+// if (this.target == null || this.target.isHidden) {
+// this.target = app.findView(this.targetId);
+// }
+// if (this.target == null) {
+// this.target = app.findViewByFocus(app.view, Text);
+// }
+// return this.target;
+// }
+// targetId = '';
+// getTargetId() {
+// if (this.targetId <= 0) {
+// this.target = this.getTarget();
+// this.targetId = this.target == null ? this.targetId : this.target.id;
+// }
+// return this.targetId;
+// }
//
-// when: 0,
-// getWhen() {
-// return this.when;
-// },
+// x = null;
+// y = null;
+// getX() {
+// return this.x;
+// }
+// setX(x) {
+// this.x = x;
+// }
+// getY() {
+// return this.y;
+// }
+// setY(y) {
+// this.y = y;
+// }
//
-// s: "",
-// getS: function () {
-// return this.s;
-// },
+// when = 0;
+// getWhen() {
+// return when;
+// }
+// getS() {
+// return this.text;
+// }
//
-// start: null,
-// getStart() {
-// return this.start;
-// },
//
-// count: null,
-// getCount() {
-// return this.count;
-// },
+// start = 0;
+// getStart() {
+// return this.start;
+// }
//
-// after: null,
-// getAfter() {
-// return this.after;
-// },
+// count = 0;
+// getCount() {
+// return this.count;
+// }
//
-// // New(action, code) {
-// // super(action, code),
-// // }
-// //
-// // EditTextEvent(long downTime, long eventTime, action,
-// // code, repeat) {
-// // super(downTime, eventTime, action, code, repeat),
-// // }
-// //
-// // EditTextEvent(long downTime, long eventTime, action,
-// // code, repeat, metaState) {
-// // super(downTime, eventTime, action, code, repeat, metaState),
-// // }
-// //
-// // EditTextEvent(long downTime, long eventTime, action,
-// // code, repeat, metaState,
-// // deviceId, scancode) {
-// // super(downTime, eventTime, action, code, repeat, metaState, deviceId, scancode),
-// // }
-// //
-// // EditTextEvent(long downTime, long eventTime, action,
-// // code, repeat, metaState,
-// // deviceId, scancode, flags) {
-// // super(downTime, eventTime, action, code, repeat, metaState, deviceId, scancode, flags),
-// // }
-// //
-// // EditTextEvent(long downTime, long eventTime, action,
-// // code, repeat, metaState,
-// // deviceId, scancode, flags, source) {
-// // super(downTime, eventTime, action, code, repeat, metaState, deviceId, scancode, flags, source),
-// // }
-// //
-// // EditTextEvent(long time, characters, deviceId, flags) {
-// // super(time, characters, deviceId, flags),
-// // }
-// //
-// // EditTextEvent(KeyEvent origEvent) {
-// // super(origEvent),
-// // }
-// //
-// // EditTextEvent(action, code, target, when, text, selectStart, selectEnd, s) {
-// // super(System.currentTimeMillis(), System.currentTimeMillis(), action, code, 0),
-// // init(target, when, text, selectStart, selectEnd, s),
-// // }
-// // EditTextEvent(action, code, target, when, text, selectStart, selectEnd, s, start, count) {
-// // super(System.currentTimeMillis(), System.currentTimeMillis(), action, code, 0),
-// // init(target, when, text, selectStart, selectEnd, s, start, count),
-// // }
-// // EditTextEvent(action, code, target, when, text, selectStart, selectEnd, s, start, count, after) {
-// // super(System.currentTimeMillis(), System.currentTimeMillis(), action, code, 0),
-// // init(target, when, text, selectStart, selectEnd, s, start, count, after),
-// // }
-// // EditTextEvent(long downTime, long eventTime, action, code, repeat
-// // , target, when, text, selectStart, selectEnd, s, start, count, after) {
-// // super(downTime, eventTime, action, code, repeat),
-// // init(target, when, text, selectStart, selectEnd, s, start, count, after),
-// // }
-// // EditTextEvent(
-// // long downTime, long eventTime, action
-// // , code, repeat, metaState
-// // , deviceId, scancode, flags, source
-// // , target, when, text, selectStart, selectEnd, s, start, count, after
-// // ) {
-// // super(downTime, eventTime, action, code, repeat, metaState, deviceId, scancode, flags, source),
-// // init(target, when, text, selectStart, selectEnd, s, start, count, after),
-// // }
+// after = 0;
+// getAfter() {
+// return this.after;
+// }
//
-// // init: function (target, when, text, selectStart, selectEnd, s) {
-// // this.init(target, when, text, selectStart, selectEnd, s, 0, 0, 0);
-// // },
-// // init: function (target, when, text, selectStart, selectEnd, s, start, count) {
-// // this.init(target, when, text, selectStart, selectEnd, s, start, count, 0);
-// // },
-// init: function (target, when, text, selectStart, selectEnd, s, start, count, after) {
-// this.target = target;
-// this.targetId = target == null ? -1 : target.id;
-// this.when = when;
-// this.text = text;
-// this.selectStart = selectStart;
-// this.selectEnd = selectEnd;
-// this.s = s;
-// this.start = start;
-// this.count = count;
-// this.after = after;
-// }
+//
+//}
+
+
+const EditTextEvent = {
+ WHEN_BEFORE: -1,
+ WHEN_ON: 0,
+ WHEN_AFTER: 1,
+ target: null,
+ getWhenName: function (when) {
+ switch (when) {
+ case EditTextEvent.WHEN_BEFORE:
+ return "BEFORE";
+ case EditTextEvent.WHEN_AFTER:
+ return "AFTER";
+ default:
+ return "ON";
+ }
+ },
+
+ text: "",
+ getText: function () {
+ if (EditTextEvent.text == null) {
+ EditTextEvent.text = StringUtil.get(EditTextEvent.getS()); // target 文本在变,不稳定 StringUtil.get(target == null ? getS() : target.getText()),
+ }
+ return EditTextEvent.text;
+ },
+
+ selectStart: null,
+ getSelectStart: function() {
+ return EditTextEvent.selectStart;
+ },
+
+ selectEnd: null,
+ getSelectEnd: function() {
+ return EditTextEvent.selectEnd;
+ },
+
+ getTarget: function () {
+ // var app = UIAutoApp.getInstance(); // FIXME
+ // var isWeb = StringUtil.isNotEmpty(EditTextEvent.targetWebId, true);
+ // if (EditTextEvent.target == null && isWeb) {
+ // EditTextEvent.target = app.findView(EditTextEvent.targetWebId);
+ // }
+ // if (EditTextEvent.target == null || (isWeb == false && EditTextEvent.target.isAttachedToWindow() == false)) {
+ // EditTextEvent.target = app.findView(EditTextEvent.targetId);
+ // }
+ // if (EditTextEvent.target == null) { // FIXME
+ // EditTextEvent.target = app.findViewByFocus(app.getCurrentDecorView(), EditText.class);
+ // }
+ return EditTextEvent.target;
+ },
+ targetId: null,
+ getTargetId: function () {
+ if (EditTextEvent.targetId <= 0) {
+ EditTextEvent.target = EditTextEvent.getTarget();
+ EditTextEvent.targetId = EditTextEvent.target == null ? EditTextEvent.targetId : EditTextEvent.target.id;
+ }
+ return EditTextEvent.targetId;
+ },
+
+ targetWebId: null,
+ getTargetWebId: function () {
+ return EditTextEvent.targetWebId;
+ },
+ setTargetWebId(targetWebId) {
+ EditTextEvent.targetWebId = targetWebId;
+ },
+
+ x: null,
+ y: null,
+ getX: function() {
+ return EditTextEvent.x;
+ },
+ setX: function (x) {
+ EditTextEvent.x = x;
+ },
+ getY: function () {
+ return EditTextEvent.y;
+ },
+ setY: function (y) {
+ EditTextEvent.y = y;
+ },
+
+ when: 0,
+ getWhen: function() {
+ return EditTextEvent.when;
+ },
+
+ s: "",
+ getS: function () {
+ return EditTextEvent.s;
+ },
+
+ start: null,
+ getStart: function() {
+ return EditTextEvent.start;
+ },
+
+ count: null,
+ getCount: function() {
+ return EditTextEvent.count;
+ },
+
+ after: null,
+ getAfter: function() {
+ return EditTextEvent.after;
+ },
+
+ // New(action, code) {
+ // super(action, code),
+ // }
+ //
+ // EditTextEvent(long downTime, long eventTime, action,
+ // code, repeat) {
+ // super(downTime, eventTime, action, code, repeat),
+ // }
+ //
+ // EditTextEvent(long downTime, long eventTime, action,
+ // code, repeat, metaState) {
+ // super(downTime, eventTime, action, code, repeat, metaState),
+ // }
+ //
+ // EditTextEvent(long downTime, long eventTime, action,
+ // code, repeat, metaState,
+ // deviceId, scancode) {
+ // super(downTime, eventTime, action, code, repeat, metaState, deviceId, scancode),
+ // }
+ //
+ // EditTextEvent(long downTime, long eventTime, action,
+ // code, repeat, metaState,
+ // deviceId, scancode, flags) {
+ // super(downTime, eventTime, action, code, repeat, metaState, deviceId, scancode, flags),
+ // }
+ //
+ // EditTextEvent(long downTime, long eventTime, action,
+ // code, repeat, metaState,
+ // deviceId, scancode, flags, source) {
+ // super(downTime, eventTime, action, code, repeat, metaState, deviceId, scancode, flags, source),
+ // }
+ //
+ // EditTextEvent(long time, characters, deviceId, flags) {
+ // super(time, characters, deviceId, flags),
+ // }
+ //
+ // EditTextEvent(KeyEvent origEvent) {
+ // super(origEvent),
+ // }
+ //
+ // EditTextEvent(action, code, target, when, text, selectStart, selectEnd, s) {
+ // super(System.currentTimeMillis(), System.currentTimeMillis(), action, code, 0),
+ // init(target, when, text, selectStart, selectEnd, s),
+ // }
+ // EditTextEvent(action, code, target, when, text, selectStart, selectEnd, s, start, count) {
+ // super(System.currentTimeMillis(), System.currentTimeMillis(), action, code, 0),
+ // init(target, when, text, selectStart, selectEnd, s, start, count),
+ // }
+ // EditTextEvent(action, code, target, when, text, selectStart, selectEnd, s, start, count, after) {
+ // super(System.currentTimeMillis(), System.currentTimeMillis(), action, code, 0),
+ // init(target, when, text, selectStart, selectEnd, s, start, count, after),
+ // }
+ // EditTextEvent(long downTime, long eventTime, action, code, repeat
+ // , target, when, text, selectStart, selectEnd, s, start, count, after) {
+ // super(downTime, eventTime, action, code, repeat),
+ // init(target, when, text, selectStart, selectEnd, s, start, count, after),
+ // }
+ // EditTextEvent(
+ // long downTime, long eventTime, action
+ // , code, repeat, metaState
+ // , deviceId, scancode, flags, source
+ // , target, when, text, selectStart, selectEnd, s, start, count, after
+ // ) {
+ // super(downTime, eventTime, action, code, repeat, metaState, deviceId, scancode, flags, source),
+ // init(target, when, text, selectStart, selectEnd, s, start, count, after),
+ // }
+
+ // init: function (target, when, text, selectStart, selectEnd, s) {
+ // EditTextEvent.init(target, when, text, selectStart, selectEnd, s, 0, 0, 0);
+ // },
+ // init: function (target, when, text, selectStart, selectEnd, s, start, count) {
+ // EditTextEvent.init(target, when, text, selectStart, selectEnd, s, start, count, 0);
+ // },
+ init: function (target, when, text, selectStart, selectEnd, s, start, count, after) {
+ EditTextEvent.target = target;
+ EditTextEvent.targetId = target == null ? -1 : target.id;
+ EditTextEvent.when = when;
+ EditTextEvent.text = text;
+ EditTextEvent.selectStart = selectStart;
+ EditTextEvent.selectEnd = selectEnd;
+ EditTextEvent.s = s;
+ EditTextEvent.start = start;
+ EditTextEvent.count = count;
+ EditTextEvent.after = after;
+ }
+
+}
-// }
+if (typeof module == 'object') {
+ module.exports = EditTextEvent;
+}
\ No newline at end of file
diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/ui/index.html b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/ui/index.html
index c8aca40..7f80449 100755
--- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/ui/index.html
+++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/ui/index.html
@@ -662,6 +662,7 @@
+