@rulab/adminjs-components 0.0.4 → 0.0.5

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/index.cjs CHANGED
@@ -33,7 +33,8 @@ __export(src_exports, {
33
33
  CustomSlug: () => CustomSlug_default,
34
34
  Editor: () => Editor_default,
35
35
  EditorShow: () => EditorShow_default,
36
- StringList: () => StringList_default
36
+ StringList: () => StringList_default,
37
+ StringListShow: () => StringListShow_default
37
38
  });
38
39
  module.exports = __toCommonJS(src_exports);
39
40
 
@@ -111,6 +112,7 @@ var import_design_system3 = require("@adminjs/design-system");
111
112
  var StyledWrapper = (0, import_styled_components3.styled)(import_design_system3.Box)`
112
113
  display: flex;
113
114
  flex-direction: column;
115
+ margin-bottom: 45px;
114
116
  `;
115
117
  var StyledCustomInput2 = (0, import_styled_components3.styled)(import_design_system3.Input)`
116
118
  width: 100%;
@@ -122,6 +124,19 @@ var StyledInputWrapper2 = (0, import_styled_components3.styled)(import_design_sy
122
124
  var StyledListWrapper = (0, import_styled_components3.styled)(import_design_system3.Box)`
123
125
  margin-bottom: 15px;
124
126
  `;
127
+ var StringListShowLabel = import_styled_components3.styled.div`
128
+ font-size: 12px;
129
+ margin-bottom: 8px;
130
+ text-transform: capitalize;
131
+ line-height: 16px;
132
+ color: rgb(137, 138, 154);
133
+ `;
134
+ var StringListShowWrapper = (0, import_styled_components3.styled)(import_design_system3.Box)`
135
+ margin-bottom: 35px;
136
+ `;
137
+ var ListItem = import_styled_components3.styled.li`
138
+ margin-bottom: 5px;
139
+ `;
125
140
 
126
141
  // src/components/StringList/SortableList/SortableList.tsx
127
142
  var import_react4 = __toESM(require("react"), 1);
@@ -261,8 +276,16 @@ function SortableList({
261
276
  }
262
277
  SortableList.Item = SortableItem;
263
278
 
279
+ // src/constants.ts
280
+ var separator = "|";
281
+
264
282
  // src/components/StringList/StringList.tsx
265
- var StringList = ({ record, onChange, property }) => {
283
+ var StringList = ({
284
+ record,
285
+ onChange,
286
+ property,
287
+ stringListSeparator = separator
288
+ }) => {
266
289
  const stringListValue = record.params?.[property.path] ?? property.props.value ?? "";
267
290
  const initialList = stringListValue ? prepareDataForList(stringListValue) : [];
268
291
  const [inputValue, setInputValue] = (0, import_react5.useState)("");
@@ -317,10 +340,10 @@ var StringList = ({ record, onChange, property }) => {
317
340
  setList(newData);
318
341
  }
319
342
  function prepareDataForDatabase(list2) {
320
- return list2.map(({ value }) => value).join("|");
343
+ return list2.map(({ value }) => value).join(stringListSeparator);
321
344
  }
322
345
  function prepareDataForList(str) {
323
- return str.split("|").map((item) => createListObject(item));
346
+ return str.split(stringListSeparator).map((item) => createListObject(item));
324
347
  }
325
348
  function createListObject(value) {
326
349
  return {
@@ -331,24 +354,40 @@ var StringList = ({ record, onChange, property }) => {
331
354
  };
332
355
  var StringList_default = StringList;
333
356
 
334
- // src/components/Editor/Editor.jsx
357
+ // src/components/StringList/StringListShow.tsx
335
358
  var import_react6 = __toESM(require("react"), 1);
336
- var import_styled_components8 = require("styled-components");
359
+ var import_styled_components7 = require("styled-components");
360
+ var import_design_system6 = require("@adminjs/design-system");
361
+ var StringListShow = ({
362
+ property,
363
+ record,
364
+ stringListSeparator = separator
365
+ }) => {
366
+ console.log(stringListSeparator, "stringListSeparator");
367
+ return /* @__PURE__ */ import_react6.default.createElement(import_styled_components7.ThemeProvider, { theme: import_design_system6.theme }, /* @__PURE__ */ import_react6.default.createElement(StringListShowWrapper, null, /* @__PURE__ */ import_react6.default.createElement(StringListShowLabel, null, property.name), record.params.facts && /* @__PURE__ */ import_react6.default.createElement("ul", null, record.params.facts.split(stringListSeparator).map((item, index) => /* @__PURE__ */ import_react6.default.createElement(ListItem, { key: index }, `- ${item}`)))));
368
+ };
369
+ var StringListShow_default = StringListShow;
370
+
371
+ // src/components/Editor/Editor.jsx
372
+ var import_react7 = __toESM(require("react"), 1);
373
+ var import_styled_components9 = require("styled-components");
337
374
  var import_editorjs = __toESM(require("@editorjs/editorjs"), 1);
338
- var import_design_system7 = require("@adminjs/design-system");
375
+ var import_design_system8 = require("@adminjs/design-system");
339
376
 
340
377
  // src/components/Editor/styles.ts
341
- var import_design_system6 = require("@adminjs/design-system");
342
- var import_styled_components7 = require("@adminjs/design-system/styled-components");
343
- var Label3 = import_styled_components7.styled.div`
378
+ var import_design_system7 = require("@adminjs/design-system");
379
+ var import_styled_components8 = require("@adminjs/design-system/styled-components");
380
+ var Label3 = import_styled_components8.styled.div`
344
381
  font-size: 12px;
345
382
  margin-bottom: 8px;
383
+ color: rgb(137, 138, 154);
346
384
  `;
