@panneau/core 4.0.37 → 4.0.40-alpha.1

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/hooks.d.ts CHANGED
@@ -34,12 +34,37 @@ interface Field$1 {
34
34
  component?: string;
35
35
  label?: ReactNode;
36
36
  }
37
+ /**
38
+ * Table column definition
39
+ */
40
+ type TableColumn = string | {
41
+ id?: string;
42
+ component?: string;
43
+ path?: string;
44
+ field?: string;
45
+ columnClassName?: string;
46
+ };
37
47
 
38
48
  /**
39
49
  * Resource Types
40
50
  * TypeScript interfaces for resources, items, users, media, and other entities
41
51
  */
42
52
 
53
+ interface Action {
54
+ id?: string;
55
+ component?: string;
56
+ label?: string | null;
57
+ icon?: string | null;
58
+ href?: string | null;
59
+ external?: boolean;
60
+ theme?: string;
61
+ target?: string;
62
+ onClick?: (() => void) | null;
63
+ endpoint?: string | null;
64
+ withConfirmation?: boolean;
65
+ [key: string]: unknown;
66
+ }
67
+ type ActionDefinition = string | Action;
43
68
  interface ResourceIntlValues {
44
69
  a_singular?: string;
45
70
  a_plural?: string;
@@ -55,15 +80,31 @@ interface ResourceIntl {
55
80
  /**
56
81
  * Resource definition
57
82
  */
83
+ interface ResourceIndex {
84
+ filters?: Filter[];
85
+ columns?: TableColumn[];
86
+ actions?: ActionDefinition[];
87
+ fields?: Field$1[];
88
+ [key: string]: unknown;
89
+ }
58
90
  interface Resource {
59
91
  id: string;
60
92
  name: string;
61
93
  intl?: ResourceIntl;
62
94
  fields?: Field$1[];
95
+ index?: ResourceIndex;
63
96
  forms?: Record<string, unknown>;
64
97
  shows_in_navbar?: boolean;
65
98
  settings?: Record<string, unknown>;
66
99
  }
100
+ /**
101
+ * Filter definition
102
+ */
103
+ interface Filter {
104
+ id?: string;
105
+ component?: string;
106
+ [key: string]: unknown;
107
+ }
67
108
 
68
109
  type FieldInput = string | Field$1;
69
110
  interface FieldErrors {