@cpzxrobot/sdk 1.2.46 → 1.2.47
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/camera_gateway.ts +1 -1
- package/car_gateway.ts +1 -1
- package/chickenfarm_gateway.ts +1 -1
- package/device_filter.ts +1 -1
- package/device_type_gateway.ts +1 -1
- package/device_types/feedtower.ts +2 -2
- package/device_types/normal_type.ts +1 -1
- package/dist/index.js +17 -16
- package/factory_gateway.ts +1 -1
- package/index.ts +17 -16
- package/package.json +1 -1
- package/pigfarm_gateway.ts +7 -7
- package/transport_gateway.ts +1 -1
- package/unit_gateway.ts +1 -1
- package/user_gateway.ts +1 -1
package/camera_gateway.ts
CHANGED
package/car_gateway.ts
CHANGED
package/chickenfarm_gateway.ts
CHANGED
package/device_filter.ts
CHANGED
package/device_type_gateway.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -392,22 +392,23 @@ class Cpzxrobot {
|
|
|
392
392
|
}
|
|
393
393
|
this.resolveReady(this.axios);
|
|
394
394
|
});
|
|
395
|
-
//load www.cpzxrobot.com/web_components.js as web components
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
//
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
//
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
395
|
+
// load www.cpzxrobot.com/web_components.js as web components
|
|
396
|
+
const script = document.createElement("script");
|
|
397
|
+
script.src = "https://www.cpzxrobot.com/webc/factory_selector.js";
|
|
398
|
+
document.body.appendChild(script);
|
|
399
|
+
//insert cpzxrobot_factory_selector into body
|
|
400
|
+
const div = document.createElement("cpzxrobot_factory_selector");
|
|
401
|
+
div.setAttribute("selector-style", "float-button");
|
|
402
|
+
document.body.appendChild(div);
|
|
403
|
+
//register onUnitChanged and onFactoryChanged on div
|
|
404
|
+
div.addEventListener("unitChanged", function (e) {
|
|
405
|
+
// @ts-ignore
|
|
406
|
+
window._notifyUnitChanged(e.detail);
|
|
407
|
+
});
|
|
408
|
+
div.addEventListener("factoryChanged", function (e) {
|
|
409
|
+
// @ts-ignore
|
|
410
|
+
window._notifyFactoryChanged(e.detail);
|
|
411
|
+
});
|
|
411
412
|
return;
|
|
412
413
|
}
|
|
413
414
|
else {
|
package/factory_gateway.ts
CHANGED
package/index.ts
CHANGED
|
@@ -443,22 +443,23 @@ export class Cpzxrobot {
|
|
|
443
443
|
}
|
|
444
444
|
this.resolveReady(this.axios);
|
|
445
445
|
});
|
|
446
|
-
//load www.cpzxrobot.com/web_components.js as web components
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
//
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
//
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
446
|
+
// load www.cpzxrobot.com/web_components.js as web components
|
|
447
|
+
const script = document.createElement("script");
|
|
448
|
+
script.src = "https://www.cpzxrobot.com/webc/factory_selector.js";
|
|
449
|
+
document.body.appendChild(script);
|
|
450
|
+
//insert cpzxrobot_factory_selector into body
|
|
451
|
+
const div = document.createElement("cpzxrobot_factory_selector");
|
|
452
|
+
div.setAttribute("selector-style","float-button")
|
|
453
|
+
document.body.appendChild(div);
|
|
454
|
+
//register onUnitChanged and onFactoryChanged on div
|
|
455
|
+
div.addEventListener("unitChanged", function (e: any) {
|
|
456
|
+
// @ts-ignore
|
|
457
|
+
window._notifyUnitChanged(e.detail);
|
|
458
|
+
});
|
|
459
|
+
div.addEventListener("factoryChanged", function (e: any) {
|
|
460
|
+
// @ts-ignore
|
|
461
|
+
window._notifyFactoryChanged(e.detail);
|
|
462
|
+
});
|
|
462
463
|
return;
|
|
463
464
|
} else {
|
|
464
465
|
//if url has access_token and app_code, use it
|
package/package.json
CHANGED
package/pigfarm_gateway.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Cpzxrobot,
|
|
3
|
-
DeviceConfig,
|
|
4
|
-
Factory,
|
|
5
|
-
HeatLamp,
|
|
6
|
-
Unit,
|
|
7
|
-
WeightMeter,
|
|
8
|
-
WeightMeterSensor,
|
|
9
|
-
weightMeterSensorsConfig,
|
|
3
|
+
type DeviceConfig,
|
|
4
|
+
type Factory,
|
|
5
|
+
type HeatLamp,
|
|
6
|
+
type Unit,
|
|
7
|
+
type WeightMeter,
|
|
8
|
+
type WeightMeterSensor,
|
|
9
|
+
type weightMeterSensorsConfig,
|
|
10
10
|
} from ".";
|
|
11
11
|
|
|
12
12
|
export class PigfarmGateway extends Object {
|
package/transport_gateway.ts
CHANGED
package/unit_gateway.ts
CHANGED
package/user_gateway.ts
CHANGED