ik-next-ui 0.0.12 → 0.0.13

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.
@@ -1,11 +1,11 @@
1
- import { inject as f, computed as s, defineComponent as h, ref as U, resolveComponent as v, openBlock as x, createElementBlock as w, Fragment as k, createVNode as y, normalizeStyle as C, withCtx as b, createElementVNode as $, toDisplayString as z, createBlock as j, createCommentVNode as A } from "vue";
2
- const I = (e, t) => (e.install = (l) => {
3
- for (const o of [e, ...Object.values({})])
4
- l.component(o.name, o);
5
- }, e), _ = (e, t) => {
1
+ import { inject as f, computed as n, defineComponent as h, ref as U, resolveComponent as v, openBlock as x, createElementBlock as k, Fragment as w, createVNode as y, normalizeStyle as C, withCtx as b, createElementVNode as z, toDisplayString as j, createBlock as A, createCommentVNode as I } from "vue";
2
+ const _ = (e, t) => (e.install = (o) => {
3
+ for (const l of [e, ...Object.values({})])
4
+ o.component(l.name, l);
5
+ }, e), E = (e, t) => {
6
6
  if (!t) return "";
7
- const l = /(\/api\/server\/oss\/download\?fileUrl=)(.*)(\/api\/server\/oss\/download\?fileUrl=)/;
8
- return t.startsWith("http") ? t.replace(l, "$1$2") : `${e || location.origin}${t}`.replace(l, "$1$2");
7
+ const o = /fileUrl=[^&]*fileUrl=/;
8
+ return t.startsWith("http") ? t.replace(o, "fileUrl=") : `${e || location.origin}${t}`.replace(o, "fileUrl=");
9
9
  }, g = [
10
10
  "csv",
11
11
  "djvu",
@@ -61,20 +61,20 @@ const I = (e, t) => (e.install = (l) => {
61
61
  "mp4",
62
62
  "flv",
63
63
  "tls"
64
- ], E = (e) => {
65
- const t = f("loadUrl"), l = s(() => e.loadUrl || e.fileUrl || (t == null ? void 0 : t.value)), o = f("uploadUrl"), u = s(() => e.action || e.uploadUrl || (o == null ? void 0 : o.value)), a = f("token"), n = s(() => e.token || (a == null ? void 0 : a.value)), c = f("onlyofficeConfig"), i = s(() => e.onlyofficeConfig || (c == null ? void 0 : c.value)), r = f("userInfo"), d = s(() => e.userInfo || (r == null ? void 0 : r.value)), m = [...g, ...g.map((p) => p.toLocaleUpperCase())];
64
+ ], B = (e) => {
65
+ const t = f("loadUrl"), o = n(() => e.loadUrl || e.fileUrl || (t == null ? void 0 : t.value)), l = f("uploadUrl"), u = n(() => e.action || e.uploadUrl || (l == null ? void 0 : l.value)), c = f("token"), r = n(() => e.token || (c == null ? void 0 : c.value)), a = f("onlyofficeConfig"), i = n(() => e.onlyofficeConfig || (a == null ? void 0 : a.value)), s = f("userInfo"), m = n(() => e.userInfo || (s == null ? void 0 : s.value)), d = [...g, ...g.map((p) => p.toLocaleUpperCase())];
66
66
  return {
67
- cLoadUrl: l,
67
+ cLoadUrl: o,
68
68
  cUploadUrl: u,
69
- cToken: n,
69
+ cToken: r,
70
70
  cOnlyofficeConfig: i,
71
- cUserInfo: d,
72
- cOnlyofficePreviewType: m,
71
+ cUserInfo: m,
72
+ cOnlyofficePreviewType: d,
73
73
  cHeaders: {
74
- Authorization: n.value
74
+ Authorization: r.value
75
75
  }
76
76
  };
77
- }, B = { class: "text-sm text-white bg-[var(--el-avatar-bg-color)] flex-center h-full w-full" }, L = /* @__PURE__ */ h({
77
+ }, L = { class: "text-sm text-white bg-[var(--el-avatar-bg-color)] flex-center h-full w-full" }, N = /* @__PURE__ */ h({
78
78
  name: "IkAvatar",
79
79
  __name: "index",
80
80
  props: {
@@ -87,32 +87,32 @@ const I = (e, t) => (e.install = (l) => {
87
87
  loadUrl: {}
88
88
  },
89
89
  setup(e) {
90
- const t = e, l = s(() => {
90
+ const t = e, o = n(() => {
91
91
  var i;
92
92
  return ((i = t.name) == null ? void 0 : i.slice(-1)) || "";
93
- }), { cLoadUrl: o } = E(t), u = s(() => _(o.value, t.src || "")), a = s(() => t.src ? [u.value] : []), n = U(!1);
94
- function c() {
95
- t.src && (n.value = !0);
93
+ }), { cLoadUrl: l } = B(t), u = n(() => E(l.value, t.src || "")), c = n(() => t.src ? [u.value] : []), r = U(!1);
94
+ function a() {
95
+ t.src && (r.value = !0);
96
96
  }
97
- return (i, r) => {
98
- const d = v("ElAvatar"), m = v("el-image-viewer");
99
- return x(), w(
100
- k,
97
+ return (i, s) => {
98
+ const m = v("ElAvatar"), d = v("el-image-viewer");
99
+ return x(), k(
100
+ w,
101
101
  null,
102
102
  [
103
- y(d, {
103
+ y(m, {
104
104
  src: e.src,
105
105
  size: e.size,
106
106
  shape: e.shape,
107
107
  fit: e.fit,
108
108
  style: C({ "--el-avatar-bg-color": u.value ? "var(--ik-form-bg)" : "var(--ik-color-primary)" }),
109
- onClick: c
109
+ onClick: a
110
110
  }, {
111
111
  default: b(() => [
112
- $(
112
+ z(
113
113
  "span",
114
- B,
115
- z(l.value),
114
+ L,
115
+ j(o.value),
116
116
  1
117
117
  /* TEXT */
118
118
  )
@@ -120,21 +120,21 @@ const I = (e, t) => (e.install = (l) => {
120
120
  _: 1
121
121
  /* STABLE */
122
122
  }, 8, ["src", "size", "shape", "fit", "style"]),
123
- n.value ? (x(), j(m, {
123
+ r.value ? (x(), A(d, {
124
124
  key: 0,
125
- "url-list": a.value,
125
+ "url-list": c.value,
126
126
  "show-progress": "",
127
127
  teleported: "",
128
- onClose: r[0] || (r[0] = (p) => n.value = !1)
129
- }, null, 8, ["url-list"])) : A("v-if", !0)
128
+ onClose: s[0] || (s[0] = (p) => r.value = !1)
129
+ }, null, 8, ["url-list"])) : I("v-if", !0)
130
130
  ],
131
131
  64
132
132
  /* STABLE_FRAGMENT */
133
133
  );
134
134
  };
135
135
  }
136
- }), P = I(L);
136
+ }), V = _(N);
137
137
  export {
138
- P as IkAvatar,
139
- P as default
138
+ V as IkAvatar,
139
+ V as default
140
140
  };
@@ -650,8 +650,8 @@ const ti = (a, s) => {
650
650
  return (e % 1 === 0 ? e.toFixed(s || 0) : e.toFixed(s)) + " " + r[t];
651
651
  }, Dt = (a, s) => {
652
652
  if (!s) return "";
653
- const r = /(\/api\/server\/oss\/download\?fileUrl=)(.*)(\/api\/server\/oss\/download\?fileUrl=)/;
654
- return s.startsWith("http") ? s.replace(r, "$1$2") : `${a || location.origin}${s}`.replace(r, "$1$2");
653
+ const r = /fileUrl=[^&]*fileUrl=/;
654
+ return s.startsWith("http") ? s.replace(r, "fileUrl=") : `${a || location.origin}${s}`.replace(r, "fileUrl=");
655
655
  }, Da = [
656
656
  "csv",
657
657
  "djvu",
@@ -650,8 +650,8 @@ const ei = (a, s) => {
650
650
  return (e % 1 === 0 ? e.toFixed(s || 0) : e.toFixed(s)) + " " + r[t];
651
651
  }, Dt = (a, s) => {
652
652
  if (!s) return "";
653
- const r = /(\/api\/server\/oss\/download\?fileUrl=)(.*)(\/api\/server\/oss\/download\?fileUrl=)/;
654
- return s.startsWith("http") ? s.replace(r, "$1$2") : `${a || location.origin}${s}`.replace(r, "$1$2");
653
+ const r = /fileUrl=[^&]*fileUrl=/;
654
+ return s.startsWith("http") ? s.replace(r, "fileUrl=") : `${a || location.origin}${s}`.replace(r, "fileUrl=");
655
655
  }, Ra = [
656
656
  "csv",
657
657
  "djvu",
@@ -1,11 +1,11 @@
1
- import { inject as c, computed as a, defineComponent as y, resolveComponent as w, openBlock as I, createElementBlock as k, normalizeStyle as p, normalizeClass as U, createVNode as S, createSlots as b, withCtx as m, createElementVNode as d } from "vue";
2
- const C = (t, e) => (t.install = (l) => {
3
- for (const o of [t, ...Object.values({})])
4
- l.component(o.name, o);
5
- }, t), $ = (t, e) => {
1
+ import { inject as c, computed as a, defineComponent as y, resolveComponent as w, openBlock as U, createElementBlock as I, normalizeStyle as m, normalizeClass as k, createVNode as S, createSlots as b, withCtx as p, createElementVNode as d } from "vue";
2
+ const C = (t, e) => (t.install = (o) => {
3
+ for (const l of [t, ...Object.values({})])
4
+ o.component(l.name, l);
5
+ }, t), z = (t, e) => {
6
6
  if (!e) return "";
7
- const l = /(\/api\/server\/oss\/download\?fileUrl=)(.*)(\/api\/server\/oss\/download\?fileUrl=)/;
8
- return e.startsWith("http") ? e.replace(l, "$1$2") : `${t || location.origin}${e}`.replace(l, "$1$2");
7
+ const o = /fileUrl=[^&]*fileUrl=/;
8
+ return e.startsWith("http") ? e.replace(o, "fileUrl=") : `${t || location.origin}${e}`.replace(o, "fileUrl=");
9
9
  }, v = [
10
10
  "csv",
11
11
  "djvu",
@@ -61,10 +61,10 @@ const C = (t, e) => (t.install = (l) => {
61
61
  "mp4",
62
62
  "flv",
63
63
  "tls"
64
- ], z = (t) => {
65
- const e = c("loadUrl"), l = a(() => t.loadUrl || t.fileUrl || (e == null ? void 0 : e.value)), o = c("uploadUrl"), s = a(() => t.action || t.uploadUrl || (o == null ? void 0 : o.value)), n = c("token"), r = a(() => t.token || (n == null ? void 0 : n.value)), i = c("onlyofficeConfig"), u = a(() => t.onlyofficeConfig || (i == null ? void 0 : i.value)), f = c("userInfo"), x = a(() => t.userInfo || (f == null ? void 0 : f.value)), g = [...v, ...v.map((h) => h.toLocaleUpperCase())];
64
+ ], L = (t) => {
65
+ const e = c("loadUrl"), o = a(() => t.loadUrl || t.fileUrl || (e == null ? void 0 : e.value)), l = c("uploadUrl"), s = a(() => t.action || t.uploadUrl || (l == null ? void 0 : l.value)), n = c("token"), r = a(() => t.token || (n == null ? void 0 : n.value)), i = c("onlyofficeConfig"), u = a(() => t.onlyofficeConfig || (i == null ? void 0 : i.value)), f = c("userInfo"), x = a(() => t.userInfo || (f == null ? void 0 : f.value)), g = [...v, ...v.map((h) => h.toLocaleUpperCase())];
66
66
  return {
67
- cLoadUrl: l,
67
+ cLoadUrl: o,
68
68
  cUploadUrl: s,
69
69
  cToken: r,
70
70
  cOnlyofficeConfig: u,
@@ -74,7 +74,7 @@ const C = (t, e) => (t.install = (l) => {
74
74
  Authorization: r.value
75
75
  }
76
76
  };
77
- }, L = /* @__PURE__ */ y({
77
+ }, B = /* @__PURE__ */ y({
78
78
  name: "IkImage",
79
79
  __name: "index",
80
80
  props: {
@@ -94,7 +94,7 @@ const C = (t, e) => (t.install = (l) => {
94
94
  loadUrl: {}
95
95
  },
96
96
  setup(t) {
97
- const e = t, { cLoadUrl: l } = z(e), o = a(() => $(l.value, e.src || "")), s = a(() => e.previewSrcList && e.previewSrcList.length > 0 ? e.previewSrcList : o.value ? [o.value] : []), n = a(() => {
97
+ const e = t, { cLoadUrl: o } = L(e), l = a(() => z(o.value, e.src || "")), s = a(() => e.previewSrcList && e.previewSrcList.length > 0 ? e.previewSrcList : l.value ? [l.value] : []), n = a(() => {
98
98
  const r = {};
99
99
  if (e.radius) {
100
100
  const i = typeof e.radius == "number" ? `${e.radius}px` : e.radius;
@@ -104,28 +104,28 @@ const C = (t, e) => (t.install = (l) => {
104
104
  });
105
105
  return (r, i) => {
106
106
  const u = w("ElImage");
107
- return I(), k(
107
+ return U(), I(
108
108
  "div",
109
109
  {
110
- class: U(["ik-image", t.customClass]),
111
- style: p(n.value)
110
+ class: k(["ik-image", t.customClass]),
111
+ style: m(n.value)
112
112
  },
113
113
  [
114
114
  S(u, {
115
- src: o.value,
115
+ src: l.value,
116
116
  alt: t.alt,
117
117
  fit: t.fit,
118
118
  lazy: t.lazy,
119
119
  "preview-src-list": t.preview ? s.value : void 0,
120
120
  "initial-index": t.initialIndex,
121
- style: p(n.value)
121
+ style: m(n.value)
122
122
  }, b({
123
123
  _: 2
124
124
  /* DYNAMIC */
125
125
  }, [
126
126
  t.loadingSlot ? {
127
127
  name: "placeholder",
128
- fn: m(() => [
128
+ fn: p(() => [
129
129
  i[0] || (i[0] = d(
130
130
  "div",
131
131
  { class: "ik-image__placeholder" },
@@ -140,7 +140,7 @@ const C = (t, e) => (t.install = (l) => {
140
140
  } : void 0,
141
141
  t.errorSlot ? {
142
142
  name: "error",
143
- fn: m(() => [
143
+ fn: p(() => [
144
144
  i[1] || (i[1] = d(
145
145
  "div",
146
146
  { class: "ik-image__error" },
@@ -161,12 +161,12 @@ const C = (t, e) => (t.install = (l) => {
161
161
  );
162
162
  };
163
163
  }
164
- }), B = (t, e) => {
165
- const l = t.__vccOpts || t;
166
- for (const [o, s] of e)
167
- l[o] = s;
168
- return l;
169
- }, j = /* @__PURE__ */ B(L, [["__scopeId", "data-v-ec2e9337"]]), O = C(j);
164
+ }), j = (t, e) => {
165
+ const o = t.__vccOpts || t;
166
+ for (const [l, s] of e)
167
+ o[l] = s;
168
+ return o;
169
+ }, $ = /* @__PURE__ */ j(B, [["__scopeId", "data-v-ec2e9337"]]), O = C($);
170
170
  export {
171
171
  O as IkImage,
172
172
  O as default