@nocobase/client 0.7.6-alpha.2 → 0.8.0-alpha.10

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 (267) hide show
  1. package/es/acl/ACLShortcut.d.ts +2 -0
  2. package/es/acl/ACLShortcut.js +31 -2
  3. package/es/api-client/APIClient.d.ts +1 -0
  4. package/es/api-client/APIClient.js +6 -1
  5. package/es/application/Application.d.ts +3 -1
  6. package/es/application/Application.js +131 -39
  7. package/es/block-provider/BlockProvider.js +12 -1
  8. package/es/block-provider/CalendarBlockProvider.d.ts +1 -0
  9. package/es/block-provider/CalendarBlockProvider.js +6 -3
  10. package/es/block-provider/TableSelectorProvider.js +21 -6
  11. package/es/block-provider/hooks/index.d.ts +6 -0
  12. package/es/block-provider/hooks/index.js +485 -115
  13. package/es/collection-manager/CollectionManagerProvider.js +26 -45
  14. package/es/collection-manager/CollectionManagerShortcut.d.ts +2 -0
  15. package/es/collection-manager/CollectionManagerShortcut.js +38 -3
  16. package/es/collection-manager/Configuration/AddFieldAction.d.ts +5 -1
  17. package/es/collection-manager/Configuration/AddFieldAction.js +48 -13
  18. package/es/collection-manager/Configuration/CollectionFieldsTable.d.ts +15 -0
  19. package/es/collection-manager/Configuration/CollectionFieldsTable.js +73 -0
  20. package/es/collection-manager/Configuration/CollectionFieldsTableArray.d.ts +8 -0
  21. package/es/collection-manager/Configuration/CollectionFieldsTableArray.js +250 -0
  22. package/es/collection-manager/Configuration/ConfigurationTable.js +6 -2
  23. package/es/collection-manager/Configuration/EditFieldAction.d.ts +1 -0
  24. package/es/collection-manager/Configuration/EditFieldAction.js +24 -11
  25. package/es/collection-manager/Configuration/index.d.ts +3 -0
  26. package/es/collection-manager/Configuration/index.js +3 -0
  27. package/es/collection-manager/Configuration/schemas/collectionFields.js +4 -4
  28. package/es/collection-manager/Configuration/schemas/collections.js +1 -1
  29. package/es/collection-manager/index.d.ts +1 -0
  30. package/es/collection-manager/index.js +2 -1
  31. package/es/collection-manager/interfaces/index.d.ts +1 -0
  32. package/es/collection-manager/interfaces/index.js +1 -0
  33. package/es/collection-manager/interfaces/json.d.ts +2 -0
  34. package/es/collection-manager/interfaces/json.js +48 -0
  35. package/es/collection-manager/interfaces/m2o.js +3 -3
  36. package/es/collection-manager/interfaces/o2m.js +5 -6
  37. package/es/collection-manager/interfaces/o2o.js +5 -5
  38. package/es/collection-manager/interfaces/properties/index.d.ts +14 -0
  39. package/es/collection-manager/interfaces/properties/index.js +24 -1
  40. package/es/collection-manager/interfaces/sequence.js +13 -9
  41. package/es/index.d.ts +1 -0
  42. package/es/index.js +1 -0
  43. package/es/locale/en_US.d.ts +24 -1
  44. package/es/locale/en_US.js +25 -2
  45. package/es/locale/ja_JP.d.ts +2 -1
  46. package/es/locale/ja_JP.js +2 -1
  47. package/es/locale/ru_RU.d.ts +2 -1
  48. package/es/locale/ru_RU.js +2 -1
  49. package/es/locale/tr_TR.d.ts +1 -1
  50. package/es/locale/tr_TR.js +1 -1
  51. package/es/locale/zh_CN.d.ts +50 -1
  52. package/es/locale/zh_CN.js +51 -2
  53. package/es/plugin-manager/PluginManager.js +35 -23
  54. package/es/pm/PluginManagerLink.d.ts +2 -0
  55. package/es/pm/PluginManagerLink.js +112 -0
  56. package/es/pm/index.d.ts +6 -0
  57. package/es/pm/index.js +422 -0
  58. package/es/route-switch/antd/admin-layout/index.js +1 -1
  59. package/es/schema-component/antd/action/Action.Designer.js +35 -12
  60. package/es/schema-component/antd/action/Action.Modal.js +4 -2
  61. package/es/schema-component/antd/action/Action.js +3 -3
  62. package/es/schema-component/antd/action/context.d.ts +2 -0
  63. package/es/schema-component/antd/action/hooks.d.ts +1 -0
  64. package/es/schema-component/antd/calendar/Calendar.Designer.js +19 -6
  65. package/es/schema-component/antd/calendar/Calendar.js +137 -23
  66. package/es/schema-component/antd/calendar/DeleteEvent.d.ts +3 -0
  67. package/es/schema-component/antd/calendar/DeleteEvent.js +147 -0
  68. package/es/schema-component/antd/calendar/Title.js +18 -3
  69. package/es/schema-component/antd/calendar/components/Header.d.ts +10 -0
  70. package/es/schema-component/antd/calendar/components/Header.js +43 -0
  71. package/es/schema-component/antd/calendar/index.js +2 -0
  72. package/es/schema-component/antd/calendar/style.less +53 -9
  73. package/es/schema-component/antd/calendar/types.d.ts +6 -0
  74. package/es/schema-component/antd/calendar/utils.d.ts +2 -0
  75. package/es/schema-component/antd/calendar/utils.js +7 -0
  76. package/es/schema-component/antd/checkbox/Checkbox.js +13 -4
  77. package/es/schema-component/antd/formula-input/FormulaInput.js +28 -37
  78. package/es/schema-component/antd/input/Input.d.ts +1 -0
  79. package/es/schema-component/antd/input/Input.js +2 -0
  80. package/es/schema-component/antd/input/Json.d.ts +6 -0
  81. package/es/schema-component/antd/input/Json.js +41 -0
  82. package/es/schema-component/antd/input/ReadPretty.d.ts +3 -0
  83. package/es/schema-component/antd/input/ReadPretty.js +15 -0
  84. package/es/schema-component/antd/input/index.d.ts +1 -0
  85. package/es/schema-component/antd/input/index.js +2 -1
  86. package/es/schema-component/antd/markdown/Markdown.Void.js +5 -2
  87. package/es/schema-component/antd/radio/Radio.js +2 -1
  88. package/es/schema-component/antd/select/ReadPretty.js +2 -1
  89. package/es/schema-component/antd/select/Select.js +25 -1
  90. package/es/schema-component/antd/table-v2/TableSelectorDesigner.js +16 -2
  91. package/es/schema-component/antd/upload/Upload.js +2 -1
  92. package/es/schema-component/antd/upload/shared.js +5 -6
  93. package/es/schema-component/antd/upload/type.d.ts +2 -0
  94. package/es/schema-initializer/buttons/BulkEditFormItemInitializers.d.ts +1 -0
  95. package/es/schema-initializer/buttons/BulkEditFormItemInitializers.js +50 -0
  96. package/es/schema-initializer/buttons/CalendarFormActionInitializers.d.ts +143 -0
  97. package/es/schema-initializer/buttons/CalendarFormActionInitializers.js +146 -0
  98. package/es/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.d.ts +1 -0
  99. package/es/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.js +35 -0
  100. package/es/schema-initializer/buttons/FormActionInitializers.d.ts +132 -0
  101. package/es/schema-initializer/buttons/FormActionInitializers.js +118 -0
  102. package/es/schema-initializer/buttons/RecordBlockInitializers.js +2 -1
  103. package/es/schema-initializer/buttons/TabPaneInitializers.d.ts +1 -0
  104. package/es/schema-initializer/buttons/TabPaneInitializers.js +13 -0
  105. package/es/schema-initializer/buttons/TableActionInitializers.d.ts +56 -2
  106. package/es/schema-initializer/buttons/TableActionInitializers.js +45 -0
  107. package/es/schema-initializer/buttons/index.d.ts +3 -0
  108. package/es/schema-initializer/buttons/index.js +3 -0
  109. package/es/schema-initializer/components/BulkEditField.d.ts +7 -0
  110. package/es/schema-initializer/components/BulkEditField.js +187 -0
  111. package/es/schema-initializer/components/index.d.ts +1 -0
  112. package/es/schema-initializer/components/index.js +2 -1
  113. package/es/schema-initializer/items/BlockInitializer.js +8 -8
  114. package/es/schema-initializer/items/BulkEditSubmitActionInitializer.d.ts +1 -0
  115. package/es/schema-initializer/items/BulkEditSubmitActionInitializer.js +24 -0
  116. package/es/schema-initializer/items/CreateFormBulkEditBlockInitializer.d.ts +1 -0
  117. package/es/schema-initializer/items/CreateFormBulkEditBlockInitializer.js +103 -0
  118. package/es/schema-initializer/items/CustomizeBulkEditActionInitializer.d.ts +1 -0
  119. package/es/schema-initializer/items/CustomizeBulkEditActionInitializer.js +61 -0
  120. package/es/schema-initializer/items/DeleteEventActionInitializer.d.ts +1 -0
  121. package/es/schema-initializer/items/DeleteEventActionInitializer.js +27 -0
  122. package/es/schema-initializer/items/RecordReadPrettyFormBlockInitializer.js +7 -7
  123. package/es/schema-initializer/items/index.d.ts +4 -0
  124. package/es/schema-initializer/items/index.js +4 -0
  125. package/es/schema-initializer/utils.d.ts +1 -0
  126. package/es/schema-initializer/utils.js +74 -15
  127. package/es/schema-settings/SchemaSettings.d.ts +6 -0
  128. package/es/schema-settings/SchemaSettings.js +4 -1
  129. package/es/schema-templates/BlockTemplatePage.d.ts +1 -0
  130. package/es/schema-templates/BlockTemplatePage.js +7 -0
  131. package/es/schema-templates/SchemaTemplateShortcut.js +1 -1
  132. package/es/system-settings/SystemSettingsShortcut.d.ts +2 -0
  133. package/es/system-settings/SystemSettingsShortcut.js +134 -5
  134. package/lib/acl/ACLShortcut.d.ts +2 -0
  135. package/lib/acl/ACLShortcut.js +41 -4
  136. package/lib/api-client/APIClient.d.ts +1 -0
  137. package/lib/api-client/APIClient.js +6 -1
  138. package/lib/application/Application.d.ts +3 -1
  139. package/lib/application/Application.js +139 -39
  140. package/lib/block-provider/BlockProvider.js +11 -0
  141. package/lib/block-provider/CalendarBlockProvider.d.ts +1 -0
  142. package/lib/block-provider/CalendarBlockProvider.js +6 -3
  143. package/lib/block-provider/TableSelectorProvider.js +21 -6
  144. package/lib/block-provider/hooks/index.d.ts +6 -0
  145. package/lib/block-provider/hooks/index.js +496 -115
  146. package/lib/collection-manager/CollectionManagerProvider.js +28 -47
  147. package/lib/collection-manager/CollectionManagerShortcut.d.ts +2 -0
  148. package/lib/collection-manager/CollectionManagerShortcut.js +47 -4
  149. package/lib/collection-manager/Configuration/AddFieldAction.d.ts +5 -1
  150. package/lib/collection-manager/Configuration/AddFieldAction.js +52 -12
  151. package/lib/collection-manager/Configuration/CollectionFieldsTable.d.ts +15 -0
  152. package/lib/collection-manager/Configuration/CollectionFieldsTable.js +92 -0
  153. package/lib/collection-manager/Configuration/CollectionFieldsTableArray.d.ts +8 -0
  154. package/lib/collection-manager/Configuration/CollectionFieldsTableArray.js +273 -0
  155. package/lib/collection-manager/Configuration/ConfigurationTable.js +7 -2
  156. package/lib/collection-manager/Configuration/EditFieldAction.d.ts +1 -0
  157. package/lib/collection-manager/Configuration/EditFieldAction.js +26 -10
  158. package/lib/collection-manager/Configuration/index.d.ts +3 -0
  159. package/lib/collection-manager/Configuration/index.js +39 -0
  160. package/lib/collection-manager/Configuration/schemas/collectionFields.js +4 -4
  161. package/lib/collection-manager/Configuration/schemas/collections.js +1 -1
  162. package/lib/collection-manager/index.d.ts +1 -0
  163. package/lib/collection-manager/index.js +14 -0
  164. package/lib/collection-manager/interfaces/index.d.ts +1 -0
  165. package/lib/collection-manager/interfaces/index.js +13 -0
  166. package/lib/collection-manager/interfaces/json.d.ts +2 -0
  167. package/lib/collection-manager/interfaces/json.js +58 -0
  168. package/lib/collection-manager/interfaces/m2o.js +2 -2
  169. package/lib/collection-manager/interfaces/o2m.js +4 -5
  170. package/lib/collection-manager/interfaces/o2o.js +4 -4
  171. package/lib/collection-manager/interfaces/properties/index.d.ts +14 -0
  172. package/lib/collection-manager/interfaces/properties/index.js +26 -2
  173. package/lib/collection-manager/interfaces/sequence.js +13 -9
  174. package/lib/index.d.ts +1 -0
  175. package/lib/index.js +13 -0
  176. package/lib/locale/en_US.d.ts +24 -1
  177. package/lib/locale/en_US.js +25 -2
  178. package/lib/locale/ja_JP.d.ts +2 -1
  179. package/lib/locale/ja_JP.js +2 -1
  180. package/lib/locale/ru_RU.d.ts +2 -1
  181. package/lib/locale/ru_RU.js +2 -1
  182. package/lib/locale/tr_TR.d.ts +1 -1
  183. package/lib/locale/tr_TR.js +1 -1
  184. package/lib/locale/zh_CN.d.ts +50 -1
  185. package/lib/locale/zh_CN.js +51 -2
  186. package/lib/plugin-manager/PluginManager.js +33 -21
  187. package/lib/pm/PluginManagerLink.d.ts +2 -0
  188. package/lib/pm/PluginManagerLink.js +139 -0
  189. package/lib/pm/index.d.ts +6 -0
  190. package/lib/pm/index.js +476 -0
  191. package/lib/route-switch/antd/admin-layout/index.js +1 -1
  192. package/lib/schema-component/antd/action/Action.Designer.js +35 -12
  193. package/lib/schema-component/antd/action/Action.Modal.js +4 -2
  194. package/lib/schema-component/antd/action/Action.js +3 -3
  195. package/lib/schema-component/antd/action/context.d.ts +2 -0
  196. package/lib/schema-component/antd/action/hooks.d.ts +1 -0
  197. package/lib/schema-component/antd/calendar/Calendar.Designer.js +19 -6
  198. package/lib/schema-component/antd/calendar/Calendar.js +139 -23
  199. package/lib/schema-component/antd/calendar/DeleteEvent.d.ts +3 -0
  200. package/lib/schema-component/antd/calendar/DeleteEvent.js +173 -0
  201. package/lib/schema-component/antd/calendar/Title.js +18 -2
  202. package/lib/schema-component/antd/calendar/components/Header.d.ts +10 -0
  203. package/lib/schema-component/antd/calendar/components/Header.js +57 -0
  204. package/lib/schema-component/antd/calendar/index.js +5 -0
  205. package/lib/schema-component/antd/calendar/style.less +53 -9
  206. package/lib/schema-component/antd/calendar/types.d.ts +6 -0
  207. package/lib/schema-component/antd/calendar/utils.d.ts +2 -0
  208. package/lib/schema-component/antd/calendar/utils.js +18 -2
  209. package/lib/schema-component/antd/checkbox/Checkbox.js +13 -4
  210. package/lib/schema-component/antd/formula-input/FormulaInput.js +28 -37
  211. package/lib/schema-component/antd/input/Input.d.ts +1 -0
  212. package/lib/schema-component/antd/input/Input.js +3 -0
  213. package/lib/schema-component/antd/input/Json.d.ts +6 -0
  214. package/lib/schema-component/antd/input/Json.js +53 -0
  215. package/lib/schema-component/antd/input/ReadPretty.d.ts +3 -0
  216. package/lib/schema-component/antd/input/ReadPretty.js +16 -0
  217. package/lib/schema-component/antd/input/index.d.ts +1 -0
  218. package/lib/schema-component/antd/input/index.js +13 -0
  219. package/lib/schema-component/antd/markdown/Markdown.Void.js +8 -2
  220. package/lib/schema-component/antd/radio/Radio.js +2 -1
  221. package/lib/schema-component/antd/select/ReadPretty.js +2 -1
  222. package/lib/schema-component/antd/select/Select.js +25 -1
  223. package/lib/schema-component/antd/table-v2/TableSelectorDesigner.js +17 -2
  224. package/lib/schema-component/antd/upload/Upload.js +2 -1
  225. package/lib/schema-component/antd/upload/shared.js +4 -5
  226. package/lib/schema-component/antd/upload/type.d.ts +2 -0
  227. package/lib/schema-initializer/buttons/BulkEditFormItemInitializers.d.ts +1 -0
  228. package/lib/schema-initializer/buttons/BulkEditFormItemInitializers.js +66 -0
  229. package/lib/schema-initializer/buttons/CalendarFormActionInitializers.d.ts +143 -0
  230. package/lib/schema-initializer/buttons/CalendarFormActionInitializers.js +153 -0
  231. package/lib/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.d.ts +1 -0
  232. package/lib/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.js +50 -0
  233. package/lib/schema-initializer/buttons/FormActionInitializers.d.ts +132 -0
  234. package/lib/schema-initializer/buttons/FormActionInitializers.js +121 -2
  235. package/lib/schema-initializer/buttons/RecordBlockInitializers.js +2 -1
  236. package/lib/schema-initializer/buttons/TabPaneInitializers.d.ts +1 -0
  237. package/lib/schema-initializer/buttons/TabPaneInitializers.js +18 -2
  238. package/lib/schema-initializer/buttons/TableActionInitializers.d.ts +56 -2
  239. package/lib/schema-initializer/buttons/TableActionInitializers.js +45 -0
  240. package/lib/schema-initializer/buttons/index.d.ts +3 -0
  241. package/lib/schema-initializer/buttons/index.js +39 -0
  242. package/lib/schema-initializer/components/BulkEditField.d.ts +7 -0
  243. package/lib/schema-initializer/components/BulkEditField.js +210 -0
  244. package/lib/schema-initializer/components/index.d.ts +1 -0
  245. package/lib/schema-initializer/components/index.js +13 -0
  246. package/lib/schema-initializer/items/BlockInitializer.js +8 -7
  247. package/lib/schema-initializer/items/BulkEditSubmitActionInitializer.d.ts +1 -0
  248. package/lib/schema-initializer/items/BulkEditSubmitActionInitializer.js +37 -0
  249. package/lib/schema-initializer/items/CreateFormBulkEditBlockInitializer.d.ts +1 -0
  250. package/lib/schema-initializer/items/CreateFormBulkEditBlockInitializer.js +121 -0
  251. package/lib/schema-initializer/items/CustomizeBulkEditActionInitializer.d.ts +1 -0
  252. package/lib/schema-initializer/items/CustomizeBulkEditActionInitializer.js +74 -0
  253. package/lib/schema-initializer/items/DeleteEventActionInitializer.d.ts +1 -0
  254. package/lib/schema-initializer/items/DeleteEventActionInitializer.js +40 -0
  255. package/lib/schema-initializer/items/RecordReadPrettyFormBlockInitializer.js +1 -1
  256. package/lib/schema-initializer/items/index.d.ts +4 -0
  257. package/lib/schema-initializer/items/index.js +52 -0
  258. package/lib/schema-initializer/utils.d.ts +1 -0
  259. package/lib/schema-initializer/utils.js +78 -16
  260. package/lib/schema-settings/SchemaSettings.d.ts +6 -0
  261. package/lib/schema-settings/SchemaSettings.js +3 -0
  262. package/lib/schema-templates/BlockTemplatePage.d.ts +1 -0
  263. package/lib/schema-templates/BlockTemplatePage.js +12 -2
  264. package/lib/schema-templates/SchemaTemplateShortcut.js +1 -1
  265. package/lib/system-settings/SystemSettingsShortcut.d.ts +2 -0
  266. package/lib/system-settings/SystemSettingsShortcut.js +145 -7
  267. package/package.json +6 -4
