flowcore-fn 9.2.5 → 9.2.6

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.
@@ -92,8 +92,8 @@
92
92
  --fc-container-xs: 20rem;
93
93
  --fc-container-sm: 24rem;
94
94
  --fc-container-md: 28rem;
95
+ --fc-container-xl: 36rem;
95
96
  --fc-container-2xl: 42rem;
96
- --fc-container-3xl: 48rem;
97
97
  --fc-container-4xl: 56rem;
98
98
  --fc-container-5xl: 64rem;
99
99
  --fc-text-xs: 0.75rem;
@@ -389,6 +389,9 @@
389
389
  .fc\:right-0 {
390
390
  right: 0;
391
391
  }
392
+ .fc\:right-3 {
393
+ right: calc(var(--fc-spacing) * 3);
394
+ }
392
395
  .fc\:right-3\.5 {
393
396
  right: calc(var(--fc-spacing) * 3.5);
394
397
  }
@@ -404,6 +407,9 @@
404
407
  .fc\:bottom-0 {
405
408
  bottom: 0;
406
409
  }
410
+ .fc\:bottom-2 {
411
+ bottom: calc(var(--fc-spacing) * 2);
412
+ }
407
413
  .fc\:-left-10 {
408
414
  left: calc(var(--fc-spacing) * -10);
409
415
  }
@@ -455,6 +461,9 @@
455
461
  .fc\:mt-1 {
456
462
  margin-top: var(--fc-spacing);
457
463
  }
464
+ .fc\:mt-1\.5 {
465
+ margin-top: calc(var(--fc-spacing) * 1.5);
466
+ }
458
467
  .fc\:mt-2 {
459
468
  margin-top: calc(var(--fc-spacing) * 2);
460
469
  }
@@ -626,12 +635,6 @@
626
635
  .fc\:h-screen {
627
636
  height: 100vh;
628
637
  }
629
- .fc\:max-h-\[70vh\] {
630
- max-height: 70vh;
631
- }
632
- .fc\:max-h-\[80vh\] {
633
- max-height: 80vh;
634
- }
635
638
  .fc\:max-h-\[90vh\] {
636
639
  max-height: 90vh;
637
640
  }
@@ -764,9 +767,6 @@
764
767
  .fc\:max-w-2xl {
765
768
  max-width: var(--fc-container-2xl);
766
769
  }
767
- .fc\:max-w-3xl {
768
- max-width: var(--fc-container-3xl);
769
- }
770
770
  .fc\:max-w-4xl {
771
771
  max-width: var(--fc-container-4xl);
772
772
  }
@@ -782,12 +782,18 @@
782
782
  .fc\:max-w-sm {
783
783
  max-width: var(--fc-container-sm);
784
784
  }
785
+ .fc\:max-w-xl {
786
+ max-width: var(--fc-container-xl);
787
+ }
785
788
  .fc\:max-w-xs {
786
789
  max-width: var(--fc-container-xs);
787
790
  }
788
791
  .fc\:min-w-0 {
789
792
  min-width: 0;
790
793
  }
794
+ .fc\:min-w-32 {
795
+ min-width: calc(var(--fc-spacing) * 32);
796
+ }
791
797
  .fc\:min-w-\[28px\] {
792
798
  min-width: 28px;
793
799
  }
