@cgboiler/biz-basic 1.0.3 → 1.0.4
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/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/rich-text-editor/RichTextEditor.d.ts +1 -1
- package/es/rich-text-editor/RichTextEditor.js +14 -1
- package/es/rich-text-editor/useExtensions.d.ts +0 -4
- package/es/rich-text-editor/useExtensions.js +3 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/rich-text-editor/RichTextEditor.d.ts +1 -1
- package/lib/rich-text-editor/RichTextEditor.js +14 -1
- package/lib/rich-text-editor/useExtensions.d.ts +0 -4
- package/lib/rich-text-editor/useExtensions.js +3 -1
- package/package.json +1 -1
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
|
@@ -27,7 +27,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
27
27
|
"onMention-triggered"?: ((...args: any[]) => any) | undefined;
|
|
28
28
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
29
29
|
}>, {
|
|
30
|
-
placeholder: string;
|
|
31
30
|
modelValue: string;
|
|
31
|
+
placeholder: string;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
33
33
|
export default _default;
|
|
@@ -10,7 +10,8 @@ var stdin_default = defineComponent({
|
|
|
10
10
|
props: richTextEditorProps,
|
|
11
11
|
emits: ["update:modelValue", "mention-triggered"],
|
|
12
12
|
setup(props, {
|
|
13
|
-
emit
|
|
13
|
+
emit,
|
|
14
|
+
expose
|
|
14
15
|
}) {
|
|
15
16
|
const editor = ref();
|
|
16
17
|
const extensions = useExtensions({
|
|
@@ -33,6 +34,18 @@ var stdin_default = defineComponent({
|
|
|
33
34
|
}
|
|
34
35
|
});
|
|
35
36
|
};
|
|
37
|
+
const insertMention = (data) => {
|
|
38
|
+
editor.value.commands.insertContent({
|
|
39
|
+
type: "mention",
|
|
40
|
+
attrs: {
|
|
41
|
+
id: data.userId,
|
|
42
|
+
label: data.name
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
expose({
|
|
47
|
+
insertMention
|
|
48
|
+
});
|
|
36
49
|
watch(() => props.modelValue, (newValue) => {
|
|
37
50
|
var _a, _b;
|
|
38
51
|
if (((_a = editor.value) == null ? void 0 : _a.getHTML()) !== newValue) {
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
export interface MentionData {
|
|
2
|
-
name: string;
|
|
3
|
-
userId: string;
|
|
4
|
-
}
|
|
5
1
|
export declare function useExtensions({ props, emit }: any): (import("@tiptap/core").Extension<import("@tiptap/starter-kit").StarterKitOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-image").ImageOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-table").TableKitOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extensions").PlaceholderOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-list").ListKitOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-mention").MentionOptions<any, import("@tiptap/extension-mention").MentionNodeAttrs>, any>)[];
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -36,7 +36,7 @@ __export(stdin_exports, {
|
|
|
36
36
|
module.exports = __toCommonJS(stdin_exports);
|
|
37
37
|
var import_rich_text_editor = __toESM(require("./rich-text-editor"));
|
|
38
38
|
__reExport(stdin_exports, require("./rich-text-editor"), module.exports);
|
|
39
|
-
const version = "1.0.
|
|
39
|
+
const version = "1.0.3";
|
|
40
40
|
function install(app) {
|
|
41
41
|
const components = [
|
|
42
42
|
import_rich_text_editor.default
|
|
@@ -27,7 +27,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
27
27
|
"onMention-triggered"?: ((...args: any[]) => any) | undefined;
|
|
28
28
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
29
29
|
}>, {
|
|
30
|
-
placeholder: string;
|
|
31
30
|
modelValue: string;
|
|
31
|
+
placeholder: string;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
33
33
|
export default _default;
|
|
@@ -32,7 +32,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
32
32
|
props: import_types.richTextEditorProps,
|
|
33
33
|
emits: ["update:modelValue", "mention-triggered"],
|
|
34
34
|
setup(props, {
|
|
35
|
-
emit
|
|
35
|
+
emit,
|
|
36
|
+
expose
|
|
36
37
|
}) {
|
|
37
38
|
const editor = (0, import_vue2.ref)();
|
|
38
39
|
const extensions = (0, import_useExtensions.useExtensions)({
|
|
@@ -55,6 +56,18 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
55
56
|
}
|
|
56
57
|
});
|
|
57
58
|
};
|
|
59
|
+
const insertMention = (data) => {
|
|
60
|
+
editor.value.commands.insertContent({
|
|
61
|
+
type: "mention",
|
|
62
|
+
attrs: {
|
|
63
|
+
id: data.userId,
|
|
64
|
+
label: data.name
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
expose({
|
|
69
|
+
insertMention
|
|
70
|
+
});
|
|
58
71
|
(0, import_vue2.watch)(() => props.modelValue, (newValue) => {
|
|
59
72
|
var _a, _b;
|
|
60
73
|
if (((_a = editor.value) == null ? void 0 : _a.getHTML()) !== newValue) {
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
export interface MentionData {
|
|
2
|
-
name: string;
|
|
3
|
-
userId: string;
|
|
4
|
-
}
|
|
5
1
|
export declare function useExtensions({ props, emit }: any): (import("@tiptap/core").Extension<import("@tiptap/starter-kit").StarterKitOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-image").ImageOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-table").TableKitOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extensions").PlaceholderOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-list").ListKitOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-mention").MentionOptions<any, import("@tiptap/extension-mention").MentionNodeAttrs>, any>)[];
|
|
@@ -44,7 +44,9 @@ function useExtensions({ props, emit }) {
|
|
|
44
44
|
table: { resizable: true }
|
|
45
45
|
}),
|
|
46
46
|
import_extensions.Placeholder.configure({
|
|
47
|
-
placeholder:
|
|
47
|
+
placeholder: () => {
|
|
48
|
+
return props.placeholder;
|
|
49
|
+
}
|
|
48
50
|
}),
|
|
49
51
|
import_extension_list.ListKit.extend({
|
|
50
52
|
addKeyboardShortcuts() {
|