@nocobase/client 0.7.4-alpha.7 → 0.7.5-alpha.1

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 (275) hide show
  1. package/es/block-provider/TableBlockProvider.js +3 -3
  2. package/es/collection-manager/Configuration/AddFieldAction.js +38 -41
  3. package/es/collection-manager/Configuration/EditFieldAction.js +64 -41
  4. package/es/collection-manager/interfaces/email.js +4 -2
  5. package/es/collection-manager/interfaces/formula.js +1 -1
  6. package/es/collection-manager/interfaces/index.d.ts +1 -0
  7. package/es/collection-manager/interfaces/index.js +1 -0
  8. package/es/collection-manager/interfaces/input.js +4 -2
  9. package/es/collection-manager/interfaces/integer.js +4 -2
  10. package/es/collection-manager/interfaces/m2m.js +2 -2
  11. package/es/collection-manager/interfaces/m2o.js +7 -3
  12. package/es/collection-manager/interfaces/number.js +3 -2
  13. package/es/collection-manager/interfaces/o2m.js +8 -4
  14. package/es/collection-manager/interfaces/o2o.js +19 -6
  15. package/es/collection-manager/interfaces/password.js +4 -2
  16. package/es/collection-manager/interfaces/percent.js +2 -1
  17. package/es/collection-manager/interfaces/phone.js +4 -2
  18. package/es/collection-manager/interfaces/properties/index.d.ts +7 -0
  19. package/es/collection-manager/interfaces/properties/index.js +91 -0
  20. package/es/collection-manager/interfaces/sequence.d.ts +2 -0
  21. package/es/collection-manager/interfaces/sequence.js +431 -0
  22. package/es/locale/en_US.d.ts +1 -0
  23. package/es/locale/en_US.js +2 -1
  24. package/es/locale/index.js +24 -0
  25. package/es/locale/ja_JP.d.ts +590 -0
  26. package/es/locale/ja_JP.js +591 -0
  27. package/es/locale/ru_RU.d.ts +560 -0
  28. package/es/locale/ru_RU.js +559 -0
  29. package/es/locale/zh_CN.d.ts +27 -0
  30. package/es/locale/zh_CN.js +30 -3
  31. package/es/route-switch/antd/admin-layout/index.js +19 -4
  32. package/es/schema-component/antd/action/Action.js +3 -1
  33. package/es/schema-component/antd/action/ActionBar.js +8 -1
  34. package/es/schema-component/antd/cron/Cron.d.ts +6 -0
  35. package/es/schema-component/antd/cron/Cron.js +49 -0
  36. package/es/schema-component/antd/cron/index.d.ts +1 -0
  37. package/es/schema-component/antd/cron/index.js +1 -0
  38. package/es/schema-component/antd/cron/locale/zh-CN.d.ts +34 -0
  39. package/es/schema-component/antd/cron/locale/zh-CN.js +37 -0
  40. package/es/schema-component/antd/filter/Filter.Action.Designer.js +1 -0
  41. package/es/schema-component/antd/formula-input/Compute.js +1 -1
  42. package/es/schema-component/antd/grid/Grid.js +134 -25
  43. package/es/schema-component/antd/index.d.ts +1 -0
  44. package/es/schema-component/antd/index.js +1 -0
  45. package/es/schema-component/antd/record-picker/InputRecordPicker.js +4 -2
  46. package/es/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +5 -2
  47. package/es/schema-component/antd/record-picker/util.d.ts +5 -0
  48. package/es/schema-component/antd/record-picker/util.js +37 -0
  49. package/es/schema-component/antd/upload/shared.js +6 -2
  50. package/es/schema-component/common/dnd-context/index.js +30 -4
  51. package/es/schema-component/hooks/useDesignable.d.ts +2 -2
  52. package/es/schema-component/hooks/useDesignable.js +130 -26
  53. package/es/schema-initializer/SchemaInitializer.d.ts +1 -0
  54. package/es/schema-initializer/SchemaInitializer.js +6 -2
  55. package/es/schema-initializer/buttons/TabPaneInitializers.d.ts +2 -1
  56. package/es/schema-initializer/buttons/TabPaneInitializers.js +9 -3
  57. package/es/schema-initializer/items/ActionInitializer.d.ts +1 -0
  58. package/es/schema-initializer/items/ActionInitializer.js +13 -0
  59. package/es/schema-initializer/items/BlockInitializer.d.ts +1 -0
  60. package/es/schema-initializer/items/BlockInitializer.js +18 -0
  61. package/es/schema-initializer/items/BulkDestroyActionInitializer.d.ts +1 -0
  62. package/es/schema-initializer/items/BulkDestroyActionInitializer.js +27 -0
  63. package/es/schema-initializer/items/CalendarBlockInitializer.d.ts +1 -0
  64. package/es/schema-initializer/items/CalendarBlockInitializer.js +124 -0
  65. package/es/schema-initializer/items/CollectionFieldInitializer.d.ts +1 -0
  66. package/es/schema-initializer/items/CollectionFieldInitializer.js +15 -0
  67. package/es/schema-initializer/items/CreateActionInitializer.d.ts +1 -0
  68. package/es/schema-initializer/items/CreateActionInitializer.js +60 -0
  69. package/es/schema-initializer/items/CreateFormBlockInitializer.d.ts +1 -0
  70. package/es/schema-initializer/items/CreateFormBlockInitializer.js +102 -0
  71. package/es/schema-initializer/items/CreateSubmitActionInitializer.d.ts +1 -0
  72. package/es/schema-initializer/items/CreateSubmitActionInitializer.js +24 -0
  73. package/es/schema-initializer/items/CustomizeActionInitializer.d.ts +1 -0
  74. package/es/schema-initializer/items/CustomizeActionInitializer.js +11 -0
  75. package/es/schema-initializer/items/DataBlockInitializer.d.ts +1 -0
  76. package/es/schema-initializer/items/DataBlockInitializer.js +88 -0
  77. package/es/schema-initializer/items/DestroyActionInitializer.d.ts +1 -0
  78. package/es/schema-initializer/items/DestroyActionInitializer.js +27 -0
  79. package/es/schema-initializer/items/DetailsBlockInitializer.d.ts +1 -0
  80. package/es/schema-initializer/items/DetailsBlockInitializer.js +55 -0
  81. package/es/schema-initializer/items/FilterActionInitializer.d.ts +1 -0
  82. package/es/schema-initializer/items/FilterActionInitializer.js +24 -0
  83. package/es/schema-initializer/items/FormBlockInitializer.d.ts +1 -0
  84. package/es/schema-initializer/items/FormBlockInitializer.js +30 -0
  85. package/es/schema-initializer/items/G2PlotInitializer.d.ts +1 -0
  86. package/es/schema-initializer/items/G2PlotInitializer.js +25 -0
  87. package/es/schema-initializer/items/InitializerWithSwitch.d.ts +1 -0
  88. package/es/schema-initializer/items/InitializerWithSwitch.js +32 -0
  89. package/es/schema-initializer/items/KanbanBlockInitializer.d.ts +1 -0
  90. package/es/schema-initializer/items/KanbanBlockInitializer.js +138 -0
  91. package/es/schema-initializer/items/MarkdownBlockInitializer.d.ts +1 -0
  92. package/es/schema-initializer/items/MarkdownBlockInitializer.js +32 -0
  93. package/es/schema-initializer/items/PrintActionInitializer.d.ts +1 -0
  94. package/es/schema-initializer/items/PrintActionInitializer.js +23 -0
  95. package/es/schema-initializer/items/RecordAssociationBlockInitializer.d.ts +1 -0
  96. package/es/schema-initializer/items/RecordAssociationBlockInitializer.js +90 -0
  97. package/es/schema-initializer/items/RecordAssociationCalendarBlockInitializer.d.ts +1 -0
  98. package/es/schema-initializer/items/RecordAssociationCalendarBlockInitializer.js +160 -0
  99. package/es/schema-initializer/items/RecordAssociationDetailsBlockInitializer.d.ts +1 -0
  100. package/es/schema-initializer/items/RecordAssociationDetailsBlockInitializer.js +90 -0
  101. package/es/schema-initializer/items/RecordAssociationFormBlockInitializer.d.ts +1 -0
  102. package/es/schema-initializer/items/RecordAssociationFormBlockInitializer.js +112 -0
  103. package/es/schema-initializer/items/RecordFormBlockInitializer.d.ts +1 -0
  104. package/es/schema-initializer/items/RecordFormBlockInitializer.js +109 -0
  105. package/es/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.d.ts +1 -0
  106. package/es/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.js +116 -0
  107. package/es/schema-initializer/items/RecordReadPrettyFormBlockInitializer.d.ts +1 -0
  108. package/es/schema-initializer/items/RecordReadPrettyFormBlockInitializer.js +114 -0
  109. package/es/schema-initializer/items/RefreshActionInitializer.d.ts +1 -0
  110. package/es/schema-initializer/items/RefreshActionInitializer.js +23 -0
  111. package/es/schema-initializer/items/SubmitActionInitializer.d.ts +1 -0
  112. package/es/schema-initializer/items/SubmitActionInitializer.js +24 -0
  113. package/es/schema-initializer/items/TableActionColumnInitializer.d.ts +1 -0
  114. package/es/schema-initializer/items/TableActionColumnInitializer.js +34 -0
  115. package/es/schema-initializer/items/TableBlockInitializer.d.ts +1 -0
  116. package/es/schema-initializer/items/TableBlockInitializer.js +55 -0
  117. package/es/schema-initializer/items/TableCollectionFieldInitializer.d.ts +1 -0
  118. package/es/schema-initializer/items/TableCollectionFieldInitializer.js +15 -0
  119. package/es/schema-initializer/items/TableSelectorInitializer.d.ts +1 -0
  120. package/es/schema-initializer/items/TableSelectorInitializer.js +67 -0
  121. package/es/schema-initializer/items/UpdateActionInitializer.d.ts +1 -0
  122. package/es/schema-initializer/items/UpdateActionInitializer.js +59 -0
  123. package/es/schema-initializer/items/UpdateSubmitActionInitializer.d.ts +1 -0
  124. package/es/schema-initializer/items/UpdateSubmitActionInitializer.js +24 -0
  125. package/es/schema-initializer/items/ViewActionInitializer.d.ts +1 -0
  126. package/es/schema-initializer/items/ViewActionInitializer.js +58 -0
  127. package/es/schema-initializer/items/index.d.ts +35 -35
  128. package/es/schema-initializer/items/index.js +35 -1589
  129. package/es/schema-initializer/style.less +4 -0
  130. package/es/schema-templates/SchemaTemplateManagerProvider.js +2 -5
  131. package/es/system-settings/SystemSettingsShortcut.js +7 -0
  132. package/es/user/SigninPage.d.ts +11 -2
  133. package/es/user/SigninPage.js +140 -33
  134. package/es/user/SignupPage.d.ts +7 -1
  135. package/es/user/SignupPage.js +54 -10
  136. package/es/user/VerificationCode.d.ts +7 -0
  137. package/es/user/VerificationCode.js +129 -0
  138. package/lib/block-provider/TableBlockProvider.js +3 -3
  139. package/lib/collection-manager/Configuration/AddFieldAction.js +38 -40
  140. package/lib/collection-manager/Configuration/EditFieldAction.js +65 -40
  141. package/lib/collection-manager/interfaces/email.js +3 -1
  142. package/lib/collection-manager/interfaces/formula.js +1 -1
  143. package/lib/collection-manager/interfaces/index.d.ts +1 -0
  144. package/lib/collection-manager/interfaces/index.js +13 -0
  145. package/lib/collection-manager/interfaces/input.js +3 -1
  146. package/lib/collection-manager/interfaces/integer.js +3 -1
  147. package/lib/collection-manager/interfaces/m2m.js +1 -1
  148. package/lib/collection-manager/interfaces/m2o.js +6 -2
  149. package/lib/collection-manager/interfaces/number.js +4 -3
  150. package/lib/collection-manager/interfaces/o2m.js +7 -3
  151. package/lib/collection-manager/interfaces/o2o.js +18 -5
  152. package/lib/collection-manager/interfaces/password.js +3 -1
  153. package/lib/collection-manager/interfaces/percent.js +1 -0
  154. package/lib/collection-manager/interfaces/phone.js +3 -1
  155. package/lib/collection-manager/interfaces/properties/index.d.ts +7 -0
  156. package/lib/collection-manager/interfaces/properties/index.js +94 -1
  157. package/lib/collection-manager/interfaces/sequence.d.ts +2 -0
  158. package/lib/collection-manager/interfaces/sequence.js +455 -0
  159. package/lib/locale/en_US.d.ts +1 -0
  160. package/lib/locale/en_US.js +2 -1
  161. package/lib/locale/index.js +28 -0
  162. package/lib/locale/ja_JP.d.ts +590 -0
  163. package/lib/locale/ja_JP.js +598 -0
  164. package/lib/locale/ru_RU.d.ts +560 -0
  165. package/lib/locale/ru_RU.js +566 -0
  166. package/lib/locale/zh_CN.d.ts +27 -0
  167. package/lib/locale/zh_CN.js +30 -3
  168. package/lib/route-switch/antd/admin-layout/index.js +19 -4
  169. package/lib/schema-component/antd/action/Action.js +2 -0
  170. package/lib/schema-component/antd/action/ActionBar.js +9 -1
  171. package/lib/schema-component/antd/cron/Cron.d.ts +6 -0
  172. package/lib/schema-component/antd/cron/Cron.js +67 -0
  173. package/lib/schema-component/antd/cron/index.d.ts +1 -0
  174. package/lib/schema-component/antd/cron/index.js +18 -0
  175. package/lib/schema-component/antd/cron/locale/zh-CN.d.ts +34 -0
  176. package/lib/schema-component/antd/cron/locale/zh-CN.js +44 -0
  177. package/lib/schema-component/antd/filter/Filter.Action.Designer.js +1 -0
  178. package/lib/schema-component/antd/formula-input/Compute.js +1 -1
  179. package/lib/schema-component/antd/grid/Grid.js +132 -23
  180. package/lib/schema-component/antd/index.d.ts +1 -0
  181. package/lib/schema-component/antd/index.js +13 -0
  182. package/lib/schema-component/antd/record-picker/InputRecordPicker.js +5 -2
  183. package/lib/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +6 -2
  184. package/lib/schema-component/antd/record-picker/util.d.ts +5 -0
  185. package/lib/schema-component/antd/record-picker/util.js +55 -0
  186. package/lib/schema-component/antd/upload/shared.js +5 -1
  187. package/lib/schema-component/common/dnd-context/index.js +35 -5
  188. package/lib/schema-component/hooks/useDesignable.d.ts +2 -2
  189. package/lib/schema-component/hooks/useDesignable.js +132 -28
  190. package/lib/schema-initializer/SchemaInitializer.d.ts +1 -0
  191. package/lib/schema-initializer/SchemaInitializer.js +7 -2
  192. package/lib/schema-initializer/buttons/TabPaneInitializers.d.ts +2 -1
  193. package/lib/schema-initializer/buttons/TabPaneInitializers.js +13 -4
  194. package/lib/schema-initializer/items/ActionInitializer.d.ts +1 -0
  195. package/lib/schema-initializer/items/ActionInitializer.js +26 -0
  196. package/lib/schema-initializer/items/BlockInitializer.d.ts +1 -0
  197. package/lib/schema-initializer/items/BlockInitializer.js +31 -0
  198. package/lib/schema-initializer/items/BulkDestroyActionInitializer.d.ts +1 -0
  199. package/lib/schema-initializer/items/BulkDestroyActionInitializer.js +40 -0
  200. package/lib/schema-initializer/items/CalendarBlockInitializer.d.ts +1 -0
  201. package/lib/schema-initializer/items/CalendarBlockInitializer.js +148 -0
  202. package/lib/schema-initializer/items/CollectionFieldInitializer.d.ts +1 -0
  203. package/lib/schema-initializer/items/CollectionFieldInitializer.js +28 -0
  204. package/lib/schema-initializer/items/CreateActionInitializer.d.ts +1 -0
  205. package/lib/schema-initializer/items/CreateActionInitializer.js +73 -0
  206. package/lib/schema-initializer/items/CreateFormBlockInitializer.d.ts +1 -0
  207. package/lib/schema-initializer/items/CreateFormBlockInitializer.js +120 -0
  208. package/lib/schema-initializer/items/CreateSubmitActionInitializer.d.ts +1 -0
  209. package/lib/schema-initializer/items/CreateSubmitActionInitializer.js +37 -0
  210. package/lib/schema-initializer/items/CustomizeActionInitializer.d.ts +1 -0
  211. package/lib/schema-initializer/items/CustomizeActionInitializer.js +24 -0
  212. package/lib/schema-initializer/items/DataBlockInitializer.d.ts +1 -0
  213. package/lib/schema-initializer/items/DataBlockInitializer.js +104 -0
  214. package/lib/schema-initializer/items/DestroyActionInitializer.d.ts +1 -0
  215. package/lib/schema-initializer/items/DestroyActionInitializer.js +40 -0
  216. package/lib/schema-initializer/items/DetailsBlockInitializer.d.ts +1 -0
  217. package/lib/schema-initializer/items/DetailsBlockInitializer.js +71 -0
  218. package/lib/schema-initializer/items/FilterActionInitializer.d.ts +1 -0
  219. package/lib/schema-initializer/items/FilterActionInitializer.js +37 -0
  220. package/lib/schema-initializer/items/FormBlockInitializer.d.ts +1 -0
  221. package/lib/schema-initializer/items/FormBlockInitializer.js +45 -0
  222. package/lib/schema-initializer/items/G2PlotInitializer.d.ts +1 -0
  223. package/lib/schema-initializer/items/G2PlotInitializer.js +38 -0
  224. package/lib/schema-initializer/items/InitializerWithSwitch.d.ts +1 -0
  225. package/lib/schema-initializer/items/InitializerWithSwitch.js +47 -0
  226. package/lib/schema-initializer/items/KanbanBlockInitializer.d.ts +1 -0
  227. package/lib/schema-initializer/items/KanbanBlockInitializer.js +163 -0
  228. package/lib/schema-initializer/items/MarkdownBlockInitializer.d.ts +1 -0
  229. package/lib/schema-initializer/items/MarkdownBlockInitializer.js +47 -0
  230. package/lib/schema-initializer/items/PrintActionInitializer.d.ts +1 -0
  231. package/lib/schema-initializer/items/PrintActionInitializer.js +36 -0
  232. package/lib/schema-initializer/items/RecordAssociationBlockInitializer.d.ts +1 -0
  233. package/lib/schema-initializer/items/RecordAssociationBlockInitializer.js +107 -0
  234. package/lib/schema-initializer/items/RecordAssociationCalendarBlockInitializer.d.ts +1 -0
  235. package/lib/schema-initializer/items/RecordAssociationCalendarBlockInitializer.js +185 -0
  236. package/lib/schema-initializer/items/RecordAssociationDetailsBlockInitializer.d.ts +1 -0
  237. package/lib/schema-initializer/items/RecordAssociationDetailsBlockInitializer.js +107 -0
  238. package/lib/schema-initializer/items/RecordAssociationFormBlockInitializer.d.ts +1 -0
  239. package/lib/schema-initializer/items/RecordAssociationFormBlockInitializer.js +128 -0
  240. package/lib/schema-initializer/items/RecordFormBlockInitializer.d.ts +1 -0
  241. package/lib/schema-initializer/items/RecordFormBlockInitializer.js +127 -0
  242. package/lib/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.d.ts +1 -0
  243. package/lib/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.js +133 -0
  244. package/lib/schema-initializer/items/RecordReadPrettyFormBlockInitializer.d.ts +1 -0
  245. package/lib/schema-initializer/items/RecordReadPrettyFormBlockInitializer.js +132 -0
  246. package/lib/schema-initializer/items/RefreshActionInitializer.d.ts +1 -0
  247. package/lib/schema-initializer/items/RefreshActionInitializer.js +36 -0
  248. package/lib/schema-initializer/items/SubmitActionInitializer.d.ts +1 -0
  249. package/lib/schema-initializer/items/SubmitActionInitializer.js +37 -0
  250. package/lib/schema-initializer/items/TableActionColumnInitializer.d.ts +1 -0
  251. package/lib/schema-initializer/items/TableActionColumnInitializer.js +47 -0
  252. package/lib/schema-initializer/items/TableBlockInitializer.d.ts +1 -0
  253. package/lib/schema-initializer/items/TableBlockInitializer.js +71 -0
  254. package/lib/schema-initializer/items/TableCollectionFieldInitializer.d.ts +1 -0
  255. package/lib/schema-initializer/items/TableCollectionFieldInitializer.js +28 -0
  256. package/lib/schema-initializer/items/TableSelectorInitializer.d.ts +1 -0
  257. package/lib/schema-initializer/items/TableSelectorInitializer.js +84 -0
  258. package/lib/schema-initializer/items/UpdateActionInitializer.d.ts +1 -0
  259. package/lib/schema-initializer/items/UpdateActionInitializer.js +72 -0
  260. package/lib/schema-initializer/items/UpdateSubmitActionInitializer.d.ts +1 -0
  261. package/lib/schema-initializer/items/UpdateSubmitActionInitializer.js +37 -0
  262. package/lib/schema-initializer/items/ViewActionInitializer.d.ts +1 -0
  263. package/lib/schema-initializer/items/ViewActionInitializer.js +71 -0
  264. package/lib/schema-initializer/items/index.d.ts +35 -35
  265. package/lib/schema-initializer/items/index.js +400 -1659
  266. package/lib/schema-initializer/style.less +4 -0
  267. package/lib/schema-templates/SchemaTemplateManagerProvider.js +2 -5
  268. package/lib/system-settings/SystemSettingsShortcut.js +7 -0
  269. package/lib/user/SigninPage.d.ts +11 -2
  270. package/lib/user/SigninPage.js +150 -34
  271. package/lib/user/SignupPage.d.ts +7 -1
  272. package/lib/user/SignupPage.js +56 -10
  273. package/lib/user/VerificationCode.d.ts +7 -0
  274. package/lib/user/VerificationCode.js +148 -0
  275. package/package.json +6 -4