package/dist/pkg-index.js CHANGED
@@ -1561,177 +1561,154 @@ function WorkflowTypeTable({
1561
1561
 
1562
1562
  // src/components/workflow-type/AddWorkflowTypeModal.jsx
1563
1563
  var import_react14 = __toESM(require("react"));
1564
+
1565
+ // src/components/Service/ApiEndpointsProvider.js
1566
+ var STORAGE_KEY = "FLOWCORE_API_ENDPOINTS";
1567
+ var apiEndpoints = null;
1568
+ var ApiEndpointsProvider = ({ apiEndpoints: endpoints }) => {
1569
+ if (typeof window !== "undefined" && endpoints) {
1570
+ apiEndpoints = endpoints;
1571
+ sessionStorage.setItem(
1572
+ STORAGE_KEY,
1573
+ JSON.stringify(endpoints)
1574
+ );
1575
+ }
1576
+ return null;
1577
+ };
1578
+ var getApiEndpoints = () => {
1579
+ if (apiEndpoints) {
1580
+ return apiEndpoints;
1581
+ }
1582
+ if (typeof window !== "undefined") {
1583
+ const data = sessionStorage.getItem(STORAGE_KEY);
1584
+ if (data) {
1585
+ apiEndpoints = JSON.parse(data);
1586
+ return apiEndpoints;
1587
+ }
1588
+ }
1589
+ throw new Error(
1590
+ "Api Endpoints not initialized. Please render <ApiEndpointsProvider apiEndpoints={ApiEndPoints} /> once before using FlowCore."
1591
+ );
1592
+ };
1593
+ var ApiEndpointsProvider_default = ApiEndpointsProvider;
1594
+
1595
+ // src/components/Service/ApiServicepackage.js
1596
+ var apiService = null;
1597
+ var ApiServicepackage = ({ apiService: service }) => {
1598
+ if (service) {
1599
+ apiService = service;
1600
+ }
1601
+ return null;
1602
+ };
1603
+ var getApiService = () => {
1604
+ if (apiService) {
1605
+ return apiService;
1606
+ }
1607
+ throw new Error(
1608
+ "ApiService not initialized. Please render <ApiServicepackage apiService={ApiService} /> once before using FlowCore."
1609
+ );
1610
+ };
1611
+ var ApiServicepackage_default = ApiServicepackage;
1612
+
1613
+ // src/components/workflow-type/AddWorkflowTypeModal.jsx
1564
1614
  var import_jsx_runtime14 = require("react/jsx-runtime");
1565
- var AddWorkflowTypeModal = ({
1566
- isOpen,
1567
- onClose,
1568
- onSave
1569
- }) => {
1570
- const [formData, setFormData] = (0, import_react14.useState)({
1571
- workflowTypeId: "",
1572
- workflowCode: "",
1573
- workflowName: "",
1574
- version: 1,
1575
- isPublished: "No",
1576
- description: "",
1577
- isActive: true
1578
- });
1579
- const [workflowTypeOptions, setWorkflowTypeOptions] = (0, import_react14.useState)([]);
1615
+ var initialFormData = {
1616
+ workflowTypeCode: "",
1617
+ workflowTypeName: "",
1618
+ description: "",
1619
+ createdBy: ""
1620
+ };
1621
+ var AddWorkflowTypeModal = ({ isOpen, onClose, onSave, createdBy = "" }) => {
1622
+ const [formData, setFormData] = (0, import_react14.useState)(__spreadProps(__spreadValues({}, initialFormData), {
1623
+ createdBy
1624
+ }));
1580
1625
  const [errors, setErrors] = (0, import_react14.useState)({});
1581
- (0, import_react14.useEffect)(() => {
1582
- const options = [{
1583
- workflowTypeId: 1,
1584
- workflowTypeName: "Citizen Petition",
1585
- workflowTypeCode: "PETITION"
1586
- }, {
1587
- workflowTypeId: 2,
1588
- workflowTypeName: "Building Permission",
1589
- workflowTypeCode: "BUILDING"
1590
- }, {
1591
- workflowTypeId: 3,
1592
- workflowTypeName: "Leave Application",
1593
- workflowTypeCode: "LEAVE"
1594
- }];
1595
- setWorkflowTypeOptions(options);
1596
- }, []);
1597
- const handleChange = (e) => {
1598
- const {
1599
- name,
1600
- value,
1601
- type,
1602
- checked
1603
- } = e.target;
1626
+ const [isSubmitting, setIsSubmitting] = (0, import_react14.useState)(false);
1627
+ const [submitError, setSubmitError] = (0, import_react14.useState)("");
1628
+ const handleChange = ({ target: { name, value } }) => {
1604
1629
  if (name === "description" && value.length > 500) return;
1605
- setFormData((prev) => __spreadProps(__spreadValues({}, prev), {
1606
- [name]: type === "checkbox" ? checked : value
1607
- }));
1608
- if (errors[name]) {
1609
- setErrors((prev) => __spreadProps(__spreadValues({}, prev), {
1610
- [name]: ""
1611
- }));
1612
- }
1630
+ setFormData((previous) => __spreadProps(__spreadValues({}, previous), { [name]: value }));
1631
+ setErrors((previous) => __spreadProps(__spreadValues({}, previous), { [name]: "" }));
1632
+ setSubmitError("");
1613
1633
  };
1614
1634
  const validateForm = () => {
1615
- let newErrors = {};
1616
- if (!formData.workflowTypeId) newErrors.workflowTypeId = "Workflow Type is required";
1617
- if (!formData.workflowCode.trim()) newErrors.workflowCode = "Workflow Code is required";
1618
- if (!formData.workflowName.trim()) newErrors.workflowName = "Workflow Name is required";
1619
- setErrors(newErrors);
1620
- return Object.keys(newErrors).length === 0;
1621
- };
1622
- const handleSubmit = (e) => {
1623
- e.preventDefault();
1635
+ const nextErrors = {};
1636
+ if (!formData.workflowTypeCode.trim()) nextErrors.workflowTypeCode = "Workflow type code is required";
1637
+ if (!formData.workflowTypeName.trim()) nextErrors.workflowTypeName = "Workflow type name is required";
1638
+ if (!formData.createdBy.trim()) nextErrors.createdBy = "Created by is required";
1639
+ setErrors(nextErrors);
1640
+ return Object.keys(nextErrors).length === 0;
1641
+ };
1642
+ const handleClose = () => {
1643
+ if (!isSubmitting) onClose();
1644
+ };
1645
+ const handleSubmit = async (event) => {
1646
+ var _a, _b, _c, _d, _e;
1647
+ event.preventDefault();
1624
1648
  if (!validateForm()) return;
1625
1649
  const payload = {
1626
- workflowTypeId: parseInt(formData.workflowTypeId, 10),
1627
- workflowCode: formData.workflowCode.toUpperCase().trim(),
1628
- workflowName: formData.workflowName.trim(),
1629
- version: parseInt(formData.version, 10),
1630
- isPublished: formData.isPublished === "Yes",
1631
- isActive: formData.isActive,
1632
- description: formData.description.trim()
1650
+ workflowTypeCode: formData.workflowTypeCode.trim().toUpperCase(),
1651
+ workflowTypeName: formData.workflowTypeName.trim(),
1652
+ description: formData.description.trim(),
1653
+ createdBy: formData.createdBy.trim()
1633
1654
  };
1634
- onSave(payload);
1635
- handleReset();
1636
- onClose();
1637
- };
1638
- const handleReset = () => {
1639
- setFormData({
1640
- workflowTypeId: "",
1641
- workflowCode: "",
1642
- workflowName: "",
1643
- version: 1,
1644
- isPublished: "No",
1645
- description: "",
1646
- isActive: true
1647
- });
1648
- setErrors({});
1655
+ try {
1656
+ setIsSubmitting(true);
1657
+ setSubmitError("");
1658
+ const endpoints = getApiEndpoints();
1659
+ const endpoint = (_b = (_a = endpoints == null ? void 0 : endpoints.flowCore) == null ? void 0 : _a.workflow) == null ? void 0 : _b.createWorkflowList;
1660
+ if (!endpoint) throw new Error("Create workflow type endpoint is not configured.");
1661
+ const response = await getApiService().post(endpoint, payload);
1662
+ await (onSave == null ? void 0 : onSave((_c = response == null ? void 0 : response.data) != null ? _c : response));
1663
+ setFormData(__spreadProps(__spreadValues({}, initialFormData), { createdBy }));
1664
+ setErrors({});
1665
+ onClose();
1666
+ } catch (error) {
1667
+ setSubmitError(
1668
+ ((_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 workflow type. Please try again."
1669
+ );
1670
+ } finally {
1671
+ setIsSubmitting(false);
1672
+ }
1649
1673
  };
1650
1674
  if (!isOpen) return null;
1651
- return (
1652
- /* Completely Light Overlay (No Pitch Black Backdrop) */
1653
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "fc:fixed fc:inset-0 fc:z-50 fc:flex fc:items-center fc:justify-center fc:bg-black/20 fc:p-4 fc:backdrop-blur-sm", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "fc:bg-white fc:rounded-2xl fc:shadow-2xl fc:border fc:border-gray-100 fc:w-full fc:max-w-3xl fc:max-h-[80vh] fc:overflow-hidden fc:transition-all", children: [
1654
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "fc:flex fc:justify-between fc:items-center fc:px-6 fc:py-3 fc:border-b fc:border-gray-100", children: [
1655
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "fc:flex fc:items-center fc:gap-3", children: [
1656
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "fc:w-10 fc:h-10 fc:rounded-xl fc:bg-blue-50 fc:text-[#2563eb] fc:flex fc:items-center fc:justify-center fc:font-bold", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("svg", { className: "fc:w-5 fc:h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" }) }) }),
1657
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { children: [
1658
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h2", { className: "fc:text-xl fc:font-bold fc:text-gray-800", children: "Add Workflow" }),
1659
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "fc:text-xs fc:text-gray-400", children: "Create a new workflow and configure its details" })
1660
- ] })
1661
- ] }),
1662
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { onClick: onClose, className: "fc:text-gray-400 hover:fc:fc:text-gray-600 fc:transition fc:text-xl fc:font-medium", children: "\u2715" })
1675
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "fc:fixed fc:inset-0 fc:z-50 fc:flex fc:items-center fc:justify-center fc:bg-black/20 fc:p-4 fc:backdrop-blur-sm", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "fc:w-full fc:max-w-xl fc:overflow-hidden fc:rounded-2xl fc:border fc:border-gray-100 fc:bg-white fc:shadow-2xl", children: [
1676
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "fc:flex fc:items-center fc:justify-between fc:border-b fc:border-gray-100 fc:px-6 fc:py-4", children: [
1677
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { children: [
1678
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h2", { className: "fc:text-xl fc:font-bold fc:text-gray-800", children: "Add Workflow Type" }),
1679
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "fc:text-xs fc:text-gray-400", children: "Create a new workflow type" })
1663
1680
  ] }),