@@ -0,0 +1,476 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ var _exportNames = {
9
+ SettingsCenterContext: true,
10
+ SettingsCenterProvider: true,
11
+ PMProvider: true
12
+ };
13
+ exports.default = exports.SettingsCenterProvider = exports.SettingsCenterContext = exports.PMProvider = void 0;
14
+
15
+ var _icons = require("@ant-design/icons");
16
+
17
+ var _css = require("@emotion/css");
18
+
19
+ var _antd = require("antd");
20
+
21
+ var _react = _interopRequireWildcard(require("react"));
22
+
23
+ var _reactI18next = require("react-i18next");
24
+
25
+ var _reactRouterDom = require("react-router-dom");
26
+
27
+ var _acl = require("../acl");
28
+
29
+ var _apiClient = require("../api-client");
30
+
31
+ var _collectionManager = require("../collection-manager");
32
+
33
+ var _documentTitle = require("../document-title");
34
+
35
+ var _icon = require("../icon");
36
+
37
+ var _routeSwitch = require("../route-switch");
38
+
39
+ var _schemaComponent = require("../schema-component");
40
+
41
+ var _schemaTemplates = require("../schema-templates");
42
+
43
+ var _systemSettings = require("../system-settings");
44
+
45
+ var _PluginManagerLink = require("./PluginManagerLink");
46
+
47
+ Object.keys(_PluginManagerLink).forEach(function (key) {
48
+ if (key === "default" || key === "__esModule") return;
49
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
50
+ if (key in exports && exports[key] === _PluginManagerLink[key]) return;
51
+ Object.defineProperty(exports, key, {
52
+ enumerable: true,
53
+ get: function get() {
54
+ return _PluginManagerLink[key];
55
+ }
56
+ });
57
+ });
58
+ var _excluded = ["routes"];
59
+
60
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
61
+
62
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
63
+
64
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
65
+
66
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
67
+
68
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
69
+
70
+ 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; }
71
+
72
+ 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; }
73
+
74
+ 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; }
75
+
76
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
77
+
78
+ 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); } }
79
+
80
+ 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); }); }; }
81
+
82
+ var SettingsCenterContext = /*#__PURE__*/(0, _react.createContext)({});
83
+ exports.SettingsCenterContext = SettingsCenterContext;
84
+
85
+ var PluginCard = function PluginCard(props) {
86
+ var history = (0, _reactRouterDom.useHistory)();
87
+ var _props$data = props.data,
88
+ data = _props$data === void 0 ? {} : _props$data;
89
+ var api = (0, _apiClient.useAPIClient)();
90
+
91
+ var _useTranslation = (0, _reactI18next.useTranslation)(),
92
+ t = _useTranslation.t;
93
+
94
+ return /*#__PURE__*/_react.default.createElement(_antd.Card, {
95
+ bordered: false,
96
+ style: {
97
+ width: 'calc(20% - 24px)',
98
+ marginRight: 24,
99
+ marginBottom: 24
100
+ },
101
+ actions: [data.enabled ? /*#__PURE__*/_react.default.createElement(_icons.SettingOutlined, {
102
+ onClick: function onClick() {
103
+ history.push("/admin/settings/".concat(data.name));
104
+ }
105
+ }) : null, /*#__PURE__*/_react.default.createElement(_antd.Popconfirm, {
106
+ title: t('Are you sure to delete this plugin?'),
107
+ onConfirm: function () {
108
+ var _onConfirm = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
109
+ return regeneratorRuntime.wrap(function _callee$(_context) {
110
+ while (1) {
111
+ switch (_context.prev = _context.next) {
112
+ case 0:
113
+ _context.next = 2;
114
+ return api.request({
115
+ url: "pm:remove/".concat(data.name)
116
+ });
117
+
118
+ case 2:
119
+ _antd.message.success(t('插件删除成功'));
120
+
121
+ window.location.reload();
122
+
123
+ case 4:
124
+ case "end":
125
+ return _context.stop();
126
+ }
127
+ }
128
+ }, _callee);
129
+ }));
130
+
131
+ function onConfirm() {
132
+ return _onConfirm.apply(this, arguments);
133
+ }
134
+
135
+ return onConfirm;
136
+ }(),
137
+ onCancel: function onCancel() {},
138
+ okText: t('Yes'),
139
+ cancelText: t('No')
140
+ }, /*#__PURE__*/_react.default.createElement(_icons.DeleteOutlined, null)), /*#__PURE__*/_react.default.createElement(_antd.Switch, {
141
+ size: 'small',
142
+ onChange: function () {
143
+ var _onChange = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(checked) {
144
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
145
+ while (1) {
146
+ switch (_context2.prev = _context2.next) {
147
+ case 0:
148
+ _context2.next = 2;
149
+ return api.request({
150
+ url: "pm:".concat(checked ? 'enable' : 'disable', "/").concat(data.name)
151
+ });
152
+
153
+ case 2:
154
+ _antd.message.success(checked ? t('插件激活成功') : t('插件禁用成功'));
155
+
156
+ window.location.reload();
157
+
158
+ case 4:
159
+ case "end":
160
+ return _context2.stop();
161
+ }
162
+ }
163
+ }, _callee2);
164
+ }));
165
+
166
+ function onChange(_x) {
167
+ return _onChange.apply(this, arguments);
168
+ }
169
+
170
+ return onChange;
171
+ }(),
172
+ defaultChecked: data.enabled
173
+ })].filter(Boolean)
174
+ }, /*#__PURE__*/_react.default.createElement(_antd.Card.Meta, {
175
+ className: (0, _css.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-card-meta-avatar {\n margin-top: 8px;\n .ant-avatar {\n border-radius: 2px;\n }\n }\n "]))),
176
+ avatar: /*#__PURE__*/_react.default.createElement(_antd.Avatar, null),
177
+ description: data.description,
178
+ title: /*#__PURE__*/_react.default.createElement("span", null, data.name, /*#__PURE__*/_react.default.createElement("span", {
179
+ className: (0, _css.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: block;\n color: rgba(0, 0, 0, 0.45);\n font-weight: normal;\n font-size: 13px;\n // margin-left: 8px;\n "])))
180
+ }, data.version))
181
+ }));
182
+ };
183
+
184
+ var BuiltInPluginCard = function BuiltInPluginCard(props) {
185
+ var data = props.data;
186
+ return /*#__PURE__*/_react.default.createElement(_antd.Card, {
187
+ bordered: false,
188
+ style: {
189
+ width: 'calc(20% - 24px)',
190
+ marginRight: 24,
191
+ marginBottom: 24
192
+ }
193
+ }, /*#__PURE__*/_react.default.createElement(_antd.Card.Meta, {
194
+ className: (0, _css.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .ant-card-meta-avatar {\n margin-top: 8px;\n .ant-avatar {\n border-radius: 2px;\n }\n }\n "]))),
195
+ avatar: /*#__PURE__*/_react.default.createElement(_antd.Avatar, null),
196
+ description: data.description,
197
+ title: /*#__PURE__*/_react.default.createElement("span", null, data.name, /*#__PURE__*/_react.default.createElement("span", {
198
+ className: (0, _css.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: block;\n color: rgba(0, 0, 0, 0.45);\n font-weight: normal;\n font-size: 13px;\n // margin-left: 8px;\n "])))
199
+ }, data.version))
200
+ }));
201
+ };
202
+
203
+ var LocalPlugins = function LocalPlugins() {
204
+ var _data$data;
205
+
206
+ var _useRequest = (0, _apiClient.useRequest)({
207
+ url: 'applicationPlugins:list',
208
+ params: {
209
+ filter: {
210
+ 'builtIn.$isFalsy': true
211
+ },
212
+ sort: 'name'
213
+ }
214
+ }),
215
+ data = _useRequest.data,
216
+ loading = _useRequest.loading;
217
+
218
+ if (loading) {
219
+ return /*#__PURE__*/_react.default.createElement(_antd.Spin, null);
220
+ }
221
+
222
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item) {
223
+ return /*#__PURE__*/_react.default.createElement(PluginCard, {
224
+ data: item
225
+ });
226
+ }));
227
+ };
228
+
229
+ var BuiltinPlugins = function BuiltinPlugins() {
230
+ var _data$data2;
231
+
232
+ var _useRequest2 = (0, _apiClient.useRequest)({
233
+ url: 'applicationPlugins:list',
234
+ params: {
235
+ filter: {
236
+ 'builtIn.$isTruly': true
237
+ },
238
+ sort: 'name'
239
+ }
240
+ }),
241
+ data = _useRequest2.data,
242
+ loading = _useRequest2.loading;
243
+
244
+ if (loading) {
245
+ return /*#__PURE__*/_react.default.createElement(_antd.Spin, null);
246
+ }
247
+
248
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : _data$data2.map(function (item) {
249
+ return /*#__PURE__*/_react.default.createElement(BuiltInPluginCard, {
250
+ data: item
251
+ });
252
+ }));
253
+ };
254
+
255
+ var MarketplacePlugins = function MarketplacePlugins() {
256
+ var _useTranslation2 = (0, _reactI18next.useTranslation)(),
257
+ t = _useTranslation2.t;
258
+
259
+ return /*#__PURE__*/_react.default.createElement("div", {
260
+ style: {
261
+ fontSize: 18
262
+ }
263
+ }, t('Coming soon...'));
264
+ };
265
+
266
+ var PluginList = function PluginList(props) {
267
+ var match = (0, _reactRouterDom.useRouteMatch)();
268
+ var history = (0, _reactRouterDom.useHistory)();
269
+
270
+ var _ref = match.params || {},
271
+ _ref$tabName = _ref.tabName,
272
+ tabName = _ref$tabName === void 0 ? 'local' : _ref$tabName;
273
+
274
+ var _useDocumentTitle = (0, _documentTitle.useDocumentTitle)(),
275
+ setTitle = _useDocumentTitle.setTitle;
276
+
277
+ var _useTranslation3 = (0, _reactI18next.useTranslation)(),
278
+ t = _useTranslation3.t;
279
+
280
+ return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_antd.PageHeader, {
281
+ ghost: false,
282
+ title: t('Plugin manager'),
283
+ footer: /*#__PURE__*/_react.default.createElement(_antd.Tabs, {
284
+ activeKey: tabName,
285
+ onChange: function onChange(activeKey) {
286
+ history.push("/admin/pm/list/".concat(activeKey));
287
+ }
288
+ }, /*#__PURE__*/_react.default.createElement(_antd.Tabs.TabPane, {
289
+ tab: t('Local'),
290
+ key: 'local'
291
+ }), /*#__PURE__*/_react.default.createElement(_antd.Tabs.TabPane, {
292
+ tab: t('Built-in'),
293
+ key: 'built-in'
294
+ }), /*#__PURE__*/_react.default.createElement(_antd.Tabs.TabPane, {
295
+ tab: t('Marketplace'),
296
+ key: 'marketplace'
297
+ }))
298
+ }), /*#__PURE__*/_react.default.createElement("div", {
299
+ style: {
300
+ margin: 24,
301
+ display: 'flex',
302
+ flexFlow: 'row wrap'
303
+ }
304
+ }, /*#__PURE__*/_react.default.createElement({
305
+ local: LocalPlugins,
306
+ 'built-in': BuiltinPlugins,
307
+ marketplace: MarketplacePlugins
308
+ }[tabName])));
309
+ };
310
+
311
+ var settings = {
312
+ acl: {
313
+ title: '{{t("ACL")}}',
314
+ icon: 'LockOutlined',
315
+ tabs: {
316
+ roles: {
317
+ title: '{{t("Roles & Permissions")}}',
318
+ component: _acl.ACLPane
319
+ }
320
+ }
321
+ },
322
+ 'block-templates': {
323
+ title: '{{t("Block templates")}}',
324
+ icon: 'LayoutOutlined',
325
+ tabs: {
326
+ list: {
327
+ title: '{{t("Block templates")}}',
328
+ component: _schemaTemplates.BlockTemplatesPane
329
+ }
330
+ }
331
+ },
332
+ 'collection-manager': {
333
+ icon: 'DatabaseOutlined',
334
+ title: '{{t("Collection manager")}}',
335
+ tabs: {
336
+ collections: {
337
+ title: '{{t("Collections & Fields")}}',
338
+ component: _collectionManager.CollectionManagerPane
339
+ }
340
+ }
341
+ },
342
+ 'system-settings': {
343
+ icon: 'SettingOutlined',
344
+ title: '{{t("System settings")}}',
345
+ tabs: {
346
+ 'system-settings': {
347
+ title: '{{t("System settings")}}',
348
+ component: _systemSettings.SystemSettingsPane
349
+ }
350
+ }
351
+ }
352
+ };
353
+
354
+ var SettingsCenter = function SettingsCenter(props) {
355
+ var _items$pluginName3, _items$pluginName3$ta, _items$pluginName3$ta2, _items$pluginName4, _items$pluginName5;
356
+
357
+ var match = (0, _reactRouterDom.useRouteMatch)();
358
+ var history = (0, _reactRouterDom.useHistory)();
359
+ var items = (0, _react.useContext)(SettingsCenterContext);
360
+ var compile = (0, _schemaComponent.useCompile)();
361
+ var firstUri = (0, _react.useMemo)(function () {
362
+ var _items$pluginName;
363
+
364
+ var keys = Object.keys(items).sort();
365
+ var pluginName = keys.shift();
366
+ var tabName = Object.keys((items === null || items === void 0 ? void 0 : (_items$pluginName = items[pluginName]) === null || _items$pluginName === void 0 ? void 0 : _items$pluginName.tabs) || {}).shift();
367
+ return "/admin/settings/".concat(pluginName, "/").concat(tabName);
368
+ }, [items]);
369
+
370
+ var _ref2 = match.params || {},
371
+ pluginName = _ref2.pluginName,
372
+ tabName = _ref2.tabName;
373
+
374
+ if (!pluginName) {
375
+ return /*#__PURE__*/_react.default.createElement(_reactRouterDom.Redirect, {
376
+ to: firstUri
377
+ });
378
+ }
379
+
380
+ if (!items[pluginName]) {
381
+ return /*#__PURE__*/_react.default.createElement(_reactRouterDom.Redirect, {
382
+ to: firstUri
383
+ });
384
+ }
385
+
386
+ if (!tabName) {
387
+ var _items$pluginName2;
388
+
389
+ var firstTabName = Object.keys((_items$pluginName2 = items[pluginName]) === null || _items$pluginName2 === void 0 ? void 0 : _items$pluginName2.tabs).shift();
390
+ return /*#__PURE__*/_react.default.createElement(_reactRouterDom.Redirect, {
391
+ to: "/admin/settings/".concat(pluginName, "/").concat(firstTabName)
392
+ });
393
+ }
394
+
395
+ var component = (_items$pluginName3 = items[pluginName]) === null || _items$pluginName3 === void 0 ? void 0 : (_items$pluginName3$ta = _items$pluginName3.tabs) === null || _items$pluginName3$ta === void 0 ? void 0 : (_items$pluginName3$ta2 = _items$pluginName3$ta[tabName]) === null || _items$pluginName3$ta2 === void 0 ? void 0 : _items$pluginName3$ta2.component;
396
+ return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_antd.Layout, null, /*#__PURE__*/_react.default.createElement(_antd.Layout.Sider, {
397
+ theme: 'light'
398
+ }, /*#__PURE__*/_react.default.createElement(_antd.Menu, {
399
+ selectedKeys: [pluginName],
400
+ style: {
401
+ height: 'calc(100vh - 46px)'
402
+ }
403
+ }, Object.keys(items).sort().map(function (key) {
404
+ var item = items[key];
405
+ var tabKey = Object.keys(item.tabs).shift();
406
+ return /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
407
+ key: key,
408
+ icon: item.icon ? /*#__PURE__*/_react.default.createElement(_icon.Icon, {
409
+ type: item.icon
410
+ }) : null,
411
+ onClick: function onClick() {
412
+ history.push("/admin/settings/".concat(key, "/").concat(tabKey));
413
+ }
414
+ }, compile(item.title));
415
+ }))), /*#__PURE__*/_react.default.createElement(_antd.Layout.Content, null, /*#__PURE__*/_react.default.createElement(_antd.PageHeader, {
416
+ ghost: false,
417
+ title: compile((_items$pluginName4 = items[pluginName]) === null || _items$pluginName4 === void 0 ? void 0 : _items$pluginName4.title),
418
+ footer: /*#__PURE__*/_react.default.createElement(_antd.Tabs, {
419
+ activeKey: tabName,
420
+ onChange: function onChange(activeKey) {
421
+ history.push("/admin/settings/".concat(pluginName, "/").concat(activeKey));
422
+ }
423
+ }, Object.keys((_items$pluginName5 = items[pluginName]) === null || _items$pluginName5 === void 0 ? void 0 : _items$pluginName5.tabs).map(function (tabKey) {
424
+ var _items$pluginName$tab;
425
+
426
+ var tab = (_items$pluginName$tab = items[pluginName].tabs) === null || _items$pluginName$tab === void 0 ? void 0 : _items$pluginName$tab[tabKey];
427
+ return /*#__PURE__*/_react.default.createElement(_antd.Tabs.TabPane, {
428
+ tab: compile(tab === null || tab === void 0 ? void 0 : tab.title),
429
+ key: tabKey
430
+ });
431
+ }))
432
+ }), /*#__PURE__*/_react.default.createElement("div", {
433
+ style: {
434
+ margin: 24
435
+ }
436
+ }, component && /*#__PURE__*/_react.default.createElement(component)))));
437
+ };
438
+
439
+ var SettingsCenterProvider = function SettingsCenterProvider(props) {
440
+ var _props$settings = props.settings,
441
+ settings = _props$settings === void 0 ? {} : _props$settings;
442
+ var items = (0, _react.useContext)(SettingsCenterContext);
443
+ return /*#__PURE__*/_react.default.createElement(SettingsCenterContext.Provider, {
444
+ value: _objectSpread(_objectSpread({}, items), settings)
445
+ }, props.children);
446
+ };
447
+
448
+ exports.SettingsCenterProvider = SettingsCenterProvider;
449
+
450
+ var PMProvider = function PMProvider(props) {
451
+ var _useContext = (0, _react.useContext)(_routeSwitch.RouteSwitchContext),
452
+ routes = _useContext.routes,
453
+ others = _objectWithoutProperties(_useContext, _excluded);
454
+
455
+ routes[1].routes.unshift({
456
+ type: 'route',
457
+ path: '/admin/pm/list/:tabName?',
458
+ component: PluginList
459
+ }, {
460
+ type: 'route',
461
+ path: '/admin/settings/:pluginName?/:tabName?',
462
+ component: SettingsCenter,
463
+ uiSchemaUid: routes[1].uiSchemaUid
464
+ });
465
+ return /*#__PURE__*/_react.default.createElement(SettingsCenterProvider, {
466
+ settings: settings
467
+ }, /*#__PURE__*/_react.default.createElement(_routeSwitch.RouteSwitchContext.Provider, {
468
+ value: _objectSpread(_objectSpread({}, others), {}, {
469
+ routes: routes
470
+ })
471
+ }, props.children));
472
+ };
473
+
474
+ exports.PMProvider = PMProvider;
475
+ var _default = PMProvider;
476
+ exports.default = _default;
@@ -225,7 +225,7 @@ var InternalAdminLayout = function InternalAdminLayout(props) {
225
225
  theme: 'light',
226
226
  ref: sideMenuRef
227
227
  }), /*#__PURE__*/_react.default.createElement(_antd.Layout.Content, {
228
- className: (0, _css.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n min-height: calc(100vh - 46px);\n position: relative;\n padding-bottom: 70px;\n > div {\n position: relative;\n z-index: 1;\n }\n .ant-layout-footer {\n position: absolute;\n bottom: 0;\n text-align: center;\n width: 100%;\n z-index: 0;\n }\n "])))
228
+ className: (0, _css.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n min-height: calc(100vh - 46px);\n padding-bottom: 42px;\n position: relative;\n // padding-bottom: 70px;\n > div {\n position: relative;\n // z-index: 1;\n }\n .ant-layout-footer {\n position: absolute;\n bottom: 0;\n text-align: center;\n width: 100%;\n z-index: 0;\n padding: 0px 50px;\n }\n "])))
229
229
  }, service.contentLoading ? /*#__PURE__*/_react.default.createElement(_antd.Spin, null) : props.children, /*#__PURE__*/_react.default.createElement(_antd.Layout.Footer, null, /*#__PURE__*/_react.default.createElement(_poweredBy.PoweredBy, null)))));
