@nocobase/client 0.8.1-alpha.4 → 0.9.0-alpha.2

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 (195) hide show
  1. package/es/acl/ACLProvider.d.ts +16 -2
  2. package/es/acl/ACLProvider.js +271 -100
  3. package/es/acl/Configuration/ConfigureCenter.d.ts +2 -0
  4. package/es/acl/Configuration/ConfigureCenter.js +254 -0
  5. package/es/acl/Configuration/MenuConfigure.js +2 -2
  6. package/es/acl/Configuration/PermisionProvider.d.ts +4 -0
  7. package/es/acl/Configuration/PermisionProvider.js +132 -0
  8. package/es/acl/Configuration/RoleConfigure.js +98 -23
  9. package/es/acl/Configuration/RoleTable.d.ts +1 -1
  10. package/es/acl/Configuration/RoleTable.js +6 -3
  11. package/es/acl/Configuration/RolesResourcesActions.js +2 -2
  12. package/es/acl/Configuration/index.d.ts +1 -0
  13. package/es/acl/Configuration/index.js +2 -1
  14. package/es/acl/Configuration/schemas/roleCollections.js +41 -13
  15. package/es/acl/Configuration/schemas/roles.js +42 -2
  16. package/es/acl/Configuration/schemas/scopes.js +2 -0
  17. package/es/acl/index.d.ts +1 -0
  18. package/es/acl/index.js +2 -1
  19. package/es/acl/style.less +10 -0
  20. package/es/antd-config-provider/index.d.ts +3 -1
  21. package/es/antd-config-provider/index.js +25 -6
  22. package/es/antd-config-provider/loadConstrueLocale.d.ts +1 -0
  23. package/es/antd-config-provider/loadConstrueLocale.js +293 -0
  24. package/es/api-client/APIClient.js +5 -0
  25. package/es/block-provider/FormBlockProvider.js +5 -2
  26. package/es/block-provider/KanbanBlockProvider.js +3 -3
  27. package/es/block-provider/SharedFilterProvider.d.ts +1 -0
  28. package/es/block-provider/SharedFilterProvider.js +22 -6
  29. package/es/collection-manager/CollectionHistoryProvider.js +14 -2
  30. package/es/collection-manager/hooks/useCollection.d.ts +1 -0
  31. package/es/collection-manager/hooks/useCollection.js +10 -0
  32. package/es/collection-manager/interfaces/index.d.ts +0 -1
  33. package/es/collection-manager/interfaces/index.js +0 -1
  34. package/es/collection-manager/interfaces/o2m.js +1 -0
  35. package/es/collection-manager/interfaces/properties/operators.js +7 -0
  36. package/es/collection-manager/interfaces/subTable.js +1 -0
  37. package/es/collection-manager/templates/calendar.js +5 -0
  38. package/es/formula/Expression.d.ts +2 -0
  39. package/es/formula/Expression.js +296 -0
  40. package/es/formula/Result.d.ts +2 -0
  41. package/es/formula/Result.js +91 -0
  42. package/es/formula/index.d.ts +6 -0
  43. package/es/formula/index.js +8 -0
  44. package/es/i18n/i18n.js +7 -12
  45. package/es/index.d.ts +2 -1
  46. package/es/index.js +3 -2
  47. package/es/locale/en_US.d.ts +108 -28
  48. package/es/locale/en_US.js +108 -28
  49. package/es/locale/index.d.ts +201 -4
  50. package/es/locale/index.js +191 -58
  51. package/es/locale/ja_JP.d.ts +4 -0
  52. package/es/locale/ja_JP.js +4 -0
  53. package/es/locale/zh_CN.d.ts +11 -1
  54. package/es/locale/zh_CN.js +12 -2
  55. package/es/plugin-manager/PluginManager.js +19 -13
  56. package/es/pm/PluginManagerLink.js +38 -43
  57. package/es/pm/index.d.ts +1 -0
  58. package/es/pm/index.js +84 -35
  59. package/es/record-provider/index.d.ts +1 -0
  60. package/es/record-provider/index.js +7 -4
  61. package/es/route-switch/antd/admin-layout/index.d.ts +1 -0
  62. package/es/route-switch/antd/admin-layout/index.js +4 -6
  63. package/es/schema-component/antd/action/Action.js +19 -16
  64. package/es/schema-component/antd/association-filter/AssociationFilter.Item.js +24 -23
  65. package/es/schema-component/antd/cron/Cron.d.ts +0 -1
  66. package/es/schema-component/antd/cron/Cron.js +16 -19
  67. package/es/schema-component/antd/cron/locale/index.d.ts +37 -0
  68. package/es/schema-component/antd/cron/locale/index.js +6 -0
  69. package/es/schema-component/antd/filter/useFilterActionProps.js +17 -23
  70. package/es/schema-component/antd/form-item/FormItem.js +5 -4
  71. package/es/schema-component/antd/index.d.ts +1 -2
  72. package/es/schema-component/antd/index.js +1 -2
  73. package/es/schema-component/antd/page/FixedBlock.d.ts +1 -1
  74. package/es/schema-component/antd/page/FixedBlock.js +70 -21
  75. package/es/schema-component/antd/page/Page.js +15 -10
  76. package/es/schema-component/antd/remote-select/RemoteSelect.js +12 -2
  77. package/es/schema-component/antd/table/Table.Array.js +1 -1
  78. package/es/schema-component/antd/table-v2/Table.js +13 -6
  79. package/es/schema-component/antd/table-v2/TableBlockDesigner.js +24 -8
  80. package/es/schema-component/hooks/useDesignable.d.ts +1 -1
  81. package/es/schema-component/hooks/useDesignable.js +45 -16
  82. package/es/schema-component/hooks/useFieldTitle.js +3 -1
  83. package/es/schema-initializer/buttons/ReadPrettyFormActionInitializers.d.ts +3 -0
  84. package/es/schema-initializer/buttons/ReadPrettyFormActionInitializers.js +1 -0
  85. package/es/schema-initializer/buttons/TableActionColumnInitializers.js +1 -0
  86. package/es/schema-initializer/utils.js +6 -9
  87. package/es/schema-templates/BlockTemplate.js +2 -2
  88. package/es/schema-templates/SchemaTemplateManagerProvider.js +1 -1
  89. package/es/system-settings/SystemSettingsShortcut.js +1 -1
  90. package/lib/acl/ACLProvider.d.ts +16 -2
  91. package/lib/acl/ACLProvider.js +283 -102
  92. package/lib/acl/Configuration/ConfigureCenter.d.ts +2 -0
  93. package/lib/acl/Configuration/ConfigureCenter.js +278 -0
  94. package/lib/acl/Configuration/MenuConfigure.js +3 -3
  95. package/lib/acl/Configuration/PermisionProvider.d.ts +4 -0
  96. package/lib/acl/Configuration/PermisionProvider.js +156 -0
  97. package/lib/acl/Configuration/RoleConfigure.js +107 -23
  98. package/lib/acl/Configuration/RoleTable.d.ts +1 -1
  99. package/lib/acl/Configuration/RoleTable.js +8 -4
  100. package/lib/acl/Configuration/RolesResourcesActions.js +2 -2
  101. package/lib/acl/Configuration/index.d.ts +1 -0
  102. package/lib/acl/Configuration/index.js +15 -1
  103. package/lib/acl/Configuration/schemas/roleCollections.js +41 -13
  104. package/lib/acl/Configuration/schemas/roles.js +47 -2
  105. package/lib/acl/Configuration/schemas/scopes.js +2 -0
  106. package/lib/acl/index.d.ts +1 -0
  107. package/lib/acl/index.js +3 -1
  108. package/lib/acl/style.less +10 -0
  109. package/lib/antd-config-provider/index.d.ts +3 -1
  110. package/lib/antd-config-provider/index.js +40 -6
  111. package/lib/antd-config-provider/loadConstrueLocale.d.ts +1 -0
  112. package/lib/antd-config-provider/loadConstrueLocale.js +304 -0
  113. package/lib/api-client/APIClient.js +5 -0
  114. package/lib/block-provider/FormBlockProvider.js +9 -3
  115. package/lib/block-provider/KanbanBlockProvider.js +3 -3
  116. package/lib/block-provider/SharedFilterProvider.d.ts +1 -0
  117. package/lib/block-provider/SharedFilterProvider.js +26 -7
  118. package/lib/collection-manager/CollectionHistoryProvider.js +14 -1
  119. package/lib/collection-manager/hooks/useCollection.d.ts +1 -0
  120. package/lib/collection-manager/hooks/useCollection.js +10 -0
  121. package/lib/collection-manager/interfaces/index.d.ts +0 -1
  122. package/lib/collection-manager/interfaces/index.js +0 -13
  123. package/lib/collection-manager/interfaces/o2m.js +1 -0
  124. package/lib/collection-manager/interfaces/properties/operators.js +7 -0
  125. package/lib/collection-manager/interfaces/subTable.js +1 -0
  126. package/lib/collection-manager/templates/calendar.js +5 -0
  127. package/lib/formula/Expression.d.ts +2 -0
  128. package/lib/formula/Expression.js +319 -0
  129. package/lib/formula/Result.d.ts +2 -0
  130. package/lib/formula/Result.js +114 -0
  131. package/lib/formula/index.d.ts +6 -0
  132. package/lib/formula/index.js +22 -0
  133. package/lib/i18n/i18n.js +7 -14
  134. package/lib/index.d.ts +2 -1
  135. package/lib/index.js +26 -13
  136. package/lib/locale/en_US.d.ts +108 -28
  137. package/lib/locale/en_US.js +108 -28
  138. package/lib/locale/index.d.ts +201 -4
  139. package/lib/locale/index.js +197 -67
  140. package/lib/locale/ja_JP.d.ts +4 -0
  141. package/lib/locale/ja_JP.js +4 -0
  142. package/lib/locale/zh_CN.d.ts +11 -1
  143. package/lib/locale/zh_CN.js +12 -2
  144. package/lib/plugin-manager/PluginManager.js +20 -13
  145. package/lib/pm/PluginManagerLink.js +37 -43
  146. package/lib/pm/index.d.ts +1 -0
  147. package/lib/pm/index.js +90 -35
  148. package/lib/record-provider/index.d.ts +1 -0
  149. package/lib/record-provider/index.js +7 -4
  150. package/lib/route-switch/antd/admin-layout/index.d.ts +1 -0
  151. package/lib/route-switch/antd/admin-layout/index.js +5 -4
  152. package/lib/schema-component/antd/action/Action.js +19 -16
  153. package/lib/schema-component/antd/association-filter/AssociationFilter.Item.js +22 -21
  154. package/lib/schema-component/antd/cron/Cron.d.ts +0 -1
  155. package/lib/schema-component/antd/cron/Cron.js +19 -24
  156. package/lib/schema-component/antd/cron/locale/index.d.ts +37 -0
  157. package/lib/schema-component/antd/cron/locale/index.js +18 -0
  158. package/lib/schema-component/antd/filter/useFilterActionProps.js +16 -23
  159. package/lib/schema-component/antd/form-item/FormItem.js +6 -4
  160. package/lib/schema-component/antd/index.d.ts +1 -2
  161. package/lib/schema-component/antd/index.js +8 -21
  162. package/lib/schema-component/antd/page/FixedBlock.d.ts +1 -1
  163. package/lib/schema-component/antd/page/FixedBlock.js +71 -21
  164. package/lib/schema-component/antd/page/Page.js +14 -9
  165. package/lib/schema-component/antd/remote-select/RemoteSelect.js +18 -3
  166. package/lib/schema-component/antd/table/Table.Array.js +1 -1
  167. package/lib/schema-component/antd/table-v2/Table.js +14 -6
  168. package/lib/schema-component/antd/table-v2/TableBlockDesigner.js +25 -8
  169. package/lib/schema-component/hooks/useDesignable.d.ts +1 -1
  170. package/lib/schema-component/hooks/useDesignable.js +47 -18
  171. package/lib/schema-component/hooks/useFieldTitle.js +4 -1
  172. package/lib/schema-initializer/buttons/ReadPrettyFormActionInitializers.d.ts +3 -0
  173. package/lib/schema-initializer/buttons/ReadPrettyFormActionInitializers.js +1 -0
  174. package/lib/schema-initializer/buttons/TableActionColumnInitializers.js +1 -0
  175. package/lib/schema-initializer/utils.js +6 -9
  176. package/lib/schema-templates/BlockTemplate.js +2 -2
  177. package/lib/schema-templates/SchemaTemplateManagerProvider.js +1 -1
  178. package/lib/system-settings/SystemSettingsShortcut.js +1 -1
  179. package/package.json +6 -11
  180. package/es/collection-manager/interfaces/formula.d.ts +0 -2
  181. package/es/collection-manager/interfaces/formula.js +0 -74
  182. package/es/schema-component/antd/formula-input/Compute.d.ts +0 -3
  183. package/es/schema-component/antd/formula-input/Compute.js +0 -55
  184. package/es/schema-component/antd/formula-input/FormulaInput.d.ts +0 -3
  185. package/es/schema-component/antd/formula-input/FormulaInput.js +0 -167
  186. package/es/schema-component/antd/formula-input/index.d.ts +0 -1
  187. package/es/schema-component/antd/formula-input/index.js +0 -7
  188. package/lib/collection-manager/interfaces/formula.d.ts +0 -2
  189. package/lib/collection-manager/interfaces/formula.js +0 -83
  190. package/lib/schema-component/antd/formula-input/Compute.d.ts +0 -3
  191. package/lib/schema-component/antd/formula-input/Compute.js +0 -79
  192. package/lib/schema-component/antd/formula-input/FormulaInput.d.ts +0 -3
  193. package/lib/schema-component/antd/formula-input/FormulaInput.js +0 -191
  194. package/lib/schema-component/antd/formula-input/index.d.ts +0 -1
  195. package/lib/schema-component/antd/formula-input/index.js +0 -18