347
- var EditorWrapper = (0, import_styled_components7.styled)(import_design_system6.Box)`
385
+ var EditorWrapper = (0, import_styled_components8.styled)(import_design_system7.Box)`
348
386
  padding: 12px;
387
+ margin-bottom: 24px;
349
388
  border: 1px solid rgb(187, 195, 203);
350
389
  `;
351
- var StyledEditor = import_styled_components7.styled.div`
390
+ var StyledEditor = import_styled_components8.styled.div`
352
391
  .cdx-block,
353
392
  .ce-header {
354
393
  padding-left: 58px;
@@ -418,13 +457,13 @@ var EDITOR_TOOLS = {
418
457
 
419
458
  // src/components/Editor/Editor.jsx
420
459
  var Editor = ({ property, record, onChangeAdmin, editorId }) => {
421
- const [jsonData, setJsonData] = (0, import_react6.useState)();
460
+ const [jsonData, setJsonData] = (0, import_react7.useState)();
422
461
  const isSavedData = Boolean(record.params[property.path]);
423
- const ref = (0, import_react6.useRef)();
424
- (0, import_react6.useEffect)(() => {
462
+ const ref = (0, import_react7.useRef)();
463
+ (0, import_react7.useEffect)(() => {
425
464
  onChangeAdmin(property.path, jsonData);
426
465
  }, [jsonData]);
427
- (0, import_react6.useEffect)(() => {
466
+ (0, import_react7.useEffect)(() => {
428
467
  if (!ref.current) {
429
468
  const editor = new import_editorjs.default({
430
469
  holder: editorId,
@@ -441,14 +480,14 @@ var Editor = ({ property, record, onChangeAdmin, editorId }) => {
441
480
  ref?.current?.destroy?.();
442
481
  };
443
482
  }, []);
444
- return /* @__PURE__ */ import_react6.default.createElement(import_styled_components8.ThemeProvider, { theme: import_design_system7.theme }, /* @__PURE__ */ import_react6.default.createElement(Label3, null, "Text"), /* @__PURE__ */ import_react6.default.createElement(EditorWrapper, null, /* @__PURE__ */ import_react6.default.createElement(StyledEditor, { id: editorId })));
483
+ return /* @__PURE__ */ import_react7.default.createElement(import_styled_components9.ThemeProvider, { theme: import_design_system8.theme }, /* @__PURE__ */ import_react7.default.createElement(Label3, null, "Text"), /* @__PURE__ */ import_react7.default.createElement(EditorWrapper, null, /* @__PURE__ */ import_react7.default.createElement(StyledEditor, { id: editorId })));
445
484
  };
446
485
  var Editor_default = Editor;
447
486
 
448
487
  // src/components/Editor/EditorShow.jsx
449
- var import_react7 = __toESM(require("react"), 1);
450
- var import_styled_components9 = require("styled-components");
451
- var import_design_system8 = require("@adminjs/design-system");
488
+ var import_react8 = __toESM(require("react"), 1);
489
+ var import_styled_components10 = require("styled-components");
490
+ var import_design_system9 = require("@adminjs/design-system");
452
491
 
453
492
  // src/utils/parseHtml.ts
454
493
  var import_editorjs_html = __toESM(require("editorjs-html"), 1);
@@ -465,7 +504,7 @@ var parseHtml = (jsonData) => {
465
504
  // src/components/Editor/EditorShow.jsx
466
505
  var EditorShow = ({ property, record }) => {
467
506
  const htmlContent = parseHtml(record.params[property.path]);
468
- return /* @__PURE__ */ import_react7.default.createElement(import_styled_components9.ThemeProvider, { theme: import_design_system8.theme }, /* @__PURE__ */ import_react7.default.createElement(Label3, null, "Content"), htmlContent && /* @__PURE__ */ import_react7.default.createElement("div", { dangerouslySetInnerHTML: { __html: String(htmlContent) } }));
507
+ return /* @__PURE__ */ import_react8.default.createElement(import_styled_components10.ThemeProvider, { theme: import_design_system9.theme }, /* @__PURE__ */ import_react8.default.createElement(Label3, null, "Content"), htmlContent && /* @__PURE__ */ import_react8.default.createElement("div", { dangerouslySetInnerHTML: { __html: String(htmlContent) } }));
469
508
  };
470
509
  var EditorShow_default = EditorShow;
471
510
  // Annotate the CommonJS export names for ESM import in node:
@@ -473,5 +512,6 @@ var EditorShow_default = EditorShow;
473
512
  CustomSlug,
474
513
  Editor,
475
514
  EditorShow,
476
- StringList
515
+ StringList,
516
+ StringListShow
477
517
  });
package/dist/index.d.cts CHANGED
@@ -1,11 +1,19 @@
1
1
  import React, { FC } from 'react';
2
- import { EditPropertyProps } from 'adminjs';
2
+ import { EditPropertyProps, ShowPropertyProps } from 'adminjs';
3
3
 
4
4
  type CustomSlugTypes = Omit<EditPropertyProps, "where" | "resource">;
5
5
  declare const CustomSlug: FC<CustomSlugTypes>;
6
6
 
7
7
  type StringListTypes = Omit<EditPropertyProps, "where" | "resource">;
8
- declare const StringList: FC<StringListTypes>;
8
+ interface StringListShowPropsType$1 extends StringListTypes {
9
+ stringListSeparator?: string;
10
+ }
11
+ declare const StringList: FC<StringListShowPropsType$1>;
12
+
13
+ interface StringListShowPropsType extends ShowPropertyProps {
14
+ stringListSeparator?: string;
15
+ }
16
+ declare const StringListShow: FC<StringListShowPropsType>;
9
17
 
10
18
  declare function Editor({ property, record, onChangeAdmin, editorId }: {
11
19
  property: any;
@@ -19,4 +27,4 @@ declare function EditorShow({ property, record }: {
19
27
  record: any;
20
28
  }): React.JSX.Element;
21
29
 
22
- export { CustomSlug, Editor, EditorShow, StringList };
30
+ export { CustomSlug, Editor, EditorShow, StringList, StringListShow };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,19 @@
1
1
  import React, { FC } from 'react';
2
- import { EditPropertyProps } from 'adminjs';
2
+ import { EditPropertyProps, ShowPropertyProps } from 'adminjs';
3
3
 
4
4
  type CustomSlugTypes = Omit<EditPropertyProps, "where" | "resource">;
5
5
  declare const CustomSlug: FC<CustomSlugTypes>;
6
6
 
7
7
  type StringListTypes = Omit<EditPropertyProps, "where" | "resource">;
8
- declare const StringList: FC<StringListTypes>;
8
+ interface StringListShowPropsType$1 extends StringListTypes {
9
+ stringListSeparator?: string;
10
+ }
11
+ declare const StringList: FC<StringListShowPropsType$1>;
12
+
13
+ interface StringListShowPropsType extends ShowPropertyProps {
14
+ stringListSeparator?: string;
15
+ }
16
+ declare const StringListShow: FC<StringListShowPropsType>;
9
17
 
10
18
  declare function Editor({ property, record, onChangeAdmin, editorId }: {
11
19
  property: any;
@@ -19,4 +27,4 @@ declare function EditorShow({ property, record }: {
19
27
  record: any;
20
28
  }): React.JSX.Element;
21
29
 
22
- export { CustomSlug, Editor, EditorShow, StringList };
30
+ export { CustomSlug, Editor, EditorShow, StringList, StringListShow };
package/dist/index.js CHANGED
@@ -78,6 +78,7 @@ import { Box as Box2, Input as Input2 } from "@adminjs/design-system";
78
78
  var StyledWrapper = styled2(Box2)`
