@nocobase/client 0.9.0-alpha.2 → 0.9.1-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.js +7 -8
- package/es/api-client/APIClient.js +6 -0
- package/es/block-provider/BlockProvider.js +9 -6
- package/es/block-provider/FormBlockProvider.js +18 -9
- 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.d.ts +4 -0
- package/es/collection-manager/action-hooks.js +26 -12
- 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 +52 -7
- 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 +28 -15
- package/es/schema-component/antd/action/Action.js +28 -5
- 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 +94 -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/g2plot/G2Plot.js +3 -1
- 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/ReadPretty.js +1 -1
- 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.d.ts +2 -0
- package/es/schema-component/antd/remote-select/RemoteSelect.js +78 -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/tabs/Tabs.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 +9 -4
- package/es/schema-initializer/buttons/BlockInitializers.d.ts +2 -184
- package/es/schema-initializer/buttons/BlockInitializers.js +1 -102
- package/es/schema-initializer/buttons/RecordBlockInitializers.js +72 -16
- package/es/schema-initializer/buttons/TableActionColumnInitializers.d.ts +1 -0
- package/es/schema-initializer/buttons/TableActionColumnInitializers.js +1 -3
- package/es/schema-initializer/components/CreateRecordAction.d.ts +3 -0
- package/es/schema-initializer/components/CreateRecordAction.js +174 -0
- package/es/schema-initializer/components/index.d.ts +1 -0
- package/es/schema-initializer/components/index.js +2 -1
- 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/items/CreateActionInitializer.js +3 -3
- package/es/schema-initializer/items/RecordFormBlockInitializer.js +9 -9
- package/es/schema-initializer/items/index.d.ts +4 -4
- package/es/schema-initializer/items/index.js +6 -6
- package/es/schema-initializer/utils.js +22 -7
- package/es/schema-settings/EnableChildCollections/index.d.ts +2 -0
- package/es/schema-settings/EnableChildCollections/index.js +141 -0
- 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 +219 -26
- package/es/schema-templates/BlockTemplate.js +9 -1
- package/es/system-settings/SystemSettingsShortcut.js +1 -1
- package/lib/acl/ACLProvider.js +7 -8
- package/lib/api-client/APIClient.js +6 -0
- package/lib/block-provider/BlockProvider.js +9 -6
- package/lib/block-provider/FormBlockProvider.js +17 -8
- 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.d.ts +4 -0
- package/lib/collection-manager/action-hooks.js +30 -13
- 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 +30 -14
- package/lib/schema-component/antd/action/Action.js +29 -3
- 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 +93 -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/g2plot/G2Plot.js +3 -1
- 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/ReadPretty.js +1 -1
- 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.d.ts +2 -0
- package/lib/schema-component/antd/remote-select/RemoteSelect.js +78 -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/tabs/Tabs.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 +9 -4
- package/lib/schema-initializer/buttons/BlockInitializers.d.ts +2 -184
- package/lib/schema-initializer/buttons/BlockInitializers.js +0 -108
- package/lib/schema-initializer/buttons/RecordBlockInitializers.js +72 -16
- package/lib/schema-initializer/buttons/TableActionColumnInitializers.d.ts +1 -0
- package/lib/schema-initializer/buttons/TableActionColumnInitializers.js +3 -1
- package/lib/schema-initializer/components/CreateRecordAction.d.ts +3 -0
- package/lib/schema-initializer/components/CreateRecordAction.js +199 -0
- package/lib/schema-initializer/components/index.d.ts +1 -0
- package/lib/schema-initializer/components/index.js +13 -0
- 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/items/CreateActionInitializer.js +3 -3
- package/lib/schema-initializer/items/RecordFormBlockInitializer.js +3 -3
- package/lib/schema-initializer/items/index.d.ts +4 -4
- package/lib/schema-initializer/items/index.js +52 -52
- package/lib/schema-initializer/utils.js +22 -6
- package/lib/schema-settings/EnableChildCollections/index.d.ts +2 -0
- package/lib/schema-settings/EnableChildCollections/index.js +156 -0
- 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 +243 -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,181 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.evaluate = evaluate;
|
|
9
|
+
exports.linkageMergeAction = void 0;
|
|
10
|
+
|
|
11
|
+
var _lodash = require("lodash");
|
|
12
|
+
|
|
13
|
+
var functions = _interopRequireWildcard(require("@formulajs/formulajs"));
|
|
14
|
+
|
|
15
|
+
var _uitls = require("../../common/utils/uitls");
|
|
16
|
+
|
|
17
|
+
var _type = require("../../../schema-settings/LinkageRules/type");
|
|
18
|
+
|
|
19
|
+
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
|
+
|
|
21
|
+
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; }
|
|
22
|
+
|
|
23
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
24
|
+
|
|
25
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
26
|
+
|
|
27
|
+
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; }
|
|
28
|
+
|
|
29
|
+
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
|
30
|
+
|
|
31
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
32
|
+
|
|
33
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
34
|
+
|
|
35
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
36
|
+
|
|
37
|
+
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."); }
|
|
38
|
+
|
|
39
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
40
|
+
|
|
41
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
42
|
+
|
|
43
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
44
|
+
|
|
45
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
46
|
+
|
|
47
|
+
function now() {
|
|
48
|
+
return new Date();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
var fnNames = Object.keys(functions).filter(function (key) {
|
|
52
|
+
return key !== 'default';
|
|
53
|
+
});
|
|
54
|
+
var fns = fnNames.map(function (key) {
|
|
55
|
+
return functions[key];
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
function formula(expression) {
|
|
59
|
+
var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
60
|
+
|
|
61
|
+
try {
|
|
62
|
+
var fn = _construct(Function, _toConsumableArray(fnNames).concat(_toConsumableArray(Object.keys(scope)), ["return ".concat(expression)]));
|
|
63
|
+
|
|
64
|
+
var result = fn.apply(void 0, _toConsumableArray(fns).concat(_toConsumableArray(Object.values(scope))));
|
|
65
|
+
|
|
66
|
+
if (typeof result === 'number') {
|
|
67
|
+
if (Number.isNaN(result) || !Number.isFinite(result)) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return functions.ROUND(result, 9);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (typeof result === 'function') {
|
|
75
|
+
return result();
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return result;
|
|
79
|
+
} catch (error) {
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function evaluate(expression) {
|
|
85
|
+
var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
86
|
+
|
|
87
|
+
var mergeScope = _objectSpread(_objectSpread({}, scope), {}, {
|
|
88
|
+
now: now
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
var exp = expression.trim().replace(/{{\s*([^{}]+)\s*}}/g, function (_, v) {
|
|
92
|
+
var item = (0, _lodash.get)(scope, v);
|
|
93
|
+
var key = v.replace(/\.(\d+)/g, '["$1"]');
|
|
94
|
+
return " ".concat(typeof item === 'function' ? item() : key, " ");
|
|
95
|
+
});
|
|
96
|
+
return formula(exp, mergeScope);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
var linkageMergeAction = function linkageMergeAction(_ref, field, condition, values) {
|
|
100
|
+
var _field$linkagePropert, _field$initProperty, _field$linkagePropert2, _field$initProperty2, _field$linkagePropert3, _field$initProperty3, _field$linkagePropert4, _field$initProperty4, _field$linkagePropert5, _field$linkagePropert6, _field$linkagePropert7;
|
|
101
|
+
|
|
102
|
+
var operator = _ref.operator,
|
|
103
|
+
value = _ref.value;
|
|
104
|
+
var requiredResult = (field === null || field === void 0 ? void 0 : (_field$linkagePropert = field.linkageProperty) === null || _field$linkagePropert === void 0 ? void 0 : _field$linkagePropert.required) || [(field === null || field === void 0 ? void 0 : (_field$initProperty = field.initProperty) === null || _field$initProperty === void 0 ? void 0 : _field$initProperty.required) || false];
|
|
105
|
+
var displayResult = (field === null || field === void 0 ? void 0 : (_field$linkagePropert2 = field.linkageProperty) === null || _field$linkagePropert2 === void 0 ? void 0 : _field$linkagePropert2.display) || [field === null || field === void 0 ? void 0 : (_field$initProperty2 = field.initProperty) === null || _field$initProperty2 === void 0 ? void 0 : _field$initProperty2.display];
|
|
106
|
+
var patternResult = (field === null || field === void 0 ? void 0 : (_field$linkagePropert3 = field.linkageProperty) === null || _field$linkagePropert3 === void 0 ? void 0 : _field$linkagePropert3.pattern) || [field === null || field === void 0 ? void 0 : (_field$initProperty3 = field.initProperty) === null || _field$initProperty3 === void 0 ? void 0 : _field$initProperty3.pattern];
|
|
107
|
+
var valueResult = (field === null || field === void 0 ? void 0 : (_field$linkagePropert4 = field.linkageProperty) === null || _field$linkagePropert4 === void 0 ? void 0 : _field$linkagePropert4.value) || [field.value || (field === null || field === void 0 ? void 0 : (_field$initProperty4 = field.initProperty) === null || _field$initProperty4 === void 0 ? void 0 : _field$initProperty4.value)];
|
|
108
|
+
|
|
109
|
+
switch (operator) {
|
|
110
|
+
case _type.ActionType.Required:
|
|
111
|
+
if ((0, _uitls.conditionAnalyse)(condition, values)) {
|
|
112
|
+
requiredResult.push(true);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
field.linkageProperty = _objectSpread(_objectSpread({}, field.linkageProperty), {}, {
|
|
116
|
+
required: requiredResult
|
|
117
|
+
});
|
|
118
|
+
field.required = (0, _lodash.last)((_field$linkagePropert5 = field.linkageProperty) === null || _field$linkagePropert5 === void 0 ? void 0 : _field$linkagePropert5.required);
|
|
119
|
+
break;
|
|
120
|
+
|
|
121
|
+
case _type.ActionType.InRequired:
|
|
122
|
+
if ((0, _uitls.conditionAnalyse)(condition, values)) {
|
|
123
|
+
requiredResult.push(false);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
field.linkageProperty = _objectSpread(_objectSpread({}, field.linkageProperty), {}, {
|
|
127
|
+
required: requiredResult
|
|
128
|
+
});
|
|
129
|
+
field.required = (0, _lodash.last)((_field$linkagePropert6 = field.linkageProperty) === null || _field$linkagePropert6 === void 0 ? void 0 : _field$linkagePropert6.required);
|
|
130
|
+
break;
|
|
131
|
+
|
|
132
|
+
case _type.ActionType.Visible:
|
|
133
|
+
case _type.ActionType.None:
|
|
134
|
+
case _type.ActionType.Hidden:
|
|
135
|
+
if ((0, _uitls.conditionAnalyse)(condition, values)) {
|
|
136
|
+
displayResult.push(operator);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
field.linkageProperty = _objectSpread(_objectSpread({}, field.linkageProperty), {}, {
|
|
140
|
+
display: displayResult
|
|
141
|
+
});
|
|
142
|
+
field.display = (0, _lodash.last)((_field$linkagePropert7 = field.linkageProperty) === null || _field$linkagePropert7 === void 0 ? void 0 : _field$linkagePropert7.display);
|
|
143
|
+
break;
|
|
144
|
+
|
|
145
|
+
case _type.ActionType.Editable:
|
|
146
|
+
case _type.ActionType.ReadOnly:
|
|
147
|
+
case _type.ActionType.ReadPretty:
|
|
148
|
+
if ((0, _uitls.conditionAnalyse)(condition, values)) {
|
|
149
|
+
patternResult.push(operator);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
field.linkageProperty = _objectSpread(_objectSpread({}, field.linkageProperty), {}, {
|
|
153
|
+
pattern: patternResult
|
|
154
|
+
});
|
|
155
|
+
field.pattern = (0, _lodash.last)(field.linkageProperty.pattern);
|
|
156
|
+
break;
|
|
157
|
+
|
|
158
|
+
case _type.ActionType.Value:
|
|
159
|
+
if ((0, _uitls.conditionAnalyse)(condition, values)) {
|
|
160
|
+
if ((value === null || value === void 0 ? void 0 : value.mode) === 'express') {
|
|
161
|
+
var result = evaluate(value.result || value.value, values);
|
|
162
|
+
valueResult.push(result);
|
|
163
|
+
} else {
|
|
164
|
+
valueResult.push((value === null || value === void 0 ? void 0 : value.value) || value);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
field.linkageProperty = _objectSpread(_objectSpread({}, field.linkageProperty), {}, {
|
|
169
|
+
value: valueResult
|
|
170
|
+
});
|
|
171
|
+
setTimeout(function () {
|
|
172
|
+
return field.value = (0, _lodash.last)(valueResult) === undefined ? field.value : (0, _lodash.last)(valueResult);
|
|
173
|
+
});
|
|
174
|
+
break;
|
|
175
|
+
|
|
176
|
+
default:
|
|
177
|
+
return null;
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
exports.linkageMergeAction = linkageMergeAction;
|
|
@@ -91,8 +91,10 @@ var G2PlotRenderer = /*#__PURE__*/(0, _react2.forwardRef)(function (props, ref)
|
|
|
91
91
|
if (plotRef.current) {
|
|
92
92
|
plotRef.current.update(config);
|
|
93
93
|
} else {
|
|
94
|
+
var _plotRef$current;
|
|
95
|
+
|
|
94
96
|
plotRef.current = new plot(containerRef.current, config);
|
|
95
|
-
plotRef.current.render();
|
|
97
|
+
plotRef === null || plotRef === void 0 ? void 0 : (_plotRef$current = plotRef.current) === null || _plotRef$current === void 0 ? void 0 : _plotRef$current.render();
|
|
96
98
|
}
|
|
97
99
|
|
|
98
100
|
syncRef(plotRef, ref);
|
|
@@ -423,15 +423,20 @@ Grid.Row = (0, _react.observer)(function (props) {
|
|
|
423
423
|
})));
|
|
424
424
|
});
|
|
425
425
|
Grid.Col = (0, _react.observer)(function (props) {
|
|
426
|
-
var _schema$xComponentP;
|
|
427
|
-
|
|
428
426
|
var _useContext = (0, _react2.useContext)(GridRowContext),
|
|
429
|
-
cols = _useContext.cols
|
|
427
|
+
_useContext$cols = _useContext.cols,
|
|
428
|
+
cols = _useContext$cols === void 0 ? [] : _useContext$cols;
|
|
430
429
|
|
|
431
430
|
var schema = (0, _react.useFieldSchema)();
|
|
432
431
|
var field = (0, _react.useField)();
|
|
433
|
-
var
|
|
434
|
-
|
|
432
|
+
var width = '100%';
|
|
433
|
+
|
|
434
|
+
if (cols === null || cols === void 0 ? void 0 : cols.length) {
|
|
435
|
+
var _schema$xComponentP;
|
|
436
|
+
|
|
437
|
+
var w = (schema === null || schema === void 0 ? void 0 : (_schema$xComponentP = schema['x-component-props']) === null || _schema$xComponentP === void 0 ? void 0 : _schema$xComponentP['width']) || 100 / cols.length;
|
|
438
|
+
width = "calc(".concat(w, "% - 24px - 24px / ").concat(cols.length, ")");
|
|
439
|
+
}
|
|
435
440
|
|
|
436
441
|
var _useDroppable3 = (0, _core.useDroppable)({
|
|
437
442
|
id: field.address.toString(),
|
|
@@ -498,4 +498,17 @@ Object.keys(_upload).forEach(function (key) {
|
|
|
498
498
|
});
|
|
499
499
|
});
|
|
500
500
|
|
|
501
|
+
var _variable = require("./variable");
|
|
502
|
+
|
|
503
|
+
Object.keys(_variable).forEach(function (key) {
|
|
504
|
+
if (key === "default" || key === "__esModule") return;
|
|
505
|
+
if (key in exports && exports[key] === _variable[key]) return;
|
|
506
|
+
Object.defineProperty(exports, key, {
|
|
507
|
+
enumerable: true,
|
|
508
|
+
get: function get() {
|
|
509
|
+
return _variable[key];
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
});
|
|
513
|
+
|
|
501
514
|
require("./index.less");
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { InputProps, TextAreaProps } from 'antd/lib/input';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { JSONTextAreaProps } from './Json';
|
|
3
4
|
declare type ComposedInput = React.FC<InputProps> & {
|
|
4
5
|
TextArea?: React.FC<TextAreaProps>;
|
|
5
6
|
URL?: React.FC<InputProps>;
|
|
6
|
-
JSON?: React.FC<
|
|
7
|
+
JSON?: React.FC<JSONTextAreaProps>;
|
|
7
8
|
};
|
|
8
9
|
export declare const Input: ComposedInput;
|
|
9
10
|
export default Input;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import React, { Ref } from 'react';
|
|
2
2
|
import { TextAreaProps } from 'antd/lib/input';
|
|
3
|
-
export declare
|
|
3
|
+
export declare type JSONTextAreaProps = TextAreaProps & {
|
|
4
|
+
ref: Ref<any>;
|
|
4
5
|
value: any;
|
|
5
6
|
space: number;
|
|
6
|
-
}
|
|
7
|
+
};
|
|
8
|
+
export declare const Json: React.ForwardRefExoticComponent<React.RefAttributes<React.Ref<any>>>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.Json =
|
|
6
|
+
exports.Json = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -25,7 +25,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
25
25
|
|
|
26
26
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
var Json = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
29
29
|
var value = _ref.value,
|
|
30
30
|
_onChange = _ref.onChange,
|
|
31
31
|
_ref$space = _ref.space,
|
|
@@ -34,6 +34,7 @@ function Json(_ref) {
|
|
|
34
34
|
|
|
35
35
|
var field = (0, _react2.useField)();
|
|
36
36
|
return /*#__PURE__*/_react.default.createElement(_antd.Input.TextArea, _objectSpread(_objectSpread({}, props), {}, {
|
|
37
|
+
ref: ref,
|
|
37
38
|
defaultValue: value != null ? JSON.stringify(value, null, space) : '',
|
|
38
39
|
onChange: function onChange(ev) {
|
|
39
40
|
try {
|
|
@@ -50,4 +51,6 @@ function Json(_ref) {
|
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
}));
|
|
53
|
-
}
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
exports.Json = Json;
|
|
@@ -128,7 +128,7 @@ ReadPretty.JSON = function (props) {
|
|
|
128
128
|
|
|
129
129
|
var prefixCls = (0, _builtins__.usePrefixCls)('json', props);
|
|
130
130
|
return /*#__PURE__*/_react.default.createElement("pre", {
|
|
131
|
-
className: (0, _css.cx)(prefixCls, props.className, (0, _css.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-bottom: 0;\n "])))),
|
|
131
|
+
className: (0, _css.cx)(prefixCls, props.className, (0, _css.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-bottom: 0;\n line-height: 1.5;\n font-size: 90%;\n "])))),
|
|
132
132
|
style: props.style
|
|
133
133
|
}, props.value != null ? JSON.stringify(props.value, null, (_props$space = props.space) !== null && _props$space !== void 0 ? _props$space : 2) : '');
|
|
134
134
|
};
|
|
@@ -31,6 +31,8 @@ var InputNumber = (0, _react.connect)(function (props) {
|
|
|
31
31
|
var onChange = props.onChange,
|
|
32
32
|
others = _objectWithoutProperties(props, _excluded);
|
|
33
33
|
|
|
34
|
+
var field = (0, _react.useField)();
|
|
35
|
+
|
|
34
36
|
var handleChange = function handleChange(v) {
|
|
35
37
|
onChange(parseFloat(v));
|
|
36
38
|
};
|
|
@@ -117,13 +117,15 @@ var useFixedBlockDesignerSetting = function useFixedBlockDesignerSetting() {
|
|
|
117
117
|
|
|
118
118
|
var record = (0, _recordProvider.useRecord)();
|
|
119
119
|
return (0, _react.useMemo)(function () {
|
|
120
|
+
var _fieldSchema$xDecora3;
|
|
121
|
+
|
|
120
122
|
if (Object.keys(record).length) {
|
|
121
123
|
return;
|
|
122
124
|
}
|
|
123
125
|
|
|
124
126
|
return /*#__PURE__*/_react.default.createElement(_schemaSettings.SchemaSettings.SwitchItem, {
|
|
125
127
|
title: t('Fix block'),
|
|
126
|
-
checked: fieldSchema['x-decorator-props']
|
|
128
|
+
checked: (_fieldSchema$xDecora3 = fieldSchema['x-decorator-props']) === null || _fieldSchema$xDecora3 === void 0 ? void 0 : _fieldSchema$xDecora3.fixedBlock,
|
|
127
129
|
onChange: function () {
|
|
128
130
|
var _onChange = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(fixedBlock) {
|
|
129
131
|
var _schema;
|
|
@@ -7,6 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.Page = void 0;
|
|
9
9
|
|
|
10
|
+
var _icons = require("@ant-design/icons");
|
|
11
|
+
|
|
10
12
|
var _css = require("@emotion/css");
|
|
11
13
|
|
|
12
14
|
var _antd = require("@formily/antd");
|
|
@@ -27,6 +29,10 @@ var _documentTitle = require("../../../document-title");
|
|
|
27
29
|
|
|
28
30
|
var _icon = require("../../../icon");
|
|
29
31
|
|
|
32
|
+
var _common = require("../../common");
|
|
33
|
+
|
|
34
|
+
var _sortableItem = require("../../common/sortable-item");
|
|
35
|
+
|
|
30
36
|
var _core = require("../../core");
|
|
31
37
|
|
|
32
38
|
var _hooks = require("../../hooks");
|
|
@@ -140,7 +146,7 @@ var Page = function Page(props) {
|
|
|
140
146
|
ghost: false,
|
|
141
147
|
title: hidePageTitle ? undefined : fieldSchema.title || compile(title)
|
|
142
148
|
}, others), {}, {
|
|
143
|
-
footer: enablePageTabs && /*#__PURE__*/_react2.default.createElement(_antd2.Tabs, {
|
|
149
|
+
footer: enablePageTabs && /*#__PURE__*/_react2.default.createElement(_common.DndContext, null, /*#__PURE__*/_react2.default.createElement(_antd2.Tabs, {
|
|
144
150
|
size: 'small',
|
|
145
151
|
activeKey: activeKey,
|
|
146
152
|
onTabClick: function onTabClick(activeKey) {
|
|
@@ -152,7 +158,8 @@ var Page = function Page(props) {
|
|
|
152
158
|
}, 50);
|
|
153
159
|
},
|
|
154
160
|
tabBarExtraContent: dn.designable && /*#__PURE__*/_react2.default.createElement(_antd2.Button, {
|
|
155
|
-
|
|
161
|
+
icon: /*#__PURE__*/_react2.default.createElement(_icons.PlusOutlined, null),
|
|
162
|
+
className: (0, _css.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-color: rgb(241, 139, 98) !important;\n color: rgb(241, 139, 98) !important;\n "]))),
|
|
156
163
|
type: 'dashed',
|
|
157
164
|
onClick: function () {
|
|
158
165
|
var _onClick = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
@@ -215,10 +222,12 @@ var Page = function Page(props) {
|
|
|
215
222
|
|
|
216
223
|
return onClick;
|
|
217
224
|
}()
|
|
218
|
-
},
|
|
225
|
+
}, t('Add tab'))
|
|
219
226
|
}, fieldSchema.mapProperties(function (schema) {
|
|
220
227
|
return /*#__PURE__*/_react2.default.createElement(_antd2.Tabs.TabPane, {
|
|
221
|
-
tab: /*#__PURE__*/_react2.default.createElement(
|
|
228
|
+
tab: /*#__PURE__*/_react2.default.createElement(_sortableItem.SortableItem, {
|
|
229
|
+
id: schema.name,
|
|
230
|
+
schema: schema,
|
|
222
231
|
className: (0, _classnames.default)('nb-action-link', designerCss, props.className)
|
|
223
232
|
}, schema['x-icon'] && /*#__PURE__*/_react2.default.createElement(_icon.Icon, {
|
|
224
233
|
style: {
|
|
@@ -230,7 +239,7 @@ var Page = function Page(props) {
|
|
|
230
239
|
})),
|
|
231
240
|
key: schema.name
|
|
232
241
|
});
|
|
233
|
-
}))
|
|
242
|
+
})))
|
|
234
243
|
}))), /*#__PURE__*/_react2.default.createElement("div", {
|
|
235
244
|
style: {
|
|
236
245
|
margin: 24
|
|
@@ -156,7 +156,7 @@ var PageTabDesigner = function PageTabDesigner(_ref3) {
|
|
|
156
156
|
}, /*#__PURE__*/_react2.default.createElement(_antd.Space, {
|
|
157
157
|
size: 2,
|
|
158
158
|
align: 'center'
|
|
159
|
-
}, /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings, {
|
|
159
|
+
}, /*#__PURE__*/_react2.default.createElement(_.DragHandler, null, /*#__PURE__*/_react2.default.createElement(_icons.DragOutlined, null)), /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings, {
|
|
160
160
|
title: /*#__PURE__*/_react2.default.createElement(_icons.MenuOutlined, {
|
|
161
161
|
style: {
|
|
162
162
|
cursor: 'pointer',
|
|
@@ -56,6 +56,8 @@ var toValue = function toValue(value, placeholder) {
|
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
var ReadPrettyRecordPicker = (0, _react.observer)(function (props) {
|
|
59
|
+
var _collectionField$targ;
|
|
60
|
+
|
|
59
61
|
var ellipsis = props.ellipsis;
|
|
60
62
|
var fieldSchema = (0, _react.useFieldSchema)();
|
|
61
63
|
var recordCtx = (0, _recordProvider.useRecord)();
|
|
@@ -147,7 +149,7 @@ var ReadPrettyRecordPicker = (0, _react.observer)(function (props) {
|
|
|
147
149
|
return collectionField ? /*#__PURE__*/_react2.default.createElement("div", null, /*#__PURE__*/_react2.default.createElement(_blockProvider.BlockAssociationContext.Provider, {
|
|
148
150
|
value: "".concat(collectionField.collectionName, ".").concat(collectionField.name)
|
|
149
151
|
}, /*#__PURE__*/_react2.default.createElement(_collectionManager.CollectionProvider, {
|
|
150
|
-
name: collectionField.target
|
|
152
|
+
name: (_collectionField$targ = collectionField.target) !== null && _collectionField$targ !== void 0 ? _collectionField$targ : collectionField.targetCollection
|
|
151
153
|
}, /*#__PURE__*/_react2.default.createElement(_EllipsisWithTooltip.EllipsisWithTooltip, {
|
|
152
154
|
ellipsis: ellipsis,
|
|
153
155
|
ref: ellipsisWithTooltipRef
|
|
@@ -11,6 +11,5 @@ var _InputRecordPicker = require("./InputRecordPicker");
|
|
|
11
11
|
|
|
12
12
|
var _ReadPrettyRecordPicker = require("./ReadPrettyRecordPicker");
|
|
13
13
|
|
|
14
|
-
var RecordPicker = (0, _react.connect)(_InputRecordPicker.InputRecordPicker,
|
|
15
|
-
(0, _react.mapReadPretty)(_ReadPrettyRecordPicker.ReadPrettyRecordPicker));
|
|
14
|
+
var RecordPicker = (0, _react.connect)(_InputRecordPicker.InputRecordPicker, (0, _react.mapReadPretty)(_ReadPrettyRecordPicker.ReadPrettyRecordPicker));
|
|
16
15
|
exports.RecordPicker = RecordPicker;
|
|
@@ -41,6 +41,13 @@ var getDatePickerLabels = function getDatePickerLabels(props) {
|
|
|
41
41
|
exports.getDatePickerLabels = getDatePickerLabels;
|
|
42
42
|
|
|
43
43
|
var getLabelFormatValue = function getLabelFormatValue(labelUiSchema, value) {
|
|
44
|
+
if (Array.isArray(labelUiSchema === null || labelUiSchema === void 0 ? void 0 : labelUiSchema.enum) && value) {
|
|
45
|
+
var opt = labelUiSchema.enum.find(function (option) {
|
|
46
|
+
return option.value === value;
|
|
47
|
+
});
|
|
48
|
+
return opt === null || opt === void 0 ? void 0 : opt.label;
|
|
49
|
+
}
|
|
50
|
+
|
|
44
51
|
switch (labelUiSchema === null || labelUiSchema === void 0 ? void 0 : labelUiSchema['x-component']) {
|
|
45
52
|
case 'DatePicker':
|
|
46
53
|
return getDatePickerLabels(_objectSpread(_objectSpread({}, labelUiSchema === null || labelUiSchema === void 0 ? void 0 : labelUiSchema['x-component-props']), {}, {
|
|
@@ -7,6 +7,7 @@ export declare type RemoteSelectProps<P = any> = SelectProps<P, any> & {
|
|
|
7
7
|
onChange?: (v: any) => void;
|
|
8
8
|
target: string;
|
|
9
9
|
wait?: number;
|
|
10
|
+
manual?: boolean;
|
|
10
11
|
service: ResourceActionOptions<P>;
|
|
11
12
|
};
|
|
12
13
|
export declare const RemoteSelect: React.ForwardRefExoticComponent<Partial<SelectProps<any, any> & {
|
|
@@ -14,6 +15,7 @@ export declare const RemoteSelect: React.ForwardRefExoticComponent<Partial<Selec
|
|
|
14
15
|
onChange?: (v: any) => void;
|
|
15
16
|
target: string;
|
|
16
17
|
wait?: number;
|
|
18
|
+
manual?: boolean;
|
|
17
19
|
service: ResourceActionOptions<any>;
|
|
18
20
|
}> & React.RefAttributes<unknown>> & {
|
|
19
21
|
ReadPretty: typeof ReadPretty;
|