admin_lsac 1.1.2 → 1.1.3

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/App.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import * as React from "react";
2
2
 
3
-
4
3
  declare module "admin_lsac" {
5
4
  export interface TableField {
6
5
  name: string;
@@ -68,7 +67,7 @@ declare module "admin_lsac" {
68
67
  pages: PageSchema[];
69
68
  }
70
69
 
71
- export function AdminPanel(props: AdminPanelProps): React.ReactElement;
70
+ export default function AdminPanel({ pages }: AdminPanelProps): React.ReactElement;
72
71
 
73
72
  interface PageProps {
74
73
  pages: PageSchema[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "admin_lsac",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Generic Admin Panel created for storing events' data",
5
5
  "private": false,
6
6
  "dependencies": {
package/src/App.tsx CHANGED
@@ -4,24 +4,24 @@ import { Page } from "./components/Page";
4
4
  import { pageToUrl } from "./schema/schema";
5
5
  import * as React from "react";
6
6
 
7
- export interface TableField {
7
+ interface TableField {
8
8
  name: string;
9
9
  access: (obj: any) => string | number | React.ReactElement;
10
10
  }
11
11
 
12
- export interface SimpleField {
12
+ interface SimpleField {
13
13
  name: string;
14
14
  label: string;
15
15
  type: "string" | "number" | "file";
16
16
  validationSchema: any;
17
17
  }
18
18
 
19
- export interface Option {
19
+ interface Option {
20
20
  value: string | number | boolean;
21
21
  display: string;
22
22
  }
23
23
 
24
- export interface DropdownField {
24
+ interface DropdownField {
25
25
  name: string;
26
26
  label: string;
27
27
  type: "dropdown";
@@ -29,36 +29,36 @@ export interface DropdownField {
29
29
  getOptions: () => Promise<Option[]>;
30
30
  }
31
31
 
32
- export interface ObjectField {
32
+ interface ObjectField {
33
33
  name: string;
34
34
  label: string;
35
35
  type: "object";
36
36
  fields: FormField[];
37
37
  }
38
38
 
39
- export interface ArrayField {
39
+ interface ArrayField {
40
40
  name: string;
41
41
  label: string;
42
42
  type: "array";
43
43
  element: Exclude<FormField, ArrayField>;
44
44
  }
45
45
 
46
- export type FormField = SimpleField | DropdownField | ObjectField | ArrayField;
46
+ type FormField = SimpleField | DropdownField | ObjectField | ArrayField;
47
47
 
48
- export interface Action {
48
+ interface Action {
49
49
  name: string;
50
50
  fields?: FormField[];
51
51
  onSubmit: (obj1: any, obj2?: any) => Promise<any>;
52
52
  }
53
53
 
54
- export interface RowAction {
54
+ interface RowAction {
55
55
  name: string;
56
56
  fields?: FormField[];
57
57
  initialise?: (obj: any) => any;
58
58
  onSubmit: (obj1: any, obj2?: any) => Promise<any>;
59
59
  }
60
60
 
61
- export interface PageSchema {
61
+ interface PageSchema {
62
62
  name: string;
63
63
  actions: Action[];
64
64
  rowActions: RowAction[];
package/tsconfig.json CHANGED
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "include": [
26
26
  "src"
27
- , "dist/App.d.ts" ],
27
+ ],
28
28
  "exclude": [
29
29
  "node_modules"
30
30
  ]