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.
@@ -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,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
- });
@@ -1 +0,0 @@
1
- /// <reference types="react-scripts" />
@@ -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
- }