@nocobase/client 0.9.0-alpha.2 → 0.9.1-alpha.1
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.js +4 -7
- package/es/api-client/APIClient.js +6 -0
- package/es/block-provider/BlockProvider.js +9 -6
- package/es/block-provider/FormBlockProvider.js +3 -1
- package/es/block-provider/KanbanBlockProvider.js +1 -1
- package/es/block-provider/SharedFilterProvider.js +9 -1
- package/es/block-provider/TableBlockProvider.js +1 -1
- package/es/block-provider/TableSelectorProvider.js +2 -2
- package/es/block-provider/hooks/index.js +22 -7
- package/es/collection-manager/CollectionManagerProvider.d.ts +1 -0
- package/es/collection-manager/CollectionManagerProvider.js +71 -9
- package/es/collection-manager/CollectionManagerShortcut.js +36 -23
- package/es/collection-manager/Configuration/AddCategoryAction.d.ts +2 -0
- package/es/collection-manager/Configuration/AddCategoryAction.js +117 -0
- package/es/collection-manager/Configuration/AddCollectionAction.js +8 -3
- package/es/collection-manager/Configuration/AddFieldAction.js +1 -0
- package/es/collection-manager/Configuration/ConfigurationTable.js +33 -4
- package/es/collection-manager/Configuration/ConfigurationTabs.d.ts +1 -0
- package/es/collection-manager/Configuration/ConfigurationTabs.js +381 -0
- package/es/collection-manager/Configuration/EditCategoryAction.d.ts +2 -0
- package/es/collection-manager/Configuration/EditCategoryAction.js +150 -0
- package/es/collection-manager/Configuration/EditCollectionAction.js +6 -2
- package/es/collection-manager/Configuration/OverridingCollectionField.js +17 -8
- package/es/collection-manager/Configuration/components/CollectionCategory.d.ts +2 -0
- package/es/collection-manager/Configuration/components/CollectionCategory.js +13 -0
- 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/collections.d.ts +3 -0
- package/es/collection-manager/Configuration/schemas/collections.js +309 -176
- package/es/collection-manager/Configuration/templates.d.ts +1 -0
- package/es/collection-manager/Configuration/templates.js +1 -1
- package/es/collection-manager/action-hooks.js +3 -1
- package/es/collection-manager/context.d.ts +4 -0
- package/es/collection-manager/context.js +5 -1
- package/es/collection-manager/hooks/useCollectionManager.d.ts +7 -0
- package/es/collection-manager/hooks/useCollectionManager.js +51 -6
- package/es/collection-manager/interfaces/m2m.js +2 -2
- package/es/collection-manager/interfaces/properties/index.d.ts +0 -56
- package/es/collection-manager/interfaces/properties/index.js +1 -2
- package/es/collection-manager/templates/calendar.js +1 -1
- package/es/collection-manager/templates/general.js +1 -1
- package/es/collection-manager/templates/properties/index.d.ts +12 -1
- package/es/collection-manager/templates/properties/index.js +11 -0
- package/es/i18n/i18n.js +3 -1
- package/es/locale/en_US.d.ts +23 -0
- package/es/locale/en_US.js +23 -0
- package/es/locale/ja_JP.d.ts +23 -0
- package/es/locale/ja_JP.js +24 -1
- package/es/locale/ru_RU.d.ts +1 -0
- package/es/locale/ru_RU.js +1 -0
- package/es/locale/zh_CN.d.ts +43 -4
- package/es/locale/zh_CN.js +44 -5
- package/es/route-switch/antd/admin-layout/index.js +13 -33
- package/es/schema-component/antd/action/Action.Designer.js +22 -15
- package/es/schema-component/antd/action/Action.js +25 -3
- package/es/schema-component/antd/action/utils.d.ts +1 -0
- package/es/schema-component/antd/action/utils.js +49 -0
- package/es/schema-component/antd/association-filter/AssociationFilter.js +4 -4
- package/es/schema-component/antd/association-select/AssociationSelect.d.ts +2 -2
- package/es/schema-component/antd/association-select/useServiceOptions.js +47 -6
- package/es/schema-component/antd/calendar/Calendar.Designer.js +17 -36
- package/es/schema-component/antd/checkbox/Checkbox.js +9 -8
- package/es/schema-component/antd/date-picker/util.d.ts +1 -1
- package/es/schema-component/antd/date-picker/util.js +1 -1
- package/es/schema-component/antd/filter/DynamicComponent.js +3 -1
- package/es/schema-component/antd/filter/Filter.js +2 -1
- package/es/schema-component/antd/filter/FilterGroup.js +7 -4
- package/es/schema-component/antd/filter/FilterItem.js +3 -2
- package/es/schema-component/antd/filter/context.d.ts +1 -0
- package/es/schema-component/antd/filter/useValues.js +14 -11
- package/es/schema-component/antd/form/Form.js +11 -5
- package/es/schema-component/antd/form-item/FormItem.js +17 -8
- package/es/schema-component/antd/form-v2/Form.Designer.js +2 -0
- package/es/schema-component/antd/form-v2/Form.js +90 -7
- package/es/schema-component/antd/form-v2/utils.d.ts +5 -0
- package/es/schema-component/antd/form-v2/utils.js +161 -0
- package/es/schema-component/antd/grid/Grid.js +10 -5
- package/es/schema-component/antd/icon-picker/IconPicker.js +1 -0
- package/es/schema-component/antd/index.d.ts +1 -0
- package/es/schema-component/antd/index.js +1 -0
- package/es/schema-component/antd/input/Input.d.ts +2 -1
- package/es/schema-component/antd/input/Json.d.ts +5 -3
- package/es/schema-component/antd/input/Json.js +3 -2
- package/es/schema-component/antd/input-number/InputNumber.js +3 -1
- package/es/schema-component/antd/page/FixedBlock.js +3 -1
- package/es/schema-component/antd/page/Page.js +11 -5
- package/es/schema-component/antd/page/PageTabDesigner.js +3 -3
- package/es/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +3 -1
- package/es/schema-component/antd/record-picker/RecordPicker.js +1 -2
- package/es/schema-component/antd/record-picker/util.js +7 -0
- package/es/schema-component/antd/remote-select/RemoteSelect.js +76 -36
- package/es/schema-component/antd/rich-text/RichText.js +4 -2
- package/es/schema-component/antd/select/Select.js +14 -4
- package/es/schema-component/antd/table/Table.Array.js +10 -3
- package/es/schema-component/antd/table-v2/Table.Column.Designer.js +2 -2
- package/es/schema-component/antd/table-v2/TableBlockDesigner.js +3 -2
- package/es/schema-component/antd/tabs/Tabs.Designer.js +1 -0
- package/es/schema-component/antd/time-picker/TimePicker.js +1 -1
- package/es/schema-component/antd/variable/Input.d.ts +2 -0
- package/es/schema-component/antd/variable/Input.js +244 -0
- package/es/schema-component/antd/variable/JSONInput.d.ts +2 -0
- package/es/schema-component/antd/variable/JSONInput.js +82 -0
- package/es/schema-component/antd/variable/TextArea.d.ts +2 -0
- package/es/schema-component/antd/variable/TextArea.js +322 -0
- package/es/schema-component/antd/variable/Variable.d.ts +8 -0
- package/es/schema-component/antd/variable/Variable.js +11 -0
- package/es/schema-component/antd/variable/index.d.ts +1 -0
- package/es/schema-component/antd/variable/index.js +1 -0
- package/es/schema-component/common/sortable-item/SortableItem.js +36 -6
- package/es/schema-component/common/utils/logic.js +523 -0
- package/es/schema-component/common/utils/uitls.d.ts +1 -0
- package/es/schema-component/common/utils/uitls.js +89 -0
- package/es/schema-initializer/SchemaInitializer.js +0 -1
- package/es/schema-initializer/buttons/TableActionColumnInitializers.d.ts +1 -0
- package/es/schema-initializer/buttons/TableActionColumnInitializers.js +1 -3
- package/es/schema-initializer/index.d.ts +2 -1
- package/es/schema-initializer/index.js +2 -1
- package/es/schema-initializer/items/CalendarBlockInitializer.js +24 -41
- package/es/schema-initializer/utils.js +22 -7
- package/es/schema-settings/LinkageRules/DynamicComponent.d.ts +1 -0
- package/es/schema-settings/LinkageRules/DynamicComponent.js +113 -0
- package/es/schema-settings/LinkageRules/FilterDynamicComponent.d.ts +2 -0
- package/es/schema-settings/LinkageRules/FilterDynamicComponent.js +15 -0
- package/es/schema-settings/LinkageRules/LinkageRuleAction.d.ts +3 -0
- package/es/schema-settings/LinkageRules/LinkageRuleAction.js +162 -0
- package/es/schema-settings/LinkageRules/LinkageRuleActionGroup.d.ts +3 -0
- package/es/schema-settings/LinkageRules/LinkageRuleActionGroup.js +71 -0
- package/es/schema-settings/LinkageRules/ValueDynamicComponent.d.ts +1 -0
- package/es/schema-settings/LinkageRules/ValueDynamicComponent.js +82 -0
- package/es/schema-settings/LinkageRules/Variables.d.ts +7 -0
- package/es/schema-settings/LinkageRules/Variables.js +115 -0
- package/es/schema-settings/LinkageRules/action-hooks.d.ts +1 -0
- package/es/schema-settings/LinkageRules/action-hooks.js +115 -0
- package/es/schema-settings/LinkageRules/context.d.ts +13 -0
- package/es/schema-settings/LinkageRules/context.js +4 -0
- package/es/schema-settings/LinkageRules/index.d.ts +2 -0
- package/es/schema-settings/LinkageRules/index.js +132 -0
- package/es/schema-settings/LinkageRules/type.d.ts +13 -0
- package/es/schema-settings/LinkageRules/type.js +15 -0
- package/es/schema-settings/LinkageRules/useValues.d.ts +1 -0
- package/es/schema-settings/LinkageRules/useValues.js +84 -0
- package/es/schema-settings/SchemaSettings.d.ts +4 -1
- package/es/schema-settings/SchemaSettings.js +153 -26
- package/es/schema-templates/BlockTemplate.js +9 -1
- package/es/system-settings/SystemSettingsShortcut.js +1 -1
- package/lib/acl/ACLProvider.js +4 -7
- package/lib/api-client/APIClient.js +6 -0
- package/lib/block-provider/BlockProvider.js +9 -6
- package/lib/block-provider/FormBlockProvider.js +3 -1
- package/lib/block-provider/KanbanBlockProvider.js +1 -1
- package/lib/block-provider/SharedFilterProvider.js +9 -3
- package/lib/block-provider/TableBlockProvider.js +1 -1
- package/lib/block-provider/TableSelectorProvider.js +2 -2
- package/lib/block-provider/hooks/index.js +23 -7
- package/lib/collection-manager/CollectionManagerProvider.d.ts +1 -0
- package/lib/collection-manager/CollectionManagerProvider.js +81 -16
- package/lib/collection-manager/CollectionManagerShortcut.js +36 -23
- package/lib/collection-manager/Configuration/AddCategoryAction.d.ts +2 -0
- package/lib/collection-manager/Configuration/AddCategoryAction.js +145 -0
- package/lib/collection-manager/Configuration/AddCollectionAction.js +8 -3
- package/lib/collection-manager/Configuration/AddFieldAction.js +1 -0
- package/lib/collection-manager/Configuration/ConfigurationTable.js +34 -4
- package/lib/collection-manager/Configuration/ConfigurationTabs.d.ts +1 -0
- package/lib/collection-manager/Configuration/ConfigurationTabs.js +407 -0
- package/lib/collection-manager/Configuration/EditCategoryAction.d.ts +2 -0
- package/lib/collection-manager/Configuration/EditCategoryAction.js +178 -0
- package/lib/collection-manager/Configuration/EditCollectionAction.js +6 -2
- package/lib/collection-manager/Configuration/OverridingCollectionField.js +17 -8
- package/lib/collection-manager/Configuration/components/CollectionCategory.d.ts +2 -0
- package/lib/collection-manager/Configuration/components/CollectionCategory.js +27 -0
- 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/collections.d.ts +3 -0
- package/lib/collection-manager/Configuration/schemas/collections.js +316 -178
- package/lib/collection-manager/Configuration/templates.d.ts +1 -0
- package/lib/collection-manager/Configuration/templates.js +2 -0
- package/lib/collection-manager/action-hooks.js +3 -1
- package/lib/collection-manager/context.d.ts +4 -0
- package/lib/collection-manager/context.js +7 -2
- package/lib/collection-manager/hooks/useCollectionManager.d.ts +7 -0
- package/lib/collection-manager/hooks/useCollectionManager.js +52 -6
- package/lib/collection-manager/interfaces/m2m.js +2 -2
- package/lib/collection-manager/interfaces/properties/index.d.ts +0 -56
- package/lib/collection-manager/interfaces/properties/index.js +1 -2
- package/lib/collection-manager/templates/calendar.js +1 -1
- package/lib/collection-manager/templates/general.js +1 -1
- package/lib/collection-manager/templates/properties/index.d.ts +12 -1
- package/lib/collection-manager/templates/properties/index.js +11 -0
- package/lib/i18n/i18n.js +3 -1
- package/lib/locale/en_US.d.ts +23 -0
- package/lib/locale/en_US.js +23 -0
- package/lib/locale/ja_JP.d.ts +23 -0
- package/lib/locale/ja_JP.js +24 -1
- package/lib/locale/ru_RU.d.ts +1 -0
- package/lib/locale/ru_RU.js +1 -0
- package/lib/locale/zh_CN.d.ts +43 -4
- package/lib/locale/zh_CN.js +44 -5
- package/lib/route-switch/antd/admin-layout/index.js +13 -33
- package/lib/schema-component/antd/action/Action.Designer.js +24 -14
- package/lib/schema-component/antd/action/Action.js +27 -2
- package/lib/schema-component/antd/action/utils.d.ts +1 -0
- package/lib/schema-component/antd/action/utils.js +58 -2
- package/lib/schema-component/antd/association-filter/AssociationFilter.js +3 -3
- package/lib/schema-component/antd/association-select/AssociationSelect.d.ts +2 -2
- package/lib/schema-component/antd/association-select/useServiceOptions.js +47 -4
- package/lib/schema-component/antd/calendar/Calendar.Designer.js +15 -33
- package/lib/schema-component/antd/checkbox/Checkbox.js +8 -7
- package/lib/schema-component/antd/date-picker/util.d.ts +1 -1
- package/lib/schema-component/antd/date-picker/util.js +1 -1
- package/lib/schema-component/antd/filter/DynamicComponent.js +3 -1
- package/lib/schema-component/antd/filter/Filter.js +2 -1
- package/lib/schema-component/antd/filter/FilterGroup.js +7 -4
- package/lib/schema-component/antd/filter/FilterItem.js +3 -2
- package/lib/schema-component/antd/filter/context.d.ts +1 -0
- package/lib/schema-component/antd/filter/useValues.js +15 -11
- package/lib/schema-component/antd/form/Form.js +9 -3
- package/lib/schema-component/antd/form-item/FormItem.js +21 -7
- package/lib/schema-component/antd/form-v2/Form.Designer.js +2 -0
- package/lib/schema-component/antd/form-v2/Form.js +89 -5
- package/lib/schema-component/antd/form-v2/utils.d.ts +5 -0
- package/lib/schema-component/antd/form-v2/utils.js +181 -0
- package/lib/schema-component/antd/grid/Grid.js +10 -5
- package/lib/schema-component/antd/icon-picker/IconPicker.js +1 -0
- package/lib/schema-component/antd/index.d.ts +1 -0
- package/lib/schema-component/antd/index.js +13 -0
- package/lib/schema-component/antd/input/Input.d.ts +2 -1
- package/lib/schema-component/antd/input/Json.d.ts +5 -3
- package/lib/schema-component/antd/input/Json.js +6 -3
- package/lib/schema-component/antd/input-number/InputNumber.js +2 -0
- package/lib/schema-component/antd/page/FixedBlock.js +3 -1
- package/lib/schema-component/antd/page/Page.js +14 -5
- package/lib/schema-component/antd/page/PageTabDesigner.js +1 -1
- package/lib/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +3 -1
- package/lib/schema-component/antd/record-picker/RecordPicker.js +1 -2
- package/lib/schema-component/antd/record-picker/util.js +7 -0
- package/lib/schema-component/antd/remote-select/RemoteSelect.js +76 -37
- package/lib/schema-component/antd/rich-text/RichText.js +4 -2
- package/lib/schema-component/antd/select/Select.js +14 -4
- package/lib/schema-component/antd/table/Table.Array.js +8 -1
- package/lib/schema-component/antd/table-v2/Table.Column.Designer.js +2 -2
- package/lib/schema-component/antd/table-v2/TableBlockDesigner.js +3 -2
- package/lib/schema-component/antd/tabs/Tabs.Designer.js +1 -0
- package/lib/schema-component/antd/time-picker/TimePicker.js +1 -1
- package/lib/schema-component/antd/variable/Input.d.ts +2 -0
- package/lib/schema-component/antd/variable/Input.js +262 -0
- package/lib/schema-component/antd/variable/JSONInput.d.ts +2 -0
- package/lib/schema-component/antd/variable/JSONInput.js +100 -0
- package/lib/schema-component/antd/variable/TextArea.d.ts +2 -0
- package/lib/schema-component/antd/variable/TextArea.js +341 -0
- package/lib/schema-component/antd/variable/Variable.d.ts +8 -0
- package/lib/schema-component/antd/variable/Variable.js +25 -0
- package/lib/schema-component/antd/variable/index.d.ts +1 -0
- package/lib/schema-component/antd/variable/index.js +18 -0
- package/lib/schema-component/common/sortable-item/SortableItem.js +36 -6
- package/lib/schema-component/common/utils/logic.js +525 -0
- package/lib/schema-component/common/utils/uitls.d.ts +1 -0
- package/lib/schema-component/common/utils/uitls.js +103 -0
- package/lib/schema-initializer/SchemaInitializer.js +0 -1
- package/lib/schema-initializer/buttons/TableActionColumnInitializers.d.ts +1 -0
- package/lib/schema-initializer/buttons/TableActionColumnInitializers.js +3 -1
- package/lib/schema-initializer/index.d.ts +2 -1
- package/lib/schema-initializer/index.js +51 -2
- package/lib/schema-initializer/items/CalendarBlockInitializer.js +16 -33
- package/lib/schema-initializer/utils.js +22 -6
- package/lib/schema-settings/LinkageRules/DynamicComponent.d.ts +1 -0
- package/lib/schema-settings/LinkageRules/DynamicComponent.js +139 -0
- package/lib/schema-settings/LinkageRules/FilterDynamicComponent.d.ts +2 -0
- package/lib/schema-settings/LinkageRules/FilterDynamicComponent.js +27 -0
- package/lib/schema-settings/LinkageRules/LinkageRuleAction.d.ts +3 -0
- package/lib/schema-settings/LinkageRules/LinkageRuleAction.js +190 -0
- package/lib/schema-settings/LinkageRules/LinkageRuleActionGroup.d.ts +3 -0
- package/lib/schema-settings/LinkageRules/LinkageRuleActionGroup.js +90 -0
- package/lib/schema-settings/LinkageRules/ValueDynamicComponent.d.ts +1 -0
- package/lib/schema-settings/LinkageRules/ValueDynamicComponent.js +104 -0
- package/lib/schema-settings/LinkageRules/Variables.d.ts +7 -0
- package/lib/schema-settings/LinkageRules/Variables.js +124 -0
- package/lib/schema-settings/LinkageRules/action-hooks.d.ts +1 -0
- package/lib/schema-settings/LinkageRules/action-hooks.js +127 -0
- package/lib/schema-settings/LinkageRules/context.d.ts +13 -0
- package/lib/schema-settings/LinkageRules/context.js +15 -0
- package/lib/schema-settings/LinkageRules/index.d.ts +2 -0
- package/lib/schema-settings/LinkageRules/index.js +149 -0
- package/lib/schema-settings/LinkageRules/type.d.ts +13 -0
- package/lib/schema-settings/LinkageRules/type.js +22 -0
- package/lib/schema-settings/LinkageRules/useValues.d.ts +1 -0
- package/lib/schema-settings/LinkageRules/useValues.js +95 -0
- package/lib/schema-settings/SchemaSettings.d.ts +4 -1
- package/lib/schema-settings/SchemaSettings.js +176 -48
- package/lib/schema-templates/BlockTemplate.js +9 -1
- package/lib/system-settings/SystemSettingsShortcut.js +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CollectionCategory = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@formily/react");
|
|
9
|
+
|
|
10
|
+
var _antd = require("antd");
|
|
11
|
+
|
|
12
|
+
var _react2 = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _schemaComponent = require("../../../schema-component");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
var CollectionCategory = (0, _react.observer)(function (props) {
|
|
19
|
+
var value = props.value;
|
|
20
|
+
var compile = (0, _schemaComponent.useCompile)();
|
|
21
|
+
return /*#__PURE__*/_react2.default.createElement(_react2.default.Fragment, null, value.map(function (item) {
|
|
22
|
+
return /*#__PURE__*/_react2.default.createElement(_antd.Tag, {
|
|
23
|
+
color: item.color
|
|
24
|
+
}, compile(item === null || item === void 0 ? void 0 : item.name));
|
|
25
|
+
}));
|
|
26
|
+
});
|
|
27
|
+
exports.CollectionCategory = CollectionCategory;
|
|
@@ -9,3 +9,6 @@ export * from './OverridingCollectionField';
|
|
|
9
9
|
export * from './ViewInheritedField';
|
|
10
10
|
export * from './AddCollectionAction';
|
|
11
11
|
export * from './EditCollectionAction';
|
|
12
|
+
export * from './ConfigurationTabs';
|
|
13
|
+
export * from './AddCategoryAction';
|
|
14
|
+
export * from './EditCategoryAction';
|
|
@@ -148,6 +148,45 @@ Object.keys(_EditCollectionAction).forEach(function (key) {
|
|
|
148
148
|
}
|
|
149
149
|
});
|
|
150
150
|
});
|
|
151
|
+
|
|
152
|
+
var _ConfigurationTabs = require("./ConfigurationTabs");
|
|
153
|
+
|
|
154
|
+
Object.keys(_ConfigurationTabs).forEach(function (key) {
|
|
155
|
+
if (key === "default" || key === "__esModule") return;
|
|
156
|
+
if (key in exports && exports[key] === _ConfigurationTabs[key]) return;
|
|
157
|
+
Object.defineProperty(exports, key, {
|
|
158
|
+
enumerable: true,
|
|
159
|
+
get: function get() {
|
|
160
|
+
return _ConfigurationTabs[key];
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
var _AddCategoryAction = require("./AddCategoryAction");
|
|
166
|
+
|
|
167
|
+
Object.keys(_AddCategoryAction).forEach(function (key) {
|
|
168
|
+
if (key === "default" || key === "__esModule") return;
|
|
169
|
+
if (key in exports && exports[key] === _AddCategoryAction[key]) return;
|
|
170
|
+
Object.defineProperty(exports, key, {
|
|
171
|
+
enumerable: true,
|
|
172
|
+
get: function get() {
|
|
173
|
+
return _AddCategoryAction[key];
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
var _EditCategoryAction = require("./EditCategoryAction");
|
|
179
|
+
|
|
180
|
+
Object.keys(_EditCategoryAction).forEach(function (key) {
|
|
181
|
+
if (key === "default" || key === "__esModule") return;
|
|
182
|
+
if (key in exports && exports[key] === _EditCategoryAction[key]) return;
|
|
183
|
+
Object.defineProperty(exports, key, {
|
|
184
|
+
enumerable: true,
|
|
185
|
+
get: function get() {
|
|
186
|
+
return _EditCategoryAction[key];
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
});
|
|
151
190
|
(0, _core.registerValidateFormats)({
|
|
152
191
|
uid: /^[A-Za-z0-9][A-Za-z0-9_-]*$/
|
|
153
192
|
});
|
|
@@ -2,3 +2,6 @@ import { ISchema } from '@formily/react';
|
|
|
2
2
|
import { CollectionOptions } from '../../types';
|
|
3
3
|
export declare const collection: CollectionOptions;
|
|
4
4
|
export declare const collectionSchema: ISchema;
|
|
5
|
+
export declare const collectionTableSchema: ISchema;
|
|
6
|
+
export declare const collectionCategorySchema: ISchema;
|
|
7
|
+
export declare const collectionCategoryEditSchema: ISchema;
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.collectionSchema = exports.collection = void 0;
|
|
6
|
+
exports.collectionTableSchema = exports.collectionSchema = exports.collectionCategorySchema = exports.collectionCategoryEditSchema = exports.collection = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = require("@formily/react");
|
|
9
9
|
|
|
10
10
|
var _antd = require("antd");
|
|
11
11
|
|
|
12
|
+
var _shared = require("@formily/shared");
|
|
13
|
+
|
|
12
14
|
var _reactI18next = require("react-i18next");
|
|
13
15
|
|
|
14
16
|
var _apiClient = require("../../../api-client");
|
|
@@ -17,8 +19,14 @@ var _i18n = require("../../../i18n");
|
|
|
17
19
|
|
|
18
20
|
var _CollectionTemplate = require("../components/CollectionTemplate");
|
|
19
21
|
|
|
22
|
+
var _CollectionCategory = require("../components/CollectionCategory");
|
|
23
|
+
|
|
20
24
|
var _collectionFields = require("./collectionFields");
|
|
21
25
|
|
|
26
|
+
var _properties;
|
|
27
|
+
|
|
28
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
|
+
|
|
22
30
|
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
31
|
|
|
24
32
|
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); }); }; }
|
|
@@ -105,205 +113,335 @@ var collectionSchema = {
|
|
|
105
113
|
filter: {
|
|
106
114
|
'hidden.$isFalsy': true
|
|
107
115
|
},
|
|
108
|
-
appends: []
|
|
116
|
+
appends: ['category']
|
|
109
117
|
}
|
|
110
118
|
}
|
|
111
119
|
},
|
|
112
120
|
properties: {
|
|
113
|
-
|
|
121
|
+
tabs: {
|
|
114
122
|
type: 'void',
|
|
115
|
-
'x-component': '
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
123
|
+
'x-component': 'ConfigurationTabs'
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
exports.collectionSchema = collectionSchema;
|
|
130
|
+
var collectionTableSchema = {
|
|
131
|
+
type: 'object',
|
|
132
|
+
properties: (_properties = {}, _defineProperty(_properties, (0, _shared.uid)(), {
|
|
133
|
+
type: 'void',
|
|
134
|
+
'x-component': 'ActionBar',
|
|
135
|
+
'x-component-props': {
|
|
136
|
+
style: {
|
|
137
|
+
marginBottom: 16
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
properties: {
|
|
141
|
+
filter: {
|
|
142
|
+
type: 'void',
|
|
143
|
+
title: '{{ t("Filter") }}',
|
|
144
|
+
default: {
|
|
145
|
+
$and: [{
|
|
146
|
+
title: {
|
|
147
|
+
$includes: ''
|
|
119
148
|
}
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
149
|
+
}, {
|
|
150
|
+
name: {
|
|
151
|
+
$includes: ''
|
|
152
|
+
}
|
|
153
|
+
}]
|
|
154
|
+
},
|
|
155
|
+
'x-action': 'filter',
|
|
156
|
+
'x-component': 'Filter.Action',
|
|
157
|
+
'x-component-props': {
|
|
158
|
+
icon: 'FilterOutlined',
|
|
159
|
+
useProps: '{{ cm.useFilterActionProps }}'
|
|
160
|
+
},
|
|
161
|
+
'x-align': 'left'
|
|
162
|
+
},
|
|
163
|
+
delete: {
|
|
164
|
+
type: 'void',
|
|
165
|
+
title: '{{ t("Delete") }}',
|
|
166
|
+
'x-component': 'Action',
|
|
167
|
+
'x-component-props': {
|
|
168
|
+
icon: 'DeleteOutlined',
|
|
169
|
+
useAction: '{{ cm.useBulkDestroyActionAndRefreshCM }}',
|
|
170
|
+
confirm: {
|
|
171
|
+
title: "{{t('Delete record')}}",
|
|
172
|
+
content: "{{t('Are you sure you want to delete it?')}}"
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
create: {
|
|
177
|
+
type: 'void',
|
|
178
|
+
title: '{{ t("Create collection") }}',
|
|
179
|
+
'x-component': 'AddCollection',
|
|
180
|
+
'x-component-props': {
|
|
181
|
+
type: 'primary'
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}), _defineProperty(_properties, (0, _shared.uid)(), {
|
|
186
|
+
type: 'void',
|
|
187
|
+
'x-uid': 'input',
|
|
188
|
+
'x-component': 'Table.Void',
|
|
189
|
+
'x-component-props': {
|
|
190
|
+
rowKey: 'name',
|
|
191
|
+
rowSelection: {
|
|
192
|
+
type: 'checkbox'
|
|
193
|
+
},
|
|
194
|
+
useDataSource: '{{ cm.useDataSourceFromRAC }}',
|
|
195
|
+
useAction: function useAction() {
|
|
196
|
+
var api = (0, _apiClient.useAPIClient)();
|
|
197
|
+
|
|
198
|
+
var _useTranslation = (0, _reactI18next.useTranslation)(),
|
|
199
|
+
t = _useTranslation.t;
|
|
200
|
+
|
|
201
|
+
return {
|
|
202
|
+
move: function move(from, to) {
|
|
203
|
+
return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
204
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
205
|
+
while (1) {
|
|
206
|
+
switch (_context.prev = _context.next) {
|
|
207
|
+
case 0:
|
|
208
|
+
_context.next = 2;
|
|
209
|
+
return api.resource('collections').move({
|
|
210
|
+
sourceId: from.key,
|
|
211
|
+
targetId: to.key
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
case 2:
|
|
215
|
+
_antd.message.success(t('Saved successfully'), 0.2);
|
|
216
|
+
|
|
217
|
+
case 3:
|
|
218
|
+
case "end":
|
|
219
|
+
return _context.stop();
|
|
129
220
|
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
221
|
+
}
|
|
222
|
+
}, _callee);
|
|
223
|
+
}))();
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
properties: {
|
|
229
|
+
column1: {
|
|
230
|
+
type: 'void',
|
|
231
|
+
'x-decorator': 'Table.Column.Decorator',
|
|
232
|
+
'x-component': 'Table.Column',
|
|
233
|
+
properties: {
|
|
234
|
+
title: {
|
|
235
|
+
'x-component': 'CollectionField',
|
|
236
|
+
'x-read-pretty': true
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
column2: {
|
|
241
|
+
type: 'void',
|
|
242
|
+
'x-decorator': 'Table.Column.Decorator',
|
|
243
|
+
'x-component': 'Table.Column',
|
|
244
|
+
properties: {
|
|
245
|
+
name: {
|
|
246
|
+
type: 'string',
|
|
247
|
+
'x-component': 'CollectionField',
|
|
248
|
+
'x-read-pretty': true
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
column3: {
|
|
253
|
+
type: 'void',
|
|
254
|
+
'x-decorator': 'Table.Column.Decorator',
|
|
255
|
+
'x-component': 'Table.Column',
|
|
256
|
+
title: '{{t("Collection template")}}',
|
|
257
|
+
properties: {
|
|
258
|
+
template: {
|
|
259
|
+
'x-component': _CollectionTemplate.CollectionTemplate,
|
|
260
|
+
'x-read-pretty': true
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
column4: {
|
|
265
|
+
type: 'void',
|
|
266
|
+
'x-decorator': 'Table.Column.Decorator',
|
|
267
|
+
'x-component': 'Table.Column',
|
|
268
|
+
'x-visible': 'categoryVisible',
|
|
269
|
+
title: '{{t("Collection category")}}',
|
|
270
|
+
properties: {
|
|
271
|
+
category: {
|
|
272
|
+
'x-component': _CollectionCategory.CollectionCategory,
|
|
273
|
+
'x-read-pretty': true
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
column5: {
|
|
278
|
+
type: 'void',
|
|
279
|
+
title: '{{ t("Actions") }}',
|
|
280
|
+
'x-component': 'Table.Column',
|
|
281
|
+
properties: {
|
|
282
|
+
actions: {
|
|
283
|
+
type: 'void',
|
|
284
|
+
'x-component': 'Space',
|
|
285
|
+
'x-component-props': {
|
|
286
|
+
split: '|'
|
|
287
|
+
},
|
|
288
|
+
properties: {
|
|
289
|
+
view: {
|
|
290
|
+
type: 'void',
|
|
291
|
+
title: '{{ t("Configure fields") }}',
|
|
292
|
+
'x-component': 'Action.Link',
|
|
293
|
+
'x-component-props': {},
|
|
294
|
+
properties: {
|
|
295
|
+
drawer: {
|
|
296
|
+
type: 'void',
|
|
297
|
+
'x-component': 'Action.Drawer',
|
|
298
|
+
'x-component-props': {
|
|
299
|
+
destroyOnClose: true
|
|
300
|
+
},
|
|
301
|
+
'x-reactions': function xReactions(field) {
|
|
302
|
+
var i = field.path.segments[1];
|
|
303
|
+
var table = field.form.getValuesIn("table.".concat(i));
|
|
304
|
+
|
|
305
|
+
if (table) {
|
|
306
|
+
field.title = "".concat(compile(table.title), " - ").concat(compile('{{ t("Configure fields") }}'));
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
properties: {
|
|
310
|
+
collectionFieldSchema: _collectionFields.collectionFieldSchema
|
|
311
|
+
}
|
|
133
312
|
}
|
|
134
|
-
}
|
|
313
|
+
}
|
|
135
314
|
},
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
315
|
+
update: {
|
|
316
|
+
type: 'void',
|
|
317
|
+
title: '{{ t("Edit") }}',
|
|
318
|
+
'x-component': 'EditCollection',
|
|
319
|
+
'x-component-props': {
|
|
320
|
+
type: 'primary'
|
|
321
|
+
}
|
|
141
322
|
},
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
323
|
+
delete: {
|
|
324
|
+
type: 'void',
|
|
325
|
+
title: '{{ t("Delete") }}',
|
|
326
|
+
'x-component': 'Action.Link',
|
|
327
|
+
'x-component-props': {
|
|
328
|
+
confirm: {
|
|
329
|
+
title: "{{t('Delete record')}}",
|
|
330
|
+
content: "{{t('Are you sure you want to delete it?')}}"
|
|
331
|
+
},
|
|
332
|
+
useAction: '{{ cm.useDestroyActionAndRefreshCM }}'
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}), _properties)
|
|
341
|
+
};
|
|
342
|
+
exports.collectionTableSchema = collectionTableSchema;
|
|
343
|
+
var collectionCategorySchema = {
|
|
344
|
+
type: 'object',
|
|
345
|
+
properties: {
|
|
346
|
+
form: {
|
|
347
|
+
type: 'void',
|
|
348
|
+
'x-decorator': 'Form',
|
|
349
|
+
'x-component': 'Action.Modal',
|
|
350
|
+
title: '{{ t("Add category") }}',
|
|
351
|
+
'x-component-props': {
|
|
352
|
+
width: 520,
|
|
353
|
+
getContainer: '{{ getContainer }}'
|
|
354
|
+
},
|
|
355
|
+
properties: {
|
|
356
|
+
name: {
|
|
357
|
+
type: 'string',
|
|
358
|
+
title: '{{t("Category name")}}',
|
|
359
|
+
required: true,
|
|
360
|
+
'x-disabled': '{{ !createOnly }}',
|
|
361
|
+
'x-decorator': 'FormItem',
|
|
362
|
+
'x-component': 'Input'
|
|
363
|
+
},
|
|
364
|
+
color: {
|
|
365
|
+
type: 'string',
|
|
366
|
+
title: '{{t("Color")}}',
|
|
367
|
+
required: false,
|
|
368
|
+
'x-decorator': 'FormItem',
|
|
369
|
+
'x-component': 'ColorSelect'
|
|
370
|
+
},
|
|
371
|
+
footer: {
|
|
372
|
+
type: 'void',
|
|
373
|
+
'x-component': 'Action.Modal.Footer',
|
|
374
|
+
properties: {
|
|
375
|
+
action1: {
|
|
376
|
+
title: '{{ t("Cancel") }}',
|
|
147
377
|
'x-component': 'Action',
|
|
148
378
|
'x-component-props': {
|
|
149
|
-
|
|
150
|
-
useAction: '{{ cm.useBulkDestroyActionAndRefreshCM }}',
|
|
151
|
-
confirm: {
|
|
152
|
-
title: "{{t('Delete record')}}",
|
|
153
|
-
content: "{{t('Are you sure you want to delete it?')}}"
|
|
154
|
-
}
|
|
379
|
+
useAction: '{{ useCancelAction }}'
|
|
155
380
|
}
|
|
156
381
|
},
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
'x-component': 'AddCollection',
|
|
382
|
+
action2: {
|
|
383
|
+
title: '{{ t("Submit") }}',
|
|
384
|
+
'x-component': 'Action',
|
|
161
385
|
'x-component-props': {
|
|
162
|
-
type: 'primary'
|
|
386
|
+
type: 'primary',
|
|
387
|
+
useAction: '{{ useCreateCategry }}'
|
|
163
388
|
}
|
|
164
389
|
}
|
|
165
390
|
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
exports.collectionCategorySchema = collectionCategorySchema;
|
|
397
|
+
var collectionCategoryEditSchema = {
|
|
398
|
+
type: 'object',
|
|
399
|
+
properties: {
|
|
400
|
+
form: {
|
|
401
|
+
type: 'void',
|
|
402
|
+
'x-decorator': 'Form',
|
|
403
|
+
'x-decorator-props': {
|
|
404
|
+
useValues: '{{ useValuesFromRecord }}'
|
|
405
|
+
},
|
|
406
|
+
'x-component': 'Action.Modal',
|
|
407
|
+
title: '{{ t("Edit category") }}',
|
|
408
|
+
'x-component-props': {
|
|
409
|
+
width: 520,
|
|
410
|
+
getContainer: '{{ getContainer }}'
|
|
411
|
+
},
|
|
412
|
+
properties: {
|
|
413
|
+
name: {
|
|
414
|
+
type: 'string',
|
|
415
|
+
title: '{{t("Category name")}}',
|
|
416
|
+
required: true,
|
|
417
|
+
'x-disabled': '{{ !createOnly }}',
|
|
418
|
+
'x-decorator': 'FormItem',
|
|
419
|
+
'x-component': 'Input'
|
|
420
|
+
},
|
|
421
|
+
color: {
|
|
422
|
+
type: 'string',
|
|
423
|
+
title: '{{t("Color")}}',
|
|
424
|
+
required: false,
|
|
425
|
+
'x-decorator': 'FormItem',
|
|
426
|
+
'x-component': 'ColorSelect'
|
|
166
427
|
},
|
|
167
|
-
|
|
428
|
+
footer: {
|
|
168
429
|
type: 'void',
|
|
169
|
-
'x-
|
|
170
|
-
'x-component': 'Table.Void',
|
|
171
|
-
'x-component-props': {
|
|
172
|
-
rowKey: 'name',
|
|
173
|
-
rowSelection: {
|
|
174
|
-
type: 'checkbox'
|
|
175
|
-
},
|
|
176
|
-
useDataSource: '{{ cm.useDataSourceFromRAC }}',
|
|
177
|
-
useAction: function useAction() {
|
|
178
|
-
var api = (0, _apiClient.useAPIClient)();
|
|
179
|
-
|
|
180
|
-
var _useTranslation = (0, _reactI18next.useTranslation)(),
|
|
181
|
-
t = _useTranslation.t;
|
|
182
|
-
|
|
183
|
-
return {
|
|
184
|
-
move: function move(from, to) {
|
|
185
|
-
return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
186
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
187
|
-
while (1) {
|
|
188
|
-
switch (_context.prev = _context.next) {
|
|
189
|
-
case 0:
|
|
190
|
-
console.log(from, to);
|
|
191
|
-
_context.next = 3;
|
|
192
|
-
return api.resource('collections').move({
|
|
193
|
-
sourceId: from.key,
|
|
194
|
-
targetId: to.key
|
|
195
|
-
});
|
|
196
|
-
|
|
197
|
-
case 3:
|
|
198
|
-
_antd.message.success(t('Saved successfully'), 0.2);
|
|
199
|
-
|
|
200
|
-
case 4:
|
|
201
|
-
case "end":
|
|
202
|
-
return _context.stop();
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}, _callee);
|
|
206
|
-
}))();
|
|
207
|
-
}
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
},
|
|
430
|
+
'x-component': 'Action.Modal.Footer',
|
|
211
431
|
properties: {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
'x-
|
|
215
|
-
'x-component':
|
|
216
|
-
|
|
217
|
-
title: {
|
|
218
|
-
'x-component': 'CollectionField',
|
|
219
|
-
'x-read-pretty': true
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
column2: {
|
|
224
|
-
type: 'void',
|
|
225
|
-
'x-decorator': 'Table.Column.Decorator',
|
|
226
|
-
'x-component': 'Table.Column',
|
|
227
|
-
properties: {
|
|
228
|
-
name: {
|
|
229
|
-
type: 'string',
|
|
230
|
-
'x-component': 'CollectionField',
|
|
231
|
-
'x-read-pretty': true
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
},
|
|
235
|
-
column3: {
|
|
236
|
-
type: 'void',
|
|
237
|
-
'x-decorator': 'Table.Column.Decorator',
|
|
238
|
-
'x-component': 'Table.Column',
|
|
239
|
-
title: '{{t("Collection template")}}',
|
|
240
|
-
properties: {
|
|
241
|
-
template: {
|
|
242
|
-
'x-component': _CollectionTemplate.CollectionTemplate,
|
|
243
|
-
'x-read-pretty': true
|
|
244
|
-
}
|
|
432
|
+
action1: {
|
|
433
|
+
title: '{{ t("Cancel") }}',
|
|
434
|
+
'x-component': 'Action',
|
|
435
|
+
'x-component-props': {
|
|
436
|
+
useAction: '{{ useCancelAction }}'
|
|
245
437
|
}
|
|
246
438
|
},
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
'x-component':
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
type: 'void',
|
|
254
|
-
'x-component': 'Space',
|
|
255
|
-
'x-component-props': {
|
|
256
|
-
split: '|'
|
|
257
|
-
},
|
|
258
|
-
properties: {
|
|
259
|
-
view: {
|
|
260
|
-
type: 'void',
|
|
261
|
-
title: '{{ t("Configure fields") }}',
|
|
262
|
-
'x-component': 'Action.Link',
|
|
263
|
-
'x-component-props': {},
|
|
264
|
-
properties: {
|
|
265
|
-
drawer: {
|
|
266
|
-
type: 'void',
|
|
267
|
-
'x-component': 'Action.Drawer',
|
|
268
|
-
'x-component-props': {
|
|
269
|
-
destroyOnClose: true
|
|
270
|
-
},
|
|
271
|
-
'x-reactions': function xReactions(field) {
|
|
272
|
-
var i = field.path.segments[1];
|
|
273
|
-
var table = field.form.getValuesIn("table.".concat(i));
|
|
274
|
-
|
|
275
|
-
if (table) {
|
|
276
|
-
field.title = "".concat(compile(table.title), " - ").concat(compile('{{ t("Configure fields") }}'));
|
|
277
|
-
}
|
|
278
|
-
},
|
|
279
|
-
properties: {
|
|
280
|
-
collectionFieldSchema: _collectionFields.collectionFieldSchema
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
update: {
|
|
286
|
-
type: 'void',
|
|
287
|
-
title: '{{ t("Edit") }}',
|
|
288
|
-
'x-component': 'EditCollection',
|
|
289
|
-
'x-component-props': {
|
|
290
|
-
type: 'primary'
|
|
291
|
-
}
|
|
292
|
-
},
|
|
293
|
-
delete: {
|
|
294
|
-
type: 'void',
|
|
295
|
-
title: '{{ t("Delete") }}',
|
|
296
|
-
'x-component': 'Action.Link',
|
|
297
|
-
'x-component-props': {
|
|
298
|
-
confirm: {
|
|
299
|
-
title: "{{t('Delete record')}}",
|
|
300
|
-
content: "{{t('Are you sure you want to delete it?')}}"
|
|
301
|
-
},
|
|
302
|
-
useAction: '{{ cm.useDestroyActionAndRefreshCM }}'
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
}
|
|
439
|
+
action2: {
|
|
440
|
+
title: '{{ t("Submit") }}',
|
|
441
|
+
'x-component': 'Action',
|
|
442
|
+
'x-component-props': {
|
|
443
|
+
type: 'primary',
|
|
444
|
+
useAction: '{{ useEditCategry }}'
|
|
307
445
|
}
|
|
308
446
|
}
|
|
309
447
|
}
|
|
@@ -312,4 +450,4 @@ var collectionSchema = {
|
|
|
312
450
|
}
|
|
313
451
|
}
|
|
314
452
|
};
|
|
315
|
-
exports.
|
|
453
|
+
exports.collectionCategoryEditSchema = collectionCategoryEditSchema;
|
|
@@ -54,5 +54,6 @@ export declare const templates: Map<string, import("@formily/react").Stringify<{
|
|
|
54
54
|
"x-read-only"?: boolean;
|
|
55
55
|
"x-read-pretty"?: boolean;
|
|
56
56
|
}>>;
|
|
57
|
+
export declare const collectionTemplates: any;
|
|
57
58
|
export declare function registerTemplate(key: string, schema: any): void;
|
|
58
59
|
export declare const templateOptions: () => any[];
|
|
@@ -5,6 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
+
exports.collectionTemplates = void 0;
|
|
8
9
|
exports.registerTemplate = registerTemplate;
|
|
9
10
|
exports.templates = exports.templateOptions = void 0;
|
|
10
11
|
|
|
@@ -23,6 +24,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
23
24
|
var templates = new Map();
|
|
24
25
|
exports.templates = templates;
|
|
25
26
|
var collectionTemplates = {};
|
|
27
|
+
exports.collectionTemplates = collectionTemplates;
|
|
26
28
|
|
|
27
29
|
function registerTemplate(key, schema) {
|
|
28
30
|
collectionTemplates[key] = schema;
|
|
@@ -794,6 +794,8 @@ var useBulkDestroyActionAndRefreshCM = function useBulkDestroyActionAndRefreshCM
|
|
|
794
794
|
exports.useBulkDestroyActionAndRefreshCM = useBulkDestroyActionAndRefreshCM;
|
|
795
795
|
|
|
796
796
|
var useFilterActionProps = function useFilterActionProps() {
|
|
797
|
+
var _service$state, _service$state$params;
|
|
798
|
+
|
|
797
799
|
var _useResourceContext8 = (0, _ResourceActionProvider.useResourceContext)(),
|
|
798
800
|
collection = _useResourceContext8.collection;
|
|
799
801
|
|
|
@@ -801,7 +803,7 @@ var useFilterActionProps = function useFilterActionProps() {
|
|
|
801
803
|
var service = (0, _ResourceActionProvider.useResourceActionContext)();
|
|
802
804
|
return (0, _useFilterActionProps.useFilterFieldProps)({
|
|
803
805
|
options: options,
|
|
804
|
-
params: service.params,
|
|
806
|
+
params: ((_service$state = service.state) === null || _service$state === void 0 ? void 0 : (_service$state$params = _service$state.params) === null || _service$state$params === void 0 ? void 0 : _service$state$params[0]) || service.params,
|
|
805
807
|
service: service
|
|
806
808
|
});
|
|
807
809
|
};
|