@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
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
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
|
}));
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
};
|