strapi-plugin-comments 2.2.15 → 2.2.16

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 (73) hide show
  1. package/README.md +3 -3
  2. package/admin/src/components/CommentReviewModal/index.d.ts +0 -1
  3. package/admin/src/components/ConfirmationDialog/index.d.ts +0 -1
  4. package/admin/src/components/DiscussionStatus/index.d.ts +0 -1
  5. package/admin/src/components/DiscussionThread/index.d.ts +0 -1
  6. package/admin/src/components/DiscussionThreadItem/index.d.ts +0 -1
  7. package/admin/src/components/DiscussionThreadItemActions/index.d.ts +0 -1
  8. package/admin/src/components/DiscussionThreadItemApprovalFlowActions/index.d.ts +0 -1
  9. package/admin/src/components/DiscussionThreadItemFooter/index.d.ts +0 -1
  10. package/admin/src/components/DiscussionThreadItemReviewAction/index.d.ts +0 -1
  11. package/admin/src/components/FormSwitch/index.d.ts +0 -1
  12. package/admin/src/components/LoadingIndicatorOverlay/index.d.ts +0 -1
  13. package/admin/src/components/ModeratorResponse/index.js +5 -8
  14. package/admin/src/components/ModeratorResponseModal/ModeratorResponseModal.js +5 -8
  15. package/admin/src/components/Nav/index.d.ts +0 -1
  16. package/admin/src/components/PluginIcon/index.d.ts +0 -1
  17. package/admin/src/components/PreviewWysiwyg/utils/satinizeHtml.d.ts +18 -1
  18. package/admin/src/components/ReportsActions/components/BlockMenu/index.d.ts +0 -1
  19. package/admin/src/components/ReportsActions/index.d.ts +0 -1
  20. package/admin/src/components/ReportsReviewModal/index.d.ts +0 -1
  21. package/admin/src/components/ReportsReviewTable/index.d.ts +0 -1
  22. package/admin/src/components/StatusBadge/index.d.ts +0 -1
  23. package/admin/src/components/TableFilters/index.d.ts +0 -1
  24. package/admin/src/components/TablePagination/index.d.ts +0 -1
  25. package/admin/src/components/Wysiwyg/Editor.d.ts +24 -12
  26. package/admin/src/components/Wysiwyg/Editor.js +375 -21
  27. package/admin/src/components/Wysiwyg/EditorLayout.d.ts +9 -8
  28. package/admin/src/components/Wysiwyg/EditorLayout.js +37 -51
  29. package/admin/src/components/Wysiwyg/Field.d.ts +15 -0
  30. package/admin/src/components/Wysiwyg/{index.js → Field.js} +48 -49
  31. package/admin/src/components/Wysiwyg/PreviewWysiwyg.d.ts +6 -0
  32. package/admin/src/components/Wysiwyg/PreviewWysiwyg.js +191 -0
  33. package/admin/src/components/Wysiwyg/WysiwygFooter.d.ts +7 -6
  34. package/admin/src/components/Wysiwyg/WysiwygFooter.js +32 -13
  35. package/admin/src/components/Wysiwyg/WysiwygNav.d.ts +12 -10
  36. package/admin/src/components/Wysiwyg/WysiwygNav.js +76 -58
  37. package/admin/src/components/Wysiwyg/WysiwygStyles.d.ts +0 -1
  38. package/admin/src/components/Wysiwyg/WysiwygStyles.js +8 -13
  39. package/admin/src/components/Wysiwyg/utils/continueList.d.ts +5 -2
  40. package/admin/src/components/Wysiwyg/utils/continueList.js +2 -1
  41. package/admin/src/components/Wysiwyg/utils/mdRenderer.d.ts +5 -0
  42. package/admin/src/components/Wysiwyg/utils/mdRenderer.js +63 -0
  43. package/admin/src/components/Wysiwyg/utils/utils.d.ts +11 -9
  44. package/admin/src/components/Wysiwyg/utils/utils.js +13 -12
  45. package/admin/src/components/icons/comments.d.ts +0 -1
  46. package/admin/src/components/icons/lock.d.ts +0 -1
  47. package/admin/src/components/icons/review.d.ts +0 -1
  48. package/admin/src/components/icons/strapiIcons.d.ts +0 -1
  49. package/admin/src/components/icons/unlock.d.ts +0 -1
  50. package/admin/src/custom-fields/comments/components/icon.d.ts +0 -1
  51. package/admin/src/index.d.ts +3 -1
  52. package/admin/src/index.js +1 -1
  53. package/admin/src/pages/App/index.d.ts +14 -2
  54. package/admin/src/pages/App/reducer/selectors.d.ts +5 -1
  55. package/admin/src/pages/Details/components/DetailsEntity/index.d.ts +0 -1
  56. package/admin/src/pages/Details/components/DetailsFilters/index.d.ts +0 -1
  57. package/admin/src/pages/Details/index.d.ts +9 -2
  58. package/admin/src/pages/Discover/components/DiscoverTableRow/index.d.ts +0 -1
  59. package/admin/src/pages/Discover/index.d.ts +9 -2
  60. package/admin/src/pages/NoAccessPage/index.d.ts +0 -1
  61. package/admin/src/pages/Reports/components/ReportsTableRow/index.d.ts +0 -1
  62. package/admin/src/pages/Reports/index.d.ts +9 -2
  63. package/admin/src/pages/Settings/index.d.ts +0 -1
  64. package/admin/src/pages/Settings/index.js +2 -5
  65. package/admin/src/permissions.js +0 -1
  66. package/package.json +7 -8
  67. package/server/services/common.js +3 -4
  68. package/tsconfig.tsbuildinfo +1 -1
  69. package/admin/src/components/Wysiwyg/EditorStylesContainer.d.ts +0 -2
  70. package/admin/src/components/Wysiwyg/EditorStylesContainer.js +0 -348
  71. package/admin/src/components/Wysiwyg/index.d.ts +0 -28
  72. package/admin/src/components/Wysiwyg/tests/index.test.d.ts +0 -2
  73. package/admin/src/components/Wysiwyg/tests/index.test.js +0 -1633
