@nocobase/plugin-comments 2.1.0-alpha.11 → 2.1.0-alpha.13
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/dist/externalVersion.js
CHANGED
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.1.0-alpha.
|
|
11
|
+
"@nocobase/client": "2.1.0-alpha.13",
|
|
12
12
|
"react": "18.2.0",
|
|
13
|
-
"@nocobase/
|
|
14
|
-
"@nocobase/server": "2.1.0-alpha.11",
|
|
13
|
+
"@nocobase/server": "2.1.0-alpha.13",
|
|
15
14
|
"@formily/core": "2.3.7",
|
|
16
15
|
"@formily/react": "2.3.7",
|
|
17
16
|
"antd": "5.24.2",
|
|
18
17
|
"dayjs": "1.11.13",
|
|
19
18
|
"lodash": "4.17.21",
|
|
20
|
-
"@nocobase/utils": "2.1.0-alpha.
|
|
19
|
+
"@nocobase/utils": "2.1.0-alpha.13",
|
|
21
20
|
"react-i18next": "11.18.6",
|
|
22
21
|
"@ant-design/icons": "5.6.1",
|
|
22
|
+
"@nocobase/flow-engine": "2.1.0-alpha.13",
|
|
23
23
|
"@formily/reactive-react": "2.3.7"
|
|
24
24
|
};
|
package/dist/server/plugin.d.ts
CHANGED
|
@@ -14,11 +14,9 @@
|
|
|
14
14
|
* This program is offered under a commercial license.
|
|
15
15
|
* For more information, see <https://www.nocobase.com/agreement>
|
|
16
16
|
*/
|
|
17
|
-
import type { FlowSchemaContribution } from '@nocobase/flow-engine';
|
|
18
17
|
import { Plugin } from '@nocobase/server';
|
|
19
18
|
export declare class PluginCommentServer extends Plugin {
|
|
20
19
|
afterAdd(): Promise<void>;
|
|
21
|
-
getFlowSchemaContributions(): FlowSchemaContribution;
|
|
22
20
|
beforeLoad(): Promise<void>;
|
|
23
21
|
load(): Promise<void>;
|
|
24
22
|
install(): Promise<void>;
|
package/dist/server/plugin.js
CHANGED
|
@@ -31,13 +31,9 @@ __export(plugin_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(plugin_exports);
|
|
33
33
|
var import_server = require("@nocobase/server");
|
|
34
|
-
var import_flow_schema_contributions = require("./flow-schema-contributions");
|
|
35
34
|
class PluginCommentServer extends import_server.Plugin {
|
|
36
35
|
async afterAdd() {
|
|
37
36
|
}
|
|
38
|
-
getFlowSchemaContributions() {
|
|
39
|
-
return import_flow_schema_contributions.flowSchemaContribution;
|
|
40
|
-
}
|
|
41
37
|
async beforeLoad() {
|
|
42
38
|
}
|
|
43
39
|
async load() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-comments",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.13",
|
|
4
4
|
"displayName": "Comments",
|
|
5
5
|
"displayName.zh-CN": "评论",
|
|
6
6
|
"description": "Provides comment collection template and block to add commenting functionality for any collection.",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"@nocobase/server": "2.x",
|
|
29
29
|
"@nocobase/test": "2.x"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "2807a8948412d9c235115a31a81a66f7c82dd173"
|
|
32
32
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
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 type { FlowSchemaContribution } from '@nocobase/flow-engine';
|
|
10
|
-
export declare const flowSchemaContribution: FlowSchemaContribution;
|
|
@@ -1,255 +0,0 @@
|
|
|
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 flow_schema_contributions_exports = {};
|
|
28
|
-
__export(flow_schema_contributions_exports, {
|
|
29
|
-
flowSchemaContribution: () => flowSchemaContribution
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(flow_schema_contributions_exports);
|
|
32
|
-
const genericFilterSchemaId = "urn:nocobase:schema:plugin-comments:generic-filter";
|
|
33
|
-
const emptyObjectSchema = {
|
|
34
|
-
type: "object",
|
|
35
|
-
additionalProperties: false
|
|
36
|
-
};
|
|
37
|
-
const genericFilterSchema = {
|
|
38
|
-
$id: genericFilterSchemaId,
|
|
39
|
-
definitions: {
|
|
40
|
-
filterCondition: {
|
|
41
|
-
type: "object",
|
|
42
|
-
properties: {
|
|
43
|
-
path: {
|
|
44
|
-
type: "string"
|
|
45
|
-
},
|
|
46
|
-
operator: {
|
|
47
|
-
type: "string"
|
|
48
|
-
},
|
|
49
|
-
value: {},
|
|
50
|
-
noValue: {
|
|
51
|
-
type: "boolean"
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
required: ["path"],
|
|
55
|
-
additionalProperties: true,
|
|
56
|
-
allOf: [
|
|
57
|
-
{
|
|
58
|
-
not: {
|
|
59
|
-
required: ["logic"]
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
not: {
|
|
64
|
-
required: ["items"]
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
]
|
|
68
|
-
},
|
|
69
|
-
filterGroup: {
|
|
70
|
-
type: "object",
|
|
71
|
-
properties: {
|
|
72
|
-
logic: {
|
|
73
|
-
type: "string",
|
|
74
|
-
enum: ["$and", "$or"]
|
|
75
|
-
},
|
|
76
|
-
items: {
|
|
77
|
-
type: "array",
|
|
78
|
-
items: {
|
|
79
|
-
oneOf: [
|
|
80
|
-
{ $ref: `${genericFilterSchemaId}#/definitions/filterCondition` },
|
|
81
|
-
{ $ref: `${genericFilterSchemaId}#/definitions/filterGroup` }
|
|
82
|
-
]
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
required: ["logic", "items"],
|
|
87
|
-
additionalProperties: true,
|
|
88
|
-
allOf: [
|
|
89
|
-
{
|
|
90
|
-
not: {
|
|
91
|
-
required: ["path"]
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
not: {
|
|
96
|
-
required: ["operator"]
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
not: {
|
|
101
|
-
required: ["value"]
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
not: {
|
|
106
|
-
required: ["noValue"]
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
]
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
type: "object",
|
|
113
|
-
properties: {
|
|
114
|
-
logic: {
|
|
115
|
-
type: "string",
|
|
116
|
-
enum: ["$and", "$or"]
|
|
117
|
-
},
|
|
118
|
-
items: {
|
|
119
|
-
type: "array",
|
|
120
|
-
items: {
|
|
121
|
-
oneOf: [
|
|
122
|
-
{ $ref: `${genericFilterSchemaId}#/definitions/filterCondition` },
|
|
123
|
-
{ $ref: `${genericFilterSchemaId}#/definitions/filterGroup` }
|
|
124
|
-
]
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
required: ["logic", "items"],
|
|
129
|
-
additionalProperties: true,
|
|
130
|
-
allOf: [
|
|
131
|
-
{
|
|
132
|
-
not: {
|
|
133
|
-
required: ["path"]
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
not: {
|
|
138
|
-
required: ["operator"]
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
not: {
|
|
143
|
-
required: ["value"]
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
not: {
|
|
148
|
-
required: ["noValue"]
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
]
|
|
152
|
-
};
|
|
153
|
-
const commentItemModelInternalSchemaContribution = {
|
|
154
|
-
use: "CommentItemModel",
|
|
155
|
-
title: "Comment item",
|
|
156
|
-
source: "plugin",
|
|
157
|
-
strict: false,
|
|
158
|
-
exposure: "internal",
|
|
159
|
-
stepParamsSchema: emptyObjectSchema,
|
|
160
|
-
skeleton: {
|
|
161
|
-
uid: "comment-item-uid",
|
|
162
|
-
use: "CommentItemModel"
|
|
163
|
-
},
|
|
164
|
-
docs: {
|
|
165
|
-
minimalExample: {
|
|
166
|
-
uid: "comment-item-1",
|
|
167
|
-
use: "CommentItemModel"
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
const commentsBlockModelSchemaContribution = {
|
|
172
|
-
use: "CommentsBlockModel",
|
|
173
|
-
title: "Comments block",
|
|
174
|
-
source: "plugin",
|
|
175
|
-
strict: false,
|
|
176
|
-
stepParamsSchema: {
|
|
177
|
-
type: "object",
|
|
178
|
-
properties: {
|
|
179
|
-
commentsSettings: {
|
|
180
|
-
type: "object",
|
|
181
|
-
properties: {
|
|
182
|
-
pageSize: {
|
|
183
|
-
type: "object",
|
|
184
|
-
properties: {
|
|
185
|
-
pageSize: {
|
|
186
|
-
type: "number",
|
|
187
|
-
enum: [5, 10, 20, 50, 100, 200]
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
additionalProperties: false
|
|
191
|
-
},
|
|
192
|
-
dataScope: {
|
|
193
|
-
type: "object",
|
|
194
|
-
properties: {
|
|
195
|
-
filter: genericFilterSchema
|
|
196
|
-
},
|
|
197
|
-
additionalProperties: false
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
additionalProperties: true
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
additionalProperties: true
|
|
204
|
-
},
|
|
205
|
-
subModelSlots: {
|
|
206
|
-
items: {
|
|
207
|
-
type: "array",
|
|
208
|
-
uses: ["CommentItemModel"],
|
|
209
|
-
description: "Comment item renderers."
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
|
-
skeleton: {
|
|
213
|
-
uid: "todo-uid",
|
|
214
|
-
use: "CommentsBlockModel",
|
|
215
|
-
stepParams: {
|
|
216
|
-
commentsSettings: {
|
|
217
|
-
pageSize: {
|
|
218
|
-
pageSize: 20
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
subModels: {
|
|
223
|
-
items: []
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
docs: {
|
|
227
|
-
minimalExample: {
|
|
228
|
-
uid: "comments-users",
|
|
229
|
-
use: "CommentsBlockModel",
|
|
230
|
-
stepParams: {
|
|
231
|
-
commentsSettings: {
|
|
232
|
-
pageSize: {
|
|
233
|
-
pageSize: 20
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
subModels: {
|
|
238
|
-
items: []
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
const flowSchemaContribution = {
|
|
244
|
-
inventory: {
|
|
245
|
-
publicTreeRoots: ["CommentsBlockModel"]
|
|
246
|
-
},
|
|
247
|
-
models: [commentItemModelInternalSchemaContribution, commentsBlockModelSchemaContribution],
|
|
248
|
-
defaults: {
|
|
249
|
-
source: "plugin"
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
253
|
-
0 && (module.exports = {
|
|
254
|
-
flowSchemaContribution
|
|
255
|
-
});
|