@knovator/pagecreator-admin 0.0.6 → 0.0.7
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/index.js
CHANGED
|
@@ -7058,9 +7058,11 @@ const WiddgetFormWrapper = ({
|
|
|
7058
7058
|
|
|
7059
7059
|
const Widget = ({
|
|
7060
7060
|
t,
|
|
7061
|
+
routes,
|
|
7061
7062
|
loader,
|
|
7062
7063
|
explicitForm: _explicitForm = false,
|
|
7063
7064
|
permissions: _permissions = DEFAULT_PERMISSIONS,
|
|
7065
|
+
preConfirmDelete,
|
|
7064
7066
|
formatListItem,
|
|
7065
7067
|
formatOptionLabel,
|
|
7066
7068
|
children
|
|
@@ -7097,7 +7099,9 @@ const Widget = ({
|
|
|
7097
7099
|
tilesLoading,
|
|
7098
7100
|
onTileFormSubmit
|
|
7099
7101
|
} = useWidget({
|
|
7100
|
-
|
|
7102
|
+
routes,
|
|
7103
|
+
defaultLimit: 10,
|
|
7104
|
+
preConfirmDelete
|
|
7101
7105
|
});
|
|
7102
7106
|
return jsxs(WidgetContextProvider, Object.assign({
|
|
7103
7107
|
loading: loading,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { WidgetProps } from '../../../types';
|
|
3
3
|
declare const Widget: {
|
|
4
|
-
({ t, loader, explicitForm, permissions, formatListItem, formatOptionLabel, children, }: WidgetProps): JSX.Element;
|
|
4
|
+
({ t, routes, loader, explicitForm, permissions, preConfirmDelete, formatListItem, formatOptionLabel, children, }: WidgetProps): JSX.Element;
|
|
5
5
|
Table: () => JSX.Element | null;
|
|
6
6
|
Form: ({ formState, formRef }: import("../../../types").FormProps) => JSX.Element | null;
|
|
7
7
|
AddButton: () => JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { MutableRefObject } from 'react';
|
|
2
2
|
import { DropResult } from 'react-beautiful-dnd';
|
|
3
3
|
import { RegisterOptions } from 'react-hook-form';
|
|
4
|
+
import { Routes_Input } from './api';
|
|
4
5
|
import { OptionType, FormActionTypes, PermissionsObj, ObjectType } from './common';
|
|
5
6
|
export interface DNDItemsListProps {
|
|
6
7
|
onDragEnd: (result: DropResult) => void;
|
|
@@ -138,10 +139,14 @@ export interface InputRendererProps {
|
|
|
138
139
|
export interface WidgetProps {
|
|
139
140
|
t?: any;
|
|
140
141
|
loader?: any;
|
|
142
|
+
routes?: Routes_Input;
|
|
141
143
|
explicitForm?: boolean;
|
|
142
144
|
permissions?: PermissionsObj;
|
|
143
145
|
formatListItem?: (code: string, data: any) => JSX.Element;
|
|
144
146
|
formatOptionLabel?: (code: string, data: any) => JSX.Element;
|
|
147
|
+
preConfirmDelete?: (data: {
|
|
148
|
+
row: ObjectType;
|
|
149
|
+
}) => Promise<boolean>;
|
|
145
150
|
children?: JSX.Element;
|
|
146
151
|
}
|
|
147
152
|
export interface FormWrapperProps {
|