@tiny-codes/react-easy 1.1.1 → 1.1.3

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.
Files changed (129) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/es/components/BreakLines/index.d.ts +13 -19
  3. package/es/components/BreakLines/index.js +2 -3
  4. package/es/components/BreakLines/index.js.map +1 -1
  5. package/es/components/ConfigProvider/context.d.ts +20 -26
  6. package/es/components/ConfigProvider/context.js.map +1 -1
  7. package/es/components/ConfigProvider/index.d.ts +5 -7
  8. package/es/components/ConfigProvider/index.js +2 -3
  9. package/es/components/ConfigProvider/index.js.map +1 -1
  10. package/es/components/ConfirmAction/index.d.ts +58 -89
  11. package/es/components/ConfirmAction/index.js +12 -18
  12. package/es/components/ConfirmAction/index.js.map +1 -1
  13. package/es/components/DeleteConfirmAction/index.d.ts +2 -3
  14. package/es/components/DeleteConfirmAction/index.js +8 -12
  15. package/es/components/DeleteConfirmAction/index.js.map +1 -1
  16. package/es/components/EditableText/form.d.ts +144 -0
  17. package/es/components/EditableText/form.js +309 -0
  18. package/es/components/EditableText/form.js.map +1 -0
  19. package/es/components/EditableText/index.d.ts +138 -0
  20. package/es/components/EditableText/index.js +216 -0
  21. package/es/components/EditableText/index.js.map +1 -0
  22. package/es/components/EditableText/style/index.d.ts +3 -0
  23. package/es/components/EditableText/style/index.js +76 -0
  24. package/es/components/EditableText/style/index.js.map +1 -0
  25. package/es/components/FloatDrawer/index.d.ts +89 -86
  26. package/es/components/FloatDrawer/index.js +43 -20
  27. package/es/components/FloatDrawer/index.js.map +1 -1
  28. package/es/components/FloatDrawer/style/index.js +42 -23
  29. package/es/components/FloatDrawer/style/index.js.map +1 -1
  30. package/es/components/Loading/index.d.ts +66 -0
  31. package/es/components/Loading/index.js +97 -0
  32. package/es/components/Loading/index.js.map +1 -0
  33. package/es/components/Loading/style/index.d.ts +3 -0
  34. package/es/components/Loading/style/index.js +27 -0
  35. package/es/components/Loading/style/index.js.map +1 -0
  36. package/es/components/ModalAction/index.d.ts +98 -139
  37. package/es/components/ModalAction/index.js +25 -37
  38. package/es/components/ModalAction/index.js.map +1 -1
  39. package/es/components/OverflowTags/index.d.ts +30 -8
  40. package/es/components/OverflowTags/index.js +26 -7
  41. package/es/components/OverflowTags/index.js.map +1 -1
  42. package/es/components/OverflowTags/style/index.js +1 -3
  43. package/es/components/OverflowTags/style/index.js.map +1 -1
  44. package/es/components/index.d.ts +4 -0
  45. package/es/components/index.js +2 -0
  46. package/es/components/index.js.map +1 -1
  47. package/es/hooks/useRefFunction.d.ts +4 -5
  48. package/es/hooks/useRefFunction.js +6 -7
  49. package/es/hooks/useRefFunction.js.map +1 -1
  50. package/es/hooks/useRefValue.d.ts +2 -3
  51. package/es/hooks/useRefValue.js +2 -3
  52. package/es/hooks/useRefValue.js.map +1 -1
  53. package/es/hooks/useT.js +1 -2
  54. package/es/hooks/useT.js.map +1 -1
  55. package/es/hooks/useValidator.d.ts +2 -3
  56. package/es/hooks/useValidator.js +2 -3
  57. package/es/hooks/useValidator.js.map +1 -1
  58. package/es/hooks/useValidatorBuilder.d.ts +41 -61
  59. package/es/hooks/useValidatorBuilder.js +4 -6
  60. package/es/hooks/useValidatorBuilder.js.map +1 -1
  61. package/es/hooks/useValidators.d.ts +62 -83
  62. package/es/hooks/useValidators.js +3 -4
  63. package/es/hooks/useValidators.js.map +1 -1
  64. package/es/locales/index.d.ts +15 -0
  65. package/es/locales/langs/en-US.d.ts +5 -0
  66. package/es/locales/langs/en-US.js +5 -0
  67. package/es/locales/langs/en-US.js.map +1 -1
  68. package/es/locales/langs/zh-CN.d.ts +5 -0
  69. package/es/locales/langs/zh-CN.js +5 -0
  70. package/es/locales/langs/zh-CN.js.map +1 -1
  71. package/lib/components/BreakLines/index.d.ts +13 -19
  72. package/lib/components/BreakLines/index.js.map +2 -2
  73. package/lib/components/ConfigProvider/context.d.ts +20 -26
  74. package/lib/components/ConfigProvider/context.js.map +2 -2
  75. package/lib/components/ConfigProvider/index.d.ts +5 -7
  76. package/lib/components/ConfigProvider/index.js.map +2 -2
  77. package/lib/components/ConfirmAction/index.d.ts +58 -89
  78. package/lib/components/ConfirmAction/index.js.map +2 -2
  79. package/lib/components/DeleteConfirmAction/index.d.ts +2 -3
  80. package/lib/components/DeleteConfirmAction/index.js.map +2 -2
  81. package/lib/components/EditableText/form.d.ts +144 -0
  82. package/lib/components/EditableText/form.js +223 -0
  83. package/lib/components/EditableText/form.js.map +7 -0
  84. package/lib/components/EditableText/index.d.ts +138 -0
  85. package/lib/components/EditableText/index.js +174 -0
  86. package/lib/components/EditableText/index.js.map +7 -0
  87. package/lib/components/EditableText/style/index.d.ts +3 -0
  88. package/lib/components/EditableText/style/index.js +118 -0
  89. package/lib/components/EditableText/style/index.js.map +7 -0
  90. package/lib/components/FloatDrawer/index.d.ts +89 -86
  91. package/lib/components/FloatDrawer/index.js +64 -39
  92. package/lib/components/FloatDrawer/index.js.map +2 -2
  93. package/lib/components/FloatDrawer/style/index.js +60 -23
  94. package/lib/components/FloatDrawer/style/index.js.map +2 -2
  95. package/lib/components/Loading/index.d.ts +66 -0
  96. package/lib/components/Loading/index.js +81 -0
  97. package/lib/components/Loading/index.js.map +7 -0
  98. package/lib/components/Loading/style/index.d.ts +3 -0
  99. package/lib/components/Loading/style/index.js +50 -0
  100. package/lib/components/Loading/style/index.js.map +7 -0
  101. package/lib/components/ModalAction/index.d.ts +98 -139
  102. package/lib/components/ModalAction/index.js.map +2 -2
  103. package/lib/components/OverflowTags/index.d.ts +30 -8
  104. package/lib/components/OverflowTags/index.js +7 -5
  105. package/lib/components/OverflowTags/index.js.map +2 -2
  106. package/lib/components/OverflowTags/style/index.js +1 -1
  107. package/lib/components/OverflowTags/style/index.js.map +2 -2
  108. package/lib/components/index.d.ts +4 -0
  109. package/lib/components/index.js +6 -0
  110. package/lib/components/index.js.map +2 -2
  111. package/lib/hooks/useRefFunction.d.ts +4 -5
  112. package/lib/hooks/useRefFunction.js.map +2 -2
  113. package/lib/hooks/useRefValue.d.ts +2 -3
  114. package/lib/hooks/useRefValue.js.map +2 -2
  115. package/lib/hooks/useT.js.map +2 -2
  116. package/lib/hooks/useValidator.d.ts +2 -3
  117. package/lib/hooks/useValidator.js.map +2 -2
  118. package/lib/hooks/useValidatorBuilder.d.ts +41 -61
  119. package/lib/hooks/useValidatorBuilder.js.map +2 -2
  120. package/lib/hooks/useValidators.d.ts +62 -83
  121. package/lib/hooks/useValidators.js.map +2 -2
  122. package/lib/locales/index.d.ts +15 -0
  123. package/lib/locales/langs/en-US.d.ts +5 -0
  124. package/lib/locales/langs/en-US.js +5 -0
  125. package/lib/locales/langs/en-US.js.map +2 -2
  126. package/lib/locales/langs/zh-CN.d.ts +5 -0
  127. package/lib/locales/langs/zh-CN.js +5 -0
  128. package/lib/locales/langs/zh-CN.js.map +2 -2
  129. package/package.json +1 -1
