@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
@@ -1,11 +1,15 @@
1
1
  "use strict";
2
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
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
8
  exports.getCurrentTimezone = exports.Application = void 0;
7
9
 
8
- var _react = _interopRequireDefault(require("react"));
10
+ var _antd = require("antd");
11
+
12
+ var _react = _interopRequireWildcard(require("react"));
9
13
 
10
14
  var _reactI18next = require("react-i18next");
11
15
 
@@ -27,6 +31,8 @@ var _i18n = require("../i18n");
27
31
 
28
32
  var _pluginManager = require("../plugin-manager");
29
33
 
34
+ var _pm = _interopRequireWildcard(require("../pm"));
35
+
30
36
  var _routeSwitch = require("../route-switch");
31
37
 
32
38
  var _schemaComponent = require("../schema-component");
@@ -41,15 +47,15 @@ var _user = require("../user");
41
47
 
42
48
  var _compose = require("./compose");
43
49
 
44
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50
+ 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); }
45
51
 
46
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
52
+ 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; }
47
53
 
48
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
54
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
49
55
 
50
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
56
+ 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); } }
51
57
 
52
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
58
+ 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); }); }; }
53
59
 
54
60
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
55
61
 
@@ -59,12 +65,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
59
65
 
60
66
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
61
67
 
62
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
63
-
64
- 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); }
65
-
66
- 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; }
67
-
68
68
  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; }
69
69
 
70
70
  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; }
@@ -77,6 +77,18 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
77
77
 
78
78
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
79
79
 
