@akanjs/ui 0.0.150 → 0.0.151
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/BottomSheet.d.ts +13 -0
- package/Button.d.ts +9 -0
- package/ClientSide.d.ts +6 -0
- package/Copy.d.ts +6 -0
- package/CsrImage.d.ts +11 -0
- package/Data/CardList.d.ts +36 -0
- package/Data/Dashboard.d.ts +15 -0
- package/Data/Insight.d.ts +8 -0
- package/Data/Item.d.ts +74 -0
- package/Data/ListContainer.d.ts +38 -0
- package/Data/Pagination.d.ts +6 -0
- package/Data/QueryMaker.d.ts +9 -0
- package/Data/TableList.d.ts +26 -0
- package/Data/index.d.ts +10 -0
- package/Data/index_.d.ts +8 -0
- package/DatePicker.d.ts +38 -0
- package/Dialog/Action.d.ts +5 -0
- package/Dialog/Close.d.ts +5 -0
- package/Dialog/Content.d.ts +6 -0
- package/Dialog/Modal.d.ts +8 -0
- package/Dialog/Provider.d.ts +7 -0
- package/Dialog/Title.d.ts +5 -0
- package/Dialog/Trigger.d.ts +5 -0
- package/Dialog/context.d.ts +10 -0
- package/Dialog/index.d.ts +9 -0
- package/DragAction.d.ts +24 -0
- package/DraggableList.d.ts +25 -0
- package/Dropdown.d.ts +10 -0
- package/Empty.d.ts +9 -0
- package/Field.d.ts +404 -0
- package/FontFace.d.ts +6 -0
- package/Image.d.ts +17 -0
- package/InfiniteScroll.d.ts +10 -0
- package/Input.d.ts +85 -0
- package/KeyboardAvoiding.d.ts +7 -0
- package/Layout/BottomAction.d.ts +5 -0
- package/Layout/BottomInset.d.ts +6 -0
- package/Layout/BottomTab.d.ts +14 -0
- package/Layout/Header.d.ts +7 -0
- package/Layout/LeftSider.d.ts +8 -0
- package/Layout/Navbar.d.ts +11 -0
- package/Layout/RightSider.d.ts +9 -0
- package/Layout/Sider.d.ts +6 -0
- package/Layout/Template.d.ts +5 -0
- package/Layout/TopLeftAction.d.ts +5 -0
- package/Layout/Unit.d.ts +6 -0
- package/Layout/View.d.ts +5 -0
- package/Layout/Zone.d.ts +5 -0
- package/Layout/index.d.ts +14 -0
- package/Link/Back.d.ts +6 -0
- package/Link/Close.d.ts +6 -0
- package/Link/CsrLink.d.ts +2 -0
- package/Link/NextLink.d.ts +2 -0
- package/Link/index.d.ts +8 -0
- package/Link/types.d.ts +22 -0
- package/Load/Edit.d.ts +4 -0
- package/Load/Edit_Client.d.ts +25 -0
- package/Load/Page.d.ts +10 -0
- package/Load/PageCSR.d.ts +11 -0
- package/Load/Pagination.d.ts +8 -0
- package/Load/Units.d.ts +34 -0
- package/Load/View.d.ts +17 -0
- package/Load/index.d.ts +8 -0
- package/Load/index_.d.ts +3 -0
- package/Loading/Area.d.ts +1 -0
- package/Loading/Button.d.ts +7 -0
- package/Loading/Input.d.ts +7 -0
- package/Loading/ProgressBar.d.ts +6 -0
- package/Loading/Skeleton.d.ts +7 -0
- package/Loading/Spin.d.ts +7 -0
- package/Loading/index.d.ts +8 -0
- package/Menu.d.ts +26 -0
- package/Modal.d.ts +23 -0
- package/Model/Edit.d.ts +15 -0
- package/Model/EditModal.d.ts +33 -0
- package/Model/EditWrapper.d.ts +11 -0
- package/Model/LoadInit.d.ts +10 -0
- package/Model/New.d.ts +15 -0
- package/Model/NewWrapper.d.ts +12 -0
- package/Model/NewWrapper_Client.d.ts +12 -0
- package/Model/Remove.d.ts +10 -0
- package/Model/RemoveWrapper.d.ts +11 -0
- package/Model/SureToRemove.d.ts +10 -0
- package/Model/View.d.ts +19 -0
- package/Model/ViewEditModal.d.ts +11 -0
- package/Model/ViewModal.d.ts +13 -0
- package/Model/ViewWrapper.d.ts +11 -0
- package/Model/index.d.ts +15 -0
- package/Model/index_.d.ts +13 -0
- package/More.d.ts +12 -0
- package/ObjectId.d.ts +5 -0
- package/Pagination.d.ts +14 -0
- package/Popconfirm.d.ts +18 -0
- package/Portal.d.ts +6 -0
- package/Radio.d.ts +19 -0
- package/RecentTime.d.ts +7 -0
- package/Refresh.d.ts +7 -0
- package/ScreenNavigator.d.ts +18 -0
- package/Select.d.ts +29 -0
- package/Signal/Arg.d.ts +75 -0
- package/Signal/Doc.d.ts +19 -0
- package/Signal/GraphQL.d.ts +32 -0
- package/Signal/Listener.d.ts +9 -0
- package/Signal/Message.d.ts +27 -0
- package/Signal/Object.d.ts +19 -0
- package/Signal/PubSub.d.ts +26 -0
- package/Signal/Request.d.ts +8 -0
- package/Signal/Response.d.ts +16 -0
- package/Signal/RestApi.d.ts +40 -0
- package/Signal/WebSocket.d.ts +9 -0
- package/Signal/index.d.ts +20 -0
- package/System/CSR.d.ts +31 -0
- package/System/Client.d.ts +48 -0
- package/System/Common.d.ts +66 -0
- package/System/DevModeToggle.d.ts +1 -0
- package/System/Gtag.d.ts +3 -0
- package/System/HealthCheck.d.ts +5 -0
- package/System/Messages.d.ts +1 -0
- package/System/Reconnect.d.ts +6 -0
- package/System/Root.d.ts +5 -0
- package/System/SSR.d.ts +26 -0
- package/System/SelectLanguage.d.ts +5 -0
- package/System/ThemeToggle.d.ts +1 -0
- package/System/index.d.ts +11 -0
- package/Tab/Menu.d.ts +11 -0
- package/Tab/Menus.d.ts +5 -0
- package/Tab/Panel.d.ts +7 -0
- package/Tab/Provider.d.ts +6 -0
- package/Tab/context.d.ts +9 -0
- package/Tab/index.d.ts +7 -0
- package/Table.d.ts +26 -0
- package/ToggleSelect.d.ts +31 -0
- package/Unauthorized.d.ts +9 -0
- package/cjs/BottomSheet.js +113 -0
- package/cjs/Button.js +69 -0
- package/cjs/ClientSide.js +26 -0
- package/cjs/Copy.js +37 -0
- package/cjs/CsrImage.js +50 -0
- package/cjs/Data/CardList.js +119 -0
- package/cjs/Data/Dashboard.js +54 -0
- package/cjs/Data/Insight.js +38 -0
- package/cjs/Data/Item.js +204 -0
- package/cjs/Data/ListContainer.js +251 -0
- package/cjs/Data/Pagination.js +64 -0
- package/cjs/Data/QueryMaker.js +304 -0
- package/cjs/Data/TableList.js +139 -0
- package/cjs/Data/index.js +33 -0
- package/cjs/Data/index_.js +49 -0
- package/cjs/DatePicker.js +173 -0
- package/cjs/Dialog/Action.js +32 -0
- package/cjs/Dialog/Close.js +38 -0
- package/cjs/Dialog/Content.js +27 -0
- package/cjs/Dialog/Modal.js +155 -0
- package/cjs/Dialog/Provider.js +46 -0
- package/cjs/Dialog/Title.js +32 -0
- package/cjs/Dialog/Trigger.js +38 -0
- package/cjs/Dialog/context.js +32 -0
- package/cjs/Dialog/index.js +36 -0
- package/cjs/DragAction.js +111 -0
- package/cjs/DraggableList.js +141 -0
- package/cjs/Dropdown.js +64 -0
- package/cjs/Empty.js +50 -0
- package/cjs/Field.js +1109 -0
- package/cjs/FontFace.js +77 -0
- package/cjs/Image.js +61 -0
- package/cjs/InfiniteScroll.js +65 -0
- package/cjs/Input.js +440 -0
- package/cjs/KeyboardAvoiding.js +65 -0
- package/cjs/Layout/BottomAction.js +26 -0
- package/cjs/Layout/BottomInset.js +53 -0
- package/cjs/Layout/BottomTab.js +56 -0
- package/cjs/Layout/Header.js +52 -0
- package/cjs/Layout/LeftSider.js +49 -0
- package/cjs/Layout/Navbar.js +51 -0
- package/cjs/Layout/RightSider.js +52 -0
- package/cjs/Layout/Sider.js +39 -0
- package/cjs/Layout/Template.js +26 -0
- package/cjs/Layout/TopLeftAction.js +39 -0
- package/cjs/Layout/Unit.js +27 -0
- package/cjs/Layout/View.js +26 -0
- package/cjs/Layout/Zone.js +26 -0
- package/cjs/Layout/index.js +48 -0
- package/cjs/Link/Back.js +27 -0
- package/cjs/Link/Close.js +36 -0
- package/cjs/Link/CsrLink.js +49 -0
- package/cjs/Link/NextLink.js +71 -0
- package/cjs/Link/index.js +47 -0
- package/cjs/Link/types.js +15 -0
- package/cjs/Load/Edit.js +42 -0
- package/cjs/Load/Edit_Client.js +93 -0
- package/cjs/Load/Page.js +35 -0
- package/cjs/Load/PageCSR.js +67 -0
- package/cjs/Load/Pagination.js +89 -0
- package/cjs/Load/Units.js +232 -0
- package/cjs/Load/View.js +88 -0
- package/cjs/Load/index.js +42 -0
- package/cjs/Load/index_.js +39 -0
- package/cjs/Loading/Area.js +25 -0
- package/cjs/Loading/Button.js +33 -0
- package/cjs/Loading/Input.js +33 -0
- package/cjs/Loading/ProgressBar.js +29 -0
- package/cjs/Loading/Skeleton.js +27 -0
- package/cjs/Loading/Spin.js +27 -0
- package/cjs/Loading/index.js +29 -0
- package/cjs/Menu.js +215 -0
- package/cjs/Modal.js +75 -0
- package/cjs/Model/Edit.js +61 -0
- package/cjs/Model/EditModal.js +255 -0
- package/cjs/Model/EditWrapper.js +48 -0
- package/cjs/Model/LoadInit.js +27 -0
- package/cjs/Model/New.js +61 -0
- package/cjs/Model/NewWrapper.js +28 -0
- package/cjs/Model/NewWrapper_Client.js +66 -0
- package/cjs/Model/Remove.js +86 -0
- package/cjs/Model/RemoveWrapper.js +48 -0
- package/cjs/Model/SureToRemove.js +109 -0
- package/cjs/Model/View.js +44 -0
- package/cjs/Model/ViewEditModal.js +118 -0
- package/cjs/Model/ViewModal.js +92 -0
- package/cjs/Model/ViewWrapper.js +48 -0
- package/cjs/Model/index.js +38 -0
- package/cjs/Model/index_.js +58 -0
- package/cjs/More.js +67 -0
- package/cjs/ObjectId.js +37 -0
- package/cjs/Pagination.js +110 -0
- package/cjs/Popconfirm.js +116 -0
- package/cjs/Portal.js +27 -0
- package/cjs/Radio.js +53 -0
- package/cjs/RecentTime.js +86 -0
- package/cjs/Refresh.js +45 -0
- package/cjs/ScreenNavigator.js +121 -0
- package/cjs/Select.js +262 -0
- package/cjs/Signal/Arg.js +237 -0
- package/cjs/Signal/Doc.js +181 -0
- package/cjs/Signal/GraphQL.js +177 -0
- package/cjs/Signal/Listener.js +59 -0
- package/cjs/Signal/Message.js +190 -0
- package/cjs/Signal/Object.js +95 -0
- package/cjs/Signal/PubSub.js +191 -0
- package/cjs/Signal/Request.js +38 -0
- package/cjs/Signal/Response.js +53 -0
- package/cjs/Signal/RestApi.js +255 -0
- package/cjs/Signal/WebSocket.js +68 -0
- package/cjs/Signal/index.js +42 -0
- package/cjs/System/CSR.js +376 -0
- package/cjs/System/Client.js +200 -0
- package/cjs/System/Common.js +64 -0
- package/cjs/System/DevModeToggle.js +38 -0
- package/cjs/System/Gtag.js +67 -0
- package/cjs/System/HealthCheck.js +60 -0
- package/cjs/System/Messages.js +170 -0
- package/cjs/System/Reconnect.js +64 -0
- package/cjs/System/Root.js +30 -0
- package/cjs/System/SSR.js +144 -0
- package/cjs/System/SelectLanguage.js +58 -0
- package/cjs/System/ThemeToggle.js +40 -0
- package/cjs/System/index.js +55 -0
- package/cjs/Tab/Menu.js +70 -0
- package/cjs/{src/index.js → Tab/Menus.js} +8 -5
- package/cjs/Tab/Panel.js +42 -0
- package/cjs/Tab/Provider.js +31 -0
- package/cjs/Tab/context.js +30 -0
- package/cjs/Tab/index.js +32 -0
- package/cjs/Table.js +85 -0
- package/cjs/ToggleSelect.js +118 -0
- package/cjs/Unauthorized.js +50 -0
- package/cjs/index.js +88 -2
- package/esm/BottomSheet.js +84 -0
- package/esm/Button.js +40 -0
- package/esm/ClientSide.js +7 -0
- package/esm/Copy.js +18 -0
- package/esm/CsrImage.js +31 -0
- package/esm/Data/CardList.js +90 -0
- package/esm/Data/Dashboard.js +35 -0
- package/esm/Data/Insight.js +19 -0
- package/esm/Data/Item.js +175 -0
- package/esm/Data/ListContainer.js +228 -0
- package/esm/Data/Pagination.js +45 -0
- package/esm/Data/QueryMaker.js +293 -0
- package/esm/Data/TableList.js +110 -0
- package/esm/Data/index.js +14 -0
- package/esm/Data/index_.js +20 -0
- package/esm/DatePicker.js +144 -0
- package/esm/Dialog/Action.js +13 -0
- package/esm/Dialog/Close.js +19 -0
- package/esm/Dialog/Content.js +8 -0
- package/esm/Dialog/Modal.js +126 -0
- package/esm/Dialog/Provider.js +17 -0
- package/esm/Dialog/Title.js +13 -0
- package/esm/Dialog/Trigger.js +19 -0
- package/esm/Dialog/context.js +13 -0
- package/esm/Dialog/index.js +17 -0
- package/esm/DragAction.js +92 -0
- package/esm/DraggableList.js +112 -0
- package/esm/Dropdown.js +45 -0
- package/esm/Empty.js +21 -0
- package/esm/Field.js +1090 -0
- package/esm/FontFace.js +58 -0
- package/esm/Image.js +32 -0
- package/esm/InfiniteScroll.js +46 -0
- package/esm/Input.js +415 -0
- package/esm/KeyboardAvoiding.js +46 -0
- package/esm/Layout/BottomAction.js +7 -0
- package/esm/Layout/BottomInset.js +34 -0
- package/esm/Layout/BottomTab.js +37 -0
- package/esm/Layout/Header.js +33 -0
- package/esm/Layout/LeftSider.js +30 -0
- package/esm/Layout/Navbar.js +22 -0
- package/esm/Layout/RightSider.js +33 -0
- package/esm/Layout/Sider.js +20 -0
- package/esm/Layout/Template.js +7 -0
- package/esm/Layout/TopLeftAction.js +20 -0
- package/esm/Layout/Unit.js +8 -0
- package/esm/Layout/View.js +7 -0
- package/esm/Layout/Zone.js +7 -0
- package/esm/Layout/index.js +29 -0
- package/esm/Link/Back.js +8 -0
- package/esm/Link/Close.js +17 -0
- package/esm/Link/CsrLink.js +30 -0
- package/esm/Link/NextLink.js +42 -0
- package/esm/Link/index.js +18 -0
- package/esm/Link/types.js +0 -0
- package/esm/Load/Edit.js +13 -0
- package/esm/Load/Edit_Client.js +74 -0
- package/esm/Load/Page.js +16 -0
- package/esm/Load/PageCSR.js +48 -0
- package/esm/Load/Pagination.js +70 -0
- package/esm/Load/Units.js +213 -0
- package/esm/Load/View.js +69 -0
- package/esm/Load/index.js +13 -0
- package/esm/Load/index_.js +10 -0
- package/esm/Loading/Area.js +6 -0
- package/esm/Loading/Button.js +14 -0
- package/esm/Loading/Input.js +14 -0
- package/esm/Loading/ProgressBar.js +10 -0
- package/esm/Loading/Skeleton.js +8 -0
- package/esm/Loading/Spin.js +8 -0
- package/esm/Loading/index.js +10 -0
- package/esm/Menu.js +196 -0
- package/esm/Modal.js +46 -0
- package/esm/Model/Edit.js +32 -0
- package/esm/Model/EditModal.js +226 -0
- package/esm/Model/EditWrapper.js +29 -0
- package/esm/Model/LoadInit.js +8 -0
- package/esm/Model/New.js +32 -0
- package/esm/Model/NewWrapper.js +9 -0
- package/esm/Model/NewWrapper_Client.js +47 -0
- package/esm/Model/Remove.js +67 -0
- package/esm/Model/RemoveWrapper.js +29 -0
- package/esm/Model/SureToRemove.js +90 -0
- package/esm/Model/View.js +25 -0
- package/esm/Model/ViewEditModal.js +89 -0
- package/esm/Model/ViewModal.js +63 -0
- package/esm/Model/ViewWrapper.js +29 -0
- package/esm/Model/index.js +33 -0
- package/esm/Model/index_.js +29 -0
- package/esm/More.js +38 -0
- package/esm/ObjectId.js +18 -0
- package/esm/Pagination.js +91 -0
- package/esm/Popconfirm.js +87 -0
- package/esm/Portal.js +8 -0
- package/esm/Radio.js +34 -0
- package/esm/RecentTime.js +57 -0
- package/esm/Refresh.js +16 -0
- package/esm/ScreenNavigator.js +102 -0
- package/esm/Select.js +243 -0
- package/esm/Signal/Arg.js +208 -0
- package/esm/Signal/Doc.js +152 -0
- package/esm/Signal/GraphQL.js +156 -0
- package/esm/Signal/Listener.js +40 -0
- package/esm/Signal/Message.js +161 -0
- package/esm/Signal/Object.js +76 -0
- package/esm/Signal/PubSub.js +162 -0
- package/esm/Signal/Request.js +19 -0
- package/esm/Signal/Response.js +34 -0
- package/esm/Signal/RestApi.js +234 -0
- package/esm/Signal/WebSocket.js +39 -0
- package/esm/Signal/index.js +13 -0
- package/esm/System/CSR.js +357 -0
- package/esm/System/Client.js +191 -0
- package/esm/System/Common.js +45 -0
- package/esm/System/DevModeToggle.js +19 -0
- package/esm/System/Gtag.js +48 -0
- package/esm/System/HealthCheck.js +41 -0
- package/esm/System/Messages.js +156 -0
- package/esm/System/Reconnect.js +45 -0
- package/esm/System/Root.js +11 -0
- package/esm/System/SSR.js +125 -0
- package/esm/System/SelectLanguage.js +39 -0
- package/esm/System/ThemeToggle.js +21 -0
- package/esm/System/index.js +26 -0
- package/esm/Tab/Menu.js +51 -0
- package/esm/Tab/Menus.js +7 -0
- package/esm/Tab/Panel.js +23 -0
- package/esm/Tab/Provider.js +12 -0
- package/esm/Tab/context.js +11 -0
- package/esm/Tab/index.js +13 -0
- package/esm/Table.js +56 -0
- package/esm/ToggleSelect.js +99 -0
- package/esm/Unauthorized.js +21 -0
- package/esm/index.js +84 -1
- package/index.d.ts +41 -1
- package/package.json +23 -2
- package/esm/src/index.js +0 -4
- package/src/index.d.ts +0 -1
package/BottomSheet.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface BottomSheetProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onCancel: () => void;
|
|
5
|
+
children: any;
|
|
6
|
+
type: "full" | "half";
|
|
7
|
+
}
|
|
8
|
+
export interface BottomSheetRef {
|
|
9
|
+
open: () => void;
|
|
10
|
+
close: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const BottomSheet: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<BottomSheetRef>>;
|
|
13
|
+
export {};
|
package/Button.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { ButtonHTMLAttributes } from "react";
|
|
2
|
+
type ButtonProps<Result> = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onClick"> & {
|
|
3
|
+
onClick: (e: React.MouseEvent<HTMLButtonElement>, { onError }: {
|
|
4
|
+
onError: (error: string) => void;
|
|
5
|
+
}) => Promise<Result> | Result;
|
|
6
|
+
onSuccess?: (result: Result) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const Button: <Result = any>({ className, children, onClick, onSuccess, ...rest }: ButtonProps<Result>) => React.JSX.Element;
|
|
9
|
+
export {};
|
package/ClientSide.d.ts
ADDED
package/Copy.d.ts
ADDED
package/CsrImage.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ProtoFile } from "@akanjs/constant";
|
|
2
|
+
import { ImageProps } from "next/image";
|
|
3
|
+
export declare const CsrImage: ({ src, file, className, abstractData, ...props }: Omit<ImageProps, "alt" | "src"> & {
|
|
4
|
+
src?: string;
|
|
5
|
+
file?: ProtoFile | {
|
|
6
|
+
url: string;
|
|
7
|
+
imageSize: [number, number];
|
|
8
|
+
abstractData?: string | null;
|
|
9
|
+
} | null;
|
|
10
|
+
abstractData?: string;
|
|
11
|
+
}) => import("react").JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { DataAction, DataColumn } from "@akanjs/client";
|
|
2
|
+
import { type FilterType, SortType } from "@akanjs/constant";
|
|
3
|
+
import { type FetchInitForm } from "@akanjs/signal";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
|
+
type DataItemProps<T extends string, M extends {
|
|
6
|
+
id: string;
|
|
7
|
+
}, L extends {
|
|
8
|
+
id: string;
|
|
9
|
+
}> = {
|
|
10
|
+
[key in T]: L;
|
|
11
|
+
} & {
|
|
12
|
+
sliceName: string;
|
|
13
|
+
};
|
|
14
|
+
interface CardListProps<T extends string, Input, Full extends {
|
|
15
|
+
id: string;
|
|
16
|
+
}, Light extends {
|
|
17
|
+
id: string;
|
|
18
|
+
}, Filter extends FilterType> {
|
|
19
|
+
className?: string;
|
|
20
|
+
cardListClassName?: string;
|
|
21
|
+
init?: FetchInitForm<Input, Full, Filter>;
|
|
22
|
+
sliceName: string;
|
|
23
|
+
columns: DataColumn<any>[];
|
|
24
|
+
actions?: DataAction<Light>[] | ((item: Light, idx: number) => DataAction<Light>[]);
|
|
25
|
+
renderItem: (args: DataItemProps<T, Full, Light>) => ReactNode;
|
|
26
|
+
renderLoading?: () => ReactNode;
|
|
27
|
+
renderTemplate?: (props: any) => ReactNode | null;
|
|
28
|
+
renderView?: (model: Full) => ReactNode | null;
|
|
29
|
+
renderTitle?: (model: Full) => string | ReactNode;
|
|
30
|
+
}
|
|
31
|
+
export default function CardList<T extends string, Input, Full extends {
|
|
32
|
+
id: string;
|
|
33
|
+
}, Light extends {
|
|
34
|
+
id: string;
|
|
35
|
+
}, Sort extends SortType>({ className, cardListClassName, init, sliceName, actions, columns, renderItem, renderLoading, renderTemplate, renderView, renderTitle, }: CardListProps<T, Input, Full, Light, Sort>): import("react").JSX.Element;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StoreOf } from "@akanjs/store";
|
|
2
|
+
export interface DashboardProps<T extends string, State, SL extends StoreOf<T, State>> {
|
|
3
|
+
className?: string;
|
|
4
|
+
summary: {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
};
|
|
7
|
+
sliceName: string;
|
|
8
|
+
queryMap: {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
};
|
|
11
|
+
columns?: string[];
|
|
12
|
+
presents?: string[];
|
|
13
|
+
hidePresents?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export default function Dashboard<T extends string, State, SL extends StoreOf<T, State>>({ className, summary, sliceName, queryMap, columns, presents, hidePresents, }: DashboardProps<T, State, SL>): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface InsightProps<T extends string, Insight> {
|
|
2
|
+
className?: string;
|
|
3
|
+
insight: Insight;
|
|
4
|
+
sliceName: T;
|
|
5
|
+
columns?: (keyof Insight)[];
|
|
6
|
+
}
|
|
7
|
+
export default function Insight<T extends string, Insight>({ className, insight, sliceName, columns, }: InsightProps<T, Insight>): import("react").JSX.Element;
|
|
8
|
+
export {};
|
package/Data/Item.d.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Dayjs } from "@akanjs/base";
|
|
2
|
+
import { DataAction, DataColumn } from "@akanjs/client";
|
|
3
|
+
import React, { ReactNode } from "react";
|
|
4
|
+
export declare const convToAntdColumn: (column: DataColumn<any>) => {
|
|
5
|
+
key: string;
|
|
6
|
+
dataIndex: string;
|
|
7
|
+
title: string;
|
|
8
|
+
responsive: readonly ["xs", "sm", "md", "xl"] | undefined;
|
|
9
|
+
render: ((value: any, model: any) => ReactNode) | undefined;
|
|
10
|
+
} | {
|
|
11
|
+
key: string;
|
|
12
|
+
dataIndex: string;
|
|
13
|
+
title: string;
|
|
14
|
+
render: (date: Dayjs) => React.JSX.Element;
|
|
15
|
+
responsive?: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
key: string;
|
|
18
|
+
dataIndex: string;
|
|
19
|
+
title: string;
|
|
20
|
+
render: (status: string) => React.JSX.Element;
|
|
21
|
+
responsive?: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
key: string;
|
|
24
|
+
dataIndex: string;
|
|
25
|
+
title: string;
|
|
26
|
+
responsive?: undefined;
|
|
27
|
+
render?: undefined;
|
|
28
|
+
};
|
|
29
|
+
interface ItemProps<T extends string, Full extends {
|
|
30
|
+
id: string;
|
|
31
|
+
}, Light extends {
|
|
32
|
+
id: string;
|
|
33
|
+
}> {
|
|
34
|
+
className?: string;
|
|
35
|
+
model: Light;
|
|
36
|
+
sliceName: T;
|
|
37
|
+
onClick?: () => void;
|
|
38
|
+
cover?: ReactNode;
|
|
39
|
+
title?: ReactNode;
|
|
40
|
+
actions?: DataAction<Light>[];
|
|
41
|
+
columns?: DataColumn<any>[];
|
|
42
|
+
children?: ReactNode;
|
|
43
|
+
}
|
|
44
|
+
declare function Item<T extends string, Full extends {
|
|
45
|
+
id: string;
|
|
46
|
+
}, Light extends {
|
|
47
|
+
id: string;
|
|
48
|
+
}>({ className, model, sliceName, onClick, title, actions, columns, children, }: ItemProps<T, Full, Light>): React.JSX.Element;
|
|
49
|
+
declare namespace Item {
|
|
50
|
+
var StatusTag: ({ status, className }: {
|
|
51
|
+
status: string;
|
|
52
|
+
className?: string;
|
|
53
|
+
}) => React.JSX.Element;
|
|
54
|
+
var RoleTags: ({ role }: {
|
|
55
|
+
role: string | string[];
|
|
56
|
+
}) => React.JSX.Element;
|
|
57
|
+
}
|
|
58
|
+
export default Item;
|
|
59
|
+
interface ActionProps<T extends string, M extends {
|
|
60
|
+
id: string;
|
|
61
|
+
}, L extends {
|
|
62
|
+
id: string;
|
|
63
|
+
}> {
|
|
64
|
+
action: DataAction<L>;
|
|
65
|
+
model: L;
|
|
66
|
+
sliceName: string;
|
|
67
|
+
}
|
|
68
|
+
export declare const Action: <T extends string, M extends {
|
|
69
|
+
id: string;
|
|
70
|
+
}, L extends {
|
|
71
|
+
id: string;
|
|
72
|
+
}>({ action, model, sliceName, outline, }: ActionProps<T, M, L> & {
|
|
73
|
+
outline?: boolean;
|
|
74
|
+
}) => string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<React.AwaitedReactNode> | React.JSX.Element | null | undefined;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { DataAction, DataColumn, DataTool, ModelInsightProps, ModelProps } from "@akanjs/client";
|
|
2
|
+
import { SortType } from "@akanjs/constant";
|
|
3
|
+
import { type FetchInitForm } from "@akanjs/signal";
|
|
4
|
+
import React, { ReactNode } from "react";
|
|
5
|
+
interface ListContainerProps<T extends string, State, Input, Full extends {
|
|
6
|
+
id: string;
|
|
7
|
+
}, Light extends {
|
|
8
|
+
id: string;
|
|
9
|
+
}, Sort extends SortType> {
|
|
10
|
+
className?: string;
|
|
11
|
+
cardListClassName?: string;
|
|
12
|
+
type?: "card" | "list";
|
|
13
|
+
query?: {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
};
|
|
16
|
+
init?: FetchInitForm<Input, Full, Sort>;
|
|
17
|
+
sliceName: string;
|
|
18
|
+
create?: boolean;
|
|
19
|
+
title?: string;
|
|
20
|
+
sort?: SortType;
|
|
21
|
+
columns?: DataColumn<any>[];
|
|
22
|
+
tools?: DataTool[] | ((modelList: Light[]) => DataTool[]);
|
|
23
|
+
actions?: DataAction<Light>[] | ((item: Light, idx: number) => DataAction<Light>[]);
|
|
24
|
+
renderDashboard?: ({ summary, hidePresents }: any) => ReactNode;
|
|
25
|
+
renderItem?: (props: ModelProps<any, any>) => ReactNode;
|
|
26
|
+
renderTemplate?: (props: any) => ReactNode | null;
|
|
27
|
+
renderTitle?: (model: Full) => string | ReactNode;
|
|
28
|
+
renderView?: (model: Full) => ReactNode | null;
|
|
29
|
+
renderQueryMaker?: () => ReactNode;
|
|
30
|
+
renderInsight?: (props: ModelInsightProps<any>) => ReactNode;
|
|
31
|
+
renderLoading?: () => ReactNode;
|
|
32
|
+
}
|
|
33
|
+
export default function ListContainer<T extends string, State, Input, Full extends {
|
|
34
|
+
id: string;
|
|
35
|
+
}, Light extends {
|
|
36
|
+
id: string;
|
|
37
|
+
}, Sort extends SortType>({ className, cardListClassName, type, query, init, create, sliceName, title, sort, columns, actions, tools, renderDashboard, renderItem, renderTemplate, renderTitle, renderView, renderQueryMaker, renderInsight, renderLoading, }: ListContainerProps<T, State, Input, Full, Light, Sort>): React.JSX.Element;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DataAction, DataColumn } from "@akanjs/client";
|
|
2
|
+
import { SortType } from "@akanjs/constant";
|
|
3
|
+
import { type FetchInitForm } from "@akanjs/signal";
|
|
4
|
+
import React, { ReactNode } from "react";
|
|
5
|
+
interface TableListProps<T extends string, Input, Full extends {
|
|
6
|
+
id: string;
|
|
7
|
+
}, Light extends {
|
|
8
|
+
id: string;
|
|
9
|
+
}, Sort extends SortType> {
|
|
10
|
+
className?: string;
|
|
11
|
+
queryArgs?: any[];
|
|
12
|
+
init?: FetchInitForm<Input, Full, Sort>;
|
|
13
|
+
sliceName: string;
|
|
14
|
+
columns: DataColumn<any>[];
|
|
15
|
+
renderTemplate?: (props: any) => ReactNode | null;
|
|
16
|
+
renderTitle?: (model: Full) => string | ReactNode;
|
|
17
|
+
renderView?: (model: Full) => ReactNode | null;
|
|
18
|
+
actions?: DataAction<Light>[] | ((item: Light, idx: number) => DataAction<Light>[]);
|
|
19
|
+
onItemClick?: (item: Light, idx: number) => void;
|
|
20
|
+
}
|
|
21
|
+
export default function TableList<T extends string, Input, Full extends {
|
|
22
|
+
id: string;
|
|
23
|
+
}, Light extends {
|
|
24
|
+
id: string;
|
|
25
|
+
}, Sort extends SortType>({ className, init, queryArgs, sliceName, columns, actions, renderTemplate, renderTitle, renderView, onItemClick, }: TableListProps<T, Input, Full, Light, Sort>): React.JSX.Element;
|
|
26
|
+
export {};
|
package/Data/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const Data: {
|
|
2
|
+
CardList: typeof import("./CardList").default;
|
|
3
|
+
Dashboard: typeof import("./Dashboard").default;
|
|
4
|
+
Insight: typeof import("./Insight").default;
|
|
5
|
+
Item: typeof import("./Item").default;
|
|
6
|
+
ListContainer: typeof import("./ListContainer").default;
|
|
7
|
+
Pagination: typeof import("./Pagination").default;
|
|
8
|
+
TableList: typeof import("./TableList").default;
|
|
9
|
+
QueryMaker: typeof import("./QueryMaker").default;
|
|
10
|
+
};
|
package/Data/index_.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const CardList: typeof import("./CardList").default;
|
|
2
|
+
export declare const Dashboard: typeof import("./Dashboard").default;
|
|
3
|
+
export declare const Insight: typeof import("./Insight").default;
|
|
4
|
+
export declare const Item: typeof import("./Item").default;
|
|
5
|
+
export declare const ListContainer: typeof import("./ListContainer").default;
|
|
6
|
+
export declare const Pagination: typeof import("./Pagination").default;
|
|
7
|
+
export declare const TableList: typeof import("./TableList").default;
|
|
8
|
+
export declare const QueryMaker: typeof import("./QueryMaker").default;
|
package/DatePicker.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import "react-datepicker/dist/react-datepicker.css";
|
|
2
|
+
import { Dayjs } from "@akanjs/base";
|
|
3
|
+
import React from "react";
|
|
4
|
+
interface DatePickerProps {
|
|
5
|
+
value?: Dayjs | null;
|
|
6
|
+
onChange: (value: Dayjs | null) => void;
|
|
7
|
+
showTime?: boolean;
|
|
8
|
+
format?: string;
|
|
9
|
+
timeIntervals?: number;
|
|
10
|
+
disabledDate?: (date: Dayjs) => boolean | null | undefined;
|
|
11
|
+
className?: string;
|
|
12
|
+
placement?: "top" | "bottom" | "left" | "right";
|
|
13
|
+
defaultValue?: Dayjs;
|
|
14
|
+
}
|
|
15
|
+
export declare const DatePicker: {
|
|
16
|
+
({ value, onChange, showTime, format, timeIntervals, disabledDate, placement, className, defaultValue, }: DatePickerProps): React.JSX.Element;
|
|
17
|
+
RangePicker: ({ value, onChange, format, showTime, timeIntervals, disabledDate, className, }: RangePickerProps) => React.JSX.Element;
|
|
18
|
+
TimePicker: ({ disabled, className, value, format, onChange, timeIntervals, }: TimePickerProps) => React.JSX.Element;
|
|
19
|
+
};
|
|
20
|
+
interface RangePickerProps {
|
|
21
|
+
value: [Dayjs | null, Dayjs | null];
|
|
22
|
+
onChange: (value: [Dayjs | null, Dayjs | null]) => void;
|
|
23
|
+
format?: string;
|
|
24
|
+
showTime?: boolean;
|
|
25
|
+
timeIntervals?: number;
|
|
26
|
+
disabledDate?: (date: Dayjs) => boolean | null | undefined;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
interface TimePickerProps {
|
|
30
|
+
value: Dayjs | null;
|
|
31
|
+
onChange: (value: Dayjs) => void;
|
|
32
|
+
format?: string;
|
|
33
|
+
timeIntervals?: number;
|
|
34
|
+
disabledDate?: (date: Dayjs) => boolean | null | undefined;
|
|
35
|
+
className?: string;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface ModalProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
bodyClassName?: string;
|
|
4
|
+
confirmClose?: boolean;
|
|
5
|
+
children?: any;
|
|
6
|
+
onCancel?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const Modal: ({ className, bodyClassName, confirmClose, children, onCancel }: ModalProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface DialogContextType {
|
|
3
|
+
open: boolean;
|
|
4
|
+
setOpen: (open: boolean) => void;
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
setTitle: (title: ReactNode) => void;
|
|
7
|
+
action: ReactNode;
|
|
8
|
+
setAction: (action: ReactNode) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const DialogContext: import("react").Context<DialogContextType>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ProviderProps } from "./Provider";
|
|
2
|
+
export declare const Dialog: {
|
|
3
|
+
({ children, ...props }: ProviderProps): import("react").JSX.Element;
|
|
4
|
+
Modal: ({ className, bodyClassName, confirmClose, children, onCancel }: import("./Modal").ModalProps) => import("react").JSX.Element;
|
|
5
|
+
Title: ({ children }: import("./Title").TitleProps) => null;
|
|
6
|
+
Action: ({ children }: import("./Action").ActionProps) => null;
|
|
7
|
+
Trigger: ({ className, children }: import("./Trigger").TriggerProps) => import("react").JSX.Element;
|
|
8
|
+
Content: ({ className, children }: import("./Content").ContentProps) => import("react").JSX.Element;
|
|
9
|
+
};
|
package/DragAction.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
interface DragActionProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
children: any;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
onLeft?: () => void;
|
|
7
|
+
onRight?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const DragAction: {
|
|
10
|
+
({ className, children, onClick, onLeft, onRight }: DragActionProps): import("react").JSX.Element;
|
|
11
|
+
Body: ({ children }: BodyProps) => import("react").JSX.Element;
|
|
12
|
+
Left: ({ children }: LeftProps) => import("react").JSX.Element;
|
|
13
|
+
Right: ({ children }: RightProps) => import("react").JSX.Element;
|
|
14
|
+
};
|
|
15
|
+
interface BodyProps {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
interface LeftProps {
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
interface RightProps {
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ReactElement, type ReactNode } from "react";
|
|
2
|
+
interface DragListProps<V> {
|
|
3
|
+
className?: string;
|
|
4
|
+
mode?: "horizontal" | "vertical";
|
|
5
|
+
children: ReactElement[];
|
|
6
|
+
onChange: (value: V[], draggedValue: V, info: {
|
|
7
|
+
originalIdx: number;
|
|
8
|
+
newIdx: number;
|
|
9
|
+
idxChanged: boolean;
|
|
10
|
+
}) => void;
|
|
11
|
+
}
|
|
12
|
+
interface Cursor {
|
|
13
|
+
className?: string;
|
|
14
|
+
children: any;
|
|
15
|
+
}
|
|
16
|
+
interface ItemProps {
|
|
17
|
+
value: any;
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export declare const DraggableList: {
|
|
21
|
+
<V>({ className, mode, children, onChange }: DragListProps<V>): import("react").JSX.Element;
|
|
22
|
+
Cursor({ className, children }: Cursor): import("react").JSX.Element;
|
|
23
|
+
Item: ({ value, children }: ItemProps) => ReactNode;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
package/Dropdown.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
interface DropdownProps {
|
|
3
|
+
value: ReactNode;
|
|
4
|
+
content: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
buttonClassName?: string;
|
|
7
|
+
dropdownClassName?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Dropdown: ({ value, content, className, buttonClassName, dropdownClassName }: DropdownProps) => import("react").JSX.Element;
|
|
10
|
+
export {};
|
package/Empty.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
interface EmptyProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
description?: ReactNode;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
minHeight?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const Empty: ({ className, description, children, minHeight }: EmptyProps) => React.JSX.Element;
|
|
9
|
+
export {};
|