1664
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("form", { onSubmit: handleSubmit, className: "fc:p-4 fc:space-y-3 fc:overflow-y-auto fc:max-h-[70vh]", children: [
1665
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "fc:bg-gray-50/70 fc:rounded-xl fc:p-5 fc:border fc:border-gray-100", children: [
1666
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("h3", { className: "fc:text-sm fc:font-semibold fc:text-[#2563eb] fc:mb-4 fc:flex fc:items-center fc:gap-2", children: [
1667
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "\u{1F4CB}" }),
1668
- " Workflow Information"
1669
- ] }),
1670
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "fc:grid fc:grid-cols-2 fc:gap-5", children: [
1671
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { children: [
1672
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-gray-700 fc:mb-1.5", children: [
1673
- "Workflow Type ",
1674
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "fc:text-red-500", children: "*" })
1675
- ] }),
1676
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("select", { name: "workflowTypeId", value: formData.workflowTypeId, onChange: handleChange, className: `fc:w-full fc:border fc:p-2.5 fc:pl-9 fc:rounded-xl fc:text-xs fc:bg-white fc:focus:outline-none fc:focus:ring-2 fc:focus:ring-indigo-500/10 fc:focus:border-indigo-500 ${errors.workflowTypeId ? "fc:border-red-500" : "fc:border-slate-200 fc:text-slate-700"}`, children: [
1677
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "", children: "Select workflow type" }),
1678
- workflowTypeOptions.map((item) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: item.workflowTypeId, children: item.workflowTypeName }, item.workflowTypeId))
1679
- ] }),
1680
- errors.workflowTypeId && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "fc:text-xs fc:text-red-500", children: errors.workflowTypeId })
1681
- ] }),
1682
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { children: [
1683
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-gray-700 fc:mb-1.5", children: [
1684
- "Workflow Code ",
1685
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "fc:text-red-500", children: "*" })
1686
- ] }),
1687
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { type: "text", name: "workflowCode", placeholder: "Enter workflow code", value: formData.workflowCode, onChange: handleChange, className: `fc:w-full fc:border fc:p-2.5 fc:pl-9 fc:rounded-xl fc:text-xs fc:bg-white fc:focus:outline-none fc:focus:ring-2 fc:focus:ring-indigo-500/10 fc:focus:border-indigo-500 ${errors.workflowCode ? "fc:border-red-500" : "fc:border-slate-200 fc:text-slate-700"}` }),
1688
- errors.workflowCode && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "fc:text-xs fc:text-red-500", children: errors.workflowCode })
1689
- ] }),
1690
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "fc:col-span-2", children: [
1691
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-gray-700 fc:mb-1.5", children: [
1692
- "Workflow Name ",
1693
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "fc:text-red-500", children: "*" })
1694
- ] }),
1695
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { type: "text", name: "workflowName", placeholder: "Enter workflow name", value: formData.workflowName, onChange: handleChange, className: `fc:w-full fc:border fc:p-2.5 fc:pl-9 fc:rounded-xl fc:text-xs fc:bg-white fc:focus:outline-none fc:focus:ring-2 fc:focus:ring-indigo-500/10 fc:focus:border-indigo-500 ${errors.workflowName ? "fc:border-red-500" : "fc:border-slate-200 fc:text-slate-700"}` }),
1696
- errors.workflowName && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "fc:text-xs fc:text-red-500", children: errors.workflowName })
1697
- ] }),
1698
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { children: [
1699
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-gray-700 fc:mb-1.5", children: [
1700
- "Version ",
1701
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "fc:text-red-500", children: "*" })
1702
- ] }),
1703
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { type: "number", name: "version", value: formData.version, onChange: handleChange, className: "fc:w-full fc:border fc:p-2.5 fc:pl-9 fc:rounded-xl fc:text-xs fc:bg-white 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", readOnly: true })
1704
- ] }),
1705
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { children: [
1706
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-gray-700 fc:mb-1.5", children: [
1707
- "Published ",
1708
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "fc:text-red-500", children: "*" })
1709
- ] }),
1710
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("select", { name: "isPublished", value: formData.isPublished, onChange: handleChange, className: "fc:w-full fc:border fc:p-2.5 fc:pl-9 fc:rounded-xl fc:text-xs fc:bg-white 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", children: [
1711
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "No", children: "No" }),
1712
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "Yes", children: "Yes" })
1713
- ] })
1714
- ] }),
1715
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "fc:col-span-2", children: [
1716
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "fc:flex fc:justify-between fc:items-center fc:mb-1.5", children: [
1717
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-gray-700", children: "Description" }),
1718
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "fc:text-[11px] fc:text-gray-400", children: [
1719
- formData.description.length,
1720
- " / 500"
1721
- ] })
1722
- ] }),
1723
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("textarea", { name: "description", rows: "3", placeholder: "Enter detailed description...", value: formData.description, onChange: handleChange, className: "fc:w-full fc:px-3 fc:py-2.5 fc:text-sm fc:bg-white fc:border fc:border-gray-200 fc:rounded-lg focus:fc:fc:ring-2 focus:fc:fc:ring-blue-500/20 focus:fc:fc:border-[#2563eb] fc:outline-none fc:resize-none fc:transition" })
1724
- ] })
1725
- ] })
1726
- ] }),
1727
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "fc:flex fc:justify-end fc:items-center fc:gap-3 fc:pt-2", children: [
1728
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "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" }),
1729
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "submit", className: "fc:px-6 fc:py-2.5 fc:text-sm fc:font-semibold fc:text-white fc:bg-[#2563eb] hover:fc:fc:bg-[#1d4ed8] active:fc:fc:scale-95 fc:rounded-xl fc:shadow-md fc:transition-all fc:flex fc:items-center fc:gap-2", children: "Save Workflow" })
1681
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "button", onClick: handleClose, disabled: isSubmitting, "aria-label": "Close", className: "fc:text-xl fc:text-gray-400 hover:fc:text-gray-600", children: "\xD7" })
1682
+ ] }),
1683
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("form", { onSubmit: handleSubmit, className: "fc:space-y-4 fc:p-6", children: [
1684
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "fc:grid fc:grid-cols-2 fc:gap-4", children: [
1685
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormField, { label: "Workflow Type Code", required: true, error: errors.workflowTypeCode, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { name: "workflowTypeCode", value: formData.workflowTypeCode, onChange: handleChange, placeholder: "e.g. PETITION", className: inputClass(errors.workflowTypeCode) }) }),
1686
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormField, { label: "Workflow Type Name", required: true, error: errors.workflowTypeName, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { name: "workflowTypeName", value: formData.workflowTypeName, onChange: handleChange, placeholder: "Enter workflow type name", className: inputClass(errors.workflowTypeName) }) })
1687
+ ] }),
1688
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormField, { label: "Created By", required: true, error: errors.createdBy, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { name: "createdBy", value: formData.createdBy, onChange: handleChange, placeholder: "Enter user name or ID", className: inputClass(errors.createdBy) }) }),
1689
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormField, { label: "Description", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "fc:relative", children: [
1690
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("textarea", { name: "description", rows: "3", value: formData.description, onChange: handleChange, placeholder: "Enter description", className: "fc:w-full fc:resize-none fc:rounded-xl fc:border fc:border-slate-200 fc:p-3 fc:text-sm fc:text-slate-700 fc:outline-none focus:fc:border-indigo-500" }),
1691
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "fc:absolute fc:bottom-2 fc:right-3 fc:text-xs fc:text-gray-400", children: [
1692
+ formData.description.length,
1693
+ "/500"
1730
1694
  ] })
1695
+ ] }) }),
1696
+ submitError && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { role: "alert", className: "fc:rounded-lg fc:bg-red-50 fc:p-3 fc:text-sm fc:text-red-600", children: submitError }),
1697
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "fc:flex fc:justify-end fc:gap-3 fc:border-t fc:border-gray-100 fc:pt-4", children: [
1698
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "button", onClick: handleClose, disabled: isSubmitting, className: "fc:rounded-xl fc:bg-gray-100 fc:px-5 fc:py-2.5 fc:text-sm fc:font-medium fc:text-gray-600 disabled:fc:cursor-not-allowed", children: "Cancel" }),
1699
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "submit", disabled: isSubmitting, className: "fc:flex fc:min-w-32 fc:justify-center fc:rounded-xl fc:bg-[#2563eb] fc:px-6 fc:py-2.5 fc:text-sm fc:font-semibold fc:text-white disabled:fc:cursor-not-allowed disabled:fc:opacity-60", children: isSubmitting ? "Saving..." : "Save Workflow Type" })
1731
1700
  ] })
1732
- ] }) })
1733
- );
1701
+ ] })
1702
+ ] }) });
1734
1703
  };
1704
+ var inputClass = (hasError) => `fc:w-full fc:rounded-xl fc:border fc:bg-white fc:p-3 fc:text-sm fc:text-slate-700 fc:outline-none focus:fc:border-indigo-500 ${hasError ? "fc:border-red-500" : "fc:border-slate-200"}`;
1705
+ var FormField = ({ label, required, error, children }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-gray-700", children: [
1706
+ label,
1707
+ " ",
1708
+ required && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "fc:text-red-500", children: "*" }),
1709
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "fc:mt-1.5", children }),
1710
+ error && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "fc:mt-1 fc:block fc:text-xs fc:text-red-500", children: error })
1711
+ ] });
1735
1712
  var AddWorkflowTypeModal_default = AddWorkflowTypeModal;
1736
1713
 
1737
1714
  // src/components/workflow-type/WorkflowTypeMains.js
@@ -11903,31 +11880,6 @@ var Layout = ({ children }) => {
11903
11880
  ) });
11904
11881
  };
11905
11882
  var Layout_default = Layout;
