@kosdev-code/kos-ui-sdk 2.1.14 → 2.1.15

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/index.js CHANGED
@@ -1861,19 +1861,25 @@ const cn = g.createLogger({ name: "resolve-parameters" }), $t = ({
1861
1861
  else if (typeof r == "string") {
1862
1862
  const n = new RegExp("{PROP_(.+?)}", "g");
1863
1863
  let o = r != null && r.includes(wn) ? r.replace(wn, t) : r;
1864
- return s && (o = o.replace(n, (i, a) => {
1865
- if (Object.getOwnPropertyNames(s).includes(a) || Object.getOwnPropertyNames(Object.getPrototypeOf(s)).includes(
1866
- a
1867
- )) {
1868
- const c = s[a];
1869
- return c !== void 0 ? (cn.debug(`Resolved ${i} to ${c}`), c) : (cn.warn(
1870
- `Property ${a} is undefined, keeping placeholder ${i}`
1871
- ), i);
1872
- }
1873
- return cn.warn(
1874
- `Property ${a} not found in modelData, keeping placeholder ${i}`
1875
- ), i;
1876
- })), o;
1864
+ if (s) {
1865
+ let i = !1;
1866
+ const a = /^{PROP_.+?}$/.test(o);
1867
+ if (o = o.replace(n, (c, u) => {
1868
+ if (Object.getOwnPropertyNames(s).includes(u) || Object.getOwnPropertyNames(Object.getPrototypeOf(s)).includes(
1869
+ u
1870
+ )) {
1871
+ const h = s[u];
1872
+ return h ? (cn.debug(`Resolved ${c} to ${h}`), h) : (cn[a ? "debug" : "warn"](
1873
+ `Property ${u} is falsy${a ? "" : " in composite string"}, marking for undefined return`
1874
+ ), i = !0, c);
1875
+ }
1876
+ return cn[a ? "debug" : "warn"](
1877
+ `Property ${u} not found in modelData${a ? "" : " for composite string"}`
1878
+ ), c;
1879
+ }), i)
1880
+ return;
1881
+ }
1882
+ return o;
1877
1883
  } else
1878
1884
  return r;
1879
1885
  return r;