@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.
- package/es/acl/ACLShortcut.d.ts +2 -0
- package/es/acl/ACLShortcut.js +31 -2
- package/es/api-client/APIClient.d.ts +1 -0
- package/es/api-client/APIClient.js +6 -1
- package/es/application/Application.d.ts +3 -1
- package/es/application/Application.js +131 -39
- package/es/block-provider/BlockProvider.js +12 -1
- package/es/block-provider/CalendarBlockProvider.d.ts +1 -0
- package/es/block-provider/CalendarBlockProvider.js +6 -3
- package/es/block-provider/TableSelectorProvider.js +21 -6
- package/es/block-provider/hooks/index.d.ts +6 -0
- package/es/block-provider/hooks/index.js +485 -115
- package/es/collection-manager/CollectionManagerProvider.js +26 -45
- package/es/collection-manager/CollectionManagerShortcut.d.ts +2 -0
- package/es/collection-manager/CollectionManagerShortcut.js +38 -3
- package/es/collection-manager/Configuration/AddFieldAction.d.ts +5 -1
- package/es/collection-manager/Configuration/AddFieldAction.js +48 -13
- package/es/collection-manager/Configuration/CollectionFieldsTable.d.ts +15 -0
- package/es/collection-manager/Configuration/CollectionFieldsTable.js +73 -0
- package/es/collection-manager/Configuration/CollectionFieldsTableArray.d.ts +8 -0
- package/es/collection-manager/Configuration/CollectionFieldsTableArray.js +250 -0
- package/es/collection-manager/Configuration/ConfigurationTable.js +6 -2
- package/es/collection-manager/Configuration/EditFieldAction.d.ts +1 -0
- package/es/collection-manager/Configuration/EditFieldAction.js +24 -11
- package/es/collection-manager/Configuration/index.d.ts +3 -0
- package/es/collection-manager/Configuration/index.js +3 -0
- package/es/collection-manager/Configuration/schemas/collectionFields.js +4 -4
- package/es/collection-manager/Configuration/schemas/collections.js +1 -1
- package/es/collection-manager/index.d.ts +1 -0
- package/es/collection-manager/index.js +2 -1
- package/es/collection-manager/interfaces/index.d.ts +1 -0
- package/es/collection-manager/interfaces/index.js +1 -0
- package/es/collection-manager/interfaces/json.d.ts +2 -0
- package/es/collection-manager/interfaces/json.js +48 -0
- package/es/collection-manager/interfaces/m2o.js +3 -3
- package/es/collection-manager/interfaces/o2m.js +5 -6
- package/es/collection-manager/interfaces/o2o.js +5 -5
- package/es/collection-manager/interfaces/properties/index.d.ts +14 -0
- package/es/collection-manager/interfaces/properties/index.js +24 -1
- package/es/collection-manager/interfaces/sequence.js +13 -9
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/locale/en_US.d.ts +24 -1
- package/es/locale/en_US.js +25 -2
- package/es/locale/ja_JP.d.ts +2 -1
- package/es/locale/ja_JP.js +2 -1
- package/es/locale/ru_RU.d.ts +2 -1
- package/es/locale/ru_RU.js +2 -1
- package/es/locale/tr_TR.d.ts +1 -1
- package/es/locale/tr_TR.js +1 -1
- package/es/locale/zh_CN.d.ts +50 -1
- package/es/locale/zh_CN.js +51 -2
- package/es/plugin-manager/PluginManager.js +35 -23
- package/es/pm/PluginManagerLink.d.ts +2 -0
- package/es/pm/PluginManagerLink.js +112 -0
- package/es/pm/index.d.ts +6 -0
- package/es/pm/index.js +422 -0
- package/es/route-switch/antd/admin-layout/index.js +1 -1
- package/es/schema-component/antd/action/Action.Designer.js +35 -12
- package/es/schema-component/antd/action/Action.Modal.js +4 -2
- package/es/schema-component/antd/action/Action.js +3 -3
- package/es/schema-component/antd/action/context.d.ts +2 -0
- package/es/schema-component/antd/action/hooks.d.ts +1 -0
- package/es/schema-component/antd/calendar/Calendar.Designer.js +19 -6
- package/es/schema-component/antd/calendar/Calendar.js +137 -23
- package/es/schema-component/antd/calendar/DeleteEvent.d.ts +3 -0
- package/es/schema-component/antd/calendar/DeleteEvent.js +147 -0
- package/es/schema-component/antd/calendar/Title.js +18 -3
- package/es/schema-component/antd/calendar/components/Header.d.ts +10 -0
- package/es/schema-component/antd/calendar/components/Header.js +43 -0
- package/es/schema-component/antd/calendar/index.js +2 -0
- package/es/schema-component/antd/calendar/style.less +53 -9
- package/es/schema-component/antd/calendar/types.d.ts +6 -0
- package/es/schema-component/antd/calendar/utils.d.ts +2 -0
- package/es/schema-component/antd/calendar/utils.js +7 -0
- package/es/schema-component/antd/checkbox/Checkbox.js +13 -4
- package/es/schema-component/antd/formula-input/FormulaInput.js +28 -37
- package/es/schema-component/antd/input/Input.d.ts +1 -0
- package/es/schema-component/antd/input/Input.js +2 -0
- package/es/schema-component/antd/input/Json.d.ts +6 -0
- package/es/schema-component/antd/input/Json.js +41 -0
- package/es/schema-component/antd/input/ReadPretty.d.ts +3 -0
- package/es/schema-component/antd/input/ReadPretty.js +15 -0
- package/es/schema-component/antd/input/index.d.ts +1 -0
- package/es/schema-component/antd/input/index.js +2 -1
- package/es/schema-component/antd/markdown/Markdown.Void.js +5 -2
- package/es/schema-component/antd/radio/Radio.js +2 -1
- package/es/schema-component/antd/select/ReadPretty.js +2 -1
- package/es/schema-component/antd/select/Select.js +25 -1
- package/es/schema-component/antd/table-v2/TableSelectorDesigner.js +16 -2
- package/es/schema-component/antd/upload/Upload.js +2 -1
- package/es/schema-component/antd/upload/shared.js +5 -6
- package/es/schema-component/antd/upload/type.d.ts +2 -0
- package/es/schema-initializer/buttons/BulkEditFormItemInitializers.d.ts +1 -0
- package/es/schema-initializer/buttons/BulkEditFormItemInitializers.js +50 -0
- package/es/schema-initializer/buttons/CalendarFormActionInitializers.d.ts +143 -0
- package/es/schema-initializer/buttons/CalendarFormActionInitializers.js +146 -0
- package/es/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.d.ts +1 -0
- package/es/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.js +35 -0
- package/es/schema-initializer/buttons/FormActionInitializers.d.ts +132 -0
- package/es/schema-initializer/buttons/FormActionInitializers.js +118 -0
- package/es/schema-initializer/buttons/RecordBlockInitializers.js +2 -1
- package/es/schema-initializer/buttons/TabPaneInitializers.d.ts +1 -0
- package/es/schema-initializer/buttons/TabPaneInitializers.js +13 -0
- package/es/schema-initializer/buttons/TableActionInitializers.d.ts +56 -2
- package/es/schema-initializer/buttons/TableActionInitializers.js +45 -0
- package/es/schema-initializer/buttons/index.d.ts +3 -0
- package/es/schema-initializer/buttons/index.js +3 -0
- package/es/schema-initializer/components/BulkEditField.d.ts +7 -0
- package/es/schema-initializer/components/BulkEditField.js +187 -0
- package/es/schema-initializer/components/index.d.ts +1 -0
- package/es/schema-initializer/components/index.js +2 -1
- package/es/schema-initializer/items/BlockInitializer.js +8 -8
- package/es/schema-initializer/items/BulkEditSubmitActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/BulkEditSubmitActionInitializer.js +24 -0
- package/es/schema-initializer/items/CreateFormBulkEditBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/CreateFormBulkEditBlockInitializer.js +103 -0
- package/es/schema-initializer/items/CustomizeBulkEditActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/CustomizeBulkEditActionInitializer.js +61 -0
- package/es/schema-initializer/items/DeleteEventActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/DeleteEventActionInitializer.js +27 -0
- package/es/schema-initializer/items/RecordReadPrettyFormBlockInitializer.js +7 -7
- package/es/schema-initializer/items/index.d.ts +4 -0
- package/es/schema-initializer/items/index.js +4 -0
- package/es/schema-initializer/utils.d.ts +1 -0
- package/es/schema-initializer/utils.js +74 -15
- package/es/schema-settings/SchemaSettings.d.ts +6 -0
- package/es/schema-settings/SchemaSettings.js +4 -1
- package/es/schema-templates/BlockTemplatePage.d.ts +1 -0
- package/es/schema-templates/BlockTemplatePage.js +7 -0
- package/es/schema-templates/SchemaTemplateShortcut.js +1 -1
- package/es/system-settings/SystemSettingsShortcut.d.ts +2 -0
- package/es/system-settings/SystemSettingsShortcut.js +134 -5
- package/lib/acl/ACLShortcut.d.ts +2 -0
- package/lib/acl/ACLShortcut.js +41 -4
- package/lib/api-client/APIClient.d.ts +1 -0
- package/lib/api-client/APIClient.js +6 -1
- package/lib/application/Application.d.ts +3 -1
- package/lib/application/Application.js +139 -39
- package/lib/block-provider/BlockProvider.js +11 -0
- package/lib/block-provider/CalendarBlockProvider.d.ts +1 -0
- package/lib/block-provider/CalendarBlockProvider.js +6 -3
- package/lib/block-provider/TableSelectorProvider.js +21 -6
- package/lib/block-provider/hooks/index.d.ts +6 -0
- package/lib/block-provider/hooks/index.js +496 -115
- package/lib/collection-manager/CollectionManagerProvider.js +28 -47
- package/lib/collection-manager/CollectionManagerShortcut.d.ts +2 -0
- package/lib/collection-manager/CollectionManagerShortcut.js +47 -4
- package/lib/collection-manager/Configuration/AddFieldAction.d.ts +5 -1
- package/lib/collection-manager/Configuration/AddFieldAction.js +52 -12
- package/lib/collection-manager/Configuration/CollectionFieldsTable.d.ts +15 -0
- package/lib/collection-manager/Configuration/CollectionFieldsTable.js +92 -0
- package/lib/collection-manager/Configuration/CollectionFieldsTableArray.d.ts +8 -0
- package/lib/collection-manager/Configuration/CollectionFieldsTableArray.js +273 -0
- package/lib/collection-manager/Configuration/ConfigurationTable.js +7 -2
- package/lib/collection-manager/Configuration/EditFieldAction.d.ts +1 -0
- package/lib/collection-manager/Configuration/EditFieldAction.js +26 -10
- package/lib/collection-manager/Configuration/index.d.ts +3 -0
- package/lib/collection-manager/Configuration/index.js +39 -0
- package/lib/collection-manager/Configuration/schemas/collectionFields.js +4 -4
- package/lib/collection-manager/Configuration/schemas/collections.js +1 -1
- package/lib/collection-manager/index.d.ts +1 -0
- package/lib/collection-manager/index.js +14 -0
- package/lib/collection-manager/interfaces/index.d.ts +1 -0
- package/lib/collection-manager/interfaces/index.js +13 -0
- package/lib/collection-manager/interfaces/json.d.ts +2 -0
- package/lib/collection-manager/interfaces/json.js +58 -0
- package/lib/collection-manager/interfaces/m2o.js +2 -2
- package/lib/collection-manager/interfaces/o2m.js +4 -5
- package/lib/collection-manager/interfaces/o2o.js +4 -4
- package/lib/collection-manager/interfaces/properties/index.d.ts +14 -0
- package/lib/collection-manager/interfaces/properties/index.js +26 -2
- package/lib/collection-manager/interfaces/sequence.js +13 -9
- package/lib/index.d.ts +1 -0
- package/lib/index.js +13 -0
- package/lib/locale/en_US.d.ts +24 -1
- package/lib/locale/en_US.js +25 -2
- package/lib/locale/ja_JP.d.ts +2 -1
- package/lib/locale/ja_JP.js +2 -1
- package/lib/locale/ru_RU.d.ts +2 -1
- package/lib/locale/ru_RU.js +2 -1
- package/lib/locale/tr_TR.d.ts +1 -1
- package/lib/locale/tr_TR.js +1 -1
- package/lib/locale/zh_CN.d.ts +50 -1
- package/lib/locale/zh_CN.js +51 -2
- package/lib/plugin-manager/PluginManager.js +33 -21
- package/lib/pm/PluginManagerLink.d.ts +2 -0
- package/lib/pm/PluginManagerLink.js +139 -0
- package/lib/pm/index.d.ts +6 -0
- package/lib/pm/index.js +476 -0
- package/lib/route-switch/antd/admin-layout/index.js +1 -1
- package/lib/schema-component/antd/action/Action.Designer.js +35 -12
- package/lib/schema-component/antd/action/Action.Modal.js +4 -2
- package/lib/schema-component/antd/action/Action.js +3 -3
- package/lib/schema-component/antd/action/context.d.ts +2 -0
- package/lib/schema-component/antd/action/hooks.d.ts +1 -0
- package/lib/schema-component/antd/calendar/Calendar.Designer.js +19 -6
- package/lib/schema-component/antd/calendar/Calendar.js +139 -23
- package/lib/schema-component/antd/calendar/DeleteEvent.d.ts +3 -0
- package/lib/schema-component/antd/calendar/DeleteEvent.js +173 -0
- package/lib/schema-component/antd/calendar/Title.js +18 -2
- package/lib/schema-component/antd/calendar/components/Header.d.ts +10 -0
- package/lib/schema-component/antd/calendar/components/Header.js +57 -0
- package/lib/schema-component/antd/calendar/index.js +5 -0
- package/lib/schema-component/antd/calendar/style.less +53 -9
- package/lib/schema-component/antd/calendar/types.d.ts +6 -0
- package/lib/schema-component/antd/calendar/utils.d.ts +2 -0
- package/lib/schema-component/antd/calendar/utils.js +18 -2
- package/lib/schema-component/antd/checkbox/Checkbox.js +13 -4
- package/lib/schema-component/antd/formula-input/FormulaInput.js +28 -37
- package/lib/schema-component/antd/input/Input.d.ts +1 -0
- package/lib/schema-component/antd/input/Input.js +3 -0
- package/lib/schema-component/antd/input/Json.d.ts +6 -0
- package/lib/schema-component/antd/input/Json.js +53 -0
- package/lib/schema-component/antd/input/ReadPretty.d.ts +3 -0
- package/lib/schema-component/antd/input/ReadPretty.js +16 -0
- package/lib/schema-component/antd/input/index.d.ts +1 -0
- package/lib/schema-component/antd/input/index.js +13 -0
- package/lib/schema-component/antd/markdown/Markdown.Void.js +8 -2
- package/lib/schema-component/antd/radio/Radio.js +2 -1
- package/lib/schema-component/antd/select/ReadPretty.js +2 -1
- package/lib/schema-component/antd/select/Select.js +25 -1
- package/lib/schema-component/antd/table-v2/TableSelectorDesigner.js +17 -2
- package/lib/schema-component/antd/upload/Upload.js +2 -1
- package/lib/schema-component/antd/upload/shared.js +4 -5
- package/lib/schema-component/antd/upload/type.d.ts +2 -0
- package/lib/schema-initializer/buttons/BulkEditFormItemInitializers.d.ts +1 -0
- package/lib/schema-initializer/buttons/BulkEditFormItemInitializers.js +66 -0
- package/lib/schema-initializer/buttons/CalendarFormActionInitializers.d.ts +143 -0
- package/lib/schema-initializer/buttons/CalendarFormActionInitializers.js +153 -0
- package/lib/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.d.ts +1 -0
- package/lib/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.js +50 -0
- package/lib/schema-initializer/buttons/FormActionInitializers.d.ts +132 -0
- package/lib/schema-initializer/buttons/FormActionInitializers.js +121 -2
- package/lib/schema-initializer/buttons/RecordBlockInitializers.js +2 -1
- package/lib/schema-initializer/buttons/TabPaneInitializers.d.ts +1 -0
- package/lib/schema-initializer/buttons/TabPaneInitializers.js +18 -2
- package/lib/schema-initializer/buttons/TableActionInitializers.d.ts +56 -2
- package/lib/schema-initializer/buttons/TableActionInitializers.js +45 -0
- package/lib/schema-initializer/buttons/index.d.ts +3 -0
- package/lib/schema-initializer/buttons/index.js +39 -0
- package/lib/schema-initializer/components/BulkEditField.d.ts +7 -0
- package/lib/schema-initializer/components/BulkEditField.js +210 -0
- package/lib/schema-initializer/components/index.d.ts +1 -0
- package/lib/schema-initializer/components/index.js +13 -0
- package/lib/schema-initializer/items/BlockInitializer.js +8 -7
- package/lib/schema-initializer/items/BulkEditSubmitActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/BulkEditSubmitActionInitializer.js +37 -0
- package/lib/schema-initializer/items/CreateFormBulkEditBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/CreateFormBulkEditBlockInitializer.js +121 -0
- package/lib/schema-initializer/items/CustomizeBulkEditActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/CustomizeBulkEditActionInitializer.js +74 -0
- package/lib/schema-initializer/items/DeleteEventActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/DeleteEventActionInitializer.js +40 -0
- package/lib/schema-initializer/items/RecordReadPrettyFormBlockInitializer.js +1 -1
- package/lib/schema-initializer/items/index.d.ts +4 -0
- package/lib/schema-initializer/items/index.js +52 -0
- package/lib/schema-initializer/utils.d.ts +1 -0
- package/lib/schema-initializer/utils.js +78 -16
- package/lib/schema-settings/SchemaSettings.d.ts +6 -0
- package/lib/schema-settings/SchemaSettings.js +3 -0
- package/lib/schema-templates/BlockTemplatePage.d.ts +1 -0
- package/lib/schema-templates/BlockTemplatePage.js +12 -2
- package/lib/schema-templates/SchemaTemplateShortcut.js +1 -1
- package/lib/system-settings/SystemSettingsShortcut.d.ts +2 -0
- package/lib/system-settings/SystemSettingsShortcut.js +145 -7
- package/package.json +6 -4
|
@@ -21,7 +21,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
21
21
|
|
|
22
22
|
var _reactI18next = require("react-i18next");
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _reactRouterDom = require("react-router-dom");
|
|
25
25
|
|
|
26
26
|
var _context = require("./context");
|
|
27
27
|
|
|
@@ -118,6 +118,7 @@ PluginManager.Toolbar = function (props) {
|
|
|
118
118
|
var _useTranslation = (0, _reactI18next.useTranslation)(),
|
|
119
119
|
t = _useTranslation.t;
|
|
120
120
|
|
|
121
|
+
var history = (0, _reactRouterDom.useHistory)();
|
|
121
122
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
122
123
|
style: {
|
|
123
124
|
display: 'inline-block'
|
|
@@ -138,7 +139,7 @@ PluginManager.Toolbar = function (props) {
|
|
|
138
139
|
}), unpinned.length > 0 && /*#__PURE__*/_react.default.createElement(_antd.Menu.SubMenu, {
|
|
139
140
|
popupClassName: 'pm-sub-menu',
|
|
140
141
|
key: 'more',
|
|
141
|
-
title: /*#__PURE__*/_react.default.createElement(_icons.
|
|
142
|
+
title: /*#__PURE__*/_react.default.createElement(_icons.SettingOutlined, null)
|
|
142
143
|
}, unpinned.map(function (item, index) {
|
|
143
144
|
var Action = (0, _lodash.get)(components, item.component);
|
|
144
145
|
return Action && /*#__PURE__*/_react.default.createElement(ToolbarItemContext.Provider, {
|
|
@@ -149,9 +150,11 @@ PluginManager.Toolbar = function (props) {
|
|
|
149
150
|
key: 'divider'
|
|
150
151
|
}), /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
151
152
|
key: 'plugins',
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
onClick: function onClick() {
|
|
154
|
+
history.push('/admin/settings');
|
|
155
|
+
},
|
|
156
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.SettingOutlined, null)
|
|
157
|
+
}, t('Settings center')))));
|
|
155
158
|
};
|
|
156
159
|
|
|
157
160
|
PluginManager.Toolbar.Item = function (props) {
|
|
@@ -173,12 +176,15 @@ PluginManager.Toolbar.Item = function (props) {
|
|
|
173
176
|
|
|
174
177
|
var titleComponent = /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", null, title), subtitleComponent);
|
|
175
178
|
|
|
176
|
-
return /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
179
|
+
return title ? /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
177
180
|
title: titleComponent
|
|
178
181
|
}, /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, _objectSpread(_objectSpread({}, others), {}, {
|
|
179
182
|
className: className,
|
|
180
183
|
eventKey: item.component
|
|
181
|
-
}), icon))
|
|
184
|
+
}), icon)) : /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, _objectSpread(_objectSpread({}, others), {}, {
|
|
185
|
+
className: className,
|
|
186
|
+
eventKey: item.component
|
|
187
|
+
}), icon);
|
|
182
188
|
}
|
|
183
189
|
|
|
184
190
|
return /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, _objectSpread(_objectSpread({}, others), {}, {
|
|
@@ -189,21 +195,27 @@ PluginManager.Toolbar.Item = function (props) {
|
|
|
189
195
|
};
|
|
190
196
|
|
|
191
197
|
var RemotePluginManagerToolbar = function RemotePluginManagerToolbar() {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
}
|
|
204
|
-
|
|
198
|
+
// const api = useAPIClient();
|
|
199
|
+
// const { data, loading } = useRequest({
|
|
200
|
+
// resource: 'plugins',
|
|
201
|
+
// action: 'getPinned',
|
|
202
|
+
// });
|
|
203
|
+
// if (loading) {
|
|
204
|
+
// return <Spin />;
|
|
205
|
+
// }
|
|
206
|
+
var items = [{
|
|
207
|
+
component: 'DesignableSwitch',
|
|
208
|
+
pin: true
|
|
209
|
+
}, {
|
|
210
|
+
component: 'PluginManagerLink',
|
|
211
|
+
pin: true
|
|
212
|
+
}, {
|
|
213
|
+
component: 'SettingsCenterDropdown',
|
|
214
|
+
pin: true
|
|
215
|
+
} // ...data?.data,
|
|
216
|
+
];
|
|
205
217
|
return /*#__PURE__*/_react.default.createElement(PluginManager.Toolbar, {
|
|
206
|
-
items:
|
|
218
|
+
items: items
|
|
207
219
|
});
|
|
208
220
|
};
|
|
209
221
|
|
|
@@ -0,0 +1,139 @@
|
|
|
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
|
+
exports.SettingsCenterDropdown = exports.PluginManagerLink = void 0;
|
|
9
|
+
|
|
10
|
+
var _icons = require("@ant-design/icons");
|
|
11
|
+
|
|
12
|
+
var _shared = require("@formily/shared");
|
|
13
|
+
|
|
14
|
+
var _antd = require("antd");
|
|
15
|
+
|
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
+
|
|
18
|
+
var _reactI18next = require("react-i18next");
|
|
19
|
+
|
|
20
|
+
var _reactRouterDom = require("react-router-dom");
|
|
21
|
+
|
|
22
|
+
var _pluginManager = require("../plugin-manager");
|
|
23
|
+
|
|
24
|
+
var _schemaComponent = require("../schema-component");
|
|
25
|
+
|
|
26
|
+
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); }
|
|
27
|
+
|
|
28
|
+
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; }
|
|
29
|
+
|
|
30
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
|
+
|
|
32
|
+
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."); }
|
|
33
|
+
|
|
34
|
+
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); }
|
|
35
|
+
|
|
36
|
+
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; }
|
|
37
|
+
|
|
38
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
39
|
+
|
|
40
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
43
|
+
|
|
44
|
+
var schema = {
|
|
45
|
+
type: 'object',
|
|
46
|
+
properties: _defineProperty({}, (0, _shared.uid)(), {
|
|
47
|
+
'x-component': 'Action.Drawer',
|
|
48
|
+
type: 'void',
|
|
49
|
+
title: '{{t("Collections & Fields")}}',
|
|
50
|
+
properties: {
|
|
51
|
+
configuration: {
|
|
52
|
+
'x-component': 'ConfigurationTable'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
var PluginManagerLink = function PluginManagerLink() {
|
|
59
|
+
var _useState = (0, _react.useState)(false),
|
|
60
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
61
|
+
visible = _useState2[0],
|
|
62
|
+
setVisible = _useState2[1];
|
|
63
|
+
|
|
64
|
+
var _useTranslation = (0, _reactI18next.useTranslation)(),
|
|
65
|
+
t = _useTranslation.t;
|
|
66
|
+
|
|
67
|
+
var history = (0, _reactRouterDom.useHistory)();
|
|
68
|
+
return /*#__PURE__*/_react.default.createElement(_schemaComponent.ActionContext.Provider, {
|
|
69
|
+
value: {
|
|
70
|
+
visible: visible,
|
|
71
|
+
setVisible: setVisible
|
|
72
|
+
}
|
|
73
|
+
}, /*#__PURE__*/_react.default.createElement(_pluginManager.PluginManager.Toolbar.Item, {
|
|
74
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.AppstoreAddOutlined, null),
|
|
75
|
+
title: t('Plugin manager'),
|
|
76
|
+
onClick: function onClick() {
|
|
77
|
+
history.push('/admin/pm/list');
|
|
78
|
+
}
|
|
79
|
+
}));
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
exports.PluginManagerLink = PluginManagerLink;
|
|
83
|
+
|
|
84
|
+
var SettingsCenterDropdown = function SettingsCenterDropdown() {
|
|
85
|
+
var _useState3 = (0, _react.useState)(false),
|
|
86
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
87
|
+
visible = _useState4[0],
|
|
88
|
+
setVisible = _useState4[1];
|
|
89
|
+
|
|
90
|
+
var _useTranslation2 = (0, _reactI18next.useTranslation)(),
|
|
91
|
+
t = _useTranslation2.t;
|
|
92
|
+
|
|
93
|
+
var history = (0, _reactRouterDom.useHistory)();
|
|
94
|
+
var items = [{
|
|
95
|
+
title: t('Collections & Fields'),
|
|
96
|
+
path: 'collection-manager/collections'
|
|
97
|
+
}, {
|
|
98
|
+
title: t('Roles & Permissions'),
|
|
99
|
+
path: 'acl/roles'
|
|
100
|
+
}, {
|
|
101
|
+
title: t('File storages'),
|
|
102
|
+
path: 'file-manager/storages'
|
|
103
|
+
}, {
|
|
104
|
+
title: t('System settings'),
|
|
105
|
+
path: 'system-settings/system-settings'
|
|
106
|
+
}, {
|
|
107
|
+
title: t('Workflow'),
|
|
108
|
+
path: 'workflow/workflows'
|
|
109
|
+
} // {
|
|
110
|
+
// title: t('Graph Collections'),
|
|
111
|
+
// path: 'graph/collections',
|
|
112
|
+
// },
|
|
113
|
+
];
|
|
114
|
+
return /*#__PURE__*/_react.default.createElement(_schemaComponent.ActionContext.Provider, {
|
|
115
|
+
value: {
|
|
116
|
+
visible: visible,
|
|
117
|
+
setVisible: setVisible
|
|
118
|
+
}
|
|
119
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Dropdown, {
|
|
120
|
+
overlay: /*#__PURE__*/_react.default.createElement(_antd.Menu, null, /*#__PURE__*/_react.default.createElement(_antd.Menu.ItemGroup, {
|
|
121
|
+
title: t('Bookmark')
|
|
122
|
+
}, items.map(function (item) {
|
|
123
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
124
|
+
onClick: function onClick() {
|
|
125
|
+
history.push('/admin/settings/' + item.path);
|
|
126
|
+
},
|
|
127
|
+
key: item.path
|
|
128
|
+
}, item.title);
|
|
129
|
+
})), /*#__PURE__*/_react.default.createElement(_antd.Menu.Divider, null), /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
130
|
+
onClick: function onClick() {
|
|
131
|
+
history.push('/admin/settings');
|
|
132
|
+
}
|
|
133
|
+
}, t('Settings center')))
|
|
134
|
+
}, /*#__PURE__*/_react.default.createElement(_pluginManager.PluginManager.Toolbar.Item, {
|
|
135
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.SettingOutlined, null)
|
|
136
|
+
})));
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
exports.SettingsCenterDropdown = SettingsCenterDropdown;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const SettingsCenterContext: React.Context<any>;
|
|
3
|
+
export declare const SettingsCenterProvider: (props: any) => JSX.Element;
|
|
4
|
+
export declare const PMProvider: (props: any) => JSX.Element;
|
|
5
|
+
export default PMProvider;
|
|
6
|
+
export * from './PluginManagerLink';
|