iking-web-ui-pro 0.2.53 → 0.2.55
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/{IkApprovalProcess → IKApprovalProcess}/ik.index.es.js +860 -853
- package/dist/IKApprovalProcess/ik.index.umd.js +1 -0
- package/dist/{IkApprovalProcess → IKApprovalProcess}/style.css +1 -1
- package/dist/{IkApprovalProcessDetail → IKApprovalProcessDetail}/ik.index.es.js +2659 -2704
- package/dist/IKApprovalProcessDetail/ik.index.umd.js +226 -0
- package/dist/IKApprovalProcessDetail/style.css +1 -0
- package/dist/{IkCalendar → IKCalendar}/ik.index.es.js +2355 -2372
- package/dist/IKCalendar/ik.index.umd.js +1 -0
- package/dist/{IkCalendar → IKCalendar}/style.css +1 -1
- package/dist/IKHorizontalStepBar/ik.index.es.js +93 -93
- package/dist/IKHorizontalStepBar/ik.index.umd.js +1 -1
- package/dist/IKPreviewFile/ik.index.es.js +2355 -2400
- package/dist/IKPreviewFile/ik.index.umd.js +59 -59
- package/dist/IKPreviewFile/style.css +1 -1
- package/dist/IKSearch/ik.index.es.js +1058 -1058
- package/dist/IKSearch/ik.index.umd.js +2 -2
- package/dist/IkBottomOperate/ik.index.es.js +59 -59
- package/dist/IkBottomOperate/ik.index.umd.js +1 -1
- package/dist/IkBtnSetting/ik.index.es.js +110 -110
- package/dist/IkBtnSetting/ik.index.umd.js +1 -1
- package/dist/IkDescription/ik.index.es.js +2402 -2447
- package/dist/IkDescription/ik.index.umd.js +59 -59
- package/dist/IkDescription/style.css +1 -1
- package/dist/IkDetailPreviewFiles/ik.index.es.js +2681 -2726
- package/dist/IkDetailPreviewFiles/ik.index.umd.js +52 -52
- package/dist/IkDetailPreviewFiles/style.css +1 -1
- package/dist/IkFileIcon/ik.index.es.js +394 -394
- package/dist/IkFileIcon/ik.index.umd.js +1 -1
- package/dist/IkFullCalendar/ik.index.es.js +584 -601
- package/dist/IkFullCalendar/ik.index.umd.js +1 -1
- package/dist/IkImageEditor/ik.index.es.js +22 -0
- package/dist/IkImageEditor/ik.index.umd.js +1 -0
- package/dist/IkImageUploadEditor/ik.index.es.js +162 -0
- package/dist/IkImageUploadEditor/ik.index.umd.js +1 -0
- package/dist/IkMonacoEditor/ik.index.es.js +27 -27
- package/dist/IkMonacoEditor/ik.index.umd.js +3 -3
- package/dist/IkPageFull/ik.index.es.js +1466 -1466
- package/dist/IkPageFull/ik.index.umd.js +3 -3
- package/dist/IkPickerUser/ik.index.es.js +839 -839
- package/dist/IkPickerUser/ik.index.umd.js +1 -1
- package/dist/IkPlayer/ik.index.es.js +981 -1062
- package/dist/IkPlayer/ik.index.umd.js +52 -52
- package/dist/IkPreviewFileDialog/ik.index.es.js +709 -790
- package/dist/IkPreviewFileDialog/ik.index.umd.js +50 -50
- package/dist/IkSchedule/ik.index.es.js +1535 -1552
- package/dist/IkSchedule/ik.index.umd.js +1 -1
- package/dist/IkTemplateOfficeConfig/ik.index.es.js +108 -108
- package/dist/IkTemplateOfficeConfig/ik.index.umd.js +1 -1
- package/dist/IkTinymce/ik.index.es.js +27118 -26402
- package/dist/IkTinymce/ik.index.umd.js +61 -61
- package/dist/IkTinymce/style.css +1 -1
- package/dist/IkUploadFile/ik.index.es.js +1372 -1451
- package/dist/IkUploadFile/ik.index.umd.js +50 -50
- package/dist/IkUploadFile/style.css +1 -1
- package/dist/IkUploadImage/ik.index.es.js +313 -313
- package/dist/IkUploadImage/ik.index.umd.js +1 -1
- package/dist/index.es.js +39463 -38651
- package/dist/index.umd.js +133 -133
- package/dist/src/components/IKExpandCollapse/index.d.ts +5 -5
- package/dist/src/components/IKExpandCollapse/src/IKExpandCollapse.vue.d.ts +5 -5
- package/dist/src/components/IKHorizontalStepBar/index.d.ts +90 -30
- package/dist/src/components/IKHorizontalStepBar/src/IKHorizontalStepBar.vue.d.ts +7 -7
- package/dist/src/components/IKPreviewFile/index.d.ts +120 -13
- package/dist/src/components/IKPreviewFile/src/IkPreviewFile.vue.d.ts +16 -7
- package/dist/src/components/IKSearch/index.d.ts +84 -24
- package/dist/src/components/IKSearch/src/IKSearch.vue.d.ts +10 -10
- package/dist/src/components/IKSearch/src/IkSearchAuto.d.ts +5 -5
- package/dist/src/components/IKSearchHead/index.d.ts +5 -5
- package/dist/src/components/IKSearchHead/src/IKSearchHead.vue.d.ts +5 -5
- package/dist/src/components/IKVerticalStepBar/index.d.ts +5 -5
- package/dist/src/components/IKVerticalStepBar/src/IKVerticalStepBar.vue.d.ts +5 -5
- package/dist/src/components/IkApprovalProcess/index.d.ts +7 -7
- package/dist/src/components/IkApprovalProcess/src/IKApprovalProcess.vue.d.ts +7 -7
- package/dist/src/components/IkApprovalProcessDetail/index.d.ts +5 -5
- package/dist/src/components/IkApprovalProcessDetail/src/IKApprovalProcessDetail.vue.d.ts +5 -5
- package/dist/src/components/IkAutoCard/index.d.ts +12 -6
- package/dist/src/components/IkAutoCard/src/IkAutoCard.vue.d.ts +4 -4
- package/dist/src/components/IkBaseDialog/index.d.ts +35 -6
- package/dist/src/components/IkBaseDialog/src/CloseIcon.vue.d.ts +4 -4
- package/dist/src/components/IkBaseDialog/src/IkBaseDialog.vue.d.ts +4 -4
- package/dist/src/components/IkBottomOperate/index.d.ts +43 -15
- package/dist/src/components/IkBottomOperate/src/IkBottomOperate.vue.d.ts +7 -7
- package/dist/src/components/IkBtnContent/index.d.ts +5 -7
- package/dist/src/components/IkBtnContent/src/index.d.ts +5 -7
- package/dist/src/components/IkBtnSetting/index.d.ts +5 -5
- package/dist/src/components/IkBtnSetting/src/IkBtnSetting.vue.d.ts +5 -5
- package/dist/src/components/IkCalendar/index.d.ts +5 -5
- package/dist/src/components/IkCalendar/src/IKCalendar.vue.d.ts +5 -5
- package/dist/src/components/IkCollapseCard/index.d.ts +12 -6
- package/dist/src/components/IkCollapseCard/src/index.vue.d.ts +4 -4
- package/dist/src/components/IkCurrencyInput/index.d.ts +5 -5
- package/dist/src/components/IkCurrencyInput/src/IkCurrencyInput.vue.d.ts +5 -5
- package/dist/src/components/IkDescription/index.d.ts +39 -6
- package/dist/src/components/IkDescription/src/IkDescription.vue.d.ts +4 -4
- package/dist/src/components/IkDetailPreviewFiles/index.d.ts +4 -4
- package/dist/src/components/IkDetailPreviewFiles/src/IkDetailPreviewFiles.vue.d.ts +4 -4
- package/dist/src/components/IkDragList/index.d.ts +130 -13
- package/dist/src/components/IkDragList/src/IkDragList.vue.d.ts +6 -6
- package/dist/src/components/IkEmpty/index.d.ts +19 -6
- package/dist/src/components/IkEmpty/src/index.vue.d.ts +4 -4
- package/dist/src/components/IkFileIcon/index.d.ts +4 -4
- package/dist/src/components/IkFileIcon/src/IkFileIcon.vue.d.ts +4 -4
- package/dist/src/components/IkFullCalendar/index.d.ts +6 -6
- package/dist/src/components/IkIconPicker/index.d.ts +4 -4
- package/dist/src/components/IkIconPicker/src/index.vue.d.ts +4 -4
- package/dist/src/components/IkImageEditor/index.d.ts +2 -0
- package/dist/src/components/IkImageUploadEditor/index.d.ts +191 -0
- package/dist/src/components/IkImageUploadEditor/src/IkImageUploadEditor.vue.d.ts +192 -0
- package/dist/src/components/IkMonacoEditor/index.d.ts +10 -167
- package/dist/src/components/IkMonacoEditor/src/index.vue.d.ts +10 -167
- package/dist/src/components/IkOnlyOffice/index.d.ts +4 -4
- package/dist/src/components/IkOnlyOffice/src/IkOnlyOffice.vue.d.ts +4 -4
- package/dist/src/components/IkPageFull/index.d.ts +143 -54
- package/dist/src/components/IkPageFull/src/IkDialog.d.ts +5 -369
- package/dist/src/components/IkPageFull/src/IkPage.vue.d.ts +5 -5
- package/dist/src/components/IkPageFull/src/IkPageHead.vue.d.ts +5 -5
- package/dist/src/components/IkPageFull/src/IkPageTable.vue.d.ts +8 -8
- package/dist/src/components/IkPageFull/src/IkSearchAuto.d.ts +6 -6
- package/dist/src/components/IkPageFull/src/index.vue.d.ts +14 -20
- package/dist/src/components/IkPageTabs/index.d.ts +38 -13
- package/dist/src/components/IkPageTabs/src/IkPageTabs.vue.d.ts +6 -6
- package/dist/src/components/IkPickerUser/index.d.ts +10 -10
- package/dist/src/components/IkPickerUser/src/avatar/Avatar.vue.d.ts +4 -4
- package/dist/src/components/IkPickerUser/src/list/GroupList.vue.d.ts +6 -6
- package/dist/src/components/IkPickerUser/src/list/PostList.vue.d.ts +6 -6
- package/dist/src/components/IkPickerUser/src/list/RoleList.vue.d.ts +6 -6
- package/dist/src/components/IkPickerUser/src/picker.vue.d.ts +10 -10
- package/dist/src/components/IkPickerUser/src/svg/close_svg.vue.d.ts +1 -1
- package/dist/src/components/IkPickerUser/src/svg/group_svg.vue.d.ts +1 -1
- package/dist/src/components/IkPickerUser/src/svg/post_svg.vue.d.ts +1 -1
- package/dist/src/components/IkPickerUser/src/svg/role_svg.vue.d.ts +1 -1
- package/dist/src/components/IkPickerUser/src/svg/search_svg.vue.d.ts +1 -1
- package/dist/src/components/IkPickerUser/src/use-picker-data.d.ts +1 -1
- package/dist/src/components/IkPlayer/index.d.ts +26 -10
- package/dist/src/components/IkPlayer/src/Player.vue.d.ts +5 -5
- package/dist/src/components/IkPreviewFileDialog/index.d.ts +4 -4
- package/dist/src/components/IkPreviewFileDialog/src/IkPreviewFileDialog.vue.d.ts +4 -4
- package/dist/src/components/IkPrintConfig/index.d.ts +5 -5
- package/dist/src/components/IkPrintView/index.d.ts +5 -5
- package/dist/src/components/IkRadioGroup/index.d.ts +4 -4
- package/dist/src/components/IkRadioGroup/src/index.vue.d.ts +4 -4
- package/dist/src/components/IkSchedule/index.d.ts +48 -17
- package/dist/src/components/IkSelectTag/index.d.ts +25 -10
- package/dist/src/components/IkSelectTag/src/index.vue.d.ts +5 -5
- package/dist/src/components/IkSideText/IkLinearIcon.vue.d.ts +4 -4
- package/dist/src/components/IkSideText/IkSideText.vue.d.ts +4 -4
- package/dist/src/components/IkSideText/index.d.ts +4 -4
- package/dist/src/components/IkStatu/index.d.ts +5 -5
- package/dist/src/components/IkStatu/src/index.vue.d.ts +5 -5
- package/dist/src/components/IkStatuOver/index.d.ts +5 -5
- package/dist/src/components/IkStatuOver/src/index.vue.d.ts +5 -5
- package/dist/src/components/IkSvgIcon/index.d.ts +12 -12
- package/dist/src/components/IkSvgIcon/src/index.vue.d.ts +4 -4
- package/dist/src/components/IkTemplateOfficeConfig/index.d.ts +6 -6
- package/dist/src/components/IkTinymce/index.d.ts +5 -5
- package/dist/src/components/IkTinymce/src/index.vue.d.ts +5 -5
- package/dist/src/components/IkTooltip/index.d.ts +19 -6
- package/dist/src/components/IkTooltip/src/index.vue.d.ts +4 -4
- package/dist/src/components/IkTree/IkTree.vue.d.ts +127 -807
- package/dist/src/components/IkTree/index.d.ts +601 -2620
- package/dist/src/components/IkUploadFile/index.d.ts +135 -14
- package/dist/src/components/IkUploadFile/src/index.vue.d.ts +7 -7
- package/dist/src/components/IkUploadImage/index.d.ts +79 -10
- package/dist/src/components/IkUploadImage/src/index.vue.d.ts +5 -5
- package/dist/src/components/IkUploadImage/src/loading.vue.d.ts +1 -1
- package/dist/src/components/Provider/ProviderConfig.vue.d.ts +4 -4
- package/dist/src/components/Provider/index.d.ts +27 -6
- package/dist/src/components/index.d.ts +3 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/IkApprovalProcess/ik.index.umd.js +0 -1
- package/dist/IkApprovalProcessDetail/ik.index.umd.js +0 -226
- package/dist/IkApprovalProcessDetail/style.css +0 -1
- package/dist/IkCalendar/ik.index.umd.js +0 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const r = (t, o) => {
|
|
2
|
+
if (t.install = (c) => {
|
|
3
|
+
for (const e of [t, ...Object.values(o ?? {})])
|
|
4
|
+
c.component(e.name, e);
|
|
5
|
+
}, o)
|
|
6
|
+
for (const [c, e] of Object.entries(o))
|
|
7
|
+
t[c] = e;
|
|
8
|
+
return t;
|
|
9
|
+
}, s = (t, o) => {
|
|
10
|
+
const c = t.__vccOpts || t;
|
|
11
|
+
for (const [e, n] of o)
|
|
12
|
+
c[e] = n;
|
|
13
|
+
return c;
|
|
14
|
+
}, f = {};
|
|
15
|
+
function _(t, o) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
const l = /* @__PURE__ */ s(f, [["render", _]]), a = r(l);
|
|
19
|
+
export {
|
|
20
|
+
a as IkImageEditor,
|
|
21
|
+
a as default
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(t,s){typeof exports=="object"&&typeof module<"u"?s(exports):typeof define=="function"&&define.amd?define(["exports"],s):(t=typeof globalThis<"u"?globalThis:t||self,s(t.index={}))})(this,function(t){"use strict";const s=(e,o)=>{if(e.install=n=>{for(const c of[e,...Object.values(o??{})])n.component(c.name,c)},o)for(const[n,c]of Object.entries(o))e[n]=c;return e},i=(e,o)=>{const n=e.__vccOpts||e;for(const[c,u]of o)n[c]=u;return n},r={};function d(e,o){return null}const f=s(i(r,[["render",d]]));t.IkImageEditor=f,t.default=f,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { defineComponent as i, openBlock as p, createBlock as u, unref as l } from "vue";
|
|
2
|
+
import { Dashboard as n } from "@uppy/vue";
|
|
3
|
+
import m from "@uppy/core";
|
|
4
|
+
import s from "@uppy/webcam";
|
|
5
|
+
import a from "@uppy/locales/lib/zh_CN";
|
|
6
|
+
import f from "@uppy/url";
|
|
7
|
+
import d from "@uppy/screen-capture";
|
|
8
|
+
import c from "@uppy/image-editor";
|
|
9
|
+
import "@uppy/core/dist/style.css";
|
|
10
|
+
import "@uppy/dashboard/dist/style.css";
|
|
11
|
+
import "@uppy/webcam/dist/style.css";
|
|
12
|
+
import "@uppy/url/dist/style.css";
|
|
13
|
+
import "@uppy/screen-capture/dist/style.css";
|
|
14
|
+
import "@uppy/image-editor/dist/style.min.css";
|
|
15
|
+
const y = (t, e) => {
|
|
16
|
+
if (t.install = (o) => {
|
|
17
|
+
for (const r of [t, ...Object.values(e ?? {})])
|
|
18
|
+
o.component(r.name, r);
|
|
19
|
+
}, e)
|
|
20
|
+
for (const [o, r] of Object.entries(e))
|
|
21
|
+
t[o] = r;
|
|
22
|
+
return t;
|
|
23
|
+
}, b = /* @__PURE__ */ i({
|
|
24
|
+
__name: "IkImageUploadEditor",
|
|
25
|
+
props: {
|
|
26
|
+
tools: {
|
|
27
|
+
type: Array,
|
|
28
|
+
default: () => []
|
|
29
|
+
},
|
|
30
|
+
uploadFun: {
|
|
31
|
+
type: Function,
|
|
32
|
+
default: () => () => {
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
accept: {
|
|
36
|
+
type: Array,
|
|
37
|
+
default: ["image/*"]
|
|
38
|
+
},
|
|
39
|
+
disabled: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: !1
|
|
42
|
+
},
|
|
43
|
+
width: {
|
|
44
|
+
type: Number,
|
|
45
|
+
default: 750
|
|
46
|
+
},
|
|
47
|
+
height: {
|
|
48
|
+
type: Number,
|
|
49
|
+
default: 550
|
|
50
|
+
},
|
|
51
|
+
// 上传:45% true: 上传: 45%・43 MB的101 MB・8s左
|
|
52
|
+
showProgressDetails: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: !0
|
|
55
|
+
},
|
|
56
|
+
hideUploadButton: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: !1
|
|
59
|
+
},
|
|
60
|
+
fileManagerSelectionType: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: "files"
|
|
63
|
+
// 'files'、'folders'或'both'
|
|
64
|
+
},
|
|
65
|
+
// MB
|
|
66
|
+
minFileSize: {
|
|
67
|
+
type: Number,
|
|
68
|
+
default: 0
|
|
69
|
+
},
|
|
70
|
+
// MB
|
|
71
|
+
maxFileSize: {
|
|
72
|
+
type: Number,
|
|
73
|
+
default: 10
|
|
74
|
+
},
|
|
75
|
+
maxNumberOfFiles: {
|
|
76
|
+
type: Number,
|
|
77
|
+
default: 100
|
|
78
|
+
},
|
|
79
|
+
minNumberOfFiles: {
|
|
80
|
+
type: Number,
|
|
81
|
+
default: 1
|
|
82
|
+
},
|
|
83
|
+
allowedFileTypes: {
|
|
84
|
+
type: Array,
|
|
85
|
+
default: () => ["image/*"]
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
setup(t) {
|
|
89
|
+
const e = t;
|
|
90
|
+
a.strings.poweredBy = "";
|
|
91
|
+
const o = new m({
|
|
92
|
+
locale: a,
|
|
93
|
+
autoProceed: !1,
|
|
94
|
+
restrictions: {
|
|
95
|
+
// 每个单独文件的最小文件大小(以字节为单位)
|
|
96
|
+
minFileSize: e.minFileSize * 1024 * 1024,
|
|
97
|
+
// 每个单独文件的最大文件大小(以字节为单位)
|
|
98
|
+
maxFileSize: e.maxFileSize * 1024 * 1024,
|
|
99
|
+
// 可以选择的文件总数
|
|
100
|
+
maxNumberOfFiles: e.maxNumberOfFiles,
|
|
101
|
+
// 在上传之前必须选择的文件的最小数量
|
|
102
|
+
minNumberOfFiles: e.minNumberOfFiles,
|
|
103
|
+
// 允许的文件类型,通配符image/*,或精确的mime类型image/jpeg,或文件扩展名.jpg:['image/*', '.jpg', '.jpeg', '.png', '.gif']
|
|
104
|
+
allowedFileTypes: e.accept
|
|
105
|
+
},
|
|
106
|
+
debug: !1,
|
|
107
|
+
meta: {
|
|
108
|
+
type: "avatar"
|
|
109
|
+
},
|
|
110
|
+
onBeforeFileAdded: (r) => (console.log("onBeforeFileAdded: ", r), !0),
|
|
111
|
+
onBeforeUpload: (r) => (console.log("onBeforeUpload: ", r), !0)
|
|
112
|
+
// onUploadProgress: (progress, file) => {
|
|
113
|
+
// console.log('onUploadProgress: ', progress, file);
|
|
114
|
+
// },
|
|
115
|
+
// onUploadSuccess: (file, response) => {
|
|
116
|
+
// console.log('onUploadSuccess: ', file, response);
|
|
117
|
+
// },
|
|
118
|
+
// onUploadError: (file, error, response) => {
|
|
119
|
+
// console.log('onUploadError: ', file, error, response);
|
|
120
|
+
// },
|
|
121
|
+
// onUploadCancelled: (file) => {
|
|
122
|
+
// console.log('onUploadCancelled: ', file);
|
|
123
|
+
// }
|
|
124
|
+
}).use(s, {
|
|
125
|
+
locale: {
|
|
126
|
+
strings: {
|
|
127
|
+
pluginNameCamera: "摄像头"
|
|
128
|
+
},
|
|
129
|
+
pluralize() {
|
|
130
|
+
return 0;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}).use(f, {
|
|
134
|
+
locale: {
|
|
135
|
+
strings: {
|
|
136
|
+
pluginNameUrl: "文件链接"
|
|
137
|
+
},
|
|
138
|
+
pluralize() {
|
|
139
|
+
return 0;
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
companionUrl: "http://localhost:5173"
|
|
143
|
+
}).use(d, {
|
|
144
|
+
locale: {
|
|
145
|
+
strings: {
|
|
146
|
+
pluginNameScreenCapture: "录屏"
|
|
147
|
+
},
|
|
148
|
+
pluralize() {
|
|
149
|
+
return 0;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}).use(c);
|
|
153
|
+
return (r, g) => (p(), u(l(n), {
|
|
154
|
+
uppy: l(o),
|
|
155
|
+
props: { disabled: e.disabled }
|
|
156
|
+
}, null, 8, ["uppy", "props"]));
|
|
157
|
+
}
|
|
158
|
+
}), C = y(b);
|
|
159
|
+
export {
|
|
160
|
+
C as IkImageUploadEditor,
|
|
161
|
+
C as default
|
|
162
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@uppy/vue"),require("@uppy/core"),require("@uppy/webcam"),require("@uppy/locales/lib/zh_CN"),require("@uppy/url"),require("@uppy/screen-capture"),require("@uppy/image-editor"),require("@uppy/core/dist/style.css"),require("@uppy/dashboard/dist/style.css"),require("@uppy/webcam/dist/style.css"),require("@uppy/url/dist/style.css"),require("@uppy/screen-capture/dist/style.css"),require("@uppy/image-editor/dist/style.min.css")):typeof define=="function"&&define.amd?define(["exports","vue","@uppy/vue","@uppy/core","@uppy/webcam","@uppy/locales/lib/zh_CN","@uppy/url","@uppy/screen-capture","@uppy/image-editor","@uppy/core/dist/style.css","@uppy/dashboard/dist/style.css","@uppy/webcam/dist/style.css","@uppy/url/dist/style.css","@uppy/screen-capture/dist/style.css","@uppy/image-editor/dist/style.min.css"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.index={},e.vue,e.vue$1,e.Uppy,e.Webcam,e.ZhCn,e.Url,e.ScreenCapture,e.ImageEditor))})(this,function(e,t,a,o,n,i,d,c,y){"use strict";const l=((s,r)=>{if(s.install=p=>{for(const u of[s,...Object.values(r??{})])p.component(u.name,u)},r)for(const[p,u]of Object.entries(r))s[p]=u;return s})(t.defineComponent({__name:"IkImageUploadEditor",props:{tools:{type:Array,default:()=>[]},uploadFun:{type:Function,default:()=>()=>{}},accept:{type:Array,default:["image/*"]},disabled:{type:Boolean,default:!1},width:{type:Number,default:750},height:{type:Number,default:550},showProgressDetails:{type:Boolean,default:!0},hideUploadButton:{type:Boolean,default:!1},fileManagerSelectionType:{type:String,default:"files"},minFileSize:{type:Number,default:0},maxFileSize:{type:Number,default:10},maxNumberOfFiles:{type:Number,default:100},minNumberOfFiles:{type:Number,default:1},allowedFileTypes:{type:Array,default:()=>["image/*"]}},setup(s){const r=s;i.strings.poweredBy="";const p=new o({locale:i,autoProceed:!1,restrictions:{minFileSize:r.minFileSize*1024*1024,maxFileSize:r.maxFileSize*1024*1024,maxNumberOfFiles:r.maxNumberOfFiles,minNumberOfFiles:r.minNumberOfFiles,allowedFileTypes:r.accept},debug:!1,meta:{type:"avatar"},onBeforeFileAdded:u=>(console.log("onBeforeFileAdded: ",u),!0),onBeforeUpload:u=>(console.log("onBeforeUpload: ",u),!0)}).use(n,{locale:{strings:{pluginNameCamera:"摄像头"},pluralize(){return 0}}}).use(d,{locale:{strings:{pluginNameUrl:"文件链接"},pluralize(){return 0}},companionUrl:"http://localhost:5173"}).use(c,{locale:{strings:{pluginNameScreenCapture:"录屏"},pluralize(){return 0}}}).use(y);return(u,b)=>(t.openBlock(),t.createBlock(t.unref(a.Dashboard),{uppy:t.unref(p),props:{disabled:r.disabled}},null,8,["uppy","props"]))}}));e.IkImageUploadEditor=l,e.default=l,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -134,7 +134,7 @@ function R(e) {
|
|
|
134
134
|
}
|
|
135
135
|
return e;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function $e() {
|
|
138
138
|
for (var e = arguments.length, n = new Array(e), t = 0; t < e; t++)
|
|
139
139
|
n[t] = arguments[t];
|
|
140
140
|
return function(r) {
|
|
@@ -157,7 +157,7 @@ function w(e) {
|
|
|
157
157
|
function _(e) {
|
|
158
158
|
return {}.toString.call(e).includes("Object");
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function Te(e) {
|
|
161
161
|
return !Object.keys(e).length;
|
|
162
162
|
}
|
|
163
163
|
function O(e) {
|
|
@@ -180,7 +180,7 @@ function ze(e) {
|
|
|
180
180
|
}) && g("handlersType");
|
|
181
181
|
}
|
|
182
182
|
function Ee(e) {
|
|
183
|
-
e || g("initialIsRequired"), _(e) || g("initialType"),
|
|
183
|
+
e || g("initialIsRequired"), _(e) || g("initialType"), Te(e) && g("initialContent");
|
|
184
184
|
}
|
|
185
185
|
function Ae(e, n) {
|
|
186
186
|
throw new Error(e[n] || e.default);
|
|
@@ -208,13 +208,13 @@ function Fe(e) {
|
|
|
208
208
|
current: e
|
|
209
209
|
}, r = w(Ve)(t, n), a = w(Le)(t), o = w(j.changes)(e), i = w(Ne)(t);
|
|
210
210
|
function u() {
|
|
211
|
-
var h = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(
|
|
212
|
-
return
|
|
211
|
+
var h = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(T) {
|
|
212
|
+
return T;
|
|
213
213
|
};
|
|
214
214
|
return j.selector(h), h(t.current);
|
|
215
215
|
}
|
|
216
216
|
function l(h) {
|
|
217
|
-
|
|
217
|
+
$e(r, a, o, i)(h);
|
|
218
218
|
}
|
|
219
219
|
return [u, l];
|
|
220
220
|
}
|
|
@@ -314,10 +314,10 @@ var Je = xe.create({
|
|
|
314
314
|
resolve: null,
|
|
315
315
|
reject: null,
|
|
316
316
|
monaco: null
|
|
317
|
-
}), ne = Se(Je, 2), S = ne[0],
|
|
317
|
+
}), ne = Se(Je, 2), S = ne[0], $ = ne[1];
|
|
318
318
|
function Qe(e) {
|
|
319
319
|
var n = Ye.config(e), t = n.monaco, r = Oe(n, ["monaco"]);
|
|
320
|
-
|
|
320
|
+
$(function(a) {
|
|
321
321
|
return {
|
|
322
322
|
config: te(a.config, r),
|
|
323
323
|
monaco: t
|
|
@@ -334,7 +334,7 @@ function Ze() {
|
|
|
334
334
|
};
|
|
335
335
|
});
|
|
336
336
|
if (!e.isInitialized) {
|
|
337
|
-
if (
|
|
337
|
+
if ($({
|
|
338
338
|
isInitialized: !0
|
|
339
339
|
}), e.monaco)
|
|
340
340
|
return e.resolve(e.monaco), B(D);
|
|
@@ -379,7 +379,7 @@ function rt() {
|
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
381
|
function re(e) {
|
|
382
|
-
S().monaco ||
|
|
382
|
+
S().monaco || $({
|
|
383
383
|
monaco: e
|
|
384
384
|
});
|
|
385
385
|
}
|
|
@@ -390,7 +390,7 @@ function ot() {
|
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
392
|
var D = new Promise(function(e, n) {
|
|
393
|
-
return
|
|
393
|
+
return $({
|
|
394
394
|
resolve: e,
|
|
395
395
|
reject: n
|
|
396
396
|
});
|
|
@@ -751,7 +751,7 @@ const wt = J({
|
|
|
751
751
|
o && he.copyText(o.getValue()).then(() => {
|
|
752
752
|
ye.success("复制成功");
|
|
753
753
|
});
|
|
754
|
-
},
|
|
754
|
+
}, T = () => {
|
|
755
755
|
if (o) {
|
|
756
756
|
const d = o.getValue();
|
|
757
757
|
n.emit("change", {
|
|
@@ -767,7 +767,7 @@ const wt = J({
|
|
|
767
767
|
extra: e.extra
|
|
768
768
|
}), e.autoFormat && z(o, e.language);
|
|
769
769
|
}
|
|
770
|
-
}, F = pe.debounce(
|
|
770
|
+
}, F = pe.debounce(T, 300), N = () => {
|
|
771
771
|
const d = document.querySelector(
|
|
772
772
|
".datav-fullscreen-editor-dialog section"
|
|
773
773
|
);
|
|
@@ -842,8 +842,16 @@ const wt = J({
|
|
|
842
842
|
}), Ot = ["id"], St = {
|
|
843
843
|
key: 0,
|
|
844
844
|
class: "datav-editor-actions"
|
|
845
|
-
}, jt = { class: "datav-fullscreen-editor-wp" }
|
|
846
|
-
|
|
845
|
+
}, jt = { class: "datav-fullscreen-editor-wp" }, kt = /* @__PURE__ */ p(
|
|
846
|
+
"section",
|
|
847
|
+
{ style: { position: "relative", display: "flex", width: "100%", height: "100%", "text-align": "initial" } },
|
|
848
|
+
null,
|
|
849
|
+
-1
|
|
850
|
+
/* HOISTED */
|
|
851
|
+
), Ct = [
|
|
852
|
+
kt
|
|
853
|
+
];
|
|
854
|
+
function It(e, n, t, r, a, o) {
|
|
847
855
|
const i = C("IkSvgIcon"), u = C("el-dialog");
|
|
848
856
|
return c(), s(
|
|
849
857
|
ge,
|
|
@@ -902,15 +910,7 @@ function kt(e, n, t, r, a, o) {
|
|
|
902
910
|
}
|
|
903
911
|
]])
|
|
904
912
|
},
|
|
905
|
-
|
|
906
|
-
p(
|
|
907
|
-
"section",
|
|
908
|
-
{ style: { position: "relative", display: "flex", width: "100%", height: "100%", "text-align": "initial" } },
|
|
909
|
-
null,
|
|
910
|
-
-1
|
|
911
|
-
/* HOISTED */
|
|
912
|
-
)
|
|
913
|
-
]),
|
|
913
|
+
Ct,
|
|
914
914
|
2
|
|
915
915
|
/* CLASS */
|
|
916
916
|
)
|
|
@@ -924,8 +924,8 @@ function kt(e, n, t, r, a, o) {
|
|
|
924
924
|
/* STABLE_FRAGMENT */
|
|
925
925
|
);
|
|
926
926
|
}
|
|
927
|
-
const
|
|
927
|
+
const _t = /* @__PURE__ */ oe(wt, [["render", It]]), Bt = Z(_t);
|
|
928
928
|
export {
|
|
929
|
-
|
|
930
|
-
|
|
929
|
+
Bt as IkMonacoEditor,
|
|
930
|
+
Bt as default
|
|
931
931
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(u,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("iking-utils-pro"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","iking-utils-pro","element-plus"],o):(u=typeof globalThis<"u"?globalThis:u||self,o(u.index={},u.vue,u["iking-utils-pro"],u["element-plus"]))})(this,function(u,o,m,Y){"use strict";const
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function re(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function N(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,r)}return t}function D(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?N(Object(t),!0).forEach(function(r){re(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):N(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function oe(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return function(r){return n.reduceRight(function(i,a){return a(i)},r)}}function y(e){return function n(){for(var t=this,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return i.length>=e.length?e.apply(this,i):function(){for(var l=arguments.length,s=new Array(l),c=0;c<l;c++)s[c]=arguments[c];return n.apply(t,[].concat(i,s))}}}function k(e){return{}.toString.call(e).includes("Object")}function ae(e){return!Object.keys(e).length}function v(e){return typeof e=="function"}function ie(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function le(e,n){return k(n)||f("changeType"),Object.keys(n).some(function(t){return!ie(e,t)})&&f("changeField"),n}function ce(e){v(e)||f("selectorType")}function se(e){v(e)||k(e)||f("handlerType"),k(e)&&Object.values(e).some(function(n){return!v(n)})&&f("handlersType")}function ue(e){e||f("initialIsRequired"),k(e)||f("initialType"),ae(e)&&f("initialContent")}function de(e,n){throw new Error(e[n]||e.default)}var fe={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},f=y(de)(fe),O={changes:le,selector:ce,handler:se,initial:ue};function me(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};O.initial(e),O.handler(n);var t={current:e},r=y(he)(t,n),i=y(pe)(t),a=y(O.changes)(e),l=y(ge)(t);function s(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(
|
|
1
|
+
(function(u,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("iking-utils-pro"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","iking-utils-pro","element-plus"],o):(u=typeof globalThis<"u"?globalThis:u||self,o(u.index={},u.vue,u["iking-utils-pro"],u["element-plus"]))})(this,function(u,o,m,Y){"use strict";const E=(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 X(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function T(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,r)}return t}function z(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?T(Object(t),!0).forEach(function(r){X(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):T(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function G(e,n){if(e==null)return{};var t={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(n.indexOf(i)>=0)&&(t[i]=e[i]);return t}function J(e,n){if(e==null)return{};var t=G(e,n),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(n.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}return t}function Q(e,n){return Z(e)||ee(e,n)||te(e,n)||ne()}function Z(e){if(Array.isArray(e))return e}function ee(e,n){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var t=[],r=!0,i=!1,a=void 0;try{for(var l=e[Symbol.iterator](),s;!(r=(s=l.next()).done)&&(t.push(s.value),!(n&&t.length===n));r=!0);}catch(c){i=!0,a=c}finally{try{!r&&l.return!=null&&l.return()}finally{if(i)throw a}}return t}}function te(e,n){if(e){if(typeof e=="string")return $(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return $(e,n)}}function $(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function ne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function re(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function N(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,r)}return t}function D(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?N(Object(t),!0).forEach(function(r){re(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):N(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function oe(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return function(r){return n.reduceRight(function(i,a){return a(i)},r)}}function y(e){return function n(){for(var t=this,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return i.length>=e.length?e.apply(this,i):function(){for(var l=arguments.length,s=new Array(l),c=0;c<l;c++)s[c]=arguments[c];return n.apply(t,[].concat(i,s))}}}function k(e){return{}.toString.call(e).includes("Object")}function ae(e){return!Object.keys(e).length}function v(e){return typeof e=="function"}function ie(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function le(e,n){return k(n)||f("changeType"),Object.keys(n).some(function(t){return!ie(e,t)})&&f("changeField"),n}function ce(e){v(e)||f("selectorType")}function se(e){v(e)||k(e)||f("handlerType"),k(e)&&Object.values(e).some(function(n){return!v(n)})&&f("handlersType")}function ue(e){e||f("initialIsRequired"),k(e)||f("initialType"),ae(e)&&f("initialContent")}function de(e,n){throw new Error(e[n]||e.default)}var fe={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},f=y(de)(fe),O={changes:le,selector:ce,handler:se,initial:ue};function me(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};O.initial(e),O.handler(n);var t={current:e},r=y(he)(t,n),i=y(pe)(t),a=y(O.changes)(e),l=y(ge)(t);function s(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(I){return I};return O.selector(h),h(t.current)}function c(h){oe(r,i,a,l)(h)}return[s,c]}function ge(e,n){return v(n)?n(e.current):n}function pe(e,n){return e.current=D(D({},e.current),n),n}function he(e,n,t){return v(n)?n(e.current):Object.keys(t).forEach(function(r){var i;return(i=n[r])===null||i===void 0?void 0:i.call(n,e.current[r])}),t}var ye={create:me},ve={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function be(e){return function n(){for(var t=this,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return i.length>=e.length?e.apply(this,i):function(){for(var l=arguments.length,s=new Array(l),c=0;c<l;c++)s[c]=arguments[c];return n.apply(t,[].concat(i,s))}}}function we(e){return{}.toString.call(e).includes("Object")}function ke(e){return e||P("configIsRequired"),we(e)||P("configType"),e.urls?(Oe(),{paths:{vs:e.urls.monacoBase}}):e}function Oe(){console.warn(M.deprecation)}function Se(e,n){throw new Error(e[n]||e.default)}var M={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
3
3
|
You are using deprecated way of configuration.
|
|
4
4
|
|
|
5
5
|
Instead of using
|
|
@@ -8,4 +8,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8
8
|
monaco.config({ paths: { vs: '...' } })
|
|
9
9
|
|
|
10
10
|
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
11
|
-
`},P=be(Se)(M),je={config:ke},Ce=function(){for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return function(i){return t.reduceRight(function(a,l){return l(a)},i)}};function A(e,n){return Object.keys(n).forEach(function(t){n[t]instanceof Object&&e[t]&&Object.assign(n[t],A(e[t],n[t]))}),z(z({},e),n)}var Be={type:"cancelation",msg:"operation is manually canceled"};function j(e){var n=!1,t=new Promise(function(r,i){e.then(function(a){return n?i(Be):r(a)}),e.catch(i)});return t.cancel=function(){return n=!0},t}var Ie=ye.create({config:ve,isInitialized:!1,resolve:null,reject:null,monaco:null}),V=Q(Ie,2),b=V[0],S=V[1];function Ee(e){var n=je.config(e),t=n.monaco,r=J(n,["monaco"]);S(function(i){return{config:A(i.config,r),monaco:t}})}function Te(){var e=b(function(n){var t=n.monaco,r=n.isInitialized,i=n.resolve;return{monaco:t,isInitialized:r,resolve:i}});if(!e.isInitialized){if(S({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),j(C);if(window.monaco&&window.monaco.editor)return F(window.monaco),e.resolve(window.monaco),j(C);Ce(_e,$e)(Ne)}return j(C)}function _e(e){return document.body.appendChild(e)}function ze(e){var n=document.createElement("script");return e&&(n.src=e),n}function $e(e){var n=b(function(r){var i=r.config,a=r.reject;return{config:i,reject:a}}),t=ze("".concat(n.config.paths.vs,"/loader.js"));return t.onload=function(){return e()},t.onerror=n.reject,t}function Ne(){var e=b(function(t){var r=t.config,i=t.resolve,a=t.reject;return{config:r,resolve:i,reject:a}}),n=window.require;n.config(e.config),n(["vs/editor/editor.main"],function(t){F(t),e.resolve(t)},function(t){e.reject(t)})}function F(e){b().monaco||S({monaco:e})}function De(){return b(function(e){var n=e.monaco;return n})}var C=new Promise(function(e,n){return S({resolve:e,reject:n})}),Me={config:Ee,init:Te,__getMonacoInstance:De};const Pe=Me,x={automaticLayout:!0,contextmenu:!1,fixedOverflowWidgets:!0,fontFamily:'Menlo-Regular, Monaco, Menlo, Consolas, "Ubuntu Mono", monospace',formatOnPaste:!0,formatOnType:!0,insertSpaces:!0,lineDecorationsWidth:7,lineHeight:15,lineNumbersMinChars:3,minimap:{enabled:!1},quickSuggestions:!1,readOnly:!1,roundedSelection:!1,scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:6,horizontalScrollbarSize:6,alwaysConsumeMouseWheel:!1,arrowSize:0},snippetSuggestions:"none",tabSize:2,theme:"vs-dark",wordBasedSuggestions:"off",wordWrap:"on",cursorStyle:"line",selectOnLineNumbers:!0,autoIndent:"advanced",glyphMargin:!1,renderLineHighlight:"line",renderWhitespace:"none",scrollBeyondLastColumn:2},Ae=e=>{const n="datav-dark-theme";return e.editor.defineTheme(n,{base:"vs-dark",inherit:!0,rules:[{token:"key",foreground:"dddddd"},{token:"string.key.json",foreground:"dddddd"},{token:"string.value.json",foreground:"b4e98c"}],colors:{"editor.background":"#0e1013","editor.lineHighlightBackground":"#1f2329","editorLineNumber.foreground":"#576369","editorCursor.foreground":"#2483ff"}}),n};let B=[];const Ve=(e,n)=>{const t=[];for(let r=0;r<B.length;r++){const i=B[r];t.push({label:`:${i}`,insertText:i,kind:e.languages.CompletionItemKind.Variable,detail:"CallbackId",range:n})}return t},L=new Map,Fe=(e,n,t)=>{if(t&&t.length>0){if(B=t,L.has(n))return;L.set(n,1),e.languages.registerCompletionItemProvider(n,{triggerCharacters:[":"],provideCompletionItems(r,i){const a=r.getWordUntilPosition(i),l={startLineNumber:i.lineNumber,endLineNumber:i.lineNumber,startColumn:a.startColumn,endColumn:a.endColumn};return{suggestions:Ve(e,l)}}})}},q=(e,n)=>{let t=n;return(m.paramType.isObject(t)||m.paramType.isArray(t))&&(t=JSON.stringify(t,null,2)),m.paramType.isString(t)?t:`${t}`},I=(e,n)=>{e.getAction("editor.action.formatDocument").run()},W=(e,n)=>{const t=e.__vccOpts||e;for(const[r,i]of n)t[r]=i;return t},xe={key:0,class:"ik-svg-icon ik-icon-span inline-block inline-flex justify-center box-content line-height-[0]"},Le={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},qe=["xlink:href"],We=["src"],He={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},Re=["xlink:href"],Ke=["src"],Ue=o.defineComponent({name:"IkSvgIcon",__name:"index",props:{active:{type:Boolean,default:!1},bg:{type:Boolean,default:!1},color:{},colorLight:{},disabled:{type:Boolean,default:!1},error:{type:Boolean},flip:{},name:{},notip:{type:Boolean,default:!1},opacity:{default:.5},padding:{default:"6px"},primary:{type:Boolean},rotate:{},showBg:{type:Boolean,default:!1},size:{default:""},success:{type:Boolean},tableIconType:{},title:{},type:{},warning:{type:Boolean},width:{}},setup(e){const n=e,t=o.computed(()=>n),r=o.computed(()=>{const{name:a}=t.value;return/^http?:\/\//.test(a)?"img":/i-[^:]+:[^:]+/.test(a)?"unocss":a!=null&&a.startsWith("iksig")?"iksig":a!=null&&a.includes(":")?"iconify":a!=null&&a.startsWith("iksvg")?"svg":"i"}),i=o.computed(()=>{const a=[];if(t.value.flip)switch(t.value.flip){case"horizontal":a.push("rotateY(180deg)");break;case"vertical":a.push("rotateX(180deg)");break;case"both":a.push("rotateX(180deg)"),a.push("rotateY(180deg)");break}t.value.rotate&&a.push(`rotate(${t.value.rotate%360}deg)`);const l={pointerEvents:t.value.disabled?"none":"auto",...t.value.color&&{color:t.value.color},...t.value.size&&{fontSize:typeof t.value.size=="number"?`${t.value.size}px`:t.value.size},...a.length&&{transform:a.join(" ")},padding:t.value.showBg||t.value.bg?t.value.padding:0,...t.value.color&&r.value!=="iksig"?{"--ik-icon-deep-color":t.value.color,"--ik-icon-shallow-color":t.value.colorLight||m.ikColor.setOpacity(t.value.color,t.value.opacity)}:{}};return t.value.width&&(l.width=l.height=typeof t.value.width=="number"?`${t.value.width}px`:t.value.width),l});return(a,l)=>{const s=o.resolveComponent("el-tooltip"),c=o.resolveComponent("el-button");return t.value.tableIconType==="icon"||!t.value.tableIconType?(o.openBlock(),o.createElementBlock("span",xe,[t.value.notip||!t.value.title?(o.openBlock(),o.createElementBlock("i",{key:0,class:o.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[a.name]:r.value==="unocss","show-bg":t.value.showBg||t.value.bg,default:t.value.size==="default",small:t.value.size==="small",big:t.value.size==="big",warning:t.value.warning||t.value.type==="warning",primary:t.value.primary||t.value.type==="primary",success:a.success||t.value.type==="success",error:t.value.error||t.value.type==="error",active:t.value.active,disabled:t.value.disabled}]),style:o.normalizeStyle(i.value)},[o.createCommentVNode(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),r.value==="iksig"?(o.openBlock(),o.createElementBlock("i",{key:0,class:o.normalizeClass(`iksig ${t.value.name}`),style:o.normalizeStyle(i.value)},null,6)):r.value==="svg"?(o.openBlock(),o.createElementBlock("svg",Le,[o.createElementVNode("use",{"xlink:href":`#${t.value.name}`},null,8,qe)])):r.value==="img"?(o.openBlock(),o.createElementBlock("img",{key:2,src:t.value.name,class:"h-[1em] w-[1em]"},null,8,We)):(o.openBlock(),o.createElementBlock("i",{key:3,class:o.normalizeClass(t.value.name),style:o.normalizeStyle(i.value)},null,6))],6)):(o.openBlock(),o.createBlock(s,{key:1,content:t.value.title,placement:"top"},{default:o.withCtx(()=>[o.createElementVNode("i",{class:o.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[a.name]:r.value==="unocss","show-bg":t.value.showBg||t.value.bg,default:t.value.size==="default",small:t.value.size==="small",big:t.value.size==="big",warning:t.value.warning||t.value.type==="warning",primary:a.primary||t.value.type==="primary",success:a.success||t.value.type==="success",error:t.value.error||t.value.type==="error",active:t.value.active}]),style:o.normalizeStyle(i.value)},[r.value==="iksig"?(o.openBlock(),o.createElementBlock("i",{key:0,class:o.normalizeClass(`iksig ${t.value.name}`),style:o.normalizeStyle(i.value)},null,6)):r.value==="svg"?(o.openBlock(),o.createElementBlock("svg",He,[o.createElementVNode("use",{"xlink:href":`#${t.value.name}`},null,8,Re)])):r.value==="img"?(o.openBlock(),o.createElementBlock("img",{key:2,src:t.value.name,class:"h-[1em] w-[1em]"},null,8,Ke)):(o.openBlock(),o.createElementBlock("i",{key:3,class:o.normalizeClass(t.value.name),style:o.normalizeStyle(i.value)},null,6))],6)]),_:1},8,["content"]))])):(o.openBlock(),o.createBlock(c,{key:1,type:["warning","error"].includes(t.value.type)?"danger":""},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.value.title),1)]),_:1},8,["type"]))}}}),rt="",Ye=T(W(Ue,[["__scopeId","data-v-e29a45f8"]])),at="",Xe=o.defineComponent({name:"IkMonacoEditor",components:{IkSvgIcon:Ye},props:{language:{type:String,default:"plaintext"},code:{type:[String,Array,Object],default:""},readOnly:Boolean,useMinimap:Boolean,lineNumbers:{type:String,default:"on"},wordWrap:{type:String,default:"on"},autoFormat:Boolean,options:{type:Object,default:()=>{}},completions:Array,extra:Object,height:{type:Number,default:240},editorClass:String,fullScreenTitle:{type:String,default:"全屏模式"}},emits:["change","blur"],setup(e,n){const t=o.ref(!1),r=o.computed(()=>`datav-editor-${m.buildUUID()}`);let i=null,a=null,l=null;const s="datav-dark-theme",c=o.ref(!1),h=()=>{a&&m.ikDom.copyText(a.getValue()).then(()=>{Y.ElMessage.success("复制成功")})},E=()=>{if(a){const d=a.getValue();n.emit("change",{value:d,extra:e.extra})}},R=()=>{if(a){const d=a.getValue();n.emit("blur",{value:d,extra:e.extra}),e.autoFormat&&I(a,e.language)}},K=m._.debounce(E,300),U=()=>{const d=document.querySelector(".datav-fullscreen-editor-dialog section");if(d){const g=Object.assign({},x,e.options,{tabSize:2,value:"",language:e.language,theme:s,readOnly:e.readOnly,minimap:{enabled:e.useMinimap},lineNumbers:e.lineNumbers,wordWrap:e.wordWrap});if(!i||!a)return;const p=i.editor.create(d,g);p.setValue(a.getValue()),e.autoFormat&&setTimeout(()=>{I(p,e.language)},1200),p.onDidChangeModelContent(()=>K()),p.onDidBlurEditorText(()=>R()),l=p}},et=()=>{c.value=!c.value,c.value&&o.nextTick(()=>{U()})},tt=()=>{l&&(a&&!e.readOnly&&(a.setValue(l.getValue()),a.focus()),l.dispose())};return o.watch(()=>e.code,d=>{if(a){const g=q(e.language,d);a.setValue(g)}}),o.onMounted(async()=>{const d=setTimeout(()=>{t.value=!0},200);i=await Pe.init(),clearTimeout(d),t.value=!1,Ae(i),Fe(i,e.language,e.completions||[]),await o.nextTick();const g=document.getElementById(r.value);if(g){const p=Object.assign({},x,e.options,{tabSize:2,value:"",language:e.language,theme:s,readOnly:e.readOnly,minimap:{enabled:e.useMinimap},lineNumbers:e.lineNumbers,wordWrap:e.wordWrap}),w=i.editor.create(g,p),nt=q(e.language,e.code);w.setValue(nt),e.autoFormat&&I(w,e.language),e.height>0&&(g.style.height=`${e.height}px`),w.onDidChangeModelContent(()=>K()),w.onDidBlurEditorText(()=>R()),a=w}}),o.onUnmounted(()=>{a==null||a.dispose(),l==null||l.dispose()}),{editorId:r,isFullScreen:c,loading:t,copyData:h,switchFullScreen:et,openedFullScreenDialog:U,closedFullScreenDialog:tt}}}),Ge=["id"],Je={key:0,class:"datav-editor-actions"},Qe={class:"datav-fullscreen-editor-wp"};function Ze(e,n,t,r,i,a){const l=o.resolveComponent("IkSvgIcon"),s=o.resolveComponent("el-dialog");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",{id:e.editorId,class:o.normalizeClass(["datav-editor",[{"--read-only":e.readOnly},e.editorClass]])},[e.loading?o.createCommentVNode("v-if",!0):(o.openBlock(),o.createElementBlock("div",Je,[o.createVNode(l,{name:"iksvg_tongyong4",title:"复制",pop:"",onClick:e.copyData},null,8,["onClick"]),e.isFullScreen?(o.openBlock(),o.createBlock(l,{key:1,pop:"",title:"退出全屏",name:"iksvg_tuichuquanping",onClick:e.switchFullScreen},null,8,["onClick"])):(o.openBlock(),o.createBlock(l,{key:0,pop:"",title:"全屏",name:"iksvg_quanping",onClick:e.switchFullScreen},null,8,["onClick"]))]))],10,Ge),o.createVNode(s,{modelValue:e.isFullScreen,"onUpdate:modelValue":n[0]||(n[0]=c=>e.isFullScreen=c),title:`${e.fullScreenTitle}${e.readOnly?" ( 只读 )":""}`,preset:"dialog","show-icon":!1,"mask-closable":!1,class:"datav-fullscreen-editor-dialog",style:{width:"90%","margin-top":"1%"},onClosed:e.closedFullScreenDialog},{default:o.withCtx(()=>[o.createElementVNode("div",Qe,[o.createElementVNode("div",{class:o.normalizeClass(["datav-editor datav-fullscreen-editor",[{"--read-only":e.readOnly}]])},n[1]||(n[1]=[o.createElementVNode("section",{style:{position:"relative",display:"flex",width:"100%",height:"100%","text-align":"initial"}},null,-1)]),2)])]),_:1},8,["modelValue","title","onClosed"])],64)}const H=T(W(Xe,[["render",Ze]]));u.IkMonacoEditor=H,u.default=H,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
11
|
+
`},P=be(Se)(M),je={config:ke},Ce=function(){for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return function(i){return t.reduceRight(function(a,l){return l(a)},i)}};function A(e,n){return Object.keys(n).forEach(function(t){n[t]instanceof Object&&e[t]&&Object.assign(n[t],A(e[t],n[t]))}),z(z({},e),n)}var Be={type:"cancelation",msg:"operation is manually canceled"};function j(e){var n=!1,t=new Promise(function(r,i){e.then(function(a){return n?i(Be):r(a)}),e.catch(i)});return t.cancel=function(){return n=!0},t}var _e=ye.create({config:ve,isInitialized:!1,resolve:null,reject:null,monaco:null}),V=Q(_e,2),b=V[0],S=V[1];function Ie(e){var n=je.config(e),t=n.monaco,r=J(n,["monaco"]);S(function(i){return{config:A(i.config,r),monaco:t}})}function Ee(){var e=b(function(n){var t=n.monaco,r=n.isInitialized,i=n.resolve;return{monaco:t,isInitialized:r,resolve:i}});if(!e.isInitialized){if(S({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),j(C);if(window.monaco&&window.monaco.editor)return F(window.monaco),e.resolve(window.monaco),j(C);Ce(Te,$e)(Ne)}return j(C)}function Te(e){return document.body.appendChild(e)}function ze(e){var n=document.createElement("script");return e&&(n.src=e),n}function $e(e){var n=b(function(r){var i=r.config,a=r.reject;return{config:i,reject:a}}),t=ze("".concat(n.config.paths.vs,"/loader.js"));return t.onload=function(){return e()},t.onerror=n.reject,t}function Ne(){var e=b(function(t){var r=t.config,i=t.resolve,a=t.reject;return{config:r,resolve:i,reject:a}}),n=window.require;n.config(e.config),n(["vs/editor/editor.main"],function(t){F(t),e.resolve(t)},function(t){e.reject(t)})}function F(e){b().monaco||S({monaco:e})}function De(){return b(function(e){var n=e.monaco;return n})}var C=new Promise(function(e,n){return S({resolve:e,reject:n})}),Me={config:Ie,init:Ee,__getMonacoInstance:De};const Pe=Me,x={automaticLayout:!0,contextmenu:!1,fixedOverflowWidgets:!0,fontFamily:'Menlo-Regular, Monaco, Menlo, Consolas, "Ubuntu Mono", monospace',formatOnPaste:!0,formatOnType:!0,insertSpaces:!0,lineDecorationsWidth:7,lineHeight:15,lineNumbersMinChars:3,minimap:{enabled:!1},quickSuggestions:!1,readOnly:!1,roundedSelection:!1,scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:6,horizontalScrollbarSize:6,alwaysConsumeMouseWheel:!1,arrowSize:0},snippetSuggestions:"none",tabSize:2,theme:"vs-dark",wordBasedSuggestions:"off",wordWrap:"on",cursorStyle:"line",selectOnLineNumbers:!0,autoIndent:"advanced",glyphMargin:!1,renderLineHighlight:"line",renderWhitespace:"none",scrollBeyondLastColumn:2},Ae=e=>{const n="datav-dark-theme";return e.editor.defineTheme(n,{base:"vs-dark",inherit:!0,rules:[{token:"key",foreground:"dddddd"},{token:"string.key.json",foreground:"dddddd"},{token:"string.value.json",foreground:"b4e98c"}],colors:{"editor.background":"#0e1013","editor.lineHighlightBackground":"#1f2329","editorLineNumber.foreground":"#576369","editorCursor.foreground":"#2483ff"}}),n};let B=[];const Ve=(e,n)=>{const t=[];for(let r=0;r<B.length;r++){const i=B[r];t.push({label:`:${i}`,insertText:i,kind:e.languages.CompletionItemKind.Variable,detail:"CallbackId",range:n})}return t},L=new Map,Fe=(e,n,t)=>{if(t&&t.length>0){if(B=t,L.has(n))return;L.set(n,1),e.languages.registerCompletionItemProvider(n,{triggerCharacters:[":"],provideCompletionItems(r,i){const a=r.getWordUntilPosition(i),l={startLineNumber:i.lineNumber,endLineNumber:i.lineNumber,startColumn:a.startColumn,endColumn:a.endColumn};return{suggestions:Ve(e,l)}}})}},q=(e,n)=>{let t=n;return(m.paramType.isObject(t)||m.paramType.isArray(t))&&(t=JSON.stringify(t,null,2)),m.paramType.isString(t)?t:`${t}`},_=(e,n)=>{e.getAction("editor.action.formatDocument").run()},W=(e,n)=>{const t=e.__vccOpts||e;for(const[r,i]of n)t[r]=i;return t},xe={key:0,class:"ik-svg-icon ik-icon-span inline-block inline-flex justify-center box-content line-height-[0]"},Le={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},qe=["xlink:href"],We=["src"],He={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},Re=["xlink:href"],Ke=["src"],Ue=o.defineComponent({name:"IkSvgIcon",__name:"index",props:{active:{type:Boolean,default:!1},bg:{type:Boolean,default:!1},color:{},colorLight:{},disabled:{type:Boolean,default:!1},error:{type:Boolean},flip:{},name:{},notip:{type:Boolean,default:!1},opacity:{default:.5},padding:{default:"6px"},primary:{type:Boolean},rotate:{},showBg:{type:Boolean,default:!1},size:{default:""},success:{type:Boolean},tableIconType:{},title:{},type:{},warning:{type:Boolean},width:{}},setup(e){const n=e,t=o.computed(()=>n),r=o.computed(()=>{const{name:a}=t.value;return/^http?:\/\//.test(a)?"img":/i-[^:]+:[^:]+/.test(a)?"unocss":a!=null&&a.startsWith("iksig")?"iksig":a!=null&&a.includes(":")?"iconify":a!=null&&a.startsWith("iksvg")?"svg":"i"}),i=o.computed(()=>{const a=[];if(t.value.flip)switch(t.value.flip){case"horizontal":a.push("rotateY(180deg)");break;case"vertical":a.push("rotateX(180deg)");break;case"both":a.push("rotateX(180deg)"),a.push("rotateY(180deg)");break}t.value.rotate&&a.push(`rotate(${t.value.rotate%360}deg)`);const l={pointerEvents:t.value.disabled?"none":"auto",...t.value.color&&{color:t.value.color},...t.value.size&&{fontSize:typeof t.value.size=="number"?`${t.value.size}px`:t.value.size},...a.length&&{transform:a.join(" ")},padding:t.value.showBg||t.value.bg?t.value.padding:0,...t.value.color&&r.value!=="iksig"?{"--ik-icon-deep-color":t.value.color,"--ik-icon-shallow-color":t.value.colorLight||m.ikColor.setOpacity(t.value.color,t.value.opacity)}:{}};return t.value.width&&(l.width=l.height=typeof t.value.width=="number"?`${t.value.width}px`:t.value.width),l});return(a,l)=>{const s=o.resolveComponent("el-tooltip"),c=o.resolveComponent("el-button");return t.value.tableIconType==="icon"||!t.value.tableIconType?(o.openBlock(),o.createElementBlock("span",xe,[t.value.notip||!t.value.title?(o.openBlock(),o.createElementBlock("i",{key:0,class:o.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[a.name]:r.value==="unocss","show-bg":t.value.showBg||t.value.bg,default:t.value.size==="default",small:t.value.size==="small",big:t.value.size==="big",warning:t.value.warning||t.value.type==="warning",primary:t.value.primary||t.value.type==="primary",success:a.success||t.value.type==="success",error:t.value.error||t.value.type==="error",active:t.value.active,disabled:t.value.disabled}]),style:o.normalizeStyle(i.value)},[o.createCommentVNode(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),r.value==="iksig"?(o.openBlock(),o.createElementBlock("i",{key:0,class:o.normalizeClass(`iksig ${t.value.name}`),style:o.normalizeStyle(i.value)},null,6)):r.value==="svg"?(o.openBlock(),o.createElementBlock("svg",Le,[o.createElementVNode("use",{"xlink:href":`#${t.value.name}`},null,8,qe)])):r.value==="img"?(o.openBlock(),o.createElementBlock("img",{key:2,src:t.value.name,class:"h-[1em] w-[1em]"},null,8,We)):(o.openBlock(),o.createElementBlock("i",{key:3,class:o.normalizeClass(t.value.name),style:o.normalizeStyle(i.value)},null,6))],6)):(o.openBlock(),o.createBlock(s,{key:1,content:t.value.title,placement:"top"},{default:o.withCtx(()=>[o.createElementVNode("i",{class:o.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[a.name]:r.value==="unocss","show-bg":t.value.showBg||t.value.bg,default:t.value.size==="default",small:t.value.size==="small",big:t.value.size==="big",warning:t.value.warning||t.value.type==="warning",primary:a.primary||t.value.type==="primary",success:a.success||t.value.type==="success",error:t.value.error||t.value.type==="error",active:t.value.active}]),style:o.normalizeStyle(i.value)},[r.value==="iksig"?(o.openBlock(),o.createElementBlock("i",{key:0,class:o.normalizeClass(`iksig ${t.value.name}`),style:o.normalizeStyle(i.value)},null,6)):r.value==="svg"?(o.openBlock(),o.createElementBlock("svg",He,[o.createElementVNode("use",{"xlink:href":`#${t.value.name}`},null,8,Re)])):r.value==="img"?(o.openBlock(),o.createElementBlock("img",{key:2,src:t.value.name,class:"h-[1em] w-[1em]"},null,8,Ke)):(o.openBlock(),o.createElementBlock("i",{key:3,class:o.normalizeClass(t.value.name),style:o.normalizeStyle(i.value)},null,6))],6)]),_:1},8,["content"]))])):(o.openBlock(),o.createBlock(c,{key:1,type:["warning","error"].includes(t.value.type)?"danger":""},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(t.value.title),1)]),_:1},8,["type"]))}}}),ot="",Ye=E(W(Ue,[["__scopeId","data-v-e29a45f8"]])),it="",Xe=o.defineComponent({name:"IkMonacoEditor",components:{IkSvgIcon:Ye},props:{language:{type:String,default:"plaintext"},code:{type:[String,Array,Object],default:""},readOnly:Boolean,useMinimap:Boolean,lineNumbers:{type:String,default:"on"},wordWrap:{type:String,default:"on"},autoFormat:Boolean,options:{type:Object,default:()=>{}},completions:Array,extra:Object,height:{type:Number,default:240},editorClass:String,fullScreenTitle:{type:String,default:"全屏模式"}},emits:["change","blur"],setup(e,n){const t=o.ref(!1),r=o.computed(()=>`datav-editor-${m.buildUUID()}`);let i=null,a=null,l=null;const s="datav-dark-theme",c=o.ref(!1),h=()=>{a&&m.ikDom.copyText(a.getValue()).then(()=>{Y.ElMessage.success("复制成功")})},I=()=>{if(a){const d=a.getValue();n.emit("change",{value:d,extra:e.extra})}},R=()=>{if(a){const d=a.getValue();n.emit("blur",{value:d,extra:e.extra}),e.autoFormat&&_(a,e.language)}},K=m._.debounce(I,300),U=()=>{const d=document.querySelector(".datav-fullscreen-editor-dialog section");if(d){const g=Object.assign({},x,e.options,{tabSize:2,value:"",language:e.language,theme:s,readOnly:e.readOnly,minimap:{enabled:e.useMinimap},lineNumbers:e.lineNumbers,wordWrap:e.wordWrap});if(!i||!a)return;const p=i.editor.create(d,g);p.setValue(a.getValue()),e.autoFormat&&setTimeout(()=>{_(p,e.language)},1200),p.onDidChangeModelContent(()=>K()),p.onDidBlurEditorText(()=>R()),l=p}},tt=()=>{c.value=!c.value,c.value&&o.nextTick(()=>{U()})},nt=()=>{l&&(a&&!e.readOnly&&(a.setValue(l.getValue()),a.focus()),l.dispose())};return o.watch(()=>e.code,d=>{if(a){const g=q(e.language,d);a.setValue(g)}}),o.onMounted(async()=>{const d=setTimeout(()=>{t.value=!0},200);i=await Pe.init(),clearTimeout(d),t.value=!1,Ae(i),Fe(i,e.language,e.completions||[]),await o.nextTick();const g=document.getElementById(r.value);if(g){const p=Object.assign({},x,e.options,{tabSize:2,value:"",language:e.language,theme:s,readOnly:e.readOnly,minimap:{enabled:e.useMinimap},lineNumbers:e.lineNumbers,wordWrap:e.wordWrap}),w=i.editor.create(g,p),rt=q(e.language,e.code);w.setValue(rt),e.autoFormat&&_(w,e.language),e.height>0&&(g.style.height=`${e.height}px`),w.onDidChangeModelContent(()=>K()),w.onDidBlurEditorText(()=>R()),a=w}}),o.onUnmounted(()=>{a==null||a.dispose(),l==null||l.dispose()}),{editorId:r,isFullScreen:c,loading:t,copyData:h,switchFullScreen:tt,openedFullScreenDialog:U,closedFullScreenDialog:nt}}}),Ge=["id"],Je={key:0,class:"datav-editor-actions"},Qe={class:"datav-fullscreen-editor-wp"},Ze=[o.createElementVNode("section",{style:{position:"relative",display:"flex",width:"100%",height:"100%","text-align":"initial"}},null,-1)];function et(e,n,t,r,i,a){const l=o.resolveComponent("IkSvgIcon"),s=o.resolveComponent("el-dialog");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",{id:e.editorId,class:o.normalizeClass(["datav-editor",[{"--read-only":e.readOnly},e.editorClass]])},[e.loading?o.createCommentVNode("v-if",!0):(o.openBlock(),o.createElementBlock("div",Je,[o.createVNode(l,{name:"iksvg_tongyong4",title:"复制",pop:"",onClick:e.copyData},null,8,["onClick"]),e.isFullScreen?(o.openBlock(),o.createBlock(l,{key:1,pop:"",title:"退出全屏",name:"iksvg_tuichuquanping",onClick:e.switchFullScreen},null,8,["onClick"])):(o.openBlock(),o.createBlock(l,{key:0,pop:"",title:"全屏",name:"iksvg_quanping",onClick:e.switchFullScreen},null,8,["onClick"]))]))],10,Ge),o.createVNode(s,{modelValue:e.isFullScreen,"onUpdate:modelValue":n[0]||(n[0]=c=>e.isFullScreen=c),title:`${e.fullScreenTitle}${e.readOnly?" ( 只读 )":""}`,preset:"dialog","show-icon":!1,"mask-closable":!1,class:"datav-fullscreen-editor-dialog",style:{width:"90%","margin-top":"1%"},onClosed:e.closedFullScreenDialog},{default:o.withCtx(()=>[o.createElementVNode("div",Qe,[o.createElementVNode("div",{class:o.normalizeClass(["datav-editor datav-fullscreen-editor",[{"--read-only":e.readOnly}]])},Ze,2)])]),_:1},8,["modelValue","title","onClosed"])],64)}const H=E(W(Xe,[["render",et]]));u.IkMonacoEditor=H,u.default=H,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|