zyjj-web-sdk 1.0.22 → 1.0.24
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/lib/{APlayer.min-Dl-exoHl.js → APlayer.min-D-ivR_ZW.js} +1 -1
- package/lib/{DPlayer.min-RAsO4F9E.js → DPlayer.min-BeAznTWS.js} +1 -1
- package/lib/{index-D52s_Mb3.js → index-CzwiYU0C.js} +1 -1
- package/lib/{index-CjyVSMNz.js → index-DBXZL4A-.js} +13 -11
- package/lib/index.d.ts +8 -1
- package/lib/index.js +1 -1
- package/lib/index.umd.cjs +2 -2
- package/lib/store/entity.d.ts +3 -3
- package/lib/store/mqtt.d.ts +6 -2
- package/lib/types/local-task.d.ts +3 -1
- package/lib/types/mqtt.d.ts +3 -1
- package/package.json +1 -1
|
@@ -34337,7 +34337,7 @@ const Que = /* @__PURE__ */ Jr(Yue), Xue = (e) => e >= 1073741824 ? (e / 1073741
|
|
|
34337
34337
|
}, r.onerror = function() {
|
|
34338
34338
|
t("下载失败,请在新窗口打开");
|
|
34339
34339
|
};
|
|
34340
|
-
}), er = process.env.NODE_ENV == "production" ? "https://api.zyjj.cc/api/v1" : "/api/v1", ofe = (e) => Jt(`${er}/common/user/login`, e, "post"), ife = (e, n, t) => Jt(`${er}/common/app/info?os=${e}&version=${n}&uid=${t || ""}`, {}, "get"), afe = (e) => Jt(`${er}/common/user/register`, e, "post"), sfe = (e) => Jt(`${er}/common/user/reset/password`, e, "post"), bT = (e) => Jt(`${er}/common/user/email/token`, { email: e }, "post"), OT = () => Jt(`${er}/user/user/info`, {}, "get", !1), lfe = (e) => Jt(`${er}/user/user/info`, e, "put"), cfe = () => Jt(`${er}/user/point/checkin`, {}, "post"), ufe = (e) => Jt(`${er}/user/point/exchange/${e}`, {}, "post"), ffe = (e, n) => Jt(`${er}/user/point/record/list?page_no=${e}&page_size=${n}`, {}, "get"), dfe = () => Jt(`${er}/user/pay/methods`, {}, "get"), pfe = (e, n) => Jt(`${er}/user/pay/code`, { id: e, price: n }, "post"), d_ = (e) => Jt(`${er}/user/pay/status/${e}`, {}, "get", !1), hfe = (e) => Jt(`${er}/user/point/deducting`, e, "post"), vfe = (e) => Jt(`${er}/common/tool/list?${b1(e)}`, {}, "get"), O1 = () => Jt(`${er}/common/tool/all`, {}, "get"), mfe = (e) => Jt(`${er}/common/tool/${e}`, {}, "get"), gfe = () => Jt(`${er}/common/tool/tags`, {}, "get"), yfe = (e) => Jt(`${er}/common/tool/inc/${e}`, {}, "get"), wT = () => Jt(`${er}/user/cloud/tencent/cos`, {}, "get"), bfe = (e) => Jt(`${er}/user/task`, e, "post"), Ofe = (e) => Jt(`${er}/user/task/${e}`, {}, "get"), CT = () => Jt(`${er}/user/cloud/mqtt/task`, {}, "get"), ET = () => Jt(`${er}/common/material/tags`, {}, "get"), wfe = (e) => Jt(`${er}/common/material?${b1(e)}`, {}, "get"), Cfe = (e) => Jt(`${er}/user/material/${e}`, {}, "get"), Efe = (e) => Jt(`${er}/user/material/url`, { key_list: e }, "post"), xfe = (e) => Jt(`${er}${e.url}`, e.data || {}, e.method), _fe = (e) => Jt(`${er}/common/feedback`, e, "post"), Sfe = (e) => Jt(`${er}/common/config/${e}`, {}, "get");
|
|
34340
|
+
}), er = process.env.NODE_ENV == "production" ? "https://api.zyjj.cc/api/v1" : "http://127.0.0.1:3000/api/v1", ofe = (e) => Jt(`${er}/common/user/login`, e, "post"), ife = (e, n, t) => Jt(`${er}/common/app/info?os=${e}&version=${n}&uid=${t || ""}`, {}, "get"), afe = (e) => Jt(`${er}/common/user/register`, e, "post"), sfe = (e) => Jt(`${er}/common/user/reset/password`, e, "post"), bT = (e) => Jt(`${er}/common/user/email/token`, { email: e }, "post"), OT = () => Jt(`${er}/user/user/info`, {}, "get", !1), lfe = (e) => Jt(`${er}/user/user/info`, e, "put"), cfe = () => Jt(`${er}/user/point/checkin`, {}, "post"), ufe = (e) => Jt(`${er}/user/point/exchange/${e}`, {}, "post"), ffe = (e, n) => Jt(`${er}/user/point/record/list?page_no=${e}&page_size=${n}`, {}, "get"), dfe = () => Jt(`${er}/user/pay/methods`, {}, "get"), pfe = (e, n) => Jt(`${er}/user/pay/code`, { id: e, price: n }, "post"), d_ = (e) => Jt(`${er}/user/pay/status/${e}`, {}, "get", !1), hfe = (e) => Jt(`${er}/user/point/deducting`, e, "post"), vfe = (e) => Jt(`${er}/common/tool/list?${b1(e)}`, {}, "get"), O1 = () => Jt(`${er}/common/tool/all`, {}, "get"), mfe = (e) => Jt(`${er}/common/tool/${e}`, {}, "get"), gfe = () => Jt(`${er}/common/tool/tags`, {}, "get"), yfe = (e) => Jt(`${er}/common/tool/inc/${e}`, {}, "get"), wT = () => Jt(`${er}/user/cloud/tencent/cos`, {}, "get"), bfe = (e) => Jt(`${er}/user/task`, e, "post"), Ofe = (e) => Jt(`${er}/user/task/${e}`, {}, "get"), CT = () => Jt(`${er}/user/cloud/mqtt/task`, {}, "get"), ET = () => Jt(`${er}/common/material/tags`, {}, "get"), wfe = (e) => Jt(`${er}/common/material?${b1(e)}`, {}, "get"), Cfe = (e) => Jt(`${er}/user/material/${e}`, {}, "get"), Efe = (e) => Jt(`${er}/user/material/url`, { key_list: e }, "post"), xfe = (e) => Jt(`${er}${e.url}`, e.data || {}, e.method), _fe = (e) => Jt(`${er}/common/feedback`, e, "post"), Sfe = (e) => Jt(`${er}/common/config/${e}`, {}, "get");
|
|
34341
34341
|
var Fh;
|
|
34342
34342
|
(function(e) {
|
|
34343
34343
|
e[e.Local = 0] = "Local", e[e.Cos = 1] = "Cos";
|
|
@@ -34356,7 +34356,7 @@ var zt;
|
|
|
34356
34356
|
})(zt || (zt = {}));
|
|
34357
34357
|
var Hh;
|
|
34358
34358
|
(function(e) {
|
|
34359
|
-
e[e.Start = 1] = "Start", e[e.Progress = 2] = "Progress", e[e.Success = 3] = "Success", e[e.Error = 4] = "Error";
|
|
34359
|
+
e[e.Start = 1] = "Start", e[e.Progress = 2] = "Progress", e[e.Success = 3] = "Success", e[e.Error = 4] = "Error", e[e.DetailAppend = 5] = "DetailAppend", e[e.DetailSet = 6] = "DetailSet";
|
|
34360
34360
|
})(Hh || (Hh = {}));
|
|
34361
34361
|
var Vh;
|
|
34362
34362
|
(function(e) {
|
|
@@ -34372,7 +34372,7 @@ var Wh;
|
|
|
34372
34372
|
})(Wh || (Wh = {}));
|
|
34373
34373
|
var Kh;
|
|
34374
34374
|
(function(e) {
|
|
34375
|
-
e[e.Start = 1] = "Start", e[e.Progress = 2] = "Progress", e[e.Success = 3] = "Success", e[e.Error = 4] = "Error";
|
|
34375
|
+
e[e.Start = 1] = "Start", e[e.Progress = 2] = "Progress", e[e.Success = 3] = "Success", e[e.Error = 4] = "Error", e[e.DetailAppend = 5] = "DetailAppend", e[e.DetailSet = 6] = "DetailSet";
|
|
34376
34376
|
})(Kh || (Kh = {}));
|
|
34377
34377
|
var qh;
|
|
34378
34378
|
(function(e) {
|
|
@@ -47301,8 +47301,7 @@ const The = Ahe();
|
|
|
47301
47301
|
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
47302
47302
|
*/
|
|
47303
47303
|
const Rhe = {
|
|
47304
|
-
|
|
47305
|
-
taskQueue: []
|
|
47304
|
+
taskCallback: {}
|
|
47306
47305
|
}, k9 = $T("mqtt/initMqtt", async (e, { dispatch: n }) => {
|
|
47307
47306
|
const t = await CT();
|
|
47308
47307
|
console.log("[mqtt] mqtt info", t);
|
|
@@ -47318,19 +47317,22 @@ const Rhe = {
|
|
|
47318
47317
|
return o.on("connect", (a) => {
|
|
47319
47318
|
console.log("[mqtt] connect success", a), o.subscribe(r, { qos: 2 });
|
|
47320
47319
|
}), o.on("message", (a, s, i) => {
|
|
47321
|
-
console.log("[mqtt] on message", a, s.toString(), i), a === r && n(A9.
|
|
47320
|
+
console.log("[mqtt] on message", a, s.toString(), i), a === r && n(A9.onMqttResponse(JSON.parse(s.toString())));
|
|
47322
47321
|
}), o.on("error", (a) => console.log("[mqtt] err", a)), o.on("close", () => console.log("[mqtt] close")), o.on("disconnect", () => console.log("[mqtt] disconnect")), o;
|
|
47323
47322
|
}), D9 = BT({
|
|
47324
47323
|
name: "mqtt",
|
|
47325
47324
|
initialState: Rhe,
|
|
47326
47325
|
reducers: {
|
|
47327
|
-
|
|
47326
|
+
onMqttResponse(e, n) {
|
|
47328
47327
|
const t = n.payload;
|
|
47329
|
-
|
|
47328
|
+
t.task_id in e.taskCallback && e.taskCallback[t.task_id](t) && (delete e.taskCallback[t.task_id], console.log("[mqtt] delete callback", t.task_id));
|
|
47330
47329
|
},
|
|
47331
47330
|
closeClient(e) {
|
|
47332
47331
|
var n;
|
|
47333
47332
|
console.log("[mqtt] close client"), (n = e.client) == null || n.end();
|
|
47333
|
+
},
|
|
47334
|
+
addMqttCallback(e, n) {
|
|
47335
|
+
e.taskCallback[n.payload.task_id] = n.payload.callback;
|
|
47334
47336
|
}
|
|
47335
47337
|
},
|
|
47336
47338
|
extraReducers: (e) => {
|
|
@@ -58310,7 +58312,7 @@ function eOe() {
|
|
|
58310
58312
|
function D6(e) {
|
|
58311
58313
|
const [n, t] = Ve(!1), [r, o] = Ve();
|
|
58312
58314
|
return lt(() => {
|
|
58313
|
-
import("./index-
|
|
58315
|
+
import("./index-CzwiYU0C.js").then((a) => {
|
|
58314
58316
|
o(z.jsx(a.default, { remarkPlugins: [eOe], children: e.value }));
|
|
58315
58317
|
});
|
|
58316
58318
|
}, [e.value]), z.jsxs("div", { style: { position: "relative" }, children: [e.value ? z.jsxs(Yr, { style: { position: "absolute", right: 0, margin: 5, zIndex: 99 }, children: [z.jsx(Nf, { noSuccess: !0, onClick: async () => t((a) => !a), icon: n ? z.jsx(Yu, {}) : z.jsx(Q0, {}), tip: n ? "预览" : "编辑" }), z.jsx($2e, { value: e.value })] }) : z.jsx(z.Fragment, {}), n ? z.jsx(Dr.TextArea, { style: { borderRadius: 5, padding: 10 }, autoSize: !0, value: e.value, onChange: e.onChange }) : z.jsx("div", { style: { padding: 10 }, children: r })] });
|
|
@@ -58338,7 +58340,7 @@ function rOe(e) {
|
|
|
58338
58340
|
if (!o || !e.value)
|
|
58339
58341
|
return;
|
|
58340
58342
|
let a = {};
|
|
58341
|
-
typeof e.value == "string" ? (t(e.value), a.url = e.value, a.name = e.value.split("/").pop()) : (a = e.value, t(a.url)), import("./APlayer.min-
|
|
58343
|
+
typeof e.value == "string" ? (t(e.value), a.url = e.value, a.name = e.value.split("/").pop()) : (a = e.value, t(a.url)), import("./APlayer.min-D-ivR_ZW.js").then((s) => s.A).then((s) => {
|
|
58342
58344
|
new s.default({
|
|
58343
58345
|
container: o,
|
|
58344
58346
|
loop: "none",
|
|
@@ -58363,7 +58365,7 @@ function iOe(e) {
|
|
|
58363
58365
|
function aOe(e) {
|
|
58364
58366
|
var t;
|
|
58365
58367
|
const n = Xt((r) => {
|
|
58366
|
-
!r || !e.value || import("./DPlayer.min-
|
|
58368
|
+
!r || !e.value || import("./DPlayer.min-BeAznTWS.js").then((o) => o.D).then((o) => {
|
|
58367
58369
|
var a;
|
|
58368
58370
|
new o.default({ container: r, screenshot: !0, video: { url: (a = e.value) == null ? void 0 : a.url } });
|
|
58369
58371
|
});
|
package/lib/index.d.ts
CHANGED
|
@@ -111,11 +111,18 @@ export declare const Store: {
|
|
|
111
111
|
GetUserInfo: import("@reduxjs/toolkit").AsyncThunk<import("./types/cloud.ts").UserInfo | undefined, undefined, any>;
|
|
112
112
|
MqttReducer: import("redux").Reducer<import("./store/entity.ts").MqttState>;
|
|
113
113
|
MqttAction: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
114
|
-
|
|
114
|
+
onMqttResponse(state: import("immer").WritableDraft<import("./store/entity.ts").MqttState>, info: {
|
|
115
115
|
payload: import("./types/mqtt.ts").MqttResponse;
|
|
116
116
|
type: string;
|
|
117
117
|
}): void;
|
|
118
118
|
closeClient(state: import("immer").WritableDraft<import("./store/entity.ts").MqttState>): void;
|
|
119
|
+
addMqttCallback(state: import("immer").WritableDraft<import("./store/entity.ts").MqttState>, info: {
|
|
120
|
+
payload: {
|
|
121
|
+
task_id: string;
|
|
122
|
+
callback: import("./store/entity.ts").MqttCallback;
|
|
123
|
+
};
|
|
124
|
+
type: string;
|
|
125
|
+
}): void;
|
|
119
126
|
}, "mqtt">;
|
|
120
127
|
InitMqtt: import("@reduxjs/toolkit").AsyncThunk<import("mqtt").MqttClient, undefined, any>;
|
|
121
128
|
};
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, C as o, E as t, L as r, M as i, P as l, e as n, S as L, d as T, T as b, a as g, b as m, U as E } from "./index-
|
|
1
|
+
import { A as e, C as o, E as t, L as r, M as i, P as l, e as n, S as L, d as T, T as b, a as g, b as m, U as E } from "./index-DBXZL4A-.js";
|
|
2
2
|
export {
|
|
3
3
|
e as Api,
|
|
4
4
|
o as ConcatButton,
|