@das-fed/ui 7.0.1-beta.1 → 7.0.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@das-fed/ui",
3
- "version": "7.0.1-beta.1",
3
+ "version": "7.0.1",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -26,7 +26,7 @@
26
26
  "@antv/x6-plugin-snapline": "^2.1.7",
27
27
  "@antv/x6-plugin-transform": "^2.1.8",
28
28
  "@antv/x6-vue-shape": "^2.1.2",
29
- "@das-fed/cli": "7.0.1-beta.1",
29
+ "@das-fed/cli": "7.0.1",
30
30
  "@element-plus/icons-vue": "^2.3.1",
31
31
  "@types/lodash": "^4.14.194",
32
32
  "@types/lodash-es": "^4.17.9",
@@ -56,9 +56,9 @@
56
56
  "vue-tsc": "^2.0.29"
57
57
  },
58
58
  "dependencies": {
59
- "@das-fed/ui": "7.0.1-beta.1",
60
- "@das-fed/utils": "7.0.1-beta.1",
61
- "@das-fed/web": "7.0.1-beta.1",
59
+ "@das-fed/ui": "7.0.1",
60
+ "@das-fed/utils": "7.0.1",
61
+ "@das-fed/web": "7.0.1",
62
62
  "@types/markdown-it": "^14.1.2",
63
63
  "@wangeditor-next/editor": "5.6.31",
64
64
  "@wangeditor-next/editor-for-vue": "5.1.14",
@@ -1,9 +1,9 @@
1
1
  import '@das-fed/ui/packages/business-components/video-dialog/style.css';
2
- import { getCurrentScope as ce, onScopeDispose as ue, getCurrentInstance as de, onMounted as J, nextTick as P, unref as l, ref as h, watch as R, defineComponent as L, useCssVars as pe, computed as U, createElementBlock as S, openBlock as p, normalizeClass as ve, renderSlot as ee, createCommentVNode as b, Fragment as x, renderList as fe, createBlock as N, withCtx as C, withModifiers as _, createVNode as v, createElementVNode as f, toDisplayString as V, toRefs as me } from "vue";
2
+ import { getCurrentScope as ce, onScopeDispose as ue, getCurrentInstance as de, onMounted as J, nextTick as P, unref as l, ref as w, watch as R, defineComponent as O, useCssVars as pe, computed as U, createElementBlock as S, openBlock as p, normalizeClass as ve, renderSlot as ee, createCommentVNode as b, Fragment as x, renderList as fe, createBlock as N, withCtx as C, withModifiers as _, createVNode as v, createElementVNode as f, toDisplayString as V, toRefs as me } from "vue";
3
3
  import { withInstall as Ce } from "@das-fed/utils/with-install/index";
4
4
  import { t as g, setI18nRule as ge } from "@das-fed/web/packages/i18n/index";
5
5
  import { DasDialog as ye } from "@das-fed/ui/packages/components/dialog/index";
6
- import { DasTooltip as w } from "@das-fed/ui/packages/components/tooltip/index";
6
+ import { DasTooltip as h } from "@das-fed/ui/packages/components/tooltip/index";
7
7
  import { DasIconFullscreen2 as ke } from "@das-fed/ui/packages/icons/fullscreen-2/index";
8
8
  import { DasAutoRegisterIcon as _e, DasIcon as $ } from "@das-fed/ui/packages/components/icon/index";
9
9
  import { DasLivePlayer as we } from "@das-fed/ui/packages/components/live-player/index";
@@ -49,7 +49,7 @@ function Oe(...t) {
49
49
  return ne(m), m;
50
50
  }
51
51
  function Le(t, n = !1) {
52
- const e = h(), i = () => e.value = !!t();
52
+ const e = w(), i = () => e.value = !!t();
53
53
  return i(), Se(i, n), e;
54
54
  }
55
55
  const q = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, G = "__vueuse_ssr_handlers__";
@@ -97,7 +97,7 @@ const W = [
97
97
  ]
98
98
  ];
