@cgboiler/biz-mobile 1.17.11 → 1.17.12

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 (35) hide show
  1. package/es/index.d.ts +4 -2
  2. package/es/index.js +6 -2
  3. package/es/org-picker/useApi.d.ts +5 -6
  4. package/es/org-picker/useApi.js +113 -4
  5. package/es/rich-text-editor/RichTextEditor.d.ts +26 -0
  6. package/es/rich-text-editor/RichTextEditor.js +78 -0
  7. package/es/rich-text-editor/_atomic.css +34 -0
  8. package/es/rich-text-editor/index.css +1 -0
  9. package/es/rich-text-editor/index.d.ts +3 -0
  10. package/es/rich-text-editor/index.js +5 -0
  11. package/es/rich-text-editor/index.less +193 -0
  12. package/es/rich-text-editor/style/index.d.ts +1 -0
  13. package/es/rich-text-editor/style/index.js +1 -0
  14. package/es/rich-text-editor/style/less.d.ts +1 -0
  15. package/es/rich-text-editor/style/less.js +1 -0
  16. package/es/rich-text-editor/types.d.ts +12 -0
  17. package/es/rich-text-editor/types.js +13 -0
  18. package/lib/index.d.ts +4 -2
  19. package/lib/index.js +6 -2
  20. package/lib/org-picker/useApi.d.ts +5 -6
  21. package/lib/org-picker/useApi.js +106 -3
  22. package/lib/rich-text-editor/RichTextEditor.d.ts +26 -0
  23. package/lib/rich-text-editor/RichTextEditor.js +107 -0
  24. package/lib/rich-text-editor/_atomic.css +34 -0
  25. package/lib/rich-text-editor/index.css +1 -0
  26. package/lib/rich-text-editor/index.d.ts +3 -0
  27. package/lib/rich-text-editor/index.js +34 -0
  28. package/lib/rich-text-editor/index.less +193 -0
  29. package/lib/rich-text-editor/style/index.d.ts +1 -0
  30. package/lib/rich-text-editor/style/index.js +1 -0
  31. package/lib/rich-text-editor/style/less.d.ts +1 -0
  32. package/lib/rich-text-editor/style/less.js +1 -0
  33. package/lib/rich-text-editor/types.d.ts +12 -0
  34. package/lib/rich-text-editor/types.js +32 -0
  35. package/package.json +9 -3
package/es/index.d.ts CHANGED
@@ -1,14 +1,16 @@
1
1
  export * from "./md-preview";
2
2
  export * from "./org-picker";
3
3
  export * from "./project-select";
4
+ export * from "./rich-text-editor";
4
5
  declare namespace _default {
5
6
  export { install };
6
7
  export { version };
7
8
  }
8
9
  export default _default;
9
10
  export function install(app: any): void;
10
- export const version: "1.17.10";
11
+ export const version: "1.17.11";
11
12
  import MdPreview from './md-preview';
12
13
  import OrgPicker from './org-picker';
13
14
  import ProjectSelect from './project-select';
14
- export { MdPreview, OrgPicker, ProjectSelect };
15
+ import RichTextEditor from './rich-text-editor';
16
+ export { MdPreview, OrgPicker, ProjectSelect, RichTextEditor };
package/es/index.js CHANGED
@@ -1,12 +1,14 @@
1
1
  import MdPreview from "./md-preview";
2
2
  import OrgPicker from "./org-picker";
3
3
  import ProjectSelect from "./project-select";