@@ -0,0 +1,4 @@
1
+ .nb-menu-item-group {
2
+ max-height: 60vh;
3
+ overflow: auto;
4
+ }
@@ -75,11 +75,8 @@ export var useSchemaTemplate = function useSchemaTemplate() {
75
75
 
76
76
  var fieldSchema = useFieldSchema();
77
77
  var schemaId = fieldSchema['x-uid'];
78
- var templateKey = fieldSchema['x-template-key'];
79
- console.log('templateKey', {
80
- schemaId: schemaId,
81
- templateKey: templateKey
82
- });
78
+ var templateKey = fieldSchema['x-template-key']; // console.log('templateKey', { schemaId, templateKey })
79
+
83
80
  return useMemo(function () {
84
81
  return getTemplateBySchema(fieldSchema);
85
82
  }, [schemaId, templateKey]);
@@ -192,6 +192,13 @@ var schema = {
192
192
  'x-component': 'Checkbox',
193
193
  'x-decorator': 'FormItem'
194
194
  },
195
+ smsAuthEnabled: {
196
+ type: 'boolean',
197
+ default: false,
198
+ 'x-content': '{{t("Enable SMS authentication")}}',
199
+ 'x-component': 'Checkbox',
200
+ 'x-decorator': 'FormItem'
201
+ },
195
202
  footer1: {
196
203
  type: 'void',
197
204
  'x-component': 'Action.Drawer.Footer',
@@ -1,4 +1,13 @@
1
- export declare const useSignin: () => {
1
+ import { ISchema } from '@formily/react';
2
+ export declare const usePasswordSignIn: () => {
2
3
  run(): Promise<void>;
3
4
  };
4
- export declare const SigninPage: () => JSX.Element;
5
+ export declare function usePhoneSignIn(): {
6
+ run(): Promise<void>;
7
+ };
8
+ export interface SigninPageProps {
9
+ schema?: ISchema;
10
+ components?: any;
11
+ scope?: any;
12
+ }
13
+ export declare const SigninPage: (props: SigninPageProps) => JSX.Element;
@@ -1,15 +1,23 @@
1
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
+
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+
5
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+
1
7
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
2
8
 
3
9
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
4
10
 
5
11
  import { useForm } from '@formily/react';
6
- import { uid } from '@formily/shared';
7
- import React from 'react';
8
- import { useHistory, useLocation } from 'react-router-dom';
12
+ import { Tabs } from 'antd';
13
+ import React, { useCallback } from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { Link, useHistory, useLocation } from 'react-router-dom';
9
16
  import { SchemaComponent, useAPIClient, useCurrentDocumentTitle, useSystemSettings } from '..';
10
- var schema = {
17
+ import VerificationCode from './VerificationCode';
18
+ var passwordForm = {
11
19
  type: 'object',
12
- name: uid(),
20
+ name: 'passwordForm',
13
21
  'x-component': 'FormV2',
14
22
  properties: {
15
23
  email: {
@@ -45,40 +53,33 @@ var schema = {
45
53
  htmlType: 'submit',
46
54
  block: true,
47
55
  type: 'primary',
48
- useAction: '{{ useSignin }}',
56
+ useAction: '{{ usePasswordSignIn }}',
49
57
  style: {
50
58
  width: '100%'
51
59
  }
52
60
  }
53
61
  }
54
62
  }
55
- },
56
- link: {
57
- type: 'void',
58
- 'x-component': 'div',
59
- 'x-visible': '{{allowSignUp}}',
60
- properties: {
61
- link: {
62
- title: '{{t("Create an account")}}',
63
- type: 'void',
64
- 'x-component': 'Link',
65
- 'x-content': '{{t("Create an account")}}',
66
- 'x-component-props': {
67
- to: '/signup'
68
- }
69
- }
70
- }
71
63
  }
72
64
  }
73
65
  };
74
- export var useSignin = function useSignin() {
66
+
67
+ function useRedirect() {
75
68
  var _location$query;
76
69
 
70
+ var next = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/admin';
77
71
  var location = useLocation();
78
72
  var history = useHistory();
73
+ var redirect = location === null || location === void 0 ? void 0 : (_location$query = location['query']) === null || _location$query === void 0 ? void 0 : _location$query.redirect;
74
+ return useCallback(function () {
75
+ history.push(redirect || '/admin');
76
+ }, [redirect]);
77
+ }
78
+
79
+ export var usePasswordSignIn = function usePasswordSignIn() {
79
80
  var form = useForm();
80
81
  var api = useAPIClient();
81
- var redirect = location === null || location === void 0 ? void 0 : (_location$query = location['query']) === null || _location$query === void 0 ? void 0 : _location$query.redirect;
82
+ var redirect = useRedirect();
82
83
  return {
83
84
  run: function run() {
84
85
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
@@ -94,7 +95,7 @@ export var useSignin = function useSignin() {
94
95
  return api.auth.signIn(form.values);
95
96
 
96
97
  case 4:
97
- history.push(redirect || '/admin');
98
+ redirect();
98
99
 
99
100
  case 5:
100
101
  case "end":
@@ -106,17 +107,123 @@ export var useSignin = function useSignin() {
106
107
  }
107
108
  };
108
109
  };
109
- export var SigninPage = function SigninPage() {
110
- var _ctx$data, _ctx$data$data;
110
+ var phoneForm = {
111
+ type: 'object',
112
+ name: 'phoneForm',
113
+ 'x-component': 'Form',
114
+ properties: {
115
+ phone: {
116
+ type: 'string',
117
+ required: true,
118
+ 'x-component': 'Input',
119
+ 'x-validator': 'phone',
120
+ 'x-decorator': 'FormItem',
121
+ 'x-component-props': {
122
+ placeholder: '{{t("Phone")}}',
123
+ style: {}
124
+ }
125
+ },
126
+ code: {
127
+ type: 'string',
128
+ required: true,
129
+ 'x-component': 'VerificationCode',
130
+ 'x-component-props': {
131
+ actionType: 'users:signin',
132
+ targetFieldName: 'phone'
133
+ },
134
+ 'x-decorator': 'FormItem'
135
+ },
136
+ actions: {
137
+ title: '{{t("Sign in")}}',
138
+ type: 'void',
139
+ 'x-component': 'Action',
140
+ 'x-component-props': {
141
+ htmlType: 'submit',
142
+ block: true,
143
+ type: 'primary',
144
+ useAction: '{{ usePhoneSignIn }}',
145
+ style: {
146
+ width: '100%'
147
+ }
148
+ }
149
+ }
150
+ }
151
+ };
152
+ export function usePhoneSignIn() {
153
+ var form = useForm();
154
+ var api = useAPIClient();
155
+ var redirect = useRedirect();
156
+ return {
157
+ run: function run() {
158
+ return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
159
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
160
+ while (1) {
161
+ switch (_context2.prev = _context2.next) {
162
+ case 0:
163
+ _context2.next = 2;
164
+ return form.submit();
165
+
166
+ case 2:
167
+ _context2.next = 4;
168
+ return api.auth.signIn(form.values, 'sms');
169
+
170
+ case 4:
171
+ redirect();
172
+
173
+ case 5:
174
+ case "end":
175
+ return _context2.stop();
176
+ }
177
+ }
178
+ }, _callee2);
179
+ }))();
180
+ }
181
+ };
182
+ }
183
+ export var SigninPage = function SigninPage(props) {
184
+ var _ctx$data;
185
+
186
+ var _useTranslation = useTranslation(),
187
+ t = _useTranslation.t;
111
188
 
112
189
  useCurrentDocumentTitle('Signin');
113
190
  var ctx = useSystemSettings();
114
- var allowSignUp = ctx === null || ctx === void 0 ? void 0 : (_ctx$data = ctx.data) === null || _ctx$data === void 0 ? void 0 : (_ctx$data$data = _ctx$data.data) === null || _ctx$data$data === void 0 ? void 0 : _ctx$data$data.allowSignUp;
115
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(SchemaComponent, {
191
+
192
+ var _ref = (ctx === null || ctx === void 0 ? void 0 : (_ctx$data = ctx.data) === null || _ctx$data === void 0 ? void 0 : _ctx$data.data) || {},
193
+ allowSignUp = _ref.allowSignUp,
194
+ smsAuthEnabled = _ref.smsAuthEnabled;
195
+
196
+ var schema = props.schema,
197
+ components = props.components,
198
+ scope = props.scope;
199
+ return /*#__PURE__*/React.createElement("div", null, smsAuthEnabled ? /*#__PURE__*/React.createElement(Tabs, {
200
+ defaultActiveKey: "password"
201
+ }, /*#__PURE__*/React.createElement(Tabs.TabPane, {
202
+ tab: t('Sign in via account'),
203
+ key: "password"
204
+ }, /*#__PURE__*/React.createElement(SchemaComponent, {
116
205
  scope: {
117
- useSignin: useSignin,
118
- allowSignUp: allowSignUp
206
+ usePasswordSignIn: usePasswordSignIn
119
207
  },
120
- schema: schema
121
- }));
208
+ schema: schema || passwordForm
209
+ })), /*#__PURE__*/React.createElement(Tabs.TabPane, {
210
+ tab: t('Sign in via phone'),
211
+ key: "phone"
212
+ }, /*#__PURE__*/React.createElement(SchemaComponent, {
213
+ schema: phoneForm,
214
+ scope: _objectSpread({
215
+ usePhoneSignIn: usePhoneSignIn
216
+ }, scope),
217
+ components: _objectSpread({
218
+ VerificationCode: VerificationCode
219
+ }, components)
220
+ }))) : /*#__PURE__*/React.createElement(SchemaComponent, {
221
+ components: _objectSpread({}, components),
222
+ scope: _objectSpread({
223
+ usePasswordSignIn: usePasswordSignIn
224
+ }, scope),
225
+ schema: schema || passwordForm
226
+ }), allowSignUp && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Link, {
227
+ to: "/signup"
228
+ }, t('Create an account'))));
122
229
  };
