flowcore-fn 10.2.4 → 10.2.5
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/pkg-index.js +168 -166
- package/dist/pkg-index.mjs +195 -167
- package/package.json +1 -1
package/dist/pkg-index.js
CHANGED
|
@@ -18808,122 +18808,80 @@ function StatusMain() {
|
|
|
18808
18808
|
|
|
18809
18809
|
// src/components/Sidebar.jsx
|
|
18810
18810
|
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
18811
|
-
|
|
18812
|
-
// Menu Name testing // component or page-Use function name
|
|
18813
|
-
{
|
|
18814
|
-
name: "Workflow Type",
|
|
18815
|
-
component: "workflowType",
|
|
18816
|
-
icon: import_react95.RiGitMergeLine
|
|
18817
|
-
},
|
|
18818
|
-
{
|
|
18819
|
-
name: "Workflow",
|
|
18820
|
-
component: "workflow",
|
|
18821
|
-
icon: import_react95.RiNodeTree
|
|
18822
|
-
},
|
|
18823
|
-
{
|
|
18824
|
-
name: "Workflow Step",
|
|
18825
|
-
component: "workflowStep",
|
|
18826
|
-
icon: import_react95.RiGitBranchLine
|
|
18827
|
-
},
|
|
18828
|
-
{
|
|
18829
|
-
name: "Workflow Transition",
|
|
18830
|
-
component: "workflowTransition",
|
|
18831
|
-
icon: import_react95.RiCornerDownRightLine
|
|
18832
|
-
},
|
|
18833
|
-
{
|
|
18834
|
-
name: "Module",
|
|
18835
|
-
component: "module",
|
|
18836
|
-
icon: import_react95.RiFolder3Line
|
|
18837
|
-
},
|
|
18838
|
-
{
|
|
18839
|
-
name: "Status",
|
|
18840
|
-
component: "status",
|
|
18841
|
-
icon: import_react95.RiCheckboxCircleLine
|
|
18842
|
-
}
|
|
18843
|
-
];
|
|
18844
|
-
var permissionItems = [{
|
|
18845
|
-
name: "Step Permission",
|
|
18846
|
-
component: "step_permission_main",
|
|
18847
|
-
icon: import_react95.RiUserSettingsLine
|
|
18848
|
-
}, {
|
|
18849
|
-
name: "Assignment Rule",
|
|
18850
|
-
component: "AssignmentRuleMain",
|
|
18851
|
-
icon: import_react95.RiFileShieldLine
|
|
18852
|
-
}];
|
|
18853
|
-
var hierarchyItems = [
|
|
18854
|
-
{
|
|
18855
|
-
name: "Hierarchy Node",
|
|
18856
|
-
component: "HierarchyNodeMain",
|
|
18857
|
-
icon: import_react95.RiNodeTree
|
|
18858
|
-
},
|
|
18859
|
-
{
|
|
18860
|
-
name: "Workflow Hierarchy Node Mapping",
|
|
18861
|
-
component: "Workflow_Step_Hierarchy_Mapping_Main",
|
|
18862
|
-
icon: import_react95.RiUserSharedLine
|
|
18863
|
-
},
|
|
18864
|
-
{
|
|
18865
|
-
name: "Workflow Step User Mapping",
|
|
18866
|
-
component: "User_hierarchy_mapping_main",
|
|
18867
|
-
icon: import_react95.RiUserSharedLine
|
|
18868
|
-
},
|
|
18869
|
-
{
|
|
18870
|
-
name: "Workflow Settings",
|
|
18871
|
-
component: "WorkflowSettingMain",
|
|
18872
|
-
icon: import_react95.RiSettings4Line
|
|
18873
|
-
}
|
|
18874
|
-
];
|
|
18875
|
-
var documentItems = [{
|
|
18876
|
-
name: "Document Configuration",
|
|
18877
|
-
component: "DocumentConfigurationmain",
|
|
18878
|
-
icon: import_react95.RiFileSettingsLine
|
|
18879
|
-
}];
|
|
18880
|
-
var fileItems = [{
|
|
18881
|
-
name: "Business Entity",
|
|
18882
|
-
component: "BusinessEntitymain",
|
|
18883
|
-
icon: import_react95.RiFileList3Line
|
|
18884
|
-
}, {
|
|
18885
|
-
name: "File Instance",
|
|
18886
|
-
component: "FileInstanceMain",
|
|
18887
|
-
icon: import_react95.RiFileList3Line
|
|
18888
|
-
}, {
|
|
18889
|
-
name: "File Pool",
|
|
18890
|
-
component: "FilePoolMain",
|
|
18891
|
-
icon: import_react95.RiDatabase2Line
|
|
18892
|
-
}, {
|
|
18893
|
-
name: "Uploaded Document",
|
|
18894
|
-
component: "UploadedDocumentMain",
|
|
18895
|
-
icon: import_react95.RiFileUploadLine
|
|
18896
|
-
}];
|
|
18897
|
-
var communicationItems = [{
|
|
18898
|
-
name: "Notification",
|
|
18899
|
-
component: "Notification_main",
|
|
18900
|
-
icon: import_react95.RiNotification4Line
|
|
18901
|
-
}, {
|
|
18902
|
-
name: "Comment",
|
|
18903
|
-
component: "Comment_main",
|
|
18904
|
-
icon: import_react95.RiChat3Line
|
|
18905
|
-
}];
|
|
18906
|
-
var taskItems = [{
|
|
18907
|
-
name: "Task Instance",
|
|
18908
|
-
component: "TaskInstanceMain",
|
|
18909
|
-
icon: import_react95.RiCheckboxMultipleLine
|
|
18910
|
-
}];
|
|
18911
|
-
var trackingItems = [{
|
|
18912
|
-
name: "Audit Log",
|
|
18913
|
-
component: "AuditLogmain",
|
|
18914
|
-
icon: import_react95.RiShieldCheckLine
|
|
18915
|
-
}, {
|
|
18916
|
-
name: "Movement History",
|
|
18917
|
-
component: "MovementHistorymain",
|
|
18918
|
-
icon: import_react95.RiHistoryLine
|
|
18919
|
-
}];
|
|
18920
|
-
function Sidebar({
|
|
18921
|
-
isOpen,
|
|
18922
|
-
onToggle,
|
|
18923
|
-
childrens
|
|
18924
|
-
}) {
|
|
18811
|
+
function Sidebar({ isOpen, onToggle, childrens, sidebar, sidebarConfig }) {
|
|
18925
18812
|
const router = (0, import_router.useRouter)();
|
|
18926
|
-
const
|
|
18813
|
+
const resolvedSidebarConfig = sidebar != null ? sidebar : sidebarConfig;
|
|
18814
|
+
const masterWorkflowItems = [
|
|
18815
|
+
{ name: "Workflow Type", component: "workflowType", icon: import_react95.RiGitMergeLine, configKey: "isWorkflowType" },
|
|
18816
|
+
{ name: "Workflow", component: "workflow", icon: import_react95.RiNodeTree, configKey: "isWorkflow" },
|
|
18817
|
+
{ name: "Workflow Step", component: "workflowStep", icon: import_react95.RiGitBranchLine, configKey: "isWorkflowStep" },
|
|
18818
|
+
{ name: "Workflow Transition", component: "workflowTransition", icon: import_react95.RiCornerDownRightLine, configKey: "isWorkflowTransition" },
|
|
18819
|
+
{ name: "Module", component: "module", icon: import_react95.RiFolder3Line, configKey: "isModule" },
|
|
18820
|
+
{ name: "Status", component: "status", icon: import_react95.RiCheckboxCircleLine, configKey: "isStatus" }
|
|
18821
|
+
];
|
|
18822
|
+
const masterPermissionItems = [
|
|
18823
|
+
{ name: "Step Permission", component: "step_permission_main", icon: import_react95.RiUserSettingsLine, configKey: "isStepPermission" },
|
|
18824
|
+
{ name: "Assignment Rule", component: "AssignmentRuleMain", icon: import_react95.RiFileShieldLine, configKey: "isAssignmentRule" }
|
|
18825
|
+
];
|
|
18826
|
+
const masterHierarchyItems = [
|
|
18827
|
+
{ name: "Hierarchy Node", component: "HierarchyNodeMain", icon: import_react95.RiNodeTree, configKey: "isHierarchyNode" },
|
|
18828
|
+
{ name: "Workflow Hierarchy Node Mapping", component: "Workflow_Step_Hierarchy_Mapping_Main", icon: import_react95.RiUserSharedLine, configKey: "isWorkflowHierarchyMapping" },
|
|
18829
|
+
{ name: "Workflow Step User Mapping", component: "User_hierarchy_mapping_main", icon: import_react95.RiUserSharedLine, configKey: "isUserHierarchyMapping" },
|
|
18830
|
+
{ name: "Workflow Settings", component: "WorkflowSettingMain", icon: import_react95.RiSettings4Line, configKey: "isWorkflowSettings" }
|
|
18831
|
+
];
|
|
18832
|
+
const masterDocumentItems = [
|
|
18833
|
+
{ name: "Document Configuration", component: "DocumentConfigurationmain", icon: import_react95.RiFileSettingsLine, configKey: "isDocumentConfiguration" }
|
|
18834
|
+
];
|
|
18835
|
+
const masterFileItems = [
|
|
18836
|
+
{ name: "Business Entity", component: "BusinessEntitymain", icon: import_react95.RiFileList3Line, configKey: "isBusinessEntity" },
|
|
18837
|
+
{ name: "File Instance", component: "FileInstanceMain", icon: import_react95.RiFileList3Line, configKey: "isFileInstance" },
|
|
18838
|
+
{ name: "File Pool", component: "FilePoolMain", icon: import_react95.RiDatabase2Line, configKey: "isFilePool" },
|
|
18839
|
+
{ name: "Uploaded Document", component: "UploadedDocumentMain", icon: import_react95.RiFileUploadLine, configKey: "isUploadedDocument" }
|
|
18840
|
+
];
|
|
18841
|
+
const masterCommunicationItems = [
|
|
18842
|
+
{ name: "Notification", component: "Notification_main", icon: import_react95.RiNotification4Line, configKey: "isNotification" },
|
|
18843
|
+
{ name: "Comment", component: "Comment_main", icon: import_react95.RiChat3Line, configKey: "isComment" }
|
|
18844
|
+
];
|
|
18845
|
+
const masterTaskItems = [
|
|
18846
|
+
{ name: "Task Instance", component: "TaskInstanceMain", icon: import_react95.RiCheckboxMultipleLine, configKey: "isTaskInstance" }
|
|
18847
|
+
];
|
|
18848
|
+
const masterTrackingItems = [
|
|
18849
|
+
{ name: "Audit Log", component: "AuditLogmain", icon: import_react95.RiShieldCheckLine, configKey: "isAuditLog" },
|
|
18850
|
+
{ name: "Movement History", component: "MovementHistorymain", icon: import_react95.RiHistoryLine, configKey: "isMovementHistory" }
|
|
18851
|
+
];
|
|
18852
|
+
const filterItems = (items) => {
|
|
18853
|
+
if (!resolvedSidebarConfig) return items;
|
|
18854
|
+
const configObj = Array.isArray(resolvedSidebarConfig) ? Object.assign({}, ...resolvedSidebarConfig) : resolvedSidebarConfig;
|
|
18855
|
+
return items.filter((item) => {
|
|
18856
|
+
if (item.configKey && configObj[item.configKey] === false) {
|
|
18857
|
+
return false;
|
|
18858
|
+
}
|
|
18859
|
+
return true;
|
|
18860
|
+
});
|
|
18861
|
+
};
|
|
18862
|
+
const workflowItems = filterItems(masterWorkflowItems);
|
|
18863
|
+
const permissionItems = filterItems(masterPermissionItems);
|
|
18864
|
+
const hierarchyItems = filterItems(masterHierarchyItems);
|
|
18865
|
+
const documentItems = filterItems(masterDocumentItems);
|
|
18866
|
+
const fileItems = filterItems(masterFileItems);
|
|
18867
|
+
const communicationItems = filterItems(masterCommunicationItems);
|
|
18868
|
+
const taskItems = filterItems(masterTaskItems);
|
|
18869
|
+
const trackingItems = filterItems(masterTrackingItems);
|
|
18870
|
+
const hasAnyAccess = workflowItems.length > 0 || permissionItems.length > 0 || hierarchyItems.length > 0 || documentItems.length > 0 || fileItems.length > 0 || communicationItems.length > 0 || taskItems.length > 0 || trackingItems.length > 0;
|
|
18871
|
+
const getAllAvailableItems = () => [
|
|
18872
|
+
...workflowItems,
|
|
18873
|
+
...permissionItems,
|
|
18874
|
+
...hierarchyItems,
|
|
18875
|
+
...documentItems,
|
|
18876
|
+
...fileItems,
|
|
18877
|
+
...taskItems,
|
|
18878
|
+
...trackingItems,
|
|
18879
|
+
...communicationItems
|
|
18880
|
+
];
|
|
18881
|
+
const [activeComponent, setActiveComponent] = (0, import_react94.useState)(() => {
|
|
18882
|
+
const all = getAllAvailableItems();
|
|
18883
|
+
return all.length > 0 ? all[0].component : null;
|
|
18884
|
+
});
|
|
18927
18885
|
const [workflowOpen, setWorkflowOpen] = (0, import_react94.useState)(true);
|
|
18928
18886
|
const [permissionOpen, setPermissionOpen] = (0, import_react94.useState)(false);
|
|
18929
18887
|
const [hierarchyOpen, setHierarchyOpen] = (0, import_react94.useState)(false);
|
|
@@ -18950,21 +18908,16 @@ function Sidebar({
|
|
|
18950
18908
|
} else if (communicationItems.some((item) => item.component === activeComponent)) {
|
|
18951
18909
|
setCommunicationOpen(true);
|
|
18952
18910
|
}
|
|
18953
|
-
}, [activeComponent]);
|
|
18911
|
+
}, [activeComponent, workflowItems, permissionItems, hierarchyItems, documentItems, fileItems, taskItems, trackingItems, communicationItems]);
|
|
18954
18912
|
const renderMenuItem = (item) => {
|
|
18955
18913
|
const Icon = item.icon;
|
|
18956
18914
|
const handleClick = () => {
|
|
18957
18915
|
if (item.component) {
|
|
18958
|
-
router.push("/flowCore", void 0, {
|
|
18959
|
-
shallow: true
|
|
18960
|
-
});
|
|
18916
|
+
router.push("/flowCore", void 0, { shallow: true });
|
|
18961
18917
|
setActiveComponent(item.component);
|
|
18962
|
-
} else if (item.path) {
|
|
18963
|
-
setActiveComponent(null);
|
|
18964
|
-
router.push(item.path);
|
|
18965
18918
|
}
|
|
18966
18919
|
};
|
|
18967
|
-
const isActive =
|
|
18920
|
+
const isActive = activeComponent === item.component;
|
|
18968
18921
|
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
18969
18922
|
"button",
|
|
18970
18923
|
{
|
|
@@ -18987,6 +18940,13 @@ function Sidebar({
|
|
|
18987
18940
|
);
|
|
18988
18941
|
};
|
|
18989
18942
|
const renderContent = () => {
|
|
18943
|
+
if (!hasAnyAccess) {
|
|
18944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "fc:flex fc:flex-col fc:items-center fc:justify-center fc:h-full fc:p-6 fc:text-center", children: [
|
|
18945
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "fc:bg-red-50 fc:text-red-500 fc:p-4 fc:rounded-full fc:mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react95.RiLockPasswordLine, { size: 32 }) }),
|
|
18946
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("h2", { className: "fc:text-lg fc:font-bold fc:text-[#101318] fc:mb-1", children: "Access Restricted" }),
|
|
18947
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "fc:text-sm fc:text-[#64748B] fc:max-w-md", children: "You do not have permission to access any modules or workflow sections. Please contact your administrator for access rights." })
|
|
18948
|
+
] });
|
|
18949
|
+
}
|
|
18990
18950
|
switch (activeComponent) {
|
|
18991
18951
|
case "module":
|
|
18992
18952
|
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ModuleMain, {});
|
|
@@ -19037,9 +18997,8 @@ function Sidebar({
|
|
|
19037
18997
|
}
|
|
19038
18998
|
};
|
|
19039
18999
|
const renderDropdown = (title, open, setOpen, items, HeadingIcon) => {
|
|
19040
|
-
|
|
19041
|
-
|
|
19042
|
-
);
|
|
19000
|
+
if (items.length === 0) return null;
|
|
19001
|
+
const hasActiveChild = items.some((item) => activeComponent === item.component);
|
|
19043
19002
|
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "fc:mb-1 mb-1", children: [
|
|
19044
19003
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
19045
19004
|
"button",
|
|
@@ -19056,7 +19015,13 @@ function Sidebar({
|
|
|
19056
19015
|
className: `fc:shrink-0 shrink-0 fc:transition-colors transition-colors ${hasActiveChild ? "fc:text-blue-600 text-blue-600" : "fc:text-[#405170] text-[#405170]"}`
|
|
19057
19016
|
}
|
|
19058
19017
|
),
|
|
19059
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
19018
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
19019
|
+
"span",
|
|
19020
|
+
{
|
|
19021
|
+
className: `fc:text-[14px] text-[14px] fc:font-semibold font-semibold fc:truncate truncate ${hasActiveChild && !open ? "fc:text-blue-600 text-blue-600" : "fc:text-[#273657] text-[#273657]"}`,
|
|
19022
|
+
children: title
|
|
19023
|
+
}
|
|
19024
|
+
)
|
|
19060
19025
|
] }),
|
|
19061
19026
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
19062
19027
|
"span",
|
|
@@ -19092,59 +19057,96 @@ function Sidebar({
|
|
|
19092
19057
|
] });
|
|
19093
19058
|
};
|
|
19094
19059
|
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_jsx_runtime94.Fragment, { children: [
|
|
19095
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
19096
|
-
|
|
19097
|
-
|
|
19098
|
-
|
|
19099
|
-
|
|
19100
|
-
|
|
19101
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.
|
|
19102
|
-
|
|
19060
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
19061
|
+
"aside",
|
|
19062
|
+
{
|
|
19063
|
+
className: `fc:flex fc:h-screen fc:flex-col fc:overflow-hidden fc:border-r fc:border-[#E5E9F1] fc:bg-white fc:font-sans fc:text-[#273657] fc:transition-all fc:duration-300 fc:ease-in-out ${isOpen ? "fc:w-[285px] fc:min-w-[285px] fc:translate-x-0 fc:opacity-100" : "fc:w-0 fc:min-w-0 fc:-translate-x-full fc:opacity-0"}`,
|
|
19064
|
+
children: [
|
|
19065
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("header", { className: "fc:flex fc:h-[84px] fc:items-center fc:justify-between fc:border-b fc:border-[#EDF0F5] fc:px-[14px]", children: [
|
|
19066
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-2", children: [
|
|
19067
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("svg", { width: "36", height: "42", viewBox: "0 0 48 56", fill: "none", children: [
|
|
19068
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("path", { d: "M24 2L45 12.5L24 23L3 12.5L24 2Z", fill: "#356AF3" }),
|
|
19069
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("path", { d: "M24 8L34 13L24 18L14 13L24 8Z", fill: "white" }),
|
|
19070
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("path", { d: "M3 20L24 30.5L45 20V27L24 37.5L3 27V20Z", fill: "#356AF3" }),
|
|
19071
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("path", { d: "M3 33L24 43.5L45 33V40L24 50.5L3 40V33Z", fill: "#356AF3" })
|
|
19072
|
+
] }),
|
|
19073
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { children: [
|
|
19074
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("h1", { className: "fc:text-[18px] fc:font-extrabold fc:text-[#101318]", children: "FLOWCORE" }),
|
|
19075
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "fc:text-[12px] fc:text-[#344261]", children: "Workflow Engine" })
|
|
19076
|
+
] })
|
|
19077
|
+
] }),
|
|
19078
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
19079
|
+
"button",
|
|
19080
|
+
{
|
|
19081
|
+
type: "button",
|
|
19082
|
+
onClick: onToggle,
|
|
19083
|
+
className: "fc:flex flex fc:h-8 h-8 fc:w-8 w-8 fc:items-center items-center fc:justify-center justify-center fc:rounded-lg rounded-lg hover:fc:bg-gray-100 hover:bg-gray-100 fc:transition-colors transition-colors",
|
|
19084
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react95.RiMenuLine, { size: 18 })
|
|
19085
|
+
}
|
|
19086
|
+
)
|
|
19103
19087
|
] }),
|
|
19104
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { children: [
|
|
19105
|
-
/* @__PURE__ */ (0, import_jsx_runtime94.
|
|
19106
|
-
|
|
19107
|
-
|
|
19108
|
-
|
|
19109
|
-
|
|
19110
|
-
|
|
19111
|
-
|
|
19112
|
-
|
|
19113
|
-
|
|
19114
|
-
|
|
19115
|
-
|
|
19116
|
-
|
|
19117
|
-
|
|
19118
|
-
|
|
19119
|
-
|
|
19120
|
-
|
|
19121
|
-
|
|
19122
|
-
|
|
19123
|
-
|
|
19124
|
-
|
|
19125
|
-
|
|
19126
|
-
|
|
19127
|
-
|
|
19128
|
-
|
|
19129
|
-
|
|
19130
|
-
|
|
19131
|
-
|
|
19088
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "fc:min-h-0 min-h-0 fc:flex-1 flex-1 fc:overflow-y-auto overflow-y-auto fc:overflow-x-hidden overflow-x-hidden fc:px-[12px] px-[12px] fc:pb-[24px] pb-[24px] fc:pt-[20px] pt-[20px]", children: [
|
|
19089
|
+
(workflowItems.length > 0 || permissionItems.length > 0 || hierarchyItems.length > 0 || documentItems.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_jsx_runtime94.Fragment, { children: [
|
|
19090
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "fc:mb-[10px] mb-[10px] fc:px-[10px] px-[10px] fc:text-[12px] text-[12px] fc:font-bold font-bold fc:uppercase uppercase fc:leading-[16px] leading-[16px] fc:tracking-[0.5px] tracking-[0.5px] fc:text-[#3C4D74] text-[#3C4D74]", children: "Configuration Masters" }),
|
|
19091
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "fc:flex flex fc:flex-col flex-col fc:gap-[2px] gap-[2px]", children: [
|
|
19092
|
+
renderDropdown("Workflow", workflowOpen, setWorkflowOpen, workflowItems, import_react95.RiNodeTree),
|
|
19093
|
+
renderDropdown("Permissions", permissionOpen, setPermissionOpen, permissionItems, import_react95.RiShieldUserLine),
|
|
19094
|
+
renderDropdown("Documents", documentOpen, setDocumentOpen, documentItems, import_react95.RiFileSettingsLine),
|
|
19095
|
+
renderDropdown("Hierarchy", hierarchyOpen, setHierarchyOpen, hierarchyItems, import_react95.RiNodeTree)
|
|
19096
|
+
] })
|
|
19097
|
+
] }),
|
|
19098
|
+
(fileItems.length > 0 || taskItems.length > 0 || trackingItems.length > 0 || communicationItems.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_jsx_runtime94.Fragment, { children: [
|
|
19099
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "fc:mb-[10px] mb-[10px] fc:px-[10px] px-[10px] fc:mt-[24px] mt-[24px] fc:text-[12px] text-[12px] fc:font-bold font-bold fc:uppercase uppercase fc:leading-[16px] leading-[16px] fc:tracking-[0.5px] tracking-[0.5px] fc:text-[#3C4D74] text-[#3C4D74]", children: "Runtime" }),
|
|
19100
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "fc:flex flex fc:flex-col flex-col fc:gap-[2px] gap-[2px]", children: [
|
|
19101
|
+
renderDropdown("Files", filesOpen, setFilesOpen, fileItems, import_react95.RiFolder3Line),
|
|
19102
|
+
renderDropdown("Tasks", tasksOpen, setTasksOpen, taskItems, import_react95.RiCheckboxCircleLine),
|
|
19103
|
+
renderDropdown("Tracking", trackingOpen, setTrackingOpen, trackingItems, import_react95.RiRouteLine),
|
|
19104
|
+
renderDropdown("Communication", communicationOpen, setCommunicationOpen, communicationItems, import_react95.RiMessage2Line)
|
|
19105
|
+
] })
|
|
19106
|
+
] })
|
|
19107
|
+
] }),
|
|
19108
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "fc:shrink-0 shrink-0 fc:bg-white bg-white fc:px-[12px] px-[12px] fc:pb-[20px] pb-[20px] fc:pt-[12px] pt-[12px]", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
19109
|
+
"button",
|
|
19110
|
+
{
|
|
19111
|
+
type: "button",
|
|
19112
|
+
className: "fc:flex flex fc:h-[50px] h-[50px] fc:w-full w-full fc:items-center items-center fc:gap-[12px] gap-[12px] fc:rounded-[10px] rounded-[10px] fc:border border fc:border-[#E1E5ED] border-[#E1E5ED] fc:bg-white bg-white fc:px-[14px] px-[14px] fc:text-left text-left fc:text-[15px] text-[15px] fc:font-semibold font-semibold fc:text-[#2D3A58] text-[#2D3A58] fc:shadow-sm shadow-sm hover:fc:bg-[#F7F8FC] hover:bg-[#F7F8FC] fc:transition transition",
|
|
19113
|
+
children: [
|
|
19114
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react95.RiSettings4Line, { size: 20 }),
|
|
19115
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { children: "Settings" })
|
|
19116
|
+
]
|
|
19117
|
+
}
|
|
19118
|
+
) })
|
|
19119
|
+
]
|
|
19120
|
+
}
|
|
19121
|
+
),
|
|
19132
19122
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "fc:flex-1 flex-1 fc:overflow-auto overflow-auto fc:bg-[#F5F7FB] bg-[#F5F7FB]", children: renderContent() }),
|
|
19133
|
-
!isOpen && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
19123
|
+
!isOpen && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
19124
|
+
"button",
|
|
19125
|
+
{
|
|
19126
|
+
type: "button",
|
|
19127
|
+
onClick: onToggle,
|
|
19128
|
+
"aria-label": "Open sidebar",
|
|
19129
|
+
className: "fc:fixed fixed fc:left-[16px] left-[16px] fc:top-[30px] top-[30px] fc:z-[100] z-[100] fc:flex flex fc:h-[46px] h-[46px] fc:w-[46px] w-[46px] fc:items-center items-center fc:justify-center justify-center fc:rounded-[9px] rounded-[9px] fc:border border fc:border-[#E1E5ED] border-[#E1E5ED] fc:bg-white bg-white fc:text-[#344261] text-[#344261] fc:shadow-[0_2px_8px_rgba(0,0,0,0.08)] shadow-[0_2px_8px_rgba(0,0,0,0.08)] fc:transition-colors transition-colors hover:fc:bg-gray-100 hover:bg-gray-100",
|
|
19130
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react95.RiMenuLine, { size: 18 })
|
|
19131
|
+
}
|
|
19132
|
+
)
|
|
19134
19133
|
] });
|
|
19135
19134
|
}
|
|
19136
19135
|
|
|
19137
19136
|
// src/components/Layout.jsx
|
|
19138
19137
|
var import_react96 = require("react");
|
|
19139
19138
|
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
19140
|
-
var Layout = ({ children }) => {
|
|
19139
|
+
var Layout = ({ children, sidebar, sidebarConfig }) => {
|
|
19141
19140
|
const [isOpen, setIsOpen] = (0, import_react96.useState)(true);
|
|
19141
|
+
const resolvedSidebarConfig = sidebar != null ? sidebar : sidebarConfig;
|
|
19142
19142
|
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "flowcore fc:flex fc:min-h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
19143
19143
|
Sidebar,
|
|
19144
19144
|
{
|
|
19145
19145
|
isOpen,
|
|
19146
19146
|
onToggle: () => setIsOpen(!isOpen),
|
|
19147
|
-
childrens: children
|
|
19147
|
+
childrens: children,
|
|
19148
|
+
sidebar: resolvedSidebarConfig,
|
|
19149
|
+
sidebarConfig: resolvedSidebarConfig
|
|
19148
19150
|
}
|
|
19149
19151
|
) });
|
|
19150
19152
|
};
|
package/dist/pkg-index.mjs
CHANGED
|
@@ -13,7 +13,33 @@ import {
|
|
|
13
13
|
|
|
14
14
|
// src/components/Sidebar.jsx
|
|
15
15
|
import { useState as useState70, useEffect as useEffect48 } from "react";
|
|
16
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
RiShieldUserLine,
|
|
18
|
+
RiFolder3Line,
|
|
19
|
+
RiCheckboxCircleLine,
|
|
20
|
+
RiRouteLine,
|
|
21
|
+
RiMessage2Line,
|
|
22
|
+
RiMenuLine,
|
|
23
|
+
RiGitMergeLine,
|
|
24
|
+
RiNodeTree,
|
|
25
|
+
RiGitBranchLine,
|
|
26
|
+
RiCornerDownRightLine,
|
|
27
|
+
RiUserSettingsLine,
|
|
28
|
+
RiFileShieldLine,
|
|
29
|
+
RiUserSharedLine,
|
|
30
|
+
RiSettings4Line,
|
|
31
|
+
RiFileSettingsLine,
|
|
32
|
+
RiFileList3Line,
|
|
33
|
+
RiFileUploadLine,
|
|
34
|
+
RiNotification4Line,
|
|
35
|
+
RiDatabase2Line,
|
|
36
|
+
RiChat3Line,
|
|
37
|
+
RiCheckboxMultipleLine,
|
|
38
|
+
RiShieldCheckLine,
|
|
39
|
+
RiHistoryLine,
|
|
40
|
+
RiArrowRightSLine,
|
|
41
|
+
RiLockPasswordLine
|
|
42
|
+
} from "@remixicon/react";
|
|
17
43
|
import { useRouter } from "next/router";
|
|
18
44
|
|
|
19
45
|
// src/components/workflow/WorkflowMain.jsx
|
|
@@ -18630,122 +18656,80 @@ function StatusMain() {
|
|
|
18630
18656
|
|
|
18631
18657
|
// src/components/Sidebar.jsx
|
|
18632
18658
|
import { Fragment as Fragment5, jsx as jsx94, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
18633
|
-
|
|
18634
|
-
// Menu Name testing // component or page-Use function name
|
|
18635
|
-
{
|
|
18636
|
-
name: "Workflow Type",
|
|
18637
|
-
component: "workflowType",
|
|
18638
|
-
icon: RiGitMergeLine
|
|
18639
|
-
},
|
|
18640
|
-
{
|
|
18641
|
-
name: "Workflow",
|
|
18642
|
-
component: "workflow",
|
|
18643
|
-
icon: RiNodeTree
|
|
18644
|
-
},
|
|
18645
|
-
{
|
|
18646
|
-
name: "Workflow Step",
|
|
18647
|
-
component: "workflowStep",
|
|
18648
|
-
icon: RiGitBranchLine
|
|
18649
|
-
},
|
|
18650
|
-
{
|
|
18651
|
-
name: "Workflow Transition",
|
|
18652
|
-
component: "workflowTransition",
|
|
18653
|
-
icon: RiCornerDownRightLine
|
|
18654
|
-
},
|
|
18655
|
-
{
|
|
18656
|
-
name: "Module",
|
|
18657
|
-
component: "module",
|
|
18658
|
-
icon: RiFolder3Line
|
|
18659
|
-
},
|
|
18660
|
-
{
|
|
18661
|
-
name: "Status",
|
|
18662
|
-
component: "status",
|
|
18663
|
-
icon: RiCheckboxCircleLine
|
|
18664
|
-
}
|
|
18665
|
-
];
|
|
18666
|
-
var permissionItems = [{
|
|
18667
|
-
name: "Step Permission",
|
|
18668
|
-
component: "step_permission_main",
|
|
18669
|
-
icon: RiUserSettingsLine
|
|
18670
|
-
}, {
|
|
18671
|
-
name: "Assignment Rule",
|
|
18672
|
-
component: "AssignmentRuleMain",
|
|
18673
|
-
icon: RiFileShieldLine
|
|
18674
|
-
}];
|
|
18675
|
-
var hierarchyItems = [
|
|
18676
|
-
{
|
|
18677
|
-
name: "Hierarchy Node",
|
|
18678
|
-
component: "HierarchyNodeMain",
|
|
18679
|
-
icon: RiNodeTree
|
|
18680
|
-
},
|
|
18681
|
-
{
|
|
18682
|
-
name: "Workflow Hierarchy Node Mapping",
|
|
18683
|
-
component: "Workflow_Step_Hierarchy_Mapping_Main",
|
|
18684
|
-
icon: RiUserSharedLine
|
|
18685
|
-
},
|
|
18686
|
-
{
|
|
18687
|
-
name: "Workflow Step User Mapping",
|
|
18688
|
-
component: "User_hierarchy_mapping_main",
|
|
18689
|
-
icon: RiUserSharedLine
|
|
18690
|
-
},
|
|
18691
|
-
{
|
|
18692
|
-
name: "Workflow Settings",
|
|
18693
|
-
component: "WorkflowSettingMain",
|
|
18694
|
-
icon: RiSettings4Line
|
|
18695
|
-
}
|
|
18696
|
-
];
|
|
18697
|
-
var documentItems = [{
|
|
18698
|
-
name: "Document Configuration",
|
|
18699
|
-
component: "DocumentConfigurationmain",
|
|
18700
|
-
icon: RiFileSettingsLine
|
|
18701
|
-
}];
|
|
18702
|
-
var fileItems = [{
|
|
18703
|
-
name: "Business Entity",
|
|
18704
|
-
component: "BusinessEntitymain",
|
|
18705
|
-
icon: RiFileList3Line
|
|
18706
|
-
}, {
|
|
18707
|
-
name: "File Instance",
|
|
18708
|
-
component: "FileInstanceMain",
|
|
18709
|
-
icon: RiFileList3Line
|
|
18710
|
-
}, {
|
|
18711
|
-
name: "File Pool",
|
|
18712
|
-
component: "FilePoolMain",
|
|
18713
|
-
icon: RiDatabase2Line
|
|
18714
|
-
}, {
|
|
18715
|
-
name: "Uploaded Document",
|
|
18716
|
-
component: "UploadedDocumentMain",
|
|
18717
|
-
icon: RiFileUploadLine
|
|
18718
|
-
}];
|
|
18719
|
-
var communicationItems = [{
|
|
18720
|
-
name: "Notification",
|
|
18721
|
-
component: "Notification_main",
|
|
18722
|
-
icon: RiNotification4Line
|
|
18723
|
-
}, {
|
|
18724
|
-
name: "Comment",
|
|
18725
|
-
component: "Comment_main",
|
|
18726
|
-
icon: RiChat3Line
|
|
18727
|
-
}];
|
|
18728
|
-
var taskItems = [{
|
|
18729
|
-
name: "Task Instance",
|
|
18730
|
-
component: "TaskInstanceMain",
|
|
18731
|
-
icon: RiCheckboxMultipleLine
|
|
18732
|
-
}];
|
|
18733
|
-
var trackingItems = [{
|
|
18734
|
-
name: "Audit Log",
|
|
18735
|
-
component: "AuditLogmain",
|
|
18736
|
-
icon: RiShieldCheckLine
|
|
18737
|
-
}, {
|
|
18738
|
-
name: "Movement History",
|
|
18739
|
-
component: "MovementHistorymain",
|
|
18740
|
-
icon: RiHistoryLine
|
|
18741
|
-
}];
|
|
18742
|
-
function Sidebar({
|
|
18743
|
-
isOpen,
|
|
18744
|
-
onToggle,
|
|
18745
|
-
childrens
|
|
18746
|
-
}) {
|
|
18659
|
+
function Sidebar({ isOpen, onToggle, childrens, sidebar, sidebarConfig }) {
|
|
18747
18660
|
const router = useRouter();
|
|
18748
|
-
const
|
|
18661
|
+
const resolvedSidebarConfig = sidebar != null ? sidebar : sidebarConfig;
|
|
18662
|
+
const masterWorkflowItems = [
|
|
18663
|
+
{ name: "Workflow Type", component: "workflowType", icon: RiGitMergeLine, configKey: "isWorkflowType" },
|
|
18664
|
+
{ name: "Workflow", component: "workflow", icon: RiNodeTree, configKey: "isWorkflow" },
|
|
18665
|
+
{ name: "Workflow Step", component: "workflowStep", icon: RiGitBranchLine, configKey: "isWorkflowStep" },
|
|
18666
|
+
{ name: "Workflow Transition", component: "workflowTransition", icon: RiCornerDownRightLine, configKey: "isWorkflowTransition" },
|
|
18667
|
+
{ name: "Module", component: "module", icon: RiFolder3Line, configKey: "isModule" },
|
|
18668
|
+
{ name: "Status", component: "status", icon: RiCheckboxCircleLine, configKey: "isStatus" }
|
|
18669
|
+
];
|
|
18670
|
+
const masterPermissionItems = [
|
|
18671
|
+
{ name: "Step Permission", component: "step_permission_main", icon: RiUserSettingsLine, configKey: "isStepPermission" },
|
|
18672
|
+
{ name: "Assignment Rule", component: "AssignmentRuleMain", icon: RiFileShieldLine, configKey: "isAssignmentRule" }
|
|
18673
|
+
];
|
|
18674
|
+
const masterHierarchyItems = [
|
|
18675
|
+
{ name: "Hierarchy Node", component: "HierarchyNodeMain", icon: RiNodeTree, configKey: "isHierarchyNode" },
|
|
18676
|
+
{ name: "Workflow Hierarchy Node Mapping", component: "Workflow_Step_Hierarchy_Mapping_Main", icon: RiUserSharedLine, configKey: "isWorkflowHierarchyMapping" },
|
|
18677
|
+
{ name: "Workflow Step User Mapping", component: "User_hierarchy_mapping_main", icon: RiUserSharedLine, configKey: "isUserHierarchyMapping" },
|
|
18678
|
+
{ name: "Workflow Settings", component: "WorkflowSettingMain", icon: RiSettings4Line, configKey: "isWorkflowSettings" }
|
|
18679
|
+
];
|
|
18680
|
+
const masterDocumentItems = [
|
|
18681
|
+
{ name: "Document Configuration", component: "DocumentConfigurationmain", icon: RiFileSettingsLine, configKey: "isDocumentConfiguration" }
|
|
18682
|
+
];
|
|
18683
|
+
const masterFileItems = [
|
|
18684
|
+
{ name: "Business Entity", component: "BusinessEntitymain", icon: RiFileList3Line, configKey: "isBusinessEntity" },
|
|
18685
|
+
{ name: "File Instance", component: "FileInstanceMain", icon: RiFileList3Line, configKey: "isFileInstance" },
|
|
18686
|
+
{ name: "File Pool", component: "FilePoolMain", icon: RiDatabase2Line, configKey: "isFilePool" },
|
|
18687
|
+
{ name: "Uploaded Document", component: "UploadedDocumentMain", icon: RiFileUploadLine, configKey: "isUploadedDocument" }
|
|
18688
|
+
];
|
|
18689
|
+
const masterCommunicationItems = [
|
|
18690
|
+
{ name: "Notification", component: "Notification_main", icon: RiNotification4Line, configKey: "isNotification" },
|
|
18691
|
+
{ name: "Comment", component: "Comment_main", icon: RiChat3Line, configKey: "isComment" }
|
|
18692
|
+
];
|
|
18693
|
+
const masterTaskItems = [
|
|
18694
|
+
{ name: "Task Instance", component: "TaskInstanceMain", icon: RiCheckboxMultipleLine, configKey: "isTaskInstance" }
|
|
18695
|
+
];
|
|
18696
|
+
const masterTrackingItems = [
|
|
18697
|
+
{ name: "Audit Log", component: "AuditLogmain", icon: RiShieldCheckLine, configKey: "isAuditLog" },
|
|
18698
|
+
{ name: "Movement History", component: "MovementHistorymain", icon: RiHistoryLine, configKey: "isMovementHistory" }
|
|
18699
|
+
];
|
|
18700
|
+
const filterItems = (items) => {
|
|
18701
|
+
if (!resolvedSidebarConfig) return items;
|
|
18702
|
+
const configObj = Array.isArray(resolvedSidebarConfig) ? Object.assign({}, ...resolvedSidebarConfig) : resolvedSidebarConfig;
|
|
18703
|
+
return items.filter((item) => {
|
|
18704
|
+
if (item.configKey && configObj[item.configKey] === false) {
|
|
18705
|
+
return false;
|
|
18706
|
+
}
|
|
18707
|
+
return true;
|
|
18708
|
+
});
|
|
18709
|
+
};
|
|
18710
|
+
const workflowItems = filterItems(masterWorkflowItems);
|
|
18711
|
+
const permissionItems = filterItems(masterPermissionItems);
|
|
18712
|
+
const hierarchyItems = filterItems(masterHierarchyItems);
|
|
18713
|
+
const documentItems = filterItems(masterDocumentItems);
|
|
18714
|
+
const fileItems = filterItems(masterFileItems);
|
|
18715
|
+
const communicationItems = filterItems(masterCommunicationItems);
|
|
18716
|
+
const taskItems = filterItems(masterTaskItems);
|
|
18717
|
+
const trackingItems = filterItems(masterTrackingItems);
|
|
18718
|
+
const hasAnyAccess = workflowItems.length > 0 || permissionItems.length > 0 || hierarchyItems.length > 0 || documentItems.length > 0 || fileItems.length > 0 || communicationItems.length > 0 || taskItems.length > 0 || trackingItems.length > 0;
|
|
18719
|
+
const getAllAvailableItems = () => [
|
|
18720
|
+
...workflowItems,
|
|
18721
|
+
...permissionItems,
|
|
18722
|
+
...hierarchyItems,
|
|
18723
|
+
...documentItems,
|
|
18724
|
+
...fileItems,
|
|
18725
|
+
...taskItems,
|
|
18726
|
+
...trackingItems,
|
|
18727
|
+
...communicationItems
|
|
18728
|
+
];
|
|
18729
|
+
const [activeComponent, setActiveComponent] = useState70(() => {
|
|
18730
|
+
const all = getAllAvailableItems();
|
|
18731
|
+
return all.length > 0 ? all[0].component : null;
|
|
18732
|
+
});
|
|
18749
18733
|
const [workflowOpen, setWorkflowOpen] = useState70(true);
|
|
18750
18734
|
const [permissionOpen, setPermissionOpen] = useState70(false);
|
|
18751
18735
|
const [hierarchyOpen, setHierarchyOpen] = useState70(false);
|
|
@@ -18772,21 +18756,16 @@ function Sidebar({
|
|
|
18772
18756
|
} else if (communicationItems.some((item) => item.component === activeComponent)) {
|
|
18773
18757
|
setCommunicationOpen(true);
|
|
18774
18758
|
}
|
|
18775
|
-
}, [activeComponent]);
|
|
18759
|
+
}, [activeComponent, workflowItems, permissionItems, hierarchyItems, documentItems, fileItems, taskItems, trackingItems, communicationItems]);
|
|
18776
18760
|
const renderMenuItem = (item) => {
|
|
18777
18761
|
const Icon = item.icon;
|
|
18778
18762
|
const handleClick = () => {
|
|
18779
18763
|
if (item.component) {
|
|
18780
|
-
router.push("/flowCore", void 0, {
|
|
18781
|
-
shallow: true
|
|
18782
|
-
});
|
|
18764
|
+
router.push("/flowCore", void 0, { shallow: true });
|
|
18783
18765
|
setActiveComponent(item.component);
|
|
18784
|
-
} else if (item.path) {
|
|
18785
|
-
setActiveComponent(null);
|
|
18786
|
-
router.push(item.path);
|
|
18787
18766
|
}
|
|
18788
18767
|
};
|
|
18789
|
-
const isActive =
|
|
18768
|
+
const isActive = activeComponent === item.component;
|
|
18790
18769
|
return /* @__PURE__ */ jsxs93(
|
|
18791
18770
|
"button",
|
|
18792
18771
|
{
|
|
@@ -18809,6 +18788,13 @@ function Sidebar({
|
|
|
18809
18788
|
);
|
|
18810
18789
|
};
|
|
18811
18790
|
const renderContent = () => {
|
|
18791
|
+
if (!hasAnyAccess) {
|
|
18792
|
+
return /* @__PURE__ */ jsxs93("div", { className: "fc:flex fc:flex-col fc:items-center fc:justify-center fc:h-full fc:p-6 fc:text-center", children: [
|
|
18793
|
+
/* @__PURE__ */ jsx94("div", { className: "fc:bg-red-50 fc:text-red-500 fc:p-4 fc:rounded-full fc:mb-4", children: /* @__PURE__ */ jsx94(RiLockPasswordLine, { size: 32 }) }),
|
|
18794
|
+
/* @__PURE__ */ jsx94("h2", { className: "fc:text-lg fc:font-bold fc:text-[#101318] fc:mb-1", children: "Access Restricted" }),
|
|
18795
|
+
/* @__PURE__ */ jsx94("p", { className: "fc:text-sm fc:text-[#64748B] fc:max-w-md", children: "You do not have permission to access any modules or workflow sections. Please contact your administrator for access rights." })
|
|
18796
|
+
] });
|
|
18797
|
+
}
|
|
18812
18798
|
switch (activeComponent) {
|
|
18813
18799
|
case "module":
|
|
18814
18800
|
return /* @__PURE__ */ jsx94(ModuleMain, {});
|
|
@@ -18859,9 +18845,8 @@ function Sidebar({
|
|
|
18859
18845
|
}
|
|
18860
18846
|
};
|
|
18861
18847
|
const renderDropdown = (title, open, setOpen, items, HeadingIcon) => {
|
|
18862
|
-
|
|
18863
|
-
|
|
18864
|
-
);
|
|
18848
|
+
if (items.length === 0) return null;
|
|
18849
|
+
const hasActiveChild = items.some((item) => activeComponent === item.component);
|
|
18865
18850
|
return /* @__PURE__ */ jsxs93("div", { className: "fc:mb-1 mb-1", children: [
|
|
18866
18851
|
/* @__PURE__ */ jsxs93(
|
|
18867
18852
|
"button",
|
|
@@ -18878,7 +18863,13 @@ function Sidebar({
|
|
|
18878
18863
|
className: `fc:shrink-0 shrink-0 fc:transition-colors transition-colors ${hasActiveChild ? "fc:text-blue-600 text-blue-600" : "fc:text-[#405170] text-[#405170]"}`
|
|
18879
18864
|
}
|
|
18880
18865
|
),
|
|
18881
|
-
/* @__PURE__ */ jsx94(
|
|
18866
|
+
/* @__PURE__ */ jsx94(
|
|
18867
|
+
"span",
|
|
18868
|
+
{
|
|
18869
|
+
className: `fc:text-[14px] text-[14px] fc:font-semibold font-semibold fc:truncate truncate ${hasActiveChild && !open ? "fc:text-blue-600 text-blue-600" : "fc:text-[#273657] text-[#273657]"}`,
|
|
18870
|
+
children: title
|
|
18871
|
+
}
|
|
18872
|
+
)
|
|
18882
18873
|
] }),
|
|
18883
18874
|
/* @__PURE__ */ jsx94(
|
|
18884
18875
|
"span",
|
|
@@ -18914,59 +18905,96 @@ function Sidebar({
|
|
|
18914
18905
|
] });
|
|
18915
18906
|
};
|
|
18916
18907
|
return /* @__PURE__ */ jsxs93(Fragment5, { children: [
|
|
18917
|
-
/* @__PURE__ */ jsxs93(
|
|
18918
|
-
|
|
18919
|
-
|
|
18920
|
-
|
|
18921
|
-
|
|
18922
|
-
|
|
18923
|
-
/* @__PURE__ */
|
|
18924
|
-
|
|
18908
|
+
/* @__PURE__ */ jsxs93(
|
|
18909
|
+
"aside",
|
|
18910
|
+
{
|
|
18911
|
+
className: `fc:flex fc:h-screen fc:flex-col fc:overflow-hidden fc:border-r fc:border-[#E5E9F1] fc:bg-white fc:font-sans fc:text-[#273657] fc:transition-all fc:duration-300 fc:ease-in-out ${isOpen ? "fc:w-[285px] fc:min-w-[285px] fc:translate-x-0 fc:opacity-100" : "fc:w-0 fc:min-w-0 fc:-translate-x-full fc:opacity-0"}`,
|
|
18912
|
+
children: [
|
|
18913
|
+
/* @__PURE__ */ jsxs93("header", { className: "fc:flex fc:h-[84px] fc:items-center fc:justify-between fc:border-b fc:border-[#EDF0F5] fc:px-[14px]", children: [
|
|
18914
|
+
/* @__PURE__ */ jsxs93("div", { className: "fc:flex fc:items-center fc:gap-2", children: [
|
|
18915
|
+
/* @__PURE__ */ jsxs93("svg", { width: "36", height: "42", viewBox: "0 0 48 56", fill: "none", children: [
|
|
18916
|
+
/* @__PURE__ */ jsx94("path", { d: "M24 2L45 12.5L24 23L3 12.5L24 2Z", fill: "#356AF3" }),
|
|
18917
|
+
/* @__PURE__ */ jsx94("path", { d: "M24 8L34 13L24 18L14 13L24 8Z", fill: "white" }),
|
|
18918
|
+
/* @__PURE__ */ jsx94("path", { d: "M3 20L24 30.5L45 20V27L24 37.5L3 27V20Z", fill: "#356AF3" }),
|
|
18919
|
+
/* @__PURE__ */ jsx94("path", { d: "M3 33L24 43.5L45 33V40L24 50.5L3 40V33Z", fill: "#356AF3" })
|
|
18920
|
+
] }),
|
|
18921
|
+
/* @__PURE__ */ jsxs93("div", { children: [
|
|
18922
|
+
/* @__PURE__ */ jsx94("h1", { className: "fc:text-[18px] fc:font-extrabold fc:text-[#101318]", children: "FLOWCORE" }),
|
|
18923
|
+
/* @__PURE__ */ jsx94("p", { className: "fc:text-[12px] fc:text-[#344261]", children: "Workflow Engine" })
|
|
18924
|
+
] })
|
|
18925
|
+
] }),
|
|
18926
|
+
/* @__PURE__ */ jsx94(
|
|
18927
|
+
"button",
|
|
18928
|
+
{
|
|
18929
|
+
type: "button",
|
|
18930
|
+
onClick: onToggle,
|
|
18931
|
+
className: "fc:flex flex fc:h-8 h-8 fc:w-8 w-8 fc:items-center items-center fc:justify-center justify-center fc:rounded-lg rounded-lg hover:fc:bg-gray-100 hover:bg-gray-100 fc:transition-colors transition-colors",
|
|
18932
|
+
children: /* @__PURE__ */ jsx94(RiMenuLine, { size: 18 })
|
|
18933
|
+
}
|
|
18934
|
+
)
|
|
18925
18935
|
] }),
|
|
18926
|
-
/* @__PURE__ */ jsxs93("div", { children: [
|
|
18927
|
-
/* @__PURE__ */
|
|
18928
|
-
|
|
18929
|
-
|
|
18930
|
-
|
|
18931
|
-
|
|
18932
|
-
|
|
18933
|
-
|
|
18934
|
-
|
|
18935
|
-
|
|
18936
|
-
|
|
18937
|
-
|
|
18938
|
-
|
|
18939
|
-
|
|
18940
|
-
|
|
18941
|
-
|
|
18942
|
-
|
|
18943
|
-
|
|
18944
|
-
|
|
18945
|
-
|
|
18946
|
-
|
|
18947
|
-
|
|
18948
|
-
|
|
18949
|
-
|
|
18950
|
-
|
|
18951
|
-
|
|
18952
|
-
|
|
18953
|
-
|
|
18936
|
+
/* @__PURE__ */ jsxs93("div", { className: "fc:min-h-0 min-h-0 fc:flex-1 flex-1 fc:overflow-y-auto overflow-y-auto fc:overflow-x-hidden overflow-x-hidden fc:px-[12px] px-[12px] fc:pb-[24px] pb-[24px] fc:pt-[20px] pt-[20px]", children: [
|
|
18937
|
+
(workflowItems.length > 0 || permissionItems.length > 0 || hierarchyItems.length > 0 || documentItems.length > 0) && /* @__PURE__ */ jsxs93(Fragment5, { children: [
|
|
18938
|
+
/* @__PURE__ */ jsx94("p", { className: "fc:mb-[10px] mb-[10px] fc:px-[10px] px-[10px] fc:text-[12px] text-[12px] fc:font-bold font-bold fc:uppercase uppercase fc:leading-[16px] leading-[16px] fc:tracking-[0.5px] tracking-[0.5px] fc:text-[#3C4D74] text-[#3C4D74]", children: "Configuration Masters" }),
|
|
18939
|
+
/* @__PURE__ */ jsxs93("div", { className: "fc:flex flex fc:flex-col flex-col fc:gap-[2px] gap-[2px]", children: [
|
|
18940
|
+
renderDropdown("Workflow", workflowOpen, setWorkflowOpen, workflowItems, RiNodeTree),
|
|
18941
|
+
renderDropdown("Permissions", permissionOpen, setPermissionOpen, permissionItems, RiShieldUserLine),
|
|
18942
|
+
renderDropdown("Documents", documentOpen, setDocumentOpen, documentItems, RiFileSettingsLine),
|
|
18943
|
+
renderDropdown("Hierarchy", hierarchyOpen, setHierarchyOpen, hierarchyItems, RiNodeTree)
|
|
18944
|
+
] })
|
|
18945
|
+
] }),
|
|
18946
|
+
(fileItems.length > 0 || taskItems.length > 0 || trackingItems.length > 0 || communicationItems.length > 0) && /* @__PURE__ */ jsxs93(Fragment5, { children: [
|
|
18947
|
+
/* @__PURE__ */ jsx94("p", { className: "fc:mb-[10px] mb-[10px] fc:px-[10px] px-[10px] fc:mt-[24px] mt-[24px] fc:text-[12px] text-[12px] fc:font-bold font-bold fc:uppercase uppercase fc:leading-[16px] leading-[16px] fc:tracking-[0.5px] tracking-[0.5px] fc:text-[#3C4D74] text-[#3C4D74]", children: "Runtime" }),
|
|
18948
|
+
/* @__PURE__ */ jsxs93("div", { className: "fc:flex flex fc:flex-col flex-col fc:gap-[2px] gap-[2px]", children: [
|
|
18949
|
+
renderDropdown("Files", filesOpen, setFilesOpen, fileItems, RiFolder3Line),
|
|
18950
|
+
renderDropdown("Tasks", tasksOpen, setTasksOpen, taskItems, RiCheckboxCircleLine),
|
|
18951
|
+
renderDropdown("Tracking", trackingOpen, setTrackingOpen, trackingItems, RiRouteLine),
|
|
18952
|
+
renderDropdown("Communication", communicationOpen, setCommunicationOpen, communicationItems, RiMessage2Line)
|
|
18953
|
+
] })
|
|
18954
|
+
] })
|
|
18955
|
+
] }),
|
|
18956
|
+
/* @__PURE__ */ jsx94("div", { className: "fc:shrink-0 shrink-0 fc:bg-white bg-white fc:px-[12px] px-[12px] fc:pb-[20px] pb-[20px] fc:pt-[12px] pt-[12px]", children: /* @__PURE__ */ jsxs93(
|
|
18957
|
+
"button",
|
|
18958
|
+
{
|
|
18959
|
+
type: "button",
|
|
18960
|
+
className: "fc:flex flex fc:h-[50px] h-[50px] fc:w-full w-full fc:items-center items-center fc:gap-[12px] gap-[12px] fc:rounded-[10px] rounded-[10px] fc:border border fc:border-[#E1E5ED] border-[#E1E5ED] fc:bg-white bg-white fc:px-[14px] px-[14px] fc:text-left text-left fc:text-[15px] text-[15px] fc:font-semibold font-semibold fc:text-[#2D3A58] text-[#2D3A58] fc:shadow-sm shadow-sm hover:fc:bg-[#F7F8FC] hover:bg-[#F7F8FC] fc:transition transition",
|
|
18961
|
+
children: [
|
|
18962
|
+
/* @__PURE__ */ jsx94(RiSettings4Line, { size: 20 }),
|
|
18963
|
+
/* @__PURE__ */ jsx94("span", { children: "Settings" })
|
|
18964
|
+
]
|
|
18965
|
+
}
|
|
18966
|
+
) })
|
|
18967
|
+
]
|
|
18968
|
+
}
|
|
18969
|
+
),
|
|
18954
18970
|
/* @__PURE__ */ jsx94("div", { className: "fc:flex-1 flex-1 fc:overflow-auto overflow-auto fc:bg-[#F5F7FB] bg-[#F5F7FB]", children: renderContent() }),
|
|
18955
|
-
!isOpen && /* @__PURE__ */ jsx94(
|
|
18971
|
+
!isOpen && /* @__PURE__ */ jsx94(
|
|
18972
|
+
"button",
|
|
18973
|
+
{
|
|
18974
|
+
type: "button",
|
|
18975
|
+
onClick: onToggle,
|
|
18976
|
+
"aria-label": "Open sidebar",
|
|
18977
|
+
className: "fc:fixed fixed fc:left-[16px] left-[16px] fc:top-[30px] top-[30px] fc:z-[100] z-[100] fc:flex flex fc:h-[46px] h-[46px] fc:w-[46px] w-[46px] fc:items-center items-center fc:justify-center justify-center fc:rounded-[9px] rounded-[9px] fc:border border fc:border-[#E1E5ED] border-[#E1E5ED] fc:bg-white bg-white fc:text-[#344261] text-[#344261] fc:shadow-[0_2px_8px_rgba(0,0,0,0.08)] shadow-[0_2px_8px_rgba(0,0,0,0.08)] fc:transition-colors transition-colors hover:fc:bg-gray-100 hover:bg-gray-100",
|
|
18978
|
+
children: /* @__PURE__ */ jsx94(RiMenuLine, { size: 18 })
|
|
18979
|
+
}
|
|
18980
|
+
)
|
|
18956
18981
|
] });
|
|
18957
18982
|
}
|
|
18958
18983
|
|
|
18959
18984
|
// src/components/Layout.jsx
|
|
18960
18985
|
import { useState as useState71 } from "react";
|
|
18961
18986
|
import { jsx as jsx95 } from "react/jsx-runtime";
|
|
18962
|
-
var Layout = ({ children }) => {
|
|
18987
|
+
var Layout = ({ children, sidebar, sidebarConfig }) => {
|
|
18963
18988
|
const [isOpen, setIsOpen] = useState71(true);
|
|
18989
|
+
const resolvedSidebarConfig = sidebar != null ? sidebar : sidebarConfig;
|
|
18964
18990
|
return /* @__PURE__ */ jsx95("div", { className: "flowcore fc:flex fc:min-h-screen", children: /* @__PURE__ */ jsx95(
|
|
18965
18991
|
Sidebar,
|
|
18966
18992
|
{
|
|
18967
18993
|
isOpen,
|
|
18968
18994
|
onToggle: () => setIsOpen(!isOpen),
|
|
18969
|
-
childrens: children
|
|
18995
|
+
childrens: children,
|
|
18996
|
+
sidebar: resolvedSidebarConfig,
|
|
18997
|
+
sidebarConfig: resolvedSidebarConfig
|
|
18970
18998
|
}
|
|
18971
18999
|
) });
|
|
18972
19000
|
};
|