@tachybase/client 0.23.48 → 1.0.6

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 (215) hide show
  1. package/es/api-client/APIClient.d.ts +5 -2
  2. package/es/api-client/APIClient.mjs +93 -49
  3. package/es/api-client/hooks/useRequest.d.ts +2 -0
  4. package/es/application/Application.d.ts +6 -0
  5. package/es/application/Application.mjs +19 -0
  6. package/es/application/CustomRouterContextProvider.d.ts +54 -0
  7. package/es/application/CustomRouterContextProvider.mjs +209 -0
  8. package/es/application/RouterManager.d.ts +8 -3
  9. package/es/application/RouterManager.mjs +48 -15
  10. package/es/application/hooks/index.d.ts +1 -0
  11. package/es/application/hooks/index.mjs +1 -0
  12. package/es/application/hooks/useGlobalVariable.d.ts +1 -0
  13. package/es/application/hooks/useGlobalVariable.mjs +18 -0
  14. package/es/application/schema-initializer/context/index.d.ts +1 -1
  15. package/es/application/schema-settings/hooks/index.d.ts +1 -1
  16. package/es/application/schema-settings/hooks/index.mjs +6 -8
  17. package/es/block-provider/hooks/index.d.ts +2 -0
  18. package/es/block-provider/hooks/index.mjs +29 -22
  19. package/es/built-in/context-menu/ContextMenu.provider.mjs +6 -6
  20. package/es/built-in/context-menu/ContextMenuItemsProps.d.ts +4 -4
  21. package/es/built-in/context-menu/ContextMenuItemsProps.mjs +6 -6
  22. package/es/built-in/context-menu/index.mjs +1 -1
  23. package/es/built-in/context-menu/useContextMenu.d.ts +2 -2
  24. package/es/built-in/index.mjs +8 -0
  25. package/es/built-in/locale/LocalePlugin.mjs +5 -1
  26. package/es/built-in/page-style/PageStyle.provider.mjs +2 -2
  27. package/es/built-in/system-settings/SystemSettingsProvider.d.ts +2 -3
  28. package/es/built-in/system-settings/SystemSettingsProvider.mjs +4 -3
  29. package/es/built-in/system-settings/SystemSettingsShortcut.mjs +11 -8
  30. package/es/collection-manager/Configuration/AddCollectionAction.mjs +12 -2
  31. package/es/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.d.ts +2 -0
  32. package/es/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.mjs +255 -0
  33. package/es/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.d.ts +89 -0
  34. package/es/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.mjs +96 -0
  35. package/es/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.d.ts +3 -0
  36. package/es/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.mjs +47 -0
  37. package/es/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.d.ts +3 -0
  38. package/es/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.mjs +44 -0
  39. package/es/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.d.ts +1 -0
  40. package/es/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.mjs +380 -0
  41. package/es/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.d.ts +8 -0
  42. package/es/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.mjs +4 -0
  43. package/es/collection-manager/Configuration/ImportXlsx/xlsxImportAction.d.ts +1 -0
  44. package/es/collection-manager/Configuration/ImportXlsx/xlsxImportAction.mjs +187 -0
  45. package/es/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.d.ts +1 -0
  46. package/es/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.mjs +30 -0
  47. package/es/collection-manager/collectionPlugin.mjs +3 -1
  48. package/es/collection-manager/templates/import.mjs +1 -1
  49. package/es/collection-manager/templates/sql.d.ts +1 -1
  50. package/es/collection-manager/templates/view.d.ts +1 -1
  51. package/es/collection-manager/templates/xlsx.d.ts +11 -0
  52. package/es/collection-manager/templates/xlsx.mjs +19 -0
  53. package/es/data-source/collection-field-interface/CollectionFieldInterface.d.ts +1 -0
  54. package/es/data-source/collection-field-interface/CollectionFieldInterface.mjs +18 -0
  55. package/es/data-source/collection-field-interface/CollectionFieldInterfaceManager.d.ts +8 -1
  56. package/es/data-source/collection-field-interface/CollectionFieldInterfaceManager.mjs +20 -0
  57. package/es/data-source/commonsSettingsItem/fieldComponent.mjs +3 -1
  58. package/es/data-source/data-source/DataSource.d.ts +1 -1
  59. package/es/filter-provider/utils.mjs +6 -0
  60. package/es/i18n/i18n.mjs +7 -12
  61. package/es/modules/actions/delete/deleteActionSettings.mjs +10 -0
  62. package/es/modules/blocks/data-blocks/form/FilterItemCustomSettings.mjs +1 -1
  63. package/es/modules/blocks/data-blocks/form/fieldSettingsFormItem.mjs +9 -4
  64. package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.mjs +6 -4
  65. package/es/modules/blocks/data-blocks/table/tableBlockSettings.mjs +4 -0
  66. package/es/modules/blocks/data-blocks/table/tableColumnSettings.mjs +44 -0
  67. package/es/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.mjs +4 -0
  68. package/es/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.mjs +9 -0
  69. package/es/modules/fields/component/Radio/radioComponentFieldSettings.mjs +0 -4
  70. package/es/modules/fields/component/SubTable/secondLevelSelect.d.ts +11 -0
  71. package/es/modules/fields/component/SubTable/secondLevelSelect.mjs +102 -0
  72. package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.d.ts +79 -41
  73. package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.mjs +103 -100
  74. package/es/powered-by/index.mjs +4 -7
  75. package/es/schema-component/antd/action/Action.Designer.mjs +43 -5
  76. package/es/schema-component/antd/action/Action.Modal.mjs +19 -31
  77. package/es/schema-component/antd/action/Action.Modal.style.d.ts +4 -0
  78. package/es/schema-component/antd/action/Action.Modal.style.mjs +35 -0
  79. package/es/schema-component/antd/action/Action.mjs +1 -3
  80. package/es/schema-component/antd/action/utils.d.ts +1 -1
  81. package/es/schema-component/antd/action/utils.mjs +70 -70
  82. package/es/schema-component/antd/association-field/SubTabs/InternalCollapse.mjs +2 -1
  83. package/es/schema-component/antd/checkbox/Checkbox.mjs +9 -2
  84. package/es/schema-component/antd/index.d.ts +1 -0
  85. package/es/schema-component/antd/index.mjs +1 -0
  86. package/es/schema-component/antd/media-card/MediaCard.d.ts +11 -0
  87. package/es/schema-component/antd/media-card/MediaCard.mjs +35 -0
  88. package/es/schema-component/antd/media-card/index.d.ts +1 -0
  89. package/es/schema-component/antd/media-card/index.mjs +1 -0
  90. package/es/schema-component/antd/media-card/style.d.ts +3 -0
  91. package/es/schema-component/antd/media-card/style.mjs +25 -0
  92. package/es/schema-component/antd/page/Page.d.ts +1 -5
  93. package/es/schema-component/antd/page/Page.mjs +235 -144
  94. package/es/schema-component/antd/page/Page.style.d.ts +5 -0
  95. package/es/schema-component/antd/page/Page.style.mjs +45 -0
  96. package/es/schema-component/antd/page/PageDesigner.d.ts +3 -0
  97. package/es/schema-component/antd/page/PageDesigner.mjs +28 -0
  98. package/es/schema-component/antd/page/PageTabDesigner.d.ts +0 -3
  99. package/es/schema-component/antd/page/PageTabDesigner.mjs +3 -50
  100. package/es/schema-component/antd/page/style.d.ts +1 -1
  101. package/es/schema-component/antd/page/style.mjs +3 -13
  102. package/es/schema-component/antd/password/Password.d.ts +1 -1
  103. package/es/schema-component/antd/password/utils.d.ts +1 -1
  104. package/es/schema-component/antd/scroll-area/ScrollArea.d.ts +1 -1
  105. package/es/schema-component/antd/scroll-area/ScrollArea.mjs +2 -1
  106. package/es/schema-component/antd/variable/TextArea.mjs +1 -1
  107. package/es/schema-component/antd/variable/TextAreaWithGlobalScope.d.ts +13 -0
  108. package/es/schema-component/antd/variable/TextAreaWithGlobalScope.mjs +59 -0
  109. package/es/schema-component/antd/variable/index.d.ts +1 -0
  110. package/es/schema-component/antd/variable/index.mjs +3 -0
  111. package/es/schema-component/common/dnd-context/index.mjs +1 -7
  112. package/es/schema-component/common/sortable-item/DragHandlePageTab.d.ts +1 -0
  113. package/es/schema-component/common/sortable-item/DragHandlePageTab.mjs +71 -0
  114. package/es/schema-component/common/sortable-item/DragHandlePageTab.style.d.ts +3 -0
  115. package/es/schema-component/common/sortable-item/DragHandlePageTab.style.mjs +25 -0
  116. package/es/schema-items/GeneralSettings.mjs +5 -0
  117. package/es/schema-settings/EditCustomDefaultValue.mjs +1 -1
  118. package/es/schema-settings/SchemaSettings.mjs +1 -1
  119. package/es/schema-settings/SchemaSettingsDefaultValue.mjs +2 -0
  120. package/es/schema-settings/utils/createModalSettingsItem.d.ts +26 -0
  121. package/es/schema-settings/utils/createModalSettingsItem.mjs +46 -0
  122. package/es/schema-settings/utils/createSelectSettingsItem.d.ts +25 -0
  123. package/es/schema-settings/utils/createSelectSettingsItem.mjs +40 -0
  124. package/es/schema-settings/utils/createSwitchSettingsItem.d.ts +21 -0
  125. package/es/schema-settings/utils/createSwitchSettingsItem.mjs +38 -0
  126. package/es/schema-settings/utils/createTextSettingsItem.d.ts +9 -0
  127. package/es/schema-settings/utils/createTextSettingsItem.mjs +21 -0
  128. package/es/schema-settings/utils/index.d.ts +4 -0
  129. package/es/schema-settings/utils/index.mjs +4 -0
  130. package/es/schema-settings/utils/util.d.ts +12 -0
  131. package/es/schema-settings/utils/util.mjs +24 -0
  132. package/es/user/CurrentUserProvider.mjs +6 -3
  133. package/lib/api-client/APIClient.js +93 -49
  134. package/lib/application/Application.js +19 -0
  135. package/lib/application/CustomRouterContextProvider.js +276 -0
  136. package/lib/application/RouterManager.js +49 -15
  137. package/lib/application/hooks/index.js +9 -0
  138. package/lib/application/hooks/useGlobalVariable.js +52 -0
  139. package/lib/application/schema-initializer/hooks/index.js +2 -2
  140. package/lib/application/schema-settings/hooks/index.js +6 -8
  141. package/lib/block-provider/hooks/index.js +80 -59
  142. package/lib/built-in/context-menu/ContextMenu.provider.js +6 -6
  143. package/lib/built-in/context-menu/ContextMenuItemsProps.js +6 -6
  144. package/lib/built-in/context-menu/index.js +1 -1
  145. package/lib/built-in/index.js +8 -0
  146. package/lib/built-in/locale/LocalePlugin.js +5 -1
  147. package/lib/built-in/page-style/PageStyle.provider.js +2 -2
  148. package/lib/built-in/system-settings/SystemSettingsProvider.js +4 -3
  149. package/lib/built-in/system-settings/SystemSettingsShortcut.js +11 -8
  150. package/lib/collection-manager/Configuration/AddCollectionAction.js +12 -2
  151. package/lib/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.js +304 -0
  152. package/lib/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.js +130 -0
  153. package/lib/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.js +81 -0
  154. package/lib/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.js +78 -0
  155. package/lib/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.js +414 -0
  156. package/lib/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.js +53 -0
  157. package/lib/collection-manager/Configuration/ImportXlsx/xlsxImportAction.js +235 -0
  158. package/lib/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.js +64 -0
  159. package/lib/collection-manager/collectionPlugin.js +3 -1
  160. package/lib/collection-manager/templates/import.js +1 -1
  161. package/lib/collection-manager/templates/xlsx.js +53 -0
  162. package/lib/data-source/collection-field-interface/CollectionFieldInterface.js +18 -0
  163. package/lib/data-source/collection-field-interface/CollectionFieldInterfaceManager.js +20 -0
  164. package/lib/data-source/commonsSettingsItem/fieldComponent.js +3 -1
  165. package/lib/filter-provider/utils.js +6 -0
  166. package/lib/i18n/i18n.js +7 -12
  167. package/lib/locale/en_US.js +1 -0
  168. package/lib/locale/zh-CN.js +14 -2
  169. package/lib/modules/actions/delete/deleteActionSettings.js +10 -0
  170. package/lib/modules/blocks/data-blocks/form/FilterItemCustomSettings.js +1 -1
  171. package/lib/modules/blocks/data-blocks/form/fieldSettingsFormItem.js +9 -4
  172. package/lib/modules/blocks/data-blocks/table/hooks/useTableBlockProps.js +6 -4
  173. package/lib/modules/blocks/data-blocks/table/tableBlockSettings.js +4 -0
  174. package/lib/modules/blocks/data-blocks/table/tableColumnSettings.js +44 -0
  175. package/lib/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.js +4 -0
  176. package/lib/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.js +9 -0
  177. package/lib/modules/fields/component/Radio/radioComponentFieldSettings.js +0 -4
  178. package/lib/modules/fields/component/SubTable/secondLevelSelect.js +136 -0
  179. package/lib/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.js +104 -103
  180. package/lib/powered-by/index.js +4 -7
  181. package/lib/schema-component/antd/action/Action.Designer.js +43 -5
  182. package/lib/schema-component/antd/action/Action.Modal.js +19 -31
  183. package/lib/schema-component/antd/action/Action.Modal.style.js +69 -0
  184. package/lib/schema-component/antd/action/Action.js +1 -3
  185. package/lib/schema-component/antd/action/utils.js +70 -70
  186. package/lib/schema-component/antd/association-field/SubTabs/InternalCollapse.js +2 -1
  187. package/lib/schema-component/antd/checkbox/Checkbox.js +9 -2
  188. package/lib/schema-component/antd/index.js +18 -4
  189. package/lib/schema-component/antd/media-card/MediaCard.js +69 -0
  190. package/lib/schema-component/antd/media-card/index.js +65 -0
  191. package/lib/schema-component/antd/media-card/style.js +59 -0
  192. package/lib/schema-component/antd/page/Page.js +235 -144
  193. package/lib/schema-component/antd/page/Page.style.js +79 -0
  194. package/lib/schema-component/antd/page/PageDesigner.js +62 -0
  195. package/lib/schema-component/antd/page/PageTabDesigner.js +2 -50
  196. package/lib/schema-component/antd/page/style.js +3 -13
  197. package/lib/schema-component/antd/scroll-area/ScrollArea.js +2 -1
  198. package/lib/schema-component/antd/variable/TextArea.js +1 -1
  199. package/lib/schema-component/antd/variable/TextAreaWithGlobalScope.js +94 -0
  200. package/lib/schema-component/antd/variable/index.js +13 -1
  201. package/lib/schema-component/common/dnd-context/index.js +1 -7
  202. package/lib/schema-component/common/sortable-item/DragHandlePageTab.js +105 -0
  203. package/lib/schema-component/common/sortable-item/DragHandlePageTab.style.js +59 -0
  204. package/lib/schema-items/GeneralSettings.js +5 -0
  205. package/lib/schema-settings/EditCustomDefaultValue.js +1 -1
  206. package/lib/schema-settings/SchemaSettings.js +1 -1
  207. package/lib/schema-settings/SchemaSettingsDefaultValue.js +2 -0
  208. package/lib/schema-settings/utils/createModalSettingsItem.js +94 -0
  209. package/lib/schema-settings/utils/createSelectSettingsItem.js +88 -0
  210. package/lib/schema-settings/utils/createSwitchSettingsItem.js +86 -0
  211. package/lib/schema-settings/utils/createTextSettingsItem.js +55 -0
  212. package/lib/schema-settings/utils/index.js +92 -0
  213. package/lib/schema-settings/utils/util.js +74 -0
  214. package/lib/user/CurrentUserProvider.js +6 -3
  215. package/package.json +7 -7
