@web-utils/component 4.0.10 → 4.0.12

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.
@@ -218,7 +218,7 @@ var p = function() {
218
218
  }, proxy: !0 }, { key: "suffix", fn: function() {
219
219
  return [e._t("suffix")];
220
220
  }, proxy: !0 }], null, !0) })], 1);
221
- }, c = [], d = /* @__PURE__ */ o(
221
+ }, c = [], h = /* @__PURE__ */ o(
222
222
  l,
223
223
  p,
224
224
  c,
@@ -226,7 +226,7 @@ var p = function() {
226
226
  null,
227
227
  null
228
228
  );
229
- const b = d.exports;
229
+ const b = h.exports;
230
230
  export {
231
231
  b as default
232
232
  };
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@web-utils/component",
3
3
  "description": "Web Components",
4
- "version": "4.0.10",
4
+ "version": "4.0.12",
5
5
  "author": "Simple",
6
6
  "license": "MIT",
7
7
  "type": "module",
8
8
  "main": "./index.mjs",
9
9
  "module": "./index.mjs",
10
+ "types": "",
10
11
  "web-types": "web-types.json",
11
12
  "sideEffects": [
12
13
  "*.css",
@@ -17,9 +18,9 @@
17
18
  "@tinymce/tinymce-vue": "3.2.8",
18
19
  "@wangeditor/editor": "^5.1.23",
19
20
  "@wangeditor/editor-for-vue": "^1.0.2",
20
- "@web-utils/core": "^5.0.3",
21
- "@web-utils/integrations": "^5.0.3",
22
- "@web-utils/vue": "^5.0.3",
21
+ "@web-utils/core": "^5.0.4",
22
+ "@web-utils/integrations": "^5.0.4",
23
+ "@web-utils/vue": "^5.0.4",
23
24
  "async-validator": "1.8.5",
24
25
  "bpmn-js": "^18.13.1",
25
26
  "bpmn-js-token-simulation": "^0.39.3",
@@ -1,9 +1,9 @@
1
1
  import o from "../page/index.mjs";
2
- import "./page/style.css";
2
+ import "../page/style.css";
3
3
  import n from "../nav-bar/index.mjs";
4
- import "./nav-bar/style.css";
4
+ import "../nav-bar/style.css";
5
5
  import r from "../page-header/index.mjs";
6
- import "./page-header/style.css";
6
+ import "../page-header/style.css";
7
7
  import { n as a } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
8
8
  const l = {
9
9
  name: "PageSkeleton",
@@ -2,7 +2,7 @@ import { copy as v, hasOwn as P } from "@web-utils/core";
2
2
  import S from "element-ui/lib/message";
3
3
  import { g as _, f as C, i as B, j as A } from "../chunks/index.B2TRddqf.mjs";
4
4
  import { merge as f } from "@web-utils/integrations/lodash";
5
- import { g as K } from "../chunks/dictionary.C6NmC-bT.mjs";
5
+ import { g as K } from "../chunks/dictionary.DGt59Ir7.mjs";
6
6
  import { _ as T } from "../chunks/helper.BiMLcEEk.mjs";
7
7
  import "vue";
8
8
  import { n as b } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
@@ -0,0 +1,4 @@
1
+ export declare function initPhotoSwipe(options: any): void;
2
+ export declare function photoswipe(event: any, thumbnailsWrapperDom: any, options?: {
3
+ selector: string;
4
+ }): Promise<void>;
@@ -1,5 +1,36 @@
1
- import { P as a } from "../chunks/PhotoSwipe.BunkqqPu.mjs";
2
- import "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
1
+ import { p as o } from "../chunks/index.BmYCjxZQ.mjs";
2
+ import { n } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
3
+ const i = {
4
+ name: "PhotoSwipe",
5
+ props: {
6
+ urls: Array,
7
+ selector: {
8
+ type: String,
9
+ default: "img"
10
+ }
11
+ },
12
+ methods: {
13
+ async preview(e) {
14
+ await o(e, this.$refs.wrapper, { selector: this.selector });
15
+ }
16
+ }
17
+ };
18
+ var a = function() {
19
+ var r = this, t = r._self._c;
20
+ return t("div", { ref: "wrapper" }, [r._t("default", function() {
21
+ return r._l(r.urls, function(s) {
22
+ return t("img", { key: s.src, staticStyle: { cursor: "pointer" }, attrs: { width: "100", src: s.src, alt: "" }, on: { click: r.preview } });
23
+ });
24
+ }, { urls: r.urls, preview: r.preview })], 2);
25
+ }, c = [], p = /* @__PURE__ */ n(
26
+ i,
27
+ a,
28
+ c,
29
+ !1,
30
+ null,
31
+ null
32
+ );
33
+ const _ = p.exports;
3
34
  export {
4
- a as default
35
+ _ as default
5
36
  };
@@ -1,7 +1,7 @@
1
1
  import { isInContainer as u, delay as m, hasOwn as a, toStringArray as h } from "@web-utils/core";
2
2
  import { merge as b } from "@web-utils/integrations/lodash";
3
3
  import p from "../resize-observer/index.mjs";
4
- import "./resize-observer/style.css";
4
+ import "../resize-observer/style.css";
5
5
  import { n as v } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
6
6
  const f = [
7
7
  "back",
@@ -1,6 +1,6 @@
1
1
  import { n as f } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
2
2
  import l from "../resize-observer/index.mjs";
3
- import "./resize-observer/style.css";
3
+ import "../resize-observer/style.css";
4
4
  function h(e, t) {
5
5
  for (let s = 0; s < t.length; s++)
6
6
  if (e === t[s])
package/swiper/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { getEleWidth as r } from "@web-utils/core";
2
2
  import a from "../resize-observer/index.mjs";
3
- import "./resize-observer/style.css";
3
+ import "../resize-observer/style.css";
4
4
  import { n as o } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
5
  const h = {
6
6
  name: "Swiper",
@@ -1,6 +1,6 @@
1
1
  import { _ as T } from "../chunks/helper.BiMLcEEk.mjs";
2
2
  import { h as d } from "vue";
3
- import { g as C } from "../chunks/dictionary.C6NmC-bT.mjs";
3
+ import { g as C } from "../chunks/dictionary.DGt59Ir7.mjs";
4
4
  import { n as B } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
5
  import { f as V } from "../chunks/core.0Exl13Mz.mjs";
6
6
  const D = {
@@ -2,7 +2,7 @@ import { isFunction as p, toStringArray as f, isString as o, isArray as c, trace
2
2
  import { merge as i } from "@web-utils/integrations/lodash";
3
3
  import { g as m, h as w } from "../chunks/index.B2TRddqf.mjs";
4
4
  import g from "../form-item-config-provider/index.mjs";
5
- import { r as v, p as _ } from "../chunks/configComponents.DQaqUQFs.mjs";
5
+ import { reloadTable as v, processButtons as _ } from "../configComponents.mjs";
6
6
  import { t as a } from "../chunks/core.0Exl13Mz.mjs";
7
7
  import y from "element-ui/lib/transitions/collapse-transition";
8
8
  import { n as S } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
@@ -1,6 +1,6 @@
1
1
  import { toStringArray as a } from "@web-utils/core";
2
2
  import { merge as n } from "@web-utils/integrations/lodash";
3
- import { p as l } from "../chunks/configComponents.DQaqUQFs.mjs";
3
+ import { processButtons as l } from "../configComponents.mjs";
4
4
  import { n as i } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
5
  const u = [
6
6
  "back",
package/toolbar/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { h as p } from "vue";
2
2
  import { copy as m, NOOP as d } from "@web-utils/core";
3
- import { h as y, g } from "../chunks/configComponents.DQaqUQFs.mjs";
3
+ import { hasAuthority as y, goBack as g } from "../configComponents.mjs";
4
4
  import { n as B } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
5
  const u = {
6
6
  back: {
@@ -1,5 +1,5 @@
1
1
  import { isFunction as n, isArray as r } from "@web-utils/core";
2
- import { h as a } from "../chunks/configComponents.DQaqUQFs.mjs";
2
+ import { hasAuthority as a } from "../configComponents.mjs";
3
3
  import { n as l } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
4
4
  const s = {
5
5
  name: "ToolbarButton",
@@ -0,0 +1,10 @@
1
+ export default class RecordVideo {
2
+ private video;
3
+ private mediaRecorder;
4
+ private chunks;
5
+ constructor(videoObj: HTMLVideoElement);
6
+ init(): Promise<unknown>;
7
+ startRecord(): void;
8
+ stopRecord(): void;
9
+ isSupport(): true | undefined;
10
+ }
package/web-types.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "framework": "vue",
4
4
  "name": "@web-utils/component",
5
- "version": "4.0.10",
5
+ "version": "4.0.12",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "description-markup": "markdown",
@@ -1,80 +0,0 @@
1
- import g from "photoswipe";
2
- import "photoswipe/dist/photoswipe.css";
3
- import { n as u } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
4
- function d(t) {
5
- new g(t).init();
6
- }
7
- async function l(t, r, n = { selector: "chat-image" }) {
8
- const c = t.target;
9
- if (!(!c || c.classList.contains(n.selector) || c.tagName === "IMG"))
10
- return;
11
- const e = r.querySelectorAll(n.selector === "img" ? n.selector : `.${n.selector}`), a = [...e].findIndex((o) => o === c);
12
- a >= 0 && (n.index = a);
13
- const i = await w(e);
14
- await d({ dataSource: i, index: a });
15
- }
16
- async function w(t) {
17
- const r = [];
18
- for (let n = 0, c = t.length; n < c; n++) {
19
- const e = t[n], a = e.getAttribute("data-src") || e.getAttribute("src"), i = {
20
- src: a,
21
- msrc: a,
22
- alt: e.getAttribute("data-title") || e.getAttribute("alt"),
23
- element: e
24
- }, o = e.getAttribute("data-height"), h = e.getAttribute("data-width");
25
- let s = { width: h, height: o };
26
- !o && !h && (s = await f(e), e.setAttribute("data-height", s.height), e.setAttribute("data-width", s.width)), i.w = s.width, i.width = s.width, i.h = s.height, i.height = s.height, r.push(i);
27
- }
28
- return r;
29
- }
30
- function f(t) {
31
- const r = t.getAttribute("data-src") || t.getAttribute("src"), n = t.getAttribute("data-height"), c = t.getAttribute("data-width");
32
- return n && c ? { width: c, height: n } : t.complete ? {
33
- width: t.naturalWidth,
34
- height: t.naturalHeight
35
- } : new Promise((e) => {
36
- const a = new Image();
37
- a.src = r;
38
- const i = {};
39
- a.complete ? (i.width = a.width, i.height = a.height, e(i)) : (a.onload = () => {
40
- i.width = a.width, i.height = a.height, e(i);
41
- }, a.onerror = () => {
42
- i.width = 0, i.height = 0, e(i);
43
- });
44
- });
45
- }
46
- const m = {
47
- name: "PhotoSwipe",
48
- props: {
49
- urls: Array,
50
- selector: {
51
- type: String,
52
- default: "img"
53
- }
54
- },
55
- methods: {
56
- async preview(t) {
57
- await l(t, this.$refs.wrapper, { selector: this.selector });
58
- }
59
- }
60
- };
61
- var p = function() {
62
- var r = this, n = r._self._c;
63
- return n("div", { ref: "wrapper" }, [r._t("default", function() {
64
- return r._l(r.urls, function(c) {
65
- return n("img", { key: c.src, staticStyle: { cursor: "pointer" }, attrs: { width: "100", src: c.src, alt: "" }, on: { click: r.preview } });
66
- });
67
- }, { urls: r.urls, preview: r.preview })], 2);
68
- }, _ = [], b = /* @__PURE__ */ u(
69
- m,
70
- p,
71
- _,
72
- !1,
73
- null,
74
- null
75
- );
76
- const v = b.exports;
77
- export {
78
- v as P,
79
- l as p
80
- };