@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,30 @@
|
|
|
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
|
+
var RelationProduct = function RelationProduct(_ref) {
|
|
11
|
+
var value = _ref.value,
|
|
12
|
+
onChange = _ref.onChange;
|
|
13
|
+
var _useComponents = useComponents({
|
|
14
|
+
components: ["RelationProduct"]
|
|
15
|
+
}),
|
|
16
|
+
_useComponents2 = _slicedToArray(_useComponents, 1),
|
|
17
|
+
RelationProduct = _useComponents2[0];
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
className: "product-detail-card-module"
|
|
20
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
21
|
+
className: "product-detail-card-title"
|
|
22
|
+
}, "Products"), RelationProduct && /*#__PURE__*/React.createElement(RelationProduct, {
|
|
23
|
+
value: value,
|
|
24
|
+
onChange: onChange,
|
|
25
|
+
extraProps: {
|
|
26
|
+
paginationSimple: true
|
|
27
|
+
}
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
export default RelationProduct;
|
|
File without changes
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const getFormTypes: (params: any) => Promise<any>;
|
|
2
|
+
export declare const getRelationResource: (params: any, res?: any) => Promise<any>;
|
|
3
|
+
export declare const getResourceTypes: (params: any) => Promise<any>;
|
|
4
|
+
export declare const getResourceRelation: (params: any) => Promise<any>;
|
|
5
|
+
export declare const setResourceRelation: (params: any) => Promise<any>;
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
|
|
7
|
+
// 获取资源类型
|
|
8
|
+
export var getFormTypes = /*#__PURE__*/function () {
|
|
9
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
10
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11
|
+
while (1) switch (_context.prev = _context.next) {
|
|
12
|
+
case 0:
|
|
13
|
+
_context.next = 2;
|
|
14
|
+
return request.getRequest().get("/shop/form", params);
|
|
15
|
+
case 2:
|
|
16
|
+
return _context.abrupt("return", _context.sent);
|
|
17
|
+
case 3:
|
|
18
|
+
case "end":
|
|
19
|
+
return _context.stop();
|
|
20
|
+
}
|
|
21
|
+
}, _callee);
|
|
22
|
+
}));
|
|
23
|
+
return function getFormTypes(_x) {
|
|
24
|
+
return _ref.apply(this, arguments);
|
|
25
|
+
};
|
|
26
|
+
}();
|
|
27
|
+
|
|
28
|
+
// 查询绑定了日程的资源列表
|
|
29
|
+
export var getRelationResource = /*#__PURE__*/function () {
|
|
30
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params, res) {
|
|
31
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
32
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
33
|
+
case 0:
|
|
34
|
+
_context2.next = 2;
|
|
35
|
+
return request.getRequest().get("/shop/schedule/relation/resource", params);
|
|
36
|
+
case 2:
|
|
37
|
+
return _context2.abrupt("return", _context2.sent);
|
|
38
|
+
case 3:
|
|
39
|
+
case "end":
|
|
40
|
+
return _context2.stop();
|
|
41
|
+
}
|
|
42
|
+
}, _callee2);
|
|
43
|
+
}));
|
|
44
|
+
return function getRelationResource(_x2, _x3) {
|
|
45
|
+
return _ref2.apply(this, arguments);
|
|
46
|
+
};
|
|
47
|
+
}();
|
|
48
|
+
export var getResourceTypes = /*#__PURE__*/function () {
|
|
49
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
|
|
50
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
51
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
52
|
+
case 0:
|
|
53
|
+
_context3.next = 2;
|
|
54
|
+
return request.getRequest().get("/shop/schedule/resource-types", params);
|
|
55
|
+
case 2:
|
|
56
|
+
return _context3.abrupt("return", _context3.sent);
|
|
57
|
+
case 3:
|
|
58
|
+
case "end":
|
|
59
|
+
return _context3.stop();
|
|
60
|
+
}
|
|
61
|
+
}, _callee3);
|
|
62
|
+
}));
|
|
63
|
+
return function getResourceTypes(_x4) {
|
|
64
|
+
return _ref3.apply(this, arguments);
|
|
65
|
+
};
|
|
66
|
+
}();
|
|
67
|
+
export var getResourceRelation = /*#__PURE__*/function () {
|
|
68
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
|
|
69
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
70
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
71
|
+
case 0:
|
|
72
|
+
_context4.next = 2;
|
|
73
|
+
return request.getRequest().get("/shop/schedule/item/relation", params);
|
|
74
|
+
case 2:
|
|
75
|
+
return _context4.abrupt("return", _context4.sent);
|
|
76
|
+
case 3:
|
|
77
|
+
case "end":
|
|
78
|
+
return _context4.stop();
|
|
79
|
+
}
|
|
80
|
+
}, _callee4);
|
|
81
|
+
}));
|
|
82
|
+
return function getResourceRelation(_x5) {
|
|
83
|
+
return _ref4.apply(this, arguments);
|
|
84
|
+
};
|
|
85
|
+
}();
|
|
86
|
+
|
|
87
|
+
// 设置资源绑定的日程数据和最大参与人数
|
|
88
|
+
export var setResourceRelation = /*#__PURE__*/function () {
|
|
89
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
|
|
90
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
91
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
92
|
+
case 0:
|
|
93
|
+
_context5.next = 2;
|
|
94
|
+
return request.getRequest().post("/shop/schedule/item/relation", params);
|
|
95
|
+
case 2:
|
|
96
|
+
return _context5.abrupt("return", _context5.sent);
|
|
97
|
+
case 3:
|
|
98
|
+
case "end":
|
|
99
|
+
return _context5.stop();
|
|
100
|
+
}
|
|
101
|
+
}, _callee5);
|
|
102
|
+
}));
|
|
103
|
+
return function setResourceRelation(_x6) {
|
|
104
|
+
return _ref5.apply(this, arguments);
|
|
105
|
+
};
|
|
106
|
+
}();
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ScheduleItem } from "../../type";
|
|
3
|
+
import "./index.less";
|
|
4
|
+
declare type AllSchedulesPropsType = {
|
|
5
|
+
onOpenDetail?: (id?: number) => void;
|
|
6
|
+
dataSource: ScheduleItem[];
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* 所有schedules列表
|
|
11
|
+
* @param props
|
|
12
|
+
* @constructor
|
|
13
|
+
*/
|
|
14
|
+
declare const AllSchedules: (props: AllSchedulesPropsType) => React.JSX.Element;
|
|
15
|
+
export default AllSchedules;
|
|
@@ -0,0 +1,56 @@
|
|
|
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, { useMemo, useState } from "react";
|
|
8
|
+
import { Button } from "antd";
|
|
9
|
+
import Search from "../../components/Search";
|
|
10
|
+
import ScheduleList from "../../components/ScheduleList";
|
|
11
|
+
import "./index.less";
|
|
12
|
+
import { locales } from "@pisell/utils";
|
|
13
|
+
/**
|
|
14
|
+
* 所有schedules列表
|
|
15
|
+
* @param props
|
|
16
|
+
* @constructor
|
|
17
|
+
*/
|
|
18
|
+
var AllSchedules = function AllSchedules(props) {
|
|
19
|
+
var onOpenDetail = props.onOpenDetail,
|
|
20
|
+
dataSource = props.dataSource,
|
|
21
|
+
loading = props.loading;
|
|
22
|
+
var _useState = useState(""),
|
|
23
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
24
|
+
search = _useState2[0],
|
|
25
|
+
setSearch = _useState2[1];
|
|
26
|
+
var showDataSource = useMemo(function () {
|
|
27
|
+
return dataSource.filter(function (item) {
|
|
28
|
+
return item.name.toLowerCase().includes(search.toLowerCase());
|
|
29
|
+
});
|
|
30
|
+
}, [dataSource, search]);
|
|
31
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
className: "pisell-lowcode__schedules-module-content-wrap"
|
|
33
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
className: "pisell-lowcode__schedules-module-header"
|
|
35
|
+
}, /*#__PURE__*/React.createElement(Search, {
|
|
36
|
+
value: search,
|
|
37
|
+
onChange: setSearch
|
|
38
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
39
|
+
className: "pisell-lowcode__schedules-module-content"
|
|
40
|
+
}, /*#__PURE__*/React.createElement(ScheduleList, {
|
|
41
|
+
loading: loading,
|
|
42
|
+
dataSource: showDataSource,
|
|
43
|
+
onItemClick: function onItemClick(item) {
|
|
44
|
+
return onOpenDetail === null || onOpenDetail === void 0 ? void 0 : onOpenDetail(item.id);
|
|
45
|
+
}
|
|
46
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
47
|
+
className: "pisell-lowcode__schedules-module-add-button",
|
|
48
|
+
onClick: function onClick() {
|
|
49
|
+
return onOpenDetail === null || onOpenDetail === void 0 ? void 0 : onOpenDetail();
|
|
50
|
+
},
|
|
51
|
+
size: "large",
|
|
52
|
+
type: "primary",
|
|
53
|
+
ghost: true
|
|
54
|
+
}, locales.getText('pisell2.text.schedules.add'))));
|
|
55
|
+
};
|
|
56
|
+
export default AllSchedules;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.pisell-lowcode__schedules-module-content-wrap {
|
|
2
|
+
height: 100%;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
.pisell-lowcode__schedules-module-header {
|
|
6
|
+
padding: 16px 32px;
|
|
7
|
+
}
|
|
8
|
+
.pisell-lowcode__schedules-module-content {
|
|
9
|
+
padding: 20px 32px;
|
|
10
|
+
flex: 1;
|
|
11
|
+
overflow: auto;
|
|
12
|
+
}
|
|
13
|
+
.pisell-lowcode__schedules-module-add-button {
|
|
14
|
+
margin: 24px 32px;
|
|
15
|
+
width: 180px;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { DrawerProps } from "antd";
|
|
3
|
+
import { ScheduleItem } from "../../type";
|
|
4
|
+
import "./index.less";
|
|
5
|
+
declare type ScheduleDetailDrawerPropsType = {
|
|
6
|
+
open: boolean;
|
|
7
|
+
scheduleId?: number;
|
|
8
|
+
onClose?: (data?: ScheduleItem) => void;
|
|
9
|
+
getContainer?: DrawerProps["getContainer"];
|
|
10
|
+
onDelete?: (detail: ScheduleItem) => void;
|
|
11
|
+
type?: "standard" | "time-slots" | "designation";
|
|
12
|
+
onCalendarDataChange?: (data: any) => void;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* 日程详情抽屉
|
|
16
|
+
* @param props
|
|
17
|
+
* @constructor
|
|
18
|
+
*/
|
|
19
|
+
declare const ScheduleDetailDrawer: (props: ScheduleDetailDrawerPropsType) => React.JSX.Element;
|
|
20
|
+
export default ScheduleDetailDrawer;
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
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."); }
|
|
7
|
+
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); }
|
|
8
|
+
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; }
|
|
9
|
+
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; } }
|
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
import Delete_wght300_24px from "@pisell/icon/es/Delete_wght300_24px";
|
|
14
|
+
import { locales } from "@pisell/utils";
|
|
15
|
+
import { Button } from "antd";
|
|
16
|
+
import Drawer from "../../../booking/components/drawer";
|
|
17
|
+
import { calcCalendarDataBySchedule } from "../utils";
|
|
18
|
+
import useComponents from "../../../../hooks/useComponents";
|
|
19
|
+
import "./index.less";
|
|
20
|
+
import { useMemoizedFn } from "ahooks";
|
|
21
|
+
import { saveConfirm } from "../../utils";
|
|
22
|
+
/**
|
|
23
|
+
* 日程详情抽屉
|
|
24
|
+
* @param props
|
|
25
|
+
* @constructor
|
|
26
|
+
*/
|
|
27
|
+
var ScheduleDetailDrawer = function ScheduleDetailDrawer(props) {
|
|
28
|
+
var onClose = props.onClose,
|
|
29
|
+
open = props.open,
|
|
30
|
+
getContainer = props.getContainer,
|
|
31
|
+
onDelete = props.onDelete,
|
|
32
|
+
scheduleId = props.scheduleId,
|
|
33
|
+
type = props.type,
|
|
34
|
+
onCalendarDataChange = props.onCalendarDataChange;
|
|
35
|
+
var _useState = useState(""),
|
|
36
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
37
|
+
title = _useState2[0],
|
|
38
|
+
setTitle = _useState2[1];
|
|
39
|
+
var _useState3 = useState(false),
|
|
40
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
41
|
+
isEdit = _useState4[0],
|
|
42
|
+
setEdit = _useState4[1];
|
|
43
|
+
var _useState5 = useState(false),
|
|
44
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
45
|
+
AllCreateScheduleRefReady = _useState6[0],
|
|
46
|
+
setAllCreateScheduleRefReady = _useState6[1];
|
|
47
|
+
var AllCreateScheduleRef = useRef(null);
|
|
48
|
+
var _useComponents = useComponents({
|
|
49
|
+
components: ["AllCreateSchedule"]
|
|
50
|
+
}),
|
|
51
|
+
_useComponents2 = _slicedToArray(_useComponents, 1),
|
|
52
|
+
AllCreateSchedule = _useComponents2[0];
|
|
53
|
+
var edit = useMemoizedFn( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
54
|
+
var _AllCreateScheduleRef, _AllCreateScheduleRef2;
|
|
55
|
+
var _AllCreateScheduleRef3, formValues, depend;
|
|
56
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
57
|
+
while (1) switch (_context.prev = _context.next) {
|
|
58
|
+
case 0:
|
|
59
|
+
_context.next = 2;
|
|
60
|
+
return (_AllCreateScheduleRef = AllCreateScheduleRef.current) === null || _AllCreateScheduleRef === void 0 ? void 0 : (_AllCreateScheduleRef2 = _AllCreateScheduleRef.open) === null || _AllCreateScheduleRef2 === void 0 ? void 0 : _AllCreateScheduleRef2.call(_AllCreateScheduleRef, {
|
|
61
|
+
id: scheduleId
|
|
62
|
+
});
|
|
63
|
+
case 2:
|
|
64
|
+
_AllCreateScheduleRef3 = AllCreateScheduleRef.current.getCurrentSetting(), formValues = _AllCreateScheduleRef3.formValues, depend = _AllCreateScheduleRef3.depend;
|
|
65
|
+
handleValueChange({}, formValues, depend);
|
|
66
|
+
case 4:
|
|
67
|
+
case "end":
|
|
68
|
+
return _context.stop();
|
|
69
|
+
}
|
|
70
|
+
}, _callee);
|
|
71
|
+
})));
|
|
72
|
+
useEffect(function () {
|
|
73
|
+
if (open) {
|
|
74
|
+
if (scheduleId) {
|
|
75
|
+
edit();
|
|
76
|
+
} else {
|
|
77
|
+
var _AllCreateScheduleRef4, _AllCreateScheduleRef5;
|
|
78
|
+
(_AllCreateScheduleRef4 = AllCreateScheduleRef.current) === null || _AllCreateScheduleRef4 === void 0 ? void 0 : (_AllCreateScheduleRef5 = _AllCreateScheduleRef4.open) === null || _AllCreateScheduleRef5 === void 0 ? void 0 : _AllCreateScheduleRef5.call(_AllCreateScheduleRef4, {
|
|
79
|
+
type: type
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
} else {
|
|
83
|
+
setTitle("");
|
|
84
|
+
}
|
|
85
|
+
}, [open, scheduleId, edit, type]);
|
|
86
|
+
var handleValueChange = useMemoizedFn(function (changedValues, value, others) {
|
|
87
|
+
var _value$name, _value$name2;
|
|
88
|
+
if (AllCreateScheduleRefReady) {
|
|
89
|
+
setEdit(true);
|
|
90
|
+
}
|
|
91
|
+
setTitle(((_value$name = value.name) === null || _value$name === void 0 ? void 0 : _value$name[locales.locale]) || ((_value$name2 = value.name) === null || _value$name2 === void 0 ? void 0 : _value$name2["original"]));
|
|
92
|
+
var data = calcCalendarDataBySchedule(value, others, type || others.type);
|
|
93
|
+
onCalendarDataChange === null || onCalendarDataChange === void 0 ? void 0 : onCalendarDataChange(data);
|
|
94
|
+
});
|
|
95
|
+
var resetState = function resetState() {
|
|
96
|
+
setEdit(false);
|
|
97
|
+
setAllCreateScheduleRefReady(false);
|
|
98
|
+
};
|
|
99
|
+
var handleClose = /*#__PURE__*/function () {
|
|
100
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(data) {
|
|
101
|
+
var confirmed;
|
|
102
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
103
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
104
|
+
case 0:
|
|
105
|
+
if (!(isEdit && !data)) {
|
|
106
|
+
_context2.next = 6;
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
_context2.next = 3;
|
|
110
|
+
return saveConfirm();
|
|
111
|
+
case 3:
|
|
112
|
+
confirmed = _context2.sent;
|
|
113
|
+
if (confirmed) {
|
|
114
|
+
_context2.next = 6;
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
return _context2.abrupt("return");
|
|
118
|
+
case 6:
|
|
119
|
+
resetState();
|
|
120
|
+
onClose === null || onClose === void 0 ? void 0 : onClose(data);
|
|
121
|
+
case 8:
|
|
122
|
+
case "end":
|
|
123
|
+
return _context2.stop();
|
|
124
|
+
}
|
|
125
|
+
}, _callee2);
|
|
126
|
+
}));
|
|
127
|
+
return function handleClose(_x2) {
|
|
128
|
+
return _ref2.apply(this, arguments);
|
|
129
|
+
};
|
|
130
|
+
}();
|
|
131
|
+
var handleChangeResData = function handleChangeResData(data) {
|
|
132
|
+
handleClose(data);
|
|
133
|
+
};
|
|
134
|
+
return /*#__PURE__*/React.createElement(Drawer, {
|
|
135
|
+
width: "100%",
|
|
136
|
+
placement: "right",
|
|
137
|
+
closable: false,
|
|
138
|
+
titleNoWrap: true,
|
|
139
|
+
onClose: function onClose() {
|
|
140
|
+
handleClose();
|
|
141
|
+
},
|
|
142
|
+
open: open,
|
|
143
|
+
getContainer: getContainer !== null && getContainer !== void 0 ? getContainer : false,
|
|
144
|
+
title: title,
|
|
145
|
+
contentWrapperStyle: {
|
|
146
|
+
boxShadow: "none"
|
|
147
|
+
},
|
|
148
|
+
destroyOnClose: true
|
|
149
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
150
|
+
className: "pisell-lowcode__schedules-detail-wrap"
|
|
151
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
152
|
+
className: "pisell-lowcode__schedules-detail-content"
|
|
153
|
+
}, AllCreateSchedule && /*#__PURE__*/React.createElement(AllCreateSchedule, {
|
|
154
|
+
showMode: "content",
|
|
155
|
+
ref: AllCreateScheduleRef,
|
|
156
|
+
onSettingChange: handleValueChange,
|
|
157
|
+
onChange: handleChangeResData,
|
|
158
|
+
onData: function onData() {
|
|
159
|
+
setTimeout(function () {
|
|
160
|
+
setAllCreateScheduleRefReady(true);
|
|
161
|
+
}, 500);
|
|
162
|
+
}
|
|
163
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
164
|
+
className: "pisell-lowcode__schedules-detail-footer"
|
|
165
|
+
}, scheduleId && /*#__PURE__*/React.createElement("div", {
|
|
166
|
+
className: "pisell-lowcode__schedules-detail-footer-delete-wrap",
|
|
167
|
+
onClick: function onClick() {
|
|
168
|
+
var _AllCreateScheduleRef6;
|
|
169
|
+
return onDelete === null || onDelete === void 0 ? void 0 : onDelete((_AllCreateScheduleRef6 = AllCreateScheduleRef.current) === null || _AllCreateScheduleRef6 === void 0 ? void 0 : _AllCreateScheduleRef6.getCurrentDetail());
|
|
170
|
+
}
|
|
171
|
+
}, /*#__PURE__*/React.createElement(Delete_wght300_24px, {
|
|
172
|
+
className: "pisell-lowcode__schedules-detail-footer-delete-icon"
|
|
173
|
+
})), /*#__PURE__*/React.createElement(Button, {
|
|
174
|
+
type: "primary",
|
|
175
|
+
className: "pisell-lowcode__schedules-detail-footer-save",
|
|
176
|
+
onClick: function onClick() {
|
|
177
|
+
var _AllCreateScheduleRef7;
|
|
178
|
+
(_AllCreateScheduleRef7 = AllCreateScheduleRef.current) === null || _AllCreateScheduleRef7 === void 0 ? void 0 : _AllCreateScheduleRef7.submit();
|
|
179
|
+
},
|
|
180
|
+
disabled: !isEdit
|
|
181
|
+
}, locales.getText("pisell2.text.schedules.save")))));
|
|
182
|
+
};
|
|
183
|
+
export default ScheduleDetailDrawer;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.pisell-lowcode__schedules-detail-wrap {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
.pisell-lowcode__schedules-detail-content {
|
|
5
|
+
flex: 1;
|
|
6
|
+
overflow: auto;
|
|
7
|
+
}
|
|
8
|
+
.pisell-lowcode__schedules-detail-footer {
|
|
9
|
+
position: absolute;
|
|
10
|
+
right: 0;
|
|
11
|
+
bottom: 0;
|
|
12
|
+
left: 0;
|
|
13
|
+
display: flex;
|
|
14
|
+
width: 480px;
|
|
15
|
+
padding: 20px 32px;
|
|
16
|
+
gap: 12px;
|
|
17
|
+
border-top: 1px solid #E7E8E9;
|
|
18
|
+
background: var(--Base-White, #FFF);
|
|
19
|
+
&-delete-wrap {
|
|
20
|
+
height: 48px;
|
|
21
|
+
width: 48px;
|
|
22
|
+
border-radius: 8px;
|
|
23
|
+
border: 1px solid var(--gray-300, #D0D5DD);
|
|
24
|
+
background: var(--base-white, #FFF);
|
|
25
|
+
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
}
|
|
31
|
+
&-delete-icon {
|
|
32
|
+
color: #B42318;
|
|
33
|
+
font-size: 20px;
|
|
34
|
+
}
|
|
35
|
+
&-save {
|
|
36
|
+
flex: 1;
|
|
37
|
+
height: 48px;
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ScheduleItem } from "../type";
|
|
3
|
+
import { FormState } from "../model";
|
|
4
|
+
import "./index.less";
|
|
5
|
+
declare type SchedulesPropsType = {
|
|
6
|
+
/** all 以列表形式展示所有日程 forADay 展示日程及时间段 */
|
|
7
|
+
type: "all" | "forADay";
|
|
8
|
+
detail: {
|
|
9
|
+
id?: number;
|
|
10
|
+
show: boolean;
|
|
11
|
+
type?: "standard" | "time-slots" | "designation";
|
|
12
|
+
};
|
|
13
|
+
onClose?: (data?: ScheduleItem) => void;
|
|
14
|
+
onDelete?: (detail: ScheduleItem) => void;
|
|
15
|
+
onOpenDetail?: (id?: number) => void;
|
|
16
|
+
onCalendarDataChange?: (value?: any) => void;
|
|
17
|
+
dataSource: ScheduleItem[];
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
currentSelectDayDetail: FormState["currentSelectDayDetail"];
|
|
20
|
+
onCloseDay: () => void;
|
|
21
|
+
schedulesForDaySlot?: React.ReactNode;
|
|
22
|
+
scheduleMap: Record<string, any>;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* 日程tab项
|
|
26
|
+
* @param props
|
|
27
|
+
* @constructor
|
|
28
|
+
*/
|
|
29
|
+
declare const Schedules: (props: SchedulesPropsType) => React.JSX.Element;
|
|
30
|
+
export default Schedules;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
|
+
import AllSchedules from "./AllSchedules";
|
|
3
|
+
import SchedulesForDay from "./SchedulesForDay";
|
|
4
|
+
import ScheduleDetailDrawer from "./ScheduleDetailDrawer";
|
|
5
|
+
import "./index.less";
|
|
6
|
+
/**
|
|
7
|
+
* 日程tab项
|
|
8
|
+
* @param props
|
|
9
|
+
* @constructor
|
|
10
|
+
*/
|
|
11
|
+
var Schedules = function Schedules(props) {
|
|
12
|
+
var type = props.type,
|
|
13
|
+
detail = props.detail,
|
|
14
|
+
onClose = props.onClose,
|
|
15
|
+
onOpenDetail = props.onOpenDetail,
|
|
16
|
+
dataSource = props.dataSource,
|
|
17
|
+
loading = props.loading,
|
|
18
|
+
onCalendarDataChange = props.onCalendarDataChange,
|
|
19
|
+
onDelete = props.onDelete,
|
|
20
|
+
currentSelectDayDetail = props.currentSelectDayDetail,
|
|
21
|
+
onCloseDay = props.onCloseDay,
|
|
22
|
+
schedulesForDaySlot = props.schedulesForDaySlot,
|
|
23
|
+
scheduleMap = props.scheduleMap;
|
|
24
|
+
var id = detail.id,
|
|
25
|
+
show = detail.show,
|
|
26
|
+
createType = detail.type;
|
|
27
|
+
var content = useMemo(function () {
|
|
28
|
+
if (type === "all") {
|
|
29
|
+
return /*#__PURE__*/React.createElement(AllSchedules, {
|
|
30
|
+
onOpenDetail: onOpenDetail,
|
|
31
|
+
dataSource: dataSource,
|
|
32
|
+
loading: loading
|
|
33
|
+
});
|
|
34
|
+
} else if (type === "forADay") {
|
|
35
|
+
return /*#__PURE__*/React.createElement(SchedulesForDay, {
|
|
36
|
+
onOpenDetail: onOpenDetail,
|
|
37
|
+
dataSource: dataSource,
|
|
38
|
+
loading: loading,
|
|
39
|
+
currentSelectDayDetail: currentSelectDayDetail,
|
|
40
|
+
onCloseDay: onCloseDay,
|
|
41
|
+
slot: schedulesForDaySlot,
|
|
42
|
+
scheduleMap: scheduleMap
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return null;
|
|
46
|
+
}, [type, dataSource, loading, currentSelectDayDetail, schedulesForDaySlot, scheduleMap]);
|
|
47
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, content, /*#__PURE__*/React.createElement(ScheduleDetailDrawer, {
|
|
48
|
+
type: createType,
|
|
49
|
+
scheduleId: id,
|
|
50
|
+
open: show,
|
|
51
|
+
onClose: onClose,
|
|
52
|
+
onDelete: onDelete,
|
|
53
|
+
onCalendarDataChange: onCalendarDataChange
|
|
54
|
+
}));
|
|
55
|
+
};
|
|
56
|
+
export default Schedules;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ScheduleItem } from "../../type";
|
|
3
|
+
import { FormState } from "../../model";
|
|
4
|
+
declare type SchedulesForDayPropsType = {
|
|
5
|
+
onOpenDetail?: (id?: number) => void;
|
|
6
|
+
slot?: React.ReactNode;
|
|
7
|
+
dataSource: ScheduleItem[];
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
currentSelectDayDetail: FormState["currentSelectDayDetail"];
|
|
10
|
+
onCloseDay: () => void;
|
|
11
|
+
scheduleMap: Record<string, any>;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* 日程数据以天为单位展示
|
|
15
|
+
* @param props
|
|
16
|
+
* @constructor
|
|
17
|
+
*/
|
|
18
|
+
declare const SchedulesForDay: (props: SchedulesForDayPropsType) => React.JSX.Element;
|
|
19
|
+
export default SchedulesForDay;
|