@@ -1,4 +1,10 @@
1
+ import { ISchema } from '@formily/react';
1
2
  export declare const useSignup: () => {
2
3
  run(): Promise<void>;
3
4
  };
4
- export declare const SignupPage: () => JSX.Element;
5
+ export interface SignupPageProps {
6
+ schema?: ISchema;
7
+ components?: any;
8
+ scope?: any;
9
+ }
10
+ export declare const SignupPage: (props: SignupPageProps) => JSX.Element;
@@ -1,3 +1,9 @@
1
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
+
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+
5
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+
1
7
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
2
8
 
3
9
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
@@ -6,9 +12,11 @@ import { useForm } from '@formily/react';
6
12
  import { uid } from '@formily/shared';
7
13
  import { message } from 'antd';
8
14
  import React from 'react';
15
+ import { useTranslation } from 'react-i18next';
9
16
  import { Redirect, useHistory } from 'react-router-dom';
10
17
  import { SchemaComponent, useAPIClient, useCurrentDocumentTitle, useSystemSettings } from '..';
11
- var schema = {
18
+ import VerificationCode from './VerificationCode';
19
+ var signupPageSchema = {
12
20
  type: 'object',
13
21
  name: uid(),
14
22
  'x-component': 'FormV2',
@@ -24,6 +32,29 @@ var schema = {
24
32
  style: {}
25
33
  }
26
34
  },
35
+ phone: {
36
+ type: 'string',
37
+ required: true,
38
+ 'x-component': 'Input',
39
+ 'x-validator': 'phone',
40
+ 'x-decorator': 'FormItem',
41
+ 'x-component-props': {
42
+ placeholder: '{{t("Phone")}}',
43
+ style: {}
44
+ },
45
+ 'x-visible': '{{smsAuthEnabled}}'
46
+ },
47
+ code: {
48
+ type: 'string',
49
+ required: true,
50
+ 'x-component': 'VerificationCode',
51
+ 'x-component-props': {
52
+ actionType: 'users:signup',
53
+ targetFieldName: 'phone'
54
+ },
55
+ 'x-decorator': 'FormItem',
56
+ 'x-visible': '{{smsAuthEnabled}}'
57
+ },
27
58
  password: {
28
59
  type: 'string',
29
60
  required: true,
@@ -50,7 +81,6 @@ var schema = {
50
81
  'x-decorator': 'FormItem',
51
82
  'x-component-props': {
52
83
  placeholder: '{{t("Confirm password")}}',
53
- checkStrength: true,
54
84
  style: {}
55
85
  },
56
86
  'x-reactions': [{
@@ -102,6 +132,10 @@ export var useSignup = function useSignup() {
102
132
  var history = useHistory();
103
133
  var form = useForm();
104
134
  var api = useAPIClient();
135
+
136
+ var _useTranslation = useTranslation(),
137
+ t = _useTranslation.t;
138
+
105
139
  return {
106
140
  run: function run() {
107
141
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
@@ -119,7 +153,7 @@ export var useSignup = function useSignup() {
119
153
  });
120
154
 
121
155
  case 4:
122
- message.success('注册成功,即将跳转登录页');
156
+ message.success('Sign up successfully, and automatically jump to the sign in page');
123
157
  setTimeout(function () {
124
158
  history.push('/signin');
125
159
  }, 2000);
@@ -134,12 +168,15 @@ export var useSignup = function useSignup() {
134
168
  }
135
169
  };
136
170
  };
137
- export var SignupPage = function SignupPage() {
138
- var _ctx$data, _ctx$data$data;
171
+ export var SignupPage = function SignupPage(props) {
172
+ var _ctx$data;
139
173
 
140
174
  useCurrentDocumentTitle('Signup');
141
175
  var ctx = useSystemSettings();
142
- var allowSignUp = ctx === null || ctx === void 0 ? void 0 : (_ctx$data = ctx.data) === null || _ctx$data === void 0 ? void 0 : (_ctx$data$data = _ctx$data.data) === null || _ctx$data$data === void 0 ? void 0 : _ctx$data$data.allowSignUp;
176
+
177
+ var _ref = (ctx === null || ctx === void 0 ? void 0 : (_ctx$data = ctx.data) === null || _ctx$data === void 0 ? void 0 : _ctx$data.data) || {},
178
+ allowSignUp = _ref.allowSignUp,
179
+ smsAuthEnabled = _ref.smsAuthEnabled;
143
180
 
144
181
  if (!allowSignUp) {
145
182
  return /*#__PURE__*/React.createElement(Redirect, {
@@ -147,10 +184,17 @@ export var SignupPage = function SignupPage() {
147
184
  });
148
185
  }
149
186
 
187
+ var schema = props.schema,
188
+ components = props.components,
189
+ scope = props.scope;
150
190
  return /*#__PURE__*/React.createElement(SchemaComponent, {
151
- schema: schema,
152
- scope: {
153
- useSignup: useSignup
154
- }
191
+ schema: schema || signupPageSchema,
192
+ components: _objectSpread({
193
+ VerificationCode: VerificationCode
194
+ }, components),
195
+ scope: _objectSpread({
196
+ useSignup: useSignup,
197
+ smsAuthEnabled: smsAuthEnabled
198
+ }, scope)
155
199
  });
156
200
  };
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export default function VerificationCode({ targetFieldName, actionType, value, onChange }: {
3
+ targetFieldName?: string;
4
+ actionType: any;
5
+ value: any;
6
+ onChange: any;
7
+ }): JSX.Element;
@@ -0,0 +1,129 @@
1
+ var _templateObject;
2
+
3
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
4
+
5
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
6
+
7
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
8
+
9
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
10
+
11
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
+
13
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
14
+
15
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
16
+
17
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
18
+
19
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
+
21
+ import { useTranslation } from "react-i18next";
22
+ import { css } from '@emotion/css';
23
+ import { useAPIClient } from "../api-client";
24
+ import { useForm } from "@formily/react";
25
+ import { useEffect, useRef, useState } from "react";
26
+ import { Button, Input, message } from "antd";
27
+ import React from "react";
28
+ export default function VerificationCode(_ref) {
29
+ var _ref$targetFieldName = _ref.targetFieldName,
30
+ targetFieldName = _ref$targetFieldName === void 0 ? 'phone' : _ref$targetFieldName,
31
+ actionType = _ref.actionType,
32
+ value = _ref.value,
33
+ onChange = _ref.onChange;
34
+
35
+ var _useTranslation = useTranslation(),
36
+ t = _useTranslation.t;
37
+
38
+ var api = useAPIClient();
39
+ var form = useForm();
40
+
41
+ var _useState = useState(0),
42
+ _useState2 = _slicedToArray(_useState, 2),
43
+ count = _useState2[0],
44
+ setCountdown = _useState2[1];
45
+
46
+ var timer = useRef(null);
47
+ useEffect(function () {
48
+ if (count <= 0 && timer.current) {
49
+ clearInterval(timer.current);
50
+ }
51
+ }, [count]);
52
+
53
+ function onGetCode() {
54
+ return _onGetCode.apply(this, arguments);
55
+ }
56
+
57
+ function _onGetCode() {
58
+ _onGetCode = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
59
+ var _yield$api$resource$c, data, expiresIn;
60
+
61
+ return regeneratorRuntime.wrap(function _callee$(_context) {
62
+ while (1) {
63
+ switch (_context.prev = _context.next) {
64
+ case 0:
65
+ if (!(count > 0)) {
66
+ _context.next = 2;
67
+ break;
68
+ }
69
+
70
+ return _context.abrupt("return");
71
+
72
+ case 2:
73
+ _context.prev = 2;
74
+ _context.next = 5;
75
+ return api.resource('verifications').create({
76
+ values: {
77
+ type: actionType,
78
+ phone: form.values[targetFieldName]
79
+ }
80
+ });
81
+
82
+ case 5:
83
+ _yield$api$resource$c = _context.sent;
84
+ data = _yield$api$resource$c.data.data;
85
+ message.success(t('Operation succeeded'));
86
+
87
+ if (value) {
88
+ onChange('');
89
+ }
90
+
91
+ expiresIn = data.expiresAt ? Math.ceil((Date.parse(data.expiresAt) - Date.now()) / 1000) : 60;
92
+ setCountdown(expiresIn);
93
+ timer.current = setInterval(function () {
94
+ setCountdown(function (count) {
95
+ return count - 1;
96
+ });
97
+ }, 1000);
98
+ _context.next = 17;
99
+ break;
100
+
101
+ case 14:
102
+ _context.prev = 14;
103
+ _context.t0 = _context["catch"](2);
104
+ console.error(_context.t0);
105
+
106
+ case 17:
107
+ case "end":
108
+ return _context.stop();
109
+ }
110
+ }
111
+ }, _callee, null, [[2, 14]]);
112
+ }));
113
+ return _onGetCode.apply(this, arguments);
114
+ }
115
+
116
+ ;
117
+ return /*#__PURE__*/React.createElement("fieldset", {
118
+ className: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n gap: .5em;\n "])))
119
+ }, /*#__PURE__*/React.createElement(Input, {
120
+ value: value,
121
+ onChange: onChange,
122
+ placeholder: t('Verification code')
123
+ }), /*#__PURE__*/React.createElement(Button, {
124
+ onClick: onGetCode,
125
+ disabled: count > 0
126
+ }, count > 0 ? t('Retry after {{count}} seconds', {
127
+ count: count
128
+ }) : t('Send code')));
129
+ }
@@ -259,12 +259,12 @@ var useTableBlockProps = function useTableBlockProps() {
259
259
  }))();
260
260
  },
261
261
  onChange: function onChange(_ref2, filters, sorter) {
262
- var _ctx$service$params;
262
+ var _ctx$service$params, _ctx$service$params$, _ctx$service$params2;
263
263
 
264
264
  var current = _ref2.current,
265
265
  pageSize = _ref2.pageSize;
266
- var sort = sorter.order ? sorter.order === "ascend" ? [sorter.field] : ["-".concat(sorter.field)] : globalSort || null;
267
- ctx.service.run(_objectSpread(_objectSpread({}, (_ctx$service$params = ctx.service.params) === null || _ctx$service$params === void 0 ? void 0 : _ctx$service$params[0]), {}, {
266
+ var sort = sorter.order ? sorter.order === "ascend" ? [sorter.field] : ["-".concat(sorter.field)] : globalSort || ((_ctx$service$params = ctx.service.params) === null || _ctx$service$params === void 0 ? void 0 : (_ctx$service$params$ = _ctx$service$params[0]) === null || _ctx$service$params$ === void 0 ? void 0 : _ctx$service$params$.sort);
267
+ ctx.service.run(_objectSpread(_objectSpread({}, (_ctx$service$params2 = ctx.service.params) === null || _ctx$service$params2 === void 0 ? void 0 : _ctx$service$params2[0]), {}, {
268
268
  page: current,
269
269
  pageSize: pageSize,
270
270
  sort: sort