@nocobase/client 0.8.1-alpha.4 → 0.9.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/acl/ACLProvider.d.ts +16 -2
- package/es/acl/ACLProvider.js +271 -100
- package/es/acl/Configuration/ConfigureCenter.d.ts +2 -0
- package/es/acl/Configuration/ConfigureCenter.js +254 -0
- package/es/acl/Configuration/MenuConfigure.js +2 -2
- package/es/acl/Configuration/PermisionProvider.d.ts +4 -0
- package/es/acl/Configuration/PermisionProvider.js +132 -0
- package/es/acl/Configuration/RoleConfigure.js +98 -23
- package/es/acl/Configuration/RoleTable.d.ts +1 -1
- package/es/acl/Configuration/RoleTable.js +6 -3
- package/es/acl/Configuration/RolesResourcesActions.js +2 -2
- package/es/acl/Configuration/index.d.ts +1 -0
- package/es/acl/Configuration/index.js +2 -1
- package/es/acl/Configuration/schemas/roleCollections.js +41 -13
- package/es/acl/Configuration/schemas/roles.js +42 -2
- package/es/acl/Configuration/schemas/scopes.js +2 -0
- package/es/acl/index.d.ts +1 -0
- package/es/acl/index.js +2 -1
- package/es/acl/style.less +10 -0
- package/es/antd-config-provider/index.d.ts +3 -1
- package/es/antd-config-provider/index.js +25 -6
- package/es/antd-config-provider/loadConstrueLocale.d.ts +1 -0
- package/es/antd-config-provider/loadConstrueLocale.js +293 -0
- package/es/api-client/APIClient.js +5 -0
- package/es/block-provider/FormBlockProvider.js +5 -2
- package/es/block-provider/KanbanBlockProvider.js +3 -3
- package/es/block-provider/SharedFilterProvider.d.ts +1 -0
- package/es/block-provider/SharedFilterProvider.js +22 -6
- package/es/collection-manager/CollectionHistoryProvider.js +14 -2
- package/es/collection-manager/hooks/useCollection.d.ts +1 -0
- package/es/collection-manager/hooks/useCollection.js +10 -0
- package/es/collection-manager/interfaces/index.d.ts +0 -1
- package/es/collection-manager/interfaces/index.js +0 -1
- package/es/collection-manager/interfaces/o2m.js +1 -0
- package/es/collection-manager/interfaces/properties/operators.js +7 -0
- package/es/collection-manager/interfaces/subTable.js +1 -0
- package/es/collection-manager/templates/calendar.js +5 -0
- package/es/formula/Expression.d.ts +2 -0
- package/es/formula/Expression.js +296 -0
- package/es/formula/Result.d.ts +2 -0
- package/es/formula/Result.js +91 -0
- package/es/formula/index.d.ts +6 -0
- package/es/formula/index.js +8 -0
- package/es/i18n/i18n.js +7 -12
- package/es/index.d.ts +2 -1
- package/es/index.js +3 -2
- package/es/locale/en_US.d.ts +108 -28
- package/es/locale/en_US.js +108 -28
- package/es/locale/index.d.ts +201 -4
- package/es/locale/index.js +191 -58
- package/es/locale/ja_JP.d.ts +4 -0
- package/es/locale/ja_JP.js +4 -0
- package/es/locale/zh_CN.d.ts +11 -1
- package/es/locale/zh_CN.js +12 -2
- package/es/plugin-manager/PluginManager.js +19 -13
- package/es/pm/PluginManagerLink.js +38 -43
- package/es/pm/index.d.ts +1 -0
- package/es/pm/index.js +84 -35
- package/es/record-provider/index.d.ts +1 -0
- package/es/record-provider/index.js +7 -4
- package/es/route-switch/antd/admin-layout/index.d.ts +1 -0
- package/es/route-switch/antd/admin-layout/index.js +4 -6
- package/es/schema-component/antd/action/Action.js +19 -16
- package/es/schema-component/antd/association-filter/AssociationFilter.Item.js +24 -23
- package/es/schema-component/antd/cron/Cron.d.ts +0 -1
- package/es/schema-component/antd/cron/Cron.js +16 -19
- package/es/schema-component/antd/cron/locale/index.d.ts +37 -0
- package/es/schema-component/antd/cron/locale/index.js +6 -0
- package/es/schema-component/antd/filter/useFilterActionProps.js +17 -23
- package/es/schema-component/antd/form-item/FormItem.js +5 -4
- package/es/schema-component/antd/index.d.ts +1 -2
- package/es/schema-component/antd/index.js +1 -2
- package/es/schema-component/antd/page/FixedBlock.d.ts +1 -1
- package/es/schema-component/antd/page/FixedBlock.js +70 -21
- package/es/schema-component/antd/page/Page.js +15 -10
- package/es/schema-component/antd/remote-select/RemoteSelect.js +12 -2
- package/es/schema-component/antd/table/Table.Array.js +1 -1
- package/es/schema-component/antd/table-v2/Table.js +13 -6
- package/es/schema-component/antd/table-v2/TableBlockDesigner.js +24 -8
- package/es/schema-component/hooks/useDesignable.d.ts +1 -1
- package/es/schema-component/hooks/useDesignable.js +45 -16
- package/es/schema-component/hooks/useFieldTitle.js +3 -1
- package/es/schema-initializer/buttons/ReadPrettyFormActionInitializers.d.ts +3 -0
- package/es/schema-initializer/buttons/ReadPrettyFormActionInitializers.js +1 -0
- package/es/schema-initializer/buttons/TableActionColumnInitializers.js +1 -0
- package/es/schema-initializer/utils.js +6 -9
- package/es/schema-templates/BlockTemplate.js +2 -2
- package/es/schema-templates/SchemaTemplateManagerProvider.js +1 -1
- package/es/system-settings/SystemSettingsShortcut.js +1 -1
- package/lib/acl/ACLProvider.d.ts +16 -2
- package/lib/acl/ACLProvider.js +283 -102
- package/lib/acl/Configuration/ConfigureCenter.d.ts +2 -0
- package/lib/acl/Configuration/ConfigureCenter.js +278 -0
- package/lib/acl/Configuration/MenuConfigure.js +3 -3
- package/lib/acl/Configuration/PermisionProvider.d.ts +4 -0
- package/lib/acl/Configuration/PermisionProvider.js +156 -0
- package/lib/acl/Configuration/RoleConfigure.js +107 -23
- package/lib/acl/Configuration/RoleTable.d.ts +1 -1
- package/lib/acl/Configuration/RoleTable.js +8 -4
- package/lib/acl/Configuration/RolesResourcesActions.js +2 -2
- package/lib/acl/Configuration/index.d.ts +1 -0
- package/lib/acl/Configuration/index.js +15 -1
- package/lib/acl/Configuration/schemas/roleCollections.js +41 -13
- package/lib/acl/Configuration/schemas/roles.js +47 -2
- package/lib/acl/Configuration/schemas/scopes.js +2 -0
- package/lib/acl/index.d.ts +1 -0
- package/lib/acl/index.js +3 -1
- package/lib/acl/style.less +10 -0
- package/lib/antd-config-provider/index.d.ts +3 -1
- package/lib/antd-config-provider/index.js +40 -6
- package/lib/antd-config-provider/loadConstrueLocale.d.ts +1 -0
- package/lib/antd-config-provider/loadConstrueLocale.js +304 -0
- package/lib/api-client/APIClient.js +5 -0
- package/lib/block-provider/FormBlockProvider.js +9 -3
- package/lib/block-provider/KanbanBlockProvider.js +3 -3
- package/lib/block-provider/SharedFilterProvider.d.ts +1 -0
- package/lib/block-provider/SharedFilterProvider.js +26 -7
- package/lib/collection-manager/CollectionHistoryProvider.js +14 -1
- package/lib/collection-manager/hooks/useCollection.d.ts +1 -0
- package/lib/collection-manager/hooks/useCollection.js +10 -0
- package/lib/collection-manager/interfaces/index.d.ts +0 -1
- package/lib/collection-manager/interfaces/index.js +0 -13
- package/lib/collection-manager/interfaces/o2m.js +1 -0
- package/lib/collection-manager/interfaces/properties/operators.js +7 -0
- package/lib/collection-manager/interfaces/subTable.js +1 -0
- package/lib/collection-manager/templates/calendar.js +5 -0
- package/lib/formula/Expression.d.ts +2 -0
- package/lib/formula/Expression.js +319 -0
- package/lib/formula/Result.d.ts +2 -0
- package/lib/formula/Result.js +114 -0
- package/lib/formula/index.d.ts +6 -0
- package/lib/formula/index.js +22 -0
- package/lib/i18n/i18n.js +7 -14
- package/lib/index.d.ts +2 -1
- package/lib/index.js +26 -13
- package/lib/locale/en_US.d.ts +108 -28
- package/lib/locale/en_US.js +108 -28
- package/lib/locale/index.d.ts +201 -4
- package/lib/locale/index.js +197 -67
- package/lib/locale/ja_JP.d.ts +4 -0
- package/lib/locale/ja_JP.js +4 -0
- package/lib/locale/zh_CN.d.ts +11 -1
- package/lib/locale/zh_CN.js +12 -2
- package/lib/plugin-manager/PluginManager.js +20 -13
- package/lib/pm/PluginManagerLink.js +37 -43
- package/lib/pm/index.d.ts +1 -0
- package/lib/pm/index.js +90 -35
- package/lib/record-provider/index.d.ts +1 -0
- package/lib/record-provider/index.js +7 -4
- package/lib/route-switch/antd/admin-layout/index.d.ts +1 -0
- package/lib/route-switch/antd/admin-layout/index.js +5 -4
- package/lib/schema-component/antd/action/Action.js +19 -16
- package/lib/schema-component/antd/association-filter/AssociationFilter.Item.js +22 -21
- package/lib/schema-component/antd/cron/Cron.d.ts +0 -1
- package/lib/schema-component/antd/cron/Cron.js +19 -24
- package/lib/schema-component/antd/cron/locale/index.d.ts +37 -0
- package/lib/schema-component/antd/cron/locale/index.js +18 -0
- package/lib/schema-component/antd/filter/useFilterActionProps.js +16 -23
- package/lib/schema-component/antd/form-item/FormItem.js +6 -4
- package/lib/schema-component/antd/index.d.ts +1 -2
- package/lib/schema-component/antd/index.js +8 -21
- package/lib/schema-component/antd/page/FixedBlock.d.ts +1 -1
- package/lib/schema-component/antd/page/FixedBlock.js +71 -21
- package/lib/schema-component/antd/page/Page.js +14 -9
- package/lib/schema-component/antd/remote-select/RemoteSelect.js +18 -3
- package/lib/schema-component/antd/table/Table.Array.js +1 -1
- package/lib/schema-component/antd/table-v2/Table.js +14 -6
- package/lib/schema-component/antd/table-v2/TableBlockDesigner.js +25 -8
- package/lib/schema-component/hooks/useDesignable.d.ts +1 -1
- package/lib/schema-component/hooks/useDesignable.js +47 -18
- package/lib/schema-component/hooks/useFieldTitle.js +4 -1
- package/lib/schema-initializer/buttons/ReadPrettyFormActionInitializers.d.ts +3 -0
- package/lib/schema-initializer/buttons/ReadPrettyFormActionInitializers.js +1 -0
- package/lib/schema-initializer/buttons/TableActionColumnInitializers.js +1 -0
- package/lib/schema-initializer/utils.js +6 -9
- package/lib/schema-templates/BlockTemplate.js +2 -2
- package/lib/schema-templates/SchemaTemplateManagerProvider.js +1 -1
- package/lib/system-settings/SystemSettingsShortcut.js +1 -1
- package/package.json +6 -11
- package/es/collection-manager/interfaces/formula.d.ts +0 -2
- package/es/collection-manager/interfaces/formula.js +0 -74
- package/es/schema-component/antd/formula-input/Compute.d.ts +0 -3
- package/es/schema-component/antd/formula-input/Compute.js +0 -55
- package/es/schema-component/antd/formula-input/FormulaInput.d.ts +0 -3
- package/es/schema-component/antd/formula-input/FormulaInput.js +0 -167
- package/es/schema-component/antd/formula-input/index.d.ts +0 -1
- package/es/schema-component/antd/formula-input/index.js +0 -7
- package/lib/collection-manager/interfaces/formula.d.ts +0 -2
- package/lib/collection-manager/interfaces/formula.js +0 -83
- package/lib/schema-component/antd/formula-input/Compute.d.ts +0 -3
- package/lib/schema-component/antd/formula-input/Compute.js +0 -79
- package/lib/schema-component/antd/formula-input/FormulaInput.d.ts +0 -3
- package/lib/schema-component/antd/formula-input/FormulaInput.js +0 -191
- package/lib/schema-component/antd/formula-input/index.d.ts +0 -1
- package/lib/schema-component/antd/formula-input/index.js +0 -18
|
@@ -408,25 +408,54 @@ export var Designable = /*#__PURE__*/function () {
|
|
|
408
408
|
}
|
|
409
409
|
}, {
|
|
410
410
|
key: "emit",
|
|
411
|
-
value: function
|
|
412
|
-
var
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
411
|
+
value: function () {
|
|
412
|
+
var _emit = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(name) {
|
|
413
|
+
var _this = this;
|
|
414
|
+
|
|
415
|
+
var _len,
|
|
416
|
+
args,
|
|
417
|
+
_key,
|
|
418
|
+
opts,
|
|
419
|
+
others,
|
|
420
|
+
_args5 = arguments;
|
|
421
|
+
|
|
422
|
+
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
423
|
+
while (1) {
|
|
424
|
+
switch (_context5.prev = _context5.next) {
|
|
425
|
+
case 0:
|
|
426
|
+
if (this.events[name]) {
|
|
427
|
+
_context5.next = 2;
|
|
428
|
+
break;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
return _context5.abrupt("return");
|
|
432
|
+
|
|
433
|
+
case 2:
|
|
434
|
+
for (_len = _args5.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
435
|
+
args[_key - 1] = _args5[_key];
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
opts = args[0], others = args.slice(1);
|
|
439
|
+
return _context5.abrupt("return", Promise.all(this.events[name].map(function (fn) {
|
|
440
|
+
return fn.bind(_this).apply(void 0, [_objectSpread({
|
|
441
|
+
current: _this.current
|
|
442
|
+
}, opts)].concat(_toConsumableArray(others)));
|
|
443
|
+
})));
|
|
444
|
+
|
|
445
|
+
case 5:
|
|
446
|
+
case "end":
|
|
447
|
+
return _context5.stop();
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}, _callee5, this);
|
|
451
|
+
}));
|
|
417
452
|
|
|
418
|
-
|
|
419
|
-
|
|
453
|
+
function emit(_x5) {
|
|
454
|
+
return _emit.apply(this, arguments);
|
|
420
455
|
}
|
|
421
456
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
this.events[name].forEach(function (fn) {
|
|
425
|
-
return fn.bind(_this).apply(void 0, [_objectSpread({
|
|
426
|
-
current: _this.current
|
|
427
|
-
}, opts)].concat(_toConsumableArray(others)));
|
|
428
|
-
});
|
|
429
|
-
}
|
|
457
|
+
return emit;
|
|
458
|
+
}()
|
|
430
459
|
}, {
|
|
431
460
|
key: "parentsIn",
|
|
432
461
|
value: function parentsIn(schema) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useField, useFieldSchema } from "@formily/react";
|
|
2
2
|
import { useEffect } from "react";
|
|
3
|
+
import { useCompile } from "./useCompile";
|
|
3
4
|
import { useCollection, useCollectionManager } from "../../collection-manager";
|
|
4
5
|
export var useFieldTitle = function useFieldTitle() {
|
|
5
6
|
var _collectionField$uiSc2;
|
|
@@ -14,11 +15,12 @@ export var useFieldTitle = function useFieldTitle() {
|
|
|
14
15
|
getCollectionJoinField = _useCollectionManager.getCollectionJoinField;
|
|
15
16
|
|
|
16
17
|
var collectionField = getField(fieldSchema['name']) || getCollectionJoinField(fieldSchema['x-collection-field']);
|
|
18
|
+
var compile = useCompile();
|
|
17
19
|
useEffect(function () {
|
|
18
20
|
if (!(field === null || field === void 0 ? void 0 : field.title)) {
|
|
19
21
|
var _collectionField$uiSc;
|
|
20
22
|
|
|
21
|
-
field.title = collectionField === null || collectionField === void 0 ? void 0 : (_collectionField$uiSc = collectionField.uiSchema) === null || _collectionField$uiSc === void 0 ? void 0 : _collectionField$uiSc.title;
|
|
23
|
+
field.title = compile(collectionField === null || collectionField === void 0 ? void 0 : (_collectionField$uiSc = collectionField.uiSchema) === null || _collectionField$uiSc === void 0 ? void 0 : _collectionField$uiSc.title);
|
|
22
24
|
}
|
|
23
25
|
}, [collectionField === null || collectionField === void 0 ? void 0 : (_collectionField$uiSc2 = collectionField.uiSchema) === null || _collectionField$uiSc2 === void 0 ? void 0 : _collectionField$uiSc2.title]);
|
|
24
26
|
};
|
|
@@ -93,6 +93,7 @@ export declare const ReadPrettyFormActionInitializers: {
|
|
|
93
93
|
};
|
|
94
94
|
};
|
|
95
95
|
};
|
|
96
|
+
'x-decorator'?: undefined;
|
|
96
97
|
'x-acl-action'?: undefined;
|
|
97
98
|
'x-action-settings'?: undefined;
|
|
98
99
|
};
|
|
@@ -105,6 +106,7 @@ export declare const ReadPrettyFormActionInitializers: {
|
|
|
105
106
|
'x-component': string;
|
|
106
107
|
'x-designer': string;
|
|
107
108
|
'x-action': string;
|
|
109
|
+
'x-decorator': string;
|
|
108
110
|
'x-acl-action': string;
|
|
109
111
|
'x-action-settings': {
|
|
110
112
|
assignedValues: {};
|
|
@@ -148,6 +150,7 @@ export declare const ReadPrettyFormActionInitializers: {
|
|
|
148
150
|
};
|
|
149
151
|
type?: undefined;
|
|
150
152
|
properties?: undefined;
|
|
153
|
+
'x-decorator'?: undefined;
|
|
151
154
|
'x-acl-action'?: undefined;
|
|
152
155
|
};
|
|
153
156
|
})[];
|
|
@@ -98,6 +98,7 @@ export var ReadPrettyFormActionInitializers = {
|
|
|
98
98
|
'x-component': 'Action',
|
|
99
99
|
'x-designer': 'Action.Designer',
|
|
100
100
|
'x-action': 'customize:update',
|
|
101
|
+
'x-decorator': 'ACLActionProvider',
|
|
101
102
|
'x-acl-action': 'update',
|
|
102
103
|
'x-action-settings': {
|
|
103
104
|
assignedValues: {},
|
|
@@ -176,6 +176,7 @@ export var TableActionColumnInitializers = function TableActionColumnInitializer
|
|
|
176
176
|
title: '{{ t("Update record") }}',
|
|
177
177
|
'x-component': 'Action.Link',
|
|
178
178
|
'x-action': 'customize:update',
|
|
179
|
+
'x-decorator': 'ACLActionProvider',
|
|
179
180
|
'x-acl-action': 'update',
|
|
180
181
|
'x-designer': 'Action.Designer',
|
|
181
182
|
'x-action-settings': {
|
|
@@ -283,7 +283,6 @@ export var useFormItemInitializerFields = function useFormItemInitializerFields(
|
|
|
283
283
|
var schema = {
|
|
284
284
|
type: 'string',
|
|
285
285
|
name: field.name,
|
|
286
|
-
// title: field?.uiSchema?.title || field.name,
|
|
287
286
|
'x-designer': 'FormItem.Designer',
|
|
288
287
|
'x-component': field.interface === 'o2m' && !snapshot ? 'TableField' : 'CollectionField',
|
|
289
288
|
'x-decorator': 'FormItem',
|
|
@@ -355,7 +354,6 @@ export var useAssociatedFormItemInitializerFields = function useAssociatedFormIt
|
|
|
355
354
|
var schema = {
|
|
356
355
|
type: 'string',
|
|
357
356
|
name: "".concat(field.name, ".").concat(subField.name),
|
|
358
|
-
// title: subField?.uiSchema?.title || subField.name,
|
|
359
357
|
'x-designer': 'FormItem.Designer',
|
|
360
358
|
'x-component': 'CollectionField',
|
|
361
359
|
'x-read-pretty': readPretty,
|
|
@@ -364,8 +362,7 @@ export var useAssociatedFormItemInitializerFields = function useAssociatedFormIt
|
|
|
364
362
|
},
|
|
365
363
|
'x-decorator': 'FormItem',
|
|
366
364
|
'x-collection-field': "".concat(name, ".").concat(field.name, ".").concat(subField.name)
|
|
367
|
-
};
|
|
368
|
-
|
|
365
|
+
};
|
|
369
366
|
return {
|
|
370
367
|
type: 'item',
|
|
371
368
|
title: (subField === null || subField === void 0 ? void 0 : (_subField$uiSchema2 = subField.uiSchema) === null || _subField$uiSchema2 === void 0 ? void 0 : _subField$uiSchema2.title) || subField.name,
|
|
@@ -808,7 +805,7 @@ export var createDetailsBlockSchema = function createDetailsBlockSchema(options)
|
|
|
808
805
|
var resourceName = resource || association || collection;
|
|
809
806
|
var schema = {
|
|
810
807
|
type: 'void',
|
|
811
|
-
'x-acl-action': "".concat(resourceName, ":
|
|
808
|
+
'x-acl-action': "".concat(resourceName, ":view"),
|
|
812
809
|
'x-decorator': 'DetailsBlockProvider',
|
|
813
810
|
'x-decorator-props': _objectSpread({
|
|
814
811
|
resource: resourceName,
|
|
@@ -974,8 +971,8 @@ export var createReadPrettyFormBlockSchema = function createReadPrettyFormBlockS
|
|
|
974
971
|
}
|
|
975
972
|
}
|
|
976
973
|
})
|
|
977
|
-
};
|
|
978
|
-
|
|
974
|
+
}; // console.log(JSON.stringify(schema, null, 2));
|
|
975
|
+
|
|
979
976
|
return schema;
|
|
980
977
|
};
|
|
981
978
|
export var createTableBlockSchema = function createTableBlockSchema(options) {
|
|
@@ -1047,8 +1044,8 @@ export var createTableBlockSchema = function createTableBlockSchema(options) {
|
|
|
1047
1044
|
}
|
|
1048
1045
|
}
|
|
1049
1046
|
})
|
|
1050
|
-
};
|
|
1051
|
-
|
|
1047
|
+
}; // console.log(JSON.stringify(schema, null, 2));
|
|
1048
|
+
|
|
1052
1049
|
return schema;
|
|
1053
1050
|
};
|
|
1054
1051
|
export var createTableSelectorSchema = function createTableSelectorSchema(options) {
|
|
@@ -25,7 +25,7 @@ export var BlockTemplate = observer(function (props) {
|
|
|
25
25
|
var template = useMemo(function () {
|
|
26
26
|
return getTemplateById(templateId);
|
|
27
27
|
}, [templateId]);
|
|
28
|
-
return template ? /*#__PURE__*/React.createElement(
|
|
28
|
+
return template ? /*#__PURE__*/React.createElement(BlockTemplateContext.Provider, {
|
|
29
29
|
value: {
|
|
30
30
|
dn: dn,
|
|
31
31
|
field: field,
|
|
@@ -35,5 +35,5 @@ export var BlockTemplate = observer(function (props) {
|
|
|
35
35
|
}, /*#__PURE__*/React.createElement(RemoteSchemaComponent, {
|
|
36
36
|
noForm: true,
|
|
37
37
|
uid: template === null || template === void 0 ? void 0 : template.uid
|
|
38
|
-
}))
|
|
38
|
+
})) : null;
|
|
39
39
|
});
|
|
@@ -62,7 +62,7 @@ export var SchemaTemplateManagerProvider = function SchemaTemplateManagerProvide
|
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
var regenerateUid = function regenerateUid(s) {
|
|
65
|
-
s['x-uid'] = uid();
|
|
65
|
+
s['name'] = s['x-uid'] = uid();
|
|
66
66
|
Object.keys(s.properties || {}).forEach(function (key) {
|
|
67
67
|
regenerateUid(s.properties[key]);
|
|
68
68
|
});
|
|
@@ -34,7 +34,7 @@ import locale from '../locale';
|
|
|
34
34
|
import { ActionContext, SchemaComponent, useActionContext } from '../schema-component';
|
|
35
35
|
var langs = Object.keys(locale).map(function (lang) {
|
|
36
36
|
return {
|
|
37
|
-
label: locale[lang].label,
|
|
37
|
+
label: "".concat(locale[lang].label, " (").concat(lang, ")"),
|
|
38
38
|
value: lang
|
|
39
39
|
};
|
|
40
40
|
});
|
package/lib/acl/ACLProvider.d.ts
CHANGED
|
@@ -1,13 +1,27 @@
|
|
|
1
|
+
import { Schema } from '@formily/react';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
export declare const ACLContext: React.Context<any>;
|
|
3
4
|
export declare const ACLProvider: (props: any) => JSX.Element;
|
|
4
5
|
export declare const ACLRolesCheckProvider: (props: any) => JSX.Element;
|
|
5
6
|
export declare const useRoleRecheck: () => () => void;
|
|
6
7
|
export declare const useACLContext: () => any;
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const ACLActionParamsContext: React.Context<any>;
|
|
9
|
+
export declare const useACLRolesCheck: () => {
|
|
10
|
+
data: any;
|
|
11
|
+
getActionAlias: (actionPath: string) => any;
|
|
12
|
+
inResources: (resourceName: string) => any;
|
|
13
|
+
getResourceActionParams: (actionPath: string) => any;
|
|
14
|
+
getStrategyActionParams: (actionPath: string) => {};
|
|
15
|
+
};
|
|
16
|
+
export declare function useACLRoleContext(): any;
|
|
9
17
|
export declare const ACLCollectionProvider: (props: any) => JSX.Element;
|
|
18
|
+
export declare const useACLActionParamsContext: () => any;
|
|
19
|
+
export declare const useRecordPkValue: () => any;
|
|
10
20
|
export declare const ACLActionProvider: (props: any) => JSX.Element;
|
|
21
|
+
export declare const useACLFieldWhitelist: () => {
|
|
22
|
+
whitelist: any[];
|
|
23
|
+
schemaInWhitelist(fieldSchema: Schema): boolean;
|
|
24
|
+
};
|
|
11
25
|
export declare const ACLCollectionFieldProvider: (props: any) => JSX.Element;
|
|
12
26
|
export declare const ACLMenuItemProvider: (props: any) => JSX.Element;
|
|
13
27
|
export default ACLProvider;
|