flowcore-fn 9.4.7 → 9.4.9

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.
@@ -0,0 +1,9 @@
1
+ import {
2
+ ApiEndpointsProvider_default,
3
+ getApiEndpoints
4
+ } from "./chunk-3NI4QKQW.mjs";
5
+ import "./chunk-I4E63NIC.mjs";
6
+ export {
7
+ ApiEndpointsProvider_default as default,
8
+ getApiEndpoints
9
+ };
@@ -0,0 +1,9 @@
1
+ import {
2
+ ApiServicepackage_default,
3
+ getApiService
4
+ } from "./chunk-HRODB3L2.mjs";
5
+ import "./chunk-I4E63NIC.mjs";
6
+ export {
7
+ ApiServicepackage_default as default,
8
+ getApiService
9
+ };
@@ -0,0 +1,34 @@
1
+ // src/components/Service/ApiEndpointsProvider.js
2
+ var STORAGE_KEY = "FLOWCORE_API_ENDPOINTS";
3
+ var apiEndpoints = null;
4
+ var ApiEndpointsProvider = ({ apiEndpoints: endpoints }) => {
5
+ if (typeof window !== "undefined" && endpoints) {
6
+ apiEndpoints = endpoints;
7
+ sessionStorage.setItem(
8
+ STORAGE_KEY,
9
+ JSON.stringify(endpoints)
10
+ );
11
+ }
12
+ return null;
13
+ };
14
+ var getApiEndpoints = () => {
15
+ if (apiEndpoints) {
16
+ return apiEndpoints;
17
+ }
18
+ if (typeof window !== "undefined") {
19
+ const data = sessionStorage.getItem(STORAGE_KEY);
20
+ if (data) {
21
+ apiEndpoints = JSON.parse(data);
22
+ return apiEndpoints;
23
+ }
24
+ }
25
+ throw new Error(
26
+ "Api Endpoints not initialized. Please render <ApiEndpointsProvider apiEndpoints={ApiEndPoints} /> once before using FlowCore."
27
+ );
28
+ };
29
+ var ApiEndpointsProvider_default = ApiEndpointsProvider;
30
+
31
+ export {
32
+ getApiEndpoints,
33
+ ApiEndpointsProvider_default
34
+ };
@@ -0,0 +1,22 @@
1
+ // src/components/Service/ApiServicepackage.js
2
+ var apiService = null;
3
+ var ApiServicepackage = ({ apiService: service }) => {
4
+ if (service) {
5
+ apiService = service;
6
+ }
7
+ return null;
8
+ };
9
+ var getApiService = () => {
10
+ if (apiService) {
11
+ return apiService;
12
+ }
13
+ throw new Error(
14
+ "ApiService not initialized. Please render <ApiServicepackage apiService={ApiService} /> once before using FlowCore."
15
+ );
16
+ };
17
+ var ApiServicepackage_default = ApiServicepackage;
18
+
19
+ export {
20
+ getApiService,
21
+ ApiServicepackage_default
22
+ };
@@ -0,0 +1,24 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+
21
+ export {
22
+ __spreadValues,
23
+ __spreadProps
24
+ };
package/dist/pkg-index.js CHANGED
@@ -22,6 +22,9 @@ var __spreadValues = (a, b) => {
22
22
  return a;
23
23
  };
24
24
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __esm = (fn, res) => function __init() {
26
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
27
+ };
25
28
  var __export = (target, all) => {
26
29
  for (var name in all)
27
30
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -44,6 +47,76 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
44
47
  ));
45
48
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
46
49
 
50
+ // src/components/Service/ApiEndpointsProvider.js
51
+ var ApiEndpointsProvider_exports = {};
52
+ __export(ApiEndpointsProvider_exports, {
53
+ default: () => ApiEndpointsProvider_default,
54
+ getApiEndpoints: () => getApiEndpoints
55
+ });
56
+ var STORAGE_KEY, apiEndpoints, ApiEndpointsProvider, getApiEndpoints, ApiEndpointsProvider_default;
57
+ var init_ApiEndpointsProvider = __esm({
58
+ "src/components/Service/ApiEndpointsProvider.js"() {
59
+ "use strict";
60
+ STORAGE_KEY = "FLOWCORE_API_ENDPOINTS";
61
+ apiEndpoints = null;
62
+ ApiEndpointsProvider = ({ apiEndpoints: endpoints }) => {
63
+ if (typeof window !== "undefined" && endpoints) {
64
+ apiEndpoints = endpoints;
65
+ sessionStorage.setItem(
66
+ STORAGE_KEY,
67
+ JSON.stringify(endpoints)
68
+ );
69
+ }
70
+ return null;
71
+ };
72
+ getApiEndpoints = () => {
73
+ if (apiEndpoints) {
74
+ return apiEndpoints;
75
+ }
76
+ if (typeof window !== "undefined") {
77
+ const data = sessionStorage.getItem(STORAGE_KEY);
78
+ if (data) {
79
+ apiEndpoints = JSON.parse(data);
80
+ return apiEndpoints;
81
+ }
82
+ }
83
+ throw new Error(
84
+ "Api Endpoints not initialized. Please render <ApiEndpointsProvider apiEndpoints={ApiEndPoints} /> once before using FlowCore."
85
+ );
86
+ };
87
+ ApiEndpointsProvider_default = ApiEndpointsProvider;
88
+ }
89
+ });
90
+
91
+ // src/components/Service/ApiServicepackage.js
92
+ var ApiServicepackage_exports = {};
93
+ __export(ApiServicepackage_exports, {
94
+ default: () => ApiServicepackage_default,
95
+ getApiService: () => getApiService
96
+ });
97
+ var apiService, ApiServicepackage, getApiService, ApiServicepackage_default;
98
+ var init_ApiServicepackage = __esm({
99
+ "src/components/Service/ApiServicepackage.js"() {
100
+ "use strict";
101
+ apiService = null;
102
+ ApiServicepackage = ({ apiService: service }) => {
103
+ if (service) {
104
+ apiService = service;
105
+ }
106
+ return null;
107
+ };
108
+ getApiService = () => {
109
+ if (apiService) {
110
+ return apiService;
111
+ }
112
+ throw new Error(
113
+ "ApiService not initialized. Please render <ApiServicepackage apiService={ApiService} /> once before using FlowCore."
114
+ );
115
+ };
116
+ ApiServicepackage_default = ApiServicepackage;
117
+ }
118
+ });
119
+
47
120
  // src/pkg-index.jsx
48
121
  var pkg_index_exports = {};
