@rulab/adminjs-components 0.1.0-alpha.6 → 0.1.0-alpha.7

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,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,3 +1,3 @@
1
- export * from "./Editor.jsx";
2
- export * from "./EditorShow.jsx";
3
- export * from "./EditorList.jsx";
1
+ export * from "./Editor.jsx.js";
2
+ export * from "./EditorShow.jsx.js";
3
+ export * from "./EditorList.jsx.js";
@@ -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.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,
@@ -2,9 +2,9 @@ export { default as ColorStatusEdit } from "./ColorStatus/ColorStatusEdit.js";
2
2
  export { default as ColorStatusShow } from "./ColorStatus/ColorStatusShow.js";
3
3
  export { default as ColorStatusList } from "./ColorStatus/ColorStatusList.js";
4
4
  export { default as SlugEdit } from "./Slug/SlugEdit.js";
5
- //export { default as Editor } from "./Editor/Editor.jsx";
6
- //export { default as EditorList } from "./Editor/EditorList.jsx";
7
- //export { default as EditorShow } from "./Editor/EditorShow.jsx";
5
+ //export { default as Editor } from "./Editor/Editor.jsx.js";
6
+ //export { default as EditorList } from "./Editor/EditorList.jsx.js";
7
+ //export { default as EditorShow } from "./Editor/EditorShow.jsx.js";
8
8
  export { default as StringList } from "./StringList/StringList.js";
9
9
  export { default as StringListShow } from "./StringList/StringListShow.js";
10
10
  export { default as SlugFeature } from "./Slug/SlugFeature.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rulab/adminjs-components",
3
- "version": "0.1.0-alpha.6",
3
+ "version": "0.1.0-alpha.7",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",