@acvl/frontend-components 0.0.58 → 0.0.60

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.
@@ -1,6 +1,7 @@
1
1
  export interface JSONParserProps {
2
2
  [key: string]: {
3
3
  ignore?: boolean;
4
+ keep?: boolean;
4
5
  format?: string;
5
6
  extra_validation?: (value: any) => boolean;
6
7
  alter_key?: (key: string) => string;
@@ -13,6 +13,7 @@ export interface DetailPageV2Props {
13
13
  mutation: any;
14
14
  args?: any;
15
15
  disable?: boolean;
16
+ successMessage?: string | ((response: any) => string);
16
17
  postAction?: {
17
18
  after: "create" | "edit" | "both";
18
19
  type: string;
@@ -8,7 +8,7 @@ interface MutationHandlerOptions {
8
8
  onSuccess: () => void;
9
9
  onValidationError?: () => void;
10
10
  successTitle?: string;
11
- successMessage?: string;
11
+ successMessage?: string | ((response: any) => string);
12
12
  onInvalidParams?: (error: any) => boolean;
13
13
  }
14
14
  declare const useMutationHandler: ({ mutationFn, form, onSuccess, onValidationError, successMessage, onInvalidParams, }: MutationHandlerOptions) => {
package/dist/index.d.ts CHANGED
@@ -177,6 +177,7 @@ interface MyDataGridProps extends DataGridProps {
177
177
  interface JSONParserProps {
178
178
  [key: string]: {
179
179
  ignore?: boolean;
180
+ keep?: boolean;
180
181
  format?: string;
181
182
  extra_validation?: (value: any) => boolean;
182
183
  alter_key?: (key: string) => string;
@@ -1185,6 +1186,7 @@ interface DetailPageV2Props {
1185
1186
  mutation: any;
1186
1187
  args?: any;
1187
1188
  disable?: boolean;
1189
+ successMessage?: string | ((response: any) => string);
1188
1190
  postAction?: {
1189
1191
  after: "create" | "edit" | "both";
1190
1192
  type: string;
@@ -1349,7 +1351,7 @@ interface MutationHandlerOptions {
1349
1351
  onSuccess: () => void;
1350
1352
  onValidationError?: () => void;
1351
1353
  successTitle?: string;
1352
- successMessage?: string;
1354
+ successMessage?: string | ((response: any) => string);
1353
1355
  onInvalidParams?: (error: any) => boolean;
1354
1356
  }
1355
1357
  declare const useMutationHandler: ({ mutationFn, form, onSuccess, onValidationError, successMessage, onInvalidParams, }: MutationHandlerOptions) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acvl/frontend-components",
3
- "version": "0.0.58",
3
+ "version": "0.0.60",
4
4
  "description": "Component library for ACV frontend projects.",
5
5
  "homepage": "https://github.com/ACV-Logistics/acv-frontend-components#readme",
6
6
  "access": "public",