@prefecthq/prefect-ui-library 3.11.31 → 3.11.32

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.
@@ -51,6 +51,7 @@ export type SchemaProperty = {
51
51
  multipleOf?: number;
52
52
  pattern?: string;
53
53
  properties?: SchemaProperties;
54
+ additionalProperties?: SchemaProperty | boolean;
54
55
  required?: string[];
55
56
  title?: string;
56
57
  type?: SchemaType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prefecthq/prefect-ui-library",
3
- "version": "3.11.31",
3
+ "version": "3.11.32",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -7,7 +7,11 @@
7
7
  <p-button-group v-model="selected" :options="options" small />
8
8
 
9
9
  <p-label class="schema-form-property-any-of__fields p-background" :description="description">
10
- <template v-if="isObject">
10
+ <template v-if="displayedDefinition.meta && displayedDefinition.meta.component">
11
+ <SchemaFormProperty :property="displayedDefinition" :prop-key="propKey" />
12
+ </template>
13
+
14
+ <template v-else-if="isObject">
11
15
  <p-content>
12
16
  <template v-for="(subProperty, key) in displayedDefinition.properties" :key="key">
13
17
  <SchemaFormProperty :prop-key="`${propKey}.${key}`" :property="subProperty!" />
@@ -280,6 +280,13 @@ function findObjectDefinitionIndex(definitions: Schema[], value: object | null):
280
280
  }, [0, 0])
281
281
 
282
282
  if (keysInCommon === 0) {
283
+ const indexOfDefinitionWithAdditionalProperties = definitions.findIndex(definition => definition.additionalProperties)
284
+
285
+ // Since we were unable to find a definition with a matching set of keys, we'll use the definition with additionalProperties if one exists.
286
+ if (indexOfDefinitionWithAdditionalProperties !== -1) {
287
+ return indexOfDefinitionWithAdditionalProperties
288
+ }
289
+
283
290
  return null
284
291
  }
285
292
 
@@ -69,6 +69,7 @@ export type SchemaProperty = {
69
69
  multipleOf?: number,
70
70
  pattern?: string,
71
71
  properties?: SchemaProperties,
72
+ additionalProperties?: SchemaProperty | boolean,
72
73
  required?: string[],
73
74
  title?: string,
74
75
  type?: SchemaType,