@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260605123150 → 0.8.1-dev.20260606042833

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
@@ -1266,7 +1266,7 @@ var init_LinkNodeButton = __esm({
1266
1266
  const fieldNames = extractFieldNames(template);
1267
1267
  if (responseData) {
1268
1268
  fieldNames.forEach((fieldName) => {
1269
- const value = getNestedValue3(responseData, fieldName);
1269
+ const value = getNestedValue4(responseData, fieldName);
1270
1270
  if (value !== void 0) {
1271
1271
  const regex1 = new RegExp(`\\{${fieldName}\\}`, "g");
1272
1272
  const regex2 = new RegExp(`\\{\\{${fieldName}\\}\\}`, "g");
@@ -1289,7 +1289,7 @@ var init_LinkNodeButton = __esm({
1289
1289
  }
1290
1290
  return result;
1291
1291
  }, [props.routeParameters, dataitem, extractFieldNames]);
1292
- const getNestedValue3 = (0, import_react35.useCallback)((obj, path) => {
1292
+ const getNestedValue4 = (0, import_react35.useCallback)((obj, path) => {
1293
1293
  if (!obj || !path) return void 0;
1294
1294
  if (obj[path] !== void 0) {
1295
1295
  return obj[path];
@@ -1339,15 +1339,15 @@ var init_LinkNodeButton = __esm({
1339
1339
  console.log("Field names in redirect URL:", fieldNames);
1340
1340
  const fieldValueMap = {};
1341
1341
  fieldNames.forEach((fieldName) => {
1342
- const value = getNestedValue3(response, fieldName);
1342
+ const value = getNestedValue4(response, fieldName);
1343
1343
  if (value !== void 0) {
1344
1344
  fieldValueMap[fieldName] = String(value);
1345
1345
  } else {
1346
- const resultValue = getNestedValue3(response, `result.${fieldName}`);
1346
+ const resultValue = getNestedValue4(response, `result.${fieldName}`);
1347
1347
  if (resultValue !== void 0) {
1348
1348
  fieldValueMap[fieldName] = String(resultValue);
1349
1349
  } else {
1350
- const dataValue = getNestedValue3(response, `data.${fieldName}`);
1350
+ const dataValue = getNestedValue4(response, `data.${fieldName}`);
1351
1351
  if (dataValue !== void 0) {
1352
1352
  fieldValueMap[fieldName] = String(dataValue);
1353
1353
  }
@@ -1385,7 +1385,7 @@ var init_LinkNodeButton = __esm({
1385
1385
  setIsLoading(false);
1386
1386
  return { isSuccessful: false, message: err.message };
1387
1387
  }
1388
- }, [node.postUrl, node.payload, node.redirectUrl, replaceTemplateVariables, extractFieldNames, getNestedValue3, props.apiBaseUrl, props.session]);
1388
+ }, [node.postUrl, node.payload, node.redirectUrl, replaceTemplateVariables, extractFieldNames, getNestedValue4, props.apiBaseUrl, props.session]);
1389
1389
  const renderButtonContent = () => {
1390
1390
  if (children) {
1391
1391
  return children;
@@ -2850,7 +2850,7 @@ var SelectWithSearchPanel = (props) => {
2850
2850
  const containerRef = (0, import_react29.useRef)(null);
2851
2851
  const [isCreateOpen, setIsCreateOpen] = (0, import_react29.useState)(false);
2852
2852
  const [formData, setFormData] = (0, import_react29.useState)({});
2853
- const getNestedValue3 = (obj, path) => {
2853
+ const getNestedValue4 = (obj, path) => {
2854
2854
  return path.split(".").reduce((acc, key) => acc?.[key], obj);
2855
2855
  };
2856
2856
  (0, import_react29.useEffect)(() => {
@@ -2888,7 +2888,7 @@ var SelectWithSearchPanel = (props) => {
2888
2888
  props.dataSourceDependsOn
2889
2889
  ]);
2890
2890
  const filteredItems = list?.filter((item) => {
2891
- const value = getNestedValue3(item, props.dataTextFieldName);
2891
+ const value = getNestedValue4(item, props.dataTextFieldName);
2892
2892
  return value?.toLowerCase().includes(searchTerm?.toLowerCase());
2893
2893
  });
2894
2894
  const playBeep = () => {
@@ -2919,7 +2919,7 @@ var SelectWithSearchPanel = (props) => {
2919
2919
  }, [searchTerm]);
2920
2920
  const handleSelect = (event, item) => {
2921
2921
  event.preventDefault();
2922
- setSearchTerm(getNestedValue3(item, props.dataTextFieldName));
2922
+ setSearchTerm(getNestedValue4(item, props.dataTextFieldName));
2923
2923
  if (props.callback) {
2924
2924
  const val = {};
2925
2925
  props.callback({
@@ -3074,7 +3074,7 @@ var SelectWithSearchPanel = (props) => {
3074
3074
  role: "option",
3075
3075
  tabIndex: -1,
3076
3076
  onMouseEnter: () => setHighlightedIndex(index),
3077
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: getNestedValue3(item, props.dataTextFieldName) })
3077
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: getNestedValue4(item, props.dataTextFieldName) })
3078
3078
  }
3079
3079
  ) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
3080
3080
  }
@@ -3767,6 +3767,12 @@ var import_jsx_runtime48 = require("react/jsx-runtime");
3767
3767
  var LinkNodeButton2 = (0, import_dynamic4.default)(() => Promise.resolve().then(() => (init_LinkNodeButton(), LinkNodeButton_exports)), {
3768
3768
  ssr: false
3769
3769
  });
3770
+ function getNestedValue2(obj, path) {
3771
+ if (!obj || !path) return void 0;
3772
+ return path.split(".").reduce((current, key) => {
3773
+ return current && current[key] !== void 0 ? current[key] : void 0;
3774
+ }, obj);
3775
+ }
3770
3776
  var LinkNode = (props) => {
3771
3777
  const NodeTypes2 = {
3772
3778
  text: TextNode_default,
@@ -3775,7 +3781,7 @@ var LinkNode = (props) => {
3775
3781
  const { node, dataitem } = props;
3776
3782
  let linkUrl = node.url;
3777
3783
  if (node.datafield_link_url && dataitem) {
3778
- const dynamicUrl = dataitem[node.datafield_link_url];
3784
+ const dynamicUrl = getNestedValue2(dataitem, node.datafield_link_url);
3779
3785
  if (dynamicUrl && typeof dynamicUrl === "string") {
3780
3786
  linkUrl = dynamicUrl;
3781
3787
  }
@@ -5475,7 +5481,7 @@ function convertKeysToCamelCase(obj) {
5475
5481
  ])
5476
5482
  );
5477
5483
  }
5478
- var getNestedValue2 = (obj, path) => {
5484
+ var getNestedValue3 = (obj, path) => {
5479
5485
  if (!obj || !path) return void 0;
5480
5486
  return path.split(".").reduce((current, key) => {
5481
5487
  {
@@ -5641,7 +5647,7 @@ var DivContainer = async (props) => {
5641
5647
  }
5642
5648
  const shouldHideContainer = () => {
5643
5649
  if (!props.node.fieldVisibleOnTrue) return false;
5644
- const fieldValue = getNestedValue2(props.dataitem, props.node.fieldVisibleOnTrue);
5650
+ const fieldValue = getNestedValue3(props.dataitem, props.node.fieldVisibleOnTrue);
5645
5651
  return fieldValue !== void 0 && fieldValue === false;
5646
5652
  };
5647
5653
  const isHidden = shouldHideContainer();
@@ -5671,7 +5677,7 @@ var DivContainer = async (props) => {
5671
5677
  return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(NoDataFound_default, {});
5672
5678
  }
5673
5679
  if (dataBindingProperties.childCollectionName && props.dataitem) {
5674
- childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
5680
+ childCollectionData = getNestedValue3(props.dataitem, dataBindingProperties.childCollectionName);
5675
5681
  }
5676
5682
  }
5677
5683
  const cssResult = generateCssString(
package/dist/index.mjs CHANGED
@@ -1250,7 +1250,7 @@ var SelectWithSearchPanel = (props) => {
1250
1250
  const containerRef = useRef2(null);
1251
1251
  const [isCreateOpen, setIsCreateOpen] = useState4(false);
1252
1252
  const [formData, setFormData] = useState4({});
1253
- const getNestedValue3 = (obj, path) => {
1253
+ const getNestedValue4 = (obj, path) => {
1254
1254
  return path.split(".").reduce((acc, key) => acc?.[key], obj);
1255
1255
  };
1256
1256
  useEffect5(() => {
@@ -1288,7 +1288,7 @@ var SelectWithSearchPanel = (props) => {
1288
1288
  props.dataSourceDependsOn
1289
1289
  ]);
1290
1290
  const filteredItems = list?.filter((item) => {
1291
- const value = getNestedValue3(item, props.dataTextFieldName);
1291
+ const value = getNestedValue4(item, props.dataTextFieldName);
1292
1292
  return value?.toLowerCase().includes(searchTerm?.toLowerCase());
1293
1293
  });
1294
1294
  const playBeep = () => {
@@ -1319,7 +1319,7 @@ var SelectWithSearchPanel = (props) => {
1319
1319
  }, [searchTerm]);
1320
1320
  const handleSelect = (event, item) => {
1321
1321
  event.preventDefault();
1322
- setSearchTerm(getNestedValue3(item, props.dataTextFieldName));
1322
+ setSearchTerm(getNestedValue4(item, props.dataTextFieldName));
1323
1323
  if (props.callback) {
1324
1324
  const val = {};
1325
1325
  props.callback({
@@ -1474,7 +1474,7 @@ var SelectWithSearchPanel = (props) => {
1474
1474
  role: "option",
1475
1475
  tabIndex: -1,
1476
1476
  onMouseEnter: () => setHighlightedIndex(index),
1477
- children: /* @__PURE__ */ jsx25("span", { children: getNestedValue3(item, props.dataTextFieldName) })
1477
+ children: /* @__PURE__ */ jsx25("span", { children: getNestedValue4(item, props.dataTextFieldName) })
1478
1478
  }
1479
1479
  ) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ jsx25("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
1480
1480
  }
@@ -2166,6 +2166,12 @@ import { Fragment as Fragment2, jsx as jsx40, jsxs as jsxs23 } from "react/jsx-r
2166
2166
  var LinkNodeButton = dynamic4(() => import("./LinkNodeButton-WDDPNYWI.mjs"), {
2167
2167
  ssr: false
2168
2168
  });
2169
+ function getNestedValue2(obj, path) {
2170
+ if (!obj || !path) return void 0;
2171
+ return path.split(".").reduce((current, key) => {
2172
+ return current && current[key] !== void 0 ? current[key] : void 0;
2173
+ }, obj);
2174
+ }
2169
2175
  var LinkNode = (props) => {
2170
2176
  const NodeTypes2 = {
2171
2177
  text: TextNode_default,
@@ -2174,7 +2180,7 @@ var LinkNode = (props) => {
2174
2180
  const { node, dataitem } = props;
2175
2181
  let linkUrl = node.url;
2176
2182
  if (node.datafield_link_url && dataitem) {
2177
- const dynamicUrl = dataitem[node.datafield_link_url];
2183
+ const dynamicUrl = getNestedValue2(dataitem, node.datafield_link_url);
2178
2184
  if (dynamicUrl && typeof dynamicUrl === "string") {
2179
2185
  linkUrl = dynamicUrl;
2180
2186
  }
@@ -3869,7 +3875,7 @@ function convertKeysToCamelCase(obj) {
3869
3875
  ])
3870
3876
  );
3871
3877
  }
3872
- var getNestedValue2 = (obj, path) => {
3878
+ var getNestedValue3 = (obj, path) => {
3873
3879
  if (!obj || !path) return void 0;
3874
3880
  return path.split(".").reduce((current, key) => {
3875
3881
  {
@@ -4035,7 +4041,7 @@ var DivContainer = async (props) => {
4035
4041
  }
4036
4042
  const shouldHideContainer = () => {
4037
4043
  if (!props.node.fieldVisibleOnTrue) return false;
4038
- const fieldValue = getNestedValue2(props.dataitem, props.node.fieldVisibleOnTrue);
4044
+ const fieldValue = getNestedValue3(props.dataitem, props.node.fieldVisibleOnTrue);
4039
4045
  return fieldValue !== void 0 && fieldValue === false;
4040
4046
  };
4041
4047
  const isHidden = shouldHideContainer();
@@ -4065,7 +4071,7 @@ var DivContainer = async (props) => {
4065
4071
  return /* @__PURE__ */ jsx59(NoDataFound_default, {});
4066
4072
  }
4067
4073
  if (dataBindingProperties.childCollectionName && props.dataitem) {
4068
- childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
4074
+ childCollectionData = getNestedValue3(props.dataitem, dataBindingProperties.childCollectionName);
4069
4075
  }
4070
4076
  }
4071
4077
  const cssResult = generateCssString(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acoustte-digital-services/digitalstore-controls-dev",
3
- "version": "0.8.1-dev.20260605123150",
3
+ "version": "0.8.1-dev.20260606042833",
4
4
  "description": "Reusable React components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -22,7 +22,7 @@
22
22
  }
23
23
  },
24
24
  "devDependencies": {
25
- "@types/node": "^25.9.1",
25
+ "@types/node": "^25.9.2",
26
26
  "@types/react": "^19",
27
27
  "@types/react-dom": "^19",
28
28
  "tsup": "^8.5.1",