@smartspace/chat-ui 1.14.4-dev.3850792 → 1.14.4-dev.3cc43b1

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
@@ -3474,9 +3474,11 @@ function buildSimpleSchemaAndUi(vars, threadVars, useDefaults) {
3474
3474
  const properties2 = {};
3475
3475
  const controls = [];
3476
3476
  const initialData = {};
3477
+ const $defs = {};
3477
3478
  for (const name of names) {
3478
3479
  const cfg = vars?.[name] || {};
3479
- const s2 = cfg.schema || {};
3480
+ const { $defs: varDefs, ...s2 } = cfg.schema || {};
3481
+ if (varDefs) Object.assign($defs, varDefs);
3480
3482
  properties2[name] = s2;
3481
3483
  const hasServerKey = threadVars !== void 0 && Object.prototype.hasOwnProperty.call(threadVars, name);
3482
3484
  const val = hasServerKey ? threadVars?.[name] : useDefaults ? s2.default : void 0;
@@ -3492,6 +3494,7 @@ function buildSimpleSchemaAndUi(vars, threadVars, useDefaults) {
3492
3494
  controls.push(control);
3493
3495
  }
3494
3496
  const schema = { type: "object", properties: properties2 };
3497
+ if (Object.keys($defs).length > 0) schema.$defs = $defs;
3495
3498
  const innerRow = {
3496
3499
  type: "HorizontalLayout",
3497
3500
  elements: controls,