datocms-plugin-record-comments 0.3.0 → 1.0.0

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.
@@ -1,134 +0,0 @@
1
- .comment-main {
2
- display: flex;
3
- justify-content: space-around;
4
- }
5
-
6
- .author-profile-picture {
7
- border-radius: 5px;
8
- width: 50px;
9
- }
10
-
11
- .comment__buttons {
12
- display: flex;
13
- justify-content: left;
14
- }
15
-
16
- .comment__button {
17
- background-color: transparent;
18
- border: none;
19
- color: var(--light-body-color);
20
- }
21
-
22
- .comment__button:hover {
23
- cursor: pointer;
24
- color: var(--dark-color);
25
- }
26
-
27
- .comment {
28
- margin-bottom: 3em;
29
- }
30
-
31
- .reply {
32
- margin-bottom: 0;
33
- }
34
-
35
- .author-info {
36
- display: flex;
37
- flex-direction: column;
38
- align-items: center;
39
- padding: 1em;
40
- flex-grow: 1;
41
- }
42
-
43
- .reply {
44
- margin-left: 30px;
45
- }
46
-
47
- .comment-body {
48
- flex-grow: 8;
49
- }
50
-
51
- .comment-textarea {
52
- background-color: var(--lighter-bg-color);
53
- border: solid var(--border-color);
54
- resize: none;
55
- font: inherit;
56
- width: 100%;
57
- }
58
-
59
- .comment-footer {
60
- font-size: var(--font-size-s);
61
- display: flex;
62
- justify-content: center;
63
- align-items: center;
64
- }
65
-
66
- .comment__buttons {
67
- display: flex;
68
- flex-direction: column;
69
- align-items: baseline;
70
- width: 90%;
71
- }
72
-
73
- .comment__timestamps {
74
- color: var(--light-body-color);
75
- font-size: var(--font-size-xs);
76
- }
77
-
78
- .tip {
79
- width: 0px;
80
- height: 0px;
81
- position: absolute;
82
- background: transparent;
83
- border: 10px solid var(--light-bg-color);
84
- }
85
-
86
- .tip-down {
87
- bottom: -25px;
88
- left: 10px;
89
- border-right-color: transparent;
90
- border-left-color: transparent;
91
- border-bottom-color: transparent;
92
- }
93
-
94
- .dialogbox .body {
95
- position: relative;
96
- max-width: 300px;
97
- height: auto;
98
- padding: 5px;
99
- background-color: var(--light-bg-color);
100
- border-radius: 3px;
101
- border: 5px solid var(--light-bg-color);
102
- }
103
-
104
- .body .message {
105
- border-radius: 3px;
106
- font-size: var(--font-size-s);
107
- }
108
-
109
- .reply-line {
110
- content: "";
111
- width: 2px;
112
- height: 80px;
113
- background: var(--darker-border-color);
114
- position: absolute;
115
- left: 32px;
116
- }
117
-
118
- .reply-profile-picture-line {
119
- content: "";
120
- width: 30px;
121
- height: 2px;
122
- background: var(--darker-border-color);
123
- position: absolute;
124
- left: 32px;
125
- z-index: -1;
126
- }
127
-
128
- .upvoted {
129
- color: var(--dark-color);
130
- }
131
-
132
- .comment__interface {
133
- color: var(--light-body-color);
134
- }
@@ -1,3 +0,0 @@
1
- .add-comment-button {
2
- margin-bottom: 1.4em;
3
- }
@@ -1,13 +0,0 @@
1
- .error-explanation {
2
- margin-bottom: 3em;
3
- }
4
-
5
- .buttons {
6
- display: flex;
7
- justify-content: space-between;
8
- }
9
-
10
- .note {
11
- font-size: 0.9em;
12
- color: var(--light-body-color);
13
- }
package/src/index.tsx DELETED
@@ -1,44 +0,0 @@
1
- import {
2
- connect,
3
- IntentCtx,
4
- RenderItemFormSidebarPanelCtx,
5
- RenderModalCtx,
6
- } from 'datocms-plugin-sdk';
7
- import { render } from './utils/render';
8
- import 'datocms-react-ui/styles.css';
9
- import React from 'react';
10
- import ReactDOM from 'react-dom';
11
- import Notes from './entrypoints/CommentsBar';
12
- import NoLogModal from './entrypoints/NoLogModal';
13
- import TimeAgo from 'javascript-time-ago';
14
- import en from 'javascript-time-ago/locale/en.json';
15
-
16
- TimeAgo.addDefaultLocale(en);
17
- connect({
18
- renderModal(modalId: string, ctx: RenderModalCtx) {
19
- switch (modalId) {
20
- case 'NoLogModal':
21
- return render(<NoLogModal ctx={ctx} />);
22
- }
23
- },
24
- itemFormSidebarPanels() {
25
- return [
26
- {
27
- id: 'comments',
28
- label: 'Comments',
29
- startOpen: false,
30
- },
31
- ];
32
- },
33
- renderItemFormSidebarPanel(
34
- sidebarPanelId,
35
- ctx: RenderItemFormSidebarPanelCtx
36
- ) {
37
- ReactDOM.render(
38
- <React.StrictMode>
39
- <Notes ctx={ctx} />
40
- </React.StrictMode>,
41
- document.getElementById('root')
42
- );
43
- },
44
- });
@@ -1 +0,0 @@
1
- /// <reference types="react-scripts" />
@@ -1,4 +0,0 @@
1
- declare module 'md5' {
2
- function md5(input: string): string;
3
- export default md5;
4
- }
@@ -1,6 +0,0 @@
1
- import React, { StrictMode } from 'react';
2
- import ReactDOM from 'react-dom';
3
-
4
- export function render(component: React.ReactNode): void {
5
- ReactDOM.render(<StrictMode>{component}</StrictMode>, document.getElementById('root'));
6
- }
package/tsconfig.json DELETED
@@ -1,26 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es5",
4
- "lib": [
5
- "dom",
6
- "dom.iterable",
7
- "esnext"
8
- ],
9
- "allowJs": true,
10
- "skipLibCheck": true,
11
- "esModuleInterop": true,
12
- "allowSyntheticDefaultImports": true,
13
- "strict": true,
14
- "forceConsistentCasingInFileNames": true,
15
- "noFallthroughCasesInSwitch": true,
16
- "module": "esnext",
17
- "moduleResolution": "node",
18
- "resolveJsonModule": true,
19
- "isolatedModules": true,
20
- "noEmit": true,
21
- "jsx": "react-jsx"
22
- },
23
- "include": [
24
- "src"
25
- ]
26
- }