@knovator/pagecreator-admin 1.2.9 → 1.3.1
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.cjs +7878 -0
- package/index.css +2 -0
- package/index.js +7864 -0
- package/package.json +42 -38
- package/src/{index.ts → index.d.ts} +0 -1
- package/src/lib/api/index.d.ts +10 -0
- package/src/lib/api/list.d.ts +56 -0
- package/src/lib/components/Page/AddButton/AddButton.d.ts +3 -0
- package/src/lib/components/Page/AddButton/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/Page/Form/PageForm.d.ts +4 -0
- package/src/lib/components/Page/Form/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/Page/Page/Page.d.ts +13 -0
- package/src/lib/components/Page/Page/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/Page/PageFormActions/PageFormActions.d.ts +4 -0
- package/src/lib/components/Page/PageFormActions/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/Page/PageFormWrapper/PageFormWrapper.d.ts +4 -0
- package/src/lib/components/Page/PageFormWrapper/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/Page/Pagination/PagePagination.d.ts +3 -0
- package/src/lib/components/Page/Pagination/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/Page/Search/PageSearch.d.ts +3 -0
- package/src/lib/components/Page/Search/{index.tsx → index.d.ts} +0 -1
- package/src/lib/components/Page/Table/PageTable.d.ts +4 -0
- package/src/lib/components/Page/Table/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/Page/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/Widget/AddButton/AddButton.d.ts +3 -0
- package/src/lib/components/Widget/AddButton/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/Widget/Form/ItemsAccordian.d.ts +4 -0
- package/src/lib/components/Widget/Form/Tabs/TabItem.d.ts +4 -0
- package/src/lib/components/Widget/Form/Tabs/Tabs.d.ts +4 -0
- package/src/lib/components/Widget/Form/Tabs/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/Widget/Form/WidgetForm.d.ts +4 -0
- package/src/lib/components/Widget/Form/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/Widget/Pagination/WidgetPagination.d.ts +3 -0
- package/src/lib/components/Widget/Pagination/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/Widget/Search/WidgetSearch.d.ts +3 -0
- package/src/lib/components/Widget/Search/{index.tsx → index.d.ts} +0 -1
- package/src/lib/components/Widget/Table/WidgetTable.d.ts +4 -0
- package/src/lib/components/Widget/Table/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/Widget/Widget/Widget.d.ts +13 -0
- package/src/lib/components/Widget/Widget/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/Widget/WidgetFormActions/WidgetFormActions.d.ts +4 -0
- package/src/lib/components/Widget/WidgetFormActions/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/Widget/WidgetFormWrapper/WidgetFormWrapper.d.ts +4 -0
- package/src/lib/components/Widget/WidgetFormWrapper/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/Widget/{index.tsx → index.d.ts} +0 -1
- package/src/lib/components/common/Accordian/Accordian.d.ts +13 -0
- package/src/lib/components/common/Accordian/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/common/Button/Button.d.ts +4 -0
- package/src/lib/components/common/Button/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/common/ConfirmPopover/ConfirmPopover.d.ts +4 -0
- package/src/lib/components/common/ConfirmPopover/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/common/DNDItemsList/DNDItemsList.d.ts +4 -0
- package/src/lib/components/common/DNDItemsList/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/common/DeleteModal/DeleteModal.d.ts +4 -0
- package/src/lib/components/common/DeleteModal/index.d.ts +2 -0
- package/src/lib/components/common/Drawer/Drawer.d.ts +9 -0
- package/src/lib/components/common/Drawer/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/common/Form/Form.d.ts +15 -0
- package/src/lib/components/common/Form/SimpleForm.d.ts +18 -0
- package/src/lib/components/common/Form/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/common/FormActions/FormActions.d.ts +10 -0
- package/src/lib/components/common/FormActions/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/common/ImageUpload/ImageUpload.d.ts +4 -0
- package/src/lib/components/common/ImageUpload/index.d.ts +2 -0
- package/src/lib/components/common/Input/Checkbox.d.ts +4 -0
- package/src/lib/components/common/Input/Input.d.ts +4 -0
- package/src/lib/components/common/Input/ReactSelect.d.ts +4 -0
- package/src/lib/components/common/Input/Select.d.ts +4 -0
- package/src/lib/components/common/Input/SrcSet.d.ts +4 -0
- package/src/lib/components/common/Input/index.d.ts +12 -0
- package/src/lib/components/common/Modal/Modal.d.ts +8 -0
- package/src/lib/components/common/Modal/index.d.ts +2 -0
- package/src/lib/components/common/Pagination/Pagination.d.ts +4 -0
- package/src/lib/components/common/Pagination/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/common/Table/Table.d.ts +4 -0
- package/src/lib/components/common/Table/{index.ts → index.d.ts} +0 -1
- package/src/lib/components/common/Toggle/Toggle.d.ts +4 -0
- package/src/lib/components/common/Toggle/{index.ts → index.d.ts} +0 -1
- package/src/lib/constants/common.d.ts +122 -0
- package/src/lib/context/PageContext.d.ts +7 -0
- package/src/lib/context/ProviderContext.d.ts +5 -0
- package/src/lib/context/WidgetContext.d.ts +7 -0
- package/src/lib/helper/utils.d.ts +10 -0
- package/src/lib/hooks/usePage.d.ts +37 -0
- package/src/lib/hooks/usePagination.d.ts +15 -0
- package/src/lib/hooks/useWidget.d.ts +46 -0
- package/src/lib/icons/chevronDown.d.ts +4 -0
- package/src/lib/icons/chevronLeft.d.ts +4 -0
- package/src/lib/icons/chevronRight.d.ts +4 -0
- package/src/lib/icons/chevronUp.d.ts +4 -0
- package/src/lib/icons/close.d.ts +4 -0
- package/src/lib/icons/pencil.d.ts +4 -0
- package/src/lib/icons/plus.d.ts +4 -0
- package/src/lib/icons/settings.d.ts +4 -0
- package/src/lib/icons/trash.d.ts +4 -0
- package/src/lib/types/api.d.ts +34 -0
- package/src/lib/types/common.d.ts +30 -0
- package/src/lib/types/components.d.ts +422 -0
- package/src/lib/types/context.d.ts +135 -0
- package/index.d.ts +0 -1
- package/src/lib/api/index.ts +0 -70
- package/src/lib/api/list.ts +0 -59
- package/src/lib/components/Page/AddButton/AddButton.tsx +0 -16
- package/src/lib/components/Page/Form/PageForm.tsx +0 -194
- package/src/lib/components/Page/Page/Page.tsx +0 -151
- package/src/lib/components/Page/PageFormActions/PageFormActions.tsx +0 -50
- package/src/lib/components/Page/PageFormWrapper/PageFormWrapper.tsx +0 -16
- package/src/lib/components/Page/Pagination/PagePagination.tsx +0 -26
- package/src/lib/components/Page/Search/PageSearch.tsx +0 -32
- package/src/lib/components/Page/Table/PageTable.tsx +0 -36
- package/src/lib/components/Widget/AddButton/AddButton.tsx +0 -16
- package/src/lib/components/Widget/Form/ItemsAccordian.tsx +0 -354
- package/src/lib/components/Widget/Form/Tabs/TabItem.tsx +0 -43
- package/src/lib/components/Widget/Form/Tabs/Tabs.tsx +0 -190
- package/src/lib/components/Widget/Form/WidgetForm.tsx +0 -771
- package/src/lib/components/Widget/Pagination/WidgetPagination.tsx +0 -26
- package/src/lib/components/Widget/Search/WidgetSearch.tsx +0 -32
- package/src/lib/components/Widget/Table/WidgetTable.tsx +0 -70
- package/src/lib/components/Widget/Widget/Widget.tsx +0 -173
- package/src/lib/components/Widget/WidgetFormActions/WidgetFormActions.tsx +0 -50
- package/src/lib/components/Widget/WidgetFormWrapper/WidgetFormWrapper.tsx +0 -16
- package/src/lib/components/common/Accordian/Accordian.tsx +0 -56
- package/src/lib/components/common/Button/Button.tsx +0 -45
- package/src/lib/components/common/ConfirmPopover/ConfirmPopover.tsx +0 -47
- package/src/lib/components/common/DNDItemsList/DNDItemsList.tsx +0 -77
- package/src/lib/components/common/DeleteModal/DeleteModal.tsx +0 -72
- package/src/lib/components/common/DeleteModal/index.tsx +0 -3
- package/src/lib/components/common/Drawer/Drawer.tsx +0 -79
- package/src/lib/components/common/Form/Form.tsx +0 -256
- package/src/lib/components/common/Form/SimpleForm.tsx +0 -314
- package/src/lib/components/common/FormActions/FormActions.tsx +0 -37
- package/src/lib/components/common/ImageUpload/ImageUpload.tsx +0 -113
- package/src/lib/components/common/ImageUpload/index.tsx +0 -3
- package/src/lib/components/common/Input/Checkbox.tsx +0 -25
- package/src/lib/components/common/Input/Input.tsx +0 -51
- package/src/lib/components/common/Input/ReactSelect.tsx +0 -61
- package/src/lib/components/common/Input/Select.tsx +0 -47
- package/src/lib/components/common/Input/SrcSet.tsx +0 -143
- package/src/lib/components/common/Input/index.ts +0 -20
- package/src/lib/components/common/Modal/Modal.tsx +0 -57
- package/src/lib/components/common/Modal/index.tsx +0 -3
- package/src/lib/components/common/Pagination/Pagination.tsx +0 -88
- package/src/lib/components/common/Table/Table.tsx +0 -133
- package/src/lib/components/common/Toggle/Toggle.tsx +0 -23
- package/src/lib/constants/common.ts +0 -145
- package/src/lib/context/PageContext.tsx +0 -100
- package/src/lib/context/ProviderContext.tsx +0 -52
- package/src/lib/context/WidgetContext.tsx +0 -127
- package/src/lib/helper/utils.ts +0 -46
- package/src/lib/hooks/usePage.tsx +0 -306
- package/src/lib/hooks/usePagination.tsx +0 -41
- package/src/lib/hooks/useWidget.tsx +0 -503
- package/src/lib/icons/chevronDown.tsx +0 -21
- package/src/lib/icons/chevronLeft.tsx +0 -20
- package/src/lib/icons/chevronRight.tsx +0 -20
- package/src/lib/icons/chevronUp.tsx +0 -21
- package/src/lib/icons/close.tsx +0 -21
- package/src/lib/icons/pencil.tsx +0 -21
- package/src/lib/icons/plus.tsx +0 -23
- package/src/lib/icons/settings.tsx +0 -35
- package/src/lib/icons/trash.tsx +0 -21
- package/src/lib/types/api.ts +0 -44
- package/src/lib/types/common.ts +0 -31
- package/src/lib/types/components.ts +0 -428
- package/src/lib/types/context.ts +0 -184
- package/src/styles/index.css +0 -481
- /package/src/lib/types/{index.ts → index.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,38 +1,42 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@knovator/pagecreator-admin",
|
|
3
|
-
"version":"1.
|
|
4
|
-
"dependencies": {
|
|
5
|
-
"classnames": "^2.3.1",
|
|
6
|
-
"react-beautiful-dnd": "^13.1.0",
|
|
7
|
-
"react-transition-group": "^4.4.5",
|
|
8
|
-
"react-hook-form": "^7.34.2",
|
|
9
|
-
"react-dropzone": "^14.2.2",
|
|
10
|
-
"react-select": "^5.4.0",
|
|
11
|
-
"react-tabs": "^6.0.0",
|
|
12
|
-
"react-tiny-popover": "^7.2.0"
|
|
13
|
-
},
|
|
14
|
-
"peerDependencies": {
|
|
15
|
-
"react": "^18 | ^17",
|
|
16
|
-
"@knovator/api": "^0.0.10"
|
|
17
|
-
},
|
|
18
|
-
"repository": {
|
|
19
|
-
"type": "git",
|
|
20
|
-
"url": "git@github.com:knovator/pagecreator.git"
|
|
21
|
-
},
|
|
22
|
-
"keywords": [
|
|
23
|
-
"pagecreator",
|
|
24
|
-
"pagebuilder",
|
|
25
|
-
"knovator",
|
|
26
|
-
"chavda-bhavik"
|
|
27
|
-
],
|
|
28
|
-
"author": "knovator (https://knovator.com/)",
|
|
29
|
-
"files": [
|
|
30
|
-
"src",
|
|
31
|
-
"package.json",
|
|
32
|
-
"README.md",
|
|
33
|
-
"index.css",
|
|
34
|
-
"index.d.ts",
|
|
35
|
-
"index.js",
|
|
36
|
-
"index.cjs"
|
|
37
|
-
]
|
|
38
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@knovator/pagecreator-admin",
|
|
3
|
+
"version": "1.3.1",
|
|
4
|
+
"dependencies": {
|
|
5
|
+
"classnames": "^2.3.1",
|
|
6
|
+
"react-beautiful-dnd": "^13.1.0",
|
|
7
|
+
"react-transition-group": "^4.4.5",
|
|
8
|
+
"react-hook-form": "^7.34.2",
|
|
9
|
+
"react-dropzone": "^14.2.2",
|
|
10
|
+
"react-select": "^5.4.0",
|
|
11
|
+
"react-tabs": "^6.0.0",
|
|
12
|
+
"react-tiny-popover": "^7.2.0"
|
|
13
|
+
},
|
|
14
|
+
"peerDependencies": {
|
|
15
|
+
"react": "^18 | ^17",
|
|
16
|
+
"@knovator/api": "^0.0.10"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git@github.com:knovator/pagecreator.git"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"pagecreator",
|
|
24
|
+
"pagebuilder",
|
|
25
|
+
"knovator",
|
|
26
|
+
"chavda-bhavik"
|
|
27
|
+
],
|
|
28
|
+
"author": "knovator (https://knovator.com/)",
|
|
29
|
+
"files": [
|
|
30
|
+
"src",
|
|
31
|
+
"package.json",
|
|
32
|
+
"README.md",
|
|
33
|
+
"index.css",
|
|
34
|
+
"index.d.ts",
|
|
35
|
+
"index.js",
|
|
36
|
+
"index.cjs"
|
|
37
|
+
],
|
|
38
|
+
"module": "./index.js",
|
|
39
|
+
"main": "./index.cjs",
|
|
40
|
+
"type": "module",
|
|
41
|
+
"types": "./src\\index.d.ts"
|
|
42
|
+
}
|
|
@@ -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,56 @@
|
|
|
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;
|
|
@@ -0,0 +1,13 @@
|
|
|
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;
|
|
@@ -0,0 +1,4 @@
|
|
|
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;
|
|
@@ -0,0 +1,4 @@
|
|
|
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;
|
|
@@ -0,0 +1,13 @@
|
|
|
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;
|
|
@@ -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, confirmationRequired, permanentlyDelete, lossOfData, pleaseType, toProceedOrCancel, confirm, typeHerePlaceholder, }: 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,18 @@
|
|
|
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;
|
|
@@ -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, clearError, 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, info, 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, className, isMulti, selectedOptions, required, isLoading, isSearchable, loadOptions, placeholder, wrapperClassName, formatOptionLabel, listCode, customStyles, selectKey, }: ReactSelectProps) => JSX.Element;
|
|
4
|
+
export default CustomReactSelect;
|
|
@@ -0,0 +1,4 @@
|
|
|
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;
|
|
@@ -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, 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;
|
|
@@ -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, previousContent, nextContent, }: PaginationProps) => JSX.Element;
|
|
4
|
+
export default Pagination;
|