79
79
  display: flex;
80
80
  flex-direction: column;
81
+ margin-bottom: 45px;
81
82
  `;
82
83
  var StyledCustomInput2 = styled2(Input2)`
83
84
  width: 100%;
@@ -89,6 +90,19 @@ var StyledInputWrapper2 = styled2(Box2)`
89
90
  var StyledListWrapper = styled2(Box2)`
90
91
  margin-bottom: 15px;
91
92
  `;
93
+ var StringListShowLabel = styled2.div`
94
+ font-size: 12px;
95
+ margin-bottom: 8px;
96
+ text-transform: capitalize;
97
+ line-height: 16px;
98
+ color: rgb(137, 138, 154);
99
+ `;
100
+ var StringListShowWrapper = styled2(Box2)`
101
+ margin-bottom: 35px;
102
+ `;
103
+ var ListItem = styled2.li`
104
+ margin-bottom: 5px;
105
+ `;
92
106
 
93
107
  // src/components/StringList/SortableList/SortableList.tsx
94
108
  import React4, { Fragment, useMemo as useMemo2, useState as useState2 } from "react";
@@ -241,8 +255,16 @@ function SortableList({
241
255
  }
242
256
  SortableList.Item = SortableItem;
243
257
 
258
+ // src/constants.ts
259
+ var separator = "|";
260
+
244
261
  // src/components/StringList/StringList.tsx
245
- var StringList = ({ record, onChange, property }) => {
262
+ var StringList = ({
263
+ record,
264
+ onChange,
265
+ property,
266
+ stringListSeparator = separator
267
+ }) => {
246
268
  const stringListValue = record.params?.[property.path] ?? property.props.value ?? "";
247
269
  const initialList = stringListValue ? prepareDataForList(stringListValue) : [];
248
270
  const [inputValue, setInputValue] = useState3("");
@@ -297,10 +319,10 @@ var StringList = ({ record, onChange, property }) => {
297
319
  setList(newData);
298
320
  }
299
321
  function prepareDataForDatabase(list2) {
300
- return list2.map(({ value }) => value).join("|");
322
+ return list2.map(({ value }) => value).join(stringListSeparator);
301
323
  }
302
324
  function prepareDataForList(str) {
303
- return str.split("|").map((item) => createListObject(item));
325
+ return str.split(stringListSeparator).map((item) => createListObject(item));
304
326
  }
305
327
  function createListObject(value) {
306
328
  return {
@@ -311,11 +333,25 @@ var StringList = ({ record, onChange, property }) => {
311
333
  };
312
334
  var StringList_default = StringList;
313
335
 
314
- // src/components/Editor/Editor.jsx
315
- import React6, { memo, useState as useState4, useEffect as useEffect3, useRef } from "react";
336
+ // src/components/StringList/StringListShow.tsx
337
+ import React6 from "react";
316
338
  import { ThemeProvider as ThemeProvider3 } from "styled-components";
317
- import EditorJS from "@editorjs/editorjs";
318
339
  import { theme as theme3 } from "@adminjs/design-system";
340
+ var StringListShow = ({
341
+ property,
342
+ record,
343
+ stringListSeparator = separator
344
+ }) => {
345
+ console.log(stringListSeparator, "stringListSeparator");
346
+ return /* @__PURE__ */ React6.createElement(ThemeProvider3, { theme: theme3 }, /* @__PURE__ */ React6.createElement(StringListShowWrapper, null, /* @__PURE__ */ React6.createElement(StringListShowLabel, null, property.name), record.params.facts && /* @__PURE__ */ React6.createElement("ul", null, record.params.facts.split(stringListSeparator).map((item, index) => /* @__PURE__ */ React6.createElement(ListItem, { key: index }, `- ${item}`)))));
347
+ };
348
+ var StringListShow_default = StringListShow;
349
+
350
+ // src/components/Editor/Editor.jsx
351
+ import React7, { memo as memo2, useState as useState5, useEffect as useEffect4, useRef as useRef2 } from "react";
352
+ import { ThemeProvider as ThemeProvider4 } from "styled-components";
353
+ import EditorJS from "@editorjs/editorjs";
354
+ import { theme as theme4 } from "@adminjs/design-system";
319
355
 
320
356
  // src/components/Editor/styles.ts
321
357
  import { Box as Box3 } from "@adminjs/design-system";
@@ -323,9 +359,11 @@ import { styled as styled5 } from "@adminjs/design-system/styled-components";
323
359
  var Label3 = styled5.div`