@@ -1,2 +0,0 @@
1
- export declare const EditorStylesContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- //# sourceMappingURL=EditorStylesContainer.d.ts.map
@@ -1,348 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.EditorStylesContainer = void 0;
7
- const styled_components_1 = __importDefault(require("styled-components"));
8
- exports.EditorStylesContainer = styled_components_1.default.div `
9
- cursor: ${({ disabled }) => (disabled ? 'not-allowed !important' : 'auto')};
10
- height: 100%;
11
- /* BASICS */
12
- .CodeMirror-placeholder {
13
- color: ${({ theme }) => theme.colors.neutral600} !important;
14
- }
15
-
16
- .CodeMirror {
17
- /* Set height, width, borders, and global font properties here */
18
- font-size: ${14 / 16}rem;
19
- height: ${({ isExpandMode }) => (isExpandMode ? '100%' : '290px')};
20
- color: ${({ theme }) => theme.colors.neutral800};
21
- direction: ltr;
22
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
23
- 'Open Sans', 'Helvetica Neue', sans-serif;
24
- }
25
-
26
- /* PADDING */
27
-
28
- .CodeMirror-lines {
29
- padding: ${({ theme }) => `${theme.spaces[3]} ${theme.spaces[4]}`};
30
- /* Vertical padding around content */
31
- }
32
-
33
- .CodeMirror-scrollbar-filler,
34
- .CodeMirror-gutter-filler {
35
- /* The little square between H and V scrollbars */
36
- background-color: ${({ theme }) => `${theme.colors.neutral0}`};
37
- }
38
-
39
- /* GUTTER */
40
-
41
- .CodeMirror-gutters {
42
- border-right: 1px solid #ddd;
43
- background-color: #f7f7f7;
44
- white-space: nowrap;
45
- }
46
- .CodeMirror-linenumbers {
47
- }
48
- .CodeMirror-linenumber {
49
- padding: 0 3px 0 5px;
50
- min-width: 20px;
51
- text-align: right;
52
- color: #999;
53
- white-space: nowrap;
54
- }
55
-
56
- .CodeMirror-guttermarker {
57
- color: black;
58
- }
59
- .CodeMirror-guttermarker-subtle {
60
- color: #999;
61
- }
62
-
63
- /* CURSOR */
64
-
65
- .CodeMirror-cursor {
66
- border-left: 1px solid black;
67
- border-right: none;
68
- width: 0;
69
- }
70
- /* Shown when moving in bi-directional text */
71
- .CodeMirror div.CodeMirror-secondarycursor {
72
- border-left: 1px solid silver;
73
- }
74
- .cm-fat-cursor .CodeMirror-cursor {
75
- width: auto;
76
- border: 0 !important;
77
- background: #7e7;
78
- }
79
- .cm-fat-cursor div.CodeMirror-cursors {
80
- /* z-index: 1; */
81
- }
82
-
83
- .cm-fat-cursor-mark {
84
- background-color: rgba(20, 255, 20, 0.5);
85
- -webkit-animation: blink 1.06s steps(1) infinite;
86
- -moz-animation: blink 1.06s steps(1) infinite;
87
- animation: blink 1.06s steps(1) infinite;
88
- }
89
- .cm-animate-fat-cursor {
90
- width: auto;
91
- border: 0;
92
- -webkit-animation: blink 1.06s steps(1) infinite;
93
- -moz-animation: blink 1.06s steps(1) infinite;
94
- animation: blink 1.06s steps(1) infinite;
95
- background-color: #7e7;
96
- }
97
-
98
- /* Can style cursor different in overwrite (non-insert) mode */
99
- .CodeMirror-overwrite .CodeMirror-cursor {
100
- }
101
-
102
- .cm-tab {
103
- display: inline-block;
104
- text-decoration: inherit;
105
- }
106
-
107
- .CodeMirror-rulers {
108
- position: absolute;
109
- left: 0;
110
- right: 0;
111
- top: -50px;
112
- bottom: 0;
113
- overflow: hidden;
114
- }
115
- .CodeMirror-ruler {
116
- border-left: 1px solid #ccc;
117
- top: 0;
118
- bottom: 0;
119
- position: absolute;
120
- }
121
-
122
- /* DEFAULT THEME */
123
-
124
- .cm-header,
125
- .cm-strong {
126
- font-weight: bold;
127
- }
128
- .cm-em {
129
- font-style: italic;
130
- }
131
- .cm-link {
132
- text-decoration: underline;
133
- }
134
- .cm-strikethrough {
135
- text-decoration: line-through;
136
- }
137
-
138
- .CodeMirror-composing {
139
- border-bottom: 2px solid;
140
- }
141
-
142
- /* Default styles for common addons */
143
-
144
- div.CodeMirror span.CodeMirror-matchingbracket {
145
- color: #0b0;
146
- }
147
- div.CodeMirror span.CodeMirror-nonmatchingbracket {
148
- color: #a22;
149
- }
150
- .CodeMirror-matchingtag {
151
- background: rgba(255, 150, 0, 0.3);
152
- }
153
- .CodeMirror-activeline-background {
154
- background: #e8f2ff;
155
- }
156
-
157
- /* STOP */
158
-
159
- /* The rest of this file contains styles related to the mechanics of
160
- the editor. You probably shouldn't touch them. */
161
-
162
- .CodeMirror {
163
- position: relative;
164
- overflow: hidden;
165
- background: ${({ theme }) => `${theme.colors.neutral0}`};
166
- }
167
-
168
- .CodeMirror-scroll {
169
- overflow: scroll !important; /* Things will break if this is overridden */
170
- /* 50px is the magic margin used to hide the element's real scrollbars */
171
- /* See overflow: hidden in .CodeMirror */
172
- margin-bottom: -50px;
173
- margin-right: -50px;
174
- padding-bottom: 50px;
175
- height: 100%;
176
- outline: none; /* Prevent dragging from highlighting the element */
177
- position: relative;
178
- }
179
- .CodeMirror-sizer {
180
- position: relative;
181
- border-right: 50px solid transparent;
182
- }
183
-
184
- /* The fake, visible scrollbars. Used to force redraw during scrolling
185
- before actual scrolling happens, thus preventing shaking and
186
- flickering artifacts. */
187
- .CodeMirror-vscrollbar,
188
- .CodeMirror-hscrollbar,
189
- .CodeMirror-scrollbar-filler,
190
- .CodeMirror-gutter-filler {
191
- position: absolute;
192
- z-index: 1;
193
- display: none;
194
- outline: none;
195
- }
196
-
197
- .CodeMirror-vscrollbar {
198
- right: 0;
199
- top: 0;
200
- overflow-x: hidden;
201
- overflow-y: scroll;
202
- }
203
- .CodeMirror-hscrollbar {
204
- bottom: 0;
205
- left: 0;
206
- overflow-y: hidden;
207
- overflow-x: scroll;
208
- }
209
- .CodeMirror-scrollbar-filler {
210
- right: 0;
211
- bottom: 0;
212
- }
213
-
214
- .CodeMirror-lines {
215
- cursor: text;
216
- min-height: 1px; /* prevents collapsing before first draw */
217
- }
218
- /* Reset some styles that the rest of the page might have set */
219
- .CodeMirror pre.CodeMirror-line,
220
- .CodeMirror pre.CodeMirror-line-like {
221
- -moz-border-radius: 0;
222
- -webkit-border-radius: 0;
223
- border-radius: 0;
224
- border-width: 0;
225
- background: transparent;
226
- font-family: inherit;
227
- font-size: inherit;
228
- margin: 0;
229
- white-space: pre;
230
- word-wrap: normal;
231
- line-height: 1.5;
232
- color: inherit;
233
- /* z-index: 2; */
234
- position: relative;
235
- overflow: visible;
236
- -webkit-tap-highlight-color: transparent;
237
- -webkit-font-variant-ligatures: contextual;
238
- font-variant-ligatures: contextual;
239
- }
240
-
241
- .CodeMirror pre.CodeMirror-line-like {
242
- z-index: 2;
243
- }
244
-
245
- .CodeMirror-wrap pre.CodeMirror-line,
246
- .CodeMirror-wrap pre.CodeMirror-line-like {
247
- word-wrap: break-word;
248
- white-space: pre-wrap;
249
- word-break: normal;
250
- }
251
-
252
- .CodeMirror-linebackground {
253
- position: absolute;
254
- left: 0;
255
- right: 0;
256
- top: 0;
257
- bottom: 0;
258
- z-index: 0;
259
- }
260
-
261
- .CodeMirror-linewidget {
262
- position: relative;
263
- /* z-index: 2; */
264
- padding: 0.1px; /* Force widget margins to stay inside of the container */
265
- }
266
-
267
- .CodeMirror-widget {
268
- }
269
-
270
- .CodeMirror-rtl pre {
271
- direction: rtl;
272
- }
273
-
274
- .CodeMirror-code {
275
- outline: none;
276
- }
277
-
278
- /* Force content-box sizing for the elements where we expect it */
279
- .CodeMirror-scroll,
280
- .CodeMirror-sizer,
281
- .CodeMirror-gutter,
282
- .CodeMirror-gutters,
283
- .CodeMirror-linenumber {
284
- -moz-box-sizing: content-box;
285
- box-sizing: content-box;
286
- }
287
-
288
- .CodeMirror-measure {
289
- position: absolute;
290
- width: 100%;
291
- height: 0;
292
- overflow: hidden;
293
- visibility: hidden;
294
- }
295
-
296
- .CodeMirror-cursor {
297
- position: absolute;
298
- pointer-events: none;
299
- border-color: ${({ theme }) => `${theme.colors.neutral800}`};
300
- }
301
- .CodeMirror-measure pre {
302
- position: static;
303
- }
304
-
305
- div.CodeMirror-cursors {
306
- visibility: hidden;
307
- position: relative;
308
- + div {
309
- z-index: 0 !important;
310
- }
311
- }
312
-
313
- div.CodeMirror-dragcursors {
314
- visibility: visible;
315
- }
316
-
317
- .CodeMirror-focused div.CodeMirror-cursors {
318
- visibility: visible;
319
- }
320
-
321
- .CodeMirror-selected {
322
- background: ${({ theme }) => theme.colors.neutral200};
323
- /* z-index: -10; */
324
- }
325
- .CodeMirror-crosshair {
326
- cursor: crosshair;
327
- }
328
-
329
- /* Used to force a border model for a node */
330
- .cm-force-border {
331
- padding-right: 0.1px;
332
- }
333
-
334
- /* See issue #2901 */
335
- .cm-tab-wrap-hack:after {
336
- content: '';
337
- }
338
-
339
- /* Help users use markselection to safely style text background */
340
- span.CodeMirror-selectedtext {
341
- background: none;
342
- }
343
-
344
- span {
345
- color: ${({ theme }) => theme.colors.neutral800} !important;
346
- }
347
- `;
348
- //# sourceMappingURL=EditorStylesContainer.js.map
@@ -1,28 +0,0 @@
1
- import React from 'react';
2
- type WysiwygProps = {
3
- description?: {
4
- id: string;
5
- defaultMessage: string;
6
- values: {};
7
- };
8
- disabled?: boolean;
9
- error?: string;
10
- intlLabel: {
11
- id: string;
12
- defaultMessage: string;
13
- values: {};
14
- };
15
- labelAction?: JSX.Element;
16
- name: string;
17
- onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
18
- placeholder?: {
19
- id: string;
20
- defaultMessage: string;
21
- values: {};
22
- };
23
- required?: boolean;
24
- value: string;
25
- };
26
- declare const Wysiwyg: React.FC<WysiwygProps>;
27
- export default Wysiwyg;
28
- //# sourceMappingURL=index.d.ts.map
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.test.d.ts.map