@bigbinary/neeto-fields-frontend 1.0.8 → 1.1.0
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/README.md +41 -26
- package/dist/index.cjs.js +1168 -1147
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +1172 -1151
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/types.d.ts +26 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-fields-frontend",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "A repo acts as the source of truth for the new nano's structure, configs, data etc.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://github.com/bigbinary/neeto-fields-nano",
|
package/types.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ interface PaneProps {
|
|
|
16
16
|
validations?: KeyValuePair;
|
|
17
17
|
initialValues?: KeyValuePair;
|
|
18
18
|
hideRequiredSwitch?: boolean;
|
|
19
|
+
onMutationSuccess?: (...args: any[]) => void;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
type OnDeleteClickFunction = (field: KeyValuePair) => void;
|
|
@@ -44,23 +45,16 @@ interface FieldsDashboardProps {
|
|
|
44
45
|
}) => KeyValuePair[];
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
interface AddFieldProps {
|
|
48
|
-
resourceType: string;
|
|
49
|
-
allowedKinds?: string[];
|
|
50
|
-
additionalValidations?: KeyValuePair;
|
|
51
|
-
initialValues?: KeyValuePair;
|
|
52
|
-
children?: React.ReactNode;
|
|
53
|
-
hideRequiredSwitch?: boolean;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
48
|
interface EditProps {
|
|
57
49
|
fieldId: string;
|
|
58
50
|
allowedKinds: string[];
|
|
59
|
-
onClose: (
|
|
51
|
+
onClose: () => void;
|
|
60
52
|
children?: React.ReactNode;
|
|
61
53
|
additionalValidations?: KeyValuePair;
|
|
62
54
|
initialValues?: KeyValuePair;
|
|
63
55
|
hideRequiredSwitch?: boolean;
|
|
56
|
+
ownerId?: string;
|
|
57
|
+
onMutationSuccess?: (...args: any[]) => void;
|
|
64
58
|
}
|
|
65
59
|
|
|
66
60
|
interface AddProps {
|
|
@@ -71,17 +65,21 @@ interface AddProps {
|
|
|
71
65
|
additionalValidations?: KeyValuePair;
|
|
72
66
|
initialValues?: KeyValuePair;
|
|
73
67
|
hideRequiredSwitch?: boolean;
|
|
68
|
+
ownerId?: string;
|
|
69
|
+
onMutationSuccess?: (...args: any[]) => void;
|
|
74
70
|
}
|
|
75
71
|
interface FieldsPaneProps {
|
|
76
|
-
allowedKinds: string[];
|
|
77
72
|
isOpen: boolean;
|
|
78
73
|
resourceType: string;
|
|
79
74
|
onClose: () => void;
|
|
75
|
+
allowedKinds?: string[];
|
|
80
76
|
additionalValidations?: KeyValuePair;
|
|
81
77
|
initialValues?: KeyValuePair;
|
|
82
78
|
selectedField?: KeyValuePair;
|
|
83
79
|
children?: React.ReactNode;
|
|
84
80
|
hideRequiredSwitch?: boolean;
|
|
81
|
+
ownerId?: string;
|
|
82
|
+
onMutationSuccess?: (...args: any[]) => void;
|
|
85
83
|
}
|
|
86
84
|
interface FieldFormProps {
|
|
87
85
|
chosenKind: string[];
|
|
@@ -97,27 +95,32 @@ interface FieldValuesContainerProps {
|
|
|
97
95
|
resourceId: string;
|
|
98
96
|
fields?: KeyValuePair[];
|
|
99
97
|
ownerId?: string;
|
|
100
|
-
queryKeysToBeInvalidatedOnSuccess?: string[];
|
|
101
98
|
customComponents?: KeyValuePair;
|
|
102
99
|
className?: string;
|
|
103
100
|
showBorder?: boolean;
|
|
104
|
-
formRefs?: React.RefObject<any
|
|
101
|
+
formRefs?: React.RefObject<any>;
|
|
105
102
|
disabled?: boolean;
|
|
106
103
|
isRequiredColumnName?: string;
|
|
107
|
-
fieldContainerClassName?: string
|
|
108
|
-
fieldClassName?: string
|
|
109
|
-
labelClassName?: string
|
|
104
|
+
fieldContainerClassName?: string;
|
|
105
|
+
fieldClassName?: string;
|
|
106
|
+
labelClassName?: string;
|
|
107
|
+
onMutationSuccess?: (...args: any[]) => void;
|
|
110
108
|
}
|
|
111
109
|
|
|
112
110
|
interface FieldInputsProps {
|
|
113
111
|
fields: KeyValuePair[];
|
|
114
112
|
customComponents?: KeyValuePair;
|
|
115
|
-
formRef?: React.RefObject<any
|
|
113
|
+
formRef?: React.RefObject<any>;
|
|
116
114
|
disabled?: boolean;
|
|
117
115
|
isRequiredColumnName?: string;
|
|
118
116
|
}
|
|
119
117
|
|
|
120
|
-
type FieldsParams = {
|
|
118
|
+
type FieldsParams = {
|
|
119
|
+
resourceType?: string;
|
|
120
|
+
ownerId?: string;
|
|
121
|
+
state?: string;
|
|
122
|
+
prefixQueryKeys?: string[];
|
|
123
|
+
};
|
|
121
124
|
|
|
122
125
|
type Field = {
|
|
123
126
|
fields: KeyValuePair[];
|
|
@@ -129,7 +132,7 @@ type Field = {
|
|
|
129
132
|
type UseFetchFieldsResult = UseQueryResult<Field>;
|
|
130
133
|
|
|
131
134
|
export const FieldsDashboard: React.FC<FieldsDashboardProps>;
|
|
132
|
-
export const
|
|
135
|
+
export const FieldsPane: React.FC<FieldsPaneProps>;
|
|
133
136
|
export const FieldValuesContainer: React.FC<FieldValuesContainerProps>;
|
|
134
137
|
export const FieldInputs: React.FC<FieldInputsProps>;
|
|
135
138
|
|
|
@@ -139,7 +142,10 @@ export const useFetchFields: (
|
|
|
139
142
|
) => UseFetchFieldsResult;
|
|
140
143
|
|
|
141
144
|
export const useShowField: (
|
|
142
|
-
|
|
145
|
+
params: {
|
|
146
|
+
fieldId: string;
|
|
147
|
+
ownerId?: string;
|
|
148
|
+
},
|
|
143
149
|
options?: UseQueryOptions
|
|
144
150
|
) => UseFetchFieldsResult;
|
|
145
151
|
|