@measured/puck 0.14.0-canary.55740c4 → 0.14.0-canary.712fb8e
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/{Config-1444273f.d.ts → Config-487c2755.d.ts} +8 -1
- package/dist/index.css +791 -539
- package/dist/index.d.ts +34 -5
- package/dist/index.js +204 -122
- package/dist/rsc.d.ts +1 -1
- package/package.json +1 -1
@@ -55,6 +55,8 @@ type ArrayField<Props extends {
|
|
55
55
|
};
|
56
56
|
defaultItemProps?: Props[0];
|
57
57
|
getItemSummary?: (item: Props[0], index?: number) => string;
|
58
|
+
max?: number;
|
59
|
+
min?: number;
|
58
60
|
};
|
59
61
|
type ObjectField<Props extends {
|
60
62
|
[key: string]: any;
|
@@ -63,7 +65,7 @@ type ObjectField<Props extends {
|
|
63
65
|
}> = BaseField & {
|
64
66
|
type: "object";
|
65
67
|
objectFields: {
|
66
|
-
[SubPropName in keyof Props
|
68
|
+
[SubPropName in keyof Props]: Field<Props[SubPropName]>;
|
67
69
|
};
|
68
70
|
};
|
69
71
|
type Adaptor<AdaptorParams = {}, TableShape extends Record<string, any> = {}, PropShape = TableShape> = {
|
@@ -91,11 +93,15 @@ type ExternalField<Props extends {
|
|
91
93
|
placeholder?: string;
|
92
94
|
fetchList: (params: {
|
93
95
|
query: string;
|
96
|
+
filters: Record<string, any>;
|
94
97
|
}) => Promise<any[] | null>;
|
95
98
|
mapProp?: (value: any) => Props;
|
99
|
+
mapRow?: (value: any) => Record<string, string | number>;
|
96
100
|
getItemSummary: (item: Props, index?: number) => string;
|
97
101
|
showSearch?: boolean;
|
98
102
|
initialQuery?: string;
|
103
|
+
filterFields?: Record<string, Field>;
|
104
|
+
initialFilters?: Record<string, any>;
|
99
105
|
};
|
100
106
|
type CustomField<Props extends {
|
101
107
|
[key: string]: any;
|
@@ -140,6 +146,7 @@ type PuckContext = {
|
|
140
146
|
};
|
141
147
|
type ComponentConfig<ComponentProps extends DefaultComponentProps = DefaultComponentProps, DefaultProps = ComponentProps, DataShape = ComponentData<ComponentProps>> = {
|
142
148
|
render: PuckComponent<ComponentProps>;
|
149
|
+
label?: string;
|
143
150
|
defaultProps?: DefaultProps;
|
144
151
|
fields?: Fields<ComponentProps>;
|
145
152
|
resolveData?: (data: DataShape, params: {
|