@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,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
declare type Value = number[];
|
|
4
|
+
declare const SchedulesModule: ({ value, onChange, drawerContainer, ruleFn, tabKey, previewItemChange, isSelf, isTitle, }: {
|
|
5
|
+
value?: Value | undefined;
|
|
6
|
+
onChange?: ((value: Value) => void) | undefined;
|
|
7
|
+
drawerContainer?: HTMLElement | undefined;
|
|
8
|
+
ruleFn?: (() => boolean) | undefined;
|
|
9
|
+
tabKey?: string | undefined;
|
|
10
|
+
previewItemChange?: any;
|
|
11
|
+
isSelf?: boolean | undefined;
|
|
12
|
+
isTitle?: boolean | undefined;
|
|
13
|
+
}) => React.JSX.Element;
|
|
14
|
+
export default SchedulesModule;
|
package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import React, { useContext, useEffect, useRef } from "react";
|
|
2
|
+
import ScheduleList from "../../../../components/ScheduleList";
|
|
3
|
+
import "./index.less";
|
|
4
|
+
import AddSchedules from "./AddSchedules";
|
|
5
|
+
import { getScheduleListByProductId } from "../../../serve";
|
|
6
|
+
import { useMemoizedFn, useRequest } from "ahooks";
|
|
7
|
+
import { locales } from "@pisell/utils";
|
|
8
|
+
import { calcCalendarDataBySchedules } from "../../../../schedules/utils";
|
|
9
|
+
import { Context } from "../../../../model";
|
|
10
|
+
import useEngineContext from "../../../../../../hooks/useEngineContext";
|
|
11
|
+
import { request } from "../../../../utils";
|
|
12
|
+
var SchedulesModule = function SchedulesModule(_ref) {
|
|
13
|
+
var value = _ref.value,
|
|
14
|
+
onChange = _ref.onChange,
|
|
15
|
+
drawerContainer = _ref.drawerContainer,
|
|
16
|
+
_ref$ruleFn = _ref.ruleFn,
|
|
17
|
+
ruleFn = _ref$ruleFn === void 0 ? function () {
|
|
18
|
+
return true;
|
|
19
|
+
} : _ref$ruleFn,
|
|
20
|
+
tabKey = _ref.tabKey,
|
|
21
|
+
previewItemChange = _ref.previewItemChange,
|
|
22
|
+
_ref$isSelf = _ref.isSelf,
|
|
23
|
+
isSelf = _ref$isSelf === void 0 ? false : _ref$isSelf,
|
|
24
|
+
_ref$isTitle = _ref.isTitle,
|
|
25
|
+
isTitle = _ref$isTitle === void 0 ? true : _ref$isTitle;
|
|
26
|
+
var context = useEngineContext();
|
|
27
|
+
if (isSelf) {
|
|
28
|
+
request.setRequest(context.appHelper.utils.request);
|
|
29
|
+
}
|
|
30
|
+
var _useContext = useContext(Context),
|
|
31
|
+
state = _useContext.state,
|
|
32
|
+
dispatch = _useContext.dispatch;
|
|
33
|
+
var first = useRef(true);
|
|
34
|
+
var _getScheduleList = useRequest(getScheduleListByProductId, {
|
|
35
|
+
manual: true,
|
|
36
|
+
onSuccess: function onSuccess(res) {}
|
|
37
|
+
});
|
|
38
|
+
var handleDeleteSchedule = function handleDeleteSchedule(item) {
|
|
39
|
+
onChange === null || onChange === void 0 ? void 0 : onChange((value || []).filter(function (id) {
|
|
40
|
+
return id !== item.id;
|
|
41
|
+
}));
|
|
42
|
+
_getScheduleList.mutate(function (data) {
|
|
43
|
+
return data === null || data === void 0 ? void 0 : data.filter(function (d) {
|
|
44
|
+
return d.id !== item.id;
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
var _onAddChange = function _onAddChange(arr) {
|
|
49
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(arr.map(function (d) {
|
|
50
|
+
return d.id;
|
|
51
|
+
}));
|
|
52
|
+
_getScheduleList.mutate(arr);
|
|
53
|
+
};
|
|
54
|
+
useEffect(function () {
|
|
55
|
+
// 只在首次进行,首次只有id 避免没必要的请求, 后续修改数据能拿到完整数据
|
|
56
|
+
if (value && value.length && first.current === true) {
|
|
57
|
+
_getScheduleList.run({
|
|
58
|
+
ids: value || [],
|
|
59
|
+
num: 999,
|
|
60
|
+
skip: 1
|
|
61
|
+
});
|
|
62
|
+
first.current = false;
|
|
63
|
+
}
|
|
64
|
+
}, [value]);
|
|
65
|
+
var setCalendarEditData = function setCalendarEditData(editData) {
|
|
66
|
+
dispatch === null || dispatch === void 0 ? void 0 : dispatch({
|
|
67
|
+
type: "setCalendar",
|
|
68
|
+
payload: {
|
|
69
|
+
isEdit: true,
|
|
70
|
+
editData: editData
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
useEffect(function () {
|
|
75
|
+
if (ruleFn !== null && ruleFn !== void 0 && ruleFn()) {
|
|
76
|
+
setCalendarEditData(calcCalendarDataBySchedules(_getScheduleList.data || []));
|
|
77
|
+
}
|
|
78
|
+
}, [_getScheduleList.data, ruleFn === null || ruleFn === void 0 ? void 0 : ruleFn()]);
|
|
79
|
+
var onClickItem = useMemoizedFn(function (item) {
|
|
80
|
+
if (previewItemChange) {
|
|
81
|
+
return previewItemChange(item);
|
|
82
|
+
}
|
|
83
|
+
dispatch === null || dispatch === void 0 ? void 0 : dispatch({
|
|
84
|
+
type: "setState",
|
|
85
|
+
payload: {
|
|
86
|
+
tabKey: "schedules",
|
|
87
|
+
schedulesDetail: {
|
|
88
|
+
show: true,
|
|
89
|
+
id: item.id,
|
|
90
|
+
fromTabKey: tabKey,
|
|
91
|
+
callback: function callback(newItem) {
|
|
92
|
+
if ("isRemove" in newItem) {
|
|
93
|
+
newItem.isRemove && handleDeleteSchedule(newItem);
|
|
94
|
+
} else if (newItem) {
|
|
95
|
+
_getScheduleList.mutate(function (oldData) {
|
|
96
|
+
return (oldData || []).map(function (item) {
|
|
97
|
+
return item.id === newItem.id ? newItem : item;
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
107
|
+
className: "product-detail-card-module"
|
|
108
|
+
}, isTitle ? /*#__PURE__*/React.createElement("div", {
|
|
109
|
+
className: "product-detail-card-title"
|
|
110
|
+
}, locales.getText("pisell2.text.schedules.schedules-title")) : null, /*#__PURE__*/React.createElement(ScheduleList, {
|
|
111
|
+
className: "product-detail-card-schedule-list",
|
|
112
|
+
dataSource: _getScheduleList.data || [],
|
|
113
|
+
loading: _getScheduleList.loading,
|
|
114
|
+
showDeleteIcon: true,
|
|
115
|
+
onDelete: handleDeleteSchedule,
|
|
116
|
+
onItemClick: onClickItem
|
|
117
|
+
}), /*#__PURE__*/React.createElement(AddSchedules, {
|
|
118
|
+
isSelf: isSelf,
|
|
119
|
+
value: _getScheduleList.data || [],
|
|
120
|
+
onChange: _onAddChange,
|
|
121
|
+
drawerContainer: drawerContainer
|
|
122
|
+
}));
|
|
123
|
+
};
|
|
124
|
+
export default SchedulesModule;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Form } from "antd";
|
|
3
|
+
import SchedulesModule from "./SchedulesModule";
|
|
4
|
+
import MaxParticipantsModule from "./MaxParticipantsModule";
|
|
5
|
+
import ResourcesModule from "./ResourcesModule";
|
|
6
|
+
import "./index.less";
|
|
7
|
+
var ProductDetail = function ProductDetail(_ref) {
|
|
8
|
+
var form = _ref.form,
|
|
9
|
+
currentProduct = _ref.currentProduct;
|
|
10
|
+
var useSchedule = Form.useWatch("schedule", form);
|
|
11
|
+
var isAutoChange = Form.useWatch("isAutoChange", form);
|
|
12
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
className: "product-detail-card"
|
|
14
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
15
|
+
noStyle: true,
|
|
16
|
+
name: "schedule"
|
|
17
|
+
}, /*#__PURE__*/React.createElement(SchedulesModule, {
|
|
18
|
+
tabKey: "products",
|
|
19
|
+
onChange: function onChange() {
|
|
20
|
+
form.setFieldsValue({
|
|
21
|
+
isAutoChange: true
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
25
|
+
noStyle: true,
|
|
26
|
+
name: "max_participants"
|
|
27
|
+
}, /*#__PURE__*/React.createElement(MaxParticipantsModule, {
|
|
28
|
+
form: form,
|
|
29
|
+
useSchedule: useSchedule,
|
|
30
|
+
isAutoChange: isAutoChange
|
|
31
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
32
|
+
hidden: true,
|
|
33
|
+
name: "isAutoChange",
|
|
34
|
+
initialValue: false
|
|
35
|
+
}, /*#__PURE__*/React.createElement("switch", null)), /*#__PURE__*/React.createElement(ResourcesModule, {
|
|
36
|
+
product: currentProduct
|
|
37
|
+
}));
|
|
38
|
+
};
|
|
39
|
+
export default ProductDetail;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.product-detail-card {
|
|
2
|
+
.product-detail-card-module {
|
|
3
|
+
margin-bottom: 16px;
|
|
4
|
+
|
|
5
|
+
.product-detail-card-title {
|
|
6
|
+
color: var(--Text-Text_1, #1B1B1B);
|
|
7
|
+
font-size: 18px;
|
|
8
|
+
font-style: normal;
|
|
9
|
+
font-weight: 600;
|
|
10
|
+
line-height: 24px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.product-detail-card-schedule-list {
|
|
14
|
+
margin-top: 16px;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,248 @@
|
|
|
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
|
+
var _excluded = ["isAutoChange"];
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
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; }
|
|
6
|
+
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); } }
|
|
7
|
+
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); }); }; }
|
|
8
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
|
+
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."); }
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
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; } }
|
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
+
import React, { useState, useMemo, useEffect, useContext } from "react";
|
|
15
|
+
import { Context } from "../../model";
|
|
16
|
+
import Drawer from "../../../booking/components/drawer";
|
|
17
|
+
import ProductDetail from "./ProductDetail";
|
|
18
|
+
import "./index.less";
|
|
19
|
+
import { Button, Skeleton, Form, message } from "antd";
|
|
20
|
+
import { useRequest } from "ahooks";
|
|
21
|
+
import { getProductDetail, editProductDetail } from "../serve";
|
|
22
|
+
import { updateProductById } from "../utils";
|
|
23
|
+
import { locales } from "@pisell/utils";
|
|
24
|
+
import { saveConfirm } from "../../utils";
|
|
25
|
+
var ProductDetailDrawer = function ProductDetailDrawer() {
|
|
26
|
+
var _products$currentProd;
|
|
27
|
+
var _Form$useForm = Form.useForm(),
|
|
28
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
29
|
+
form = _Form$useForm2[0];
|
|
30
|
+
var _useState = useState(false),
|
|
31
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
32
|
+
isEdit = _useState2[0],
|
|
33
|
+
setIsEdit = _useState2[1];
|
|
34
|
+
var _useContext = useContext(Context),
|
|
35
|
+
state = _useContext.state,
|
|
36
|
+
dispatch = _useContext.dispatch;
|
|
37
|
+
var products = state.products,
|
|
38
|
+
currentSelectDayDetail = state.currentSelectDayDetail;
|
|
39
|
+
var _onClose = /*#__PURE__*/function () {
|
|
40
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
41
|
+
var checkEdit,
|
|
42
|
+
confirmed,
|
|
43
|
+
_args = arguments;
|
|
44
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
45
|
+
while (1) switch (_context.prev = _context.next) {
|
|
46
|
+
case 0:
|
|
47
|
+
checkEdit = _args.length > 0 && _args[0] !== undefined ? _args[0] : true;
|
|
48
|
+
if (!(checkEdit && isEdit)) {
|
|
49
|
+
_context.next = 7;
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
_context.next = 4;
|
|
53
|
+
return saveConfirm();
|
|
54
|
+
case 4:
|
|
55
|
+
confirmed = _context.sent;
|
|
56
|
+
if (confirmed) {
|
|
57
|
+
_context.next = 7;
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
return _context.abrupt("return");
|
|
61
|
+
case 7:
|
|
62
|
+
setIsEdit(false);
|
|
63
|
+
form.setFieldsValue({
|
|
64
|
+
isAutoChange: false
|
|
65
|
+
});
|
|
66
|
+
setTimeout(function () {
|
|
67
|
+
form.resetFields();
|
|
68
|
+
}, 10);
|
|
69
|
+
dispatch({
|
|
70
|
+
type: "setCalendar",
|
|
71
|
+
payload: {
|
|
72
|
+
isEdit: false,
|
|
73
|
+
editData: []
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
dispatch({
|
|
77
|
+
type: "setProducts",
|
|
78
|
+
payload: {
|
|
79
|
+
openProductDetailDrawer: false,
|
|
80
|
+
currentProduct: null
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
case 12:
|
|
84
|
+
case "end":
|
|
85
|
+
return _context.stop();
|
|
86
|
+
}
|
|
87
|
+
}, _callee);
|
|
88
|
+
}));
|
|
89
|
+
return function onClose() {
|
|
90
|
+
return _ref.apply(this, arguments);
|
|
91
|
+
};
|
|
92
|
+
}();
|
|
93
|
+
var updateProductList = function updateProductList(param) {
|
|
94
|
+
dispatch({
|
|
95
|
+
type: "setProducts",
|
|
96
|
+
payload: {
|
|
97
|
+
list: updateProductById({
|
|
98
|
+
products: state.products.list,
|
|
99
|
+
id: products.currentProduct.id,
|
|
100
|
+
schedule: param.schedules.schedule,
|
|
101
|
+
scheduleMap: state.schedules.scheduleMap
|
|
102
|
+
})
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
var drawerContent = useMemo(function () {
|
|
107
|
+
if (!products.openProductDetailDrawer || !products.currentProduct) {
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
// 查看当天商品
|
|
111
|
+
// if (currentSelectDayDetail) {
|
|
112
|
+
// return <ProductDetailByDate />;
|
|
113
|
+
// }
|
|
114
|
+
|
|
115
|
+
// 查看全部商品
|
|
116
|
+
return /*#__PURE__*/React.createElement(ProductDetail, {
|
|
117
|
+
form: form,
|
|
118
|
+
currentProduct: products.currentProduct
|
|
119
|
+
});
|
|
120
|
+
}, [form, products.openProductDetailDrawer, products.currentProduct, currentSelectDayDetail]);
|
|
121
|
+
var _getProductDetail = useRequest(getProductDetail, {
|
|
122
|
+
manual: true,
|
|
123
|
+
onSuccess: function onSuccess(_ref2) {
|
|
124
|
+
var data = _ref2.data;
|
|
125
|
+
form.setFieldsValue({
|
|
126
|
+
schedule: (data === null || data === void 0 ? void 0 : data.schedule) || [],
|
|
127
|
+
max_participants: (data === null || data === void 0 ? void 0 : data.max_participants) || [],
|
|
128
|
+
isAutoChange: false
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
var _editProductDetail = useRequest(editProductDetail, {
|
|
133
|
+
manual: true,
|
|
134
|
+
onSuccess: function onSuccess(_ref3, param) {
|
|
135
|
+
var code = _ref3.code;
|
|
136
|
+
updateProductList(param[0]);
|
|
137
|
+
message.success(locales.getText("pisell2.text.schedules.save-success"));
|
|
138
|
+
setIsEdit(false);
|
|
139
|
+
_onClose(false);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
var _init = /*#__PURE__*/function () {
|
|
143
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
144
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
145
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
146
|
+
case 0:
|
|
147
|
+
_getProductDetail.run({
|
|
148
|
+
item_id: products.currentProduct.id,
|
|
149
|
+
item_type: "product"
|
|
150
|
+
});
|
|
151
|
+
setIsEdit(false);
|
|
152
|
+
case 2:
|
|
153
|
+
case "end":
|
|
154
|
+
return _context2.stop();
|
|
155
|
+
}
|
|
156
|
+
}, _callee2);
|
|
157
|
+
}));
|
|
158
|
+
return function _init() {
|
|
159
|
+
return _ref4.apply(this, arguments);
|
|
160
|
+
};
|
|
161
|
+
}();
|
|
162
|
+
useEffect(function () {
|
|
163
|
+
if (products.openProductDetailDrawer) {
|
|
164
|
+
_init();
|
|
165
|
+
}
|
|
166
|
+
}, [products.openProductDetailDrawer]);
|
|
167
|
+
var checkValues = function checkValues(values) {
|
|
168
|
+
var res = {
|
|
169
|
+
success: true,
|
|
170
|
+
message: ""
|
|
171
|
+
};
|
|
172
|
+
console.log("values.max_participants", values.max_participants);
|
|
173
|
+
if (values.max_participants.length) {
|
|
174
|
+
var isError = values.max_participants.some(function (d) {
|
|
175
|
+
if (!d.max_participants_type) {
|
|
176
|
+
return true;
|
|
177
|
+
}
|
|
178
|
+
if (d.max_participants_type === "custom-limit" && !d.max_participants_limit) {
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
181
|
+
return false;
|
|
182
|
+
});
|
|
183
|
+
if (isError) {
|
|
184
|
+
res.success = false;
|
|
185
|
+
res.message = locales.getText("pisell2.text.products.max-participants-error");
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return res;
|
|
189
|
+
};
|
|
190
|
+
var onFinish = function onFinish(values) {
|
|
191
|
+
var isValid = checkValues(values);
|
|
192
|
+
if (!isValid.success) {
|
|
193
|
+
return message.warning(isValid.message);
|
|
194
|
+
}
|
|
195
|
+
var isAutoChange = values.isAutoChange,
|
|
196
|
+
resetValues = _objectWithoutProperties(values, _excluded);
|
|
197
|
+
_editProductDetail.run({
|
|
198
|
+
item_id: products.currentProduct.id,
|
|
199
|
+
item_type: "product",
|
|
200
|
+
schedules: resetValues
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
return /*#__PURE__*/React.createElement(Drawer, {
|
|
204
|
+
titleNoWrap: true,
|
|
205
|
+
width: 480,
|
|
206
|
+
open: products.openProductDetailDrawer,
|
|
207
|
+
title: ((_products$currentProd = products.currentProduct) === null || _products$currentProd === void 0 ? void 0 : _products$currentProd.title) || "-",
|
|
208
|
+
onClose: function onClose() {
|
|
209
|
+
_onClose();
|
|
210
|
+
},
|
|
211
|
+
destroyOnClose: true,
|
|
212
|
+
getContainer: function getContainer() {
|
|
213
|
+
return document.querySelector(".pisell-lowcode__schedules-component-products") || document.body;
|
|
214
|
+
},
|
|
215
|
+
rootStyle: {
|
|
216
|
+
position: "absolute"
|
|
217
|
+
},
|
|
218
|
+
contentWrapperStyle: {
|
|
219
|
+
boxShadow: "none"
|
|
220
|
+
},
|
|
221
|
+
footer: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
222
|
+
type: "primary",
|
|
223
|
+
style: {
|
|
224
|
+
width: "100%"
|
|
225
|
+
},
|
|
226
|
+
size: "large",
|
|
227
|
+
disabled: _getProductDetail.loading || !isEdit,
|
|
228
|
+
loading: _editProductDetail.loading,
|
|
229
|
+
onClick: function onClick() {
|
|
230
|
+
form.submit();
|
|
231
|
+
}
|
|
232
|
+
}, locales.getText("pisell2.text.schedules.save")))
|
|
233
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
234
|
+
className: "product-detail-drawer-body"
|
|
235
|
+
}, /*#__PURE__*/React.createElement(Skeleton, {
|
|
236
|
+
round: true,
|
|
237
|
+
active: true,
|
|
238
|
+
loading: _getProductDetail.loading
|
|
239
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
240
|
+
form: form,
|
|
241
|
+
onFinish: onFinish,
|
|
242
|
+
onValuesChange: function onValuesChange(a, b) {
|
|
243
|
+
console.log("wzw", a, b);
|
|
244
|
+
setIsEdit(true);
|
|
245
|
+
}
|
|
246
|
+
}, drawerContent))));
|
|
247
|
+
};
|
|
248
|
+
export default ProductDetailDrawer;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React, { useEffect, useContext } from "react";
|
|
2
|
+
import { useRequest } from "ahooks";
|
|
3
|
+
import CurrentDay from "../components/CurrentDay";
|
|
4
|
+
import List from "./list";
|
|
5
|
+
import ProductDetailDrawer from "./ProductDetailDrawer";
|
|
6
|
+
import { Context } from "../model";
|
|
7
|
+
import { getProductList } from "./serve";
|
|
8
|
+
import { formatProductSchedules } from "./utils";
|
|
9
|
+
import "./index.less";
|
|
10
|
+
var Products = function Products() {
|
|
11
|
+
var _useContext = useContext(Context),
|
|
12
|
+
state = _useContext.state,
|
|
13
|
+
dispatch = _useContext.dispatch;
|
|
14
|
+
var products = state.products,
|
|
15
|
+
currentSelectDayDetail = state.currentSelectDayDetail;
|
|
16
|
+
var _getProducts = useRequest(getProductList, {
|
|
17
|
+
manual: true
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
// 当获取完商品数据和日程数据时, 进行合并,方便后续处理
|
|
21
|
+
useEffect(function () {
|
|
22
|
+
dispatch({
|
|
23
|
+
type: "setProducts",
|
|
24
|
+
payload: {
|
|
25
|
+
list: formatProductSchedules(_getProducts.data || [], state.schedules.scheduleMap)
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}, [_getProducts.data, state.schedules.scheduleMap]);
|
|
29
|
+
var _init = function _init() {
|
|
30
|
+
// 获取数据前, 关闭所有的弹窗
|
|
31
|
+
dispatch({
|
|
32
|
+
type: "setProducts",
|
|
33
|
+
payload: {
|
|
34
|
+
search: "",
|
|
35
|
+
currentProduct: null,
|
|
36
|
+
openProductDetailDrawer: false,
|
|
37
|
+
openAddSchedulesDrawer: false
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
// 如果选择了空的日期, 则直接设置为空值
|
|
41
|
+
if (currentSelectDayDetail && (!currentSelectDayDetail.scheduleIds || !currentSelectDayDetail.scheduleIds.length)) {
|
|
42
|
+
_getProducts.mutate([]);
|
|
43
|
+
} else {
|
|
44
|
+
_getProducts.run({
|
|
45
|
+
skip: 1,
|
|
46
|
+
num: 500,
|
|
47
|
+
// extension_type: ["normal"],
|
|
48
|
+
with: ["category"],
|
|
49
|
+
open_quotation: 1,
|
|
50
|
+
with_schedule: true,
|
|
51
|
+
schedule: 1,
|
|
52
|
+
schedule_ids: currentSelectDayDetail ? currentSelectDayDetail.scheduleIds || [] : undefined
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
useEffect(function () {
|
|
57
|
+
_init();
|
|
58
|
+
}, [currentSelectDayDetail]);
|
|
59
|
+
var handleClose = function handleClose() {
|
|
60
|
+
dispatch({
|
|
61
|
+
type: "setState",
|
|
62
|
+
payload: {
|
|
63
|
+
currentSelectDayDetail: null
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
68
|
+
className: "pisell-lowcode__schedules-component-products"
|
|
69
|
+
}, /*#__PURE__*/React.createElement(CurrentDay, {
|
|
70
|
+
onClose: handleClose,
|
|
71
|
+
currentDay: currentSelectDayDetail === null || currentSelectDayDetail === void 0 ? void 0 : currentSelectDayDetail.date
|
|
72
|
+
}), /*#__PURE__*/React.createElement(List, {
|
|
73
|
+
loading: _getProducts.loading,
|
|
74
|
+
list: products.list
|
|
75
|
+
}), /*#__PURE__*/React.createElement(ProductDetailDrawer, null));
|
|
76
|
+
};
|
|
77
|
+
export default Products;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.pisell-lowcode__schedules-component-products {
|
|
2
|
+
padding: 0 32px 16px;
|
|
3
|
+
height: 100%;
|
|
4
|
+
overflow-y: auto;
|
|
5
|
+
}
|
|
6
|
+
.pisell-lowcode__schedules-by-day-title {
|
|
7
|
+
padding: 8px 32px 24px;
|
|
8
|
+
color: var(--Gray-true-600, #525252);
|
|
9
|
+
font-size: 18px;
|
|
10
|
+
font-style: normal;
|
|
11
|
+
font-weight: 500;
|
|
12
|
+
line-height: 28px; /* 155.556% */
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
border-bottom: 1px solid var(--Gray-true-200, #E5E5E5);
|
|
16
|
+
.pisell-lowcode__schedules-by-day-go-back {
|
|
17
|
+
font-size: 24px;
|
|
18
|
+
margin-right: 8px;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
declare type Item = any;
|
|
4
|
+
interface ProductItemProps {
|
|
5
|
+
item?: Item;
|
|
6
|
+
onClickItem: (item: Item) => void;
|
|
7
|
+
layout?: "day" | "all";
|
|
8
|
+
}
|
|
9
|
+
declare const ProductItem: ({ item, onClickItem, layout, }: ProductItemProps) => React.JSX.Element;
|
|
10
|
+
export default ProductItem;
|