@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,158 @@
|
|
|
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 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; }
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
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); }
|
|
8
|
+
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); } }
|
|
9
|
+
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); }); }; }
|
|
10
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
|
+
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."); }
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
14
|
+
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; } }
|
|
15
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
+
import { useRequest } from "ahooks";
|
|
17
|
+
import React, { forwardRef, useContext, useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
18
|
+
import Drawer from "../../../booking/components/drawer";
|
|
19
|
+
import { Context } from "../../model";
|
|
20
|
+
import { getResourceRelation } from "../serve";
|
|
21
|
+
import DetailContent from "./detailContent";
|
|
22
|
+
import "./index.less";
|
|
23
|
+
import { saveConfirm } from "../../utils";
|
|
24
|
+
var ResourcesDetail = function ResourcesDetail(props, refs) {
|
|
25
|
+
var onSuccess = props.onSuccess;
|
|
26
|
+
var _useContext = useContext(Context),
|
|
27
|
+
state = _useContext.state,
|
|
28
|
+
dispatch = _useContext.dispatch;
|
|
29
|
+
var resources = state.resources;
|
|
30
|
+
var cacheResource = resources === null || resources === void 0 ? void 0 : resources.cacheResource;
|
|
31
|
+
var tabKey = state === null || state === void 0 ? void 0 : state.tabKey;
|
|
32
|
+
var detailContentRef = useRef(null);
|
|
33
|
+
var _useState = useState(false),
|
|
34
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
35
|
+
open = _useState2[0],
|
|
36
|
+
setOpen = _useState2[1];
|
|
37
|
+
var _useState3 = useState({}),
|
|
38
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
39
|
+
currentResource = _useState4[0],
|
|
40
|
+
setCurrentResource = _useState4[1];
|
|
41
|
+
var _useState5 = useState({}),
|
|
42
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
43
|
+
detail = _useState6[0],
|
|
44
|
+
setDetail = _useState6[1];
|
|
45
|
+
var _onClose = /*#__PURE__*/function () {
|
|
46
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(isSuccess) {
|
|
47
|
+
var confirmed;
|
|
48
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
49
|
+
while (1) switch (_context.prev = _context.next) {
|
|
50
|
+
case 0:
|
|
51
|
+
if (isSuccess) {
|
|
52
|
+
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(isSuccess);
|
|
53
|
+
}
|
|
54
|
+
if (!(!isSuccess && detailContentRef.current.getIsEdit())) {
|
|
55
|
+
_context.next = 7;
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
_context.next = 4;
|
|
59
|
+
return saveConfirm();
|
|
60
|
+
case 4:
|
|
61
|
+
confirmed = _context.sent;
|
|
62
|
+
if (confirmed) {
|
|
63
|
+
_context.next = 7;
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
return _context.abrupt("return");
|
|
67
|
+
case 7:
|
|
68
|
+
setOpen(false);
|
|
69
|
+
if (cacheResource) {
|
|
70
|
+
dispatch({
|
|
71
|
+
type: "setState",
|
|
72
|
+
payload: {
|
|
73
|
+
tabKey: "products",
|
|
74
|
+
resources: _objectSpread(_objectSpread({}, state.resources), {}, {
|
|
75
|
+
cacheResource: null
|
|
76
|
+
})
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
case 9:
|
|
81
|
+
case "end":
|
|
82
|
+
return _context.stop();
|
|
83
|
+
}
|
|
84
|
+
}, _callee);
|
|
85
|
+
}));
|
|
86
|
+
return function onClose(_x2) {
|
|
87
|
+
return _ref.apply(this, arguments);
|
|
88
|
+
};
|
|
89
|
+
}();
|
|
90
|
+
useEffect(function () {
|
|
91
|
+
if (tabKey !== "resources" && tabKey !== "openHours" || tabKey === "resources" && !open) {
|
|
92
|
+
dispatch({
|
|
93
|
+
type: "setCalendar",
|
|
94
|
+
payload: {
|
|
95
|
+
isEdit: false
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}, [tabKey, open]);
|
|
100
|
+
var onOpen = function onOpen() {
|
|
101
|
+
setOpen(true);
|
|
102
|
+
};
|
|
103
|
+
var _getResourceRelation = useRequest(getResourceRelation, {
|
|
104
|
+
manual: true,
|
|
105
|
+
onSuccess: function onSuccess(res) {
|
|
106
|
+
var _detailContentRef$cur, _detailContentRef$cur2;
|
|
107
|
+
var data = (res === null || res === void 0 ? void 0 : res.data) || {};
|
|
108
|
+
setDetail(data);
|
|
109
|
+
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);
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
useImperativeHandle(refs, function () {
|
|
113
|
+
return {
|
|
114
|
+
open: function open(item) {
|
|
115
|
+
onOpen();
|
|
116
|
+
setCurrentResource(item);
|
|
117
|
+
_getResourceRelation.run({
|
|
118
|
+
item_id: item.id,
|
|
119
|
+
item_type: "form"
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
});
|
|
124
|
+
return /*#__PURE__*/React.createElement(Drawer, {
|
|
125
|
+
width: "100%",
|
|
126
|
+
placement: "right",
|
|
127
|
+
open: open,
|
|
128
|
+
getContainer: document.querySelector(".pisell-lowcode__schedules-component-resources") || document.body,
|
|
129
|
+
titleNoWrap: true,
|
|
130
|
+
headerStyle: {
|
|
131
|
+
display: "none"
|
|
132
|
+
},
|
|
133
|
+
onClose: function onClose() {
|
|
134
|
+
_onClose(false);
|
|
135
|
+
},
|
|
136
|
+
bodyStyle: {
|
|
137
|
+
padding: 0
|
|
138
|
+
},
|
|
139
|
+
title: currentResource === null || currentResource === void 0 ? void 0 : currentResource.title,
|
|
140
|
+
rootStyle: {
|
|
141
|
+
position: "absolute"
|
|
142
|
+
},
|
|
143
|
+
contentWrapperStyle: {
|
|
144
|
+
boxShadow: "none"
|
|
145
|
+
},
|
|
146
|
+
destroyOnClose: true
|
|
147
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
148
|
+
className: "pisell-lowcode__schedules-component-resources-detail"
|
|
149
|
+
}, /*#__PURE__*/React.createElement(DetailContent, {
|
|
150
|
+
tabKey: tabKey,
|
|
151
|
+
isAutoSetCalendarData: tabKey === "resources" && open,
|
|
152
|
+
ref: detailContentRef,
|
|
153
|
+
loading: _getResourceRelation.loading,
|
|
154
|
+
onClose: _onClose,
|
|
155
|
+
drawerContainer: document.querySelector(".pisell-lowcode__schedules-component-resources")
|
|
156
|
+
})));
|
|
157
|
+
};
|
|
158
|
+
export default /*#__PURE__*/forwardRef(ResourcesDetail);
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
.pisell-lowcode__schedules-component-resources-detail {
|
|
2
|
+
.resources-detail-head {
|
|
3
|
+
padding: 18px 24px;
|
|
4
|
+
border-bottom: 1px solid #e2e8f0;
|
|
5
|
+
position: sticky;
|
|
6
|
+
top: 0;
|
|
7
|
+
.resources-detail-crumb {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
margin-bottom: 8px;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
.crumb-back {
|
|
13
|
+
font-size: 20px;
|
|
14
|
+
color: #d9d9d9;
|
|
15
|
+
margin-right: 8px;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
}
|
|
18
|
+
.crumb-title {
|
|
19
|
+
color: #d9d9d9;
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
font-style: normal;
|
|
22
|
+
font-weight: 400;
|
|
23
|
+
line-height: 22px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
.resources-title {
|
|
27
|
+
color: #1b1b1b;
|
|
28
|
+
font-size: 16px;
|
|
29
|
+
font-style: normal;
|
|
30
|
+
font-weight: 600;
|
|
31
|
+
line-height: 22px;
|
|
32
|
+
margin-left: 2px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.resources-detail-card {
|
|
37
|
+
padding: 20px 24px;
|
|
38
|
+
padding-bottom: 50px;
|
|
39
|
+
.card-title {
|
|
40
|
+
color: #1b1b1b;
|
|
41
|
+
font-size: 16px;
|
|
42
|
+
font-style: normal;
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
line-height: 22px;
|
|
45
|
+
margin-bottom: 16px;
|
|
46
|
+
}
|
|
47
|
+
.schedules-type-list {
|
|
48
|
+
padding: 0 0 27px 0;
|
|
49
|
+
.schedules-type-item {
|
|
50
|
+
padding: 10px 0 8px 0;
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: space-between;
|
|
54
|
+
border-bottom: 1px solid #E2E8F0;
|
|
55
|
+
.dot {
|
|
56
|
+
width: 8px;
|
|
57
|
+
height: 8px;
|
|
58
|
+
border-radius: 50%;
|
|
59
|
+
display: inline-block;
|
|
60
|
+
}
|
|
61
|
+
.name {
|
|
62
|
+
color: #1C1F23;
|
|
63
|
+
font-size: 14px;
|
|
64
|
+
font-style: normal;
|
|
65
|
+
font-weight: 600;
|
|
66
|
+
line-height: 20px;
|
|
67
|
+
margin-left: 12px;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
.pisell-lowcode__resourcesadd-assign-btn {
|
|
72
|
+
width: 170px;
|
|
73
|
+
height: 48px;
|
|
74
|
+
font-size: 16px;
|
|
75
|
+
}
|
|
76
|
+
.products-type {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
.ant-radio-wrapper {
|
|
80
|
+
margin-bottom: 12px;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
.products-header {
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
justify-content: space-between;
|
|
87
|
+
margin-top: 12px;
|
|
88
|
+
.browse {
|
|
89
|
+
height: 44px;
|
|
90
|
+
margin-left: 12px;
|
|
91
|
+
width: 60px;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.product-info {
|
|
96
|
+
display: flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
.product-name {
|
|
99
|
+
margin-left: 20px;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
.product-del {
|
|
103
|
+
font-size: 20px;
|
|
104
|
+
cursor: pointer;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.pisell-lowcode__schedules-component-resources-detail-footer {
|
|
110
|
+
display: flex;
|
|
111
|
+
justify-content: space-between;
|
|
112
|
+
align-items: center;
|
|
113
|
+
position: absolute;
|
|
114
|
+
padding: 8px 16px;
|
|
115
|
+
border-top: 1px solid rgba(22, 44, 88, 0.09);
|
|
116
|
+
bottom: 0;
|
|
117
|
+
width: 100%;
|
|
118
|
+
left: 0;
|
|
119
|
+
background-color: #ffffff;
|
|
120
|
+
.footer-btn {
|
|
121
|
+
flex: 1;
|
|
122
|
+
&.cancel-btn {
|
|
123
|
+
margin-right: 12px;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
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
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
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."); }
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
11
|
+
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; } }
|
|
12
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
+
import { useRequest } from "ahooks";
|
|
14
|
+
import { Collapse, Empty, Skeleton } from "antd";
|
|
15
|
+
import React, { useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
16
|
+
import CurrentDay from "../components/CurrentDay";
|
|
17
|
+
import Search from "../components/Search";
|
|
18
|
+
import { Context } from "../model";
|
|
19
|
+
import ResourcesAdd from "./add";
|
|
20
|
+
import ResourcesDetail from "./detail";
|
|
21
|
+
import "./index.less";
|
|
22
|
+
import List from "./list";
|
|
23
|
+
import { getFormTypes, getRelationResource } from "./serve";
|
|
24
|
+
import { locales } from "@pisell/utils";
|
|
25
|
+
var Resources = function Resources() {
|
|
26
|
+
var _useContext = useContext(Context),
|
|
27
|
+
state = _useContext.state,
|
|
28
|
+
dispatch = _useContext.dispatch;
|
|
29
|
+
var currentSelectDayDetail = state.currentSelectDayDetail,
|
|
30
|
+
resources = state.resources,
|
|
31
|
+
tabKey = state.tabKey;
|
|
32
|
+
var cacheResource = resources === null || resources === void 0 ? void 0 : resources.cacheResource;
|
|
33
|
+
var resourcesAddRef = useRef();
|
|
34
|
+
var resourcesDetailRef = useRef();
|
|
35
|
+
var _useState = useState(""),
|
|
36
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
37
|
+
seachText = _useState2[0],
|
|
38
|
+
setSearchText = _useState2[1];
|
|
39
|
+
var _useState3 = useState([]),
|
|
40
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
41
|
+
activeKey = _useState4[0],
|
|
42
|
+
setActiveKey = _useState4[1];
|
|
43
|
+
var _useState5 = useState([]),
|
|
44
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
45
|
+
formTypes = _useState6[0],
|
|
46
|
+
setFormTypes = _useState6[1];
|
|
47
|
+
var _useState7 = useState([]),
|
|
48
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
49
|
+
relationResource = _useState8[0],
|
|
50
|
+
setRelationResource = _useState8[1];
|
|
51
|
+
var searchChange = function searchChange(e) {
|
|
52
|
+
setSearchText(e);
|
|
53
|
+
};
|
|
54
|
+
var _getFormTypes = useRequest(getFormTypes, {
|
|
55
|
+
manual: true,
|
|
56
|
+
onSuccess: function onSuccess(result) {
|
|
57
|
+
var _result$data;
|
|
58
|
+
var list = (result === null || result === void 0 ? void 0 : (_result$data = result.data) === null || _result$data === void 0 ? void 0 : _result$data.list) || [];
|
|
59
|
+
setFormTypes(list);
|
|
60
|
+
setActiveKey(list.map(function (item) {
|
|
61
|
+
return item.id;
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
var _getRelationResource = useRequest(getRelationResource, {
|
|
66
|
+
manual: true,
|
|
67
|
+
onSuccess: function onSuccess(result, params) {
|
|
68
|
+
var _result$data2;
|
|
69
|
+
var list = (result === null || result === void 0 ? void 0 : (_result$data2 = result.data) === null || _result$data2 === void 0 ? void 0 : _result$data2.list) || [];
|
|
70
|
+
// 解决新增数据时立即刷新,列表新增数据无title问题
|
|
71
|
+
// if (params?.[1]) {
|
|
72
|
+
// const form_record_id = params?.[1]?.res?.form_record_id;
|
|
73
|
+
// const form_data = params?.[1]?.params?.form_data || [];
|
|
74
|
+
// const index = list.findIndex((item: any) => item.id === form_record_id);
|
|
75
|
+
// if (index > -1) {
|
|
76
|
+
// const room_name = form_data?.find(
|
|
77
|
+
// (item: any) => item.key === "room_name"
|
|
78
|
+
// )?.value;
|
|
79
|
+
// if (!list[index].title) {
|
|
80
|
+
// list[index].title = room_name;
|
|
81
|
+
// }
|
|
82
|
+
// }
|
|
83
|
+
// }
|
|
84
|
+
setRelationResource(list);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
var init = function init(params) {
|
|
88
|
+
_getRelationResource.run({
|
|
89
|
+
skip: 1,
|
|
90
|
+
num: 500,
|
|
91
|
+
schedule_ids: currentSelectDayDetail ? currentSelectDayDetail.scheduleIds || [] : undefined,
|
|
92
|
+
exclude_form_code: ["opening_hours"]
|
|
93
|
+
}, params || null);
|
|
94
|
+
};
|
|
95
|
+
useEffect(function () {
|
|
96
|
+
_getFormTypes.run({
|
|
97
|
+
type: "manual",
|
|
98
|
+
num: 500,
|
|
99
|
+
skip: 1
|
|
100
|
+
});
|
|
101
|
+
}, []);
|
|
102
|
+
useEffect(function () {
|
|
103
|
+
init();
|
|
104
|
+
}, [currentSelectDayDetail === null || currentSelectDayDetail === void 0 ? void 0 : currentSelectDayDetail.scheduleIds]);
|
|
105
|
+
useEffect(function () {
|
|
106
|
+
if (cacheResource) {
|
|
107
|
+
var _resourcesDetailRef$c, _resourcesDetailRef$c2;
|
|
108
|
+
(_resourcesDetailRef$c = resourcesDetailRef.current) === null || _resourcesDetailRef$c === void 0 ? void 0 : (_resourcesDetailRef$c2 = _resourcesDetailRef$c.open) === null || _resourcesDetailRef$c2 === void 0 ? void 0 : _resourcesDetailRef$c2.call(_resourcesDetailRef$c, cacheResource);
|
|
109
|
+
// 滚动到 id 对应的位置
|
|
110
|
+
setTimeout(function () {
|
|
111
|
+
var _el$scrollIntoView;
|
|
112
|
+
var el = document.getElementById("".concat(cacheResource.id));
|
|
113
|
+
console.log("el", el);
|
|
114
|
+
el === null || el === void 0 ? void 0 : (_el$scrollIntoView = el.scrollIntoView) === null || _el$scrollIntoView === void 0 ? void 0 : _el$scrollIntoView.call(el, true);
|
|
115
|
+
}, 100);
|
|
116
|
+
}
|
|
117
|
+
}, [cacheResource]);
|
|
118
|
+
var items = useMemo(function () {
|
|
119
|
+
var _relationResource = relationResource.filter(function (item) {
|
|
120
|
+
var _item$title, _item$title$includes;
|
|
121
|
+
return (_item$title = item.title) === null || _item$title === void 0 ? void 0 : (_item$title$includes = _item$title.includes) === null || _item$title$includes === void 0 ? void 0 : _item$title$includes.call(_item$title, seachText);
|
|
122
|
+
});
|
|
123
|
+
var _allData = formTypes.reduce(function (arr, item) {
|
|
124
|
+
var currentResource = _relationResource.filter(function (relation) {
|
|
125
|
+
return relation.form_id === item.id;
|
|
126
|
+
});
|
|
127
|
+
if (currentResource.length > 0) {
|
|
128
|
+
arr.push(_objectSpread({
|
|
129
|
+
label: item.title,
|
|
130
|
+
key: item.id,
|
|
131
|
+
children: currentResource
|
|
132
|
+
}, item));
|
|
133
|
+
}
|
|
134
|
+
return arr;
|
|
135
|
+
}, []);
|
|
136
|
+
return _allData.map(function (item) {
|
|
137
|
+
var resources = item.children || [];
|
|
138
|
+
return {
|
|
139
|
+
label: item.title,
|
|
140
|
+
key: item.id,
|
|
141
|
+
children: /*#__PURE__*/React.createElement(List, {
|
|
142
|
+
list: resources.map(function (resource) {
|
|
143
|
+
return {
|
|
144
|
+
id: resource.id,
|
|
145
|
+
title: resource.title
|
|
146
|
+
};
|
|
147
|
+
}),
|
|
148
|
+
addClick: function addClick() {
|
|
149
|
+
var _resourcesAddRef$curr, _resourcesAddRef$curr2;
|
|
150
|
+
(_resourcesAddRef$curr = resourcesAddRef.current) === null || _resourcesAddRef$curr === void 0 ? void 0 : (_resourcesAddRef$curr2 = _resourcesAddRef$curr.open) === null || _resourcesAddRef$curr2 === void 0 ? void 0 : _resourcesAddRef$curr2.call(_resourcesAddRef$curr, item.id);
|
|
151
|
+
},
|
|
152
|
+
itemClick: function itemClick(resource) {
|
|
153
|
+
var _resourcesDetailRef$c3, _resourcesDetailRef$c4;
|
|
154
|
+
(_resourcesDetailRef$c3 = resourcesDetailRef.current) === null || _resourcesDetailRef$c3 === void 0 ? void 0 : (_resourcesDetailRef$c4 = _resourcesDetailRef$c3.open) === null || _resourcesDetailRef$c4 === void 0 ? void 0 : _resourcesDetailRef$c4.call(_resourcesDetailRef$c3, resource);
|
|
155
|
+
}
|
|
156
|
+
})
|
|
157
|
+
};
|
|
158
|
+
});
|
|
159
|
+
}, [formTypes, seachText, relationResource]);
|
|
160
|
+
var handleClose = function handleClose() {
|
|
161
|
+
dispatch({
|
|
162
|
+
type: "setState",
|
|
163
|
+
payload: {
|
|
164
|
+
currentSelectDayDetail: null
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
169
|
+
className: "pisell-lowcode__schedules-component-resources"
|
|
170
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
171
|
+
style: {
|
|
172
|
+
padding: "0 32px"
|
|
173
|
+
}
|
|
174
|
+
}, /*#__PURE__*/React.createElement(CurrentDay, {
|
|
175
|
+
onClose: handleClose,
|
|
176
|
+
currentDay: currentSelectDayDetail === null || currentSelectDayDetail === void 0 ? void 0 : currentSelectDayDetail.date
|
|
177
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
178
|
+
className: "resources-header"
|
|
179
|
+
}, /*#__PURE__*/React.createElement(Search, {
|
|
180
|
+
value: seachText,
|
|
181
|
+
onChange: searchChange
|
|
182
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
183
|
+
className: "resources-list"
|
|
184
|
+
}, /*#__PURE__*/React.createElement(Skeleton, {
|
|
185
|
+
loading: _getRelationResource.loading,
|
|
186
|
+
style: {
|
|
187
|
+
marginTop: 12
|
|
188
|
+
}
|
|
189
|
+
}, items.length ? /*#__PURE__*/React.createElement(Collapse, {
|
|
190
|
+
activeKey: activeKey,
|
|
191
|
+
ghost: true,
|
|
192
|
+
items: items,
|
|
193
|
+
expandIconPosition: "end",
|
|
194
|
+
onChange: function onChange(key) {
|
|
195
|
+
setActiveKey(key);
|
|
196
|
+
}
|
|
197
|
+
}) : /*#__PURE__*/React.createElement(Empty, {
|
|
198
|
+
image: Empty.PRESENTED_IMAGE_SIMPLE,
|
|
199
|
+
description: locales.getText("pisell2.text.products.no-resources")
|
|
200
|
+
})))), /*#__PURE__*/React.createElement(ResourcesAdd, {
|
|
201
|
+
ref: resourcesAddRef,
|
|
202
|
+
onSuccess: init
|
|
203
|
+
}), /*#__PURE__*/React.createElement(ResourcesDetail, {
|
|
204
|
+
tabKey: tabKey,
|
|
205
|
+
ref: resourcesDetailRef,
|
|
206
|
+
onSuccess: function onSuccess(e) {
|
|
207
|
+
if (e) {
|
|
208
|
+
init();
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}));
|
|
212
|
+
};
|
|
213
|
+
export default Resources;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
.pisell-lowcode__schedules-component-resources {
|
|
2
|
+
height: 100%;
|
|
3
|
+
overflow-y: auto;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
padding: 0 !important;
|
|
7
|
+
.resources-title {
|
|
8
|
+
color: #000000;
|
|
9
|
+
font-size: 30px;
|
|
10
|
+
font-style: normal;
|
|
11
|
+
font-weight: 500;
|
|
12
|
+
line-height: 38px;
|
|
13
|
+
margin-bottom: 24px;
|
|
14
|
+
}
|
|
15
|
+
.resources-header {
|
|
16
|
+
width: 100%;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: space-between;
|
|
20
|
+
padding: 16px 32px;
|
|
21
|
+
.resources-filter-icon {
|
|
22
|
+
font-size: 25px;
|
|
23
|
+
margin-left: 20px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.resources-list {
|
|
28
|
+
padding: 0 32px;
|
|
29
|
+
overflow-y: auto;
|
|
30
|
+
flex: 1;
|
|
31
|
+
.ant-collapse-item {
|
|
32
|
+
padding: 20px 0;
|
|
33
|
+
}
|
|
34
|
+
.ant-collapse-header {
|
|
35
|
+
padding: 0;
|
|
36
|
+
.ant-collapse-header-text {
|
|
37
|
+
color: #1b1b1b;
|
|
38
|
+
font-size: 18px;
|
|
39
|
+
font-style: normal;
|
|
40
|
+
font-weight: 500;
|
|
41
|
+
line-height: 24px;
|
|
42
|
+
}
|
|
43
|
+
.ant-collapse-arrow {
|
|
44
|
+
font-size: 16px;
|
|
45
|
+
color: #000000;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
.ant-collapse-content-box {
|
|
49
|
+
padding: 0;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
declare type ResourcesListProps = {
|
|
4
|
+
list: any;
|
|
5
|
+
itemClick?: (item: any) => void;
|
|
6
|
+
addClick?: () => void;
|
|
7
|
+
};
|
|
8
|
+
declare const ResourcesList: (props: ResourcesListProps) => React.JSX.Element;
|
|
9
|
+
export default ResourcesList;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Button } from "antd";
|
|
3
|
+
import { locales } from "@pisell/utils";
|
|
4
|
+
import "./index.less";
|
|
5
|
+
var ResourcesList = function ResourcesList(props) {
|
|
6
|
+
var list = props.list,
|
|
7
|
+
itemClick = props.itemClick,
|
|
8
|
+
addClick = props.addClick;
|
|
9
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
10
|
+
className: "pisell-lowcode__resources-list"
|
|
11
|
+
}, list.map(function (item) {
|
|
12
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
className: "pisell-lowcode__resources-item",
|
|
14
|
+
key: item.id,
|
|
15
|
+
id: item.id,
|
|
16
|
+
onClick: function onClick() {
|
|
17
|
+
itemClick === null || itemClick === void 0 ? void 0 : itemClick(item);
|
|
18
|
+
}
|
|
19
|
+
}, item.title);
|
|
20
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
21
|
+
type: "primary",
|
|
22
|
+
ghost: true,
|
|
23
|
+
size: "large",
|
|
24
|
+
className: "pisell-lowcode__resourcesadd-btn",
|
|
25
|
+
onClick: function onClick() {
|
|
26
|
+
addClick === null || addClick === void 0 ? void 0 : addClick();
|
|
27
|
+
}
|
|
28
|
+
}, locales.getText('pisell2.text.schedules.add')));
|
|
29
|
+
};
|
|
30
|
+
export default ResourcesList;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.pisell-lowcode__resources-list {
|
|
2
|
+
.pisell-lowcode__resources-item {
|
|
3
|
+
display: flex;
|
|
4
|
+
padding: 14px 16px;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
align-items: center;
|
|
7
|
+
align-self: stretch;
|
|
8
|
+
border-radius: 8px;
|
|
9
|
+
border: 1px solid #f5f5f5;
|
|
10
|
+
margin-top: 16px;
|
|
11
|
+
color: #141414;
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
font-style: normal;
|
|
14
|
+
font-weight: 500;
|
|
15
|
+
line-height: 20px;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
&:first-child {
|
|
18
|
+
margin-top: 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
.pisell-lowcode__resourcesadd-btn {
|
|
23
|
+
width: 181px;
|
|
24
|
+
margin-top: 24px;
|
|
25
|
+
margin-bottom: 20px;
|
|
26
|
+
}
|