@salla.sa/twilight-components 2.14.401 → 2.14.403
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/calendar-D-PUoCDH.js +13 -0
- package/dist/cjs/{cancel-De6vslRA.js → cancel-B5SbMYEk.js} +2 -2
- package/dist/cjs/cart2-B98PSAFN.js +13 -0
- package/dist/cjs/{check-x3w3-gpj.js → check-BnVBPQNp.js} +2 -2
- package/dist/cjs/{filepond-Cyf8KBGp.js → filepond-CHgj_x6Q.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster--yUgJ7UK.js → filepond-plugin-file-poster-BM8akyHG.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-uHtguPuy.js → filepond-plugin-file-validate-size-COf4Mbms.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-COz5Ivmq.js → filepond-plugin-file-validate-type-Mc6-vU_9.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-CHInCcL8.js → filepond-plugin-image-edit-Cegsph-w.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-CIh1qmKb.js → filepond-plugin-image-exif-orientation-Ca7MqBpy.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-C2lHZO0J.js → filepond-plugin-image-preview-C58SPQ5e.js} +1 -1
- package/dist/cjs/functions-DyPV5TVV.js +74 -0
- package/dist/{esm/gift-BChI23pG.js → cjs/gift-DbNivqYO.js} +4 -2
- package/dist/cjs/gift-sharing-BE0uszUm.js +13 -0
- package/dist/cjs/{index-CnTFTuui.js → index-DagepTOF.js} +1 -1
- package/dist/cjs/{index-CsHE7up1.js → index-DdhkQnYm.js} +61 -26
- package/dist/cjs/iphone-x-qC21wCLj.js +13 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{mail-CO8cFZH7.js → mail-Bgvt2hc9.js} +2 -2
- package/dist/cjs/percentage-Fs83gq6Q.js +21 -0
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +5 -5
- package/dist/cjs/salla-add-product-button_4.cjs.entry.js +5 -5
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +3 -3
- 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-badge.cjs.entry.js +95 -0
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +20 -26
- package/dist/cjs/salla-bullet-delivery.cjs.entry.js +18 -4
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +2 -2
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +4 -4
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +11 -11
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +3 -3
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +2 -2
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +65 -0
- package/dist/cjs/salla-filters-widget.cjs.entry.js +3 -3
- package/dist/cjs/salla-filters.cjs.entry.js +2 -2
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +7 -13
- package/dist/cjs/salla-hook.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/salla-localization-modal.cjs.entry.js +2 -2
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner.cjs.entry.js +69 -0
- package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +239 -0
- package/dist/cjs/salla-loyalty-panel.cjs.entry.js +103 -0
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +108 -64
- package/dist/cjs/salla-loyalty-reward.cjs.entry.js +54 -0
- package/dist/cjs/salla-loyalty.cjs.entry.js +3 -3
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +3 -3
- package/dist/cjs/salla-map.cjs.entry.js +4 -4
- 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 +4 -4
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +6 -6
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +2 -2
- package/dist/cjs/salla-notification-item.cjs.entry.js +2 -2
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +5 -16
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- 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 +2 -2
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +4 -4
- 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 +3 -3
- package/dist/cjs/salla-placeholder.cjs.entry.js +2 -2
- package/dist/cjs/salla-price-range.cjs.entry.js +3 -3
- package/dist/cjs/{salla-product-card.cjs.entry.js → salla-product-card_2.cjs.entry.js} +120 -6
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +3 -3
- package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
- package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +6 -12
- package/dist/cjs/salla-rating-modal.cjs.entry.js +3 -3
- package/dist/cjs/salla-reward-action_4.cjs.entry.js +243 -0
- package/dist/cjs/salla-scopes.cjs.entry.js +2 -2
- package/dist/cjs/salla-search.cjs.entry.js +6 -6
- package/dist/cjs/salla-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +5 -5
- package/dist/cjs/salla-social.cjs.entry.js +2 -2
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +5 -5
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +2 -2
- package/dist/cjs/salla-verify.cjs.entry.js +3 -3
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/shipping-CPYcgyCL.js +13 -0
- package/dist/cjs/tag-D-PcUR33.js +12 -0
- package/dist/cjs/tracked-promise-6pAeDi6L.js +31 -0
- package/dist/cjs/translations-DMwpLvqi.js +294 -0
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/user-add-BCGrddZS.js +13 -0
- package/dist/cjs/{vanilla-picker-DYNK0WJo.js → vanilla-picker-BMBx7QVh.js} +1 -1
- package/dist/collection/assets/images/prize-image.svg +1 -0
- package/dist/collection/collection-manifest.json +11 -0
- package/dist/collection/components/salla-badge/salla-badge.css +0 -0
- package/dist/collection/components/salla-badge/salla-badge.js +117 -0
- package/dist/collection/components/salla-booking-field/salla-booking-field.js +1 -1
- package/dist/collection/components/salla-bottom-alert/salla-bottom-alert.js +2 -2
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +17 -3
- package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.js +1 -1
- package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +1 -1
- package/dist/collection/components/salla-color-picker/salla-color-picker.js +1 -1
- package/dist/collection/components/salla-comment-form/salla-comment-form.js +1 -1
- package/dist/collection/components/salla-comments/salla-comment-item.js +3 -3
- package/dist/collection/components/salla-conditional-fields/salla-conditional-fields.js +1 -1
- package/dist/collection/components/salla-count-down/salla-count-down.js +1 -1
- package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1 -1
- package/dist/collection/components/salla-edit-order-button/salla-edit-order-button.css +3 -0
- package/dist/collection/components/salla-edit-order-button/salla-edit-order-button.js +99 -0
- package/dist/collection/components/salla-file-upload/salla-file-upload.js +2 -2
- package/dist/collection/components/salla-filters/salla-filters.js +1 -1
- package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +2 -2
- package/dist/collection/components/salla-gifting/salla-gifting.js +2 -2
- package/dist/collection/components/salla-hook/salla-hook.js +1 -1
- package/dist/collection/components/salla-list-tile/salla-list-tile.js +1 -1
- package/dist/collection/components/salla-loading/salla-loading.js +1 -1
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +1 -1
- package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.js +1 -1
- package/dist/collection/components/salla-loyalty-program/functions.js +53 -0
- package/dist/collection/components/salla-loyalty-program/interfaces.js +8 -1
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-banner.js +69 -0
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-hero.js +87 -0
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-panel.js +171 -0
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-point.js +219 -0
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-program.js +104 -65
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-reward.js +166 -0
- package/dist/collection/components/salla-loyalty-program/salla-reward-action.js +93 -0
- package/dist/collection/components/salla-loyalty-program/salla-reward-card.js +92 -0
- package/dist/collection/components/salla-loyalty-program/salla-reward-details.js +206 -0
- package/dist/collection/components/salla-loyalty-program/salla-reward-exchange.js +109 -0
- package/dist/collection/components/salla-loyalty-program/translations.js +290 -0
- package/dist/collection/components/salla-maintenance-alert/salla-maintenance-alert.js +1 -1
- package/dist/collection/components/salla-map/salla-map.js +3 -3
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-cart.js +1 -1
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-details.js +2 -2
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-options-modal.js +4 -4
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.js +1 -1
- package/dist/collection/components/salla-multiple-bundle-product/salla-multiple-bundle-product.js +1 -1
- package/dist/collection/components/salla-notifications/salla-notification-item.js +1 -1
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +1 -1
- package/dist/collection/components/salla-order-details/salla-order-details.js +1 -1
- package/dist/collection/components/salla-order-summary/salla-order-summary.js +1 -1
- package/dist/collection/components/salla-payments/salla-payments.js +2 -2
- package/dist/collection/components/salla-placeholder/salla-placeholder.js +1 -1
- package/dist/collection/components/salla-price-range/salla-price-range.js +2 -2
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +1 -1
- package/dist/collection/components/salla-product-card/salla-product-card.js +5 -5
- package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +2 -2
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +1 -1
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +1 -1
- package/dist/collection/components/salla-review-card/salla-review-card.js +1 -1
- package/dist/collection/components/salla-reviews/salla-reviews.js +1 -1
- package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
- package/dist/collection/components/salla-scopes/salla-scopes.js +1 -1
- package/dist/collection/components/salla-search/salla-search.js +5 -5
- package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
- package/dist/collection/components/salla-social/salla-social.js +1 -1
- package/dist/collection/components/salla-social-share/salla-social-share.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
- package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
- package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
- package/dist/components/calendar.js +11 -0
- package/dist/components/cart2.js +11 -0
- package/dist/components/functions.js +68 -0
- package/dist/components/gift-sharing.js +11 -0
- package/dist/components/index.js +2 -2
- package/dist/components/iphone-x.js +11 -0
- package/dist/components/percentage.js +18 -0
- package/dist/components/salla-badge.d.ts +11 -0
- package/dist/components/salla-badge.js +9 -0
- package/dist/components/salla-badge2.js +112 -0
- package/dist/components/salla-booking-field2.js +3 -9
- package/dist/components/salla-bottom-alert.js +2 -2
- package/dist/components/salla-bullet-delivery.js +17 -3
- package/dist/components/salla-cart-coupons.js +1 -1
- package/dist/components/salla-cart-summary.js +1 -1
- package/dist/components/salla-color-picker2.js +1 -1
- package/dist/components/salla-comment-form2.js +1 -1
- package/dist/components/salla-comment-item2.js +3 -3
- package/dist/components/salla-conditional-fields2.js +1 -1
- package/dist/components/salla-count-down2.js +1 -1
- package/dist/components/salla-datetime-picker2.js +1 -1
- package/dist/components/salla-edit-order-button.d.ts +11 -0
- package/dist/components/salla-edit-order-button.js +99 -0
- package/dist/components/salla-file-upload2.js +2 -2
- package/dist/components/salla-filters-widget2.js +2 -2
- package/dist/components/salla-filters.js +1 -1
- package/dist/components/salla-gifting.js +4 -10
- package/dist/components/salla-hook.js +1 -1
- package/dist/components/salla-list-tile2.js +1 -1
- package/dist/components/salla-loading2.js +1 -1
- package/dist/components/salla-localization-modal.js +1 -1
- package/dist/components/salla-loyalty-banner.d.ts +11 -0
- package/dist/components/salla-loyalty-banner.js +103 -0
- package/dist/components/salla-loyalty-hero.d.ts +11 -0
- package/dist/components/salla-loyalty-hero.js +9 -0
- package/dist/components/salla-loyalty-hero2.js +43 -0
- package/dist/components/salla-loyalty-panel.d.ts +11 -0
- package/dist/components/salla-loyalty-panel.js +250 -0
- package/dist/components/salla-loyalty-point.d.ts +11 -0
- package/dist/components/salla-loyalty-point.js +9 -0
- package/dist/components/salla-loyalty-point2.js +259 -0
- package/dist/components/salla-loyalty-prize-item.js +1 -1
- package/dist/components/salla-loyalty-program.js +233 -70
- package/dist/components/salla-loyalty-reward.d.ts +11 -0
- package/dist/components/salla-loyalty-reward.js +80 -0
- package/dist/components/salla-maintenance-alert.js +1 -1
- package/dist/components/salla-map2.js +3 -3
- package/dist/components/salla-multiple-bundle-product-cart2.js +1 -1
- package/dist/components/salla-multiple-bundle-product-details2.js +2 -2
- package/dist/components/salla-multiple-bundle-product-options-modal2.js +4 -4
- package/dist/components/salla-multiple-bundle-product-slider2.js +1 -1
- package/dist/components/salla-multiple-bundle-product.js +1 -1
- package/dist/components/salla-notification-item2.js +1 -1
- package/dist/components/salla-offer-modal.js +3 -14
- package/dist/components/salla-order-details.js +1 -1
- package/dist/components/salla-order-summary.js +1 -1
- package/dist/components/salla-payments.js +2 -2
- package/dist/components/salla-placeholder2.js +1 -1
- package/dist/components/salla-price-range2.js +2 -2
- package/dist/components/salla-product-availability2.js +1 -1
- package/dist/components/salla-product-card2.js +5 -5
- package/dist/components/salla-product-size-guide.js +2 -2
- package/dist/components/salla-quantity-input2.js +1 -1
- package/dist/components/salla-quick-buy2.js +1 -1
- package/dist/components/salla-quick-order.js +1 -7
- package/dist/components/salla-review-card2.js +1 -1
- package/dist/components/salla-reviews-page.js +1 -1
- package/dist/components/salla-reviews.js +1 -1
- package/dist/components/salla-reward-action.d.ts +11 -0
- package/dist/components/salla-reward-action.js +9 -0
- package/dist/components/salla-reward-action2.js +56 -0
- package/dist/components/salla-reward-card.d.ts +11 -0
- package/dist/components/salla-reward-card.js +9 -0
- package/dist/components/salla-reward-card2.js +44 -0
- package/dist/components/salla-reward-details.d.ts +11 -0
- package/dist/components/salla-reward-details.js +9 -0
- package/dist/components/salla-reward-details2.js +266 -0
- package/dist/components/salla-reward-exchange.d.ts +11 -0
- package/dist/components/salla-reward-exchange.js +9 -0
- package/dist/components/salla-reward-exchange2.js +81 -0
- package/dist/components/salla-scopes.js +1 -1
- package/dist/components/salla-search.js +5 -5
- package/dist/components/salla-skeleton2.js +1 -1
- package/dist/components/salla-social-share.js +1 -1
- package/dist/components/salla-social.js +1 -1
- package/dist/components/salla-tab-content2.js +1 -1
- package/dist/components/salla-tab-header2.js +1 -1
- package/dist/components/salla-tabs2.js +1 -1
- package/dist/components/salla-tel-input2.js +1 -1
- package/dist/components/salla-tooltip2.js +1 -1
- package/dist/components/salla-user-settings.js +1 -1
- package/dist/components/shipping.js +11 -0
- package/dist/components/tag.js +10 -0
- package/dist/components/tracked-promise.js +29 -0
- package/dist/components/translations.js +292 -0
- package/dist/esm/calendar-BkmanTR_.js +11 -0
- package/dist/esm/{cancel-BsLF_HK7.js → cancel-8Tsmrwno.js} +2 -2
- package/dist/esm/cart2-D1s2kXqL.js +11 -0
- package/dist/esm/{check-BsXh13x8.js → check-BZp0rKEO.js} +2 -2
- package/dist/esm/{filepond-DR4SNVzz.js → filepond-DSnpVe64.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-D5SixGgC.js → filepond-plugin-file-poster-CIjT2DkD.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-DsOh2L9N.js → filepond-plugin-file-validate-size-DfnQ9yTM.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-B4O62KoP.js → filepond-plugin-file-validate-type-BFqVzf03.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-Clnx4Mv4.js → filepond-plugin-image-edit-CFSURdY1.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-BN-eLjue.js → filepond-plugin-image-exif-orientation-Df4vxbTN.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-CYK3uEyM.js → filepond-plugin-image-preview-BP5v9jJo.js} +1 -1
- package/dist/esm/functions-B0QFNVX_.js +68 -0
- package/dist/{cjs/gift-CJ-3Yw_x.js → esm/gift-CXRKXFgT.js} +2 -4
- package/dist/esm/gift-sharing-0-eTJXSD.js +11 -0
- package/dist/esm/{index-BlBuuMQp.js → index-Noi8jmqR.js} +61 -27
- package/dist/esm/{index-D6k2MP-W.js → index-dal1uM4i.js} +1 -1
- package/dist/esm/iphone-x-CciN5Q_x.js +11 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{mail-DmgxDvXL.js → mail-DLNIOD9t.js} +2 -2
- package/dist/esm/percentage-Bs6JxDkg.js +18 -0
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +5 -5
- package/dist/esm/salla-add-product-button_4.entry.js +5 -5
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +3 -3
- 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-badge.entry.js +93 -0
- package/dist/esm/salla-booking-field_7.entry.js +20 -26
- package/dist/esm/salla-bullet-delivery.entry.js +18 -4
- package/dist/esm/salla-cart-coupons.entry.js +2 -2
- package/dist/esm/salla-cart-item-offers_2.entry.js +4 -4
- package/dist/esm/salla-comment-form_8.entry.js +11 -11
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +3 -3
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +2 -2
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +63 -0
- package/dist/esm/salla-filters-widget.entry.js +3 -3
- package/dist/esm/salla-filters.entry.js +2 -2
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +7 -13
- package/dist/esm/salla-hook.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/salla-localization-modal.entry.js +2 -2
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner.entry.js +67 -0
- package/dist/esm/salla-loyalty-hero_2.entry.js +236 -0
- package/dist/esm/salla-loyalty-panel.entry.js +101 -0
- package/dist/esm/salla-loyalty-prize-item.entry.js +2 -2
- package/dist/esm/salla-loyalty-program.entry.js +108 -64
- package/dist/esm/salla-loyalty-reward.entry.js +52 -0
- package/dist/esm/salla-loyalty.entry.js +3 -3
- package/dist/esm/salla-maintenance-alert.entry.js +3 -3
- package/dist/esm/salla-map.entry.js +4 -4
- 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 +4 -4
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +6 -6
- package/dist/esm/salla-multiple-bundle-product.entry.js +2 -2
- package/dist/esm/salla-notification-item.entry.js +2 -2
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +5 -16
- package/dist/esm/salla-offer.entry.js +1 -1
- 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 +2 -2
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +4 -4
- 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 +3 -3
- package/dist/esm/salla-placeholder.entry.js +2 -2
- package/dist/esm/salla-price-range.entry.js +3 -3
- package/dist/esm/{salla-product-card.entry.js → salla-product-card_2.entry.js} +120 -7
- package/dist/esm/salla-product-size-guide.entry.js +3 -3
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-progress-bar.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +6 -12
- package/dist/esm/salla-rating-modal.entry.js +3 -3
- package/dist/esm/salla-reward-action_4.entry.js +238 -0
- package/dist/esm/salla-scopes.entry.js +2 -2
- package/dist/esm/salla-search.entry.js +6 -6
- package/dist/esm/salla-skeleton.entry.js +2 -2
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +5 -5
- package/dist/esm/salla-social.entry.js +2 -2
- package/dist/esm/salla-tab-content_3.entry.js +4 -4
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +2 -2
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +5 -5
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +2 -2
- package/dist/esm/salla-verify.entry.js +3 -3
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/shipping-CZRcMGA9.js +11 -0
- package/dist/esm/tag-cgSL_BIo.js +10 -0
- package/dist/esm/tracked-promise-CjeRn_A-.js +29 -0
- package/dist/esm/translations-B-Rj6b9M.js +292 -0
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/user-add-QpH8MU22.js +11 -0
- package/dist/esm/{vanilla-picker-oVvgrx3f.js → vanilla-picker-DRn4hnB9.js} +1 -1
- package/dist/twilight/p-0-eTJXSD.js +4 -0
- package/dist/twilight/{p-28d735dc.entry.js → p-024459e9.entry.js} +1 -1
- package/dist/twilight/{p-bcbdff6d.entry.js → p-04d8a7e5.entry.js} +1 -1
- package/dist/twilight/p-0a91929a.entry.js +4 -0
- package/dist/twilight/{p-11c02cc2.entry.js → p-0ad91621.entry.js} +1 -1
- package/dist/twilight/{p-6e47537d.entry.js → p-0dce57b2.entry.js} +1 -1
- package/dist/twilight/{p-864d29b3.entry.js → p-145858ca.entry.js} +1 -1
- package/dist/twilight/p-1613629f.entry.js +4 -0
- package/dist/twilight/{p-9bd7d9f5.entry.js → p-1762cd5c.entry.js} +1 -1
- package/dist/twilight/p-246bb9c3.entry.js +4 -0
- package/dist/twilight/{p-1caa8d6e.entry.js → p-2502deb6.entry.js} +1 -1
- package/dist/twilight/{p-32ab498a.entry.js → p-256bd7e3.entry.js} +1 -1
- package/dist/twilight/{p-2768932b.entry.js → p-2f27a79c.entry.js} +1 -1
- package/dist/twilight/{p-45f1b946.entry.js → p-301bdc8d.entry.js} +1 -1
- package/dist/twilight/{p-345807de.entry.js → p-3317da8e.entry.js} +1 -1
- package/dist/twilight/p-36e2d55f.entry.js +4 -0
- package/dist/twilight/{p-3b3b6cd6.entry.js → p-394e59f9.entry.js} +1 -1
- package/dist/twilight/{p-f60646dc.entry.js → p-39595f4a.entry.js} +1 -1
- package/dist/twilight/{p-25123930.entry.js → p-3f6e4760.entry.js} +1 -1
- package/dist/twilight/{p-0901a25d.entry.js → p-40936925.entry.js} +1 -1
- package/dist/twilight/{p-26ce4274.entry.js → p-40ac70b9.entry.js} +1 -1
- package/dist/twilight/{p-9d9338c9.entry.js → p-425ca86a.entry.js} +1 -1
- package/dist/twilight/p-426919ba.entry.js +4 -0
- package/dist/twilight/p-46e0817d.entry.js +4 -0
- package/dist/twilight/{p-ef7c452b.entry.js → p-4886611c.entry.js} +1 -1
- package/dist/twilight/p-4bacc97f.entry.js +4 -0
- package/dist/twilight/{p-22790492.entry.js → p-503a7446.entry.js} +1 -1
- package/dist/twilight/{p-e17e30a7.entry.js → p-55585695.entry.js} +1 -1
- package/dist/twilight/{p-209a2ef7.entry.js → p-56b2316e.entry.js} +1 -1
- package/dist/twilight/p-57fc6135.entry.js +4 -0
- package/dist/twilight/p-589db188.entry.js +4 -0
- package/dist/twilight/{p-9972c1f3.entry.js → p-594a2cfc.entry.js} +1 -1
- package/dist/twilight/p-5b134612.entry.js +4 -0
- package/dist/twilight/{p-dc846049.entry.js → p-5d101927.entry.js} +1 -1
- package/dist/twilight/{p-48b8b9b0.entry.js → p-5f05afcf.entry.js} +1 -1
- package/dist/twilight/{p-727a8316.entry.js → p-6b402aa3.entry.js} +1 -1
- package/dist/twilight/{p-acf4f50d.entry.js → p-6ec4bce3.entry.js} +1 -1
- package/dist/twilight/{p-c6358810.entry.js → p-779aaac4.entry.js} +1 -1
- package/dist/twilight/p-78a7f098.entry.js +4 -0
- package/dist/twilight/{p-56ad6447.entry.js → p-78cc7185.entry.js} +1 -1
- package/dist/twilight/{p-d8d3dfcd.entry.js → p-79db938f.entry.js} +1 -1
- package/dist/twilight/{p-a9e4b4a9.entry.js → p-7cff302c.entry.js} +1 -1
- package/dist/twilight/{p-372ce435.entry.js → p-7f1e3e62.entry.js} +1 -1
- package/dist/twilight/{p-9b68df5a.entry.js → p-82785312.entry.js} +1 -1
- package/dist/twilight/{p-c86dde05.entry.js → p-83d63cf3.entry.js} +1 -1
- package/dist/twilight/{p-14d50b4c.entry.js → p-8740d9b0.entry.js} +1 -1
- package/dist/twilight/{p-BsLF_HK7.js → p-8Tsmrwno.js} +1 -1
- package/dist/twilight/{p-1426be48.entry.js → p-8bef56d7.entry.js} +1 -1
- package/dist/twilight/{p-aba6b3a8.entry.js → p-8c95bcba.entry.js} +1 -1
- package/dist/twilight/{p-2835ba4b.entry.js → p-91005fdc.entry.js} +1 -1
- package/dist/twilight/{p-b606c9a2.entry.js → p-96e09525.entry.js} +1 -1
- package/dist/twilight/{p-f58c722c.entry.js → p-9a1dbe0b.entry.js} +1 -1
- package/dist/twilight/p-9ab9e4fe.entry.js +4 -0
- package/dist/twilight/{p-b3ac5838.entry.js → p-9ff6dbba.entry.js} +1 -1
- package/dist/twilight/p-B-Rj6b9M.js +4 -0
- package/dist/twilight/{p-BG4uFEWi.js → p-BCRhp4ZP.js} +1 -1
- package/dist/twilight/{p-C9FzKstV.js → p-BOikoFVU.js} +1 -1
- package/dist/twilight/{p-FrOTq2f2.js → p-BVmlhqyN.js} +1 -1
- package/dist/twilight/p-BX5898Au.js +4 -0
- package/dist/twilight/{p-BsXh13x8.js → p-BZp0rKEO.js} +1 -1
- package/dist/twilight/{p-D_gOsznU.js → p-Bdj8c3JN.js} +1 -1
- package/dist/twilight/p-BkmanTR_.js +4 -0
- package/dist/twilight/{p-Duj4y93z.js → p-BlpVxOSF.js} +1 -1
- package/dist/twilight/p-Bs6JxDkg.js +4 -0
- package/dist/twilight/{p-BChI23pG.js → p-CXRKXFgT.js} +1 -1
- package/dist/twilight/p-CZRcMGA9.js +4 -0
- package/dist/twilight/p-CciN5Q_x.js +4 -0
- package/dist/twilight/p-D1s2kXqL.js +4 -0
- package/dist/twilight/{p-CwzEvhrD.js → p-DIVFpxqq.js} +1 -1
- package/dist/twilight/{p-DmgxDvXL.js → p-DLNIOD9t.js} +1 -1
- package/dist/twilight/{p-DI03hbOx.js → p-D_bFmrB0.js} +1 -1
- package/dist/twilight/{p-EaMy8k6o.js → p-DbwYqKTo.js} +1 -1
- package/dist/twilight/p-DnvK1zqm.js +4 -0
- package/dist/twilight/{p-BlBuuMQp.js → p-Noi8jmqR.js} +2 -2
- package/dist/twilight/p-QpH8MU22.js +4 -0
- package/dist/twilight/p-a139776f.entry.js +4 -0
- package/dist/twilight/p-a23e6051.entry.js +4 -0
- package/dist/twilight/p-a34a0037.entry.js +4 -0
- package/dist/twilight/{p-f2488a50.entry.js → p-b9bc75ad.entry.js} +1 -1
- package/dist/twilight/{p-8d4c052f.entry.js → p-bb02c0fd.entry.js} +1 -1
- package/dist/twilight/{p-c0239486.entry.js → p-c3418320.entry.js} +1 -1
- package/dist/twilight/{p-c0822f39.entry.js → p-c5214df3.entry.js} +1 -1
- package/dist/twilight/{p-d2816142.entry.js → p-cc8b8f84.entry.js} +1 -1
- package/dist/twilight/p-cgSL_BIo.js +4 -0
- package/dist/twilight/p-d4a62692.entry.js +4 -0
- package/dist/twilight/{p-7d6b0477.entry.js → p-d6d0a9b8.entry.js} +1 -1
- package/dist/twilight/{p-f4e96119.entry.js → p-d8389555.entry.js} +1 -1
- package/dist/twilight/{p-d4dcdcc5.entry.js → p-d8d5d1f4.entry.js} +1 -1
- package/dist/twilight/{p-8f67c4cb.entry.js → p-da642a9a.entry.js} +1 -1
- package/dist/twilight/{p-6b5c8369.entry.js → p-dce9ced4.entry.js} +1 -1
- package/dist/twilight/{p-a63e2bd1.entry.js → p-df8e08af.entry.js} +1 -1
- package/dist/twilight/{p-091fe74b.entry.js → p-e0619a5d.entry.js} +1 -1
- package/dist/twilight/p-e25aaae6.entry.js +4 -0
- package/dist/twilight/{p-8f73276d.entry.js → p-e270154b.entry.js} +1 -1
- package/dist/twilight/{p-6324f2ca.entry.js → p-e3da6c85.entry.js} +1 -1
- package/dist/twilight/{p-fe4a504b.entry.js → p-e5a47190.entry.js} +1 -1
- package/dist/twilight/{p-9e85bac1.entry.js → p-ec5b3bd6.entry.js} +1 -1
- package/dist/twilight/p-f294b1e5.entry.js +4 -0
- package/dist/twilight/p-f2ed8e2a.entry.js +4 -0
- package/dist/twilight/{p-7a15e1a1.entry.js → p-f4c1f034.entry.js} +1 -1
- package/dist/twilight/{p-8290d5fc.entry.js → p-fbfe1cf4.entry.js} +1 -1
- package/dist/twilight/{p-15aa6772.entry.js → p-fe4d55ce.entry.js} +1 -1
- package/dist/twilight/{p-dfdb0e7c.entry.js → p-feacde76.entry.js} +1 -1
- package/dist/twilight/{p-78d7eb5c.entry.js → p-ff3ae289.entry.js} +1 -1
- package/dist/twilight/{p-3d2bdf94.entry.js → p-ff47b12d.entry.js} +1 -1
- package/dist/twilight/{p-GweAdjGj.js → p-iornn-Hi.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-badge/salla-badge.d.ts +15 -0
- package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +5 -0
- package/dist/types/components/salla-edit-order-button/salla-edit-order-button.d.ts +25 -0
- package/dist/types/components/salla-loyalty-program/functions.d.ts +67 -0
- package/dist/types/components/salla-loyalty-program/interfaces.d.ts +125 -0
- package/dist/types/components/salla-loyalty-program/salla-loyalty-banner.d.ts +20 -0
- package/dist/types/components/salla-loyalty-program/salla-loyalty-hero.d.ts +15 -0
- package/dist/types/components/salla-loyalty-program/salla-loyalty-panel.d.ts +45 -0
- package/dist/types/components/salla-loyalty-program/salla-loyalty-point.d.ts +11 -0
- package/dist/types/components/salla-loyalty-program/salla-loyalty-program.d.ts +25 -8
- package/dist/types/components/salla-loyalty-program/salla-loyalty-reward.d.ts +13 -0
- package/dist/types/components/salla-loyalty-program/salla-reward-action.d.ts +9 -0
- package/dist/types/components/salla-loyalty-program/salla-reward-card.d.ts +17 -0
- package/dist/types/components/salla-loyalty-program/salla-reward-details.d.ts +22 -0
- package/dist/types/components/salla-loyalty-program/salla-reward-exchange.d.ts +11 -0
- package/dist/types/components/salla-loyalty-program/translations.d.ts +1 -0
- package/dist/types/components.d.ts +341 -0
- package/package.json +6 -5
- package/dist/cjs/salla-products-slider.cjs.entry.js +0 -121
- package/dist/esm/salla-products-slider.entry.js +0 -119
- package/dist/twilight/p-084e2131.entry.js +0 -4
- package/dist/twilight/p-08582b06.entry.js +0 -4
- package/dist/twilight/p-35b7c465.entry.js +0 -4
- package/dist/twilight/p-505504bf.entry.js +0 -4
- package/dist/twilight/p-546f8eb7.entry.js +0 -4
- package/dist/twilight/p-5f3d4e2c.entry.js +0 -4
- package/dist/twilight/p-65129aa6.entry.js +0 -4
- package/dist/twilight/p-6f8ce4cc.entry.js +0 -4
- package/dist/twilight/p-79dd8455.entry.js +0 -4
- package/dist/twilight/p-958e5868.entry.js +0 -4
- package/dist/twilight/p-9c58f3c0.entry.js +0 -4
- package/dist/twilight/p-9cf29ddb.entry.js +0 -4
- package/dist/twilight/p-d38bd02b.entry.js +0 -4
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
5
|
+
import { b as brand_path, c as closeModals, f as formattedPointsJsx } from './functions.js';
|
|
6
|
+
import { l as loyaltyProgramIcon } from './gift.js';
|
|
7
|
+
import { T as Tag } from './tag.js';
|
|
8
|
+
import { I as IconVerified } from './check.js';
|
|
9
|
+
import { C as Cancel } from './cancel.js';
|
|
10
|
+
import { T as TrackedPromise } from './tracked-promise.js';
|
|
11
|
+
import { d as defineCustomElement$h } from './salla-add-product-button2.js';
|
|
12
|
+
import { d as defineCustomElement$g } from './salla-badge2.js';
|
|
13
|
+
import { d as defineCustomElement$f } from './salla-button2.js';
|
|
14
|
+
import { d as defineCustomElement$e } from './salla-count-down2.js';
|
|
15
|
+
import { d as defineCustomElement$d } from './salla-loading2.js';
|
|
16
|
+
import { d as defineCustomElement$c } from './salla-modal2.js';
|
|
17
|
+
import { d as defineCustomElement$b } from './salla-product-availability2.js';
|
|
18
|
+
import { d as defineCustomElement$a } from './salla-product-card2.js';
|
|
19
|
+
import { d as defineCustomElement$9 } from './salla-products-slider2.js';
|
|
20
|
+
import { d as defineCustomElement$8 } from './salla-progress-bar2.js';
|
|
21
|
+
import { d as defineCustomElement$7 } from './salla-quick-buy2.js';
|
|
22
|
+
import { d as defineCustomElement$6 } from './salla-reward-action2.js';
|
|
23
|
+
import { d as defineCustomElement$5 } from './salla-slider2.js';
|
|
24
|
+
import { d as defineCustomElement$4 } from './salla-tab-content2.js';
|
|
25
|
+
import { d as defineCustomElement$3 } from './salla-tab-header2.js';
|
|
26
|
+
import { d as defineCustomElement$2 } from './salla-tabs2.js';
|
|
27
|
+
import { d as defineCustomElement$1 } from './salla-tel-input2.js';
|
|
28
|
+
|
|
29
|
+
const sallaLoyaltyProgramCss = "";
|
|
30
|
+
|
|
31
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
32
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
33
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
34
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
35
|
+
else
|
|
36
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
37
|
+
if (d = decorators[i])
|
|
38
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
39
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
40
|
+
};
|
|
41
|
+
const c = (...args) => args.map(i => 's-loyalty-program-' + i).join(' ');
|
|
42
|
+
const SallaRewardDetails = /*@__PURE__*/ proxyCustomElement(class SallaRewardDetails extends HTMLElement {
|
|
43
|
+
constructor() {
|
|
44
|
+
super();
|
|
45
|
+
this.__registerHost();
|
|
46
|
+
this.actionClick = createEvent(this, "actionClick", 7);
|
|
47
|
+
this.refreshKey = Date.now();
|
|
48
|
+
}
|
|
49
|
+
handlePrizeChange() {
|
|
50
|
+
this.refreshKey = Date.now();
|
|
51
|
+
}
|
|
52
|
+
componentWillLoad() {
|
|
53
|
+
if (this.category.status === 'idle') {
|
|
54
|
+
this.category();
|
|
55
|
+
}
|
|
56
|
+
if (this.brand.status === 'idle') {
|
|
57
|
+
this.brand();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
getTermsAndConditions() {
|
|
61
|
+
const minimumAmount = Number((this.prize.order_minimum_amount || '0').split('.')[0]) || 0;
|
|
62
|
+
const maximumAmount = Number((this.prize.coupon_maximum_amount || '0').split('.')[0]) || 0;
|
|
63
|
+
const termsAndConditions = [];
|
|
64
|
+
if (minimumAmount) {
|
|
65
|
+
termsAndConditions.push([
|
|
66
|
+
salla.lang.get('pages.loyalty_program.order_minimum_amount'),
|
|
67
|
+
`${minimumAmount} ${salla.lang.get(`currency.${(salla.config.get('user.currency_code') || '').toLowerCase()}`)}`,
|
|
68
|
+
]);
|
|
69
|
+
}
|
|
70
|
+
if (maximumAmount) {
|
|
71
|
+
termsAndConditions.push([
|
|
72
|
+
salla.lang.get('pages.loyalty_program.coupon_maximum_amount'),
|
|
73
|
+
`${maximumAmount} ${salla.lang.get(`currency.${(salla.config.get('user.currency_code') || '').toLowerCase()}`)}`,
|
|
74
|
+
]);
|
|
75
|
+
}
|
|
76
|
+
return termsAndConditions;
|
|
77
|
+
}
|
|
78
|
+
findItems(ids) {
|
|
79
|
+
if (!ids?.length)
|
|
80
|
+
return [];
|
|
81
|
+
const brands = this.brand.data;
|
|
82
|
+
const categories = this.category.data;
|
|
83
|
+
return brands.concat(categories).filter(i => ids.includes(i.id));
|
|
84
|
+
}
|
|
85
|
+
getIncludedItems(items, ids) {
|
|
86
|
+
return items?.length ? items : this.findItems(ids);
|
|
87
|
+
}
|
|
88
|
+
getProductIds(ids) {
|
|
89
|
+
return ids || [];
|
|
90
|
+
}
|
|
91
|
+
getItemsMarkers(key) {
|
|
92
|
+
if (key === 'both') {
|
|
93
|
+
return this.getItemsMarkers('included') + this.getItemsMarkers('excluded');
|
|
94
|
+
}
|
|
95
|
+
return [
|
|
96
|
+
this.prize[`${key}_product_ids`]?.length || 0,
|
|
97
|
+
this.prize[`${key}_brand_ids`]?.length || 0,
|
|
98
|
+
this.prize[`${key}_category_ids`]?.length || 0,
|
|
99
|
+
].map(Boolean).map(Number).join('');
|
|
100
|
+
}
|
|
101
|
+
getItemsMarkersText() {
|
|
102
|
+
// Check if prize type is free_shipping
|
|
103
|
+
if (this.prize.key === 'FREE_SHIPPING') {
|
|
104
|
+
return salla.lang.get('pages.loyalty_program.redeem_for_free_shipping');
|
|
105
|
+
}
|
|
106
|
+
switch (this.getItemsMarkers('included')) {
|
|
107
|
+
case '001':
|
|
108
|
+
return salla.lang.get('pages.loyalty_program.redeem_on_specific_products');
|
|
109
|
+
case '010':
|
|
110
|
+
return salla.lang.get('pages.loyalty_program.redeem_on_specific_brands');
|
|
111
|
+
case '100':
|
|
112
|
+
return salla.lang.get('pages.loyalty_program.redeem_on_specific_categories');
|
|
113
|
+
case '000':
|
|
114
|
+
return salla.lang.get('pages.loyalty_program.redeem_on_all_products');
|
|
115
|
+
default:
|
|
116
|
+
return salla.lang.get('pages.loyalty_program.redeem_on_specific_products');
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
getCategoriesJsx(items, title) {
|
|
120
|
+
return !items.length ? '' : h("div", { class: c('reward-details-categories-wrapper') }, h("div", { class: c('reward-details-categories') }, h("h2", { class: c('reward-details-categories-heading') }, title), h("ul", { class: c('reward-details-categories-list') }, items.map((category) => (h("li", null, h("a", { href: category.url || category.lingual_urls?.[0], class: c('reward-details-categories-item') }, h("span", { innerHTML: Tag }), h("span", { class: c('reward-details-categories-item-content') }, category.name))))))));
|
|
121
|
+
}
|
|
122
|
+
getBrandsJsx(items, title) {
|
|
123
|
+
return !items.length ? '' : h("div", { class: c('reward-details-items-brands', 'slider-arrows-edges') }, h("div", null, h("h2", null, title), h("salla-slider", { id: `brands-${items.map(({ id }) => id).join('-')}`, "slider-config": '{"loop":false,"slidesPerView":"auto","spaceBetween":10}' }, h("div", { slot: "items" }, items.map((brand) => (h("a", { href: salla.url.get(brand_path(brand)), class: c('reward-brand-item') }, h("img", { src: brand.logo || salla.url.cdn('images/s-empty.png'), alt: "" }))))))));
|
|
124
|
+
}
|
|
125
|
+
getProductsJsx(items, title) {
|
|
126
|
+
return !items?.length ? '' : h("div", { class: "s-loyalty-program-reward-details-items-products s-loyalty-program-slider-arrows-edges" }, h("h2", null, title), h("salla-products-slider", { source: "selected", sourceValue: JSON.stringify(items), "slider-config": '{"loop":false,"slidesPerView":"auto","freeMode":true,"spaceBetween":0,"breakpoints":{"768":{"slidesPerView":3,"freeMode":false,"speed":300}}}' }));
|
|
127
|
+
}
|
|
128
|
+
render() {
|
|
129
|
+
const termsAndConditions = this.getTermsAndConditions();
|
|
130
|
+
return (h("div", { key: '3140551c4bcc64429a2f820ae9f915f19f6d3a77', class: "s-loyalty-program-reward-modal" }, h("div", { key: 'b193833caee8153c71b6c9f6af95358503afa103', class: "s-loyalty-program-points-modal-header" }, h("h1", { key: '0567985c10193a8eba6570bda8abf4aefa75657a', class: "s-loyalty-program-points-modal-info" }, !salla.url.is_page('cart') ? ''
|
|
131
|
+
: h("button", { class: "s-loyalty-program-back-btn", onClick: () => closeModals(() => salla.event.dispatch('modal::open', 'loyalty-rewards-modal')) }, h("span", { class: {
|
|
132
|
+
'sicon-arrow-right': document.documentElement.getAttribute('dir') === 'rtl',
|
|
133
|
+
'sicon-arrow-left': document.documentElement.getAttribute('dir') === 'ltr',
|
|
134
|
+
} })), this.prize.name)), h("div", { key: '66bb25eadb6c640b4c661b6b3e227b4b8ef4f40d', class: "s-loyalty-program-modal-scrollable-content" }, h("div", { key: '1cc1c1c121240fab3ccd32bce176deec378ef3fd', class: "s-loyalty-program-reward-details-header" }, h("div", { key: '81f43a0c61ed0889810efa2cf4447477c2b08094', class: "s-loyalty-program-aspect-container" }, h("img", { key: 'eb09214a175e8484dfc6c870492e49e3e28cbe42', src: this.prize.image, alt: this.prize.name })), h("salla-badge", { key: '2ce3001371ab69c73453957f6dfb066710d88edd', size: "sm", bg: "light" }, h("span", { key: '459b58a09e6f59314c83f7d1a5baf6c559f02bd1', innerHTML: loyaltyProgramIcon }), h("span", { key: '1cd0a85c1d2b9cdf1430e90bd12bbe83f1b05813', class: "s-loyalty-program-points-badge-points" }, formattedPointsJsx(this.prize.cost_points)))), !termsAndConditions.length ? '' : h("div", { class: "s-loyalty-program-terms-and-conditions" }, h("h1", { class: "s-loyalty-program-terms-and-conditions-heading" }, salla.lang.get('pages.loyalty_program.terms_and_conditions')), h("ul", { class: "s-loyalty-program-terms-and-conditions-list" }, termsAndConditions.map(([title, points]) => (h("li", { class: "s-loyalty-program-terms-and-conditions-item" }, h("span", { class: "s-loyalty-program-terms-and-conditions-content" }, title), h("span", { class: "s-loyalty-program-terms-and-conditions-content" }, points)))))), h("div", { key: 'a25d46f6a961844efd8f920bf5e4e1fd836cb460', class: "s-loyalty-program-reward-info-message" }, h("h1", { key: '4cf3e9e123993f6be8fb67df243156996b2a6fdd', class: "s-loyalty-program-reward-info-message-heading" }, salla.lang.get('pages.loyalty_program.how_to_benefit_from_this_reward')), h("p", { key: 'd658e9aea4384bc89a7a4cae956e90844092894a', class: "s-loyalty-program-reward-info-message-content" }, this.getItemsMarkersText())), (this.prize.key === 'FREE_SHIPPING' || this.getItemsMarkers('both') === '000000') ? '' : h("div", { class: "s-loyalty-program-reward-details" }, h("salla-tabs", { key: this.refreshKey }, this.getItemsMarkers('included') === '000' ? '' : [
|
|
135
|
+
h("salla-tab-header", { slot: "header", name: "included", style: {
|
|
136
|
+
display: this.getItemsMarkers('excluded') === '000' ? 'none' : 'block',
|
|
137
|
+
} }, h("span", { class: "s-loyalty-program-reward-details-tab-icon", innerHTML: IconVerified }), h("span", null, salla.lang.get(`pages.loyalty_program.included`))),
|
|
138
|
+
h("salla-tab-content", { slot: "content", name: "included" }, h("div", { class: "s-loyalty-program-reward-details-items-wrapper" }, this.getCategoriesJsx(this.getIncludedItems(this.prize.categories, this.prize.included_category_ids), salla.lang.get('pages.loyalty_program.included_categories')), this.getBrandsJsx(this.getIncludedItems(this.prize.brands, this.prize.included_brand_ids), salla.lang.get('pages.loyalty_program.included_brands')), this.getProductsJsx(this.getProductIds(this.prize.included_product_ids), salla.lang.get('pages.loyalty_program.included_products')))),
|
|
139
|
+
], this.getItemsMarkers('excluded') === '000' ? '' : [
|
|
140
|
+
h("salla-tab-header", { slot: "header", name: "excluded", style: {
|
|
141
|
+
display: this.getItemsMarkers('included') === '000' ? 'none' : 'block',
|
|
142
|
+
} }, h("span", { class: "s-loyalty-program-reward-details-tab-icon", innerHTML: Cancel }), h("span", null, salla.lang.get(`pages.loyalty_program.excluded`))),
|
|
143
|
+
h("salla-tab-content", { slot: "content", name: "excluded" }, h("div", { class: "s-loyalty-program-reward-details-items-wrapper" }, this.getCategoriesJsx(this.getIncludedItems(this.prize.excludedCategories, this.prize.excluded_category_ids), salla.lang.get('pages.loyalty_program.excluded_categories')), this.getBrandsJsx(this.getIncludedItems(this.prize.excludedBrands, this.prize.excluded_brand_ids), salla.lang.get('pages.loyalty_program.excluded_brands')), this.getProductsJsx(this.getProductIds(this.prize.excluded_product_ids), salla.lang.get('pages.loyalty_program.excluded_products')))),
|
|
144
|
+
]))), h("salla-reward-action", { key: '3b355609aa30f12d0fae5a95681d19b62193113d', onActionClick: e => this.actionClick.emit(e.detail), prize: this.prize })));
|
|
145
|
+
}
|
|
146
|
+
static get watchers() { return {
|
|
147
|
+
"prize": ["handlePrizeChange"]
|
|
148
|
+
}; }
|
|
149
|
+
static get style() { return sallaLoyaltyProgramCss; }
|
|
150
|
+
}, [0, "salla-reward-details", {
|
|
151
|
+
"prize": [16],
|
|
152
|
+
"refreshKey": [32]
|
|
153
|
+
}, undefined, {
|
|
154
|
+
"prize": ["handlePrizeChange"]
|
|
155
|
+
}]);
|
|
156
|
+
__decorate([
|
|
157
|
+
TrackedPromise(async () => {
|
|
158
|
+
return (await salla.product.api.categories()).data;
|
|
159
|
+
}, { initialData: [] })
|
|
160
|
+
], SallaRewardDetails.prototype, "category", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
TrackedPromise(async () => {
|
|
163
|
+
return (await salla.api.request('/brands')).data;
|
|
164
|
+
}, { initialData: [] })
|
|
165
|
+
], SallaRewardDetails.prototype, "brand", void 0);
|
|
166
|
+
function defineCustomElement() {
|
|
167
|
+
if (typeof customElements === "undefined") {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
const components = ["salla-reward-details", "salla-add-product-button", "salla-badge", "salla-button", "salla-count-down", "salla-loading", "salla-modal", "salla-product-availability", "salla-product-card", "salla-products-slider", "salla-progress-bar", "salla-quick-buy", "salla-reward-action", "salla-slider", "salla-tab-content", "salla-tab-header", "salla-tabs", "salla-tel-input"];
|
|
171
|
+
components.forEach(tagName => { switch (tagName) {
|
|
172
|
+
case "salla-reward-details":
|
|
173
|
+
if (!customElements.get(tagName)) {
|
|
174
|
+
customElements.define(tagName, SallaRewardDetails);
|
|
175
|
+
}
|
|
176
|
+
break;
|
|
177
|
+
case "salla-add-product-button":
|
|
178
|
+
if (!customElements.get(tagName)) {
|
|
179
|
+
defineCustomElement$h();
|
|
180
|
+
}
|
|
181
|
+
break;
|
|
182
|
+
case "salla-badge":
|
|
183
|
+
if (!customElements.get(tagName)) {
|
|
184
|
+
defineCustomElement$g();
|
|
185
|
+
}
|
|
186
|
+
break;
|
|
187
|
+
case "salla-button":
|
|
188
|
+
if (!customElements.get(tagName)) {
|
|
189
|
+
defineCustomElement$f();
|
|
190
|
+
}
|
|
191
|
+
break;
|
|
192
|
+
case "salla-count-down":
|
|
193
|
+
if (!customElements.get(tagName)) {
|
|
194
|
+
defineCustomElement$e();
|
|
195
|
+
}
|
|
196
|
+
break;
|
|
197
|
+
case "salla-loading":
|
|
198
|
+
if (!customElements.get(tagName)) {
|
|
199
|
+
defineCustomElement$d();
|
|
200
|
+
}
|
|
201
|
+
break;
|
|
202
|
+
case "salla-modal":
|
|
203
|
+
if (!customElements.get(tagName)) {
|
|
204
|
+
defineCustomElement$c();
|
|
205
|
+
}
|
|
206
|
+
break;
|
|
207
|
+
case "salla-product-availability":
|
|
208
|
+
if (!customElements.get(tagName)) {
|
|
209
|
+
defineCustomElement$b();
|
|
210
|
+
}
|
|
211
|
+
break;
|
|
212
|
+
case "salla-product-card":
|
|
213
|
+
if (!customElements.get(tagName)) {
|
|
214
|
+
defineCustomElement$a();
|
|
215
|
+
}
|
|
216
|
+
break;
|
|
217
|
+
case "salla-products-slider":
|
|
218
|
+
if (!customElements.get(tagName)) {
|
|
219
|
+
defineCustomElement$9();
|
|
220
|
+
}
|
|
221
|
+
break;
|
|
222
|
+
case "salla-progress-bar":
|
|
223
|
+
if (!customElements.get(tagName)) {
|
|
224
|
+
defineCustomElement$8();
|
|
225
|
+
}
|
|
226
|
+
break;
|
|
227
|
+
case "salla-quick-buy":
|
|
228
|
+
if (!customElements.get(tagName)) {
|
|
229
|
+
defineCustomElement$7();
|
|
230
|
+
}
|
|
231
|
+
break;
|
|
232
|
+
case "salla-reward-action":
|
|
233
|
+
if (!customElements.get(tagName)) {
|
|
234
|
+
defineCustomElement$6();
|
|
235
|
+
}
|
|
236
|
+
break;
|
|
237
|
+
case "salla-slider":
|
|
238
|
+
if (!customElements.get(tagName)) {
|
|
239
|
+
defineCustomElement$5();
|
|
240
|
+
}
|
|
241
|
+
break;
|
|
242
|
+
case "salla-tab-content":
|
|
243
|
+
if (!customElements.get(tagName)) {
|
|
244
|
+
defineCustomElement$4();
|
|
245
|
+
}
|
|
246
|
+
break;
|
|
247
|
+
case "salla-tab-header":
|
|
248
|
+
if (!customElements.get(tagName)) {
|
|
249
|
+
defineCustomElement$3();
|
|
250
|
+
}
|
|
251
|
+
break;
|
|
252
|
+
case "salla-tabs":
|
|
253
|
+
if (!customElements.get(tagName)) {
|
|
254
|
+
defineCustomElement$2();
|
|
255
|
+
}
|
|
256
|
+
break;
|
|
257
|
+
case "salla-tel-input":
|
|
258
|
+
if (!customElements.get(tagName)) {
|
|
259
|
+
defineCustomElement$1();
|
|
260
|
+
}
|
|
261
|
+
break;
|
|
262
|
+
} });
|
|
263
|
+
}
|
|
264
|
+
defineCustomElement();
|
|
265
|
+
|
|
266
|
+
export { SallaRewardDetails as S, defineCustomElement as d };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SallaRewardExchange extends Components.SallaRewardExchange, HTMLElement {}
|
|
4
|
+
export const SallaRewardExchange: {
|
|
5
|
+
prototype: SallaRewardExchange;
|
|
6
|
+
new (): SallaRewardExchange;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { S as SallaRewardExchange$1, d as defineCustomElement$1 } from './salla-reward-exchange2.js';
|
|
5
|
+
|
|
6
|
+
const SallaRewardExchange = SallaRewardExchange$1;
|
|
7
|
+
const defineCustomElement = defineCustomElement$1;
|
|
8
|
+
|
|
9
|
+
export { SallaRewardExchange, defineCustomElement };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
5
|
+
import { c as closeModals } from './functions.js';
|
|
6
|
+
import { l as loyaltyProgramIcon } from './gift.js';
|
|
7
|
+
import { T as TrackedPromise } from './tracked-promise.js';
|
|
8
|
+
import { d as defineCustomElement$1 } from './salla-loading2.js';
|
|
9
|
+
|
|
10
|
+
const sallaLoyaltyProgramCss = "";
|
|
11
|
+
|
|
12
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
13
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
15
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
16
|
+
else
|
|
17
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
18
|
+
if (d = decorators[i])
|
|
19
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
20
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21
|
+
};
|
|
22
|
+
const SallaRewardExchange = /*@__PURE__*/ proxyCustomElement(class SallaRewardExchange extends HTMLElement {
|
|
23
|
+
constructor() {
|
|
24
|
+
super();
|
|
25
|
+
this.__registerHost();
|
|
26
|
+
this.productId = null;
|
|
27
|
+
}
|
|
28
|
+
reset(timeout = 0) {
|
|
29
|
+
setTimeout(() => {
|
|
30
|
+
closeModals();
|
|
31
|
+
}, timeout);
|
|
32
|
+
}
|
|
33
|
+
async handleConfirm() {
|
|
34
|
+
try {
|
|
35
|
+
await this.exchange(this.prize.id, null, this.productId);
|
|
36
|
+
this.reset(300);
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
salla.logger.error(error);
|
|
40
|
+
// Do NOT close the modal; let the error state render so the user sees feedback.
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
handleCancel() {
|
|
44
|
+
this.reset(0);
|
|
45
|
+
}
|
|
46
|
+
render() {
|
|
47
|
+
return (h(Host, { key: 'b5b9a966f28520c30917887621e2358fdb9530be' }, h("div", { key: '4e87e3d0530a7fca6db1bf09fd1b059b85e56f10', class: "s-loyalty-program-exchange-heading" }, h("div", { key: '73b9aa3106336e8cdc81ce78371b3efc47b5c569', class: "s-loyalty-program-circle-base s-loyalty-program-circle-size-xl s-loyalty-program-circle-variant-fill" }, h("span", { key: '0e6c488afa39784a40bfed2f1d180fc48664a81a', innerHTML: loyaltyProgramIcon })), h("h2", { key: '7740e27318379264905ff695e0c0cf13b54800d0' }, salla.lang.get('pages.loyalty_program.redeem_reward')), h("p", { key: '81a7ba841e3e26c7c9fc1054745ad163cc347db7' }, salla.lang.get('pages.loyalty_program.redeem_confirmation'), " ", h("span", { key: '0f5d68dbe2de661c2aad02d237d3098349e94120' }, "(", this.prize.cost_points, " ", salla.lang.get('pages.loyalty_program.point'), ")"), " ", salla.lang.get('pages.loyalty_program.for'), " ", h("span", { key: '1daa10a1843938166c6834d0369edfe7e06dd54e' }, "(", this.prize.name, ")"))), h("div", { key: '42384b2df2cbb3775ccc6f7a017d9ef9f770baf5', class: "s-loyalty-program-exchange-btns" }, h("button", { key: 'b90b95adae80a9bcb47c0d039ea8bd9399ee5bc5', class: "s-loyalty-program-rewards-action-base s-loyalty-program-rewards-action-confirm", onClick: () => this.handleConfirm() }, h("span", { key: 'c108973d9729265fb35a0d0fa781d525388a4c12', style: {
|
|
48
|
+
opacity: this.exchange.status !== 'pending' ? '1' : '0',
|
|
49
|
+
} }, salla.lang.get('common.elements.confirm')), h("span", { key: '302a31b9095d153b4662ada13d45cdb6b15664ad', class: "s-loyalty-program-exchange-loading", style: {
|
|
50
|
+
opacity: this.exchange.status === 'pending' ? '1' : '0',
|
|
51
|
+
} }, h("salla-loading", { key: '3e305da32d469f6ec874c128a1fd68356280dc69', color: "primary", size: 24 }))), h("button", { key: '466f8cfea3e370bce9466e9571f4567fb5a7966d', class: "s-loyalty-program-rewards-action-base s-loyalty-program-rewards-action-cancel", onClick: () => this.handleCancel() }, salla.lang.get('common.elements.cancel')))));
|
|
52
|
+
}
|
|
53
|
+
static get style() { return sallaLoyaltyProgramCss; }
|
|
54
|
+
}, [0, "salla-reward-exchange", {
|
|
55
|
+
"prize": [16],
|
|
56
|
+
"productId": [2, "product-id"]
|
|
57
|
+
}]);
|
|
58
|
+
__decorate([
|
|
59
|
+
TrackedPromise(async (...args) => await salla.loyalty.exchange(...args))
|
|
60
|
+
], SallaRewardExchange.prototype, "exchange", void 0);
|
|
61
|
+
function defineCustomElement() {
|
|
62
|
+
if (typeof customElements === "undefined") {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const components = ["salla-reward-exchange", "salla-loading"];
|
|
66
|
+
components.forEach(tagName => { switch (tagName) {
|
|
67
|
+
case "salla-reward-exchange":
|
|
68
|
+
if (!customElements.get(tagName)) {
|
|
69
|
+
customElements.define(tagName, SallaRewardExchange);
|
|
70
|
+
}
|
|
71
|
+
break;
|
|
72
|
+
case "salla-loading":
|
|
73
|
+
if (!customElements.get(tagName)) {
|
|
74
|
+
defineCustomElement$1();
|
|
75
|
+
}
|
|
76
|
+
break;
|
|
77
|
+
} });
|
|
78
|
+
}
|
|
79
|
+
defineCustomElement();
|
|
80
|
+
|
|
81
|
+
export { SallaRewardExchange as S, defineCustomElement as d };
|
|
@@ -165,7 +165,7 @@ const SallaScopees = /*@__PURE__*/ proxyCustomElement(class SallaScopees extends
|
|
|
165
165
|
return salla.onReady();
|
|
166
166
|
}
|
|
167
167
|
render() {
|
|
168
|
-
return (h(Host, { key: '
|
|
168
|
+
return (h(Host, { key: '496e4e55483fee5b91818a760adb95d606b0d146' }, h("salla-modal", { key: '2e0e7c2967a0a05068aad712774cd089984fb957', ref: modal => this.modal = modal, isClosable: !!(this.isOpenedBefore || (this.selection == 'optional')), class: "s-scopes-modal", isLoading: this.loading, "has-skeleton": true }, this.loading ?
|
|
169
169
|
h("div", { slot: "loading" }, h("div", { class: "s-scopes-skeleton" }, h("salla-list-tile", { class: "s-scopes-header" }, h("div", { slot: "icon", class: "s-scopes-header-icon" }, h("salla-skeleton", { type: "circle" })), h("div", { slot: "title", class: "s-scopes-header-title mb-5" }, h("salla-skeleton", { height: '15px', width: '50%' })), h("div", { slot: "subtitle", class: "s-scopes-header-subtitle" }, h("salla-skeleton", { height: '10px' }), h("salla-skeleton", { height: '10px', width: '75%' }))), h("div", { class: "s-scopes-skeleton-search" }, h("salla-skeleton", { height: '10px', width: '50%' }), h("salla-skeleton", { height: '30px', width: '100%' })), h("div", { class: "s-scopes-skeleton-scopes" }, h("salla-skeleton", { height: '10px', width: '30%' }), h("salla-skeleton", { height: '10px', width: '25%' }), h("salla-skeleton", { height: '10px', width: '30%' }), h("salla-skeleton", { height: '10px', width: '25%' }), h("salla-skeleton", { height: '10px', width: '30%' }), h("salla-skeleton", { height: '10px', width: '25%' }), h("salla-skeleton", { height: '10px', width: '30%' }), h("salla-skeleton", { height: '10px', width: '25%' })), h("div", { class: "s-scopes-skeleton-btn" }, h("salla-skeleton", { height: '40px', width: '100%' }))))
|
|
170
170
|
:
|
|
171
171
|
[h("salla-list-tile", { class: this.originalScopesList?.length ? "s-scopes-header block" : "s-hidden" }, h("div", { slot: "icon", class: "s-scopes-header-icon", innerHTML: StoreAlt }), h("div", { slot: "title", class: "s-scopes-header-title" }, salla.lang.get('blocks.scope.you_are_browse_store_from')), h("div", { slot: "subtitle", class: "s-scopes-header-subtitle" }, !!this.selected_scope ? this.selected_scope.name : "")), h("div", { class: "s-scopes-wrap" }, !!this.originalScopesList?.length && h("h4", { class: "s-scopes-title" }, this.getFormTitle()), this.originalScopesList?.length > this.searchDisplayLimit ?
|
|
@@ -132,10 +132,10 @@ const SallaSearch$1 = /*@__PURE__*/ proxyCustomElement(class SallaSearch extends
|
|
|
132
132
|
this.inputValue.length < 3 ? this.container.classList.remove('s-search-no-results') : '';
|
|
133
133
|
}
|
|
134
134
|
render() {
|
|
135
|
-
const searchContent = (h("div", { key: '
|
|
135
|
+
const searchContent = (h("div", { key: 'c1ac55ddb93b42cb84c30c0248be8949afef39df', class: { 's-search-container': true, 's-search-inline': this.inline }, ref: container => (this.container = container) }, h("div", { key: '6bdecb7d3511a5c97b4bb52860dcd050dc943573', class: "s-search-input-wrapper" }, h("span", { key: '93a0cd39aef09955e72657ba32a7ac1d4c6bdb7b', class: "s-search-icon-wrap" }, h("span", { key: '435ca7f22ba4d93eafe9fde32a7e62a55340e6a8', class: "s-search-icon", innerHTML: this.loading ? '<i class="s-search-spinner-loader"/>' : Search })), h("input", { key: '0acb71b9b5fe6681d33e7838ff14bbdee6159ccc', type: "search", enterkeyhint: "search", autocomplete: "off", class: "s-search-input", placeholder: salla.lang.get('blocks.header.search_placeholder'), onInput: (e) => this.limitWordsAndSearch(e), onKeyDown: e => this.handleKeyDown(e), ref: input => (this.searchInput = input), style: {
|
|
136
136
|
height: this.height + 'px',
|
|
137
137
|
borderRadius: this.oval ? this.height / 2 + 'px' : '',
|
|
138
|
-
} }), this.showAction ? (h("salla-button", { loading: this.loading, class: { 's-search-action': true, 's-search-action-oval': this.oval }, onClick: () => this.handleActionClick() }, !this.loading && h("span", { innerHTML: Search }))) : null), h("div", { key: '
|
|
138
|
+
} }), this.showAction ? (h("salla-button", { loading: this.loading, class: { 's-search-action': true, 's-search-action-oval': this.oval }, onClick: () => this.handleActionClick() }, !this.loading && h("span", { innerHTML: Search }))) : null), h("div", { key: '9fc770575d0deeafda11f85aeb420a66cc2c2f64', class: "s-search-results" }, this.results?.data.map(product => (h("a", { href: product.url + '?from=search-bar', class: {
|
|
139
139
|
's-search-product': true,
|
|
140
140
|
's-search-product-not-available': !product.is_available,
|
|
141
141
|
}, innerHTML: this.productSlot
|
|
@@ -144,9 +144,9 @@ const SallaSearch$1 = /*@__PURE__*/ proxyCustomElement(class SallaSearch extends
|
|
|
144
144
|
.replace(/\{regular_price\}/g, product.is_on_sale && product.regular_price
|
|
145
145
|
? salla.money(product.regular_price)
|
|
146
146
|
: '')
|
|
147
|
-
.replace(/\{image\}/g, product.image.url) }))), h("p", { key: '
|
|
148
|
-
const modalContent = (h("salla-modal", { key: '
|
|
149
|
-
const placeholderContent = (h("div", { key: '
|
|
147
|
+
.replace(/\{image\}/g, product.image.url) }))), h("p", { key: '31de1c46ae9ea8dce146f7a5e3b10eb61781a5e9', ref: el => (this.noResults = el), class: "s-search-no-results-placeholder" }, salla.lang.get('common.elements.no_options')))));
|
|
148
|
+
const modalContent = (h("salla-modal", { key: '14efe319f3f844b2f3a1759a7f860b4dc3652570', position: "top", class: "s-search-modal", ref: modal => (this.modal = modal) }, searchContent));
|
|
149
|
+
const placeholderContent = (h("div", { key: 'affda57d4ae84ea36e215bc17bc328b9f1a5a8de', class: "s-search-placeholder-wrapper s-search-inline" }, h("div", { key: '51f3e2afd425459365887b4e7c1ef2da4433dbe8', class: "s-search-input-wrapper" }, h("span", { key: '79ed8316f06548aecb3a76384835e64e72330917', class: "s-search-icon-wrap" }, h("span", { key: 'ba690f7b674dac90062ed2328c6396933c4ac872', class: "s-search-icon", innerHTML: Search })), h("button", { key: 'ac57df999004b21e1469978f9963aceded386d9d', type: "button", class: "s-search-input s-search-placeholder-trigger", onClick: () => this.open(), style: {
|
|
150
150
|
height: this.height + 'px',
|
|
151
151
|
borderRadius: this.oval ? this.height / 2 + 'px' : '',
|
|
152
152
|
} }, salla.lang.get('blocks.header.search_placeholder'))), modalContent));
|
|
@@ -27,7 +27,7 @@ const SallaSkeleton = /*@__PURE__*/ proxyCustomElement(class SallaSkeleton exten
|
|
|
27
27
|
's-skeleton-item': true,
|
|
28
28
|
's-skeleton-item-circular': this.type == 'circle',
|
|
29
29
|
};
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: '8f574f21608fb5177c8a5d7e0d84d1c1065e49a4', class: "s-skeleton-wrapper", style: { width: this.width, height: this.height } }, h("div", { key: '6c86b14ec10c5ccea8f336ab87fb433c49104149', class: classes }, "\u00A0")));
|
|
31
31
|
}
|
|
32
32
|
static get style() { return sallaSkeletonCss; }
|
|
33
33
|
}, [0, "salla-skeleton", {
|
|
@@ -150,7 +150,7 @@ const SallaSocialShare$1 = /*@__PURE__*/ proxyCustomElement(class SallaSocialSha
|
|
|
150
150
|
window.a2a?.init('page');
|
|
151
151
|
}
|
|
152
152
|
render() {
|
|
153
|
-
return (h("div", { key: '
|
|
153
|
+
return (h("div", { key: '49da8d5e8066550792640f4677eb43f762fbecbe', class: "s-social-share-wrapper" }, h("slot", { key: 'ee7ef614fe373217829caa31f0eb9526e6695d93', name: 'widget' }, h("salla-button", { key: '53c41b4185b19a08cdadc4ce30baed08dd95d638', "aria-label": "Share", onClick: () => this.open(), class: "s-social-share-btn", shape: "icon", fill: "outline", color: "light" }, h("span", { key: 'dae3c709e895a8e023bfc8aff490e52ea0e8e19a', innerHTML: this.opened ? Cancel : ShareAlt }))), h("ul", { key: '64fda7434bbe22a0cbae61273b61a67528c441c7', ref: el => this.shareMenu = el, class: "s-social-share-list a2a_kit share", "data-a2a-url": this.url ? this.url : window.location.href, "data-a2a-title": this.urlName ? this.urlName : document.title }, this.platforms.split(',').map(platform => {
|
|
154
154
|
return (h("li", null, h("a", { class: `a2a_button_${platform}`, "aria-label": `Share Via ${platform}` }, this.platformIcons.map((icon) => {
|
|
155
155
|
if (icon.name === platform) {
|
|
156
156
|
return h("span", { class: "s-social-share-icon", innerHTML: icon.icon });
|
|
@@ -56,7 +56,7 @@ const SallaSocial$1 = /*@__PURE__*/ proxyCustomElement(class SallaSocial extends
|
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
58
|
const linksArray = this.getLinksArray();
|
|
59
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: 'a0b31aa06db07b8b4018b8d178dc27726eddb43e' }, h("ul", { key: 'b758199092ddf7c0e0b384f3f118d00c239104dd', class: "s-social-list" }, linksArray.map((link) => (h("li", { class: "s-social-link" }, h("div", { id: "social-slot", innerHTML: this.socialSlot
|
|
60
60
|
.replace(/\{icon\}/g, this.iconsList[link.type])
|
|
61
61
|
.replace(/\{type\}/g, link.type)
|
|
62
62
|
.replace(/\{link\}/g, link.value.toString()) })))))));
|
|
@@ -32,7 +32,7 @@ const SallaTabContent = /*@__PURE__*/ proxyCustomElement(class SallaTabContent e
|
|
|
32
32
|
's-tabs-content': true,
|
|
33
33
|
's-tabs-content-selected': this.isSelected
|
|
34
34
|
};
|
|
35
|
-
return (h("div", { key: '
|
|
35
|
+
return (h("div", { key: 'f2deb9c1508aafe3aff5352094cccc97bdcd42ef', class: classes }, h("slot", { key: '460588864047444acdb06e757a7124d28935c24b' })));
|
|
36
36
|
}
|
|
37
37
|
static get style() { return sallaTabContentCss; }
|
|
38
38
|
}, [4, "salla-tab-content", {
|
|
@@ -58,7 +58,7 @@ const SallaTabHeader = /*@__PURE__*/ proxyCustomElement(class SallaTabHeader ext
|
|
|
58
58
|
's-tabs-active': this.isSelected,
|
|
59
59
|
};
|
|
60
60
|
return [
|
|
61
|
-
h("div", { key: '
|
|
61
|
+
h("div", { key: '153247ab5a7c73819ccc506a45e60b9c084c391c', class: classes, onClick: this.onClick.bind(this) }, h("slot", { key: '417a3ae0c0aec8a965b5d3be9a4f917f290d2109' })),
|
|
62
62
|
];
|
|
63
63
|
}
|
|
64
64
|
static get style() { return sallaTabHeaderCss; }
|
|
@@ -51,7 +51,7 @@ const SallaTabs = /*@__PURE__*/ proxyCustomElement(class SallaTabs extends HTMLE
|
|
|
51
51
|
}
|
|
52
52
|
render() {
|
|
53
53
|
return [
|
|
54
|
-
h("div", { key: '
|
|
54
|
+
h("div", { key: 'ae50836f68ee92459720fa9bf00d73848d849627', class: "s-tabs" }, h("div", { key: '55e8186e80381902269f9bad5738d9a555f71d37', class: "s-tabs-header" }, h("slot", { key: '46ce3e1ea75f92165b3d5ee7c16f19f8693f6d31', name: "header" })), h("div", { key: '3669e643abb37ed2edca73fc0577822a3f7fbb90', class: "s-tabs-content-wrapper" }, h("slot", { key: '2cf8b79f44630e21103991325ceff2cd3a4019ba', name: "content" })))
|
|
55
55
|
];
|
|
56
56
|
}
|
|
57
57
|
get host() { return this; }
|
|
@@ -129,7 +129,7 @@ const SallaTelInput = /*@__PURE__*/ proxyCustomElement(class SallaTelInput exten
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
render() {
|
|
132
|
-
return (h(Host, { key: '
|
|
132
|
+
return (h(Host, { key: '278424c0918dc3c4b6aac8da5817376d784995ac', class: "s-tel-input" }, h("input", { key: '00ff8ed40ff9aabe9bea6cfd43c41f5b2cfc5529', type: "tel", disabled: this.disabled, name: this.name, value: this.phone, onChange: (event) => this.handleCountryInput(event), ref: el => this.phoneInput = el, enterkeyhint: "next", autocomplete: "tel", class: "s-tel-input-control tel-input s-ltr" }), h("span", { key: '68e791d4d1b6490a84a3ef31c75f41be90ac5bb6', class: "s-tel-input-error-msg", ref: el => this.errorMsg = el }), h("input", { key: '415e6521c2ef756ebabbeb4610c06158e255320d', type: "hidden", name: "country_code", value: this.countryCode, ref: el => this.countryCodeInput = el, class: "country_code" })));
|
|
133
133
|
}
|
|
134
134
|
componentDidLoad() {
|
|
135
135
|
this.initTelInput();
|
|
@@ -32,7 +32,7 @@ const SallaTooltip = /*@__PURE__*/ proxyCustomElement(class SallaTooltip extends
|
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
34
|
const validTheme = ['default', 'dark'].includes(this.theme) ? this.theme : 'default';
|
|
35
|
-
return (h("div", { key: '
|
|
35
|
+
return (h("div", { key: 'e5e8f78265e0abb1d4130fd084573c6cff1ecb2c', class: "s-tooltip-container" }, h("div", { key: '4dc98906dfd28c6e2d97b51329c07046eb15179c', class: `s-tooltip-item s-tooltip-item--${validTheme}`, style: { display: this.show ? 'block' : 'none' } }, this.text ? h("span", null, this.text) : h("slot", null))));
|
|
36
36
|
}
|
|
37
37
|
get el() { return this; }
|
|
38
38
|
static get style() { return sallaTooltipCss; }
|
|
@@ -83,7 +83,7 @@ const SallaUserSettings$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserSett
|
|
|
83
83
|
await salla.profile.delete().finally(() => this.confirmationModal.close());
|
|
84
84
|
}
|
|
85
85
|
render() {
|
|
86
|
-
return (h(Host, { key: '
|
|
86
|
+
return (h(Host, { key: 'b37f8e7cd7fe59dfd4f4e1efe455e74d33d4b91e', class: "s-user-settings-wrapper" }, this.canHideName && h("div", { key: '7cf5f1ed489159ef1c754fc8368b390d35cc273d', class: "s-user-settings-section" }, h("salla-list-tile", { key: '961843ff5de245febf4b5d9d4a96d47b44aeaff3' }, h("div", { key: 'bdfa266ee2694e410ff2bc8d6ec31b5210e7bf08', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '8ff08646cb3b3ba8d157f07cb4d54a6f515409a7', innerHTML: UserCancel })), h("div", { key: '8030d07722d9ad730676dafd1323b93a361f91da', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.hideMyName)), h("div", { key: 'f4c524dfe45418f0dd7395e998b1c16aa951a5f9', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.hideMyNameDesc)), h("div", { key: '74569032acb01ff1037104dcaf46f13c18c16803', slot: 'action', class: "s-user-settings-section-action" }, h("label", { key: '6002a8368a587dbd8d3fd3fc1231e52ee44ebbbe', class: "s-toggle" }, h("input", { key: '2e9a622f9a670ef0f314c6183c57c851334a7df5', class: "s-toggle-input", checked: this.isHiddenName, onChange: (e) => this.toggleSetting('is_hidden_name', e), type: "checkbox" }), h("div", { key: 'ca57daef65f550d53c1f947b41d3fb488bd38a95', class: "s-toggle-switcher" }))))), h("div", { key: 'b81a0200e08c0eca176060362792a45d9d7ad41e', class: "s-user-settings-section" }, h("salla-list-tile", { key: 'ebcdac4056d21cbbd218b246cdd6c5bfa7bc2ac3' }, h("div", { key: 'df3a675745a0945498f3f45e11016f9f9c71ce6d', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: 'b5accc798ca95bd803f9c721f96fe62ca27e8ecf', innerHTML: Bullhorn })), h("div", { key: 'fe82c42f7586ba892f14ed7b1d2f85e19c508e8c', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.promotionalMsgs)), h("div", { key: 'ec35e1a363a0802ab14a92b4bc8b858b9bf79c72', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.promotionalMsgsDesc)), h("div", { key: 'cc0d65144cfffc7fc795f3b1dde9ae6d75e827ec', slot: 'action', class: "s-user-settings-section-action" }, h("label", { key: '945d030759a2ab27b9e9379d96f879d299b0a444', class: "s-toggle" }, h("input", { key: '6dd35723f4e049263193d50d1488a300e26a166e', class: "s-toggle-input", checked: this.isNotifiable, onChange: (e) => this.toggleSetting('is_notifiable', e), type: "checkbox" }), h("div", { key: '1f529a32b220a0a5ba673fe41573786450e4f1b8', class: "s-toggle-switcher" }))))), h("div", { key: '9973aa99cd3944ced8e87da05a3711b9cde5faa4', class: "s-user-settings-section s-user-settings-section-deactivate-user" }, h("salla-list-tile", { key: '97ea806a1c5bc6e7f08ab04cdf555173d7e2c268' }, h("div", { key: 'fa98419cd6e11598c6e230ad462501f3dd66b975', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '9bb7192d2bcdd942974a2a6e405878998e090f3c', innerHTML: UserOff })), h("div", { key: '9e79bfd50311f2ec272bc6d90224d2f81c736d8e', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.deactivateAccount)), h("div", { key: '805696292b1354bf57b0f0252eabd031dc4ac5db', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.deactivateDesc)), h("div", { key: '4984f94d2eef4870036d1bea837cbe16e9978d84', slot: 'action', class: "s-user-settings-section-action" }, h("salla-button", { key: '7be1eaf49fdb3df86b953a14879695c0c2eae838', fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", onClick: () => this.openDeactivateModal() }, this.capitalizeText(this.deactivateAccount))))), h("salla-modal", { key: '55608c2fbfd01c328f923316aa203ebd6539ef86', width: "sm", subTitle: this.capitalizeText(this.sorryForLeavingText), ref: modal => this.confirmationModal = modal }, h("span", { key: '247bb5555b3aa936ab4815f16ec332f6d922ab49', slot: 'icon', class: "s-user-settings-confirmation-icon", innerHTML: UserOff }), h("div", { key: 'd8499d470dd0cce984687c9f6842970467b832a9', class: "s-user-settings-confirmation" }, h("div", { key: 'c4d98f4dc7591c53a0f4ab71fc1c7e0d446cebfc', class: "s-user-settings-confirmation-warning" }, this.capitalizeText(this.warningText)), h("div", { key: 'abebad572dab06b497451fff00a405e4c9db5652', class: "s-user-settings-confirmation-actions" }, h("salla-button", { key: 'bfde878cc657d975154f6e8b73220786b3898dbf', width: "wide", onClick: () => this.confirmationModal.close() }, this.capitalizeText(this.keepAccount)), h("salla-button", { key: 'b3334a9b6fda2aa6de6f66f610efbba8ae95910f', fill: 'outline', loading: this.buttonLoading, width: "wide", onClick: () => this.deleteAccount() }, this.capitalizeText(this.deactivateAccount)))))));
|
|
87
87
|
}
|
|
88
88
|
static get style() { return sallaUserSettingsCss; }
|
|
89
89
|
}, [0, "salla-user-settings", {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
var SIShipping = `<!-- Generated by IcoMoon.io -->
|
|
5
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
6
|
+
<title>shipping</title>
|
|
7
|
+
<path d="M31.124 13.104l-3.148-3.935c-1.273-1.591-3.171-2.503-5.207-2.503h-1.436c0-2.205-1.795-4-4-4h-13.333c-2.205 0-4 1.795-4 4v17.333c0 0.737 0.596 1.333 1.333 1.333h2.856c0.596 2.295 2.665 4 5.144 4 2.941 0 5.333-2.392 5.333-5.333s-2.392-5.333-5.333-5.333c-2.479 0-4.548 1.705-5.144 4h-1.523v-16c0-0.735 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.599 1.333 1.333v1.333c0 0.248 0.087 0.468 0.204 0.667-0.117 0.199-0.204 0.419-0.204 0.667v5.333c0 0.736 0.596 1.333 1.333 1.333h9.333v6.667h-1.333c-0.063 0-0.117 0.028-0.179 0.036-0.583-2.313-2.663-4.036-5.155-4.036-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333c2.492 0 4.572-1.723 5.155-4.036 0.061 0.008 0.116 0.036 0.179 0.036h2.667c0.737 0 1.333-0.596 1.333-1.333v-8.397c0-0.907-0.311-1.795-0.876-2.499zM9.333 21.333c1.471 0 2.667 1.196 2.667 2.667s-1.196 2.667-2.667 2.667-2.667-1.196-2.667-2.667 1.196-2.667 2.667-2.667zM21.333 13.333v-4h1.436c1.221 0 2.361 0.548 3.124 1.501l1.999 2.499zM22.667 26.667c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667z"></path>
|
|
8
|
+
</svg>
|
|
9
|
+
`;
|
|
10
|
+
|
|
11
|
+
export { SIShipping as S };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
var Tag = `<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
5
|
+
<title>tag</title>
|
|
6
|
+
<path d="M28 0h-9.344c-1.059 0-2.056 0.411-2.809 1.153l-14.673 14.456c-1.56 1.56-1.561 4.097-0.001 5.657l9.56 9.56c0.755 0.755 1.76 1.172 2.828 1.173h0.003c1.068 0 2.072-0.416 2.833-1.179l14.451-14.668c0.743-0.753 1.153-1.751 1.153-2.809v-9.344c0-2.205-1.795-4-4-4zM29.333 13.344c0 0.353-0.137 0.685-0.385 0.937l-14.444 14.661c-0.252 0.252-0.587 0.391-0.941 0.391-0.001 0-0.001 0-0.001 0-0.356-0.001-0.691-0.139-0.943-0.392l-9.561-9.56c-0.52-0.52-0.52-1.365-0.005-1.88l14.667-14.449c0.253-0.248 0.585-0.385 0.937-0.385h9.344c0.736 0 1.333 0.597 1.333 1.333zM24 6.673c-0.737 0-1.333 0.604-1.333 1.341s0.596 1.333 1.333 1.333 1.333-0.596 1.333-1.333v-0.015c0-0.737-0.596-1.327-1.333-1.327z"></path>
|
|
7
|
+
</svg>
|
|
8
|
+
`;
|
|
9
|
+
|
|
10
|
+
export { Tag as T };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { forceUpdate } from '@stencil/core/internal/client';
|
|
5
|
+
|
|
6
|
+
function TrackedPromise(fn, options = {}) {
|
|
7
|
+
options = Object.assign({ initialData: undefined, initialStatus: 'idle' }, options);
|
|
8
|
+
return (target, propertyKey) => {
|
|
9
|
+
const trackedPromise = Object.assign(function (...args) {
|
|
10
|
+
const update = (newState) => {
|
|
11
|
+
Object.assign(this[propertyKey], newState);
|
|
12
|
+
forceUpdate(this);
|
|
13
|
+
};
|
|
14
|
+
update({ status: 'pending', error: undefined });
|
|
15
|
+
return fn.call(this, ...args).then((data) => {
|
|
16
|
+
update({ status: 'success', data, error: undefined });
|
|
17
|
+
return data;
|
|
18
|
+
}, (error) => {
|
|
19
|
+
update({ status: 'error', error });
|
|
20
|
+
return Promise.reject(error);
|
|
21
|
+
});
|
|
22
|
+
}, { status: options.initialStatus, data: options.initialData, error: undefined });
|
|
23
|
+
Object.defineProperty(target, propertyKey, {
|
|
24
|
+
value: trackedPromise,
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { TrackedPromise as T };
|