@nutui/nutui-react-taro 2.0.0-alpha.13 → 2.0.0-alpha.15
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/CHANGELOG.md +30 -0
- package/dist/esm/ActionSheet/style/style.css +1 -1
- package/dist/esm/Address/style/style.css +1 -1
- package/dist/esm/Address.js +2 -2
- package/dist/esm/Audio.js +4 -4
- package/dist/esm/Avatar.js +3 -3
- package/dist/esm/Barrage/style/style.css +1 -1
- package/dist/esm/Barrage.js +2 -3
- package/dist/esm/Calendar/style/style.css +1 -1
- package/dist/esm/Calendar.js +3 -3
- package/dist/esm/CalendarItem.js +2 -2
- package/dist/esm/Card/style/style.css +1 -1
- package/dist/esm/Card.js +2 -4
- package/dist/esm/Cascader/style/style.css +1 -1
- package/dist/esm/CircleProgress.js +2 -2
- package/dist/esm/ConfigProvider.js +2 -2
- package/dist/esm/CountDown.js +2 -2
- package/dist/esm/DatePicker/style/style.css +1 -1
- package/dist/esm/DatePicker.js +4 -4
- package/dist/esm/Dialog.js +2 -2
- package/dist/esm/Ellipsis.js +2 -2
- package/dist/esm/Empty.js +2 -2
- package/dist/esm/FixedNav.js +2 -2
- package/dist/esm/Grid.js +3 -3
- package/dist/esm/GridItem.js +2 -2
- package/dist/esm/Image.js +2 -2
- package/dist/esm/ImagePreview/style/style.css +1 -1
- package/dist/esm/ImagePreview.js +1 -1
- package/dist/esm/InfiniteLoading/style/style.css +1 -0
- package/dist/esm/InfiniteLoading.js +10 -0
- package/dist/esm/Input.js +2 -2
- package/dist/esm/Menu.js +1 -1
- package/dist/esm/MenuItem.js +2 -2
- package/dist/esm/NoticeBar.js +2 -2
- package/dist/esm/NumberKeyboard/style/style.css +1 -1
- package/dist/esm/NumberKeyboard.js +2 -2
- package/dist/esm/Pagination.js +2 -2
- package/dist/esm/Picker/style/style.css +1 -1
- package/dist/esm/Picker.js +3 -3
- package/dist/esm/Popover/style/index.js +1 -1
- package/dist/esm/Popover/style/style.css +1 -1
- package/dist/esm/Popover.js +9 -3
- package/dist/esm/Popup/style/style.css +1 -1
- package/dist/esm/PullToRefresh.js +2 -2
- package/dist/esm/Range.js +2 -2
- package/dist/esm/SearchBar.js +2 -2
- package/dist/esm/ShortPassword/style/style.css +1 -1
- package/dist/esm/ShortPassword.js +2 -2
- package/dist/esm/SideNavBar/style/style.css +1 -1
- package/dist/esm/SideNavBar.js +3 -3
- package/dist/esm/SideNavBarItem/style/style.css +1 -1
- package/dist/esm/SideNavBarItem.js +1 -1
- package/dist/esm/Signature/style/index.js +1 -1
- package/dist/esm/Signature/style/style.css +1 -1
- package/dist/esm/Signature.js +1 -7
- package/dist/esm/Skeleton.js +4 -4
- package/dist/esm/Sticky.js +2 -2
- package/dist/esm/SubSideNavBar/style/style.css +1 -1
- package/dist/esm/SubSideNavBar.js +2 -2
- package/dist/esm/Swipe.js +2 -2
- package/dist/esm/Table.js +2 -2
- package/dist/esm/Tag/style/style.css +1 -1
- package/dist/esm/Tag.js +1 -1
- package/dist/esm/TextArea/style/style.css +1 -1
- package/dist/esm/TextArea.js +2 -2
- package/dist/esm/TimeDetail/style/style.css +1 -1
- package/dist/esm/TimeDetail.js +3 -4
- package/dist/esm/TimeSelect/style/index.js +0 -1
- package/dist/esm/TimeSelect/style/style.css +1 -1
- package/dist/esm/TimeSelect.js +4 -7
- package/dist/esm/Uploader.js +3 -3
- package/dist/esm/WaterMark.js +2 -2
- package/dist/esm/{address.taro-1a8ab3f1.js → address.taro-cc879a1d.js} +1 -1
- package/dist/esm/{audio.taro-bbd39f93.js → audio.taro-64b15071.js} +4 -4
- package/dist/esm/{avatar.taro-01536aff.js → avatar.taro-8a26cd6c.js} +1 -1
- package/dist/esm/{barrage.taro-c8cb9864.js → barrage.taro-e87bc58e.js} +32 -32
- package/dist/esm/{calendar.taro-10a6cb11.js → calendar.taro-02195ddb.js} +2 -2
- package/dist/esm/{calendaritem.taro-3e5f114e.js → calendaritem.taro-4230e5c4.js} +1 -1
- package/dist/esm/card.taro-92fe9733.js +64 -0
- package/dist/esm/{circleprogress.taro-7149e09d.js → circleprogress.taro-9064d69c.js} +1 -1
- package/dist/esm/{configprovider.taro-25758d9f.js → configprovider.taro-372b1525.js} +1 -1
- package/dist/esm/{countdown.taro-c399cc08.js → countdown.taro-8f19d21b.js} +1 -1
- package/dist/esm/{datepicker.taro-65dbeceb.js → datepicker.taro-8c9230b6.js} +2 -2
- package/dist/esm/{dialog.taro-290eb9a6.js → dialog.taro-e5c2cb03.js} +1 -1
- package/dist/esm/{ellipsis.taro-f423affa.js → ellipsis.taro-5653d0b2.js} +12 -12
- package/dist/esm/{empty.taro-ca792f57.js → empty.taro-8345ac72.js} +1 -1
- package/dist/esm/{fixednav.taro-b9ecf0d5.js → fixednav.taro-6c69ad79.js} +1 -1
- package/dist/esm/{grid.taro-fbbd8618.js → grid.taro-9b63aca5.js} +1 -1
- package/dist/esm/{griditem.taro-b0c37077.js → griditem.taro-48971911.js} +1 -1
- package/dist/esm/{image.taro-767aa000.js → image.taro-fde6e649.js} +1 -1
- package/dist/esm/{imagepreview.taro-daa5a84f.js → imagepreview.taro-cfe0a4cc.js} +3 -2
- package/dist/esm/{index-e3184f19.js → index-0a89a47b.js} +7 -1
- package/dist/esm/{infiniteloading.taro-f8f23ac6.js → infiniteloading.taro-53eeb1ec.js} +17 -33
- package/dist/esm/{input.taro-27d686c9.js → input.taro-69c08268.js} +1 -1
- package/dist/esm/{menu.taro-cd0fef41.js → menu.taro-40d36e0a.js} +3 -3
- package/dist/esm/{menuitem.taro-6076bffa.js → menuitem.taro-6aa35a00.js} +1 -1
- package/dist/esm/{noticebar.taro-2f02b2ad.js → noticebar.taro-8d496dd6.js} +1 -1
- package/dist/esm/{numberkeyboard.taro-ad8afaf9.js → numberkeyboard.taro-18879f04.js} +1 -1
- package/dist/esm/nutui-react.es.js +53 -55
- package/dist/esm/{pagination.taro-63607c3b.js → pagination.taro-592bca05.js} +1 -1
- package/dist/esm/{picker.taro-0570ec32.js → picker.taro-6b672469.js} +45 -41
- package/dist/esm/popover.taro-ba6c323a.js +229 -0
- package/dist/esm/{pulltorefresh.taro-5b36a881.js → pulltorefresh.taro-3719fdfb.js} +1 -1
- package/dist/esm/{range.taro-615e193a.js → range.taro-a1d1ad25.js} +1 -1
- package/dist/esm/{searchbar.taro-09468fff.js → searchbar.taro-39351331.js} +1 -1
- package/dist/esm/{shortpassword.taro-eabbde1b.js → shortpassword.taro-cff61e4e.js} +1 -1
- package/dist/esm/{sidenavbar.taro-9f210df4.js → sidenavbar.taro-1aefdd3c.js} +13 -10
- package/dist/esm/sidenavbaritem.taro-7d805f92.js +13 -0
- package/dist/esm/{signature.taro-c57469aa.js → signature.taro-4f68516a.js} +20 -21
- package/dist/esm/{skeleton.taro-0552c2ec.js → skeleton.taro-ce714b06.js} +1 -1
- package/dist/esm/{sticky.taro-f8ae8d5e.js → sticky.taro-6bc62a96.js} +2 -2
- package/dist/esm/{subsidenavbar.taro-abe07673.js → subsidenavbar.taro-47bb6e74.js} +10 -9
- package/dist/esm/{swipe.taro-de80fcd8.js → swipe.taro-966af6d3.js} +1 -1
- package/dist/esm/{table.taro-15a55c5d.js → table.taro-a20f15f2.js} +1 -1
- package/dist/esm/tag.taro-614758eb.js +76 -0
- package/dist/esm/{textarea.taro-c110565e.js → textarea.taro-593cd471.js} +1 -1
- package/dist/esm/timedetail.taro-d7aa4c1b.js +48 -0
- package/dist/esm/timeselect.taro-9e37e648.js +114 -0
- package/dist/esm/types/src/locales/base.d.ts +1 -1
- package/dist/esm/types/src/packages/barrage/barrage.d.ts +6 -7
- package/dist/esm/types/src/packages/barrage/barrage.taro.d.ts +6 -7
- package/dist/esm/types/src/packages/barrage/index.d.ts +1 -0
- package/dist/esm/types/src/packages/barrage/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/button/button.d.ts +1 -0
- package/dist/esm/types/src/packages/card/card.d.ts +8 -9
- package/dist/esm/types/src/packages/card/card.taro.d.ts +8 -9
- package/dist/esm/types/src/packages/card/index.d.ts +1 -0
- package/dist/esm/types/src/packages/card/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -1
- package/dist/esm/types/src/packages/imagepreview/imagepreview.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/infiniteloading/demo.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/infiniteloading/index.d.ts +3 -2
- package/dist/esm/types/src/packages/infiniteloading/index.taro.d.ts +3 -2
- package/dist/esm/types/src/packages/infiniteloading/infiniteloading.d.ts +9 -14
- package/dist/esm/types/src/packages/infiniteloading/infiniteloading.taro.d.ts +8 -12
- package/dist/esm/types/src/packages/input/input.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/menu/menu.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/nutui.react.build.d.ts +2 -3
- package/dist/esm/types/src/packages/nutui.react.d.ts +2 -4
- package/dist/esm/types/src/packages/nutui.react.scss.d.ts +0 -1
- package/dist/esm/types/src/packages/nutui.react.taro.d.ts +2 -4
- package/dist/esm/types/src/packages/nutui.react.taro.scss.d.ts +0 -1
- package/dist/esm/types/src/packages/nutui.taro.react.build.d.ts +2 -3
- package/dist/esm/types/src/packages/picker/doc.en.d.ts +9 -9
- package/dist/esm/types/src/packages/popover/demo.d.ts +3 -2
- package/dist/esm/types/src/packages/popover/demo.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/popover/index.d.ts +1 -0
- package/dist/esm/types/src/packages/popover/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/popover/popover.d.ts +20 -9
- package/dist/esm/types/src/packages/popover/popover.taro.d.ts +20 -10
- package/dist/esm/types/src/packages/sidenavbar/index.d.ts +1 -0
- package/dist/esm/types/src/packages/sidenavbar/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/sidenavbar/sidenavbar.d.ts +5 -9
- package/dist/esm/types/src/packages/sidenavbar/sidenavbar.taro.d.ts +5 -9
- package/dist/esm/types/src/packages/sidenavbaritem/index.d.ts +1 -0
- package/dist/esm/types/src/packages/sidenavbaritem/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/sidenavbaritem/sidenavbaritem.d.ts +3 -3
- package/dist/esm/types/src/packages/sidenavbaritem/sidenavbaritem.taro.d.ts +3 -3
- package/dist/esm/types/src/packages/signature/index.d.ts +1 -0
- package/dist/esm/types/src/packages/signature/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/signature/signature.d.ts +10 -8
- package/dist/esm/types/src/packages/signature/signature.taro.d.ts +7 -12
- package/dist/esm/types/src/packages/subsidenavbar/index.d.ts +1 -0
- package/dist/esm/types/src/packages/subsidenavbar/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/subsidenavbar/subsidenavbar.d.ts +3 -3
- package/dist/esm/types/src/packages/subsidenavbar/subsidenavbar.taro.d.ts +3 -3
- package/dist/esm/types/src/packages/tag/index.d.ts +1 -0
- package/dist/esm/types/src/packages/tag/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/tag/tag.d.ts +4 -6
- package/dist/esm/types/src/packages/tag/tag.taro.d.ts +4 -6
- package/dist/esm/types/src/packages/timedetail/index.d.ts +1 -2
- package/dist/esm/types/src/packages/timedetail/timedetail.d.ts +9 -11
- package/dist/esm/types/src/packages/timedetail/timedetail.taro.d.ts +9 -11
- package/dist/esm/types/src/packages/timeselect/demo.taro.d.ts +0 -4
- package/dist/esm/types/src/packages/timeselect/index.d.ts +1 -0
- package/dist/esm/types/src/packages/timeselect/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/timeselect/timeselect.d.ts +25 -20
- package/dist/esm/types/src/packages/timeselect/timeselect.taro.d.ts +25 -20
- package/dist/esm/types/src/utils/index.d.ts +1 -0
- package/dist/esm/types/src/utils/use-click-away.d.ts +3 -0
- package/dist/esm/{uploader.taro-7e38fc37.js → uploader.taro-5ad88f83.js} +2 -2
- package/dist/esm/use-client-rect-2bb6c562.js +40 -0
- package/dist/esm/{watermark.taro-e2245bb1.js → watermark.taro-b6b1ae18.js} +1 -1
- package/dist/locales/base.d.ts +1 -1
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +2 -2
- package/dist/locales/id-ID.js +2 -2
- package/dist/locales/tr-TR.js +2 -2
- package/dist/locales/zh-CN.js +2 -2
- package/dist/locales/zh-TW.js +2 -2
- package/dist/locales/zh-UG.js +2 -2
- package/dist/nutui.react.es.js +970 -874
- package/dist/nutui.react.umd.js +969 -873
- package/dist/packages/barrage/barrage.scss +0 -13
- package/dist/packages/card/card.scss +8 -14
- package/dist/packages/infiniteloading/infiniteloading.scss +2 -25
- package/dist/packages/popover/popover.scss +158 -230
- package/dist/packages/popup/popup.scss +36 -0
- package/dist/packages/sidenavbar/sidenavbar.scss +10 -16
- package/dist/packages/sidenavbaritem/sidenavbaritem.scss +7 -19
- package/dist/packages/signature/signature.scss +1 -18
- package/dist/packages/subsidenavbar/subsidenavbar.scss +10 -19
- package/dist/packages/tag/tag.scss +10 -17
- package/dist/packages/timedetail/timedetail.scss +12 -37
- package/dist/packages/timeselect/timeselect.scss +15 -44
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/themes/default.scss +0 -1
- package/dist/styles/variables-jmapp.scss +85 -144
- package/dist/styles/variables.scss +96 -155
- package/dist/types/index.d.ts +2 -3
- package/dist/types/locales/base.d.ts +1 -1
- package/dist/types/packages/barrage/barrage.taro.d.ts +32 -9
- package/dist/types/packages/barrage/index.taro.d.ts +1 -0
- package/dist/types/packages/card/card.taro.d.ts +57 -14
- package/dist/types/packages/card/index.taro.d.ts +1 -0
- package/dist/types/packages/configprovider/types.d.ts +1 -1
- package/dist/types/packages/imagepreview/imagepreview.taro.d.ts +5 -0
- package/dist/types/packages/infiniteloading/index.taro.d.ts +3 -2
- package/dist/types/packages/infiniteloading/infiniteloading.taro.d.ts +52 -16
- package/dist/types/packages/input/input.taro.d.ts +1 -1
- package/dist/types/packages/menu/menu.taro.d.ts +5 -1
- package/dist/types/packages/popover/index.taro.d.ts +1 -0
- package/dist/types/packages/popover/popover.taro.d.ts +99 -13
- package/dist/types/packages/sidenavbar/index.taro.d.ts +1 -0
- package/dist/types/packages/sidenavbar/sidenavbar.taro.d.ts +33 -13
- package/dist/types/packages/sidenavbaritem/index.taro.d.ts +1 -0
- package/dist/types/packages/sidenavbaritem/sidenavbaritem.taro.d.ts +3 -3
- package/dist/types/packages/signature/index.taro.d.ts +1 -0
- package/dist/types/packages/signature/signature.taro.d.ts +32 -17
- package/dist/types/packages/subsidenavbar/index.taro.d.ts +1 -0
- package/dist/types/packages/subsidenavbar/subsidenavbar.taro.d.ts +3 -3
- package/dist/types/packages/tag/index.taro.d.ts +1 -0
- package/dist/types/packages/tag/tag.taro.d.ts +52 -14
- package/dist/types/packages/timedetail/timedetail.taro.d.ts +9 -11
- package/dist/types/packages/timeselect/index.taro.d.ts +1 -0
- package/dist/types/packages/timeselect/timeselect.taro.d.ts +62 -21
- package/dist/types/packages/toast/toast.taro.d.ts +60 -12
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/esm/Infiniteloading/style/style.css +0 -1
- package/dist/esm/Infiniteloading.js +0 -12
- package/dist/esm/TimePannel/style/css.js +0 -1
- package/dist/esm/TimePannel/style/index.js +0 -2
- package/dist/esm/TimePannel/style/style.css +0 -1
- package/dist/esm/TimePannel.js +0 -8
- package/dist/esm/card.taro-2080f4d2.js +0 -51
- package/dist/esm/popover.taro-ad483372.js +0 -162
- package/dist/esm/sidenavbaritem.taro-32a45ce6.js +0 -12
- package/dist/esm/tag.taro-1b4134a5.js +0 -92
- package/dist/esm/timedetail.taro-8d2acbbf.js +0 -41
- package/dist/esm/timepannel.taro-ee4c5dfa.js +0 -22
- package/dist/esm/timeselect.taro-069deedd.js +0 -133
- package/dist/esm/types/src/packages/popover/Trigger.d.ts +0 -19
- package/dist/esm/types/src/packages/sidenavbar/type.d.ts +0 -34
- package/dist/esm/types/src/packages/timedetail/demo.d.ts +0 -3
- package/dist/esm/types/src/packages/timedetail/demo.taro.d.ts +0 -3
- package/dist/esm/types/src/packages/timepannel/demo.d.ts +0 -3
- package/dist/esm/types/src/packages/timepannel/demo.taro.d.ts +0 -3
- package/dist/esm/types/src/packages/timepannel/index.d.ts +0 -2
- package/dist/esm/types/src/packages/timepannel/index.taro.d.ts +0 -2
- package/dist/esm/types/src/packages/timepannel/timepannel.d.ts +0 -8
- package/dist/esm/types/src/packages/timepannel/timepannel.taro.d.ts +0 -8
- package/dist/esm/use-client-rect-f317804e.js +0 -10
- package/dist/packages/timepannel/timepannel.scss +0 -17
- package/dist/types/packages/popover/Trigger.d.ts +0 -19
- package/dist/types/packages/timepannel/index.taro.d.ts +0 -2
- package/dist/types/packages/timepannel/timepannel.taro.d.ts +0 -8
- /package/dist/esm/{Infiniteloading → InfiniteLoading}/style/css.js +0 -0
- /package/dist/esm/{Infiniteloading → InfiniteLoading}/style/index.js +0 -0
- /package/dist/esm/{offsetContext-f32a9246.js → context-f32a9246.js} +0 -0
- /package/dist/esm/types/src/packages/sidenavbar/{offsetContext.d.ts → context.d.ts} +0 -0
- /package/dist/types/packages/sidenavbar/{offsetContext.d.ts → context.d.ts} +0 -0
package/dist/nutui.react.umd.js
CHANGED
|
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8
8
|
return value;
|
|
9
9
|
};
|
|
10
10
|
/*!
|
|
11
|
-
* @nutui/nutui-react-taro v2.0.0-alpha.
|
|
11
|
+
* @nutui/nutui-react-taro v2.0.0-alpha.15 Wed Jun 07 2023 16:24:05 GMT+0800 (China Standard Time)
|
|
12
12
|
* (c) 2023 @jdf2e.
|
|
13
13
|
* Released under the MIT License.
|
|
14
14
|
*/
|
|
@@ -1861,7 +1861,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1861
1861
|
style: {}
|
|
1862
1862
|
};
|
|
1863
1863
|
const prefixCls = "nut-button";
|
|
1864
|
-
const defaultProps$
|
|
1864
|
+
const defaultProps$1t = {
|
|
1865
1865
|
...ComponentDefaults,
|
|
1866
1866
|
color: "",
|
|
1867
1867
|
type: "default",
|
|
@@ -1893,7 +1893,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1893
1893
|
style,
|
|
1894
1894
|
...rest
|
|
1895
1895
|
} = {
|
|
1896
|
-
...defaultProps$
|
|
1896
|
+
...defaultProps$1t,
|
|
1897
1897
|
...props
|
|
1898
1898
|
};
|
|
1899
1899
|
const getStyle = React.useCallback(() => {
|
|
@@ -1948,7 +1948,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1948
1948
|
}
|
|
1949
1949
|
);
|
|
1950
1950
|
Button.displayName = "NutButton";
|
|
1951
|
-
const defaultProps$
|
|
1951
|
+
const defaultProps$1s = {
|
|
1952
1952
|
...ComponentDefaults,
|
|
1953
1953
|
title: null,
|
|
1954
1954
|
description: null,
|
|
@@ -1958,7 +1958,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1958
1958
|
onClick: (event) => {
|
|
1959
1959
|
}
|
|
1960
1960
|
};
|
|
1961
|
-
const classPrefix$
|
|
1961
|
+
const classPrefix$n = "nut-cell";
|
|
1962
1962
|
const Cell = (props) => {
|
|
1963
1963
|
const {
|
|
1964
1964
|
children,
|
|
@@ -1972,7 +1972,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1972
1972
|
style,
|
|
1973
1973
|
...rest
|
|
1974
1974
|
} = {
|
|
1975
|
-
...defaultProps$
|
|
1975
|
+
...defaultProps$1s,
|
|
1976
1976
|
...props
|
|
1977
1977
|
};
|
|
1978
1978
|
const handleClick = (event) => {
|
|
@@ -1989,44 +1989,44 @@ var __publicField = (obj, key, value) => {
|
|
|
1989
1989
|
return /* @__PURE__ */ React.createElement(
|
|
1990
1990
|
"div",
|
|
1991
1991
|
{
|
|
1992
|
-
className: classNames(classPrefix$
|
|
1992
|
+
className: classNames(classPrefix$n, className),
|
|
1993
1993
|
onClick: (event) => handleClick(event),
|
|
1994
1994
|
style: baseStyle,
|
|
1995
1995
|
...rest
|
|
1996
1996
|
},
|
|
1997
|
-
children || /* @__PURE__ */ React.createElement(React.Fragment, null, title || description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
1997
|
+
children || /* @__PURE__ */ React.createElement(React.Fragment, null, title || description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$n}__left` }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$n}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$n}__description` }, description) : null) : null, extra ? /* @__PURE__ */ React.createElement(
|
|
1998
1998
|
"div",
|
|
1999
1999
|
{
|
|
2000
|
-
className: `${classPrefix$
|
|
2000
|
+
className: `${classPrefix$n}__extra`,
|
|
2001
2001
|
style: styles
|
|
2002
2002
|
},
|
|
2003
2003
|
extra
|
|
2004
|
-
) : null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
2004
|
+
) : null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$n}__divider` }))
|
|
2005
2005
|
);
|
|
2006
2006
|
};
|
|
2007
|
-
Cell.defaultProps = defaultProps$
|
|
2007
|
+
Cell.defaultProps = defaultProps$1s;
|
|
2008
2008
|
Cell.displayName = "NutCell";
|
|
2009
|
-
const defaultProps$
|
|
2009
|
+
const defaultProps$1r = {
|
|
2010
2010
|
...ComponentDefaults,
|
|
2011
2011
|
title: "",
|
|
2012
2012
|
description: "",
|
|
2013
2013
|
divider: true
|
|
2014
2014
|
};
|
|
2015
|
-
const classPrefix$
|
|
2015
|
+
const classPrefix$m = "nut-cell-group";
|
|
2016
2016
|
const CellGroup = (props) => {
|
|
2017
2017
|
const { children, className, style, title, description, divider, ...rest } = {
|
|
2018
|
-
...defaultProps$
|
|
2018
|
+
...defaultProps$1r,
|
|
2019
2019
|
...props
|
|
2020
2020
|
};
|
|
2021
|
-
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$
|
|
2021
|
+
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$m, className), ...rest }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$m}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$m}__description` }, description) : null, /* @__PURE__ */ React.createElement(
|
|
2022
2022
|
"div",
|
|
2023
2023
|
{
|
|
2024
|
-
className: `${classPrefix$
|
|
2024
|
+
className: `${classPrefix$m}__wrap ${divider ? `${classPrefix$m}__wrap--divider` : ""}`
|
|
2025
2025
|
},
|
|
2026
2026
|
children
|
|
2027
2027
|
));
|
|
2028
2028
|
};
|
|
2029
|
-
CellGroup.defaultProps = defaultProps$
|
|
2029
|
+
CellGroup.defaultProps = defaultProps$1r;
|
|
2030
2030
|
CellGroup.displayName = "NutCellGroup";
|
|
2031
2031
|
var INFINITY = 1 / 0;
|
|
2032
2032
|
var symbolTag = "[object Symbol]";
|
|
@@ -2378,7 +2378,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2378
2378
|
},
|
|
2379
2379
|
signature: {
|
|
2380
2380
|
reSign: "重签",
|
|
2381
|
-
|
|
2381
|
+
unsupported: "对不起,当前浏览器不支持Canvas,无法使用本控件!"
|
|
2382
2382
|
},
|
|
2383
2383
|
ecard: {
|
|
2384
2384
|
chooseText: "请选择电子卡面值",
|
|
@@ -2441,7 +2441,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2441
2441
|
errorCanvasTips: "当前环境不支持Canvas"
|
|
2442
2442
|
}
|
|
2443
2443
|
};
|
|
2444
|
-
const defaultProps$
|
|
2444
|
+
const defaultProps$1q = {
|
|
2445
2445
|
locale: zhCN
|
|
2446
2446
|
};
|
|
2447
2447
|
const defaultConfigRef$1 = {
|
|
@@ -2464,7 +2464,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2464
2464
|
return cssVars;
|
|
2465
2465
|
}
|
|
2466
2466
|
const ConfigProvider = (props) => {
|
|
2467
|
-
const { children, ...config2 } = { ...defaultProps$
|
|
2467
|
+
const { children, ...config2 } = { ...defaultProps$1q, ...props };
|
|
2468
2468
|
const parentConfig = useConfig$1();
|
|
2469
2469
|
const theme = config2.theme || {};
|
|
2470
2470
|
const style = React.useMemo(
|
|
@@ -2482,9 +2482,9 @@ var __publicField = (obj, key, value) => {
|
|
|
2482
2482
|
/* @__PURE__ */ React.createElement("div", { style }, children)
|
|
2483
2483
|
);
|
|
2484
2484
|
};
|
|
2485
|
-
ConfigProvider.defaultProps = defaultProps$
|
|
2485
|
+
ConfigProvider.defaultProps = defaultProps$1q;
|
|
2486
2486
|
ConfigProvider.displayName = "NutConfigProvider";
|
|
2487
|
-
const defaultProps$
|
|
2487
|
+
const defaultProps$1p = {
|
|
2488
2488
|
fit: "fill",
|
|
2489
2489
|
position: "center",
|
|
2490
2490
|
alt: "",
|
|
@@ -2515,7 +2515,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2515
2515
|
onClick,
|
|
2516
2516
|
onLoad,
|
|
2517
2517
|
onError
|
|
2518
|
-
} = { ...defaultProps$
|
|
2518
|
+
} = { ...defaultProps$1p, ...props };
|
|
2519
2519
|
const [loading, setLoading] = React.useState(true);
|
|
2520
2520
|
const [isError, setIsError] = React.useState(false);
|
|
2521
2521
|
React.useEffect(() => {
|
|
@@ -2574,7 +2574,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2574
2574
|
showError && isError && !loading ? /* @__PURE__ */ React.createElement("div", { className: "nut-img-error" }, slotError || children || /* @__PURE__ */ React.createElement(a$l, null)) : null
|
|
2575
2575
|
);
|
|
2576
2576
|
};
|
|
2577
|
-
Image$1.defaultProps = defaultProps$
|
|
2577
|
+
Image$1.defaultProps = defaultProps$1p;
|
|
2578
2578
|
Image$1.displayName = "NutImage";
|
|
2579
2579
|
const defaultOverlayProps$1 = {
|
|
2580
2580
|
...ComponentDefaults,
|
|
@@ -2669,7 +2669,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2669
2669
|
Overlay$1.defaultProps = defaultOverlayProps$1;
|
|
2670
2670
|
Overlay$1.displayName = "NutOverlay";
|
|
2671
2671
|
const DataContext$1 = React.createContext({});
|
|
2672
|
-
const defaultProps$
|
|
2672
|
+
const defaultProps$1o = {
|
|
2673
2673
|
...ComponentDefaults,
|
|
2674
2674
|
span: "24",
|
|
2675
2675
|
offset: "0",
|
|
@@ -2677,7 +2677,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2677
2677
|
};
|
|
2678
2678
|
const Col = (props) => {
|
|
2679
2679
|
const { className, style, span, offset, children, onClick } = {
|
|
2680
|
-
...defaultProps$
|
|
2680
|
+
...defaultProps$1o,
|
|
2681
2681
|
...props
|
|
2682
2682
|
};
|
|
2683
2683
|
const [colName, setColName] = React.useState("");
|
|
@@ -2709,32 +2709,32 @@ var __publicField = (obj, key, value) => {
|
|
|
2709
2709
|
children
|
|
2710
2710
|
);
|
|
2711
2711
|
};
|
|
2712
|
-
Col.defaultProps = defaultProps$
|
|
2712
|
+
Col.defaultProps = defaultProps$1o;
|
|
2713
2713
|
Col.displayName = "NutCol";
|
|
2714
|
-
const defaultProps$
|
|
2714
|
+
const defaultProps$1n = {
|
|
2715
2715
|
...ComponentDefaults,
|
|
2716
2716
|
contentPosition: "center",
|
|
2717
2717
|
direction: "horizontal"
|
|
2718
2718
|
};
|
|
2719
|
-
const classPrefix$
|
|
2719
|
+
const classPrefix$l = `nut-divider`;
|
|
2720
2720
|
const Divider = (props) => {
|
|
2721
2721
|
const { children, contentPosition, style, className, direction, ...rest } = {
|
|
2722
|
-
...defaultProps$
|
|
2722
|
+
...defaultProps$1n,
|
|
2723
2723
|
...props
|
|
2724
2724
|
};
|
|
2725
2725
|
const classes = direction === "horizontal" ? classNames({
|
|
2726
|
-
[`${classPrefix$
|
|
2727
|
-
[`${classPrefix$
|
|
2728
|
-
[`${classPrefix$
|
|
2729
|
-
[`${classPrefix$
|
|
2730
|
-
[`${classPrefix$
|
|
2726
|
+
[`${classPrefix$l}`]: true,
|
|
2727
|
+
[`${classPrefix$l}__center`]: children,
|
|
2728
|
+
[`${classPrefix$l}__left`]: contentPosition === "left",
|
|
2729
|
+
[`${classPrefix$l}__right`]: contentPosition === "right",
|
|
2730
|
+
[`${classPrefix$l}__hairline`]: true
|
|
2731
2731
|
}) : classNames({
|
|
2732
|
-
[`${classPrefix$
|
|
2733
|
-
[`${classPrefix$
|
|
2732
|
+
[`${classPrefix$l}`]: true,
|
|
2733
|
+
[`${classPrefix$l}__vertical`]: direction === "vertical"
|
|
2734
2734
|
});
|
|
2735
2735
|
return /* @__PURE__ */ React.createElement("div", { className: `${classes} ${className || ""}`, style, ...rest }, children);
|
|
2736
2736
|
};
|
|
2737
|
-
Divider.defaultProps = defaultProps$
|
|
2737
|
+
Divider.defaultProps = defaultProps$1n;
|
|
2738
2738
|
Divider.displayName = "NutDivider";
|
|
2739
2739
|
const gridContext = {
|
|
2740
2740
|
onClick: (item, index) => {
|
|
@@ -2744,7 +2744,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2744
2744
|
const pxCheck = (value) => {
|
|
2745
2745
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
2746
2746
|
};
|
|
2747
|
-
const defaultProps$
|
|
2747
|
+
const defaultProps$1m = {
|
|
2748
2748
|
text: "",
|
|
2749
2749
|
columns: 4,
|
|
2750
2750
|
gap: 0,
|
|
@@ -2770,7 +2770,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2770
2770
|
onClick,
|
|
2771
2771
|
...rest
|
|
2772
2772
|
} = {
|
|
2773
|
-
...defaultProps$
|
|
2773
|
+
...defaultProps$1m,
|
|
2774
2774
|
...props
|
|
2775
2775
|
};
|
|
2776
2776
|
const classPrefix2 = "nut-grid-item";
|
|
@@ -2828,9 +2828,9 @@ var __publicField = (obj, key, value) => {
|
|
|
2828
2828
|
/* @__PURE__ */ React.createElement("div", { className: contentClass() }, children && /* @__PURE__ */ React.createElement(React.Fragment, null, children), text && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__text` }, text))
|
|
2829
2829
|
);
|
|
2830
2830
|
};
|
|
2831
|
-
GridItem.defaultProps = defaultProps$
|
|
2831
|
+
GridItem.defaultProps = defaultProps$1m;
|
|
2832
2832
|
GridItem.displayName = "NutGridItem";
|
|
2833
|
-
const defaultProps$
|
|
2833
|
+
const defaultProps$1l = {
|
|
2834
2834
|
columns: 4,
|
|
2835
2835
|
gap: 0,
|
|
2836
2836
|
center: true,
|
|
@@ -2851,7 +2851,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2851
2851
|
className,
|
|
2852
2852
|
onClick,
|
|
2853
2853
|
...rest
|
|
2854
|
-
} = { ...defaultProps$
|
|
2854
|
+
} = { ...defaultProps$1l, ...props };
|
|
2855
2855
|
const childrenDom = React.Children.toArray(children);
|
|
2856
2856
|
const classPrefix2 = "nut-grid";
|
|
2857
2857
|
const rootClass = () => {
|
|
@@ -2881,18 +2881,18 @@ var __publicField = (obj, key, value) => {
|
|
|
2881
2881
|
});
|
|
2882
2882
|
})));
|
|
2883
2883
|
};
|
|
2884
|
-
Grid.defaultProps = defaultProps$
|
|
2884
|
+
Grid.defaultProps = defaultProps$1l;
|
|
2885
2885
|
Grid.displayName = "NutGrid";
|
|
2886
2886
|
Grid.Item = GridItem;
|
|
2887
|
-
const defaultProps$
|
|
2887
|
+
const defaultProps$1k = {};
|
|
2888
2888
|
const Layout = (props) => {
|
|
2889
|
-
({ ...defaultProps$
|
|
2889
|
+
({ ...defaultProps$1k, ...props });
|
|
2890
2890
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-layout" }, "Layout");
|
|
2891
2891
|
};
|
|
2892
|
-
Layout.defaultProps = defaultProps$
|
|
2892
|
+
Layout.defaultProps = defaultProps$1k;
|
|
2893
2893
|
Layout.displayName = "NutLayout";
|
|
2894
|
-
const classPrefix$
|
|
2895
|
-
const defaultProps$
|
|
2894
|
+
const classPrefix$k = "nut-row";
|
|
2895
|
+
const defaultProps$1j = {
|
|
2896
2896
|
...ComponentDefaults,
|
|
2897
2897
|
type: "",
|
|
2898
2898
|
justify: "start",
|
|
@@ -2912,7 +2912,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2912
2912
|
gutter,
|
|
2913
2913
|
onClick
|
|
2914
2914
|
} = {
|
|
2915
|
-
...defaultProps$
|
|
2915
|
+
...defaultProps$1j,
|
|
2916
2916
|
...props
|
|
2917
2917
|
};
|
|
2918
2918
|
const getClass = (prefix, type2) => {
|
|
@@ -2926,7 +2926,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2926
2926
|
${getClass("justify", justify)}
|
|
2927
2927
|
${getClass("align", align)}
|
|
2928
2928
|
${getClass("flex", wrap)}
|
|
2929
|
-
${classPrefix$
|
|
2929
|
+
${classPrefix$k}
|
|
2930
2930
|
`;
|
|
2931
2931
|
};
|
|
2932
2932
|
const parentRow = {
|
|
@@ -2944,7 +2944,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2944
2944
|
children
|
|
2945
2945
|
));
|
|
2946
2946
|
};
|
|
2947
|
-
Row.defaultProps = defaultProps$
|
|
2947
|
+
Row.defaultProps = defaultProps$1j;
|
|
2948
2948
|
Row.displayName = "NutRow";
|
|
2949
2949
|
function useWatch(dep, callback, config2 = { immediate: false }) {
|
|
2950
2950
|
const { immediate } = config2;
|
|
@@ -2969,6 +2969,35 @@ var __publicField = (obj, key, value) => {
|
|
|
2969
2969
|
stop.current = true;
|
|
2970
2970
|
};
|
|
2971
2971
|
}
|
|
2972
|
+
function isWindow(val) {
|
|
2973
|
+
return val === window;
|
|
2974
|
+
}
|
|
2975
|
+
const getRect = (elementRef) => {
|
|
2976
|
+
const element = elementRef;
|
|
2977
|
+
if (isWindow(element)) {
|
|
2978
|
+
const width = element.innerWidth;
|
|
2979
|
+
const height = element.innerHeight;
|
|
2980
|
+
return {
|
|
2981
|
+
top: 0,
|
|
2982
|
+
left: 0,
|
|
2983
|
+
right: width,
|
|
2984
|
+
bottom: height,
|
|
2985
|
+
width,
|
|
2986
|
+
height
|
|
2987
|
+
};
|
|
2988
|
+
}
|
|
2989
|
+
if (element && element.getBoundingClientRect) {
|
|
2990
|
+
return element.getBoundingClientRect();
|
|
2991
|
+
}
|
|
2992
|
+
return {
|
|
2993
|
+
top: 0,
|
|
2994
|
+
left: 0,
|
|
2995
|
+
right: 0,
|
|
2996
|
+
bottom: 0,
|
|
2997
|
+
width: 0,
|
|
2998
|
+
height: 0
|
|
2999
|
+
};
|
|
3000
|
+
};
|
|
2972
3001
|
const getRectByTaro = async (element) => {
|
|
2973
3002
|
if (element) {
|
|
2974
3003
|
const res = await element.getBoundingClientRect();
|
|
@@ -2997,12 +3026,12 @@ var __publicField = (obj, key, value) => {
|
|
|
2997
3026
|
}
|
|
2998
3027
|
return root2;
|
|
2999
3028
|
}
|
|
3000
|
-
const defaultProps$
|
|
3029
|
+
const defaultProps$1i = {
|
|
3001
3030
|
...ComponentDefaults,
|
|
3002
3031
|
position: "top",
|
|
3003
3032
|
zIndex: 2e3
|
|
3004
3033
|
};
|
|
3005
|
-
const classPrefix$
|
|
3034
|
+
const classPrefix$j = "nut-sticky";
|
|
3006
3035
|
const Sticky = (props) => {
|
|
3007
3036
|
const {
|
|
3008
3037
|
position,
|
|
@@ -3014,7 +3043,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3014
3043
|
className,
|
|
3015
3044
|
onChange,
|
|
3016
3045
|
...rest
|
|
3017
|
-
} = { ...defaultProps$
|
|
3046
|
+
} = { ...defaultProps$1i, ...props };
|
|
3018
3047
|
const stickyRef = React.useRef(null);
|
|
3019
3048
|
const rootRef = React.useRef(null);
|
|
3020
3049
|
const [rootRect, setRootRect] = React.useState({});
|
|
@@ -3078,7 +3107,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3078
3107
|
setFixed(windowHeight - threshold < curRootRect.bottom);
|
|
3079
3108
|
}
|
|
3080
3109
|
} else {
|
|
3081
|
-
console.
|
|
3110
|
+
console.warn("getRectByTaro获取失败", { stickyRect, curRootRect });
|
|
3082
3111
|
}
|
|
3083
3112
|
};
|
|
3084
3113
|
const getElement = React.useCallback(() => {
|
|
@@ -3104,7 +3133,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3104
3133
|
{
|
|
3105
3134
|
ref: rootRef,
|
|
3106
3135
|
style: rootStyle,
|
|
3107
|
-
className: classNames(classPrefix$
|
|
3136
|
+
className: classNames(classPrefix$j, className),
|
|
3108
3137
|
...rest
|
|
3109
3138
|
},
|
|
3110
3139
|
/* @__PURE__ */ React.createElement(
|
|
@@ -3120,9 +3149,9 @@ var __publicField = (obj, key, value) => {
|
|
|
3120
3149
|
)
|
|
3121
3150
|
);
|
|
3122
3151
|
};
|
|
3123
|
-
Sticky.defaultProps = defaultProps$
|
|
3152
|
+
Sticky.defaultProps = defaultProps$1i;
|
|
3124
3153
|
Sticky.displayName = "NutSticky";
|
|
3125
|
-
const defaultProps$
|
|
3154
|
+
const defaultProps$1h = {
|
|
3126
3155
|
...ComponentDefaults,
|
|
3127
3156
|
threshold: 200,
|
|
3128
3157
|
zIndex: 10,
|
|
@@ -3130,7 +3159,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3130
3159
|
};
|
|
3131
3160
|
const BackTop = (props) => {
|
|
3132
3161
|
const { children, threshold, zIndex, className, duration, style, onClick } = {
|
|
3133
|
-
...defaultProps$
|
|
3162
|
+
...defaultProps$1h,
|
|
3134
3163
|
...props
|
|
3135
3164
|
};
|
|
3136
3165
|
const classPrefix2 = "nut-backtop";
|
|
@@ -3168,10 +3197,10 @@ var __publicField = (obj, key, value) => {
|
|
|
3168
3197
|
children || /* @__PURE__ */ React.createElement(a$2, { width: 19, height: 19, className: "nut-backtop-main" })
|
|
3169
3198
|
);
|
|
3170
3199
|
};
|
|
3171
|
-
BackTop.defaultProps = defaultProps$
|
|
3200
|
+
BackTop.defaultProps = defaultProps$1h;
|
|
3172
3201
|
BackTop.displayName = "NutBackTop";
|
|
3173
3202
|
const elevatorContext = React.createContext({});
|
|
3174
|
-
const defaultProps$
|
|
3203
|
+
const defaultProps$1g = {
|
|
3175
3204
|
...ComponentDefaults,
|
|
3176
3205
|
height: "200px",
|
|
3177
3206
|
floorKey: "title",
|
|
@@ -3198,7 +3227,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3198
3227
|
children,
|
|
3199
3228
|
...rest
|
|
3200
3229
|
} = {
|
|
3201
|
-
...defaultProps$
|
|
3230
|
+
...defaultProps$1g,
|
|
3202
3231
|
...props
|
|
3203
3232
|
};
|
|
3204
3233
|
const classPrefix2 = "nut-elevator";
|
|
@@ -3410,10 +3439,10 @@ var __publicField = (obj, key, value) => {
|
|
|
3410
3439
|
})
|
|
3411
3440
|
))) : null, sticky && scrollY > 0 ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__list__fixed` }, /* @__PURE__ */ React.createElement("span", { className: `${classPrefix2}__list__fixed__title` }, list[currentIndex][floorKey])) : null);
|
|
3412
3441
|
};
|
|
3413
|
-
Elevator.defaultProps = defaultProps$
|
|
3442
|
+
Elevator.defaultProps = defaultProps$1g;
|
|
3414
3443
|
Elevator.displayName = "NutElevator";
|
|
3415
3444
|
Elevator.Context = elevatorContext;
|
|
3416
|
-
const defaultProps$
|
|
3445
|
+
const defaultProps$1f = {
|
|
3417
3446
|
...ComponentDefaults,
|
|
3418
3447
|
activeText: "",
|
|
3419
3448
|
inactiveText: "",
|
|
@@ -3441,7 +3470,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3441
3470
|
content,
|
|
3442
3471
|
...rest
|
|
3443
3472
|
} = {
|
|
3444
|
-
...defaultProps$
|
|
3473
|
+
...defaultProps$1f,
|
|
3445
3474
|
...props
|
|
3446
3475
|
};
|
|
3447
3476
|
const classPrefix2 = "nut-fixednav";
|
|
@@ -3493,9 +3522,9 @@ var __publicField = (obj, key, value) => {
|
|
|
3493
3522
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__btn`, onClick: () => onUpdateValue() }, content || /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(a$i, { color: "#fff" }), /* @__PURE__ */ React.createElement("div", { className: "text" }, visible ? activeText || locale.fixednav.activeText : inactiveText || locale.fixednav.inactiveText)))
|
|
3494
3523
|
);
|
|
3495
3524
|
};
|
|
3496
|
-
FixedNav.defaultProps = defaultProps$
|
|
3525
|
+
FixedNav.defaultProps = defaultProps$1f;
|
|
3497
3526
|
FixedNav.displayName = "NutFixedNav";
|
|
3498
|
-
const defaultProps$
|
|
3527
|
+
const defaultProps$1e = {
|
|
3499
3528
|
...ComponentDefaults,
|
|
3500
3529
|
left: "",
|
|
3501
3530
|
right: "",
|
|
@@ -3518,7 +3547,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3518
3547
|
zIndex,
|
|
3519
3548
|
onClickBack
|
|
3520
3549
|
} = {
|
|
3521
|
-
...defaultProps$
|
|
3550
|
+
...defaultProps$1e,
|
|
3522
3551
|
...props
|
|
3523
3552
|
};
|
|
3524
3553
|
const classPrefix2 = "nut-navbar";
|
|
@@ -3555,7 +3584,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3555
3584
|
const cls = classNames(classPrefix2, classes, className);
|
|
3556
3585
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}--placeholder` }, renderWrapper()) : renderWrapper());
|
|
3557
3586
|
};
|
|
3558
|
-
NavBar.defaultProps = defaultProps$
|
|
3587
|
+
NavBar.defaultProps = defaultProps$1e;
|
|
3559
3588
|
NavBar.displayName = "NutNavBar";
|
|
3560
3589
|
function _extends() {
|
|
3561
3590
|
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
@@ -5298,7 +5327,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5298
5327
|
onExited: propTypesExports.func
|
|
5299
5328
|
}) : {};
|
|
5300
5329
|
const CSSTransition$1 = CSSTransition;
|
|
5301
|
-
const defaultProps$
|
|
5330
|
+
const defaultProps$1d = {
|
|
5302
5331
|
...ComponentDefaults,
|
|
5303
5332
|
position: "center",
|
|
5304
5333
|
transition: "",
|
|
@@ -5480,15 +5509,16 @@ var __publicField = (obj, key, value) => {
|
|
|
5480
5509
|
}, [position, transition]);
|
|
5481
5510
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, renderToContainer(portal, renderNode()));
|
|
5482
5511
|
};
|
|
5483
|
-
Popup.defaultProps = defaultProps$
|
|
5512
|
+
Popup.defaultProps = defaultProps$1d;
|
|
5484
5513
|
Popup.displayName = "NutPopup";
|
|
5485
5514
|
const OffsetContext = React.createContext(20);
|
|
5486
|
-
const defaultProps$
|
|
5487
|
-
|
|
5515
|
+
const defaultProps$1c = {
|
|
5516
|
+
...ComponentDefaults,
|
|
5488
5517
|
position: "left",
|
|
5489
5518
|
width: "80%"
|
|
5490
5519
|
};
|
|
5491
5520
|
const SideNavBar = (props) => {
|
|
5521
|
+
const classPrefix2 = "nut-sidenavbar";
|
|
5492
5522
|
const {
|
|
5493
5523
|
title,
|
|
5494
5524
|
visible,
|
|
@@ -5496,14 +5526,13 @@ var __publicField = (obj, key, value) => {
|
|
|
5496
5526
|
position,
|
|
5497
5527
|
children,
|
|
5498
5528
|
className,
|
|
5499
|
-
showhead,
|
|
5500
5529
|
onClose,
|
|
5501
5530
|
...rest
|
|
5502
5531
|
} = {
|
|
5503
|
-
...defaultProps$
|
|
5532
|
+
...defaultProps$1c,
|
|
5504
5533
|
...props
|
|
5505
5534
|
};
|
|
5506
|
-
const
|
|
5535
|
+
const indent = props.indent ? Number(props.indent) : 20;
|
|
5507
5536
|
const [sidenavbarShow, setSidenavbarShow] = React.useState(true);
|
|
5508
5537
|
const handleClick = () => {
|
|
5509
5538
|
setSidenavbarShow(!sidenavbarShow);
|
|
@@ -5516,61 +5545,56 @@ var __publicField = (obj, key, value) => {
|
|
|
5516
5545
|
position,
|
|
5517
5546
|
onClose
|
|
5518
5547
|
},
|
|
5519
|
-
/* @__PURE__ */ React.createElement(
|
|
5548
|
+
/* @__PURE__ */ React.createElement("div", { className: classNames(className, classPrefix2), ...rest }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__content` }, /* @__PURE__ */ React.createElement(
|
|
5520
5549
|
"div",
|
|
5521
5550
|
{
|
|
5522
|
-
className:
|
|
5523
|
-
|
|
5551
|
+
className: `${classPrefix2}__list ${sidenavbarShow ? "sidenavbar-show" : "sidenavbar-hide"}`,
|
|
5552
|
+
onClick: handleClick
|
|
5524
5553
|
},
|
|
5525
|
-
/* @__PURE__ */ React.createElement(
|
|
5554
|
+
/* @__PURE__ */ React.createElement(
|
|
5526
5555
|
"div",
|
|
5527
5556
|
{
|
|
5528
|
-
className:
|
|
5529
|
-
|
|
5557
|
+
className: `${classPrefix2}__title ${classPrefix2}-border-bt`,
|
|
5558
|
+
style: { paddingLeft: `${indent}px` }
|
|
5530
5559
|
},
|
|
5560
|
+
title,
|
|
5531
5561
|
/* @__PURE__ */ React.createElement(
|
|
5532
|
-
"
|
|
5562
|
+
"i",
|
|
5533
5563
|
{
|
|
5534
|
-
className:
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
{
|
|
5541
|
-
className: `arrow-icon ${sidenavbarShow ? "arrow-up" : "arrow-down"}`
|
|
5542
|
-
}
|
|
5543
|
-
)
|
|
5544
|
-
),
|
|
5545
|
-
/* @__PURE__ */ React.createElement(OffsetContext.Provider, { value: offset }, /* @__PURE__ */ React.createElement("div", { className: "nut-sidenavbar__content" }, children))
|
|
5546
|
-
))
|
|
5547
|
-
)
|
|
5564
|
+
className: `arrow-icon ${sidenavbarShow ? "arrow-up" : "arrow-down"}`
|
|
5565
|
+
}
|
|
5566
|
+
)
|
|
5567
|
+
),
|
|
5568
|
+
/* @__PURE__ */ React.createElement(OffsetContext.Provider, { value: indent }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__content` }, children))
|
|
5569
|
+
)))
|
|
5548
5570
|
);
|
|
5549
5571
|
};
|
|
5550
|
-
SideNavBar.defaultProps = defaultProps$
|
|
5572
|
+
SideNavBar.defaultProps = defaultProps$1c;
|
|
5551
5573
|
SideNavBar.displayName = "NutSideNavBar";
|
|
5552
5574
|
const SideNavBarItem = (props) => {
|
|
5553
|
-
const
|
|
5575
|
+
const classPrefix2 = "nut-subsidenavbar";
|
|
5576
|
+
const { title, value, children, onClick, ...rest } = props;
|
|
5554
5577
|
const clickFn = (e) => {
|
|
5555
5578
|
e.stopPropagation();
|
|
5556
|
-
onClick && onClick({ title,
|
|
5579
|
+
onClick && onClick({ title, value });
|
|
5557
5580
|
};
|
|
5558
5581
|
return /* @__PURE__ */ React.createElement(
|
|
5559
5582
|
"div",
|
|
5560
5583
|
{
|
|
5561
|
-
className:
|
|
5584
|
+
className: `${classPrefix2}__item ${classPrefix2}-border-bt`,
|
|
5562
5585
|
onClick: clickFn,
|
|
5563
5586
|
...rest
|
|
5564
5587
|
},
|
|
5565
5588
|
title
|
|
5566
5589
|
);
|
|
5567
5590
|
};
|
|
5568
|
-
const defaultProps$
|
|
5591
|
+
const defaultProps$1b = {
|
|
5569
5592
|
open: true
|
|
5570
5593
|
};
|
|
5571
5594
|
const SubSideNavBar = (props) => {
|
|
5572
|
-
const
|
|
5573
|
-
|
|
5595
|
+
const classPrefix2 = "nut-subsidenavbar";
|
|
5596
|
+
const { title, value, children, onClick, open, ...rest } = {
|
|
5597
|
+
...defaultProps$1b,
|
|
5574
5598
|
...props
|
|
5575
5599
|
};
|
|
5576
5600
|
const [subShow, setSubShow] = React.useState(open);
|
|
@@ -5579,7 +5603,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5579
5603
|
const setListLevel = React.useCallback(
|
|
5580
5604
|
(nodeList, level = 1) => {
|
|
5581
5605
|
const titleClass = nodeList[0].className;
|
|
5582
|
-
if (titleClass.includes(
|
|
5606
|
+
if (titleClass.includes(`${classPrefix2}__title`)) {
|
|
5583
5607
|
const left = offset * (level + 1);
|
|
5584
5608
|
nodeList[0].style.paddingLeft = `${left}px`;
|
|
5585
5609
|
}
|
|
@@ -5588,11 +5612,11 @@ var __publicField = (obj, key, value) => {
|
|
|
5588
5612
|
);
|
|
5589
5613
|
childNodes.forEach((item) => {
|
|
5590
5614
|
const itemClass = item.className;
|
|
5591
|
-
if (itemClass.includes(
|
|
5615
|
+
if (itemClass.includes(`${classPrefix2}__item`)) {
|
|
5592
5616
|
const left = offset * (level + 2);
|
|
5593
5617
|
item.style.paddingLeft = `${left}px`;
|
|
5594
5618
|
}
|
|
5595
|
-
if (itemClass.includes(
|
|
5619
|
+
if (itemClass.includes(`${classPrefix2}__list`)) {
|
|
5596
5620
|
let level2 = item.getAttribute("level") ? Number(item.getAttribute("level")) : 1;
|
|
5597
5621
|
level2 += 1;
|
|
5598
5622
|
item.setAttribute("level", level2.toString());
|
|
@@ -5606,7 +5630,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5606
5630
|
e.stopPropagation();
|
|
5607
5631
|
setSubShow(!subShow);
|
|
5608
5632
|
const isShow = !subShow;
|
|
5609
|
-
onClick && onClick({ title,
|
|
5633
|
+
onClick && onClick({ title, value, isShow });
|
|
5610
5634
|
};
|
|
5611
5635
|
React.useEffect(() => {
|
|
5612
5636
|
var _a, _b;
|
|
@@ -5614,9 +5638,9 @@ var __publicField = (obj, key, value) => {
|
|
|
5614
5638
|
(_b = listRef.current) == null ? void 0 : _b.setAttribute("level", "1");
|
|
5615
5639
|
childNodes && setListLevel(childNodes);
|
|
5616
5640
|
}, [setListLevel]);
|
|
5617
|
-
const divClass = subShow ?
|
|
5641
|
+
const divClass = subShow ? `${classPrefix2}__list sidenavbar-show` : `${classPrefix2}__list sidenavbar-hide`;
|
|
5618
5642
|
const iconClass = subShow ? "arrow-icon arrow-down" : "arrow-icon arrow-up";
|
|
5619
|
-
return /* @__PURE__ */ React.createElement("div", { className: divClass, ref: listRef, onClick: clickFn, ...rest }, /* @__PURE__ */ React.createElement("div", { className:
|
|
5643
|
+
return /* @__PURE__ */ React.createElement("div", { className: divClass, ref: listRef, onClick: clickFn, ...rest }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__title ${classPrefix2}-border-bt` }, title, " ", /* @__PURE__ */ React.createElement("i", { className: iconClass })), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__content` }, children));
|
|
5620
5644
|
};
|
|
5621
5645
|
function usePropsValue({
|
|
5622
5646
|
value,
|
|
@@ -5637,7 +5661,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5637
5661
|
}
|
|
5638
5662
|
return [uncontrolled, handleUncontrolledChange];
|
|
5639
5663
|
}
|
|
5640
|
-
const defaultProps$
|
|
5664
|
+
const defaultProps$1a = {
|
|
5641
5665
|
...ComponentDefaults,
|
|
5642
5666
|
value: "",
|
|
5643
5667
|
dot: false,
|
|
@@ -5648,7 +5672,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5648
5672
|
};
|
|
5649
5673
|
const Badge = (props) => {
|
|
5650
5674
|
const { className, style, value, max, children, dot, top, right, color } = {
|
|
5651
|
-
...defaultProps$
|
|
5675
|
+
...defaultProps$1a,
|
|
5652
5676
|
...props
|
|
5653
5677
|
};
|
|
5654
5678
|
const classPrefix2 = "nut-badge";
|
|
@@ -5675,9 +5699,9 @@ var __publicField = (obj, key, value) => {
|
|
|
5675
5699
|
};
|
|
5676
5700
|
return /* @__PURE__ */ React.createElement("div", { className: classes, style }, typeof value === "object" && value && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__icon` }, value), /* @__PURE__ */ React.createElement("div", null, children), /* @__PURE__ */ React.createElement("div", { className: contentClasses, style: getStyle() }, content()));
|
|
5677
5701
|
};
|
|
5678
|
-
Badge.defaultProps = defaultProps$
|
|
5702
|
+
Badge.defaultProps = defaultProps$1a;
|
|
5679
5703
|
Badge.displayName = "NutBadge";
|
|
5680
|
-
const defaultProps$
|
|
5704
|
+
const defaultProps$19 = {
|
|
5681
5705
|
...ComponentDefaults,
|
|
5682
5706
|
title: "",
|
|
5683
5707
|
icon: null,
|
|
@@ -5699,7 +5723,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5699
5723
|
handleClick,
|
|
5700
5724
|
...rest
|
|
5701
5725
|
} = {
|
|
5702
|
-
...defaultProps$
|
|
5726
|
+
...defaultProps$19,
|
|
5703
5727
|
...props
|
|
5704
5728
|
};
|
|
5705
5729
|
const classPrefix2 = "nut-tabbar-item";
|
|
@@ -5723,7 +5747,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5723
5747
|
icon ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Badge, { ...rest }, /* @__PURE__ */ React.createElement("div", { className: boxPrefix }, icon)), /* @__PURE__ */ React.createElement("div", { className: titleClass }, title)) : /* @__PURE__ */ React.createElement(Badge, { ...rest }, /* @__PURE__ */ React.createElement("div", { className: titleClass }, title))
|
|
5724
5748
|
);
|
|
5725
5749
|
};
|
|
5726
|
-
const defaultProps$
|
|
5750
|
+
const defaultProps$18 = {
|
|
5727
5751
|
...ComponentDefaults,
|
|
5728
5752
|
defaultValue: 0,
|
|
5729
5753
|
fixed: false,
|
|
@@ -5746,7 +5770,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5746
5770
|
style,
|
|
5747
5771
|
onSwitch
|
|
5748
5772
|
} = {
|
|
5749
|
-
...defaultProps$
|
|
5773
|
+
...defaultProps$18,
|
|
5750
5774
|
...props
|
|
5751
5775
|
};
|
|
5752
5776
|
const classPrefix2 = "nut-tabbar";
|
|
@@ -5781,17 +5805,17 @@ var __publicField = (obj, key, value) => {
|
|
|
5781
5805
|
(fixed || safeArea) && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__safe-area` })
|
|
5782
5806
|
);
|
|
5783
5807
|
};
|
|
5784
|
-
Tabbar.defaultProps = defaultProps$
|
|
5808
|
+
Tabbar.defaultProps = defaultProps$18;
|
|
5785
5809
|
Tabbar.displayName = "NutTabbar";
|
|
5786
5810
|
Tabbar.Item = TabbarItem;
|
|
5787
|
-
const defaultProps$
|
|
5811
|
+
const defaultProps$17 = {
|
|
5788
5812
|
title: "",
|
|
5789
5813
|
value: "",
|
|
5790
5814
|
disabled: false
|
|
5791
5815
|
};
|
|
5792
5816
|
const TabPane = (props) => {
|
|
5793
5817
|
const { children, autoHeightClassName, className, disabled } = {
|
|
5794
|
-
...defaultProps$
|
|
5818
|
+
...defaultProps$17,
|
|
5795
5819
|
...props
|
|
5796
5820
|
};
|
|
5797
5821
|
const classPrefix2 = "nut-tabpane";
|
|
@@ -5809,7 +5833,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5809
5833
|
const [, updateState] = React.useState();
|
|
5810
5834
|
return React.useCallback(() => updateState({}), []);
|
|
5811
5835
|
}
|
|
5812
|
-
const defaultProps$
|
|
5836
|
+
const defaultProps$16 = {
|
|
5813
5837
|
...ComponentDefaults,
|
|
5814
5838
|
tabStyle: {},
|
|
5815
5839
|
activeColor: "",
|
|
@@ -5818,7 +5842,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5818
5842
|
duration: 300,
|
|
5819
5843
|
autoHeight: false
|
|
5820
5844
|
};
|
|
5821
|
-
const classPrefix$
|
|
5845
|
+
const classPrefix$i = "nut-tabs";
|
|
5822
5846
|
const Tabs = (props) => {
|
|
5823
5847
|
const {
|
|
5824
5848
|
activeColor,
|
|
@@ -5835,7 +5859,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5835
5859
|
autoHeight,
|
|
5836
5860
|
...rest
|
|
5837
5861
|
} = {
|
|
5838
|
-
...defaultProps$
|
|
5862
|
+
...defaultProps$16,
|
|
5839
5863
|
...props
|
|
5840
5864
|
};
|
|
5841
5865
|
const [value, setValue] = usePropsValue({
|
|
@@ -5880,14 +5904,14 @@ var __publicField = (obj, key, value) => {
|
|
|
5880
5904
|
}
|
|
5881
5905
|
}, [children]);
|
|
5882
5906
|
const classes = classNames(
|
|
5883
|
-
classPrefix$
|
|
5884
|
-
`${classPrefix$
|
|
5907
|
+
classPrefix$i,
|
|
5908
|
+
`${classPrefix$i}--${direction}`,
|
|
5885
5909
|
className
|
|
5886
5910
|
);
|
|
5887
|
-
const classesTitle = classNames(`${classPrefix$
|
|
5888
|
-
[`${classPrefix$
|
|
5889
|
-
[`${classPrefix$
|
|
5890
|
-
[`${classPrefix$
|
|
5911
|
+
const classesTitle = classNames(`${classPrefix$i}__titles`, {
|
|
5912
|
+
[`${classPrefix$i}__titles--${activeType}`]: activeType,
|
|
5913
|
+
[`${classPrefix$i}__titles--scrollable`]: true,
|
|
5914
|
+
[`${classPrefix$i}__titles--${align}`]: align
|
|
5891
5915
|
});
|
|
5892
5916
|
const tabsActiveStyle = {
|
|
5893
5917
|
color: activeType === "smile" ? activeColor : "",
|
|
@@ -5933,7 +5957,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5933
5957
|
onClick: (e) => {
|
|
5934
5958
|
tabChange(item);
|
|
5935
5959
|
},
|
|
5936
|
-
className: classNames(`${classPrefix$
|
|
5960
|
+
className: classNames(`${classPrefix$i}__titles-item`, {
|
|
5937
5961
|
[`nut-tabs__titles-item--active`]: !item.disabled && String(item.value) === String(value),
|
|
5938
5962
|
[`nut-tabs__titles-item--disabled`]: item.disabled,
|
|
5939
5963
|
[`nut-tabs__titles-item--${align}`]: align
|
|
@@ -5943,14 +5967,14 @@ var __publicField = (obj, key, value) => {
|
|
|
5943
5967
|
activeType === "line" && /* @__PURE__ */ React.createElement(
|
|
5944
5968
|
components.View,
|
|
5945
5969
|
{
|
|
5946
|
-
className: `${classPrefix$
|
|
5970
|
+
className: `${classPrefix$i}__titles-item__line`,
|
|
5947
5971
|
style: tabsActiveStyle
|
|
5948
5972
|
}
|
|
5949
5973
|
),
|
|
5950
5974
|
activeType === "smile" && /* @__PURE__ */ React.createElement(
|
|
5951
5975
|
components.View,
|
|
5952
5976
|
{
|
|
5953
|
-
className: `${classPrefix$
|
|
5977
|
+
className: `${classPrefix$i}__titles-item__smile`,
|
|
5954
5978
|
style: tabsActiveStyle
|
|
5955
5979
|
},
|
|
5956
5980
|
/* @__PURE__ */ React.createElement(a$j, { color: activeColor, width: 40, height: 20 })
|
|
@@ -5962,14 +5986,14 @@ var __publicField = (obj, key, value) => {
|
|
|
5962
5986
|
{
|
|
5963
5987
|
ellipsis: true
|
|
5964
5988
|
},
|
|
5965
|
-
`${classPrefix$
|
|
5989
|
+
`${classPrefix$i}__titles-item__text`
|
|
5966
5990
|
)
|
|
5967
5991
|
},
|
|
5968
5992
|
item.title
|
|
5969
5993
|
)
|
|
5970
5994
|
);
|
|
5971
5995
|
})
|
|
5972
|
-
), /* @__PURE__ */ React.createElement(components.View, { className: `${classPrefix$
|
|
5996
|
+
), /* @__PURE__ */ React.createElement(components.View, { className: `${classPrefix$i}__content__wrap` }, /* @__PURE__ */ React.createElement(components.View, { className: `${classPrefix$i}__content`, style: contentStyle }, React.Children.map(children, (child, idx) => {
|
|
5973
5997
|
if (!React.isValidElement(child)) {
|
|
5974
5998
|
return null;
|
|
5975
5999
|
}
|
|
@@ -5986,7 +6010,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5986
6010
|
return React.cloneElement(child, childProps);
|
|
5987
6011
|
}))));
|
|
5988
6012
|
};
|
|
5989
|
-
Tabs.defaultProps = defaultProps$
|
|
6013
|
+
Tabs.defaultProps = defaultProps$16;
|
|
5990
6014
|
Tabs.displayName = "NutTabs";
|
|
5991
6015
|
Tabs.TabPane = TabPane;
|
|
5992
6016
|
var classnameExports = {};
|
|
@@ -6121,7 +6145,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6121
6145
|
const useConfig = () => {
|
|
6122
6146
|
return React.useContext(ConfigContext) ?? getDefaultConfig();
|
|
6123
6147
|
};
|
|
6124
|
-
const defaultProps$
|
|
6148
|
+
const defaultProps$15 = {
|
|
6125
6149
|
type: "custom",
|
|
6126
6150
|
existAddress: [],
|
|
6127
6151
|
defaultIcon: null,
|
|
@@ -6143,7 +6167,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6143
6167
|
onClose,
|
|
6144
6168
|
onSwitchModule,
|
|
6145
6169
|
...rest
|
|
6146
|
-
} = { ...defaultProps$
|
|
6170
|
+
} = { ...defaultProps$15, ...props };
|
|
6147
6171
|
const b2 = cn("address");
|
|
6148
6172
|
const selectedExist = (item) => {
|
|
6149
6173
|
const copyExistAdd = existAddress;
|
|
@@ -6173,7 +6197,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6173
6197
|
return /* @__PURE__ */ React.createElement("li", { className: b2("exist-item"), key: index }, /* @__PURE__ */ React.createElement("div", { onClick: () => selectedExist(item) }, item.selectedAddress ? selectedIcon : defaultIcon, /* @__PURE__ */ React.createElement("div", { className: b2("exist-item-info") }, item.name && item.phone && /* @__PURE__ */ React.createElement("div", { className: "exist-item-info-top" }, /* @__PURE__ */ React.createElement("div", { className: "exist-item-info-name" }, item.name), /* @__PURE__ */ React.createElement("div", { className: "exist-item-info-phone" }, item.phone)), /* @__PURE__ */ React.createElement("div", { className: "exist-item-info-bottom" }, /* @__PURE__ */ React.createElement("div", null, item.provinceName + item.cityName + item.countyName + item.townName + item.addressDetail)))));
|
|
6174
6198
|
}))), isShowCustomAddress && /* @__PURE__ */ React.createElement("div", { className: b2("choose-other"), onClick: onSwitch }, /* @__PURE__ */ React.createElement("div", { className: b2("choose-other-btn") }, customAndExistTitle || locale.address.chooseAnotherAddress)));
|
|
6175
6199
|
};
|
|
6176
|
-
const defaultProps$
|
|
6200
|
+
const defaultProps$14 = {
|
|
6177
6201
|
modelValue: [],
|
|
6178
6202
|
type: "custom",
|
|
6179
6203
|
province: [],
|
|
@@ -6198,7 +6222,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6198
6222
|
onClose,
|
|
6199
6223
|
...rest
|
|
6200
6224
|
} = {
|
|
6201
|
-
...defaultProps$
|
|
6225
|
+
...defaultProps$14,
|
|
6202
6226
|
...props
|
|
6203
6227
|
};
|
|
6204
6228
|
const b2 = cn("address");
|
|
@@ -6362,28 +6386,28 @@ var __publicField = (obj, key, value) => {
|
|
|
6362
6386
|
nextAreaList(item);
|
|
6363
6387
|
};
|
|
6364
6388
|
React.useEffect(() => {
|
|
6365
|
-
const { province: province2 } = { ...defaultProps$
|
|
6389
|
+
const { province: province2 } = { ...defaultProps$14, ...props };
|
|
6366
6390
|
setRegionList({
|
|
6367
6391
|
...regionList,
|
|
6368
6392
|
province: isCustom2() ? transformData(province2) : province2
|
|
6369
6393
|
});
|
|
6370
6394
|
}, [province]);
|
|
6371
6395
|
React.useEffect(() => {
|
|
6372
|
-
const { city: city2 } = { ...defaultProps$
|
|
6396
|
+
const { city: city2 } = { ...defaultProps$14, ...props };
|
|
6373
6397
|
setRegionList({
|
|
6374
6398
|
...regionList,
|
|
6375
6399
|
city: isCustom2() ? transformData(city2) : city2
|
|
6376
6400
|
});
|
|
6377
6401
|
}, [city]);
|
|
6378
6402
|
React.useEffect(() => {
|
|
6379
|
-
const { country: country2 } = { ...defaultProps$
|
|
6403
|
+
const { country: country2 } = { ...defaultProps$14, ...props };
|
|
6380
6404
|
setRegionList({
|
|
6381
6405
|
...regionList,
|
|
6382
6406
|
country: isCustom2() ? transformData(country2) : country2
|
|
6383
6407
|
});
|
|
6384
6408
|
}, [country]);
|
|
6385
6409
|
React.useEffect(() => {
|
|
6386
|
-
const { town: town2 } = { ...defaultProps$
|
|
6410
|
+
const { town: town2 } = { ...defaultProps$14, ...props };
|
|
6387
6411
|
setRegionList({
|
|
6388
6412
|
...regionList,
|
|
6389
6413
|
town: isCustom2() ? transformData(town2) : town2
|
|
@@ -6447,7 +6471,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6447
6471
|
}
|
|
6448
6472
|
)));
|
|
6449
6473
|
};
|
|
6450
|
-
const defaultProps$
|
|
6474
|
+
const defaultProps$13 = {
|
|
6451
6475
|
...ComponentDefaults,
|
|
6452
6476
|
modelValue: false,
|
|
6453
6477
|
modelSelect: [],
|
|
@@ -6498,7 +6522,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6498
6522
|
className,
|
|
6499
6523
|
...rest
|
|
6500
6524
|
} = {
|
|
6501
|
-
...defaultProps$
|
|
6525
|
+
...defaultProps$13,
|
|
6502
6526
|
...props
|
|
6503
6527
|
};
|
|
6504
6528
|
const b2 = cn("address");
|
|
@@ -6650,7 +6674,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6650
6674
|
)
|
|
6651
6675
|
));
|
|
6652
6676
|
};
|
|
6653
|
-
Address.defaultProps = defaultProps$
|
|
6677
|
+
Address.defaultProps = defaultProps$13;
|
|
6654
6678
|
Address.displayName = "NutAddress";
|
|
6655
6679
|
const Utils = {
|
|
6656
6680
|
/**
|
|
@@ -6783,7 +6807,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6783
6807
|
}
|
|
6784
6808
|
}
|
|
6785
6809
|
const requestAniFrame$1 = requestAniFrame();
|
|
6786
|
-
const defaultProps$
|
|
6810
|
+
const defaultProps$12 = {
|
|
6787
6811
|
type: "one",
|
|
6788
6812
|
isAutoBackFill: false,
|
|
6789
6813
|
poppable: true,
|
|
@@ -6835,7 +6859,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6835
6859
|
onUpdate,
|
|
6836
6860
|
onSelected,
|
|
6837
6861
|
onYearMonthChange
|
|
6838
|
-
} = { ...defaultProps$
|
|
6862
|
+
} = { ...defaultProps$12, ...props };
|
|
6839
6863
|
const weeks = locale.calendaritem.weekdays;
|
|
6840
6864
|
const [yearMonthTitle, setYearMonthTitle] = React.useState("");
|
|
6841
6865
|
const [monthsData, setMonthsData] = React.useState([]);
|
|
@@ -7426,9 +7450,9 @@ var __publicField = (obj, key, value) => {
|
|
|
7426
7450
|
))
|
|
7427
7451
|
), poppable && !isAutoBackFill ? /* @__PURE__ */ React.createElement("div", { className: "nut-calendar-footer" }, /* @__PURE__ */ React.createElement("div", { className: "calendar-confirm-btn", onClick: confirm }, confirmText || locale.confirm)) : ""));
|
|
7428
7452
|
});
|
|
7429
|
-
CalendarItem.defaultProps = defaultProps$
|
|
7453
|
+
CalendarItem.defaultProps = defaultProps$12;
|
|
7430
7454
|
CalendarItem.displayName = "NutCalendarItem";
|
|
7431
|
-
const defaultProps$
|
|
7455
|
+
const defaultProps$11 = {
|
|
7432
7456
|
type: "one",
|
|
7433
7457
|
isAutoBackFill: false,
|
|
7434
7458
|
poppable: true,
|
|
@@ -7484,7 +7508,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7484
7508
|
onChoose,
|
|
7485
7509
|
onSelected,
|
|
7486
7510
|
onYearMonthChange
|
|
7487
|
-
} = { ...defaultProps$
|
|
7511
|
+
} = { ...defaultProps$11, ...props };
|
|
7488
7512
|
const calendarRef = React.useRef(null);
|
|
7489
7513
|
const close = () => {
|
|
7490
7514
|
onClose && onClose();
|
|
@@ -7554,9 +7578,9 @@ var __publicField = (obj, key, value) => {
|
|
|
7554
7578
|
renderItem()
|
|
7555
7579
|
) : renderItem());
|
|
7556
7580
|
});
|
|
7557
|
-
Calendar.defaultProps = defaultProps$
|
|
7581
|
+
Calendar.defaultProps = defaultProps$11;
|
|
7558
7582
|
Calendar.displayName = "NutCalendar";
|
|
7559
|
-
const defaultProps$
|
|
7583
|
+
const defaultProps$10 = {
|
|
7560
7584
|
data: {
|
|
7561
7585
|
text: "",
|
|
7562
7586
|
value: "",
|
|
@@ -7573,7 +7597,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7573
7597
|
};
|
|
7574
7598
|
const InternalCascaderItem = (props, ref) => {
|
|
7575
7599
|
const { data, checked, activeIcon, chooseItem, activeColor } = {
|
|
7576
|
-
...defaultProps$
|
|
7600
|
+
...defaultProps$10,
|
|
7577
7601
|
...props
|
|
7578
7602
|
};
|
|
7579
7603
|
const classPrefix2 = "nut-cascader-item";
|
|
@@ -7615,7 +7639,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7615
7639
|
);
|
|
7616
7640
|
};
|
|
7617
7641
|
const CascaderItem = React.forwardRef(InternalCascaderItem);
|
|
7618
|
-
CascaderItem.defaultProps = defaultProps$
|
|
7642
|
+
CascaderItem.defaultProps = defaultProps$10;
|
|
7619
7643
|
CascaderItem.displayName = "NutCascaderItem";
|
|
7620
7644
|
const formatTree = (tree, parent, config2) => tree.map((node) => {
|
|
7621
7645
|
const {
|
|
@@ -7753,7 +7777,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7753
7777
|
}
|
|
7754
7778
|
}
|
|
7755
7779
|
const Tree$1 = Tree;
|
|
7756
|
-
const defaultProps
|
|
7780
|
+
const defaultProps$$ = {
|
|
7757
7781
|
...ComponentDefaults,
|
|
7758
7782
|
activeColor: "",
|
|
7759
7783
|
activeIcon: "checklist",
|
|
@@ -7796,7 +7820,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7796
7820
|
onClose,
|
|
7797
7821
|
onChange,
|
|
7798
7822
|
onPathChange
|
|
7799
|
-
} = { ...defaultProps
|
|
7823
|
+
} = { ...defaultProps$$, ...props };
|
|
7800
7824
|
const [tabvalue, setTabvalue] = React.useState("c1");
|
|
7801
7825
|
const [optionsData, setOptionsData] = React.useState([]);
|
|
7802
7826
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
|
|
@@ -8058,11 +8082,11 @@ var __publicField = (obj, key, value) => {
|
|
|
8058
8082
|
) : renderItem());
|
|
8059
8083
|
};
|
|
8060
8084
|
const Cascader = React.forwardRef(InternalCascader);
|
|
8061
|
-
Cascader.defaultProps = defaultProps
|
|
8085
|
+
Cascader.defaultProps = defaultProps$$;
|
|
8062
8086
|
Cascader.displayName = "NutCascader";
|
|
8063
8087
|
const CheckboxGroupContext = React.createContext(null);
|
|
8064
8088
|
const Context = CheckboxGroupContext;
|
|
8065
|
-
const defaultProps
|
|
8089
|
+
const defaultProps$_ = {
|
|
8066
8090
|
max: void 0,
|
|
8067
8091
|
labelPosition: "right",
|
|
8068
8092
|
direction: "vertical",
|
|
@@ -8070,10 +8094,10 @@ var __publicField = (obj, key, value) => {
|
|
|
8070
8094
|
},
|
|
8071
8095
|
options: []
|
|
8072
8096
|
};
|
|
8073
|
-
const classPrefix$
|
|
8097
|
+
const classPrefix$h = "nut-checkboxgroup";
|
|
8074
8098
|
const CheckboxGroup = React.forwardRef(
|
|
8075
8099
|
(props, ref) => {
|
|
8076
|
-
const { children } = { ...defaultProps
|
|
8100
|
+
const { children } = { ...defaultProps$_, ...props };
|
|
8077
8101
|
const {
|
|
8078
8102
|
className,
|
|
8079
8103
|
disabled,
|
|
@@ -8152,7 +8176,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8152
8176
|
/* @__PURE__ */ React.createElement(
|
|
8153
8177
|
"div",
|
|
8154
8178
|
{
|
|
8155
|
-
className: classNames(classPrefix$
|
|
8179
|
+
className: classNames(classPrefix$h, className, {
|
|
8156
8180
|
[`nut-checkboxgroup--${props.direction}`]: props.direction
|
|
8157
8181
|
}),
|
|
8158
8182
|
...rest
|
|
@@ -8162,9 +8186,9 @@ var __publicField = (obj, key, value) => {
|
|
|
8162
8186
|
);
|
|
8163
8187
|
}
|
|
8164
8188
|
);
|
|
8165
|
-
CheckboxGroup.defaultProps = defaultProps
|
|
8189
|
+
CheckboxGroup.defaultProps = defaultProps$_;
|
|
8166
8190
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
8167
|
-
const defaultProps$
|
|
8191
|
+
const defaultProps$Z = {
|
|
8168
8192
|
...ComponentDefaults,
|
|
8169
8193
|
disabled: false,
|
|
8170
8194
|
labelPosition: "right",
|
|
@@ -8174,10 +8198,10 @@ var __publicField = (obj, key, value) => {
|
|
|
8174
8198
|
onChange: (value) => {
|
|
8175
8199
|
}
|
|
8176
8200
|
};
|
|
8177
|
-
const classPrefix$
|
|
8201
|
+
const classPrefix$g = "nut-checkbox";
|
|
8178
8202
|
const Checkbox = (props) => {
|
|
8179
8203
|
const { children } = {
|
|
8180
|
-
...defaultProps$
|
|
8204
|
+
...defaultProps$Z,
|
|
8181
8205
|
...props
|
|
8182
8206
|
};
|
|
8183
8207
|
const {
|
|
@@ -8236,22 +8260,22 @@ var __publicField = (obj, key, value) => {
|
|
|
8236
8260
|
};
|
|
8237
8261
|
const color = () => {
|
|
8238
8262
|
if (innerDisabled) {
|
|
8239
|
-
return `${classPrefix$
|
|
8263
|
+
return `${classPrefix$g}__icon--disable`;
|
|
8240
8264
|
}
|
|
8241
8265
|
if (innerChecked) {
|
|
8242
8266
|
if (innerIndeterminate) {
|
|
8243
|
-
return `${classPrefix$
|
|
8267
|
+
return `${classPrefix$g}__icon--indeterminate`;
|
|
8244
8268
|
}
|
|
8245
|
-
return `${classPrefix$
|
|
8269
|
+
return `${classPrefix$g}__icon`;
|
|
8246
8270
|
}
|
|
8247
|
-
return `${classPrefix$
|
|
8271
|
+
return `${classPrefix$g}__icon--unchecked`;
|
|
8248
8272
|
};
|
|
8249
8273
|
const renderLabel = () => {
|
|
8250
8274
|
return /* @__PURE__ */ React.createElement(
|
|
8251
8275
|
"span",
|
|
8252
8276
|
{
|
|
8253
|
-
className: classNames(`${classPrefix$
|
|
8254
|
-
[`${classPrefix$
|
|
8277
|
+
className: classNames(`${classPrefix$g}__label `, {
|
|
8278
|
+
[`${classPrefix$g}__label--disabled`]: innerDisabled
|
|
8255
8279
|
})
|
|
8256
8280
|
},
|
|
8257
8281
|
children || label
|
|
@@ -8270,8 +8294,8 @@ var __publicField = (obj, key, value) => {
|
|
|
8270
8294
|
return /* @__PURE__ */ React.createElement(
|
|
8271
8295
|
"div",
|
|
8272
8296
|
{
|
|
8273
|
-
className: classNames(classPrefix$
|
|
8274
|
-
[`${classPrefix$
|
|
8297
|
+
className: classNames(classPrefix$g, className, {
|
|
8298
|
+
[`${classPrefix$g}--reverse`]: labelPosition === "left"
|
|
8275
8299
|
}),
|
|
8276
8300
|
...rest,
|
|
8277
8301
|
onClick: handleClick
|
|
@@ -8280,7 +8304,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8280
8304
|
renderLabel()
|
|
8281
8305
|
);
|
|
8282
8306
|
};
|
|
8283
|
-
Checkbox.defaultProps = defaultProps$
|
|
8307
|
+
Checkbox.defaultProps = defaultProps$Z;
|
|
8284
8308
|
Checkbox.displayName = "NutCheckBox";
|
|
8285
8309
|
Checkbox.Group = CheckboxGroup;
|
|
8286
8310
|
const MIN_DISTANCE = 10;
|
|
@@ -8607,7 +8631,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8607
8631
|
}, []);
|
|
8608
8632
|
return [refs.current, setRefs, reset];
|
|
8609
8633
|
}
|
|
8610
|
-
const defaultProps$
|
|
8634
|
+
const defaultProps$Y = {
|
|
8611
8635
|
...ComponentDefaults,
|
|
8612
8636
|
visible: false,
|
|
8613
8637
|
title: "",
|
|
@@ -8620,6 +8644,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8620
8644
|
const InternalPicker = (props, ref) => {
|
|
8621
8645
|
const { locale } = useConfig$1();
|
|
8622
8646
|
const {
|
|
8647
|
+
children,
|
|
8623
8648
|
visible,
|
|
8624
8649
|
title,
|
|
8625
8650
|
options = [],
|
|
@@ -8633,7 +8658,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8633
8658
|
afterClose,
|
|
8634
8659
|
onChange,
|
|
8635
8660
|
...rest
|
|
8636
|
-
} = { ...defaultProps$
|
|
8661
|
+
} = { ...defaultProps$Y, ...props };
|
|
8637
8662
|
const classPrefix2 = "nut-picker";
|
|
8638
8663
|
const classes = classNames(classPrefix2, className);
|
|
8639
8664
|
const [selectedValue, setSelectedValue] = usePropsValue({
|
|
@@ -8645,6 +8670,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8645
8670
|
(_a = props.onConfirm) == null ? void 0 : _a.call(props, setSelectedOptions(), val);
|
|
8646
8671
|
}
|
|
8647
8672
|
});
|
|
8673
|
+
const [innerValue, setInnerValue] = React.useState(selectedValue);
|
|
8648
8674
|
const [currentValue, setCurrentValue] = React.useState([]);
|
|
8649
8675
|
const [columnIndex, setColumnIndex] = React.useState(0);
|
|
8650
8676
|
const pickerRef = React.useRef(null);
|
|
@@ -8685,41 +8711,52 @@ var __publicField = (obj, key, value) => {
|
|
|
8685
8711
|
}
|
|
8686
8712
|
return "single";
|
|
8687
8713
|
};
|
|
8688
|
-
const normalListData = () => {
|
|
8714
|
+
const normalListData = (innerValue2) => {
|
|
8689
8715
|
const type = columnsType();
|
|
8690
8716
|
switch (type) {
|
|
8691
8717
|
case "multiple":
|
|
8692
8718
|
return options;
|
|
8693
8719
|
case "cascade":
|
|
8694
|
-
return formatCascade(options,
|
|
8720
|
+
return formatCascade(options, innerValue2);
|
|
8695
8721
|
default:
|
|
8696
8722
|
return [options];
|
|
8697
8723
|
}
|
|
8698
8724
|
};
|
|
8699
8725
|
const init = () => {
|
|
8700
|
-
const normalData = normalListData(
|
|
8726
|
+
const normalData = normalListData(
|
|
8727
|
+
innerValue
|
|
8728
|
+
);
|
|
8701
8729
|
setColumnsList(normalData);
|
|
8702
8730
|
const data = [];
|
|
8703
8731
|
normalData.length > 0 && normalData.map((item) => {
|
|
8704
8732
|
item[0] && data.push(item[0].value);
|
|
8705
8733
|
return item;
|
|
8706
8734
|
});
|
|
8707
|
-
if (!
|
|
8708
|
-
|
|
8735
|
+
if (!innerValue.length && innerValue.length === 0) {
|
|
8736
|
+
setInnerValue([...data]);
|
|
8709
8737
|
}
|
|
8710
8738
|
};
|
|
8739
|
+
React.useEffect(() => {
|
|
8740
|
+
setInnerValue(innerValue !== selectedValue ? selectedValue : innerValue);
|
|
8741
|
+
}, [visible]);
|
|
8742
|
+
React.useEffect(() => {
|
|
8743
|
+
if (visible) {
|
|
8744
|
+
init();
|
|
8745
|
+
}
|
|
8746
|
+
}, [options, visible]);
|
|
8711
8747
|
React.useEffect(() => {
|
|
8712
8748
|
if (!visible) {
|
|
8713
8749
|
return;
|
|
8714
8750
|
}
|
|
8715
|
-
|
|
8716
|
-
|
|
8751
|
+
Taro.getEnv() !== "WEB" && setCurrentValue(defaultValuesConvert());
|
|
8752
|
+
onChange && onChange(setSelectedOptions(), innerValue, columnIndex);
|
|
8753
|
+
}, [innerValue, columnsList, visible]);
|
|
8717
8754
|
const setSelectedOptions = () => {
|
|
8718
8755
|
const options2 = [];
|
|
8719
8756
|
let currOptions = [];
|
|
8720
8757
|
columnsList.forEach((columnOptions, index) => {
|
|
8721
8758
|
currOptions = columnOptions.filter(
|
|
8722
|
-
(item) => item.value ===
|
|
8759
|
+
(item) => item.value === innerValue[index]
|
|
8723
8760
|
);
|
|
8724
8761
|
if (currOptions[0]) {
|
|
8725
8762
|
options2.push(currOptions[0]);
|
|
@@ -8731,8 +8768,8 @@ var __publicField = (obj, key, value) => {
|
|
|
8731
8768
|
};
|
|
8732
8769
|
const defaultValuesConvert = () => {
|
|
8733
8770
|
const defaultIndexs = [];
|
|
8734
|
-
if (
|
|
8735
|
-
|
|
8771
|
+
if (innerValue.length > 0) {
|
|
8772
|
+
innerValue.forEach((value, index) => {
|
|
8736
8773
|
var _a;
|
|
8737
8774
|
for (let i = 0; i < ((_a = columnsList == null ? void 0 : columnsList[index]) == null ? void 0 : _a.length); i++) {
|
|
8738
8775
|
if (columnsList[index][i].value === value) {
|
|
@@ -8749,37 +8786,30 @@ var __publicField = (obj, key, value) => {
|
|
|
8749
8786
|
}
|
|
8750
8787
|
return defaultIndexs;
|
|
8751
8788
|
};
|
|
8752
|
-
React.useEffect(() => {
|
|
8753
|
-
if (!visible) {
|
|
8754
|
-
return;
|
|
8755
|
-
}
|
|
8756
|
-
Taro.getEnv() !== "WEB" && setCurrentValue(defaultValuesConvert());
|
|
8757
|
-
onChange && onChange(setSelectedOptions(), selectedValue, columnIndex);
|
|
8758
|
-
if (isConfirmEvent.current) {
|
|
8759
|
-
isConfirmEvent.current = false;
|
|
8760
|
-
onConfirm && onConfirm(setSelectedOptions(), selectedValue);
|
|
8761
|
-
}
|
|
8762
|
-
}, [selectedValue, columnsList, visible]);
|
|
8763
8789
|
const chooseItem = (columnOptions, columnIndex2) => {
|
|
8764
8790
|
var _a, _b;
|
|
8791
|
+
const values = [];
|
|
8792
|
+
const start = columnIndex2;
|
|
8765
8793
|
if (columnOptions && Object.keys(columnOptions).length) {
|
|
8766
|
-
if (
|
|
8794
|
+
if (values[columnIndex2] !== columnOptions.value) {
|
|
8767
8795
|
if (columnsType() === "cascade") {
|
|
8768
|
-
|
|
8769
|
-
setSelectedValue([...selectedValue]);
|
|
8796
|
+
values[columnIndex2] = columnOptions.value || "";
|
|
8770
8797
|
while ((_a = columnOptions == null ? void 0 : columnOptions.children) == null ? void 0 : _a[0]) {
|
|
8771
|
-
|
|
8772
|
-
setSelectedValue([...selectedValue]);
|
|
8798
|
+
values[columnIndex2 + 1] = columnOptions.children[0].value;
|
|
8773
8799
|
columnIndex2++;
|
|
8774
8800
|
columnOptions = columnOptions.children[0];
|
|
8775
8801
|
}
|
|
8776
8802
|
if ((_b = columnOptions == null ? void 0 : columnOptions.children) == null ? void 0 : _b.length) {
|
|
8777
|
-
|
|
8778
|
-
setSelectedValue([...selectedValue]);
|
|
8803
|
+
values[columnIndex2 + 1] = "";
|
|
8779
8804
|
}
|
|
8780
|
-
|
|
8805
|
+
const combineResult = [
|
|
8806
|
+
...innerValue.slice(0, start),
|
|
8807
|
+
...values.splice(start)
|
|
8808
|
+
];
|
|
8809
|
+
setInnerValue(combineResult);
|
|
8810
|
+
setColumnsList(normalListData(combineResult));
|
|
8781
8811
|
} else {
|
|
8782
|
-
|
|
8812
|
+
setInnerValue((data) => {
|
|
8783
8813
|
const cdata = [...data];
|
|
8784
8814
|
cdata[columnIndex2] = Object.prototype.hasOwnProperty.call(
|
|
8785
8815
|
columnOptions,
|
|
@@ -8793,16 +8823,16 @@ var __publicField = (obj, key, value) => {
|
|
|
8793
8823
|
}
|
|
8794
8824
|
};
|
|
8795
8825
|
const confirm = () => {
|
|
8796
|
-
let
|
|
8826
|
+
let moving = false;
|
|
8797
8827
|
refs.forEach((ref2) => {
|
|
8798
8828
|
if (ref2.moving)
|
|
8799
|
-
|
|
8829
|
+
moving = true;
|
|
8800
8830
|
ref2.stopMomentum();
|
|
8801
8831
|
});
|
|
8802
|
-
if (
|
|
8832
|
+
if (moving) {
|
|
8803
8833
|
isConfirmEvent.current = true;
|
|
8804
8834
|
} else {
|
|
8805
|
-
|
|
8835
|
+
setSelectedValue(innerValue);
|
|
8806
8836
|
closePicker();
|
|
8807
8837
|
}
|
|
8808
8838
|
setTimeout(() => {
|
|
@@ -8810,8 +8840,8 @@ var __publicField = (obj, key, value) => {
|
|
|
8810
8840
|
}, 0);
|
|
8811
8841
|
};
|
|
8812
8842
|
const closePicker = () => {
|
|
8813
|
-
onClose && onClose(setSelectedOptions(),
|
|
8814
|
-
afterClose && afterClose(setSelectedOptions(),
|
|
8843
|
+
onClose && onClose(setSelectedOptions(), innerValue);
|
|
8844
|
+
afterClose && afterClose(setSelectedOptions(), innerValue, pickerRef);
|
|
8815
8845
|
};
|
|
8816
8846
|
const renderTitleBar = () => {
|
|
8817
8847
|
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__control` }, /* @__PURE__ */ React.createElement(
|
|
@@ -8823,7 +8853,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8823
8853
|
locale.cancel
|
|
8824
8854
|
), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__title` }, title || ""), /* @__PURE__ */ React.createElement("span", { className: `${classPrefix2}__confirm-btn`, onClick: confirm }, locale.confirm));
|
|
8825
8855
|
};
|
|
8826
|
-
const [
|
|
8856
|
+
const [, setPickingStatus] = React.useState(false);
|
|
8827
8857
|
const pickerStart = () => {
|
|
8828
8858
|
setPickingStatus(true);
|
|
8829
8859
|
};
|
|
@@ -8854,12 +8884,12 @@ var __publicField = (obj, key, value) => {
|
|
|
8854
8884
|
closePicker();
|
|
8855
8885
|
}
|
|
8856
8886
|
},
|
|
8857
|
-
/* @__PURE__ */ React.createElement(components.View, { className: classes, style, ...rest, catchMove: true }, renderTitleBar(), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__panel`, ref: pickerRef }, Taro.getEnv() === "WEB" ? columnsList == null ? void 0 : columnsList.map((item, index) => {
|
|
8887
|
+
/* @__PURE__ */ React.createElement(components.View, { className: classes, style, ...rest, catchMove: true }, renderTitleBar(), children, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__panel`, ref: pickerRef }, Taro.getEnv() === "WEB" ? columnsList == null ? void 0 : columnsList.map((item, index) => {
|
|
8858
8888
|
return /* @__PURE__ */ React.createElement(
|
|
8859
8889
|
PickerPanel$1,
|
|
8860
8890
|
{
|
|
8861
8891
|
ref: setRefs(index),
|
|
8862
|
-
defaultValue:
|
|
8892
|
+
defaultValue: innerValue == null ? void 0 : innerValue[index],
|
|
8863
8893
|
options: item,
|
|
8864
8894
|
threeDimensional,
|
|
8865
8895
|
chooseItem: (value, index2) => chooseItem(value, index2),
|
|
@@ -8898,7 +8928,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8898
8928
|
const Picker = React.forwardRef(InternalPicker);
|
|
8899
8929
|
const Picker$1 = Picker;
|
|
8900
8930
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
8901
|
-
const defaultProps$
|
|
8931
|
+
const defaultProps$X = {
|
|
8902
8932
|
modelValue: null,
|
|
8903
8933
|
visible: false,
|
|
8904
8934
|
title: "",
|
|
@@ -8929,7 +8959,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8929
8959
|
style,
|
|
8930
8960
|
...rest
|
|
8931
8961
|
} = {
|
|
8932
|
-
...defaultProps$
|
|
8962
|
+
...defaultProps$X,
|
|
8933
8963
|
...props
|
|
8934
8964
|
};
|
|
8935
8965
|
const { locale } = useConfig$1();
|
|
@@ -9207,10 +9237,10 @@ var __publicField = (obj, key, value) => {
|
|
|
9207
9237
|
)
|
|
9208
9238
|
);
|
|
9209
9239
|
};
|
|
9210
|
-
DatePicker.defaultProps = defaultProps$
|
|
9240
|
+
DatePicker.defaultProps = defaultProps$X;
|
|
9211
9241
|
DatePicker.displayName = "NutDatePicker";
|
|
9212
9242
|
const FormItemContext = React.createContext({});
|
|
9213
|
-
const defaultProps$
|
|
9243
|
+
const defaultProps$W = {
|
|
9214
9244
|
...ComponentDefaults,
|
|
9215
9245
|
name: "",
|
|
9216
9246
|
label: "",
|
|
@@ -9259,7 +9289,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9259
9289
|
showErrorLine,
|
|
9260
9290
|
showErrorMessage
|
|
9261
9291
|
} = {
|
|
9262
|
-
...defaultProps$
|
|
9292
|
+
...defaultProps$W,
|
|
9263
9293
|
...this.props
|
|
9264
9294
|
};
|
|
9265
9295
|
const item = ((_a = this.context.errList) == null ? void 0 : _a.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
|
|
@@ -9308,7 +9338,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9308
9338
|
return this.renderLayout(returnChildNode);
|
|
9309
9339
|
}
|
|
9310
9340
|
}
|
|
9311
|
-
__publicField(FormItem, "defaultProps", defaultProps$
|
|
9341
|
+
__publicField(FormItem, "defaultProps", defaultProps$W);
|
|
9312
9342
|
__publicField(FormItem, "contextType", FormItemContext);
|
|
9313
9343
|
class FormStore {
|
|
9314
9344
|
constructor() {
|
|
@@ -9432,7 +9462,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9432
9462
|
}
|
|
9433
9463
|
return [formRef.current];
|
|
9434
9464
|
};
|
|
9435
|
-
const defaultProps$
|
|
9465
|
+
const defaultProps$V = {
|
|
9436
9466
|
...ComponentDefaults,
|
|
9437
9467
|
className: "",
|
|
9438
9468
|
style: void 0,
|
|
@@ -9459,7 +9489,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9459
9489
|
starPositon,
|
|
9460
9490
|
...rest
|
|
9461
9491
|
} = {
|
|
9462
|
-
...defaultProps$
|
|
9492
|
+
...defaultProps$V,
|
|
9463
9493
|
...props
|
|
9464
9494
|
};
|
|
9465
9495
|
console.log("46 dddd");
|
|
@@ -9483,7 +9513,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9483
9513
|
/* @__PURE__ */ React.createElement(CellGroup, null, /* @__PURE__ */ React.createElement(FormItemContext.Provider, { value: formInstance }, children))
|
|
9484
9514
|
);
|
|
9485
9515
|
};
|
|
9486
|
-
Form.defaultProps = defaultProps$
|
|
9516
|
+
Form.defaultProps = defaultProps$V;
|
|
9487
9517
|
Form.displayName = "NutForm";
|
|
9488
9518
|
Form.Item = FormItem;
|
|
9489
9519
|
function trimExtraChar(value, char, regExp) {
|
|
@@ -9510,7 +9540,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9510
9540
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
9511
9541
|
return value.replace(regExp, "");
|
|
9512
9542
|
}
|
|
9513
|
-
const defaultProps$
|
|
9543
|
+
const defaultProps$U = {
|
|
9514
9544
|
...ComponentDefaults,
|
|
9515
9545
|
type: "text",
|
|
9516
9546
|
name: "",
|
|
@@ -9554,7 +9584,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9554
9584
|
value: _value,
|
|
9555
9585
|
...rest
|
|
9556
9586
|
} = {
|
|
9557
|
-
...defaultProps$
|
|
9587
|
+
...defaultProps$U,
|
|
9558
9588
|
...props
|
|
9559
9589
|
};
|
|
9560
9590
|
const [value, setValue] = usePropsValue({
|
|
@@ -9695,9 +9725,9 @@ var __publicField = (obj, key, value) => {
|
|
|
9695
9725
|
);
|
|
9696
9726
|
}
|
|
9697
9727
|
);
|
|
9698
|
-
Input.defaultProps = defaultProps$
|
|
9728
|
+
Input.defaultProps = defaultProps$U;
|
|
9699
9729
|
Input.displayName = "NutInput";
|
|
9700
|
-
const defaultProps$
|
|
9730
|
+
const defaultProps$T = {
|
|
9701
9731
|
...ComponentDefaults,
|
|
9702
9732
|
disabled: false,
|
|
9703
9733
|
min: 1,
|
|
@@ -9709,7 +9739,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9709
9739
|
digits: 0,
|
|
9710
9740
|
async: false
|
|
9711
9741
|
};
|
|
9712
|
-
const classPrefix$
|
|
9742
|
+
const classPrefix$f = `nut-inputnumber`;
|
|
9713
9743
|
const InputNumber = (props) => {
|
|
9714
9744
|
const {
|
|
9715
9745
|
children,
|
|
@@ -9734,7 +9764,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9734
9764
|
onChange,
|
|
9735
9765
|
...restProps
|
|
9736
9766
|
} = {
|
|
9737
|
-
...defaultProps$
|
|
9767
|
+
...defaultProps$T,
|
|
9738
9768
|
...props
|
|
9739
9769
|
};
|
|
9740
9770
|
const inputRef = React.useRef("");
|
|
@@ -9752,8 +9782,8 @@ var __publicField = (obj, key, value) => {
|
|
|
9752
9782
|
}, []);
|
|
9753
9783
|
const classes = classNames(
|
|
9754
9784
|
{
|
|
9755
|
-
[`${classPrefix$
|
|
9756
|
-
[`${classPrefix$
|
|
9785
|
+
[`${classPrefix$f}`]: true,
|
|
9786
|
+
[`${classPrefix$f}--disabled`]: disabled
|
|
9757
9787
|
},
|
|
9758
9788
|
className
|
|
9759
9789
|
);
|
|
@@ -9921,12 +9951,12 @@ var __publicField = (obj, key, value) => {
|
|
|
9921
9951
|
}
|
|
9922
9952
|
)), /* @__PURE__ */ React.createElement("div", { className: "nut-input-add" }, /* @__PURE__ */ React.createElement(a$9, { className: iconAddClasses, onClick: addNumber })));
|
|
9923
9953
|
};
|
|
9924
|
-
InputNumber.defaultProps = defaultProps$
|
|
9954
|
+
InputNumber.defaultProps = defaultProps$T;
|
|
9925
9955
|
InputNumber.displayName = "NutInputNumber";
|
|
9926
|
-
const defaultProps$
|
|
9956
|
+
const defaultProps$S = {
|
|
9927
9957
|
...ComponentDefaults,
|
|
9928
9958
|
activeColor: "",
|
|
9929
|
-
|
|
9959
|
+
closeOnOverlayClick: true,
|
|
9930
9960
|
scrollFixed: false,
|
|
9931
9961
|
lockScroll: true,
|
|
9932
9962
|
icon: null
|
|
@@ -9937,12 +9967,12 @@ var __publicField = (obj, key, value) => {
|
|
|
9937
9967
|
icon,
|
|
9938
9968
|
scrollFixed,
|
|
9939
9969
|
lockScroll,
|
|
9940
|
-
|
|
9970
|
+
closeOnOverlayClick,
|
|
9941
9971
|
children,
|
|
9942
9972
|
activeColor,
|
|
9943
9973
|
...rest
|
|
9944
9974
|
} = {
|
|
9945
|
-
...defaultProps$
|
|
9975
|
+
...defaultProps$S,
|
|
9946
9976
|
...props
|
|
9947
9977
|
};
|
|
9948
9978
|
const menuRef = React.useRef(null);
|
|
@@ -9986,7 +10016,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9986
10016
|
index,
|
|
9987
10017
|
activeColor,
|
|
9988
10018
|
parent: {
|
|
9989
|
-
|
|
10019
|
+
closeOnOverlayClick,
|
|
9990
10020
|
lockScroll,
|
|
9991
10021
|
toggleMenuItem,
|
|
9992
10022
|
updateTitle,
|
|
@@ -10061,9 +10091,9 @@ var __publicField = (obj, key, value) => {
|
|
|
10061
10091
|
), cloneChildren())
|
|
10062
10092
|
);
|
|
10063
10093
|
};
|
|
10064
|
-
Menu.defaultProps = defaultProps$
|
|
10094
|
+
Menu.defaultProps = defaultProps$S;
|
|
10065
10095
|
Menu.displayName = "NutMenu";
|
|
10066
|
-
const defaultProps$
|
|
10096
|
+
const defaultProps$R = {
|
|
10067
10097
|
...ComponentDefaults,
|
|
10068
10098
|
columns: 1,
|
|
10069
10099
|
direction: "down",
|
|
@@ -10093,7 +10123,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10093
10123
|
parent,
|
|
10094
10124
|
index
|
|
10095
10125
|
} = {
|
|
10096
|
-
...defaultProps$
|
|
10126
|
+
...defaultProps$R,
|
|
10097
10127
|
...props
|
|
10098
10128
|
};
|
|
10099
10129
|
const [_showPopup, setShowPopup] = React.useState(show);
|
|
@@ -10242,9 +10272,9 @@ var __publicField = (obj, key, value) => {
|
|
|
10242
10272
|
)
|
|
10243
10273
|
));
|
|
10244
10274
|
});
|
|
10245
|
-
MenuItem.defaultProps = defaultProps$
|
|
10275
|
+
MenuItem.defaultProps = defaultProps$R;
|
|
10246
10276
|
MenuItem.displayName = "NutMenuItem";
|
|
10247
|
-
const defaultProps$
|
|
10277
|
+
const defaultProps$Q = {
|
|
10248
10278
|
...ComponentDefaults,
|
|
10249
10279
|
visible: false,
|
|
10250
10280
|
type: "default",
|
|
@@ -10389,17 +10419,17 @@ var __publicField = (obj, key, value) => {
|
|
|
10389
10419
|
))))
|
|
10390
10420
|
);
|
|
10391
10421
|
};
|
|
10392
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
10422
|
+
NumberKeyboard.defaultProps = defaultProps$Q;
|
|
10393
10423
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
10394
10424
|
const RadioContext = React.createContext(null);
|
|
10395
|
-
const defaultProps$
|
|
10425
|
+
const defaultProps$P = {
|
|
10396
10426
|
labelPosition: "right",
|
|
10397
10427
|
onChange: (value) => {
|
|
10398
10428
|
},
|
|
10399
10429
|
direction: "vertical",
|
|
10400
10430
|
options: []
|
|
10401
10431
|
};
|
|
10402
|
-
const classPrefix$
|
|
10432
|
+
const classPrefix$e = "nut-radiogroup";
|
|
10403
10433
|
const RadioGroup = React.forwardRef(
|
|
10404
10434
|
(props, ref) => {
|
|
10405
10435
|
const {
|
|
@@ -10413,7 +10443,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10413
10443
|
options,
|
|
10414
10444
|
disabled,
|
|
10415
10445
|
...rest
|
|
10416
|
-
} = { ...defaultProps$
|
|
10446
|
+
} = { ...defaultProps$P, ...props };
|
|
10417
10447
|
const [val2State, setVal2State] = usePropsValue({
|
|
10418
10448
|
defaultValue: props.defaultValue,
|
|
10419
10449
|
value: props.value,
|
|
@@ -10455,8 +10485,8 @@ var __publicField = (obj, key, value) => {
|
|
|
10455
10485
|
/* @__PURE__ */ React.createElement(
|
|
10456
10486
|
"div",
|
|
10457
10487
|
{
|
|
10458
|
-
className: classNames(classPrefix$
|
|
10459
|
-
[`${classPrefix$
|
|
10488
|
+
className: classNames(classPrefix$e, className, {
|
|
10489
|
+
[`${classPrefix$e}--${props.direction}`]: props.direction
|
|
10460
10490
|
}),
|
|
10461
10491
|
...rest
|
|
10462
10492
|
},
|
|
@@ -10465,9 +10495,9 @@ var __publicField = (obj, key, value) => {
|
|
|
10465
10495
|
);
|
|
10466
10496
|
}
|
|
10467
10497
|
);
|
|
10468
|
-
RadioGroup.defaultProps = defaultProps$
|
|
10498
|
+
RadioGroup.defaultProps = defaultProps$P;
|
|
10469
10499
|
RadioGroup.displayName = "NutRadioGroup";
|
|
10470
|
-
const defaultProps$
|
|
10500
|
+
const defaultProps$O = {
|
|
10471
10501
|
...ComponentDefaults,
|
|
10472
10502
|
disabled: false,
|
|
10473
10503
|
shape: "round",
|
|
@@ -10493,7 +10523,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10493
10523
|
onChange,
|
|
10494
10524
|
...others
|
|
10495
10525
|
} = {
|
|
10496
|
-
...defaultProps$
|
|
10526
|
+
...defaultProps$O,
|
|
10497
10527
|
...props
|
|
10498
10528
|
};
|
|
10499
10529
|
let { labelPosition, disabled, ...rest } = others;
|
|
@@ -10589,10 +10619,10 @@ var __publicField = (obj, key, value) => {
|
|
|
10589
10619
|
renderRadioItem()
|
|
10590
10620
|
);
|
|
10591
10621
|
};
|
|
10592
|
-
Radio.defaultProps = defaultProps$
|
|
10622
|
+
Radio.defaultProps = defaultProps$O;
|
|
10593
10623
|
Radio.displayName = "NutRadio";
|
|
10594
10624
|
Radio.Group = RadioGroup;
|
|
10595
|
-
const defaultProps$
|
|
10625
|
+
const defaultProps$N = {
|
|
10596
10626
|
...ComponentDefaults,
|
|
10597
10627
|
range: false,
|
|
10598
10628
|
min: 0,
|
|
@@ -10620,7 +10650,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10620
10650
|
step,
|
|
10621
10651
|
value,
|
|
10622
10652
|
defaultValue
|
|
10623
|
-
} = { ...defaultProps$
|
|
10653
|
+
} = { ...defaultProps$N, ...props };
|
|
10624
10654
|
const classPrefix2 = "nut-range";
|
|
10625
10655
|
const [buttonIndex, setButtonIndex] = React.useState(0);
|
|
10626
10656
|
const [dragStatus, setDragStatus] = React.useState("start");
|
|
@@ -10884,9 +10914,9 @@ var __publicField = (obj, key, value) => {
|
|
|
10884
10914
|
renderButton()
|
|
10885
10915
|
))), maxDescription !== null && /* @__PURE__ */ React.createElement("div", { className: "max" }, maxDescription || max));
|
|
10886
10916
|
};
|
|
10887
|
-
Range.defaultProps = defaultProps$
|
|
10917
|
+
Range.defaultProps = defaultProps$N;
|
|
10888
10918
|
Range.displayName = "NutRange";
|
|
10889
|
-
const defaultProps$
|
|
10919
|
+
const defaultProps$M = {
|
|
10890
10920
|
...ComponentDefaults,
|
|
10891
10921
|
count: 5,
|
|
10892
10922
|
min: 0,
|
|
@@ -10911,7 +10941,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10911
10941
|
allowHalf,
|
|
10912
10942
|
onChange
|
|
10913
10943
|
} = {
|
|
10914
|
-
...defaultProps$
|
|
10944
|
+
...defaultProps$M,
|
|
10915
10945
|
...props
|
|
10916
10946
|
};
|
|
10917
10947
|
const classPrefix2 = "nut-rate";
|
|
@@ -10994,9 +11024,9 @@ var __publicField = (obj, key, value) => {
|
|
|
10994
11024
|
})
|
|
10995
11025
|
);
|
|
10996
11026
|
};
|
|
10997
|
-
Rate.defaultProps = defaultProps$
|
|
11027
|
+
Rate.defaultProps = defaultProps$M;
|
|
10998
11028
|
Rate.displayName = "NutRate";
|
|
10999
|
-
const defaultProps$
|
|
11029
|
+
const defaultProps$L = {
|
|
11000
11030
|
...ComponentDefaults,
|
|
11001
11031
|
placeholder: "",
|
|
11002
11032
|
shape: "square",
|
|
@@ -11035,7 +11065,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11035
11065
|
onSearch,
|
|
11036
11066
|
onClickInput
|
|
11037
11067
|
} = {
|
|
11038
|
-
...defaultProps$
|
|
11068
|
+
...defaultProps$L,
|
|
11039
11069
|
...props
|
|
11040
11070
|
};
|
|
11041
11071
|
const forceFocus = () => {
|
|
@@ -11144,9 +11174,9 @@ var __publicField = (obj, key, value) => {
|
|
|
11144
11174
|
renderRight()
|
|
11145
11175
|
);
|
|
11146
11176
|
};
|
|
11147
|
-
SearchBar.defaultProps = defaultProps$
|
|
11177
|
+
SearchBar.defaultProps = defaultProps$L;
|
|
11148
11178
|
SearchBar.displayName = "NutSearchBar";
|
|
11149
|
-
const defaultProps$
|
|
11179
|
+
const defaultProps$K = {
|
|
11150
11180
|
...ComponentDefaults,
|
|
11151
11181
|
value: "",
|
|
11152
11182
|
visible: false,
|
|
@@ -11183,7 +11213,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11183
11213
|
onClickCloseIcon,
|
|
11184
11214
|
...rest
|
|
11185
11215
|
} = {
|
|
11186
|
-
...defaultProps$
|
|
11216
|
+
...defaultProps$K,
|
|
11187
11217
|
...props
|
|
11188
11218
|
};
|
|
11189
11219
|
const classPrefix2 = "nut-shortpassword";
|
|
@@ -11240,34 +11270,31 @@ var __publicField = (obj, key, value) => {
|
|
|
11240
11270
|
), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__footer__sure`, onClick: sure }, locale.confirm)))
|
|
11241
11271
|
);
|
|
11242
11272
|
};
|
|
11243
|
-
ShortPassword.defaultProps = defaultProps$
|
|
11273
|
+
ShortPassword.defaultProps = defaultProps$K;
|
|
11244
11274
|
ShortPassword.displayName = "NutShortPassword";
|
|
11245
|
-
const defaultProps$
|
|
11275
|
+
const defaultProps$J = {
|
|
11276
|
+
...ComponentDefaults,
|
|
11246
11277
|
canvasId: "spcanvas",
|
|
11247
11278
|
type: "png",
|
|
11248
11279
|
lineWidth: 2,
|
|
11249
|
-
strokeStyle: "#000"
|
|
11250
|
-
className: ""
|
|
11280
|
+
strokeStyle: "#000"
|
|
11251
11281
|
};
|
|
11252
|
-
const
|
|
11253
|
-
const { locale } = useConfig$1();
|
|
11282
|
+
const InternalSignature = (props, ref) => {
|
|
11254
11283
|
const {
|
|
11255
11284
|
canvasId,
|
|
11256
11285
|
type,
|
|
11257
11286
|
lineWidth,
|
|
11258
11287
|
strokeStyle,
|
|
11259
|
-
unSupportTpl,
|
|
11260
11288
|
className,
|
|
11261
|
-
|
|
11262
|
-
clear,
|
|
11289
|
+
style,
|
|
11263
11290
|
onConfirm,
|
|
11264
11291
|
onClear,
|
|
11265
11292
|
...rest
|
|
11266
11293
|
} = {
|
|
11267
|
-
...defaultProps$
|
|
11294
|
+
...defaultProps$J,
|
|
11268
11295
|
...props
|
|
11269
11296
|
};
|
|
11270
|
-
const
|
|
11297
|
+
const classPrefix2 = `nut-signature`;
|
|
11271
11298
|
const canvasRef = React.useRef(null);
|
|
11272
11299
|
const wrapRef = React.useRef(null);
|
|
11273
11300
|
const [canvasHeight, setCanvasHeight] = React.useState(0);
|
|
@@ -11305,12 +11332,8 @@ var __publicField = (obj, key, value) => {
|
|
|
11305
11332
|
ctx.current.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
11306
11333
|
ctx.current.closePath();
|
|
11307
11334
|
}
|
|
11308
|
-
clear && clear();
|
|
11309
11335
|
onClear && onClear();
|
|
11310
11336
|
};
|
|
11311
|
-
const handleConfirmBtn = () => {
|
|
11312
|
-
onSave();
|
|
11313
|
-
};
|
|
11314
11337
|
const onSave = () => {
|
|
11315
11338
|
Taro.createSelectorQuery().select(`#${canvasId}`).fields({
|
|
11316
11339
|
node: true,
|
|
@@ -11322,11 +11345,10 @@ var __publicField = (obj, key, value) => {
|
|
|
11322
11345
|
canvasId: `${canvasId}`,
|
|
11323
11346
|
success: (res2) => {
|
|
11324
11347
|
handleClearBtn();
|
|
11325
|
-
confirm && confirm(res2.tempFilePath);
|
|
11326
11348
|
onConfirm && onConfirm(res2.tempFilePath);
|
|
11327
11349
|
},
|
|
11328
11350
|
fail: (res2) => {
|
|
11329
|
-
console.
|
|
11351
|
+
console.warn("保存失败");
|
|
11330
11352
|
}
|
|
11331
11353
|
});
|
|
11332
11354
|
});
|
|
@@ -11346,6 +11368,14 @@ var __publicField = (obj, key, value) => {
|
|
|
11346
11368
|
ctx.current.strokeStyle = strokeStyle;
|
|
11347
11369
|
}
|
|
11348
11370
|
};
|
|
11371
|
+
React.useImperativeHandle(ref, () => ({
|
|
11372
|
+
confirm: () => {
|
|
11373
|
+
onSave();
|
|
11374
|
+
},
|
|
11375
|
+
clear: () => {
|
|
11376
|
+
handleClearBtn();
|
|
11377
|
+
}
|
|
11378
|
+
}));
|
|
11349
11379
|
const initCanvas = () => {
|
|
11350
11380
|
Taro.nextTick(() => {
|
|
11351
11381
|
setTimeout(() => {
|
|
@@ -11382,7 +11412,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11382
11412
|
React.useEffect(() => {
|
|
11383
11413
|
initCanvas();
|
|
11384
11414
|
}, []);
|
|
11385
|
-
return /* @__PURE__ */ React.createElement("div", { className: `${
|
|
11415
|
+
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2} ${className}`, ...rest }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__inner spcanvas_WEAPP`, ref: wrapRef }, Taro.getEnv() === "WEAPP" || Taro.getEnv() === "JD" ? /* @__PURE__ */ React.createElement(
|
|
11386
11416
|
"canvas",
|
|
11387
11417
|
{
|
|
11388
11418
|
id: canvasId,
|
|
@@ -11406,27 +11436,12 @@ var __publicField = (obj, key, value) => {
|
|
|
11406
11436
|
onTouchEnd: endEventHandler,
|
|
11407
11437
|
onTouchCancel: endEventHandler
|
|
11408
11438
|
}
|
|
11409
|
-
))
|
|
11410
|
-
Button,
|
|
11411
|
-
{
|
|
11412
|
-
className: `${b2("btn")}`,
|
|
11413
|
-
type: "default",
|
|
11414
|
-
onClick: () => handleClearBtn()
|
|
11415
|
-
},
|
|
11416
|
-
locale.signature.reSign
|
|
11417
|
-
), /* @__PURE__ */ React.createElement(
|
|
11418
|
-
Button,
|
|
11419
|
-
{
|
|
11420
|
-
className: `${b2("btn")}`,
|
|
11421
|
-
type: "primary",
|
|
11422
|
-
onClick: () => handleConfirmBtn()
|
|
11423
|
-
},
|
|
11424
|
-
locale.confirm
|
|
11425
|
-
));
|
|
11439
|
+
)));
|
|
11426
11440
|
};
|
|
11427
|
-
Signature
|
|
11441
|
+
const Signature = React.forwardRef(InternalSignature);
|
|
11442
|
+
Signature.defaultProps = defaultProps$J;
|
|
11428
11443
|
Signature.displayName = "NutSignature";
|
|
11429
|
-
const defaultProps$
|
|
11444
|
+
const defaultProps$I = {
|
|
11430
11445
|
...ComponentDefaults,
|
|
11431
11446
|
disabled: false,
|
|
11432
11447
|
activeText: "",
|
|
@@ -11443,7 +11458,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11443
11458
|
style,
|
|
11444
11459
|
onChange
|
|
11445
11460
|
} = {
|
|
11446
|
-
...defaultProps$
|
|
11461
|
+
...defaultProps$I,
|
|
11447
11462
|
...props
|
|
11448
11463
|
};
|
|
11449
11464
|
const classPrefix2 = "nut-switch";
|
|
@@ -11462,9 +11477,9 @@ var __publicField = (obj, key, value) => {
|
|
|
11462
11477
|
};
|
|
11463
11478
|
return /* @__PURE__ */ React.createElement("div", { className: classes(), onClick: (e) => onClick(e), style }, /* @__PURE__ */ React.createElement("div", { className: "switch-button" }, !value && /* @__PURE__ */ React.createElement("div", { className: "close-line" }), activeText && /* @__PURE__ */ React.createElement(React.Fragment, null, value ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__label open` }, activeText) : /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__label close` }, inactiveText))));
|
|
11464
11479
|
};
|
|
11465
|
-
Switch.defaultProps = defaultProps$
|
|
11480
|
+
Switch.defaultProps = defaultProps$I;
|
|
11466
11481
|
Switch.displayName = "NutSwitch";
|
|
11467
|
-
const defaultProps$
|
|
11482
|
+
const defaultProps$H = {
|
|
11468
11483
|
...ComponentDefaults,
|
|
11469
11484
|
defaultValue: "",
|
|
11470
11485
|
showCount: false,
|
|
@@ -11492,7 +11507,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11492
11507
|
onBlur,
|
|
11493
11508
|
onFocus,
|
|
11494
11509
|
...rest
|
|
11495
|
-
} = { ...defaultProps$
|
|
11510
|
+
} = { ...defaultProps$H, ...props };
|
|
11496
11511
|
const classPrefix2 = "nut-textarea";
|
|
11497
11512
|
const compositionRef = React.useRef(false);
|
|
11498
11513
|
const format = (value2) => {
|
|
@@ -11568,9 +11583,9 @@ var __publicField = (obj, key, value) => {
|
|
|
11568
11583
|
showCount && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__limit` }, inputValue.length, "/", maxLength < 0 ? 0 : maxLength)
|
|
11569
11584
|
);
|
|
11570
11585
|
};
|
|
11571
|
-
TextArea.defaultProps = defaultProps$
|
|
11586
|
+
TextArea.defaultProps = defaultProps$H;
|
|
11572
11587
|
TextArea.displayName = "NutTextArea";
|
|
11573
|
-
const defaultProps$
|
|
11588
|
+
const defaultProps$G = {
|
|
11574
11589
|
...ComponentDefaults,
|
|
11575
11590
|
percent: 0,
|
|
11576
11591
|
showText: false,
|
|
@@ -11591,7 +11606,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11591
11606
|
delay,
|
|
11592
11607
|
...rest
|
|
11593
11608
|
} = {
|
|
11594
|
-
...defaultProps$
|
|
11609
|
+
...defaultProps$G,
|
|
11595
11610
|
...props
|
|
11596
11611
|
};
|
|
11597
11612
|
const classPrefix2 = "nut-progress";
|
|
@@ -11642,7 +11657,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11642
11657
|
)
|
|
11643
11658
|
))));
|
|
11644
11659
|
};
|
|
11645
|
-
Progress.defaultProps = defaultProps$
|
|
11660
|
+
Progress.defaultProps = defaultProps$G;
|
|
11646
11661
|
Progress.displayName = "NutProgress";
|
|
11647
11662
|
class UploadOptions {
|
|
11648
11663
|
constructor() {
|
|
@@ -11762,6 +11777,14 @@ var __publicField = (obj, key, value) => {
|
|
|
11762
11777
|
const isPromise = (val) => {
|
|
11763
11778
|
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
11764
11779
|
};
|
|
11780
|
+
const upperCaseFirst = (str) => {
|
|
11781
|
+
var str = str.toLowerCase();
|
|
11782
|
+
str = str.replace(
|
|
11783
|
+
/\b\w+\b/g,
|
|
11784
|
+
(word) => word.substring(0, 1).toUpperCase() + word.substring(1)
|
|
11785
|
+
);
|
|
11786
|
+
return str;
|
|
11787
|
+
};
|
|
11765
11788
|
const funcInterceptor = (interceptor, {
|
|
11766
11789
|
args = [],
|
|
11767
11790
|
done,
|
|
@@ -11787,7 +11810,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11787
11810
|
done();
|
|
11788
11811
|
}
|
|
11789
11812
|
};
|
|
11790
|
-
const defaultProps$
|
|
11813
|
+
const defaultProps$F = {
|
|
11791
11814
|
...ComponentDefaults,
|
|
11792
11815
|
url: "",
|
|
11793
11816
|
maxCount: 1,
|
|
@@ -11875,7 +11898,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11875
11898
|
beforeXhrUpload,
|
|
11876
11899
|
beforeDelete,
|
|
11877
11900
|
...restProps
|
|
11878
|
-
} = { ...defaultProps$
|
|
11901
|
+
} = { ...defaultProps$F, ...props };
|
|
11879
11902
|
const [fileList, setFileList] = React.useState(defaultValue || []);
|
|
11880
11903
|
const [uploadQueue, setUploadQueue] = React.useState([]);
|
|
11881
11904
|
React.useEffect(() => {
|
|
@@ -12208,9 +12231,9 @@ var __publicField = (obj, key, value) => {
|
|
|
12208
12231
|
));
|
|
12209
12232
|
};
|
|
12210
12233
|
const Uploader = React.forwardRef(InternalUploader);
|
|
12211
|
-
Uploader.defaultProps = defaultProps$
|
|
12234
|
+
Uploader.defaultProps = defaultProps$F;
|
|
12212
12235
|
Uploader.displayName = "NutUploader";
|
|
12213
|
-
const defaultProps$
|
|
12236
|
+
const defaultProps$E = {
|
|
12214
12237
|
...ComponentDefaults,
|
|
12215
12238
|
visible: false,
|
|
12216
12239
|
title: "",
|
|
@@ -12237,7 +12260,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12237
12260
|
className,
|
|
12238
12261
|
style,
|
|
12239
12262
|
...rest
|
|
12240
|
-
} = { ...defaultProps$
|
|
12263
|
+
} = { ...defaultProps$E, ...props };
|
|
12241
12264
|
const classPrefix2 = "nut-actionsheet";
|
|
12242
12265
|
const cancelActionSheet = () => {
|
|
12243
12266
|
onCancel && onCancel();
|
|
@@ -12278,7 +12301,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12278
12301
|
))
|
|
12279
12302
|
);
|
|
12280
12303
|
};
|
|
12281
|
-
ActionSheet.defaultProps = defaultProps$
|
|
12304
|
+
ActionSheet.defaultProps = defaultProps$E;
|
|
12282
12305
|
ActionSheet.displayName = "NutActionSheet";
|
|
12283
12306
|
const Content = (props) => {
|
|
12284
12307
|
const { visible, title, footer, footerDirection, onClick, children } = props;
|
|
@@ -12368,7 +12391,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12368
12391
|
};
|
|
12369
12392
|
DialogWrap.defaultProps = defaultDialogProps;
|
|
12370
12393
|
DialogWrap.displayName = "NutDialogWrap";
|
|
12371
|
-
const defaultProps$
|
|
12394
|
+
const defaultProps$D = {
|
|
12372
12395
|
confirmText: "",
|
|
12373
12396
|
cancelText: "",
|
|
12374
12397
|
overlay: true,
|
|
@@ -12463,9 +12486,9 @@ var __publicField = (obj, key, value) => {
|
|
|
12463
12486
|
);
|
|
12464
12487
|
}
|
|
12465
12488
|
);
|
|
12466
|
-
BaseDialog.defaultProps = defaultProps$
|
|
12489
|
+
BaseDialog.defaultProps = defaultProps$D;
|
|
12467
12490
|
BaseDialog.displayName = "NutDialog";
|
|
12468
|
-
const defaultProps$
|
|
12491
|
+
const defaultProps$C = {
|
|
12469
12492
|
...ComponentDefaults,
|
|
12470
12493
|
attract: false,
|
|
12471
12494
|
direction: void 0,
|
|
@@ -12479,7 +12502,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12479
12502
|
};
|
|
12480
12503
|
const Drag = (props) => {
|
|
12481
12504
|
const { attract, direction, boundary, children, className, style, ...reset } = {
|
|
12482
|
-
...defaultProps$
|
|
12505
|
+
...defaultProps$C,
|
|
12483
12506
|
...props
|
|
12484
12507
|
};
|
|
12485
12508
|
const classPrefix2 = "nut-drag";
|
|
@@ -12576,23 +12599,23 @@ var __publicField = (obj, key, value) => {
|
|
|
12576
12599
|
)
|
|
12577
12600
|
);
|
|
12578
12601
|
};
|
|
12579
|
-
Drag.defaultProps = defaultProps$
|
|
12602
|
+
Drag.defaultProps = defaultProps$C;
|
|
12580
12603
|
Drag.displayName = "NutDrag";
|
|
12581
12604
|
const defaultStatus = {
|
|
12582
12605
|
empty: "https://static-ftcms.jd.com/p/files/61a9e3183985005b3958672b.png",
|
|
12583
12606
|
error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
|
|
12584
12607
|
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
12585
12608
|
};
|
|
12586
|
-
const defaultProps$
|
|
12609
|
+
const defaultProps$B = {
|
|
12587
12610
|
...ComponentDefaults,
|
|
12588
12611
|
description: "",
|
|
12589
12612
|
imageSize: "",
|
|
12590
12613
|
status: "empty"
|
|
12591
12614
|
};
|
|
12592
|
-
const classPrefix$
|
|
12615
|
+
const classPrefix$d = `nut-empty`;
|
|
12593
12616
|
const Empty = (props) => {
|
|
12594
12617
|
const { locale } = useConfig$1();
|
|
12595
|
-
defaultProps$
|
|
12618
|
+
defaultProps$B.description = locale.noData || defaultProps$B.description;
|
|
12596
12619
|
const {
|
|
12597
12620
|
image,
|
|
12598
12621
|
imageSize,
|
|
@@ -12602,7 +12625,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12602
12625
|
status,
|
|
12603
12626
|
...rest
|
|
12604
12627
|
} = {
|
|
12605
|
-
...defaultProps$
|
|
12628
|
+
...defaultProps$B,
|
|
12606
12629
|
...props
|
|
12607
12630
|
};
|
|
12608
12631
|
const [imgStyle, setImgStyle] = React.useState({});
|
|
@@ -12625,41 +12648,35 @@ var __publicField = (obj, key, value) => {
|
|
|
12625
12648
|
};
|
|
12626
12649
|
});
|
|
12627
12650
|
}, [imageSize]);
|
|
12628
|
-
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
12651
|
+
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$d} ${className}`, ...rest }, /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$d}__image`, style: imgStyle }, imageNode), typeof description === "string" ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$d}__description` }, description) : description, children));
|
|
12629
12652
|
};
|
|
12630
|
-
Empty.defaultProps = defaultProps$
|
|
12653
|
+
Empty.defaultProps = defaultProps$B;
|
|
12631
12654
|
Empty.displayName = "NutEmpty";
|
|
12632
|
-
const defaultProps$
|
|
12655
|
+
const defaultProps$A = {
|
|
12633
12656
|
...ComponentDefaults,
|
|
12634
12657
|
hasMore: true,
|
|
12635
|
-
|
|
12636
|
-
|
|
12637
|
-
|
|
12638
|
-
pullIcon: "https://img10.360buyimg.com/imagetools/jfs/t1/169863/6/4565/6306/60125948E7e92774e/40b3a0cf42852bcb.png",
|
|
12639
|
-
pullText: "松开刷新",
|
|
12640
|
-
loadIcon: "https://img10.360buyimg.com/imagetools/jfs/t1/169863/6/4565/6306/60125948E7e92774e/40b3a0cf42852bcb.png",
|
|
12641
|
-
loadingText: "加载中···",
|
|
12642
|
-
loadMoreText: "哎呀,这里是底部了啦"
|
|
12658
|
+
threshold: 40,
|
|
12659
|
+
target: "",
|
|
12660
|
+
pullRefresh: false
|
|
12643
12661
|
};
|
|
12644
|
-
const
|
|
12662
|
+
const classPrefix$c = `nut-infiniteloading`;
|
|
12663
|
+
const InfiniteLoading = (props) => {
|
|
12645
12664
|
const { locale } = useConfig$1();
|
|
12646
12665
|
const {
|
|
12647
12666
|
children,
|
|
12648
12667
|
hasMore,
|
|
12649
|
-
|
|
12650
|
-
|
|
12651
|
-
|
|
12652
|
-
|
|
12653
|
-
pullText,
|
|
12654
|
-
loadIcon,
|
|
12668
|
+
threshold,
|
|
12669
|
+
target,
|
|
12670
|
+
pullRefresh,
|
|
12671
|
+
pullingText,
|
|
12655
12672
|
loadingText,
|
|
12656
12673
|
loadMoreText,
|
|
12657
12674
|
className,
|
|
12658
12675
|
onRefresh,
|
|
12659
12676
|
onLoadMore,
|
|
12660
|
-
|
|
12677
|
+
onScroll
|
|
12661
12678
|
} = {
|
|
12662
|
-
...defaultProps$
|
|
12679
|
+
...defaultProps$A,
|
|
12663
12680
|
...props
|
|
12664
12681
|
};
|
|
12665
12682
|
const [isInfiniting, setIsInfiniting] = React.useState(false);
|
|
@@ -12672,10 +12689,9 @@ var __publicField = (obj, key, value) => {
|
|
|
12672
12689
|
const y2 = React.useRef(0);
|
|
12673
12690
|
const refreshMaxH = React.useRef(0);
|
|
12674
12691
|
const distance = React.useRef(0);
|
|
12675
|
-
const
|
|
12676
|
-
const classes = classNames(className, b2());
|
|
12692
|
+
const classes = classNames(className, classPrefix$c);
|
|
12677
12693
|
React.useEffect(() => {
|
|
12678
|
-
refreshMaxH.current =
|
|
12694
|
+
refreshMaxH.current = threshold;
|
|
12679
12695
|
setTimeout(() => {
|
|
12680
12696
|
getScrollHeight();
|
|
12681
12697
|
}, 200);
|
|
@@ -12693,9 +12709,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12693
12709
|
};
|
|
12694
12710
|
};
|
|
12695
12711
|
const getParentElement = (el) => {
|
|
12696
|
-
return Taro.createSelectorQuery().select(
|
|
12697
|
-
containerId ? `#${containerId} #${el}` : `#${el}`
|
|
12698
|
-
);
|
|
12712
|
+
return Taro.createSelectorQuery().select(target ? `#${target} #${el}` : `#${el}`);
|
|
12699
12713
|
};
|
|
12700
12714
|
const infiniteDone = () => {
|
|
12701
12715
|
setIsInfiniting(false);
|
|
@@ -12717,7 +12731,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12717
12731
|
direction.current = "up";
|
|
12718
12732
|
}
|
|
12719
12733
|
scrollTop.current = e.detail.scrollTop;
|
|
12720
|
-
|
|
12734
|
+
onScroll && onScroll(e.detail.scrollTop);
|
|
12721
12735
|
};
|
|
12722
12736
|
const lower = () => {
|
|
12723
12737
|
if (direction.current == "up" || !hasMore || isInfiniting) {
|
|
@@ -12727,7 +12741,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12727
12741
|
onLoadMore && onLoadMore(infiniteDone);
|
|
12728
12742
|
};
|
|
12729
12743
|
const touchStart = (event) => {
|
|
12730
|
-
if (scrollTop.current == 0 && !isTouching.current &&
|
|
12744
|
+
if (scrollTop.current == 0 && !isTouching.current && pullRefresh) {
|
|
12731
12745
|
y2.current = event.touches[0].pageY;
|
|
12732
12746
|
isTouching.current = true;
|
|
12733
12747
|
}
|
|
@@ -12769,14 +12783,14 @@ var __publicField = (obj, key, value) => {
|
|
|
12769
12783
|
onTouchMove: touchMove,
|
|
12770
12784
|
onTouchEnd: touchEnd
|
|
12771
12785
|
},
|
|
12772
|
-
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-top", ref: refreshTop, style: getStyle() }, /* @__PURE__ */ React.createElement("div", { className: "top-box" },
|
|
12786
|
+
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-top", ref: refreshTop, style: getStyle() }, /* @__PURE__ */ React.createElement("div", { className: "top-box" }, pullingText || locale.infiniteloading.pullRefreshText)),
|
|
12773
12787
|
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-container" }, children),
|
|
12774
|
-
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-bottom" }, isInfiniting ? /* @__PURE__ */ React.createElement("div", { className: "bottom-box" },
|
|
12788
|
+
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-bottom" }, isInfiniting ? /* @__PURE__ */ React.createElement("div", { className: "bottom-box" }, loadingText || locale.infiniteloading.loadText) : !hasMore && /* @__PURE__ */ React.createElement("div", { className: "tips" }, loadMoreText || locale.infiniteloading.loadMoreText))
|
|
12775
12789
|
);
|
|
12776
12790
|
};
|
|
12777
|
-
|
|
12778
|
-
|
|
12779
|
-
const defaultProps$
|
|
12791
|
+
InfiniteLoading.defaultProps = defaultProps$A;
|
|
12792
|
+
InfiniteLoading.displayName = "NutInfiniteLoading";
|
|
12793
|
+
const defaultProps$z = {
|
|
12780
12794
|
...ComponentDefaults,
|
|
12781
12795
|
direction: "horizontal",
|
|
12782
12796
|
list: [],
|
|
@@ -12814,7 +12828,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12814
12828
|
onClick,
|
|
12815
12829
|
onClickItem
|
|
12816
12830
|
} = {
|
|
12817
|
-
...defaultProps$
|
|
12831
|
+
...defaultProps$z,
|
|
12818
12832
|
...props
|
|
12819
12833
|
};
|
|
12820
12834
|
const classPrefix2 = "nut-noticebar";
|
|
@@ -13176,9 +13190,9 @@ var __publicField = (obj, key, value) => {
|
|
|
13176
13190
|
)
|
|
13177
13191
|
) : null);
|
|
13178
13192
|
};
|
|
13179
|
-
NoticeBar.defaultProps = defaultProps$
|
|
13193
|
+
NoticeBar.defaultProps = defaultProps$z;
|
|
13180
13194
|
NoticeBar.displayName = "NutNoticeBar";
|
|
13181
|
-
const defaultProps$
|
|
13195
|
+
const defaultProps$y = {
|
|
13182
13196
|
...ComponentDefaults,
|
|
13183
13197
|
id: "",
|
|
13184
13198
|
duration: 3e3,
|
|
@@ -13191,7 +13205,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13191
13205
|
onClick: () => {
|
|
13192
13206
|
}
|
|
13193
13207
|
};
|
|
13194
|
-
const classPrefix$
|
|
13208
|
+
const classPrefix$b = "nut-notify";
|
|
13195
13209
|
const Notify = (props) => {
|
|
13196
13210
|
const {
|
|
13197
13211
|
id,
|
|
@@ -13205,7 +13219,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13205
13219
|
onClose,
|
|
13206
13220
|
onClick,
|
|
13207
13221
|
...rest
|
|
13208
|
-
} = { ...defaultProps$
|
|
13222
|
+
} = { ...defaultProps$y, ...props };
|
|
13209
13223
|
let timer;
|
|
13210
13224
|
const [showNotify, SetShow] = React.useState(false);
|
|
13211
13225
|
React.useEffect(() => {
|
|
@@ -13242,10 +13256,10 @@ var __publicField = (obj, key, value) => {
|
|
|
13242
13256
|
onClose();
|
|
13243
13257
|
};
|
|
13244
13258
|
const classes = classNames({
|
|
13245
|
-
[`${classPrefix$
|
|
13246
|
-
[`${classPrefix$
|
|
13247
|
-
[`${classPrefix$
|
|
13248
|
-
[`${classPrefix$
|
|
13259
|
+
[`${classPrefix$b}--popup-top`]: position === "top",
|
|
13260
|
+
[`${classPrefix$b}--popup-bottom`]: position === "bottom",
|
|
13261
|
+
[`${classPrefix$b}`]: true,
|
|
13262
|
+
[`${classPrefix$b}--${type}`]: true
|
|
13249
13263
|
});
|
|
13250
13264
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
13251
13265
|
CSSTransition$1,
|
|
@@ -13269,169 +13283,268 @@ var __publicField = (obj, key, value) => {
|
|
|
13269
13283
|
)
|
|
13270
13284
|
));
|
|
13271
13285
|
};
|
|
13272
|
-
Notify.defaultProps = defaultProps$
|
|
13286
|
+
Notify.defaultProps = defaultProps$y;
|
|
13273
13287
|
Notify.displayName = "NutNotify";
|
|
13274
|
-
|
|
13275
|
-
if (typeof ref === "function") {
|
|
13276
|
-
ref(node);
|
|
13277
|
-
} else if (typeof ref === "object" && ref && "current" in ref) {
|
|
13278
|
-
ref.current = node;
|
|
13279
|
-
}
|
|
13280
|
-
}
|
|
13281
|
-
function composeRef(...refs) {
|
|
13282
|
-
return (node) => {
|
|
13283
|
-
refs.forEach((ref) => {
|
|
13284
|
-
fillRef(ref, node);
|
|
13285
|
-
});
|
|
13286
|
-
};
|
|
13287
|
-
}
|
|
13288
|
-
class Trigger extends React.Component {
|
|
13289
|
-
fireEvents(type, e) {
|
|
13290
|
-
const childCallback = this.props.children.props[type];
|
|
13291
|
-
if (childCallback) {
|
|
13292
|
-
childCallback(e);
|
|
13293
|
-
}
|
|
13294
|
-
const callback = this.props[type];
|
|
13295
|
-
if (callback) {
|
|
13296
|
-
callback(e);
|
|
13297
|
-
}
|
|
13298
|
-
}
|
|
13299
|
-
render() {
|
|
13300
|
-
const { children, className = "" } = this.props;
|
|
13301
|
-
const child = React.Children.only(children);
|
|
13302
|
-
const newChildProps = {
|
|
13303
|
-
key: "trigger"
|
|
13304
|
-
};
|
|
13305
|
-
if (child && child.props && child.props.className) {
|
|
13306
|
-
newChildProps.className = className;
|
|
13307
|
-
}
|
|
13308
|
-
const cloneProps = {
|
|
13309
|
-
...newChildProps
|
|
13310
|
-
};
|
|
13311
|
-
cloneProps.ref = composeRef(this.props.forwardedRef, child.ref);
|
|
13312
|
-
const trigger = React.cloneElement(child, cloneProps);
|
|
13313
|
-
return trigger;
|
|
13314
|
-
}
|
|
13315
|
-
}
|
|
13316
|
-
const defaultProps$y = {
|
|
13288
|
+
const defaultProps$x = {
|
|
13317
13289
|
...ComponentDefaults,
|
|
13318
13290
|
list: [],
|
|
13319
|
-
theme: "light",
|
|
13320
13291
|
location: "bottom",
|
|
13321
13292
|
visible: false,
|
|
13322
|
-
offset:
|
|
13293
|
+
offset: [0, 12],
|
|
13294
|
+
targetId: "",
|
|
13323
13295
|
className: "",
|
|
13324
|
-
|
|
13296
|
+
background: "",
|
|
13297
|
+
color: "",
|
|
13298
|
+
showArrow: true,
|
|
13299
|
+
duration: 0.3,
|
|
13300
|
+
overlay: false,
|
|
13301
|
+
overlayClassName: "",
|
|
13302
|
+
overlayStyle: {},
|
|
13303
|
+
closeOnClickOutside: true,
|
|
13304
|
+
closeOnClickAction: true,
|
|
13305
|
+
closeOnOverlayClick: true,
|
|
13306
|
+
onClick: () => {
|
|
13307
|
+
},
|
|
13308
|
+
onOpen: () => {
|
|
13309
|
+
},
|
|
13310
|
+
onClose: () => {
|
|
13325
13311
|
},
|
|
13326
|
-
|
|
13312
|
+
onSelect: (item, index) => {
|
|
13327
13313
|
}
|
|
13328
13314
|
};
|
|
13315
|
+
const classPrefix$a = `nut-popover`;
|
|
13329
13316
|
const Popover = (props) => {
|
|
13330
13317
|
const {
|
|
13331
13318
|
children,
|
|
13332
13319
|
list,
|
|
13333
|
-
theme,
|
|
13334
13320
|
location,
|
|
13335
13321
|
visible,
|
|
13336
13322
|
offset,
|
|
13323
|
+
targetId,
|
|
13324
|
+
overlay,
|
|
13325
|
+
overlayStyle,
|
|
13326
|
+
overlayClassName,
|
|
13327
|
+
closeOnClickOutside,
|
|
13328
|
+
closeOnClickAction,
|
|
13329
|
+
closeOnOverlayClick,
|
|
13337
13330
|
className,
|
|
13331
|
+
showArrow,
|
|
13338
13332
|
style,
|
|
13333
|
+
background,
|
|
13334
|
+
color,
|
|
13339
13335
|
onClick,
|
|
13340
|
-
|
|
13336
|
+
onOpen,
|
|
13337
|
+
onClose,
|
|
13338
|
+
onSelect,
|
|
13341
13339
|
...reset
|
|
13342
13340
|
} = {
|
|
13343
|
-
...defaultProps$
|
|
13341
|
+
...defaultProps$x,
|
|
13344
13342
|
...props
|
|
13345
13343
|
};
|
|
13346
|
-
const
|
|
13347
|
-
|
|
13348
|
-
|
|
13349
|
-
const res = await getRectByTaro(goodItem.current);
|
|
13350
|
-
setElWidth(res == null ? void 0 : res.width);
|
|
13351
|
-
setElHeight(res == null ? void 0 : res.height);
|
|
13352
|
-
}
|
|
13353
|
-
});
|
|
13354
|
-
const [classes, setClasses] = React.useState("");
|
|
13344
|
+
const popoverRef = React.useRef(null);
|
|
13345
|
+
const popoverContentRef = React.useRef(null);
|
|
13346
|
+
const [showPopup, setShowPopup] = React.useState(false);
|
|
13355
13347
|
const [elWidth, setElWidth] = React.useState(0);
|
|
13356
13348
|
const [elHeight, setElHeight] = React.useState(0);
|
|
13357
|
-
const [
|
|
13358
|
-
const [popoverArrow, setPopoverArrow] = React.useState("");
|
|
13349
|
+
const [rootPosition, setRootPosition] = React.useState();
|
|
13359
13350
|
React.useEffect(() => {
|
|
13360
|
-
|
|
13361
|
-
|
|
13362
|
-
|
|
13363
|
-
|
|
13364
|
-
|
|
13365
|
-
const offNumer = Number(offset) ? Number(offset) : 0;
|
|
13366
|
-
const style2 = {};
|
|
13367
|
-
if (location.includes("top")) {
|
|
13368
|
-
style2.bottom = `${elHeight + offNumer}px`;
|
|
13369
|
-
} else if (location.includes("right")) {
|
|
13370
|
-
style2.left = `${elWidth + offNumer}px`;
|
|
13371
|
-
} else if (location.includes("left")) {
|
|
13372
|
-
style2.right = `${elWidth + offNumer}px`;
|
|
13373
|
-
} else {
|
|
13374
|
-
style2.top = `${elHeight + offNumer}px`;
|
|
13351
|
+
setShowPopup(visible);
|
|
13352
|
+
if (visible) {
|
|
13353
|
+
setTimeout(() => {
|
|
13354
|
+
getContentWidth();
|
|
13355
|
+
}, 0);
|
|
13375
13356
|
}
|
|
13376
|
-
|
|
13357
|
+
}, [visible]);
|
|
13358
|
+
const getContentWidth = async () => {
|
|
13359
|
+
let rect;
|
|
13360
|
+
if (targetId) {
|
|
13361
|
+
if (Taro.getEnv() == Taro.ENV_TYPE.WEB) {
|
|
13362
|
+
rect = getRect(document.querySelector(`#${targetId}`));
|
|
13363
|
+
} else {
|
|
13364
|
+
rect = await getRectTaro(targetId);
|
|
13365
|
+
}
|
|
13366
|
+
} else {
|
|
13367
|
+
rect = await getRectByTaro(popoverRef.current);
|
|
13368
|
+
}
|
|
13369
|
+
setRootPosition({
|
|
13370
|
+
width: rect.width,
|
|
13371
|
+
height: rect.height,
|
|
13372
|
+
left: rect.left,
|
|
13373
|
+
top: rect.top,
|
|
13374
|
+
right: rect.right
|
|
13375
|
+
});
|
|
13376
|
+
setTimeout(() => {
|
|
13377
|
+
getPopoverContentW();
|
|
13378
|
+
}, 300);
|
|
13379
|
+
};
|
|
13380
|
+
const getRectTaro = async (targetId2) => {
|
|
13381
|
+
return new Promise((resolve) => {
|
|
13382
|
+
const query = Taro.createSelectorQuery();
|
|
13383
|
+
query.select(`#${targetId2}`) && query.select(`#${targetId2}`).boundingClientRect();
|
|
13384
|
+
query.exec(function(res) {
|
|
13385
|
+
resolve(res[0]);
|
|
13386
|
+
});
|
|
13387
|
+
});
|
|
13377
13388
|
};
|
|
13378
|
-
const
|
|
13379
|
-
|
|
13380
|
-
|
|
13389
|
+
const getPopoverContentW = async () => {
|
|
13390
|
+
let rectContent = await getRectByTaro(popoverContentRef.current);
|
|
13391
|
+
setElWidth(rectContent.width);
|
|
13392
|
+
setElHeight(rectContent.height);
|
|
13381
13393
|
};
|
|
13382
|
-
const
|
|
13383
|
-
|
|
13384
|
-
|
|
13394
|
+
const clickAway = () => {
|
|
13395
|
+
if (closeOnClickOutside) {
|
|
13396
|
+
props.onClick && props.onClick();
|
|
13397
|
+
onClose && onClose();
|
|
13398
|
+
}
|
|
13385
13399
|
};
|
|
13386
|
-
const
|
|
13387
|
-
|
|
13388
|
-
|
|
13400
|
+
const classes = classNames(
|
|
13401
|
+
{
|
|
13402
|
+
[`${classPrefix$a}`]: true
|
|
13403
|
+
},
|
|
13404
|
+
className
|
|
13405
|
+
);
|
|
13406
|
+
const customStyle = () => {
|
|
13407
|
+
const styles = {};
|
|
13408
|
+
if (background) {
|
|
13409
|
+
styles.background = background;
|
|
13410
|
+
}
|
|
13411
|
+
if (color) {
|
|
13412
|
+
styles.color = color;
|
|
13413
|
+
}
|
|
13414
|
+
return styles;
|
|
13389
13415
|
};
|
|
13390
|
-
const
|
|
13391
|
-
const prefixCls2 = "popover-arrow";
|
|
13392
|
-
|
|
13416
|
+
const popoverArrow = () => {
|
|
13417
|
+
const prefixCls2 = "nut-popover-arrow";
|
|
13418
|
+
const loca = location;
|
|
13419
|
+
const direction = loca.split("-")[0];
|
|
13420
|
+
return `${prefixCls2} ${prefixCls2}-${direction} ${prefixCls2}--${loca}`;
|
|
13393
13421
|
};
|
|
13394
|
-
const
|
|
13395
|
-
|
|
13396
|
-
|
|
13422
|
+
const popoverArrowStyle = () => {
|
|
13423
|
+
const styles = {};
|
|
13424
|
+
const { background: background2 } = props;
|
|
13425
|
+
const direction = location.split("-")[0];
|
|
13426
|
+
if (background2) {
|
|
13427
|
+
styles[`border${upperCaseFirst(direction)}Color`] = background2;
|
|
13428
|
+
}
|
|
13429
|
+
return styles;
|
|
13430
|
+
};
|
|
13431
|
+
const getRootPosition = () => {
|
|
13432
|
+
let styles = {};
|
|
13433
|
+
if (!rootPosition) {
|
|
13434
|
+
styles.visibility = "hidden";
|
|
13435
|
+
return styles;
|
|
13436
|
+
}
|
|
13437
|
+
const contentWidth = elWidth;
|
|
13438
|
+
const contentHeight = elHeight;
|
|
13439
|
+
const { width, height, left, top, right } = rootPosition;
|
|
13440
|
+
const direction = location.split("-")[0];
|
|
13441
|
+
const skew = location.split("-")[1];
|
|
13442
|
+
let cross = 0;
|
|
13443
|
+
let parallel = 0;
|
|
13444
|
+
if (Array.isArray(offset) && offset.length == 2) {
|
|
13445
|
+
cross += +offset[1];
|
|
13446
|
+
parallel += +offset[0];
|
|
13447
|
+
}
|
|
13448
|
+
if (width) {
|
|
13449
|
+
if (["bottom", "top"].includes(direction)) {
|
|
13450
|
+
const h = direction == "bottom" ? height + cross : -(contentHeight + cross);
|
|
13451
|
+
styles.top = `${top + h}px`;
|
|
13452
|
+
if (!skew) {
|
|
13453
|
+
styles.left = `${-(contentWidth - width) / 2 + left + parallel}px`;
|
|
13454
|
+
}
|
|
13455
|
+
if (skew == "start") {
|
|
13456
|
+
styles.left = `${left + parallel}px`;
|
|
13457
|
+
}
|
|
13458
|
+
if (skew == "end") {
|
|
13459
|
+
styles.left = `${right + parallel}px`;
|
|
13460
|
+
}
|
|
13461
|
+
}
|
|
13462
|
+
if (["left", "right"].includes(direction)) {
|
|
13463
|
+
const contentW = direction == "left" ? -(contentWidth + cross) : width + cross;
|
|
13464
|
+
styles.left = `${left + contentW}px`;
|
|
13465
|
+
if (!skew) {
|
|
13466
|
+
styles.top = `${top - contentHeight / 2 + height / 2 - 4 + parallel}px`;
|
|
13467
|
+
}
|
|
13468
|
+
if (skew == "start") {
|
|
13469
|
+
styles.top = `${top + parallel}px`;
|
|
13470
|
+
}
|
|
13471
|
+
if (skew == "end") {
|
|
13472
|
+
styles.top = `${top + height + parallel}px`;
|
|
13473
|
+
}
|
|
13474
|
+
}
|
|
13397
13475
|
}
|
|
13476
|
+
if (elWidth === 0) {
|
|
13477
|
+
styles.visibility = "hidden";
|
|
13478
|
+
} else {
|
|
13479
|
+
styles.visibility = "initial";
|
|
13480
|
+
}
|
|
13481
|
+
return styles;
|
|
13398
13482
|
};
|
|
13399
|
-
const
|
|
13483
|
+
const handleSelect = (item, index) => {
|
|
13400
13484
|
if (!item.disabled) {
|
|
13401
|
-
|
|
13485
|
+
onSelect(item, index);
|
|
13486
|
+
}
|
|
13487
|
+
if (closeOnClickAction) {
|
|
13488
|
+
props.onClick && props.onClick();
|
|
13489
|
+
onClose && onClose();
|
|
13402
13490
|
}
|
|
13403
13491
|
};
|
|
13404
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
13492
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, !targetId && /* @__PURE__ */ React.createElement(
|
|
13405
13493
|
"div",
|
|
13406
13494
|
{
|
|
13407
|
-
className:
|
|
13408
|
-
|
|
13409
|
-
|
|
13495
|
+
className: "nut-popover-wrapper",
|
|
13496
|
+
ref: popoverRef,
|
|
13497
|
+
onClick: () => {
|
|
13498
|
+
props.onClick && props.onClick();
|
|
13499
|
+
if (!visible) {
|
|
13500
|
+
onOpen && onOpen();
|
|
13501
|
+
} else {
|
|
13502
|
+
onClose && onClose();
|
|
13503
|
+
}
|
|
13504
|
+
},
|
|
13505
|
+
style
|
|
13410
13506
|
},
|
|
13411
|
-
|
|
13507
|
+
Array.isArray(children) ? children[0] : children
|
|
13508
|
+
), /* @__PURE__ */ React.createElement("div", { className: classes, style: getRootPosition(), ...reset }, /* @__PURE__ */ React.createElement(
|
|
13509
|
+
Popup,
|
|
13510
|
+
{
|
|
13511
|
+
className: `nut-popover-content nut-popover-content--${location}`,
|
|
13512
|
+
style: customStyle(),
|
|
13513
|
+
position: "default",
|
|
13514
|
+
overlay,
|
|
13515
|
+
overlayStyle,
|
|
13516
|
+
overlayClassName,
|
|
13517
|
+
closeOnOverlayClick,
|
|
13518
|
+
visible: showPopup
|
|
13519
|
+
},
|
|
13520
|
+
/* @__PURE__ */ React.createElement("div", { className: "nut-popover-content-group", ref: popoverContentRef }, showArrow && /* @__PURE__ */ React.createElement("div", { className: popoverArrow(), style: popoverArrowStyle() }), Array.isArray(children) ? children[1] : "", list.map((item, index) => {
|
|
13412
13521
|
return /* @__PURE__ */ React.createElement(
|
|
13413
13522
|
"div",
|
|
13414
13523
|
{
|
|
13415
|
-
|
|
13416
|
-
|
|
13417
|
-
|
|
13418
|
-
|
|
13419
|
-
|
|
13524
|
+
className: classNames(
|
|
13525
|
+
{
|
|
13526
|
+
"nut-popover-menu-item": true,
|
|
13527
|
+
"nut-popover-menu-disabled": item.disabled
|
|
13528
|
+
},
|
|
13529
|
+
item.className
|
|
13530
|
+
),
|
|
13531
|
+
key: item.key,
|
|
13532
|
+
onClick: () => handleSelect(item, index)
|
|
13420
13533
|
},
|
|
13421
13534
|
item.icon ? item.icon : null,
|
|
13422
|
-
/* @__PURE__ */ React.createElement("div", { className: "popover-menu-item-name" }, item.name)
|
|
13535
|
+
/* @__PURE__ */ React.createElement("div", { className: "nut-popover-menu-item-name" }, item.name)
|
|
13423
13536
|
);
|
|
13424
|
-
}))
|
|
13425
|
-
),
|
|
13426
|
-
|
|
13537
|
+
}))
|
|
13538
|
+
), showPopup && /* @__PURE__ */ React.createElement(
|
|
13539
|
+
"div",
|
|
13427
13540
|
{
|
|
13428
|
-
|
|
13429
|
-
onClick:
|
|
13430
|
-
|
|
13541
|
+
className: "nut-popover-content-bg",
|
|
13542
|
+
onClick: clickAway,
|
|
13543
|
+
onTouchMove: clickAway
|
|
13431
13544
|
}
|
|
13432
|
-
)
|
|
13545
|
+
)));
|
|
13433
13546
|
};
|
|
13434
|
-
Popover.defaultProps = defaultProps$
|
|
13547
|
+
Popover.defaultProps = defaultProps$x;
|
|
13435
13548
|
Popover.displayName = "NutPopover";
|
|
13436
13549
|
function bound(position, min, max) {
|
|
13437
13550
|
let ret = position;
|
|
@@ -13456,7 +13569,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13456
13569
|
return position;
|
|
13457
13570
|
}
|
|
13458
13571
|
const sleep = (time) => new Promise((resolve) => setTimeout(resolve, time));
|
|
13459
|
-
const defaultProps$
|
|
13572
|
+
const defaultProps$w = {
|
|
13460
13573
|
...ComponentDefaults,
|
|
13461
13574
|
pullingText: "",
|
|
13462
13575
|
canReleaseText: "",
|
|
@@ -13475,7 +13588,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13475
13588
|
const { locale } = useConfig$1();
|
|
13476
13589
|
const touch = useTouch();
|
|
13477
13590
|
const props = {
|
|
13478
|
-
...defaultProps$
|
|
13591
|
+
...defaultProps$w,
|
|
13479
13592
|
...p,
|
|
13480
13593
|
...{
|
|
13481
13594
|
pullingText: p.pullingText || locale.pullToRefresh.pullingText,
|
|
@@ -13575,10 +13688,10 @@ var __publicField = (obj, key, value) => {
|
|
|
13575
13688
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-content` }, props.children)
|
|
13576
13689
|
);
|
|
13577
13690
|
};
|
|
13578
|
-
PullToRefresh.defaultProps = defaultProps$
|
|
13691
|
+
PullToRefresh.defaultProps = defaultProps$w;
|
|
13579
13692
|
PullToRefresh.displayName = "NutPullToRefresh";
|
|
13580
13693
|
const AvatarContext = React.createContext({});
|
|
13581
|
-
const defaultProps$
|
|
13694
|
+
const defaultProps$v = {
|
|
13582
13695
|
...ComponentDefaults,
|
|
13583
13696
|
size: "",
|
|
13584
13697
|
shape: "round",
|
|
@@ -13589,7 +13702,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13589
13702
|
src: "",
|
|
13590
13703
|
alt: ""
|
|
13591
13704
|
};
|
|
13592
|
-
const classPrefix$
|
|
13705
|
+
const classPrefix$9 = `nut-avatar`;
|
|
13593
13706
|
const Avatar = (props) => {
|
|
13594
13707
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
13595
13708
|
const {
|
|
@@ -13608,7 +13721,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13608
13721
|
onError,
|
|
13609
13722
|
...rest
|
|
13610
13723
|
} = {
|
|
13611
|
-
...defaultProps$
|
|
13724
|
+
...defaultProps$v,
|
|
13612
13725
|
...props
|
|
13613
13726
|
};
|
|
13614
13727
|
const [maxSum, setMaxSum] = React.useState(0);
|
|
@@ -13621,7 +13734,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13621
13734
|
[`nut-avatar-${((_a = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a.size) || size || "normal"}`]: true,
|
|
13622
13735
|
[`nut-avatar-${((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || shape}`]: true
|
|
13623
13736
|
});
|
|
13624
|
-
const cls = classNames(classPrefix$
|
|
13737
|
+
const cls = classNames(classPrefix$9, classes, className);
|
|
13625
13738
|
const styles = {
|
|
13626
13739
|
width: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
13627
13740
|
height: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
@@ -13690,9 +13803,9 @@ var __publicField = (obj, key, value) => {
|
|
|
13690
13803
|
showMax && /* @__PURE__ */ React.createElement("div", { className: "text" }, ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxContent) ? (_m = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _m.maxContent : `+ ${avatarIndex - ((_n = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _n.max)}`)
|
|
13691
13804
|
));
|
|
13692
13805
|
};
|
|
13693
|
-
Avatar.defaultProps = defaultProps$
|
|
13806
|
+
Avatar.defaultProps = defaultProps$v;
|
|
13694
13807
|
Avatar.displayName = "NutAvatar";
|
|
13695
|
-
const defaultProps$
|
|
13808
|
+
const defaultProps$u = {
|
|
13696
13809
|
...ComponentDefaults,
|
|
13697
13810
|
rows: 1,
|
|
13698
13811
|
animated: false,
|
|
@@ -13715,7 +13828,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13715
13828
|
avatarShape,
|
|
13716
13829
|
...rest
|
|
13717
13830
|
} = {
|
|
13718
|
-
...defaultProps$
|
|
13831
|
+
...defaultProps$u,
|
|
13719
13832
|
...props
|
|
13720
13833
|
};
|
|
13721
13834
|
const classPrefix2 = "nut-skeleton";
|
|
@@ -13752,7 +13865,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13752
13865
|
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__block`, key: index });
|
|
13753
13866
|
})))));
|
|
13754
13867
|
};
|
|
13755
|
-
Skeleton.defaultProps = defaultProps$
|
|
13868
|
+
Skeleton.defaultProps = defaultProps$u;
|
|
13756
13869
|
Skeleton.displayName = "NutSkeleton";
|
|
13757
13870
|
function preventDefault(event, isStopPropagation) {
|
|
13758
13871
|
if (typeof event.cancelable !== "boolean" || event.cancelable) {
|
|
@@ -13762,7 +13875,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13762
13875
|
event.stopPropagation();
|
|
13763
13876
|
}
|
|
13764
13877
|
}
|
|
13765
|
-
const defaultProps$
|
|
13878
|
+
const defaultProps$t = {
|
|
13766
13879
|
name: ""
|
|
13767
13880
|
};
|
|
13768
13881
|
const Swipe = React.forwardRef((props, instanceRef) => {
|
|
@@ -13781,7 +13894,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13781
13894
|
};
|
|
13782
13895
|
Taro.nextTick(() => getWidth());
|
|
13783
13896
|
});
|
|
13784
|
-
const { children, className, style } = { ...defaultProps$
|
|
13897
|
+
const { children, className, style } = { ...defaultProps$t, ...props };
|
|
13785
13898
|
const root2 = React.useRef();
|
|
13786
13899
|
const opened = React.useRef(false);
|
|
13787
13900
|
const lockClick = React.useRef(false);
|
|
@@ -13937,7 +14050,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13937
14050
|
/* @__PURE__ */ React.createElement("div", { className: `${swipeBem("wrapper")}`, style: wrapperStyle }, renderActionContent("left"), children, renderActionContent("right"))
|
|
13938
14051
|
);
|
|
13939
14052
|
});
|
|
13940
|
-
Swipe.defaultProps = defaultProps$
|
|
14053
|
+
Swipe.defaultProps = defaultProps$t;
|
|
13941
14054
|
Swipe.displayName = "NutSwipe";
|
|
13942
14055
|
const defaultOverlayProps = {
|
|
13943
14056
|
...ComponentDefaults,
|
|
@@ -14021,7 +14134,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14021
14134
|
};
|
|
14022
14135
|
Overlay.defaultProps = defaultOverlayProps;
|
|
14023
14136
|
Overlay.displayName = "NutOverlay";
|
|
14024
|
-
const defaultProps$
|
|
14137
|
+
const defaultProps$s = {
|
|
14025
14138
|
...ComponentDefaults,
|
|
14026
14139
|
id: "",
|
|
14027
14140
|
icon: null,
|
|
@@ -14042,7 +14155,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14042
14155
|
}
|
|
14043
14156
|
// 未实现
|
|
14044
14157
|
};
|
|
14045
|
-
const classPrefix$
|
|
14158
|
+
const classPrefix$8 = "nut-toast";
|
|
14046
14159
|
const Toast = (props) => {
|
|
14047
14160
|
const {
|
|
14048
14161
|
children,
|
|
@@ -14063,7 +14176,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14063
14176
|
style,
|
|
14064
14177
|
onClose,
|
|
14065
14178
|
...rest
|
|
14066
|
-
} = { ...defaultProps$
|
|
14179
|
+
} = { ...defaultProps$s, ...props };
|
|
14067
14180
|
let timer;
|
|
14068
14181
|
const [openState, SetOpenState] = React.useState(false);
|
|
14069
14182
|
React.useEffect(() => {
|
|
@@ -14123,27 +14236,27 @@ var __publicField = (obj, key, value) => {
|
|
|
14123
14236
|
{
|
|
14124
14237
|
visible: openState,
|
|
14125
14238
|
style,
|
|
14126
|
-
className: `${classPrefix$
|
|
14239
|
+
className: `${classPrefix$8}__overlay-default ${className}`,
|
|
14127
14240
|
closeOnOverlayClick,
|
|
14128
14241
|
onClick: () => {
|
|
14129
14242
|
clickCover();
|
|
14130
14243
|
}
|
|
14131
14244
|
},
|
|
14132
|
-
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
14245
|
+
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix$8} ${classes}`, id }, /* @__PURE__ */ React.createElement(
|
|
14133
14246
|
"div",
|
|
14134
14247
|
{
|
|
14135
|
-
className: `${classPrefix$
|
|
14248
|
+
className: `${classPrefix$8}__inner ${classPrefix$8}-${position} ${contentClassName}`,
|
|
14136
14249
|
style: contentStyle
|
|
14137
14250
|
},
|
|
14138
|
-
hasIcon() ? /* @__PURE__ */ React.createElement("p", { className: `${classPrefix$
|
|
14139
|
-
title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
14140
|
-
/* @__PURE__ */ React.createElement("span", { className: `${classPrefix$
|
|
14251
|
+
hasIcon() ? /* @__PURE__ */ React.createElement("p", { className: `${classPrefix$8}__icon-wrapper` }, iconName()) : null,
|
|
14252
|
+
title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$8}-title` }, title) : null,
|
|
14253
|
+
/* @__PURE__ */ React.createElement("span", { className: `${classPrefix$8}-text` }, msg)
|
|
14141
14254
|
))
|
|
14142
14255
|
) : null);
|
|
14143
14256
|
};
|
|
14144
|
-
Toast.defaultProps = defaultProps$
|
|
14257
|
+
Toast.defaultProps = defaultProps$s;
|
|
14145
14258
|
Toast.displayName = "NutToast";
|
|
14146
|
-
const defaultProps$
|
|
14259
|
+
const defaultProps$r = {
|
|
14147
14260
|
...ComponentDefaults,
|
|
14148
14261
|
type: "shake",
|
|
14149
14262
|
action: "initial",
|
|
@@ -14151,16 +14264,16 @@ var __publicField = (obj, key, value) => {
|
|
|
14151
14264
|
onClick: (event) => {
|
|
14152
14265
|
}
|
|
14153
14266
|
};
|
|
14154
|
-
const classPrefix$
|
|
14267
|
+
const classPrefix$7 = `nut-animate`;
|
|
14155
14268
|
const Animate = (props) => {
|
|
14156
14269
|
const { className, type, action, loop, onClick, children, ...rest } = {
|
|
14157
|
-
...defaultProps$
|
|
14270
|
+
...defaultProps$r,
|
|
14158
14271
|
...props
|
|
14159
14272
|
};
|
|
14160
14273
|
const [clicked, setClicked] = React.useState(false);
|
|
14161
14274
|
const classes = classNames({
|
|
14162
14275
|
"nut-ani-container": true,
|
|
14163
|
-
[`${classPrefix$
|
|
14276
|
+
[`${classPrefix$7}-${type}`]: action === "initial" || clicked ? type : false,
|
|
14164
14277
|
loop
|
|
14165
14278
|
});
|
|
14166
14279
|
const cls = classNames(classes, className);
|
|
@@ -14175,9 +14288,9 @@ var __publicField = (obj, key, value) => {
|
|
|
14175
14288
|
};
|
|
14176
14289
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-animate" }, /* @__PURE__ */ React.createElement("div", { className: cls, onClick: handleClick, ...rest }, children));
|
|
14177
14290
|
};
|
|
14178
|
-
Animate.defaultProps = defaultProps$
|
|
14291
|
+
Animate.defaultProps = defaultProps$r;
|
|
14179
14292
|
Animate.displayName = "NutAnimate";
|
|
14180
|
-
const defaultProps$
|
|
14293
|
+
const defaultProps$q = {
|
|
14181
14294
|
...ComponentDefaults,
|
|
14182
14295
|
length: 0,
|
|
14183
14296
|
value: "",
|
|
@@ -14196,7 +14309,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14196
14309
|
style,
|
|
14197
14310
|
...reset
|
|
14198
14311
|
} = {
|
|
14199
|
-
...defaultProps$
|
|
14312
|
+
...defaultProps$q,
|
|
14200
14313
|
...props
|
|
14201
14314
|
};
|
|
14202
14315
|
const classPrefix2 = "nut-countup";
|
|
@@ -14270,9 +14383,9 @@ var __publicField = (obj, key, value) => {
|
|
|
14270
14383
|
);
|
|
14271
14384
|
})));
|
|
14272
14385
|
};
|
|
14273
|
-
CountUp.defaultProps = defaultProps$
|
|
14386
|
+
CountUp.defaultProps = defaultProps$q;
|
|
14274
14387
|
CountUp.displayName = "NutCountUp";
|
|
14275
|
-
const defaultProps$
|
|
14388
|
+
const defaultProps$p = {};
|
|
14276
14389
|
class AnimatingNumbers extends React.Component {
|
|
14277
14390
|
constructor(props) {
|
|
14278
14391
|
super(props);
|
|
@@ -14282,13 +14395,13 @@ var __publicField = (obj, key, value) => {
|
|
|
14282
14395
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-animatingnumbers" });
|
|
14283
14396
|
}
|
|
14284
14397
|
}
|
|
14285
|
-
__publicField(AnimatingNumbers, "defaultProps", defaultProps$
|
|
14398
|
+
__publicField(AnimatingNumbers, "defaultProps", defaultProps$p);
|
|
14286
14399
|
__publicField(AnimatingNumbers, "displayName", "NutAnimatingNumbers");
|
|
14287
14400
|
__publicField(AnimatingNumbers, "CountUp", CountUp);
|
|
14288
14401
|
AnimatingNumbers.CountUp = CountUp;
|
|
14289
14402
|
const b = cn("audio");
|
|
14290
14403
|
const warn = console.warn;
|
|
14291
|
-
const defaultProps$
|
|
14404
|
+
const defaultProps$o = {
|
|
14292
14405
|
...ComponentDefaults,
|
|
14293
14406
|
className: "",
|
|
14294
14407
|
url: "",
|
|
@@ -14331,7 +14444,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14331
14444
|
iconFontClassName,
|
|
14332
14445
|
...rest
|
|
14333
14446
|
} = {
|
|
14334
|
-
...defaultProps$
|
|
14447
|
+
...defaultProps$o,
|
|
14335
14448
|
...props
|
|
14336
14449
|
};
|
|
14337
14450
|
const [playing, setPlaying] = React.useState(false);
|
|
@@ -14382,8 +14495,8 @@ var __publicField = (obj, key, value) => {
|
|
|
14382
14495
|
setCurrentDuration(formatSeconds(audioCtx.currentTime.toString()));
|
|
14383
14496
|
});
|
|
14384
14497
|
audioCtx.onError((res) => {
|
|
14385
|
-
console.
|
|
14386
|
-
console.
|
|
14498
|
+
console.warn("code", res.errCode);
|
|
14499
|
+
console.warn("message", res.errMsg);
|
|
14387
14500
|
});
|
|
14388
14501
|
function formatSeconds(value) {
|
|
14389
14502
|
if (!value) {
|
|
@@ -14488,9 +14601,9 @@ var __publicField = (obj, key, value) => {
|
|
|
14488
14601
|
};
|
|
14489
14602
|
return /* @__PURE__ */ React.createElement("div", { className: `${b()} ${className}`, style, ...rest }, renderAudio());
|
|
14490
14603
|
};
|
|
14491
|
-
Audio.defaultProps = defaultProps$
|
|
14604
|
+
Audio.defaultProps = defaultProps$o;
|
|
14492
14605
|
Audio.displayName = "NutAudio";
|
|
14493
|
-
const defaultProps$
|
|
14606
|
+
const defaultProps$n = {
|
|
14494
14607
|
...ComponentDefaults,
|
|
14495
14608
|
maxContent: "",
|
|
14496
14609
|
max: "",
|
|
@@ -14499,21 +14612,21 @@ var __publicField = (obj, key, value) => {
|
|
|
14499
14612
|
gap: "-8",
|
|
14500
14613
|
level: "left"
|
|
14501
14614
|
};
|
|
14502
|
-
const classPrefix$
|
|
14615
|
+
const classPrefix$6 = `nut-avatar-group`;
|
|
14503
14616
|
const AvatarGroup = (props) => {
|
|
14504
|
-
const propAvatarGroup = { ...defaultProps$
|
|
14617
|
+
const propAvatarGroup = { ...defaultProps$n, ...props };
|
|
14505
14618
|
const { className, style, children } = propAvatarGroup;
|
|
14506
14619
|
const avatarGroupRef = React.useRef(null);
|
|
14507
|
-
const cls = classNames(classPrefix$
|
|
14620
|
+
const cls = classNames(classPrefix$6, className);
|
|
14508
14621
|
const parentAvatar = {
|
|
14509
14622
|
propAvatarGroup,
|
|
14510
14623
|
avatarGroupRef
|
|
14511
14624
|
};
|
|
14512
14625
|
return /* @__PURE__ */ React.createElement(AvatarContext.Provider, { value: parentAvatar }, /* @__PURE__ */ React.createElement("div", { className: cls, style, ref: avatarGroupRef }, children));
|
|
14513
14626
|
};
|
|
14514
|
-
AvatarGroup.defaultProps = defaultProps$
|
|
14627
|
+
AvatarGroup.defaultProps = defaultProps$n;
|
|
14515
14628
|
AvatarGroup.displayName = "NutAvatarGroup";
|
|
14516
|
-
const defaultProps$
|
|
14629
|
+
const defaultProps$m = {
|
|
14517
14630
|
...ComponentDefaults,
|
|
14518
14631
|
strokeWidth: 5,
|
|
14519
14632
|
radius: 50,
|
|
@@ -14522,7 +14635,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14522
14635
|
background: "#e5e9f2",
|
|
14523
14636
|
clockwise: true
|
|
14524
14637
|
};
|
|
14525
|
-
const classPrefix$
|
|
14638
|
+
const classPrefix$5 = `nut-circleprogress`;
|
|
14526
14639
|
const CircleProgress = (props) => {
|
|
14527
14640
|
const {
|
|
14528
14641
|
children,
|
|
@@ -14537,11 +14650,11 @@ var __publicField = (obj, key, value) => {
|
|
|
14537
14650
|
strokeLinecap,
|
|
14538
14651
|
...restProps
|
|
14539
14652
|
} = {
|
|
14540
|
-
...defaultProps$
|
|
14653
|
+
...defaultProps$m,
|
|
14541
14654
|
...props
|
|
14542
14655
|
};
|
|
14543
14656
|
const [oldValue, setOldValue] = React.useState(percent);
|
|
14544
|
-
const classes = classNames(className, classPrefix$
|
|
14657
|
+
const classes = classNames(className, classPrefix$5);
|
|
14545
14658
|
const refRandomId = Math.random().toString(36).slice(-8);
|
|
14546
14659
|
const animateIdRef = React.useRef(0);
|
|
14547
14660
|
const styles = {
|
|
@@ -14623,7 +14736,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14623
14736
|
};
|
|
14624
14737
|
return /* @__PURE__ */ React.createElement("div", { className: classes, style: styles, ...restProps }, /* @__PURE__ */ React.createElement("div", { style: circleStyle() }), /* @__PURE__ */ React.createElement("div", { className: "nut-circleprogress-text" }, children));
|
|
14625
14738
|
};
|
|
14626
|
-
CircleProgress.defaultProps = defaultProps$
|
|
14739
|
+
CircleProgress.defaultProps = defaultProps$m;
|
|
14627
14740
|
CircleProgress.displayName = "NutCircleProgress";
|
|
14628
14741
|
const collapseContext = {
|
|
14629
14742
|
isOpen: (name) => {
|
|
@@ -14635,7 +14748,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14635
14748
|
rotate: 180
|
|
14636
14749
|
};
|
|
14637
14750
|
const CollapseContext = React.createContext(collapseContext);
|
|
14638
|
-
const defaultProps$
|
|
14751
|
+
const defaultProps$l = {
|
|
14639
14752
|
...ComponentDefaults,
|
|
14640
14753
|
title: null,
|
|
14641
14754
|
name: "",
|
|
@@ -14657,7 +14770,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14657
14770
|
extra,
|
|
14658
14771
|
...rest
|
|
14659
14772
|
} = {
|
|
14660
|
-
...defaultProps$
|
|
14773
|
+
...defaultProps$l,
|
|
14661
14774
|
...props
|
|
14662
14775
|
};
|
|
14663
14776
|
const classPrefix2 = "nut-collapse-item";
|
|
@@ -14684,7 +14797,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14684
14797
|
const [wrapperHeight, setWrapperHeight] = React.useState(
|
|
14685
14798
|
() => expanded ? "auto" : "0px"
|
|
14686
14799
|
);
|
|
14687
|
-
const
|
|
14800
|
+
const getRect2 = (selector) => {
|
|
14688
14801
|
return new Promise((resolve) => {
|
|
14689
14802
|
Taro.createSelectorQuery().select(selector).boundingClientRect().exec((rect = []) => {
|
|
14690
14803
|
resolve(rect[0]);
|
|
@@ -14693,7 +14806,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14693
14806
|
};
|
|
14694
14807
|
React.useEffect(() => {
|
|
14695
14808
|
setTimeout(() => {
|
|
14696
|
-
|
|
14809
|
+
getRect2(target).then((res) => {
|
|
14697
14810
|
if (res == null ? void 0 : res.height) {
|
|
14698
14811
|
setCurrentHeight(`${res.height}px`);
|
|
14699
14812
|
}
|
|
@@ -14702,7 +14815,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14702
14815
|
}, [children]);
|
|
14703
14816
|
React.useEffect(() => {
|
|
14704
14817
|
setTimeout(() => {
|
|
14705
|
-
|
|
14818
|
+
getRect2(target).then((res) => {
|
|
14706
14819
|
if (res == null ? void 0 : res.height) {
|
|
14707
14820
|
setCurrentHeight(`${res.height}px`);
|
|
14708
14821
|
}
|
|
@@ -14762,9 +14875,9 @@ var __publicField = (obj, key, value) => {
|
|
|
14762
14875
|
)
|
|
14763
14876
|
));
|
|
14764
14877
|
};
|
|
14765
|
-
CollapseItem.defaultProps = defaultProps$
|
|
14878
|
+
CollapseItem.defaultProps = defaultProps$l;
|
|
14766
14879
|
CollapseItem.displayName = "NutCollapseItem";
|
|
14767
|
-
const defaultProps$
|
|
14880
|
+
const defaultProps$k = {
|
|
14768
14881
|
...ComponentDefaults,
|
|
14769
14882
|
defaultActiveName: [],
|
|
14770
14883
|
accordion: false,
|
|
@@ -14783,7 +14896,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14783
14896
|
rotate,
|
|
14784
14897
|
onChange
|
|
14785
14898
|
} = {
|
|
14786
|
-
...defaultProps$
|
|
14899
|
+
...defaultProps$k,
|
|
14787
14900
|
...props
|
|
14788
14901
|
};
|
|
14789
14902
|
const classPrefix2 = "nut-collapse";
|
|
@@ -14840,10 +14953,10 @@ var __publicField = (obj, key, value) => {
|
|
|
14840
14953
|
/* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className), style }, children)
|
|
14841
14954
|
);
|
|
14842
14955
|
};
|
|
14843
|
-
Collapse.defaultProps = defaultProps$
|
|
14956
|
+
Collapse.defaultProps = defaultProps$k;
|
|
14844
14957
|
Collapse.displayName = "NutCollapse";
|
|
14845
14958
|
Collapse.Item = CollapseItem;
|
|
14846
|
-
const defaultProps$
|
|
14959
|
+
const defaultProps$j = {
|
|
14847
14960
|
...ComponentDefaults,
|
|
14848
14961
|
paused: false,
|
|
14849
14962
|
startTime: Date.now(),
|
|
@@ -14875,7 +14988,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14875
14988
|
onUpdate,
|
|
14876
14989
|
children,
|
|
14877
14990
|
...rest
|
|
14878
|
-
} = { ...defaultProps$
|
|
14991
|
+
} = { ...defaultProps$j, ...props };
|
|
14879
14992
|
const classPrefix2 = "nut-countdown";
|
|
14880
14993
|
const [restTimeStamp, setRestTime] = React.useState(0);
|
|
14881
14994
|
const stateRef = React.useRef({
|
|
@@ -15086,9 +15199,9 @@ var __publicField = (obj, key, value) => {
|
|
|
15086
15199
|
);
|
|
15087
15200
|
};
|
|
15088
15201
|
const CountDown = React.forwardRef(InternalCountDown);
|
|
15089
|
-
CountDown.defaultProps = defaultProps$
|
|
15202
|
+
CountDown.defaultProps = defaultProps$j;
|
|
15090
15203
|
CountDown.displayName = "NutCountDown";
|
|
15091
|
-
const defaultProps$
|
|
15204
|
+
const defaultProps$i = {
|
|
15092
15205
|
...ComponentDefaults,
|
|
15093
15206
|
content: "",
|
|
15094
15207
|
direction: "end",
|
|
@@ -15099,7 +15212,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15099
15212
|
lineHeight: "20",
|
|
15100
15213
|
width: "auto"
|
|
15101
15214
|
};
|
|
15102
|
-
const classPrefix$
|
|
15215
|
+
const classPrefix$4 = `nut-ellipsis`;
|
|
15103
15216
|
const Ellipsis = (props) => {
|
|
15104
15217
|
var _a, _b, _c, _d;
|
|
15105
15218
|
const {
|
|
@@ -15116,8 +15229,8 @@ var __publicField = (obj, key, value) => {
|
|
|
15116
15229
|
onClick,
|
|
15117
15230
|
onChange,
|
|
15118
15231
|
...rest
|
|
15119
|
-
} = { ...defaultProps$
|
|
15120
|
-
|
|
15232
|
+
} = { ...defaultProps$i, ...props };
|
|
15233
|
+
const maxHeight = React.useRef(0);
|
|
15121
15234
|
const [exceeded, setExceeded] = React.useState(false);
|
|
15122
15235
|
const [expanded, setExpanded] = React.useState(false);
|
|
15123
15236
|
const ellipsis = React.useRef({
|
|
@@ -15128,8 +15241,8 @@ var __publicField = (obj, key, value) => {
|
|
|
15128
15241
|
const rootContain = React.useRef(null);
|
|
15129
15242
|
const symbolContain = React.useRef(null);
|
|
15130
15243
|
const [contentCopy, setContentCopy] = React.useState(content);
|
|
15131
|
-
|
|
15132
|
-
|
|
15244
|
+
const lineH = React.useRef(0);
|
|
15245
|
+
const originHeight = React.useRef(0);
|
|
15133
15246
|
const refRandomId = Math.random().toString(36).slice(-8);
|
|
15134
15247
|
const widthRef = React.useRef("auto");
|
|
15135
15248
|
let widthBase = [14, 10, 7, 8.4, 10];
|
|
@@ -15139,9 +15252,9 @@ var __publicField = (obj, key, value) => {
|
|
|
15139
15252
|
const letterUpperReg = /^[A-Z]+$/;
|
|
15140
15253
|
const letterLowerReg = /^[a-z]+$/;
|
|
15141
15254
|
const classes = classNames(
|
|
15142
|
-
classPrefix$
|
|
15255
|
+
classPrefix$4,
|
|
15143
15256
|
className,
|
|
15144
|
-
width ? `${classPrefix$
|
|
15257
|
+
width ? `${classPrefix$4}-width` : ""
|
|
15145
15258
|
);
|
|
15146
15259
|
const init = () => {
|
|
15147
15260
|
setExceeded(false);
|
|
@@ -15153,7 +15266,10 @@ var __publicField = (obj, key, value) => {
|
|
|
15153
15266
|
});
|
|
15154
15267
|
};
|
|
15155
15268
|
Taro.useReady(() => init());
|
|
15156
|
-
React.useEffect(
|
|
15269
|
+
React.useEffect(
|
|
15270
|
+
() => init(),
|
|
15271
|
+
[content, lineH.current, maxHeight.current, originHeight.current]
|
|
15272
|
+
);
|
|
15157
15273
|
const getSymbolInfo = async () => {
|
|
15158
15274
|
const refe = await getRectByTaro(symbolContain == null ? void 0 : symbolContain.current);
|
|
15159
15275
|
symbolTextWidth = refe.width ? Math.ceil(refe.width) : Math.ceil(widthBase[0] * 0.7921);
|
|
@@ -15181,13 +15297,13 @@ var __publicField = (obj, key, value) => {
|
|
|
15181
15297
|
(res) => {
|
|
15182
15298
|
if (!res)
|
|
15183
15299
|
return;
|
|
15184
|
-
lineH = pxToNumber(
|
|
15300
|
+
lineH.current = pxToNumber(
|
|
15185
15301
|
res.lineHeight === "normal" ? lineHeight : res.lineHeight
|
|
15186
15302
|
);
|
|
15187
|
-
maxHeight = Math.floor(
|
|
15188
|
-
lineH * (Number(rows) + 0.5) + pxToNumber(res.paddingTop) + pxToNumber(res.paddingBottom)
|
|
15303
|
+
maxHeight.current = Math.floor(
|
|
15304
|
+
lineH.current * (Number(rows) + 0.5) + pxToNumber(res.paddingTop) + pxToNumber(res.paddingBottom)
|
|
15189
15305
|
);
|
|
15190
|
-
originHeight = pxToNumber(res.height);
|
|
15306
|
+
originHeight.current = pxToNumber(res.height);
|
|
15191
15307
|
widthRef.current = res.width;
|
|
15192
15308
|
const bsize = pxToNumber(res.fontSize);
|
|
15193
15309
|
widthBase = [
|
|
@@ -15203,10 +15319,12 @@ var __publicField = (obj, key, value) => {
|
|
|
15203
15319
|
};
|
|
15204
15320
|
const calcEllipse = async () => {
|
|
15205
15321
|
const refe = await getRectByTaro(rootContain.current);
|
|
15206
|
-
if (refe.height <= maxHeight) {
|
|
15322
|
+
if (refe.height <= maxHeight.current) {
|
|
15207
15323
|
setExceeded(false);
|
|
15208
15324
|
} else {
|
|
15209
|
-
const rowNum = Math.floor(
|
|
15325
|
+
const rowNum = Math.floor(
|
|
15326
|
+
content.length / (originHeight.current / lineH.current - 1)
|
|
15327
|
+
);
|
|
15210
15328
|
if (direction === "middle") {
|
|
15211
15329
|
const end = content.length;
|
|
15212
15330
|
ellipsis.current.leading = tailorContent(
|
|
@@ -15235,7 +15353,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15235
15353
|
const verifyEllipsis = async () => {
|
|
15236
15354
|
var _a2, _b2, _c2, _d2, _e, _f;
|
|
15237
15355
|
const refe = await getRectByTaro(rootContain.current);
|
|
15238
|
-
if (refe && refe.height && refe.height > maxHeight) {
|
|
15356
|
+
if (refe && refe.height && refe.height > maxHeight.current) {
|
|
15239
15357
|
if (direction === "end") {
|
|
15240
15358
|
ellipsis.current.leading = (_c2 = (_a2 = ellipsis.current) == null ? void 0 : _a2.leading) == null ? void 0 : _c2.slice(
|
|
15241
15359
|
0,
|
|
@@ -15395,21 +15513,21 @@ var __publicField = (obj, key, value) => {
|
|
|
15395
15513
|
symbolText()
|
|
15396
15514
|
));
|
|
15397
15515
|
};
|
|
15398
|
-
Ellipsis.defaultProps = defaultProps$
|
|
15516
|
+
Ellipsis.defaultProps = defaultProps$i;
|
|
15399
15517
|
Ellipsis.displayName = "NutEllipsis";
|
|
15400
|
-
const defaultProps$
|
|
15518
|
+
const defaultProps$h = {
|
|
15401
15519
|
total: 3,
|
|
15402
15520
|
current: 0,
|
|
15403
15521
|
direction: "horizontal"
|
|
15404
15522
|
};
|
|
15405
|
-
const classPrefix$
|
|
15523
|
+
const classPrefix$3 = `nut-indicator`;
|
|
15406
15524
|
const Indicator = (props) => {
|
|
15407
15525
|
const { total, current, children, className, direction, ...rest } = {
|
|
15408
|
-
...defaultProps$
|
|
15526
|
+
...defaultProps$h,
|
|
15409
15527
|
...props
|
|
15410
15528
|
};
|
|
15411
15529
|
const classes = classNames({
|
|
15412
|
-
[`${classPrefix$
|
|
15530
|
+
[`${classPrefix$3}__vertical`]: direction === "vertical"
|
|
15413
15531
|
});
|
|
15414
15532
|
const renderElement = () => {
|
|
15415
15533
|
const childs = [];
|
|
@@ -15419,25 +15537,25 @@ var __publicField = (obj, key, value) => {
|
|
|
15419
15537
|
"div",
|
|
15420
15538
|
{
|
|
15421
15539
|
key: item,
|
|
15422
|
-
className: `${classPrefix$
|
|
15540
|
+
className: `${classPrefix$3}__dot ${classPrefix$3}__active`
|
|
15423
15541
|
}
|
|
15424
|
-
) : /* @__PURE__ */ React.createElement("div", { key: item, className: `${classPrefix$
|
|
15542
|
+
) : /* @__PURE__ */ React.createElement("div", { key: item, className: `${classPrefix$3}__dot` })
|
|
15425
15543
|
);
|
|
15426
15544
|
}
|
|
15427
15545
|
return childs;
|
|
15428
15546
|
};
|
|
15429
15547
|
return /* @__PURE__ */ React.createElement("div", { className: classNames(classes, className), ...rest }, renderElement());
|
|
15430
15548
|
};
|
|
15431
|
-
Indicator.defaultProps = defaultProps$
|
|
15549
|
+
Indicator.defaultProps = defaultProps$h;
|
|
15432
15550
|
Indicator.displayName = "NutIndicator";
|
|
15433
|
-
const defaultProps$
|
|
15551
|
+
const defaultProps$g = {
|
|
15434
15552
|
direction: "horizontal",
|
|
15435
15553
|
indicator: false,
|
|
15436
15554
|
autoPlay: false,
|
|
15437
15555
|
loop: false,
|
|
15438
15556
|
defaultValue: 0
|
|
15439
15557
|
};
|
|
15440
|
-
const classPrefix$
|
|
15558
|
+
const classPrefix$2 = "nut-swiper";
|
|
15441
15559
|
const Swiper = React.forwardRef((props, ref) => {
|
|
15442
15560
|
const {
|
|
15443
15561
|
width,
|
|
@@ -15452,7 +15570,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15452
15570
|
defaultValue,
|
|
15453
15571
|
...rest
|
|
15454
15572
|
} = {
|
|
15455
|
-
...defaultProps$
|
|
15573
|
+
...defaultProps$g,
|
|
15456
15574
|
...props
|
|
15457
15575
|
};
|
|
15458
15576
|
const [current, setCurrent] = React.useState(defaultValue);
|
|
@@ -15468,8 +15586,8 @@ var __publicField = (obj, key, value) => {
|
|
|
15468
15586
|
"div",
|
|
15469
15587
|
{
|
|
15470
15588
|
className: classNames({
|
|
15471
|
-
[`${classPrefix$
|
|
15472
|
-
[`${classPrefix$
|
|
15589
|
+
[`${classPrefix$2}__indicator`]: true,
|
|
15590
|
+
[`${classPrefix$2}__indicator-vertical`]: direction === "vertical"
|
|
15473
15591
|
})
|
|
15474
15592
|
},
|
|
15475
15593
|
/* @__PURE__ */ React.createElement(
|
|
@@ -15511,7 +15629,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15511
15629
|
return /* @__PURE__ */ React.createElement(
|
|
15512
15630
|
components.View,
|
|
15513
15631
|
{
|
|
15514
|
-
className: classNames(classPrefix$
|
|
15632
|
+
className: classNames(classPrefix$2, className),
|
|
15515
15633
|
style: {
|
|
15516
15634
|
width: !width ? "100%" : `${width}px`,
|
|
15517
15635
|
height: !height ? "150px" : `${height}px`
|
|
@@ -15547,9 +15665,9 @@ var __publicField = (obj, key, value) => {
|
|
|
15547
15665
|
renderIndicator()
|
|
15548
15666
|
);
|
|
15549
15667
|
});
|
|
15550
|
-
Swiper.defaultProps = defaultProps$
|
|
15668
|
+
Swiper.defaultProps = defaultProps$g;
|
|
15551
15669
|
Swiper.displayName = "NutSwiper";
|
|
15552
|
-
const defaultProps$
|
|
15670
|
+
const defaultProps$f = {
|
|
15553
15671
|
itemId: "",
|
|
15554
15672
|
skipHiddenItemLayout: false
|
|
15555
15673
|
};
|
|
@@ -15557,9 +15675,9 @@ var __publicField = (obj, key, value) => {
|
|
|
15557
15675
|
const { children, ...rest } = props;
|
|
15558
15676
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
|
|
15559
15677
|
};
|
|
15560
|
-
SwiperItem.defaultProps = defaultProps$
|
|
15678
|
+
SwiperItem.defaultProps = defaultProps$f;
|
|
15561
15679
|
SwiperItem.displayName = "NutSwiperItem";
|
|
15562
|
-
const defaultProps$
|
|
15680
|
+
const defaultProps$e = {
|
|
15563
15681
|
...ComponentDefaults,
|
|
15564
15682
|
images: [],
|
|
15565
15683
|
videos: [],
|
|
@@ -15569,6 +15687,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15569
15687
|
closeOnContentClick: false,
|
|
15570
15688
|
indicator: false,
|
|
15571
15689
|
indicatorColor: "#fff",
|
|
15690
|
+
showMenuByLongpress: false,
|
|
15572
15691
|
onChange: (value) => {
|
|
15573
15692
|
},
|
|
15574
15693
|
onClose: () => {
|
|
@@ -15584,6 +15703,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15584
15703
|
indicator,
|
|
15585
15704
|
autoPlay,
|
|
15586
15705
|
closeOnContentClick,
|
|
15706
|
+
showMenuByLongpress,
|
|
15587
15707
|
onClose
|
|
15588
15708
|
} = props;
|
|
15589
15709
|
const classPrefix2 = "nut-imagepreview";
|
|
@@ -15767,6 +15887,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15767
15887
|
{
|
|
15768
15888
|
src: item.src,
|
|
15769
15889
|
mode: "aspectFit",
|
|
15890
|
+
showMenuByLongpress: true,
|
|
15770
15891
|
style: { width: "100%", height: "100%" }
|
|
15771
15892
|
}
|
|
15772
15893
|
));
|
|
@@ -15777,7 +15898,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15777
15898
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-index` }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0))
|
|
15778
15899
|
);
|
|
15779
15900
|
};
|
|
15780
|
-
ImagePreview.defaultProps = defaultProps$
|
|
15901
|
+
ImagePreview.defaultProps = defaultProps$e;
|
|
15781
15902
|
ImagePreview.displayName = "NutImagePreview";
|
|
15782
15903
|
const initPositinoCache = (reaItemSize, length = 0) => {
|
|
15783
15904
|
let index = 0;
|
|
@@ -15849,7 +15970,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15849
15970
|
});
|
|
15850
15971
|
};
|
|
15851
15972
|
const clientHeight = Taro.getSystemInfoSync().windowHeight - 5 || 667;
|
|
15852
|
-
const defaultProps$
|
|
15973
|
+
const defaultProps$d = {
|
|
15853
15974
|
...ComponentDefaults,
|
|
15854
15975
|
list: [],
|
|
15855
15976
|
containerHeight: clientHeight,
|
|
@@ -15870,7 +15991,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15870
15991
|
containerHeight,
|
|
15871
15992
|
...rest
|
|
15872
15993
|
} = {
|
|
15873
|
-
...defaultProps$
|
|
15994
|
+
...defaultProps$d,
|
|
15874
15995
|
...props
|
|
15875
15996
|
};
|
|
15876
15997
|
const [startOffset, setStartOffset] = React.useState(0);
|
|
@@ -16010,9 +16131,9 @@ var __publicField = (obj, key, value) => {
|
|
|
16010
16131
|
)
|
|
16011
16132
|
);
|
|
16012
16133
|
};
|
|
16013
|
-
VirtualList.defaultProps = defaultProps$
|
|
16134
|
+
VirtualList.defaultProps = defaultProps$d;
|
|
16014
16135
|
VirtualList.displayName = "NutVirtualList";
|
|
16015
|
-
const defaultProps$
|
|
16136
|
+
const defaultProps$c = {
|
|
16016
16137
|
...ComponentDefaults,
|
|
16017
16138
|
defaultValue: 1,
|
|
16018
16139
|
mode: "multi",
|
|
@@ -16040,7 +16161,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16040
16161
|
className,
|
|
16041
16162
|
...rest
|
|
16042
16163
|
} = {
|
|
16043
|
-
...defaultProps$
|
|
16164
|
+
...defaultProps$c,
|
|
16044
16165
|
...props
|
|
16045
16166
|
};
|
|
16046
16167
|
const classPrefix2 = "nut-pagination";
|
|
@@ -16122,9 +16243,9 @@ var __publicField = (obj, key, value) => {
|
|
|
16122
16243
|
next || locale.pagination.next
|
|
16123
16244
|
));
|
|
16124
16245
|
};
|
|
16125
|
-
Pagination.defaultProps = defaultProps$
|
|
16246
|
+
Pagination.defaultProps = defaultProps$c;
|
|
16126
16247
|
Pagination.displayName = "NutPagination";
|
|
16127
|
-
const defaultProps$
|
|
16248
|
+
const defaultProps$b = {
|
|
16128
16249
|
...ComponentDefaults,
|
|
16129
16250
|
price: 0,
|
|
16130
16251
|
symbol: "¥",
|
|
@@ -16147,7 +16268,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16147
16268
|
style,
|
|
16148
16269
|
...rest
|
|
16149
16270
|
} = {
|
|
16150
|
-
...defaultProps$
|
|
16271
|
+
...defaultProps$b,
|
|
16151
16272
|
...props
|
|
16152
16273
|
};
|
|
16153
16274
|
const classPrefix2 = "nut-price";
|
|
@@ -16236,10 +16357,10 @@ var __publicField = (obj, key, value) => {
|
|
|
16236
16357
|
symbol && position === "after" ? renderSymbol() : null
|
|
16237
16358
|
);
|
|
16238
16359
|
};
|
|
16239
|
-
Price.defaultProps = defaultProps$
|
|
16360
|
+
Price.defaultProps = defaultProps$b;
|
|
16240
16361
|
Price.displayName = "NutPrice";
|
|
16241
16362
|
const DataContext = React.createContext({});
|
|
16242
|
-
const defaultProps$
|
|
16363
|
+
const defaultProps$a = {
|
|
16243
16364
|
...ComponentDefaults,
|
|
16244
16365
|
title: "",
|
|
16245
16366
|
description: "",
|
|
@@ -16248,7 +16369,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16248
16369
|
};
|
|
16249
16370
|
const Step = (props) => {
|
|
16250
16371
|
const { children, title, description, value, icon, className, ...restProps } = {
|
|
16251
|
-
...defaultProps$
|
|
16372
|
+
...defaultProps$a,
|
|
16252
16373
|
...props
|
|
16253
16374
|
};
|
|
16254
16375
|
const parent = React.useContext(DataContext);
|
|
@@ -16282,16 +16403,16 @@ var __publicField = (obj, key, value) => {
|
|
|
16282
16403
|
};
|
|
16283
16404
|
return /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps, onClick: handleClickStep }, /* @__PURE__ */ React.createElement("div", { className: "nut-step-head" }, /* @__PURE__ */ React.createElement("div", { className: "nut-step-line" }), /* @__PURE__ */ React.createElement("div", { className: renderIconClass() }, icon || !dot && /* @__PURE__ */ React.createElement("span", { className: "nut-step-inner" }, value))), /* @__PURE__ */ React.createElement("div", { className: "nut-step-main" }, /* @__PURE__ */ React.createElement("span", { className: "nut-step-title" }, title), description && /* @__PURE__ */ React.createElement("span", { className: "nut-step-description" }, description)));
|
|
16284
16405
|
};
|
|
16285
|
-
Step.defaultProps = defaultProps$
|
|
16406
|
+
Step.defaultProps = defaultProps$a;
|
|
16286
16407
|
Step.displayName = "NutStep";
|
|
16287
|
-
const defaultProps$
|
|
16408
|
+
const defaultProps$9 = {
|
|
16288
16409
|
...ComponentDefaults,
|
|
16289
16410
|
value: 0,
|
|
16290
16411
|
direction: "horizontal",
|
|
16291
16412
|
dot: false
|
|
16292
16413
|
};
|
|
16293
16414
|
const Steps = (props) => {
|
|
16294
|
-
const propSteps = { ...defaultProps$
|
|
16415
|
+
const propSteps = { ...defaultProps$9, ...props };
|
|
16295
16416
|
const {
|
|
16296
16417
|
children,
|
|
16297
16418
|
value,
|
|
@@ -16322,9 +16443,9 @@ var __publicField = (obj, key, value) => {
|
|
|
16322
16443
|
children
|
|
16323
16444
|
));
|
|
16324
16445
|
};
|
|
16325
|
-
Steps.defaultProps = defaultProps$
|
|
16446
|
+
Steps.defaultProps = defaultProps$9;
|
|
16326
16447
|
Steps.displayName = "NutSteps";
|
|
16327
|
-
const defaultProps$
|
|
16448
|
+
const defaultProps$8 = {
|
|
16328
16449
|
...ComponentDefaults,
|
|
16329
16450
|
columns: [],
|
|
16330
16451
|
data: [],
|
|
@@ -16336,7 +16457,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16336
16457
|
};
|
|
16337
16458
|
const Table = (props) => {
|
|
16338
16459
|
const { locale } = useConfig$1();
|
|
16339
|
-
defaultProps$
|
|
16460
|
+
defaultProps$8.noData = locale.noData;
|
|
16340
16461
|
const {
|
|
16341
16462
|
children,
|
|
16342
16463
|
className,
|
|
@@ -16352,7 +16473,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16352
16473
|
onSort,
|
|
16353
16474
|
...rest
|
|
16354
16475
|
} = {
|
|
16355
|
-
...defaultProps$
|
|
16476
|
+
...defaultProps$8,
|
|
16356
16477
|
...props
|
|
16357
16478
|
};
|
|
16358
16479
|
const [curData, setCurData] = React.useState(data);
|
|
@@ -16435,19 +16556,18 @@ var __publicField = (obj, key, value) => {
|
|
|
16435
16556
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__main__body` }, renderBoyTrs())
|
|
16436
16557
|
), (summary || curData.length === 0) && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__summary` }, summary || noData));
|
|
16437
16558
|
};
|
|
16438
|
-
Table.defaultProps = defaultProps$
|
|
16559
|
+
Table.defaultProps = defaultProps$8;
|
|
16439
16560
|
Table.displayName = "NutTable";
|
|
16440
|
-
const defaultProps$
|
|
16561
|
+
const defaultProps$7 = {
|
|
16441
16562
|
...ComponentDefaults,
|
|
16442
16563
|
type: "default",
|
|
16564
|
+
background: "",
|
|
16443
16565
|
color: "",
|
|
16444
|
-
textColor: "",
|
|
16445
16566
|
plain: false,
|
|
16446
16567
|
round: false,
|
|
16447
16568
|
mark: false,
|
|
16448
16569
|
closeable: false,
|
|
16449
16570
|
closeIcon: null,
|
|
16450
|
-
prefixCls: "nut-tag",
|
|
16451
16571
|
onClose: (e) => {
|
|
16452
16572
|
},
|
|
16453
16573
|
onClick: (e) => {
|
|
@@ -16457,86 +16577,70 @@ var __publicField = (obj, key, value) => {
|
|
|
16457
16577
|
const {
|
|
16458
16578
|
className,
|
|
16459
16579
|
style,
|
|
16460
|
-
|
|
16580
|
+
background,
|
|
16461
16581
|
plain,
|
|
16462
16582
|
type,
|
|
16463
16583
|
round,
|
|
16464
|
-
prefixCls: prefixCls2,
|
|
16465
16584
|
children,
|
|
16466
16585
|
mark,
|
|
16467
16586
|
closeable,
|
|
16468
16587
|
closeIcon,
|
|
16469
|
-
|
|
16588
|
+
color,
|
|
16470
16589
|
onClick,
|
|
16471
16590
|
onClose
|
|
16472
16591
|
} = {
|
|
16473
|
-
...defaultProps$
|
|
16592
|
+
...defaultProps$7,
|
|
16474
16593
|
...props
|
|
16475
16594
|
};
|
|
16476
|
-
const [
|
|
16477
|
-
const [
|
|
16478
|
-
|
|
16479
|
-
setBtnName(classes());
|
|
16480
|
-
}, [
|
|
16481
|
-
type,
|
|
16482
|
-
color,
|
|
16483
|
-
textColor,
|
|
16484
|
-
plain,
|
|
16485
|
-
round,
|
|
16486
|
-
mark,
|
|
16487
|
-
closeable,
|
|
16488
|
-
prefixCls2,
|
|
16489
|
-
onClick,
|
|
16490
|
-
onClose,
|
|
16491
|
-
className
|
|
16492
|
-
]);
|
|
16595
|
+
const [tagClass, setTagClass] = React.useState("");
|
|
16596
|
+
const [visible, setVisible] = React.useState(true);
|
|
16597
|
+
const classPrefix2 = "nut-tag";
|
|
16493
16598
|
const classes = () => {
|
|
16494
|
-
const prefixCls22 = "nut-tag";
|
|
16495
16599
|
return classNames({
|
|
16496
|
-
[
|
|
16497
|
-
[`${
|
|
16498
|
-
[`${
|
|
16499
|
-
[`${
|
|
16500
|
-
[`${
|
|
16501
|
-
[`${
|
|
16600
|
+
[classPrefix2]: true,
|
|
16601
|
+
[`${classPrefix2}--${type}`]: type,
|
|
16602
|
+
[`${classPrefix2}--plain`]: plain,
|
|
16603
|
+
[`${classPrefix2}--round`]: round,
|
|
16604
|
+
[`${classPrefix2}--mark`]: mark,
|
|
16605
|
+
[`${classPrefix2}--close`]: closeable,
|
|
16502
16606
|
[`${className}`]: className
|
|
16503
16607
|
});
|
|
16504
16608
|
};
|
|
16609
|
+
React.useEffect(() => {
|
|
16610
|
+
setTagClass(classes());
|
|
16611
|
+
}, [type, background, color, plain, round, mark, closeable, className]);
|
|
16505
16612
|
const handleClick = (e) => {
|
|
16506
|
-
|
|
16507
|
-
props.onClick(e);
|
|
16508
|
-
}
|
|
16613
|
+
onClick && onClick(e);
|
|
16509
16614
|
};
|
|
16510
16615
|
const getStyle = () => {
|
|
16511
16616
|
const style2 = {};
|
|
16512
|
-
if (
|
|
16513
|
-
style2.color = textColor;
|
|
16514
|
-
} else if (color && plain) {
|
|
16617
|
+
if (color) {
|
|
16515
16618
|
style2.color = color;
|
|
16619
|
+
} else if (background && plain) {
|
|
16620
|
+
style2.color = background;
|
|
16516
16621
|
}
|
|
16517
16622
|
if (plain) {
|
|
16518
|
-
style2.
|
|
16519
|
-
|
|
16520
|
-
|
|
16521
|
-
style2.background = color;
|
|
16623
|
+
style2.borderColor = background;
|
|
16624
|
+
} else if (background) {
|
|
16625
|
+
style2.background = background;
|
|
16522
16626
|
}
|
|
16523
16627
|
return style2;
|
|
16524
16628
|
};
|
|
16525
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, closeable ?
|
|
16629
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, closeable ? visible && /* @__PURE__ */ React.createElement(
|
|
16526
16630
|
"div",
|
|
16527
16631
|
{
|
|
16528
|
-
className:
|
|
16632
|
+
className: tagClass,
|
|
16529
16633
|
style: { ...style, ...getStyle() },
|
|
16530
16634
|
onClick: (e) => handleClick(e)
|
|
16531
16635
|
},
|
|
16532
|
-
children && /* @__PURE__ */ React.createElement("span", { className:
|
|
16636
|
+
children && /* @__PURE__ */ React.createElement("span", { className: `${classPrefix2}-text` }, children),
|
|
16533
16637
|
React.isValidElement(closeIcon) ? /* @__PURE__ */ React.createElement(
|
|
16534
16638
|
"i",
|
|
16535
16639
|
{
|
|
16536
|
-
className:
|
|
16640
|
+
className: `${classPrefix2}-custom-icon`,
|
|
16537
16641
|
onClick: (e) => {
|
|
16538
|
-
|
|
16539
|
-
|
|
16642
|
+
setVisible(false);
|
|
16643
|
+
onClose && onClose(e);
|
|
16540
16644
|
}
|
|
16541
16645
|
},
|
|
16542
16646
|
closeIcon
|
|
@@ -16545,24 +16649,24 @@ var __publicField = (obj, key, value) => {
|
|
|
16545
16649
|
{
|
|
16546
16650
|
size: 12,
|
|
16547
16651
|
onClick: (e) => {
|
|
16548
|
-
|
|
16549
|
-
|
|
16652
|
+
setVisible(false);
|
|
16653
|
+
onClose && onClose(e);
|
|
16550
16654
|
}
|
|
16551
16655
|
}
|
|
16552
16656
|
)
|
|
16553
16657
|
) : /* @__PURE__ */ React.createElement(
|
|
16554
16658
|
"div",
|
|
16555
16659
|
{
|
|
16556
|
-
className:
|
|
16660
|
+
className: tagClass,
|
|
16557
16661
|
style: { ...style, ...getStyle() },
|
|
16558
16662
|
onClick: (e) => handleClick(e)
|
|
16559
16663
|
},
|
|
16560
|
-
children && /* @__PURE__ */ React.createElement("span", { className:
|
|
16664
|
+
children && /* @__PURE__ */ React.createElement("span", { className: `${classPrefix2}-text` }, children)
|
|
16561
16665
|
));
|
|
16562
16666
|
};
|
|
16563
|
-
Tag.defaultProps = defaultProps$
|
|
16667
|
+
Tag.defaultProps = defaultProps$7;
|
|
16564
16668
|
Tag.displayName = "NutTag";
|
|
16565
|
-
const defaultProps$
|
|
16669
|
+
const defaultProps$6 = {
|
|
16566
16670
|
...ComponentDefaults,
|
|
16567
16671
|
source: {
|
|
16568
16672
|
type: {},
|
|
@@ -16578,7 +16682,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16578
16682
|
loop: false
|
|
16579
16683
|
}
|
|
16580
16684
|
};
|
|
16581
|
-
const classPrefix = `nut-video`;
|
|
16685
|
+
const classPrefix$1 = `nut-video`;
|
|
16582
16686
|
const Video = (props) => {
|
|
16583
16687
|
const {
|
|
16584
16688
|
children,
|
|
@@ -16590,10 +16694,10 @@ var __publicField = (obj, key, value) => {
|
|
|
16590
16694
|
onPlayEnd,
|
|
16591
16695
|
...restProps
|
|
16592
16696
|
} = {
|
|
16593
|
-
...defaultProps$
|
|
16697
|
+
...defaultProps$6,
|
|
16594
16698
|
...props
|
|
16595
16699
|
};
|
|
16596
|
-
const classes = classNames(className, classPrefix);
|
|
16700
|
+
const classes = classNames(className, classPrefix$1);
|
|
16597
16701
|
return /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps }, /* @__PURE__ */ React.createElement(
|
|
16598
16702
|
components.Video,
|
|
16599
16703
|
{
|
|
@@ -16610,41 +16714,41 @@ var __publicField = (obj, key, value) => {
|
|
|
16610
16714
|
}
|
|
16611
16715
|
));
|
|
16612
16716
|
};
|
|
16613
|
-
Video.defaultProps = defaultProps$
|
|
16717
|
+
Video.defaultProps = defaultProps$6;
|
|
16614
16718
|
Video.displayName = "NutVideo";
|
|
16615
|
-
const defaultProps$
|
|
16616
|
-
|
|
16617
|
-
|
|
16719
|
+
const defaultProps$5 = {
|
|
16720
|
+
...ComponentDefaults,
|
|
16721
|
+
list: [],
|
|
16722
|
+
interval: 500,
|
|
16618
16723
|
loop: true,
|
|
16619
|
-
|
|
16724
|
+
duration: 3e3,
|
|
16620
16725
|
rows: 3,
|
|
16621
|
-
|
|
16726
|
+
gapY: 10
|
|
16622
16727
|
};
|
|
16728
|
+
const classPrefix = `nut-barrage`;
|
|
16623
16729
|
const InternalBarrage = (props, ref) => {
|
|
16624
16730
|
const {
|
|
16625
16731
|
className,
|
|
16626
|
-
|
|
16732
|
+
interval,
|
|
16627
16733
|
loop,
|
|
16628
|
-
|
|
16629
|
-
|
|
16734
|
+
list,
|
|
16735
|
+
duration,
|
|
16630
16736
|
rows,
|
|
16631
|
-
|
|
16737
|
+
gapY,
|
|
16632
16738
|
...restProps
|
|
16633
16739
|
} = {
|
|
16634
|
-
...defaultProps$
|
|
16740
|
+
...defaultProps$5,
|
|
16635
16741
|
...props
|
|
16636
16742
|
};
|
|
16637
16743
|
const [styleList, setStyleList] = React.useState([]);
|
|
16638
|
-
const [baItemList, setBaItemList] = React.useState(
|
|
16639
|
-
const barrageListSet = React.useRef(
|
|
16744
|
+
const [baItemList, setBaItemList] = React.useState(list);
|
|
16745
|
+
const barrageListSet = React.useRef(list);
|
|
16640
16746
|
const barrageBody = React.useRef(null);
|
|
16641
16747
|
const barrageContainer = React.useRef(null);
|
|
16642
16748
|
const timeId = React.useRef((/* @__PURE__ */ new Date()).getTime());
|
|
16643
16749
|
const timer = React.useRef(0);
|
|
16644
|
-
|
|
16645
|
-
|
|
16646
|
-
const classes = classNames(className, b2(""), {
|
|
16647
|
-
[`nut-barrage__body${timeId.current}`]: true
|
|
16750
|
+
const classes = classNames(className, classPrefix, {
|
|
16751
|
+
[`${classPrefix}__body${timeId.current}`]: true
|
|
16648
16752
|
});
|
|
16649
16753
|
React.useImperativeHandle(ref, () => ({
|
|
16650
16754
|
add: (word) => {
|
|
@@ -16653,303 +16757,296 @@ var __publicField = (obj, key, value) => {
|
|
|
16653
16757
|
}
|
|
16654
16758
|
}));
|
|
16655
16759
|
React.useEffect(() => {
|
|
16656
|
-
barrageListSet.current = [...
|
|
16760
|
+
barrageListSet.current = [...list];
|
|
16657
16761
|
run();
|
|
16658
16762
|
return () => {
|
|
16659
16763
|
clearInterval(timer.current);
|
|
16660
16764
|
};
|
|
16661
|
-
}, [
|
|
16765
|
+
}, [list]);
|
|
16662
16766
|
const run = () => {
|
|
16663
16767
|
setBaItemList(barrageListSet.current);
|
|
16664
|
-
barrageListSet.current.forEach((item,
|
|
16665
|
-
getNode(
|
|
16768
|
+
barrageListSet.current.forEach((item, index) => {
|
|
16769
|
+
getNode(index);
|
|
16666
16770
|
});
|
|
16667
16771
|
};
|
|
16668
|
-
const getNode = (
|
|
16772
|
+
const getNode = (index) => {
|
|
16669
16773
|
const query = Taro.createSelectorQuery();
|
|
16670
16774
|
setTimeout(() => {
|
|
16671
16775
|
let width = 100;
|
|
16672
|
-
query.select(
|
|
16776
|
+
query.select(`.${classPrefix}__body` + timeId.current).boundingClientRect((rec) => {
|
|
16673
16777
|
width = rec.width || 300;
|
|
16674
16778
|
});
|
|
16675
|
-
query.select(
|
|
16779
|
+
query.select(`.${classPrefix}__item` + index).boundingClientRect((recs) => {
|
|
16676
16780
|
let height = recs.height;
|
|
16677
|
-
let nodeTop =
|
|
16678
|
-
styleInfo(
|
|
16781
|
+
let nodeTop = index % rows * (height + gapY) + 20 + "px";
|
|
16782
|
+
styleInfo(index, nodeTop, width);
|
|
16679
16783
|
}).exec();
|
|
16680
16784
|
}, 500);
|
|
16681
16785
|
};
|
|
16682
|
-
const styleInfo = (
|
|
16683
|
-
let timeIndex =
|
|
16684
|
-
let
|
|
16685
|
-
let time =
|
|
16786
|
+
const styleInfo = (index, nodeTop, width) => {
|
|
16787
|
+
let timeIndex = index - rows > 0 ? index - rows : 0;
|
|
16788
|
+
let list2 = styleList;
|
|
16789
|
+
let time = list2[timeIndex] ? Number(list2[timeIndex]["--time"]) : 0;
|
|
16686
16790
|
let obj = {
|
|
16687
16791
|
top: nodeTop,
|
|
16688
|
-
"--time": `${
|
|
16689
|
-
animationDuration: `${
|
|
16792
|
+
"--time": `${interval * index + time}`,
|
|
16793
|
+
animationDuration: `${duration}ms`,
|
|
16690
16794
|
animationIterationCount: `${loop ? "infinite" : 1}`,
|
|
16691
|
-
animationDelay: `${
|
|
16795
|
+
animationDelay: `${interval * index + time}ms`,
|
|
16692
16796
|
"--move-distance": `-${width}px`
|
|
16693
16797
|
};
|
|
16694
|
-
|
|
16695
|
-
setStyleList([...
|
|
16798
|
+
list2.push(obj);
|
|
16799
|
+
setStyleList([...list2]);
|
|
16696
16800
|
};
|
|
16697
|
-
return /* @__PURE__ */ React.createElement("div", { className: classes, ref: barrageBody, ...restProps }, /* @__PURE__ */ React.createElement("div", { ref: barrageContainer, className: "bContainer" }, baItemList.map((item,
|
|
16801
|
+
return /* @__PURE__ */ React.createElement("div", { className: classes, ref: barrageBody, ...restProps }, /* @__PURE__ */ React.createElement("div", { ref: barrageContainer, className: "bContainer" }, baItemList.map((item, index) => {
|
|
16698
16802
|
return /* @__PURE__ */ React.createElement(
|
|
16699
16803
|
"div",
|
|
16700
16804
|
{
|
|
16701
|
-
className: `barrage-item
|
|
16702
|
-
style: styleList[
|
|
16805
|
+
className: `barrage-item ${classPrefix}__item${index} move`,
|
|
16806
|
+
style: styleList[index]
|
|
16703
16807
|
},
|
|
16704
16808
|
item.length > 8 ? item.substr(0, 8) + "..." : item
|
|
16705
16809
|
);
|
|
16706
16810
|
})));
|
|
16707
16811
|
};
|
|
16708
16812
|
const Barrage = React.forwardRef(InternalBarrage);
|
|
16709
|
-
Barrage.defaultProps = defaultProps$
|
|
16813
|
+
Barrage.defaultProps = defaultProps$5;
|
|
16710
16814
|
Barrage.displayName = "NutBarrage";
|
|
16711
|
-
const defaultProps$
|
|
16815
|
+
const defaultProps$4 = {
|
|
16816
|
+
...ComponentDefaults,
|
|
16817
|
+
src: "",
|
|
16818
|
+
title: "",
|
|
16819
|
+
price: "",
|
|
16820
|
+
vipPrice: "",
|
|
16821
|
+
shopDescription: "",
|
|
16822
|
+
delivery: "",
|
|
16823
|
+
shopName: "",
|
|
16824
|
+
description: "",
|
|
16825
|
+
tag: "",
|
|
16826
|
+
priceTag: "",
|
|
16827
|
+
extra: ""
|
|
16828
|
+
};
|
|
16712
16829
|
const Card = (props) => {
|
|
16713
16830
|
const {
|
|
16714
16831
|
className,
|
|
16715
16832
|
style,
|
|
16716
|
-
|
|
16833
|
+
src,
|
|
16717
16834
|
title,
|
|
16718
16835
|
price,
|
|
16719
16836
|
vipPrice,
|
|
16720
|
-
|
|
16837
|
+
shopDescription,
|
|
16721
16838
|
delivery,
|
|
16722
16839
|
shopName,
|
|
16723
|
-
|
|
16724
|
-
|
|
16725
|
-
|
|
16726
|
-
|
|
16840
|
+
tag,
|
|
16841
|
+
priceTag,
|
|
16842
|
+
description,
|
|
16843
|
+
extra,
|
|
16727
16844
|
...rest
|
|
16728
16845
|
} = {
|
|
16729
|
-
...defaultProps$
|
|
16846
|
+
...defaultProps$4,
|
|
16730
16847
|
...props
|
|
16731
16848
|
};
|
|
16732
|
-
const
|
|
16733
|
-
return /* @__PURE__ */ React.createElement("div", { className: classNames(
|
|
16849
|
+
const classPrefix2 = "nut-card";
|
|
16850
|
+
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className), style, ...rest }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__left` }, /* @__PURE__ */ React.createElement("img", { src, alt: "" })), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__right` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__right-title` }, title), description, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}right-price` }, /* @__PURE__ */ React.createElement(Price, { size: "normal", price }), priceTag || /* @__PURE__ */ React.createElement(
|
|
16851
|
+
Price,
|
|
16852
|
+
{
|
|
16853
|
+
size: "normal",
|
|
16854
|
+
className: `${classPrefix2}right-price-origin`,
|
|
16855
|
+
price: vipPrice
|
|
16856
|
+
}
|
|
16857
|
+
)), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}right-other` }, tag || /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Tag, { type: "danger" }, shopDescription), /* @__PURE__ */ React.createElement(Tag, { plain: true }, delivery))), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}right-shop` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}right-shop-name` }, shopName), extra)));
|
|
16734
16858
|
};
|
|
16735
|
-
Card.defaultProps = defaultProps$
|
|
16859
|
+
Card.defaultProps = defaultProps$4;
|
|
16736
16860
|
Card.displayName = "NutCard";
|
|
16737
|
-
const defaultProps$
|
|
16738
|
-
|
|
16739
|
-
|
|
16740
|
-
|
|
16741
|
-
|
|
16742
|
-
|
|
16861
|
+
const defaultProps$3 = {
|
|
16862
|
+
...ComponentDefaults,
|
|
16863
|
+
activeDate: "",
|
|
16864
|
+
activeTime: [],
|
|
16865
|
+
options: [],
|
|
16866
|
+
optionKey: {
|
|
16867
|
+
valueKey: "value",
|
|
16868
|
+
textKey: "text",
|
|
16869
|
+
childrenKey: "children"
|
|
16870
|
+
},
|
|
16871
|
+
onSelect: () => {
|
|
16872
|
+
}
|
|
16743
16873
|
};
|
|
16744
16874
|
const TimeDetail = (props) => {
|
|
16745
|
-
|
|
16746
|
-
|
|
16747
|
-
...defaultProps$4,
|
|
16875
|
+
const { options, optionKey, className, activeDate, activeTime, onSelect } = {
|
|
16876
|
+
...defaultProps$3,
|
|
16748
16877
|
...props
|
|
16749
16878
|
};
|
|
16750
|
-
const
|
|
16751
|
-
const
|
|
16752
|
-
|
|
16753
|
-
|
|
16754
|
-
|
|
16755
|
-
|
|
16756
|
-
|
|
16757
|
-
|
|
16758
|
-
|
|
16759
|
-
|
|
16760
|
-
|
|
16761
|
-
|
|
16762
|
-
|
|
16763
|
-
|
|
16764
|
-
|
|
16765
|
-
|
|
16766
|
-
|
|
16767
|
-
|
|
16768
|
-
|
|
16769
|
-
|
|
16770
|
-
|
|
16771
|
-
|
|
16772
|
-
|
|
16879
|
+
const classPrefix2 = "nut-timedetail";
|
|
16880
|
+
const timeList = React.useMemo(() => {
|
|
16881
|
+
return (options == null ? void 0 : options.find(
|
|
16882
|
+
(item) => item[optionKey.valueKey] === activeDate
|
|
16883
|
+
)) || {
|
|
16884
|
+
[optionKey.childrenKey]: []
|
|
16885
|
+
};
|
|
16886
|
+
}, [options, optionKey, activeDate]);
|
|
16887
|
+
const isActive = React.useCallback(
|
|
16888
|
+
(timeKey) => {
|
|
16889
|
+
const date = activeTime.find((item) => {
|
|
16890
|
+
return item[optionKey.valueKey] === activeDate;
|
|
16891
|
+
});
|
|
16892
|
+
if (date == null ? void 0 : date[optionKey.childrenKey]) {
|
|
16893
|
+
const time = date == null ? void 0 : date[optionKey.childrenKey].find((time2) => {
|
|
16894
|
+
return time2[optionKey.valueKey] === timeKey;
|
|
16895
|
+
});
|
|
16896
|
+
return time;
|
|
16897
|
+
}
|
|
16898
|
+
return false;
|
|
16899
|
+
},
|
|
16900
|
+
[activeTime, optionKey, activeDate]
|
|
16901
|
+
);
|
|
16902
|
+
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className) }, timeList[optionKey.childrenKey].map((item) => /* @__PURE__ */ React.createElement(
|
|
16773
16903
|
"span",
|
|
16774
16904
|
{
|
|
16775
|
-
className:
|
|
16776
|
-
|
|
16777
|
-
|
|
16905
|
+
className: classNames(`${classPrefix2}__item`, {
|
|
16906
|
+
active: isActive(item[optionKey.valueKey])
|
|
16907
|
+
}),
|
|
16908
|
+
key: item[optionKey.valueKey],
|
|
16909
|
+
onClick: () => onSelect(item)
|
|
16778
16910
|
},
|
|
16779
|
-
item
|
|
16911
|
+
item[optionKey.textKey]
|
|
16780
16912
|
)));
|
|
16781
16913
|
};
|
|
16782
|
-
TimeDetail.defaultProps = defaultProps$
|
|
16914
|
+
TimeDetail.defaultProps = defaultProps$3;
|
|
16783
16915
|
TimeDetail.displayName = "NutTimeDetail";
|
|
16784
|
-
const defaultProps$3 = {
|
|
16785
|
-
className: "",
|
|
16786
|
-
date: "",
|
|
16787
|
-
curKey: 0
|
|
16788
|
-
};
|
|
16789
|
-
const TimePannel = (props) => {
|
|
16790
|
-
useConfig$1();
|
|
16791
|
-
const { children, className, date, curKey, change } = {
|
|
16792
|
-
...defaultProps$3,
|
|
16793
|
-
...props
|
|
16794
|
-
};
|
|
16795
|
-
const b2 = cn("timepannel");
|
|
16796
|
-
return /* @__PURE__ */ React.createElement("div", { className: `${b2()} ${className || ""}`, onClick: () => change(curKey) }, date);
|
|
16797
|
-
};
|
|
16798
|
-
TimePannel.defaultProps = defaultProps$3;
|
|
16799
|
-
TimePannel.displayName = "NutTimePannel";
|
|
16800
16916
|
const defaultProps$2 = {
|
|
16801
|
-
|
|
16802
|
-
style: {},
|
|
16917
|
+
...ComponentDefaults,
|
|
16803
16918
|
visible: false,
|
|
16804
|
-
height: "20%",
|
|
16805
16919
|
multiple: false,
|
|
16806
|
-
|
|
16807
|
-
|
|
16808
|
-
|
|
16809
|
-
|
|
16810
|
-
|
|
16920
|
+
defaultValue: [],
|
|
16921
|
+
options: [],
|
|
16922
|
+
optionKey: {
|
|
16923
|
+
valueKey: "value",
|
|
16924
|
+
textKey: "text",
|
|
16925
|
+
childrenKey: "children"
|
|
16926
|
+
}
|
|
16811
16927
|
};
|
|
16812
16928
|
const TimeSelect = (props) => {
|
|
16813
|
-
useConfig$1();
|
|
16929
|
+
const { locale } = useConfig$1();
|
|
16814
16930
|
const {
|
|
16815
16931
|
visible,
|
|
16816
16932
|
className,
|
|
16817
|
-
|
|
16933
|
+
style,
|
|
16818
16934
|
title,
|
|
16819
|
-
|
|
16820
|
-
|
|
16821
|
-
|
|
16822
|
-
times,
|
|
16935
|
+
defaultValue,
|
|
16936
|
+
options,
|
|
16937
|
+
optionKey,
|
|
16823
16938
|
multiple,
|
|
16824
|
-
select,
|
|
16825
|
-
pannelChange,
|
|
16826
|
-
timeChange,
|
|
16827
16939
|
onSelect,
|
|
16828
|
-
|
|
16829
|
-
onTimeChange
|
|
16940
|
+
onDateChange,
|
|
16941
|
+
onTimeChange,
|
|
16942
|
+
...rest
|
|
16830
16943
|
} = {
|
|
16831
16944
|
...defaultProps$2,
|
|
16832
16945
|
...props
|
|
16833
16946
|
};
|
|
16834
|
-
const [
|
|
16947
|
+
const [activeDate, setActiveDate] = React.useState(() => {
|
|
16948
|
+
if (defaultValue == null ? void 0 : defaultValue.length) {
|
|
16949
|
+
return defaultValue[0][optionKey.valueKey];
|
|
16950
|
+
}
|
|
16951
|
+
if (options == null ? void 0 : options.length) {
|
|
16952
|
+
return options[0][optionKey.valueKey];
|
|
16953
|
+
}
|
|
16954
|
+
return "";
|
|
16955
|
+
});
|
|
16835
16956
|
const [activeTime, setActiveTime] = React.useState(
|
|
16836
|
-
|
|
16837
|
-
{
|
|
16838
|
-
key: currentKey,
|
|
16839
|
-
list: []
|
|
16840
|
-
}
|
|
16841
|
-
]
|
|
16957
|
+
() => defaultValue || []
|
|
16842
16958
|
);
|
|
16843
|
-
const
|
|
16844
|
-
const popStyle = {
|
|
16845
|
-
width: "100%",
|
|
16846
|
-
height
|
|
16847
|
-
};
|
|
16848
|
-
const b2 = cn("timeselect");
|
|
16959
|
+
const classPrefix2 = "nut-timeselect";
|
|
16849
16960
|
const closeFun = () => {
|
|
16850
|
-
|
|
16851
|
-
|
|
16852
|
-
|
|
16853
|
-
|
|
16854
|
-
|
|
16855
|
-
|
|
16856
|
-
|
|
16857
|
-
|
|
16858
|
-
|
|
16859
|
-
|
|
16860
|
-
|
|
16861
|
-
curTimeData = activeTime[i];
|
|
16862
|
-
curIndex = i;
|
|
16863
|
-
break;
|
|
16864
|
-
}
|
|
16865
|
-
}
|
|
16866
|
-
const curTimeIndex = curTimeData.list.findIndex(
|
|
16867
|
-
(item) => String(item) === String(time)
|
|
16868
|
-
);
|
|
16869
|
-
if (curTimeIndex === -1) {
|
|
16870
|
-
curTimeData.list.push(time);
|
|
16871
|
-
} else {
|
|
16872
|
-
curTimeData.list.splice(curTimeIndex, 1);
|
|
16873
|
-
}
|
|
16874
|
-
const resultTimeData = [...activeTime];
|
|
16875
|
-
resultTimeData.splice(curIndex, 1, curTimeData);
|
|
16876
|
-
setActiveTime(resultTimeData);
|
|
16877
|
-
if (onTimeChange) {
|
|
16878
|
-
onTimeChange(time, resultTimeData);
|
|
16879
|
-
} else if (timeChange) {
|
|
16880
|
-
timeChange(time, resultTimeData);
|
|
16881
|
-
}
|
|
16882
|
-
};
|
|
16883
|
-
const handleChange = (pannelKey) => {
|
|
16884
|
-
const resultTimeData = [...activeTime];
|
|
16885
|
-
if (String(pannelKey) !== String(activeKey)) {
|
|
16886
|
-
setActiveKey == null ? void 0 : setActiveKey(pannelKey);
|
|
16887
|
-
if (multiple) {
|
|
16888
|
-
const curTimeDataIndex = activeTime.findIndex(
|
|
16889
|
-
(item) => String(item.key) === String(pannelKey)
|
|
16890
|
-
);
|
|
16891
|
-
if (curTimeDataIndex === -1) {
|
|
16892
|
-
resultTimeData.push({
|
|
16893
|
-
key: pannelKey,
|
|
16894
|
-
list: []
|
|
16895
|
-
});
|
|
16896
|
-
setActiveTime(resultTimeData);
|
|
16961
|
+
onSelect && onSelect(activeTime);
|
|
16962
|
+
};
|
|
16963
|
+
const handleSelectTime = (selectTime) => {
|
|
16964
|
+
let newActiveTime = [...activeTime];
|
|
16965
|
+
const date = newActiveTime.find((item) => {
|
|
16966
|
+
return item[optionKey.valueKey] === activeDate;
|
|
16967
|
+
});
|
|
16968
|
+
if (date) {
|
|
16969
|
+
const timeIndex = date[optionKey.childrenKey].findIndex(
|
|
16970
|
+
(time) => {
|
|
16971
|
+
return time[optionKey.valueKey] === selectTime[optionKey.valueKey];
|
|
16897
16972
|
}
|
|
16973
|
+
);
|
|
16974
|
+
if (timeIndex > -1) {
|
|
16975
|
+
if (multiple) {
|
|
16976
|
+
date[optionKey.childrenKey].splice(timeIndex, 1);
|
|
16977
|
+
} else {
|
|
16978
|
+
newActiveTime = [];
|
|
16979
|
+
}
|
|
16980
|
+
} else if (multiple) {
|
|
16981
|
+
date[optionKey.childrenKey].push({ ...selectTime });
|
|
16898
16982
|
} else {
|
|
16899
|
-
|
|
16983
|
+
newActiveTime = [
|
|
16900
16984
|
{
|
|
16901
|
-
|
|
16902
|
-
|
|
16985
|
+
[optionKey.valueKey]: activeDate,
|
|
16986
|
+
[optionKey.childrenKey]: [{ ...selectTime }]
|
|
16903
16987
|
}
|
|
16904
|
-
]
|
|
16988
|
+
];
|
|
16905
16989
|
}
|
|
16990
|
+
} else if (multiple) {
|
|
16991
|
+
newActiveTime.push({
|
|
16992
|
+
[optionKey.valueKey]: activeDate,
|
|
16993
|
+
[optionKey.childrenKey]: [{ ...selectTime }]
|
|
16994
|
+
});
|
|
16995
|
+
} else {
|
|
16996
|
+
newActiveTime = [
|
|
16997
|
+
{
|
|
16998
|
+
[optionKey.valueKey]: activeDate,
|
|
16999
|
+
[optionKey.childrenKey]: [{ ...selectTime }]
|
|
17000
|
+
}
|
|
17001
|
+
];
|
|
16906
17002
|
}
|
|
16907
|
-
|
|
16908
|
-
|
|
16909
|
-
|
|
16910
|
-
|
|
16911
|
-
|
|
17003
|
+
newActiveTime = newActiveTime.filter((item) => {
|
|
17004
|
+
var _a;
|
|
17005
|
+
return ((_a = item[optionKey.childrenKey]) == null ? void 0 : _a.length) > 0;
|
|
17006
|
+
});
|
|
17007
|
+
setActiveTime(newActiveTime);
|
|
17008
|
+
onTimeChange && onTimeChange(selectTime, newActiveTime);
|
|
16912
17009
|
};
|
|
16913
|
-
const
|
|
16914
|
-
|
|
16915
|
-
|
|
16916
|
-
}
|
|
16917
|
-
return "";
|
|
17010
|
+
const handleChange = (date) => {
|
|
17011
|
+
setActiveDate(date[optionKey.valueKey]);
|
|
17012
|
+
onDateChange && onDateChange(date, activeTime);
|
|
16918
17013
|
};
|
|
16919
|
-
React.
|
|
16920
|
-
setPopVisible(visible);
|
|
16921
|
-
}, [visible]);
|
|
16922
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
17014
|
+
return /* @__PURE__ */ React.createElement(
|
|
16923
17015
|
Popup,
|
|
16924
17016
|
{
|
|
16925
17017
|
closeable: true,
|
|
16926
17018
|
round: true,
|
|
16927
|
-
visible
|
|
17019
|
+
visible,
|
|
16928
17020
|
position: "bottom",
|
|
16929
|
-
style:
|
|
16930
|
-
|
|
16931
|
-
|
|
16932
|
-
|
|
17021
|
+
style: {
|
|
17022
|
+
width: "100%",
|
|
17023
|
+
height: "20%",
|
|
17024
|
+
...style
|
|
17025
|
+
},
|
|
17026
|
+
onClose: closeFun,
|
|
17027
|
+
...rest
|
|
16933
17028
|
},
|
|
16934
|
-
/* @__PURE__ */ React.createElement("div", { className:
|
|
16935
|
-
|
|
17029
|
+
/* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className) }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__title` }, title || locale.timeselect.pickupTime), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__content` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__content-left` }, options.map((item) => /* @__PURE__ */ React.createElement(
|
|
17030
|
+
"div",
|
|
16936
17031
|
{
|
|
16937
|
-
|
|
16938
|
-
className:
|
|
16939
|
-
|
|
16940
|
-
|
|
16941
|
-
|
|
16942
|
-
}
|
|
17032
|
+
key: item[optionKey.valueKey],
|
|
17033
|
+
className: classNames("nut-timepannel", {
|
|
17034
|
+
active: item[optionKey.valueKey] === activeDate
|
|
17035
|
+
}),
|
|
17036
|
+
onClick: () => handleChange(item)
|
|
17037
|
+
},
|
|
17038
|
+
item[optionKey.textKey]
|
|
16943
17039
|
))), /* @__PURE__ */ React.createElement(
|
|
16944
17040
|
TimeDetail,
|
|
16945
17041
|
{
|
|
16946
|
-
|
|
16947
|
-
|
|
16948
|
-
|
|
16949
|
-
|
|
17042
|
+
options,
|
|
17043
|
+
optionKey,
|
|
17044
|
+
activeDate,
|
|
17045
|
+
activeTime,
|
|
17046
|
+
onSelect: handleSelectTime
|
|
16950
17047
|
}
|
|
16951
17048
|
)))
|
|
16952
|
-
)
|
|
17049
|
+
);
|
|
16953
17050
|
};
|
|
16954
17051
|
TimeSelect.defaultProps = defaultProps$2;
|
|
16955
17052
|
TimeSelect.displayName = "NutTimeSelect";
|
|
@@ -17205,7 +17302,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17205
17302
|
exports2.Image = Image$1;
|
|
17206
17303
|
exports2.ImagePreview = ImagePreview;
|
|
17207
17304
|
exports2.Indicator = Indicator;
|
|
17208
|
-
exports2.
|
|
17305
|
+
exports2.InfiniteLoading = InfiniteLoading;
|
|
17209
17306
|
exports2.Input = Input;
|
|
17210
17307
|
exports2.InputNumber = InputNumber;
|
|
17211
17308
|
exports2.Layout = Layout;
|
|
@@ -17250,7 +17347,6 @@ var __publicField = (obj, key, value) => {
|
|
|
17250
17347
|
exports2.Tag = Tag;
|
|
17251
17348
|
exports2.TextArea = TextArea;
|
|
17252
17349
|
exports2.TimeDetail = TimeDetail;
|
|
17253
|
-
exports2.TimePannel = TimePannel;
|
|
17254
17350
|
exports2.TimeSelect = TimeSelect;
|
|
17255
17351
|
exports2.Toast = Toast;
|
|
17256
17352
|
exports2.TrendArrow = TrendArrow;
|