@nocobase/client 2.0.17 → 2.0.19

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.
@@ -8,6 +8,24 @@
8
8
  */
9
9
  import { Schema } from '@formily/react';
10
10
  import React from 'react';
11
+ /**
12
+ * 将 CollectionField 的 uiSchema 映射到默认值弹窗里真正渲染的字段 schema。
13
+ *
14
+ * 默认值弹窗不会直接渲染 CollectionField,而是会把它替换成实际的表单组件。
15
+ * 这里必须把选项字段依赖的 `enum` 也带过去,否则下拉 / 单选 / 多选在弹窗里会没有可选项。
16
+ *
17
+ * @param clonedSchema 当前字段 schema 的克隆副本
18
+ * @param collectionFieldUiSchema 数据表字段上的 uiSchema
19
+ * @example
20
+ * ```typescript
21
+ * const schema = { 'x-component': 'CollectionField' };
22
+ * applyCollectionFieldUiSchemaToDefaultValueSchema(schema, {
23
+ * 'x-component': 'Select',
24
+ * enum: [{ label: 'Option 1', value: 'option1' }],
25
+ * });
26
+ * ```
27
+ */
28
+ export declare const applyCollectionFieldUiSchemaToDefaultValueSchema: (clonedSchema: Record<string, any>, collectionFieldUiSchema: Record<string, any>) => void;
11
29
  export declare const SchemaSettingsDefaultValue: (props: {
12
30
  fieldSchema?: Schema;
13
31
  hideVariableButton?: boolean;