iking-web-ui-pro 0.2.11 → 0.2.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.
Files changed (64) hide show
  1. package/dist/IKDetailPreviewFiles/ik.index.es.js +116 -111
  2. package/dist/IKDetailPreviewFiles/ik.index.umd.js +1 -1
  3. package/dist/IKDetailPreviewFiles/style.css +1 -1
  4. package/dist/IKExpandCollapse/ik.index.es.js +2 -2
  5. package/dist/IKExpandCollapse/ik.index.umd.js +1 -1
  6. package/dist/IKExpandCollapse/style.css +1 -1
  7. package/dist/IKPreviewFile/ik.index.es.js +172 -167
  8. package/dist/IKPreviewFile/ik.index.umd.js +1 -1
  9. package/dist/IKPreviewFile/style.css +1 -1
  10. package/dist/IKVerticalStepBar/ik.index.es.js +2 -2
  11. package/dist/IKVerticalStepBar/ik.index.umd.js +1 -1
  12. package/dist/IKVerticalStepBar/style.css +1 -1
  13. package/dist/IkApprovalProcess/ik.index.es.js +194 -190
  14. package/dist/IkApprovalProcess/ik.index.umd.js +1 -1
  15. package/dist/IkApprovalProcessDetail/ik.index.es.js +645 -636
  16. package/dist/IkApprovalProcessDetail/ik.index.umd.js +1 -1
  17. package/dist/IkApprovalProcessDetail/style.css +1 -1
  18. package/dist/IkBaseDialog/ik.index.es.js +2 -2
  19. package/dist/IkBaseDialog/ik.index.umd.js +1 -1
  20. package/dist/IkBaseDialog/style.css +1 -1
  21. package/dist/IkBtnSetting/ik.index.es.js +2 -2
  22. package/dist/IkBtnSetting/ik.index.umd.js +1 -1
  23. package/dist/IkBtnSetting/style.css +1 -1
  24. package/dist/IkCollapseCard/ik.index.es.js +2 -2
  25. package/dist/IkCollapseCard/ik.index.umd.js +1 -1
  26. package/dist/IkCollapseCard/style.css +1 -1
  27. package/dist/IkDescription/ik.index.es.js +329 -324
  28. package/dist/IkDescription/ik.index.umd.js +1 -1
  29. package/dist/IkDescription/style.css +1 -1
  30. package/dist/IkIconPicker/ik.index.es.js +2 -2
  31. package/dist/IkIconPicker/ik.index.umd.js +1 -1
  32. package/dist/IkIconPicker/style.css +1 -1
  33. package/dist/IkMonacoEditor/ik.index.es.js +2 -2
  34. package/dist/IkMonacoEditor/ik.index.umd.js +1 -1
  35. package/dist/IkMonacoEditor/style.css +1 -1
  36. package/dist/IkPageFull/ik.index.es.js +2 -2
  37. package/dist/IkPageFull/ik.index.umd.js +1 -1
  38. package/dist/IkPageFull/style.css +1 -1
  39. package/dist/IkPreviewFileDialog/ik.index.es.js +206 -203
  40. package/dist/IkPreviewFileDialog/ik.index.umd.js +1 -1
  41. package/dist/IkPreviewFileDialog/style.css +1 -1
  42. package/dist/IkSchedule/ik.index.es.js +2 -2
  43. package/dist/IkSchedule/ik.index.umd.js +1 -1
  44. package/dist/IkSchedule/style.css +1 -1
  45. package/dist/IkSideText/ik.index.es.js +2 -2
  46. package/dist/IkSideText/ik.index.umd.js +1 -1
  47. package/dist/IkSideText/style.css +1 -1
  48. package/dist/IkSvgIcon/ik.index.es.js +8 -8
  49. package/dist/IkSvgIcon/ik.index.umd.js +1 -1
  50. package/dist/IkSvgIcon/style.css +1 -1
  51. package/dist/IkUploadFile/ik.index.es.js +112 -109
  52. package/dist/IkUploadFile/ik.index.umd.js +1 -1
  53. package/dist/IkUploadFile/style.css +1 -1
  54. package/dist/IkUploadImage/ik.index.es.js +84 -84
  55. package/dist/IkUploadImage/ik.index.umd.js +1 -1
  56. package/dist/IkUploadImage/style.css +1 -1
  57. package/dist/index.es.js +12672 -12663
  58. package/dist/index.umd.js +60 -60
  59. package/dist/src/components/IkMonacoEditor/src/editor-config.d.ts +1 -1
  60. package/dist/src/components/IkPlayer-beta/index.d.ts +76 -0
  61. package/dist/src/components/IkPlayer-beta/src/player.d.ts +19 -0
  62. package/dist/style.css +1 -1
  63. package/package.json +1 -1
  64. package/dist/src/components/IkPickerUser/src/list/utils.d.ts +0 -3