49
122
  __export(pkg_index_exports, {
@@ -62,54 +135,8 @@ var import_router = require("next/router");
62
135
  // src/components/workflow/WorkflowMain.jsx
63
136
  var import_react9 = __toESM(require("react"));
64
137
  var import_sweetalert23 = __toESM(require("sweetalert2"));
65
-
66
- // src/components/Service/ApiEndpointsProvider.js
67
- var STORAGE_KEY = "FLOWCORE_API_ENDPOINTS";
68
- var apiEndpoints = null;
69
- var ApiEndpointsProvider = ({ apiEndpoints: endpoints }) => {
70
- if (typeof window !== "undefined" && endpoints) {
71
- apiEndpoints = endpoints;
72
- sessionStorage.setItem(
73
- STORAGE_KEY,
74
- JSON.stringify(endpoints)
75
- );
76
- }
77
- return null;
78
- };
79
- var getApiEndpoints = () => {
80
- if (apiEndpoints) {
81
- return apiEndpoints;
82
- }
83
- if (typeof window !== "undefined") {
84
- const data = sessionStorage.getItem(STORAGE_KEY);
85
- if (data) {
86
- apiEndpoints = JSON.parse(data);
87
- return apiEndpoints;
88
- }
89
- }
90
- throw new Error(
91
- "Api Endpoints not initialized. Please render <ApiEndpointsProvider apiEndpoints={ApiEndPoints} /> once before using FlowCore."
92
- );
93
- };
94
- var ApiEndpointsProvider_default = ApiEndpointsProvider;
95
-
96
- // src/components/Service/ApiServicepackage.js
97
- var apiService = null;
98
- var ApiServicepackage = ({ apiService: service }) => {
99
- if (service) {
100
- apiService = service;
101
- }
102
- return null;
103
- };
104
- var getApiService = () => {
105
- if (apiService) {
106
- return apiService;
107
- }
108
- throw new Error(
109
- "ApiService not initialized. Please render <ApiServicepackage apiService={ApiService} /> once before using FlowCore."
110
- );
111
- };
112
- var ApiServicepackage_default = ApiServicepackage;
138
+ init_ApiEndpointsProvider();
139
+ init_ApiServicepackage();
113
140
 
114
141
  // src/components/workflow/SearchBar.jsx
115
142
  var import_react = __toESM(require("react"));
@@ -551,6 +578,8 @@ function WorkflowTable({ pageSize, searchQuery, apiData, onEdit, onDeleteApi })
551
578
  // src/components/workflow/AddWorkflowModal.jsx
552
579
  var import_react4 = __toESM(require("react"));
553
580
  var import_sweetalert2 = __toESM(require("sweetalert2"));
581
+ init_ApiEndpointsProvider();
582
+ init_ApiServicepackage();
554
583
  var import_jsx_runtime4 = require("react/jsx-runtime");
555
584
  var INITIAL_FORM = {
556
585
  workflowTypeId: "",
@@ -1905,6 +1934,8 @@ function WorkflowTypeTable({
1905
1934
  // src/components/workflow-type/AddWorkflowTypeModal.jsx
1906
1935
  var import_react14 = __toESM(require("react"));
1907
1936
  var import_sweetalert24 = __toESM(require("sweetalert2"));
1937
+ init_ApiEndpointsProvider();
1938
+ init_ApiServicepackage();
1908
1939
  var import_jsx_runtime14 = require("react/jsx-runtime");
1909
1940
  var initialFormData = {
1910
1941
  workflowTypeCode: "",
@@ -2025,6 +2056,8 @@ var FormField = ({ label, required, error, children }) => /* @__PURE__ */ (0, im
2025
2056
  var AddWorkflowTypeModal_default = AddWorkflowTypeModal;
2026
2057
 
2027
2058
  // src/components/workflow-type/WorkflowTypeMains.js
2059
+ init_ApiEndpointsProvider();
2060
+ init_ApiServicepackage();
2028
2061
  var import_jsx_runtime15 = require("react/jsx-runtime");
2029
2062
  function WorkflowTypeMains() {
2030
2063
  const [refreshkey, setRefreshKey] = (0, import_react15.useState)(0);
@@ -2160,6 +2193,8 @@ function Footer() {
2160
2193
  // src/components/WorkflowStep/AddWorkflowStepModal.js
2161
2194
  var import_react17 = __toESM(require("react"));
2162
2195
  var import_sweetalert26 = __toESM(require("sweetalert2"));
2196
+ init_ApiEndpointsProvider();
2197
+ init_ApiServicepackage();
2163
2198
  var import_jsx_runtime17 = require("react/jsx-runtime");
2164
2199
  function AddWorkflowStepModal({ onClose, onSave }) {
2165
2200
  const [formData, setFormData] = (0, import_react17.useState)({
@@ -2576,6 +2611,8 @@ function AddWorkflowStepModal({ onClose, onSave }) {
2576
2611
  // src/components/WorkflowStep/EditWorkflowStepModal.js
2577
2612
  var import_react18 = __toESM(require("react"));
2578
2613
  var import_sweetalert27 = __toESM(require("sweetalert2"));
2614
+ init_ApiEndpointsProvider();
2615
+ init_ApiServicepackage();
2579
2616
  var import_jsx_runtime18 = require("react/jsx-runtime");
2580
2617
  function EditWorkflowStepModal({ isOpen, onClose, onSave, selectedData }) {
2581
2618
  const [formData, setFormData] = (0, import_react18.useState)({
@@ -3000,6 +3037,8 @@ function EditWorkflowStepModal({ isOpen, onClose, onSave, selectedData }) {
3000
3037
  }
3001
3038
 
3002
3039
  // src/components/WorkflowStep/main.js
3040
+ init_ApiEndpointsProvider();
3041
+ init_ApiServicepackage();
3003
3042
  var import_jsx_runtime19 = require("react/jsx-runtime");
3004
3043
  function WorkflowStep() {
3005
3044
  const tableRef = (0, import_react19.useRef)(null);
@@ -3863,9 +3902,13 @@ function WorkFlowTransition() {
3863
3902
  // src/components/user-hierarchy-node-mapping/user_hierarachy_node_main.jsx
3864
3903
  var import_react27 = __toESM(require("react"));
3865
3904
  var import_sweetalert29 = __toESM(require("sweetalert2"));
3905
+ init_ApiEndpointsProvider();
3906
+ init_ApiServicepackage();
3866
3907
 
3867
3908
  // src/components/user-hierarchy-node-mapping/adduserhierarchynode.jsx
3868
3909
  var import_react22 = __toESM(require("react"));
3910
+ init_ApiEndpointsProvider();
3911
+ init_ApiServicepackage();
3869
3912
  var import_jsx_runtime22 = require("react/jsx-runtime");
3870
3913
  function AddUserHierarchyNodeMappingModal({
3871
3914
  isOpen,
@@ -4532,6 +4575,8 @@ function User_hierarchy_mapping_main() {
4532
4575
  // src/components/user-hierarchy-node-mapping/Workflow_Step_Hierarchy_Mapping.jsx
4533
4576
  var import_react28 = __toESM(require("react"));
4534
4577
  var import_sweetalert210 = __toESM(require("sweetalert2"));
4578
+ init_ApiEndpointsProvider();
4579
+ init_ApiServicepackage();
4535
4580
  var import_jsx_runtime28 = require("react/jsx-runtime");
4536
4581
  var emptyForm = { workflowStepId: "", hierarchyNodeId: "", isActive: "true" };
4537
4582
  var getRows = (result) => {
@@ -5010,6 +5055,9 @@ function Workflow_Step_Hierarchy_Mapping() {
5010
5055
 
5011
5056
  // src/components/document-configuration/DocumentConfigurationmain.jsx
5012
5057
  var import_react34 = __toESM(require("react"));
5058
+ var import_sweetalert211 = __toESM(require("sweetalert2"));
5059
+ init_ApiEndpointsProvider();
5060
+ init_ApiServicepackage();
5013
5061
 
5014
5062
  // src/components/document-configuration/SearchBar.jsx
5015
5063
  var import_react29 = __toESM(require("react"));
@@ -5690,7 +5738,8 @@ var import_react33 = __toESM(require("react"));
5690
5738
  var import_jsx_runtime33 = require("react/jsx-runtime");
5691
5739
  function AddDocumentConfigModal({
5692
5740
  isOpen,
5693
- onClose
5741
+ onClose,
5742
+ onSave
5694
5743
  }) {
5695
5744
  const [isMandatory, setIsMandatory] = (0, import_react33.useState)(false);
5696
5745
  const [status, setStatus] = (0, import_react33.useState)("Active");
@@ -5699,7 +5748,41 @@ function AddDocumentConfigModal({
5699
5748
  const [maxSize, setMaxSize] = (0, import_react33.useState)("");
5700
5749
  const [allowedExtensions, setAllowedExtensions] = (0, import_react33.useState)("");
5701
5750
  const [errors, setErrors] = (0, import_react33.useState)({});
5702
- const handleSave = () => {
5751
+ const [workflowSteps, setWorkflowSteps] = (0, import_react33.useState)([]);
5752
+ const [loadingSteps, setLoadingSteps] = (0, import_react33.useState)(false);
5753
+ const [isSubmitting, setIsSubmitting] = (0, import_react33.useState)(false);
5754
+ (0, import_react33.useEffect)(() => {
5755
+ if (!isOpen) return;
5756
+ (async () => {
5757
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
5758
+ try {
5759
+ setLoadingSteps(true);
5760
+ const { getApiEndpoints: getApiEndpoints2 } = await Promise.resolve().then(() => (init_ApiEndpointsProvider(), ApiEndpointsProvider_exports));
5761
+ const { getApiService: getApiService2 } = await Promise.resolve().then(() => (init_ApiServicepackage(), ApiServicepackage_exports));
5762
+ const endpoint = (_c = (_b = (_a = getApiEndpoints2()) == null ? void 0 : _a.flowCore) == null ? void 0 : _b.workflowStep) == null ? void 0 : _c.getList;
5763
+ if (!endpoint) throw new Error("Workflow step list endpoint is not configured.");
5764
+ const result = await getApiService2().get(endpoint);
5765
+ const value = (_h = (_g = (_f = (_d = result == null ? void 0 : result.data) == null ? void 0 : _d.data) != null ? _f : (_e = result == null ? void 0 : result.data) == null ? void 0 : _e.result) != null ? _g : result == null ? void 0 : result.data) != null ? _h : result;
5766
+ setWorkflowSteps(Array.isArray(value) ? value : (_j = (_i = value == null ? void 0 : value.items) != null ? _i : value == null ? void 0 : value.records) != null ? _j : []);
5767
+ } catch (_) {
5768
+ setWorkflowSteps([]);
5769
+ } finally {
5770
+ setLoadingSteps(false);
5771
+ }
5772
+ })();
5773
+ }, [isOpen]);
5774
+ (0, import_react33.useEffect)(() => {
5775
+ if (!isOpen) {
5776
+ setDocumentName("");
5777
+ setStepId("");
5778
+ setMaxSize("");
5779
+ setAllowedExtensions("");
5780
+ setIsMandatory(false);
5781
+ setStatus("Active");
5782
+ setErrors({});
5783
+ }
5784
+ }, [isOpen]);
5785
+ const handleSave = async () => {
5703
5786
  let newErrors = {};
5704
5787
  if (!documentName.trim()) {
5705
5788
  newErrors.documentName = "Document Name is required";
@@ -5715,7 +5798,19 @@ function AddDocumentConfigModal({
5715
5798
  }
5716
5799
  setErrors(newErrors);
5717
5800
  if (Object.keys(newErrors).length === 0) {
5718
- onClose();
5801
+ setIsSubmitting(true);
5802
+ try {
5803
+ await (onSave == null ? void 0 : onSave({
5804
+ workflowStepId: Number(stepId),
5805
+ documentName: documentName.trim(),
5806
+ allowedExtensions: allowedExtensions.trim(),
5807
+ maxSizeMB: Number(maxSize),
5808
+ isMandatory: Boolean(isMandatory),
5809
+ createdBy: "System"
5810
+ }));
5811
+ } finally {
5812
+ setIsSubmitting(false);
5813
+ }
5719
5814
  }
5720
5815
  };
5721
5816
  if (!isOpen) return null;
@@ -5747,10 +5842,18 @@ function AddDocumentConfigModal({
5747
5842
  "Workflow Step ID ",
5748
5843
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "fc:text-red-500", children: "*" })
5749
5844
  ] }),
5750
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("input", { type: "number", placeholder: "e.g. 1", value: stepId, onChange: (e) => {
5845
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("select", { value: stepId, disabled: loadingSteps, onChange: (e) => {
5751
5846
  setStepId(e.target.value);
5752
5847
  if (errors.stepId) setErrors(__spreadProps(__spreadValues({}, errors), { stepId: "" }));
5753
- }, className: `fc:w-full fc:border fc:p-2.5 fc:pl-9 fc:rounded-xl fc:text-xs fc:bg-white fc:text-align-left fc:focus:outline-none fc:focus:ring-2 fc:focus:ring-indigo-500/10 fc:focus:border-indigo-500 fc:border-slate-200 fc:text-slate-700 ${errors.stepId ? `fc:border-red-500 fc:ring-1 fc:ring-red-500` : `fc:border-slate-200 fc:border-indigo-500`}` }),
5848
+ }, className: `fc:w-full fc:border fc:p-2.5 fc:pl-9 fc:rounded-xl fc:text-xs fc:bg-white fc:text-align-left fc:focus:outline-none fc:focus:ring-2 fc:focus:ring-indigo-500/10 fc:focus:border-indigo-500 fc:text-slate-700 disabled:fc:opacity-60 ${errors.stepId ? `fc:border-red-500 fc:ring-1 fc:ring-red-500` : `fc:border-slate-200 fc:border-indigo-500`}`, children: [
5849
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("option", { value: "", children: loadingSteps ? "Loading workflow steps..." : "Select workflow step" }),
5850
+ workflowSteps.map((step) => {
5851
+ var _a, _b, _c, _d;
5852
+ const id = (_b = (_a = step.workflowStepId) != null ? _a : step.WorkflowStepId) != null ? _b : step.id;
5853
+ const name = (_d = (_c = step.stepName) != null ? _c : step.StepName) != null ? _d : `Step ${id}`;
5854
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("option", { value: id, children: name }, id);
5855
+ })
5856
+ ] }),
5754
5857
  errors.stepId && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "fc:text-red-500 fc:text-xs", children: errors.stepId })
5755
5858
  ] })
5756
5859
  ] }),
@@ -5822,7 +5925,7 @@ function AddDocumentConfigModal({
5822
5925
  ] }),
5823
5926
  /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "fc:flex fc:justify-end fc:gap-3 fc:px-8 fc:py-4 fc:border-t fc:border-slate-100 fc:bg-white", children: [
5824
5927
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("button", { onClick: onClose, className: "fc:px-5 fc:py-2.5 fc:text-sm fc:font-medium fc:text-gray-600 fc:bg-gray-100 hover:fc:fc:bg-gray-200 fc:rounded-xl fc:transition", children: "\u2715 Cancel" }),
5825
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("button", { onClick: handleSave, className: "fc:px-5 fc:py-2 fc:text-xs fc:font-bold fc:text-white fc:bg-blue-600 hover:fc:bg-blue-700 fc:rounded-xl fc:transition-all fc:shadow-sm", children: "Save Rules" })
5928
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("button", { onClick: handleSave, disabled: isSubmitting, className: "fc:px-5 fc:py-2 fc:text-xs fc:font-bold fc:text-white fc:bg-blue-600 hover:fc:bg-blue-700 fc:rounded-xl fc:transition-all fc:shadow-sm disabled:fc:opacity-60", children: isSubmitting ? "Saving..." : "Save Rules" })
5826
5929
  ] })
5827
5930
  ] })
5828
5931
  ] });
@@ -5842,6 +5945,21 @@ function DocumentConfigurationmain() {
5842
5945
  const [searchQuery, setSearchQuery] = (0, import_react34.useState)("");
5843
5946
  const [currentPage, setCurrentPage] = (0, import_react34.useState)(1);
5844
5947
  const [totalEntries, setTotalEntries] = (0, import_react34.useState)(0);
5948
+ const handleCreate = async (payload) => {
5949
+ var _a, _b, _c, _d, _e;
5950
+ try {
5951
+ const endpoint = (_c = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) == null ? void 0 : _b.documentConfiguration) == null ? void 0 : _c.create;
5952
+ if (!endpoint) throw new Error("Document Configuration create endpoint is not configured.");
5953
+ await getApiService().post(endpoint, payload);
5954
+ await import_sweetalert211.default.fire("Success", "Document configuration created successfully.", "success");
5955
+ setModalOpen(false);
5956
+ handleRefresh();
5957
+ return true;
5958
+ } catch (error) {
5959
+ await import_sweetalert211.default.fire("Error", ((_e = (_d = error == null ? void 0 : error.response) == null ? void 0 : _d.data) == null ? void 0 : _e.message) || (error == null ? void 0 : error.message) || "Unable to create document configuration.", "error");
5960
+ return false;
5961
+ }
5962
+ };
5845
5963
  const handlePageSizeChange = (e) => {
5846
5964
  setPageSize(Number(e.target.value));
5847
5965
  setCurrentPage(1);
@@ -5876,7 +5994,7 @@ function DocumentConfigurationmain() {
5876
5994
  ] }),
5877
5995
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ref: tableRef, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DocumentConfigTable, { pageSize, searchQuery, currentPage, setCurrentPage, setTotalEntries }, refreshkey) })
5878
5996
  ] }) }),
