@ozdao/prometheus-framework 0.2.221 → 0.2.223
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +4 -4
- package/dist/auth.server.mjs +4 -4
- package/dist/builder.js +72 -60
- package/dist/builder.mjs +72 -60
- package/dist/community.server.js +9 -4
- package/dist/community.server.mjs +9 -4
- package/dist/events.server.js +14 -24
- package/dist/events.server.mjs +14 -24
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/gallery.server.js +42 -76
- package/dist/gallery.server.mjs +41 -75
- package/dist/index-CsS7qx1d.js +243 -0
- package/dist/index-UIHE6Rk3.mjs +244 -0
- package/dist/main.css +1 -1
- package/dist/node_modules/@capacitor/core/dist/index.cjs +529 -0
- package/dist/node_modules/@capacitor/core/dist/index.cjs.map +1 -0
- package/dist/node_modules/@capacitor/core/dist/index.js +530 -0
- package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.cjs +51 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.cjs.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js +55 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.cjs +25 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.cjs.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js +13 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.cjs +67 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.cjs.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js +67 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js.map +1 -0
- package/dist/node_modules/@unhead/shared/dist/index.cjs +7 -0
- package/dist/node_modules/@unhead/shared/dist/index.cjs.map +1 -0
- package/dist/node_modules/@unhead/shared/dist/index.js +7 -0
- package/dist/node_modules/@unhead/shared/dist/index.js.map +1 -0
- package/dist/node_modules/@unhead/ssr/dist/index.cjs +87 -0
- package/dist/node_modules/@unhead/ssr/dist/index.cjs.map +1 -0
- package/dist/node_modules/@unhead/ssr/dist/index.js +87 -0
- package/dist/node_modules/@unhead/ssr/dist/index.js.map +1 -0
- package/dist/orders.server.js +2 -2
- package/dist/orders.server.mjs +2 -2
- package/dist/organizations.server.js +174 -95
- package/dist/organizations.server.mjs +174 -95
- package/dist/pages.server.js +1 -1
- package/dist/pages.server.mjs +1 -1
- package/dist/products.server.js +119 -266
- package/dist/products.server.mjs +119 -266
- package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs +814 -0
- package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs.map +1 -0
- package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js +814 -0
- package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +1 -0
- package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.cjs +210 -0
- package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.cjs.map +1 -0
- package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.js +210 -0
- package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +1 -0
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -2
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +1 -2
- package/dist/prometheus-framework/src/components/Button/Button.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +26 -41
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +27 -42
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +6 -8
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +6 -8
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +1 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +2 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +2 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +2 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs +5 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js +5 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs +44 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js +44 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs +37 -35
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.js +33 -31
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs +3 -5
- package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js +2 -4
- package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.cjs +8 -5
- package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.js +8 -5
- package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +4 -2
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +4 -2
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +13 -9
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +14 -10
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +53 -40
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +58 -45
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +16 -15
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +16 -15
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +47 -43
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js +47 -43
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +13 -20
- package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/store/blogposts.js +9 -16
- package/dist/prometheus-framework/src/modules/community/store/blogposts.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/store/reactions.cjs +5 -9
- package/dist/prometheus-framework/src/modules/community/store/reactions.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/store/reactions.js +1 -5
- package/dist/prometheus-framework/src/modules/community/store/reactions.js.map +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +29 -54
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +30 -55
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +163 -134
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +165 -136
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +124 -135
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +133 -144
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.cjs +96 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.js +96 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs +39 -25
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js +40 -26
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs +4 -3
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js +4 -3
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.cjs +16 -5
- package/dist/prometheus-framework/src/modules/events/router/events.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.js +16 -5
- package/dist/prometheus-framework/src/modules/events/router/events.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/store/events.cjs +5 -6
- package/dist/prometheus-framework/src/modules/events/store/events.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/store/events.js +1 -2
- package/dist/prometheus-framework/src/modules/events/store/events.js.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +20 -11
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +20 -11
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.cjs +5 -2
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.js +5 -2
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +2 -0
- package/dist/prometheus-framework/src/modules/globals/globals.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/globals.client.js +2 -0
- package/dist/prometheus-framework/src/modules/globals/globals.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.cjs +4 -3
- package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.js +4 -3
- package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.cjs +64 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.js +64 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -19
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +1 -19
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs +3 -2
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.js +3 -2
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.cjs +17 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.js +17 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.js.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.cjs +57 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.js +57 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.js.map +1 -0
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +6 -7
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +1 -2
- package/dist/prometheus-framework/src/modules/orders/store/orders.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +60 -23
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +60 -23
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +2 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +3 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +2 -0
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +2 -0
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +11 -9
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js +6 -4
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +5 -11
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.js +1 -7
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.js.map +1 -1
- package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +807 -801
- package/dist/prometheus-framework/src/modules/pages/pages.client.js +807 -801
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.cjs +5 -10
- package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.js +5 -10
- package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +12 -7
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +12 -7
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/store/categories.cjs +7 -8
- package/dist/prometheus-framework/src/modules/products/store/categories.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/categories.js +1 -2
- package/dist/prometheus-framework/src/modules/products/store/categories.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +6 -7
- package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/leftovers.js +1 -2
- package/dist/prometheus-framework/src/modules/products/store/leftovers.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +10 -21
- package/dist/prometheus-framework/src/modules/products/store/products.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.js +1 -12
- package/dist/prometheus-framework/src/modules/products/store/products.js.map +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/spots/store/spots.cjs +6 -9
- package/dist/prometheus-framework/src/modules/spots/store/spots.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/store/spots.js +1 -4
- package/dist/prometheus-framework/src/modules/spots/store/spots.js.map +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/router/users.cjs +2 -2
- package/dist/prometheus-framework/src/modules/users/router/users.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/users/router/users.js +2 -2
- package/dist/prometheus-framework/src/modules/users/router/users.js.map +1 -1
- package/dist/prometheus-framework/src/modules/users/store/users.cjs +5 -6
- package/dist/prometheus-framework/src/modules/users/store/users.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/users/store/users.js +1 -2
- package/dist/prometheus-framework/src/modules/users/store/users.js.map +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
- package/dist/prometheus-framework.cjs.js +17 -17
- package/dist/prometheus-framework.es.js +1790 -1790
- package/dist/queryProcessor-CU4A6Y4N.mjs +197 -0
- package/dist/queryProcessor-CcsJEUBr.js +196 -0
- package/dist/spots.server.js +1 -1
- package/dist/spots.server.mjs +1 -1
- package/dist/verifyAccesses-BsrJOct8.mjs +90 -0
- package/dist/verifyAccesses-BvLnOtBN.js +89 -0
- package/dist/wallet.server.js +2 -2
- package/dist/wallet.server.mjs +2 -2
- package/package.json +1 -1
- package/src/builder/modes/ssr.dev.js +2 -2
- package/src/builder/modes/ssr.prod.js +4 -4
- package/src/builder/ssr/ssr-render-html.js +11 -13
- package/src/builder/templates/page.html +37 -0
- package/src/builder/templates/page.js +4 -0
- package/src/builder/webpack/webpack.config.client.js +9 -6
- package/src/builder/webpack/webpack.config.ssr.js +1 -1
- package/src/components/Button/Button.vue +0 -1
- package/src/components/Feed/Feed.vue +34 -55
- package/src/components/FieldTags/BlockTags.vue +0 -1
- package/src/components/UploadImage/UploadImage.vue +2 -1
- package/src/modules/auth/controllers/middlewares/authJwt.js +1 -1
- package/src/modules/auth/controllers/middlewares/verifySignUp.js +11 -11
- package/src/modules/auth/controllers/routes/auth.routes.js +2 -2
- package/src/modules/auth/controllers/services/auth.service.js +1 -0
- package/src/modules/auth/views/components/pages/SignIn.vue +1 -0
- package/src/modules/auth/views/middlewares/auth.validation.js +17 -1
- package/src/modules/auth/views/middlewares/ownership.validation.js +60 -0
- package/src/modules/auth/views/store/auth.js +43 -39
- package/src/modules/auth/views/store/twofa.js +2 -5
- package/src/modules/auth/views/validations/inputs.validation.js +12 -6
- package/src/modules/community/components/blocks/CardBlogpost.vue +3 -1
- package/src/modules/community/components/layouts/Community.vue +7 -9
- package/src/modules/community/components/pages/BlogPost.vue +122 -123
- package/src/modules/community/components/pages/CreateBlogPost.vue +1 -1
- package/src/modules/community/components/sections/Comments.vue +5 -5
- package/src/modules/community/controllers/blog.controller.js +1 -1
- package/src/modules/community/models/blogpost.model.js +1 -1
- package/src/modules/community/router/blogposts.js +40 -33
- package/src/modules/community/routes/blog.routes.js +4 -0
- package/src/modules/community/store/blogposts.js +11 -19
- package/src/modules/community/store/reactions.js +1 -7
- package/src/modules/events/components/elements/ButtonCheck.vue +36 -66
- package/src/modules/events/components/pages/EditEvent.vue +76 -59
- package/src/modules/events/components/pages/Event.vue +2 -15
- package/src/modules/events/components/pages/Events.vue +2 -1
- package/src/modules/events/components/pages/EventsBackoffice.vue +122 -0
- package/src/modules/events/components/sections/HeroEvent.vue +15 -17
- package/src/modules/events/components/sections/SectionPreviousEvents.vue +4 -13
- package/src/modules/events/router/events.js +11 -4
- package/src/modules/events/store/events.js +2 -4
- package/src/modules/gallery/components/sections/BackofficeGallery.vue +24 -13
- package/src/modules/gallery/controllers/gallery.controller.js +30 -31
- package/src/modules/gallery/router/gallery.backoffice.router.js +5 -1
- package/src/modules/gallery/routes/gallery.routes.js +22 -4
- package/src/modules/globals/controllers/utils/queryProcessor.js +24 -4
- package/src/modules/globals/globals.client.js +2 -0
- package/src/modules/globals/views/classes/globals.store.js +4 -3
- package/src/modules/globals/views/components/blocks/Card.vue +56 -0
- package/src/modules/globals/views/components/blocks/CardHeader.vue +1 -3
- package/src/modules/globals/views/components/layouts/App.vue +1 -0
- package/src/modules/globals/views/components/layouts/Client.vue +0 -30
- package/src/modules/globals/views/store/globals.js +4 -2
- package/src/modules/globals/views/utils/axios-instance.js +18 -0
- package/src/modules/globals/views/utils/vue-app-renderer.js +87 -0
- package/src/modules/integrations/stripe/controllers/services/stripe.service.js +15 -30
- package/src/modules/landing/components/pages/Governance.vue +4 -2
- package/src/modules/landing/components/sections/SectionHeroToken.vue +12 -10
- package/src/modules/landing/components/sections/SectionsSection.vue +5 -8
- package/src/modules/landing/router/landing.js +2 -1
- package/src/modules/orders/store/orders.js +1 -3
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +36 -0
- package/src/modules/organizations/components/pages/OrganizationBackoffice.vue +3 -1
- package/src/modules/organizations/controllers/organizations.controller.js +28 -35
- package/src/modules/organizations/middlewares/verifyAccesses.js +117 -0
- package/src/modules/organizations/models/department.model.js +3 -86
- package/src/modules/organizations/models/organization.model.js +6 -4
- package/src/modules/organizations/models/schemas/accesses.schema.js +142 -0
- package/src/modules/organizations/router/organizations.js +2 -0
- package/src/modules/organizations/store/departments.js +6 -6
- package/src/modules/organizations/store/organizations.js +2 -16
- package/src/modules/pages/views/router/pages.backoffice.router.js +5 -7
- package/src/modules/products/components/blocks/CardProduct.vue +2 -0
- package/src/modules/products/components/pages/Product.vue +1 -1
- package/src/modules/products/components/sections/MenuSection.vue +2 -2
- package/src/modules/products/controllers/products.controller.js +201 -367
- package/src/modules/products/routes/products.routes.js +0 -5
- package/src/modules/products/store/categories.js +1 -2
- package/src/modules/products/store/leftovers.js +1 -2
- package/src/modules/products/store/products.js +1 -13
- package/src/modules/reports/components/sections/FormReport.vue +20 -20
- package/src/modules/spots/store/spots.js +1 -6
- package/src/modules/users/components/pages/Profile.vue +1 -1
- package/src/modules/users/router/users.js +2 -2
- package/src/modules/users/store/users.js +1 -3
- package/src/styles/base/all.scss +0 -2
- package/src/styles/config.scss +6 -0
- package/src/modules/auth/controllers/middlewares/verifyAccesses.js +0 -114
- package/src/modules/users/components/pages/ProfileEvents.vue +0 -69
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"shared.esm-bundler.js","sources":["../../../../../../node_modules/@vue/shared/dist/shared.esm-bundler.js"],"sourcesContent":["/**\n* @vue/shared v3.4.38\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction makeMap(str, expectsLowerCase) {\n const set = new Set(str.split(\",\"));\n return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);\n}\n\nconst EMPTY_OBJ = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze({}) : {};\nconst EMPTY_ARR = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze([]) : [];\nconst NOOP = () => {\n};\nconst NO = () => false;\nconst isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter\n(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);\nconst isModelListener = (key) => key.startsWith(\"onUpdate:\");\nconst extend = Object.assign;\nconst remove = (arr, el) => {\n const i = arr.indexOf(el);\n if (i > -1) {\n arr.splice(i, 1);\n }\n};\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst isArray = Array.isArray;\nconst isMap = (val) => toTypeString(val) === \"[object Map]\";\nconst isSet = (val) => toTypeString(val) === \"[object Set]\";\nconst isDate = (val) => toTypeString(val) === \"[object Date]\";\nconst isRegExp = (val) => toTypeString(val) === \"[object RegExp]\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isString = (val) => typeof val === \"string\";\nconst isSymbol = (val) => typeof val === \"symbol\";\nconst isObject = (val) => val !== null && typeof val === \"object\";\nconst isPromise = (val) => {\n return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst toRawType = (value) => {\n return toTypeString(value).slice(8, -1);\n};\nconst isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\nconst isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nconst isReservedProp = /* @__PURE__ */ makeMap(\n // the leading comma is intentional so empty string \"\" is also included\n \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\n);\nconst isBuiltInDirective = /* @__PURE__ */ makeMap(\n \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\n);\nconst cacheStringFunction = (fn) => {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n};\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst capitalize = cacheStringFunction((str) => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n});\nconst toHandlerKey = cacheStringFunction((str) => {\n const s = str ? `on${capitalize(str)}` : ``;\n return s;\n});\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\nconst invokeArrayFns = (fns, ...arg) => {\n for (let i = 0; i < fns.length; i++) {\n fns[i](...arg);\n }\n};\nconst def = (obj, key, value, writable = false) => {\n Object.defineProperty(obj, key, {\n configurable: true,\n enumerable: false,\n writable,\n value\n });\n};\nconst looseToNumber = (val) => {\n const n = parseFloat(val);\n return isNaN(n) ? val : n;\n};\nconst toNumber = (val) => {\n const n = isString(val) ? Number(val) : NaN;\n return isNaN(n) ? val : n;\n};\nlet _globalThis;\nconst getGlobalThis = () => {\n return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n};\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\nfunction genPropsAccessExp(name) {\n return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;\n}\n\nconst PatchFlags = {\n \"TEXT\": 1,\n \"1\": \"TEXT\",\n \"CLASS\": 2,\n \"2\": \"CLASS\",\n \"STYLE\": 4,\n \"4\": \"STYLE\",\n \"PROPS\": 8,\n \"8\": \"PROPS\",\n \"FULL_PROPS\": 16,\n \"16\": \"FULL_PROPS\",\n \"NEED_HYDRATION\": 32,\n \"32\": \"NEED_HYDRATION\",\n \"STABLE_FRAGMENT\": 64,\n \"64\": \"STABLE_FRAGMENT\",\n \"KEYED_FRAGMENT\": 128,\n \"128\": \"KEYED_FRAGMENT\",\n \"UNKEYED_FRAGMENT\": 256,\n \"256\": \"UNKEYED_FRAGMENT\",\n \"NEED_PATCH\": 512,\n \"512\": \"NEED_PATCH\",\n \"DYNAMIC_SLOTS\": 1024,\n \"1024\": \"DYNAMIC_SLOTS\",\n \"DEV_ROOT_FRAGMENT\": 2048,\n \"2048\": \"DEV_ROOT_FRAGMENT\",\n \"HOISTED\": -1,\n \"-1\": \"HOISTED\",\n \"BAIL\": -2,\n \"-2\": \"BAIL\"\n};\nconst PatchFlagNames = {\n [1]: `TEXT`,\n [2]: `CLASS`,\n [4]: `STYLE`,\n [8]: `PROPS`,\n [16]: `FULL_PROPS`,\n [32]: `NEED_HYDRATION`,\n [64]: `STABLE_FRAGMENT`,\n [128]: `KEYED_FRAGMENT`,\n [256]: `UNKEYED_FRAGMENT`,\n [512]: `NEED_PATCH`,\n [1024]: `DYNAMIC_SLOTS`,\n [2048]: `DEV_ROOT_FRAGMENT`,\n [-1]: `HOISTED`,\n [-2]: `BAIL`\n};\n\nconst ShapeFlags = {\n \"ELEMENT\": 1,\n \"1\": \"ELEMENT\",\n \"FUNCTIONAL_COMPONENT\": 2,\n \"2\": \"FUNCTIONAL_COMPONENT\",\n \"STATEFUL_COMPONENT\": 4,\n \"4\": \"STATEFUL_COMPONENT\",\n \"TEXT_CHILDREN\": 8,\n \"8\": \"TEXT_CHILDREN\",\n \"ARRAY_CHILDREN\": 16,\n \"16\": \"ARRAY_CHILDREN\",\n \"SLOTS_CHILDREN\": 32,\n \"32\": \"SLOTS_CHILDREN\",\n \"TELEPORT\": 64,\n \"64\": \"TELEPORT\",\n \"SUSPENSE\": 128,\n \"128\": \"SUSPENSE\",\n \"COMPONENT_SHOULD_KEEP_ALIVE\": 256,\n \"256\": \"COMPONENT_SHOULD_KEEP_ALIVE\",\n \"COMPONENT_KEPT_ALIVE\": 512,\n \"512\": \"COMPONENT_KEPT_ALIVE\",\n \"COMPONENT\": 6,\n \"6\": \"COMPONENT\"\n};\n\nconst SlotFlags = {\n \"STABLE\": 1,\n \"1\": \"STABLE\",\n \"DYNAMIC\": 2,\n \"2\": \"DYNAMIC\",\n \"FORWARDED\": 3,\n \"3\": \"FORWARDED\"\n};\nconst slotFlagsText = {\n [1]: \"STABLE\",\n [2]: \"DYNAMIC\",\n [3]: \"FORWARDED\"\n};\n\nconst GLOBALS_ALLOWED = \"Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error\";\nconst isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);\nconst isGloballyWhitelisted = isGloballyAllowed;\n\nconst range = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n start = Math.max(0, Math.min(start, source.length));\n end = Math.max(0, Math.min(end, source.length));\n if (start > end) return \"\";\n let lines = source.split(/(\\r?\\n)/);\n const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);\n lines = lines.filter((_, idx) => idx % 2 === 0);\n let count = 0;\n const res = [];\n for (let i = 0; i < lines.length; i++) {\n count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);\n if (count >= start) {\n for (let j = i - range; j <= i + range || end > count; j++) {\n if (j < 0 || j >= lines.length) continue;\n const line = j + 1;\n res.push(\n `${line}${\" \".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`\n );\n const lineLength = lines[j].length;\n const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;\n if (j === i) {\n const pad = start - (count - (lineLength + newLineSeqLength));\n const length = Math.max(\n 1,\n end > count ? lineLength - pad : end - start\n );\n res.push(` | ` + \" \".repeat(pad) + \"^\".repeat(length));\n } else if (j > i) {\n if (end > count) {\n const length = Math.max(Math.min(end - count, lineLength), 1);\n res.push(` | ` + \"^\".repeat(length));\n }\n count += lineLength + newLineSeqLength;\n }\n }\n break;\n }\n }\n return res.join(\"\\n\");\n}\n\nfunction normalizeStyle(value) {\n if (isArray(value)) {\n const res = {};\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);\n if (normalized) {\n for (const key in normalized) {\n res[key] = normalized[key];\n }\n }\n }\n return res;\n } else if (isString(value) || isObject(value)) {\n return value;\n }\n}\nconst listDelimiterRE = /;(?![^(]*\\))/g;\nconst propertyDelimiterRE = /:([^]+)/;\nconst styleCommentRE = /\\/\\*[^]*?\\*\\//g;\nfunction parseStringStyle(cssText) {\n const ret = {};\n cssText.replace(styleCommentRE, \"\").split(listDelimiterRE).forEach((item) => {\n if (item) {\n const tmp = item.split(propertyDelimiterRE);\n tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\n }\n });\n return ret;\n}\nfunction stringifyStyle(styles) {\n let ret = \"\";\n if (!styles || isString(styles)) {\n return ret;\n }\n for (const key in styles) {\n const value = styles[key];\n if (isString(value) || typeof value === \"number\") {\n const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);\n ret += `${normalizedKey}:${value};`;\n }\n }\n return ret;\n}\nfunction normalizeClass(value) {\n let res = \"\";\n if (isString(value)) {\n res = value;\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const normalized = normalizeClass(value[i]);\n if (normalized) {\n res += normalized + \" \";\n }\n }\n } else if (isObject(value)) {\n for (const name in value) {\n if (value[name]) {\n res += name + \" \";\n }\n }\n }\n return res.trim();\n}\nfunction normalizeProps(props) {\n if (!props) return null;\n let { class: klass, style } = props;\n if (klass && !isString(klass)) {\n props.class = normalizeClass(klass);\n }\n if (style) {\n props.style = normalizeStyle(style);\n }\n return props;\n}\n\nconst HTML_TAGS = \"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot\";\nconst SVG_TAGS = \"svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view\";\nconst MATH_TAGS = \"annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics\";\nconst VOID_TAGS = \"area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr\";\nconst isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);\nconst isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);\nconst isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);\nconst isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);\n\nconst specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nconst isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);\nconst isBooleanAttr = /* @__PURE__ */ makeMap(\n specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`\n);\nfunction includeBooleanAttr(value) {\n return !!value || value === \"\";\n}\nconst unsafeAttrCharRE = /[>/=\"'\\u0009\\u000a\\u000c\\u0020]/;\nconst attrValidationCache = {};\nfunction isSSRSafeAttrName(name) {\n if (attrValidationCache.hasOwnProperty(name)) {\n return attrValidationCache[name];\n }\n const isUnsafe = unsafeAttrCharRE.test(name);\n if (isUnsafe) {\n console.error(`unsafe attribute name: ${name}`);\n }\n return attrValidationCache[name] = !isUnsafe;\n}\nconst propsToAttrMap = {\n acceptCharset: \"accept-charset\",\n className: \"class\",\n htmlFor: \"for\",\n httpEquiv: \"http-equiv\"\n};\nconst isKnownHtmlAttr = /* @__PURE__ */ makeMap(\n `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`\n);\nconst isKnownSvgAttr = /* @__PURE__ */ makeMap(\n `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`\n);\nfunction isRenderableAttrValue(value) {\n if (value == null) {\n return false;\n }\n const type = typeof value;\n return type === \"string\" || type === \"number\" || type === \"boolean\";\n}\n\nconst escapeRE = /[\"'&<>]/;\nfunction escapeHtml(string) {\n const str = \"\" + string;\n const match = escapeRE.exec(str);\n if (!match) {\n return str;\n }\n let html = \"\";\n let escaped;\n let index;\n let lastIndex = 0;\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n escaped = \""\";\n break;\n case 38:\n escaped = \"&\";\n break;\n case 39:\n escaped = \"'\";\n break;\n case 60:\n escaped = \"<\";\n break;\n case 62:\n escaped = \">\";\n break;\n default:\n continue;\n }\n if (lastIndex !== index) {\n html += str.slice(lastIndex, index);\n }\n lastIndex = index + 1;\n html += escaped;\n }\n return lastIndex !== index ? html + str.slice(lastIndex, index) : html;\n}\nconst commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;\nfunction escapeHtmlComment(src) {\n return src.replace(commentStripRE, \"\");\n}\n\nfunction looseCompareArrays(a, b) {\n if (a.length !== b.length) return false;\n let equal = true;\n for (let i = 0; equal && i < a.length; i++) {\n equal = looseEqual(a[i], b[i]);\n }\n return equal;\n}\nfunction looseEqual(a, b) {\n if (a === b) return true;\n let aValidType = isDate(a);\n let bValidType = isDate(b);\n if (aValidType || bValidType) {\n return aValidType && bValidType ? a.getTime() === b.getTime() : false;\n }\n aValidType = isSymbol(a);\n bValidType = isSymbol(b);\n if (aValidType || bValidType) {\n return a === b;\n }\n aValidType = isArray(a);\n bValidType = isArray(b);\n if (aValidType || bValidType) {\n return aValidType && bValidType ? looseCompareArrays(a, b) : false;\n }\n aValidType = isObject(a);\n bValidType = isObject(b);\n if (aValidType || bValidType) {\n if (!aValidType || !bValidType) {\n return false;\n }\n const aKeysCount = Object.keys(a).length;\n const bKeysCount = Object.keys(b).length;\n if (aKeysCount !== bKeysCount) {\n return false;\n }\n for (const key in a) {\n const aHasKey = a.hasOwnProperty(key);\n const bHasKey = b.hasOwnProperty(key);\n if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {\n return false;\n }\n }\n }\n return String(a) === String(b);\n}\nfunction looseIndexOf(arr, val) {\n return arr.findIndex((item) => looseEqual(item, val));\n}\n\nconst isRef = (val) => {\n return !!(val && val.__v_isRef === true);\n};\nconst toDisplayString = (val) => {\n return isString(val) ? val : val == null ? \"\" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);\n};\nconst replacer = (_key, val) => {\n if (isRef(val)) {\n return replacer(_key, val.value);\n } else if (isMap(val)) {\n return {\n [`Map(${val.size})`]: [...val.entries()].reduce(\n (entries, [key, val2], i) => {\n entries[stringifySymbol(key, i) + \" =>\"] = val2;\n return entries;\n },\n {}\n )\n };\n } else if (isSet(val)) {\n return {\n [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))\n };\n } else if (isSymbol(val)) {\n return stringifySymbol(val);\n } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {\n return String(val);\n }\n return val;\n};\nconst stringifySymbol = (v, i = \"\") => {\n var _a;\n return (\n // Symbol.description in es2019+ so we need to cast here to pass\n // the lib: es2016 check\n isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v\n );\n};\n\nexport { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };\n"],"names":[],"mappings":"AAAA;AAAA;AAAA;AAAA;AAAA;AAKA;AAAA;AAEA,SAAS,QAAQ,KAAK,kBAAkB;AACtC,QAAM,MAAM,IAAI,IAAI,IAAI,MAAM,GAAG,CAAC;AAClC,SAAgE,CAAC,QAAQ,IAAI,IAAI,GAAG;AACtF;AAEkB,CAAC,EAAE,QAAQ,IAAI,aAAa,gBAAgB,OAAO,OAAO,CAAE,CAAA,IAAI,CAAG;AACnE,CAAC,EAAE,QAAQ,IAAI,aAAa,gBAAgB,OAAO,OAAO,CAAE,CAAA,IAAI,CAAG;AAChF,MAAC,OAAO,MAAM;AACnB;AAEK,MAAC,OAAO,CAAC,QAAQ,IAAI,WAAW,CAAC,MAAM,OAAO,IAAI,WAAW,CAAC,MAAM;AAAA,CACxE,IAAI,WAAW,CAAC,IAAI,OAAO,IAAI,WAAW,CAAC,IAAI;AAE3C,MAAC,SAAS,OAAO;AASjB,MAAC,UAAU,MAAM;AAKjB,MAAC,aAAa,CAAC,QAAQ,OAAO,QAAQ;AACtC,MAAC,WAAW,CAAC,QAAQ,OAAO,QAAQ;AAEpC,MAAC,WAAW,CAAC,QAAQ,QAAQ,QAAQ,OAAO,QAAQ;AACpD,MAAC,YAAY,CAAC,QAAQ;AACzB,UAAQ,SAAS,GAAG,KAAK,WAAW,GAAG,MAAM,WAAW,IAAI,IAAI,KAAK,WAAW,IAAI,KAAK;AAC3F;AAeA,MAAM,sBAAs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perties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
|
-
const Loader = require("../Loader/Loader.
|
4
|
+
const Loader = require("../Loader/Loader.vue2.cjs");
|
5
5
|
;/* empty css */
|
6
6
|
const _hoisted_1 = ["disabled"];
|
7
7
|
const _hoisted_2 = { key: 0 };
|
@@ -30,7 +30,6 @@ const _sfc_main = {
|
|
30
30
|
text: {
|
31
31
|
type: Object,
|
32
32
|
default: (textComponent) => {
|
33
|
-
console.log(textComponent);
|
34
33
|
return textComponent = {
|
35
34
|
...textComponent.text,
|
36
35
|
success: "✔",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Button.vue.cjs","sources":["../../../../../src/components/Button/Button.vue"],"sourcesContent":["<script setup>\n\timport { ref } from 'vue'\n\n\timport Loader from '@pf/src/components/Loader/Loader.vue'\n\n\tconst props = defineProps({\n\t\tsubmit: {\n\t\t\ttype: Function,\n\t\t\tdefault: async () => { console.log('Button click.') }\n\t\t},\n\t\ttext: {\n\t\t\ttype: Object,\n\t\t\tdefault: (textComponent) => {\n\t\t\t\
|
1
|
+
{"version":3,"file":"Button.vue.cjs","sources":["../../../../../src/components/Button/Button.vue"],"sourcesContent":["<script setup>\n\timport { ref } from 'vue'\n\n\timport Loader from '@pf/src/components/Loader/Loader.vue'\n\n\tconst props = defineProps({\n\t\tsubmit: {\n\t\t\ttype: Function,\n\t\t\tdefault: async () => { console.log('Button click.') }\n\t\t},\n\t\ttext: {\n\t\t\ttype: Object,\n\t\t\tdefault: (textComponent) => {\n\t\t\t\treturn textComponent = {\n\t\t\t\t\t...textComponent.text,\n\t\t\t\t\tsuccess: '✔',\n\t\t\t\t\terror: '✖'\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcounter: {\n\t type: Object\n\t },\n\t\tcallback: {\n\t\t\ttype: Function,\n\t\t\tdefault: async () => { console.log('Button callback.') }\n\t\t},\n\t\tcallbackDelay: {\n\t\t\ttype: Number,\n\t\t\tdefault: 750\n\t\t},\n\t\tshowSucces: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true\n\t\t},\n\t\tshowLoader: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true\n\t\t},\n\t\tvalidation: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t})\t\n\n\tconst emits = defineEmits(['error'])\n\n\tconst button = ref(null);\n\tconst error = ref(null);\n\tconst loading = ref(false);\n\tconst finished = ref(false);\n\n\tasync function Submit() {\n\t button.value.style['pointer-events'] = 'none';\n\t error.value = null;\n\t loading.value = true;\n\n\t // Функция для сброса состояния кнопки.\n\t const resetButton = () => {\n\t if (button.value) {\n button.value.classList.replace('bg-second', 'bg-main');\n button.value.style.pointerEvents = 'auto';\n loading.value = false;\n finished.value = false;\n error.value = null;\n\t }\n\t };\n\n\t try {\n\t await props.submit();\n\n\t button.value.classList.replace('bg-main', 'bg-second');\n\n\t loading.value = false;\n\n\t // Используем функцию сброса состояния кнопки здесь.\n\t if (props.showSucces) { \n\t\t\t\t\t\t\tfinished.value = true;\n\t setTimeout(resetButton, 500);\n\t } else {\n\t resetButton();\n\t }\n\n\t // Если есть callback, мы также установим таймер для его вызова.\n\t if (props.callback) setTimeout(() => props.callback(), props.callbackDelay);\n\n\t } catch (err) {\n\t \t\temits('error',err)\n\t // Если возникла ошибка, мы изменяем стили и устанавливаем сообщение об ошибке.\n\t button.value.classList.replace('bg-main', 'bg-fourth-nano');\n\t error.value = props.error;\n\t \n\t // После задержки снова сбрасываем состояние кнопки.\n\t setTimeout(() => {\n\t resetButton();\n\t // Так как класс кнопки был изменен, вернем его в исходное состояние.\n\t button.value.classList.replace('bg-fourth-nano', 'bg-main');\n\t }, 1330);\n\t }\n\t}\n\n</script>\n\n<template>\n\t<button @click.stop=\"Submit\" :disabled=\"validation\" ref=\"button\" class=\"button\">\n\t\t<transition name=\"FromTop\" >\n\t\t\t<!-- Slot -->\n\t\t\t<span v-if=\"!loading && !error && !finished || !showLoader\"><slot></slot></span>\n\t\t\t<!-- Loading Circle Animation -->\n\t\t\t<span v-else-if=\"loading && !error && showLoader\"><Loader class=\"pos-relative pos-t-0 pos-l-0 loading\"/></span>\n\t\t\t<!-- <Loader v-else-if=\"loading && !error && showLoader\"/> -->\n\t\t\t<!-- Success -->\n\t\t\t<span v-else-if=\"finished && showSucces\" class=\"t-semi loading t-black\">{{text.success}}</span>\n\t\t\t<!-- Error if not finished -->\n\t\t\t<span v-else-if=\"error\" class=\"error\">{{ error }}</span>\n\t\t</transition>\n\t\t<!-- Counter -->\n\t\t<p v-if=\"counter\" class=\"button-counter\">{{counter}}</p> \n\n\t</button> \n</template>\n\n\n<style lang=\"scss\">\n\tbutton[disabled] {\n\t\tbackground: grey; \n\t\t&:hover {\n\t\t\tbackground: grey; \n\t\t} \n\t}\n\n\t.FromTop-enter-active,\n\t.FromTop-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.FromTop-enter-from,\n\t.FromTop-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\n\t.button {\n\t\tdisplay: flex;\n\t\twidth: fit-content;\n\n\t\tpadding: 1rem 1.75rem;\n\t\tborder-radius: 3rem;\n\n\t\ttransform: scale(1);\n\t\topacity: 1;\n\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\t\n\t\tcolor: black;\n\t\ttext-align: center;\n\t\ttext-transform: uppercase;\n\t\tfont-size: 1rem;\n\t\tletter-spacing: 5%;\n\n\t\ttransition: all 0.33s ease;\n\t \n\t\t&:hover {\n\t\t\tcursor: pointer;\n\t\t\topacity: 0.9;\n\t\t}\n\n\t\t&:active {\n\t\t\ttransform: scale(0.95);\n\t\t}\n\n\t\t&-small {\n\t\t\tpadding: 0.5rem 0.75rem;\n\t\t\tborder-radius: 0.5rem;\n\t\t\theight: fit-content;\n\t\t}\n\n\t\t.button-counter {\n\t\t\tposition: absolute;\n\t\t\tright: -8px;\n\t bottom: -8px;\n\t background: yellow;\n\t height: 16px;\n\t border-radius: 16px;\n\t width: 16px;\n\t font-weight: 500;\n\t text-align: center;\n\t line-height: 16px;\n\t font-size: 10px;\n\t\t}\n\t}\n</style>"],"names":["ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKC,UAAM,QAAQ;AAwCd,UAAM,QAAQ;AAEd,UAAM,SAASA,QAAI,IAAI;AACvB,UAAM,QAAQA,QAAI,IAAI;AACtB,UAAM,UAAUA,QAAI,KAAK;AACzB,UAAM,WAAWA,QAAI,KAAK;AAE1B,mBAAe,SAAS;AACpB,aAAO,MAAM,MAAM,gBAAgB,IAAI;AACvC,YAAM,QAAQ;AACd,cAAQ,QAAQ;AAGhB,YAAM,cAAc,MAAM;AACtB,YAAI,OAAO,OAAO;AACf,iBAAO,MAAM,UAAU,QAAQ,aAAa,SAAS;AACrD,iBAAO,MAAM,MAAM,gBAAgB;AACnC,kBAAQ,QAAQ;AAChB,mBAAS,QAAQ;AACjB,gBAAM,QAAQ;AAAA,QAChB;AAAA,MACV;AAEK,UAAI;AACA,cAAM,MAAM;AAEZ,eAAO,MAAM,UAAU,QAAQ,WAAW,WAAW;AAErD,gBAAQ,QAAQ;AAGhB,YAAI,MAAM,YAAY;AACxB,mBAAS,QAAQ;AACX,qBAAW,aAAa,GAAG;AAAA,QACxC,OAAgB;AACH;QACH;AAGD,YAAI,MAAM,SAAU,YAAW,MAAM,MAAM,SAAU,GAAE,MAAM,aAAa;AAAA,MAE7E,SAAQ,KAAK;AACZ,cAAM,SAAQ,GAAG;AAEf,eAAO,MAAM,UAAU,QAAQ,WAAW,gBAAgB;AAC1D,cAAM,QAAQ,MAAM;AAGpB,mBAAW,MAAM;AACb;AAEA,iBAAO,MAAM,UAAU,QAAQ,kBAAkB,SAAS;AAAA,QAC7D,GAAE,IAAI;AAAA,MACV;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref, openBlock, createElementBlock, withModifiers, createVNode, Transition, withCtx, renderSlot, toDisplayString, createCommentVNode } from "vue";
|
2
|
-
import Loader from "../Loader/Loader.
|
2
|
+
import Loader from "../Loader/Loader.vue2.js";
|
3
3
|
/* empty css */
|
4
4
|
const _hoisted_1 = ["disabled"];
|
5
5
|
const _hoisted_2 = { key: 0 };
|
@@ -28,7 +28,6 @@ const _sfc_main = {
|
|
28
28
|
text: {
|
29
29
|
type: Object,
|
30
30
|
default: (textComponent) => {
|
31
|
-
console.log(textComponent);
|
32
31
|
return textComponent = {
|
33
32
|
...textComponent.text,
|
34
33
|
success: "✔",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Button.vue.js","sources":["../../../../../src/components/Button/Button.vue"],"sourcesContent":["<script setup>\n\timport { ref } from 'vue'\n\n\timport Loader from '@pf/src/components/Loader/Loader.vue'\n\n\tconst props = defineProps({\n\t\tsubmit: {\n\t\t\ttype: Function,\n\t\t\tdefault: async () => { console.log('Button click.') }\n\t\t},\n\t\ttext: {\n\t\t\ttype: Object,\n\t\t\tdefault: (textComponent) => {\n\t\t\t\
|
1
|
+
{"version":3,"file":"Button.vue.js","sources":["../../../../../src/components/Button/Button.vue"],"sourcesContent":["<script setup>\n\timport { ref } from 'vue'\n\n\timport Loader from '@pf/src/components/Loader/Loader.vue'\n\n\tconst props = defineProps({\n\t\tsubmit: {\n\t\t\ttype: Function,\n\t\t\tdefault: async () => { console.log('Button click.') }\n\t\t},\n\t\ttext: {\n\t\t\ttype: Object,\n\t\t\tdefault: (textComponent) => {\n\t\t\t\treturn textComponent = {\n\t\t\t\t\t...textComponent.text,\n\t\t\t\t\tsuccess: '✔',\n\t\t\t\t\terror: '✖'\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcounter: {\n\t type: Object\n\t },\n\t\tcallback: {\n\t\t\ttype: Function,\n\t\t\tdefault: async () => { console.log('Button callback.') }\n\t\t},\n\t\tcallbackDelay: {\n\t\t\ttype: Number,\n\t\t\tdefault: 750\n\t\t},\n\t\tshowSucces: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true\n\t\t},\n\t\tshowLoader: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true\n\t\t},\n\t\tvalidation: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t})\t\n\n\tconst emits = defineEmits(['error'])\n\n\tconst button = ref(null);\n\tconst error = ref(null);\n\tconst loading = ref(false);\n\tconst finished = ref(false);\n\n\tasync function Submit() {\n\t button.value.style['pointer-events'] = 'none';\n\t error.value = null;\n\t loading.value = true;\n\n\t // Функция для сброса состояния кнопки.\n\t const resetButton = () => {\n\t if (button.value) {\n button.value.classList.replace('bg-second', 'bg-main');\n button.value.style.pointerEvents = 'auto';\n loading.value = false;\n finished.value = false;\n error.value = null;\n\t }\n\t };\n\n\t try {\n\t await props.submit();\n\n\t button.value.classList.replace('bg-main', 'bg-second');\n\n\t loading.value = false;\n\n\t // Используем функцию сброса состояния кнопки здесь.\n\t if (props.showSucces) { \n\t\t\t\t\t\t\tfinished.value = true;\n\t setTimeout(resetButton, 500);\n\t } else {\n\t resetButton();\n\t }\n\n\t // Если есть callback, мы также установим таймер для его вызова.\n\t if (props.callback) setTimeout(() => props.callback(), props.callbackDelay);\n\n\t } catch (err) {\n\t \t\temits('error',err)\n\t // Если возникла ошибка, мы изменяем стили и устанавливаем сообщение об ошибке.\n\t button.value.classList.replace('bg-main', 'bg-fourth-nano');\n\t error.value = props.error;\n\t \n\t // После задержки снова сбрасываем состояние кнопки.\n\t setTimeout(() => {\n\t resetButton();\n\t // Так как класс кнопки был изменен, вернем его в исходное состояние.\n\t button.value.classList.replace('bg-fourth-nano', 'bg-main');\n\t }, 1330);\n\t }\n\t}\n\n</script>\n\n<template>\n\t<button @click.stop=\"Submit\" :disabled=\"validation\" ref=\"button\" class=\"button\">\n\t\t<transition name=\"FromTop\" >\n\t\t\t<!-- Slot -->\n\t\t\t<span v-if=\"!loading && !error && !finished || !showLoader\"><slot></slot></span>\n\t\t\t<!-- Loading Circle Animation -->\n\t\t\t<span v-else-if=\"loading && !error && showLoader\"><Loader class=\"pos-relative pos-t-0 pos-l-0 loading\"/></span>\n\t\t\t<!-- <Loader v-else-if=\"loading && !error && showLoader\"/> -->\n\t\t\t<!-- Success -->\n\t\t\t<span v-else-if=\"finished && showSucces\" class=\"t-semi loading t-black\">{{text.success}}</span>\n\t\t\t<!-- Error if not finished -->\n\t\t\t<span v-else-if=\"error\" class=\"error\">{{ error }}</span>\n\t\t</transition>\n\t\t<!-- Counter -->\n\t\t<p v-if=\"counter\" class=\"button-counter\">{{counter}}</p> \n\n\t</button> \n</template>\n\n\n<style lang=\"scss\">\n\tbutton[disabled] {\n\t\tbackground: grey; \n\t\t&:hover {\n\t\t\tbackground: grey; \n\t\t} \n\t}\n\n\t.FromTop-enter-active,\n\t.FromTop-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.FromTop-enter-from,\n\t.FromTop-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\n\t.button {\n\t\tdisplay: flex;\n\t\twidth: fit-content;\n\n\t\tpadding: 1rem 1.75rem;\n\t\tborder-radius: 3rem;\n\n\t\ttransform: scale(1);\n\t\topacity: 1;\n\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\t\n\t\tcolor: black;\n\t\ttext-align: center;\n\t\ttext-transform: uppercase;\n\t\tfont-size: 1rem;\n\t\tletter-spacing: 5%;\n\n\t\ttransition: all 0.33s ease;\n\t \n\t\t&:hover {\n\t\t\tcursor: pointer;\n\t\t\topacity: 0.9;\n\t\t}\n\n\t\t&:active {\n\t\t\ttransform: scale(0.95);\n\t\t}\n\n\t\t&-small {\n\t\t\tpadding: 0.5rem 0.75rem;\n\t\t\tborder-radius: 0.5rem;\n\t\t\theight: fit-content;\n\t\t}\n\n\t\t.button-counter {\n\t\t\tposition: absolute;\n\t\t\tright: -8px;\n\t bottom: -8px;\n\t background: yellow;\n\t height: 16px;\n\t border-radius: 16px;\n\t width: 16px;\n\t font-weight: 500;\n\t text-align: center;\n\t line-height: 16px;\n\t font-size: 10px;\n\t\t}\n\t}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKC,UAAM,QAAQ;AAwCd,UAAM,QAAQ;AAEd,UAAM,SAAS,IAAI,IAAI;AACvB,UAAM,QAAQ,IAAI,IAAI;AACtB,UAAM,UAAU,IAAI,KAAK;AACzB,UAAM,WAAW,IAAI,KAAK;AAE1B,mBAAe,SAAS;AACpB,aAAO,MAAM,MAAM,gBAAgB,IAAI;AACvC,YAAM,QAAQ;AACd,cAAQ,QAAQ;AAGhB,YAAM,cAAc,MAAM;AACtB,YAAI,OAAO,OAAO;AACf,iBAAO,MAAM,UAAU,QAAQ,aAAa,SAAS;AACrD,iBAAO,MAAM,MAAM,gBAAgB;AACnC,kBAAQ,QAAQ;AAChB,mBAAS,QAAQ;AACjB,gBAAM,QAAQ;AAAA,QAChB;AAAA,MACV;AAEK,UAAI;AACA,cAAM,MAAM;AAEZ,eAAO,MAAM,UAAU,QAAQ,WAAW,WAAW;AAErD,gBAAQ,QAAQ;AAGhB,YAAI,MAAM,YAAY;AACxB,mBAAS,QAAQ;AACX,qBAAW,aAAa,GAAG;AAAA,QACxC,OAAgB;AACH;QACH;AAGD,YAAI,MAAM,SAAU,YAAW,MAAM,MAAM,SAAU,GAAE,MAAM,aAAa;AAAA,MAE7E,SAAQ,KAAK;AACZ,cAAM,SAAQ,GAAG;AAEf,eAAO,MAAM,UAAU,QAAQ,WAAW,gBAAgB;AAC1D,cAAM,QAAQ,MAAM;AAGpB,mBAAW,MAAM;AACb;AAEA,iBAAO,MAAM,UAAU,QAAQ,kBAAkB,SAAS;AAAA,QAC7D,GAAE,IAAI;AAAA,MACV;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -2,9 +2,9 @@
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
4
|
const SkeletonEvent = require("../../modules/icons/skeletons/SkeletonEvent.vue.cjs");
|
5
|
-
const Loader = require("../Loader/Loader.
|
5
|
+
const Loader = require("../Loader/Loader.vue2.cjs");
|
6
6
|
const EmptyState = require("../EmptyState/EmptyState.vue.cjs");
|
7
|
-
const Dropdown = require("../Dropdown/Dropdown.
|
7
|
+
const Dropdown = require("../Dropdown/Dropdown.vue2.cjs");
|
8
8
|
const Calendar = require("../DatePicker/Calendar.vue2.cjs");
|
9
9
|
const BottomSheet = require("../BottomSheet/BottomSheet.vue.cjs");
|
10
10
|
const BlockSearch = require("../../modules/globals/views/components/blocks/BlockSearch.vue.cjs");
|
@@ -87,7 +87,7 @@ const _sfc_main = {
|
|
87
87
|
const date = vue.useModel(__props, "date");
|
88
88
|
const items = vue.useModel(__props, "items");
|
89
89
|
const props = __props;
|
90
|
-
const itemsList = vue.
|
90
|
+
const itemsList = vue.shallowRef(items.value || []);
|
91
91
|
const hasMoreItems = vue.ref(false);
|
92
92
|
let isLoading = vue.ref(true);
|
93
93
|
let isLoadingExtra = vue.ref(false);
|
@@ -95,11 +95,21 @@ const _sfc_main = {
|
|
95
95
|
let currentSkip = vue.ref(props.options.skip ? props.options.skip : 0);
|
96
96
|
let currentLimit = vue.ref(props.options.limit ? props.options.limit : 10);
|
97
97
|
let currentSearch = vue.ref("");
|
98
|
-
function
|
99
|
-
|
98
|
+
function debounce(fn, delay) {
|
99
|
+
let timeoutId = null;
|
100
|
+
return (...args) => {
|
101
|
+
clearTimeout(timeoutId);
|
102
|
+
timeoutId = setTimeout(() => fn(...args), delay);
|
103
|
+
};
|
104
|
+
}
|
105
|
+
const debouncedSearch = debounce((value) => {
|
106
|
+
currentSearch.value = value;
|
100
107
|
currentSkip.value = 0;
|
101
108
|
currentLimit.value = 10;
|
102
109
|
fetchItems();
|
110
|
+
}, 300);
|
111
|
+
function updateSearch(search2) {
|
112
|
+
debouncedSearch(search2);
|
103
113
|
}
|
104
114
|
const loadMoreItems = async () => {
|
105
115
|
isLoadingExtra.value = true;
|
@@ -128,6 +138,7 @@ const _sfc_main = {
|
|
128
138
|
isLoadingExtra.value = false;
|
129
139
|
};
|
130
140
|
const fetchItems = async () => {
|
141
|
+
isLoading.value = true;
|
131
142
|
const data = await props.store.read({
|
132
143
|
skip: currentSkip.value,
|
133
144
|
limit: currentLimit.value,
|
@@ -149,42 +160,16 @@ const _sfc_main = {
|
|
149
160
|
if (items.value) items.value = itemsList.value;
|
150
161
|
isLoading.value = false;
|
151
162
|
};
|
152
|
-
vue.watch(
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
}
|
163
|
-
}, { deep: true });
|
164
|
-
vue.watch(() => {
|
165
|
-
var _a;
|
166
|
-
return (_a = sort.value) == null ? void 0 : _a.order;
|
167
|
-
}, (newVal, oldVal) => {
|
168
|
-
if (newVal !== oldVal) {
|
169
|
-
currentSkip.value = 0;
|
170
|
-
fetchItems();
|
171
|
-
}
|
172
|
-
});
|
173
|
-
vue.watch(() => {
|
174
|
-
var _a;
|
175
|
-
return (_a = sort.value) == null ? void 0 : _a.param;
|
176
|
-
}, (newVal, oldVal) => {
|
177
|
-
if (newVal !== oldVal) {
|
178
|
-
currentSkip.value = 0;
|
179
|
-
fetchItems();
|
180
|
-
}
|
181
|
-
});
|
182
|
-
vue.watch(() => props.options, (newVal, oldVal) => {
|
183
|
-
if (newVal.organization !== oldVal.organization || newVal.categories !== oldVal.categories || newVal.prices !== oldVal.prices || newVal.delivery !== oldVal.delivery || newVal.search !== oldVal.search || newVal.status !== oldVal.status || newVal.hidden !== oldVal.hidden || newVal.type !== oldVal.type || newVal.tags !== oldVal.tags || newVal.following !== oldVal.following) {
|
184
|
-
currentSkip.value = 0;
|
185
|
-
fetchItems();
|
186
|
-
}
|
187
|
-
}, { deep: true });
|
163
|
+
vue.watch(
|
164
|
+
() => [props.external, date.value, sort.value, props.options],
|
165
|
+
([newExternal, newDate, newSort, newOptions], [oldExternal, oldDate, oldSort, oldOptions]) => {
|
166
|
+
if (newExternal !== oldExternal || newDate !== oldDate || (newSort == null ? void 0 : newSort.order) !== (oldSort == null ? void 0 : oldSort.order) || (newSort == null ? void 0 : newSort.param) !== (oldSort == null ? void 0 : oldSort.param) || JSON.stringify(newOptions) !== JSON.stringify(oldOptions)) {
|
167
|
+
currentSkip.value = 0;
|
168
|
+
fetchItems();
|
169
|
+
}
|
170
|
+
},
|
171
|
+
{ deep: true }
|
172
|
+
);
|
188
173
|
let observer = null;
|
189
174
|
vue.onMounted(async () => {
|
190
175
|
await fetchItems();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Feed.vue.cjs","sources":["../../../../../src/components/Feed/Feed.vue"],"sourcesContent":["<template>\n\n <div v-if=\"search || date || (sort && !sort.hideButton)\" class=\"flex-nowrap flex gap-thin\">\n\n <BlockSearch \n v-if=\"search\"\n :placeholder=\"search.placeholder || 'Search...'\"\n :class=\"search.class || 'bg-light'\"\n @search=\"updateSearch\"\n />\n\n <template\n v-if=\"filter\"\n >\n <div \n :class=\"filter.class || 'bg-light'\"\n class=\"flex-center flex pd-thin bg-light radius-extra aspect-1x1 h-100\"\n >\n <IconFilter @click=\"() => filter.active = !filter.active\" class=\"w-1r h-auto\"/>\n </div>\n\n \n <BottomSheet\n v-if=\"filter.active\"\n :show=\"filter.active\"\n @toggle=\"() => filter.active = false\"\n class=\"z-index-10 pos-fixed pos-t-0 pos-r-0\"\n :class=\"{\n 'pos-t-0': filter.active,\n 'pos-t-100': !filter.active\n }\"\n >\n <BlockFilter\n v-model:filter=\"filter\"\n :options=\"filter.options\"\n class=\"h-100 w-100 pd-small bg-light\"\n />\n </BottomSheet> \n </template>\n\n <Dropdown \n v-if=\"date\"\n :label=\"{\n component: ButtonDate,\n props: { date: date }\n }\" \n :class=\"date.class || 'bg-light'\"\n class=\"flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-big\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <Calendar\n v-model:date=\"date\"\n :locale=\"$i18n.locale\"\n :allowRange=\"true\"\n class=\"radius-semi w-100 o-hidden bg-light\"\n />\n </Dropdown> \n\n <Dropdown \n v-if=\"sort && !sort.hideButton\"\n :label=\"{\n component: ButtonSort,\n props: { order: sort.order },\n class: 'w-1r'\n }\" \n :class=\"sort.class || 'bg-light'\"\n class=\"radius-extra aspect-1x1 h-100\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <BlockSorting\n v-model:param=\"sort.param\"\n v-model:order=\"sort.order\"\n :options=\"sort.options\"\n class=\"h-100 pd-small radius-semi t-white bg-black\"\n />\n </Dropdown> \n </div>\n\n <TransitionGroup \n\n v-if=\"isLoading\"\n tag=\"ul\" \n name=\"scaleTransition\" \n >\n <SkeletonEvent\n v-if=\"isLoading\"\n v-for=\"i in currentLimit\" \n :key=\"'skeleton-' + i\"\n class=\"mn-b-small radius-big o-hidden d-block\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n v-if=\"!isLoading && itemsList.length < 1\"\n name=\"feed\"\n >\n <EmptyState\n v-if=\"!isLoading && itemsList.length < 1\"\n :title=\"states.empty.title\"\n :description=\"states.empty.description\"\n :action=\"states.empty.action\"\n :callback=\"states.empty.callback\"\n class=\"pd-medium mn-b-thin bg-light radius-big\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n name=\"feed\"\n :class=\"$attrs.class\"\n >\n <slot\n v-if=\"!isLoading && itemsList.length > 0\"\n :items=\"itemsList\"\n >\n </slot>\n </TransitionGroup>\n\n <button\n v-if=\"showLoadMore && hasMoreItems && itemsList.length > 0 && !isLoadingExtra\"\n @click=\"loadMoreItems\"\n class=\"col-w-100 mn-t-thin w-100 t-black bg-main button\"\n >\n Load More\n </button>\n\n <div v-else key=\"sentinel\" ref=\"sentinel\" class=\"sentinel\"></div> \n\n <div\n\n v-if=\"isLoadingExtra\"\n class=\"col-w-100 w-100 pos-relative\"\n >\n <Loader/>\n </div>\n \n\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, onUnmounted, watch } from 'vue';\n\nimport SkeletonEvent from '@pf/src/modules/icons/skeletons/SkeletonEvent.vue'\n\nimport Loader from '@pf/src/components/Loader/Loader.vue';\nimport EmptyState from '@pf/src/components/EmptyState/EmptyState.vue';\nimport Dropdown from \"@pf/src/components/Dropdown/Dropdown.vue\";\nimport Calendar from '@pf/src/components/DatePicker/Calendar.vue'\nimport BottomSheet from '@pf/src/components/BottomSheet/BottomSheet.vue';\n\nimport BlockSearch from '@pf/src/modules/globals/views/components/blocks/BlockSearch.vue'\nimport BlockSorting from '@pf/src/modules/globals/views/components/blocks/BlockSorting.vue'\nimport BlockFilter from '@pf/src/modules/globals/views/components/blocks/BlockFilter.vue'\n\nimport ButtonSort from '@pf/src/modules/globals/views/components/elements/ButtonSort.vue'\nimport ButtonDate from '@pf/src/modules/globals/views/components/elements/ButtonDate.vue'\n\nimport IconFilter from '@pf/src/modules/icons/navigation/IconFilter.vue'\nimport IconEvents from '@pf/src/modules/icons/entities/IconEvents.vue'\n\nconst search = defineModel('search')\nconst sort = defineModel('sort')\nconst filter = defineModel('filter')\nconst date = defineModel('date')\nconst items = defineModel('items')\n\n// Пропсы\nconst props = defineProps({\n showLoadMore: {\n type: Boolean,\n default: true\n },\n search: {\n type: [Boolean, Object],\n default: false\n },\n states: {\n type: Object,\n default: () => ({\n empty: {\n title: String,\n description: String,\n },\n }),\n },\n store: {\n type: Object,\n default: () => ({\n read: Function,\n state: Object,\n }),\n },\n external: {\n type: Boolean,\n default: false\n },\n options: {\n type: Object,\n default: () => ({\n category: null,\n limit: 20, \n skip: 0 ,\n owner: null,\n creator: null,\n user: null,\n status: null,\n period: null,\n contain: null,\n }),\n },\n});\n \nconst itemsList = ref(items.value || []);\nconst hasMoreItems = ref(false);\n\nlet isLoading = ref(true);\nlet isLoadingExtra = ref(false);\nlet sentinel = ref(null)\n\nlet currentSkip = ref(props.options.skip ? props.options.skip : 0);\nlet currentLimit = ref(props.options.limit ? props.options.limit : 10);\n\n// let sortParam = ref(sort.value?.param || 'createdAt');\n// let sortOrder = ref(sort.value?.order || 'asc');\n\nlet currentSearch = ref('');\n\nfunction updateSearch(search) {\n currentSearch.value = search\n currentSkip.value = 0\n currentLimit.value = 10\n\n fetchItems();\n}\n\nconst loadMoreItems = async () => {\n isLoadingExtra.value = true\n\n if (hasMoreItems.value) {\n currentSkip.value += currentLimit.value;\n \n const data = await props.store.read({\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value ? date.value.start : null,\n dateEnd: date.value ? date.value.end : null,\n sortParam: sort.value ? sort.value.param : null,\n sortOrder: sort.value ? sort.value.order : null,\n ...props.options\n });\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = [...itemsList.value, ...data];\n \n if (items.value) items.value = itemsList.value;\n }\n\n isLoadingExtra.value = false\n};\n\nconst fetchItems = async () => {\n const data = await props.store.read({\n skip: currentSkip.value,\n limit: currentLimit.value,\n dateStart: date.value ? date.value.start : null,\n dateEnd: date.value ? date.value.end : null,\n sortParam: sort.value ? sort.value.param : null,\n sortOrder: sort.value ? sort.value.order : null,\n search: currentSearch.value,\n ...props.options\n });\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = data;\n if (items.value) items.value = itemsList.value;\n isLoading.value = false;\n};\n\n\nwatch(() => props.external, (newVal, oldVal) => {\n if (newVal !== oldVal) {\n currentSkip.value = 0\n fetchItems();\n }\n}, { deep: true });\n\nwatch(() => date.value, (newVal, oldVal) => {\n if (newVal !== oldVal) {\n currentSkip.value = 0\n fetchItems();\n }\n}, { deep: true });\n\nwatch(() => sort.value?.order, (newVal, oldVal) => {\n\n if (newVal !== oldVal) {\n currentSkip.value = 0\n fetchItems();\n }\n});\n\nwatch(() => sort.value?.param, (newVal, oldVal) => {\n\n if (newVal !== oldVal) {\n currentSkip.value = 0\n fetchItems();\n }\n});\n\n\nwatch(() => props.options, (newVal, oldVal) => {\n if (\n newVal.organization !== oldVal.organization ||\n newVal.categories !== oldVal.categories ||\n newVal.prices !== oldVal.prices ||\n newVal.delivery !== oldVal.delivery ||\n newVal.search !== oldVal.search ||\n newVal.status !== oldVal.status ||\n newVal.hidden !== oldVal.hidden ||\n newVal.type !== oldVal.type ||\n newVal.tags !== oldVal.tags || \n newVal.following !== oldVal.following\n ) {\n currentSkip.value = 0\n fetchItems();\n }\n}, { deep: true });\n\nlet observer = null\n\nonMounted(async () => {\n await fetchItems()\n\n if (typeof window !== 'undefined' && !props.showLoadMore) {\n observer = new IntersectionObserver(entries => {\n if (entries.some(entry => entry.isIntersecting)) {\n loadMoreItems()\n }\n })\n\n if (sentinel.value) observer.observe(sentinel.value)\n }\n});\n\nonUnmounted(() => {\n if (observer) {\n observer.disconnect();\n }\n});\n</script>\n\n\n<style>\n.feed-move, /* apply transition to moving elements */\n.feed-enter-active,\n.feed-leave-active {\n transition: all 0.5s ease;\n}\n\n.feed-enter-from,\n.feed-leave-to {\n opacity: 0;\n transform: translateY(30px);\n}\n\n/* ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n.feed-leave-active {\n position: absolute;\n}\n</style>"],"names":["_useModel","ref","search","watch","onMounted","onUnmounted"],"mappings":";;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"Feed.vue.cjs","sources":["../../../../../src/components/Feed/Feed.vue"],"sourcesContent":["<template>\n\n <div v-if=\"search || date || (sort && !sort.hideButton)\" class=\"flex-nowrap flex gap-thin\">\n\n <BlockSearch \n v-if=\"search\"\n :placeholder=\"search.placeholder || 'Search...'\"\n :class=\"search.class || 'bg-light'\"\n @search=\"updateSearch\"\n />\n\n <template\n v-if=\"filter\"\n >\n <div \n :class=\"filter.class || 'bg-light'\"\n class=\"flex-center flex pd-thin bg-light radius-extra aspect-1x1 h-100\"\n >\n <IconFilter @click=\"() => filter.active = !filter.active\" class=\"w-1r h-auto\"/>\n </div>\n\n \n <BottomSheet\n v-if=\"filter.active\"\n :show=\"filter.active\"\n @toggle=\"() => filter.active = false\"\n class=\"z-index-10 pos-fixed pos-t-0 pos-r-0\"\n :class=\"{\n 'pos-t-0': filter.active,\n 'pos-t-100': !filter.active\n }\"\n >\n <BlockFilter\n v-model:filter=\"filter\"\n :options=\"filter.options\"\n class=\"h-100 w-100 pd-small bg-light\"\n />\n </BottomSheet> \n </template>\n\n <Dropdown \n v-if=\"date\"\n :label=\"{\n component: ButtonDate,\n props: { date: date }\n }\" \n :class=\"date.class || 'bg-light'\"\n class=\"flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-big\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <Calendar\n v-model:date=\"date\"\n :locale=\"$i18n.locale\"\n :allowRange=\"true\"\n class=\"radius-semi w-100 o-hidden bg-light\"\n />\n </Dropdown> \n\n <Dropdown \n v-if=\"sort && !sort.hideButton\"\n :label=\"{\n component: ButtonSort,\n props: { order: sort.order },\n class: 'w-1r'\n }\" \n :class=\"sort.class || 'bg-light'\"\n class=\"radius-extra aspect-1x1 h-100\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <BlockSorting\n v-model:param=\"sort.param\"\n v-model:order=\"sort.order\"\n :options=\"sort.options\"\n class=\"h-100 pd-small radius-semi t-white bg-black\"\n />\n </Dropdown> \n </div>\n\n <TransitionGroup \n\n v-if=\"isLoading\"\n tag=\"ul\" \n name=\"scaleTransition\" \n >\n <SkeletonEvent\n v-if=\"isLoading\"\n v-for=\"i in currentLimit\" \n :key=\"'skeleton-' + i\"\n class=\"mn-b-small radius-big o-hidden d-block\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n v-if=\"!isLoading && itemsList.length < 1\"\n name=\"feed\"\n >\n <EmptyState\n v-if=\"!isLoading && itemsList.length < 1\"\n :title=\"states.empty.title\"\n :description=\"states.empty.description\"\n :action=\"states.empty.action\"\n :callback=\"states.empty.callback\"\n class=\"pd-medium mn-b-thin bg-light radius-big\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n name=\"feed\"\n :class=\"$attrs.class\"\n >\n <slot\n v-if=\"!isLoading && itemsList.length > 0\"\n :items=\"itemsList\"\n >\n </slot>\n </TransitionGroup>\n\n <button\n v-if=\"showLoadMore && hasMoreItems && itemsList.length > 0 && !isLoadingExtra\"\n @click=\"loadMoreItems\"\n class=\"col-w-100 mn-t-thin w-100 t-black bg-main button\"\n >\n Load More\n </button>\n\n <div v-else key=\"sentinel\" ref=\"sentinel\" class=\"sentinel\"></div> \n\n <div\n\n v-if=\"isLoadingExtra\"\n class=\"col-w-100 w-100 pos-relative\"\n >\n <Loader/>\n </div>\n \n\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, onUnmounted, shallowRef, watch } from 'vue';\n\nimport SkeletonEvent from '@pf/src/modules/icons/skeletons/SkeletonEvent.vue'\n\nimport Loader from '@pf/src/components/Loader/Loader.vue';\nimport EmptyState from '@pf/src/components/EmptyState/EmptyState.vue';\nimport Dropdown from \"@pf/src/components/Dropdown/Dropdown.vue\";\nimport Calendar from '@pf/src/components/DatePicker/Calendar.vue'\nimport BottomSheet from '@pf/src/components/BottomSheet/BottomSheet.vue';\n\nimport BlockSearch from '@pf/src/modules/globals/views/components/blocks/BlockSearch.vue'\nimport BlockSorting from '@pf/src/modules/globals/views/components/blocks/BlockSorting.vue'\nimport BlockFilter from '@pf/src/modules/globals/views/components/blocks/BlockFilter.vue'\n\nimport ButtonSort from '@pf/src/modules/globals/views/components/elements/ButtonSort.vue'\nimport ButtonDate from '@pf/src/modules/globals/views/components/elements/ButtonDate.vue'\n\nimport IconFilter from '@pf/src/modules/icons/navigation/IconFilter.vue'\nimport IconEvents from '@pf/src/modules/icons/entities/IconEvents.vue'\n\nconst search = defineModel('search')\nconst sort = defineModel('sort')\nconst filter = defineModel('filter')\nconst date = defineModel('date')\nconst items = defineModel('items')\n\n// Пропсы\nconst props = defineProps({\n showLoadMore: {\n type: Boolean,\n default: true\n },\n search: {\n type: [Boolean, Object],\n default: false\n },\n states: {\n type: Object,\n default: () => ({\n empty: {\n title: String,\n description: String,\n },\n }),\n },\n store: {\n type: Object,\n default: () => ({\n read: Function,\n state: Object,\n }),\n },\n external: {\n type: Boolean,\n default: false\n },\n options: {\n type: Object,\n default: () => ({\n category: null,\n limit: 20, \n skip: 0 ,\n owner: null,\n creator: null,\n user: null,\n status: null,\n period: null,\n contain: null,\n }),\n },\n});\n \nconst itemsList = shallowRef(items.value || []);\nconst hasMoreItems = ref(false);\n\nlet isLoading = ref(true);\nlet isLoadingExtra = ref(false);\nlet sentinel = ref(null)\n\nlet currentSkip = ref(props.options.skip ? props.options.skip : 0);\nlet currentLimit = ref(props.options.limit ? props.options.limit : 10);\n\n// let sortParam = ref(sort.value?.param || 'createdAt');\n// let sortOrder = ref(sort.value?.order || 'asc');\n\nlet currentSearch = ref('');\n\nfunction debounce(fn, delay) {\n let timeoutId = null;\n return (...args) => {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn(...args), delay);\n };\n}\n\nconst debouncedSearch = debounce((value) => {\n currentSearch.value = value;\n currentSkip.value = 0;\n currentLimit.value = 10;\n fetchItems();\n}, 300);\n\nfunction updateSearch(search) {\n debouncedSearch(search);\n}\n\nconst loadMoreItems = async () => {\n isLoadingExtra.value = true\n\n if (hasMoreItems.value) {\n currentSkip.value += currentLimit.value;\n \n const data = await props.store.read({\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value ? date.value.start : null,\n dateEnd: date.value ? date.value.end : null,\n sortParam: sort.value ? sort.value.param : null,\n sortOrder: sort.value ? sort.value.order : null,\n ...props.options\n });\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = [...itemsList.value, ...data];\n \n if (items.value) items.value = itemsList.value;\n }\n\n isLoadingExtra.value = false\n};\n\nconst fetchItems = async () => {\n isLoading.value = true;\n const data = await props.store.read({\n skip: currentSkip.value,\n limit: currentLimit.value,\n dateStart: date.value ? date.value.start : null,\n dateEnd: date.value ? date.value.end : null,\n sortParam: sort.value ? sort.value.param : null,\n sortOrder: sort.value ? sort.value.order : null,\n search: currentSearch.value,\n ...props.options\n });\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = data;\n if (items.value) items.value = itemsList.value;\n isLoading.value = false;\n};\n\nwatch(\n () => [props.external, date.value, sort.value, props.options],\n ([newExternal, newDate, newSort, newOptions], [oldExternal, oldDate, oldSort, oldOptions]) => {\n if (\n newExternal !== oldExternal ||\n newDate !== oldDate ||\n newSort?.order !== oldSort?.order ||\n newSort?.param !== oldSort?.param ||\n JSON.stringify(newOptions) !== JSON.stringify(oldOptions)\n ) {\n currentSkip.value = 0;\n fetchItems();\n }\n },\n { deep: true }\n);\n\nlet observer = null\n\nonMounted(async () => {\n await fetchItems()\n\n if (typeof window !== 'undefined' && !props.showLoadMore) {\n observer = new IntersectionObserver(entries => {\n if (entries.some(entry => entry.isIntersecting)) {\n loadMoreItems()\n }\n })\n\n if (sentinel.value) observer.observe(sentinel.value)\n }\n});\n\nonUnmounted(() => {\n if (observer) {\n observer.disconnect();\n }\n});\n</script>\n\n\n<style>\n.feed-move, /* apply transition to moving elements */\n.feed-enter-active,\n.feed-leave-active {\n transition: all 0.5s ease;\n}\n\n.feed-enter-from,\n.feed-leave-to {\n opacity: 0;\n transform: translateY(30px);\n}\n\n/* ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n.feed-leave-active {\n position: absolute;\n}\n</style>"],"names":["_useModel","shallowRef","ref","search","watch","onMounted","onUnmounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmKA,UAAM,SAASA,IAAAA,SAAY,SAAA,QAAQ;AACnC,UAAM,OAAOA,IAAAA,kBAAY,MAAM;AAC/B,UAAM,SAASA,IAAAA,SAAY,SAAA,QAAQ;AACnC,UAAM,OAAOA,IAAAA,kBAAY,MAAM;AAC/B,UAAM,QAAQA,IAAAA,kBAAY,OAAO;AAGjC,UAAM,QAAQ;AA6Cd,UAAM,YAAYC,IAAAA,WAAW,MAAM,SAAS,CAAE,CAAA;AAC9C,UAAM,eAAeC,IAAAA,IAAI,KAAK;AAE9B,QAAI,YAAYA,IAAAA,IAAI,IAAI;AACxB,QAAI,iBAAiBA,IAAAA,IAAI,KAAK;AAC9B,QAAI,WAAWA,IAAG,IAAC,IAAI;AAEvB,QAAI,cAAcA,IAAAA,IAAI,MAAM,QAAQ,OAAO,MAAM,QAAQ,OAAO,CAAC;AACjE,QAAI,eAAeA,IAAAA,IAAI,MAAM,QAAQ,QAAQ,MAAM,QAAQ,QAAQ,EAAE;AAKrE,QAAI,gBAAgBA,IAAAA,IAAI,EAAE;AAE1B,aAAS,S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,MACpD;AAAA,IACH,CAAC;AAEDC,QAAAA,YAAY,MAAM;AAChB,UAAI,UAAU;AACZ,iBAAS,WAAU;AAAA,MACpB;AAAA,IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { mergeModels, useModel, ref, watch, onMounted, onUnmounted, openBlock, createElementBlock, Fragment, createBlock, normalizeClass, createCommentVNode, createElementVNode, createVNode, withCtx, unref, TransitionGroup, renderList, renderSlot } from "vue";
|
1
|
+
import { mergeModels, useModel, shallowRef, ref, watch, onMounted, onUnmounted, openBlock, createElementBlock, Fragment, createBlock, normalizeClass, createCommentVNode, createElementVNode, createVNode, withCtx, unref, TransitionGroup, renderList, renderSlot } from "vue";
|
2
2
|
import SkeletonEvent from "../../modules/icons/skeletons/SkeletonEvent.vue.js";
|
3
|
-
import Loader from "../Loader/Loader.
|
3
|
+
import Loader from "../Loader/Loader.vue2.js";
|
4
4
|
import _sfc_main$a from "../EmptyState/EmptyState.vue.js";
|
5
|
-
import _sfc_main$5 from "../Dropdown/Dropdown.
|
5
|
+
import _sfc_main$5 from "../Dropdown/Dropdown.vue2.js";
|
6
6
|
import _sfc_main$7 from "../DatePicker/Calendar.vue2.js";
|
7
7
|
import _sfc_main$3 from "../BottomSheet/BottomSheet.vue.js";
|
8
8
|
import _sfc_main$1 from "../../modules/globals/views/components/blocks/BlockSearch.vue.js";
|
@@ -85,7 +85,7 @@ const _sfc_main = {
|
|
85
85
|
const date = useModel(__props, "date");
|
86
86
|
const items = useModel(__props, "items");
|
87
87
|
const props = __props;
|
88
|
-
const itemsList =
|
88
|
+
const itemsList = shallowRef(items.value || []);
|
89
89
|
const hasMoreItems = ref(false);
|
90
90
|
let isLoading = ref(true);
|
91
91
|
let isLoadingExtra = ref(false);
|
@@ -93,11 +93,21 @@ const _sfc_main = {
|
|
93
93
|
let currentSkip = ref(props.options.skip ? props.options.skip : 0);
|
94
94
|
let currentLimit = ref(props.options.limit ? props.options.limit : 10);
|
95
95
|
let currentSearch = ref("");
|
96
|
-
function
|
97
|
-
|
96
|
+
function debounce(fn, delay) {
|
97
|
+
let timeoutId = null;
|
98
|
+
return (...args) => {
|
99
|
+
clearTimeout(timeoutId);
|
100
|
+
timeoutId = setTimeout(() => fn(...args), delay);
|
101
|
+
};
|
102
|
+
}
|
103
|
+
const debouncedSearch = debounce((value) => {
|
104
|
+
currentSearch.value = value;
|
98
105
|
currentSkip.value = 0;
|
99
106
|
currentLimit.value = 10;
|
100
107
|
fetchItems();
|
108
|
+
}, 300);
|
109
|
+
function updateSearch(search2) {
|
110
|
+
debouncedSearch(search2);
|
101
111
|
}
|
102
112
|
const loadMoreItems = async () => {
|
103
113
|
isLoadingExtra.value = true;
|
@@ -126,6 +136,7 @@ const _sfc_main = {
|
|
126
136
|
isLoadingExtra.value = false;
|
127
137
|
};
|
128
138
|
const fetchItems = async () => {
|
139
|
+
isLoading.value = true;
|
129
140
|
const data = await props.store.read({
|
130
141
|
skip: currentSkip.value,
|
131
142
|
limit: currentLimit.value,
|
@@ -147,42 +158,16 @@ const _sfc_main = {
|
|
147
158
|
if (items.value) items.value = itemsList.value;
|
148
159
|
isLoading.value = false;
|
149
160
|
};
|
150
|
-
watch(
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
}
|
161
|
-
}, { deep: true });
|
162
|
-
watch(() => {
|
163
|
-
var _a;
|
164
|
-
return (_a = sort.value) == null ? void 0 : _a.order;
|
165
|
-
}, (newVal, oldVal) => {
|
166
|
-
if (newVal !== oldVal) {
|
167
|
-
currentSkip.value = 0;
|
168
|
-
fetchItems();
|
169
|
-
}
|
170
|
-
});
|
171
|
-
watch(() => {
|
172
|
-
var _a;
|
173
|
-
return (_a = sort.value) == null ? void 0 : _a.param;
|
174
|
-
}, (newVal, oldVal) => {
|
175
|
-
if (newVal !== oldVal) {
|
176
|
-
currentSkip.value = 0;
|
177
|
-
fetchItems();
|
178
|
-
}
|
179
|
-
});
|
180
|
-
watch(() => props.options, (newVal, oldVal) => {
|
181
|
-
if (newVal.organization !== oldVal.organization || newVal.categories !== oldVal.categories || newVal.prices !== oldVal.prices || newVal.delivery !== oldVal.delivery || newVal.search !== oldVal.search || newVal.status !== oldVal.status || newVal.hidden !== oldVal.hidden || newVal.type !== oldVal.type || newVal.tags !== oldVal.tags || newVal.following !== oldVal.following) {
|
182
|
-
currentSkip.value = 0;
|
183
|
-
fetchItems();
|
184
|
-
}
|
185
|
-
}, { deep: true });
|
161
|
+
watch(
|
162
|
+
() => [props.external, date.value, sort.value, props.options],
|
163
|
+
([newExternal, newDate, newSort, newOptions], [oldExternal, oldDate, oldSort, oldOptions]) => {
|
164
|
+
if (newExternal !== oldExternal || newDate !== oldDate || (newSort == null ? void 0 : newSort.order) !== (oldSort == null ? void 0 : oldSort.order) || (newSort == null ? void 0 : newSort.param) !== (oldSort == null ? void 0 : oldSort.param) || JSON.stringify(newOptions) !== JSON.stringify(oldOptions)) {
|
165
|
+
currentSkip.value = 0;
|
166
|
+
fetchItems();
|
167
|
+
}
|
168
|
+
},
|
169
|
+
{ deep: true }
|
170
|
+
);
|
186
171
|
let observer = null;
|
187
172
|
onMounted(async () => {
|
188
173
|
await fetchItems();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Feed.vue.js","sources":["../../../../../src/components/Feed/Feed.vue"],"sourcesContent":["<template>\n\n <div v-if=\"search || date || (sort && !sort.hideButton)\" class=\"flex-nowrap flex gap-thin\">\n\n <BlockSearch \n v-if=\"search\"\n :placeholder=\"search.placeholder || 'Search...'\"\n :class=\"search.class || 'bg-light'\"\n @search=\"updateSearch\"\n />\n\n <template\n v-if=\"filter\"\n >\n <div \n :class=\"filter.class || 'bg-light'\"\n class=\"flex-center flex pd-thin bg-light radius-extra aspect-1x1 h-100\"\n >\n <IconFilter @click=\"() => filter.active = !filter.active\" class=\"w-1r h-auto\"/>\n </div>\n\n \n <BottomSheet\n v-if=\"filter.active\"\n :show=\"filter.active\"\n @toggle=\"() => filter.active = false\"\n class=\"z-index-10 pos-fixed pos-t-0 pos-r-0\"\n :class=\"{\n 'pos-t-0': filter.active,\n 'pos-t-100': !filter.active\n }\"\n >\n <BlockFilter\n v-model:filter=\"filter\"\n :options=\"filter.options\"\n class=\"h-100 w-100 pd-small bg-light\"\n />\n </BottomSheet> \n </template>\n\n <Dropdown \n v-if=\"date\"\n :label=\"{\n component: ButtonDate,\n props: { date: date }\n }\" \n :class=\"date.class || 'bg-light'\"\n class=\"flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-big\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <Calendar\n v-model:date=\"date\"\n :locale=\"$i18n.locale\"\n :allowRange=\"true\"\n class=\"radius-semi w-100 o-hidden bg-light\"\n />\n </Dropdown> \n\n <Dropdown \n v-if=\"sort && !sort.hideButton\"\n :label=\"{\n component: ButtonSort,\n props: { order: sort.order },\n class: 'w-1r'\n }\" \n :class=\"sort.class || 'bg-light'\"\n class=\"radius-extra aspect-1x1 h-100\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <BlockSorting\n v-model:param=\"sort.param\"\n v-model:order=\"sort.order\"\n :options=\"sort.options\"\n class=\"h-100 pd-small radius-semi t-white bg-black\"\n />\n </Dropdown> \n </div>\n\n <TransitionGroup \n\n v-if=\"isLoading\"\n tag=\"ul\" \n name=\"scaleTransition\" \n >\n <SkeletonEvent\n v-if=\"isLoading\"\n v-for=\"i in currentLimit\" \n :key=\"'skeleton-' + i\"\n class=\"mn-b-small radius-big o-hidden d-block\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n v-if=\"!isLoading && itemsList.length < 1\"\n name=\"feed\"\n >\n <EmptyState\n v-if=\"!isLoading && itemsList.length < 1\"\n :title=\"states.empty.title\"\n :description=\"states.empty.description\"\n :action=\"states.empty.action\"\n :callback=\"states.empty.callback\"\n class=\"pd-medium mn-b-thin bg-light radius-big\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n name=\"feed\"\n :class=\"$attrs.class\"\n >\n <slot\n v-if=\"!isLoading && itemsList.length > 0\"\n :items=\"itemsList\"\n >\n </slot>\n </TransitionGroup>\n\n <button\n v-if=\"showLoadMore && hasMoreItems && itemsList.length > 0 && !isLoadingExtra\"\n @click=\"loadMoreItems\"\n class=\"col-w-100 mn-t-thin w-100 t-black bg-main button\"\n >\n Load More\n </button>\n\n <div v-else key=\"sentinel\" ref=\"sentinel\" class=\"sentinel\"></div> \n\n <div\n\n v-if=\"isLoadingExtra\"\n class=\"col-w-100 w-100 pos-relative\"\n >\n <Loader/>\n </div>\n \n\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, onUnmounted, watch } from 'vue';\n\nimport SkeletonEvent from '@pf/src/modules/icons/skeletons/SkeletonEvent.vue'\n\nimport Loader from '@pf/src/components/Loader/Loader.vue';\nimport EmptyState from '@pf/src/components/EmptyState/EmptyState.vue';\nimport Dropdown from \"@pf/src/components/Dropdown/Dropdown.vue\";\nimport Calendar from '@pf/src/components/DatePicker/Calendar.vue'\nimport BottomSheet from '@pf/src/components/BottomSheet/BottomSheet.vue';\n\nimport BlockSearch from '@pf/src/modules/globals/views/components/blocks/BlockSearch.vue'\nimport BlockSorting from '@pf/src/modules/globals/views/components/blocks/BlockSorting.vue'\nimport BlockFilter from '@pf/src/modules/globals/views/components/blocks/BlockFilter.vue'\n\nimport ButtonSort from '@pf/src/modules/globals/views/components/elements/ButtonSort.vue'\nimport ButtonDate from '@pf/src/modules/globals/views/components/elements/ButtonDate.vue'\n\nimport IconFilter from '@pf/src/modules/icons/navigation/IconFilter.vue'\nimport IconEvents from '@pf/src/modules/icons/entities/IconEvents.vue'\n\nconst search = defineModel('search')\nconst sort = defineModel('sort')\nconst filter = defineModel('filter')\nconst date = defineModel('date')\nconst items = defineModel('items')\n\n// Пропсы\nconst props = defineProps({\n showLoadMore: {\n type: Boolean,\n default: true\n },\n search: {\n type: [Boolean, Object],\n default: false\n },\n states: {\n type: Object,\n default: () => ({\n empty: {\n title: String,\n description: String,\n },\n }),\n },\n store: {\n type: Object,\n default: () => ({\n read: Function,\n state: Object,\n }),\n },\n external: {\n type: Boolean,\n default: false\n },\n options: {\n type: Object,\n default: () => ({\n category: null,\n limit: 20, \n skip: 0 ,\n owner: null,\n creator: null,\n user: null,\n status: null,\n period: null,\n contain: null,\n }),\n },\n});\n \nconst itemsList = ref(items.value || []);\nconst hasMoreItems = ref(false);\n\nlet isLoading = ref(true);\nlet isLoadingExtra = ref(false);\nlet sentinel = ref(null)\n\nlet currentSkip = ref(props.options.skip ? props.options.skip : 0);\nlet currentLimit = ref(props.options.limit ? props.options.limit : 10);\n\n// let sortParam = ref(sort.value?.param || 'createdAt');\n// let sortOrder = ref(sort.value?.order || 'asc');\n\nlet currentSearch = ref('');\n\nfunction updateSearch(search) {\n currentSearch.value = search\n currentSkip.value = 0\n currentLimit.value = 10\n\n fetchItems();\n}\n\nconst loadMoreItems = async () => {\n isLoadingExtra.value = true\n\n if (hasMoreItems.value) {\n currentSkip.value += currentLimit.value;\n \n const data = await props.store.read({\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value ? date.value.start : null,\n dateEnd: date.value ? date.value.end : null,\n sortParam: sort.value ? sort.value.param : null,\n sortOrder: sort.value ? sort.value.order : null,\n ...props.options\n });\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = [...itemsList.value, ...data];\n \n if (items.value) items.value = itemsList.value;\n }\n\n isLoadingExtra.value = false\n};\n\nconst fetchItems = async () => {\n const data = await props.store.read({\n skip: currentSkip.value,\n limit: currentLimit.value,\n dateStart: date.value ? date.value.start : null,\n dateEnd: date.value ? date.value.end : null,\n sortParam: sort.value ? sort.value.param : null,\n sortOrder: sort.value ? sort.value.order : null,\n search: currentSearch.value,\n ...props.options\n });\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = data;\n if (items.value) items.value = itemsList.value;\n isLoading.value = false;\n};\n\n\nwatch(() => props.external, (newVal, oldVal) => {\n if (newVal !== oldVal) {\n currentSkip.value = 0\n fetchItems();\n }\n}, { deep: true });\n\nwatch(() => date.value, (newVal, oldVal) => {\n if (newVal !== oldVal) {\n currentSkip.value = 0\n fetchItems();\n }\n}, { deep: true });\n\nwatch(() => sort.value?.order, (newVal, oldVal) => {\n\n if (newVal !== oldVal) {\n currentSkip.value = 0\n fetchItems();\n }\n});\n\nwatch(() => sort.value?.param, (newVal, oldVal) => {\n\n if (newVal !== oldVal) {\n currentSkip.value = 0\n fetchItems();\n }\n});\n\n\nwatch(() => props.options, (newVal, oldVal) => {\n if (\n newVal.organization !== oldVal.organization ||\n newVal.categories !== oldVal.categories ||\n newVal.prices !== oldVal.prices ||\n newVal.delivery !== oldVal.delivery ||\n newVal.search !== oldVal.search ||\n newVal.status !== oldVal.status ||\n newVal.hidden !== oldVal.hidden ||\n newVal.type !== oldVal.type ||\n newVal.tags !== oldVal.tags || \n newVal.following !== oldVal.following\n ) {\n currentSkip.value = 0\n fetchItems();\n }\n}, { deep: true });\n\nlet observer = null\n\nonMounted(async () => {\n await fetchItems()\n\n if (typeof window !== 'undefined' && !props.showLoadMore) {\n observer = new IntersectionObserver(entries => {\n if (entries.some(entry => entry.isIntersecting)) {\n loadMoreItems()\n }\n })\n\n if (sentinel.value) observer.observe(sentinel.value)\n }\n});\n\nonUnmounted(() => {\n if (observer) {\n observer.disconnect();\n }\n});\n</script>\n\n\n<style>\n.feed-move, /* apply transition to moving elements */\n.feed-enter-active,\n.feed-leave-active {\n transition: all 0.5s ease;\n}\n\n.feed-enter-from,\n.feed-leave-to {\n opacity: 0;\n transform: translateY(30px);\n}\n\n/* ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n.feed-leave-active {\n position: absolute;\n}\n</style>"],"names":["_useModel","search"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmKA,UAAM,SAASA,SAAY,SAAA,QAAQ;AACnC,UAAM,OAAOA,kBAAY,MAAM;AAC/B,UAAM,SAASA,SAAY,SAAA,QAAQ;AACnC,UAAM,OAAOA,kBAAY,MAAM;AAC/B,UAAM,QAAQA,kBAAY,OAAO;AAGjC,UAAM,QAAQ;AA6Cd,UAAM,YAAY,IAAI,MAAM,SAAS,CAAE,CAAA;AACvC,UAAM,eAAe,IAAI,KAAK;AAE9B,QAAI,YAAY,IAAI,IAAI;AACxB,QAAI,iBAAiB,IAAI,KAAK;AAC9B,QAAI,WAAW,IAAI,IAAI;AAEvB,QAAI,cAAc,IAAI,MAAM,QAAQ,OAAO,MAAM,QAAQ,OAAO,CAAC;AACjE,QAAI,eAAe,IAAI,MAAM,QAAQ,QAAQ,MAAM,QAAQ,QAAQ,EAAE;AAKrE,QAAI,gBAAgB,IAAI,EAAE;AAE1B,aAAS,aAAaC,SAAQ;AAC5B,oBAAc,QAAQA;AACtB,kBAAY,QAAQ;AACpB,mBAAa,QAAQ;AAErB;IACF;AAEA,UAAM,gBAAgB,YAAY;AAChC,qBAAe,QAAQ;AAEvB,UAAI,aAAa,OAAO;AACtB,oBAAY,SAAS,aAAa;AAElC,cAAM,OAAO,MAAM,MAAM,MAAM,KAAK;AAAA,UAClC,MAAM,YAAY;AAAA,UAClB,OAAO,aAAa;AAAA,UACpB,QAAQ,cAAc;AAAA,UACtB,WAAW,KAAK,QAAQ,KAAK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AAM;AAChB,UAAI,UAAU;AACZ,iBAAS,WAAU;AAAA,MACpB;AAAA,IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"Feed.vue.js","sources":["../../../../../src/components/Feed/Feed.vue"],"sourcesContent":["<template>\n\n <div v-if=\"search || date || (sort && !sort.hideButton)\" class=\"flex-nowrap flex gap-thin\">\n\n <BlockSearch \n v-if=\"search\"\n :placeholder=\"search.placeholder || 'Search...'\"\n :class=\"search.class || 'bg-light'\"\n @search=\"updateSearch\"\n />\n\n <template\n v-if=\"filter\"\n >\n <div \n :class=\"filter.class || 'bg-light'\"\n class=\"flex-center flex pd-thin bg-light radius-extra aspect-1x1 h-100\"\n >\n <IconFilter @click=\"() => filter.active = !filter.active\" class=\"w-1r h-auto\"/>\n </div>\n\n \n <BottomSheet\n v-if=\"filter.active\"\n :show=\"filter.active\"\n @toggle=\"() => filter.active = false\"\n class=\"z-index-10 pos-fixed pos-t-0 pos-r-0\"\n :class=\"{\n 'pos-t-0': filter.active,\n 'pos-t-100': !filter.active\n }\"\n >\n <BlockFilter\n v-model:filter=\"filter\"\n :options=\"filter.options\"\n class=\"h-100 w-100 pd-small bg-light\"\n />\n </BottomSheet> \n </template>\n\n <Dropdown \n v-if=\"date\"\n :label=\"{\n component: ButtonDate,\n props: { date: date }\n }\" \n :class=\"date.class || 'bg-light'\"\n class=\"flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-big\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <Calendar\n v-model:date=\"date\"\n :locale=\"$i18n.locale\"\n :allowRange=\"true\"\n class=\"radius-semi w-100 o-hidden bg-light\"\n />\n </Dropdown> \n\n <Dropdown \n v-if=\"sort && !sort.hideButton\"\n :label=\"{\n component: ButtonSort,\n props: { order: sort.order },\n class: 'w-1r'\n }\" \n :class=\"sort.class || 'bg-light'\"\n class=\"radius-extra aspect-1x1 h-100\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <BlockSorting\n v-model:param=\"sort.param\"\n v-model:order=\"sort.order\"\n :options=\"sort.options\"\n class=\"h-100 pd-small radius-semi t-white bg-black\"\n />\n </Dropdown> \n </div>\n\n <TransitionGroup \n\n v-if=\"isLoading\"\n tag=\"ul\" \n name=\"scaleTransition\" \n >\n <SkeletonEvent\n v-if=\"isLoading\"\n v-for=\"i in currentLimit\" \n :key=\"'skeleton-' + i\"\n class=\"mn-b-small radius-big o-hidden d-block\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n v-if=\"!isLoading && itemsList.length < 1\"\n name=\"feed\"\n >\n <EmptyState\n v-if=\"!isLoading && itemsList.length < 1\"\n :title=\"states.empty.title\"\n :description=\"states.empty.description\"\n :action=\"states.empty.action\"\n :callback=\"states.empty.callback\"\n class=\"pd-medium mn-b-thin bg-light radius-big\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n name=\"feed\"\n :class=\"$attrs.class\"\n >\n <slot\n v-if=\"!isLoading && itemsList.length > 0\"\n :items=\"itemsList\"\n >\n </slot>\n </TransitionGroup>\n\n <button\n v-if=\"showLoadMore && hasMoreItems && itemsList.length > 0 && !isLoadingExtra\"\n @click=\"loadMoreItems\"\n class=\"col-w-100 mn-t-thin w-100 t-black bg-main button\"\n >\n Load More\n </button>\n\n <div v-else key=\"sentinel\" ref=\"sentinel\" class=\"sentinel\"></div> \n\n <div\n\n v-if=\"isLoadingExtra\"\n class=\"col-w-100 w-100 pos-relative\"\n >\n <Loader/>\n </div>\n \n\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, onUnmounted, shallowRef, watch } from 'vue';\n\nimport SkeletonEvent from '@pf/src/modules/icons/skeletons/SkeletonEvent.vue'\n\nimport Loader from '@pf/src/components/Loader/Loader.vue';\nimport EmptyState from '@pf/src/components/EmptyState/EmptyState.vue';\nimport Dropdown from \"@pf/src/components/Dropdown/Dropdown.vue\";\nimport Calendar from '@pf/src/components/DatePicker/Calendar.vue'\nimport BottomSheet from '@pf/src/components/BottomSheet/BottomSheet.vue';\n\nimport BlockSearch from '@pf/src/modules/globals/views/components/blocks/BlockSearch.vue'\nimport BlockSorting from '@pf/src/modules/globals/views/components/blocks/BlockSorting.vue'\nimport BlockFilter from '@pf/src/modules/globals/views/components/blocks/BlockFilter.vue'\n\nimport ButtonSort from '@pf/src/modules/globals/views/components/elements/ButtonSort.vue'\nimport ButtonDate from '@pf/src/modules/globals/views/components/elements/ButtonDate.vue'\n\nimport IconFilter from '@pf/src/modules/icons/navigation/IconFilter.vue'\nimport IconEvents from '@pf/src/modules/icons/entities/IconEvents.vue'\n\nconst search = defineModel('search')\nconst sort = defineModel('sort')\nconst filter = defineModel('filter')\nconst date = defineModel('date')\nconst items = defineModel('items')\n\n// Пропсы\nconst props = defineProps({\n showLoadMore: {\n type: Boolean,\n default: true\n },\n search: {\n type: [Boolean, Object],\n default: false\n },\n states: {\n type: Object,\n default: () => ({\n empty: {\n title: String,\n description: String,\n },\n }),\n },\n store: {\n type: Object,\n default: () => ({\n read: Function,\n state: Object,\n }),\n },\n external: {\n type: Boolean,\n default: false\n },\n options: {\n type: Object,\n default: () => ({\n category: null,\n limit: 20, \n skip: 0 ,\n owner: null,\n creator: null,\n user: null,\n status: null,\n period: null,\n contain: null,\n }),\n },\n});\n \nconst itemsList = shallowRef(items.value || []);\nconst hasMoreItems = ref(false);\n\nlet isLoading = ref(true);\nlet isLoadingExtra = ref(false);\nlet sentinel = ref(null)\n\nlet currentSkip = ref(props.options.skip ? props.options.skip : 0);\nlet currentLimit = ref(props.options.limit ? props.options.limit : 10);\n\n// let sortParam = ref(sort.value?.param || 'createdAt');\n// let sortOrder = ref(sort.value?.order || 'asc');\n\nlet currentSearch = ref('');\n\nfunction debounce(fn, delay) {\n let timeoutId = null;\n return (...args) => {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn(...args), delay);\n };\n}\n\nconst debouncedSearch = debounce((value) => {\n currentSearch.value = value;\n currentSkip.value = 0;\n currentLimit.value = 10;\n fetchItems();\n}, 300);\n\nfunction updateSearch(search) {\n debouncedSearch(search);\n}\n\nconst loadMoreItems = async () => {\n isLoadingExtra.value = true\n\n if (hasMoreItems.value) {\n currentSkip.value += currentLimit.value;\n \n const data = await props.store.read({\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value ? date.value.start : null,\n dateEnd: date.value ? date.value.end : null,\n sortParam: sort.value ? sort.value.param : null,\n sortOrder: sort.value ? sort.value.order : null,\n ...props.options\n });\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = [...itemsList.value, ...data];\n \n if (items.value) items.value = itemsList.value;\n }\n\n isLoadingExtra.value = false\n};\n\nconst fetchItems = async () => {\n isLoading.value = true;\n const data = await props.store.read({\n skip: currentSkip.value,\n limit: currentLimit.value,\n dateStart: date.value ? date.value.start : null,\n dateEnd: date.value ? date.value.end : null,\n sortParam: sort.value ? sort.value.param : null,\n sortOrder: sort.value ? sort.value.order : null,\n search: currentSearch.value,\n ...props.options\n });\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = data;\n if (items.value) items.value = itemsList.value;\n isLoading.value = false;\n};\n\nwatch(\n () => [props.external, date.value, sort.value, props.options],\n ([newExternal, newDate, newSort, newOptions], [oldExternal, oldDate, oldSort, oldOptions]) => {\n if (\n newExternal !== oldExternal ||\n newDate !== oldDate ||\n newSort?.order !== oldSort?.order ||\n newSort?.param !== oldSort?.param ||\n JSON.stringify(newOptions) !== JSON.stringify(oldOptions)\n ) {\n currentSkip.value = 0;\n fetchItems();\n }\n },\n { deep: true }\n);\n\nlet observer = null\n\nonMounted(async () => {\n await fetchItems()\n\n if (typeof window !== 'undefined' && !props.showLoadMore) {\n observer = new IntersectionObserver(entries => {\n if (entries.some(entry => entry.isIntersecting)) {\n loadMoreItems()\n }\n })\n\n if (sentinel.value) observer.observe(sentinel.value)\n }\n});\n\nonUnmounted(() => {\n if (observer) {\n observer.disconnect();\n }\n});\n</script>\n\n\n<style>\n.feed-move, /* apply transition to moving elements */\n.feed-enter-active,\n.feed-leave-active {\n transition: all 0.5s ease;\n}\n\n.feed-enter-from,\n.feed-leave-to {\n opacity: 0;\n transform: translateY(30px);\n}\n\n/* ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n.feed-leave-active {\n position: absolute;\n}\n</style>"],"names":["_useModel","search"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmKA,UAAM,SAASA,SAAY,SAAA,QAAQ;AACnC,UAAM,OAAOA,kBAAY,MAAM;AAC/B,UAAM,SAASA,SAAY,SAAA,QAAQ;AACnC,UAAM,OAAOA,kBAAY,MAAM;AAC/B,UAAM,QAAQA,kBAAY,OAAO;AAGjC,UAAM,QAAQ;AA6Cd,UAAM,YAAY,WAAW,MAAM,SAAS,CAAE,CAAA;AAC9C,UAAM,eAAe,IAAI,KAAK;AAE9B,QAAI,YAAY,IAAI,IAAI;AACxB,QAAI,iBAAiB,IAAI,KAAK;AAC9B,QAAI,WAAW,IAAI,IAAI;AAEvB,QAAI,cAAc,IAAI,MAAM,QAAQ,OAAO,MAAM,QAAQ,OAAO,CAAC;AACjE,QAAI,eAAe,IAAI,MAAM,QAAQ,QAAQ,MAAM,QAAQ,QAAQ,EAAE;AAKrE,QAAI,gBAAgB,IAAI,EAAE;AAE1B,aAAS,SAAS,IAAI,OAAO;AAC3B,UAAI,YAAY;AAChB,a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;AACZ,iBAAS,WAAU;AAAA,MACpB;AAAA,IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
|
-
const Field = require("../Field/Field.
|
4
|
+
const Field = require("../Field/Field.vue.cjs");
|
5
5
|
const IconArrow = require("../../modules/icons/navigation/IconArrow.vue.cjs");
|
6
6
|
const vueI18n = require("vue-i18n");
|
7
7
|
const _hoisted_1 = { class: "pd-thin radius-extra flex-nowrap flex" };
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref, onMounted, watchEffect, openBlock, createElementBlock, createVNode, unref, isRef, createElementVNode, toDisplayString, createCommentVNode } from "vue";
|
2
|
-
import Field from "../Field/Field.
|
2
|
+
import Field from "../Field/Field.vue.js";
|
3
3
|
import _sfc_main$1 from "../../modules/icons/navigation/IconArrow.vue.js";
|
4
4
|
import { useI18n } from "vue-i18n";
|
5
5
|
const _hoisted_1 = { class: "pd-thin radius-extra flex-nowrap flex" };
|
@@ -3,10 +3,9 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
3
3
|
const vue = require("vue");
|
4
4
|
const FieldTags = require("./FieldTags.vue.cjs");
|
5
5
|
;/* empty css */
|
6
|
-
const _hoisted_1 = /* @__PURE__ */ vue.createElementVNode("
|
7
|
-
const _hoisted_2 =
|
8
|
-
const _hoisted_3 =
|
9
|
-
const _hoisted_4 = { key: 1 };
|
6
|
+
const _hoisted_1 = /* @__PURE__ */ vue.createElementVNode("p", { class: "p-small mn-b-thin" }, "Suggested:", -1);
|
7
|
+
const _hoisted_2 = ["onClick"];
|
8
|
+
const _hoisted_3 = { key: 1 };
|
10
9
|
const _sfc_main = {
|
11
10
|
__name: "BlockTags",
|
12
11
|
props: {
|
@@ -56,7 +55,6 @@ const _sfc_main = {
|
|
56
55
|
}
|
57
56
|
return (_ctx, _cache) => {
|
58
57
|
return vue.openBlock(), vue.createElementBlock("div", null, [
|
59
|
-
_hoisted_1,
|
60
58
|
vue.createVNode(FieldTags.default, {
|
61
59
|
modelValue: tag.value,
|
62
60
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => tag.value = $event),
|
@@ -73,13 +71,13 @@ const _sfc_main = {
|
|
73
71
|
onTagsChanged: handleTagsChanged,
|
74
72
|
class: "mn-b-thin bg-light radius-medium pd-small"
|
75
73
|
}, null, 8, ["modelValue", "tags", "autocomplete-items"]),
|
76
|
-
|
74
|
+
_hoisted_1,
|
77
75
|
filteredSuggestedItems.value.length > 0 ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(filteredSuggestedItems.value, (tag2, index) => {
|
78
76
|
return vue.openBlock(), vue.createElementBlock("span", {
|
79
77
|
onClick: ($event) => addTag(tag2),
|
80
78
|
class: vue.normalizeClass(["cursor-pointer t-medium ti-tag-toDefactor", { "mn-r-micro": index !== filteredSuggestedItems.value.length - 1 }])
|
81
|
-
}, vue.toDisplayString(tag2.text), 11,
|
82
|
-
}), 256)) : (vue.openBlock(), vue.createElementBlock("span",
|
79
|
+
}, vue.toDisplayString(tag2.text), 11, _hoisted_2);
|
80
|
+
}), 256)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3, "You added all suggested tags"))
|
83
81
|
]);
|
84
82
|
};
|
85
83
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BlockTags.vue.cjs","sources":["../../../../../src/components/FieldTags/BlockTags.vue"],"sourcesContent":["<template>\n <div>\n <
|
1
|
+
{"version":3,"file":"BlockTags.vue.cjs","sources":["../../../../../src/components/FieldTags/BlockTags.vue"],"sourcesContent":["<template>\n <div>\n <FieldTags\n v-model=\"tag\"\n :tags=\"selectedTags\"\n :autocomplete-items=\"filteredItems\"\n :add-on-key=\"[13, ':', ';', ',']\"\n :save-on-key=\"[13, ':', ';', ',']\"\n :separators=\"[';', ',']\"\n :max-tags=\"20\"\n :maxlength=\"20\"\n :placeholder=\"'Please add tags'\"\n :add-from-paste=\"true\"\n :allow-edit-tags=\"true\"\n @tags-changed=\"handleTagsChanged\"\n class=\"mn-b-thin bg-light radius-medium pd-small\"\n />\n\n <p class=\"p-small mn-b-thin\">Suggested:</p>\n\n <span \n v-if=\"filteredSuggestedItems.length > 0\" \n v-for=\"(tag,index) in filteredSuggestedItems\" \n @click=\"addTag(tag)\"\n class=\"cursor-pointer t-medium ti-tag-toDefactor\"\n :class=\"{'mn-r-micro':index !== filteredSuggestedItems.length - 1}\"\n >\n {{ tag.text }}\n </span>\n <span v-else>You added all suggested tags</span> \n </div>\n</template>\n\n<script setup>\nimport FieldTags from '@pf/src/components/FieldTags/FieldTags.vue'\nimport { ref, computed, onMounted } from 'vue';\n\nconst emits = defineEmits(['tags-changed']);\nconst props = defineProps({\n tags: {\n type: Array\n },\n tagsSuggested: {\n type: Array,\n default: [\n { text: 'story' },\n { text: 'news' },\n { text: 'guide' },\n { text: 'discussion' },\n { text: 'photos' },\n ]\n }\n});\n\nconst tag = ref('');\n\nconst selectedTags = ref([]);\n\nconst autocompleteItems = ref(props.tagsSuggested);\n\nif (props.tags) selectedTags.value = props.tags.map(tag => ({text: tag}))\n \n\nconst filteredItems = computed(() => {\n return autocompleteItems.value.filter(i => {\n return i.text.toLowerCase().includes(tag.value.toLowerCase());\n });\n});\n\nconst filteredSuggestedItems = computed(() => {\n return autocompleteItems.value.filter(item => {\n return !selectedTags.value.some(tag => tag.text === item.text);\n });\n })\n\nfunction addTag (tag) {\n selectedTags.value.push(tag)\n emits('tags-changed', selectedTags.value.map(tag => { return tag.text }));\n}\n\nfunction handleTagsChanged(newTags) {\n selectedTags.value = newTags;\n emits('tags-changed', selectedTags.value.map(tag => { return tag.text }));\n}\n\n\n\n</script>\n\n<style>\n .ti-tag-toDefactor {\n background-color: rgb(var(--main));\n color: rgb(var(--black));\n border-radius: 4rem;\n padding: 1px 8px 2px;\n margin: 2px;\n font-size: .85em;\n }\n</style>"],"names":["ref","tag","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,UAAM,QAAQ;AACd,UAAM,QAAQ;AAgBd,UAAM,MAAMA,IAAAA,IAAI,EAAE;AAElB,UAAM,eAAeA,IAAAA,IAAI,CAAA,CAAE;AAE3B,UAAM,oBAAoBA,IAAG,IAAC,MAAM,aAAa;AAEjD,QAAI,MAAM,KAAM,cAAa,QAAQ,MAAM,KAAK,IAAI,CAAAC,UAAQ,EAAC,MAAMA,KAAG,EAAE;AAGxE,UAAM,gBAAgBC,IAAQ,SAAC,MAAM;AACnC,aAAO,kBAAkB,MAAM,OAAO,OAAK;AACzC,eAAO,EAAE,KAAK,YAAa,EAAC,SAAS,IAAI,MAAM,YAAW,CAAE;AAAA,MAChE,CAAG;AAAA,IACH,CAAC;AAED,UAAM,yBAAyBA,IAAQ,SAAC,MAAM;AAC1C,aAAO,kBAAkB,MAAM,OAAO,UAAQ;AAC5C,eAAO,CAAC,aAAa,MAAM,KAAK,CAAAD,SAAOA,KAAI,SAAS,KAAK,IAAI;AAAA,MACnE,CAAK;AAAA,IACL,CAAG;AAEH,aAAS,OAAQA,MAAK;AACpB,mBAAa,MAAM,KAAKA,IAAG;AAC3B,YAAM,gBAAgB,aAAa,MAAM,IAAI,CAAAA,SAAO;AAAE,eAAOA,KAAI;AAAA,MAAM,CAAA,CAAC;AAAA,IAC1E;AAEA,aAAS,kBAAkB,SAAS;AAClC,mBAAa,QAAQ;AACrB,YAAM,gBAAgB,aAAa,MAAM,IAAI,CAAAA,SAAO;AAAE,eAAOA,KAAI;AAAA,MAAM,CAAA,CAAC;AAAA,IAC1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|