@pisell/private-materials 3.0.12 → 3.0.14
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +12 -12
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +12 -12
- package/es/components/booking/components/TabProduct/index.js +8 -10
- package/es/components/booking/components/TabProduct/index.less +8 -8
- package/es/components/booking/components/TabProduct/tabs/index.js +10 -9
- package/es/components/booking/components/TabProduct/tabs/index.less +15 -13
- package/es/components/booking/components/addButton/index.d.ts +8 -8
- package/es/components/booking/components/addButton/index.js +1 -1
- package/es/components/booking/components/customSelect/index.js +1 -1
- package/es/components/booking/components/drawer/index.d.ts +2 -1
- package/es/components/booking/components/drawer/index.js +5 -2
- package/es/components/booking/components/drawer/index.less +6 -0
- package/es/components/booking/components/footer/FooterMenus/index.js +1 -1
- package/es/components/booking/components/footer/index.js +23 -21
- package/es/components/booking/components/footer/utils.js +4 -3
- package/es/components/booking/forms/forms.js +2 -1
- package/es/components/booking/info/client/index.js +0 -1
- package/es/components/booking/info/date/index.less +1 -1
- package/es/components/booking/info/index.js +10 -4
- package/es/components/booking/info/pet/index.js +5 -7
- package/es/components/booking/info/service/addService/index.js +27 -11
- package/es/components/booking/info/service/editService/index.js +8 -7
- package/es/components/booking/info/service/index.js +1 -1
- package/es/components/booking/info/service/index.less +3 -0
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +3 -0
- package/es/components/booking/model.d.ts +11 -0
- package/es/components/booking/utils.js +2 -1
- package/es/components/index.d.ts +3 -1
- package/es/components/index.js +3 -1
- package/es/components/productExtension/card/index.d.ts +10 -0
- package/es/components/productExtension/card/index.js +20 -0
- package/es/components/productExtension/card/index.less +34 -0
- package/es/components/productExtension/fields/Actor/Container/index.d.ts +12 -0
- package/es/components/productExtension/fields/Actor/Container/index.js +34 -0
- package/es/components/productExtension/fields/Actor/Container/index.less +19 -0
- package/es/components/productExtension/fields/Actor/CutOffTime/index.d.ts +10 -0
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +94 -0
- package/es/components/productExtension/fields/Actor/CutOffTime/index.less +32 -0
- package/es/components/productExtension/fields/Actor/CutOffTime/status.d.ts +0 -0
- package/es/components/productExtension/fields/Actor/CutOffTime/status.js +0 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +5 -0
- package/es/components/productExtension/fields/Actor/index.js +23 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +10 -0
- package/es/components/productExtension/fields/Forms/index.js +184 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +4 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.js +30 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.less +69 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +10 -0
- package/es/components/productExtension/fields/SelectProducts/index.js +91 -0
- package/es/components/productExtension/fields/SelectProducts/index.less +30 -0
- package/es/components/productExtension/fields/SelectProducts/mock.d.ts +0 -0
- package/es/components/productExtension/fields/SelectProducts/mock.js +0 -0
- package/es/components/productExtension/fields/SelectProducts/server.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/server.js +29 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +4 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.js +198 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.less +0 -0
- package/es/components/productExtension/fields/SelectResourcesTable/mock.d.ts +2681 -0
- package/es/components/productExtension/fields/SelectResourcesTable/mock.js +5072 -0
- package/es/components/productExtension/fields/SelectResourcesTable/server.d.ts +2 -0
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +49 -0
- package/es/components/productExtension/fields/index.d.ts +1 -0
- package/es/components/productExtension/fields/index.js +33 -0
- package/es/components/productExtension/index.d.ts +7 -0
- package/es/components/productExtension/index.js +77 -0
- package/es/components/productExtension/index.less +0 -0
- package/es/components/productExtension/locales.d.ts +48 -0
- package/es/components/productExtension/locales.js +47 -0
- package/es/components/productExtension/server.d.ts +1 -0
- package/es/components/productExtension/server.js +29 -0
- package/es/components/schedules/calendar/calendarItem.d.ts +11 -0
- package/es/components/schedules/calendar/calendarItem.js +64 -0
- package/es/components/schedules/calendar/index.d.ts +4 -0
- package/es/components/schedules/calendar/index.js +176 -0
- package/es/components/schedules/calendar/index.less +167 -0
- package/es/components/schedules/calendar/serve.d.ts +12 -0
- package/es/components/schedules/calendar/serve.js +24 -0
- package/es/components/schedules/calendar/utils.d.ts +7 -0
- package/es/components/schedules/calendar/utils.js +25 -0
- package/es/components/schedules/components/Card/index.d.ts +6 -0
- package/es/components/schedules/components/Card/index.js +10 -0
- package/es/components/schedules/components/Card/index.less +5 -0
- package/es/components/schedules/components/CurrentDay/index.d.ts +8 -0
- package/es/components/schedules/components/CurrentDay/index.js +52 -0
- package/es/components/schedules/components/CurrentDay/index.less +37 -0
- package/es/components/schedules/components/CurrentDay/serve.d.ts +1 -0
- package/es/components/schedules/components/CurrentDay/serve.js +26 -0
- package/es/components/schedules/components/CurrentDay/utils.d.ts +1 -0
- package/es/components/schedules/components/CurrentDay/utils.js +6 -0
- package/es/components/schedules/components/DropdownSort/index.d.ts +3 -0
- package/es/components/schedules/components/DropdownSort/index.js +43 -0
- package/es/components/schedules/components/ResourceList/index.d.ts +14 -0
- package/es/components/schedules/components/ResourceList/index.js +32 -0
- package/es/components/schedules/components/ResourceList/index.less +21 -0
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +16 -0
- package/es/components/schedules/components/ScheduleDetailList/index.js +87 -0
- package/es/components/schedules/components/ScheduleDetailList/index.less +40 -0
- package/es/components/schedules/components/ScheduleList/index.d.ts +20 -0
- package/es/components/schedules/components/ScheduleList/index.js +69 -0
- package/es/components/schedules/components/ScheduleList/index.less +38 -0
- package/es/components/schedules/components/Search/index.d.ts +8 -0
- package/es/components/schedules/components/Search/index.js +33 -0
- package/es/components/schedules/constants.d.ts +1 -0
- package/es/components/schedules/constants.js +1 -0
- package/es/components/schedules/hooks/useSchedulesDataSource.d.ts +10 -0
- package/es/components/schedules/hooks/useSchedulesDataSource.js +41 -0
- package/es/components/schedules/index.d.ts +3 -0
- package/es/components/schedules/index.js +168 -0
- package/es/components/schedules/index.less +50 -0
- package/es/components/schedules/locales.d.ts +84 -0
- package/es/components/schedules/locales.js +83 -0
- package/es/components/schedules/model.d.ts +78 -0
- package/es/components/schedules/model.js +72 -0
- package/es/components/schedules/openHours/index.d.ts +4 -0
- package/es/components/schedules/openHours/index.js +40 -0
- package/es/components/schedules/openHours/index.less +6 -0
- package/es/components/schedules/openHours/serve.d.ts +1 -0
- package/es/components/schedules/openHours/serve.js +24 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +11 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +36 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.less +3 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +5 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +50 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.less +0 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +4 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.js +85 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.less +6 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +14 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +124 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.less +3 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +7 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.js +39 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.less +18 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +4 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.js +8 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.less +0 -0
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +4 -0
- package/es/components/schedules/products/ProductDetailDrawer/index.js +248 -0
- package/es/components/schedules/products/ProductDetailDrawer/index.less +3 -0
- package/es/components/schedules/products/index.d.ts +4 -0
- package/es/components/schedules/products/index.js +77 -0
- package/es/components/schedules/products/index.less +21 -0
- package/es/components/schedules/products/list/ProductItem/index.d.ts +10 -0
- package/es/components/schedules/products/list/ProductItem/index.js +37 -0
- package/es/components/schedules/products/list/ProductItem/index.less +59 -0
- package/es/components/schedules/products/list/index.d.ts +8 -0
- package/es/components/schedules/products/list/index.js +120 -0
- package/es/components/schedules/products/list/index.less +7 -0
- package/es/components/schedules/products/serve.d.ts +22 -0
- package/es/components/schedules/products/serve.js +145 -0
- package/es/components/schedules/products/utils.d.ts +103 -0
- package/es/components/schedules/products/utils.js +346 -0
- package/es/components/schedules/resources/add/index.d.ts +3 -0
- package/es/components/schedules/resources/add/index.js +61 -0
- package/es/components/schedules/resources/detail/detailContent.d.ts +4 -0
- package/es/components/schedules/resources/detail/detailContent.js +113 -0
- package/es/components/schedules/resources/detail/index.d.ts +4 -0
- package/es/components/schedules/resources/detail/index.js +158 -0
- package/es/components/schedules/resources/detail/index.less +126 -0
- package/es/components/schedules/resources/index.d.ts +4 -0
- package/es/components/schedules/resources/index.js +213 -0
- package/es/components/schedules/resources/index.less +52 -0
- package/es/components/schedules/resources/list/index.d.ts +9 -0
- package/es/components/schedules/resources/list/index.js +30 -0
- package/es/components/schedules/resources/list/index.less +26 -0
- package/es/components/schedules/resources/relationProduct/index.d.ts +7 -0
- package/es/components/schedules/resources/relationProduct/index.js +30 -0
- package/es/components/schedules/resources/relationProduct/index.less +0 -0
- package/es/components/schedules/resources/serve.d.ts +5 -0
- package/es/components/schedules/resources/serve.js +106 -0
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +15 -0
- package/es/components/schedules/schedules/AllSchedules/index.js +56 -0
- package/es/components/schedules/schedules/AllSchedules/index.less +17 -0
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +20 -0
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +183 -0
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.less +43 -0
- package/es/components/schedules/schedules/Schedules.d.ts +30 -0
- package/es/components/schedules/schedules/Schedules.js +56 -0
- package/es/components/schedules/schedules/SchedulesForDay/index.d.ts +19 -0
- package/es/components/schedules/schedules/SchedulesForDay/index.js +31 -0
- package/es/components/schedules/schedules/index.d.ts +3 -0
- package/es/components/schedules/schedules/index.js +206 -0
- package/es/components/schedules/schedules/index.less +4 -0
- package/es/components/schedules/schedules/serve.d.ts +9 -0
- package/es/components/schedules/schedules/serve.js +43 -0
- package/es/components/schedules/schedules/utils.d.ts +50 -0
- package/es/components/schedules/schedules/utils.js +658 -0
- package/es/components/schedules/type.d.ts +150 -0
- package/es/components/schedules/type.js +1 -0
- package/es/components/schedules/utils.d.ts +22 -0
- package/es/components/schedules/utils.js +56 -0
- package/es/components/selectModal/index.d.ts +24 -0
- package/es/components/selectModal/index.js +108 -0
- package/es/components/selectModal/index.less +0 -0
- package/es/components/tabProduct/card/index.d.ts +7 -0
- package/es/components/tabProduct/card/index.js +11 -0
- package/es/components/tabProduct/card/index.less +16 -0
- package/es/components/tabProduct/index.d.ts +15 -0
- package/es/components/tabProduct/index.js +141 -0
- package/es/components/tabProduct/index.less +48 -0
- package/es/components/tabProduct/tabs/index.d.ts +21 -0
- package/es/components/tabProduct/tabs/index.js +218 -0
- package/es/components/tabProduct/tabs/index.less +125 -0
- package/es/hooks/useComponents.js +4 -2
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/utils/index.d.ts +22 -0
- package/es/utils/index.js +56 -0
- package/lib/components/booking/components/TabProduct/index.js +24 -17
- package/lib/components/booking/components/TabProduct/index.less +8 -8
- package/lib/components/booking/components/TabProduct/tabs/index.js +19 -9
- package/lib/components/booking/components/TabProduct/tabs/index.less +15 -13
- package/lib/components/booking/components/addButton/index.d.ts +8 -8
- package/lib/components/booking/components/addButton/index.js +1 -1
- package/lib/components/booking/components/customSelect/index.js +1 -1
- package/lib/components/booking/components/drawer/index.d.ts +2 -1
- package/lib/components/booking/components/drawer/index.js +11 -2
- package/lib/components/booking/components/drawer/index.less +6 -0
- package/lib/components/booking/components/footer/FooterMenus/index.js +1 -1
- package/lib/components/booking/components/footer/index.js +3 -1
- package/lib/components/booking/components/footer/utils.js +4 -2
- package/lib/components/booking/forms/forms.js +1 -1
- package/lib/components/booking/info/client/index.js +0 -1
- package/lib/components/booking/info/date/index.less +1 -1
- package/lib/components/booking/info/index.js +7 -1
- package/lib/components/booking/info/pet/index.js +5 -7
- package/lib/components/booking/info/service/addService/index.js +25 -10
- package/lib/components/booking/info/service/editService/index.js +7 -5
- package/lib/components/booking/info/service/index.js +1 -1
- package/lib/components/booking/info/service/index.less +3 -0
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +3 -0
- package/lib/components/booking/model.d.ts +11 -0
- package/lib/components/booking/utils.js +2 -1
- package/lib/components/index.d.ts +3 -1
- package/lib/components/index.js +8 -2
- package/lib/components/productExtension/card/index.d.ts +10 -0
- package/lib/components/productExtension/card/index.js +57 -0
- package/lib/components/productExtension/card/index.less +34 -0
- package/lib/components/productExtension/fields/Actor/Container/index.d.ts +12 -0
- package/lib/components/productExtension/fields/Actor/Container/index.js +64 -0
- package/lib/components/productExtension/fields/Actor/Container/index.less +19 -0
- package/lib/components/productExtension/fields/Actor/CutOffTime/index.d.ts +10 -0
- package/lib/components/productExtension/fields/Actor/CutOffTime/index.js +128 -0
- package/lib/components/productExtension/fields/Actor/CutOffTime/index.less +32 -0
- package/lib/components/productExtension/fields/Actor/CutOffTime/status.d.ts +0 -0
- package/lib/components/productExtension/fields/Actor/CutOffTime/status.js +0 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +5 -0
- package/lib/components/productExtension/fields/Actor/index.js +56 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +10 -0
- package/lib/components/productExtension/fields/Forms/index.js +108 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +4 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.js +65 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.less +69 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +10 -0
- package/lib/components/productExtension/fields/SelectProducts/index.js +111 -0
- package/lib/components/productExtension/fields/SelectProducts/index.less +30 -0
- package/lib/components/productExtension/fields/SelectProducts/mock.d.ts +0 -0
- package/lib/components/productExtension/fields/SelectProducts/mock.js +0 -0
- package/lib/components/productExtension/fields/SelectProducts/server.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/server.js +33 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +4 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.js +179 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.less +0 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/mock.d.ts +2681 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/mock.js +12723 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/server.d.ts +2 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/server.js +39 -0
- package/lib/components/productExtension/fields/index.d.ts +1 -0
- package/lib/components/productExtension/fields/index.js +69 -0
- package/lib/components/productExtension/index.d.ts +7 -0
- package/lib/components/productExtension/index.js +108 -0
- package/lib/components/productExtension/index.less +0 -0
- package/lib/components/productExtension/locales.d.ts +48 -0
- package/lib/components/productExtension/locales.js +71 -0
- package/lib/components/productExtension/server.d.ts +1 -0
- package/lib/components/productExtension/server.js +33 -0
- package/lib/components/schedules/calendar/calendarItem.d.ts +11 -0
- package/lib/components/schedules/calendar/calendarItem.js +91 -0
- package/lib/components/schedules/calendar/index.d.ts +4 -0
- package/lib/components/schedules/calendar/index.js +179 -0
- package/lib/components/schedules/calendar/index.less +167 -0
- package/lib/components/schedules/calendar/serve.d.ts +12 -0
- package/lib/components/schedules/calendar/serve.js +30 -0
- package/lib/components/schedules/calendar/utils.d.ts +7 -0
- package/lib/components/schedules/calendar/utils.js +51 -0
- package/lib/components/schedules/components/Card/index.d.ts +6 -0
- package/lib/components/schedules/components/Card/index.js +41 -0
- package/lib/components/schedules/components/Card/index.less +5 -0
- package/lib/components/schedules/components/CurrentDay/index.d.ts +8 -0
- package/lib/components/schedules/components/CurrentDay/index.js +80 -0
- package/lib/components/schedules/components/CurrentDay/index.less +37 -0
- package/lib/components/schedules/components/CurrentDay/serve.d.ts +1 -0
- package/lib/components/schedules/components/CurrentDay/serve.js +30 -0
- package/lib/components/schedules/components/CurrentDay/utils.d.ts +1 -0
- package/lib/components/schedules/components/CurrentDay/utils.js +44 -0
- package/lib/components/schedules/components/DropdownSort/index.d.ts +3 -0
- package/lib/components/schedules/components/DropdownSort/index.js +74 -0
- package/lib/components/schedules/components/ResourceList/index.d.ts +14 -0
- package/lib/components/schedules/components/ResourceList/index.js +66 -0
- package/lib/components/schedules/components/ResourceList/index.less +21 -0
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +16 -0
- package/lib/components/schedules/components/ScheduleDetailList/index.js +90 -0
- package/lib/components/schedules/components/ScheduleDetailList/index.less +40 -0
- package/lib/components/schedules/components/ScheduleList/index.d.ts +20 -0
- package/lib/components/schedules/components/ScheduleList/index.js +97 -0
- package/lib/components/schedules/components/ScheduleList/index.less +38 -0
- package/lib/components/schedules/components/Search/index.d.ts +8 -0
- package/lib/components/schedules/components/Search/index.js +56 -0
- package/lib/components/schedules/constants.d.ts +1 -0
- package/lib/components/schedules/constants.js +36 -0
- package/lib/components/schedules/hooks/useSchedulesDataSource.d.ts +10 -0
- package/lib/components/schedules/hooks/useSchedulesDataSource.js +48 -0
- package/lib/components/schedules/index.d.ts +3 -0
- package/lib/components/schedules/index.js +148 -0
- package/lib/components/schedules/index.less +50 -0
- package/lib/components/schedules/locales.d.ts +84 -0
- package/lib/components/schedules/locales.js +107 -0
- package/lib/components/schedules/model.d.ts +78 -0
- package/lib/components/schedules/model.js +85 -0
- package/lib/components/schedules/openHours/index.d.ts +4 -0
- package/lib/components/schedules/openHours/index.js +74 -0
- package/lib/components/schedules/openHours/index.less +6 -0
- package/lib/components/schedules/openHours/serve.d.ts +1 -0
- package/lib/components/schedules/openHours/serve.js +30 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +11 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +62 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.less +3 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +5 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +73 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.less +0 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +4 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.js +108 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.less +6 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +14 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +145 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.less +3 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +7 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.js +66 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.less +18 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +4 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.js +40 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.less +0 -0
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +4 -0
- package/lib/components/schedules/products/ProductDetailDrawer/index.js +218 -0
- package/lib/components/schedules/products/ProductDetailDrawer/index.less +3 -0
- package/lib/components/schedules/products/index.d.ts +4 -0
- package/lib/components/schedules/products/index.js +105 -0
- package/lib/components/schedules/products/index.less +21 -0
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +10 -0
- package/lib/components/schedules/products/list/ProductItem/index.js +73 -0
- package/lib/components/schedules/products/list/ProductItem/index.less +59 -0
- package/lib/components/schedules/products/list/index.d.ts +8 -0
- package/lib/components/schedules/products/list/index.js +139 -0
- package/lib/components/schedules/products/list/index.less +7 -0
- package/lib/components/schedules/products/serve.d.ts +22 -0
- package/lib/components/schedules/products/serve.js +64 -0
- package/lib/components/schedules/products/utils.d.ts +103 -0
- package/lib/components/schedules/products/utils.js +263 -0
- package/lib/components/schedules/resources/add/index.d.ts +3 -0
- package/lib/components/schedules/resources/add/index.js +87 -0
- package/lib/components/schedules/resources/detail/detailContent.d.ts +4 -0
- package/lib/components/schedules/resources/detail/detailContent.js +127 -0
- package/lib/components/schedules/resources/detail/index.d.ts +4 -0
- package/lib/components/schedules/resources/detail/index.js +150 -0
- package/lib/components/schedules/resources/detail/index.less +126 -0
- package/lib/components/schedules/resources/index.d.ts +4 -0
- package/lib/components/schedules/resources/index.js +209 -0
- package/lib/components/schedules/resources/index.less +52 -0
- package/lib/components/schedules/resources/list/index.d.ts +9 -0
- package/lib/components/schedules/resources/list/index.js +68 -0
- package/lib/components/schedules/resources/list/index.less +26 -0
- package/lib/components/schedules/resources/relationProduct/index.d.ts +7 -0
- package/lib/components/schedules/resources/relationProduct/index.js +56 -0
- package/lib/components/schedules/resources/relationProduct/index.less +0 -0
- package/lib/components/schedules/resources/serve.d.ts +5 -0
- package/lib/components/schedules/resources/serve.js +42 -0
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +15 -0
- package/lib/components/schedules/schedules/AllSchedules/index.js +68 -0
- package/lib/components/schedules/schedules/AllSchedules/index.less +17 -0
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +20 -0
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.js +168 -0
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.less +43 -0
- package/lib/components/schedules/schedules/Schedules.d.ts +30 -0
- package/lib/components/schedules/schedules/Schedules.js +101 -0
- package/lib/components/schedules/schedules/SchedulesForDay/index.d.ts +19 -0
- package/lib/components/schedules/schedules/SchedulesForDay/index.js +64 -0
- package/lib/components/schedules/schedules/index.d.ts +3 -0
- package/lib/components/schedules/schedules/index.js +226 -0
- package/lib/components/schedules/schedules/index.less +4 -0
- package/lib/components/schedules/schedules/serve.d.ts +9 -0
- package/lib/components/schedules/schedules/serve.js +33 -0
- package/lib/components/schedules/schedules/utils.d.ts +50 -0
- package/lib/components/schedules/schedules/utils.js +556 -0
- package/lib/components/schedules/type.d.ts +150 -0
- package/lib/components/schedules/type.js +17 -0
- package/lib/components/schedules/utils.d.ts +22 -0
- package/lib/components/schedules/utils.js +59 -0
- package/lib/components/selectModal/index.d.ts +24 -0
- package/lib/components/selectModal/index.js +133 -0
- package/lib/components/selectModal/index.less +0 -0
- package/lib/components/tabProduct/card/index.d.ts +7 -0
- package/lib/components/tabProduct/card/index.js +53 -0
- package/lib/components/tabProduct/card/index.less +16 -0
- package/lib/components/tabProduct/index.d.ts +15 -0
- package/lib/components/tabProduct/index.js +141 -0
- package/lib/components/tabProduct/index.less +48 -0
- package/lib/components/tabProduct/tabs/index.d.ts +21 -0
- package/lib/components/tabProduct/tabs/index.js +177 -0
- package/lib/components/tabProduct/tabs/index.less +125 -0
- package/lib/hooks/useComponents.js +3 -2
- package/lib/index.d.ts +2 -0
- package/lib/index.js +8 -2
- package/lib/utils/index.d.ts +22 -0
- package/lib/utils/index.js +59 -0
- package/lowcode/product-extension/meta.ts +120 -0
- package/lowcode/schedules/meta.ts +83 -0
- package/package.json +3 -3
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
export declare type ScheduleItem = {
|
|
2
|
+
/** 颜色 */
|
|
3
|
+
color: string;
|
|
4
|
+
/** 创建时间 */
|
|
5
|
+
created_at: string;
|
|
6
|
+
/** 更新时间 */
|
|
7
|
+
updated_at: string;
|
|
8
|
+
/** 开始时间 */
|
|
9
|
+
start_time: string;
|
|
10
|
+
/** 结束时间 */
|
|
11
|
+
end_time: string;
|
|
12
|
+
/** 日程名称 */
|
|
13
|
+
name: string;
|
|
14
|
+
/** 关联订单 */
|
|
15
|
+
order_count: number;
|
|
16
|
+
/** 关联项目数据*/
|
|
17
|
+
relation_count: number;
|
|
18
|
+
repeat_rule: {
|
|
19
|
+
end: {
|
|
20
|
+
/** 截止类型 */
|
|
21
|
+
type: "date" | "never";
|
|
22
|
+
/** 结束时间 */
|
|
23
|
+
end_date: string | null;
|
|
24
|
+
occurrence: any | null;
|
|
25
|
+
};
|
|
26
|
+
frequency: number;
|
|
27
|
+
excluded_date: ExcIncDate[];
|
|
28
|
+
included_date: ExcIncDate[];
|
|
29
|
+
frequency_date: number[];
|
|
30
|
+
};
|
|
31
|
+
repeat_type: "daily" | "none" | "weekly";
|
|
32
|
+
/** 日程类型
|
|
33
|
+
* standard: 标准日程
|
|
34
|
+
* time-slots: 时间段日程
|
|
35
|
+
* designation: 指定日期日程
|
|
36
|
+
* */
|
|
37
|
+
type: "standard" | "time-slots" | "designation";
|
|
38
|
+
conflict?: boolean;
|
|
39
|
+
time_slot: {
|
|
40
|
+
start_time: string;
|
|
41
|
+
end_time: string;
|
|
42
|
+
id: number;
|
|
43
|
+
}[];
|
|
44
|
+
id: number;
|
|
45
|
+
/** 指定的开始时间结束时间 */
|
|
46
|
+
designation: {
|
|
47
|
+
start_date: string;
|
|
48
|
+
end_date: string;
|
|
49
|
+
start_time: string;
|
|
50
|
+
end_time: string;
|
|
51
|
+
} | {
|
|
52
|
+
start_date: string;
|
|
53
|
+
end_date: string;
|
|
54
|
+
start_time: string;
|
|
55
|
+
end_time: string;
|
|
56
|
+
}[];
|
|
57
|
+
/** 是否全天 */
|
|
58
|
+
is_all: 1 | 0;
|
|
59
|
+
[key: string]: any;
|
|
60
|
+
};
|
|
61
|
+
export declare type ScheduleFormOtherValue = {
|
|
62
|
+
/** 截止模式
|
|
63
|
+
* 1: 永不截止
|
|
64
|
+
* 2: 按日期截止
|
|
65
|
+
* */
|
|
66
|
+
endRadio: 1 | 2;
|
|
67
|
+
/** 是否为全天 */
|
|
68
|
+
isAllDay: boolean;
|
|
69
|
+
/** 是否开启排除日期 */
|
|
70
|
+
excludedStatus: boolean;
|
|
71
|
+
/** 是否包含排除日期 */
|
|
72
|
+
includeStatus: boolean;
|
|
73
|
+
type: "standard" | "time-slots" | "designation";
|
|
74
|
+
};
|
|
75
|
+
export declare type ExcIncDate = {
|
|
76
|
+
start: string;
|
|
77
|
+
end: string;
|
|
78
|
+
};
|
|
79
|
+
export declare type ScheduleFormData = {
|
|
80
|
+
/** 颜色 */
|
|
81
|
+
color: string;
|
|
82
|
+
/** 日程名称 */
|
|
83
|
+
name: {
|
|
84
|
+
en: string;
|
|
85
|
+
"zh-CN": string;
|
|
86
|
+
"zh-HK": string;
|
|
87
|
+
original: string;
|
|
88
|
+
} | string;
|
|
89
|
+
/** 重复模式
|
|
90
|
+
* 0:不重复
|
|
91
|
+
* 1:按天重复
|
|
92
|
+
* 2:按周重复 */
|
|
93
|
+
repeat_type: "0" | "1" | "2";
|
|
94
|
+
/** 备注 */
|
|
95
|
+
note: string;
|
|
96
|
+
/** 指定的开始时间结束时间 */
|
|
97
|
+
designation: {
|
|
98
|
+
start_date: string;
|
|
99
|
+
end_date: string;
|
|
100
|
+
start_time: string;
|
|
101
|
+
end_time: string;
|
|
102
|
+
} | {
|
|
103
|
+
start_date: string;
|
|
104
|
+
end_date: string;
|
|
105
|
+
start_time: string;
|
|
106
|
+
end_time: string;
|
|
107
|
+
}[];
|
|
108
|
+
time_slot: {
|
|
109
|
+
start_time: string;
|
|
110
|
+
end_time: string;
|
|
111
|
+
id: number;
|
|
112
|
+
}[];
|
|
113
|
+
/** 重复频率 */
|
|
114
|
+
frequency: number;
|
|
115
|
+
/** 按周重复时选择的周数据 */
|
|
116
|
+
frequency_date: number[];
|
|
117
|
+
/** 截止日期 */
|
|
118
|
+
end_date: string;
|
|
119
|
+
/** 排除的日期范围 */
|
|
120
|
+
excluded_date: ExcIncDate[];
|
|
121
|
+
/** 包含的日期范围 */
|
|
122
|
+
included_date: ExcIncDate[];
|
|
123
|
+
/** 多时间段的开始时间 */
|
|
124
|
+
start_time: any;
|
|
125
|
+
end_time: any;
|
|
126
|
+
};
|
|
127
|
+
export declare type CalendarDataItem = {
|
|
128
|
+
date: string;
|
|
129
|
+
color: string[];
|
|
130
|
+
isExcluded: boolean;
|
|
131
|
+
schedule_ids?: number[];
|
|
132
|
+
[key: string]: any;
|
|
133
|
+
};
|
|
134
|
+
export declare type RequestData<Data> = {
|
|
135
|
+
data: Data;
|
|
136
|
+
status: boolean;
|
|
137
|
+
message: string;
|
|
138
|
+
code: number;
|
|
139
|
+
};
|
|
140
|
+
export declare type ResponseListData<Data> = {
|
|
141
|
+
status: boolean;
|
|
142
|
+
message: string;
|
|
143
|
+
code: number;
|
|
144
|
+
data: {
|
|
145
|
+
list: Data;
|
|
146
|
+
count: number;
|
|
147
|
+
size: number;
|
|
148
|
+
skip: number;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ModalStaticFunctions } from "antd/es/modal/confirm";
|
|
2
|
+
declare type RType = (url: string, data?: {} | undefined, config?: {} | undefined) => Promise<any>;
|
|
3
|
+
declare class Request {
|
|
4
|
+
private request;
|
|
5
|
+
constructor();
|
|
6
|
+
setRequest(val: any): void;
|
|
7
|
+
getRequest(): {
|
|
8
|
+
get: RType;
|
|
9
|
+
post: RType;
|
|
10
|
+
put: RType;
|
|
11
|
+
remove: RType;
|
|
12
|
+
custom: RType;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare const request: Request;
|
|
16
|
+
declare let modal: Omit<ModalStaticFunctions, "warn">;
|
|
17
|
+
export declare const setModal: (m: Omit<ModalStaticFunctions, "warn">) => void;
|
|
18
|
+
export declare const saveConfirm: () => Promise<{
|
|
19
|
+
destroy: () => void;
|
|
20
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
21
|
+
}>;
|
|
22
|
+
export { modal };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
7
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
|
+
import { locales } from "@pisell/utils";
|
|
12
|
+
var Request = /*#__PURE__*/function () {
|
|
13
|
+
function Request() {
|
|
14
|
+
_classCallCheck(this, Request);
|
|
15
|
+
_defineProperty(this, "request", {});
|
|
16
|
+
}
|
|
17
|
+
_createClass(Request, [{
|
|
18
|
+
key: "setRequest",
|
|
19
|
+
value: function setRequest(val) {
|
|
20
|
+
this.request = val;
|
|
21
|
+
}
|
|
22
|
+
}, {
|
|
23
|
+
key: "getRequest",
|
|
24
|
+
value: function getRequest() {
|
|
25
|
+
return this.request;
|
|
26
|
+
}
|
|
27
|
+
}]);
|
|
28
|
+
return Request;
|
|
29
|
+
}();
|
|
30
|
+
export var request = new Request();
|
|
31
|
+
var modal;
|
|
32
|
+
export var setModal = function setModal(m) {
|
|
33
|
+
modal = m;
|
|
34
|
+
};
|
|
35
|
+
export var saveConfirm = /*#__PURE__*/function () {
|
|
36
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
37
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
38
|
+
while (1) switch (_context.prev = _context.next) {
|
|
39
|
+
case 0:
|
|
40
|
+
return _context.abrupt("return", modal.confirm({
|
|
41
|
+
title: locales.getText("pisell2.text.products.unsaved-title"),
|
|
42
|
+
content: locales.getText("pisell2.text.products.unsaved-content"),
|
|
43
|
+
cancelText: locales.getText("pisell2.text.products.unsaved-back"),
|
|
44
|
+
okText: locales.getText("pisell2.text.products.unsaved-yes")
|
|
45
|
+
}));
|
|
46
|
+
case 1:
|
|
47
|
+
case "end":
|
|
48
|
+
return _context.stop();
|
|
49
|
+
}
|
|
50
|
+
}, _callee);
|
|
51
|
+
}));
|
|
52
|
+
return function saveConfirm() {
|
|
53
|
+
return _ref.apply(this, arguments);
|
|
54
|
+
};
|
|
55
|
+
}();
|
|
56
|
+
export { modal };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AddButtonProps } from "../booking/components/addButton";
|
|
3
|
+
import { PisellDrawerProps } from "../booking/components/drawer";
|
|
4
|
+
import { TabProductProps } from "../tabProduct";
|
|
5
|
+
import "./index.less";
|
|
6
|
+
interface ValueType {
|
|
7
|
+
}
|
|
8
|
+
interface SelectModalProps {
|
|
9
|
+
value: ValueType[];
|
|
10
|
+
onChange: (value: ValueType[]) => void;
|
|
11
|
+
dataSource: ValueType[];
|
|
12
|
+
renderValueItem: (item: ValueType, onSelect: (value: ValueType[]) => void) => React.ReactNode;
|
|
13
|
+
renderOptionItem: (item: ValueType, onSelect: (value: ValueType[]) => void) => React.ReactNode;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
className: string;
|
|
16
|
+
style: React.CSSProperties;
|
|
17
|
+
maxLength?: number;
|
|
18
|
+
buttonProps: AddButtonProps;
|
|
19
|
+
drawerProps: PisellDrawerProps;
|
|
20
|
+
tabProductProps: TabProductProps;
|
|
21
|
+
loading: boolean;
|
|
22
|
+
}
|
|
23
|
+
declare const SelectModal: React.FC<Partial<SelectModalProps>>;
|
|
24
|
+
export default SelectModal;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
6
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
+
import React, { useState, useMemo } from "react";
|
|
9
|
+
import classNames from "classnames";
|
|
10
|
+
import { Input, Skeleton } from "antd";
|
|
11
|
+
import SearchLg from "@pisell/icon/es/SearchLg";
|
|
12
|
+
import AddButton from "../booking/components/addButton";
|
|
13
|
+
import Drawer from "../booking/components/drawer";
|
|
14
|
+
import TabProduct from "../tabProduct";
|
|
15
|
+
import { formatProductListByCategory } from "../booking/utils";
|
|
16
|
+
import { changeArray } from "@pisell/utils";
|
|
17
|
+
import "./index.less";
|
|
18
|
+
var MAX_LENGTH = 999;
|
|
19
|
+
var SelectModal = function SelectModal(props) {
|
|
20
|
+
var value = props.value,
|
|
21
|
+
onChange = props.onChange,
|
|
22
|
+
_props$dataSource = props.dataSource,
|
|
23
|
+
dataSource = _props$dataSource === void 0 ? [] : _props$dataSource,
|
|
24
|
+
renderValueItem = props.renderValueItem,
|
|
25
|
+
renderOptionItem = props.renderOptionItem,
|
|
26
|
+
disabled = props.disabled,
|
|
27
|
+
className = props.className,
|
|
28
|
+
style = props.style,
|
|
29
|
+
_props$maxLength = props.maxLength,
|
|
30
|
+
maxLength = _props$maxLength === void 0 ? MAX_LENGTH : _props$maxLength,
|
|
31
|
+
buttonProps = props.buttonProps,
|
|
32
|
+
drawerProps = props.drawerProps,
|
|
33
|
+
tabProductProps = props.tabProductProps,
|
|
34
|
+
loading = props.loading;
|
|
35
|
+
var _useState = useState(false),
|
|
36
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
37
|
+
open = _useState2[0],
|
|
38
|
+
setOpen = _useState2[1];
|
|
39
|
+
var _useState3 = useState(""),
|
|
40
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
41
|
+
search = _useState4[0],
|
|
42
|
+
setSearch = _useState4[1];
|
|
43
|
+
var _value = useMemo(function () {
|
|
44
|
+
return value || [];
|
|
45
|
+
}, [value]);
|
|
46
|
+
var onOpen = function onOpen() {
|
|
47
|
+
setOpen(true);
|
|
48
|
+
};
|
|
49
|
+
var onClose = function onClose() {
|
|
50
|
+
setSearch("");
|
|
51
|
+
setOpen(false);
|
|
52
|
+
};
|
|
53
|
+
var renderList = useMemo(function () {
|
|
54
|
+
var _list = dataSource || [];
|
|
55
|
+
var isIncludes = function isIncludes(str) {
|
|
56
|
+
return str.toLowerCase().indexOf(search.toLowerCase()) !== -1;
|
|
57
|
+
};
|
|
58
|
+
return formatProductListByCategory(_list, search ? function (item) {
|
|
59
|
+
return isIncludes(item.title);
|
|
60
|
+
} : undefined);
|
|
61
|
+
}, [search, dataSource]);
|
|
62
|
+
var onSelect = function onSelect(item) {
|
|
63
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(changeArray(_value, item, "id"));
|
|
64
|
+
onClose();
|
|
65
|
+
};
|
|
66
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
67
|
+
className: classNames("pisell2-select-modal", className),
|
|
68
|
+
style: style
|
|
69
|
+
}, /*#__PURE__*/React.createElement(Skeleton, {
|
|
70
|
+
active: true,
|
|
71
|
+
round: true,
|
|
72
|
+
loading: loading
|
|
73
|
+
}, _value.map(function (item) {
|
|
74
|
+
return renderValueItem === null || renderValueItem === void 0 ? void 0 : renderValueItem(item, function (item) {
|
|
75
|
+
onOpen();
|
|
76
|
+
});
|
|
77
|
+
})), _value.length < maxLength ? /*#__PURE__*/React.createElement(AddButton, _extends({
|
|
78
|
+
onClick: onOpen
|
|
79
|
+
}, buttonProps)) : null, /*#__PURE__*/React.createElement(Drawer, _extends({
|
|
80
|
+
open: open,
|
|
81
|
+
onClose: onClose,
|
|
82
|
+
header: /*#__PURE__*/React.createElement("div", {
|
|
83
|
+
className: "pisell-lowcode__booking-service-header"
|
|
84
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
85
|
+
prefix: /*#__PURE__*/React.createElement(SearchLg, null),
|
|
86
|
+
style: {
|
|
87
|
+
marginTop: 16,
|
|
88
|
+
height: 44
|
|
89
|
+
},
|
|
90
|
+
placeholder: "",
|
|
91
|
+
allowClear: true,
|
|
92
|
+
value: search,
|
|
93
|
+
onChange: function onChange(e) {
|
|
94
|
+
setSearch(e.target.value);
|
|
95
|
+
}
|
|
96
|
+
}))
|
|
97
|
+
}, drawerProps), /*#__PURE__*/React.createElement("div", {
|
|
98
|
+
className: "pisell-lowcode__booking-service-body"
|
|
99
|
+
}, /*#__PURE__*/React.createElement(TabProduct, _extends({
|
|
100
|
+
list: renderList
|
|
101
|
+
// scrollDom='.booking-server-wrap .pisell-lowcode-drawer-body'
|
|
102
|
+
}, tabProductProps, {
|
|
103
|
+
renderItem: function renderItem(item) {
|
|
104
|
+
return renderOptionItem === null || renderOptionItem === void 0 ? void 0 : renderOptionItem(item, onSelect);
|
|
105
|
+
}
|
|
106
|
+
})))));
|
|
107
|
+
};
|
|
108
|
+
export default SelectModal;
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface CardProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
4
|
+
layout: number;
|
|
5
|
+
}
|
|
6
|
+
declare const Card: React.FC<Partial<CardProps>>;
|
|
7
|
+
export default Card;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import "./index.less";
|
|
4
|
+
var Card = function Card(props) {
|
|
5
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
6
|
+
className: classNames('pisell-card', {
|
|
7
|
+
'pisell-card-layout_2': props.layout === 2
|
|
8
|
+
}, props.className)
|
|
9
|
+
}), props.children);
|
|
10
|
+
};
|
|
11
|
+
export default Card;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.pisell-card {
|
|
2
|
+
width: 100%;
|
|
3
|
+
background: #ffffff;
|
|
4
|
+
border-radius: 4px;
|
|
5
|
+
padding: 20px;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
margin-bottom: 20px;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.pisell-card-layout_2 {
|
|
12
|
+
background: #ffffff;
|
|
13
|
+
/* shadow-sm */
|
|
14
|
+
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
|
|
15
|
+
border-radius: 12px;
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
export interface TabProductProps {
|
|
4
|
+
list?: any[];
|
|
5
|
+
scrollDom?: string;
|
|
6
|
+
renderItem?: (item: any) => React.ReactNode;
|
|
7
|
+
rowKey?: string;
|
|
8
|
+
tabsWrapClassName?: string;
|
|
9
|
+
categoryWrapClassName?: string;
|
|
10
|
+
listWrapClassName?: string;
|
|
11
|
+
warpClassName?: string;
|
|
12
|
+
stickyTop?: number;
|
|
13
|
+
}
|
|
14
|
+
declare const TabProduct: (props: TabProductProps) => React.JSX.Element;
|
|
15
|
+
export default TabProduct;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
2
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
6
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
+
import React, { useEffect, useState, useRef } from "react";
|
|
9
|
+
import Tabs from "./tabs";
|
|
10
|
+
import Card from "./card";
|
|
11
|
+
import classNames from "classnames";
|
|
12
|
+
import "./index.less";
|
|
13
|
+
var io = null;
|
|
14
|
+
var TabProduct = function TabProduct(props) {
|
|
15
|
+
var _props$list = props.list,
|
|
16
|
+
list = _props$list === void 0 ? [] : _props$list,
|
|
17
|
+
scrollDom = props.scrollDom,
|
|
18
|
+
_props$rowKey = props.rowKey,
|
|
19
|
+
rowKey = _props$rowKey === void 0 ? "id" : _props$rowKey,
|
|
20
|
+
tabsWrapClassName = props.tabsWrapClassName,
|
|
21
|
+
categoryWrapClassName = props.categoryWrapClassName,
|
|
22
|
+
listWrapClassName = props.listWrapClassName,
|
|
23
|
+
renderItem = props.renderItem,
|
|
24
|
+
warpClassName = props.warpClassName,
|
|
25
|
+
_props$stickyTop = props.stickyTop,
|
|
26
|
+
stickyTop = _props$stickyTop === void 0 ? 0 : _props$stickyTop;
|
|
27
|
+
var tabsRef = useRef();
|
|
28
|
+
var _useState = useState(1),
|
|
29
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
30
|
+
current = _useState2[0],
|
|
31
|
+
setCurrent = _useState2[1];
|
|
32
|
+
useEffect(function () {
|
|
33
|
+
if (list !== null && list !== void 0 && list.length) {
|
|
34
|
+
setCurrent(list[0][rowKey]);
|
|
35
|
+
handleObserver();
|
|
36
|
+
}
|
|
37
|
+
}, [list]);
|
|
38
|
+
var handleObserver = function handleObserver() {
|
|
39
|
+
io = new IntersectionObserver(function (entries) {
|
|
40
|
+
console.log(entries);
|
|
41
|
+
if (entries[0].isIntersecting) {
|
|
42
|
+
var _entries$, _entries$$target, _entries$$target$id, _tabsRef$current;
|
|
43
|
+
var _entries$0$target$id$ = (_entries$ = entries[0]) === null || _entries$ === void 0 ? void 0 : (_entries$$target = _entries$.target) === null || _entries$$target === void 0 ? void 0 : (_entries$$target$id = _entries$$target.id) === null || _entries$$target$id === void 0 ? void 0 : _entries$$target$id.split("-"),
|
|
44
|
+
_entries$0$target$id$2 = _slicedToArray(_entries$0$target$id$, 2),
|
|
45
|
+
name = _entries$0$target$id$2[0],
|
|
46
|
+
id = _entries$0$target$id$2[1];
|
|
47
|
+
setCurrent(Number(id));
|
|
48
|
+
tabsRef === null || tabsRef === void 0 ? void 0 : (_tabsRef$current = tabsRef.current) === null || _tabsRef$current === void 0 ? void 0 : _tabsRef$current.scroll(id);
|
|
49
|
+
}
|
|
50
|
+
}, {
|
|
51
|
+
root: scrollDom ? document.querySelector(scrollDom) : null
|
|
52
|
+
// rootMargin: ,
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
if (list !== null && list !== void 0 && list.length) {
|
|
56
|
+
var _iterator = _createForOfIteratorHelper(list),
|
|
57
|
+
_step;
|
|
58
|
+
try {
|
|
59
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
60
|
+
var _item2 = _step.value;
|
|
61
|
+
var _item = document.querySelector("#list-".concat(_item2[rowKey]));
|
|
62
|
+
if (_item) {
|
|
63
|
+
io.observe(_item);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
} catch (err) {
|
|
67
|
+
_iterator.e(err);
|
|
68
|
+
} finally {
|
|
69
|
+
_iterator.f();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
var handleUnObserver = function handleUnObserver() {
|
|
74
|
+
if (list !== null && list !== void 0 && list.length && io) {
|
|
75
|
+
var _iterator2 = _createForOfIteratorHelper(list),
|
|
76
|
+
_step2;
|
|
77
|
+
try {
|
|
78
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
79
|
+
var _item3 = _step2.value;
|
|
80
|
+
var _item = document.querySelector("#list-".concat(_item3[rowKey]));
|
|
81
|
+
if (_item) {
|
|
82
|
+
io.unobserve(_item);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
} catch (err) {
|
|
86
|
+
_iterator2.e(err);
|
|
87
|
+
} finally {
|
|
88
|
+
_iterator2.f();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
93
|
+
className: classNames("tab-product", warpClassName)
|
|
94
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
95
|
+
className: "tabs-wrap",
|
|
96
|
+
style: {
|
|
97
|
+
top: stickyTop
|
|
98
|
+
}
|
|
99
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
100
|
+
className: classNames("tabs", tabsWrapClassName),
|
|
101
|
+
id: "product-category"
|
|
102
|
+
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
103
|
+
ref: tabsRef,
|
|
104
|
+
options: list,
|
|
105
|
+
rowKey: rowKey,
|
|
106
|
+
tab: current,
|
|
107
|
+
onChange: function onChange(e) {
|
|
108
|
+
var _document, _document2;
|
|
109
|
+
var dom = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelector("#list-" + e);
|
|
110
|
+
var main = (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.querySelector(scrollDom || "");
|
|
111
|
+
if (dom && main) {
|
|
112
|
+
main.scrollTop = dom.offsetTop - 40;
|
|
113
|
+
}
|
|
114
|
+
handleUnObserver();
|
|
115
|
+
setCurrent(e);
|
|
116
|
+
setTimeout(function () {
|
|
117
|
+
handleObserver();
|
|
118
|
+
}, 1000);
|
|
119
|
+
}
|
|
120
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
121
|
+
className: classNames("category-list", categoryWrapClassName)
|
|
122
|
+
}, list.map(function (d, i) {
|
|
123
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
124
|
+
className: "category-item",
|
|
125
|
+
id: "list-".concat(d[rowKey]),
|
|
126
|
+
key: i
|
|
127
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
128
|
+
className: "category-title"
|
|
129
|
+
}, d.name), /*#__PURE__*/React.createElement("div", {
|
|
130
|
+
className: classNames("product-list", listWrapClassName)
|
|
131
|
+
}, d.products.map(function (item, index) {
|
|
132
|
+
if (renderItem) {
|
|
133
|
+
return renderItem(item);
|
|
134
|
+
}
|
|
135
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
136
|
+
key: index
|
|
137
|
+
}, index);
|
|
138
|
+
})));
|
|
139
|
+
})));
|
|
140
|
+
};
|
|
141
|
+
export default TabProduct;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
.tab-product {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
scroll-behavior: smooth;
|
|
8
|
+
border-radius: 12px;
|
|
9
|
+
|
|
10
|
+
.tabs-wrap {
|
|
11
|
+
position: sticky;
|
|
12
|
+
// top: 157px;
|
|
13
|
+
z-index: 58;
|
|
14
|
+
width: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.tabs {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
width: 100%;
|
|
22
|
+
padding: 16px 0;
|
|
23
|
+
margin-bottom: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.category-list {
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: 100%;
|
|
29
|
+
padding: 0;
|
|
30
|
+
|
|
31
|
+
.category-item {
|
|
32
|
+
.category-title {
|
|
33
|
+
margin: 16px 0;
|
|
34
|
+
font-style: normal;
|
|
35
|
+
font-weight: 600;
|
|
36
|
+
font-size: 18px;
|
|
37
|
+
line-height: 24px;
|
|
38
|
+
color: #1b1b1b;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.product-list {
|
|
42
|
+
padding: 0;
|
|
43
|
+
margin-bottom: 16px;
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
export interface Com<T> extends React.FC<T> {
|
|
4
|
+
}
|
|
5
|
+
export declare type RowKey = string | number;
|
|
6
|
+
export interface Option {
|
|
7
|
+
id: number | string;
|
|
8
|
+
name: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export interface TabsProps extends Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "onChange"> {
|
|
11
|
+
renderTab: (item: any) => React.ReactNode;
|
|
12
|
+
rowKey: RowKey;
|
|
13
|
+
name: RowKey;
|
|
14
|
+
onChange: (key: RowKey, _item: any) => void;
|
|
15
|
+
tab: RowKey;
|
|
16
|
+
className: string;
|
|
17
|
+
tabsRef: any;
|
|
18
|
+
options: Option[];
|
|
19
|
+
}
|
|
20
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<Partial<TabsProps>, "ref"> & React.RefAttributes<unknown>>;
|
|
21
|
+
export default _default;
|