@hb-hellotech/hb-ui 2.4.3 → 2.5.0

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 (43) hide show
  1. package/dist/App.d.ts.map +1 -1
  2. package/dist/components/func_comp/hb_func_comp_tree/src/tree.d.ts.map +1 -1
  3. package/dist/components/func_comp/hb_func_file_preview/index.d.ts +280 -85
  4. package/dist/components/func_comp/hb_func_file_preview/index.d.ts.map +1 -1
  5. package/dist/components/func_comp/hb_func_file_preview/src/file_preview.d.ts +173 -39
  6. package/dist/components/func_comp/hb_func_file_preview/src/file_preview.d.ts.map +1 -1
  7. package/dist/components/func_comp/hb_func_icon_list/constants.d.ts +11 -0
  8. package/dist/components/func_comp/hb_func_icon_list/constants.d.ts.map +1 -0
  9. package/dist/components/func_comp/hb_func_icon_list/index.d.ts +9 -0
  10. package/dist/components/func_comp/hb_func_icon_list/index.d.ts.map +1 -0
  11. package/dist/components/func_comp/hb_func_icon_list/src/icon_list.d.ts +38 -0
  12. package/dist/components/func_comp/hb_func_icon_list/src/icon_list.d.ts.map +1 -0
  13. package/dist/components/func_comp/hb_ui_config/constants.d.ts +2 -0
  14. package/dist/components/func_comp/hb_ui_config/constants.d.ts.map +1 -0
  15. package/dist/components/func_comp/hb_ui_config/index.d.ts +1 -1
  16. package/dist/components/func_comp/hb_ui_config/index.d.ts.map +1 -1
  17. package/dist/components/func_comp/hb_ui_config/src/hbUiConfig.d.ts.map +1 -1
  18. package/dist/components/func_comp/index.d.ts +2 -1
  19. package/dist/components/func_comp/index.d.ts.map +1 -1
  20. package/dist/components/hooks/index.d.ts +1 -0
  21. package/dist/components/hooks/index.d.ts.map +1 -1
  22. package/dist/components/hooks/useFilePreview.d.ts +123 -3
  23. package/dist/components/hooks/useFilePreview.d.ts.map +1 -1
  24. package/dist/components/hooks/useIconfont.d.ts +27 -0
  25. package/dist/components/hooks/useIconfont.d.ts.map +1 -0
  26. package/dist/components/hooks/useListFormItem.d.ts.map +1 -1
  27. package/dist/config/index.d.ts.map +1 -1
  28. package/dist/demo/HbLibIcon.d.ts +4 -0
  29. package/dist/demo/HbLibIcon.d.ts.map +1 -0
  30. package/dist/demo/hb_file_preview.d.ts.map +1 -1
  31. package/dist/hb_component_lib.css +1 -1
  32. package/dist/hb_component_lib.js +2592 -2612
  33. package/dist/hb_component_lib.umd.cjs +345 -2
  34. package/dist/index.d.ts +52 -0
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/main.d.ts +52 -0
  37. package/dist/main.d.ts.map +1 -1
  38. package/dist/vue-office-docx-D0zFkT1M.js +5857 -0
  39. package/dist/vue-office-excel-B9GbNr16.js +64322 -0
  40. package/dist/vue-office-pdf-CaEuSE8g.js +2012 -0
  41. package/dist/vue-office-pptx-BeWGEYJM.js +52572 -0
  42. package/hooks/useIconfont.ts +149 -0
  43. package/package.json +17 -7
package/dist/App.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../src/App.vue"],"names":[],"mappings":";;AA0TA,wBAMG"}
1
+ {"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../src/App.vue"],"names":[],"mappings":";;AAoUA,wBAMG"}
@@ -1 +1 @@
1
- {"version":3,"file":"tree.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/func_comp/hb_func_comp_tree/src/tree.vue"],"names":[],"mappings":";AAiHA,OAAO,EAAc,GAAG,EAAa,WAAW,EAAE,MAAM,QAAQ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqKhE,wBAOG"}AA;IACX,GAAG,CAAC,EAAE,GAAG,CAAA;IACT,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAA;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAGD,MAAM,WAAW,SAAU,SAAQ,QAAQ,CAAC,WAAW,CAAC;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAAS,CAAC,EAAE,GAAG,GAAG,IAAI,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,WAAW,CAAA;CACzB;AACD,eAAO,MAAM,UAAU;;uBAGJ,QAAQ,CAAC,WAAW,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;uBAwBvB,QAAQ,CAAC,GAAG,EAAE,CAAC;;;;;;;;;;;;;;CAsBxB,CAAA;AAEV,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,gBAAgB,CAAC,OAAO,UAAU,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"tree.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/func_comp/hb_func_comp_tree/src/tree.vue"],"names":[],"mappings":";AAiHA,OAAO,EAAc,GAAG,EAAa,WAAW,EAAE,MAAM,QAAQ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqKhE,wBAOG"}
@@ -1,106 +1,301 @@
1
1
  import { WithInstall } from '../../utils/withInstall';
