linkmore-design 1.0.50 → 1.0.54
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/dist/Alert/ErrorBoundary.d.ts +22 -0
- package/dist/{Notification → Alert}/demos/basic.d.ts +0 -0
- package/dist/{Notification/demos/button.d.ts → Alert/demos/visible.d.ts} +0 -0
- package/dist/Alert/index.d.ts +41 -0
- package/dist/{Notification → Alert}/style/index.d.ts +0 -0
- package/dist/Button/style/index.d.ts +1 -1
- package/dist/CardTable/fns/index.d.ts +7 -3
- package/dist/CardTable/{toolbar → pager}/TablePagination.d.ts +0 -0
- package/dist/CardTable/pager/index.d.ts +3 -0
- package/dist/LmEditTable/style/index.d.ts +1 -1
- package/dist/LmFilter/LmFilter.d.ts +3 -0
- package/dist/LmFilter/baseFilter/index.d.ts +3 -0
- package/dist/LmFilter/clearFilter/index.d.ts +3 -0
- package/dist/LmFilter/complexFilter/index.d.ts +2 -0
- package/dist/LmFilter/components/CascaderFilter.d.ts +5 -0
- package/dist/LmFilter/components/CheckboxFilter.d.ts +5 -0
- package/dist/LmFilter/components/DateFilter.d.ts +5 -0
- package/dist/LmFilter/components/DropdownFIlter.d.ts +3 -0
- package/dist/LmFilter/components/EmptyFilter.d.ts +2 -0
- package/dist/LmFilter/components/InputFilter.d.ts +4 -0
- package/dist/LmFilter/components/InputSearchClose.d.ts +3 -0
- package/dist/LmFilter/components/SelectFilter.d.ts +5 -0
- package/dist/LmFilter/components/fuzzySearch.d.ts +4 -0
- package/dist/LmFilter/components/index.d.ts +3 -0
- package/dist/LmFilter/customFilter/index.d.ts +2 -0
- package/dist/LmFilter/demos/basic.d.ts +2 -0
- package/dist/LmFilter/filterFns/index.d.ts +12 -0
- package/dist/LmFilter/hooks/index.d.ts +1 -0
- package/dist/LmFilter/hooks/useDelayedFn.d.ts +2 -0
- package/dist/LmFilter/index.d.ts +2 -0
- package/dist/LmFilter/style/index.d.ts +1 -0
- package/dist/LmFilter/utils.d.ts +8 -0
- package/dist/LmFilter/wrapper/Filter.d.ts +3 -0
- package/dist/LmFilter/wrapper/FilterContainer.d.ts +3 -0
- package/dist/LmFilter/wrapper/FilterRoot.d.ts +3 -0
- package/dist/LmFilter/wrapper/FilterWrapper.d.ts +3 -0
- package/dist/_util/getDataOrAriaProps.d.ts +1 -0
- package/dist/_util/reactNode.d.ts +7 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.umd.js +3019 -425
- package/dist/index.umd.min.js +6 -6
- package/dist/message/hooks/useMessage.d.ts +7 -0
- package/dist/message/index.d.ts +63 -4
- package/dist/{Notification/demos/icon.d.ts → notification/demos/basic.d.ts} +0 -0
- package/dist/notification/demos/button.d.ts +2 -0
- package/dist/notification/demos/icon.d.ts +2 -0
- package/dist/notification/hooks/useNotification.d.ts +7 -0
- package/dist/notification/index.d.ts +54 -0
- package/dist/notification/style/index.d.ts +1 -0
- package/es/Alert/ErrorBoundary.d.ts +22 -0
- package/es/Alert/ErrorBoundary.js +65 -0
- package/es/Alert/index.d.ts +41 -0
- package/es/Alert/index.js +192 -0
- package/{lib/Notification → es/Alert}/style/index.css +25 -2
- package/es/{Notification → Alert}/style/index.d.ts +0 -0
- package/es/{Notification → Alert}/style/index.js +0 -0
- package/es/Button/style/{style.css → index.css} +0 -0
- package/es/Button/style/index.d.ts +1 -1
- package/es/Button/style/index.js +1 -1
- package/es/ButtonTags/style/{style.css → index.css} +0 -0
- package/es/ButtonTags/style/index.js +1 -1
- package/es/CardTable/card/PictureTextColumn.js +8 -6
- package/es/CardTable/card/PictureTextRow.js +1 -1
- package/es/CardTable/fns/index.js +38 -9
- package/es/CardTable/{toolbar → pager}/TablePagination.js +0 -0
- package/es/CardTable/pager/index.js +48 -0
- package/{lib/CardTable/style/style.css → es/CardTable/style/index.css} +2 -2
- package/es/CardTable/style/index.js +1 -1
- package/es/CardTable/table/TableRoot.js +20 -18
- package/es/CardTable/table/TableWrapper.js +4 -0
- package/es/CardTable/toolbar/ToolBarBottom.js +8 -27
- package/es/Checkbox/style/{style.css → index.css} +0 -0
- package/es/Checkbox/style/index.js +1 -1
- package/es/CkFilter/style/{style.css → index.css} +0 -0
- package/es/CkFilter/style/index.js +1 -1
- package/es/CustomerService/style/{style.css → index.css} +0 -0
- package/es/CustomerService/style/index.js +1 -1
- package/es/EditTable/style/{style.css → index.css} +0 -0
- package/es/EditTable/style/index.js +1 -1
- package/es/EnlargeImg/style/{style.css → index.css} +0 -0
- package/es/EnlargeImg/style/index.js +1 -1
- package/es/Filter/style/{style.css → index.css} +0 -0
- package/es/Filter/style/index.js +1 -1
- package/es/IconSelect/style/{style.css → index.css} +0 -0
- package/es/IconSelect/style/index.js +1 -1
- package/es/Input/style/{style.css → index.css} +0 -0
- package/es/Input/style/index.js +1 -1
- package/es/LeftTable/style/{style.css → index.css} +0 -0
- package/es/LeftTable/style/index.js +1 -1
- package/es/LmEditTable/style/{style.css → index.css} +0 -0
- package/es/LmEditTable/style/index.d.ts +1 -1
- package/es/LmEditTable/style/index.js +1 -1
- package/es/LmFilter/LmFilter.js +27 -0
- package/es/LmFilter/baseFilter/index.js +34 -0
- package/es/LmFilter/clearFilter/index.js +33 -0
- package/es/LmFilter/complexFilter/index.js +17 -0
- package/es/LmFilter/components/CascaderFilter.js +183 -0
- package/es/LmFilter/components/CheckboxFilter.js +197 -0
- package/es/LmFilter/components/DateFilter.js +147 -0
- package/es/LmFilter/components/DropdownFIlter.js +162 -0
- package/es/LmFilter/components/EmptyFilter.js +27 -0
- package/es/LmFilter/components/InputFilter.js +52 -0
- package/es/LmFilter/components/InputSearchClose.js +74 -0
- package/es/LmFilter/components/SelectFilter.js +113 -0
- package/es/LmFilter/components/fuzzySearch.js +37 -0
- package/es/LmFilter/components/index.js +97 -0
- package/es/LmFilter/customFilter/index.js +17 -0
- package/es/LmFilter/filterFns/index.js +54 -0
- package/es/LmFilter/hooks/index.js +18 -0
- package/es/LmFilter/hooks/useDelayedFn.js +27 -0
- package/es/LmFilter/icon_placeholder.png +0 -0
- package/es/LmFilter/index.js +16 -0
- package/es/LmFilter/style/index.js +3 -0
- package/es/LmFilter/style/style.css +189 -0
- package/es/LmFilter/utils.js +55 -0
- package/es/LmFilter/wrapper/Filter.js +33 -0
- package/es/LmFilter/wrapper/FilterContainer.js +29 -0
- package/es/LmFilter/wrapper/FilterRoot.js +114 -0
- package/es/LmFilter/wrapper/FilterWrapper.js +25 -0
- package/es/LmTable/Table.js +3 -5
- package/{lib/LmTable/style/style.css → es/LmTable/style/index.css} +6 -0
- package/es/LmTable/style/index.js +1 -1
- package/es/OldModal/style/{style.css → index.css} +0 -0
- package/es/OldModal/style/index.js +1 -1
- package/es/PopTable/style/{style.css → index.css} +0 -0
- package/es/PopTable/style/index.js +1 -1
- package/es/ProTable/style/{style.css → index.css} +0 -0
- package/es/ProTable/style/index.js +1 -1
- package/es/Radio/style/{style.css → index.css} +0 -0
- package/es/Radio/style/index.js +1 -1
- package/es/TableRender/style/{style.css → index.css} +0 -0
- package/es/TableRender/style/index.js +1 -1
- package/es/UploadOss/style/{style.css → index.css} +0 -0
- package/es/UploadOss/style/index.js +1 -1
- package/es/VirtualList/style/{style.css → index.css} +0 -0
- package/es/VirtualList/style/index.js +1 -1
- package/es/_util/getDataOrAriaProps.d.ts +1 -0
- package/es/_util/getDataOrAriaProps.js +9 -0
- package/es/_util/reactNode.d.ts +7 -0
- package/es/_util/reactNode.js +10 -0
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/message/hooks/useMessage.d.ts +7 -0
- package/es/message/hooks/useMessage.js +83 -0
- package/es/message/index.d.ts +63 -4
- package/es/message/index.js +241 -12
- package/es/message/style/index.css +28 -1
- package/es/notification/hooks/useNotification.d.ts +7 -0
- package/es/notification/hooks/useNotification.js +54 -0
- package/es/notification/index.d.ts +54 -0
- package/es/notification/index.js +342 -0
- package/es/notification/style/index.css +546 -0
- package/{lib/Notification → es/notification}/style/index.d.ts +0 -0
- package/es/notification/style/index.js +1 -0
- package/lib/Alert/ErrorBoundary.d.ts +22 -0
- package/lib/Alert/ErrorBoundary.js +79 -0
- package/lib/Alert/index.d.ts +41 -0
- package/lib/Alert/index.js +215 -0
- package/{es/Notification → lib/Alert}/style/index.css +25 -2
- package/lib/Alert/style/index.d.ts +1 -0
- package/lib/{Notification → Alert}/style/index.js +0 -0
- package/lib/Button/style/{style.css → index.css} +0 -0
- package/lib/Button/style/index.d.ts +1 -1
- package/lib/Button/style/index.js +1 -1
- package/lib/ButtonTags/style/{style.css → index.css} +0 -0
- package/lib/ButtonTags/style/index.js +1 -1
- package/lib/CardTable/card/PictureTextColumn.js +8 -6
- package/lib/CardTable/card/PictureTextRow.js +1 -1
- package/lib/CardTable/fns/index.js +38 -9
- package/lib/CardTable/{toolbar → pager}/TablePagination.js +0 -0
- package/lib/CardTable/pager/index.js +48 -0
- package/{es/CardTable/style/style.css → lib/CardTable/style/index.css} +2 -2
- package/lib/CardTable/style/index.js +1 -1
- package/lib/CardTable/table/TableRoot.js +20 -18
- package/lib/CardTable/table/TableWrapper.js +4 -0
- package/lib/CardTable/toolbar/ToolBarBottom.js +8 -27
- package/lib/Checkbox/style/{style.css → index.css} +0 -0
- package/lib/Checkbox/style/index.js +1 -1
- package/lib/CkFilter/style/{style.css → index.css} +0 -0
- package/lib/CkFilter/style/index.js +1 -1
- package/lib/CustomerService/style/{style.css → index.css} +0 -0
- package/lib/CustomerService/style/index.js +1 -1
- package/lib/EditTable/style/{style.css → index.css} +0 -0
- package/lib/EditTable/style/index.js +1 -1
- package/lib/EnlargeImg/style/{style.css → index.css} +0 -0
- package/lib/EnlargeImg/style/index.js +1 -1
- package/lib/Filter/style/{style.css → index.css} +0 -0
- package/lib/Filter/style/index.js +1 -1
- package/lib/IconSelect/style/{style.css → index.css} +0 -0
- package/lib/IconSelect/style/index.js +1 -1
- package/lib/Input/style/{style.css → index.css} +0 -0
- package/lib/Input/style/index.js +1 -1
- package/lib/LeftTable/style/{style.css → index.css} +0 -0
- package/lib/LeftTable/style/index.js +1 -1
- package/lib/LmEditTable/style/{style.css → index.css} +0 -0
- package/lib/LmEditTable/style/index.d.ts +1 -1
- package/lib/LmEditTable/style/index.js +1 -1
- package/lib/LmFilter/LmFilter.js +27 -0
- package/lib/LmFilter/baseFilter/index.js +34 -0
- package/lib/LmFilter/clearFilter/index.js +33 -0
- package/lib/LmFilter/complexFilter/index.js +17 -0
- package/lib/LmFilter/components/CascaderFilter.js +183 -0
- package/lib/LmFilter/components/CheckboxFilter.js +197 -0
- package/lib/LmFilter/components/DateFilter.js +147 -0
- package/lib/LmFilter/components/DropdownFIlter.js +162 -0
- package/lib/LmFilter/components/EmptyFilter.js +27 -0
- package/lib/LmFilter/components/InputFilter.js +52 -0
- package/lib/LmFilter/components/InputSearchClose.js +74 -0
- package/lib/LmFilter/components/SelectFilter.js +113 -0
- package/lib/LmFilter/components/fuzzySearch.js +37 -0
- package/lib/LmFilter/components/index.js +97 -0
- package/lib/LmFilter/customFilter/index.js +17 -0
- package/lib/LmFilter/filterFns/index.js +54 -0
- package/lib/LmFilter/hooks/index.js +18 -0
- package/lib/LmFilter/hooks/useDelayedFn.js +27 -0
- package/lib/LmFilter/icon_placeholder.png +0 -0
- package/lib/LmFilter/index.js +16 -0
- package/lib/LmFilter/style/index.js +3 -0
- package/lib/LmFilter/style/style.css +189 -0
- package/lib/LmFilter/utils.js +55 -0
- package/lib/LmFilter/wrapper/Filter.js +33 -0
- package/lib/LmFilter/wrapper/FilterContainer.js +29 -0
- package/lib/LmFilter/wrapper/FilterRoot.js +114 -0
- package/lib/LmFilter/wrapper/FilterWrapper.js +25 -0
- package/lib/LmTable/Table.js +3 -5
- package/{es/LmTable/style/style.css → lib/LmTable/style/index.css} +6 -0
- package/lib/LmTable/style/index.js +1 -1
- package/lib/OldModal/style/{style.css → index.css} +0 -0
- package/lib/OldModal/style/index.js +1 -1
- package/lib/PopTable/style/{style.css → index.css} +0 -0
- package/lib/PopTable/style/index.js +1 -1
- package/lib/ProTable/style/{style.css → index.css} +0 -0
- package/lib/ProTable/style/index.js +1 -1
- package/lib/Radio/style/{style.css → index.css} +0 -0
- package/lib/Radio/style/index.js +1 -1
- package/lib/TableRender/style/{style.css → index.css} +0 -0
- package/lib/TableRender/style/index.js +1 -1
- package/lib/UploadOss/style/{style.css → index.css} +0 -0
- package/lib/UploadOss/style/index.js +1 -1
- package/lib/VirtualList/style/{style.css → index.css} +0 -0
- package/lib/VirtualList/style/index.js +1 -1
- package/lib/_util/getDataOrAriaProps.d.ts +1 -0
- package/lib/_util/getDataOrAriaProps.js +16 -0
- package/lib/_util/reactNode.d.ts +7 -0
- package/lib/_util/reactNode.js +24 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/lib/message/hooks/useMessage.d.ts +7 -0
- package/lib/message/hooks/useMessage.js +101 -0
- package/lib/message/index.d.ts +63 -4
- package/lib/message/index.js +262 -16
- package/lib/message/style/index.css +28 -1
- package/lib/notification/hooks/useNotification.d.ts +7 -0
- package/lib/notification/hooks/useNotification.js +69 -0
- package/lib/notification/index.d.ts +54 -0
- package/lib/notification/index.js +365 -0
- package/lib/notification/style/index.css +546 -0
- package/lib/notification/style/index.d.ts +1 -0
- package/lib/notification/style/index.js +3 -0
- package/package.json +1 -1
- package/dist/Notification/index.d.ts +0 -7
- package/es/Notification/index.d.ts +0 -7
- package/es/Notification/index.js +0 -10
- package/lib/Notification/index.d.ts +0 -7
- package/lib/Notification/index.js +0 -23
package/dist/index.umd.js
CHANGED
|
@@ -1,18 +1,39 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('antd/es/button/style'), require('antd/es/button'), require('react'), require('antd/es/card/style'), require('antd/es/card'), require('antd/es/cascader/style'), require('antd/es/cascader'), require('antd/es/checkbox/style'), require('antd/es/checkbox'), require('antd/es/date-picker/style'), require('antd/es/date-picker'), require('react-dom'), require('antd/es/drawer/style'), require('antd/es/drawer'), require('antd/es/space/style'), require('antd/es/space'), require('antd/es/tag/style'), require('antd/es/tag'), require('antd/es/form/style'), require('antd/es/form'), require('antd/es/input/style'), require('antd/es/input'), require('antd/es/dropdown/style'), require('antd/es/dropdown'), require('antd/es/table/style'), require('antd/es/table'), require('antd/es/radio/style'), require('antd/es/radio'), require('antd/es/select/style'), require('antd/es/select'), require('antd/es/input-number/style'), require('antd/es/input-number'), require('antd/es/spin/style'), require('antd/es/spin'), require('antd/es/message/style'), require('antd/es/message'), require('antd/es/image/style'), require('antd/es/image'), require('antd/es/empty/style'), require('antd/es/empty'), require('antd/es/modal/style'), require('antd/es/modal'), require('antd/es/row/style'), require('antd/es/row'), require('antd/es/col/style'), require('antd/es/col'), require('antd/es/divider/style'), require('antd/es/divider'), require('antd/es/list/style'), require('antd/es/list'), require('antd/es/popover/style'), require('antd/es/popover'), require('antd/es/tree/style'), require('antd/es/tree'), require('antd/es/time-picker/style'), require('antd/es/time-picker'), require('antd/es/config-provider/style'), require('antd/es/config-provider'), require('antd/es/avatar/style'), require('antd/es/avatar'), require('react/jsx-runtime'), require('antd/es/locale/zh_CN'), require('antd/es/result/style'), require('antd/es/result'), require('antd/es/tooltip/style'), require('antd/es/tooltip'), require('antd/es/typography/style'), require('antd/es/typography'), require('antd/es/popconfirm/style'), require('antd/es/popconfirm'), require('antd/es/table/hooks/useLazyKVMap'), require('antd/es/badge/style'), require('antd/es/badge'), require('antd/es/progress/style'), require('antd/es/progress'), require('antd/es/rate/style'), require('antd/es/rate'), require('antd/es/switch/style'), require('antd/es/switch'), require('antd/es/tree-select/style'), require('antd/es/tree-select'), require('antd/es/tabs/style'), require('antd/es/tabs'), require('antd/es/grid/style'), require('antd/es/grid'), require('antd/es/steps/style'), require('antd/es/steps'), require('antd/es/upload/style'), require('antd/es/upload'), require('antd/es/alert/style'), require('antd/es/alert'), require('antd/es/menu/style'), require('antd/es/menu'), require('antd/es/notification/style'), require('antd/es/notification'), require('antd/es/pagination/style'), require('antd/es/pagination'), require('antd/lib/form/hooks/useFormInstance'), require('antd/lib/form/context'), require('antd/lib/form/Form')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(['exports', 'antd/es/button/style', 'antd/es/button', 'react', 'antd/es/card/style', 'antd/es/card', 'antd/es/cascader/style', 'antd/es/cascader', 'antd/es/checkbox/style', 'antd/es/checkbox', 'antd/es/date-picker/style', 'antd/es/date-picker', 'react-dom', 'antd/es/drawer/style', 'antd/es/drawer', 'antd/es/space/style', 'antd/es/space', 'antd/es/tag/style', 'antd/es/tag', 'antd/es/form/style', 'antd/es/form', 'antd/es/input/style', 'antd/es/input', 'antd/es/dropdown/style', 'antd/es/dropdown', 'antd/es/table/style', 'antd/es/table', 'antd/es/radio/style', 'antd/es/radio', 'antd/es/select/style', 'antd/es/select', 'antd/es/input-number/style', 'antd/es/input-number', 'antd/es/spin/style', 'antd/es/spin', 'antd/es/message/style', 'antd/es/message', 'antd/es/image/style', 'antd/es/image', 'antd/es/empty/style', 'antd/es/empty', 'antd/es/modal/style', 'antd/es/modal', 'antd/es/row/style', 'antd/es/row', 'antd/es/col/style', 'antd/es/col', 'antd/es/divider/style', 'antd/es/divider', 'antd/es/list/style', 'antd/es/list', 'antd/es/popover/style', 'antd/es/popover', 'antd/es/tree/style', 'antd/es/tree', 'antd/es/time-picker/style', 'antd/es/time-picker', 'antd/es/config-provider/style', 'antd/es/config-provider', 'antd/es/avatar/style', 'antd/es/avatar', 'react/jsx-runtime', 'antd/es/locale/zh_CN', 'antd/es/result/style', 'antd/es/result', 'antd/es/tooltip/style', 'antd/es/tooltip', 'antd/es/typography/style', 'antd/es/typography', 'antd/es/popconfirm/style', 'antd/es/popconfirm', 'antd/es/table/hooks/useLazyKVMap', 'antd/es/badge/style', 'antd/es/badge', 'antd/es/progress/style', 'antd/es/progress', 'antd/es/rate/style', 'antd/es/rate', 'antd/es/switch/style', 'antd/es/switch', 'antd/es/tree-select/style', 'antd/es/tree-select', 'antd/es/tabs/style', 'antd/es/tabs', 'antd/es/grid/style', 'antd/es/grid', 'antd/es/steps/style', 'antd/es/steps', 'antd/es/upload/style', 'antd/es/upload', 'antd/es/alert/style', 'antd/es/alert', 'antd/es/menu/style', 'antd/es/menu', 'antd/es/notification/style', 'antd/es/notification', 'antd/es/pagination/style', 'antd/es/pagination', 'antd/lib/form/hooks/useFormInstance', 'antd/lib/form/context', 'antd/lib/form/Form'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.linkmoreDesign = {}, null, global._Button, global.React, null, global._Card, null, global._Cascader, null, global._Checkbox, null, global._DatePicker, global.
|
|
5
|
-
}(this, (function (exports, style, _Button, React, style$
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.linkmoreDesign = {}, null, global._Button, global.React, null, global._Card, null, global._Cascader, null, global._Checkbox, null, global._DatePicker, global.ReactDOM, null, global._Drawer, null, global._Space, null, global._Tag, null, global._Form, null, global._Input, null, global._Dropdown, null, global._Table, null, global._Radio, null, global._Select, null, global._InputNumber, null, global._Spin, null, global._message, null, global._Image, null, global._Empty, null, global._Modal, null, global._Row, null, global._Col, null, global._Divider, null, global._List, null, global._Popover, null, global._Tree, null, global._TimePicker, null, global._ConfigProvider, null, global._Avatar, global.jsxRuntime, global.zh_CN, null, global._Result, null, global._Tooltip, null, global._Typography, null, global._Popconfirm, global.useLazyKVMap, null, global._Badge, null, global._Progress, null, global._Rate, null, global._Switch, null, global._TreeSelect, null, global._Tabs, null, global._Grid, null, global._Steps, null, global._Upload, null, global._Alert, null, global._Menu, null, global._notification, null, global._Pagination, global.useFormInstance, global.context$2, global.Form$2));
|
|
5
|
+
}(this, (function (exports, style$1, _Button, React, style$2, _Card, style$3, _Cascader, style$4, _Checkbox, style$5, _DatePicker, ReactDOM, style$6, _Drawer, style$7, _Space, style$8, _Tag, style$9, _Form, style$a, _Input, style$b, _Dropdown, style$c, _Table, style$d, _Radio, style$e, _Select, style$f, _InputNumber, style$g, _Spin, style$h, _message, style$i, _Image, style$j, _Empty, style$k, _Modal, style$l, _Row, style$m, _Col, style$n, _Divider, style$o, _List, style$p, _Popover, style$q, _Tree, style$r, _TimePicker, style$s, _ConfigProvider, style$t, _Avatar, jsxRuntime, zh_CN, style$u, _Result, style$v, _Tooltip, style$w, _Typography, style$x, _Popconfirm, useLazyKVMap, style$y, _Badge, style$z, _Progress, style$A, _Rate, style$B, _Switch, style$C, _TreeSelect, style$D, _Tabs, style$E, _Grid, style$F, _Steps, style$G, _Upload, style$H, _Alert, style$I, _Menu, style$J, _notification, style$K, _Pagination, useFormInstance, context$2, Form$2) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
9
|
+
function _interopNamespace(e) {
|
|
10
|
+
if (e && e.__esModule) return e;
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () {
|
|
19
|
+
return e[k];
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n['default'] = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
28
|
+
|
|
9
29
|
var _Button__default = /*#__PURE__*/_interopDefaultLegacy(_Button);
|
|
10
30
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
11
31
|
var _Card__default = /*#__PURE__*/_interopDefaultLegacy(_Card);
|
|
12
32
|
var _Cascader__default = /*#__PURE__*/_interopDefaultLegacy(_Cascader);
|
|
13
33
|
var _Checkbox__default = /*#__PURE__*/_interopDefaultLegacy(_Checkbox);
|
|
14
34
|
var _DatePicker__default = /*#__PURE__*/_interopDefaultLegacy(_DatePicker);
|
|
15
|
-
var
|
|
35
|
+
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
36
|
+
var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
|
|
16
37
|
var _Drawer__default = /*#__PURE__*/_interopDefaultLegacy(_Drawer);
|
|
17
38
|
var _Space__default = /*#__PURE__*/_interopDefaultLegacy(_Space);
|
|
18
39
|
var _Tag__default = /*#__PURE__*/_interopDefaultLegacy(_Tag);
|
|
@@ -2004,6 +2025,19 @@
|
|
|
2004
2025
|
CheckCircleFilled$1.displayName = 'CheckCircleFilled';
|
|
2005
2026
|
var CheckCircleFilled$2 = /*#__PURE__*/React.forwardRef(CheckCircleFilled$1);
|
|
2006
2027
|
|
|
2028
|
+
// This icon file is generated automatically.
|
|
2029
|
+
var CheckCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "check-circle", "theme": "outlined" };
|
|
2030
|
+
|
|
2031
|
+
var CheckCircleOutlined$1 = function CheckCircleOutlined$1(props, ref) {
|
|
2032
|
+
return /*#__PURE__*/React.createElement(Icon, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2033
|
+
ref: ref,
|
|
2034
|
+
icon: CheckCircleOutlined
|
|
2035
|
+
}));
|
|
2036
|
+
};
|
|
2037
|
+
|
|
2038
|
+
CheckCircleOutlined$1.displayName = 'CheckCircleOutlined';
|
|
2039
|
+
var CheckCircleOutlined$2 = /*#__PURE__*/React.forwardRef(CheckCircleOutlined$1);
|
|
2040
|
+
|
|
2007
2041
|
// This icon file is generated automatically.
|
|
2008
2042
|
var ClockCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm176.5 585.7l-28.6 39a7.99 7.99 0 01-11.2 1.7L483.3 569.8a7.92 7.92 0 01-3.3-6.5V288c0-4.4 3.6-8 8-8h48.1c4.4 0 8 3.6 8 8v247.5l142.6 103.1c3.6 2.5 4.4 7.5 1.8 11.1z" } }] }, "name": "clock-circle", "theme": "filled" };
|
|
2009
2043
|
|
|
@@ -2017,6 +2051,32 @@
|
|
|
2017
2051
|
ClockCircleFilled$1.displayName = 'ClockCircleFilled';
|
|
2018
2052
|
var ClockCircleFilled$2 = /*#__PURE__*/React.forwardRef(ClockCircleFilled$1);
|
|
2019
2053
|
|
|
2054
|
+
// This icon file is generated automatically.
|
|
2055
|
+
var CloseCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z" } }] }, "name": "close-circle", "theme": "filled" };
|
|
2056
|
+
|
|
2057
|
+
var CloseCircleFilled$1 = function CloseCircleFilled$1(props, ref) {
|
|
2058
|
+
return /*#__PURE__*/React.createElement(Icon, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2059
|
+
ref: ref,
|
|
2060
|
+
icon: CloseCircleFilled
|
|
2061
|
+
}));
|
|
2062
|
+
};
|
|
2063
|
+
|
|
2064
|
+
CloseCircleFilled$1.displayName = 'CloseCircleFilled';
|
|
2065
|
+
var CloseCircleFilled$2 = /*#__PURE__*/React.forwardRef(CloseCircleFilled$1);
|
|
2066
|
+
|
|
2067
|
+
// This icon file is generated automatically.
|
|
2068
|
+
var CloseCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4 66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z" } }, { "tag": "path", "attrs": { "d": "M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "close-circle", "theme": "outlined" };
|
|
2069
|
+
|
|
2070
|
+
var CloseCircleOutlined$1 = function CloseCircleOutlined$1(props, ref) {
|
|
2071
|
+
return /*#__PURE__*/React.createElement(Icon, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2072
|
+
ref: ref,
|
|
2073
|
+
icon: CloseCircleOutlined
|
|
2074
|
+
}));
|
|
2075
|
+
};
|
|
2076
|
+
|
|
2077
|
+
CloseCircleOutlined$1.displayName = 'CloseCircleOutlined';
|
|
2078
|
+
var CloseCircleOutlined$2 = /*#__PURE__*/React.forwardRef(CloseCircleOutlined$1);
|
|
2079
|
+
|
|
2020
2080
|
// This icon file is generated automatically.
|
|
2021
2081
|
var CloseOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z" } }] }, "name": "close", "theme": "outlined" };
|
|
2022
2082
|
|
|
@@ -2108,6 +2168,32 @@
|
|
|
2108
2168
|
EllipsisOutlined$1.displayName = 'EllipsisOutlined';
|
|
2109
2169
|
var EllipsisOutlined$2 = /*#__PURE__*/React.forwardRef(EllipsisOutlined$1);
|
|
2110
2170
|
|
|
2171
|
+
// This icon file is generated automatically.
|
|
2172
|
+
var ExclamationCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "exclamation-circle", "theme": "filled" };
|
|
2173
|
+
|
|
2174
|
+
var ExclamationCircleFilled$1 = function ExclamationCircleFilled$1(props, ref) {
|
|
2175
|
+
return /*#__PURE__*/React.createElement(Icon, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2176
|
+
ref: ref,
|
|
2177
|
+
icon: ExclamationCircleFilled
|
|
2178
|
+
}));
|
|
2179
|
+
};
|
|
2180
|
+
|
|
2181
|
+
ExclamationCircleFilled$1.displayName = 'ExclamationCircleFilled';
|
|
2182
|
+
var ExclamationCircleFilled$2 = /*#__PURE__*/React.forwardRef(ExclamationCircleFilled$1);
|
|
2183
|
+
|
|
2184
|
+
// This icon file is generated automatically.
|
|
2185
|
+
var ExclamationCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, "name": "exclamation-circle", "theme": "outlined" };
|
|
2186
|
+
|
|
2187
|
+
var ExclamationCircleOutlined$1 = function ExclamationCircleOutlined$1(props, ref) {
|
|
2188
|
+
return /*#__PURE__*/React.createElement(Icon, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2189
|
+
ref: ref,
|
|
2190
|
+
icon: ExclamationCircleOutlined
|
|
2191
|
+
}));
|
|
2192
|
+
};
|
|
2193
|
+
|
|
2194
|
+
ExclamationCircleOutlined$1.displayName = 'ExclamationCircleOutlined';
|
|
2195
|
+
var ExclamationCircleOutlined$2 = /*#__PURE__*/React.forwardRef(ExclamationCircleOutlined$1);
|
|
2196
|
+
|
|
2111
2197
|
// This icon file is generated automatically.
|
|
2112
2198
|
var ExportOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M888.3 757.4h-53.8c-4.2 0-7.7 3.5-7.7 7.7v61.8H197.1V197.1h629.8v61.8c0 4.2 3.5 7.7 7.7 7.7h53.8c4.2 0 7.7-3.4 7.7-7.7V158.7c0-17-13.7-30.7-30.7-30.7H158.7c-17 0-30.7 13.7-30.7 30.7v706.6c0 17 13.7 30.7 30.7 30.7h706.6c17 0 30.7-13.7 30.7-30.7V765.1c0-4.3-3.5-7.7-7.7-7.7zm18.6-251.7L765 393.7c-5.3-4.2-13-.4-13 6.3v76H438c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z" } }] }, "name": "export", "theme": "outlined" };
|
|
2113
2199
|
|
|
@@ -2199,6 +2285,19 @@
|
|
|
2199
2285
|
HolderOutlined$1.displayName = 'HolderOutlined';
|
|
2200
2286
|
var HolderOutlined$2 = /*#__PURE__*/React.forwardRef(HolderOutlined$1);
|
|
2201
2287
|
|
|
2288
|
+
// This icon file is generated automatically.
|
|
2289
|
+
var InfoCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "info-circle", "theme": "filled" };
|
|
2290
|
+
|
|
2291
|
+
var InfoCircleFilled$1 = function InfoCircleFilled$1(props, ref) {
|
|
2292
|
+
return /*#__PURE__*/React.createElement(Icon, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2293
|
+
ref: ref,
|
|
2294
|
+
icon: InfoCircleFilled
|
|
2295
|
+
}));
|
|
2296
|
+
};
|
|
2297
|
+
|
|
2298
|
+
InfoCircleFilled$1.displayName = 'InfoCircleFilled';
|
|
2299
|
+
var InfoCircleFilled$2 = /*#__PURE__*/React.forwardRef(InfoCircleFilled$1);
|
|
2300
|
+
|
|
2202
2301
|
// This icon file is generated automatically.
|
|
2203
2302
|
var InfoCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z" } }] }, "name": "info-circle", "theme": "outlined" };
|
|
2204
2303
|
|
|
@@ -26766,7 +26865,7 @@
|
|
|
26766
26865
|
}
|
|
26767
26866
|
|
|
26768
26867
|
}), [announce, announcements]));
|
|
26769
|
-
return mounted ?
|
|
26868
|
+
return mounted ? ReactDOM.createPortal(React__default['default'].createElement(React__default['default'].Fragment, null, React__default['default'].createElement(HiddenText, {
|
|
26770
26869
|
id: hiddenTextDescribedById,
|
|
26771
26870
|
value: screenReaderInstructions.draggable
|
|
26772
26871
|
}), React__default['default'].createElement(LiveRegion, {
|
|
@@ -28708,7 +28807,7 @@
|
|
|
28708
28807
|
rect: activeRects
|
|
28709
28808
|
}
|
|
28710
28809
|
};
|
|
28711
|
-
|
|
28810
|
+
ReactDOM.unstable_batchedUpdates(() => {
|
|
28712
28811
|
dispatch({
|
|
28713
28812
|
type: Action.DragStart,
|
|
28714
28813
|
initialCoordinates,
|
|
@@ -28732,7 +28831,7 @@
|
|
|
28732
28831
|
onEnd: createHandler(Action.DragEnd),
|
|
28733
28832
|
onCancel: createHandler(Action.DragCancel)
|
|
28734
28833
|
});
|
|
28735
|
-
|
|
28834
|
+
ReactDOM.unstable_batchedUpdates(() => {
|
|
28736
28835
|
setActiveSensor(sensorInstance);
|
|
28737
28836
|
setActivatorEvent(event.nativeEvent);
|
|
28738
28837
|
});
|
|
@@ -28768,7 +28867,7 @@
|
|
|
28768
28867
|
}
|
|
28769
28868
|
|
|
28770
28869
|
activeRef.current = null;
|
|
28771
|
-
|
|
28870
|
+
ReactDOM.unstable_batchedUpdates(() => {
|
|
28772
28871
|
dispatch({
|
|
28773
28872
|
type
|
|
28774
28873
|
});
|
|
@@ -28893,7 +28992,7 @@
|
|
|
28893
28992
|
},
|
|
28894
28993
|
over
|
|
28895
28994
|
};
|
|
28896
|
-
|
|
28995
|
+
ReactDOM.unstable_batchedUpdates(() => {
|
|
28897
28996
|
setOver(over);
|
|
28898
28997
|
setMonitorState({
|
|
28899
28998
|
type: Action.DragOver,
|
|
@@ -58398,7 +58497,7 @@
|
|
|
58398
58497
|
_createClass(WithSortableHandle, [{
|
|
58399
58498
|
key: "componentDidMount",
|
|
58400
58499
|
value: function componentDidMount() {
|
|
58401
|
-
var node =
|
|
58500
|
+
var node = ReactDOM.findDOMNode(this);
|
|
58402
58501
|
node.sortableHandle = true;
|
|
58403
58502
|
}
|
|
58404
58503
|
}, {
|
|
@@ -59458,7 +59557,7 @@
|
|
|
59458
59557
|
var getContainer = this.props.getContainer;
|
|
59459
59558
|
|
|
59460
59559
|
if (typeof getContainer !== 'function') {
|
|
59461
|
-
return
|
|
59560
|
+
return ReactDOM.findDOMNode(this);
|
|
59462
59561
|
}
|
|
59463
59562
|
|
|
59464
59563
|
return getContainer(config.withRef ? this.getWrappedInstance() : undefined);
|
|
@@ -59583,7 +59682,7 @@
|
|
|
59583
59682
|
collection = _this$props.collection,
|
|
59584
59683
|
disabled = _this$props.disabled,
|
|
59585
59684
|
index = _this$props.index;
|
|
59586
|
-
var node =
|
|
59685
|
+
var node = ReactDOM.findDOMNode(this);
|
|
59587
59686
|
node.sortableInfo = {
|
|
59588
59687
|
collection: collection,
|
|
59589
59688
|
disabled: disabled,
|
|
@@ -68012,7 +68111,7 @@
|
|
|
68012
68111
|
}, [(_context$locale3 = context.locale) === null || _context$locale3 === void 0 ? void 0 : (_context$locale3$Moda = _context$locale3.Modal) === null || _context$locale3$Moda === void 0 ? void 0 : _context$locale3$Moda.cancelText, (_context$locale4 = context.locale) === null || _context$locale4 === void 0 ? void 0 : (_context$locale4$Moda = _context$locale4.Modal) === null || _context$locale4$Moda === void 0 ? void 0 : _context$locale4$Moda.okText, drawerProps, rest.submitter, setVisible, loading, submitTimeout]);
|
|
68013
68112
|
var contentRender = React.useCallback(function (formDom, submitter) {
|
|
68014
68113
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
68015
|
-
children: [formDom, footerRef.current && submitter ? /*#__PURE__*/
|
|
68114
|
+
children: [formDom, footerRef.current && submitter ? /*#__PURE__*/ReactDOM.createPortal(submitter, footerRef.current) : submitter]
|
|
68016
68115
|
});
|
|
68017
68116
|
}, []);
|
|
68018
68117
|
var onFinishHandle = useRefFunction( /*#__PURE__*/function () {
|
|
@@ -68487,7 +68586,7 @@
|
|
|
68487
68586
|
}, [(_context$locale3 = context.locale) === null || _context$locale3 === void 0 ? void 0 : (_context$locale3$Moda = _context$locale3.Modal) === null || _context$locale3$Moda === void 0 ? void 0 : _context$locale3$Moda.cancelText, (_context$locale4 = context.locale) === null || _context$locale4 === void 0 ? void 0 : (_context$locale4$Moda = _context$locale4.Modal) === null || _context$locale4$Moda === void 0 ? void 0 : _context$locale4$Moda.okText, modalProps, rest.submitter, setVisible, loading, submitTimeout]);
|
|
68488
68587
|
var contentRender = React.useCallback(function (formDom, submitter) {
|
|
68489
68588
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
68490
|
-
children: [formDom, footerRef.current && submitter ? /*#__PURE__*/
|
|
68589
|
+
children: [formDom, footerRef.current && submitter ? /*#__PURE__*/ReactDOM.createPortal(submitter, footerRef.current) : submitter]
|
|
68491
68590
|
});
|
|
68492
68591
|
}, []);
|
|
68493
68592
|
var onFinishHandle = React.useCallback( /*#__PURE__*/function () {
|
|
@@ -68662,7 +68761,7 @@
|
|
|
68662
68761
|
return node;
|
|
68663
68762
|
}
|
|
68664
68763
|
|
|
68665
|
-
return
|
|
68764
|
+
return ReactDOM__default['default'].findDOMNode(node);
|
|
68666
68765
|
}
|
|
68667
68766
|
|
|
68668
68767
|
/**
|
|
@@ -76605,7 +76704,7 @@
|
|
|
76605
76704
|
|
|
76606
76705
|
var _propTypes = _interopRequireDefault(propTypes);
|
|
76607
76706
|
|
|
76608
|
-
var _reactDom = _interopRequireDefault(
|
|
76707
|
+
var _reactDom = _interopRequireDefault(ReactDOM__default['default']);
|
|
76609
76708
|
|
|
76610
76709
|
|
|
76611
76710
|
|
|
@@ -77184,7 +77283,7 @@
|
|
|
77184
77283
|
|
|
77185
77284
|
var _propTypes = _interopRequireDefault(propTypes);
|
|
77186
77285
|
|
|
77187
|
-
var _reactDom = _interopRequireDefault(
|
|
77286
|
+
var _reactDom = _interopRequireDefault(ReactDOM__default['default']);
|
|
77188
77287
|
|
|
77189
77288
|
var _clsx2 = _interopRequireDefault(require$$3);
|
|
77190
77289
|
|
|
@@ -78355,7 +78454,6 @@
|
|
|
78355
78454
|
var index = dataSource.findIndex(function (x) {
|
|
78356
78455
|
return x[rowKey || 'index'] === restProps['data-row-key'];
|
|
78357
78456
|
});
|
|
78358
|
-
console.log(dataSource, restProps, 222, index);
|
|
78359
78457
|
return /*#__PURE__*/React__default['default'].createElement(SortableItem, _extends({
|
|
78360
78458
|
index: index
|
|
78361
78459
|
}, restProps));
|
|
@@ -78420,7 +78518,6 @@
|
|
|
78420
78518
|
}
|
|
78421
78519
|
});
|
|
78422
78520
|
});
|
|
78423
|
-
console.log(sortOpen ? [sortDefaultColumnItem].concat(_toConsumableArray(result)) : result, 'sortOpen ? [sortDefaultColumnItem, ...result] : result');
|
|
78424
78521
|
return sortOpen ? [sortDefaultColumnItem].concat(_toConsumableArray(result)) : result;
|
|
78425
78522
|
}, [useColumns, sortOpen]);
|
|
78426
78523
|
React.useEffect(function () {
|
|
@@ -78432,8 +78529,6 @@
|
|
|
78432
78529
|
trigger = _Object$assign.trigger,
|
|
78433
78530
|
highlight = _Object$assign.highlight;
|
|
78434
78531
|
|
|
78435
|
-
console.log(trigger, highlight, 'rowclick');
|
|
78436
|
-
|
|
78437
78532
|
if (highlight) {
|
|
78438
78533
|
setActiveKey(record[rowKey]);
|
|
78439
78534
|
}
|
|
@@ -78613,7 +78708,9 @@
|
|
|
78613
78708
|
rowClick === null || rowClick === void 0 ? void 0 : rowClick(value);
|
|
78614
78709
|
},
|
|
78615
78710
|
checkboxRecords: useSelectedRows.selectedRows,
|
|
78616
|
-
columns:
|
|
78711
|
+
columns: useColumns.map(function (item) {
|
|
78712
|
+
return lodash.omit(item, ['render', 'sorter', 'onFilter', 'filters']);
|
|
78713
|
+
})
|
|
78617
78714
|
};
|
|
78618
78715
|
}); // loading触发清空选中状态
|
|
78619
78716
|
|
|
@@ -81993,419 +82090,2620 @@
|
|
|
81993
82090
|
LMModal.destroyAll = _Modal__default['default'].destroyAll;
|
|
81994
82091
|
LMModal.config = _Modal__default['default'].config;
|
|
81995
82092
|
|
|
81996
|
-
var
|
|
82093
|
+
var fullClone = _objectSpread2({}, ReactDOM__namespace);
|
|
81997
82094
|
|
|
81998
|
-
var
|
|
81999
|
-
|
|
82000
|
-
|
|
82001
|
-
|
|
82002
|
-
children = props.children,
|
|
82003
|
-
reset = _objectWithoutProperties(props, _excluded$17);
|
|
82095
|
+
var version = fullClone.version,
|
|
82096
|
+
reactRender = fullClone.render,
|
|
82097
|
+
unmountComponentAtNode = fullClone.unmountComponentAtNode;
|
|
82098
|
+
var createRoot;
|
|
82004
82099
|
|
|
82005
|
-
|
|
82006
|
-
|
|
82007
|
-
};
|
|
82100
|
+
try {
|
|
82101
|
+
var mainVersion = Number((version || '').split('.')[0]);
|
|
82008
82102
|
|
|
82009
|
-
|
|
82010
|
-
|
|
82011
|
-
}
|
|
82103
|
+
if (mainVersion >= 18) {
|
|
82104
|
+
createRoot = fullClone.createRoot;
|
|
82105
|
+
}
|
|
82106
|
+
} catch (e) {// Do nothing;
|
|
82107
|
+
}
|
|
82012
82108
|
|
|
82013
|
-
|
|
82014
|
-
|
|
82015
|
-
width: 480,
|
|
82016
|
-
visible: visible,
|
|
82017
|
-
onOk: handleClose,
|
|
82018
|
-
onCancel: handleClose,
|
|
82019
|
-
wrapClassName: wrapClassName ? "".concat(wrapClassName, " lm_addModal") : 'lm_addModal',
|
|
82020
|
-
okButtonProps: {
|
|
82021
|
-
size: 'default'
|
|
82022
|
-
},
|
|
82023
|
-
cancelButtonProps: {
|
|
82024
|
-
size: 'default'
|
|
82025
|
-
},
|
|
82026
|
-
footer: [/*#__PURE__*/React__default['default'].createElement(_Button__default['default'], {
|
|
82027
|
-
size: "large",
|
|
82028
|
-
type: "primary",
|
|
82029
|
-
key: "back",
|
|
82030
|
-
icon: /*#__PURE__*/React__default['default'].createElement(SaveOutlined$2, null),
|
|
82031
|
-
onClick: onSave
|
|
82032
|
-
}, "\u4FDD\u5B58")]
|
|
82033
|
-
};
|
|
82034
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(_Modal__default['default'], _extends({}, config, reset), children));
|
|
82035
|
-
};
|
|
82109
|
+
function toggleWarning(skip) {
|
|
82110
|
+
var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = fullClone.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
82036
82111
|
|
|
82037
|
-
|
|
82038
|
-
|
|
82039
|
-
|
|
82040
|
-
|
|
82041
|
-
*/
|
|
82112
|
+
if (__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && _typeof$1(__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === 'object') {
|
|
82113
|
+
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skip;
|
|
82114
|
+
}
|
|
82115
|
+
}
|
|
82042
82116
|
|
|
82043
|
-
var
|
|
82044
|
-
var type = _ref.type,
|
|
82045
|
-
resetProps = _objectWithoutProperties(_ref, _excluded$18);
|
|
82117
|
+
var MARK = '__rc_react_root__';
|
|
82046
82118
|
|
|
82047
|
-
|
|
82048
|
-
|
|
82049
|
-
|
|
82050
|
-
|
|
82051
|
-
|
|
82052
|
-
|
|
82053
|
-
|
|
82054
|
-
}
|
|
82055
|
-
});
|
|
82119
|
+
function modernRender(node, container) {
|
|
82120
|
+
toggleWarning(true);
|
|
82121
|
+
var root = container[MARK] || createRoot(container);
|
|
82122
|
+
toggleWarning(false);
|
|
82123
|
+
root.render(node);
|
|
82124
|
+
container[MARK] = root;
|
|
82125
|
+
}
|
|
82056
82126
|
|
|
82057
|
-
|
|
82058
|
-
|
|
82059
|
-
|
|
82060
|
-
|
|
82061
|
-
|
|
82062
|
-
|
|
82063
|
-
|
|
82127
|
+
function legacyRender(node, container) {
|
|
82128
|
+
reactRender(node, container);
|
|
82129
|
+
}
|
|
82130
|
+
function render$3(node, container) {
|
|
82131
|
+
if (createRoot) {
|
|
82132
|
+
modernRender(node, container);
|
|
82133
|
+
return;
|
|
82134
|
+
}
|
|
82064
82135
|
|
|
82065
|
-
|
|
82066
|
-
|
|
82067
|
-
type: "lmweb-info-circle",
|
|
82068
|
-
style: {
|
|
82069
|
-
color: '#FD9727'
|
|
82070
|
-
}
|
|
82071
|
-
});
|
|
82136
|
+
legacyRender(node, container);
|
|
82137
|
+
} // ========================= Unmount ==========================
|
|
82072
82138
|
|
|
82073
|
-
|
|
82074
|
-
|
|
82075
|
-
|
|
82076
|
-
style: {
|
|
82077
|
-
color: '#1890fc'
|
|
82078
|
-
}
|
|
82079
|
-
});
|
|
82139
|
+
function modernUnmount(_x) {
|
|
82140
|
+
return _modernUnmount.apply(this, arguments);
|
|
82141
|
+
}
|
|
82080
82142
|
|
|
82081
|
-
|
|
82082
|
-
|
|
82083
|
-
|
|
82084
|
-
|
|
82085
|
-
|
|
82086
|
-
|
|
82087
|
-
|
|
82088
|
-
|
|
82089
|
-
};
|
|
82143
|
+
function _modernUnmount() {
|
|
82144
|
+
_modernUnmount = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(container) {
|
|
82145
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
82146
|
+
while (1) {
|
|
82147
|
+
switch (_context.prev = _context.next) {
|
|
82148
|
+
case 0:
|
|
82149
|
+
return _context.abrupt("return", Promise.resolve().then(function () {
|
|
82150
|
+
var _container$MARK;
|
|
82090
82151
|
|
|
82091
|
-
|
|
82092
|
-
|
|
82093
|
-
|
|
82094
|
-
content: 'Bla bla ...',
|
|
82095
|
-
okText: '确认',
|
|
82096
|
-
cancelText: '取消',
|
|
82097
|
-
wrapClassName: 'lm_modal_confirm',
|
|
82098
|
-
closable: true
|
|
82099
|
-
}, resetProps));
|
|
82100
|
-
};
|
|
82152
|
+
(_container$MARK = container[MARK]) === null || _container$MARK === void 0 ? void 0 : _container$MARK.unmount();
|
|
82153
|
+
delete container[MARK];
|
|
82154
|
+
}));
|
|
82101
82155
|
|
|
82102
|
-
|
|
82156
|
+
case 1:
|
|
82157
|
+
case "end":
|
|
82158
|
+
return _context.stop();
|
|
82159
|
+
}
|
|
82160
|
+
}
|
|
82161
|
+
}, _callee);
|
|
82162
|
+
}));
|
|
82163
|
+
return _modernUnmount.apply(this, arguments);
|
|
82164
|
+
}
|
|
82103
82165
|
|
|
82104
|
-
|
|
82105
|
-
|
|
82106
|
-
|
|
82107
|
-
|
|
82108
|
-
|
|
82166
|
+
function legacyUnmount(container) {
|
|
82167
|
+
unmountComponentAtNode(container);
|
|
82168
|
+
}
|
|
82169
|
+
function unmount(_x2) {
|
|
82170
|
+
return _unmount.apply(this, arguments);
|
|
82171
|
+
}
|
|
82109
82172
|
|
|
82110
|
-
|
|
82111
|
-
|
|
82112
|
-
|
|
82113
|
-
|
|
82114
|
-
|
|
82115
|
-
|
|
82116
|
-
|
|
82117
|
-
|
|
82118
|
-
|
|
82119
|
-
|
|
82120
|
-
size: 'default'
|
|
82121
|
-
}
|
|
82122
|
-
};
|
|
82123
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(_Modal__default['default'], _extends({}, config, reset), children));
|
|
82124
|
-
};
|
|
82173
|
+
function _unmount() {
|
|
82174
|
+
_unmount = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(container) {
|
|
82175
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
82176
|
+
while (1) {
|
|
82177
|
+
switch (_context2.prev = _context2.next) {
|
|
82178
|
+
case 0:
|
|
82179
|
+
if (!(createRoot !== undefined)) {
|
|
82180
|
+
_context2.next = 2;
|
|
82181
|
+
break;
|
|
82182
|
+
}
|
|
82125
82183
|
|
|
82126
|
-
|
|
82127
|
-
var downLink = [{
|
|
82128
|
-
id: '1',
|
|
82129
|
-
label: '成衣',
|
|
82130
|
-
value: 'link',
|
|
82131
|
-
icon: 'export'
|
|
82132
|
-
}, {
|
|
82133
|
-
id: '2',
|
|
82134
|
-
label: '面料',
|
|
82135
|
-
value: 'link',
|
|
82136
|
-
icon: 'export'
|
|
82137
|
-
}, {
|
|
82138
|
-
id: '3',
|
|
82139
|
-
label: '辅料',
|
|
82140
|
-
value: 'link',
|
|
82141
|
-
icon: 'export'
|
|
82142
|
-
}];
|
|
82143
|
-
var desc1 = [{
|
|
82144
|
-
id: '1',
|
|
82145
|
-
value: '红色为必填字段'
|
|
82146
|
-
}, {
|
|
82147
|
-
id: '2',
|
|
82148
|
-
value: '导入仅允许新增供应商信息'
|
|
82149
|
-
}];
|
|
82150
|
-
/*
|
|
82151
|
-
文件上传区域
|
|
82152
|
-
multiple:是否多选
|
|
82153
|
-
accept:文件选择时的默认类型筛选:"image/jpeg"、text/csv、application/msword、application/vnd.ms-excel => accept=".xlsx, .xls"
|
|
82154
|
-
type: 限制上传文件的类型
|
|
82155
|
-
size:文件大小(M)
|
|
82156
|
-
*/
|
|
82184
|
+
return _context2.abrupt("return", modernUnmount(container));
|
|
82157
82185
|
|
|
82158
|
-
|
|
82159
|
-
|
|
82160
|
-
multiple = _ref.multiple,
|
|
82161
|
-
_ref$fileLength = _ref.fileLength,
|
|
82162
|
-
fileLength = _ref$fileLength === void 0 ? 99 : _ref$fileLength,
|
|
82163
|
-
onChange = _ref.onChange,
|
|
82164
|
-
accept = _ref.accept,
|
|
82165
|
-
_ref$type = _ref.type,
|
|
82166
|
-
type = _ref$type === void 0 ? ['xls', 'xlsx'] : _ref$type,
|
|
82167
|
-
_ref$size = _ref.size,
|
|
82168
|
-
size = _ref$size === void 0 ? 100 : _ref$size;
|
|
82169
|
-
var fileRef = React.useRef(null); // 文件保存
|
|
82170
|
-
// 解决同文件的多次上传问题
|
|
82186
|
+
case 2:
|
|
82187
|
+
legacyUnmount(container);
|
|
82171
82188
|
|
|
82172
|
-
|
|
82173
|
-
|
|
82189
|
+
case 3:
|
|
82190
|
+
case "end":
|
|
82191
|
+
return _context2.stop();
|
|
82192
|
+
}
|
|
82193
|
+
}
|
|
82194
|
+
}, _callee2);
|
|
82195
|
+
}));
|
|
82196
|
+
return _unmount.apply(this, arguments);
|
|
82197
|
+
}
|
|
82198
|
+
|
|
82199
|
+
// Event wrapper. Copy from react source code
|
|
82200
|
+
|
|
82201
|
+
function makePrefixMap(styleProp, eventName) {
|
|
82202
|
+
var prefixes = {};
|
|
82203
|
+
prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
|
|
82204
|
+
prefixes["Webkit".concat(styleProp)] = "webkit".concat(eventName);
|
|
82205
|
+
prefixes["Moz".concat(styleProp)] = "moz".concat(eventName);
|
|
82206
|
+
prefixes["ms".concat(styleProp)] = "MS".concat(eventName);
|
|
82207
|
+
prefixes["O".concat(styleProp)] = "o".concat(eventName.toLowerCase());
|
|
82208
|
+
return prefixes;
|
|
82209
|
+
}
|
|
82210
|
+
|
|
82211
|
+
function getVendorPrefixes(domSupport, win) {
|
|
82212
|
+
var prefixes = {
|
|
82213
|
+
animationend: makePrefixMap('Animation', 'AnimationEnd'),
|
|
82214
|
+
transitionend: makePrefixMap('Transition', 'TransitionEnd')
|
|
82174
82215
|
};
|
|
82175
82216
|
|
|
82176
|
-
|
|
82177
|
-
|
|
82217
|
+
if (domSupport) {
|
|
82218
|
+
if (!('AnimationEvent' in win)) {
|
|
82219
|
+
delete prefixes.animationend.animation;
|
|
82220
|
+
}
|
|
82178
82221
|
|
|
82179
|
-
if (
|
|
82180
|
-
|
|
82181
|
-
}
|
|
82222
|
+
if (!('TransitionEvent' in win)) {
|
|
82223
|
+
delete prefixes.transitionend.transition;
|
|
82224
|
+
}
|
|
82225
|
+
}
|
|
82182
82226
|
|
|
82227
|
+
return prefixes;
|
|
82228
|
+
}
|
|
82229
|
+
var vendorPrefixes = getVendorPrefixes(canUseDom(), typeof window !== 'undefined' ? window : {});
|
|
82230
|
+
var style = {};
|
|
82183
82231
|
|
|
82184
|
-
|
|
82185
|
-
|
|
82232
|
+
if (canUseDom()) {
|
|
82233
|
+
var _document$createEleme = document.createElement('div');
|
|
82186
82234
|
|
|
82187
|
-
|
|
82188
|
-
|
|
82189
|
-
return _message__default['default'].warning("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF01\u4EC5\u652F\u6301".concat(content, "\u7684\u6587\u4EF6\u7C7B\u578B\uFF01"), 1.5);
|
|
82190
|
-
}
|
|
82235
|
+
style = _document$createEleme.style;
|
|
82236
|
+
}
|
|
82191
82237
|
|
|
82192
|
-
|
|
82193
|
-
|
|
82238
|
+
var prefixedEventNames = {};
|
|
82239
|
+
function getVendorPrefixedEventName(eventName) {
|
|
82240
|
+
if (prefixedEventNames[eventName]) {
|
|
82241
|
+
return prefixedEventNames[eventName];
|
|
82242
|
+
}
|
|
82243
|
+
|
|
82244
|
+
var prefixMap = vendorPrefixes[eventName];
|
|
82245
|
+
|
|
82246
|
+
if (prefixMap) {
|
|
82247
|
+
var stylePropList = Object.keys(prefixMap);
|
|
82248
|
+
var len = stylePropList.length;
|
|
82249
|
+
|
|
82250
|
+
for (var i = 0; i < len; i += 1) {
|
|
82251
|
+
var styleProp = stylePropList[i];
|
|
82252
|
+
|
|
82253
|
+
if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in style) {
|
|
82254
|
+
prefixedEventNames[eventName] = prefixMap[styleProp];
|
|
82255
|
+
return prefixedEventNames[eventName];
|
|
82194
82256
|
}
|
|
82195
82257
|
}
|
|
82258
|
+
}
|
|
82196
82259
|
|
|
82197
|
-
|
|
82198
|
-
|
|
82199
|
-
|
|
82200
|
-
|
|
82260
|
+
return '';
|
|
82261
|
+
}
|
|
82262
|
+
var internalAnimationEndName = getVendorPrefixedEventName('animationend');
|
|
82263
|
+
var internalTransitionEndName = getVendorPrefixedEventName('transitionend');
|
|
82264
|
+
var supportTransition = !!(internalAnimationEndName && internalTransitionEndName);
|
|
82265
|
+
var animationEndName = internalAnimationEndName || 'animationend';
|
|
82266
|
+
var transitionEndName = internalTransitionEndName || 'transitionend';
|
|
82267
|
+
function getTransitionName(transitionName, transitionType) {
|
|
82268
|
+
if (!transitionName) return null;
|
|
82269
|
+
|
|
82270
|
+
if (_typeof$1(transitionName) === 'object') {
|
|
82271
|
+
var type = transitionType.replace(/-\w/g, function (match) {
|
|
82272
|
+
return match[1].toUpperCase();
|
|
82273
|
+
});
|
|
82274
|
+
return transitionName[type];
|
|
82275
|
+
}
|
|
82201
82276
|
|
|
82202
|
-
return
|
|
82203
|
-
|
|
82204
|
-
|
|
82205
|
-
|
|
82206
|
-
|
|
82207
|
-
|
|
82208
|
-
|
|
82209
|
-
|
|
82210
|
-
|
|
82211
|
-
|
|
82212
|
-
|
|
82213
|
-
|
|
82214
|
-
|
|
82215
|
-
|
|
82216
|
-
|
|
82217
|
-
}, "\u70B9\u51FB\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u8FD9\u91CC\u4E0A\u4F20")));
|
|
82277
|
+
return "".concat(transitionName, "-").concat(transitionType);
|
|
82278
|
+
}
|
|
82279
|
+
|
|
82280
|
+
var STATUS_NONE = 'none';
|
|
82281
|
+
var STATUS_APPEAR = 'appear';
|
|
82282
|
+
var STATUS_ENTER = 'enter';
|
|
82283
|
+
var STATUS_LEAVE = 'leave';
|
|
82284
|
+
var STEP_NONE = 'none';
|
|
82285
|
+
var STEP_PREPARE = 'prepare';
|
|
82286
|
+
var STEP_START = 'start';
|
|
82287
|
+
var STEP_ACTIVE = 'active';
|
|
82288
|
+
var STEP_ACTIVATED = 'end';
|
|
82289
|
+
|
|
82290
|
+
var raf = function raf(callback) {
|
|
82291
|
+
return +setTimeout(callback, 16);
|
|
82218
82292
|
};
|
|
82219
82293
|
|
|
82220
|
-
var
|
|
82221
|
-
|
|
82222
|
-
|
|
82223
|
-
onSure = _ref2.onSure,
|
|
82224
|
-
_ref2$down = _ref2.down,
|
|
82225
|
-
down = _ref2$down === void 0 ? downLink : _ref2$down,
|
|
82226
|
-
_ref2$desc = _ref2.desc,
|
|
82227
|
-
desc = _ref2$desc === void 0 ? desc1 : _ref2$desc,
|
|
82228
|
-
downEvent = _ref2.downEvent,
|
|
82229
|
-
isType = _ref2.isType,
|
|
82230
|
-
renderFileType = _ref2.renderFileType,
|
|
82231
|
-
resetProps = _objectWithoutProperties(_ref2, _excluded$1a);
|
|
82294
|
+
var caf = function caf(num) {
|
|
82295
|
+
return clearTimeout(num);
|
|
82296
|
+
};
|
|
82232
82297
|
|
|
82233
|
-
|
|
82234
|
-
|
|
82235
|
-
|
|
82236
|
-
|
|
82237
|
-
fileValue = _useState2[0],
|
|
82238
|
-
setFileValue = _useState2[1]; // 数据改变事件
|
|
82298
|
+
if (typeof window !== 'undefined' && 'requestAnimationFrame' in window) {
|
|
82299
|
+
raf = function raf(callback) {
|
|
82300
|
+
return window.requestAnimationFrame(callback);
|
|
82301
|
+
};
|
|
82239
82302
|
|
|
82303
|
+
caf = function caf(handle) {
|
|
82304
|
+
return window.cancelAnimationFrame(handle);
|
|
82305
|
+
};
|
|
82306
|
+
}
|
|
82240
82307
|
|
|
82241
|
-
|
|
82242
|
-
|
|
82243
|
-
}; // 确定事件
|
|
82308
|
+
var rafUUID = 0;
|
|
82309
|
+
var rafIds = new Map();
|
|
82244
82310
|
|
|
82311
|
+
function cleanup(id) {
|
|
82312
|
+
rafIds.delete(id);
|
|
82313
|
+
}
|
|
82245
82314
|
|
|
82246
|
-
|
|
82247
|
-
|
|
82315
|
+
function wrapperRaf(callback) {
|
|
82316
|
+
var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
82317
|
+
rafUUID += 1;
|
|
82318
|
+
var id = rafUUID;
|
|
82248
82319
|
|
|
82249
|
-
|
|
82250
|
-
|
|
82320
|
+
function callRef(leftTimes) {
|
|
82321
|
+
if (leftTimes === 0) {
|
|
82322
|
+
// Clean up
|
|
82323
|
+
cleanup(id); // Trigger
|
|
82324
|
+
|
|
82325
|
+
callback();
|
|
82326
|
+
} else {
|
|
82327
|
+
// Next raf
|
|
82328
|
+
var realId = raf(function () {
|
|
82329
|
+
callRef(leftTimes - 1);
|
|
82330
|
+
}); // Bind real raf id
|
|
82331
|
+
|
|
82332
|
+
rafIds.set(id, realId);
|
|
82251
82333
|
}
|
|
82334
|
+
}
|
|
82252
82335
|
|
|
82253
|
-
|
|
82254
|
-
|
|
82255
|
-
|
|
82256
|
-
files: []
|
|
82257
|
-
}));
|
|
82258
|
-
return false;
|
|
82259
|
-
}; // 删除事件
|
|
82336
|
+
callRef(times);
|
|
82337
|
+
return id;
|
|
82338
|
+
}
|
|
82260
82339
|
|
|
82340
|
+
wrapperRaf.cancel = function (id) {
|
|
82341
|
+
var realId = rafIds.get(id);
|
|
82342
|
+
cleanup(realId);
|
|
82343
|
+
return caf(realId);
|
|
82344
|
+
};
|
|
82261
82345
|
|
|
82262
|
-
|
|
82263
|
-
|
|
82264
|
-
return v.name !== name;
|
|
82265
|
-
});
|
|
82266
|
-
setFileValue(_objectSpread(_objectSpread({}, fileValue), {}, {
|
|
82267
|
-
files: nValue
|
|
82268
|
-
}));
|
|
82269
|
-
}; // 关闭弹框
|
|
82346
|
+
var useNextFrame = (function () {
|
|
82347
|
+
var nextFrameRef = React.useRef(null);
|
|
82270
82348
|
|
|
82349
|
+
function cancelNextFrame() {
|
|
82350
|
+
wrapperRaf.cancel(nextFrameRef.current);
|
|
82351
|
+
}
|
|
82271
82352
|
|
|
82272
|
-
|
|
82273
|
-
|
|
82274
|
-
|
|
82275
|
-
|
|
82276
|
-
|
|
82353
|
+
function nextFrame(callback) {
|
|
82354
|
+
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
82355
|
+
cancelNextFrame();
|
|
82356
|
+
var nextFrameId = wrapperRaf(function () {
|
|
82357
|
+
if (delay <= 1) {
|
|
82358
|
+
callback({
|
|
82359
|
+
isCanceled: function isCanceled() {
|
|
82360
|
+
return nextFrameId !== nextFrameRef.current;
|
|
82361
|
+
}
|
|
82362
|
+
});
|
|
82363
|
+
} else {
|
|
82364
|
+
nextFrame(callback, delay - 1);
|
|
82365
|
+
}
|
|
82277
82366
|
});
|
|
82278
|
-
|
|
82367
|
+
nextFrameRef.current = nextFrameId;
|
|
82368
|
+
}
|
|
82279
82369
|
|
|
82280
|
-
|
|
82281
|
-
|
|
82282
|
-
|
|
82283
|
-
|
|
82284
|
-
|
|
82285
|
-
|
|
82286
|
-
|
|
82287
|
-
|
|
82288
|
-
|
|
82289
|
-
|
|
82290
|
-
|
|
82291
|
-
|
|
82292
|
-
|
|
82293
|
-
|
|
82294
|
-
|
|
82295
|
-
|
|
82296
|
-
|
|
82297
|
-
|
|
82298
|
-
return
|
|
82299
|
-
|
|
82300
|
-
|
|
82301
|
-
|
|
82302
|
-
|
|
82303
|
-
|
|
82304
|
-
|
|
82305
|
-
|
|
82306
|
-
|
|
82307
|
-
|
|
82308
|
-
|
|
82309
|
-
|
|
82310
|
-
|
|
82311
|
-
|
|
82312
|
-
|
|
82313
|
-
|
|
82314
|
-
|
|
82370
|
+
React.useEffect(function () {
|
|
82371
|
+
return function () {
|
|
82372
|
+
cancelNextFrame();
|
|
82373
|
+
};
|
|
82374
|
+
}, []);
|
|
82375
|
+
return [nextFrame, cancelNextFrame];
|
|
82376
|
+
});
|
|
82377
|
+
|
|
82378
|
+
var useIsomorphicLayoutEffect$3 = canUseDom() ? React.useLayoutEffect : React.useEffect;
|
|
82379
|
+
|
|
82380
|
+
var STEP_QUEUE = [STEP_PREPARE, STEP_START, STEP_ACTIVE, STEP_ACTIVATED];
|
|
82381
|
+
/** Skip current step */
|
|
82382
|
+
|
|
82383
|
+
var SkipStep = false;
|
|
82384
|
+
/** Current step should be update in */
|
|
82385
|
+
|
|
82386
|
+
var DoStep = true;
|
|
82387
|
+
function isActive(step) {
|
|
82388
|
+
return step === STEP_ACTIVE || step === STEP_ACTIVATED;
|
|
82389
|
+
}
|
|
82390
|
+
var useStepQueue = (function (status, callback) {
|
|
82391
|
+
var _useState = useSafeState(STEP_NONE),
|
|
82392
|
+
_useState2 = _slicedToArray$1(_useState, 2),
|
|
82393
|
+
step = _useState2[0],
|
|
82394
|
+
setStep = _useState2[1];
|
|
82395
|
+
|
|
82396
|
+
var _useNextFrame = useNextFrame(),
|
|
82397
|
+
_useNextFrame2 = _slicedToArray$1(_useNextFrame, 2),
|
|
82398
|
+
nextFrame = _useNextFrame2[0],
|
|
82399
|
+
cancelNextFrame = _useNextFrame2[1];
|
|
82400
|
+
|
|
82401
|
+
function startQueue() {
|
|
82402
|
+
setStep(STEP_PREPARE, true);
|
|
82403
|
+
}
|
|
82404
|
+
|
|
82405
|
+
useIsomorphicLayoutEffect$3(function () {
|
|
82406
|
+
if (step !== STEP_NONE && step !== STEP_ACTIVATED) {
|
|
82407
|
+
var index = STEP_QUEUE.indexOf(step);
|
|
82408
|
+
var nextStep = STEP_QUEUE[index + 1];
|
|
82409
|
+
var result = callback(step);
|
|
82410
|
+
|
|
82411
|
+
if (result === SkipStep) {
|
|
82412
|
+
// Skip when no needed
|
|
82413
|
+
setStep(nextStep, true);
|
|
82414
|
+
} else {
|
|
82415
|
+
// Do as frame for step update
|
|
82416
|
+
nextFrame(function (info) {
|
|
82417
|
+
function doNext() {
|
|
82418
|
+
// Skip since current queue is ood
|
|
82419
|
+
if (info.isCanceled()) return;
|
|
82420
|
+
setStep(nextStep, true);
|
|
82421
|
+
}
|
|
82422
|
+
|
|
82423
|
+
if (result === true) {
|
|
82424
|
+
doNext();
|
|
82425
|
+
} else {
|
|
82426
|
+
// Only promise should be async
|
|
82427
|
+
Promise.resolve(result).then(doNext);
|
|
82428
|
+
}
|
|
82429
|
+
});
|
|
82315
82430
|
}
|
|
82316
|
-
}, /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
82317
|
-
type: "lmweb-file-excel"
|
|
82318
|
-
}), /*#__PURE__*/React__default['default'].createElement("div", null, v.label));
|
|
82319
|
-
})))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
82320
|
-
className: "file_upload file_item"
|
|
82321
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
82322
|
-
className: "file_title"
|
|
82323
|
-
}, "\u4E0A\u4F20\u6587\u4EF6"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
82324
|
-
className: "file_content"
|
|
82325
|
-
}, /*#__PURE__*/React__default['default'].createElement(ImportBox, _extends({
|
|
82326
|
-
value: fileValue.files,
|
|
82327
|
-
onChange: handleChange
|
|
82328
|
-
}, resetProps)), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
82329
|
-
className: "file_view"
|
|
82330
|
-
}, fileValue.files.map(function (v, idx) {
|
|
82331
|
-
return (
|
|
82332
|
-
/*#__PURE__*/
|
|
82333
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
82334
|
-
React__default['default'].createElement("div", {
|
|
82335
|
-
key: idx,
|
|
82336
|
-
className: "file_view_item"
|
|
82337
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
82338
|
-
className: "file_view_item_label"
|
|
82339
|
-
}, /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
82340
|
-
type: "lmweb-file-excel"
|
|
82341
|
-
}), /*#__PURE__*/React__default['default'].createElement("span", null, v.name)), /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
82342
|
-
type: "lmweb-close1",
|
|
82343
|
-
className: "file_view_item_close",
|
|
82344
|
-
onClick: function onClick() {
|
|
82345
|
-
return handleDelete(v.name);
|
|
82346
|
-
}
|
|
82347
|
-
}))
|
|
82348
|
-
);
|
|
82349
|
-
})))), renderFileType && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
82350
|
-
className: "file_type file_item"
|
|
82351
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
82352
|
-
className: "file_title"
|
|
82353
|
-
}, "\u9009\u62E9\u7C7B\u578B"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
82354
|
-
className: "file_content"
|
|
82355
|
-
}, typeof renderFileType === 'function' ? renderFileType(function (e, field) {
|
|
82356
|
-
return handleChange(e, field);
|
|
82357
|
-
}) : /*#__PURE__*/React__default['default'].createElement(_Radio__default['default'].Group, {
|
|
82358
|
-
defaultValue: 0,
|
|
82359
|
-
onChange: function onChange(e) {
|
|
82360
|
-
return handleChange(e.target.value, 'type');
|
|
82361
82431
|
}
|
|
82362
|
-
},
|
|
82363
|
-
|
|
82364
|
-
|
|
82365
|
-
|
|
82366
|
-
|
|
82367
|
-
|
|
82368
|
-
|
|
82369
|
-
|
|
82370
|
-
}, "\u89C4\u5219\u8BF4\u660E"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
82371
|
-
className: "file_content"
|
|
82372
|
-
}, desc === null || desc === void 0 ? void 0 : desc.map(function (v) {
|
|
82373
|
-
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
82374
|
-
key: v.id
|
|
82375
|
-
}, "".concat(v.id, "\u3001").concat(v.value));
|
|
82376
|
-
})))));
|
|
82377
|
-
};
|
|
82432
|
+
}, [status, step]);
|
|
82433
|
+
React.useEffect(function () {
|
|
82434
|
+
return function () {
|
|
82435
|
+
cancelNextFrame();
|
|
82436
|
+
};
|
|
82437
|
+
}, []);
|
|
82438
|
+
return [startQueue, step];
|
|
82439
|
+
});
|
|
82378
82440
|
|
|
82379
|
-
var
|
|
82380
|
-
|
|
82381
|
-
Modal.EditModal = Index$k;
|
|
82382
|
-
Modal.ExportModal = Index$l;
|
|
82383
|
-
Modal.Confirm = Confirm;
|
|
82441
|
+
var useDomMotionEvents = (function (callback) {
|
|
82442
|
+
var cacheElementRef = React.useRef(); // Cache callback
|
|
82384
82443
|
|
|
82385
|
-
|
|
82386
|
-
|
|
82444
|
+
var callbackRef = React.useRef(callback);
|
|
82445
|
+
callbackRef.current = callback; // Internal motion event handler
|
|
82387
82446
|
|
|
82388
|
-
|
|
82389
|
-
|
|
82390
|
-
|
|
82391
|
-
others = _objectWithoutProperties(props, _excluded$1b);
|
|
82447
|
+
var onInternalMotionEnd = React.useCallback(function (event) {
|
|
82448
|
+
callbackRef.current(event);
|
|
82449
|
+
}, []); // Remove events
|
|
82392
82450
|
|
|
82393
|
-
|
|
82394
|
-
|
|
82395
|
-
|
|
82396
|
-
|
|
82397
|
-
locale: {
|
|
82398
|
-
items_per_page: '/条',
|
|
82399
|
-
jump_to: '前往',
|
|
82400
|
-
page: '页'
|
|
82451
|
+
function removeMotionEvents(element) {
|
|
82452
|
+
if (element) {
|
|
82453
|
+
element.removeEventListener(transitionEndName, onInternalMotionEnd);
|
|
82454
|
+
element.removeEventListener(animationEndName, onInternalMotionEnd);
|
|
82401
82455
|
}
|
|
82402
|
-
}
|
|
82403
|
-
};
|
|
82456
|
+
} // Patch events
|
|
82404
82457
|
|
|
82405
|
-
var _excluded$1c = ["columns", "dataSource", "total", "onClick", "onDoubleClick", "rowSelection", "rowKey", "scroll", "defaultActive", "onChange"];
|
|
82406
82458
|
|
|
82407
|
-
|
|
82408
|
-
|
|
82459
|
+
function patchMotionEvents(element) {
|
|
82460
|
+
if (cacheElementRef.current && cacheElementRef.current !== element) {
|
|
82461
|
+
removeMotionEvents(cacheElementRef.current);
|
|
82462
|
+
}
|
|
82463
|
+
|
|
82464
|
+
if (element && element !== cacheElementRef.current) {
|
|
82465
|
+
element.addEventListener(transitionEndName, onInternalMotionEnd);
|
|
82466
|
+
element.addEventListener(animationEndName, onInternalMotionEnd); // Save as cache in case dom removed trigger by `motionDeadline`
|
|
82467
|
+
|
|
82468
|
+
cacheElementRef.current = element;
|
|
82469
|
+
}
|
|
82470
|
+
} // Clean up when removed
|
|
82471
|
+
|
|
82472
|
+
|
|
82473
|
+
React.useEffect(function () {
|
|
82474
|
+
return function () {
|
|
82475
|
+
removeMotionEvents(cacheElementRef.current);
|
|
82476
|
+
};
|
|
82477
|
+
}, []);
|
|
82478
|
+
return [patchMotionEvents, removeMotionEvents];
|
|
82479
|
+
});
|
|
82480
|
+
|
|
82481
|
+
function useStatus(supportMotion, visible, getElement, _ref) {
|
|
82482
|
+
var _ref$motionEnter = _ref.motionEnter,
|
|
82483
|
+
motionEnter = _ref$motionEnter === void 0 ? true : _ref$motionEnter,
|
|
82484
|
+
_ref$motionAppear = _ref.motionAppear,
|
|
82485
|
+
motionAppear = _ref$motionAppear === void 0 ? true : _ref$motionAppear,
|
|
82486
|
+
_ref$motionLeave = _ref.motionLeave,
|
|
82487
|
+
motionLeave = _ref$motionLeave === void 0 ? true : _ref$motionLeave,
|
|
82488
|
+
motionDeadline = _ref.motionDeadline,
|
|
82489
|
+
motionLeaveImmediately = _ref.motionLeaveImmediately,
|
|
82490
|
+
onAppearPrepare = _ref.onAppearPrepare,
|
|
82491
|
+
onEnterPrepare = _ref.onEnterPrepare,
|
|
82492
|
+
onLeavePrepare = _ref.onLeavePrepare,
|
|
82493
|
+
onAppearStart = _ref.onAppearStart,
|
|
82494
|
+
onEnterStart = _ref.onEnterStart,
|
|
82495
|
+
onLeaveStart = _ref.onLeaveStart,
|
|
82496
|
+
onAppearActive = _ref.onAppearActive,
|
|
82497
|
+
onEnterActive = _ref.onEnterActive,
|
|
82498
|
+
onLeaveActive = _ref.onLeaveActive,
|
|
82499
|
+
onAppearEnd = _ref.onAppearEnd,
|
|
82500
|
+
onEnterEnd = _ref.onEnterEnd,
|
|
82501
|
+
onLeaveEnd = _ref.onLeaveEnd,
|
|
82502
|
+
onVisibleChanged = _ref.onVisibleChanged;
|
|
82503
|
+
|
|
82504
|
+
// Used for outer render usage to avoid `visible: false & status: none` to render nothing
|
|
82505
|
+
var _useState = useSafeState(),
|
|
82506
|
+
_useState2 = _slicedToArray$1(_useState, 2),
|
|
82507
|
+
asyncVisible = _useState2[0],
|
|
82508
|
+
setAsyncVisible = _useState2[1];
|
|
82509
|
+
|
|
82510
|
+
var _useState3 = useSafeState(STATUS_NONE),
|
|
82511
|
+
_useState4 = _slicedToArray$1(_useState3, 2),
|
|
82512
|
+
status = _useState4[0],
|
|
82513
|
+
setStatus = _useState4[1];
|
|
82514
|
+
|
|
82515
|
+
var _useState5 = useSafeState(null),
|
|
82516
|
+
_useState6 = _slicedToArray$1(_useState5, 2),
|
|
82517
|
+
style = _useState6[0],
|
|
82518
|
+
setStyle = _useState6[1];
|
|
82519
|
+
|
|
82520
|
+
var mountedRef = React.useRef(false);
|
|
82521
|
+
var deadlineRef = React.useRef(null); // =========================== Dom Node ===========================
|
|
82522
|
+
|
|
82523
|
+
function getDomElement() {
|
|
82524
|
+
return getElement();
|
|
82525
|
+
} // ========================== Motion End ==========================
|
|
82526
|
+
|
|
82527
|
+
|
|
82528
|
+
var activeRef = React.useRef(false);
|
|
82529
|
+
|
|
82530
|
+
function onInternalMotionEnd(event) {
|
|
82531
|
+
var element = getDomElement();
|
|
82532
|
+
|
|
82533
|
+
if (event && !event.deadline && event.target !== element) {
|
|
82534
|
+
// event exists
|
|
82535
|
+
// not initiated by deadline
|
|
82536
|
+
// transitionEnd not fired by inner elements
|
|
82537
|
+
return;
|
|
82538
|
+
}
|
|
82539
|
+
|
|
82540
|
+
var currentActive = activeRef.current;
|
|
82541
|
+
var canEnd;
|
|
82542
|
+
|
|
82543
|
+
if (status === STATUS_APPEAR && currentActive) {
|
|
82544
|
+
canEnd = onAppearEnd === null || onAppearEnd === void 0 ? void 0 : onAppearEnd(element, event);
|
|
82545
|
+
} else if (status === STATUS_ENTER && currentActive) {
|
|
82546
|
+
canEnd = onEnterEnd === null || onEnterEnd === void 0 ? void 0 : onEnterEnd(element, event);
|
|
82547
|
+
} else if (status === STATUS_LEAVE && currentActive) {
|
|
82548
|
+
canEnd = onLeaveEnd === null || onLeaveEnd === void 0 ? void 0 : onLeaveEnd(element, event);
|
|
82549
|
+
} // Only update status when `canEnd` and not destroyed
|
|
82550
|
+
|
|
82551
|
+
|
|
82552
|
+
if (status !== STATUS_NONE && currentActive && canEnd !== false) {
|
|
82553
|
+
setStatus(STATUS_NONE, true);
|
|
82554
|
+
setStyle(null, true);
|
|
82555
|
+
}
|
|
82556
|
+
}
|
|
82557
|
+
|
|
82558
|
+
var _useDomMotionEvents = useDomMotionEvents(onInternalMotionEnd),
|
|
82559
|
+
_useDomMotionEvents2 = _slicedToArray$1(_useDomMotionEvents, 1),
|
|
82560
|
+
patchMotionEvents = _useDomMotionEvents2[0]; // ============================= Step =============================
|
|
82561
|
+
|
|
82562
|
+
|
|
82563
|
+
var eventHandlers = React.useMemo(function () {
|
|
82564
|
+
var _ref2, _ref3, _ref4;
|
|
82565
|
+
|
|
82566
|
+
switch (status) {
|
|
82567
|
+
case STATUS_APPEAR:
|
|
82568
|
+
return _ref2 = {}, _defineProperty$1(_ref2, STEP_PREPARE, onAppearPrepare), _defineProperty$1(_ref2, STEP_START, onAppearStart), _defineProperty$1(_ref2, STEP_ACTIVE, onAppearActive), _ref2;
|
|
82569
|
+
|
|
82570
|
+
case STATUS_ENTER:
|
|
82571
|
+
return _ref3 = {}, _defineProperty$1(_ref3, STEP_PREPARE, onEnterPrepare), _defineProperty$1(_ref3, STEP_START, onEnterStart), _defineProperty$1(_ref3, STEP_ACTIVE, onEnterActive), _ref3;
|
|
82572
|
+
|
|
82573
|
+
case STATUS_LEAVE:
|
|
82574
|
+
return _ref4 = {}, _defineProperty$1(_ref4, STEP_PREPARE, onLeavePrepare), _defineProperty$1(_ref4, STEP_START, onLeaveStart), _defineProperty$1(_ref4, STEP_ACTIVE, onLeaveActive), _ref4;
|
|
82575
|
+
|
|
82576
|
+
default:
|
|
82577
|
+
return {};
|
|
82578
|
+
}
|
|
82579
|
+
}, [status]);
|
|
82580
|
+
|
|
82581
|
+
var _useStepQueue = useStepQueue(status, function (newStep) {
|
|
82582
|
+
// Only prepare step can be skip
|
|
82583
|
+
if (newStep === STEP_PREPARE) {
|
|
82584
|
+
var onPrepare = eventHandlers[STEP_PREPARE];
|
|
82585
|
+
|
|
82586
|
+
if (!onPrepare) {
|
|
82587
|
+
return SkipStep;
|
|
82588
|
+
}
|
|
82589
|
+
|
|
82590
|
+
return onPrepare(getDomElement());
|
|
82591
|
+
} // Rest step is sync update
|
|
82592
|
+
|
|
82593
|
+
|
|
82594
|
+
// Rest step is sync update
|
|
82595
|
+
if (step in eventHandlers) {
|
|
82596
|
+
var _eventHandlers$step;
|
|
82597
|
+
|
|
82598
|
+
setStyle(((_eventHandlers$step = eventHandlers[step]) === null || _eventHandlers$step === void 0 ? void 0 : _eventHandlers$step.call(eventHandlers, getDomElement(), null)) || null);
|
|
82599
|
+
}
|
|
82600
|
+
|
|
82601
|
+
if (step === STEP_ACTIVE) {
|
|
82602
|
+
// Patch events when motion needed
|
|
82603
|
+
patchMotionEvents(getDomElement());
|
|
82604
|
+
|
|
82605
|
+
if (motionDeadline > 0) {
|
|
82606
|
+
clearTimeout(deadlineRef.current);
|
|
82607
|
+
deadlineRef.current = setTimeout(function () {
|
|
82608
|
+
onInternalMotionEnd({
|
|
82609
|
+
deadline: true
|
|
82610
|
+
});
|
|
82611
|
+
}, motionDeadline);
|
|
82612
|
+
}
|
|
82613
|
+
}
|
|
82614
|
+
|
|
82615
|
+
return DoStep;
|
|
82616
|
+
}),
|
|
82617
|
+
_useStepQueue2 = _slicedToArray$1(_useStepQueue, 2),
|
|
82618
|
+
startStep = _useStepQueue2[0],
|
|
82619
|
+
step = _useStepQueue2[1];
|
|
82620
|
+
|
|
82621
|
+
var active = isActive(step);
|
|
82622
|
+
activeRef.current = active; // ============================ Status ============================
|
|
82623
|
+
// Update with new status
|
|
82624
|
+
|
|
82625
|
+
useIsomorphicLayoutEffect$3(function () {
|
|
82626
|
+
setAsyncVisible(visible);
|
|
82627
|
+
var isMounted = mountedRef.current;
|
|
82628
|
+
mountedRef.current = true;
|
|
82629
|
+
|
|
82630
|
+
if (!supportMotion) {
|
|
82631
|
+
return;
|
|
82632
|
+
}
|
|
82633
|
+
|
|
82634
|
+
var nextStatus; // Appear
|
|
82635
|
+
|
|
82636
|
+
if (!isMounted && visible && motionAppear) {
|
|
82637
|
+
nextStatus = STATUS_APPEAR;
|
|
82638
|
+
} // Enter
|
|
82639
|
+
|
|
82640
|
+
|
|
82641
|
+
if (isMounted && visible && motionEnter) {
|
|
82642
|
+
nextStatus = STATUS_ENTER;
|
|
82643
|
+
} // Leave
|
|
82644
|
+
|
|
82645
|
+
|
|
82646
|
+
if (isMounted && !visible && motionLeave || !isMounted && motionLeaveImmediately && !visible && motionLeave) {
|
|
82647
|
+
nextStatus = STATUS_LEAVE;
|
|
82648
|
+
} // Update to next status
|
|
82649
|
+
|
|
82650
|
+
|
|
82651
|
+
if (nextStatus) {
|
|
82652
|
+
setStatus(nextStatus);
|
|
82653
|
+
startStep();
|
|
82654
|
+
}
|
|
82655
|
+
}, [visible]); // ============================ Effect ============================
|
|
82656
|
+
// Reset when motion changed
|
|
82657
|
+
|
|
82658
|
+
React.useEffect(function () {
|
|
82659
|
+
if ( // Cancel appear
|
|
82660
|
+
status === STATUS_APPEAR && !motionAppear || // Cancel enter
|
|
82661
|
+
status === STATUS_ENTER && !motionEnter || // Cancel leave
|
|
82662
|
+
status === STATUS_LEAVE && !motionLeave) {
|
|
82663
|
+
setStatus(STATUS_NONE);
|
|
82664
|
+
}
|
|
82665
|
+
}, [motionAppear, motionEnter, motionLeave]);
|
|
82666
|
+
React.useEffect(function () {
|
|
82667
|
+
return function () {
|
|
82668
|
+
mountedRef.current = false;
|
|
82669
|
+
clearTimeout(deadlineRef.current);
|
|
82670
|
+
};
|
|
82671
|
+
}, []); // Trigger `onVisibleChanged`
|
|
82672
|
+
|
|
82673
|
+
React.useEffect(function () {
|
|
82674
|
+
if (asyncVisible !== undefined && status === STATUS_NONE) {
|
|
82675
|
+
onVisibleChanged === null || onVisibleChanged === void 0 ? void 0 : onVisibleChanged(asyncVisible);
|
|
82676
|
+
}
|
|
82677
|
+
}, [asyncVisible, status]); // ============================ Styles ============================
|
|
82678
|
+
|
|
82679
|
+
var mergedStyle = style;
|
|
82680
|
+
|
|
82681
|
+
if (eventHandlers[STEP_PREPARE] && step === STEP_START) {
|
|
82682
|
+
mergedStyle = _objectSpread2({
|
|
82683
|
+
transition: 'none'
|
|
82684
|
+
}, mergedStyle);
|
|
82685
|
+
}
|
|
82686
|
+
|
|
82687
|
+
return [status, step, mergedStyle, asyncVisible !== null && asyncVisible !== void 0 ? asyncVisible : visible];
|
|
82688
|
+
}
|
|
82689
|
+
|
|
82690
|
+
var DomWrapper$1 = /*#__PURE__*/function (_React$Component) {
|
|
82691
|
+
_inherits(DomWrapper, _React$Component);
|
|
82692
|
+
|
|
82693
|
+
var _super = _createSuper(DomWrapper);
|
|
82694
|
+
|
|
82695
|
+
function DomWrapper() {
|
|
82696
|
+
_classCallCheck(this, DomWrapper);
|
|
82697
|
+
|
|
82698
|
+
return _super.apply(this, arguments);
|
|
82699
|
+
}
|
|
82700
|
+
|
|
82701
|
+
_createClass(DomWrapper, [{
|
|
82702
|
+
key: "render",
|
|
82703
|
+
value: function render() {
|
|
82704
|
+
return this.props.children;
|
|
82705
|
+
}
|
|
82706
|
+
}]);
|
|
82707
|
+
|
|
82708
|
+
return DomWrapper;
|
|
82709
|
+
}(React.Component);
|
|
82710
|
+
|
|
82711
|
+
/**
|
|
82712
|
+
* `transitionSupport` is used for none transition test case.
|
|
82713
|
+
* Default we use browser transition event support check.
|
|
82714
|
+
*/
|
|
82715
|
+
|
|
82716
|
+
function genCSSMotion(config) {
|
|
82717
|
+
var transitionSupport = config;
|
|
82718
|
+
|
|
82719
|
+
if (_typeof$1(config) === 'object') {
|
|
82720
|
+
transitionSupport = config.transitionSupport;
|
|
82721
|
+
}
|
|
82722
|
+
|
|
82723
|
+
function isSupportTransition(props) {
|
|
82724
|
+
return !!(props.motionName && transitionSupport);
|
|
82725
|
+
}
|
|
82726
|
+
|
|
82727
|
+
var CSSMotion = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
82728
|
+
var _props$visible = props.visible,
|
|
82729
|
+
visible = _props$visible === void 0 ? true : _props$visible,
|
|
82730
|
+
_props$removeOnLeave = props.removeOnLeave,
|
|
82731
|
+
removeOnLeave = _props$removeOnLeave === void 0 ? true : _props$removeOnLeave,
|
|
82732
|
+
forceRender = props.forceRender,
|
|
82733
|
+
children = props.children,
|
|
82734
|
+
motionName = props.motionName,
|
|
82735
|
+
leavedClassName = props.leavedClassName,
|
|
82736
|
+
eventProps = props.eventProps;
|
|
82737
|
+
var supportMotion = isSupportTransition(props); // Ref to the react node, it may be a HTMLElement
|
|
82738
|
+
|
|
82739
|
+
var nodeRef = React.useRef(); // Ref to the dom wrapper in case ref can not pass to HTMLElement
|
|
82740
|
+
|
|
82741
|
+
var wrapperNodeRef = React.useRef();
|
|
82742
|
+
|
|
82743
|
+
function getDomElement() {
|
|
82744
|
+
try {
|
|
82745
|
+
// Here we're avoiding call for findDOMNode since it's deprecated
|
|
82746
|
+
// in strict mode. We're calling it only when node ref is not
|
|
82747
|
+
// an instance of DOM HTMLElement. Otherwise use
|
|
82748
|
+
// findDOMNode as a final resort
|
|
82749
|
+
return nodeRef.current instanceof HTMLElement ? nodeRef.current : findDOMNode(wrapperNodeRef.current);
|
|
82750
|
+
} catch (e) {
|
|
82751
|
+
// Only happen when `motionDeadline` trigger but element removed.
|
|
82752
|
+
return null;
|
|
82753
|
+
}
|
|
82754
|
+
}
|
|
82755
|
+
|
|
82756
|
+
var _useStatus = useStatus(supportMotion, visible, getDomElement, props),
|
|
82757
|
+
_useStatus2 = _slicedToArray$1(_useStatus, 4),
|
|
82758
|
+
status = _useStatus2[0],
|
|
82759
|
+
statusStep = _useStatus2[1],
|
|
82760
|
+
statusStyle = _useStatus2[2],
|
|
82761
|
+
mergedVisible = _useStatus2[3]; // Record whether content has rendered
|
|
82762
|
+
// Will return null for un-rendered even when `removeOnLeave={false}`
|
|
82763
|
+
|
|
82764
|
+
|
|
82765
|
+
var renderedRef = React.useRef(mergedVisible);
|
|
82766
|
+
|
|
82767
|
+
if (mergedVisible) {
|
|
82768
|
+
renderedRef.current = true;
|
|
82769
|
+
} // ====================== Refs ======================
|
|
82770
|
+
|
|
82771
|
+
|
|
82772
|
+
var setNodeRef = React.useCallback(function (node) {
|
|
82773
|
+
nodeRef.current = node;
|
|
82774
|
+
fillRef(ref, node);
|
|
82775
|
+
}, [ref]); // ===================== Render =====================
|
|
82776
|
+
|
|
82777
|
+
var motionChildren;
|
|
82778
|
+
|
|
82779
|
+
var mergedProps = _objectSpread2(_objectSpread2({}, eventProps), {}, {
|
|
82780
|
+
visible: visible
|
|
82781
|
+
});
|
|
82782
|
+
|
|
82783
|
+
if (!children) {
|
|
82784
|
+
// No children
|
|
82785
|
+
motionChildren = null;
|
|
82786
|
+
} else if (status === STATUS_NONE || !isSupportTransition(props)) {
|
|
82787
|
+
// Stable children
|
|
82788
|
+
if (mergedVisible) {
|
|
82789
|
+
motionChildren = children(_objectSpread2({}, mergedProps), setNodeRef);
|
|
82790
|
+
} else if (!removeOnLeave && renderedRef.current) {
|
|
82791
|
+
motionChildren = children(_objectSpread2(_objectSpread2({}, mergedProps), {}, {
|
|
82792
|
+
className: leavedClassName
|
|
82793
|
+
}), setNodeRef);
|
|
82794
|
+
} else if (forceRender) {
|
|
82795
|
+
motionChildren = children(_objectSpread2(_objectSpread2({}, mergedProps), {}, {
|
|
82796
|
+
style: {
|
|
82797
|
+
display: 'none'
|
|
82798
|
+
}
|
|
82799
|
+
}), setNodeRef);
|
|
82800
|
+
} else {
|
|
82801
|
+
motionChildren = null;
|
|
82802
|
+
}
|
|
82803
|
+
} else {
|
|
82804
|
+
var _classNames;
|
|
82805
|
+
|
|
82806
|
+
// In motion
|
|
82807
|
+
var statusSuffix;
|
|
82808
|
+
|
|
82809
|
+
if (statusStep === STEP_PREPARE) {
|
|
82810
|
+
statusSuffix = 'prepare';
|
|
82811
|
+
} else if (isActive(statusStep)) {
|
|
82812
|
+
statusSuffix = 'active';
|
|
82813
|
+
} else if (statusStep === STEP_START) {
|
|
82814
|
+
statusSuffix = 'start';
|
|
82815
|
+
}
|
|
82816
|
+
|
|
82817
|
+
motionChildren = children(_objectSpread2(_objectSpread2({}, mergedProps), {}, {
|
|
82818
|
+
className: classnames(getTransitionName(motionName, status), (_classNames = {}, _defineProperty$1(_classNames, getTransitionName(motionName, "".concat(status, "-").concat(statusSuffix)), statusSuffix), _defineProperty$1(_classNames, motionName, typeof motionName === 'string'), _classNames)),
|
|
82819
|
+
style: statusStyle
|
|
82820
|
+
}), setNodeRef);
|
|
82821
|
+
} // Auto inject ref if child node not have `ref` props
|
|
82822
|
+
|
|
82823
|
+
|
|
82824
|
+
if ( /*#__PURE__*/React.isValidElement(motionChildren) && supportRef(motionChildren)) {
|
|
82825
|
+
var _motionChildren = motionChildren,
|
|
82826
|
+
originNodeRef = _motionChildren.ref;
|
|
82827
|
+
|
|
82828
|
+
if (!originNodeRef) {
|
|
82829
|
+
motionChildren = /*#__PURE__*/React.cloneElement(motionChildren, {
|
|
82830
|
+
ref: setNodeRef
|
|
82831
|
+
});
|
|
82832
|
+
}
|
|
82833
|
+
}
|
|
82834
|
+
|
|
82835
|
+
return /*#__PURE__*/React.createElement(DomWrapper$1, {
|
|
82836
|
+
ref: wrapperNodeRef
|
|
82837
|
+
}, motionChildren);
|
|
82838
|
+
});
|
|
82839
|
+
CSSMotion.displayName = 'CSSMotion';
|
|
82840
|
+
return CSSMotion;
|
|
82841
|
+
}
|
|
82842
|
+
var CSSMotion = genCSSMotion(supportTransition);
|
|
82843
|
+
|
|
82844
|
+
var STATUS_ADD = 'add';
|
|
82845
|
+
var STATUS_KEEP = 'keep';
|
|
82846
|
+
var STATUS_REMOVE = 'remove';
|
|
82847
|
+
var STATUS_REMOVED = 'removed';
|
|
82848
|
+
function wrapKeyToObject(key) {
|
|
82849
|
+
var keyObj;
|
|
82850
|
+
|
|
82851
|
+
if (key && _typeof$1(key) === 'object' && 'key' in key) {
|
|
82852
|
+
keyObj = key;
|
|
82853
|
+
} else {
|
|
82854
|
+
keyObj = {
|
|
82855
|
+
key: key
|
|
82856
|
+
};
|
|
82857
|
+
}
|
|
82858
|
+
|
|
82859
|
+
return _objectSpread2(_objectSpread2({}, keyObj), {}, {
|
|
82860
|
+
key: String(keyObj.key)
|
|
82861
|
+
});
|
|
82862
|
+
}
|
|
82863
|
+
function parseKeys() {
|
|
82864
|
+
var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
82865
|
+
return keys.map(wrapKeyToObject);
|
|
82866
|
+
}
|
|
82867
|
+
function diffKeys() {
|
|
82868
|
+
var prevKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
82869
|
+
var currentKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
82870
|
+
var list = [];
|
|
82871
|
+
var currentIndex = 0;
|
|
82872
|
+
var currentLen = currentKeys.length;
|
|
82873
|
+
var prevKeyObjects = parseKeys(prevKeys);
|
|
82874
|
+
var currentKeyObjects = parseKeys(currentKeys); // Check prev keys to insert or keep
|
|
82875
|
+
|
|
82876
|
+
prevKeyObjects.forEach(function (keyObj) {
|
|
82877
|
+
var hit = false;
|
|
82878
|
+
|
|
82879
|
+
for (var i = currentIndex; i < currentLen; i += 1) {
|
|
82880
|
+
var currentKeyObj = currentKeyObjects[i];
|
|
82881
|
+
|
|
82882
|
+
if (currentKeyObj.key === keyObj.key) {
|
|
82883
|
+
// New added keys should add before current key
|
|
82884
|
+
if (currentIndex < i) {
|
|
82885
|
+
list = list.concat(currentKeyObjects.slice(currentIndex, i).map(function (obj) {
|
|
82886
|
+
return _objectSpread2(_objectSpread2({}, obj), {}, {
|
|
82887
|
+
status: STATUS_ADD
|
|
82888
|
+
});
|
|
82889
|
+
}));
|
|
82890
|
+
currentIndex = i;
|
|
82891
|
+
}
|
|
82892
|
+
|
|
82893
|
+
list.push(_objectSpread2(_objectSpread2({}, currentKeyObj), {}, {
|
|
82894
|
+
status: STATUS_KEEP
|
|
82895
|
+
}));
|
|
82896
|
+
currentIndex += 1;
|
|
82897
|
+
hit = true;
|
|
82898
|
+
break;
|
|
82899
|
+
}
|
|
82900
|
+
} // If not hit, it means key is removed
|
|
82901
|
+
|
|
82902
|
+
|
|
82903
|
+
if (!hit) {
|
|
82904
|
+
list.push(_objectSpread2(_objectSpread2({}, keyObj), {}, {
|
|
82905
|
+
status: STATUS_REMOVE
|
|
82906
|
+
}));
|
|
82907
|
+
}
|
|
82908
|
+
}); // Add rest to the list
|
|
82909
|
+
|
|
82910
|
+
if (currentIndex < currentLen) {
|
|
82911
|
+
list = list.concat(currentKeyObjects.slice(currentIndex).map(function (obj) {
|
|
82912
|
+
return _objectSpread2(_objectSpread2({}, obj), {}, {
|
|
82913
|
+
status: STATUS_ADD
|
|
82914
|
+
});
|
|
82915
|
+
}));
|
|
82916
|
+
}
|
|
82917
|
+
/**
|
|
82918
|
+
* Merge same key when it remove and add again:
|
|
82919
|
+
* [1 - add, 2 - keep, 1 - remove] -> [1 - keep, 2 - keep]
|
|
82920
|
+
*/
|
|
82921
|
+
|
|
82922
|
+
|
|
82923
|
+
var keys = {};
|
|
82924
|
+
list.forEach(function (_ref) {
|
|
82925
|
+
var key = _ref.key;
|
|
82926
|
+
keys[key] = (keys[key] || 0) + 1;
|
|
82927
|
+
});
|
|
82928
|
+
var duplicatedKeys = Object.keys(keys).filter(function (key) {
|
|
82929
|
+
return keys[key] > 1;
|
|
82930
|
+
});
|
|
82931
|
+
duplicatedKeys.forEach(function (matchKey) {
|
|
82932
|
+
// Remove `STATUS_REMOVE` node.
|
|
82933
|
+
list = list.filter(function (_ref2) {
|
|
82934
|
+
var key = _ref2.key,
|
|
82935
|
+
status = _ref2.status;
|
|
82936
|
+
return key !== matchKey || status !== STATUS_REMOVE;
|
|
82937
|
+
}); // Update `STATUS_ADD` to `STATUS_KEEP`
|
|
82938
|
+
|
|
82939
|
+
list.forEach(function (node) {
|
|
82940
|
+
if (node.key === matchKey) {
|
|
82941
|
+
// eslint-disable-next-line no-param-reassign
|
|
82942
|
+
node.status = STATUS_KEEP;
|
|
82943
|
+
}
|
|
82944
|
+
});
|
|
82945
|
+
});
|
|
82946
|
+
return list;
|
|
82947
|
+
}
|
|
82948
|
+
|
|
82949
|
+
var _excluded$17 = ["component", "children", "onVisibleChanged", "onAllRemoved"],
|
|
82950
|
+
_excluded2$j = ["status"];
|
|
82951
|
+
var MOTION_PROP_NAMES = ['eventProps', 'visible', 'children', 'motionName', 'motionAppear', 'motionEnter', 'motionLeave', 'motionLeaveImmediately', 'motionDeadline', 'removeOnLeave', 'leavedClassName', 'onAppearStart', 'onAppearActive', 'onAppearEnd', 'onEnterStart', 'onEnterActive', 'onEnterEnd', 'onLeaveStart', 'onLeaveActive', 'onLeaveEnd'];
|
|
82952
|
+
/**
|
|
82953
|
+
* Generate a CSSMotionList component with config
|
|
82954
|
+
* @param transitionSupport No need since CSSMotionList no longer depends on transition support
|
|
82955
|
+
* @param CSSMotion CSSMotion component
|
|
82956
|
+
*/
|
|
82957
|
+
|
|
82958
|
+
function genCSSMotionList(transitionSupport) {
|
|
82959
|
+
var CSSMotion$1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : CSSMotion;
|
|
82960
|
+
|
|
82961
|
+
var CSSMotionList = /*#__PURE__*/function (_React$Component) {
|
|
82962
|
+
_inherits(CSSMotionList, _React$Component);
|
|
82963
|
+
|
|
82964
|
+
var _super = _createSuper(CSSMotionList);
|
|
82965
|
+
|
|
82966
|
+
function CSSMotionList() {
|
|
82967
|
+
var _this;
|
|
82968
|
+
|
|
82969
|
+
_classCallCheck(this, CSSMotionList);
|
|
82970
|
+
|
|
82971
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
82972
|
+
args[_key] = arguments[_key];
|
|
82973
|
+
}
|
|
82974
|
+
|
|
82975
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
82976
|
+
_this.state = {
|
|
82977
|
+
keyEntities: []
|
|
82978
|
+
};
|
|
82979
|
+
|
|
82980
|
+
_this.removeKey = function (removeKey) {
|
|
82981
|
+
var keyEntities = _this.state.keyEntities;
|
|
82982
|
+
var nextKeyEntities = keyEntities.map(function (entity) {
|
|
82983
|
+
if (entity.key !== removeKey) return entity;
|
|
82984
|
+
return _objectSpread2(_objectSpread2({}, entity), {}, {
|
|
82985
|
+
status: STATUS_REMOVED
|
|
82986
|
+
});
|
|
82987
|
+
});
|
|
82988
|
+
|
|
82989
|
+
_this.setState({
|
|
82990
|
+
keyEntities: nextKeyEntities
|
|
82991
|
+
});
|
|
82992
|
+
|
|
82993
|
+
return nextKeyEntities.filter(function (_ref) {
|
|
82994
|
+
var status = _ref.status;
|
|
82995
|
+
return status !== STATUS_REMOVED;
|
|
82996
|
+
}).length;
|
|
82997
|
+
};
|
|
82998
|
+
|
|
82999
|
+
return _this;
|
|
83000
|
+
}
|
|
83001
|
+
|
|
83002
|
+
_createClass(CSSMotionList, [{
|
|
83003
|
+
key: "render",
|
|
83004
|
+
value: function render() {
|
|
83005
|
+
var _this2 = this;
|
|
83006
|
+
|
|
83007
|
+
var keyEntities = this.state.keyEntities;
|
|
83008
|
+
|
|
83009
|
+
var _this$props = this.props,
|
|
83010
|
+
component = _this$props.component,
|
|
83011
|
+
children = _this$props.children,
|
|
83012
|
+
_onVisibleChanged = _this$props.onVisibleChanged,
|
|
83013
|
+
onAllRemoved = _this$props.onAllRemoved,
|
|
83014
|
+
restProps = _objectWithoutProperties$1(_this$props, _excluded$17);
|
|
83015
|
+
|
|
83016
|
+
var Component = component || React.Fragment;
|
|
83017
|
+
var motionProps = {};
|
|
83018
|
+
MOTION_PROP_NAMES.forEach(function (prop) {
|
|
83019
|
+
motionProps[prop] = restProps[prop];
|
|
83020
|
+
delete restProps[prop];
|
|
83021
|
+
});
|
|
83022
|
+
delete restProps.keys;
|
|
83023
|
+
return /*#__PURE__*/React.createElement(Component, restProps, keyEntities.map(function (_ref2) {
|
|
83024
|
+
var status = _ref2.status,
|
|
83025
|
+
eventProps = _objectWithoutProperties$1(_ref2, _excluded2$j);
|
|
83026
|
+
|
|
83027
|
+
var visible = status === STATUS_ADD || status === STATUS_KEEP;
|
|
83028
|
+
return /*#__PURE__*/React.createElement(CSSMotion$1, _extends$5({}, motionProps, {
|
|
83029
|
+
key: eventProps.key,
|
|
83030
|
+
visible: visible,
|
|
83031
|
+
eventProps: eventProps,
|
|
83032
|
+
onVisibleChanged: function onVisibleChanged(changedVisible) {
|
|
83033
|
+
_onVisibleChanged === null || _onVisibleChanged === void 0 ? void 0 : _onVisibleChanged(changedVisible, {
|
|
83034
|
+
key: eventProps.key
|
|
83035
|
+
});
|
|
83036
|
+
|
|
83037
|
+
if (!changedVisible) {
|
|
83038
|
+
var restKeysCount = _this2.removeKey(eventProps.key);
|
|
83039
|
+
|
|
83040
|
+
if (restKeysCount === 0 && onAllRemoved) {
|
|
83041
|
+
onAllRemoved();
|
|
83042
|
+
}
|
|
83043
|
+
}
|
|
83044
|
+
}
|
|
83045
|
+
}), children);
|
|
83046
|
+
}));
|
|
83047
|
+
}
|
|
83048
|
+
}], [{
|
|
83049
|
+
key: "getDerivedStateFromProps",
|
|
83050
|
+
value: function getDerivedStateFromProps(_ref3, _ref4) {
|
|
83051
|
+
var keys = _ref3.keys;
|
|
83052
|
+
var keyEntities = _ref4.keyEntities;
|
|
83053
|
+
var parsedKeyObjects = parseKeys(keys);
|
|
83054
|
+
var mixedKeyEntities = diffKeys(keyEntities, parsedKeyObjects);
|
|
83055
|
+
return {
|
|
83056
|
+
keyEntities: mixedKeyEntities.filter(function (entity) {
|
|
83057
|
+
var prevEntity = keyEntities.find(function (_ref5) {
|
|
83058
|
+
var key = _ref5.key;
|
|
83059
|
+
return entity.key === key;
|
|
83060
|
+
}); // Remove if already mark as removed
|
|
83061
|
+
|
|
83062
|
+
if (prevEntity && prevEntity.status === STATUS_REMOVED && entity.status === STATUS_REMOVE) {
|
|
83063
|
+
return false;
|
|
83064
|
+
}
|
|
83065
|
+
|
|
83066
|
+
return true;
|
|
83067
|
+
})
|
|
83068
|
+
};
|
|
83069
|
+
} // ZombieJ: Return the count of rest keys. It's safe to refactor if need more info.
|
|
83070
|
+
|
|
83071
|
+
}]);
|
|
83072
|
+
|
|
83073
|
+
return CSSMotionList;
|
|
83074
|
+
}(React.Component);
|
|
83075
|
+
|
|
83076
|
+
CSSMotionList.defaultProps = {
|
|
83077
|
+
component: 'div'
|
|
83078
|
+
};
|
|
83079
|
+
return CSSMotionList;
|
|
83080
|
+
}
|
|
83081
|
+
var CSSMotionList = genCSSMotionList(supportTransition);
|
|
83082
|
+
|
|
83083
|
+
var Notice = /*#__PURE__*/function (_Component) {
|
|
83084
|
+
_inherits(Notice, _Component);
|
|
83085
|
+
|
|
83086
|
+
var _super = _createSuper(Notice);
|
|
83087
|
+
|
|
83088
|
+
function Notice() {
|
|
83089
|
+
var _this;
|
|
83090
|
+
|
|
83091
|
+
_classCallCheck(this, Notice);
|
|
83092
|
+
|
|
83093
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
83094
|
+
args[_key] = arguments[_key];
|
|
83095
|
+
}
|
|
83096
|
+
|
|
83097
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
83098
|
+
_this.closeTimer = null;
|
|
83099
|
+
|
|
83100
|
+
_this.close = function (e) {
|
|
83101
|
+
if (e) {
|
|
83102
|
+
e.stopPropagation();
|
|
83103
|
+
}
|
|
83104
|
+
|
|
83105
|
+
_this.clearCloseTimer();
|
|
83106
|
+
|
|
83107
|
+
var _this$props = _this.props,
|
|
83108
|
+
onClose = _this$props.onClose,
|
|
83109
|
+
noticeKey = _this$props.noticeKey;
|
|
83110
|
+
|
|
83111
|
+
if (onClose) {
|
|
83112
|
+
onClose(noticeKey);
|
|
83113
|
+
}
|
|
83114
|
+
};
|
|
83115
|
+
|
|
83116
|
+
_this.startCloseTimer = function () {
|
|
83117
|
+
if (_this.props.duration) {
|
|
83118
|
+
_this.closeTimer = window.setTimeout(function () {
|
|
83119
|
+
_this.close();
|
|
83120
|
+
}, _this.props.duration * 1000);
|
|
83121
|
+
}
|
|
83122
|
+
};
|
|
83123
|
+
|
|
83124
|
+
_this.clearCloseTimer = function () {
|
|
83125
|
+
if (_this.closeTimer) {
|
|
83126
|
+
clearTimeout(_this.closeTimer);
|
|
83127
|
+
_this.closeTimer = null;
|
|
83128
|
+
}
|
|
83129
|
+
};
|
|
83130
|
+
|
|
83131
|
+
return _this;
|
|
83132
|
+
}
|
|
83133
|
+
|
|
83134
|
+
_createClass(Notice, [{
|
|
83135
|
+
key: "componentDidMount",
|
|
83136
|
+
value: function componentDidMount() {
|
|
83137
|
+
this.startCloseTimer();
|
|
83138
|
+
}
|
|
83139
|
+
}, {
|
|
83140
|
+
key: "componentDidUpdate",
|
|
83141
|
+
value: function componentDidUpdate(prevProps) {
|
|
83142
|
+
if (this.props.duration !== prevProps.duration || this.props.updateMark !== prevProps.updateMark || // Visible again need reset timer
|
|
83143
|
+
this.props.visible !== prevProps.visible && this.props.visible) {
|
|
83144
|
+
this.restartCloseTimer();
|
|
83145
|
+
}
|
|
83146
|
+
}
|
|
83147
|
+
}, {
|
|
83148
|
+
key: "componentWillUnmount",
|
|
83149
|
+
value: function componentWillUnmount() {
|
|
83150
|
+
this.clearCloseTimer();
|
|
83151
|
+
}
|
|
83152
|
+
}, {
|
|
83153
|
+
key: "restartCloseTimer",
|
|
83154
|
+
value: function restartCloseTimer() {
|
|
83155
|
+
this.clearCloseTimer();
|
|
83156
|
+
this.startCloseTimer();
|
|
83157
|
+
}
|
|
83158
|
+
}, {
|
|
83159
|
+
key: "render",
|
|
83160
|
+
value: function render() {
|
|
83161
|
+
var _this2 = this;
|
|
83162
|
+
|
|
83163
|
+
var _this$props2 = this.props,
|
|
83164
|
+
prefixCls = _this$props2.prefixCls,
|
|
83165
|
+
className = _this$props2.className,
|
|
83166
|
+
closable = _this$props2.closable,
|
|
83167
|
+
closeIcon = _this$props2.closeIcon,
|
|
83168
|
+
style = _this$props2.style,
|
|
83169
|
+
onClick = _this$props2.onClick,
|
|
83170
|
+
children = _this$props2.children,
|
|
83171
|
+
holder = _this$props2.holder;
|
|
83172
|
+
var componentClass = "".concat(prefixCls, "-notice");
|
|
83173
|
+
var dataOrAriaAttributeProps = Object.keys(this.props).reduce(function (acc, key) {
|
|
83174
|
+
if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') {
|
|
83175
|
+
acc[key] = _this2.props[key];
|
|
83176
|
+
}
|
|
83177
|
+
|
|
83178
|
+
return acc;
|
|
83179
|
+
}, {});
|
|
83180
|
+
var node = /*#__PURE__*/React.createElement("div", _extends$5({
|
|
83181
|
+
className: classnames(componentClass, className, _defineProperty$1({}, "".concat(componentClass, "-closable"), closable)),
|
|
83182
|
+
style: style,
|
|
83183
|
+
onMouseEnter: this.clearCloseTimer,
|
|
83184
|
+
onMouseLeave: this.startCloseTimer,
|
|
83185
|
+
onClick: onClick
|
|
83186
|
+
}, dataOrAriaAttributeProps), /*#__PURE__*/React.createElement("div", {
|
|
83187
|
+
className: "".concat(componentClass, "-content")
|
|
83188
|
+
}, children), closable ? /*#__PURE__*/React.createElement("a", {
|
|
83189
|
+
tabIndex: 0,
|
|
83190
|
+
onClick: this.close,
|
|
83191
|
+
className: "".concat(componentClass, "-close")
|
|
83192
|
+
}, closeIcon || /*#__PURE__*/React.createElement("span", {
|
|
83193
|
+
className: "".concat(componentClass, "-close-x")
|
|
83194
|
+
})) : null);
|
|
83195
|
+
|
|
83196
|
+
if (holder) {
|
|
83197
|
+
return /*#__PURE__*/ReactDOM__default['default'].createPortal(node, holder);
|
|
83198
|
+
}
|
|
83199
|
+
|
|
83200
|
+
return node;
|
|
83201
|
+
}
|
|
83202
|
+
}]);
|
|
83203
|
+
|
|
83204
|
+
return Notice;
|
|
83205
|
+
}(React.Component);
|
|
83206
|
+
|
|
83207
|
+
Notice.defaultProps = {
|
|
83208
|
+
onClose: function onClose() {},
|
|
83209
|
+
duration: 1.5
|
|
83210
|
+
};
|
|
83211
|
+
|
|
83212
|
+
function useNotification(notificationInstance) {
|
|
83213
|
+
var createdRef = React.useRef({});
|
|
83214
|
+
|
|
83215
|
+
var _React$useState = React.useState([]),
|
|
83216
|
+
_React$useState2 = _slicedToArray$1(_React$useState, 2),
|
|
83217
|
+
elements = _React$useState2[0],
|
|
83218
|
+
setElements = _React$useState2[1];
|
|
83219
|
+
|
|
83220
|
+
function notify(noticeProps) {
|
|
83221
|
+
var firstMount = true;
|
|
83222
|
+
notificationInstance.add(noticeProps, function (div, props) {
|
|
83223
|
+
var key = props.key;
|
|
83224
|
+
|
|
83225
|
+
if (div && (!createdRef.current[key] || firstMount)) {
|
|
83226
|
+
var noticeEle = /*#__PURE__*/React.createElement(Notice, _extends$5({}, props, {
|
|
83227
|
+
holder: div
|
|
83228
|
+
}));
|
|
83229
|
+
createdRef.current[key] = noticeEle;
|
|
83230
|
+
setElements(function (originElements) {
|
|
83231
|
+
var index = originElements.findIndex(function (ele) {
|
|
83232
|
+
return ele.key === props.key;
|
|
83233
|
+
});
|
|
83234
|
+
|
|
83235
|
+
if (index === -1) {
|
|
83236
|
+
return [].concat(_toConsumableArray$1(originElements), [noticeEle]);
|
|
83237
|
+
}
|
|
83238
|
+
|
|
83239
|
+
var cloneList = _toConsumableArray$1(originElements);
|
|
83240
|
+
|
|
83241
|
+
cloneList[index] = noticeEle;
|
|
83242
|
+
return cloneList;
|
|
83243
|
+
});
|
|
83244
|
+
}
|
|
83245
|
+
|
|
83246
|
+
firstMount = false;
|
|
83247
|
+
});
|
|
83248
|
+
}
|
|
83249
|
+
|
|
83250
|
+
return [notify, /*#__PURE__*/React.createElement(React.Fragment, null, elements)];
|
|
83251
|
+
}
|
|
83252
|
+
|
|
83253
|
+
var _excluded$18 = ["getContainer"];
|
|
83254
|
+
var seed = 0;
|
|
83255
|
+
var now$3 = Date.now();
|
|
83256
|
+
|
|
83257
|
+
function getUuid() {
|
|
83258
|
+
var id = seed;
|
|
83259
|
+
seed += 1;
|
|
83260
|
+
return "rcNotification_".concat(now$3, "_").concat(id);
|
|
83261
|
+
}
|
|
83262
|
+
|
|
83263
|
+
var Notification = /*#__PURE__*/function (_Component) {
|
|
83264
|
+
_inherits(Notification, _Component);
|
|
83265
|
+
|
|
83266
|
+
var _super = _createSuper(Notification);
|
|
83267
|
+
|
|
83268
|
+
function Notification() {
|
|
83269
|
+
var _this;
|
|
83270
|
+
|
|
83271
|
+
_classCallCheck(this, Notification);
|
|
83272
|
+
|
|
83273
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
83274
|
+
args[_key] = arguments[_key];
|
|
83275
|
+
}
|
|
83276
|
+
|
|
83277
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
83278
|
+
_this.state = {
|
|
83279
|
+
notices: []
|
|
83280
|
+
};
|
|
83281
|
+
_this.hookRefs = new Map();
|
|
83282
|
+
|
|
83283
|
+
_this.add = function (originNotice, holderCallback) {
|
|
83284
|
+
var key = originNotice.key || getUuid();
|
|
83285
|
+
|
|
83286
|
+
var notice = _objectSpread2(_objectSpread2({}, originNotice), {}, {
|
|
83287
|
+
key: key
|
|
83288
|
+
});
|
|
83289
|
+
|
|
83290
|
+
var maxCount = _this.props.maxCount;
|
|
83291
|
+
|
|
83292
|
+
_this.setState(function (previousState) {
|
|
83293
|
+
var notices = previousState.notices;
|
|
83294
|
+
var noticeIndex = notices.map(function (v) {
|
|
83295
|
+
return v.notice.key;
|
|
83296
|
+
}).indexOf(key);
|
|
83297
|
+
var updatedNotices = notices.concat();
|
|
83298
|
+
|
|
83299
|
+
if (noticeIndex !== -1) {
|
|
83300
|
+
updatedNotices.splice(noticeIndex, 1, {
|
|
83301
|
+
notice: notice,
|
|
83302
|
+
holderCallback: holderCallback
|
|
83303
|
+
});
|
|
83304
|
+
} else {
|
|
83305
|
+
if (maxCount && notices.length >= maxCount) {
|
|
83306
|
+
// XXX, use key of first item to update new added (let React to move exsiting
|
|
83307
|
+
// instead of remove and mount). Same key was used before for both a) external
|
|
83308
|
+
// manual control and b) internal react 'key' prop , which is not that good.
|
|
83309
|
+
// eslint-disable-next-line no-param-reassign
|
|
83310
|
+
// zombieJ: Not know why use `updateKey`. This makes Notice infinite loop in jest.
|
|
83311
|
+
// Change to `updateMark` for compare instead.
|
|
83312
|
+
// https://github.com/react-component/notification/commit/32299e6be396f94040bfa82517eea940db947ece
|
|
83313
|
+
notice.key = updatedNotices[0].notice.key;
|
|
83314
|
+
notice.updateMark = getUuid(); // zombieJ: That's why. User may close by key directly.
|
|
83315
|
+
// We need record this but not re-render to avoid upper issue
|
|
83316
|
+
// https://github.com/react-component/notification/issues/129
|
|
83317
|
+
|
|
83318
|
+
notice.userPassKey = key;
|
|
83319
|
+
updatedNotices.shift();
|
|
83320
|
+
}
|
|
83321
|
+
|
|
83322
|
+
updatedNotices.push({
|
|
83323
|
+
notice: notice,
|
|
83324
|
+
holderCallback: holderCallback
|
|
83325
|
+
});
|
|
83326
|
+
}
|
|
83327
|
+
|
|
83328
|
+
return {
|
|
83329
|
+
notices: updatedNotices
|
|
83330
|
+
};
|
|
83331
|
+
});
|
|
83332
|
+
};
|
|
83333
|
+
|
|
83334
|
+
_this.remove = function (removeKey) {
|
|
83335
|
+
_this.setState(function (_ref) {
|
|
83336
|
+
var notices = _ref.notices;
|
|
83337
|
+
return {
|
|
83338
|
+
notices: notices.filter(function (_ref2) {
|
|
83339
|
+
var _ref2$notice = _ref2.notice,
|
|
83340
|
+
key = _ref2$notice.key,
|
|
83341
|
+
userPassKey = _ref2$notice.userPassKey;
|
|
83342
|
+
var mergedKey = userPassKey || key;
|
|
83343
|
+
return mergedKey !== removeKey;
|
|
83344
|
+
})
|
|
83345
|
+
};
|
|
83346
|
+
});
|
|
83347
|
+
};
|
|
83348
|
+
|
|
83349
|
+
_this.noticePropsMap = {};
|
|
83350
|
+
return _this;
|
|
83351
|
+
}
|
|
83352
|
+
|
|
83353
|
+
_createClass(Notification, [{
|
|
83354
|
+
key: "getTransitionName",
|
|
83355
|
+
value: function getTransitionName() {
|
|
83356
|
+
var _this$props = this.props,
|
|
83357
|
+
prefixCls = _this$props.prefixCls,
|
|
83358
|
+
animation = _this$props.animation;
|
|
83359
|
+
var transitionName = this.props.transitionName;
|
|
83360
|
+
|
|
83361
|
+
if (!transitionName && animation) {
|
|
83362
|
+
transitionName = "".concat(prefixCls, "-").concat(animation);
|
|
83363
|
+
}
|
|
83364
|
+
|
|
83365
|
+
return transitionName;
|
|
83366
|
+
}
|
|
83367
|
+
}, {
|
|
83368
|
+
key: "render",
|
|
83369
|
+
value: function render() {
|
|
83370
|
+
var _this2 = this;
|
|
83371
|
+
|
|
83372
|
+
var notices = this.state.notices;
|
|
83373
|
+
var _this$props2 = this.props,
|
|
83374
|
+
prefixCls = _this$props2.prefixCls,
|
|
83375
|
+
className = _this$props2.className,
|
|
83376
|
+
closeIcon = _this$props2.closeIcon,
|
|
83377
|
+
style = _this$props2.style;
|
|
83378
|
+
var noticeKeys = [];
|
|
83379
|
+
notices.forEach(function (_ref3, index) {
|
|
83380
|
+
var notice = _ref3.notice,
|
|
83381
|
+
holderCallback = _ref3.holderCallback;
|
|
83382
|
+
var updateMark = index === notices.length - 1 ? notice.updateMark : undefined;
|
|
83383
|
+
var key = notice.key,
|
|
83384
|
+
userPassKey = notice.userPassKey;
|
|
83385
|
+
|
|
83386
|
+
var noticeProps = _objectSpread2(_objectSpread2(_objectSpread2({
|
|
83387
|
+
prefixCls: prefixCls,
|
|
83388
|
+
closeIcon: closeIcon
|
|
83389
|
+
}, notice), notice.props), {}, {
|
|
83390
|
+
key: key,
|
|
83391
|
+
noticeKey: userPassKey || key,
|
|
83392
|
+
updateMark: updateMark,
|
|
83393
|
+
onClose: function onClose(noticeKey) {
|
|
83394
|
+
var _notice$onClose;
|
|
83395
|
+
|
|
83396
|
+
_this2.remove(noticeKey);
|
|
83397
|
+
|
|
83398
|
+
(_notice$onClose = notice.onClose) === null || _notice$onClose === void 0 ? void 0 : _notice$onClose.call(notice);
|
|
83399
|
+
},
|
|
83400
|
+
onClick: notice.onClick,
|
|
83401
|
+
children: notice.content
|
|
83402
|
+
}); // Give to motion
|
|
83403
|
+
|
|
83404
|
+
|
|
83405
|
+
noticeKeys.push(key);
|
|
83406
|
+
_this2.noticePropsMap[key] = {
|
|
83407
|
+
props: noticeProps,
|
|
83408
|
+
holderCallback: holderCallback
|
|
83409
|
+
};
|
|
83410
|
+
});
|
|
83411
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
83412
|
+
className: classnames(prefixCls, className),
|
|
83413
|
+
style: style
|
|
83414
|
+
}, /*#__PURE__*/React.createElement(CSSMotionList, {
|
|
83415
|
+
keys: noticeKeys,
|
|
83416
|
+
motionName: this.getTransitionName(),
|
|
83417
|
+
onVisibleChanged: function onVisibleChanged(changedVisible, _ref4) {
|
|
83418
|
+
var key = _ref4.key;
|
|
83419
|
+
|
|
83420
|
+
if (!changedVisible) {
|
|
83421
|
+
delete _this2.noticePropsMap[key];
|
|
83422
|
+
}
|
|
83423
|
+
}
|
|
83424
|
+
}, function (_ref5) {
|
|
83425
|
+
var key = _ref5.key,
|
|
83426
|
+
motionClassName = _ref5.className,
|
|
83427
|
+
motionStyle = _ref5.style,
|
|
83428
|
+
visible = _ref5.visible;
|
|
83429
|
+
var _this2$noticePropsMap = _this2.noticePropsMap[key],
|
|
83430
|
+
noticeProps = _this2$noticePropsMap.props,
|
|
83431
|
+
holderCallback = _this2$noticePropsMap.holderCallback;
|
|
83432
|
+
|
|
83433
|
+
if (holderCallback) {
|
|
83434
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
83435
|
+
key: key,
|
|
83436
|
+
className: classnames(motionClassName, "".concat(prefixCls, "-hook-holder")),
|
|
83437
|
+
style: _objectSpread2({}, motionStyle),
|
|
83438
|
+
ref: function ref(div) {
|
|
83439
|
+
if (typeof key === 'undefined') {
|
|
83440
|
+
return;
|
|
83441
|
+
}
|
|
83442
|
+
|
|
83443
|
+
if (div) {
|
|
83444
|
+
_this2.hookRefs.set(key, div);
|
|
83445
|
+
|
|
83446
|
+
holderCallback(div, noticeProps);
|
|
83447
|
+
} else {
|
|
83448
|
+
_this2.hookRefs.delete(key);
|
|
83449
|
+
}
|
|
83450
|
+
}
|
|
83451
|
+
});
|
|
83452
|
+
}
|
|
83453
|
+
|
|
83454
|
+
return /*#__PURE__*/React.createElement(Notice, _extends$5({}, noticeProps, {
|
|
83455
|
+
className: classnames(motionClassName, noticeProps === null || noticeProps === void 0 ? void 0 : noticeProps.className),
|
|
83456
|
+
style: _objectSpread2(_objectSpread2({}, motionStyle), noticeProps === null || noticeProps === void 0 ? void 0 : noticeProps.style),
|
|
83457
|
+
visible: visible
|
|
83458
|
+
}));
|
|
83459
|
+
}));
|
|
83460
|
+
}
|
|
83461
|
+
}]);
|
|
83462
|
+
|
|
83463
|
+
return Notification;
|
|
83464
|
+
}(React.Component);
|
|
83465
|
+
|
|
83466
|
+
Notification.newInstance = void 0;
|
|
83467
|
+
Notification.defaultProps = {
|
|
83468
|
+
prefixCls: 'rc-notification',
|
|
83469
|
+
animation: 'fade',
|
|
83470
|
+
style: {
|
|
83471
|
+
top: 65,
|
|
83472
|
+
left: '50%'
|
|
83473
|
+
}
|
|
83474
|
+
};
|
|
83475
|
+
|
|
83476
|
+
Notification.newInstance = function newNotificationInstance(properties, callback) {
|
|
83477
|
+
var _ref6 = properties || {},
|
|
83478
|
+
getContainer = _ref6.getContainer,
|
|
83479
|
+
props = _objectWithoutProperties$1(_ref6, _excluded$18);
|
|
83480
|
+
|
|
83481
|
+
var div = document.createElement('div');
|
|
83482
|
+
|
|
83483
|
+
if (getContainer) {
|
|
83484
|
+
var root = getContainer();
|
|
83485
|
+
root.appendChild(div);
|
|
83486
|
+
} else {
|
|
83487
|
+
document.body.appendChild(div);
|
|
83488
|
+
}
|
|
83489
|
+
|
|
83490
|
+
var called = false;
|
|
83491
|
+
|
|
83492
|
+
function ref(notification) {
|
|
83493
|
+
if (called) {
|
|
83494
|
+
return;
|
|
83495
|
+
}
|
|
83496
|
+
|
|
83497
|
+
called = true;
|
|
83498
|
+
callback({
|
|
83499
|
+
notice: function notice(noticeProps) {
|
|
83500
|
+
notification.add(noticeProps);
|
|
83501
|
+
},
|
|
83502
|
+
removeNotice: function removeNotice(key) {
|
|
83503
|
+
notification.remove(key);
|
|
83504
|
+
},
|
|
83505
|
+
component: notification,
|
|
83506
|
+
destroy: function destroy() {
|
|
83507
|
+
unmount(div);
|
|
83508
|
+
|
|
83509
|
+
if (div.parentNode) {
|
|
83510
|
+
div.parentNode.removeChild(div);
|
|
83511
|
+
}
|
|
83512
|
+
},
|
|
83513
|
+
// Hooks
|
|
83514
|
+
useNotification: function useNotification$1() {
|
|
83515
|
+
return useNotification(notification);
|
|
83516
|
+
}
|
|
83517
|
+
});
|
|
83518
|
+
} // Only used for test case usage
|
|
83519
|
+
|
|
83520
|
+
render$3( /*#__PURE__*/React.createElement(Notification, _extends$5({}, props, {
|
|
83521
|
+
ref: ref
|
|
83522
|
+
})), div);
|
|
83523
|
+
};
|
|
83524
|
+
|
|
83525
|
+
var interopRequireWildcard = createCommonjsModule(function (module) {
|
|
83526
|
+
var _typeof = _typeof_1["default"];
|
|
83527
|
+
|
|
83528
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
83529
|
+
if (typeof WeakMap !== "function") return null;
|
|
83530
|
+
var cacheBabelInterop = new WeakMap();
|
|
83531
|
+
var cacheNodeInterop = new WeakMap();
|
|
83532
|
+
return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
|
|
83533
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
83534
|
+
})(nodeInterop);
|
|
83535
|
+
}
|
|
83536
|
+
|
|
83537
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
83538
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
83539
|
+
return obj;
|
|
83540
|
+
}
|
|
83541
|
+
|
|
83542
|
+
if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
|
|
83543
|
+
return {
|
|
83544
|
+
"default": obj
|
|
83545
|
+
};
|
|
83546
|
+
}
|
|
83547
|
+
|
|
83548
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
83549
|
+
|
|
83550
|
+
if (cache && cache.has(obj)) {
|
|
83551
|
+
return cache.get(obj);
|
|
83552
|
+
}
|
|
83553
|
+
|
|
83554
|
+
var newObj = {};
|
|
83555
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
83556
|
+
|
|
83557
|
+
for (var key in obj) {
|
|
83558
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
83559
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
83560
|
+
|
|
83561
|
+
if (desc && (desc.get || desc.set)) {
|
|
83562
|
+
Object.defineProperty(newObj, key, desc);
|
|
83563
|
+
} else {
|
|
83564
|
+
newObj[key] = obj[key];
|
|
83565
|
+
}
|
|
83566
|
+
}
|
|
83567
|
+
}
|
|
83568
|
+
|
|
83569
|
+
newObj["default"] = obj;
|
|
83570
|
+
|
|
83571
|
+
if (cache) {
|
|
83572
|
+
cache.set(obj, newObj);
|
|
83573
|
+
}
|
|
83574
|
+
|
|
83575
|
+
return newObj;
|
|
83576
|
+
}
|
|
83577
|
+
|
|
83578
|
+
module.exports = _interopRequireWildcard, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83579
|
+
});
|
|
83580
|
+
|
|
83581
|
+
var interopRequireDefault = createCommonjsModule(function (module) {
|
|
83582
|
+
function _interopRequireDefault(obj) {
|
|
83583
|
+
return obj && obj.__esModule ? obj : {
|
|
83584
|
+
"default": obj
|
|
83585
|
+
};
|
|
83586
|
+
}
|
|
83587
|
+
|
|
83588
|
+
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83589
|
+
});
|
|
83590
|
+
|
|
83591
|
+
var classCallCheck$1 = createCommonjsModule(function (module) {
|
|
83592
|
+
function _classCallCheck(instance, Constructor) {
|
|
83593
|
+
if (!(instance instanceof Constructor)) {
|
|
83594
|
+
throw new TypeError("Cannot call a class as a function");
|
|
83595
|
+
}
|
|
83596
|
+
}
|
|
83597
|
+
|
|
83598
|
+
module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83599
|
+
});
|
|
83600
|
+
|
|
83601
|
+
var createClass$1 = createCommonjsModule(function (module) {
|
|
83602
|
+
function _defineProperties(target, props) {
|
|
83603
|
+
for (var i = 0; i < props.length; i++) {
|
|
83604
|
+
var descriptor = props[i];
|
|
83605
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
83606
|
+
descriptor.configurable = true;
|
|
83607
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
83608
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
83609
|
+
}
|
|
83610
|
+
}
|
|
83611
|
+
|
|
83612
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
83613
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
83614
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
83615
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
83616
|
+
writable: false
|
|
83617
|
+
});
|
|
83618
|
+
return Constructor;
|
|
83619
|
+
}
|
|
83620
|
+
|
|
83621
|
+
module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83622
|
+
});
|
|
83623
|
+
|
|
83624
|
+
var setPrototypeOf = createCommonjsModule(function (module) {
|
|
83625
|
+
function _setPrototypeOf(o, p) {
|
|
83626
|
+
module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
83627
|
+
o.__proto__ = p;
|
|
83628
|
+
return o;
|
|
83629
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83630
|
+
return _setPrototypeOf(o, p);
|
|
83631
|
+
}
|
|
83632
|
+
|
|
83633
|
+
module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83634
|
+
});
|
|
83635
|
+
|
|
83636
|
+
var inherits$1 = createCommonjsModule(function (module) {
|
|
83637
|
+
function _inherits(subClass, superClass) {
|
|
83638
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
83639
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
83640
|
+
}
|
|
83641
|
+
|
|
83642
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
83643
|
+
constructor: {
|
|
83644
|
+
value: subClass,
|
|
83645
|
+
writable: true,
|
|
83646
|
+
configurable: true
|
|
83647
|
+
}
|
|
83648
|
+
});
|
|
83649
|
+
Object.defineProperty(subClass, "prototype", {
|
|
83650
|
+
writable: false
|
|
83651
|
+
});
|
|
83652
|
+
if (superClass) setPrototypeOf(subClass, superClass);
|
|
83653
|
+
}
|
|
83654
|
+
|
|
83655
|
+
module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83656
|
+
});
|
|
83657
|
+
|
|
83658
|
+
var getPrototypeOf = createCommonjsModule(function (module) {
|
|
83659
|
+
function _getPrototypeOf(o) {
|
|
83660
|
+
module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
83661
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
83662
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83663
|
+
return _getPrototypeOf(o);
|
|
83664
|
+
}
|
|
83665
|
+
|
|
83666
|
+
module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83667
|
+
});
|
|
83668
|
+
|
|
83669
|
+
var isNativeReflectConstruct = createCommonjsModule(function (module) {
|
|
83670
|
+
function _isNativeReflectConstruct() {
|
|
83671
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
83672
|
+
if (Reflect.construct.sham) return false;
|
|
83673
|
+
if (typeof Proxy === "function") return true;
|
|
83674
|
+
|
|
83675
|
+
try {
|
|
83676
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
83677
|
+
return true;
|
|
83678
|
+
} catch (e) {
|
|
83679
|
+
return false;
|
|
83680
|
+
}
|
|
83681
|
+
}
|
|
83682
|
+
|
|
83683
|
+
module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83684
|
+
});
|
|
83685
|
+
|
|
83686
|
+
var assertThisInitialized = createCommonjsModule(function (module) {
|
|
83687
|
+
function _assertThisInitialized(self) {
|
|
83688
|
+
if (self === void 0) {
|
|
83689
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
83690
|
+
}
|
|
83691
|
+
|
|
83692
|
+
return self;
|
|
83693
|
+
}
|
|
83694
|
+
|
|
83695
|
+
module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83696
|
+
});
|
|
83697
|
+
|
|
83698
|
+
var possibleConstructorReturn$1 = createCommonjsModule(function (module) {
|
|
83699
|
+
var _typeof = _typeof_1["default"];
|
|
83700
|
+
|
|
83701
|
+
|
|
83702
|
+
|
|
83703
|
+
function _possibleConstructorReturn(self, call) {
|
|
83704
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
83705
|
+
return call;
|
|
83706
|
+
} else if (call !== void 0) {
|
|
83707
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
83708
|
+
}
|
|
83709
|
+
|
|
83710
|
+
return assertThisInitialized(self);
|
|
83711
|
+
}
|
|
83712
|
+
|
|
83713
|
+
module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83714
|
+
});
|
|
83715
|
+
|
|
83716
|
+
var createSuper = createCommonjsModule(function (module) {
|
|
83717
|
+
function _createSuper(Derived) {
|
|
83718
|
+
var hasNativeReflectConstruct = isNativeReflectConstruct();
|
|
83719
|
+
return function _createSuperInternal() {
|
|
83720
|
+
var Super = getPrototypeOf(Derived),
|
|
83721
|
+
result;
|
|
83722
|
+
|
|
83723
|
+
if (hasNativeReflectConstruct) {
|
|
83724
|
+
var NewTarget = getPrototypeOf(this).constructor;
|
|
83725
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
83726
|
+
} else {
|
|
83727
|
+
result = Super.apply(this, arguments);
|
|
83728
|
+
}
|
|
83729
|
+
|
|
83730
|
+
return possibleConstructorReturn$1(this, result);
|
|
83731
|
+
};
|
|
83732
|
+
}
|
|
83733
|
+
|
|
83734
|
+
module.exports = _createSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83735
|
+
});
|
|
83736
|
+
|
|
83737
|
+
var Notice_1 = createCommonjsModule(function (module, exports) {
|
|
83738
|
+
|
|
83739
|
+
|
|
83740
|
+
|
|
83741
|
+
|
|
83742
|
+
|
|
83743
|
+
Object.defineProperty(exports, "__esModule", {
|
|
83744
|
+
value: true
|
|
83745
|
+
});
|
|
83746
|
+
exports.default = void 0;
|
|
83747
|
+
|
|
83748
|
+
var _extends2 = interopRequireDefault(_extends_1);
|
|
83749
|
+
|
|
83750
|
+
var _defineProperty2 = interopRequireDefault(defineProperty);
|
|
83751
|
+
|
|
83752
|
+
var _classCallCheck2 = interopRequireDefault(classCallCheck$1);
|
|
83753
|
+
|
|
83754
|
+
var _createClass2 = interopRequireDefault(createClass$1);
|
|
83755
|
+
|
|
83756
|
+
var _inherits2 = interopRequireDefault(inherits$1);
|
|
83757
|
+
|
|
83758
|
+
var _createSuper2 = interopRequireDefault(createSuper);
|
|
83759
|
+
|
|
83760
|
+
var React = interopRequireWildcard(React__default['default']);
|
|
83761
|
+
|
|
83762
|
+
var _reactDom = interopRequireDefault(ReactDOM__default['default']);
|
|
83763
|
+
|
|
83764
|
+
var _classnames = interopRequireDefault(classnames);
|
|
83765
|
+
|
|
83766
|
+
var Notice = /*#__PURE__*/function (_Component) {
|
|
83767
|
+
(0, _inherits2.default)(Notice, _Component);
|
|
83768
|
+
|
|
83769
|
+
var _super = (0, _createSuper2.default)(Notice);
|
|
83770
|
+
|
|
83771
|
+
function Notice() {
|
|
83772
|
+
var _this;
|
|
83773
|
+
|
|
83774
|
+
(0, _classCallCheck2.default)(this, Notice);
|
|
83775
|
+
|
|
83776
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
83777
|
+
args[_key] = arguments[_key];
|
|
83778
|
+
}
|
|
83779
|
+
|
|
83780
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
83781
|
+
_this.closeTimer = null;
|
|
83782
|
+
|
|
83783
|
+
_this.close = function (e) {
|
|
83784
|
+
if (e) {
|
|
83785
|
+
e.stopPropagation();
|
|
83786
|
+
}
|
|
83787
|
+
|
|
83788
|
+
_this.clearCloseTimer();
|
|
83789
|
+
|
|
83790
|
+
var _this$props = _this.props,
|
|
83791
|
+
onClose = _this$props.onClose,
|
|
83792
|
+
noticeKey = _this$props.noticeKey;
|
|
83793
|
+
|
|
83794
|
+
if (onClose) {
|
|
83795
|
+
onClose(noticeKey);
|
|
83796
|
+
}
|
|
83797
|
+
};
|
|
83798
|
+
|
|
83799
|
+
_this.startCloseTimer = function () {
|
|
83800
|
+
if (_this.props.duration) {
|
|
83801
|
+
_this.closeTimer = window.setTimeout(function () {
|
|
83802
|
+
_this.close();
|
|
83803
|
+
}, _this.props.duration * 1000);
|
|
83804
|
+
}
|
|
83805
|
+
};
|
|
83806
|
+
|
|
83807
|
+
_this.clearCloseTimer = function () {
|
|
83808
|
+
if (_this.closeTimer) {
|
|
83809
|
+
clearTimeout(_this.closeTimer);
|
|
83810
|
+
_this.closeTimer = null;
|
|
83811
|
+
}
|
|
83812
|
+
};
|
|
83813
|
+
|
|
83814
|
+
return _this;
|
|
83815
|
+
}
|
|
83816
|
+
|
|
83817
|
+
(0, _createClass2.default)(Notice, [{
|
|
83818
|
+
key: "componentDidMount",
|
|
83819
|
+
value: function componentDidMount() {
|
|
83820
|
+
this.startCloseTimer();
|
|
83821
|
+
}
|
|
83822
|
+
}, {
|
|
83823
|
+
key: "componentDidUpdate",
|
|
83824
|
+
value: function componentDidUpdate(prevProps) {
|
|
83825
|
+
if (this.props.duration !== prevProps.duration || this.props.updateMark !== prevProps.updateMark || // Visible again need reset timer
|
|
83826
|
+
this.props.visible !== prevProps.visible && this.props.visible) {
|
|
83827
|
+
this.restartCloseTimer();
|
|
83828
|
+
}
|
|
83829
|
+
}
|
|
83830
|
+
}, {
|
|
83831
|
+
key: "componentWillUnmount",
|
|
83832
|
+
value: function componentWillUnmount() {
|
|
83833
|
+
this.clearCloseTimer();
|
|
83834
|
+
}
|
|
83835
|
+
}, {
|
|
83836
|
+
key: "restartCloseTimer",
|
|
83837
|
+
value: function restartCloseTimer() {
|
|
83838
|
+
this.clearCloseTimer();
|
|
83839
|
+
this.startCloseTimer();
|
|
83840
|
+
}
|
|
83841
|
+
}, {
|
|
83842
|
+
key: "render",
|
|
83843
|
+
value: function render() {
|
|
83844
|
+
var _this2 = this;
|
|
83845
|
+
|
|
83846
|
+
var _this$props2 = this.props,
|
|
83847
|
+
prefixCls = _this$props2.prefixCls,
|
|
83848
|
+
className = _this$props2.className,
|
|
83849
|
+
closable = _this$props2.closable,
|
|
83850
|
+
closeIcon = _this$props2.closeIcon,
|
|
83851
|
+
style = _this$props2.style,
|
|
83852
|
+
onClick = _this$props2.onClick,
|
|
83853
|
+
children = _this$props2.children,
|
|
83854
|
+
holder = _this$props2.holder;
|
|
83855
|
+
var componentClass = "".concat(prefixCls, "-notice");
|
|
83856
|
+
var dataOrAriaAttributeProps = Object.keys(this.props).reduce(function (acc, key) {
|
|
83857
|
+
if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') {
|
|
83858
|
+
acc[key] = _this2.props[key];
|
|
83859
|
+
}
|
|
83860
|
+
|
|
83861
|
+
return acc;
|
|
83862
|
+
}, {});
|
|
83863
|
+
var node = /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
|
|
83864
|
+
className: (0, _classnames.default)(componentClass, className, (0, _defineProperty2.default)({}, "".concat(componentClass, "-closable"), closable)),
|
|
83865
|
+
style: style,
|
|
83866
|
+
onMouseEnter: this.clearCloseTimer,
|
|
83867
|
+
onMouseLeave: this.startCloseTimer,
|
|
83868
|
+
onClick: onClick
|
|
83869
|
+
}, dataOrAriaAttributeProps), /*#__PURE__*/React.createElement("div", {
|
|
83870
|
+
className: "".concat(componentClass, "-content")
|
|
83871
|
+
}, children), closable ? /*#__PURE__*/React.createElement("a", {
|
|
83872
|
+
tabIndex: 0,
|
|
83873
|
+
onClick: this.close,
|
|
83874
|
+
className: "".concat(componentClass, "-close")
|
|
83875
|
+
}, closeIcon || /*#__PURE__*/React.createElement("span", {
|
|
83876
|
+
className: "".concat(componentClass, "-close-x")
|
|
83877
|
+
})) : null);
|
|
83878
|
+
|
|
83879
|
+
if (holder) {
|
|
83880
|
+
return /*#__PURE__*/_reactDom.default.createPortal(node, holder);
|
|
83881
|
+
}
|
|
83882
|
+
|
|
83883
|
+
return node;
|
|
83884
|
+
}
|
|
83885
|
+
}]);
|
|
83886
|
+
return Notice;
|
|
83887
|
+
}(React.Component);
|
|
83888
|
+
|
|
83889
|
+
exports.default = Notice;
|
|
83890
|
+
Notice.defaultProps = {
|
|
83891
|
+
onClose: function onClose() {},
|
|
83892
|
+
duration: 1.5
|
|
83893
|
+
};
|
|
83894
|
+
});
|
|
83895
|
+
|
|
83896
|
+
var useNotification_1 = createCommonjsModule(function (module, exports) {
|
|
83897
|
+
|
|
83898
|
+
|
|
83899
|
+
|
|
83900
|
+
|
|
83901
|
+
|
|
83902
|
+
Object.defineProperty(exports, "__esModule", {
|
|
83903
|
+
value: true
|
|
83904
|
+
});
|
|
83905
|
+
exports.default = useNotification;
|
|
83906
|
+
|
|
83907
|
+
var _toConsumableArray2 = interopRequireDefault(toConsumableArray);
|
|
83908
|
+
|
|
83909
|
+
var _extends2 = interopRequireDefault(_extends_1);
|
|
83910
|
+
|
|
83911
|
+
var _slicedToArray2 = interopRequireDefault(slicedToArray);
|
|
83912
|
+
|
|
83913
|
+
var React = interopRequireWildcard(React__default['default']);
|
|
83914
|
+
|
|
83915
|
+
var _Notice = interopRequireDefault(Notice_1);
|
|
83916
|
+
|
|
83917
|
+
function useNotification(notificationInstance) {
|
|
83918
|
+
var createdRef = React.useRef({});
|
|
83919
|
+
|
|
83920
|
+
var _React$useState = React.useState([]),
|
|
83921
|
+
_React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
|
|
83922
|
+
elements = _React$useState2[0],
|
|
83923
|
+
setElements = _React$useState2[1];
|
|
83924
|
+
|
|
83925
|
+
function notify(noticeProps) {
|
|
83926
|
+
var firstMount = true;
|
|
83927
|
+
notificationInstance.add(noticeProps, function (div, props) {
|
|
83928
|
+
var key = props.key;
|
|
83929
|
+
|
|
83930
|
+
if (div && (!createdRef.current[key] || firstMount)) {
|
|
83931
|
+
var noticeEle = /*#__PURE__*/React.createElement(_Notice.default, (0, _extends2.default)({}, props, {
|
|
83932
|
+
holder: div
|
|
83933
|
+
}));
|
|
83934
|
+
createdRef.current[key] = noticeEle;
|
|
83935
|
+
setElements(function (originElements) {
|
|
83936
|
+
var index = originElements.findIndex(function (ele) {
|
|
83937
|
+
return ele.key === props.key;
|
|
83938
|
+
});
|
|
83939
|
+
|
|
83940
|
+
if (index === -1) {
|
|
83941
|
+
return [].concat((0, _toConsumableArray2.default)(originElements), [noticeEle]);
|
|
83942
|
+
}
|
|
83943
|
+
|
|
83944
|
+
var cloneList = (0, _toConsumableArray2.default)(originElements);
|
|
83945
|
+
cloneList[index] = noticeEle;
|
|
83946
|
+
return cloneList;
|
|
83947
|
+
});
|
|
83948
|
+
}
|
|
83949
|
+
|
|
83950
|
+
firstMount = false;
|
|
83951
|
+
});
|
|
83952
|
+
}
|
|
83953
|
+
|
|
83954
|
+
return [notify, /*#__PURE__*/React.createElement(React.Fragment, null, elements)];
|
|
83955
|
+
}
|
|
83956
|
+
});
|
|
83957
|
+
|
|
83958
|
+
var useRCNotification = /*@__PURE__*/getDefaultExportFromCjs(useNotification_1);
|
|
83959
|
+
|
|
83960
|
+
function createUseNotification(getNotificationInstance, getRCNoticeProps) {
|
|
83961
|
+
var useNotification = function useNotification() {
|
|
83962
|
+
// We can only get content by render
|
|
83963
|
+
var getPrefixCls; // We create a proxy to handle delay created instance
|
|
83964
|
+
|
|
83965
|
+
var innerInstance = null;
|
|
83966
|
+
var proxy = {
|
|
83967
|
+
add: function add(noticeProps, holderCallback) {
|
|
83968
|
+
var _innerInstance;
|
|
83969
|
+
|
|
83970
|
+
(_innerInstance = innerInstance) === null || _innerInstance === void 0 ? void 0 : _innerInstance.component.add(noticeProps, holderCallback);
|
|
83971
|
+
}
|
|
83972
|
+
};
|
|
83973
|
+
|
|
83974
|
+
var _useRCNotification = useRCNotification(proxy),
|
|
83975
|
+
_useRCNotification2 = _slicedToArray(_useRCNotification, 2),
|
|
83976
|
+
hookNotify = _useRCNotification2[0],
|
|
83977
|
+
holder = _useRCNotification2[1];
|
|
83978
|
+
|
|
83979
|
+
function notify(args) {
|
|
83980
|
+
var customizePrefixCls = args.prefixCls;
|
|
83981
|
+
var mergedPrefixCls = getPrefixCls('notification', customizePrefixCls);
|
|
83982
|
+
getNotificationInstance(_objectSpread(_objectSpread({}, args), {}, {
|
|
83983
|
+
prefixCls: mergedPrefixCls
|
|
83984
|
+
}), function (_ref) {
|
|
83985
|
+
var prefixCls = _ref.prefixCls,
|
|
83986
|
+
instance = _ref.instance;
|
|
83987
|
+
innerInstance = instance;
|
|
83988
|
+
hookNotify(getRCNoticeProps(args, prefixCls));
|
|
83989
|
+
});
|
|
83990
|
+
} // Fill functions
|
|
83991
|
+
|
|
83992
|
+
|
|
83993
|
+
var hookApiRef = React.useRef({});
|
|
83994
|
+
hookApiRef.current.open = notify;
|
|
83995
|
+
['success', 'info', 'warning', 'error'].forEach(function (type) {
|
|
83996
|
+
hookApiRef.current[type] = function (args) {
|
|
83997
|
+
return hookApiRef.current.open(_objectSpread(_objectSpread({}, args), {}, {
|
|
83998
|
+
type: type
|
|
83999
|
+
}));
|
|
84000
|
+
};
|
|
84001
|
+
});
|
|
84002
|
+
return [hookApiRef.current, /*#__PURE__*/React.createElement(_ConfigProvider.ConfigConsumer, {
|
|
84003
|
+
key: "holder"
|
|
84004
|
+
}, function (context) {
|
|
84005
|
+
getPrefixCls = context.getPrefixCls;
|
|
84006
|
+
return holder;
|
|
84007
|
+
})];
|
|
84008
|
+
};
|
|
84009
|
+
|
|
84010
|
+
return useNotification;
|
|
84011
|
+
}
|
|
84012
|
+
|
|
84013
|
+
var notificationInstance = {};
|
|
84014
|
+
var defaultDuration = 4.5;
|
|
84015
|
+
var defaultTop = 24;
|
|
84016
|
+
var defaultBottom = 24;
|
|
84017
|
+
var defaultPrefixCls = '';
|
|
84018
|
+
var defaultPlacement = 'topRight';
|
|
84019
|
+
var defaultGetContainer;
|
|
84020
|
+
var defaultCloseIcon;
|
|
84021
|
+
var rtl = false;
|
|
84022
|
+
var maxCount;
|
|
84023
|
+
|
|
84024
|
+
function setNotificationConfig(options) {
|
|
84025
|
+
var duration = options.duration,
|
|
84026
|
+
placement = options.placement,
|
|
84027
|
+
bottom = options.bottom,
|
|
84028
|
+
top = options.top,
|
|
84029
|
+
getContainer = options.getContainer,
|
|
84030
|
+
closeIcon = options.closeIcon,
|
|
84031
|
+
prefixCls = options.prefixCls;
|
|
84032
|
+
|
|
84033
|
+
if (prefixCls !== undefined) {
|
|
84034
|
+
defaultPrefixCls = prefixCls;
|
|
84035
|
+
}
|
|
84036
|
+
|
|
84037
|
+
if (duration !== undefined) {
|
|
84038
|
+
defaultDuration = duration;
|
|
84039
|
+
}
|
|
84040
|
+
|
|
84041
|
+
if (placement !== undefined) {
|
|
84042
|
+
defaultPlacement = placement;
|
|
84043
|
+
} else if (options.rtl) {
|
|
84044
|
+
defaultPlacement = 'topLeft';
|
|
84045
|
+
}
|
|
84046
|
+
|
|
84047
|
+
if (bottom !== undefined) {
|
|
84048
|
+
defaultBottom = bottom;
|
|
84049
|
+
}
|
|
84050
|
+
|
|
84051
|
+
if (top !== undefined) {
|
|
84052
|
+
defaultTop = top;
|
|
84053
|
+
}
|
|
84054
|
+
|
|
84055
|
+
if (getContainer !== undefined) {
|
|
84056
|
+
defaultGetContainer = getContainer;
|
|
84057
|
+
}
|
|
84058
|
+
|
|
84059
|
+
if (closeIcon !== undefined) {
|
|
84060
|
+
defaultCloseIcon = closeIcon;
|
|
84061
|
+
}
|
|
84062
|
+
|
|
84063
|
+
if (options.rtl !== undefined) {
|
|
84064
|
+
rtl = options.rtl;
|
|
84065
|
+
}
|
|
84066
|
+
|
|
84067
|
+
if (options.maxCount !== undefined) {
|
|
84068
|
+
maxCount = options.maxCount;
|
|
84069
|
+
}
|
|
84070
|
+
}
|
|
84071
|
+
|
|
84072
|
+
function getPlacementStyle(placement) {
|
|
84073
|
+
var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultTop;
|
|
84074
|
+
var bottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultBottom;
|
|
84075
|
+
var style;
|
|
84076
|
+
|
|
84077
|
+
switch (placement) {
|
|
84078
|
+
case 'top':
|
|
84079
|
+
style = {
|
|
84080
|
+
left: '50%',
|
|
84081
|
+
transform: 'translateX(-50%)',
|
|
84082
|
+
right: 'auto',
|
|
84083
|
+
top: top,
|
|
84084
|
+
bottom: 'auto'
|
|
84085
|
+
};
|
|
84086
|
+
break;
|
|
84087
|
+
|
|
84088
|
+
case 'topLeft':
|
|
84089
|
+
style = {
|
|
84090
|
+
left: 0,
|
|
84091
|
+
top: top,
|
|
84092
|
+
bottom: 'auto'
|
|
84093
|
+
};
|
|
84094
|
+
break;
|
|
84095
|
+
|
|
84096
|
+
case 'topRight':
|
|
84097
|
+
style = {
|
|
84098
|
+
right: 0,
|
|
84099
|
+
top: top,
|
|
84100
|
+
bottom: 'auto'
|
|
84101
|
+
};
|
|
84102
|
+
break;
|
|
84103
|
+
|
|
84104
|
+
case 'bottom':
|
|
84105
|
+
style = {
|
|
84106
|
+
left: '50%',
|
|
84107
|
+
transform: 'translateX(-50%)',
|
|
84108
|
+
right: 'auto',
|
|
84109
|
+
top: 'auto',
|
|
84110
|
+
bottom: bottom
|
|
84111
|
+
};
|
|
84112
|
+
break;
|
|
84113
|
+
|
|
84114
|
+
case 'bottomLeft':
|
|
84115
|
+
style = {
|
|
84116
|
+
left: 0,
|
|
84117
|
+
top: 'auto',
|
|
84118
|
+
bottom: bottom
|
|
84119
|
+
};
|
|
84120
|
+
break;
|
|
84121
|
+
|
|
84122
|
+
default:
|
|
84123
|
+
style = {
|
|
84124
|
+
right: 0,
|
|
84125
|
+
top: 'auto',
|
|
84126
|
+
bottom: bottom
|
|
84127
|
+
};
|
|
84128
|
+
break;
|
|
84129
|
+
}
|
|
84130
|
+
|
|
84131
|
+
return style;
|
|
84132
|
+
}
|
|
84133
|
+
|
|
84134
|
+
function getNotificationInstance(args, callback) {
|
|
84135
|
+
var _args$placement = args.placement,
|
|
84136
|
+
placement = _args$placement === void 0 ? defaultPlacement : _args$placement,
|
|
84137
|
+
top = args.top,
|
|
84138
|
+
bottom = args.bottom,
|
|
84139
|
+
_args$getContainer = args.getContainer,
|
|
84140
|
+
getContainer = _args$getContainer === void 0 ? defaultGetContainer : _args$getContainer,
|
|
84141
|
+
customizePrefixCls = args.prefixCls;
|
|
84142
|
+
|
|
84143
|
+
var _globalConfig = _ConfigProvider.globalConfig(),
|
|
84144
|
+
getPrefixCls = _globalConfig.getPrefixCls,
|
|
84145
|
+
getIconPrefixCls = _globalConfig.getIconPrefixCls;
|
|
84146
|
+
|
|
84147
|
+
var prefixCls = getPrefixCls('notification', customizePrefixCls || defaultPrefixCls);
|
|
84148
|
+
var iconPrefixCls = getIconPrefixCls();
|
|
84149
|
+
var cacheKey = "".concat(prefixCls, "-").concat(placement);
|
|
84150
|
+
var cacheInstance = notificationInstance[cacheKey];
|
|
84151
|
+
|
|
84152
|
+
if (cacheInstance) {
|
|
84153
|
+
Promise.resolve(cacheInstance).then(function (instance) {
|
|
84154
|
+
callback({
|
|
84155
|
+
prefixCls: "".concat(prefixCls, "-notice"),
|
|
84156
|
+
iconPrefixCls: iconPrefixCls,
|
|
84157
|
+
instance: instance
|
|
84158
|
+
});
|
|
84159
|
+
});
|
|
84160
|
+
return;
|
|
84161
|
+
}
|
|
84162
|
+
|
|
84163
|
+
var notificationClass = classnames("".concat(prefixCls, "-").concat(placement), _defineProperty({}, "".concat(prefixCls, "-rtl"), rtl === true));
|
|
84164
|
+
notificationInstance[cacheKey] = new Promise(function (resolve) {
|
|
84165
|
+
Notification.newInstance({
|
|
84166
|
+
prefixCls: prefixCls,
|
|
84167
|
+
className: notificationClass,
|
|
84168
|
+
style: getPlacementStyle(placement, top, bottom),
|
|
84169
|
+
getContainer: getContainer,
|
|
84170
|
+
maxCount: maxCount
|
|
84171
|
+
}, function (notification) {
|
|
84172
|
+
resolve(notification);
|
|
84173
|
+
callback({
|
|
84174
|
+
prefixCls: "".concat(prefixCls, "-notice"),
|
|
84175
|
+
iconPrefixCls: iconPrefixCls,
|
|
84176
|
+
instance: notification
|
|
84177
|
+
});
|
|
84178
|
+
});
|
|
84179
|
+
});
|
|
84180
|
+
}
|
|
84181
|
+
|
|
84182
|
+
var typeToIcon = {
|
|
84183
|
+
success: CheckCircleOutlined$2,
|
|
84184
|
+
info: InfoCircleOutlined$2,
|
|
84185
|
+
error: CloseCircleOutlined$2,
|
|
84186
|
+
warning: ExclamationCircleOutlined$2
|
|
84187
|
+
};
|
|
84188
|
+
|
|
84189
|
+
function getRCNoticeProps(args, prefixCls, iconPrefixCls) {
|
|
84190
|
+
var durationArg = args.duration,
|
|
84191
|
+
icon = args.icon,
|
|
84192
|
+
type = args.type,
|
|
84193
|
+
description = args.description,
|
|
84194
|
+
message = args.message,
|
|
84195
|
+
btn = args.btn,
|
|
84196
|
+
onClose = args.onClose,
|
|
84197
|
+
onClick = args.onClick,
|
|
84198
|
+
key = args.key,
|
|
84199
|
+
style = args.style,
|
|
84200
|
+
className = args.className,
|
|
84201
|
+
_args$closeIcon = args.closeIcon,
|
|
84202
|
+
closeIcon = _args$closeIcon === void 0 ? defaultCloseIcon : _args$closeIcon,
|
|
84203
|
+
_args$progress = args.progress,
|
|
84204
|
+
progress = _args$progress === void 0 ? true : _args$progress;
|
|
84205
|
+
var duration = durationArg === undefined ? defaultDuration : durationArg;
|
|
84206
|
+
var iconNode = null;
|
|
84207
|
+
|
|
84208
|
+
if (icon) {
|
|
84209
|
+
iconNode = /*#__PURE__*/React.createElement("span", {
|
|
84210
|
+
className: "".concat(prefixCls, "-icon")
|
|
84211
|
+
}, args.icon);
|
|
84212
|
+
} else if (type) {
|
|
84213
|
+
iconNode = /*#__PURE__*/React.createElement(typeToIcon[type] || null, {
|
|
84214
|
+
className: "".concat(prefixCls, "-icon ").concat(prefixCls, "-icon-").concat(type)
|
|
84215
|
+
});
|
|
84216
|
+
}
|
|
84217
|
+
|
|
84218
|
+
var closeIconToRender = /*#__PURE__*/React.createElement("span", {
|
|
84219
|
+
className: "".concat(prefixCls, "-close-x")
|
|
84220
|
+
}, closeIcon || /*#__PURE__*/React.createElement(CloseOutlined$2, {
|
|
84221
|
+
className: "".concat(prefixCls, "-close-icon")
|
|
84222
|
+
}));
|
|
84223
|
+
var autoMarginTag = !description && iconNode ? /*#__PURE__*/React.createElement("span", {
|
|
84224
|
+
className: "".concat(prefixCls, "-message-single-line-auto-margin")
|
|
84225
|
+
}) : null;
|
|
84226
|
+
return {
|
|
84227
|
+
content: /*#__PURE__*/React.createElement(_ConfigProvider__default['default'], {
|
|
84228
|
+
iconPrefixCls: iconPrefixCls
|
|
84229
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
84230
|
+
className: iconNode ? "".concat(prefixCls, "-with-icon") : '',
|
|
84231
|
+
role: "alert"
|
|
84232
|
+
}, iconNode, /*#__PURE__*/React.createElement("div", {
|
|
84233
|
+
className: "".concat(prefixCls, "-message")
|
|
84234
|
+
}, autoMarginTag, message), /*#__PURE__*/React.createElement("div", {
|
|
84235
|
+
className: "".concat(prefixCls, "-description")
|
|
84236
|
+
}, description), btn ? /*#__PURE__*/React.createElement("span", {
|
|
84237
|
+
className: "".concat(prefixCls, "-btn")
|
|
84238
|
+
}, btn) : null, progress && duration > 0 && /*#__PURE__*/React.createElement("div", {
|
|
84239
|
+
className: 'message_progress',
|
|
84240
|
+
style: {
|
|
84241
|
+
animationDuration: "".concat(duration, "s")
|
|
84242
|
+
}
|
|
84243
|
+
}))),
|
|
84244
|
+
duration: duration,
|
|
84245
|
+
closable: true,
|
|
84246
|
+
closeIcon: closeIconToRender,
|
|
84247
|
+
onClose: onClose,
|
|
84248
|
+
onClick: onClick,
|
|
84249
|
+
key: key,
|
|
84250
|
+
style: style || {},
|
|
84251
|
+
className: classnames(className, _defineProperty({}, "".concat(prefixCls, "-").concat(type), !!type), 'lm_notification')
|
|
84252
|
+
};
|
|
84253
|
+
}
|
|
84254
|
+
|
|
84255
|
+
function notice(args) {
|
|
84256
|
+
getNotificationInstance(args, function (_ref) {
|
|
84257
|
+
var prefixCls = _ref.prefixCls,
|
|
84258
|
+
iconPrefixCls = _ref.iconPrefixCls,
|
|
84259
|
+
instance = _ref.instance;
|
|
84260
|
+
instance.notice(getRCNoticeProps(args, prefixCls, iconPrefixCls));
|
|
84261
|
+
});
|
|
84262
|
+
}
|
|
84263
|
+
|
|
84264
|
+
var api = {
|
|
84265
|
+
open: notice,
|
|
84266
|
+
close: function close(key) {
|
|
84267
|
+
Object.keys(notificationInstance).forEach(function (cacheKey) {
|
|
84268
|
+
return Promise.resolve(notificationInstance[cacheKey]).then(function (instance) {
|
|
84269
|
+
instance.removeNotice(key);
|
|
84270
|
+
});
|
|
84271
|
+
});
|
|
84272
|
+
},
|
|
84273
|
+
config: setNotificationConfig,
|
|
84274
|
+
destroy: function destroy() {
|
|
84275
|
+
Object.keys(notificationInstance).forEach(function (cacheKey) {
|
|
84276
|
+
Promise.resolve(notificationInstance[cacheKey]).then(function (instance) {
|
|
84277
|
+
instance.destroy();
|
|
84278
|
+
});
|
|
84279
|
+
delete notificationInstance[cacheKey]; // lgtm[js/missing-await]
|
|
84280
|
+
});
|
|
84281
|
+
}
|
|
84282
|
+
};
|
|
84283
|
+
['success', 'info', 'warning', 'error'].forEach(function (type) {
|
|
84284
|
+
api[type] = function (args) {
|
|
84285
|
+
return api.open(_objectSpread(_objectSpread({}, args), {}, {
|
|
84286
|
+
type: type
|
|
84287
|
+
}));
|
|
84288
|
+
};
|
|
84289
|
+
});
|
|
84290
|
+
api.warn = api.warning;
|
|
84291
|
+
api.useNotification = createUseNotification(getNotificationInstance, getRCNoticeProps);
|
|
84292
|
+
api.antdNotification = _notification__default['default'];
|
|
84293
|
+
|
|
84294
|
+
var _excluded$19 = ["visible", "wrapClassName", "onClose", "children"];
|
|
84295
|
+
|
|
84296
|
+
var Index$j = function Index(props) {
|
|
84297
|
+
var visible = props.visible,
|
|
84298
|
+
wrapClassName = props.wrapClassName,
|
|
84299
|
+
onClose = props.onClose,
|
|
84300
|
+
children = props.children,
|
|
84301
|
+
reset = _objectWithoutProperties(props, _excluded$19);
|
|
84302
|
+
|
|
84303
|
+
var handleClose = function handleClose() {
|
|
84304
|
+
onClose();
|
|
84305
|
+
};
|
|
84306
|
+
|
|
84307
|
+
var onSave = function onSave() {
|
|
84308
|
+
handleClose();
|
|
84309
|
+
};
|
|
84310
|
+
|
|
84311
|
+
var config = {
|
|
84312
|
+
title: '新增',
|
|
84313
|
+
width: 480,
|
|
84314
|
+
visible: visible,
|
|
84315
|
+
onOk: handleClose,
|
|
84316
|
+
onCancel: handleClose,
|
|
84317
|
+
wrapClassName: wrapClassName ? "".concat(wrapClassName, " lm_addModal") : 'lm_addModal',
|
|
84318
|
+
okButtonProps: {
|
|
84319
|
+
size: 'default'
|
|
84320
|
+
},
|
|
84321
|
+
cancelButtonProps: {
|
|
84322
|
+
size: 'default'
|
|
84323
|
+
},
|
|
84324
|
+
footer: [/*#__PURE__*/React__default['default'].createElement(_Button__default['default'], {
|
|
84325
|
+
size: "large",
|
|
84326
|
+
type: "primary",
|
|
84327
|
+
key: "back",
|
|
84328
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SaveOutlined$2, null),
|
|
84329
|
+
onClick: onSave
|
|
84330
|
+
}, "\u4FDD\u5B58")]
|
|
84331
|
+
};
|
|
84332
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(_Modal__default['default'], _extends({}, config, reset), children));
|
|
84333
|
+
};
|
|
84334
|
+
|
|
84335
|
+
var _excluded$1a = ["type"];
|
|
84336
|
+
/*
|
|
84337
|
+
增加参数:
|
|
84338
|
+
type: 指定图片类型
|
|
84339
|
+
*/
|
|
84340
|
+
|
|
84341
|
+
var Confirm = function Confirm(_ref) {
|
|
84342
|
+
var type = _ref.type,
|
|
84343
|
+
resetProps = _objectWithoutProperties(_ref, _excluded$1a);
|
|
84344
|
+
|
|
84345
|
+
var Icon = function Icon() {
|
|
84346
|
+
switch (type) {
|
|
84347
|
+
case 'success':
|
|
84348
|
+
return /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
84349
|
+
type: "lmweb-check-circle",
|
|
84350
|
+
style: {
|
|
84351
|
+
color: '#56C22D'
|
|
84352
|
+
}
|
|
84353
|
+
});
|
|
84354
|
+
|
|
84355
|
+
case 'error':
|
|
84356
|
+
return /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
84357
|
+
type: "lmweb-close-circle",
|
|
84358
|
+
style: {
|
|
84359
|
+
color: '#FA4F53'
|
|
84360
|
+
}
|
|
84361
|
+
});
|
|
84362
|
+
|
|
84363
|
+
case 'warning':
|
|
84364
|
+
return /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
84365
|
+
type: "lmweb-info-circle",
|
|
84366
|
+
style: {
|
|
84367
|
+
color: '#FD9727'
|
|
84368
|
+
}
|
|
84369
|
+
});
|
|
84370
|
+
|
|
84371
|
+
case 'info':
|
|
84372
|
+
return /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
84373
|
+
type: "lmweb-info-circle",
|
|
84374
|
+
style: {
|
|
84375
|
+
color: '#1890fc'
|
|
84376
|
+
}
|
|
84377
|
+
});
|
|
84378
|
+
|
|
84379
|
+
default:
|
|
84380
|
+
return /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
84381
|
+
type: "lmweb-info-circle",
|
|
84382
|
+
style: {
|
|
84383
|
+
color: '#FD9727'
|
|
84384
|
+
}
|
|
84385
|
+
});
|
|
84386
|
+
}
|
|
84387
|
+
};
|
|
84388
|
+
|
|
84389
|
+
return _Modal__default['default'].confirm(_objectSpread({
|
|
84390
|
+
title: 'Confirm',
|
|
84391
|
+
icon: Icon(),
|
|
84392
|
+
content: 'Bla bla ...',
|
|
84393
|
+
okText: '确认',
|
|
84394
|
+
cancelText: '取消',
|
|
84395
|
+
wrapClassName: 'lm_modal_confirm',
|
|
84396
|
+
closable: true
|
|
84397
|
+
}, resetProps));
|
|
84398
|
+
};
|
|
84399
|
+
|
|
84400
|
+
var _excluded$1b = ["visible", "wrapClassName", "children"];
|
|
84401
|
+
|
|
84402
|
+
var Index$k = function Index(props) {
|
|
84403
|
+
var visible = props.visible,
|
|
84404
|
+
wrapClassName = props.wrapClassName,
|
|
84405
|
+
children = props.children,
|
|
84406
|
+
reset = _objectWithoutProperties(props, _excluded$1b);
|
|
84407
|
+
|
|
84408
|
+
var config = {
|
|
84409
|
+
title: '编辑',
|
|
84410
|
+
width: 480,
|
|
84411
|
+
visible: visible,
|
|
84412
|
+
centered: true,
|
|
84413
|
+
wrapClassName: wrapClassName ? "".concat(wrapClassName, " lm_editModal") : 'lm_editModal',
|
|
84414
|
+
okButtonProps: {
|
|
84415
|
+
size: 'default'
|
|
84416
|
+
},
|
|
84417
|
+
cancelButtonProps: {
|
|
84418
|
+
size: 'default'
|
|
84419
|
+
}
|
|
84420
|
+
};
|
|
84421
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(_Modal__default['default'], _extends({}, config, reset), children));
|
|
84422
|
+
};
|
|
84423
|
+
|
|
84424
|
+
var _excluded$1c = ["visible", "onClose", "onSure", "down", "desc", "downEvent", "isType", "renderFileType"];
|
|
84425
|
+
var downLink = [{
|
|
84426
|
+
id: '1',
|
|
84427
|
+
label: '成衣',
|
|
84428
|
+
value: 'link',
|
|
84429
|
+
icon: 'export'
|
|
84430
|
+
}, {
|
|
84431
|
+
id: '2',
|
|
84432
|
+
label: '面料',
|
|
84433
|
+
value: 'link',
|
|
84434
|
+
icon: 'export'
|
|
84435
|
+
}, {
|
|
84436
|
+
id: '3',
|
|
84437
|
+
label: '辅料',
|
|
84438
|
+
value: 'link',
|
|
84439
|
+
icon: 'export'
|
|
84440
|
+
}];
|
|
84441
|
+
var desc1 = [{
|
|
84442
|
+
id: '1',
|
|
84443
|
+
value: '红色为必填字段'
|
|
84444
|
+
}, {
|
|
84445
|
+
id: '2',
|
|
84446
|
+
value: '导入仅允许新增供应商信息'
|
|
84447
|
+
}];
|
|
84448
|
+
/*
|
|
84449
|
+
文件上传区域
|
|
84450
|
+
multiple:是否多选
|
|
84451
|
+
accept:文件选择时的默认类型筛选:"image/jpeg"、text/csv、application/msword、application/vnd.ms-excel => accept=".xlsx, .xls"
|
|
84452
|
+
type: 限制上传文件的类型
|
|
84453
|
+
size:文件大小(M)
|
|
84454
|
+
*/
|
|
84455
|
+
|
|
84456
|
+
var ImportBox = function ImportBox(_ref) {
|
|
84457
|
+
var value = _ref.value,
|
|
84458
|
+
multiple = _ref.multiple,
|
|
84459
|
+
_ref$fileLength = _ref.fileLength,
|
|
84460
|
+
fileLength = _ref$fileLength === void 0 ? 99 : _ref$fileLength,
|
|
84461
|
+
onChange = _ref.onChange,
|
|
84462
|
+
accept = _ref.accept,
|
|
84463
|
+
_ref$type = _ref.type,
|
|
84464
|
+
type = _ref$type === void 0 ? ['xls', 'xlsx'] : _ref$type,
|
|
84465
|
+
_ref$size = _ref.size,
|
|
84466
|
+
size = _ref$size === void 0 ? 100 : _ref$size;
|
|
84467
|
+
var fileRef = React.useRef(null); // 文件保存
|
|
84468
|
+
// 解决同文件的多次上传问题
|
|
84469
|
+
|
|
84470
|
+
var clearFileValue = function clearFileValue() {
|
|
84471
|
+
fileRef.current.value = null;
|
|
84472
|
+
};
|
|
84473
|
+
|
|
84474
|
+
var fileUpload = function fileUpload(e) {
|
|
84475
|
+
var file = e.target.files;
|
|
84476
|
+
|
|
84477
|
+
if (fileLength > 0 && file.length + value.length > fileLength) {
|
|
84478
|
+
return _message__default['default'].warning("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF01\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(fileLength, "\u4E2A\u6587\u4EF6"), 1.5);
|
|
84479
|
+
} // 循环文件检查是否存在不符合要求的文件
|
|
84480
|
+
|
|
84481
|
+
|
|
84482
|
+
for (var i = 0, len = file.length; i < len; i += 1) {
|
|
84483
|
+
var item = file[i];
|
|
84484
|
+
|
|
84485
|
+
if (!type.includes(item.name.replace(/.*\./, '').toLowerCase())) {
|
|
84486
|
+
var content = type.join('、');
|
|
84487
|
+
return _message__default['default'].warning("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF01\u4EC5\u652F\u6301".concat(content, "\u7684\u6587\u4EF6\u7C7B\u578B\uFF01"), 1.5);
|
|
84488
|
+
}
|
|
84489
|
+
|
|
84490
|
+
if (item.size / 1024 / 1024 > size) {
|
|
84491
|
+
return _message__default['default'].warning("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF01\u9644\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7".concat(size, "M\uFF01"), 1.5);
|
|
84492
|
+
}
|
|
84493
|
+
}
|
|
84494
|
+
|
|
84495
|
+
var nValue = [].concat(_toConsumableArray(value), _toConsumableArray(file));
|
|
84496
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(nValue, 'files');
|
|
84497
|
+
return false;
|
|
84498
|
+
};
|
|
84499
|
+
|
|
84500
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84501
|
+
className: "import_box"
|
|
84502
|
+
}, /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
84503
|
+
type: "lmweb-inbox",
|
|
84504
|
+
className: "import_icon"
|
|
84505
|
+
}), /*#__PURE__*/React__default['default'].createElement("input", {
|
|
84506
|
+
ref: fileRef,
|
|
84507
|
+
type: "file",
|
|
84508
|
+
multiple: multiple,
|
|
84509
|
+
accept: accept,
|
|
84510
|
+
className: "import_input",
|
|
84511
|
+
onClick: clearFileValue,
|
|
84512
|
+
onChange: fileUpload
|
|
84513
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84514
|
+
className: "import_text"
|
|
84515
|
+
}, "\u70B9\u51FB\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u8FD9\u91CC\u4E0A\u4F20")));
|
|
84516
|
+
};
|
|
84517
|
+
|
|
84518
|
+
var Index$l = function Index(_ref2) {
|
|
84519
|
+
var visible = _ref2.visible,
|
|
84520
|
+
onClose = _ref2.onClose,
|
|
84521
|
+
onSure = _ref2.onSure,
|
|
84522
|
+
_ref2$down = _ref2.down,
|
|
84523
|
+
down = _ref2$down === void 0 ? downLink : _ref2$down,
|
|
84524
|
+
_ref2$desc = _ref2.desc,
|
|
84525
|
+
desc = _ref2$desc === void 0 ? desc1 : _ref2$desc,
|
|
84526
|
+
downEvent = _ref2.downEvent,
|
|
84527
|
+
isType = _ref2.isType,
|
|
84528
|
+
renderFileType = _ref2.renderFileType,
|
|
84529
|
+
resetProps = _objectWithoutProperties(_ref2, _excluded$1c);
|
|
84530
|
+
|
|
84531
|
+
var _useState = React.useState({
|
|
84532
|
+
files: []
|
|
84533
|
+
}),
|
|
84534
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
84535
|
+
fileValue = _useState2[0],
|
|
84536
|
+
setFileValue = _useState2[1]; // 数据改变事件
|
|
84537
|
+
|
|
84538
|
+
|
|
84539
|
+
var handleChange = function handleChange(e, field) {
|
|
84540
|
+
setFileValue(_objectSpread(_objectSpread({}, fileValue), {}, _defineProperty({}, field, e)));
|
|
84541
|
+
}; // 确定事件
|
|
84542
|
+
|
|
84543
|
+
|
|
84544
|
+
var handleClick = function handleClick() {
|
|
84545
|
+
var files = fileValue.files;
|
|
84546
|
+
|
|
84547
|
+
if (!files.length) {
|
|
84548
|
+
return _message__default['default'].warning('请先选择文件!', 1.5);
|
|
84549
|
+
}
|
|
84550
|
+
|
|
84551
|
+
onSure(fileValue);
|
|
84552
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
84553
|
+
setFileValue(_objectSpread(_objectSpread({}, fileValue), {}, {
|
|
84554
|
+
files: []
|
|
84555
|
+
}));
|
|
84556
|
+
return false;
|
|
84557
|
+
}; // 删除事件
|
|
84558
|
+
|
|
84559
|
+
|
|
84560
|
+
var handleDelete = function handleDelete(name) {
|
|
84561
|
+
var nValue = fileValue.files.filter(function (v) {
|
|
84562
|
+
return v.name !== name;
|
|
84563
|
+
});
|
|
84564
|
+
setFileValue(_objectSpread(_objectSpread({}, fileValue), {}, {
|
|
84565
|
+
files: nValue
|
|
84566
|
+
}));
|
|
84567
|
+
}; // 关闭弹框
|
|
84568
|
+
|
|
84569
|
+
|
|
84570
|
+
var handleClose = function handleClose() {
|
|
84571
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
84572
|
+
setFileValue({
|
|
84573
|
+
type: 1,
|
|
84574
|
+
files: []
|
|
84575
|
+
});
|
|
84576
|
+
};
|
|
84577
|
+
|
|
84578
|
+
var config = {
|
|
84579
|
+
title: '导入',
|
|
84580
|
+
visible: visible,
|
|
84581
|
+
onCancel: onClose,
|
|
84582
|
+
bodyStyle: {
|
|
84583
|
+
padding: 24
|
|
84584
|
+
},
|
|
84585
|
+
footer: [/*#__PURE__*/React__default['default'].createElement(_Button__default['default'], {
|
|
84586
|
+
key: "cancel",
|
|
84587
|
+
onClick: handleClose,
|
|
84588
|
+
size: "middle"
|
|
84589
|
+
}, "\u53D6\u6D88"), /*#__PURE__*/React__default['default'].createElement(_Button__default['default'], {
|
|
84590
|
+
type: "primary",
|
|
84591
|
+
key: "back",
|
|
84592
|
+
onClick: handleClick,
|
|
84593
|
+
size: "middle"
|
|
84594
|
+
}, "\u786E\u5B9A")]
|
|
84595
|
+
};
|
|
84596
|
+
return /*#__PURE__*/React__default['default'].createElement(Index$k, config, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84597
|
+
className: "lm_file_body"
|
|
84598
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84599
|
+
className: "file_down file_item"
|
|
84600
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84601
|
+
className: "file_title"
|
|
84602
|
+
}, "\u4E0B\u8F7D\u6A21\u677F"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84603
|
+
className: "file_content"
|
|
84604
|
+
}, /*#__PURE__*/React__default['default'].createElement(_Space__default['default'], {
|
|
84605
|
+
size: [16, 8],
|
|
84606
|
+
wrap: true
|
|
84607
|
+
}, down === null || down === void 0 ? void 0 : down.map(function (v) {
|
|
84608
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84609
|
+
key: v.value,
|
|
84610
|
+
className: "file_down_link",
|
|
84611
|
+
onClick: function onClick() {
|
|
84612
|
+
return downEvent(v);
|
|
84613
|
+
}
|
|
84614
|
+
}, /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
84615
|
+
type: "lmweb-file-excel"
|
|
84616
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", null, v.label));
|
|
84617
|
+
})))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84618
|
+
className: "file_upload file_item"
|
|
84619
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84620
|
+
className: "file_title"
|
|
84621
|
+
}, "\u4E0A\u4F20\u6587\u4EF6"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84622
|
+
className: "file_content"
|
|
84623
|
+
}, /*#__PURE__*/React__default['default'].createElement(ImportBox, _extends({
|
|
84624
|
+
value: fileValue.files,
|
|
84625
|
+
onChange: handleChange
|
|
84626
|
+
}, resetProps)), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84627
|
+
className: "file_view"
|
|
84628
|
+
}, fileValue.files.map(function (v, idx) {
|
|
84629
|
+
return (
|
|
84630
|
+
/*#__PURE__*/
|
|
84631
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
84632
|
+
React__default['default'].createElement("div", {
|
|
84633
|
+
key: idx,
|
|
84634
|
+
className: "file_view_item"
|
|
84635
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84636
|
+
className: "file_view_item_label"
|
|
84637
|
+
}, /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
84638
|
+
type: "lmweb-file-excel"
|
|
84639
|
+
}), /*#__PURE__*/React__default['default'].createElement("span", null, v.name)), /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
84640
|
+
type: "lmweb-close1",
|
|
84641
|
+
className: "file_view_item_close",
|
|
84642
|
+
onClick: function onClick() {
|
|
84643
|
+
return handleDelete(v.name);
|
|
84644
|
+
}
|
|
84645
|
+
}))
|
|
84646
|
+
);
|
|
84647
|
+
})))), renderFileType && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84648
|
+
className: "file_type file_item"
|
|
84649
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84650
|
+
className: "file_title"
|
|
84651
|
+
}, "\u9009\u62E9\u7C7B\u578B"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84652
|
+
className: "file_content"
|
|
84653
|
+
}, typeof renderFileType === 'function' ? renderFileType(function (e, field) {
|
|
84654
|
+
return handleChange(e, field);
|
|
84655
|
+
}) : /*#__PURE__*/React__default['default'].createElement(_Radio__default['default'].Group, {
|
|
84656
|
+
defaultValue: 0,
|
|
84657
|
+
onChange: function onChange(e) {
|
|
84658
|
+
return handleChange(e.target.value, 'type');
|
|
84659
|
+
}
|
|
84660
|
+
}, /*#__PURE__*/React__default['default'].createElement(_Radio__default['default'], {
|
|
84661
|
+
value: 0
|
|
84662
|
+
}, "\u5FEB\u901F\u5BFC\u5165"), /*#__PURE__*/React__default['default'].createElement(_Radio__default['default'], {
|
|
84663
|
+
value: 1
|
|
84664
|
+
}, "\u6309\u9700\u66F4\u65B0")))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84665
|
+
className: "file_desc file_item"
|
|
84666
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84667
|
+
className: "file_title"
|
|
84668
|
+
}, "\u89C4\u5219\u8BF4\u660E"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84669
|
+
className: "file_content"
|
|
84670
|
+
}, desc === null || desc === void 0 ? void 0 : desc.map(function (v) {
|
|
84671
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84672
|
+
key: v.id
|
|
84673
|
+
}, "".concat(v.id, "\u3001").concat(v.value));
|
|
84674
|
+
})))));
|
|
84675
|
+
};
|
|
84676
|
+
|
|
84677
|
+
var Modal = {};
|
|
84678
|
+
Modal.AddMoal = Index$j;
|
|
84679
|
+
Modal.EditModal = Index$k;
|
|
84680
|
+
Modal.ExportModal = Index$l;
|
|
84681
|
+
Modal.Confirm = Confirm;
|
|
84682
|
+
|
|
84683
|
+
var _excluded$1d = ["children", "className"];
|
|
84684
|
+
var prefixCls$6 = 'lm_pagination';
|
|
84685
|
+
|
|
84686
|
+
var LMPagination = function LMPagination(props) {
|
|
84687
|
+
var children = props.children,
|
|
84688
|
+
className = props.className,
|
|
84689
|
+
others = _objectWithoutProperties(props, _excluded$1d);
|
|
84690
|
+
|
|
84691
|
+
return /*#__PURE__*/React__default['default'].createElement(_Pagination__default['default'], _objectSpread(_objectSpread({
|
|
84692
|
+
className: classnames(className, prefixCls$6),
|
|
84693
|
+
size: "small"
|
|
84694
|
+
}, others), {}, {
|
|
84695
|
+
locale: {
|
|
84696
|
+
items_per_page: '/条',
|
|
84697
|
+
jump_to: '前往',
|
|
84698
|
+
page: '页'
|
|
84699
|
+
}
|
|
84700
|
+
}));
|
|
84701
|
+
};
|
|
84702
|
+
|
|
84703
|
+
var _excluded$1e = ["columns", "dataSource", "total", "onClick", "onDoubleClick", "rowSelection", "rowKey", "scroll", "defaultActive", "onChange"];
|
|
84704
|
+
|
|
84705
|
+
/*
|
|
84706
|
+
接收参数:
|
|
82409
84707
|
total: 数据总数
|
|
82410
84708
|
rowSelection: 选择框类型 单选 多选 checkbox/radio
|
|
82411
84709
|
*/
|
|
@@ -82422,7 +84720,7 @@
|
|
|
82422
84720
|
scroll = props.scroll,
|
|
82423
84721
|
defaultActive = props.defaultActive,
|
|
82424
84722
|
onChange = props.onChange,
|
|
82425
|
-
resetProps = _objectWithoutProperties(props, _excluded$
|
|
84723
|
+
resetProps = _objectWithoutProperties(props, _excluded$1e); // 行单击选中,增加高亮
|
|
82426
84724
|
|
|
82427
84725
|
|
|
82428
84726
|
var _useState = React.useState(defaultActive),
|
|
@@ -82489,7 +84787,7 @@
|
|
|
82489
84787
|
}));
|
|
82490
84788
|
});
|
|
82491
84789
|
|
|
82492
|
-
var _excluded$
|
|
84790
|
+
var _excluded$1f = ["columns", "data", "total", "rowSelection", "onChange", "getCheckboxRecords"];
|
|
82493
84791
|
|
|
82494
84792
|
var Demo = function Demo(props) {
|
|
82495
84793
|
var inputRef = React__default['default'].useRef();
|
|
@@ -82507,7 +84805,7 @@
|
|
|
82507
84805
|
rowSelection = _props$rowSelection === void 0 ? true : _props$rowSelection,
|
|
82508
84806
|
onChange = props.onChange,
|
|
82509
84807
|
getCheckboxRecords = props.getCheckboxRecords,
|
|
82510
|
-
resetProps = _objectWithoutProperties(props, _excluded$
|
|
84808
|
+
resetProps = _objectWithoutProperties(props, _excluded$1f);
|
|
82511
84809
|
|
|
82512
84810
|
var _useState3 = React.useState('base'),
|
|
82513
84811
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
@@ -82603,8 +84901,8 @@
|
|
|
82603
84901
|
|
|
82604
84902
|
var Context$5 = /*#__PURE__*/React.createContext();
|
|
82605
84903
|
|
|
82606
|
-
var _excluded$
|
|
82607
|
-
_excluded2$
|
|
84904
|
+
var _excluded$1g = ["width", "onResize", "children"],
|
|
84905
|
+
_excluded2$k = ["children"],
|
|
82608
84906
|
_excluded3$6 = ["children", "style"],
|
|
82609
84907
|
_excluded4$2 = ["children"],
|
|
82610
84908
|
_excluded5$1 = ["style", "children"],
|
|
@@ -82719,7 +85017,7 @@
|
|
|
82719
85017
|
var width = props.width,
|
|
82720
85018
|
onResize = props.onResize,
|
|
82721
85019
|
children = props.children,
|
|
82722
|
-
restProps = _objectWithoutProperties(props, _excluded$
|
|
85020
|
+
restProps = _objectWithoutProperties(props, _excluded$1g);
|
|
82723
85021
|
|
|
82724
85022
|
var _useState3 = React.useState(width || 0),
|
|
82725
85023
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
@@ -82771,7 +85069,7 @@
|
|
|
82771
85069
|
|
|
82772
85070
|
var VCell = function VCell(props) {
|
|
82773
85071
|
var children = props.children,
|
|
82774
|
-
restProps = _objectWithoutProperties(props, _excluded2$
|
|
85072
|
+
restProps = _objectWithoutProperties(props, _excluded2$k);
|
|
82775
85073
|
|
|
82776
85074
|
return /*#__PURE__*/React__default['default'].createElement("td", restProps, children);
|
|
82777
85075
|
};
|
|
@@ -83181,7 +85479,7 @@
|
|
|
83181
85479
|
editConfig: editConfig$1
|
|
83182
85480
|
};
|
|
83183
85481
|
|
|
83184
|
-
var _excluded$
|
|
85482
|
+
var _excluded$1h = ["dataSource", "autoSize", "columns", "rowClick", "onDoubleClick", "checkConfig", "summary", "pagination", "hiddenPage", "loading", "virtual", "customCheck"];
|
|
83185
85483
|
var Summary$1 = ProviderWarp.Summary;
|
|
83186
85484
|
var ResetTable$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
83187
85485
|
var dataSource = props.dataSource,
|
|
@@ -83197,7 +85495,7 @@
|
|
|
83197
85495
|
_props$virtual = props.virtual,
|
|
83198
85496
|
virtual = _props$virtual === void 0 ? true : _props$virtual,
|
|
83199
85497
|
customCheck = props.customCheck,
|
|
83200
|
-
resetProps = _objectWithoutProperties(props, _excluded$
|
|
85498
|
+
resetProps = _objectWithoutProperties(props, _excluded$1h);
|
|
83201
85499
|
|
|
83202
85500
|
var _resetProps$rowKey = resetProps.rowKey,
|
|
83203
85501
|
rowKey = _resetProps$rowKey === void 0 ? 'id' : _resetProps$rowKey;
|
|
@@ -83481,7 +85779,7 @@
|
|
|
83481
85779
|
|
|
83482
85780
|
var Context$6 = /*#__PURE__*/React.createContext();
|
|
83483
85781
|
|
|
83484
|
-
var _excluded$
|
|
85782
|
+
var _excluded$1i = ["desc"];
|
|
83485
85783
|
var Paragraph$2 = _Typography__default['default'].Paragraph;
|
|
83486
85784
|
|
|
83487
85785
|
var Access$1 = function Access(props) {
|
|
@@ -83511,7 +85809,7 @@
|
|
|
83511
85809
|
|
|
83512
85810
|
var defaultConfig = React.useMemo(function () {
|
|
83513
85811
|
var desc = config.desc,
|
|
83514
|
-
resetConfig = _objectWithoutProperties(config, _excluded$
|
|
85812
|
+
resetConfig = _objectWithoutProperties(config, _excluded$1i);
|
|
83515
85813
|
|
|
83516
85814
|
return _objectSpread({
|
|
83517
85815
|
title: 'title',
|
|
@@ -83887,7 +86185,7 @@
|
|
|
83887
86185
|
}, config));
|
|
83888
86186
|
};
|
|
83889
86187
|
|
|
83890
|
-
var _excluded$
|
|
86188
|
+
var _excluded$1j = ["style", "defaultPage"];
|
|
83891
86189
|
var initialState$4 = {
|
|
83892
86190
|
// 选中的数据
|
|
83893
86191
|
checkList: [],
|
|
@@ -83928,7 +86226,7 @@
|
|
|
83928
86226
|
var ImgTable$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
83929
86227
|
var style = props.style,
|
|
83930
86228
|
defaultPage = props.defaultPage,
|
|
83931
|
-
resetProps = _objectWithoutProperties(props, _excluded$
|
|
86229
|
+
resetProps = _objectWithoutProperties(props, _excluded$1j);
|
|
83932
86230
|
|
|
83933
86231
|
var _useReducer = React.useReducer(reducer$5, initialState$4),
|
|
83934
86232
|
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
@@ -83971,12 +86269,12 @@
|
|
|
83971
86269
|
ResizeSize$2.ImgTable = ImgTable$1;
|
|
83972
86270
|
ResizeSize$2.Summary = Summary$1;
|
|
83973
86271
|
|
|
83974
|
-
var _excluded$
|
|
83975
|
-
_excluded2$
|
|
86272
|
+
var _excluded$1k = ["children"],
|
|
86273
|
+
_excluded2$l = ["children", "size", "buttonStyle", "direction", "className"];
|
|
83976
86274
|
|
|
83977
86275
|
var LMRadio = function LMRadio(props) {
|
|
83978
86276
|
var children = props.children,
|
|
83979
|
-
restProps = _objectWithoutProperties(props, _excluded$
|
|
86277
|
+
restProps = _objectWithoutProperties(props, _excluded$1k);
|
|
83980
86278
|
|
|
83981
86279
|
return /*#__PURE__*/React__default['default'].createElement(_Radio__default['default'], _extends({
|
|
83982
86280
|
className: "lm-radio"
|
|
@@ -83991,7 +86289,7 @@
|
|
|
83991
86289
|
_props$direction = props.direction,
|
|
83992
86290
|
direction = _props$direction === void 0 ? 'row' : _props$direction,
|
|
83993
86291
|
className = props.className,
|
|
83994
|
-
restProps = _objectWithoutProperties(props, _excluded2$
|
|
86292
|
+
restProps = _objectWithoutProperties(props, _excluded2$l);
|
|
83995
86293
|
|
|
83996
86294
|
return /*#__PURE__*/React__default['default'].createElement(_Radio__default['default'].Group, _extends({
|
|
83997
86295
|
className: classnames(className, 'lm-radio-group', "lm-radio-group-".concat(direction)),
|
|
@@ -84001,7 +86299,7 @@
|
|
|
84001
86299
|
|
|
84002
86300
|
LMRadio.Button = _Radio__default['default'].Button;
|
|
84003
86301
|
|
|
84004
|
-
var _excluded$
|
|
86302
|
+
var _excluded$1l = ["children", "className", "size", "dropdownClassName"];
|
|
84005
86303
|
var prefixCls$7 = 'lm_select';
|
|
84006
86304
|
var CLMSelect$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
84007
86305
|
var children = props.children,
|
|
@@ -84009,7 +86307,7 @@
|
|
|
84009
86307
|
_props$size = props.size,
|
|
84010
86308
|
size = _props$size === void 0 ? 'middle' : _props$size,
|
|
84011
86309
|
dropdownClassName = props.dropdownClassName,
|
|
84012
|
-
others = _objectWithoutProperties(props, _excluded$
|
|
86310
|
+
others = _objectWithoutProperties(props, _excluded$1l);
|
|
84013
86311
|
|
|
84014
86312
|
return /*#__PURE__*/React__default['default'].createElement(_Select__default['default'], _objectSpread(_objectSpread({
|
|
84015
86313
|
className: classnames(className, prefixCls$7),
|
|
@@ -84023,11 +86321,11 @@
|
|
|
84023
86321
|
LMSelect$1.Option = _Select__default['default'].Option;
|
|
84024
86322
|
LMSelect$1.OptGroup = _Select__default['default'].OptGroup;
|
|
84025
86323
|
|
|
84026
|
-
var _excluded$
|
|
86324
|
+
var _excluded$1m = ["className"];
|
|
84027
86325
|
var prefixCls$8 = 'lm_tree';
|
|
84028
86326
|
var LmTree = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
84029
86327
|
var className = props.className,
|
|
84030
|
-
rest = _objectWithoutProperties(props, _excluded$
|
|
86328
|
+
rest = _objectWithoutProperties(props, _excluded$1m);
|
|
84031
86329
|
|
|
84032
86330
|
return /*#__PURE__*/React__default['default'].createElement(_Tree__default['default'], _objectSpread(_objectSpread({
|
|
84033
86331
|
ref: ref
|
|
@@ -84038,13 +86336,13 @@
|
|
|
84038
86336
|
LmTree.TreeNode = _Tree__default['default'].TreeNode;
|
|
84039
86337
|
LmTree.DirectoryTree = _Tree__default['default'].DirectoryTree;
|
|
84040
86338
|
|
|
84041
|
-
var _excluded$
|
|
86339
|
+
var _excluded$1n = ["className", "color"];
|
|
84042
86340
|
var PresetColorTypes = ['pink', 'red', 'yellow', 'orange', 'cyan', 'green', 'blue', 'purple', 'geekblue', 'magenta', 'volcano', 'gold', 'lime', 'theme'];
|
|
84043
86341
|
var prefixCls$9 = 'lm_tag';
|
|
84044
86342
|
var LmTag = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
84045
86343
|
var className = props.className,
|
|
84046
86344
|
color = props.color,
|
|
84047
|
-
rest = _objectWithoutProperties(props, _excluded$
|
|
86345
|
+
rest = _objectWithoutProperties(props, _excluded$1n);
|
|
84048
86346
|
|
|
84049
86347
|
return /*#__PURE__*/React__default['default'].createElement(_Tag__default['default'], _objectSpread(_objectSpread({
|
|
84050
86348
|
ref: ref
|
|
@@ -84057,7 +86355,313 @@
|
|
|
84057
86355
|
});
|
|
84058
86356
|
LmTag.CheckableTag = _Tag__default['default'].CheckableTag;
|
|
84059
86357
|
|
|
84060
|
-
|
|
86358
|
+
function createUseMessage(getRcNotificationInstance, getRCNoticeProps) {
|
|
86359
|
+
var useMessage = function useMessage() {
|
|
86360
|
+
// We can only get content by render
|
|
86361
|
+
var getPrefixCls;
|
|
86362
|
+
var getPopupContainer; // We create a proxy to handle delay created instance
|
|
86363
|
+
|
|
86364
|
+
var innerInstance = null;
|
|
86365
|
+
var proxy = {
|
|
86366
|
+
add: function add(noticeProps, holderCallback) {
|
|
86367
|
+
var _innerInstance;
|
|
86368
|
+
|
|
86369
|
+
(_innerInstance = innerInstance) === null || _innerInstance === void 0 ? void 0 : _innerInstance.component.add(noticeProps, holderCallback);
|
|
86370
|
+
}
|
|
86371
|
+
};
|
|
86372
|
+
|
|
86373
|
+
var _useRCNotification = useRCNotification(proxy),
|
|
86374
|
+
_useRCNotification2 = _slicedToArray(_useRCNotification, 2),
|
|
86375
|
+
hookNotify = _useRCNotification2[0],
|
|
86376
|
+
holder = _useRCNotification2[1];
|
|
86377
|
+
|
|
86378
|
+
function notify(args) {
|
|
86379
|
+
var customizePrefixCls = args.prefixCls;
|
|
86380
|
+
var mergedPrefixCls = getPrefixCls('message', customizePrefixCls);
|
|
86381
|
+
var rootPrefixCls = getPrefixCls();
|
|
86382
|
+
var target = args.key || getKeyThenIncreaseKey();
|
|
86383
|
+
var closePromise = new Promise(function (resolve) {
|
|
86384
|
+
var callback = function callback() {
|
|
86385
|
+
if (typeof args.onClose === 'function') {
|
|
86386
|
+
args.onClose();
|
|
86387
|
+
}
|
|
86388
|
+
|
|
86389
|
+
return resolve(true);
|
|
86390
|
+
};
|
|
86391
|
+
|
|
86392
|
+
getRcNotificationInstance(_objectSpread(_objectSpread({}, args), {}, {
|
|
86393
|
+
prefixCls: mergedPrefixCls,
|
|
86394
|
+
rootPrefixCls: rootPrefixCls,
|
|
86395
|
+
getPopupContainer: getPopupContainer
|
|
86396
|
+
}), function (_ref) {
|
|
86397
|
+
var prefixCls = _ref.prefixCls,
|
|
86398
|
+
instance = _ref.instance;
|
|
86399
|
+
innerInstance = instance;
|
|
86400
|
+
hookNotify(getRCNoticeProps(_objectSpread(_objectSpread({}, args), {}, {
|
|
86401
|
+
key: target,
|
|
86402
|
+
onClose: callback
|
|
86403
|
+
}), prefixCls));
|
|
86404
|
+
});
|
|
86405
|
+
});
|
|
86406
|
+
|
|
86407
|
+
var result = function result() {
|
|
86408
|
+
if (innerInstance) {
|
|
86409
|
+
innerInstance.removeNotice(target);
|
|
86410
|
+
}
|
|
86411
|
+
};
|
|
86412
|
+
|
|
86413
|
+
result.then = function (filled, rejected) {
|
|
86414
|
+
return closePromise.then(filled, rejected);
|
|
86415
|
+
};
|
|
86416
|
+
|
|
86417
|
+
result.promise = closePromise;
|
|
86418
|
+
return result;
|
|
86419
|
+
} // Fill functions
|
|
86420
|
+
|
|
86421
|
+
|
|
86422
|
+
var hookApiRef = React.useRef({});
|
|
86423
|
+
hookApiRef.current.open = notify;
|
|
86424
|
+
typeList.forEach(function (type) {
|
|
86425
|
+
return attachTypeApi(hookApiRef.current, type);
|
|
86426
|
+
});
|
|
86427
|
+
return [hookApiRef.current, /*#__PURE__*/React.createElement(_ConfigProvider.ConfigConsumer, {
|
|
86428
|
+
key: "holder"
|
|
86429
|
+
}, function (context) {
|
|
86430
|
+
getPrefixCls = context.getPrefixCls;
|
|
86431
|
+
getPopupContainer = context.getPopupContainer;
|
|
86432
|
+
return holder;
|
|
86433
|
+
})];
|
|
86434
|
+
};
|
|
86435
|
+
|
|
86436
|
+
return useMessage;
|
|
86437
|
+
}
|
|
86438
|
+
|
|
86439
|
+
var messageInstance;
|
|
86440
|
+
var defaultDuration$1 = 3;
|
|
86441
|
+
var defaultTop$1;
|
|
86442
|
+
var key = 1;
|
|
86443
|
+
var localPrefixCls = '';
|
|
86444
|
+
var transitionName = 'move-up';
|
|
86445
|
+
var hasTransitionName = false;
|
|
86446
|
+
var getContainer$1;
|
|
86447
|
+
var maxCount$1;
|
|
86448
|
+
var rtl$1 = false;
|
|
86449
|
+
function getKeyThenIncreaseKey() {
|
|
86450
|
+
return key++;
|
|
86451
|
+
}
|
|
86452
|
+
|
|
86453
|
+
function setMessageConfig(options) {
|
|
86454
|
+
if (options.top !== undefined) {
|
|
86455
|
+
defaultTop$1 = options.top;
|
|
86456
|
+
messageInstance = null; // delete messageInstance for new defaultTop
|
|
86457
|
+
}
|
|
86458
|
+
|
|
86459
|
+
if (options.duration !== undefined) {
|
|
86460
|
+
defaultDuration$1 = options.duration;
|
|
86461
|
+
}
|
|
86462
|
+
|
|
86463
|
+
if (options.prefixCls !== undefined) {
|
|
86464
|
+
localPrefixCls = options.prefixCls;
|
|
86465
|
+
}
|
|
86466
|
+
|
|
86467
|
+
if (options.getContainer !== undefined) {
|
|
86468
|
+
getContainer$1 = options.getContainer;
|
|
86469
|
+
messageInstance = null; // delete messageInstance for new getContainer
|
|
86470
|
+
}
|
|
86471
|
+
|
|
86472
|
+
if (options.transitionName !== undefined) {
|
|
86473
|
+
transitionName = options.transitionName;
|
|
86474
|
+
messageInstance = null; // delete messageInstance for new transitionName
|
|
86475
|
+
|
|
86476
|
+
hasTransitionName = true;
|
|
86477
|
+
}
|
|
86478
|
+
|
|
86479
|
+
if (options.maxCount !== undefined) {
|
|
86480
|
+
maxCount$1 = options.maxCount;
|
|
86481
|
+
messageInstance = null;
|
|
86482
|
+
}
|
|
86483
|
+
|
|
86484
|
+
if (options.rtl !== undefined) {
|
|
86485
|
+
rtl$1 = options.rtl;
|
|
86486
|
+
}
|
|
86487
|
+
}
|
|
86488
|
+
|
|
86489
|
+
function getRCNotificationInstance(args, callback) {
|
|
86490
|
+
var customizePrefixCls = args.prefixCls,
|
|
86491
|
+
getContextPopupContainer = args.getPopupContainer;
|
|
86492
|
+
|
|
86493
|
+
var _globalConfig = _ConfigProvider.globalConfig(),
|
|
86494
|
+
getPrefixCls = _globalConfig.getPrefixCls,
|
|
86495
|
+
getRootPrefixCls = _globalConfig.getRootPrefixCls,
|
|
86496
|
+
getIconPrefixCls = _globalConfig.getIconPrefixCls;
|
|
86497
|
+
|
|
86498
|
+
var prefixCls = getPrefixCls('message', customizePrefixCls || localPrefixCls);
|
|
86499
|
+
var rootPrefixCls = getRootPrefixCls(args.rootPrefixCls, prefixCls);
|
|
86500
|
+
var iconPrefixCls = getIconPrefixCls();
|
|
86501
|
+
|
|
86502
|
+
if (messageInstance) {
|
|
86503
|
+
callback({
|
|
86504
|
+
prefixCls: prefixCls,
|
|
86505
|
+
rootPrefixCls: rootPrefixCls,
|
|
86506
|
+
iconPrefixCls: iconPrefixCls,
|
|
86507
|
+
instance: messageInstance
|
|
86508
|
+
});
|
|
86509
|
+
return;
|
|
86510
|
+
}
|
|
86511
|
+
|
|
86512
|
+
var instanceConfig = {
|
|
86513
|
+
prefixCls: prefixCls,
|
|
86514
|
+
transitionName: hasTransitionName ? transitionName : "".concat(rootPrefixCls, "-").concat(transitionName),
|
|
86515
|
+
style: {
|
|
86516
|
+
top: defaultTop$1
|
|
86517
|
+
},
|
|
86518
|
+
getContainer: getContainer$1 || getContextPopupContainer,
|
|
86519
|
+
maxCount: maxCount$1
|
|
86520
|
+
};
|
|
86521
|
+
Notification.newInstance(instanceConfig, function (instance) {
|
|
86522
|
+
if (messageInstance) {
|
|
86523
|
+
callback({
|
|
86524
|
+
prefixCls: prefixCls,
|
|
86525
|
+
rootPrefixCls: rootPrefixCls,
|
|
86526
|
+
iconPrefixCls: iconPrefixCls,
|
|
86527
|
+
instance: messageInstance
|
|
86528
|
+
});
|
|
86529
|
+
return;
|
|
86530
|
+
}
|
|
86531
|
+
|
|
86532
|
+
messageInstance = instance;
|
|
86533
|
+
|
|
86534
|
+
callback({
|
|
86535
|
+
prefixCls: prefixCls,
|
|
86536
|
+
rootPrefixCls: rootPrefixCls,
|
|
86537
|
+
iconPrefixCls: iconPrefixCls,
|
|
86538
|
+
instance: instance
|
|
86539
|
+
});
|
|
86540
|
+
});
|
|
86541
|
+
}
|
|
86542
|
+
|
|
86543
|
+
var typeToIcon$1 = {
|
|
86544
|
+
info: InfoCircleFilled$2,
|
|
86545
|
+
success: CheckCircleFilled$2,
|
|
86546
|
+
error: CloseCircleFilled$2,
|
|
86547
|
+
warning: ExclamationCircleFilled$2,
|
|
86548
|
+
loading: LoadingOutlined$2
|
|
86549
|
+
};
|
|
86550
|
+
var typeList = Object.keys(typeToIcon$1);
|
|
86551
|
+
|
|
86552
|
+
function getRCNoticeProps$1(args, prefixCls, iconPrefixCls) {
|
|
86553
|
+
var _classNames;
|
|
86554
|
+
|
|
86555
|
+
var duration = args.duration !== undefined ? args.duration : defaultDuration$1;
|
|
86556
|
+
var progress = args.progress === false ? false : true;
|
|
86557
|
+
var IconComponent = typeToIcon$1[args.type];
|
|
86558
|
+
var messageClass = classnames("".concat(prefixCls, "-custom-content"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-").concat(args.type), args.type), _defineProperty(_classNames, "".concat(prefixCls, "-rtl"), rtl$1 === true), _classNames));
|
|
86559
|
+
return {
|
|
86560
|
+
key: args.key,
|
|
86561
|
+
duration: duration,
|
|
86562
|
+
style: args.style || {},
|
|
86563
|
+
className: classnames(args.className, 'lm_message'),
|
|
86564
|
+
content: /*#__PURE__*/React__default['default'].createElement(_ConfigProvider__default['default'], {
|
|
86565
|
+
iconPrefixCls: iconPrefixCls
|
|
86566
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
86567
|
+
className: messageClass
|
|
86568
|
+
}, args.icon || IconComponent && /*#__PURE__*/React__default['default'].createElement(IconComponent, null), /*#__PURE__*/React__default['default'].createElement("span", null, args.content), progress && duration > 0 && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
86569
|
+
className: 'message_progress',
|
|
86570
|
+
style: {
|
|
86571
|
+
animationDuration: "".concat(duration, "s")
|
|
86572
|
+
}
|
|
86573
|
+
}))),
|
|
86574
|
+
onClose: args.onClose,
|
|
86575
|
+
onClick: args.onClick
|
|
86576
|
+
};
|
|
86577
|
+
}
|
|
86578
|
+
|
|
86579
|
+
function notice$1(args) {
|
|
86580
|
+
var target = args.key || getKeyThenIncreaseKey();
|
|
86581
|
+
var closePromise = new Promise(function (resolve) {
|
|
86582
|
+
var callback = function callback() {
|
|
86583
|
+
if (typeof args.onClose === 'function') {
|
|
86584
|
+
args.onClose();
|
|
86585
|
+
}
|
|
86586
|
+
|
|
86587
|
+
return resolve(true);
|
|
86588
|
+
};
|
|
86589
|
+
|
|
86590
|
+
getRCNotificationInstance(args, function (_ref) {
|
|
86591
|
+
var prefixCls = _ref.prefixCls,
|
|
86592
|
+
iconPrefixCls = _ref.iconPrefixCls,
|
|
86593
|
+
instance = _ref.instance;
|
|
86594
|
+
instance.notice(getRCNoticeProps$1(_objectSpread(_objectSpread({}, args), {}, {
|
|
86595
|
+
key: target,
|
|
86596
|
+
onClose: callback
|
|
86597
|
+
}), prefixCls, iconPrefixCls));
|
|
86598
|
+
});
|
|
86599
|
+
});
|
|
86600
|
+
|
|
86601
|
+
var result = function result() {
|
|
86602
|
+
if (messageInstance) {
|
|
86603
|
+
messageInstance.removeNotice(target);
|
|
86604
|
+
}
|
|
86605
|
+
};
|
|
86606
|
+
|
|
86607
|
+
result.then = function (filled, rejected) {
|
|
86608
|
+
return closePromise.then(filled, rejected);
|
|
86609
|
+
};
|
|
86610
|
+
|
|
86611
|
+
result.promise = closePromise;
|
|
86612
|
+
return result;
|
|
86613
|
+
}
|
|
86614
|
+
|
|
86615
|
+
function isArgsProps(content) {
|
|
86616
|
+
return Object.prototype.toString.call(content) === '[object Object]' && !!content.content;
|
|
86617
|
+
}
|
|
86618
|
+
|
|
86619
|
+
var api$1 = {
|
|
86620
|
+
open: notice$1,
|
|
86621
|
+
config: setMessageConfig,
|
|
86622
|
+
destroy: function destroy(messageKey) {
|
|
86623
|
+
if (messageInstance) {
|
|
86624
|
+
if (messageKey) {
|
|
86625
|
+
var _messageInstance = messageInstance,
|
|
86626
|
+
removeNotice = _messageInstance.removeNotice;
|
|
86627
|
+
removeNotice(messageKey);
|
|
86628
|
+
} else {
|
|
86629
|
+
var _messageInstance2 = messageInstance,
|
|
86630
|
+
destroy = _messageInstance2.destroy;
|
|
86631
|
+
destroy();
|
|
86632
|
+
messageInstance = null;
|
|
86633
|
+
}
|
|
86634
|
+
}
|
|
86635
|
+
}
|
|
86636
|
+
};
|
|
86637
|
+
function attachTypeApi(originalApi, type) {
|
|
86638
|
+
originalApi[type] = function (content, duration, onClose) {
|
|
86639
|
+
if (isArgsProps(content)) {
|
|
86640
|
+
return originalApi.open(_objectSpread(_objectSpread({}, content), {}, {
|
|
86641
|
+
type: type
|
|
86642
|
+
}));
|
|
86643
|
+
}
|
|
86644
|
+
|
|
86645
|
+
if (typeof duration === 'function') {
|
|
86646
|
+
onClose = duration;
|
|
86647
|
+
duration = undefined;
|
|
86648
|
+
}
|
|
86649
|
+
|
|
86650
|
+
return originalApi.open({
|
|
86651
|
+
content: content,
|
|
86652
|
+
duration: duration,
|
|
86653
|
+
type: type,
|
|
86654
|
+
onClose: onClose
|
|
86655
|
+
});
|
|
86656
|
+
};
|
|
86657
|
+
}
|
|
86658
|
+
typeList.forEach(function (type) {
|
|
86659
|
+
return attachTypeApi(api$1, type);
|
|
86660
|
+
});
|
|
86661
|
+
api$1.warn = api$1.warning;
|
|
86662
|
+
api$1.useMessage = createUseMessage(getRCNotificationInstance, getRCNoticeProps$1);
|
|
86663
|
+
|
|
86664
|
+
var _excluded$1o = ["className", "size", "noBorder"];
|
|
84061
86665
|
var prefixCls$a = 'lm_tabs';
|
|
84062
86666
|
|
|
84063
86667
|
var LMTabs = function LMTabs(props) {
|
|
@@ -84066,7 +86670,7 @@
|
|
|
84066
86670
|
size = _props$size === void 0 ? "middle" : _props$size,
|
|
84067
86671
|
_props$noBorder = props.noBorder,
|
|
84068
86672
|
noBorder = _props$noBorder === void 0 ? false : _props$noBorder,
|
|
84069
|
-
others = _objectWithoutProperties(props, _excluded$
|
|
86673
|
+
others = _objectWithoutProperties(props, _excluded$1o);
|
|
84070
86674
|
|
|
84071
86675
|
return /*#__PURE__*/React__default['default'].createElement(_Tabs__default['default'], _objectSpread(_objectSpread({
|
|
84072
86676
|
size: size
|
|
@@ -84804,13 +87408,13 @@
|
|
|
84804
87408
|
}, props));
|
|
84805
87409
|
};
|
|
84806
87410
|
|
|
84807
|
-
var _excluded$
|
|
87411
|
+
var _excluded$1p = ["children", "className"];
|
|
84808
87412
|
var classNamePrefix = 'lm_form';
|
|
84809
87413
|
|
|
84810
87414
|
var LMForm = function LMForm(props, ref) {
|
|
84811
87415
|
var children = props.children,
|
|
84812
87416
|
className = props.className,
|
|
84813
|
-
restProps = _objectWithoutProperties(props, _excluded$
|
|
87417
|
+
restProps = _objectWithoutProperties(props, _excluded$1p);
|
|
84814
87418
|
|
|
84815
87419
|
return /*#__PURE__*/React__default['default'].createElement(_Form__default['default'], _objectSpread({
|
|
84816
87420
|
ref: ref,
|
|
@@ -84877,13 +87481,13 @@
|
|
|
84877
87481
|
}, children);
|
|
84878
87482
|
};
|
|
84879
87483
|
|
|
84880
|
-
var _excluded$
|
|
87484
|
+
var _excluded$1q = ["data-row-key", "children", "className"];
|
|
84881
87485
|
|
|
84882
87486
|
var SortableItem$1 = function SortableItem(props) {
|
|
84883
87487
|
var key = props['data-row-key'],
|
|
84884
87488
|
children = props.children,
|
|
84885
87489
|
className = props.className,
|
|
84886
|
-
resetField = _objectWithoutProperties(props, _excluded$
|
|
87490
|
+
resetField = _objectWithoutProperties(props, _excluded$1q);
|
|
84887
87491
|
|
|
84888
87492
|
var _useSortable = useSortable({
|
|
84889
87493
|
id: key
|
|
@@ -84923,8 +87527,8 @@
|
|
|
84923
87527
|
}));
|
|
84924
87528
|
};
|
|
84925
87529
|
|
|
84926
|
-
var _excluded$
|
|
84927
|
-
_excluded2$
|
|
87530
|
+
var _excluded$1r = ["index"],
|
|
87531
|
+
_excluded2$m = ["index"],
|
|
84928
87532
|
_excluded3$7 = ["value", "onChange"],
|
|
84929
87533
|
_excluded4$3 = ["record", "rowKey", "isEdit", "col", "handleTableRowDelete", "handleTableRowAdd", "getLength", "isHoverEdit", "editEnum", "valueType", "children", "handleSave", "handleAdd", "handleDelete", "itemProps", "setValid", "reWriteOriginSource"],
|
|
84930
87534
|
_excluded5$2 = ["onMouseEnter", "onMouseLeave"],
|
|
@@ -84934,7 +87538,7 @@
|
|
|
84934
87538
|
|
|
84935
87539
|
var EditableRow$1 = function EditableRow(_ref) {
|
|
84936
87540
|
var index = _ref.index,
|
|
84937
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
87541
|
+
props = _objectWithoutProperties(_ref, _excluded$1r);
|
|
84938
87542
|
|
|
84939
87543
|
var _Form$useForm = _Form__default['default'].useForm(),
|
|
84940
87544
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
@@ -84950,7 +87554,7 @@
|
|
|
84950
87554
|
|
|
84951
87555
|
var EditableSortRow = function EditableSortRow(_ref2) {
|
|
84952
87556
|
var index = _ref2.index,
|
|
84953
|
-
props = _objectWithoutProperties(_ref2, _excluded2$
|
|
87557
|
+
props = _objectWithoutProperties(_ref2, _excluded2$m);
|
|
84954
87558
|
|
|
84955
87559
|
var _Form$useForm3 = _Form__default['default'].useForm(),
|
|
84956
87560
|
_Form$useForm4 = _slicedToArray(_Form$useForm3, 1),
|
|
@@ -85781,12 +88385,6 @@
|
|
|
85781
88385
|
return _Spin__default['default'];
|
|
85782
88386
|
}
|
|
85783
88387
|
});
|
|
85784
|
-
Object.defineProperty(exports, 'message', {
|
|
85785
|
-
enumerable: true,
|
|
85786
|
-
get: function () {
|
|
85787
|
-
return _message__default['default'];
|
|
85788
|
-
}
|
|
85789
|
-
});
|
|
85790
88388
|
Object.defineProperty(exports, 'Image', {
|
|
85791
88389
|
enumerable: true,
|
|
85792
88390
|
get: function () {
|
|
@@ -85823,12 +88421,6 @@
|
|
|
85823
88421
|
return _Menu__default['default'];
|
|
85824
88422
|
}
|
|
85825
88423
|
});
|
|
85826
|
-
Object.defineProperty(exports, 'notification', {
|
|
85827
|
-
enumerable: true,
|
|
85828
|
-
get: function () {
|
|
85829
|
-
return _notification__default['default'];
|
|
85830
|
-
}
|
|
85831
|
-
});
|
|
85832
88424
|
exports.Button = LMButton;
|
|
85833
88425
|
exports.ButtonTags = ButtonTags;
|
|
85834
88426
|
exports.Cascader = LMCascader;
|
|
@@ -85866,6 +88458,8 @@
|
|
|
85866
88458
|
exports.Upload = LMUpload;
|
|
85867
88459
|
exports.UploadOss = UploadOss;
|
|
85868
88460
|
exports.VirtualList = VirList;
|
|
88461
|
+
exports.message = api$1;
|
|
88462
|
+
exports.notification = api;
|
|
85869
88463
|
|
|
85870
88464
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
85871
88465
|
|