@digitalsee-ai/rcs 2.0.3-alpha → 2.0.3-beta

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.
@@ -303,11 +303,12 @@ export interface DipWorkflowDefinition {
303
303
  * | `DATETIME` | 日期时间 | DatePicker |
304
304
  * | `CODE` | 代码/JSON 文本 | 工作流代码编辑器 |
305
305
  * | `PROXY` | 代理网关 | 工作流代理网关选择器 |
306
+ * | `GLOBAL_VARIABLE_KEY` | 全局变量键 | 工作流全局变量选择器 |
306
307
  * | `OBJECT` | 嵌套对象 | 递归渲染子字段 |
307
308
  * | `ARRAY` / `DYNAMIC_ARRAY` | 数组/列表 | 动态增减表单项 |
308
309
  * | `KEYVALUE` | 键值对列表 | Key-Value 编辑器 |
309
310
  */
310
- export type DipFieldType = 'STRING' | 'TEXTAREA' | 'PASSWORD' | 'HIDDEN' | 'NUMBER' | 'BOOLEAN' | 'SELECT' | 'DATETIME' | 'CODE' | 'PROXY' | 'OBJECT' | 'ARRAY' | 'DYNAMIC_ARRAY' | 'KEYVALUE';
311
+ export type DipFieldType = 'STRING' | 'TEXTAREA' | 'PASSWORD' | 'HIDDEN' | 'NUMBER' | 'BOOLEAN' | 'SELECT' | 'DATETIME' | 'CODE' | 'PROXY' | 'GLOBAL_VARIABLE_KEY' | 'OBJECT' | 'ARRAY' | 'DYNAMIC_ARRAY' | 'KEYVALUE';
311
312
  /**
312
313
  * 数组元素类型
313
314
  *
@@ -0,0 +1,3 @@
1
+ /** 全局变量键的数据源动作名,宿主 optionsLoader 需实现该 action */
2
+ export declare const GLOBAL_VARIABLE_KEY_ACTION = "globalVariables";
3
+ export declare const GlobalVariableKeyField: import('../../types/field-component').FieldComponentDefinition<import('../../types/form-schema').FieldDef>;
@@ -1,5 +1,6 @@
1
1
  export { AutoCompleteField } from './AutoCompleteField';
2
2
  export { ColorPickerField } from './ColorPickerField';
3
+ export { GlobalVariableKeyField, GLOBAL_VARIABLE_KEY_ACTION, } from './GlobalVariableKeyField';
3
4
  export { MentionsField } from './MentionsField';
4
5
  export { RateField } from './RateField';
5
6
  export { SliderField } from './SliderField';
@@ -63,6 +63,7 @@ export declare enum DynamicFormField {
63
63
  JSON = "JSON",// JSON 编辑器
64
64
  CODE = "CODE",// 工作流代码/JSON 编辑器(由宿主作用域注册)
65
65
  PROXY = "PROXY",// 工作流代理网关选择器(由宿主作用域注册)
66
+ GLOBAL_VARIABLE_KEY = "GLOBAL_VARIABLE_KEY",// 全局变量键选择器(选项由宿主 optionsLoader 提供)
66
67
  DIVIDER = "DIVIDER",// 分割线
67
68
  INFO_CARD = "INFO_CARD",// 展示卡片
68
69
  ARRAY = "ARRAY",// 简单数组
@@ -244,6 +245,12 @@ export type InfoCardField = BaseField & {
244
245
  closable?: boolean;
245
246
  showIcon?: boolean;
246
247
  };
248
+ /** 全局变量键字段定义 */
249
+ export type GlobalVariableKeyField = BaseField & {
250
+ type: DynamicFormField.GLOBAL_VARIABLE_KEY;
251
+ /** 静态兜底选项(宿主未提供 optionsLoader 时使用) */
252
+ options?: Option[];
253
+ };
247
254
  /** 数组字段定义 */
248
255
  export type ArrayField = BaseField & {
249
256
  type: DynamicFormField.ARRAY;
@@ -296,7 +303,7 @@ export type ArrayObjectField = BaseField & {
296
303
  }) => Record<string, unknown>;
297
304
  };
298
305
  /** 字段定义联合类型 */
299
- export type FieldDef = BaseField | TextareaField | SelectField | RadioField | CheckboxGroupField | DateField | DateRangeField | TimeField | TimeRangeField | NumberField | UploadField | SliderField | RateField | CascaderField | TreeSelectField | AutoCompleteField | SwitchField | InfoCardField | ArrayField | ObjectField | KeyValueField | ArrayObjectField;
306
+ export type FieldDef = BaseField | TextareaField | SelectField | RadioField | CheckboxGroupField | DateField | DateRangeField | TimeField | TimeRangeField | NumberField | UploadField | SliderField | RateField | CascaderField | TreeSelectField | AutoCompleteField | SwitchField | InfoCardField | GlobalVariableKeyField | ArrayField | ObjectField | KeyValueField | ArrayObjectField;
300
307
  /** 表单 Schema */
301
308
  export type FormSchema = {
302
309
  fields: FieldDef[];