@@ -2,123 +2,107 @@ import type { ComponentType, FC, ForwardedRef, ReactElement, ReactNode, RefAttri
2
2
  import type { ButtonProps, FormInstance, ModalProps, SwitchProps } from 'antd';
3
3
  import type { LinkProps } from 'antd/es/typography/Link';
4
4
  /**
5
- * **EN:** Symbol for not closing the dialog when submitting the form, which takes effect when
6
- * returning in the `onSave` event of the editing form component
7
- *
8
- * **CN:** 提交表单时不关闭弹框的Symbol,在编辑表单组件的`onSave`事件中返回时生效
5
+ * - **EN:** Symbol for not closing the dialog when submitting the form, which takes effect when
6
+ * returning in the `onSave` event of the editing form component
7
+ * - **CN:** 提交表单时不关闭弹框的Symbol,在编辑表单组件的`onSave`事件中返回时生效
9
8
  */
10
9
  export declare const SubmitWithoutClosingSymbol: unique symbol;
11
10
  export type ModalActionProps<FD extends object, CP extends FormCompPropsConstraint<FD>, TP extends object, E extends keyof TP, CRef extends object> = Omit<ModalProps, 'onOk'> & ModalActionTrigger<FD, CP, TP, E> & {
12
11
  /**
13
- * **EN:** Form editing component, do not use the Form component inside the component, the form
14
- * component and form instance are automatically created by the parent component
15
- *
16
- * **CN:** 表单编辑组件,组件内部不要使用Form组件,表单组件及表单实例由父组件自动创建
12
+ * - **EN:** Form editing component, do not use the Form component inside the component, the form
13
+ * component and form instance are automatically created by the parent component
14
+ * - **CN:** 表单编辑组件,组件内部不要使用Form组件,表单组件及表单实例由父组件自动创建
17
15
  */
18
16
  formComp: ComponentType<CP & RefAttributes<CRef>>;
19
17
  /**
20
- * **EN:** Props of the form editing component
21
- *
22
- * **CN:** 表单编辑组件的Props属性
18
+ * - **EN:** Props of the form editing component
19
+ * - **CN:** 表单编辑组件的Props属性
23
20
  */
24
21
  formProps?: Omit<CP, keyof FormCompPropsConstraint<FD>>;
25
22
  /**
26
- * **EN:** The callback when clicks the confirmation button, support asynchronous saving, return
27
- * `SubmitWithoutClosingSymbol` can prevent the dialog from closing, return other values will be
28
- * passed to the `afterOk` event, if any
29
- *
30
- * **CN:** 点击确认按钮的回调,支持异步保存,返回`SubmitWithoutClosingSymbol`可以阻止弹框关闭,返回其他值会传递给`afterOk`事件,如果有的话
23
+ * - **EN:** The callback when clicks the confirmation button, support asynchronous saving, return
24
+ * `SubmitWithoutClosingSymbol` can prevent the dialog from closing, return other values will
25
+ * be passed to the `afterOk` event, if any
26
+ * - **CN:** 点击确认按钮的回调,支持异步保存,返回`SubmitWithoutClosingSymbol`可以阻止弹框关闭,返回其他值会传递给`afterOk`事件,如果有的话
31
27
  */
32
28
  onOk?: (formData: FD, ...args: Parameters<TP[E]>) => unknown | Promise<unknown>;
33
29
  /**
34
- * **EN:** The callback after the confirmation event is completed, it will not be triggered when
35
- * it fails, the parameter is the return value of `onOk`
36
- *
37
- * **CN:** 确认事件完成后的回调,失败时不会触发,参数为`onOk`的返回值
30
+ * - **EN:** The callback after the confirmation event is completed, it will not be triggered when
31
+ * it fails, the parameter is the return value of `onOk`
32
+ * - **CN:** 确认事件完成后的回调,失败时不会触发,参数为`onOk`的返回值
38
33
  */
39
34
  afterOk?: (data?: any) => void;
40
35
  };
41
36
  export interface FormCompPropsConstraint<FD> {
42
37
  /**
43
- * **EN:** Automatically generated form instance, use this form instance in FormComp, do not
44
- * create a new instance
45
- *
46
- * **CN:** 自动生成的表单实例,编辑表单要使用这个表单实例,不要新创建实例
38
+ * - **EN:** Automatically generated form instance, use this form instance in FormComp, do not
39
+ * create a new instance
40
+ * - **CN:** 自动生成的表单实例,编辑表单要使用这个表单实例,不要新创建实例
47
41
  */
48
42
  form: FormInstance<FD>;
49
43
  /**
50
- * **EN:** Register the form save event, the callback function passed in will be called when the
51
- * confirm button is clicked, support asynchronous saving
52
- *
53
- * **CN:** 注册表单保存事件,传入的回调函数会在点击确认按钮时被调用,支持异步保存
44
+ * - **EN:** Register the form save event, the callback function passed in will be called when the
45
+ * confirm button is clicked, support asynchronous saving
46
+ * - **CN:** 注册表单保存事件,传入的回调函数会在点击确认按钮时被调用,支持异步保存
54
47
  *
55
48
  * @param handler Event handler | 事件处理函数
56
49
  */
57
50
  onSave: (handler: (
58
51
  /**
59
- * **EN:** Form data
60
- *
61
- * **CN:** 表单数据
52
+ * - **EN:** Form data
53
+ * - **CN:** 表单数据
62
54
  */
63
55
  formData: FD,
64
56
  /**
65
- * **EN:** Trigger click event data, for example, for the `Switch` type trigger, you can get
66
- * the value of the switch; for the `Button` type trigger, you can get the click event object
67
- * of the button
68
- *
69
- * **CN:** 触发器点击的事件数据,例如,对于`Switch`类型的触发器,可以获取点击开关的值;对于`Button`类型的触发器,可以获取按钮的点击事件对象
57
+ * - **EN:** Trigger click event data, for example, for the `Switch` type trigger, you can get
58
+ * the value of the switch; for the `Button` type trigger, you can get the click event
59
+ * object of the button
60
+ * - **CN:** 触发器点击的事件数据,例如,对于`Switch`类型的触发器,可以获取点击开关的值;对于`Button`类型的触发器,可以获取按钮的点击事件对象
70
61
  */
71
62
  ...triggerEventData: any[]) => unknown | Promise<unknown>) => void;
72
63
  /**
73
- * **EN:** Listen to the open and close status of the dialog. When `destroyOnHidden` is set to
74
- * false, the form component instance is cached, and the dialog can only be listened to in this
75
- * way
76
- *
77
- * **CN:** 监听弹框打开关闭状态。当`destroyOnHidden`设置为false时,表单组件实例被缓存,只能通过这种方式监听弹框
64
+ * - **EN:** Listen to the open and close status of the dialog. When `destroyOnHidden` is set to
65
+ * false, the form component instance is cached, and the dialog can only be listened to in this
66
+ * way
67
+ * - **CN:** 监听弹框打开关闭状态。当`destroyOnHidden`设置为false时,表单组件实例被缓存,只能通过这种方式监听弹框
78
68
  *
79
69
  * @param handler Event handler | 事件处理函数
80
70
  */
81
71
  onOpenChange: (handler: ModalProps['afterOpenChange']) => void;
82
72
  /**
83
- * **EN:** Set the dialog open status
84
- *
85
- * **CN:** 设置弹框打开状态
73
+ * - **EN:** Set the dialog open status
74
+ * - **CN:** 设置弹框打开状态
86
75
  *
87
76
  * @param open Whether is open or not | 弹窗是否打开
88
77
  */
89
78
  setOpen: (open: boolean) => void;
90
79
  /**
91
- * **EN:** Modify the properties of the dialog, such as title, width, button properties, etc.
92
- *
93
- * **CN:** 修改弹窗的属性,例如标题、宽度,按钮属性等
80
+ * - **EN:** Modify the properties of the dialog, such as title, width, button properties, etc.
81
+ * - **CN:** 修改弹窗的属性,例如标题、宽度,按钮属性等
94
82
  */
95
83
  updateModalProps: (props: Partial<ModalProps>) => void;
96
84
  /**
97
- * **EN:** Trigger click event data, for example, for the `Switch` type trigger, you can get the
98
- * value of the switch; for the `Button` type trigger, you can get the click event object of the
99
- * button
100
- *
101
- * **CN:** 触发器点击的事件数据,例如,对于`Switch`类型的触发器,可以获取点击开关的值,对于`Button`类型的触发器,可以获取按钮的点击事件对象
85
+ * - **EN:** Trigger click event data, for example, for the `Switch` type trigger, you can get the
86
+ * value of the switch; for the `Button` type trigger, you can get the click event object of the
87
+ * button
88
+ * - **CN:** 触发器点击的事件数据,例如,对于`Switch`类型的触发器,可以获取点击开关的值,对于`Button`类型的触发器,可以获取按钮的点击事件对象
102
89
  */
103
90
  triggerEventData?: any[];
104
91
  }
105
92
  export interface ModalActionTrigger<FD extends object, CP extends FormCompPropsConstraint<FD>, TP extends object, E extends keyof TP> {
106
93
  /**
107
- * **EN:** Trigger component, click to show the dialog
108
- *
109
- * **CN:** 弹窗触发器组件,点击触发显示弹框
94
+ * - **EN:** Trigger component, click to show the dialog
95
+ * - **CN:** 弹窗触发器组件,点击触发显示弹框
110
96
  */
111
97
  triggerComponent?: ComponentType<TP> | FC<TP>;
112
98
  /**
113
- * **EN:** Props of the trigger component
114
- *
115
- * **CN:** 触发器组件的Props属性
99
+ * - **EN:** Props of the trigger component
100
+ * - **CN:** 触发器组件的Props属性
116
101
  */
117
102
  triggerProps?: TP & {
118
103
  /**
119
- * **EN:** Set a custom function to determine whether to show the trigger button
120
- *
121
- * **CN:** 设置一个自定义函数,用于判断是否显示触发器按钮
104
+ * - **EN:** Set a custom function to determine whether to show the trigger button
105
+ * - **CN:** 设置一个自定义函数,用于判断是否显示触发器按钮
122
106
  *
123
107
  * @default true
124
108
  *
@@ -127,168 +111,143 @@ export interface ModalActionTrigger<FD extends object, CP extends FormCompPropsC
127
111
  show?: boolean | ((formProps?: Omit<CP, keyof FormCompPropsConstraint<FD>>) => boolean);
128
112
  };
129
113
  /**
130
- * **EN:** The event name that triggers the dialog
131
- *
132
- * **CN:** 触发弹窗的事件名称
133
- *
114
+ * - **EN:** The event name that triggers the dialog
115
+ * - **CN:** 触发弹窗的事件名称
134
116
  * - `Button`: 'onClick'
135
117
  * - `Switch`: 'onChange'
136
118
  * - `Link`: 'onClick'
137
119
  */
138
120
  triggerEvent?: E;
139
121
  /**
140
- * **EN:** Custom trigger content
141
- *
142
- * **CN:** 自定义触发器内容
122
+ * - **EN:** Custom trigger content
123
+ * - **CN:** 自定义触发器内容
143
124
  */
144
125
  children?: ReactNode;
145
126
  }
146
127
  export type ModalActionRef<R> = R & {
147
128
  /**
148
- * **EN:** Show the dialog
149
- *
150
- * **CN:** 显示弹框
129
+ * - **EN:** Show the dialog
130
+ * - **CN:** 显示弹框
151
131
  */
152
132
  show: () => void;
153
133
  };
154
134
  export declare const genModalActionRenderer: (defaultProps: Partial<ModalActionProps<any, any, any, never, never>>) => <FD extends object, CP extends FormCompPropsConstraint<FD>, TP extends object, E extends keyof TP, CRef extends object>(props: ModalActionProps<FD, CP, TP, E, CRef>, ref: ForwardedRef<ModalActionRef<CRef>>) => import("react/jsx-runtime").JSX.Element;
155
135
  /**
156
- * **EN:** Add default properties to the ModalAction component
157
- *
158
- * **CN:** 给ModalAction组件添加默认属性
136
+ * - **EN:** Add default properties to the ModalAction component
137
+ * - **CN:** 给ModalAction组件添加默认属性
159
138
  *
160
139
  * @param WrappedComponent ModalAction component | ModalAction组件
161
140
  * @param defaultProps Default properties | 默认属性
162
141
  */
163
142
  export declare const withDefaultModalActionProps: <FD extends object, CP extends FormCompPropsConstraint<FD>, TP extends object, E extends keyof TP, CRef extends object>(WrappedComponent: ComponentType<ModalActionProps<FD, CP, TP, E, CRef> & RefAttributes<ModalActionRef<CRef>>>, defaultProps?: Partial<ModalActionProps<FD, CP, TP, E, CRef>> | (() => Partial<ModalActionProps<FD, CP, TP, E, CRef>>)) => import("react").ForwardRefExoticComponent<Omit<ModalProps, "onOk"> & ModalActionTrigger<FD, CP, TP, E> & {
164
143
  /**
165
- * **EN:** Form editing component, do not use the Form component inside the component, the form
166
- * component and form instance are automatically created by the parent component
167
- *
168
- * **CN:** 表单编辑组件,组件内部不要使用Form组件,表单组件及表单实例由父组件自动创建
144
+ * - **EN:** Form editing component, do not use the Form component inside the component, the form
145
+ * component and form instance are automatically created by the parent component
146
+ * - **CN:** 表单编辑组件,组件内部不要使用Form组件,表单组件及表单实例由父组件自动创建
169
147
  */
170
148
  formComp: ComponentType<CP & RefAttributes<CRef>>;
171
149
  /**
172
- * **EN:** Props of the form editing component
173
- *
174
- * **CN:** 表单编辑组件的Props属性
150
+ * - **EN:** Props of the form editing component
151
+ * - **CN:** 表单编辑组件的Props属性
175
152
  */
176
153
  formProps?: Omit<CP, keyof FormCompPropsConstraint<FD_1>> | undefined;
177
154
  /**
178
- * **EN:** The callback when clicks the confirmation button, support asynchronous saving, return
179
- * `SubmitWithoutClosingSymbol` can prevent the dialog from closing, return other values will be
180
- * passed to the `afterOk` event, if any
181
- *
182
- * **CN:** 点击确认按钮的回调,支持异步保存,返回`SubmitWithoutClosingSymbol`可以阻止弹框关闭,返回其他值会传递给`afterOk`事件,如果有的话
155
+ * - **EN:** The callback when clicks the confirmation button, support asynchronous saving, return
156
+ * `SubmitWithoutClosingSymbol` can prevent the dialog from closing, return other values will
157
+ * be passed to the `afterOk` event, if any
158
+ * - **CN:** 点击确认按钮的回调,支持异步保存,返回`SubmitWithoutClosingSymbol`可以阻止弹框关闭,返回其他值会传递给`afterOk`事件,如果有的话
183
159
  */
184
160
  onOk?: ((formData: FD, ...args: Parameters<TP[E]>) => unknown | Promise<unknown>) | undefined;
185
161
  /**
186
- * **EN:** The callback after the confirmation event is completed, it will not be triggered when
187
- * it fails, the parameter is the return value of `onOk`
188
- *
189
- * **CN:** 确认事件完成后的回调,失败时不会触发,参数为`onOk`的返回值
162
+ * - **EN:** The callback after the confirmation event is completed, it will not be triggered when
163
+ * it fails, the parameter is the return value of `onOk`
164
+ * - **CN:** 确认事件完成后的回调,失败时不会触发,参数为`onOk`的返回值
190
165
  */
191
166
  afterOk?: ((data?: any) => void) | undefined;
192
167
  } & RefAttributes<ModalActionRef<CRef>>>;
193
168
  /**
194
- * **EN:** ModalAction component type
195
- *
196
- * **CN:** ModalAction组件的类型
169
+ * - **EN:** ModalAction component type
170
+ * - **CN:** ModalAction组件的类型
197
171
  */
198
172
  export type ModalActionInterface<FD extends object, CP extends FormCompPropsConstraint<FD>, TP extends object, E extends keyof TP, CRef extends object> = ComponentType<ModalActionProps<FD, CP, TP, E, CRef> & RefAttributes<ModalActionRef<CRef>>>;
199
173
  /**
200
- * **EN:** ModalAction component with generic type
201
- *
202
- * **CN:** ModalAction泛型组件的类型
174
+ * - **EN:** ModalAction component with generic type
175
+ * - **CN:** ModalAction泛型组件的类型
203
176
  */
204
177
  export type GenericModalActionInterface = <FD extends object, CP extends FormCompPropsConstraint<FD>, TP extends object, E extends keyof TP, CRef extends object>(props: ModalActionProps<FD, CP, TP, E, CRef> & RefAttributes<ModalActionRef<CRef>>) => ReactElement;
205
178
  /**
206
- * **EN:** ModalAction with specified trigger type (specified form component)
207
- *
208
- * **CN:** 已指定Trigger类型的ModalAction(并且已指定表单组件)
179
+ * - **EN:** ModalAction with specified trigger type (specified form component)
180
+ * - **CN:** 已指定Trigger类型的ModalAction(并且已指定表单组件)
209
181
  */
210
182
  type ModalActionWithTrigger<FD extends object, CP extends FormCompPropsConstraint<FD>, TP extends object, E extends keyof TP, CRef extends object, OMIT extends string = never> = ComponentType<Omit<ModalActionProps<FD, CP, TP, E, CRef>, 'triggerComponent' | 'triggerEvent' | OMIT> & RefAttributes<ModalActionRef<CRef>>>;
211
183
  /**
212
- * **EN:** ModalAction with specified trigger type (unspecified form component, keep generic)
213
- *
214
- * **CN:** 已指定Trigger类型的ModalAction(未指定表单组件,保持泛型)
184
+ * - **EN:** ModalAction with specified trigger type (unspecified form component, keep generic)
185
+ * - **CN:** 已指定Trigger类型的ModalAction(未指定表单组件,保持泛型)
215
186
  */
216
187
  type GenericModalActionWithTrigger<TP extends object, E extends keyof TP, OMIT extends string = never> = <FD extends object, CP extends FormCompPropsConstraint<FD>, CRef extends object>(props: Omit<ModalActionProps<FD, CP, TP, E, CRef>, 'triggerComponent' | 'triggerEvent' | OMIT> & RefAttributes<ModalActionRef<CRef>>) => ReactElement;
217
188
  /**
218
- * **EN:** Built-in trigger types (specified form components)
219
- *
220
- * **CN:** 内置的几种触发器类型(已指定表单组件)
189
+ * - **EN:** Built-in trigger types (specified form components)
190
+ * - **CN:** 内置的几种触发器类型(已指定表单组件)
221
191
  */
222
192
  interface TypedTriggers<FD extends object, CP extends FormCompPropsConstraint<FD>, CRef extends object, OMIT extends string = never> {
223
193
  /**
224
- * **EN:** Dialog with button type trigger
225
- *
226
- * **CN:** 按钮类型的弹窗
194
+ * - **EN:** Dialog with button type trigger
195
+ * - **CN:** 按钮类型的弹窗
227
196
  */
228
197
  Button: ModalActionWithTrigger<FD, CP, ButtonProps, 'onClick', CRef, 'triggerComponent' | 'triggerEvent' | OMIT>;
229
198
  /**
230
- * **EN:** Dialog with switch type trigger
231
- *
232
- * **CN:** 开关类型的弹窗
199
+ * - **EN:** Dialog with switch type trigger
200
+ * - **CN:** 开关类型的弹窗
233
201
  */
234
202
  Switch: ModalActionWithTrigger<FD, CP, SwitchProps, 'onChange', CRef, 'triggerComponent' | 'triggerEvent' | OMIT>;
235
203
  /**
236
- * **EN:** Dialog with link type trigger
237
- *
238
- * **CN:** 链接类型的弹窗
204
+ * - **EN:** Dialog with link type trigger
205
+ * - **CN:** 链接类型的弹窗
239
206
  */
240
207
  Link: ModalActionWithTrigger<FD, CP, LinkProps, 'onClick', CRef, 'triggerComponent' | 'triggerEvent' | OMIT>;
241
208
  }
242
209
  /**
243
- * **EN:** Built-in trigger types (generic types, unspecified form components)
244
- *
245
- * **CN:** 内置的几种触发器类型(泛型类型,未指定表单组件)
210
+ * - **EN:** Built-in trigger types (generic types, unspecified form components)
211
+ * - **CN:** 内置的几种触发器类型(泛型类型,未指定表单组件)
246
212
  */
247
213
  interface GenericTypedTriggers<OMIT extends string = never> {
248
214
  /**
249
- * **EN:** Dialog with button type trigger
250
- *
251
- * **CN:** 按钮类型的弹窗
215
+ * - **EN:** Dialog with button type trigger
216
+ * - **CN:** 按钮类型的弹窗
252
217
  */
253
218
  Button: GenericModalActionWithTrigger<ButtonProps, 'onClick', 'triggerComponent' | 'triggerEvent' | OMIT>;
254
219
  /**
255
- * **EN:** Dialog with switch type trigger
256
- *
257
- * **CN:** 开关类型的弹窗
220
+ * - **EN:** Dialog with switch type trigger
221
+ * - **CN:** 开关类型的弹窗
258
222
  */
259
223
  Switch: GenericModalActionWithTrigger<SwitchProps, 'onChange', 'triggerComponent' | 'triggerEvent' | OMIT>;
260
224
  /**
261
- * **EN:** Dialog with link type trigger
262
- *
263
- * **CN:** 链接类型的弹窗
225
+ * - **EN:** Dialog with link type trigger
226
+ * - **CN:** 链接类型的弹窗
264
227
  */
265
228
  Link: GenericModalActionWithTrigger<LinkProps, 'onClick', 'triggerComponent' | 'triggerEvent' | OMIT>;
266
229
  }
267
230
  type WithGenericTriggers<FD extends object, CP extends FormCompPropsConstraint<FD>, CRef extends object, OMIT extends string = never> = (<TP extends object, E extends keyof TP>(props: Omit<ModalActionProps<FD, CP, TP, E, CRef>, OMIT> & RefAttributes<ModalActionRef<CRef>>) => ReactElement) & (CP extends never ? GenericTypedTriggers<OMIT> : TypedTriggers<FD, CP, CRef, OMIT>);
268
231
  /**
269
- * **EN:** Dialog component with trigger
270
- *
271
- * **CN:** 带触发器的弹窗组件
232
+ * - **EN:** Dialog component with trigger
233
+ * - **CN:** 带触发器的弹窗组件
272
234
  */
273
235
  declare const ModalAction: WithGenericTriggers<object, FormCompPropsConstraint<object>, object, never>;
274
236
  /**
275
- * **EN:** Dialog component with trigger
276
- *
277
- * **CN:** 带触发器的弹窗组件
237
+ * - **EN:** Dialog component with trigger
238
+ * - **CN:** 带触发器的弹窗组件
278
239
  */
279
240
  export type ModalActionWithStatic = typeof ModalAction & {
280
241
  /**
281
- * **EN:** Symbol for not closing the dialog when submitting the form, which takes effect when
282
- * returning in the `onSave` event of the editing form component
283
- *
284
- * **CN:** 提交表单时不关闭弹框的Symbol,在编辑表单组件的`onSave`事件中返回时生效
242
+ * - **EN:** Symbol for not closing the dialog when submitting the form, which takes effect when
243
+ * returning in the `onSave` event of the editing form component
244
+ * - **CN:** 提交表单时不关闭弹框的Symbol,在编辑表单组件的`onSave`事件中返回时生效
285
245
  */
286
246
  SubmitWithoutClosing: symbol;
287
247
  };
288
248
  /**
289
- * **EN:** Generate a dialog component based on the editing form component
290
- *
291
- * **CN:** 基于编辑表单组件生成一个弹框组件
249
+ * - **EN:** Generate a dialog component based on the editing form component
250
+ * - **CN:** 基于编辑表单组件生成一个弹框组件
292
251
  *
293
252
  * @param formComp Component of dialog content | 弹窗内容组件
294
253
  * @param defaultProps Default properties of the dialog | 弹窗的默认属性
@@ -26,10 +26,9 @@ import { isForwardRef } from 'react-is';
26
26
  import useContextValidator from "../../hooks/useContextValidator";
27
27
 
28
28
  /**
29
- * **EN:** Symbol for not closing the dialog when submitting the form, which takes effect when
30
- * returning in the `onSave` event of the editing form component
31
- *
32
- * **CN:** 提交表单时不关闭弹框的Symbol,在编辑表单组件的`onSave`事件中返回时生效
29
+ * - **EN:** Symbol for not closing the dialog when submitting the form, which takes effect when
30
+ * returning in the `onSave` event of the editing form component
31
+ * - **CN:** 提交表单时不关闭弹框的Symbol,在编辑表单组件的`onSave`事件中返回时生效
33
32
  */
34
33
  import { jsx as _jsx } from "react/jsx-runtime";
35
34
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -314,9 +313,8 @@ function FormCreator(props) {
314
313
  }
315
314
 
316
315
  /**
317
- * **EN:** Add default properties to the ModalAction component
318
- *
319
- * **CN:** 给ModalAction组件添加默认属性
316
+ * - **EN:** Add default properties to the ModalAction component
317
+ * - **CN:** 给ModalAction组件添加默认属性
320
318
  *
321
319
  * @param WrappedComponent ModalAction component | ModalAction组件
322
320
  * @param defaultProps Default properties | 默认属性
@@ -339,45 +337,38 @@ var renderModalAction = genModalActionRenderer({});
339
337
  var forwardedModalAction = /*#__PURE__*/forwardRef(renderModalAction);
340
338
  forwardedModalAction.displayName = 'ForwardedRef(ModalAction)';
341
339
  /**
342
- * **EN:** ModalAction component type
343
- *
344
- * **CN:** ModalAction组件的类型
340
+ * - **EN:** ModalAction component type
341
+ * - **CN:** ModalAction组件的类型
345
342
  */
346
343
 
347
344
  /**
348
- * **EN:** ModalAction component with generic type
349
- *
350
- * **CN:** ModalAction泛型组件的类型
345
+ * - **EN:** ModalAction component with generic type
346
+ * - **CN:** ModalAction泛型组件的类型
351
347
  */
352
348
 
353
349
  /**
354
- * **EN:** ModalAction with specified trigger type (specified form component)
355
- *
356
- * **CN:** 已指定Trigger类型的ModalAction(并且已指定表单组件)
350
+ * - **EN:** ModalAction with specified trigger type (specified form component)
351
+ * - **CN:** 已指定Trigger类型的ModalAction(并且已指定表单组件)
357
352
  */
358
353
 
359
354
  /**
360
- * **EN:** ModalAction with specified trigger type (unspecified form component, keep generic)
361
- *
362
- * **CN:** 已指定Trigger类型的ModalAction(未指定表单组件,保持泛型)
355
+ * - **EN:** ModalAction with specified trigger type (unspecified form component, keep generic)
356
+ * - **CN:** 已指定Trigger类型的ModalAction(未指定表单组件,保持泛型)
363
357
  */
364
358
 
365
359
  /**
366
- * **EN:** Built-in trigger types (specified form components)
367
- *
368
- * **CN:** 内置的几种触发器类型(已指定表单组件)
360
+ * - **EN:** Built-in trigger types (specified form components)
361
+ * - **CN:** 内置的几种触发器类型(已指定表单组件)
369
362
  */
370
363
 
371
364
  /**
372
- * **EN:** Built-in trigger types (generic types, unspecified form components)
373
- *
374
- * **CN:** 内置的几种触发器类型(泛型类型,未指定表单组件)
365
+ * - **EN:** Built-in trigger types (generic types, unspecified form components)
366
+ * - **CN:** 内置的几种触发器类型(泛型类型,未指定表单组件)
375
367
  */
376
368
 
377
369
  /**
378
- * **EN:** Add trigger types to the ModalAction component
379
- *
380
- * **CN:** 给ModalAction组件添加子触发器类型
370
+ * - **EN:** Add trigger types to the ModalAction component
371
+ * - **CN:** 给ModalAction组件添加子触发器类型
381
372
  */
382
373
  var addTriggers = function addTriggers(comp) {
383
374
  var patchedComp = comp;
@@ -411,24 +402,21 @@ var addTriggers = function addTriggers(comp) {
411
402
  };
412
403
 
413
404
  /**
414
- * **EN:** Dialog component with trigger
415
- *
416
- * **CN:** 带触发器的弹窗组件
405
+ * - **EN:** Dialog component with trigger
406
+ * - **CN:** 带触发器的弹窗组件
417
407
  */
418
408
  var ModalAction = addTriggers(forwardedModalAction);
419
409
 
420
410
  /**
421
- * **EN:** Dialog component with trigger
422
- *
423
- * **CN:** 带触发器的弹窗组件
411
+ * - **EN:** Dialog component with trigger
412
+ * - **CN:** 带触发器的弹窗组件
424
413
  */
425
414
 
426
415
  ModalAction.SubmitWithoutClosing = SubmitWithoutClosingSymbol;
427
416
 
428
417
  /**
429
- * **EN:** Generate a dialog component based on the editing form component
430
- *
431
- * **CN:** 基于编辑表单组件生成一个弹框组件
418
+ * - **EN:** Generate a dialog component based on the editing form component
419
+ * - **CN:** 基于编辑表单组件生成一个弹框组件
432
420
  *
433
421
  * @param formComp Component of dialog content | 弹窗内容组件
434
422
  * @param defaultProps Default properties of the dialog | 弹窗的默认属性