230
230
  };
231
231
 
@@ -76,7 +76,7 @@ var MenuGroup = function MenuGroup(props) {
76
76
  };
77
77
 
78
78
  var ActionDesigner = function ActionDesigner(props) {
79
- var _fieldSchema$xCompon, _fieldSchema$xCompon2, _fieldSchema$xCompon3, _fieldSchema$xCompon4, _fieldSchema$xAction, _fieldSchema$xAction2, _fieldSchema$xAction3, _fieldSchema$xAction4, _fieldSchema$xAction5, _fieldSchema$xAction6, _fieldSchema$xAction7, _fieldSchema$xAction8, _fieldSchema$xAction9;
79
+ var _fieldSchema$xCompon, _fieldSchema$xCompon2, _fieldSchema$xCompon3, _fieldSchema$xCompon4, _fieldSchema$xAction, _fieldSchema$xAction2, _fieldSchema$xAction3, _fieldSchema$xAction4, _fieldSchema$xAction5, _fieldSchema$xAction6, _fieldSchema$xAction7, _fieldSchema$xAction8, _fieldSchema$xAction9, _fieldSchema$xAction10;
80
80
 
81
81
  var modalTip = props.modalTip,
82
82
  restProps = _objectWithoutProperties(props, _excluded);
@@ -92,6 +92,7 @@ var ActionDesigner = function ActionDesigner(props) {
92
92
 
93
93
  var compile = (0, _.useCompile)();
94
94
  var isPopupAction = ['create', 'update', 'view', 'customize:popup'].includes(fieldSchema['x-action'] || '');
95
+ var isUpdateModePopupAction = ['customize:bulkUpdate', 'customize:bulkEdit'].includes(fieldSchema['x-action']);
95
96
  var context = (0, _.useActionContext)();
96
97
 
97
98
  var _useState = (0, _react2.useState)(),
@@ -200,12 +201,32 @@ var ActionDesigner = function ActionDesigner(props) {
200
201
  });
201
202
  dn.refresh();
202
203
  }
