linkmore-design 1.0.51 → 1.0.55
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/{Notification → Affix}/demos/basic.d.ts +0 -0
- package/dist/Affix/index.d.ts +54 -0
- package/dist/{Notification → Affix}/style/index.d.ts +0 -0
- package/dist/Affix/utils.d.ts +15 -0
- package/dist/Alert/ErrorBoundary.d.ts +22 -0
- package/dist/{Notification/demos/button.d.ts → Alert/demos/basic.d.ts} +0 -0
- package/dist/{Notification/demos/icon.d.ts → Alert/demos/visible.d.ts} +0 -0
- package/dist/Alert/index.d.ts +41 -0
- package/dist/Alert/style/index.d.ts +1 -0
- package/dist/Button/style/index.d.ts +1 -1
- package/dist/CardTable/fns/index.d.ts +3 -3
- package/dist/CardTable/{toolbar → pager}/TablePagination.d.ts +0 -0
- package/dist/CardTable/pager/index.d.ts +3 -0
- package/dist/IconFont/index.d.ts +1 -1
- package/dist/LmEditTable/style/index.d.ts +1 -1
- package/dist/LmFilter/LmFilter.d.ts +3 -0
- package/dist/LmFilter/baseFilter/fuzzySearch.d.ts +4 -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/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 +9 -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/QuickMenu/demos/basic.d.ts +2 -0
- package/dist/QuickMenu/index.d.ts +14 -0
- package/dist/QuickMenu/style/index.d.ts +1 -0
- package/dist/Tag/demos/ExigencyTag.d.ts +2 -0
- package/dist/Tag/index.d.ts +4 -0
- package/dist/Upload/demos/picture-little.d.ts +3 -0
- package/dist/Upload/index.d.ts +5 -1
- package/dist/_util/domTarget.d.ts +7 -0
- package/dist/_util/getDataOrAriaProps.d.ts +1 -0
- package/dist/_util/reactNode.d.ts +7 -0
- package/dist/_util/throttleByAnimationFrame.d.ts +8 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.umd.js +3453 -317
- 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/basic.d.ts +2 -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/Affix/index.d.ts +54 -0
- package/es/Affix/index.js +326 -0
- package/{lib/Notification → es/Affix}/style/index.css +0 -3
- package/es/{Notification → Affix}/style/index.d.ts +0 -0
- package/es/{Notification → Affix}/style/index.js +0 -0
- package/es/Affix/utils.d.ts +15 -0
- package/es/Affix/utils.js +83 -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/es/Alert/style/index.css +531 -0
- package/{lib/Notification → es/Alert}/style/index.d.ts +0 -0
- package/es/Alert/style/index.js +1 -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 -8
- 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/Descriptions/style/index.css +10 -8
- 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/IconFont/index.js +3 -2
- 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/fuzzySearch.js +53 -0
- package/es/LmFilter/baseFilter/index.js +34 -0
- package/es/LmFilter/clearFilter/index.js +35 -0
- package/es/LmFilter/complexFilter/index.js +17 -0
- package/es/LmFilter/components/CascaderFilter.js +159 -0
- package/es/LmFilter/components/CheckboxFilter.js +197 -0
- package/es/LmFilter/components/DateFilter.js +139 -0
- package/es/LmFilter/components/DropdownFIlter.js +230 -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/index.js +140 -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 +29 -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 +205 -0
- package/es/LmFilter/utils.js +71 -0
- package/es/LmFilter/wrapper/Filter.js +33 -0
- package/es/LmFilter/wrapper/FilterContainer.js +29 -0
- package/es/LmFilter/wrapper/FilterRoot.js +120 -0
- package/es/LmFilter/wrapper/FilterWrapper.js +25 -0
- package/es/LmTable/style/{style.css → index.css} +0 -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/QuickMenu/index.d.ts +14 -0
- package/es/QuickMenu/index.js +169 -0
- package/es/QuickMenu/style/index.css +560 -0
- package/es/QuickMenu/style/index.d.ts +1 -0
- package/es/QuickMenu/style/index.js +1 -0
- 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/Tag/index.d.ts +4 -0
- package/es/Tag/index.js +48 -2
- package/es/Tag/style/index.css +4 -1
- package/es/Upload/index.d.ts +5 -1
- package/es/Upload/index.js +7 -2
- package/es/Upload/style/index.css +35 -0
- 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/domTarget.d.ts +7 -0
- package/es/_util/domTarget.js +20 -0
- 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/_util/throttleByAnimationFrame.d.ts +8 -0
- package/es/_util/throttleByAnimationFrame.js +58 -0
- package/es/index.d.ts +2 -1
- package/es/index.js +3 -2
- 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/es/notification/style/index.d.ts +1 -0
- package/es/notification/style/index.js +1 -0
- package/lib/Affix/index.d.ts +54 -0
- package/lib/Affix/index.js +349 -0
- package/{es/Notification → lib/Affix}/style/index.css +0 -3
- package/lib/Affix/style/index.d.ts +1 -0
- package/lib/{Notification → Affix}/style/index.js +0 -0
- package/lib/Affix/utils.d.ts +15 -0
- package/lib/Affix/utils.js +104 -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/lib/Alert/style/index.css +531 -0
- package/lib/Alert/style/index.d.ts +1 -0
- package/lib/Alert/style/index.js +3 -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 -8
- 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/Descriptions/style/index.css +10 -8
- 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/IconFont/index.js +3 -2
- 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/fuzzySearch.js +53 -0
- package/lib/LmFilter/baseFilter/index.js +34 -0
- package/lib/LmFilter/clearFilter/index.js +35 -0
- package/lib/LmFilter/complexFilter/index.js +17 -0
- package/lib/LmFilter/components/CascaderFilter.js +159 -0
- package/lib/LmFilter/components/CheckboxFilter.js +197 -0
- package/lib/LmFilter/components/DateFilter.js +139 -0
- package/lib/LmFilter/components/DropdownFIlter.js +230 -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/index.js +140 -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 +29 -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 +205 -0
- package/lib/LmFilter/utils.js +71 -0
- package/lib/LmFilter/wrapper/Filter.js +33 -0
- package/lib/LmFilter/wrapper/FilterContainer.js +29 -0
- package/lib/LmFilter/wrapper/FilterRoot.js +120 -0
- package/lib/LmFilter/wrapper/FilterWrapper.js +25 -0
- package/lib/LmTable/style/{style.css → index.css} +0 -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/QuickMenu/index.d.ts +14 -0
- package/lib/QuickMenu/index.js +187 -0
- package/lib/QuickMenu/style/index.css +560 -0
- package/lib/QuickMenu/style/index.d.ts +1 -0
- package/lib/QuickMenu/style/index.js +3 -0
- 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/Tag/index.d.ts +4 -0
- package/lib/Tag/index.js +48 -1
- package/lib/Tag/style/index.css +4 -1
- package/lib/Upload/index.d.ts +5 -1
- package/lib/Upload/index.js +8 -2
- package/lib/Upload/style/index.css +35 -0
- 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/domTarget.d.ts +7 -0
- package/lib/_util/domTarget.js +31 -0
- 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/_util/throttleByAnimationFrame.d.ts +8 -0
- package/lib/_util/throttleByAnimationFrame.js +72 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +11 -3
- 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 +5 -2
- 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
|
|
|
@@ -2646,8 +2745,9 @@
|
|
|
2646
2745
|
}
|
|
2647
2746
|
|
|
2648
2747
|
var IconFont = create({
|
|
2649
|
-
|
|
2650
|
-
scriptUrl: require('./font/iconfont.js')
|
|
2748
|
+
scriptUrl: '//at.alicdn.com/t/c/font_2966019_7jeb9gjjk63.js' // 在 iconfont.cn 上生成
|
|
2749
|
+
// scriptUrl: require('./font/iconfont.js'),
|
|
2750
|
+
|
|
2651
2751
|
});
|
|
2652
2752
|
|
|
2653
2753
|
var lodash = createCommonjsModule(function (module, exports) {
|
|
@@ -26766,7 +26866,7 @@
|
|
|
26766
26866
|
}
|
|
26767
26867
|
|
|
26768
26868
|
}), [announce, announcements]));
|
|
26769
|
-
return mounted ?
|
|
26869
|
+
return mounted ? ReactDOM.createPortal(React__default['default'].createElement(React__default['default'].Fragment, null, React__default['default'].createElement(HiddenText, {
|
|
26770
26870
|
id: hiddenTextDescribedById,
|
|
26771
26871
|
value: screenReaderInstructions.draggable
|
|
26772
26872
|
}), React__default['default'].createElement(LiveRegion, {
|
|
@@ -28708,7 +28808,7 @@
|
|
|
28708
28808
|
rect: activeRects
|
|
28709
28809
|
}
|
|
28710
28810
|
};
|
|
28711
|
-
|
|
28811
|
+
ReactDOM.unstable_batchedUpdates(() => {
|
|
28712
28812
|
dispatch({
|
|
28713
28813
|
type: Action.DragStart,
|
|
28714
28814
|
initialCoordinates,
|
|
@@ -28732,7 +28832,7 @@
|
|
|
28732
28832
|
onEnd: createHandler(Action.DragEnd),
|
|
28733
28833
|
onCancel: createHandler(Action.DragCancel)
|
|
28734
28834
|
});
|
|
28735
|
-
|
|
28835
|
+
ReactDOM.unstable_batchedUpdates(() => {
|
|
28736
28836
|
setActiveSensor(sensorInstance);
|
|
28737
28837
|
setActivatorEvent(event.nativeEvent);
|
|
28738
28838
|
});
|
|
@@ -28768,7 +28868,7 @@
|
|
|
28768
28868
|
}
|
|
28769
28869
|
|
|
28770
28870
|
activeRef.current = null;
|
|
28771
|
-
|
|
28871
|
+
ReactDOM.unstable_batchedUpdates(() => {
|
|
28772
28872
|
dispatch({
|
|
28773
28873
|
type
|
|
28774
28874
|
});
|
|
@@ -28893,7 +28993,7 @@
|
|
|
28893
28993
|
},
|
|
28894
28994
|
over
|
|
28895
28995
|
};
|
|
28896
|
-
|
|
28996
|
+
ReactDOM.unstable_batchedUpdates(() => {
|
|
28897
28997
|
setOver(over);
|
|
28898
28998
|
setMonitorState({
|
|
28899
28999
|
type: Action.DragOver,
|
|
@@ -58398,7 +58498,7 @@
|
|
|
58398
58498
|
_createClass(WithSortableHandle, [{
|
|
58399
58499
|
key: "componentDidMount",
|
|
58400
58500
|
value: function componentDidMount() {
|
|
58401
|
-
var node =
|
|
58501
|
+
var node = ReactDOM.findDOMNode(this);
|
|
58402
58502
|
node.sortableHandle = true;
|
|
58403
58503
|
}
|
|
58404
58504
|
}, {
|
|
@@ -59458,7 +59558,7 @@
|
|
|
59458
59558
|
var getContainer = this.props.getContainer;
|
|
59459
59559
|
|
|
59460
59560
|
if (typeof getContainer !== 'function') {
|
|
59461
|
-
return
|
|
59561
|
+
return ReactDOM.findDOMNode(this);
|
|
59462
59562
|
}
|
|
59463
59563
|
|
|
59464
59564
|
return getContainer(config.withRef ? this.getWrappedInstance() : undefined);
|
|
@@ -59583,7 +59683,7 @@
|
|
|
59583
59683
|
collection = _this$props.collection,
|
|
59584
59684
|
disabled = _this$props.disabled,
|
|
59585
59685
|
index = _this$props.index;
|
|
59586
|
-
var node =
|
|
59686
|
+
var node = ReactDOM.findDOMNode(this);
|
|
59587
59687
|
node.sortableInfo = {
|
|
59588
59688
|
collection: collection,
|
|
59589
59689
|
disabled: disabled,
|
|
@@ -68012,7 +68112,7 @@
|
|
|
68012
68112
|
}, [(_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
68113
|
var contentRender = React.useCallback(function (formDom, submitter) {
|
|
68014
68114
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
68015
|
-
children: [formDom, footerRef.current && submitter ? /*#__PURE__*/
|
|
68115
|
+
children: [formDom, footerRef.current && submitter ? /*#__PURE__*/ReactDOM.createPortal(submitter, footerRef.current) : submitter]
|
|
68016
68116
|
});
|
|
68017
68117
|
}, []);
|
|
68018
68118
|
var onFinishHandle = useRefFunction( /*#__PURE__*/function () {
|
|
@@ -68487,7 +68587,7 @@
|
|
|
68487
68587
|
}, [(_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
68588
|
var contentRender = React.useCallback(function (formDom, submitter) {
|
|
68489
68589
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
68490
|
-
children: [formDom, footerRef.current && submitter ? /*#__PURE__*/
|
|
68590
|
+
children: [formDom, footerRef.current && submitter ? /*#__PURE__*/ReactDOM.createPortal(submitter, footerRef.current) : submitter]
|
|
68491
68591
|
});
|
|
68492
68592
|
}, []);
|
|
68493
68593
|
var onFinishHandle = React.useCallback( /*#__PURE__*/function () {
|
|
@@ -68662,7 +68762,7 @@
|
|
|
68662
68762
|
return node;
|
|
68663
68763
|
}
|
|
68664
68764
|
|
|
68665
|
-
return
|
|
68765
|
+
return ReactDOM__default['default'].findDOMNode(node);
|
|
68666
68766
|
}
|
|
68667
68767
|
|
|
68668
68768
|
/**
|
|
@@ -76605,7 +76705,7 @@
|
|
|
76605
76705
|
|
|
76606
76706
|
var _propTypes = _interopRequireDefault(propTypes);
|
|
76607
76707
|
|
|
76608
|
-
var _reactDom = _interopRequireDefault(
|
|
76708
|
+
var _reactDom = _interopRequireDefault(ReactDOM__default['default']);
|
|
76609
76709
|
|
|
76610
76710
|
|
|
76611
76711
|
|
|
@@ -77184,7 +77284,7 @@
|
|
|
77184
77284
|
|
|
77185
77285
|
var _propTypes = _interopRequireDefault(propTypes);
|
|
77186
77286
|
|
|
77187
|
-
var _reactDom = _interopRequireDefault(
|
|
77287
|
+
var _reactDom = _interopRequireDefault(ReactDOM__default['default']);
|
|
77188
77288
|
|
|
77189
77289
|
var _clsx2 = _interopRequireDefault(require$$3);
|
|
77190
77290
|
|
|
@@ -81014,6 +81114,39 @@
|
|
|
81014
81114
|
return memoizedFn.current;
|
|
81015
81115
|
}
|
|
81016
81116
|
|
|
81117
|
+
function depsAreSame(oldDeps, deps) {
|
|
81118
|
+
if (oldDeps === deps) return true;
|
|
81119
|
+
|
|
81120
|
+
for (var i = 0; i < oldDeps.length; i++) {
|
|
81121
|
+
if (!Object.is(oldDeps[i], deps[i])) return false;
|
|
81122
|
+
}
|
|
81123
|
+
|
|
81124
|
+
return true;
|
|
81125
|
+
}
|
|
81126
|
+
|
|
81127
|
+
function useLatest$1(value) {
|
|
81128
|
+
var ref = React.useRef(value);
|
|
81129
|
+
ref.current = value;
|
|
81130
|
+
return ref;
|
|
81131
|
+
}
|
|
81132
|
+
|
|
81133
|
+
var useUnmount = function useUnmount(fn) {
|
|
81134
|
+
{
|
|
81135
|
+
if (!isFunction$3(fn)) {
|
|
81136
|
+
console.error("useUnmount expected parameter is a function, got " + typeof fn);
|
|
81137
|
+
}
|
|
81138
|
+
}
|
|
81139
|
+
|
|
81140
|
+
var fnRef = useLatest$1(fn);
|
|
81141
|
+
React.useEffect(function () {
|
|
81142
|
+
return function () {
|
|
81143
|
+
fnRef.current();
|
|
81144
|
+
};
|
|
81145
|
+
}, []);
|
|
81146
|
+
};
|
|
81147
|
+
|
|
81148
|
+
var isBrowser$2 = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
81149
|
+
|
|
81017
81150
|
var __read = undefined && undefined.__read || function (o, n) {
|
|
81018
81151
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
81019
81152
|
if (!m) return o;
|
|
@@ -81050,6 +81183,77 @@
|
|
|
81050
81183
|
}, []);
|
|
81051
81184
|
};
|
|
81052
81185
|
|
|
81186
|
+
function getTargetElement(target, defaultElement) {
|
|
81187
|
+
if (!isBrowser$2) {
|
|
81188
|
+
return undefined;
|
|
81189
|
+
}
|
|
81190
|
+
|
|
81191
|
+
if (!target) {
|
|
81192
|
+
return defaultElement;
|
|
81193
|
+
}
|
|
81194
|
+
|
|
81195
|
+
var targetElement;
|
|
81196
|
+
|
|
81197
|
+
if (isFunction$3(target)) {
|
|
81198
|
+
targetElement = target();
|
|
81199
|
+
} else if ('current' in target) {
|
|
81200
|
+
targetElement = target.current;
|
|
81201
|
+
} else {
|
|
81202
|
+
targetElement = target;
|
|
81203
|
+
}
|
|
81204
|
+
|
|
81205
|
+
return targetElement;
|
|
81206
|
+
}
|
|
81207
|
+
|
|
81208
|
+
var createEffectWithTarget = function createEffectWithTarget(useEffectType) {
|
|
81209
|
+
/**
|
|
81210
|
+
*
|
|
81211
|
+
* @param effect
|
|
81212
|
+
* @param deps
|
|
81213
|
+
* @param target target should compare ref.current vs ref.current, dom vs dom, ()=>dom vs ()=>dom
|
|
81214
|
+
*/
|
|
81215
|
+
var useEffectWithTarget = function useEffectWithTarget(effect, deps, target) {
|
|
81216
|
+
var hasInitRef = React.useRef(false);
|
|
81217
|
+
var lastElementRef = React.useRef([]);
|
|
81218
|
+
var lastDepsRef = React.useRef([]);
|
|
81219
|
+
var unLoadRef = React.useRef();
|
|
81220
|
+
useEffectType(function () {
|
|
81221
|
+
var _a;
|
|
81222
|
+
|
|
81223
|
+
var targets = Array.isArray(target) ? target : [target];
|
|
81224
|
+
var els = targets.map(function (item) {
|
|
81225
|
+
return getTargetElement(item);
|
|
81226
|
+
}); // init run
|
|
81227
|
+
|
|
81228
|
+
if (!hasInitRef.current) {
|
|
81229
|
+
hasInitRef.current = true;
|
|
81230
|
+
lastElementRef.current = els;
|
|
81231
|
+
lastDepsRef.current = deps;
|
|
81232
|
+
unLoadRef.current = effect();
|
|
81233
|
+
return;
|
|
81234
|
+
}
|
|
81235
|
+
|
|
81236
|
+
if (els.length !== lastElementRef.current.length || !depsAreSame(els, lastElementRef.current) || !depsAreSame(deps, lastDepsRef.current)) {
|
|
81237
|
+
(_a = unLoadRef.current) === null || _a === void 0 ? void 0 : _a.call(unLoadRef);
|
|
81238
|
+
lastElementRef.current = els;
|
|
81239
|
+
lastDepsRef.current = deps;
|
|
81240
|
+
unLoadRef.current = effect();
|
|
81241
|
+
}
|
|
81242
|
+
});
|
|
81243
|
+
useUnmount(function () {
|
|
81244
|
+
var _a;
|
|
81245
|
+
|
|
81246
|
+
(_a = unLoadRef.current) === null || _a === void 0 ? void 0 : _a.call(unLoadRef); // for react-refresh
|
|
81247
|
+
|
|
81248
|
+
hasInitRef.current = false;
|
|
81249
|
+
});
|
|
81250
|
+
};
|
|
81251
|
+
|
|
81252
|
+
return useEffectWithTarget;
|
|
81253
|
+
};
|
|
81254
|
+
|
|
81255
|
+
var useEffectWithTarget = createEffectWithTarget(React.useEffect);
|
|
81256
|
+
|
|
81053
81257
|
var __read$1 = undefined && undefined.__read || function (o, n) {
|
|
81054
81258
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
81055
81259
|
if (!m) return o;
|
|
@@ -81144,6 +81348,137 @@
|
|
|
81144
81348
|
return [stateRef.current, useMemoizedFn(setState)];
|
|
81145
81349
|
}
|
|
81146
81350
|
|
|
81351
|
+
var __read$2 = undefined && undefined.__read || function (o, n) {
|
|
81352
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
81353
|
+
if (!m) return o;
|
|
81354
|
+
var i = m.call(o),
|
|
81355
|
+
r,
|
|
81356
|
+
ar = [],
|
|
81357
|
+
e;
|
|
81358
|
+
|
|
81359
|
+
try {
|
|
81360
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
81361
|
+
ar.push(r.value);
|
|
81362
|
+
}
|
|
81363
|
+
} catch (error) {
|
|
81364
|
+
e = {
|
|
81365
|
+
error: error
|
|
81366
|
+
};
|
|
81367
|
+
} finally {
|
|
81368
|
+
try {
|
|
81369
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
81370
|
+
} finally {
|
|
81371
|
+
if (e) throw e.error;
|
|
81372
|
+
}
|
|
81373
|
+
}
|
|
81374
|
+
|
|
81375
|
+
return ar;
|
|
81376
|
+
};
|
|
81377
|
+
|
|
81378
|
+
function useRafState(initialState) {
|
|
81379
|
+
var ref = React.useRef(0);
|
|
81380
|
+
|
|
81381
|
+
var _a = __read$2(React.useState(initialState), 2),
|
|
81382
|
+
state = _a[0],
|
|
81383
|
+
setState = _a[1];
|
|
81384
|
+
|
|
81385
|
+
var setRafState = React.useCallback(function (value) {
|
|
81386
|
+
cancelAnimationFrame(ref.current);
|
|
81387
|
+
ref.current = requestAnimationFrame(function () {
|
|
81388
|
+
setState(value);
|
|
81389
|
+
});
|
|
81390
|
+
}, []);
|
|
81391
|
+
useUnmount(function () {
|
|
81392
|
+
cancelAnimationFrame(ref.current);
|
|
81393
|
+
});
|
|
81394
|
+
return [state, setRafState];
|
|
81395
|
+
}
|
|
81396
|
+
|
|
81397
|
+
var __read$3 = undefined && undefined.__read || function (o, n) {
|
|
81398
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
81399
|
+
if (!m) return o;
|
|
81400
|
+
var i = m.call(o),
|
|
81401
|
+
r,
|
|
81402
|
+
ar = [],
|
|
81403
|
+
e;
|
|
81404
|
+
|
|
81405
|
+
try {
|
|
81406
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
81407
|
+
ar.push(r.value);
|
|
81408
|
+
}
|
|
81409
|
+
} catch (error) {
|
|
81410
|
+
e = {
|
|
81411
|
+
error: error
|
|
81412
|
+
};
|
|
81413
|
+
} finally {
|
|
81414
|
+
try {
|
|
81415
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
81416
|
+
} finally {
|
|
81417
|
+
if (e) throw e.error;
|
|
81418
|
+
}
|
|
81419
|
+
}
|
|
81420
|
+
|
|
81421
|
+
return ar;
|
|
81422
|
+
};
|
|
81423
|
+
|
|
81424
|
+
function useScroll(target, shouldUpdate) {
|
|
81425
|
+
if (shouldUpdate === void 0) {
|
|
81426
|
+
shouldUpdate = function shouldUpdate() {
|
|
81427
|
+
return true;
|
|
81428
|
+
};
|
|
81429
|
+
}
|
|
81430
|
+
|
|
81431
|
+
var _a = __read$3(useRafState(), 2),
|
|
81432
|
+
position = _a[0],
|
|
81433
|
+
setPosition = _a[1];
|
|
81434
|
+
|
|
81435
|
+
var shouldUpdateRef = useLatest$1(shouldUpdate);
|
|
81436
|
+
useEffectWithTarget(function () {
|
|
81437
|
+
var el = getTargetElement(target, document);
|
|
81438
|
+
|
|
81439
|
+
if (!el) {
|
|
81440
|
+
return;
|
|
81441
|
+
}
|
|
81442
|
+
|
|
81443
|
+
var updatePosition = function updatePosition() {
|
|
81444
|
+
var newPosition;
|
|
81445
|
+
|
|
81446
|
+
if (el === document) {
|
|
81447
|
+
if (document.scrollingElement) {
|
|
81448
|
+
newPosition = {
|
|
81449
|
+
left: document.scrollingElement.scrollLeft,
|
|
81450
|
+
top: document.scrollingElement.scrollTop
|
|
81451
|
+
};
|
|
81452
|
+
} else {
|
|
81453
|
+
// When in quirks mode, the scrollingElement attribute returns the HTML body element if it exists and is potentially scrollable, otherwise it returns null.
|
|
81454
|
+
// https://developer.mozilla.org/zh-CN/docs/Web/API/Document/scrollingElement
|
|
81455
|
+
// https://stackoverflow.com/questions/28633221/document-body-scrolltop-firefox-returns-0-only-js
|
|
81456
|
+
newPosition = {
|
|
81457
|
+
left: Math.max(window.pageYOffset, document.documentElement.scrollTop, document.body.scrollTop),
|
|
81458
|
+
top: Math.max(window.pageXOffset, document.documentElement.scrollLeft, document.body.scrollLeft)
|
|
81459
|
+
};
|
|
81460
|
+
}
|
|
81461
|
+
} else {
|
|
81462
|
+
newPosition = {
|
|
81463
|
+
left: el.scrollLeft,
|
|
81464
|
+
top: el.scrollTop
|
|
81465
|
+
};
|
|
81466
|
+
}
|
|
81467
|
+
|
|
81468
|
+
if (shouldUpdateRef.current(newPosition)) {
|
|
81469
|
+
setPosition(newPosition);
|
|
81470
|
+
}
|
|
81471
|
+
};
|
|
81472
|
+
|
|
81473
|
+
updatePosition();
|
|
81474
|
+
el.addEventListener('scroll', updatePosition);
|
|
81475
|
+
return function () {
|
|
81476
|
+
el.removeEventListener('scroll', updatePosition);
|
|
81477
|
+
};
|
|
81478
|
+
}, [], target);
|
|
81479
|
+
return position;
|
|
81480
|
+
}
|
|
81481
|
+
|
|
81147
81482
|
function getArray(val) {
|
|
81148
81483
|
if (!val) return [];
|
|
81149
81484
|
return Array.isArray(val) ? val : [val];
|
|
@@ -81991,299 +82326,2500 @@
|
|
|
81991
82326
|
LMModal.destroyAll = _Modal__default['default'].destroyAll;
|
|
81992
82327
|
LMModal.config = _Modal__default['default'].config;
|
|
81993
82328
|
|
|
81994
|
-
var
|
|
82329
|
+
var fullClone = _objectSpread2({}, ReactDOM__namespace);
|
|
81995
82330
|
|
|
81996
|
-
var
|
|
81997
|
-
|
|
81998
|
-
|
|
81999
|
-
|
|
82000
|
-
children = props.children,
|
|
82001
|
-
reset = _objectWithoutProperties(props, _excluded$17);
|
|
82331
|
+
var version = fullClone.version,
|
|
82332
|
+
reactRender = fullClone.render,
|
|
82333
|
+
unmountComponentAtNode = fullClone.unmountComponentAtNode;
|
|
82334
|
+
var createRoot;
|
|
82002
82335
|
|
|
82003
|
-
|
|
82004
|
-
|
|
82005
|
-
};
|
|
82336
|
+
try {
|
|
82337
|
+
var mainVersion = Number((version || '').split('.')[0]);
|
|
82006
82338
|
|
|
82007
|
-
|
|
82008
|
-
|
|
82009
|
-
}
|
|
82339
|
+
if (mainVersion >= 18) {
|
|
82340
|
+
createRoot = fullClone.createRoot;
|
|
82341
|
+
}
|
|
82342
|
+
} catch (e) {// Do nothing;
|
|
82343
|
+
}
|
|
82010
82344
|
|
|
82011
|
-
|
|
82012
|
-
|
|
82013
|
-
width: 480,
|
|
82014
|
-
visible: visible,
|
|
82015
|
-
onOk: handleClose,
|
|
82016
|
-
onCancel: handleClose,
|
|
82017
|
-
wrapClassName: wrapClassName ? "".concat(wrapClassName, " lm_addModal") : 'lm_addModal',
|
|
82018
|
-
okButtonProps: {
|
|
82019
|
-
size: 'default'
|
|
82020
|
-
},
|
|
82021
|
-
cancelButtonProps: {
|
|
82022
|
-
size: 'default'
|
|
82023
|
-
},
|
|
82024
|
-
footer: [/*#__PURE__*/React__default['default'].createElement(_Button__default['default'], {
|
|
82025
|
-
size: "large",
|
|
82026
|
-
type: "primary",
|
|
82027
|
-
key: "back",
|
|
82028
|
-
icon: /*#__PURE__*/React__default['default'].createElement(SaveOutlined$2, null),
|
|
82029
|
-
onClick: onSave
|
|
82030
|
-
}, "\u4FDD\u5B58")]
|
|
82031
|
-
};
|
|
82032
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(_Modal__default['default'], _extends({}, config, reset), children));
|
|
82033
|
-
};
|
|
82345
|
+
function toggleWarning(skip) {
|
|
82346
|
+
var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = fullClone.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
82034
82347
|
|
|
82035
|
-
|
|
82036
|
-
|
|
82037
|
-
|
|
82038
|
-
|
|
82039
|
-
*/
|
|
82348
|
+
if (__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && _typeof$1(__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === 'object') {
|
|
82349
|
+
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skip;
|
|
82350
|
+
}
|
|
82351
|
+
}
|
|
82040
82352
|
|
|
82041
|
-
var
|
|
82042
|
-
var type = _ref.type,
|
|
82043
|
-
resetProps = _objectWithoutProperties(_ref, _excluded$18);
|
|
82353
|
+
var MARK = '__rc_react_root__';
|
|
82044
82354
|
|
|
82045
|
-
|
|
82046
|
-
|
|
82047
|
-
|
|
82048
|
-
|
|
82049
|
-
|
|
82050
|
-
|
|
82051
|
-
|
|
82052
|
-
}
|
|
82053
|
-
});
|
|
82355
|
+
function modernRender(node, container) {
|
|
82356
|
+
toggleWarning(true);
|
|
82357
|
+
var root = container[MARK] || createRoot(container);
|
|
82358
|
+
toggleWarning(false);
|
|
82359
|
+
root.render(node);
|
|
82360
|
+
container[MARK] = root;
|
|
82361
|
+
}
|
|
82054
82362
|
|
|
82055
|
-
|
|
82056
|
-
|
|
82057
|
-
|
|
82058
|
-
|
|
82059
|
-
|
|
82060
|
-
|
|
82061
|
-
|
|
82363
|
+
function legacyRender(node, container) {
|
|
82364
|
+
reactRender(node, container);
|
|
82365
|
+
}
|
|
82366
|
+
function render$3(node, container) {
|
|
82367
|
+
if (createRoot) {
|
|
82368
|
+
modernRender(node, container);
|
|
82369
|
+
return;
|
|
82370
|
+
}
|
|
82062
82371
|
|
|
82063
|
-
|
|
82064
|
-
|
|
82065
|
-
type: "lmweb-info-circle",
|
|
82066
|
-
style: {
|
|
82067
|
-
color: '#FD9727'
|
|
82068
|
-
}
|
|
82069
|
-
});
|
|
82372
|
+
legacyRender(node, container);
|
|
82373
|
+
} // ========================= Unmount ==========================
|
|
82070
82374
|
|
|
82071
|
-
|
|
82072
|
-
|
|
82073
|
-
|
|
82074
|
-
style: {
|
|
82075
|
-
color: '#1890fc'
|
|
82076
|
-
}
|
|
82077
|
-
});
|
|
82375
|
+
function modernUnmount(_x) {
|
|
82376
|
+
return _modernUnmount.apply(this, arguments);
|
|
82377
|
+
}
|
|
82078
82378
|
|
|
82079
|
-
|
|
82080
|
-
|
|
82081
|
-
|
|
82082
|
-
|
|
82083
|
-
|
|
82084
|
-
|
|
82085
|
-
|
|
82086
|
-
|
|
82087
|
-
};
|
|
82379
|
+
function _modernUnmount() {
|
|
82380
|
+
_modernUnmount = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(container) {
|
|
82381
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
82382
|
+
while (1) {
|
|
82383
|
+
switch (_context.prev = _context.next) {
|
|
82384
|
+
case 0:
|
|
82385
|
+
return _context.abrupt("return", Promise.resolve().then(function () {
|
|
82386
|
+
var _container$MARK;
|
|
82088
82387
|
|
|
82089
|
-
|
|
82090
|
-
|
|
82091
|
-
|
|
82092
|
-
content: 'Bla bla ...',
|
|
82093
|
-
okText: '确认',
|
|
82094
|
-
cancelText: '取消',
|
|
82095
|
-
wrapClassName: 'lm_modal_confirm',
|
|
82096
|
-
closable: true
|
|
82097
|
-
}, resetProps));
|
|
82098
|
-
};
|
|
82388
|
+
(_container$MARK = container[MARK]) === null || _container$MARK === void 0 ? void 0 : _container$MARK.unmount();
|
|
82389
|
+
delete container[MARK];
|
|
82390
|
+
}));
|
|
82099
82391
|
|
|
82100
|
-
|
|
82392
|
+
case 1:
|
|
82393
|
+
case "end":
|
|
82394
|
+
return _context.stop();
|
|
82395
|
+
}
|
|
82396
|
+
}
|
|
82397
|
+
}, _callee);
|
|
82398
|
+
}));
|
|
82399
|
+
return _modernUnmount.apply(this, arguments);
|
|
82400
|
+
}
|
|
82101
82401
|
|
|
82102
|
-
|
|
82103
|
-
|
|
82104
|
-
|
|
82105
|
-
|
|
82106
|
-
|
|
82402
|
+
function legacyUnmount(container) {
|
|
82403
|
+
unmountComponentAtNode(container);
|
|
82404
|
+
}
|
|
82405
|
+
function unmount(_x2) {
|
|
82406
|
+
return _unmount.apply(this, arguments);
|
|
82407
|
+
}
|
|
82107
82408
|
|
|
82108
|
-
|
|
82109
|
-
|
|
82110
|
-
|
|
82111
|
-
|
|
82112
|
-
|
|
82113
|
-
|
|
82114
|
-
|
|
82115
|
-
|
|
82116
|
-
|
|
82117
|
-
|
|
82118
|
-
size: 'default'
|
|
82119
|
-
}
|
|
82120
|
-
};
|
|
82121
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(_Modal__default['default'], _extends({}, config, reset), children));
|
|
82122
|
-
};
|
|
82409
|
+
function _unmount() {
|
|
82410
|
+
_unmount = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(container) {
|
|
82411
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
82412
|
+
while (1) {
|
|
82413
|
+
switch (_context2.prev = _context2.next) {
|
|
82414
|
+
case 0:
|
|
82415
|
+
if (!(createRoot !== undefined)) {
|
|
82416
|
+
_context2.next = 2;
|
|
82417
|
+
break;
|
|
82418
|
+
}
|
|
82123
82419
|
|
|
82124
|
-
|
|
82125
|
-
var downLink = [{
|
|
82126
|
-
id: '1',
|
|
82127
|
-
label: '成衣',
|
|
82128
|
-
value: 'link',
|
|
82129
|
-
icon: 'export'
|
|
82130
|
-
}, {
|
|
82131
|
-
id: '2',
|
|
82132
|
-
label: '面料',
|
|
82133
|
-
value: 'link',
|
|
82134
|
-
icon: 'export'
|
|
82135
|
-
}, {
|
|
82136
|
-
id: '3',
|
|
82137
|
-
label: '辅料',
|
|
82138
|
-
value: 'link',
|
|
82139
|
-
icon: 'export'
|
|
82140
|
-
}];
|
|
82141
|
-
var desc1 = [{
|
|
82142
|
-
id: '1',
|
|
82143
|
-
value: '红色为必填字段'
|
|
82144
|
-
}, {
|
|
82145
|
-
id: '2',
|
|
82146
|
-
value: '导入仅允许新增供应商信息'
|
|
82147
|
-
}];
|
|
82148
|
-
/*
|
|
82149
|
-
文件上传区域
|
|
82150
|
-
multiple:是否多选
|
|
82151
|
-
accept:文件选择时的默认类型筛选:"image/jpeg"、text/csv、application/msword、application/vnd.ms-excel => accept=".xlsx, .xls"
|
|
82152
|
-
type: 限制上传文件的类型
|
|
82153
|
-
size:文件大小(M)
|
|
82154
|
-
*/
|
|
82420
|
+
return _context2.abrupt("return", modernUnmount(container));
|
|
82155
82421
|
|
|
82156
|
-
|
|
82157
|
-
|
|
82158
|
-
multiple = _ref.multiple,
|
|
82159
|
-
_ref$fileLength = _ref.fileLength,
|
|
82160
|
-
fileLength = _ref$fileLength === void 0 ? 99 : _ref$fileLength,
|
|
82161
|
-
onChange = _ref.onChange,
|
|
82162
|
-
accept = _ref.accept,
|
|
82163
|
-
_ref$type = _ref.type,
|
|
82164
|
-
type = _ref$type === void 0 ? ['xls', 'xlsx'] : _ref$type,
|
|
82165
|
-
_ref$size = _ref.size,
|
|
82166
|
-
size = _ref$size === void 0 ? 100 : _ref$size;
|
|
82167
|
-
var fileRef = React.useRef(null); // 文件保存
|
|
82168
|
-
// 解决同文件的多次上传问题
|
|
82422
|
+
case 2:
|
|
82423
|
+
legacyUnmount(container);
|
|
82169
82424
|
|
|
82170
|
-
|
|
82171
|
-
|
|
82425
|
+
case 3:
|
|
82426
|
+
case "end":
|
|
82427
|
+
return _context2.stop();
|
|
82428
|
+
}
|
|
82429
|
+
}
|
|
82430
|
+
}, _callee2);
|
|
82431
|
+
}));
|
|
82432
|
+
return _unmount.apply(this, arguments);
|
|
82433
|
+
}
|
|
82434
|
+
|
|
82435
|
+
// Event wrapper. Copy from react source code
|
|
82436
|
+
|
|
82437
|
+
function makePrefixMap(styleProp, eventName) {
|
|
82438
|
+
var prefixes = {};
|
|
82439
|
+
prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
|
|
82440
|
+
prefixes["Webkit".concat(styleProp)] = "webkit".concat(eventName);
|
|
82441
|
+
prefixes["Moz".concat(styleProp)] = "moz".concat(eventName);
|
|
82442
|
+
prefixes["ms".concat(styleProp)] = "MS".concat(eventName);
|
|
82443
|
+
prefixes["O".concat(styleProp)] = "o".concat(eventName.toLowerCase());
|
|
82444
|
+
return prefixes;
|
|
82445
|
+
}
|
|
82446
|
+
|
|
82447
|
+
function getVendorPrefixes(domSupport, win) {
|
|
82448
|
+
var prefixes = {
|
|
82449
|
+
animationend: makePrefixMap('Animation', 'AnimationEnd'),
|
|
82450
|
+
transitionend: makePrefixMap('Transition', 'TransitionEnd')
|
|
82172
82451
|
};
|
|
82173
82452
|
|
|
82174
|
-
|
|
82175
|
-
|
|
82453
|
+
if (domSupport) {
|
|
82454
|
+
if (!('AnimationEvent' in win)) {
|
|
82455
|
+
delete prefixes.animationend.animation;
|
|
82456
|
+
}
|
|
82176
82457
|
|
|
82177
|
-
if (
|
|
82178
|
-
|
|
82179
|
-
}
|
|
82458
|
+
if (!('TransitionEvent' in win)) {
|
|
82459
|
+
delete prefixes.transitionend.transition;
|
|
82460
|
+
}
|
|
82461
|
+
}
|
|
82180
82462
|
|
|
82463
|
+
return prefixes;
|
|
82464
|
+
}
|
|
82465
|
+
var vendorPrefixes = getVendorPrefixes(canUseDom(), typeof window !== 'undefined' ? window : {});
|
|
82466
|
+
var style = {};
|
|
82181
82467
|
|
|
82182
|
-
|
|
82183
|
-
|
|
82468
|
+
if (canUseDom()) {
|
|
82469
|
+
var _document$createEleme = document.createElement('div');
|
|
82184
82470
|
|
|
82185
|
-
|
|
82186
|
-
|
|
82187
|
-
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);
|
|
82188
|
-
}
|
|
82471
|
+
style = _document$createEleme.style;
|
|
82472
|
+
}
|
|
82189
82473
|
|
|
82190
|
-
|
|
82191
|
-
|
|
82474
|
+
var prefixedEventNames = {};
|
|
82475
|
+
function getVendorPrefixedEventName(eventName) {
|
|
82476
|
+
if (prefixedEventNames[eventName]) {
|
|
82477
|
+
return prefixedEventNames[eventName];
|
|
82478
|
+
}
|
|
82479
|
+
|
|
82480
|
+
var prefixMap = vendorPrefixes[eventName];
|
|
82481
|
+
|
|
82482
|
+
if (prefixMap) {
|
|
82483
|
+
var stylePropList = Object.keys(prefixMap);
|
|
82484
|
+
var len = stylePropList.length;
|
|
82485
|
+
|
|
82486
|
+
for (var i = 0; i < len; i += 1) {
|
|
82487
|
+
var styleProp = stylePropList[i];
|
|
82488
|
+
|
|
82489
|
+
if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in style) {
|
|
82490
|
+
prefixedEventNames[eventName] = prefixMap[styleProp];
|
|
82491
|
+
return prefixedEventNames[eventName];
|
|
82192
82492
|
}
|
|
82193
82493
|
}
|
|
82494
|
+
}
|
|
82194
82495
|
|
|
82195
|
-
|
|
82196
|
-
|
|
82197
|
-
|
|
82198
|
-
|
|
82496
|
+
return '';
|
|
82497
|
+
}
|
|
82498
|
+
var internalAnimationEndName = getVendorPrefixedEventName('animationend');
|
|
82499
|
+
var internalTransitionEndName = getVendorPrefixedEventName('transitionend');
|
|
82500
|
+
var supportTransition = !!(internalAnimationEndName && internalTransitionEndName);
|
|
82501
|
+
var animationEndName = internalAnimationEndName || 'animationend';
|
|
82502
|
+
var transitionEndName = internalTransitionEndName || 'transitionend';
|
|
82503
|
+
function getTransitionName(transitionName, transitionType) {
|
|
82504
|
+
if (!transitionName) return null;
|
|
82505
|
+
|
|
82506
|
+
if (_typeof$1(transitionName) === 'object') {
|
|
82507
|
+
var type = transitionType.replace(/-\w/g, function (match) {
|
|
82508
|
+
return match[1].toUpperCase();
|
|
82509
|
+
});
|
|
82510
|
+
return transitionName[type];
|
|
82511
|
+
}
|
|
82199
82512
|
|
|
82200
|
-
return
|
|
82201
|
-
|
|
82202
|
-
|
|
82203
|
-
|
|
82204
|
-
|
|
82205
|
-
|
|
82206
|
-
|
|
82207
|
-
|
|
82208
|
-
|
|
82209
|
-
|
|
82210
|
-
|
|
82211
|
-
|
|
82212
|
-
|
|
82213
|
-
|
|
82214
|
-
|
|
82215
|
-
}, "\u70B9\u51FB\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u8FD9\u91CC\u4E0A\u4F20")));
|
|
82513
|
+
return "".concat(transitionName, "-").concat(transitionType);
|
|
82514
|
+
}
|
|
82515
|
+
|
|
82516
|
+
var STATUS_NONE = 'none';
|
|
82517
|
+
var STATUS_APPEAR = 'appear';
|
|
82518
|
+
var STATUS_ENTER = 'enter';
|
|
82519
|
+
var STATUS_LEAVE = 'leave';
|
|
82520
|
+
var STEP_NONE = 'none';
|
|
82521
|
+
var STEP_PREPARE = 'prepare';
|
|
82522
|
+
var STEP_START = 'start';
|
|
82523
|
+
var STEP_ACTIVE = 'active';
|
|
82524
|
+
var STEP_ACTIVATED = 'end';
|
|
82525
|
+
|
|
82526
|
+
var raf = function raf(callback) {
|
|
82527
|
+
return +setTimeout(callback, 16);
|
|
82216
82528
|
};
|
|
82217
82529
|
|
|
82218
|
-
var
|
|
82219
|
-
|
|
82220
|
-
|
|
82221
|
-
onSure = _ref2.onSure,
|
|
82222
|
-
_ref2$down = _ref2.down,
|
|
82223
|
-
down = _ref2$down === void 0 ? downLink : _ref2$down,
|
|
82224
|
-
_ref2$desc = _ref2.desc,
|
|
82225
|
-
desc = _ref2$desc === void 0 ? desc1 : _ref2$desc,
|
|
82226
|
-
downEvent = _ref2.downEvent,
|
|
82227
|
-
isType = _ref2.isType,
|
|
82228
|
-
renderFileType = _ref2.renderFileType,
|
|
82229
|
-
resetProps = _objectWithoutProperties(_ref2, _excluded$1a);
|
|
82530
|
+
var caf = function caf(num) {
|
|
82531
|
+
return clearTimeout(num);
|
|
82532
|
+
};
|
|
82230
82533
|
|
|
82231
|
-
|
|
82232
|
-
|
|
82233
|
-
|
|
82234
|
-
|
|
82235
|
-
fileValue = _useState2[0],
|
|
82236
|
-
setFileValue = _useState2[1]; // 数据改变事件
|
|
82534
|
+
if (typeof window !== 'undefined' && 'requestAnimationFrame' in window) {
|
|
82535
|
+
raf = function raf(callback) {
|
|
82536
|
+
return window.requestAnimationFrame(callback);
|
|
82537
|
+
};
|
|
82237
82538
|
|
|
82539
|
+
caf = function caf(handle) {
|
|
82540
|
+
return window.cancelAnimationFrame(handle);
|
|
82541
|
+
};
|
|
82542
|
+
}
|
|
82238
82543
|
|
|
82239
|
-
|
|
82240
|
-
|
|
82241
|
-
}; // 确定事件
|
|
82544
|
+
var rafUUID = 0;
|
|
82545
|
+
var rafIds = new Map();
|
|
82242
82546
|
|
|
82547
|
+
function cleanup(id) {
|
|
82548
|
+
rafIds.delete(id);
|
|
82549
|
+
}
|
|
82243
82550
|
|
|
82244
|
-
|
|
82245
|
-
|
|
82551
|
+
function wrapperRaf(callback) {
|
|
82552
|
+
var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
82553
|
+
rafUUID += 1;
|
|
82554
|
+
var id = rafUUID;
|
|
82246
82555
|
|
|
82247
|
-
|
|
82248
|
-
|
|
82556
|
+
function callRef(leftTimes) {
|
|
82557
|
+
if (leftTimes === 0) {
|
|
82558
|
+
// Clean up
|
|
82559
|
+
cleanup(id); // Trigger
|
|
82560
|
+
|
|
82561
|
+
callback();
|
|
82562
|
+
} else {
|
|
82563
|
+
// Next raf
|
|
82564
|
+
var realId = raf(function () {
|
|
82565
|
+
callRef(leftTimes - 1);
|
|
82566
|
+
}); // Bind real raf id
|
|
82567
|
+
|
|
82568
|
+
rafIds.set(id, realId);
|
|
82249
82569
|
}
|
|
82570
|
+
}
|
|
82250
82571
|
|
|
82251
|
-
|
|
82252
|
-
|
|
82253
|
-
|
|
82254
|
-
files: []
|
|
82255
|
-
}));
|
|
82256
|
-
return false;
|
|
82257
|
-
}; // 删除事件
|
|
82572
|
+
callRef(times);
|
|
82573
|
+
return id;
|
|
82574
|
+
}
|
|
82258
82575
|
|
|
82576
|
+
wrapperRaf.cancel = function (id) {
|
|
82577
|
+
var realId = rafIds.get(id);
|
|
82578
|
+
cleanup(realId);
|
|
82579
|
+
return caf(realId);
|
|
82580
|
+
};
|
|
82259
82581
|
|
|
82260
|
-
|
|
82261
|
-
|
|
82262
|
-
return v.name !== name;
|
|
82263
|
-
});
|
|
82264
|
-
setFileValue(_objectSpread(_objectSpread({}, fileValue), {}, {
|
|
82265
|
-
files: nValue
|
|
82266
|
-
}));
|
|
82267
|
-
}; // 关闭弹框
|
|
82582
|
+
var useNextFrame = (function () {
|
|
82583
|
+
var nextFrameRef = React.useRef(null);
|
|
82268
82584
|
|
|
82585
|
+
function cancelNextFrame() {
|
|
82586
|
+
wrapperRaf.cancel(nextFrameRef.current);
|
|
82587
|
+
}
|
|
82269
82588
|
|
|
82270
|
-
|
|
82271
|
-
|
|
82272
|
-
|
|
82273
|
-
|
|
82274
|
-
|
|
82589
|
+
function nextFrame(callback) {
|
|
82590
|
+
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
82591
|
+
cancelNextFrame();
|
|
82592
|
+
var nextFrameId = wrapperRaf(function () {
|
|
82593
|
+
if (delay <= 1) {
|
|
82594
|
+
callback({
|
|
82595
|
+
isCanceled: function isCanceled() {
|
|
82596
|
+
return nextFrameId !== nextFrameRef.current;
|
|
82597
|
+
}
|
|
82598
|
+
});
|
|
82599
|
+
} else {
|
|
82600
|
+
nextFrame(callback, delay - 1);
|
|
82601
|
+
}
|
|
82275
82602
|
});
|
|
82276
|
-
|
|
82603
|
+
nextFrameRef.current = nextFrameId;
|
|
82604
|
+
}
|
|
82277
82605
|
|
|
82278
|
-
|
|
82279
|
-
|
|
82280
|
-
|
|
82281
|
-
|
|
82282
|
-
|
|
82283
|
-
|
|
82284
|
-
|
|
82285
|
-
|
|
82286
|
-
|
|
82606
|
+
React.useEffect(function () {
|
|
82607
|
+
return function () {
|
|
82608
|
+
cancelNextFrame();
|
|
82609
|
+
};
|
|
82610
|
+
}, []);
|
|
82611
|
+
return [nextFrame, cancelNextFrame];
|
|
82612
|
+
});
|
|
82613
|
+
|
|
82614
|
+
var useIsomorphicLayoutEffect$3 = canUseDom() ? React.useLayoutEffect : React.useEffect;
|
|
82615
|
+
|
|
82616
|
+
var STEP_QUEUE = [STEP_PREPARE, STEP_START, STEP_ACTIVE, STEP_ACTIVATED];
|
|
82617
|
+
/** Skip current step */
|
|
82618
|
+
|
|
82619
|
+
var SkipStep = false;
|
|
82620
|
+
/** Current step should be update in */
|
|
82621
|
+
|
|
82622
|
+
var DoStep = true;
|
|
82623
|
+
function isActive(step) {
|
|
82624
|
+
return step === STEP_ACTIVE || step === STEP_ACTIVATED;
|
|
82625
|
+
}
|
|
82626
|
+
var useStepQueue = (function (status, callback) {
|
|
82627
|
+
var _useState = useSafeState(STEP_NONE),
|
|
82628
|
+
_useState2 = _slicedToArray$1(_useState, 2),
|
|
82629
|
+
step = _useState2[0],
|
|
82630
|
+
setStep = _useState2[1];
|
|
82631
|
+
|
|
82632
|
+
var _useNextFrame = useNextFrame(),
|
|
82633
|
+
_useNextFrame2 = _slicedToArray$1(_useNextFrame, 2),
|
|
82634
|
+
nextFrame = _useNextFrame2[0],
|
|
82635
|
+
cancelNextFrame = _useNextFrame2[1];
|
|
82636
|
+
|
|
82637
|
+
function startQueue() {
|
|
82638
|
+
setStep(STEP_PREPARE, true);
|
|
82639
|
+
}
|
|
82640
|
+
|
|
82641
|
+
useIsomorphicLayoutEffect$3(function () {
|
|
82642
|
+
if (step !== STEP_NONE && step !== STEP_ACTIVATED) {
|
|
82643
|
+
var index = STEP_QUEUE.indexOf(step);
|
|
82644
|
+
var nextStep = STEP_QUEUE[index + 1];
|
|
82645
|
+
var result = callback(step);
|
|
82646
|
+
|
|
82647
|
+
if (result === SkipStep) {
|
|
82648
|
+
// Skip when no needed
|
|
82649
|
+
setStep(nextStep, true);
|
|
82650
|
+
} else {
|
|
82651
|
+
// Do as frame for step update
|
|
82652
|
+
nextFrame(function (info) {
|
|
82653
|
+
function doNext() {
|
|
82654
|
+
// Skip since current queue is ood
|
|
82655
|
+
if (info.isCanceled()) return;
|
|
82656
|
+
setStep(nextStep, true);
|
|
82657
|
+
}
|
|
82658
|
+
|
|
82659
|
+
if (result === true) {
|
|
82660
|
+
doNext();
|
|
82661
|
+
} else {
|
|
82662
|
+
// Only promise should be async
|
|
82663
|
+
Promise.resolve(result).then(doNext);
|
|
82664
|
+
}
|
|
82665
|
+
});
|
|
82666
|
+
}
|
|
82667
|
+
}
|
|
82668
|
+
}, [status, step]);
|
|
82669
|
+
React.useEffect(function () {
|
|
82670
|
+
return function () {
|
|
82671
|
+
cancelNextFrame();
|
|
82672
|
+
};
|
|
82673
|
+
}, []);
|
|
82674
|
+
return [startQueue, step];
|
|
82675
|
+
});
|
|
82676
|
+
|
|
82677
|
+
var useDomMotionEvents = (function (callback) {
|
|
82678
|
+
var cacheElementRef = React.useRef(); // Cache callback
|
|
82679
|
+
|
|
82680
|
+
var callbackRef = React.useRef(callback);
|
|
82681
|
+
callbackRef.current = callback; // Internal motion event handler
|
|
82682
|
+
|
|
82683
|
+
var onInternalMotionEnd = React.useCallback(function (event) {
|
|
82684
|
+
callbackRef.current(event);
|
|
82685
|
+
}, []); // Remove events
|
|
82686
|
+
|
|
82687
|
+
function removeMotionEvents(element) {
|
|
82688
|
+
if (element) {
|
|
82689
|
+
element.removeEventListener(transitionEndName, onInternalMotionEnd);
|
|
82690
|
+
element.removeEventListener(animationEndName, onInternalMotionEnd);
|
|
82691
|
+
}
|
|
82692
|
+
} // Patch events
|
|
82693
|
+
|
|
82694
|
+
|
|
82695
|
+
function patchMotionEvents(element) {
|
|
82696
|
+
if (cacheElementRef.current && cacheElementRef.current !== element) {
|
|
82697
|
+
removeMotionEvents(cacheElementRef.current);
|
|
82698
|
+
}
|
|
82699
|
+
|
|
82700
|
+
if (element && element !== cacheElementRef.current) {
|
|
82701
|
+
element.addEventListener(transitionEndName, onInternalMotionEnd);
|
|
82702
|
+
element.addEventListener(animationEndName, onInternalMotionEnd); // Save as cache in case dom removed trigger by `motionDeadline`
|
|
82703
|
+
|
|
82704
|
+
cacheElementRef.current = element;
|
|
82705
|
+
}
|
|
82706
|
+
} // Clean up when removed
|
|
82707
|
+
|
|
82708
|
+
|
|
82709
|
+
React.useEffect(function () {
|
|
82710
|
+
return function () {
|
|
82711
|
+
removeMotionEvents(cacheElementRef.current);
|
|
82712
|
+
};
|
|
82713
|
+
}, []);
|
|
82714
|
+
return [patchMotionEvents, removeMotionEvents];
|
|
82715
|
+
});
|
|
82716
|
+
|
|
82717
|
+
function useStatus(supportMotion, visible, getElement, _ref) {
|
|
82718
|
+
var _ref$motionEnter = _ref.motionEnter,
|
|
82719
|
+
motionEnter = _ref$motionEnter === void 0 ? true : _ref$motionEnter,
|
|
82720
|
+
_ref$motionAppear = _ref.motionAppear,
|
|
82721
|
+
motionAppear = _ref$motionAppear === void 0 ? true : _ref$motionAppear,
|
|
82722
|
+
_ref$motionLeave = _ref.motionLeave,
|
|
82723
|
+
motionLeave = _ref$motionLeave === void 0 ? true : _ref$motionLeave,
|
|
82724
|
+
motionDeadline = _ref.motionDeadline,
|
|
82725
|
+
motionLeaveImmediately = _ref.motionLeaveImmediately,
|
|
82726
|
+
onAppearPrepare = _ref.onAppearPrepare,
|
|
82727
|
+
onEnterPrepare = _ref.onEnterPrepare,
|
|
82728
|
+
onLeavePrepare = _ref.onLeavePrepare,
|
|
82729
|
+
onAppearStart = _ref.onAppearStart,
|
|
82730
|
+
onEnterStart = _ref.onEnterStart,
|
|
82731
|
+
onLeaveStart = _ref.onLeaveStart,
|
|
82732
|
+
onAppearActive = _ref.onAppearActive,
|
|
82733
|
+
onEnterActive = _ref.onEnterActive,
|
|
82734
|
+
onLeaveActive = _ref.onLeaveActive,
|
|
82735
|
+
onAppearEnd = _ref.onAppearEnd,
|
|
82736
|
+
onEnterEnd = _ref.onEnterEnd,
|
|
82737
|
+
onLeaveEnd = _ref.onLeaveEnd,
|
|
82738
|
+
onVisibleChanged = _ref.onVisibleChanged;
|
|
82739
|
+
|
|
82740
|
+
// Used for outer render usage to avoid `visible: false & status: none` to render nothing
|
|
82741
|
+
var _useState = useSafeState(),
|
|
82742
|
+
_useState2 = _slicedToArray$1(_useState, 2),
|
|
82743
|
+
asyncVisible = _useState2[0],
|
|
82744
|
+
setAsyncVisible = _useState2[1];
|
|
82745
|
+
|
|
82746
|
+
var _useState3 = useSafeState(STATUS_NONE),
|
|
82747
|
+
_useState4 = _slicedToArray$1(_useState3, 2),
|
|
82748
|
+
status = _useState4[0],
|
|
82749
|
+
setStatus = _useState4[1];
|
|
82750
|
+
|
|
82751
|
+
var _useState5 = useSafeState(null),
|
|
82752
|
+
_useState6 = _slicedToArray$1(_useState5, 2),
|
|
82753
|
+
style = _useState6[0],
|
|
82754
|
+
setStyle = _useState6[1];
|
|
82755
|
+
|
|
82756
|
+
var mountedRef = React.useRef(false);
|
|
82757
|
+
var deadlineRef = React.useRef(null); // =========================== Dom Node ===========================
|
|
82758
|
+
|
|
82759
|
+
function getDomElement() {
|
|
82760
|
+
return getElement();
|
|
82761
|
+
} // ========================== Motion End ==========================
|
|
82762
|
+
|
|
82763
|
+
|
|
82764
|
+
var activeRef = React.useRef(false);
|
|
82765
|
+
|
|
82766
|
+
function onInternalMotionEnd(event) {
|
|
82767
|
+
var element = getDomElement();
|
|
82768
|
+
|
|
82769
|
+
if (event && !event.deadline && event.target !== element) {
|
|
82770
|
+
// event exists
|
|
82771
|
+
// not initiated by deadline
|
|
82772
|
+
// transitionEnd not fired by inner elements
|
|
82773
|
+
return;
|
|
82774
|
+
}
|
|
82775
|
+
|
|
82776
|
+
var currentActive = activeRef.current;
|
|
82777
|
+
var canEnd;
|
|
82778
|
+
|
|
82779
|
+
if (status === STATUS_APPEAR && currentActive) {
|
|
82780
|
+
canEnd = onAppearEnd === null || onAppearEnd === void 0 ? void 0 : onAppearEnd(element, event);
|
|
82781
|
+
} else if (status === STATUS_ENTER && currentActive) {
|
|
82782
|
+
canEnd = onEnterEnd === null || onEnterEnd === void 0 ? void 0 : onEnterEnd(element, event);
|
|
82783
|
+
} else if (status === STATUS_LEAVE && currentActive) {
|
|
82784
|
+
canEnd = onLeaveEnd === null || onLeaveEnd === void 0 ? void 0 : onLeaveEnd(element, event);
|
|
82785
|
+
} // Only update status when `canEnd` and not destroyed
|
|
82786
|
+
|
|
82787
|
+
|
|
82788
|
+
if (status !== STATUS_NONE && currentActive && canEnd !== false) {
|
|
82789
|
+
setStatus(STATUS_NONE, true);
|
|
82790
|
+
setStyle(null, true);
|
|
82791
|
+
}
|
|
82792
|
+
}
|
|
82793
|
+
|
|
82794
|
+
var _useDomMotionEvents = useDomMotionEvents(onInternalMotionEnd),
|
|
82795
|
+
_useDomMotionEvents2 = _slicedToArray$1(_useDomMotionEvents, 1),
|
|
82796
|
+
patchMotionEvents = _useDomMotionEvents2[0]; // ============================= Step =============================
|
|
82797
|
+
|
|
82798
|
+
|
|
82799
|
+
var eventHandlers = React.useMemo(function () {
|
|
82800
|
+
var _ref2, _ref3, _ref4;
|
|
82801
|
+
|
|
82802
|
+
switch (status) {
|
|
82803
|
+
case STATUS_APPEAR:
|
|
82804
|
+
return _ref2 = {}, _defineProperty$1(_ref2, STEP_PREPARE, onAppearPrepare), _defineProperty$1(_ref2, STEP_START, onAppearStart), _defineProperty$1(_ref2, STEP_ACTIVE, onAppearActive), _ref2;
|
|
82805
|
+
|
|
82806
|
+
case STATUS_ENTER:
|
|
82807
|
+
return _ref3 = {}, _defineProperty$1(_ref3, STEP_PREPARE, onEnterPrepare), _defineProperty$1(_ref3, STEP_START, onEnterStart), _defineProperty$1(_ref3, STEP_ACTIVE, onEnterActive), _ref3;
|
|
82808
|
+
|
|
82809
|
+
case STATUS_LEAVE:
|
|
82810
|
+
return _ref4 = {}, _defineProperty$1(_ref4, STEP_PREPARE, onLeavePrepare), _defineProperty$1(_ref4, STEP_START, onLeaveStart), _defineProperty$1(_ref4, STEP_ACTIVE, onLeaveActive), _ref4;
|
|
82811
|
+
|
|
82812
|
+
default:
|
|
82813
|
+
return {};
|
|
82814
|
+
}
|
|
82815
|
+
}, [status]);
|
|
82816
|
+
|
|
82817
|
+
var _useStepQueue = useStepQueue(status, function (newStep) {
|
|
82818
|
+
// Only prepare step can be skip
|
|
82819
|
+
if (newStep === STEP_PREPARE) {
|
|
82820
|
+
var onPrepare = eventHandlers[STEP_PREPARE];
|
|
82821
|
+
|
|
82822
|
+
if (!onPrepare) {
|
|
82823
|
+
return SkipStep;
|
|
82824
|
+
}
|
|
82825
|
+
|
|
82826
|
+
return onPrepare(getDomElement());
|
|
82827
|
+
} // Rest step is sync update
|
|
82828
|
+
|
|
82829
|
+
|
|
82830
|
+
// Rest step is sync update
|
|
82831
|
+
if (step in eventHandlers) {
|
|
82832
|
+
var _eventHandlers$step;
|
|
82833
|
+
|
|
82834
|
+
setStyle(((_eventHandlers$step = eventHandlers[step]) === null || _eventHandlers$step === void 0 ? void 0 : _eventHandlers$step.call(eventHandlers, getDomElement(), null)) || null);
|
|
82835
|
+
}
|
|
82836
|
+
|
|
82837
|
+
if (step === STEP_ACTIVE) {
|
|
82838
|
+
// Patch events when motion needed
|
|
82839
|
+
patchMotionEvents(getDomElement());
|
|
82840
|
+
|
|
82841
|
+
if (motionDeadline > 0) {
|
|
82842
|
+
clearTimeout(deadlineRef.current);
|
|
82843
|
+
deadlineRef.current = setTimeout(function () {
|
|
82844
|
+
onInternalMotionEnd({
|
|
82845
|
+
deadline: true
|
|
82846
|
+
});
|
|
82847
|
+
}, motionDeadline);
|
|
82848
|
+
}
|
|
82849
|
+
}
|
|
82850
|
+
|
|
82851
|
+
return DoStep;
|
|
82852
|
+
}),
|
|
82853
|
+
_useStepQueue2 = _slicedToArray$1(_useStepQueue, 2),
|
|
82854
|
+
startStep = _useStepQueue2[0],
|
|
82855
|
+
step = _useStepQueue2[1];
|
|
82856
|
+
|
|
82857
|
+
var active = isActive(step);
|
|
82858
|
+
activeRef.current = active; // ============================ Status ============================
|
|
82859
|
+
// Update with new status
|
|
82860
|
+
|
|
82861
|
+
useIsomorphicLayoutEffect$3(function () {
|
|
82862
|
+
setAsyncVisible(visible);
|
|
82863
|
+
var isMounted = mountedRef.current;
|
|
82864
|
+
mountedRef.current = true;
|
|
82865
|
+
|
|
82866
|
+
if (!supportMotion) {
|
|
82867
|
+
return;
|
|
82868
|
+
}
|
|
82869
|
+
|
|
82870
|
+
var nextStatus; // Appear
|
|
82871
|
+
|
|
82872
|
+
if (!isMounted && visible && motionAppear) {
|
|
82873
|
+
nextStatus = STATUS_APPEAR;
|
|
82874
|
+
} // Enter
|
|
82875
|
+
|
|
82876
|
+
|
|
82877
|
+
if (isMounted && visible && motionEnter) {
|
|
82878
|
+
nextStatus = STATUS_ENTER;
|
|
82879
|
+
} // Leave
|
|
82880
|
+
|
|
82881
|
+
|
|
82882
|
+
if (isMounted && !visible && motionLeave || !isMounted && motionLeaveImmediately && !visible && motionLeave) {
|
|
82883
|
+
nextStatus = STATUS_LEAVE;
|
|
82884
|
+
} // Update to next status
|
|
82885
|
+
|
|
82886
|
+
|
|
82887
|
+
if (nextStatus) {
|
|
82888
|
+
setStatus(nextStatus);
|
|
82889
|
+
startStep();
|
|
82890
|
+
}
|
|
82891
|
+
}, [visible]); // ============================ Effect ============================
|
|
82892
|
+
// Reset when motion changed
|
|
82893
|
+
|
|
82894
|
+
React.useEffect(function () {
|
|
82895
|
+
if ( // Cancel appear
|
|
82896
|
+
status === STATUS_APPEAR && !motionAppear || // Cancel enter
|
|
82897
|
+
status === STATUS_ENTER && !motionEnter || // Cancel leave
|
|
82898
|
+
status === STATUS_LEAVE && !motionLeave) {
|
|
82899
|
+
setStatus(STATUS_NONE);
|
|
82900
|
+
}
|
|
82901
|
+
}, [motionAppear, motionEnter, motionLeave]);
|
|
82902
|
+
React.useEffect(function () {
|
|
82903
|
+
return function () {
|
|
82904
|
+
mountedRef.current = false;
|
|
82905
|
+
clearTimeout(deadlineRef.current);
|
|
82906
|
+
};
|
|
82907
|
+
}, []); // Trigger `onVisibleChanged`
|
|
82908
|
+
|
|
82909
|
+
React.useEffect(function () {
|
|
82910
|
+
if (asyncVisible !== undefined && status === STATUS_NONE) {
|
|
82911
|
+
onVisibleChanged === null || onVisibleChanged === void 0 ? void 0 : onVisibleChanged(asyncVisible);
|
|
82912
|
+
}
|
|
82913
|
+
}, [asyncVisible, status]); // ============================ Styles ============================
|
|
82914
|
+
|
|
82915
|
+
var mergedStyle = style;
|
|
82916
|
+
|
|
82917
|
+
if (eventHandlers[STEP_PREPARE] && step === STEP_START) {
|
|
82918
|
+
mergedStyle = _objectSpread2({
|
|
82919
|
+
transition: 'none'
|
|
82920
|
+
}, mergedStyle);
|
|
82921
|
+
}
|
|
82922
|
+
|
|
82923
|
+
return [status, step, mergedStyle, asyncVisible !== null && asyncVisible !== void 0 ? asyncVisible : visible];
|
|
82924
|
+
}
|
|
82925
|
+
|
|
82926
|
+
var DomWrapper$1 = /*#__PURE__*/function (_React$Component) {
|
|
82927
|
+
_inherits(DomWrapper, _React$Component);
|
|
82928
|
+
|
|
82929
|
+
var _super = _createSuper(DomWrapper);
|
|
82930
|
+
|
|
82931
|
+
function DomWrapper() {
|
|
82932
|
+
_classCallCheck(this, DomWrapper);
|
|
82933
|
+
|
|
82934
|
+
return _super.apply(this, arguments);
|
|
82935
|
+
}
|
|
82936
|
+
|
|
82937
|
+
_createClass(DomWrapper, [{
|
|
82938
|
+
key: "render",
|
|
82939
|
+
value: function render() {
|
|
82940
|
+
return this.props.children;
|
|
82941
|
+
}
|
|
82942
|
+
}]);
|
|
82943
|
+
|
|
82944
|
+
return DomWrapper;
|
|
82945
|
+
}(React.Component);
|
|
82946
|
+
|
|
82947
|
+
/**
|
|
82948
|
+
* `transitionSupport` is used for none transition test case.
|
|
82949
|
+
* Default we use browser transition event support check.
|
|
82950
|
+
*/
|
|
82951
|
+
|
|
82952
|
+
function genCSSMotion(config) {
|
|
82953
|
+
var transitionSupport = config;
|
|
82954
|
+
|
|
82955
|
+
if (_typeof$1(config) === 'object') {
|
|
82956
|
+
transitionSupport = config.transitionSupport;
|
|
82957
|
+
}
|
|
82958
|
+
|
|
82959
|
+
function isSupportTransition(props) {
|
|
82960
|
+
return !!(props.motionName && transitionSupport);
|
|
82961
|
+
}
|
|
82962
|
+
|
|
82963
|
+
var CSSMotion = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
82964
|
+
var _props$visible = props.visible,
|
|
82965
|
+
visible = _props$visible === void 0 ? true : _props$visible,
|
|
82966
|
+
_props$removeOnLeave = props.removeOnLeave,
|
|
82967
|
+
removeOnLeave = _props$removeOnLeave === void 0 ? true : _props$removeOnLeave,
|
|
82968
|
+
forceRender = props.forceRender,
|
|
82969
|
+
children = props.children,
|
|
82970
|
+
motionName = props.motionName,
|
|
82971
|
+
leavedClassName = props.leavedClassName,
|
|
82972
|
+
eventProps = props.eventProps;
|
|
82973
|
+
var supportMotion = isSupportTransition(props); // Ref to the react node, it may be a HTMLElement
|
|
82974
|
+
|
|
82975
|
+
var nodeRef = React.useRef(); // Ref to the dom wrapper in case ref can not pass to HTMLElement
|
|
82976
|
+
|
|
82977
|
+
var wrapperNodeRef = React.useRef();
|
|
82978
|
+
|
|
82979
|
+
function getDomElement() {
|
|
82980
|
+
try {
|
|
82981
|
+
// Here we're avoiding call for findDOMNode since it's deprecated
|
|
82982
|
+
// in strict mode. We're calling it only when node ref is not
|
|
82983
|
+
// an instance of DOM HTMLElement. Otherwise use
|
|
82984
|
+
// findDOMNode as a final resort
|
|
82985
|
+
return nodeRef.current instanceof HTMLElement ? nodeRef.current : findDOMNode(wrapperNodeRef.current);
|
|
82986
|
+
} catch (e) {
|
|
82987
|
+
// Only happen when `motionDeadline` trigger but element removed.
|
|
82988
|
+
return null;
|
|
82989
|
+
}
|
|
82990
|
+
}
|
|
82991
|
+
|
|
82992
|
+
var _useStatus = useStatus(supportMotion, visible, getDomElement, props),
|
|
82993
|
+
_useStatus2 = _slicedToArray$1(_useStatus, 4),
|
|
82994
|
+
status = _useStatus2[0],
|
|
82995
|
+
statusStep = _useStatus2[1],
|
|
82996
|
+
statusStyle = _useStatus2[2],
|
|
82997
|
+
mergedVisible = _useStatus2[3]; // Record whether content has rendered
|
|
82998
|
+
// Will return null for un-rendered even when `removeOnLeave={false}`
|
|
82999
|
+
|
|
83000
|
+
|
|
83001
|
+
var renderedRef = React.useRef(mergedVisible);
|
|
83002
|
+
|
|
83003
|
+
if (mergedVisible) {
|
|
83004
|
+
renderedRef.current = true;
|
|
83005
|
+
} // ====================== Refs ======================
|
|
83006
|
+
|
|
83007
|
+
|
|
83008
|
+
var setNodeRef = React.useCallback(function (node) {
|
|
83009
|
+
nodeRef.current = node;
|
|
83010
|
+
fillRef(ref, node);
|
|
83011
|
+
}, [ref]); // ===================== Render =====================
|
|
83012
|
+
|
|
83013
|
+
var motionChildren;
|
|
83014
|
+
|
|
83015
|
+
var mergedProps = _objectSpread2(_objectSpread2({}, eventProps), {}, {
|
|
83016
|
+
visible: visible
|
|
83017
|
+
});
|
|
83018
|
+
|
|
83019
|
+
if (!children) {
|
|
83020
|
+
// No children
|
|
83021
|
+
motionChildren = null;
|
|
83022
|
+
} else if (status === STATUS_NONE || !isSupportTransition(props)) {
|
|
83023
|
+
// Stable children
|
|
83024
|
+
if (mergedVisible) {
|
|
83025
|
+
motionChildren = children(_objectSpread2({}, mergedProps), setNodeRef);
|
|
83026
|
+
} else if (!removeOnLeave && renderedRef.current) {
|
|
83027
|
+
motionChildren = children(_objectSpread2(_objectSpread2({}, mergedProps), {}, {
|
|
83028
|
+
className: leavedClassName
|
|
83029
|
+
}), setNodeRef);
|
|
83030
|
+
} else if (forceRender) {
|
|
83031
|
+
motionChildren = children(_objectSpread2(_objectSpread2({}, mergedProps), {}, {
|
|
83032
|
+
style: {
|
|
83033
|
+
display: 'none'
|
|
83034
|
+
}
|
|
83035
|
+
}), setNodeRef);
|
|
83036
|
+
} else {
|
|
83037
|
+
motionChildren = null;
|
|
83038
|
+
}
|
|
83039
|
+
} else {
|
|
83040
|
+
var _classNames;
|
|
83041
|
+
|
|
83042
|
+
// In motion
|
|
83043
|
+
var statusSuffix;
|
|
83044
|
+
|
|
83045
|
+
if (statusStep === STEP_PREPARE) {
|
|
83046
|
+
statusSuffix = 'prepare';
|
|
83047
|
+
} else if (isActive(statusStep)) {
|
|
83048
|
+
statusSuffix = 'active';
|
|
83049
|
+
} else if (statusStep === STEP_START) {
|
|
83050
|
+
statusSuffix = 'start';
|
|
83051
|
+
}
|
|
83052
|
+
|
|
83053
|
+
motionChildren = children(_objectSpread2(_objectSpread2({}, mergedProps), {}, {
|
|
83054
|
+
className: classnames(getTransitionName(motionName, status), (_classNames = {}, _defineProperty$1(_classNames, getTransitionName(motionName, "".concat(status, "-").concat(statusSuffix)), statusSuffix), _defineProperty$1(_classNames, motionName, typeof motionName === 'string'), _classNames)),
|
|
83055
|
+
style: statusStyle
|
|
83056
|
+
}), setNodeRef);
|
|
83057
|
+
} // Auto inject ref if child node not have `ref` props
|
|
83058
|
+
|
|
83059
|
+
|
|
83060
|
+
if ( /*#__PURE__*/React.isValidElement(motionChildren) && supportRef(motionChildren)) {
|
|
83061
|
+
var _motionChildren = motionChildren,
|
|
83062
|
+
originNodeRef = _motionChildren.ref;
|
|
83063
|
+
|
|
83064
|
+
if (!originNodeRef) {
|
|
83065
|
+
motionChildren = /*#__PURE__*/React.cloneElement(motionChildren, {
|
|
83066
|
+
ref: setNodeRef
|
|
83067
|
+
});
|
|
83068
|
+
}
|
|
83069
|
+
}
|
|
83070
|
+
|
|
83071
|
+
return /*#__PURE__*/React.createElement(DomWrapper$1, {
|
|
83072
|
+
ref: wrapperNodeRef
|
|
83073
|
+
}, motionChildren);
|
|
83074
|
+
});
|
|
83075
|
+
CSSMotion.displayName = 'CSSMotion';
|
|
83076
|
+
return CSSMotion;
|
|
83077
|
+
}
|
|
83078
|
+
var CSSMotion = genCSSMotion(supportTransition);
|
|
83079
|
+
|
|
83080
|
+
var STATUS_ADD = 'add';
|
|
83081
|
+
var STATUS_KEEP = 'keep';
|
|
83082
|
+
var STATUS_REMOVE = 'remove';
|
|
83083
|
+
var STATUS_REMOVED = 'removed';
|
|
83084
|
+
function wrapKeyToObject(key) {
|
|
83085
|
+
var keyObj;
|
|
83086
|
+
|
|
83087
|
+
if (key && _typeof$1(key) === 'object' && 'key' in key) {
|
|
83088
|
+
keyObj = key;
|
|
83089
|
+
} else {
|
|
83090
|
+
keyObj = {
|
|
83091
|
+
key: key
|
|
83092
|
+
};
|
|
83093
|
+
}
|
|
83094
|
+
|
|
83095
|
+
return _objectSpread2(_objectSpread2({}, keyObj), {}, {
|
|
83096
|
+
key: String(keyObj.key)
|
|
83097
|
+
});
|
|
83098
|
+
}
|
|
83099
|
+
function parseKeys() {
|
|
83100
|
+
var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
83101
|
+
return keys.map(wrapKeyToObject);
|
|
83102
|
+
}
|
|
83103
|
+
function diffKeys() {
|
|
83104
|
+
var prevKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
83105
|
+
var currentKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
83106
|
+
var list = [];
|
|
83107
|
+
var currentIndex = 0;
|
|
83108
|
+
var currentLen = currentKeys.length;
|
|
83109
|
+
var prevKeyObjects = parseKeys(prevKeys);
|
|
83110
|
+
var currentKeyObjects = parseKeys(currentKeys); // Check prev keys to insert or keep
|
|
83111
|
+
|
|
83112
|
+
prevKeyObjects.forEach(function (keyObj) {
|
|
83113
|
+
var hit = false;
|
|
83114
|
+
|
|
83115
|
+
for (var i = currentIndex; i < currentLen; i += 1) {
|
|
83116
|
+
var currentKeyObj = currentKeyObjects[i];
|
|
83117
|
+
|
|
83118
|
+
if (currentKeyObj.key === keyObj.key) {
|
|
83119
|
+
// New added keys should add before current key
|
|
83120
|
+
if (currentIndex < i) {
|
|
83121
|
+
list = list.concat(currentKeyObjects.slice(currentIndex, i).map(function (obj) {
|
|
83122
|
+
return _objectSpread2(_objectSpread2({}, obj), {}, {
|
|
83123
|
+
status: STATUS_ADD
|
|
83124
|
+
});
|
|
83125
|
+
}));
|
|
83126
|
+
currentIndex = i;
|
|
83127
|
+
}
|
|
83128
|
+
|
|
83129
|
+
list.push(_objectSpread2(_objectSpread2({}, currentKeyObj), {}, {
|
|
83130
|
+
status: STATUS_KEEP
|
|
83131
|
+
}));
|
|
83132
|
+
currentIndex += 1;
|
|
83133
|
+
hit = true;
|
|
83134
|
+
break;
|
|
83135
|
+
}
|
|
83136
|
+
} // If not hit, it means key is removed
|
|
83137
|
+
|
|
83138
|
+
|
|
83139
|
+
if (!hit) {
|
|
83140
|
+
list.push(_objectSpread2(_objectSpread2({}, keyObj), {}, {
|
|
83141
|
+
status: STATUS_REMOVE
|
|
83142
|
+
}));
|
|
83143
|
+
}
|
|
83144
|
+
}); // Add rest to the list
|
|
83145
|
+
|
|
83146
|
+
if (currentIndex < currentLen) {
|
|
83147
|
+
list = list.concat(currentKeyObjects.slice(currentIndex).map(function (obj) {
|
|
83148
|
+
return _objectSpread2(_objectSpread2({}, obj), {}, {
|
|
83149
|
+
status: STATUS_ADD
|
|
83150
|
+
});
|
|
83151
|
+
}));
|
|
83152
|
+
}
|
|
83153
|
+
/**
|
|
83154
|
+
* Merge same key when it remove and add again:
|
|
83155
|
+
* [1 - add, 2 - keep, 1 - remove] -> [1 - keep, 2 - keep]
|
|
83156
|
+
*/
|
|
83157
|
+
|
|
83158
|
+
|
|
83159
|
+
var keys = {};
|
|
83160
|
+
list.forEach(function (_ref) {
|
|
83161
|
+
var key = _ref.key;
|
|
83162
|
+
keys[key] = (keys[key] || 0) + 1;
|
|
83163
|
+
});
|
|
83164
|
+
var duplicatedKeys = Object.keys(keys).filter(function (key) {
|
|
83165
|
+
return keys[key] > 1;
|
|
83166
|
+
});
|
|
83167
|
+
duplicatedKeys.forEach(function (matchKey) {
|
|
83168
|
+
// Remove `STATUS_REMOVE` node.
|
|
83169
|
+
list = list.filter(function (_ref2) {
|
|
83170
|
+
var key = _ref2.key,
|
|
83171
|
+
status = _ref2.status;
|
|
83172
|
+
return key !== matchKey || status !== STATUS_REMOVE;
|
|
83173
|
+
}); // Update `STATUS_ADD` to `STATUS_KEEP`
|
|
83174
|
+
|
|
83175
|
+
list.forEach(function (node) {
|
|
83176
|
+
if (node.key === matchKey) {
|
|
83177
|
+
// eslint-disable-next-line no-param-reassign
|
|
83178
|
+
node.status = STATUS_KEEP;
|
|
83179
|
+
}
|
|
83180
|
+
});
|
|
83181
|
+
});
|
|
83182
|
+
return list;
|
|
83183
|
+
}
|
|
83184
|
+
|
|
83185
|
+
var _excluded$17 = ["component", "children", "onVisibleChanged", "onAllRemoved"],
|
|
83186
|
+
_excluded2$j = ["status"];
|
|
83187
|
+
var MOTION_PROP_NAMES = ['eventProps', 'visible', 'children', 'motionName', 'motionAppear', 'motionEnter', 'motionLeave', 'motionLeaveImmediately', 'motionDeadline', 'removeOnLeave', 'leavedClassName', 'onAppearStart', 'onAppearActive', 'onAppearEnd', 'onEnterStart', 'onEnterActive', 'onEnterEnd', 'onLeaveStart', 'onLeaveActive', 'onLeaveEnd'];
|
|
83188
|
+
/**
|
|
83189
|
+
* Generate a CSSMotionList component with config
|
|
83190
|
+
* @param transitionSupport No need since CSSMotionList no longer depends on transition support
|
|
83191
|
+
* @param CSSMotion CSSMotion component
|
|
83192
|
+
*/
|
|
83193
|
+
|
|
83194
|
+
function genCSSMotionList(transitionSupport) {
|
|
83195
|
+
var CSSMotion$1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : CSSMotion;
|
|
83196
|
+
|
|
83197
|
+
var CSSMotionList = /*#__PURE__*/function (_React$Component) {
|
|
83198
|
+
_inherits(CSSMotionList, _React$Component);
|
|
83199
|
+
|
|
83200
|
+
var _super = _createSuper(CSSMotionList);
|
|
83201
|
+
|
|
83202
|
+
function CSSMotionList() {
|
|
83203
|
+
var _this;
|
|
83204
|
+
|
|
83205
|
+
_classCallCheck(this, CSSMotionList);
|
|
83206
|
+
|
|
83207
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
83208
|
+
args[_key] = arguments[_key];
|
|
83209
|
+
}
|
|
83210
|
+
|
|
83211
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
83212
|
+
_this.state = {
|
|
83213
|
+
keyEntities: []
|
|
83214
|
+
};
|
|
83215
|
+
|
|
83216
|
+
_this.removeKey = function (removeKey) {
|
|
83217
|
+
var keyEntities = _this.state.keyEntities;
|
|
83218
|
+
var nextKeyEntities = keyEntities.map(function (entity) {
|
|
83219
|
+
if (entity.key !== removeKey) return entity;
|
|
83220
|
+
return _objectSpread2(_objectSpread2({}, entity), {}, {
|
|
83221
|
+
status: STATUS_REMOVED
|
|
83222
|
+
});
|
|
83223
|
+
});
|
|
83224
|
+
|
|
83225
|
+
_this.setState({
|
|
83226
|
+
keyEntities: nextKeyEntities
|
|
83227
|
+
});
|
|
83228
|
+
|
|
83229
|
+
return nextKeyEntities.filter(function (_ref) {
|
|
83230
|
+
var status = _ref.status;
|
|
83231
|
+
return status !== STATUS_REMOVED;
|
|
83232
|
+
}).length;
|
|
83233
|
+
};
|
|
83234
|
+
|
|
83235
|
+
return _this;
|
|
83236
|
+
}
|
|
83237
|
+
|
|
83238
|
+
_createClass(CSSMotionList, [{
|
|
83239
|
+
key: "render",
|
|
83240
|
+
value: function render() {
|
|
83241
|
+
var _this2 = this;
|
|
83242
|
+
|
|
83243
|
+
var keyEntities = this.state.keyEntities;
|
|
83244
|
+
|
|
83245
|
+
var _this$props = this.props,
|
|
83246
|
+
component = _this$props.component,
|
|
83247
|
+
children = _this$props.children,
|
|
83248
|
+
_onVisibleChanged = _this$props.onVisibleChanged,
|
|
83249
|
+
onAllRemoved = _this$props.onAllRemoved,
|
|
83250
|
+
restProps = _objectWithoutProperties$1(_this$props, _excluded$17);
|
|
83251
|
+
|
|
83252
|
+
var Component = component || React.Fragment;
|
|
83253
|
+
var motionProps = {};
|
|
83254
|
+
MOTION_PROP_NAMES.forEach(function (prop) {
|
|
83255
|
+
motionProps[prop] = restProps[prop];
|
|
83256
|
+
delete restProps[prop];
|
|
83257
|
+
});
|
|
83258
|
+
delete restProps.keys;
|
|
83259
|
+
return /*#__PURE__*/React.createElement(Component, restProps, keyEntities.map(function (_ref2) {
|
|
83260
|
+
var status = _ref2.status,
|
|
83261
|
+
eventProps = _objectWithoutProperties$1(_ref2, _excluded2$j);
|
|
83262
|
+
|
|
83263
|
+
var visible = status === STATUS_ADD || status === STATUS_KEEP;
|
|
83264
|
+
return /*#__PURE__*/React.createElement(CSSMotion$1, _extends$5({}, motionProps, {
|
|
83265
|
+
key: eventProps.key,
|
|
83266
|
+
visible: visible,
|
|
83267
|
+
eventProps: eventProps,
|
|
83268
|
+
onVisibleChanged: function onVisibleChanged(changedVisible) {
|
|
83269
|
+
_onVisibleChanged === null || _onVisibleChanged === void 0 ? void 0 : _onVisibleChanged(changedVisible, {
|
|
83270
|
+
key: eventProps.key
|
|
83271
|
+
});
|
|
83272
|
+
|
|
83273
|
+
if (!changedVisible) {
|
|
83274
|
+
var restKeysCount = _this2.removeKey(eventProps.key);
|
|
83275
|
+
|
|
83276
|
+
if (restKeysCount === 0 && onAllRemoved) {
|
|
83277
|
+
onAllRemoved();
|
|
83278
|
+
}
|
|
83279
|
+
}
|
|
83280
|
+
}
|
|
83281
|
+
}), children);
|
|
83282
|
+
}));
|
|
83283
|
+
}
|
|
83284
|
+
}], [{
|
|
83285
|
+
key: "getDerivedStateFromProps",
|
|
83286
|
+
value: function getDerivedStateFromProps(_ref3, _ref4) {
|
|
83287
|
+
var keys = _ref3.keys;
|
|
83288
|
+
var keyEntities = _ref4.keyEntities;
|
|
83289
|
+
var parsedKeyObjects = parseKeys(keys);
|
|
83290
|
+
var mixedKeyEntities = diffKeys(keyEntities, parsedKeyObjects);
|
|
83291
|
+
return {
|
|
83292
|
+
keyEntities: mixedKeyEntities.filter(function (entity) {
|
|
83293
|
+
var prevEntity = keyEntities.find(function (_ref5) {
|
|
83294
|
+
var key = _ref5.key;
|
|
83295
|
+
return entity.key === key;
|
|
83296
|
+
}); // Remove if already mark as removed
|
|
83297
|
+
|
|
83298
|
+
if (prevEntity && prevEntity.status === STATUS_REMOVED && entity.status === STATUS_REMOVE) {
|
|
83299
|
+
return false;
|
|
83300
|
+
}
|
|
83301
|
+
|
|
83302
|
+
return true;
|
|
83303
|
+
})
|
|
83304
|
+
};
|
|
83305
|
+
} // ZombieJ: Return the count of rest keys. It's safe to refactor if need more info.
|
|
83306
|
+
|
|
83307
|
+
}]);
|
|
83308
|
+
|
|
83309
|
+
return CSSMotionList;
|
|
83310
|
+
}(React.Component);
|
|
83311
|
+
|
|
83312
|
+
CSSMotionList.defaultProps = {
|
|
83313
|
+
component: 'div'
|
|
83314
|
+
};
|
|
83315
|
+
return CSSMotionList;
|
|
83316
|
+
}
|
|
83317
|
+
var CSSMotionList = genCSSMotionList(supportTransition);
|
|
83318
|
+
|
|
83319
|
+
var Notice = /*#__PURE__*/function (_Component) {
|
|
83320
|
+
_inherits(Notice, _Component);
|
|
83321
|
+
|
|
83322
|
+
var _super = _createSuper(Notice);
|
|
83323
|
+
|
|
83324
|
+
function Notice() {
|
|
83325
|
+
var _this;
|
|
83326
|
+
|
|
83327
|
+
_classCallCheck(this, Notice);
|
|
83328
|
+
|
|
83329
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
83330
|
+
args[_key] = arguments[_key];
|
|
83331
|
+
}
|
|
83332
|
+
|
|
83333
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
83334
|
+
_this.closeTimer = null;
|
|
83335
|
+
|
|
83336
|
+
_this.close = function (e) {
|
|
83337
|
+
if (e) {
|
|
83338
|
+
e.stopPropagation();
|
|
83339
|
+
}
|
|
83340
|
+
|
|
83341
|
+
_this.clearCloseTimer();
|
|
83342
|
+
|
|
83343
|
+
var _this$props = _this.props,
|
|
83344
|
+
onClose = _this$props.onClose,
|
|
83345
|
+
noticeKey = _this$props.noticeKey;
|
|
83346
|
+
|
|
83347
|
+
if (onClose) {
|
|
83348
|
+
onClose(noticeKey);
|
|
83349
|
+
}
|
|
83350
|
+
};
|
|
83351
|
+
|
|
83352
|
+
_this.startCloseTimer = function () {
|
|
83353
|
+
if (_this.props.duration) {
|
|
83354
|
+
_this.closeTimer = window.setTimeout(function () {
|
|
83355
|
+
_this.close();
|
|
83356
|
+
}, _this.props.duration * 1000);
|
|
83357
|
+
}
|
|
83358
|
+
};
|
|
83359
|
+
|
|
83360
|
+
_this.clearCloseTimer = function () {
|
|
83361
|
+
if (_this.closeTimer) {
|
|
83362
|
+
clearTimeout(_this.closeTimer);
|
|
83363
|
+
_this.closeTimer = null;
|
|
83364
|
+
}
|
|
83365
|
+
};
|
|
83366
|
+
|
|
83367
|
+
return _this;
|
|
83368
|
+
}
|
|
83369
|
+
|
|
83370
|
+
_createClass(Notice, [{
|
|
83371
|
+
key: "componentDidMount",
|
|
83372
|
+
value: function componentDidMount() {
|
|
83373
|
+
this.startCloseTimer();
|
|
83374
|
+
}
|
|
83375
|
+
}, {
|
|
83376
|
+
key: "componentDidUpdate",
|
|
83377
|
+
value: function componentDidUpdate(prevProps) {
|
|
83378
|
+
if (this.props.duration !== prevProps.duration || this.props.updateMark !== prevProps.updateMark || // Visible again need reset timer
|
|
83379
|
+
this.props.visible !== prevProps.visible && this.props.visible) {
|
|
83380
|
+
this.restartCloseTimer();
|
|
83381
|
+
}
|
|
83382
|
+
}
|
|
83383
|
+
}, {
|
|
83384
|
+
key: "componentWillUnmount",
|
|
83385
|
+
value: function componentWillUnmount() {
|
|
83386
|
+
this.clearCloseTimer();
|
|
83387
|
+
}
|
|
83388
|
+
}, {
|
|
83389
|
+
key: "restartCloseTimer",
|
|
83390
|
+
value: function restartCloseTimer() {
|
|
83391
|
+
this.clearCloseTimer();
|
|
83392
|
+
this.startCloseTimer();
|
|
83393
|
+
}
|
|
83394
|
+
}, {
|
|
83395
|
+
key: "render",
|
|
83396
|
+
value: function render() {
|
|
83397
|
+
var _this2 = this;
|
|
83398
|
+
|
|
83399
|
+
var _this$props2 = this.props,
|
|
83400
|
+
prefixCls = _this$props2.prefixCls,
|
|
83401
|
+
className = _this$props2.className,
|
|
83402
|
+
closable = _this$props2.closable,
|
|
83403
|
+
closeIcon = _this$props2.closeIcon,
|
|
83404
|
+
style = _this$props2.style,
|
|
83405
|
+
onClick = _this$props2.onClick,
|
|
83406
|
+
children = _this$props2.children,
|
|
83407
|
+
holder = _this$props2.holder;
|
|
83408
|
+
var componentClass = "".concat(prefixCls, "-notice");
|
|
83409
|
+
var dataOrAriaAttributeProps = Object.keys(this.props).reduce(function (acc, key) {
|
|
83410
|
+
if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') {
|
|
83411
|
+
acc[key] = _this2.props[key];
|
|
83412
|
+
}
|
|
83413
|
+
|
|
83414
|
+
return acc;
|
|
83415
|
+
}, {});
|
|
83416
|
+
var node = /*#__PURE__*/React.createElement("div", _extends$5({
|
|
83417
|
+
className: classnames(componentClass, className, _defineProperty$1({}, "".concat(componentClass, "-closable"), closable)),
|
|
83418
|
+
style: style,
|
|
83419
|
+
onMouseEnter: this.clearCloseTimer,
|
|
83420
|
+
onMouseLeave: this.startCloseTimer,
|
|
83421
|
+
onClick: onClick
|
|
83422
|
+
}, dataOrAriaAttributeProps), /*#__PURE__*/React.createElement("div", {
|
|
83423
|
+
className: "".concat(componentClass, "-content")
|
|
83424
|
+
}, children), closable ? /*#__PURE__*/React.createElement("a", {
|
|
83425
|
+
tabIndex: 0,
|
|
83426
|
+
onClick: this.close,
|
|
83427
|
+
className: "".concat(componentClass, "-close")
|
|
83428
|
+
}, closeIcon || /*#__PURE__*/React.createElement("span", {
|
|
83429
|
+
className: "".concat(componentClass, "-close-x")
|
|
83430
|
+
})) : null);
|
|
83431
|
+
|
|
83432
|
+
if (holder) {
|
|
83433
|
+
return /*#__PURE__*/ReactDOM__default['default'].createPortal(node, holder);
|
|
83434
|
+
}
|
|
83435
|
+
|
|
83436
|
+
return node;
|
|
83437
|
+
}
|
|
83438
|
+
}]);
|
|
83439
|
+
|
|
83440
|
+
return Notice;
|
|
83441
|
+
}(React.Component);
|
|
83442
|
+
|
|
83443
|
+
Notice.defaultProps = {
|
|
83444
|
+
onClose: function onClose() {},
|
|
83445
|
+
duration: 1.5
|
|
83446
|
+
};
|
|
83447
|
+
|
|
83448
|
+
function useNotification(notificationInstance) {
|
|
83449
|
+
var createdRef = React.useRef({});
|
|
83450
|
+
|
|
83451
|
+
var _React$useState = React.useState([]),
|
|
83452
|
+
_React$useState2 = _slicedToArray$1(_React$useState, 2),
|
|
83453
|
+
elements = _React$useState2[0],
|
|
83454
|
+
setElements = _React$useState2[1];
|
|
83455
|
+
|
|
83456
|
+
function notify(noticeProps) {
|
|
83457
|
+
var firstMount = true;
|
|
83458
|
+
notificationInstance.add(noticeProps, function (div, props) {
|
|
83459
|
+
var key = props.key;
|
|
83460
|
+
|
|
83461
|
+
if (div && (!createdRef.current[key] || firstMount)) {
|
|
83462
|
+
var noticeEle = /*#__PURE__*/React.createElement(Notice, _extends$5({}, props, {
|
|
83463
|
+
holder: div
|
|
83464
|
+
}));
|
|
83465
|
+
createdRef.current[key] = noticeEle;
|
|
83466
|
+
setElements(function (originElements) {
|
|
83467
|
+
var index = originElements.findIndex(function (ele) {
|
|
83468
|
+
return ele.key === props.key;
|
|
83469
|
+
});
|
|
83470
|
+
|
|
83471
|
+
if (index === -1) {
|
|
83472
|
+
return [].concat(_toConsumableArray$1(originElements), [noticeEle]);
|
|
83473
|
+
}
|
|
83474
|
+
|
|
83475
|
+
var cloneList = _toConsumableArray$1(originElements);
|
|
83476
|
+
|
|
83477
|
+
cloneList[index] = noticeEle;
|
|
83478
|
+
return cloneList;
|
|
83479
|
+
});
|
|
83480
|
+
}
|
|
83481
|
+
|
|
83482
|
+
firstMount = false;
|
|
83483
|
+
});
|
|
83484
|
+
}
|
|
83485
|
+
|
|
83486
|
+
return [notify, /*#__PURE__*/React.createElement(React.Fragment, null, elements)];
|
|
83487
|
+
}
|
|
83488
|
+
|
|
83489
|
+
var _excluded$18 = ["getContainer"];
|
|
83490
|
+
var seed = 0;
|
|
83491
|
+
var now$3 = Date.now();
|
|
83492
|
+
|
|
83493
|
+
function getUuid() {
|
|
83494
|
+
var id = seed;
|
|
83495
|
+
seed += 1;
|
|
83496
|
+
return "rcNotification_".concat(now$3, "_").concat(id);
|
|
83497
|
+
}
|
|
83498
|
+
|
|
83499
|
+
var Notification = /*#__PURE__*/function (_Component) {
|
|
83500
|
+
_inherits(Notification, _Component);
|
|
83501
|
+
|
|
83502
|
+
var _super = _createSuper(Notification);
|
|
83503
|
+
|
|
83504
|
+
function Notification() {
|
|
83505
|
+
var _this;
|
|
83506
|
+
|
|
83507
|
+
_classCallCheck(this, Notification);
|
|
83508
|
+
|
|
83509
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
83510
|
+
args[_key] = arguments[_key];
|
|
83511
|
+
}
|
|
83512
|
+
|
|
83513
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
83514
|
+
_this.state = {
|
|
83515
|
+
notices: []
|
|
83516
|
+
};
|
|
83517
|
+
_this.hookRefs = new Map();
|
|
83518
|
+
|
|
83519
|
+
_this.add = function (originNotice, holderCallback) {
|
|
83520
|
+
var key = originNotice.key || getUuid();
|
|
83521
|
+
|
|
83522
|
+
var notice = _objectSpread2(_objectSpread2({}, originNotice), {}, {
|
|
83523
|
+
key: key
|
|
83524
|
+
});
|
|
83525
|
+
|
|
83526
|
+
var maxCount = _this.props.maxCount;
|
|
83527
|
+
|
|
83528
|
+
_this.setState(function (previousState) {
|
|
83529
|
+
var notices = previousState.notices;
|
|
83530
|
+
var noticeIndex = notices.map(function (v) {
|
|
83531
|
+
return v.notice.key;
|
|
83532
|
+
}).indexOf(key);
|
|
83533
|
+
var updatedNotices = notices.concat();
|
|
83534
|
+
|
|
83535
|
+
if (noticeIndex !== -1) {
|
|
83536
|
+
updatedNotices.splice(noticeIndex, 1, {
|
|
83537
|
+
notice: notice,
|
|
83538
|
+
holderCallback: holderCallback
|
|
83539
|
+
});
|
|
83540
|
+
} else {
|
|
83541
|
+
if (maxCount && notices.length >= maxCount) {
|
|
83542
|
+
// XXX, use key of first item to update new added (let React to move exsiting
|
|
83543
|
+
// instead of remove and mount). Same key was used before for both a) external
|
|
83544
|
+
// manual control and b) internal react 'key' prop , which is not that good.
|
|
83545
|
+
// eslint-disable-next-line no-param-reassign
|
|
83546
|
+
// zombieJ: Not know why use `updateKey`. This makes Notice infinite loop in jest.
|
|
83547
|
+
// Change to `updateMark` for compare instead.
|
|
83548
|
+
// https://github.com/react-component/notification/commit/32299e6be396f94040bfa82517eea940db947ece
|
|
83549
|
+
notice.key = updatedNotices[0].notice.key;
|
|
83550
|
+
notice.updateMark = getUuid(); // zombieJ: That's why. User may close by key directly.
|
|
83551
|
+
// We need record this but not re-render to avoid upper issue
|
|
83552
|
+
// https://github.com/react-component/notification/issues/129
|
|
83553
|
+
|
|
83554
|
+
notice.userPassKey = key;
|
|
83555
|
+
updatedNotices.shift();
|
|
83556
|
+
}
|
|
83557
|
+
|
|
83558
|
+
updatedNotices.push({
|
|
83559
|
+
notice: notice,
|
|
83560
|
+
holderCallback: holderCallback
|
|
83561
|
+
});
|
|
83562
|
+
}
|
|
83563
|
+
|
|
83564
|
+
return {
|
|
83565
|
+
notices: updatedNotices
|
|
83566
|
+
};
|
|
83567
|
+
});
|
|
83568
|
+
};
|
|
83569
|
+
|
|
83570
|
+
_this.remove = function (removeKey) {
|
|
83571
|
+
_this.setState(function (_ref) {
|
|
83572
|
+
var notices = _ref.notices;
|
|
83573
|
+
return {
|
|
83574
|
+
notices: notices.filter(function (_ref2) {
|
|
83575
|
+
var _ref2$notice = _ref2.notice,
|
|
83576
|
+
key = _ref2$notice.key,
|
|
83577
|
+
userPassKey = _ref2$notice.userPassKey;
|
|
83578
|
+
var mergedKey = userPassKey || key;
|
|
83579
|
+
return mergedKey !== removeKey;
|
|
83580
|
+
})
|
|
83581
|
+
};
|
|
83582
|
+
});
|
|
83583
|
+
};
|
|
83584
|
+
|
|
83585
|
+
_this.noticePropsMap = {};
|
|
83586
|
+
return _this;
|
|
83587
|
+
}
|
|
83588
|
+
|
|
83589
|
+
_createClass(Notification, [{
|
|
83590
|
+
key: "getTransitionName",
|
|
83591
|
+
value: function getTransitionName() {
|
|
83592
|
+
var _this$props = this.props,
|
|
83593
|
+
prefixCls = _this$props.prefixCls,
|
|
83594
|
+
animation = _this$props.animation;
|
|
83595
|
+
var transitionName = this.props.transitionName;
|
|
83596
|
+
|
|
83597
|
+
if (!transitionName && animation) {
|
|
83598
|
+
transitionName = "".concat(prefixCls, "-").concat(animation);
|
|
83599
|
+
}
|
|
83600
|
+
|
|
83601
|
+
return transitionName;
|
|
83602
|
+
}
|
|
83603
|
+
}, {
|
|
83604
|
+
key: "render",
|
|
83605
|
+
value: function render() {
|
|
83606
|
+
var _this2 = this;
|
|
83607
|
+
|
|
83608
|
+
var notices = this.state.notices;
|
|
83609
|
+
var _this$props2 = this.props,
|
|
83610
|
+
prefixCls = _this$props2.prefixCls,
|
|
83611
|
+
className = _this$props2.className,
|
|
83612
|
+
closeIcon = _this$props2.closeIcon,
|
|
83613
|
+
style = _this$props2.style;
|
|
83614
|
+
var noticeKeys = [];
|
|
83615
|
+
notices.forEach(function (_ref3, index) {
|
|
83616
|
+
var notice = _ref3.notice,
|
|
83617
|
+
holderCallback = _ref3.holderCallback;
|
|
83618
|
+
var updateMark = index === notices.length - 1 ? notice.updateMark : undefined;
|
|
83619
|
+
var key = notice.key,
|
|
83620
|
+
userPassKey = notice.userPassKey;
|
|
83621
|
+
|
|
83622
|
+
var noticeProps = _objectSpread2(_objectSpread2(_objectSpread2({
|
|
83623
|
+
prefixCls: prefixCls,
|
|
83624
|
+
closeIcon: closeIcon
|
|
83625
|
+
}, notice), notice.props), {}, {
|
|
83626
|
+
key: key,
|
|
83627
|
+
noticeKey: userPassKey || key,
|
|
83628
|
+
updateMark: updateMark,
|
|
83629
|
+
onClose: function onClose(noticeKey) {
|
|
83630
|
+
var _notice$onClose;
|
|
83631
|
+
|
|
83632
|
+
_this2.remove(noticeKey);
|
|
83633
|
+
|
|
83634
|
+
(_notice$onClose = notice.onClose) === null || _notice$onClose === void 0 ? void 0 : _notice$onClose.call(notice);
|
|
83635
|
+
},
|
|
83636
|
+
onClick: notice.onClick,
|
|
83637
|
+
children: notice.content
|
|
83638
|
+
}); // Give to motion
|
|
83639
|
+
|
|
83640
|
+
|
|
83641
|
+
noticeKeys.push(key);
|
|
83642
|
+
_this2.noticePropsMap[key] = {
|
|
83643
|
+
props: noticeProps,
|
|
83644
|
+
holderCallback: holderCallback
|
|
83645
|
+
};
|
|
83646
|
+
});
|
|
83647
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
83648
|
+
className: classnames(prefixCls, className),
|
|
83649
|
+
style: style
|
|
83650
|
+
}, /*#__PURE__*/React.createElement(CSSMotionList, {
|
|
83651
|
+
keys: noticeKeys,
|
|
83652
|
+
motionName: this.getTransitionName(),
|
|
83653
|
+
onVisibleChanged: function onVisibleChanged(changedVisible, _ref4) {
|
|
83654
|
+
var key = _ref4.key;
|
|
83655
|
+
|
|
83656
|
+
if (!changedVisible) {
|
|
83657
|
+
delete _this2.noticePropsMap[key];
|
|
83658
|
+
}
|
|
83659
|
+
}
|
|
83660
|
+
}, function (_ref5) {
|
|
83661
|
+
var key = _ref5.key,
|
|
83662
|
+
motionClassName = _ref5.className,
|
|
83663
|
+
motionStyle = _ref5.style,
|
|
83664
|
+
visible = _ref5.visible;
|
|
83665
|
+
var _this2$noticePropsMap = _this2.noticePropsMap[key],
|
|
83666
|
+
noticeProps = _this2$noticePropsMap.props,
|
|
83667
|
+
holderCallback = _this2$noticePropsMap.holderCallback;
|
|
83668
|
+
|
|
83669
|
+
if (holderCallback) {
|
|
83670
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
83671
|
+
key: key,
|
|
83672
|
+
className: classnames(motionClassName, "".concat(prefixCls, "-hook-holder")),
|
|
83673
|
+
style: _objectSpread2({}, motionStyle),
|
|
83674
|
+
ref: function ref(div) {
|
|
83675
|
+
if (typeof key === 'undefined') {
|
|
83676
|
+
return;
|
|
83677
|
+
}
|
|
83678
|
+
|
|
83679
|
+
if (div) {
|
|
83680
|
+
_this2.hookRefs.set(key, div);
|
|
83681
|
+
|
|
83682
|
+
holderCallback(div, noticeProps);
|
|
83683
|
+
} else {
|
|
83684
|
+
_this2.hookRefs.delete(key);
|
|
83685
|
+
}
|
|
83686
|
+
}
|
|
83687
|
+
});
|
|
83688
|
+
}
|
|
83689
|
+
|
|
83690
|
+
return /*#__PURE__*/React.createElement(Notice, _extends$5({}, noticeProps, {
|
|
83691
|
+
className: classnames(motionClassName, noticeProps === null || noticeProps === void 0 ? void 0 : noticeProps.className),
|
|
83692
|
+
style: _objectSpread2(_objectSpread2({}, motionStyle), noticeProps === null || noticeProps === void 0 ? void 0 : noticeProps.style),
|
|
83693
|
+
visible: visible
|
|
83694
|
+
}));
|
|
83695
|
+
}));
|
|
83696
|
+
}
|
|
83697
|
+
}]);
|
|
83698
|
+
|
|
83699
|
+
return Notification;
|
|
83700
|
+
}(React.Component);
|
|
83701
|
+
|
|
83702
|
+
Notification.newInstance = void 0;
|
|
83703
|
+
Notification.defaultProps = {
|
|
83704
|
+
prefixCls: 'rc-notification',
|
|
83705
|
+
animation: 'fade',
|
|
83706
|
+
style: {
|
|
83707
|
+
top: 65,
|
|
83708
|
+
left: '50%'
|
|
83709
|
+
}
|
|
83710
|
+
};
|
|
83711
|
+
|
|
83712
|
+
Notification.newInstance = function newNotificationInstance(properties, callback) {
|
|
83713
|
+
var _ref6 = properties || {},
|
|
83714
|
+
getContainer = _ref6.getContainer,
|
|
83715
|
+
props = _objectWithoutProperties$1(_ref6, _excluded$18);
|
|
83716
|
+
|
|
83717
|
+
var div = document.createElement('div');
|
|
83718
|
+
|
|
83719
|
+
if (getContainer) {
|
|
83720
|
+
var root = getContainer();
|
|
83721
|
+
root.appendChild(div);
|
|
83722
|
+
} else {
|
|
83723
|
+
document.body.appendChild(div);
|
|
83724
|
+
}
|
|
83725
|
+
|
|
83726
|
+
var called = false;
|
|
83727
|
+
|
|
83728
|
+
function ref(notification) {
|
|
83729
|
+
if (called) {
|
|
83730
|
+
return;
|
|
83731
|
+
}
|
|
83732
|
+
|
|
83733
|
+
called = true;
|
|
83734
|
+
callback({
|
|
83735
|
+
notice: function notice(noticeProps) {
|
|
83736
|
+
notification.add(noticeProps);
|
|
83737
|
+
},
|
|
83738
|
+
removeNotice: function removeNotice(key) {
|
|
83739
|
+
notification.remove(key);
|
|
83740
|
+
},
|
|
83741
|
+
component: notification,
|
|
83742
|
+
destroy: function destroy() {
|
|
83743
|
+
unmount(div);
|
|
83744
|
+
|
|
83745
|
+
if (div.parentNode) {
|
|
83746
|
+
div.parentNode.removeChild(div);
|
|
83747
|
+
}
|
|
83748
|
+
},
|
|
83749
|
+
// Hooks
|
|
83750
|
+
useNotification: function useNotification$1() {
|
|
83751
|
+
return useNotification(notification);
|
|
83752
|
+
}
|
|
83753
|
+
});
|
|
83754
|
+
} // Only used for test case usage
|
|
83755
|
+
|
|
83756
|
+
render$3( /*#__PURE__*/React.createElement(Notification, _extends$5({}, props, {
|
|
83757
|
+
ref: ref
|
|
83758
|
+
})), div);
|
|
83759
|
+
};
|
|
83760
|
+
|
|
83761
|
+
var interopRequireWildcard = createCommonjsModule(function (module) {
|
|
83762
|
+
var _typeof = _typeof_1["default"];
|
|
83763
|
+
|
|
83764
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
83765
|
+
if (typeof WeakMap !== "function") return null;
|
|
83766
|
+
var cacheBabelInterop = new WeakMap();
|
|
83767
|
+
var cacheNodeInterop = new WeakMap();
|
|
83768
|
+
return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
|
|
83769
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
83770
|
+
})(nodeInterop);
|
|
83771
|
+
}
|
|
83772
|
+
|
|
83773
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
83774
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
83775
|
+
return obj;
|
|
83776
|
+
}
|
|
83777
|
+
|
|
83778
|
+
if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
|
|
83779
|
+
return {
|
|
83780
|
+
"default": obj
|
|
83781
|
+
};
|
|
83782
|
+
}
|
|
83783
|
+
|
|
83784
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
83785
|
+
|
|
83786
|
+
if (cache && cache.has(obj)) {
|
|
83787
|
+
return cache.get(obj);
|
|
83788
|
+
}
|
|
83789
|
+
|
|
83790
|
+
var newObj = {};
|
|
83791
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
83792
|
+
|
|
83793
|
+
for (var key in obj) {
|
|
83794
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
83795
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
83796
|
+
|
|
83797
|
+
if (desc && (desc.get || desc.set)) {
|
|
83798
|
+
Object.defineProperty(newObj, key, desc);
|
|
83799
|
+
} else {
|
|
83800
|
+
newObj[key] = obj[key];
|
|
83801
|
+
}
|
|
83802
|
+
}
|
|
83803
|
+
}
|
|
83804
|
+
|
|
83805
|
+
newObj["default"] = obj;
|
|
83806
|
+
|
|
83807
|
+
if (cache) {
|
|
83808
|
+
cache.set(obj, newObj);
|
|
83809
|
+
}
|
|
83810
|
+
|
|
83811
|
+
return newObj;
|
|
83812
|
+
}
|
|
83813
|
+
|
|
83814
|
+
module.exports = _interopRequireWildcard, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83815
|
+
});
|
|
83816
|
+
|
|
83817
|
+
var interopRequireDefault = createCommonjsModule(function (module) {
|
|
83818
|
+
function _interopRequireDefault(obj) {
|
|
83819
|
+
return obj && obj.__esModule ? obj : {
|
|
83820
|
+
"default": obj
|
|
83821
|
+
};
|
|
83822
|
+
}
|
|
83823
|
+
|
|
83824
|
+
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83825
|
+
});
|
|
83826
|
+
|
|
83827
|
+
var classCallCheck$1 = createCommonjsModule(function (module) {
|
|
83828
|
+
function _classCallCheck(instance, Constructor) {
|
|
83829
|
+
if (!(instance instanceof Constructor)) {
|
|
83830
|
+
throw new TypeError("Cannot call a class as a function");
|
|
83831
|
+
}
|
|
83832
|
+
}
|
|
83833
|
+
|
|
83834
|
+
module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83835
|
+
});
|
|
83836
|
+
|
|
83837
|
+
var createClass$1 = createCommonjsModule(function (module) {
|
|
83838
|
+
function _defineProperties(target, props) {
|
|
83839
|
+
for (var i = 0; i < props.length; i++) {
|
|
83840
|
+
var descriptor = props[i];
|
|
83841
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
83842
|
+
descriptor.configurable = true;
|
|
83843
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
83844
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
83845
|
+
}
|
|
83846
|
+
}
|
|
83847
|
+
|
|
83848
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
83849
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
83850
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
83851
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
83852
|
+
writable: false
|
|
83853
|
+
});
|
|
83854
|
+
return Constructor;
|
|
83855
|
+
}
|
|
83856
|
+
|
|
83857
|
+
module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83858
|
+
});
|
|
83859
|
+
|
|
83860
|
+
var setPrototypeOf = createCommonjsModule(function (module) {
|
|
83861
|
+
function _setPrototypeOf(o, p) {
|
|
83862
|
+
module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
83863
|
+
o.__proto__ = p;
|
|
83864
|
+
return o;
|
|
83865
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83866
|
+
return _setPrototypeOf(o, p);
|
|
83867
|
+
}
|
|
83868
|
+
|
|
83869
|
+
module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83870
|
+
});
|
|
83871
|
+
|
|
83872
|
+
var inherits$1 = createCommonjsModule(function (module) {
|
|
83873
|
+
function _inherits(subClass, superClass) {
|
|
83874
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
83875
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
83876
|
+
}
|
|
83877
|
+
|
|
83878
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
83879
|
+
constructor: {
|
|
83880
|
+
value: subClass,
|
|
83881
|
+
writable: true,
|
|
83882
|
+
configurable: true
|
|
83883
|
+
}
|
|
83884
|
+
});
|
|
83885
|
+
Object.defineProperty(subClass, "prototype", {
|
|
83886
|
+
writable: false
|
|
83887
|
+
});
|
|
83888
|
+
if (superClass) setPrototypeOf(subClass, superClass);
|
|
83889
|
+
}
|
|
83890
|
+
|
|
83891
|
+
module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83892
|
+
});
|
|
83893
|
+
|
|
83894
|
+
var getPrototypeOf = createCommonjsModule(function (module) {
|
|
83895
|
+
function _getPrototypeOf(o) {
|
|
83896
|
+
module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
83897
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
83898
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83899
|
+
return _getPrototypeOf(o);
|
|
83900
|
+
}
|
|
83901
|
+
|
|
83902
|
+
module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83903
|
+
});
|
|
83904
|
+
|
|
83905
|
+
var isNativeReflectConstruct = createCommonjsModule(function (module) {
|
|
83906
|
+
function _isNativeReflectConstruct() {
|
|
83907
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
83908
|
+
if (Reflect.construct.sham) return false;
|
|
83909
|
+
if (typeof Proxy === "function") return true;
|
|
83910
|
+
|
|
83911
|
+
try {
|
|
83912
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
83913
|
+
return true;
|
|
83914
|
+
} catch (e) {
|
|
83915
|
+
return false;
|
|
83916
|
+
}
|
|
83917
|
+
}
|
|
83918
|
+
|
|
83919
|
+
module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83920
|
+
});
|
|
83921
|
+
|
|
83922
|
+
var assertThisInitialized = createCommonjsModule(function (module) {
|
|
83923
|
+
function _assertThisInitialized(self) {
|
|
83924
|
+
if (self === void 0) {
|
|
83925
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
83926
|
+
}
|
|
83927
|
+
|
|
83928
|
+
return self;
|
|
83929
|
+
}
|
|
83930
|
+
|
|
83931
|
+
module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83932
|
+
});
|
|
83933
|
+
|
|
83934
|
+
var possibleConstructorReturn$1 = createCommonjsModule(function (module) {
|
|
83935
|
+
var _typeof = _typeof_1["default"];
|
|
83936
|
+
|
|
83937
|
+
|
|
83938
|
+
|
|
83939
|
+
function _possibleConstructorReturn(self, call) {
|
|
83940
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
83941
|
+
return call;
|
|
83942
|
+
} else if (call !== void 0) {
|
|
83943
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
83944
|
+
}
|
|
83945
|
+
|
|
83946
|
+
return assertThisInitialized(self);
|
|
83947
|
+
}
|
|
83948
|
+
|
|
83949
|
+
module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83950
|
+
});
|
|
83951
|
+
|
|
83952
|
+
var createSuper = createCommonjsModule(function (module) {
|
|
83953
|
+
function _createSuper(Derived) {
|
|
83954
|
+
var hasNativeReflectConstruct = isNativeReflectConstruct();
|
|
83955
|
+
return function _createSuperInternal() {
|
|
83956
|
+
var Super = getPrototypeOf(Derived),
|
|
83957
|
+
result;
|
|
83958
|
+
|
|
83959
|
+
if (hasNativeReflectConstruct) {
|
|
83960
|
+
var NewTarget = getPrototypeOf(this).constructor;
|
|
83961
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
83962
|
+
} else {
|
|
83963
|
+
result = Super.apply(this, arguments);
|
|
83964
|
+
}
|
|
83965
|
+
|
|
83966
|
+
return possibleConstructorReturn$1(this, result);
|
|
83967
|
+
};
|
|
83968
|
+
}
|
|
83969
|
+
|
|
83970
|
+
module.exports = _createSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
83971
|
+
});
|
|
83972
|
+
|
|
83973
|
+
var Notice_1 = createCommonjsModule(function (module, exports) {
|
|
83974
|
+
|
|
83975
|
+
|
|
83976
|
+
|
|
83977
|
+
|
|
83978
|
+
|
|
83979
|
+
Object.defineProperty(exports, "__esModule", {
|
|
83980
|
+
value: true
|
|
83981
|
+
});
|
|
83982
|
+
exports.default = void 0;
|
|
83983
|
+
|
|
83984
|
+
var _extends2 = interopRequireDefault(_extends_1);
|
|
83985
|
+
|
|
83986
|
+
var _defineProperty2 = interopRequireDefault(defineProperty);
|
|
83987
|
+
|
|
83988
|
+
var _classCallCheck2 = interopRequireDefault(classCallCheck$1);
|
|
83989
|
+
|
|
83990
|
+
var _createClass2 = interopRequireDefault(createClass$1);
|
|
83991
|
+
|
|
83992
|
+
var _inherits2 = interopRequireDefault(inherits$1);
|
|
83993
|
+
|
|
83994
|
+
var _createSuper2 = interopRequireDefault(createSuper);
|
|
83995
|
+
|
|
83996
|
+
var React = interopRequireWildcard(React__default['default']);
|
|
83997
|
+
|
|
83998
|
+
var _reactDom = interopRequireDefault(ReactDOM__default['default']);
|
|
83999
|
+
|
|
84000
|
+
var _classnames = interopRequireDefault(classnames);
|
|
84001
|
+
|
|
84002
|
+
var Notice = /*#__PURE__*/function (_Component) {
|
|
84003
|
+
(0, _inherits2.default)(Notice, _Component);
|
|
84004
|
+
|
|
84005
|
+
var _super = (0, _createSuper2.default)(Notice);
|
|
84006
|
+
|
|
84007
|
+
function Notice() {
|
|
84008
|
+
var _this;
|
|
84009
|
+
|
|
84010
|
+
(0, _classCallCheck2.default)(this, Notice);
|
|
84011
|
+
|
|
84012
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
84013
|
+
args[_key] = arguments[_key];
|
|
84014
|
+
}
|
|
84015
|
+
|
|
84016
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
84017
|
+
_this.closeTimer = null;
|
|
84018
|
+
|
|
84019
|
+
_this.close = function (e) {
|
|
84020
|
+
if (e) {
|
|
84021
|
+
e.stopPropagation();
|
|
84022
|
+
}
|
|
84023
|
+
|
|
84024
|
+
_this.clearCloseTimer();
|
|
84025
|
+
|
|
84026
|
+
var _this$props = _this.props,
|
|
84027
|
+
onClose = _this$props.onClose,
|
|
84028
|
+
noticeKey = _this$props.noticeKey;
|
|
84029
|
+
|
|
84030
|
+
if (onClose) {
|
|
84031
|
+
onClose(noticeKey);
|
|
84032
|
+
}
|
|
84033
|
+
};
|
|
84034
|
+
|
|
84035
|
+
_this.startCloseTimer = function () {
|
|
84036
|
+
if (_this.props.duration) {
|
|
84037
|
+
_this.closeTimer = window.setTimeout(function () {
|
|
84038
|
+
_this.close();
|
|
84039
|
+
}, _this.props.duration * 1000);
|
|
84040
|
+
}
|
|
84041
|
+
};
|
|
84042
|
+
|
|
84043
|
+
_this.clearCloseTimer = function () {
|
|
84044
|
+
if (_this.closeTimer) {
|
|
84045
|
+
clearTimeout(_this.closeTimer);
|
|
84046
|
+
_this.closeTimer = null;
|
|
84047
|
+
}
|
|
84048
|
+
};
|
|
84049
|
+
|
|
84050
|
+
return _this;
|
|
84051
|
+
}
|
|
84052
|
+
|
|
84053
|
+
(0, _createClass2.default)(Notice, [{
|
|
84054
|
+
key: "componentDidMount",
|
|
84055
|
+
value: function componentDidMount() {
|
|
84056
|
+
this.startCloseTimer();
|
|
84057
|
+
}
|
|
84058
|
+
}, {
|
|
84059
|
+
key: "componentDidUpdate",
|
|
84060
|
+
value: function componentDidUpdate(prevProps) {
|
|
84061
|
+
if (this.props.duration !== prevProps.duration || this.props.updateMark !== prevProps.updateMark || // Visible again need reset timer
|
|
84062
|
+
this.props.visible !== prevProps.visible && this.props.visible) {
|
|
84063
|
+
this.restartCloseTimer();
|
|
84064
|
+
}
|
|
84065
|
+
}
|
|
84066
|
+
}, {
|
|
84067
|
+
key: "componentWillUnmount",
|
|
84068
|
+
value: function componentWillUnmount() {
|
|
84069
|
+
this.clearCloseTimer();
|
|
84070
|
+
}
|
|
84071
|
+
}, {
|
|
84072
|
+
key: "restartCloseTimer",
|
|
84073
|
+
value: function restartCloseTimer() {
|
|
84074
|
+
this.clearCloseTimer();
|
|
84075
|
+
this.startCloseTimer();
|
|
84076
|
+
}
|
|
84077
|
+
}, {
|
|
84078
|
+
key: "render",
|
|
84079
|
+
value: function render() {
|
|
84080
|
+
var _this2 = this;
|
|
84081
|
+
|
|
84082
|
+
var _this$props2 = this.props,
|
|
84083
|
+
prefixCls = _this$props2.prefixCls,
|
|
84084
|
+
className = _this$props2.className,
|
|
84085
|
+
closable = _this$props2.closable,
|
|
84086
|
+
closeIcon = _this$props2.closeIcon,
|
|
84087
|
+
style = _this$props2.style,
|
|
84088
|
+
onClick = _this$props2.onClick,
|
|
84089
|
+
children = _this$props2.children,
|
|
84090
|
+
holder = _this$props2.holder;
|
|
84091
|
+
var componentClass = "".concat(prefixCls, "-notice");
|
|
84092
|
+
var dataOrAriaAttributeProps = Object.keys(this.props).reduce(function (acc, key) {
|
|
84093
|
+
if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') {
|
|
84094
|
+
acc[key] = _this2.props[key];
|
|
84095
|
+
}
|
|
84096
|
+
|
|
84097
|
+
return acc;
|
|
84098
|
+
}, {});
|
|
84099
|
+
var node = /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
|
|
84100
|
+
className: (0, _classnames.default)(componentClass, className, (0, _defineProperty2.default)({}, "".concat(componentClass, "-closable"), closable)),
|
|
84101
|
+
style: style,
|
|
84102
|
+
onMouseEnter: this.clearCloseTimer,
|
|
84103
|
+
onMouseLeave: this.startCloseTimer,
|
|
84104
|
+
onClick: onClick
|
|
84105
|
+
}, dataOrAriaAttributeProps), /*#__PURE__*/React.createElement("div", {
|
|
84106
|
+
className: "".concat(componentClass, "-content")
|
|
84107
|
+
}, children), closable ? /*#__PURE__*/React.createElement("a", {
|
|
84108
|
+
tabIndex: 0,
|
|
84109
|
+
onClick: this.close,
|
|
84110
|
+
className: "".concat(componentClass, "-close")
|
|
84111
|
+
}, closeIcon || /*#__PURE__*/React.createElement("span", {
|
|
84112
|
+
className: "".concat(componentClass, "-close-x")
|
|
84113
|
+
})) : null);
|
|
84114
|
+
|
|
84115
|
+
if (holder) {
|
|
84116
|
+
return /*#__PURE__*/_reactDom.default.createPortal(node, holder);
|
|
84117
|
+
}
|
|
84118
|
+
|
|
84119
|
+
return node;
|
|
84120
|
+
}
|
|
84121
|
+
}]);
|
|
84122
|
+
return Notice;
|
|
84123
|
+
}(React.Component);
|
|
84124
|
+
|
|
84125
|
+
exports.default = Notice;
|
|
84126
|
+
Notice.defaultProps = {
|
|
84127
|
+
onClose: function onClose() {},
|
|
84128
|
+
duration: 1.5
|
|
84129
|
+
};
|
|
84130
|
+
});
|
|
84131
|
+
|
|
84132
|
+
var useNotification_1 = createCommonjsModule(function (module, exports) {
|
|
84133
|
+
|
|
84134
|
+
|
|
84135
|
+
|
|
84136
|
+
|
|
84137
|
+
|
|
84138
|
+
Object.defineProperty(exports, "__esModule", {
|
|
84139
|
+
value: true
|
|
84140
|
+
});
|
|
84141
|
+
exports.default = useNotification;
|
|
84142
|
+
|
|
84143
|
+
var _toConsumableArray2 = interopRequireDefault(toConsumableArray);
|
|
84144
|
+
|
|
84145
|
+
var _extends2 = interopRequireDefault(_extends_1);
|
|
84146
|
+
|
|
84147
|
+
var _slicedToArray2 = interopRequireDefault(slicedToArray);
|
|
84148
|
+
|
|
84149
|
+
var React = interopRequireWildcard(React__default['default']);
|
|
84150
|
+
|
|
84151
|
+
var _Notice = interopRequireDefault(Notice_1);
|
|
84152
|
+
|
|
84153
|
+
function useNotification(notificationInstance) {
|
|
84154
|
+
var createdRef = React.useRef({});
|
|
84155
|
+
|
|
84156
|
+
var _React$useState = React.useState([]),
|
|
84157
|
+
_React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
|
|
84158
|
+
elements = _React$useState2[0],
|
|
84159
|
+
setElements = _React$useState2[1];
|
|
84160
|
+
|
|
84161
|
+
function notify(noticeProps) {
|
|
84162
|
+
var firstMount = true;
|
|
84163
|
+
notificationInstance.add(noticeProps, function (div, props) {
|
|
84164
|
+
var key = props.key;
|
|
84165
|
+
|
|
84166
|
+
if (div && (!createdRef.current[key] || firstMount)) {
|
|
84167
|
+
var noticeEle = /*#__PURE__*/React.createElement(_Notice.default, (0, _extends2.default)({}, props, {
|
|
84168
|
+
holder: div
|
|
84169
|
+
}));
|
|
84170
|
+
createdRef.current[key] = noticeEle;
|
|
84171
|
+
setElements(function (originElements) {
|
|
84172
|
+
var index = originElements.findIndex(function (ele) {
|
|
84173
|
+
return ele.key === props.key;
|
|
84174
|
+
});
|
|
84175
|
+
|
|
84176
|
+
if (index === -1) {
|
|
84177
|
+
return [].concat((0, _toConsumableArray2.default)(originElements), [noticeEle]);
|
|
84178
|
+
}
|
|
84179
|
+
|
|
84180
|
+
var cloneList = (0, _toConsumableArray2.default)(originElements);
|
|
84181
|
+
cloneList[index] = noticeEle;
|
|
84182
|
+
return cloneList;
|
|
84183
|
+
});
|
|
84184
|
+
}
|
|
84185
|
+
|
|
84186
|
+
firstMount = false;
|
|
84187
|
+
});
|
|
84188
|
+
}
|
|
84189
|
+
|
|
84190
|
+
return [notify, /*#__PURE__*/React.createElement(React.Fragment, null, elements)];
|
|
84191
|
+
}
|
|
84192
|
+
});
|
|
84193
|
+
|
|
84194
|
+
var useRCNotification = /*@__PURE__*/getDefaultExportFromCjs(useNotification_1);
|
|
84195
|
+
|
|
84196
|
+
function createUseNotification(getNotificationInstance, getRCNoticeProps) {
|
|
84197
|
+
var useNotification = function useNotification() {
|
|
84198
|
+
// We can only get content by render
|
|
84199
|
+
var getPrefixCls; // We create a proxy to handle delay created instance
|
|
84200
|
+
|
|
84201
|
+
var innerInstance = null;
|
|
84202
|
+
var proxy = {
|
|
84203
|
+
add: function add(noticeProps, holderCallback) {
|
|
84204
|
+
var _innerInstance;
|
|
84205
|
+
|
|
84206
|
+
(_innerInstance = innerInstance) === null || _innerInstance === void 0 ? void 0 : _innerInstance.component.add(noticeProps, holderCallback);
|
|
84207
|
+
}
|
|
84208
|
+
};
|
|
84209
|
+
|
|
84210
|
+
var _useRCNotification = useRCNotification(proxy),
|
|
84211
|
+
_useRCNotification2 = _slicedToArray(_useRCNotification, 2),
|
|
84212
|
+
hookNotify = _useRCNotification2[0],
|
|
84213
|
+
holder = _useRCNotification2[1];
|
|
84214
|
+
|
|
84215
|
+
function notify(args) {
|
|
84216
|
+
var customizePrefixCls = args.prefixCls;
|
|
84217
|
+
var mergedPrefixCls = getPrefixCls('notification', customizePrefixCls);
|
|
84218
|
+
getNotificationInstance(_objectSpread(_objectSpread({}, args), {}, {
|
|
84219
|
+
prefixCls: mergedPrefixCls
|
|
84220
|
+
}), function (_ref) {
|
|
84221
|
+
var prefixCls = _ref.prefixCls,
|
|
84222
|
+
instance = _ref.instance;
|
|
84223
|
+
innerInstance = instance;
|
|
84224
|
+
hookNotify(getRCNoticeProps(args, prefixCls));
|
|
84225
|
+
});
|
|
84226
|
+
} // Fill functions
|
|
84227
|
+
|
|
84228
|
+
|
|
84229
|
+
var hookApiRef = React.useRef({});
|
|
84230
|
+
hookApiRef.current.open = notify;
|
|
84231
|
+
['success', 'info', 'warning', 'error'].forEach(function (type) {
|
|
84232
|
+
hookApiRef.current[type] = function (args) {
|
|
84233
|
+
return hookApiRef.current.open(_objectSpread(_objectSpread({}, args), {}, {
|
|
84234
|
+
type: type
|
|
84235
|
+
}));
|
|
84236
|
+
};
|
|
84237
|
+
});
|
|
84238
|
+
return [hookApiRef.current, /*#__PURE__*/React.createElement(_ConfigProvider.ConfigConsumer, {
|
|
84239
|
+
key: "holder"
|
|
84240
|
+
}, function (context) {
|
|
84241
|
+
getPrefixCls = context.getPrefixCls;
|
|
84242
|
+
return holder;
|
|
84243
|
+
})];
|
|
84244
|
+
};
|
|
84245
|
+
|
|
84246
|
+
return useNotification;
|
|
84247
|
+
}
|
|
84248
|
+
|
|
84249
|
+
var notificationInstance = {};
|
|
84250
|
+
var defaultDuration = 4.5;
|
|
84251
|
+
var defaultTop = 24;
|
|
84252
|
+
var defaultBottom = 24;
|
|
84253
|
+
var defaultPrefixCls = '';
|
|
84254
|
+
var defaultPlacement = 'topRight';
|
|
84255
|
+
var defaultGetContainer;
|
|
84256
|
+
var defaultCloseIcon;
|
|
84257
|
+
var rtl = false;
|
|
84258
|
+
var maxCount;
|
|
84259
|
+
|
|
84260
|
+
function setNotificationConfig(options) {
|
|
84261
|
+
var duration = options.duration,
|
|
84262
|
+
placement = options.placement,
|
|
84263
|
+
bottom = options.bottom,
|
|
84264
|
+
top = options.top,
|
|
84265
|
+
getContainer = options.getContainer,
|
|
84266
|
+
closeIcon = options.closeIcon,
|
|
84267
|
+
prefixCls = options.prefixCls;
|
|
84268
|
+
|
|
84269
|
+
if (prefixCls !== undefined) {
|
|
84270
|
+
defaultPrefixCls = prefixCls;
|
|
84271
|
+
}
|
|
84272
|
+
|
|
84273
|
+
if (duration !== undefined) {
|
|
84274
|
+
defaultDuration = duration;
|
|
84275
|
+
}
|
|
84276
|
+
|
|
84277
|
+
if (placement !== undefined) {
|
|
84278
|
+
defaultPlacement = placement;
|
|
84279
|
+
} else if (options.rtl) {
|
|
84280
|
+
defaultPlacement = 'topLeft';
|
|
84281
|
+
}
|
|
84282
|
+
|
|
84283
|
+
if (bottom !== undefined) {
|
|
84284
|
+
defaultBottom = bottom;
|
|
84285
|
+
}
|
|
84286
|
+
|
|
84287
|
+
if (top !== undefined) {
|
|
84288
|
+
defaultTop = top;
|
|
84289
|
+
}
|
|
84290
|
+
|
|
84291
|
+
if (getContainer !== undefined) {
|
|
84292
|
+
defaultGetContainer = getContainer;
|
|
84293
|
+
}
|
|
84294
|
+
|
|
84295
|
+
if (closeIcon !== undefined) {
|
|
84296
|
+
defaultCloseIcon = closeIcon;
|
|
84297
|
+
}
|
|
84298
|
+
|
|
84299
|
+
if (options.rtl !== undefined) {
|
|
84300
|
+
rtl = options.rtl;
|
|
84301
|
+
}
|
|
84302
|
+
|
|
84303
|
+
if (options.maxCount !== undefined) {
|
|
84304
|
+
maxCount = options.maxCount;
|
|
84305
|
+
}
|
|
84306
|
+
}
|
|
84307
|
+
|
|
84308
|
+
function getPlacementStyle(placement) {
|
|
84309
|
+
var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultTop;
|
|
84310
|
+
var bottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultBottom;
|
|
84311
|
+
var style;
|
|
84312
|
+
|
|
84313
|
+
switch (placement) {
|
|
84314
|
+
case 'top':
|
|
84315
|
+
style = {
|
|
84316
|
+
left: '50%',
|
|
84317
|
+
transform: 'translateX(-50%)',
|
|
84318
|
+
right: 'auto',
|
|
84319
|
+
top: top,
|
|
84320
|
+
bottom: 'auto'
|
|
84321
|
+
};
|
|
84322
|
+
break;
|
|
84323
|
+
|
|
84324
|
+
case 'topLeft':
|
|
84325
|
+
style = {
|
|
84326
|
+
left: 0,
|
|
84327
|
+
top: top,
|
|
84328
|
+
bottom: 'auto'
|
|
84329
|
+
};
|
|
84330
|
+
break;
|
|
84331
|
+
|
|
84332
|
+
case 'topRight':
|
|
84333
|
+
style = {
|
|
84334
|
+
right: 0,
|
|
84335
|
+
top: top,
|
|
84336
|
+
bottom: 'auto'
|
|
84337
|
+
};
|
|
84338
|
+
break;
|
|
84339
|
+
|
|
84340
|
+
case 'bottom':
|
|
84341
|
+
style = {
|
|
84342
|
+
left: '50%',
|
|
84343
|
+
transform: 'translateX(-50%)',
|
|
84344
|
+
right: 'auto',
|
|
84345
|
+
top: 'auto',
|
|
84346
|
+
bottom: bottom
|
|
84347
|
+
};
|
|
84348
|
+
break;
|
|
84349
|
+
|
|
84350
|
+
case 'bottomLeft':
|
|
84351
|
+
style = {
|
|
84352
|
+
left: 0,
|
|
84353
|
+
top: 'auto',
|
|
84354
|
+
bottom: bottom
|
|
84355
|
+
};
|
|
84356
|
+
break;
|
|
84357
|
+
|
|
84358
|
+
default:
|
|
84359
|
+
style = {
|
|
84360
|
+
right: 0,
|
|
84361
|
+
top: 'auto',
|
|
84362
|
+
bottom: bottom
|
|
84363
|
+
};
|
|
84364
|
+
break;
|
|
84365
|
+
}
|
|
84366
|
+
|
|
84367
|
+
return style;
|
|
84368
|
+
}
|
|
84369
|
+
|
|
84370
|
+
function getNotificationInstance(args, callback) {
|
|
84371
|
+
var _args$placement = args.placement,
|
|
84372
|
+
placement = _args$placement === void 0 ? defaultPlacement : _args$placement,
|
|
84373
|
+
top = args.top,
|
|
84374
|
+
bottom = args.bottom,
|
|
84375
|
+
_args$getContainer = args.getContainer,
|
|
84376
|
+
getContainer = _args$getContainer === void 0 ? defaultGetContainer : _args$getContainer,
|
|
84377
|
+
customizePrefixCls = args.prefixCls;
|
|
84378
|
+
|
|
84379
|
+
var _globalConfig = _ConfigProvider.globalConfig(),
|
|
84380
|
+
getPrefixCls = _globalConfig.getPrefixCls,
|
|
84381
|
+
getIconPrefixCls = _globalConfig.getIconPrefixCls;
|
|
84382
|
+
|
|
84383
|
+
var prefixCls = getPrefixCls('notification', customizePrefixCls || defaultPrefixCls);
|
|
84384
|
+
var iconPrefixCls = getIconPrefixCls();
|
|
84385
|
+
var cacheKey = "".concat(prefixCls, "-").concat(placement);
|
|
84386
|
+
var cacheInstance = notificationInstance[cacheKey];
|
|
84387
|
+
|
|
84388
|
+
if (cacheInstance) {
|
|
84389
|
+
Promise.resolve(cacheInstance).then(function (instance) {
|
|
84390
|
+
callback({
|
|
84391
|
+
prefixCls: "".concat(prefixCls, "-notice"),
|
|
84392
|
+
iconPrefixCls: iconPrefixCls,
|
|
84393
|
+
instance: instance
|
|
84394
|
+
});
|
|
84395
|
+
});
|
|
84396
|
+
return;
|
|
84397
|
+
}
|
|
84398
|
+
|
|
84399
|
+
var notificationClass = classnames("".concat(prefixCls, "-").concat(placement), _defineProperty({}, "".concat(prefixCls, "-rtl"), rtl === true));
|
|
84400
|
+
notificationInstance[cacheKey] = new Promise(function (resolve) {
|
|
84401
|
+
Notification.newInstance({
|
|
84402
|
+
prefixCls: prefixCls,
|
|
84403
|
+
className: notificationClass,
|
|
84404
|
+
style: getPlacementStyle(placement, top, bottom),
|
|
84405
|
+
getContainer: getContainer,
|
|
84406
|
+
maxCount: maxCount
|
|
84407
|
+
}, function (notification) {
|
|
84408
|
+
resolve(notification);
|
|
84409
|
+
callback({
|
|
84410
|
+
prefixCls: "".concat(prefixCls, "-notice"),
|
|
84411
|
+
iconPrefixCls: iconPrefixCls,
|
|
84412
|
+
instance: notification
|
|
84413
|
+
});
|
|
84414
|
+
});
|
|
84415
|
+
});
|
|
84416
|
+
}
|
|
84417
|
+
|
|
84418
|
+
var typeToIcon = {
|
|
84419
|
+
success: CheckCircleOutlined$2,
|
|
84420
|
+
info: InfoCircleOutlined$2,
|
|
84421
|
+
error: CloseCircleOutlined$2,
|
|
84422
|
+
warning: ExclamationCircleOutlined$2
|
|
84423
|
+
};
|
|
84424
|
+
|
|
84425
|
+
function getRCNoticeProps(args, prefixCls, iconPrefixCls) {
|
|
84426
|
+
var durationArg = args.duration,
|
|
84427
|
+
icon = args.icon,
|
|
84428
|
+
type = args.type,
|
|
84429
|
+
description = args.description,
|
|
84430
|
+
message = args.message,
|
|
84431
|
+
btn = args.btn,
|
|
84432
|
+
onClose = args.onClose,
|
|
84433
|
+
onClick = args.onClick,
|
|
84434
|
+
key = args.key,
|
|
84435
|
+
style = args.style,
|
|
84436
|
+
className = args.className,
|
|
84437
|
+
_args$closeIcon = args.closeIcon,
|
|
84438
|
+
closeIcon = _args$closeIcon === void 0 ? defaultCloseIcon : _args$closeIcon,
|
|
84439
|
+
_args$progress = args.progress,
|
|
84440
|
+
progress = _args$progress === void 0 ? true : _args$progress;
|
|
84441
|
+
var duration = durationArg === undefined ? defaultDuration : durationArg;
|
|
84442
|
+
var iconNode = null;
|
|
84443
|
+
|
|
84444
|
+
if (icon) {
|
|
84445
|
+
iconNode = /*#__PURE__*/React.createElement("span", {
|
|
84446
|
+
className: "".concat(prefixCls, "-icon")
|
|
84447
|
+
}, args.icon);
|
|
84448
|
+
} else if (type) {
|
|
84449
|
+
iconNode = /*#__PURE__*/React.createElement(typeToIcon[type] || null, {
|
|
84450
|
+
className: "".concat(prefixCls, "-icon ").concat(prefixCls, "-icon-").concat(type)
|
|
84451
|
+
});
|
|
84452
|
+
}
|
|
84453
|
+
|
|
84454
|
+
var closeIconToRender = /*#__PURE__*/React.createElement("span", {
|
|
84455
|
+
className: "".concat(prefixCls, "-close-x")
|
|
84456
|
+
}, closeIcon || /*#__PURE__*/React.createElement(CloseOutlined$2, {
|
|
84457
|
+
className: "".concat(prefixCls, "-close-icon")
|
|
84458
|
+
}));
|
|
84459
|
+
var autoMarginTag = !description && iconNode ? /*#__PURE__*/React.createElement("span", {
|
|
84460
|
+
className: "".concat(prefixCls, "-message-single-line-auto-margin")
|
|
84461
|
+
}) : null;
|
|
84462
|
+
return {
|
|
84463
|
+
content: /*#__PURE__*/React.createElement(_ConfigProvider__default['default'], {
|
|
84464
|
+
iconPrefixCls: iconPrefixCls
|
|
84465
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
84466
|
+
className: iconNode ? "".concat(prefixCls, "-with-icon") : '',
|
|
84467
|
+
role: "alert"
|
|
84468
|
+
}, iconNode, /*#__PURE__*/React.createElement("div", {
|
|
84469
|
+
className: "".concat(prefixCls, "-message")
|
|
84470
|
+
}, autoMarginTag, message), /*#__PURE__*/React.createElement("div", {
|
|
84471
|
+
className: "".concat(prefixCls, "-description")
|
|
84472
|
+
}, description), btn ? /*#__PURE__*/React.createElement("span", {
|
|
84473
|
+
className: "".concat(prefixCls, "-btn")
|
|
84474
|
+
}, btn) : null, progress && duration > 0 && /*#__PURE__*/React.createElement("div", {
|
|
84475
|
+
className: 'message_progress',
|
|
84476
|
+
style: {
|
|
84477
|
+
animationDuration: "".concat(duration, "s")
|
|
84478
|
+
}
|
|
84479
|
+
}))),
|
|
84480
|
+
duration: duration,
|
|
84481
|
+
closable: true,
|
|
84482
|
+
closeIcon: closeIconToRender,
|
|
84483
|
+
onClose: onClose,
|
|
84484
|
+
onClick: onClick,
|
|
84485
|
+
key: key,
|
|
84486
|
+
style: style || {},
|
|
84487
|
+
className: classnames(className, _defineProperty({}, "".concat(prefixCls, "-").concat(type), !!type), 'lm_notification')
|
|
84488
|
+
};
|
|
84489
|
+
}
|
|
84490
|
+
|
|
84491
|
+
function notice(args) {
|
|
84492
|
+
getNotificationInstance(args, function (_ref) {
|
|
84493
|
+
var prefixCls = _ref.prefixCls,
|
|
84494
|
+
iconPrefixCls = _ref.iconPrefixCls,
|
|
84495
|
+
instance = _ref.instance;
|
|
84496
|
+
instance.notice(getRCNoticeProps(args, prefixCls, iconPrefixCls));
|
|
84497
|
+
});
|
|
84498
|
+
}
|
|
84499
|
+
|
|
84500
|
+
var api = {
|
|
84501
|
+
open: notice,
|
|
84502
|
+
close: function close(key) {
|
|
84503
|
+
Object.keys(notificationInstance).forEach(function (cacheKey) {
|
|
84504
|
+
return Promise.resolve(notificationInstance[cacheKey]).then(function (instance) {
|
|
84505
|
+
instance.removeNotice(key);
|
|
84506
|
+
});
|
|
84507
|
+
});
|
|
84508
|
+
},
|
|
84509
|
+
config: setNotificationConfig,
|
|
84510
|
+
destroy: function destroy() {
|
|
84511
|
+
Object.keys(notificationInstance).forEach(function (cacheKey) {
|
|
84512
|
+
Promise.resolve(notificationInstance[cacheKey]).then(function (instance) {
|
|
84513
|
+
instance.destroy();
|
|
84514
|
+
});
|
|
84515
|
+
delete notificationInstance[cacheKey]; // lgtm[js/missing-await]
|
|
84516
|
+
});
|
|
84517
|
+
}
|
|
84518
|
+
};
|
|
84519
|
+
['success', 'info', 'warning', 'error'].forEach(function (type) {
|
|
84520
|
+
api[type] = function (args) {
|
|
84521
|
+
return api.open(_objectSpread(_objectSpread({}, args), {}, {
|
|
84522
|
+
type: type
|
|
84523
|
+
}));
|
|
84524
|
+
};
|
|
84525
|
+
});
|
|
84526
|
+
api.warn = api.warning;
|
|
84527
|
+
api.useNotification = createUseNotification(getNotificationInstance, getRCNoticeProps);
|
|
84528
|
+
api.antdNotification = _notification__default['default'];
|
|
84529
|
+
|
|
84530
|
+
var _excluded$19 = ["visible", "wrapClassName", "onClose", "children"];
|
|
84531
|
+
|
|
84532
|
+
var Index$j = function Index(props) {
|
|
84533
|
+
var visible = props.visible,
|
|
84534
|
+
wrapClassName = props.wrapClassName,
|
|
84535
|
+
onClose = props.onClose,
|
|
84536
|
+
children = props.children,
|
|
84537
|
+
reset = _objectWithoutProperties(props, _excluded$19);
|
|
84538
|
+
|
|
84539
|
+
var handleClose = function handleClose() {
|
|
84540
|
+
onClose();
|
|
84541
|
+
};
|
|
84542
|
+
|
|
84543
|
+
var onSave = function onSave() {
|
|
84544
|
+
handleClose();
|
|
84545
|
+
};
|
|
84546
|
+
|
|
84547
|
+
var config = {
|
|
84548
|
+
title: '新增',
|
|
84549
|
+
width: 480,
|
|
84550
|
+
visible: visible,
|
|
84551
|
+
onOk: handleClose,
|
|
84552
|
+
onCancel: handleClose,
|
|
84553
|
+
wrapClassName: wrapClassName ? "".concat(wrapClassName, " lm_addModal") : 'lm_addModal',
|
|
84554
|
+
okButtonProps: {
|
|
84555
|
+
size: 'default'
|
|
84556
|
+
},
|
|
84557
|
+
cancelButtonProps: {
|
|
84558
|
+
size: 'default'
|
|
84559
|
+
},
|
|
84560
|
+
footer: [/*#__PURE__*/React__default['default'].createElement(_Button__default['default'], {
|
|
84561
|
+
size: "large",
|
|
84562
|
+
type: "primary",
|
|
84563
|
+
key: "back",
|
|
84564
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SaveOutlined$2, null),
|
|
84565
|
+
onClick: onSave
|
|
84566
|
+
}, "\u4FDD\u5B58")]
|
|
84567
|
+
};
|
|
84568
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(_Modal__default['default'], _extends({}, config, reset), children));
|
|
84569
|
+
};
|
|
84570
|
+
|
|
84571
|
+
var _excluded$1a = ["type"];
|
|
84572
|
+
/*
|
|
84573
|
+
增加参数:
|
|
84574
|
+
type: 指定图片类型
|
|
84575
|
+
*/
|
|
84576
|
+
|
|
84577
|
+
var Confirm = function Confirm(_ref) {
|
|
84578
|
+
var type = _ref.type,
|
|
84579
|
+
resetProps = _objectWithoutProperties(_ref, _excluded$1a);
|
|
84580
|
+
|
|
84581
|
+
var Icon = function Icon() {
|
|
84582
|
+
switch (type) {
|
|
84583
|
+
case 'success':
|
|
84584
|
+
return /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
84585
|
+
type: "lmweb-check-circle",
|
|
84586
|
+
style: {
|
|
84587
|
+
color: '#56C22D'
|
|
84588
|
+
}
|
|
84589
|
+
});
|
|
84590
|
+
|
|
84591
|
+
case 'error':
|
|
84592
|
+
return /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
84593
|
+
type: "lmweb-close-circle",
|
|
84594
|
+
style: {
|
|
84595
|
+
color: '#FA4F53'
|
|
84596
|
+
}
|
|
84597
|
+
});
|
|
84598
|
+
|
|
84599
|
+
case 'warning':
|
|
84600
|
+
return /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
84601
|
+
type: "lmweb-info-circle",
|
|
84602
|
+
style: {
|
|
84603
|
+
color: '#FD9727'
|
|
84604
|
+
}
|
|
84605
|
+
});
|
|
84606
|
+
|
|
84607
|
+
case 'info':
|
|
84608
|
+
return /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
84609
|
+
type: "lmweb-info-circle",
|
|
84610
|
+
style: {
|
|
84611
|
+
color: '#1890fc'
|
|
84612
|
+
}
|
|
84613
|
+
});
|
|
84614
|
+
|
|
84615
|
+
default:
|
|
84616
|
+
return /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
84617
|
+
type: "lmweb-info-circle",
|
|
84618
|
+
style: {
|
|
84619
|
+
color: '#FD9727'
|
|
84620
|
+
}
|
|
84621
|
+
});
|
|
84622
|
+
}
|
|
84623
|
+
};
|
|
84624
|
+
|
|
84625
|
+
return _Modal__default['default'].confirm(_objectSpread({
|
|
84626
|
+
title: 'Confirm',
|
|
84627
|
+
icon: Icon(),
|
|
84628
|
+
content: 'Bla bla ...',
|
|
84629
|
+
okText: '确认',
|
|
84630
|
+
cancelText: '取消',
|
|
84631
|
+
wrapClassName: 'lm_modal_confirm',
|
|
84632
|
+
closable: true
|
|
84633
|
+
}, resetProps));
|
|
84634
|
+
};
|
|
84635
|
+
|
|
84636
|
+
var _excluded$1b = ["visible", "wrapClassName", "children"];
|
|
84637
|
+
|
|
84638
|
+
var Index$k = function Index(props) {
|
|
84639
|
+
var visible = props.visible,
|
|
84640
|
+
wrapClassName = props.wrapClassName,
|
|
84641
|
+
children = props.children,
|
|
84642
|
+
reset = _objectWithoutProperties(props, _excluded$1b);
|
|
84643
|
+
|
|
84644
|
+
var config = {
|
|
84645
|
+
title: '编辑',
|
|
84646
|
+
width: 480,
|
|
84647
|
+
visible: visible,
|
|
84648
|
+
centered: true,
|
|
84649
|
+
wrapClassName: wrapClassName ? "".concat(wrapClassName, " lm_editModal") : 'lm_editModal',
|
|
84650
|
+
okButtonProps: {
|
|
84651
|
+
size: 'default'
|
|
84652
|
+
},
|
|
84653
|
+
cancelButtonProps: {
|
|
84654
|
+
size: 'default'
|
|
84655
|
+
}
|
|
84656
|
+
};
|
|
84657
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(_Modal__default['default'], _extends({}, config, reset), children));
|
|
84658
|
+
};
|
|
84659
|
+
|
|
84660
|
+
var _excluded$1c = ["visible", "onClose", "onSure", "down", "desc", "downEvent", "isType", "renderFileType"];
|
|
84661
|
+
var downLink = [{
|
|
84662
|
+
id: '1',
|
|
84663
|
+
label: '成衣',
|
|
84664
|
+
value: 'link',
|
|
84665
|
+
icon: 'export'
|
|
84666
|
+
}, {
|
|
84667
|
+
id: '2',
|
|
84668
|
+
label: '面料',
|
|
84669
|
+
value: 'link',
|
|
84670
|
+
icon: 'export'
|
|
84671
|
+
}, {
|
|
84672
|
+
id: '3',
|
|
84673
|
+
label: '辅料',
|
|
84674
|
+
value: 'link',
|
|
84675
|
+
icon: 'export'
|
|
84676
|
+
}];
|
|
84677
|
+
var desc1 = [{
|
|
84678
|
+
id: '1',
|
|
84679
|
+
value: '红色为必填字段'
|
|
84680
|
+
}, {
|
|
84681
|
+
id: '2',
|
|
84682
|
+
value: '导入仅允许新增供应商信息'
|
|
84683
|
+
}];
|
|
84684
|
+
/*
|
|
84685
|
+
文件上传区域
|
|
84686
|
+
multiple:是否多选
|
|
84687
|
+
accept:文件选择时的默认类型筛选:"image/jpeg"、text/csv、application/msword、application/vnd.ms-excel => accept=".xlsx, .xls"
|
|
84688
|
+
type: 限制上传文件的类型
|
|
84689
|
+
size:文件大小(M)
|
|
84690
|
+
*/
|
|
84691
|
+
|
|
84692
|
+
var ImportBox = function ImportBox(_ref) {
|
|
84693
|
+
var value = _ref.value,
|
|
84694
|
+
multiple = _ref.multiple,
|
|
84695
|
+
_ref$fileLength = _ref.fileLength,
|
|
84696
|
+
fileLength = _ref$fileLength === void 0 ? 99 : _ref$fileLength,
|
|
84697
|
+
onChange = _ref.onChange,
|
|
84698
|
+
accept = _ref.accept,
|
|
84699
|
+
_ref$type = _ref.type,
|
|
84700
|
+
type = _ref$type === void 0 ? ['xls', 'xlsx'] : _ref$type,
|
|
84701
|
+
_ref$size = _ref.size,
|
|
84702
|
+
size = _ref$size === void 0 ? 100 : _ref$size;
|
|
84703
|
+
var fileRef = React.useRef(null); // 文件保存
|
|
84704
|
+
// 解决同文件的多次上传问题
|
|
84705
|
+
|
|
84706
|
+
var clearFileValue = function clearFileValue() {
|
|
84707
|
+
fileRef.current.value = null;
|
|
84708
|
+
};
|
|
84709
|
+
|
|
84710
|
+
var fileUpload = function fileUpload(e) {
|
|
84711
|
+
var file = e.target.files;
|
|
84712
|
+
|
|
84713
|
+
if (fileLength > 0 && file.length + value.length > fileLength) {
|
|
84714
|
+
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);
|
|
84715
|
+
} // 循环文件检查是否存在不符合要求的文件
|
|
84716
|
+
|
|
84717
|
+
|
|
84718
|
+
for (var i = 0, len = file.length; i < len; i += 1) {
|
|
84719
|
+
var item = file[i];
|
|
84720
|
+
|
|
84721
|
+
if (!type.includes(item.name.replace(/.*\./, '').toLowerCase())) {
|
|
84722
|
+
var content = type.join('、');
|
|
84723
|
+
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);
|
|
84724
|
+
}
|
|
84725
|
+
|
|
84726
|
+
if (item.size / 1024 / 1024 > size) {
|
|
84727
|
+
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);
|
|
84728
|
+
}
|
|
84729
|
+
}
|
|
84730
|
+
|
|
84731
|
+
var nValue = [].concat(_toConsumableArray(value), _toConsumableArray(file));
|
|
84732
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(nValue, 'files');
|
|
84733
|
+
return false;
|
|
84734
|
+
};
|
|
84735
|
+
|
|
84736
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84737
|
+
className: "import_box"
|
|
84738
|
+
}, /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
84739
|
+
type: "lmweb-inbox",
|
|
84740
|
+
className: "import_icon"
|
|
84741
|
+
}), /*#__PURE__*/React__default['default'].createElement("input", {
|
|
84742
|
+
ref: fileRef,
|
|
84743
|
+
type: "file",
|
|
84744
|
+
multiple: multiple,
|
|
84745
|
+
accept: accept,
|
|
84746
|
+
className: "import_input",
|
|
84747
|
+
onClick: clearFileValue,
|
|
84748
|
+
onChange: fileUpload
|
|
84749
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
84750
|
+
className: "import_text"
|
|
84751
|
+
}, "\u70B9\u51FB\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u8FD9\u91CC\u4E0A\u4F20")));
|
|
84752
|
+
};
|
|
84753
|
+
|
|
84754
|
+
var Index$l = function Index(_ref2) {
|
|
84755
|
+
var visible = _ref2.visible,
|
|
84756
|
+
onClose = _ref2.onClose,
|
|
84757
|
+
onSure = _ref2.onSure,
|
|
84758
|
+
_ref2$down = _ref2.down,
|
|
84759
|
+
down = _ref2$down === void 0 ? downLink : _ref2$down,
|
|
84760
|
+
_ref2$desc = _ref2.desc,
|
|
84761
|
+
desc = _ref2$desc === void 0 ? desc1 : _ref2$desc,
|
|
84762
|
+
downEvent = _ref2.downEvent,
|
|
84763
|
+
isType = _ref2.isType,
|
|
84764
|
+
renderFileType = _ref2.renderFileType,
|
|
84765
|
+
resetProps = _objectWithoutProperties(_ref2, _excluded$1c);
|
|
84766
|
+
|
|
84767
|
+
var _useState = React.useState({
|
|
84768
|
+
files: []
|
|
84769
|
+
}),
|
|
84770
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
84771
|
+
fileValue = _useState2[0],
|
|
84772
|
+
setFileValue = _useState2[1]; // 数据改变事件
|
|
84773
|
+
|
|
84774
|
+
|
|
84775
|
+
var handleChange = function handleChange(e, field) {
|
|
84776
|
+
setFileValue(_objectSpread(_objectSpread({}, fileValue), {}, _defineProperty({}, field, e)));
|
|
84777
|
+
}; // 确定事件
|
|
84778
|
+
|
|
84779
|
+
|
|
84780
|
+
var handleClick = function handleClick() {
|
|
84781
|
+
var files = fileValue.files;
|
|
84782
|
+
|
|
84783
|
+
if (!files.length) {
|
|
84784
|
+
return _message__default['default'].warning('请先选择文件!', 1.5);
|
|
84785
|
+
}
|
|
84786
|
+
|
|
84787
|
+
onSure(fileValue);
|
|
84788
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
84789
|
+
setFileValue(_objectSpread(_objectSpread({}, fileValue), {}, {
|
|
84790
|
+
files: []
|
|
84791
|
+
}));
|
|
84792
|
+
return false;
|
|
84793
|
+
}; // 删除事件
|
|
84794
|
+
|
|
84795
|
+
|
|
84796
|
+
var handleDelete = function handleDelete(name) {
|
|
84797
|
+
var nValue = fileValue.files.filter(function (v) {
|
|
84798
|
+
return v.name !== name;
|
|
84799
|
+
});
|
|
84800
|
+
setFileValue(_objectSpread(_objectSpread({}, fileValue), {}, {
|
|
84801
|
+
files: nValue
|
|
84802
|
+
}));
|
|
84803
|
+
}; // 关闭弹框
|
|
84804
|
+
|
|
84805
|
+
|
|
84806
|
+
var handleClose = function handleClose() {
|
|
84807
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
84808
|
+
setFileValue({
|
|
84809
|
+
type: 1,
|
|
84810
|
+
files: []
|
|
84811
|
+
});
|
|
84812
|
+
};
|
|
84813
|
+
|
|
84814
|
+
var config = {
|
|
84815
|
+
title: '导入',
|
|
84816
|
+
visible: visible,
|
|
84817
|
+
onCancel: onClose,
|
|
84818
|
+
bodyStyle: {
|
|
84819
|
+
padding: 24
|
|
84820
|
+
},
|
|
84821
|
+
footer: [/*#__PURE__*/React__default['default'].createElement(_Button__default['default'], {
|
|
84822
|
+
key: "cancel",
|
|
82287
84823
|
onClick: handleClose,
|
|
82288
84824
|
size: "middle"
|
|
82289
84825
|
}, "\u53D6\u6D88"), /*#__PURE__*/React__default['default'].createElement(_Button__default['default'], {
|
|
@@ -82380,13 +84916,13 @@
|
|
|
82380
84916
|
Modal.ExportModal = Index$l;
|
|
82381
84917
|
Modal.Confirm = Confirm;
|
|
82382
84918
|
|
|
82383
|
-
var _excluded$
|
|
84919
|
+
var _excluded$1d = ["children", "className"];
|
|
82384
84920
|
var prefixCls$6 = 'lm_pagination';
|
|
82385
84921
|
|
|
82386
84922
|
var LMPagination = function LMPagination(props) {
|
|
82387
84923
|
var children = props.children,
|
|
82388
84924
|
className = props.className,
|
|
82389
|
-
others = _objectWithoutProperties(props, _excluded$
|
|
84925
|
+
others = _objectWithoutProperties(props, _excluded$1d);
|
|
82390
84926
|
|
|
82391
84927
|
return /*#__PURE__*/React__default['default'].createElement(_Pagination__default['default'], _objectSpread(_objectSpread({
|
|
82392
84928
|
className: classnames(className, prefixCls$6),
|
|
@@ -82400,7 +84936,7 @@
|
|
|
82400
84936
|
}));
|
|
82401
84937
|
};
|
|
82402
84938
|
|
|
82403
|
-
var _excluded$
|
|
84939
|
+
var _excluded$1e = ["columns", "dataSource", "total", "onClick", "onDoubleClick", "rowSelection", "rowKey", "scroll", "defaultActive", "onChange"];
|
|
82404
84940
|
|
|
82405
84941
|
/*
|
|
82406
84942
|
接收参数:
|
|
@@ -82420,7 +84956,7 @@
|
|
|
82420
84956
|
scroll = props.scroll,
|
|
82421
84957
|
defaultActive = props.defaultActive,
|
|
82422
84958
|
onChange = props.onChange,
|
|
82423
|
-
resetProps = _objectWithoutProperties(props, _excluded$
|
|
84959
|
+
resetProps = _objectWithoutProperties(props, _excluded$1e); // 行单击选中,增加高亮
|
|
82424
84960
|
|
|
82425
84961
|
|
|
82426
84962
|
var _useState = React.useState(defaultActive),
|
|
@@ -82487,7 +85023,7 @@
|
|
|
82487
85023
|
}));
|
|
82488
85024
|
});
|
|
82489
85025
|
|
|
82490
|
-
var _excluded$
|
|
85026
|
+
var _excluded$1f = ["columns", "data", "total", "rowSelection", "onChange", "getCheckboxRecords"];
|
|
82491
85027
|
|
|
82492
85028
|
var Demo = function Demo(props) {
|
|
82493
85029
|
var inputRef = React__default['default'].useRef();
|
|
@@ -82505,7 +85041,7 @@
|
|
|
82505
85041
|
rowSelection = _props$rowSelection === void 0 ? true : _props$rowSelection,
|
|
82506
85042
|
onChange = props.onChange,
|
|
82507
85043
|
getCheckboxRecords = props.getCheckboxRecords,
|
|
82508
|
-
resetProps = _objectWithoutProperties(props, _excluded$
|
|
85044
|
+
resetProps = _objectWithoutProperties(props, _excluded$1f);
|
|
82509
85045
|
|
|
82510
85046
|
var _useState3 = React.useState('base'),
|
|
82511
85047
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
@@ -82601,8 +85137,8 @@
|
|
|
82601
85137
|
|
|
82602
85138
|
var Context$5 = /*#__PURE__*/React.createContext();
|
|
82603
85139
|
|
|
82604
|
-
var _excluded$
|
|
82605
|
-
_excluded2$
|
|
85140
|
+
var _excluded$1g = ["width", "onResize", "children"],
|
|
85141
|
+
_excluded2$k = ["children"],
|
|
82606
85142
|
_excluded3$6 = ["children", "style"],
|
|
82607
85143
|
_excluded4$2 = ["children"],
|
|
82608
85144
|
_excluded5$1 = ["style", "children"],
|
|
@@ -82717,7 +85253,7 @@
|
|
|
82717
85253
|
var width = props.width,
|
|
82718
85254
|
onResize = props.onResize,
|
|
82719
85255
|
children = props.children,
|
|
82720
|
-
restProps = _objectWithoutProperties(props, _excluded$
|
|
85256
|
+
restProps = _objectWithoutProperties(props, _excluded$1g);
|
|
82721
85257
|
|
|
82722
85258
|
var _useState3 = React.useState(width || 0),
|
|
82723
85259
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
@@ -82769,7 +85305,7 @@
|
|
|
82769
85305
|
|
|
82770
85306
|
var VCell = function VCell(props) {
|
|
82771
85307
|
var children = props.children,
|
|
82772
|
-
restProps = _objectWithoutProperties(props, _excluded2$
|
|
85308
|
+
restProps = _objectWithoutProperties(props, _excluded2$k);
|
|
82773
85309
|
|
|
82774
85310
|
return /*#__PURE__*/React__default['default'].createElement("td", restProps, children);
|
|
82775
85311
|
};
|
|
@@ -83179,7 +85715,7 @@
|
|
|
83179
85715
|
editConfig: editConfig$1
|
|
83180
85716
|
};
|
|
83181
85717
|
|
|
83182
|
-
var _excluded$
|
|
85718
|
+
var _excluded$1h = ["dataSource", "autoSize", "columns", "rowClick", "onDoubleClick", "checkConfig", "summary", "pagination", "hiddenPage", "loading", "virtual", "customCheck"];
|
|
83183
85719
|
var Summary$1 = ProviderWarp.Summary;
|
|
83184
85720
|
var ResetTable$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
83185
85721
|
var dataSource = props.dataSource,
|
|
@@ -83195,7 +85731,7 @@
|
|
|
83195
85731
|
_props$virtual = props.virtual,
|
|
83196
85732
|
virtual = _props$virtual === void 0 ? true : _props$virtual,
|
|
83197
85733
|
customCheck = props.customCheck,
|
|
83198
|
-
resetProps = _objectWithoutProperties(props, _excluded$
|
|
85734
|
+
resetProps = _objectWithoutProperties(props, _excluded$1h);
|
|
83199
85735
|
|
|
83200
85736
|
var _resetProps$rowKey = resetProps.rowKey,
|
|
83201
85737
|
rowKey = _resetProps$rowKey === void 0 ? 'id' : _resetProps$rowKey;
|
|
@@ -83479,7 +86015,7 @@
|
|
|
83479
86015
|
|
|
83480
86016
|
var Context$6 = /*#__PURE__*/React.createContext();
|
|
83481
86017
|
|
|
83482
|
-
var _excluded$
|
|
86018
|
+
var _excluded$1i = ["desc"];
|
|
83483
86019
|
var Paragraph$2 = _Typography__default['default'].Paragraph;
|
|
83484
86020
|
|
|
83485
86021
|
var Access$1 = function Access(props) {
|
|
@@ -83509,7 +86045,7 @@
|
|
|
83509
86045
|
|
|
83510
86046
|
var defaultConfig = React.useMemo(function () {
|
|
83511
86047
|
var desc = config.desc,
|
|
83512
|
-
resetConfig = _objectWithoutProperties(config, _excluded$
|
|
86048
|
+
resetConfig = _objectWithoutProperties(config, _excluded$1i);
|
|
83513
86049
|
|
|
83514
86050
|
return _objectSpread({
|
|
83515
86051
|
title: 'title',
|
|
@@ -83885,7 +86421,7 @@
|
|
|
83885
86421
|
}, config));
|
|
83886
86422
|
};
|
|
83887
86423
|
|
|
83888
|
-
var _excluded$
|
|
86424
|
+
var _excluded$1j = ["style", "defaultPage"];
|
|
83889
86425
|
var initialState$4 = {
|
|
83890
86426
|
// 选中的数据
|
|
83891
86427
|
checkList: [],
|
|
@@ -83926,7 +86462,7 @@
|
|
|
83926
86462
|
var ImgTable$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
83927
86463
|
var style = props.style,
|
|
83928
86464
|
defaultPage = props.defaultPage,
|
|
83929
|
-
resetProps = _objectWithoutProperties(props, _excluded$
|
|
86465
|
+
resetProps = _objectWithoutProperties(props, _excluded$1j);
|
|
83930
86466
|
|
|
83931
86467
|
var _useReducer = React.useReducer(reducer$5, initialState$4),
|
|
83932
86468
|
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
@@ -83969,12 +86505,12 @@
|
|
|
83969
86505
|
ResizeSize$2.ImgTable = ImgTable$1;
|
|
83970
86506
|
ResizeSize$2.Summary = Summary$1;
|
|
83971
86507
|
|
|
83972
|
-
var _excluded$
|
|
83973
|
-
_excluded2$
|
|
86508
|
+
var _excluded$1k = ["children"],
|
|
86509
|
+
_excluded2$l = ["children", "size", "buttonStyle", "direction", "className"];
|
|
83974
86510
|
|
|
83975
86511
|
var LMRadio = function LMRadio(props) {
|
|
83976
86512
|
var children = props.children,
|
|
83977
|
-
restProps = _objectWithoutProperties(props, _excluded$
|
|
86513
|
+
restProps = _objectWithoutProperties(props, _excluded$1k);
|
|
83978
86514
|
|
|
83979
86515
|
return /*#__PURE__*/React__default['default'].createElement(_Radio__default['default'], _extends({
|
|
83980
86516
|
className: "lm-radio"
|
|
@@ -83989,7 +86525,7 @@
|
|
|
83989
86525
|
_props$direction = props.direction,
|
|
83990
86526
|
direction = _props$direction === void 0 ? 'row' : _props$direction,
|
|
83991
86527
|
className = props.className,
|
|
83992
|
-
restProps = _objectWithoutProperties(props, _excluded2$
|
|
86528
|
+
restProps = _objectWithoutProperties(props, _excluded2$l);
|
|
83993
86529
|
|
|
83994
86530
|
return /*#__PURE__*/React__default['default'].createElement(_Radio__default['default'].Group, _extends({
|
|
83995
86531
|
className: classnames(className, 'lm-radio-group', "lm-radio-group-".concat(direction)),
|
|
@@ -83999,7 +86535,7 @@
|
|
|
83999
86535
|
|
|
84000
86536
|
LMRadio.Button = _Radio__default['default'].Button;
|
|
84001
86537
|
|
|
84002
|
-
var _excluded$
|
|
86538
|
+
var _excluded$1l = ["children", "className", "size", "dropdownClassName"];
|
|
84003
86539
|
var prefixCls$7 = 'lm_select';
|
|
84004
86540
|
var CLMSelect$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
84005
86541
|
var children = props.children,
|
|
@@ -84007,7 +86543,7 @@
|
|
|
84007
86543
|
_props$size = props.size,
|
|
84008
86544
|
size = _props$size === void 0 ? 'middle' : _props$size,
|
|
84009
86545
|
dropdownClassName = props.dropdownClassName,
|
|
84010
|
-
others = _objectWithoutProperties(props, _excluded$
|
|
86546
|
+
others = _objectWithoutProperties(props, _excluded$1l);
|
|
84011
86547
|
|
|
84012
86548
|
return /*#__PURE__*/React__default['default'].createElement(_Select__default['default'], _objectSpread(_objectSpread({
|
|
84013
86549
|
className: classnames(className, prefixCls$7),
|
|
@@ -84021,11 +86557,11 @@
|
|
|
84021
86557
|
LMSelect$1.Option = _Select__default['default'].Option;
|
|
84022
86558
|
LMSelect$1.OptGroup = _Select__default['default'].OptGroup;
|
|
84023
86559
|
|
|
84024
|
-
var _excluded$
|
|
86560
|
+
var _excluded$1m = ["className"];
|
|
84025
86561
|
var prefixCls$8 = 'lm_tree';
|
|
84026
86562
|
var LmTree = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
84027
86563
|
var className = props.className,
|
|
84028
|
-
rest = _objectWithoutProperties(props, _excluded$
|
|
86564
|
+
rest = _objectWithoutProperties(props, _excluded$1m);
|
|
84029
86565
|
|
|
84030
86566
|
return /*#__PURE__*/React__default['default'].createElement(_Tree__default['default'], _objectSpread(_objectSpread({
|
|
84031
86567
|
ref: ref
|
|
@@ -84036,13 +86572,84 @@
|
|
|
84036
86572
|
LmTree.TreeNode = _Tree__default['default'].TreeNode;
|
|
84037
86573
|
LmTree.DirectoryTree = _Tree__default['default'].DirectoryTree;
|
|
84038
86574
|
|
|
84039
|
-
var
|
|
86575
|
+
var removeHash = function removeHash(hex) {
|
|
86576
|
+
return hex.charAt(0) === '#' ? hex.slice(1) : hex;
|
|
86577
|
+
};
|
|
86578
|
+
|
|
86579
|
+
var parseHex = function parseHex(nakedHex) {
|
|
86580
|
+
var isShort = nakedHex.length === 3 || nakedHex.length === 4;
|
|
86581
|
+
var twoDigitHexR = isShort ? "".concat(nakedHex.slice(0, 1)).concat(nakedHex.slice(0, 1)) : nakedHex.slice(0, 2);
|
|
86582
|
+
var twoDigitHexG = isShort ? "".concat(nakedHex.slice(1, 2)).concat(nakedHex.slice(1, 2)) : nakedHex.slice(2, 4);
|
|
86583
|
+
var twoDigitHexB = isShort ? "".concat(nakedHex.slice(2, 3)).concat(nakedHex.slice(2, 3)) : nakedHex.slice(4, 6);
|
|
86584
|
+
var twoDigitHexA = (isShort ? "".concat(nakedHex.slice(3, 4)).concat(nakedHex.slice(3, 4)) : nakedHex.slice(6, 8)) || 'ff'; // const numericA = +((parseInt(a, 16) / 255).toFixed(2));
|
|
86585
|
+
|
|
86586
|
+
return {
|
|
86587
|
+
r: twoDigitHexR,
|
|
86588
|
+
g: twoDigitHexG,
|
|
86589
|
+
b: twoDigitHexB,
|
|
86590
|
+
a: twoDigitHexA
|
|
86591
|
+
};
|
|
86592
|
+
};
|
|
86593
|
+
|
|
86594
|
+
var hexToDecimal = function hexToDecimal(hex) {
|
|
86595
|
+
return parseInt(hex, 16);
|
|
86596
|
+
};
|
|
86597
|
+
|
|
86598
|
+
var hexesToDecimals = function hexesToDecimals(_ref) {
|
|
86599
|
+
var r = _ref.r,
|
|
86600
|
+
g = _ref.g,
|
|
86601
|
+
b = _ref.b,
|
|
86602
|
+
a = _ref.a;
|
|
86603
|
+
return {
|
|
86604
|
+
r: hexToDecimal(r),
|
|
86605
|
+
g: hexToDecimal(g),
|
|
86606
|
+
b: hexToDecimal(b),
|
|
86607
|
+
a: +(hexToDecimal(a) / 255).toFixed(2)
|
|
86608
|
+
};
|
|
86609
|
+
};
|
|
86610
|
+
|
|
86611
|
+
var isNumeric = function isNumeric(n) {
|
|
86612
|
+
return !isNaN(parseFloat(n)) && isFinite(n);
|
|
86613
|
+
}; // eslint-disable-line no-restricted-globals, max-len
|
|
86614
|
+
|
|
86615
|
+
|
|
86616
|
+
var formatRgb = function formatRgb(decimalObject, parameterA) {
|
|
86617
|
+
var r = decimalObject.r,
|
|
86618
|
+
g = decimalObject.g,
|
|
86619
|
+
b = decimalObject.b,
|
|
86620
|
+
parsedA = decimalObject.a;
|
|
86621
|
+
var a = isNumeric(parameterA) ? parameterA : parsedA;
|
|
86622
|
+
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(a, ")");
|
|
86623
|
+
};
|
|
86624
|
+
/**
|
|
86625
|
+
* Turns an old-fashioned css hex color value into a rgb color value.
|
|
86626
|
+
*
|
|
86627
|
+
* If you specify an alpha value, you'll get a rgba() value instead.
|
|
86628
|
+
*
|
|
86629
|
+
* @param The hex value to convert. ('123456'. '#123456', ''123', '#123')
|
|
86630
|
+
* @param An alpha value to apply. (optional) ('0.5', '0.25')
|
|
86631
|
+
* @return An rgb or rgba value. ('rgb(11, 22, 33)'. 'rgba(11, 22, 33, 0.5)')
|
|
86632
|
+
*/
|
|
86633
|
+
|
|
86634
|
+
|
|
86635
|
+
var hexToRgba = function hexToRgba(hex, a) {
|
|
86636
|
+
var hashlessHex = removeHash(hex);
|
|
86637
|
+
var hexObject = parseHex(hashlessHex);
|
|
86638
|
+
var decimalObject = hexesToDecimals(hexObject);
|
|
86639
|
+
return formatRgb(decimalObject, a);
|
|
86640
|
+
};
|
|
86641
|
+
|
|
86642
|
+
var build = hexToRgba;
|
|
86643
|
+
|
|
86644
|
+
var _excluded$1n = ["className", "color"],
|
|
86645
|
+
_excluded2$m = ["className", "color", "checked"];
|
|
86646
|
+
var CheckableTag = _Tag__default['default'].CheckableTag;
|
|
84040
86647
|
var PresetColorTypes = ['pink', 'red', 'yellow', 'orange', 'cyan', 'green', 'blue', 'purple', 'geekblue', 'magenta', 'volcano', 'gold', 'lime', 'theme'];
|
|
84041
86648
|
var prefixCls$9 = 'lm_tag';
|
|
84042
86649
|
var LmTag = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
84043
86650
|
var className = props.className,
|
|
84044
86651
|
color = props.color,
|
|
84045
|
-
rest = _objectWithoutProperties(props, _excluded$
|
|
86652
|
+
rest = _objectWithoutProperties(props, _excluded$1n);
|
|
84046
86653
|
|
|
84047
86654
|
return /*#__PURE__*/React__default['default'].createElement(_Tag__default['default'], _objectSpread(_objectSpread({
|
|
84048
86655
|
ref: ref
|
|
@@ -84053,9 +86660,358 @@
|
|
|
84053
86660
|
}, className, PresetColorTypes.includes(color) && "lm_tag_main_color lm_tag_main_".concat(color))
|
|
84054
86661
|
}));
|
|
84055
86662
|
});
|
|
84056
|
-
|
|
86663
|
+
var checkPreFixCls = 'lm_check_tag';
|
|
86664
|
+
|
|
86665
|
+
LmTag.CheckableTag = function (props) {
|
|
86666
|
+
var className = props.className,
|
|
86667
|
+
color = props.color,
|
|
86668
|
+
checked = props.checked,
|
|
86669
|
+
rest = _objectWithoutProperties(props, _excluded2$m);
|
|
86670
|
+
|
|
86671
|
+
var checkTagRef = React.useRef(null);
|
|
86672
|
+
var colorProps = React.useMemo(function () {
|
|
86673
|
+
if (color) {
|
|
86674
|
+
try {
|
|
86675
|
+
return {
|
|
86676
|
+
style: {
|
|
86677
|
+
color: checked ? '#fff' : build(color),
|
|
86678
|
+
background: checked ? color : build(color, 0.15)
|
|
86679
|
+
},
|
|
86680
|
+
onMouseEnter: function onMouseEnter() {
|
|
86681
|
+
checkTagRef.current.firstChild.style.background = checked ? color : build(color, 0.25);
|
|
86682
|
+
},
|
|
86683
|
+
onMouseLeave: function onMouseLeave() {
|
|
86684
|
+
checkTagRef.current.firstChild.style.background = checked ? color : build(color, 0.15);
|
|
86685
|
+
}
|
|
86686
|
+
};
|
|
86687
|
+
} catch (_unused) {
|
|
86688
|
+
return {
|
|
86689
|
+
style: {
|
|
86690
|
+
color: build(color),
|
|
86691
|
+
background: build(color, 0.15)
|
|
86692
|
+
}
|
|
86693
|
+
};
|
|
86694
|
+
}
|
|
86695
|
+
} else {
|
|
86696
|
+
return {};
|
|
86697
|
+
}
|
|
86698
|
+
}, [color, checked]);
|
|
86699
|
+
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
86700
|
+
ref: checkTagRef
|
|
86701
|
+
}, /*#__PURE__*/React__default['default'].createElement(CheckableTag, _objectSpread(_objectSpread(_objectSpread({}, rest), {}, {
|
|
86702
|
+
checked: checked
|
|
86703
|
+
}, colorProps), {}, {
|
|
86704
|
+
className: classnames(checkPreFixCls, className, color && 'lm_custom_color_tag')
|
|
86705
|
+
})));
|
|
86706
|
+
};
|
|
86707
|
+
|
|
86708
|
+
function createUseMessage(getRcNotificationInstance, getRCNoticeProps) {
|
|
86709
|
+
var useMessage = function useMessage() {
|
|
86710
|
+
// We can only get content by render
|
|
86711
|
+
var getPrefixCls;
|
|
86712
|
+
var getPopupContainer; // We create a proxy to handle delay created instance
|
|
86713
|
+
|
|
86714
|
+
var innerInstance = null;
|
|
86715
|
+
var proxy = {
|
|
86716
|
+
add: function add(noticeProps, holderCallback) {
|
|
86717
|
+
var _innerInstance;
|
|
86718
|
+
|
|
86719
|
+
(_innerInstance = innerInstance) === null || _innerInstance === void 0 ? void 0 : _innerInstance.component.add(noticeProps, holderCallback);
|
|
86720
|
+
}
|
|
86721
|
+
};
|
|
86722
|
+
|
|
86723
|
+
var _useRCNotification = useRCNotification(proxy),
|
|
86724
|
+
_useRCNotification2 = _slicedToArray(_useRCNotification, 2),
|
|
86725
|
+
hookNotify = _useRCNotification2[0],
|
|
86726
|
+
holder = _useRCNotification2[1];
|
|
86727
|
+
|
|
86728
|
+
function notify(args) {
|
|
86729
|
+
var customizePrefixCls = args.prefixCls;
|
|
86730
|
+
var mergedPrefixCls = getPrefixCls('message', customizePrefixCls);
|
|
86731
|
+
var rootPrefixCls = getPrefixCls();
|
|
86732
|
+
var target = args.key || getKeyThenIncreaseKey();
|
|
86733
|
+
var closePromise = new Promise(function (resolve) {
|
|
86734
|
+
var callback = function callback() {
|
|
86735
|
+
if (typeof args.onClose === 'function') {
|
|
86736
|
+
args.onClose();
|
|
86737
|
+
}
|
|
86738
|
+
|
|
86739
|
+
return resolve(true);
|
|
86740
|
+
};
|
|
86741
|
+
|
|
86742
|
+
getRcNotificationInstance(_objectSpread(_objectSpread({}, args), {}, {
|
|
86743
|
+
prefixCls: mergedPrefixCls,
|
|
86744
|
+
rootPrefixCls: rootPrefixCls,
|
|
86745
|
+
getPopupContainer: getPopupContainer
|
|
86746
|
+
}), function (_ref) {
|
|
86747
|
+
var prefixCls = _ref.prefixCls,
|
|
86748
|
+
instance = _ref.instance;
|
|
86749
|
+
innerInstance = instance;
|
|
86750
|
+
hookNotify(getRCNoticeProps(_objectSpread(_objectSpread({}, args), {}, {
|
|
86751
|
+
key: target,
|
|
86752
|
+
onClose: callback
|
|
86753
|
+
}), prefixCls));
|
|
86754
|
+
});
|
|
86755
|
+
});
|
|
86756
|
+
|
|
86757
|
+
var result = function result() {
|
|
86758
|
+
if (innerInstance) {
|
|
86759
|
+
innerInstance.removeNotice(target);
|
|
86760
|
+
}
|
|
86761
|
+
};
|
|
84057
86762
|
|
|
84058
|
-
|
|
86763
|
+
result.then = function (filled, rejected) {
|
|
86764
|
+
return closePromise.then(filled, rejected);
|
|
86765
|
+
};
|
|
86766
|
+
|
|
86767
|
+
result.promise = closePromise;
|
|
86768
|
+
return result;
|
|
86769
|
+
} // Fill functions
|
|
86770
|
+
|
|
86771
|
+
|
|
86772
|
+
var hookApiRef = React.useRef({});
|
|
86773
|
+
hookApiRef.current.open = notify;
|
|
86774
|
+
typeList.forEach(function (type) {
|
|
86775
|
+
return attachTypeApi(hookApiRef.current, type);
|
|
86776
|
+
});
|
|
86777
|
+
return [hookApiRef.current, /*#__PURE__*/React.createElement(_ConfigProvider.ConfigConsumer, {
|
|
86778
|
+
key: "holder"
|
|
86779
|
+
}, function (context) {
|
|
86780
|
+
getPrefixCls = context.getPrefixCls;
|
|
86781
|
+
getPopupContainer = context.getPopupContainer;
|
|
86782
|
+
return holder;
|
|
86783
|
+
})];
|
|
86784
|
+
};
|
|
86785
|
+
|
|
86786
|
+
return useMessage;
|
|
86787
|
+
}
|
|
86788
|
+
|
|
86789
|
+
var messageInstance;
|
|
86790
|
+
var defaultDuration$1 = 3;
|
|
86791
|
+
var defaultTop$1;
|
|
86792
|
+
var key = 1;
|
|
86793
|
+
var localPrefixCls = '';
|
|
86794
|
+
var transitionName = 'move-up';
|
|
86795
|
+
var hasTransitionName = false;
|
|
86796
|
+
var getContainer$1;
|
|
86797
|
+
var maxCount$1;
|
|
86798
|
+
var rtl$1 = false;
|
|
86799
|
+
function getKeyThenIncreaseKey() {
|
|
86800
|
+
return key++;
|
|
86801
|
+
}
|
|
86802
|
+
|
|
86803
|
+
function setMessageConfig(options) {
|
|
86804
|
+
if (options.top !== undefined) {
|
|
86805
|
+
defaultTop$1 = options.top;
|
|
86806
|
+
messageInstance = null; // delete messageInstance for new defaultTop
|
|
86807
|
+
}
|
|
86808
|
+
|
|
86809
|
+
if (options.duration !== undefined) {
|
|
86810
|
+
defaultDuration$1 = options.duration;
|
|
86811
|
+
}
|
|
86812
|
+
|
|
86813
|
+
if (options.prefixCls !== undefined) {
|
|
86814
|
+
localPrefixCls = options.prefixCls;
|
|
86815
|
+
}
|
|
86816
|
+
|
|
86817
|
+
if (options.getContainer !== undefined) {
|
|
86818
|
+
getContainer$1 = options.getContainer;
|
|
86819
|
+
messageInstance = null; // delete messageInstance for new getContainer
|
|
86820
|
+
}
|
|
86821
|
+
|
|
86822
|
+
if (options.transitionName !== undefined) {
|
|
86823
|
+
transitionName = options.transitionName;
|
|
86824
|
+
messageInstance = null; // delete messageInstance for new transitionName
|
|
86825
|
+
|
|
86826
|
+
hasTransitionName = true;
|
|
86827
|
+
}
|
|
86828
|
+
|
|
86829
|
+
if (options.maxCount !== undefined) {
|
|
86830
|
+
maxCount$1 = options.maxCount;
|
|
86831
|
+
messageInstance = null;
|
|
86832
|
+
}
|
|
86833
|
+
|
|
86834
|
+
if (options.rtl !== undefined) {
|
|
86835
|
+
rtl$1 = options.rtl;
|
|
86836
|
+
}
|
|
86837
|
+
}
|
|
86838
|
+
|
|
86839
|
+
function getRCNotificationInstance(args, callback) {
|
|
86840
|
+
var customizePrefixCls = args.prefixCls,
|
|
86841
|
+
getContextPopupContainer = args.getPopupContainer;
|
|
86842
|
+
|
|
86843
|
+
var _globalConfig = _ConfigProvider.globalConfig(),
|
|
86844
|
+
getPrefixCls = _globalConfig.getPrefixCls,
|
|
86845
|
+
getRootPrefixCls = _globalConfig.getRootPrefixCls,
|
|
86846
|
+
getIconPrefixCls = _globalConfig.getIconPrefixCls;
|
|
86847
|
+
|
|
86848
|
+
var prefixCls = getPrefixCls('message', customizePrefixCls || localPrefixCls);
|
|
86849
|
+
var rootPrefixCls = getRootPrefixCls(args.rootPrefixCls, prefixCls);
|
|
86850
|
+
var iconPrefixCls = getIconPrefixCls();
|
|
86851
|
+
|
|
86852
|
+
if (messageInstance) {
|
|
86853
|
+
callback({
|
|
86854
|
+
prefixCls: prefixCls,
|
|
86855
|
+
rootPrefixCls: rootPrefixCls,
|
|
86856
|
+
iconPrefixCls: iconPrefixCls,
|
|
86857
|
+
instance: messageInstance
|
|
86858
|
+
});
|
|
86859
|
+
return;
|
|
86860
|
+
}
|
|
86861
|
+
|
|
86862
|
+
var instanceConfig = {
|
|
86863
|
+
prefixCls: prefixCls,
|
|
86864
|
+
transitionName: hasTransitionName ? transitionName : "".concat(rootPrefixCls, "-").concat(transitionName),
|
|
86865
|
+
style: {
|
|
86866
|
+
top: defaultTop$1
|
|
86867
|
+
},
|
|
86868
|
+
getContainer: getContainer$1 || getContextPopupContainer,
|
|
86869
|
+
maxCount: maxCount$1
|
|
86870
|
+
};
|
|
86871
|
+
Notification.newInstance(instanceConfig, function (instance) {
|
|
86872
|
+
if (messageInstance) {
|
|
86873
|
+
callback({
|
|
86874
|
+
prefixCls: prefixCls,
|
|
86875
|
+
rootPrefixCls: rootPrefixCls,
|
|
86876
|
+
iconPrefixCls: iconPrefixCls,
|
|
86877
|
+
instance: messageInstance
|
|
86878
|
+
});
|
|
86879
|
+
return;
|
|
86880
|
+
}
|
|
86881
|
+
|
|
86882
|
+
messageInstance = instance;
|
|
86883
|
+
|
|
86884
|
+
callback({
|
|
86885
|
+
prefixCls: prefixCls,
|
|
86886
|
+
rootPrefixCls: rootPrefixCls,
|
|
86887
|
+
iconPrefixCls: iconPrefixCls,
|
|
86888
|
+
instance: instance
|
|
86889
|
+
});
|
|
86890
|
+
});
|
|
86891
|
+
}
|
|
86892
|
+
|
|
86893
|
+
var typeToIcon$1 = {
|
|
86894
|
+
info: InfoCircleFilled$2,
|
|
86895
|
+
success: CheckCircleFilled$2,
|
|
86896
|
+
error: CloseCircleFilled$2,
|
|
86897
|
+
warning: ExclamationCircleFilled$2,
|
|
86898
|
+
loading: LoadingOutlined$2
|
|
86899
|
+
};
|
|
86900
|
+
var typeList = Object.keys(typeToIcon$1);
|
|
86901
|
+
|
|
86902
|
+
function getRCNoticeProps$1(args, prefixCls, iconPrefixCls) {
|
|
86903
|
+
var _classNames;
|
|
86904
|
+
|
|
86905
|
+
var duration = args.duration !== undefined ? args.duration : defaultDuration$1;
|
|
86906
|
+
var progress = args.progress === false ? false : true;
|
|
86907
|
+
var IconComponent = typeToIcon$1[args.type];
|
|
86908
|
+
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));
|
|
86909
|
+
return {
|
|
86910
|
+
key: args.key,
|
|
86911
|
+
duration: duration,
|
|
86912
|
+
style: args.style || {},
|
|
86913
|
+
className: classnames(args.className, 'lm_message'),
|
|
86914
|
+
content: /*#__PURE__*/React__default['default'].createElement(_ConfigProvider__default['default'], {
|
|
86915
|
+
iconPrefixCls: iconPrefixCls
|
|
86916
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
86917
|
+
className: messageClass
|
|
86918
|
+
}, 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", {
|
|
86919
|
+
className: 'message_progress',
|
|
86920
|
+
style: {
|
|
86921
|
+
animationDuration: "".concat(duration, "s")
|
|
86922
|
+
}
|
|
86923
|
+
}))),
|
|
86924
|
+
onClose: args.onClose,
|
|
86925
|
+
onClick: args.onClick
|
|
86926
|
+
};
|
|
86927
|
+
}
|
|
86928
|
+
|
|
86929
|
+
function notice$1(args) {
|
|
86930
|
+
var target = args.key || getKeyThenIncreaseKey();
|
|
86931
|
+
var closePromise = new Promise(function (resolve) {
|
|
86932
|
+
var callback = function callback() {
|
|
86933
|
+
if (typeof args.onClose === 'function') {
|
|
86934
|
+
args.onClose();
|
|
86935
|
+
}
|
|
86936
|
+
|
|
86937
|
+
return resolve(true);
|
|
86938
|
+
};
|
|
86939
|
+
|
|
86940
|
+
getRCNotificationInstance(args, function (_ref) {
|
|
86941
|
+
var prefixCls = _ref.prefixCls,
|
|
86942
|
+
iconPrefixCls = _ref.iconPrefixCls,
|
|
86943
|
+
instance = _ref.instance;
|
|
86944
|
+
instance.notice(getRCNoticeProps$1(_objectSpread(_objectSpread({}, args), {}, {
|
|
86945
|
+
key: target,
|
|
86946
|
+
onClose: callback
|
|
86947
|
+
}), prefixCls, iconPrefixCls));
|
|
86948
|
+
});
|
|
86949
|
+
});
|
|
86950
|
+
|
|
86951
|
+
var result = function result() {
|
|
86952
|
+
if (messageInstance) {
|
|
86953
|
+
messageInstance.removeNotice(target);
|
|
86954
|
+
}
|
|
86955
|
+
};
|
|
86956
|
+
|
|
86957
|
+
result.then = function (filled, rejected) {
|
|
86958
|
+
return closePromise.then(filled, rejected);
|
|
86959
|
+
};
|
|
86960
|
+
|
|
86961
|
+
result.promise = closePromise;
|
|
86962
|
+
return result;
|
|
86963
|
+
}
|
|
86964
|
+
|
|
86965
|
+
function isArgsProps(content) {
|
|
86966
|
+
return Object.prototype.toString.call(content) === '[object Object]' && !!content.content;
|
|
86967
|
+
}
|
|
86968
|
+
|
|
86969
|
+
var api$1 = {
|
|
86970
|
+
open: notice$1,
|
|
86971
|
+
config: setMessageConfig,
|
|
86972
|
+
destroy: function destroy(messageKey) {
|
|
86973
|
+
if (messageInstance) {
|
|
86974
|
+
if (messageKey) {
|
|
86975
|
+
var _messageInstance = messageInstance,
|
|
86976
|
+
removeNotice = _messageInstance.removeNotice;
|
|
86977
|
+
removeNotice(messageKey);
|
|
86978
|
+
} else {
|
|
86979
|
+
var _messageInstance2 = messageInstance,
|
|
86980
|
+
destroy = _messageInstance2.destroy;
|
|
86981
|
+
destroy();
|
|
86982
|
+
messageInstance = null;
|
|
86983
|
+
}
|
|
86984
|
+
}
|
|
86985
|
+
}
|
|
86986
|
+
};
|
|
86987
|
+
function attachTypeApi(originalApi, type) {
|
|
86988
|
+
originalApi[type] = function (content, duration, onClose) {
|
|
86989
|
+
if (isArgsProps(content)) {
|
|
86990
|
+
return originalApi.open(_objectSpread(_objectSpread({}, content), {}, {
|
|
86991
|
+
type: type
|
|
86992
|
+
}));
|
|
86993
|
+
}
|
|
86994
|
+
|
|
86995
|
+
if (typeof duration === 'function') {
|
|
86996
|
+
onClose = duration;
|
|
86997
|
+
duration = undefined;
|
|
86998
|
+
}
|
|
86999
|
+
|
|
87000
|
+
return originalApi.open({
|
|
87001
|
+
content: content,
|
|
87002
|
+
duration: duration,
|
|
87003
|
+
type: type,
|
|
87004
|
+
onClose: onClose
|
|
87005
|
+
});
|
|
87006
|
+
};
|
|
87007
|
+
}
|
|
87008
|
+
typeList.forEach(function (type) {
|
|
87009
|
+
return attachTypeApi(api$1, type);
|
|
87010
|
+
});
|
|
87011
|
+
api$1.warn = api$1.warning;
|
|
87012
|
+
api$1.useMessage = createUseMessage(getRCNotificationInstance, getRCNoticeProps$1);
|
|
87013
|
+
|
|
87014
|
+
var _excluded$1o = ["className", "size", "noBorder"];
|
|
84059
87015
|
var prefixCls$a = 'lm_tabs';
|
|
84060
87016
|
|
|
84061
87017
|
var LMTabs = function LMTabs(props) {
|
|
@@ -84064,7 +87020,7 @@
|
|
|
84064
87020
|
size = _props$size === void 0 ? "middle" : _props$size,
|
|
84065
87021
|
_props$noBorder = props.noBorder,
|
|
84066
87022
|
noBorder = _props$noBorder === void 0 ? false : _props$noBorder,
|
|
84067
|
-
others = _objectWithoutProperties(props, _excluded$
|
|
87023
|
+
others = _objectWithoutProperties(props, _excluded$1o);
|
|
84068
87024
|
|
|
84069
87025
|
return /*#__PURE__*/React__default['default'].createElement(_Tabs__default['default'], _objectSpread(_objectSpread({
|
|
84070
87026
|
size: size
|
|
@@ -84787,28 +87743,32 @@
|
|
|
84787
87743
|
});
|
|
84788
87744
|
|
|
84789
87745
|
var LMUpload = function LMUpload(props) {
|
|
84790
|
-
var
|
|
87746
|
+
var className = props.className,
|
|
87747
|
+
sizeType = props.sizeType,
|
|
87748
|
+
listType = props.listType;
|
|
84791
87749
|
|
|
84792
87750
|
var renderUploadItem = function renderUploadItem(originNode, file) {
|
|
84793
87751
|
return !listType ? /*#__PURE__*/React__default['default'].createElement(_Tooltip__default['default'], {
|
|
84794
|
-
placement:
|
|
87752
|
+
placement: "bottom",
|
|
84795
87753
|
title: file.name
|
|
84796
87754
|
}, originNode.props.children) : originNode;
|
|
84797
87755
|
};
|
|
84798
87756
|
|
|
84799
87757
|
return /*#__PURE__*/React__default['default'].createElement(_Upload__default['default'], _objectSpread({
|
|
87758
|
+
className: classnames(className, sizeType == 'small' && 'little-upload'),
|
|
84800
87759
|
itemRender: renderUploadItem,
|
|
87760
|
+
sizeType: sizeType,
|
|
84801
87761
|
listType: listType
|
|
84802
87762
|
}, props));
|
|
84803
87763
|
};
|
|
84804
87764
|
|
|
84805
|
-
var _excluded$
|
|
87765
|
+
var _excluded$1p = ["children", "className"];
|
|
84806
87766
|
var classNamePrefix = 'lm_form';
|
|
84807
87767
|
|
|
84808
87768
|
var LMForm = function LMForm(props, ref) {
|
|
84809
87769
|
var children = props.children,
|
|
84810
87770
|
className = props.className,
|
|
84811
|
-
restProps = _objectWithoutProperties(props, _excluded$
|
|
87771
|
+
restProps = _objectWithoutProperties(props, _excluded$1p);
|
|
84812
87772
|
|
|
84813
87773
|
return /*#__PURE__*/React__default['default'].createElement(_Form__default['default'], _objectSpread({
|
|
84814
87774
|
ref: ref,
|
|
@@ -84875,13 +87835,13 @@
|
|
|
84875
87835
|
}, children);
|
|
84876
87836
|
};
|
|
84877
87837
|
|
|
84878
|
-
var _excluded$
|
|
87838
|
+
var _excluded$1q = ["data-row-key", "children", "className"];
|
|
84879
87839
|
|
|
84880
87840
|
var SortableItem$1 = function SortableItem(props) {
|
|
84881
87841
|
var key = props['data-row-key'],
|
|
84882
87842
|
children = props.children,
|
|
84883
87843
|
className = props.className,
|
|
84884
|
-
resetField = _objectWithoutProperties(props, _excluded$
|
|
87844
|
+
resetField = _objectWithoutProperties(props, _excluded$1q);
|
|
84885
87845
|
|
|
84886
87846
|
var _useSortable = useSortable({
|
|
84887
87847
|
id: key
|
|
@@ -84921,8 +87881,8 @@
|
|
|
84921
87881
|
}));
|
|
84922
87882
|
};
|
|
84923
87883
|
|
|
84924
|
-
var _excluded$
|
|
84925
|
-
_excluded2$
|
|
87884
|
+
var _excluded$1r = ["index"],
|
|
87885
|
+
_excluded2$n = ["index"],
|
|
84926
87886
|
_excluded3$7 = ["value", "onChange"],
|
|
84927
87887
|
_excluded4$3 = ["record", "rowKey", "isEdit", "col", "handleTableRowDelete", "handleTableRowAdd", "getLength", "isHoverEdit", "editEnum", "valueType", "children", "handleSave", "handleAdd", "handleDelete", "itemProps", "setValid", "reWriteOriginSource"],
|
|
84928
87888
|
_excluded5$2 = ["onMouseEnter", "onMouseLeave"],
|
|
@@ -84932,7 +87892,7 @@
|
|
|
84932
87892
|
|
|
84933
87893
|
var EditableRow$1 = function EditableRow(_ref) {
|
|
84934
87894
|
var index = _ref.index,
|
|
84935
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
87895
|
+
props = _objectWithoutProperties(_ref, _excluded$1r);
|
|
84936
87896
|
|
|
84937
87897
|
var _Form$useForm = _Form__default['default'].useForm(),
|
|
84938
87898
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
@@ -84948,7 +87908,7 @@
|
|
|
84948
87908
|
|
|
84949
87909
|
var EditableSortRow = function EditableSortRow(_ref2) {
|
|
84950
87910
|
var index = _ref2.index,
|
|
84951
|
-
props = _objectWithoutProperties(_ref2, _excluded2$
|
|
87911
|
+
props = _objectWithoutProperties(_ref2, _excluded2$n);
|
|
84952
87912
|
|
|
84953
87913
|
var _Form$useForm3 = _Form__default['default'].useForm(),
|
|
84954
87914
|
_Form$useForm4 = _slicedToArray(_Form$useForm3, 1),
|
|
@@ -85755,6 +88715,191 @@
|
|
|
85755
88715
|
});
|
|
85756
88716
|
var LmEditTable = /*#__PURE__*/React.memo(EditTable$1);
|
|
85757
88717
|
|
|
88718
|
+
var isFunction$4 = function isFunction(value) {
|
|
88719
|
+
return typeof value === 'function';
|
|
88720
|
+
};
|
|
88721
|
+
function getTargetElement$1(target, defaultElement) {
|
|
88722
|
+
if (!target) {
|
|
88723
|
+
return defaultElement;
|
|
88724
|
+
}
|
|
88725
|
+
|
|
88726
|
+
var targetElement;
|
|
88727
|
+
|
|
88728
|
+
if (isFunction$4(target)) {
|
|
88729
|
+
targetElement = target();
|
|
88730
|
+
} else if ('current' in target) {
|
|
88731
|
+
targetElement = target.current;
|
|
88732
|
+
} else {
|
|
88733
|
+
targetElement = target;
|
|
88734
|
+
}
|
|
88735
|
+
|
|
88736
|
+
return targetElement;
|
|
88737
|
+
}
|
|
88738
|
+
|
|
88739
|
+
var prefixCls$c = 'lm_quick_menu';
|
|
88740
|
+
|
|
88741
|
+
var LMQuickMenu = function LMQuickMenu(props) {
|
|
88742
|
+
var className = props.className,
|
|
88743
|
+
_props$top = props.top,
|
|
88744
|
+
top = _props$top === void 0 ? '104px' : _props$top,
|
|
88745
|
+
_props$menuData = props.menuData,
|
|
88746
|
+
menuData = _props$menuData === void 0 ? [] : _props$menuData,
|
|
88747
|
+
warpElement = props.warpElement;
|
|
88748
|
+
var idTopInfo = React.useRef({});
|
|
88749
|
+
|
|
88750
|
+
var _useState = React.useState(false),
|
|
88751
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
88752
|
+
hovering = _useState2[0],
|
|
88753
|
+
setHovering = _useState2[1];
|
|
88754
|
+
|
|
88755
|
+
var menuTimeEventRef = React.useRef(null);
|
|
88756
|
+
|
|
88757
|
+
var _useState3 = React.useState(false),
|
|
88758
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
88759
|
+
scrollOpenStatus = _useState4[0],
|
|
88760
|
+
setScrollOpenStatus = _useState4[1];
|
|
88761
|
+
|
|
88762
|
+
var scrollTimeOut = React.useRef(null);
|
|
88763
|
+
var scroll = useScroll(getTargetElement$1(warpElement || document), function () {
|
|
88764
|
+
return scrollOpenStatus;
|
|
88765
|
+
});
|
|
88766
|
+
|
|
88767
|
+
function clearActiveToc() {
|
|
88768
|
+
[].forEach.call(document.querySelectorAll('.lm_menu_list li a'), function (node) {
|
|
88769
|
+
node.className = '';
|
|
88770
|
+
});
|
|
88771
|
+
}
|
|
88772
|
+
|
|
88773
|
+
var updateActiveToc = function updateActiveToc(id) {
|
|
88774
|
+
var currentNode = document.querySelectorAll(".lm_menu_list li a[data-id=\"".concat(id, "\"]"))[0];
|
|
88775
|
+
|
|
88776
|
+
if (currentNode) {
|
|
88777
|
+
clearActiveToc();
|
|
88778
|
+
currentNode.className = 'current';
|
|
88779
|
+
}
|
|
88780
|
+
};
|
|
88781
|
+
|
|
88782
|
+
var bindScroller = function bindScroller() {
|
|
88783
|
+
var _menuTimeEventRef$cur2, _menuTimeEventRef$cur3;
|
|
88784
|
+
|
|
88785
|
+
if (menuTimeEventRef.current) {
|
|
88786
|
+
var _menuTimeEventRef$cur;
|
|
88787
|
+
|
|
88788
|
+
(_menuTimeEventRef$cur = menuTimeEventRef.current) === null || _menuTimeEventRef$cur === void 0 ? void 0 : _menuTimeEventRef$cur.destroy();
|
|
88789
|
+
}
|
|
88790
|
+
|
|
88791
|
+
if (!menuData.length) {
|
|
88792
|
+
return;
|
|
88793
|
+
} // eslint-disable-next-line global-require
|
|
88794
|
+
|
|
88795
|
+
|
|
88796
|
+
require('intersection-observer'); // eslint-disable-next-line global-require
|
|
88797
|
+
|
|
88798
|
+
|
|
88799
|
+
var scrollama = require('scrollama');
|
|
88800
|
+
|
|
88801
|
+
menuTimeEventRef.current = scrollama();
|
|
88802
|
+
(_menuTimeEventRef$cur2 = menuTimeEventRef.current) === null || _menuTimeEventRef$cur2 === void 0 ? void 0 : (_menuTimeEventRef$cur3 = _menuTimeEventRef$cur2.setup({
|
|
88803
|
+
step: menuData.map(function (item) {
|
|
88804
|
+
return document.getElementById("".concat(item.menuId));
|
|
88805
|
+
}).filter(Boolean) // required
|
|
88806
|
+
// offset: '10px',
|
|
88807
|
+
|
|
88808
|
+
})) === null || _menuTimeEventRef$cur3 === void 0 ? void 0 : _menuTimeEventRef$cur3.onStepEnter(function (_ref) {
|
|
88809
|
+
var element = _ref.element;
|
|
88810
|
+
updateActiveToc(element.id);
|
|
88811
|
+
});
|
|
88812
|
+
};
|
|
88813
|
+
|
|
88814
|
+
function setKeysDom() {
|
|
88815
|
+
menuData.forEach(function (item) {
|
|
88816
|
+
var _getTargetElement, _document$getElementB;
|
|
88817
|
+
|
|
88818
|
+
var warpTop = ((_getTargetElement = getTargetElement$1(warpElement || document)) === null || _getTargetElement === void 0 ? void 0 : _getTargetElement.offsetTop) || 0;
|
|
88819
|
+
idTopInfo.current["".concat(item.menuId)] = ((_document$getElementB = document.getElementById("".concat(item.menuId))) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.offsetTop) - warpTop;
|
|
88820
|
+
});
|
|
88821
|
+
}
|
|
88822
|
+
|
|
88823
|
+
React.useEffect(function () {
|
|
88824
|
+
if (scroll && !hovering) {
|
|
88825
|
+
setHovering(true);
|
|
88826
|
+
}
|
|
88827
|
+
|
|
88828
|
+
if (scrollTimeOut.current) {
|
|
88829
|
+
clearTimeout(scrollTimeOut.current);
|
|
88830
|
+
}
|
|
88831
|
+
|
|
88832
|
+
scrollTimeOut.current = setTimeout(function () {
|
|
88833
|
+
setHovering(false);
|
|
88834
|
+
}, 2000);
|
|
88835
|
+
}, [scroll]);
|
|
88836
|
+
|
|
88837
|
+
var bindDom = function bindDom() {
|
|
88838
|
+
if (!Object.keys(idTopInfo.current).length) {
|
|
88839
|
+
setKeysDom();
|
|
88840
|
+
}
|
|
88841
|
+
};
|
|
88842
|
+
|
|
88843
|
+
var handleScroll = function handleScroll() {
|
|
88844
|
+
setScrollOpenStatus(true);
|
|
88845
|
+
};
|
|
88846
|
+
|
|
88847
|
+
var golink = function golink(id) {
|
|
88848
|
+
var _idTopInfo$current;
|
|
88849
|
+
|
|
88850
|
+
getTargetElement$1(warpElement || document).scrollTop = (_idTopInfo$current = idTopInfo.current) === null || _idTopInfo$current === void 0 ? void 0 : _idTopInfo$current[id];
|
|
88851
|
+
};
|
|
88852
|
+
|
|
88853
|
+
React.useEffect(function () {
|
|
88854
|
+
var _getTargetElement2;
|
|
88855
|
+
|
|
88856
|
+
// bindScroller();
|
|
88857
|
+
setTimeout(function () {
|
|
88858
|
+
bindDom();
|
|
88859
|
+
bindScroller();
|
|
88860
|
+
}, 200);
|
|
88861
|
+
(_getTargetElement2 = getTargetElement$1(warpElement || document)) === null || _getTargetElement2 === void 0 ? void 0 : _getTargetElement2.addEventListener('scroll', handleScroll, {
|
|
88862
|
+
once: true
|
|
88863
|
+
});
|
|
88864
|
+
return function () {
|
|
88865
|
+
var _getTargetElement3;
|
|
88866
|
+
|
|
88867
|
+
(_getTargetElement3 = getTargetElement$1(warpElement || document)) === null || _getTargetElement3 === void 0 ? void 0 : _getTargetElement3.removeEventListener('scroll', handleScroll);
|
|
88868
|
+
};
|
|
88869
|
+
}, []);
|
|
88870
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
88871
|
+
className: classnames(prefixCls$c),
|
|
88872
|
+
onMouseEnter: function onMouseEnter() {
|
|
88873
|
+
if (scrollTimeOut.current) {
|
|
88874
|
+
clearTimeout(scrollTimeOut.current);
|
|
88875
|
+
}
|
|
88876
|
+
|
|
88877
|
+
setHovering(true);
|
|
88878
|
+
},
|
|
88879
|
+
onMouseLeave: function onMouseLeave() {
|
|
88880
|
+
setHovering(false);
|
|
88881
|
+
},
|
|
88882
|
+
style: {
|
|
88883
|
+
top: top
|
|
88884
|
+
}
|
|
88885
|
+
}, !hovering && /*#__PURE__*/React__default['default'].createElement(LMButton, {
|
|
88886
|
+
icon: /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
88887
|
+
type: 'lmweb-icon_m_open'
|
|
88888
|
+
})
|
|
88889
|
+
}), /*#__PURE__*/React__default['default'].createElement("ul", {
|
|
88890
|
+
className: classnames('lm_menu_list', hovering && 'show', className)
|
|
88891
|
+
}, menuData.map(function (item) {
|
|
88892
|
+
return /*#__PURE__*/React__default['default'].createElement("li", {
|
|
88893
|
+
key: item.menuId,
|
|
88894
|
+
onClick: function onClick() {
|
|
88895
|
+
return golink(item.menuId);
|
|
88896
|
+
}
|
|
88897
|
+
}, /*#__PURE__*/React__default['default'].createElement("a", {
|
|
88898
|
+
"data-id": item.menuId
|
|
88899
|
+
}, item.title));
|
|
88900
|
+
})));
|
|
88901
|
+
};
|
|
88902
|
+
|
|
85758
88903
|
Object.defineProperty(exports, 'Card', {
|
|
85759
88904
|
enumerable: true,
|
|
85760
88905
|
get: function () {
|
|
@@ -85779,12 +88924,6 @@
|
|
|
85779
88924
|
return _Spin__default['default'];
|
|
85780
88925
|
}
|
|
85781
88926
|
});
|
|
85782
|
-
Object.defineProperty(exports, 'message', {
|
|
85783
|
-
enumerable: true,
|
|
85784
|
-
get: function () {
|
|
85785
|
-
return _message__default['default'];
|
|
85786
|
-
}
|
|
85787
|
-
});
|
|
85788
88927
|
Object.defineProperty(exports, 'Image', {
|
|
85789
88928
|
enumerable: true,
|
|
85790
88929
|
get: function () {
|
|
@@ -85821,12 +88960,6 @@
|
|
|
85821
88960
|
return _Menu__default['default'];
|
|
85822
88961
|
}
|
|
85823
88962
|
});
|
|
85824
|
-
Object.defineProperty(exports, 'notification', {
|
|
85825
|
-
enumerable: true,
|
|
85826
|
-
get: function () {
|
|
85827
|
-
return _notification__default['default'];
|
|
85828
|
-
}
|
|
85829
|
-
});
|
|
85830
88963
|
exports.Button = LMButton;
|
|
85831
88964
|
exports.ButtonTags = ButtonTags;
|
|
85832
88965
|
exports.Cascader = LMCascader;
|
|
@@ -85845,6 +88978,7 @@
|
|
|
85845
88978
|
exports.IconSelect = IconSelect;
|
|
85846
88979
|
exports.Input = LmInput;
|
|
85847
88980
|
exports.InputNumber = CInputNumber;
|
|
88981
|
+
exports.LMQuickMenu = LMQuickMenu;
|
|
85848
88982
|
exports.LeftTable = LeftSide;
|
|
85849
88983
|
exports.LmEditTable = LmEditTable;
|
|
85850
88984
|
exports.LmSelect = LMSelect;
|
|
@@ -85864,6 +88998,8 @@
|
|
|
85864
88998
|
exports.Upload = LMUpload;
|
|
85865
88999
|
exports.UploadOss = UploadOss;
|
|
85866
89000
|
exports.VirtualList = VirList;
|
|
89001
|
+
exports.message = api$1;
|
|
89002
|
+
exports.notification = api;
|
|
85867
89003
|
|
|
85868
89004
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
85869
89005
|
|