@@ -1,3 +1,9 @@
1
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
+
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+
5
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+
1
7
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
8
 
3
9
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -10,29 +16,15 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
10
16
 
11
17
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
18
 
13
- 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; }
14
-
15
19
  import { AppstoreAddOutlined, SettingOutlined } from '@ant-design/icons';
16
- import { uid } from '@formily/shared';
17
20
  import { Dropdown, Menu } from 'antd';
18
- import React, { useState } from 'react';
21
+ import React, { useContext, useState } from 'react';
19
22
  import { useTranslation } from 'react-i18next';
20
23
  import { useHistory } from 'react-router-dom';
24
+ import { useACLRoleContext } from '../acl/ACLProvider';
21
25
  import { PluginManager } from '../plugin-manager';
22
- import { ActionContext } from '../schema-component';
23
- var schema = {
24
- type: 'object',
25
- properties: _defineProperty({}, uid(), {
26
- 'x-component': 'Action.Drawer',
27
- type: 'void',
28
- title: '{{t("Collections & Fields")}}',
29
- properties: {
30
- configuration: {
31
- 'x-component': 'ConfigurationTable'
32
- }
33
- }
34
- })
35
- };
26
+ import { ActionContext, useCompile } from '../schema-component';
27
+ import { getPluginsTabs, SettingsCenterContext } from './index';
36
28
  export var PluginManagerLink = function PluginManagerLink() {
37
29
  var _useState = useState(false),
38
30
  _useState2 = _slicedToArray(_useState, 2),
@@ -56,7 +48,25 @@ export var PluginManagerLink = function PluginManagerLink() {
56
48
  }
57
49
  }));