@@ -1,21 +1,21 @@
1
- import { defineComponent as y, inject as X, computed as C, resolveComponent as z, openBlock as r, createElementBlock as f, normalizeClass as _, normalizeStyle as m, createCommentVNode as R, createElementVNode as I, createBlock as k, withCtx as h, createTextVNode as B, toDisplayString as O, createVNode as D, unref as w, mergeModels as H, useModel as W, ref as q, h as Y, mergeProps as G, createSlots as K, renderSlot as S, reactive as J, watch as Q, nextTick as Z, Fragment as ee } from "vue";
2
- import { ikColor as te, buildUUID as ne } from "iking-utils-pro";
1
+ import { defineComponent as y, inject as Y, computed as C, resolveComponent as D, openBlock as r, createElementBlock as f, normalizeClass as _, normalizeStyle as m, createCommentVNode as k, createElementVNode as I, createBlock as b, withCtx as h, createTextVNode as B, toDisplayString as O, createVNode as z, unref as w, mergeModels as W, useModel as N, ref as q, h as G, mergeProps as K, createSlots as J, renderSlot as S, reactive as Q, watch as Z, nextTick as ee, Fragment as te } from "vue";
2
+ import { ikColor as ne, buildUUID as oe } from "iking-utils-pro";
3
3
  const E = (n, t) => {
4
- if (n.install = (o) => {
4
+ if (n.install = (i) => {
5
5
  for (const e of [n, ...Object.values(t ?? {})])
6
- o.component(e.name, e);
6
+ i.component(e.name, e);
7
7
  }, t)
8
- for (const [o, e] of Object.entries(t))
9
- n[o] = e;
8
+ for (const [i, e] of Object.entries(t))
9
+ n[i] = e;
10
10
  return n;
11
11
  }, M = (n, t) => t ? t.startsWith("http") ? t : `${n || location.origin}${t}` : "", V = (n, t) => {
12
- const o = n.__vccOpts || n;
13
- for (const [e, l] of t)
14
- o[e] = l;
15
- return o;
16
- }, oe = (n, t) => {
17
- var i, s, c, d;
18
- const o = (i = n == null ? void 0 : n.response) != null && i.data ? L((c = (s = n == null ? void 0 : n.response) == null ? void 0 : s.data) == null ? void 0 : c.suffix) : ((d = n.raw) == null ? void 0 : d.type) || L(n[t.suffix]), e = o == null ? void 0 : o.toLowerCase(), l = {
12
+ const i = n.__vccOpts || n;
13
+ for (const [e, a] of t)
14
+ i[e] = a;
15
+ return i;
16
+ }, L = (n, t) => {
17
+ var s, o, c, d;
18
+ const i = (s = n == null ? void 0 : n.response) != null && s.data ? U((c = (o = n == null ? void 0 : n.response) == null ? void 0 : o.data) == null ? void 0 : c.suffix) : ((d = n.raw) == null ? void 0 : d.type) || U(n[t.suffix]), e = i == null ? void 0 : i.toLowerCase(), a = {
19
19
  sheet: "excel",
20
20
  excel: "excel",
21
21
  zip: "zip",
@@ -31,9 +31,9 @@ const E = (n, t) => {
31
31
  exe: "exe",
32
32
  json: "json"
33
33
  };
34
- for (let a in l)
35
- if (typeof e == "string" && (e.includes(a) || e === a))
36
- return l[a];
34
+ for (let l in a)
35
+ if (typeof e == "string" && (e.includes(l) || e === l))
36
+ return a[l];
37
37
  return "unknown";
38
38
  }, ie = {
39
39
  ".doc": "word",
@@ -120,16 +120,16 @@ const E = (n, t) => {
120
120
  ".vob": "video",
121
121
  ".txt": "txt",
122
122
  ".pdf": "pdf"
123
- }, L = (n) => {
124
- const t = n == null ? void 0 : n.toLocaleLowerCase(), o = t != null && t.startsWith(".") ? t : `.${t}`;
125
- return o && ie[o] || "unknow";
123
+ }, U = (n) => {
124
+ const t = n == null ? void 0 : n.toLocaleLowerCase(), i = t != null && t.startsWith(".") ? t : `.${t}`;
125
+ return i && ie[i] || "unknow";
126
126
  }, se = (n) => {
127
- let t = "", o = ["doc", "docx"], e = ["xls", "xlsx"], l = ["ppt", "pptx"], i = ["pdf"];
128
- return o.includes(n) && (t = "word"), e.includes(n) && (t = "cell"), l.includes(n) && (t = "slide"), i.includes(n) && (t = "text-pdf"), t;
129
- }, ae = {
130
- key: 0,
131
- class: "ik-svg-icon ik-icon inline-block inline-flex justify-center box-content line-height-[0]"
127
+ let t = "", i = ["doc", "docx"], e = ["xls", "xlsx"], a = ["ppt", "pptx"], s = ["pdf"];
128
+ return i.includes(n) && (t = "word"), e.includes(n) && (t = "cell"), a.includes(n) && (t = "slide"), s.includes(n) && (t = "text-pdf"), t;
132
129
  }, le = {
130
+ key: 0,
131
+ class: "ik-svg-icon ik-icon-span inline-block inline-flex justify-center box-content line-height-[0]"
132
+ }, ae = {
133
133
  key: 1,
134
134
  class: "h-[1em] w-[1em]",
135
135
  "aria-hidden": "true"
@@ -164,78 +164,78 @@ const E = (n, t) => {
164
164
  tableIconType: {}
165
165
  },
166
166
  setup(n) {
167
- const t = n, o = X("iconConfig"), e = C(() => ({
168
- ...(o == null ? void 0 : o.value) || {},
167
+ const t = n, i = Y("iconConfig"), e = C(() => ({
168
+ ...(i == null ? void 0 : i.value) || {},
169
169
  ...t
170
- })), l = C(() => {
171
- const { name: s } = e.value;
172
- return /^http?:\/\//.test(s) ? "img" : /i-[^:]+:[^:]+/.test(s) ? "unocss" : s != null && s.startsWith("iksig") ? "iksig" : s != null && s.includes(":") ? "iconify" : s != null && s.startsWith("iksvg") ? "svg" : "i";
173
- }), i = C(() => {
174
- const s = [];
170
+ })), a = C(() => {
171
+ const { name: o } = e.value;
172
+ return /^http?:\/\//.test(o) ? "img" : /i-[^:]+:[^:]+/.test(o) ? "unocss" : o != null && o.startsWith("iksig") ? "iksig" : o != null && o.includes(":") ? "iconify" : o != null && o.startsWith("iksvg") ? "svg" : "i";
173
+ }), s = C(() => {
174
+ const o = [];
175
175
  if (e.value.flip)
176
176
  switch (e.value.flip) {
177
177
  case "horizontal":
178
- s.push("rotateY(180deg)");
178
+ o.push("rotateY(180deg)");
179
179
  break;
180
180
  case "vertical":
181
- s.push("rotateX(180deg)");
181
+ o.push("rotateX(180deg)");
182
182
  break;
183
183
  case "both":
184
- s.push("rotateX(180deg)"), s.push("rotateY(180deg)");
184
+ o.push("rotateX(180deg)"), o.push("rotateY(180deg)");
185
185
  break;
186
186
  }
187
- e.value.rotate && s.push(`rotate(${e.value.rotate % 360}deg)`);
187
+ e.value.rotate && o.push(`rotate(${e.value.rotate % 360}deg)`);
188
188
  const c = {
189
189
  ...e.value.color && { color: e.value.color },
190
190
  ...e.value.size && { fontSize: typeof e.value.size == "number" ? `${e.value.size}px` : e.value.size },
191
- ...s.length && { transform: s.join(" ") },
191
+ ...o.length && { transform: o.join(" ") },
192
192
  padding: e.value.showBg || e.value.bg ? e.value.padding : 0,
193
- ...e.value.color && l.value !== "iksig" ? {
193
+ ...e.value.color && a.value !== "iksig" ? {
194
194
  "--ik-color-icon-dark": e.value.color,
195
- "--ik-color-icon-light": e.value.colorLight || te.setOpacity(e.value.color, e.value.opacity)
195
+ "--ik-color-icon-light": e.value.colorLight || ne.setOpacity(e.value.color, e.value.opacity)
196
196
  } : {}
197
197
  };
198
198
  return e.value.width && (c.width = c.height = typeof e.value.width == "number" ? `${e.value.width}px` : e.value.width), c;
199
199
  });
200
- return (s, c) => {
201
- const d = z("el-tooltip"), a = z("el-button");
202
- return e.value.tableIconType === "icon" || !e.value.tableIconType ? (r(), f("span", ae, [
200
+ return (o, c) => {
201
+ const d = D("el-tooltip"), l = D("el-button");
202
+ return e.value.tableIconType === "icon" || !e.value.tableIconType ? (r(), f("span", le, [
203
203
  e.value.notip || !e.value.title ? (r(), f(
204
204
  "i",
205
205
  {
206
206
  key: 0,
207
207
  class: _(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
208
- [s.name]: l.value === "unocss",
208
+ [o.name]: a.value === "unocss",
209
209
  "show-bg": e.value.showBg || e.value.bg,
210
210
  default: e.value.size === "default",
211
211
  small: e.value.size === "small",
212
212
  big: e.value.size === "big",
213
213
  warning: e.value.warning || e.value.type === "warning",
214
214
  primary: e.value.primary || e.value.type === "primary",
215
- success: s.success || e.value.type === "success",
215
+ success: o.success || e.value.type === "success",
216
216
  error: e.value.error || e.value.type === "error",
217
217
  active: e.value.active,
218
218
  disabled: e.value.disabled
219
219
  }]),
220
- style: m(i.value)
220
+ style: m(s.value)
221
221
  },
222
222
  [
223
- R(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),
224
- l.value === "iksig" ? (r(), f(
223
+ k(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),
224
+ a.value === "iksig" ? (r(), f(
225
225
  "i",
226
226
  {
227
227
  key: 0,
228
228
  class: _(`iksig ${e.value.name}`),
229
- style: m(i.value)
229
+ style: m(s.value)
230
230
  },
231
231
  null,
232
232
  6
233
233
  /* CLASS, STYLE */
234
- )) : l.value === "svg" ? (r(), f("svg", le, [
234
+ )) : a.value === "svg" ? (r(), f("svg", ae, [
235
235
  I("use", {
236
236
  "xlink:href": `#${e.value.name}`
237
237
  }, null, 8, re)
238
- ])) : l.value === "img" ? (r(), f("img", {
238
+ ])) : a.value === "img" ? (r(), f("img", {
239
239
  key: 2,
240
240
  src: e.value.name,
241
241
  class: "h-[1em] w-[1em]"
@@ -244,7 +244,7 @@ const E = (n, t) => {
244
244
  {
245
245
  key: 3,
246
246
  class: _(e.value.name),
247
- style: m(i.value)
247
+ style: m(s.value)
248
248
  },
249
249
  null,
250
250
  6
@@ -253,7 +253,7 @@ const E = (n, t) => {
253
253
  ],
254
254
  6
255
255
  /* CLASS, STYLE */
256
- )) : (r(), k(d, {
256
+ )) : (r(), b(d, {
257
257
  key: 1,
258
258
  content: e.value.title,
259
259
  placement: "top"
@@ -263,35 +263,35 @@ const E = (n, t) => {
263
263
  "i",
264
264
  {
265
265
  class: _(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
266
- [s.name]: l.value === "unocss",
266
+ [o.name]: a.value === "unocss",
267
267
  "show-bg": e.value.showBg || e.value.bg,
268
268
  default: e.value.size === "default",
269
269
  small: e.value.size === "small",
270
270
  big: e.value.size === "big",
271
271
  warning: e.value.warning || e.value.type === "warning",
272
- primary: s.primary || e.value.type === "primary",
273
- success: s.success || e.value.type === "success",
272
+ primary: o.primary || e.value.type === "primary",
273
+ success: o.success || e.value.type === "success",
274
274
  error: e.value.error || e.value.type === "error",
275
275
  active: e.value.active
276
276
  }]),
277
- style: m(i.value)
277
+ style: m(s.value)
278
278
  },
279
279
  [
280
- l.value === "iksig" ? (r(), f(
280
+ a.value === "iksig" ? (r(), f(
281
281
  "i",
282
282
  {
283
283
  key: 0,
284
284
  class: _(`iksig ${e.value.name}`),
285
- style: m(i.value)
285
+ style: m(s.value)
286
286
  },
287
287
  null,
288
288
  6
289
289
  /* CLASS, STYLE */
290
- )) : l.value === "svg" ? (r(), f("svg", ue, [
290
+ )) : a.value === "svg" ? (r(), f("svg", ue, [
291
291
  I("use", {
292
292
  "xlink:href": `#${e.value.name}`
293
293
  }, null, 8, de)
294
- ])) : l.value === "img" ? (r(), f("img", {
294
+ ])) : a.value === "img" ? (r(), f("img", {
295
295
  key: 2,
296
296
  src: e.value.name,
297
297
  class: "h-[1em] w-[1em]"
@@ -300,7 +300,7 @@ const E = (n, t) => {
300
300
  {
301
301
  key: 3,
302
302
  class: _(e.value.name),
303
- style: m(i.value)
303
+ style: m(s.value)
304
304
  },
305
305
  null,
306
306
  6
@@ -314,7 +314,7 @@ const E = (n, t) => {
314
314
  _: 1
315
315
  /* STABLE */
316
316
  }, 8, ["content"]))
317
- ])) : (r(), k(a, {
317
+ ])) : (r(), b(l, {
318
318
  key: 1,
319
319
  type: ["warning", "error"].includes(e.value.type) ? "danger" : ""
320
320
  }, {
@@ -331,7 +331,7 @@ const E = (n, t) => {
331
331
  };
332
332
  }
333
333
  });
334
- const ve = /* @__PURE__ */ V(fe, [["__scopeId", "data-v-7729b79a"]]), $ = E(ve), ge = {
334
+ const ve = /* @__PURE__ */ V(fe, [["__scopeId", "data-v-76d7e119"]]), $ = E(ve), ge = {
335
335
  key: 0,
336
336
  class: "exit-main-page-maximize"
337
337
  }, me = /* @__PURE__ */ y({
@@ -347,15 +347,15 @@ const ve = /* @__PURE__ */ V(fe, [["__scopeId", "data-v-7729b79a"]]), $ = E(ve),
347
347
  }
348
348
  },
349
349
  setup(n) {
350
- return (t, o) => (r(), f("div", null, [
350
+ return (t, i) => (r(), f("div", null, [
351
351
  n.showBg && n.fullscreen ? (r(), f("div", ge, [
352
- D(w($), {
352
+ z(w($), {
353
353
  name: "iksvg_guanbidanchuang",
354
354
  title: "关闭",
355
355
  size: 20,
356
356
  error: ""
357
357
  })
358
- ])) : (r(), k(w($), {
358
+ ])) : (r(), b(w($), {
359
359
  key: 1,
360
360
  error: "",
361
361
  name: "iksvg_guanbidanchuang",
@@ -367,7 +367,7 @@ const ve = /* @__PURE__ */ V(fe, [["__scopeId", "data-v-7729b79a"]]), $ = E(ve),
367
367
  });
368
368
  const he = /* @__PURE__ */ V(me, [["__scopeId", "data-v-79f49df8"]]), ye = { class: "base-header" }, we = /* @__PURE__ */ y({
369
369
  __name: "IkBaseDialog",
370
- props: /* @__PURE__ */ H({
370
+ props: /* @__PURE__ */ W({
371
371
  title: { default: "" },
372
372
  cancelText: { default: "取消" },
373
373
  confirmText: { default: "确认" },
@@ -386,31 +386,31 @@ const he = /* @__PURE__ */ V(me, [["__scopeId", "data-v-79f49df8"]]), ye = { cla
386
386
  }),
387
387
  emits: ["update:modelValue"],
388
388
  setup(n) {
389
- const t = n, o = W(n, "modelValue"), e = q(t.fullscreen), l = () => {
389
+ const t = n, i = N(n, "modelValue"), e = q(t.fullscreen), a = () => {
390
390
  e.value = !e.value;
391
- }, i = y({
391
+ }, s = y({
392
392
  setup() {
393
- return () => Y(he, {
393
+ return () => G(he, {
394
394
  showBg: t.showCloseBg,
395
395
  fullscreen: t.fullscreen
396
396
  });
397
397
  }
398
398
  });
399
- return (s, c) => {
400
- const d = z("el-dialog");
401
- return r(), k(d, G({
402
- modelValue: o.value,
403
- "onUpdate:modelValue": c[0] || (c[0] = (a) => o.value = a)
404
- }, s.$attrs, {
405
- "close-icon": w(i),
406
- class: `ik-base-dialog ${s.noHeader ? "no-header" : ""} ${s.noFooter ? "no-footer" : ""}`,
399
+ return (o, c) => {
400
+ const d = D("el-dialog");
401
+ return r(), b(d, K({
402
+ modelValue: i.value,
403
+ "onUpdate:modelValue": c[0] || (c[0] = (l) => i.value = l)
404
+ }, o.$attrs, {
405
+ "close-icon": w(s),
406
+ class: `ik-base-dialog ${o.noHeader ? "no-header" : ""} ${o.noFooter ? "no-footer" : ""}`,
407
407
  fullscreen: e.value,
408
408
  "modal-class": "baseDialog"
409
- }), K({
409
+ }), J({
410
410
  icon: h(() => [
411
- S(s.$slots, "title", {}, () => [
411
+ S(o.$slots, "title", {}, () => [
412
412
  B(
413
- O(s.title),
413
+ O(o.title),
414
414
  1
415
415
  /* TEXT */
416
416
  )
@@ -418,32 +418,32 @@ const he = /* @__PURE__ */ V(me, [["__scopeId", "data-v-79f49df8"]]), ye = { cla
418
418
  ]),
419
419
  header: h(() => [
420
420
  I("div", ye, [
421
- S(s.$slots, "header", {}, () => [
421
+ S(o.$slots, "header", {}, () => [
422
422
  B(
423
- O(s.title),
423
+ O(o.title),
424
424
  1
425
425
  /* TEXT */
426
426
  )
427
427
  ])
428
428
  ]),
429
- s.$attrs.showClose ? (r(), k(w($), {
429
+ o.$attrs.showClose ? (r(), b(w($), {
430
430
  key: 0,
431
- onClick: l,
431
+ onClick: a,
432
432
  name: e.value ? "iksvg_tuichuquanping" : "iksvg_quanping-daohang",
433
433
  class: "absolute! top-[18px] right-[50px] icon-dialog-full",
434
434
  title: e.value ? "退出全屏" : "全屏"
435
- }, null, 8, ["name", "title"])) : R("v-if", !0)
435
+ }, null, 8, ["name", "title"])) : k("v-if", !0)
436
436
  ]),
437
437
  default: h(() => [
438
- S(s.$slots, "default")
438
+ S(o.$slots, "default")
439
439
  ]),
440
440
  _: 2
441
441
  /* DYNAMIC */
442
442
  }, [
443
- s.$slots.footer ? {
443
+ o.$slots.footer ? {
444
444
  name: "footer",
445
445
  fn: h(() => [
446
- S(s.$slots, "footer")
446
+ S(o.$slots, "footer")
447
447
  ]),
448
448
  key: "0"
449
449
  } : void 0
@@ -452,118 +452,118 @@ const he = /* @__PURE__ */ V(me, [["__scopeId", "data-v-79f49df8"]]), ye = { cla
452
452
  }
453
453
  });
454
454
  const _e = E(we);
455
- function ke(n, t, o, e) {
456
- function l(i) {
457
- return i instanceof o ? i : new o(function(s) {
458
- s(i);
455
+ function ke(n, t, i, e) {
456
+ function a(s) {
457
+ return s instanceof i ? s : new i(function(o) {
458
+ o(s);
459
459
  });
460
460
  }
461
- return new (o || (o = Promise))(function(i, s) {
461
+ return new (i || (i = Promise))(function(s, o) {
462
462
  function c(u) {
463
463
  try {
464
- a(e.next(u));
464
+ l(e.next(u));
465
465
  } catch (v) {
466
- s(v);
466
+ o(v);
467
467
  }
468
468
  }
469
469
  function d(u) {
470
470
  try {
471
- a(e.throw(u));
471
+ l(e.throw(u));
472
472
  } catch (v) {
473
- s(v);
473
+ o(v);
474
474
  }
475
475
  }
476
- function a(u) {
477
- u.done ? i(u.value) : l(u.value).then(c, d);
476
+ function l(u) {
477
+ u.done ? s(u.value) : a(u.value).then(c, d);
478
478
  }
479
- a((e = e.apply(n, t || [])).next());
479
+ l((e = e.apply(n, t || [])).next());
480
480
  });
481
481
  }
482
482
  function be(n, t) {
483
- var o = { label: 0, sent: function() {
484
- if (i[0] & 1)
485
- throw i[1];
486
- return i[1];
487
- }, trys: [], ops: [] }, e, l, i, s;
488
- return s = { next: c(0), throw: c(1), return: c(2) }, typeof Symbol == "function" && (s[Symbol.iterator] = function() {
483
+ var i = { label: 0, sent: function() {
484
+ if (s[0] & 1)
485
+ throw s[1];
486
+ return s[1];
487
+ }, trys: [], ops: [] }, e, a, s, o;
488
+ return o = { next: c(0), throw: c(1), return: c(2) }, typeof Symbol == "function" && (o[Symbol.iterator] = function() {
489
489
  return this;
490
- }), s;
491
- function c(a) {
490
+ }), o;
491
+ function c(l) {
492
492
  return function(u) {
493
- return d([a, u]);
493
+ return d([l, u]);
494
494
  };
495
495
  }
496
- function d(a) {
496
+ function d(l) {
497
497
  if (e)
498
498
  throw new TypeError("Generator is already executing.");
499
- for (; s && (s = 0, a[0] && (o = 0)), o; )
499
+ for (; o && (o = 0, l[0] && (i = 0)), i; )
500
500
  try {
501
- if (e = 1, l && (i = a[0] & 2 ? l.return : a[0] ? l.throw || ((i = l.return) && i.call(l), 0) : l.next) && !(i = i.call(l, a[1])).done)
502
- return i;
503
- switch (l = 0, i && (a = [a[0] & 2, i.value]), a[0]) {
501
+ if (e = 1, a && (s = l[0] & 2 ? a.return : l[0] ? a.throw || ((s = a.return) && s.call(a), 0) : a.next) && !(s = s.call(a, l[1])).done)
502
+ return s;
503
+ switch (a = 0, s && (l = [l[0] & 2, s.value]), l[0]) {
504
504
  case 0:
505
505
  case 1:
506
- i = a;
506
+ s = l;
507
507
  break;
508
508
  case 4:
509
- return o.label++, { value: a[1], done: !1 };
509
+ return i.label++, { value: l[1], done: !1 };
510
510
  case 5:
511
- o.label++, l = a[1], a = [0];
511
+ i.label++, a = l[1], l = [0];
512
512
  continue;
513
513
  case 7:
514
- a = o.ops.pop(), o.trys.pop();
514
+ l = i.ops.pop(), i.trys.pop();
515
515
  continue;
516
516
  default:
517
- if (i = o.trys, !(i = i.length > 0 && i[i.length - 1]) && (a[0] === 6 || a[0] === 2)) {
518
- o = 0;
517
+ if (s = i.trys, !(s = s.length > 0 && s[s.length - 1]) && (l[0] === 6 || l[0] === 2)) {
518
+ i = 0;
519
519
  continue;
520
520
  }
521
- if (a[0] === 3 && (!i || a[1] > i[0] && a[1] < i[3])) {
522
- o.label = a[1];
521
+ if (l[0] === 3 && (!s || l[1] > s[0] && l[1] < s[3])) {
522
+ i.label = l[1];
523
523
  break;
524
524
  }
525
- if (a[0] === 6 && o.label < i[1]) {
526
- o.label = i[1], i = a;
525
+ if (l[0] === 6 && i.label < s[1]) {
526
+ i.label = s[1], s = l;
527
527
  break;
528
528
  }
529
- if (i && o.label < i[2]) {
530
- o.label = i[2], o.ops.push(a);
529
+ if (s && i.label < s[2]) {
530
+ i.label = s[2], i.ops.push(l);
531
531
  break;
532
532
  }
533
- i[2] && o.ops.pop(), o.trys.pop();
533
+ s[2] && i.ops.pop(), i.trys.pop();
534
534
  continue;
535
535
  }
536
- a = t.call(n, o);
536
+ l = t.call(n, i);
537
537
  } catch (u) {
538
- a = [6, u], l = 0;
538
+ l = [6, u], a = 0;
539
539
  } finally {
540
- e = i = 0;
540
+ e = s = 0;
541
541
  }
542
- if (a[0] & 5)
543
- throw a[1];
544
- return { value: a[0] ? a[1] : void 0, done: !0 };
542
+ if (l[0] & 5)
543
+ throw l[1];
544
+ return { value: l[0] ? l[1] : void 0, done: !0 };
545
545
  }
546
546
  }
547
547
  var xe = function(n, t) {
548
548
  return ke(void 0, void 0, void 0, function() {
549
- return be(this, function(o) {
550
- return [2, new Promise(function(e, l) {
549
+ return be(this, function(i) {
550
+ return [2, new Promise(function(e, a) {
551
551
  try {
552
552
  if (window.DocsAPI)
553
553
  return e(null);
554
- var i = document.getElementById(t);
555
- if (i)
556
- var s = setInterval(function() {
557
- var d = i.getAttribute("loading");
554
+ var s = document.getElementById(t);
555
+ if (s)
556
+ var o = setInterval(function() {
557
+ var d = s.getAttribute("loading");
558
558
  if (!d) {
559
- if (clearInterval(s), window.DocsAPI)
559
+ if (clearInterval(o), window.DocsAPI)
560
560
  return e(null);
561
- var a = U(t, n, e, l);
562
- i.remove(), document.body.appendChild(a);
561
+ var l = H(t, n, e, a);
562
+ s.remove(), document.body.appendChild(l);
563
563
  }
564
564
  }, 500);
565
565
  else {
566
- var c = U(t, n, e, l);
566
+ var c = H(t, n, e, a);
567
567
  document.body.appendChild(c);
568
568
  }
569
569
  } catch (d) {
@@ -572,13 +572,13 @@ var xe = function(n, t) {
572
572
  })];
573
573
  });
574
574
  });
575
- }, U = function(n, t, o, e) {
576
- var l = document.createElement("script");
577
- return l.id = n, l.type = "text/javascript", l.src = t, l.async = !0, l.onload = function() {
578
- l.removeAttribute("loading"), o(null);
579
- }, l.onerror = function(i) {
580
- l.removeAttribute("loading"), e(i);
581
- }, l.setAttribute("loading", ""), l;
575
+ }, H = function(n, t, i, e) {
576
+ var a = document.createElement("script");
577
+ return a.id = n, a.type = "text/javascript", a.src = t, a.async = !0, a.onload = function() {
578
+ a.removeAttribute("loading"), i(null);
579
+ }, a.onerror = function(s) {
580
+ a.removeAttribute("loading"), e(s);
581
+ }, a.setAttribute("loading", ""), a;
582
582
  }, T = y({
583
583
  name: "DocumentEditor",
584
584
  props: {
@@ -633,8 +633,8 @@ var xe = function(n, t) {
633
633
  mounted: function() {
634
634
  var n = this, t = this.documentServerUrl;
635
635
  t.endsWith("/") || (t += "/");
636
- var o = "".concat(t, "web-apps/apps/api/documents/api.js");
637
- xe(o, "onlyoffice-api-script").then(function() {
636
+ var i = "".concat(t, "web-apps/apps/api/documents/api.js");
637
+ xe(i, "onlyoffice-api-script").then(function() {
638
638
  return n.onLoad();
639
639
  }).catch(function() {
640
640
  n.onError(-2);
@@ -677,9 +677,9 @@ var xe = function(n, t) {
677
677
  onLoad: function() {
678
678
  var n, t;
679
679
  try {
680
- var o = this.id || "";
681
- if (window.DocsAPI || this.onError(-3), !((n = window == null ? void 0 : window.DocEditor) === null || n === void 0) && n.instances[o]) {
682
- console.log("Skip loading. Instance already exists", o);
680
+ var i = this.id || "";
681
+ if (window.DocsAPI || this.onError(-3), !((n = window == null ? void 0 : window.DocEditor) === null || n === void 0) && n.instances[i]) {
682
+ console.log("Skip loading. Instance already exists", i);
683
683
  return;
684
684
  }
685
685
  !((t = window == null ? void 0 : window.DocEditor) === null || t === void 0) && t.instances || (window.DocEditor = { instances: {} });
@@ -718,10 +718,10 @@ var xe = function(n, t) {
718
718
  height: this.height,
719
719
  type: this.type,
720
720
  width: this.width
721
- }, this.config || {}), l = window.DocsAPI.DocEditor(o, e);
722
- window.DocEditor.instances[o] = l;
723
- } catch (i) {
724
- console.error(i), this.onError(-1);
721
+ }, this.config || {}), a = window.DocsAPI.DocEditor(i, e);
722
+ window.DocEditor.instances[i] = a;
723
+ } catch (s) {
724
+ console.error(s), this.onError(-1);
725
725
  }
726
726
  },
727
727
  onError: function(n) {
@@ -749,7 +749,7 @@ var xe = function(n, t) {
749
749
  }
750
750
  });
751
751
  const Re = ["id"];
752
- function Se(n, t, o, e, l, i) {
752
+ function Se(n, t, i, e, a, s) {
753
753
  return r(), f("div", { id: n.id }, null, 8, Re);
754
754
  }
755
755
  T.render = Se;
@@ -775,7 +775,7 @@ const Ce = /* @__PURE__ */ y({
775
775
  }
776
776
  },
777
777
  setup(n) {
778
- const t = n, o = q({
778
+ const t = n, i = q({
779
779
  width: "100%",
780
780
  height: "100%",
781
781
  ...t.configOptions || {},
@@ -783,17 +783,17 @@ const Ce = /* @__PURE__ */ y({
783
783
  }), e = () => {
784
784
  console.info("文档加载完成", t.configOptions);
785
785
  };
786
- return (l, i) => (r(), f(
786
+ return (a, s) => (r(), f(
787
787
  "div",
788
788
  {
789
789
  style: m({ height: t.officeHeight })
790
790
  },
791
791
  [
792
- D(w(T), {
792
+ z(w(T), {
793
793
  id: `${(/* @__PURE__ */ new Date()).getTime()}`,
794
794
  ref: "editorRef",
795
795
  "document-server-url": n.documentServerUrl,
796
- config: o.value,
796
+ config: i.value,
797
797
  events_onDocumentReady: e
798
798
  }, null, 8, ["id", "document-server-url", "config"])
799
799
  ],
@@ -802,9 +802,9 @@ const Ce = /* @__PURE__ */ y({
802
802
  ));
803
803
  }
804
804
  });
805
- const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-98d51ef9"]]), ze = E(Ie), De = /* @__PURE__ */ y({
805
+ const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-98d51ef9"]]), De = E(Ie), ze = /* @__PURE__ */ y({
806
806
  __name: "IkPreviewFileDialog",
807
- props: /* @__PURE__ */ H({
807
+ props: /* @__PURE__ */ W({
808
808
  file: {
809
809
  type: Object,
810
810
  default: () => []
@@ -839,32 +839,35 @@ const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-98d51ef9"]]), ze = E(Ie)
839
839
  }),
840
840
  emits: ["update:show"],
841
841
  setup(n) {
842
- const t = n, o = W(n, "show"), e = C(() => ({
842
+ const t = n, i = N(n, "show"), e = C(() => ({
843
843
  name: "name",
844
844
  url: "url",
845
845
  suffix: "suffix",
846
846
  size: "fileSize",
847
847
  ...t.field
848
- })), l = q(null), i = q(null), s = J({
848
+ })), a = q(null), s = q(null), o = Q({
849
849
  image: !1,
850
850
  office: !1,
851
851
  video: !1
852
- }), c = (a) => {
853
- var u, v, b, x, g, A, P;
852
+ }), c = (l) => {
853
+ var u, v, x, R, g, A, P;
854
854
  try {
855
- const p = ((u = a == null ? void 0 : a.response) == null ? void 0 : u.data) || a, j = p[e.value.url] || (p == null ? void 0 : p.id) || p.attachmentId, F = (v = p[e.value.suffix] || p.attachmentSuffix) == null ? void 0 : v.toLowerCase(), N = p[e.value.name] || (p == null ? void 0 : p.attachmentName) || (p == null ? void 0 : p.originName);
856
- if (i.value = {
857
- ...a,
858
- name: a[e.value.name],
855
+ const p = ((u = l == null ? void 0 : l.response) == null ? void 0 : u.data) || l, j = p[e.value.url] || (p == null ? void 0 : p.id) || p.attachmentId, F = (v = p[e.value.suffix] || p.attachmentSuffix) == null ? void 0 : v.toLowerCase(), X = p[e.value.name] || (p == null ? void 0 : p.attachmentName) || (p == null ? void 0 : p.originName);
856
+ if (s.value = {
857
+ ...l,
858
+ name: l[e.value.name],
859
859
  url: M(t.loadUrl, j)
860
- }, a && oe(a, e.value) === "image") {
861
- s.image = !0;
860
+ }, l && L(l, e.value) === "image") {
861
+ o.image = !0;
862
+ return;
863
+ } else if (l && L(l, e.value) === "video") {
864
+ o.video = !0, console.log("modal.video = true;", o.video);
862
865
  return;
863
- } else if ((((b = t.onlyOfficeConfig) == null ? void 0 : b.accept) || t.onlyOfficeAccept).includes(F)) {
864
- s.office = !0, l.value = {
866
+ } else if ((((x = t.onlyOfficeConfig) == null ? void 0 : x.accept) || t.onlyOfficeAccept).includes(F)) {
867
+ o.office = !0, a.value = {
865
868
  ...t.onlyOfficeConfig,
866
869
  editorConfig: {
867
- ...((x = t.onlyOfficeConfig) == null ? void 0 : x.editorConfig) || {},
870
+ ...((R = t.onlyOfficeConfig) == null ? void 0 : R.editorConfig) || {},
868
871
  customization: {
869
872
  ...((A = (g = t.onlyOfficeConfig) == null ? void 0 : g.editorConfig) == null ? void 0 : A.customization) || {},
870
873
  review: {
@@ -873,8 +876,8 @@ const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-98d51ef9"]]), ze = E(Ie)
873
876
  }
874
877
  },
875
878
  document: {
876
- key: ne(),
877
- title: N,
879
+ key: oe(),
880
+ title: X,
878
881
  url: M(t.loadUrl, j),
879
882
  fileType: F,
880
883
  ...((P = t.onlyOfficeConfig) == null ? void 0 : P.document) || {}
@@ -887,33 +890,33 @@ const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-98d51ef9"]]), ze = E(Ie)
887
890
  console.info("预览错误: ", p);
888
891
  }
889
892
  };
890
- Q([o, t.file], ([a, u]) => {
891
- a && Z(() => {
893
+ Z([i, t.file], ([l, u]) => {
894
+ l && ee(() => {
892
895
  c(t.file);
893
896
  });
894
897
  });
895
898
  const d = () => {
896
- o.value = !1, s.office = !1, s.image = !1, s.video = !1;
899
+ i.value = !1, o.office = !1, o.image = !1, o.video = !1, s.value = null;
897
900
  };
898
- return (a, u) => {
899
- var b, x;
900
- const v = z("el-image-viewer");
901
- return o.value ? (r(), f(
902
- ee,
901
+ return (l, u) => {
902
+ var x, R;
903
+ const v = D("el-image-viewer");
904
+ return i.value ? (r(), f(
905
+ te,
903
906
  { key: 0 },
904
907
  [
905
- (b = i.value) != null && b.url && s.image ? (r(), k(v, {
908
+ (x = s.value) != null && x.url && o.image ? (r(), b(v, {
906
909
  key: 0,
907
- onClose: u[0] || (u[0] = (g) => {
908
- i.value = null, s.image = !1;
909
- }),
910
+ onClose: u[0] || (u[0] = (g) => d()),
910
911
  ref: "previewImgRef",
911
- "url-list": [(x = i.value) == null ? void 0 : x.url]
912
- }, null, 8, ["url-list"])) : R("v-if", !0),
913
- R(" 文档类 "),
914
- D(w(_e), {
915
- modelValue: s.office,
916
- "onUpdate:modelValue": u[1] || (u[1] = (g) => s.office = g),
912
+ "url-list": [(R = s.value) == null ? void 0 : R.url],
913
+ teleported: ""
914
+ }, null, 8, ["url-list"])) : k("v-if", !0),
915
+ k(' <IkPreviewVideo :file="fileData" v-model:show="modal.video" />'),
916
+ k(" 文档类 "),
917
+ z(w(_e), {
918
+ modelValue: o.office,
919
+ "onUpdate:modelValue": u[1] || (u[1] = (g) => o.office = g),
917
920
  draggable: "",
918
921
  "no-footer": "",
919
922
  "no-header": "",
@@ -929,8 +932,8 @@ const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-98d51ef9"]]), ze = E(Ie)
929
932
  default: h(() => {
930
933
  var g;
931
934
  return [
932
- D(w(ze), {
933
- "config-options": l.value,
935
+ z(w(De), {
936
+ "config-options": a.value,
934
937
  "document-server-url": ((g = n.onlyOfficeConfig) == null ? void 0 : g.serverUrl) || n.onlyofficeServer
935
938
  }, null, 8, ["config-options", "document-server-url"])
936
939
  ];
@@ -941,11 +944,11 @@ const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-98d51ef9"]]), ze = E(Ie)
941
944
  ],
942
945
  64
943
946
  /* STABLE_FRAGMENT */
944
- )) : R("v-if", !0);
947
+ )) : k("v-if", !0);
945
948
  };
946
949
  }
947
950
  });
948
- const Be = E(De);
951
+ const Be = E(ze);
949
952
  export {
950
953
  Be as IkPreviewFileDialog,
951
954
  Be as default