80
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
81
+
82
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
83
+
84
+ 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); }
85
+
86
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
87
+
88
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
89
+
90
+ 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; }
91
+
80
92
  var getCurrentTimezone = function getCurrentTimezone() {
81
93
  var timezoneOffset = new Date().getTimezoneOffset() / -60;
82
94
  var timezone = String(timezoneOffset).padStart(2, '0') + ':00';
@@ -85,6 +97,17 @@ var getCurrentTimezone = function getCurrentTimezone() {
85
97
 
86
98
  exports.getCurrentTimezone = getCurrentTimezone;
87
99
 
100
+ var App = /*#__PURE__*/_react.default.memo(function (props) {
101
+ var C = _compose.compose.apply(void 0, _toConsumableArray(props.providers))(function () {
102
+ var routes = (0, _routeSwitch.useRoutes)();
103
+ return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_routeSwitch.RouteSwitch, {
104
+ routes: routes
105
+ }));
106
+ });
107
+
108
+ return /*#__PURE__*/_react.default.createElement(C, null);
109
+ });
110
+
88
111
  var Application = /*#__PURE__*/function () {
89
112
  function Application(options) {
90
113
  var _window, _window$location;
@@ -96,6 +119,8 @@ var Application = /*#__PURE__*/function () {
96
119
  this.apiClient = void 0;
97
120
  this.i18n = void 0;
98
121
  this.plugins = [];
122
+ this.options = void 0;
123
+ this.options = options;
99
124
  this.apiClient = new _apiClient.APIClient(_objectSpread({
100
125
  baseURL: process.env.API_BASE_URL,
101
126
  headers: {
@@ -131,7 +156,9 @@ var Application = /*#__PURE__*/function () {
131
156
  DesignableSwitch: _schemaComponent.DesignableSwitch,
132
157
  CollectionManagerShortcut: _collectionManager.CollectionManagerShortcut,
133
158
  SystemSettingsShortcut: _systemSettings.SystemSettingsShortcut,
134
- SchemaTemplateShortcut: _schemaTemplates.SchemaTemplateShortcut
159
+ SchemaTemplateShortcut: _schemaTemplates.SchemaTemplateShortcut,
160
+ PluginManagerLink: _pm.PluginManagerLink,
161
+ SettingsCenterDropdown: _pm.SettingsCenterDropdown
135
162
  }
136
163
  });
137
164
  this.use(_schemaComponent.SchemaComponentProvider, {
@@ -149,26 +176,7 @@ var Application = /*#__PURE__*/function () {
149
176
  this.use(_schemaComponent.AntdSchemaComponentProvider);
150
177
  this.use(_acl.ACLProvider);
151
178
  this.use(_documentTitle.RemoteDocumentTitleProvider);
152
-
153
- var _iterator = _createForOfIteratorHelper(options.plugins),
154
- _step;
155
-
156
- try {
157
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
158
- var plugin = _step.value;
159
-
160
- var _ref = Array.isArray(plugin) ? plugin : [plugin],
161
- _ref2 = _slicedToArray(_ref, 2),
162
- component = _ref2[0],
163
- props = _ref2[1];
164
-
165
- this.use(component, props);
166
- }
167
- } catch (err) {
168
- _iterator.e(err);
169
- } finally {
170
- _iterator.f();
171
- }
179
+ this.use(_pm.default);
172
180
  }
173
181
 
174
182
  _createClass(Application, [{
@@ -193,12 +201,104 @@ var Application = /*#__PURE__*/function () {
193
201
  }, {
194
202
  key: "render",
195
203
  value: function render() {
196
- return _compose.compose.apply(void 0, _toConsumableArray(this.providers))(this.mainComponent || function () {
197
- var routes = (0, _routeSwitch.useRoutes)();
198
- return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_routeSwitch.RouteSwitch, {
199
- routes: routes
200
- }));
201
- });
204
+ var _this = this;
205
+
206
+ return function (props) {
207
+ var _this$options = _this.options,
208
+ _this$options$plugins = _this$options.plugins,
209
+ plugins = _this$options$plugins === void 0 ? [] : _this$options$plugins,
210
+ dynamicImport = _this$options.dynamicImport;
211
+
212
+ var _useState = (0, _react.useState)(false),
213
+ _useState2 = _slicedToArray(_useState, 2),
214
+ loading = _useState2[0],
215
+ setLoading = _useState2[1];
216
+
217
+ (0, _react.useEffect)(function () {
218
+ setLoading(true);
219
+
220
+ _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
221
+ var _res$data;
222
+
223
+ var res, _iterator, _step, plugin, pluginModule;
224
+
225
+ return regeneratorRuntime.wrap(function _callee$(_context) {
226
+ while (1) {
227
+ switch (_context.prev = _context.next) {
228
+ case 0:
229
+ _context.next = 2;
230
+ return _this.apiClient.request({
231
+ url: 'app:getPlugins'
232
+ });
233
+
234
+ case 2:
235
+ res = _context.sent;
236
+
237
+ if (Array.isArray((_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.data)) {
238
+ plugins.push.apply(plugins, _toConsumableArray(res.data.data));
239
+ }
240
+
241
+ _iterator = _createForOfIteratorHelper(plugins);
242
+ _context.prev = 5;
243
+
244
+ _iterator.s();
245
+
246
+ case 7:
247
+ if ((_step = _iterator.n()).done) {
248
+ _context.next = 15;
249
+ break;
250
+ }
251
+
252
+ plugin = _step.value;
253
+ _context.next = 11;
254
+ return dynamicImport(plugin);
255
+
256
+ case 11:
257
+ pluginModule = _context.sent;
258
+
259
+ _this.use(pluginModule.default);
260
+
261
+ case 13:
262
+ _context.next = 7;
263
+ break;
264
+
265
+ case 15:
266
+ _context.next = 20;
267
+ break;
268
+
269
+ case 17:
270
+ _context.prev = 17;
271
+ _context.t0 = _context["catch"](5);
272
+
273
+ _iterator.e(_context.t0);
274
+
275
+ case 20:
276
+ _context.prev = 20;
277
+
278
+ _iterator.f();
279
+
280
+ return _context.finish(20);
281
+
282
+ case 23:
283
+ setLoading(false);
284
+
285
+ case 24:
286
+ case "end":
287
+ return _context.stop();
288
+ }
289
+ }
290
+ }, _callee, null, [[5, 17, 20, 23]]);
291
+ }))();
292
+ }, []);
293
+
294
+ if (loading) {
295
+ return /*#__PURE__*/_react.default.createElement(_antd.Spin, null);
296
+ }
297
+
298
+ return /*#__PURE__*/_react.default.createElement(App, {
299
+ providers: _this.providers
300
+ });
301
+ };
202
302
  }
203
303
  }]);
204
304
 
@@ -125,6 +125,8 @@ var useResourceAction = function useResourceAction(props) {
125
125
  return field.name;
126
126
  });
127
127
  var params = useActionParams(props);
128
+ var api = (0, _.useAPIClient)();
129
+ var fieldSchema = (0, _react.useFieldSchema)();
128
130
 
129
131
  if (!Object.keys(params).includes('appends') && (appends === null || appends === void 0 ? void 0 : appends.length)) {
130
132
  params['appends'] = appends;
@@ -145,6 +147,15 @@ var useResourceAction = function useResourceAction(props) {
145
147
  return res.data;
146
148
  });
147
149
  }, _objectSpread(_objectSpread({}, opts), {}, {
150
+ onSuccess: function onSuccess(data, params) {
151
+ var _opts$onSuccess;
152
+
153
+ opts === null || opts === void 0 ? void 0 : (_opts$onSuccess = opts['onSuccess']) === null || _opts$onSuccess === void 0 ? void 0 : _opts$onSuccess.call(opts, data, params);
154
+
155
+ if (fieldSchema['x-uid']) {
156
+ api.services[fieldSchema['x-uid']] = result;
157
+ }
158
+ },
148
159
  defaultParams: [params],
149
160
  refreshDeps: [JSON.stringify(params.appends)]
150
161
  }));