58
50
  };
51
+
52
+ var getBookmarkTabs = function getBookmarkTabs(data) {
53
+ var bookmarkTabs = [];
54
+ data.forEach(function (plugin) {
55
+ var tabs = plugin.tabs;
56
+ tabs.forEach(function (tab) {
57
+ tab.isBookmark && tab.isAllow && bookmarkTabs.push(_objectSpread(_objectSpread({}, tab), {}, {
58
+ path: "".concat(plugin.key, "/").concat(tab.key)
59
+ }));
60
+ });
61
+ });
62
+ return bookmarkTabs;
63
+ };
64
+
59
65
  export var SettingsCenterDropdown = function SettingsCenterDropdown() {
66
+ var _useACLRoleContext = useACLRoleContext(),
67
+ _useACLRoleContext$sn = _useACLRoleContext.snippets,
68
+ snippets = _useACLRoleContext$sn === void 0 ? [] : _useACLRoleContext$sn;
69
+
60
70
  var _useState3 = useState(false),
61
71
  _useState4 = _slicedToArray(_useState3, 2),
62
72
  visible = _useState4[0],
@@ -65,48 +75,33 @@ export var SettingsCenterDropdown = function SettingsCenterDropdown() {
65
75
  var _useTranslation2 = useTranslation(),
66
76
  t = _useTranslation2.t;
67
77
 
78
+ var compile = useCompile();
68
79
  var history = useHistory();
69
- var items = [{
70
- title: t('Collections & Fields'),
71
- path: 'collection-manager/collections'
72
- }, {
73
- title: t('Roles & Permissions'),
74
- path: 'acl/roles'
75
- }, {
76
- title: t('File storages'),
77
- path: 'file-manager/storages'
78
- }, {
79
- title: t('System settings'),
80
- path: 'system-settings/system-settings'
81
- }, {
82
- title: t('workflow:Workflow'),
83
- path: 'workflow/workflows'
84
- } // {
85
- // title: t('Graph Collections'),
86
- // path: 'graph/collections',
87
- // },
88
- ];
80
+ var itemData = useContext(SettingsCenterContext);
81
+ var pluginsTabs = getPluginsTabs(itemData, snippets);
82
+ var bookmarkTabs = getBookmarkTabs(pluginsTabs);
89
83
  return /*#__PURE__*/React.createElement(ActionContext.Provider, {
90
84
  value: {
91
85
  visible: visible,
92
86
  setVisible: setVisible
93
87
  }
94
88
  }, /*#__PURE__*/React.createElement(Dropdown, {
89
+ placement: "bottom",
95
90
  overlay: /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement(Menu.ItemGroup, {
96
91
  title: t('Bookmark')
97
- }, items.map(function (item) {
92
+ }, bookmarkTabs.map(function (tab) {
98
93
  return /*#__PURE__*/React.createElement(Menu.Item, {
99
94
  onClick: function onClick() {
100
- history.push('/admin/settings/' + item.path);
95
+ history.push('/admin/settings/' + tab.path);
101
96
  },
102
- key: item.path
103
- }, item.title);
97
+ key: tab.path
98
+ }, compile(tab.title));
104
99
  })), /*#__PURE__*/React.createElement(Menu.Divider, null), /*#__PURE__*/React.createElement(Menu.Item, {
105
100
  onClick: function onClick() {
106
101
  history.push('/admin/settings');
107
102
  },
108
103
  key: "/admin/settings"
109
- }, t('Settings center')))
104
+ }, t('All plugin settings')))
110
105
  }, /*#__PURE__*/React.createElement(PluginManager.Toolbar.Item, {
111
106
  icon: /*#__PURE__*/React.createElement(SettingOutlined, null)
112
107
  })));
