@rulab/adminjs-components 0.0.13 → 0.1.0-alpha.2

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.
Files changed (71) hide show
  1. package/LICENSE +21 -21
  2. package/dist/index.cjs +10 -762
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +10 -21
  5. package/dist/index.d.ts +10 -21
  6. package/dist/index.js +3 -754
  7. package/dist/index.js.map +1 -0
  8. package/package.json +12 -8
  9. package/src/components/ColorStatus/ColorStatusEdit.tsx +94 -94
  10. package/src/components/ColorStatus/ColorStatusList.tsx +20 -20
  11. package/src/components/ColorStatus/ColorStatusShow.tsx +23 -23
  12. package/src/components/ColorStatus/index.ts +3 -3
  13. package/src/components/ColorStatus/styles.ts +30 -30
  14. package/src/components/ColorStatus/types.ts +5 -5
  15. package/src/components/Editor/Editor.jsx +49 -49
  16. package/src/components/Editor/EditorList.jsx +22 -22
  17. package/src/components/Editor/EditorShow.jsx +24 -24
  18. package/src/components/Editor/config.ts +35 -35
  19. package/src/components/Editor/index.ts +3 -3
  20. package/src/components/Editor/styles.ts +151 -151
  21. package/src/components/{CustomSlug/CustomSlug.tsx → Slug/SlugEdit.tsx} +68 -68
  22. package/src/components/Slug/SlugFeature.ts +30 -0
  23. package/src/components/Slug/index.ts +1 -0
  24. package/src/components/{CustomSlug → Slug}/styles.ts +24 -24
  25. package/src/components/StringList/SortableList/SortableList.tsx +98 -98
  26. package/src/components/StringList/SortableList/components/SortableItem/DragHandle.tsx +20 -20
  27. package/src/components/StringList/SortableList/components/SortableItem/SortableItem.tsx +59 -59
  28. package/src/components/StringList/SortableList/components/SortableItem/styles.ts +22 -22
  29. package/src/components/StringList/SortableList/components/SortableItem/types.ts +7 -7
  30. package/src/components/StringList/SortableList/components/index.ts +2 -2
  31. package/src/components/StringList/SortableList/index.ts +1 -1
  32. package/src/components/StringList/SortableList/styles.ts +9 -9
  33. package/src/components/StringList/StringList.tsx +136 -136
  34. package/src/components/StringList/StringListShow.tsx +37 -37
  35. package/src/components/StringList/constants.ts +1 -1
  36. package/src/components/StringList/index.ts +2 -2
  37. package/src/components/StringList/styles.ts +41 -41
  38. package/src/components/index.ts +10 -9
  39. package/dist/bundle.js +0 -8
  40. package/dist/components/CustomSlug/CustomSlug.jsx +0 -29
  41. package/dist/components/CustomSlug/index.js +0 -1
  42. package/dist/components/CustomSlug/styles.js +0 -15
  43. package/dist/components/Editor/config.js +0 -11
  44. package/dist/components/Editor/index.js +0 -1
  45. package/dist/components/Editor/styles.js +0 -64
  46. package/dist/components/StringList/SortableList/SortableList.jsx +0 -43
  47. package/dist/components/StringList/SortableList/components/SortableItem/DragHandle.jsx +0 -10
  48. package/dist/components/StringList/SortableList/components/SortableItem/SortableItem.jsx +0 -32
  49. package/dist/components/StringList/SortableList/components/SortableItem/styles.js +0 -20
  50. package/dist/components/StringList/SortableList/components/SortableItem/types.js +0 -1
  51. package/dist/components/StringList/SortableList/components/index.js +0 -2
  52. package/dist/components/StringList/SortableList/index.js +0 -1
  53. package/dist/components/StringList/SortableList/styles.js +0 -8
  54. package/dist/components/StringList/StringList.jsx +0 -67
  55. package/dist/components/StringList/index.js +0 -1
  56. package/dist/components/StringList/styles.js +0 -16
  57. package/dist/components/index.js +0 -3
  58. package/dist/editorFeature.js +0 -16
  59. package/dist/index.d.mts +0 -8
  60. package/dist/index.mjs +0 -37
  61. package/dist/utils/index.js +0 -1
  62. package/dist/utils/slugifyImport.js +0 -3
  63. package/dist/utils/slugifyTitle.js +0 -10
  64. package/src/components/CustomSlug/index.ts +0 -1
  65. package/src/index.ts +0 -2
  66. package/src/types.d.ts +0 -3
  67. package/src/utils/index.ts +0 -3
  68. package/src/utils/parseHtml.ts +0 -56
  69. package/src/utils/slugifyImport.ts +0 -4
  70. package/src/utils/slugifyTitle.ts +0 -11
  71. package/tsconfig.json +0 -17
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./components/index.js\";\r\nexport { parseHtml } from \"./utils/parseHtml.js\";\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAc,kCAAd;AACA,uBAA0B;","names":[]}
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import React, { FC } from 'react';
2
- import { EditPropertyProps, ShowPropertyProps } from 'adminjs';
1
+ import { FC } from 'react';
2
+ import { EditPropertyProps, ShowPropertyProps, ComponentLoader, FeatureType } from 'adminjs';
3
3
 
