iking-web-ui-pro 0.0.1
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/Demo/index.es.js +13 -0
- package/dist/Demo/index.umd.js +1 -0
- package/dist/Demo/package.json +7 -0
- package/dist/IKApprovalProcess/index.es.js +13026 -0
- package/dist/IKApprovalProcess/index.umd.js +32 -0
- package/dist/IKApprovalProcess/package.json +7 -0
- package/dist/IKApprovalProcess/style.css +7 -0
- package/dist/IKApprovalProcessDetail/index.es.js +630 -0
- package/dist/IKApprovalProcessDetail/index.umd.js +1 -0
- package/dist/IKApprovalProcessDetail/package.json +7 -0
- package/dist/IKApprovalProcessDetail/style.css +1 -0
- package/dist/IKCalendar/index.es.js +22495 -0
- package/dist/IKCalendar/index.umd.js +32 -0
- package/dist/IKCalendar/package.json +7 -0
- package/dist/IKCalendar/style.css +7 -0
- package/dist/IKDescription/index.es.js +105 -0
- package/dist/IKDescription/index.umd.js +1 -0
- package/dist/IKDescription/style.css +1 -0
- package/dist/IKDetailPreviewFiles/index.es.js +1599 -0
- package/dist/IKDetailPreviewFiles/index.umd.js +1 -0
- package/dist/IKDetailPreviewFiles/style.css +1 -0
- package/dist/IKExpandCollapse/index.es.js +1388 -0
- package/dist/IKExpandCollapse/index.umd.js +1 -0
- package/dist/IKExpandCollapse/style.css +1 -0
- package/dist/IKHorizontalStepBar/index.es.js +251 -0
- package/dist/IKHorizontalStepBar/index.umd.js +1 -0
- package/dist/IKHorizontalStepBar/package.json +7 -0
- package/dist/IKHorizontalStepBar/style.css +1 -0
- package/dist/IKPreviewFile/index.es.js +108 -0
- package/dist/IKPreviewFile/index.umd.js +1 -0
- package/dist/IKPreviewFile/style.css +1 -0
- package/dist/IKSearch/index.es.js +13406 -0
- package/dist/IKSearch/index.umd.js +57 -0
- package/dist/IKSearch/package.json +7 -0
- package/dist/IKSearch/style.css +7 -0
- package/dist/IKSearchHead/index.es.js +116 -0
- package/dist/IKSearchHead/index.umd.js +1 -0
- package/dist/IKSearchHead/package.json +7 -0
- package/dist/IKSearchHead/style.css +1 -0
- package/dist/IKVerticalStepBar/index.es.js +1481 -0
- package/dist/IKVerticalStepBar/index.umd.js +9 -0
- package/dist/IKVerticalStepBar/package.json +7 -0
- package/dist/IKVerticalStepBar/style.css +1 -0
- package/dist/IkBottomOperate/index.es.js +210 -0
- package/dist/IkBottomOperate/index.umd.js +1 -0
- package/dist/IkBottomOperate/style.css +1 -0
- package/dist/IkBtnContent/index.es.js +101 -0
- package/dist/IkBtnContent/index.umd.js +1 -0
- package/dist/IkBtnContent/style.css +1 -0
- package/dist/IkBtnSetting/index.es.js +12854 -0
- package/dist/IkBtnSetting/index.umd.js +32 -0
- package/dist/IkBtnSetting/style.css +7 -0
- package/dist/IkDragList/index.es.js +11071 -0
- package/dist/IkDragList/index.umd.js +32 -0
- package/dist/IkDragList/style.css +7 -0
- package/dist/IkFullCalendar/index.es.js +20327 -0
- package/dist/IkFullCalendar/index.umd.js +32 -0
- package/dist/IkFullCalendar/style.css +7 -0
- package/dist/IkIconPicker/index.es.js +13693 -0
- package/dist/IkIconPicker/index.umd.js +32 -0
- package/dist/IkIconPicker/style.css +7 -0
- package/dist/IkOnlyOffice/index.es.js +393 -0
- package/dist/IkOnlyOffice/index.umd.js +1 -0
- package/dist/IkOnlyOffice/style.css +0 -0
- package/dist/IkPageFull/index.es.js +15725 -0
- package/dist/IkPageFull/index.umd.js +48 -0
- package/dist/IkPageFull/style.css +7 -0
- package/dist/IkPageTabs/index.es.js +135 -0
- package/dist/IkPageTabs/index.umd.js +1 -0
- package/dist/IkPageTabs/style.css +1 -0
- package/dist/IkPicker/index.es.js +12629 -0
- package/dist/IkPicker/index.umd.js +32 -0
- package/dist/IkPicker/style.css +7 -0
- package/dist/IkPickerUser/index.es.js +12508 -0
- package/dist/IkPickerUser/index.umd.js +32 -0
- package/dist/IkPickerUser/style.css +7 -0
- package/dist/IkPrintConfig/index.es.js +62 -0
- package/dist/IkPrintConfig/index.umd.js +1 -0
- package/dist/IkPrintView/index.es.js +79 -0
- package/dist/IkPrintView/index.umd.js +1 -0
- package/dist/IkRadioGroup/index.es.js +75 -0
- package/dist/IkRadioGroup/index.umd.js +1 -0
- package/dist/IkRadioGroup/style.css +1 -0
- package/dist/IkSchedule/index.es.js +22228 -0
- package/dist/IkSchedule/index.umd.js +32 -0
- package/dist/IkSchedule/style.css +7 -0
- package/dist/IkStatu/index.es.js +119 -0
- package/dist/IkStatu/index.umd.js +1 -0
- package/dist/IkStatu/style.css +1 -0
- package/dist/IkSvgIcon/index.es.js +1343 -0
- package/dist/IkSvgIcon/index.umd.js +1 -0
- package/dist/IkSvgIcon/style.css +1 -0
- package/dist/IkTemplateOfficeConfig/index.es.js +805 -0
- package/dist/IkTemplateOfficeConfig/index.umd.js +1 -0
- package/dist/IkTemplateOfficeConfig/style.css +1 -0
- package/dist/IkTooltip/index.es.js +49 -0
- package/dist/IkTooltip/index.umd.js +1 -0
- package/dist/IkUploadFile/index.es.js +12098 -0
- package/dist/IkUploadFile/index.umd.js +32 -0
- package/dist/IkUploadFile/style.css +7 -0
- package/dist/IkUploadImage/index.es.js +11442 -0
- package/dist/IkUploadImage/index.umd.js +32 -0
- package/dist/IkUploadImage/style.css +7 -0
- package/dist/index.es.js +33843 -0
- package/dist/index.umd.js +81 -0
- package/dist/style.css +7 -0
- package/package.json +66 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Waves v0.7.6
|
|
3
|
+
* http://fian.my.id/Waves
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2014-2018 Alfiana E. Sibuea and other contributors
|
|
6
|
+
* Released under the MIT license
|
|
7
|
+
* https://github.com/fians/Waves/blob/master/LICENSE */.waves-effect{position:relative;cursor:pointer;display:inline-block;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.waves-effect .waves-ripple{position:absolute;border-radius:50%;width:100px;height:100px;margin-top:-50px;margin-left:-50px;opacity:0;background:rgba(0,0,0,.2);background:-webkit-radial-gradient(rgba(0,0,0,.2) 0,rgba(0,0,0,.3) 40%,rgba(0,0,0,.4) 50%,rgba(0,0,0,.5) 60%,rgba(255,255,255,0) 70%);background:-o-radial-gradient(rgba(0,0,0,.2) 0,rgba(0,0,0,.3) 40%,rgba(0,0,0,.4) 50%,rgba(0,0,0,.5) 60%,rgba(255,255,255,0) 70%);background:-moz-radial-gradient(rgba(0,0,0,.2) 0,rgba(0,0,0,.3) 40%,rgba(0,0,0,.4) 50%,rgba(0,0,0,.5) 60%,rgba(255,255,255,0) 70%);background:radial-gradient(rgba(0,0,0,.2) 0,rgba(0,0,0,.3) 40%,rgba(0,0,0,.4) 50%,rgba(0,0,0,.5) 60%,rgba(255,255,255,0) 70%);-webkit-transition:all .5s ease-out;-moz-transition:all .5s ease-out;-o-transition:all .5s ease-out;transition:all .5s ease-out;-webkit-transition-property:-webkit-transform,opacity;-moz-transition-property:-moz-transform,opacity;-o-transition-property:-o-transform,opacity;transition-property:transform,opacity;-webkit-transform:scale(0) translate(0,0);-moz-transform:scale(0) translate(0,0);-ms-transform:scale(0) translate(0,0);-o-transform:scale(0) translate(0,0);transform:scale(0) translate(0);pointer-events:none}.waves-effect.waves-light .waves-ripple{background:rgba(255,255,255,.4);background:-webkit-radial-gradient(rgba(255,255,255,.2) 0,rgba(255,255,255,.3) 40%,rgba(255,255,255,.4) 50%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 70%);background:-o-radial-gradient(rgba(255,255,255,.2) 0,rgba(255,255,255,.3) 40%,rgba(255,255,255,.4) 50%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 70%);background:-moz-radial-gradient(rgba(255,255,255,.2) 0,rgba(255,255,255,.3) 40%,rgba(255,255,255,.4) 50%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 70%);background:radial-gradient(rgba(255,255,255,.2) 0,rgba(255,255,255,.3) 40%,rgba(255,255,255,.4) 50%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0) 70%)}.waves-effect.waves-classic .waves-ripple{background:rgba(0,0,0,.2)}.waves-effect.waves-classic.waves-light .waves-ripple{background:rgba(255,255,255,.4)}.waves-notransition{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;transition:none!important}.waves-button,.waves-circle{-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0);transform:translateZ(0);-webkit-mask-image:-webkit-radial-gradient(circle,#fff 100%,#000 100%)}.waves-button,.waves-button-input,.waves-button:hover,.waves-button:visited{white-space:nowrap;vertical-align:middle;cursor:pointer;border:none;outline:0;color:inherit;background-color:#0000;font-size:1em;line-height:1em;text-align:center;text-decoration:none;z-index:1}.waves-button{padding:.85em 1.1em;border-radius:.2em}.waves-button-input{margin:0;padding:.85em 1.1em}.waves-input-wrapper{border-radius:.2em;vertical-align:bottom}.waves-input-wrapper.waves-button{padding:0}.waves-input-wrapper .waves-button-input{position:relative;top:0;left:0;z-index:1}.waves-circle{text-align:center;width:2.5em;height:2.5em;line-height:2.5em;border-radius:50%}.waves-float{-webkit-mask-image:none;-webkit-box-shadow:0 1px 1.5px 1px rgba(0,0,0,.12);box-shadow:0 1px 1.5px 1px #0000001f;-webkit-transition:all .3s;-moz-transition:all .3s;-o-transition:all .3s;transition:all .3s}.waves-float:active{-webkit-box-shadow:0 8px 20px 1px rgba(0,0,0,.3);box-shadow:0 8px 20px 1px #0000004d}.waves-block{display:block}.basicWidth[data-v-1957ff53]{width:1em}.basicHeight[data-v-1957ff53]{height:1em}.icon-picker-pop .icon-list[data-v-2e77d522]{display:grid;grid-template-columns:repeat(auto-fill,36px);grid-gap:var(--ik-margin-s-16);justify-content:flex-start;justify-items:flex-end;max-height:500px;margin-top:16px;overflow-y:auto;font-size:25px}.icon-picker-header{position:relative;display:inline-flex;display:flex;align-items:center;justify-content:center;width:var(--ik-base-height);height:var(--ik-base-height);cursor:pointer;border:1px dashed var(--ik-color-divider);border-radius:var(--ik-border-radius-xs);transition:border .25s ease-in-out}.icon-picker-header:hover{border-color:var(--ik-color-primary)}.icon-picker-header .icon-delete{position:absolute;top:-6px;right:-8px;font-size:var(--ik-font-size-t2)}
|
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
import { defineComponent as h, openBlock as v, createElementBlock as p, ref as m, normalizeStyle as g, createVNode as w, unref as _ } from "vue";
|
|
2
|
+
const y = (n, e) => {
|
|
3
|
+
if (n.install = (o) => {
|
|
4
|
+
for (const r of [n, ...Object.values(e ?? {})])
|
|
5
|
+
o.component(r.name, r);
|
|
6
|
+
}, e)
|
|
7
|
+
for (const [o, r] of Object.entries(e))
|
|
8
|
+
n[o] = r;
|
|
9
|
+
return n;
|
|
10
|
+
};
|
|
11
|
+
function R(n, e, o, r) {
|
|
12
|
+
function s(t) {
|
|
13
|
+
return t instanceof o ? t : new o(function(c) {
|
|
14
|
+
c(t);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return new (o || (o = Promise))(function(t, c) {
|
|
18
|
+
function a(u) {
|
|
19
|
+
try {
|
|
20
|
+
i(r.next(u));
|
|
21
|
+
} catch (l) {
|
|
22
|
+
c(l);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function d(u) {
|
|
26
|
+
try {
|
|
27
|
+
i(r.throw(u));
|
|
28
|
+
} catch (l) {
|
|
29
|
+
c(l);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function i(u) {
|
|
33
|
+
u.done ? t(u.value) : s(u.value).then(a, d);
|
|
34
|
+
}
|
|
35
|
+
i((r = r.apply(n, e || [])).next());
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function q(n, e) {
|
|
39
|
+
var o = { label: 0, sent: function() {
|
|
40
|
+
if (t[0] & 1)
|
|
41
|
+
throw t[1];
|
|
42
|
+
return t[1];
|
|
43
|
+
}, trys: [], ops: [] }, r, s, t, c;
|
|
44
|
+
return c = { next: a(0), throw: a(1), return: a(2) }, typeof Symbol == "function" && (c[Symbol.iterator] = function() {
|
|
45
|
+
return this;
|
|
46
|
+
}), c;
|
|
47
|
+
function a(i) {
|
|
48
|
+
return function(u) {
|
|
49
|
+
return d([i, u]);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function d(i) {
|
|
53
|
+
if (r)
|
|
54
|
+
throw new TypeError("Generator is already executing.");
|
|
55
|
+
for (; c && (c = 0, i[0] && (o = 0)), o; )
|
|
56
|
+
try {
|
|
57
|
+
if (r = 1, s && (t = i[0] & 2 ? s.return : i[0] ? s.throw || ((t = s.return) && t.call(s), 0) : s.next) && !(t = t.call(s, i[1])).done)
|
|
58
|
+
return t;
|
|
59
|
+
switch (s = 0, t && (i = [i[0] & 2, t.value]), i[0]) {
|
|
60
|
+
case 0:
|
|
61
|
+
case 1:
|
|
62
|
+
t = i;
|
|
63
|
+
break;
|
|
64
|
+
case 4:
|
|
65
|
+
return o.label++, { value: i[1], done: !1 };
|
|
66
|
+
case 5:
|
|
67
|
+
o.label++, s = i[1], i = [0];
|
|
68
|
+
continue;
|
|
69
|
+
case 7:
|
|
70
|
+
i = o.ops.pop(), o.trys.pop();
|
|
71
|
+
continue;
|
|
72
|
+
default:
|
|
73
|
+
if (t = o.trys, !(t = t.length > 0 && t[t.length - 1]) && (i[0] === 6 || i[0] === 2)) {
|
|
74
|
+
o = 0;
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
if (i[0] === 3 && (!t || i[1] > t[0] && i[1] < t[3])) {
|
|
78
|
+
o.label = i[1];
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
if (i[0] === 6 && o.label < t[1]) {
|
|
82
|
+
o.label = t[1], t = i;
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
if (t && o.label < t[2]) {
|
|
86
|
+
o.label = t[2], o.ops.push(i);
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
t[2] && o.ops.pop(), o.trys.pop();
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
i = e.call(n, o);
|
|
93
|
+
} catch (u) {
|
|
94
|
+
i = [6, u], s = 0;
|
|
95
|
+
} finally {
|
|
96
|
+
r = t = 0;
|
|
97
|
+
}
|
|
98
|
+
if (i[0] & 5)
|
|
99
|
+
throw i[1];
|
|
100
|
+
return { value: i[0] ? i[1] : void 0, done: !0 };
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
var C = function(n, e) {
|
|
104
|
+
return R(void 0, void 0, void 0, function() {
|
|
105
|
+
return q(this, function(o) {
|
|
106
|
+
return [2, new Promise(function(r, s) {
|
|
107
|
+
try {
|
|
108
|
+
if (document.getElementById(e)) {
|
|
109
|
+
if (window.DocsAPI)
|
|
110
|
+
return r(null);
|
|
111
|
+
var t = setInterval(function() {
|
|
112
|
+
if (window.DocsAPI)
|
|
113
|
+
return clearInterval(t), r(null);
|
|
114
|
+
}, 500);
|
|
115
|
+
} else {
|
|
116
|
+
var c = document.createElement("script");
|
|
117
|
+
c.setAttribute("type", "text/javascript"), c.setAttribute("id", e), c.onload = r, c.onerror = s, c.src = n, c.async = !0, document.body.appendChild(c);
|
|
118
|
+
}
|
|
119
|
+
} catch (a) {
|
|
120
|
+
console.error(a);
|
|
121
|
+
}
|
|
122
|
+
})];
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
}, f = h({
|
|
126
|
+
name: "DocumentEditor",
|
|
127
|
+
props: {
|
|
128
|
+
id: {
|
|
129
|
+
type: String,
|
|
130
|
+
required: !0
|
|
131
|
+
},
|
|
132
|
+
documentServerUrl: {
|
|
133
|
+
type: String,
|
|
134
|
+
required: !0
|
|
135
|
+
},
|
|
136
|
+
config: {
|
|
137
|
+
type: Object,
|
|
138
|
+
required: !0
|
|
139
|
+
},
|
|
140
|
+
document_fileType: String,
|
|
141
|
+
document_title: String,
|
|
142
|
+
documentType: String,
|
|
143
|
+
editorConfig_lang: String,
|
|
144
|
+
height: String,
|
|
145
|
+
type: String,
|
|
146
|
+
width: String,
|
|
147
|
+
onLoadComponentError: Function,
|
|
148
|
+
events_onAppReady: Function,
|
|
149
|
+
events_onDocumentStateChange: Function,
|
|
150
|
+
events_onMetaChange: Function,
|
|
151
|
+
events_onDocumentReady: Function,
|
|
152
|
+
events_onInfo: Function,
|
|
153
|
+
events_onWarning: Function,
|
|
154
|
+
events_onError: Function,
|
|
155
|
+
events_onRequestSharingSettings: Function,
|
|
156
|
+
events_onRequestRename: Function,
|
|
157
|
+
events_onMakeActionLink: Function,
|
|
158
|
+
events_onRequestInsertImage: Function,
|
|
159
|
+
events_onRequestSaveAs: Function,
|
|
160
|
+
events_onRequestMailMergeRecipients: Function,
|
|
161
|
+
events_onRequestCompareFile: Function,
|
|
162
|
+
events_onRequestEditRights: Function,
|
|
163
|
+
events_onRequestHistory: Function,
|
|
164
|
+
events_onRequestHistoryClose: Function,
|
|
165
|
+
events_onRequestHistoryData: Function,
|
|
166
|
+
events_onRequestRestore: Function
|
|
167
|
+
},
|
|
168
|
+
mounted: function() {
|
|
169
|
+
var n = this, e = this.documentServerUrl;
|
|
170
|
+
e.endsWith("/") || (e += "/");
|
|
171
|
+
var o = "".concat(e, "web-apps/apps/api/documents/api.js");
|
|
172
|
+
C(o, "onlyoffice-api-script").then(function() {
|
|
173
|
+
return n.onLoad();
|
|
174
|
+
}).catch(function() {
|
|
175
|
+
n.onError(-2);
|
|
176
|
+
});
|
|
177
|
+
},
|
|
178
|
+
unmounted: function() {
|
|
179
|
+
var n, e = this.id || "";
|
|
180
|
+
!((n = window == null ? void 0 : window.DocEditor) === null || n === void 0) && n.instances[e] && (window.DocEditor.instances[e].destroyEditor(), window.DocEditor.instances[e] = void 0);
|
|
181
|
+
},
|
|
182
|
+
watch: {
|
|
183
|
+
config: {
|
|
184
|
+
handler: function(n, e) {
|
|
185
|
+
this.onChangeProps();
|
|
186
|
+
},
|
|
187
|
+
deep: !0
|
|
188
|
+
},
|
|
189
|
+
document_fileType: function(n, e) {
|
|
190
|
+
this.onChangeProps();
|
|
191
|
+
},
|
|
192
|
+
document_title: function(n, e) {
|
|
193
|
+
this.onChangeProps();
|
|
194
|
+
},
|
|
195
|
+
documentType: function(n, e) {
|
|
196
|
+
this.onChangeProps();
|
|
197
|
+
},
|
|
198
|
+
editorConfig_lang: function(n, e) {
|
|
199
|
+
this.onChangeProps();
|
|
200
|
+
},
|
|
201
|
+
height: function(n, e) {
|
|
202
|
+
this.onChangeProps();
|
|
203
|
+
},
|
|
204
|
+
type: function(n, e) {
|
|
205
|
+
this.onChangeProps();
|
|
206
|
+
},
|
|
207
|
+
width: function(n, e) {
|
|
208
|
+
this.onChangeProps();
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
methods: {
|
|
212
|
+
onLoad: function() {
|
|
213
|
+
var n, e;
|
|
214
|
+
try {
|
|
215
|
+
var o = this.id || "";
|
|
216
|
+
if (window.DocsAPI || this.onError(-3), !((n = window == null ? void 0 : window.DocEditor) === null || n === void 0) && n.instances[o]) {
|
|
217
|
+
console.log("Skip loading. Instance already exists", o);
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
!((e = window == null ? void 0 : window.DocEditor) === null || e === void 0) && e.instances || (window.DocEditor = { instances: {} });
|
|
221
|
+
var r = Object.assign({
|
|
222
|
+
document: {
|
|
223
|
+
fileType: this.document_fileType,
|
|
224
|
+
title: this.document_title
|
|
225
|
+
},
|
|
226
|
+
documentType: this.documentType,
|
|
227
|
+
editorConfig: {
|
|
228
|
+
lang: this.editorConfig_lang
|
|
229
|
+
},
|
|
230
|
+
events: {
|
|
231
|
+
onAppReady: this.onAppReady,
|
|
232
|
+
onDocumentStateChange: this.events_onDocumentStateChange,
|
|
233
|
+
onMetaChange: this.events_onMetaChange,
|
|
234
|
+
onDocumentReady: this.events_onDocumentReady,
|
|
235
|
+
onInfo: this.events_onInfo,
|
|
236
|
+
onWarning: this.events_onWarning,
|
|
237
|
+
onError: this.events_onError,
|
|
238
|
+
onRequestSharingSettings: this.events_onRequestSharingSettings,
|
|
239
|
+
onRequestRename: this.events_onRequestRename,
|
|
240
|
+
onMakeActionLink: this.events_onMakeActionLink,
|
|
241
|
+
onRequestInsertImage: this.events_onRequestInsertImage,
|
|
242
|
+
onRequestSaveAs: this.events_onRequestSaveAs,
|
|
243
|
+
onRequestMailMergeRecipients: this.events_onRequestMailMergeRecipients,
|
|
244
|
+
onRequestCompareFile: this.events_onRequestCompareFile,
|
|
245
|
+
onRequestEditRights: this.events_onRequestEditRights,
|
|
246
|
+
onRequestHistory: this.events_onRequestHistory,
|
|
247
|
+
onRequestHistoryClose: this.events_onRequestHistoryClose,
|
|
248
|
+
onRequestHistoryData: this.events_onRequestHistoryData,
|
|
249
|
+
onRequestRestore: this.events_onRequestRestore
|
|
250
|
+
},
|
|
251
|
+
height: this.height,
|
|
252
|
+
type: this.type,
|
|
253
|
+
width: this.width
|
|
254
|
+
}, this.config || {}), s = window.DocsAPI.DocEditor(o, r);
|
|
255
|
+
window.DocEditor.instances[o] = s;
|
|
256
|
+
} catch (t) {
|
|
257
|
+
console.error(t), this.onError(-1);
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
onError: function(n) {
|
|
261
|
+
var e;
|
|
262
|
+
switch (n) {
|
|
263
|
+
case -2:
|
|
264
|
+
e = "Error load DocsAPI from " + this.documentServerUrl;
|
|
265
|
+
break;
|
|
266
|
+
case -3:
|
|
267
|
+
e = "DocsAPI is not defined";
|
|
268
|
+
break;
|
|
269
|
+
default:
|
|
270
|
+
e = "Unknown error loading component", n = -1;
|
|
271
|
+
}
|
|
272
|
+
typeof this.onLoadComponentError > "u" ? console.error(e) : this.onLoadComponentError(n, e);
|
|
273
|
+
},
|
|
274
|
+
onAppReady: function() {
|
|
275
|
+
var n = this.id || "";
|
|
276
|
+
this.events_onAppReady(window.DocEditor.instances[n]);
|
|
277
|
+
},
|
|
278
|
+
onChangeProps: function() {
|
|
279
|
+
var n, e = this.id || "";
|
|
280
|
+
!((n = window == null ? void 0 : window.DocEditor) === null || n === void 0) && n.instances[e] && (window.DocEditor.instances[e].destroyEditor(), window.DocEditor.instances[e] = void 0, console.log("Important props have been changed. Load new Editor."), this.onLoad());
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
const E = ["id"];
|
|
285
|
+
function S(n, e, o, r, s, t) {
|
|
286
|
+
return v(), p("div", { id: n.id }, null, 8, E);
|
|
287
|
+
}
|
|
288
|
+
f.render = S;
|
|
289
|
+
f.__file = "src/components/DocumentEditor.vue";
|
|
290
|
+
const D = /* @__PURE__ */ h({
|
|
291
|
+
__name: "IkOnlyOffice",
|
|
292
|
+
props: {
|
|
293
|
+
// 文件服务器的服务的地址
|
|
294
|
+
documentServerUrl: {
|
|
295
|
+
type: String,
|
|
296
|
+
default: ""
|
|
297
|
+
},
|
|
298
|
+
// 当前onlyoffice的模式 (edit 编辑模式 view是查看模式)
|
|
299
|
+
mode: {
|
|
300
|
+
type: String,
|
|
301
|
+
default: ""
|
|
302
|
+
},
|
|
303
|
+
// 配置项
|
|
304
|
+
configOptions: {
|
|
305
|
+
type: Object,
|
|
306
|
+
default: () => {
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
// 元素的高度
|
|
310
|
+
officeHeight: {
|
|
311
|
+
type: String,
|
|
312
|
+
default: "100%"
|
|
313
|
+
},
|
|
314
|
+
// 加密后的token
|
|
315
|
+
token: {
|
|
316
|
+
type: String,
|
|
317
|
+
default: ""
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
setup(n) {
|
|
321
|
+
var s, t, c, a;
|
|
322
|
+
const e = n, o = m({
|
|
323
|
+
width: "100%",
|
|
324
|
+
height: "100%",
|
|
325
|
+
document: (s = e.configOptions) == null ? void 0 : s.document,
|
|
326
|
+
// word cell(表格) slide(PPT)
|
|
327
|
+
documentType: (t = e.configOptions) == null ? void 0 : t.documentType,
|
|
328
|
+
editorConfig: {
|
|
329
|
+
callbackUrl: (a = (c = e.configOptions) == null ? void 0 : c.editorConfig) == null ? void 0 : a.callbackUrl,
|
|
330
|
+
// 保存的回调函数
|
|
331
|
+
lang: "zh-CN",
|
|
332
|
+
mode: e.mode,
|
|
333
|
+
// 强制保存
|
|
334
|
+
customization: {
|
|
335
|
+
forcesave: !0,
|
|
336
|
+
autosave: !0
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
// 权限
|
|
340
|
+
permissions: {
|
|
341
|
+
comment: !0,
|
|
342
|
+
commentGroups: {
|
|
343
|
+
edit: ["Group1"],
|
|
344
|
+
remove: ["Group1"],
|
|
345
|
+
view: ""
|
|
346
|
+
},
|
|
347
|
+
copy: !0,
|
|
348
|
+
deleteCommentAuthorOnly: !0,
|
|
349
|
+
download: !0,
|
|
350
|
+
edit: !0,
|
|
351
|
+
editCommentAuthorOnly: !0,
|
|
352
|
+
fillForms: !0,
|
|
353
|
+
modifyContentControl: !0,
|
|
354
|
+
modifyFilter: !0,
|
|
355
|
+
print: !0,
|
|
356
|
+
review: !0,
|
|
357
|
+
reviewGroups: ["Group1", "Group2", "Group3"],
|
|
358
|
+
userInfoGroups: ["Group1"]
|
|
359
|
+
},
|
|
360
|
+
mode: e.mode,
|
|
361
|
+
token: e.token
|
|
362
|
+
}), r = () => {
|
|
363
|
+
console.log("文档加载中");
|
|
364
|
+
};
|
|
365
|
+
return (d, i) => (v(), p(
|
|
366
|
+
"div",
|
|
367
|
+
{
|
|
368
|
+
style: g({ height: e.officeHeight })
|
|
369
|
+
},
|
|
370
|
+
[
|
|
371
|
+
w(_(f), {
|
|
372
|
+
id: `${(/* @__PURE__ */ new Date()).getTime()}`,
|
|
373
|
+
ref: "editorRef",
|
|
374
|
+
"document-server-url": n.documentServerUrl,
|
|
375
|
+
config: o.value,
|
|
376
|
+
events_onDocumentReady: r
|
|
377
|
+
}, null, 8, ["id", "document-server-url", "config"])
|
|
378
|
+
],
|
|
379
|
+
4
|
|
380
|
+
/* STYLE */
|
|
381
|
+
));
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
const b = (n, e) => {
|
|
385
|
+
const o = n.__vccOpts || n;
|
|
386
|
+
for (const [r, s] of e)
|
|
387
|
+
o[r] = s;
|
|
388
|
+
return o;
|
|
389
|
+
}, I = /* @__PURE__ */ b(D, [["__scopeId", "data-v-58129d20"]]), F = y(I);
|
|
390
|
+
export {
|
|
391
|
+
F as IkOnlyOffice,
|
|
392
|
+
F as default
|
|
393
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(l,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],u):(l=typeof globalThis<"u"?globalThis:l||self,u(l.index={},l.Vue))})(this,function(l,u){"use strict";const m=(n,e)=>{if(n.install=o=>{for(const r of[n,...Object.values(e??{})])o.component(r.name,r)},e)for(const[o,r]of Object.entries(e))n[o]=r;return n};function g(n,e,o,r){function s(t){return t instanceof o?t:new o(function(c){c(t)})}return new(o||(o=Promise))(function(t,c){function d(a){try{i(r.next(a))}catch(p){c(p)}}function f(a){try{i(r.throw(a))}catch(p){c(p)}}function i(a){a.done?t(a.value):s(a.value).then(d,f)}i((r=r.apply(n,e||[])).next())})}function y(n,e){var o={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},r,s,t,c;return c={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function d(i){return function(a){return f([i,a])}}function f(i){if(r)throw new TypeError("Generator is already executing.");for(;c&&(c=0,i[0]&&(o=0)),o;)try{if(r=1,s&&(t=i[0]&2?s.return:i[0]?s.throw||((t=s.return)&&t.call(s),0):s.next)&&!(t=t.call(s,i[1])).done)return t;switch(s=0,t&&(i=[i[0]&2,t.value]),i[0]){case 0:case 1:t=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,s=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(t=o.trys,!(t=t.length>0&&t[t.length-1])&&(i[0]===6||i[0]===2)){o=0;continue}if(i[0]===3&&(!t||i[1]>t[0]&&i[1]<t[3])){o.label=i[1];break}if(i[0]===6&&o.label<t[1]){o.label=t[1],t=i;break}if(t&&o.label<t[2]){o.label=t[2],o.ops.push(i);break}t[2]&&o.ops.pop(),o.trys.pop();continue}i=e.call(n,o)}catch(a){i=[6,a],s=0}finally{r=t=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}}var _=function(n,e){return g(void 0,void 0,void 0,function(){return y(this,function(o){return[2,new Promise(function(r,s){try{if(document.getElementById(e)){if(window.DocsAPI)return r(null);var t=setInterval(function(){if(window.DocsAPI)return clearInterval(t),r(null)},500)}else{var c=document.createElement("script");c.setAttribute("type","text/javascript"),c.setAttribute("id",e),c.onload=r,c.onerror=s,c.src=n,c.async=!0,document.body.appendChild(c)}}catch(d){console.error(d)}})]})})},h=u.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},mounted:function(){var n=this,e=this.documentServerUrl;e.endsWith("/")||(e+="/");var o="".concat(e,"web-apps/apps/api/documents/api.js");_(o,"onlyoffice-api-script").then(function(){return n.onLoad()}).catch(function(){n.onError(-2)})},unmounted:function(){var n,e=this.id||"";!((n=window==null?void 0:window.DocEditor)===null||n===void 0)&&n.instances[e]&&(window.DocEditor.instances[e].destroyEditor(),window.DocEditor.instances[e]=void 0)},watch:{config:{handler:function(n,e){this.onChangeProps()},deep:!0},document_fileType:function(n,e){this.onChangeProps()},document_title:function(n,e){this.onChangeProps()},documentType:function(n,e){this.onChangeProps()},editorConfig_lang:function(n,e){this.onChangeProps()},height:function(n,e){this.onChangeProps()},type:function(n,e){this.onChangeProps()},width:function(n,e){this.onChangeProps()}},methods:{onLoad:function(){var n,e;try{var o=this.id||"";if(window.DocsAPI||this.onError(-3),!((n=window==null?void 0:window.DocEditor)===null||n===void 0)&&n.instances[o]){console.log("Skip loading. Instance already exists",o);return}!((e=window==null?void 0:window.DocEditor)===null||e===void 0)&&e.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},height:this.height,type:this.type,width:this.width},this.config||{}),s=window.DocsAPI.DocEditor(o,r);window.DocEditor.instances[o]=s}catch(t){console.error(t),this.onError(-1)}},onError:function(n){var e;switch(n){case-2:e="Error load DocsAPI from "+this.documentServerUrl;break;case-3:e="DocsAPI is not defined";break;default:e="Unknown error loading component",n=-1}typeof this.onLoadComponentError>"u"?console.error(e):this.onLoadComponentError(n,e)},onAppReady:function(){var n=this.id||"";this.events_onAppReady(window.DocEditor.instances[n])},onChangeProps:function(){var n,e=this.id||"";!((n=window==null?void 0:window.DocEditor)===null||n===void 0)&&n.instances[e]&&(window.DocEditor.instances[e].destroyEditor(),window.DocEditor.instances[e]=void 0,console.log("Important props have been changed. Load new Editor."),this.onLoad())}}});const w=["id"];function R(n,e,o,r,s,t){return u.openBlock(),u.createElementBlock("div",{id:n.id},null,8,w)}h.render=R,h.__file="src/components/DocumentEditor.vue";const q=u.defineComponent({__name:"IkOnlyOffice",props:{documentServerUrl:{type:String,default:""},mode:{type:String,default:""},configOptions:{type:Object,default:()=>{}},officeHeight:{type:String,default:"100%"},token:{type:String,default:""}},setup(n){var s,t,c,d;const e=n,o=u.ref({width:"100%",height:"100%",document:(s=e.configOptions)==null?void 0:s.document,documentType:(t=e.configOptions)==null?void 0:t.documentType,editorConfig:{callbackUrl:(d=(c=e.configOptions)==null?void 0:c.editorConfig)==null?void 0:d.callbackUrl,lang:"zh-CN",mode:e.mode,customization:{forcesave:!0,autosave:!0}},permissions:{comment:!0,commentGroups:{edit:["Group1"],remove:["Group1"],view:""},copy:!0,deleteCommentAuthorOnly:!0,download:!0,edit:!0,editCommentAuthorOnly:!0,fillForms:!0,modifyContentControl:!0,modifyFilter:!0,print:!0,review:!0,reviewGroups:["Group1","Group2","Group3"],userInfoGroups:["Group1"]},mode:e.mode,token:e.token}),r=()=>{console.log("文档加载中")};return(f,i)=>(u.openBlock(),u.createElementBlock("div",{style:u.normalizeStyle({height:e.officeHeight})},[u.createVNode(u.unref(h),{id:`${new Date().getTime()}`,ref:"editorRef","document-server-url":n.documentServerUrl,config:o.value,events_onDocumentReady:r},null,8,["id","document-server-url","config"])],4))}}),S="",v=m(((n,e)=>{const o=n.__vccOpts||n;for(const[r,s]of e)o[r]=s;return o})(q,[["__scopeId","data-v-58129d20"]]));l.IkOnlyOffice=v,l.default=v,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
File without changes
|