package/es/pm/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  export declare const SettingsCenterContext: React.Context<any>;
3
+ export declare const getPluginsTabs: (items: any, snippets: any) => any[];
3
4
  export declare const SettingsCenterProvider: (props: any) => JSX.Element;
4
5
  export declare const PMProvider: (props: any) => JSX.Element;
5
6
  export default PMProvider;
package/es/pm/index.js CHANGED
@@ -20,11 +20,13 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
20
20
 
21
21
  import { DeleteOutlined, SettingOutlined } from '@ant-design/icons';
22
22
  import { css } from '@emotion/css';
23
- import { Avatar, Card, Layout, Menu, message, PageHeader, Popconfirm, Spin, Switch, Tabs } from 'antd';
23
+ import { Avatar, Card, Layout, Menu, message, PageHeader, Popconfirm, Result, Spin, Switch, Tabs } from 'antd';
24
+ import { sortBy } from 'lodash';
24
25
  import React, { createContext, useContext, useMemo } from 'react';
25
26
  import { useTranslation } from 'react-i18next';
26
27
  import { Redirect, useHistory, useRouteMatch } from 'react-router-dom';
27
28
  import { ACLPane } from '../acl';
29
+ import { useACLRoleContext } from '../acl/ACLProvider';
28
30
  import { useAPIClient, useRequest } from '../api-client';
29
31
  import { CollectionManagerPane } from '../collection-manager';
30
32
  import { useDocumentTitle } from '../document-title';
@@ -172,7 +174,6 @@ var LocalPlugins = function LocalPlugins() {
172
174
 
173
175
  return /*#__PURE__*/React.createElement(React.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) {
174
176
  return /*#__PURE__*/React.createElement(PluginCard, {
175
- key: item.id,
176
177
  data: item
177
178
  });
178
179
  }));
@@ -229,7 +230,11 @@ var PluginList = function PluginList(props) {
229
230
  var _useTranslation3 = useTranslation(),
230
231
  t = _useTranslation3.t;
231
232
 
232
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(PageHeader, {
233
+ var _useACLRoleContext = useACLRoleContext(),
234
+ _useACLRoleContext$sn = _useACLRoleContext.snippets,
235
+ snippets = _useACLRoleContext$sn === void 0 ? [] : _useACLRoleContext$sn;
236
+
237
+ return snippets.includes('pm') ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(PageHeader, {
233
238
  ghost: false,
234
239
  title: t('Plugin manager'),
235
240
  footer: /*#__PURE__*/React.createElement(Tabs, {
@@ -257,7 +262,11 @@ var PluginList = function PluginList(props) {
257
262
  local: LocalPlugins,
258
263
  'built-in': BuiltinPlugins,
259
264
  marketplace: MarketplacePlugins
260
- }[tabName])));
265
+ }[tabName]))) : /*#__PURE__*/React.createElement(Result, {
266
+ status: "404",
267
+ title: "404",
268
+ subTitle: "Sorry, the page you visited does not exist."
269
+ });
261
270
  };
262
271
 
