@kosdev-code/kos-ui-sdk 3.0.6 → 3.0.7

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
@@ -3006,7 +3006,7 @@ const RegistrationManager = {
3006
3006
  }
3007
3007
  if (KosCore.getInstance().isReady) {
3008
3008
  if (!KosCore.getInstance().modelManager.registry.models[register.type]) {
3009
- console.info(
3009
+ KosLog.info(
3010
3010
  `Model with type ${register.type} doesn't exist. Adding new registration`
3011
3011
  );
3012
3012
  KosCore.getInstance().modelManager.registry.models[register.type] = register.registration[register.type];
@@ -16877,7 +16877,7 @@ let KosExpressionEvaluatorModelImpl = class {
16877
16877
  // Use ObservableData for results to handle dynamic properties properly
16878
16878
  _results;
16879
16879
  _contextRevision = 0;
16880
- constructor(modelId, _options, context) {
16880
+ constructor(modelId, options, context) {
16881
16881
  this.id = modelId;
16882
16882
  this.logger = context.logger;
16883
16883
  this._data = ObservableData();
@@ -16891,6 +16891,15 @@ let KosExpressionEvaluatorModelImpl = class {
16891
16891
  if (typeof value === "object") return Object.keys(value).length === 0;
16892
16892
  return false;
16893
16893
  };
16894
+ for (const [name, fn] of Object.entries(options?.customFunctions ?? {})) {
16895
+ if (name in this.parser.functions) {
16896
+ this.logger.warn(
16897
+ `customFunctions.${name} ignored: a built-in with that name exists`
16898
+ );
16899
+ continue;
16900
+ }
16901
+ this.parser.functions[name] = fn;
16902
+ }
16894
16903
  }
16895
16904
  /**
16896
16905
  * Get the current context data that expressions are evaluated against.
@@ -21546,7 +21555,7 @@ const getKosConnectionId = () => {
21546
21555
  const params2 = getQueryParams();
21547
21556
  const connId = params2?.connId;
21548
21557
  const result = connId || window?.kosBridge?.("connId");
21549
- KosLog.info(`getKosConnectionId: ${result}`);
21558
+ KosLog.debug(`getKosConnectionId: ${result}`);
21550
21559
  return result;
21551
21560
  };
21552
21561
  const { URL: URL$4 } = resolveServiceUrl();