203
- }), (0, _shared.isValid)(fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction === void 0 ? void 0 : _fieldSchema$xAction.assignedValues) && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.ActionModalItem, {
204
+ }), isUpdateModePopupAction && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.SelectItem, {
205
+ title: t('Data will be updated'),
206
+ options: [{
207
+ label: t('Selected'),
208
+ value: 'selected'
209
+ }, {
210
+ label: t('All'),
211
+ value: 'all'
212
+ }],
213
+ value: fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction === void 0 ? void 0 : _fieldSchema$xAction['updateMode'],
214
+ onChange: function onChange(value) {
215
+ fieldSchema['x-action-settings']['updateMode'] = value;
216
+ dn.emit('patch', {
217
+ schema: {
218
+ 'x-uid': fieldSchema['x-uid'],
219
+ 'x-action-settings': fieldSchema['x-action-settings']
220
+ }
221
+ });
222
+ dn.refresh();
223
+ }
224
+ }), (0, _shared.isValid)(fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction2 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction2 === void 0 ? void 0 : _fieldSchema$xAction2.assignedValues) && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.ActionModalItem, {
204
225
  title: t('Assign field values'),
205
226
  initialSchema: initialSchema,
206
- initialValues: fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction2 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction2 === void 0 ? void 0 : _fieldSchema$xAction2.assignedValues,
227
+ initialValues: fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction3 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction3 === void 0 ? void 0 : _fieldSchema$xAction3.assignedValues,
207
228
  modalTip: tips[actionType],
208
- uid: fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction3 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction3 === void 0 ? void 0 : _fieldSchema$xAction3.schemaUid,
229
+ uid: fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction4 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction4 === void 0 ? void 0 : _fieldSchema$xAction4.schemaUid,
209
230
  onSubmit: function onSubmit(assignedValues) {
210
231
  var _schema2;
211
232
 
@@ -215,10 +236,10 @@ var ActionDesigner = function ActionDesigner(props) {
215
236
  });
216
237
  dn.refresh();
217
238
  }
