iking-web-ui-pro 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/IKDetailPreviewFiles/ik.index.es.js +329 -373
- package/dist/IKDetailPreviewFiles/ik.index.umd.js +1 -1
- package/dist/IKPreviewFile/ik.index.es.js +381 -425
- package/dist/IKPreviewFile/ik.index.umd.js +1 -1
- package/dist/IkApprovalProcessDetail/ik.index.es.js +226 -270
- package/dist/IkApprovalProcessDetail/ik.index.umd.js +1 -1
- package/dist/IkApprovalProcessDetail/style.css +1 -1
- package/dist/IkDescription/ik.index.es.js +422 -466
- package/dist/IkDescription/ik.index.umd.js +1 -1
- package/dist/IkOnlyOffice/ik.index.es.js +80 -127
- package/dist/IkOnlyOffice/ik.index.umd.js +1 -1
- package/dist/IkPreviewFileDialog/ik.index.es.js +144 -188
- package/dist/IkPreviewFileDialog/ik.index.umd.js +1 -1
- package/dist/IkTemplateOfficeConfig/ik.index.es.js +194 -241
- package/dist/IkTemplateOfficeConfig/ik.index.umd.js +1 -1
- package/dist/IkUploadFile/ik.index.es.js +281 -325
- package/dist/IkUploadFile/ik.index.umd.js +1 -1
- package/dist/index.es.js +3745 -3789
- package/dist/index.umd.js +48 -48
- package/dist/src/components/IkOnlyOffice/index.d.ts +0 -18
- package/dist/src/components/IkOnlyOffice/src/IkOnlyOffice.vue.d.ts +0 -18
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(d,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],c):(d=typeof globalThis<"u"?globalThis:d||self,c(d.index={},d.vue))})(this,function(d,c){"use strict";const g=(e,n)=>{if(e.install=t=>{for(const r of[e,...Object.values(n??{})])t.component(r.name,r)},n)for(const[t,r]of Object.entries(n))e[t]=r;return e};function m(e,n,t,r){function s(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function l(u){try{i(r.next(u))}catch(v){a(v)}}function f(u){try{i(r.throw(u))}catch(v){a(v)}}function i(u){u.done?o(u.value):s(u.value).then(l,f)}i((r=r.apply(e,n||[])).next())})}function w(e,n){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,s,o,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(i){return function(u){return f([i,u])}}function f(i){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,i[0]&&(t=0)),t;)try{if(r=1,s&&(o=i[0]&2?s.return:i[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,i[1])).done)return o;switch(s=0,o&&(i=[i[0]&2,o.value]),i[0]){case 0:case 1:o=i;break;case 4:return t.label++,{value:i[1],done:!1};case 5:t.label++,s=i[1],i=[0];continue;case 7:i=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){t.label=i[1];break}if(i[0]===6&&t.label<o[1]){t.label=o[1],o=i;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(i);break}o[2]&&t.ops.pop(),t.trys.pop();continue}i=n.call(e,t)}catch(u){i=[6,u],s=0}finally{r=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}}typeof SuppressedError=="function"&&SuppressedError;var y=function(e,n){return m(void 0,void 0,void 0,function(){return w(this,function(t){return[2,new Promise(function(r,s){try{if(window.DocsAPI)return r(null);var o=document.getElementById(n);if(o)var a=setInterval(function(){var f=o.getAttribute("loading");if(!f){if(clearInterval(a),window.DocsAPI)return r(null);var i=p(n,e,r,s);o.remove(),document.body.appendChild(i)}},500);else{var l=p(n,e,r,s);document.body.appendChild(l)}}catch(f){console.error(f)}})]})})},p=function(e,n,t,r){var s=document.createElement("script");return s.id=e,s.type="text/javascript",s.src=n,s.async=!0,s.onload=function(){s.removeAttribute("loading"),t(null)},s.onerror=function(o){s.removeAttribute("loading"),r(o)},s.setAttribute("loading",""),s},h=c.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 e=this,n=this.documentServerUrl;n.endsWith("/")||(n+="/");var t="".concat(n,"web-apps/apps/api/documents/api.js");y(t,"onlyoffice-api-script").then(function(){return e.onLoad()}).catch(function(){e.onError(-2)})},unmounted:function(){var e,n=this.id||"";!((e=window==null?void 0:window.DocEditor)===null||e===void 0)&&e.instances[n]&&(window.DocEditor.instances[n].destroyEditor(),window.DocEditor.instances[n]=void 0)},watch:{config:{handler:function(e,n){this.onChangeProps()},deep:!0},document_fileType:function(e,n){this.onChangeProps()},document_title:function(e,n){this.onChangeProps()},documentType:function(e,n){this.onChangeProps()},editorConfig_lang:function(e,n){this.onChangeProps()},height:function(e,n){this.onChangeProps()},type:function(e,n){this.onChangeProps()},width:function(e,n){this.onChangeProps()}},methods:{onLoad:function(){var e,n;try{var t=this.id||"";if(window.DocsAPI||this.onError(-3),!((e=window==null?void 0:window.DocEditor)===null||e===void 0)&&e.instances[t]){console.log("Skip loading. Instance already exists",t);return}!((n=window==null?void 0:window.DocEditor)===null||n===void 0)&&n.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||{}),s=window.DocsAPI.DocEditor(t,r);window.DocEditor.instances[t]=s}catch(o){console.error(o),this.onError(-1)}},onError:function(e){var n;switch(e){case-2:n="Error load DocsAPI from "+this.documentServerUrl;break;case-3:n="DocsAPI is not defined";break;default:n="Unknown error loading component",e=-1}typeof this.onLoadComponentError>"u"?console.error(n):this.onLoadComponentError(e,n)},onAppReady:function(){var e=this.id||"";this.events_onAppReady(window.DocEditor.instances[e])},onChangeProps:function(){var e,n=this.id||"";!((e=window==null?void 0:window.DocEditor)===null||e===void 0)&&e.instances[n]&&(window.DocEditor.instances[n].destroyEditor(),window.DocEditor.instances[n]=void 0,console.log("Important props have been changed. Load new Editor."),this.onLoad())}}});const R=["id"];function S(e,n,t,r,s,o){return c.openBlock(),c.createElementBlock("div",{id:e.id},null,8,R)}h.render=S,h.__file="src/components/DocumentEditor.vue";const q=c.defineComponent({__name:"IkOnlyOffice",props:{documentServerUrl:{type:String,default:""},configOptions:{type:Object,default:()=>{}},officeHeight:{type:String,default:"100%"}},setup(e){const n=e,t=c.ref({width:"100%",height:"100%",...n.configOptions||{}}),r=()=>{console.info("文档加载完成",n.configOptions)};return(s,o)=>(c.openBlock(),c.createElementBlock("div",{style:c.normalizeStyle({height:n.officeHeight})},[c.createVNode(c.unref(h),{id:`${new Date().getTime()}`,ref:"editorRef","document-server-url":e.documentServerUrl,config:t.value,events_onDocumentReady:r},null,8,["id","document-server-url","config"])],4))}}),E="",_=g(((e,n)=>{const t=e.__vccOpts||e;for(const[r,s]of n)t[r]=s;return t})(q,[["__scopeId","data-v-fe959cd8"]]));d.IkOnlyOffice=_,d.default=_,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|