@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,84 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
'pisell2.text.schedules.all-day': string;
|
|
4
|
+
'pisell2.text.schedules.save': string;
|
|
5
|
+
'pisell2.text.schedules.delete-schedules-text1': string;
|
|
6
|
+
'pisell2.text.schedules.delete-schedules-text2': string;
|
|
7
|
+
'pisell2.text.schedules.delete-schedules-text3': string;
|
|
8
|
+
'pisell2.text.schedules.add': string;
|
|
9
|
+
'pisell2.text.schedules.edit-schedule': string;
|
|
10
|
+
'pisell2.text.schedules.products-title': string;
|
|
11
|
+
'pisell2.text.schedules.schedules-title': string;
|
|
12
|
+
'pisell2.text.schedules.resources-title': string;
|
|
13
|
+
'pisell2.text.schedules.open-hours-title': string;
|
|
14
|
+
'pisell2.text.schedules.cancel': string;
|
|
15
|
+
'pisell2.text.products.no-current-schedule': string;
|
|
16
|
+
'pisell2.text.schedules.save-success': string;
|
|
17
|
+
'pisell2.text.schedules.no-schedules': string;
|
|
18
|
+
'pisell2.text.schedules.assign-schedule': string;
|
|
19
|
+
'pisell2.text.schedules.max-participants': string;
|
|
20
|
+
'pisell2.text.products.edit-resource-message': string;
|
|
21
|
+
'pisell2.text.products.no-products': string;
|
|
22
|
+
'pisell2.text.products.no-resources': string;
|
|
23
|
+
'pisell2.text.products.unsaved-title': string;
|
|
24
|
+
'pisell2.text.products.unsaved-content': string;
|
|
25
|
+
'pisell2.text.products.unsaved-back': string;
|
|
26
|
+
'pisell2.text.products.unsaved-yes': string;
|
|
27
|
+
'pisell2.text.products.max-participants-error': string;
|
|
28
|
+
};
|
|
29
|
+
'zh-CN': {
|
|
30
|
+
'pisell2.text.schedules.all-day': string;
|
|
31
|
+
'pisell2.text.schedules.save': string;
|
|
32
|
+
'pisell2.text.schedules.delete-schedules-text1': string;
|
|
33
|
+
'pisell2.text.schedules.delete-schedules-text2': string;
|
|
34
|
+
'pisell2.text.schedules.delete-schedules-text3': string;
|
|
35
|
+
'pisell2.text.schedules.add': string;
|
|
36
|
+
'pisell2.text.schedules.edit-schedule': string;
|
|
37
|
+
'pisell2.text.schedules.products-title': string;
|
|
38
|
+
'pisell2.text.schedules.schedules-title': string;
|
|
39
|
+
'pisell2.text.schedules.resources-title': string;
|
|
40
|
+
'pisell2.text.schedules.open-hours-title': string;
|
|
41
|
+
'pisell2.text.schedules.cancel': string;
|
|
42
|
+
'pisell2.text.products.no-current-schedule': string;
|
|
43
|
+
'pisell2.text.schedules.save-success': string;
|
|
44
|
+
'pisell2.text.schedules.no-schedules': string;
|
|
45
|
+
'pisell2.text.schedules.assign-schedule': string;
|
|
46
|
+
'pisell2.text.schedules.max-participants': string;
|
|
47
|
+
'pisell2.text.products.edit-resource-message': string;
|
|
48
|
+
'pisell2.text.products.no-products': string;
|
|
49
|
+
'pisell2.text.products.no-resources': string;
|
|
50
|
+
'pisell2.text.products.unsaved-title': string;
|
|
51
|
+
'pisell2.text.products.unsaved-content': string;
|
|
52
|
+
'pisell2.text.products.unsaved-back': string;
|
|
53
|
+
'pisell2.text.products.unsaved-yes': string;
|
|
54
|
+
'pisell2.text.products.max-participants-error': string;
|
|
55
|
+
};
|
|
56
|
+
'zh-HK': {
|
|
57
|
+
'pisell2.text.schedules.all-day': string;
|
|
58
|
+
'pisell2.text.schedules.save': string;
|
|
59
|
+
'pisell2.text.schedules.delete-schedules-text1': string;
|
|
60
|
+
'pisell2.text.schedules.delete-schedules-text2': string;
|
|
61
|
+
'pisell2.text.schedules.delete-schedules-text3': string;
|
|
62
|
+
'pisell2.text.schedules.add': string;
|
|
63
|
+
'pisell2.text.schedules.edit-schedule': string;
|
|
64
|
+
'pisell2.text.schedules.products-title': string;
|
|
65
|
+
'pisell2.text.schedules.schedules-title': string;
|
|
66
|
+
'pisell2.text.schedules.resources-title': string;
|
|
67
|
+
'pisell2.text.schedules.open-hours-title': string;
|
|
68
|
+
'pisell2.text.schedules.cancel': string;
|
|
69
|
+
'pisell2.text.products.no-current-schedule': string;
|
|
70
|
+
'pisell2.text.schedules.save-success': string;
|
|
71
|
+
'pisell2.text.schedules.no-schedules': string;
|
|
72
|
+
'pisell2.text.schedules.assign-schedule': string;
|
|
73
|
+
'pisell2.text.schedules.max-participants': string;
|
|
74
|
+
'pisell2.text.products.edit-resource-message': string;
|
|
75
|
+
'pisell2.text.products.no-products': string;
|
|
76
|
+
'pisell2.text.products.no-resources': string;
|
|
77
|
+
'pisell2.text.products.unsaved-title': string;
|
|
78
|
+
'pisell2.text.products.unsaved-content': string;
|
|
79
|
+
'pisell2.text.products.unsaved-back': string;
|
|
80
|
+
'pisell2.text.products.unsaved-yes': string;
|
|
81
|
+
'pisell2.text.products.max-participants-error': string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
export default _default;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"en": {
|
|
3
|
+
'pisell2.text.schedules.all-day': "All day",
|
|
4
|
+
'pisell2.text.schedules.save': "Save",
|
|
5
|
+
'pisell2.text.schedules.delete-schedules-text1': "Are you sure?",
|
|
6
|
+
'pisell2.text.schedules.delete-schedules-text2': "This schedule has been associated with items, but there is no order yert. Deleting the schedule will disassociate the items.",
|
|
7
|
+
'pisell2.text.schedules.delete-schedules-text3': "Orders already exist for the items associated with this schedule. Deleting the schedule will disassociate the items, but will not affect existing orders.",
|
|
8
|
+
'pisell2.text.schedules.add': "Add",
|
|
9
|
+
'pisell2.text.schedules.edit-schedule': "Edit Schedule",
|
|
10
|
+
'pisell2.text.schedules.products-title': "Products",
|
|
11
|
+
'pisell2.text.schedules.schedules-title': "Schedules",
|
|
12
|
+
'pisell2.text.schedules.resources-title': "Resources",
|
|
13
|
+
'pisell2.text.schedules.open-hours-title': "Open Hours",
|
|
14
|
+
'pisell2.text.schedules.cancel': "Cancel",
|
|
15
|
+
'pisell2.text.products.no-current-schedule': "No current schedule",
|
|
16
|
+
'pisell2.text.schedules.save-success': "Save successfully",
|
|
17
|
+
'pisell2.text.schedules.no-schedules': 'No Schedules',
|
|
18
|
+
'pisell2.text.schedules.assign-schedule': 'Assign Schedule',
|
|
19
|
+
'pisell2.text.schedules.max-participants': 'Max Participants',
|
|
20
|
+
'pisell2.text.products.edit-resource-message': 'If you want to modify the resources associated with this product, please click here to jump',
|
|
21
|
+
'pisell2.text.products.no-products': "No products",
|
|
22
|
+
'pisell2.text.products.no-resources': "No resources",
|
|
23
|
+
'pisell2.text.products.unsaved-title': "You has unsaved changes",
|
|
24
|
+
'pisell2.text.products.unsaved-content': "Navigating away without saving will discard your changes. Are you sure you want to proceed?",
|
|
25
|
+
'pisell2.text.products.unsaved-back': "Go back",
|
|
26
|
+
'pisell2.text.products.unsaved-yes': "Yes, discard",
|
|
27
|
+
'pisell2.text.products.max-participants-error': "Please set max participants"
|
|
28
|
+
},
|
|
29
|
+
'zh-CN': {
|
|
30
|
+
'pisell2.text.schedules.all-day': "全天",
|
|
31
|
+
'pisell2.text.schedules.save': "保存",
|
|
32
|
+
'pisell2.text.schedules.delete-schedules-text1': "确定删除吗?",
|
|
33
|
+
'pisell2.text.schedules.delete-schedules-text2': "该日程计划已经关联了项目,但暂无订单。删除日程计划将会解除与项目的关联。",
|
|
34
|
+
'pisell2.text.schedules.delete-schedules-text3': "该日程计划关联的项目已存在订单。删除日程计划将会解除与项目的关联,但不会影响已存在的订单。",
|
|
35
|
+
'pisell2.text.schedules.add': "添加",
|
|
36
|
+
'pisell2.text.schedules.edit-schedule': "编辑日程",
|
|
37
|
+
'pisell2.text.schedules.products-title': "商品",
|
|
38
|
+
'pisell2.text.schedules.schedules-title': "日程",
|
|
39
|
+
'pisell2.text.schedules.resources-title': "资源",
|
|
40
|
+
'pisell2.text.schedules.open-hours-title': "营业时间",
|
|
41
|
+
'pisell2.text.schedules.cancel': "取消",
|
|
42
|
+
'pisell2.text.products.no-current-schedule': "当前没有可用的日程",
|
|
43
|
+
'pisell2.text.schedules.save-success': "保存成功",
|
|
44
|
+
'pisell2.text.schedules.no-schedules': '没有日程',
|
|
45
|
+
'pisell2.text.schedules.assign-schedule': '关联日程',
|
|
46
|
+
'pisell2.text.schedules.max-participants': '最大参与人数',
|
|
47
|
+
'pisell2.text.products.edit-resource-message': '如果要修改此商品关联的资源,请点击此处跳转',
|
|
48
|
+
'pisell2.text.products.no-products': "暂无商品",
|
|
49
|
+
'pisell2.text.products.no-resources': "暂无资源",
|
|
50
|
+
'pisell2.text.products.unsaved-title': "有未保存的更改",
|
|
51
|
+
'pisell2.text.products.unsaved-content': "若不保存即离开,您所做的修改将会丢失。确定要继续吗?",
|
|
52
|
+
'pisell2.text.products.unsaved-back': "返回",
|
|
53
|
+
'pisell2.text.products.unsaved-yes': "是的,退出",
|
|
54
|
+
'pisell2.text.products.max-participants-error': "请设置最大参与人数"
|
|
55
|
+
},
|
|
56
|
+
'zh-HK': {
|
|
57
|
+
'pisell2.text.schedules.all-day': "全天",
|
|
58
|
+
'pisell2.text.schedules.save': "保存",
|
|
59
|
+
'pisell2.text.schedules.delete-schedules-text1': "確定刪除嗎 ?",
|
|
60
|
+
'pisell2.text.schedules.delete-schedules-text2': "該日程計劃已經關聯了項目,但暫無訂單。刪除日程計劃將會解除與項目的關聯。",
|
|
61
|
+
'pisell2.text.schedules.delete-schedules-text3': "該日程計劃關聯的項目已存在訂單。刪除日程計劃將會解除與項目的關聯,但不會影響已存在的訂單。",
|
|
62
|
+
'pisell2.text.schedules.add': "添加",
|
|
63
|
+
'pisell2.text.schedules.edit-schedule': "編輯日程",
|
|
64
|
+
'pisell2.text.schedules.products-title': "商品",
|
|
65
|
+
'pisell2.text.schedules.schedules-title': "日程",
|
|
66
|
+
'pisell2.text.schedules.resources-title': "資源",
|
|
67
|
+
'pisell2.text.schedules.open-hours-title': "營業時間",
|
|
68
|
+
'pisell2.text.schedules.cancel': "取消",
|
|
69
|
+
'pisell2.text.products.no-current-schedule': "當前沒有可用的日程",
|
|
70
|
+
'pisell2.text.schedules.save-success': "保存成功",
|
|
71
|
+
'pisell2.text.schedules.no-schedules': '沒有日程',
|
|
72
|
+
'pisell2.text.schedules.assign-schedule': '關聯日程',
|
|
73
|
+
'pisell2.text.schedules.max-participants': '最大參與人數',
|
|
74
|
+
'pisell2.text.products.edit-resource-message': '如果要修改此商品關聯的資源, 請點擊此處跳轉',
|
|
75
|
+
'pisell2.text.products.no-products': "暫無商品",
|
|
76
|
+
'pisell2.text.products.no-resources': "暫無資源",
|
|
77
|
+
'pisell2.text.products.unsaved-title': "有未保存的更改",
|
|
78
|
+
'pisell2.text.products.unsaved-content': "若不保即離開,您做的修改將會丟失。確定要繼續嗎?",
|
|
79
|
+
'pisell2.text.products.unsaved-back': "返回",
|
|
80
|
+
'pisell2.text.products.unsaved-yes': "是的,退出",
|
|
81
|
+
'pisell2.text.products.max-participants-error': "請設置最大參與人數"
|
|
82
|
+
}
|
|
83
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
2
|
+
import dayjs from "dayjs";
|
|
3
|
+
export interface FormState {
|
|
4
|
+
data: {};
|
|
5
|
+
schedulesDetail: {
|
|
6
|
+
id?: number;
|
|
7
|
+
show: boolean;
|
|
8
|
+
type?: "standard" | "time-slots" | "designation";
|
|
9
|
+
fromTabKey?: "products" | "schedules" | "resources" | "openHours";
|
|
10
|
+
callback?: (data: ScheduleItem | {
|
|
11
|
+
id: number;
|
|
12
|
+
isRemove: boolean;
|
|
13
|
+
}) => void;
|
|
14
|
+
};
|
|
15
|
+
schedules: {
|
|
16
|
+
list: ScheduleItem[];
|
|
17
|
+
scheduleMap: Record<string, {
|
|
18
|
+
minTime: dayjs.Dayjs | null;
|
|
19
|
+
maxTime: dayjs.Dayjs | null;
|
|
20
|
+
minTimeStr: string | null;
|
|
21
|
+
maxTimeStr: string | null;
|
|
22
|
+
dateRange: {
|
|
23
|
+
start: string;
|
|
24
|
+
end: string;
|
|
25
|
+
}[];
|
|
26
|
+
dateRangeFormat: {
|
|
27
|
+
start: string;
|
|
28
|
+
end: string;
|
|
29
|
+
}[];
|
|
30
|
+
}>;
|
|
31
|
+
scheduleAllMap: Record<string, {
|
|
32
|
+
minTime: dayjs.Dayjs | null;
|
|
33
|
+
maxTime: dayjs.Dayjs | null;
|
|
34
|
+
minTimeStr: string | null;
|
|
35
|
+
maxTimeStr: string | null;
|
|
36
|
+
dateRange: {
|
|
37
|
+
start: string;
|
|
38
|
+
end: string;
|
|
39
|
+
}[];
|
|
40
|
+
dateRangeFormat: {
|
|
41
|
+
start: string;
|
|
42
|
+
end: string;
|
|
43
|
+
}[];
|
|
44
|
+
}>;
|
|
45
|
+
};
|
|
46
|
+
tabKey: "products" | "schedules" | "resources" | "openHours";
|
|
47
|
+
/** 当前日历选择天详情 */
|
|
48
|
+
currentSelectDayDetail?: {
|
|
49
|
+
scheduleIds: [];
|
|
50
|
+
date: "";
|
|
51
|
+
timeStr: string;
|
|
52
|
+
} | null;
|
|
53
|
+
/** 日历数据 */
|
|
54
|
+
calendar: {
|
|
55
|
+
isEdit: boolean;
|
|
56
|
+
allData: CalendarDataItem[];
|
|
57
|
+
editData?: CalendarDataItem[];
|
|
58
|
+
};
|
|
59
|
+
products: {
|
|
60
|
+
list: any[];
|
|
61
|
+
search: string;
|
|
62
|
+
currentProduct: null | any;
|
|
63
|
+
openProductDetailDrawer: boolean;
|
|
64
|
+
openAddSchedulesDrawer: boolean;
|
|
65
|
+
};
|
|
66
|
+
resources: {
|
|
67
|
+
cacheResource: null | any;
|
|
68
|
+
};
|
|
69
|
+
setGlobalState: Function | null;
|
|
70
|
+
}
|
|
71
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
72
|
+
state: FormState;
|
|
73
|
+
} & {
|
|
74
|
+
dispatch: (params: {
|
|
75
|
+
type: string;
|
|
76
|
+
payload: any;
|
|
77
|
+
}) => void;
|
|
78
|
+
}>;
|
|
@@ -0,0 +1,72 @@
|
|
|
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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
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); }
|
|
7
|
+
import { miniRedux } from "@pisell/utils";
|
|
8
|
+
var defaultState = {
|
|
9
|
+
data: {},
|
|
10
|
+
schedulesDetail: {
|
|
11
|
+
id: undefined,
|
|
12
|
+
show: false
|
|
13
|
+
},
|
|
14
|
+
currentSelectDayDetail: null,
|
|
15
|
+
tabKey: "products",
|
|
16
|
+
calendar: {
|
|
17
|
+
isEdit: false,
|
|
18
|
+
allData: [],
|
|
19
|
+
editData: []
|
|
20
|
+
},
|
|
21
|
+
schedules: {
|
|
22
|
+
list: [],
|
|
23
|
+
scheduleMap: {},
|
|
24
|
+
scheduleAllMap: {}
|
|
25
|
+
},
|
|
26
|
+
products: {
|
|
27
|
+
list: [],
|
|
28
|
+
search: "",
|
|
29
|
+
currentProduct: null,
|
|
30
|
+
openProductDetailDrawer: false,
|
|
31
|
+
openAddSchedulesDrawer: false
|
|
32
|
+
},
|
|
33
|
+
resources: {
|
|
34
|
+
cacheResource: null
|
|
35
|
+
},
|
|
36
|
+
setGlobalState: null
|
|
37
|
+
};
|
|
38
|
+
var _miniRedux = miniRedux({
|
|
39
|
+
namespace: "state",
|
|
40
|
+
state: defaultState,
|
|
41
|
+
reducers: {
|
|
42
|
+
setState: function setState(state, payload) {
|
|
43
|
+
return _objectSpread(_objectSpread({}, state), payload);
|
|
44
|
+
},
|
|
45
|
+
setGlobalState: function setGlobalState(state, payload) {
|
|
46
|
+
return _objectSpread(_objectSpread({}, state), payload);
|
|
47
|
+
},
|
|
48
|
+
setProducts: function setProducts(state, payload) {
|
|
49
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
50
|
+
products: _objectSpread(_objectSpread({}, state.products), payload)
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
setCalendar: function setCalendar(state, payload) {
|
|
54
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
55
|
+
calendar: _objectSpread(_objectSpread({}, state.calendar), payload)
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
setSchedules: function setSchedules(state, payload) {
|
|
59
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
60
|
+
schedules: _objectSpread(_objectSpread({}, state.schedules), payload)
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
setResources: function setResources(state, payload) {
|
|
64
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
65
|
+
resources: _objectSpread(_objectSpread({}, state.resources), payload)
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}),
|
|
70
|
+
Provider = _miniRedux.Provider,
|
|
71
|
+
Context = _miniRedux.Context;
|
|
72
|
+
export { Provider, Context };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useRequest } from "ahooks";
|
|
2
|
+
import React, { useEffect, useRef, useContext, useImperativeHandle } from "react";
|
|
3
|
+
import DetailContent from "../resources/detail/detailContent";
|
|
4
|
+
import { Context } from "../model";
|
|
5
|
+
import { getOpenHoursSchedule } from "./serve";
|
|
6
|
+
import "./index.less";
|
|
7
|
+
var OpenHours = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
8
|
+
var _useContext = useContext(Context),
|
|
9
|
+
state = _useContext.state;
|
|
10
|
+
var tabKey = state === null || state === void 0 ? void 0 : state.tabKey;
|
|
11
|
+
var detailContentRef = useRef(null);
|
|
12
|
+
var _getOpenHoursSchedule = useRequest(getOpenHoursSchedule, {
|
|
13
|
+
manual: true,
|
|
14
|
+
onSuccess: function onSuccess(result) {
|
|
15
|
+
var _detailContentRef$cur, _detailContentRef$cur2;
|
|
16
|
+
var data = (result === null || result === void 0 ? void 0 : result.data) || {};
|
|
17
|
+
detailContentRef === null || detailContentRef === void 0 ? void 0 : (_detailContentRef$cur = detailContentRef.current) === null || _detailContentRef$cur === void 0 ? void 0 : (_detailContentRef$cur2 = _detailContentRef$cur.setFieldsValue) === null || _detailContentRef$cur2 === void 0 ? void 0 : _detailContentRef$cur2.call(_detailContentRef$cur, data);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
useImperativeHandle(ref, function () {
|
|
21
|
+
return {
|
|
22
|
+
getIsEdit: function getIsEdit() {
|
|
23
|
+
return detailContentRef.current.getIsEdit();
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
useEffect(function () {
|
|
28
|
+
_getOpenHoursSchedule.run();
|
|
29
|
+
}, []);
|
|
30
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
31
|
+
className: "pisell-lowcode__schedules-component-openHours"
|
|
32
|
+
}, /*#__PURE__*/React.createElement(DetailContent, {
|
|
33
|
+
isAutoSetCalendarData: tabKey === "openHours",
|
|
34
|
+
tabKey: tabKey,
|
|
35
|
+
ref: detailContentRef,
|
|
36
|
+
loading: _getOpenHoursSchedule.loading,
|
|
37
|
+
drawerContainer: document.querySelector(".pisell-lowcode__schedules-component-openHours")
|
|
38
|
+
}));
|
|
39
|
+
});
|
|
40
|
+
export default OpenHours;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getOpenHoursSchedule: () => Promise<any>;
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
import { request } from "../utils";
|
|
6
|
+
export var getOpenHoursSchedule = /*#__PURE__*/function () {
|
|
7
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
8
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9
|
+
while (1) switch (_context.prev = _context.next) {
|
|
10
|
+
case 0:
|
|
11
|
+
_context.next = 2;
|
|
12
|
+
return request.getRequest().get("/shop/schedule/open-hours");
|
|
13
|
+
case 2:
|
|
14
|
+
return _context.abrupt("return", _context.sent);
|
|
15
|
+
case 3:
|
|
16
|
+
case "end":
|
|
17
|
+
return _context.stop();
|
|
18
|
+
}
|
|
19
|
+
}, _callee);
|
|
20
|
+
}));
|
|
21
|
+
return function getOpenHoursSchedule() {
|
|
22
|
+
return _ref.apply(this, arguments);
|
|
23
|
+
};
|
|
24
|
+
}();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
declare const MaxParticipantsModule: ({ form, value, onChange, useSchedule, isAutoChange, onData, }: {
|
|
4
|
+
form: any;
|
|
5
|
+
value?: any;
|
|
6
|
+
onChange?: any;
|
|
7
|
+
useSchedule?: any;
|
|
8
|
+
onData?: any;
|
|
9
|
+
isAutoChange: boolean;
|
|
10
|
+
}) => React.JSX.Element;
|
|
11
|
+
export default MaxParticipantsModule;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
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; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React from "react";
|
|
8
|
+
import useComponents from "../../../../../../hooks/useComponents";
|
|
9
|
+
import "./index.less";
|
|
10
|
+
import { locales } from "@pisell/utils";
|
|
11
|
+
var MaxParticipantsModule = function MaxParticipantsModule(_ref) {
|
|
12
|
+
var form = _ref.form,
|
|
13
|
+
value = _ref.value,
|
|
14
|
+
onChange = _ref.onChange,
|
|
15
|
+
useSchedule = _ref.useSchedule,
|
|
16
|
+
isAutoChange = _ref.isAutoChange,
|
|
17
|
+
onData = _ref.onData;
|
|
18
|
+
var _useComponents = useComponents({
|
|
19
|
+
components: ["MaxParticipantsCom"]
|
|
20
|
+
}),
|
|
21
|
+
_useComponents2 = _slicedToArray(_useComponents, 1),
|
|
22
|
+
MaxParticipantsCom = _useComponents2[0];
|
|
23
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
24
|
+
className: "product-detail-card-module"
|
|
25
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
className: "product-detail-card-title"
|
|
27
|
+
}, locales.getText("pisell2.text.schedules.max-participants")), MaxParticipantsCom && /*#__PURE__*/React.createElement(MaxParticipantsCom, {
|
|
28
|
+
scheduleIds: useSchedule || [],
|
|
29
|
+
value: value,
|
|
30
|
+
onChange: onChange,
|
|
31
|
+
componentType: "v1",
|
|
32
|
+
onData: onData,
|
|
33
|
+
isAutoChange: isAutoChange
|
|
34
|
+
}));
|
|
35
|
+
};
|
|
36
|
+
export default MaxParticipantsModule;
|
package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
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); }
|
|
7
|
+
import React, { useContext, useEffect } from "react";
|
|
8
|
+
import ResourceList from "../../../../components/ResourceList";
|
|
9
|
+
import { getResourcesByProductId } from "../../../serve";
|
|
10
|
+
import { useRequest } from "ahooks";
|
|
11
|
+
import { Context } from "../../../../model";
|
|
12
|
+
import { locales } from "@pisell/utils";
|
|
13
|
+
var ResourcesModule = function ResourcesModule(_ref) {
|
|
14
|
+
var product = _ref.product;
|
|
15
|
+
var _useContext = useContext(Context),
|
|
16
|
+
state = _useContext.state,
|
|
17
|
+
dispatch = _useContext.dispatch;
|
|
18
|
+
var _getResourcesByProductId = useRequest(getResourcesByProductId, {
|
|
19
|
+
manual: true
|
|
20
|
+
});
|
|
21
|
+
useEffect(function () {
|
|
22
|
+
if (product) {
|
|
23
|
+
console.log("product", product);
|
|
24
|
+
_getResourcesByProductId.run({
|
|
25
|
+
id: product.id
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}, [product]);
|
|
29
|
+
var goResource = function goResource(item) {
|
|
30
|
+
dispatch({
|
|
31
|
+
type: "setState",
|
|
32
|
+
payload: {
|
|
33
|
+
tabKey: "resources",
|
|
34
|
+
resources: _objectSpread(_objectSpread({}, state.resources), {}, {
|
|
35
|
+
cacheResource: item
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
className: "product-detail-card-module"
|
|
42
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
43
|
+
className: "product-detail-card-title"
|
|
44
|
+
}, locales.getText("pisell2.text.schedules.resources-title")), /*#__PURE__*/React.createElement(ResourceList, {
|
|
45
|
+
dataSource: _getResourcesByProductId.data || [],
|
|
46
|
+
loading: _getResourcesByProductId.loading,
|
|
47
|
+
onClick: goResource
|
|
48
|
+
}));
|
|
49
|
+
};
|
|
50
|
+
export default ResourcesModule;
|
|
File without changes
|
|
@@ -0,0 +1,85 @@
|
|
|
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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
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); }
|
|
7
|
+
import { locales } from "@pisell/utils";
|
|
8
|
+
import { useRequest } from "ahooks";
|
|
9
|
+
import { Button } from "antd";
|
|
10
|
+
import React, { useContext, useRef } from "react";
|
|
11
|
+
import CustomSelect from "../../../../../../booking/components/customSelect";
|
|
12
|
+
import { Context } from "../../../../../model";
|
|
13
|
+
import { getSchedules } from "../../../../serve";
|
|
14
|
+
import "./index.less";
|
|
15
|
+
var AddSchedules = function AddSchedules(_ref) {
|
|
16
|
+
var _state$schedules;
|
|
17
|
+
var value = _ref.value,
|
|
18
|
+
onChange = _ref.onChange,
|
|
19
|
+
drawerContainer = _ref.drawerContainer,
|
|
20
|
+
isSelf = _ref.isSelf;
|
|
21
|
+
var modalRef = useRef(null);
|
|
22
|
+
var _useContext = useContext(Context),
|
|
23
|
+
state = _useContext.state;
|
|
24
|
+
var _getScheduleList = useRequest(getSchedules, {
|
|
25
|
+
manual: true,
|
|
26
|
+
onSuccess: function onSuccess(res) {}
|
|
27
|
+
});
|
|
28
|
+
var onFinish = function onFinish(e) {
|
|
29
|
+
onChange(e);
|
|
30
|
+
};
|
|
31
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
32
|
+
ghost: true,
|
|
33
|
+
type: "primary",
|
|
34
|
+
className: "product-detail-card-module-add-button",
|
|
35
|
+
onClick: function onClick() {
|
|
36
|
+
var _modalRef$current;
|
|
37
|
+
(_modalRef$current = modalRef.current) === null || _modalRef$current === void 0 ? void 0 : _modalRef$current.open();
|
|
38
|
+
if (isSelf) {
|
|
39
|
+
_getScheduleList.run({
|
|
40
|
+
num: 999,
|
|
41
|
+
skip: 1
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}, locales.getText("pisell2.text.schedules.assign-schedule")), /*#__PURE__*/React.createElement(CustomSelect, {
|
|
46
|
+
ref: modalRef,
|
|
47
|
+
rowKey: "id",
|
|
48
|
+
options: isSelf ? _getScheduleList.data || [] : (state === null || state === void 0 ? void 0 : (_state$schedules = state.schedules) === null || _state$schedules === void 0 ? void 0 : _state$schedules.list) || [],
|
|
49
|
+
loading: _getScheduleList.loading,
|
|
50
|
+
value: value,
|
|
51
|
+
onValueChange: onFinish,
|
|
52
|
+
isPreview: false,
|
|
53
|
+
drawerProps: _objectSpread({
|
|
54
|
+
title: locales.getText("pisell2.text.schedules.assign-schedule"),
|
|
55
|
+
destroyOnClose: true,
|
|
56
|
+
width: 500,
|
|
57
|
+
getContainer: drawerContainer || document.querySelector(".pisell-lowcode__schedules-component-products") || document.body,
|
|
58
|
+
rootStyle: {
|
|
59
|
+
position: "absolute"
|
|
60
|
+
},
|
|
61
|
+
contentWrapperStyle: {
|
|
62
|
+
boxShadow: "none"
|
|
63
|
+
},
|
|
64
|
+
titleNoWrap: true
|
|
65
|
+
}, isSelf ? {
|
|
66
|
+
zIndex: 1000
|
|
67
|
+
} : {}),
|
|
68
|
+
mode: "multiple",
|
|
69
|
+
optionRender: function optionRender(item) {
|
|
70
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
71
|
+
className: "pisell-lowcode__add-schedule-list-item-color",
|
|
72
|
+
style: {
|
|
73
|
+
backgroundColor: item.color
|
|
74
|
+
}
|
|
75
|
+
}), item.name);
|
|
76
|
+
}
|
|
77
|
+
// onVirtualListScroll={onScroll}
|
|
78
|
+
// loadMore={loadMore}
|
|
79
|
+
,
|
|
80
|
+
filterItem: function filterItem(d, search) {
|
|
81
|
+
return d.name.toLowerCase().indexOf(search.toLowerCase()) !== -1;
|
|
82
|
+
}
|
|
83
|
+
}));
|
|
84
|
+
};
|
|
85
|
+
export default AddSchedules;
|