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

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
@@ -768,10 +768,12 @@ const la = ca, Au = () => la.profiles || [], ko = (e) => Au().includes(e), Tw =
768
768
  }, Lu = () => window.kosMessageLogging || process.env.KOS_MESSAGE_LOGGING === "true", Fu = () => window.kosMessageStudioLogging || process.env.KOS_MESSAGE_STUDIO_LOGGING === "true", ua = "ws-log", Nu = S.methodFactory, da = Lu(), Uu = Fu();
769
769
  S.methodFactory = function(e, t, s) {
770
770
  const r = Nu(e, t, s);
771
- return function(n, o) {
771
+ return function(...n) {
772
772
  var c;
773
- const i = s ? String(s) : "", a = i ? `[${String(i).substring(i.lastIndexOf(":") + 1)}] | ` : "[root] | ";
774
- r(`${a}${n}`, o || ""), (c = globalThis == null ? void 0 : globalThis.kosConfig) != null && c.logging && globalThis.kosLog && (s !== ua || da && Uu) && globalThis.kosLog(`UI: ${a}${n}`);
773
+ const o = s ? String(s) : "", i = o ? `[${String(o).substring(o.lastIndexOf(":") + 1)}] | ` : "[root] | ", a = n.map(
774
+ (u) => typeof u == "object" ? JSON.stringify(u) : String(u)
775
+ ).join(" ");
776
+ r(`${i}${a}`), (c = globalThis == null ? void 0 : globalThis.kosConfig) != null && c.logging && globalThis.kosLog && (s !== ua || da && Uu) && globalThis.kosLog(`UI: ${i}${a}`);
775
777
  };
776
778
  };
777
779
  let ha = ku();
@@ -1861,19 +1863,25 @@ const cn = g.createLogger({ name: "resolve-parameters" }), $t = ({
1861
1863
  else if (typeof r == "string") {
1862
1864
  const n = new RegExp("{PROP_(.+?)}", "g");
1863
1865
  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;
1866
+ if (s) {
1867
+ let i = !1;
1868
+ const a = /^{PROP_.+?}$/.test(o);
1869
+ if (o = o.replace(n, (c, u) => {
1870
+ if (Object.getOwnPropertyNames(s).includes(u) || Object.getOwnPropertyNames(Object.getPrototypeOf(s)).includes(
1871
+ u
1872
+ )) {
1873
+ const h = s[u];
1874
+ return h ? (cn.debug(`Resolved ${c} to ${h}`), h) : (cn[a ? "debug" : "warn"](
1875
+ `Property ${u} is falsy${a ? "" : " in composite string"}, marking for undefined return`
1876
+ ), i = !0, c);
1877
+ }
1878
+ return cn[a ? "debug" : "warn"](
1879
+ `Property ${u} not found in modelData${a ? "" : " for composite string"}`
1880
+ ), c;
1881
+ }), i)
1882
+ return;
1883
+ }
1884
+ return o;
1877
1885
  } else
1878
1886
  return r;
1879
1887
  return r;