2
- import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
2
+ import { CreateComponentPublicInstanceWithMixins, ComputedRef, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
3
+ import { FilePreviewSrc_Type, FilePreviewListItem_Intf, FilePreviewExcelOptions_Intf, FilePreviewKind_Type } from './src/file_preview';
3
4
  declare const HbLibFilePreview: WithInstall<{
4
- new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {
5
- $emit: (event: "closeModal" | "prevAttachment" | "nextAttachment", ...args: any[]) => void;
6
- url: string;
7
- file: File;
5
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
6
+ visible?: boolean;
7
+ src?: FilePreviewSrc_Type;
8
+ fileName?: string;
9
+ fileList?: FilePreviewListItem_Intf[];
10
+ fileIndex?: number;
11
+ height?: string;
12
+ excelOptions?: FilePreviewExcelOptions_Intf;
13
+ pdfStaticFileUrl?: string;
14
+ modalWidth?: string | number;
15
+ modalTitlePrefix?: string;
16
+ modalTitleOverride?: string;
17
+ showDownload?: boolean;
18
+ showNav?: boolean;
19
+ centered?: boolean;
20
+ destroyOnClose?: boolean;
21
+ maskClosable?: boolean;
22
+ keyboard?: boolean;
23
+ needSafe?: boolean;
24
+ customDownload?: (ctx: {
25
+ item: FilePreviewListItem_Intf | null;
26
+ index: number;
27
+ src: FilePreviewSrc_Type;
28
+ fileName?: string;
29
+ downloadName: string;
30
+ }) => void | Promise<void>;
31
+ }> & Readonly<{
32
+ onError?: ((err: unknown) => any) | undefined;
33
+ onCancel?: (() => any) | undefined;
34
+ "onUpdate:visible"?: ((open: boolean) => any) | undefined;
35
+ onRendered?: (() => any) | undefined;
36
+ "onUpdate:fileIndex"?: ((index: number) => any) | undefined;
37
+ onFileChange?: ((payload: {
38
+ index: number;
39
+ item: FilePreviewListItem_Intf | null;
40
+ }) => any) | undefined;
41
+ onBeforeDownload?: ((payload: {
42
+ item: FilePreviewListItem_Intf | null;
43
+ index: number;
44
+ }) => any) | undefined;
45
+ onDownloaded?: ((payload: {
46
+ item: FilePreviewListItem_Intf | null;
47
+ index: number;
48
+ }) => any) | undefined;
49
+ }>, {
50
+ previewKind: ComputedRef<FilePreviewKind_Type>;
51
+ safeIndex: ComputedRef<number>;
52
+ currentListItem: ComputedRef< FilePreviewListItem_Intf | null>;
53
+ effectiveSrc: ComputedRef<FilePreviewSrc_Type>;
54
+ effectiveFileName: ComputedRef<string>;
55
+ goPrev: () => void;
56
+ goNext: () => void;
57
+ download: () => Promise<void>;
58
+ closeModal: () => void;
59
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
60
+ error: (err: unknown) => any;
61
+ cancel: () => any;
62
+ "update:visible": (open: boolean) => any;
63
+ rendered: () => any;
64
+ "update:fileIndex": (index: number) => any;
65
+ fileChange: (payload: {
66
+ index: number;
67
+ item: FilePreviewListItem_Intf | null;
68
+ }) => any;
69
+ beforeDownload: (payload: {
70
+ item: FilePreviewListItem_Intf | null;
71
+ index: number;
72
+ }) => any;
73
+ downloaded: (payload: {
74
+ item: FilePreviewListItem_Intf | null;
75
+ index: number;
76
+ }) => any;
77
+ }, PublicProps, {
78
+ modalWidth: string | number;
79
+ visible: boolean;
80
+ centered: boolean;
81
+ maskClosable: boolean;
82
+ destroyOnClose: boolean;
83
+ keyboard: boolean;
84
+ height: string;
85
+ fileList: FilePreviewListItem_Intf[];
8
86
  fileName: string;
9
- mobile: boolean;
87
+ src: string | Blob | ArrayBuffer | null;
88
+ fileIndex: number;
89
+ excelOptions: FilePreviewExcelOptions_Intf;
90
+ pdfStaticFileUrl: string;
91
+ modalTitlePrefix: string;
92
+ modalTitleOverride: string;
93
+ showDownload: boolean;
94
+ showNav: boolean;
10
95
  needSafe: boolean;
11
- previewVisible: boolean;
12
- showAttachmentNav: boolean;
13
- hasPrevAttachment: boolean;
14
- hasNextAttachment: boolean;
15
- isTitleTip: boolean;
16
- titleTip: string;
17
- needModal: boolean;
18
- $props: {
19
- readonly url?: string | undefined;
20
- readonly file?: File | undefined;
21
- readonly fileName?: string | undefined;
22
- readonly mobile?: boolean | undefined;
23
- readonly needSafe?: boolean | undefined;
24
- readonly previewVisible?: boolean | undefined;
25
- readonly showAttachmentNav?: boolean | undefined;
26
- readonly hasPrevAttachment?: boolean | undefined;
27
- readonly hasNextAttachment?: boolean | undefined;
28
- readonly isTitleTip?: boolean | undefined;
29
- readonly titleTip?: string | undefined;
30
- readonly needModal?: boolean | undefined;
31
- };
32
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
96
+ customDownload: (ctx: {
97
+ item: FilePreviewListItem_Intf | null;
98
+ index: number;
99
+ src: FilePreviewSrc_Type;
100
+ fileName?: string;
101
+ downloadName: string;
102
+ }) => void | Promise<void>;
103
+ }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
33
104
  P: {};
34
105
  B: {};
35
106
  D: {};
36
107
  C: {};
37
108
  M: {};
38
109
  Defaults: {};
39
- }, Readonly<{}> & Readonly<{}>, {
40
- $emit: (event: "closeModal" | "prevAttachment" | "nextAttachment", ...args: any[]) => void;
41
- url: string;
42
- file: File;
110
+ }, Readonly<{
111
+ visible?: boolean;
112
+ src?: FilePreviewSrc_Type;
113
+ fileName?: string;
114
+ fileList?: FilePreviewListItem_Intf[];
115
+ fileIndex?: number;
116
+ height?: string;
117
+ excelOptions?: FilePreviewExcelOptions_Intf;
118
+ pdfStaticFileUrl?: string;
119
+ modalWidth?: string | number;
120
+ modalTitlePrefix?: string;
121
+ modalTitleOverride?: string;
122
+ showDownload?: boolean;
123
+ showNav?: boolean;
124
+ centered?: boolean;
125
+ destroyOnClose?: boolean;
126
+ maskClosable?: boolean;
127
+ keyboard?: boolean;
128
+ needSafe?: boolean;
129
+ customDownload?: (ctx: {
130
+ item: FilePreviewListItem_Intf | null;
131
+ index: number;
132
+ src: FilePreviewSrc_Type;
133
+ fileName?: string;
134
+ downloadName: string;
135
+ }) => void | Promise<void>;
136
+ }> & Readonly<{
137
+ onError?: ((err: unknown) => any) | undefined;
138
+ onCancel?: (() => any) | undefined;
139
+ "onUpdate:visible"?: ((open: boolean) => any) | undefined;
140
+ onRendered?: (() => any) | undefined;
141
+ "onUpdate:fileIndex"?: ((index: number) => any) | undefined;
142
+ onFileChange?: ((payload: {
143
+ index: number;
144
+ item: FilePreviewListItem_Intf | null;
145
+ }) => any) | undefined;
146
+ onBeforeDownload?: ((payload: {
147
+ item: FilePreviewListItem_Intf | null;
148
+ index: number;
149
+ }) => any) | undefined;
150
+ onDownloaded?: ((payload: {
151
+ item: FilePreviewListItem_Intf | null;
152
+ index: number;
153
+ }) => any) | undefined;
154
+ }>, {
155
+ previewKind: ComputedRef<FilePreviewKind_Type>;
156
+ safeIndex: ComputedRef<number>;
157
+ currentListItem: ComputedRef< FilePreviewListItem_Intf | null>;
158
+ effectiveSrc: ComputedRef<FilePreviewSrc_Type>;
159
+ effectiveFileName: ComputedRef<string>;
160
+ goPrev: () => void;
161
+ goNext: () => void;
162
+ download: () => Promise<void>;
163
+ closeModal: () => void;
164
+ }, {}, {}, {}, {
165
+ modalWidth: string | number;
166
+ visible: boolean;
167
+ centered: boolean;
168
+ maskClosable: boolean;
169
+ destroyOnClose: boolean;
170
+ keyboard: boolean;
171
+ height: string;
172
+ fileList: FilePreviewListItem_Intf[];
43
173
  fileName: string;
44
- mobile: boolean;
174
+ src: string | Blob | ArrayBuffer | null;
175
+ fileIndex: number;
176
+ excelOptions: FilePreviewExcelOptions_Intf;
177
+ pdfStaticFileUrl: string;
178
+ modalTitlePrefix: string;
179
+ modalTitleOverride: string;
180
+ showDownload: boolean;
181
+ showNav: boolean;
45
182
  needSafe: boolean;
46
- previewVisible: boolean;
47
- showAttachmentNav: boolean;
48
- hasPrevAttachment: boolean;
49
- hasNextAttachment: boolean;
50
- isTitleTip: boolean;
51
- titleTip: string;
52
- needModal: boolean;
53
- $props: {
54
- readonly url?: string | undefined;
55
- readonly file?: File | undefined;
56
- readonly fileName?: string | undefined;
57
- readonly mobile?: boolean | undefined;
58
- readonly needSafe?: boolean | undefined;
59
- readonly previewVisible?: boolean | undefined;
60
- readonly showAttachmentNav?: boolean | undefined;
61
- readonly hasPrevAttachment?: boolean | undefined;
62
- readonly hasNextAttachment?: boolean | undefined;
63
- readonly isTitleTip?: boolean | undefined;
64
- readonly titleTip?: string | undefined;
65
- readonly needModal?: boolean | undefined;
66
- };
67
- }, {}, {}, {}, {}>;
183
+ customDownload: (ctx: {
184
+ item: FilePreviewListItem_Intf | null;
185
+ index: number;
186
+ src: FilePreviewSrc_Type;
187
+ fileName?: string;
188
+ downloadName: string;
189
+ }) => void | Promise<void>;
190
+ }>;
68
191
  __isFragment?: never;