99
99
  function ie(t, n = {}) {
100
- const { document: e = De, autoExit: i = !1 } = n, r = t || (e == null ? void 0 : e.querySelector("html")), o = h(!1);
100
+ const { document: e = De, autoExit: i = !1 } = n, r = t || (e == null ? void 0 : e.querySelector("html")), o = w(!1);
101
101
  let a = W[0];
102
102
  const y = Le(() => {
103
103
  if (e) {
@@ -118,7 +118,7 @@ function ie(t, n = {}) {
118
118
  const F = le(r);
119
119
  F && (await F[s](), o.value = !0);
120
120
  }
121
- async function z() {
121
+ async function L() {
122
122
  o.value ? await k() : await I();
123
123
  }
124
124
  return e && Oe(e, d, () => {
@@ -128,7 +128,7 @@ function ie(t, n = {}) {
128
128
  isFullscreen: o,
129
129
  enter: I,
130
130
  exit: k,
131
- toggle: z
131
+ toggle: L
132
132
  };
133
133
  }
134
134
  var Y;
@@ -172,7 +172,7 @@ const Te = {
172
172
  xe({
173
173
  linear: Re
174
174
  }, Te);
175
- const Be = /* @__PURE__ */ L({
175
+ const Be = /* @__PURE__ */ O({
176
176
  __name: "GridItem",
177
177
  props: {
178
178
  active: { type: Boolean },
@@ -183,7 +183,7 @@ const Be = /* @__PURE__ */ L({
183
183
  pe((c) => ({
184
184
  "9b3a2c32": m.value
185
185
  }));
186
- const e = t, i = n, r = h(), { toggle: o, isFullscreen: a } = ie(r), y = () => {
186
+ const e = t, i = n, r = w(), { toggle: o, isFullscreen: a } = ie(r), y = () => {
187
187
  r.value != document.fullscreenElement && (a.value ? (a.value = !1, P(() => {
188
188
  o();
189
189
  })) : o());
@@ -211,7 +211,7 @@ const Be = /* @__PURE__ */ L({
211
211
  for (const [i, r] of n)
212
212
  e[i] = r;
213
213
  return e;
214
- }, He = /* @__PURE__ */ T(Be, [["__scopeId", "data-v-100b67ca"]]), Ve = { class: "layout-wrapper" }, je = /* @__PURE__ */ L({
214
+ }, He = /* @__PURE__ */ T(Be, [["__scopeId", "data-v-100b67ca"]]), Ve = { class: "layout-wrapper" }, je = /* @__PURE__ */ O({
215
215
  __name: "GridLayout",
216
216
  props: {
217
217
  gridNum: {},
@@ -247,7 +247,7 @@ const Be = /* @__PURE__ */ L({
247
247
  ))
248
248
  ]));
249
249
  }
250
- }), Me = /* @__PURE__ */ T(je, [["__scopeId", "data-v-661e2289"]]), Ae = /* @__PURE__ */ L({
250
+ }), Me = /* @__PURE__ */ T(je, [["__scopeId", "data-v-661e2289"]]), Ae = /* @__PURE__ */ O({
251
251
  __name: "DirectionControl",
252
252
  emits: ["change"],
253
253
  setup(t, { emit: n }) {
@@ -261,7 +261,7 @@ const Be = /* @__PURE__ */ L({
261
261
  onDblclick: o[9] || (o[9] = _((a) => a.stopPropagation(), ["stop"]))
262
262
  },
263
263
  [
264
- v(l(w), {
264
+ v(l(h), {
265
265
  content: l(g)("左上")
266
266
  }, {
267
267
  default: C(() => [
@@ -273,7 +273,7 @@ const Be = /* @__PURE__ */ L({
273
273
  _: 1
274
274
  /* STABLE */
275
275
  }, 8, ["content"]),
276
- v(l(w), {
276
+ v(l(h), {
277
277
  content: l(g)("上")
278
278
  }, {
279
279
  default: C(() => [
@@ -285,7 +285,7 @@ const Be = /* @__PURE__ */ L({
285
285
  _: 1
286
286
  /* STABLE */
287
287
  }, 8, ["content"]),
288
- v(l(w), {
288
+ v(l(h), {
289
289
  content: l(g)("右上")
290
290
  }, {
291
291
  default: C(() => [
@@ -297,7 +297,7 @@ const Be = /* @__PURE__ */ L({
297
297
  _: 1
298
298
  /* STABLE */
299
299
  }, 8, ["content"]),
300
- v(l(w), {
300
+ v(l(h), {
301
301
  content: l(g)("左")
302
302
  }, {
303
303
  default: C(() => [
@@ -309,7 +309,7 @@ const Be = /* @__PURE__ */ L({
309
309
  _: 1
310
310
  /* STABLE */
311
311
  }, 8, ["content"]),
312
- v(l(w), {
312
+ v(l(h), {
313
313
  content: l(g)("自动")
314
314
  }, {
315
315
  default: C(() => [
@@ -321,7 +321,7 @@ const Be = /* @__PURE__ */ L({
321
321
  _: 1
322
322
  /* STABLE */
323
323
  }, 8, ["content"]),
324
- v(l(w), {
324
+ v(l(h), {
325
325
  content: l(g)("右")
326
326
  }, {
327
327
  default: C(() => [
@@ -333,7 +333,7 @@ const Be = /* @__PURE__ */ L({
333
333
  _: 1
334
334
  /* STABLE */
335
335
  }, 8, ["content"]),
336
- v(l(w), {
336
+ v(l(h), {
337
337
  content: l(g)("左下")
338
338
  }, {
339
339
  default: C(() => [
@@ -345,7 +345,7 @@ const Be = /* @__PURE__ */ L({
345
345
  _: 1
346
346
  /* STABLE */
347
347
  }, 8, ["content"]),
348
- v(l(w), {
348
+ v(l(h), {
349
349
  content: l(g)("下")
350
350
  }, {
351
351
  default: C(() => [
@@ -357,7 +357,7 @@ const Be = /* @__PURE__ */ L({
357
357
  _: 1
358
358
  /* STABLE */
359
359
  }, 8, ["content"]),
360
- v(l(w), {
360
+ v(l(h), {
361
361
  content: l(g)("右下")
362
362
  }, {
363
363
  default: C(() => [
@@ -377,7 +377,7 @@ const Be = /* @__PURE__ */ L({
377
377
  }), Qe = /* @__PURE__ */ T(Ae, [["__scopeId", "data-v-db2e8ec2"]]), qe = { class: "video-wrapper" }, Ge = { class: "video-top" }, We = { class: "video-top_l" }, Ye = { class: "video-title-wrapper" }, Ze = { class: "video-title" }, Ke = { class: "video-top_r" }, Xe = {
378
378
  key: 0,
379
379
  class: "play-status"
380
- }, Je = { class: "video-bottom" }, et = { class: "video-bottom_r" }, tt = /* @__PURE__ */ L({
380
+ }, Je = { class: "video-bottom" }, et = { class: "video-bottom_r" }, tt = /* @__PURE__ */ O({
381
381
  __name: "index",
382
382
  props: {
383
383
  videoUrl: {},
@@ -401,26 +401,26 @@ const Be = /* @__PURE__ */ L({
401
401
  enlarge: import("@das-fed/ui/packages/icons/enlarge"),
402
402
  "direction-control": import("@das-fed/ui/packages/icons/direction-control")
403
403
  });
404
- const r = h(!0), o = h(), a = h(!1), y = h(), s = U(() => {
404
+ const r = w(!0), o = w(), a = w(!1), y = w(), s = U(() => {
405
405
  var u;
406
406
  return (u = y.value) == null ? void 0 : u.video;
407
- }), m = h(!1), c = h(!0), d = (u) => {
407
+ }), m = w(!1), c = w(!0), d = (u) => {
408
408
  o.value = u, !e.isHls && o.value.on(window.mpegts.Events.ERROR, (E) => {
409
409
  });
410
410
  }, k = () => {
411
411
  r.value = !r.value, o.value && (o.value.muted = r.value);
412
412
  }, I = () => {
413
413
  a.value = !a.value;
414
- }, z = h(""), F = () => {
414
+ }, L = w(""), F = () => {
415
415
  const u = document.createElement("canvas");
416
416
  if (s.value) {
417
417
  u.width = s.value.clientWidth, u.height = s.value.clientHeight;
418
418
  const E = u.getContext("2d");
419
419
  E == null || E.drawImage(s.value, 0, 0, u.width, u.height);
420
- const O = u.toDataURL("image/jpg"), ae = `【${e.title}】${Ie().format("YYYYMMDDHHmmss").toString()}.jpg`;
421
- if (z.value = O, "download" in document.createElement("a")) {
422
- const D = document.createElement("a");
423
- D.download = ae, D.style.display = "none", D.href = O, document.body.appendChild(D), document.body.appendChild(u), D.click(), URL.revokeObjectURL(D.href), document.body.removeChild(D), document.body.removeChild(u);
420
+ const D = u.toDataURL("image/jpg"), ae = `【${e.title}】${Ie().format("YYYYMMDDHHmmss").toString()}.jpg`;
421
+ if (L.value = D, "download" in document.createElement("a")) {
422
+ const z = document.createElement("a");
423
+ z.download = ae, z.style.display = "none", z.href = D, document.body.appendChild(z), document.body.appendChild(u), z.click(), URL.revokeObjectURL(z.href), document.body.removeChild(z), document.body.removeChild(u);
424
424
  }
425
425
  }
426
426
  }, B = (u) => {
@@ -543,10 +543,10 @@ const Be = /* @__PURE__ */ L({
543
543
  "div",
544
544
  {
545
545
  class: "controls",
546
- onDblclick: E[2] || (E[2] = _((O) => O.stopPropagation(), ["stop"]))
546
+ onDblclick: E[2] || (E[2] = _((D) => D.stopPropagation(), ["stop"]))
547
547
  },
548
548
  [
549
- v(l(w), {
549
+ v(l(h), {
550
550
  content: l(g)("声音")
551
551
  }, {
552
552
  default: C(() => [
@@ -559,7 +559,7 @@ const Be = /* @__PURE__ */ L({
559
559
  _: 1
560
560
  /* STABLE */
561
561
  }, 8, ["content"]),
562
- v(l(w), {
562
+ v(l(h), {
563
563
  content: l(g)("截图")
564
564
  }, {
565
565
  default: C(() => [
@@ -572,7 +572,7 @@ const Be = /* @__PURE__ */ L({
572
572
  _: 1
573
573
  /* STABLE */
574
574
  }, 8, ["content"]),
575
- H("control") ? (p(), N(l(w), {
575
+ H("control") ? (p(), N(l(h), {
576
576
  key: 0,
577
577
  content: l(g)("聚焦-")
578
578
  }, {
@@ -581,13 +581,13 @@ const Be = /* @__PURE__ */ L({
581
581
  key: 0,
582
582
  class: "icon icon-shrink",
583
583
  icon: "shrink",
584
- onClick: E[0] || (E[0] = _((O) => M("zoomOut"), ["stop"]))
584
+ onClick: E[0] || (E[0] = _((D) => M("zoomOut"), ["stop"]))
585
585
  })) : b("v-if", !0)
586
586
  ]),
587
587
  _: 1
588
588
  /* STABLE */
589
589
  }, 8, ["content"])) : b("v-if", !0),
590
- H("control") ? (p(), N(l(w), {
590
+ H("control") ? (p(), N(l(h), {
591
591
  key: 1,
592
592
  content: l(g)("聚焦+")
593
593
  }, {
@@ -596,13 +596,13 @@ const Be = /* @__PURE__ */ L({
596
596
  key: 0,
597
597
  class: "icon icon-enlarge",
598
598
  icon: "enlarge",
599
- onClick: E[1] || (E[1] = _((O) => M("zoomIn"), ["stop"]))
599
+ onClick: E[1] || (E[1] = _((D) => M("zoomIn"), ["stop"]))
600
600
  })) : b("v-if", !0)
601
601
  ]),
602
602
  _: 1
603
603
  /* STABLE */
604
604
  }, 8, ["content"])) : b("v-if", !0),
605
- H("control") ? (p(), N(l(w), {
605
+ H("control") ? (p(), N(l(h), {
606
606
  key: 2,
607
607
  content: l(g)("方向控制")
608
608
  }, {
@@ -651,7 +651,12 @@ function rt(t) {
651
651
  return se.post(`/url/preview?${re(t)}`)().run();
652
652
  }
653
653
  it.post("data/device-auth");
654
- const at = /* @__PURE__ */ L({
654
+ const at = (t) => {
655
+ const n = Ee();
656
+ return `${t}?token=${n}`;
657
+ };
658
+ w([]);
659
+ const ct = /* @__PURE__ */ O({
655
660
  props: {
656
661
  deviceInfo: {
657
662
  type: Object,
@@ -672,7 +677,7 @@ const at = /* @__PURE__ */ L({
672
677
  deviceInfo: e,
673
678
  source: i,
674
679
  isHls: r
675
- } = me(t), o = h(!1), a = h(""), y = async () => {
680
+ } = me(t), o = w(!1), a = w(""), y = async () => {
676
681
  var k;
677
682
  if (!((k = e.value) != null && k.deviceId)) return;
678
683
  o.value = !0;
@@ -682,8 +687,8 @@ const at = /* @__PURE__ */ L({
682
687
  source: i.value
683
688
  });
684
689
  if (!c) {
685
- let I = r.value ? "httpHlsStreamURL" : "wsFlvStreamURL", z = d == null ? void 0 : d[I];
686
- a.value = `${z}?access_token=${Ee()}`;
690
+ let I = r.value ? "httpHlsStreamURL" : "wsFlvStreamURL";
691
+ a.value = at(d == null ? void 0 : d[I]);
687
692
  }
688
693
  o.value = !1;
689
694
  }, s = (c) => {
@@ -718,8 +723,8 @@ const at = /* @__PURE__ */ L({
718
723
  })]);
719
724
  }
720
725
  });
721
- function ct(t) {
722
- const n = h(0), e = h(), {
726
+ function ut(t) {
727
+ const n = w(0), e = w(), {
723
728
  toggle: i,
724
729
  isFullscreen: r,
725
730
  exit: o
@@ -738,7 +743,7 @@ function ct(t) {
738
743
  index: s
739
744
  }) => {
740
745
  const m = t.deviceList[s], c = t.source, d = t.isHls;
741
- return v(at, {
746
+ return v(ct, {
742
747
  deviceInfo: m,
743
748
  source: c,
744
749
  isHls: d
@@ -746,7 +751,7 @@ function ct(t) {
746
751
  default: ({
747
752
  videoUrl: k,
748
753
  onDirectionControl: I,
749
- onZoomControl: z,
754
+ onZoomControl: L,
750
755
  loading: F,
751
756
  isHls: B
752
757
  }) => v(ot, {
@@ -757,7 +762,7 @@ function ct(t) {
757
762
  title: m.deviceName,
758
763
  onClose: () => a(),
759
764
  onDirectionControl: I,
760
- onZoomControl: z,
765
+ onZoomControl: L,
761
766
  authType: m.authType === 2 ? ["control"] : [],
762
767
  isHls: B
763
768
  }, null)
@@ -767,7 +772,7 @@ function ct(t) {
767
772
  toggleFullscreen: i
768
773
  };
769
774
  }
770
- const ut = /* @__PURE__ */ L({
775
+ const dt = /* @__PURE__ */ O({
771
776
  __name: "index",
772
777
  props: {
773
778
  visible: { type: Boolean, default: !1 },
@@ -781,7 +786,7 @@ const ut = /* @__PURE__ */ L({
781
786
  const e = t, i = n, r = U({
782
787
  get: () => e.visible,
783
788
  set: (s) => i("update:visible", s)
784
- }), { render: o, toggleFullscreen: a } = ct(e), y = U(() => {
789
+ }), { render: o, toggleFullscreen: a } = ut(e), y = U(() => {
785
790
  let s = {};
786
791
  switch (e.gridNum) {
787
792
  case 1:
@@ -818,7 +823,7 @@ const ut = /* @__PURE__ */ L({
818
823
  /* TEXT */
819
824
  )
820
825
  ]),
821
- v(l(w), {
826
+ v(l(h), {
822
827
  content: l(g)("页面全屏")
823
828
  }, {
824
829
  default: C(() => [
@@ -839,7 +844,7 @@ const ut = /* @__PURE__ */ L({
839
844
  /* STABLE */
840
845
  }, 8, ["title", "custom-class", "modelValue"]));
841
846
  }
842
- }), dt = {
847
+ }), pt = {
843
848
  加载中: { "zh-CN": "加载中", en: "Loading", _appCode: "framework" },
844
849
  正在实时预览: { "zh-CN": "正在实时预览", en: "Real-time Video", _appCode: "framework" },
845
850
  声音: { "zh-CN": "声音", en: "Sound", _appCode: "framework" },
@@ -861,10 +866,10 @@ const ut = /* @__PURE__ */ L({
861
866
  "聚焦-": { "zh-CN": "聚焦-", en: "Focus-", _appCode: "framework" },
862
867
  "聚焦+": { "zh-CN": "聚焦+", en: "Focus+", _appCode: "framework" }
863
868
  };
864
- ge(dt);
865
- const Et = Ce(ut), Nt = () => h(null);
869
+ ge(pt);
870
+ const Nt = Ce(dt), Ft = () => w(null);
866
871
  export {
867
- Et as DasVideoDialog,
868
- Nt as DasVideoDialogRef,
869
- ct as useVideo
872
+ Nt as DasVideoDialog,
873
+ Ft as DasVideoDialogRef,
874
+ ut as useVideo
870
875
  };