iking-web-ui-pro 0.2.3 → 0.2.4

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,4 +1,4 @@
1
- import { defineComponent as h, computed as F, resolveComponent as z, openBlock as l, createElementBlock as d, normalizeClass as w, normalizeStyle as v, createCommentVNode as S, createElementVNode as I, createBlock as _, withCtx as m, createTextVNode as B, toDisplayString as $, createVNode as D, unref as y, mergeModels as H, useModel as W, ref as x, h as X, mergeProps as Y, createSlots as G, renderSlot as C, reactive as K, watch as J, nextTick as Q, Fragment as Z } from "vue";
1
+ import { defineComponent as h, computed as F, resolveComponent as z, openBlock as l, createElementBlock as p, normalizeClass as w, normalizeStyle as m, createCommentVNode as S, createElementVNode as I, createBlock as _, withCtx as v, createTextVNode as B, toDisplayString as O, createVNode as D, unref as y, mergeModels as H, useModel as W, ref as x, h as X, mergeProps as Y, createSlots as G, renderSlot as C, reactive as K, watch as J, nextTick as Q, Fragment as Z } from "vue";
2
2
  import { ikColor as ee, buildUUID as te } from "iking-utils-pro";
3
3
  const q = (n, e) => {
4
4
  if (n.install = (o) => {
@@ -14,8 +14,8 @@ const q = (n, e) => {
14
14
  o[r] = t;
15
15
  return o;
16
16
  }, ne = (n, e) => {
17
- var i, a, u, p;
18
- const o = (i = n == null ? void 0 : n.response) != null && i.data ? L((u = (a = n == null ? void 0 : n.response) == null ? void 0 : a.data) == null ? void 0 : u.suffix) : ((p = n.raw) == null ? void 0 : p.type) || L(n[e.suffix]), r = o == null ? void 0 : o.toLowerCase(), t = {
17
+ var i, a, u, f;
18
+ const o = (i = n == null ? void 0 : n.response) != null && i.data ? L((u = (a = n == null ? void 0 : n.response) == null ? void 0 : a.data) == null ? void 0 : u.suffix) : ((f = n.raw) == null ? void 0 : f.type) || L(n[e.suffix]), r = o == null ? void 0 : o.toLowerCase(), t = {
19
19
  sheet: "excel",
20
20
  excel: "excel",
21
21
  zip: "zip",
@@ -196,8 +196,8 @@ const q = (n, e) => {
196
196
  });
197
197
  return (t, i) => {
198
198
  const a = z("el-tooltip"), u = z("el-button");
199
- return t.tableIconType === "icon" ? (l(), d("span", se, [
200
- t.notip || !t.title ? (l(), d(
199
+ return t.tableIconType === "icon" ? (l(), p("span", se, [
200
+ t.notip || !t.title ? (l(), p(
201
201
  "i",
202
202
  {
203
203
  key: 0,
@@ -214,34 +214,34 @@ const q = (n, e) => {
214
214
  active: t.active,
215
215
  disabled: t.disabled
216
216
  }]),
217
- style: v(r.value)
217
+ style: m(r.value)
218
218
  },
219
219
  [
220
220
  S(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),
221
- o.value === "iksig" ? (l(), d(
221
+ o.value === "iksig" ? (l(), p(
222
222
  "i",
223
223
  {
224
224
  key: 0,
225
225
  class: w(`iksig ${t.name}`),
226
- style: v(r.value)
226
+ style: m(r.value)
227
227
  },
228
228
  null,
229
229
  6
230
230
  /* CLASS, STYLE */
231
- )) : o.value === "svg" ? (l(), d("svg", re, [
231
+ )) : o.value === "svg" ? (l(), p("svg", re, [
232
232
  I("use", {
233
233
  "xlink:href": `#${t.name}`
234
234
  }, null, 8, ae)
235
- ])) : o.value === "img" ? (l(), d("img", {
235
+ ])) : o.value === "img" ? (l(), p("img", {
236
236
  key: 2,
237
237
  src: t.name,
238
238
  class: "h-[1em] w-[1em]"
239
- }, null, 8, le)) : (l(), d(
239
+ }, null, 8, le)) : (l(), p(
240
240
  "i",
241
241
  {
242
242
  key: 3,
243
243
  class: w(t.name),
244
- style: v(r.value)
244
+ style: m(r.value)
245
245
  },
246
246
  null,
247
247
  6
@@ -255,7 +255,7 @@ const q = (n, e) => {
255
255
  content: t.title,
256
256
  placement: "top"
257
257
  }, {
258
- default: m(() => [
258
+ default: v(() => [
259
259
  I(
260
260
  "i",
261
261
  {
@@ -271,33 +271,33 @@ const q = (n, e) => {
271
271
  error: t.error || e.type === "error",
272
272
  active: t.active
273
273
  }]),
274
- style: v(r.value)
274
+ style: m(r.value)
275
275
  },
276
276
  [
277
- o.value === "iksig" ? (l(), d(
277
+ o.value === "iksig" ? (l(), p(
278
278
  "i",
279
279
  {
280
280
  key: 0,
281
281
  class: w(`iksig ${t.name}`),
282
- style: v(r.value)
282
+ style: m(r.value)
283
283
  },
284
284
  null,
285
285
  6
286
286
  /* CLASS, STYLE */
287
- )) : o.value === "svg" ? (l(), d("svg", ce, [
287
+ )) : o.value === "svg" ? (l(), p("svg", ce, [
288
288
  I("use", {
289
289
  "xlink:href": `#${t.name}`
290
290
  }, null, 8, ue)
291
- ])) : o.value === "img" ? (l(), d("img", {
291
+ ])) : o.value === "img" ? (l(), p("img", {
292
292
  key: 2,
293
293
  src: t.name,
294
294
  class: "h-[1em] w-[1em]"
295
- }, null, 8, de)) : (l(), d(
295
+ }, null, 8, de)) : (l(), p(
296
296
  "i",
297
297
  {
298
298
  key: 3,
299
299
  class: w(t.name),
300
- style: v(r.value)
300
+ style: m(r.value)
301
301
  },
302
302
  null,
303
303
  6
@@ -315,9 +315,9 @@ const q = (n, e) => {
315
315
  key: 1,
316
316
  type: ["warning", "error"].includes(t.type) ? "danger" : ""
317
317
  }, {
318
- default: m(() => [
318
+ default: v(() => [
319
319
  B(
320
- $(t.title),
320
+ O(t.title),
321
321
  1
322
322
  /* TEXT */
323
323
  )
@@ -328,10 +328,10 @@ const q = (n, e) => {
328
328
  };
329
329
  }
330
330
  });
331
- const fe = /* @__PURE__ */ V(pe, [["__scopeId", "data-v-7d95dbf5"]]), O = q(fe), ge = {
331
+ const fe = /* @__PURE__ */ V(pe, [["__scopeId", "data-v-7d95dbf5"]]), $ = q(fe), ge = {
332
332
  key: 0,
333
333
  class: "exit-main-page-maximize"
334
- }, ve = /* @__PURE__ */ h({
334
+ }, me = /* @__PURE__ */ h({
335
335
  __name: "CloseIcon",
336
336
  props: {
337
337
  showBg: {
@@ -344,15 +344,15 @@ const fe = /* @__PURE__ */ V(pe, [["__scopeId", "data-v-7d95dbf5"]]), O = q(fe),
344
344
  }
345
345
  },
346
346
  setup(n) {
347
- return (e, o) => (l(), d("div", null, [
348
- n.showBg && n.fullscreen ? (l(), d("div", ge, [
349
- D(y(O), {
347
+ return (e, o) => (l(), p("div", null, [
348
+ n.showBg && n.fullscreen ? (l(), p("div", ge, [
349
+ D(y($), {
350
350
  name: "iksvg_guanbidanchuang",
351
351
  title: "关闭",
352
352
  size: 20,
353
353
  error: ""
354
354
  })
355
- ])) : (l(), _(y(O), {
355
+ ])) : (l(), _(y($), {
356
356
  key: 1,
357
357
  error: "",
358
358
  name: "iksvg_guanbidanchuang",
@@ -362,7 +362,7 @@ const fe = /* @__PURE__ */ V(pe, [["__scopeId", "data-v-7d95dbf5"]]), O = q(fe),
362
362
  ]));
363
363
  }
364
364
  });
365
- const me = /* @__PURE__ */ V(ve, [["__scopeId", "data-v-79f49df8"]]), he = { class: "base-header" }, ye = /* @__PURE__ */ h({
365
+ const ve = /* @__PURE__ */ V(me, [["__scopeId", "data-v-79f49df8"]]), he = { class: "base-header" }, ye = /* @__PURE__ */ h({
366
366
  __name: "IkBaseDialog",
367
367
  props: /* @__PURE__ */ H({
368
368
  title: { default: "" },
@@ -387,15 +387,15 @@ const me = /* @__PURE__ */ V(ve, [["__scopeId", "data-v-79f49df8"]]), he = { cla
387
387
  r.value = !r.value;
388
388
  }, i = h({
389
389
  setup() {
390
- return () => X(me, {
390
+ return () => X(ve, {
391
391
  showBg: e.showCloseBg,
392
392
  fullscreen: e.fullscreen
393
393
  });
394
394
  }
395
395
  });
396
396
  return (a, u) => {
397
- const p = z("el-dialog");
398
- return l(), _(p, Y({
397
+ const f = z("el-dialog");
398
+ return l(), _(f, Y({
399
399
  modelValue: o.value,
400
400
  "onUpdate:modelValue": u[0] || (u[0] = (s) => o.value = s)
401
401
  }, a.$attrs, {
@@ -404,26 +404,26 @@ const me = /* @__PURE__ */ V(ve, [["__scopeId", "data-v-79f49df8"]]), he = { cla
404
404
  fullscreen: r.value,
405
405
  "modal-class": "baseDialog"
406
406
  }), G({
407
- icon: m(() => [
407
+ icon: v(() => [
408
408
  C(a.$slots, "title", {}, () => [
409
409
  B(
410
- $(a.title),
410
+ O(a.title),
411
411
  1
412
412
  /* TEXT */
413
413
  )
414
414
  ])
415
415
  ]),
416
- header: m(() => [
416
+ header: v(() => [
417
417
  I("div", he, [
418
418
  C(a.$slots, "header", {}, () => [
419
419
  B(
420
- $(a.title),
420
+ O(a.title),
421
421
  1
422
422
  /* TEXT */
423
423
  )
424
424
  ])
425
425
  ]),
426
- a.$attrs.showClose ? (l(), _(y(O), {
426
+ a.$attrs.showClose ? (l(), _(y($), {
427
427
  key: 0,
428
428
  onClick: t,
429
429
  name: r.value ? "iksvg_tuichuquanping" : "iksvg_quanping-daohang",
@@ -431,7 +431,7 @@ const me = /* @__PURE__ */ V(ve, [["__scopeId", "data-v-79f49df8"]]), he = { cla
431
431
  title: r.value ? "退出全屏" : "全屏"
432
432
  }, null, 8, ["name", "title"])) : S("v-if", !0)
433
433
  ]),
434
- default: m(() => [
434
+ default: v(() => [
435
435
  C(a.$slots, "default")
436
436
  ]),
437
437
  _: 2
@@ -439,7 +439,7 @@ const me = /* @__PURE__ */ V(ve, [["__scopeId", "data-v-79f49df8"]]), he = { cla
439
439
  }, [
440
440
  a.$slots.footer ? {
441
441
  name: "footer",
442
- fn: m(() => [
442
+ fn: v(() => [
443
443
  C(a.$slots, "footer")
444
444
  ]),
445
445
  key: "0"
@@ -463,7 +463,7 @@ function _e(n, e, o, r) {
463
463
  a(g);
464
464
  }
465
465
  }
466
- function p(c) {
466
+ function f(c) {
467
467
  try {
468
468
  s(r.throw(c));
469
469
  } catch (g) {
@@ -471,7 +471,7 @@ function _e(n, e, o, r) {
471
471
  }
472
472
  }
473
473
  function s(c) {
474
- c.done ? i(c.value) : t(c.value).then(u, p);
474
+ c.done ? i(c.value) : t(c.value).then(u, f);
475
475
  }
476
476
  s((r = r.apply(n, e || [])).next());
477
477
  });
@@ -487,10 +487,10 @@ function ke(n, e) {
487
487
  }), a;
488
488
  function u(s) {
489
489
  return function(c) {
490
- return p([s, c]);
490
+ return f([s, c]);
491
491
  };
492
492
  }
493
- function p(s) {
493
+ function f(s) {
494
494
  if (r)
495
495
  throw new TypeError("Generator is already executing.");
496
496
  for (; a && (a = 0, s[0] && (o = 0)), o; )
@@ -551,8 +551,8 @@ var be = function(n, e) {
551
551
  var i = document.getElementById(e);
552
552
  if (i)
553
553
  var a = setInterval(function() {
554
- var p = i.getAttribute("loading");
555
- if (!p) {
554
+ var f = i.getAttribute("loading");
555
+ if (!f) {
556
556
  if (clearInterval(a), window.DocsAPI)
557
557
  return r(null);
558
558
  var s = U(e, n, r, t);
@@ -563,8 +563,8 @@ var be = function(n, e) {
563
563
  var u = U(e, n, r, t);
564
564
  document.body.appendChild(u);
565
565
  }
566
- } catch (p) {
567
- console.error(p);
566
+ } catch (f) {
567
+ console.error(f);
568
568
  }
569
569
  })];
570
570
  });
@@ -747,7 +747,7 @@ var be = function(n, e) {
747
747
  });
748
748
  const Re = ["id"];
749
749
  function Se(n, e, o, r, t, i) {
750
- return l(), d("div", { id: n.id }, null, 8, Re);
750
+ return l(), p("div", { id: n.id }, null, 8, Re);
751
751
  }
752
752
  T.render = Se;
753
753
  T.__file = "src/components/DocumentEditor.vue";
@@ -775,14 +775,15 @@ const Ce = /* @__PURE__ */ h({
775
775
  const e = n, o = x({
776
776
  width: "100%",
777
777
  height: "100%",
778
- ...e.configOptions || {}
778
+ ...e.configOptions || {},
779
+ ...e.configOptions
779
780
  }), r = () => {
780
781
  console.info("文档加载完成", e.configOptions);
781
782
  };
782
- return (t, i) => (l(), d(
783
+ return (t, i) => (l(), p(
783
784
  "div",
784
785
  {
785
- style: v({ height: e.officeHeight })
786
+ style: m({ height: e.officeHeight })
786
787
  },
787
788
  [
788
789
  D(y(T), {
@@ -798,7 +799,7 @@ const Ce = /* @__PURE__ */ h({
798
799
  ));
799
800
  }
800
801
  });
801
- const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-fe959cd8"]]), ze = q(Ie), De = /* @__PURE__ */ h({
802
+ const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-98d51ef9"]]), ze = q(Ie), De = /* @__PURE__ */ h({
802
803
  __name: "IkPreviewFileDialog",
803
804
  props: /* @__PURE__ */ H({
804
805
  file: {
@@ -848,7 +849,7 @@ const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-fe959cd8"]]), ze = q(Ie)
848
849
  }), u = (s) => {
849
850
  var c, g, k, b, R, A, P;
850
851
  try {
851
- const f = ((c = s == null ? void 0 : s.response) == null ? void 0 : c.data) || s, j = f[r.value.url] || (f == null ? void 0 : f.id) || f.attachmentId, E = (g = f[r.value.suffix] || f.attachmentSuffix) == null ? void 0 : g.toLowerCase(), N = f[r.value.name] || (f == null ? void 0 : f.attachmentName);
852
+ const d = ((c = s == null ? void 0 : s.response) == null ? void 0 : c.data) || s, j = d[r.value.url] || (d == null ? void 0 : d.id) || d.attachmentId, E = (g = d[r.value.suffix] || d.attachmentSuffix) == null ? void 0 : g.toLowerCase(), N = d[r.value.name] || (d == null ? void 0 : d.attachmentName) || (d == null ? void 0 : d.originName);
852
853
  if (i.value = {
853
854
  ...s,
854
855
  name: s[r.value.name],
@@ -879,8 +880,8 @@ const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-fe959cd8"]]), ze = q(Ie)
879
880
  };
880
881
  return;
881
882
  }
882
- } catch (f) {
883
- console.info("预览错误: ", f);
883
+ } catch (d) {
884
+ console.info("预览错误: ", d);
884
885
  }
885
886
  };
886
887
  J([o, e.file], ([s, c]) => {
@@ -888,13 +889,13 @@ const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-fe959cd8"]]), ze = q(Ie)
888
889
  u(e.file);
889
890
  });
890
891
  });
891
- const p = () => {
892
+ const f = () => {
892
893
  o.value = !1, a.office = !1, a.image = !1, a.video = !1;
893
894
  };
894
895
  return (s, c) => {
895
896
  var k, b;
896
897
  const g = z("el-image-viewer");
897
- return o.value ? (l(), d(
898
+ return o.value ? (l(), p(
898
899
  Z,
899
900
  { key: 0 },
900
901
  [
@@ -919,14 +920,13 @@ const Ie = /* @__PURE__ */ V(Ce, [["__scopeId", "data-v-fe959cd8"]]), ze = q(Ie)
919
920
  "close-on-click-modal": "",
920
921
  "close-on-press-escape": !1,
921
922
  "append-to-body": "",
922
- onClose: p,
923
+ onClose: f,
923
924
  "modal-class": "ik-only-preview-dialog"
924
925
  }, {
925
- default: m(() => [
926
+ default: v(() => [
926
927
  D(y(ze), {
927
928
  "config-options": t.value,
928
- "document-server-url": n.onlyOfficeConfig.serverUrl || n.onlyofficeServer,
929
- mode: "view"
929
+ "document-server-url": n.onlyOfficeConfig.serverUrl || n.onlyofficeServer
930
930
  }, null, 8, ["config-options", "document-server-url"])
931
931
  ]),
932
932
  _: 1
@@ -1 +1 @@
1
- (function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("iking-utils-pro")):typeof define=="function"&&define.amd?define(["exports","vue","iking-utils-pro"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f.index={},f.vue,f["iking-utils-pro"]))})(this,function(f,e,C){"use strict";const w=(o,t)=>{if(o.install=i=>{for(const l of[o,...Object.values(t??{})])i.component(l.name,l)},t)for(const[i,l]of Object.entries(t))o[i]=l;return o},S=(o,t)=>t?t.startsWith("http")?t:`${o||location.origin}${t}`:"",k=(o,t)=>{const i=o.__vccOpts||o;for(const[l,n]of t)i[l]=n;return i},D=(o,t)=>{var s,a,d,p;const i=(s=o==null?void 0:o.response)!=null&&s.data?B((d=(a=o==null?void 0:o.response)==null?void 0:a.data)==null?void 0:d.suffix):((p=o.raw)==null?void 0:p.type)||B(o[t.suffix]),l=i==null?void 0:i.toLowerCase(),n={sheet:"excel",excel:"excel",zip:"zip","application/x-compressed":"zip",image:"image",video:"video",audio:"audio",pdf:"pdf",text:"txt",txt:"txt",word:"word",ppt:"ppt",exe:"exe",json:"json"};for(let r in n)if(typeof l=="string"&&(l.includes(r)||l===r))return n[r];return"unknown"},q={".doc":"word",".docx":"word",".docxf":"word",".docm":"word",".dot":"word",".dotm":"word",".dotx":"word",".epub":"word",".fodt":"word",".htm":"word",".html":"word",".mht":"word",".odt":"word",".ott":"word",".rtf":"word",".djvu":"word",".oxps":"word",".oform":"word",".fb2":"word",".xml":"word",".xps":"word",".csv":"excel",".xls":"excel",".xlsx":"excel",".fods":"excel",".ods":"excel",".ots":"excel",".xlsb":"excel",".xlsm":"excel",".xlt":"excel",".xltm":"excel",".xltx":"excel",".fodp":"ppt",".odp":"ppt",".otp":"ppt",".pot":"ppt",".potm":"ppt",".potx":"ppt",".pps":"ppt",".ppsm":"ppt",".ppsx":"ppt",".ppt":"ppt",".pptm":"ppt",".pptx":"ppt",".zip":"zip",".rar":"zip",".7z":"zip",".apz":"zip",".ar":"zip",".bz":"zip",".car":"zip",".dar":"zip",".cpgz":"zip",".f":"zip",".ha":"zip",".hbc":"zip",".hbc2":"zip",".hbe":"zip",".hpk":"zip",".hyp":"zip",".png":"image",".jpg":"image",".jpeg":"image",".bmp":"image",".gif":"image",".webp":"image",".psd":"image",".svg":"image",".tiff":"image",".avi":"video",".wmv":"video",".mpeg":"video",".mp4":"video",".mpm4v":"video",".mov":"video",".asf":"video",".flv":"video",".f4v":"video",".rmvb":"video",".rm":"video",".3gp":"video",".vob":"video",".txt":"txt",".pdf":"pdf"},B=o=>{const t=o==null?void 0:o.toLocaleLowerCase(),i=t!=null&&t.startsWith(".")?t:`.${t}`;return i&&q[i]||"unknow"},V=o=>{let t="",i=["doc","docx"],l=["xls","xlsx"],n=["ppt","pptx"],s=["pdf"];return i.includes(o)&&(t="word"),l.includes(o)&&(t="cell"),n.includes(o)&&(t="slide"),s.includes(o)&&(t="text-pdf"),t},F={key:0,class:"ik-svg-icon ik-icon inline-block inline-flex justify-center box-content line-height-[0]"},O={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},$=["xlink:href"],T=["src"],A={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},M=["xlink:href"],P=["src"],j=e.defineComponent({name:"IkSvgIcon",__name:"index",props:{name:{},flip:{},rotate:{},color:{},colorLight:{},opacity:{default:.5},size:{default:""},width:{},bg:{type:Boolean,default:!1},showBg:{type:Boolean,default:!1},padding:{default:"6px"},primary:{type:Boolean},warning:{type:Boolean},success:{type:Boolean},error:{type:Boolean},notip:{type:Boolean,default:!1},title:{},type:{},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},tableIconType:{default:"icon"}},setup(o){const t=o,i=e.computed(()=>{var n,s,a;return/^http?:\/\//.test(t.name)?"img":/i-[^:]+:[^:]+/.test(t.name)?"unocss":(n=t.name)!=null&&n.startsWith("iksig")?"iksig":(s=t.name)!=null&&s.includes(":")?"iconify":(a=t.name)!=null&&a.startsWith("iksvg")?"svg":"i"}),l=e.computed(()=>{const n=[];if(t.flip)switch(t.flip){case"horizontal":n.push("rotateY(180deg)");break;case"vertical":n.push("rotateX(180deg)");break;case"both":n.push("rotateX(180deg)"),n.push("rotateY(180deg)");break}t.rotate&&n.push(`rotate(${t.rotate%360}deg)`);const s={...t.color&&{color:t.color},...t.size&&{fontSize:typeof t.size=="number"?`${t.size}px`:t.size},...n.length&&{transform:n.join(" ")},padding:t.showBg||t.bg?t.padding:0,...t.color&&i.value!=="iksig"?{"--ik-color-icon-dark":t.color,"--ik-color-icon-light":t.colorLight||C.ikColor.setOpacity(t.color,t.opacity)}:{}};return t.width&&(s.width=s.height=typeof t.width=="number"?`${t.width}px`:t.width),s});return(n,s)=>{const a=e.resolveComponent("el-tooltip"),d=e.resolveComponent("el-button");return n.tableIconType==="icon"?(e.openBlock(),e.createElementBlock("span",F,[n.notip||!n.title?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[n.name]:i.value==="unocss","show-bg":n.showBg||n.bg,default:n.size==="default",small:n.size==="small",big:n.size==="big",warning:n.warning||t.type==="warning",primary:n.primary||t.type==="primary",success:n.success||t.type==="success",error:n.error||t.type==="error",active:n.active,disabled:n.disabled}]),style:e.normalizeStyle(l.value)},[e.createCommentVNode(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),i.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${n.name}`),style:e.normalizeStyle(l.value)},null,6)):i.value==="svg"?(e.openBlock(),e.createElementBlock("svg",O,[e.createElementVNode("use",{"xlink:href":`#${n.name}`},null,8,$)])):i.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:n.name,class:"h-[1em] w-[1em]"},null,8,T)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(n.name),style:e.normalizeStyle(l.value)},null,6))],6)):(e.openBlock(),e.createBlock(a,{key:1,content:n.title,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[n.name]:i.value==="unocss","show-bg":n.showBg||n.bg,default:n.size==="default",small:n.size==="small",big:n.size==="big",warning:n.warning||t.type==="warning",primary:n.primary||t.type==="primary",success:n.success||t.type==="success",error:n.error||t.type==="error",active:n.active}]),style:e.normalizeStyle(l.value)},[i.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${n.name}`),style:e.normalizeStyle(l.value)},null,6)):i.value==="svg"?(e.openBlock(),e.createElementBlock("svg",A,[e.createElementVNode("use",{"xlink:href":`#${n.name}`},null,8,M)])):i.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:n.name,class:"h-[1em] w-[1em]"},null,8,P)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(n.name),style:e.normalizeStyle(l.value)},null,6))],6)]),_:1},8,["content"]))])):(e.openBlock(),e.createBlock(d,{key:1,type:["warning","error"].includes(n.type)?"danger":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),_:1},8,["type"]))}}}),oe="",v=w(k(j,[["__scopeId","data-v-7d95dbf5"]])),N={key:0,class:"exit-main-page-maximize"},L=e.defineComponent({__name:"CloseIcon",props:{showBg:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1}},setup(o){return(t,i)=>(e.openBlock(),e.createElementBlock("div",null,[o.showBg&&o.fullscreen?(e.openBlock(),e.createElementBlock("div",N,[e.createVNode(e.unref(v),{name:"iksvg_guanbidanchuang",title:"关闭",size:20,error:""})])):(e.openBlock(),e.createBlock(e.unref(v),{key:1,error:"",name:"iksvg_guanbidanchuang",title:"关闭",size:20}))]))}}),se="",U=k(L,[["__scopeId","data-v-79f49df8"]]),H={class:"base-header"},W=e.defineComponent({__name:"IkBaseDialog",props:e.mergeModels({title:{default:""},cancelText:{default:"取消"},confirmText:{default:"确认"},noHeader:{type:Boolean},noFooter:{type:Boolean},showCloseBg:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1,noHeader:!1,noFooter:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const t=o,i=e.useModel(o,"modelValue"),l=e.ref(t.fullscreen),n=()=>{l.value=!l.value},s=e.defineComponent({setup(){return()=>e.h(U,{showBg:t.showCloseBg,fullscreen:t.fullscreen})}});return(a,d)=>{const p=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(p,e.mergeProps({modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=r=>i.value=r)},a.$attrs,{"close-icon":e.unref(s),class:`ik-base-dialog ${a.noHeader?"no-header":""} ${a.noFooter?"no-footer":""}`,fullscreen:l.value,"modal-class":"baseDialog"}),e.createSlots({icon:e.withCtx(()=>[e.renderSlot(a.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(a.title),1)])]),header:e.withCtx(()=>[e.createElementVNode("div",H,[e.renderSlot(a.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(a.title),1)])]),a.$attrs.showClose?(e.openBlock(),e.createBlock(e.unref(v),{key:0,onClick:n,name:l.value?"iksvg_tuichuquanping":"iksvg_quanping-daohang",class:"absolute! top-[18px] right-[50px] icon-dialog-full",title:l.value?"退出全屏":"全屏"},null,8,["name","title"])):e.createCommentVNode("v-if",!0)]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[a.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"footer")]),key:"0"}:void 0]),1040,["modelValue","close-icon","class","fullscreen"])}}}),le="",K=w(W);function X(o,t,i,l){function n(s){return s instanceof i?s:new i(function(a){a(s)})}return new(i||(i=Promise))(function(s,a){function d(c){try{r(l.next(c))}catch(m){a(m)}}function p(c){try{r(l.throw(c))}catch(m){a(m)}}function r(c){c.done?s(c.value):n(c.value).then(d,p)}r((l=l.apply(o,t||[])).next())})}function Y(o,t){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},l,n,s,a;return a={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function d(r){return function(c){return p([r,c])}}function p(r){if(l)throw new TypeError("Generator is already executing.");for(;a&&(a=0,r[0]&&(i=0)),i;)try{if(l=1,n&&(s=r[0]&2?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[r[0]&2,s.value]),r[0]){case 0:case 1:s=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(s=i.trys,!(s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){i.label=r[1];break}if(r[0]===6&&i.label<s[1]){i.label=s[1],s=r;break}if(s&&i.label<s[2]){i.label=s[2],i.ops.push(r);break}s[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(o,i)}catch(c){r=[6,c],n=0}finally{l=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}}typeof SuppressedError=="function"&&SuppressedError;var G=function(o,t){return X(void 0,void 0,void 0,function(){return Y(this,function(i){return[2,new Promise(function(l,n){try{if(window.DocsAPI)return l(null);var s=document.getElementById(t);if(s)var a=setInterval(function(){var p=s.getAttribute("loading");if(!p){if(clearInterval(a),window.DocsAPI)return l(null);var r=R(t,o,l,n);s.remove(),document.body.appendChild(r)}},500);else{var d=R(t,o,l,n);document.body.appendChild(d)}}catch(p){console.error(p)}})]})})},R=function(o,t,i,l){var n=document.createElement("script");return n.id=o,n.type="text/javascript",n.src=t,n.async=!0,n.onload=function(){n.removeAttribute("loading"),i(null)},n.onerror=function(s){n.removeAttribute("loading"),l(s)},n.setAttribute("loading",""),n},_=e.defineComponent({name:"DocumentEditor",props:{id:{type:String,required:!0},documentServerUrl:{type:String,required:!0},config:{type:Object,required:!0},document_fileType:String,document_title:String,documentType:String,editorConfig_lang:String,height:String,type:String,width:String,onLoadComponentError:Function,events_onAppReady:Function,events_onDocumentStateChange:Function,events_onMetaChange:Function,events_onDocumentReady:Function,events_onInfo:Function,events_onWarning:Function,events_onError:Function,events_onRequestSharingSettings:Function,events_onRequestRename:Function,events_onMakeActionLink:Function,events_onRequestInsertImage:Function,events_onRequestSaveAs:Function,events_onRequestMailMergeRecipients:Function,events_onRequestCompareFile:Function,events_onRequestEditRights:Function,events_onRequestHistory:Function,events_onRequestHistoryClose:Function,events_onRequestHistoryData:Function,events_onRequestRestore:Function,events_onRequestSelectSpreadsheet:Function,events_onRequestSelectDocument:Function},mounted:function(){var o=this,t=this.documentServerUrl;t.endsWith("/")||(t+="/");var i="".concat(t,"web-apps/apps/api/documents/api.js");G(i,"onlyoffice-api-script").then(function(){return o.onLoad()}).catch(function(){o.onError(-2)})},unmounted:function(){var o,t=this.id||"";!((o=window==null?void 0:window.DocEditor)===null||o===void 0)&&o.instances[t]&&(window.DocEditor.instances[t].destroyEditor(),window.DocEditor.instances[t]=void 0)},watch:{config:{handler:function(o,t){this.onChangeProps()},deep:!0},document_fileType:function(o,t){this.onChangeProps()},document_title:function(o,t){this.onChangeProps()},documentType:function(o,t){this.onChangeProps()},editorConfig_lang:function(o,t){this.onChangeProps()},height:function(o,t){this.onChangeProps()},type:function(o,t){this.onChangeProps()},width:function(o,t){this.onChangeProps()}},methods:{onLoad:function(){var o,t;try{var i=this.id||"";if(window.DocsAPI||this.onError(-3),!((o=window==null?void 0:window.DocEditor)===null||o===void 0)&&o.instances[i]){console.log("Skip loading. Instance already exists",i);return}!((t=window==null?void 0:window.DocEditor)===null||t===void 0)&&t.instances||(window.DocEditor={instances:{}});var l=Object.assign({document:{fileType:this.document_fileType,title:this.document_title},documentType:this.documentType,editorConfig:{lang:this.editorConfig_lang},events:{onAppReady:this.onAppReady,onDocumentStateChange:this.events_onDocumentStateChange,onMetaChange:this.events_onMetaChange,onDocumentReady:this.events_onDocumentReady,onInfo:this.events_onInfo,onWarning:this.events_onWarning,onError:this.events_onError,onRequestSharingSettings:this.events_onRequestSharingSettings,onRequestRename:this.events_onRequestRename,onMakeActionLink:this.events_onMakeActionLink,onRequestInsertImage:this.events_onRequestInsertImage,onRequestSaveAs:this.events_onRequestSaveAs,onRequestMailMergeRecipients:this.events_onRequestMailMergeRecipients,onRequestCompareFile:this.events_onRequestCompareFile,onRequestEditRights:this.events_onRequestEditRights,onRequestHistory:this.events_onRequestHistory,onRequestHistoryClose:this.events_onRequestHistoryClose,onRequestHistoryData:this.events_onRequestHistoryData,onRequestRestore:this.events_onRequestRestore,onRequestSelectSpreadsheet:this.events_onRequestSelectSpreadsheet,onRequestSelectDocument:this.events_onRequestSelectDocument},height:this.height,type:this.type,width:this.width},this.config||{}),n=window.DocsAPI.DocEditor(i,l);window.DocEditor.instances[i]=n}catch(s){console.error(s),this.onError(-1)}},onError:function(o){var t;switch(o){case-2:t="Error load DocsAPI from "+this.documentServerUrl;break;case-3:t="DocsAPI is not defined";break;default:t="Unknown error loading component",o=-1}typeof this.onLoadComponentError>"u"?console.error(t):this.onLoadComponentError(o,t)},onAppReady:function(){var o=this.id||"";this.events_onAppReady(window.DocEditor.instances[o])},onChangeProps:function(){var o,t=this.id||"";!((o=window==null?void 0:window.DocEditor)===null||o===void 0)&&o.instances[t]&&(window.DocEditor.instances[t].destroyEditor(),window.DocEditor.instances[t]=void 0,console.log("Important props have been changed. Load new Editor."),this.onLoad())}}});const J=["id"];function Q(o,t,i,l,n,s){return e.openBlock(),e.createElementBlock("div",{id:o.id},null,8,J)}_.render=Q,_.__file="src/components/DocumentEditor.vue";const Z=e.defineComponent({__name:"IkOnlyOffice",props:{documentServerUrl:{type:String,default:""},configOptions:{type:Object,default:()=>{}},officeHeight:{type:String,default:"100%"}},setup(o){const t=o,i=e.ref({width:"100%",height:"100%",...t.configOptions||{}}),l=()=>{console.info("文档加载完成",t.configOptions)};return(n,s)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({height:t.officeHeight})},[e.createVNode(e.unref(_),{id:`${new Date().getTime()}`,ref:"editorRef","document-server-url":o.documentServerUrl,config:i.value,events_onDocumentReady:l},null,8,["id","document-server-url","config"])],4))}}),re="",ee=w(k(Z,[["__scopeId","data-v-fe959cd8"]])),te=e.defineComponent({__name:"IkPreviewFileDialog",props:e.mergeModels({file:{type:Object,default:()=>[]},loadUrl:{type:String,default:""},onlyOfficeAccept:{type:String,default:".pdf,.docx,.doc.ppt,.pptx,.xlsx,.xls,"},onlyofficeServer:{type:String,default:""},onlyOfficeConfig:{type:Object,default:()=>({})},field:{type:Object,default:()=>({})}},{show:{default:!1},showModifiers:{}}),emits:["update:show"],setup(o){const t=o,i=e.useModel(o,"show"),l=e.computed(()=>({name:"name",url:"url",suffix:"suffix",size:"fileSize",...t.field})),n=e.ref(null),s=e.ref(null),a=e.reactive({image:!1,office:!1,video:!1}),d=r=>{var c,m,g,h,y,E,x;try{const u=((c=r==null?void 0:r.response)==null?void 0:c.data)||r,I=u[l.value.url]||(u==null?void 0:u.id)||u.attachmentId,b=(m=u[l.value.suffix]||u.attachmentSuffix)==null?void 0:m.toLowerCase(),ne=u[l.value.name]||(u==null?void 0:u.attachmentName);if(s.value={...r,name:r[l.value.name],url:S(t.loadUrl,I)},r&&D(r,l.value)==="image"){a.image=!0;return}else if((((g=t.onlyOfficeConfig)==null?void 0:g.accept)||t.onlyOfficeAccept).includes(b)){a.office=!0,n.value={...t.onlyOfficeConfig,editorConfig:{...((h=t.onlyOfficeConfig)==null?void 0:h.editorConfig)||{},customization:{...((E=(y=t.onlyOfficeConfig)==null?void 0:y.editorConfig)==null?void 0:E.customization)||{},review:{reviewDisplay:"final"}}},document:{key:C.buildUUID(),title:ne,url:S(t.loadUrl,I),fileType:b,...((x=t.onlyOfficeConfig)==null?void 0:x.document)||{}},documentType:V(b)};return}}catch(u){console.info("预览错误: ",u)}};e.watch([i,t.file],([r,c])=>{r&&e.nextTick(()=>{d(t.file)})});const p=()=>{i.value=!1,a.office=!1,a.image=!1,a.video=!1};return(r,c)=>{var g,h;const m=e.resolveComponent("el-image-viewer");return i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(g=s.value)!=null&&g.url&&a.image?(e.openBlock(),e.createBlock(m,{key:0,onClose:c[0]||(c[0]=y=>{s.value=null,a.image=!1}),ref:"previewImgRef","url-list":[(h=s.value)==null?void 0:h.url]},null,8,["url-list"])):e.createCommentVNode("v-if",!0),e.createCommentVNode(" 文档类 "),e.createVNode(e.unref(K),{modelValue:a.office,"onUpdate:modelValue":c[1]||(c[1]=y=>a.office=y),draggable:"","no-footer":"","no-header":"",fullscreen:"","show-close-bg":"","destroy-on-close":"","close-on-click-modal":"","close-on-press-escape":!1,"append-to-body":"",onClose:p,"modal-class":"ik-only-preview-dialog"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee),{"config-options":n.value,"document-server-url":o.onlyOfficeConfig.serverUrl||o.onlyofficeServer,mode:"view"},null,8,["config-options","document-server-url"])]),_:1},8,["modelValue"])],64)):e.createCommentVNode("v-if",!0)}}}),ce="",z=w(te);f.IkPreviewFileDialog=z,f.default=z,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("iking-utils-pro")):typeof define=="function"&&define.amd?define(["exports","vue","iking-utils-pro"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f.index={},f.vue,f["iking-utils-pro"]))})(this,function(f,e,C){"use strict";const w=(o,t)=>{if(o.install=i=>{for(const r of[o,...Object.values(t??{})])i.component(r.name,r)},t)for(const[i,r]of Object.entries(t))o[i]=r;return o},S=(o,t)=>t?t.startsWith("http")?t:`${o||location.origin}${t}`:"",k=(o,t)=>{const i=o.__vccOpts||o;for(const[r,n]of t)i[r]=n;return i},D=(o,t)=>{var s,a,d,u;const i=(s=o==null?void 0:o.response)!=null&&s.data?B((d=(a=o==null?void 0:o.response)==null?void 0:a.data)==null?void 0:d.suffix):((u=o.raw)==null?void 0:u.type)||B(o[t.suffix]),r=i==null?void 0:i.toLowerCase(),n={sheet:"excel",excel:"excel",zip:"zip","application/x-compressed":"zip",image:"image",video:"video",audio:"audio",pdf:"pdf",text:"txt",txt:"txt",word:"word",ppt:"ppt",exe:"exe",json:"json"};for(let l in n)if(typeof r=="string"&&(r.includes(l)||r===l))return n[l];return"unknown"},q={".doc":"word",".docx":"word",".docxf":"word",".docm":"word",".dot":"word",".dotm":"word",".dotx":"word",".epub":"word",".fodt":"word",".htm":"word",".html":"word",".mht":"word",".odt":"word",".ott":"word",".rtf":"word",".djvu":"word",".oxps":"word",".oform":"word",".fb2":"word",".xml":"word",".xps":"word",".csv":"excel",".xls":"excel",".xlsx":"excel",".fods":"excel",".ods":"excel",".ots":"excel",".xlsb":"excel",".xlsm":"excel",".xlt":"excel",".xltm":"excel",".xltx":"excel",".fodp":"ppt",".odp":"ppt",".otp":"ppt",".pot":"ppt",".potm":"ppt",".potx":"ppt",".pps":"ppt",".ppsm":"ppt",".ppsx":"ppt",".ppt":"ppt",".pptm":"ppt",".pptx":"ppt",".zip":"zip",".rar":"zip",".7z":"zip",".apz":"zip",".ar":"zip",".bz":"zip",".car":"zip",".dar":"zip",".cpgz":"zip",".f":"zip",".ha":"zip",".hbc":"zip",".hbc2":"zip",".hbe":"zip",".hpk":"zip",".hyp":"zip",".png":"image",".jpg":"image",".jpeg":"image",".bmp":"image",".gif":"image",".webp":"image",".psd":"image",".svg":"image",".tiff":"image",".avi":"video",".wmv":"video",".mpeg":"video",".mp4":"video",".mpm4v":"video",".mov":"video",".asf":"video",".flv":"video",".f4v":"video",".rmvb":"video",".rm":"video",".3gp":"video",".vob":"video",".txt":"txt",".pdf":"pdf"},B=o=>{const t=o==null?void 0:o.toLocaleLowerCase(),i=t!=null&&t.startsWith(".")?t:`.${t}`;return i&&q[i]||"unknow"},V=o=>{let t="",i=["doc","docx"],r=["xls","xlsx"],n=["ppt","pptx"],s=["pdf"];return i.includes(o)&&(t="word"),r.includes(o)&&(t="cell"),n.includes(o)&&(t="slide"),s.includes(o)&&(t="text-pdf"),t},F={key:0,class:"ik-svg-icon ik-icon inline-block inline-flex justify-center box-content line-height-[0]"},O={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},$=["xlink:href"],T=["src"],A={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},M=["xlink:href"],P=["src"],j=e.defineComponent({name:"IkSvgIcon",__name:"index",props:{name:{},flip:{},rotate:{},color:{},colorLight:{},opacity:{default:.5},size:{default:""},width:{},bg:{type:Boolean,default:!1},showBg:{type:Boolean,default:!1},padding:{default:"6px"},primary:{type:Boolean},warning:{type:Boolean},success:{type:Boolean},error:{type:Boolean},notip:{type:Boolean,default:!1},title:{},type:{},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},tableIconType:{default:"icon"}},setup(o){const t=o,i=e.computed(()=>{var n,s,a;return/^http?:\/\//.test(t.name)?"img":/i-[^:]+:[^:]+/.test(t.name)?"unocss":(n=t.name)!=null&&n.startsWith("iksig")?"iksig":(s=t.name)!=null&&s.includes(":")?"iconify":(a=t.name)!=null&&a.startsWith("iksvg")?"svg":"i"}),r=e.computed(()=>{const n=[];if(t.flip)switch(t.flip){case"horizontal":n.push("rotateY(180deg)");break;case"vertical":n.push("rotateX(180deg)");break;case"both":n.push("rotateX(180deg)"),n.push("rotateY(180deg)");break}t.rotate&&n.push(`rotate(${t.rotate%360}deg)`);const s={...t.color&&{color:t.color},...t.size&&{fontSize:typeof t.size=="number"?`${t.size}px`:t.size},...n.length&&{transform:n.join(" ")},padding:t.showBg||t.bg?t.padding:0,...t.color&&i.value!=="iksig"?{"--ik-color-icon-dark":t.color,"--ik-color-icon-light":t.colorLight||C.ikColor.setOpacity(t.color,t.opacity)}:{}};return t.width&&(s.width=s.height=typeof t.width=="number"?`${t.width}px`:t.width),s});return(n,s)=>{const a=e.resolveComponent("el-tooltip"),d=e.resolveComponent("el-button");return n.tableIconType==="icon"?(e.openBlock(),e.createElementBlock("span",F,[n.notip||!n.title?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[n.name]:i.value==="unocss","show-bg":n.showBg||n.bg,default:n.size==="default",small:n.size==="small",big:n.size==="big",warning:n.warning||t.type==="warning",primary:n.primary||t.type==="primary",success:n.success||t.type==="success",error:n.error||t.type==="error",active:n.active,disabled:n.disabled}]),style:e.normalizeStyle(r.value)},[e.createCommentVNode(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),i.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${n.name}`),style:e.normalizeStyle(r.value)},null,6)):i.value==="svg"?(e.openBlock(),e.createElementBlock("svg",O,[e.createElementVNode("use",{"xlink:href":`#${n.name}`},null,8,$)])):i.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:n.name,class:"h-[1em] w-[1em]"},null,8,T)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(n.name),style:e.normalizeStyle(r.value)},null,6))],6)):(e.openBlock(),e.createBlock(a,{key:1,content:n.title,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[n.name]:i.value==="unocss","show-bg":n.showBg||n.bg,default:n.size==="default",small:n.size==="small",big:n.size==="big",warning:n.warning||t.type==="warning",primary:n.primary||t.type==="primary",success:n.success||t.type==="success",error:n.error||t.type==="error",active:n.active}]),style:e.normalizeStyle(r.value)},[i.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${n.name}`),style:e.normalizeStyle(r.value)},null,6)):i.value==="svg"?(e.openBlock(),e.createElementBlock("svg",A,[e.createElementVNode("use",{"xlink:href":`#${n.name}`},null,8,M)])):i.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:n.name,class:"h-[1em] w-[1em]"},null,8,P)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(n.name),style:e.normalizeStyle(r.value)},null,6))],6)]),_:1},8,["content"]))])):(e.openBlock(),e.createBlock(d,{key:1,type:["warning","error"].includes(n.type)?"danger":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),_:1},8,["type"]))}}}),oe="",v=w(k(j,[["__scopeId","data-v-7d95dbf5"]])),N={key:0,class:"exit-main-page-maximize"},L=e.defineComponent({__name:"CloseIcon",props:{showBg:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1}},setup(o){return(t,i)=>(e.openBlock(),e.createElementBlock("div",null,[o.showBg&&o.fullscreen?(e.openBlock(),e.createElementBlock("div",N,[e.createVNode(e.unref(v),{name:"iksvg_guanbidanchuang",title:"关闭",size:20,error:""})])):(e.openBlock(),e.createBlock(e.unref(v),{key:1,error:"",name:"iksvg_guanbidanchuang",title:"关闭",size:20}))]))}}),se="",U=k(L,[["__scopeId","data-v-79f49df8"]]),H={class:"base-header"},W=e.defineComponent({__name:"IkBaseDialog",props:e.mergeModels({title:{default:""},cancelText:{default:"取消"},confirmText:{default:"确认"},noHeader:{type:Boolean},noFooter:{type:Boolean},showCloseBg:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1,noHeader:!1,noFooter:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const t=o,i=e.useModel(o,"modelValue"),r=e.ref(t.fullscreen),n=()=>{r.value=!r.value},s=e.defineComponent({setup(){return()=>e.h(U,{showBg:t.showCloseBg,fullscreen:t.fullscreen})}});return(a,d)=>{const u=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(u,e.mergeProps({modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=l=>i.value=l)},a.$attrs,{"close-icon":e.unref(s),class:`ik-base-dialog ${a.noHeader?"no-header":""} ${a.noFooter?"no-footer":""}`,fullscreen:r.value,"modal-class":"baseDialog"}),e.createSlots({icon:e.withCtx(()=>[e.renderSlot(a.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(a.title),1)])]),header:e.withCtx(()=>[e.createElementVNode("div",H,[e.renderSlot(a.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(a.title),1)])]),a.$attrs.showClose?(e.openBlock(),e.createBlock(e.unref(v),{key:0,onClick:n,name:r.value?"iksvg_tuichuquanping":"iksvg_quanping-daohang",class:"absolute! top-[18px] right-[50px] icon-dialog-full",title:r.value?"退出全屏":"全屏"},null,8,["name","title"])):e.createCommentVNode("v-if",!0)]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[a.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"footer")]),key:"0"}:void 0]),1040,["modelValue","close-icon","class","fullscreen"])}}}),re="",K=w(W);function X(o,t,i,r){function n(s){return s instanceof i?s:new i(function(a){a(s)})}return new(i||(i=Promise))(function(s,a){function d(c){try{l(r.next(c))}catch(m){a(m)}}function u(c){try{l(r.throw(c))}catch(m){a(m)}}function l(c){c.done?s(c.value):n(c.value).then(d,u)}l((r=r.apply(o,t||[])).next())})}function Y(o,t){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,n,s,a;return a={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function d(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(r=1,n&&(s=l[0]&2?n.return:l[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,l[1])).done)return s;switch(n=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,n=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(s=i.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){i=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){i.label=l[1];break}if(l[0]===6&&i.label<s[1]){i.label=s[1],s=l;break}if(s&&i.label<s[2]){i.label=s[2],i.ops.push(l);break}s[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(o,i)}catch(c){l=[6,c],n=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}typeof SuppressedError=="function"&&SuppressedError;var G=function(o,t){return X(void 0,void 0,void 0,function(){return Y(this,function(i){return[2,new Promise(function(r,n){try{if(window.DocsAPI)return r(null);var s=document.getElementById(t);if(s)var a=setInterval(function(){var u=s.getAttribute("loading");if(!u){if(clearInterval(a),window.DocsAPI)return r(null);var l=R(t,o,r,n);s.remove(),document.body.appendChild(l)}},500);else{var d=R(t,o,r,n);document.body.appendChild(d)}}catch(u){console.error(u)}})]})})},R=function(o,t,i,r){var n=document.createElement("script");return n.id=o,n.type="text/javascript",n.src=t,n.async=!0,n.onload=function(){n.removeAttribute("loading"),i(null)},n.onerror=function(s){n.removeAttribute("loading"),r(s)},n.setAttribute("loading",""),n},_=e.defineComponent({name:"DocumentEditor",props:{id:{type:String,required:!0},documentServerUrl:{type:String,required:!0},config:{type:Object,required:!0},document_fileType:String,document_title:String,documentType:String,editorConfig_lang:String,height:String,type:String,width:String,onLoadComponentError:Function,events_onAppReady:Function,events_onDocumentStateChange:Function,events_onMetaChange:Function,events_onDocumentReady:Function,events_onInfo:Function,events_onWarning:Function,events_onError:Function,events_onRequestSharingSettings:Function,events_onRequestRename:Function,events_onMakeActionLink:Function,events_onRequestInsertImage:Function,events_onRequestSaveAs:Function,events_onRequestMailMergeRecipients:Function,events_onRequestCompareFile:Function,events_onRequestEditRights:Function,events_onRequestHistory:Function,events_onRequestHistoryClose:Function,events_onRequestHistoryData:Function,events_onRequestRestore:Function,events_onRequestSelectSpreadsheet:Function,events_onRequestSelectDocument:Function},mounted:function(){var o=this,t=this.documentServerUrl;t.endsWith("/")||(t+="/");var i="".concat(t,"web-apps/apps/api/documents/api.js");G(i,"onlyoffice-api-script").then(function(){return o.onLoad()}).catch(function(){o.onError(-2)})},unmounted:function(){var o,t=this.id||"";!((o=window==null?void 0:window.DocEditor)===null||o===void 0)&&o.instances[t]&&(window.DocEditor.instances[t].destroyEditor(),window.DocEditor.instances[t]=void 0)},watch:{config:{handler:function(o,t){this.onChangeProps()},deep:!0},document_fileType:function(o,t){this.onChangeProps()},document_title:function(o,t){this.onChangeProps()},documentType:function(o,t){this.onChangeProps()},editorConfig_lang:function(o,t){this.onChangeProps()},height:function(o,t){this.onChangeProps()},type:function(o,t){this.onChangeProps()},width:function(o,t){this.onChangeProps()}},methods:{onLoad:function(){var o,t;try{var i=this.id||"";if(window.DocsAPI||this.onError(-3),!((o=window==null?void 0:window.DocEditor)===null||o===void 0)&&o.instances[i]){console.log("Skip loading. Instance already exists",i);return}!((t=window==null?void 0:window.DocEditor)===null||t===void 0)&&t.instances||(window.DocEditor={instances:{}});var r=Object.assign({document:{fileType:this.document_fileType,title:this.document_title},documentType:this.documentType,editorConfig:{lang:this.editorConfig_lang},events:{onAppReady:this.onAppReady,onDocumentStateChange:this.events_onDocumentStateChange,onMetaChange:this.events_onMetaChange,onDocumentReady:this.events_onDocumentReady,onInfo:this.events_onInfo,onWarning:this.events_onWarning,onError:this.events_onError,onRequestSharingSettings:this.events_onRequestSharingSettings,onRequestRename:this.events_onRequestRename,onMakeActionLink:this.events_onMakeActionLink,onRequestInsertImage:this.events_onRequestInsertImage,onRequestSaveAs:this.events_onRequestSaveAs,onRequestMailMergeRecipients:this.events_onRequestMailMergeRecipients,onRequestCompareFile:this.events_onRequestCompareFile,onRequestEditRights:this.events_onRequestEditRights,onRequestHistory:this.events_onRequestHistory,onRequestHistoryClose:this.events_onRequestHistoryClose,onRequestHistoryData:this.events_onRequestHistoryData,onRequestRestore:this.events_onRequestRestore,onRequestSelectSpreadsheet:this.events_onRequestSelectSpreadsheet,onRequestSelectDocument:this.events_onRequestSelectDocument},height:this.height,type:this.type,width:this.width},this.config||{}),n=window.DocsAPI.DocEditor(i,r);window.DocEditor.instances[i]=n}catch(s){console.error(s),this.onError(-1)}},onError:function(o){var t;switch(o){case-2:t="Error load DocsAPI from "+this.documentServerUrl;break;case-3:t="DocsAPI is not defined";break;default:t="Unknown error loading component",o=-1}typeof this.onLoadComponentError>"u"?console.error(t):this.onLoadComponentError(o,t)},onAppReady:function(){var o=this.id||"";this.events_onAppReady(window.DocEditor.instances[o])},onChangeProps:function(){var o,t=this.id||"";!((o=window==null?void 0:window.DocEditor)===null||o===void 0)&&o.instances[t]&&(window.DocEditor.instances[t].destroyEditor(),window.DocEditor.instances[t]=void 0,console.log("Important props have been changed. Load new Editor."),this.onLoad())}}});const J=["id"];function Q(o,t,i,r,n,s){return e.openBlock(),e.createElementBlock("div",{id:o.id},null,8,J)}_.render=Q,_.__file="src/components/DocumentEditor.vue";const Z=e.defineComponent({__name:"IkOnlyOffice",props:{documentServerUrl:{type:String,default:""},configOptions:{type:Object,default:()=>{}},officeHeight:{type:String,default:"100%"}},setup(o){const t=o,i=e.ref({width:"100%",height:"100%",...t.configOptions||{},...t.configOptions}),r=()=>{console.info("文档加载完成",t.configOptions)};return(n,s)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({height:t.officeHeight})},[e.createVNode(e.unref(_),{id:`${new Date().getTime()}`,ref:"editorRef","document-server-url":o.documentServerUrl,config:i.value,events_onDocumentReady:r},null,8,["id","document-server-url","config"])],4))}}),le="",ee=w(k(Z,[["__scopeId","data-v-98d51ef9"]])),te=e.defineComponent({__name:"IkPreviewFileDialog",props:e.mergeModels({file:{type:Object,default:()=>[]},loadUrl:{type:String,default:""},onlyOfficeAccept:{type:String,default:".pdf,.docx,.doc.ppt,.pptx,.xlsx,.xls,"},onlyofficeServer:{type:String,default:""},onlyOfficeConfig:{type:Object,default:()=>({})},field:{type:Object,default:()=>({})}},{show:{default:!1},showModifiers:{}}),emits:["update:show"],setup(o){const t=o,i=e.useModel(o,"show"),r=e.computed(()=>({name:"name",url:"url",suffix:"suffix",size:"fileSize",...t.field})),n=e.ref(null),s=e.ref(null),a=e.reactive({image:!1,office:!1,video:!1}),d=l=>{var c,m,g,h,y,E,x;try{const p=((c=l==null?void 0:l.response)==null?void 0:c.data)||l,I=p[r.value.url]||(p==null?void 0:p.id)||p.attachmentId,b=(m=p[r.value.suffix]||p.attachmentSuffix)==null?void 0:m.toLowerCase(),ne=p[r.value.name]||(p==null?void 0:p.attachmentName)||(p==null?void 0:p.originName);if(s.value={...l,name:l[r.value.name],url:S(t.loadUrl,I)},l&&D(l,r.value)==="image"){a.image=!0;return}else if((((g=t.onlyOfficeConfig)==null?void 0:g.accept)||t.onlyOfficeAccept).includes(b)){a.office=!0,n.value={...t.onlyOfficeConfig,editorConfig:{...((h=t.onlyOfficeConfig)==null?void 0:h.editorConfig)||{},customization:{...((E=(y=t.onlyOfficeConfig)==null?void 0:y.editorConfig)==null?void 0:E.customization)||{},review:{reviewDisplay:"final"}}},document:{key:C.buildUUID(),title:ne,url:S(t.loadUrl,I),fileType:b,...((x=t.onlyOfficeConfig)==null?void 0:x.document)||{}},documentType:V(b)};return}}catch(p){console.info("预览错误: ",p)}};e.watch([i,t.file],([l,c])=>{l&&e.nextTick(()=>{d(t.file)})});const u=()=>{i.value=!1,a.office=!1,a.image=!1,a.video=!1};return(l,c)=>{var g,h;const m=e.resolveComponent("el-image-viewer");return i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(g=s.value)!=null&&g.url&&a.image?(e.openBlock(),e.createBlock(m,{key:0,onClose:c[0]||(c[0]=y=>{s.value=null,a.image=!1}),ref:"previewImgRef","url-list":[(h=s.value)==null?void 0:h.url]},null,8,["url-list"])):e.createCommentVNode("v-if",!0),e.createCommentVNode(" 文档类 "),e.createVNode(e.unref(K),{modelValue:a.office,"onUpdate:modelValue":c[1]||(c[1]=y=>a.office=y),draggable:"","no-footer":"","no-header":"",fullscreen:"","show-close-bg":"","destroy-on-close":"","close-on-click-modal":"","close-on-press-escape":!1,"append-to-body":"",onClose:u,"modal-class":"ik-only-preview-dialog"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee),{"config-options":n.value,"document-server-url":o.onlyOfficeConfig.serverUrl||o.onlyofficeServer},null,8,["config-options","document-server-url"])]),_:1},8,["modelValue"])],64)):e.createCommentVNode("v-if",!0)}}}),ce="",z=w(te);f.IkPreviewFileDialog=z,f.default=z,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,4 +1,4 @@
1
- import { defineComponent as I, openBlock as d, createElementBlock as w, ref as O, normalizeStyle as H, createVNode as E, unref as $, watch as U, resolveComponent as D, Fragment as T, renderList as F, createBlock as k, withCtx as m, createElementVNode as c, toDisplayString as R, createCommentVNode as C, normalizeClass as A, pushScopeId as N, popScopeId as j, useCssVars as W } from "vue";
1
+ import { defineComponent as I, openBlock as d, createElementBlock as w, ref as T, normalizeStyle as H, createVNode as E, unref as $, watch as U, resolveComponent as D, Fragment as O, renderList as F, createBlock as k, withCtx as m, createElementVNode as c, toDisplayString as R, createCommentVNode as C, normalizeClass as A, pushScopeId as N, popScopeId as j, useCssVars as W } from "vue";
2
2
  const L = (e, t) => {
3
3
  if (e.install = (n) => {
4
4
  for (const i of [e, ...Object.values(t ?? {})])
@@ -331,10 +331,11 @@ const Q = /* @__PURE__ */ I({
331
331
  }
332
332
  },
333
333
  setup(e) {
334
- const t = e, n = O({
334
+ const t = e, n = T({
335
335
  width: "100%",
336
336
  height: "100%",
337
- ...t.configOptions || {}
337
+ ...t.configOptions || {},
338
+ ...t.configOptions
338
339
  }), i = () => {
339
340
  console.info("文档加载完成", t.configOptions);
340
341
  };
@@ -362,7 +363,7 @@ const P = (e, t) => {
362
363
  for (const [i, s] of t)
363
364
  n[i] = s;
364
365
  return n;
365
- }, Y = /* @__PURE__ */ P(Q, [["__scopeId", "data-v-fe959cd8"]]), Z = L(Y), ee = Z, M = (e) => (N("data-v-af8d674c"), e = e(), j(), e), te = { class: "template-data" }, ne = { class: "operate-btn" }, oe = ["onClick"], ie = ["onClick"], ae = { class: "m-12 point" }, se = { class: "flex" }, re = ["onClick"], le = /* @__PURE__ */ M(() => /* @__PURE__ */ c(
366
+ }, Y = /* @__PURE__ */ P(Q, [["__scopeId", "data-v-98d51ef9"]]), Z = L(Y), ee = Z, M = (e) => (N("data-v-af8d674c"), e = e(), j(), e), te = { class: "template-data" }, ne = { class: "operate-btn" }, oe = ["onClick"], ie = ["onClick"], ae = { class: "m-12 point" }, se = { class: "flex" }, re = ["onClick"], le = /* @__PURE__ */ M(() => /* @__PURE__ */ c(
366
367
  "i",
367
368
  { class: "icon-icon_particulars iconfont tips" },
368
369
  null,
@@ -426,7 +427,7 @@ const P = (e, t) => {
426
427
  }))
427
428
  }));
428
429
  v.value = S;
429
- }, v = O(n.data);
430
+ }, v = T(n.data);
430
431
  return U(
431
432
  () => n.data,
432
433
  (l) => {
@@ -439,7 +440,7 @@ const P = (e, t) => {
439
440
  const y = D("el-popover");
440
441
  return d(), w("div", te, [
441
442
  (d(!0), w(
442
- T,
443
+ O,
443
444
  null,
444
445
  F(v.value, (u, q) => (d(), w("div", {
445
446
  key: q,
@@ -484,7 +485,7 @@ const P = (e, t) => {
484
485
  1024
485
486
  /* DYNAMIC_SLOTS */
486
487
  )) : (d(), w(
487
- T,
488
+ O,
488
489
  { key: 1 },
489
490
  [
490
491
  C(" 不能操作的标题 "),
@@ -516,7 +517,7 @@ const P = (e, t) => {
516
517
  C(" 标题下的内容 "),
517
518
  c("div", de, [
518
519
  (d(!0), w(
519
- T,
520
+ O,
520
521
  null,
521
522
  F(u.children, (r, B) => (d(), w("div", {
522
523
  key: B,
@@ -692,9 +693,9 @@ const we = /* @__PURE__ */ P(ye, [["__scopeId", "data-v-af8d674c"]]), Se = { cla
692
693
  W((_) => ({
693
694
  f1632ab6: e.contentHeight
694
695
  }));
695
- const i = e, s = n, o = O(i.tabsData[0].id), p = (_) => {
696
+ const i = e, s = n, o = T(i.tabsData[0].id), p = (_) => {
696
697
  f.value = "", o.value = _, _ && s("handleSearchDataBlock", "", o.value);
697
- }, f = O(""), g = () => {
698
+ }, f = T(""), g = () => {
698
699
  s("handleSearchDataBlock", f.value, o.value);
699
700
  }, a = (_, v) => {
700
701
  s("handleClickBlockData", _, v);
@@ -717,7 +718,7 @@ const we = /* @__PURE__ */ P(ye, [["__scopeId", "data-v-af8d674c"]]), Se = { cla
717
718
  }, {
718
719
  default: m(() => [
719
720
  (d(!0), w(
720
- T,
721
+ O,
721
722
  null,
722
723
  F(i.tabsData, (r, B) => (d(), k(l, {
723
724
  key: B,