@bigbinary/neeto-fields-frontend 1.0.8 → 1.1.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/README.md +45 -26
- package/dist/index.cjs.js +1652 -1209
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +1662 -1219
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/types.d.ts +28 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-fields-frontend",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
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;
|
|
@@ -29,6 +30,8 @@ interface FieldsDashboardProps {
|
|
|
29
30
|
allowedKinds?: string[];
|
|
30
31
|
paneProps?: PaneProps;
|
|
31
32
|
showStateFilter?: boolean;
|
|
33
|
+
helpDocUrl?: string;
|
|
34
|
+
nameAliases?: KeyValuePair;
|
|
32
35
|
fieldStatesTaxonomy?: {
|
|
33
36
|
active: string;
|
|
34
37
|
inactive: string;
|
|
@@ -44,23 +47,16 @@ interface FieldsDashboardProps {
|
|
|
44
47
|
}) => KeyValuePair[];
|
|
45
48
|
}
|
|
46
49
|
|
|
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
50
|
interface EditProps {
|
|
57
51
|
fieldId: string;
|
|
58
52
|
allowedKinds: string[];
|
|
59
|
-
onClose: (
|
|
53
|
+
onClose: () => void;
|
|
60
54
|
children?: React.ReactNode;
|
|
61
55
|
additionalValidations?: KeyValuePair;
|
|
62
56
|
initialValues?: KeyValuePair;
|
|
63
57
|
hideRequiredSwitch?: boolean;
|
|
58
|
+
ownerId?: string;
|
|
59
|
+
onMutationSuccess?: (...args: any[]) => void;
|
|
64
60
|
}
|
|
65
61
|
|
|
66
62
|
interface AddProps {
|
|
@@ -71,17 +67,21 @@ interface AddProps {
|
|
|
71
67
|
additionalValidations?: KeyValuePair;
|
|
72
68
|
initialValues?: KeyValuePair;
|
|
73
69
|
hideRequiredSwitch?: boolean;
|
|
70
|
+
ownerId?: string;
|
|
71
|
+
onMutationSuccess?: (...args: any[]) => void;
|
|
74
72
|
}
|
|
75
73
|
interface FieldsPaneProps {
|
|
76
|
-
allowedKinds: string[];
|
|
77
74
|
isOpen: boolean;
|
|
78
75
|
resourceType: string;
|
|
79
76
|
onClose: () => void;
|
|
77
|
+
allowedKinds?: string[];
|
|
80
78
|
additionalValidations?: KeyValuePair;
|
|
81
79
|
initialValues?: KeyValuePair;
|
|
82
80
|
selectedField?: KeyValuePair;
|
|
83
81
|
children?: React.ReactNode;
|
|
84
82
|
hideRequiredSwitch?: boolean;
|
|
83
|
+
ownerId?: string;
|
|
84
|
+
onMutationSuccess?: (...args: any[]) => void;
|
|
85
85
|
}
|
|
86
86
|
interface FieldFormProps {
|
|
87
87
|
chosenKind: string[];
|
|
@@ -97,27 +97,32 @@ interface FieldValuesContainerProps {
|
|
|
97
97
|
resourceId: string;
|
|
98
98
|
fields?: KeyValuePair[];
|
|
99
99
|
ownerId?: string;
|
|
100
|
-
queryKeysToBeInvalidatedOnSuccess?: string[];
|
|
101
100
|
customComponents?: KeyValuePair;
|
|
102
101
|
className?: string;
|
|
103
102
|
showBorder?: boolean;
|
|
104
|
-
formRefs?: React.RefObject<any
|
|
103
|
+
formRefs?: React.RefObject<any>;
|
|
105
104
|
disabled?: boolean;
|
|
106
105
|
isRequiredColumnName?: string;
|
|
107
|
-
fieldContainerClassName?: string
|
|
108
|
-
fieldClassName?: string
|
|
109
|
-
labelClassName?: string
|
|
106
|
+
fieldContainerClassName?: string;
|
|
107
|
+
fieldClassName?: string;
|
|
108
|
+
labelClassName?: string;
|
|
109
|
+
onMutationSuccess?: (...args: any[]) => void;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
interface FieldInputsProps {
|
|
113
113
|
fields: KeyValuePair[];
|
|
114
114
|
customComponents?: KeyValuePair;
|
|
115
|
-
formRef?: React.RefObject<any
|
|
115
|
+
formRef?: React.RefObject<any>;
|
|
116
116
|
disabled?: boolean;
|
|
117
117
|
isRequiredColumnName?: string;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
type FieldsParams = {
|
|
120
|
+
type FieldsParams = {
|
|
121
|
+
resourceType?: string;
|
|
122
|
+
ownerId?: string;
|
|
123
|
+
state?: string;
|
|
124
|
+
prefixQueryKeys?: string[];
|
|
125
|
+
};
|
|
121
126
|
|
|
122
127
|
type Field = {
|
|
123
128
|
fields: KeyValuePair[];
|
|
@@ -129,7 +134,7 @@ type Field = {
|
|
|
129
134
|
type UseFetchFieldsResult = UseQueryResult<Field>;
|
|
130
135
|
|
|
131
136
|
export const FieldsDashboard: React.FC<FieldsDashboardProps>;
|
|
132
|
-
export const
|
|
137
|
+
export const FieldsPane: React.FC<FieldsPaneProps>;
|
|
133
138
|
export const FieldValuesContainer: React.FC<FieldValuesContainerProps>;
|
|
134
139
|
export const FieldInputs: React.FC<FieldInputsProps>;
|
|
135
140
|
|
|
@@ -139,7 +144,10 @@ export const useFetchFields: (
|
|
|
139
144
|
) => UseFetchFieldsResult;
|
|
140
145
|
|
|
141
146
|
export const useShowField: (
|
|
142
|
-
|
|
147
|
+
params: {
|
|
148
|
+
fieldId: string;
|
|
149
|
+
ownerId?: string;
|
|
150
|
+
},
|
|
143
151
|
options?: UseQueryOptions
|
|
144
152
|
) => UseFetchFieldsResult;
|
|
145
153
|
|