@@ -0,0 +1,35 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE_antd_style__ from "antd-style";
2
+ function _tagged_template_literal(strings, raw) {
3
+ if (!raw) raw = strings.slice(0);
4
+ return Object.freeze(Object.defineProperties(strings, {
5
+ raw: {
6
+ value: Object.freeze(raw)
7
+ }
8
+ }));
9
+ }
10
+ function _templateObject() {
11
+ const data = _tagged_template_literal([
12
+ "\n &.tb-action-popup {\n .ant-modal-header {\n // TODO: theme variables\n margin-top: -20px;\n margin-left: -24px;\n margin-right: -24px;\n padding-top: 20px;\n padding-left: 24px;\n padding-right: 24px;\n padding-bottom: 20px;\n }\n .ant-modal-content {\n background: var(--tb-box-bg);\n }\n }\n "
13
+ ]);
14
+ _templateObject = function() {
15
+ return data;
16
+ };
17
+ return data;
18
+ }
19
+ function _templateObject1() {
20
+ const data = _tagged_template_literal([
21
+ "\n max-height: 80vh;\n overflow: hidden;\n .ant-tabs-content-holder {\n height: 70vh;\n overflow-y: scroll;\n overflow-x: hidden;\n }\n "
22
+ ]);
23
+ _templateObject1 = function() {
24
+ return data;
25
+ };
26
+ return data;
27
+ }
28
+ const useStyles = (0, __WEBPACK_EXTERNAL_MODULE_antd_style__.createStyles)((param)=>{
29
+ let { css } = param;
30
+ return {
31
+ container: css(_templateObject()),
32
+ modalClassName: css(_templateObject1())
33
+ };
34
+ });
35
+ export { useStyles };
@@ -54,9 +54,7 @@ const Action = (0, __WEBPACK_EXTERNAL_MODULE__application_hoc_withDynamicSchemaP
54
54
  const openMode = null == fieldSchema ? void 0 : null === (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops ? void 0 : _fieldSchema_xcomponentprops['openMode'];
55
55
  const openSize = null == fieldSchema ? void 0 : null === (_fieldSchema_xcomponentprops1 = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops1 ? void 0 : _fieldSchema_xcomponentprops1['openSize'];
56
56
  const disabled = form.disabled || field.disabled || (null === (_field_data = field.data) || void 0 === _field_data ? void 0 : _field_data.disabled) || propsDisabled;
57
- const linkageRules = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>(null == fieldSchema ? void 0 : fieldSchema['x-linkage-rules']) || [], [
58
- fieldSchema
59
- ]);
57
+ const linkageRules = (null == fieldSchema ? void 0 : fieldSchema['x-linkage-rules']) || [];
60
58
  const { designable } = (0, __WEBPACK_EXTERNAL_MODULE__index_mjs__.useDesignable)();
61
59
  const tarComponent = (0, __WEBPACK_EXTERNAL_MODULE__hooks_index_mjs__.useComponent)(component) || component;
62
60
  const { modal } = __WEBPACK_EXTERNAL_MODULE_antd__.App.useApp();
@@ -8,4 +8,4 @@ export declare const linkageAction: ({ operator, field, condition, variables, lo
8
8
  variables: VariablesContextType;
9
9
  localVariables: VariableOption[];
10
10
  }) => Promise<any>;
11
- export declare const afterSuccessSchema: ISchema;
11
+ export declare const afterSuccessSchema: (t: any) => ISchema;
@@ -136,78 +136,78 @@ const linkageAction = async (param)=>{
136
136
  return null;
137
137
  }
138
138
  };
139
- const afterSuccessSchema = {
140
- type: 'object',
141
- title: '{{t("After successful submission")}}',
142
- properties: {
143
- successMessage: {
144
- title: '{{t("Popup message")}}',
145
- 'x-decorator': 'FormItem',
146
- 'x-component': 'Input.TextArea',
147
- 'x-component-props': {}
148
- },
149
- popupClose: {
150
- title: '{{t("Popup close method")}}',
151
- enum: [
152
- {
153
- label: '{{t("Automatic close")}}',
154
- value: false
155
- },
156
- {
157
- label: '{{t("Manually close")}}',
158
- value: true
159
- }
160
- ],
161
- 'x-decorator': 'FormItem',
162
- 'x-component': 'Radio.Group',
163
- 'x-component-props': {}
164
- },
165
- manualClose: {
166
- title: '{{t("Message clear metchod")}}',
167
- enum: [
168
- {
169
- label: '{{t("Automatic close")}}',
170
- value: false
171
- },
172
- {
173
- label: '{{t("Manually close")}}',
174
- value: true
175
- }
176
- ],
177
- 'x-decorator': 'FormItem',
178
- 'x-component': 'Radio.Group',
179
- 'x-component-props': {}
180
- },
181
- redirecting: {
182
- title: '{{t("Then")}}',
183
- enum: [
184
- {
185
- label: '{{t("Stay on current page")}}',
186
- value: false
187
- },
188
- {
189
- label: '{{t("Redirect to")}}',
190
- value: true
191
- }
192
- ],
193
- 'x-decorator': 'FormItem',
194
- 'x-component': 'Radio.Group',
195
- 'x-component-props': {},
196
- 'x-reactions': {
197
- target: 'redirectTo',
198
- fulfill: {
199
- state: {
200
- visible: '{{!!$self.value}}'
139
+ const afterSuccessSchema = (t)=>({
140
+ type: 'object',
141
+ title: t('After successful submission'),
142
+ properties: {
143
+ successMessage: {
144
+ title: '{{t("Popup message")}}',
145
+ 'x-decorator': 'FormItem',
146
+ 'x-component': 'Input.TextArea',
147
+ 'x-component-props': {}
148
+ },
149
+ popupClose: {
150
+ title: '{{t("Popup close method")}}',
151
+ enum: [
152
+ {
153
+ label: '{{t("Automatic close")}}',
154
+ value: false
155
+ },
156
+ {
157
+ label: '{{t("Manually close")}}',
158
+ value: true
159
+ }
160
+ ],
161
+ 'x-decorator': 'FormItem',
162
+ 'x-component': 'Radio.Group',
163
+ 'x-component-props': {}
164
+ },
165
+ manualClose: {
166
+ title: '{{t("Message clear metchod")}}',
167
+ enum: [
168
+ {
169
+ label: '{{t("Automatic close")}}',
170
+ value: false
171
+ },
172
+ {
173
+ label: '{{t("Manually close")}}',
174
+ value: true
175
+ }
176
+ ],
177
+ 'x-decorator': 'FormItem',
178
+ 'x-component': 'Radio.Group',
179
+ 'x-component-props': {}
180
+ },
181
+ redirecting: {
182
+ title: '{{t("Then")}}',
183
+ enum: [
184
+ {
185
+ label: '{{t("Stay on current page")}}',
186
+ value: false
187
+ },
188
+ {
189
+ label: '{{t("Redirect to")}}',
190
+ value: true
191
+ }
192
+ ],
193
+ 'x-decorator': 'FormItem',
194
+ 'x-component': 'Radio.Group',
195
+ 'x-component-props': {},
196
+ 'x-reactions': {
197
+ target: 'redirectTo',
198
+ fulfill: {
199
+ state: {
200
+ visible: '{{!!$self.value}}'
201
+ }
201
202
  }
202
203
  }
204
+ },
205
+ redirectTo: {
206
+ title: '{{t("Link")}}',
207
+ 'x-decorator': 'FormItem',
208
+ 'x-component': 'Input',
209
+ 'x-component-props': {}
203
210
  }
204
- },
205
- redirectTo: {
206
- title: '{{t("Link")}}',
207
- 'x-decorator': 'FormItem',
208
- 'x-component': 'Input',
209
- 'x-component-props': {}
210
211
  }
211
- }
212
- };
212
+ });
213
213
  export { afterSuccessSchema, linkageAction, requestSettingsSchema };
@@ -158,6 +158,7 @@ const InternalTabs = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.observer)
158
158
  (0, __WEBPACK_EXTERNAL_MODULE_ahooks__.useDeepCompareEffect)(()=>{
159
159
  if (!defOptions.length) return;
160
160
  const fieldTabs = field.value;
161
+ if (!fieldTabs) return;
161
162
  if (quickAddParentField && (null == quickAddParentField ? void 0 : quickAddParentField.value) !== 'none') {
162
163
  const filterParantOptions = tabsParantFilterOptions(defOptions, fieldTabs, quickAddField);
163
164
  setDefOptions(filterParantOptions);
@@ -235,7 +236,7 @@ const InternalTabs = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.observer)
235
236
  element.style.color = '#1e1e1e';
236
237
  });
237
238
  },
238
- children: item.label
239
+ children: item.label || null
239
240
  }, item.id))
