@blocklet/discuss-kit 1.0.40 → 1.0.42
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/lib/cjs/comments.js +13 -6
- package/lib/es/comments.js +13 -6
- package/package.json +4 -4
package/lib/cjs/comments.js
CHANGED
|
@@ -135,7 +135,8 @@ function DiscussKitComments({
|
|
|
135
135
|
showConnectBtn,
|
|
136
136
|
object,
|
|
137
137
|
onChange,
|
|
138
|
-
commentInputPosition
|
|
138
|
+
commentInputPosition,
|
|
139
|
+
showTopbar
|
|
139
140
|
}) {
|
|
140
141
|
const {
|
|
141
142
|
session
|
|
@@ -264,7 +265,7 @@ function DiscussKitComments({
|
|
|
264
265
|
draftKey: `object-${object.id}`
|
|
265
266
|
})
|
|
266
267
|
})]
|
|
267
|
-
}), !!total && /* @__PURE__ */ jsxRuntime.jsxs(Box__default.default, {
|
|
268
|
+
}), !!total && showTopbar && /* @__PURE__ */ jsxRuntime.jsxs(Box__default.default, {
|
|
268
269
|
display: "flex",
|
|
269
270
|
justifyContent: "space-between",
|
|
270
271
|
mt: 3,
|
|
@@ -298,19 +299,22 @@ DiscussKitComments.propTypes = {
|
|
|
298
299
|
showConnectBtn: PropTypes__default.default.bool,
|
|
299
300
|
object: PropTypes__default.default.object.isRequired,
|
|
300
301
|
onChange: PropTypes__default.default.func,
|
|
301
|
-
commentInputPosition: PropTypes__default.default.oneOf(["top", "bottom"])
|
|
302
|
+
commentInputPosition: PropTypes__default.default.oneOf(["top", "bottom"]),
|
|
303
|
+
showTopbar: PropTypes__default.default.bool
|
|
302
304
|
};
|
|
303
305
|
DiscussKitComments.defaultProps = {
|
|
304
306
|
showConnectBtn: false,
|
|
305
307
|
onChange: () => {
|
|
306
308
|
},
|
|
307
|
-
commentInputPosition: "top"
|
|
309
|
+
commentInputPosition: "top",
|
|
310
|
+
showTopbar: true
|
|
308
311
|
};
|
|
309
312
|
function Wrapper({
|
|
310
313
|
target,
|
|
311
314
|
prefix,
|
|
312
315
|
flatView,
|
|
313
316
|
autoCollapse,
|
|
317
|
+
order,
|
|
314
318
|
...rest
|
|
315
319
|
}) {
|
|
316
320
|
if (!(target == null ? void 0 : target.id)) {
|
|
@@ -367,6 +371,7 @@ function Wrapper({
|
|
|
367
371
|
target: object,
|
|
368
372
|
api: commentAPI,
|
|
369
373
|
flatView,
|
|
374
|
+
order,
|
|
370
375
|
children: /* @__PURE__ */ jsxRuntime.jsx(DiscussKitComments, {
|
|
371
376
|
...rest,
|
|
372
377
|
object
|
|
@@ -388,7 +393,8 @@ Wrapper.propTypes = {
|
|
|
388
393
|
onChange: PropTypes__default.default.func,
|
|
389
394
|
prefix: PropTypes__default.default.string,
|
|
390
395
|
flatView: PropTypes__default.default.bool,
|
|
391
|
-
autoCollapse: PropTypes__default.default.bool
|
|
396
|
+
autoCollapse: PropTypes__default.default.bool,
|
|
397
|
+
order: PropTypes__default.default.oneOf(["asc", "desc"])
|
|
392
398
|
};
|
|
393
399
|
Wrapper.defaultProps = {
|
|
394
400
|
showConnectBtn: false,
|
|
@@ -396,7 +402,8 @@ Wrapper.defaultProps = {
|
|
|
396
402
|
},
|
|
397
403
|
prefix: "",
|
|
398
404
|
flatView: false,
|
|
399
|
-
autoCollapse: false
|
|
405
|
+
autoCollapse: false,
|
|
406
|
+
order: void 0
|
|
400
407
|
};
|
|
401
408
|
const Container = Theme.styled("div")`
|
|
402
409
|
background-color: #fff;
|
package/lib/es/comments.js
CHANGED
|
@@ -122,7 +122,8 @@ function DiscussKitComments({
|
|
|
122
122
|
showConnectBtn,
|
|
123
123
|
object,
|
|
124
124
|
onChange,
|
|
125
|
-
commentInputPosition
|
|
125
|
+
commentInputPosition,
|
|
126
|
+
showTopbar
|
|
126
127
|
}) {
|
|
127
128
|
const {
|
|
128
129
|
session
|
|
@@ -251,7 +252,7 @@ function DiscussKitComments({
|
|
|
251
252
|
draftKey: `object-${object.id}`
|
|
252
253
|
})
|
|
253
254
|
})]
|
|
254
|
-
}), !!total && /* @__PURE__ */ jsxs(Box, {
|
|
255
|
+
}), !!total && showTopbar && /* @__PURE__ */ jsxs(Box, {
|
|
255
256
|
display: "flex",
|
|
256
257
|
justifyContent: "space-between",
|
|
257
258
|
mt: 3,
|
|
@@ -285,19 +286,22 @@ DiscussKitComments.propTypes = {
|
|
|
285
286
|
showConnectBtn: PropTypes.bool,
|
|
286
287
|
object: PropTypes.object.isRequired,
|
|
287
288
|
onChange: PropTypes.func,
|
|
288
|
-
commentInputPosition: PropTypes.oneOf(["top", "bottom"])
|
|
289
|
+
commentInputPosition: PropTypes.oneOf(["top", "bottom"]),
|
|
290
|
+
showTopbar: PropTypes.bool
|
|
289
291
|
};
|
|
290
292
|
DiscussKitComments.defaultProps = {
|
|
291
293
|
showConnectBtn: false,
|
|
292
294
|
onChange: () => {
|
|
293
295
|
},
|
|
294
|
-
commentInputPosition: "top"
|
|
296
|
+
commentInputPosition: "top",
|
|
297
|
+
showTopbar: true
|
|
295
298
|
};
|
|
296
299
|
function Wrapper({
|
|
297
300
|
target,
|
|
298
301
|
prefix,
|
|
299
302
|
flatView,
|
|
300
303
|
autoCollapse,
|
|
304
|
+
order,
|
|
301
305
|
...rest
|
|
302
306
|
}) {
|
|
303
307
|
if (!(target == null ? void 0 : target.id)) {
|
|
@@ -354,6 +358,7 @@ function Wrapper({
|
|
|
354
358
|
target: object,
|
|
355
359
|
api: commentAPI,
|
|
356
360
|
flatView,
|
|
361
|
+
order,
|
|
357
362
|
children: /* @__PURE__ */ jsx(DiscussKitComments, {
|
|
358
363
|
...rest,
|
|
359
364
|
object
|
|
@@ -375,7 +380,8 @@ Wrapper.propTypes = {
|
|
|
375
380
|
onChange: PropTypes.func,
|
|
376
381
|
prefix: PropTypes.string,
|
|
377
382
|
flatView: PropTypes.bool,
|
|
378
|
-
autoCollapse: PropTypes.bool
|
|
383
|
+
autoCollapse: PropTypes.bool,
|
|
384
|
+
order: PropTypes.oneOf(["asc", "desc"])
|
|
379
385
|
};
|
|
380
386
|
Wrapper.defaultProps = {
|
|
381
387
|
showConnectBtn: false,
|
|
@@ -383,7 +389,8 @@ Wrapper.defaultProps = {
|
|
|
383
389
|
},
|
|
384
390
|
prefix: "",
|
|
385
391
|
flatView: false,
|
|
386
|
-
autoCollapse: false
|
|
392
|
+
autoCollapse: false,
|
|
393
|
+
order: void 0
|
|
387
394
|
};
|
|
388
395
|
const Container = styled("div")`
|
|
389
396
|
background-color: #fff;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/discuss-kit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.42",
|
|
4
4
|
"description": "A react component for Discuss Kit blocklet.",
|
|
5
5
|
"main": "./lib/cjs/index.js",
|
|
6
6
|
"module": "./lib/es/index.js",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@arcblock/did-connect": "^2.4.64",
|
|
38
38
|
"@arcblock/ux": "^2.4.64",
|
|
39
39
|
"@arcblock/ws": "^1.18.34",
|
|
40
|
-
"@blocklet/discuss-kit-ux": "1.0.
|
|
41
|
-
"@blocklet/editor": "1.0.
|
|
40
|
+
"@blocklet/discuss-kit-ux": "1.0.42",
|
|
41
|
+
"@blocklet/editor": "1.0.42",
|
|
42
42
|
"@emotion/react": "^11.10.5",
|
|
43
43
|
"@emotion/styled": "^11.10.5",
|
|
44
44
|
"@mui/icons-material": "^5.10.9",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"vite-plugin-build": "^0.6.0",
|
|
78
78
|
"vite-plugin-svgr": "^2.2.2"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "3fd0c5b69eb4aff12b3d29c3780f0f424479e058"
|
|
81
81
|
}
|