@knovator/pagecreator-admin 0.0.5 → 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
|
@@ -4463,6 +4463,7 @@ const Page = ({
|
|
|
4463
4463
|
onChangeWidgetSequence: onChangeWidgetSequence,
|
|
4464
4464
|
getPages: getPages,
|
|
4465
4465
|
formState: formState,
|
|
4466
|
+
closeForm: onCloseForm,
|
|
4466
4467
|
// permissions
|
|
4467
4468
|
canAdd: _permissions === null || _permissions === void 0 ? void 0 : _permissions.add,
|
|
4468
4469
|
canDelete: _permissions === null || _permissions === void 0 ? void 0 : _permissions.delete,
|
|
@@ -7057,9 +7058,11 @@ const WiddgetFormWrapper = ({
|
|
|
7057
7058
|
|
|
7058
7059
|
const Widget = ({
|
|
7059
7060
|
t,
|
|
7061
|
+
routes,
|
|
7060
7062
|
loader,
|
|
7061
7063
|
explicitForm: _explicitForm = false,
|
|
7062
7064
|
permissions: _permissions = DEFAULT_PERMISSIONS,
|
|
7065
|
+
preConfirmDelete,
|
|
7063
7066
|
formatListItem,
|
|
7064
7067
|
formatOptionLabel,
|
|
7065
7068
|
children
|
|
@@ -7096,7 +7099,9 @@ const Widget = ({
|
|
|
7096
7099
|
tilesLoading,
|
|
7097
7100
|
onTileFormSubmit
|
|
7098
7101
|
} = useWidget({
|
|
7099
|
-
|
|
7102
|
+
routes,
|
|
7103
|
+
defaultLimit: 10,
|
|
7104
|
+
preConfirmDelete
|
|
7100
7105
|
});
|
|
7101
7106
|
return jsxs(WidgetContextProvider, Object.assign({
|
|
7102
7107
|
loading: loading,
|
|
@@ -7134,7 +7139,8 @@ const Widget = ({
|
|
|
7134
7139
|
canList: _permissions.list,
|
|
7135
7140
|
canUpdate: _permissions.update,
|
|
7136
7141
|
canPartialUpdate: _permissions.partialUpdate,
|
|
7137
|
-
formState: formState
|
|
7142
|
+
formState: formState,
|
|
7143
|
+
closeForm: onCloseForm
|
|
7138
7144
|
}, {
|
|
7139
7145
|
children: [children ? children : jsxs(Fragment, {
|
|
7140
7146
|
children: [jsx(AddButton, {}), jsx(WidgetSearch, {}), jsxs("div", Object.assign({
|
|
@@ -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 {
|