@nocobase/plugin-block-comment 2.2.0-alpha.10
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/LICENSE.txt +107 -0
- package/README.md +1 -0
- package/client-v2.d.ts +2 -0
- package/client-v2.js +1 -0
- package/client.d.ts +2 -0
- package/client.js +1 -0
- package/dist/client/41.6fb2aeb406824e12.js +10 -0
- package/dist/client/549.a88deaa9432f2fd7.js +10 -0
- package/dist/client/index.d.ts +9 -0
- package/dist/client/index.js +10 -0
- package/dist/client/locale.d.ts +11 -0
- package/dist/client/models/index.d.ts +11 -0
- package/dist/client/plugin.d.ts +13 -0
- package/dist/client-v2/41.53a11114c9f0edde.js +10 -0
- package/dist/client-v2/549.ecb8a67e5af9a534.js +10 -0
- package/dist/client-v2/index.d.ts +9 -0
- package/dist/client-v2/index.js +10 -0
- package/dist/client-v2/locale.d.ts +11 -0
- package/dist/client-v2/models/RecordCommentsBlockModel.d.ts +58 -0
- package/dist/client-v2/models/actions/DeleteRecordCommentActionModel.d.ts +15 -0
- package/dist/client-v2/models/actions/EditRecordCommentActionModel.d.ts +15 -0
- package/dist/client-v2/models/actions/QuoteReplyRecordCommentActionModel.d.ts +15 -0
- package/dist/client-v2/models/actions/RecordCommentActionGroupModel.d.ts +19 -0
- package/dist/client-v2/models/actions/RecordCommentSubmitActionModel.d.ts +23 -0
- package/dist/client-v2/models/actions/index.d.ts +13 -0
- package/dist/client-v2/models/components/RecordCommentActions.d.ts +20 -0
- package/dist/client-v2/models/components/RecordCommentFieldSelect.d.ts +15 -0
- package/dist/client-v2/models/components/RecordCommentsBlockView.d.ts +35 -0
- package/dist/client-v2/models/utils/errors.d.ts +9 -0
- package/dist/client-v2/models/utils.d.ts +131 -0
- package/dist/client-v2/plugin.d.ts +13 -0
- package/dist/externalVersion.js +22 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +48 -0
- package/dist/locale/en-US.json +49 -0
- package/dist/locale/zh-CN.json +49 -0
- package/dist/server/index.d.ts +9 -0
- package/dist/server/index.js +42 -0
- package/dist/server/plugin.d.ts +19 -0
- package/dist/server/plugin.js +54 -0
- package/package.json +20 -0
- package/server.d.ts +2 -0
- package/server.js +1 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
29
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
30
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
31
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
32
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
33
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
34
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
35
|
+
mod
|
|
36
|
+
));
|
|
37
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
|
+
var src_exports = {};
|
|
39
|
+
__export(src_exports, {
|
|
40
|
+
default: () => import_server.default
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(src_exports);
|
|
43
|
+
__reExport(src_exports, require("./server"), module.exports);
|
|
44
|
+
var import_server = __toESM(require("./server"));
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
...require("./server")
|
|
48
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Actions": "Actions",
|
|
3
|
+
"Add workflow": "Add workflow",
|
|
4
|
+
"Assign field values": "Assign field values",
|
|
5
|
+
"Auto jump to last page": "Auto jump to last page",
|
|
6
|
+
"Are you sure you want to submit this comment?": "Are you sure you want to submit this comment?",
|
|
7
|
+
"Are you sure you want to delete it?": "Are you sure you want to delete it?",
|
|
8
|
+
"Cancel": "Cancel",
|
|
9
|
+
"Comment": "Comment",
|
|
10
|
+
"Comment content": "Comment content",
|
|
11
|
+
"Comment content field": "Comment content field",
|
|
12
|
+
"Comment date field": "Comment date field",
|
|
13
|
+
"Commenter field": "Commenter field",
|
|
14
|
+
"Comment owner field": "Comment owner field",
|
|
15
|
+
"Comment owner field value": "Comment owner field value",
|
|
16
|
+
"Current record field": "Current record field",
|
|
17
|
+
"Delete": "Delete",
|
|
18
|
+
"Delete record": "Delete record",
|
|
19
|
+
"Delete settings": "Delete settings",
|
|
20
|
+
"Edit": "Edit",
|
|
21
|
+
"Failed to create comment": "Failed to create comment",
|
|
22
|
+
"Failed to delete comment": "Failed to delete comment",
|
|
23
|
+
"Failed to update comment": "Failed to update comment",
|
|
24
|
+
"Field mapping": "Field mapping",
|
|
25
|
+
"Jump to last page by default": "Jump to last page by default",
|
|
26
|
+
"Record comment action": "Comment action",
|
|
27
|
+
"Comments": "Comments",
|
|
28
|
+
"Record comments settings": "Block: Comment settings",
|
|
29
|
+
"No comments": "No comments",
|
|
30
|
+
"No resource or record selected for deletion": "No resource or record selected for deletion",
|
|
31
|
+
"Page size": "Page size",
|
|
32
|
+
"Only many-to-one fields associated with the users collection can be selected.": "Only many-to-one fields associated with the users collection can be selected.",
|
|
33
|
+
"Please configure the comment content field, commenter field, comment owner field, and comment date field.": "Please configure the comment content field, commenter field, comment owner field, and comment date field.",
|
|
34
|
+
"Quote reply": "Quote reply",
|
|
35
|
+
"Record deleted successfully": "Record deleted successfully",
|
|
36
|
+
"Render error": "Render error",
|
|
37
|
+
"Search": "Search",
|
|
38
|
+
"Select field": "Select field",
|
|
39
|
+
"Select workflow": "Select workflow",
|
|
40
|
+
"Specify the associated business record value, for example the current record ID.": "Specify the associated business record value, for example the current record ID.",
|
|
41
|
+
"Submit action settings": "Submit action settings",
|
|
42
|
+
"Submit comment": "Submit comment",
|
|
43
|
+
"Support pre-action event (local mode), post-action event (local mode), and approval event here.": "Support pre-action event (local mode), post-action event (local mode), and approval event here.",
|
|
44
|
+
"The comment owner field value type does not match the comment owner field. Please reconfigure the field mapping.": "The comment owner field value type does not match the comment owner field. Please reconfigure the field mapping.",
|
|
45
|
+
"The current record value is empty, so comments cannot be loaded.": "The current record value is empty, so comments cannot be loaded.",
|
|
46
|
+
"Update Comment": "Update Comment",
|
|
47
|
+
"Workflow": "Workflow",
|
|
48
|
+
"Bind workflows": "Bind workflows"
|
|
49
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Actions": "操作",
|
|
3
|
+
"Add workflow": "添加工作流",
|
|
4
|
+
"Assign field values": "字段赋值",
|
|
5
|
+
"Auto jump to last page": "自动跳转到最后一页",
|
|
6
|
+
"Are you sure you want to submit this comment?": "确定要提交这条评论吗?",
|
|
7
|
+
"Are you sure you want to delete it?": "确定要删除吗?",
|
|
8
|
+
"Cancel": "取消",
|
|
9
|
+
"Comment": "评论",
|
|
10
|
+
"Comment content": "评论内容",
|
|
11
|
+
"Comment content field": "评论内容字段",
|
|
12
|
+
"Comment date field": "评论日期字段",
|
|
13
|
+
"Commenter field": "评论人字段",
|
|
14
|
+
"Comment owner field": "评论归属字段",
|
|
15
|
+
"Comment owner field value": "评论归属字段值",
|
|
16
|
+
"Current record field": "当前记录字段",
|
|
17
|
+
"Delete": "删除",
|
|
18
|
+
"Delete record": "删除记录",
|
|
19
|
+
"Delete settings": "删除设置",
|
|
20
|
+
"Edit": "编辑",
|
|
21
|
+
"Failed to create comment": "创建评论失败",
|
|
22
|
+
"Failed to delete comment": "删除评论失败",
|
|
23
|
+
"Failed to update comment": "更新评论失败",
|
|
24
|
+
"Field mapping": "字段映射",
|
|
25
|
+
"Jump to last page by default": "默认跳转到最后一页",
|
|
26
|
+
"Record comment action": "评论操作",
|
|
27
|
+
"Comments": "评论",
|
|
28
|
+
"Record comments settings": "区块:评论设置",
|
|
29
|
+
"No comments": "暂无评论",
|
|
30
|
+
"No resource or record selected for deletion": "未选择资源或记录,无法删除",
|
|
31
|
+
"Page size": "每页条数",
|
|
32
|
+
"Only many-to-one fields associated with the users collection can be selected.": "仅可选择关联用户表的多对一字段。",
|
|
33
|
+
"Please configure the comment content field, commenter field, comment owner field, and comment date field.": "请配置评论内容字段、评论人字段、评论归属字段和评论日期字段。",
|
|
34
|
+
"Quote reply": "引用并回复",
|
|
35
|
+
"Record deleted successfully": "记录已删除",
|
|
36
|
+
"Render error": "渲染错误",
|
|
37
|
+
"Search": "搜索",
|
|
38
|
+
"Select field": "选择字段",
|
|
39
|
+
"Select workflow": "选择工作流",
|
|
40
|
+
"Specify the associated business record value, for example the current record ID.": "指定关联业务记录值,例如当前记录 ID。",
|
|
41
|
+
"Submit action settings": "提交按钮设置",
|
|
42
|
+
"Submit comment": "提交评论",
|
|
43
|
+
"Support pre-action event (local mode), post-action event (local mode), and approval event here.": "这里支持操作前事件(本地模式)、操作后事件(本地模式)和审批事件。",
|
|
44
|
+
"The comment owner field value type does not match the comment owner field. Please reconfigure the field mapping.": "评论归属字段值的数据类型与评论归属字段不匹配,请重新配置字段映射。",
|
|
45
|
+
"The current record value is empty, so comments cannot be loaded.": "当前记录值为空,无法加载评论。",
|
|
46
|
+
"Update Comment": "更新评论",
|
|
47
|
+
"Workflow": "工作流",
|
|
48
|
+
"Bind workflows": "绑定工作流"
|
|
49
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
export { default } from './plugin';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
+
var server_exports = {};
|
|
38
|
+
__export(server_exports, {
|
|
39
|
+
default: () => import_plugin.default
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(server_exports);
|
|
42
|
+
var import_plugin = __toESM(require("./plugin"));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import { Plugin } from '@nocobase/server';
|
|
10
|
+
export declare class PluginRecordCommentsServer extends Plugin {
|
|
11
|
+
afterAdd(): Promise<void>;
|
|
12
|
+
beforeLoad(): Promise<void>;
|
|
13
|
+
load(): Promise<void>;
|
|
14
|
+
install(): Promise<void>;
|
|
15
|
+
afterEnable(): Promise<void>;
|
|
16
|
+
afterDisable(): Promise<void>;
|
|
17
|
+
remove(): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
export default PluginRecordCommentsServer;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var plugin_exports = {};
|
|
28
|
+
__export(plugin_exports, {
|
|
29
|
+
PluginRecordCommentsServer: () => PluginRecordCommentsServer,
|
|
30
|
+
default: () => plugin_default
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(plugin_exports);
|
|
33
|
+
var import_server = require("@nocobase/server");
|
|
34
|
+
class PluginRecordCommentsServer extends import_server.Plugin {
|
|
35
|
+
async afterAdd() {
|
|
36
|
+
}
|
|
37
|
+
async beforeLoad() {
|
|
38
|
+
}
|
|
39
|
+
async load() {
|
|
40
|
+
}
|
|
41
|
+
async install() {
|
|
42
|
+
}
|
|
43
|
+
async afterEnable() {
|
|
44
|
+
}
|
|
45
|
+
async afterDisable() {
|
|
46
|
+
}
|
|
47
|
+
async remove() {
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
var plugin_default = PluginRecordCommentsServer;
|
|
51
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
+
0 && (module.exports = {
|
|
53
|
+
PluginRecordCommentsServer
|
|
54
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nocobase/plugin-block-comment",
|
|
3
|
+
"version": "2.2.0-alpha.10",
|
|
4
|
+
"displayName": "Block: Comment",
|
|
5
|
+
"displayName.zh-CN": "区块:评论",
|
|
6
|
+
"description": "Add a comment block that allows users to create and view comments.",
|
|
7
|
+
"description.zh-CN": "提供评论区块,支持评论创建与查看",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"Block",
|
|
10
|
+
"Comments"
|
|
11
|
+
],
|
|
12
|
+
"main": "dist/server/index.js",
|
|
13
|
+
"peerDependencies": {
|
|
14
|
+
"@nocobase/client": "2.x",
|
|
15
|
+
"@nocobase/client-v2": "2.x",
|
|
16
|
+
"@nocobase/server": "2.x",
|
|
17
|
+
"@nocobase/test": "2.x"
|
|
18
|
+
},
|
|
19
|
+
"gitHead": "b5a3f131bb0a4a2fbfd96852896bccadc933d834"
|
|
20
|
+
}
|
package/server.d.ts
ADDED
package/server.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./dist/server/index.js');
|