vue-devui 1.5.4-alpha.0 → 1.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/action-timeline/index.es.js +161 -0
  2. package/action-timeline/index.umd.js +1 -0
  3. package/action-timeline/package.json +8 -0
  4. package/action-timeline/style.css +1 -0
  5. package/carousel/index.es.js +448 -0
  6. package/carousel/index.umd.js +1 -0
  7. package/carousel/package.json +8 -0
  8. package/carousel/style.css +1 -0
  9. package/code-editor/index.es.js +1 -1
  10. package/code-editor/index.umd.js +1 -1
  11. package/code-review/index.es.js +73 -0
  12. package/code-review/index.umd.js +1 -0
  13. package/code-review/package.json +8 -0
  14. package/code-review/style.css +1 -0
  15. package/editor-md/index.es.js +9173 -0
  16. package/editor-md/index.umd.js +142 -0
  17. package/editor-md/package.json +8 -0
  18. package/editor-md/style.css +1 -0
  19. package/global.d.ts +10 -4
  20. package/grid/index.es.js +25 -1
  21. package/grid/index.umd.js +1 -1
  22. package/modal/index.es.js +10 -10
  23. package/modal/index.umd.js +1 -1
  24. package/nuxt/components/ActionTimeline.js +3 -0
  25. package/nuxt/components/Carousel.js +3 -0
  26. package/nuxt/components/CarouselItem.js +3 -0
  27. package/nuxt/components/CodeReview.js +3 -0
  28. package/nuxt/components/EditorMd.js +3 -0
  29. package/nuxt/components/EditorMdInjectionKey.js +3 -0
  30. package/nuxt/components/MdRender.js +3 -0
  31. package/nuxt/components/ModalBody.js +3 -0
  32. package/nuxt/components/ModalFooter.js +3 -0
  33. package/nuxt/components/ModalHeader.js +3 -0
  34. package/nuxt/components/SplitterPane.js +3 -0
  35. package/nuxt/components/actionTimelineProps.js +3 -0
  36. package/nuxt/components/codeReviewProps.js +3 -0
  37. package/nuxt/components/editorMdProps.js +3 -0
  38. package/nuxt/components/mdRenderProps.js +3 -0
  39. package/nuxt/components/mdToolbarItemProps.js +3 -0
  40. package/package.json +10 -3
  41. package/splitter/index.es.js +1 -1
  42. package/splitter/index.umd.js +7 -7
  43. package/style.css +1 -1
  44. package/types/action-timeline/index.d.ts +11 -0
  45. package/types/action-timeline/src/action-timeline-types.d.ts +46 -0
  46. package/types/action-timeline/src/action-timeline.d.ts +55 -0
  47. package/types/auto-complete/src/auto-complete.d.ts +1 -1
  48. package/types/carousel/index.d.ts +1 -2
  49. package/types/code-review/index.d.ts +11 -0
  50. package/types/code-review/src/code-review-types.d.ts +14 -0
  51. package/types/code-review/src/code-review.d.ts +27 -0
  52. package/types/code-review/src/composables/use-code-review.d.ts +4 -0
  53. package/types/editor-md/index.d.ts +12 -0
  54. package/types/editor-md/src/components/font-color.d.ts +2 -0
  55. package/types/editor-md/src/components/font-size.d.ts +2 -0
  56. package/types/editor-md/src/components/md-render.d.ts +95 -0
  57. package/types/editor-md/src/components/toolbar-item.d.ts +14 -0
  58. package/types/editor-md/src/components/toolbar.d.ts +3 -0
  59. package/types/editor-md/src/composables/helper.d.ts +2 -0
  60. package/types/editor-md/src/composables/md-render-service.d.ts +26 -0
  61. package/types/editor-md/src/composables/use-editor-md-render.d.ts +10 -0
  62. package/types/editor-md/src/composables/use-editor-md-theme.d.ts +3 -0
  63. package/types/editor-md/src/composables/use-editor-md-toolbar.d.ts +4 -0
  64. package/types/editor-md/src/composables/use-editor-md.d.ts +15 -0
  65. package/types/editor-md/src/editor-md-types.d.ts +172 -0
  66. package/types/editor-md/src/editor-md.d.ts +198 -0
  67. package/types/editor-md/src/icons-config.d.ts +23 -0
  68. package/types/editor-md/src/plugins/mermaid.d.ts +2 -0
  69. package/types/editor-md/src/plugins/toc.d.ts +1 -0
  70. package/types/editor-md/src/toolbar-config.d.ts +22 -0
  71. package/types/editor-md/src/utils.d.ts +2 -0
  72. package/types/grid/src/grid-types.d.ts +4 -0
  73. package/types/grid/src/row.d.ts +9 -0
  74. package/types/menu/src/menu.d.ts +1 -1
  75. package/types/modal/index.d.ts +4 -1
  76. package/types/nav-sprite/src/nav-sprite.d.ts +1 -1
  77. package/types/splitter/index.d.ts +2 -1
  78. package/types/upload/index.d.ts +2 -1
  79. package/types/vue-devui.d.ts +7 -4
  80. package/upload/index.es.js +1 -1
  81. package/upload/index.umd.js +1 -1
  82. package/vue-devui.es.js +16173 -14198
  83. package/vue-devui.umd.js +135 -20
