@ibiz-template-plugin/ibiz-file-previewer 0.0.6 → 0.0.8

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 (56) hide show
  1. package/README.md +3 -4
  2. package/dist/index.es.js +3422 -2154
  3. package/dist/index.legacy.js +1 -0
  4. package/dist/polyfills.legacy.js +4 -0
  5. package/dist/style.css +2 -2
  6. package/dist/types/src/component/file-preview-item/file-preview-html/file-preview-html.d.ts +15 -0
  7. package/dist/types/src/component/file-preview-item/file-preview-image/file-preview-image.d.ts +15 -0
  8. package/dist/types/src/component/file-preview-item/file-preview-image-group/file-preview-image-group.d.ts +15 -0
  9. package/dist/types/src/component/file-preview-item/file-preview-image-group/image-page/image-page.d.ts +24 -0
  10. package/dist/types/src/component/file-preview-item/file-preview-image-group/thumbnail-panel/thumbnail-panel.d.ts +18 -0
  11. package/dist/types/src/component/file-preview-item/file-preview-md/file-preview-md.d.ts +15 -0
  12. package/dist/types/src/component/file-preview-item/file-preview-text/file-preview-text.d.ts +15 -0
  13. package/dist/types/src/component/file-preview-item/file-preview-unknown/file-preview-unkown.d.ts +15 -0
  14. package/dist/types/src/component/file-preview-shell/file-preview-shell.d.ts +10 -0
  15. package/dist/types/{component → src/component}/index.d.ts +1 -0
  16. package/dist/types/src/component/loading/loading.d.ts +8 -0
  17. package/dist/types/src/component/teleport/teleport.d.ts +12 -0
  18. package/dist/types/{controller → src/controller}/file-preview-item/file-preview-item-controller.d.ts +8 -1
  19. package/dist/types/{controller → src/controller}/file-preview-item-dispatcher.d.ts +2 -3
  20. package/dist/types/{controller → src/controller}/file-preview-shell-controller.d.ts +16 -10
  21. package/dist/types/src/icon/index.d.ts +16 -0
  22. package/dist/types/{interface → src/interface}/i-file-preview-item-controller.d.ts +8 -0
  23. package/dist/types/src/interface/index.d.ts +3 -0
  24. package/package.json +17 -11
  25. package/dist/index.cjs +0 -1
  26. package/dist/index.umd.js +0 -1
  27. package/dist/types/component/file-preview-item/file-preview-html/file-preview-html.d.ts +0 -20
  28. package/dist/types/component/file-preview-item/file-preview-image/file-preview-image.d.ts +0 -22
  29. package/dist/types/component/file-preview-item/file-preview-image-group/file-preview-image-group.d.ts +0 -46
  30. package/dist/types/component/file-preview-item/file-preview-image-group/image-page/image-page.d.ts +0 -55
  31. package/dist/types/component/file-preview-item/file-preview-image-group/thumbnail-panel/thumbnail-panel.d.ts +0 -28
  32. package/dist/types/component/file-preview-item/file-preview-md/file-preview-md.d.ts +0 -24
  33. package/dist/types/component/file-preview-item/file-preview-text/file-preview-text.d.ts +0 -22
  34. package/dist/types/component/file-preview-item/file-preview-unknown/file-preview-unkown.d.ts +0 -21
  35. package/dist/types/component/file-preview-shell/file-preview-shell.d.ts +0 -27
  36. package/dist/types/component/loading/loading.d.ts +0 -14
  37. package/dist/types/hook/index.d.ts +0 -1
  38. package/dist/types/hook/use-teleport-with-delay.d.ts +0 -8
  39. package/dist/types/icon/index.d.ts +0 -17
  40. package/dist/types/interface/index.d.ts +0 -3
  41. /package/dist/types/{component → src/component}/file-preview-item/index.d.ts +0 -0
  42. /package/dist/types/{const → src/const}/constant.d.ts +0 -0
  43. /package/dist/types/{const → src/const}/index.d.ts +0 -0
  44. /package/dist/types/{const → src/const}/type.d.ts +0 -0
  45. /package/dist/types/{controller → src/controller}/file-preview-item/file-preview-image-controller.d.ts +0 -0
  46. /package/dist/types/{controller → src/controller}/file-preview-item/file-preview-image-group-controller.d.ts +0 -0
  47. /package/dist/types/{controller → src/controller}/file-preview-item/file-preview-md-controller.d.ts +0 -0
  48. /package/dist/types/{controller → src/controller}/file-preview-item/file-preview-text-controller.d.ts +0 -0
  49. /package/dist/types/{controller → src/controller}/file-preview-item/file-prview-html-controller.d.ts +0 -0
  50. /package/dist/types/{controller → src/controller}/file-preview-item/index.d.ts +0 -0
  51. /package/dist/types/{controller → src/controller}/index.d.ts +0 -0
  52. /package/dist/types/{index.d.ts → src/index.d.ts} +0 -0
  53. /package/dist/types/{interface → src/interface}/i-file-preview-shell-controller.d.ts +0 -0
  54. /package/dist/types/{interface → src/interface}/i-file-previewer-option.d.ts +0 -0
  55. /package/dist/types/{util → src/util}/index.d.ts +0 -0
  56. /package/dist/types/{util → src/util}/util.d.ts +0 -0