69
192
  __isTeleport?: never;
70
193
  __isSuspense?: never;
71
- } & ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {
72
- $emit: (event: "closeModal" | "prevAttachment" | "nextAttachment", ...args: any[]) => void;
73
- url: string;
74
- file: File;
194
+ } & ComponentOptionsBase<Readonly<{
195
+ visible?: boolean;
196
+ src?: FilePreviewSrc_Type;
197
+ fileName?: string;
198
+ fileList?: FilePreviewListItem_Intf[];
199
+ fileIndex?: number;
200
+ height?: string;
201
+ excelOptions?: FilePreviewExcelOptions_Intf;
202
+ pdfStaticFileUrl?: string;
203
+ modalWidth?: string | number;
204
+ modalTitlePrefix?: string;
205
+ modalTitleOverride?: string;
206
+ showDownload?: boolean;
207
+ showNav?: boolean;
208
+ centered?: boolean;
209
+ destroyOnClose?: boolean;
210
+ maskClosable?: boolean;
211
+ keyboard?: boolean;
212
+ needSafe?: boolean;
213
+ customDownload?: (ctx: {
214
+ item: FilePreviewListItem_Intf | null;
215
+ index: number;
216
+ src: FilePreviewSrc_Type;
217
+ fileName?: string;
218
+ downloadName: string;
219
+ }) => void | Promise<void>;
220
+ }> & Readonly<{
221
+ onError?: ((err: unknown) => any) | undefined;
222
+ onCancel?: (() => any) | undefined;
223
+ "onUpdate:visible"?: ((open: boolean) => any) | undefined;
224
+ onRendered?: (() => any) | undefined;
225
+ "onUpdate:fileIndex"?: ((index: number) => any) | undefined;
226
+ onFileChange?: ((payload: {
227
+ index: number;
228
+ item: FilePreviewListItem_Intf | null;
229
+ }) => any) | undefined;
230
+ onBeforeDownload?: ((payload: {
231
+ item: FilePreviewListItem_Intf | null;
232
+ index: number;
233
+ }) => any) | undefined;
234
+ onDownloaded?: ((payload: {
235
+ item: FilePreviewListItem_Intf | null;
236
+ index: number;
237
+ }) => any) | undefined;
238
+ }>, {
239
+ previewKind: ComputedRef<FilePreviewKind_Type>;
240
+ safeIndex: ComputedRef<number>;
241
+ currentListItem: ComputedRef< FilePreviewListItem_Intf | null>;
242
+ effectiveSrc: ComputedRef<FilePreviewSrc_Type>;
243
+ effectiveFileName: ComputedRef<string>;
244
+ goPrev: () => void;
245
+ goNext: () => void;
246
+ download: () => Promise<void>;
247
+ closeModal: () => void;
248
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
249
+ error: (err: unknown) => any;
250
+ cancel: () => any;
251
+ "update:visible": (open: boolean) => any;
252
+ rendered: () => any;
253
+ "update:fileIndex": (index: number) => any;
254
+ fileChange: (payload: {
255
+ index: number;
256
+ item: FilePreviewListItem_Intf | null;
257
+ }) => any;
258
+ beforeDownload: (payload: {
259
+ item: FilePreviewListItem_Intf | null;
260
+ index: number;
261
+ }) => any;
262
+ downloaded: (payload: {
263
+ item: FilePreviewListItem_Intf | null;
264
+ index: number;
265
+ }) => any;
266
+ }, string, {
267
+ modalWidth: string | number;
268
+ visible: boolean;
269
+ centered: boolean;
270
+ maskClosable: boolean;
271
+ destroyOnClose: boolean;
272
+ keyboard: boolean;
273
+ height: string;
274
+ fileList: FilePreviewListItem_Intf[];
75
275
  fileName: string;
76
- mobile: boolean;
276
+ src: string | Blob | ArrayBuffer | null;
277
+ fileIndex: number;
278
+ excelOptions: FilePreviewExcelOptions_Intf;
279
+ pdfStaticFileUrl: string;
280
+ modalTitlePrefix: string;
281
+ modalTitleOverride: string;
282
+ showDownload: boolean;
283
+ showNav: boolean;
77
284
  needSafe: boolean;
78
- previewVisible: boolean;
79
- showAttachmentNav: boolean;
80
- hasPrevAttachment: boolean;
81
- hasNextAttachment: boolean;
82
- isTitleTip: boolean;
83
- titleTip: string;
84
- needModal: boolean;
85
- $props: {
86
- readonly url?: string | undefined;
87
- readonly file?: File | undefined;
88
- readonly fileName?: string | undefined;
89
- readonly mobile?: boolean | undefined;
90
- readonly needSafe?: boolean | undefined;
91
- readonly previewVisible?: boolean | undefined;
92
- readonly showAttachmentNav?: boolean | undefined;
93
- readonly hasPrevAttachment?: boolean | undefined;
94
- readonly hasNextAttachment?: boolean | undefined;
95
- readonly isTitleTip?: boolean | undefined;
96
- readonly titleTip?: string | undefined;
97
- readonly needModal?: boolean | undefined;
98
- };
99
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
285
+ customDownload: (ctx: {
286
+ item: FilePreviewListItem_Intf | null;
287
+ index: number;
288
+ src: FilePreviewSrc_Type;
289
+ fileName?: string;
290
+ downloadName: string;
291
+ }) => void | Promise<void>;
292
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
100
293
  $slots: {
101
- title?(_: {}): any;
102
- footer?(_: {}): any;
103
- footer?(_: {}): any;
294
+ empty?(_: {}): any;
295
+ empty?(_: {}): any;
296
+ unsupported?(_: {}): any;
297
+ unsupported?(_: {}): any;
298
+ 'footer-extra'?(_: {}): any;
104
299
  };
105
300
  })>;