@@ -0,0 +1,198 @@
1
+ import './editor-md.scss';
2
+ declare const _default: import("vue").DefineComponent<{
3
+ modelValue: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ options: {
8
+ type: ObjectConstructor;
9
+ default: () => {};
10
+ };
11
+ mode: {
12
+ type: import("vue").PropType<import("./editor-md-types").Mode>;
13
+ default: string;
14
+ };
15
+ customThemeConfig: {
16
+ type: import("vue").PropType<import("./editor-md-types").MDThemeConfig>;
17
+ };
18
+ customToolbars: {
19
+ type: import("vue").PropType<Record<string, import("./toolbar-config").IToolbarItemConfig>>;
20
+ };
21
+ disableChangeEvent: {
22
+ type: BooleanConstructor;
23
+ default: boolean;
24
+ };
25
+ editorContainerHeight: {
26
+ type: NumberConstructor;
27
+ };
28
+ imageUploadToServer: {
29
+ type: BooleanConstructor;
30
+ default: boolean;
31
+ };
32
+ hidePreviewView: {
33
+ type: BooleanConstructor;
34
+ default: boolean;
35
+ };
36
+ maxlength: {
37
+ type: NumberConstructor;
38
+ default: null;
39
+ };
40
+ placeholder: {
41
+ type: StringConstructor;
42
+ default: string;
43
+ };
44
+ toolbarConfig: {
45
+ type: import("vue").PropType<import("./editor-md-types").ToolbarConfigProp>;
46
+ default: () => (string | string[])[];
47
+ };
48
+ fullscreenZIndex: {
49
+ type: NumberConstructor;
50
+ default: number;
51
+ };
52
+ hintConfig: {
53
+ type: import("vue").PropType<Record<string, any>>;
54
+ };
55
+ customHintReplaceFn: {
56
+ type: import("vue").PropType<(prefix: string, row: any) => string>;
57
+ };
58
+ baseUrl: {
59
+ type: StringConstructor;
60
+ default: null;
61
+ };
62
+ breaks: {
63
+ type: BooleanConstructor;
64
+ default: boolean;
65
+ };
66
+ customParse: {
67
+ type: import("vue").PropType<(html: string) => string>;
68
+ default: null;
69
+ };
70
+ renderParse: {
71
+ type: import("vue").PropType<(html: string) => string>;
72
+ default: null;
73
+ };
74
+ mdRules: {
75
+ type: ObjectConstructor;
76
+ default: () => {};
77
+ };
78
+ customRendererRules: {
79
+ type: import("vue").PropType<import("./editor-md-types").ICustomRenderRule[]>;
80
+ default: () => never[];
81
+ };
82
+ customXssRules: {
83
+ type: import("vue").PropType<import("./editor-md-types").ICustomXssRule[]>;
84
+ default: () => never[];
85
+ };
86
+ mdPlugins: {
87
+ type: import("vue").PropType<import("./editor-md-types").MdPlugin[]>;
88
+ default: () => never[];
89
+ };
90
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, "update:modelValue" | "afterEditorInit" | "mdCheckedEvent" | "selectHint" | "contentChange" | "previewContentChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
91
+ modelValue: {
92
+ type: StringConstructor;
93
+ default: string;
94
+ };
95
+ options: {
96
+ type: ObjectConstructor;
97
+ default: () => {};
98
+ };
99
+ mode: {
100
+ type: import("vue").PropType<import("./editor-md-types").Mode>;
101
+ default: string;
102
+ };
103
+ customThemeConfig: {
104
+ type: import("vue").PropType<import("./editor-md-types").MDThemeConfig>;
105
+ };
106
+ customToolbars: {
107
+ type: import("vue").PropType<Record<string, import("./toolbar-config").IToolbarItemConfig>>;
108
+ };
109
+ disableChangeEvent: {
110
+ type: BooleanConstructor;
111
+ default: boolean;
112
+ };
113
+ editorContainerHeight: {
114
+ type: NumberConstructor;
115
+ };
116
+ imageUploadToServer: {
117
+ type: BooleanConstructor;
118
+ default: boolean;
119
+ };
120
+ hidePreviewView: {
121
+ type: BooleanConstructor;
122
+ default: boolean;
123
+ };
124
+ maxlength: {
125
+ type: NumberConstructor;
126
+ default: null;
127
+ };
128
+ placeholder: {
129
+ type: StringConstructor;
130
+ default: string;
131
+ };
132
+ toolbarConfig: {
133
+ type: import("vue").PropType<import("./editor-md-types").ToolbarConfigProp>;
134
+ default: () => (string | string[])[];
135
+ };
136
+ fullscreenZIndex: {
137
+ type: NumberConstructor;
138
+ default: number;
139
+ };
140
+ hintConfig: {
141
+ type: import("vue").PropType<Record<string, any>>;
142
+ };
143
+ customHintReplaceFn: {
144
+ type: import("vue").PropType<(prefix: string, row: any) => string>;
145
+ };
146
+ baseUrl: {
147
+ type: StringConstructor;
148
+ default: null;
149
+ };
150
+ breaks: {
151
+ type: BooleanConstructor;
152
+ default: boolean;
153
+ };
154
+ customParse: {
155
+ type: import("vue").PropType<(html: string) => string>;
156
+ default: null;
157
+ };
158
+ renderParse: {
159
+ type: import("vue").PropType<(html: string) => string>;
160
+ default: null;
161
+ };
162
+ mdRules: {
163
+ type: ObjectConstructor;
164
+ default: () => {};
165
+ };
166
+ customRendererRules: {
167
+ type: import("vue").PropType<import("./editor-md-types").ICustomRenderRule[]>;
168
+ default: () => never[];
169
+ };
170
+ customXssRules: {
171
+ type: import("vue").PropType<import("./editor-md-types").ICustomXssRule[]>;
172
+ default: () => never[];
173
+ };
174
+ mdPlugins: {
175
+ type: import("vue").PropType<import("./editor-md-types").MdPlugin[]>;
176
+ default: () => never[];
177
+ };
178
+ }>>, {
179
+ options: Record<string, any>;
180
+ mode: import("./editor-md-types").Mode;
181
+ placeholder: string;
182
+ maxlength: number;
183
+ modelValue: string;
184
+ baseUrl: string;
185
+ disableChangeEvent: boolean;
186
+ imageUploadToServer: boolean;
187
+ hidePreviewView: boolean;
188
+ toolbarConfig: import("./editor-md-types").ToolbarConfigProp;
189
+ fullscreenZIndex: number;
190
+ breaks: boolean;
191
+ customParse: (html: string) => string;
192
+ renderParse: (html: string) => string;
193
+ mdRules: Record<string, any>;
194
+ customRendererRules: import("./editor-md-types").ICustomRenderRule[];
195
+ customXssRules: import("./editor-md-types").ICustomXssRule[];
196
+ mdPlugins: import("./editor-md-types").MdPlugin[];
197
+ }>;
198
+ export default _default;
@@ -0,0 +1,23 @@
1
+ export declare const UNDO_ICON = "<svg width=\"16px\" height=\"14px\" viewBox=\"0 0 16 14\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g fill=\"#293040\">\n <path d=\"M11,5 C13.7614237,5 16,7.23857625 16,10 C16,12.7614237 13.7614237,15 11,15 L7,15 L7,14 L11,14 C13.209139,14 15,12.209139 15,10 C15,7.790861 13.209139,6 11,6 L5,6 L5,10 L0,5.5 L5,1 L5,5 L11,5 Z\" id=\"\u8DEF\u5F84\"></path>\n </g>\n</g>\n</svg>";
2
+ export declare const REDO_ICON = "<svg width=\"16px\" height=\"14px\" viewBox=\"0 0 16 14\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g fill=\"#293040\">\n <path d=\"M5,5 L11,5 L11,1 L16,5.5 L11,10 L11,6 L5,6 C2.790861,6 1,7.790861 1,10 C1,12.209139 2.790861,14 5,14 L9,14 L9,15 L5,15 C2.23857625,15 0,12.7614237 0,10 C0,7.23857625 2.23857625,5 5,5 Z\" id=\"\u8DEF\u5F84\"></path>\n </g>\n</g>\n</svg>";
3
+ export declare const CLEAN_ICON = "<svg width=\"16px\" height=\"15px\" viewBox=\"0 0 16 15\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g fill=\"#293040\">\n <path d=\"M4.32708124,14 L8.37150583,14 L10.5729409,11.5550586 L4.6297198,6.20375828 L1.25465311,9.95542661 C1.09078634,10.1375782 1.0006437,10.3742369 1.00180556,10.6192474 C1.00295568,10.8617824 1.10621221,11.092615 1.28624979,11.2551297 L4.32708124,14 L4.32708124,14 Z M16,14 L16,15 L3.93760008,15 L0.597250175,11.9923354 C0.217072683,11.6500221 1.59049582e-13,11.1091757 1.59428026e-13,10.6149383 C1.59806471e-13,10.1207008 0.183000942,9.64396706 0.513710349,9.27667705 L8.56855175,0.330869394 L16,7.02217546 L9.71713856,14 L16,14 Z\" id=\"\u5F62\u72B6\"></path>\n </g>\n</g>\n</svg>";
4
+ export declare const BOLD_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g fill=\"#293040\">\n <path d=\"M14,11 C14,13.7614237 11.7614237,16 9,16 L2,16 L2,0 L8,0 C10.209139,-4.05812251e-16 12,1.790861 12,4 C12,4.93647913 11.6781808,5.79779336 11.1391019,6.4793831 C12.8303741,7.28108833 14,9.00395379 14,11 Z M9,8 L4,8 L4,14 L9,14 C10.6568542,14 12,12.6568542 12,11 C12,9.34314575 10.6568542,8 9,8 Z M8,6 C9.1045695,6 10,5.1045695 10,4 C10,2.8954305 9.1045695,2 8,2 L4,2 L4,6 L8,6 Z\" id=\"\u5F62\u72B6\"></path>\n </g>\n</g>\n</svg>";
5
+ export declare const ITALIC_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g fill=\"#293040\">\n <polygon id=\"\u8DEF\u5F84\" points=\"6 15 9 1 6 1 6 0 13 0 13 1 10 1 7 15 10 15 10 16 3 16 3 15\"></polygon>\n </g>\n</g>\n</svg>";
6
+ export declare const UNDERLINE_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g fill=\"#293040\">\n <path d=\"M4,0 L4,7 C4,9.209139 5.790861,11 8,11 C10.209139,11 12,9.209139 12,7 L12,0 L13,0 L13,7 C13,9.76142375 10.7614237,12 8,12 C5.23857625,12 3,9.76142375 3,7 L3,0 L4,0 Z M2,14 L14,14 L14,16 L2,16 L2,14 Z\" id=\"\u5F62\u72B6\"></path>\n </g>\n</g>\n</svg>";
7
+ export declare const STRIKE_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g fill=\"#293040\">\n <path d=\"M16,8 L16,10 L11.4648712,10 C11.8052114,10.5883467 12,11.2714257 12,12 C12,14.209139 10.209139,16 8,16 C5.790861,16 4,14.209139 4,12 C4,11.6547004 4.043753,11.3196199 4.12601749,11 L5.17070571,11 C5.06015422,11.3127789 5,11.6493646 5,12 C5,13.6568542 6.34314575,15 8,15 C9.65685425,15 11,13.6568542 11,12 C11,11.2316456 10.7111464,10.5307565 10.2361065,10 L0,10 L0,8 L5.3541756,8 C4.52375489,7.26705555 4,6.19469253 4,5 C4,2.790861 5.790861,1 8,1 C10.209139,1 12,2.790861 12,5 C12,5.72857429 11.8052114,6.41165327 11.4648712,7 L10.2361065,7 C10.7111464,6.46924351 11,5.76835444 11,5 C11,3.34314575 9.65685425,2 8,2 C6.34314575,2 5,3.34314575 5,5 C5,6.65685425 6.34314575,8 8,8 L16,8 Z M4.53512878,10 L5.76389349,10 L4.53512878,10 L4.53512878,10 Z\" id=\"\u5F62\u72B6\"></path>\n </g>\n</g>\n</svg>";
8
+ export declare const COLOR_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g id=\"edit-icon/background-color\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g fill=\"#293040\">\n <g>\n <path d=\"M10.4761905,8 L5.52380952,8 L4,12 L3,12 L7.5,-3.84581256e-13 L8.5,-3.84581256e-13 L13,12 L12,12 L10.4761905,8 L10.4761905,8 Z M10.0952381,7 L8,1.5 L5.9047619,7 L10.0952381,7 Z M2,14 L14,14 L14,16 L2,16 L2,14 Z\" id=\"\u5F62\u72B6\"></path>\n </g>\n </g>\n</g>\n</svg>";
9
+ export declare const BACKGROUND_COLOR_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g id=\"edit-icon/background-color\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g fill=\"#293040\">\n <g>\n <path d=\"M10.4761905,8 L5.52380952,8 L4,12 L3,12 L7.5,-3.84581256e-13 L8.5,-3.84581256e-13 L13,12 L12,12 L10.4761905,8 L10.4761905,8 Z M10.0952381,7 L8,1.5 L5.9047619,7 L10.0952381,7 Z M2,14 L14,14 L14,16 L2,16 L2,14 Z\" id=\"\u5F62\u72B6\"></path>\n </g>\n </g>\n</g>\n</svg>";
10
+ export declare const LIST_UNORDERED_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g id=\"edit-icon/unordered-list\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g fill=\"#293040\">\n <g>\n <path d=\"M5,1 L16,1 L16,2.5 L5,2.5 L5,1 Z M2,4 C0.8954305,4 0,3.1045695 0,2 C0,0.8954305 0.8954305,0 2,0 C3.1045695,0 4,0.8954305 4,2 C4,3.1045695 3.1045695,4 2,4 Z M2,3 C2.55228475,3 3,2.55228475 3,2 C3,1.44771525 2.55228475,1 2,1 C1.44771525,1 1,1.44771525 1,2 C1,2.55228475 1.44771525,3 2,3 Z M2,10 C0.8954305,10 0,9.1045695 0,8 C0,6.8954305 0.8954305,6 2,6 C3.1045695,6 4,6.8954305 4,8 C4,9.1045695 3.1045695,10 2,10 Z M2,9 C2.55228475,9 3,8.55228475 3,8 C3,7.44771525 2.55228475,7 2,7 C1.44771525,7 1,7.44771525 1,8 C1,8.55228475 1.44771525,9 2,9 Z M2,16 C0.8954305,16 0,15.1045695 0,14 C0,12.8954305 0.8954305,12 2,12 C3.1045695,12 4,12.8954305 4,14 C4,15.1045695 3.1045695,16 2,16 Z M2,15 C2.55228475,15 3,14.5522847 3,14 C3,13.4477153 2.55228475,13 2,13 C1.44771525,13 1,13.4477153 1,14 C1,14.5522847 1.44771525,15 2,15 Z M5,7 L16,7 L16,8.5 L5,8.5 L5,7 Z M5,13 L16,13 L16,14.5 L5,14.5 L5,13 Z\" id=\"\u5F62\u72B6\"></path>\n </g>\n </g>\n</g>\n</svg>";
11
+ export declare const LIST_ORDERED_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g fill=\"#293040\">\n <path d=\"M5,1 L16,1 L16,2.5 L5,2.5 L5,1 Z M0,0 L2,0 L2,3 L3,3 L3,4 L0,4 L0,3 L1,3 L1,1 L0,1 L0,0 Z M5,7 L16,7 L16,8.5 L5,8.5 L5,7 Z M5,13 L16,13 L16,14.5 L5,14.5 L5,13 Z M0,15 L1.75,15 C1.88807119,15 2,14.8880712 2,14.75 C2,14.6119288 1.88807119,14.5 1.75,14.5 L0,14.5 L0,13.5 L1.75,13.5 C1.88807119,13.5 2,13.3880712 2,13.25 C2,13.1119288 1.88807119,13 1.75,13 L0,13 L0,12 L1.5,12 C2.32842712,12 3,12.6715729 3,13.5 C3,13.6753177 2.96992289,13.8436105 2.91464715,14 C2.96992289,14.1563895 3,14.3246823 3,14.5 C3,15.3284271 2.32842712,16 1.5,16 L0,16 L0,15 Z M2,7.5 C2,7.35127258 1.9375,7.22627258 1.84375,7.13845444 C1.76307119,7.05596441 1.63807119,7 1.5,7 C1.22385763,7 1,7.22385763 1,7.5 L1.62630326e-19,7.5 C0.147399902,6.5 0.647399902,6 1.5,6 C2.32842712,6 3,6.67157288 3,7.5 C3,8.07312512 2.50016007,8.55650475 2.22821045,8.74661255 C1.95626083,8.93672035 1.77325955,8.99789088 1.76769962,9 L3,9 L3,10 L0,10 L1.62630326e-19,9 C0.619515577,8.77257137 1.06188822,8.55939591 1.32711792,8.36047363 C1.6371448,8.12795347 1.87259637,7.91592701 1.96143498,7.69289356 C1.98627694,7.633537 2,7.5683711 2,7.5 Z\" id=\"\u5F62\u72B6\"></path>\n </g>\n</g>\n</svg>";
12
+ export declare const LIST_CHECK_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M14,15 L14,9.37100497 L15,9.37100497 L15,16 L1,16 L1,2 L10.1946467,2 L10.1946467,3 L2,3 L2,15 L14,15 Z M14.4525049,2.48740937 C14.7356009,2.1850362 15.2102174,2.16940895 15.5125906,2.45250493 C15.8149638,2.73560092 15.8305911,3.21021745 15.5474951,3.51259063 L8.45990379,11.0828057 L4.46558382,7.02621226 C4.17496481,6.73106236 4.17863783,6.25620283 4.47378774,5.96558382 C4.76893764,5.67496481 5.24379717,5.67863783 5.53441618,5.97378774 L8.43263799,8.91719429 L14.4525049,2.48740937 Z\" id=\"\u5F62\u72B6\u7ED3\u5408\" fill=\"#293040\" fill-rule=\"nonzero\"></path>\n</g>\n</svg>";
13
+ export declare const CODE_BLOCK_ICON = "<svg class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" width=\"16\" height=\"16\">\n<path fill=\"#293040\" d=\"M181.40490722 476.99755859l58.04077149-32.33276367A49.43847656 49.43847656 0 0 0 264.80761719 401.50500488L264.80761719 264.80761719a98.87695313 98.87695313 0 0 1 98.87695312-98.87695313l49.43847657 0a24.71923828 24.71923828 0 0 1 0 49.43847657L363.68457031 215.36914062a49.43847656 49.43847656 0 0 0-49.43847655 49.43847657l0 144.50866699a98.87695313 98.87695313 0 0 1-52.30590821 87.25891113L233.01867675 512l28.9215088 15.42480469A98.87695313 98.87695313 0 0 1 314.24609375 614.63427734L314.24609376 759.19238281a49.43847656 49.43847656 0 0 0 49.43847655 49.43847657l49.43847657 0a24.71923828 24.71923828 0 1 1 0 49.43847656L363.68457031 858.06933594a98.87695313 98.87695313 0 0 1-98.87695312-98.87695313l0-136.6973877a49.43847656 49.43847656 0 0 0-25.36193848-43.15979003l-58.04077148-32.33276367a37.07885742 37.07885742 0 0 1 0-70.00488282z m611.75170899 1e-8a37.07885742 37.07885742 0 0 1 0 70.0048828l-58.04077149 32.33276368a49.43847656 49.43847656 0 0 0-25.36193848 43.15979004L709.75390624 759.19238281a98.87695313 98.87695313 0 0 1-98.87695312 98.87695313L561.43847656 858.06933594a24.71923828 24.71923828 0 1 1 0-49.43847656l49.43847657 0a49.43847656 49.43847656 0 0 0 49.43847656-49.43847657l0-144.50866699a98.87695313 98.87695313 0 0 1 52.3059082-87.25891113L741.54284668 512l-28.92150879-15.42480469A98.87695313 98.87695313 0 0 1 660.31542969 409.36572266L660.31542969 264.80761719a49.43847656 49.43847656 0 0 0-49.43847657-49.43847657L561.43847656 215.36914062a24.71923828 24.71923828 0 0 1 0-49.43847656l49.43847657 0a98.87695313 98.87695313 0 0 1 98.87695311 98.87695313l0 136.6973877a49.43847656 49.43847656 0 0 0 25.36193848 43.15979003l58.04077149 32.33276368z\" p-id=\"1449\"></path>\n</svg>";
14
+ export declare const IMAGE_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M0,1 L16,1 L16,15 L0,15 L0,1 Z M1,2 L1,14 L15,14 L15,2 L1,2 Z M12,10 L9,11 L4,8 L1,10 L1,9 L4,7 L9,10 L12,9 L15,11 L15,12 L12,10 Z M12,7 C11.4477153,7 11,6.55228475 11,6 C11,5.44771525 11.4477153,5 12,5 C12.5522847,5 13,5.44771525 13,6 C13,6.55228475 12.5522847,7 12,7 Z\" id=\"\u5F62\u72B6\" fill=\"#293040\"></path>\n</g>\n</svg>";
15
+ export declare const FILE_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M16,16 L1,16 L1,0 L12,0 L16,4 L16,16 Z M11,1 L2,1 L2,15 L15,15 L15,5 L11,5 L11,1 Z M12,1.533 L12,4 L14.52,4 L12,1.533 Z\" fill-rule=\"nonzero\" id=\"\u5F62\u72B6\" fill=\"#293040\"></path>\n <polygon id=\"path\" fill=\"#293040\" points=\"8 8 6 8 8.5 5 11 8 9 8 9 12 8 12\"></polygon>\n</g>\n</svg>";
16
+ export declare const TABLE_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M6,11 L10,11 L10,8 L6,8 L6,11 Z M6,12 L6,15 L5,15 L5,12 L1,12 L1,11 L5,11 L5,8 L1,8 L1,7 L15,7 L15,8 L11,8 L11,11 L15,11 L15,12 L11,12 L11,15 L10,15 L10,12 L6,12 Z M1,0 L15,0 C15.5522847,0 16,0.44771525 16,1 L16,15 C16,15.5522847 15.5522847,16 15,16 L1,16 C0.44771525,16 0,15.5522847 0,15 L0,1 C0,0.44771525 0.44771525,0 1,0 Z M1,1 L1,15 L15,15 L15,1 L1,1 Z\" id=\"\u5F62\u72B6\" fill=\"#293040\"></path>\n</g>\n</svg>";
17
+ export declare const LINK_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M4.499,10.863 L10.863,4.499 L11.573,5.209 L5.209,11.573 L4.499,10.863 Z M3.64649819,6.99452063 C3.66194719,7.01086151 3.67767307,7.02703631 3.69367584,7.04303908 L4.38852082,7.73788406 L1.80224782,10.3241571 C0.732584061,11.3938208 0.732584061,13.1280884 1.80224782,14.1977522 C2.87191157,15.2674159 4.60617918,15.2674159 5.67584293,14.1977522 L8.26211594,11.6114792 L8.95696092,12.3063242 C8.97296369,12.3223269 8.98913849,12.3380528 9.00547937,12.3535018 L6.46886252,14.8901187 C4.98902073,16.3699604 2.58972313,16.3699604 1.10988134,14.8901187 C-0.369960447,13.4102769 -0.369960447,11.0109793 1.10988134,9.53113748 L3.64649819,6.99452063 Z M6.99452063,3.64649819 L9.53113748,1.10988134 C11.0109793,-0.369960447 13.4102769,-0.369960447 14.8901187,1.10988134 C16.3699604,2.58972313 16.3699604,4.98902073 14.8901187,6.46886252 L12.3535018,9.00547937 C12.3380528,8.98913849 12.3223269,8.97296369 12.3063242,8.95696092 L11.6114792,8.26211594 L14.1977522,5.67584293 C15.2674159,4.60617918 15.2674159,2.87191157 14.1977522,1.80224782 C13.1280884,0.732584061 11.3938208,0.732584061 10.3241571,1.80224782 L7.73788406,4.38852082 L7.04303908,3.69367584 C7.02703631,3.67767307 7.01086151,3.66194719 6.99452063,3.64649819 Z\" id=\"\u5F62\u72B6\" fill=\"#293040\" fill-rule=\"nonzero\"></path>\n</g>\n</svg>";
18
+ export declare const CODE_ICON = "<svg viewBox=\"0 0 1024 1024\" width=\"16\" height=\"16\">\n<path d=\"M438.4 849.1l222.7-646.7c0.2-0.5 0.3-1.1 0.4-1.6L438.4 849.1z\" p-id=\"13752\"></path>\n<path d=\"M661.2 168.7h-67.5c-3.4 0-6.5 2.2-7.6 5.4L354.7 846c-0.3 0.8-0.4 1.7-0.4 2.6 0 4.4 3.6 8 8 8h67.8c3.4 0 6.5-2.2 7.6-5.4l0.7-2.1 223.1-648.3 7.4-21.4c0.3-0.8 0.4-1.7 0.4-2.6-0.1-4.5-3.6-8.1-8.1-8.1zM954.6 502.1c-0.8-1-1.7-1.9-2.7-2.7l-219-171.3c-3.5-2.7-8.5-2.1-11.2 1.4-1.1 1.4-1.7 3.1-1.7 4.9v81.3c0 2.5 1.1 4.8 3.1 6.3l115 90-115 90c-1.9 1.5-3.1 3.8-3.1 6.3v81.3c0 4.4 3.6 8 8 8 1.8 0 3.5-0.6 4.9-1.7l219-171.3c6.9-5.4 8.2-15.5 2.7-22.5zM291.1 328.1l-219 171.3c-1 0.8-1.9 1.7-2.7 2.7-5.4 7-4.2 17 2.7 22.5l219 171.3c1.4 1.1 3.1 1.7 4.9 1.7 4.4 0 8-3.6 8-8v-81.3c0-2.5-1.1-4.8-3.1-6.3l-115-90 115-90c1.9-1.5 3.1-3.8 3.1-6.3v-81.3c0-1.8-0.6-3.5-1.7-4.9-2.7-3.5-7.7-4.1-11.2-1.4z\" p-id=\"13753\"></path>\n</svg>";
19
+ export declare const H1_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M0,0 L16,0 L16,16 L0,16 L0,0 Z M1,1 L1,15 L15,15 L15,1 L1,1 Z M12,12 L13,12 L13,13 L10,13 L10,12 L11,12 L11,9 L10,9 L10,8 L12,8 L12,12 Z M3,3 L11,3 L11,4 L3,4 L3,3 Z\" id=\"\u5F62\u72B6\" fill=\"#293040\"></path>\n</g>\n</svg>";
20
+ export declare const H2_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M0,16 L0,0 L16,0 L16,16 L0,16 Z M15,1 L1,1 L1,15 L15,15 L15,1 Z M11,4 L3,4 L3,3 L11,3 L11,4 Z M13,8 L13,11 L10,11 L10,12 L13,12 L13,13 L9,13 L9,10 L12,10 L12,9 L9,9 L9,8 L13,8 Z\" id=\"\u5F62\u72B6\" fill=\"#293040\"></path>\n</g>\n</svg>";
21
+ export declare const FONT_SIZE_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\" >\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g fill=\"#293040\">\n <path d=\"M4,9 L4,16 L3,16 L3,9 L0,9 L0,8 L7,8 L7,9 L4,9 Z M11,1 L11,16 L10,16 L10,1 L5,1 L5,0 L16,0 L16,1 L11,1 Z\" id=\"\u5F62\u72B6\"></path>\n </g>\n</g>\n</svg>";
22
+ export declare const FULLSCREEN_EXPAND_ICON = "<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path d=\"M16,16 L11.429,16 L11.429,15 L14.456,15 L11.006,11.226 L11.652,10.519 L15.086,14.275 L15.086,11 L16,11 L16,16 Z M15.164,1.544 L12.009,4.994 L11.418,4.348 L14.558,0.914 L11.82,0.914 L11.82,0 L16,0 L16,4.571 L15.164,4.571 L15.164,1.544 Z M5,15 L5,16 L0,16 L0,11 L1,11 L1,14.275 L4.756,10.519 L5.463,11.226 L1.689,15 L5,15 Z M4.365,4.994 L0.914,1.544 L0.914,4.571 L3.41060513e-13,4.571 L3.41060513e-13,0 L4.571,0 L4.571,0.914 L1.578,0.914 L5.011,4.348 L4.365,4.994 Z\" id=\"\u5F62\u72B6\" fill=\"#293040\" fill-rule=\"nonzero\"></path>\n</g>\n</svg>";
23
+ export declare const FULLSCREEN_CONTRACT_ICON = "<svg class=\"icon\" viewBox=\"0 0 1024 1024\" width=\"16\" height=\"16\">\n<path fill=\"#293040\" d=\"M682.666667 384h192a21.333333 21.333333 0 0 0 21.333333-21.333333v-42.666667a21.333333 21.333333 0 0 0-21.333333-21.333333H725.333333V149.333333a21.333333 21.333333 0 0 0-21.333333-21.333333h-42.666667a21.333333 21.333333 0 0 0-21.333333 21.333333V341.333333a42.666667 42.666667 0 0 0 42.666667 42.666667zM384 341.333333V149.333333a21.333333 21.333333 0 0 0-21.333333-21.333333h-42.666667a21.333333 21.333333 0 0 0-21.333333 21.333333V298.666667H149.333333a21.333333 21.333333 0 0 0-21.333333 21.333333v42.666667a21.333333 21.333333 0 0 0 21.333333 21.333333H341.333333a42.666667 42.666667 0 0 0 42.666667-42.666667z m341.333333 533.333334V725.333333h149.333334a21.333333 21.333333 0 0 0 21.333333-21.333333v-42.666667a21.333333 21.333333 0 0 0-21.333333-21.333333H682.666667a42.666667 42.666667 0 0 0-42.666667 42.666667v192a21.333333 21.333333 0 0 0 21.333333 21.333333h42.666667a21.333333 21.333333 0 0 0 21.333333-21.333333z m-405.333333 21.333333h42.666667a21.333333 21.333333 0 0 0 21.333333-21.333333V682.666667a42.666667 42.666667 0 0 0-42.666667-42.666667H149.333333a21.333333 21.333333 0 0 0-21.333333 21.333333v42.666667a21.333333 21.333333 0 0 0 21.333333 21.333333H298.666667v149.333334a21.333333 21.333333 0 0 0 21.333333 21.333333z\" p-id=\"17085\"></path>\n</svg>";
@@ -0,0 +1,2 @@
1
+ export declare function mermaidRender(md: any, options?: {}): void;
2
+ export declare function refreshMermaid(delay?: number): void;
@@ -0,0 +1 @@
1
+ export default function (md: any, options: Record<string, any>): void;
@@ -0,0 +1,22 @@
1
+ export interface IToolbarItemConfig {
2
+ id: string;
3
+ name?: string;
4
+ exitName?: string;
5
+ type?: 'button' | 'dropDown';
6
+ icon?: string;
7
+ exitIcon?: string;
8
+ template?: any;
9
+ component?: any;
10
+ shortKey?: string;
11
+ params?: {
12
+ [key: string]: any;
13
+ };
14
+ handler?(editor?: any, params?: any): void;
15
+ }
16
+ export declare const DEFAULT_TOOLBARS: Record<string, IToolbarItemConfig>;
17
+ export declare const DEFAULT_TOOLBAR_CONFIG: (string | string[])[];
18
+ export declare const FONT_COLORS: string[];
19
+ export declare const FONT_SIZE_LIST: {
20
+ name: string;
21
+ value: number;
22
+ }[];
@@ -0,0 +1,2 @@
1
+ export declare function parseHTMLStringToDomList(html: string): NodeList | any[];
2
+ export declare function locale(key: string): string;
@@ -27,6 +27,10 @@ export declare const rowProps: {
27
27
  readonly type: PropType<boolean>;
28
28
  readonly default: false;
29
29
  };
