@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.
- package/es/index.d.ts +4 -2
- package/es/index.js +6 -2
- package/es/org-picker/useApi.d.ts +5 -6
- package/es/org-picker/useApi.js +113 -4
- package/es/rich-text-editor/RichTextEditor.d.ts +26 -0
- package/es/rich-text-editor/RichTextEditor.js +78 -0
- package/es/rich-text-editor/_atomic.css +34 -0
- package/es/rich-text-editor/index.css +1 -0
- package/es/rich-text-editor/index.d.ts +3 -0
- package/es/rich-text-editor/index.js +5 -0
- package/es/rich-text-editor/index.less +193 -0
- package/es/rich-text-editor/style/index.d.ts +1 -0
- package/es/rich-text-editor/style/index.js +1 -0
- package/es/rich-text-editor/style/less.d.ts +1 -0
- package/es/rich-text-editor/style/less.js +1 -0
- package/es/rich-text-editor/types.d.ts +12 -0
- package/es/rich-text-editor/types.js +13 -0
- package/lib/index.d.ts +4 -2
- package/lib/index.js +6 -2
- package/lib/org-picker/useApi.d.ts +5 -6
- package/lib/org-picker/useApi.js +106 -3
- package/lib/rich-text-editor/RichTextEditor.d.ts +26 -0
- package/lib/rich-text-editor/RichTextEditor.js +107 -0
- package/lib/rich-text-editor/_atomic.css +34 -0
- package/lib/rich-text-editor/index.css +1 -0
- package/lib/rich-text-editor/index.d.ts +3 -0
- package/lib/rich-text-editor/index.js +34 -0
- package/lib/rich-text-editor/index.less +193 -0
- package/lib/rich-text-editor/style/index.d.ts +1 -0
- package/lib/rich-text-editor/style/index.js +1 -0
- package/lib/rich-text-editor/style/less.d.ts +1 -0
- package/lib/rich-text-editor/style/less.js +1 -0
- package/lib/rich-text-editor/types.d.ts +12 -0
- package/lib/rich-text-editor/types.js +32 -0
- package/package.json +9 -3
|
@@ -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
|
}[], {
|
package/lib/org-picker/useApi.js
CHANGED
|
@@ -70,6 +70,7 @@ const useApi = () => {
|
|
|
70
70
|
const orgSearchList = (0, import_vue.ref)([]);
|
|
71
71
|
const currentDeptId = (0, import_vue.ref)("1");
|
|
72
72
|
const deptPath = (0, import_vue.ref)([{ id: "1", name: "\u5DDD\u9505\u516C\u53F8" }]);
|
|
73
|
+
const dataId = (0, import_vue.ref)("");
|
|
73
74
|
const getOrgList = (deptId) => __async(void 0, null, function* () {
|
|
74
75
|
if (deptId) {
|
|
75
76
|
currentDeptId.value = deptId;
|
|
@@ -96,9 +97,98 @@ const useApi = () => {
|
|
|
96
97
|
}), 300);
|
|
97
98
|
const RECENT_SELECTED_USERS_KEY = "recent_selected_users_history";
|
|
98
99
|
const MAX_RECENT_SELECTIONS = 15;
|
|
100
|
+
const getRecentUsers = () => __async(void 0, null, function* () {
|
|
101
|
+
const user = yield (0, import_core.getUserInfo)();
|
|
102
|
+
const url = `https://wflow.cgboiler.com/v1/wflow/process/form/wf687dda91e4b027b047d4654c/data?keywords=${user.userId}&pageNo=1&pageSize=20`;
|
|
103
|
+
const res = yield fetchData(url);
|
|
104
|
+
let recentList = [];
|
|
105
|
+
if (res.records && res.records.length) {
|
|
106
|
+
res.records.forEach((item) => {
|
|
107
|
+
const data = JSON.parse(item.data);
|
|
108
|
+
if (data.field6713678545899 === user.userId) {
|
|
109
|
+
dataId.value = item.id;
|
|
110
|
+
recentList = data.field5375578403639 ? JSON.parse(data.field5375578403639) : [];
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
return recentList;
|
|
115
|
+
});
|
|
116
|
+
const addOrUpdateRecentUsers = (data) => __async(void 0, null, function* () {
|
|
117
|
+
try {
|
|
118
|
+
const user = yield (0, import_core.getUserInfo)();
|
|
119
|
+
let deptId = "";
|
|
120
|
+
userList.value.forEach((item) => {
|
|
121
|
+
if (item.id === user.userId) {
|
|
122
|
+
console.log(item);
|
|
123
|
+
deptId = item.deptId;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
let url = "";
|
|
127
|
+
let method = "";
|
|
128
|
+
let requestData = {};
|
|
129
|
+
if (dataId.value) {
|
|
130
|
+
url = `https://wflow.cgboiler.com/v1/wflow/process/form/wf687dda91e4b027b047d4654c/data/${dataId.value}`;
|
|
131
|
+
requestData = {
|
|
132
|
+
deptId,
|
|
133
|
+
formData: data,
|
|
134
|
+
processUsers: {}
|
|
135
|
+
};
|
|
136
|
+
method = "PUT";
|
|
137
|
+
} else {
|
|
138
|
+
url = "https://wflow.cgboiler.com/v1/wflow/process/start/4e441786-65fa-11f0-aef7-ce938f4cd78d";
|
|
139
|
+
method = "POST";
|
|
140
|
+
requestData = {
|
|
141
|
+
deptId,
|
|
142
|
+
formData: data,
|
|
143
|
+
processUsers: {}
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
const token = user.token;
|
|
147
|
+
const response = yield fetch(url, {
|
|
148
|
+
method,
|
|
149
|
+
headers: {
|
|
150
|
+
"Content-Type": "application/json",
|
|
151
|
+
token: token || ""
|
|
152
|
+
},
|
|
153
|
+
body: JSON.stringify(requestData)
|
|
154
|
+
});
|
|
155
|
+
if (!response.ok) {
|
|
156
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
157
|
+
}
|
|
158
|
+
const responseText = yield response.text();
|
|
159
|
+
let result;
|
|
160
|
+
try {
|
|
161
|
+
result = JSON.parse(responseText);
|
|
162
|
+
} catch (e) {
|
|
163
|
+
const uuidRegex = /([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i;
|
|
164
|
+
const match = responseText.match(uuidRegex);
|
|
165
|
+
if (match && match[1]) {
|
|
166
|
+
const uuid = match[1];
|
|
167
|
+
if (!dataId.value) {
|
|
168
|
+
dataId.value = uuid;
|
|
169
|
+
}
|
|
170
|
+
result = { success: true, message: responseText, id: uuid };
|
|
171
|
+
} else {
|
|
172
|
+
result = { success: true, message: responseText };
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
yield (0, import_core.removeStorage)(RECENT_SELECTED_USERS_KEY);
|
|
176
|
+
return result;
|
|
177
|
+
} catch (error) {
|
|
178
|
+
console.error("Failed to add or update recent users", error);
|
|
179
|
+
throw error;
|
|
180
|
+
}
|
|
181
|
+
});
|
|
99
182
|
const getRecentSelectedUsers = () => __async(void 0, null, function* () {
|
|
100
183
|
try {
|
|
101
|
-
const
|
|
184
|
+
const res = yield getRecentUsers();
|
|
185
|
+
const storageData = yield (0, import_core.getStorage)(RECENT_SELECTED_USERS_KEY);
|
|
186
|
+
let data = [];
|
|
187
|
+
if (res && Array.isArray(res) && res.length > 0) {
|
|
188
|
+
data = res;
|
|
189
|
+
} else if (storageData && Array.isArray(storageData) && storageData.length > 0) {
|
|
190
|
+
data = storageData;
|
|
191
|
+
}
|
|
102
192
|
return data || [];
|
|
103
193
|
} catch (error) {
|
|
104
194
|
console.error("Failed to get recent selected users history from localStorage", error);
|
|
@@ -121,7 +211,13 @@ const useApi = () => {
|
|
|
121
211
|
});
|
|
122
212
|
const updatedHistory = [newSelection, ...filteredHistory].slice(0, MAX_RECENT_SELECTIONS);
|
|
123
213
|
try {
|
|
124
|
-
yield (0, import_core.
|
|
214
|
+
const user = yield (0, import_core.getUserInfo)();
|
|
215
|
+
const formData = {
|
|
216
|
+
field6713678545899: user.userId,
|
|
217
|
+
field5375578403639: JSON.stringify(updatedHistory)
|
|
218
|
+
};
|
|
219
|
+
addOrUpdateRecentUsers(formData);
|
|
220
|
+
getRecentSelectedUsers();
|
|
125
221
|
} catch (error) {
|
|
126
222
|
console.error("Failed to set recent selected users history to localStorage", error);
|
|
127
223
|
}
|
|
@@ -130,7 +226,14 @@ const useApi = () => {
|
|
|
130
226
|
const history = yield getRecentSelectedUsers();
|
|
131
227
|
const updatedHistory = history.filter((item) => item.id !== id);
|
|
132
228
|
try {
|
|
133
|
-
|
|
229
|
+
const data = JSON.parse(JSON.stringify(updatedHistory));
|
|
230
|
+
const user = yield (0, import_core.getUserInfo)();
|
|
231
|
+
const formData = {
|
|
232
|
+
field6713678545899: user.userId,
|
|
233
|
+
field5375578403639: JSON.stringify(data)
|
|
234
|
+
};
|
|
235
|
+
addOrUpdateRecentUsers(formData);
|
|
236
|
+
getRecentSelectedUsers();
|
|
134
237
|
} catch (error) {
|
|
135
238
|
console.error("Failed to delete recent selected users history to localStorage", error);
|
|
136
239
|
}
|
|
@@ -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,107 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var stdin_exports = {};
|
|
29
|
+
__export(stdin_exports, {
|
|
30
|
+
default: () => stdin_default
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
33
|
+
var import_vue = require("vue");
|
|
34
|
+
var import_atomic = require("./_atomic.css");
|
|
35
|
+
var import_vue2 = require("vue");
|
|
36
|
+
var import_starter_kit = __toESM(require("@tiptap/starter-kit"));
|
|
37
|
+
var import_vue_3 = require("@tiptap/vue-3");
|
|
38
|
+
var import_extension_table = require("@tiptap/extension-table");
|
|
39
|
+
var import_extensions = require("@tiptap/extensions");
|
|
40
|
+
var import_types = require("./types");
|
|
41
|
+
var import_index = require("./index.css");
|
|
42
|
+
var stdin_default = (0, import_vue2.defineComponent)({
|
|
43
|
+
name: "RichTextEditor",
|
|
44
|
+
props: import_types.richTextEditorProps,
|
|
45
|
+
emits: ["update:modelValue"],
|
|
46
|
+
setup(props, {
|
|
47
|
+
emit
|
|
48
|
+
}) {
|
|
49
|
+
const editor = (0, import_vue2.ref)();
|
|
50
|
+
const addTableRow = () => {
|
|
51
|
+
var _a;
|
|
52
|
+
(_a = editor.value) == null ? void 0 : _a.chain().focus().addRowAfter().run();
|
|
53
|
+
};
|
|
54
|
+
const deleteTableRow = () => {
|
|
55
|
+
var _a;
|
|
56
|
+
(_a = editor.value) == null ? void 0 : _a.chain().focus().deleteRow().run();
|
|
57
|
+
};
|
|
58
|
+
const setTextFormat = (level) => {
|
|
59
|
+
var _a, _b;
|
|
60
|
+
if (level === 0) {
|
|
61
|
+
(_a = editor.value) == null ? void 0 : _a.chain().focus().setParagraph().run();
|
|
62
|
+
} else {
|
|
63
|
+
(_b = editor.value) == null ? void 0 : _b.chain().focus().toggleHeading({
|
|
64
|
+
level
|
|
65
|
+
}).run();
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const showTableButtons = (0, import_vue2.ref)(false);
|
|
69
|
+
(0, import_vue2.onMounted)(() => {
|
|
70
|
+
editor.value = new import_vue_3.Editor({
|
|
71
|
+
extensions: [import_starter_kit.default, import_extension_table.TableKit.configure({
|
|
72
|
+
table: {
|
|
73
|
+
resizable: true
|
|
74
|
+
}
|
|
75
|
+
}), import_extensions.Placeholder.configure({
|
|
76
|
+
placeholder: props.placeholder
|
|
77
|
+
})],
|
|
78
|
+
content: props.modelValue,
|
|
79
|
+
onUpdate: ({
|
|
80
|
+
editor: editor2
|
|
81
|
+
}) => {
|
|
82
|
+
const html = editor2.getHTML();
|
|
83
|
+
emit("update:modelValue", html);
|
|
84
|
+
},
|
|
85
|
+
onSelectionUpdate: ({
|
|
86
|
+
editor: editor2
|
|
87
|
+
}) => {
|
|
88
|
+
showTableButtons.value = editor2.isActive("table");
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
(0, import_vue2.watch)(() => props.modelValue, (newValue) => {
|
|
93
|
+
var _a, _b;
|
|
94
|
+
if (((_a = editor.value) == null ? void 0 : _a.getHTML()) !== newValue) {
|
|
95
|
+
(_b = editor.value) == null ? void 0 : _b.commands.setContent(newValue || "");
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
(0, import_vue2.onBeforeUnmount)(() => {
|
|
99
|
+
var _a;
|
|
100
|
+
(_a = editor.value) == null ? void 0 : _a.destroy();
|
|
101
|
+
});
|
|
102
|
+
return () => (0, import_vue.createVNode)(import_vue_3.EditorContent, {
|
|
103
|
+
"class": "ProseMirror",
|
|
104
|
+
"editor": editor.value
|
|
105
|
+
}, null);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
@@ -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,34 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var stdin_exports = {};
|
|
29
|
+
__export(stdin_exports, {
|
|
30
|
+
default: () => stdin_default
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
33
|
+
var import_RichTextEditor = __toESM(require("./RichTextEditor"));
|
|
34
|
+
var stdin_default = import_RichTextEditor.default;
|
|
@@ -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
|
+
require("../index.css");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require("../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,32 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var stdin_exports = {};
|
|
19
|
+
__export(stdin_exports, {
|
|
20
|
+
richTextEditorProps: () => richTextEditorProps
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
23
|
+
const richTextEditorProps = {
|
|
24
|
+
modelValue: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: ""
|
|
27
|
+
},
|
|
28
|
+
placeholder: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: "\u8BF7\u5199\u70B9\u4EC0\u4E48..."
|
|
31
|
+
}
|
|
32
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cgboiler/biz-mobile",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.12",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -42,10 +42,16 @@
|
|
|
42
42
|
"iOS >= 10"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
+
"@tiptap/extension-collaboration": "3.0.0-beta.16",
|
|
46
|
+
"@tiptap/extension-table": "3.0.0-beta.5",
|
|
47
|
+
"@tiptap/extensions": "3.0.0-beta.5",
|
|
48
|
+
"@tiptap/pm": "3.0.0-beta.5",
|
|
49
|
+
"@tiptap/starter-kit": "3.0.0-beta.5",
|
|
50
|
+
"@tiptap/vue-3": "3.0.0-beta.5",
|
|
45
51
|
"lodash-es": "^4.17.21",
|
|
46
52
|
"vant": "^4.9.19",
|
|
47
|
-
"@cgboiler/
|
|
48
|
-
"@cgboiler/
|
|
53
|
+
"@cgboiler/shared": "1.1.1",
|
|
54
|
+
"@cgboiler/core": "1.2.2"
|
|
49
55
|
},
|
|
50
56
|
"scripts": {
|
|
51
57
|
"dev": "cg-cli dev",
|