@@ -4,4 +4,5 @@ export declare const CalendarBlockProvider: (props: any) => JSX.Element;
4
4
  export declare const useCalendarBlockContext: () => any;
5
5
  export declare const useCalendarBlockProps: () => {
6
6
  fieldNames: any;
7
+ showLunar: any;
7
8
  };
@@ -29,7 +29,8 @@ var CalendarBlockContext = /*#__PURE__*/(0, _react2.createContext)({});
29
29
  exports.CalendarBlockContext = CalendarBlockContext;
30
30
 
31
31
  var InternalCalendarBlockProvider = function InternalCalendarBlockProvider(props) {
32
- var fieldNames = props.fieldNames;
32
+ var fieldNames = props.fieldNames,
33
+ showLunar = props.showLunar;
33
34
  var field = (0, _react.useField)();
34
35
 
35
36
  var _useBlockRequestConte = (0, _BlockProvider.useBlockRequestContext)(),
@@ -45,7 +46,8 @@ var InternalCalendarBlockProvider = function InternalCalendarBlockProvider(props
45
46
  field: field,
46
47
  service: service,
47
48
  resource: resource,
48
- fieldNames: fieldNames
49
+ fieldNames: fieldNames,
50
+ showLunar: showLunar
49
51
  }
50
52
  }, props.children);
51
53
  };
@@ -81,7 +83,8 @@ var useCalendarBlockProps = function useCalendarBlockProps() {
81
83
  }
82
84
  }, [ctx === null || ctx === void 0 ? void 0 : (_ctx$service3 = ctx.service) === null || _ctx$service3 === void 0 ? void 0 : _ctx$service3.loading]);
83
85
  return {
84
- fieldNames: ctx.fieldNames
86
+ fieldNames: ctx.fieldNames,
87
+ showLunar: ctx.showLunar
85
88
  };
86
89
  };
87
90
 
@@ -38,7 +38,8 @@ exports.TableSelectorContext = TableSelectorContext;
38
38
 
39
39
  var InternalTableSelectorProvider = function InternalTableSelectorProvider(props) {
40
40
  var params = props.params,
41
- rowKey = props.rowKey;
41
+ rowKey = props.rowKey,
42
+ extraFilter = props.extraFilter;
42
43
  var field = (0, _react.useField)();
43
44
 
44
45
  var _useBlockRequestConte = (0, _BlockProvider.useBlockRequestContext)(),
@@ -54,6 +55,7 @@ var InternalTableSelectorProvider = function InternalTableSelectorProvider(props
54
55
  service: service,
55
56
  resource: resource,
56
57
  params: params,
58
+ extraFilter: extraFilter,
57
59
  rowKey: rowKey
58
60
  }
59
61
  }, props.children);