218
- }), (0, _shared.isValid)(fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction4 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction4 === void 0 ? void 0 : _fieldSchema$xAction4.requestSettings) && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.ActionModalItem, {
239
+ }), (0, _shared.isValid)(fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction5 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction5 === void 0 ? void 0 : _fieldSchema$xAction5.requestSettings) && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.ActionModalItem, {
219
240
  title: t('Request settings'),
220
241
  schema: _utils.requestSettingsSchema,
221
- initialValues: fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction5 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction5 === void 0 ? void 0 : _fieldSchema$xAction5.requestSettings,
242
+ initialValues: fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction6 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction6 === void 0 ? void 0 : _fieldSchema$xAction6.requestSettings,
222
243
  onSubmit: function onSubmit(requestSettings) {
223
244
  var _schema3;
224
245
 
@@ -228,9 +249,9 @@ var ActionDesigner = function ActionDesigner(props) {
228
249
  });
229
250
  dn.refresh();
230
251
  }
231
- }), (0, _shared.isValid)(fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction6 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction6 === void 0 ? void 0 : _fieldSchema$xAction6.skipValidator) && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.SwitchItem, {
252
+ }), (0, _shared.isValid)(fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction7 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction7 === void 0 ? void 0 : _fieldSchema$xAction7.skipValidator) && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.SwitchItem, {
232
253
  title: t('Skip required validation'),
233
- checked: !!(fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction7 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction7 === void 0 ? void 0 : _fieldSchema$xAction7.skipValidator),
254
+ checked: !!(fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction8 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction8 === void 0 ? void 0 : _fieldSchema$xAction8.skipValidator),
234
255
  onChange: function onChange(value) {
235
256
  var _schema4;
236
257
 
@@ -239,21 +260,23 @@ var ActionDesigner = function ActionDesigner(props) {
239
260
  schema: (_schema4 = {}, _defineProperty(_schema4, 'x-uid', fieldSchema['x-uid']), _defineProperty(_schema4, 'x-action-settings', _objectSpread({}, fieldSchema['x-action-settings'])), _schema4)
240
261
  });
241
262
  }
