mixapply 1.1.42 → 1.1.43

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/mixapply.js CHANGED
@@ -68146,9 +68146,7 @@ const Rge = "FeatureCollection", Nge = /* @__PURE__ */ JSON.parse('[{"type":"Fea
68146
68146
  valueBg: "#fff",
68147
68147
  valueColor: "#006eaf",
68148
68148
  fontSize: 12,
68149
- isBold: !1,
68150
- x: 0,
68151
- y: 0
68149
+ isBold: !1
68152
68150
  }
68153
68151
  ], nme = ["name", "fv", "object_id", "source", "type", "width", "fontSize", "titleColor", "titleBg", "valueColor", "valueBg", "isBold"], ame = ["mosaic"], ime = {
68154
68152
  useAlias: !1,
@@ -68176,16 +68174,29 @@ const Rge = "FeatureCollection", Nge = /* @__PURE__ */ JSON.parse('[{"type":"Fea
68176
68174
  },
68177
68175
  setup(t) {
68178
68176
  const e = q(Me("sharedWorker", null)), r = q(Me("ws", null)), n = "monitor_" + Math.random().toString(16).substring(4, 12), a = t, i = q({}), o = () => {
68179
- var S, C, _, w, x, E, T, L, A, D, M;
68180
- const { options: y } = a.conf;
68177
+ var C, _, w, x, E, T, L, A, D, M, k;
68178
+ const { options: y, data: S } = a.conf;
68181
68179
  i.value = {
68182
- bgColor: ((S = y == null ? void 0 : y.bgColor) == null ? void 0 : S.value) || "#fff",
68183
- bgImg: ((C = y == null ? void 0 : y.bgImg) == null ? void 0 : C.value) || "",
68184
- radiusSize: ((_ = y == null ? void 0 : y.radiusSize) == null ? void 0 : _.value) ?? 4,
68185
- isHideTitle: ((w = y == null ? void 0 : y.isHideTitle) == null ? void 0 : w.value) ?? !1,
68186
- outer: ((x = y == null ? void 0 : y.outer) == null ? void 0 : x.value) ?? { width: "95%", height: "95%", top: "5%", left: "5%" },
68187
- inner: ((E = y == null ? void 0 : y.inner) == null ? void 0 : E.value) ?? { width: "100%", height: "100%" }
68188
- }, (T = y == null ? void 0 : y.multipleImg) != null && T.value && (i.value.multipleImg = (L = y == null ? void 0 : y.multipleImg) == null ? void 0 : L.value, i.value.statusFv = (A = y == null ? void 0 : y.statusFv) == null ? void 0 : A.value, i.value.images = (D = y == null ? void 0 : y.images) == null ? void 0 : D.value, i.value.object = (M = y == null ? void 0 : y.object) == null ? void 0 : M.value), p.value = i.value.bgImg;
68180
+ bgColor: ((C = y == null ? void 0 : y.bgColor) == null ? void 0 : C.value) || "#fff",
68181
+ bgImg: ((_ = y == null ? void 0 : y.bgImg) == null ? void 0 : _.value) || "",
68182
+ radiusSize: ((w = y == null ? void 0 : y.radiusSize) == null ? void 0 : w.value) ?? 4,
68183
+ isHideTitle: ((x = y == null ? void 0 : y.isHideTitle) == null ? void 0 : x.value) ?? !1,
68184
+ outer: ((E = y == null ? void 0 : y.outer) == null ? void 0 : E.value) ?? { width: "95%", height: "95%", top: "5%", left: "5%" },
68185
+ inner: ((T = y == null ? void 0 : y.inner) == null ? void 0 : T.value) ?? { width: "100%", height: "100%" }
68186
+ }, (L = y == null ? void 0 : y.multipleImg) != null && L.value && (i.value.multipleImg = (A = y == null ? void 0 : y.multipleImg) == null ? void 0 : A.value, i.value.statusFv = (D = y == null ? void 0 : y.statusFv) == null ? void 0 : D.value, i.value.images = (M = y == null ? void 0 : y.images) == null ? void 0 : M.value, i.value.object = (k = y == null ? void 0 : y.object) == null ? void 0 : k.value), p.value = i.value.bgImg, Ke(() => {
68187
+ let R = document.getElementById(n);
68188
+ R.offsetWidth, R.offsetHeight, Ke(() => {
68189
+ let N = document.getElementById(n).clientWidth, P = document.getElementById(n).clientHeight;
68190
+ S.forEach((B) => {
68191
+ let $ = a.conf.height || P;
68192
+ if (typeof B.x == "number") {
68193
+ let j = B.x / N, J = B.y / P;
68194
+ B.x = `${j * 100}%`, B.y = `${J * 100}%`;
68195
+ }
68196
+ B.height = Math.floor(P / $ * B.height);
68197
+ }), a.conf.height = P;
68198
+ });
68199
+ });
68189
68200
  }, s = (y) => {
68190
68201
  let S = 5;
68191
68202
  return /^\d+$/.test(y) && (S = Number(y)), S + 1;
@@ -68273,7 +68284,7 @@ const Rge = "FeatureCollection", Nge = /* @__PURE__ */ JSON.parse('[{"type":"Fea
68273
68284
  const y = V1(a.conf, a.uid, "scd");
68274
68285
  e.value && e.value.port.postMessage({ request: y, type: "send" }), r.value && r.value.send(JSON.stringify(y));
68275
68286
  }
68276
- }, b = Ft(o, 200);
68287
+ }, b = Ft(o, 100);
68277
68288
  return be(
68278
68289
  () => a.conf,
68279
68290
  () => {
@@ -68283,7 +68294,7 @@ const Rge = "FeatureCollection", Nge = /* @__PURE__ */ JSON.parse('[{"type":"Fea
68283
68294
  ), Vt(() => {
68284
68295
  a.conf.socketData && v(a.conf.socketData);
68285
68296
  }), $e(async () => {
68286
- o(), a.mode === "preview" ? m() : u();
68297
+ b(), a.mode === "preview" ? m() : u();
68287
68298
  }), Aa(() => {
68288
68299
  xl(".echart-body").unset();
68289
68300
  }), (y, S) => {
@@ -68324,7 +68335,7 @@ const Rge = "FeatureCollection", Nge = /* @__PURE__ */ JSON.parse('[{"type":"Fea
68324
68335
  key: 0,
68325
68336
  class: le(`${n} liquid absolute`),
68326
68337
  id: `ULG_${n}_${P.fv}_${B}`,
68327
- style: oe({ height: `${P.height}px`, left: `${P.x}px`, top: `${P.y}px`, zIndex: B })
68338
+ style: oe({ height: `${P.height}px`, left: P.x, top: P.y, zIndex: B })
68328
68339
  }, [
68329
68340
  G("div", {
68330
68341
  class: "liquid-bar",
@@ -68352,14 +68363,14 @@ const Rge = "FeatureCollection", Nge = /* @__PURE__ */ JSON.parse('[{"type":"Fea
68352
68363
  ], 14, jge)) : P.type == "Signal" ? (H(), Y("div", {
68353
68364
  key: 1,
68354
68365
  class: le(`${n} signal absolute ${h(P)}`),
68355
- style: oe({ width: `${P.fontSize}px`, height: `${P.fontSize}px`, left: `${P.x}px`, top: `${P.y}px`, zIndex: B }),
68366
+ style: oe({ width: `${P.fontSize}px`, height: `${P.fontSize}px`, left: P.x, top: P.y, zIndex: B }),
68356
68367
  id: `Signal_${n}_${P.fv}_${B}`
68357
68368
  }, null, 14, Yge)) : P.type == "Digit" ? (H(), Y("div", {
68358
68369
  key: 2,
68359
68370
  class: le(`${n} absolute`),
68360
68371
  style: oe({
68361
- left: `${P.x}px`,
68362
- top: `${P.y}px`,
68372
+ left: P.x,
68373
+ top: P.y,
68363
68374
  color: P.color,
68364
68375
  fontSize: `${P.fontSize}px`,
68365
68376
  fontWeight: P.isBold ? "bold" : "normal",
@@ -68370,7 +68381,7 @@ const Rge = "FeatureCollection", Nge = /* @__PURE__ */ JSON.parse('[{"type":"Fea
68370
68381
  key: 3,
68371
68382
  class: le(`${n} absolute status`),
68372
68383
  id: `Status_${n}_${P.fv}_${B}`,
68373
- style: oe({ color: f(P).color, left: `${P.x}px`, top: `${P.y}px`, zIndex: B })
68384
+ style: oe({ color: f(P).color, left: P.x, top: P.y, zIndex: B })
68374
68385
  }, [
68375
68386
  Mt(de(P.name) + ": ", 1),
68376
68387
  G("span", null, [
@@ -68391,8 +68402,8 @@ const Rge = "FeatureCollection", Nge = /* @__PURE__ */ JSON.parse('[{"type":"Fea
68391
68402
  width: `${P.width}px`,
68392
68403
  fontSize: `${P.fontSize}px`,
68393
68404
  fontWeight: P.isBold ? "bold" : "normal",
68394
- left: `${P.x}px`,
68395
- top: `${P.y}px`,
68405
+ left: P.x,
68406
+ top: P.y,
68396
68407
  zIndex: B
68397
68408
  })
68398
68409
  }, [
@@ -68413,7 +68424,7 @@ const Rge = "FeatureCollection", Nge = /* @__PURE__ */ JSON.parse('[{"type":"Fea
68413
68424
  ], 4);
68414
68425
  };
68415
68426
  }
68416
- }), lme = /* @__PURE__ */ Ct(sme, [["__scopeId", "data-v-77c6de9a"]]), xm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
68427
+ }), lme = /* @__PURE__ */ Ct(sme, [["__scopeId", "data-v-4a47ad1c"]]), xm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
68417
68428
  __proto__: null,
68418
68429
  default: lme
68419
68430
  }, Symbol.toStringTag, { value: "Module" })), ume = { class: "dialog-footer" }, J4 = {
@@ -80822,7 +80833,7 @@ const iwe = {
80822
80833
  _: 1
80823
80834
  }, 8, ["locale"]));
80824
80835
  }
80825
- }), Zl = /* @__PURE__ */ Ct(dwe, [["__scopeId", "data-v-61d6de77"]]), fwe = {
80836
+ }), Zl = /* @__PURE__ */ Ct(dwe, [["__scopeId", "data-v-c1234785"]]), fwe = {
80826
80837
  key: 0,
80827
80838
  id: "ShowContainer"
80828
80839
  }, hwe = { class: "canvas" }, vwe = {