@acoustte-digital-services/digitalstore-controls 0.17.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1477,10 +1477,13 @@ var SelectWithSearchPanel = (props) => {
1477
1477
  const handleInputChange = (event, field) => {
1478
1478
  setFormData((prev) => __spreadProps(__spreadValues({}, prev), { [field]: event.target.value }));
1479
1479
  };
1480
- const handleSaveModal = (0, import_react27.useCallback)(async () => {
1480
+ const handleSaveModal = (0, import_react27.useCallback)(async (index) => {
1481
1481
  console.log("Form Data:", formData);
1482
- return formData;
1483
- }, []);
1482
+ return {
1483
+ isSuccessful: true,
1484
+ result: formData
1485
+ };
1486
+ }, [formData]);
1484
1487
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "relative", children: [
1485
1488
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("label", { className: "text-sm mb-1 font-medium", children: (_a = props.attributes) == null ? void 0 : _a.label }),
1486
1489
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
@@ -1552,7 +1555,10 @@ var SelectWithSearchPanel = (props) => {
1552
1555
  /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
1553
1556
  Button_default,
1554
1557
  {
1555
- onClick: handleSaveModal,
1558
+ onClick: async () => {
1559
+ await handleSaveModal();
1560
+ return { isSuccessful: true };
1561
+ },
1556
1562
  className: "w-full",
1557
1563
  children: [
1558
1564
  "Save ",
package/dist/index.mjs CHANGED
@@ -1441,10 +1441,13 @@ var SelectWithSearchPanel = (props) => {
1441
1441
  const handleInputChange = (event, field) => {
1442
1442
  setFormData((prev) => __spreadProps(__spreadValues({}, prev), { [field]: event.target.value }));
1443
1443
  };
1444
- const handleSaveModal = useCallback(async () => {
1444
+ const handleSaveModal = useCallback(async (index) => {
1445
1445
  console.log("Form Data:", formData);
1446
- return formData;
1447
- }, []);
1446
+ return {
1447
+ isSuccessful: true,
1448
+ result: formData
1449
+ };
1450
+ }, [formData]);
1448
1451
  return /* @__PURE__ */ jsxs16("div", { className: "relative", children: [
1449
1452
  /* @__PURE__ */ jsx27("label", { className: "text-sm mb-1 font-medium", children: (_a = props.attributes) == null ? void 0 : _a.label }),
1450
1453
  /* @__PURE__ */ jsx27("div", { children: /* @__PURE__ */ jsx27(
@@ -1516,7 +1519,10 @@ var SelectWithSearchPanel = (props) => {
1516
1519
  /* @__PURE__ */ jsxs16(
1517
1520
  Button_default,
1518
1521
  {
1519
- onClick: handleSaveModal,
1522
+ onClick: async () => {
1523
+ await handleSaveModal();
1524
+ return { isSuccessful: true };
1525
+ },
1520
1526
  className: "w-full",
1521
1527
  children: [
1522
1528
  "Save ",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acoustte-digital-services/digitalstore-controls",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "Reusable React components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",