11906
-
11907
- // src/components/Service/ApiEndpointsProvider.js
11908
- var STORAGE_KEY = "FLOWCORE_API_ENDPOINTS";
11909
- var apiEndpoints = null;
11910
- var ApiEndpointsProvider = ({ apiEndpoints: endpoints }) => {
11911
- if (typeof window !== "undefined" && endpoints) {
11912
- apiEndpoints = endpoints;
11913
- sessionStorage.setItem(
11914
- STORAGE_KEY,
11915
- JSON.stringify(endpoints)
11916
- );
11917
- }
11918
- return null;
11919
- };
11920
- var ApiEndpointsProvider_default = ApiEndpointsProvider;
11921
-
11922
- // src/components/Service/ApiServicepackage.js
11923
- var apiService = null;
11924
- var ApiServicepackage = ({ apiService: service }) => {
11925
- if (service) {
11926
- apiService = service;
11927
- }
11928
- return null;
11929
- };
11930
- var ApiServicepackage_default = ApiServicepackage;
11931
11883
  // Annotate the CommonJS export names for ESM import in node:
11932
11884
  0 && (module.exports = {
11933
11885
  ApiEndpointsProvider,
@@ -1524,178 +1524,155 @@ function WorkflowTypeTable({
1524
1524
  }
1525
1525
 
1526
1526
  // src/components/workflow-type/AddWorkflowTypeModal.jsx
1527
- import React14, { useState as useState8, useEffect as useEffect5 } from "react";
1527
+ import React14, { useState as useState8 } from "react";
1528
+
1529
+ // src/components/Service/ApiEndpointsProvider.js
1530
+ var STORAGE_KEY = "FLOWCORE_API_ENDPOINTS";
1531
+ var apiEndpoints = null;
1532
+ var ApiEndpointsProvider = ({ apiEndpoints: endpoints }) => {
1533
+ if (typeof window !== "undefined" && endpoints) {
1534
+ apiEndpoints = endpoints;
1535
+ sessionStorage.setItem(
1536
+ STORAGE_KEY,
1537
+ JSON.stringify(endpoints)
1538
+ );
1539
+ }
1540
+ return null;
1541
+ };
1542
+ var getApiEndpoints = () => {
1543
+ if (apiEndpoints) {
1544
+ return apiEndpoints;
1545
+ }
1546
+ if (typeof window !== "undefined") {
1547
+ const data = sessionStorage.getItem(STORAGE_KEY);
1548
+ if (data) {
1549
+ apiEndpoints = JSON.parse(data);
1550
+ return apiEndpoints;
1551
+ }
1552
+ }
1553
+ throw new Error(
1554
+ "Api Endpoints not initialized. Please render <ApiEndpointsProvider apiEndpoints={ApiEndPoints} /> once before using FlowCore."
1555
+ );
1556
+ };
1557
+ var ApiEndpointsProvider_default = ApiEndpointsProvider;
1558
+
1559
+ // src/components/Service/ApiServicepackage.js
1560
+ var apiService = null;
1561
+ var ApiServicepackage = ({ apiService: service }) => {
1562
+ if (service) {
1563
+ apiService = service;
1564
+ }
1565
+ return null;
1566
+ };
1567
+ var getApiService = () => {
1568
+ if (apiService) {
1569
+ return apiService;
1570
+ }
1571
+ throw new Error(
1572
+ "ApiService not initialized. Please render <ApiServicepackage apiService={ApiService} /> once before using FlowCore."
1573
+ );
1574
+ };
1575
+ var ApiServicepackage_default = ApiServicepackage;
1576
+
1577
+ // src/components/workflow-type/AddWorkflowTypeModal.jsx
1528
1578
  import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
1529
- var AddWorkflowTypeModal = ({
1530
- isOpen,
1531
- onClose,
1532
- onSave
1533
- }) => {
1534
- const [formData, setFormData] = useState8({
1535
- workflowTypeId: "",
1536
- workflowCode: "",
1537
- workflowName: "",
1538
- version: 1,
1539
- isPublished: "No",
1540
- description: "",
1541
- isActive: true
1542
- });
1543
- const [workflowTypeOptions, setWorkflowTypeOptions] = useState8([]);
1579
+ var initialFormData = {
1580
+ workflowTypeCode: "",
1581
+ workflowTypeName: "",
1582
+ description: "",
1583
+ createdBy: ""
1584
+ };
1585
+ var AddWorkflowTypeModal = ({ isOpen, onClose, onSave, createdBy = "" }) => {
1586
+ const [formData, setFormData] = useState8(__spreadProps(__spreadValues({}, initialFormData), {
1587
+ createdBy
1588
+ }));
1544
1589
  const [errors, setErrors] = useState8({});
1545
- useEffect5(() => {
1546
- const options = [{
1547
- workflowTypeId: 1,
1548
- workflowTypeName: "Citizen Petition",
1549
- workflowTypeCode: "PETITION"
1550
- }, {
1551
- workflowTypeId: 2,
1552
- workflowTypeName: "Building Permission",
1553
- workflowTypeCode: "BUILDING"
1554
- }, {
1555
- workflowTypeId: 3,
1556
- workflowTypeName: "Leave Application",
1557
- workflowTypeCode: "LEAVE"
1558
- }];
1559
- setWorkflowTypeOptions(options);
1560
- }, []);
1561
- const handleChange = (e) => {
1562
- const {
1563
- name,
1564
- value,
1565
- type,
1566
- checked
1567
- } = e.target;
1590
+ const [isSubmitting, setIsSubmitting] = useState8(false);
1591
+ const [submitError, setSubmitError] = useState8("");
1592
+ const handleChange = ({ target: { name, value } }) => {
1568
1593
  if (name === "description" && value.length > 500) return;
1569
- setFormData((prev) => __spreadProps(__spreadValues({}, prev), {
1570
- [name]: type === "checkbox" ? checked : value
1571
- }));
1572
- if (errors[name]) {
1573
- setErrors((prev) => __spreadProps(__spreadValues({}, prev), {
1574
- [name]: ""
1575
- }));
1576
- }
1594
+ setFormData((previous) => __spreadProps(__spreadValues({}, previous), { [name]: value }));
1595
+ setErrors((previous) => __spreadProps(__spreadValues({}, previous), { [name]: "" }));
1596
+ setSubmitError("");
1577
1597
  };
1578
1598
  const validateForm = () => {
1579
- let newErrors = {};
1580
- if (!formData.workflowTypeId) newErrors.workflowTypeId = "Workflow Type is required";
1581
- if (!formData.workflowCode.trim()) newErrors.workflowCode = "Workflow Code is required";
1582
- if (!formData.workflowName.trim()) newErrors.workflowName = "Workflow Name is required";
1583
- setErrors(newErrors);
1584
- return Object.keys(newErrors).length === 0;
1585
- };
1586
- const handleSubmit = (e) => {
1587
- e.preventDefault();
1599
+ const nextErrors = {};
1600
+ if (!formData.workflowTypeCode.trim()) nextErrors.workflowTypeCode = "Workflow type code is required";
1601
+ if (!formData.workflowTypeName.trim()) nextErrors.workflowTypeName = "Workflow type name is required";
1602
+ if (!formData.createdBy.trim()) nextErrors.createdBy = "Created by is required";
1603
+ setErrors(nextErrors);
1604
+ return Object.keys(nextErrors).length === 0;
1605
+ };
1606
+ const handleClose = () => {
1607
+ if (!isSubmitting) onClose();
1608
+ };
1609
+ const handleSubmit = async (event) => {
1610
+ var _a, _b, _c, _d, _e;
1611
+ event.preventDefault();
1588
1612
  if (!validateForm()) return;
1589
1613
  const payload = {
1590
- workflowTypeId: parseInt(formData.workflowTypeId, 10),
1591
- workflowCode: formData.workflowCode.toUpperCase().trim(),
1592
- workflowName: formData.workflowName.trim(),
1593
- version: parseInt(formData.version, 10),
1594
- isPublished: formData.isPublished === "Yes",
1595
- isActive: formData.isActive,
1596
- description: formData.description.trim()
1614
+ workflowTypeCode: formData.workflowTypeCode.trim().toUpperCase(),
1615
+ workflowTypeName: formData.workflowTypeName.trim(),
1616
+ description: formData.description.trim(),
1617
+ createdBy: formData.createdBy.trim()
1597
1618
  };
1598
- onSave(payload);
1599
- handleReset();
1600
- onClose();
1601
- };
1602
- const handleReset = () => {
1603
- setFormData({
1604
- workflowTypeId: "",
1605
- workflowCode: "",
1606
- workflowName: "",
1607
- version: 1,
1608
- isPublished: "No",
1609
- description: "",
1610
- isActive: true
1611
- });
1612
- setErrors({});
1619
+ try {
1620
+ setIsSubmitting(true);
1621
+ setSubmitError("");
1622
+ const endpoints = getApiEndpoints();
1623
+ const endpoint = (_b = (_a = endpoints == null ? void 0 : endpoints.flowCore) == null ? void 0 : _a.workflow) == null ? void 0 : _b.createWorkflowList;
1624
+ if (!endpoint) throw new Error("Create workflow type endpoint is not configured.");
1625
+ const response = await getApiService().post(endpoint, payload);
1626
+ await (onSave == null ? void 0 : onSave((_c = response == null ? void 0 : response.data) != null ? _c : response));
1627
+ setFormData(__spreadProps(__spreadValues({}, initialFormData), { createdBy }));
1628
+ setErrors({});
1629
+ onClose();
1630
+ } catch (error) {
1631
+ setSubmitError(
1632
+ ((_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 workflow type. Please try again."
1633
+ );
1634
+ } finally {
1635
+ setIsSubmitting(false);
1636
+ }
1613
1637
  };
1614
1638
  if (!isOpen) return null;
1615
- return (
1616
- /* Completely Light Overlay (No Pitch Black Backdrop) */
1617
- /* @__PURE__ */ jsx14("div", { className: "fc:fixed fc:inset-0 fc:z-50 fc:flex fc:items-center fc:justify-center fc:bg-black/20 fc:p-4 fc:backdrop-blur-sm", children: /* @__PURE__ */ jsxs13("div", { className: "fc:bg-white fc:rounded-2xl fc:shadow-2xl fc:border fc:border-gray-100 fc:w-full fc:max-w-3xl fc:max-h-[80vh] fc:overflow-hidden fc:transition-all", children: [
1618
- /* @__PURE__ */ jsxs13("div", { className: "fc:flex fc:justify-between fc:items-center fc:px-6 fc:py-3 fc:border-b fc:border-gray-100", children: [
1619
- /* @__PURE__ */ jsxs13("div", { className: "fc:flex fc:items-center fc:gap-3", children: [
1620
- /* @__PURE__ */ jsx14("div", { className: "fc:w-10 fc:h-10 fc:rounded-xl fc:bg-blue-50 fc:text-[#2563eb] fc:flex fc:items-center fc:justify-center fc:font-bold", children: /* @__PURE__ */ jsx14("svg", { className: "fc:w-5 fc:h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx14("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" }) }) }),
1621
- /* @__PURE__ */ jsxs13("div", { children: [
1622
- /* @__PURE__ */ jsx14("h2", { className: "fc:text-xl fc:font-bold fc:text-gray-800", children: "Add Workflow" }),
1623
- /* @__PURE__ */ jsx14("p", { className: "fc:text-xs fc:text-gray-400", children: "Create a new workflow and configure its details" })
1624
- ] })
1625
- ] }),
1626
- /* @__PURE__ */ jsx14("button", { onClick: onClose, className: "fc:text-gray-400 hover:fc:fc:text-gray-600 fc:transition fc:text-xl fc:font-medium", children: "\u2715" })
1639
+ return /* @__PURE__ */ jsx14("div", { className: "fc:fixed fc:inset-0 fc:z-50 fc:flex fc:items-center fc:justify-center fc:bg-black/20 fc:p-4 fc:backdrop-blur-sm", children: /* @__PURE__ */ jsxs13("div", { className: "fc:w-full fc:max-w-xl fc:overflow-hidden fc:rounded-2xl fc:border fc:border-gray-100 fc:bg-white fc:shadow-2xl", children: [
1640
+ /* @__PURE__ */ jsxs13("div", { className: "fc:flex fc:items-center fc:justify-between fc:border-b fc:border-gray-100 fc:px-6 fc:py-4", children: [
1641
+ /* @__PURE__ */ jsxs13("div", { children: [
1642
+ /* @__PURE__ */ jsx14("h2", { className: "fc:text-xl fc:font-bold fc:text-gray-800", children: "Add Workflow Type" }),
1643
+ /* @__PURE__ */ jsx14("p", { className: "fc:text-xs fc:text-gray-400", children: "Create a new workflow type" })
1627
1644
  ] }),
1628
- /* @__PURE__ */ jsxs13("form", { onSubmit: handleSubmit, className: "fc:p-4 fc:space-y-3 fc:overflow-y-auto fc:max-h-[70vh]", children: [
1629
- /* @__PURE__ */ jsxs13("div", { className: "fc:bg-gray-50/70 fc:rounded-xl fc:p-5 fc:border fc:border-gray-100", children: [
1630
- /* @__PURE__ */ jsxs13("h3", { className: "fc:text-sm fc:font-semibold fc:text-[#2563eb] fc:mb-4 fc:flex fc:items-center fc:gap-2", children: [
1631
- /* @__PURE__ */ jsx14("span", { children: "\u{1F4CB}" }),
1632
- " Workflow Information"
1633
- ] }),
1634
- /* @__PURE__ */ jsxs13("div", { className: "fc:grid fc:grid-cols-2 fc:gap-5", children: [
1635
- /* @__PURE__ */ jsxs13("div", { children: [
1636
- /* @__PURE__ */ jsxs13("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-gray-700 fc:mb-1.5", children: [
1637
- "Workflow Type ",
1638
- /* @__PURE__ */ jsx14("span", { className: "fc:text-red-500", children: "*" })
1639
- ] }),
1640
- /* @__PURE__ */ jsxs13("select", { name: "workflowTypeId", value: formData.workflowTypeId, onChange: handleChange, className: `fc:w-full fc:border fc:p-2.5 fc:pl-9 fc:rounded-xl fc:text-xs fc:bg-white fc:focus:outline-none fc:focus:ring-2 fc:focus:ring-indigo-500/10 fc:focus:border-indigo-500 ${errors.workflowTypeId ? "fc:border-red-500" : "fc:border-slate-200 fc:text-slate-700"}`, children: [
1641
- /* @__PURE__ */ jsx14("option", { value: "", children: "Select workflow type" }),
1642
- workflowTypeOptions.map((item) => /* @__PURE__ */ jsx14("option", { value: item.workflowTypeId, children: item.workflowTypeName }, item.workflowTypeId))
1643
- ] }),
1644
- errors.workflowTypeId && /* @__PURE__ */ jsx14("span", { className: "fc:text-xs fc:text-red-500", children: errors.workflowTypeId })
1645
- ] }),
1646
- /* @__PURE__ */ jsxs13("div", { children: [
1647
- /* @__PURE__ */ jsxs13("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-gray-700 fc:mb-1.5", children: [
1648
- "Workflow Code ",
1649
- /* @__PURE__ */ jsx14("span", { className: "fc:text-red-500", children: "*" })
1650
- ] }),
1651
- /* @__PURE__ */ jsx14("input", { type: "text", name: "workflowCode", placeholder: "Enter workflow code", value: formData.workflowCode, onChange: handleChange, className: `fc:w-full fc:border fc:p-2.5 fc:pl-9 fc:rounded-xl fc:text-xs fc:bg-white fc:focus:outline-none fc:focus:ring-2 fc:focus:ring-indigo-500/10 fc:focus:border-indigo-500 ${errors.workflowCode ? "fc:border-red-500" : "fc:border-slate-200 fc:text-slate-700"}` }),
1652
- errors.workflowCode && /* @__PURE__ */ jsx14("span", { className: "fc:text-xs fc:text-red-500", children: errors.workflowCode })
1653
- ] }),
1654
- /* @__PURE__ */ jsxs13("div", { className: "fc:col-span-2", children: [
1655
- /* @__PURE__ */ jsxs13("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-gray-700 fc:mb-1.5", children: [
1656
- "Workflow Name ",
1657
- /* @__PURE__ */ jsx14("span", { className: "fc:text-red-500", children: "*" })
1658
- ] }),
1659
- /* @__PURE__ */ jsx14("input", { type: "text", name: "workflowName", placeholder: "Enter workflow name", value: formData.workflowName, onChange: handleChange, className: `fc:w-full fc:border fc:p-2.5 fc:pl-9 fc:rounded-xl fc:text-xs fc:bg-white fc:focus:outline-none fc:focus:ring-2 fc:focus:ring-indigo-500/10 fc:focus:border-indigo-500 ${errors.workflowName ? "fc:border-red-500" : "fc:border-slate-200 fc:text-slate-700"}` }),
1660
- errors.workflowName && /* @__PURE__ */ jsx14("span", { className: "fc:text-xs fc:text-red-500", children: errors.workflowName })
1661
- ] }),
1662
- /* @__PURE__ */ jsxs13("div", { children: [
1663
- /* @__PURE__ */ jsxs13("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-gray-700 fc:mb-1.5", children: [
1664
- "Version ",
1665
- /* @__PURE__ */ jsx14("span", { className: "fc:text-red-500", children: "*" })
1666
- ] }),
1667
- /* @__PURE__ */ jsx14("input", { type: "number", name: "version", value: formData.version, onChange: handleChange, className: "fc:w-full fc:border fc:p-2.5 fc:pl-9 fc:rounded-xl fc:text-xs fc:bg-white 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", readOnly: true })
1668
- ] }),
1669
- /* @__PURE__ */ jsxs13("div", { children: [
1670
- /* @__PURE__ */ jsxs13("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-gray-700 fc:mb-1.5", children: [
1671
- "Published ",
1672
- /* @__PURE__ */ jsx14("span", { className: "fc:text-red-500", children: "*" })
1673
- ] }),
1674
- /* @__PURE__ */ jsxs13("select", { name: "isPublished", value: formData.isPublished, onChange: handleChange, className: "fc:w-full fc:border fc:p-2.5 fc:pl-9 fc:rounded-xl fc:text-xs fc:bg-white 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", children: [
1675
- /* @__PURE__ */ jsx14("option", { value: "No", children: "No" }),
1676
- /* @__PURE__ */ jsx14("option", { value: "Yes", children: "Yes" })
1677
- ] })
1678
- ] }),
1679
- /* @__PURE__ */ jsxs13("div", { className: "fc:col-span-2", children: [
1680
- /* @__PURE__ */ jsxs13("div", { className: "fc:flex fc:justify-between fc:items-center fc:mb-1.5", children: [
1681
- /* @__PURE__ */ jsx14("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-gray-700", children: "Description" }),
1682
- /* @__PURE__ */ jsxs13("span", { className: "fc:text-[11px] fc:text-gray-400", children: [
1683
- formData.description.length,
1684
- " / 500"
1685
- ] })
1686
- ] }),
1687
- /* @__PURE__ */ jsx14("textarea", { name: "description", rows: "3", placeholder: "Enter detailed description...", value: formData.description, onChange: handleChange, className: "fc:w-full fc:px-3 fc:py-2.5 fc:text-sm fc:bg-white fc:border fc:border-gray-200 fc:rounded-lg focus:fc:fc:ring-2 focus:fc:fc:ring-blue-500/20 focus:fc:fc:border-[#2563eb] fc:outline-none fc:resize-none fc:transition" })
1688
- ] })
1689
- ] })
1690
- ] }),
1691
- /* @__PURE__ */ jsxs13("div", { className: "fc:flex fc:justify-end fc:items-center fc:gap-3 fc:pt-2", children: [
1692
- /* @__PURE__ */ jsx14("button", { type: "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" }),
1693
- /* @__PURE__ */ jsx14("button", { type: "submit", className: "fc:px-6 fc:py-2.5 fc:text-sm fc:font-semibold fc:text-white fc:bg-[#2563eb] hover:fc:fc:bg-[#1d4ed8] active:fc:fc:scale-95 fc:rounded-xl fc:shadow-md fc:transition-all fc:flex fc:items-center fc:gap-2", children: "Save Workflow" })
1645
+ /* @__PURE__ */ jsx14("button", { type: "button", onClick: handleClose, disabled: isSubmitting, "aria-label": "Close", className: "fc:text-xl fc:text-gray-400 hover:fc:text-gray-600", children: "\xD7" })
1646
+ ] }),
1647
+ /* @__PURE__ */ jsxs13("form", { onSubmit: handleSubmit, className: "fc:space-y-4 fc:p-6", children: [
1648
+ /* @__PURE__ */ jsxs13("div", { className: "fc:grid fc:grid-cols-2 fc:gap-4", children: [
1649
+ /* @__PURE__ */ jsx14(FormField, { label: "Workflow Type Code", required: true, error: errors.workflowTypeCode, children: /* @__PURE__ */ jsx14("input", { name: "workflowTypeCode", value: formData.workflowTypeCode, onChange: handleChange, placeholder: "e.g. PETITION", className: inputClass(errors.workflowTypeCode) }) }),
1650
+ /* @__PURE__ */ jsx14(FormField, { label: "Workflow Type Name", required: true, error: errors.workflowTypeName, children: /* @__PURE__ */ jsx14("input", { name: "workflowTypeName", value: formData.workflowTypeName, onChange: handleChange, placeholder: "Enter workflow type name", className: inputClass(errors.workflowTypeName) }) })
1651
+ ] }),
1652
+ /* @__PURE__ */ jsx14(FormField, { label: "Created By", required: true, error: errors.createdBy, children: /* @__PURE__ */ jsx14("input", { name: "createdBy", value: formData.createdBy, onChange: handleChange, placeholder: "Enter user name or ID", className: inputClass(errors.createdBy) }) }),
1653
+ /* @__PURE__ */ jsx14(FormField, { label: "Description", children: /* @__PURE__ */ jsxs13("div", { className: "fc:relative", children: [
1654
+ /* @__PURE__ */ jsx14("textarea", { name: "description", rows: "3", value: formData.description, onChange: handleChange, placeholder: "Enter description", className: "fc:w-full fc:resize-none fc:rounded-xl fc:border fc:border-slate-200 fc:p-3 fc:text-sm fc:text-slate-700 fc:outline-none focus:fc:border-indigo-500" }),
1655
+ /* @__PURE__ */ jsxs13("span", { className: "fc:absolute fc:bottom-2 fc:right-3 fc:text-xs fc:text-gray-400", children: [
1656
+ formData.description.length,
1657
+ "/500"
1694
1658
  ] })
1659
+ ] }) }),
1660
+ submitError && /* @__PURE__ */ jsx14("p", { role: "alert", className: "fc:rounded-lg fc:bg-red-50 fc:p-3 fc:text-sm fc:text-red-600", children: submitError }),
1661
+ /* @__PURE__ */ jsxs13("div", { className: "fc:flex fc:justify-end fc:gap-3 fc:border-t fc:border-gray-100 fc:pt-4", children: [
1662
+ /* @__PURE__ */ jsx14("button", { type: "button", onClick: handleClose, disabled: isSubmitting, className: "fc:rounded-xl fc:bg-gray-100 fc:px-5 fc:py-2.5 fc:text-sm fc:font-medium fc:text-gray-600 disabled:fc:cursor-not-allowed", children: "Cancel" }),
1663
+ /* @__PURE__ */ jsx14("button", { type: "submit", disabled: isSubmitting, className: "fc:flex fc:min-w-32 fc:justify-center fc:rounded-xl fc:bg-[#2563eb] fc:px-6 fc:py-2.5 fc:text-sm fc:font-semibold fc:text-white disabled:fc:cursor-not-allowed disabled:fc:opacity-60", children: isSubmitting ? "Saving..." : "Save Workflow Type" })
1695
1664
  ] })
1696
- ] }) })
1697
- );
1665
+ ] })
1666
+ ] }) });
1698
1667
  };
1668
+ var inputClass = (hasError) => `fc:w-full fc:rounded-xl fc:border fc:bg-white fc:p-3 fc:text-sm fc:text-slate-700 fc:outline-none focus:fc:border-indigo-500 ${hasError ? "fc:border-red-500" : "fc:border-slate-200"}`;
1669
+ var FormField = ({ label, required, error, children }) => /* @__PURE__ */ jsxs13("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-gray-700", children: [
1670
+ label,
1671
+ " ",
1672
+ required && /* @__PURE__ */ jsx14("span", { className: "fc:text-red-500", children: "*" }),
1673
+ /* @__PURE__ */ jsx14("div", { className: "fc:mt-1.5", children }),
1674
+ error && /* @__PURE__ */ jsx14("span", { className: "fc:mt-1 fc:block fc:text-xs fc:text-red-500", children: error })
1675
+ ] });
1699
1676
  var AddWorkflowTypeModal_default = AddWorkflowTypeModal;
1700
1677
 
1701
1678
  // src/components/workflow-type/WorkflowTypeMains.js
@@ -3064,10 +3041,10 @@ function MappingSearchBar({
3064
3041
  }
3065
3042
 
3066
3043
  // src/components/user-hierarchy-node-mapping/userhierarchynodetable.jsx
3067
- import React25, { useState as useState15, useEffect as useEffect7 } from "react";
3044
+ import React25, { useState as useState15, useEffect as useEffect6 } from "react";
3068
3045
 
3069
3046
  // src/components/user-hierarchy-node-mapping/edit-mapping.jsx
3070
- import React23, { useEffect as useEffect6, useState as useState14 } from "react";
3047
+ import React23, { useEffect as useEffect5, useState as useState14 } from "react";
3071
3048
  import { jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
3072
3049
  function EditUserHierarchyNodeMappingModal({
3073
3050
  isOpen,
@@ -3082,7 +3059,7 @@ function EditUserHierarchyNodeMappingModal({
3082
3059
  effectiveFrom: "",
3083
3060
  effectiveTo: ""
3084
3061
  });
3085
- useEffect6(() => {
3062
+ useEffect5(() => {
3086
3063
  if (selectedMapping) {
3087
3064
  setFormData({
3088
3065
  hierarchyNodeId: selectedMapping.hierarchyNodeId || "",
@@ -3586,7 +3563,7 @@ function UserHierarchyNodeMappingTable({
3586
3563
  const query = (searchQuery || "").toLowerCase();
3587
3564
  return String(item.mappingId).toLowerCase().includes(query) || String(item.externalUserId).toLowerCase().includes(query) || String(item.hierarchyNodeId).toLowerCase().includes(query) || item.roleCode.toLowerCase().includes(query);
3588
3565
  });
3589
- useEffect7(() => {
3566
+ useEffect6(() => {
3590
3567
  if (setTotalEntries) setTotalEntries(filteredData.length);
3591
3568
  }, [filteredData.length, setTotalEntries]);
3592
3569
  const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
@@ -3779,10 +3756,10 @@ function SearchBar3({
3779
3756
  }
3780
3757
 
3781
3758
  // src/components/document-configuration/DocumentConfigurationTable.jsx
3782
- import React30, { useState as useState18, useEffect as useEffect9 } from "react";
3759
+ import React30, { useState as useState18, useEffect as useEffect8 } from "react";
3783
3760
 
3784
3761
  // src/components/document-configuration/Edit.jsx
3785
- import React28, { useState as useState17, useEffect as useEffect8 } from "react";
3762
+ import React28, { useState as useState17, useEffect as useEffect7 } from "react";
3786
3763
  import { jsx as jsx28, jsxs as jsxs27 } from "react/jsx-runtime";
3787
3764
  function EditDocumentConfiguration({
3788
3765
  isOpen,
@@ -3800,7 +3777,7 @@ function EditDocumentConfiguration({
3800
3777
  status: "Active"
3801
3778
  });
3802
3779
  const [errors, setErrors] = useState17({});
3803
- useEffect8(() => {
3780
+ useEffect7(() => {
3804
3781
  if (initialData) {
3805
3782
  const sizeParts = (initialData.maxSize || "10 MB").split(" ");
3806
3783
  setFormData({
@@ -4230,7 +4207,7 @@ function DocumentConfigTable({
4230
4207
  const query = (searchQuery || "").toLowerCase();
4231
4208
  return item.docName.toLowerCase().includes(query) || item.extensions.toLowerCase().includes(query) || item.stepId.toLowerCase().includes(query);
4232
4209
  });
4233
- useEffect9(() => {
4210
+ useEffect8(() => {
4234
4211
  if (setTotalEntries) setTotalEntries(filteredData.length);
4235
4212
  }, [filteredData.length, setTotalEntries]);
4236
4213
  const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
@@ -4651,7 +4628,7 @@ function SearchBar4({
4651
4628
  }
4652
4629
 
4653
4630
  // src/components/audit-log/AuditLogTable.jsx
4654
- import React34, { useState as useState21, useEffect as useEffect10 } from "react";
4631
+ import React34, { useState as useState21, useEffect as useEffect9 } from "react";
4655
4632
  import { jsx as jsx34, jsxs as jsxs33 } from "react/jsx-runtime";
4656
4633
  function AuditLogTable({
4657
4634
  pageSize,
@@ -4879,7 +4856,7 @@ function AuditLogTable({
4879
4856
  const query = (searchQuery || "").toLowerCase();
4880
4857
  return item.logId.toLowerCase().includes(query) || item.user.toLowerCase().includes(query) || item.section.toLowerCase().includes(query) || item.action.toLowerCase().includes(query);
4881
4858
  });
4882
- useEffect10(() => {
4859
+ useEffect9(() => {
4883
4860
  if (setTotalEntries) setTotalEntries(filteredData.length);
4884
4861
  }, [filteredData.length, setTotalEntries]);
4885
4862
  const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
@@ -5167,7 +5144,7 @@ function SearchBar5({
5167
5144
  }
5168
5145
 
5169
5146
  // src/components/movement-history/MovementHistoryTable.jsx
5170
- import React38, { useState as useState24, useEffect as useEffect11 } from "react";
5147
+ import React38, { useState as useState24, useEffect as useEffect10 } from "react";
5171
5148
  import { jsx as jsx38, jsxs as jsxs37 } from "react/jsx-runtime";
5172
5149
  function MovementHistoryTable({
5173
5150
  pageSize,
@@ -5395,7 +5372,7 @@ function MovementHistoryTable({
5395
5372
  const query = (searchQuery || "").toLowerCase();
5396
5373
  return item.movementHistoryId.toLowerCase().includes(query) || item.name.toLowerCase().includes(query) || item.toStepId.toLowerCase().includes(query);
5397
5374
  });
5398
- useEffect11(() => {
5375
+ useEffect10(() => {
5399
5376
  if (setTotalEntries) setTotalEntries(filteredData.length);
5400
5377
  }, [filteredData.length, setTotalEntries]);
5401
5378
  const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
@@ -5677,7 +5654,7 @@ function SearchBar6({
5677
5654
  }
5678
5655
 
5679
5656
  // src/components/task-permission/Table.js
5680
- import React42, { useState as useState27, useEffect as useEffect12 } from "react";
5657
+ import React42, { useState as useState27, useEffect as useEffect11 } from "react";
5681
5658
  import { jsx as jsx42, jsxs as jsxs41 } from "react/jsx-runtime";
5682
5659
  function Table({
5683
5660
  pageSize,
@@ -5924,7 +5901,7 @@ function Table({
5924
5901
  }
5925
5902
  return item.taskId && item.taskId.toString().toLowerCase().includes(query) || item.role && item.role.toLowerCase().includes(query) || item.taskName && item.taskName.toLowerCase().includes(query) || item.permissionType && item.permissionType.toLowerCase().includes(query);
5926
5903
  });
5927
- useEffect12(() => {
5904
+ useEffect11(() => {
5928
5905
  if (setTotalEntries) setTotalEntries(filteredData.length);
5929
5906
  }, [filteredData.length, setTotalEntries]);
5930
5907
  const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
@@ -6261,7 +6238,7 @@ function SearchBar7({
6261
6238
  }
6262
6239
 
6263
6240
  // src/components/Workflow-Setting/Table.js
6264
- import React46, { useState as useState30, useEffect as useEffect13 } from "react";
6241
+ import React46, { useState as useState30, useEffect as useEffect12 } from "react";
6265
6242
  import { jsx as jsx46, jsxs as jsxs45 } from "react/jsx-runtime";
6266
6243
  function Table2({
6267
6244
  pageSize,
@@ -6508,7 +6485,7 @@ function Table2({
6508
6485
  }
6509
6486
  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);
6510
6487
  });
6511
- useEffect13(() => {
6488
+ useEffect12(() => {
6512
6489
  if (setTotalEntries) setTotalEntries(filteredData.length);
6513
6490
  }, [filteredData.length, setTotalEntries]);
6514
6491
  const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
@@ -6784,7 +6761,7 @@ function SearchBar8({
6784
6761
  }
6785
6762
 
6786
6763
  // src/components/notification/Table.js
6787
- import React50, { useState as useState33, useEffect as useEffect14 } from "react";
6764
+ import React50, { useState as useState33, useEffect as useEffect13 } from "react";
6788
6765
  import { jsx as jsx50, jsxs as jsxs49 } from "react/jsx-runtime";
6789
6766
  function Table3({
6790
6767
  pageSize,
@@ -7031,7 +7008,7 @@ function Table3({
7031
7008
  }
7032
7009
  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);
7033
7010
  });
7034
- useEffect14(() => {
7011
+ useEffect13(() => {
7035
7012
  if (setTotalEntries) setTotalEntries(filteredData.length);
7036
7013
  }, [filteredData.length, setTotalEntries]);
7037
7014
  const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
@@ -7317,10 +7294,10 @@ function TaskInstanceSearchBar({
7317
7294
  }
7318
7295
 
7319
7296
  // src/components/task-instance/taskinstancetable.jsx
7320
- import React56, { useState as useState37, useEffect as useEffect16 } from "react";
7297
+ import React56, { useState as useState37, useEffect as useEffect15 } from "react";
7321
7298
 
7322
7299
  // src/components/task-instance/edit-instance.jsx
7323
- import React54, { useEffect as useEffect15, useState as useState36 } from "react";
7300
+ import React54, { useEffect as useEffect14, useState as useState36 } from "react";
7324
7301
  import { jsx as jsx54, jsxs as jsxs53 } from "react/jsx-runtime";
7325
7302
  function EditTaskInstanceModal({
7326
7303
  isOpen,
@@ -7336,7 +7313,7 @@ function EditTaskInstanceModal({
7336
7313
  escalatedOn: "",
7337
7314
  slaStatus: ""
7338
7315
  });
7339
- useEffect15(() => {
7316
+ useEffect14(() => {
7340
7317
  if (selectedTask) {
7341
7318
  setFormData({
7342
7319
  assignedUserId: selectedTask.assignedUserId || selectedTask.assigned_user_id || "",
@@ -7857,7 +7834,7 @@ function TaskInstanceTable({
7857
7834
  const query = (searchQuery || "").toLowerCase();
7858
7835
  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);
7859
7836
  });
7860
- useEffect16(() => {
7837
+ useEffect15(() => {
7861
7838
  if (setTotalEntries) setTotalEntries(filteredData.length);
7862
7839
  }, [filteredData.length, setTotalEntries]);
7863
7840
  const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
@@ -8226,7 +8203,7 @@ function CommentSearchBar({
8226
8203
  }
8227
8204
 
8228
8205
  // src/components/comment/commenttable.jsx
8229
- import React60, { useState as useState39, useEffect as useEffect17 } from "react";
8206
+ import React60, { useState as useState39, useEffect as useEffect16 } from "react";
8230
8207
  import { jsx as jsx60, jsxs as jsxs59 } from "react/jsx-runtime";
8231
8208
  function CommentTable({
8232
8209
  pageSize,
@@ -8454,7 +8431,7 @@ function CommentTable({
8454
8431
  const query = (searchQuery || "").toLowerCase();
8455
8432
  return String(item.commentId).toLowerCase().includes(query) || String(item.taskInstanceId).toLowerCase().includes(query) || item.comment.toLowerCase().includes(query) || String(item.commentedBy).toLowerCase().includes(query);
8456
8433
  });
8457
- useEffect17(() => {
8434
+ useEffect16(() => {
8458
8435
  if (setTotalEntries) setTotalEntries(filteredData.length);
8459
8436
  }, [filteredData.length, setTotalEntries]);
8460
8437
  const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
@@ -8828,10 +8805,10 @@ function SearchBar9({ searchQuery, setSearchQuery }) {
8828
8805
  }
8829
8806
 
8830
8807
  // src/components/hierarchy-node/HierarchyTable.jsx
8831
- import React66, { useState as useState43, useEffect as useEffect19 } from "react";
8808
+ import React66, { useState as useState43, useEffect as useEffect18 } from "react";
8832
8809
 
8833
8810
  // src/components/hierarchy-node/AddEditModal.jsx
8834
- import React64, { useEffect as useEffect18, useState as useState42 } from "react";
8811
+ import React64, { useEffect as useEffect17, useState as useState42 } from "react";
8835
8812
  import { jsx as jsx64, jsxs as jsxs63 } from "react/jsx-runtime";
8836
8813
  function AddEditModal2({
8837
8814
  isOpen,
@@ -8849,7 +8826,7 @@ function AddEditModal2({
8849
8826
  externalEntityId: "",
8850
8827
  isActive: true
8851
8828
  });
8852
- useEffect18(() => {
8829
+ useEffect17(() => {
8853
8830
  if (editData) {
8854
8831
  setFormData(editData);
8855
8832
  }
@@ -9164,7 +9141,7 @@ function HierarchyTable({
9164
9141
  const [editOpen, setEditOpen] = useState43(false);
9165
9142
  const [deleteOpen, setDeleteOpen] = useState43(false);
9166
9143
  const [selectedNode, setSelectedNode] = useState43(null);
9167
- useEffect19(() => {
9144
+ useEffect18(() => {
9168
9145
  setCurrentPage(1);
9169
9146
  }, [searchQuery, pageSize]);
9170
9147
  const handleSort = (column) => {
@@ -11186,7 +11163,7 @@ function SearchBar12({
11186
11163
  }
11187
11164
 
11188
11165
  // src/components/assignment-rule/Table.js
11189
- import React82, { useState as useState53, useEffect as useEffect20 } from "react";
11166
+ import React82, { useState as useState53, useEffect as useEffect19 } from "react";
11190
11167
  import { jsx as jsx82, jsxs as jsxs81 } from "react/jsx-runtime";
11191
11168
  function Table4({
11192
11169
  pageSize,
@@ -11352,7 +11329,7 @@ function Table4({
11352
11329
  const query = searchQuery.toLowerCase().trim();
11353
11330
  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);
11354
11331
  });
11355
- useEffect20(() => {
11332
+ useEffect19(() => {
11356
11333
  if (setTotalEntries) setTotalEntries(filteredData.length);
11357
11334
  }, [filteredData.length, setTotalEntries]);
11358
11335
  const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
@@ -11867,31 +11844,6 @@ var Layout = ({ children }) => {
11867
11844
  ) });
11868
11845
  };
11869
11846
  var Layout_default = Layout;
11870
-
11871
- // src/components/Service/ApiEndpointsProvider.js
11872
- var STORAGE_KEY = "FLOWCORE_API_ENDPOINTS";
11873
- var apiEndpoints = null;
11874
- var ApiEndpointsProvider = ({ apiEndpoints: endpoints }) => {
11875
- if (typeof window !== "undefined" && endpoints) {
11876
- apiEndpoints = endpoints;
11877
- sessionStorage.setItem(
11878
- STORAGE_KEY,
11879
- JSON.stringify(endpoints)
11880
- );
11881
- }
11882
- return null;
11883
- };
11884
- var ApiEndpointsProvider_default = ApiEndpointsProvider;
11885
-
11886
- // src/components/Service/ApiServicepackage.js
11887
- var apiService = null;
11888
- var ApiServicepackage = ({ apiService: service }) => {
11889
- if (service) {
11890
- apiService = service;
11891
- }
11892
- return null;
11893
- };
11894
- var ApiServicepackage_default = ApiServicepackage;
11895
11847
  export {
11896
11848
  ApiEndpointsProvider_default as ApiEndpointsProvider,
11897
11849
  ApiServicepackage_default as ApiServicepackage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowcore-fn",
3
- "version": "9.2.5",
3
+ "version": "9.2.6",
4
4
  "main": "dist/pkg-index.js",
5
5
  "module": "dist/pkg-index.mjs",
6
6
  "files": [