@dataloop-ai/components 0.20.82 → 0.20.83

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataloop-ai/components",
3
- "version": "0.20.82",
3
+ "version": "0.20.83",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -848,7 +848,7 @@ export default defineComponent({
848
848
 
849
849
  //#region computed
850
850
  const editorStyle = computed((): SyntaxColorSchema => {
851
- return createColorSchema(colorSchema.value, aliases.value)
851
+ return createColorSchema(colorSchema.value, aliases.value, schema.value)
852
852
  })
853
853
 
854
854
  const defaultIcon = 'icon-dl-stars'
@@ -343,13 +343,25 @@ export function setValueAliases(json: Data, schema: Data) {
343
343
 
344
344
  export function createColorSchema(
345
345
  colorSchema: ColorSchema,
346
- aliases: Alias[]
346
+ aliases: Alias[],
347
+ schema: Data
347
348
  ): SyntaxColorSchema {
348
349
  const thisFields = []
349
350
  for (const key in aliases) {
350
351
  thisFields.push(aliases[key].alias)
351
352
  }
352
353
 
354
+ const addKeysFromSchema = (schema: Data, parentKey?: string) => {
355
+ for (const key in schema) {
356
+ const fullKey = parentKey ? `${parentKey}.${key}` : key
357
+ thisFields.push(fullKey)
358
+ if (typeof schema[key] === 'object') {
359
+ addKeysFromSchema(schema[key], fullKey)
360
+ }
361
+ }
362
+ }
363
+ addKeysFromSchema(schema)
364
+
353
365
  const thisOperators = []
354
366
  for (const key in operators) {
355
367
  thisOperators.push(operators[key])