263
272
  var settings = {
@@ -266,16 +275,17 @@ var settings = {
266
275
  icon: 'LockOutlined',
267
276
  tabs: {
268
277
  roles: {
278
+ isBookmark: true,
269
279
  title: '{{t("Roles & Permissions")}}',
270
280
  component: ACLPane
271
281
  }
272
282
  }
273
283
  },
274
- 'block-templates': {
284
+ 'ui-schema-storage': {
275
285
  title: '{{t("Block templates")}}',
276
286
  icon: 'LayoutOutlined',
277
287
  tabs: {
278
- list: {
288
+ 'block-templates': {
279
289
  title: '{{t("Block templates")}}',
280
290
  component: BlockTemplatesPane
281
291
  }
@@ -286,6 +296,7 @@ var settings = {
286
296
  title: '{{t("Collection manager")}}',
287
297
  tabs: {
288
298
  collections: {
299
+ isBookmark: true,
289
300
  title: '{{t("Collections & Fields")}}',
290
301
  component: CollectionManagerPane
291
302
  }
@@ -296,33 +307,67 @@ var settings = {
296
307
  title: '{{t("System settings")}}',
297
308
  tabs: {
298
309
  'system-settings': {
310
+ isBookmark: true,
299
311
  title: '{{t("System settings")}}',
300
312
  component: SystemSettingsPane
301
313
  }
302
314
  }
303
315
  }
304
316
  };
317
+ export var getPluginsTabs = function getPluginsTabs(items, snippets) {
318
+ var pluginsTabs = Object.keys(items).map(function (plugin) {
319
+ var tabsObj = items[plugin].tabs;
320
+ var tabs = sortBy(Object.keys(tabsObj).map(function (tab) {
321
+ return _objectSpread(_objectSpread({
322
+ key: tab
323
+ }, tabsObj[tab]), {}, {
324
+ isAllow: snippets.includes('pm.*') && !(snippets === null || snippets === void 0 ? void 0 : snippets.includes("!pm.".concat(plugin, ".").concat(tab)))
325
+ });
326
+ }), function (o) {
327
+ return !o.isAllow;
328
+ });
329
+ return _objectSpread(_objectSpread({}, items[plugin]), {}, {
330
+ key: plugin,
331
+ tabs: tabs,
332
+ isAllow: !tabs.every(function (v) {
333
+ return !v.isAllow;
334
+ })
335
+ });
336
+ });
337
+ return sortBy(pluginsTabs, function (o) {
338
+ return !o.isAllow;
339
+ });
340
+ };
305
341
 
306
342
  var SettingsCenter = function SettingsCenter(props) {
307
- var _items$pluginName3, _items$pluginName3$ta, _items$pluginName3$ta2, _items$pluginName4, _items$pluginName5;
343
+ var _activePlugin$tabs$fi, _items$pluginName2, _items$pluginName2$ta, _items$pluginName2$ta2, _items$pluginName3, _plugin$tabs;
344
+
345
+ var _useACLRoleContext2 = useACLRoleContext(),
346
+ _useACLRoleContext2$s = _useACLRoleContext2.snippets,
347
+ snippets = _useACLRoleContext2$s === void 0 ? [] : _useACLRoleContext2$s;
308
348
 
309
349
  var match = useRouteMatch();
310
350
  var history = useHistory();
311
351
  var items = useContext(SettingsCenterContext);
352
+ var pluginsTabs = getPluginsTabs(items, snippets);
312
353
  var compile = useCompile();
313
354
  var firstUri = useMemo(function () {
314
- var _items$pluginName;
315
-
316
- var keys = Object.keys(items).sort();
317
- var pluginName = keys.shift();
318
- 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();
355
+ var pluginName = pluginsTabs[0].key;
356
+ var tabName = pluginsTabs[0].tabs[0].key;
319
357
  return "/admin/settings/".concat(pluginName, "/").concat(tabName);
320
- }, [items]);
358
+ }, [pluginsTabs]);
321
359
 
322
360
  var _ref2 = match.params || {},
323
361
  pluginName = _ref2.pluginName,
324
362
  tabName = _ref2.tabName;
325
363
 
364
+ var activePlugin = pluginsTabs.find(function (v) {
365
+ return v.key === pluginName;
366
+ });
367
+ var aclPluginTabCheck = (activePlugin === null || activePlugin === void 0 ? void 0 : activePlugin.isAllow) && ((_activePlugin$tabs$fi = activePlugin.tabs.find(function (v) {
368
+ return v.key === tabName;
369
+ })) === null || _activePlugin$tabs$fi === void 0 ? void 0 : _activePlugin$tabs$fi.isAllow);
370
+
326
371
  if (!pluginName) {
327
372
  return /*#__PURE__*/React.createElement(Redirect, {
328
373
  to: firstUri
@@ -336,33 +381,36 @@ var SettingsCenter = function SettingsCenter(props) {
336
381
  }
337
382
 
338
383
  if (!tabName) {
339
- var _items$pluginName2;
384
+ var _items$pluginName;
340
385
 
341
- var firstTabName = Object.keys((_items$pluginName2 = items[pluginName]) === null || _items$pluginName2 === void 0 ? void 0 : _items$pluginName2.tabs).shift();
386
+ var firstTabName = Object.keys((_items$pluginName = items[pluginName]) === null || _items$pluginName === void 0 ? void 0 : _items$pluginName.tabs).shift();
342
387
  return /*#__PURE__*/React.createElement(Redirect, {
343
388
  to: "/admin/settings/".concat(pluginName, "/").concat(firstTabName)
344
389
  });
345
390
  }
346
391
 
347
- 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;
348
- var menuItems = Object.keys(items).sort().map(function (key) {
349
- var item = items[key];
350
- var tabKey = Object.keys(item.tabs).shift();
392
+ var component = (_items$pluginName2 = items[pluginName]) === null || _items$pluginName2 === void 0 ? void 0 : (_items$pluginName2$ta = _items$pluginName2.tabs) === null || _items$pluginName2$ta === void 0 ? void 0 : (_items$pluginName2$ta2 = _items$pluginName2$ta[tabName]) === null || _items$pluginName2$ta2 === void 0 ? void 0 : _items$pluginName2$ta2.component;
393
+ var plugin = pluginsTabs.find(function (v) {
394
+ return v.key === pluginName;
395
+ });
396
+ var menuItems = pluginsTabs.filter(function (plugin) {
397
+ return plugin.isAllow;
398
+ }).map(function (plugin) {
351
399
  return {
352
- label: compile(item.title),
353
- key: key,
354
- icon: item.icon ? /*#__PURE__*/React.createElement(Icon, {
355
- type: item.icon
400
+ label: compile(plugin.title),
401
+ key: plugin.key,
402
+ icon: plugin.icon ? /*#__PURE__*/React.createElement(Icon, {
403
+ type: plugin.icon
356
404
  }) : null
357
405
  };
358
406
  });
359
- return /*#__PURE__*/React.createElement(Layout, null, /*#__PURE__*/React.createElement("div", {
407
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Layout, null, /*#__PURE__*/React.createElement("div", {
360
408
  style: {
361
409
  '--side-menu-width': '200px'
362
410
  },
363
- className: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: var(--side-menu-width);\n overflow: hidden;\n flex: 0 0 var(--side-menu-width);\n max-width: var(--side-menu-width);\n min-width: var(--side-menu-width);\n pointer-events: none;\n "])))
411
+ className: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: var(--side-menu-width);\n overflow: hidden;\n flex: 0 0 var(--side-menu-width);\n max-width: var(--side-menu-width);\n min-width: var(--side-menu-width);\n pointer-events: none;\n "])))
364
412
  }), /*#__PURE__*/React.createElement(Layout.Sider, {
365
- className: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n height: 100%;\n position: fixed;\n padding-top: 46px;\n left: 0;\n top: 0;\n background: rgba(0, 0, 0, 0);\n z-index: 100;\n "]))),
413
+ className: css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n height: 100%;\n position: fixed;\n padding-top: 46px;\n left: 0;\n top: 0;\n background: rgba(0, 0, 0, 0);\n z-index: 100;\n "]))),
366
414
  theme: 'light'
367
415
  }, /*#__PURE__*/React.createElement(Menu, {
368
416
  selectedKeys: [pluginName],
@@ -377,28 +425,29 @@ var SettingsCenter = function SettingsCenter(props) {
377
425
  history.push("/admin/settings/".concat(e.key, "/").concat(tabKey));
378
426
  },
379
427
  items: menuItems
380
- })), /*#__PURE__*/React.createElement(Layout.Content, null, /*#__PURE__*/React.createElement(PageHeader, {
428
+ })), /*#__PURE__*/React.createElement(Layout.Content, null, aclPluginTabCheck && /*#__PURE__*/React.createElement(PageHeader, {
381
429
  ghost: false,
382
- title: compile((_items$pluginName4 = items[pluginName]) === null || _items$pluginName4 === void 0 ? void 0 : _items$pluginName4.title),
430
+ title: compile((_items$pluginName3 = items[pluginName]) === null || _items$pluginName3 === void 0 ? void 0 : _items$pluginName3.title),
383
431
  footer: /*#__PURE__*/React.createElement(Tabs, {
384
432
  activeKey: tabName,
385
433
  onChange: function onChange(activeKey) {
386
434
  history.push("/admin/settings/".concat(pluginName, "/").concat(activeKey));
387
435
  }
388
- }, Object.keys((_items$pluginName5 = items[pluginName]) === null || _items$pluginName5 === void 0 ? void 0 : _items$pluginName5.tabs).map(function (tabKey) {
389
- var _items$pluginName$tab;
390
-
391
- var tab = (_items$pluginName$tab = items[pluginName].tabs) === null || _items$pluginName$tab === void 0 ? void 0 : _items$pluginName$tab[tabKey];
392
- return /*#__PURE__*/React.createElement(Tabs.TabPane, {
436
+ }, (_plugin$tabs = plugin.tabs) === null || _plugin$tabs === void 0 ? void 0 : _plugin$tabs.map(function (tab) {
437
+ return tab.isAllow && /*#__PURE__*/React.createElement(Tabs.TabPane, {
393
438
  tab: compile(tab === null || tab === void 0 ? void 0 : tab.title),
394
- key: tabKey
439
+ key: tab.key
395
440
  });
396
441
  }))
397
442
  }), /*#__PURE__*/React.createElement("div", {
398
443
  style: {
399
444
  margin: 24
400
445
  }
401
- }, component && /*#__PURE__*/React.createElement(component))));
446
+ }, aclPluginTabCheck ? component && /*#__PURE__*/React.createElement(component) : /*#__PURE__*/React.createElement(Result, {
447
+ status: "404",
448
+ title: "404",
449
+ subTitle: "Sorry, the page you visited does not exist."
450
+ })))));
402
451
  };
403
452
 
404
453
  export var SettingsCenterProvider = function SettingsCenterProvider(props) {
@@ -3,6 +3,7 @@ export declare const RecordContext: React.Context<{}>;
3
3
  export declare const RecordIndexContext: React.Context<any>;
4
4
  export declare const RecordProvider: React.FC<{
5
5
  record: any;
6
+ parent?: any;
6
7
  }>;
7
8
  export declare const RecordIndexProvider: React.FC<{
8
9
  index: any;
@@ -10,14 +10,17 @@ export var RecordContext = /*#__PURE__*/createContext({});
10
10
  export var RecordIndexContext = /*#__PURE__*/createContext(null);
11
11
  export var RecordProvider = function RecordProvider(props) {
12
12
  var record = props.record,
13
- children = props.children;
13
+ children = props.children,
14
+ _props$parent = props.parent,
15
+ parent = _props$parent === void 0 ? false : _props$parent;
14
16
 
15
17
  var __parent = useContext(RecordContext);
16
18
 
19
+ var value = _objectSpread({}, record);
20
+
21
+ value['__parent'] = parent ? parent : __parent;
17
22
  return /*#__PURE__*/React.createElement(RecordContext.Provider, {
18
- value: _objectSpread(_objectSpread({}, record), {}, {
19
- __parent: __parent
20
- })
23
+ value: value
21
24
  }, children);
22
25
  };
23
26
  export var RecordIndexProvider = function RecordIndexProvider(props) {
@@ -1,2 +1,3 @@
1
+ export declare const InternalAdminLayout: (props: any) => JSX.Element;
1
2
  export declare const AdminLayout: (props: any) => JSX.Element;
2
3
  export default AdminLayout;
@@ -24,17 +24,16 @@ import { css } from '@emotion/css';
24
24
  import { Layout, Spin } from 'antd';
25
25
  import React, { createContext, useContext, useMemo, useRef, useState } from 'react';
26
26
  import { useHistory, useRouteMatch } from 'react-router-dom';
27
- import { ACLAllowConfigure, ACLRolesCheckProvider, CurrentUser, CurrentUserProvider, CurrentAppInfoProvider, findByUid, findMenuItem, RemoteCollectionManagerProvider, RemotePluginManagerToolbar, RemoteSchemaTemplateManagerProvider, SchemaComponent, useACLRoleContext, useDocumentTitle, useRequest, useRoute, useSystemSettings } from '../../../';
27
+ import { ACLRolesCheckProvider, CurrentUser, CurrentUserProvider, CurrentAppInfoProvider, findByUid, findMenuItem, RemoteCollectionManagerProvider, RemotePluginManagerToolbar, RemoteSchemaTemplateManagerProvider, SchemaComponent, useACLRoleContext, useDocumentTitle, useRequest, useRoute, useSystemSettings } from '../../../';
28
28
  import { useCollectionManager } from '../../../collection-manager';
29
29
  import { useMutationObserver } from 'ahooks';
30
30
 
31
31
  var filterByACL = function filterByACL(schema, options) {
32
32
  var allowAll = options.allowAll,
33
- allowConfigure = options.allowConfigure,
34
33
  _options$allowMenuIte = options.allowMenuItemIds,
35
34
  allowMenuItemIds = _options$allowMenuIte === void 0 ? [] : _options$allowMenuIte;
36
35
 
37
- if (allowAll || allowConfigure) {
36
+ if (allowAll) {
38
37
  return schema;
39
38
  }
40
39
 
@@ -159,7 +158,7 @@ var MenuEditor = function MenuEditor(props) {
159
158
  }));
160
159
  };
161
160
 
162
- var InternalAdminLayout = function InternalAdminLayout(props) {
161
+ export var InternalAdminLayout = function InternalAdminLayout(props) {
163
162
  var _result$data, _result$data$data, _result$data$data$log;
164
163
 
165
164
  var sideMenuRef = useRef();
@@ -218,7 +217,7 @@ var InternalAdminLayout = function InternalAdminLayout(props) {
218
217
  top: 0,
219
218
  right: 0
220
219
  }
221
- }, /*#__PURE__*/React.createElement(ACLAllowConfigure, null, /*#__PURE__*/React.createElement(RemotePluginManagerToolbar, null)), /*#__PURE__*/React.createElement(CurrentUser, null)))), /*#__PURE__*/React.createElement("div", {
220
+ }, /*#__PURE__*/React.createElement(RemotePluginManagerToolbar, null), /*#__PURE__*/React.createElement(CurrentUser, null)))), /*#__PURE__*/React.createElement("div", {
222
221
  style: {
223
222
  '--side-menu-width': "".concat(sideMenuWidth, "px")
224
223
  },
@@ -236,7 +235,6 @@ var InternalAdminLayout = function InternalAdminLayout(props) {
236
235
  className: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n height: 46px;\n line-height: 46px;\n background: transparent;\n pointer-events: none;\n "])))
237
236
  }), service.contentLoading ? /*#__PURE__*/React.createElement(Spin, null) : props.children));
238
237
  };
239
-
240
238
  export var AdminLayout = function AdminLayout(props) {
241
239
  return /*#__PURE__*/React.createElement(CurrentAppInfoProvider, null, /*#__PURE__*/React.createElement(CurrentUserProvider, null, /*#__PURE__*/React.createElement(RemoteSchemaTemplateManagerProvider, null, /*#__PURE__*/React.createElement(RemoteCollectionManagerProvider, null, /*#__PURE__*/React.createElement(ACLRolesCheckProvider, null, /*#__PURE__*/React.createElement(InternalAdminLayout, _objectSpread({}, props)))))));
242
240
  };
@@ -83,6 +83,7 @@ export var Action = observer(function (props) {
83
83
  var form = useForm();
84
84
  var designerProps = fieldSchema['x-designer-props'];
85
85
  var openMode = fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xCompon = fieldSchema['x-component-props']) === null || _fieldSchema$xCompon === void 0 ? void 0 : _fieldSchema$xCompon['openMode'];
86
+ var disabled = form.disabled || field.disabled;
86
87
  var openSize = fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xCompon2 = fieldSchema['x-component-props']) === null || _fieldSchema$xCompon2 === void 0 ? void 0 : _fieldSchema$xCompon2['openSize'];
87
88
 
88
89
  var renderButton = function renderButton() {
@@ -93,23 +94,25 @@ export var Action = observer(function (props) {
93
94
  icon: /*#__PURE__*/React.createElement(Icon, {
94
95
  type: icon
95
96
  }),
96
- disabled: form.disabled,
97
+ disabled: disabled,
97
98
  onClick: function onClick(e) {
98
- e.preventDefault();
99
- e.stopPropagation();
100
-
101
- var onOk = function onOk() {
102
- _onClick === null || _onClick === void 0 ? void 0 : _onClick(e);
103
- setVisible(true);
104
- run();
105
- };
106
-
107
- if (confirm) {
108
- Modal.confirm(_objectSpread(_objectSpread({}, confirm), {}, {
109
- onOk: onOk
110
- }));
111
- } else {
112
- onOk();
99
+ if (!disabled) {
100
+ e.preventDefault();
101
+ e.stopPropagation();
102
+
103
+ var onOk = function onOk() {
104
+ _onClick === null || _onClick === void 0 ? void 0 : _onClick(e);
105
+ setVisible(true);
106
+ run();
107
+ };
108
+
109
+ if (confirm) {
110
+ Modal.confirm(_objectSpread(_objectSpread({}, confirm), {}, {
111
+ onOk: onOk
112
+ }));
113
+ } else {
114
+ onOk();
115
+ }
113
116
  }
114
117
  },
115
118
  component: component || Button,
@@ -2,6 +2,14 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
2
2
 
3
3
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
4
4
 
5
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
6
+
7
+ 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."); }
8
+
9
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
10
+
11
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
12
+
5
13
  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; }
6
14
 
7
15
  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; }
@@ -25,10 +33,10 @@ import { css } from '@emotion/css';
25
33
  import { useFieldSchema } from '@formily/react';
26
34
  import { Col, Collapse, Input, Row, Tree } from 'antd';
27
35
  import cls from 'classnames';
28
- import React, { useContext, useState } from 'react';
36
+ import React, { useState } from 'react';
29
37
  import { useRequest } from '../../../api-client';
30
38
  import { useBlockRequestContext } from '../../../block-provider';
31
- import { SharedFilterContext } from '../../../block-provider/SharedFilterProvider';
39
+ import { mergeFilter } from '../../../block-provider/SharedFilterProvider';
32
40
  import { SortableItem } from '../../common';
33
41
  import { useCompile, useDesigner } from '../../hooks';
34
42
  import { AssociationFilter } from './AssociationFilter';
@@ -47,12 +55,8 @@ export var AssociationFilterItem = function AssociationFilterItem(props) {
47
55
  var compile = useCompile();
48
56
 
49
57
  var _useBlockRequestConte = useBlockRequestContext(),
50
- service = _useBlockRequestConte.service;
51
-
52
- var _useContext = useContext(SharedFilterContext),
53
- setSharedFilterStore = _useContext.setSharedFilterStore,
54
- sharedFilterStore = _useContext.sharedFilterStore,
55
- getFilterParams = _useContext.getFilterParams;
58
+ service = _useBlockRequestConte.service,
59
+ blockProps = _useBlockRequestConte.props;
56
60
 
57
61
  var _useState = useState(false),
58
62
  _useState2 = _slicedToArray(_useState, 2),
@@ -107,27 +111,24 @@ export var AssociationFilterItem = function AssociationFilterItem(props) {
107
111
  };
108
112
 
109
113
  var onSelect = function onSelect(selectedKeysValue) {
110
- var _service$params;
114
+ var _service$params, _service$params$, _service$params2, _blockProps$params;
111
115
 
112
116
  setSelectedKeys(selectedKeysValue);
113
- var orList = selectedKeysValue.map(function (item) {
114
- return _defineProperty({}, collectionFieldName, _defineProperty({}, valueKey, {
115
- $eq: item
116
- }));
117
- });
118
- var newFilter = orList.length > 0 ? {
119
- $or: orList
120
- } : {};
117
+ var filters = ((_service$params = service.params) === null || _service$params === void 0 ? void 0 : (_service$params$ = _service$params[1]) === null || _service$params$ === void 0 ? void 0 : _service$params$.filters) || {};
121
118
 
122
- var newAssociationFilterStore = _objectSpread(_objectSpread({}, sharedFilterStore), {}, _defineProperty({}, collectionFieldName, newFilter));
119
+ if (selectedKeysValue.length) {
120
+ filters["af.".concat(collectionFieldName)] = _defineProperty({}, "".concat(collectionFieldName, ".").concat(valueKey, ".$in"), selectedKeysValue);
121
+ } else {
122
+ delete filters["af.".concat(collectionFieldName)];
123
+ }
123
124
 
124
- setSharedFilterStore(newAssociationFilterStore);
125
- var paramFilter = getFilterParams(newAssociationFilterStore);
126
- service.run(_objectSpread(_objectSpread({}, (_service$params = service.params) === null || _service$params === void 0 ? void 0 : _service$params[0]), {}, {
125
+ service.run(_objectSpread(_objectSpread({}, (_service$params2 = service.params) === null || _service$params2 === void 0 ? void 0 : _service$params2[0]), {}, {
127
126
  pageSize: 200,
128
127
  page: 1,
129
- filter: paramFilter
130
- }));
128
+ filter: mergeFilter([].concat(_toConsumableArray(Object.values(filters)), [blockProps === null || blockProps === void 0 ? void 0 : (_blockProps$params = blockProps.params) === null || _blockProps$params === void 0 ? void 0 : _blockProps$params.filter]))
129
+ }), {
130
+ filters: filters
131
+ });
131
132
  };
132
133
 
133
134
  var handleSearchToggle = function handleSearchToggle(e) {
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { CronProps } from 'react-js-cron';
3
- import 'cronstrue/locales/zh_CN';
4
3
  declare type ComposedCron = React.FC<CronProps> & {};
5
4
  export declare const Cron: ComposedCron;
6
5
  export default Cron;