@@ -1,20 +0,0 @@
1
- import { PropType } from 'vue';
2
- import { FilePreviewHtmlController } from '../../../controller';
3
- import './file-preview-html.scss';
4
- export declare const FilePreviewHtml: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
- controller: {
6
- type: PropType<FilePreviewHtmlController>;
7
- required: true;
8
- };
9
- }>, {
10
- c: FilePreviewHtmlController<import("../../../interface").IFilePreviewItemState>;
11
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
- initialization: () => true;
13
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
14
- controller: {
15
- type: PropType<FilePreviewHtmlController>;
16
- required: true;
17
- };
18
- }>> & Readonly<{
19
- onInitialization?: (() => any) | undefined;
20
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,22 +0,0 @@
1
- import { PropType, CSSProperties } from 'vue';
2
- import { FilePreviewImageController } from '../../../controller';
3
- import './file-preview-image.scss';
4
- export declare const FilePreviewImage: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
- controller: {
6
- type: PropType<FilePreviewImageController>;
7
- required: true;
8
- };
9
- }>, {
10
- imgStyle: import("vue").ComputedRef<CSSProperties>;
11
- shouldRender: import("vue").Ref<boolean, boolean>;
12
- handleModeChange: (payload: Event) => void;
13
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
- initialization: () => true;
15
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
- controller: {
17
- type: PropType<FilePreviewImageController>;
18
- required: true;
19
- };
20
- }>> & Readonly<{
21
- onInitialization?: (() => any) | undefined;
22
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,46 +0,0 @@
1
- import { PropType } from 'vue';
2
- import { FilePreviewImageGroupController } from '../../../controller';
3
- import './file-preview-image-group.scss';
4
- export declare const FilePreviewImageGroup: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
- controller: {
6
- type: PropType<FilePreviewImageGroupController>;
7
- required: true;
8
- };
9
- }>, {
10
- state: {
11
- showThumbnailPanel: boolean;
12
- currentPage: number;
13
- items: {
14
- description: string;
15
- image_url: string;
16
- index: number;
17
- }[];
18
- total: number;
19
- rotateMap: Record<string, number>;
20
- scale: number;
21
- rotate: number;
22
- offsetX: number;
23
- offsetY: number;
24
- enableTransition: boolean;
25
- mode: import("../../../const").ImageMode;
26
- content: string | object;
27
- fileType: import("../../..").FileType;
28
- theme: "light" | "dark";
29
- };
30
- contentRef: import("vue").Ref<HTMLElement | null, HTMLElement | null>;
31
- shouldRender: import("vue").Ref<boolean, boolean>;
32
- handleInput: (e: Event) => void;
33
- handleScroll: () => void;
34
- handlePageClick: (pageIndex: number) => void;
35
- handleModeChange: (payload: Event) => void;
36
- updatePageChange: (type: "UP" | "DOWN") => void;
37
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
38
- initialization: () => true;
39
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
40
- controller: {
41
- type: PropType<FilePreviewImageGroupController>;
42
- required: true;
43
- };
44
- }>> & Readonly<{
45
- onInitialization?: (() => any) | undefined;
46
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,55 +0,0 @@
1
- import { PropType, CSSProperties } from 'vue';
2
- import { ImageMode } from '../../../../const';
3
- import './image-page.scss';
4
- /**
5
- * 图片页
6
- */
7
- export declare const ImagePage: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
8
- index: {
9
- type: NumberConstructor;
10
- required: true;
11
- };
12
- page: {
13
- type: PropType<any>;
14
- required: true;
15
- };
16
- mode: {
17
- type: PropType<ImageMode>;
18
- required: true;
19
- };
20
- scale: {
21
- type: NumberConstructor;
22
- required: true;
23
- };
24
- rotate: {
25
- type: NumberConstructor;
26
- required: true;
27
- };
28
- }>, {
29
- imgRef: import("vue").Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
30
- imgStyle: import("vue").ComputedRef<CSSProperties>;
31
- isLoading: import("vue").Ref<boolean, boolean>;
32
- handleImageLoad: () => void;
33
- handleImageError: (error: Event) => void;
34
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
35
- index: {
36
- type: NumberConstructor;
37
- required: true;
38
- };
39
- page: {
40
- type: PropType<any>;
41
- required: true;
42
- };
43
- mode: {
44
- type: PropType<ImageMode>;
45
- required: true;
46
- };
47
- scale: {
48
- type: NumberConstructor;
49
- required: true;
50
- };
51
- rotate: {
52
- type: NumberConstructor;
53
- required: true;
54
- };
55
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,28 +0,0 @@
1
- import { PropType } from 'vue';
2
- import './thumbnail-panel.scss';
3
- export declare const ThumbnailPanel: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
- pages: {
5
- type: PropType<Array<object>>;
6
- required: true;
7
- };
8
- currentPage: {
9
- type: NumberConstructor;
10
- required: true;
11
- };
12
- }>, {
13
- contentRef: import("vue").Ref<HTMLElement | null, HTMLElement | null>;
14
- handleClick: (index: number, event: MouseEvent) => void;
15
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
- pageClick: (number: number) => true;
17
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
18
- pages: {
19
- type: PropType<Array<object>>;
20
- required: true;
21
- };
22
- currentPage: {
23
- type: NumberConstructor;
24
- required: true;
25
- };
26
- }>> & Readonly<{
27
- onPageClick?: ((number: number) => any) | undefined;
28
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,24 +0,0 @@
1
- import { PropType } from 'vue';
2
- import { FilePreviewMDController } from '../../../controller';
3
- import 'vditor/dist/index.css';
4
- import './file-preview-md.scss';
5
- export declare const FilePreviewMD: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
6
- controller: {
7
- type: PropType<FilePreviewMDController>;
8
- required: true;
9
- };
10
- }>, {
11
- c: FilePreviewMDController;
12
- previewRef: import("vue").Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
13
- shouldRender: import("vue").Ref<boolean, boolean>;
14
- onOutline: () => void;
15
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
- initialization: () => true;
17
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
18
- controller: {
19
- type: PropType<FilePreviewMDController>;
20
- required: true;
21
- };
22
- }>> & Readonly<{
23
- onInitialization?: (() => any) | undefined;
24
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,22 +0,0 @@
1
- import { PropType } from 'vue';
2
- import { FilePreviewTextController } from '../../../controller';
3
- import './file-preview-text.scss';
4
- export declare const FilePreviewText: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
- controller: {
6
- type: PropType<FilePreviewTextController>;
7
- required: true;
8
- };
9
- }>, {
10
- c: FilePreviewTextController<import("../../../interface").IFilePreviewItemState>;
11
- previewRef: import("vue").Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
12
- shouldRender: import("vue").Ref<boolean, boolean>;
13
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
- initialization: () => true;
15
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
- controller: {
17
- type: PropType<FilePreviewTextController>;
18
- required: true;
19
- };
20
- }>> & Readonly<{
21
- onInitialization?: (() => any) | undefined;
22
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,21 +0,0 @@
1
- import { PropType } from 'vue';
2
- import { FilePreviewTextController } from '../../../controller';
3
- import './file-preview-unkown.scss';
4
- export declare const FilePreviewUnkown: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
- controller: {
6
- type: PropType<FilePreviewTextController>;
7
- required: true;
8
- };
9
- }>, {
10
- c: FilePreviewTextController<import("../../../interface").IFilePreviewItemState>;
11
- fileType: import("../../..").FileType;
12
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
- initialization: () => true;
14
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
- controller: {
16
- type: PropType<FilePreviewTextController>;
17
- required: true;
18
- };
19
- }>> & Readonly<{
20
- onInitialization?: (() => any) | undefined;
21
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,27 +0,0 @@
1
- import { PropType } from 'vue';
2
- import { ActionType, EngineType } from '../../const';
3
- import { FilePreviewShellController } from '../../controller';
4
- import './file-preview-shell.scss';
5
- /**
6
- * 文件预览壳组件
7
- */
8
- export declare const FilePreviewShell: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
9
- controller: {
10
- type: PropType<FilePreviewShellController>;
11
- required: true;
12
- };
13
- }>, {
14
- state: import("vue").Ref<import("../../interface").IFilePreviewShellState, import("../../interface").IFilePreviewShellState>;
15
- controller: FilePreviewShellController;
16
- showEngineMenu: import("vue").Ref<boolean, boolean>;
17
- showDownloadMenu: import("vue").Ref<boolean, boolean>;
18
- handDownLoad: (actionType: ActionType.DOWNORIGINAL | ActionType.COPYTEXTCONTENT | ActionType.DOWNPDF | ActionType.DOWNMD, event: MouseEvent) => void;
19
- showwEngineOptions: () => void;
20
- showDownloadOptions: () => void;
21
- handleEngineOptionSelect: (value: EngineType) => void;
22
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
23
- controller: {
24
- type: PropType<FilePreviewShellController>;
25
- required: true;
26
- };
27
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,14 +0,0 @@
1
- import './loading.scss';
2
- export declare const Loading: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
- size: {
4
- type: NumberConstructor;
5
- default: number;
6
- };
7
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
8
- size: {
9
- type: NumberConstructor;
10
- default: number;
11
- };
12
- }>> & Readonly<{}>, {
13
- size: number;
14
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1 +0,0 @@
1
- export { useTeleportWithDelay } from './use-teleport-with-delay';
@@ -1,8 +0,0 @@
1
- import { Ref } from 'vue';
2
- /**
3
- * 延迟渲染 Teleport 内容的 Hook
4
- * 解决目标元素未准备好的问题
5
- */
6
- export declare const useTeleportWithDelay: () => {
7
- shouldRender: Ref<boolean>;
8
- };
@@ -1,17 +0,0 @@
1
- import { JSX } from "vue/jsx-runtime";
2
- export declare const ZoomOutSvg: () => JSX.Element;
3
- export declare const ZoomInSvg: () => JSX.Element;
4
- export declare const DownLoadSvg: () => JSX.Element;
5
- export declare const ClockwiseSvg: () => JSX.Element;
6
- export declare const CounterClockwiseSvg: () => JSX.Element;
7
- export declare const ThumbnailSvg: () => JSX.Element;
8
- export declare const UpPageSvg: () => JSX.Element;
9
- export declare const DownPageSvg: () => JSX.Element;
10
- export declare const DownSvg: () => JSX.Element;
11
- export declare const ResetSvg: () => JSX.Element;
12
- /**
13
- * loadding图标
14
- */
15
- export declare const LoaddingSvg: (props: {
16
- size: number;
17
- }) => JSX.Element;
@@ -1,3 +0,0 @@
1
- export type { IFilePreviewerData, IFilePreviewerOption, } from './i-file-previewer-option';
2
- export type { IFilePreviewShellState, IFilePreviewShellController, } from './i-file-preview-shell-controller';
3
- export type { IFilePreviewItemState, IFilePreviewImageState, IFilePreviewImageGroupState, IFilePreviewItemController, IFilePreviewItemConstructor, } from './i-file-preview-item-controller';
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes