@mcurros2/microm 1.1.371-0 → 1.1.372-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/dist/index.d.ts +16 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +279 -64
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -352,6 +352,14 @@ export type GetColumnInputPropsReturnType = {
|
|
|
352
352
|
onFocus?: any;
|
|
353
353
|
onBlur?: any;
|
|
354
354
|
};
|
|
355
|
+
export type SilentSaveResult = 'saved' | 'unchanged' | 'invalid' | 'failed';
|
|
356
|
+
export interface NavigationConfirmationState {
|
|
357
|
+
opened: boolean;
|
|
358
|
+
saving: boolean;
|
|
359
|
+
save: () => Promise<void>;
|
|
360
|
+
discard: () => void;
|
|
361
|
+
stay: () => void;
|
|
362
|
+
}
|
|
355
363
|
export interface UseEntityFormReturnType {
|
|
356
364
|
form: UseFormReturnType<ValuesObject>;
|
|
357
365
|
status: OperationStatus<DBStatusResult | ValuesObject>;
|
|
@@ -371,7 +379,8 @@ export interface UseEntityFormReturnType {
|
|
|
371
379
|
clearAllAsyncErrors: () => void;
|
|
372
380
|
isFormValid: () => boolean;
|
|
373
381
|
isFormFieldValid: (column_name: string) => boolean;
|
|
374
|
-
silentSave: (requestOptions?: MicroMRequestOptions) => Promise<
|
|
382
|
+
silentSave: (requestOptions?: MicroMRequestOptions) => Promise<SilentSaveResult>;
|
|
383
|
+
navigationConfirmation: NavigationConfirmationState;
|
|
375
384
|
}
|
|
376
385
|
export const UseEntityFormDefaultProps: Partial<UseEntityFormOptions>;
|
|
377
386
|
export function useEntityForm(props: UseEntityFormOptions): UseEntityFormReturnType;
|
|
@@ -396,6 +405,12 @@ export interface EntityFormProps extends PropsWithChildren {
|
|
|
396
405
|
okButtonVariant?: Variants<'filled' | 'outline' | 'light' | 'white' | 'default' | 'subtle' | 'gradient'>;
|
|
397
406
|
saveBeforeLocalNavigation?: boolean;
|
|
398
407
|
saveBeforeRemoteNavigation?: boolean;
|
|
408
|
+
confirmBeforeNavigation?: boolean;
|
|
409
|
+
navigationConfirmationTitle?: ReactNode;
|
|
410
|
+
navigationConfirmationMessage?: ReactNode;
|
|
411
|
+
navigationSaveLabel?: ReactNode;
|
|
412
|
+
navigationDiscardLabel?: ReactNode;
|
|
413
|
+
navigationStayLabel?: ReactNode;
|
|
399
414
|
disableOKIfNotDirty?: boolean;
|
|
400
415
|
formHeight?: string | number;
|
|
401
416
|
}
|