@knovator/pagecreator-admin 1.2.2 → 1.2.4
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/README.md +205 -205
- package/index.d.ts +1 -0
- package/package.json +38 -42
- package/src/{index.d.ts → index.ts} +1 -0
- package/src/lib/api/index.ts +70 -0
- package/src/lib/api/list.ts +59 -0
- package/src/lib/components/Page/AddButton/AddButton.tsx +16 -0
- package/src/lib/components/Page/AddButton/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/Page/Form/PageForm.tsx +194 -0
- package/src/lib/components/Page/Form/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/Page/Page/Page.tsx +151 -0
- package/src/lib/components/Page/Page/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/Page/PageFormActions/PageFormActions.tsx +50 -0
- package/src/lib/components/Page/PageFormActions/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/Page/PageFormWrapper/PageFormWrapper.tsx +16 -0
- package/src/lib/components/Page/PageFormWrapper/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/Page/Pagination/PagePagination.tsx +26 -0
- package/src/lib/components/Page/Pagination/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/Page/Search/PageSearch.tsx +32 -0
- package/src/lib/components/Page/Search/{index.d.ts → index.tsx} +1 -0
- package/src/lib/components/Page/Table/PageTable.tsx +36 -0
- package/src/lib/components/Page/Table/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/Page/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/Widget/AddButton/AddButton.tsx +16 -0
- package/src/lib/components/Widget/AddButton/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/Widget/Form/ItemsAccordian.tsx +354 -0
- package/src/lib/components/Widget/Form/Tabs/TabItem.tsx +43 -0
- package/src/lib/components/Widget/Form/Tabs/Tabs.tsx +190 -0
- package/src/lib/components/Widget/Form/Tabs/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/Widget/Form/WidgetForm.tsx +771 -0
- package/src/lib/components/Widget/Form/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/Widget/Pagination/WidgetPagination.tsx +26 -0
- package/src/lib/components/Widget/Pagination/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/Widget/Search/WidgetSearch.tsx +32 -0
- package/src/lib/components/Widget/Search/{index.d.ts → index.tsx} +1 -0
- package/src/lib/components/Widget/Table/WidgetTable.tsx +70 -0
- package/src/lib/components/Widget/Table/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/Widget/Widget/Widget.tsx +173 -0
- package/src/lib/components/Widget/Widget/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/Widget/WidgetFormActions/WidgetFormActions.tsx +50 -0
- package/src/lib/components/Widget/WidgetFormActions/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/Widget/WidgetFormWrapper/WidgetFormWrapper.tsx +16 -0
- package/src/lib/components/Widget/WidgetFormWrapper/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/Widget/{index.d.ts → index.tsx} +1 -0
- package/src/lib/components/common/Accordian/Accordian.tsx +56 -0
- package/src/lib/components/common/Accordian/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/common/Button/Button.tsx +45 -0
- package/src/lib/components/common/Button/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/common/ConfirmPopover/ConfirmPopover.tsx +47 -0
- package/src/lib/components/common/ConfirmPopover/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/common/DNDItemsList/DNDItemsList.tsx +53 -0
- package/src/lib/components/common/DNDItemsList/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/common/DeleteModal/DeleteModal.tsx +72 -0
- package/src/lib/components/common/DeleteModal/index.tsx +3 -0
- package/src/lib/components/common/Drawer/Drawer.tsx +79 -0
- package/src/lib/components/common/Drawer/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/common/Form/Form.tsx +256 -0
- package/src/lib/components/common/Form/SimpleForm.tsx +314 -0
- package/src/lib/components/common/Form/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/common/FormActions/FormActions.tsx +37 -0
- package/src/lib/components/common/FormActions/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/common/ImageUpload/ImageUpload.tsx +113 -0
- package/src/lib/components/common/ImageUpload/index.tsx +3 -0
- package/src/lib/components/common/Input/Checkbox.tsx +25 -0
- package/src/lib/components/common/Input/Input.tsx +51 -0
- package/src/lib/components/common/Input/ReactSelect.tsx +60 -0
- package/src/lib/components/common/Input/Select.tsx +47 -0
- package/src/lib/components/common/Input/SrcSet.tsx +143 -0
- package/src/lib/components/common/Input/index.ts +20 -0
- package/src/lib/components/common/Modal/Modal.tsx +57 -0
- package/src/lib/components/common/Modal/index.tsx +3 -0
- package/src/lib/components/common/Pagination/Pagination.tsx +88 -0
- package/src/lib/components/common/Pagination/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/common/Table/Table.tsx +133 -0
- package/src/lib/components/common/Table/{index.d.ts → index.ts} +1 -0
- package/src/lib/components/common/Toggle/Toggle.tsx +23 -0
- package/src/lib/components/common/Toggle/{index.d.ts → index.ts} +1 -0
- package/src/lib/constants/common.ts +145 -0
- package/src/lib/context/PageContext.tsx +100 -0
- package/src/lib/context/ProviderContext.tsx +52 -0
- package/src/lib/context/WidgetContext.tsx +127 -0
- package/src/lib/helper/utils.ts +46 -0
- package/src/lib/hooks/usePage.tsx +307 -0
- package/src/lib/hooks/usePagination.tsx +41 -0
- package/src/lib/hooks/useWidget.tsx +503 -0
- package/src/lib/icons/chevronDown.tsx +21 -0
- package/src/lib/icons/chevronLeft.tsx +20 -0
- package/src/lib/icons/chevronRight.tsx +20 -0
- package/src/lib/icons/chevronUp.tsx +21 -0
- package/src/lib/icons/close.tsx +21 -0
- package/src/lib/icons/pencil.tsx +21 -0
- package/src/lib/icons/plus.tsx +23 -0
- package/src/lib/icons/trash.tsx +21 -0
- package/src/lib/types/api.ts +44 -0
- package/src/lib/types/common.ts +31 -0
- package/src/lib/types/components.ts +427 -0
- package/src/lib/types/context.ts +184 -0
- package/src/styles/index.css +469 -0
- package/index.cjs +0 -7714
- package/index.css +0 -2258
- package/index.js +0 -7700
- package/src/lib/api/index.d.ts +0 -10
- package/src/lib/api/list.d.ts +0 -56
- package/src/lib/components/Page/AddButton/AddButton.d.ts +0 -3
- package/src/lib/components/Page/Form/PageForm.d.ts +0 -4
- package/src/lib/components/Page/Page/Page.d.ts +0 -13
- package/src/lib/components/Page/PageFormActions/PageFormActions.d.ts +0 -4
- package/src/lib/components/Page/PageFormWrapper/PageFormWrapper.d.ts +0 -4
- package/src/lib/components/Page/Pagination/PagePagination.d.ts +0 -3
- package/src/lib/components/Page/Search/PageSearch.d.ts +0 -3
- package/src/lib/components/Page/Table/PageTable.d.ts +0 -4
- package/src/lib/components/Widget/AddButton/AddButton.d.ts +0 -3
- package/src/lib/components/Widget/Form/ItemsAccordian.d.ts +0 -4
- package/src/lib/components/Widget/Form/Tabs/TabItem.d.ts +0 -4
- package/src/lib/components/Widget/Form/Tabs/Tabs.d.ts +0 -4
- package/src/lib/components/Widget/Form/WidgetForm.d.ts +0 -4
- package/src/lib/components/Widget/Pagination/WidgetPagination.d.ts +0 -3
- package/src/lib/components/Widget/Search/WidgetSearch.d.ts +0 -3
- package/src/lib/components/Widget/Table/WidgetTable.d.ts +0 -4
- package/src/lib/components/Widget/Widget/Widget.d.ts +0 -13
- package/src/lib/components/Widget/WidgetFormActions/WidgetFormActions.d.ts +0 -4
- package/src/lib/components/Widget/WidgetFormWrapper/WidgetFormWrapper.d.ts +0 -4
- package/src/lib/components/common/Accordian/Accordian.d.ts +0 -13
- package/src/lib/components/common/Button/Button.d.ts +0 -4
- package/src/lib/components/common/ConfirmPopover/ConfirmPopover.d.ts +0 -4
- package/src/lib/components/common/DNDItemsList/DNDItemsList.d.ts +0 -4
- package/src/lib/components/common/DeleteModal/DeleteModal.d.ts +0 -4
- package/src/lib/components/common/DeleteModal/index.d.ts +0 -2
- package/src/lib/components/common/Drawer/Drawer.d.ts +0 -9
- package/src/lib/components/common/Form/Form.d.ts +0 -15
- package/src/lib/components/common/Form/SimpleForm.d.ts +0 -18
- package/src/lib/components/common/FormActions/FormActions.d.ts +0 -10
- package/src/lib/components/common/ImageUpload/ImageUpload.d.ts +0 -4
- package/src/lib/components/common/ImageUpload/index.d.ts +0 -2
- package/src/lib/components/common/Input/Checkbox.d.ts +0 -4
- package/src/lib/components/common/Input/Input.d.ts +0 -4
- package/src/lib/components/common/Input/ReactSelect.d.ts +0 -4
- package/src/lib/components/common/Input/Select.d.ts +0 -4
- package/src/lib/components/common/Input/SrcSet.d.ts +0 -4
- package/src/lib/components/common/Input/index.d.ts +0 -12
- package/src/lib/components/common/Modal/Modal.d.ts +0 -8
- package/src/lib/components/common/Modal/index.d.ts +0 -2
- package/src/lib/components/common/Pagination/Pagination.d.ts +0 -4
- package/src/lib/components/common/Table/Table.d.ts +0 -4
- package/src/lib/components/common/Toggle/Toggle.d.ts +0 -4
- package/src/lib/constants/common.d.ts +0 -122
- package/src/lib/context/PageContext.d.ts +0 -7
- package/src/lib/context/ProviderContext.d.ts +0 -5
- package/src/lib/context/WidgetContext.d.ts +0 -7
- package/src/lib/helper/utils.d.ts +0 -10
- package/src/lib/hooks/usePage.d.ts +0 -43
- package/src/lib/hooks/usePagination.d.ts +0 -15
- package/src/lib/hooks/useWidget.d.ts +0 -46
- package/src/lib/icons/chevronDown.d.ts +0 -4
- package/src/lib/icons/chevronLeft.d.ts +0 -4
- package/src/lib/icons/chevronRight.d.ts +0 -4
- package/src/lib/icons/chevronUp.d.ts +0 -4
- package/src/lib/icons/close.d.ts +0 -4
- package/src/lib/icons/pencil.d.ts +0 -4
- package/src/lib/icons/plus.d.ts +0 -4
- package/src/lib/icons/trash.d.ts +0 -4
- package/src/lib/types/api.d.ts +0 -34
- package/src/lib/types/common.d.ts +0 -29
- package/src/lib/types/components.d.ts +0 -420
- package/src/lib/types/context.d.ts +0 -135
- /package/src/lib/types/{index.d.ts → index.ts} +0 -0
package/src/lib/api/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
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 };
|
package/src/lib/api/list.d.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { API_INPUT_TYPE } from '../types';
|
|
2
|
-
declare const apiList: {
|
|
3
|
-
GET_ONE: ({ prefix, id }: API_INPUT_TYPE) => {
|
|
4
|
-
url: string;
|
|
5
|
-
method: string;
|
|
6
|
-
};
|
|
7
|
-
LIST: ({ prefix }: API_INPUT_TYPE) => {
|
|
8
|
-
url: string;
|
|
9
|
-
method: string;
|
|
10
|
-
};
|
|
11
|
-
CREATE: ({ prefix }: API_INPUT_TYPE) => {
|
|
12
|
-
url: string;
|
|
13
|
-
method: string;
|
|
14
|
-
};
|
|
15
|
-
UPDATE: ({ prefix, id }: API_INPUT_TYPE) => {
|
|
16
|
-
url: string;
|
|
17
|
-
method: string;
|
|
18
|
-
};
|
|
19
|
-
PARTIAL_UPDATE: ({ prefix, id }: API_INPUT_TYPE) => {
|
|
20
|
-
url: string;
|
|
21
|
-
method: string;
|
|
22
|
-
};
|
|
23
|
-
DELETE: ({ prefix, id }: API_INPUT_TYPE) => {
|
|
24
|
-
url: string;
|
|
25
|
-
method: string;
|
|
26
|
-
};
|
|
27
|
-
WIDGET_TYPES: ({ prefix }: API_INPUT_TYPE) => {
|
|
28
|
-
url: string;
|
|
29
|
-
method: string;
|
|
30
|
-
};
|
|
31
|
-
SELECTION_TYPES: ({ prefix }: API_INPUT_TYPE) => {
|
|
32
|
-
url: string;
|
|
33
|
-
method: string;
|
|
34
|
-
};
|
|
35
|
-
ITEM: ({ prefix, id }: API_INPUT_TYPE) => {
|
|
36
|
-
url: string;
|
|
37
|
-
method: string;
|
|
38
|
-
};
|
|
39
|
-
COLLECTION_DATA: ({ prefix }: API_INPUT_TYPE) => {
|
|
40
|
-
url: string;
|
|
41
|
-
method: string;
|
|
42
|
-
};
|
|
43
|
-
LANGUAGES: ({ prefix }: API_INPUT_TYPE) => {
|
|
44
|
-
url: string;
|
|
45
|
-
method: string;
|
|
46
|
-
};
|
|
47
|
-
IMAGE_UPLOAD: ({ prefix }: API_INPUT_TYPE) => {
|
|
48
|
-
url: string;
|
|
49
|
-
method: string;
|
|
50
|
-
};
|
|
51
|
-
IMAGE_REMOVE: ({ prefix, id }: API_INPUT_TYPE) => {
|
|
52
|
-
url: string;
|
|
53
|
-
method: string;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
export default apiList;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { PageProps } from '../../../types';
|
|
3
|
-
declare const Page: {
|
|
4
|
-
({ loader, translations, explicitForm, children, permissions, preConfirmDelete, }: PageProps): JSX.Element;
|
|
5
|
-
Table: ({ extraActions, extraColumns }: import("../../../types").DerivedTableProps) => JSX.Element;
|
|
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;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ItemsAccordianProps } from '../../../types';
|
|
3
|
-
declare const ItemsAccordian: ({ show, title, id, collapseId, toggleShow, loading, name, errors, control, register, setError, itemType, languages, clearError, addText, deleteText, }: ItemsAccordianProps) => JSX.Element;
|
|
4
|
-
export default ItemsAccordian;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { TabsProps } from '../../../../types';
|
|
3
|
-
declare const Tabs: ({ errors, activeTab, setActiveTab, options, control, listCode, setValue, getValues, languages, formatItem, deleteTitle, clearErrors, loadOptions, customStyles, noButtonText, yesButtonText, isItemsLoading, itemsPlaceholder, formatOptionLabel, tabCollectionItems, onCollectionItemsIndexChange, }: TabsProps) => JSX.Element;
|
|
4
|
-
export default Tabs;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { WidgetProps } from '../../../types';
|
|
3
|
-
declare const Widget: {
|
|
4
|
-
({ routes, loader, explicitForm, imageBaseUrl, permissions, preConfirmDelete, formatListItem, formatOptionLabel, imageMaxSize, translations, children, }: WidgetProps): JSX.Element;
|
|
5
|
-
Table: ({ extraActions, extraColumns }: import("../../../types").DerivedTableProps) => JSX.Element;
|
|
6
|
-
Form: ({ formRef, customInputs }: 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;
|
|
@@ -1,13 +0,0 @@
|
|
|
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;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { DeleteModalProps } from '../../../types';
|
|
3
|
-
declare const DeleteModal: ({ formState, onClose, itemData, onConfirmDelete, confirmationRequired, permanentlyDelete, lossOfData, pleaseType, toProceedOrCancel, confirm, typeHerePlaceholder, }: DeleteModalProps) => JSX.Element | null;
|
|
4
|
-
export default DeleteModal;
|
|
@@ -1,9 +0,0 @@
|
|
|
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;
|
|
@@ -1,15 +0,0 @@
|
|
|
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;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React, { MutableRefObject } from 'react';
|
|
2
|
-
import { CombineObjectType, LanguageType, SchemaType } from '../../../types';
|
|
3
|
-
interface SimpleFormProps {
|
|
4
|
-
schema: SchemaType[];
|
|
5
|
-
isUpdating?: boolean;
|
|
6
|
-
onSubmit: (data: CombineObjectType) => void;
|
|
7
|
-
enable?: boolean;
|
|
8
|
-
languages?: LanguageType[];
|
|
9
|
-
ref: MutableRefObject<HTMLFormElement | null>;
|
|
10
|
-
register: any;
|
|
11
|
-
errors: any;
|
|
12
|
-
handleSubmit: any;
|
|
13
|
-
setValue: any;
|
|
14
|
-
control: any;
|
|
15
|
-
setError: any;
|
|
16
|
-
}
|
|
17
|
-
declare const SimpleForm: React.ForwardRefExoticComponent<Pick<SimpleFormProps, "schema" | "onSubmit" | "isUpdating" | "enable" | "register" | "errors" | "handleSubmit" | "setValue" | "control" | "setError" | "languages"> & React.RefAttributes<HTMLFormElement | null>>;
|
|
18
|
-
export default SimpleForm;
|
|
@@ -1,10 +0,0 @@
|
|
|
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;
|
|
@@ -1,4 +0,0 @@
|
|
|
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, clearError, baseUrl, disabled, }: ImageUploadProps) => JSX.Element>;
|
|
4
|
-
export default _default;
|
|
@@ -1,4 +0,0 @@
|
|
|
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, info, onChange, wrapperClassName, }: InputProps) => JSX.Element;
|
|
4
|
-
export default Input;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ReactSelectProps } from '../../../types';
|
|
3
|
-
declare const CustomReactSelect: ({ onChange, label, error, className, isMulti, selectedOptions, required, isLoading, isSearchable, loadOptions, placeholder, wrapperClassName, formatOptionLabel, listCode, customStyles, selectKey, }: ReactSelectProps) => JSX.Element;
|
|
4
|
-
export default CustomReactSelect;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { InputProps, SrcSetMessageProps } from '../../../types';
|
|
3
|
-
declare const SrcSet: ({ label, size, required, error, className, register, wrapperClassName, control, errors, name, disabled, screenSizeRequired, heightRequired, minHeight, minScreenSize, minWidth, widthRequired, }: InputProps & SrcSetMessageProps) => JSX.Element;
|
|
4
|
-
export default SrcSet;
|
|
@@ -1,12 +0,0 @@
|
|
|
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, info, 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;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { PaginationProps } from '../../../types';
|
|
3
|
-
declare const Pagination: ({ currentPage, pageSize, totalPages, totalRecords, setCurrentPage, showingText, pageText, ofText, previousContent, nextContent, }: PaginationProps) => JSX.Element;
|
|
4
|
-
export default Pagination;
|
|
@@ -1,122 +0,0 @@
|
|
|
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 CONSTANTS: {
|
|
19
|
-
EMPTY_REGEX: RegExp;
|
|
20
|
-
SLUG_REGEX: RegExp;
|
|
21
|
-
SLUG_REPLACE_REGEX: RegExp;
|
|
22
|
-
};
|
|
23
|
-
declare const DEFAULT_PERMISSIONS: {
|
|
24
|
-
list: boolean;
|
|
25
|
-
add: boolean;
|
|
26
|
-
delete: boolean;
|
|
27
|
-
partialUpdate: boolean;
|
|
28
|
-
update: boolean;
|
|
29
|
-
};
|
|
30
|
-
declare const TRANSLATION_PAIRS_COMMON: {
|
|
31
|
-
confirmationRequired: string;
|
|
32
|
-
permanentlyDelete: string;
|
|
33
|
-
lossOfData: string;
|
|
34
|
-
pleaseType: string;
|
|
35
|
-
toProceedOrCancel: string;
|
|
36
|
-
confirm: string;
|
|
37
|
-
next: string;
|
|
38
|
-
previous: string;
|
|
39
|
-
page: string;
|
|
40
|
-
indicatesRequired: string;
|
|
41
|
-
cancel: string;
|
|
42
|
-
yes: string;
|
|
43
|
-
delete: string;
|
|
44
|
-
create: string;
|
|
45
|
-
update: string;
|
|
46
|
-
showing: string;
|
|
47
|
-
add: string;
|
|
48
|
-
of: string;
|
|
49
|
-
typeHerePlaceholder: string;
|
|
50
|
-
code: string;
|
|
51
|
-
codePlaceholder: string;
|
|
52
|
-
codeRequired: string;
|
|
53
|
-
name: string;
|
|
54
|
-
namePlaceholder: string;
|
|
55
|
-
nameRequired: string;
|
|
56
|
-
title: string;
|
|
57
|
-
titlePlaceholder: string;
|
|
58
|
-
titleRequired: string;
|
|
59
|
-
active: string;
|
|
60
|
-
actions: string;
|
|
61
|
-
};
|
|
62
|
-
declare const TRANSLATION_PAIRS_WIDGET: {
|
|
63
|
-
itemsType: string;
|
|
64
|
-
itemsTypePlaceholder: string;
|
|
65
|
-
widgetType: string;
|
|
66
|
-
widgetTypeRequired: string;
|
|
67
|
-
color: string;
|
|
68
|
-
webPerRow: string;
|
|
69
|
-
webPerRowPlaceholder: string;
|
|
70
|
-
mobilePerRow: string;
|
|
71
|
-
mobilePerRowPlaceholder: string;
|
|
72
|
-
tabletPerRow: string;
|
|
73
|
-
tabletPerRowPlaceholder: string;
|
|
74
|
-
mobileItems: string;
|
|
75
|
-
webItems: string;
|
|
76
|
-
searchPlaceholder: string;
|
|
77
|
-
autoPlay: string;
|
|
78
|
-
addWidgetTitle: string;
|
|
79
|
-
updateWidgetTitle: string;
|
|
80
|
-
webPerRowRequired: string;
|
|
81
|
-
tabletPerRowRequired: string;
|
|
82
|
-
mobilePerRowRequired: string;
|
|
83
|
-
tabDeleteTitle: string;
|
|
84
|
-
widgetTitleInfo: string;
|
|
85
|
-
minPerRow: string;
|
|
86
|
-
tabNameRequired: string;
|
|
87
|
-
subtitle: string;
|
|
88
|
-
subTitlePlaceholder: string;
|
|
89
|
-
altText: string;
|
|
90
|
-
altTextPlaceholder: string;
|
|
91
|
-
link: string;
|
|
92
|
-
linkPlaceholder: string;
|
|
93
|
-
image: string;
|
|
94
|
-
uploadFile: string;
|
|
95
|
-
dragDrop: string;
|
|
96
|
-
allowedFormat: string;
|
|
97
|
-
srcset: string;
|
|
98
|
-
screenSizeRequired: string;
|
|
99
|
-
widthRequired: string;
|
|
100
|
-
heightRequired: string;
|
|
101
|
-
minScreenSize: string;
|
|
102
|
-
minWidth: string;
|
|
103
|
-
minHeight: string;
|
|
104
|
-
deleteTitle: string;
|
|
105
|
-
htmlContent: string;
|
|
106
|
-
htmlContentPlaceholder: string;
|
|
107
|
-
htmlContentRequired: string;
|
|
108
|
-
textContent: string;
|
|
109
|
-
textContentRequired: string;
|
|
110
|
-
textContentInfo: string;
|
|
111
|
-
textContentPlaceholder: string;
|
|
112
|
-
};
|
|
113
|
-
declare const TRANSLATION_PAIRS_PAGE: {
|
|
114
|
-
widgets: string;
|
|
115
|
-
slug: string;
|
|
116
|
-
slugPlaceholder: string;
|
|
117
|
-
slugRequired: string;
|
|
118
|
-
addPage: string;
|
|
119
|
-
updatePage: string;
|
|
120
|
-
searchPages: string;
|
|
121
|
-
};
|
|
122
|
-
export { CONSTANTS, 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_PAGE, };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PageContextType } from '../types';
|
|
3
|
-
interface PageContextProviderProps extends React.PropsWithChildren, Partial<PageContextType> {
|
|
4
|
-
}
|
|
5
|
-
declare const PageContextProvider: ({ searchText, changeSearch, list, widgets, formState, closeForm, getPages, loading, getWidgets, onChangeFormState, onPageFormSubmit, canAdd, canUpdate, selectedWidgets, setSelectedWidgets, onChangeWidgetSequence, currentPage, limits, pageSize, setCurrentPage, setPageSize, totalPages, totalRecords, canList, columns, data, canDelete, loader, pageTranslations, children, }: PageContextProviderProps) => JSX.Element;
|
|
6
|
-
export declare function usePageState(): PageContextType;
|
|
7
|
-
export default PageContextProvider;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ProviderContextProviderProps, ProviderContextType } from '../types';
|
|
3
|
-
declare const Provider: ({ children, baseUrl, token, translations, onError, onSuccess, onLogout, switchClass, widgetRoutesPrefix, pageRoutesPrefix, }: ProviderContextProviderProps) => JSX.Element;
|
|
4
|
-
export declare function useProviderState(): ProviderContextType;
|
|
5
|
-
export default Provider;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { WidgetContextType } from '../types';
|
|
3
|
-
interface WidgetContextProviderProps extends React.PropsWithChildren, Partial<WidgetContextType> {
|
|
4
|
-
}
|
|
5
|
-
declare const WidgetContextProvider: ({ list, languages, imageBaseUrl, searchText, changeSearch, 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, reactSelectStyles, imageMaxSize, widgetTranslations, children, }: WidgetContextProviderProps) => JSX.Element;
|
|
6
|
-
export declare function useWidgetState(): WidgetContextType;
|
|
7
|
-
export default WidgetContextProvider;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const paginationDataGatter: (data: any) => any;
|
|
2
|
-
export declare const dataGatter: (data: any) => any;
|
|
3
|
-
export declare const capitalizeFirstLetter: (string?: string) => string;
|
|
4
|
-
export declare const changeToCode: (string?: string) => string;
|
|
5
|
-
export declare const changeToSlug: (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 const build_path: (...args: string[]) => string;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FormActionTypes, ObjectType, Routes_Input } from '../types';
|
|
3
|
-
interface UsePageProps {
|
|
4
|
-
canList?: boolean;
|
|
5
|
-
defaultLimit: number;
|
|
6
|
-
routes?: Routes_Input;
|
|
7
|
-
preConfirmDelete?: (data: {
|
|
8
|
-
row: ObjectType;
|
|
9
|
-
}) => Promise<boolean>;
|
|
10
|
-
}
|
|
11
|
-
declare const usePage: ({ routes, defaultLimit, canList, preConfirmDelete, }: UsePageProps) => {
|
|
12
|
-
list: ObjectType[];
|
|
13
|
-
getPages: (search?: string) => Promise<void>;
|
|
14
|
-
loading: boolean;
|
|
15
|
-
setLoading: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
16
|
-
searchText: string;
|
|
17
|
-
changeSearch: (value: string) => void;
|
|
18
|
-
pageSize: number;
|
|
19
|
-
totalPages: number;
|
|
20
|
-
currentPage: number;
|
|
21
|
-
totalRecords: number;
|
|
22
|
-
setCurrentPage: (page: number) => void;
|
|
23
|
-
setPageSize: (value: number) => void;
|
|
24
|
-
widgets: ObjectType[];
|
|
25
|
-
itemData: any;
|
|
26
|
-
formState: FormActionTypes | undefined;
|
|
27
|
-
getWidgets: (search?: string, collectionItems?: string[], callback?: ((data: any) => void) | undefined) => Promise<void>;
|
|
28
|
-
onCloseForm: () => void;
|
|
29
|
-
widgetsLoading: boolean;
|
|
30
|
-
selectedWidgets: {
|
|
31
|
-
label: string;
|
|
32
|
-
value: string;
|
|
33
|
-
}[];
|
|
34
|
-
setSelectedWidgets: import("react").Dispatch<import("react").SetStateAction<{
|
|
35
|
-
label: string;
|
|
36
|
-
value: string;
|
|
37
|
-
}[]>>;
|
|
38
|
-
onPageFormSubmit: (data: ObjectType) => Promise<void>;
|
|
39
|
-
onChangeFormState: (state: FormActionTypes, data?: any) => void;
|
|
40
|
-
onCofirmDeletePage: () => Promise<void>;
|
|
41
|
-
onChangeWidgetSequence: (sourceIndex: number, destinationIndex: number) => void;
|
|
42
|
-
};
|
|
43
|
-
export default usePage;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface UsePaginationProps {
|
|
3
|
-
defaultLimit?: number;
|
|
4
|
-
}
|
|
5
|
-
declare const usePagination: ({ defaultLimit }: UsePaginationProps) => {
|
|
6
|
-
pageSize: number;
|
|
7
|
-
currentPageRef: import("react").MutableRefObject<number>;
|
|
8
|
-
limitRef: import("react").MutableRefObject<number>;
|
|
9
|
-
offsetRef: import("react").MutableRefObject<number>;
|
|
10
|
-
searchRef: import("react").MutableRefObject<string>;
|
|
11
|
-
setPageSize: (value: number) => void;
|
|
12
|
-
changeSearch: (value: string) => void;
|
|
13
|
-
setCurrentPage: (value: number) => void;
|
|
14
|
-
};
|
|
15
|
-
export default usePagination;
|