@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,38 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
@layer base {
|
|
6
|
+
|
|
7
|
+
* {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
body {
|
|
12
|
+
@apply bg-white text-gray-900;
|
|
13
|
+
|
|
14
|
+
font-family: var(--font-inter), -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
input:focus,
|
|
18
|
+
textarea:focus,
|
|
19
|
+
select:focus {
|
|
20
|
+
@apply outline-none placeholder-gray-400 ring-2 ring-primary-400 border-transparent;
|
|
21
|
+
@apply transition-all duration-200;
|
|
22
|
+
@apply bg-yellow-50;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* --- Base Styles for Headings --- */
|
|
26
|
+
h1 { @apply text-4xl font-bold mb-4; }
|
|
27
|
+
h2 { @apply text-3xl font-semibold mb-3; }
|
|
28
|
+
h3 { @apply text-2xl font-semibold mb-2; }
|
|
29
|
+
h4 { @apply text-xl font-medium mb-1; }
|
|
30
|
+
h5 { @apply text-lg font-semibold mb-1; }
|
|
31
|
+
h6 { @apply text-base font-semibold mb-1; }
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@layer utilities {
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdHlsZXMvaW5kZXguY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIiwiZmlsZSI6ImluZGV4LmNzcyIsInNvdXJjZXNDb250ZW50IjpbIkB0YWlsd2luZCBiYXNlO1xyXG5AdGFpbHdpbmQgY29tcG9uZW50cztcclxuQHRhaWx3aW5kIHV0aWxpdGllcztcclxuXHJcbkBsYXllciBiYXNlIHtcclxuXHJcbiAgKiB7XHJcbiAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xyXG4gIH1cclxuXHJcbiAgYm9keSB7XHJcbiAgICBAYXBwbHkgYmctd2hpdGUgdGV4dC1ncmF5LTkwMDtcclxuXHJcbiAgICBmb250LWZhbWlseTogdmFyKC0tZm9udC1pbnRlciksIC1hcHBsZS1zeXN0ZW0sIEJsaW5rTWFjU3lzdGVtRm9udCwgJ1NlZ29lIFVJJywgJ1JvYm90bycsICdPeHlnZW4nLCAnVWJ1bnR1JywgJ0NhbnRhcmVsbCcsICdGaXJhIFNhbnMnLCAnRHJvaWQgU2FucycsICdIZWx2ZXRpY2EgTmV1ZScsIHNhbnMtc2VyaWY7XHJcbiAgfVxyXG5cclxuICBpbnB1dDpmb2N1cyxcclxuICB0ZXh0YXJlYTpmb2N1cyxcclxuICBzZWxlY3Q6Zm9jdXMge1xyXG4gICAgQGFwcGx5IG91dGxpbmUtbm9uZSBwbGFjZWhvbGRlci1ncmF5LTQwMCByaW5nLTIgcmluZy1wcmltYXJ5LTQwMCBib3JkZXItdHJhbnNwYXJlbnQ7XHJcbiAgICBAYXBwbHkgdHJhbnNpdGlvbi1hbGwgZHVyYXRpb24tMjAwO1xyXG4gICAgQGFwcGx5IGJnLXllbGxvdy01MDtcclxuICB9XHJcblxyXG4gICAgLyogLS0tIEJhc2UgU3R5bGVzIGZvciBIZWFkaW5ncyAtLS0gKi9cclxuICBoMSB7IEBhcHBseSB0ZXh0LTR4bCBmb250LWJvbGQgbWItNDsgfVxyXG4gIGgyIHsgQGFwcGx5IHRleHQtM3hsIGZvbnQtc2VtaWJvbGQgbWItMzsgfVxyXG4gIGgzIHsgQGFwcGx5IHRleHQtMnhsIGZvbnQtc2VtaWJvbGQgbWItMjsgfVxyXG4gIGg0IHsgQGFwcGx5IHRleHQteGwgZm9udC1tZWRpdW0gbWItMTsgfVxyXG4gIGg1IHsgQGFwcGx5IHRleHQtbGcgZm9udC1zZW1pYm9sZCBtYi0xOyB9XHJcbiAgaDYgeyBAYXBwbHkgdGV4dC1iYXNlIGZvbnQtc2VtaWJvbGQgbWItMTsgfVxyXG59XHJcblxyXG5AbGF5ZXIgdXRpbGl0aWVzIHtcclxuXHJcbn1cclxuIl19 */
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import ErrorMessage from "../core/ErrorMessage";
|
|
4
|
+
import Panel from "../core/Panel";
|
|
5
|
+
import BorderLayout from "../layouts/BorderLayout";
|
|
6
|
+
const BasicTemplate = (props) => {
|
|
7
|
+
const { header, footer, center, left, right } = props;
|
|
8
|
+
const [error, setError] = useState(null);
|
|
9
|
+
const loadPanel = (section) => {
|
|
10
|
+
return _jsx(Panel, { content: section });
|
|
11
|
+
};
|
|
12
|
+
return (_jsxs("div", { className: "flex flex-col", children: [_jsx(ErrorMessage, { error: error }), _jsx(BorderLayout, { north: loadPanel(header), south: loadPanel(footer), east: loadPanel(right), west: loadPanel(left), children: loadPanel(center) })] }));
|
|
13
|
+
};
|
|
14
|
+
export default BasicTemplate;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import BorderLayout from "../layouts/BorderLayout";
|
|
3
|
+
import HPanel from "../layouts/HPanel";
|
|
4
|
+
import VPanel from "../layouts/VPanel";
|
|
5
|
+
import { SectionProvider } from "../lib/utils/SectionProvider";
|
|
6
|
+
const CrudFormTemplate = (props) => {
|
|
7
|
+
const sp = SectionProvider(props !== null && props !== void 0 ? props : {});
|
|
8
|
+
const getRight = () => {
|
|
9
|
+
const comp = sp.getSection("right");
|
|
10
|
+
if (Array.isArray(comp)) {
|
|
11
|
+
return _jsx(VPanel, { gap: 8, children: comp });
|
|
12
|
+
}
|
|
13
|
+
return comp;
|
|
14
|
+
};
|
|
15
|
+
const getLeft = () => {
|
|
16
|
+
const comp = sp.getSection("left");
|
|
17
|
+
if (Array.isArray(comp)) {
|
|
18
|
+
return _jsx(VPanel, { gap: 8, children: comp });
|
|
19
|
+
}
|
|
20
|
+
return comp;
|
|
21
|
+
};
|
|
22
|
+
const getHeader = () => {
|
|
23
|
+
const comp = sp.getSection("header");
|
|
24
|
+
if (Array.isArray(comp)) {
|
|
25
|
+
return _jsx(HPanel, { gap: 8, children: comp });
|
|
26
|
+
}
|
|
27
|
+
return comp;
|
|
28
|
+
};
|
|
29
|
+
const getFooter = () => {
|
|
30
|
+
const comp = sp.getSection("footer");
|
|
31
|
+
if (Array.isArray(comp)) {
|
|
32
|
+
return _jsx(HPanel, { gap: 8, children: comp });
|
|
33
|
+
}
|
|
34
|
+
return comp;
|
|
35
|
+
};
|
|
36
|
+
return (_jsx(BorderLayout, { north: getHeader(), south: getFooter(), east: getRight(), west: getLeft(), children: _jsx("p", { children: "CrudFormTemplate" }) }));
|
|
37
|
+
};
|
|
38
|
+
export default CrudFormTemplate;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import DataList from "../components/table/DataList";
|
|
3
|
+
import Panel from "../core/Panel";
|
|
4
|
+
import BorderLayout from "../layouts/BorderLayout";
|
|
5
|
+
const DataListTemplate = (props) => {
|
|
6
|
+
const { title, cols, data, rowsPerPage, rowActions, bulkActions, toolbarActions, header, footer, right, left, commonActions, filters, disableTotalCount, emptyMessage, errorMessage, striped, bordered, hover, dense, showPagination, paginationPosition, showPageInfo, showTotalCount, showRowsPerPage, rowsPerPageOptions, searchable, searchPlaceholder, searchDebounce, onSearchChange, showFilterPanel, onFilterChange, sortable, defaultSort, showSortIndicator, selectable, selectionMode, onSelectionChange, selectOnRowClick, onRowClick, onRowDoubleClick, toolbarTitle, showRefreshButton, showExportButton, onError, onRefresh, onExport, className, rowClassName, } = props !== null && props !== void 0 ? props : {};
|
|
7
|
+
const attr = { title, cols, data, rowsPerPage, commonActions, rowActions, toolbarActions, bulkActions, filters };
|
|
8
|
+
const loadPanel = (section) => {
|
|
9
|
+
return _jsx(Panel, { content: section });
|
|
10
|
+
};
|
|
11
|
+
return (_jsx(BorderLayout, { className: "py-2", north: loadPanel(header), south: loadPanel(footer), east: loadPanel(right), west: loadPanel(left), children: _jsx(DataList, { attr: attr }) }));
|
|
12
|
+
};
|
|
13
|
+
export default DataListTemplate;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type ExplorerTemplateProps = {
|
|
2
|
+
items: any[];
|
|
3
|
+
data?: Record<string, any>;
|
|
4
|
+
menugroup?: string;
|
|
5
|
+
};
|
|
6
|
+
declare const ExplorerTemplate: {
|
|
7
|
+
(props: ExplorerTemplateProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
hasSelectionHandling: boolean;
|
|
9
|
+
};
|
|
10
|
+
export default ExplorerTemplate;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { PageView, TreeMenu } from "../components";
|
|
5
|
+
import BorderLayout from "../layouts/BorderLayout";
|
|
6
|
+
const ExplorerTemplate = (props) => {
|
|
7
|
+
const { items = [], data, menugroup = "mainmenu" } = props !== null && props !== void 0 ? props : {};
|
|
8
|
+
const name = "selectedPage";
|
|
9
|
+
const [open, setOpen] = useState(true);
|
|
10
|
+
return (_jsx("div", { className: "h-[calc(100vh-60px)]", children: _jsx(BorderLayout, { west: _jsxs("div", { className: "relative flex-shrink-0 h-full border-r", children: [_jsx("div", { className: "h-full transition-[width] duration-300 overflow-hidden", style: { width: open ? "230px" : "50px" }, children: _jsx("div", { className: "h-full transition-[opacity] duration-200", style: {
|
|
11
|
+
width: "230px",
|
|
12
|
+
opacity: open ? 1 : 0,
|
|
13
|
+
pointerEvents: open ? "auto" : "none",
|
|
14
|
+
}, children: _jsx(TreeMenu, { name: name, menugroup: menugroup, items: items, data: data }) }) }), _jsx("button", { onClick: () => setOpen((prev) => !prev), className: "absolute top-5 -right-4 w-8 h-8 bg-white border rounded-full flex items-center justify-center shadow z-10", children: open ? _jsx(ChevronLeft, { size: 18 }) : _jsx(ChevronRight, { size: 18 }) })] }), children: _jsx("div", { className: "px-6 py-2", children: _jsx(PageView, { name: name, depends: name }) }) }) }));
|
|
15
|
+
};
|
|
16
|
+
ExplorerTemplate.hasSelectionHandling = true;
|
|
17
|
+
export default ExplorerTemplate;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ComponentView, TabMenu } from "../components";
|
|
3
|
+
import { usePageContext } from "../core/PageContext";
|
|
4
|
+
import BorderLayout from "../layouts/BorderLayout";
|
|
5
|
+
import { render } from "../lib/utils/ExprUtil";
|
|
6
|
+
const items = [
|
|
7
|
+
{ id: "infos", title: "Infos", component: "TxnInfos" },
|
|
8
|
+
{ id: "professionals", title: "Professionals", component: "TxnProfessionals" },
|
|
9
|
+
{ id: "requirements", title: "Attachments", component: "TxnRequirements" },
|
|
10
|
+
{ id: "evaluations", title: "Evaluations", component: "TxnEvaluations" },
|
|
11
|
+
{ id: "fees", title: "Fees", component: "TxnFees" },
|
|
12
|
+
{ id: "certificates", title: "Certificates", hidden: true, component: "TxnCertificates" },
|
|
13
|
+
{ id: "issuances", title: "Issuances", component: "" },
|
|
14
|
+
];
|
|
15
|
+
const tasksItems = [
|
|
16
|
+
{
|
|
17
|
+
id: "tasks",
|
|
18
|
+
title: "Tasks",
|
|
19
|
+
component: "TxnTaskList",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: "history",
|
|
23
|
+
title: "History",
|
|
24
|
+
component: "TxnHistoryList",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: "findings",
|
|
28
|
+
title: "Findings",
|
|
29
|
+
component: "TxnFindingList",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: "fees",
|
|
33
|
+
title: "Fees",
|
|
34
|
+
component: "TxnFeesList",
|
|
35
|
+
},
|
|
36
|
+
];
|
|
37
|
+
const TxnFormTemplate = (props) => {
|
|
38
|
+
const { title } = props || {};
|
|
39
|
+
const pageContext = usePageContext();
|
|
40
|
+
console.log(pageContext === null || pageContext === void 0 ? void 0 : pageContext.getAllData());
|
|
41
|
+
const resolvedTitle = () => {
|
|
42
|
+
const value = (pageContext === null || pageContext === void 0 ? void 0 : pageContext.getAllData()) || {};
|
|
43
|
+
if (!title)
|
|
44
|
+
return null;
|
|
45
|
+
// If it contains template expressions, render them
|
|
46
|
+
if (title.includes("{{")) {
|
|
47
|
+
return render(title, value);
|
|
48
|
+
}
|
|
49
|
+
return title;
|
|
50
|
+
};
|
|
51
|
+
const header = () => {
|
|
52
|
+
var _a;
|
|
53
|
+
return (_jsx("div", { className: "border-b", children: _jsx("p", { dangerouslySetInnerHTML: { __html: (_a = resolvedTitle()) !== null && _a !== void 0 ? _a : "" }, className: "text-2xl" }) }));
|
|
54
|
+
};
|
|
55
|
+
const summaryPanel = () => {
|
|
56
|
+
return (_jsx("div", { children: _jsxs("div", { className: "p-2", children: [_jsx("span", { className: "text-lg font-semibold", children: "Basic Information" }), _jsxs("div", { className: "grid grid-cols-2 text-sm gap-2 p-2 border-r", children: [_jsxs("div", { className: "flex justify-between pr-4", children: [_jsx("span", { className: "text-gray-500", children: "App No." }), _jsx("span", { children: pageContext === null || pageContext === void 0 ? void 0 : pageContext.get("data._id") })] }), _jsxs("div", { className: "flex justify-between pr-4", children: [_jsx("span", { className: "text-gray-500", children: "Date Submitted" }), _jsx("span", { children: pageContext === null || pageContext === void 0 ? void 0 : pageContext.get("data.dtsubmitted") })] }), _jsxs("div", { className: "flex justify-between pr-4", children: [_jsx("span", { className: "text-gray-500", children: "Tracking No." }), _jsx("span", { children: pageContext === null || pageContext === void 0 ? void 0 : pageContext.get("data.trackingno") })] }), _jsxs("div", { className: "flex justify-between pr-4", children: [_jsx("span", { className: "text-gray-500", children: "Type" }), _jsx("span", { children: pageContext === null || pageContext === void 0 ? void 0 : pageContext.get("data.type") })] }), _jsxs("div", { className: "flex justify-between pr-4", children: [_jsx("span", { className: "text-gray-500", children: "Applicant" }), _jsx("span", { children: pageContext === null || pageContext === void 0 ? void 0 : pageContext.get("data.applicant.name") })] })] })] }) }));
|
|
57
|
+
};
|
|
58
|
+
const center = () => {
|
|
59
|
+
return (_jsxs("div", { children: [_jsx("div", { className: "", children: summaryPanel() }), _jsx(TabMenu, { name: "selectedTxnTab", items: items }), _jsx(ComponentView, { name: "selectedTxnTab", depends: "selectedTxnTab" })] }));
|
|
60
|
+
};
|
|
61
|
+
const right = () => {
|
|
62
|
+
return (_jsxs("div", { className: "w-[450px] border-l", children: [_jsx(TabMenu, { name: "selectedTasksTab", items: tasksItems }), _jsx(ComponentView, { name: "selectedTasksTab", depends: "selectedTasksTab" })] }));
|
|
63
|
+
};
|
|
64
|
+
return (_jsx(BorderLayout, { north: header(), children: _jsx("div", { className: "h-[calc(100vh-95px)]", children: _jsx(BorderLayout, { east: right(), children: center() }) }) }));
|
|
65
|
+
};
|
|
66
|
+
export default TxnFormTemplate;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StepActionHandler } from "../core/StepHandler";
|
|
2
|
+
type WizardTemplateProps = {
|
|
3
|
+
component?: string;
|
|
4
|
+
attr?: Record<string, any>;
|
|
5
|
+
stepHandler: StepActionHandler;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
};
|
|
8
|
+
declare const WizardTemplate: (props: WizardTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default WizardTemplate;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from "@ramesesinc/client";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import { useApp } from "../core/AppContext";
|
|
5
|
+
import BorderLayout from "../layouts/BorderLayout";
|
|
6
|
+
const WizardTemplate = (props) => {
|
|
7
|
+
const { component, attr = {}, stepHandler, children } = props !== null && props !== void 0 ? props : {};
|
|
8
|
+
const [view, setView] = useState(null);
|
|
9
|
+
const { getComponentCache } = useApp();
|
|
10
|
+
const loadComponent = async () => {
|
|
11
|
+
if (component == null || component.trim() === "") {
|
|
12
|
+
setView(null);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const comp = await getComponentCache(component);
|
|
16
|
+
const Tmpl = comp.template;
|
|
17
|
+
const el = _jsx(Tmpl, Object.assign({}, (attr !== null && attr !== void 0 ? attr : {})));
|
|
18
|
+
setView(el);
|
|
19
|
+
};
|
|
20
|
+
const render = () => {
|
|
21
|
+
if (view != null) {
|
|
22
|
+
return view;
|
|
23
|
+
}
|
|
24
|
+
return children;
|
|
25
|
+
};
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
loadComponent();
|
|
28
|
+
}, []);
|
|
29
|
+
const handleNext = () => {
|
|
30
|
+
stepHandler === null || stepHandler === void 0 ? void 0 : stepHandler.next();
|
|
31
|
+
};
|
|
32
|
+
const handleBack = () => {
|
|
33
|
+
stepHandler === null || stepHandler === void 0 ? void 0 : stepHandler.back();
|
|
34
|
+
};
|
|
35
|
+
return (_jsx("div", { children: _jsx(BorderLayout, { south: _jsxs("div", { className: "flex justify-between gap-2", children: [(stepHandler === null || stepHandler === void 0 ? void 0 : stepHandler.hasPrev()) && _jsx(Button, { onClick: handleBack, children: "Back" }), (stepHandler === null || stepHandler === void 0 ? void 0 : stepHandler.hasNext()) && (_jsx("div", { className: "flex gap-2", children: _jsx(Button, { onClick: handleNext, children: "Next" }) }))] }), children: render() }) }));
|
|
36
|
+
};
|
|
37
|
+
export default WizardTemplate;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as BasicTemplate } from "./BasicTemplate";
|
|
2
|
+
export { default as DataListTemplate } from "./DataListTemplate";
|
|
3
|
+
export { default as ExplorerTemplate } from "./ExplorerTemplate";
|
|
4
|
+
export { default as TxnFormTemplate } from "./TxnFormTemplate";
|
|
5
|
+
export { default as WizardTemplate } from "./WizardTemplate";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as BasicTemplate } from "./BasicTemplate";
|
|
2
|
+
export { default as DataListTemplate } from "./DataListTemplate";
|
|
3
|
+
export { default as ExplorerTemplate } from "./ExplorerTemplate";
|
|
4
|
+
export { default as TxnFormTemplate } from "./TxnFormTemplate";
|
|
5
|
+
export { default as WizardTemplate } from "./WizardTemplate";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BindingModel } from "@ramesesinc/client";
|
|
2
|
+
export interface AbstractComponent {
|
|
3
|
+
visibleWhen?: string;
|
|
4
|
+
depends?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface FormComponent extends AbstractComponent {
|
|
7
|
+
title: string;
|
|
8
|
+
binding: BindingModel;
|
|
9
|
+
}
|
|
10
|
+
export interface SingleComponent extends AbstractComponent {
|
|
11
|
+
name: string;
|
|
12
|
+
readonly?: boolean;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface Action {
|
|
16
|
+
binding: BindingModel;
|
|
17
|
+
params?: Record<string, any>;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface listComponent {
|
|
2
|
+
name?: string;
|
|
3
|
+
list?: any[];
|
|
4
|
+
}
|
|
5
|
+
export interface MenuComponent extends listComponent {
|
|
6
|
+
menuid?: string;
|
|
7
|
+
attr?: Record<string, any>;
|
|
8
|
+
}
|
|
9
|
+
export interface StepperComponent extends listComponent {
|
|
10
|
+
menuid?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface TabComponent extends listComponent {
|
|
13
|
+
menuid?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ramesesinc/platform-core",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Platform Core Library",
|
|
5
|
+
"author": "Rameses Systems Inc.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"module": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"style": "dist/index.css",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "rm -rf dist && tsc && postcss src/styles/index.css -o dist/styles/index.css && cp -r src/components dist/ && cp -r src/layouts dist/lib/ && npm run copy-res",
|
|
16
|
+
"build2": "rm -rf dist && tsc",
|
|
17
|
+
"clean": "rm -rf dist",
|
|
18
|
+
"dev": "tsc --watch",
|
|
19
|
+
"prepublishOnly": "npm run build",
|
|
20
|
+
"copy-res": "node -e \"const fs=require('fs');const apps=['etracs','agos','filipizen'];apps.forEach(a=>{const d='../../apps/'+a+'/public/_res';fs.cpSync('src/public/_res',d,{recursive:true,force:true})})\""
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"next": ">=13.5.6 <15.0.0",
|
|
24
|
+
"nunjucks": "^3.2.4",
|
|
25
|
+
"react": ">=18.2.0",
|
|
26
|
+
"react-dom": ">=18.2.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@ramesesinc/app-forms": "0.1.0",
|
|
30
|
+
"@ramesesinc/client": "1.0.14",
|
|
31
|
+
"@ramesesinc/lib": "1.0.12",
|
|
32
|
+
"@types/crypto-js": "^4.2.2",
|
|
33
|
+
"@types/js-cookie": "^3.0.6",
|
|
34
|
+
"@types/node": "^20",
|
|
35
|
+
"@types/nunjucks": "^3.2.6",
|
|
36
|
+
"@types/pako": "^2.0.3",
|
|
37
|
+
"@types/react": "^18",
|
|
38
|
+
"@types/react-dom": "^18",
|
|
39
|
+
"autoprefixer": "^10.4.21",
|
|
40
|
+
"clsx": "^2.1.1",
|
|
41
|
+
"eslint": "^8",
|
|
42
|
+
"eslint-config-next": "14.2.9",
|
|
43
|
+
"postcss": "^8",
|
|
44
|
+
"@ramesesinc/loader": "*",
|
|
45
|
+
"supports-color": "^10.2.2",
|
|
46
|
+
"tailwindcss": "^3.4.1",
|
|
47
|
+
"typescript": "^5",
|
|
48
|
+
"next": ">=13.5.6 <15.0.0"
|
|
49
|
+
},
|
|
50
|
+
"keywords": [
|
|
51
|
+
"ramesesinc-platform-core"
|
|
52
|
+
],
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"seti-ramesesv1": "^1.0.154"
|
|
55
|
+
}
|
|
56
|
+
}
|