@cpzxrobot/sdk 1.3.91 → 1.3.92
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/dist/mobile_platform.js +3 -0
- package/dist/web_platform.js +6 -0
- package/dist/windows_platform.js +3 -0
- package/mobile_platform.ts +5 -0
- package/package.json +1 -1
- package/platform_interface.ts +2 -0
- package/web_platform.ts +6 -0
- package/windows_platform.ts +3 -0
package/dist/mobile_platform.js
CHANGED
|
@@ -20,6 +20,9 @@ class MobilePlatform {
|
|
|
20
20
|
// @ts-ignore
|
|
21
21
|
this.platform = window.flutter_inappwebview;
|
|
22
22
|
}
|
|
23
|
+
openFactorySelector() {
|
|
24
|
+
throw new Error("Method not implemented.");
|
|
25
|
+
}
|
|
23
26
|
addMessage(message) {
|
|
24
27
|
if (message.id != undefined) {
|
|
25
28
|
const callback = this.sseCallbacks[message.id];
|
package/dist/web_platform.js
CHANGED
|
@@ -21,6 +21,12 @@ class WebPlatform {
|
|
|
21
21
|
this._defaultSelectedFarm = selectedFarm;
|
|
22
22
|
this._defaultSelectedUnit = selectedUnit;
|
|
23
23
|
}
|
|
24
|
+
openFactorySelector() {
|
|
25
|
+
//call open function of factory-selector
|
|
26
|
+
var factorySelector = document.getElementById("cpzxrobot-factory-selector");
|
|
27
|
+
//@ts-ignore
|
|
28
|
+
factorySelector.open();
|
|
29
|
+
}
|
|
24
30
|
addMessage(_message) {
|
|
25
31
|
throw new Error("Method not implemented.");
|
|
26
32
|
}
|
package/dist/windows_platform.js
CHANGED
|
@@ -18,6 +18,9 @@ class WindwosMiniAppPlatform {
|
|
|
18
18
|
this.appCode = "";
|
|
19
19
|
this.baseURL = "";
|
|
20
20
|
}
|
|
21
|
+
openFactorySelector() {
|
|
22
|
+
throw new Error("Method not implemented.");
|
|
23
|
+
}
|
|
21
24
|
addMessage(message) {
|
|
22
25
|
if (message.id != undefined) {
|
|
23
26
|
const callback = this.sseCallbacks[message.id];
|
package/mobile_platform.ts
CHANGED
|
@@ -16,6 +16,11 @@ export class MobilePlatform implements PlatformInterface {
|
|
|
16
16
|
this.platform = window.flutter_inappwebview;
|
|
17
17
|
|
|
18
18
|
}
|
|
19
|
+
|
|
20
|
+
openFactorySelector(): void {
|
|
21
|
+
throw new Error("Method not implemented.");
|
|
22
|
+
}
|
|
23
|
+
|
|
19
24
|
addMessage(message: any): void {
|
|
20
25
|
if (message.id != undefined) {
|
|
21
26
|
const callback = this.sseCallbacks[message.id];
|
package/package.json
CHANGED
package/platform_interface.ts
CHANGED
|
@@ -31,4 +31,6 @@ export abstract class PlatformInterface {
|
|
|
31
31
|
abstract ready(): Promise<boolean>;
|
|
32
32
|
abstract setSelectedUnit(unit: Unit | String | Number): void;
|
|
33
33
|
abstract setSelectedFarm(farm: Factory | String | Number): void;
|
|
34
|
+
//change factory
|
|
35
|
+
abstract openFactorySelector():void;
|
|
34
36
|
}
|
package/web_platform.ts
CHANGED
|
@@ -18,6 +18,12 @@ export class WebPlatform implements PlatformInterface {
|
|
|
18
18
|
this._defaultSelectedFarm = selectedFarm;
|
|
19
19
|
this._defaultSelectedUnit = selectedUnit;
|
|
20
20
|
}
|
|
21
|
+
openFactorySelector() {
|
|
22
|
+
//call open function of factory-selector
|
|
23
|
+
var factorySelector = document.getElementById("cpzxrobot-factory-selector");
|
|
24
|
+
//@ts-ignore
|
|
25
|
+
factorySelector.open();
|
|
26
|
+
}
|
|
21
27
|
addMessage(_message: any): void {
|
|
22
28
|
throw new Error("Method not implemented.");
|
|
23
29
|
}
|
package/windows_platform.ts
CHANGED