4
- const version = "1.17.10";
4
+ import RichTextEditor from "./rich-text-editor";
5
+ const version = "1.17.11";
5
6
  function install(app) {
6
7
  const components = [
7
8
  MdPreview,
8
9
  OrgPicker,
9
- ProjectSelect
10
+ ProjectSelect,
11
+ RichTextEditor
10
12
  ];
11
13
  components.forEach((item) => {
12
14
  if (item.install) {
@@ -19,6 +21,7 @@ function install(app) {
19
21
  export * from "./md-preview";
20
22
  export * from "./org-picker";
21
23
  export * from "./project-select";
24
+ export * from "./rich-text-editor";
22
25
  var stdin_default = {
23
26
  install,
24
27
  version
@@ -27,6 +30,7 @@ export {
27
30
  MdPreview,
28
31
  OrgPicker,
29
32
  ProjectSelect,
33
+ RichTextEditor,
30
34
  stdin_default as default,
31
35
  install,
32
36
  version
@@ -1,7 +1,6 @@
1
- import { Ref } from 'vue';
2
1
  import { type OrgItem, RecentSelection } from './types';
3
2
  export declare const useApi: () => {
4
- userList: Ref<{
3
+ userList: import("vue").Ref<{
5
4
  [x: string]: any;
6
5
  id: string | number;
7
6
  name: string;
@@ -14,7 +13,7 @@ export declare const useApi: () => {
14
13
  type: string;
15
14
  avatar?: string | undefined;
16
15
  }[]>;
17
- orgList: Ref<{
16
+ orgList: import("vue").Ref<{
18
17
  [x: string]: any;
19
18
  id: string | number;
20
19
  name: string;
@@ -27,7 +26,7 @@ export declare const useApi: () => {
27
26
  type: string;
28
27
  avatar?: string | undefined;
29
28
  }[]>;
30
- orgSearchList: Ref<{
29
+ orgSearchList: import("vue").Ref<{
31
30
  [x: string]: any;
32
31
  id: string | number;
33
32
  name: string;
@@ -41,8 +40,8 @@ export declare const useApi: () => {
41
40
  avatar?: string | undefined;
42
41
  }[]>;
43
42
  getOrgList: (deptId?: string) => Promise<void>;
44
- currentDeptId: Ref<string, string>;
45
- deptPath: Ref<{
43
+ currentDeptId: import("vue").Ref<string, string>;
44
+ deptPath: import("vue").Ref<{
46
45
  id: string | number;
47
46
  name: string;
48
47
  }[], {
@@ -19,7 +19,13 @@ var __async = (__this, __arguments, generator) => {
19
19
  });
20
20
  };
21
21
  import { ref } from "vue";
22
- import { useFetch, getUserList, getStorage, setStorage } from "@cgboiler/core";
22
+ import {
23
+ useFetch,
24
+ getUserList,
25
+ getStorage,
26
+ getUserInfo,
27
+ removeStorage
28
+ } from "@cgboiler/core";
23
29
  import { debounce } from "lodash-es";
24
30
  const orgListCache = /* @__PURE__ */ new Map();
25
31
  const fetchData = (url, cacheKey) => __async(void 0, null, function* () {
@@ -48,6 +54,7 @@ const useApi = () => {
48
54
  const orgSearchList = ref([]);
49
55
  const currentDeptId = ref("1");
50
56
  const deptPath = ref([{ id: "1", name: "\u5DDD\u9505\u516C\u53F8" }]);
57
+ const dataId = ref("");
51
58
  const getOrgList = (deptId) => __async(void 0, null, function* () {
52
59
  if (deptId) {
53
60
  currentDeptId.value = deptId;
@@ -74,9 +81,98 @@ const useApi = () => {
74
81
  }), 300);
75
82
  const RECENT_SELECTED_USERS_KEY = "recent_selected_users_history";
76
83
  const MAX_RECENT_SELECTIONS = 15;
84
+ const getRecentUsers = () => __async(void 0, null, function* () {
85
+ const user = yield getUserInfo();
86
+ const url = `https://wflow.cgboiler.com/v1/wflow/process/form/wf687dda91e4b027b047d4654c/data?keywords=${user.userId}&pageNo=1&pageSize=20`;
87
+ const res = yield fetchData(url);
88
+ let recentList = [];
89
+ if (res.records && res.records.length) {
90
+ res.records.forEach((item) => {
91
+ const data = JSON.parse(item.data);
92
+ if (data.field6713678545899 === user.userId) {
93
+ dataId.value = item.id;
94
+ recentList = data.field5375578403639 ? JSON.parse(data.field5375578403639) : [];
95
+ }
96
+ });
97
+ }
98
+ return recentList;
99
+ });
100
+ const addOrUpdateRecentUsers = (data) => __async(void 0, null, function* () {
101
+ try {
102
+ const user = yield getUserInfo();
103
+ let deptId = "";
104
+ userList.value.forEach((item) => {
105
+ if (item.id === user.userId) {
106
+ console.log(item);
107
+ deptId = item.deptId;
108
+ }
109
+ });
110
+ let url = "";
111
+ let method = "";
112
+ let requestData = {};
113
+ if (dataId.value) {
114
+ url = `https://wflow.cgboiler.com/v1/wflow/process/form/wf687dda91e4b027b047d4654c/data/${dataId.value}`;
115
+ requestData = {
116
+ deptId,
117
+ formData: data,
118
+ processUsers: {}
119
+ };
120
+ method = "PUT";
121
+ } else {
122
+ url = "https://wflow.cgboiler.com/v1/wflow/process/start/4e441786-65fa-11f0-aef7-ce938f4cd78d";
123
+ method = "POST";
124
+ requestData = {
125
+ deptId,
126
+ formData: data,
127
+ processUsers: {}
128
+ };
129
+ }
130
+ const token = user.token;
131
+ const response = yield fetch(url, {
132
+ method,
133
+ headers: {
134
+ "Content-Type": "application/json",
135
+ token: token || ""
136
+ },
137
+ body: JSON.stringify(requestData)
138
+ });
139
+ if (!response.ok) {
140
+ throw new Error(`HTTP error! status: ${response.status}`);
141
+ }
142
+ const responseText = yield response.text();
143
+ let result;
144
+ try {
145
+ result = JSON.parse(responseText);
146
+ } catch (e) {
147
+ const uuidRegex = /([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i;
148
+ const match = responseText.match(uuidRegex);
149
+ if (match && match[1]) {
150
+ const uuid = match[1];
151
+ if (!dataId.value) {
152
+ dataId.value = uuid;
153
+ }
154
+ result = { success: true, message: responseText, id: uuid };
155
+ } else {
156
+ result = { success: true, message: responseText };
157
+ }
158
+ }
159
+ yield removeStorage(RECENT_SELECTED_USERS_KEY);
160
+ return result;
161
+ } catch (error) {
162
+ console.error("Failed to add or update recent users", error);
163
+ throw error;
164
+ }
165
+ });
77
166
  const getRecentSelectedUsers = () => __async(void 0, null, function* () {
78
167
  try {
79
- const data = yield getStorage(RECENT_SELECTED_USERS_KEY);
168
+ const res = yield getRecentUsers();
169
+ const storageData = yield getStorage(RECENT_SELECTED_USERS_KEY);
170
+ let data = [];
171
+ if (res && Array.isArray(res) && res.length > 0) {
172
+ data = res;
173
+ } else if (storageData && Array.isArray(storageData) && storageData.length > 0) {
174
+ data = storageData;
175
+ }
80
176
  return data || [];
81
177
  } catch (error) {
82
178
  console.error("Failed to get recent selected users history from localStorage", error);
@@ -99,7 +195,13 @@ const useApi = () => {
99
195
  });
100
196
  const updatedHistory = [newSelection, ...filteredHistory].slice(0, MAX_RECENT_SELECTIONS);
101
197
  try {
102
- yield setStorage(RECENT_SELECTED_USERS_KEY, JSON.parse(JSON.stringify(updatedHistory)));
198
+ const user = yield getUserInfo();
199
+ const formData = {
200
+ field6713678545899: user.userId,
201
+ field5375578403639: JSON.stringify(updatedHistory)
202
+ };
203
+ addOrUpdateRecentUsers(formData);
204
+ getRecentSelectedUsers();
103
205
  } catch (error) {
104
206
  console.error("Failed to set recent selected users history to localStorage", error);
105
207
  }
@@ -108,7 +210,14 @@ const useApi = () => {
108
210
  const history = yield getRecentSelectedUsers();
109
211
  const updatedHistory = history.filter((item) => item.id !== id);
110
212
  try {
111
- yield setStorage(RECENT_SELECTED_USERS_KEY, JSON.parse(JSON.stringify(updatedHistory)));
213
+ const data = JSON.parse(JSON.stringify(updatedHistory));
214
+ const user = yield getUserInfo();
215
+ const formData = {
216
+ field6713678545899: user.userId,
217
+ field5375578403639: JSON.stringify(data)
218
+ };
219
+ addOrUpdateRecentUsers(formData);
220
+ getRecentSelectedUsers();
112
221
  } catch (error) {
113
222
  console.error("Failed to delete recent selected users history to localStorage", error);
114
223
  }
@@ -0,0 +1,26 @@
1
+ import './index.less';
2
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ modelValue: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ placeholder: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
12
+ modelValue: {
13
+ type: StringConstructor;
14
+ default: string;
15
+ };
16
+ placeholder: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ }>> & Readonly<{
21
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
22
+ }>, {
23
+ modelValue: string;
24
+ placeholder: string;
25
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
26
+ export default _default;
@@ -0,0 +1,78 @@
1
+ import { createVNode as _createVNode } from "vue";
2
+ import "./_atomic.css";
3
+ import { defineComponent, onMounted, onBeforeUnmount, ref, watch } from "vue";
4
+ import StarterKit from "@tiptap/starter-kit";
5
+ import { Editor, EditorContent } from "@tiptap/vue-3";
6
+ import { TableKit } from "@tiptap/extension-table";
7
+ import { Placeholder } from "@tiptap/extensions";
8
+ import { richTextEditorProps } from "./types";
9
+ import "./index.css";
10
+ var stdin_default = defineComponent({
11
+ name: "RichTextEditor",
12
+ props: richTextEditorProps,
13
+ emits: ["update:modelValue"],
14
+ setup(props, {
15
+ emit
16
+ }) {
17
+ const editor = ref();
18
+ const addTableRow = () => {
19
+ var _a;
20
+ (_a = editor.value) == null ? void 0 : _a.chain().focus().addRowAfter().run();
21
+ };
22
+ const deleteTableRow = () => {
23
+ var _a;
24
+ (_a = editor.value) == null ? void 0 : _a.chain().focus().deleteRow().run();
25
+ };
26
+ const setTextFormat = (level) => {
27
+ var _a, _b;
28
+ if (level === 0) {
29
+ (_a = editor.value) == null ? void 0 : _a.chain().focus().setParagraph().run();
30
+ } else {
31
+ (_b = editor.value) == null ? void 0 : _b.chain().focus().toggleHeading({
32
+ level
33
+ }).run();
34
+ }
35
+ };
36
+ const showTableButtons = ref(false);
37
+ onMounted(() => {
38
+ editor.value = new Editor({
39
+ extensions: [StarterKit, TableKit.configure({
40
+ table: {
41
+ resizable: true
42
+ }
43
+ }), Placeholder.configure({
44
+ placeholder: props.placeholder
45
+ })],
46
+ content: props.modelValue,
47
+ onUpdate: ({
48
+ editor: editor2
49
+ }) => {
50
+ const html = editor2.getHTML();
51
+ emit("update:modelValue", html);
52
+ },
53
+ onSelectionUpdate: ({
54
+ editor: editor2
55
+ }) => {
56
+ showTableButtons.value = editor2.isActive("table");
57
+ }
58
+ });
59
+ });
60
+ watch(() => props.modelValue, (newValue) => {
61
+ var _a, _b;
62
+ if (((_a = editor.value) == null ? void 0 : _a.getHTML()) !== newValue) {
63
+ (_b = editor.value) == null ? void 0 : _b.commands.setContent(newValue || "");
64
+ }
65
+ });
66
+ onBeforeUnmount(() => {
67
+ var _a;
68
+ (_a = editor.value) == null ? void 0 : _a.destroy();
69
+ });
70
+ return () => _createVNode(EditorContent, {
71
+ "class": "ProseMirror",
72
+ "editor": editor.value
73
+ }, null);
74
+ }
75
+ });
76
+ export {
77
+ stdin_default as default
78
+ };
@@ -0,0 +1,34 @@
1
+
2
+ .cgx-atm .flex {
3
+ align-items: initial;
4
+ flex-direction: initial;
5
+ justify-content: initial;
6
+ flex-wrap: initial;
7
+ }
8
+ .cgx-atm .flex-row {
9
+ flex-direction: row;
10
+ }
11
+ .cgx-atm .flex-col {
12
+ flex-direction: column;
13
+ }
14
+ .cgx-atm .justify-center {
15
+ justify-content: center;
16
+ }
17
+ .cgx-atm .justify-between {
18
+ justify-content: space-between;
19
+ }
20
+ .cgx-atm .justify-around {
21
+ justify-content: space-around;
22
+ }
23
+ .cgx-atm .justify-end {
24
+ justify-content: flex-end;
25
+ }
26
+ .cgx-atm .items-center {
27
+ align-items: center;
28
+ }
29
+ .cgx-atm .flex-wrap {
30
+ flex-wrap: wrap;
31
+ }
32
+
33
+ /* layer: default */
34
+ .cgx-atm .table{display:table;}
@@ -0,0 +1 @@
1
+ .ProseMirror{flex:1;overflow:auto;padding:16px;min-height:200px;outline:none;line-height:1.6;font-size:var(--font-base);--white: #fff;--black: #2e2b29;--black-contrast: #110f0e;--gray-1: rgba(61, 37, 20, .05);--gray-2: rgba(61, 37, 20, .08);--gray-3: rgba(61, 37, 20, .12);--gray-4: rgba(53, 38, 28, .3);--gray-5: rgba(28, 25, 23, .6);--green: #22c55e;--purple: #6a00f5;--purple-contrast: #5800cc;--purple-light: rgba(88, 5, 255, .05);--yellow-contrast: #facc15;--yellow: rgba(250, 204, 21, .4);--yellow-light: #fffae5;--red: #ff5c33;--red-light: #ffebe5;--shadow: 0px 12px 33px 0px rgba(0, 0, 0, .06), 0px 3.618px 9.949px 0px rgba(0, 0, 0, .04)}.ProseMirror :first-child{margin-top:0}.ProseMirror ul,.ProseMirror ol{padding:0 1rem;margin:1.25rem 1rem 1.25rem .4rem}.ProseMirror ul li p,.ProseMirror ol li p{margin-top:.25em;margin-bottom:.25em}.ProseMirror h1,.ProseMirror h2,.ProseMirror h3,.ProseMirror h4,.ProseMirror h5,.ProseMirror h6{line-height:1.1;margin-top:2.5rem;text-wrap:pretty}.ProseMirror h1,.ProseMirror h2{margin-top:3.5rem;margin-bottom:1.5rem}.ProseMirror h1{font-size:1.4rem}.ProseMirror h2{font-size:1.2rem}.ProseMirror h3{font-size:1.1rem}.ProseMirror h4,.ProseMirror h5,.ProseMirror h6{font-size:1rem}.ProseMirror code{background-color:var(--purple-light);border-radius:.4rem;color:var(--black);font-size:.85rem;padding:.25em .3em}.ProseMirror pre{background:var(--black);border-radius:.5rem;color:var(--white);font-family:JetBrainsMono,monospace;margin:1.5rem 0;padding:.75rem 1rem}.ProseMirror pre code{background:none;color:inherit;font-size:.8rem;padding:0}.ProseMirror blockquote{border-left:3px solid var(--gray-3);margin:1.5rem 0;padding-left:1rem}.ProseMirror hr{border:none;border-top:1px solid var(--gray-2);margin:2rem 0}.ProseMirror p.is-editor-empty:first-child:before{color:var(--gray-4);content:attr(data-placeholder);float:left;height:0;pointer-events:none}.ProseMirror .is-empty:before{color:var(--gray-4);content:attr(data-placeholder);float:left;height:0;pointer-events:none}.ProseMirror table{border-collapse:collapse;margin:0;overflow:hidden;table-layout:fixed;width:100%}.ProseMirror table td,.ProseMirror table th{border:1px solid var(--gray-3);box-sizing:border-box;min-width:1em;padding:6px 8px;position:relative;vertical-align:top}.ProseMirror table td>*,.ProseMirror table th>*{margin-bottom:0}.ProseMirror table th{background-color:var(--gray-1);font-weight:700;text-align:left}.ProseMirror table .selectedCell:after{background:var(--gray-2);content:"";left:0;right:0;top:0;bottom:0;pointer-events:none;position:absolute;z-index:2}.ProseMirror table .column-resize-handle{background-color:var(--purple);bottom:-2px;pointer-events:none;position:absolute;right:-2px;top:0;width:4px}.ProseMirror .tableWrapper{margin:1.5rem 0;overflow-x:auto}.ProseMirror.resize-cursor{cursor:ew-resize;cursor:col-resize}
@@ -0,0 +1,3 @@
1
+ import _RichTextEditor from './RichTextEditor';
2
+ export default _RichTextEditor;
3
+ export type { RichTextEditorProps } from './types';
@@ -0,0 +1,5 @@
1
+ import _RichTextEditor from "./RichTextEditor";
2
+ var stdin_default = _RichTextEditor;
3
+ export {
4
+ stdin_default as default
5
+ };
@@ -0,0 +1,193 @@
1
+ .ProseMirror {
2
+ flex: 1;
3
+ overflow: auto;
4
+ padding: 16px;
5
+ min-height: 200px;
6
+ outline: none;
7
+
8
+ line-height: 1.6;
9
+ font-size: var(--font-base);
10
+ --white: #fff;
11
+ --black: #2e2b29;
12
+ --black-contrast: #110f0e;
13
+ --gray-1: rgba(61, 37, 20, 0.05);
14
+ --gray-2: rgba(61, 37, 20, 0.08);
15
+ --gray-3: rgba(61, 37, 20, 0.12);
16
+ --gray-4: rgba(53, 38, 28, 0.3);
17
+ --gray-5: rgba(28, 25, 23, 0.6);
18
+ --green: #22c55e;
19
+ --purple: #6a00f5;
20
+ --purple-contrast: #5800cc;
21
+ --purple-light: rgba(88, 5, 255, 0.05);
22
+ --yellow-contrast: #facc15;
23
+ --yellow: rgba(250, 204, 21, 0.4);
24
+ --yellow-light: #fffae5;
25
+ --red: #ff5c33;
26
+ --red-light: #ffebe5;
27
+ --shadow: 0px 12px 33px 0px rgba(0, 0, 0, 0.06), 0px 3.618px 9.949px 0px rgba(0, 0, 0, 0.04);
28
+ :first-child {
29
+ margin-top: 0;
30
+ }
31
+
32
+ /* List styles */
33
+ ul,
34
+ ol {
35
+ padding: 0 1rem;
36
+ margin: 1.25rem 1rem 1.25rem 0.4rem;
37
+
38
+ li p {
39
+ margin-top: 0.25em;
40
+ margin-bottom: 0.25em;
41
+ }
42
+ }
43
+
44
+ /* Heading styles */
45
+ h1,
46
+ h2,
47
+ h3,
48
+ h4,
49
+ h5,
50
+ h6 {
51
+ line-height: 1.1;
52
+ margin-top: 2.5rem;
53
+ text-wrap: pretty;
54
+ }
55
+
56
+ h1,
57
+ h2 {
58
+ margin-top: 3.5rem;
59
+ margin-bottom: 1.5rem;
60
+ }
61
+
62
+ h1 {
63
+ font-size: 1.4rem;
64
+ }
65
+
66
+ h2 {
67
+ font-size: 1.2rem;
68
+ }
69
+
70
+ h3 {
71
+ font-size: 1.1rem;
72
+ }
73
+
74
+ h4,
75
+ h5,
76
+ h6 {
77
+ font-size: 1rem;
78
+ }
79
+
80
+ /* Code and preformatted text styles */
81
+ code {
82
+ background-color: var(--purple-light);
83
+ border-radius: 0.4rem;
84
+ color: var(--black);
85
+ font-size: 0.85rem;
86
+ padding: 0.25em 0.3em;
87
+ }
88
+
89
+ pre {
90
+ background: var(--black);
91
+ border-radius: 0.5rem;
92
+ color: var(--white);
93
+ font-family: 'JetBrainsMono', monospace;
94
+ margin: 1.5rem 0;
95
+ padding: 0.75rem 1rem;
96
+
97
+ code {
98
+ background: none;
99
+ color: inherit;
100
+ font-size: 0.8rem;
101
+ padding: 0;
102
+ }
103
+ }
104
+
105
+ blockquote {
106
+ border-left: 3px solid var(--gray-3);
107
+ margin: 1.5rem 0;
108
+ padding-left: 1rem;
109
+ }
110
+
111
+ hr {
112
+ border: none;
113
+ border-top: 1px solid var(--gray-2);
114
+ margin: 2rem 0;
115
+ }
116
+
117
+ /* Placeholder (at the top) */
118
+ p.is-editor-empty:first-child::before {
119
+ color: var(--gray-4);
120
+ content: attr(data-placeholder);
121
+ float: left;
122
+ height: 0;
123
+ pointer-events: none;
124
+ }
125
+
126
+ .is-empty::before {
127
+ color: var(--gray-4);
128
+ content: attr(data-placeholder);
129
+ float: left;
130
+ height: 0;
131
+ pointer-events: none;
132
+ }
133
+ /* Table-specific styling */
134
+ table {
135
+ border-collapse: collapse;
136
+ margin: 0;
137
+ overflow: hidden;
138
+ table-layout: fixed;
139
+ width: 100%;
140
+
141
+ td,
142
+ th {
143
+ border: 1px solid var(--gray-3);
144
+ box-sizing: border-box;
145
+ min-width: 1em;
146
+ padding: 6px 8px;
147
+ position: relative;
148
+ vertical-align: top;
149
+
150
+ > * {
151
+ margin-bottom: 0;
152
+ }
153
+ }
154
+
155
+ th {
156
+ background-color: var(--gray-1);
157
+ font-weight: bold;
158
+ text-align: left;
159
+ }
160
+
161
+ .selectedCell:after {
162
+ background: var(--gray-2);
163
+ content: '';
164
+ left: 0;
165
+ right: 0;
166
+ top: 0;
167
+ bottom: 0;
168
+ pointer-events: none;
169
+ position: absolute;
170
+ z-index: 2;
171
+ }
172
+
173
+ .column-resize-handle {
174
+ background-color: var(--purple);
175
+ bottom: -2px;
176
+ pointer-events: none;
177
+ position: absolute;
178
+ right: -2px;
179
+ top: 0;
180
+ width: 4px;
181
+ }
182
+ }
183
+
184
+ .tableWrapper {
185
+ margin: 1.5rem 0;
186
+ overflow-x: auto;
187
+ }
188
+
189
+ &.resize-cursor {
190
+ cursor: ew-resize;
191
+ cursor: col-resize;
192
+ }
193
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ import "../index.css";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ import "../index.less";
@@ -0,0 +1,12 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+ export declare const richTextEditorProps: {
3
+ modelValue: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ placeholder: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ };
12
+ export type RichTextEditorProps = ExtractPropTypes<typeof richTextEditorProps>;
@@ -0,0 +1,13 @@
1
+ const richTextEditorProps = {
2
+ modelValue: {
3
+ type: String,
4
+ default: ""
5
+ },
6
+ placeholder: {
7
+ type: String,
8
+ default: "\u8BF7\u5199\u70B9\u4EC0\u4E48..."
9
+ }
10
+ };
11
+ export {
12
+ richTextEditorProps
13
+ };
package/lib/index.d.ts CHANGED
@@ -1,14 +1,16 @@
1
1
  export * from "./md-preview";
2
2
  export * from "./org-picker";
3
3
  export * from "./project-select";
4
+ export * from "./rich-text-editor";
4
5
  declare namespace _default {
5
6
  export { install };
6
7
  export { version };
7
8
  }
8
9
  export default _default;
9
10
  export function install(app: any): void;
10
- export const version: "1.17.10";
11
+ export const version: "1.17.11";
11
12
  import MdPreview from './md-preview';
12
13
  import OrgPicker from './org-picker';
13
14
  import ProjectSelect from './project-select';
14
- export { MdPreview, OrgPicker, ProjectSelect };
15
+ import RichTextEditor from './rich-text-editor';
16
+ export { MdPreview, OrgPicker, ProjectSelect, RichTextEditor };
package/lib/index.js CHANGED
@@ -31,6 +31,7 @@ __export(stdin_exports, {
31
31
  MdPreview: () => import_md_preview.default,
32
32
  OrgPicker: () => import_org_picker.default,
33
33
  ProjectSelect: () => import_project_select.default,
34
+ RichTextEditor: () => import_rich_text_editor.default,
34
35
  default: () => stdin_default,
35
36
  install: () => install,
36
37
  version: () => version
@@ -39,15 +40,18 @@ module.exports = __toCommonJS(stdin_exports);
39
40
  var import_md_preview = __toESM(require("./md-preview"));
40
41
  var import_org_picker = __toESM(require("./org-picker"));
41
42
  var import_project_select = __toESM(require("./project-select"));
43
+ var import_rich_text_editor = __toESM(require("./rich-text-editor"));
42
44
  __reExport(stdin_exports, require("./md-preview"), module.exports);
43
45
  __reExport(stdin_exports, require("./org-picker"), module.exports);
44
46
  __reExport(stdin_exports, require("./project-select"), module.exports);
45
- const version = "1.17.10";
47
+ __reExport(stdin_exports, require("./rich-text-editor"), module.exports);
48
+ const version = "1.17.11";
46
49
  function install(app) {
47
50
  const components = [
48
51
  import_md_preview.default,
49
52
  import_org_picker.default,
50
- import_project_select.default
53
+ import_project_select.default,
54
+ import_rich_text_editor.default
51
55
  ];
52
56
  components.forEach((item) => {
53
57
  if (item.install) {