ptechcore_ui 1.0.41 → 1.0.42

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/index.cjs CHANGED
@@ -2875,12 +2875,9 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "",
2875
2875
  { name: "WiseFm", icon: facilityblue_default, iconWhite: facilityblanc_default, url: moduleUrls.wiseOps },
2876
2876
  { name: "WiseHSE", icon: security_managementblue_default, iconWhite: security_managementblanc_default, url: moduleUrls.wiseGuard }
2877
2877
  ].map((module2) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2878
- "button",
2878
+ import_react_router_dom3.Link,
2879
2879
  {
2880
- onClick: () => {
2881
- window.open(module2.url, "_blank", "noopener,noreferrer");
2882
- setShowModulesMenu(false);
2883
- },
2880
+ to: module2.url !== "#" ? module2.url : "#",
2884
2881
  className: "group p-4 rounded-lg bg-gray-100 hover:bg-[#4A5568] transition-all duration-200 text-center",
2885
2882
  children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col items-center", children: [
2886
2883
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
@@ -2912,12 +2909,9 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "",
2912
2909
  { name: "WiseView", icon: wiseblues_default, iconWhite: wiseblancs_default, url: moduleUrls.wiseView },
2913
2910
  { name: "WiseProcess", icon: sopblues_default, iconWhite: sopblancs_default, url: moduleUrls.wiseProcess }
2914
2911
  ].map((module2) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2915
- "button",
2912
+ import_react_router_dom3.Link,
2916
2913
  {
2917
- onClick: () => {
2918
- window.open(module2.url, "_blank", "noopener,noreferrer");
2919
- setShowModulesMenu(false);
2920
- },
2914
+ to: module2.url !== "#" ? module2.url : "#",
2921
2915
  className: "group p-4 rounded-lg bg-gray-100 hover:bg-[#4A5568] transition-all duration-200 text-center",
2922
2916
  children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col items-center", children: [
2923
2917
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
@@ -2953,19 +2947,13 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "",
2953
2947
  { name: "WiseCash", icon: financeblue_default, iconWhite: financeblanc_default, url: moduleUrls.wiseCash },
2954
2948
  { name: "WiseCollect", icon: collection_litigationblue_default, iconWhite: collection_litigationblanc_default, url: moduleUrls.wiseCollect }
2955
2949
  ].map((module2) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2956
- "button",
2950
+ import_react_router_dom3.Link,
2957
2951
  {
2958
- onClick: () => {
2959
- if (module2.url !== "#") {
2960
- window.open(module2.url, "_blank", "noopener,noreferrer");
2961
- }
2962
- setShowModulesMenu(false);
2963
- },
2952
+ to: module2.url !== "#" ? module2.url : "#",
2964
2953
  className: cn(
2965
2954
  "group p-4 rounded-lg bg-gray-100 hover:bg-[#4A5568] transition-all duration-200 text-center",
2966
2955
  module2.url === "#" && "opacity-50 cursor-not-allowed hover:bg-gray-100"
2967
2956
  ),
2968
- disabled: module2.url === "#",
2969
2957
  children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col items-center", children: [
2970
2958
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2971
2959
  "img",
@@ -2992,12 +2980,9 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "",
2992
2980
  { name: "WiseProcure", icon: procurementblue_default, iconWhite: procurementblanc_default, url: moduleUrls.wiseProcure },
2993
2981
  { name: "WiseHR", icon: human_capitalblue_default, iconWhite: human_capitalblanc_default, url: moduleUrls.wiseHR }
2994
2982
  ].map((module2) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2995
- "button",
2983
+ import_react_router_dom3.Link,
2996
2984
  {
2997
- onClick: () => {
2998
- window.open(module2.url, "_blank", "noopener,noreferrer");
2999
- setShowModulesMenu(false);
3000
- },
2985
+ to: module2.url !== "#" ? module2.url : "#",
3001
2986
  className: "group p-4 rounded-lg bg-gray-100 hover:bg-[#4A5568] transition-all duration-200 text-center",
3002
2987
  children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col items-center", children: [
3003
2988
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
@@ -20027,7 +20012,6 @@ ${csvData}`], { type: "text/csv" });
20027
20012
  // src/App.tsx
20028
20013
  var import_jsx_runtime84 = require("react/jsx-runtime");
20029
20014
  var WorkSpaceRoutes = ({ module_name = "Rewise", module_id = "core", module_description = "" }) => {
20030
- const { showAuthModal, setShowAuthModal } = useSession();
20031
20015
  const primaryMenuItems = [
20032
20016
  { id: "home", label: "Home", path: "/workspace/", icon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react61.HomeIcon, { className: "w-4 h-4" }) },
20033
20017
  { id: "task-pilot", label: "Task Pilot", path: "/workspace/task-pilot", icon: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react61.Workflow, { className: "w-4 h-4" }) },
package/dist/index.js CHANGED
@@ -227,7 +227,7 @@ var FileInput = ({
227
227
 
228
228
  // src/components/layout/ModernDoubleSidebarLayout.tsx
229
229
  import React4, { useState as useState5, useEffect as useEffect4 } from "react";
230
- import { useLocation, useNavigate } from "react-router-dom";
230
+ import { Link as Link2, useLocation, useNavigate } from "react-router-dom";
231
231
  import {
232
232
  Settings,
233
233
  ChevronLeft,
@@ -2772,12 +2772,9 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "",
2772
2772
  { name: "WiseFm", icon: facilityblue_default, iconWhite: facilityblanc_default, url: moduleUrls.wiseOps },
2773
2773
  { name: "WiseHSE", icon: security_managementblue_default, iconWhite: security_managementblanc_default, url: moduleUrls.wiseGuard }
2774
2774
  ].map((module) => /* @__PURE__ */ jsx9(
2775
- "button",
2775
+ Link2,
2776
2776
  {
2777
- onClick: () => {
2778
- window.open(module.url, "_blank", "noopener,noreferrer");
2779
- setShowModulesMenu(false);
2780
- },
2777
+ to: module.url !== "#" ? module.url : "#",
2781
2778
  className: "group p-4 rounded-lg bg-gray-100 hover:bg-[#4A5568] transition-all duration-200 text-center",
2782
2779
  children: /* @__PURE__ */ jsxs6("div", { className: "flex flex-col items-center", children: [
2783
2780
  /* @__PURE__ */ jsx9(
@@ -2809,12 +2806,9 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "",
2809
2806
  { name: "WiseView", icon: wiseblues_default, iconWhite: wiseblancs_default, url: moduleUrls.wiseView },
2810
2807
  { name: "WiseProcess", icon: sopblues_default, iconWhite: sopblancs_default, url: moduleUrls.wiseProcess }
2811
2808
  ].map((module) => /* @__PURE__ */ jsx9(
2812
- "button",
2809
+ Link2,
2813
2810
  {
2814
- onClick: () => {
2815
- window.open(module.url, "_blank", "noopener,noreferrer");
2816
- setShowModulesMenu(false);
2817
- },
2811
+ to: module.url !== "#" ? module.url : "#",
2818
2812
  className: "group p-4 rounded-lg bg-gray-100 hover:bg-[#4A5568] transition-all duration-200 text-center",
2819
2813
  children: /* @__PURE__ */ jsxs6("div", { className: "flex flex-col items-center", children: [
2820
2814
  /* @__PURE__ */ jsx9(
@@ -2850,19 +2844,13 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "",
2850
2844
  { name: "WiseCash", icon: financeblue_default, iconWhite: financeblanc_default, url: moduleUrls.wiseCash },
2851
2845
  { name: "WiseCollect", icon: collection_litigationblue_default, iconWhite: collection_litigationblanc_default, url: moduleUrls.wiseCollect }
2852
2846
  ].map((module) => /* @__PURE__ */ jsx9(
2853
- "button",
2847
+ Link2,
2854
2848
  {
2855
- onClick: () => {
2856
- if (module.url !== "#") {
2857
- window.open(module.url, "_blank", "noopener,noreferrer");
2858
- }
2859
- setShowModulesMenu(false);
2860
- },
2849
+ to: module.url !== "#" ? module.url : "#",
2861
2850
  className: cn(
2862
2851
  "group p-4 rounded-lg bg-gray-100 hover:bg-[#4A5568] transition-all duration-200 text-center",
2863
2852
  module.url === "#" && "opacity-50 cursor-not-allowed hover:bg-gray-100"
2864
2853
  ),
2865
- disabled: module.url === "#",
2866
2854
  children: /* @__PURE__ */ jsxs6("div", { className: "flex flex-col items-center", children: [
2867
2855
  /* @__PURE__ */ jsx9(
2868
2856
  "img",
@@ -2889,12 +2877,9 @@ var RewiseLayout = ({ children, module_name = "Rewise", module_description = "",
2889
2877
  { name: "WiseProcure", icon: procurementblue_default, iconWhite: procurementblanc_default, url: moduleUrls.wiseProcure },
2890
2878
  { name: "WiseHR", icon: human_capitalblue_default, iconWhite: human_capitalblanc_default, url: moduleUrls.wiseHR }
2891
2879
  ].map((module) => /* @__PURE__ */ jsx9(
2892
- "button",
2880
+ Link2,
2893
2881
  {
2894
- onClick: () => {
2895
- window.open(module.url, "_blank", "noopener,noreferrer");
2896
- setShowModulesMenu(false);
2897
- },
2882
+ to: module.url !== "#" ? module.url : "#",
2898
2883
  className: "group p-4 rounded-lg bg-gray-100 hover:bg-[#4A5568] transition-all duration-200 text-center",
2899
2884
  children: /* @__PURE__ */ jsxs6("div", { className: "flex flex-col items-center", children: [
2900
2885
  /* @__PURE__ */ jsx9(
@@ -3566,7 +3551,7 @@ var AccountServices = {
3566
3551
 
3567
3552
  // src/components/common/FDrawer.tsx
3568
3553
  import React7, { useEffect as useEffect6, useState as useState8, useRef } from "react";
3569
- import { useLocation as useLocation2, useNavigate as useNavigate2, useSearchParams as useSearchParams2, Link as Link2 } from "react-router-dom";
3554
+ import { useLocation as useLocation2, useNavigate as useNavigate2, useSearchParams as useSearchParams2, Link as Link3 } from "react-router-dom";
3570
3555
 
3571
3556
  // src/hooks/usePermissions.ts
3572
3557
  var usePermissions = () => {
@@ -4617,7 +4602,7 @@ var FDrawer = ({
4617
4602
  ),
4618
4603
  dropdownOpen === item.id && /* @__PURE__ */ jsxs9("div", { className: "fixed right-3 mt-2 w-48 bg-white rounded-lg shadow-lg border border-gray-200 py-2 z-10", children: [
4619
4604
  actions.filter((action) => !action.permission || hasPermission(action.permission)).map(
4620
- (action, index) => action.navigate ? /* @__PURE__ */ jsx12(Link2, { to: action.navigate, className: "w-full px-4 py-2 text-left text-sm text-gray-700 hover:bg-gray-50 flex items-center space-x-2", children: action.label }, index) : /* @__PURE__ */ jsx12("button", { onClick: () => {
4605
+ (action, index) => action.navigate ? /* @__PURE__ */ jsx12(Link3, { to: action.navigate, className: "w-full px-4 py-2 text-left text-sm text-gray-700 hover:bg-gray-50 flex items-center space-x-2", children: action.label }, index) : /* @__PURE__ */ jsx12("button", { onClick: () => {
4621
4606
  action.onclick && action.onclick(item);
4622
4607
  setDropdownOpen(null);
4623
4608
  }, className: "w-full px-4 py-2 text-left text-sm text-gray-700 hover:bg-gray-50 flex items-center space-x-2", children: action.label }, index)
@@ -4674,27 +4659,27 @@ var Pagination = ({
4674
4659
  if (total_pages <= 5) {
4675
4660
  for (let i = 1; i <= total_pages; i++)
4676
4661
  pageItems.push(
4677
- /* @__PURE__ */ jsx12("li", { className: `page-item ${current_page === i ? "active" : ""}`, children: /* @__PURE__ */ jsx12(Link2, { className: "page-link px-3 py-1 border border-[#E8E8E8] rounded text-sm", to: "#", onClick: () => setFilters({ ...filtersValue, page: i }), children: i }) }, i)
4662
+ /* @__PURE__ */ jsx12("li", { className: `page-item ${current_page === i ? "active" : ""}`, children: /* @__PURE__ */ jsx12(Link3, { className: "page-link px-3 py-1 border border-[#E8E8E8] rounded text-sm", to: "#", onClick: () => setFilters({ ...filtersValue, page: i }), children: i }) }, i)
4678
4663
  );
4679
4664
  } else {
4680
4665
  let start = Math.max(1, current_page - range);
4681
4666
  let end = Math.min(total_pages, current_page + range);
4682
4667
  if (start > 1) {
4683
4668
  pageItems.push(
4684
- /* @__PURE__ */ jsx12("li", { className: `page-item ${current_page === 1 ? "active" : ""}`, children: /* @__PURE__ */ jsx12(Link2, { className: "page-link px-3 py-1 border border-[#E8E8E8] rounded text-sm", to: "#", onClick: () => setFilters({ ...filtersValue, page: 1 }), children: "1" }) }, 1)
4669
+ /* @__PURE__ */ jsx12("li", { className: `page-item ${current_page === 1 ? "active" : ""}`, children: /* @__PURE__ */ jsx12(Link3, { className: "page-link px-3 py-1 border border-[#E8E8E8] rounded text-sm", to: "#", onClick: () => setFilters({ ...filtersValue, page: 1 }), children: "1" }) }, 1)
4685
4670
  );
4686
4671
  if (start > 2)
4687
4672
  pageItems.push(/* @__PURE__ */ jsx12("li", { className: "page-item disabled", children: /* @__PURE__ */ jsx12("span", { className: "page-link px-3 py-1 text-sm", children: "..." }) }, "ellipsis-start"));
4688
4673
  }
4689
4674
  for (let i = start; i <= end; i++)
4690
4675
  pageItems.push(
4691
- /* @__PURE__ */ jsx12("li", { className: `page-item ${current_page === i ? "active" : ""}`, children: /* @__PURE__ */ jsx12(Link2, { className: "page-link px-3 py-1 border border-[#E8E8E8] rounded text-sm", to: "#", onClick: () => setFilters({ ...filtersValue, page: i }), children: i }) }, i)
4676
+ /* @__PURE__ */ jsx12("li", { className: `page-item ${current_page === i ? "active" : ""}`, children: /* @__PURE__ */ jsx12(Link3, { className: "page-link px-3 py-1 border border-[#E8E8E8] rounded text-sm", to: "#", onClick: () => setFilters({ ...filtersValue, page: i }), children: i }) }, i)
4692
4677
  );
4693
4678
  if (end < total_pages) {
4694
4679
  if (end < total_pages - 1)
4695
4680
  pageItems.push(/* @__PURE__ */ jsx12("li", { className: "page-item disabled", children: /* @__PURE__ */ jsx12("span", { className: "page-link px-3 py-1 text-sm", children: "..." }) }, "ellipsis-end"));
4696
4681
  pageItems.push(
4697
- /* @__PURE__ */ jsx12("li", { className: `page-item ${current_page === total_pages ? "active" : ""}`, children: /* @__PURE__ */ jsx12(Link2, { className: "page-link px-3 py-1 border border-[#E8E8E8] rounded text-sm", to: "#", onClick: () => setFilters({ ...filtersValue, page: total_pages }), children: total_pages }) }, total_pages)
4682
+ /* @__PURE__ */ jsx12("li", { className: `page-item ${current_page === total_pages ? "active" : ""}`, children: /* @__PURE__ */ jsx12(Link3, { className: "page-link px-3 py-1 border border-[#E8E8E8] rounded text-sm", to: "#", onClick: () => setFilters({ ...filtersValue, page: total_pages }), children: total_pages }) }, total_pages)
4698
4683
  );
4699
4684
  }
4700
4685
  }
@@ -4714,9 +4699,9 @@ var Pagination = ({
4714
4699
  " entr\xE9es"
4715
4700
  ] }),
4716
4701
  /* @__PURE__ */ jsx12("nav", { children: /* @__PURE__ */ jsxs9("ul", { className: "flex items-center space-x-2 pagination", children: [
4717
- /* @__PURE__ */ jsx12("li", { className: `page-item ${previous === null ? "disabled" : ""}`, children: /* @__PURE__ */ jsx12(Link2, { className: "page-link px-3 py-1 border border-[#E8E8E8] rounded text-sm disabled:opacity-50", to: "#", onClick: () => handleChangePage("previous"), tabIndex: -1, "aria-disabled": previous === null, children: "Pr\xE9c\xE9dent" }) }),
4702
+ /* @__PURE__ */ jsx12("li", { className: `page-item ${previous === null ? "disabled" : ""}`, children: /* @__PURE__ */ jsx12(Link3, { className: "page-link px-3 py-1 border border-[#E8E8E8] rounded text-sm disabled:opacity-50", to: "#", onClick: () => handleChangePage("previous"), tabIndex: -1, "aria-disabled": previous === null, children: "Pr\xE9c\xE9dent" }) }),
4718
4703
  pageItems,
4719
- /* @__PURE__ */ jsx12("li", { className: `page-item ${next === null ? "disabled" : ""}`, children: /* @__PURE__ */ jsx12(Link2, { className: "page-link px-3 py-1 border border-[#E8E8E8] rounded text-sm disabled:opacity-50", to: "#", onClick: () => handleChangePage("next"), "aria-disabled": next === null, children: "Suivant" }) }),
4704
+ /* @__PURE__ */ jsx12("li", { className: `page-item ${next === null ? "disabled" : ""}`, children: /* @__PURE__ */ jsx12(Link3, { className: "page-link px-3 py-1 border border-[#E8E8E8] rounded text-sm disabled:opacity-50", to: "#", onClick: () => handleChangePage("next"), "aria-disabled": next === null, children: "Suivant" }) }),
4720
4705
  /* @__PURE__ */ jsx12("li", { className: "page-item", style: { border: "0.02rem solid #f2f2f2" }, children: /* @__PURE__ */ jsx12(
4721
4706
  "select",
4722
4707
  {
@@ -20165,7 +20150,6 @@ ${csvData}`], { type: "text/csv" });
20165
20150
  // src/App.tsx
20166
20151
  import { jsx as jsx84, jsxs as jsxs79 } from "react/jsx-runtime";
20167
20152
  var WorkSpaceRoutes = ({ module_name = "Rewise", module_id = "core", module_description = "" }) => {
20168
- const { showAuthModal, setShowAuthModal } = useSession();
20169
20153
  const primaryMenuItems = [
20170
20154
  { id: "home", label: "Home", path: "/workspace/", icon: /* @__PURE__ */ jsx84(HomeIcon, { className: "w-4 h-4" }) },
20171
20155
  { id: "task-pilot", label: "Task Pilot", path: "/workspace/task-pilot", icon: /* @__PURE__ */ jsx84(Workflow, { className: "w-4 h-4" }) },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ptechcore_ui",
3
- "version": "1.0.41",
3
+ "version": "1.0.42",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",