@@ -103,10 +105,12 @@ var TableSelectorProvider = function TableSelectorProvider(props) {
103
105
  params['appends'] = appends;
104
106
  }
105
107
 
108
+ var extraFilter;
109
+
106
110
  if (collectionField) {
107
111
  if (['oho', 'o2m'].includes(collectionField.interface)) {
108
112
  if (record === null || record === void 0 ? void 0 : record[collectionField.sourceKey]) {
109
- params['filter'] = {
113
+ extraFilter = {
110
114
  $or: [_defineProperty({}, collectionField.foreignKey, {
111
115
  $is: null
112
116
  }), _defineProperty({}, collectionField.foreignKey, {
@@ -114,7 +118,7 @@ var TableSelectorProvider = function TableSelectorProvider(props) {
114
118
  })]
115
119
  };
116
120
  } else {
117
- params['filter'] = _defineProperty({}, collectionField.foreignKey, {
121
+ extraFilter = _defineProperty({}, collectionField.foreignKey, {
118
122
  $is: null
119
123
  });
120
124
  }
@@ -128,7 +132,7 @@ var TableSelectorProvider = function TableSelectorProvider(props) {
128
132
 
129
133
  if (targetField) {
130
134
  if (record === null || record === void 0 ? void 0 : record[collectionField.foreignKey]) {
131
- params['filter'] = {
135
+ extraFilter = {
132
136
  $or: [_defineProperty({}, "".concat(targetField.name, ".").concat(targetField.foreignKey), {
133
137
  $is: null
134
138
  }), _defineProperty({}, "".concat(targetField.name, ".").concat(targetField.foreignKey), {
@@ -136,7 +140,7 @@ var TableSelectorProvider = function TableSelectorProvider(props) {
136
140
  })]
137
141
  };
138
142
  } else {
139
- params['filter'] = _defineProperty({}, "".concat(targetField.name, ".").concat(targetField.foreignKey), {
143
+ extraFilter = _defineProperty({}, "".concat(targetField.name, ".").concat(targetField.foreignKey), {
140
144
  $is: null
141
145
  });
142
146
  }
@@ -144,10 +148,21 @@ var TableSelectorProvider = function TableSelectorProvider(props) {
144
148
  }
145
149
  }
146
150
 
151
+ if (extraFilter) {
152
+ if (params === null || params === void 0 ? void 0 : params.filter) {
153
+ params['filter'] = {
154
+ $and: [extraFilter, params['filter']]
155
+ };
156
+ } else {
157
+ params['filter'] = extraFilter;
158
+ }
159
+ }
160
+
147
161
  return /*#__PURE__*/_react2.default.createElement(_BlockProvider.BlockProvider, _objectSpread(_objectSpread({}, props), {}, {
148
162
  params: params
149
163
  }), /*#__PURE__*/_react2.default.createElement(InternalTableSelectorProvider, _objectSpread(_objectSpread({}, props), {}, {
150
- params: params
164
+ params: params,
165
+ extraFilter: extraFilter
151
166
  })));
152
167
  };
153
168
 
@@ -7,6 +7,12 @@ export declare const useCreateActionProps: () => {
7
7
  export declare const useCustomizeUpdateActionProps: () => {
8
8
  onClick(): Promise<void>;
9
9
  };
10
+ export declare const useCustomizeBulkUpdateActionProps: () => {
11
+ onClick(): Promise<void>;
12
+ };
13
+ export declare const useCustomizeBulkEditActionProps: () => {
14
+ onClick(): Promise<void>;
15
+ };
10
16
  export declare const useCustomizeRequestActionProps: () => {
11
17
  onClick(): Promise<void>;
12
18
  };