@ramesesinc/platform-core 0.1.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/dist/components/action/AlertMessage.d.ts +8 -0
- package/dist/components/action/AlertMessage.js +19 -0
- package/dist/components/action/AlertMessage.tsx +38 -0
- package/dist/components/action/Button.d.ts +21 -0
- package/dist/components/action/Button.js +139 -0
- package/dist/components/action/Button.tsx +230 -0
- package/dist/components/action/CancelEdit.d.ts +9 -0
- package/dist/components/action/CancelEdit.js +21 -0
- package/dist/components/action/CancelEdit.tsx +40 -0
- package/dist/components/action/DeleteData.d.ts +13 -0
- package/dist/components/action/DeleteData.js +43 -0
- package/dist/components/action/DeleteData.tsx +73 -0
- package/dist/components/action/Edit.d.ts +9 -0
- package/dist/components/action/Edit.js +21 -0
- package/dist/components/action/Edit.tsx +40 -0
- package/dist/components/action/LookupPage.d.ts +16 -0
- package/dist/components/action/LookupPage.js +62 -0
- package/dist/components/action/LookupPage.tsx +113 -0
- package/dist/components/action/ProcessRunner.d.ts +62 -0
- package/dist/components/action/ProcessRunner.js +156 -0
- package/dist/components/action/ProcessRunner.tsx +337 -0
- package/dist/components/action/Refresh.d.ts +7 -0
- package/dist/components/action/Refresh.js +17 -0
- package/dist/components/action/Refresh.tsx +35 -0
- package/dist/components/action/SaveData.d.ts +10 -0
- package/dist/components/action/SaveData.js +54 -0
- package/dist/components/action/SaveData.tsx +74 -0
- package/dist/components/action/SelectData.d.ts +8 -0
- package/dist/components/action/SelectData.js +29 -0
- package/dist/components/action/SelectData.tsx +47 -0
- package/dist/components/action/Undo.d.ts +9 -0
- package/dist/components/action/Undo.js +31 -0
- package/dist/components/action/Undo.tsx +50 -0
- package/dist/components/action/UpdateContext.d.ts +9 -0
- package/dist/components/action/UpdateContext.js +21 -0
- package/dist/components/action/UpdateContext.tsx +40 -0
- package/dist/components/action/UpdateData.d.ts +9 -0
- package/dist/components/action/UpdateData.js +33 -0
- package/dist/components/action/UpdateData.tsx +49 -0
- package/dist/components/action/ViewBackPage.d.ts +9 -0
- package/dist/components/action/ViewBackPage.js +19 -0
- package/dist/components/action/ViewBackPage.tsx +46 -0
- package/dist/components/action/ViewPage.d.ts +14 -0
- package/dist/components/action/ViewPage.js +88 -0
- package/dist/components/action/ViewPage.tsx +141 -0
- package/dist/components/common/UIComponent.d.ts +11 -0
- package/dist/components/common/UIComponent.js +52 -0
- package/dist/components/common/UIComponent.tsx +84 -0
- package/dist/components/common/UIInput.d.ts +12 -0
- package/dist/components/common/UIInput.js +37 -0
- package/dist/components/common/UIInput.tsx +49 -0
- package/dist/components/common/UIMenu.d.ts +23 -0
- package/dist/components/common/UIMenu.js +61 -0
- package/dist/components/common/UIMenu.tsx +91 -0
- package/dist/components/index.d.ts +37 -0
- package/dist/components/index.js +44 -0
- package/dist/components/index.ts +51 -0
- package/dist/components/input/CodeEditor.d.ts +12 -0
- package/dist/components/input/CodeEditor.js +132 -0
- package/dist/components/input/CodeEditor.tsx +188 -0
- package/dist/components/input/DateField.d.ts +9 -0
- package/dist/components/input/DateField.js +140 -0
- package/dist/components/input/DateField.tsx +274 -0
- package/dist/components/input/DayPicker.d.ts +2 -0
- package/dist/components/input/DayPicker.js +5 -0
- package/dist/components/input/DayPicker.tsx +5 -0
- package/dist/components/input/HtmlCode.d.ts +8 -0
- package/dist/components/input/HtmlCode.js +157 -0
- package/dist/components/input/HtmlCode.tsx +203 -0
- package/dist/components/input/JsonCode.d.ts +9 -0
- package/dist/components/input/JsonCode.js +159 -0
- package/dist/components/input/JsonCode.tsx +205 -0
- package/dist/components/input/MonthPicker.d.ts +2 -0
- package/dist/components/input/MonthPicker.js +5 -0
- package/dist/components/input/MonthPicker.tsx +5 -0
- package/dist/components/input/ScriptCode.d.ts +8 -0
- package/dist/components/input/ScriptCode.js +153 -0
- package/dist/components/input/ScriptCode.tsx +195 -0
- package/dist/components/input/Select.d.ts +14 -0
- package/dist/components/input/Select.js +40 -0
- package/dist/components/input/Select.tsx +78 -0
- package/dist/components/input/SqlCode.d.ts +8 -0
- package/dist/components/input/SqlCode.js +121 -0
- package/dist/components/input/SqlCode.tsx +162 -0
- package/dist/components/input/StringDecision.d.ts +2 -0
- package/dist/components/input/StringDecision.js +34 -0
- package/dist/components/input/StringDecision.tsx +64 -0
- package/dist/components/input/Text.d.ts +7 -0
- package/dist/components/input/Text.js +39 -0
- package/dist/components/input/Text.tsx +57 -0
- package/dist/components/input/YearPicker.d.ts +8 -0
- package/dist/components/input/YearPicker.js +44 -0
- package/dist/components/input/YearPicker.tsx +81 -0
- package/dist/components/list/IconMenu.d.ts +14 -0
- package/dist/components/list/IconMenu.js +72 -0
- package/dist/components/list/IconMenu.tsx +115 -0
- package/dist/components/list/TabMenu.d.ts +10 -0
- package/dist/components/list/TabMenu.js +72 -0
- package/dist/components/list/TabMenu.tsx +127 -0
- package/dist/components/list/TreeMenu.d.ts +14 -0
- package/dist/components/list/TreeMenu.js +207 -0
- package/dist/components/list/TreeMenu.tsx +279 -0
- package/dist/components/list/TxnTaskList.d.ts +2 -0
- package/dist/components/list/TxnTaskList.js +77 -0
- package/dist/components/list/TxnTaskList.tsx +198 -0
- package/dist/components/output/Label.d.ts +8 -0
- package/dist/components/output/Label.js +33 -0
- package/dist/components/output/Label.tsx +51 -0
- package/dist/components/table/DataList.d.ts +88 -0
- package/dist/components/table/DataList.js +361 -0
- package/dist/components/table/DataList.tsx +782 -0
- package/dist/components/table/DataTable.d.ts +46 -0
- package/dist/components/table/DataTable.js +253 -0
- package/dist/components/table/DataTable.tsx +572 -0
- package/dist/components/table/ListHandler.d.ts +42 -0
- package/dist/components/table/ListHandler.js +197 -0
- package/dist/components/table/ListHandler.ts +276 -0
- package/dist/components/table/TableContext.d.ts +33 -0
- package/dist/components/table/TableContext.js +57 -0
- package/dist/components/table/TableContext.tsx +122 -0
- package/dist/components/view/ComponentView.d.ts +8 -0
- package/dist/components/view/ComponentView.js +78 -0
- package/dist/components/view/ComponentView.tsx +102 -0
- package/dist/components/view/FilterView.d.ts +2 -0
- package/dist/components/view/FilterView.js +14 -0
- package/dist/components/view/FilterView.tsx +21 -0
- package/dist/components/view/HtmlForm.d.ts +7 -0
- package/dist/components/view/HtmlForm.js +145 -0
- package/dist/components/view/HtmlForm.tsx +186 -0
- package/dist/components/view/HtmlView.d.ts +9 -0
- package/dist/components/view/HtmlView.js +85 -0
- package/dist/components/view/HtmlView.tsx +114 -0
- package/dist/components/view/IFrameView.d.ts +2 -0
- package/dist/components/view/IFrameView.js +34 -0
- package/dist/components/view/IFrameView.tsx +48 -0
- package/dist/components/view/Modal.d.ts +14 -0
- package/dist/components/view/Modal.js +28 -0
- package/dist/components/view/Modal.tsx +72 -0
- package/dist/components/view/PageView.d.ts +9 -0
- package/dist/components/view/PageView.js +90 -0
- package/dist/components/view/PageView.tsx +131 -0
- package/dist/components/view/PopupView.d.ts +9 -0
- package/dist/components/view/PopupView.js +91 -0
- package/dist/components/view/PopupView.tsx +160 -0
- package/dist/components/view/RootView.d.ts +8 -0
- package/dist/components/view/RootView.js +75 -0
- package/dist/components/view/RootView.tsx +109 -0
- package/dist/components/view/WizardView.d.ts +6 -0
- package/dist/components/view/WizardView.js +34 -0
- package/dist/components/view/WizardView.tsx +48 -0
- package/dist/core/AppContext.d.ts +25 -0
- package/dist/core/AppContext.js +159 -0
- package/dist/core/AuthContext.d.ts +13 -0
- package/dist/core/AuthContext.js +80 -0
- package/dist/core/ComponentCache.d.ts +15 -0
- package/dist/core/ComponentCache.js +25 -0
- package/dist/core/DataContext.d.ts +20 -0
- package/dist/core/DataContext.js +41 -0
- package/dist/core/DynamicComponent.d.ts +12 -0
- package/dist/core/DynamicComponent.js +30 -0
- package/dist/core/DynamicIcon.d.ts +6 -0
- package/dist/core/DynamicIcon.js +48 -0
- package/dist/core/DynamicTemplate.d.ts +4 -0
- package/dist/core/DynamicTemplate.js +17 -0
- package/dist/core/ErrorMessage.d.ts +5 -0
- package/dist/core/ErrorMessage.js +7 -0
- package/dist/core/EventHandler.d.ts +3 -0
- package/dist/core/EventHandler.js +1 -0
- package/dist/core/HtmlCache.d.ts +6 -0
- package/dist/core/HtmlCache.js +17 -0
- package/dist/core/Page.d.ts +6 -0
- package/dist/core/Page.js +141 -0
- package/dist/core/PageCache.d.ts +15 -0
- package/dist/core/PageCache.js +26 -0
- package/dist/core/PageContext.d.ts +49 -0
- package/dist/core/PageContext.js +207 -0
- package/dist/core/PageRegistry.d.ts +7 -0
- package/dist/core/PageRegistry.js +11 -0
- package/dist/core/PageViewContext.d.ts +45 -0
- package/dist/core/PageViewContext.js +277 -0
- package/dist/core/Panel.d.ts +16 -0
- package/dist/core/Panel.js +39 -0
- package/dist/core/RowContext.d.ts +11 -0
- package/dist/core/RowContext.js +16 -0
- package/dist/core/StepHandler.d.ts +9 -0
- package/dist/core/StepHandler.js +39 -0
- package/dist/core/UIDependHandler.d.ts +6 -0
- package/dist/core/UIDependHandler.js +31 -0
- package/dist/core/auth/index.d.ts +18 -0
- package/dist/core/auth/index.js +187 -0
- package/dist/core/auth/session.d.ts +4 -0
- package/dist/core/auth/session.js +45 -0
- package/dist/core/index.d.ts +3 -0
- package/dist/core/index.js +1 -0
- package/dist/core/page-helper.d.ts +27 -0
- package/dist/core/page-helper.js +47 -0
- package/dist/hooks/useUrlParams.d.ts +11 -0
- package/dist/hooks/useUrlParams.js +164 -0
- package/dist/index.d.ts +65 -0
- package/dist/index.js +69 -0
- package/dist/layouts/BorderLayout.d.ts +14 -0
- package/dist/layouts/BorderLayout.js +8 -0
- package/dist/layouts/CardLayout.d.ts +27 -0
- package/dist/layouts/CardLayout.js +36 -0
- package/dist/layouts/CenterLayout.d.ts +8 -0
- package/dist/layouts/CenterLayout.js +6 -0
- package/dist/layouts/GridLayout.d.ts +9 -0
- package/dist/layouts/GridLayout.js +5 -0
- package/dist/layouts/HPanel.d.ts +11 -0
- package/dist/layouts/HPanel.js +8 -0
- package/dist/layouts/HorizontalLayout.d.ts +11 -0
- package/dist/layouts/HorizontalLayout.js +6 -0
- package/dist/layouts/MainLayout.d.ts +6 -0
- package/dist/layouts/MainLayout.js +5 -0
- package/dist/layouts/PageLayout.d.ts +11 -0
- package/dist/layouts/PageLayout.js +6 -0
- package/dist/layouts/VPanel.d.ts +9 -0
- package/dist/layouts/VPanel.js +7 -0
- package/dist/layouts/XLayout.d.ts +10 -0
- package/dist/layouts/XLayout.js +10 -0
- package/dist/layouts/YLayout.d.ts +10 -0
- package/dist/layouts/YLayout.js +10 -0
- package/dist/lib/PlatformRoute.d.ts +5 -0
- package/dist/lib/PlatformRoute.js +288 -0
- package/dist/lib/WebPlatform.d.ts +13 -0
- package/dist/lib/WebPlatform.js +124 -0
- package/dist/lib/components/ActivityBar.d.ts +13 -0
- package/dist/lib/components/ActivityBar.js +39 -0
- package/dist/lib/components/CopyButton.d.ts +8 -0
- package/dist/lib/components/CopyButton.js +50 -0
- package/dist/lib/components/Header.d.ts +2 -0
- package/dist/lib/components/Header.js +74 -0
- package/dist/lib/components/QuickActionMenu.d.ts +18 -0
- package/dist/lib/components/QuickActionMenu.js +50 -0
- package/dist/lib/components/UserButton.d.ts +11 -0
- package/dist/lib/components/UserButton.js +66 -0
- package/dist/lib/layouts/BorderLayout.tsx +31 -0
- package/dist/lib/layouts/CardLayout.tsx +73 -0
- package/dist/lib/layouts/CenterLayout.tsx +20 -0
- package/dist/lib/layouts/GridLayout.tsx +20 -0
- package/dist/lib/layouts/HPanel.tsx +31 -0
- package/dist/lib/layouts/HorizontalLayout.tsx +29 -0
- package/dist/lib/layouts/MainLayout.tsx +16 -0
- package/dist/lib/layouts/PageLayout.tsx +29 -0
- package/dist/lib/layouts/VPanel.tsx +27 -0
- package/dist/lib/layouts/XLayout.tsx +29 -0
- package/dist/lib/layouts/YLayout.tsx +29 -0
- package/dist/lib/utils/BeanUtils.d.ts +3 -0
- package/dist/lib/utils/BeanUtils.js +75 -0
- package/dist/lib/utils/ComponentLoader.d.ts +13 -0
- package/dist/lib/utils/ComponentLoader.js +26 -0
- package/dist/lib/utils/ExprUtil.d.ts +7 -0
- package/dist/lib/utils/ExprUtil.js +44 -0
- package/dist/lib/utils/PageUtils.d.ts +6 -0
- package/dist/lib/utils/PageUtils.js +121 -0
- package/dist/lib/utils/ResourceLoader.d.ts +11 -0
- package/dist/lib/utils/ResourceLoader.js +37 -0
- package/dist/lib/utils/SectionProvider.d.ts +5 -0
- package/dist/lib/utils/SectionProvider.js +39 -0
- package/dist/lib/utils/initResourceLoader.d.ts +0 -0
- package/dist/lib/utils/initResourceLoader.js +95 -0
- package/dist/styles/index.css +38 -0
- package/dist/templates/BasicTemplate.d.ts +2 -0
- package/dist/templates/BasicTemplate.js +14 -0
- package/dist/templates/CrudFormTemplate.d.ts +2 -0
- package/dist/templates/CrudFormTemplate.js +38 -0
- package/dist/templates/DataListTemplate.d.ts +2 -0
- package/dist/templates/DataListTemplate.js +13 -0
- package/dist/templates/ExplorerTemplate.d.ts +10 -0
- package/dist/templates/ExplorerTemplate.js +17 -0
- package/dist/templates/TxnFormTemplate.d.ts +2 -0
- package/dist/templates/TxnFormTemplate.js +66 -0
- package/dist/templates/WizardTemplate.d.ts +9 -0
- package/dist/templates/WizardTemplate.js +37 -0
- package/dist/templates/index.d.ts +5 -0
- package/dist/templates/index.js +5 -0
- package/dist/types/action.d.ts +8 -0
- package/dist/types/action.js +1 -0
- package/dist/types/component.d.ts +18 -0
- package/dist/types/component.js +1 -0
- package/dist/types/list.d.ts +14 -0
- package/dist/types/list.js +1 -0
- package/dist/types/template.d.ts +6 -0
- package/dist/types/template.js +1 -0
- package/package.json +56 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
import { usePageContext } from "./PageContext";
|
|
3
|
+
const useDependHandler = (props) => {
|
|
4
|
+
const { name, onRefresh } = props !== null && props !== void 0 ? props : {};
|
|
5
|
+
const pageContext = usePageContext();
|
|
6
|
+
const dependHandler = (val) => {
|
|
7
|
+
if (onRefresh != null) {
|
|
8
|
+
onRefresh();
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
if (name == null || name.trim() === "" || onRefresh == null)
|
|
13
|
+
return;
|
|
14
|
+
const unsubscribeList = [];
|
|
15
|
+
const names = name.split(",");
|
|
16
|
+
names.forEach((key) => {
|
|
17
|
+
const unsubscribe = pageContext === null || pageContext === void 0 ? void 0 : pageContext.dependsTo(key, dependHandler);
|
|
18
|
+
unsubscribeList.push(unsubscribe);
|
|
19
|
+
});
|
|
20
|
+
return () => {
|
|
21
|
+
unsubscribeList.forEach((unsubscribe) => {
|
|
22
|
+
try {
|
|
23
|
+
unsubscribe();
|
|
24
|
+
}
|
|
25
|
+
catch (err) { }
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
}, [name]);
|
|
29
|
+
return {};
|
|
30
|
+
};
|
|
31
|
+
export default useDependHandler;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare function createSessionToken(props: {
|
|
2
|
+
SESSIONID: string;
|
|
3
|
+
USERID: string;
|
|
4
|
+
USERNAME: string;
|
|
5
|
+
FULLNAME: string;
|
|
6
|
+
}): Promise<string>;
|
|
7
|
+
export declare function fetchSessionId(): Promise<string | null>;
|
|
8
|
+
export declare function verifySessionToken(token: string): Promise<any>;
|
|
9
|
+
export declare function signIn(username: string, password: string, tenant: string): Promise<{
|
|
10
|
+
SESSION: Record<string, any>;
|
|
11
|
+
OPTIONS: Record<string, any>;
|
|
12
|
+
} | null>;
|
|
13
|
+
export declare function signOut(tenant: string): Promise<string | null>;
|
|
14
|
+
export declare function getUser(tenant: string): Promise<{
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
} | null>;
|
|
17
|
+
export declare function changePassword(tenant: string, username: string, oldpassword: string, newpassword: string): Promise<void>;
|
|
18
|
+
export declare function resetPassword(tenant: string, userid: string, password: string): Promise<void>;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
// Server-side authentication utilities (no "use server" needed)
|
|
2
|
+
import { generateHmacMD5 } from "@ramesesinc/lib";
|
|
3
|
+
import { authAPI } from "@ramesesinc/lib/auth-api";
|
|
4
|
+
import { getError, localAPI } from "@ramesesinc/lib/local-api";
|
|
5
|
+
export async function createSessionToken(props) {
|
|
6
|
+
try {
|
|
7
|
+
const data = await authAPI.createToken(props);
|
|
8
|
+
const { token } = data !== null && data !== void 0 ? data : {};
|
|
9
|
+
await authAPI.saveToken({ token });
|
|
10
|
+
return token;
|
|
11
|
+
}
|
|
12
|
+
catch (err) {
|
|
13
|
+
console.error(err);
|
|
14
|
+
const e = getError(err);
|
|
15
|
+
throw new Error(e.message);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export async function fetchSessionId() {
|
|
19
|
+
try {
|
|
20
|
+
const token = await authAPI.fetchToken();
|
|
21
|
+
return token;
|
|
22
|
+
}
|
|
23
|
+
catch (err) {
|
|
24
|
+
console.error(err);
|
|
25
|
+
const e = getError(err);
|
|
26
|
+
throw new Error(e.message);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export async function verifySessionToken(token) {
|
|
30
|
+
const resp = await authAPI.verifyToken({ token });
|
|
31
|
+
const { data } = resp !== null && resp !== void 0 ? resp : {};
|
|
32
|
+
return data;
|
|
33
|
+
}
|
|
34
|
+
async function clearSessionId() {
|
|
35
|
+
await authAPI.deleteToken();
|
|
36
|
+
}
|
|
37
|
+
export async function signIn(username, password, tenant) {
|
|
38
|
+
var _a, _b;
|
|
39
|
+
try {
|
|
40
|
+
const hashedPassword = generateHmacMD5(username.toLowerCase(), password);
|
|
41
|
+
const body = { username, password: hashedPassword };
|
|
42
|
+
const config = { tenant, module: "admin" };
|
|
43
|
+
const svc = localAPI.useService(config.tenant, config.module);
|
|
44
|
+
let data = (_a = (await svc.invoke("loginService", "login", body))) !== null && _a !== void 0 ? _a : {};
|
|
45
|
+
if (data.response != null)
|
|
46
|
+
data = data.response;
|
|
47
|
+
const { env } = data;
|
|
48
|
+
if (env == null)
|
|
49
|
+
return null;
|
|
50
|
+
const { USERID, SESSIONID } = env;
|
|
51
|
+
if (!USERID || !SESSIONID)
|
|
52
|
+
return null;
|
|
53
|
+
const platform = await localAPI.getPlatform();
|
|
54
|
+
const newConfig = Object.assign(Object.assign({}, config), { platform: platform === null || platform === void 0 ? void 0 : platform.name });
|
|
55
|
+
const auth_post_enabled = (String(process.env.AUTH_POST_ENABLED) === 'false' ? false : true);
|
|
56
|
+
if (auth_post_enabled) {
|
|
57
|
+
// let path = `/users/${USERID}`;
|
|
58
|
+
// const user = await server.getMongoData(path, newConfig);
|
|
59
|
+
// if (user && Object.keys(user).length > 0) {
|
|
60
|
+
// mergeUserInfo(env, user);
|
|
61
|
+
// path = `/users/update/${USERID}`;
|
|
62
|
+
// await server.postMongoData(path, user, newConfig);
|
|
63
|
+
// } else {
|
|
64
|
+
// const newUser = {};
|
|
65
|
+
// mergeUserInfo(env, newUser);
|
|
66
|
+
// path = `/users/create`;
|
|
67
|
+
// await server.postMongoData(path, newUser, newConfig);
|
|
68
|
+
// }
|
|
69
|
+
}
|
|
70
|
+
const finalResult = { SESSION: {}, OPTIONS: {} };
|
|
71
|
+
if (SESSIONID) {
|
|
72
|
+
const timeIn = env.TIMEIN;
|
|
73
|
+
delete env.TIMEIN;
|
|
74
|
+
const sess = { _id: SESSIONID, env: env };
|
|
75
|
+
sess.timein = timeIn;
|
|
76
|
+
sess.timeout = null;
|
|
77
|
+
if (auth_post_enabled) {
|
|
78
|
+
const path = `/sessions/create`;
|
|
79
|
+
// await server.postMongoData(path, sess, newConfig);
|
|
80
|
+
}
|
|
81
|
+
const authOptions = (_b = env.AUTH_OPTIONS) !== null && _b !== void 0 ? _b : {};
|
|
82
|
+
delete authOptions.userid;
|
|
83
|
+
delete authOptions.username;
|
|
84
|
+
finalResult.SESSION = env;
|
|
85
|
+
finalResult.OPTIONS = authOptions;
|
|
86
|
+
}
|
|
87
|
+
return finalResult;
|
|
88
|
+
}
|
|
89
|
+
catch (err) {
|
|
90
|
+
console.error(err);
|
|
91
|
+
const e = getError(err);
|
|
92
|
+
throw new Error(e.message);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
export async function signOut(tenant) {
|
|
96
|
+
var _a;
|
|
97
|
+
try {
|
|
98
|
+
let SESSIONID = "";
|
|
99
|
+
const sessionID = await fetchSessionId();
|
|
100
|
+
if (sessionID && sessionID.split(".").length > 1) {
|
|
101
|
+
const tokenData = await verifySessionToken(sessionID);
|
|
102
|
+
SESSIONID = (_a = tokenData === null || tokenData === void 0 ? void 0 : tokenData.SESSIONID) !== null && _a !== void 0 ? _a : "";
|
|
103
|
+
}
|
|
104
|
+
if (SESSIONID) {
|
|
105
|
+
const body = { tenant, SESSIONID };
|
|
106
|
+
const config = { tenant, module: "admin" };
|
|
107
|
+
const svc = localAPI.useService(config.tenant, config.module);
|
|
108
|
+
await svc.invoke("logoutService", "logout", body);
|
|
109
|
+
const auth_post_enabled = (String(process.env.AUTH_POST_ENABLED) === 'false' ? false : true);
|
|
110
|
+
if (auth_post_enabled) {
|
|
111
|
+
const sess = { timeout: new Date().toISOString().slice(0, 19) };
|
|
112
|
+
const path = `/sessions/update/${encodeURIComponent(SESSIONID)}`;
|
|
113
|
+
// await server.postMongoData(path, sess, config);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
await clearSessionId();
|
|
117
|
+
return await fetchSessionId();
|
|
118
|
+
}
|
|
119
|
+
catch (err) {
|
|
120
|
+
console.error(err);
|
|
121
|
+
const e = getError(err);
|
|
122
|
+
throw new Error(e.message);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
export async function getUser(tenant) {
|
|
126
|
+
var _a;
|
|
127
|
+
try {
|
|
128
|
+
const token = await fetchSessionId();
|
|
129
|
+
if (!token)
|
|
130
|
+
return null;
|
|
131
|
+
let USERNAME = "";
|
|
132
|
+
if (token.split(".").length > 1) {
|
|
133
|
+
const tokenData = await verifySessionToken(token);
|
|
134
|
+
USERNAME = (_a = tokenData === null || tokenData === void 0 ? void 0 : tokenData.USERNAME) !== null && _a !== void 0 ? _a : "";
|
|
135
|
+
}
|
|
136
|
+
if (!USERNAME)
|
|
137
|
+
return null;
|
|
138
|
+
const body = { username: USERNAME };
|
|
139
|
+
const config = { tenant, module: "admin" };
|
|
140
|
+
const svc = localAPI.useService(config.tenant, config.module);
|
|
141
|
+
const user = await svc.invoke("passwordService", "getUser", body);
|
|
142
|
+
return user;
|
|
143
|
+
}
|
|
144
|
+
catch (err) {
|
|
145
|
+
console.error(err);
|
|
146
|
+
const e = getError(err);
|
|
147
|
+
throw new Error(e.message);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
export async function changePassword(tenant, username, oldpassword, newpassword) {
|
|
151
|
+
try {
|
|
152
|
+
const config = { tenant, module: "admin" };
|
|
153
|
+
const body = { username, oldpassword, newpassword };
|
|
154
|
+
const svc = localAPI.useService(config.tenant, config.module);
|
|
155
|
+
await svc.invoke("passwordService", "change", body);
|
|
156
|
+
}
|
|
157
|
+
catch (err) {
|
|
158
|
+
console.error(err);
|
|
159
|
+
const e = getError(err);
|
|
160
|
+
throw new Error(e.message);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
export async function resetPassword(tenant, userid, password) {
|
|
164
|
+
try {
|
|
165
|
+
const config = { tenant, module: "admin" };
|
|
166
|
+
const body = { userid, password };
|
|
167
|
+
const svc = localAPI.useService(config.tenant, config.module);
|
|
168
|
+
await svc.invoke("passwordService", "reset", body);
|
|
169
|
+
}
|
|
170
|
+
catch (err) {
|
|
171
|
+
console.error(err);
|
|
172
|
+
const e = getError(err);
|
|
173
|
+
throw new Error(e.message);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
function mergeUserInfo(source, target) {
|
|
177
|
+
const env = source !== null && source !== void 0 ? source : {};
|
|
178
|
+
const { USERID } = env;
|
|
179
|
+
if (!USERID)
|
|
180
|
+
return;
|
|
181
|
+
target._id = env.USERID;
|
|
182
|
+
target.username = env.USER;
|
|
183
|
+
target.fullname = env.FULLNAME;
|
|
184
|
+
target.name = env.NAME;
|
|
185
|
+
target.title = env.JOBTITLE;
|
|
186
|
+
target.txncode = env.TXNCODE;
|
|
187
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as server from "@ramesesinc/lib/server-actions";
|
|
2
|
+
export declare function verifyToken(token: string): Promise<server.TokenData | null>;
|
|
3
|
+
export declare function getUser(userid: string, tenant: string): Promise<Record<string, any> | null>;
|
|
4
|
+
export declare function buildSessionHeader(): Promise<Record<string, any>>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as server from "@ramesesinc/lib/server-actions";
|
|
2
|
+
import * as auth from "./index";
|
|
3
|
+
export async function verifyToken(token) {
|
|
4
|
+
try {
|
|
5
|
+
const data = await auth.verifySessionToken(token);
|
|
6
|
+
if (data == null)
|
|
7
|
+
return data;
|
|
8
|
+
const auth_post_enabled = (String(process.env.AUTH_POST_ENABLED) === 'false' ? false : true);
|
|
9
|
+
if (auth_post_enabled)
|
|
10
|
+
return data;
|
|
11
|
+
const { USERID, USERNAME, FULLNAME } = data !== null && data !== void 0 ? data : {};
|
|
12
|
+
return Object.assign(Object.assign({}, data), { INFO: { _id: USERID, username: USERNAME, fullname: FULLNAME } });
|
|
13
|
+
}
|
|
14
|
+
catch (err) {
|
|
15
|
+
console.error(err);
|
|
16
|
+
const e = server.getError(err);
|
|
17
|
+
throw new Error(e.message);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export async function getUser(userid, tenant) {
|
|
21
|
+
try {
|
|
22
|
+
const path = `/users/${encodeURIComponent(userid)}`;
|
|
23
|
+
return await server.getMongoData(path, { tenant, module: 'admin' });
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
console.error(err);
|
|
27
|
+
const e = server.getError(err);
|
|
28
|
+
throw new Error(e.message);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export async function buildSessionHeader() {
|
|
32
|
+
const key = 'x-session-token';
|
|
33
|
+
const headers = { [key]: '' };
|
|
34
|
+
try {
|
|
35
|
+
const token = await auth.fetchSessionId();
|
|
36
|
+
if (token == null || token.trim() === "") {
|
|
37
|
+
return headers;
|
|
38
|
+
}
|
|
39
|
+
headers[key] = token;
|
|
40
|
+
return headers;
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
return headers;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TokenData } from "@ramesesinc/lib/server-actions";
|
|
2
|
+
import { GetServerSidePropsContext, GetServerSidePropsResult } from "next";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
export type PageSession = TokenData;
|
|
5
|
+
export declare const PageServerHook: {
|
|
6
|
+
getServerSideProps: <P extends Record<string, any> = Record<string, any>>(getProps?: (context: GetServerSidePropsContext, session?: PageSession | null) => Promise<GetServerSidePropsResult<P>>) => (context: GetServerSidePropsContext) => Promise<{
|
|
7
|
+
props: (P & {
|
|
8
|
+
session: TokenData | null;
|
|
9
|
+
}) | {
|
|
10
|
+
session: TokenData | null;
|
|
11
|
+
then<TResult1 = P, TResult2 = never>(onfulfilled?: ((value: P) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
|
|
12
|
+
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<P | TResult>;
|
|
13
|
+
finally(onfinally?: (() => void) | null | undefined): Promise<P>;
|
|
14
|
+
[Symbol.toStringTag]: string;
|
|
15
|
+
};
|
|
16
|
+
} | {
|
|
17
|
+
props: {
|
|
18
|
+
session: TokenData | null;
|
|
19
|
+
};
|
|
20
|
+
}>;
|
|
21
|
+
};
|
|
22
|
+
type PageHookProps = {
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
session?: PageSession;
|
|
25
|
+
};
|
|
26
|
+
export declare function PageHook({ children, session }: PageHookProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { verifySessionToken } from "@ramesesinc/lib/server-actions";
|
|
3
|
+
import { useRouter } from "next/router";
|
|
4
|
+
import HorizontalLayout from "../layouts/HorizontalLayout";
|
|
5
|
+
import PageLayout from "../layouts/PageLayout";
|
|
6
|
+
import Header from "../lib/components/Header";
|
|
7
|
+
import { useApp } from "./AppContext";
|
|
8
|
+
export const PageServerHook = {
|
|
9
|
+
getServerSideProps: (getProps) => {
|
|
10
|
+
return async (context) => {
|
|
11
|
+
var _a;
|
|
12
|
+
let session = null;
|
|
13
|
+
const token = context.req.cookies["session"];
|
|
14
|
+
if (token != null && token.trim() !== "") {
|
|
15
|
+
const akey = ((_a = process.env.API_KEY) !== null && _a !== void 0 ? _a : "").trim();
|
|
16
|
+
const tokenData = await verifySessionToken(token, akey);
|
|
17
|
+
if (tokenData)
|
|
18
|
+
session = tokenData;
|
|
19
|
+
}
|
|
20
|
+
if (getProps != null) {
|
|
21
|
+
const result = await getProps(context, session);
|
|
22
|
+
if ("props" in result) {
|
|
23
|
+
return { props: Object.assign(Object.assign({}, result.props), { session }) };
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return { props: { session } };
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
export function PageHook({ children, session }) {
|
|
31
|
+
const app = useApp();
|
|
32
|
+
const router = useRouter();
|
|
33
|
+
const handleActivity = (item) => {
|
|
34
|
+
if ((app === null || app === void 0 ? void 0 : app.tenant) != null && (app === null || app === void 0 ? void 0 : app.module) != null && (item === null || item === void 0 ? void 0 : item.id) != null) {
|
|
35
|
+
const newPath = `/${app.tenant}/${app.module}/${item.id}`;
|
|
36
|
+
void router.push(newPath);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
let leftView = null;
|
|
40
|
+
let headerView = null;
|
|
41
|
+
const hasSession = (session === null || session === void 0 ? void 0 : session.SESSIONID) != null;
|
|
42
|
+
if (hasSession) {
|
|
43
|
+
// leftView = <ActivityBar value={app?.activityid || ''} handler={handleActivity} />;
|
|
44
|
+
headerView = _jsx(Header, {});
|
|
45
|
+
}
|
|
46
|
+
return (_jsx(HorizontalLayout, { className: "h-screen bg-white", left: leftView, children: _jsx(PageLayout, { header: headerView, children: children }) }));
|
|
47
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const useUrlParams: () => {
|
|
2
|
+
getUrl: () => string;
|
|
3
|
+
addPath: (value: string) => void;
|
|
4
|
+
removeLastPath: () => void;
|
|
5
|
+
getLastHash: () => string | null;
|
|
6
|
+
updateHash: (value: string, index?: number) => void;
|
|
7
|
+
addQuery: (params: Record<string, string>) => void;
|
|
8
|
+
getQuery: () => Record<string, string>;
|
|
9
|
+
setQuery: (params: Record<string, string>) => void;
|
|
10
|
+
setAnchorPath: (path: string) => void;
|
|
11
|
+
};
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
// src/hooks/useUrlParams.ts
|
|
2
|
+
"use client";
|
|
3
|
+
import { useCallback, useEffect, useState } from "react";
|
|
4
|
+
export const useUrlParams = () => {
|
|
5
|
+
const [currentUrl, setCurrentUrl] = useState("");
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
if (typeof window === "undefined")
|
|
8
|
+
return;
|
|
9
|
+
const syncUrl = () => {
|
|
10
|
+
setCurrentUrl(window.location.href);
|
|
11
|
+
};
|
|
12
|
+
window.addEventListener("popstate", syncUrl);
|
|
13
|
+
return () => {
|
|
14
|
+
window.removeEventListener("popstate", syncUrl);
|
|
15
|
+
};
|
|
16
|
+
}, []);
|
|
17
|
+
/** Returns the full current URL **/
|
|
18
|
+
const getUrl = useCallback(() => {
|
|
19
|
+
return currentUrl;
|
|
20
|
+
}, [currentUrl]);
|
|
21
|
+
/**
|
|
22
|
+
* Appends raw value to the end of the URL
|
|
23
|
+
* Example: addPath("#test")
|
|
24
|
+
*/
|
|
25
|
+
const addPath = useCallback((value) => {
|
|
26
|
+
if (typeof window === "undefined")
|
|
27
|
+
return;
|
|
28
|
+
const newUrl = `${window.location.href}${value}`;
|
|
29
|
+
window.history.pushState({}, "", newUrl);
|
|
30
|
+
setCurrentUrl(newUrl);
|
|
31
|
+
}, []);
|
|
32
|
+
/**
|
|
33
|
+
* Removes the LAST #segment from the URL
|
|
34
|
+
* Example:
|
|
35
|
+
* http://x/main#one#two -> http://x/main#one
|
|
36
|
+
*/
|
|
37
|
+
const removeLastPath = useCallback(() => {
|
|
38
|
+
if (typeof window === "undefined")
|
|
39
|
+
return;
|
|
40
|
+
const url = window.location.href;
|
|
41
|
+
const lastHashIndex = url.lastIndexOf("#");
|
|
42
|
+
if (lastHashIndex === -1)
|
|
43
|
+
return;
|
|
44
|
+
const newUrl = url.substring(0, lastHashIndex);
|
|
45
|
+
window.history.pushState({}, "", newUrl);
|
|
46
|
+
setCurrentUrl(newUrl);
|
|
47
|
+
}, []);
|
|
48
|
+
/**
|
|
49
|
+
* Gets the LAST #segment
|
|
50
|
+
* Example:
|
|
51
|
+
* http://x/main#one#two -> "#two"
|
|
52
|
+
*/
|
|
53
|
+
const getLastHash = useCallback(() => {
|
|
54
|
+
const url = currentUrl;
|
|
55
|
+
const lastHashIndex = url.lastIndexOf("#");
|
|
56
|
+
if (lastHashIndex === -1)
|
|
57
|
+
return null;
|
|
58
|
+
return url.substring(lastHashIndex);
|
|
59
|
+
}, [currentUrl]);
|
|
60
|
+
const updateHash = useCallback((value, index) => {
|
|
61
|
+
if (typeof window === "undefined")
|
|
62
|
+
return;
|
|
63
|
+
const url = window.location.href;
|
|
64
|
+
const parts = url.split("#");
|
|
65
|
+
// Normalize value (remove leading #)
|
|
66
|
+
const cleanValue = value.startsWith("#") ? value.substring(1) : value;
|
|
67
|
+
// No hash exists → append
|
|
68
|
+
if (parts.length === 1) {
|
|
69
|
+
const newUrl = `${url}#${cleanValue}`;
|
|
70
|
+
window.history.pushState({}, "", newUrl);
|
|
71
|
+
setCurrentUrl(newUrl);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
// DEFAULT: update last hash only
|
|
75
|
+
if (index === undefined) {
|
|
76
|
+
parts[parts.length - 1] = cleanValue;
|
|
77
|
+
const newUrl = parts.join("#");
|
|
78
|
+
window.history.pushState({}, "", newUrl);
|
|
79
|
+
setCurrentUrl(newUrl);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
// Index-based update with truncation
|
|
83
|
+
const targetIndex = index + 1; // parts[0] is base URL
|
|
84
|
+
if (targetIndex < 1 || targetIndex >= parts.length)
|
|
85
|
+
return;
|
|
86
|
+
// Replace target
|
|
87
|
+
parts[targetIndex] = cleanValue;
|
|
88
|
+
// Remove everything after target
|
|
89
|
+
const newParts = parts.slice(0, targetIndex + 1);
|
|
90
|
+
const newUrl = newParts.join("#");
|
|
91
|
+
window.history.pushState({}, "", newUrl);
|
|
92
|
+
setCurrentUrl(newUrl);
|
|
93
|
+
}, []);
|
|
94
|
+
const addQuery = useCallback((params) => {
|
|
95
|
+
if (typeof window === "undefined")
|
|
96
|
+
return;
|
|
97
|
+
const url = window.location.href;
|
|
98
|
+
const hashIndex = url.indexOf("#");
|
|
99
|
+
const base = hashIndex === -1 ? url : url.substring(0, hashIndex);
|
|
100
|
+
const hashStack = hashIndex === -1 ? "" : url.substring(hashIndex);
|
|
101
|
+
const queryString = Object.entries(params)
|
|
102
|
+
.map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)
|
|
103
|
+
.join("&");
|
|
104
|
+
const newUrl = `${base}${hashStack}?${queryString}`;
|
|
105
|
+
window.history.pushState({}, "", newUrl);
|
|
106
|
+
setCurrentUrl(newUrl);
|
|
107
|
+
}, []);
|
|
108
|
+
const getQuery = useCallback(() => {
|
|
109
|
+
if (typeof window === "undefined")
|
|
110
|
+
return {};
|
|
111
|
+
const url = window.location.href;
|
|
112
|
+
const params = {};
|
|
113
|
+
// Split off hash
|
|
114
|
+
const [base, hash] = url.split("#");
|
|
115
|
+
// Use query from hash first, if exists
|
|
116
|
+
const queryFromHash = (hash === null || hash === void 0 ? void 0 : hash.includes("?")) ? hash.split("?")[1] : "";
|
|
117
|
+
// If no query in hash, fallback to normal URL query
|
|
118
|
+
const queryString = queryFromHash || base.split("?")[1] || "";
|
|
119
|
+
if (!queryString)
|
|
120
|
+
return {};
|
|
121
|
+
queryString.split("&").forEach((pair) => {
|
|
122
|
+
const [key, value] = pair.split("=");
|
|
123
|
+
if (key)
|
|
124
|
+
params[decodeURIComponent(key)] = decodeURIComponent(value || "");
|
|
125
|
+
});
|
|
126
|
+
return params;
|
|
127
|
+
}, []);
|
|
128
|
+
const setQuery = useCallback((params) => {
|
|
129
|
+
if (typeof window === "undefined")
|
|
130
|
+
return;
|
|
131
|
+
const url = window.location.href;
|
|
132
|
+
const hashIndex = url.indexOf("#");
|
|
133
|
+
const base = hashIndex === -1 ? url.split("?")[0] : url.substring(0, hashIndex);
|
|
134
|
+
const hash = hashIndex === -1 ? "" : url.substring(hashIndex).split("?")[0];
|
|
135
|
+
const queryString = Object.entries(params)
|
|
136
|
+
.map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)
|
|
137
|
+
.join("&");
|
|
138
|
+
const newUrl = `${base}${hash}?${queryString}`;
|
|
139
|
+
window.history.pushState({}, "", newUrl);
|
|
140
|
+
setCurrentUrl(newUrl);
|
|
141
|
+
}, []);
|
|
142
|
+
const setAnchorPath = (path) => {
|
|
143
|
+
const newPath = path.startsWith("#") ? path : `#${path}`;
|
|
144
|
+
let oldPath = window.location.href;
|
|
145
|
+
const idx = oldPath.indexOf("#");
|
|
146
|
+
if (idx > 0) {
|
|
147
|
+
oldPath = oldPath.substring(0, idx);
|
|
148
|
+
}
|
|
149
|
+
const newUrl = oldPath + newPath;
|
|
150
|
+
window.history.pushState({}, "", newUrl);
|
|
151
|
+
setCurrentUrl(newUrl);
|
|
152
|
+
};
|
|
153
|
+
return {
|
|
154
|
+
getUrl,
|
|
155
|
+
addPath,
|
|
156
|
+
removeLastPath,
|
|
157
|
+
getLastHash,
|
|
158
|
+
updateHash,
|
|
159
|
+
addQuery,
|
|
160
|
+
getQuery,
|
|
161
|
+
setQuery,
|
|
162
|
+
setAnchorPath,
|
|
163
|
+
};
|
|
164
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export { AppProvider, useApp } from "./core/AppContext";
|
|
2
|
+
export { AuthProvider, useAuth } from "./core/AuthContext";
|
|
3
|
+
export { PageProvider, usePageContext } from "./core/PageContext";
|
|
4
|
+
export { getComponent } from "./core/ComponentCache";
|
|
5
|
+
export { getHtml } from "./core/HtmlCache";
|
|
6
|
+
export { getPage } from "./core/PageCache";
|
|
7
|
+
export { usePageRegistry } from "./core/PageRegistry";
|
|
8
|
+
export { StepHandler } from "./core/StepHandler";
|
|
9
|
+
export { PageHook, PageServerHook } from "./core/page-helper";
|
|
10
|
+
export { PageViewProvider, usePageViewContext } from "./core/PageViewContext";
|
|
11
|
+
export { default as DynamicIcon } from "./core/DynamicIcon";
|
|
12
|
+
export { default as Page } from "./core/Page";
|
|
13
|
+
export { default as RowContext, RowProvider, useRowContext } from "./core/RowContext";
|
|
14
|
+
export { default as UIDependHandler } from "./core/UIDependHandler";
|
|
15
|
+
export type { PageSession } from "./core/page-helper";
|
|
16
|
+
export type { DataApiHandler, PageContextValue, PageHandle, PageProviderRef } from "./core/PageContext";
|
|
17
|
+
export type { PageRegistry } from "./core/PageRegistry";
|
|
18
|
+
export type { PageOptions, PageSelectionHandler, PageViewContextValue, PageViewHandle } from "./core/PageViewContext";
|
|
19
|
+
export type { StepActionHandler } from "./core/StepHandler";
|
|
20
|
+
export { useUrlParams } from "./hooks/useUrlParams";
|
|
21
|
+
export { default as BasicTemplate } from "./templates/BasicTemplate";
|
|
22
|
+
export { default as DataListTemplate } from "./templates/DataListTemplate";
|
|
23
|
+
export { default as ExplorerTemplate } from "./templates/ExplorerTemplate";
|
|
24
|
+
export { default as TxnFormTemplate } from "./templates/TxnFormTemplate";
|
|
25
|
+
export { default as WizardTemplate } from "./templates/WizardTemplate";
|
|
26
|
+
export { default as BorderLayout } from "./layouts/BorderLayout";
|
|
27
|
+
export { default as CardLayout } from "./layouts/CardLayout";
|
|
28
|
+
export { default as CenterLayout } from "./layouts/CenterLayout";
|
|
29
|
+
export { default as GridLayout } from "./layouts/GridLayout";
|
|
30
|
+
export { default as HorizontalLayout } from "./layouts/HorizontalLayout";
|
|
31
|
+
export { default as HPanel } from "./layouts/HPanel";
|
|
32
|
+
export { default as MainLayout } from "./layouts/MainLayout";
|
|
33
|
+
export { default as PageLayout } from "./layouts/PageLayout";
|
|
34
|
+
export { default as VPanel } from "./layouts/VPanel";
|
|
35
|
+
export { default as XLayout } from "./layouts/XLayout";
|
|
36
|
+
export { default as YLayout } from "./layouts/YLayout";
|
|
37
|
+
export { default as DateField } from "./components/input/DateField";
|
|
38
|
+
export { default as DayPicker } from "./components/input/DayPicker";
|
|
39
|
+
export { default as JsonCode } from "./components/input/JsonCode";
|
|
40
|
+
export { default as MonthPicker } from "./components/input/MonthPicker";
|
|
41
|
+
export { default as Select } from "./components/input/Select";
|
|
42
|
+
export { default as Text } from "./components/input/Text";
|
|
43
|
+
export { default as StringDecision } from "./components/input/StringDecision";
|
|
44
|
+
export { default as TabMenu } from "./components/list/TabMenu";
|
|
45
|
+
export { default as TreeMenu } from "./components/list/TreeMenu";
|
|
46
|
+
export { default as Label } from "./components/output/Label";
|
|
47
|
+
export { default as DataList } from "./components/table/DataList";
|
|
48
|
+
export { default as ComponentView } from "./components/view/ComponentView";
|
|
49
|
+
export { default as FilterView } from "./components/view/FilterView";
|
|
50
|
+
export { default as HtmlView } from "./components/view/HtmlView";
|
|
51
|
+
export { default as IFrameView } from "./components/view/IFrameView";
|
|
52
|
+
export { default as RootView } from "./components/view/RootView";
|
|
53
|
+
export { default as WizardView } from "./components/view/WizardView";
|
|
54
|
+
export { default as AlertMessage } from "./components/action/AlertMessage";
|
|
55
|
+
export { default as Edit } from "./components/action/Edit";
|
|
56
|
+
export { default as SaveData } from "./components/action/SaveData";
|
|
57
|
+
export { default as UpdateContext } from "./components/action/UpdateContext";
|
|
58
|
+
export { default as ViewBackPage } from "./components/action/ViewBackPage";
|
|
59
|
+
export { default as ViewPage } from "./components/action/ViewPage";
|
|
60
|
+
export { default as PageView } from "./components/view/PageView";
|
|
61
|
+
export { default as IconMenu } from "./components/list/IconMenu";
|
|
62
|
+
export { default as TxnTaskList } from "./components/list/TxnTaskList";
|
|
63
|
+
export { handlePlatformRoute } from "./lib/PlatformRoute";
|
|
64
|
+
export { ResourceLoader } from "./lib/utils/ResourceLoader";
|
|
65
|
+
export { default as WebPlatform } from "./lib/WebPlatform";
|