@deskhero/dh_ui 2.49.1 → 2.49.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.
- package/README.md +100 -100
- package/dist/adapters/editorjs/EditorjsTransformer.d.ts +3 -0
- package/dist/adapters/editorjs/EditorjsView.vue.d.ts +72 -0
- package/dist/adapters/tiptap/SimpleTemplate.vue.d.ts +29 -0
- package/dist/adapters/tiptap/TiptapAdapter.d.ts +26 -0
- package/dist/adapters/tiptap/TiptapTransformer.d.ts +3 -0
- package/dist/adapters/tiptap/TiptapView.vue.d.ts +73 -0
- package/dist/adapters/tiptap/components/TextAlignButton.vue.d.ts +12 -0
- package/dist/adapters/tiptap/components/ToolbarGroup.vue.d.ts +17 -0
- package/dist/adapters/tiptap/components/button/ButtonGroup.vue.d.ts +29 -0
- package/dist/adapters/tiptap/components/tiptap-icons/HeadingFiveIcon.vue.d.ts +2 -0
- package/dist/adapters/tiptap/components/tiptap-icons/HeadingSixIcon.vue.d.ts +2 -0
- package/dist/adapters/tiptap/composables/useMenuNavigation.d.ts +18 -0
- package/dist/adapters/tiptap/composables/useScrollDetector.d.ts +8 -0
- package/dist/assets/fonts/Rubik-Bold.ttf +0 -0
- package/dist/assets/fonts/Rubik-Bold.woff2 +0 -0
- package/dist/assets/fonts/Rubik-Medium.ttf +0 -0
- package/dist/assets/fonts/Rubik-Medium.woff2 +0 -0
- package/dist/assets/fonts/Rubik-Regular.ttf +0 -0
- package/dist/assets/fonts/Rubik-Regular.woff2 +0 -0
- package/dist/components/ColorPicker.vue.d.ts +17 -0
- package/dist/components/IconWithText.vue.d.ts +149 -0
- package/dist/components/ImageCropper.vue.d.ts +73 -0
- package/dist/components/InputWithList/DropdownList.vue.d.ts +90 -0
- package/dist/components/InputWithList/MultipleInput.vue.d.ts +87 -0
- package/dist/components/InputWithList/SingleInput.vue.d.ts +48 -0
- package/dist/components/InputWithList/TagItem.vue.d.ts +33 -0
- package/dist/components/InputWithList/configs/input-with-list.config.d.ts +8 -0
- package/dist/components/InputWithList.vue.d.ts +165 -0
- package/dist/components/LineChart.vue.d.ts +9 -0
- package/dist/components/Tags.vue.d.ts +91 -0
- package/dist/components/TextEditor.vue.d.ts +81 -0
- package/dist/components/TextEditorLegacy.vue.d.ts +40 -0
- package/dist/components/VerificationCode.vue.d.ts +45 -0
- package/dist/components/configs/input-with-list.config.d.ts +8 -0
- package/dist/dh_ui.es.js +68747 -0
- package/dist/dh_ui.umd.js +739 -0
- package/dist/factories/EditorFactory.d.ts +19 -0
- package/dist/favicon.ico +0 -0
- package/dist/helpers/inputWithListUtils.d.ts +4 -0
- package/dist/index.d.ts +39 -0
- package/dist/main.d.ts +1 -0
- package/dist/models/EditorJSi18n.model.d.ts +109 -0
- package/dist/models/EditorTransformer.d.ts +5 -0
- package/dist/models/InputList.model.d.ts +4 -0
- package/dist/models/InputWithList.model.d.ts +1 -0
- package/dist/style.css +9 -0
- package/dist/tools/editorCode.d.ts +21 -0
- package/package.json +185 -184
package/README.md
CHANGED
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
## Deskhero ui
|
|
2
|
-
|
|
3
|
-
[Deskhero](https://www.deskhero.com) ui is component library, based on Deskhero design system and Vue 3.
|
|
4
|
-
|
|
5
|
-

|
|
6
|
-
|
|
7
|
-
<hr/>
|
|
8
|
-
|
|
9
|
-
Preview the latest changes on [Chromatic](https://master--62ad76d1e03689594b024ea4.chromatic.com/)
|
|
10
|
-
|
|
11
|
-
## Installation
|
|
12
|
-
|
|
13
|
-
Install the component library
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
npm i @deskhero/dh_ui
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Usage
|
|
20
|
-
|
|
21
|
-
You can import from the main bundle:
|
|
22
|
-
|
|
23
|
-
```javascript
|
|
24
|
-
import { DhIcon } from "@deskhero/dh_ui";
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
then on html:
|
|
28
|
-
|
|
29
|
-
```javascript
|
|
30
|
-
<dh-icon :icon-name="'search'" :size="24" />
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
You also need to import Main CSS file to your project
|
|
34
|
-
|
|
35
|
-
```javascript
|
|
36
|
-
import "@deskhero/dh_ui/dist/style.css";
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Storybook
|
|
40
|
-
|
|
41
|
-
Storybook helps you build UI components in isolation from your app's business logic, data, and context. That makes it easy to develop hard-to-reach states. Save these UI states as stories to revisit during development, testing, or QA.
|
|
42
|
-
|
|
43
|
-
We are using storybook in order to develop the components independently from any consumer.
|
|
44
|
-
run this to build & run the storybook locally:
|
|
45
|
-
|
|
46
|
-
First install the node packages:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
npm install
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
then serve storybook application
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
npm run storybook
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
the storybook will be served on `http://localhost:6006`
|
|
59
|
-
|
|
60
|
-
## Developing locally with your consumer application
|
|
61
|
-
|
|
62
|
-
When developing locally we are using a npm functionality called npm link, this allows us to
|
|
63
|
-
work locally on our package and use it in a different project without publishing.
|
|
64
|
-
This functionality basically overrides the npm mapping between package name to its repo, and points it to where the package is located locally.
|
|
65
|
-
|
|
66
|
-
From dh_ui
|
|
67
|
-
|
|
68
|
-
```sh
|
|
69
|
-
npm run build && npm link
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
Then on your project
|
|
73
|
-
|
|
74
|
-
```sh
|
|
75
|
-
npm link @deskhero/dh_ui
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
<hr/>
|
|
79
|
-
|
|
80
|
-
### Recommended IDE Setup
|
|
81
|
-
|
|
82
|
-
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
|
|
83
|
-
|
|
84
|
-
### Type Support for .vue Imports in TS
|
|
85
|
-
|
|
86
|
-
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
|
|
87
|
-
|
|
88
|
-
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
|
|
89
|
-
|
|
90
|
-
1. Disable the built-in TypeScript Extension
|
|
91
|
-
1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
|
|
92
|
-
2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
|
|
93
|
-
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
|
|
94
|
-
|
|
95
|
-
<hr/>
|
|
96
|
-
|
|
97
|
-
### Types
|
|
98
|
-
|
|
99
|
-
if your component use a specific model/type, please export it by adding it on the /src/models/index.ts.
|
|
100
|
-
You can use the DropdownMenuItem as an example.
|
|
1
|
+
## Deskhero ui
|
|
2
|
+
|
|
3
|
+
[Deskhero](https://www.deskhero.com) ui is component library, based on Deskhero design system and Vue 3.
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
<hr/>
|
|
8
|
+
|
|
9
|
+
Preview the latest changes on [Chromatic](https://master--62ad76d1e03689594b024ea4.chromatic.com/)
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
Install the component library
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
npm i @deskhero/dh_ui
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
You can import from the main bundle:
|
|
22
|
+
|
|
23
|
+
```javascript
|
|
24
|
+
import { DhIcon } from "@deskhero/dh_ui";
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
then on html:
|
|
28
|
+
|
|
29
|
+
```javascript
|
|
30
|
+
<dh-icon :icon-name="'search'" :size="24" />
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
You also need to import Main CSS file to your project
|
|
34
|
+
|
|
35
|
+
```javascript
|
|
36
|
+
import "@deskhero/dh_ui/dist/style.css";
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Storybook
|
|
40
|
+
|
|
41
|
+
Storybook helps you build UI components in isolation from your app's business logic, data, and context. That makes it easy to develop hard-to-reach states. Save these UI states as stories to revisit during development, testing, or QA.
|
|
42
|
+
|
|
43
|
+
We are using storybook in order to develop the components independently from any consumer.
|
|
44
|
+
run this to build & run the storybook locally:
|
|
45
|
+
|
|
46
|
+
First install the node packages:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npm install
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
then serve storybook application
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm run storybook
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
the storybook will be served on `http://localhost:6006`
|
|
59
|
+
|
|
60
|
+
## Developing locally with your consumer application
|
|
61
|
+
|
|
62
|
+
When developing locally we are using a npm functionality called npm link, this allows us to
|
|
63
|
+
work locally on our package and use it in a different project without publishing.
|
|
64
|
+
This functionality basically overrides the npm mapping between package name to its repo, and points it to where the package is located locally.
|
|
65
|
+
|
|
66
|
+
From dh_ui
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
npm run build && npm link
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Then on your project
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
npm link @deskhero/dh_ui
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
<hr/>
|
|
79
|
+
|
|
80
|
+
### Recommended IDE Setup
|
|
81
|
+
|
|
82
|
+
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
|
|
83
|
+
|
|
84
|
+
### Type Support for .vue Imports in TS
|
|
85
|
+
|
|
86
|
+
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
|
|
87
|
+
|
|
88
|
+
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
|
|
89
|
+
|
|
90
|
+
1. Disable the built-in TypeScript Extension
|
|
91
|
+
1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
|
|
92
|
+
2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
|
|
93
|
+
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
|
|
94
|
+
|
|
95
|
+
<hr/>
|
|
96
|
+
|
|
97
|
+
### Types
|
|
98
|
+
|
|
99
|
+
if your component use a specific model/type, please export it by adding it on the /src/models/index.ts.
|
|
100
|
+
You can use the DropdownMenuItem as an example.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { SysContentRich, SysAttachment } 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<import("@/models/Editor.model").EditorI18n>;
|
|
10
|
+
};
|
|
11
|
+
readOnly: {
|
|
12
|
+
type: import("vue").PropType<boolean>;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
fileUpload: {
|
|
16
|
+
type: import("vue").PropType<(e: UploadEventPayload) => void>;
|
|
17
|
+
};
|
|
18
|
+
attachments: {
|
|
19
|
+
type: import("vue").PropType<SysAttachment[]>;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
toolbarPosition: {
|
|
23
|
+
type: import("vue").PropType<"left" | "right">;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
suggestedReply: {
|
|
27
|
+
type: import("vue").PropType<SysContentRich>;
|
|
28
|
+
};
|
|
29
|
+
}, {
|
|
30
|
+
acceptSuggestion: () => void;
|
|
31
|
+
isEmpty: () => Promise<boolean>;
|
|
32
|
+
registerFiles: (payload: FileRegistration) => void;
|
|
33
|
+
insertSignature: (payload: SysContentRich, att: SysAttachment[]) => void;
|
|
34
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
35
|
+
"update:data": (value: SysContentRich) => void;
|
|
36
|
+
"update:attachments": (value: SysAttachment[]) => void;
|
|
37
|
+
"file-upload": (val: UploadEventPayload) => void;
|
|
38
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
39
|
+
data: {
|
|
40
|
+
type: import("vue").PropType<SysContentRich>;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
i18n: {
|
|
44
|
+
type: import("vue").PropType<import("@/models/Editor.model").EditorI18n>;
|
|
45
|
+
};
|
|
46
|
+
readOnly: {
|
|
47
|
+
type: import("vue").PropType<boolean>;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
fileUpload: {
|
|
51
|
+
type: import("vue").PropType<(e: UploadEventPayload) => void>;
|
|
52
|
+
};
|
|
53
|
+
attachments: {
|
|
54
|
+
type: import("vue").PropType<SysAttachment[]>;
|
|
55
|
+
required: true;
|
|
56
|
+
};
|
|
57
|
+
toolbarPosition: {
|
|
58
|
+
type: import("vue").PropType<"left" | "right">;
|
|
59
|
+
default: string;
|
|
60
|
+
};
|
|
61
|
+
suggestedReply: {
|
|
62
|
+
type: import("vue").PropType<SysContentRich>;
|
|
63
|
+
};
|
|
64
|
+
}>> & {
|
|
65
|
+
"onFile-upload"?: ((val: UploadEventPayload) => any) | undefined;
|
|
66
|
+
"onUpdate:data"?: ((value: SysContentRich) => any) | undefined;
|
|
67
|
+
"onUpdate:attachments"?: ((value: SysAttachment[]) => any) | undefined;
|
|
68
|
+
}, {
|
|
69
|
+
readOnly: boolean;
|
|
70
|
+
toolbarPosition: "left" | "right";
|
|
71
|
+
}, {}>;
|
|
72
|
+
export default _default;
|
|
@@ -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,26 @@
|
|
|
1
|
+
import type { EditorAdapter } from "@/models/EditorAdapter";
|
|
2
|
+
import type { SysContentRich, SysAttachment } from "@/models/Editor.model";
|
|
3
|
+
import type { FileRegistration, UploadEventPayload } from "@/models/UploadedFile.model";
|
|
4
|
+
export declare class TiptapAdapter implements EditorAdapter {
|
|
5
|
+
private resolveReady;
|
|
6
|
+
ready: Promise<void>;
|
|
7
|
+
private makeReady;
|
|
8
|
+
constructor();
|
|
9
|
+
mount(): void;
|
|
10
|
+
destroy(): void;
|
|
11
|
+
getContent(): Promise<SysContentRich>;
|
|
12
|
+
setContent(data: SysContentRich, attachments: SysAttachment[]): Promise<void>;
|
|
13
|
+
clearContent(): Promise<void>;
|
|
14
|
+
onContentChange(cb: (data: SysContentRich) => void): void;
|
|
15
|
+
updateAttachments(attachments: SysAttachment[]): Promise<void>;
|
|
16
|
+
updateContent(data: SysContentRich): void;
|
|
17
|
+
onFileUpload(cb: (event: UploadEventPayload) => Promise<void>): void;
|
|
18
|
+
onAttachmentChange(cb: (attachments: SysAttachment[]) => void): void;
|
|
19
|
+
registerFiles(payload: FileRegistration): void;
|
|
20
|
+
toggleReadOnly(val: boolean): void;
|
|
21
|
+
isSignatureOnly(): Promise<boolean>;
|
|
22
|
+
insertSignature(payload: SysContentRich, _att: SysAttachment[]): Promise<void>;
|
|
23
|
+
isEmpty(): Promise<boolean>;
|
|
24
|
+
acceptSuggestion(): void;
|
|
25
|
+
setIsSuggestion(val: boolean): void;
|
|
26
|
+
}
|
|
@@ -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,12 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
align: {
|
|
3
|
+
type: import("vue").PropType<"center" | "left" | "right" | "justify">;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
|
+
align: {
|
|
8
|
+
type: import("vue").PropType<"center" | "left" | "right" | "justify">;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
}>>, {}, {}>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
|
+
class: {
|
|
3
|
+
type: import("vue").PropType<string>;
|
|
4
|
+
};
|
|
5
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
6
|
+
class: {
|
|
7
|
+
type: import("vue").PropType<string>;
|
|
8
|
+
};
|
|
9
|
+
}>>, {}, {}>, {
|
|
10
|
+
default?(_: {}): any;
|
|
11
|
+
}>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
|
+
class: {
|
|
3
|
+
type: import("vue").PropType<string>;
|
|
4
|
+
};
|
|
5
|
+
orientation: {
|
|
6
|
+
type: import("vue").PropType<"vertical" | "horizontal">;
|
|
7
|
+
};
|
|
8
|
+
role: {
|
|
9
|
+
type: import("vue").PropType<string>;
|
|
10
|
+
};
|
|
11
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
class: {
|
|
13
|
+
type: import("vue").PropType<string>;
|
|
14
|
+
};
|
|
15
|
+
orientation: {
|
|
16
|
+
type: import("vue").PropType<"vertical" | "horizontal">;
|
|
17
|
+
};
|
|
18
|
+
role: {
|
|
19
|
+
type: import("vue").PropType<string>;
|
|
20
|
+
};
|
|
21
|
+
}>>, {}, {}>, {
|
|
22
|
+
default?(_: {}): any;
|
|
23
|
+
}>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -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,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,18 @@
|
|
|
1
|
+
import type { Ref } from "vue";
|
|
2
|
+
import type { Editor } from "@tiptap/vue-3";
|
|
3
|
+
type Orientation = "horizontal" | "vertical" | "both";
|
|
4
|
+
interface MenuNavigationOptions<T> {
|
|
5
|
+
editor?: Editor | null;
|
|
6
|
+
containerRef?: Ref<HTMLElement | null>;
|
|
7
|
+
query?: string;
|
|
8
|
+
items: Ref<T[]>;
|
|
9
|
+
onSelect?: (item: T) => void;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
orientation?: Orientation;
|
|
12
|
+
autoSelectFirstItem?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function useMenuNavigation<T>({ editor, containerRef, query, items, onSelect, onClose, orientation, autoSelectFirstItem, }: MenuNavigationOptions<T>): {
|
|
15
|
+
selectedIndex: import("vue").ComputedRef<number | undefined>;
|
|
16
|
+
setSelectedIndex: (i: number) => number;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -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
|
+
};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "vue3-colorpicker/style.css";
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
pureColor: {
|
|
4
|
+
type: import("vue").PropType<string>;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
"update:pure-color": (color: string) => void;
|
|
9
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
pureColor: {
|
|
11
|
+
type: import("vue").PropType<string>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}>> & {
|
|
15
|
+
"onUpdate:pure-color"?: ((color: string) => any) | undefined;
|
|
16
|
+
}, {}, {}>;
|
|
17
|
+
export default _default;
|