@rulab/adminjs-components 0.1.0-alpha.6 → 0.1.0-alpha.8
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/dist/components/ColorStatus/ColorStatusEdit.js +1 -1
- package/dist/components/ColorStatus/ColorStatusList.js +1 -1
- package/dist/components/ColorStatus/ColorStatusShow.js +1 -1
- package/dist/components/Editor/Editor.js +2 -2
- package/dist/components/Editor/EditorList.js +2 -2
- package/dist/components/Editor/EditorShow.js +2 -2
- package/dist/components/Slug/SlugEdit.js +1 -1
- package/dist/components/Slug/SlugFeature.js +1 -1
- package/dist/components/StringList/StringListShow.js +2 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState, useEffect } from "react";
|
|
2
2
|
import Select from "react-select";
|
|
3
3
|
import chroma from "chroma-js";
|
|
4
|
-
import { ColorStatusWrapper, Label } from "./styles";
|
|
4
|
+
import { ColorStatusWrapper, Label } from "./styles.js";
|
|
5
5
|
const dot = (color = "transparent") => ({
|
|
6
6
|
alignItems: "center",
|
|
7
7
|
display: "flex",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ColorStatusBadge } from "./styles";
|
|
2
|
+
import { ColorStatusBadge } from "./styles.js";
|
|
3
3
|
const ColorStatusList = ({ property, record }) => {
|
|
4
4
|
const currentOption = property.availableValues?.find((item) => item.value === record.params[property.path]);
|
|
5
5
|
return (React.createElement(ColorStatusBadge, { color: currentOption.color }, record.params[property.path]));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ColorStatusBadgeWrapper, ColorStatusBadge, ShowLabel } from "./styles";
|
|
2
|
+
import { ColorStatusBadgeWrapper, ColorStatusBadge, ShowLabel } from "./styles.js";
|
|
3
3
|
const ColorStatusShow = ({ property, record }) => {
|
|
4
4
|
const currentOption = property.availableValues?.find((item) => item.value === record.params[property.path]);
|
|
5
5
|
return (React.createElement(ColorStatusBadgeWrapper, null,
|
|
@@ -2,8 +2,8 @@ import React, { memo, useState, useEffect, useRef } from "react";
|
|
|
2
2
|
import { ThemeProvider } from "styled-components";
|
|
3
3
|
import EditorJS from "@editorjs/editorjs";
|
|
4
4
|
import { theme } from "@adminjs/design-system";
|
|
5
|
-
import { StyledLabel, StyledEditor, StyledEditorWrapper } from "./styles";
|
|
6
|
-
import { EDITOR_TOOLS } from "./config";
|
|
5
|
+
import { StyledLabel, StyledEditor, StyledEditorWrapper } from "./styles.js";
|
|
6
|
+
import { EDITOR_TOOLS } from "./config.js";
|
|
7
7
|
const Editor = ({ property, record, onChangeAdmin, editorId }) => {
|
|
8
8
|
const [jsonData, setJsonData] = useState();
|
|
9
9
|
const isSavedData = Boolean(record.params[property.path]);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { theme } from "@adminjs/design-system";
|
|
3
3
|
import { ThemeProvider } from "styled-components";
|
|
4
|
-
import { parseHtml } from "../../utils/parseHtml";
|
|
5
|
-
import { StyledEditorViewWrapper } from "./styles";
|
|
4
|
+
import { parseHtml } from "../../utils/parseHtml.js";
|
|
5
|
+
import { StyledEditorViewWrapper } from "./styles.js";
|
|
6
6
|
const EditorList = ({ property, record }) => {
|
|
7
7
|
const htmlContent = parseHtml(record.params[property.path]);
|
|
8
8
|
return (React.createElement(ThemeProvider, { theme: theme }, React.createElement(StyledEditorViewWrapper, null, htmlContent && (React.createElement("div", { dangerouslySetInnerHTML: { __html: htmlContent } })))));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ThemeProvider } from "styled-components";
|
|
3
3
|
import { theme } from "@adminjs/design-system";
|
|
4
|
-
import { parseHtml } from "../../utils/parseHtml";
|
|
5
|
-
import { StyledEditorShowWrapper, StyledShowLabel } from "./styles";
|
|
4
|
+
import { parseHtml } from "../../utils/parseHtml.js";
|
|
5
|
+
import { StyledEditorShowWrapper, StyledShowLabel } from "./styles.js";
|
|
6
6
|
const EditorShow = ({ property, record }) => {
|
|
7
7
|
const htmlContent = parseHtml(record.params[property.path]);
|
|
8
8
|
return (React.createElement(ThemeProvider, { theme: theme }, React.createElement(StyledEditorShowWrapper, null, React.createElement(StyledShowLabel, null, property.path), htmlContent && (React.createElement("div", { dangerouslySetInnerHTML: { __html: htmlContent } })))));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState, } from "react";
|
|
2
2
|
import { ThemeProvider } from "styled-components";
|
|
3
3
|
import { theme } from "@adminjs/design-system";
|
|
4
|
-
import { slugifyTitle } from "../../utils";
|
|
4
|
+
import { slugifyTitle } from "../../utils/index.js";
|
|
5
5
|
import { StyledCustomInput, StyledGenerateButton, StyledInputWrapper, StyledLabel, } from "./styles.js";
|
|
6
6
|
const SlugEdit = ({ property, record, resource, onChange, }) => {
|
|
7
7
|
const [inputValue, setInputValue] = useState(record.params.slug);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { buildFeature } from "adminjs";
|
|
2
|
-
import { bundleComponent } from "../../utils/bundle-component";
|
|
2
|
+
import { bundleComponent } from "../../utils/bundle-component.js";
|
|
3
3
|
const COMPONENT_NAME = 'Slug';
|
|
4
4
|
const SlugFeature = (config) => {
|
|
5
5
|
const { componentLoader, key } = config;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ThemeProvider } from "styled-components";
|
|
3
3
|
import { theme } from "@adminjs/design-system";
|
|
4
|
-
import { StyledShowLabel, StyledShowWrapper, StyledListItem } from "./styles";
|
|
5
|
-
import { separator } from "./constants";
|
|
4
|
+
import { StyledShowLabel, StyledShowWrapper, StyledListItem } from "./styles.js";
|
|
5
|
+
import { separator } from "./constants.js";
|
|
6
6
|
const StringListShow = ({ property, record, stringListSeparator = separator, }) => {
|
|
7
7
|
return (React.createElement(ThemeProvider, { theme: theme },
|
|
8
8
|
React.createElement(StyledShowWrapper, null,
|