datocms-plugin-record-comments 0.2.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.
- package/README.md +64 -4
- package/dist/assets/index-D7VcKz6i.css +1 -0
- package/dist/assets/index-UKydYRNj.js +251 -0
- package/dist/index.html +17 -0
- package/package.json +43 -43
- package/build/asset-manifest.json +0 -13
- package/build/index.html +0 -1
- package/build/robots.txt +0 -3
- package/build/static/css/main.19c0232f.css +0 -2
- package/build/static/css/main.19c0232f.css.map +0 -1
- package/build/static/js/main.255a6b09.js +0 -3
- package/build/static/js/main.255a6b09.js.LICENSE.txt +0 -59
- package/build/static/js/main.255a6b09.js.map +0 -1
- package/public/index.html +0 -11
- package/public/robots.txt +0 -3
- package/src/entrypoints/CommentsBar.tsx +0 -254
- package/src/entrypoints/NoLogModal.tsx +0 -43
- package/src/entrypoints/components/Comment.tsx +0 -260
- package/src/entrypoints/styles/comment.module.css +0 -134
- package/src/entrypoints/styles/commentbar.module.css +0 -3
- package/src/entrypoints/styles/modal.module.css +0 -13
- package/src/index.tsx +0 -45
- package/src/react-app-env.d.ts +0 -1
- package/src/utils/render.tsx +0 -6
- package/tsconfig.json +0 -26
package/src/index.tsx
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
connect,
|
|
3
|
-
IntentCtx,
|
|
4
|
-
ModelBlock,
|
|
5
|
-
RenderItemFormSidebarPanelCtx,
|
|
6
|
-
RenderModalCtx,
|
|
7
|
-
} from "datocms-plugin-sdk";
|
|
8
|
-
import { render } from "./utils/render";
|
|
9
|
-
import "datocms-react-ui/styles.css";
|
|
10
|
-
import React from "react";
|
|
11
|
-
import ReactDOM from "react-dom";
|
|
12
|
-
import Notes from "./entrypoints/CommentsBar";
|
|
13
|
-
import NoLogModal from "./entrypoints/NoLogModal";
|
|
14
|
-
import TimeAgo from "javascript-time-ago";
|
|
15
|
-
import en from "javascript-time-ago/locale/en.json";
|
|
16
|
-
|
|
17
|
-
TimeAgo.addDefaultLocale(en);
|
|
18
|
-
connect({
|
|
19
|
-
renderModal(modalId: string, ctx: RenderModalCtx) {
|
|
20
|
-
switch (modalId) {
|
|
21
|
-
case "NoLogModal":
|
|
22
|
-
return render(<NoLogModal ctx={ctx} />);
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
itemFormSidebarPanels(model: ModelBlock, ctx: IntentCtx) {
|
|
26
|
-
return [
|
|
27
|
-
{
|
|
28
|
-
id: "comments",
|
|
29
|
-
label: "Comments",
|
|
30
|
-
startOpen: false,
|
|
31
|
-
},
|
|
32
|
-
];
|
|
33
|
-
},
|
|
34
|
-
renderItemFormSidebarPanel(
|
|
35
|
-
sidebarPanelId,
|
|
36
|
-
ctx: RenderItemFormSidebarPanelCtx
|
|
37
|
-
) {
|
|
38
|
-
ReactDOM.render(
|
|
39
|
-
<React.StrictMode>
|
|
40
|
-
<Notes ctx={ctx} />
|
|
41
|
-
</React.StrictMode>,
|
|
42
|
-
document.getElementById("root")
|
|
43
|
-
);
|
|
44
|
-
},
|
|
45
|
-
});
|
package/src/react-app-env.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="react-scripts" />
|
package/src/utils/render.tsx
DELETED
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
|
-
}
|