240
241
  }),
241
242
  /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("div", {
@@ -1,5 +1,5 @@
1
1
  import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
2
- import "react";
2
+ import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
3
3
  import * as __WEBPACK_EXTERNAL_MODULE__tachybase_schema__ from "@tachybase/schema";
4
4
  import * as __WEBPACK_EXTERNAL_MODULE__ant_design_icons__ from "@ant-design/icons";
5
5
  import * as __WEBPACK_EXTERNAL_MODULE_antd__ from "antd";
@@ -33,12 +33,19 @@ const InternalCheckbox = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.conne
33
33
  }), (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.mapReadPretty)(ReadPretty));
34
34
  const InternalRadioGroup = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.connect)((props)=>{
35
35
  const { t } = (0, __WEBPACK_EXTERNAL_MODULE_react_i18next__.useTranslation)();
36
+ const [value, setValue] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)();
36
37
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Radio.Group, {
37
38
  ...props,
39
+ onChange: (value)=>{
40
+ if ('null' !== value.target.value) props.onChange(value.target.value);
41
+ else props.onChange(null);
42
+ setValue(value.target.value);
43
+ },
44
+ value: props.value || value,
38
45
  options: [
39
46
  {
40
47
  label: t('?'),
41
- value: void 0
48
+ value: 'null'
42
49
  },
43
50
  {
44
51
  label: t('Yes'),
@@ -57,5 +57,6 @@ export * from './tree';
57
57
  export * from './unixTimestamp';
58
58
  export * from './upload';
59
59
  export * from './variable';
60
+ export * from './media-card';
60
61
  export { PageHeader } from '@ant-design/pro-layout';
61
62
  export { CodeMirror } from '@tachybase/components';
@@ -59,6 +59,7 @@ export * from "./tree/index.mjs";
59
59
  export * from "./unixTimestamp/index.mjs";
60
60
  export * from "./upload/index.mjs";
61
61
  export * from "./variable/index.mjs";
62
+ export * from "./media-card/index.mjs";
62
63
  var __webpack_exports__CodeMirror = __WEBPACK_EXTERNAL_MODULE__tachybase_components__.CodeMirror;
63
64
  var __webpack_exports__PageHeader = __WEBPACK_EXTERNAL_MODULE__ant_design_pro_layout__.PageHeader;
64
65
  var __webpack_exports__genStyleHook = __WEBPACK_EXTERNAL_MODULE__builtins_index_mjs__.genStyleHook;
@@ -0,0 +1,11 @@
1
+ interface MediaCardProps {
2
+ color: string;
3
+ icon: string;
4
+ title: string;
5
+ layout?: 'horizontal' | 'vertical';
6
+ needHover?: boolean;
7
+ className?: string;
8
+ onClick?: () => void;
9
+ }
10
+ export declare const MediaCard: (props: MediaCardProps) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,35 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
2
+ import * as __WEBPACK_EXTERNAL_MODULE_antd_style__ from "antd-style";
3
+ import * as __WEBPACK_EXTERNAL_MODULE__icon_index_mjs__ from "../../../icon/index.mjs";
4
+ import * as __WEBPACK_EXTERNAL_MODULE__style_mjs__ from "./style.mjs";
5
+ const MediaCard = (props)=>{
6
+ const { icon, color, title, layout = 'horizontal', onClick = ()=>{}, className, needHover = true } = props;
7
+ const { styles } = (0, __WEBPACK_EXTERNAL_MODULE__style_mjs__.useStyles)();
8
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)("div", {
9
+ className: (0, __WEBPACK_EXTERNAL_MODULE_antd_style__.cx)(styles.mediaCardStyle, {
10
+ layout: 'vertical' === layout,
11
+ 'need-hover': needHover
12
+ }, className),
13
+ onClick: onClick,
14
+ children: [
15
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("div", {
16
+ className: "icon-wrapper",
17
+ style: {
18
+ backgroundColor: null != color ? color : '#e5e5e5'
19
+ },
20
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__icon_index_mjs__.Icon, {
21
+ className: "icon",
22
+ type: null != icon ? icon : 'AppstoreOutlined',
23
+ style: {
24
+ color: null != color ? color : '#e5e5e5'
25
+ }
26
+ })
27
+ }),
28
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("div", {
29
+ className: "title",
30
+ children: title
31
+ })
32
+ ]
33
+ });
34
+ };
35
+ export { MediaCard };
@@ -0,0 +1 @@
1
+ export * from './MediaCard';
@@ -0,0 +1 @@
1
+ export * from "./MediaCard.mjs";
@@ -0,0 +1,3 @@
1
+ export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
+ mediaCardStyle: import("antd-style").SerializedStyles;
3
+ }>;
@@ -0,0 +1,25 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE_antd_style__ from "antd-style";
2
+ function _tagged_template_literal(strings, raw) {
3
+ if (!raw) raw = strings.slice(0);
4
+ return Object.freeze(Object.defineProperties(strings, {
5
+ raw: {
6
+ value: Object.freeze(raw)
7
+ }
8
+ }));
9
+ }
10
+ function _templateObject() {
11
+ const data = _tagged_template_literal([
12
+ "\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n gap: 10px;\n width: fit-content;\n padding: 10px;\n cursor: pointer;\n\n &.layout {\n flex-direction: column;\n }\n :hover {\n border-radius: 10px;\n transform: scale(1.05);\n transition: all 0.3s;\n }\n\n &.need-hover:hover {\n background-color: var(--colorPrimaryText);\n }\n\n .icon-wrapper {\n padding: 20px;\n border-radius: 40%;\n .icon {\n padding: 10px;\n border-radius: 50%;\n background-color: #ffffff;\n font-size: 20px;\n }\n }\n\n .title {\n flex: 1;\n display: inline-block;\n font-size: 16px;\n color: #2f2f2f;\n overflow: hidden;\n }\n "
13
+ ]);
14
+ _templateObject = function() {
15
+ return data;
16
+ };
17
+ return data;
18
+ }
19
+ const useStyles = (0, __WEBPACK_EXTERNAL_MODULE_antd_style__.createStyles)((param)=>{
20
+ let { css, token } = param;
21
+ return {
22
+ mediaCardStyle: css(_templateObject())
23
+ };
24
+ });
25
+ export { useStyles };
@@ -1,5 +1 @@
1
- import React from 'react';
2
- export declare const Page: {
3
- (props: any): React.JSX.Element;
4
- displayName: string;
5
- };
1
+ export declare const Page: (props: any) => import("react").JSX.Element;