242
- }), (0, _shared.isValid)(fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction8 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction8 === void 0 ? void 0 : _fieldSchema$xAction8['onSuccess']) && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.ModalItem, {
263
+ }), (0, _shared.isValid)(fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction9 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction9 === void 0 ? void 0 : _fieldSchema$xAction9['onSuccess']) && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.ModalItem, {
243
264
  title: {
244
265
  'customize:save': t('After successful save'),
245
266
  'customize:update': t('After successful update'),
246
267
  'customize:table:request': t('After successful request'),
247
- 'customize:form:request': t('After successful request')
268
+ 'customize:form:request': t('After successful request'),
269
+ 'customize:bulkUpdate': t('After successful bulk update')
248
270
  }[actionType],
249
- initialValues: fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction9 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction9 === void 0 ? void 0 : _fieldSchema$xAction9['onSuccess'],
271
+ initialValues: fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction10 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction10 === void 0 ? void 0 : _fieldSchema$xAction10['onSuccess'],
250
272
  schema: {
251
273
  type: 'object',
252
274
  title: {
253
275
  'customize:save': t('After successful save'),
254
276
  'customize:update': t('After successful update'),
255
277
  'customize:table:request': t('After successful request'),
256
- 'customize:form:request': t('After successful request')
278
+ 'customize:form:request': t('After successful request'),
279
+ 'customize:bulkUpdate': t('After successful bulk update')
257
280
  }[actionType],
258
281
  properties: {
259
282
  successMessage: {
@@ -21,7 +21,7 @@ var _ = require(".");
21
21
 
22
22
  var _templateObject, _templateObject2;
23
23
 
24
- var _excluded = ["footerNodeName"];
24
+ var _excluded = ["footerNodeName", "width"];
25
25
 
26
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
27
 
@@ -40,6 +40,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
40
40
  var ActionModal = (0, _react.observer)(function (props) {
41
41
  var _props$footerNodeName = props.footerNodeName,
42
42
  footerNodeName = _props$footerNodeName === void 0 ? 'Action.Modal.Footer' : _props$footerNodeName,
43
+ _props$width = props.width,
44
+ width = _props$width === void 0 ? '80%' : _props$width,
43
45
  others = _objectWithoutProperties(props, _excluded);
44
46
 
45
47
  var _useActionContext = (0, _.useActionContext)(),
@@ -60,7 +62,7 @@ var ActionModal = (0, _react.observer)(function (props) {
60
62
  e.stopPropagation();
61
63
  }
62
64
  }, /*#__PURE__*/_react2.default.createElement(_antd.Modal, _objectSpread(_objectSpread({
63
- width: '80%',
65
+ width: width,
64
66
  title: field.title
65
67
  }, others), {}, {
66
68
  destroyOnClose: true,
@@ -43,7 +43,7 @@ var _context = require("./context");
43
43
 
44
44
  var _hooks2 = require("./hooks");
45
45
 
46
- var _excluded = ["popover", "confirm", "containerRefKey", "component", "useAction", "className", "disabled", "icon", "title"];
46
+ var _excluded = ["popover", "confirm", "containerRefKey", "component", "useAction", "className", "icon", "title"];
47
47
 
48
48
  var _templateObject, _templateObject2;
49
49
 
@@ -89,7 +89,6 @@ var Action = (0, _react.observer)(function (props) {
89
89
  _props$useAction = props.useAction,
90
90
  useAction = _props$useAction === void 0 ? _hooks2.useA : _props$useAction,
91
91
  className = props.className,
92
- disabled = props.disabled,
93
92
  icon = props.icon,
94
93
  title = props.title,
95
94
  others = _objectWithoutProperties(props, _excluded);
@@ -159,7 +158,8 @@ var Action = (0, _react.observer)(function (props) {
159
158
  formValueChanged: formValueChanged,
160
159
  setFormValueChanged: setFormValueChanged,
161
160
  openMode: openMode,
162
- containerRefKey: containerRefKey
161
+ containerRefKey: containerRefKey,
162
+ fieldSchema: fieldSchema
163
163
  }
164
164
  }, popover && /*#__PURE__*/_react2.default.createElement(_react.RecursionField, {
165
165
  basePath: field.address,
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { Schema } from '@formily/react';
2
3
  export declare const ActionContext: import("react").Context<ActionContextProps>;
3
4
  export interface ActionContextProps {
4
5
  button?: any;
@@ -8,4 +9,5 @@ export interface ActionContextProps {
8
9
  containerRefKey?: string;
9
10
  formValueChanged?: boolean;
10
11
  setFormValueChanged?: (v: boolean) => void;
12
+ fieldSchema?: Schema;
11
13
  }
@@ -9,6 +9,7 @@ export declare const useActionContext: () => {
9
9
  containerRefKey?: string;
10
10
  formValueChanged?: boolean;
11
11
  setFormValueChanged?: (v: boolean) => void;
12
+ fieldSchema?: import("@formily/react").Schema<any, any, any, any, any, any, any, any, any>;
12
13
  };
13
14
  export declare const useCloseAction: () => {
14
15
  run(): Promise<void>;