@mcurros2/microm 1.1.438-0 → 1.1.440-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 +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +291 -260
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -339,7 +339,6 @@ export type ValidatorConfigurationParms = {
|
|
|
339
339
|
data?: any;
|
|
340
340
|
};
|
|
341
341
|
export type ValidatorConfiguration = Partial<Record<keyof typeof CommonValidators, ValidatorConfigurationParms>>;
|
|
342
|
-
/** `disabled` bypasses protection. `allways` skips dirty checks only in edit; view is unprotected. */
|
|
343
342
|
export type NavigationProtectionMode = 'save' | 'confirm' | 'allways' | 'disabled';
|
|
344
343
|
export const ModalsManagerDefaultProps: {
|
|
345
344
|
closeLabel: string;
|
|
@@ -490,9 +489,16 @@ export interface UseEntityFormReturnType {
|
|
|
490
489
|
isFormFieldValid: (column_name: string) => boolean;
|
|
491
490
|
activeFormActions: EntityFormActions;
|
|
492
491
|
silentSave: (requestOptions?: MicroMRequestOptions) => Promise<SilentSaveResult>;
|
|
492
|
+
navigationGuard: UseConfirmNavigationOptions;
|
|
493
493
|
}
|
|
494
494
|
export const UseEntityFormDefaultProps: Partial<UseEntityFormOptions>;
|
|
495
495
|
export function useEntityForm(props: UseEntityFormOptions): UseEntityFormReturnType;
|
|
496
|
+
export interface EntityFormNavigationPresentation {
|
|
497
|
+
showOK?: boolean;
|
|
498
|
+
showCancel?: boolean;
|
|
499
|
+
buttons?: ReactNode;
|
|
500
|
+
}
|
|
501
|
+
export function useEntityFormNavigationProtection(formAPI: UseEntityFormReturnType, { showCancel, showOK, buttons }: EntityFormNavigationPresentation): void;
|
|
496
502
|
export interface EntityFormProps extends PropsWithChildren {
|
|
497
503
|
showOK?: boolean;
|
|
498
504
|
showCancel?: boolean;
|