@knovator/pagecreator-admin 0.2.0 → 0.3.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/index.css +1622 -0
- package/index.d.ts +5 -1
- package/index.js +7250 -0
- package/lib/api/index.d.ts +10 -0
- package/lib/api/list.d.ts +48 -0
- package/lib/components/Page/AddButton/AddButton.d.ts +3 -0
- package/lib/components/Page/AddButton/index.d.ts +2 -0
- package/lib/components/Page/Form/PageForm.d.ts +4 -0
- package/lib/components/Page/Form/index.d.ts +2 -0
- package/lib/components/Page/Page/Page.d.ts +13 -0
- package/lib/components/Page/Page/index.d.ts +2 -0
- package/lib/components/Page/PageFormActions/PageFormActions.d.ts +4 -0
- package/lib/components/Page/PageFormActions/index.d.ts +2 -0
- package/lib/components/Page/PageFormWrapper/PageFormWrapper.d.ts +4 -0
- package/lib/components/Page/PageFormWrapper/index.d.ts +2 -0
- package/lib/components/Page/Pagination/PagePagination.d.ts +3 -0
- package/lib/components/Page/Pagination/index.d.ts +2 -0
- package/lib/components/Page/Search/PageSearch.d.ts +3 -0
- package/lib/components/Page/Search/index.d.ts +2 -0
- package/lib/components/Page/Table/PageTable.d.ts +3 -0
- package/lib/components/Page/Table/index.d.ts +2 -0
- package/lib/components/Page/index.d.ts +2 -0
- package/lib/components/Widget/AddButton/AddButton.d.ts +3 -0
- package/lib/components/Widget/AddButton/index.d.ts +2 -0
- package/lib/components/Widget/Form/ItemsAccordian.d.ts +4 -0
- package/lib/components/Widget/Form/WidgetForm.d.ts +4 -0
- package/lib/components/Widget/Form/index.d.ts +2 -0
- package/lib/components/Widget/Pagination/WidgetPagination.d.ts +3 -0
- package/lib/components/Widget/Pagination/index.d.ts +2 -0
- package/lib/components/Widget/Search/WidgetSearch.d.ts +3 -0
- package/lib/components/Widget/Search/index.d.ts +2 -0
- package/lib/components/Widget/Table/WidgetTable.d.ts +3 -0
- package/lib/components/Widget/Table/index.d.ts +2 -0
- package/lib/components/Widget/Widget/Widget.d.ts +13 -0
- package/lib/components/Widget/Widget/index.d.ts +2 -0
- package/lib/components/Widget/WidgetFormActions/WidgetFormActions.d.ts +4 -0
- package/lib/components/Widget/WidgetFormActions/index.d.ts +2 -0
- package/lib/components/Widget/WidgetFormWrapper/WidgetFormWrapper.d.ts +4 -0
- package/lib/components/Widget/WidgetFormWrapper/index.d.ts +2 -0
- package/lib/components/Widget/index.d.ts +2 -0
- package/lib/components/common/Accordian/Accordian.d.ts +13 -0
- package/lib/components/common/Accordian/index.d.ts +2 -0
- package/lib/components/common/Button/Button.d.ts +4 -0
- package/lib/components/common/Button/index.d.ts +2 -0
- package/lib/components/common/DNDItemsList/DNDItemsList.d.ts +4 -0
- package/lib/components/common/DNDItemsList/index.d.ts +2 -0
- package/lib/components/common/DeleteModal/DeleteModal.d.ts +4 -0
- package/lib/components/common/DeleteModal/index.d.ts +2 -0
- package/lib/components/common/Drawer/Drawer.d.ts +9 -0
- package/lib/components/common/Drawer/index.d.ts +2 -0
- package/lib/components/common/Form/Form.d.ts +15 -0
- package/lib/components/common/Form/SimpleForm.d.ts +17 -0
- package/lib/components/common/Form/index.d.ts +4 -0
- package/lib/components/common/FormActions/FormActions.d.ts +10 -0
- package/lib/components/common/FormActions/index.d.ts +2 -0
- package/lib/components/common/ImageUpload/ImageUpload.d.ts +4 -0
- package/lib/components/common/ImageUpload/index.d.ts +2 -0
- package/lib/components/common/Input/Checkbox.d.ts +4 -0
- package/lib/components/common/Input/Input.d.ts +4 -0
- package/lib/components/common/Input/ReactSelect.d.ts +4 -0
- package/lib/components/common/Input/Select.d.ts +4 -0
- package/lib/components/common/Input/SrcSet.d.ts +4 -0
- package/lib/components/common/Input/index.d.ts +12 -0
- package/lib/components/common/Modal/Modal.d.ts +8 -0
- package/lib/components/common/Modal/index.d.ts +2 -0
- package/lib/components/common/Pagination/Pagination.d.ts +4 -0
- package/lib/components/common/Pagination/index.d.ts +2 -0
- package/lib/components/common/Table/Table.d.ts +4 -0
- package/lib/components/common/Table/index.d.ts +2 -0
- package/lib/components/common/Toggle/Toggle.d.ts +4 -0
- package/lib/components/common/Toggle/index.d.ts +2 -0
- package/lib/constants/common.d.ts +105 -0
- package/lib/context/PageContext.d.ts +7 -0
- package/lib/context/ProviderContext.d.ts +5 -0
- package/lib/context/WidgetContext.d.ts +7 -0
- package/lib/helper/utils.d.ts +11 -0
- package/lib/hooks/usePage.d.ts +39 -0
- package/lib/hooks/usePagination.d.ts +27 -0
- package/lib/hooks/useWidget.d.ts +49 -0
- package/lib/icons/chevronDown.d.ts +4 -0
- package/lib/icons/chevronLeft.d.ts +4 -0
- package/lib/icons/chevronRight.d.ts +4 -0
- package/lib/icons/chevronUp.d.ts +4 -0
- package/lib/icons/close.d.ts +4 -0
- package/lib/icons/pencil.d.ts +4 -0
- package/lib/icons/plus.d.ts +4 -0
- package/lib/icons/trash.d.ts +4 -0
- package/lib/types/api.d.ts +34 -0
- package/lib/types/common.d.ts +25 -0
- package/lib/types/components.d.ts +255 -0
- package/lib/types/context.d.ts +96 -0
- package/lib/types/index.d.ts +4 -0
- package/package.json +6 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ACTION_TYPES, API_TYPE, BaseAPIProps, Routes_Input, ResponseType } from '../types';
|
|
2
|
+
declare const commonApi: ({ data, config, baseUrl, token, url, method, onError, }: BaseAPIProps) => Promise<ResponseType>;
|
|
3
|
+
declare const getApiType: ({ routes, action, prefix, id, }: {
|
|
4
|
+
routes?: Routes_Input | undefined;
|
|
5
|
+
action: ACTION_TYPES;
|
|
6
|
+
prefix: string;
|
|
7
|
+
id?: string | undefined;
|
|
8
|
+
}) => API_TYPE;
|
|
9
|
+
export default commonApi;
|
|
10
|
+
export { getApiType };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { API_INPUT_TYPE } from '../types';
|
|
2
|
+
declare const apiList: {
|
|
3
|
+
LIST: ({ prefix }: API_INPUT_TYPE) => {
|
|
4
|
+
url: string;
|
|
5
|
+
method: string;
|
|
6
|
+
};
|
|
7
|
+
CREATE: ({ prefix }: API_INPUT_TYPE) => {
|
|
8
|
+
url: string;
|
|
9
|
+
method: string;
|
|
10
|
+
};
|
|
11
|
+
UPDATE: ({ prefix, id }: API_INPUT_TYPE) => {
|
|
12
|
+
url: string;
|
|
13
|
+
method: string;
|
|
14
|
+
};
|
|
15
|
+
PARTIAL_UPDATE: ({ prefix, id }: API_INPUT_TYPE) => {
|
|
16
|
+
url: string;
|
|
17
|
+
method: string;
|
|
18
|
+
};
|
|
19
|
+
DELETE: ({ prefix, id }: API_INPUT_TYPE) => {
|
|
20
|
+
url: string;
|
|
21
|
+
method: string;
|
|
22
|
+
};
|
|
23
|
+
WIDGET_TYPES: ({ prefix }: API_INPUT_TYPE) => {
|
|
24
|
+
url: string;
|
|
25
|
+
method: string;
|
|
26
|
+
};
|
|
27
|
+
SELECTION_TYPES: ({ prefix }: API_INPUT_TYPE) => {
|
|
28
|
+
url: string;
|
|
29
|
+
method: string;
|
|
30
|
+
};
|
|
31
|
+
ITEM: ({ prefix, id }: API_INPUT_TYPE) => {
|
|
32
|
+
url: string;
|
|
33
|
+
method: string;
|
|
34
|
+
};
|
|
35
|
+
COLLECTION_DATA: ({ prefix }: API_INPUT_TYPE) => {
|
|
36
|
+
url: string;
|
|
37
|
+
method: string;
|
|
38
|
+
};
|
|
39
|
+
IMAGE_UPLOAD: ({ prefix }: API_INPUT_TYPE) => {
|
|
40
|
+
url: string;
|
|
41
|
+
method: string;
|
|
42
|
+
};
|
|
43
|
+
IMAGE_REMOVE: ({ prefix, id }: API_INPUT_TYPE) => {
|
|
44
|
+
url: string;
|
|
45
|
+
method: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export default apiList;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PageProps } from '../../../types';
|
|
3
|
+
declare const Page: {
|
|
4
|
+
({ t, loader, explicitForm, children, permissions, }: PageProps): JSX.Element;
|
|
5
|
+
Table: () => JSX.Element | null;
|
|
6
|
+
Search: () => JSX.Element;
|
|
7
|
+
Form: ({ formRef }: import("../../../types").FormProps) => JSX.Element | null;
|
|
8
|
+
AddButton: () => JSX.Element;
|
|
9
|
+
Pagination: () => JSX.Element;
|
|
10
|
+
FormActions: ({ formRef }: import("../../../types").FormActionWrapperProps) => JSX.Element | null;
|
|
11
|
+
FormWrapper: ({ children }: import("../../../types").FormWrapperProps) => JSX.Element | null;
|
|
12
|
+
};
|
|
13
|
+
export default Page;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ItemsAccordianProps } from '../../../types';
|
|
3
|
+
declare const ItemsAccordian: ({ schema, onDataSubmit, show, title, id, itemsData, collapseId, toggleShow, itemType, widgetId, onDelete, addText, saveText, cancelText, deleteText, editText, }: ItemsAccordianProps) => JSX.Element;
|
|
4
|
+
export default ItemsAccordian;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { WidgetProps } from '../../../types';
|
|
3
|
+
declare const Widget: {
|
|
4
|
+
({ t, routes, loader, explicitForm, permissions, preConfirmDelete, formatListItem, formatOptionLabel, children, }: WidgetProps): JSX.Element;
|
|
5
|
+
Table: () => JSX.Element | null;
|
|
6
|
+
Form: ({ formRef }: import("../../../types").FormProps) => JSX.Element | null;
|
|
7
|
+
AddButton: () => JSX.Element;
|
|
8
|
+
Search: () => JSX.Element;
|
|
9
|
+
Pagination: () => JSX.Element;
|
|
10
|
+
FormWrapper: ({ children }: import("../../../types").FormWrapperProps) => JSX.Element | null;
|
|
11
|
+
FormActions: ({ formRef }: import("../../../types").FormActionWrapperProps) => JSX.Element | null;
|
|
12
|
+
};
|
|
13
|
+
export default Widget;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface AccordianProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
collapseId?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
open?: boolean;
|
|
8
|
+
onToggle?: (status: boolean) => void;
|
|
9
|
+
title?: string;
|
|
10
|
+
footerContent?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
declare const Accordian: ({ id, className, children, open, onToggle, title, collapseId, footerContent, }: AccordianProps) => JSX.Element;
|
|
13
|
+
export default Accordian;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DeleteModalProps } from '../../../types';
|
|
3
|
+
declare const DeleteModal: ({ formState, onClose, itemData, onConfirmDelete, permanentlyDelete, lossOfData, pleaseType, toProceedOrCancel, confirm, }: DeleteModalProps) => JSX.Element | null;
|
|
4
|
+
export default DeleteModal;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface DrawerProps extends React.PropsWithChildren {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
title?: string;
|
|
6
|
+
footerContent?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare const Drawer: ({ children, open, onClose, title, footerContent, }: DrawerProps) => JSX.Element;
|
|
9
|
+
export default Drawer;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { MutableRefObject } from 'react';
|
|
2
|
+
import { EventType } from 'react-hook-form';
|
|
3
|
+
import { CombineObjectType, ObjectType, SchemaType } from '../../../types';
|
|
4
|
+
interface FormProps {
|
|
5
|
+
schema: SchemaType[];
|
|
6
|
+
data?: CombineObjectType;
|
|
7
|
+
isUpdating?: boolean;
|
|
8
|
+
onSubmit: (data: CombineObjectType) => void;
|
|
9
|
+
enable?: boolean;
|
|
10
|
+
updates?: CombineObjectType;
|
|
11
|
+
ref: MutableRefObject<HTMLFormElement | null>;
|
|
12
|
+
watcher?: (value: ObjectType, name: string | undefined, type: EventType | undefined) => void;
|
|
13
|
+
}
|
|
14
|
+
declare const Form: React.ForwardRefExoticComponent<Pick<FormProps, "schema" | "onSubmit" | "data" | "isUpdating" | "enable" | "updates" | "watcher"> & React.RefAttributes<HTMLFormElement | null>>;
|
|
15
|
+
export default Form;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { MutableRefObject } from 'react';
|
|
2
|
+
import { CombineObjectType, SchemaType } from '../../../types';
|
|
3
|
+
interface SimpleFormProps {
|
|
4
|
+
schema: SchemaType[];
|
|
5
|
+
isUpdating?: boolean;
|
|
6
|
+
onSubmit: (data: CombineObjectType) => void;
|
|
7
|
+
enable?: boolean;
|
|
8
|
+
ref: MutableRefObject<HTMLFormElement | null>;
|
|
9
|
+
register: any;
|
|
10
|
+
errors: any;
|
|
11
|
+
handleSubmit: any;
|
|
12
|
+
setValue: any;
|
|
13
|
+
control: any;
|
|
14
|
+
setError: any;
|
|
15
|
+
}
|
|
16
|
+
declare const SimpleForm: React.ForwardRefExoticComponent<Pick<SimpleFormProps, "schema" | "onSubmit" | "isUpdating" | "enable" | "register" | "errors" | "handleSubmit" | "setValue" | "control" | "setError"> & React.RefAttributes<HTMLFormElement | null>>;
|
|
17
|
+
export default SimpleForm;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface FormActionsProps {
|
|
3
|
+
loading?: boolean;
|
|
4
|
+
primaryLabel?: string;
|
|
5
|
+
secondaryLabel?: string;
|
|
6
|
+
onPrimaryButtonClick?: (e?: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
7
|
+
onSecondaryButtonClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
declare const FormActions: ({ loading, primaryLabel, secondaryLabel, onPrimaryButtonClick, onSecondaryButtonClick, }: FormActionsProps) => JSX.Element;
|
|
10
|
+
export default FormActions;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ImageUploadProps } from '../../../types';
|
|
3
|
+
declare const _default: React.MemoExoticComponent<({ className, text, maxSize, setImgId, onError, error, imgId, onImageUpload, onImageRemove, baseUrl, disabled, }: ImageUploadProps) => JSX.Element>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { InputProps } from '../../../types';
|
|
3
|
+
declare const Input: ({ label, id, placeholder, type, size, required, error, className, disabled, rest, onInput, onBlur, value, onChange, wrapperClassName, }: InputProps) => JSX.Element;
|
|
4
|
+
export default Input;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ReactSelectProps } from '../../../types';
|
|
3
|
+
declare const CustomReactSelect: ({ onChange, label, error, options, className, isMulti, selectedOptions, required, isLoading, isSearchable, onSearch, placeholder, wrapperClassName, formatOptionLabel, listCode, }: ReactSelectProps) => JSX.Element;
|
|
4
|
+
export default CustomReactSelect;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import Checkbox from "./Checkbox";
|
|
3
|
+
import Select from "./Select";
|
|
4
|
+
import ReactSelect from "./ReactSelect";
|
|
5
|
+
import SrcSet from './SrcSet';
|
|
6
|
+
declare const _default: (({ label, id, placeholder, type, size, required, error, className, disabled, rest, onInput, onBlur, value, onChange, wrapperClassName, }: import("../../../types").InputProps) => JSX.Element) & {
|
|
7
|
+
Select: typeof Select;
|
|
8
|
+
ReactSelect: typeof ReactSelect;
|
|
9
|
+
Checkbox: typeof Checkbox;
|
|
10
|
+
SrcSet: typeof SrcSet;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PaginationProps } from '../../../types';
|
|
3
|
+
declare const Pagination: ({ currentPage, pageSize, totalPages, totalRecords, setCurrentPage, showingText, pageText, ofText, }: PaginationProps) => JSX.Element;
|
|
4
|
+
export default Pagination;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
declare const DEFAULT_OFFSET_PAYLOAD = 0;
|
|
2
|
+
declare const DECIMAL_REDIX = 10;
|
|
3
|
+
declare const DEFAULT_CURRENT_PAGE = 1;
|
|
4
|
+
declare const INTERNAL_ERROR_CODE = "INTERNAL_ERROR";
|
|
5
|
+
declare const DEFAULT_LIMIT = 10;
|
|
6
|
+
declare const PAGE_LIMITS: number[];
|
|
7
|
+
declare enum CALLBACK_CODES {
|
|
8
|
+
'GET_ALL' = "GET_ALL",
|
|
9
|
+
'GET_SINGLE' = "GET_SINGLE",
|
|
10
|
+
'CREATE' = "CREATE",
|
|
11
|
+
'UPDATE' = "UPDATE",
|
|
12
|
+
'PARTIAL_UPDATE' = "PARTIAL_UPDATE",
|
|
13
|
+
'DELETE' = "DELETE",
|
|
14
|
+
'IMAGE_UPLOAD' = "IMAGE_UPLOAD",
|
|
15
|
+
'IMAGE_REMOVE' = "IMAGE_REMOVE",
|
|
16
|
+
'INTERNAL' = "INTERNAL"
|
|
17
|
+
}
|
|
18
|
+
declare const DEFAULT_PERMISSIONS: {
|
|
19
|
+
list: boolean;
|
|
20
|
+
add: boolean;
|
|
21
|
+
delete: boolean;
|
|
22
|
+
partialUpdate: boolean;
|
|
23
|
+
update: boolean;
|
|
24
|
+
};
|
|
25
|
+
declare const TRANSLATION_PAIRS_COMMON: {
|
|
26
|
+
permanentlyDelete: string;
|
|
27
|
+
lossOfData: string;
|
|
28
|
+
pleaseType: string;
|
|
29
|
+
toProceedOrCancel: string;
|
|
30
|
+
confirm: string;
|
|
31
|
+
'common:actions': string;
|
|
32
|
+
'common:cancel': string;
|
|
33
|
+
page: string;
|
|
34
|
+
next: string;
|
|
35
|
+
previous: string;
|
|
36
|
+
indicatesRequired: string;
|
|
37
|
+
addButtonText: string;
|
|
38
|
+
editButtonText: string;
|
|
39
|
+
cancelButtonText: string;
|
|
40
|
+
deleteButtonText: string;
|
|
41
|
+
saveButtonText: string;
|
|
42
|
+
showing: string;
|
|
43
|
+
of: string;
|
|
44
|
+
};
|
|
45
|
+
declare const TRANSLATION_PAIRS_WIDGET: {
|
|
46
|
+
'widget.name': string;
|
|
47
|
+
'widget.namePlaceholder': string;
|
|
48
|
+
'widget.nameRequired': string;
|
|
49
|
+
'widget.widgetTitle': string;
|
|
50
|
+
'widget.widgetTitlePlaceholder': string;
|
|
51
|
+
'widget.widgetTitleRequired': string;
|
|
52
|
+
'widget.itemsType': string;
|
|
53
|
+
'widget.itemsTypePlaceholder': string;
|
|
54
|
+
'widget.widgetType': string;
|
|
55
|
+
'widget.widgetTypeRequired': string;
|
|
56
|
+
'widget.code': string;
|
|
57
|
+
'widget.codePlaceholder': string;
|
|
58
|
+
'widget.codeRequired': string;
|
|
59
|
+
'widget.webPerRow': string;
|
|
60
|
+
'widget.webPerRowPlaceholder': string;
|
|
61
|
+
'widget.mobilePerRow': string;
|
|
62
|
+
'widget.mobilePerRowPlaceholder': string;
|
|
63
|
+
'widget.tabletPerRow': string;
|
|
64
|
+
'widget.tabletPerRowPlaceholder': string;
|
|
65
|
+
'widget.mobileItems': string;
|
|
66
|
+
'widget.webItems': string;
|
|
67
|
+
'widget.searchPlaceholder': string;
|
|
68
|
+
'widget.autoPlay': string;
|
|
69
|
+
'widget.tableName': string;
|
|
70
|
+
'widget.tableCode': string;
|
|
71
|
+
'widget.tableActive': string;
|
|
72
|
+
'widget.addWidgetTitle': string;
|
|
73
|
+
'widget.updateWidgetTitle': string;
|
|
74
|
+
'widget.webPerRowRequired': string;
|
|
75
|
+
'widget.tabletPerRowRequired': string;
|
|
76
|
+
'widget.mobilePerRowRequired': string;
|
|
77
|
+
};
|
|
78
|
+
declare const TRANSLATION_PAIRS_ITEM: {
|
|
79
|
+
'item.title': string;
|
|
80
|
+
'item.titlePlaceholder': string;
|
|
81
|
+
'item.altText': string;
|
|
82
|
+
'item.altTextPlaceholder': string;
|
|
83
|
+
'item.link': string;
|
|
84
|
+
'item.linkPlaceholder': string;
|
|
85
|
+
'item.image': string;
|
|
86
|
+
'item.uploadFile': string;
|
|
87
|
+
'item.dragDrop': string;
|
|
88
|
+
'item.allowedFormat': string;
|
|
89
|
+
'item.srcset': string;
|
|
90
|
+
};
|
|
91
|
+
declare const TRANSLATION_PAIRS_PAGE: {
|
|
92
|
+
'page.name': string;
|
|
93
|
+
'page.namePlaceholder': string;
|
|
94
|
+
'page.nameRequired': string;
|
|
95
|
+
'page.code': string;
|
|
96
|
+
'page.codePlaceholder': string;
|
|
97
|
+
'page.codeRequired': string;
|
|
98
|
+
'page.addPageTitle': string;
|
|
99
|
+
'page.updatePageTitle': string;
|
|
100
|
+
'page.searchPages': string;
|
|
101
|
+
'page.tableName': string;
|
|
102
|
+
'page.tableCode': string;
|
|
103
|
+
'page.widgets': string;
|
|
104
|
+
};
|
|
105
|
+
export { CALLBACK_CODES, DECIMAL_REDIX, DEFAULT_CURRENT_PAGE, DEFAULT_OFFSET_PAYLOAD, INTERNAL_ERROR_CODE, DEFAULT_PERMISSIONS, TRANSLATION_PAIRS_COMMON, DEFAULT_LIMIT, PAGE_LIMITS, TRANSLATION_PAIRS_WIDGET, TRANSLATION_PAIRS_ITEM, TRANSLATION_PAIRS_PAGE, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PageContextType } from '../types';
|
|
3
|
+
interface PageContextProviderProps extends React.PropsWithChildren, Partial<PageContextType> {
|
|
4
|
+
}
|
|
5
|
+
declare const PageContextProvider: ({ t, list, widgets, formState, closeForm, getPages, loading, onChangeFormState, onPageFormSubmit, canAdd, canUpdate, selectedWidgets, setSelectedWidgets, onChangeWidgetSequence, currentPage, limits, pageSize, setCurrentPage, setPageSize, totalPages, totalRecords, canList, columns, data, canDelete, loader, children, }: PageContextProviderProps) => JSX.Element;
|
|
6
|
+
export declare function usePageState(): PageContextType;
|
|
7
|
+
export default PageContextProvider;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ProviderContextProviderProps, ProviderContextType } from '../types';
|
|
3
|
+
declare const Provider: ({ children, baseUrl, token, onError, onSuccess, onLogout, switchClass, itemsRoutesPrefix, widgetRoutesPrefix, pageRoutesPrefix, }: ProviderContextProviderProps) => JSX.Element;
|
|
4
|
+
export declare function useProviderState(): ProviderContextType;
|
|
5
|
+
export default Provider;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WidgetContextType } from '../types';
|
|
3
|
+
interface WidgetContextProviderProps extends React.PropsWithChildren, Partial<WidgetContextType> {
|
|
4
|
+
}
|
|
5
|
+
declare const WidgetContextProvider: ({ t, list, formState, closeForm, loading, onChangeFormState, onWidgetFormSubmit, updateData, canAdd, canUpdate, onDeleteItem, getWidgets, onImageUpload, onImageRemove, itemsTypes, widgetTypes, getCollectionData, collectionDataLoading, collectionData, formatListItem, formatOptionLabel, currentPage, limits, pageSize, setCurrentPage, setPageSize, totalPages, totalRecords, canList, canPartialUpdate, columns, data, canDelete, loader, onPartialUpdateWidget, webItems, mobileItems, itemsLoading, onItemFormSubmit, children, }: WidgetContextProviderProps) => JSX.Element;
|
|
6
|
+
export declare function useWidgetState(): WidgetContextType;
|
|
7
|
+
export default WidgetContextProvider;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TFunc } from '../types';
|
|
2
|
+
export declare const paginationDataGatter: (data: any) => any;
|
|
3
|
+
export declare const dataGatter: (data: any) => any;
|
|
4
|
+
export declare const capitalizeFirstLetter: (string?: string) => string;
|
|
5
|
+
export declare const changeToCode: (string?: string) => string;
|
|
6
|
+
export declare const isObject: (data: any) => boolean;
|
|
7
|
+
export declare const isString: (data: any) => boolean;
|
|
8
|
+
export declare const isArray: (data: any) => boolean;
|
|
9
|
+
export declare const isEmpty: (data: any) => boolean;
|
|
10
|
+
export declare function createTranslation(t: TFunc | undefined, obj: Record<string, string>): (key: string) => string;
|
|
11
|
+
export declare const build_path: (...args: string[]) => string;
|