@nocobase/client 0.10.0-alpha.2 → 0.10.0-alpha.4
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/Configuration/MenuItemsProvider.js +3 -3
- package/es/application/Application.js +2 -2
- package/es/auth/SigninPage.js +12 -9
- package/es/block-provider/GanttBlockProvider.js +5 -4
- package/es/block-provider/TableBlockProvider.d.ts +1 -0
- package/es/block-provider/TableBlockProvider.js +51 -17
- package/es/collection-manager/Configuration/AddCollectionAction.js +31 -25
- package/es/collection-manager/Configuration/AddFieldAction.js +45 -32
- package/es/collection-manager/Configuration/AddSubFieldAction.js +24 -19
- package/es/collection-manager/Configuration/ConfigurationTabs.js +57 -50
- package/es/collection-manager/hooks/useOptions.js +39 -36
- package/es/collection-manager/interfaces/integer.js +1 -1
- package/es/collection-manager/interfaces/number.js +3 -3
- package/es/collection-manager/interfaces/percent.js +3 -3
- package/es/formula/Expression.js +66 -46
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.js +1 -0
- package/es/hooks/useAdminSchemaUid.d.ts +1 -0
- package/es/hooks/useAdminSchemaUid.js +6 -0
- package/es/hooks/useMenuItem.d.ts +37 -0
- package/es/hooks/useMenuItem.js +93 -0
- package/es/index.d.ts +2 -3
- package/es/index.js +3 -4
- package/es/locale/en_US.d.ts +3 -1
- package/es/locale/en_US.js +4 -2
- package/es/locale/es_ES.d.ts +1 -1
- package/es/locale/es_ES.js +1 -1
- package/es/locale/ja_JP.d.ts +3 -1
- package/es/locale/ja_JP.js +4 -2
- package/es/locale/pt_BR.d.ts +1 -1
- package/es/locale/pt_BR.js +1 -1
- package/es/locale/ru_RU.d.ts +1 -1
- package/es/locale/ru_RU.js +1 -1
- package/es/locale/zh_CN.d.ts +3 -1
- package/es/locale/zh_CN.js +3 -1
- package/es/pm/Card.js +5 -5
- package/es/pm/PluginManagerLink.js +16 -12
- package/es/pm/index.d.ts +2 -1
- package/es/pm/index.js +36 -22
- package/es/route-switch/antd/admin-layout/index.js +5 -5
- package/es/schema-component/antd/action/Action.Designer.js +3 -5
- package/es/schema-component/antd/action/Action.Drawer.js +1 -1
- package/es/schema-component/antd/action/ActionBar.js +1 -1
- package/es/schema-component/antd/association-field/Editable.js +1 -2
- package/es/schema-component/antd/association-field/Nester.js +7 -1
- package/es/schema-component/antd/association-field/SubTable.js +1 -1
- package/es/schema-component/antd/calendar/DeleteEvent.js +1 -1
- package/es/schema-component/antd/cascader/Cascader.js +1 -1
- package/es/schema-component/antd/form-item/FormItem.js +10 -3
- package/es/schema-component/antd/form-v2/Form.js +2 -2
- package/es/schema-component/antd/gantt/components/gantt/gantt.js +0 -1
- package/es/schema-component/antd/gantt/components/grid/grid-body.js +3 -3
- package/es/schema-component/antd/gantt/components/task-item/bar/bar-small.js +1 -1
- package/es/schema-component/antd/gantt/components/task-item/task-item.js +1 -1
- package/es/schema-component/antd/gantt/helpers/bar-helper.d.ts +1 -1
- package/es/schema-component/antd/gantt/helpers/bar-helper.js +4 -4
- package/es/schema-component/antd/gantt/helpers/other-helper.js +3 -1
- package/es/schema-component/antd/grid/Grid.js +2 -2
- package/es/schema-component/antd/grid-card/GridCard.Designer.js +3 -4
- package/es/schema-component/antd/grid-card/GridCard.Item.js +3 -3
- package/es/schema-component/antd/index.less +1 -3
- package/es/schema-component/antd/list/List.Decorator.js +3 -3
- package/es/schema-component/antd/list/List.Item.js +2 -2
- package/es/schema-component/antd/list/List.d.ts +2 -2
- package/es/schema-component/antd/list/List.js +6 -6
- package/es/schema-component/antd/menu/Menu.js +306 -156
- package/es/schema-component/antd/page/Page.js +29 -23
- package/es/schema-component/antd/remote-select/RemoteSelect.js +60 -10
- package/es/schema-component/antd/remote-select/utils.d.ts +4 -0
- package/es/schema-component/antd/remote-select/utils.js +31 -0
- package/es/schema-component/antd/table-v2/FilterDynamicComponent.js +17 -2
- package/es/schema-component/antd/table-v2/Table.Column.Designer.js +51 -12
- package/es/schema-component/antd/table-v2/Table.js +28 -47
- package/es/schema-component/antd/table-v2/utils.d.ts +0 -1
- package/es/schema-component/antd/table-v2/utils.js +0 -28
- package/es/schema-component/antd/tabs/Tabs.js +35 -22
- package/es/schema-component/antd/tabs/context.d.ts +1 -1
- package/es/schema-component/antd/upload/ReadPretty.js +7 -3
- package/es/schema-component/antd/variable/VariableSelect.js +1 -1
- package/es/schema-component/common/utils/uitls.d.ts +1 -0
- package/es/schema-component/common/utils/uitls.js +1 -1
- package/es/schema-initializer/SchemaInitializer.d.ts +7 -2
- package/es/schema-initializer/SchemaInitializer.js +158 -103
- package/es/schema-initializer/SelectCollection.d.ts +1 -2
- package/es/schema-initializer/SelectCollection.js +19 -16
- package/es/schema-initializer/buttons/TableActionColumnInitializers.js +1 -1
- package/es/schema-initializer/buttons/TableActionInitializers.js +5 -5
- package/es/schema-initializer/buttons/TableColumnInitializers.js +3 -2
- package/es/schema-initializer/components/CreateRecordAction.js +37 -27
- package/es/schema-initializer/components/assigned-field/AssignedField.js +2 -1
- package/es/schema-initializer/items/CalendarBlockInitializer.js +2 -2
- package/es/schema-initializer/utils.d.ts +0 -1
- package/es/schema-initializer/utils.js +40 -25
- package/es/schema-settings/SchemaSettings.js +110 -29
- package/es/schema-settings/VariableInput/hooks/useFormVariable.d.ts +19 -0
- package/es/schema-settings/VariableInput/hooks/useFormVariable.js +89 -0
- package/es/schema-settings/VariableInput/hooks/useIterationVariable.d.ts +8 -0
- package/es/schema-settings/VariableInput/hooks/useIterationVariable.js +77 -0
- package/es/schema-settings/VariableInput/hooks/useVariableOptions.d.ts +5 -12
- package/es/schema-settings/VariableInput/hooks/useVariableOptions.js +19 -3
- package/es/schema-templates/BlockTemplateDetails.js +5 -1
- package/es/schema-templates/BlockTemplatePage.js +4 -1
- package/es/user/ChangePassword.d.ts +1 -2
- package/es/user/ChangePassword.js +30 -26
- package/es/user/CurrentUser.js +172 -141
- package/es/user/EditProfile.d.ts +1 -2
- package/es/user/EditProfile.js +30 -24
- package/es/user/LanguageSettings.d.ts +1 -2
- package/es/user/LanguageSettings.js +67 -64
- package/es/user/SigninPage.js +25 -22
- package/es/user/SwitchRole.d.ts +1 -2
- package/es/user/SwitchRole.js +54 -49
- package/es/user/ThemeSettings.d.ts +1 -2
- package/es/user/ThemeSettings.js +56 -52
- package/lib/acl/Configuration/MenuItemsProvider.js +3 -3
- package/lib/application/Application.js +2 -2
- package/lib/auth/SigninPage.js +25 -22
- package/lib/block-provider/GanttBlockProvider.js +5 -4
- package/lib/block-provider/TableBlockProvider.d.ts +1 -0
- package/lib/block-provider/TableBlockProvider.js +53 -17
- package/lib/collection-manager/Configuration/AddCollectionAction.js +29 -23
- package/lib/collection-manager/Configuration/AddFieldAction.js +43 -30
- package/lib/collection-manager/Configuration/AddSubFieldAction.js +22 -17
- package/lib/collection-manager/Configuration/ConfigurationTabs.js +57 -49
- package/lib/collection-manager/hooks/useOptions.js +39 -36
- package/lib/collection-manager/interfaces/integer.js +1 -1
- package/lib/collection-manager/interfaces/number.js +3 -3
- package/lib/collection-manager/interfaces/percent.js +3 -3
- package/lib/formula/Expression.js +64 -44
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +11 -0
- package/lib/hooks/useAdminSchemaUid.d.ts +1 -0
- package/lib/hooks/useAdminSchemaUid.js +13 -0
- package/lib/hooks/useMenuItem.d.ts +37 -0
- package/lib/hooks/useMenuItem.js +108 -0
- package/lib/index.d.ts +2 -3
- package/lib/index.js +22 -33
- package/lib/locale/en_US.d.ts +3 -1
- package/lib/locale/en_US.js +4 -2
- package/lib/locale/es_ES.d.ts +1 -1
- package/lib/locale/es_ES.js +1 -1
- package/lib/locale/ja_JP.d.ts +3 -1
- package/lib/locale/ja_JP.js +4 -2
- package/lib/locale/pt_BR.d.ts +1 -1
- package/lib/locale/pt_BR.js +1 -1
- package/lib/locale/ru_RU.d.ts +1 -1
- package/lib/locale/ru_RU.js +1 -1
- package/lib/locale/zh_CN.d.ts +3 -1
- package/lib/locale/zh_CN.js +3 -1
- package/lib/pm/Card.js +6 -6
- package/lib/pm/PluginManagerLink.js +15 -10
- package/lib/pm/index.d.ts +2 -1
- package/lib/pm/index.js +37 -23
- package/lib/route-switch/antd/admin-layout/index.js +4 -4
- package/lib/schema-component/antd/action/Action.Designer.js +2 -4
- package/lib/schema-component/antd/action/Action.Drawer.js +1 -1
- package/lib/schema-component/antd/association-field/Editable.js +0 -1
- package/lib/schema-component/antd/association-field/Nester.js +6 -0
- package/lib/schema-component/antd/association-field/SubTable.js +1 -1
- package/lib/schema-component/antd/calendar/DeleteEvent.js +1 -1
- package/lib/schema-component/antd/cascader/Cascader.js +1 -1
- package/lib/schema-component/antd/form-item/FormItem.js +10 -3
- package/lib/schema-component/antd/form-v2/Form.js +2 -2
- package/lib/schema-component/antd/gantt/components/gantt/gantt.js +0 -1
- package/lib/schema-component/antd/gantt/components/grid/grid-body.js +2 -2
- package/lib/schema-component/antd/gantt/components/task-item/bar/bar-small.js +1 -1
- package/lib/schema-component/antd/gantt/components/task-item/task-item.js +1 -1
- package/lib/schema-component/antd/gantt/helpers/bar-helper.d.ts +1 -1
- package/lib/schema-component/antd/gantt/helpers/bar-helper.js +4 -4
- package/lib/schema-component/antd/gantt/helpers/other-helper.js +3 -1
- package/lib/schema-component/antd/grid/Grid.js +1 -1
- package/lib/schema-component/antd/grid-card/GridCard.Designer.js +4 -5
- package/lib/schema-component/antd/grid-card/GridCard.Item.js +8 -8
- package/lib/schema-component/antd/index.less +1 -3
- package/lib/schema-component/antd/list/List.Decorator.js +3 -3
- package/lib/schema-component/antd/list/List.Item.js +6 -6
- package/lib/schema-component/antd/list/List.d.ts +2 -2
- package/lib/schema-component/antd/list/List.js +24 -24
- package/lib/schema-component/antd/menu/Menu.js +304 -154
- package/lib/schema-component/antd/page/Page.js +29 -23
- package/lib/schema-component/antd/remote-select/RemoteSelect.js +57 -7
- package/lib/schema-component/antd/remote-select/utils.d.ts +4 -0
- package/lib/schema-component/antd/remote-select/utils.js +41 -0
- package/lib/schema-component/antd/table-v2/FilterDynamicComponent.js +17 -2
- package/lib/schema-component/antd/table-v2/Table.Column.Designer.js +50 -11
- package/lib/schema-component/antd/table-v2/Table.js +26 -45
- package/lib/schema-component/antd/table-v2/utils.d.ts +0 -1
- package/lib/schema-component/antd/table-v2/utils.js +0 -29
- package/lib/schema-component/antd/tabs/Tabs.js +34 -21
- package/lib/schema-component/antd/tabs/context.d.ts +1 -1
- package/lib/schema-component/antd/upload/ReadPretty.js +7 -3
- package/lib/schema-component/antd/variable/VariableSelect.js +1 -1
- package/lib/schema-component/common/utils/uitls.d.ts +1 -0
- package/lib/schema-component/common/utils/uitls.js +3 -1
- package/lib/schema-initializer/SchemaInitializer.d.ts +7 -2
- package/lib/schema-initializer/SchemaInitializer.js +155 -101
- package/lib/schema-initializer/SelectCollection.d.ts +1 -2
- package/lib/schema-initializer/SelectCollection.js +22 -17
- package/lib/schema-initializer/buttons/TableActionColumnInitializers.js +1 -1
- package/lib/schema-initializer/buttons/TableActionInitializers.js +5 -5
- package/lib/schema-initializer/buttons/TableColumnInitializers.js +2 -1
- package/lib/schema-initializer/components/CreateRecordAction.js +35 -25
- package/lib/schema-initializer/components/assigned-field/AssignedField.js +2 -1
- package/lib/schema-initializer/items/CalendarBlockInitializer.js +9 -9
- package/lib/schema-initializer/utils.d.ts +0 -1
- package/lib/schema-initializer/utils.js +41 -25
- package/lib/schema-settings/SchemaSettings.js +106 -27
- package/lib/schema-settings/VariableInput/hooks/useFormVariable.d.ts +19 -0
- package/lib/schema-settings/VariableInput/hooks/useFormVariable.js +96 -0
- package/lib/schema-settings/VariableInput/hooks/useIterationVariable.d.ts +8 -0
- package/lib/schema-settings/VariableInput/hooks/useIterationVariable.js +84 -0
- package/lib/schema-settings/VariableInput/hooks/useVariableOptions.d.ts +5 -12
- package/lib/schema-settings/VariableInput/hooks/useVariableOptions.js +19 -3
- package/lib/schema-templates/BlockTemplateDetails.js +5 -1
- package/lib/schema-templates/BlockTemplatePage.js +5 -2
- package/lib/user/ChangePassword.d.ts +1 -2
- package/lib/user/ChangePassword.js +30 -26
- package/lib/user/CurrentUser.js +166 -135
- package/lib/user/EditProfile.d.ts +1 -2
- package/lib/user/EditProfile.js +31 -25
- package/lib/user/LanguageSettings.d.ts +1 -2
- package/lib/user/LanguageSettings.js +66 -63
- package/lib/user/SigninPage.js +25 -22
- package/lib/user/SwitchRole.d.ts +1 -2
- package/lib/user/SwitchRole.js +57 -51
- package/lib/user/ThemeSettings.d.ts +1 -2
- package/lib/user/ThemeSettings.js +59 -54
- package/package.json +9 -8
- package/es/settings-form/SettingsForm.d.ts +0 -13
- package/es/settings-form/SettingsForm.js +0 -309
- package/es/settings-form/index.d.ts +0 -1
- package/es/settings-form/index.js +0 -1
- package/lib/settings-form/SettingsForm.d.ts +0 -13
- package/lib/settings-form/SettingsForm.js +0 -320
- package/lib/settings-form/index.d.ts +0 -1
- package/lib/settings-form/index.js +0 -16
package/lib/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * from './collection-manager';
|
|
|
13
13
|
export * from './document-title';
|
|
14
14
|
export * from './filter-provider';
|
|
15
15
|
export * from './formula';
|
|
16
|
+
export * from './hooks';
|
|
16
17
|
export * from './i18n';
|
|
17
18
|
export * from './icon';
|
|
18
19
|
export * from './plugin-manager';
|
|
@@ -22,10 +23,8 @@ export * from './record-provider';
|
|
|
22
23
|
export * from './route-switch';
|
|
23
24
|
export * from './schema-component';
|
|
24
25
|
export * from './schema-initializer';
|
|
26
|
+
export * from './schema-items';
|
|
25
27
|
export * from './schema-settings';
|
|
26
28
|
export * from './schema-templates';
|
|
27
|
-
export * from './schema-items';
|
|
28
|
-
export * from './settings-form';
|
|
29
29
|
export * from './system-settings';
|
|
30
30
|
export * from './user';
|
|
31
|
-
export * from './hooks';
|
package/lib/index.js
CHANGED
|
@@ -158,6 +158,17 @@ Object.keys(_formula).forEach(function (key) {
|
|
|
158
158
|
}
|
|
159
159
|
});
|
|
160
160
|
});
|
|
161
|
+
var _hooks = require("./hooks");
|
|
162
|
+
Object.keys(_hooks).forEach(function (key) {
|
|
163
|
+
if (key === "default" || key === "__esModule") return;
|
|
164
|
+
if (key in exports && exports[key] === _hooks[key]) return;
|
|
165
|
+
Object.defineProperty(exports, key, {
|
|
166
|
+
enumerable: true,
|
|
167
|
+
get: function get() {
|
|
168
|
+
return _hooks[key];
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
});
|
|
161
172
|
var _i18n = require("./i18n");
|
|
162
173
|
Object.keys(_i18n).forEach(function (key) {
|
|
163
174
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -257,6 +268,17 @@ Object.keys(_schemaInitializer).forEach(function (key) {
|
|
|
257
268
|
}
|
|
258
269
|
});
|
|
259
270
|
});
|
|
271
|
+
var _schemaItems = require("./schema-items");
|
|
272
|
+
Object.keys(_schemaItems).forEach(function (key) {
|
|
273
|
+
if (key === "default" || key === "__esModule") return;
|
|
274
|
+
if (key in exports && exports[key] === _schemaItems[key]) return;
|
|
275
|
+
Object.defineProperty(exports, key, {
|
|
276
|
+
enumerable: true,
|
|
277
|
+
get: function get() {
|
|
278
|
+
return _schemaItems[key];
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
});
|
|
260
282
|
var _schemaSettings = require("./schema-settings");
|
|
261
283
|
Object.keys(_schemaSettings).forEach(function (key) {
|
|
262
284
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -279,28 +301,6 @@ Object.keys(_schemaTemplates).forEach(function (key) {
|
|
|
279
301
|
}
|
|
280
302
|
});
|
|
281
303
|
});
|
|
282
|
-
var _schemaItems = require("./schema-items");
|
|
283
|
-
Object.keys(_schemaItems).forEach(function (key) {
|
|
284
|
-
if (key === "default" || key === "__esModule") return;
|
|
285
|
-
if (key in exports && exports[key] === _schemaItems[key]) return;
|
|
286
|
-
Object.defineProperty(exports, key, {
|
|
287
|
-
enumerable: true,
|
|
288
|
-
get: function get() {
|
|
289
|
-
return _schemaItems[key];
|
|
290
|
-
}
|
|
291
|
-
});
|
|
292
|
-
});
|
|
293
|
-
var _settingsForm = require("./settings-form");
|
|
294
|
-
Object.keys(_settingsForm).forEach(function (key) {
|
|
295
|
-
if (key === "default" || key === "__esModule") return;
|
|
296
|
-
if (key in exports && exports[key] === _settingsForm[key]) return;
|
|
297
|
-
Object.defineProperty(exports, key, {
|
|
298
|
-
enumerable: true,
|
|
299
|
-
get: function get() {
|
|
300
|
-
return _settingsForm[key];
|
|
301
|
-
}
|
|
302
|
-
});
|
|
303
|
-
});
|
|
304
304
|
var _systemSettings = require("./system-settings");
|
|
305
305
|
Object.keys(_systemSettings).forEach(function (key) {
|
|
306
306
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -322,15 +322,4 @@ Object.keys(_user).forEach(function (key) {
|
|
|
322
322
|
return _user[key];
|
|
323
323
|
}
|
|
324
324
|
});
|
|
325
|
-
});
|
|
326
|
-
var _hooks = require("./hooks");
|
|
327
|
-
Object.keys(_hooks).forEach(function (key) {
|
|
328
|
-
if (key === "default" || key === "__esModule") return;
|
|
329
|
-
if (key in exports && exports[key] === _hooks[key]) return;
|
|
330
|
-
Object.defineProperty(exports, key, {
|
|
331
|
-
enumerable: true,
|
|
332
|
-
get: function get() {
|
|
333
|
-
return _hooks[key];
|
|
334
|
-
}
|
|
335
|
-
});
|
|
336
325
|
});
|
package/lib/locale/en_US.d.ts
CHANGED
|
@@ -294,7 +294,7 @@ declare const _default: {
|
|
|
294
294
|
"Quick upload": string;
|
|
295
295
|
"Select file": string;
|
|
296
296
|
Subtable: string;
|
|
297
|
-
|
|
297
|
+
"Sub-form": string;
|
|
298
298
|
"Field mode": string;
|
|
299
299
|
"Allow add new data": string;
|
|
300
300
|
"Record picker": string;
|
|
@@ -704,5 +704,7 @@ declare const _default: {
|
|
|
704
704
|
"Update or create": string;
|
|
705
705
|
"Find by the following fields": string;
|
|
706
706
|
Create: string;
|
|
707
|
+
"Current form": string;
|
|
708
|
+
"Current object": string;
|
|
707
709
|
};
|
|
708
710
|
export default _default;
|
package/lib/locale/en_US.js
CHANGED
|
@@ -300,7 +300,7 @@ var _default = {
|
|
|
300
300
|
"Quick upload": "Quick upload",
|
|
301
301
|
"Select file": "Select file",
|
|
302
302
|
"Subtable": "Sub-table",
|
|
303
|
-
"
|
|
303
|
+
"Sub-form": "Sub-form",
|
|
304
304
|
"Field mode": "Field mode",
|
|
305
305
|
"Allow add new data": "Allow add new data",
|
|
306
306
|
"Record picker": "Record picker",
|
|
@@ -709,6 +709,8 @@ var _default = {
|
|
|
709
709
|
"First or create": "First or create",
|
|
710
710
|
"Update or create": "Update or create",
|
|
711
711
|
"Find by the following fields": "Find by the following fields",
|
|
712
|
-
"Create": "Create"
|
|
712
|
+
"Create": "Create",
|
|
713
|
+
"Current form": "Current form",
|
|
714
|
+
"Current object": "Current object"
|
|
713
715
|
};
|
|
714
716
|
exports.default = _default;
|
package/lib/locale/es_ES.d.ts
CHANGED
|
@@ -280,7 +280,7 @@ declare const _default: {
|
|
|
280
280
|
"Display field title": string;
|
|
281
281
|
"Field component": string;
|
|
282
282
|
Subtable: string;
|
|
283
|
-
|
|
283
|
+
"Sub-form": string;
|
|
284
284
|
"Record picker": string;
|
|
285
285
|
"Toggles the subfield mode": string;
|
|
286
286
|
"Selector mode": string;
|
package/lib/locale/es_ES.js
CHANGED
|
@@ -286,7 +286,7 @@ var _default = {
|
|
|
286
286
|
"Display field title": "Mostrar título de campo",
|
|
287
287
|
"Field component": "Componente del campo",
|
|
288
288
|
"Subtable": "Subtabla",
|
|
289
|
-
"
|
|
289
|
+
"Sub-form": "Subformulario",
|
|
290
290
|
"Record picker": "Selector de registros",
|
|
291
291
|
"Toggles the subfield mode": "Alterna el modo de subcampo",
|
|
292
292
|
"Selector mode": "Modo selector",
|
package/lib/locale/ja_JP.d.ts
CHANGED
|
@@ -540,7 +540,7 @@ declare const _default: {
|
|
|
540
540
|
"Quick upload": string;
|
|
541
541
|
"Select file": string;
|
|
542
542
|
Subtable: string;
|
|
543
|
-
|
|
543
|
+
"Sub-form": string;
|
|
544
544
|
"Sub-details": string;
|
|
545
545
|
"Field mode": string;
|
|
546
546
|
"Allow add new data": string;
|
|
@@ -612,5 +612,7 @@ declare const _default: {
|
|
|
612
612
|
"Update or create": string;
|
|
613
613
|
"Find by the following fields": string;
|
|
614
614
|
Create: string;
|
|
615
|
+
"Current form": string;
|
|
616
|
+
"Current object": string;
|
|
615
617
|
};
|
|
616
618
|
export default _default;
|
package/lib/locale/ja_JP.js
CHANGED
|
@@ -546,7 +546,7 @@ var _default = {
|
|
|
546
546
|
"Quick upload": "クイックアップロード",
|
|
547
547
|
"Select file": "ファイルを選択",
|
|
548
548
|
"Subtable": "サブテーブル",
|
|
549
|
-
"
|
|
549
|
+
"Sub-form": "サブフォーム",
|
|
550
550
|
"Sub-details": "サブリスト",
|
|
551
551
|
"Field mode": "フィールドコンポーネント",
|
|
552
552
|
"Allow add new data": "データの追加を許可",
|
|
@@ -618,6 +618,8 @@ var _default = {
|
|
|
618
618
|
"First or create": "存在しない場合に追加",
|
|
619
619
|
"Update or create": "存在しなければ新規、存在すれば更新",
|
|
620
620
|
"Find by the following fields": "次のフィールドで検索",
|
|
621
|
-
"Create": "新規のみ"
|
|
621
|
+
"Create": "新規のみ",
|
|
622
|
+
"Current form": "現在のフォーム",
|
|
623
|
+
"Current object": "現在のオブジェクト"
|
|
622
624
|
};
|
|
623
625
|
exports.default = _default;
|
package/lib/locale/pt_BR.d.ts
CHANGED
package/lib/locale/pt_BR.js
CHANGED
|
@@ -250,7 +250,7 @@ var _default = {
|
|
|
250
250
|
"Select file": "Selecionar arquivo",
|
|
251
251
|
"Allow multiple": "Permitir múltiplos",
|
|
252
252
|
"Subtable": "Subtabela",
|
|
253
|
-
"
|
|
253
|
+
"Sub-form": "Subformulário",
|
|
254
254
|
"Record picker": "Selecionador de registros",
|
|
255
255
|
"Toggles the subfield mode": "Alterna o modo de subcampo",
|
|
256
256
|
"Selector mode": "Modo de seleção",
|
package/lib/locale/ru_RU.d.ts
CHANGED
package/lib/locale/ru_RU.js
CHANGED
|
@@ -484,7 +484,7 @@ var _default = {
|
|
|
484
484
|
"Quick upload": "Быстрая загрузка",
|
|
485
485
|
"Select file": "Выбрать файл",
|
|
486
486
|
"Subtable": "Подтаблица",
|
|
487
|
-
"
|
|
487
|
+
"Sub-form": "Подформа",
|
|
488
488
|
"Regular expression": "Образец",
|
|
489
489
|
"Enabled languages": "Включенные языки",
|
|
490
490
|
"View all plugins": "Посмотреть все плагины",
|
package/lib/locale/zh_CN.d.ts
CHANGED
|
@@ -313,7 +313,7 @@ declare const _default: {
|
|
|
313
313
|
"Quick upload": string;
|
|
314
314
|
"Select file": string;
|
|
315
315
|
Subtable: string;
|
|
316
|
-
|
|
316
|
+
"Sub-form": string;
|
|
317
317
|
"Sub-details": string;
|
|
318
318
|
"Record picker": string;
|
|
319
319
|
"Toggles the subfield mode": string;
|
|
@@ -748,6 +748,8 @@ declare const _default: {
|
|
|
748
748
|
"Update or create": string;
|
|
749
749
|
"Find by the following fields": string;
|
|
750
750
|
Create: string;
|
|
751
|
+
"Current form": string;
|
|
752
|
+
"Current object": string;
|
|
751
753
|
"Quick create": string;
|
|
752
754
|
Dropdown: string;
|
|
753
755
|
"Pop-up": string;
|
package/lib/locale/zh_CN.js
CHANGED
|
@@ -319,7 +319,7 @@ var _default = {
|
|
|
319
319
|
"Quick upload": "快速上传",
|
|
320
320
|
"Select file": "选择文件",
|
|
321
321
|
"Subtable": "子表格",
|
|
322
|
-
"
|
|
322
|
+
"Sub-form": "子表单",
|
|
323
323
|
"Sub-details": "子详情",
|
|
324
324
|
"Record picker": "数据选择器",
|
|
325
325
|
"Toggles the subfield mode": "切换子字段模式",
|
|
@@ -755,6 +755,8 @@ var _default = {
|
|
|
755
755
|
"Update or create": "不存在时新增,存在时更新",
|
|
756
756
|
"Find by the following fields": "通过以下字段查找",
|
|
757
757
|
"Create": "仅新增",
|
|
758
|
+
"Current form": "当前表单",
|
|
759
|
+
"Current object": "当前对象",
|
|
758
760
|
"Quick create": "快速创建",
|
|
759
761
|
"Dropdown": "下拉菜单",
|
|
760
762
|
"Pop-up": "弹窗",
|
package/lib/pm/Card.js
CHANGED
|
@@ -5,19 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.PluginCard = exports.BuiltInPluginCard = void 0;
|
|
8
|
-
var
|
|
9
|
-
var _apiClient = require("../api-client");
|
|
10
|
-
var _antd = require("antd");
|
|
8
|
+
var _icons = require("@ant-design/icons");
|
|
11
9
|
var _css = require("@emotion/css");
|
|
10
|
+
var _antd = require("antd");
|
|
12
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
var
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
14
13
|
var _reactI18next = require("react-i18next");
|
|
15
|
-
var
|
|
14
|
+
var _reactRouterDom = require("react-router-dom");
|
|
15
|
+
var _apiClient = require("../api-client");
|
|
16
16
|
var _util = require("../schema-component/antd/markdown/util");
|
|
17
17
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
18
|
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); }
|
|
20
19
|
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; }
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
22
22
|
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); } }
|
|
23
23
|
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); }); }; }
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.SettingsCenterDropdown = exports.PluginManagerLink = void 0;
|
|
7
7
|
var _icons = require("@ant-design/icons");
|
|
8
8
|
var _antd = require("antd");
|
|
9
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
9
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
11
|
var _reactI18next = require("react-i18next");
|
|
11
12
|
var _reactRouterDom = require("react-router-dom");
|
|
@@ -14,6 +15,7 @@ var _schemaComponent = require("../schema-component");
|
|
|
14
15
|
var _index = require("./index");
|
|
15
16
|
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); }
|
|
16
17
|
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; }
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
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); }
|
|
18
20
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
19
21
|
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."); }
|
|
@@ -45,7 +47,7 @@ var PluginManagerLink = function PluginManagerLink() {
|
|
|
45
47
|
}));
|
|
46
48
|
};
|
|
47
49
|
exports.PluginManagerLink = PluginManagerLink;
|
|
48
|
-
var getBookmarkTabs = function
|
|
50
|
+
var getBookmarkTabs = _lodash.default.memoize(function (data) {
|
|
49
51
|
var bookmarkTabs = [];
|
|
50
52
|
data.forEach(function (plugin) {
|
|
51
53
|
var tabs = plugin.tabs;
|
|
@@ -56,7 +58,7 @@ var getBookmarkTabs = function getBookmarkTabs(data) {
|
|
|
56
58
|
});
|
|
57
59
|
});
|
|
58
60
|
return bookmarkTabs;
|
|
59
|
-
};
|
|
61
|
+
});
|
|
60
62
|
var SettingsCenterDropdown = function SettingsCenterDropdown() {
|
|
61
63
|
var _useACLRoleContext = (0, _ACLProvider.useACLRoleContext)(),
|
|
62
64
|
_useACLRoleContext$sn = _useACLRoleContext.snippets,
|
|
@@ -72,14 +74,8 @@ var SettingsCenterDropdown = function SettingsCenterDropdown() {
|
|
|
72
74
|
var itemData = (0, _react.useContext)(_index.SettingsCenterContext);
|
|
73
75
|
var pluginsTabs = (0, _index.getPluginsTabs)(itemData, snippets);
|
|
74
76
|
var bookmarkTabs = getBookmarkTabs(pluginsTabs);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
visible: visible,
|
|
78
|
-
setVisible: setVisible
|
|
79
|
-
}
|
|
80
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Dropdown, {
|
|
81
|
-
placement: "bottom",
|
|
82
|
-
menu: {
|
|
77
|
+
var menu = (0, _react.useMemo)(function () {
|
|
78
|
+
return {
|
|
83
79
|
items: [].concat(_toConsumableArray(bookmarkTabs.map(function (tab) {
|
|
84
80
|
return {
|
|
85
81
|
key: "/admin/settings/".concat(tab.path),
|
|
@@ -95,7 +91,16 @@ var SettingsCenterDropdown = function SettingsCenterDropdown() {
|
|
|
95
91
|
var key = _ref.key;
|
|
96
92
|
navigate(key);
|
|
97
93
|
}
|
|
94
|
+
};
|
|
95
|
+
}, [bookmarkTabs]);
|
|
96
|
+
return /*#__PURE__*/_react.default.createElement(_schemaComponent.ActionContextProvider, {
|
|
97
|
+
value: {
|
|
98
|
+
visible: visible,
|
|
99
|
+
setVisible: setVisible
|
|
98
100
|
}
|
|
101
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Dropdown, {
|
|
102
|
+
placement: "bottom",
|
|
103
|
+
menu: menu
|
|
99
104
|
}, /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
100
105
|
icon: /*#__PURE__*/_react.default.createElement(_icons.SettingOutlined, null)
|
|
101
106
|
})));
|
package/lib/pm/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _ from 'lodash';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
export interface TData {
|
|
3
4
|
data: IPluginData[];
|
|
@@ -29,7 +30,7 @@ export interface AllowedActions {
|
|
|
29
30
|
destroy: number[];
|
|
30
31
|
}
|
|
31
32
|
export declare const SettingsCenterContext: React.Context<any>;
|
|
32
|
-
export declare const getPluginsTabs: (items: any, snippets: any) => any[];
|
|
33
|
+
export declare const getPluginsTabs: ((items: any, snippets: any) => any[]) & _.MemoizedFunction;
|
|
33
34
|
export declare const SettingsCenterProvider: (props: any) => React.JSX.Element;
|
|
34
35
|
export declare const PMProvider: (props: any) => React.JSX.Element;
|
|
35
36
|
export default PMProvider;
|
package/lib/pm/index.js
CHANGED
|
@@ -10,9 +10,10 @@ var _exportNames = {
|
|
|
10
10
|
PMProvider: true
|
|
11
11
|
};
|
|
12
12
|
exports.getPluginsTabs = exports.default = exports.SettingsCenterProvider = exports.SettingsCenterContext = exports.PMProvider = void 0;
|
|
13
|
+
var _proLayout = require("@ant-design/pro-layout");
|
|
13
14
|
var _css = require("@emotion/css");
|
|
14
15
|
var _antd = require("antd");
|
|
15
|
-
var _lodash = require("lodash");
|
|
16
|
+
var _lodash = _interopRequireWildcard(require("lodash"));
|
|
16
17
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
18
|
var _reactI18next = require("react-i18next");
|
|
18
19
|
var _reactRouterDom = require("react-router-dom");
|
|
@@ -135,24 +136,29 @@ var PluginList = function PluginList(props) {
|
|
|
135
136
|
});
|
|
136
137
|
}
|
|
137
138
|
}, []);
|
|
138
|
-
return snippets.includes('pm') ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(
|
|
139
|
+
return snippets.includes('pm') ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_proLayout.PageHeader, {
|
|
140
|
+
style: {
|
|
141
|
+
backgroundColor: 'white',
|
|
142
|
+
paddingBottom: 0
|
|
143
|
+
},
|
|
139
144
|
ghost: false,
|
|
140
145
|
title: t('Plugin manager'),
|
|
141
146
|
footer: /*#__PURE__*/_react.default.createElement(_antd.Tabs, {
|
|
142
147
|
activeKey: tabName,
|
|
143
148
|
onChange: function onChange(activeKey) {
|
|
144
149
|
navigate("/admin/pm/list/".concat(activeKey));
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
150
|
+
},
|
|
151
|
+
items: [{
|
|
152
|
+
key: 'local',
|
|
153
|
+
label: t('Local')
|
|
154
|
+
}, {
|
|
155
|
+
key: 'built-in',
|
|
156
|
+
label: t('Built-in')
|
|
157
|
+
}, {
|
|
158
|
+
key: 'marketplace',
|
|
159
|
+
label: t('Marketplace')
|
|
160
|
+
}]
|
|
161
|
+
})
|
|
156
162
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
157
163
|
className: 'm24',
|
|
158
164
|
style: {
|
|
@@ -217,7 +223,7 @@ var settings = {
|
|
|
217
223
|
}
|
|
218
224
|
}
|
|
219
225
|
};
|
|
220
|
-
var getPluginsTabs = function
|
|
226
|
+
var getPluginsTabs = _lodash.default.memoize(function (items, snippets) {
|
|
221
227
|
var pluginsTabs = Object.keys(items).map(function (plugin) {
|
|
222
228
|
var tabsObj = items[plugin].tabs;
|
|
223
229
|
var tabs = (0, _lodash.sortBy)(Object.keys(tabsObj).map(function (tab) {
|
|
@@ -240,7 +246,7 @@ var getPluginsTabs = function getPluginsTabs(items, snippets) {
|
|
|
240
246
|
return (0, _lodash.sortBy)(pluginsTabs, function (o) {
|
|
241
247
|
return !o.isAllow;
|
|
242
248
|
});
|
|
243
|
-
};
|
|
249
|
+
});
|
|
244
250
|
exports.getPluginsTabs = getPluginsTabs;
|
|
245
251
|
var SettingsCenter = function SettingsCenter(props) {
|
|
246
252
|
var _activePlugin$tabs$fi, _items$pluginName2, _items$pluginName2$ta, _items$pluginName2$ta2, _items$pluginName3, _plugin$tabs;
|
|
@@ -316,20 +322,28 @@ var SettingsCenter = function SettingsCenter(props) {
|
|
|
316
322
|
navigate("/admin/settings/".concat(e.key, "/").concat(tabKey));
|
|
317
323
|
},
|
|
318
324
|
items: menuItems
|
|
319
|
-
})), /*#__PURE__*/_react.default.createElement(_antd.Layout.Content, null, aclPluginTabCheck && /*#__PURE__*/_react.default.createElement(
|
|
325
|
+
})), /*#__PURE__*/_react.default.createElement(_antd.Layout.Content, null, aclPluginTabCheck && /*#__PURE__*/_react.default.createElement(_proLayout.PageHeader, {
|
|
326
|
+
style: {
|
|
327
|
+
backgroundColor: 'white',
|
|
328
|
+
paddingBottom: 0
|
|
329
|
+
},
|
|
320
330
|
ghost: false,
|
|
321
331
|
title: compile((_items$pluginName3 = items[pluginName]) === null || _items$pluginName3 === void 0 ? void 0 : _items$pluginName3.title),
|
|
322
332
|
footer: /*#__PURE__*/_react.default.createElement(_antd.Tabs, {
|
|
323
333
|
activeKey: tabName,
|
|
324
334
|
onChange: function onChange(activeKey) {
|
|
325
335
|
navigate("/admin/settings/".concat(pluginName, "/").concat(activeKey));
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
336
|
+
},
|
|
337
|
+
items: (_plugin$tabs = plugin.tabs) === null || _plugin$tabs === void 0 ? void 0 : _plugin$tabs.map(function (tab) {
|
|
338
|
+
if (!tab.isAllow) {
|
|
339
|
+
return null;
|
|
340
|
+
}
|
|
341
|
+
return {
|
|
342
|
+
label: compile(tab === null || tab === void 0 ? void 0 : tab.title),
|
|
343
|
+
key: tab.key
|
|
344
|
+
};
|
|
345
|
+
})
|
|
346
|
+
})
|
|
333
347
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
334
348
|
className: 'm24',
|
|
335
349
|
style: {
|
|
@@ -68,7 +68,6 @@ var MenuEditor = function MenuEditor(props) {
|
|
|
68
68
|
var defaultSelectedUid = params.name;
|
|
69
69
|
var sideMenuRef = props.sideMenuRef;
|
|
70
70
|
var ctx = (0, _.useACLRoleContext)();
|
|
71
|
-
var route = (0, _.useRoute)();
|
|
72
71
|
var _useState = (0, _react.useState)(null),
|
|
73
72
|
_useState2 = _slicedToArray(_useState, 2),
|
|
74
73
|
current = _useState2[0],
|
|
@@ -80,14 +79,15 @@ var MenuEditor = function MenuEditor(props) {
|
|
|
80
79
|
setCurrent(schema);
|
|
81
80
|
navigate("/admin/".concat(schema['x-uid']));
|
|
82
81
|
};
|
|
82
|
+
var adminSchemaUid = (0, _.useAdminSchemaUid)();
|
|
83
83
|
var _useRequest = (0, _.useRequest)({
|
|
84
|
-
url: "/uiSchemas:getJsonSchema/".concat(
|
|
84
|
+
url: "/uiSchemas:getJsonSchema/".concat(adminSchemaUid)
|
|
85
85
|
}, {
|
|
86
|
-
refreshDeps: [
|
|
86
|
+
refreshDeps: [adminSchemaUid],
|
|
87
87
|
onSuccess: function onSuccess(data) {
|
|
88
88
|
var schema = filterByACL(data === null || data === void 0 ? void 0 : data.data, ctx);
|
|
89
89
|
// url 为 `/admin` 的情况
|
|
90
|
-
if (params['*'] === 'admin') {
|
|
90
|
+
if (params['*'] === 'admin' || params['*'] === 'admin/') {
|
|
91
91
|
var _s2 = (0, _.findMenuItem)(schema);
|
|
92
92
|
if (_s2) {
|
|
93
93
|
navigate("/admin/".concat(_s2['x-uid']));
|
|
@@ -57,7 +57,7 @@ var MenuGroup = function MenuGroup(props) {
|
|
|
57
57
|
if (!['customize:popup', 'customize:update', 'customize:save', 'customize:table:request', 'customize:form:request'].includes(actionType)) {
|
|
58
58
|
return /*#__PURE__*/_react2.default.createElement(_react2.default.Fragment, null, props.children);
|
|
59
59
|
}
|
|
60
|
-
return /*#__PURE__*/_react2.default.createElement(
|
|
60
|
+
return /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.ItemGroup, {
|
|
61
61
|
title: "".concat(t('Customize'), " > ").concat(actionTitles[actionType])
|
|
62
62
|
}, props.children);
|
|
63
63
|
};
|
|
@@ -71,9 +71,7 @@ var ActionDesigner = function ActionDesigner(props) {
|
|
|
71
71
|
var _useCollection = (0, _collectionManager.useCollection)(),
|
|
72
72
|
name = _useCollection.name;
|
|
73
73
|
var _useCollectionManager = (0, _collectionManager.useCollectionManager)(),
|
|
74
|
-
getChildrenCollections = _useCollectionManager.getChildrenCollections
|
|
75
|
-
getCollection = _useCollectionManager.getCollection,
|
|
76
|
-
getCollectionField = _useCollectionManager.getCollectionField;
|
|
74
|
+
getChildrenCollections = _useCollectionManager.getChildrenCollections;
|
|
77
75
|
var _useDesignable = (0, _.useDesignable)(),
|
|
78
76
|
dn = _useDesignable.dn;
|
|
79
77
|
var _useTranslation2 = (0, _reactI18next.useTranslation)(),
|
|
@@ -52,7 +52,7 @@ var ActionDrawer = (0, _react.observer)(function (props) {
|
|
|
52
52
|
width: openSizeWidthMap.get(openSize),
|
|
53
53
|
title: field.title
|
|
54
54
|
}, others), drawerProps), modalProps), {}, {
|
|
55
|
-
|
|
55
|
+
rootStyle: _objectSpread(_objectSpread({}, drawerProps === null || drawerProps === void 0 ? void 0 : drawerProps.style), others === null || others === void 0 ? void 0 : others.style),
|
|
56
56
|
destroyOnClose: true,
|
|
57
57
|
open: visible,
|
|
58
58
|
onClose: function onClose() {
|
|
@@ -30,7 +30,6 @@ var EditableAssociationField = (0, _react.observer)(function (props) {
|
|
|
30
30
|
var multiple = props.multiple;
|
|
31
31
|
var field = (0, _react.useField)();
|
|
32
32
|
var form = (0, _react.useForm)();
|
|
33
|
-
var fieldSchema = (0, _react.useFieldSchema)();
|
|
34
33
|
var _useAssociationFieldC = (0, _hooks2.useAssociationFieldContext)(),
|
|
35
34
|
collectionField = _useAssociationFieldC.options,
|
|
36
35
|
currentMode = _useAssociationFieldC.currentMode;
|
|
@@ -9,6 +9,7 @@ var _css = require("@emotion/css");
|
|
|
9
9
|
var _internals = require("@formily/core/esm/shared/internals");
|
|
10
10
|
var _react = require("@formily/react");
|
|
11
11
|
var _reactive = require("@formily/reactive");
|
|
12
|
+
var _shared = require("@formily/shared");
|
|
12
13
|
var _antd = require("antd");
|
|
13
14
|
var _react2 = _interopRequireWildcard(require("react"));
|
|
14
15
|
var _reactI18next = require("react-i18next");
|
|
@@ -86,6 +87,11 @@ var ToManyNester = (0, _react.observer)(function (props) {
|
|
|
86
87
|
insertCount: 1
|
|
87
88
|
});
|
|
88
89
|
field.value.splice(index + 1, 0, {});
|
|
90
|
+
(0, _shared.each)(field.form.fields, function (field, key) {
|
|
91
|
+
if (!field) {
|
|
92
|
+
delete field.form.fields[key];
|
|
93
|
+
}
|
|
94
|
+
});
|
|
89
95
|
return field.onInput(field.value);
|
|
90
96
|
});
|
|
91
97
|
}
|
|
@@ -42,7 +42,7 @@ var SubTable = (0, _react.observer)(function (props) {
|
|
|
42
42
|
return /*#__PURE__*/_react2.default.createElement("div", {
|
|
43
43
|
className: (0, _css.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-table-footer {\n padding: 0 !important;\n }\n .ant-formily-item-error-help {\n display: none;\n }\n .ant-description-textarea {\n line-height: 34px;\n }\n .ant-table-cell .ant-formily-item-error-help {\n display: block;\n position: absolute;\n font-size: 12px;\n top: 100%;\n background: #fff;\n width: 100%;\n margin-top: 3px;\n padding: 3px;\n z-index: 1;\n border-radius: 3px;\n box-shadow: 0 0 10px #eee;\n animation: none;\n transform: translateY(0);\n opacity: 1;\n }\n "])))
|
|
44
44
|
}, /*#__PURE__*/_react2.default.createElement(_Table.Table, {
|
|
45
|
-
className: (0, _css.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ant-select-selector {\n /* min-height: 31px; */\n }\n .ant-formily-item.ant-formily-item-feedback-layout-loose {\n margin-bottom: 0px !important;\n }\n .ant-formily-editable {\n vertical-align: sub;\n }\n .ant-table table {\n }\n td:not(.ant-table-selection-column) {\n padding:
|
|
45
|
+
className: (0, _css.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ant-select-selector {\n /* min-height: 31px; */\n }\n .ant-formily-item.ant-formily-item-feedback-layout-loose {\n margin-bottom: 0px !important;\n }\n .ant-formily-editable {\n vertical-align: sub;\n }\n .ant-table table {\n }\n td:not(.ant-table-selection-column) {\n padding: 5px !important;\n }\n "]))),
|
|
46
46
|
bordered: true,
|
|
47
47
|
size: 'small',
|
|
48
48
|
field: field,
|
|
@@ -103,7 +103,7 @@ var DeleteEvent = (0, _react.observer)(function () {
|
|
|
103
103
|
t = _useTranslation.t;
|
|
104
104
|
return /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/_react2.default.createElement(_antd.Modal, {
|
|
105
105
|
title: cron ? t('Delete events') : null,
|
|
106
|
-
|
|
106
|
+
open: visible,
|
|
107
107
|
onCancel: function onCancel() {
|
|
108
108
|
return setVisible(false);
|
|
109
109
|
},
|