@deskhero/dh_ui 2.50.0 → 2.50.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ import { SysContentRich } from "@/models/Editor.model";
2
+ import { EditorTransformer } from "@/models/EditorTransformer";
3
+ export declare const EditorjsTransformer: EditorTransformer<SysContentRich>;
@@ -0,0 +1,29 @@
1
+ import type { EditorI18n } from "@/models/Editor.model";
2
+ declare const _default: import("vue").DefineComponent<{
3
+ readOnly: {
4
+ type: import("vue").PropType<boolean>;
5
+ };
6
+ isOverlayVisible: {
7
+ type: import("vue").PropType<boolean>;
8
+ };
9
+ i18n: {
10
+ type: import("vue").PropType<EditorI18n>;
11
+ };
12
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "accept-suggestion": () => void;
14
+ "dismiss-suggestion": () => void;
15
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
16
+ readOnly: {
17
+ type: import("vue").PropType<boolean>;
18
+ };
19
+ isOverlayVisible: {
20
+ type: import("vue").PropType<boolean>;
21
+ };
22
+ i18n: {
23
+ type: import("vue").PropType<EditorI18n>;
24
+ };
25
+ }>> & {
26
+ "onAccept-suggestion"?: (() => any) | undefined;
27
+ "onDismiss-suggestion"?: (() => any) | undefined;
28
+ }, {}, {}>;
29
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { EditorTransformer } from "@/models/EditorTransformer";
2
+ import type { JSONContent } from "@tiptap/vue-3";
3
+ export declare const TiptapTransformer: EditorTransformer<JSONContent>;
@@ -0,0 +1,73 @@
1
+ import { SysAttachment } from "@/models/Editor.model";
2
+ import { FileRegistration, UploadEventPayload } from "@/models/UploadedFile.model";
3
+ import type { JSONContent } from "@tiptap/vue-3";
4
+ declare const _default: import("vue").DefineComponent<{
5
+ data: {
6
+ type: import("vue").PropType<JSONContent>;
7
+ required: true;
8
+ };
9
+ i18n: {
10
+ type: import("vue").PropType<import("@/models/Editor.model").EditorI18n>;
11
+ };
12
+ readOnly: {
13
+ type: import("vue").PropType<boolean>;
14
+ default: boolean;
15
+ };
16
+ fileUpload: {
17
+ type: import("vue").PropType<(e: UploadEventPayload) => void>;
18
+ };
19
+ attachments: {
20
+ type: import("vue").PropType<SysAttachment[]>;
21
+ required: true;
22
+ };
23
+ toolbarPosition: {
24
+ type: import("vue").PropType<"left" | "right">;
25
+ default: string;
26
+ };
27
+ suggestedReply: {
28
+ type: import("vue").PropType<JSONContent>;
29
+ };
30
+ }, {
31
+ acceptSuggestion: () => void;
32
+ registerFiles: (payload: FileRegistration) => void;
33
+ isEmpty: () => boolean;
34
+ insertSignature: (payload: JSONContent, att: SysAttachment[]) => void;
35
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
36
+ "update:data": (value: JSONContent | JSONContent[] | undefined) => void;
37
+ "update:attachments": (value: SysAttachment[]) => void;
38
+ "file-upload": (val: UploadEventPayload) => void;
39
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
40
+ data: {
41
+ type: import("vue").PropType<JSONContent>;
42
+ required: true;
43
+ };
44
+ i18n: {
45
+ type: import("vue").PropType<import("@/models/Editor.model").EditorI18n>;
46
+ };
47
+ readOnly: {
48
+ type: import("vue").PropType<boolean>;
49
+ default: boolean;
50
+ };
51
+ fileUpload: {
52
+ type: import("vue").PropType<(e: UploadEventPayload) => void>;
53
+ };
54
+ attachments: {
55
+ type: import("vue").PropType<SysAttachment[]>;
56
+ required: true;
57
+ };
58
+ toolbarPosition: {
59
+ type: import("vue").PropType<"left" | "right">;
60
+ default: string;
61
+ };
62
+ suggestedReply: {
63
+ type: import("vue").PropType<JSONContent>;
64
+ };
65
+ }>> & {
66
+ "onFile-upload"?: ((val: UploadEventPayload) => any) | undefined;
67
+ "onUpdate:data"?: ((value: JSONContent | JSONContent[] | undefined) => any) | undefined;
68
+ "onUpdate:attachments"?: ((value: SysAttachment[]) => any) | undefined;
69
+ }, {
70
+ readOnly: boolean;
71
+ toolbarPosition: "left" | "right";
72
+ }, {}>;
73
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import type { EditorI18n } from "@/models/Editor.model";
2
+ declare const _default: import("vue").DefineComponent<{
3
+ i18n: {
4
+ type: import("vue").PropType<EditorI18n>;
5
+ };
6
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
7
+ i18n: {
8
+ type: import("vue").PropType<EditorI18n>;
9
+ };
10
+ }>>, {}, {}>;
11
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import type { EditorI18n } from "@/models/Editor.model";
2
+ declare const _default: import("vue").DefineComponent<{
3
+ i18n: {
4
+ type: import("vue").PropType<EditorI18n>;
5
+ };
6
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
7
+ i18n: {
8
+ type: import("vue").PropType<EditorI18n>;
9
+ };
10
+ }>>, {}, {}>;
11
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
+ export default _default;
@@ -0,0 +1,8 @@
1
+ export declare function useScrollDetector(): {
2
+ wrapperRef: import("vue").Ref<unknown>;
3
+ toolbarRef: import("vue").Ref<unknown>;
4
+ sentinelRef: import("vue").Ref<unknown>;
5
+ toolbarStyle: import("vue").Ref<Record<string, string>>;
6
+ wrapperStyle: import("vue").Ref<Record<string, string>>;
7
+ isFloating: import("vue").Ref<boolean>;
8
+ };
@@ -0,0 +1,81 @@
1
+ import type { SysContentRich, SysAttachment, EditorI18n } from "@/models/Editor.model";
2
+ import { FileRegistration, UploadEventPayload } from "@/models/UploadedFile.model";
3
+ declare const _default: import("vue").DefineComponent<{
4
+ data: {
5
+ type: import("vue").PropType<SysContentRich>;
6
+ required: true;
7
+ };
8
+ i18n: {
9
+ type: import("vue").PropType<EditorI18n>;
10
+ default: undefined;
11
+ };
12
+ readOnly: {
13
+ type: import("vue").PropType<boolean>;
14
+ default: boolean;
15
+ };
16
+ attachments: {
17
+ type: import("vue").PropType<SysAttachment[]>;
18
+ required: true;
19
+ };
20
+ toolbarPosition: {
21
+ type: import("vue").PropType<"left" | "right">;
22
+ default: string;
23
+ };
24
+ suggestedReply: {
25
+ type: import("vue").PropType<SysContentRich>;
26
+ default: undefined;
27
+ };
28
+ editorType: {
29
+ type: import("vue").PropType<"tiptap" | "editorjs">;
30
+ default: string;
31
+ };
32
+ }, {
33
+ registerFiles: (payload: FileRegistration) => void;
34
+ insertSignature: (payload: SysContentRich, att: SysAttachment[]) => void;
35
+ isEmpty: () => any;
36
+ acceptSuggestion: () => void;
37
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
38
+ "update:data": (val: SysContentRich) => void;
39
+ "update:attachments": (value: SysAttachment[]) => void;
40
+ "file-upload": (val: UploadEventPayload) => void;
41
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
42
+ data: {
43
+ type: import("vue").PropType<SysContentRich>;
44
+ required: true;
45
+ };
46
+ i18n: {
47
+ type: import("vue").PropType<EditorI18n>;
48
+ default: undefined;
49
+ };
50
+ readOnly: {
51
+ type: import("vue").PropType<boolean>;
52
+ default: boolean;
53
+ };
54
+ attachments: {
55
+ type: import("vue").PropType<SysAttachment[]>;
56
+ required: true;
57
+ };
58
+ toolbarPosition: {
59
+ type: import("vue").PropType<"left" | "right">;
60
+ default: string;
61
+ };
62
+ suggestedReply: {
63
+ type: import("vue").PropType<SysContentRich>;
64
+ default: undefined;
65
+ };
66
+ editorType: {
67
+ type: import("vue").PropType<"tiptap" | "editorjs">;
68
+ default: string;
69
+ };
70
+ }>> & {
71
+ "onFile-upload"?: ((val: UploadEventPayload) => any) | undefined;
72
+ "onUpdate:data"?: ((val: SysContentRich) => any) | undefined;
73
+ "onUpdate:attachments"?: ((value: SysAttachment[]) => any) | undefined;
74
+ }, {
75
+ i18n: EditorI18n;
76
+ readOnly: boolean;
77
+ toolbarPosition: "left" | "right";
78
+ suggestedReply: SysContentRich;
79
+ editorType: "tiptap" | "editorjs";
80
+ }, {}>;
81
+ export default _default;
@@ -0,0 +1,45 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ code: {
3
+ type: StringConstructor;
4
+ required: false;
5
+ default: string;
6
+ };
7
+ focusOnFirstInput: {
8
+ type: BooleanConstructor;
9
+ default: boolean;
10
+ };
11
+ focusOnFirstInputDelay: {
12
+ type: NumberConstructor;
13
+ default: number;
14
+ };
15
+ autoComplete: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
19
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "submit"[], "submit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
20
+ code: {
21
+ type: StringConstructor;
22
+ required: false;
23
+ default: string;
24
+ };
25
+ focusOnFirstInput: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ focusOnFirstInputDelay: {
30
+ type: NumberConstructor;
31
+ default: number;
32
+ };
33
+ autoComplete: {
34
+ type: StringConstructor;
35
+ default: string;
36
+ };
37
+ }>> & {
38
+ onSubmit?: ((...args: any[]) => any) | undefined;
39
+ }, {
40
+ code: string;
41
+ autoComplete: string;
42
+ focusOnFirstInput: boolean;
43
+ focusOnFirstInputDelay: number;
44
+ }, {}>;
45
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import type { EditorViewComponent } from "@/models/EditorView.model";
2
+ import { OutputData } from "@editorjs/editorjs";
3
+ import { JSONContent } from "@tiptap/vue-3";
4
+ export type EditorType = "editorjs" | "tiptap";
5
+ declare const registry: {
6
+ readonly editorjs: {
7
+ readonly component: EditorViewComponent<OutputData>;
8
+ readonly transformer: import("../models/EditorTransformer").EditorTransformer<import("../models/Editor.model").SysContentRich>;
9
+ };
10
+ readonly tiptap: {
11
+ readonly component: EditorViewComponent<JSONContent>;
12
+ readonly transformer: import("../models/EditorTransformer").EditorTransformer<JSONContent>;
13
+ };
14
+ };
15
+ export declare function createEditor<T extends keyof typeof registry>(type: T): {
16
+ component: EditorViewComponent<OutputData> | EditorViewComponent<JSONContent>;
17
+ transformer: import("../models/EditorTransformer").EditorTransformer<import("../models/Editor.model").SysContentRich> | import("../models/EditorTransformer").EditorTransformer<JSONContent>;
18
+ };
19
+ export {};
@@ -0,0 +1,5 @@
1
+ import { SysContentRich } from "./Editor.model";
2
+ export interface EditorTransformer<TEditorData> {
3
+ toEditorData: (sys: SysContentRich | undefined) => TEditorData;
4
+ fromEditorData: (sys: SysContentRich, editorData: TEditorData) => SysContentRich;
5
+ }