4
4
  type ColorStatusTypes = Omit<EditPropertyProps, "where" | "resource">;
5
5
  declare const ColorStatus: FC<ColorStatusTypes>;
@@ -9,24 +9,7 @@ declare const ColorStatusShow: FC<ShowPropertyProps>;
9
9
  declare const ColorStatusList: FC<ShowPropertyProps>;
10
10
 
11
11
  type CustomSlugTypes = Omit<EditPropertyProps, "where">;
12
- declare const CustomSlug: FC<CustomSlugTypes>;
13
-
14
- declare function Editor({ property, record, onChangeAdmin, editorId }: {
15
- property: any;
16
- record: any;
17
- onChangeAdmin: any;
18
- editorId: any;
19
- }): React.JSX.Element;
20
-
21
- declare function EditorList({ property, record }: {
22
- property: any;
23
- record: any;
24
- }): React.JSX.Element;
25
-
26
- declare function EditorShow({ property, record }: {
27
- property: any;
28
- record: any;
29
- }): React.JSX.Element;
12
+ declare const SlugEdit: FC<CustomSlugTypes>;
30
13
 
31
14
  type StringListTypes = Omit<EditPropertyProps, "where" | "resource">;
32
15
  interface StringListShowPropsType$1 extends StringListTypes {
@@ -39,6 +22,12 @@ interface StringListShowPropsType extends ShowPropertyProps {
39
22
  }
40
23
  declare const StringListShow: FC<StringListShowPropsType>;
41
24
 
25
+ type SlugOptions = {
26
+ componentLoader: ComponentLoader;
27
+ key: string;
28
+ };
29
+ declare const SlugFeature: (config: SlugOptions) => FeatureType;
30
+
42
31
  declare const parseHtml: (jsonData: string) => string | undefined;
43
32
 
44
- export { ColorStatus as ColorStatusEdit, ColorStatusList, ColorStatusShow, CustomSlug, Editor, EditorList, EditorShow, StringList, StringListShow, parseHtml };
33
+ export { ColorStatus as ColorStatusEdit, ColorStatusList, ColorStatusShow, SlugEdit, SlugFeature, StringList, StringListShow, parseHtml };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import React, { FC } from 'react';
2
- import { EditPropertyProps, ShowPropertyProps } from 'adminjs';
1
+ import { FC } from 'react';
2
+ import { EditPropertyProps, ShowPropertyProps, ComponentLoader, FeatureType } from 'adminjs';
3
3
 
4
4
  type ColorStatusTypes = Omit<EditPropertyProps, "where" | "resource">;
5
5
  declare const ColorStatus: FC<ColorStatusTypes>;
@@ -9,24 +9,7 @@ declare const ColorStatusShow: FC<ShowPropertyProps>;
9
9
  declare const ColorStatusList: FC<ShowPropertyProps>;
10
10
 
11
11
  type CustomSlugTypes = Omit<EditPropertyProps, "where">;
12
- declare const CustomSlug: FC<CustomSlugTypes>;
13
-
14
- declare function Editor({ property, record, onChangeAdmin, editorId }: {
15
- property: any;
16
- record: any;
17
- onChangeAdmin: any;
18
- editorId: any;
19
- }): React.JSX.Element;
20
-
21
- declare function EditorList({ property, record }: {
22
- property: any;
23
- record: any;
24
- }): React.JSX.Element;
25
-
26
- declare function EditorShow({ property, record }: {
27
- property: any;
28
- record: any;
29
- }): React.JSX.Element;
12
+ declare const SlugEdit: FC<CustomSlugTypes>;
30
13
 
31
14
  type StringListTypes = Omit<EditPropertyProps, "where" | "resource">;
32
15
  interface StringListShowPropsType$1 extends StringListTypes {
@@ -39,6 +22,12 @@ interface StringListShowPropsType extends ShowPropertyProps {
39
22
  }
40
23
  declare const StringListShow: FC<StringListShowPropsType>;
41
24
 
25
+ type SlugOptions = {
26
+ componentLoader: ComponentLoader;
27
+ key: string;
28
+ };
29
+ declare const SlugFeature: (config: SlugOptions) => FeatureType;
30
+
42
31
  declare const parseHtml: (jsonData: string) => string | undefined;
43
32
 
44
- export { ColorStatus as ColorStatusEdit, ColorStatusList, ColorStatusShow, CustomSlug, Editor, EditorList, EditorShow, StringList, StringListShow, parseHtml };
33
+ export { ColorStatus as ColorStatusEdit, ColorStatusList, ColorStatusShow, SlugEdit, SlugFeature, StringList, StringListShow, parseHtml };