5879
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AddDocumentConfigModal, { isOpen: modalOpen, onClose: () => setModalOpen(false) })
5997
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AddDocumentConfigModal, { isOpen: modalOpen, onClose: () => setModalOpen(false), onSave: handleCreate })
5880
5998
  ] });
5881
5999
  }
5882
6000
 
@@ -6897,7 +7015,7 @@ function MovementHistorymain() {
6897
7015
 
6898
7016
  // src/components/task-permission/TaskPermissionMain.jsx
6899
7017
  var import_react47 = __toESM(require("react"));
6900
- var import_sweetalert212 = __toESM(require("sweetalert2"));
7018
+ var import_sweetalert213 = __toESM(require("sweetalert2"));
6901
7019
 
6902
7020
  // src/components/task-permission/SearchBar.js
6903
7021
  var import_react43 = __toESM(require("react"));
@@ -6929,6 +7047,8 @@ function SearchBar6({
6929
7047
 
6930
7048
  // src/components/task-permission/Table.js
6931
7049
  var import_react44 = __toESM(require("react"));
7050
+ init_ApiEndpointsProvider();
7051
+ init_ApiServicepackage();
6932
7052
  var import_jsx_runtime44 = require("react/jsx-runtime");
6933
7053
  function Table({
6934
7054
  pageSize,
@@ -7166,7 +7286,9 @@ function Table({
7166
7286
 
7167
7287
  // src/components/task-permission/Popup.js
7168
7288
  var import_react45 = __toESM(require("react"));
7169
- var import_sweetalert211 = __toESM(require("sweetalert2"));
7289
+ var import_sweetalert212 = __toESM(require("sweetalert2"));
7290
+ init_ApiEndpointsProvider();
7291
+ init_ApiServicepackage();
7170
7292
  var import_jsx_runtime45 = require("react/jsx-runtime");
7171
7293
  function Popup({ isOpen, onClose, onSave }) {
7172
7294
  const [formData, setFormData] = (0, import_react45.useState)({
@@ -7236,7 +7358,7 @@ function Popup({ isOpen, onClose, onSave }) {
7236
7358
  await (onSave == null ? void 0 : onSave());
7237
7359
  } catch (error) {
7238
7360
  const msg = ((_e = (_d = error == null ? void 0 : error.response) == null ? void 0 : _d.data) == null ? void 0 : _e.message) || (error == null ? void 0 : error.message) || "Unable to create task permission.";
7239
- await import_sweetalert211.default.fire("Error", msg, "error");
7361
+ await import_sweetalert212.default.fire("Error", msg, "error");
7240
7362
  } finally {
7241
7363
  setIsSubmitting(false);
7242
7364
  }
@@ -7359,6 +7481,8 @@ function Popup({ isOpen, onClose, onSave }) {
7359
7481
 
7360
7482
  // src/components/task-permission/EditTaskPermissionModal.js
7361
7483
  var import_react46 = __toESM(require("react"));
7484
+ init_ApiEndpointsProvider();
7485
+ init_ApiServicepackage();
7362
7486
  var import_jsx_runtime46 = require("react/jsx-runtime");
7363
7487
  function EditTaskPermissionModal({ isOpen, onClose, onSave, selectedData, onUpdate }) {
7364
7488
  var _a;
@@ -7577,6 +7701,8 @@ function EditTaskPermissionModal({ isOpen, onClose, onSave, selectedData, onUpda
7577
7701
  }
7578
7702
 
7579
7703
  // src/components/task-permission/TaskPermissionMain.jsx
7704
+ init_ApiEndpointsProvider();
7705
+ init_ApiServicepackage();
7580
7706
  var import_jsx_runtime47 = require("react/jsx-runtime");
7581
7707
  function TaskPermissionMain() {
7582
7708
  const [refreshkey, setRefreshKey] = (0, import_react47.useState)(0);
@@ -7635,13 +7761,13 @@ function TaskPermissionMain() {
7635
7761
  handleRefresh();
7636
7762
  return true;
7637
7763
  } catch (error) {
7638
- await import_sweetalert212.default.fire("Error", ((_g = (_f = error == null ? void 0 : error.response) == null ? void 0 : _f.data) == null ? void 0 : _g.message) || (error == null ? void 0 : error.message) || "Unable to update task permission.", "error");
7764
+ await import_sweetalert213.default.fire("Error", ((_g = (_f = error == null ? void 0 : error.response) == null ? void 0 : _f.data) == null ? void 0 : _g.message) || (error == null ? void 0 : error.message) || "Unable to update task permission.", "error");
7639
7765
  return false;
7640
7766
  }
7641
7767
  };
7642
7768
  const handleDeleteApi = async (item) => {
7643
7769
  var _a;
7644
- const confirm = await import_sweetalert212.default.fire({
7770
+ const confirm = await import_sweetalert213.default.fire({
7645
7771
  title: "Delete Task Permission?",
7646
7772
  text: `Permission #${(_a = item.taskPermissionId) != null ? _a : item.TaskPermissionId} will be marked as inactive.`,
7647
7773
  icon: "warning",
@@ -7651,7 +7777,7 @@ function TaskPermissionMain() {
7651
7777
  });
7652
7778
  if (!confirm.isConfirmed) return;
7653
7779
  const ok = await handleUpdateApi(__spreadProps(__spreadValues({}, item), { isActive: false }));
7654
- if (ok) await import_sweetalert212.default.fire("Deleted", "Task permission has been deactivated.", "success");
7780
+ if (ok) await import_sweetalert213.default.fire("Deleted", "Task permission has been deactivated.", "success");
7655
7781
  };
7656
7782
  return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "fc:h-screen fc:overflow-hidden fc:bg-slate-50 fc:p-4 md:fc:fc:p-6", children: [
7657
7783
  /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "fc:w-full fc:space-y-5", children: [
@@ -7704,7 +7830,7 @@ function TaskPermissionMain() {
7704
7830
  isOpen: showModal,
7705
7831
  onClose: () => setShowModal(false),
7706
7832
  onSave: async () => {
7707
- await import_sweetalert212.default.fire("Success", "Task permission created successfully.", "success");
7833
+ await import_sweetalert213.default.fire("Success", "Task permission created successfully.", "success");
7708
7834
  handleRefresh();
7709
7835
  }
7710
7836
  }
@@ -7716,7 +7842,7 @@ function TaskPermissionMain() {
7716
7842
  onClose: () => setIsEditOpen(false),
7717
7843
  selectedData: selectedItem,
7718
7844
  onSave: async () => {
7719
- await import_sweetalert212.default.fire("Success", "Task permission updated successfully.", "success");
7845
+ await import_sweetalert213.default.fire("Success", "Task permission updated successfully.", "success");
7720
7846
  handleRefresh();
7721
7847
  },
7722
7848
  onUpdate: handleUpdateApi
@@ -10286,7 +10412,9 @@ function Comment_main() {
10286
10412
 
10287
10413
  // src/components/hierarchy-node/HierarchyNodeMain.jsx
10288
10414
  var import_react71 = __toESM(require("react"));
10289
- var import_sweetalert213 = __toESM(require("sweetalert2"));
10415
+ var import_sweetalert214 = __toESM(require("sweetalert2"));
10416
+ init_ApiEndpointsProvider();
10417
+ init_ApiServicepackage();
10290
10418
 
10291
10419
  // src/components/hierarchy-node/SearchBar.jsx
10292
10420
  var import_react66 = __toESM(require("react"));
@@ -10890,7 +11018,7 @@ function HierarchyNodeMain() {
10890
11018
  const value = ((_d = result == null ? void 0 : result.data) == null ? void 0 : _d.data) || ((_e = result == null ? void 0 : result.data) == null ? void 0 : _e.result) || (result == null ? void 0 : result.data) || result;
10891
11019
  setApiData(Array.isArray(value) ? value : (value == null ? void 0 : value.items) || (value == null ? void 0 : value.records) || []);
10892
11020
  } catch (error) {
10893
- await import_sweetalert213.default.fire("Error", ((_g = (_f = error == null ? void 0 : error.response) == null ? void 0 : _f.data) == null ? void 0 : _g.message) || (error == null ? void 0 : error.message) || "Unable to load hierarchy nodes.", "error");
11021
+ await import_sweetalert214.default.fire("Error", ((_g = (_f = error == null ? void 0 : error.response) == null ? void 0 : _f.data) == null ? void 0 : _g.message) || (error == null ? void 0 : error.message) || "Unable to load hierarchy nodes.", "error");
10894
11022
  }
10895
11023
  })();
10896
11024
  }, [refreshKey]);
@@ -10903,11 +11031,11 @@ function HierarchyNodeMain() {
10903
11031
  const endpoint = (_c = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) == null ? void 0 : _b.hierarchyNode) == null ? void 0 : _c[isEdit ? "update" : "create"];
10904
11032
  if (!endpoint) throw new Error(`Hierarchy node ${isEdit ? "update" : "create"} endpoint is not configured.`);
10905
11033
  await getApiService()[isEdit ? "put" : "post"](endpoint, payload);
10906
- await import_sweetalert213.default.fire("Success", `Hierarchy node ${isEdit ? "updated" : "created"} successfully.`, "success");
11034
+ await import_sweetalert214.default.fire("Success", `Hierarchy node ${isEdit ? "updated" : "created"} successfully.`, "success");
10907
11035
  handleRefresh();
10908
11036
  return true;
10909
11037
  } catch (error) {
10910
- await import_sweetalert213.default.fire("Error", ((_e = (_d = error == null ? void 0 : error.response) == null ? void 0 : _d.data) == null ? void 0 : _e.message) || (error == null ? void 0 : error.message) || `Unable to ${isEdit ? "update" : "create"} hierarchy node.`, "error");
11038
+ await import_sweetalert214.default.fire("Error", ((_e = (_d = error == null ? void 0 : error.response) == null ? void 0 : _d.data) == null ? void 0 : _e.message) || (error == null ? void 0 : error.message) || `Unable to ${isEdit ? "update" : "create"} hierarchy node.`, "error");
10911
11039
  return false;
10912
11040
  }
10913
11041
  };
@@ -13342,6 +13470,10 @@ var Layout = ({ children }) => {
13342
13470
  ) });
13343
13471
  };
13344
13472
  var Layout_default = Layout;
13473
+
13474
+ // src/pkg-index.jsx
13475
+ init_ApiEndpointsProvider();
13476
+ init_ApiServicepackage();
13345
13477
  // Annotate the CommonJS export names for ESM import in node:
13346
13478
  0 && (module.exports = {
13347
13479
  ApiEndpointsProvider,
@@ -1,22 +1,15 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
1
+ import {
2
+ ApiEndpointsProvider_default,
3
+ getApiEndpoints
4
+ } from "./chunk-3NI4QKQW.mjs";
5
+ import {
6
+ ApiServicepackage_default,
7
+ getApiService
8
+ } from "./chunk-HRODB3L2.mjs";
9
+ import {
10
+ __spreadProps,
11
+ __spreadValues
12
+ } from "./chunk-I4E63NIC.mjs";
20
13
 
21
14
  // src/components/Sidebar.jsx
22
15
  import { useState as useState62 } from "react";
@@ -27,54 +20,6 @@ import { useRouter } from "next/router";
27
20
  import React9, { useState as useState6, useRef as useRef2, useEffect as useEffect5 } from "react";
28
21
  import Swal3 from "sweetalert2";
29
22
 
30
- // src/components/Service/ApiEndpointsProvider.js
31
- var STORAGE_KEY = "FLOWCORE_API_ENDPOINTS";
32
- var apiEndpoints = null;
33
- var ApiEndpointsProvider = ({ apiEndpoints: endpoints }) => {
34
- if (typeof window !== "undefined" && endpoints) {
35
- apiEndpoints = endpoints;
36
- sessionStorage.setItem(
37
- STORAGE_KEY,
38
- JSON.stringify(endpoints)
39
- );
40
- }
41
- return null;
42
- };
43
- var getApiEndpoints = () => {
44
- if (apiEndpoints) {
45
- return apiEndpoints;
46
- }
47
- if (typeof window !== "undefined") {
48
- const data = sessionStorage.getItem(STORAGE_KEY);
49
- if (data) {
50
- apiEndpoints = JSON.parse(data);
51
- return apiEndpoints;
52
- }
53
- }
54
- throw new Error(
55
- "Api Endpoints not initialized. Please render <ApiEndpointsProvider apiEndpoints={ApiEndPoints} /> once before using FlowCore."
56
- );
57
- };
58
- var ApiEndpointsProvider_default = ApiEndpointsProvider;
59
-
60
- // src/components/Service/ApiServicepackage.js
61
- var apiService = null;
62
- var ApiServicepackage = ({ apiService: service }) => {
63
- if (service) {
64
- apiService = service;
65
- }
66
- return null;
67
- };
68
- var getApiService = () => {
69
- if (apiService) {
70
- return apiService;
71
- }
72
- throw new Error(
73
- "ApiService not initialized. Please render <ApiServicepackage apiService={ApiService} /> once before using FlowCore."
74
- );
75
- };
76
- var ApiServicepackage_default = ApiServicepackage;
77
-
78
23
  // src/components/workflow/SearchBar.jsx
79
24
  import React from "react";
80
25
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -4974,6 +4919,7 @@ function Workflow_Step_Hierarchy_Mapping() {
4974
4919
 
4975
4920
  // src/components/document-configuration/DocumentConfigurationmain.jsx
4976
4921
  import React34, { useState as useState24, useRef as useRef8 } from "react";
4922
+ import Swal11 from "sweetalert2";
4977
4923
 
4978
4924
  // src/components/document-configuration/SearchBar.jsx
4979
4925
  import React29 from "react";
@@ -5650,11 +5596,12 @@ function DocumentConfigTable({
5650
5596
  }
5651
5597
 
5652
5598
  // src/components/document-configuration/AddDocumentConfigurationModal.jsx
5653
- import React33, { useState as useState23 } from "react";
5599
+ import React33, { useEffect as useEffect19, useState as useState23 } from "react";
5654
5600
  import { jsx as jsx33, jsxs as jsxs32 } from "react/jsx-runtime";
5655
5601
  function AddDocumentConfigModal({
5656
5602
  isOpen,
5657
- onClose
5603
+ onClose,
5604
+ onSave
5658
5605
  }) {
5659
5606
  const [isMandatory, setIsMandatory] = useState23(false);
5660
5607
  const [status, setStatus] = useState23("Active");
@@ -5663,7 +5610,41 @@ function AddDocumentConfigModal({
5663
5610
  const [maxSize, setMaxSize] = useState23("");
5664
5611
  const [allowedExtensions, setAllowedExtensions] = useState23("");
5665
5612
  const [errors, setErrors] = useState23({});
5666
- const handleSave = () => {
5613
+ const [workflowSteps, setWorkflowSteps] = useState23([]);
5614
+ const [loadingSteps, setLoadingSteps] = useState23(false);
5615
+ const [isSubmitting, setIsSubmitting] = useState23(false);
5616
+ useEffect19(() => {
5617
+ if (!isOpen) return;
5618
+ (async () => {
5619
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
5620
+ try {
5621
+ setLoadingSteps(true);
5622
+ const { getApiEndpoints: getApiEndpoints2 } = await import("./ApiEndpointsProvider-MDQW2LEP.mjs");
5623
+ const { getApiService: getApiService2 } = await import("./ApiServicepackage-PJH24ZGU.mjs");
5624
+ const endpoint = (_c = (_b = (_a = getApiEndpoints2()) == null ? void 0 : _a.flowCore) == null ? void 0 : _b.workflowStep) == null ? void 0 : _c.getList;
5625
+ if (!endpoint) throw new Error("Workflow step list endpoint is not configured.");
5626
+ const result = await getApiService2().get(endpoint);
5627
+ const value = (_h = (_g = (_f = (_d = result == null ? void 0 : result.data) == null ? void 0 : _d.data) != null ? _f : (_e = result == null ? void 0 : result.data) == null ? void 0 : _e.result) != null ? _g : result == null ? void 0 : result.data) != null ? _h : result;
5628
+ setWorkflowSteps(Array.isArray(value) ? value : (_j = (_i = value == null ? void 0 : value.items) != null ? _i : value == null ? void 0 : value.records) != null ? _j : []);
5629
+ } catch (_) {
5630
+ setWorkflowSteps([]);
5631
+ } finally {
5632
+ setLoadingSteps(false);
5633
+ }
5634
+ })();
5635
+ }, [isOpen]);
5636
+ useEffect19(() => {
5637
+ if (!isOpen) {
5638
+ setDocumentName("");
5639
+ setStepId("");
5640
+ setMaxSize("");
5641
+ setAllowedExtensions("");
5642
+ setIsMandatory(false);
5643
+ setStatus("Active");
5644
+ setErrors({});
5645
+ }
5646
+ }, [isOpen]);
5647
+ const handleSave = async () => {
5667
5648
  let newErrors = {};
5668
5649
  if (!documentName.trim()) {
5669
5650
  newErrors.documentName = "Document Name is required";
@@ -5679,7 +5660,19 @@ function AddDocumentConfigModal({
5679
5660
  }
5680
5661
  setErrors(newErrors);
5681
5662
  if (Object.keys(newErrors).length === 0) {
5682
- onClose();
5663
+ setIsSubmitting(true);
5664
+ try {
5665
+ await (onSave == null ? void 0 : onSave({
5666
+ workflowStepId: Number(stepId),
5667
+ documentName: documentName.trim(),
5668
+ allowedExtensions: allowedExtensions.trim(),
5669
+ maxSizeMB: Number(maxSize),
5670
+ isMandatory: Boolean(isMandatory),
5671
+ createdBy: "System"
5672
+ }));
5673
+ } finally {
5674
+ setIsSubmitting(false);
5675
+ }
5683
5676
  }
5684
5677
  };
5685
5678
  if (!isOpen) return null;
@@ -5711,10 +5704,18 @@ function AddDocumentConfigModal({
5711
5704
  "Workflow Step ID ",
5712
5705
  /* @__PURE__ */ jsx33("span", { className: "fc:text-red-500", children: "*" })
5713
5706
  ] }),
5714
- /* @__PURE__ */ jsx33("input", { type: "number", placeholder: "e.g. 1", value: stepId, onChange: (e) => {
5707
+ /* @__PURE__ */ jsxs32("select", { value: stepId, disabled: loadingSteps, onChange: (e) => {
5715
5708
  setStepId(e.target.value);
5716
5709
  if (errors.stepId) setErrors(__spreadProps(__spreadValues({}, errors), { stepId: "" }));
5717
- }, className: `fc:w-full fc:border fc:p-2.5 fc:pl-9 fc:rounded-xl fc:text-xs fc:bg-white fc:text-align-left fc:focus:outline-none fc:focus:ring-2 fc:focus:ring-indigo-500/10 fc:focus:border-indigo-500 fc:border-slate-200 fc:text-slate-700 ${errors.stepId ? `fc:border-red-500 fc:ring-1 fc:ring-red-500` : `fc:border-slate-200 fc:border-indigo-500`}` }),
5710
+ }, className: `fc:w-full fc:border fc:p-2.5 fc:pl-9 fc:rounded-xl fc:text-xs fc:bg-white fc:text-align-left fc:focus:outline-none fc:focus:ring-2 fc:focus:ring-indigo-500/10 fc:focus:border-indigo-500 fc:text-slate-700 disabled:fc:opacity-60 ${errors.stepId ? `fc:border-red-500 fc:ring-1 fc:ring-red-500` : `fc:border-slate-200 fc:border-indigo-500`}`, children: [
5711
+ /* @__PURE__ */ jsx33("option", { value: "", children: loadingSteps ? "Loading workflow steps..." : "Select workflow step" }),
5712
+ workflowSteps.map((step) => {
5713
+ var _a, _b, _c, _d;
5714
+ const id = (_b = (_a = step.workflowStepId) != null ? _a : step.WorkflowStepId) != null ? _b : step.id;
5715
+ const name = (_d = (_c = step.stepName) != null ? _c : step.StepName) != null ? _d : `Step ${id}`;
5716
+ return /* @__PURE__ */ jsx33("option", { value: id, children: name }, id);
5717
+ })
5718
+ ] }),
5718
5719
  errors.stepId && /* @__PURE__ */ jsx33("p", { className: "fc:text-red-500 fc:text-xs", children: errors.stepId })
5719
5720
  ] })
5720
5721
  ] }),
@@ -5786,7 +5787,7 @@ function AddDocumentConfigModal({
5786
5787
  ] }),
5787
5788
  /* @__PURE__ */ jsxs32("div", { className: "fc:flex fc:justify-end fc:gap-3 fc:px-8 fc:py-4 fc:border-t fc:border-slate-100 fc:bg-white", children: [
5788
5789
  /* @__PURE__ */ jsx33("button", { onClick: onClose, className: "fc:px-5 fc:py-2.5 fc:text-sm fc:font-medium fc:text-gray-600 fc:bg-gray-100 hover:fc:fc:bg-gray-200 fc:rounded-xl fc:transition", children: "\u2715 Cancel" }),
5789
- /* @__PURE__ */ jsx33("button", { onClick: handleSave, className: "fc:px-5 fc:py-2 fc:text-xs fc:font-bold fc:text-white fc:bg-blue-600 hover:fc:bg-blue-700 fc:rounded-xl fc:transition-all fc:shadow-sm", children: "Save Rules" })
5790
+ /* @__PURE__ */ jsx33("button", { onClick: handleSave, disabled: isSubmitting, className: "fc:px-5 fc:py-2 fc:text-xs fc:font-bold fc:text-white fc:bg-blue-600 hover:fc:bg-blue-700 fc:rounded-xl fc:transition-all fc:shadow-sm disabled:fc:opacity-60", children: isSubmitting ? "Saving..." : "Save Rules" })
5790
5791
  ] })
5791
5792
  ] })
5792
5793
  ] });
@@ -5806,6 +5807,21 @@ function DocumentConfigurationmain() {
5806
5807
  const [searchQuery, setSearchQuery] = useState24("");
5807
5808
  const [currentPage, setCurrentPage] = useState24(1);
5808
5809
  const [totalEntries, setTotalEntries] = useState24(0);
5810
+ const handleCreate = async (payload) => {
5811
+ var _a, _b, _c, _d, _e;
5812
+ try {
5813
+ const endpoint = (_c = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) == null ? void 0 : _b.documentConfiguration) == null ? void 0 : _c.create;
5814
+ if (!endpoint) throw new Error("Document Configuration create endpoint is not configured.");
5815
+ await getApiService().post(endpoint, payload);
5816
+ await Swal11.fire("Success", "Document configuration created successfully.", "success");
5817
+ setModalOpen(false);
5818
+ handleRefresh();
5819
+ return true;
5820
+ } catch (error) {
5821
+ await Swal11.fire("Error", ((_e = (_d = error == null ? void 0 : error.response) == null ? void 0 : _d.data) == null ? void 0 : _e.message) || (error == null ? void 0 : error.message) || "Unable to create document configuration.", "error");
5822
+ return false;
5823
+ }
5824
+ };
5809
5825
  const handlePageSizeChange = (e) => {
5810
5826
  setPageSize(Number(e.target.value));
5811
5827
  setCurrentPage(1);
@@ -5840,7 +5856,7 @@ function DocumentConfigurationmain() {
5840
5856
  ] }),
5841
5857
  /* @__PURE__ */ jsx34("div", { ref: tableRef, children: /* @__PURE__ */ jsx34(DocumentConfigTable, { pageSize, searchQuery, currentPage, setCurrentPage, setTotalEntries }, refreshkey) })
5842
5858
  ] }) }),
5843
- /* @__PURE__ */ jsx34(AddDocumentConfigModal, { isOpen: modalOpen, onClose: () => setModalOpen(false) })
5859
+ /* @__PURE__ */ jsx34(AddDocumentConfigModal, { isOpen: modalOpen, onClose: () => setModalOpen(false), onSave: handleCreate })
5844
5860
  ] });
