@salla.sa/twilight-components 2.14.365 → 2.14.367
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{filepond-5FseaYGO.js → filepond-Dc4v9nRQ.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-B6jRMST8.js → filepond-plugin-file-poster-D580mHPz.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-B5KYrf7Q.js → filepond-plugin-file-validate-size-CirPDkJ5.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-D6zZbyEw.js → filepond-plugin-file-validate-type-DlzM2hzF.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-D9sIYJpS.js → filepond-plugin-image-edit-C-V0_34D.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-DCPv8T5a.js → filepond-plugin-image-exif-orientation-BzOSGmgz.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-B6ya_UMz.js → filepond-plugin-image-preview-DPPccyO8.js} +1 -1
- package/dist/cjs/{index-DsLCYojB.js → index-B-3J2UiO.js} +1 -1
- package/dist/cjs/{index-DaB0o62I.js → index-C4FIMuo-.js} +6 -6
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_4.cjs.entry.js +5 -3
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down_2.cjs.entry.js +11 -8
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +248 -177
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +9 -8
- package/dist/cjs/salla-products-slider.cjs.entry.js +3 -9
- package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-DE9NaT9j.js → vanilla-picker-wB5YeUXb.js} +1 -1
- package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +4 -1
- package/dist/collection/components/salla-offer/interfaces.js +2 -0
- package/dist/collection/components/salla-offer/salla-offer.css +2 -25
- package/dist/collection/components/salla-offer/salla-offer.js +256 -181
- package/dist/collection/components/salla-product-card/salla-product-card.js +29 -7
- package/dist/collection/components/salla-products-list/salla-products-list.js +27 -7
- package/dist/collection/components/salla-products-slider/salla-products-slider.js +2 -8
- package/dist/components/index.js +2 -2
- package/dist/components/salla-add-product-button2.js +4 -1
- package/dist/components/salla-offer.js +273 -220
- package/dist/components/salla-product-card2.js +11 -7
- package/dist/components/salla-products-list2.js +9 -7
- package/dist/components/salla-products-slider2.js +2 -8
- package/dist/esm/{filepond-BGPYjCAA.js → filepond-Pk5LWGeG.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-sd-w_Hri.js → filepond-plugin-file-poster-BtFMoeoX.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-CQkfT5sz.js → filepond-plugin-file-validate-size-BxrR9h6P.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-Cu8nOdXD.js → filepond-plugin-file-validate-type-BwgatLbq.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-CWpBhgby.js → filepond-plugin-image-edit-D5zXSV7g.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-DbSLLg4E.js → filepond-plugin-image-exif-orientation-DCrpf9GE.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-DXgOkLlG.js → filepond-plugin-image-preview-B67SPp2M.js} +1 -1
- package/dist/esm/{index-BNB-g4_5.js → index-MNn-Ef4U.js} +1 -1
- package/dist/esm/{index-DcD0Zbyk.js → index-ea1dIZhh.js} +6 -6
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_3.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +1 -1
- package/dist/esm/salla-add-product-button_4.entry.js +5 -3
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-booking-field_7.entry.js +10 -10
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-comment-form_8.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down_2.entry.js +11 -8
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +1 -1
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +1 -1
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +248 -177
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +9 -8
- package/dist/esm/salla-products-slider.entry.js +3 -9
- package/dist/esm/salla-progress-bar.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +1 -1
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-ErWyfb2S.js → vanilla-picker-DyzYo4Sm.js} +1 -1
- package/dist/twilight/{p-1db6e42a.entry.js → p-034d8a67.entry.js} +1 -1
- package/dist/twilight/{p-61b073fe.entry.js → p-064c2b11.entry.js} +1 -1
- package/dist/twilight/{p-cacb3ce1.entry.js → p-089a72be.entry.js} +1 -1
- package/dist/twilight/{p-a3b90d18.entry.js → p-0b3261ac.entry.js} +1 -1
- package/dist/twilight/{p-7472ce60.entry.js → p-0b51caa0.entry.js} +1 -1
- package/dist/twilight/{p-9a2691e8.entry.js → p-0eb1f375.entry.js} +1 -1
- package/dist/twilight/{p-3e62ea6f.entry.js → p-0f2acbdc.entry.js} +1 -1
- package/dist/twilight/{p-4fcd9105.entry.js → p-25589361.entry.js} +1 -1
- package/dist/twilight/{p-3f99644a.entry.js → p-25787405.entry.js} +1 -1
- package/dist/twilight/p-28faa620.entry.js +4 -0
- package/dist/twilight/{p-bd15fbda.entry.js → p-2ff31dfc.entry.js} +1 -1
- package/dist/twilight/{p-f0234135.entry.js → p-3240a1fe.entry.js} +1 -1
- package/dist/twilight/{p-90375d86.entry.js → p-36566eca.entry.js} +1 -1
- package/dist/twilight/{p-34690dc4.entry.js → p-39b426d2.entry.js} +1 -1
- package/dist/twilight/p-3a82f07b.entry.js +4 -0
- package/dist/twilight/{p-43bed278.entry.js → p-3f39afe0.entry.js} +1 -1
- package/dist/twilight/{p-ca43a3b7.entry.js → p-443034a4.entry.js} +1 -1
- package/dist/twilight/{p-281ca90e.entry.js → p-4719199c.entry.js} +1 -1
- package/dist/twilight/{p-14d02ff1.entry.js → p-47521f54.entry.js} +1 -1
- package/dist/twilight/{p-31e390fc.entry.js → p-48cf39b8.entry.js} +1 -1
- package/dist/twilight/{p-4afcc4e1.entry.js → p-4964523f.entry.js} +1 -1
- package/dist/twilight/{p-df475039.entry.js → p-49eedd45.entry.js} +1 -1
- package/dist/twilight/{p-4b508998.entry.js → p-4db7b9b8.entry.js} +1 -1
- package/dist/twilight/{p-cf4c8fc8.entry.js → p-50ddd8ae.entry.js} +1 -1
- package/dist/twilight/{p-f959adcd.entry.js → p-57b7835d.entry.js} +1 -1
- package/dist/twilight/{p-05b3f2ba.entry.js → p-584a2bcc.entry.js} +1 -1
- package/dist/twilight/{p-2e1418d2.entry.js → p-645c1083.entry.js} +1 -1
- package/dist/twilight/{p-5463603e.entry.js → p-74445a67.entry.js} +1 -1
- package/dist/twilight/{p-d9e1559a.entry.js → p-74fec1e4.entry.js} +1 -1
- package/dist/twilight/{p-ec61d027.entry.js → p-7b4b2370.entry.js} +1 -1
- package/dist/twilight/{p-5286e950.entry.js → p-7cbebd14.entry.js} +1 -1
- package/dist/twilight/{p-a12e53fb.entry.js → p-7d9e3567.entry.js} +1 -1
- package/dist/twilight/{p-3bd66c8c.entry.js → p-93441a3d.entry.js} +1 -1
- package/dist/twilight/{p-50b01475.entry.js → p-99addee2.entry.js} +1 -1
- package/dist/twilight/{p-3fbb37fc.entry.js → p-99bcb8d4.entry.js} +1 -1
- package/dist/twilight/{p-5b221eda.entry.js → p-9a20af32.entry.js} +1 -1
- package/dist/twilight/{p-d4135be2.entry.js → p-9aaa0b02.entry.js} +1 -1
- package/dist/twilight/{p-C6smOZtR.js → p-BTSNi4-Y.js} +1 -1
- package/dist/twilight/{p-r4UR1cQJ.js → p-BpRlzPzg.js} +1 -1
- package/dist/twilight/{p-DI8hZjwW.js → p-Bv6jrsv_.js} +1 -1
- package/dist/twilight/{p-DaQtMKKH.js → p-CDyCpF-q.js} +1 -1
- package/dist/twilight/{p-Ctf313G7.js → p-C_5WDzkV.js} +1 -1
- package/dist/twilight/{p-CfS_Im-l.js → p-Cd7SQKFA.js} +1 -1
- package/dist/twilight/{p-D94qS2bu.js → p-DMwKr6kA.js} +1 -1
- package/dist/twilight/{p-CMeOfINj.js → p-LocYOzht.js} +1 -1
- package/dist/twilight/{p-7e971fde.entry.js → p-a591946d.entry.js} +1 -1
- package/dist/twilight/{p-a916b222.entry.js → p-a6c6f400.entry.js} +1 -1
- package/dist/twilight/{p-37baa677.entry.js → p-a7a6c8ad.entry.js} +1 -1
- package/dist/twilight/{p-794141e7.entry.js → p-a92b3c77.entry.js} +1 -1
- package/dist/twilight/{p-e53c695d.entry.js → p-afb766ef.entry.js} +1 -1
- package/dist/twilight/{p-0a33368c.entry.js → p-b053fe1e.entry.js} +1 -1
- package/dist/twilight/{p-1df500d5.entry.js → p-b06335bd.entry.js} +1 -1
- package/dist/twilight/{p-3504a127.entry.js → p-b3152bd4.entry.js} +1 -1
- package/dist/twilight/{p-28fa2261.entry.js → p-b870e878.entry.js} +1 -1
- package/dist/twilight/{p-bac8dfc6.entry.js → p-bad606d7.entry.js} +1 -1
- package/dist/twilight/p-bf3ffab6.entry.js +4 -0
- package/dist/twilight/{p-ac4d4de4.entry.js → p-c045c6b1.entry.js} +1 -1
- package/dist/twilight/{p-84920a03.entry.js → p-c3351b4c.entry.js} +1 -1
- package/dist/twilight/{p-38fb50ed.entry.js → p-c3b046bc.entry.js} +1 -1
- package/dist/twilight/{p-eb21f677.entry.js → p-c481f4a2.entry.js} +1 -1
- package/dist/twilight/{p-ea2ebd0c.entry.js → p-c48d8192.entry.js} +1 -1
- package/dist/twilight/{p-62eecdc3.entry.js → p-c5b4e65a.entry.js} +1 -1
- package/dist/twilight/{p-0f733d50.entry.js → p-cb605a9e.entry.js} +1 -1
- package/dist/twilight/{p-22b8f56b.entry.js → p-d2ce1566.entry.js} +1 -1
- package/dist/twilight/{p-2a8e49ca.entry.js → p-d3b0bd92.entry.js} +1 -1
- package/dist/twilight/p-d56efab2.entry.js +4 -0
- package/dist/twilight/{p-5ca44db4.entry.js → p-d9741316.entry.js} +1 -1
- package/dist/twilight/{p-27198dfa.entry.js → p-dbf28d24.entry.js} +1 -1
- package/dist/twilight/{p-cad7741c.entry.js → p-e7cd6030.entry.js} +1 -1
- package/dist/twilight/{p-DcD0Zbyk.js → p-ea1dIZhh.js} +1 -1
- package/dist/twilight/{p-f1865223.entry.js → p-ea41c97a.entry.js} +1 -1
- package/dist/twilight/{p-049e7629.entry.js → p-ee2501d9.entry.js} +1 -1
- package/dist/twilight/{p-62ab3466.entry.js → p-eef758b0.entry.js} +1 -1
- package/dist/twilight/{p-05edd1ae.entry.js → p-f66c013f.entry.js} +1 -1
- package/dist/twilight/{p-eaf91b32.entry.js → p-fb93477b.entry.js} +1 -1
- package/dist/twilight/{p-eb1ee098.entry.js → p-fcebbb86.entry.js} +1 -1
- package/dist/twilight/{p-BpwFfwom.js → p-yvU70SQX.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-offer/interfaces.d.ts +9 -7
- package/dist/types/components/salla-offer/salla-offer.d.ts +35 -36
- package/dist/types/components/salla-product-card/salla-product-card.d.ts +4 -0
- package/dist/types/components/salla-products-list/salla-products-list.d.ts +4 -0
- package/dist/types/components.d.ts +18 -2
- package/package.json +5 -5
- package/dist/twilight/p-0f9b63f1.entry.js +0 -4
- package/dist/twilight/p-48b8702d.entry.js +0 -4
- package/dist/twilight/p-f94c1c9a.entry.js +0 -4
- package/dist/twilight/p-fbc08feb.entry.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as s,a as i}from"./p-
|
|
4
|
+
import{r as t,h as s,a as i}from"./p-ea1dIZhh.js";import{H as n}from"./p-CHf8XdiS.js";import"./p-CgtvEd63.js";const a=class{constructor(s){t(this,s),this.itemPerPage=10,this.no_notifications_trans=salla.lang.get("blocks.header.no_notifications"),this.load_more_text_trans=salla.lang.get("common.elements.load_more"),salla.lang.onLoaded((()=>{this.no_notifications_trans=salla.lang.get("blocks.header.no_notifications"),this.load_more_text_trans=salla.lang.get("common.elements.load_more")}))}loading(t=!0){let s=this.status?.querySelector(".s-button-text");s&&(n.toggleElementClassIf(s,"s-button-hide","s-button-show",(()=>t)),this.btnLoader.style.display=t?"inherit":"none")}getNotificationCard(t){const s=document.createElement("salla-notification-item");return s.notification=t,s.classList.add("s-block"),s}render(){return this.showPlaceholder?s("div",{class:"s-notifications-no-content"},s("salla-placeholder",{alignment:"center"},s("span",{slot:"title"},this.no_notifications_trans))):s("div",{class:"s-notifications-wrapper"},s("div",{class:"s-notifications-container",ref:t=>this.wrapper=t}),this.nextPage&&s("div",{class:"s-infinite-scroll-wrapper",ref:t=>this.status=t},s("button",{onClick:()=>this.loadMore(),class:"s-infinite-scroll-btn s-button-btn s-button-primary"},s("span",{class:"s-button-text s-infinite-scroll-btn-text"},this.loadMoreText??this.load_more_text_trans),s("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader",ref:t=>this.btnLoader=t,style:{display:"none"}}))))}handleResponse(t){return t.map((t=>this.getNotificationCard(t)))}initiateInfiniteScroll(){this.wrapper?(this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:()=>this.nextPage,history:!0,nextPage:this.nextPage,scrollThreshold:!1},!0),this.infiniteScroll?.on("request",(()=>{this.loading()})),this.infiniteScroll?.on("load",(t=>{this.loading(!1),this.pagination=t.pagination,this.nextPage=t.pagination.links?.next||null,this.handleResponse(t.data).forEach((t=>this.wrapper.append(t)));let s=this.host.querySelectorAll("salla-notification-item:not(.animated)");n.animateItems(s)})),this.infiniteScroll?.on("error",(t=>{salla.logger.error("Error loading more comments:",t)}))):salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.")}async loadInitialData(){await salla.api.notifications.fetch({per_page:this.itemPerPage}).then((t=>{this.pagination=t.pagination,this.total=t.pagination.total,this.nextPage=t.pagination.links?.next||null,setTimeout((()=>{if(!t.data.length)return this.showPlaceholder=!0;this.handleResponse(t.data).forEach((t=>this.wrapper.append(t))),this.initiateInfiniteScroll();let s=this.wrapper.querySelectorAll("salla-notification-item:not(.animated)");n.animateItems(s)}),100)})).catch((t=>{salla.logger.error(t),this.showPlaceholder=!0,this.loading(!1)}))}async loadMore(){this.infiniteScroll?.loadNextPage()}async componentWillLoad(){await this.loadInitialData()}get host(){return i(this)}};a.style="";export{a as salla_notifications}
|