30
+ readonly noOuter: {
31
+ readonly type: BooleanConstructor;
32
+ readonly default: true;
33
+ };
30
34
  };
31
35
  export declare type RowProps = ExtractPropTypes<typeof rowProps>;
32
36
  export declare const colPropsBaseStyle: {
@@ -17,6 +17,10 @@ declare const _default: import("vue").DefineComponent<{
17
17
  readonly type: import("vue").PropType<boolean>;
18
18
  readonly default: false;
19
19
  };
20
+ readonly noOuter: {
21
+ readonly type: BooleanConstructor;
22
+ readonly default: true;
23
+ };
20
24
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
21
25
  readonly align: {
22
26
  readonly type: import("vue").PropType<import("./grid-types").Align>;
@@ -34,10 +38,15 @@ declare const _default: import("vue").DefineComponent<{
34
38
  readonly type: import("vue").PropType<boolean>;
35
39
  readonly default: false;
36
40
  };
41
+ readonly noOuter: {
42
+ readonly type: BooleanConstructor;
43
+ readonly default: true;
44
+ };
37
45
  }>> & {}, {
38
46
  readonly wrap: boolean;
39
47
  readonly justify: import("./grid-types").Justify;
40
48
  readonly align: import("./grid-types").Align;
41
49
  readonly gutter: number | number[] | GutterScreenSizes;
50
+ readonly noOuter: boolean;
42
51
  }>;
43
52
  export default _default;
@@ -81,8 +81,8 @@ declare const _default: import("vue").DefineComponent<{
81
81
  readonly width: string;
82
82
  readonly multiple: boolean;
83
83
  readonly mode: import("./menu-types").menuMode;
84
- readonly openKeys: unknown[];
85
84
  readonly collapsed: boolean;
85
+ readonly openKeys: unknown[];
86
86
  readonly collapsedIndent: number;
87
87
  readonly indentSize: number;
88
88
  readonly defaultSelectKeys: unknown[];
@@ -1,7 +1,10 @@
1
1
  import type { App } from 'vue';
2
2
  import Modal from './src/modal';
3
+ import ModalHeader from './src/components/header';
4
+ import ModalBody from './src/components/body';
5
+ import ModalFooter from './src/components/footer';
3
6
  export * from './src/modal-types';
4
- export { Modal };
7
+ export { Modal, ModalHeader, ModalBody, ModalFooter };
5
8
  declare const _default: {
6
9
  title: string;
7
10
  category: string;
@@ -115,7 +115,7 @@ declare const _default: import("vue").DefineComponent<{
115
115
  mode: import("./nav-sprite-types").SpriteMode;
116
116
  isOpen: boolean;
117
117
  indent: number;
118
- hashSupport: boolean;
119
118
  maxLevel: number;
119
+ hashSupport: boolean;
120
120
  }>;
121
121
  export default _default;
@@ -1,7 +1,8 @@
1
1
  import type { App } from 'vue';
2
2
  import Splitter from './src/splitter';
3
+ import SplitterPane from './src/components/splitter-pane';
3
4
  export * from './src/splitter-types';
4
- export { Splitter };
5
+ export { Splitter, SplitterPane };
5
6
  declare const _default: {
6
7
  title: string;
7
8
  category: string;
@@ -1,7 +1,8 @@
1
1
  import type { App } from 'vue';
2
2
  import Upload from './src/upload';
3
+ import fileDropDirective from './src/file-drop-directive';
3
4
  export * from './src/upload-types';
4
- export { Upload };
5
+ export { Upload, fileDropDirective };
5
6
  declare const _default: {
6
7
  title: string;
7
8
  category: string;
@@ -1,5 +1,6 @@
1
1
  import type { App } from 'vue';
2
2
  import { Accordion } from './accordion';
3
+ import { ActionTimeline } from './action-timeline';
3
4
  import { Alert } from './alert';
4
5
  import { Anchor } from './anchor';
5
6
  import { AutoComplete } from './auto-complete';
@@ -13,6 +14,7 @@ import { Carousel, CarouselItem } from './carousel';
13
14
  import { Cascader } from './cascader';
14
15
  import { Checkbox, CheckboxGroup, CheckboxButton } from './checkbox';
15
16
  import { CodeEditor } from './code-editor';
17
+ import { CodeReview } from './code-review';
16
18
  import { Collapse, CollapseItem } from './collapse';
17
19
  import { ColorPicker } from './color-picker';
18
20
  import { Comment } from './comment';
@@ -23,6 +25,7 @@ import { DraggableDirective, DroppableDirective, SortableDirective } from './dra
23
25
  import { Drawer, DrawerService } from './drawer';
24
26
  import { Dropdown, DropdownMenu } from './dropdown';
25
27
  import { EditableSelect } from './editable-select';
28
+ import { EditorMd, MdRender } from './editor-md';
26
29
  import { Form, FormItem, FormOperation } from './form';
27
30
  import { Fullscreen } from './fullscreen';
28
31
  import { Gantt } from './gantt';
@@ -38,7 +41,7 @@ import { LoadingService, LoadingDirective } from './loading';
38
41
  import { Mention } from './mention';
39
42
  import { Menu, SubMenu, MenuItem } from './menu';
40
43
  import { Message } from './message';
41
- import { Modal } from './modal';
44
+ import { Modal, ModalHeader, ModalBody, ModalFooter } from './modal';
42
45
  import { MultiAutoComplete } from './multi-auto-complete';
43
46
  import { NavSprite } from './nav-sprite';
44
47
  import { Notification, NotificationService } from './notification';
@@ -57,7 +60,7 @@ import { Search } from './search';
57
60
  import { Select, Option, OptionGroup } from './select';
58
61
  import { Skeleton, SkeletonItem } from './skeleton';
59
62
  import { Slider } from './slider';
60
- import { Splitter } from './splitter';
63
+ import { Splitter, SplitterPane } from './splitter';
61
64
  import { Statistic } from './statistic';
62
65
  import { Status } from './status';
63
66
  import { Steps, Step } from './steps';
@@ -76,10 +79,10 @@ import { Tooltip } from './tooltip';
76
79
  import { Transfer } from './transfer';
77
80
  import { Tree } from './tree';
78
81
  import { TreeSelect } from './tree-select';
79
- import { Upload } from './upload';
82
+ import { Upload, fileDropDirective } from './upload';
80
83
  import { VirtualList } from './virtual-list';
81
84
  import './style/devui.scss';
82
- export { Accordion, Alert, Anchor, AutoComplete, Avatar, BackTop, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonGroup, Card, Carousel, CarouselItem, Cascader, Checkbox, CheckboxGroup, CheckboxButton, CodeEditor, Collapse, CollapseItem, ColorPicker, Comment, Countdown, DatePicker, StickSlider, DatePickerPro, DRangeDatePickerPro, DraggableDirective, DroppableDirective, SortableDirective, Drawer, DrawerService, Dropdown, DropdownMenu, EditableSelect, Form, FormItem, FormOperation, Fullscreen, Gantt, Row, Col, Icon, IconGroup, ImagePreviewDirective, ImagePreviewService, Input, InputIcon, InputNumber, Layout, Content, Header, Footer, Aside, List, ListItem, LoadingService, LoadingDirective, Mention, Menu, SubMenu, MenuItem, Message, Modal, MultiAutoComplete, NavSprite, Notification, NotificationService, FlexibleOverlay, FixedOverlay, Pagination, Panel, PanelHeader, PanelBody, PanelFooter, Popover, Progress, QuadrantDiagram, Radio, RadioGroup, RadioButton, Rate, ReadTip, Result, RippleDirective, Search, Select, Option, OptionGroup, Skeleton, SkeletonItem, Slider, Splitter, Statistic, Status, Steps, Step, StepsGuide, StepsGuideDirective, Sticky, Switch, Table, Column, Tabs, Tab, Tag, TagInput, Textarea, TimePicker, TimeSelect, Timeline, TimelineItem, Tooltip, Transfer, Tree, TreeSelect, Upload, VirtualList };
85
+ export { Accordion, ActionTimeline, Alert, Anchor, AutoComplete, Avatar, BackTop, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonGroup, Card, Carousel, CarouselItem, Cascader, Checkbox, CheckboxGroup, CheckboxButton, CodeEditor, CodeReview, Collapse, CollapseItem, ColorPicker, Comment, Countdown, DatePicker, StickSlider, DatePickerPro, DRangeDatePickerPro, DraggableDirective, DroppableDirective, SortableDirective, Drawer, DrawerService, Dropdown, DropdownMenu, EditableSelect, EditorMd, MdRender, Form, FormItem, FormOperation, Fullscreen, Gantt, Row, Col, Icon, IconGroup, ImagePreviewDirective, ImagePreviewService, Input, InputIcon, InputNumber, Layout, Content, Header, Footer, Aside, List, ListItem, LoadingService, LoadingDirective, Mention, Menu, SubMenu, MenuItem, Message, Modal, ModalHeader, ModalBody, ModalFooter, MultiAutoComplete, NavSprite, Notification, NotificationService, FlexibleOverlay, FixedOverlay, Pagination, Panel, PanelHeader, PanelBody, PanelFooter, Popover, Progress, QuadrantDiagram, Radio, RadioGroup, RadioButton, Rate, ReadTip, Result, RippleDirective, Search, Select, Option, OptionGroup, Skeleton, SkeletonItem, Slider, Splitter, SplitterPane, Statistic, Status, Steps, Step, StepsGuide, StepsGuideDirective, Sticky, Switch, Table, Column, Tabs, Tab, Tag, TagInput, Textarea, TimePicker, TimeSelect, Timeline, TimelineItem, Tooltip, Transfer, Tree, TreeSelect, Upload, fileDropDirective, VirtualList };
83
86
  declare const _default: {
84
87
  version: string;
85
88
  install(app: App): void;
@@ -1436,4 +1436,4 @@ var index = {
1436
1436
  app.component(Upload.name, Upload);
1437
1437
  }
1438
1438
  };
1439
- export { IFileOptions, IUploadOptions, Upload, UploadStatus, index as default, uploadProps };
1439
+ export { IFileOptions, IUploadOptions, Upload, UploadStatus, index as default, fileDropDirective, uploadProps };
@@ -1 +1 @@
1
- var at=Object.defineProperty,it=Object.defineProperties;var rt=Object.getOwnPropertyDescriptors;var se=Object.getOwnPropertySymbols;var ut=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable;var Z=(y,t,b)=>t in y?at(y,t,{enumerable:!0,configurable:!0,writable:!0,value:b}):y[t]=b,W=(y,t)=>{for(var b in t||(t={}))ut.call(t,b)&&Z(y,b,t[b]);if(se)for(var b of se(t))ct.call(t,b)&&Z(y,b,t[b]);return y},ae=(y,t)=>it(y,rt(t));var D=(y,t,b)=>(Z(y,typeof t!="symbol"?t+"":t,b),b);(function(y,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(y=typeof globalThis!="undefined"?globalThis:y||self,t(y.index={},y.Vue))})(this,function(y,t){"use strict";const b={modelValue:{type:Boolean,default:!1},title:{type:String,default:""},type:{type:String,default:"normal"},duration:{type:Number,default:3e3},onClose:{type:Function}},ie={name:{type:String,default:"",required:!0},size:{type:[Number,String],default:"inherit"},color:{type:String,default:"inherit"},component:{type:Object,default:null},classPrefix:{type:String,default:"icon"},operable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},rotate:{type:[Number,String]}},re={name:{type:String,default:"",required:!0},color:{type:String,default:"inherit"},size:{type:[Number,String],default:"inherit"}};function L(e,n,o){let l=e;return n&&(l+=`__${n}`),o&&(l+=`--${o}`),l}function x(e,n=!1){const o=n?`.devui-${e}`:`devui-${e}`;return{b:()=>L(o),e:a=>a?L(o,a):"",m:a=>a?L(o,"",a):"",em:(a,p)=>a&&p?L(o,a,p):""}}var pt="",ue=t.defineComponent({name:"DSvgIcon",props:re,setup(e){const{name:n,color:o,size:l}=t.toRefs(e),s=x("svg-icon"),r=t.computed(()=>`#icon-${n.value}`),f=t.computed(()=>typeof l.value=="number"?`${l.value}px`:l.value),a={width:f.value,height:f.value};return()=>t.createVNode("svg",{class:s.b(),style:a},[t.createVNode("use",{"xlink:href":r.value,fill:o.value},null)])}});function ce(e){return/^((http|https):)?\/\//.test(e)}function de(e,n){const{component:o,name:l,size:s,color:r,classPrefix:f,rotate:a}=t.toRefs(e),p=x("icon"),V=t.computed(()=>typeof s.value=="number"?`${s.value}px`:s.value),m=o.value?t.resolveDynamicComponent(o.value):t.resolveDynamicComponent(ue),u=()=>t.createVNode("img",t.mergeProps({src:l.value,alt:l.value.split("/")[l.value.split("/").length-1],class:[(a==null?void 0:a.value)==="infinite"&&p.m("spin")],style:{width:V.value||"",transform:`rotate(${a==null?void 0:a.value}deg)`,verticalAlign:"middle"}},n.attrs),null),E=()=>t.createVNode(m,t.mergeProps({name:l.value,color:r.value,size:V.value,class:[(a==null?void 0:a.value)==="infinite"&&p.m("spin")],style:{transform:`rotate(${a==null?void 0:a.value}deg)`}},n.attrs),null),i=()=>{const c=/^icon-/.test(l.value)?l.value:`${f.value}-${l.value}`;return t.createVNode("i",t.mergeProps({class:[f.value,c,(a==null?void 0:a.value)==="infinite"&&p.m("spin")],style:{fontSize:V.value,color:r.value,transform:`rotate(${a==null?void 0:a.value}deg)`}},n.attrs),null)};return{iconDom:()=>o.value?E():ce(l.value)?u():i()}}var pe=t.defineComponent({name:"DIcon",props:ie,emits:["click"],setup(e,n){const{disabled:o,operable:l}=t.toRefs(e),{iconDom:s}=de(e,n),r=x("icon"),f=t.computed(()=>({[r.e("container")]:!0,[r.m("disabled")]:o.value,[r.m("operable")]:l.value,[r.m("no-slots")]:!Object.keys(n.slots).length})),a=p=>{o.value||n.emit("click",p)};return()=>{var p,V,m,u;return t.createVNode("div",{class:f.value,onClick:a},[(V=(p=n.slots).prefix)==null?void 0:V.call(p),s(),(u=(m=n.slots).suffix)==null?void 0:u.call(m)])}}}),ft="";t.defineComponent({name:"DIconGroup",setup(e,n){const o=x("icon-group");return()=>{var l,s;return t.createVNode("div",{class:o.b()},[(s=(l=n.slots).default)==null?void 0:s.call(l)])}}});var fe=t.defineComponent({emits:["click"],setup(e,{emit:n}){const o=x("notification");return()=>t.createVNode("div",{class:o.e("icon-close"),onClick:l=>n("click",l)},[t.createVNode(pe,{name:"close",size:"14px"},null)])}});const T=x("notification"),M={"xmlns:xlink":"http://www.w3.org/1999/xlink"},I={"xlink:href":"#path-s"};function me(){return t.createVNode("svg",t.mergeProps({width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},M),[t.createVNode("defs",null,[t.createVNode("polygon",{id:"path-s",points:"6.53553391 9.77817459 12.1923882 4.12132034 13.6066017 5.53553391 6.53553391 12.6066017 3 9.07106781 4.41421356 7.65685425 6.53553391 9.77817459"},null)]),t.createVNode("g",{id:"correct",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createVNode("mask",{id:"mask-2",fill:"white"},[t.createVNode("use",I,null)]),t.createVNode("use",t.mergeProps({id:"Mask",class:T.e("image-success-path")},I),null)])])}function he(){return t.createVNode("svg",t.mergeProps({width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},M),[t.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createVNode("path",{class:T.e("warning-outer"),d:"M8.96244623,0.57254229 L15.8714442,13.4101975 C16.1549662,13.9370117 15.9538562,14.5918482 15.4222523,14.8728158 C15.2642579,14.9563203 15.0879506, 15 14.9088903,15 L1.09089441,15 C0.488410063,15 0,14.5159904 0,13.9189343 C0,13.7414873 0.0440768395,13.5667684 0.128340519,13.4101975 L7.03733844,0.57254229 C7.32086049, 0.0457280838 7.98165058,-0.153569987 8.51325441,0.127397589 C8.70423071, 0.228333932 8.8605922,0.383286648 8.96244623,0.57254229 Z"},null),t.createVNode("path",{class:T.e("warning-inner"),"stroke-width":"0.3","fill-rule":"nonzero",d:"M8.87894737,13 L7.08947368,13 L7.08947368,11.2105263 L8.87894737,11.2105263 L8.87894737,13 Z M8.62102372,9.86842105 L7.32800539,9.86842105 L7,4.5 L8.96842105,4.5 L8.62102372,9.86842105 Z"},null)])])}function ge(){return t.createVNode("svg",t.mergeProps({width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},M),[t.createVNode("g",{id:"info",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createVNode("path",{class:T.e("image-info-path"),d:"M7,13 L7,6 L9,6 L9,13 L7,13 Z M7,5 L7,3 L9,3 L9,5 L7,5 Z",id:"info"},null)])])}function Fe(){return t.createVNode("svg",t.mergeProps({width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},M),[t.createVNode("defs",null,[t.createVNode("polygon",{id:"path-e",points:"8.07106781 6.65685425 10.8994949 3.82842712 12.3137085 5.24264069 9.48528137 8.07106781 12.3137085 10.8994949 10.8994949 12.3137085 8.07106781 9.48528137 5.24264069 12.3137085 3.82842712 10.8994949 6.65685425 8.07106781 3.82842712 5.24264069 5.24264069 3.82842712"},null)]),t.createVNode("g",{id:"error",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createVNode("mask",{id:"mask-2",fill:"white"},[t.createVNode("use",I,null)]),t.createVNode("use",t.mergeProps({id:"Mask",class:T.e("image-error-path")},I),null)])])}var ye=t.defineComponent({props:{type:{type:String,default:"normal"}},setup(e){const{type:n}=t.toRefs(e),o=x("notification"),l=t.computed(()=>({[o.e("image")]:!0,[o.em("image",n.value)]:!0}));return()=>t.createVNode("span",{class:l.value},[n.value&&n.value!=="normal"&&(n.value==="success"&&t.createVNode(me,null,null)||n.value==="info"&&t.createVNode(ge,null,null)||n.value==="warning"&&t.createVNode(he,null,null)||n.value==="error"&&t.createVNode(Fe,null,null))])}});function Ee(e){return{classes:t.computed(()=>({"devui-notification-item-container":!0,[`devui-notification-message-${e.type}`]:!0}))}}function ve(e,n){let o=null,l;const s=()=>{var p;o&&clearTimeout(o),o=null,(p=e.onClose)==null||p.call(e),n("update:modelValue",!1)},r=()=>{o&&e.duration&&(clearTimeout(o),o=null)},f=()=>{if(e.modelValue&&e.duration){const p=e.duration-(Date.now()-l);o=setTimeout(s,p)}},a=()=>{n("destroy")};return t.watch(()=>e.modelValue,p=>{p&&(l=Date.now(),e.duration&&(o=setTimeout(s,e.duration)))}),{interrupt:r,removeReset:f,close:s,handleDestroy:a}}var mt="",Ne=t.defineComponent({name:"DNotification",props:b,emits:["update:modelValue","destroy"],setup(e,{emit:n,slots:o}){const{modelValue:l,title:s,type:r}=t.toRefs(e),{classes:f}=Ee(e),{interrupt:a,removeReset:p,close:V,handleDestroy:m}=ve(e,n),u=x("notification");return()=>t.createVNode(t.Transition,{name:"notification-fade",onAfterLeave:m},{default:()=>{var E;return[l.value&&t.createVNode("div",{class:u.b(),onClick:t.withModifiers(()=>({}),["stop"]),onPointerup:t.withModifiers(()=>({}),["stop"])},[t.createVNode("div",{class:f.value,onMouseenter:a,onMouseleave:p},[t.createVNode("div",{class:u.e("item")},[t.createVNode(fe,{onClick:V},null),s.value&&t.createVNode(ye,{type:r.value},null),t.createVNode("div",{class:u.e("message")},[t.createVNode("span",{class:u.e("title")},[s.value]),t.createVNode("span",{class:u.e("content")},[(E=o.default)==null?void 0:E.call(o)])])])])])]}})}});function we(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!t.isVNode(e)}const Ce={modelValue:!1,duration:3e3,type:"normal"};function De(e,n){const o=document.createElement("div");o.classList.add("notification__warpper");const l=document.body.lastElementChild;let s=50;if(l==null?void 0:l.classList.contains("notification__warpper")){const a=l.lastElementChild.getBoundingClientRect(),p=a.height,V=a.top;s=p+V}const r=t.createApp({setup(){return t.onUnmounted(()=>{document.body.removeChild(o)}),()=>t.createVNode(Ne,t.mergeProps(e,{onDestroy:r.unmount,style:[`top: ${s}px`]}),we(n)?n:{default:()=>[n]})}});return document.body.appendChild(o),r.mount(o),r}function Ve(e,n){e.modelValue=!1,n==null||n()}class ke{static open(n){const o=n.onClose||null,l=n.content;delete n.content;const s=t.reactive(ae(W(W({},Ce),n),{onClose:()=>{Ve(s,o)}}));De(s,l),s.modelValue=!0}}class be{constructor(){D(this,"uri");D(this,"method");D(this,"maximumSize");D(this,"headers");D(this,"authToken");D(this,"authTokenHeader");D(this,"additionalParameter");D(this,"fileFieldName");D(this,"checkSameName");D(this,"withCredentials");D(this,"responseType")}}class xe{constructor(){D(this,"accept");D(this,"multiple");D(this,"webkitdirectory")}}var N=(e=>(e[e.preLoad=0]="preLoad",e[e.uploading=1]="uploading",e[e.uploaded=2]="uploaded",e[e.failed=3]="failed",e))(N||{});const K={accept:{type:String},webkitdirectory:{type:Boolean,default:!1},uploadOptions:{type:Object},multiple:{type:Boolean,default:!1},autoUpload:{type:Boolean,default:!0},placeholder:{type:String,default:""},modelValue:{type:Array,default:()=>[]},droppable:{type:Boolean,default:!1},beforeUpload:{type:Function},dynamicUploadOptionsFn:{type:Function},disabled:{type:Boolean,default:!1},onChange:{type:Function},fileDrop:{type:Function,default:void 0},fileOver:{type:Function,default:void 0},fileSelect:{type:Function,default:void 0},deleteUploadedFile:{type:Function,default:void 0},onError:{type:Function,default:void 0},onSuccess:{type:Function,default:void 0},onExceed:{type:Function,default:void 0},onProgress:{type:Function,default:void 0},onPreview:{type:Function,default:void 0},oneTimeUpload:{type:Boolean,default:!1},limit:{type:Number,default:0},httpRequest:{type:Function,default:void 0}},Ae=e=>{const n=t.ref(""),o=m=>{const u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null),m.dispatchEvent(u)},l=({multiple:m,accept:u,webkitdirectory:E})=>new Promise(i=>{const h=document.getElementById("d-upload-temp");h&&document.body.removeChild(h);const c=document.createElement("input");c.style.position="fixed",c.style.left="-2000px",c.style.top="-2000px",c.setAttribute("id","d-upload-temp"),c.setAttribute("type","file"),m&&c.setAttribute("multiple",""),u&&c.setAttribute("accept",u),E&&c.setAttribute("webkitdirectory",""),c.addEventListener("change",w=>{i(Array.prototype.slice.call(w.target.files))}),document.body.appendChild(c),o(c)}),s=(m,u)=>{if(m){const E=m.split(","),i=u.type.replace(/\/.*$/,"");return E.some(h=>{const c=h.trim();return c.startsWith(".")?u.name.toLowerCase().indexOf(c.toLowerCase(),u.name.toLowerCase().length-c.toLowerCase().length)>-1:/\/\*$/.test(c)?i===c.replace(/\/.*$/,""):u.type===c})}return!0},r=(m,u)=>u?m>1024*1024*u:!1;return{triggerSelectFiles:m=>{const{multiple:u,accept:E,webkitdirectory:i}=m;return l({multiple:u,accept:E,webkitdirectory:i})},_validateFiles:(m,u,E)=>s(u,m)?E&&r(m.size,E.maximumSize)?{checkError:!0,errorMsg:e("getBeyondMaximalFileSizeMsg")(m.name,E.maximumSize||0)}:{checkError:!1,errorMsg:void 0}:{checkError:!0,errorMsg:e("getNotAllowedFileTypeMsg")(m.name,u)},triggerDropFiles:m=>Promise.resolve(m),checkAllFilesSize:(m,u)=>{if(r(m,u))return n.value=e("getAllFilesBeyondMaximalFileSizeMsg")(u),{checkError:!0,errorMsg:n.value}}}};class Y{constructor(n,o){D(this,"xhr");D(this,"status");D(this,"response");D(this,"percentage",0);this.file=n,this.uploadOptions=o,this.file=n,this.uploadOptions=o,this.status=N.preLoad}send(n){return new Promise((o,l)=>{const{uri:s,method:r,headers:f,authToken:a,authTokenHeader:p,additionalParameter:V,fileFieldName:m,withCredentials:u,responseType:E}=this.uploadOptions||{},i=p||"Authorization",h=m||"file";this.xhr=new XMLHttpRequest,this.xhr.open(r||"POST",s||""),u&&(this.xhr.withCredentials=u),E&&(this.xhr.responseType=E),a&&this.xhr.setRequestHeader(i,a),f&&Object.keys(f).forEach(w=>{var v;(v=this.xhr)==null||v.setRequestHeader(w,f[w])}),this.xhr.upload.onprogress=w=>{this.percentage=Math.round(w.loaded*100/w.total)};const c=n&&n.length?this.oneTimeUploadFiles(h,V,n):this.parallelUploadFiles(h,V);this.xhr.send(c),this.status=N.uploading,this.xhr.onabort=()=>{this.status=N.preLoad,this.xhr=null},this.xhr.onerror=()=>{var w,v;this.response=(w=this.xhr)==null?void 0:w.response,this.status=N.failed,l({file:this.file,response:(v=this.xhr)==null?void 0:v.response})},this.xhr.onload=()=>{var w,v,A;((w=this.xhr)==null?void 0:w.readyState)===4&&this.xhr.status>=200&&this.xhr.status<300?(this.response=this.xhr.response,this.status=N.uploaded,o({file:this.file,response:this.xhr.response})):(this.response=(v=this.xhr)==null?void 0:v.response,this.status=N.failed,l({file:this.file,response:(A=this.xhr)==null?void 0:A.response}))}})}parallelUploadFiles(n,o){const l=new FormData;return l.append(n,this.file,this.file.name),o&&Object.keys(o).forEach(s=>{l.append(s,o[s])}),l}oneTimeUploadFiles(n,o,l){const s=new FormData;return l.forEach(r=>{s.append(n,r.file,r.file.name),o&&Object.keys(o).forEach(f=>{s.append(f,o[f])})}),s}cancel(){this.xhr&&this.xhr.abort()}}const Se=()=>{const e=t.ref([]),n=t.ref([]),o=i=>{let h=!0;for(let c=0;c<e.value.length;c++)if(i===e.value[c].file.name){h=!1,n.value.indexOf(i)===-1&&n.value.push(i);break}return h},l=(i,h)=>{h&&h.checkSameName?o(i.name)&&e.value.push(new Y(i,h)):e.value.push(new Y(i,h))},s=()=>e.value.map(i=>i.file),r=()=>e.value.map(i=>i),f=async i=>{if(!i||!i.length)return Promise.reject("no files");let h=[];return await i[0].send(i).finally(()=>h=i.map(c=>(c.status=i[0].status,c.percentage=i[0].percentage,{file:c.file,response:i[0].response}))),h};return{fileUploaders:e,getFiles:s,addFile:l,getFullFiles:r,deleteFile:i=>{const h=e.value.find(c=>c.file===i);h==null||h.cancel(),e.value=e.value.filter(c=>i!==c.file)},upload:async i=>{let h=[];if(i){i.percentage=0;const c=await i.send();h.push(c)}else{const c=e.value.filter(A=>A.status===N.preLoad),w=e.value.filter(A=>A.status===N.failed),v=c.length>0?c:w;h=await Promise.all(v.map(async A=>(A.percentage=0,await A.send())))}return h.length>0?Promise.resolve(h):Promise.reject("no files")},removeFiles:()=>{e.value=[],n.value=[]},getSameNameFiles:()=>n.value.join(),resetSameNameFiles:()=>{n.value=[]},_oneTimeUpload:()=>{const i=e.value.filter(h=>h.status!==N.uploaded);return f(i)}}};var ht="";function U(...e){const n=o=>o&&typeof o=="object";return e.reduce((o,l)=>(Object.keys(l).forEach(s=>{const r=o[s],f=l[s];Array.isArray(r)&&Array.isArray(f)?o[s]=Array.from(new Set([...f,...r])):n(r)&&n(f)?o[s]=U(r,f):o[s]=f}),o),{})}var Be={pagination:{totalItemText:"\u6240\u6709\u6761\u76EE",goToText:"\u8DF3\u81F3",perPage:"\u6761/\u9875"},accordion:{loading:"\u52A0\u8F7D\u4E2D",noData:"\u6CA1\u6709\u6570\u636E"},autoCompleteDropdown:{latestInput:"\u6700\u8FD1\u8F93\u5165"},cascaderList:{noData:"\u6CA1\u6709\u6570\u636E"},colorPicker:{foundationPanel:"\u57FA\u7840\u9762\u677F",advancedPanel:"\u9AD8\u7EA7\u9762\u677F"},datePickerPro:{ok:"\u786E\u5B9A",placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",month1:"1\u6708",month2:"2\u6708",month3:"3\u6708",month4:"4\u6708",month5:"5\u6708",month6:"6\u6708",month7:"7\u6708",month8:"8\u6708",month9:"9\u6708",month10:"10\u6708",month11:"11\u6708",month12:"12\u6708",year:"\u5E74",startPlaceholder:"\u8BF7\u9009\u62E9\u5F00\u59CB\u65E5\u671F",endPlaceholder:"\u8BF7\u9009\u62E9\u7ED3\u675F\u65E5\u671F",getWeekDays(){return["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},getTimeArr(){return["\u65F6","\u5206","\u79D2"]},getYearMonthStr(e,n){return`${e}\u5E74${n}\u6708`}},editableSelect:{noRelatedRecords:"\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",noData:"\u6CA1\u6709\u6570\u636E"},input:{placeholder:"\u8BF7\u8F93\u5165"},splitterBar:{collapse:"\u6536\u8D77",expand:"\u5C55\u5F00"},stepsGuide:{previous:"\u4E0A\u4E00\u6B65",continue:"\u6211\u77E5\u9053\u5566\uFF0C\u7EE7\u7EED",ok:"\u6211\u77E5\u9053\u5566"},table:{selectAll:"\u5168\u9009",ok:"\u786E\u5B9A"},timePopup:{ok:"\u786E\u5B9A"},transfer:{unit:"\u9879",panelUnit:"\u9879",headerUnit:"\u9879",noData:"\u6682\u65E0\u6570\u636E",placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22"},tree:{loading:"\u52A0\u8F7D\u4E2D",newNode:"\u65B0\u8282\u70B9",selectPlaceholder:"\u8BF7\u9009\u62E9"},upload:{placeholder:"\u9009\u62E9\u6587\u4EF6",getExistSameNameFilesMsg(e){return`\u60A8\u4E0A\u4F20\u7684 "${e}" \u5B58\u5728\u91CD\u540D\u6587\u4EF6, \u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`},getAllFilesBeyondMaximalFileSizeMsg(e){return`\u6700\u5927\u652F\u6301\u4E0A\u4F20${e}MB\u7684\u6587\u4EF6, \u60A8\u672C\u6B21\u4E0A\u4F20\u7684\u6240\u6709\u6587\u4EF6\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`},getBeyondMaximalFileSizeMsg(e,n){return`\u6700\u5927\u652F\u6301\u4E0A\u4F20${n}MB\u7684\u6587\u4EF6, \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${e}"\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`},getNotAllowedFileTypeMsg(e,n){return`\u652F\u6301\u7684\u6587\u4EF6\u7C7B\u578B: "${n}", \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${e}"\u4E0D\u5728\u5141\u8BB8\u8303\u56F4\u5185\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`}},search:{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57"},select:{placeholder:"\u8BF7\u9009\u62E9",noDataText:"\u65E0\u6570\u636E",noMatchText:"\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",loadingText:"\u52A0\u8F7D\u4E2D..."},tagInput:{maxTagsText:"\u5DF2\u8FBE\u5230\u6700\u5927\u4E2A\u6570\uFF1A"},timeSelect:{placeholder:"\u8BF7\u9009\u62E9\u65F6\u95F4"}};const z=t.ref("zh-CN");let O=t.reactive({[z.value]:Be});const Pe={messages(){return O[z.value]},lang(){return z.value},use(e,n){z.value=e,this.add({[e]:n})},add(e={}){O=U(O,e)}},Te=e=>e.substring(1).replace(/^\S/,n=>n.toLocaleLowerCase());function J(e,n){const o=n.split(".");let l=e;return o.forEach(s=>{var r;l=(r=l[s])!=null?r:""}),l}function Le(e,n,o){const l=o||Te(e)+".";return s=>{var a;const r=((a=n==null?void 0:n.appContext.config.globalProperties.langMessages)==null?void 0:a.value)||Pe.messages();return J(r,l+s)||J(r,s)}}var $=t.defineComponent({name:"DUpload",props:K,emits:["fileDrop","fileOver","fileSelect","deleteUploadedFile","update:modelValue"],setup(e,n){const o=t.getCurrentInstance(),l=Le("DUpload",o),{uploadOptions:s,placeholder:r,autoUpload:f,disabled:a,beforeUpload:p,droppable:V,oneTimeUpload:m,modelValue:u,multiple:E,accept:i,webkitdirectory:h,limit:c,httpRequest:w}=t.toRefs(e),v=x("upload"),A=x("input-group"),j=x("form-control"),Re=x("input-group-addon"),{triggerSelectFiles:je,_validateFiles:He,triggerDropFiles:qe,checkAllFilesSize:Ge}=Ae(l),{fileUploaders:S,addFile:Xe,getFullFiles:Ze,deleteFile:ee,upload:We,resetSameNameFiles:Ke,removeFiles:H,_oneTimeUpload:Ye,getSameNameFiles:Ue}=Se(),q=t.ref(!1),G=t.ref([]),_=d=>{ke.open({type:"warning",content:d})},Je=()=>{var g;let d=0;if(S.value.forEach(C=>{d+=C.file.size;const k=He(C.file,(i==null?void 0:i.value)||"",C.uploadOptions);if(k&&k.checkError){ee(C.file),_(k.errorMsg);return}}),m.value){const C=Ge(d,((g=s==null?void 0:s.value)==null?void 0:g.maximumSize)||0);C&&C.checkError&&(H(),_(C.errorMsg))}},Qe=d=>{q.value=d,n.emit("fileOver",d)},te=d=>{const g=u.value.filter(C=>C.name!==d.name);n.emit("deleteUploadedFile",d),n.emit("update:modelValue",g)},ne=(d,g,C)=>{d==null||d.stopPropagation(),C===N.uploaded&&te(g),ee(g)},et=()=>{let d=Promise.resolve(!0);if(p==null?void 0:p.value){const g=p==null?void 0:p.value(Ze());typeof g!="undefined"&&(typeof g=="boolean"?d=Promise.resolve(g):d=g)}return d},X=(d,g)=>{d&&d.stopPropagation(),et().then(C=>{if(!C){H();return}if(typeof(w==null?void 0:w.value)=="function"){const F=S.value.map(B=>B.file);w.value(F);return}const k=m.value?Ye():We(g);e.onProgress&&e.onProgress(G.value,u.value),k==null||k.then(F=>{e.onSuccess&&e.onSuccess(F);const B=F.map(st=>st.file),P=[...B,...u.value];n.emit("update:modelValue",P),e.onChange&&e.onChange(B,P)}).catch(F=>{e.onError&&e.onError(F),e.onChange&&e.onChange([F.file],u.value)})})},oe=d=>{Ke(),d.then(g=>{if(c.value&&u.value.length+g.length>c.value){e.onExceed&&e.onExceed(g,u.value);return}e.onChange&&e.onChange(g,u.value),g.forEach(k=>{E.value||H(),Xe(k,s==null?void 0:s.value)}),Je();const C=Ue();(s==null?void 0:s.value)&&s.value.checkSameName&&C.length&&_(l("getExistSameNameFilesMsg")(C)),G.value=S.value.filter(k=>k.status===N.preLoad).map(k=>k.file),n.emit("fileSelect",G.value),f.value&&X()}).catch(g=>{_(g.message)})},le=()=>{a.value||oe(je({accept:i==null?void 0:i.value,multiple:E.value,webkitdirectory:h.value}))},tt=d=>{q.value=!1,oe(qe(d)),n.emit("fileDrop",d)},nt=(d,g)=>{X(d,g)},ot=d=>{S.value.forEach(g=>{ne(d,g.file,g.status)})},lt=(d,g)=>{d==null||d.stopPropagation(),e.onPreview&&e.onPreview(g)};return n.expose({submit:nt,clearFiles:ot}),()=>{var d,g,C,k;return t.createVNode("div",null,[t.withDirectives(t.createVNode("div",{class:v.b(),style:`border: ${q.value?"1px solid #15bf15":"0"}`},[((g=(d=n.slots).default)==null?void 0:g.call(d))?t.createVNode("div",{onClick:le},[n.slots.default()]):t.createVNode("div",{class:[A.b(),a.value?"disabled":""],onClick:le},[S.value.length===0&&t.createVNode("div",{class:[j.b(),v.e("placeholder")]},[r.value||l("placeholder")]),S.value.length>0&&t.createVNode("ul",{class:[j.b(),v.e("files-list")]},[S.value.map((F,B)=>t.createVNode("li",{key:B,class:[v.e("file-item"),v.e("file-tag")],style:"display: inline-block;",title:F.file.name,onClick:P=>lt(P,F.file)},[t.createVNode("span",{class:[v.e("filename"),F.status===N.failed?v.m("failed-color"):""]},[F.file.name]),t.createVNode(t.resolveComponent("d-icon"),{name:"close",class:[(F==null?void 0:F.status)===N.failed?v.e("delete-file-button"):"",(F==null?void 0:F.status)===N.uploading||(F==null?void 0:F.status)===N.uploaded?v.e("delete"):""],onClick:P=>ne(P,F.file,F.status)},null),F.status===N.uploading&&t.createVNode("div",{class:["icon",v.e("progress")]},[t.createVNode(t.resolveComponent("d-progress"),{isCircle:!0,percentage:F.percentage,barbgcolor:"#50D4AB",strokeWidth:8,showContent:!1},null)]),F.status===N.failed&&t.createVNode(t.resolveComponent("d-icon"),{name:"running",onClick:X},null),F.status===N.uploaded&&t.createVNode(t.resolveComponent("d-icon"),{name:"right",color:"#50d4ab"},null)]))]),t.createVNode("span",{class:Re.b()},[t.createVNode(t.resolveComponent("d-icon"),{name:"more-operate",color:"#252b3a"},null)])])]),[[t.resolveDirective("file-drop"),{droppable:V,isSingle:!E,onFileDrop:tt,onFileOver:Qe}]]),t.createVNode("div",null,[(k=(C=n.slots)["uploaded-files"])==null?void 0:k.call(C,{uploadedFiles:u.value,deleteFile:te})])])}}});const Q=e=>{var n;return e.dataTransfer?e.dataTransfer:(n=e.originalEvent)==null?void 0:n.dataTransfer},Me=e=>e?e.indexOf?e.indexOf("Files")!==-1:e.contains?e.contains("Files"):!1:!1,R=e=>{e.preventDefault(),e.stopPropagation()},Ie=(e,n)=>{const{onFileOver:o}=n.value;e.addEventListener("dragover",l=>{const s=Q(l);!Me(s.types)||(R(l),o&&o(!0))})},ze=(e,n)=>{const{onFileOver:o}=n.value;e.addEventListener("dragleave",l=>{l.currentTarget!==e&&(R(l),o&&o(!0))})},_e=(e,n)=>{const{onFileDrop:o,isSingle:l}=n.value;e.addEventListener("drop",s=>{const r=Q(s);!r||(R(s),l?o&&o([r.files[0]]):o&&o(Array.from(r.files)))})},Oe={mounted:(e,n)=>{const{droppable:o}=n.value;!o||(Ie(e,n),ze(e,n),_e(e,n))}};var $e={title:"Upload \u4E0A\u4F20",category:"\u6570\u636E\u5F55\u5165",status:"100%",install(e){e.directive("file-drop",Oe),e.component($.name,$)}};y.IFileOptions=xe,y.IUploadOptions=be,y.Upload=$,y.UploadStatus=N,y.default=$e,y.uploadProps=K,Object.defineProperty(y,"__esModule",{value:!0}),y[Symbol.toStringTag]="Module"});
1
+ var at=Object.defineProperty,it=Object.defineProperties;var rt=Object.getOwnPropertyDescriptors;var ae=Object.getOwnPropertySymbols;var ut=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable;var Z=(y,t,b)=>t in y?at(y,t,{enumerable:!0,configurable:!0,writable:!0,value:b}):y[t]=b,W=(y,t)=>{for(var b in t||(t={}))ut.call(t,b)&&Z(y,b,t[b]);if(ae)for(var b of ae(t))ct.call(t,b)&&Z(y,b,t[b]);return y},ie=(y,t)=>it(y,rt(t));var D=(y,t,b)=>(Z(y,typeof t!="symbol"?t+"":t,b),b);(function(y,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(y=typeof globalThis!="undefined"?globalThis:y||self,t(y.index={},y.Vue))})(this,function(y,t){"use strict";const b={modelValue:{type:Boolean,default:!1},title:{type:String,default:""},type:{type:String,default:"normal"},duration:{type:Number,default:3e3},onClose:{type:Function}},re={name:{type:String,default:"",required:!0},size:{type:[Number,String],default:"inherit"},color:{type:String,default:"inherit"},component:{type:Object,default:null},classPrefix:{type:String,default:"icon"},operable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},rotate:{type:[Number,String]}},ue={name:{type:String,default:"",required:!0},color:{type:String,default:"inherit"},size:{type:[Number,String],default:"inherit"}};function L(e,n,o){let l=e;return n&&(l+=`__${n}`),o&&(l+=`--${o}`),l}function x(e,n=!1){const o=n?`.devui-${e}`:`devui-${e}`;return{b:()=>L(o),e:a=>a?L(o,a):"",m:a=>a?L(o,"",a):"",em:(a,p)=>a&&p?L(o,a,p):""}}var pt="",ce=t.defineComponent({name:"DSvgIcon",props:ue,setup(e){const{name:n,color:o,size:l}=t.toRefs(e),s=x("svg-icon"),r=t.computed(()=>`#icon-${n.value}`),f=t.computed(()=>typeof l.value=="number"?`${l.value}px`:l.value),a={width:f.value,height:f.value};return()=>t.createVNode("svg",{class:s.b(),style:a},[t.createVNode("use",{"xlink:href":r.value,fill:o.value},null)])}});function de(e){return/^((http|https):)?\/\//.test(e)}function pe(e,n){const{component:o,name:l,size:s,color:r,classPrefix:f,rotate:a}=t.toRefs(e),p=x("icon"),V=t.computed(()=>typeof s.value=="number"?`${s.value}px`:s.value),m=o.value?t.resolveDynamicComponent(o.value):t.resolveDynamicComponent(ce),u=()=>t.createVNode("img",t.mergeProps({src:l.value,alt:l.value.split("/")[l.value.split("/").length-1],class:[(a==null?void 0:a.value)==="infinite"&&p.m("spin")],style:{width:V.value||"",transform:`rotate(${a==null?void 0:a.value}deg)`,verticalAlign:"middle"}},n.attrs),null),v=()=>t.createVNode(m,t.mergeProps({name:l.value,color:r.value,size:V.value,class:[(a==null?void 0:a.value)==="infinite"&&p.m("spin")],style:{transform:`rotate(${a==null?void 0:a.value}deg)`}},n.attrs),null),i=()=>{const c=/^icon-/.test(l.value)?l.value:`${f.value}-${l.value}`;return t.createVNode("i",t.mergeProps({class:[f.value,c,(a==null?void 0:a.value)==="infinite"&&p.m("spin")],style:{fontSize:V.value,color:r.value,transform:`rotate(${a==null?void 0:a.value}deg)`}},n.attrs),null)};return{iconDom:()=>o.value?v():de(l.value)?u():i()}}var fe=t.defineComponent({name:"DIcon",props:re,emits:["click"],setup(e,n){const{disabled:o,operable:l}=t.toRefs(e),{iconDom:s}=pe(e,n),r=x("icon"),f=t.computed(()=>({[r.e("container")]:!0,[r.m("disabled")]:o.value,[r.m("operable")]:l.value,[r.m("no-slots")]:!Object.keys(n.slots).length})),a=p=>{o.value||n.emit("click",p)};return()=>{var p,V,m,u;return t.createVNode("div",{class:f.value,onClick:a},[(V=(p=n.slots).prefix)==null?void 0:V.call(p),s(),(u=(m=n.slots).suffix)==null?void 0:u.call(m)])}}}),ft="";t.defineComponent({name:"DIconGroup",setup(e,n){const o=x("icon-group");return()=>{var l,s;return t.createVNode("div",{class:o.b()},[(s=(l=n.slots).default)==null?void 0:s.call(l)])}}});var me=t.defineComponent({emits:["click"],setup(e,{emit:n}){const o=x("notification");return()=>t.createVNode("div",{class:o.e("icon-close"),onClick:l=>n("click",l)},[t.createVNode(fe,{name:"close",size:"14px"},null)])}});const T=x("notification"),M={"xmlns:xlink":"http://www.w3.org/1999/xlink"},I={"xlink:href":"#path-s"};function he(){return t.createVNode("svg",t.mergeProps({width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},M),[t.createVNode("defs",null,[t.createVNode("polygon",{id:"path-s",points:"6.53553391 9.77817459 12.1923882 4.12132034 13.6066017 5.53553391 6.53553391 12.6066017 3 9.07106781 4.41421356 7.65685425 6.53553391 9.77817459"},null)]),t.createVNode("g",{id:"correct",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createVNode("mask",{id:"mask-2",fill:"white"},[t.createVNode("use",I,null)]),t.createVNode("use",t.mergeProps({id:"Mask",class:T.e("image-success-path")},I),null)])])}function ge(){return t.createVNode("svg",t.mergeProps({width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},M),[t.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createVNode("path",{class:T.e("warning-outer"),d:"M8.96244623,0.57254229 L15.8714442,13.4101975 C16.1549662,13.9370117 15.9538562,14.5918482 15.4222523,14.8728158 C15.2642579,14.9563203 15.0879506, 15 14.9088903,15 L1.09089441,15 C0.488410063,15 0,14.5159904 0,13.9189343 C0,13.7414873 0.0440768395,13.5667684 0.128340519,13.4101975 L7.03733844,0.57254229 C7.32086049, 0.0457280838 7.98165058,-0.153569987 8.51325441,0.127397589 C8.70423071, 0.228333932 8.8605922,0.383286648 8.96244623,0.57254229 Z"},null),t.createVNode("path",{class:T.e("warning-inner"),"stroke-width":"0.3","fill-rule":"nonzero",d:"M8.87894737,13 L7.08947368,13 L7.08947368,11.2105263 L8.87894737,11.2105263 L8.87894737,13 Z M8.62102372,9.86842105 L7.32800539,9.86842105 L7,4.5 L8.96842105,4.5 L8.62102372,9.86842105 Z"},null)])])}function Fe(){return t.createVNode("svg",t.mergeProps({width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},M),[t.createVNode("g",{id:"info",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createVNode("path",{class:T.e("image-info-path"),d:"M7,13 L7,6 L9,6 L9,13 L7,13 Z M7,5 L7,3 L9,3 L9,5 L7,5 Z",id:"info"},null)])])}function ye(){return t.createVNode("svg",t.mergeProps({width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},M),[t.createVNode("defs",null,[t.createVNode("polygon",{id:"path-e",points:"8.07106781 6.65685425 10.8994949 3.82842712 12.3137085 5.24264069 9.48528137 8.07106781 12.3137085 10.8994949 10.8994949 12.3137085 8.07106781 9.48528137 5.24264069 12.3137085 3.82842712 10.8994949 6.65685425 8.07106781 3.82842712 5.24264069 5.24264069 3.82842712"},null)]),t.createVNode("g",{id:"error",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createVNode("mask",{id:"mask-2",fill:"white"},[t.createVNode("use",I,null)]),t.createVNode("use",t.mergeProps({id:"Mask",class:T.e("image-error-path")},I),null)])])}var ve=t.defineComponent({props:{type:{type:String,default:"normal"}},setup(e){const{type:n}=t.toRefs(e),o=x("notification"),l=t.computed(()=>({[o.e("image")]:!0,[o.em("image",n.value)]:!0}));return()=>t.createVNode("span",{class:l.value},[n.value&&n.value!=="normal"&&(n.value==="success"&&t.createVNode(he,null,null)||n.value==="info"&&t.createVNode(Fe,null,null)||n.value==="warning"&&t.createVNode(ge,null,null)||n.value==="error"&&t.createVNode(ye,null,null))])}});function Ee(e){return{classes:t.computed(()=>({"devui-notification-item-container":!0,[`devui-notification-message-${e.type}`]:!0}))}}function Ne(e,n){let o=null,l;const s=()=>{var p;o&&clearTimeout(o),o=null,(p=e.onClose)==null||p.call(e),n("update:modelValue",!1)},r=()=>{o&&e.duration&&(clearTimeout(o),o=null)},f=()=>{if(e.modelValue&&e.duration){const p=e.duration-(Date.now()-l);o=setTimeout(s,p)}},a=()=>{n("destroy")};return t.watch(()=>e.modelValue,p=>{p&&(l=Date.now(),e.duration&&(o=setTimeout(s,e.duration)))}),{interrupt:r,removeReset:f,close:s,handleDestroy:a}}var mt="",we=t.defineComponent({name:"DNotification",props:b,emits:["update:modelValue","destroy"],setup(e,{emit:n,slots:o}){const{modelValue:l,title:s,type:r}=t.toRefs(e),{classes:f}=Ee(e),{interrupt:a,removeReset:p,close:V,handleDestroy:m}=Ne(e,n),u=x("notification");return()=>t.createVNode(t.Transition,{name:"notification-fade",onAfterLeave:m},{default:()=>{var v;return[l.value&&t.createVNode("div",{class:u.b(),onClick:t.withModifiers(()=>({}),["stop"]),onPointerup:t.withModifiers(()=>({}),["stop"])},[t.createVNode("div",{class:f.value,onMouseenter:a,onMouseleave:p},[t.createVNode("div",{class:u.e("item")},[t.createVNode(me,{onClick:V},null),s.value&&t.createVNode(ve,{type:r.value},null),t.createVNode("div",{class:u.e("message")},[t.createVNode("span",{class:u.e("title")},[s.value]),t.createVNode("span",{class:u.e("content")},[(v=o.default)==null?void 0:v.call(o)])])])])])]}})}});function Ce(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!t.isVNode(e)}const De={modelValue:!1,duration:3e3,type:"normal"};function Ve(e,n){const o=document.createElement("div");o.classList.add("notification__warpper");const l=document.body.lastElementChild;let s=50;if(l==null?void 0:l.classList.contains("notification__warpper")){const a=l.lastElementChild.getBoundingClientRect(),p=a.height,V=a.top;s=p+V}const r=t.createApp({setup(){return t.onUnmounted(()=>{document.body.removeChild(o)}),()=>t.createVNode(we,t.mergeProps(e,{onDestroy:r.unmount,style:[`top: ${s}px`]}),Ce(n)?n:{default:()=>[n]})}});return document.body.appendChild(o),r.mount(o),r}function ke(e,n){e.modelValue=!1,n==null||n()}class be{static open(n){const o=n.onClose||null,l=n.content;delete n.content;const s=t.reactive(ie(W(W({},De),n),{onClose:()=>{ke(s,o)}}));Ve(s,l),s.modelValue=!0}}class xe{constructor(){D(this,"uri");D(this,"method");D(this,"maximumSize");D(this,"headers");D(this,"authToken");D(this,"authTokenHeader");D(this,"additionalParameter");D(this,"fileFieldName");D(this,"checkSameName");D(this,"withCredentials");D(this,"responseType")}}class Ae{constructor(){D(this,"accept");D(this,"multiple");D(this,"webkitdirectory")}}var N=(e=>(e[e.preLoad=0]="preLoad",e[e.uploading=1]="uploading",e[e.uploaded=2]="uploaded",e[e.failed=3]="failed",e))(N||{});const K={accept:{type:String},webkitdirectory:{type:Boolean,default:!1},uploadOptions:{type:Object},multiple:{type:Boolean,default:!1},autoUpload:{type:Boolean,default:!0},placeholder:{type:String,default:""},modelValue:{type:Array,default:()=>[]},droppable:{type:Boolean,default:!1},beforeUpload:{type:Function},dynamicUploadOptionsFn:{type:Function},disabled:{type:Boolean,default:!1},onChange:{type:Function},fileDrop:{type:Function,default:void 0},fileOver:{type:Function,default:void 0},fileSelect:{type:Function,default:void 0},deleteUploadedFile:{type:Function,default:void 0},onError:{type:Function,default:void 0},onSuccess:{type:Function,default:void 0},onExceed:{type:Function,default:void 0},onProgress:{type:Function,default:void 0},onPreview:{type:Function,default:void 0},oneTimeUpload:{type:Boolean,default:!1},limit:{type:Number,default:0},httpRequest:{type:Function,default:void 0}},Se=e=>{const n=t.ref(""),o=m=>{const u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null),m.dispatchEvent(u)},l=({multiple:m,accept:u,webkitdirectory:v})=>new Promise(i=>{const h=document.getElementById("d-upload-temp");h&&document.body.removeChild(h);const c=document.createElement("input");c.style.position="fixed",c.style.left="-2000px",c.style.top="-2000px",c.setAttribute("id","d-upload-temp"),c.setAttribute("type","file"),m&&c.setAttribute("multiple",""),u&&c.setAttribute("accept",u),v&&c.setAttribute("webkitdirectory",""),c.addEventListener("change",w=>{i(Array.prototype.slice.call(w.target.files))}),document.body.appendChild(c),o(c)}),s=(m,u)=>{if(m){const v=m.split(","),i=u.type.replace(/\/.*$/,"");return v.some(h=>{const c=h.trim();return c.startsWith(".")?u.name.toLowerCase().indexOf(c.toLowerCase(),u.name.toLowerCase().length-c.toLowerCase().length)>-1:/\/\*$/.test(c)?i===c.replace(/\/.*$/,""):u.type===c})}return!0},r=(m,u)=>u?m>1024*1024*u:!1;return{triggerSelectFiles:m=>{const{multiple:u,accept:v,webkitdirectory:i}=m;return l({multiple:u,accept:v,webkitdirectory:i})},_validateFiles:(m,u,v)=>s(u,m)?v&&r(m.size,v.maximumSize)?{checkError:!0,errorMsg:e("getBeyondMaximalFileSizeMsg")(m.name,v.maximumSize||0)}:{checkError:!1,errorMsg:void 0}:{checkError:!0,errorMsg:e("getNotAllowedFileTypeMsg")(m.name,u)},triggerDropFiles:m=>Promise.resolve(m),checkAllFilesSize:(m,u)=>{if(r(m,u))return n.value=e("getAllFilesBeyondMaximalFileSizeMsg")(u),{checkError:!0,errorMsg:n.value}}}};class Y{constructor(n,o){D(this,"xhr");D(this,"status");D(this,"response");D(this,"percentage",0);this.file=n,this.uploadOptions=o,this.file=n,this.uploadOptions=o,this.status=N.preLoad}send(n){return new Promise((o,l)=>{const{uri:s,method:r,headers:f,authToken:a,authTokenHeader:p,additionalParameter:V,fileFieldName:m,withCredentials:u,responseType:v}=this.uploadOptions||{},i=p||"Authorization",h=m||"file";this.xhr=new XMLHttpRequest,this.xhr.open(r||"POST",s||""),u&&(this.xhr.withCredentials=u),v&&(this.xhr.responseType=v),a&&this.xhr.setRequestHeader(i,a),f&&Object.keys(f).forEach(w=>{var E;(E=this.xhr)==null||E.setRequestHeader(w,f[w])}),this.xhr.upload.onprogress=w=>{this.percentage=Math.round(w.loaded*100/w.total)};const c=n&&n.length?this.oneTimeUploadFiles(h,V,n):this.parallelUploadFiles(h,V);this.xhr.send(c),this.status=N.uploading,this.xhr.onabort=()=>{this.status=N.preLoad,this.xhr=null},this.xhr.onerror=()=>{var w,E;this.response=(w=this.xhr)==null?void 0:w.response,this.status=N.failed,l({file:this.file,response:(E=this.xhr)==null?void 0:E.response})},this.xhr.onload=()=>{var w,E,A;((w=this.xhr)==null?void 0:w.readyState)===4&&this.xhr.status>=200&&this.xhr.status<300?(this.response=this.xhr.response,this.status=N.uploaded,o({file:this.file,response:this.xhr.response})):(this.response=(E=this.xhr)==null?void 0:E.response,this.status=N.failed,l({file:this.file,response:(A=this.xhr)==null?void 0:A.response}))}})}parallelUploadFiles(n,o){const l=new FormData;return l.append(n,this.file,this.file.name),o&&Object.keys(o).forEach(s=>{l.append(s,o[s])}),l}oneTimeUploadFiles(n,o,l){const s=new FormData;return l.forEach(r=>{s.append(n,r.file,r.file.name),o&&Object.keys(o).forEach(f=>{s.append(f,o[f])})}),s}cancel(){this.xhr&&this.xhr.abort()}}const Be=()=>{const e=t.ref([]),n=t.ref([]),o=i=>{let h=!0;for(let c=0;c<e.value.length;c++)if(i===e.value[c].file.name){h=!1,n.value.indexOf(i)===-1&&n.value.push(i);break}return h},l=(i,h)=>{h&&h.checkSameName?o(i.name)&&e.value.push(new Y(i,h)):e.value.push(new Y(i,h))},s=()=>e.value.map(i=>i.file),r=()=>e.value.map(i=>i),f=async i=>{if(!i||!i.length)return Promise.reject("no files");let h=[];return await i[0].send(i).finally(()=>h=i.map(c=>(c.status=i[0].status,c.percentage=i[0].percentage,{file:c.file,response:i[0].response}))),h};return{fileUploaders:e,getFiles:s,addFile:l,getFullFiles:r,deleteFile:i=>{const h=e.value.find(c=>c.file===i);h==null||h.cancel(),e.value=e.value.filter(c=>i!==c.file)},upload:async i=>{let h=[];if(i){i.percentage=0;const c=await i.send();h.push(c)}else{const c=e.value.filter(A=>A.status===N.preLoad),w=e.value.filter(A=>A.status===N.failed),E=c.length>0?c:w;h=await Promise.all(E.map(async A=>(A.percentage=0,await A.send())))}return h.length>0?Promise.resolve(h):Promise.reject("no files")},removeFiles:()=>{e.value=[],n.value=[]},getSameNameFiles:()=>n.value.join(),resetSameNameFiles:()=>{n.value=[]},_oneTimeUpload:()=>{const i=e.value.filter(h=>h.status!==N.uploaded);return f(i)}}};var ht="";function U(...e){const n=o=>o&&typeof o=="object";return e.reduce((o,l)=>(Object.keys(l).forEach(s=>{const r=o[s],f=l[s];Array.isArray(r)&&Array.isArray(f)?o[s]=Array.from(new Set([...f,...r])):n(r)&&n(f)?o[s]=U(r,f):o[s]=f}),o),{})}var Pe={pagination:{totalItemText:"\u6240\u6709\u6761\u76EE",goToText:"\u8DF3\u81F3",perPage:"\u6761/\u9875"},accordion:{loading:"\u52A0\u8F7D\u4E2D",noData:"\u6CA1\u6709\u6570\u636E"},autoCompleteDropdown:{latestInput:"\u6700\u8FD1\u8F93\u5165"},cascaderList:{noData:"\u6CA1\u6709\u6570\u636E"},colorPicker:{foundationPanel:"\u57FA\u7840\u9762\u677F",advancedPanel:"\u9AD8\u7EA7\u9762\u677F"},datePickerPro:{ok:"\u786E\u5B9A",placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",month1:"1\u6708",month2:"2\u6708",month3:"3\u6708",month4:"4\u6708",month5:"5\u6708",month6:"6\u6708",month7:"7\u6708",month8:"8\u6708",month9:"9\u6708",month10:"10\u6708",month11:"11\u6708",month12:"12\u6708",year:"\u5E74",startPlaceholder:"\u8BF7\u9009\u62E9\u5F00\u59CB\u65E5\u671F",endPlaceholder:"\u8BF7\u9009\u62E9\u7ED3\u675F\u65E5\u671F",getWeekDays(){return["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},getTimeArr(){return["\u65F6","\u5206","\u79D2"]},getYearMonthStr(e,n){return`${e}\u5E74${n}\u6708`}},editableSelect:{noRelatedRecords:"\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",noData:"\u6CA1\u6709\u6570\u636E"},input:{placeholder:"\u8BF7\u8F93\u5165"},splitterBar:{collapse:"\u6536\u8D77",expand:"\u5C55\u5F00"},stepsGuide:{previous:"\u4E0A\u4E00\u6B65",continue:"\u6211\u77E5\u9053\u5566\uFF0C\u7EE7\u7EED",ok:"\u6211\u77E5\u9053\u5566"},table:{selectAll:"\u5168\u9009",ok:"\u786E\u5B9A"},timePopup:{ok:"\u786E\u5B9A"},transfer:{unit:"\u9879",panelUnit:"\u9879",headerUnit:"\u9879",noData:"\u6682\u65E0\u6570\u636E",placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22"},tree:{loading:"\u52A0\u8F7D\u4E2D",newNode:"\u65B0\u8282\u70B9",selectPlaceholder:"\u8BF7\u9009\u62E9"},upload:{placeholder:"\u9009\u62E9\u6587\u4EF6",getExistSameNameFilesMsg(e){return`\u60A8\u4E0A\u4F20\u7684 "${e}" \u5B58\u5728\u91CD\u540D\u6587\u4EF6, \u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`},getAllFilesBeyondMaximalFileSizeMsg(e){return`\u6700\u5927\u652F\u6301\u4E0A\u4F20${e}MB\u7684\u6587\u4EF6, \u60A8\u672C\u6B21\u4E0A\u4F20\u7684\u6240\u6709\u6587\u4EF6\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`},getBeyondMaximalFileSizeMsg(e,n){return`\u6700\u5927\u652F\u6301\u4E0A\u4F20${n}MB\u7684\u6587\u4EF6, \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${e}"\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`},getNotAllowedFileTypeMsg(e,n){return`\u652F\u6301\u7684\u6587\u4EF6\u7C7B\u578B: "${n}", \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${e}"\u4E0D\u5728\u5141\u8BB8\u8303\u56F4\u5185\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`}},search:{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57"},select:{placeholder:"\u8BF7\u9009\u62E9",noDataText:"\u65E0\u6570\u636E",noMatchText:"\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",loadingText:"\u52A0\u8F7D\u4E2D..."},tagInput:{maxTagsText:"\u5DF2\u8FBE\u5230\u6700\u5927\u4E2A\u6570\uFF1A"},timeSelect:{placeholder:"\u8BF7\u9009\u62E9\u65F6\u95F4"}};const z=t.ref("zh-CN");let O=t.reactive({[z.value]:Pe});const Te={messages(){return O[z.value]},lang(){return z.value},use(e,n){z.value=e,this.add({[e]:n})},add(e={}){O=U(O,e)}},Le=e=>e.substring(1).replace(/^\S/,n=>n.toLocaleLowerCase());function J(e,n){const o=n.split(".");let l=e;return o.forEach(s=>{var r;l=(r=l[s])!=null?r:""}),l}function Me(e,n,o){const l=o||Le(e)+".";return s=>{var a;const r=((a=n==null?void 0:n.appContext.config.globalProperties.langMessages)==null?void 0:a.value)||Te.messages();return J(r,l+s)||J(r,s)}}var $=t.defineComponent({name:"DUpload",props:K,emits:["fileDrop","fileOver","fileSelect","deleteUploadedFile","update:modelValue"],setup(e,n){const o=t.getCurrentInstance(),l=Me("DUpload",o),{uploadOptions:s,placeholder:r,autoUpload:f,disabled:a,beforeUpload:p,droppable:V,oneTimeUpload:m,modelValue:u,multiple:v,accept:i,webkitdirectory:h,limit:c,httpRequest:w}=t.toRefs(e),E=x("upload"),A=x("input-group"),j=x("form-control"),Re=x("input-group-addon"),{triggerSelectFiles:je,_validateFiles:He,triggerDropFiles:qe,checkAllFilesSize:Ge}=Se(l),{fileUploaders:S,addFile:Xe,getFullFiles:Ze,deleteFile:te,upload:We,resetSameNameFiles:Ke,removeFiles:H,_oneTimeUpload:Ye,getSameNameFiles:Ue}=Be(),q=t.ref(!1),G=t.ref([]),_=d=>{be.open({type:"warning",content:d})},Je=()=>{var g;let d=0;if(S.value.forEach(C=>{d+=C.file.size;const k=He(C.file,(i==null?void 0:i.value)||"",C.uploadOptions);if(k&&k.checkError){te(C.file),_(k.errorMsg);return}}),m.value){const C=Ge(d,((g=s==null?void 0:s.value)==null?void 0:g.maximumSize)||0);C&&C.checkError&&(H(),_(C.errorMsg))}},Qe=d=>{q.value=d,n.emit("fileOver",d)},ne=d=>{const g=u.value.filter(C=>C.name!==d.name);n.emit("deleteUploadedFile",d),n.emit("update:modelValue",g)},oe=(d,g,C)=>{d==null||d.stopPropagation(),C===N.uploaded&&ne(g),te(g)},et=()=>{let d=Promise.resolve(!0);if(p==null?void 0:p.value){const g=p==null?void 0:p.value(Ze());typeof g!="undefined"&&(typeof g=="boolean"?d=Promise.resolve(g):d=g)}return d},X=(d,g)=>{d&&d.stopPropagation(),et().then(C=>{if(!C){H();return}if(typeof(w==null?void 0:w.value)=="function"){const F=S.value.map(B=>B.file);w.value(F);return}const k=m.value?Ye():We(g);e.onProgress&&e.onProgress(G.value,u.value),k==null||k.then(F=>{e.onSuccess&&e.onSuccess(F);const B=F.map(st=>st.file),P=[...B,...u.value];n.emit("update:modelValue",P),e.onChange&&e.onChange(B,P)}).catch(F=>{e.onError&&e.onError(F),e.onChange&&e.onChange([F.file],u.value)})})},le=d=>{Ke(),d.then(g=>{if(c.value&&u.value.length+g.length>c.value){e.onExceed&&e.onExceed(g,u.value);return}e.onChange&&e.onChange(g,u.value),g.forEach(k=>{v.value||H(),Xe(k,s==null?void 0:s.value)}),Je();const C=Ue();(s==null?void 0:s.value)&&s.value.checkSameName&&C.length&&_(l("getExistSameNameFilesMsg")(C)),G.value=S.value.filter(k=>k.status===N.preLoad).map(k=>k.file),n.emit("fileSelect",G.value),f.value&&X()}).catch(g=>{_(g.message)})},se=()=>{a.value||le(je({accept:i==null?void 0:i.value,multiple:v.value,webkitdirectory:h.value}))},tt=d=>{q.value=!1,le(qe(d)),n.emit("fileDrop",d)},nt=(d,g)=>{X(d,g)},ot=d=>{S.value.forEach(g=>{oe(d,g.file,g.status)})},lt=(d,g)=>{d==null||d.stopPropagation(),e.onPreview&&e.onPreview(g)};return n.expose({submit:nt,clearFiles:ot}),()=>{var d,g,C,k;return t.createVNode("div",null,[t.withDirectives(t.createVNode("div",{class:E.b(),style:`border: ${q.value?"1px solid #15bf15":"0"}`},[((g=(d=n.slots).default)==null?void 0:g.call(d))?t.createVNode("div",{onClick:se},[n.slots.default()]):t.createVNode("div",{class:[A.b(),a.value?"disabled":""],onClick:se},[S.value.length===0&&t.createVNode("div",{class:[j.b(),E.e("placeholder")]},[r.value||l("placeholder")]),S.value.length>0&&t.createVNode("ul",{class:[j.b(),E.e("files-list")]},[S.value.map((F,B)=>t.createVNode("li",{key:B,class:[E.e("file-item"),E.e("file-tag")],style:"display: inline-block;",title:F.file.name,onClick:P=>lt(P,F.file)},[t.createVNode("span",{class:[E.e("filename"),F.status===N.failed?E.m("failed-color"):""]},[F.file.name]),t.createVNode(t.resolveComponent("d-icon"),{name:"close",class:[(F==null?void 0:F.status)===N.failed?E.e("delete-file-button"):"",(F==null?void 0:F.status)===N.uploading||(F==null?void 0:F.status)===N.uploaded?E.e("delete"):""],onClick:P=>oe(P,F.file,F.status)},null),F.status===N.uploading&&t.createVNode("div",{class:["icon",E.e("progress")]},[t.createVNode(t.resolveComponent("d-progress"),{isCircle:!0,percentage:F.percentage,barbgcolor:"#50D4AB",strokeWidth:8,showContent:!1},null)]),F.status===N.failed&&t.createVNode(t.resolveComponent("d-icon"),{name:"running",onClick:X},null),F.status===N.uploaded&&t.createVNode(t.resolveComponent("d-icon"),{name:"right",color:"#50d4ab"},null)]))]),t.createVNode("span",{class:Re.b()},[t.createVNode(t.resolveComponent("d-icon"),{name:"more-operate",color:"#252b3a"},null)])])]),[[t.resolveDirective("file-drop"),{droppable:V,isSingle:!v,onFileDrop:tt,onFileOver:Qe}]]),t.createVNode("div",null,[(k=(C=n.slots)["uploaded-files"])==null?void 0:k.call(C,{uploadedFiles:u.value,deleteFile:ne})])])}}});const Q=e=>{var n;return e.dataTransfer?e.dataTransfer:(n=e.originalEvent)==null?void 0:n.dataTransfer},Ie=e=>e?e.indexOf?e.indexOf("Files")!==-1:e.contains?e.contains("Files"):!1:!1,R=e=>{e.preventDefault(),e.stopPropagation()},ze=(e,n)=>{const{onFileOver:o}=n.value;e.addEventListener("dragover",l=>{const s=Q(l);!Ie(s.types)||(R(l),o&&o(!0))})},_e=(e,n)=>{const{onFileOver:o}=n.value;e.addEventListener("dragleave",l=>{l.currentTarget!==e&&(R(l),o&&o(!0))})},Oe=(e,n)=>{const{onFileDrop:o,isSingle:l}=n.value;e.addEventListener("drop",s=>{const r=Q(s);!r||(R(s),l?o&&o([r.files[0]]):o&&o(Array.from(r.files)))})},ee={mounted:(e,n)=>{const{droppable:o}=n.value;!o||(ze(e,n),_e(e,n),Oe(e,n))}};var $e={title:"Upload \u4E0A\u4F20",category:"\u6570\u636E\u5F55\u5165",status:"100%",install(e){e.directive("file-drop",ee),e.component($.name,$)}};y.IFileOptions=Ae,y.IUploadOptions=xe,y.Upload=$,y.UploadStatus=N,y.default=$e,y.fileDropDirective=ee,y.uploadProps=K,Object.defineProperty(y,"__esModule",{value:!0}),y[Symbol.toStringTag]="Module"});