5845
5861
  }
5846
5862
 
@@ -5865,7 +5881,7 @@ function SearchBar4({
5865
5881
  }
5866
5882
 
5867
5883
  // src/components/audit-log/AuditLogTable.jsx
5868
- import React36, { useState as useState25, useEffect as useEffect19 } from "react";
5884
+ import React36, { useState as useState25, useEffect as useEffect20 } from "react";
5869
5885
  import { jsx as jsx36, jsxs as jsxs35 } from "react/jsx-runtime";
5870
5886
  function AuditLogTable({
5871
5887
  pageSize,
@@ -6093,7 +6109,7 @@ function AuditLogTable({
6093
6109
  const query = (searchQuery || "").toLowerCase();
6094
6110
  return item.logId.toLowerCase().includes(query) || item.user.toLowerCase().includes(query) || item.section.toLowerCase().includes(query) || item.action.toLowerCase().includes(query);
6095
6111
  });
6096
- useEffect19(() => {
6112
+ useEffect20(() => {
6097
6113
  if (setTotalEntries) setTotalEntries(filteredData.length);
6098
6114
  }, [filteredData.length, setTotalEntries]);
6099
6115
  const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
@@ -6381,7 +6397,7 @@ function SearchBar5({
6381
6397
  }
6382
6398
 
6383
6399
  // src/components/movement-history/MovementHistoryTable.jsx
6384
- import React40, { useState as useState28, useEffect as useEffect20 } from "react";
6400
+ import React40, { useState as useState28, useEffect as useEffect21 } from "react";
6385
6401
  import { jsx as jsx40, jsxs as jsxs39 } from "react/jsx-runtime";
6386
6402
  function MovementHistoryTable({
6387
6403
  pageSize,
@@ -6609,7 +6625,7 @@ function MovementHistoryTable({
6609
6625
  const query = (searchQuery || "").toLowerCase();
6610
6626
  return item.movementHistoryId.toLowerCase().includes(query) || item.name.toLowerCase().includes(query) || item.toStepId.toLowerCase().includes(query);
6611
6627
  });
6612
- useEffect20(() => {
6628
+ useEffect21(() => {
6613
6629
  if (setTotalEntries) setTotalEntries(filteredData.length);
6614
6630
  }, [filteredData.length, setTotalEntries]);
6615
6631
  const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
@@ -6861,7 +6877,7 @@ function MovementHistorymain() {
6861
6877
 
6862
6878
  // src/components/task-permission/TaskPermissionMain.jsx
6863
6879
  import React47, { useState as useState34, useRef as useRef11 } from "react";
6864
- import Swal12 from "sweetalert2";
6880
+ import Swal13 from "sweetalert2";
6865
6881
 
6866
6882
  // src/components/task-permission/SearchBar.js
6867
6883
  import React43 from "react";
@@ -6892,7 +6908,7 @@ function SearchBar6({
6892
6908
  }
6893
6909
 
6894
6910
  // src/components/task-permission/Table.js
6895
- import React44, { useState as useState31, useEffect as useEffect21 } from "react";
6911
+ import React44, { useState as useState31, useEffect as useEffect22 } from "react";
6896
6912
  import { jsx as jsx44, jsxs as jsxs43 } from "react/jsx-runtime";
6897
6913
  function Table({
6898
6914
  pageSize,
@@ -6920,7 +6936,7 @@ function Table({
6920
6936
  });
6921
6937
  return map;
6922
6938
  }, [workflowSteps]);
6923
- useEffect21(() => {
6939
+ useEffect22(() => {
6924
6940
  (async () => {
6925
6941
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
6926
6942
  try {
@@ -6971,7 +6987,7 @@ function Table({
6971
6987
  const totalPages = Math.max(Math.ceil(sorted.length / pageSize), 1);
6972
6988
  const startIndex = (currentPage - 1) * pageSize;
6973
6989
  const visibleData = sorted.slice(startIndex, startIndex + pageSize);
6974
- useEffect21(() => {
6990
+ useEffect22(() => {
6975
6991
  if (setTotalEntries) setTotalEntries(filtered.length);
6976
6992
  }, [filtered.length]);
6977
6993
  const pageNumbers = Array.from({ length: totalPages }, (_, i) => i + 1);
@@ -7129,8 +7145,8 @@ function Table({
7129
7145
  }
7130
7146
 
7131
7147
  // src/components/task-permission/Popup.js
7132
- import React45, { useState as useState32, useEffect as useEffect22 } from "react";
7133
- import Swal11 from "sweetalert2";
7148
+ import React45, { useState as useState32, useEffect as useEffect23 } from "react";
7149
+ import Swal12 from "sweetalert2";
7134
7150
  import { jsx as jsx45, jsxs as jsxs44 } from "react/jsx-runtime";
7135
7151
  function Popup({ isOpen, onClose, onSave }) {
7136
7152
  const [formData, setFormData] = useState32({
@@ -7144,7 +7160,7 @@ function Popup({ isOpen, onClose, onSave }) {
7144
7160
  const [isSubmitting, setIsSubmitting] = useState32(false);
7145
7161
  const [workflowSteps, setWorkflowSteps] = useState32([]);
7146
7162
  const [loadingSteps, setLoadingSteps] = useState32(false);
7147
- useEffect22(() => {
7163
+ useEffect23(() => {
7148
7164
  if (!isOpen) return;
7149
7165
  (async () => {
7150
7166
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
@@ -7162,7 +7178,7 @@ function Popup({ isOpen, onClose, onSave }) {
7162
7178
  }
7163
7179
  })();
7164
7180
  }, [isOpen]);
7165
- useEffect22(() => {
7181
+ useEffect23(() => {
7166
7182
  if (!isOpen) {
7167
7183
  setFormData({ workflowStepId: "", canView: false, canEdit: false, canApprove: false, canReject: false });
7168
7184
  setErrors({});
@@ -7200,7 +7216,7 @@ function Popup({ isOpen, onClose, onSave }) {
7200
7216
  await (onSave == null ? void 0 : onSave());
7201
7217
  } catch (error) {
7202
7218
  const msg = ((_e = (_d = error == null ? void 0 : error.response) == null ? void 0 : _d.data) == null ? void 0 : _e.message) || (error == null ? void 0 : error.message) || "Unable to create task permission.";
7203
- await Swal11.fire("Error", msg, "error");
7219
+ await Swal12.fire("Error", msg, "error");
7204
7220
  } finally {
7205
7221
  setIsSubmitting(false);
7206
7222
  }
@@ -7322,7 +7338,7 @@ function Popup({ isOpen, onClose, onSave }) {
7322
7338
  }
7323
7339
 
7324
7340
  // src/components/task-permission/EditTaskPermissionModal.js
7325
- import React46, { useState as useState33, useEffect as useEffect23 } from "react";
7341
+ import React46, { useState as useState33, useEffect as useEffect24 } from "react";
7326
7342
  import { jsx as jsx46, jsxs as jsxs45 } from "react/jsx-runtime";
7327
7343
  function EditTaskPermissionModal({ isOpen, onClose, onSave, selectedData, onUpdate }) {
7328
7344
  var _a;
@@ -7339,7 +7355,7 @@ function EditTaskPermissionModal({ isOpen, onClose, onSave, selectedData, onUpda
7339
7355
  const [isSubmitting, setIsSubmitting] = useState33(false);
7340
7356
  const [workflowSteps, setWorkflowSteps] = useState33([]);
7341
7357
  const [loadingSteps, setLoadingSteps] = useState33(false);
7342
- useEffect23(() => {
7358
+ useEffect24(() => {
7343
7359
  if (!isOpen) return;
7344
7360
  (async () => {
7345
7361
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
@@ -7357,7 +7373,7 @@ function EditTaskPermissionModal({ isOpen, onClose, onSave, selectedData, onUpda
7357
7373
  }
7358
7374
  })();
7359
7375
  }, [isOpen]);
7360
- useEffect23(() => {
7376
+ useEffect24(() => {
7361
7377
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
7362
7378
  if (selectedData) {
7363
7379
  setFormData({
@@ -7599,13 +7615,13 @@ function TaskPermissionMain() {
7599
7615
  handleRefresh();
7600
7616
  return true;
7601
7617
  } catch (error) {
7602
- await Swal12.fire("Error", ((_g = (_f = error == null ? void 0 : error.response) == null ? void 0 : _f.data) == null ? void 0 : _g.message) || (error == null ? void 0 : error.message) || "Unable to update task permission.", "error");
7618
+ await Swal13.fire("Error", ((_g = (_f = error == null ? void 0 : error.response) == null ? void 0 : _f.data) == null ? void 0 : _g.message) || (error == null ? void 0 : error.message) || "Unable to update task permission.", "error");
7603
7619
  return false;
7604
7620
  }
7605
7621
  };
7606
7622
  const handleDeleteApi = async (item) => {
7607
7623
  var _a;
7608
- const confirm = await Swal12.fire({
7624
+ const confirm = await Swal13.fire({
7609
7625
  title: "Delete Task Permission?",
7610
7626
  text: `Permission #${(_a = item.taskPermissionId) != null ? _a : item.TaskPermissionId} will be marked as inactive.`,
7611
7627
  icon: "warning",
@@ -7615,7 +7631,7 @@ function TaskPermissionMain() {
7615
7631
  });
7616
7632
  if (!confirm.isConfirmed) return;
7617
7633
  const ok = await handleUpdateApi(__spreadProps(__spreadValues({}, item), { isActive: false }));
7618
- if (ok) await Swal12.fire("Deleted", "Task permission has been deactivated.", "success");
7634
+ if (ok) await Swal13.fire("Deleted", "Task permission has been deactivated.", "success");
7619
7635
  };
7620
7636
  return /* @__PURE__ */ jsxs46("div", { className: "fc:h-screen fc:overflow-hidden fc:bg-slate-50 fc:p-4 md:fc:fc:p-6", children: [
7621
7637
  /* @__PURE__ */ jsxs46("div", { className: "fc:w-full fc:space-y-5", children: [
@@ -7668,7 +7684,7 @@ function TaskPermissionMain() {
7668
7684
  isOpen: showModal,
7669
7685
  onClose: () => setShowModal(false),
7670
7686
  onSave: async () => {
7671
- await Swal12.fire("Success", "Task permission created successfully.", "success");
7687
+ await Swal13.fire("Success", "Task permission created successfully.", "success");
7672
7688
  handleRefresh();
7673
7689
  }
7674
7690
  }
@@ -7680,7 +7696,7 @@ function TaskPermissionMain() {
7680
7696
  onClose: () => setIsEditOpen(false),
7681
7697
  selectedData: selectedItem,
7682
7698
  onSave: async () => {
7683
- await Swal12.fire("Success", "Task permission updated successfully.", "success");
7699
+ await Swal13.fire("Success", "Task permission updated successfully.", "success");
7684
7700
  handleRefresh();
7685
7701
  },
7686
7702
  onUpdate: handleUpdateApi
@@ -7721,7 +7737,7 @@ function SearchBar7({
7721
7737
  }
7722
7738
 
7723
7739
  // src/components/Workflow-Setting/Table.js
7724
- import React49, { useState as useState35, useEffect as useEffect24 } from "react";
7740
+ import React49, { useState as useState35, useEffect as useEffect25 } from "react";
7725
7741
  import { jsx as jsx49, jsxs as jsxs48 } from "react/jsx-runtime";
7726
7742
  function Table2({
7727
7743
  pageSize,
@@ -7968,7 +7984,7 @@ function Table2({
7968
7984
  }
7969
7985
  return item.settingId && item.settingId.toString().toLowerCase().includes(query) || item.moduleName && item.moduleName.toLowerCase().includes(query) || item.executionOrder && item.executionOrder.toString().toLowerCase().includes(query) || item.SLA && item.SLA.toLowerCase().includes(query);
7970
7986
  });
7971
- useEffect24(() => {
7987
+ useEffect25(() => {
7972
7988
  if (setTotalEntries) setTotalEntries(filteredData.length);
7973
7989
  }, [filteredData.length, setTotalEntries]);
7974
7990
  const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
@@ -8244,7 +8260,7 @@ function SearchBar8({
8244
8260
  }
8245
8261
 
8246
8262
  // src/components/notification/Table.js
8247
- import React53, { useState as useState38, useEffect as useEffect25 } from "react";
8263
+ import React53, { useState as useState38, useEffect as useEffect26 } from "react";
8248
8264
  import { jsx as jsx53, jsxs as jsxs52 } from "react/jsx-runtime";
8249
8265
  function Table3({
8250
8266
  pageSize,
@@ -8491,7 +8507,7 @@ function Table3({
8491
8507
  }
8492
8508
  return item.notificationId && item.notificationId.toString().toLowerCase().includes(query) || item.eventTrigger && item.eventTrigger.toLowerCase().includes(query) || item.channelType && item.channelType.toLowerCase().includes(query) || item.recipientGroup && item.recipientGroup.toLowerCase().includes(query);
8493
8509
  });
8494
- useEffect25(() => {
8510
+ useEffect26(() => {
8495
8511
  if (setTotalEntries) setTotalEntries(filteredData.length);
8496
8512
  }, [filteredData.length, setTotalEntries]);
8497
8513
  const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
@@ -8777,10 +8793,10 @@ function TaskInstanceSearchBar({
8777
8793
  }
8778
8794
 
8779
8795
  // src/components/task-instance/taskinstancetable.jsx
8780
- import React59, { useState as useState42, useEffect as useEffect27 } from "react";
8796
+ import React59, { useState as useState42, useEffect as useEffect28 } from "react";
8781
8797
 
8782
8798
  // src/components/task-instance/edit-instance.jsx
8783
- import React57, { useEffect as useEffect26, useState as useState41 } from "react";
8799
+ import React57, { useEffect as useEffect27, useState as useState41 } from "react";
8784
8800
  import { jsx as jsx57, jsxs as jsxs56 } from "react/jsx-runtime";
8785
8801
  function EditTaskInstanceModal({
8786
8802
  isOpen,
@@ -8796,7 +8812,7 @@ function EditTaskInstanceModal({
8796
8812
  escalatedOn: "",
8797
8813
  slaStatus: ""
8798
8814
  });
8799
- useEffect26(() => {
8815
+ useEffect27(() => {
8800
8816
  if (selectedTask) {
8801
8817
  setFormData({
8802
8818
  assignedUserId: selectedTask.assignedUserId || selectedTask.assigned_user_id || "",
@@ -9317,7 +9333,7 @@ function TaskInstanceTable({
9317
9333
  const query = (searchQuery || "").toLowerCase();
9318
9334
  return String(item.taskInstanceId).includes(query) || String(item.fileInstanceId).includes(query) || String(item.workflowStepId).includes(query) || String(item.assignedUserId).includes(query) || item.status.toLowerCase().includes(query);
9319
9335
  });
9320
- useEffect27(() => {
9336
+ useEffect28(() => {
9321
9337
  if (setTotalEntries) setTotalEntries(filteredData.length);
9322
9338
  }, [filteredData.length, setTotalEntries]);
9323
9339
  const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
@@ -9686,7 +9702,7 @@ function CommentSearchBar({
9686
9702
  }
9687
9703
 
9688
9704
  // src/components/comment/commenttable.jsx
9689
- import React63, { useState as useState44, useEffect as useEffect28 } from "react";
9705
+ import React63, { useState as useState44, useEffect as useEffect29 } from "react";
9690
9706
  import { jsx as jsx63, jsxs as jsxs62 } from "react/jsx-runtime";
9691
9707
  function CommentTable({
9692
9708
  pageSize,
@@ -9914,7 +9930,7 @@ function CommentTable({
9914
9930
  const query = (searchQuery || "").toLowerCase();
9915
9931
  return String(item.commentId).toLowerCase().includes(query) || String(item.taskInstanceId).toLowerCase().includes(query) || item.comment.toLowerCase().includes(query) || String(item.commentedBy).toLowerCase().includes(query);
9916
9932
  });
9917
- useEffect28(() => {
9933
+ useEffect29(() => {
9918
9934
  if (setTotalEntries) setTotalEntries(filteredData.length);
9919
9935
  }, [filteredData.length, setTotalEntries]);
9920
9936
  const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
@@ -10249,8 +10265,8 @@ function Comment_main() {
10249
10265
  }
10250
10266
 
10251
10267
  // src/components/hierarchy-node/HierarchyNodeMain.jsx
10252
- import React71, { useState as useState50, useRef as useRef16, useEffect as useEffect31 } from "react";
10253
- import Swal13 from "sweetalert2";
10268
+ import React71, { useState as useState50, useRef as useRef16, useEffect as useEffect32 } from "react";
10269
+ import Swal14 from "sweetalert2";
10254
10270
 
10255
10271
  // src/components/hierarchy-node/SearchBar.jsx
10256
10272
  import React66 from "react";
@@ -10289,10 +10305,10 @@ function SearchBar9({ searchQuery, setSearchQuery }) {
10289
10305
  }
10290
10306
 
10291
10307
  // src/components/hierarchy-node/HierarchyTable.jsx
10292
- import React69, { useState as useState48, useEffect as useEffect30 } from "react";
10308
+ import React69, { useState as useState48, useEffect as useEffect31 } from "react";
10293
10309
 
10294
10310
  // src/components/hierarchy-node/AddEditModal.jsx
10295
- import React67, { useEffect as useEffect29, useState as useState47 } from "react";
10311
+ import React67, { useEffect as useEffect30, useState as useState47 } from "react";
10296
10312
  import { jsx as jsx67, jsxs as jsxs66 } from "react/jsx-runtime";
10297
10313
  function AddEditModal({
10298
10314
  isOpen,
@@ -10310,7 +10326,7 @@ function AddEditModal({
10310
10326
  externalEntityId: "",
10311
10327
  isActive: true
10312
10328
  });
10313
- useEffect29(() => {
10329
+ useEffect30(() => {
10314
10330
  if (editData) {
10315
10331
  setFormData(editData);
10316
10332
  }
@@ -10533,7 +10549,7 @@ function HierarchyTable({
10533
10549
  const [currentPage, setCurrentPage] = useState48(1);
10534
10550
  ;
10535
10551
  const [data, setData] = useState48(apiData || []);
10536
- useEffect30(() => {
10552
+ useEffect31(() => {
10537
10553
  setData(apiData || []);
10538
10554
  }, [apiData]);
10539
10555
  const filteredData = data.filter(
@@ -10550,7 +10566,7 @@ function HierarchyTable({
10550
10566
  const [editOpen, setEditOpen] = useState48(false);
10551
10567
  const [deleteOpen, setDeleteOpen] = useState48(false);
10552
10568
  const [selectedNode, setSelectedNode] = useState48(null);
10553
- useEffect30(() => {
10569
+ useEffect31(() => {
10554
10570
  setCurrentPage(1);
10555
10571
  }, [searchQuery, pageSize]);
10556
10572
  const handleSort = (column) => {
@@ -10844,7 +10860,7 @@ function HierarchyNodeMain() {
10844
10860
  const [searchQuery, setSearchQuery] = useState50("");
10845
10861
  const [apiData, setApiData] = useState50([]);
10846
10862
  const [refreshKey, setRefreshKey] = useState50(0);
10847
- useEffect31(() => {
10863
+ useEffect32(() => {
10848
10864
  (async () => {
10849
10865
  var _a, _b, _c, _d, _e, _f, _g;
10850
10866
  try {
@@ -10854,7 +10870,7 @@ function HierarchyNodeMain() {
10854
10870
  const value = ((_d = result == null ? void 0 : result.data) == null ? void 0 : _d.data) || ((_e = result == null ? void 0 : result.data) == null ? void 0 : _e.result) || (result == null ? void 0 : result.data) || result;
10855
10871
  setApiData(Array.isArray(value) ? value : (value == null ? void 0 : value.items) || (value == null ? void 0 : value.records) || []);
10856
10872
  } catch (error) {
10857
- await Swal13.fire("Error", ((_g = (_f = error == null ? void 0 : error.response) == null ? void 0 : _f.data) == null ? void 0 : _g.message) || (error == null ? void 0 : error.message) || "Unable to load hierarchy nodes.", "error");
10873
+ await Swal14.fire("Error", ((_g = (_f = error == null ? void 0 : error.response) == null ? void 0 : _f.data) == null ? void 0 : _g.message) || (error == null ? void 0 : error.message) || "Unable to load hierarchy nodes.", "error");
10858
10874
  }
10859
10875
  })();
10860
10876
  }, [refreshKey]);
@@ -10867,11 +10883,11 @@ function HierarchyNodeMain() {
10867
10883
  const endpoint = (_c = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) == null ? void 0 : _b.hierarchyNode) == null ? void 0 : _c[isEdit ? "update" : "create"];
10868
10884
  if (!endpoint) throw new Error(`Hierarchy node ${isEdit ? "update" : "create"} endpoint is not configured.`);
10869
10885
  await getApiService()[isEdit ? "put" : "post"](endpoint, payload);
10870
- await Swal13.fire("Success", `Hierarchy node ${isEdit ? "updated" : "created"} successfully.`, "success");
10886
+ await Swal14.fire("Success", `Hierarchy node ${isEdit ? "updated" : "created"} successfully.`, "success");
10871
10887
  handleRefresh();
10872
10888
  return true;
10873
10889
  } catch (error) {
10874
- await Swal13.fire("Error", ((_e = (_d = error == null ? void 0 : error.response) == null ? void 0 : _d.data) == null ? void 0 : _e.message) || (error == null ? void 0 : error.message) || `Unable to ${isEdit ? "update" : "create"} hierarchy node.`, "error");
10890
+ await Swal14.fire("Error", ((_e = (_d = error == null ? void 0 : error.response) == null ? void 0 : _d.data) == null ? void 0 : _e.message) || (error == null ? void 0 : error.message) || `Unable to ${isEdit ? "update" : "create"} hierarchy node.`, "error");
10875
10891
  return false;
10876
10892
  }
10877
10893
  };
@@ -12614,7 +12630,7 @@ function SearchBar12({
12614
12630
  }
12615
12631
 
12616
12632
  // src/components/assignment-rule/Table.js
12617
- import React85, { useState as useState59, useEffect as useEffect32 } from "react";
12633
+ import React85, { useState as useState59, useEffect as useEffect33 } from "react";
12618
12634
  import { jsx as jsx85, jsxs as jsxs84 } from "react/jsx-runtime";
12619
12635
  function Table4({
12620
12636
  pageSize,
@@ -12780,7 +12796,7 @@ function Table4({
12780
12796
  const query = searchQuery.toLowerCase().trim();
12781
12797
  return item.workflowStepId && item.workflowStepId.toString().toLowerCase().includes(query) || item.assignmentType && item.assignmentType.toLowerCase().includes(query) || item.hierarchyNodeType && item.hierarchyNodeType.toLowerCase().includes(query) || item.dynamicFunctionId && item.dynamicFunctionId.toString().toLowerCase().includes(query);
12782
12798
  });
12783
- useEffect32(() => {
12799
+ useEffect33(() => {
12784
12800
  if (setTotalEntries) setTotalEntries(filteredData.length);
12785
12801
  }, [filteredData.length, setTotalEntries]);
12786
12802
  const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowcore-fn",
3
- "version": "9.4.7",
3
+ "version": "9.4.9",
4
4
  "main": "dist/pkg-index.js",
5
5
  "module": "dist/pkg-index.mjs",
6
6
  "files": [