324
360
  font-size: 12px;
325
361
  margin-bottom: 8px;
362
+ color: rgb(137, 138, 154);
326
363
  `;
327
364
  var EditorWrapper = styled5(Box3)`
328
365
  padding: 12px;
366
+ margin-bottom: 24px;
329
367
  border: 1px solid rgb(187, 195, 203);
330
368
  `;
331
369
  var StyledEditor = styled5.div`
@@ -398,13 +436,13 @@ var EDITOR_TOOLS = {
398
436
 
399
437
  // src/components/Editor/Editor.jsx
400
438
  var Editor = ({ property, record, onChangeAdmin, editorId }) => {
401
- const [jsonData, setJsonData] = useState4();
439
+ const [jsonData, setJsonData] = useState5();
402
440
  const isSavedData = Boolean(record.params[property.path]);
403
- const ref = useRef();
404
- useEffect3(() => {
441
+ const ref = useRef2();
442
+ useEffect4(() => {
405
443
  onChangeAdmin(property.path, jsonData);
406
444
  }, [jsonData]);
407
- useEffect3(() => {
445
+ useEffect4(() => {
408
446
  if (!ref.current) {
409
447
  const editor = new EditorJS({
410
448
  holder: editorId,
@@ -421,14 +459,14 @@ var Editor = ({ property, record, onChangeAdmin, editorId }) => {
421
459
  ref?.current?.destroy?.();
422
460
  };
423
461
  }, []);
424
- return /* @__PURE__ */ React6.createElement(ThemeProvider3, { theme: theme3 }, /* @__PURE__ */ React6.createElement(Label3, null, "Text"), /* @__PURE__ */ React6.createElement(EditorWrapper, null, /* @__PURE__ */ React6.createElement(StyledEditor, { id: editorId })));
462
+ return /* @__PURE__ */ React7.createElement(ThemeProvider4, { theme: theme4 }, /* @__PURE__ */ React7.createElement(Label3, null, "Text"), /* @__PURE__ */ React7.createElement(EditorWrapper, null, /* @__PURE__ */ React7.createElement(StyledEditor, { id: editorId })));
425
463
  };
426
464
  var Editor_default = Editor;
427
465
 
428
466
  // src/components/Editor/EditorShow.jsx
429
- import React7, { memo as memo2, useState as useState5, useEffect as useEffect4, useRef as useRef2 } from "react";
430
- import { ThemeProvider as ThemeProvider4 } from "styled-components";
431
- import { theme as theme4 } from "@adminjs/design-system";
467
+ import React8, { memo as memo3, useState as useState6, useEffect as useEffect5, useRef as useRef3 } from "react";
468
+ import { ThemeProvider as ThemeProvider5 } from "styled-components";
469
+ import { theme as theme5 } from "@adminjs/design-system";
432
470
 
433
471
  // src/utils/parseHtml.ts
434
472
  import edjsHTML from "editorjs-html";
@@ -445,12 +483,13 @@ var parseHtml = (jsonData) => {
445
483
  // src/components/Editor/EditorShow.jsx
446
484
  var EditorShow = ({ property, record }) => {
447
485
  const htmlContent = parseHtml(record.params[property.path]);
448
- return /* @__PURE__ */ React7.createElement(ThemeProvider4, { theme: theme4 }, /* @__PURE__ */ React7.createElement(Label3, null, "Content"), htmlContent && /* @__PURE__ */ React7.createElement("div", { dangerouslySetInnerHTML: { __html: String(htmlContent) } }));
486
+ return /* @__PURE__ */ React8.createElement(ThemeProvider5, { theme: theme5 }, /* @__PURE__ */ React8.createElement(Label3, null, "Content"), htmlContent && /* @__PURE__ */ React8.createElement("div", { dangerouslySetInnerHTML: { __html: String(htmlContent) } }));
449
487
  };
450
488
  var EditorShow_default = EditorShow;
451
489
  export {
452
490
  CustomSlug_default as CustomSlug,
453
491
  Editor_default as Editor,
454
492
  EditorShow_default as EditorShow,
455
- StringList_default as StringList
493
+ StringList_default as StringList,
494
+ StringListShow_default as StringListShow
456
495
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rulab/adminjs-components",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -4,10 +4,12 @@ import { styled } from "@adminjs/design-system/styled-components";
4
4
  export const Label = styled.div`
5
5
  font-size: 12px;
6
6
  margin-bottom: 8px;
7
+ color: rgb(137, 138, 154);
7
8
  `;
8
9
 
9
10
  export const EditorWrapper = styled(Box)`
10
11
  padding: 12px;
12
+ margin-bottom: 24px;
11
13
  border: 1px solid rgb(187, 195, 203);
12
14
  `;
13
15
 
@@ -18,6 +18,7 @@ import {
18
18
  } from "./styles.js";
19
19
 
20
20
  import { SortableList } from "./SortableList/SortableList.js";
21
+ import { separator } from "./constants.js";
21
22
 
22
23
  type ListDataTypes = {
23
24
  id: string;
@@ -26,7 +27,16 @@ type ListDataTypes = {
26
27
 
27
28
  type StringListTypes = Omit<EditPropertyProps, "where" | "resource">;
28
29
 
29
- const StringList: FC<StringListTypes> = ({ record, onChange, property }) => {
30
+ interface StringListShowPropsType extends StringListTypes {
31
+ stringListSeparator?: string;
32
+ }
33
+
34
+ const StringList: FC<StringListShowPropsType> = ({
35
+ record,
36
+ onChange,
37
+ property,
38
+ stringListSeparator = separator,
39
+ }) => {
30
40
  const stringListValue =
31
41
  record.params?.[property.path] ?? property.props.value ?? "";
32
42
 
@@ -107,11 +117,11 @@ const StringList: FC<StringListTypes> = ({ record, onChange, property }) => {
107
117
  }
108
118
 
109
119
  function prepareDataForDatabase(list: ListDataTypes[]) {
110
- return list.map(({ value }) => value).join("|");
120
+ return list.map(({ value }) => value).join(stringListSeparator);
111
121
  }
112
122
 
113
123
  function prepareDataForList(str: string) {
114
- return str.split("|").map((item) => createListObject(item));
124
+ return str.split(stringListSeparator).map((item) => createListObject(item));
115
125
  }
116
126
 
117
127
  function createListObject(value: string) {
@@ -0,0 +1,37 @@
1
+ import React, { memo, useState, useEffect, useRef, FC } from "react";
2
+ import { ShowPropertyProps } from "adminjs";
3
+
4
+ import { ThemeProvider } from "styled-components";
5
+ import { theme } from "@adminjs/design-system";
6
+
7
+ import { StringListShowLabel, StringListShowWrapper, ListItem } from "./styles";
8
+ import { separator } from "./constants";
9
+
10
+ interface StringListShowPropsType extends ShowPropertyProps {
11
+ stringListSeparator?: string;
12
+ }
13
+
14
+ const StringListShow: FC<StringListShowPropsType> = ({
15
+ property,
16
+ record,
17
+ stringListSeparator = separator,
18
+ }) => {
19
+ return (
20
+ <ThemeProvider theme={theme}>
21
+ <StringListShowWrapper>
22
+ <StringListShowLabel>{property.name}</StringListShowLabel>
23
+ {record.params.facts && (
24
+ <ul>
25
+ {record.params.facts
26
+ .split(stringListSeparator)
27
+ .map((item: string, index: number) => (
28
+ <ListItem key={index}>{`- ${item}`}</ListItem>
29
+ ))}
30
+ </ul>
31
+ )}
32
+ </StringListShowWrapper>
33
+ </ThemeProvider>
34
+ );
35
+ };
36
+
37
+ export default StringListShow;
@@ -0,0 +1 @@
1
+ export const separator = "|";
@@ -1 +1,2 @@
1
- export { default } from "./StringList.js";
1
+ export * from "./StringList.js";
2
+ export * from "./StringListShow.js";
@@ -4,6 +4,7 @@ import { Box, Input } from "@adminjs/design-system";
4
4
  export const StyledWrapper = styled(Box)`
5
5
  display: flex;
6
6
  flex-direction: column;
7
+ margin-bottom: 45px;
7
8
  `;
8
9
 
9
10
  export const StyledCustomInput = styled(Input)`
@@ -18,3 +19,19 @@ export const StyledInputWrapper = styled(Box)`
18
19
  export const StyledListWrapper = styled(Box)`
19
20
  margin-bottom: 15px;
20
21
  `;
22
+
23
+ export const StringListShowLabel = styled.div`
24
+ font-size: 12px;
25
+ margin-bottom: 8px;
26
+ text-transform: capitalize;
27
+ line-height: 16px;
28
+ color: rgb(137, 138, 154);
29
+ `;
30
+
31
+ export const StringListShowWrapper = styled(Box)`
32
+ margin-bottom: 35px;
33
+ `;
34
+
35
+ export const ListItem = styled.li`
36
+ margin-bottom: 5px;
37
+ `;
@@ -1,4 +1,5 @@
1
1
  export { default as CustomSlug } from "./CustomSlug/CustomSlug.js";
2
2
  export { default as StringList } from "./StringList/StringList.js";
3
+ export { default as StringListShow } from "./StringList/StringListShow.js";
3
4
  export { default as Editor } from "./Editor/Editor.jsx";
4
5
  export { default as EditorShow } from "./Editor/EditorShow.jsx";