106
301
  export default HbLibFilePreview;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/func_comp/hb_func_file_preview/index.ts"],"names":[],"mappings":";;AAGA,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA2B,CAAC;AAElD,eAAe,gBAAgB,CAAC;AAEhC,MAAM,MAAM,wBAAwB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/func_comp/hb_func_file_preview/index.ts"],"names":[],"mappings":";;;AAGA,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;oBAKixxB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAAD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAAD,CAAC;;;;;;;;;;;GALvvxB,CAAC;AAElD,eAAe,gBAAgB,CAAC;AAEhC,MAAM,MAAM,wBAAwB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -1,46 +1,180 @@
1
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
3
- export default _default;
4
- type __VLS_WithTemplateSlots<T, S> = T & (new () => {
5
- $slots: S;
6
- });
7
- declare const __VLS_component: DefineComponent<{}, {
8
- $emit: (event: "closeModal" | "prevAttachment" | "nextAttachment", ...args: any[]) => void;
9
- url: string;
10
- file: File;
11
- fileName: string;
12
- mobile: boolean;
13
- needSafe: boolean;
14
- previewVisible: boolean;
15
- showAttachmentNav: boolean;
16
- hasPrevAttachment: boolean;
17
- hasNextAttachment: boolean;
18
- isTitleTip: boolean;
19
- titleTip: string;
20
- needModal: boolean;
21
- $props: {
22
- readonly url?: string | undefined;
23
- readonly file?: File | undefined;
24
- readonly fileName?: string | undefined;
25
- readonly mobile?: boolean | undefined;
26
- readonly needSafe?: boolean | undefined;
27
- readonly previewVisible?: boolean | undefined;
28
- readonly showAttachmentNav?: boolean | undefined;
29
- readonly hasPrevAttachment?: boolean | undefined;
30
- readonly hasNextAttachment?: boolean | undefined;
31
- readonly isTitleTip?: boolean | undefined;
32
- readonly titleTip?: string | undefined;
33
- readonly needModal?: boolean | undefined;
34
- };
35
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
36
- type __VLS_TemplateResult = {
1
+ import { DefineComponent, ComputedRef, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ /** @vue-office/excel options 一致 */
3
+ export interface FilePreviewExcelOptions_Intf {
4
+ /** 最小列长度 */
5
+ minColLength?: number;
6
+ /** 最小行长度 */
7
+ minRowLength?: number;
8
+ /** 是否显示上下文菜单 */
9
+ showContextmenu?: boolean;
10
+ }
11
+ export type FilePreviewSrc_Type = string | ArrayBuffer | Blob | null | undefined;
12
+ export type FilePreviewKind_Type = 'docx' | 'excel' | 'pdf' | 'pptx' | 'image' | 'unknown';
13
+ /** 多文件列表单项:与单文件模式的 src / fileName 含义一致 */
14
+ export interface FilePreviewListItem_Intf {
15
+ /** 预览地址 */
16
+ src: Exclude<FilePreviewSrc_Type, null | undefined>;
17
+ /** 文件名 */
18
+ fileName?: string;
19
+ /** 下载名称 */
20
+ downloadName?: string;
21
+ /** 下载地址 */
22
+ downloadUrl?: string;
23
+ }
24
+ type __VLS_Props = {
25
+ /** 弹窗显示(v-model:visible) */
26
+ visible?: boolean;
27
+ /** 预览地址 */
28
+ src?: FilePreviewSrc_Type;
29
+ /** 文件名 */
30
+ fileName?: string;
31
+ /** 文件列表 */
32
+ fileList?: FilePreviewListItem_Intf[];
33
+ /** 文件索引 */
34
+ fileIndex?: number;
35
+ /** 容器高度 */
36
+ height?: string;
37
+ /** excel 选项 */
38
+ excelOptions?: FilePreviewExcelOptions_Intf;
39
+ /** pdf 静态文件地址 */
40
+ pdfStaticFileUrl?: string;
41
+ /** 弹窗宽度 */
42
+ modalWidth?: string | number;
43
+ /** 标题前缀,完整标题为「前缀 — 文件名」或带序号 */
44
+ modalTitlePrefix?: string;
45
+ /** 非空时覆盖自动生成的标题 */
46
+ modalTitleOverride?: string;
47
+ /** 是否展示 footer 中的下载按钮 */
48
+ showDownload?: boolean;
49
+ /** 多文件时是否展示上一个/下一个 */
50
+ showNav?: boolean;
51
+ /** 是否居中 */
52
+ centered?: boolean;
53
+ /** 是否销毁 on close */
54
+ destroyOnClose?: boolean;
55
+ /** 是否可关闭 */
56
+ maskClosable?: boolean;
57
+ /** 是否可键盘关闭 */
58
+ keyboard?: boolean;
59
+ /** 是否使用安全模式 */
60
+ needSafe?: boolean;
61
+ /** 自定义下载 */
62
+ customDownload?: (ctx: {
63
+ item: FilePreviewListItem_Intf | null;
64
+ index: number;
65
+ src: FilePreviewSrc_Type;
66
+ fileName?: string;
67
+ downloadName: string;
68
+ }) => void | Promise<void>;
69
+ };
70
+ /** 关闭弹窗 */
71
+ declare function closeModal(): void;
72
+ /** 上一个 */
73
+ declare function goPrev(): void;
74
+ /** 下一个 */
75
+ declare function goNext(): void;
76
+ /** 处理下载 */
77
+ declare function handleDownload(): Promise<void>;
78
+ declare function __VLS_template(): {
37
79
  attrs: Partial<{}>;
38
80
  slots: {
39
- title?(_: {}): any;
40
- footer?(_: {}): any;
41
- footer?(_: {}): any;
81
+ empty?(_: {}): any;
82
+ empty?(_: {}): any;
83
+ unsupported?(_: {}): any;
84
+ unsupported?(_: {}): any;
85
+ 'footer-extra'?(_: {}): any;
42
86
  };
43
87
  refs: {};
44
88
  rootEl: any;
45
89
  };
90
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
91
+ declare const __VLS_component: DefineComponent<__VLS_Props, {
92
+ /** 预览类型 */
93
+ previewKind: ComputedRef<FilePreviewKind_Type>;
94
+ /** 安全索引 */
95
+ safeIndex: ComputedRef<number>;
96
+ /** 当前列表项 */
97
+ currentListItem: ComputedRef<FilePreviewListItem_Intf | null>;
98
+ /** 有效 src */
99
+ effectiveSrc: ComputedRef<FilePreviewSrc_Type>;
100
+ /** 有效文件名 */
101
+ effectiveFileName: ComputedRef<string>;
102
+ /** 上一个 */
103
+ goPrev: typeof goPrev;
104
+ /** 下一个 */
105
+ goNext: typeof goNext;
106
+ /** 下载 */
107
+ download: typeof handleDownload;
108
+ /** 关闭 */
109
+ closeModal: typeof closeModal;
110
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
111
+ error: (err: unknown) => any;
112
+ cancel: () => any;
113
+ "update:visible": (open: boolean) => any;
114
+ rendered: () => any;
115
+ "update:fileIndex": (index: number) => any;
116
+ fileChange: (payload: {
117
+ index: number;
118
+ item: FilePreviewListItem_Intf | null;
119
+ }) => any;
120
+ beforeDownload: (payload: {
121
+ item: FilePreviewListItem_Intf | null;
122
+ index: number;
123
+ }) => any;
124
+ downloaded: (payload: {
125
+ item: FilePreviewListItem_Intf | null;
126
+ index: number;
127
+ }) => any;
128
+ }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
129
+ onError?: ((err: unknown) => any) | undefined;
130
+ onCancel?: (() => any) | undefined;
131
+ "onUpdate:visible"?: ((open: boolean) => any) | undefined;
132
+ onRendered?: (() => any) | undefined;
133
+ "onUpdate:fileIndex"?: ((index: number) => any) | undefined;
134
+ onFileChange?: ((payload: {
135
+ index: number;
136
+ item: FilePreviewListItem_Intf | null;
137
+ }) => any) | undefined;
138
+ onBeforeDownload?: ((payload: {
139
+ item: FilePreviewListItem_Intf | null;
140
+ index: number;
141
+ }) => any) | undefined;
142
+ onDownloaded?: ((payload: {
143
+ item: FilePreviewListItem_Intf | null;
144
+ index: number;
145
+ }) => any) | undefined;
146
+ }>, {
147
+ modalWidth: string | number;
148
+ visible: boolean;
149
+ centered: boolean;
150
+ maskClosable: boolean;
151
+ destroyOnClose: boolean;
152
+ keyboard: boolean;
153
+ height: string;
154
+ fileList: FilePreviewListItem_Intf[];
155
+ fileName: string;
156
+ src: string | Blob | ArrayBuffer | null;
157
+ fileIndex: number;
158
+ excelOptions: FilePreviewExcelOptions_Intf;
159
+ pdfStaticFileUrl: string;
160
+ modalTitlePrefix: string;
161
+ modalTitleOverride: string;
162
+ showDownload: boolean;
163
+ showNav: boolean;
164
+ needSafe: boolean;
165
+ customDownload: (ctx: {
166
+ item: FilePreviewListItem_Intf | null;
167
+ index: number;
168
+ src: FilePreviewSrc_Type;
169
+ fileName?: string;
170
+ downloadName: string;
171
+ }) => void | Promise<void>;
172
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
173
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
174
+ export default _default;
175
+ type __VLS_WithTemplateSlots<T, S> = T & {
176
+ new (): {
177
+ $slots: S;
178
+ };
179
+ };
46
180
  //# sourceMappingURL=file_preview.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"file_preview.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/func_comp/hb_func_file_preview/src/file_preview.vue"],"names":[],"mappings":";AAyUA;wBA6lEqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAXjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;2OAQG"}
1
+ {"version":3,"file":"file_preview.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/func_comp/hb_func_file_preview/src/file_preview.vue"],"names":[],"mappings":";AA8KA;AAgxBA,uCAAuC;AACvC,MAAM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,IAAI;eAAS,MAAM;;;;;;;;;eAR7C,MAAM;cAAQ,wBAAwB,GAAG,IAAI;;;cAI9C,wBAAwB,GAAG,IAAI;eAAS,MAAM;;;cAI9C,wBAAwB,GAAG,IAAI;eAAS,MAAM;;;gBAxElD,MAAM,GAAG,MAAM;aAhBlB,OAAO;cA0BN,OAAO;kBAIH,OAAO;oBAFL,OAAO;cAIb,OAAO;YAtBT,MAAM;cAJJ,wBAAwB,EAAE;cAF1B,MAAM;;eAIL,MAAM;kBAIH,4BAA4B;sBAExB,MAAM;sBAIN,MAAM;wBAEJ,MAAM;kBAEZ,OAAO;aAEZ,OAAO;cAUN,OAAO;oBAED,CAAC,GAAG,EAAE;QACnB,IAAI,EAAE,wBAAwB,GAAG,IAAI,CAAC;QACtC,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,mBAAmB,CAAC;QACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,YAAY,EAAE,MAAM,CAAC;KACxB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;6EA48BhC,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { InjectionKey } from 'vue';
2
+ /** 图标库的默认 iconfont CSS 地址 */
3
+ export declare const HB_ICON_DEFAULT_CSS_URL = "//at.alicdn.com/t/c/font_2862164_1wnr7wxlgxf.css";
4
+ /** 通过 app.use(HbLibIcon, options) 注入的全局配置 */
5
+ export interface HbLibIconGlobalOptions {
6
+ /** iconfont css 地址 */
7
+ cssUrl?: string;
8
+ }
9
+ /** provide/inject 的 key */
10
+ export declare const HB_ICON_GLOBAL_KEY: InjectionKey<HbLibIconGlobalOptions>;
11
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/components/func_comp/hb_func_icon_list/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AAExC,6BAA6B;AAC7B,eAAO,MAAM,uBAAuB,qDACkB,CAAC;AAEvD,6CAA6C;AAC7C,MAAM,WAAW,sBAAsB;IACnC,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,2BAA2B;AAC3B,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,sBAAsB,CAEnE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { Plugin } from 'vue';
2
+ import { default as Icon } from './src/icon_list';
3
+ import { HB_ICON_GLOBAL_KEY, HB_ICON_DEFAULT_CSS_URL, HbLibIconGlobalOptions } from './constants';
4
+ declare const HbLibIconList: typeof Icon & Plugin;
5
+ export default HbLibIconList;
6
+ export type HbLibIconListInstance = InstanceType<typeof HbLibIconList>;
7
+ export type { HbLibIconGlobalOptions };
8
+ export { HB_ICON_GLOBAL_KEY, HB_ICON_DEFAULT_CSS_URL };
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/func_comp/hb_func_icon_list/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAO,MAAM,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,IAAI,MAAM,qBAAqB,CAAC;AACvC,OAAO,EACH,kBAAkB,EAClB,uBAAuB,EACvB,KAAK,sBAAsB,EAC9B,MAAM,aAAa,CAAC;AAErB,QAAA,MAAM,aAAa,EAAW,OAAO,IAAI,GAAG,MAAM,CAAC;AAcnD,eAAe,aAAa,CAAC;AAE7B,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC;AACvE,YAAY,EAAE,sBAAsB,EAAE,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,CAAC"}