@nocobase/client 0.7.4-alpha.7 → 0.7.6-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/application/Application.js +1 -3
- package/es/block-provider/TableBlockProvider.js +3 -3
- package/es/collection-manager/Configuration/AddFieldAction.js +38 -41
- package/es/collection-manager/Configuration/ConfigurationTable.js +8 -3
- package/es/collection-manager/Configuration/EditFieldAction.js +64 -41
- package/es/collection-manager/Configuration/schemas/collections.d.ts +2 -0
- package/es/collection-manager/Configuration/schemas/collections.js +23 -1
- package/es/collection-manager/action-hooks.d.ts +5 -0
- package/es/collection-manager/action-hooks.js +14 -1
- package/es/collection-manager/interfaces/email.js +4 -2
- package/es/collection-manager/interfaces/formula.js +1 -1
- package/es/collection-manager/interfaces/index.d.ts +1 -0
- package/es/collection-manager/interfaces/index.js +1 -0
- package/es/collection-manager/interfaces/input.js +4 -2
- package/es/collection-manager/interfaces/integer.js +4 -2
- package/es/collection-manager/interfaces/m2m.js +2 -2
- package/es/collection-manager/interfaces/m2o.js +7 -3
- package/es/collection-manager/interfaces/number.js +3 -2
- package/es/collection-manager/interfaces/o2m.js +8 -4
- package/es/collection-manager/interfaces/o2o.js +19 -6
- package/es/collection-manager/interfaces/password.js +4 -2
- package/es/collection-manager/interfaces/percent.js +2 -1
- package/es/collection-manager/interfaces/phone.js +4 -2
- package/es/collection-manager/interfaces/properties/index.d.ts +7 -0
- package/es/collection-manager/interfaces/properties/index.js +91 -0
- package/es/collection-manager/interfaces/sequence.d.ts +2 -0
- package/es/collection-manager/interfaces/sequence.js +431 -0
- package/es/index.d.ts +0 -1
- package/es/index.js +0 -1
- package/es/locale/en_US.d.ts +1 -0
- package/es/locale/en_US.js +2 -1
- package/es/locale/index.js +36 -0
- package/es/locale/ja_JP.d.ts +590 -0
- package/es/locale/ja_JP.js +591 -0
- package/es/locale/ru_RU.d.ts +560 -0
- package/es/locale/ru_RU.js +559 -0
- package/es/locale/tr_TR.d.ts +560 -0
- package/es/locale/tr_TR.js +559 -0
- package/es/locale/zh_CN.d.ts +30 -0
- package/es/locale/zh_CN.js +34 -4
- package/es/route-switch/antd/admin-layout/index.js +19 -4
- package/es/schema-component/antd/action/Action.js +3 -1
- package/es/schema-component/antd/action/ActionBar.js +8 -1
- package/es/schema-component/antd/cron/Cron.d.ts +6 -0
- package/es/schema-component/antd/cron/Cron.js +49 -0
- package/es/schema-component/antd/cron/index.d.ts +1 -0
- package/es/schema-component/antd/cron/index.js +1 -0
- package/es/schema-component/antd/cron/locale/zh-CN.d.ts +34 -0
- package/es/schema-component/antd/cron/locale/zh-CN.js +37 -0
- package/es/schema-component/antd/filter/Filter.Action.Designer.js +1 -0
- package/es/schema-component/antd/filter/useFilterActionProps.d.ts +12 -1
- package/es/schema-component/antd/filter/useFilterActionProps.js +24 -10
- package/es/schema-component/antd/filter/useValues.js +0 -1
- package/es/schema-component/antd/formula-input/Compute.js +1 -1
- package/es/schema-component/antd/grid/Grid.js +134 -25
- package/es/schema-component/antd/index.d.ts +1 -0
- package/es/schema-component/antd/index.js +1 -0
- package/es/schema-component/antd/record-picker/InputRecordPicker.js +4 -2
- package/es/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +5 -2
- package/es/schema-component/antd/record-picker/util.d.ts +5 -0
- package/es/schema-component/antd/record-picker/util.js +37 -0
- package/es/schema-component/antd/upload/shared.js +6 -2
- package/es/schema-component/common/dnd-context/index.js +30 -4
- package/es/schema-component/hooks/useDesignable.d.ts +2 -2
- package/es/schema-component/hooks/useDesignable.js +130 -26
- package/es/schema-initializer/SchemaInitializer.d.ts +1 -0
- package/es/schema-initializer/SchemaInitializer.js +6 -2
- package/es/schema-initializer/buttons/TabPaneInitializers.d.ts +2 -1
- package/es/schema-initializer/buttons/TabPaneInitializers.js +9 -3
- package/es/schema-initializer/items/ActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/ActionInitializer.js +13 -0
- package/es/schema-initializer/items/BlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/BlockInitializer.js +18 -0
- package/es/schema-initializer/items/BulkDestroyActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/BulkDestroyActionInitializer.js +27 -0
- package/es/schema-initializer/items/CalendarBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/CalendarBlockInitializer.js +124 -0
- package/es/schema-initializer/items/CollectionFieldInitializer.d.ts +1 -0
- package/es/schema-initializer/items/CollectionFieldInitializer.js +15 -0
- package/es/schema-initializer/items/CreateActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/CreateActionInitializer.js +60 -0
- package/es/schema-initializer/items/CreateFormBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/CreateFormBlockInitializer.js +102 -0
- package/es/schema-initializer/items/CreateSubmitActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/CreateSubmitActionInitializer.js +24 -0
- package/es/schema-initializer/items/CustomizeActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/CustomizeActionInitializer.js +11 -0
- package/es/schema-initializer/items/DataBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/DataBlockInitializer.js +88 -0
- package/es/schema-initializer/items/DestroyActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/DestroyActionInitializer.js +27 -0
- package/es/schema-initializer/items/DetailsBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/DetailsBlockInitializer.js +55 -0
- package/es/schema-initializer/items/FilterActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/FilterActionInitializer.js +24 -0
- package/es/schema-initializer/items/FormBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/FormBlockInitializer.js +30 -0
- package/es/schema-initializer/items/G2PlotInitializer.d.ts +1 -0
- package/es/schema-initializer/items/G2PlotInitializer.js +25 -0
- package/es/schema-initializer/items/InitializerWithSwitch.d.ts +1 -0
- package/es/schema-initializer/items/InitializerWithSwitch.js +32 -0
- package/es/schema-initializer/items/KanbanBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/KanbanBlockInitializer.js +138 -0
- package/es/schema-initializer/items/MarkdownBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/MarkdownBlockInitializer.js +32 -0
- package/es/schema-initializer/items/PrintActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/PrintActionInitializer.js +23 -0
- package/es/schema-initializer/items/RecordAssociationBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/RecordAssociationBlockInitializer.js +90 -0
- package/es/schema-initializer/items/RecordAssociationCalendarBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/RecordAssociationCalendarBlockInitializer.js +160 -0
- package/es/schema-initializer/items/RecordAssociationDetailsBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/RecordAssociationDetailsBlockInitializer.js +90 -0
- package/es/schema-initializer/items/RecordAssociationFormBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/RecordAssociationFormBlockInitializer.js +112 -0
- package/es/schema-initializer/items/RecordFormBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/RecordFormBlockInitializer.js +109 -0
- package/es/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.js +116 -0
- package/es/schema-initializer/items/RecordReadPrettyFormBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/RecordReadPrettyFormBlockInitializer.js +114 -0
- package/es/schema-initializer/items/RefreshActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/RefreshActionInitializer.js +23 -0
- package/es/schema-initializer/items/SubmitActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/SubmitActionInitializer.js +24 -0
- package/es/schema-initializer/items/TableActionColumnInitializer.d.ts +1 -0
- package/es/schema-initializer/items/TableActionColumnInitializer.js +34 -0
- package/es/schema-initializer/items/TableBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/TableBlockInitializer.js +55 -0
- package/es/schema-initializer/items/TableCollectionFieldInitializer.d.ts +1 -0
- package/es/schema-initializer/items/TableCollectionFieldInitializer.js +15 -0
- package/es/schema-initializer/items/TableSelectorInitializer.d.ts +1 -0
- package/es/schema-initializer/items/TableSelectorInitializer.js +67 -0
- package/es/schema-initializer/items/UpdateActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/UpdateActionInitializer.js +59 -0
- package/es/schema-initializer/items/UpdateSubmitActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/UpdateSubmitActionInitializer.js +24 -0
- package/es/schema-initializer/items/ViewActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/ViewActionInitializer.js +58 -0
- package/es/schema-initializer/items/index.d.ts +35 -35
- package/es/schema-initializer/items/index.js +35 -1589
- package/es/schema-initializer/style.less +4 -0
- package/es/schema-templates/SchemaTemplateManagerProvider.js +2 -5
- package/es/system-settings/SystemSettingsShortcut.js +7 -0
- package/es/user/SigninPage.d.ts +11 -2
- package/es/user/SigninPage.js +140 -33
- package/es/user/SignupPage.d.ts +13 -2
- package/es/user/SignupPage.js +57 -11
- package/es/user/VerificationCode.d.ts +7 -0
- package/es/user/VerificationCode.js +129 -0
- package/lib/application/Application.js +1 -4
- package/lib/block-provider/TableBlockProvider.js +3 -3
- package/lib/collection-manager/Configuration/AddFieldAction.js +38 -40
- package/lib/collection-manager/Configuration/ConfigurationTable.js +7 -2
- package/lib/collection-manager/Configuration/EditFieldAction.js +65 -40
- package/lib/collection-manager/Configuration/schemas/collections.d.ts +2 -0
- package/lib/collection-manager/Configuration/schemas/collections.js +24 -1
- package/lib/collection-manager/action-hooks.d.ts +5 -0
- package/lib/collection-manager/action-hooks.js +31 -14
- package/lib/collection-manager/interfaces/email.js +3 -1
- package/lib/collection-manager/interfaces/formula.js +1 -1
- package/lib/collection-manager/interfaces/index.d.ts +1 -0
- package/lib/collection-manager/interfaces/index.js +13 -0
- package/lib/collection-manager/interfaces/input.js +3 -1
- package/lib/collection-manager/interfaces/integer.js +3 -1
- package/lib/collection-manager/interfaces/m2m.js +1 -1
- package/lib/collection-manager/interfaces/m2o.js +6 -2
- package/lib/collection-manager/interfaces/number.js +4 -3
- package/lib/collection-manager/interfaces/o2m.js +7 -3
- package/lib/collection-manager/interfaces/o2o.js +18 -5
- package/lib/collection-manager/interfaces/password.js +3 -1
- package/lib/collection-manager/interfaces/percent.js +1 -0
- package/lib/collection-manager/interfaces/phone.js +3 -1
- package/lib/collection-manager/interfaces/properties/index.d.ts +7 -0
- package/lib/collection-manager/interfaces/properties/index.js +94 -1
- package/lib/collection-manager/interfaces/sequence.d.ts +2 -0
- package/lib/collection-manager/interfaces/sequence.js +455 -0
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -13
- package/lib/locale/en_US.d.ts +1 -0
- package/lib/locale/en_US.js +2 -1
- package/lib/locale/index.js +42 -0
- package/lib/locale/ja_JP.d.ts +590 -0
- package/lib/locale/ja_JP.js +598 -0
- package/lib/locale/ru_RU.d.ts +560 -0
- package/lib/locale/ru_RU.js +566 -0
- package/lib/locale/tr_TR.d.ts +560 -0
- package/lib/locale/tr_TR.js +566 -0
- package/lib/locale/zh_CN.d.ts +30 -0
- package/lib/locale/zh_CN.js +34 -4
- package/lib/route-switch/antd/admin-layout/index.js +19 -4
- package/lib/schema-component/antd/action/Action.js +2 -0
- package/lib/schema-component/antd/action/ActionBar.js +9 -1
- package/lib/schema-component/antd/cron/Cron.d.ts +6 -0
- package/lib/schema-component/antd/cron/Cron.js +67 -0
- package/lib/schema-component/antd/cron/index.d.ts +1 -0
- package/lib/{file-manager → schema-component/antd/cron}/index.js +4 -4
- package/lib/schema-component/antd/cron/locale/zh-CN.d.ts +34 -0
- package/lib/schema-component/antd/cron/locale/zh-CN.js +44 -0
- package/lib/schema-component/antd/filter/Filter.Action.Designer.js +1 -0
- package/lib/schema-component/antd/filter/useFilterActionProps.d.ts +12 -1
- package/lib/schema-component/antd/filter/useFilterActionProps.js +34 -11
- package/lib/schema-component/antd/filter/useValues.js +0 -1
- package/lib/schema-component/antd/formula-input/Compute.js +1 -1
- package/lib/schema-component/antd/grid/Grid.js +132 -23
- package/lib/schema-component/antd/index.d.ts +1 -0
- package/lib/schema-component/antd/index.js +13 -0
- package/lib/schema-component/antd/record-picker/InputRecordPicker.js +5 -2
- package/lib/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +6 -2
- package/lib/schema-component/antd/record-picker/util.d.ts +5 -0
- package/lib/schema-component/antd/record-picker/util.js +55 -0
- package/lib/schema-component/antd/upload/shared.js +5 -1
- package/lib/schema-component/common/dnd-context/index.js +35 -5
- package/lib/schema-component/hooks/useDesignable.d.ts +2 -2
- package/lib/schema-component/hooks/useDesignable.js +132 -28
- package/lib/schema-initializer/SchemaInitializer.d.ts +1 -0
- package/lib/schema-initializer/SchemaInitializer.js +7 -2
- package/lib/schema-initializer/buttons/TabPaneInitializers.d.ts +2 -1
- package/lib/schema-initializer/buttons/TabPaneInitializers.js +13 -4
- package/lib/schema-initializer/items/ActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/ActionInitializer.js +26 -0
- package/lib/schema-initializer/items/BlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/BlockInitializer.js +31 -0
- package/lib/schema-initializer/items/BulkDestroyActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/BulkDestroyActionInitializer.js +40 -0
- package/lib/schema-initializer/items/CalendarBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/CalendarBlockInitializer.js +148 -0
- package/lib/schema-initializer/items/CollectionFieldInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/CollectionFieldInitializer.js +28 -0
- package/lib/schema-initializer/items/CreateActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/CreateActionInitializer.js +73 -0
- package/lib/schema-initializer/items/CreateFormBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/CreateFormBlockInitializer.js +120 -0
- package/lib/schema-initializer/items/CreateSubmitActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/CreateSubmitActionInitializer.js +37 -0
- package/lib/schema-initializer/items/CustomizeActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/CustomizeActionInitializer.js +24 -0
- package/lib/schema-initializer/items/DataBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/DataBlockInitializer.js +104 -0
- package/lib/schema-initializer/items/DestroyActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/DestroyActionInitializer.js +40 -0
- package/lib/schema-initializer/items/DetailsBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/DetailsBlockInitializer.js +71 -0
- package/lib/schema-initializer/items/FilterActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/FilterActionInitializer.js +37 -0
- package/lib/schema-initializer/items/FormBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/FormBlockInitializer.js +45 -0
- package/lib/schema-initializer/items/G2PlotInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/G2PlotInitializer.js +38 -0
- package/lib/schema-initializer/items/InitializerWithSwitch.d.ts +1 -0
- package/lib/schema-initializer/items/InitializerWithSwitch.js +47 -0
- package/lib/schema-initializer/items/KanbanBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/KanbanBlockInitializer.js +163 -0
- package/lib/schema-initializer/items/MarkdownBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/MarkdownBlockInitializer.js +47 -0
- package/lib/schema-initializer/items/PrintActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/PrintActionInitializer.js +36 -0
- package/lib/schema-initializer/items/RecordAssociationBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/RecordAssociationBlockInitializer.js +107 -0
- package/lib/schema-initializer/items/RecordAssociationCalendarBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/RecordAssociationCalendarBlockInitializer.js +185 -0
- package/lib/schema-initializer/items/RecordAssociationDetailsBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/RecordAssociationDetailsBlockInitializer.js +107 -0
- package/lib/schema-initializer/items/RecordAssociationFormBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/RecordAssociationFormBlockInitializer.js +128 -0
- package/lib/schema-initializer/items/RecordFormBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/RecordFormBlockInitializer.js +127 -0
- package/lib/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.js +133 -0
- package/lib/schema-initializer/items/RecordReadPrettyFormBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/RecordReadPrettyFormBlockInitializer.js +132 -0
- package/lib/schema-initializer/items/RefreshActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/RefreshActionInitializer.js +36 -0
- package/lib/schema-initializer/items/SubmitActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/SubmitActionInitializer.js +37 -0
- package/lib/schema-initializer/items/TableActionColumnInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/TableActionColumnInitializer.js +47 -0
- package/lib/schema-initializer/items/TableBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/TableBlockInitializer.js +71 -0
- package/lib/schema-initializer/items/TableCollectionFieldInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/TableCollectionFieldInitializer.js +28 -0
- package/lib/schema-initializer/items/TableSelectorInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/TableSelectorInitializer.js +84 -0
- package/lib/schema-initializer/items/UpdateActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/UpdateActionInitializer.js +72 -0
- package/lib/schema-initializer/items/UpdateSubmitActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/UpdateSubmitActionInitializer.js +37 -0
- package/lib/schema-initializer/items/ViewActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/ViewActionInitializer.js +71 -0
- package/lib/schema-initializer/items/index.d.ts +35 -35
- package/lib/schema-initializer/items/index.js +400 -1659
- package/lib/schema-initializer/style.less +4 -0
- package/lib/schema-templates/SchemaTemplateManagerProvider.js +2 -5
- package/lib/system-settings/SystemSettingsShortcut.js +7 -0
- package/lib/user/SigninPage.d.ts +11 -2
- package/lib/user/SigninPage.js +150 -34
- package/lib/user/SignupPage.d.ts +13 -2
- package/lib/user/SignupPage.js +59 -11
- package/lib/user/VerificationCode.d.ts +7 -0
- package/lib/user/VerificationCode.js +148 -0
- package/package.json +6 -4
- package/es/file-manager/FileStorageShortcut.d.ts +0 -1
- package/es/file-manager/FileStorageShortcut.js +0 -61
- package/es/file-manager/StorageOptions.d.ts +0 -2
- package/es/file-manager/StorageOptions.js +0 -121
- package/es/file-manager/index.d.ts +0 -1
- package/es/file-manager/index.js +0 -1
- package/es/file-manager/schemas/storage.d.ts +0 -2
- package/es/file-manager/schemas/storage.js +0 -349
- package/lib/file-manager/FileStorageShortcut.d.ts +0 -1
- package/lib/file-manager/FileStorageShortcut.js +0 -85
- package/lib/file-manager/StorageOptions.d.ts +0 -2
- package/lib/file-manager/StorageOptions.js +0 -138
- package/lib/file-manager/index.d.ts +0 -1
- package/lib/file-manager/schemas/storage.d.ts +0 -2
- package/lib/file-manager/schemas/storage.js +0 -360
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
|
|
3
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
|
|
5
|
-
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); }
|
|
6
|
-
|
|
7
|
-
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; }
|
|
8
|
-
|
|
9
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
-
|
|
11
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
|
|
13
|
-
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; }
|
|
14
|
-
|
|
15
|
-
import { FileOutlined } from '@ant-design/icons';
|
|
16
|
-
import { uid } from '@formily/shared';
|
|
17
|
-
import React, { useState } from 'react';
|
|
18
|
-
import { useTranslation } from 'react-i18next';
|
|
19
|
-
import { PluginManager } from '..';
|
|
20
|
-
import { ActionContext, SchemaComponent } from '../schema-component';
|
|
21
|
-
import { storageSchema } from './schemas/storage';
|
|
22
|
-
import { StorageOptions } from './StorageOptions';
|
|
23
|
-
var schema = {
|
|
24
|
-
type: 'object',
|
|
25
|
-
properties: _defineProperty({}, uid(), {
|
|
26
|
-
'x-component': 'Action.Drawer',
|
|
27
|
-
type: 'void',
|
|
28
|
-
title: '{{t("File storages")}}',
|
|
29
|
-
properties: {
|
|
30
|
-
storageSchema: storageSchema
|
|
31
|
-
}
|
|
32
|
-
})
|
|
33
|
-
};
|
|
34
|
-
export var FileStorageShortcut = function FileStorageShortcut() {
|
|
35
|
-
var _useState = useState(false),
|
|
36
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
37
|
-
visible = _useState2[0],
|
|
38
|
-
setVisible = _useState2[1];
|
|
39
|
-
|
|
40
|
-
var _useTranslation = useTranslation(),
|
|
41
|
-
t = _useTranslation.t;
|
|
42
|
-
|
|
43
|
-
return /*#__PURE__*/React.createElement(ActionContext.Provider, {
|
|
44
|
-
value: {
|
|
45
|
-
visible: visible,
|
|
46
|
-
setVisible: setVisible
|
|
47
|
-
}
|
|
48
|
-
}, /*#__PURE__*/React.createElement(PluginManager.Toolbar.Item, {
|
|
49
|
-
eventKey: 'FileStorage',
|
|
50
|
-
onClick: function onClick() {
|
|
51
|
-
setVisible(true);
|
|
52
|
-
},
|
|
53
|
-
icon: /*#__PURE__*/React.createElement(FileOutlined, null),
|
|
54
|
-
title: t('File storages')
|
|
55
|
-
}), /*#__PURE__*/React.createElement(SchemaComponent, {
|
|
56
|
-
components: {
|
|
57
|
-
StorageOptions: StorageOptions
|
|
58
|
-
},
|
|
59
|
-
schema: schema
|
|
60
|
-
}));
|
|
61
|
-
};
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
|
|
3
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
|
|
5
|
-
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); }
|
|
6
|
-
|
|
7
|
-
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; }
|
|
8
|
-
|
|
9
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
-
|
|
11
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
|
|
13
|
-
import { FormLayout } from '@formily/antd';
|
|
14
|
-
import { observer, RecursionField, Schema, useField, useForm } from '@formily/react';
|
|
15
|
-
import React, { useEffect, useState } from 'react';
|
|
16
|
-
var schema = {
|
|
17
|
-
local: {
|
|
18
|
-
properties: {
|
|
19
|
-
documentRoot: {
|
|
20
|
-
title: '{{t("Destination")}}',
|
|
21
|
-
type: 'string',
|
|
22
|
-
'x-decorator': 'FormItem',
|
|
23
|
-
'x-component': 'Input',
|
|
24
|
-
default: 'uploads'
|
|
25
|
-
},
|
|
26
|
-
serve: {
|
|
27
|
-
type: 'string',
|
|
28
|
-
'x-decorator': 'FormItem',
|
|
29
|
-
'x-component': 'Checkbox',
|
|
30
|
-
'x-content': '{{t("Use the built-in static file server")}}',
|
|
31
|
-
default: true
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
'ali-oss': {
|
|
36
|
-
properties: {
|
|
37
|
-
region: {
|
|
38
|
-
title: '{{t("Region")}}',
|
|
39
|
-
type: 'string',
|
|
40
|
-
'x-decorator': 'FormItem',
|
|
41
|
-
'x-component': 'Input',
|
|
42
|
-
required: true
|
|
43
|
-
},
|
|
44
|
-
accessKeyId: {
|
|
45
|
-
title: '{{t("AccessKey ID")}}',
|
|
46
|
-
type: 'string',
|
|
47
|
-
'x-decorator': 'FormItem',
|
|
48
|
-
'x-component': 'Input',
|
|
49
|
-
required: true
|
|
50
|
-
},
|
|
51
|
-
accessKeySecret: {
|
|
52
|
-
title: '{{t("AccessKey Secret")}}',
|
|
53
|
-
type: 'string',
|
|
54
|
-
'x-decorator': 'FormItem',
|
|
55
|
-
'x-component': 'Password',
|
|
56
|
-
required: true
|
|
57
|
-
},
|
|
58
|
-
bucket: {
|
|
59
|
-
title: '{{t("Bucket")}}',
|
|
60
|
-
type: 'string',
|
|
61
|
-
'x-decorator': 'FormItem',
|
|
62
|
-
'x-component': 'Input',
|
|
63
|
-
required: true
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
s3: {
|
|
68
|
-
properties: {
|
|
69
|
-
region: {
|
|
70
|
-
title: '{{t("Region")}}',
|
|
71
|
-
type: 'string',
|
|
72
|
-
'x-decorator': 'FormItem',
|
|
73
|
-
'x-component': 'Input',
|
|
74
|
-
required: true
|
|
75
|
-
},
|
|
76
|
-
accessKeyId: {
|
|
77
|
-
title: '{{t("AccessKey ID")}}',
|
|
78
|
-
type: 'string',
|
|
79
|
-
'x-decorator': 'FormItem',
|
|
80
|
-
'x-component': 'Input',
|
|
81
|
-
required: true
|
|
82
|
-
},
|
|
83
|
-
secretAccessKey: {
|
|
84
|
-
title: '{{t("AccessKey Secret")}}',
|
|
85
|
-
type: 'string',
|
|
86
|
-
'x-decorator': 'FormItem',
|
|
87
|
-
'x-component': 'Password',
|
|
88
|
-
required: true
|
|
89
|
-
},
|
|
90
|
-
bucket: {
|
|
91
|
-
title: '{{t("Bucket")}}',
|
|
92
|
-
type: 'string',
|
|
93
|
-
'x-decorator': 'FormItem',
|
|
94
|
-
'x-component': 'Input',
|
|
95
|
-
required: true
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
export var StorageOptions = observer(function (props) {
|
|
101
|
-
var form = useForm();
|
|
102
|
-
var field = useField();
|
|
103
|
-
|
|
104
|
-
var _useState = useState(new Schema({})),
|
|
105
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
106
|
-
s = _useState2[0],
|
|
107
|
-
setSchema = _useState2[1];
|
|
108
|
-
|
|
109
|
-
useEffect(function () {
|
|
110
|
-
form.clearFormGraph('options.*');
|
|
111
|
-
setSchema(new Schema(schema[form.values.type] || {}));
|
|
112
|
-
}, [form.values.type]);
|
|
113
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(FormLayout, {
|
|
114
|
-
layout: 'vertical'
|
|
115
|
-
}, /*#__PURE__*/React.createElement(RecursionField, {
|
|
116
|
-
key: form.values.type || 'local',
|
|
117
|
-
basePath: field.address,
|
|
118
|
-
onlyRenderProperties: true,
|
|
119
|
-
schema: s
|
|
120
|
-
})));
|
|
121
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FileStorageShortcut';
|
package/es/file-manager/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FileStorageShortcut';
|
|
@@ -1,349 +0,0 @@
|
|
|
1
|
-
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; }
|
|
2
|
-
|
|
3
|
-
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; }
|
|
4
|
-
|
|
5
|
-
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; }
|
|
6
|
-
|
|
7
|
-
import { uid } from '@formily/shared';
|
|
8
|
-
import { useRequest } from '../../api-client';
|
|
9
|
-
import { useActionContext } from '../../schema-component';
|
|
10
|
-
var collection = {
|
|
11
|
-
name: 'storages',
|
|
12
|
-
fields: [{
|
|
13
|
-
type: 'integer',
|
|
14
|
-
name: 'title',
|
|
15
|
-
interface: 'input',
|
|
16
|
-
uiSchema: {
|
|
17
|
-
title: '{{t("Storage display name")}}',
|
|
18
|
-
type: 'string',
|
|
19
|
-
'x-component': 'Input',
|
|
20
|
-
required: true
|
|
21
|
-
}
|
|
22
|
-
}, {
|
|
23
|
-
type: 'string',
|
|
24
|
-
name: 'name',
|
|
25
|
-
interface: 'input',
|
|
26
|
-
uiSchema: {
|
|
27
|
-
title: '{{t("Storage name")}}',
|
|
28
|
-
type: 'string',
|
|
29
|
-
'x-component': 'Input'
|
|
30
|
-
}
|
|
31
|
-
}, {
|
|
32
|
-
type: 'string',
|
|
33
|
-
name: 'type',
|
|
34
|
-
interface: 'select',
|
|
35
|
-
uiSchema: {
|
|
36
|
-
title: '{{t("Storage type")}}',
|
|
37
|
-
type: 'string',
|
|
38
|
-
'x-component': 'Select',
|
|
39
|
-
required: true,
|
|
40
|
-
enum: [{
|
|
41
|
-
label: '{{t("Local storage")}}',
|
|
42
|
-
value: 'local'
|
|
43
|
-
}, {
|
|
44
|
-
label: '{{t("Aliyun OSS")}}',
|
|
45
|
-
value: 'ali-oss'
|
|
46
|
-
}, {
|
|
47
|
-
label: '{{t("Amazon S3")}}',
|
|
48
|
-
value: 's3'
|
|
49
|
-
}]
|
|
50
|
-
}
|
|
51
|
-
}, {
|
|
52
|
-
type: 'string',
|
|
53
|
-
name: 'baseUrl',
|
|
54
|
-
interface: 'input',
|
|
55
|
-
uiSchema: {
|
|
56
|
-
title: '{{t("Storage base URL")}}',
|
|
57
|
-
type: 'string',
|
|
58
|
-
'x-component': 'Input'
|
|
59
|
-
}
|
|
60
|
-
}, {
|
|
61
|
-
type: 'boolean',
|
|
62
|
-
name: 'default',
|
|
63
|
-
interface: 'boolean',
|
|
64
|
-
uiSchema: {
|
|
65
|
-
title: '{{t("Default storage")}}',
|
|
66
|
-
type: 'boolean',
|
|
67
|
-
'x-component': 'Checkbox'
|
|
68
|
-
}
|
|
69
|
-
}]
|
|
70
|
-
};
|
|
71
|
-
export var storageSchema = {
|
|
72
|
-
type: 'object',
|
|
73
|
-
properties: {
|
|
74
|
-
block1: {
|
|
75
|
-
type: 'void',
|
|
76
|
-
'x-decorator': 'ResourceActionProvider',
|
|
77
|
-
'x-decorator-props': {
|
|
78
|
-
collection: collection,
|
|
79
|
-
resourceName: 'storages',
|
|
80
|
-
request: {
|
|
81
|
-
resource: 'storages',
|
|
82
|
-
action: 'list',
|
|
83
|
-
params: {
|
|
84
|
-
pageSize: 50,
|
|
85
|
-
sort: ['id'],
|
|
86
|
-
appends: []
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
'x-component': 'CollectionProvider',
|
|
91
|
-
'x-component-props': {
|
|
92
|
-
collection: collection
|
|
93
|
-
},
|
|
94
|
-
properties: {
|
|
95
|
-
actions: {
|
|
96
|
-
type: 'void',
|
|
97
|
-
'x-component': 'ActionBar',
|
|
98
|
-
'x-component-props': {
|
|
99
|
-
style: {
|
|
100
|
-
marginBottom: 16
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
properties: {
|
|
104
|
-
delete: {
|
|
105
|
-
type: 'void',
|
|
106
|
-
title: '{{ t("Delete") }}',
|
|
107
|
-
'x-component': 'Action',
|
|
108
|
-
'x-component-props': {
|
|
109
|
-
useAction: '{{ cm.useBulkDestroyAction }}',
|
|
110
|
-
confirm: {
|
|
111
|
-
title: "{{t('Delete storage')}}",
|
|
112
|
-
content: "{{t('Are you sure you want to delete it?')}}"
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
create: {
|
|
117
|
-
type: 'void',
|
|
118
|
-
title: '{{t("Add storage")}}',
|
|
119
|
-
'x-component': 'Action',
|
|
120
|
-
'x-component-props': {
|
|
121
|
-
type: 'primary'
|
|
122
|
-
},
|
|
123
|
-
properties: {
|
|
124
|
-
drawer: {
|
|
125
|
-
type: 'void',
|
|
126
|
-
'x-component': 'Action.Drawer',
|
|
127
|
-
'x-decorator': 'Form',
|
|
128
|
-
'x-decorator-props': {
|
|
129
|
-
useValues: function useValues(options) {
|
|
130
|
-
var ctx = useActionContext();
|
|
131
|
-
return useRequest(function () {
|
|
132
|
-
return Promise.resolve({
|
|
133
|
-
data: {
|
|
134
|
-
name: "s_".concat(uid())
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
}, _objectSpread(_objectSpread({}, options), {}, {
|
|
138
|
-
refreshDeps: [ctx.visible]
|
|
139
|
-
}));
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
title: '{{t("Add storage")}}',
|
|
143
|
-
properties: {
|
|
144
|
-
title: {
|
|
145
|
-
'x-component': 'CollectionField',
|
|
146
|
-
'x-decorator': 'FormItem'
|
|
147
|
-
},
|
|
148
|
-
name: {
|
|
149
|
-
'x-component': 'CollectionField',
|
|
150
|
-
'x-decorator': 'FormItem',
|
|
151
|
-
description: '{{t("Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.")}}'
|
|
152
|
-
},
|
|
153
|
-
baseUrl: {
|
|
154
|
-
'x-component': 'CollectionField',
|
|
155
|
-
'x-decorator': 'FormItem'
|
|
156
|
-
},
|
|
157
|
-
type: {
|
|
158
|
-
'x-component': 'CollectionField',
|
|
159
|
-
'x-decorator': 'FormItem'
|
|
160
|
-
},
|
|
161
|
-
options: {
|
|
162
|
-
type: 'object',
|
|
163
|
-
'x-component': 'StorageOptions'
|
|
164
|
-
},
|
|
165
|
-
default: {
|
|
166
|
-
'x-component': 'CollectionField',
|
|
167
|
-
'x-decorator': 'FormItem',
|
|
168
|
-
title: '',
|
|
169
|
-
'x-content': '{{t("Default storage")}}'
|
|
170
|
-
},
|
|
171
|
-
footer: {
|
|
172
|
-
type: 'void',
|
|
173
|
-
'x-component': 'Action.Drawer.Footer',
|
|
174
|
-
properties: {
|
|
175
|
-
cancel: {
|
|
176
|
-
title: '{{t("Cancel")}}',
|
|
177
|
-
'x-component': 'Action',
|
|
178
|
-
'x-component-props': {
|
|
179
|
-
useAction: '{{ cm.useCancelAction }}'
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
submit: {
|
|
183
|
-
title: '{{t("Submit")}}',
|
|
184
|
-
'x-component': 'Action',
|
|
185
|
-
'x-component-props': {
|
|
186
|
-
type: 'primary',
|
|
187
|
-
useAction: '{{ cm.useCreateAction }}'
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
table: {
|
|
199
|
-
type: 'void',
|
|
200
|
-
'x-uid': 'input',
|
|
201
|
-
'x-component': 'Table.Void',
|
|
202
|
-
'x-component-props': {
|
|
203
|
-
rowKey: 'id',
|
|
204
|
-
rowSelection: {
|
|
205
|
-
type: 'checkbox'
|
|
206
|
-
},
|
|
207
|
-
useDataSource: '{{ cm.useDataSourceFromRAC }}'
|
|
208
|
-
},
|
|
209
|
-
properties: {
|
|
210
|
-
column1: {
|
|
211
|
-
type: 'void',
|
|
212
|
-
'x-decorator': 'Table.Column.Decorator',
|
|
213
|
-
'x-component': 'Table.Column',
|
|
214
|
-
properties: {
|
|
215
|
-
title: {
|
|
216
|
-
type: 'number',
|
|
217
|
-
'x-component': 'CollectionField',
|
|
218
|
-
'x-read-pretty': true
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
column2: {
|
|
223
|
-
type: 'void',
|
|
224
|
-
'x-decorator': 'Table.Column.Decorator',
|
|
225
|
-
'x-component': 'Table.Column',
|
|
226
|
-
properties: {
|
|
227
|
-
name: {
|
|
228
|
-
type: 'string',
|
|
229
|
-
'x-component': 'CollectionField',
|
|
230
|
-
'x-read-pretty': true
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
},
|
|
234
|
-
column3: {
|
|
235
|
-
type: 'void',
|
|
236
|
-
'x-decorator': 'Table.Column.Decorator',
|
|
237
|
-
'x-component': 'Table.Column',
|
|
238
|
-
properties: {
|
|
239
|
-
default: {
|
|
240
|
-
type: 'string',
|
|
241
|
-
'x-component': 'CollectionField',
|
|
242
|
-
'x-read-pretty': true
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
column4: {
|
|
247
|
-
type: 'void',
|
|
248
|
-
title: '{{t("Actions")}}',
|
|
249
|
-
'x-component': 'Table.Column',
|
|
250
|
-
properties: {
|
|
251
|
-
actions: {
|
|
252
|
-
type: 'void',
|
|
253
|
-
'x-component': 'Space',
|
|
254
|
-
'x-component-props': {
|
|
255
|
-
split: '|'
|
|
256
|
-
},
|
|
257
|
-
properties: {
|
|
258
|
-
update: {
|
|
259
|
-
type: 'void',
|
|
260
|
-
title: '{{t("Edit")}}',
|
|
261
|
-
'x-component': 'Action.Link',
|
|
262
|
-
'x-component-props': {
|
|
263
|
-
type: 'primary'
|
|
264
|
-
},
|
|
265
|
-
properties: {
|
|
266
|
-
drawer: {
|
|
267
|
-
type: 'void',
|
|
268
|
-
'x-component': 'Action.Drawer',
|
|
269
|
-
'x-decorator': 'Form',
|
|
270
|
-
'x-decorator-props': {
|
|
271
|
-
useValues: '{{ cm.useValuesFromRecord }}'
|
|
272
|
-
},
|
|
273
|
-
title: '{{t("Edit storage")}}',
|
|
274
|
-
properties: {
|
|
275
|
-
title: {
|
|
276
|
-
'x-component': 'CollectionField',
|
|
277
|
-
'x-decorator': 'FormItem'
|
|
278
|
-
},
|
|
279
|
-
name: {
|
|
280
|
-
'x-component': 'CollectionField',
|
|
281
|
-
'x-decorator': 'FormItem',
|
|
282
|
-
'x-disabled': true
|
|
283
|
-
},
|
|
284
|
-
baseUrl: {
|
|
285
|
-
'x-component': 'CollectionField',
|
|
286
|
-
'x-decorator': 'FormItem'
|
|
287
|
-
},
|
|
288
|
-
type: {
|
|
289
|
-
'x-component': 'CollectionField',
|
|
290
|
-
'x-decorator': 'FormItem',
|
|
291
|
-
'x-disabled': true
|
|
292
|
-
},
|
|
293
|
-
options: {
|
|
294
|
-
type: 'object',
|
|
295
|
-
'x-component': 'StorageOptions'
|
|
296
|
-
},
|
|
297
|
-
default: {
|
|
298
|
-
title: '',
|
|
299
|
-
'x-component': 'CollectionField',
|
|
300
|
-
'x-decorator': 'FormItem',
|
|
301
|
-
'x-content': '{{t("Default storage")}}'
|
|
302
|
-
},
|
|
303
|
-
footer: {
|
|
304
|
-
type: 'void',
|
|
305
|
-
'x-component': 'Action.Drawer.Footer',
|
|
306
|
-
properties: {
|
|
307
|
-
cancel: {
|
|
308
|
-
title: '{{t("Cancel")}}',
|
|
309
|
-
'x-component': 'Action',
|
|
310
|
-
'x-component-props': {
|
|
311
|
-
useAction: '{{ cm.useCancelAction }}'
|
|
312
|
-
}
|
|
313
|
-
},
|
|
314
|
-
submit: {
|
|
315
|
-
title: '{{t("Submit")}}',
|
|
316
|
-
'x-component': 'Action',
|
|
317
|
-
'x-component-props': {
|
|
318
|
-
type: 'primary',
|
|
319
|
-
useAction: '{{ cm.useUpdateAction }}'
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
},
|
|
328
|
-
delete: {
|
|
329
|
-
type: 'void',
|
|
330
|
-
title: '{{ t("Delete") }}',
|
|
331
|
-
'x-component': 'Action.Link',
|
|
332
|
-
'x-component-props': {
|
|
333
|
-
confirm: {
|
|
334
|
-
title: "{{t('Delete role')}}",
|
|
335
|
-
content: "{{t('Are you sure you want to delete it?')}}"
|
|
336
|
-
},
|
|
337
|
-
useAction: '{{cm.useDestroyAction}}'
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const FileStorageShortcut: () => JSX.Element;
|
|
@@ -1,85 +0,0 @@
|
|
|
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.FileStorageShortcut = void 0;
|
|
9
|
-
|
|
10
|
-
var _icons = require("@ant-design/icons");
|
|
11
|
-
|
|
12
|
-
var _shared = require("@formily/shared");
|
|
13
|
-
|
|
14
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
|
-
var _reactI18next = require("react-i18next");
|
|
17
|
-
|
|
18
|
-
var _ = require("..");
|
|
19
|
-
|
|
20
|
-
var _schemaComponent = require("../schema-component");
|
|
21
|
-
|
|
22
|
-
var _storage = require("./schemas/storage");
|
|
23
|
-
|
|
24
|
-
var _StorageOptions = require("./StorageOptions");
|
|
25
|
-
|
|
26
|
-
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); }
|
|
27
|
-
|
|
28
|
-
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; }
|
|
29
|
-
|
|
30
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
|
-
|
|
32
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
33
|
-
|
|
34
|
-
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); }
|
|
35
|
-
|
|
36
|
-
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; }
|
|
37
|
-
|
|
38
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
39
|
-
|
|
40
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
|
-
|
|
42
|
-
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; }
|
|
43
|
-
|
|
44
|
-
var schema = {
|
|
45
|
-
type: 'object',
|
|
46
|
-
properties: _defineProperty({}, (0, _shared.uid)(), {
|
|
47
|
-
'x-component': 'Action.Drawer',
|
|
48
|
-
type: 'void',
|
|
49
|
-
title: '{{t("File storages")}}',
|
|
50
|
-
properties: {
|
|
51
|
-
storageSchema: _storage.storageSchema
|
|
52
|
-
}
|
|
53
|
-
})
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
var FileStorageShortcut = function FileStorageShortcut() {
|
|
57
|
-
var _useState = (0, _react.useState)(false),
|
|
58
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
59
|
-
visible = _useState2[0],
|
|
60
|
-
setVisible = _useState2[1];
|
|
61
|
-
|
|
62
|
-
var _useTranslation = (0, _reactI18next.useTranslation)(),
|
|
63
|
-
t = _useTranslation.t;
|
|
64
|
-
|
|
65
|
-
return /*#__PURE__*/_react.default.createElement(_schemaComponent.ActionContext.Provider, {
|
|
66
|
-
value: {
|
|
67
|
-
visible: visible,
|
|
68
|
-
setVisible: setVisible
|
|
69
|
-
}
|
|
70
|
-
}, /*#__PURE__*/_react.default.createElement(_.PluginManager.Toolbar.Item, {
|
|
71
|
-
eventKey: 'FileStorage',
|
|
72
|
-
onClick: function onClick() {
|
|
73
|
-
setVisible(true);
|
|
74
|
-
},
|
|
75
|
-
icon: /*#__PURE__*/_react.default.createElement(_icons.FileOutlined, null),
|
|
76
|
-
title: t('File storages')
|
|
77
|
-
}), /*#__PURE__*/_react.default.createElement(_schemaComponent.SchemaComponent, {
|
|
78
|
-
components: {
|
|
79
|
-
StorageOptions: _StorageOptions.StorageOptions
|
|
80
|
-
},
|
|
81
|
-
schema: schema
|
|
82
|
-
}));
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
exports.FileStorageShortcut = FileStorageShortcut;
|